@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
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { B as currentExperimentFromContext, U as resolveCurrentExperimentId, V as getInjectedPlatformContext, et as useEventStream } from "./useControlSchema-
|
|
3
|
-
import {
|
|
4
|
-
import { i as usePlatformContext } from "./useFormBuilder-
|
|
1
|
+
import { n as useRequestSyncState } from "./Skeleton-DxtwJ5gt.js";
|
|
2
|
+
import { B as currentExperimentFromContext, U as resolveCurrentExperimentId, V as getInjectedPlatformContext, et as useEventStream, lt as PLUGIN_SECRET_FORMAT_KEY } from "./useControlSchema-aMZlb4Sc.js";
|
|
3
|
+
import { a as useAuthStore, d as useSettingsStore, i as useApi, n as AuthenticationRequiredError, r as authenticationRequiredError, t as readErrorMessage } from "./errors-_W0-LbA6.js";
|
|
4
|
+
import { i as usePlatformContext } from "./useFormBuilder-TCxNnqeb.js";
|
|
5
|
+
import { bn as rowLabel, pn as PLATE_CONFIGS, yn as rowIndex } from "./templates-Qq113pyZ.js";
|
|
5
6
|
import { computed, getCurrentInstance, onMounted, onUnmounted, ref, shallowRef, toValue, watch } from "vue";
|
|
6
7
|
import axios from "axios";
|
|
7
8
|
//#region src/composables/useAuth.ts
|
|
@@ -26,6 +27,7 @@ function useAuth() {
|
|
|
26
27
|
passkeyEnabled: response.data.passkey_enabled,
|
|
27
28
|
passkeyRegistered: response.data.passkey_registered ?? false,
|
|
28
29
|
registrationEnabled: response.data.registration_enabled ?? false,
|
|
30
|
+
databaseMode: response.data.database_mode ?? "none",
|
|
29
31
|
experimentVisibilityMode: response.data.access?.experiment_visibility_mode ?? response.data.access?.experimentVisibilityMode ?? "open"
|
|
30
32
|
};
|
|
31
33
|
authStore.setAuthConfig(config);
|
|
@@ -37,6 +39,7 @@ function useAuth() {
|
|
|
37
39
|
passkeyEnabled: false,
|
|
38
40
|
passkeyRegistered: false,
|
|
39
41
|
registrationEnabled: false,
|
|
42
|
+
databaseMode: "none",
|
|
40
43
|
experimentVisibilityMode: "open"
|
|
41
44
|
};
|
|
42
45
|
}
|
|
@@ -504,7 +507,11 @@ function defaultTransformError(error) {
|
|
|
504
507
|
* const handleSubmit = () => submit(new FormData(formRef.value))
|
|
505
508
|
* ```
|
|
506
509
|
*/
|
|
507
|
-
/**
|
|
510
|
+
/**
|
|
511
|
+
* Wraps an async function with reactive loading, error, and success state plus optional auto-execute.
|
|
512
|
+
*
|
|
513
|
+
* @deprecated Unused by the MINT platform and scheduled for removal in MINT 1.3; use `useRequestSyncState()` instead.
|
|
514
|
+
*/
|
|
508
515
|
function useAsync(asyncFn, options = {}) {
|
|
509
516
|
const { initialData = null, immediate = false, immediateArgs = [], transformError = defaultTransformError, onSuccess, onError, resetOnExecute = false } = options;
|
|
510
517
|
const data = ref(initialData);
|
|
@@ -611,6 +618,137 @@ function useAsyncBatch(asyncFns) {
|
|
|
611
618
|
};
|
|
612
619
|
}
|
|
613
620
|
//#endregion
|
|
621
|
+
//#region src/composables/usePluginConfig.ts
|
|
622
|
+
var PLATFORM_OWNED_SETTINGS_KEY$1 = "allowed_experiment_types";
|
|
623
|
+
function cloneConfig(config) {
|
|
624
|
+
return JSON.parse(JSON.stringify(config));
|
|
625
|
+
}
|
|
626
|
+
function hasOwnConfig(config, key) {
|
|
627
|
+
return Object.prototype.hasOwnProperty.call(config, key);
|
|
628
|
+
}
|
|
629
|
+
function changedTopLevelKeys(current, saved) {
|
|
630
|
+
return new Set([...new Set([...Object.keys(current), ...Object.keys(saved)])].filter((key) => JSON.stringify(current[key]) !== JSON.stringify(saved[key])));
|
|
631
|
+
}
|
|
632
|
+
function topLevelConfigPatch(current, keys) {
|
|
633
|
+
return Object.fromEntries([...keys].map((key) => [key, hasOwnConfig(current, key) ? current[key] : null]));
|
|
634
|
+
}
|
|
635
|
+
function platformOwnedConfigPatch(config) {
|
|
636
|
+
return { [PLATFORM_OWNED_SETTINGS_KEY$1]: hasOwnConfig(config, PLATFORM_OWNED_SETTINGS_KEY$1) ? config[PLATFORM_OWNED_SETTINGS_KEY$1] : null };
|
|
637
|
+
}
|
|
638
|
+
function responseConfigPayload(response) {
|
|
639
|
+
return response.config ?? response.settings ?? {};
|
|
640
|
+
}
|
|
641
|
+
/**
|
|
642
|
+
* @deprecated Unused by the MINT platform and scheduled for removal in MINT 1.3; use `usePluginSettings()` for typed plugin settings.
|
|
643
|
+
*/
|
|
644
|
+
function usePluginConfig(pluginName) {
|
|
645
|
+
const injectedContext = getInjectedPlatformContext();
|
|
646
|
+
const { plugin } = usePlatformContext();
|
|
647
|
+
const platformApi = useApi();
|
|
648
|
+
const pluginApi = useApi({ baseUrl: injectedContext?.plugin?.api_prefix ?? plugin.value?.api_prefix });
|
|
649
|
+
const resolvedName = computed(() => pluginName ?? plugin.value?.name ?? injectedContext?.plugin?.name ?? "");
|
|
650
|
+
const usesPluginSettingsApi = computed(() => {
|
|
651
|
+
const currentPlugin = injectedContext?.plugin ?? plugin.value;
|
|
652
|
+
return currentPlugin?.settings_api === "plugin" && resolvedName.value === currentPlugin.name;
|
|
653
|
+
});
|
|
654
|
+
const config = ref({});
|
|
655
|
+
const savedConfig = ref({});
|
|
656
|
+
const revision = ref(null);
|
|
657
|
+
const request = useRequestSyncState("Plugin config request failed.");
|
|
658
|
+
const isLoading = ref(false);
|
|
659
|
+
const isSaving = ref(false);
|
|
660
|
+
const error = request.error;
|
|
661
|
+
const lastLoadedAt = request.lastLoadedAt;
|
|
662
|
+
const lastSavedAt = request.lastSavedAt;
|
|
663
|
+
const isDirty = computed(() => {
|
|
664
|
+
return JSON.stringify(config.value) !== JSON.stringify(savedConfig.value);
|
|
665
|
+
});
|
|
666
|
+
async function load() {
|
|
667
|
+
const name = resolvedName.value;
|
|
668
|
+
if (!name) return;
|
|
669
|
+
isLoading.value = true;
|
|
670
|
+
try {
|
|
671
|
+
const response = usesPluginSettingsApi.value ? await request.run(() => pluginApi.get("/settings"), {
|
|
672
|
+
success: "load",
|
|
673
|
+
errorMessage: "Failed to load plugin config"
|
|
674
|
+
}) : await request.run(() => platformApi.get(`/plugins/${encodeURIComponent(name)}/config`), {
|
|
675
|
+
success: "load",
|
|
676
|
+
errorMessage: "Failed to load plugin config"
|
|
677
|
+
});
|
|
678
|
+
const responseConfig = responseConfigPayload(response);
|
|
679
|
+
config.value = cloneConfig(responseConfig);
|
|
680
|
+
savedConfig.value = cloneConfig(responseConfig);
|
|
681
|
+
revision.value = response.revision ?? null;
|
|
682
|
+
} catch {} finally {
|
|
683
|
+
isLoading.value = false;
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
async function save() {
|
|
687
|
+
const name = resolvedName.value;
|
|
688
|
+
if (!name) return false;
|
|
689
|
+
isSaving.value = true;
|
|
690
|
+
try {
|
|
691
|
+
const payload = cloneConfig(config.value);
|
|
692
|
+
let response;
|
|
693
|
+
let nextRevision = revision.value;
|
|
694
|
+
if (usesPluginSettingsApi.value) {
|
|
695
|
+
response = await request.run(() => pluginApi.put("/settings", payload, revision.value ? { headers: { "If-Match": `"${revision.value}"` } } : void 0), {
|
|
696
|
+
success: "save",
|
|
697
|
+
errorMessage: "Failed to save plugin config"
|
|
698
|
+
});
|
|
699
|
+
nextRevision = response.revision ?? nextRevision;
|
|
700
|
+
} else {
|
|
701
|
+
const dirtyKeys = changedTopLevelKeys(payload, savedConfig.value);
|
|
702
|
+
const platformOwnedChanged = dirtyKeys.has(PLATFORM_OWNED_SETTINGS_KEY$1);
|
|
703
|
+
const typedKeys = [...dirtyKeys].filter((key) => key !== PLATFORM_OWNED_SETTINGS_KEY$1);
|
|
704
|
+
if (typedKeys.length) {
|
|
705
|
+
response = await request.run(() => platformApi.patch(`/plugins/${encodeURIComponent(name)}/config`, { config: topLevelConfigPatch(payload, typedKeys) }), {
|
|
706
|
+
success: "save",
|
|
707
|
+
errorMessage: "Failed to save plugin config"
|
|
708
|
+
});
|
|
709
|
+
nextRevision = response.revision ?? nextRevision;
|
|
710
|
+
}
|
|
711
|
+
if (platformOwnedChanged) {
|
|
712
|
+
response = await request.run(() => platformApi.patch(`/plugins/${encodeURIComponent(name)}/config`, { config: platformOwnedConfigPatch(payload) }), {
|
|
713
|
+
success: "save",
|
|
714
|
+
errorMessage: "Failed to save plugin config"
|
|
715
|
+
});
|
|
716
|
+
nextRevision = response.revision ?? nextRevision;
|
|
717
|
+
}
|
|
718
|
+
}
|
|
719
|
+
if (!response) return true;
|
|
720
|
+
const responseConfig = responseConfigPayload(response);
|
|
721
|
+
config.value = cloneConfig(responseConfig);
|
|
722
|
+
savedConfig.value = cloneConfig(responseConfig);
|
|
723
|
+
revision.value = response.revision ?? nextRevision;
|
|
724
|
+
return true;
|
|
725
|
+
} catch {
|
|
726
|
+
return false;
|
|
727
|
+
} finally {
|
|
728
|
+
isSaving.value = false;
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
function reset() {
|
|
732
|
+
config.value = cloneConfig(savedConfig.value);
|
|
733
|
+
request.clearError();
|
|
734
|
+
}
|
|
735
|
+
onMounted(() => {
|
|
736
|
+
load();
|
|
737
|
+
});
|
|
738
|
+
return {
|
|
739
|
+
config,
|
|
740
|
+
isLoading,
|
|
741
|
+
isSaving,
|
|
742
|
+
error,
|
|
743
|
+
lastLoadedAt,
|
|
744
|
+
lastSavedAt,
|
|
745
|
+
isDirty,
|
|
746
|
+
load,
|
|
747
|
+
save,
|
|
748
|
+
reset
|
|
749
|
+
};
|
|
750
|
+
}
|
|
751
|
+
//#endregion
|
|
614
752
|
//#region src/composables/analysisArtifactTarget.ts
|
|
615
753
|
var EXPERIMENT_ID = "experiment_id";
|
|
616
754
|
var ARTIFACT_PLUGIN_ID = "artifact_plugin_id";
|
|
@@ -647,7 +785,11 @@ function parseAnalysisArtifactTarget(query) {
|
|
|
647
785
|
}
|
|
648
786
|
//#endregion
|
|
649
787
|
//#region src/composables/useCommandHistory.ts
|
|
650
|
-
/**
|
|
788
|
+
/**
|
|
789
|
+
* Generic command-stack state for plugin editors with undo/redo controls.
|
|
790
|
+
*
|
|
791
|
+
* @deprecated Unused by the MINT platform and scheduled for removal in MINT 1.3; keep command stacks plugin-local.
|
|
792
|
+
*/
|
|
651
793
|
function useCommandHistory(options = {}) {
|
|
652
794
|
const maxDepth = Math.max(1, options.maxDepth ?? 50);
|
|
653
795
|
const undoStack = ref([]);
|
|
@@ -710,7 +852,11 @@ function isPromiseLike(value) {
|
|
|
710
852
|
}
|
|
711
853
|
//#endregion
|
|
712
854
|
//#region src/composables/useOptimisticMutation.ts
|
|
713
|
-
/**
|
|
855
|
+
/**
|
|
856
|
+
* Run async mutations with optional optimistic local updates and rollback.
|
|
857
|
+
*
|
|
858
|
+
* @deprecated Unused by the MINT platform and scheduled for removal in MINT 1.3; use `useRequestSyncState()` instead.
|
|
859
|
+
*/
|
|
714
860
|
function useOptimisticMutation(options) {
|
|
715
861
|
const loading = shallowRef(false);
|
|
716
862
|
const error = ref(null);
|
|
@@ -744,7 +890,7 @@ function useOptimisticMutation(options) {
|
|
|
744
890
|
return result;
|
|
745
891
|
} catch (err) {
|
|
746
892
|
options.rollback?.(snapshot, variables, err);
|
|
747
|
-
error.value = options.readErrorMessage?.(err) ?? readErrorMessage
|
|
893
|
+
error.value = options.readErrorMessage?.(err) ?? readErrorMessage(err);
|
|
748
894
|
options.onError?.(err, context);
|
|
749
895
|
throw err;
|
|
750
896
|
} finally {
|
|
@@ -763,15 +909,13 @@ function useOptimisticMutation(options) {
|
|
|
763
909
|
reset
|
|
764
910
|
};
|
|
765
911
|
}
|
|
766
|
-
function readErrorMessage$1(value) {
|
|
767
|
-
if (value instanceof Error && value.message) return value.message;
|
|
768
|
-
if (typeof value === "string" && value.trim()) return value;
|
|
769
|
-
if (typeof value === "object" && value !== null && "message" in value && typeof value.message === "string" && value.message.trim()) return value.message;
|
|
770
|
-
return "Request failed.";
|
|
771
|
-
}
|
|
772
912
|
//#endregion
|
|
773
913
|
//#region src/composables/useResourceCrud.ts
|
|
774
|
-
/**
|
|
914
|
+
/**
|
|
915
|
+
* Common list/create/update/delete state wrapper for generated plugin clients.
|
|
916
|
+
*
|
|
917
|
+
* @deprecated Unused by the MINT platform and scheduled for removal in MINT 1.3; use `useGeneratedPluginClient()` instead.
|
|
918
|
+
*/
|
|
775
919
|
function useResourceCrud(options) {
|
|
776
920
|
const items = ref([...options.initialItems ?? []]);
|
|
777
921
|
const loading = shallowRef(false);
|
|
@@ -899,46 +1043,13 @@ function resolveKey(keyOrItem, getKey) {
|
|
|
899
1043
|
if (typeof keyOrItem === "string" || typeof keyOrItem === "number") return keyOrItem;
|
|
900
1044
|
return getKey(keyOrItem);
|
|
901
1045
|
}
|
|
902
|
-
function readErrorMessage(value) {
|
|
903
|
-
if (value instanceof Error && value.message) return value.message;
|
|
904
|
-
if (typeof value === "string" && value.trim()) return value;
|
|
905
|
-
if (typeof value === "object" && value !== null && "message" in value && typeof value.message === "string" && value.message.trim()) return value.message;
|
|
906
|
-
return "Request failed.";
|
|
907
|
-
}
|
|
908
1046
|
//#endregion
|
|
909
1047
|
//#region src/composables/useWellPainting.ts
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
},
|
|
916
|
-
12: {
|
|
917
|
-
rows: 3,
|
|
918
|
-
cols: 4
|
|
919
|
-
},
|
|
920
|
-
24: {
|
|
921
|
-
rows: 4,
|
|
922
|
-
cols: 6
|
|
923
|
-
},
|
|
924
|
-
48: {
|
|
925
|
-
rows: 6,
|
|
926
|
-
cols: 8
|
|
927
|
-
},
|
|
928
|
-
54: {
|
|
929
|
-
rows: 6,
|
|
930
|
-
cols: 9
|
|
931
|
-
},
|
|
932
|
-
96: {
|
|
933
|
-
rows: 8,
|
|
934
|
-
cols: 12
|
|
935
|
-
},
|
|
936
|
-
384: {
|
|
937
|
-
rows: 16,
|
|
938
|
-
cols: 24
|
|
939
|
-
}
|
|
940
|
-
};
|
|
941
|
-
/** Pointer painting/rectangle selection state for WellPlate-based editors. */
|
|
1048
|
+
/**
|
|
1049
|
+
* Pointer painting/rectangle selection state for WellPlate-based editors.
|
|
1050
|
+
*
|
|
1051
|
+
* @deprecated Unused by the MINT platform and scheduled for removal in MINT 1.3; use `useWellPlateEditor()` instead.
|
|
1052
|
+
*/
|
|
942
1053
|
function useWellPainting(options) {
|
|
943
1054
|
const activeMode = ref(options.initialMode ?? "select");
|
|
944
1055
|
const activePayload = ref(options.initialPayload);
|
|
@@ -1013,15 +1124,15 @@ function wellIdToCoordinate(wellId) {
|
|
|
1013
1124
|
const match = /^([A-Z]+)(\d+)$/i.exec(wellId.trim());
|
|
1014
1125
|
if (!match) return null;
|
|
1015
1126
|
return {
|
|
1016
|
-
row:
|
|
1127
|
+
row: rowIndex(match[1].toUpperCase()),
|
|
1017
1128
|
col: Number(match[2]) - 1
|
|
1018
1129
|
};
|
|
1019
1130
|
}
|
|
1020
1131
|
function coordinateToWellId(coord) {
|
|
1021
|
-
return `${
|
|
1132
|
+
return `${rowLabel(coord.row)}${coord.col + 1}`;
|
|
1022
1133
|
}
|
|
1023
1134
|
function wellIdsInRectangle(start, end, format) {
|
|
1024
|
-
const dimensions =
|
|
1135
|
+
const dimensions = PLATE_CONFIGS[format];
|
|
1025
1136
|
const minRow = Math.max(0, Math.min(start.row, end.row));
|
|
1026
1137
|
const maxRow = Math.min(dimensions.rows - 1, Math.max(start.row, end.row));
|
|
1027
1138
|
const minCol = Math.max(0, Math.min(start.col, end.col));
|
|
@@ -1033,25 +1144,13 @@ function wellIdsInRectangle(start, end, format) {
|
|
|
1033
1144
|
}));
|
|
1034
1145
|
return ids;
|
|
1035
1146
|
}
|
|
1036
|
-
function rowLabelToIndex$1(label) {
|
|
1037
|
-
let result = 0;
|
|
1038
|
-
for (const char of label) result = result * 26 + (char.charCodeAt(0) - 64);
|
|
1039
|
-
return result - 1;
|
|
1040
|
-
}
|
|
1041
|
-
function indexToRowLabel$1(index) {
|
|
1042
|
-
if (index < 26) return ROW_LABELS[index];
|
|
1043
|
-
let value = index + 1;
|
|
1044
|
-
let label = "";
|
|
1045
|
-
while (value > 0) {
|
|
1046
|
-
value--;
|
|
1047
|
-
label = ROW_LABELS[value % 26] + label;
|
|
1048
|
-
value = Math.floor(value / 26);
|
|
1049
|
-
}
|
|
1050
|
-
return label;
|
|
1051
|
-
}
|
|
1052
1147
|
//#endregion
|
|
1053
1148
|
//#region src/composables/useWellPlateAdapter.ts
|
|
1054
|
-
/**
|
|
1149
|
+
/**
|
|
1150
|
+
* Convert domain rows into WellPlate's wells prop without hand-written adapters.
|
|
1151
|
+
*
|
|
1152
|
+
* @deprecated Unused by the MINT platform and scheduled for removal in MINT 1.3; use `useWellPlateEditor()` instead.
|
|
1153
|
+
*/
|
|
1055
1154
|
function useWellPlateAdapter(options) {
|
|
1056
1155
|
return { wells: computed(() => createWellPlateWells(toValue(options.entries), options)) };
|
|
1057
1156
|
}
|
|
@@ -1137,7 +1236,11 @@ function indexToRowLabel(index) {
|
|
|
1137
1236
|
}
|
|
1138
1237
|
//#endregion
|
|
1139
1238
|
//#region src/composables/useWellPlateValidation.ts
|
|
1140
|
-
/**
|
|
1239
|
+
/**
|
|
1240
|
+
* Rule-driven validation state for WellPlate layout/design screens.
|
|
1241
|
+
*
|
|
1242
|
+
* @deprecated Unused by the MINT platform and scheduled for removal in MINT 1.3; use `useWellPlateEditor()` instead.
|
|
1243
|
+
*/
|
|
1141
1244
|
function useWellPlateValidation(options) {
|
|
1142
1245
|
const warnings = computed(() => runWellPlateValidation(toValue(options.context), toValue(options.rules)));
|
|
1143
1246
|
return {
|
|
@@ -1499,7 +1602,29 @@ async function downloadPluginEndpoint(contract, endpoint, payload, options = {})
|
|
|
1499
1602
|
function normalizePluginSettingsOptions(options = {}) {
|
|
1500
1603
|
return typeof options === "string" ? { pluginName: options } : options;
|
|
1501
1604
|
}
|
|
1605
|
+
/** @deprecated Use `useGeneratedPluginClient()` for generated clients. */
|
|
1606
|
+
function usePluginClient(client) {
|
|
1607
|
+
return client;
|
|
1608
|
+
}
|
|
1502
1609
|
var PLATFORM_OWNED_SETTINGS_KEY = "allowed_experiment_types";
|
|
1610
|
+
/**
|
|
1611
|
+
* Secret settings travel as `{ "$secret": "<id>" }` references, so an untouched
|
|
1612
|
+
* secret round-trips without ever exposing its value. Declaring the format on
|
|
1613
|
+
* every write keeps a `null` unambiguous: it clears the stored secret instead of
|
|
1614
|
+
* meaning "unchanged", which is what the deprecated placeholder form meant.
|
|
1615
|
+
*/
|
|
1616
|
+
function withSecretFormat(payload, secretFormat) {
|
|
1617
|
+
if (!secretFormat) return payload;
|
|
1618
|
+
return {
|
|
1619
|
+
...payload,
|
|
1620
|
+
[PLUGIN_SECRET_FORMAT_KEY]: secretFormat
|
|
1621
|
+
};
|
|
1622
|
+
}
|
|
1623
|
+
function responseSecretFormat(response) {
|
|
1624
|
+
if (!response || typeof response !== "object") return null;
|
|
1625
|
+
const format = response[PLUGIN_SECRET_FORMAT_KEY];
|
|
1626
|
+
return typeof format === "string" && format ? format : null;
|
|
1627
|
+
}
|
|
1503
1628
|
function cloneRecord(value) {
|
|
1504
1629
|
return JSON.parse(JSON.stringify(value));
|
|
1505
1630
|
}
|
|
@@ -1537,6 +1662,7 @@ function usePluginSettings(options = {}) {
|
|
|
1537
1662
|
const values = ref({});
|
|
1538
1663
|
const savedValues = shallowRef({});
|
|
1539
1664
|
const revision = ref(null);
|
|
1665
|
+
const secretFormat = ref(null);
|
|
1540
1666
|
const request = useRequestSyncState("Plugin settings request failed.");
|
|
1541
1667
|
const isLoading = ref(false);
|
|
1542
1668
|
const isSaving = ref(false);
|
|
@@ -1557,11 +1683,12 @@ function usePluginSettings(options = {}) {
|
|
|
1557
1683
|
function setValues(nextValues) {
|
|
1558
1684
|
values.value = cloneRecord(nextValues);
|
|
1559
1685
|
}
|
|
1560
|
-
function applyLoaded(nextValues, nextRevision) {
|
|
1686
|
+
function applyLoaded(nextValues, nextRevision, nextSecretFormat = secretFormat.value) {
|
|
1561
1687
|
const cloned = cloneRecord(nextValues);
|
|
1562
1688
|
values.value = cloned;
|
|
1563
1689
|
savedValues.value = cloneRecord(cloned);
|
|
1564
1690
|
revision.value = nextRevision;
|
|
1691
|
+
secretFormat.value = nextSecretFormat;
|
|
1565
1692
|
}
|
|
1566
1693
|
async function load() {
|
|
1567
1694
|
isLoading.value = true;
|
|
@@ -1573,7 +1700,7 @@ function usePluginSettings(options = {}) {
|
|
|
1573
1700
|
success: "load",
|
|
1574
1701
|
errorMessage: "Failed to load plugin settings"
|
|
1575
1702
|
});
|
|
1576
|
-
applyLoaded(responseSettingsPayload(response), responseSettingsRevision(response));
|
|
1703
|
+
applyLoaded(responseSettingsPayload(response), responseSettingsRevision(response), responseSecretFormat(response));
|
|
1577
1704
|
} catch {} finally {
|
|
1578
1705
|
isLoading.value = false;
|
|
1579
1706
|
}
|
|
@@ -1590,7 +1717,7 @@ function usePluginSettings(options = {}) {
|
|
|
1590
1717
|
const typedKeys = [...dirtyKeys].filter((key) => key !== PLATFORM_OWNED_SETTINGS_KEY);
|
|
1591
1718
|
let nextRevision = revision.value;
|
|
1592
1719
|
if (typedKeys.length) {
|
|
1593
|
-
response = await request.run(() => platformApi.patch(`/plugins/${encodeURIComponent(resolvedPluginName.value)}/config`, { config: topLevelSettingsPatch(payload, typedKeys) }), {
|
|
1720
|
+
response = await request.run(() => platformApi.patch(`/plugins/${encodeURIComponent(resolvedPluginName.value)}/config`, { config: withSecretFormat(topLevelSettingsPatch(payload, typedKeys), secretFormat.value) }), {
|
|
1594
1721
|
success: "save",
|
|
1595
1722
|
errorMessage: "Failed to save plugin settings"
|
|
1596
1723
|
});
|
|
@@ -1604,16 +1731,16 @@ function usePluginSettings(options = {}) {
|
|
|
1604
1731
|
nextRevision = responseSettingsRevision(response) ?? nextRevision;
|
|
1605
1732
|
}
|
|
1606
1733
|
if (!response) return true;
|
|
1607
|
-
applyLoaded(responseSettingsPayload(response), nextRevision);
|
|
1734
|
+
applyLoaded(responseSettingsPayload(response), nextRevision, responseSecretFormat(response) ?? secretFormat.value);
|
|
1608
1735
|
return true;
|
|
1609
1736
|
} else {
|
|
1610
1737
|
const ifMatch = revision.value ? { headers: { "If-Match": `"${revision.value}"` } } : void 0;
|
|
1611
|
-
response = await request.run(() => pluginApi.put("/settings", payload, ifMatch), {
|
|
1738
|
+
response = await request.run(() => pluginApi.put("/settings", withSecretFormat(payload, secretFormat.value), ifMatch), {
|
|
1612
1739
|
success: "save",
|
|
1613
1740
|
errorMessage: "Failed to save plugin settings"
|
|
1614
1741
|
});
|
|
1615
1742
|
}
|
|
1616
|
-
applyLoaded(responseSettingsPayload(response), responseSettingsRevision(response) ?? revision.value);
|
|
1743
|
+
applyLoaded(responseSettingsPayload(response), responseSettingsRevision(response) ?? revision.value, responseSecretFormat(response) ?? secretFormat.value);
|
|
1617
1744
|
return true;
|
|
1618
1745
|
} catch {
|
|
1619
1746
|
return false;
|
|
@@ -1763,6 +1890,6 @@ function useCurrentExperiment(options = {}) {
|
|
|
1763
1890
|
};
|
|
1764
1891
|
}
|
|
1765
1892
|
//#endregion
|
|
1766
|
-
export {
|
|
1893
|
+
export { useAsync as A, createPluginResourceClient as C, buildAnalysisArtifactTargetQuery as D, useCommandHistory as E, resolvePluginFrontendBase as M, usePasskey as N, parseAnalysisArtifactTarget as O, useAuth as P, wellIdsInRectangle as S, useOptimisticMutation as T, createWellPlateWells as _, pluginFormDataFromPayload as a, useWellPainting as b, usePluginClient as c, buildPluginEndpointUrl as d, resolvePluginBaseUrl as f, createRowConditions as g, createColumnConditions as h, getPluginPageSelectorItems as i, useAsyncBatch as j, usePluginConfig as k, usePluginEventStream as l, useWellPlateValidation as m, downloadBlob as n, uploadPluginEndpoint as o, runWellPlateValidation as p, downloadPluginEndpoint as r, useCurrentExperiment as s, createPluginClient as t, usePluginSettings as u, useWellPlateAdapter as v, useResourceCrud as w, wellIdToCoordinate as x, coordinateToWellId as y };
|
|
1767
1894
|
|
|
1768
|
-
//# sourceMappingURL=composables-
|
|
1895
|
+
//# sourceMappingURL=composables-B_pia3hO.js.map
|