Loading client/src/components/Form/Elements/FormData/FormData.test.js +2 −14 Original line number Diff line number Diff line Loading @@ -97,18 +97,6 @@ describe("FormData", () => { expect(wrapper.find(SELECTED_VALUE).text()).toContain("4: hdaName4"); }); it("regular data no batch input", async () => { const wrapper = createTarget({ value: null, options: defaultOptions, disableBatchInput: true, }); const options = wrapper.find(".btn-group").findAll("button"); expect(options.length).toBe(2); expect(options.at(0).classes()).toContain("active"); expect(options.at(0).attributes("title")).toBe("Single dataset"); }); it("optional dataset", async () => { const wrapper = createTarget({ value: null, Loading Loading @@ -136,7 +124,7 @@ describe("FormData", () => { const options = wrapper.find(".btn-group").findAll("button"); expect(options.length).toBe(3); expect(options.at(0).classes()).toContain("active"); expect(options.at(0).attributes("title")).toBe("Dataset(s)"); expect(options.at(0).attributes("title")).toBe("Multiple datasets"); expect(wrapper.emitted().input[0][0]).toEqual({ batch: false, product: false, Loading Loading @@ -517,7 +505,7 @@ describe("FormData", () => { const selectedValues = wrapper.findAll(SELECTED_VALUE); expect(selectedValues.length).toBe(1); expect(selectedValues.at(0).text()).toBe("5: hdcaName5"); await wrapper.find("[title='Dataset(s)'").trigger("click"); await wrapper.find("[title='Multiple datasets'").trigger("click"); expect(options.at(0).classes()).toContain("active"); expect(wrapper.emitted().input[2][0]).toEqual(null); }); Loading client/src/components/Form/Elements/FormData/FormData.vue +0 −53 Original line number Diff line number Diff line Loading @@ -58,7 +58,6 @@ const props = withDefaults( collectionTypes?: Array<CollectionType>; flavor?: string; tag?: string; disableBatchInput?: boolean; userDefinedTitle?: string; workflowRun?: boolean; extendedCollectionType?: ExtendedCollectionType; Loading @@ -73,7 +72,6 @@ const props = withDefaults( collectionTypes: () => [], flavor: undefined, tag: undefined, disableBatchInput: false, userDefinedTitle: undefined, extendedCollectionType: () => ({}) as ExtendedCollectionType, }, Loading Loading @@ -257,11 +255,6 @@ const variant = computed(() => { const flavorKey = props.flavor ? `${props.flavor}_` : ""; const multipleKey = props.multiple ? `_multiple` : ""; const variantKey = `${flavorKey}${props.type}${multipleKey}`; if (props.disableBatchInput && VARIANTS[variantKey]) { return VARIANTS[variantKey]!.filter((v) => { return v.batch === BATCH.DISABLED; }); } return VARIANTS[variantKey]; }); Loading Loading @@ -832,51 +825,6 @@ const noOptionsWarningMessage = computed(() => { @dragleave.prevent="onDragLeave" @dragover.prevent @drop.prevent="onDrop"> <!--<<<<<<< HEAD <div class="d-flex flex-column"> <BButtonGroup v-if="variant && variant.length > 0" buttons class="align-self-start"> <BButton v-for="(v, index) in variant" :key="index" v-b-tooltip.hover.bottom :pressed="currentField === index" :title="v.tooltip" @click="currentField = index"> <FontAwesomeIcon :icon="['far', v.icon]" /> </BButton> <BButton v-if="canBrowse" v-b-tooltip.hover.bottom title="Browse or Upload Datasets" @click="onBrowse"> <FontAwesomeIcon v-if="loading" :icon="faSpinner" spin /> <span v-else class="font-weight-bold">...</span> </BButton> <BButtonGroup v-if="effectiveCollectionTypes?.length > 0" size="sm" buttons> <BButton v-for="collectionType in effectiveCollectionTypes" :key="collectionType" v-b-tooltip.hover.bottom :title="`Create a new ${COLLECTION_TYPE_TO_LABEL[collectionType]}`" :variant="formattedOptions.length === 0 ? 'warning' : 'secondary'" @click="buildNewCollection(collectionType)"> <FontAwesomeIcon :icon="faPlus" fixed-width /> </BButton> </BButtonGroup> </BButtonGroup> <div v-if="restrictsExtensions"> <BButton :id="formatsButtonId" class="ui-link" @click="formatsVisible = !formatsVisible"> accepted formats <FontAwesomeIcon v-if="formatsVisible" :icon="faCaretUp" /> <FontAwesomeIcon v-else :icon="faCaretDown" /> </BButton> <BCollapse v-model="formatsVisible"> <ul class="pl-3 m-0"> <li v-for="extension in extensions" :key="extension">{{ extension }}</li> </ul> </BCollapse> <BTooltip :target="formatsButtonId" noninteractive placement="bottom" triggers="hover"> <div class="form-data-extensions-tooltip"> <span v-for="extension in extensions" :key="extension">{{ extension }}</span> </div> </BTooltip> =======--> <div class="d-flex flex-gapx-1"> <div class="d-flex flex-column"> <FormDataContextButtons Loading Loading @@ -979,7 +927,6 @@ const noOptionsWarningMessage = computed(() => { This is a batch mode input field. Individual jobs will be triggered for each dataset. </span> </div> <!-->>>>>>> upstream--> </div> </div> Loading client/src/components/Form/FormElement.vue +0 −26 Original line number Diff line number Diff line Loading @@ -7,7 +7,6 @@ import { sanitize } from "dompurify"; import type { ComputedRef } from "vue"; import { computed, ref, useAttrs } from "vue"; import { getGalaxyInstance } from "@/app"; import { linkify } from "@/utils/utils"; import { type ExtendedCollectionType, isDataUri } from "./Elements/FormData/types"; Loading Loading @@ -127,8 +126,6 @@ const collapsed = ref(false); const collapsible = computed(() => !props.disabled && collapsibleValue.value !== undefined); const connectable = computed(() => collapsible.value && Boolean(attrs.value["connectable"])); const disableBatchInput = computed(() => getGalaxyInstance().config.disable_batch_input); // Determines whether to expand or collapse the input { const valueJson = JSON.stringify(props.value); Loading Loading @@ -350,9 +347,6 @@ const extendedCollectionType = computed<ExtendedCollectionType>(() => { v-if="props.workflowRun" :id="props.id" :type="props.type" :collection-types="attrs.collection_types" :disable-batch-input="disableBatchInput" @alert="onAlert" :has-alert="hasAlert" :is-empty="isEmpty" :is-optional="isOptional" Loading @@ -364,26 +358,6 @@ const extendedCollectionType = computed<ExtendedCollectionType>(() => { <slot name="workflow-run-form-title-items" /> </template> </FormElementHeader> <FormDrilldown v-else-if="props.type === 'drill_down'" :id="id" v-model="currentValue" :options="attrs.options" :multiple="attrs.multiple" /> <FormDataDialog v-else-if="props.type === 'data_dialog'" :id="id" v-model="currentValue" :multiple="attrs.multiple === 'true'" /> <FormColor v-else-if="props.type === 'color'" :id="props.id" v-model="currentValue" /> <FormDirectory v-else-if="props.type === 'directory_uri'" v-model="currentValue" /> <FormUpload v-else-if="props.type === 'upload'" v-model="currentValue" /> <FormRulesEdit v-else-if="props.type == 'rules'" v-model="currentValue" :target="attrs.target" /> <FormTags v-else-if="props.type === 'tags'" v-model="currentValue" :placeholder="props.attributes?.placeholder" /> <FormInput v-else :id="props.id" v-model="currentValue" :area="attrs['area']" /> </div> <div v-if="rendersContent" :class="{ 'form-element-content px-3 py-1 mb-2': props.workflowRun }"> Loading Loading
client/src/components/Form/Elements/FormData/FormData.test.js +2 −14 Original line number Diff line number Diff line Loading @@ -97,18 +97,6 @@ describe("FormData", () => { expect(wrapper.find(SELECTED_VALUE).text()).toContain("4: hdaName4"); }); it("regular data no batch input", async () => { const wrapper = createTarget({ value: null, options: defaultOptions, disableBatchInput: true, }); const options = wrapper.find(".btn-group").findAll("button"); expect(options.length).toBe(2); expect(options.at(0).classes()).toContain("active"); expect(options.at(0).attributes("title")).toBe("Single dataset"); }); it("optional dataset", async () => { const wrapper = createTarget({ value: null, Loading Loading @@ -136,7 +124,7 @@ describe("FormData", () => { const options = wrapper.find(".btn-group").findAll("button"); expect(options.length).toBe(3); expect(options.at(0).classes()).toContain("active"); expect(options.at(0).attributes("title")).toBe("Dataset(s)"); expect(options.at(0).attributes("title")).toBe("Multiple datasets"); expect(wrapper.emitted().input[0][0]).toEqual({ batch: false, product: false, Loading Loading @@ -517,7 +505,7 @@ describe("FormData", () => { const selectedValues = wrapper.findAll(SELECTED_VALUE); expect(selectedValues.length).toBe(1); expect(selectedValues.at(0).text()).toBe("5: hdcaName5"); await wrapper.find("[title='Dataset(s)'").trigger("click"); await wrapper.find("[title='Multiple datasets'").trigger("click"); expect(options.at(0).classes()).toContain("active"); expect(wrapper.emitted().input[2][0]).toEqual(null); }); Loading
client/src/components/Form/Elements/FormData/FormData.vue +0 −53 Original line number Diff line number Diff line Loading @@ -58,7 +58,6 @@ const props = withDefaults( collectionTypes?: Array<CollectionType>; flavor?: string; tag?: string; disableBatchInput?: boolean; userDefinedTitle?: string; workflowRun?: boolean; extendedCollectionType?: ExtendedCollectionType; Loading @@ -73,7 +72,6 @@ const props = withDefaults( collectionTypes: () => [], flavor: undefined, tag: undefined, disableBatchInput: false, userDefinedTitle: undefined, extendedCollectionType: () => ({}) as ExtendedCollectionType, }, Loading Loading @@ -257,11 +255,6 @@ const variant = computed(() => { const flavorKey = props.flavor ? `${props.flavor}_` : ""; const multipleKey = props.multiple ? `_multiple` : ""; const variantKey = `${flavorKey}${props.type}${multipleKey}`; if (props.disableBatchInput && VARIANTS[variantKey]) { return VARIANTS[variantKey]!.filter((v) => { return v.batch === BATCH.DISABLED; }); } return VARIANTS[variantKey]; }); Loading Loading @@ -832,51 +825,6 @@ const noOptionsWarningMessage = computed(() => { @dragleave.prevent="onDragLeave" @dragover.prevent @drop.prevent="onDrop"> <!--<<<<<<< HEAD <div class="d-flex flex-column"> <BButtonGroup v-if="variant && variant.length > 0" buttons class="align-self-start"> <BButton v-for="(v, index) in variant" :key="index" v-b-tooltip.hover.bottom :pressed="currentField === index" :title="v.tooltip" @click="currentField = index"> <FontAwesomeIcon :icon="['far', v.icon]" /> </BButton> <BButton v-if="canBrowse" v-b-tooltip.hover.bottom title="Browse or Upload Datasets" @click="onBrowse"> <FontAwesomeIcon v-if="loading" :icon="faSpinner" spin /> <span v-else class="font-weight-bold">...</span> </BButton> <BButtonGroup v-if="effectiveCollectionTypes?.length > 0" size="sm" buttons> <BButton v-for="collectionType in effectiveCollectionTypes" :key="collectionType" v-b-tooltip.hover.bottom :title="`Create a new ${COLLECTION_TYPE_TO_LABEL[collectionType]}`" :variant="formattedOptions.length === 0 ? 'warning' : 'secondary'" @click="buildNewCollection(collectionType)"> <FontAwesomeIcon :icon="faPlus" fixed-width /> </BButton> </BButtonGroup> </BButtonGroup> <div v-if="restrictsExtensions"> <BButton :id="formatsButtonId" class="ui-link" @click="formatsVisible = !formatsVisible"> accepted formats <FontAwesomeIcon v-if="formatsVisible" :icon="faCaretUp" /> <FontAwesomeIcon v-else :icon="faCaretDown" /> </BButton> <BCollapse v-model="formatsVisible"> <ul class="pl-3 m-0"> <li v-for="extension in extensions" :key="extension">{{ extension }}</li> </ul> </BCollapse> <BTooltip :target="formatsButtonId" noninteractive placement="bottom" triggers="hover"> <div class="form-data-extensions-tooltip"> <span v-for="extension in extensions" :key="extension">{{ extension }}</span> </div> </BTooltip> =======--> <div class="d-flex flex-gapx-1"> <div class="d-flex flex-column"> <FormDataContextButtons Loading Loading @@ -979,7 +927,6 @@ const noOptionsWarningMessage = computed(() => { This is a batch mode input field. Individual jobs will be triggered for each dataset. </span> </div> <!-->>>>>>> upstream--> </div> </div> Loading
client/src/components/Form/FormElement.vue +0 −26 Original line number Diff line number Diff line Loading @@ -7,7 +7,6 @@ import { sanitize } from "dompurify"; import type { ComputedRef } from "vue"; import { computed, ref, useAttrs } from "vue"; import { getGalaxyInstance } from "@/app"; import { linkify } from "@/utils/utils"; import { type ExtendedCollectionType, isDataUri } from "./Elements/FormData/types"; Loading Loading @@ -127,8 +126,6 @@ const collapsed = ref(false); const collapsible = computed(() => !props.disabled && collapsibleValue.value !== undefined); const connectable = computed(() => collapsible.value && Boolean(attrs.value["connectable"])); const disableBatchInput = computed(() => getGalaxyInstance().config.disable_batch_input); // Determines whether to expand or collapse the input { const valueJson = JSON.stringify(props.value); Loading Loading @@ -350,9 +347,6 @@ const extendedCollectionType = computed<ExtendedCollectionType>(() => { v-if="props.workflowRun" :id="props.id" :type="props.type" :collection-types="attrs.collection_types" :disable-batch-input="disableBatchInput" @alert="onAlert" :has-alert="hasAlert" :is-empty="isEmpty" :is-optional="isOptional" Loading @@ -364,26 +358,6 @@ const extendedCollectionType = computed<ExtendedCollectionType>(() => { <slot name="workflow-run-form-title-items" /> </template> </FormElementHeader> <FormDrilldown v-else-if="props.type === 'drill_down'" :id="id" v-model="currentValue" :options="attrs.options" :multiple="attrs.multiple" /> <FormDataDialog v-else-if="props.type === 'data_dialog'" :id="id" v-model="currentValue" :multiple="attrs.multiple === 'true'" /> <FormColor v-else-if="props.type === 'color'" :id="props.id" v-model="currentValue" /> <FormDirectory v-else-if="props.type === 'directory_uri'" v-model="currentValue" /> <FormUpload v-else-if="props.type === 'upload'" v-model="currentValue" /> <FormRulesEdit v-else-if="props.type == 'rules'" v-model="currentValue" :target="attrs.target" /> <FormTags v-else-if="props.type === 'tags'" v-model="currentValue" :placeholder="props.attributes?.placeholder" /> <FormInput v-else :id="props.id" v-model="currentValue" :area="attrs['area']" /> </div> <div v-if="rendersContent" :class="{ 'form-element-content px-3 py-1 mb-2': props.workflowRun }"> Loading