@@ -3,7 +3,7 @@ import { library } from "@fortawesome/fontawesome-svg-core";
33import { faEye , faEyeSlash } from " @fortawesome/free-regular-svg-icons" ;
44import { FontAwesomeIcon } from " @fortawesome/vue-fontawesome" ;
55import { storeToRefs } from " pinia" ;
6- import { computed , type ComputedRef , type PropType , type Ref , ref } from " vue" ;
6+ import { computed , type ComputedRef , type Ref , ref } from " vue" ;
77
88import { useGlobalUploadModal } from " @/composables/globalUploadModal" ;
99import { useToolRouting } from " @/composables/route" ;
@@ -25,15 +25,12 @@ const emit = defineEmits<{
2525 (e : " update:show-advanced" , showAdvanced : boolean ): void ;
2626 (e : " update:panel-query" , query : string ): void ;
2727 (e : " onInsertTool" , toolId : string , toolName : string ): void ;
28- (e : " onInsertModule" , moduleName : string , moduleTitle : string | undefined ): void ;
2928}>();
3029
3130const props = defineProps ({
3231 workflow: { type: Boolean , default: false },
3332 showAdvanced: { type: Boolean , default: false , required: true },
3433 panelQuery: { type: String , required: true },
35- dataManagers: { type: Array , default: null },
36- moduleSections: { type: Array as PropType <Record <string , any >>, default: null },
3734 useSearchWorker: { type: Boolean , default: true },
3835});
3936
@@ -71,17 +68,6 @@ const hasResults = computed(() => results.value.length > 0);
7168const queryTooShort = computed (() => query .value && query .value .length < 3 );
7269const queryFinished = computed (() => query .value && queryPending .value != true );
7370
74- const hasDataManagerSection = computed (() => props .workflow && props .dataManagers && props .dataManagers .length > 0 );
75- const dataManagerSection = computed (() => {
76- const dynamicSection: ToolSectionType = {
77- model_class: " ToolSection" ,
78- id: " __data_managers" ,
79- name: localize (" Data Managers" ),
80- elems: props .dataManagers as Tool [],
81- };
82- return dynamicSection ;
83- });
84-
8571/** `toolsById` from `toolStore`, except it only has valid tools for `props.workflow` value */
8672const localToolsById = computed (() => {
8773 if (toolStore .toolsById && Object .keys (toolStore .toolsById ).length > 0 ) {
@@ -132,11 +118,6 @@ const localPanel: ComputedRef<Record<string, Tool | ToolSectionType> | null> = c
132118const buttonIcon = computed (() => (showSections .value ? faEyeSlash : faEye ));
133119const buttonText = computed (() => (showSections .value ? localize (" Hide Sections" ) : localize (" Show Sections" )));
134120
135- function onInsertModule(module : Record <string , any >, event : Event ) {
136- event .preventDefault ();
137- emit (" onInsertModule" , module .name , module .title );
138- }
139-
140121function onToolClick(tool : Tool , evt : Event ) {
141122 if (! props .workflow ) {
142123 if (tool .id === " upload1" ) {
@@ -231,24 +212,6 @@ function onToggle() {
231212 <div v-if =" !propShowAdvanced" class =" unified-panel-body" >
232213 <div class =" toolMenuContainer" >
233214 <div v-if =" localPanel" class =" toolMenu" >
234- <div v-if =" props.workflow" >
235- <ToolSection
236- v-for =" category in moduleSections"
237- :key =" category.name"
238- :hide-name =" true"
239- :category =" category"
240- tool-key =" name"
241- :section-name =" category.name"
242- :query-filter =" queryFilter || undefined"
243- :disable-filter =" true"
244- @onClick =" onInsertModule" />
245- </div >
246- <ToolSection
247- v-if =" hasDataManagerSection"
248- :category =" dataManagerSection"
249- :query-filter =" queryFilter || undefined"
250- :disable-filter =" true"
251- @onClick =" onToolClick" />
252215 <div v-for =" (panel, key) in localPanel" :key =" key" >
253216 <ToolSection
254217 v-if =" panel"
0 commit comments