@molgenis/vip-report-template 5.2.2 → 5.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@molgenis/vip-report-template",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.3.0",
|
|
4
4
|
"description": "Report Template for Variant Call Format (VCF) Report Generator",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "vite build",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"@molgenis/vip-report-vcf": "^1.3.5",
|
|
41
41
|
"@solidjs/router": "^0.8.2",
|
|
42
42
|
"base64-js": "^1.5.1",
|
|
43
|
-
"igv": "^2.15.
|
|
43
|
+
"igv": "^2.15.4",
|
|
44
44
|
"solid-js": "^1.7.3"
|
|
45
45
|
},
|
|
46
46
|
"lint-staged": {
|
|
@@ -11,6 +11,7 @@ import { isAnyCsqInfo, isCsqInfo } from "../../utils/csqUtils";
|
|
|
11
11
|
import { Vkgl } from "./info/Vkgl";
|
|
12
12
|
import { InheritanceModes } from "./info/InheritanceModes";
|
|
13
13
|
import { Hpo } from "./info/Hpo";
|
|
14
|
+
import { VipC } from "./info/VipC";
|
|
14
15
|
|
|
15
16
|
export const Info: Component<{
|
|
16
17
|
info: FieldValue;
|
|
@@ -46,6 +47,9 @@ export const Info: Component<{
|
|
|
46
47
|
<Match when={isCsqInfo(props.infoMeta, "HPO")}>
|
|
47
48
|
<Hpo {...props} />
|
|
48
49
|
</Match>
|
|
50
|
+
<Match when={isCsqInfo(props.infoMeta, "VIPC")}>
|
|
51
|
+
<VipC {...props} />
|
|
52
|
+
</Match>
|
|
49
53
|
</Switch>
|
|
50
54
|
);
|
|
51
55
|
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Component, Show } from "solid-js";
|
|
2
|
+
import { Abbr } from "../../Abbr";
|
|
3
|
+
import { FieldProps } from "../field/Field";
|
|
4
|
+
import { ValueString } from "@molgenis/vip-report-vcf/src/ValueParser";
|
|
5
|
+
import { getCsqInfo, getCsqInfoIndex } from "../../../utils/csqUtils";
|
|
6
|
+
|
|
7
|
+
export const VipC: Component<FieldProps> = (props) => {
|
|
8
|
+
const value = () => props.info.value as ValueString;
|
|
9
|
+
const description = () => {
|
|
10
|
+
const fieldIndex = getCsqInfoIndex(props.infoMeta, "VIPP");
|
|
11
|
+
return fieldIndex !== -1 ? (getCsqInfo(props.info, fieldIndex) as ValueString[]) : null;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
return (
|
|
15
|
+
<Show when={value()} keyed>
|
|
16
|
+
{(value) => (
|
|
17
|
+
<Show when={description()} fallback={value} keyed>
|
|
18
|
+
{(description) => <Abbr title={description.join(", ")} value={value} />}
|
|
19
|
+
</Show>
|
|
20
|
+
)}
|
|
21
|
+
</Show>
|
|
22
|
+
);
|
|
23
|
+
};
|