sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
1684bc4822874a6b999fed39f87caa800fcf0dcf641842440a83d6126214bf55 | TypeScript | 1,478 | 51 | import { describe, expect, it } from "vitest";
import { useServerMock } from "@/api/client/__mocks__";
import { loadWorkflows } from "./workflows";
const { server, http } = useServerMock();
const DEFAULT_OPTIONS = {
sortBy: "update_time",
sortDesc: true,
limit: 20,
offset: 0,
filterText: "",
... |
38fb7d9346069594cbbe739449cf893ced885f4d136b5723dc5cb441a43ab1ad | TypeScript | 1,480 | 54 | import { fetchApi, fetchApiVoid } from "./client";
import { Project, ProjectSchema, ProjectInputs } from "./schemas";
export async function createProject(
organizationId: string,
project: { name: string; description: string },
): Promise<Project> {
return await fetchApi("/projects", ProjectSchema, {
... |
5e082517d39760186cbec4eab06c74cbac7a057fd0c2cd60f476baf7acdee926 | TypeScript | 1,482 | 39 | import { getLocalVue } from "@tests/vitest/helpers";
import { mount } from "@vue/test-utils";
import flushPromises from "flush-promises";
import { describe, expect, it } from "vitest";
import { useServerMock } from "@/api/client/__mocks__";
import JobLock from "./JobLock.vue";
const { server, http } = useServerMock(... |
51aa3f8a5d81b83cd4e76a0ef00dc8fa02dd223b8942dd33c39cf44ea265c0a0 | TypeScript | 1,492 | 52 | import type { components } from "@/api/schema";
import { rethrowSimple } from "@/utils/simple-error";
import { GalaxyApi } from "./client";
export type CuratedWorkflow = components["schemas"]["CuratedWorkflow"];
export type CuratedWorkflowCollection = components["schemas"]["CuratedWorkflowCollection"];
export type Cu... |
f9f068dbf8522d352a6ae8378866692bb54566834a02e302c812dc8c43971f15 | TypeScript | 1,492 | 41 | import { getLocalVue } from "@tests/vitest/helpers";
import { mount } from "@vue/test-utils";
import { describe, expect, it } from "vitest";
import JobsTable from "./JobsTable.vue";
const fields = [
{ key: "id", label: "Job ID" },
{ key: "update_time", label: "Last Update", sortable: true },
];
// Oldest fir... |
4ee3c95a3c607f57321b8551220e4acb6e2a3b3c246db2b27c3d6230a5c3daf6 | TypeScript | 1,498 | 38 | import { getLocalVue } from "@tests/vitest/helpers";
import { mount } from "@vue/test-utils";
import { describe, expect, it } from "vitest";
import FormDataContextButtons from "./FormDataContextButtons.vue";
const localVue = getLocalVue();
function mountForCollectionTypes(collectionTypes: string[]) {
return moun... |
24170f002751a6bc6a2fa46127809165c1990824abede7c8d219e6f5d0b7b0ef | TypeScript | 1,503 | 57 | import { useAnimationFrame } from "./sensors/animationFrame";
export function useAnimationFrameThrottle(animationFramePriority = 0) {
let lastCallback: (() => void) | null = null;
const throttle = (callback: () => void) => {
lastCallback = callback;
};
useAnimationFrame(() => {
if (la... |
b0c2b331fb01fff078c2ee17d7037eb17313ee33bc83f574d58dffbeb9a8abdd | TypeScript | 1,505 | 37 | import { useEventListener, useMutationObserver, usePreferredReducedMotion, useResizeObserver } from "@vueuse/core";
import { type Ref, ref } from "vue";
/** Sub-pixel scroll offsets still count as flush with the edge */
const EDGE_TOLERANCE = 1;
/**
* Tracks which ends of a horizontally scrolling row hide content, s... |
83d17ffbb73327844f5642b1b29ca0a31b5b1585219f3550447129e4009fe0fa | TypeScript | 1,507 | 50 | import { defineStore } from "pinia";
import { type components, GalaxyApi } from "@/api";
import { errorMessageAsString } from "@/utils/simple-error";
type UserFileSourceModel = components["schemas"]["UserFileSourceModel"];
export const useFileSourceInstancesStore = defineStore("fileSourceInstances", {
state: () ... |
118703d13df447c30b34913d7d47165f7db27105a1dd6acf9c574426c23e0b3a | TypeScript | 1,508 | 43 | import { getLocalVue } from "@tests/vitest/helpers";
import { mount } from "@vue/test-utils";
import flushPromises from "flush-promises";
import { createPinia, setActivePinia } from "pinia";
import { describe, expect, it, vi } from "vitest";
import { sanitizeHtml } from "@/directives/sanitizeHtml";
import RoCrateZipV... |
68b8db2062a4a199b99110ea0672d177617f37f19e08c9c32ec5939fe05b0700 | TypeScript | 1,512 | 39 | import { createPinia, setActivePinia } from "pinia";
import { beforeEach, describe, expect, it } from "vitest";
import type { PasteContentItem, PasteUrlItem } from "@/components/Panels/Upload/types/uploadItem";
import { useHasStagedUploads } from "@/composables/upload/useUploadStaging";
import { useUploadStagingStore ... |
89aef243c686caf3f6e7cd66a7e7b62968ca10c7dec01a65be54ed4696e7b7a1 | TypeScript | 1,524 | 42 | /**
* Composable for managing upload default values and configurations.
* Centralizes fetching of upload configurations and provides helpers for creating items with defaults.
*/
import { computed } from "vue";
import type { BaseUploadItem } from "@/components/Panels/Upload/types/uploadItem";
import { uploadOptionD... |
ce374ae310ef77972c6f11bb07bcc6374005b6c9be2fccb04c8cff0bb421274a | TypeScript | 1,530 | 38 | import * as Sentry from "@sentry/vue";
import type { JobResponse, SubmitToolJobParams } from "@/api/jobs";
import { useConfigStore } from "@/stores/configurationStore";
import { submitToolJob as submitAsync } from "./submitAsync";
import { submitToolJob as submitLegacy } from "./submitLegacy";
export async function ... |
581170b7f2d2dfee4c8e0d95b6ab863981fbbde909ecd001ba5b4300a58edf13 | TypeScript | 1,534 | 46 | import { getLocalVue } from "@tests/vitest/helpers";
import { mount } from "@vue/test-utils";
import { beforeEach, describe, expect, it, vi } from "vitest";
import { filesDialog } from "@/utils/dataModals";
import FilesInput from "./FilesInput.vue";
vi.mock("@/utils/dataModals", () => ({
filesDialog: vi.fn(),
})... |
f1751fbf5095c73822f845361a29c971e5e651508eab5fd7d9ea4c43689a002e | TypeScript | 1,535 | 41 | import type { ToastProps } from "@galaxyproject/galaxy-ui";
import { vi } from "vitest";
import { readonly, ref } from "vue";
// Opt in per file with `vi.mock("@/composables/toast")`; reset with `vi.clearAllMocks()`.
// `Toast` and `useToast()` are one object, as in production - separate spies would let an
// assertio... |
4ee2c7f4a45e440f4de3ca2d168f38f50f45318e186f6b38dcbbcf9f219d11e2 | TypeScript | 1,536 | 55 | import { fetchApi } from "./client";
import {
Experiment,
ExperimentInput,
ExperimentSchema,
ExperimentReport,
ExperimentReportSchema,
} from "./schemas";
import { DateRange } from "react-day-picker";
export async function createExperiment(
experiment: ExperimentInput,
): Promise<Experiment> {
... |
0ba7e5d33c4fdc932019be68bfcf799ff0126a73248b3404ff1f21062291a663 | TypeScript | 1,537 | 46 | import axios from "axios";
import { beforeEach, describe, expect, it, vi } from "vitest";
import { getHistoryList } from "./history.services";
vi.mock("axios", () => ({
default: {
get: vi.fn(),
},
}));
const mockedGet = vi.mocked(axios.get);
/** The url the last `axios.get` call was made with, parse... |
ad0e684580a3aef4f4fead6ccfb6c2d92553f89665d1608c06eeb9d2540463f8 | TypeScript | 1,540 | 50 | import { defineStore } from "pinia";
import { ref, watch } from "vue";
import type { TourDetails } from "@/api/tours";
import { useUserLocalStorage } from "@/composables/userLocalStorage";
export const useTourStore = defineStore("tourStore", () => {
/** Track what tour ID we are expecting, to prevent any unintend... |
f4b83fe2ee27ea7db59d8e6c038df2574f568c2dad0006b182f8747982d308dc | TypeScript | 1,543 | 40 | import { describe, expect, it } from "vitest";
import { getStateUpgradeMessages } from "./utilities";
describe("getStateUpgradeMessages", () => {
it("flattens nested subworkflow messages into their text", () => {
const [message] = getStateUpgradeMessages({
steps: { "1": { name: "Subworkflow", ... |
9fec6e1f89b53c9fb9d8b1ed57dab0025cdad53b3d1d37e8cc3a65197b911738 | TypeScript | 1,546 | 50 | import { defineStore } from "pinia";
import { type components, GalaxyApi } from "@/api";
import { errorMessageAsString } from "@/utils/simple-error";
type UserConcreteObjectStoreModel = components["schemas"]["UserConcreteObjectStoreModel"];
export const useObjectStoreInstancesStore = defineStore("objectStoreInstance... |
eb593fddf9d17f73d16e47b37d99e808a480c48383ac5b194edd102e93b98caa | TypeScript | 1,549 | 42 | import axios from "axios";
import type { WorkflowSummary } from "@/api/workflows";
import { useUserStore } from "@/stores/userStore";
import { withPrefix } from "@/utils/redirect";
export async function updateWorkflow(id: string, changes: object): Promise<WorkflowSummary> {
const { data } = await axios.put(withPr... |
f4e85e23af41e78837905bda713ebd3a1d731321be9ba25a957d5c1449d87f1c | TypeScript | 1,554 | 49 | /**
* There are similar functions to those in this module in vue-use, but they only work one-way.
* Unlike vue-use, these composables return refs which can be set.
*/
import { type MaybeRefOrGetter, toValue } from "@vueuse/core";
import { computed, type Ref } from "vue";
/**
* Wraps a number ref, restricting it's... |
2a82d6bf7a341bc3cb85a949757a2734e4f8dacc6f067d9e28cdb264378d1277 | TypeScript | 1,558 | 50 | import { computed, inject, type Ref, unref } from "vue";
import { useWorkflowStores } from "@/composables/workflowStores";
import { DeleteSelectionAction, DuplicateSelectionAction } from "../Actions/workflowActions";
import { useMultiSelect } from "../composables/multiSelect";
export function useSelectionOperations(... |
d7ddcdba1a8bb5658d36c7b4a2175cb50fd28f2d3c1d2b2aa89ee2e973bdea72 | TypeScript | 1,558 | 48 | import { describe, expect, it } from "vitest";
import { nextTick, ref } from "vue";
import { useUploadTableSorting } from "./uploadTableSorting";
interface Item {
name: string;
size?: number;
content?: string;
}
function names(items: Item[]): string[] {
return items.map((item) => item.name);
}
descr... |
1f3e6e7c80790b6ea8772782e2c4ca415482b65d2bad83ce612f88b4b176ee59 | TypeScript | 1,563 | 40 | import { setupMockConfig } from "@tests/vitest/mockConfig";
import { describe, expect, it } from "vitest";
import { useRegistrationTarget } from "./useRegistrationTarget";
const OKTA = { end_user_registration_endpoint: "https://okta.example.org/register" };
const KEYCLOAK = { end_user_registration_endpoint: "https://... |
b0b1dbc32c1685af691b00f32b5dfd4c71ed01f4fdd894b2a07f0ba23977c159 | TypeScript | 1,563 | 48 | import { type Ref, ref, watch } from "vue";
import { GalaxyApi } from "@/api";
import type { components } from "@/api/schema";
type ExecutionJob = components["schemas"]["ToolRequestJobReference"];
/**
* Loads the jobs produced by a single tool execution (tool_request).
* Refetches when the input id changes. Race-s... |
a5de57e94cfe58a6e4dfc74f9a4b0d7c42af14b878bde1e112c62eddaf3097f7 | TypeScript | 1,567 | 36 | import { describe, expect, it } from "vitest";
import { isActivityAvailable } from "./activitySetup";
const OPEN = {
canUseUnprivilegedTools: true,
config: { interactivetools_enable: true, llm_api_configured: true },
};
describe("isActivityAvailable", () => {
it("offers an ungated activity whatever the g... |
ee56a9540916ad102b7ffff3d4e6e00e6ce397701196915df1cb17e644cbfb88 | TypeScript | 1,568 | 40 | import { toRefs } from "@vueuse/core";
import { computed, type Ref } from "vue";
import type { Step } from "@/stores/workflowStepStore";
export function useToolState(step: Ref<Step>) {
const { tool_state: rawToolStateRef } = toRefs(step);
const toolState = computed(() => {
const rawToolState: Record<... |
3dff685fc41ac312fb0d9daae23c9fe8b1d9c0198928a81f0ba519345482763e | TypeScript | 1,570 | 41 | import { getLocalVue } from "@tests/vitest/helpers";
import { shallowMount } from "@vue/test-utils";
import { describe, expect, it } from "vitest";
import InstanceDropdown from "./InstanceDropdown.vue";
const localVue = getLocalVue(true);
describe("InstanceDropdown", () => {
it("should render a drop down without... |
d62b04c6091c039601b95b8af60035320b2c7a102dbba69bd5b4b3dcebddae9d | TypeScript | 1,570 | 45 | import { getLocalVue } from "@tests/vitest/helpers";
import { mount } from "@vue/test-utils";
import { afterEach, describe, expect, it } from "vitest";
import { defineComponent } from "vue";
import type ConfirmDialogComponent from "@/components/ConfirmDialog.vue";
import { type ConfirmDialogOptions, setConfirmDialogC... |
264b391193b54375a458ac29dce876ae2b760955d163e18141371d3e58b301e2 | TypeScript | 1,571 | 67 | import type { FileStream, UploadableFile } from "@/utils/tusUpload";
export type { FileStream, UploadableFile };
export interface UploadFile {
mode: string | null;
name: string | null;
size: number | null;
uri?: string | null;
path?: string | null;
label?: string | null;
url?: string | nul... |
404d7d9802051d64e7e66206f573a4b922edaf386f91102642225dd089386b8f | TypeScript | 1,574 | 45 | import { createTestingPinia } from "@pinia/testing";
import { getLocalVue } from "@tests/vitest/helpers";
import { shallowMount } from "@vue/test-utils";
import flushPromises from "flush-promises";
import { expect, it, vi } from "vitest";
import { ref } from "vue";
import WorkflowInvocationFeedback from "./WorkflowInv... |
c112e57de10460f0c9280e027d0b1221b9fbc0f154a1456c879d312f5e53dcd8 | TypeScript | 1,575 | 41 | import { getLocalVue } from "@tests/vitest/helpers";
import { mount } from "@vue/test-utils";
import { beforeEach, describe, expect, it, vi } from "vitest";
import { sanitizeHtml } from "@/directives/sanitizeHtml";
import WorkflowHelpDisplay from "./WorkflowHelpDisplay.vue";
const localVue = getLocalVue();
describe... |
ec81f9a72748a732372a2dc641f7408ea77535978634bba7d439f71fb0f50b2a | TypeScript | 1,576 | 48 | import { defineStore } from "pinia";
import { computed, ref } from "vue";
import { type components, GalaxyApi } from "@/api";
import { errorMessageAsString } from "@/utils/simple-error";
export type AdminExtension = components["schemas"]["AdminExtension"];
export type AdminExtensionItem = AdminExtension["items"][numb... |
957a5cad006ab790ffd7b2ee9b4ea748efc782744b2d9afafbcf515abdaf2c5c | TypeScript | 1,582 | 46 | /** Terms to identify summary sections in the help text */
const SUMMARY_HEADER_TERMS = ["what it does", "synopsis", "syntax", "purpose", "what this tool does"];
/** Given the help text, extracts and returns a summary by detecting relevant HTML elements
* that could contain a short description of the tool.
*/
export... |
445372ab5ac4cd3c24f7d41a065836f0063ec83dd30a28d806bf11ad0cae0b86 | TypeScript | 1,606 | 42 | import { describe, expect, it } from "vitest";
import { looseEqual } from "./looseEqual";
describe("looseEqual", () => {
it("matches a number and its string form", () => {
expect(looseEqual(2, "2")).toBe(true);
expect(looseEqual("2", 2)).toBe(true);
expect(looseEqual(2, "02")).toBe(false);... |
6fefa4c0c6f712884d57f1b34b1cdb66474aa6c697de1680a542738a2bd75109 | TypeScript | 1,606 | 46 | import { faInfoCircle } from "@fortawesome/free-solid-svg-icons";
import { getLocalVue } from "@tests/vitest/helpers";
import { mount } from "@vue/test-utils";
import { describe, expect, it } from "vitest";
import DetailBlock from "./DetailBlock.vue";
const localVue = getLocalVue();
function mountDetailBlock(props: ... |
fe36ec3d0f72771448fae12f4455a9608d50a338af91bb0a0fab70df1c22f138 | TypeScript | 1,619 | 33 | import { createPinia, setActivePinia } from "pinia";
import { beforeEach, describe, expect, it } from "vitest";
import { type InputCatcherEvent, useWorkflowEditorToolbarStore } from "./workflowEditorToolbarStore";
describe("workflowEditorToolbarStore", () => {
beforeEach(() => {
setActivePinia(createPinia... |
6dd8a62711403acfc95c33ce843884ea6aabecae8777f977c9be3ded11d7b3c6 | TypeScript | 1,623 | 36 | import { faSitemap } from "@fortawesome/free-solid-svg-icons";
import { useWorkflowStore } from "@/stores/workflowStore";
import { PALETTE_LIMITS } from "./limits";
import { defineListingProvider } from "./listingProvider";
import { storeFirstItems } from "./storeFirst";
import { itemId, runUrl, WORKFLOW_RECENT_TYPE,... |
67e2bb852dccb8cc0173d68fd143942e0c70c93a91d9b74331f8f909334461fc | TypeScript | 1,626 | 54 | /**
* Can be used to store data on events for access across components
* e.g. to provide early drag event data transfer access.
*/
import { defineStore } from "pinia";
import { computed, type Ref, ref } from "vue";
export type EventData = { [key: string]: unknown };
export const useEventStore = defineStore("event... |
35d3a4ff2fa61f99d0c3f8b14bf83fa87420d48ccb23c5be1504fb0720e4e9c9 | TypeScript | 1,628 | 57 | import { type components, GalaxyApi } from "@/api";
import { rethrowSimple } from "@/utils/simple-error";
export type UserConcreteObjectStore = components["schemas"]["UserConcreteObjectStoreModel"];
export type ObjectStoreTemplateType = components["schemas"]["UserConcreteObjectStoreModel"]["type"];
export async func... |
03660c8cee668a01c6939d025a91456090bf8dd1ec15d2da5aef03dd6248927d | TypeScript | 1,630 | 59 | /**
* Converts an array of strings to a list, ending with "or"
*
* @example
* // returns the string "a, b or c"
* orList(["a", "b", "c"]);
* @param items array of strings to join
* @returns human readable comma + or separated list
*/
export function orList(items: string[]): string {
if (items.length === 0) ... |
8840df031669dfbc92093b3a152d4ae93dc598bfa503a077e0e0f0858456bb1c | TypeScript | 1,630 | 40 | import { computed, type Ref, ref, watch } from "vue";
import { useToolStore } from "@/stores/toolStore";
import { errorMessageAsString } from "@/utils/simple-error";
/** Resolves whether the tool that ran a job can be rerun (`is_workflow_compatible`), fetching the
* tool if it isn't cached yet. A failed fetch (e.g. ... |
079553244ec6f5430e41e480ebb0e16d7ed30999fbb0f5e72a50f5a7887c91be | TypeScript | 1,632 | 56 | /**
* Composable for managing collection creation state and configuration.
* Handles collection state initialization, updates, and building collection config for upload queue.
*/
import { type Ref, ref } from "vue";
import type { CollectionCreationState, UploadCollectionConfig } from "./collectionTypes";
export f... |
ef022a088cde838600f705410a8a07843555a74b38f067fa3abcce615279851b | TypeScript | 1,635 | 54 | import { defineStore } from "pinia";
import { computed, ref } from "vue";
import { GalaxyApi } from "@/api";
import { errorMessageAsString } from "@/utils/simple-error";
// Temporary set to any until schema model is defined
export type GalaxyConfiguration = any;
export const useConfigStore = defineStore("configurati... |
427900a9f8fe1b0a7087f63e1cd809b18fc267a0d27654ac826d2f42298ad358 | TypeScript | 1,640 | 41 | import { mount } from "@vue/test-utils";
import { describe, expect, it } from "vitest";
import ClarificationCard from "./ClarificationCard.vue";
function mountCard(props: Record<string, unknown> = {}) {
return mount(ClarificationCard as any, {
propsData: {
question: "Do you want a tool recomme... |
7cedec0cbdc1132f134279062a6870b22b6d31425a1741f64ab92c7ddacaef18 | TypeScript | 1,646 | 39 | import { faCopy } from "@fortawesome/free-regular-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
import { mount } from "@vue/test-utils";
import { describe, expect, it, vi } from "vitest";
import { h, nextTick, ref } from "vue";
describe("FontAwesomeIcon under the compat config", () => {
... |
2d03483db7f15da6aa47b67c0f0dbe090448d696a6566f8b2c36b0c84d0bd40d | TypeScript | 1,653 | 47 | import { getLocalVue } from "@tests/vitest/helpers";
import { mount } from "@vue/test-utils";
import { beforeEach, describe, expect, it, vi } from "vitest";
import { copy } from "@/utils/clipboard";
import WorkflowIndicators from "./WorkflowIndicators.vue";
vi.mock("@/utils/clipboard", () => ({
copy: vi.fn(),
})... |
1b9438b1f53af7b51df750793777a66f2c50b815c5bdce0ef61ab18ebbfa0d34 | TypeScript | 1,656 | 59 | /**
* Collection creation related types and interfaces.
* Co-located with collection creation logic for better cohesion.
*/
/**
* Supported collection types in Galaxy
*/
export type SupportedCollectionType = "list" | "list:paired";
/**
* Collection creation input from UI components
*/
export interface Collecti... |
ec4c4642195f69b4047bf72aed375cf901a6827206e7fbb45d9dedf8a1d5a054 | TypeScript | 1,656 | 21 | export const MESSAGES = {
restricted:
"This dataset is stored on storage restricted to a single user. It can not be shared, published, or added to Galaxy data libraries.",
user_defined: "This storage was user defined and is not managed by the Galaxy administrator.",
quota: "A Galaxy quota is enabled... |
73e2c04e99cc4844120013766576fb877d57ab5ffcb3f86e51eb845ffe28d6f9 | TypeScript | 1,657 | 39 | import { mount } from "@vue/test-utils";
import { describe, expect, test } from "vitest";
import { defineComponent, type PropType } from "vue";
import { sanitizeHtml } from "@/directives/sanitizeHtml";
function mountWith(value: string | null) {
const Host = defineComponent({
props: { value: { type: String... |
2a5104f5495e46873f0f8180f9bde7e8f337df5c8b2af749755326ab3aa91db5 | TypeScript | 1,659 | 41 | import { getLocalVue } from "@tests/vitest/helpers";
import { mount } from "@vue/test-utils";
import { describe, expect, it, vi } from "vitest";
import CollectionOperations from "./CollectionOperations.vue";
vi.mock("vue-router", () => ({ useRoute: () => ({ fullPath: "/" }) }));
const localVue = getLocalVue();
func... |
8c2f3ed8b683b3b4bfddc69e8b86752eb657583b1cee40fb9a7bf3a6ea11045d | TypeScript | 1,672 | 55 | type OpenCCDict = OpenCCFileDict | OpenCCInlineDict | OpenCCGroupDict;
type OpenCCSegmentation = OpenCCMmsegSegmentation | OpenCCPluginSegmentation;
type OpenCCPluginSegmentation = {
type: string;
resources?: Record<string, string>;
[key: string]: string | Record<string, string> | undefined;
};
interface OpenCCC... |
4d85cdcb537d5d8d60ed31c5a051288a78cbfad43b6c37025dba3c4b55e50777 | TypeScript | 1,673 | 49 | import type { TableField } from "@/components/Common/GTable.types";
export interface TabularMetadata {
metadata_column_names?: Array<string>;
metadata_columns?: number;
metadata_delimiter?: string;
}
export function getFields(metaData: TabularMetadata): TableField[] {
const fields: TableField[] = [];
... |
ea4584282219873e91bc8dd6052172792d22624510d43b3749dd41802e225cd3 | TypeScript | 1,676 | 56 | import type { ComponentColor, ComponentSize } from "./componentVariants";
/** Map a bootstrap-vue BButton variant string to GButton color/outline/transparent attributes. */
export function variantToColor(variant: string | null | undefined): {
color?: ComponentColor;
outline?: boolean;
transparent?: boolean... |
138d4ceba05a1385ebb88aef7243c64f5ea7e2f22f49db242640727afc38d541 | TypeScript | 1,682 | 61 | import type { Last } from "types/utilityTypes";
export const zoomLevels = [
0.1, 0.2, 0.25, 0.33, 0.5, 0.67, 0.75, 0.8, 0.9, 1, 1.1, 1.25, 1.33, 1.5, 2, 2.5, 3, 4, 5,
] as const;
export type ZoomLevel = (typeof zoomLevels)[number];
export const minZoom = zoomLevels[0];
export const maxZoom = zoomLevels[zoomLevel... |
58dc1424708fb2d0a1cdddc5fa2a8dfd3aacdbc914205d94e2b61167f416d964 | TypeScript | 1,689 | 57 | import { afterEach, describe, expect, it } from "vitest";
import { closeEscapeLayer, type EscapeLayer, isTopEscapeLayer, openEscapeLayer } from "./escapeStack";
let firstCanHandle = true;
let secondCanHandle = true;
const first: EscapeLayer = { canHandle: () => firstCanHandle };
const second: EscapeLayer = { canHandl... |
e30385f31ba77eee3e080e108e28d7039c4997b8d04448f9d4a9719d95ed9c66 | TypeScript | 1,691 | 48 | import { computed, type Ref } from "vue";
import { useWorkflowStores } from "@/composables/workflowStores";
import type { Step } from "@/stores/workflowStepStore";
import { ensureDefined } from "@/utils/assertions";
import { ClearSelectionAction } from "../Actions/workflowActions";
export function useMultiSelect(wor... |
0dcff7d55ad42c8d49140e8c8b6229efdd33821fef225538ec965b753b03f86d | TypeScript | 1,694 | 47 | import { getLocalVue } from "@tests/vitest/helpers";
import { shallowMount } from "@vue/test-utils";
import { describe, expect, it } from "vitest";
import type { FormEntry } from "./formUtil";
import InstanceForm from "./InstanceForm.vue";
const localVue = getLocalVue(true);
const inputs: FormEntry[] = [];
const SU... |
e2a021cc210c66a037b648bb2e0ea51f5c13d956e4defcc6113176c0873bee7f | TypeScript | 1,694 | 38 | import { createTestingPinia } from "@pinia/testing";
import { getLocalVue, withPlugins } from "@tests/vitest/helpers";
import { mount } from "@vue/test-utils";
import { describe, expect, it, vi } from "vitest";
import { nextTick } from "vue";
import WorkflowInvocationStepHeader from "./WorkflowInvocationStepHeader.vue... |
ec33b478ae93f1afb19e9a0503ce5121b0c4f8fbeb21537f51a49ec51eadaf8d | TypeScript | 1,697 | 42 | /**
* Where a GCard header places its badges:
* - "inline": one row of checkbox, title, badges and actions.
* - "column": the title on the left, the badges directly under the actions in a right-hand column.
* - "stacked": the badges on their own full-width row below the title and actions.
*/
export type GCardHeade... |
bdb16416379a8e69aa1986f01fe14e3553a89b92b1f4fa5c0a5b2bc8873fa2ef | TypeScript | 1,701 | 56 | import type { TemplateSummary } from "@/api/configTemplates";
export function findTemplate<T extends TemplateSummary>(
templates: T[],
templateId: string,
templateVersion: number,
): T | null {
for (const template of templates) {
if (template.id == templateId && template.version == templateVers... |
5d21d76200794b2a25e899f098a9f544ca78837e0d01c338c0dc29a029458e19 | TypeScript | 1,706 | 37 | import type { CollectionType } from "@/api/datasetCollections";
import type { CollectionBuilderType } from "@/components/Collections/common/buildCollectionModal";
export const unconstrainedCollectionTypeBuilders: CollectionBuilderType[] = ["list", "list:paired", "paired"];
export function buildersForCollectionType(co... |
cd5eac5e09c5085804e45adfadbe036831e5ce7daf6c0ebfa5d6fa979e8c1eb3 | TypeScript | 1,707 | 43 | import { shallowMount } from "@vue/test-utils";
import { afterEach, describe, expect, it, vi } from "vitest";
import ToolLinkPopover from "./ToolLinkPopover.vue";
import GPopover from "@/components/BaseComponents/GPopover.vue";
// Translates only what a test asks for, so the other assertions see the source strings.
c... |
11892ce0d2003c9b0b8df4566b4fd46f69840f74c032ec4d7e0c56676fadd920 | TypeScript | 1,715 | 59 | import axios from "axios";
import { defineStore } from "pinia";
import { computed, ref } from "vue";
import { getAppRoot } from "@/onload/loadConfig";
import { useEntryPointStore } from "@/stores/entryPointStore";
import { rethrowSimple } from "@/utils/simple-error";
export const useInteractiveToolsStore = defineStor... |
407aaeb422c6d96a4c9967eb3e2e3fbd419ec280740fc1f0fd86153ed94accbb | TypeScript | 1,717 | 58 | import { defineStore } from "pinia";
import { ref } from "vue";
import type { UploadMethod } from "@/components/Panels/Upload/types";
import type {
CompositeFileItem,
LibraryDatasetItem,
LocalFileItem,
PasteContentItem,
PasteUrlItem,
RemoteFileItem,
} from "@/components/Panels/Upload/types/uplo... |
f406129ebfccce648cd4df10a4f17aebbffeb3a36331f620036f945078b45e06 | TypeScript | 1,720 | 58 | import { type ComputedRef, onScopeDispose, watch } from "vue";
import { useResourceWatcher } from "@/composables/resourceWatcher";
import { useHistoryStore } from "@/stores/historyStore";
type Poller = ReturnType<typeof useResourceWatcher>;
export function useTerminalStateMonitor(
pendingHistoryIds: ComputedRef<... |
423abae1b319685a2f0a1a1c8ed77de99c385bada6b1f43987f3ae625ed8eb68 | TypeScript | 1,724 | 52 | import type { components } from "@/api/schema";
type NotificationVariants = components["schemas"]["NotificationVariant"];
type BroadcastNotificationResponse = components["schemas"]["BroadcastNotificationResponse"];
export function generateRandomString() {
return Math.random().toString(36).substring(7) as string;
... |
c1df6cbd27296de2acc9e7aef76135129dffc55b030a024db8bc9ec0c72d04b2 | TypeScript | 1,735 | 42 | import { getLocalVue } from "@tests/vitest/helpers";
import { mount } from "@vue/test-utils";
import { describe, expect, it } from "vitest";
import MarkdownEditor from "./MarkdownEditor.vue";
const localVue = getLocalVue();
function mountEditor(props: Record<string, unknown> = {}) {
return mount(MarkdownEditor a... |
edd4e692142005d68f7678deaff7cb8c30fdaad387c733f45cb41e21712e66cc | TypeScript | 1,736 | 39 | import { getLocalVue } from "@tests/vitest/helpers";
import { mount } from "@vue/test-utils";
import { describe, expect, it } from "vitest";
import { defineComponent, reactive } from "vue";
import ExportIncludeOptions from "./ExportIncludeOptions.vue";
const localVue = getLocalVue();
// Mirrors how the export wizard... |
141f870f8a5f35336158fa4119758e4e26658d03ebff072f23c23b96232f8197 | TypeScript | 1,742 | 48 | import { describe, expect, test } from "vitest";
import { DEFAULT_QUOTA_SOURCE_LABEL, toQuotaUsage, type UserQuotaUsageData } from "./QuotaUsage";
const RAW_DEFAULT_QUOTA_USAGE: UserQuotaUsageData = {
quota_source_label: undefined,
quota_bytes: 68468436,
total_disk_usage: 4546654,
quota_percent: 20,
}... |
ad1551fd8a6153a10e0936adbecf18d5c3793d55aa824ef29e6835d7796cd5f7 | TypeScript | 1,752 | 66 | import { computed, type Ref, ref, watch } from "vue";
import type { AnyUser } from "@/api";
import { usePersistentRef } from "./persistentRef";
async function hash32(value: string): Promise<string> {
const valueUtf8 = new TextEncoder().encode(value);
const hashBuffer = await crypto.subtle.digest("SHA-256", v... |
4fab13e34e2a6402c62a0f616417bb11dc8156900fc6818c4a59bba9436d30d2 | TypeScript | 1,771 | 46 | import { afterEach, describe, expect, it, vi } from "vitest";
import { Toast } from "@/composables/toast";
import { useCallbacks } from "./datasetPermissions";
vi.mock("@/composables/toast", () => {
const toast = { error: vi.fn(), success: vi.fn() };
return { Toast: toast, useToast: () => toast };
});
descr... |
866f6307356993f6742e5a58f82cc205f81505a07569ef8885707f8e0b9e0da3 | TypeScript | 1,771 | 40 | import { describe, expect, test } from "vitest";
import { stripExtension } from "./stripExtension";
describe("stripExtension", () => {
test("strips single extensions", () => {
expect(stripExtension("sample.fastq")).toBe("sample");
expect(stripExtension("data.bam")).toBe("data");
expect(str... |
d0f1cf4685f84e26d79b4aa1549c5c99deb00cb2d4a16814e4aaddb5f0aa25ed | TypeScript | 1,775 | 44 | import { describe, expect, it } from "vitest";
import { connectionNameToInputPath, inputPathIsPrefix, resolveConnectionNameToInputPath } from "./workflowInputPath";
describe("workflow input paths", () => {
it("maps flat connection names to nested expression paths", () => {
expect(connectionNameToInputPath... |
aa853ced8eb4c17dcf3902a0f3bf9561927c7ae88a73aa0093775e3df2a5391e | TypeScript | 1,785 | 50 | import { getLocalVue } from "@tests/vitest/helpers";
import { mount } from "@vue/test-utils";
import { afterEach, describe, expect, it, vi } from "vitest";
import { computed, h, ref } from "vue";
import UploadMethodViewInline from "./UploadMethodViewInline.vue";
vi.mock("./uploadMethodRegistry", () => ({
useFilte... |
e21741b73de1af7a6d73fbc0fb9b3128158386aa1002197f535a6512c7417efc | TypeScript | 1,785 | 52 | // https://github.com/vueuse/vueuse/blob/main/packages/core/_configurable.ts
import type { ConfigurableWindow, MaybeElementRef, UseFocusWithinReturn } from "@vueuse/core";
import { unrefElement, useEventListener } from "@vueuse/core";
import { computedWithControl, isClient } from "@vueuse/shared";
import { computed } f... |
48fc1f58a2d81d90c797f99d86af79c2fd302f15314db141d043d8b89ce492fa | TypeScript | 1,787 | 52 | import { toRaw } from "vue";
/**
* Vue 3's reactive values are proxies, which structuredClone() and
* postMessage() can't copy, and toRaw() only unwraps the outermost one -- the
* elements of a reactive array, or the nested objects of a reactive object,
* are still proxies. Returns a copy with every level unwrappe... |
6c76321ad89baa3371e09c8975954cd99537a3876344e00bb9feda43c4ff3ee7 | TypeScript | 1,790 | 56 | /**
* Helper to configure datatransfer for drag & drop operations
*/
import { type DCESummary, isDCE } from "@/api";
import { type EventData, useEventStore } from "@/stores/eventStore";
type NamedDCESummary = DCESummary & { name: string };
export function setDrag(evt: DragEvent, data?: EventData, multiple = false) ... |
4c9946646d17ace807bba0348538dfc6f73b2573260d096e0f7334414af25724 | TypeScript | 1,793 | 44 | import { flushPromises, mount } from "@vue/test-utils";
import { describe, expect, it } from "vitest";
import { defineComponent, ref } from "vue";
import GCollapse from "./GCollapse.vue";
import GTab from "./GTab.vue";
import GTabs from "./GTabs.vue";
// v-model has to mean modelValue/update:modelValue in both consum... |
f2debb4ce4f4814077dcc4118a753bb25f655ac9fe047a1a80c745f12f2d8a9e | TypeScript | 1,793 | 54 | import { getLocalVue, suppressDebugConsole } from "@tests/vitest/helpers";
import { shallowMount } from "@vue/test-utils";
import flushPromises from "flush-promises";
import { createPinia } from "pinia";
import { describe, expect, it } from "vitest";
import { HttpResponse, useServerMock } from "@/api/client/__mocks__"... |
4d6c19791f599df45cfe60f2db12bcb9ce5b498eafbc9e29c8fb16af88172ebc | TypeScript | 1,794 | 51 | import "@/compat-config";
import { createPinia } from "pinia";
import { createApp } from "vue";
import { installPendingRequestsInterceptor } from "@/api/pendingRequests";
import { installStaleCacheRetryInterceptor } from "@/api/staleCacheRetry";
import { initGalaxyInstance } from "@/app";
import { initSentry } from "... |
f57fa991f40cbe971565786d2d68b79b8d2d87281b23c2f7a7865580eebcf533 | TypeScript | 1,795 | 66 | import { type components, GalaxyApi } from "@/api";
import { toQuotaUsage } from "@/components/User/DiskUsage/Quota/model";
import { rethrowSimple } from "@/utils/simple-error";
export { type QuotaUsage } from "@/components/User/DiskUsage/Quota/model";
export type APIKeyModel = components["schemas"]["APIKeyModel"];
... |
533ffde25e6bc438f3ba844f091e47529ea0db6868d1e9c054d5e65498495831 | TypeScript | 1,796 | 48 | import { getLocalVue, nth } from "@tests/vitest/helpers";
import { mount } from "@vue/test-utils";
import flushPromises from "flush-promises";
import { describe, expect, it, vi } from "vitest";
import MastheadDropdown from "./MastheadDropdown.vue";
describe("MastheadDropdown.vue", () => {
it("supports callback-ba... |
f17304b360a07e8d018b87d02f4bb27b027bffce433bec16f6a001cfa4598728 | TypeScript | 1,796 | 55 | import { getLocalVue } from "@tests/vitest/helpers";
import { mount } from "@vue/test-utils";
import { beforeEach, describe, expect, it, vi } from "vitest";
import { copy } from "@/utils/clipboard";
import CopyToClipboard from "./CopyToClipboard.vue";
vi.mock("@/utils/clipboard", () => ({
copy: vi.fn(),
}));
co... |
65657efec94f434ec484aaea5bd2068e40c8ec707fda19811aabbdd7811dc470 | TypeScript | 1,797 | 60 | import type { UseElementBoundingReturn } from "@vueuse/core";
import { reactive, toRefs } from "vue";
import type { InputTerminalSource, NewStep, Steps } from "@/stores/workflowStepStore";
import _advancedSteps from "./test-data/parameter_steps.json";
import _simpleSteps from "./test-data/simple_steps.json";
const _... |
e09a3665e43dfac7e017aeb187cfb94b6c02374b63e03125ad8b5f1ffb159071 | TypeScript | 1,797 | 57 | import createClient from "openapi-fetch";
import { errorResponseMiddleware } from "@/api/client/errorResponseMiddleware";
import { pendingRequestsMiddleware } from "@/api/client/pendingRequestsMiddleware";
import { createRateLimiterMiddleware } from "@/api/client/rateLimiter";
import { staleCacheRetryMiddleware } from... |
e06c68d0a9ed9f5e31198017dfdb4a7fc692e56e249212613a2c8e5279731f07 | TypeScript | 1,799 | 69 | import { onScopeDispose } from "vue";
type CallbackFunction = (timestamp: number) => void;
interface CallbackGroup {
priority: number;
callbacks: CallbackFunction[];
}
const callbackGroups: CallbackGroup[] = [];
let loopActive = false;
function animationFrameLoop(timestamp: number) {
callbackGroups.forEa... |
3d700b85d44c45106e6b5c0b06481ee676bc9f71b9f9c19b32fbf7eed4b16cd0 | TypeScript | 1,809 | 64 | import type { components } from "@/api";
export type ExtractInputAction = components["schemas"]["ExtractInputAction"];
export type ExtractUntypedParameter = components["schemas"]["ExtractUntypedParameter"];
export type RemoveUnlabeledWorkflowOutputs = components["schemas"]["RemoveUnlabeledWorkflowOutputs"];
/** Base ... |
eaa80725b265c40acecfe99020d00be53243dd0d24d4054256ea7239c32b14e6 | TypeScript | 1,810 | 58 | import "@/composables/__mocks__/filter";
import { createTestingPinia } from "@pinia/testing";
import { getLocalVue } from "@tests/vitest/helpers";
import { mount, type VueWrapper } from "@vue/test-utils";
import flushPromises from "flush-promises";
import { setActivePinia } from "pinia";
import { describe, expect, it,... |
2a26a03719ab57b86ff70043d4cdba904190c60a09702104a88deb7629a40d99 | TypeScript | 1,812 | 55 | import { describe, it, expect, vi, beforeEach, afterEach } from "vitest";
import { ApiError, ValidationError, handleError } from "@/api/errors";
import { ZodError } from "zod";
const toastError = vi.hoisted(() => vi.fn());
vi.mock("sonner", () => ({
toast: { error: toastError },
}));
const redirectMock = vi.hoist... |
282b0a016fb3baecc07ddeac552034161cf1b87f089b4e3f97f5c807ed236691 | TypeScript | 1,817 | 60 | import type { IconDefinition } from "@fortawesome/fontawesome-svg-core";
import type { RouteLocationRaw } from "vue-router";
import type { ColorVariant } from "@/components/BaseComponents/componentVariants";
export type { ColorVariant } from "@/components/BaseComponents/componentVariants";
/**
* Bootstrap Vue varia... |
9e32843bd7e9fa71c5927957daa090e887ba8e7387b936ed6d1d3b7f73c37776 | TypeScript | 1,819 | 48 | import type { IconDefinition } from "@fortawesome/free-solid-svg-icons";
/** Connector visual variant — "multiple" renders larger (used to mark collections). */
export type ConnectorVariant = "single" | "multiple";
/** A positioned node after layout. `TData` is the domain payload the mapper
* attaches — callers par... |
4cc34078ead50d500b386bf172154ab6a2ad4ef676df80bcd39ab1cd8c46e03b | TypeScript | 1,824 | 43 | import type { Ref } from "vue";
import type Filtering from "@/utils/filtering";
export interface SelectedItemsProps<T> {
/** A unique key to watch and reset selection when it changes. */
scopeKey: Ref<string>;
/** A method that returns a unique key for each item. */
getItemKey: (item: T) => string;
... |
551c913ef7e89b23603dff4d8bccc7b5e824975cac3230b7a1e4fd3c2f34a3e3 | TypeScript | 1,827 | 44 | import { computed, ref } from "vue";
import { type AutoPairingResult, type HasName, splitIntoPairedAndUnpaired } from "@/components/Collections/pairing";
import type { SupportedPairedOrPairedBuilderCollectionTypes } from "./useCollectionCreator";
interface PropsWithCollectionType {
collectionType:
| Supp... |
57ad27b4b4ecc3cd1e4deff884541521b837da74454c4b9db9dde259553f9827 | TypeScript | 1,828 | 62 | import createClient from "openapi-fetch";
import { type GalaxyApiPaths } from "./api-types";
/**
* Options for creating a Galaxy API client
*/
export interface GalaxyApiOptions {
/**
* The base URL of the Galaxy server (e.g., "https://usegalaxy.org")
* @default window.location.origin
*/
baseUr... |
1914fe57662e773091005f9a25e390f74e12db3579f24738614e319a1f57d69d | TypeScript | 1,832 | 49 | /**
* Renders an HTML string into an element after cleaning it with DOMPurify.
* Use this instead of `v-html` wherever markup is genuinely needed; plain
* text belongs in `{{ }}` interpolation.
*
* The argument picks the profile (see sanitizeHtml.ts):
* v-sanitize-html="html" -> `default` profile
* ... |
722e182ae4330c5b63da4890f11066ca1adffab3e4cbe9dfcfa1224288947af2 | TypeScript | 1,836 | 61 | import { computed, ref } from "vue";
export function useTableSummary() {
const rawValue = ref<string>("");
const table = computed(() => {
return rawToTable(rawValue.value);
});
const columnCount = computed<number>(() => {
const tableVal = table.value;
if (tableVal && tableVal.... |
b425fb73e1c2169624e7e73cb37f02ae6ddcf5eff7819af574eaf93cb98b54f8 | TypeScript | 1,841 | 50 | import { flushPromises, mount } from "@vue/test-utils";
import { describe, expect, it } from "vitest";
import GCollapse from "./GCollapse.vue";
async function mountCollapse(visible: boolean, slot = "details") {
const wrapper = mount(GCollapse, { props: { visible }, slots: { default: slot } });
await flushProm... |
d601a24fedd7fc5d147b1576ef1f47211a50aacdd1d02a9fbe39b1dadf768911 | TypeScript | 1,845 | 51 | import { Toast } from "@/composables/toast";
import { errorMessageAsString } from "@/utils/simple-error";
interface SerialTagSavesOptions {
setTags: (tags: string[]) => void;
/** Called when the last queued save failed. */
onFailed: () => void;
}
/**
* Saves tag edits in place, one after another, so an o... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.