Skip to content

Commit

Permalink
Moved FilteredTasksTable and its dependencies in components module
Browse files Browse the repository at this point in the history
  • Loading branch information
zonia3000 committed Dec 5, 2024
1 parent dae09ee commit c017256
Show file tree
Hide file tree
Showing 70 changed files with 495 additions and 463 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
buildTaskTableRows,
buildWorkflowTaskTableRows,
removeIdenticalTaskGroups
} from '$lib/components/v2/tasks/task_group_utilities.js';
} from '../../src/lib/tasks/task_group_utilities.js';

describe('task_group_utilities', () => {
it('buildTaskTableRows', async () => {
Expand Down
17 changes: 14 additions & 3 deletions components/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,18 @@
},
"dependencies": {
"ajv": "^8.12.0",
"ajv-formats": "^3.0.1"
"ajv-formats": "^3.0.1",
"semver": "^7.6.3",
"slim-select": "^2.8.1"
},
"svelte": "./dist/index.js",
"types": "./dist/index.d.ts",
"type": "module",
"bundleDependencies": [
"ajv/dist/ajv",
"ajv/dist/2020",
"ajv-formats"
"ajv-formats",
"semver",
"slim-select"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
import { onMount } from 'svelte';
import { buildWorkflowTaskTableRows, sortVersions } from '../tasks/task_group_utilities';
import SlimSelect from 'slim-select';
import ColouredBadge from '$lib/components/common/ColouredBadge.svelte';
import BooleanIcon from '$lib/components/common/BooleanIcon.svelte';
import ColouredBadge from '../common/ColouredBadge.svelte';
import BooleanIcon from '../common/BooleanIcon.svelte';
/** @type {Array<import('$lib/types-v2').TaskGroupV2>} */
/** @type {Array<import('../types/api').TaskGroupV2>} */
export let taskGroups;
/** @type {import('$lib/types-v2').WorkflowTasksTableRowGroup[]} */
/** @type {import('../types/api').WorkflowTasksTableRowGroup[]} */
let allRows = [];
/** @type {import('$lib/types-v2').WorkflowTasksTableRowGroup[]} */
/** @type {import('../types/api').WorkflowTasksTableRowGroup[]} */
let filteredRows = [];
let groupBy = 'pkg_name';
Expand Down Expand Up @@ -74,7 +74,7 @@
}
/**
* @param {import('$lib/types-v2').TasksTableRow} row
* @param {import('../types/api').TasksTableRow} row
*/
function filterRow(row) {
return (
Expand All @@ -88,7 +88,7 @@
}
/**
* @param {import('$lib/types-v2').TasksTableRow} row
* @param {import('../types/api').TasksTableRow} row
* @returns {boolean}
*/
function genericSearchMatch(row) {
Expand All @@ -108,7 +108,7 @@
}
/**
* @param {import('$lib/types-v2').TasksTableRow} row
* @param {import('../types/api').TasksTableRow} row
* @returns {boolean}
*/
function categoryMatch(row) {
Expand All @@ -119,7 +119,7 @@
}
/**
* @param {import('$lib/types-v2').TasksTableRow} row
* @param {import('../types/api').TasksTableRow} row
* @returns {boolean}
*/
function modalityMatch(row) {
Expand All @@ -130,7 +130,7 @@
}
/**
* @param {import('$lib/types-v2').TasksTableRow} row
* @param {import('../types/api').TasksTableRow} row
* @returns {boolean}
*/
function packageMatch(row) {
Expand All @@ -141,7 +141,7 @@
}
/**
* @param {import('$lib/types-v2').TasksTableRow} row
* @param {import('../types/api').TasksTableRow} row
* @returns {boolean}
*/
function tagMatch(row) {
Expand All @@ -152,7 +152,7 @@
}
/**
* @param {import('$lib/types-v2').TasksTableRow} row
* @param {import('../types/api').TasksTableRow} row
* @returns {boolean}
*/
function inputTypeMatch(row) {
Expand All @@ -173,7 +173,7 @@
}
/**
* @param {import('$lib/types-v2').TaskGroupV2[]} taskGroups
* @param {import('../types/api').TaskGroupV2[]} taskGroups
*/
function setFiltersValues(taskGroups) {
setSelectorData(
Expand Down Expand Up @@ -224,8 +224,8 @@
}
/**
* @param {Array<import('$lib/types-v2').TaskGroupV2>} taskGroups
* @param {(task: import('$lib/types-v2').TaskV2) => string | null} mapper
* @param {Array<import('../types/api').TaskGroupV2>} taskGroups
* @param {(task: import('../types/api').TaskV2) => string | null} mapper
* @returns {string[]}
*/
function extractSlimSelectTaskValues(taskGroups, mapper) {
Expand All @@ -247,7 +247,7 @@
}
/**
* @param {import('$lib/types-v2').TasksTableRow} taskProperties
* @param {import('../types/api').TasksTableRow} taskProperties
*/
function getMetadataCell(taskProperties) {
const values = [];
Expand Down
Loading

0 comments on commit c017256

Please sign in to comment.