Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 0.4.3 #147

Merged
merged 24 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
7e3a3d9
chore: activate project-manager in demo environment
torbrenner Oct 2, 2024
ac0afa9
fix: convert backgroundcolor from string to string array
patrickskowronekdkfz Oct 15, 2024
20e9b57
Merge pull request #137 from samply/fix/passedchartcolors
patrickskowronekdkfz Oct 15, 2024
6f7f45f
fix: fix passing group range to charts
patrickskowronekdkfz Oct 15, 2024
32db431
Merge pull request #138 from samply/fix/chartrange
torbrenner Oct 16, 2024
a2c70cf
chore: added dktk-datashield-test
patrickskowronekdkfz Oct 16, 2024
8c1dd83
Merge pull request #136 from samply/chore/activate-project-manager-on…
patrickskowronekdkfz Oct 16, 2024
af21b67
feat: activate negotiate button
torbrenner Oct 24, 2024
f66d47e
Merge pull request #139 from samply/feature/activate-negogiate-button
patrickskowronekdkfz Oct 24, 2024
7357aef
fix: info and search button with empty second empty query input
patrickskowronekdkfz Oct 28, 2024
3b92d17
Merge pull request #140 from samply/fix/QueryButtonMLines
patrickskowronekdkfz Oct 28, 2024
68ebbac
fix: added missing date option in fieldType enum of catalogue schema
thkoehler11 Oct 28, 2024
95741dc
feat: implement bbmri negotiator
patrickskowronekdkfz Oct 29, 2024
070a2c4
feat: seperate bbmri and ccp data requests
patrickskowronekdkfz Oct 30, 2024
3f7e830
fix: changed to datarequestsstore
patrickskowronekdkfz Oct 30, 2024
54e35da
chore: remove negotiate button
patrickskowronekdkfz Oct 30, 2024
ef908ed
chore: formating
patrickskowronekdkfz Oct 30, 2024
6898cc9
Merge pull request #142 from samply/fix/NeotiatorConnection
patrickskowronekdkfz Oct 30, 2024
3b5ab93
Merge pull request #144 from samply/fix/add-missing-date-option-in-ca…
patrickskowronekdkfz Oct 30, 2024
bc1db18
fix: infobutton interface
patrickskowronekdkfz Oct 30, 2024
25d1e3b
Merge pull request #145 from samply/fix/infobutton_interface
patrickskowronekdkfz Oct 30, 2024
755e662
chore: remove unsed definition
patrickskowronekdkfz Oct 30, 2024
a88571f
Merge pull request #146 from samply/fix/negptiatorOptions
patrickskowronekdkfz Oct 30, 2024
33c9c95
build: release version 0.4.3
torbrenner Oct 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@samply/lens",
"description": "A web component library for clinical data search and visualisation",
"version": "0.4.2",
"version": "0.4.3",
"type": "module",
"module": "dist/lens.js",
"main": "dist/lens.umd.js",
Expand Down
72 changes: 72 additions & 0 deletions packages/demo/public/options-ccp-demo.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"wuerzburg": "Würzburg",
"mannheim": "Mannheim",
"dktk-test": "DKTK-Test",
"dktk-datashield-test": "DKTK Datashield Test",
"hamburg": "Hamburg"
},
"catalogueKeyToResponseKeyMap": [
Expand Down Expand Up @@ -70,6 +71,8 @@
"ulm": "Ulm",
"wuerzburg": "Würzburg",
"mannheim": "Mannheim",
"dktk-test": "DKTK-Test",
"dktk-datashield-test": "DKTK Datashield Test",
"hamburg": "Hamburg"
}
},
Expand Down Expand Up @@ -260,6 +263,8 @@
"backendMeasures": "DKTK_STRAT_DEF_IN_INITIAL_POPULATION",
"url": "https://backend.demo.lens.samply.de/prod/",
"sites": [
"dktk-test",
"dktk-datashield-test",
"berlin",
"berlin-test",
"dresden",
Expand All @@ -277,5 +282,72 @@
]
}
]
},
"negotiateOptions": {
"negotiateApp": "project-manager",
"newProjectUrl": "https://e260-ccp-req/project-manager/create-query-and-design-project",
"editProjectUrl": "https://e260-ccp-req/project-manager/edit-project",
"siteMapping": [
{
"site": "dktk-test",
"collection": "lens-dktk-test"
},
{
"site": "dktk-datashield-test",
"collection": "lens-dktk-datashield-test"
},
{
"site": "Berlin",
"collection": "lens-berlin"
},
{
"site": "Dresden",
"collection": "lens-dresden"
},
{
"site": "Essen",
"collection": "lens-essen"
},
{
"site": "Frankfurt",
"collection": "lens-frankfurt"
},
{
"site": "Freiburg",
"collection": "lens-freiburg"
},
{
"site": "Hannover",
"collection": "lens-hannover"
},
{
"site": "Mainz",
"collection": "lens-mainz"
},
{
"site": "München LMU",
"collection": "lens-muenchen-lmu"
},
{
"site": "München TUM",
"collection": "lens-muenchen-tum"
},
{
"site": "Ulm",
"collection": "lens-ulm"
},
{
"site": "Würzburg",
"collection": "lens-wuerzburg"
},
{
"site": "Mannheim",
"collection": "lens-mannheim"
},
{
"site": "Hamburg",
"collection": "lens-hamburg"
}
]
}
}
2 changes: 0 additions & 2 deletions packages/demo/src/AppCCP.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,6 @@
<lens-search-modified-display
>Diagramme repräsentieren nicht mehr die aktuelle Suche!</lens-search-modified-display
>
<!-- TODO: comment in when backend is ready -->
<!-- <lens-negotiate-button /> -->
</div>
<div class="chart-wrapper">
<lens-chart
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import {
getHumanReadableQuery,
buildHumanReadableRecursively,
} from "../../stores/negotiate";
} from "../../stores/datarequests";
import { returnNestedValues } from "../../helpers/ast-transformer";
import type { AstElement } from "../../types/ast";
import type { QueryItem } from "../../types/queryData";
Expand All @@ -33,6 +33,10 @@
};

const displayQueryInfo = (e: MouseEvent, queryItem?: QueryItem): void => {
if (typeof message == "string") {
message = message.split(",");
}

const target: HTMLElement = e.target as HTMLElement;
if (showQuery) {
if (onlyChildInfo && queryItem !== undefined) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@
/>

<script lang="ts">
import { negotiate, negotiateStore } from "../../stores/negotiate";
import { datarequestsStore } from "../../stores/datarequests";
import { negotiate } from "../../services/bbmriNegotiate.ts";

export let title: string = "Negotiate with biobanks";
let disabled: boolean = false;
</script>

<button
part={`lens-negotiate-button lens-negotiate-button-${
disabled ? "disabled" : "active"
$datarequestsStore.length === 0 ? "disabled" : "active"
}`}
on:click={() => negotiate($negotiateStore)}
{disabled}
on:click={() => negotiate($datarequestsStore)}
disabled={$datarequestsStore.length === 0}
>
<div part="lens-negotiate-button-title">
{title}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@

const ast = buildAstFromQuery($queryStore);

if (ast.children.includes(null)) {
alert(
"No query entered in one of the queries. You can enter a query or remove the query fields.",
);
return;
}

options?.spots?.forEach((spot: SpotOption) => {
const name = spot.name;
const measureItem: MeasureOption | undefined = $measureStore.find(
Expand Down
9 changes: 9 additions & 0 deletions packages/lib/src/components/results/ChartComponent.wc.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,11 @@
): ChartDataSets => {
let dataSet: number[];

// This is bad. For some reason the passed value is a string not a array of strings. With this conversion it does work!
if (typeof backgroundColor == "string") {
backgroundColor = backgroundColor.split(",");
}

if (perSite) {
dataSet = chartLabels.map((label: string) => {
const site: Site | undefined = responseStore.get(label);
Expand Down Expand Up @@ -431,6 +436,10 @@
chart.data.datasets = chartData.data;
chartLabels = chartData.labels;

if (typeof groupRange == "string") {
groupRange = Number(groupRange);
}

/**
* lets the user define a range for the labels when only single values are used eg. '60' -> '60 - 69'
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<script lang="ts">
import { uiSiteMappingsStore } from "../../stores/mappings";
import { negotiateStore } from "../../stores/negotiate";
import { datarequestsStore } from "../../stores/datarequests.ts";
import {
getSitePopulationForCode,
getSitePopulationForStratumCode,
Expand Down Expand Up @@ -134,21 +134,21 @@
);

/**
* watches the negotiateStore for changes to check or uncheck the checkbox
* watches the datarequestsStore for changes to check or uncheck the checkbox
*/
let allChecked: boolean = false;
$: allChecked =
$negotiateStore.length === tableRowData.length &&
$datarequestsStore.length === tableRowData.length &&
tableRowData.length !== 0;

/**
* checks or unchecks all biobanks
*/
const checkAllBiobanks = (): void => {
if (allChecked) {
$negotiateStore = [];
$datarequestsStore = [];
} else {
$negotiateStore = tableRowData.map(
$datarequestsStore = tableRowData.map(
(tableRow: (string | number)[]) => tableRow[0] as string,
);
}
Expand Down
8 changes: 4 additions & 4 deletions packages/lib/src/components/results/TableItemComponent.svelte
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
<script lang="ts">
import { negotiateStore } from "../../stores/negotiate";
import { datarequestsStore } from "../../stores/datarequests";

export let tableRow: (string | number)[];

let checked: boolean = false;
$: checked = $negotiateStore.includes(tableRow[0] as string);
$: checked = $datarequestsStore.includes(tableRow[0] as string);

/**
* adds and removes tableRows from the negotiateStore whenever the checkbox is checked or unchecked
*/
const updateStoreOnCheck = (): void => {
if (!checked) {
negotiateStore.update((store: string[]) => {
datarequestsStore.update((store: string[]) => {
return [...store, tableRow[0] as string];
});
}
if (checked) {
negotiateStore.update((store: string[]) => {
datarequestsStore.update((store: string[]) => {
return store.filter((site: string) => site !== tableRow[0]);
});
}
Expand Down
Loading
Loading