@morscherlab/mint-sdk 1.2.0-beta.1 → 1.2.0-beta.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +35 -5
- package/dist/{ExperimentPopover-tLwJ7XF4.js → ExperimentPopover-oL0fg_A0.js} +6 -4
- package/dist/ExperimentPopover-oL0fg_A0.js.map +1 -0
- package/dist/{ExperimentSelectorModal-DyPAUCLw.js → ExperimentSelectorModal-BeEOomw_.js} +5 -5
- package/dist/ExperimentSelectorModal-BeEOomw_.js.map +1 -0
- package/dist/{SettingsModal-BgKY93zh.js → SettingsModal-Dphh3RrI.js} +5 -8
- package/dist/SettingsModal-Dphh3RrI.js.map +1 -0
- package/dist/{EmptyState-p90quq8Z.js → Skeleton-DxtwJ5gt.js} +111 -93
- package/dist/Skeleton-DxtwJ5gt.js.map +1 -0
- package/dist/__tests__/components/ExperimentTimeline.test.d.ts +1 -0
- package/dist/__tests__/components/PluginWorkspaceView.internal.test.d.ts +1 -0
- package/dist/__tests__/components/SecretInput.test.d.ts +1 -0
- package/dist/__tests__/components/WellEditPopupInternal.test.d.ts +1 -0
- package/dist/__tests__/composables/useListReorder.test.d.ts +1 -0
- package/dist/__tests__/composables/usePluginConfig.test.d.ts +15 -0
- package/dist/__tests__/styles/cssTokens.test.d.ts +1 -0
- package/dist/components/ActionMenu.vue.d.ts +1 -1
- package/dist/components/AppAvatarMenu.vue.d.ts +4 -0
- package/dist/components/AppPluginSwitcher.vue.d.ts +2 -0
- package/dist/components/AppSidebar.vue.d.ts +1 -1
- package/dist/components/AuditTrail.vue.d.ts +13 -0
- package/dist/components/AutoGroupModal.vue.d.ts +1 -1
- package/dist/components/BatchProgressList.vue.d.ts +17 -0
- package/dist/components/BioTemplateExperimentWorkspaceView.vue.d.ts +2 -2
- package/dist/components/DataFrame.vue.d.ts +14 -2
- package/dist/components/DatePicker.vue.d.ts +1 -1
- package/dist/components/DateTimePicker.vue.d.ts +2 -0
- package/dist/components/DropdownButton.vue.d.ts +2 -0
- package/dist/components/ExperimentDataViewer.vue.d.ts +26 -1
- package/dist/components/ExperimentPopover.vue.d.ts +1 -0
- package/dist/components/ExperimentTimeline.vue.d.ts +29 -1
- package/dist/components/FitPanel.vue.d.ts +1 -1
- package/dist/components/JobsStatusTray.vue.d.ts +9 -2
- package/dist/components/LcmsSequenceTable.vue.d.ts +29 -1
- package/dist/components/PluginWorkspaceView.props.d.ts +29 -1
- package/dist/components/PluginWorkspaceView.vue.d.ts +5 -5
- package/dist/components/ProgressBar.vue.d.ts +1 -1
- package/dist/components/ProtocolStepEditor.vue.d.ts +1 -0
- package/dist/components/ReagentList.vue.d.ts +29 -1
- package/dist/components/SampleHierarchyTree.vue.d.ts +29 -1
- package/dist/components/SampleLegend.vue.d.ts +1 -1
- package/dist/components/SampleSelector.drag.d.ts +13 -0
- package/dist/components/SampleSelector.tree.d.ts +2 -0
- package/dist/components/SampleSelector.vue.d.ts +35 -2
- package/dist/components/ScheduleCalendar.vue.d.ts +20 -0
- package/dist/components/SecretInput.vue.d.ts +28 -0
- package/dist/components/SettingsModal.vue.d.ts +1 -1
- package/dist/components/SmartGroupFieldRecipe.vue.d.ts +2 -1
- package/dist/components/TimePicker.vue.d.ts +1 -0
- package/dist/components/WellPlate.geometry.d.ts +15 -0
- package/dist/components/WellPlate.interaction.d.ts +13 -0
- package/dist/components/WellPlate.vue.d.ts +29 -0
- package/dist/components/index.d.ts +9 -0
- package/dist/components/index.js +8 -8
- package/dist/components/internal/AppTopBarPageSelectorInternal.vue.d.ts +2 -0
- package/dist/components/internal/DataStateInternal.vue.d.ts +43 -0
- package/dist/components/internal/WellEditPopupInternal.vue.d.ts +3 -1
- package/dist/components/internal/WorkspaceControlsInternal.vue.d.ts +23 -0
- package/dist/components/internal/WorkspaceShellInternal.vue.d.ts +70 -0
- package/dist/components/internal/WorkspaceSidebarInternal.vue.d.ts +43 -0
- package/dist/{components-DkHddRMl.js → components-CgAUzF8F.js} +2497 -2235
- package/dist/components-CgAUzF8F.js.map +1 -0
- package/dist/composables/controlSchemaTypes.d.ts +34 -0
- package/dist/composables/flattenWorkspaceBindings.d.ts +61 -0
- package/dist/composables/index.d.ts +9 -2
- package/dist/composables/index.js +10 -10
- package/dist/composables/pluginWorkspaceModel.d.ts +164 -0
- package/dist/composables/useAsync.d.ts +5 -1
- package/dist/composables/useBioTemplateWorkspace.d.ts +4 -20
- package/dist/composables/useCommandHistory.d.ts +5 -1
- package/dist/composables/useDropdownState.d.ts +18 -2
- package/dist/composables/useEventStream.d.ts +9 -0
- package/dist/composables/useFocusTrap.d.ts +21 -0
- package/dist/composables/useGeneratedAnalysis.d.ts +3 -1
- package/dist/composables/useJobsStatusTray.d.ts +25 -1
- package/dist/composables/useListReorder.d.ts +90 -0
- package/dist/composables/useMenuKeyboard.d.ts +29 -0
- package/dist/composables/useOptimisticMutation.d.ts +5 -1
- package/dist/composables/usePluginClient.d.ts +2 -0
- package/dist/composables/usePluginConfig.d.ts +27 -0
- package/dist/composables/usePluginWorkspace.d.ts +51 -0
- package/dist/composables/useRequestSyncState.d.ts +42 -2
- package/dist/composables/useResourceCrud.d.ts +5 -1
- package/dist/composables/useRovingFocus.d.ts +24 -0
- package/dist/composables/useScheduleDrag.d.ts +1 -0
- package/dist/composables/useWellPainting.d.ts +5 -1
- package/dist/composables/useWellPlateAdapter.d.ts +5 -1
- package/dist/composables/useWellPlateValidation.d.ts +5 -1
- package/dist/composables/workspaceRecipes.d.ts +188 -0
- package/dist/{composables-C_i90sGS.js → composables-B_pia3hO.js} +209 -82
- package/dist/composables-B_pia3hO.js.map +1 -0
- package/dist/{useApi-J6zFkHmn.js → errors-_W0-LbA6.js} +103 -3
- package/dist/errors-_W0-LbA6.js.map +1 -0
- package/dist/{experiment-Cq145oEW.js → experiment-Cwl9AYxw.js} +3 -8
- package/dist/experiment-Cwl9AYxw.js.map +1 -0
- package/dist/{experiment-utils-CLnzPPq5.js → experiment-utils-DV3DrvE_.js} +70 -51
- package/dist/experiment-utils-DV3DrvE_.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +15 -15
- package/dist/install.js +2 -7
- package/dist/install.js.map +1 -1
- package/dist/permissions.d.ts +42 -1
- package/dist/permissions.js +20 -10
- package/dist/permissions.js.map +1 -1
- package/dist/stores/auth.d.ts +6 -0
- package/dist/stores/index.d.ts +1 -1
- package/dist/stores/index.js +3 -3
- package/dist/stores/settings.d.ts +31 -1
- package/dist/styles.css +11247 -29501
- package/dist/templates/builderReadUtils.d.ts +1 -1
- package/dist/templates/index.js +2 -4
- package/dist/{templates-DsP51i-S.js → templates-Qq113pyZ.js} +303 -106
- package/dist/templates-Qq113pyZ.js.map +1 -0
- package/dist/types/auth.d.ts +1 -0
- package/dist/types/form-builder.d.ts +1 -1
- package/dist/{useControlSchema-BDx2Olha.js → useControlSchema-aMZlb4Sc.js} +462 -1130
- package/dist/useControlSchema-aMZlb4Sc.js.map +1 -0
- package/dist/{useDropdownState-DSb3BC3N.js → useDropdownState-DitCtrTT.js} +22 -6
- package/dist/useDropdownState-DitCtrTT.js.map +1 -0
- package/dist/{useExperimentSelector-CV4iNfMS.js → useExperimentSelector-I8HC8hUu.js} +4 -4
- package/dist/{useExperimentSelector-CV4iNfMS.js.map → useExperimentSelector-I8HC8hUu.js.map} +1 -1
- package/dist/{useFormBuilder-BLxG3BOX.js → useFormBuilder-TCxNnqeb.js} +2 -2
- package/dist/{useFormBuilder-BLxG3BOX.js.map → useFormBuilder-TCxNnqeb.js.map} +1 -1
- package/dist/{useProtocolTemplates-CS_SQl6U.js → useProtocolTemplates-BmX_iVBR.js} +766 -212
- package/dist/useProtocolTemplates-BmX_iVBR.js.map +1 -0
- package/dist/utils/color.d.ts +13 -0
- package/dist/utils/errors.d.ts +9 -0
- package/dist/utils/pluginSecrets.d.ts +53 -0
- package/dist/utils/records.d.ts +4 -0
- package/package.json +1 -1
- package/src/__tests__/components/ActionMenu.test.ts +94 -0
- package/src/__tests__/components/AppAvatarMenu.test.ts +123 -0
- package/src/__tests__/components/BaseTabs.test.ts +67 -0
- package/src/__tests__/components/DataFrame.test.ts +183 -11
- package/src/__tests__/components/DataStates.test.ts +176 -0
- package/src/__tests__/components/DatePicker.test.ts +76 -0
- package/src/__tests__/components/DateTimePicker.test.ts +36 -0
- package/src/__tests__/components/DropdownButton.test.ts +134 -0
- package/src/__tests__/components/ExperimentTimeline.test.ts +63 -0
- package/src/__tests__/components/GroupAssigner.test.ts +53 -0
- package/src/__tests__/components/LcmsSequenceTable.test.ts +22 -0
- package/src/__tests__/components/PluginWorkspaceView.internal.test.ts +230 -0
- package/src/__tests__/components/RackEditor.test.ts +35 -0
- package/src/__tests__/components/ReagentList.test.ts +64 -2
- package/src/__tests__/components/RetiredStyles.test.ts +31 -0
- package/src/__tests__/components/SampleSelector.drag.test.ts +51 -1
- package/src/__tests__/components/ScheduleCalendar.test.ts +63 -0
- package/src/__tests__/components/SecretInput.test.ts +87 -0
- package/src/__tests__/components/SegmentedControl.test.ts +88 -0
- package/src/__tests__/components/TimePicker.test.ts +61 -0
- package/src/__tests__/components/WellEditPopupInternal.test.ts +108 -0
- package/src/__tests__/components/WellPlate.interaction.test.ts +59 -0
- package/src/__tests__/composables/useAuth.test.ts +2 -0
- package/src/__tests__/composables/useDropdownState.test.ts +58 -1
- package/src/__tests__/composables/useListReorder.test.ts +145 -0
- package/src/__tests__/composables/usePluginClient.test.ts +140 -0
- package/src/__tests__/composables/usePluginConfig.test.ts +497 -0
- package/src/__tests__/composables/useRequestSyncState.test.ts +140 -0
- package/src/__tests__/docs/frontendDocsCatalog.test.ts +39 -7
- package/src/__tests__/stores/settings.test.ts +71 -1
- package/src/__tests__/styles/cssTokens.test.ts +131 -0
- package/src/__tests__/utils/permissions.test.ts +68 -0
- package/src/components/ActionMenu.vue +45 -88
- package/src/components/AlertBox.vue +0 -4
- package/src/components/AppAvatarMenu.vue +26 -7
- package/src/components/AppLayout.vue +0 -4
- package/src/components/AppPluginSwitcher.story.vue +87 -0
- package/src/components/AppPluginSwitcher.vue +2 -5
- package/src/components/AppSidebar.vue +0 -4
- package/src/components/AppToastContainer.vue +6 -8
- package/src/components/AppTopBar.vue +0 -4
- package/src/components/ArtifactSaveDialog.vue +0 -4
- package/src/components/ArtifactSelectorModal.vue +0 -4
- package/src/components/AuditTrail.story.vue +18 -0
- package/src/components/AuditTrail.vue +27 -7
- package/src/components/AutoGroupModal.vue +0 -4
- package/src/components/Avatar.vue +0 -4
- package/src/components/BaseButton.vue +0 -4
- package/src/components/BaseCheckbox.vue +0 -4
- package/src/components/BaseInput.vue +0 -4
- package/src/components/BaseModal.vue +8 -60
- package/src/components/BasePill.vue +0 -4
- package/src/components/BaseRadioGroup.vue +0 -4
- package/src/components/BaseSelect.vue +0 -4
- package/src/components/BaseSlider.vue +0 -4
- package/src/components/BaseTabs.vue +26 -5
- package/src/components/BaseTextarea.vue +0 -4
- package/src/components/BaseToggle.vue +0 -4
- package/src/components/BatchProgressList.story.vue +18 -0
- package/src/components/BatchProgressList.vue +32 -4
- package/src/components/BioTemplateExperimentWorkspaceView.vue +10 -21
- package/src/components/BioTemplatePackWorkspaceView.vue +11 -15
- package/src/components/BioTemplatePresetWorkspaceView.vue +8 -13
- package/src/components/Breadcrumb.vue +0 -4
- package/src/components/Calendar.vue +0 -4
- package/src/components/ChartContainer.story.vue +1 -1
- package/src/components/ChartContainer.vue +0 -4
- package/src/components/ChemicalFormula.vue +0 -4
- package/src/components/CollapsibleCard.vue +0 -4
- package/src/components/ColorSlider.vue +0 -4
- package/src/components/ComponentBindingRenderer.vue +1 -3
- package/src/components/ConcentrationInput.vue +0 -4
- package/src/components/ConfirmDialog.vue +0 -4
- package/src/components/ControlWorkspaceView.vue +11 -22
- package/src/components/DataFrame.story.vue +14 -0
- package/src/components/DataFrame.vue +97 -23
- package/src/components/DatePicker.vue +73 -27
- package/src/components/DateTimePicker.vue +45 -17
- package/src/components/Divider.vue +0 -4
- package/src/components/DoseCalculator.vue +0 -4
- package/src/components/DoseDesignWorkspaceView.vue +6 -25
- package/src/components/DropdownButton.vue +24 -6
- package/src/components/EmptyState.vue +0 -4
- package/src/components/ExperimentCodeBadge.vue +0 -4
- package/src/components/ExperimentDataViewer.story.vue +3 -0
- package/src/components/ExperimentDataViewer.vue +33 -13
- package/src/components/ExperimentPopover.vue +2 -5
- package/src/components/ExperimentSelectorModal.vue +0 -4
- package/src/components/ExperimentTimeline.story.vue +18 -0
- package/src/components/ExperimentTimeline.vue +81 -75
- package/src/components/FileUploader.vue +0 -4
- package/src/components/FitPanel.vue +0 -4
- package/src/components/FormActions.story.vue +96 -0
- package/src/components/FormActions.vue +0 -4
- package/src/components/FormBuilder.vue +0 -4
- package/src/components/FormField.vue +0 -4
- package/src/components/FormulaInput.vue +0 -4
- package/src/components/GeneratedPathInput.story.vue +68 -0
- package/src/components/GeneratedPlotlyResult.story.vue +96 -0
- package/src/components/GeneratedPlotlyResult.vue +3 -3
- package/src/components/GeneratedPluginView.story.vue +145 -0
- package/src/components/GeneratedPluginView.vue +10 -10
- package/src/components/GeneratedResultRenderer.story.vue +117 -0
- package/src/components/GeneratedResultRenderer.vue +4 -4
- package/src/components/GroupAssigner.vue +67 -5
- package/src/components/IconButton.vue +0 -4
- package/src/components/InstrumentAlertLog.vue +0 -4
- package/src/components/InstrumentStateBadge.vue +0 -4
- package/src/components/InstrumentStatusCard.vue +0 -4
- package/src/components/JobsStatusTray.vue +16 -5
- package/src/components/LcmsSequenceTable.vue +81 -50
- package/src/components/LoadingSpinner.vue +0 -4
- package/src/components/MobileSupportGate.vue +0 -4
- package/src/components/MoleculeInput.vue +0 -4
- package/src/components/MultiSelect.vue +0 -4
- package/src/components/NumberInput.vue +0 -4
- package/src/components/PlateMapEditor.vue +3 -14
- package/src/components/PluginIcon.vue +0 -4
- package/src/components/PluginWorkspaceView.props.ts +38 -0
- package/src/components/PluginWorkspaceView.vue +53 -224
- package/src/components/ProgressBar.vue +0 -4
- package/src/components/ProtocolStepEditor.vue +2 -4
- package/src/components/RackEditor.vue +51 -70
- package/src/components/ReagentEditor.vue +0 -4
- package/src/components/ReagentList.story.vue +18 -0
- package/src/components/ReagentList.vue +127 -82
- package/src/components/ResourceCard.vue +0 -4
- package/src/components/RuntimeUpdateNotice.story.vue +49 -0
- package/src/components/RuntimeUpdateNotice.vue +4 -4
- package/src/components/SampleHierarchyTree.story.vue +18 -0
- package/src/components/SampleHierarchyTree.vue +32 -9
- package/src/components/SampleLegend.vue +2 -8
- package/src/components/SampleSelector.drag.ts +51 -0
- package/src/components/SampleSelector.story.vue +6 -0
- package/src/components/SampleSelector.tree.ts +2 -0
- package/src/components/SampleSelector.vue +49 -10
- package/src/components/SampleSelectorGroupNode.vue +19 -0
- package/src/components/ScheduleCalendar.story.vue +6 -0
- package/src/components/ScheduleCalendar.vue +82 -7
- package/src/components/ScientificNumber.vue +0 -4
- package/src/components/SecretInput.story.vue +79 -0
- package/src/components/SecretInput.vue +150 -0
- package/src/components/SectionCard.vue +0 -4
- package/src/components/SegmentedControl.vue +48 -5
- package/src/components/SequenceInput.vue +0 -4
- package/src/components/SequenceProgressBar.story.vue +110 -0
- package/src/components/SequenceProgressBar.vue +0 -4
- package/src/components/SettingsModal.vue +0 -4
- package/src/components/Skeleton.vue +0 -4
- package/src/components/SmartGroupFieldRecipe.vue +8 -6
- package/src/components/SmartGroupManual.vue +0 -4
- package/src/components/StatusIndicator.vue +0 -4
- package/src/components/StepWizard.vue +0 -4
- package/src/components/TagsInput.vue +4 -6
- package/src/components/ThemeToggle.vue +0 -4
- package/src/components/TimePicker.vue +36 -7
- package/src/components/TimeRangeInput.vue +0 -4
- package/src/components/Tooltip.story.vue +3 -3
- package/src/components/Tooltip.vue +0 -4
- package/src/components/UnitInput.vue +0 -4
- package/src/components/WellPlate.geometry.ts +60 -1
- package/src/components/WellPlate.interaction.ts +44 -0
- package/src/components/WellPlate.story.vue +8 -0
- package/src/components/WellPlate.vue +53 -7
- package/src/components/index.ts +9 -0
- package/src/components/internal/AppTopBarPageSelectorInternal.vue +2 -5
- package/src/components/internal/AppTopBarPillNavInternal.vue +0 -4
- package/src/components/internal/DataStateInternal.vue +74 -0
- package/src/components/internal/FormSectionRenderer.vue +0 -4
- package/src/components/internal/WellEditPopupInternal.vue +20 -5
- package/src/components/internal/WorkspaceControlsInternal.vue +20 -0
- package/src/components/internal/WorkspaceShellInternal.vue +125 -0
- package/src/components/internal/WorkspaceSidebarInternal.vue +82 -0
- package/src/composables/controlSchemaTypes.ts +34 -0
- package/src/composables/experimentDesignData.ts +1 -3
- package/src/composables/flattenWorkspaceBindings.ts +104 -0
- package/src/composables/formBuilderRegistry.ts +5 -0
- package/src/composables/index.ts +43 -0
- package/src/composables/pluginWorkspaceModel.ts +182 -0
- package/src/composables/useAsync.ts +5 -1
- package/src/composables/useAuth.ts +3 -0
- package/src/composables/useBioTemplatePackWorkspace.ts +15 -9
- package/src/composables/useBioTemplatePresetWorkspace.ts +14 -15
- package/src/composables/useBioTemplateWorkspace.ts +18 -43
- package/src/composables/useCommandHistory.ts +5 -1
- package/src/composables/useDropdownState.ts +35 -5
- package/src/composables/useEventStream.ts +14 -2
- package/src/composables/useFileImport.ts +2 -7
- package/src/composables/useFocusTrap.ts +91 -0
- package/src/composables/useGeneratedAnalysis.ts +22 -10
- package/src/composables/useJobsStatusTray.ts +184 -17
- package/src/composables/useListReorder.story.vue +143 -0
- package/src/composables/useListReorder.ts +242 -0
- package/src/composables/useMenuKeyboard.ts +90 -0
- package/src/composables/useOptimisticMutation.ts +6 -16
- package/src/composables/usePluginClient.ts +47 -4
- package/src/composables/usePluginConfig.ts +252 -0
- package/src/composables/usePluginWorkspace.ts +208 -0
- package/src/composables/useRackEditor.ts +2 -11
- package/src/composables/useRequestSyncState.ts +98 -28
- package/src/composables/useResourceCrud.ts +6 -16
- package/src/composables/useRovingFocus.ts +66 -0
- package/src/composables/useScheduleDrag.ts +37 -0
- package/src/composables/useWellPainting.ts +10 -30
- package/src/composables/useWellPlateAdapter.ts +5 -1
- package/src/composables/useWellPlateEditor.ts +1 -11
- package/src/composables/useWellPlateValidation.ts +5 -1
- package/src/composables/workspaceRecipes.ts +267 -0
- package/src/index.ts +16 -0
- package/src/permissions.ts +48 -9
- package/src/stores/auth.ts +1 -0
- package/src/stores/experiment.ts +2 -7
- package/src/stores/index.ts +9 -1
- package/src/stores/settings.ts +93 -1
- package/src/styles/components/audit-trail.css +5 -5
- package/src/styles/components/batch-progress-list.css +7 -0
- package/src/styles/components/color-slider.css +2 -2
- package/src/styles/components/data-state.css +30 -0
- package/src/styles/components/dataframe.css +29 -35
- package/src/styles/components/experiment-data-viewer.css +4 -4
- package/src/styles/components/experiment-timeline.css +3 -30
- package/src/styles/components/form-builder.css +5 -5
- package/src/styles/components/lcms-sequence-table.css +16 -1
- package/src/styles/components/multi-select.css +1 -1
- package/src/styles/components/reagent-list.css +38 -31
- package/src/styles/components/sample-hierarchy-tree.css +5 -19
- package/src/styles/components/sample-selector.css +9 -2
- package/src/styles/components/schedule-calendar.css +8 -0
- package/src/styles/components/scientific-number.css +1 -1
- package/src/styles/components/secret-input.css +60 -0
- package/src/styles/components/well-plate.css +8 -0
- package/src/styles/index.css +9 -0
- package/src/styles/variables.css +29 -0
- package/src/templates/builderPresetControls.ts +1 -1
- package/src/templates/builderReadUtils.ts +1 -3
- package/src/templates/componentPlateHelpers.ts +3 -1
- package/src/templates/componentTargetResolvers.ts +1 -3
- package/src/templates/controlSchemaTargets.ts +1 -3
- package/src/templates/doseResponseAdapters.ts +2 -13
- package/src/templates/elisaAssayCollectionBuilder.ts +2 -2
- package/src/templates/plateMapBuilder.ts +2 -2
- package/src/templates/qpcrPlateBuilder.ts +1 -1
- package/src/templates/templateValidators.ts +1 -1
- package/src/templates/timeCourseBuilder.ts +2 -2
- package/src/templates/wellPlateScreenCollectionBuilder.ts +2 -2
- package/src/types/auth.ts +1 -0
- package/src/types/form-builder.ts +1 -0
- package/src/utils/color.ts +51 -0
- package/src/utils/errors.ts +29 -0
- package/src/utils/formModelSync.ts +1 -3
- package/src/utils/pluginIcon.ts +1 -3
- package/src/utils/pluginSecrets.ts +102 -0
- package/src/utils/records.ts +9 -0
- package/dist/EmptyState-p90quq8Z.js.map +0 -1
- package/dist/ExperimentPopover-tLwJ7XF4.js.map +0 -1
- package/dist/ExperimentSelectorModal-DyPAUCLw.js.map +0 -1
- package/dist/SettingsModal-BgKY93zh.js.map +0 -1
- package/dist/components-DkHddRMl.js.map +0 -1
- package/dist/composables/autoGroupConstants.d.ts +0 -1
- package/dist/composables/autoGroupGrouping.d.ts +0 -3
- package/dist/composables/useAutoGroupInputSources.d.ts +0 -32
- package/dist/composables-C_i90sGS.js.map +0 -1
- package/dist/experiment-Cq145oEW.js.map +0 -1
- package/dist/experiment-utils-CLnzPPq5.js.map +0 -1
- package/dist/templates/builderDefaults.d.ts +0 -1
- package/dist/templates/plateGeometry.d.ts +0 -4
- package/dist/templates-DsP51i-S.js.map +0 -1
- package/dist/useApi-J6zFkHmn.js.map +0 -1
- package/dist/useControlSchema-BDx2Olha.js.map +0 -1
- package/dist/useDropdownState-DSb3BC3N.js.map +0 -1
- package/dist/useProtocolTemplates-CS_SQl6U.js.map +0 -1
- package/src/__tests__/composables/useAutoGroupInputSources.test.ts +0 -127
- package/src/composables/autoGroupConstants.ts +0 -4
- package/src/composables/autoGroupGrouping.ts +0 -148
- package/src/composables/useAutoGroupInputSources.ts +0 -147
- package/src/templates/builderDefaults.ts +0 -11
- package/src/templates/plateGeometry.ts +0 -62
- /package/dist/__tests__/{composables/useAutoGroupInputSources.test.d.ts → components/DataStates.test.d.ts} +0 -0
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
/**
|
|
3
|
+
* Internal: AppSidebar for PluginWorkspaceView, driven by a single `sidebar` model covering
|
|
4
|
+
* chrome, panels/forms, collapse behavior, and the compact control-schema props that drive
|
|
5
|
+
* AppSidebar's auto-generated form.
|
|
6
|
+
* Not part of the public SDK surface — see PluginWorkspaceView.vue for the public component.
|
|
7
|
+
*/
|
|
8
|
+
import AppSidebar from '../AppSidebar.vue'
|
|
9
|
+
import type { PluginWorkspaceSidebarModel } from '../../composables/pluginWorkspaceModel'
|
|
10
|
+
|
|
11
|
+
defineProps<{
|
|
12
|
+
sidebar: PluginWorkspaceSidebarModel
|
|
13
|
+
}>()
|
|
14
|
+
|
|
15
|
+
defineEmits<{
|
|
16
|
+
'update:modelValue': [values: Record<string, unknown>]
|
|
17
|
+
'update:collapsed': [value: boolean]
|
|
18
|
+
'update:toggle': [sectionId: string, value: boolean]
|
|
19
|
+
'section-action': [sectionId: string, actionId: string]
|
|
20
|
+
'form-submit': [sectionId: string, values: Record<string, unknown>]
|
|
21
|
+
'form-cancel': [sectionId: string]
|
|
22
|
+
}>()
|
|
23
|
+
|
|
24
|
+
defineSlots<{
|
|
25
|
+
header?: (props: Record<string, unknown>) => unknown
|
|
26
|
+
collapsed?: (props: Record<string, unknown>) => unknown
|
|
27
|
+
'collapsed-footer'?: (props: Record<string, unknown>) => unknown
|
|
28
|
+
footer?: (props: Record<string, unknown>) => unknown
|
|
29
|
+
}>()
|
|
30
|
+
</script>
|
|
31
|
+
|
|
32
|
+
<template>
|
|
33
|
+
<AppSidebar
|
|
34
|
+
:title="sidebar.title"
|
|
35
|
+
:subtitle="sidebar.subtitle"
|
|
36
|
+
:badge="sidebar.badge"
|
|
37
|
+
:variant="sidebar.variant"
|
|
38
|
+
:panels="sidebar.panels"
|
|
39
|
+
:active-view="sidebar.activeView"
|
|
40
|
+
:floating="sidebar.floating"
|
|
41
|
+
:dense="sidebar.dense"
|
|
42
|
+
:width="sidebar.width"
|
|
43
|
+
:side="sidebar.side"
|
|
44
|
+
:forms="sidebar.forms"
|
|
45
|
+
:content-id="sidebar.contentId"
|
|
46
|
+
:show-when-empty="sidebar.showWhenEmpty"
|
|
47
|
+
:model="sidebar.model"
|
|
48
|
+
:controls="sidebar.controlSchema"
|
|
49
|
+
:control-options="sidebar.controlOptions"
|
|
50
|
+
:values="sidebar.values"
|
|
51
|
+
:form-enhancements="sidebar.formEnhancements"
|
|
52
|
+
:show-form-actions="sidebar.showFormActions"
|
|
53
|
+
:form-loading="sidebar.formLoading"
|
|
54
|
+
:form-disabled="sidebar.formDisabled"
|
|
55
|
+
:form-readonly="sidebar.formReadonly"
|
|
56
|
+
:form-size="sidebar.formSize"
|
|
57
|
+
:collapsible="sidebar.collapsible"
|
|
58
|
+
:collapsed="sidebar.collapsed"
|
|
59
|
+
:default-collapsed="sidebar.defaultCollapsed"
|
|
60
|
+
:collapsed-width="sidebar.collapsedWidth"
|
|
61
|
+
:collapse-button-label="sidebar.collapseButtonLabel"
|
|
62
|
+
:expand-button-label="sidebar.expandButtonLabel"
|
|
63
|
+
@update:model-value="$emit('update:modelValue', $event)"
|
|
64
|
+
@update:collapsed="$emit('update:collapsed', $event)"
|
|
65
|
+
@update:toggle="(sectionId, value) => $emit('update:toggle', sectionId, value)"
|
|
66
|
+
@section-action="(sectionId, actionId) => $emit('section-action', sectionId, actionId)"
|
|
67
|
+
@form-submit="(sectionId, values) => $emit('form-submit', sectionId, values)"
|
|
68
|
+
@form-cancel="$emit('form-cancel', $event)"
|
|
69
|
+
>
|
|
70
|
+
<template
|
|
71
|
+
v-for="slotName in sidebar.slotNames"
|
|
72
|
+
:key="slotName"
|
|
73
|
+
#[slotName]="slotProps"
|
|
74
|
+
>
|
|
75
|
+
<!-- @vue-ignore dynamic SDK slot forwarding for AppSidebar section-* passthrough slots -->
|
|
76
|
+
<slot
|
|
77
|
+
:name="slotName"
|
|
78
|
+
v-bind="slotProps ?? {}"
|
|
79
|
+
/>
|
|
80
|
+
</template>
|
|
81
|
+
</AppSidebar>
|
|
82
|
+
</template>
|
|
@@ -42,10 +42,27 @@ export interface ControlSectionConfig {
|
|
|
42
42
|
actions?: SidebarToolSectionAction[]
|
|
43
43
|
columns?: 1 | 2 | 3
|
|
44
44
|
condition?: FieldCondition
|
|
45
|
+
/** The access policy. Preferred over the flat fields below. */
|
|
45
46
|
access?: AccessPolicy
|
|
47
|
+
/**
|
|
48
|
+
* @deprecated Since MINT 1.2; use `access.visibleFor` instead. The flat
|
|
49
|
+
* duplicate is removed in 1.3.
|
|
50
|
+
*/
|
|
46
51
|
visibleFor?: AccessAudienceInput
|
|
52
|
+
/**
|
|
53
|
+
* @deprecated Since MINT 1.2; use `access.requiresAdmin` instead. The flat
|
|
54
|
+
* duplicate is removed in 1.3.
|
|
55
|
+
*/
|
|
47
56
|
requiresAdmin?: boolean
|
|
57
|
+
/**
|
|
58
|
+
* @deprecated Since MINT 1.2; use `access.permissions` instead. The flat
|
|
59
|
+
* duplicate is removed in 1.3.
|
|
60
|
+
*/
|
|
48
61
|
permissions?: readonly string[]
|
|
62
|
+
/**
|
|
63
|
+
* @deprecated Since MINT 1.2; use `access.anyPermissions` instead. The flat
|
|
64
|
+
* duplicate is removed in 1.3.
|
|
65
|
+
*/
|
|
49
66
|
anyPermissions?: readonly string[]
|
|
50
67
|
defaultOpen?: boolean
|
|
51
68
|
showToggle?: boolean
|
|
@@ -86,10 +103,27 @@ export interface ControlDefinition {
|
|
|
86
103
|
pattern?: string | { value: string; message: string }
|
|
87
104
|
validation?: FieldValidation
|
|
88
105
|
condition?: FieldCondition
|
|
106
|
+
/** The access policy. Preferred over the flat fields below. */
|
|
89
107
|
access?: AccessPolicy
|
|
108
|
+
/**
|
|
109
|
+
* @deprecated Since MINT 1.2; use `access.visibleFor` instead. The flat
|
|
110
|
+
* duplicate is removed in 1.3.
|
|
111
|
+
*/
|
|
90
112
|
visibleFor?: AccessAudienceInput
|
|
113
|
+
/**
|
|
114
|
+
* @deprecated Since MINT 1.2; use `access.requiresAdmin` instead. The flat
|
|
115
|
+
* duplicate is removed in 1.3.
|
|
116
|
+
*/
|
|
91
117
|
requiresAdmin?: boolean
|
|
118
|
+
/**
|
|
119
|
+
* @deprecated Since MINT 1.2; use `access.permissions` instead. The flat
|
|
120
|
+
* duplicate is removed in 1.3.
|
|
121
|
+
*/
|
|
92
122
|
permissions?: readonly string[]
|
|
123
|
+
/**
|
|
124
|
+
* @deprecated Since MINT 1.2; use `access.anyPermissions` instead. The flat
|
|
125
|
+
* duplicate is removed in 1.3.
|
|
126
|
+
*/
|
|
93
127
|
anyPermissions?: readonly string[]
|
|
94
128
|
options?: readonly ControlOption[]
|
|
95
129
|
section?: string
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { SelectOption } from '../types'
|
|
2
|
+
import { isRecord } from '../utils/records'
|
|
2
3
|
|
|
3
4
|
export interface ExperimentDesignDataResponse {
|
|
4
5
|
experiment_id?: number
|
|
@@ -12,9 +13,6 @@ export interface ExtractExperimentSamplesOptions {
|
|
|
12
13
|
includeControls?: boolean
|
|
13
14
|
}
|
|
14
15
|
|
|
15
|
-
function isRecord(value: unknown): value is Record<string, unknown> {
|
|
16
|
-
return value !== null && typeof value === 'object' && !Array.isArray(value)
|
|
17
|
-
}
|
|
18
16
|
|
|
19
17
|
function isPlatformDesignDataResponse(value: Record<string, unknown>): boolean {
|
|
20
18
|
return (
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { computed } from 'vue'
|
|
2
|
+
import type { ComputedRef } from 'vue'
|
|
3
|
+
import type {
|
|
4
|
+
BioTemplateComponentBinding,
|
|
5
|
+
BioTemplateComponentBindingsById,
|
|
6
|
+
BioTemplateComponentImport,
|
|
7
|
+
BioTemplateComponentPropsByComponent,
|
|
8
|
+
BioTemplateComponentPropsBinding,
|
|
9
|
+
BioTemplateComponentPropsById,
|
|
10
|
+
BioTemplateComponentPropsLookupOptions,
|
|
11
|
+
BioTemplateComponentSnippet,
|
|
12
|
+
BioTemplateComponentUsage,
|
|
13
|
+
} from './useBioTemplateComponents'
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* The template-component slice of `UseBioTemplateWorkspaceReturn`: the ~9 keys every
|
|
17
|
+
* bio-template workspace composable (`useBioTemplateWorkspace`, `useBioTemplatePackWorkspace`,
|
|
18
|
+
* `useBioTemplatePresetWorkspace`) re-exposes verbatim from `useBioTemplateComponents()`.
|
|
19
|
+
*/
|
|
20
|
+
export interface BioTemplateWorkspaceComponentBindings {
|
|
21
|
+
componentBindings: BioTemplateComponentBinding[]
|
|
22
|
+
componentBindingsById: BioTemplateComponentBindingsById
|
|
23
|
+
componentImports: BioTemplateComponentImport[]
|
|
24
|
+
componentProps: BioTemplateComponentPropsBinding[]
|
|
25
|
+
componentPropsById: BioTemplateComponentPropsById
|
|
26
|
+
componentPropsByComponent: BioTemplateComponentPropsByComponent
|
|
27
|
+
componentSnippets: BioTemplateComponentSnippet[]
|
|
28
|
+
componentUsage: BioTemplateComponentUsage | null
|
|
29
|
+
getComponentProps: (component: string, options?: BioTemplateComponentPropsLookupOptions) => Record<string, unknown> | undefined
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/** Structural source shape accepted by {@link flattenWorkspaceComponentBindings}. */
|
|
33
|
+
export interface BioTemplateWorkspaceComponentSource {
|
|
34
|
+
componentBindings: BioTemplateComponentBinding[]
|
|
35
|
+
componentBindingsById: BioTemplateComponentBindingsById
|
|
36
|
+
componentImports: BioTemplateComponentImport[]
|
|
37
|
+
componentProps: BioTemplateComponentPropsBinding[]
|
|
38
|
+
componentPropsById: BioTemplateComponentPropsById
|
|
39
|
+
componentPropsByComponent: BioTemplateComponentPropsByComponent
|
|
40
|
+
componentSnippets: BioTemplateComponentSnippet[]
|
|
41
|
+
componentUsage: BioTemplateComponentUsage | null
|
|
42
|
+
getComponentProps: (component: string, options?: BioTemplateComponentPropsLookupOptions) => Record<string, unknown> | undefined
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Pick the shared template-component binding keys off a resolved bio-template workspace
|
|
47
|
+
* (or its `components` source directly), so composables that build on `useBioTemplateWorkspace`
|
|
48
|
+
* spread one object instead of re-listing all 9 keys by hand.
|
|
49
|
+
*
|
|
50
|
+
* @example Recommended
|
|
51
|
+
* ```ts
|
|
52
|
+
* const bindings = { renderer, ...flattenWorkspaceComponentBindings(components) }
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
export function flattenWorkspaceComponentBindings(
|
|
56
|
+
source: BioTemplateWorkspaceComponentSource,
|
|
57
|
+
): BioTemplateWorkspaceComponentBindings {
|
|
58
|
+
return {
|
|
59
|
+
componentBindings: source.componentBindings,
|
|
60
|
+
componentBindingsById: source.componentBindingsById,
|
|
61
|
+
componentImports: source.componentImports,
|
|
62
|
+
componentProps: source.componentProps,
|
|
63
|
+
componentPropsById: source.componentPropsById,
|
|
64
|
+
componentPropsByComponent: source.componentPropsByComponent,
|
|
65
|
+
componentSnippets: source.componentSnippets,
|
|
66
|
+
componentUsage: source.componentUsage,
|
|
67
|
+
getComponentProps: source.getComponentProps,
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/** Keys of {@link BioTemplateWorkspaceComponentBindings} that are plain (non-reactive) values, lifted to `ComputedRef`s by {@link liftWorkspaceComponentBindings}. */
|
|
72
|
+
export type LiftedBioTemplateWorkspaceComponentBindings =
|
|
73
|
+
{ [K in Exclude<keyof BioTemplateWorkspaceComponentBindings, 'getComponentProps'>]: ComputedRef<BioTemplateWorkspaceComponentBindings[K]> }
|
|
74
|
+
& { getComponentProps: BioTemplateWorkspaceComponentBindings['getComponentProps'] }
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* `computed()`-lifted version of {@link flattenWorkspaceComponentBindings} for composables
|
|
78
|
+
* that hold their resolved workspace behind a `ComputedRef` (e.g. a regenerated workspace
|
|
79
|
+
* swapped in via `shallowRef`/`effectScope`), so each key stays independently reactive
|
|
80
|
+
* instead of forcing consumers to unwrap the whole workspace to read one field.
|
|
81
|
+
* `getComponentProps` stays a plain callable function, matching the un-lifted composables.
|
|
82
|
+
*
|
|
83
|
+
* @example Recommended
|
|
84
|
+
* ```ts
|
|
85
|
+
* const workspace = computed(() => workspaceRef.value)
|
|
86
|
+
* const { componentBindings, componentProps, getComponentProps } = liftWorkspaceComponentBindings(workspace)
|
|
87
|
+
* ```
|
|
88
|
+
*/
|
|
89
|
+
export function liftWorkspaceComponentBindings<TSource extends BioTemplateWorkspaceComponentSource>(
|
|
90
|
+
workspace: ComputedRef<TSource>,
|
|
91
|
+
): LiftedBioTemplateWorkspaceComponentBindings {
|
|
92
|
+
return {
|
|
93
|
+
componentBindings: computed(() => workspace.value.componentBindings),
|
|
94
|
+
componentBindingsById: computed(() => workspace.value.componentBindingsById),
|
|
95
|
+
componentImports: computed(() => workspace.value.componentImports),
|
|
96
|
+
componentProps: computed(() => workspace.value.componentProps),
|
|
97
|
+
componentPropsById: computed(() => workspace.value.componentPropsById),
|
|
98
|
+
componentPropsByComponent: computed(() => workspace.value.componentPropsByComponent),
|
|
99
|
+
componentSnippets: computed(() => workspace.value.componentSnippets),
|
|
100
|
+
componentUsage: computed(() => workspace.value.componentUsage),
|
|
101
|
+
getComponentProps: (component: string, options?: BioTemplateComponentPropsLookupOptions) =>
|
|
102
|
+
workspace.value.getComponentProps(component, options),
|
|
103
|
+
}
|
|
104
|
+
}
|
|
@@ -2,6 +2,7 @@ import type { Component } from 'vue'
|
|
|
2
2
|
import type { FormFieldType } from '../types/form-builder'
|
|
3
3
|
|
|
4
4
|
import BaseInput from '../components/BaseInput.vue'
|
|
5
|
+
import SecretInput from '../components/SecretInput.vue'
|
|
5
6
|
import BaseTextarea from '../components/BaseTextarea.vue'
|
|
6
7
|
import BaseSelect from '../components/BaseSelect.vue'
|
|
7
8
|
import MultiSelect from '../components/MultiSelect.vue'
|
|
@@ -34,6 +35,7 @@ const registry: Record<FormFieldType, RegistryEntry> = {
|
|
|
34
35
|
text: { component: BaseInput, defaults: { type: 'text' }, vModel: true },
|
|
35
36
|
email: { component: BaseInput, defaults: { type: 'email' }, vModel: true },
|
|
36
37
|
password: { component: BaseInput, defaults: { type: 'password' }, vModel: true },
|
|
38
|
+
secret: { component: SecretInput, defaults: {}, vModel: true },
|
|
37
39
|
tel: { component: BaseInput, defaults: { type: 'tel' }, vModel: true },
|
|
38
40
|
url: { component: BaseInput, defaults: { type: 'url' }, vModel: true },
|
|
39
41
|
search: { component: BaseInput, defaults: { type: 'search' }, vModel: true },
|
|
@@ -75,6 +77,9 @@ export function getTypeDefault(type: FormFieldType): unknown {
|
|
|
75
77
|
case 'multiselect':
|
|
76
78
|
case 'tags':
|
|
77
79
|
return []
|
|
80
|
+
case 'secret':
|
|
81
|
+
// A secret field has no empty string state: `null` means "not stored".
|
|
82
|
+
return null
|
|
78
83
|
default:
|
|
79
84
|
return ''
|
|
80
85
|
}
|
package/src/composables/index.ts
CHANGED
|
@@ -153,6 +153,7 @@ export {
|
|
|
153
153
|
type UseGeneratedAnalysisReturn,
|
|
154
154
|
} from './useGeneratedAnalysis'
|
|
155
155
|
export { useAutoGroup, DEFAULT_COLORS, extractSamplesFromDesignData } from './useAutoGroup'
|
|
156
|
+
export { usePluginConfig, type UsePluginConfigReturn } from './usePluginConfig'
|
|
156
157
|
export {
|
|
157
158
|
useReagentSeries,
|
|
158
159
|
generateDilutionSeries,
|
|
@@ -487,6 +488,7 @@ export {
|
|
|
487
488
|
pluginFormDataFromPayload,
|
|
488
489
|
resolvePluginBaseUrl,
|
|
489
490
|
uploadPluginEndpoint,
|
|
491
|
+
usePluginClient,
|
|
490
492
|
usePluginEventStream,
|
|
491
493
|
usePluginSettings,
|
|
492
494
|
useCurrentExperiment,
|
|
@@ -515,9 +517,50 @@ export {
|
|
|
515
517
|
export {
|
|
516
518
|
combinePluginJobSources,
|
|
517
519
|
usePluginJobCenter,
|
|
520
|
+
useJobsStatusTray,
|
|
518
521
|
type CombinedPluginJobCenterSource,
|
|
522
|
+
type JobsStatusTrayAdapter,
|
|
523
|
+
type JobStreamMessage,
|
|
519
524
|
type PluginJobCenterSource,
|
|
520
525
|
type JobsStatusTrayTab,
|
|
526
|
+
type UseJobsStatusTrayOptions,
|
|
527
|
+
type UseJobsStatusTrayReturn,
|
|
521
528
|
type UsePluginJobCenterOptions,
|
|
522
529
|
type UsePluginJobCenterReturn,
|
|
523
530
|
} from './useJobsStatusTray'
|
|
531
|
+
export {
|
|
532
|
+
usePluginWorkspace,
|
|
533
|
+
type PluginWorkspaceSlotsLike,
|
|
534
|
+
type UsePluginWorkspaceOptions,
|
|
535
|
+
type UsePluginWorkspaceReturn,
|
|
536
|
+
} from './usePluginWorkspace'
|
|
537
|
+
export {
|
|
538
|
+
type PluginWorkspaceControlsModel,
|
|
539
|
+
type PluginWorkspaceShellModel,
|
|
540
|
+
type PluginWorkspaceSidebarModel,
|
|
541
|
+
} from './pluginWorkspaceModel'
|
|
542
|
+
export {
|
|
543
|
+
useFocusTrap,
|
|
544
|
+
type UseFocusTrapOptions,
|
|
545
|
+
type UseFocusTrapReturn,
|
|
546
|
+
} from './useFocusTrap'
|
|
547
|
+
export {
|
|
548
|
+
useRovingFocus,
|
|
549
|
+
type UseRovingFocusOptions,
|
|
550
|
+
type UseRovingFocusReturn,
|
|
551
|
+
} from './useRovingFocus'
|
|
552
|
+
export {
|
|
553
|
+
reorderList,
|
|
554
|
+
useListReorder,
|
|
555
|
+
useReorderAnnouncer,
|
|
556
|
+
REORDER_ANNOUNCER_STYLE,
|
|
557
|
+
type ListReorderMove,
|
|
558
|
+
type UseListReorderOptions,
|
|
559
|
+
type UseListReorderReturn,
|
|
560
|
+
type UseReorderAnnouncerReturn,
|
|
561
|
+
} from './useListReorder'
|
|
562
|
+
export {
|
|
563
|
+
useMenuKeyboard,
|
|
564
|
+
type UseMenuKeyboardOptions,
|
|
565
|
+
type UseMenuKeyboardReturn,
|
|
566
|
+
} from './useMenuKeyboard'
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
AccountMenuItem,
|
|
3
|
+
PageSelectorItemInput,
|
|
4
|
+
PillNavItemInput,
|
|
5
|
+
PluginSwitcherInfo,
|
|
6
|
+
SidebarToolSection,
|
|
7
|
+
TopBarSettingsConfig,
|
|
8
|
+
TopBarVariant,
|
|
9
|
+
} from '../types'
|
|
10
|
+
import type { FormEnhancements, FormSchema } from '../types/form-builder'
|
|
11
|
+
import type {
|
|
12
|
+
ControlComponentBinding,
|
|
13
|
+
ControlComponentBindingsById,
|
|
14
|
+
ControlModel,
|
|
15
|
+
ControlModelBinding,
|
|
16
|
+
ControlSchema,
|
|
17
|
+
ControlWorkspaceOptions,
|
|
18
|
+
} from './useControlSchema'
|
|
19
|
+
import type { PluginWorkspaceSidebarVariant } from '../components/PluginWorkspaceView.props'
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Scoped-slot payload shared by PluginWorkspaceView's `default`, `topbar`, and `sidebar`
|
|
23
|
+
* slots: the resolved active view plus the values and component bindings/props derived
|
|
24
|
+
* from the compact control schema. WorkspaceControlsInternal renders a component's default
|
|
25
|
+
* slot bound to exactly this shape.
|
|
26
|
+
*/
|
|
27
|
+
export interface PluginWorkspaceControlsModel {
|
|
28
|
+
/** Currently resolved workspace view id. */
|
|
29
|
+
activeView: string
|
|
30
|
+
/** Sets the active view, updating any uncontrolled state and emitting `update:activeView`. */
|
|
31
|
+
setActiveView: (viewId: string) => void
|
|
32
|
+
/** Current control values, shared between the auto-rendered sidebar form and the default slot. */
|
|
33
|
+
values: Record<string, unknown>
|
|
34
|
+
/** Ordered SDK component bindings resolved from the current control values. */
|
|
35
|
+
componentBindings: ControlComponentBinding[]
|
|
36
|
+
/** SDK component bindings resolved from the current control values, keyed by binding id. */
|
|
37
|
+
componentBindingsById: ControlComponentBindingsById
|
|
38
|
+
/** Flat component props resolved from the current control values. */
|
|
39
|
+
componentProps: Record<string, unknown>
|
|
40
|
+
/** Named component prop mappings resolved from the current control values. */
|
|
41
|
+
componentPropsById: Record<string, Record<string, unknown>>
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Resolved AppLayout + AppTopBar configuration consumed by WorkspaceShellInternal: top bar
|
|
46
|
+
* chrome and navigation, plus the AppLayout layout/collapse props that own the responsive
|
|
47
|
+
* mobile sidebar toggle.
|
|
48
|
+
*/
|
|
49
|
+
export interface PluginWorkspaceShellModel {
|
|
50
|
+
/** AppLayout sidebar position. */
|
|
51
|
+
sidebarPosition: 'left' | 'right'
|
|
52
|
+
/** AppLayout sidebar width, forwarded so the layout can reserve space before AppSidebar mounts. */
|
|
53
|
+
sidebarWidth?: string
|
|
54
|
+
/** AppLayout floating style. */
|
|
55
|
+
floating: boolean
|
|
56
|
+
/** Convert the sidebar into an SDK-owned mobile overlay below the AppLayout breakpoint. */
|
|
57
|
+
responsiveSidebar: boolean
|
|
58
|
+
/** Accessible label for the mobile sidebar toggle. */
|
|
59
|
+
sidebarToggleLabel: string
|
|
60
|
+
/** Accessible label used when the mobile sidebar is open. */
|
|
61
|
+
sidebarCloseLabel: string
|
|
62
|
+
/** Whether AppLayout should render a `#sidebar` template at all. */
|
|
63
|
+
hasSidebarSurface: boolean
|
|
64
|
+
/** App or plugin title shown in the top bar. */
|
|
65
|
+
title: string
|
|
66
|
+
/** Secondary copy shown under the title. */
|
|
67
|
+
subtitle?: string
|
|
68
|
+
/** Top bar visual treatment. */
|
|
69
|
+
topBarVariant: TopBarVariant
|
|
70
|
+
/** Home link used by the top bar brand icon. */
|
|
71
|
+
homePath: string
|
|
72
|
+
/** Show the default MINT logo when no icon/logo slot is provided. */
|
|
73
|
+
showLogo: boolean
|
|
74
|
+
/** Preferred route-level page selector entries. */
|
|
75
|
+
pageSelector?: PageSelectorItemInput[]
|
|
76
|
+
/** Resolved active page selector id. */
|
|
77
|
+
currentPageSelectorId: string
|
|
78
|
+
/** Optional plugin switcher shown in the left navigation position. */
|
|
79
|
+
pluginSwitcher?: PluginSwitcherInfo
|
|
80
|
+
/** Resolved centered pill navigation, generated from the control schema when omitted. */
|
|
81
|
+
pillNav?: PillNavItemInput[]
|
|
82
|
+
/** Resolved active centered pill id. */
|
|
83
|
+
currentPillId: string
|
|
84
|
+
/** Show the theme toggle button. */
|
|
85
|
+
showThemeToggle: boolean
|
|
86
|
+
/** Show the settings button and modal. */
|
|
87
|
+
showSettings: boolean
|
|
88
|
+
/** Built-in settings modal configuration. */
|
|
89
|
+
settingsConfig?: TopBarSettingsConfig
|
|
90
|
+
/** Show the standalone badge when not integrated into the platform. */
|
|
91
|
+
showStandaloneLabel: boolean
|
|
92
|
+
/** Custom standalone badge label. */
|
|
93
|
+
standaloneLabel: string
|
|
94
|
+
/** Account dropdown entries. */
|
|
95
|
+
accountMenu?: AccountMenuItem[]
|
|
96
|
+
/** Show the notifications icon button. */
|
|
97
|
+
showNotifications: boolean
|
|
98
|
+
/** Draw a notification dot on the notifications icon. */
|
|
99
|
+
hasNotificationDot: boolean
|
|
100
|
+
/** Show the admin shortcut. */
|
|
101
|
+
showAdmin: boolean
|
|
102
|
+
/** Route used by the admin shortcut. */
|
|
103
|
+
adminPath: string
|
|
104
|
+
/** Account display name. */
|
|
105
|
+
userName?: string
|
|
106
|
+
/** Explicit account avatar initial. */
|
|
107
|
+
userInitial?: string
|
|
108
|
+
/** Account email shown in the avatar menu. */
|
|
109
|
+
userEmail?: string
|
|
110
|
+
/** Names of AppTopBar passthrough slots the caller actually provided. */
|
|
111
|
+
topBarSlotNames: string[]
|
|
112
|
+
/** Scoped-slot payload exposed to the `topbar` override slot. */
|
|
113
|
+
controls: PluginWorkspaceControlsModel
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Resolved AppSidebar configuration consumed by WorkspaceSidebarInternal: sidebar chrome,
|
|
118
|
+
* panels/forms, collapse behavior, and the compact control-schema props that drive
|
|
119
|
+
* AppSidebar's auto-generated form.
|
|
120
|
+
*/
|
|
121
|
+
export interface PluginWorkspaceSidebarModel {
|
|
122
|
+
/** Sidebar chrome title. */
|
|
123
|
+
title?: string
|
|
124
|
+
/** Sidebar chrome subtitle. */
|
|
125
|
+
subtitle?: string
|
|
126
|
+
/** Optional compact badge/count rendered in the sidebar header. */
|
|
127
|
+
badge?: string | number
|
|
128
|
+
/** AppSidebar visual preset. */
|
|
129
|
+
variant: PluginWorkspaceSidebarVariant
|
|
130
|
+
/** Map of view IDs to sidebar tool sections. */
|
|
131
|
+
panels: Record<string, SidebarToolSection[]>
|
|
132
|
+
/** Resolved active view, used to pick which panels/forms render. */
|
|
133
|
+
activeView: string
|
|
134
|
+
/** AppSidebar floating style (always false: PluginWorkspaceView docks the sidebar inside AppLayout). */
|
|
135
|
+
floating: boolean
|
|
136
|
+
/** Compact AppSidebar density. */
|
|
137
|
+
dense: boolean
|
|
138
|
+
/** Sidebar CSS width. */
|
|
139
|
+
width?: string
|
|
140
|
+
/** Sidebar position, mirrors the shell's `sidebarPosition`. */
|
|
141
|
+
side: 'left' | 'right'
|
|
142
|
+
/** Optional FormBuilder schemas keyed by section ID. */
|
|
143
|
+
forms: Record<string, FormSchema>
|
|
144
|
+
/** DOM id for the AppSidebar scrollable content area. */
|
|
145
|
+
contentId?: string
|
|
146
|
+
/** Render the sidebar shell even when no panel matches the active view. */
|
|
147
|
+
showWhenEmpty: boolean
|
|
148
|
+
/** Optional compact control model for the generated sidebar form. */
|
|
149
|
+
model?: ControlModel | ControlModelBinding
|
|
150
|
+
/** Compact control schema for the generated sidebar form. */
|
|
151
|
+
controlSchema?: ControlSchema
|
|
152
|
+
/** Options passed to compact control schema generation. */
|
|
153
|
+
controlOptions: ControlWorkspaceOptions
|
|
154
|
+
/** Shared values for the auto-rendered sidebar form. */
|
|
155
|
+
values: Record<string, unknown>
|
|
156
|
+
/** Runtime FormBuilder enhancements for the auto-rendered sidebar form. */
|
|
157
|
+
formEnhancements?: FormEnhancements<Record<string, unknown>>
|
|
158
|
+
/** Show submit/cancel actions inside the auto-rendered sidebar form. */
|
|
159
|
+
showFormActions: boolean
|
|
160
|
+
/** Loading/saving state for the auto-rendered sidebar form. */
|
|
161
|
+
formLoading: boolean
|
|
162
|
+
/** Disabled state for the auto-rendered sidebar form. */
|
|
163
|
+
formDisabled: boolean
|
|
164
|
+
/** Readonly state for the auto-rendered sidebar form. */
|
|
165
|
+
formReadonly: boolean
|
|
166
|
+
/** Size passed to the auto-rendered sidebar form. */
|
|
167
|
+
formSize: 'sm' | 'md' | 'lg'
|
|
168
|
+
/** Show a built-in collapse/expand button in the sidebar chrome. */
|
|
169
|
+
collapsible?: boolean
|
|
170
|
+
/** Controlled sidebar collapsed state. */
|
|
171
|
+
collapsed?: boolean
|
|
172
|
+
/** Initial sidebar collapsed state when uncontrolled. */
|
|
173
|
+
defaultCollapsed: boolean
|
|
174
|
+
/** Sidebar width when collapsed. */
|
|
175
|
+
collapsedWidth: string
|
|
176
|
+
/** Accessible label for the sidebar collapse action. */
|
|
177
|
+
collapseButtonLabel: string
|
|
178
|
+
/** Accessible label for the sidebar expand action. */
|
|
179
|
+
expandButtonLabel: string
|
|
180
|
+
/** Names of AppSidebar passthrough slots the caller actually provided. */
|
|
181
|
+
slotNames: string[]
|
|
182
|
+
}
|
|
@@ -165,7 +165,11 @@ function defaultTransformError(error: unknown): AsyncError {
|
|
|
165
165
|
* const handleSubmit = () => submit(new FormData(formRef.value))
|
|
166
166
|
* ```
|
|
167
167
|
*/
|
|
168
|
-
/**
|
|
168
|
+
/**
|
|
169
|
+
* Wraps an async function with reactive loading, error, and success state plus optional auto-execute.
|
|
170
|
+
*
|
|
171
|
+
* @deprecated Unused by the MINT platform and scheduled for removal in MINT 1.3; use `useRequestSyncState()` instead.
|
|
172
|
+
*/
|
|
169
173
|
export function useAsync<T>(
|
|
170
174
|
asyncFn: (...args: unknown[]) => Promise<T>,
|
|
171
175
|
options: UseAsyncOptions<T> = {}
|
|
@@ -93,6 +93,7 @@ export function useAuth(): UseAuthReturn {
|
|
|
93
93
|
passkey_enabled: boolean
|
|
94
94
|
passkey_registered?: boolean
|
|
95
95
|
registration_enabled?: boolean
|
|
96
|
+
database_mode?: string
|
|
96
97
|
access?: {
|
|
97
98
|
experiment_visibility_mode?: 'open' | 'restricted'
|
|
98
99
|
experimentVisibilityMode?: 'open' | 'restricted'
|
|
@@ -104,6 +105,7 @@ export function useAuth(): UseAuthReturn {
|
|
|
104
105
|
passkeyEnabled: response.data.passkey_enabled,
|
|
105
106
|
passkeyRegistered: response.data.passkey_registered ?? false,
|
|
106
107
|
registrationEnabled: response.data.registration_enabled ?? false,
|
|
108
|
+
databaseMode: response.data.database_mode ?? 'none',
|
|
107
109
|
experimentVisibilityMode:
|
|
108
110
|
response.data.access?.experiment_visibility_mode
|
|
109
111
|
?? response.data.access?.experimentVisibilityMode
|
|
@@ -119,6 +121,7 @@ export function useAuth(): UseAuthReturn {
|
|
|
119
121
|
passkeyEnabled: false,
|
|
120
122
|
passkeyRegistered: false,
|
|
121
123
|
registrationEnabled: false,
|
|
124
|
+
databaseMode: 'none',
|
|
122
125
|
experimentVisibilityMode: 'open',
|
|
123
126
|
}
|
|
124
127
|
}
|
|
@@ -27,6 +27,9 @@ import {
|
|
|
27
27
|
type BioTemplateWorkspaceBindings,
|
|
28
28
|
type UseBioTemplateWorkspaceReturn,
|
|
29
29
|
} from './useBioTemplateWorkspace'
|
|
30
|
+
import {
|
|
31
|
+
liftWorkspaceComponentBindings,
|
|
32
|
+
} from './flattenWorkspaceBindings'
|
|
30
33
|
import type {
|
|
31
34
|
BioTemplateComponentBinding,
|
|
32
35
|
BioTemplateComponentBindingsById,
|
|
@@ -120,14 +123,17 @@ export function useBioTemplatePackWorkspace(
|
|
|
120
123
|
const pillNav = computed(() => workspace.value.pillNav)
|
|
121
124
|
const topBarSettings = computed(() => workspace.value.topBarSettings)
|
|
122
125
|
const bindings = computed(() => workspace.value.bindings)
|
|
123
|
-
const
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
126
|
+
const {
|
|
127
|
+
componentBindings,
|
|
128
|
+
componentBindingsById,
|
|
129
|
+
componentImports,
|
|
130
|
+
componentProps,
|
|
131
|
+
componentPropsById,
|
|
132
|
+
componentPropsByComponent,
|
|
133
|
+
componentSnippets,
|
|
134
|
+
componentUsage,
|
|
135
|
+
getComponentProps: getWorkspaceComponentProps,
|
|
136
|
+
} = liftWorkspaceComponentBindings(workspace)
|
|
131
137
|
|
|
132
138
|
watch(collection, value => {
|
|
133
139
|
workspaceRef.value = createWorkspace(value)
|
|
@@ -181,7 +187,7 @@ export function useBioTemplatePackWorkspace(
|
|
|
181
187
|
componentPropsByComponent,
|
|
182
188
|
componentSnippets,
|
|
183
189
|
componentUsage,
|
|
184
|
-
getComponentProps:
|
|
190
|
+
getComponentProps: getWorkspaceComponentProps,
|
|
185
191
|
applyCollection,
|
|
186
192
|
resetToDefaultCollection,
|
|
187
193
|
save: templateCollection.save,
|
|
@@ -34,6 +34,9 @@ import {
|
|
|
34
34
|
type BioTemplateRendererBinding,
|
|
35
35
|
type UseBioTemplateWorkspaceReturn,
|
|
36
36
|
} from './useBioTemplateWorkspace'
|
|
37
|
+
import {
|
|
38
|
+
liftWorkspaceComponentBindings,
|
|
39
|
+
} from './flattenWorkspaceBindings'
|
|
37
40
|
import type {
|
|
38
41
|
BioTemplateComponentBinding,
|
|
39
42
|
BioTemplateComponentBindingsById,
|
|
@@ -138,14 +141,17 @@ export function useBioTemplatePresetWorkspace(
|
|
|
138
141
|
const collection = templateCollection.templateCollection
|
|
139
142
|
const workspace = computed(() => useBioTemplateWorkspace(collection.value, resolvedControlOptions))
|
|
140
143
|
const renderer = computed<BioTemplateRendererBinding>(() => ({ target: collection.value }))
|
|
141
|
-
const
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
144
|
+
const {
|
|
145
|
+
componentBindings,
|
|
146
|
+
componentBindingsById,
|
|
147
|
+
componentImports,
|
|
148
|
+
componentProps,
|
|
149
|
+
componentPropsById,
|
|
150
|
+
componentPropsByComponent,
|
|
151
|
+
componentSnippets,
|
|
152
|
+
componentUsage,
|
|
153
|
+
getComponentProps,
|
|
154
|
+
} = liftWorkspaceComponentBindings(workspace)
|
|
149
155
|
const form = reactive({
|
|
150
156
|
...controls.form,
|
|
151
157
|
modelValue: controlValues.value,
|
|
@@ -179,13 +185,6 @@ export function useBioTemplatePresetWorkspace(
|
|
|
179
185
|
...topBarSettings,
|
|
180
186
|
}))
|
|
181
187
|
|
|
182
|
-
function getComponentProps(
|
|
183
|
-
component: string,
|
|
184
|
-
options?: Parameters<UseBioTemplateWorkspaceReturn['getComponentProps']>[1],
|
|
185
|
-
) {
|
|
186
|
-
return workspace.value.getComponentProps(component, options)
|
|
187
|
-
}
|
|
188
|
-
|
|
189
188
|
const bindings: BioTemplatePresetWorkspaceBindings = {
|
|
190
189
|
renderer,
|
|
191
190
|
form,
|