@morscherlab/mint-sdk 1.2.0-beta.4 → 1.2.0-beta.7
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/dist/{EmptyState-p90quq8Z.js → EmptyState-NBqf2_8z.js} +2 -2
- package/dist/{EmptyState-p90quq8Z.js.map → EmptyState-NBqf2_8z.js.map} +1 -1
- package/dist/{ExperimentPopover-tLwJ7XF4.js → ExperimentPopover-CfOdh5Rm.js} +3 -3
- package/dist/{ExperimentPopover-tLwJ7XF4.js.map → ExperimentPopover-CfOdh5Rm.js.map} +1 -1
- package/dist/{ExperimentSelectorModal-B6P2msT4.js → ExperimentSelectorModal-DvIagrxY.js} +4 -4
- package/dist/{ExperimentSelectorModal-B6P2msT4.js.map → ExperimentSelectorModal-DvIagrxY.js.map} +1 -1
- package/dist/{SettingsModal-CkNM8qAI.js → SettingsModal-W3TYfnP9.js} +4 -7
- package/dist/SettingsModal-W3TYfnP9.js.map +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/components/AppAvatarMenu.vue.d.ts +4 -0
- package/dist/components/AppSidebar.vue.d.ts +1 -1
- package/dist/components/BioTemplateExperimentWorkspaceView.vue.d.ts +1 -1
- package/dist/components/DropdownButton.vue.d.ts +2 -0
- package/dist/components/FitPanel.vue.d.ts +1 -1
- package/dist/components/PluginWorkspaceView.props.d.ts +29 -1
- package/dist/components/PluginWorkspaceView.vue.d.ts +5 -5
- package/dist/components/SecretInput.vue.d.ts +28 -0
- package/dist/components/SmartGroupFieldRecipe.vue.d.ts +1 -1
- package/dist/components/index.d.ts +9 -0
- package/dist/components/index.js +8 -8
- 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-MGNL6tRn.js → components-B80gV0P6.js} +575 -561
- package/dist/components-B80gV0P6.js.map +1 -0
- package/dist/composables/flattenWorkspaceBindings.d.ts +61 -0
- package/dist/composables/index.d.ts +5 -0
- package/dist/composables/index.js +9 -9
- 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/useFocusTrap.d.ts +21 -0
- package/dist/composables/useMenuKeyboard.d.ts +29 -0
- package/dist/composables/useOptimisticMutation.d.ts +5 -1
- package/dist/composables/usePluginWorkspace.d.ts +51 -0
- package/dist/composables/useResourceCrud.d.ts +5 -1
- package/dist/composables/useRovingFocus.d.ts +24 -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-CKxOcvgh.js → composables-C8mmD5ta.js} +65 -17
- package/dist/composables-C8mmD5ta.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 +13 -13
- package/dist/install.js +7 -7
- package/dist/styles.css +100 -49
- package/dist/templates/builderReadUtils.d.ts +1 -1
- package/dist/templates/index.js +4 -4
- package/dist/{templates-BTJ9C9Kb.js → templates-CK72aKO1.js} +14 -23
- package/dist/templates-CK72aKO1.js.map +1 -0
- package/dist/types/form-builder.d.ts +1 -1
- package/dist/{useControlSchema-CXhxTul7.js → useControlSchema-_OVhavKq.js} +280 -63
- package/dist/useControlSchema-_OVhavKq.js.map +1 -0
- package/dist/{useDropdownState-DSb3BC3N.js → useDropdownState-D5G4UvWd.js} +2 -2
- package/dist/{useDropdownState-DSb3BC3N.js.map → useDropdownState-D5G4UvWd.js.map} +1 -1
- package/dist/{useExperimentSelector-D0pjj9WH.js → useExperimentSelector-DSEckf_g.js} +3 -3
- package/dist/{useExperimentSelector-D0pjj9WH.js.map → useExperimentSelector-DSEckf_g.js.map} +1 -1
- package/dist/{useFormBuilder-CuOFB3aP.js → useFormBuilder-Bd714C7y.js} +2 -2
- package/dist/{useFormBuilder-CuOFB3aP.js.map → useFormBuilder-Bd714C7y.js.map} +1 -1
- package/dist/{useProtocolTemplates-BWhQIWV5.js → useProtocolTemplates-Dq5Pzwyd.js} +481 -46
- package/dist/useProtocolTemplates-Dq5Pzwyd.js.map +1 -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/AppAvatarMenu.test.ts +123 -0
- package/src/__tests__/components/BaseTabs.test.ts +67 -0
- package/src/__tests__/components/DropdownButton.test.ts +134 -0
- package/src/__tests__/components/PluginWorkspaceView.internal.test.ts +230 -0
- package/src/__tests__/components/SecretInput.test.ts +87 -0
- package/src/__tests__/components/WellEditPopupInternal.test.ts +108 -0
- package/src/__tests__/composables/usePluginClient.test.ts +140 -0
- package/src/__tests__/docs/frontendDocsCatalog.test.ts +22 -1
- package/src/components/AppAvatarMenu.vue +34 -3
- package/src/components/BaseModal.vue +8 -56
- package/src/components/BaseTabs.vue +26 -1
- package/src/components/BioTemplateExperimentWorkspaceView.vue +10 -21
- package/src/components/BioTemplatePackWorkspaceView.vue +11 -15
- package/src/components/BioTemplatePresetWorkspaceView.vue +8 -13
- package/src/components/ComponentBindingRenderer.vue +1 -3
- package/src/components/ControlWorkspaceView.vue +11 -22
- package/src/components/DoseDesignWorkspaceView.vue +6 -25
- package/src/components/DropdownButton.vue +32 -2
- package/src/components/PluginWorkspaceView.props.ts +38 -0
- package/src/components/PluginWorkspaceView.vue +53 -224
- package/src/components/SecretInput.story.vue +79 -0
- package/src/components/SecretInput.vue +150 -0
- package/src/components/index.ts +9 -0
- package/src/components/internal/WellEditPopupInternal.vue +20 -1
- 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/experimentDesignData.ts +1 -3
- package/src/composables/flattenWorkspaceBindings.ts +104 -0
- package/src/composables/formBuilderRegistry.ts +5 -0
- package/src/composables/index.ts +26 -0
- package/src/composables/pluginWorkspaceModel.ts +182 -0
- package/src/composables/useAsync.ts +5 -1
- 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/useFocusTrap.ts +91 -0
- package/src/composables/useMenuKeyboard.ts +90 -0
- package/src/composables/useOptimisticMutation.ts +5 -1
- package/src/composables/usePluginClient.ts +42 -4
- package/src/composables/usePluginWorkspace.ts +208 -0
- package/src/composables/useResourceCrud.ts +5 -1
- package/src/composables/useRovingFocus.ts +66 -0
- package/src/composables/useWellPainting.ts +5 -1
- package/src/composables/useWellPlateAdapter.ts +5 -1
- package/src/composables/useWellPlateValidation.ts +5 -1
- package/src/composables/workspaceRecipes.ts +267 -0
- package/src/index.ts +16 -0
- package/src/styles/components/secret-input.css +60 -0
- package/src/styles/index.css +1 -0
- package/src/templates/builderReadUtils.ts +1 -3
- package/src/templates/componentTargetResolvers.ts +1 -3
- package/src/templates/controlSchemaTargets.ts +1 -3
- package/src/types/form-builder.ts +1 -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/SettingsModal-CkNM8qAI.js.map +0 -1
- package/dist/components-MGNL6tRn.js.map +0 -1
- package/dist/composables-CKxOcvgh.js.map +0 -1
- package/dist/experiment-utils-CLnzPPq5.js.map +0 -1
- package/dist/templates-BTJ9C9Kb.js.map +0 -1
- package/dist/useControlSchema-CXhxTul7.js.map +0 -1
- package/dist/useProtocolTemplates-BWhQIWV5.js.map +0 -1
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
/**
|
|
3
|
+
* Internal: renders PluginWorkspaceView's default (main content) slot bound to the
|
|
4
|
+
* control-schema-derived scoped-slot payload (active view, values, component bindings/props).
|
|
5
|
+
* Not part of the public SDK surface — see PluginWorkspaceView.vue for the public component.
|
|
6
|
+
*/
|
|
7
|
+
import type { PluginWorkspaceControlsModel } from '../../composables/pluginWorkspaceModel'
|
|
8
|
+
|
|
9
|
+
defineProps<{
|
|
10
|
+
controls: PluginWorkspaceControlsModel
|
|
11
|
+
}>()
|
|
12
|
+
|
|
13
|
+
defineSlots<{
|
|
14
|
+
default?: (props: PluginWorkspaceControlsModel) => unknown
|
|
15
|
+
}>()
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<template>
|
|
19
|
+
<slot v-bind="controls" />
|
|
20
|
+
</template>
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
/**
|
|
3
|
+
* Internal: AppLayout + AppTopBar for PluginWorkspaceView, driven by a single `shell` model.
|
|
4
|
+
* Owns the responsive/collapse layout props and the top bar's default rendering; the caller
|
|
5
|
+
* decides whether to override the `topbar`/`sidebar` slots and supplies the sidebar content.
|
|
6
|
+
* Not part of the public SDK surface — see PluginWorkspaceView.vue for the public component.
|
|
7
|
+
*/
|
|
8
|
+
import type {
|
|
9
|
+
AccountMenuItem,
|
|
10
|
+
PageSelectorItem,
|
|
11
|
+
PillNavItem,
|
|
12
|
+
PillNavOption,
|
|
13
|
+
PluginSwitcherPlugin,
|
|
14
|
+
} from '../../types'
|
|
15
|
+
import AppLayout from '../AppLayout.vue'
|
|
16
|
+
import AppTopBar from '../AppTopBar.vue'
|
|
17
|
+
import type { PluginWorkspaceShellModel } from '../../composables/pluginWorkspaceModel'
|
|
18
|
+
|
|
19
|
+
defineProps<{
|
|
20
|
+
shell: PluginWorkspaceShellModel
|
|
21
|
+
}>()
|
|
22
|
+
|
|
23
|
+
const emit = defineEmits<{
|
|
24
|
+
'page-selector-select': [page: PageSelectorItem]
|
|
25
|
+
'pill-select': [item: PillNavItem]
|
|
26
|
+
'pill-option-select': [option: PillNavOption, item: PillNavItem]
|
|
27
|
+
'plugin-switcher-select': [plugin: PluginSwitcherPlugin]
|
|
28
|
+
'plugin-switcher-install': []
|
|
29
|
+
'account-menu-select': [item: AccountMenuItem]
|
|
30
|
+
'sign-out': []
|
|
31
|
+
'notifications-click': []
|
|
32
|
+
'settings-values-change': [data: Record<string, unknown>]
|
|
33
|
+
'admin-click': []
|
|
34
|
+
}>()
|
|
35
|
+
|
|
36
|
+
function handlePillOptionSelect(option: PillNavOption, item: PillNavItem) {
|
|
37
|
+
emit('pill-option-select', option, item)
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
defineSlots<{
|
|
41
|
+
topbar?: (props: PluginWorkspaceShellModel['controls']) => unknown
|
|
42
|
+
sidebar?: (props: PluginWorkspaceShellModel['controls']) => unknown
|
|
43
|
+
default?: (props: PluginWorkspaceShellModel['controls']) => unknown
|
|
44
|
+
icon?: (props: Record<string, unknown>) => unknown
|
|
45
|
+
logo?: (props: Record<string, unknown>) => unknown
|
|
46
|
+
'page-selector-icon'?: (props: Record<string, unknown>) => unknown
|
|
47
|
+
'page-selector-item-icon'?: (props: Record<string, unknown>) => unknown
|
|
48
|
+
nav?: (props: Record<string, unknown>) => unknown
|
|
49
|
+
center?: (props: Record<string, unknown>) => unknown
|
|
50
|
+
actions?: (props: Record<string, unknown>) => unknown
|
|
51
|
+
'account-menu-items'?: (props: Record<string, unknown>) => unknown
|
|
52
|
+
'account-menu-item-icon'?: (props: Record<string, unknown>) => unknown
|
|
53
|
+
'settings-appearance'?: (props: Record<string, unknown>) => unknown
|
|
54
|
+
}>()
|
|
55
|
+
</script>
|
|
56
|
+
|
|
57
|
+
<template>
|
|
58
|
+
<AppLayout
|
|
59
|
+
class="mint-plugin-workspace-view"
|
|
60
|
+
:sidebar-position="shell.sidebarPosition"
|
|
61
|
+
:sidebar-width="shell.sidebarWidth"
|
|
62
|
+
:floating="shell.floating"
|
|
63
|
+
:responsive-sidebar="shell.responsiveSidebar"
|
|
64
|
+
:sidebar-toggle-label="shell.sidebarToggleLabel"
|
|
65
|
+
:sidebar-close-label="shell.sidebarCloseLabel"
|
|
66
|
+
>
|
|
67
|
+
<template #topbar>
|
|
68
|
+
<slot name="topbar" v-bind="shell.controls">
|
|
69
|
+
<AppTopBar
|
|
70
|
+
:title="shell.title"
|
|
71
|
+
:subtitle="shell.subtitle"
|
|
72
|
+
:variant="shell.topBarVariant"
|
|
73
|
+
:home-path="shell.homePath"
|
|
74
|
+
:show-logo="shell.showLogo"
|
|
75
|
+
:page-selector="shell.pageSelector"
|
|
76
|
+
:current-page-selector-id="shell.currentPageSelectorId"
|
|
77
|
+
:plugin-switcher="shell.pluginSwitcher"
|
|
78
|
+
:pill-nav="shell.pillNav"
|
|
79
|
+
:current-pill-id="shell.currentPillId"
|
|
80
|
+
:show-theme-toggle="shell.showThemeToggle"
|
|
81
|
+
:show-settings="shell.showSettings"
|
|
82
|
+
:settings-config="shell.settingsConfig"
|
|
83
|
+
:show-standalone-label="shell.showStandaloneLabel"
|
|
84
|
+
:standalone-label="shell.standaloneLabel"
|
|
85
|
+
:account-menu="shell.accountMenu"
|
|
86
|
+
:show-notifications="shell.showNotifications"
|
|
87
|
+
:has-notification-dot="shell.hasNotificationDot"
|
|
88
|
+
:show-admin="shell.showAdmin"
|
|
89
|
+
:admin-path="shell.adminPath"
|
|
90
|
+
:user-name="shell.userName"
|
|
91
|
+
:user-initial="shell.userInitial"
|
|
92
|
+
:user-email="shell.userEmail"
|
|
93
|
+
@page-selector-select="emit('page-selector-select', $event)"
|
|
94
|
+
@pill-select="emit('pill-select', $event)"
|
|
95
|
+
@pill-option-select="handlePillOptionSelect"
|
|
96
|
+
@plugin-switcher-select="emit('plugin-switcher-select', $event)"
|
|
97
|
+
@plugin-switcher-install="emit('plugin-switcher-install')"
|
|
98
|
+
@account-menu-select="emit('account-menu-select', $event)"
|
|
99
|
+
@sign-out="emit('sign-out')"
|
|
100
|
+
@notifications-click="emit('notifications-click')"
|
|
101
|
+
@settings-values-change="emit('settings-values-change', $event)"
|
|
102
|
+
@admin-click="emit('admin-click')"
|
|
103
|
+
>
|
|
104
|
+
<template
|
|
105
|
+
v-for="slotName in shell.topBarSlotNames"
|
|
106
|
+
:key="slotName"
|
|
107
|
+
#[slotName]="slotProps"
|
|
108
|
+
>
|
|
109
|
+
<!-- @vue-ignore dynamic SDK slot forwarding for AppTopBar passthrough slots -->
|
|
110
|
+
<slot
|
|
111
|
+
:name="slotName"
|
|
112
|
+
v-bind="slotProps ?? {}"
|
|
113
|
+
/>
|
|
114
|
+
</template>
|
|
115
|
+
</AppTopBar>
|
|
116
|
+
</slot>
|
|
117
|
+
</template>
|
|
118
|
+
|
|
119
|
+
<template v-if="shell.hasSidebarSurface" #sidebar>
|
|
120
|
+
<slot name="sidebar" v-bind="shell.controls" />
|
|
121
|
+
</template>
|
|
122
|
+
|
|
123
|
+
<slot v-bind="shell.controls" />
|
|
124
|
+
</AppLayout>
|
|
125
|
+
</template>
|
|
@@ -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>
|
|
@@ -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
|
@@ -528,3 +528,29 @@ export {
|
|
|
528
528
|
type UsePluginJobCenterOptions,
|
|
529
529
|
type UsePluginJobCenterReturn,
|
|
530
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
|
+
useMenuKeyboard,
|
|
554
|
+
type UseMenuKeyboardOptions,
|
|
555
|
+
type UseMenuKeyboardReturn,
|
|
556
|
+
} 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> = {}
|
|
@@ -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,
|