forked from galaxyproject/galaxy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build dataset collection input definition on the client.
- Loading branch information
Showing
4 changed files
with
110 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
80 changes: 80 additions & 0 deletions
80
client/src/components/Workflow/Editor/Forms/FormInputCollection.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
<script setup lang="ts"> | ||
import { ref } from "vue"; | ||
import type { DatatypesMapperModel } from "@/components/Datatypes/model"; | ||
import type { Step } from "@/stores/workflowStepStore"; | ||
import FormElement from "@/components/Form/FormElement.vue"; | ||
import FormDatatype from "@/components/Workflow/Editor/Forms/FormDatatype.vue"; | ||
defineProps<{ | ||
step: Step; | ||
datatypes: DatatypesMapperModel["datatypes"]; | ||
}>(); | ||
const formats = ref<string[]>(); | ||
const tags = ref<string>(""); | ||
const optional = ref<boolean>(false); | ||
function onDatatype(newDatatype: string[]) { | ||
formats.value = newDatatype; | ||
console.log(formats.value); | ||
} | ||
function onTags(newTags: string) { | ||
tags.value = newTags; | ||
} | ||
function onOptional(newOptional: boolean) { | ||
optional.value = newOptional; | ||
} | ||
</script> | ||
|
||
<template> | ||
<div> | ||
<div id="form-element-collection_type" class="ui-form-element section-row"> | ||
<div class="ui-form-title"> | ||
<span class="ui-form-title-text"><label for="collection_type">Collection type</label></span> | ||
<span class="ui-form-title-message">- optional</span> | ||
</div> | ||
<div data-label="Collection type" class="ui-form-field"> | ||
<div class="row align-items-center"> | ||
<div class="col"> | ||
<input | ||
id="collection_type" | ||
type="text" | ||
placeholder="" | ||
list="collection_type-datalist" | ||
class="form-control ui-input" /> | ||
<datalist id="collection_type-datalist"> | ||
<option label="List of Datasets" value="list"></option> | ||
<option label="Dataset Pair" value="paired"></option> | ||
<option label="List of Dataset Pairs" value="list:paired"></option> | ||
</datalist> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<FormElement :id="optional" :value="optional" title="Optional" type="boolean" @input="onOptional" /> | ||
<FormDatatype | ||
:id="todo" | ||
:value="formats" | ||
:datatypes="datatypes" | ||
title="Format(s)" | ||
:multiple="true" | ||
help="Leave empty to auto-generate filtered list at runtime based on connections." | ||
@onChange="onDatatype" /> | ||
<FormElement | ||
:id="tag" | ||
:value="tags" | ||
title="Tag filter" | ||
:optional="true" | ||
type="text" | ||
help="Tags to automatically filter inputs" | ||
@input="onTags" /> | ||
</div> | ||
</template> | ||
|
||
<style lang="scss" scoped> | ||
@import "../../../Form/_form-elements.scss"; | ||
</style> |