Skip to content

Commit

Permalink
feat(result-table): add slots
Browse files Browse the repository at this point in the history
feat(result-table config): remove info button
feat(catalogue): remove not needed
biosamples
feat(chart): filter out not needed biosamples
  • Loading branch information
MatsJohansen87 committed Nov 7, 2023
1 parent 8012e0d commit 8b82244
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 26 deletions.
5 changes: 0 additions & 5 deletions packages/demo/public/catalogues/catalogue-dktk.json
Original file line number Diff line number Diff line change
Expand Up @@ -19236,11 +19236,6 @@
"name": "Liquor/CSF",
"description": "Liquor/CSF"
},
{
"key": "stool-faeces",
"name": "Stuhl/Kot",
"description": "Stuhl/Kot"
},
{
"key": "bone-marrow",
"name": "Knochenmark",
Expand Down
25 changes: 12 additions & 13 deletions packages/demo/public/options.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,23 +80,23 @@
"Verteilung der Probentypen die mit den identifizierten Patienten verbunden sind."
],
"tooltips": {
"tissue-ffpe": "Gewebe FFPE",
"tissue-frozen": "Gewebe schockgefroren",
"tissue-other": "Gewebe, Andere Konservierungsart",
"whole-blood": "Vollblut",
"bone-marrow": "Knochenmark",
"blood-serum": "Serum",
"blood-plasma": "Plasma",
"buffy-coat": "Buffycoat",
"dried-whole-blood": "Blutkarten",
"peripheral-blood-cells": "Periphere mononukleäre Blutzellen (PBMC)",
"blood-plasma": "Plasma",
"blood-serum": "Serum",
"dried-whole-blood": "Blutkarten",
"swab": "Abstrich",
"ascites": "Aszites",
"csf-liquor": "Liquor",
"saliva": "Speichel",
"stool-faeces": "Stuhl",
"urine": "Urin",
"swab": "Abstrich",
"csf-liquor": "Liquor",
"bone-marrow": "Knochenmark",
"saliva": "Speichel",
"liquid-other": "Flüssigprobe, Andere",
"tissue-ffpe": "Gewebe FFPE",
"tissue-frozen": "Gewebe schockgefroren",
"tissue-other": "Gewebe, Andere Konservierungsart",
"dna": "DNA",
"rna": "RNA",
"derivative-other": "Derivat, Andere"
Expand All @@ -114,9 +114,8 @@
"dataKey": "patients"
},
{
"title": "Bioproben",
"dataKey": "specimen",
"hintText": ["Es sind in der Regel auch FFPE-Gewebeproben verfügbar"]
"title": "Bioproben*",
"dataKey": "specimen"
}
]
}
Expand Down
7 changes: 6 additions & 1 deletion packages/demo/src/AppCCP.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,11 @@
/>
</div>
<div class="chart-wrapper result-table">
<lens-result-table pageSize="10" />
<lens-result-table pageSize="10" >
<div slot="above-pagination" class="result-table-hint-text">
* Es sind in der Regel auch FFPE-Gewebeproben verfügbar
</div>
</lens-result-table>
</div>
<div class="chart-wrapper">
<lens-chart
Expand Down Expand Up @@ -294,6 +298,7 @@
chartType="bar"
xAxisTitle="Probentypen"
yAxisTitle="Probenanzahl"
filterRegex="^(?!(tissue-other|buffy-coat|peripheral-blood-cells|dried-whole-blood|swab|ascites|stool-faeces|saliva|liquid-other|derivative-other))"
>
<div class="sample-information-text">* Es sind in der Regel auch FFPE-Gewebeproben verfügbar</div>
</lens-chart>
Expand Down
5 changes: 5 additions & 0 deletions packages/demo/src/ccp.css
Original file line number Diff line number Diff line change
Expand Up @@ -372,4 +372,9 @@ lens-info-button::part(info-button-icon) {
.catalogue lens-info-button::part(info-button-dialogue){
max-width: 300px;
text-align: left;
}

.result-table-hint-text {
display: flex;
align-items: end;
}
2 changes: 1 addition & 1 deletion packages/demo/src/styles/default/result-table.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
lens-result-table {
background-color: var(--white);
display: grid;
grid-template-rows: auto auto 1fr;
grid-template-rows: auto auto 1fr auto auto;
}

lens-result-table::part(result-table-title) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
$: responseGroupCode =
$catalogueKeyToResponseKeyMap.get(catalogueGroupCode);
export let tooltips: Map<string, string> = new Map<string, string>();
export let headers: Map<string, string> = new Map<string, string>();
export let displayLegends: boolean = false;
export let chartType: keyof ChartTypeRegistry = "pie";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@
{/each}
</tbody>
</table>
<slot name="above-pagination"/>
<div part="table-pagination">
<button
part="table-pagination-button pagination-pagination-previous"
Expand All @@ -194,10 +195,11 @@
>
<div part="table-pagination-pagenumber">{activePage}</div>
<button
part="table-pagination-button pagination-pagination-next"
disabled={activePage === Math.ceil(tableRowData.length / pageSize)}
on:click={() => {
activePage = activePage + 1;
}}>&#8594;</button
part="table-pagination-button pagination-pagination-next"
disabled={activePage === Math.ceil(tableRowData.length / pageSize)}
on:click={() => {
activePage = activePage + 1;
}}>&#8594;</button
>
</div>
<slot name="beneath-pagination"/>

0 comments on commit 8b82244

Please sign in to comment.