sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
9bdb9be607148e4a0fd4ff8806730f4473e3dd51301b5d8bf4969ee5f2e2fc59 | TypeScript | 794 | 17 | import { defineManifest } from "../../ds-manifest";
export default defineManifest({
name: "Dropdown",
tier: 1,
exports: ["Dropdown", "DropdownTrigger"],
intent: ["a list of actions behind a trigger"],
use_when: "A menu of actions or options that opens from a button, a cell or a card.",
never_when: ["an app... |
840b4cf718b0bbec6f2d5fb0179eadff2ee8f6b776cbaa7cf700cfc92fb7a3ce | TypeScript | 802 | 28 | import { getLocalVue } from "@tests/vitest/helpers";
import { mount } from "@vue/test-utils";
import { describe, expect, it, vi } from "vitest";
import { filesDialog } from "@/utils/dataModals";
import FilesInput from "./FilesInput.vue";
vi.mock("@/utils/dataModals", () => ({
filesDialog: vi.fn(),
}));
vi.mock(... |
31bf38d4d26599766dde6643e2a6cc1fbeed2818098288704af3ab402b8c96a9 | TypeScript | 806 | 17 | import { defineManifest } from "../../ds-manifest";
export default defineManifest({
name: "Spinner",
tier: 1,
exports: ["Spinner"],
intent: ["an action in progress"],
use_when: "Something the user triggered is still running and has no layout to reserve.",
never_when: ["loading a layout that will be filled ... |
179d829803010f48faabacae804382ed302e8cbcca8139278bec08a62a5fa716 | TypeScript | 822 | 23 | import { getLocalVue } from "@tests/vitest/helpers";
import { shallowMount } from "@vue/test-utils";
import { describe, expect, it } from "vitest";
import { STANDARD_OBJECT_STORE_TEMPLATE } from "@/components/ConfigTemplates/test_fixtures";
import TemplateSummaryPopover from "./TemplateSummaryPopover.vue";
const loc... |
8e603a58ca69bbd34ac90b7ecc09e04c24039882895498c554c301f736cbf544 | TypeScript | 823 | 17 | import { defineManifest } from "../../ds-manifest";
export default defineManifest({
name: "Tooltip",
tier: 1,
exports: ["Tooltip"],
intent: ["a short explanation on hover or focus"],
use_when: "Plain-text help attached to a control or a truncated value.",
never_when: ["title attributes", "DOM-built tooltip... |
542d0782770edb80aa9e53efff182ce09bb9b5657592c1bdd71cc65c65f0e2df | TypeScript | 829 | 19 | import { getLocalVue } from "@tests/vitest/helpers";
import { mount } from "@vue/test-utils";
import { describe, expect, it } from "vitest";
import TrsUrlImport from "./TrsUrlImport.vue";
const TRS_URL = "https://training.galaxyproject.org/training-material/api/ga4gh/trs/v2/tools/t-x/versions/wf";
describe("TrsUrlIm... |
dca6ef84e730bac33dd2f89d86b7cc2dbff7f99847141987bbea3780e8b38a91 | TypeScript | 839 | 23 | import { getLocalVue } from "@tests/vitest/helpers";
import { shallowMount } from "@vue/test-utils";
import { describe, expect, it } from "vitest";
import { STANDARD_FILE_SOURCE_TEMPLATE } from "./test_fixtures";
import TemplateSummaryPopover from "./TemplateSummaryPopover.vue";
const localVue = getLocalVue(true);
... |
5d2ae764361563d95f4e634b40d8d3aa1eabb7cb79f59d0fded10202f28ade3c | TypeScript | 846 | 20 | import { defineManifest } from "../../ds-manifest";
export default defineManifest({
name: "Button",
tier: 1,
exports: ["Button", "ButtonGroup"],
intent: ["something clickable that performs an action", "a row of related actions"],
use_when: "Any element the user clicks to do something: submit, open, navigate,... |
c807cf0735ecf14495ed7e94cbf351c74f9a5abe211dead5e0e94cb6d69f091d | TypeScript | 860 | 20 | import { getLocalVue } from "@tests/vitest/helpers";
import { shallowMount } from "@vue/test-utils";
import { describe, expect, it, vi } from "vitest";
import { sanitizeHtml } from "@/directives/sanitizeHtml";
import NodeInvocationText from "./NodeInvocationText.vue";
describe("NodeInvocationText", () => {
it("r... |
0b4871bd89e0d99944c7bf4b05fd4ad97f2d7bd6344fbea164c8cd9ac5f30831 | TypeScript | 893 | 34 | import { vi } from "vitest";
import { ref } from "vue";
// Default mock config values
const defaultConfig = {
allow_local_account_creation: true,
enable_oidc: false,
mailing_join_addr: "",
prefer_custos_login: false,
registration_warning_message: "",
server_mail_configured: false,
show_welc... |
97e6c4698db66aca5739b16cb54b395f871e54a81c09ec30f4b7b31b12b3a6ea | TypeScript | 906 | 17 | import { defineManifest } from "../../ds-manifest";
export default defineManifest({
name: "Select",
tier: 1,
exports: ["Select"],
intent: ["pick one or several values from a flat list"],
use_when: "Choosing from a flat list of options, single or multiple, searchable or not, with read-only display mode.",
n... |
a64ae95ac9a27f2928641bea10c3e5200e605428d710466644fe615db52b1f64 | TypeScript | 909 | 30 | import { computed } from "vue";
import { RouterLink } from "vue-router";
export interface ClickableProps {
to?: string;
href?: string;
disabled?: boolean;
}
/**
* Returns the correct type of clickable root element based on a component's props.
*
* A disabled component always renders as a plain `button`... |
24fe34943d452eacdb865d3caa8cdb52720209db714d294dc9cf5156422d24dd | TypeScript | 912 | 27 | import "ag-grid-community/styles/ag-grid.min.css";
import "ag-grid-community/styles/ag-theme-alpine.min.css";
import type { ColumnApi, GridApi, GridReadyEvent } from "ag-grid-community";
import { defineAsyncComponent, nextTick, ref } from "vue";
export function useAgGrid(forceGridSize: () => void) {
const gridApi... |
8eb8d03ca26060496eeb0649577ffc957377528860dfd3b355c8be9015af4626 | TypeScript | 918 | 19 | // Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
export { default as QualityConflict, AnnotationConflict, ConflictSeverity } from './quality-conflict';
export type { QualityConflictRequirement } from './quality-conflict';
export { default as QualityReport } from './quality-report';
export type {... |
b7c996f025fefc704cb574973e3ac4b34640543ae49c492b3318c3145019250a | TypeScript | 920 | 22 | import fs from "node:fs";
import path from "node:path";
/**
* DM view-tab titles (`.lsf-tabs-dm__item-title`) used to inherit font-size. Opening Quick View
* loads editor CSS (`.lsf-root { font-size: 14px }`), which stays on the page after closing QV and
* shrinks tab titles (16px → 14px). Pinning an explicit desig... |
abadc294d40a14337b73f3f8eccf430e6f39a1d330e6b89d9af2213b55c00518 | TypeScript | 923 | 28 | import { getLocalVue } from "@tests/vitest/helpers";
import { mount } from "@vue/test-utils";
import flushPromises from "flush-promises";
import { afterEach, describe, expect, it, vi } from "vitest";
import GModal from "./GModal.vue";
const localVue = getLocalVue();
describe("GModal", () => {
afterEach(() => {
... |
db7e835c05d1094c41087f181436a6e3913e1890366280e88d16c96e84fefd04 | TypeScript | 926 | 22 | import { defineManifest } from "../../ds-manifest";
export default defineManifest({
name: "ModalWindow",
tier: 1,
exports: ["ModalWindow", "Dialog"],
intent: ["a blocking decision or a focused task"],
use_when: "A dialog the user must act on or dismiss: confirmations, forms, previews.",
never_when: [
"... |
266a1c2c6a135c893b0827c898ceccf84e8fb79b3285725d369d2086ac400cb9 | TypeScript | 928 | 31 | import { schemaToInterface } from "schema-to-ts";
import { parse } from "yaml";
import { GalaxyApi } from "@/api";
async function fetchRuntimeSchema(toolSource: any) {
const { data, error } = await GalaxyApi().POST("/api/unprivileged_tools/runtime_model", {
body: {
active: true,
hi... |
98669924e6e774f3b6715971cbe4fe331fd79818f68b892607dc37ab9ecabcfe | TypeScript | 934 | 29 | import { computed, type Ref, toRef } from "vue";
import { useHistoryStore } from "@/stores/historyStore";
interface Props {
historyId: string;
}
export function useHistoryBreadCrumbsToForProps<T extends Props>(props: T, historyAction: string) {
const historyId = toRef(props, "historyId");
return useHisto... |
f2ef1f3d5ecf545b70b4caaf9842e226e7bd980744874e816c768b7c9bd03d83 | TypeScript | 941 | 26 | import { useRoute, useRouter } from "vue-router/composables";
import { useChatStore } from "@/stores/chatStore";
/** Shared behavior for the various "New Chat" buttons. */
export function useStartNewChat() {
const route = useRoute();
const router = useRouter();
const chatStore = useChatStore();
/** @... |
71b86b48cdecd5ba62c9f3f188d2fab7301eccd402c631aaf74584cf166dfa6a | TypeScript | 943 | 30 | import { computed } from "vue";
import { useCollectionElementsStore } from "@/stores/collectionElementsStore";
import { errorMessageAsString } from "@/utils/simple-error";
interface Props {
collectionId: string;
}
export function useDetailedCollection<T extends Props>(props: T) {
const collectionStore = useC... |
a8bee1ffd0a6fcad4c11267ae999695e05bcdd139b6728ca181501b88cf4a7bf | TypeScript | 945 | 33 | import { createTestingPinia } from "@pinia/testing";
import { vi } from "vitest";
// IMPORTANT: This import MUST come after the mock calls above for proper module hoisting
// eslint-disable-next-line import/order
import { getSelectableObjectStores } from "@/api/objectStores";
vi.mock("@/api/objectStores");
const OBJ... |
28dae8a2437b13c9508e63b81ca3728af9637f95baa27a25fe56abaef8e3fa89 | TypeScript | 949 | 29 | import { describe, expect, it } from "vitest";
import { trsImportQuery } from "./trsImportQuery";
describe("trsImportQuery", () => {
it("reads the version from trs_version, as GTN and Dockstore launch links send it", () => {
const query = trsImportQuery({
trs_server: "dockstore.org",
... |
dd0ac44056b238627150c2fec2fc81e5ba3660b57b16a9a88bf40b9fbb84ac47 | TypeScript | 960 | 31 | import axios from "axios";
import { getAppRoot } from "@/onload";
import { rethrowSimple } from "@/utils/simple-error";
import type { TemplateEntry } from "./types";
export interface VisualizationType {
description: string;
html: string;
logo?: string;
name: string;
}
export async function getVisual... |
4924010c7d5e452ecc8851ff4eeb36ac14ffc1557b1b174d47a68a4298d5f405 | TypeScript | 980 | 30 | import { LabelStudio, VideoView } from "@humansignal/frontend-test/helpers/LSF/index";
import { simpleVideoConfig } from "../../data/video_segmentation/regions";
const simpleVideoData = { video: "/public/files/fps_24_frames_24_video.webm" };
describe("Video Frame Seeking", () => {
it("Should be able to seek to a sp... |
90c6a3bb52e43bdafc9f9c2fb5dad6e94b3035464bafad2ee3fbde884c38ac67 | TypeScript | 1,005 | 31 | import { defineManifest } from "../../ds-manifest";
export default defineManifest([
{
name: "Avatar",
tier: 1,
exports: ["Avatar", "AvatarStack", "AvatarBadge"],
intent: ["a person or several people"],
use_when: "One person (initials or photo, tooltip, badge) or a stack of people with a +N tile."... |
12f87a0f24151742f601c86143c5d343ddfc60c62d881bf03b94478d3352b4d5 | TypeScript | 1,007 | 24 | import { getLocalVue } from "@tests/vitest/helpers";
import { mount } from "@vue/test-utils";
import { describe, expect, it, vi } from "vitest";
import { sanitizeHtml } from "@/directives/sanitizeHtml";
import ItemListEditor from "./ItemListEditor.vue";
describe("ItemListEditor", () => {
it("renders the descript... |
5e384fe4c28e494e2b5994ce0326e72e8856077f840aa72b27aa59a2771c926d | TypeScript | 1,134 | 36 | import type { Step, WorkflowStepStore } from "@/stores/workflowStepStore";
/**
* Copies a step and increments a trailing number in it's label,
* or adds said trailing number
*
* @param step step to clone
* @param labelSet set containing all labels. Will me mutated to include new label
* @returns cloned step
*/
... |
0776eb00a0c266d3884fe9c8dc5709b3fbb5f09b86129f7ef627e44854c8c8df | TypeScript | 1,139 | 33 | import { getLocalVue } from "@tests/vitest/helpers";
import { shallowMount } from "@vue/test-utils";
import { describe, expect, it } from "vitest";
import CreateInstance from "./CreateInstance.vue";
const localVue = getLocalVue(true);
describe("CreateInstance", () => {
it("should render a loading message during ... |
9f3f4b120210743002cb5b620e15507d7028b93d4f0ec7d86c996f349bc82fb1 | TypeScript | 1,157 | 40 | import type Vue from "vue";
import type { Ref } from "vue";
import { ref } from "vue";
import type ToastComponentFile from "@/components/Toast";
export type ToastComponent = Vue & typeof ToastComponentFile.methods;
let toastRef: Ref<ToastComponent | null> = ref(null);
export const setToastComponentRef = (newRef: ty... |
19f0c1222d51fb8b2015e62bc2400eeff68f50db7b2477ca215d5f6affd51f84 | TypeScript | 1,186 | 30 | import { AudioView, LabelStudio, Sidebar } from "@humansignal/frontend-test/helpers/LSF";
import * as audioFixtures from "../../data/audio/audio_paragraphs";
describe("Audio: Paragraphs Sync", () => {
it("Correctly loads with Paragraph segments as Audio segments", () => {
LabelStudio.params().config(audioFixture... |
d25e10ed4ee1a6e2c922777d143b83ce0d1ff561a7ebe9445eabbd39a2a83c12 | TypeScript | 1,204 | 38 | import { reactive, ref, watch } from "vue";
import type { SelectOption, useSelectMany as UseSelectMany } from "../selectMany";
import { main } from "../selectManyMain";
// @ts-ignore - vi is a Vitest global
vi.mock("@/components/Form/Elements/FormSelectMany/worker/selectMany", () => ({
useSelectMany,
}));
export... |
fea55cba0db06aeb196ad9a9d427732f4e695cdbeef3329720a6336621d467ea | TypeScript | 1,213 | 37 | import { type MaybeRefOrGetter, toValue } from "@vueuse/core";
import { computed } from "vue";
import { useRoute, useRouter } from "vue-router/composables";
/** use a route query parameter as a boolean computed */
export function useRouteQueryBool(
parameter: MaybeRefOrGetter<string>,
defaultValue: MaybeRefOrG... |
3cca2f477f14348b18caac9f23a26580f46474df76a71f3867f8bbbcc227912c | TypeScript | 1,269 | 48 | import type { IconDefinition } from "@fortawesome/free-solid-svg-icons";
/** A labeled port on a graph node (input or output connector) */
export interface GraphNodePort {
name: string;
label: string;
}
/** A positioned node after layout */
export interface GraphNode {
id: string;
x: number;
y: nu... |
3267e7b25487b1dfa36647a9b28a396309c04ec163703671b25776f692b8df6c | TypeScript | 1,275 | 28 | import type { WorkflowExtractionJob } from "@/api/histories";
export type WorkflowExtractionToolJob = WorkflowExtractionJob & { step_type: "tool" };
export type WorkflowExtractionInputJob = WorkflowExtractionJob & {
step_type: "input_dataset" | "input_collection";
};
export type WorkflowExtractionInput = Workflo... |
ab9600974887a278f467c45735da46e8cfa912f247481a2bf29547fa91f61ea4 | TypeScript | 1,275 | 42 | import { getLocalVue } from "@tests/vitest/helpers";
import { shallowMount } from "@vue/test-utils";
import axios from "axios";
import { describe, expect, it, vi } from "vitest";
import TabularChunkedView from "./TabularChunkedView.vue";
import GTable from "@/components/Common/GTable.vue";
vi.mock("axios");
vi.mock("... |
d59298530133605f126f7bc5ecd17745552bfebb0996eca1d5d356d981c7e546 | TypeScript | 1,276 | 31 | import { getLocalVue } from "@tests/vitest/helpers";
import { mount } from "@vue/test-utils";
import { describe, expect, it, vi } from "vitest";
import { sanitizeHtml } from "@/directives/sanitizeHtml";
import TrsTool from "./TrsTool.vue";
describe("TrsTool", () => {
it("renders the registry description through ... |
92a57f95545b8a8b1e3ed7608bf876e3c75d7013b9cbf7b5460ff58061340609 | TypeScript | 1,285 | 30 | import fs from "node:fs";
import os from "node:os";
import path from "node:path";
import { afterAll, beforeAll, describe, expect, test } from "bun:test";
import { MIRROR_PREFIX, removeStaleMirrors } from "../check";
let webRoot: string;
const minutes = (n: number) => n * 60 * 1000;
beforeAll(() => {
webRoot = fs.mk... |
7f887fb362b0e2989f5ddba9f54bff68f0384d420d0384280810eb45ebcddf08 | TypeScript | 1,295 | 44 | import { describe, expect, it } from "bun:test";
import { buildObjectDataTypes } from "../utils";
const pages = ["https://example.com/page-1.png", "https://example.com/page-2.png"];
describe("buildObjectDataTypes", () => {
it("includes an Image that only has valuelist, resolved to the list of image URLs", () => {
... |
16e106600ca80476c52b7650604dd95875b05a0dfba35fd7f9c9d552a6b7dc0b | TypeScript | 1,305 | 37 | import { GalaxyApi } from "@/api";
import { rethrowSimple } from "@/utils/simple-error";
import { useGenericMonitor } from "./genericTaskMonitor";
export const DEFAULT_POLL_DELAY = 10000;
const DEFAULT_EXPIRATION_TIME = 1000 * 60 * 60 * 24; // 24 hours
const READY_STATE = "READY";
const PENDING_STATE = "PENDING";
co... |
74bb914718ed7c0f5511ac75ef458c91509c730a559dd97ac19fdf2b676ce297 | TypeScript | 1,317 | 41 | /** Call `fn`, turning a synchronous throw into a rejected promise. */
function callAsync<T>(fn: () => Promise<T>): Promise<T> {
try {
return fn();
} catch (error) {
return Promise.reject(error);
}
}
/**
* Call `fn` once and share its promise with concurrent and later callers.
* A rejecti... |
786996afadebc709fef8f980a83ec0ed76798c4114f9ff71fdd5c72db3d7451a | TypeScript | 1,320 | 37 | import { createTestingPinia } from "@pinia/testing";
import { getLocalVue } from "@tests/vitest/helpers";
import { mount } from "@vue/test-utils";
import flushPromises from "flush-promises";
import { describe, expect, it, vi } from "vitest";
import { useServerMock } from "@/api/client/__mocks__";
import HistoryDatase... |
69142646d98dc44b3b9281fe51b389f59e9bcac291c021fb2737e7138d1b42b9 | TypeScript | 1,323 | 40 | import { LabelStudio, ImageView, Taxonomy } from "@humansignal/frontend-test/helpers/LSF";
import { simpleImageTaxonomyConfig, simpleImageData, perTagTaxonomyResult } from "../../../data/control_tags/per-item";
/* <Taxonomy /> */
describe("Classification - single image - Taxonomy", () => {
it("should create result w... |
e369d068fe985be4c45a3db3aa207e28ee69c4941689613c036af56e60dfd13c | TypeScript | 1,341 | 46 | // abstractions for dealing with workflows labels and
// connecting them to the Markdown editor
type WorkflowLabelKind = "input" | "output" | "step";
export interface WorkflowLabel {
label: string;
type: WorkflowLabelKind;
}
interface StepOutput {
label?: string;
}
interface Step {
label?: string;
... |
a899617ce98f9e5757c11b23251d91816ea48081c6dac20363030de9b6d6867f | TypeScript | 1,347 | 34 | /**
* Sets `innerHTML` without cleaning it. This is the named alternative to raw
* `v-html` for the rare content that only the Galaxy server, shipped client
* code or the operator's config files can produce and that DOMPurify would
* alter (see `v-sanitize-html` for everything else). Admin-only content entered
* t... |
5b286fe419779fff88fc2f7541bfc50595891ef8b137614b9e8b53afcd9f626b | TypeScript | 1,349 | 35 | import { getLocalVue } from "@tests/vitest/helpers";
import { mount } from "@vue/test-utils";
import { describe, expect, it, vi } from "vitest";
import { defineComponent, h } from "vue";
import { sanitizeHtml } from "@/directives/sanitizeHtml";
import { useWizard } from "./useWizard";
import GenericWizard from "./Ge... |
68383d5e84ab753d26ddcb538ba7d4bd80c27dfb1904ae3475c3f470f5b09e43 | TypeScript | 1,352 | 31 | import { createTestingPinia } from "@pinia/testing";
import { getLocalVue } from "@tests/vitest/helpers";
import { mount } from "@vue/test-utils";
import flushPromises from "flush-promises";
import { describe, expect, it, vi } from "vitest";
import { sanitizeHtml } from "@/directives/sanitizeHtml";
import ToolHelpMar... |
c89620e47da2c45b18d1f1108d8d6705accacb1d89f3d591d3d4ea741e9cbd04 | TypeScript | 1,353 | 44 | import { getLocalVue } from "@tests/vitest/helpers";
import { mount } from "@vue/test-utils";
import { describe, expect, it } from "vitest";
import GDateTime from "./GDateTime.vue";
const localVue = getLocalVue(true);
async function mountGDateTime(props: object) {
const wrapper = mount(GDateTime as object, {
... |
de1ecb6ebc1ac7e5dbdd222edc790064e62ebfbda0a3eec0a746925f9215660b | TypeScript | 1,356 | 40 | 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 WorkflowInvocationSteps from "./WorkflowInvoca... |
16983037996f4817d476ab99060fdb413709160ee0f67237872d1be297ba54b8 | TypeScript | 1,368 | 44 | import type { ColDef } from "ag-grid-community";
import { computed, ref } from "vue";
import type { SampleSheetColumnDefinition } from "@/api";
// Example Row Data
// const rowData = ref([{ "replicate number": 1, treatment: "treatment1", "is control?": true }]);
export type AgRowData = Record<string, unknown>;
expor... |
335d72ae03e2b0bb971a0b22f1d4761f6520f6dea708aebb440095f8689d7d40 | TypeScript | 1,391 | 39 | import { format, parseISO } from "date-fns";
/**
* Converts a Galaxy time string to a Date object.
* @param {string} galaxyTime - The Galaxy time string in ISO format.
* @returns {Date} The parsed Date object.
*/
export function galaxyTimeToDate(galaxyTime: string): Date {
// Galaxy doesn't include Zulu time z... |
93cd79ca0bb3db336c732576baa07c524e30bc25767af0eb0060b5b1e92f95f7 | TypeScript | 1,410 | 37 | import { getLocalVue } from "@tests/vitest/helpers";
import { mount } from "@vue/test-utils";
import { describe, expect, it } from "vitest";
import { STANDARD_FILE_SOURCE_TEMPLATE, STANDARD_OBJECT_STORE_TEMPLATE } from "./test_fixtures";
import EditSecretsForm from "./EditSecretsForm.vue";
const localVue = getLocalV... |
524198117c146b12ddb100c7aded01aae9163c7fe4ef068eec0d9abf9c730cf2 | TypeScript | 1,416 | 54 | /**
* 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) ... |
0d2ba260e1cee5b76d8f6bbcd92ea5cd5a47648c0dc6a9bad7e9a3a346e8cd50 | TypeScript | 1,444 | 46 | // index.ts
import { createPinia, PiniaVuePlugin } from "pinia";
import Vue from "vue";
import { installPendingRequestsInterceptor } from "@/api/pendingRequests";
import { installStaleCacheRetryInterceptor } from "@/api/staleCacheRetry";
import { initGalaxyInstance } from "@/app";
import { initSentry } from "@/app/add... |
5cf6b785c9f6131b577a4902db02c3235dd452463cad7bd054062a7ceabdda6c | TypeScript | 1,451 | 35 | import fs from "node:fs";
import path from "node:path";
import postcss, { type Declaration, type Rule } from "postcss";
/**
* Native form controls (number spinners, date/time pickers, select popups, scrollbars) only follow the
* app theme when the CSS `color-scheme` property says so. Declaring it on the dark theme r... |
415238a375c6e19eba4635d0a2cb55d09cf74737faa7f03184b872c0fc05c0e2 | TypeScript | 1,454 | 37 | import fs from "node:fs";
import path from "node:path";
import postcss, { type Declaration, type Rule } from "postcss";
import { RESIZE_HANDLE_TAG } from "../../../../mixins/HighlightMixin";
/**
* Text region resize handles are custom elements injected into the highlight spans and positioned
* absolutely without top... |
43710a8b52cddd984ce991f221adbb4eed19745a34b503bf5fe7cab7d4ae8578 | TypeScript | 1,456 | 44 | import { defineStore } from "pinia";
import { computed, set } from "vue";
import { type HDADetailed, type HistoryContentItemBase, isInaccessible } from "@/api";
import { fetchDatasetDetails } from "@/api/datasets";
import { useKeyedCache } from "@/composables/keyedCache";
export const useDatasetStore = defineStore("d... |
4711ed11f8d2d4c3986614344c06bad2c78fdc70af7cd8177f823cd7c0783bb9 | TypeScript | 1,466 | 43 | import { getLocalVue } from "@tests/vitest/helpers";
import { mount } from "@vue/test-utils";
import { describe, expect, it } from "vitest";
import JobsTable from "./JobsTable.vue";
const localVue = getLocalVue();
const fields = [
{ key: "id", label: "Job ID" },
{ key: "update_time", label: "Last Update", so... |
a6f2d788339f3cf72176f7396e0b1eb98c79f133d7bca3e88681d88a4309928f | TypeScript | 1,505 | 52 | import createClient from "openapi-fetch";
import { pendingRequestsMiddleware } from "@/api/client/pendingRequestsMiddleware";
import { createRateLimiterMiddleware } from "@/api/client/rateLimiter";
import { staleCacheRetryMiddleware } from "@/api/client/staleCacheRetryMiddleware";
import type { GalaxyApiPaths } from "... |
9cfe9b62ee2ea76d574ecc2516ead594b8523a15251ff83d4aec7e24434cc2ba | TypeScript | 1,527 | 52 | /**
* 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... |
c35ecdffe4ae5bd14e7fd98ea1bb91f712f26b5c1ad055ac5327a24f1ba7fc3a | TypeScript | 1,528 | 44 | import { createLocalVue, 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, setConfirmDialogComponentRef, useConfirmDialog } from ... |
d32cebc59877705c974e199ee5a725d05e7a5934898ceb46be052f76d890094d | TypeScript | 1,529 | 42 | import { getLocalVue } from "@tests/vitest/helpers";
import { shallowMount } from "@vue/test-utils";
import { describe, expect, it } from "vitest";
import ObjectStoreBadge from "./ObjectStoreBadge.vue";
import ObjectStoreBadges from "./ObjectStoreBadges.vue";
const localVue = getLocalVue(true);
const TEST_MESSAGE = ... |
0c62bc88d071abc572bc46338606c7bcdd0cf57c796186a9a64fa1608e5f2ce5 | TypeScript | 1,539 | 55 | import type { components } from "@/api";
export type ExtractInputAction = components["schemas"]["ExtractInputAction"];
export type ExtractUntypedParameter = components["schemas"]["ExtractUntypedParameter"];
export type RemoveUnlabeledWorkflowOutputs = components["schemas"]["RemoveUnlabeledWorkflowOutputs"];
/** Base ... |
058896dfa1e7e65bccb7eff520b6af575ff57d0946bd7bd6dbac0ee8ddce8780 | TypeScript | 1,562 | 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... |
d3a82daba30de156d1b779c512640585b82dd3a2c2a25462bc7eca710483e649 | TypeScript | 1,574 | 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... |
dd9671e687d1e240c5cab33bbd9a9090b379b04733be101531575428575ca6ca | TypeScript | 1,576 | 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<... |
4e9b03c134f670e398298122595e7225ecbaa86b6e1f757bbfa55e88f29a8ed1 | TypeScript | 1,579 | 40 | import { getLocalVue } from "@tests/vitest/helpers";
import { mount } from "@vue/test-utils";
import flushPromises from "flush-promises";
import { describe, expect, it, vi } from "vitest";
import { useServerMock } from "@/api/client/__mocks__";
import { sanitizeHtml } from "@/directives/sanitizeHtml";
import GalaxyWi... |
72680a57d722828f460fffe9aa617f7fb6feeac0ac2beb95bd9a0d4fc8d72074 | TypeScript | 1,579 | 30 | import { defineManifest } from "../../ds-manifest";
export default defineManifest({
name: "Badge",
tier: 1,
exports: ["Badge"],
intent: ["an attribute, type or count on an item", "a lifecycle state not covered by the state registry"],
use_when: "A short label that states an attribute (Required, Inherited, a ... |
8caa006be280a7532b7e622e34d5ca73a7375dfe9c4f320e9725772a3aaeb8f5 | TypeScript | 1,643 | 39 | import { mount } from "@vue/test-utils";
import { describe, expect, test } from "vitest";
import { defineComponent } from "vue";
import { sanitizeHtml } from "@/directives/sanitizeHtml";
function mountWith(value: string | null) {
const Host = defineComponent({
props: { value: { type: String, default: null... |
187eb5b8f859b88caf833f722588187b9d7a92a1b69cf5569e6bd1791ca845f0 | TypeScript | 1,660 | 47 | import path from "node:path";
import { describe, expect, test } from "bun:test";
import { runBiomePlugins } from "../../../ds-check/biome";
const webRoot = path.resolve(import.meta.dir, "../../../..");
const fixtures = path.join(import.meta.dir, "fixtures");
const rel = (name: string) => path.relative(webRoot, path.jo... |
8423621c140c47ff1f5eea8527306fca83f2bca19b28efebb5bccbe7c5da77fd | TypeScript | 1,670 | 41 | import { describe, expect, it } from "vitest";
import { getStepTitle } from "./util";
describe("getStepTitle", () => {
it("uses label when provided, regardless of type", () => {
expect(getStepTitle(0, "tool", "My Label")).toBe("Step 1: My Label");
expect(getStepTitle(2, "data_input", "Custom")).to... |
a0de4f6a9aac0749635766f268b9d8de85894231c1b84983363f8666965ab663 | TypeScript | 1,686 | 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... |
7255f4b4233a9bff1224689fd731e26f6fd6713258c3f70c7a595b203914b5cb | TypeScript | 1,691 | 51 | 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;
... |
960dc52da299534a7ffc28b9dbc9bced0f3e2cfa9655318b6a29ed34a90e43b5 | TypeScript | 1,742 | 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... |
f3e67c0cd9d614312ce3dd427e534594079088d28c93603599d2e6f482f1a6c5 | TypeScript | 1,748 | 39 | import type { components } from "@/api/schema";
export type CreateInstancePayload = components["schemas"]["CreateInstancePayload"];
export type Instance =
| components["schemas"]["UserFileSourceModel"]
| components["schemas"]["UserConcreteObjectStoreModel"];
export type TemplateVariable =
| components["s... |
8bc34c2fe6a6c3085451d17155735583cea8e7f5939d2abb1ab20b8ce67bea81 | TypeScript | 1,767 | 55 | import axios from "axios";
import { createPinia, setActivePinia } from "pinia";
import { beforeEach, describe, expect, it, vi } from "vitest";
import { useToolStore } from "./toolStore";
vi.mock("axios", () => ({
default: {
get: vi.fn(),
},
}));
vi.mock("@/components/ToolsList/utilities", () => ({
... |
7c9a9989ee99d2909376e586b7b4b025e4ff2afe23316398707694921aea6980 | TypeScript | 1,788 | 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__"... |
bee42aac1e6e1b91981934ddfc36ce213d5a46d4f99a8a20faf69406527a79a9 | TypeScript | 1,823 | 50 | 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... |
ee23388339b533d781da1ef9c321049064c029647355d15c8a58ecdfeef1aeee | TypeScript | 1,833 | 59 | import "@/composables/__mocks__/filter";
import { createTestingPinia } from "@pinia/testing";
import { getLocalVue } from "@tests/vitest/helpers";
import { mount, type Wrapper } from "@vue/test-utils";
import flushPromises from "flush-promises";
import { setActivePinia } from "pinia";
import { describe, expect, it, vi... |
2c9a6aa2267afd7c0a3e996f3a1a8f0ded7073e99feed6288ae5bcbc54d5da92 | TypeScript | 1,840 | 46 | import { getLocalVue } from "@tests/vitest/helpers";
import { mount, type Wrapper } from "@vue/test-utils";
import { beforeEach, describe, expect, it } from "vitest";
import type Vue from "vue";
import DatasetDownload from "./DatasetDownload.vue";
const localVue = getLocalVue();
const items = [
{ id: "item_id", ... |
88a68df704496065199cb66ec3ebaa1832ba6b3b26205fc840559da98e2f0151 | TypeScript | 1,849 | 51 | import { getLocalVue } from "@tests/vitest/helpers";
import { shallowMount } from "@vue/test-utils";
import { describe, expect, it, vi } from "vitest";
import { sanitizeHtml } from "@/directives/sanitizeHtml";
import VaultSecret from "./VaultSecret.vue";
const localVue = getLocalVue(true);
describe("VaultSecret", (... |
ab06d3cbb8d6646c1c23593d0ff2218ba44cf218fbbcb9d53dedd0b3fba89888 | TypeScript | 1,849 | 49 | import { getLocalVue } from "@tests/vitest/helpers";
import { shallowMount } from "@vue/test-utils";
import { describe, expect, it, vi } from "vitest";
import { sanitizeHtml } from "@/directives/sanitizeHtml";
import ConfigurationMarkdown from "./ConfigurationMarkdown.vue";
const localVue = getLocalVue();
describe(... |
d5c06eef6a74e60f8fb84b506194d7d21f70ffdf1d25902e0366c300599c3a29 | TypeScript | 1,902 | 67 | /**
* Requests jobs
* Requests response generated by a tool run
*/
import { defineStore } from "pinia";
import { ref } from "vue";
import { GalaxyApi } from "@/api";
import { type ResponseVal, type ShowFullJobResponse, TERMINAL_STATES } from "@/api/jobs";
import { type FetchParams, useKeyedCache } from "@/composab... |
ff8f2ba6736f8f1e9029a703a7495c9d9d895437642af420fd1f5101fd6ece62 | TypeScript | 1,902 | 53 | import { beforeEach, describe, expect, it, vi } from "vitest";
import { getGalaxyInstance } from "@/app";
import { Toast } from "@/composables/toast";
import { pushIgnoringNavCancel } from "./windowAwareNavigation";
vi.mock("@/app");
vi.mock("@/composables/toast", () => ({
Toast: { error: vi.fn() },
}));
const ... |
92ed44e520a81218fd8dc5cfc13432c1e4bfe808855cd1d28f52ab39053eb7ba | TypeScript | 1,904 | 63 | import type { IconDefinition } from "@fortawesome/fontawesome-svg-core";
import type { RawLocation } from "vue-router";
/**
* Basic color variants for components that only support
* color-based styling like alerts, badges, and backgrounds (no outline variants).
*/
export type ColorVariant = "primary" | "secondary" ... |
4f19fd28b22080bdf46c2febdc697dfec6079c7c6640d1c439bb402071337b85 | TypeScript | 1,918 | 45 | import { createTestingPinia } from "@pinia/testing";
import { getLocalVue, injectTestRouter } from "@tests/vitest/helpers";
import { shallowMount } from "@vue/test-utils";
import { describe, expect, it, vi } from "vitest";
import { useConfig } from "@/composables/config";
import ToolSuccess from "./ToolSuccess.vue";
... |
dd90d5f98eb165e5ff19da1d114432e9f3f9655398f206f144c48c02e230861c | TypeScript | 1,934 | 57 | import type { DataOption } from "@/components/Form/Elements/FormData/types";
import type { UploadedDataset } from "@/composables/upload/uploadItemTypes";
import type { UploadMethod } from "./types";
export type { UploadedDataset } from "@/composables/upload/uploadItemTypes";
/**
* Subset of UploadMethod that direct... |
6a55a3cff7937f46f3faee6c6c389d1f99282620dbe1f2b3f859d1475c60a51c | TypeScript | 1,947 | 64 | import RAW_DIRECTIVE_DATA from "./directives.yml";
export type DirectiveMode = "page" | "report";
type DirectiveMetadataValueByMode = {
[key: string]: string;
};
interface DirectiveMetadata {
side_panel_name: string | DirectiveMetadataValueByMode;
side_panel_description?: string | DirectiveMetadataValueB... |
73aa9092e267a52f4f0e97874c58d58b099073a7b3822411f3adeddc30d1abea | TypeScript | 1,949 | 65 | import { faAws, faPython } from "@fortawesome/free-brands-svg-icons";
import { faCloud, faHdd, faNetworkWired, type IconDefinition } from "font-awesome-6";
import type { components } from "@/api/schema";
import { contains } from "@/utils/filtering";
const typeMessage = (type: string) => `This template produces a new ... |
dda0e6bc4d29869b471a8c5660b6ae66bd21c0041d540363288354ddc1818957 | TypeScript | 1,973 | 45 | import type { components } from "@/api/schema";
export type BaseUserNotification = components["schemas"]["UserNotificationResponse"];
export type UserNotificationPreferences = components["schemas"]["UserNotificationPreferences"]["preferences"];
export type NotificationChannel = keyof components["schemas"]["Notificatio... |
7fd98f48dc793efc41b589af07ad08e57feba99da3195030c2a397942b2a36b8 | TypeScript | 1,975 | 60 | import { describe, expect, it } from "vitest";
import RuleDefs from "@/components/RuleBuilder/rule-definitions";
import SPEC_TEST_CASES from "./rules_dsl_spec.yml";
function applyRules(rules: Array<any>, data: Array<Array<string>>, sources: Array<number>) {
const columns = Array(data[0]?.length).fill("new");
... |
595bdd839b681e997926e0268ae09fa0c38b3fca2b862c5120ce43bf8ed75869 | TypeScript | 1,979 | 52 | import MockDate from "timezone-mock";
import { afterEach, beforeEach, describe, expect, it } from "vitest";
import { formatGalaxyPrettyDateString, galaxyTimeToDate, localizeUTCPretty } from "./dates";
describe("dates.ts", () => {
beforeEach(() => {
MockDate.register("Etc/GMT+4");
});
afterEach(()... |
2eafb85b919453710942cc5442e21daecb80a9511080d6234ee130a12bdb56c6 | TypeScript | 1,983 | 58 | import { getLocalVue } from "@tests/vitest/helpers";
import { shallowMount } from "@vue/test-utils";
import { createPinia } from "pinia";
import { describe, expect, it } from "vitest";
import type { RegisteredUser } from "@/api";
import { useUserStore } from "@/stores/userStore";
import HistoryNavigation from "./Hist... |
d01a0900d3f627457e04c9cd0f75eab4b7a757f900a66a3227795750d36c02bf | TypeScript | 1,991 | 57 | import { getLocalVue } from "@tests/vitest/helpers";
import { mount, type Wrapper } from "@vue/test-utils";
import { describe, expect, it } from "vitest";
import type Vue from "vue";
import type { ObjectStoreBadgeType } from "@/api/objectStores.templates";
import { MESSAGES } from "@/components/ObjectStore/badgeMessag... |
b67b0cdfaecc69af138d8a6b328ba0edc38060bebc318ce237b60d4b19aca953 | TypeScript | 1,993 | 59 | import "@tests/vitest/mockHelpPopovers";
import { getLocalVue } from "@tests/vitest/helpers";
import { setupMockConfig } from "@tests/vitest/mockConfig";
import { mount } from "@vue/test-utils";
import flushPromises from "flush-promises";
import { describe, expect, it } from "vitest";
import { setupSelectableMock } f... |
58ce68ff4392812282f7f2332190ffbb1c4913fa7a236f242b25ebb7284600c2 | TypeScript | 2,015 | 59 | import "@tests/vitest/mockHelpPopovers";
import { getLocalVue } from "@tests/vitest/helpers";
import { setupMockConfig } from "@tests/vitest/mockConfig";
import { mount } from "@vue/test-utils";
import flushPromises from "flush-promises";
import { describe, expect, it } from "vitest";
import { setupSelectableMock } f... |
804a399657944ef1a3e4df0a6c72761dae2eaeef2516c32d0601ddb3710986d5 | TypeScript | 2,020 | 73 | export interface Option {
name: string;
value: string;
leaf?: boolean;
fullPath?: string;
disabled?: boolean;
options: Array<Option>;
}
export type Value = string[] | string | null;
/**
* Returns an array of values from nested drill down options provided
* @param headOptions Array of options... |
991d96f9d10bbfe4863761787763e9eb1c8d2d69e241c5c5411dca839e053143 | TypeScript | 2,023 | 51 | import { createTestingPinia } from "@pinia/testing";
import { getLocalVue } from "@tests/vitest/helpers";
import { mount } from "@vue/test-utils";
import { describe, expect, it, vi } from "vitest";
import { sanitizeHtml } from "@/directives/sanitizeHtml";
import GCard from "./GCard.vue";
const localVue = getLocalVue... |
120e6cea5f24dad045413e6cea5fc096f8c6fe1b14878ffb914d33558445cb46 | TypeScript | 2,027 | 56 | /**
* 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
* ... |
1dc414787ab6e23fa3c8d6e8f805121f22bf5bf4c5ce3e5064f2a8b5ee80a6d4 | TypeScript | 2,030 | 67 | import { type Ref, ref, watch, type WatchSource } from "vue";
import { GalaxyApi } from "@/api";
import type { HistoryGraphResponse } from "./historyGraphMapper";
/**
* Fetch the history-scoped graph from the API.
*
* The default call returns the full history graph (within bounds).
* An optional (seedSrc, seedId... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.