diff --git a/package-lock.json b/package-lock.json index 5a302b8c..174d0715 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@samply/lens", - "version": "0.0.5", + "version": "0.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@samply/lens", - "version": "0.0.5", + "version": "0.1.0", "license": "MIT", "dependencies": { "chart.js": "^4.4.0", diff --git a/package.json b/package.json index 784a10aa..a3da007d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@samply/lens", "description": "A web component library for clinical data search and visualisation", - "version": "0.0.5", + "version": "0.1.0", "type": "module", "module": "dist/lens.js", "main": "dist/lens.umd.js", diff --git a/packages/demo/public/catalogues/catalogue-dktk.json b/packages/demo/public/catalogues/catalogue-dktk.json index 489432e9..fcf31fb5 100644 --- a/packages/demo/public/catalogues/catalogue-dktk.json +++ b/packages/demo/public/catalogues/catalogue-dktk.json @@ -19017,52 +19017,173 @@ { "key": "(sn)(mol+)", "name": "(sn)(mol+)", - "description": "(sn)(mol+)" + "description": "(sn)(mol+)", + "aggregatedValue": [ + [ + { + "value": "21906-3", + "name": "(sn)(mol+)" + }, + { + "value": "21900-6", + "name": "(sn)(mol+)" + } + ] + ] }, { "key": "(sn)(mol-)", "name": "(sn)(mol-)", - "description": "(sn)(mol-)" + "description": "(sn)(mol-)", + "aggregatedValue": [ + [ + { + "value": "21906-3", + "name": "(sn)(mol-)" + }, + { + "value": "21900-6", + "name": "(sn)(mol-)" + } + ] + ] }, { "key": "(sn)(i+)", "name": "(sn)(i+)", - "description": "(sn)(i+)" + "description": "(sn)(i+)", + "aggregatedValue": [ + [ + { + "value": "21906-3", + "name": "(sn)(i+)" + }, + { + "value": "21900-6", + "name": "(sn)(i+)" + } + ] + ] }, { "key": "(sn)(i-)", "name": "(sn)(i-)", - "description": "(sn)(i-)" + "description": "(sn)(i-)", + "aggregatedValue": [ + [ + { + "value": "21906-3", + "name": "(sn)(i-)" + }, + { + "value": "21900-6", + "name": "(sn)(i-)" + } + ] + ] }, { "key": "(mol+)", "name": "(mol+)", - "description": "(mol+)" + "description": "(mol+)", + "aggregatedValue": [ + [ + { + "value": "21906-3", + "name": "(mol+)" + }, + { + "value": "21900-6", + "name": "(mol+)" + } + ] + ] }, { "key": "(mol-)", "name": "(mol-)", - "description": "(mol-)" + "description": "(mol-)", + "aggregatedValue": [ + [ + { + "value": "21906-3", + "name": "(mol-)" + }, + { + "value": "21900-6", + "name": "(mol-)" + } + ] + ] }, { "key": "(i+)", "name": "(i+)", - "description": "(i+)" + "description": "(i+)", + "aggregatedValue": [ + [ + { + "value": "21906-3", + "name": "(i+)" + }, + { + "value": "21900-6", + "name": "(i+)" + } + ] + ] }, { "key": "(i-)", "name": "(i-)", - "description": "(i-)" + "description": "(i-)", + "aggregatedValue": [ + [ + { + "value": "21906-3", + "name": "(i-)" + }, + { + "value": "21900-6", + "name": "(i-)" + } + ] + ] }, { "key": "X", "name": "X", - "description": "X" + "description": "X", + "aggregatedValue": [ + [ + { + "value": "21906-3", + "name": "X" + }, + { + "value": "21900-6", + "name": "X" + } + ] + ] }, { "key": "X(sn)", "name": "X(sn)", "description": "X(sn)" + , + "aggregatedValue": [ + [ + { + "value": "21906-3", + "name": "X(sn)" + }, + { + "value": "21900-6", + "name": "X(sn)" + } + ] + ] }, { "key": "0", @@ -19084,7 +19205,19 @@ { "key": "0(sn)", "name": "0(sn)", - "description": "0(sn)" + "description": "0(sn)", + "aggregatedValue": [ + [ + { + "value": "21906-3", + "name": "0(sn)" + }, + { + "value": "21900-6", + "name": "0(sn)" + } + ] + ] }, { "key": "0(i+)", @@ -19604,11 +19737,11 @@ "aggregatedValue": [ [ { - "value": "59479-6", + "value": "42030-7", "name": "m" }, { - "value": "59479-6", + "value": "42030-7", "name": "m" } ] @@ -19625,7 +19758,7 @@ "name": "2" }, { - "value": "59479-6", + "value": "42030-7", "name": "2" } ] @@ -19638,11 +19771,11 @@ "aggregatedValue": [ [ { - "value": "59479-6", + "value": "42030-7", "name": "3" }, { - "value": "59479-6", + "value": "42030-7", "name": "3" } ] @@ -19655,11 +19788,11 @@ "aggregatedValue": [ [ { - "value": "59479-6", + "value": "42030-7", "name": "4" }, { - "value": "59479-6", + "value": "42030-7", "name": "4" } ] @@ -19672,11 +19805,11 @@ "aggregatedValue": [ [ { - "value": "59479-6", + "value": "42030-7", "name": "5" }, { - "value": "59479-6", + "value": "42030-7", "name": "5" } ] @@ -19689,11 +19822,11 @@ "aggregatedValue": [ [ { - "value": "59479-6", + "value": "42030-7", "name": "6" }, { - "value": "59479-6", + "value": "42030-7", "name": "6" } ] @@ -19706,11 +19839,11 @@ "aggregatedValue": [ [ { - "value": "59479-6", + "value": "42030-7", "name": "7" }, { - "value": "59479-6", + "value": "42030-7", "name": "7" } ] @@ -19723,11 +19856,11 @@ "aggregatedValue": [ [ { - "value": "59479-6", + "value": "42030-7", "name": "8" }, { - "value": "59479-6", + "value": "42030-7", "name": "8" } ] @@ -19740,11 +19873,11 @@ "aggregatedValue": [ [ { - "value": "59479-6", + "value": "42030-7", "name": "9" }, { - "value": "59479-6", + "value": "42030-7", "name": "9" } ] @@ -19766,11 +19899,11 @@ "aggregatedValue": [ [ { - "value": "21983-2", + "value": "59479-6", "name": "y" }, { - "value": "21983-2", + "value": "59479-6", "name": "y" } ] diff --git a/packages/demo/public/options.json b/packages/demo/public/options.json index 54c35908..262f46f5 100644 --- a/packages/demo/public/options.json +++ b/packages/demo/public/options.json @@ -1,6 +1,9 @@ { "iconOptions": { - "infoUrl": "info-circle-svgrepo-com.svg" + "infoUrl": "info-circle-svgrepo-com.svg", + "selectAll": { + "text": "Add all" + } }, "chartOptions": { "patients": { diff --git a/packages/lib/src/components/Options.wc.svelte b/packages/lib/src/components/Options.wc.svelte index a2c78a84..f2bc28fb 100644 --- a/packages/lib/src/components/Options.wc.svelte +++ b/packages/lib/src/components/Options.wc.svelte @@ -35,6 +35,22 @@ ) { store.set("infoUrl", options.iconOptions.infoUrl); } + if ( + "selectAll" in options.iconOptions && + typeof options.iconOptions["selectAll"] === "object" && + options.iconOptions.selectAll + ) { + // Allow for future possibility of iconUrl instead of text + if ( + "text" in options.iconOptions.selectAll && + typeof options.iconOptions.selectAll["text"] === + "string" + ) + store.set( + "selectAllText", + options.iconOptions.selectAll.text, + ); + } } } diff --git a/packages/lib/src/components/catalogue/DataTreeElement.svelte b/packages/lib/src/components/catalogue/DataTreeElement.svelte index 9c14d7f9..a70438dd 100644 --- a/packages/lib/src/components/catalogue/DataTreeElement.svelte +++ b/packages/lib/src/components/catalogue/DataTreeElement.svelte @@ -1,4 +1,5 @@
@@ -160,6 +193,12 @@ {/if} + {#if finalParent && open} + + {/if} + {#if open} {#if "childCategories" in element} {#each element.childCategories as child} diff --git a/packages/lib/src/components/search-bar/SearchBarMultipleComponent.wc.svelte b/packages/lib/src/components/search-bar/SearchBarMultipleComponent.wc.svelte index 6b56b8d5..443eb63c 100644 --- a/packages/lib/src/components/search-bar/SearchBarMultipleComponent.wc.svelte +++ b/packages/lib/src/components/search-bar/SearchBarMultipleComponent.wc.svelte @@ -10,17 +10,10 @@ />