From c63ce3e667a08e4e5f6ebb46001aad30d4f329b6 Mon Sep 17 00:00:00 2001 From: Daniela Date: Thu, 28 Mar 2024 08:43:14 +0100 Subject: [PATCH 01/16] add new cell line color --- src/app/constants.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/constants.tsx b/src/app/constants.tsx index 5d39fd600..6ff05e6ed 100644 --- a/src/app/constants.tsx +++ b/src/app/constants.tsx @@ -39,7 +39,7 @@ export const DEFAULT_MANTINE_PROVIDER_PROPS: Omit Date: Thu, 28 Mar 2024 13:36:46 +0100 Subject: [PATCH 02/16] blubb --- src/app/constants.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/constants.tsx b/src/app/constants.tsx index 6ff05e6ed..d81b83e2e 100644 --- a/src/app/constants.tsx +++ b/src/app/constants.tsx @@ -39,7 +39,7 @@ export const DEFAULT_MANTINE_PROVIDER_PROPS: Omit Date: Thu, 28 Mar 2024 14:34:12 +0100 Subject: [PATCH 03/16] chore: prepare next dev release --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f039564f2..f3fc825cb 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "visyn_core", "description": "Core repository for datavisyn applications.", - "version": "9.2.0", + "version": "9.2.1-SNAPSHOT", "author": { "name": "datavisyn GmbH", "email": "contact@datavisyn.io", From d431a7e2fab17dc4cba2d82ddb3a9c83a0b58b70 Mon Sep 17 00:00:00 2001 From: Daniela Date: Tue, 2 Apr 2024 13:23:53 +0200 Subject: [PATCH 04/16] update gene and chem structure ic ons --- src/icons/EntityIcons.tsx | 4 ++-- src/icons/Icons.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/icons/EntityIcons.tsx b/src/icons/EntityIcons.tsx index 31fda99ca..e06769568 100644 --- a/src/icons/EntityIcons.tsx +++ b/src/icons/EntityIcons.tsx @@ -9,8 +9,8 @@ export const dvGene: IconDefinition = { [], null, ` - M216.615 11.6565C215.873 4.79298 209.708 -0.169664 202.844 0.572524C195.98 1.31447 191.018 7.47999 191.76 14.3435L200.072 91.2341C200.086 91.356 200.1 91.4773 200.117 91.5986L208.4 151.651C209.872 166.085 208.132 176.835 204.653 184.736C201.221 192.53 195.799 198.249 188.588 202.313C173.603 210.758 150.091 212.382 121.507 206.492C114.746 205.098 108.135 209.45 106.742 216.211C105.348 222.973 109.7 229.584 116.461 230.977C147.394 237.352 178.14 236.898 200.862 224.093C212.504 217.532 221.798 207.833 227.532 194.813C233.203 181.937 235.08 166.54 233.246 148.865C233.231 148.726 233.214 148.587 233.195 148.448L226.843 102.391H279C285.904 102.391 291.5 96.7942 291.5 89.8906C291.5 82.9871 285.904 77.3906 279 77.3906H223.721L216.615 11.6565ZM247.839 39.1611C242.957 34.2796 235.043 34.2796 230.161 39.1611C225.28 44.0427 225.28 51.9573 230.161 56.8389L241.161 67.8389C246.043 72.7205 253.957 72.7205 258.839 67.8389C263.72 62.9573 263.72 55.0427 258.839 50.1611L247.839 39.1611ZM81.4922 148.448C79.6178 134.86 80.7717 124.554 83.7753 116.776C86.7137 109.166 91.6991 103.234 98.9062 98.6416C113.977 89.0393 139.112 85.1265 174.14 87.8074C181.023 88.3342 187.031 83.1812 187.557 76.2976C188.084 69.4143 182.931 63.407 176.048 62.8801C139.622 60.0923 107.609 63.4529 85.4723 77.5576C74.076 84.8191 65.4434 94.8486 60.4536 107.771C55.5347 120.509 54.447 135.287 56.719 151.808L63.2053 202.078H13C6.09644 202.078 0.5 207.675 0.5 214.578C0.5 221.482 6.09644 227.078 13 227.078H66.4312L73.3372 280.6C74.2206 287.447 80.4872 292.281 87.334 291.397C94.1808 290.514 99.015 284.247 98.1316 277.4L89.8191 212.979L81.5066 148.557L81.4922 148.448ZM166.339 98.7861C161.457 93.9046 153.543 93.9046 148.661 98.7861C143.78 103.668 143.78 111.582 148.661 116.464L176.161 143.964C181.043 148.845 188.957 148.845 193.839 143.964C198.72 139.082 198.72 131.168 193.839 126.286L166.339 98.7861ZM121.683 108.161C116.801 103.28 108.886 103.28 104.005 108.161C99.1234 113.043 99.1234 120.957 104.005 125.839L168.161 189.995C173.043 194.877 180.957 194.877 185.839 189.995C190.72 185.114 190.72 177.199 185.839 172.317L121.683 108.161ZM114.651 155.161C109.77 150.28 101.855 150.28 96.9736 155.161C92.0922 160.043 92.0922 167.957 96.9736 172.839L119.474 195.339C124.355 200.22 132.27 200.22 137.151 195.339C142.033 190.457 142.033 182.543 137.151 177.661L114.651 155.161ZM50.3389 234.661C45.4573 229.78 37.5427 229.78 32.6611 234.661C27.7795 239.543 27.7795 247.457 32.6611 252.339L43.6611 263.339C48.5427 268.22 56.4573 268.22 61.3389 263.339C66.2205 258.457 66.2205 250.543 61.3389 245.661L50.3389 234.661Z - `, + M173.355 25.3617C180.182 24.3374 184.886 17.9727 183.862 11.1455C182.837 4.31833 176.473 -0.385887 169.646 0.638325C158.037 2.37981 136.511 9.10281 125.206 30.659C115.031 46.2112 114.691 63.4842 118.86 85.3133C118.891 85.4713 118.924 85.6287 118.96 85.7854L130.548 135.879L130.555 135.909L142.562 189.025C146.171 208.083 143.914 218.679 138.634 226.514C129.509 240.055 116.089 243.833 103.649 246.225C96.8697 247.529 92.4308 254.081 93.7345 260.861C95.0382 267.64 101.591 272.079 108.37 270.775C121.93 268.167 144.29 262.857 159.366 240.485C169.749 225.078 171.416 206.842 167.079 184.134C167.07 184.082 167.059 184.03 167.049 183.979C167.031 183.893 167.013 183.808 166.994 183.722L154.926 130.336L154.912 130.275L143.372 80.3903C139.655 60.7883 141.298 51.5062 146.366 43.9854C146.654 43.5574 146.916 43.1119 147.149 42.6515C153.021 31.0685 165.086 26.6021 173.355 25.3617ZM177.717 40.8555C172.44 36.4052 164.554 37.0759 160.103 42.3536C155.653 47.6313 156.324 55.5174 161.601 59.9677L226.796 114.941C232.073 119.391 239.959 118.721 244.41 113.443C248.86 108.165 248.189 100.279 242.911 95.8288L177.717 40.8555ZM284.459 75.4919C283.901 68.6109 277.87 63.4852 270.989 64.0433C264.108 64.6014 258.983 70.6319 259.541 77.5129C260.465 88.9116 257.905 108.812 247.326 121.002C235.701 132.777 217.855 136.565 179.819 136.904C172.915 136.965 167.369 142.612 167.431 149.515C167.492 156.418 173.139 161.964 180.042 161.903C217.436 161.569 245.742 158.486 265.46 138.216C265.6 138.072 265.737 137.924 265.87 137.773C283.051 118.313 285.645 90.1108 284.459 75.4919ZM173.922 84.627C168.644 80.1767 160.758 80.8475 156.307 86.1252C151.857 91.4029 152.528 99.289 157.806 103.739L185.75 127.303C191.028 131.753 198.914 131.083 203.365 125.805C207.815 120.527 207.144 112.641 201.866 108.191L173.922 84.627ZM106.121 132.543C68.6722 132.877 52.1768 136.585 40.5296 148.141C30.3247 162.127 25.836 174.602 25.3598 182.837C24.9612 189.729 19.0509 194.993 12.1589 194.594C5.26685 194.196 0.00287565 188.285 0.401472 181.393C1.26152 166.522 8.65481 149.168 20.9551 132.56C21.2878 132.111 21.6502 131.685 22.04 131.284C41.6982 111.075 68.2976 107.879 105.898 107.544C112.801 107.482 118.448 113.029 118.509 119.932C118.571 126.835 113.024 132.481 106.121 132.543ZM100.189 142.144C94.9117 137.694 87.0256 138.364 82.5753 143.642C78.1251 148.92 78.7958 156.806 84.0735 161.256L112.018 184.82C117.296 189.27 125.182 188.599 129.632 183.322C134.083 178.044 133.412 170.158 128.134 165.708L100.189 142.144ZM59.1443 154.506C53.8666 150.056 45.9806 150.726 41.5303 156.004C37.08 161.282 37.7507 169.168 43.0284 173.618L108.222 228.591C113.5 233.042 121.386 232.371 125.837 227.093C130.287 221.815 129.616 213.929 124.338 209.479L59.1443 154.506Z + `, ], }; diff --git a/src/icons/Icons.tsx b/src/icons/Icons.tsx index d3164411b..da2206d30 100644 --- a/src/icons/Icons.tsx +++ b/src/icons/Icons.tsx @@ -71,7 +71,7 @@ export const faChemicalStructure: IconDefinition = { [], null, ` -M140.224 34.4189H140.473L140.623 34.2206L164.93 2.08492C165.522 1.30229 166.319 0.768301 167.189 0.5H169.851C170.336 0.650217 170.804 0.885814 171.233 1.21055L188.945 14.607C190.927 16.1063 191.318 18.9285 189.819 20.9107L166.962 51.1297L166.762 51.3941L166.928 51.6813L190.842 93.1019L190.986 93.3519H191.275L233.533 93.3519H233.782L233.932 93.1536L259.384 59.5031C260.884 57.521 263.706 57.1295 265.688 58.6288L283.399 72.0253C285.382 73.5245 285.773 76.3467 284.274 78.3289L260.805 109.357L260.605 109.622L260.77 109.909L288.68 158.25C290.377 161.189 290.377 164.811 288.68 167.75L253.954 227.898C252.257 230.837 249.121 232.648 245.727 232.648H190.12H189.832L189.687 232.898L159.704 284.831C158.007 287.77 154.871 289.581 151.477 289.581H81.5235C78.1295 289.581 74.9933 287.77 73.2963 284.831L38.3198 224.25C36.6228 221.311 36.6228 217.689 38.3198 214.75L68.6307 162.25L68.775 162L68.6307 161.75L45.5366 121.75L45.3923 121.5H45.1036H5C2.51472 121.5 0.5 119.485 0.5 117V95C0.5 92.5147 2.51472 90.5 5 90.5H43.3716H43.6603L43.8046 90.25L73.2963 39.1689C74.9933 36.2296 78.1295 34.4189 81.5235 34.4189H140.224ZM141.88 58.5201L141.747 58.4189H141.579H90.1838H89.8951L89.7507 58.6689L63.567 104.021L63.5 104.137V104.271V104.729V104.863L63.567 104.979L89.0798 149.169L89.2241 149.419H89.5128H138.13H138.418L138.563 149.169L166.887 100.11L167.031 99.8603L166.887 99.6103L144.209 60.3305L144.158 60.2428L144.077 60.1817L141.88 58.5201ZM89.5128 174.581H89.2241L89.0798 174.831L63.4345 219.25L63.2902 219.5L63.4345 219.75L89.7507 265.331L89.8951 265.581H90.1838H142.816H143.105L143.249 265.331L166.309 225.39L166.454 225.14L166.309 224.89L137.408 174.831L137.264 174.581H136.975H89.5128ZM190.291 117.352H190.003L189.858 117.602L164.369 161.75L164.225 162L164.369 162.25L191.013 208.398L191.157 208.648H191.446H237.066H237.355L237.499 208.398L263.566 163.25L263.71 163L263.566 162.75L237.499 117.602L237.355 117.352H237.066L190.291 117.352ZM102.589 73.2751C103.826 71.1196 106.576 70.3751 108.732 71.6122L121.488 78.9334C123.644 80.1705 124.388 82.9208 123.151 85.0763L103.694 118.979C102.457 121.134 99.7066 121.879 97.5511 120.642L84.7946 113.32C82.6391 112.083 81.8945 109.333 83.1316 107.178L102.589 73.2751ZM121.652 238.759C122.871 240.925 122.102 243.668 119.936 244.887L107.117 252.098C104.951 253.316 102.207 252.548 100.989 250.382L81.8245 216.313C80.606 214.147 81.3742 211.404 83.5403 210.185L96.3595 202.974C98.5256 201.756 101.269 202.524 102.488 204.69L121.652 238.759ZM217.481 182.048C218.699 184.214 217.931 186.958 215.765 188.176L202.946 195.387C200.78 196.606 198.036 195.838 196.817 193.671L177.653 159.603C176.435 157.437 177.203 154.693 179.369 153.474L192.188 146.263C194.354 145.045 197.098 145.813 198.316 147.979L217.481 182.048Z + M0.5 165.174V165.202L0.503101 165.23C0.81116 167.983 1.62517 170.726 2.98554 173.327C8.87308 184.582 22.7705 188.934 34.0262 183.047C37.127 181.425 39.7048 179.194 41.6886 176.577L74.0529 177.926L85.8773 200.532L64.8862 233.624C62.4421 233.998 60.0176 234.776 57.7055 235.985C46.4498 241.873 42.098 255.77 47.9855 267.026C53.8731 278.281 67.7704 282.633 79.0262 276.746C88.6247 271.725 93.2019 260.88 90.6917 250.816L112.197 216.914L148.741 218.437C151.775 218.564 154.646 217.062 156.273 214.497L182.964 172.418C184.59 169.854 184.725 166.616 183.318 163.925L166.522 131.815L194.685 90.6691L240.188 92.5655C248.527 92.913 256.425 88.8117 260.937 81.7906L283.416 46.8103C285.326 46.3794 287.211 45.6959 289.026 44.7462C293.872 42.2118 297.438 38.1919 299.459 33.5381C301.926 27.8548 302.088 21.2229 299.458 15.1924C299.24 14.6923 299.003 14.1964 298.746 13.7056C292.859 2.44985 278.961 -1.90193 267.706 3.98561C257.631 9.25518 253.088 20.9406 256.466 31.4062L237.182 61.4133L191.661 59.5161C183.272 59.1666 175.335 63.3185 170.838 70.408L142.688 114.786L103.257 113.142C100.223 113.016 97.3514 114.517 95.7248 117.082L76.7401 147.011L38.5942 145.422C31.6574 139.298 21.3949 137.741 12.7055 142.286C5.662 145.97 1.32244 152.791 0.503082 160.137L0.5 160.164V160.192V165.174ZM112.269 139.54L141.866 140.774L155.596 167.024L139.729 192.039L110.131 190.805L96.4011 164.556L112.269 139.54Z `, ], }; From 407d3be3aa8ac0eba6fecf7a637e1602cae43ede Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Thu, 11 Apr 2024 09:32:19 +0200 Subject: [PATCH 05/16] prepare next dev version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b71d316be..24dfa7c53 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "visyn_core", "description": "Core repository for datavisyn applications.", - "version": "9.2.1", + "version": "9.2.2-SNAPSHOT", "author": { "name": "datavisyn GmbH", "email": "contact@datavisyn.io", From baa462bed180030a71a96f836a81148ee7cf134a Mon Sep 17 00:00:00 2001 From: dvdanielamoitzi <57343176+dvdanielamoitzi@users.noreply.github.com> Date: Thu, 11 Apr 2024 13:48:58 +0200 Subject: [PATCH 06/16] feat: add pathway and protein entity colors (#256) --- src/app/constants.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/app/constants.tsx b/src/app/constants.tsx index d81b83e2e..a538836d4 100644 --- a/src/app/constants.tsx +++ b/src/app/constants.tsx @@ -19,6 +19,8 @@ export const DEFAULT_MANTINE6_PROVIDER_PROPS: Omit Date: Fri, 12 Apr 2024 11:37:42 +0200 Subject: [PATCH 07/16] fix: fix viewbox of custom icons (#254) * add css support for custom icons * add support for entity icons * export function to inject css for custom icons * fix viewbox for icons and center them * add export for icon utils * remove inject from main app * remove icons from main app * remove css class injection --- src/icons/EntityIcons.tsx | 73 +++++++++++++++---------- src/icons/Icons.tsx | 111 +++++++++++++++++++------------------- 2 files changed, 102 insertions(+), 82 deletions(-) diff --git a/src/icons/EntityIcons.tsx b/src/icons/EntityIcons.tsx index e06769568..55c67eb75 100644 --- a/src/icons/EntityIcons.tsx +++ b/src/icons/EntityIcons.tsx @@ -1,73 +1,90 @@ import { IconDefinition, IconName, IconPrefix } from '@fortawesome/fontawesome-common-types'; export const dvGene: IconDefinition = { - prefix: 'fac' as IconPrefix, + prefix: 'dv' as IconPrefix, iconName: 'gene' as IconName, icon: [ - 300, - 300, + 512, + 512, [], null, ` - M173.355 25.3617C180.182 24.3374 184.886 17.9727 183.862 11.1455C182.837 4.31833 176.473 -0.385887 169.646 0.638325C158.037 2.37981 136.511 9.10281 125.206 30.659C115.031 46.2112 114.691 63.4842 118.86 85.3133C118.891 85.4713 118.924 85.6287 118.96 85.7854L130.548 135.879L130.555 135.909L142.562 189.025C146.171 208.083 143.914 218.679 138.634 226.514C129.509 240.055 116.089 243.833 103.649 246.225C96.8697 247.529 92.4308 254.081 93.7345 260.861C95.0382 267.64 101.591 272.079 108.37 270.775C121.93 268.167 144.29 262.857 159.366 240.485C169.749 225.078 171.416 206.842 167.079 184.134C167.07 184.082 167.059 184.03 167.049 183.979C167.031 183.893 167.013 183.808 166.994 183.722L154.926 130.336L154.912 130.275L143.372 80.3903C139.655 60.7883 141.298 51.5062 146.366 43.9854C146.654 43.5574 146.916 43.1119 147.149 42.6515C153.021 31.0685 165.086 26.6021 173.355 25.3617ZM177.717 40.8555C172.44 36.4052 164.554 37.0759 160.103 42.3536C155.653 47.6313 156.324 55.5174 161.601 59.9677L226.796 114.941C232.073 119.391 239.959 118.721 244.41 113.443C248.86 108.165 248.189 100.279 242.911 95.8288L177.717 40.8555ZM284.459 75.4919C283.901 68.6109 277.87 63.4852 270.989 64.0433C264.108 64.6014 258.983 70.6319 259.541 77.5129C260.465 88.9116 257.905 108.812 247.326 121.002C235.701 132.777 217.855 136.565 179.819 136.904C172.915 136.965 167.369 142.612 167.431 149.515C167.492 156.418 173.139 161.964 180.042 161.903C217.436 161.569 245.742 158.486 265.46 138.216C265.6 138.072 265.737 137.924 265.87 137.773C283.051 118.313 285.645 90.1108 284.459 75.4919ZM173.922 84.627C168.644 80.1767 160.758 80.8475 156.307 86.1252C151.857 91.4029 152.528 99.289 157.806 103.739L185.75 127.303C191.028 131.753 198.914 131.083 203.365 125.805C207.815 120.527 207.144 112.641 201.866 108.191L173.922 84.627ZM106.121 132.543C68.6722 132.877 52.1768 136.585 40.5296 148.141C30.3247 162.127 25.836 174.602 25.3598 182.837C24.9612 189.729 19.0509 194.993 12.1589 194.594C5.26685 194.196 0.00287565 188.285 0.401472 181.393C1.26152 166.522 8.65481 149.168 20.9551 132.56C21.2878 132.111 21.6502 131.685 22.04 131.284C41.6982 111.075 68.2976 107.879 105.898 107.544C112.801 107.482 118.448 113.029 118.509 119.932C118.571 126.835 113.024 132.481 106.121 132.543ZM100.189 142.144C94.9117 137.694 87.0256 138.364 82.5753 143.642C78.1251 148.92 78.7958 156.806 84.0735 161.256L112.018 184.82C117.296 189.27 125.182 188.599 129.632 183.322C134.083 178.044 133.412 170.158 128.134 165.708L100.189 142.144ZM59.1443 154.506C53.8666 150.056 45.9806 150.726 41.5303 156.004C37.08 161.282 37.7507 169.168 43.0284 173.618L108.222 228.591C113.5 233.042 121.386 232.371 125.837 227.093C130.287 221.815 129.616 213.929 124.338 209.479L59.1443 154.506Z - `, + M376.086 12.9648C375.224 4.98941 368.06 -0.776963 360.084 0.0853993C352.109 0.94754 346.342 8.11173 347.205 16.0871L362.297 155.689C362.312 155.831 362.33 155.972 362.349 156.113L377.424 265.402C379.999 287.009 377.667 304.371 371.761 318.211C365.891 331.962 356.118 343.13 342.28 351.877C314.005 369.747 268.712 377.469 207.882 373.561C199.876 373.047 192.97 379.119 192.455 387.125C191.941 395.13 198.014 402.036 206.019 402.551C268.936 406.593 321.742 399.223 357.8 376.432C376.128 364.848 390.079 349.293 398.479 329.614C406.829 310.049 409.311 287.313 406.251 261.815C406.241 261.731 406.23 261.646 406.218 261.561L393.403 168.653H497.475C505.497 168.653 512 162.15 512 154.128C512 146.106 505.497 139.603 497.475 139.603H389.777L376.086 12.9648Z + + +M422.753 55.092C417.081 49.4198 407.884 49.4198 402.212 55.092C396.539 60.7642 396.539 69.9609 402.212 75.6331L443.063 116.484C448.735 122.156 457.932 122.156 463.604 116.484C469.276 110.812 469.276 101.615 463.604 95.9428L422.753 55.092Z + + +M135.403 199.998C129.322 215.746 127.25 235.924 130.786 261.561L130.803 261.687L160.987 495.615C162.013 503.571 156.396 510.852 148.44 511.879C140.484 512.906 133.203 507.288 132.176 499.333L118.718 395.035H14.5248C6.5031 395.035 0 388.531 0 380.51C0 372.488 6.5031 365.985 14.5248 365.985H114.97L102 265.466C98.0018 236.421 99.9965 211.047 108.304 189.534C116.692 167.809 131.174 150.938 150.496 138.627C188.378 114.489 244.254 108.208 309.931 113.234C317.93 113.847 323.917 120.827 323.305 128.825C322.693 136.824 315.713 142.811 307.714 142.199C243.66 137.297 195.777 144.22 166.106 163.126C151.652 172.336 141.408 184.445 135.403 199.998Z + + +M275.122 164.028C269.449 158.355 260.253 158.355 254.58 164.028C248.908 169.7 248.908 178.897 254.58 184.569L322.666 252.653C328.338 258.326 337.535 258.326 343.207 252.653C348.879 246.981 348.879 237.785 343.207 232.112L275.122 164.028Z + + +M178.552 186.098C184.224 180.426 193.421 180.426 199.093 186.098L327.093 314.098C332.766 319.77 332.766 328.967 327.093 334.639C321.421 340.311 312.224 340.311 306.552 334.639L178.552 206.639C172.88 200.967 172.88 191.771 178.552 186.098Z + + +M175.49 260.594C169.818 254.922 160.621 254.922 154.949 260.594C149.277 266.267 149.277 275.463 154.949 281.136L227.573 353.759C233.246 359.431 242.442 359.431 248.115 353.759C253.787 348.087 253.787 338.89 248.115 333.218L175.49 260.594Z + + +M49.6445 411.856C55.3165 406.184 64.5133 406.184 70.1853 411.856L70.2287 411.9L70.2731 411.943L70.3174 411.988L70.3626 412.033L70.4078 412.079L70.5005 412.171L70.5479 412.218L70.6436 412.314L70.6924 412.363L70.7912 412.462L70.8413 412.512L70.8918 412.562L70.9433 412.614L70.9947 412.665L71.047 412.718L71.0997 412.77L71.2606 412.931L71.3152 412.986L71.3701 413.041L71.4255 413.096L71.4818 413.152L71.5381 413.209L71.5953 413.266L71.6525 413.323L71.7106 413.381L71.7691 413.44L71.8276 413.498L71.887 413.558L71.9468 413.617L72.0071 413.678L72.0678 413.738L72.129 413.799L72.1902 413.861L72.2522 413.923L72.441 414.112L72.5044 414.175L72.5687 414.239L72.6334 414.304L72.6986 414.369L72.7637 414.435L72.8298 414.5L72.8958 414.567L72.9628 414.633L73.0297 414.7L73.0975 414.768L73.2336 414.904L73.3023 414.973L73.3715 415.042L73.441 415.112L73.5816 415.252L73.652 415.323L73.7234 415.394L73.7948 415.465L73.8666 415.537L74.0115 415.682L74.0847 415.755L74.1582 415.829L74.2318 415.903L74.3063 415.977L74.3808 416.051L74.4557 416.126L74.531 416.201L74.6064 416.277L74.6826 416.353L74.7589 416.429L74.8356 416.506L74.9127 416.583L74.9898 416.66L75.0678 416.738L75.1458 416.816L75.2243 416.895L75.3028 416.974L75.3821 417.053L75.5412 417.212L75.6215 417.292L75.7824 417.453L75.8635 417.534L76.191 417.862L76.2735 417.944L76.3568 418.027L76.4397 418.11L76.5235 418.194L76.6915 418.362L76.7762 418.446L76.8608 418.531L76.9459 418.616L77.031 418.702L77.2026 418.873L77.2886 418.959L77.3755 419.046L77.5488 419.22L77.6361 419.307L77.7239 419.394L78.0767 419.747L78.1653 419.836L78.2544 419.925L78.344 420.014L78.4335 420.104L78.5235 420.194L78.6135 420.284L78.7948 420.465L78.8852 420.556L78.9765 420.647L79.0678 420.738L79.1591 420.83L79.2509 420.922L79.3431 421.014L79.4353 421.106L79.5275 421.198L79.6201 421.291L79.7132 421.384L79.8063 421.477L79.8994 421.57L79.9929 421.664L80.0869 421.757L80.1804 421.851L80.3692 422.04L80.5581 422.229L80.6529 422.324L80.7482 422.419L81.1303 422.801L81.2265 422.897L81.3227 422.993L81.4189 423.089L81.5155 423.186L81.7088 423.379L81.9029 423.573L82.0005 423.671L82.098 423.768L82.293 423.964L82.391 424.062L82.4894 424.16L82.5873 424.258L82.7841 424.455L82.883 424.553L82.9814 424.652L83.0807 424.751L83.1795 424.85L83.3781 425.048L83.5767 425.247L83.6764 425.347L83.7762 425.447L83.8759 425.547L84.0762 425.747L84.1764 425.847L84.3768 426.047L84.4774 426.148L84.8803 426.551L84.9809 426.652L85.1831 426.854L85.2846 426.955L85.4867 427.157L85.5882 427.259L85.7912 427.462L85.8927 427.563L85.9947 427.665L86.0962 427.767L86.1981 427.868L86.2997 427.97L86.4016 428.072L86.7075 428.378L86.8094 428.48L86.9118 428.582L87.1157 428.786L87.3205 428.991L87.4224 429.093L87.6272 429.298L87.7292 429.4L87.8316 429.502L87.934 429.604L88.8555 430.526L88.9579 430.628L89.0603 430.731L89.1622 430.833L89.2646 430.935L89.4694 431.14L89.5714 431.242L89.7762 431.446L89.9801 431.651L90.0825 431.753L90.6942 432.365L90.7957 432.466L90.8976 432.568L90.9991 432.67L91.1006 432.771L91.3036 432.974L91.4051 433.076L91.6077 433.278L91.7088 433.379L91.8103 433.48L91.9114 433.582L92.012 433.683L92.113 433.783L92.2137 433.884L92.4149 434.086L92.6161 434.286L92.7163 434.387L92.9167 434.587L93.0164 434.687L93.1166 434.787L93.2163 434.887L93.316 434.986L93.4153 435.086L93.5151 435.185L93.6144 435.285L93.7132 435.384L93.8125 435.483L94.0102 435.681L94.109 435.779L94.3059 435.976L94.4043 436.074L94.5022 436.173L94.6002 436.271L94.6981 436.368L94.7957 436.466L95.1848 436.855L95.2819 436.952L95.3785 437.049L95.4752 437.145L95.5714 437.242L95.9552 437.626L96.0505 437.721L96.1458 437.816L96.2411 437.912L96.336 438.007L96.4309 438.101L96.5253 438.196L96.6197 438.29L96.7141 438.385L96.8081 438.478L96.9016 438.572L96.9951 438.666L97.0887 438.759L97.5523 439.223L97.6445 439.315L97.8276 439.498L97.9193 439.59L98.1011 439.772L98.1919 439.862L98.2824 439.953L98.3724 440.043L98.4623 440.133L98.6419 440.312L98.8196 440.49L98.9087 440.579L98.9969 440.667L99.0851 440.756L99.1729 440.844L99.2607 440.931L99.348 441.018L99.4353 441.105L99.5222 441.192L99.6946 441.365L99.7806 441.451L99.9521 441.622L100.037 441.707L100.122 441.792L100.291 441.961L100.375 442.045L100.458 442.129L100.542 442.212L100.625 442.295L100.707 442.378L100.79 442.461L100.872 442.543L100.954 442.624L101.117 442.787L101.198 442.868L101.278 442.949L101.438 443.109L101.597 443.267L101.676 443.346L101.754 443.425L102.142 443.812L102.219 443.889L102.294 443.965L102.37 444.041L102.445 444.116L102.521 444.191L102.595 444.266L102.67 444.34L102.743 444.414L102.89 444.561L102.963 444.633L103.107 444.778L103.179 444.849L103.531 445.202L103.601 445.271L103.67 445.34L103.738 445.409L103.874 445.544L103.941 445.612L104.008 445.678L104.4 446.071L104.464 446.135L104.527 446.198L104.591 446.261L104.653 446.324L104.777 446.447L104.838 446.509L104.899 446.57L104.96 446.63L105.02 446.69L105.426 447.096L105.482 447.152L105.538 447.208L105.593 447.263L105.648 447.318L105.702 447.372L105.756 447.426L105.809 447.48L105.862 447.533L105.966 447.637L106.018 447.688L106.068 447.739L106.119 447.789L106.168 447.839L106.218 447.888L106.363 448.033L106.41 448.081L106.457 448.127L106.503 448.174L106.639 448.309L106.683 448.353L106.727 448.397L106.812 448.483L106.854 448.525L107.017 448.687L107.056 448.726L107.095 448.765L107.171 448.841L107.207 448.878L107.244 448.915L107.28 448.951L107.316 448.986L107.35 449.021L107.418 449.088L107.451 449.121L107.484 449.154L107.516 449.186L107.547 449.217L107.578 449.248L107.608 449.278L107.637 449.308L107.694 449.365L107.722 449.392L107.776 449.446L107.802 449.472L107.827 449.497L107.852 449.522L107.899 449.57L107.944 449.615L107.966 449.636L107.987 449.657L108.007 449.678L108.027 449.697L108.046 449.716L108.064 449.735L108.082 449.753L108.099 449.77L108.116 449.786L108.132 449.802L108.147 449.818L108.189 449.859L108.201 449.872L108.213 449.884L108.225 449.895L108.235 449.906L108.245 449.916L108.254 449.925L108.271 449.941L108.278 449.949L108.308 449.978L108.312 449.982C108.312 449.982 108.312 449.982 108.278 450.016C108.248 450.046 108.193 450.102 108.09 450.205C107.961 450.334 107.758 450.538 107.437 450.859L108.313 449.984C113.985 455.656 113.985 464.852 108.313 470.525C102.641 476.197 93.4442 476.197 87.7722 470.525L96.2231 462.074C87.7721 470.525 87.7714 470.524 87.7664 470.519L87.7372 470.49L87.7301 470.482L87.7221 470.475L87.7039 470.457L87.6942 470.447L87.6835 470.436L87.672 470.425L87.6605 470.413L87.6476 470.4L87.6343 470.387L87.6206 470.373L87.5904 470.343L87.5749 470.327L87.5581 470.311L87.5412 470.294L87.5231 470.276L87.5049 470.258L87.4858 470.238L87.4659 470.219L87.4455 470.198L87.4247 470.177L87.4029 470.156L87.3582 470.111L87.3347 470.087L87.3103 470.063L87.2859 470.038L87.2606 470.013L87.2345 469.987L87.1809 469.934L87.1529 469.906L87.125 469.877L87.0957 469.848L87.0665 469.819L87.0364 469.789L87.0053 469.758L86.9743 469.727L86.9424 469.695L86.91 469.662L86.8768 469.629L86.809 469.562L86.7744 469.527L86.7389 469.492L86.703 469.456L86.6667 469.419L86.6294 469.382L86.5536 469.306L86.5151 469.268L86.4756 469.228L86.313 469.066L86.2713 469.024L86.2287 468.981L86.1853 468.938L86.0975 468.85L86.0532 468.806L86.008 468.76L85.9619 468.715L85.9158 468.668L85.8688 468.622L85.8218 468.574L85.7256 468.478L85.6769 468.429L85.6272 468.38L85.5776 468.33L85.527 468.28L85.4765 468.229L85.4251 468.178L85.3209 468.074L85.2682 468.021L85.2145 467.967L85.1609 467.914L85.1064 467.859L85.0519 467.805L84.9965 467.749L84.941 467.694L84.8848 467.637L84.4783 467.231L84.4184 467.171L84.3582 467.111L84.297 467.05L84.2358 466.988L84.1122 466.865L84.0497 466.802L83.9863 466.739L83.9229 466.676L83.4668 466.219L83.3998 466.153L83.3329 466.085L83.1968 465.95L83.1285 465.881L83.0594 465.812L82.9902 465.743L82.6379 465.391L82.566 465.319L82.422 465.174L82.3489 465.102L82.2757 465.028L82.2021 464.955L82.1285 464.881L82.0541 464.807L81.9796 464.732L81.9043 464.657L81.8289 464.582L81.7531 464.506L81.6773 464.43L81.6006 464.353L81.2132 463.966L81.1348 463.887L81.0559 463.808L80.9765 463.729L80.8972 463.65L80.7367 463.49L80.6565 463.409L80.5754 463.328L80.4127 463.165L80.3311 463.084L80.1662 462.919L80.0838 462.836L80.0005 462.753L79.9171 462.67L79.8333 462.586L79.7496 462.502L79.5807 462.333L79.496 462.249L79.4109 462.163L79.2394 461.992L79.1534 461.906L78.9809 461.733L78.8941 461.647L78.8067 461.559L78.4557 461.208L78.3675 461.12L78.2784 461.031L78.1006 460.853L78.0111 460.764L77.9211 460.674L77.8311 460.584L77.6507 460.403L77.5598 460.313L77.3781 460.131L77.2864 460.039L77.1033 459.856L77.0111 459.764L76.5474 459.3L76.4539 459.207L76.3604 459.113L76.2668 459.02L76.1729 458.926L75.984 458.737L75.8896 458.642L75.7948 458.548L75.6051 458.358L75.5093 458.262L75.414 458.167L75.0301 457.783L74.934 457.686L74.8373 457.59L74.7407 457.493L74.6436 457.396L74.5465 457.299L74.4495 457.202L74.2544 457.007L74.1569 456.909L73.961 456.714L73.863 456.616L73.7646 456.517L73.6662 456.419L73.5678 456.32L73.469 456.222L73.2713 456.024L73.172 455.925L73.0731 455.826L72.9739 455.726L72.8741 455.627L72.7748 455.527L72.6751 455.428L72.5754 455.328L72.4752 455.228L72.3755 455.128L72.1751 454.928L72.0749 454.827L71.9743 454.727L71.8737 454.626L71.7731 454.526L71.6724 454.425L71.4707 454.224L71.3701 454.123L71.2691 454.022L71.1676 453.921L70.9654 453.718L70.7624 453.515L70.5594 453.312L70.4579 453.211L70.3564 453.109L70.2544 453.007L70.1529 452.905L70.051 452.804L69.5412 452.294L69.4388 452.192L69.2349 451.987L69.0301 451.783L68.9282 451.681L68.8258 451.579L68.7234 451.476L68.621 451.374L68.5191 451.272L68.3143 451.067L68.2119 450.965L67.3927 450.146L67.2903 450.043L67.1884 449.941L67.086 449.839L66.9836 449.736L66.7793 449.532L66.5745 449.327L66.3706 449.123L66.2682 449.021L66.1662 448.919L65.7584 448.511L65.6569 448.41L65.555 448.308L65.4535 448.206L65.3515 448.105L65.25 448.003L65.047 447.8L64.9459 447.699L64.8444 447.597L64.7434 447.496L64.6419 447.395L64.5408 447.294L64.4397 447.193L64.3391 447.092L64.238 446.991L63.9362 446.689L63.8356 446.589L63.6352 446.388L63.3347 446.088L63.2349 445.988L63.1352 445.888L63.0355 445.789L62.8369 445.589L62.6383 445.391L62.5395 445.292L62.3418 445.094L62.2429 444.996L62.0461 444.799L61.9481 444.701L61.7518 444.505L61.5567 444.309L61.4592 444.212L61.3617 444.115L61.1676 443.92L60.9743 443.727L60.8777 443.63L60.7815 443.534L60.6853 443.438L60.5891 443.342L60.207 442.96L60.1117 442.865L60.0168 442.77L59.9224 442.675L59.828 442.581L59.7336 442.486L59.6396 442.392L59.5457 442.298L59.3582 442.111L59.2651 442.018L59.172 441.925L59.0789 441.832L58.9863 441.739L58.8941 441.647L58.8019 441.555L58.7097 441.463L58.6179 441.371L58.5266 441.279L58.4353 441.188L58.344 441.097L58.2536 441.006L58.0723 440.825L57.9823 440.735L57.8028 440.556L57.7137 440.466L57.6241 440.377L57.5355 440.288L57.1826 439.935L57.0949 439.848L57.008 439.761L56.9207 439.674L56.8342 439.587L56.7473 439.5L56.6614 439.414L56.4898 439.243L56.4047 439.157L56.2349 438.988L56.1503 438.903L55.9823 438.735L55.8985 438.652L55.8156 438.568L55.7323 438.485L55.6498 438.403L55.1605 437.913L55.0802 437.833L55 437.753L54.8409 437.594L54.7615 437.515L54.6831 437.436L54.6046 437.357L54.5266 437.279L54.4486 437.201L54.3715 437.124L54.2943 437.047L54.2176 436.971L54.1414 436.894L54.0652 436.818L53.9898 436.742L53.9145 436.667L53.8395 436.592L53.7651 436.518L53.6906 436.443L53.5434 436.296L53.4703 436.223L53.3254 436.078L53.2536 436.006L53.1822 435.935L53.1108 435.864L53.0403 435.793L52.8998 435.653L52.8302 435.583L52.7611 435.514L52.6924 435.445L52.6241 435.377L52.5563 435.309L52.4885 435.242L52.4215 435.174L52.3546 435.108L52.2886 435.041L52.2225 434.976L52.1574 434.91L52.0922 434.845L52.0275 434.78L51.9637 434.716L51.8998 434.652L51.8364 434.589L51.711 434.464L51.6489 434.402L51.5878 434.34L51.5266 434.279L51.4659 434.219L51.3457 434.099L51.2868 434.039L51.2278 433.981L51.1693 433.922L51.1113 433.864L51.0541 433.807L50.9969 433.75L50.9406 433.693L50.8843 433.637L50.8289 433.582L50.7739 433.527L50.7194 433.472L50.5585 433.311L50.5058 433.259L50.4535 433.206L50.402 433.155L50.3506 433.104L50.3001 433.053L50.25 433.003L50.1512 432.904L50.1024 432.855L50.0067 432.76L49.9597 432.712L49.9127 432.666L49.8666 432.62L49.8214 432.574L49.7762 432.529L49.7318 432.484L49.6445 432.397C43.9721 426.725 43.9721 417.528 49.6445 411.856Z +`, ], }; export const dvDrug: IconDefinition = { - prefix: 'fac' as IconPrefix, + prefix: 'dv' as IconPrefix, iconName: 'drug' as IconName, icon: [ - 300, - 300, + 512, + 512, [], null, ` - M177.764 228.027C216.755 250.539 266.57 237.191 289.082 198.199C296.442 185.452 299.947 171.537 299.995 157.804C300.021 150.526 292.834 145.965 285.876 147.829L155.355 182.802C148.372 184.71 144.498 192.236 148.115 198.5C155.024 210.369 165.016 220.667 177.764 228.027Z - M147.936 116.708C140.576 129.455 137.071 143.369 137.023 157.103C136.997 164.381 144.184 168.942 151.142 167.078L281.663 132.105C288.646 130.197 292.52 122.671 288.903 116.407C281.994 104.537 272.002 94.2398 259.255 86.8801C220.263 64.3682 170.448 77.7162 147.936 116.708Z - M0 179.012C0 173.777 0.67524 168.455 2.08895 163.155L33.5388 45.2534C42.2296 12.6725 75.5152 -6.63164 107.95 2.09838C140.384 10.8284 159.602 44.2642 150.911 76.845C142.22 109.426 119.461 194.747 119.461 194.747C110.77 227.327 77.4848 246.632 45.0502 237.902C17.8917 230.592 0 205.96 0 179.012ZM98.9641 35.7846C85.0786 32.0471 70.7943 40.3314 67.0737 54.2795L51.3488 113.23L101.651 126.77L117.376 67.8188C121.097 53.8706 112.85 39.522 98.9641 35.7846Z" fill="#333333"/> - `, + M303.388 440.368C369.935 478.789 454.954 456.008 493.375 389.461C505.935 367.706 511.917 343.958 512 320.519C512.044 308.098 499.777 300.313 487.903 303.495L265.143 363.183C253.226 366.44 246.613 379.284 252.787 389.975C264.578 410.233 281.632 427.807 303.388 440.368Z + M252.481 250.381C239.92 272.137 233.938 295.884 233.856 319.324C233.811 331.744 246.078 339.529 257.953 336.348L480.712 276.659C492.63 273.402 499.242 260.558 493.069 249.868C481.278 229.61 464.223 212.035 442.468 199.474C375.921 161.054 290.902 183.834 252.481 250.381Z + M0 356.716C0 347.781 1.15243 338.697 3.5652 329.652L57.2404 128.43C72.0729 72.8249 128.881 39.8786 184.237 54.7781C239.593 69.6775 272.391 126.742 257.559 182.348C242.726 237.953 203.884 383.569 203.884 383.569C189.051 439.175 132.243 472.121 76.8868 457.222C30.5356 444.746 0 402.707 0 356.716ZM168.901 112.27C145.203 105.891 120.824 120.03 114.474 143.835L87.6366 244.446L173.487 267.554L200.325 166.943C206.675 143.137 192.6 118.649 168.901 112.27Z + `, ], }; export const dvCellLine: IconDefinition = { - prefix: 'fac' as IconPrefix, - iconName: 'drug' as IconName, + prefix: 'dv' as IconPrefix, + iconName: 'cellline' as IconName, icon: [ - 300, - 300, + 512, + 512, [], null, ` - M276.5 121.255V120.238L275.694 120.859C268.982 126.041 261.309 130.558 253.197 134.381C226.294 147.06 189.972 154.575 150.5 154.575C111.028 154.575 74.7061 147.06 47.8035 134.381C39.691 130.558 32.0179 126.041 25.3055 120.859L24.5 120.238V121.255V128.462C24.5 139.051 34.0528 152.293 58.035 163.596C81.0786 174.456 113.757 181.5 150.5 181.5C187.243 181.5 219.921 174.456 242.965 163.596C266.947 152.293 276.5 139.051 276.5 128.462V121.255ZM300.5 77.5377V128.462C300.5 153.789 279.166 173.067 253.197 185.306C226.294 197.985 189.972 205.5 150.5 205.5C111.028 205.5 74.7061 197.985 47.8035 185.306C21.8339 173.067 0.5 153.789 0.5 128.462V77.5377C0.5 52.2105 21.8339 32.9334 47.8035 20.6942C74.7061 8.01533 111.028 0.5 150.5 0.5C189.972 0.5 226.294 8.01533 253.197 20.6942C279.166 32.9334 300.5 52.2105 300.5 77.5377ZM58.035 42.404C34.0528 53.7065 24.5 66.9492 24.5 77.5377C24.5 88.1262 34.0528 101.369 58.035 112.671C81.0786 123.532 113.757 130.575 150.5 130.575C187.243 130.575 219.921 123.532 242.965 112.671C266.947 101.369 276.5 88.1262 276.5 77.5377C276.5 66.9492 266.947 53.7065 242.965 42.404C219.921 31.5439 187.243 24.5 150.5 24.5C113.757 24.5 81.0786 31.5439 58.035 42.404ZM150.5 61C112.276 61 77.8126 71.6406 53.8396 83.9509C49.1723 86.3476 43.4458 84.5069 41.0491 79.8396C38.6524 75.1723 40.4931 69.4458 45.1604 67.0491C71.4945 53.5263 108.913 42 150.5 42C192.087 42 229.506 53.5263 255.84 67.0491C260.507 69.4458 262.348 75.1723 259.951 79.8396C257.554 84.5069 251.828 86.3476 247.16 83.9509C223.187 71.6406 188.724 61 150.5 61ZM109.5 91.5C109.5 93.1189 108.903 95.1534 107.864 97.3212C106.828 99.48 105.373 101.731 103.702 103.772C102.03 105.814 100.154 107.632 98.2829 108.936C96.4024 110.246 94.5784 111 93 111C89.7864 111 86.793 108.757 84.572 105.554C82.3586 102.362 81 98.3345 81 95C81 91.6729 82.3532 88.0468 84.5539 85.2547C86.7558 82.461 89.7498 80.568 93 80.568C96.3593 80.568 100.522 81.6746 103.835 83.626C107.163 85.5864 109.5 88.3122 109.5 91.5ZM154 111.5C154 114.861 151.746 117.979 148.546 120.287C145.354 122.589 141.329 124 138 124C134.675 124 130.906 122.593 127.969 120.298C125.029 118.002 123 114.883 123 111.5C123 108.086 125.06 104.077 128.027 100.899C130.997 97.7155 134.749 95.5 138 95.5C141.26 95.5 145.264 97.7244 148.487 100.913C151.709 104.101 154 108.105 154 111.5ZM213.5 91.5C213.5 94.7136 211.257 97.707 208.054 99.928C204.862 102.141 200.835 103.5 197.5 103.5C194.157 103.5 189.62 102.136 185.919 99.9103C182.188 97.6672 179.5 94.6719 179.5 91.5C179.5 90.0062 180.481 88.5578 182.241 87.1968C183.989 85.8453 186.414 84.6531 189.085 83.6641C194.429 81.6847 200.62 80.568 204 80.568C207.335 80.568 209.679 81.6561 211.202 83.5123C212.739 85.3854 213.5 88.1132 213.5 91.5Z - `, + M469.975 290.738V289.646L469.148 290.36C457.706 300.24 444.632 308.85 430.816 316.134C385.003 340.288 323.174 354.595 256 354.595C188.826 354.595 126.997 340.288 81.1842 316.134C67.3678 308.85 54.2937 300.24 42.8517 290.36L42.0249 289.646V290.738V304.452C42.0249 324.297 58.0639 349.388 98.8468 370.891C137.992 391.529 193.532 404.927 256 404.927C318.468 404.927 374.008 391.529 413.153 370.891C453.936 349.388 469.975 324.297 469.975 304.452V290.738ZM511.5 207.548V304.452C511.5 352.956 474.996 389.746 430.816 413.039C385.003 437.193 323.174 451.5 256 451.5C188.826 451.5 126.997 437.193 81.1842 413.039C37.0036 389.746 0.5 352.956 0.5 304.452V207.548C0.5 159.044 37.0036 122.254 81.1842 98.9609C126.997 74.807 188.826 60.5 256 60.5C323.174 60.5 385.003 74.807 430.816 98.9609C474.996 122.254 511.5 159.044 511.5 207.548ZM98.8468 141.109C58.0639 162.612 42.0249 187.703 42.0249 207.548C42.0249 227.392 58.0639 252.484 98.8468 273.986C137.992 294.624 193.532 308.022 256 308.022C318.468 308.022 374.008 294.624 413.153 273.986C453.936 252.484 469.975 227.392 469.975 207.548C469.975 187.703 453.936 162.612 413.153 141.109C374.008 120.471 318.468 107.073 256 107.073C193.532 107.073 137.992 120.471 98.8468 141.109ZM256 176.529C191.033 176.529 132.457 196.762 91.7205 220.164C83.6487 224.801 73.7058 221.268 69.5222 212.154C65.3273 203.015 68.5683 191.835 76.6782 187.176C121.514 161.419 185.21 139.471 256 139.471C326.79 139.471 390.486 161.419 435.322 187.176C443.432 191.835 446.673 203.015 442.478 212.154C438.294 221.268 428.351 224.801 420.28 220.164C379.543 196.762 320.967 176.529 256 176.529ZM186.61 234.117C186.61 237.305 185.564 241.255 183.783 245.408C182.006 249.554 179.512 253.868 176.651 257.777C173.79 261.687 170.573 265.175 167.358 267.681C164.13 270.197 160.964 271.675 158.193 271.675C152.586 271.675 147.402 267.299 143.583 261.139C139.778 255.001 137.43 247.241 137.43 240.777C137.43 234.318 139.774 227.314 143.567 221.931C147.365 216.54 152.548 212.862 158.193 212.862C163.96 212.862 171.094 214.984 176.78 218.731C182.47 222.48 186.61 227.785 186.61 234.117ZM262.304 272.175C262.304 278.801 258.341 284.857 252.86 289.278C247.38 293.699 240.471 296.413 234.738 296.413C229.01 296.413 222.531 293.704 217.48 289.291C212.432 284.88 208.872 278.822 208.872 272.175C208.872 265.501 212.456 257.761 217.535 251.673C222.626 245.57 229.09 241.277 234.738 241.277C237.553 241.277 240.687 242.343 243.823 244.192C246.954 246.039 250.057 248.648 252.803 251.688C258.311 257.783 262.304 265.518 262.304 272.175ZM363.513 234.117C363.513 240.472 359.559 246.288 354.077 250.541C348.598 254.792 341.686 257.403 335.947 257.403C330.198 257.403 322.426 254.785 316.088 250.521C309.735 246.248 304.978 240.432 304.978 234.117C304.978 231.04 306.78 228.165 309.799 225.553C312.812 222.947 316.972 220.663 321.529 218.775C330.647 214.997 341.212 212.862 347.003 212.862C352.737 212.862 356.83 214.957 359.509 218.609C362.206 222.286 363.513 227.603 363.513 234.117ZM469.975 290.738V289.646L469.148 290.36C457.706 300.24 444.632 308.85 430.816 316.134C385.003 340.288 323.174 354.595 256 354.595C188.826 354.595 126.997 340.288 81.1842 316.134C67.3678 308.85 54.2937 300.24 42.8517 290.36L42.0249 289.646V290.738V304.452C42.0249 324.297 58.0639 349.388 98.8468 370.891C137.992 391.529 193.532 404.927 256 404.927C318.468 404.927 374.008 391.529 413.153 370.891C453.936 349.388 469.975 324.297 469.975 304.452V290.738ZM511.5 207.548V304.452C511.5 352.956 474.996 389.746 430.816 413.039C385.003 437.193 323.174 451.5 256 451.5C188.826 451.5 126.997 437.193 81.1842 413.039C37.0036 389.746 0.5 352.956 0.5 304.452V207.548C0.5 159.044 37.0036 122.254 81.1842 98.9609C126.997 74.807 188.826 60.5 256 60.5C323.174 60.5 385.003 74.807 430.816 98.9609C474.996 122.254 511.5 159.044 511.5 207.548ZM98.8468 141.109C58.0639 162.612 42.0249 187.703 42.0249 207.548C42.0249 227.392 58.0639 252.484 98.8468 273.986C137.992 294.624 193.532 308.022 256 308.022C318.468 308.022 374.008 294.624 413.153 273.986C453.936 252.484 469.975 227.392 469.975 207.548C469.975 187.703 453.936 162.612 413.153 141.109C374.008 120.471 318.468 107.073 256 107.073C193.532 107.073 137.992 120.471 98.8468 141.109ZM256 176.529C191.033 176.529 132.457 196.762 91.7205 220.164C83.6487 224.801 73.7058 221.268 69.5222 212.154C65.3273 203.015 68.5683 191.835 76.6782 187.176C121.514 161.419 185.21 139.471 256 139.471C326.79 139.471 390.486 161.419 435.322 187.176C443.432 191.835 446.673 203.015 442.478 212.154C438.294 221.268 428.351 224.801 420.28 220.164C379.543 196.762 320.967 176.529 256 176.529ZM186.61 234.117C186.61 237.305 185.564 241.255 183.783 245.408C182.006 249.554 179.512 253.868 176.651 257.777C173.79 261.687 170.573 265.175 167.358 267.681C164.13 270.197 160.964 271.675 158.193 271.675C152.586 271.675 147.402 267.299 143.583 261.139C139.778 255.001 137.43 247.241 137.43 240.777C137.43 234.318 139.774 227.314 143.567 221.931C147.365 216.54 152.548 212.862 158.193 212.862C163.96 212.862 171.094 214.984 176.78 218.731C182.47 222.48 186.61 227.785 186.61 234.117ZM262.304 272.175C262.304 278.801 258.341 284.857 252.86 289.278C247.38 293.699 240.471 296.413 234.738 296.413C229.01 296.413 222.531 293.704 217.48 289.291C212.432 284.88 208.872 278.822 208.872 272.175C208.872 265.501 212.456 257.761 217.535 251.673C222.626 245.57 229.09 241.277 234.738 241.277C237.553 241.277 240.687 242.343 243.823 244.192C246.954 246.039 250.057 248.648 252.803 251.688C258.311 257.783 262.304 265.518 262.304 272.175ZM363.513 234.117C363.513 240.472 359.559 246.288 354.077 250.541C348.598 254.792 341.686 257.403 335.947 257.403C330.198 257.403 322.426 254.785 316.088 250.521C309.735 246.248 304.978 240.432 304.978 234.117C304.978 231.04 306.78 228.165 309.799 225.553C312.812 222.947 316.972 220.663 321.529 218.775C330.647 214.997 341.212 212.862 347.003 212.862C352.737 212.862 356.83 214.957 359.509 218.609C362.206 222.286 363.513 227.603 363.513 234.117Z`, ], }; export const dvTissue: IconDefinition = { - prefix: 'fac' as IconPrefix, + prefix: 'dv' as IconPrefix, iconName: 'tissue' as IconName, icon: [ - 300, - 300, + 512, + 512, [], null, ` - M138.516 17.9766L133.008 26.2383C120.527 44.9883 98.2031 54.6562 75.9961 50.9062L41.0742 45.1055C19.5703 41.5312 -6.09103e-06 58.1133 0.0585877 79.9102C0.0585877 89.2266 3.80859 98.1914 10.3711 104.813L27.4805 121.922C33.9258 128.367 37.5586 137.098 37.5586 146.238C37.5586 155.496 33.8086 164.344 27.1875 170.848L19.5117 178.348C13.0078 184.676 9.37499 193.348 9.37499 202.43C9.37499 223.992 29.3555 240.047 50.4492 235.359L86.9531 227.273C91.4648 226.277 96.1523 225.75 100.781 225.75H106.641C122.578 225.75 138.105 231.199 150.586 241.16L168.633 255.633C174.785 260.555 182.461 263.25 190.312 263.25C209.473 263.25 225.059 247.723 225.059 228.504V213.738C225.059 193.289 237.598 174.949 256.641 167.566L278.262 159.187C291.387 154.09 300.059 141.434 300.059 127.371C300.059 110.906 288.281 96.7266 272.051 93.7969L255.645 90.8086C234.258 86.8828 217.324 70.5938 212.52 49.3828L208.359 30.9258C204.434 13.2891 188.73 0.75 170.684 0.75C157.793 0.75 145.723 7.19531 138.516 17.9766ZM93.75 94.5C98.7228 94.5 103.492 96.4754 107.008 99.9918C110.525 103.508 112.5 108.277 112.5 113.25C112.5 118.223 110.525 122.992 107.008 126.508C103.492 130.025 98.7228 132 93.75 132C88.7772 132 84.0081 130.025 80.4917 126.508C76.9754 122.992 75 118.223 75 113.25C75 108.277 76.9754 103.508 80.4917 99.9918C84.0081 96.4754 88.7772 94.5 93.75 94.5ZM168.75 103.875C168.75 101.389 169.738 99.004 171.496 97.2459C173.254 95.4877 175.639 94.5 178.125 94.5C180.611 94.5 182.996 95.4877 184.754 97.2459C186.512 99.004 187.5 101.389 187.5 103.875C187.5 106.361 186.512 108.746 184.754 110.504C182.996 112.262 180.611 113.25 178.125 113.25C175.639 113.25 173.254 112.262 171.496 110.504C169.738 108.746 168.75 106.361 168.75 103.875ZM168.75 150.75C173.723 150.75 178.492 152.725 182.008 156.242C185.525 159.758 187.5 164.527 187.5 169.5C187.5 174.473 185.525 179.242 182.008 182.758C178.492 186.275 173.723 188.25 168.75 188.25C163.777 188.25 159.008 186.275 155.492 182.758C151.975 179.242 150 174.473 150 169.5C150 164.527 151.975 159.758 155.492 156.242C159.008 152.725 163.777 150.75 168.75 150.75Z - `, + M236.3 61.4L226.9 75.5C205.6 107.5 167.5 124 129.6 117.6L70.0002 107.7C33.3002 101.6 -0.099776 129.9 0.000223981 167.1C0.000223981 183 6.40022 198.3 17.6002 209.6L46.8002 238.8C57.8002 249.8 64.0002 264.7 64.0002 280.3C64.0002 296.1 57.6002 311.2 46.3002 322.3L33.2002 335.1C22.1002 345.9 15.9002 360.7 15.9002 376.2C15.9002 413 50.0002 440.4 86.0002 432.4L148.3 418.6C156 416.9 164 416 171.9 416H181.9C209.1 416 235.6 425.3 256.9 442.3L287.7 467C298.2 475.4 311.3 480 324.7 480C357.4 480 384 453.5 384 420.7V395.5C384 360.6 405.4 329.3 437.9 316.7L474.8 302.4C497.2 293.7 512 272.1 512 248.1C512 220 491.9 195.8 464.2 190.8L436.2 185.7C399.7 179 370.8 151.2 362.6 115L355.5 83.5C348.8 53.4 322 32 291.2 32C269.2 32 248.6 43 236.3 61.4ZM159.9 192C168.387 192 176.526 195.371 182.528 201.373C188.529 207.374 191.9 215.513 191.9 224C191.9 232.487 188.529 240.626 182.528 246.627C176.526 252.628 168.387 256 159.9 256C151.413 256 143.274 252.628 137.273 246.627C131.272 240.626 127.9 232.487 127.9 224C127.9 215.513 131.272 207.374 137.273 201.373C143.274 195.371 151.413 192 159.9 192ZM287.9 208C287.9 203.756 289.586 199.687 292.586 196.686C295.587 193.686 299.657 192 303.9 192C308.144 192 312.213 193.686 315.214 196.686C318.214 199.687 319.9 203.756 319.9 208C319.9 212.243 318.214 216.313 315.214 219.314C312.213 222.314 308.144 224 303.9 224C299.657 224 295.587 222.314 292.586 219.314C289.586 216.313 287.9 212.243 287.9 208ZM287.9 288C296.387 288 304.526 291.371 310.528 297.372C316.529 303.374 319.9 311.513 319.9 320C319.9 328.487 316.529 336.626 310.528 342.627C304.526 348.628 296.387 352 287.9 352C279.413 352 271.274 348.628 265.273 342.627C259.272 336.626 255.9 328.487 255.9 320C255.9 311.513 259.272 303.374 265.273 297.372C271.274 291.371 279.413 288 287.9 288Z + `, ], }; export const dvDisease: IconDefinition = { - prefix: 'fac' as IconPrefix, + prefix: 'dv' as IconPrefix, iconName: 'disease' as IconName, icon: [ - 300, - 300, + 512, + 512, [], null, ` - M62.7273 12.4594C65.9091 22.0049 60.7386 32.289 51.25 35.4708L36.3636 40.414V109.107C36.3636 139.221 60.7955 163.653 90.9091 163.653C121.023 163.653 145.455 139.221 145.455 109.107V40.414L130.625 35.4708C121.08 32.289 115.966 22.0049 119.148 12.4594C122.33 2.91399 132.614 -2.19964 142.159 0.982176L156.989 5.92536C171.818 10.8685 181.818 24.7322 181.818 40.414V109.107C181.818 152.971 150.795 189.562 109.489 198.141C113.068 229.903 140 254.562 172.727 254.562C207.898 254.562 236.364 226.096 236.364 190.925V150.755C220.284 143.766 209.091 127.744 209.091 109.107C209.091 83.9935 229.432 63.6526 254.545 63.6526C279.659 63.6526 300 83.9935 300 109.107C300 127.744 288.807 143.766 272.727 150.755V190.925C272.727 246.153 227.955 290.925 172.727 290.925C119.943 290.925 76.7614 250.073 73.0114 198.255C31.3636 189.903 0 153.198 0 109.107V40.414C0 24.789 10 10.8685 24.8864 5.92536L39.7159 0.982176C49.2614 -2.19964 59.5455 2.97081 62.7273 12.4594ZM254.545 127.289C259.368 127.289 263.992 125.373 267.402 121.964C270.812 118.554 272.727 113.929 272.727 109.107C272.727 104.285 270.812 99.6604 267.402 96.2507C263.992 92.8409 259.368 90.9254 254.545 90.9254C249.723 90.9254 245.099 92.8409 241.689 96.2507C238.279 99.6604 236.364 104.285 236.364 109.107C236.364 113.929 238.279 118.554 241.689 121.964C245.099 125.373 249.723 127.289 254.545 127.289Z - `, + M107.055 28.9758C112.485 45.2667 103.661 62.8183 87.4667 68.2486L62.0606 76.6849V193.921C62.0606 245.315 103.758 287.012 155.152 287.012C206.545 287.012 248.242 245.315 248.242 193.921V76.6849L222.933 68.2486C206.642 62.8183 197.915 45.2667 203.345 28.9758C208.776 12.6849 226.327 3.95766 242.618 9.38796L267.927 17.8243C293.236 26.2607 310.303 49.9213 310.303 76.6849V193.921C310.303 268.782 257.358 331.23 186.861 345.873C192.97 400.079 238.933 442.164 294.788 442.164C354.812 442.164 403.394 393.582 403.394 333.558V265C375.952 253.073 356.848 225.727 356.848 193.921C356.848 151.061 391.564 116.346 434.424 116.346C477.285 116.346 512 151.061 512 193.921C512 225.727 492.897 253.073 465.455 265V333.558C465.455 427.812 389.042 504.224 294.788 504.224C204.703 504.224 131.006 434.503 124.606 346.067C53.5273 331.812 0 269.17 0 193.921V76.6849C0 50.0183 17.0667 26.2607 42.4727 17.8243L67.7818 9.38796C84.0727 3.95766 101.624 12.7819 107.055 28.9758ZM434.424 224.952C442.654 224.952 450.547 221.682 456.366 215.863C462.185 210.044 465.455 202.151 465.455 193.921C465.455 185.692 462.185 177.799 456.366 171.98C450.547 166.16 442.654 162.891 434.424 162.891C426.195 162.891 418.302 166.16 412.483 171.98C406.663 177.799 403.394 185.692 403.394 193.921C403.394 202.151 406.663 210.044 412.483 215.863C418.302 221.682 426.195 224.952 434.424 224.952Z + `, ], }; diff --git a/src/icons/Icons.tsx b/src/icons/Icons.tsx index da2206d30..c219455b5 100644 --- a/src/icons/Icons.tsx +++ b/src/icons/Icons.tsx @@ -1,134 +1,137 @@ import { IconDefinition, IconName, IconPrefix } from '@fortawesome/fontawesome-common-types'; -export const faViolin: IconDefinition = { - prefix: 'fac' as IconPrefix, +export const dvViolin: IconDefinition = { + prefix: 'dv' as IconPrefix, iconName: 'violin' as IconName, icon: [ - 300, - 300, + 512, + 512, [], null, ` - M115.5 19L113.487 22.6939L111.175 27.3664C108.928 32.2468 100.389 44.0993 84.211 52.4657C74.474 58.0433 55 71.7085 55 81.7482C55 86.6286 57.247 97.8535 66.235 103.71C75.972 111.031 95.4459 128.809 95.4459 141.359V158.092C95.0715 160.881 93.8731 167.922 92.0755 173.779C90.5775 179.705 87.5815 192.603 87.5815 196.786C87.956 203.41 90.0532 218.121 95.4459 223.977C100.689 229.904 111.175 243.638 111.175 251.168L112.871 254.179L115.5 257.443L118.131 254.179L119.828 251.168C119.828 243.638 130.313 229.904 135.556 223.977C140.948 218.121 143.046 203.41 143.42 196.786C143.42 192.603 140.424 179.705 138.926 173.779C137.129 167.922 135.93 160.881 135.556 158.092V141.359C135.556 128.809 155.029 111.031 164.766 103.71C173.753 97.8535 176 86.6286 176 81.7482C176 71.7085 156.527 58.0433 146.79 52.4657C130.613 44.0993 122.074 32.2468 119.828 27.3664L117.516 22.6939L115.5 19Z - M1.00006 267.968L1 267.964V267.961V17.5518C1 8.9314 7.75297 2 16.0142 2C24.2755 2 31.0285 8.9314 31.0285 17.5518V259.976L31.0272 260.004C31.0258 260.039 31.0243 260.088 31.0232 260.15C31.021 260.273 31.0208 260.448 31.0279 260.662C31.0422 261.088 31.0862 261.681 31.2054 262.35C31.4395 263.665 31.9857 265.399 33.2926 266.707C34.6013 268.017 36.3356 268.561 37.6516 268.793C38.3213 268.911 38.9141 268.953 39.341 268.967C39.5551 268.973 39.7293 268.973 39.8528 268.97C39.9146 268.969 39.9639 268.967 39.9992 268.966L40.0254 268.964H283.452C292.07 268.964 299 275.718 299 283.982C299 292.246 292.07 299 283.452 299L31.5035 299L31.4947 299L31.4709 298.999C31.4413 298.999 31.3962 298.997 31.3365 298.995C31.217 298.992 31.0388 298.985 30.8083 298.974C30.3473 298.953 29.6774 298.914 28.8496 298.845C27.1926 298.707 24.9103 298.448 22.408 297.969C17.3474 297.001 11.6087 295.168 8.20436 291.79C4.73403 288.347 2.90007 282.482 1.95638 277.297C1.48984 274.734 1.25037 272.393 1.12774 270.693C1.06647 269.843 1.0345 269.155 1.01786 268.682C1.00955 268.445 1.00506 268.262 1.00267 268.14C1.00147 268.078 1.00079 268.032 1.00042 268.002L1.00006 267.968Z - M231.698 46.7931H232.5H233H233.802C233.802 46.7931 234 49.5 236.207 52.4052C238.414 55.3103 242 67 246.5 70.1314C253 74 270.5 85 270.5 95.9702V104.305C270.5 108.5 273 113.5 275 117.641C276.5 121.253 279.5 129.644 279.5 134.312C279.5 139.868 277.119 151.847 270.5 158.484C264 165 250.848 176 249.5 183.489C248 191.824 240.5 216 239.5 220C238.5 224 237.5 225 236.207 227.181C234.338 230.333 233 236 233 236H232.5C232.5 236 231.162 230.333 229.293 227.181C228 225 227 224 226 220C225 216 217.5 191.824 216 183.489C214.652 176 201.5 165 195 158.484C188.381 151.847 186 139.868 186 134.312C186 129.644 189 121.253 190.5 117.641C192.5 113.5 195 108.5 195 104.305V95.9702C195 85 212.5 74 219 70.1314C223.5 67 227.086 55.3103 229.293 52.4052C231.5 49.5 231.698 46.7931 231.698 46.7931Z + M61.6512 502V501H474.861C489.325 501 501 489.62 501 475.643C501 461.666 489.325 450.286 474.861 450.286H75.6274C75.613 450.286 75.5944 450.287 75.5717 450.288C75.5182 450.291 75.4421 450.293 75.3456 450.295C75.1528 450.299 74.878 450.3 74.5389 450.29C73.8619 450.269 72.921 450.201 71.8591 450.013C69.7586 449.642 67.0641 448.78 65.0514 446.759C63.0416 444.741 62.1804 442.04 61.8068 439.934C61.6179 438.87 61.5481 437.926 61.5255 437.247C61.5141 436.907 61.5145 436.632 61.5179 436.439C61.5196 436.342 61.522 436.266 61.5242 436.212C61.5251 436.189 61.526 436.169 61.5267 436.155V37.2357C61.5267 22.7116 50.1819 11 36.2633 11C22.3447 11 11 22.7116 11 37.2357V449.283L11 449.284L11.0001 449.297L11.0007 449.355C11.0014 449.406 11.0025 449.484 11.0045 449.587C11.0085 449.792 11.0159 450.096 11.0297 450.49C11.0572 451.276 11.1101 452.415 11.2112 453.822C11.4135 456.636 11.8086 460.512 12.5789 464.759C14.1302 473.311 17.1644 483.135 23.0055 488.95C28.7333 494.653 38.3109 497.695 46.6294 499.293C50.7608 500.086 54.5269 500.514 57.2604 500.742C58.6265 500.857 59.7329 500.921 60.4958 500.957C60.8773 500.975 61.1727 500.986 61.3718 500.992C61.4713 500.995 61.5467 500.997 61.5967 500.999L61.6524 501L61.6656 501L61.6685 501H61.6691C61.6691 501 61.669 501 61.6512 502ZM61.6512 502H474.861C489.85 502 502 490.199 502 475.643C502 461.086 489.85 449.286 474.861 449.286H75.6L61.6512 502Z + M389 24L385.539 30.3361L381.565 38.3509C377.703 46.7222 363.025 67.0526 335.214 81.4035C318.476 90.9708 285 114.411 285 131.632C285 140.003 288.863 159.257 304.313 169.303C321.051 181.86 354.527 212.355 354.527 233.882V262.583C353.883 267.367 351.823 279.446 348.733 289.491C346.158 299.656 341.008 321.781 341.008 328.956C341.652 340.317 345.257 365.551 354.527 375.596C363.54 385.762 381.565 409.321 381.565 422.237L384.481 427.401L389 433L393.523 427.401L396.439 422.237C396.439 409.321 414.464 385.762 423.476 375.596C432.746 365.551 436.351 340.317 436.995 328.956C436.995 321.781 431.845 299.656 429.27 289.491C426.18 279.446 424.12 267.367 423.476 262.583V233.882C423.476 212.355 456.951 181.86 473.688 169.303C489.138 159.257 493 140.003 493 131.632C493 114.411 459.526 90.9708 442.788 81.4035C414.979 67.0526 400.302 46.7222 396.439 38.3509L392.465 30.3361L389 24Z + M174.2 77H175.572H176.428H177.8C177.8 77 178.139 81.6353 181.916 86.6102C185.692 91.585 191.829 111.603 199.529 116.965C210.652 123.589 240.599 142.426 240.599 161.211V175.485C240.599 182.668 244.877 191.23 248.299 198.322C250.866 204.507 256 218.875 256 226.868C256 236.383 251.926 256.896 240.599 268.26C229.476 279.419 206.969 298.255 204.663 311.079C202.096 325.352 189.262 366.752 187.551 373.601C185.84 380.451 184.128 382.164 181.916 385.898C178.717 391.296 176.428 401 176.428 401H175.572C175.572 401 173.283 391.296 170.084 385.898C167.872 382.164 166.16 380.451 164.449 373.601C162.738 366.752 149.904 325.352 147.337 311.079C145.031 298.255 122.524 279.419 111.401 268.26C100.074 256.896 96 236.383 96 226.868C96 218.875 101.134 204.507 103.701 198.322C107.123 191.23 111.401 182.668 111.401 175.485V161.211C111.401 142.426 141.348 123.589 152.471 116.965C160.171 111.603 166.308 91.585 170.084 86.6102C173.861 81.6353 174.2 77 174.2 77Z `, ], }; -export const faBoxplot: IconDefinition = { - prefix: 'fac' as IconPrefix, +export const dvBoxplot: IconDefinition = { + prefix: 'dv' as IconPrefix, iconName: 'boxplot' as IconName, icon: [ - 300, - 300, + 512, + 512, [], null, ` - M1.00006 267.968L1 267.964V267.961V17.5518C1 8.9314 7.75297 2 16.0142 2C24.2755 2 31.0285 8.9314 31.0285 17.5518V259.976L31.0272 260.004C31.0258 260.039 31.0243 260.088 31.0232 260.15C31.021 260.273 31.0208 260.448 31.0279 260.662C31.0422 261.088 31.0862 261.681 31.2054 262.35C31.4395 263.665 31.9857 265.399 33.2926 266.707C34.6013 268.017 36.3356 268.561 37.6516 268.793C38.3213 268.911 38.9141 268.953 39.341 268.967C39.5551 268.973 39.7293 268.973 39.8528 268.97C39.9146 268.969 39.9639 268.967 39.9992 268.966L40.0254 268.964H283.452C292.07 268.964 299 275.718 299 283.982C299 292.246 292.07 299 283.452 299L31.5035 299L31.4947 299L31.4709 298.999C31.4413 298.999 31.3962 298.997 31.3365 298.995C31.217 298.992 31.0388 298.985 30.8083 298.974C30.3473 298.953 29.6774 298.914 28.8496 298.845C27.1926 298.707 24.9103 298.448 22.408 297.969C17.3474 297.001 11.6087 295.168 8.20436 291.79C4.73403 288.347 2.90007 282.482 1.95638 277.297C1.48984 274.734 1.25037 272.393 1.12774 270.693C1.06647 269.843 1.0345 269.155 1.01786 268.682C1.00955 268.445 1.00506 268.262 1.00267 268.14C1.00147 268.078 1.00079 268.032 1.00042 268.002L1.00006 267.968Z - M155 193.3V72C155 69.2386 152.761 67 150 67H118V48L131 48C133.761 48 136 45.7614 136 43V35C136 32.2386 133.761 30 131 30L86 30C83.2386 30 81 32.2386 81 35V43C81 45.7614 83.2386 48 86 48H100V67H65C62.2386 67 60 69.2386 60 72V193.3C60 196.061 62.2386 198.3 65 198.3H100V222H87C84.2386 222 82 224.239 82 227V235C82 237.761 84.2386 240 87 240H132C134.761 240 137 237.761 137 235V227C137 224.239 134.761 222 132 222H118V198.3H150C152.761 198.3 155 196.061 155 193.3Z - M275 144.5V78.5C275 75.7386 272.761 73.5 270 73.5H238V32L251 32C253.761 32 256 29.7614 256 27V19C256 16.2386 253.761 14 251 14L206 14C203.239 14 201 16.2386 201 19V27C201 29.7614 203.239 32 206 32H220V73.5H185C182.239 73.5 180 75.7386 180 78.5V144.5C180 147.261 182.239 149.5 185 149.5H220V192H207C204.239 192 202 194.239 202 197V205C202 207.761 204.239 210 207 210H252C254.761 210 257 207.761 257 205V197C257 194.239 254.761 192 252 192H238V149.5H270C272.761 149.5 275 147.261 275 144.5Z + M75.5717 450.288C75.5944 450.287 75.613 450.286 75.6274 450.286H474.861C489.325 450.286 501 461.666 501 475.643C501 489.62 489.325 501 474.861 501H61.6512V502C61.669 501 61.6691 501 61.6691 501H61.6685L61.6656 501L61.6524 501L61.5967 500.999C61.5467 500.997 61.4713 500.995 61.3718 500.992C61.1727 500.986 60.8773 500.975 60.4958 500.957C59.7329 500.921 58.6265 500.857 57.2604 500.742C54.5269 500.514 50.7608 500.086 46.6294 499.293C38.3109 497.695 28.7333 494.653 23.0055 488.95C17.1644 483.135 14.1302 473.311 12.5789 464.759C11.8086 460.512 11.4135 456.636 11.2112 453.822C11.1101 452.415 11.0572 451.276 11.0297 450.49C11.0159 450.096 11.0085 449.792 11.0045 449.587C11.0025 449.484 11.0014 449.406 11.0007 449.355L11.0001 449.297L11 449.284L11 449.283V37.2357C11 22.7116 22.3447 11 36.2633 11C50.1819 11 61.5267 22.7116 61.5267 37.2357V436.155C61.526 436.169 61.5251 436.189 61.5242 436.212C61.5221 436.266 61.5196 436.342 61.5179 436.439C61.5145 436.632 61.5141 436.907 61.5255 437.247C61.5481 437.926 61.6179 438.87 61.8068 439.934C62.1804 442.04 63.0416 444.741 65.0514 446.759C67.0641 448.78 69.7586 449.642 71.8591 450.013C72.921 450.201 73.8619 450.269 74.5389 450.29C74.878 450.3 75.1528 450.299 75.3456 450.295C75.4421 450.293 75.5182 450.291 75.5717 450.288Z + M275 336.162V118.4C275 113.443 270.971 109.424 266 109.424H208.4V75.3143L231.8 75.3143C236.771 75.3143 240.8 71.2955 240.8 66.3381V51.9762C240.8 47.0188 236.771 43 231.8 43L150.8 43C145.829 43 141.8 47.0188 141.8 51.9762V66.3381C141.8 71.2955 145.829 75.3143 150.8 75.3143H176V109.424H113C108.029 109.424 104 113.443 104 118.4V336.162C104 341.12 108.029 345.139 113 345.139H176V387.686H152.6C147.629 387.686 143.6 391.704 143.6 396.662V411.024C143.6 415.981 147.629 420 152.6 420H233.6C238.571 420 242.6 415.981 242.6 411.024V396.662C242.6 391.704 238.571 387.686 233.6 387.686H208.4V345.139H266C270.971 345.139 275 341.12 275 336.162Z + M490 248.367V129.837C490 124.877 485.994 120.857 481.053 120.857H423.789V46.3265L447.053 46.3265C451.994 46.3265 456 42.3062 456 37.3469V22.9796C456 18.0203 451.994 14 447.053 14L366.526 14C361.585 14 357.579 18.0203 357.579 22.9796V37.3469C357.579 42.3062 361.585 46.3265 366.526 46.3265H391.579V120.857H328.947C324.006 120.857 320 124.877 320 129.837V248.367C320 253.327 324.006 257.347 328.947 257.347H391.579V333.673H368.316C363.374 333.673 359.368 337.694 359.368 342.653V357.02C359.368 361.98 363.374 366 368.316 366H448.842C453.784 366 457.789 361.98 457.789 357.02V342.653C457.789 337.694 453.784 333.673 448.842 333.673H423.789V257.347H481.053C485.994 257.347 490 253.327 490 248.367Z `, ], }; -export const faScatterplot: IconDefinition = { - prefix: 'fac' as IconPrefix, +export const dvScatterplot: IconDefinition = { + prefix: 'dv' as IconPrefix, iconName: 'scatterplot' as IconName, icon: [ - 300, - 300, + 512, + 512, [], null, ` - M1.00006 267.968L1 267.964V267.961V17.5518C1 8.9314 7.75297 2 16.0142 2C24.2755 2 31.0285 8.9314 31.0285 17.5518V259.976L31.0272 260.004C31.0258 260.039 31.0243 260.088 31.0232 260.15C31.021 260.273 31.0208 260.448 31.0279 260.662C31.0422 261.088 31.0862 261.681 31.2054 262.35C31.4395 263.665 31.9857 265.399 33.2926 266.707C34.6013 268.017 36.3356 268.561 37.6516 268.793C38.3213 268.911 38.9141 268.953 39.341 268.967C39.5551 268.973 39.7293 268.973 39.8528 268.97C39.9146 268.969 39.9639 268.967 39.9992 268.966L40.0254 268.964H283.452C292.07 268.964 299 275.718 299 283.982C299 292.246 292.07 299 283.452 299L31.5035 299L31.4947 299L31.4709 298.999C31.4413 298.999 31.3962 298.997 31.3365 298.995C31.217 298.992 31.0388 298.985 30.8083 298.974C30.3473 298.953 29.6774 298.914 28.8496 298.845C27.1926 298.707 24.9103 298.448 22.408 297.969C17.3474 297.001 11.6087 295.168 8.20436 291.79C4.73403 288.347 2.90007 282.482 1.95638 277.297C1.48984 274.734 1.25037 272.393 1.12774 270.693C1.06647 269.843 1.0345 269.155 1.01786 268.682C1.00955 268.445 1.00506 268.262 1.00267 268.14C1.00147 268.078 1.00079 268.032 1.00042 268.002L1.00006 267.968Z - M299.5 25C299.5 38.531 288.531 49.5 275 49.5C261.469 49.5 250.5 38.531 250.5 25C250.5 11.469 261.469 0.5 275 0.5C288.531 0.5 299.5 11.469 299.5 25ZM199.5 42C199.5 55.531 188.531 66.5 175 66.5C161.469 66.5 150.5 55.531 150.5 42C150.5 28.469 161.469 17.5 175 17.5C188.531 17.5 199.5 28.469 199.5 42ZM119.5 215C119.5 228.531 108.531 239.5 95 239.5C81.469 239.5 70.5 228.531 70.5 215C70.5 201.469 81.469 190.5 95 190.5C108.531 190.5 119.5 201.469 119.5 215ZM139.5 115C139.5 128.531 128.531 139.5 115 139.5C101.469 139.5 90.5 128.531 90.5 115C90.5 101.469 101.469 90.5 115 90.5C128.531 90.5 139.5 101.469 139.5 115ZM219.5 172C219.5 185.531 208.531 196.5 195 196.5C181.469 196.5 170.5 185.531 170.5 172C170.5 158.469 181.469 147.5 195 147.5C208.531 147.5 219.5 158.469 219.5 172ZM286.5 107C286.5 120.531 275.531 131.5 262 131.5C248.469 131.5 237.5 120.531 237.5 107C237.5 93.469 248.469 82.5 262 82.5C275.531 82.5 286.5 93.469 286.5 107Z + M480.18 88C480.18 110.443 462.048 128.5 439.68 128.5C417.312 128.5 399.18 110.443 399.18 88C399.18 65.5573 417.312 47.5 439.68 47.5C462.048 47.5 480.18 65.5573 480.18 88ZM333 129C333 151.445 314.866 169.637 292.5 169.637C270.134 169.637 252 151.445 252 129C252 106.555 270.134 88.3629 292.5 88.3629C314.866 88.3629 333 106.555 333 129ZM206.3 362.134C206.3 384.579 188.166 402.771 165.8 402.771C143.434 402.771 125.3 384.579 125.3 362.134C125.3 339.689 143.434 321.497 165.8 321.497C188.166 321.497 206.3 339.689 206.3 362.134ZM232 212.137C232 234.582 213.866 252.774 191.5 252.774C169.134 252.774 151 234.582 151 212.137C151 189.692 169.134 171.5 191.5 171.5C213.866 171.5 232 189.692 232 212.137ZM351.5 320.997C351.5 343.442 333.366 361.634 311 361.634C288.634 361.634 270.5 343.442 270.5 320.997C270.5 298.552 288.634 280.36 311 280.36C333.366 280.36 351.5 298.552 351.5 320.997ZM439.18 212.137C439.18 234.582 421.046 252.774 398.68 252.774C376.314 252.774 358.18 234.582 358.18 212.137C358.18 189.692 376.314 171.5 398.68 171.5C421.046 171.5 439.18 189.692 439.18 212.137Z + M75.5717 450.288C75.5943 450.287 75.613 450.286 75.6274 450.286H474.861C489.325 450.286 501 461.666 501 475.643C501 489.62 489.325 501 474.861 501H61.6512V502C61.6689 501 61.669 501 61.669 501H61.6685L61.6656 501L61.6524 501L61.5966 500.999C61.5467 500.997 61.4713 500.995 61.3717 500.992C61.1727 500.986 60.8772 500.975 60.4958 500.957C59.7328 500.921 58.6265 500.857 57.2604 500.742C54.5269 500.514 50.7607 500.086 46.6294 499.293C38.3109 497.695 28.7333 494.653 23.0055 488.95C17.1644 483.135 14.1301 473.311 12.5789 464.759C11.8086 460.512 11.4135 456.636 11.2111 453.822C11.11 452.415 11.0572 451.276 11.0297 450.49C11.0159 450.096 11.0085 449.792 11.0045 449.587C11.0025 449.484 11.0013 449.406 11.0007 449.355L11.0001 449.297L11 449.284L11 449.283V37.2357C11 22.7116 22.3447 11 36.2633 11C50.1819 11 61.5267 22.7116 61.5267 37.2357V436.155C61.5259 436.169 61.5251 436.189 61.5241 436.212C61.522 436.266 61.5196 436.342 61.5179 436.439C61.5145 436.632 61.5141 436.907 61.5254 437.247C61.5481 437.926 61.6178 438.87 61.8068 439.934C62.1804 442.04 63.0416 444.741 65.0514 446.759C67.064 448.78 69.7586 449.642 71.8591 450.013C72.921 450.201 73.8619 450.269 74.5388 450.29C74.878 450.3 75.1528 450.299 75.3456 450.295C75.4421 450.293 75.5182 450.291 75.5717 450.288Z `, ], }; -export const faHexbinplot: IconDefinition = { - prefix: 'fac' as IconPrefix, +export const dvHexbinplot: IconDefinition = { + prefix: 'dv' as IconPrefix, iconName: 'hexbinplot' as IconName, icon: [ - 300, - 300, + 512, + 512, [], null, ` - M1.00006 266.968L1 266.964V266.961V16.5518C1 7.9314 7.75297 1 16.0142 1C24.2755 1 31.0285 7.9314 31.0285 16.5518V258.976L31.0272 259.004C31.0258 259.039 31.0243 259.088 31.0232 259.15C31.021 259.273 31.0208 259.448 31.0279 259.662C31.0422 260.088 31.0862 260.681 31.2054 261.35C31.4395 262.665 31.9857 264.399 33.2926 265.707C34.6013 267.017 36.3356 267.561 37.6516 267.793C38.3213 267.911 38.9141 267.953 39.341 267.967C39.5551 267.973 39.7293 267.973 39.8528 267.97C39.9146 267.969 39.9639 267.967 39.9992 267.966L40.0254 267.964H283.452C292.07 267.964 299 274.718 299 282.982C299 291.246 292.07 298 283.452 298L31.5035 298L31.4947 298L31.4709 297.999C31.4413 297.999 31.3962 297.997 31.3365 297.995C31.217 297.992 31.0388 297.985 30.8083 297.974C30.3473 297.953 29.6774 297.914 28.8496 297.845C27.1926 297.707 24.9103 297.448 22.408 296.969C17.3474 296.001 11.6087 294.168 8.20436 290.79C4.73403 287.347 2.90007 281.482 1.95638 276.297C1.48984 273.734 1.25037 271.393 1.12774 269.693C1.06647 268.843 1.0345 268.155 1.01786 267.682C1.00955 267.445 1.00506 267.262 1.00267 267.14C1.00147 267.078 1.00079 267.032 1.00042 267.002L1.00006 266.968Z - M87.4105 142.343H143.078L170.911 190.422L143.078 238.5H87.4105L59.5777 190.422L87.4105 142.343ZM188.922 84.4853H244.59L272.422 132.564L244.59 180.642H188.922L161.089 132.564L188.922 84.4853ZM87.4105 28.5L143.078 28.5L170.911 76.5785L143.078 124.657H87.4105L59.5777 76.5785L87.4105 28.5Z + M61.6512 502V501H474.861C489.325 501 501 489.62 501 475.643C501 461.666 489.325 450.286 474.861 450.286H75.6274C75.613 450.286 75.5944 450.287 75.5717 450.288C75.5182 450.291 75.4421 450.293 75.3456 450.295C75.1528 450.299 74.878 450.3 74.5389 450.29C73.8619 450.269 72.921 450.201 71.8591 450.013C69.7586 449.642 67.0641 448.78 65.0514 446.759C63.0416 444.741 62.1804 442.04 61.8068 439.934C61.6179 438.87 61.5481 437.926 61.5255 437.247C61.5141 436.907 61.5145 436.632 61.5179 436.439C61.5196 436.342 61.522 436.266 61.5242 436.212C61.5251 436.189 61.526 436.169 61.5267 436.155V37.2357C61.5267 22.7116 50.1819 11 36.2633 11C22.3447 11 11 22.7116 11 37.2357V449.283L11 449.284L11.0001 449.297L11.0007 449.355C11.0014 449.406 11.0025 449.484 11.0045 449.587C11.0085 449.792 11.0159 450.096 11.0297 450.49C11.0572 451.276 11.1101 452.415 11.2112 453.822C11.4135 456.636 11.8086 460.512 12.5789 464.759C14.1302 473.311 17.1644 483.135 23.0055 488.95C28.7333 494.653 38.3109 497.695 46.6294 499.293C50.7608 500.086 54.5269 500.514 57.2604 500.742C58.6265 500.857 59.7329 500.921 60.4958 500.957C60.8773 500.975 61.1727 500.986 61.3718 500.992C61.4713 500.995 61.5467 500.997 61.5967 500.999L61.6524 501L61.6656 501L61.6685 501H61.6691C61.6691 501 61.669 501 61.6512 502ZM61.6512 502H474.861C489.85 502 502 490.199 502 475.643C502 461.086 489.85 449.286 474.861 449.286H75.6L61.6512 502Z + M153.169 243.901H244.832L290.664 323.336L244.832 402.771H153.169L107.337 323.336L153.169 243.901ZM319.648 148.697H411.311L457.143 228.132L411.311 307.567H319.648L273.816 228.132L319.648 148.697ZM153.169 56.5736L244.832 56.5736L290.664 136.009L244.832 215.444H153.169L107.337 136.009L153.169 56.5736Z `, ], }; -export const faChemicalStructure: IconDefinition = { - prefix: 'fac' as IconPrefix, +export const dvChemicalStructure: IconDefinition = { + prefix: 'dv' as IconPrefix, iconName: 'chemicalStructure' as IconName, icon: [ - 300, - 300, + 512, + 512, [], null, ` - M0.5 165.174V165.202L0.503101 165.23C0.81116 167.983 1.62517 170.726 2.98554 173.327C8.87308 184.582 22.7705 188.934 34.0262 183.047C37.127 181.425 39.7048 179.194 41.6886 176.577L74.0529 177.926L85.8773 200.532L64.8862 233.624C62.4421 233.998 60.0176 234.776 57.7055 235.985C46.4498 241.873 42.098 255.77 47.9855 267.026C53.8731 278.281 67.7704 282.633 79.0262 276.746C88.6247 271.725 93.2019 260.88 90.6917 250.816L112.197 216.914L148.741 218.437C151.775 218.564 154.646 217.062 156.273 214.497L182.964 172.418C184.59 169.854 184.725 166.616 183.318 163.925L166.522 131.815L194.685 90.6691L240.188 92.5655C248.527 92.913 256.425 88.8117 260.937 81.7906L283.416 46.8103C285.326 46.3794 287.211 45.6959 289.026 44.7462C293.872 42.2118 297.438 38.1919 299.459 33.5381C301.926 27.8548 302.088 21.2229 299.458 15.1924C299.24 14.6923 299.003 14.1964 298.746 13.7056C292.859 2.44985 278.961 -1.90193 267.706 3.98561C257.631 9.25518 253.088 20.9406 256.466 31.4062L237.182 61.4133L191.661 59.5161C183.272 59.1666 175.335 63.3185 170.838 70.408L142.688 114.786L103.257 113.142C100.223 113.016 97.3514 114.517 95.7248 117.082L76.7401 147.011L38.5942 145.422C31.6574 139.298 21.3949 137.741 12.7055 142.286C5.662 145.97 1.32244 152.791 0.503082 160.137L0.5 160.164V160.192V165.174ZM112.269 139.54L141.866 140.774L155.596 167.024L139.729 192.039L110.131 190.805L96.4011 164.556L112.269 139.54Z + M253.549 213.538L298.645 142.445C304.45 133.293 314.697 127.934 325.525 128.385L350.626 129.431L350.782 129.438L407.553 131.804L443.531 75.8179C443.153 74.9596 442.816 74.0922 442.521 73.2182L442.512 73.1936C437.697 58.9103 443.843 42.8479 457.622 35.6405C472.88 27.6596 491.719 33.5587 499.7 48.8166C507.681 64.0745 501.782 82.9133 486.524 90.8943C481.76 93.3861 476.647 94.5249 471.625 94.4482L434.864 151.652C429.039 160.715 418.845 166.01 408.08 165.561L326.065 162.143L279.642 235.328L311.104 295.476C313.337 299.744 313.122 304.879 310.542 308.947L265.56 379.863C262.98 383.93 258.426 386.313 253.613 386.112L181.818 383.119L147.026 437.967C152.377 452.455 146.262 469.011 132.213 476.36C116.955 484.341 98.1161 478.441 90.1351 463.184C82.1541 447.926 88.0533 429.087 103.311 421.106C108.645 418.316 114.417 417.222 120.01 417.632L153.116 365.441L123.717 309.237L66.2436 306.842C63.4104 311.308 59.4013 315.113 54.3776 317.741C39.1197 325.722 20.2809 319.823 12.3 304.565C4.319 289.307 10.2181 270.468 25.476 262.487C39.8473 254.97 57.3953 259.766 66.0552 273.099L127.475 275.658L164.942 216.591C167.522 212.523 172.076 210.141 176.888 210.342L253.549 213.538ZM247.725 247.03L187.15 244.505L154.676 295.701L182.776 349.423L243.351 351.949L275.825 300.752L247.725 247.03Z + M253.549 213.538L298.645 142.445C304.45 133.293 314.697 127.934 325.525 128.385L350.626 129.431L350.782 129.438L407.553 131.804L443.531 75.8179C443.153 74.9596 442.816 74.0922 442.521 73.2182L442.512 73.1936C437.697 58.9103 443.843 42.8479 457.622 35.6405C472.88 27.6596 491.719 33.5587 499.7 48.8166C507.681 64.0745 501.782 82.9133 486.524 90.8943C481.76 93.3861 476.647 94.5249 471.625 94.4482L434.864 151.652C429.039 160.715 418.845 166.01 408.08 165.561L326.065 162.143L279.642 235.328L311.104 295.476C313.337 299.744 313.122 304.879 310.542 308.947L265.56 379.863C262.98 383.93 258.426 386.313 253.613 386.112L181.818 383.119L147.026 437.967C152.377 452.455 146.262 469.011 132.213 476.36C116.955 484.341 98.1161 478.441 90.1351 463.184C82.1541 447.926 88.0533 429.087 103.311 421.106C108.645 418.316 114.417 417.222 120.01 417.632L153.116 365.441L123.717 309.237L66.2436 306.842C63.4104 311.308 59.4013 315.113 54.3776 317.741C39.1197 325.722 20.2809 319.823 12.3 304.565C4.319 289.307 10.2181 270.468 25.476 262.487C39.8473 254.97 57.3953 259.766 66.0552 273.099L127.475 275.658L164.942 216.591C167.522 212.523 172.076 210.141 176.888 210.342L253.549 213.538ZM247.725 247.03L187.15 244.505L154.676 295.701L182.776 349.423L243.351 351.949L275.825 300.752L247.725 247.03Z + M298.645 142.445L294.423 139.767L294.423 139.767L298.645 142.445ZM253.549 213.538L253.341 218.534L256.225 218.654L257.771 216.216L253.549 213.538ZM325.525 128.385L325.733 123.389L325.733 123.389L325.525 128.385ZM350.626 129.431L350.418 134.427L350.418 134.427L350.626 129.431ZM350.782 129.438L350.99 124.442L350.99 124.442L350.782 129.438ZM407.553 131.804L407.345 136.799L410.209 136.919L411.759 134.507L407.553 131.804ZM443.531 75.8179L447.738 78.521L449.191 76.26L448.106 73.8007L443.531 75.8179ZM442.521 73.2182L447.257 71.6168L447.257 71.6147L442.521 73.2182ZM442.512 73.1936L437.774 74.7911L437.777 74.7971L442.512 73.1936ZM457.622 35.6405L459.94 40.071L459.94 40.071L457.622 35.6405ZM499.7 48.8166L504.13 46.4992L504.13 46.4991L499.7 48.8166ZM486.524 90.8943L484.206 86.4638L484.206 86.4638L486.524 90.8943ZM471.625 94.4482L471.701 89.4488L468.921 89.4064L467.418 91.7451L471.625 94.4482ZM434.864 151.652L430.657 148.949L430.657 148.949L434.864 151.652ZM408.08 165.561L408.289 160.565L408.289 160.565L408.08 165.561ZM326.065 162.143L326.274 157.147L323.39 157.027L321.843 159.465L326.065 162.143ZM279.642 235.328L275.42 232.65L273.874 235.087L275.212 237.645L279.642 235.328ZM311.104 295.476L306.673 297.793L306.673 297.793L311.104 295.476ZM310.542 308.947L306.32 306.268L306.32 306.268L310.542 308.947ZM265.56 379.863L261.337 377.185L261.337 377.185L265.56 379.863ZM253.613 386.112L253.821 381.116L253.821 381.116L253.613 386.112ZM181.818 383.119L182.026 378.123L179.142 378.003L177.595 380.44L181.818 383.119ZM147.026 437.967L142.804 435.289L141.478 437.378L142.336 439.699L147.026 437.967ZM132.213 476.36L129.895 471.929L129.895 471.929L132.213 476.36ZM103.311 421.106L105.629 425.536L105.629 425.536L103.311 421.106ZM120.01 417.632L119.645 422.618L122.629 422.837L124.232 420.31L120.01 417.632ZM153.116 365.441L157.338 368.119L158.884 365.681L157.546 363.123L153.116 365.441ZM123.717 309.237L128.148 306.92L126.81 304.362L123.926 304.241L123.717 309.237ZM66.2436 306.842L66.4518 301.846L63.5676 301.726L62.0214 304.164L66.2436 306.842ZM54.3776 317.741L56.6951 322.171L56.6951 322.171L54.3776 317.741ZM12.3 304.565L7.86946 306.882L7.86946 306.882L12.3 304.565ZM25.476 262.487L27.7935 266.917L27.7935 266.917L25.476 262.487ZM66.0552 273.099L61.8621 275.822L63.2681 277.987L65.847 278.094L66.0552 273.099ZM127.475 275.658L127.266 280.654L130.151 280.774L131.697 278.337L127.475 275.658ZM164.942 216.591L169.164 219.269L169.164 219.269L164.942 216.591ZM176.888 210.342L176.68 215.338L176.68 215.338L176.888 210.342ZM187.15 244.505L187.358 239.509L184.474 239.389L182.928 241.827L187.15 244.505ZM247.725 247.03L252.155 244.713L250.817 242.155L247.933 242.035L247.725 247.03ZM154.676 295.701L150.454 293.023L148.907 295.461L150.245 298.019L154.676 295.701ZM182.776 349.423L178.346 351.741L179.684 354.299L182.568 354.419L182.776 349.423ZM243.351 351.949L243.143 356.944L246.027 357.065L247.573 354.627L243.351 351.949ZM275.825 300.752L280.047 303.43L281.594 300.993L280.256 298.435L275.825 300.752ZM294.423 139.767L249.327 210.86L257.771 216.216L302.867 145.123L294.423 139.767ZM325.733 123.389C313.12 122.864 301.185 129.107 294.423 139.767L302.867 145.123C307.716 137.48 316.273 133.004 325.317 133.381L325.733 123.389ZM350.834 124.435L325.733 123.389L325.317 133.381L350.418 134.427L350.834 124.435ZM350.99 124.442L350.834 124.435L350.418 134.427L350.574 134.433L350.99 124.442ZM407.761 126.808L350.99 124.442L350.574 134.433L407.345 136.799L407.761 126.808ZM439.325 73.1148L403.347 129.101L411.759 134.507L447.738 78.521L439.325 73.1148ZM437.784 74.8195C438.127 75.8341 438.518 76.8403 438.956 77.8351L448.106 73.8007C447.788 73.079 447.505 72.3504 447.257 71.6168L437.784 74.8195ZM437.777 74.7971L437.785 74.8216L447.257 71.6147L447.248 71.5902L437.777 74.7971ZM455.305 31.21C439.312 39.5754 432.185 58.2131 437.774 74.7911L447.25 71.5962C443.208 59.6074 448.375 46.1204 459.94 40.071L455.305 31.21ZM504.13 46.4991C494.869 28.7944 473.01 21.9492 455.305 31.21L459.94 40.071C472.751 33.37 488.568 38.3231 495.269 51.1341L504.13 46.4991ZM488.841 95.3248C506.546 86.0639 513.391 64.204 504.13 46.4992L495.269 51.1341C501.97 63.9451 497.017 79.7627 484.206 86.4638L488.841 95.3248ZM471.548 99.4476C477.383 99.5367 483.321 98.2122 488.841 95.3248L484.206 86.4638C480.199 88.56 475.911 89.513 471.701 89.4488L471.548 99.4476ZM439.07 154.355L475.831 97.1513L467.418 91.7451L430.657 148.949L439.07 154.355ZM407.872 170.557C420.411 171.079 432.286 164.912 439.07 154.355L430.657 148.949C425.793 156.518 417.279 160.94 408.289 160.565L407.872 170.557ZM325.857 167.138L407.872 170.557L408.289 160.565L326.274 157.147L325.857 167.138ZM283.864 238.006L330.288 164.821L321.843 159.465L275.42 232.65L283.864 238.006ZM315.534 293.159L284.073 233.01L275.212 237.645L306.673 297.793L315.534 293.159ZM314.765 311.625C318.302 306.049 318.595 299.01 315.534 293.158L306.673 297.793C308.078 300.479 307.943 303.709 306.32 306.268L314.765 311.625ZM269.782 382.541L314.765 311.625L306.32 306.268L261.337 377.185L269.782 382.541ZM253.405 391.108C260.002 391.383 266.245 388.117 269.782 382.541L261.337 377.185C259.714 379.744 256.849 381.242 253.821 381.116L253.405 391.108ZM181.609 388.114L253.405 391.108L253.821 381.116L182.026 378.123L181.609 388.114ZM151.248 440.645L186.04 385.797L177.595 380.44L142.804 435.289L151.248 440.645ZM134.53 480.79C150.837 472.261 157.927 453.051 151.716 436.235L142.336 439.699C146.827 451.859 141.688 465.761 129.895 471.929L134.53 480.79ZM85.7046 465.501C94.9654 483.206 116.825 490.051 134.53 480.79L129.895 471.929C117.084 478.63 101.267 473.677 94.5656 460.866L85.7046 465.501ZM100.994 416.675C83.2889 425.936 76.4437 447.796 85.7046 465.501L94.5656 460.866C87.8645 448.055 92.8176 432.237 105.629 425.536L100.994 416.675ZM120.375 412.645C113.881 412.169 107.176 413.441 100.994 416.675L105.629 425.536C110.114 423.19 114.954 422.275 119.645 422.618L120.375 412.645ZM148.894 362.763L115.788 414.953L124.232 420.31L157.338 368.119L148.894 362.763ZM119.287 311.555L148.685 367.758L157.546 363.123L128.148 306.92L119.287 311.555ZM66.0354 311.838L123.509 314.233L123.926 304.241L66.4518 301.846L66.0354 311.838ZM56.6951 322.171C62.517 319.126 67.175 314.708 70.4658 309.52L62.0214 304.164C59.6457 307.909 56.2855 311.1 52.0602 313.31L56.6951 322.171ZM7.86946 306.882C17.1303 324.587 38.9903 331.432 56.6951 322.171L52.0602 313.31C39.2492 320.011 23.4315 315.058 16.7305 302.247L7.86946 306.882ZM23.1586 258.056C5.45377 267.317 -1.3914 289.177 7.86946 306.882L16.7305 302.247C10.0294 289.436 14.9825 273.619 27.7935 266.917L23.1586 258.056ZM70.2483 270.375C60.1967 254.9 39.837 249.332 23.1586 258.056L27.7935 266.917C39.8575 260.607 54.5939 264.633 61.8621 275.822L70.2483 270.375ZM127.683 270.663L66.2634 268.103L65.847 278.094L127.266 280.654L127.683 270.663ZM160.719 213.913L123.252 272.98L131.697 278.337L169.164 219.269L160.719 213.913ZM177.097 205.346C170.499 205.071 164.256 208.337 160.719 213.913L169.164 219.269C170.787 216.71 173.652 215.211 176.68 215.338L177.097 205.346ZM253.757 208.542L177.097 205.346L176.68 215.338L253.341 218.534L253.757 208.542ZM186.942 249.501L247.517 252.026L247.933 242.035L187.358 239.509L186.942 249.501ZM158.898 298.38L191.372 247.183L182.928 241.827L150.454 293.023L158.898 298.38ZM187.207 347.106L159.106 293.384L150.245 298.019L178.346 351.741L187.207 347.106ZM243.559 346.953L182.984 344.428L182.568 354.419L243.143 356.944L243.559 346.953ZM271.603 298.074L239.129 349.27L247.573 354.627L280.047 303.43L271.603 298.074ZM243.294 249.348L271.395 303.07L280.256 298.435L252.155 244.713L243.294 249.348Z `, ], }; -export const faFilterOutline: IconDefinition = { - prefix: 'fac' as IconPrefix, +export const dvFilterOutline: IconDefinition = { + prefix: 'dv' as IconPrefix, iconName: 'filterOutline' as IconName, icon: [ - 300, - 300, + 512, + 512, [], null, ` - M106.203 168.349C106.491 168.705 106.648 169.149 106.648 169.607V217.09C107.354 224.075 109.147 227.108 114.543 231.126L162.47 259.083C162.573 259.159 162.687 259.227 162.803 259.281C178.499 266.62 189.565 258.211 190.49 244.694V169.613C190.49 169.152 190.65 168.704 190.942 168.347L293.7 36.4935C303.917 21.9897 295.093 0.935732 276.052 0L26.1952 0.467866C2.97435 -0.467866 -5.38516 23.3933 3.43877 35.0899L106.203 168.349ZM125.642 152.629L27.8068 25.4649L270.798 25.0099L171.584 152.527C167.643 157.349 165.49 163.385 165.49 169.613V230.252L131.648 212.676V169.607C131.648 163.427 129.528 157.434 125.642 152.629ZM24.0298 25.5152C23.9961 25.5287 23.977 25.5323 23.977 25.5323C23.977 25.5323 23.9931 25.5246 24.0298 25.5152Z + M182.47 320.171C182.964 320.782 183.234 321.545 183.234 322.332V403.913C184.447 415.915 187.528 421.126 196.799 428.028L279.143 476.062C279.32 476.193 279.515 476.31 279.715 476.403C306.683 489.012 325.695 474.564 327.285 451.34V322.342C327.285 321.549 327.559 320.781 328.061 320.167L504.611 93.6265C522.166 68.7071 507.005 32.5339 474.29 30.9262L45.0065 31.73C5.1103 30.1223 -9.25235 71.1187 5.90822 91.2149L182.47 320.171ZM215.869 293.162L47.7754 74.6779L465.263 73.8962L294.802 292.986C288.031 301.271 284.332 311.641 284.332 322.342V426.526L226.187 396.33V322.332C226.187 311.714 222.545 301.417 215.869 293.162ZM41.2861 74.7644C41.2282 74.7875 41.1954 74.7938 41.1954 74.7938C41.1954 74.7938 41.2231 74.7805 41.2861 74.7644Z `, ], }; -export const faFilterClear: IconDefinition = { - prefix: 'fac' as IconPrefix, +export const dvFilterClear: IconDefinition = { + prefix: 'dv' as IconPrefix, iconName: 'filterClear' as IconName, icon: [ - 300, - 300, + 512, + 512, [], null, ` - M106.203 168.349C106.491 168.705 106.648 169.149 106.648 169.607V217.09C107.354 224.075 109.147 227.108 114.543 231.126L162.47 259.083C162.573 259.159 162.687 259.227 162.803 259.281C173.851 264.447 182.605 261.81 187.144 255.082C158.88 243.362 139 215.503 139 183C139 139.922 173.922 105 217 105C224.3 105 231.366 106.003 238.067 107.878L293.7 36.4935C303.917 21.9897 295.093 0.935732 276.052 0L26.1952 0.467866C2.97435 -0.467866 -5.38516 23.3933 3.43877 35.0899L106.203 168.349Z - M218 120C252.802 120 281 148.198 281 183C281 217.802 252.802 246 218 246C183.198 246 155 217.802 155 183C155 148.198 183.198 120 218 120ZM248.738 199.766L232.226 183L248.738 166.488C250.008 165.472 250.008 163.44 248.738 162.169L238.831 152.262C237.56 150.992 235.528 150.992 234.512 152.262L218 168.774L201.488 152.262C200.218 150.992 198.185 150.992 197.169 152.262L187.008 162.169C185.738 163.44 185.738 165.472 187.008 166.488L203.774 183L187.008 199.512C185.738 200.782 185.738 202.815 187.008 203.831L196.915 213.992C198.185 215.262 200.218 215.262 201.234 213.992L218 197.226L234.512 213.992C235.528 215.262 237.56 215.262 238.831 213.992L248.738 204.085C250.008 202.815 250.008 200.782 248.738 199.766Z + M182.47 320.171C182.964 320.782 183.234 321.545 183.234 322.332V403.913C184.447 415.915 187.528 421.126 196.799 428.028L279.143 476.062C279.32 476.193 279.515 476.31 279.715 476.403C298.697 485.278 313.738 480.748 321.536 469.188C272.975 449.051 238.819 401.186 238.819 345.342C238.819 271.329 298.819 211.329 372.832 211.329C385.375 211.329 397.514 213.052 409.028 216.274L504.611 93.6265C522.166 68.7071 507.005 32.5339 474.29 30.9262L45.0065 31.73C5.1103 30.1223 -9.25235 71.1187 5.90822 91.2149L182.47 320.171Z + M374.55 237.101C434.345 237.101 482.792 285.547 482.792 345.342C482.792 405.137 434.345 453.584 374.55 453.584C314.756 453.584 266.309 405.137 266.309 345.342C266.309 285.547 314.756 237.101 374.55 237.101ZM427.362 374.148L398.992 345.342L427.362 316.972C429.544 315.227 429.544 311.735 427.362 309.553L410.34 292.531C408.158 290.349 404.666 290.349 402.92 292.531L374.55 320.901L346.181 292.531C343.998 290.349 340.507 290.349 338.761 292.531L321.302 309.553C319.12 311.735 319.12 315.227 321.302 316.972L350.109 345.342L321.302 373.712C319.12 375.894 319.12 379.386 321.302 381.132L338.324 398.59C340.507 400.772 343.998 400.772 345.744 398.59L374.55 369.784L402.92 398.59C404.666 400.772 408.158 400.772 410.34 398.59L427.362 381.568C429.544 379.386 429.544 375.894 427.362 374.148Z `, ], }; -export const faStringCol: IconDefinition = { - prefix: 'fac' as IconPrefix, +export const dvStringCol: IconDefinition = { + prefix: 'dv' as IconPrefix, iconName: 'stringCol' as IconName, icon: [ - 300, - 300, + 512, + 512, [], null, ` - M236.047 90.7623L236.05 90.7695C238.705 96.7202 242.26 101.215 246.728 104.22C251.185 107.218 256.095 108.718 261.445 108.718C266.002 108.718 270.235 107.743 274.135 105.789C277.948 103.93 281.506 101.48 284.806 98.4416L299.353 121.371C293.905 126.318 288.257 130.092 282.409 132.704C276.464 135.232 269.807 136.5 262.429 136.5C254.954 136.5 247.806 134.981 240.981 131.94C234.267 128.773 228.306 124.275 223.1 118.441C218.007 112.611 213.936 105.504 210.892 97.1132C207.961 88.7339 206.491 79.1985 206.491 68.5003C206.491 57.8011 207.961 48.2654 210.892 39.8857C213.936 31.4949 218.008 24.3892 223.101 18.5586C228.308 12.7231 234.213 8.29012 240.817 5.25106L240.822 5.24907C247.536 2.08308 254.627 0.5 262.101 0.5C269.156 0.5 275.601 1.64207 281.443 3.9195L281.443 3.91964L281.455 3.92386C287.294 6.03469 292.985 9.24359 298.529 13.5565L284.762 37.2439C281.466 34.6942 277.916 32.6164 274.115 31.0097C270.111 29.19 265.832 28.2817 261.281 28.2817C255.931 28.2817 251.021 29.7822 246.564 32.7798L246.559 32.7831C242.201 35.7889 238.704 40.2828 236.05 46.2305L236.047 46.2377C233.497 52.2027 232.233 59.6302 232.233 68.5003C232.233 77.3698 233.497 84.7973 236.047 90.7623ZM66.0781 2.80257L106.947 134.197H80.1136L72.821 108.466L72.7179 108.102H72.3399H34.6303H34.2523L34.1492 108.466L26.8567 134.197H0.679148L41.5485 2.80257H66.0781ZM53.9662 41.94L53.4851 40.2427L53.0041 41.94L41.056 84.0977L40.8756 84.7341H41.537H65.4332H66.0946L65.9143 84.0977L53.9662 41.94ZM113.91 134.197V2.80257H155.574C162.613 2.80257 168.987 4.25852 174.708 7.16156L174.716 7.1654C180.432 9.94062 184.898 13.9074 188.128 19.0693L188.132 19.0755C191.461 24.225 193.137 30.4582 193.137 37.7998C193.137 45.1415 191.461 51.3084 188.135 56.3271L188.134 56.3286C185.94 59.665 183.174 62.4482 179.835 64.6796L179.141 65.1436L179.877 65.5366C185.546 68.5598 189.985 72.8887 193.203 78.5332L193.205 78.5374C196.435 84.0766 198.059 90.6384 198.059 98.2408C198.059 105.838 196.328 112.329 192.887 117.736L192.886 117.737C189.547 123.029 184.97 127.125 179.142 130.028C173.423 132.804 166.938 134.197 159.676 134.197H113.91ZM139.66 27.5139H139.16V28.0139V55.6441V56.1441H139.66H153.934C158.186 56.1441 161.652 54.9638 164.279 52.5593L164.279 52.5594L164.289 52.55C166.928 50.0006 168.215 46.4019 168.215 41.8289C168.215 37.2606 166.93 33.7201 164.284 31.2956C161.659 28.7614 158.191 27.5139 153.934 27.5139H139.66ZM139.66 78.9373H139.16V79.4373V108.986V109.486H139.66H157.215C161.687 109.486 165.318 108.241 168.055 105.707L168.057 105.705C170.92 103.027 172.317 99.1671 172.317 94.2117C172.317 89.2622 170.924 85.4622 168.056 82.9087C165.321 80.2473 161.689 78.9373 157.215 78.9373H139.66Z +M403.178 293.855L403.182 293.863C407.692 303.971 413.72 311.585 421.28 316.669C428.829 321.746 437.139 324.286 446.199 324.286C453.925 324.286 461.095 322.633 467.7 319.323C474.297 316.108 480.444 311.85 486.141 306.553L511.353 346.295C501.963 354.857 492.219 361.388 482.12 365.899C471.924 370.235 460.513 372.407 447.879 372.407C435.071 372.407 422.822 369.803 411.127 364.593C399.621 359.166 389.41 351.459 380.494 341.467C371.767 331.479 364.797 319.31 359.589 304.952C354.572 290.606 352.058 274.291 352.058 256C352.058 237.708 354.572 221.394 359.589 207.048C364.797 192.69 371.767 180.522 380.493 170.533C389.41 160.539 399.528 152.943 410.847 147.734L410.852 147.732C422.359 142.306 434.512 139.593 447.319 139.593C459.398 139.593 470.442 141.549 480.458 145.453L480.458 145.453L480.47 145.458C490.56 149.105 500.386 154.664 509.949 162.141L486.097 203.183C480.404 198.736 474.265 195.122 467.681 192.34C460.895 189.255 453.639 187.714 445.919 187.714C436.86 187.714 428.548 190.254 421 195.331L420.995 195.334C413.623 200.419 407.69 208.032 403.182 218.137L403.179 218.144C398.851 228.268 396.698 240.893 396.698 256C396.698 271.107 398.851 283.732 403.178 293.855ZM113.033 143.523L183.004 368.477H136.46L123.941 324.305L123.838 323.941H123.46H59.1023H58.7244L58.6213 324.305L46.1025 368.477H0.679148L70.6494 143.523H113.033ZM91.7623 210.767L91.2812 209.07L90.8002 210.767L70.4088 282.716L70.2284 283.353H70.8898H111.673H112.334L112.154 282.716L91.7623 210.767ZM194.052 368.477V143.523H265.513C277.576 143.523 288.51 146.019 298.328 151.001L298.336 151.004C308.149 155.768 315.823 162.582 321.371 171.451L321.375 171.457C327.1 180.313 329.974 191.02 329.974 203.605C329.974 216.19 327.1 226.786 321.378 235.42L321.377 235.422C317.606 241.155 312.853 245.939 307.114 249.774L306.42 250.238L307.157 250.631C316.891 255.822 324.516 263.258 330.04 272.948L330.042 272.953C335.59 282.469 338.374 293.731 338.374 306.758C338.374 319.778 335.406 330.925 329.492 340.219L329.491 340.22C323.756 349.308 315.894 356.343 305.893 361.324C296.077 366.089 284.954 368.477 272.514 368.477H194.052ZM307.86 249.873C307.783 249.831 307.705 249.79 307.628 249.748L307.392 250.189L307.67 250.605C307.743 250.556 307.817 250.507 307.89 250.458C317.47 255.681 324.998 263.095 330.474 272.701C336.074 282.306 338.874 293.659 338.874 306.758C338.874 319.856 335.888 331.1 329.914 340.487L307.86 249.873ZM238.353 186.404H237.853V186.904V234.059V234.559H238.353H262.713C269.903 234.559 275.726 232.565 280.131 228.534L280.141 228.525C284.558 224.257 286.734 218.218 286.734 210.481C286.734 202.749 284.56 196.813 280.136 192.762C275.733 188.51 269.908 186.404 262.713 186.404H238.353ZM238.353 274.166H237.853V274.666V325.096V325.596H238.353H268.313C275.877 325.596 281.982 323.493 286.573 319.241L286.575 319.239C291.371 314.753 293.734 308.271 293.734 299.881C293.734 291.496 291.375 285.12 286.574 280.849C281.984 276.38 275.879 274.166 268.313 274.166H238.353Z `, ], }; -export const faNumericCol: IconDefinition = { - prefix: 'fac' as IconPrefix, - iconName: 'stringCol' as IconName, +export const dvNumericCol: IconDefinition = { + prefix: 'dv' as IconPrefix, + iconName: 'numericalCol' as IconName, icon: [ - 300, - 300, + 512, + 512, [], null, ` - M4.00862 135.889V136.389H4.50862H32.0939H32.5939H63.1629H63.6629H89.7197H90.2197V135.889V112.963V112.463H89.7197H63.6629V4.06067V3.56067H63.1629H42.7199H42.6213L42.53 3.59811L2.02612 20.22L1.5636 20.4098L1.75336 20.8723L10.9241 43.2259L11.1136 43.688L11.576 43.4989L32.0939 35.1052V112.463H4.50862H4.00862V112.963V135.889ZM99.4341 21.8415L99.0985 22.1476L99.371 22.511L115.993 44.6735L116.331 45.1249L116.739 44.7345C119.779 41.8211 122.816 39.2908 125.849 37.142C128.999 35.0004 132.206 33.3664 135.471 32.2363L135.479 32.2335L135.487 32.2305C138.743 30.9781 142.058 30.3533 145.433 30.3533C149.327 30.3533 152.484 31.0445 154.936 32.393C157.404 33.75 159.241 35.5916 160.467 37.9194L160.474 37.9336L160.482 37.9473C161.831 40.1544 162.511 42.6737 162.511 45.5199C162.511 47.9826 161.895 50.5869 160.645 53.3373C159.394 56.0896 157.446 59.1104 154.788 62.4008C152.13 65.6918 148.643 69.434 144.321 73.6285L144.32 73.6297L101.523 115.471L101.373 115.618V115.829V135.889V136.389H101.873H114.786L114.954 136.645L115.244 136.389H196.254H196.754V135.889V109.142V108.642H196.254H146.742L163.532 93.8502L163.535 93.8473C170.934 87.2137 176.939 81.1463 181.544 75.6456L181.548 75.6413C186.158 70.007 189.5 64.4852 191.562 59.0752C193.75 53.5395 194.844 47.7462 194.844 41.6987C194.844 33.9654 192.844 27.054 188.838 20.9804C184.839 14.9164 179.358 10.1474 172.409 6.67216C165.452 3.06576 157.603 1.26801 148.872 1.26801C142.33 1.26801 136.103 2.16605 130.194 3.96445C124.297 5.75918 118.783 8.19561 113.652 11.2742C108.529 14.3479 103.79 17.8704 99.4341 21.8415ZM202.654 119.546L202.391 119.907L202.719 120.209C209.133 126.109 216.381 130.664 224.463 133.87C232.555 137.082 241.662 138.682 251.777 138.682C260.88 138.682 269.289 137.079 276.998 133.867L277.004 133.865C284.726 130.519 290.913 125.558 295.554 118.985C300.337 112.39 302.716 104.323 302.716 94.8124C302.716 86.0701 300.594 78.7648 296.317 72.9306C292.053 66.9875 286.178 62.5381 278.714 59.5772C274.811 57.9342 270.62 56.7304 266.143 55.9638L297.792 24.476L297.94 24.3294V24.1216V4.06067V3.56067H297.44H286.46L286.275 3.23261L285.956 3.56067H208.216H207.716V4.06067V30.8085V31.3085H208.216H258.948L230.021 61.0288L229.879 61.1744V61.3775V77.8084V78.3084H230.379H247.383C253.076 78.3084 257.651 79.0684 261.133 80.5606C264.633 82.0608 267.155 84.0432 268.744 86.4873L268.749 86.4945L268.754 86.5016C270.476 88.9628 271.338 91.7281 271.338 94.8124C271.338 99.9986 269.253 103.98 265.067 106.814C260.843 109.545 255.217 110.934 248.147 110.934C242.357 110.934 237.083 109.802 232.317 107.546C227.535 105.154 223.189 101.88 219.28 97.718L218.867 97.278L218.511 97.766L202.654 119.546Z - `, + M3.91283 329.338V368.452H149.34V329.338H104.016V143.548H69.1267L0 171.905L15.6513 210.041L51.845 195.24V329.338H3.91283Z + M190.623 156.586C181.928 161.801 173.885 167.777 166.494 174.513L194.862 212.323C200.079 207.325 205.296 202.979 210.513 199.285C215.948 195.591 221.491 192.766 227.143 190.81C232.795 188.637 238.555 187.551 244.425 187.551C251.163 187.551 256.706 188.746 261.054 191.136C265.402 193.527 268.662 196.786 270.836 200.915C273.227 204.826 274.423 209.281 274.423 214.279C274.423 218.625 273.336 223.188 271.162 227.968C268.988 232.749 265.619 237.964 261.054 243.614C256.489 249.264 250.511 255.674 243.12 262.845L170.081 334.228V368.452H331.159V322.819H244.398L274.749 296.092C287.357 284.792 297.574 274.47 305.399 265.127C313.225 255.565 318.877 246.222 322.355 237.095C326.051 227.751 327.898 217.973 327.898 207.76C327.898 194.722 324.529 183.096 317.79 172.883C311.051 162.67 301.813 154.63 290.074 148.763C278.336 142.679 265.076 139.636 250.294 139.636C239.207 139.636 228.665 141.157 218.665 144.2C208.666 147.242 199.318 151.37 190.623 156.586Z + M369.834 303.914L342.77 341.073C353.639 351.068 365.921 358.782 379.616 364.215C393.311 369.647 408.745 372.364 425.918 372.364C441.352 372.364 455.59 369.647 468.633 364.215C481.676 358.565 492.11 350.199 499.935 339.117C507.978 328.035 512 314.453 512 298.373C512 283.597 508.413 271.32 501.24 261.541C494.066 251.545 484.175 244.049 471.567 239.051C464.495 236.074 456.856 233.947 448.65 232.669L503.848 177.772V143.548H351.574V189.181H440.178L389.398 241.332V269.364H418.418C428.2 269.364 436.135 270.668 442.221 273.275C448.308 275.883 452.764 279.36 455.59 283.706C458.633 288.052 460.155 292.941 460.155 298.373C460.155 307.5 456.46 314.562 449.069 319.56C441.678 324.341 431.896 326.731 419.722 326.731C409.723 326.731 400.593 324.775 392.333 320.864C384.072 316.735 376.573 311.085 369.834 303.914Z `, ], }; From 60f1aa1893e51a4bafba83c8e89a882e35f9a478 Mon Sep 17 00:00:00 2001 From: dvdanielamoitzi <57343176+dvdanielamoitzi@users.noreply.github.com> Date: Fri, 12 Apr 2024 16:40:06 +0200 Subject: [PATCH 08/16] test: use app shell instead of body in cypress test (#258) use app shell instead of body --- cypress/e2e/health-check.cy.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cypress/e2e/health-check.cy.ts b/cypress/e2e/health-check.cy.ts index 4cf9910e7..a18b1e9c1 100644 --- a/cypress/e2e/health-check.cy.ts +++ b/cypress/e2e/health-check.cy.ts @@ -7,13 +7,13 @@ describe('Health check for Cypress e2e test', () => { cy.get('input[name="password"]').type('admin'); cy.get('button[type="submit"]').click(); // Assert the content is now visible - cy.get('body').should('include.text', 'Visualization type'); + cy.get('.mantine-AppShell-root').should('include.text', 'Visualization type'); // Check the user avatar, and then log out again cy.get('[data-testid="visyn-user-avatar"]').should('include.text', 'A').click(); cy.get('[data-testid="visyn-user-logout"]').contains('Logout').click(); // Assert the login modal to be shown again cy.get('[data-testid="visyn-login-modal"]').should('include.text', 'Demo App'); // Assert the content to be invisible again - cy.get('body').should('not.include.text', 'Visualization type'); + cy.get('.mantine-AppShell-root').should('not.include.text', 'Visualization type'); }); }); From 4d42440b46a71b12c2957725566a3e9f4f52bd12 Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Tue, 23 Apr 2024 08:48:48 +0200 Subject: [PATCH 09/16] prepare next dev version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6b0e91b6e..c63b79ae4 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "visyn_core", "description": "Core repository for datavisyn applications.", - "version": "9.2.2", + "version": "9.2.3-SNAPSHOT", "author": { "name": "datavisyn GmbH", "email": "contact@datavisyn.io", From cf663457468c0287dfc2f4fd82636e04468aee95 Mon Sep 17 00:00:00 2001 From: Martin Weigl <101096478+dvmartinweigl@users.noreply.github.com> Date: Tue, 23 Apr 2024 09:19:07 +0200 Subject: [PATCH 10/16] feat: add possibility to insert score column after given column in ranking (#262) * add possibility to define new score column position * use options object parameter * make options optional * fix error --- src/ranking/overrides/DatavisynTaggle.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/ranking/overrides/DatavisynTaggle.tsx b/src/ranking/overrides/DatavisynTaggle.tsx index c9710b9eb..a35f02560 100644 --- a/src/ranking/overrides/DatavisynTaggle.tsx +++ b/src/ranking/overrides/DatavisynTaggle.tsx @@ -1,4 +1,4 @@ -import { IRankingDump, Ranking, Taggle, DataProvider, LocalDataProvider, TaggleRenderer } from 'lineupjs'; +import { Column, DataProvider, IRankingDump, LocalDataProvider, Ranking, Taggle, TaggleRenderer } from 'lineupjs'; import castArray from 'lodash/castArray'; import { IScoreColumnDesc, IScoreResult } from '../score/interfaces'; @@ -37,8 +37,11 @@ export class DatavisynTaggle extends * Creates a score column in the supplied ranking. Uses the default ranking if none is supplied. * * @param desc The score description + * @param options Options for the score creation (optional) */ - createScoreColumn(desc: IScoreResult, ranking = this.ranking) { + createScoreColumn(desc: IScoreResult, options?: { ranking?: Ranking; insertAfter?: Column }) { + const ranking = options?.ranking || this.ranking; + if (!ranking) { throw new Error('No ranking found'); } @@ -55,6 +58,9 @@ export class DatavisynTaggle extends const col = this.data.create(colDesc); + if (options?.insertAfter) { + return ranking.insertAfter(col, options.insertAfter); + } return ranking.push(col); }); } From 9e5714c12f622ee283faae92d91785e9db7c14f6 Mon Sep 17 00:00:00 2001 From: Martin Weigl <101096478+dvmartinweigl@users.noreply.github.com> Date: Tue, 23 Apr 2024 09:26:54 +0200 Subject: [PATCH 11/16] chore: remove usage of flask (#257) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * deps: upgrade backend deps to latest versions * remove flask dbmigration router * migrate XlsxUtils to fastAPI * linting * fix routes * routing fix * migrate idtype_api to fastAPI * refactor mainapp * exclude health enpoint from schema * small refactor * fix detail_from_exception * type ignore * allow empty cell content * xlsx api fixes and backend tests * ensure all routes to have api prefix * Add back deprecated endpoints for smooth migration --------- Co-authored-by: Michael Puehringer Co-authored-by: Michael PĆ¼hringer <51900829+puehringer@users.noreply.github.com> --- Makefile | 4 +- requirements.txt | 41 +++--- requirements_dev.txt | 10 +- src/idtype/IDTypeManager.ts | 6 +- src/security/LoginUtils.ts | 9 +- src/utils/XlsxUtils.ts | 8 +- visyn_core/__init__.py | 16 +-- visyn_core/dbmanager.py | 4 +- visyn_core/dbmigration/env.py | 3 +- visyn_core/dbmigration/manager.py | 4 +- visyn_core/dbmigration/router.py | 34 ----- visyn_core/dbview.py | 30 ++--- visyn_core/id_mapping/idtype_api.py | 87 ++++++------ visyn_core/id_mapping/manager.py | 2 +- .../close_web_sessions_middleware.py | 6 +- .../exception_handler_middleware.py | 8 +- visyn_core/rdkit/models.py | 6 +- visyn_core/security/jwt_router.py | 4 +- visyn_core/server/mainapp.py | 125 ++---------------- visyn_core/server/utils.py | 73 ++++++---- visyn_core/server/visyn_server.py | 12 +- visyn_core/settings/router.py | 1 + visyn_core/telemetry/__init__.py | 34 +++-- visyn_core/tests/fixtures/postgres_db.py | 2 +- visyn_core/tests/test_main_app.py | 14 +- visyn_core/tests/test_security_login.py | 56 ++++---- visyn_core/tests/test_telemetry.py | 16 +-- visyn_core/tests/test_xlsx.py | 48 +++++++ visyn_core/xlsx.py | 104 ++++++++------- 29 files changed, 344 insertions(+), 423 deletions(-) delete mode 100644 visyn_core/dbmigration/router.py create mode 100644 visyn_core/tests/test_xlsx.py diff --git a/Makefile b/Makefile index be59729f0..445e36b5b 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ pkg_src = visyn_core black = black --line-length 140 $(pkg_src) setup.py pyright = pyright $(pkg_src) setup.py -ruff = ruff $(pkg_src) setup.py --line-length 140 --select E,W,F,N,I,C,B,UP,PT,SIM,RUF --ignore E501,C901,B008 +ruff = ruff check $(pkg_src) setup.py --line-length 140 --select E,W,F,N,I,C,B,UP,PT,SIM,RUF --ignore E501,C901,B008 .PHONY: start ## Start the development server start: @@ -26,7 +26,7 @@ check-format: .PHONY: lint ## Run flake8 and pyright lint: - $(ruff) --format=github + $(ruff) --output-format=github $(pyright) .PHONY: test ## Run tests diff --git a/requirements.txt b/requirements.txt index ec0e4e869..99ded8da4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,31 +1,30 @@ # a2wsgi==1.6.0 # This WSIGMiddleware is not compatible with starlette_context -alembic==1.11.1 -cachetools==5.3.2 -fastapi==0.101.1 -Flask[async]>=2.1.0,<=2.2.2 +alembic==1.13.1 +cachetools==5.3.3 +fastapi==0.110.1 json-cfg==0.4.2 openpyxl==3.1.2 -opentelemetry-api==1.19.0 -opentelemetry-exporter-otlp==1.19.0 -opentelemetry-exporter-prometheus==1.12.0rc1 -opentelemetry-instrumentation-fastapi==0.40b0 -opentelemetry-instrumentation-httpx==0.40b0 -opentelemetry-instrumentation-logging==0.40b0 -opentelemetry-instrumentation-requests==0.40b0 -opentelemetry-instrumentation-sqlalchemy==0.40b0 -opentelemetry-instrumentation-system-metrics==0.40b0 -opentelemetry-sdk==1.19.0 -psycopg==3.1.9 -psycopg2==2.9.6 -pydantic==1.10.11 +opentelemetry-api==1.24.0 +opentelemetry-exporter-otlp==1.24.0 +opentelemetry-exporter-prometheus==0.45b0 +opentelemetry-instrumentation-fastapi==0.45b0 +opentelemetry-instrumentation-httpx==0.45b0 +opentelemetry-instrumentation-logging==0.45b0 +opentelemetry-instrumentation-requests==0.45b0 +opentelemetry-instrumentation-sqlalchemy==0.45b0 +opentelemetry-instrumentation-system-metrics==0.45b0 +opentelemetry-sdk==1.24.0 +psycopg==3.1.18 +psycopg2==2.9.9 +pydantic==1.10.14 pyjwt[crypto]==2.8.0 -pytest-postgresql==5.0.0 +pytest-postgresql==6.0.0 python-dateutil==2.8.2 -python-multipart==0.0.6 +python-multipart==0.0.9 requests==2.31.0 SQLAlchemy>=1.4.40,<=1.4.49 starlette-context==0.3.6 -uvicorn[standard]==0.23.1 +uvicorn[standard]==0.29.0 # Extras from fastapi[all], which we can't install because it requires pydantic v2: https://github.com/tiangolo/fastapi/blob/f7e3559bd5997f831fb9b02bef9c767a50facbc3/pyproject.toml#L57-L67 httpx>=0.23.0 jinja2>=2.11.2 @@ -33,5 +32,3 @@ itsdangerous>=1.1.0 pyyaml>=5.3.1 ujson>=4.0.1,!=4.0.2,!=4.1.0,!=4.2.0,!=4.3.0,!=5.0.0,!=5.1.0 orjson>=3.2.1 -# pin werkzeug version because the new major version 3.0.0 breaks our applications on Oct 2 2023; the version can be removed later again when the other packages support v3.0.0 -werkzeug==2.3.7 diff --git a/requirements_dev.txt b/requirements_dev.txt index 499776345..17a1739ef 100644 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -1,5 +1,5 @@ -black~=22.12.0 -pyright==1.1.308 -pytest-runner~=6.0.0 -pytest~=7.2.0 -ruff==0.0.218 +black~=24.3.0 +pyright==1.1.356 +pytest-runner~=6.0.1 +pytest~=8.1.1 +ruff==0.3.5 diff --git a/src/idtype/IDTypeManager.ts b/src/idtype/IDTypeManager.ts index 22a993909..decff4211 100644 --- a/src/idtype/IDTypeManager.ts +++ b/src/idtype/IDTypeManager.ts @@ -113,7 +113,7 @@ export class IDTypeManager { */ public searchMapping = (idType: IDType, pattern: string, toIDType: string | IDType, limit = 10): Promise<{ match: string; to: string }[]> => { const target = this.resolveIdType(toIDType); - return appContext.getAPIJSON(`/idtype/${idType.id}/${target.id}/search`, { q: pattern, limit }); + return appContext.getAPIJSON(`/idtype/${idType.id}/${target.id}/search/`, { q: pattern, limit }); }; /** @@ -140,7 +140,7 @@ export class IDTypeManager { if (idType.id === target.id) { return names; } - return IDType.chooseRequestMethod(`/idtype/${idType.id}/${target.id}`, { q: names, mode: 'first' }); + return IDType.chooseRequestMethod(`/idtype/${idType.id}/${target.id}/`, { q: names, mode: 'first' }); }; public mapNameToName = async (idType: IDType, names: string[], toIDtype: IDTypeLike): Promise => { @@ -149,7 +149,7 @@ export class IDTypeManager { // if(idType.id === target.id) { // return names.map((name) => [name]); // } - return IDType.chooseRequestMethod(`/idtype/${idType.id}/${target.id}`, { q: names }); + return IDType.chooseRequestMethod(`/idtype/${idType.id}/${target.id}/`, { q: names }); }; public findMappablePlugins = (target: IDType, all: IPluginDesc[]) => { diff --git a/src/security/LoginUtils.ts b/src/security/LoginUtils.ts index ed4e2ed76..d9316b0e3 100644 --- a/src/security/LoginUtils.ts +++ b/src/security/LoginUtils.ts @@ -1,5 +1,4 @@ -import { appContext } from '../base/AppContext'; -import { userSession, UserSession } from './UserSession'; +import { userSession } from './UserSession'; import { IUser, IUserStore } from './interfaces'; import { Ajax } from '../base/ajax'; @@ -13,7 +12,7 @@ export class LoginUtils { */ static login(username: string, password: string) { userSession.reset(); - const r = Ajax.send('/login', { username, password }, 'post').then((user) => { + const r = Ajax.send('/api/login', { username, password }, 'post').then((user) => { userSession.login(user); return user; }); @@ -31,7 +30,7 @@ export class LoginUtils { * @return {Promise} when done also from the server side */ static logout(): Promise { - return Ajax.send('/logout', {}, 'post') + return Ajax.send('/api/logout', {}, 'post') .then((r) => { userSession.logout(r); }) @@ -43,7 +42,7 @@ export class LoginUtils { } static loggedInAs(): Promise { - return Ajax.send('/loggedinas', {}, 'POST').then((user: string | IUser) => { + return Ajax.send('/api/loggedinas', {}, 'POST').then((user: string | IUser) => { if (typeof user !== 'string' && user.name) { return user; } diff --git a/src/utils/XlsxUtils.ts b/src/utils/XlsxUtils.ts index 9035e11d2..03d03893c 100644 --- a/src/utils/XlsxUtils.ts +++ b/src/utils/XlsxUtils.ts @@ -21,21 +21,21 @@ export class XlsxUtils { const data = new FormData(); data.set('file', file); - return appContext.sendAPI('/tdp/xlsx/to_json', data, 'POST'); + return appContext.sendAPI('/xlsx/to_json/', data, 'POST'); } static xlsx2jsonArray(file: File): Promise { const data = new FormData(); data.set('file', file); - return appContext.sendAPI('/tdp/xlsx/to_json_array', data, 'POST'); + return appContext.sendAPI('/xlsx/to_json_array/', data, 'POST'); } static json2xlsx(file: IXLSXJSONFile): Promise { - return Ajax.send(appContext.api2absURL('/tdp/xlsx/from_json'), file, 'POST', 'blob', 'application/json'); + return Ajax.send(appContext.api2absURL('/xlsx/from_json/'), file, 'POST', 'blob', 'application/json'); } static jsonArray2xlsx(file: any[][]): Promise { - return Ajax.send(appContext.api2absURL('/tdp/xlsx/from_json_array'), file, 'POST', 'blob', 'application/json'); + return Ajax.send(appContext.api2absURL('/xlsx/from_json_array/'), file, 'POST', 'blob', 'application/json'); } } diff --git a/visyn_core/__init__.py b/visyn_core/__init__.py index 0262b9a45..722dfdd08 100644 --- a/visyn_core/__init__.py +++ b/visyn_core/__init__.py @@ -23,17 +23,11 @@ def init_app(self, app: FastAPI): def register(self, registry: RegHelper): # phovea_server - registry.append( - "namespace", - "caleydo-idtype", - "visyn_core.id_mapping.idtype_api", - {"namespace": "/api/idtype", "factory": "create_idtype"}, - ) + registry.append_router("caleydo-idtype", "visyn_core.id_mapping.idtype_api", {}) # General routers - registry.append("namespace", "visyn_core_main", "visyn_core.server.mainapp", {"namespace": "/app"}) registry.append_router("visyn_plugin_router", "visyn_core.plugin.router", {}) - registry.append("namespace", "visyn_xlsx2json", "visyn_core.xlsx", {"namespace": "/api/tdp/xlsx"}) + registry.append_router("visyn_xlsx_router", "visyn_core.xlsx", {}) # DB migration plugins registry.append( @@ -42,12 +36,6 @@ def register(self, registry: RegHelper): "visyn_core.dbmigration.manager", {"factory": "create_migration_command"}, ) - registry.append( - "namespace", - "db-migration-api", - "visyn_core.dbmigration.router", - {"factory": "create_migration_api", "namespace": "/api/tdp/db-migration"}, - ) # Security plugins registry.append( diff --git a/visyn_core/dbmanager.py b/visyn_core/dbmanager.py index f2e68e001..a9670cc50 100644 --- a/visyn_core/dbmanager.py +++ b/visyn_core/dbmanager.py @@ -30,9 +30,9 @@ def init_app(self, app: FastAPI): if not connector.dburl: connector.dburl = config["dburl"] if not connector.statement_timeout: - connector.statement_timeout = config.get("statement_timeout", None) + connector.statement_timeout = config.get("statement_timeout") if not connector.statement_timeout_query: - connector.statement_timeout_query = config.get("statement_timeout_query", None) + connector.statement_timeout_query = config.get("statement_timeout_query") if not connector.dburl: _log.critical( "no db url defined for %s at config key %s - is your configuration up to date?", diff --git a/visyn_core/dbmigration/env.py b/visyn_core/dbmigration/env.py index a6a3b1da6..23061d52d 100644 --- a/visyn_core/dbmigration/env.py +++ b/visyn_core/dbmigration/env.py @@ -1,5 +1,6 @@ from alembic import context from sqlalchemy import engine_from_config, pool +from sqlalchemy.engine import Engine # this is the Alembic Config object, which provides # access to the values within the .ini file in use. @@ -38,7 +39,7 @@ def run_migrations_online(): if version_table_schema: additional_configuration["version_table_schema"] = version_table_schema - connectable = engine_from_config( + connectable: Engine = engine_from_config( config.get_section(config.config_ini_section), # type: ignore prefix="sqlalchemy.", poolclass=pool.NullPool, diff --git a/visyn_core/dbmigration/manager.py b/visyn_core/dbmigration/manager.py index 64484c2c5..676626d28 100644 --- a/visyn_core/dbmigration/manager.py +++ b/visyn_core/dbmigration/manager.py @@ -180,8 +180,8 @@ def init_app(self, app: FastAPI, plugins: list[AExtensionDesc] | None = None): version_table_schema = config.get("versionTableSchema") or (p.versionTableSchema if hasattr(p, "versionTableSchema") else None) auto_upgrade = ( config.get("autoUpgrade") - if type(config.get("autoUpgrade")) == bool - else (p.autoUpgrade if hasattr(p, "autoUpgrade") and type(p.autoUpgrade) == bool else auto_upgrade_default) + if isinstance(config.get("autoUpgrade"), bool) + else (p.autoUpgrade if hasattr(p, "autoUpgrade") and isinstance(p.autoUpgrade, bool) else auto_upgrade_default) ) # Validate the plugin description diff --git a/visyn_core/dbmigration/router.py b/visyn_core/dbmigration/router.py deleted file mode 100644 index 7d5b2228f..000000000 --- a/visyn_core/dbmigration/router.py +++ /dev/null @@ -1,34 +0,0 @@ -import logging - -from flask import Flask, abort, jsonify - -from .. import manager -from ..security import login_required -from .manager import DBMigration - -__author__ = "Datavisyn" -_log = logging.getLogger(__name__) - -app = Flask(__name__) - - -def _get_migration_by_id(id: str) -> DBMigration: - if id not in manager.db_migration: - abort(404, f"No migration with id {id} found") - return manager.db_migration[id] - - -@app.route("/") -@login_required -def list_migrations(): - return jsonify([migration.id for migration in manager.db_migration.migrations]), 200 - - -@app.route("/") -@login_required -def list_migration(id): - return jsonify(_get_migration_by_id(id).id), 200 - - -def create_migration_api(): - return app diff --git a/visyn_core/dbview.py b/visyn_core/dbview.py index 431dbccac..5da167201 100644 --- a/visyn_core/dbview.py +++ b/visyn_core/dbview.py @@ -514,12 +514,10 @@ def add_common_queries( .idtype(idtype) .table(table) .query( - """ - SELECT {id}, {{column}} AS text + f""" + SELECT {id_query}, {{column}} AS text FROM {table} WHERE LOWER({{column}}) LIKE :query - ORDER BY {{column}} ASC""".format( - id=id_query, table=table - ) + ORDER BY {{column}} ASC""" ) .replace("column", columns) .call(call_function) @@ -533,11 +531,9 @@ def add_common_queries( .idtype(idtype) .table(table) .query( - """ - SELECT {id}, {name} AS text - FROM {table}""".format( - id=id_query, table=table, name=name_column - ) + f""" + SELECT {id_query}, {name_column} AS text + FROM {table}""" ) .call(call_function) .call(inject_where) @@ -548,15 +544,13 @@ def add_common_queries( queries[prefix + "_unique"] = ( DBViewBuilder("lookup") .query( - """ + f""" SELECT d as id, d as text FROM ( SELECT distinct {{column}} AS d FROM {table} WHERE LOWER({{column}}) LIKE :query ) as t - ORDER BY d ASC""".format( - table=table - ) + ORDER BY d ASC""" ) .replace("column", columns) .call(limit_offset) @@ -567,11 +561,9 @@ def add_common_queries( queries[prefix + "_unique_all"] = ( DBViewBuilder("helper") .query( - """ + f""" SELECT distinct {{column}} AS text - FROM {table} ORDER BY {{column}} ASC """.format( - table=table - ) + FROM {table} ORDER BY {{column}} ASC """ ) .replace("column", columns) .build() @@ -625,7 +617,7 @@ def create_engine(self, config) -> Engine: "pool_pre_ping": True, } engine_options.update(config.get("engine", {})) - return sqlalchemy.create_engine(self.dburl, **engine_options) + return sqlalchemy.create_engine(self.dburl, **engine_options) # type: ignore def create_sessionmaker(self, engine) -> sessionmaker: return sessionmaker(bind=engine) diff --git a/visyn_core/id_mapping/idtype_api.py b/visyn_core/id_mapping/idtype_api.py index c6da0e575..0da579390 100644 --- a/visyn_core/id_mapping/idtype_api.py +++ b/visyn_core/id_mapping/idtype_api.py @@ -1,10 +1,12 @@ import logging +from typing import Literal -from flask import Flask, abort, jsonify, request +from fastapi import APIRouter +from pydantic import BaseModel from .. import manager -app_idtype = Flask(__name__) +idtype_router = APIRouter(prefix="/api/idtype", tags=["idtype"]) _log = logging.getLogger(__name__) @@ -15,59 +17,64 @@ def to_plural(s): return s + "s" -@app_idtype.route("/") -def _list_idtypes(): - tmp = {} - # TODO: We probably don't want to have these idtypes as "all" idtypes - # for d in list_datasets(): - # for idtype in d.to_idtype_descriptions(): - # tmp[idtype["id"]] = idtype +class IdType(BaseModel): + id: str + name: str + names: list[str] - # also include the known elements from the mapping graph - for idtype_id in manager.id_mapping.known_idtypes(): - tmp[idtype_id] = {"id": idtype_id, "name": idtype_id, "names": to_plural(idtype_id)} - return jsonify(list(tmp.values())) +class IdTypeMappingRequest(BaseModel): + q: list[str] + mode: Literal["all", "first"] = "all" -@app_idtype.route("//") -def _maps_to(idtype): - target_id_types = manager.id_mapping.maps_to(idtype) - return jsonify(target_id_types) +class IdTypeMappingSearchRequest(BaseModel): + q: str + limit: int | None = 10 -@app_idtype.route("//", methods=["GET", "POST"]) -def _mapping_to(idtype, to_idtype): - return _do_mapping(idtype, to_idtype) +class IdTypeMappingSearchResponse(BaseModel): + match: str + to: str -@app_idtype.route("///search") -def _mapping_to_search(idtype, to_idtype): - query = request.args.get("q", None) - max_results = int(request.args.get("limit", 10)) # type: ignore - if hasattr(manager.id_mapping, "search"): - return jsonify(manager.id_mapping.search(idtype, to_idtype, query, max_results)) - return jsonify([]) + +@idtype_router.get("/", response_model=list[IdType]) +def list_idtypes(): + # TODO: We probably don't want to have these idtypes as "all" idtypes + # for d in list_datasets(): + # for idtype in d.to_idtype_descriptions(): + # tmp[idtype["id"]] = idtype + + # also include the known elements from the mapping graph + return [IdType(id=idtype_id, name=idtype_id, names=to_plural(idtype_id)) for idtype_id in manager.id_mapping.known_idtypes()] -def _do_mapping(idtype, to_idtype): - args = request.values - first_only = args.get("mode", "all") == "first" +@idtype_router.get("/{idtype}/", response_model=list[IdType]) +def maps_to(idtype: str): + return manager.id_mapping.maps_to(idtype) - if "q" in args: - names = args["q"].split(",") - elif "q[]" in args: - names = args.getlist("q[]") - else: - abort(400) - return +@idtype_router.api_route("/{idtype}/{to_idtype}/", methods=["GET", "POST"], response_model=list[str]) +def mapping_to(body: IdTypeMappingRequest, idtype: str, to_idtype: str): + first_only = body.mode == "first" + + names = body.q mapped_list = manager.id_mapping(idtype, to_idtype, names) if first_only: mapped_list = [None if a is None or len(a) == 0 else a[0] for a in mapped_list] - return jsonify(mapped_list) + return mapped_list + + +@idtype_router.get("/{idtype}/{to_idtype}/search/", response_model=list[IdTypeMappingSearchResponse]) +def mapping_to_search(body: IdTypeMappingSearchRequest, idtype, to_idtype): + query = body.q + max_results = body.limit + if hasattr(manager.id_mapping, "search"): + return manager.id_mapping.search(idtype, to_idtype, query, max_results) + return [] -def create_idtype(): - return app_idtype +def create(): + return idtype_router diff --git a/visyn_core/id_mapping/manager.py b/visyn_core/id_mapping/manager.py index bca48ecd9..9b79c84e1 100644 --- a/visyn_core/id_mapping/manager.py +++ b/visyn_core/id_mapping/manager.py @@ -17,7 +17,7 @@ def __init__(self, providers): self.mappers = {} self.paths = {} graph = {} - for (from_idtype, to_idtype, mapper) in providers: + for from_idtype, to_idtype, mapper in providers: # generate mapper mapping from_mappings = self.mappers.get(from_idtype, {}) self.mappers[from_idtype] = from_mappings diff --git a/visyn_core/middleware/close_web_sessions_middleware.py b/visyn_core/middleware/close_web_sessions_middleware.py index 3998ba552..980c40042 100644 --- a/visyn_core/middleware/close_web_sessions_middleware.py +++ b/visyn_core/middleware/close_web_sessions_middleware.py @@ -1,6 +1,6 @@ import contextlib -from fastapi import FastAPI +from starlette.types import ASGIApp from .request_context_plugin import get_request @@ -8,8 +8,8 @@ # Use basic ASGI middleware instead of BaseHTTPMiddleware as it is significantly faster: https://github.com/tiangolo/fastapi/issues/2696#issuecomment-768224643 # Raw middlewares are actually quite complex: https://github.com/encode/starlette/blob/048643adc21e75b668567fc6bcdd3650b89044ea/starlette/middleware/errors.py#L147 class CloseWebSessionsMiddleware: - def __init__(self, app: FastAPI): - self.app: FastAPI = app + def __init__(self, app: ASGIApp): + self.app: ASGIApp = app async def __call__(self, scope, receive, send): if scope["type"] != "http": diff --git a/visyn_core/middleware/exception_handler_middleware.py b/visyn_core/middleware/exception_handler_middleware.py index aa1aff7ec..20052d326 100644 --- a/visyn_core/middleware/exception_handler_middleware.py +++ b/visyn_core/middleware/exception_handler_middleware.py @@ -1,8 +1,8 @@ import logging -from fastapi import FastAPI, HTTPException +from fastapi import HTTPException from fastapi.exception_handlers import http_exception_handler -from starlette.types import Message +from starlette.types import ASGIApp, Message from ..server.utils import detail_from_exception @@ -10,8 +10,8 @@ # Use basic ASGI middleware instead of BaseHTTPMiddleware as it is significantly faster: https://github.com/tiangolo/fastapi/issues/2696#issuecomment-768224643 # Raw middlewares are actually quite complex: https://github.com/encode/starlette/blob/048643adc21e75b668567fc6bcdd3650b89044ea/starlette/middleware/errors.py#L147 class ExceptionHandlerMiddleware: - def __init__(self, app: FastAPI): - self.app: FastAPI = app + def __init__(self, app: ASGIApp): + self.app: ASGIApp = app async def __call__(self, scope, receive, send): if scope["type"] != "http": diff --git a/visyn_core/rdkit/models.py b/visyn_core/rdkit/models.py index 770cc6db9..88354dbce 100644 --- a/visyn_core/rdkit/models.py +++ b/visyn_core/rdkit/models.py @@ -1,3 +1,5 @@ +from typing import ClassVar + from pydantic import BaseModel from rdkit.Chem import Mol, MolFromSmarts, MolFromSmiles # type: ignore from starlette.responses import Response @@ -6,7 +8,7 @@ class SmilesMolecule(str): """We can't directly extend mol, as this would break swagger""" - parsers = [MolFromSmiles] + parsers: ClassVar = [MolFromSmiles] _mol: Mol @property @@ -32,7 +34,7 @@ def validate(cls, value: str | None) -> "SmilesMolecule": class SmilesSmartsMolecule(SmilesMolecule): """Try parings smiles first, then smarts""" - parsers = [MolFromSmiles, MolFromSmarts] + parsers: ClassVar = [MolFromSmiles, MolFromSmarts] class SvgResponse(Response): diff --git a/visyn_core/security/jwt_router.py b/visyn_core/security/jwt_router.py index b609ff962..848a8b59f 100644 --- a/visyn_core/security/jwt_router.py +++ b/visyn_core/security/jwt_router.py @@ -12,7 +12,7 @@ from .model import Token _log = logging.getLogger(__name__) -jwt_router = APIRouter(tags=["Security"]) +jwt_router = APIRouter(prefix="/api", tags=["Security"]) # TODO: Use schema to allow auto-doc of endpoint # from fastapi.security import OAuth2PasswordBearer @@ -86,7 +86,7 @@ def loggedinas(request: Request): return user_to_dict(user, access_token=user.access_token) if user else '"not_yet_logged_in"' -@jwt_router.get("/api/security/stores") +@jwt_router.get("/security/stores") def stores(request: Request) -> list[SecurityStoreResponse]: """Returns a list of activated security stores. Can be used to infer the details of the shown login menu.""" return [ diff --git a/visyn_core/server/mainapp.py b/visyn_core/server/mainapp.py index 1291de474..baea1d1a1 100644 --- a/visyn_core/server/mainapp.py +++ b/visyn_core/server/mainapp.py @@ -1,117 +1,14 @@ import logging import os -import re -from flask import Flask, send_from_directory -from werkzeug.security import safe_join - -from .. import manager +from fastapi import APIRouter _log = logging.getLogger(__name__) - -black_list = re.compile(r"(.*\.(py|pyc|gitignore|gitattributes)|(\w+)/((config|package)\.json|_deploy/.*))") -public_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), "public")) - - -def _is_on_black_list(path): - # print 'check',path,black_list.match(path) is not None - return black_list.match(path) is not None - - -def _deliver_production(path): - # print path - if path.endswith("/"): - path += "index.html" - if _is_on_black_list(path): - return "This page does not exist", 404 - # serve public - return send_from_directory(public_dir, path) - - -def _deliver(path): - # print path - if path.endswith("/"): - path += "index.html" - if _is_on_black_list(path): - return "This page does not exist", 404 - - # serve public - if os.path.exists(safe_join(public_dir, path)): # type: ignore - return send_from_directory(public_dir, path) - - # check all plugins - elems = path.split("/") - if len(elems) > 0: - plugin_id = elems[0] - elems[0] = "build" - from .. import manager - - plugin = next((p for p in manager.registry.plugins if p.id == plugin_id), None) - if plugin: - dpath = safe_join(plugin.folder, "/".join(elems)) # type: ignore - if os.path.exists(dpath): # type: ignore - # send_static_file will guess the correct MIME type - # print 'sending',dpath - return send_from_directory(plugin.folder, "/".join(elems)) # type: ignore - - return "This page does not exist", 404 - - -def _generate_index(): - text = [ - """ - - Caleydo Web Apps - - -
-

Caleydo Web Apps

-
- - - """ - ) - return "\n".join(text) +mainapp_router = APIRouter(tags=["MainApp"]) +@mainapp_router.get("/buildInfo.json") def build_info(): from codecs import open @@ -139,17 +36,13 @@ def build_info(): # health check for docker-compose, kubernetes +@mainapp_router.api_route("/api/health", methods=["GET", "HEAD"]) async def health(): return "ok" -def create(): - # check initialization - app = Flask(__name__) - if manager.settings.is_development_mode: - app.add_url_rule("/", "index", _generate_index) - app.add_url_rule("/index.html", "index", _generate_index) - app.add_url_rule("/", "deliver", _deliver) - else: - app.add_url_rule("/", "deliver", _deliver_production) - return app +# TODO: Remove this endpoint after everyone switched to it. +@mainapp_router.api_route("/health", methods=["GET", "HEAD"]) +async def deprecated_health(): + _log.warn("Using deprecated /health endpoint. Consider switching to /api/health.") + return "ok" diff --git a/visyn_core/server/utils.py b/visyn_core/server/utils.py index b2c40e371..eff3efc34 100644 --- a/visyn_core/server/utils.py +++ b/visyn_core/server/utils.py @@ -3,43 +3,58 @@ import time import traceback -from flask import Flask, jsonify -from werkzeug.exceptions import HTTPException +from fastapi import HTTPException from .. import manager +# Flask is using exceptions from Werkzeug, which are not compatible with FastAPI's HTTPException +# Only import and use FlaskHTTPException if Flask is available +try: + from werkzeug.exceptions import HTTPException as FlaskHTTPException # type: ignore +except ImportError: + FlaskHTTPException = None + _log = logging.getLogger(__name__) -def init_legacy_app(app: Flask): - """ - initializes an application by setting common properties and options - :param app: - :param is_default_app: - :return: - """ - if hasattr(app, "got_first_request") and app.got_first_request: - return +init_legacy_app = None +try: + # Flask is an optional dependency and must be added to the requirements for legacy apps. + from flask import Flask, jsonify # type: ignore + + def _init_legacy_app(app: Flask): + """ + initializes an application by setting common properties and options + :param app: + :param is_default_app: + :return: + """ + if hasattr(app, "got_first_request") and app.got_first_request: + return + + if hasattr(app, "debug"): + # TODO: Evaluate if this should be set to manager.settings.is_development_mode + app.debug = False - if hasattr(app, "debug"): - # TODO: Evaluate if this should be set to manager.settings.is_development_mode - app.debug = False + if manager.settings.visyn_core: + app.config["SECRET_KEY"] = manager.settings.secret_key - if manager.settings.visyn_core: - app.config["SECRET_KEY"] = manager.settings.secret_key + @app.errorhandler(FlaskHTTPException) + @app.errorhandler(Exception) # type: ignore + async def handle_exception(e): + """Handles Flask exceptions by returning the same JSON response as FastAPI#HTTPException would.""" + _log.exception(repr(e)) + # Extract status information if a Flask#HTTPException is given, otherwise return 500 with exception information + status_code = e.code if FlaskHTTPException and isinstance(e, FlaskHTTPException) else 500 + detail = detail_from_exception(e) + # Exact same response as the one from FastAPI#HTTPException. + return jsonify({"detail": detail or http.HTTPStatus(status_code).phrase}), status_code - @app.errorhandler(HTTPException) - @app.errorhandler(Exception) # type: ignore - async def handle_exception(e): - """Handles Flask exceptions by returning the same JSON response as FastAPI#HTTPException would.""" - _log.exception(repr(e)) - # Extract status information if a Flask#HTTPException is given, otherwise return 500 with exception information - status_code = e.code if isinstance(e, HTTPException) else 500 - detail = detail_from_exception(e) - # Exact same response as the one from FastAPI#HTTPException. - return jsonify({"detail": detail or http.HTTPStatus(status_code).phrase}), status_code + return app - return app + init_legacy_app = _init_legacy_app +except ImportError: + pass def load_after_server_started_hooks(): @@ -73,6 +88,8 @@ def detail_from_exception(e: Exception) -> str | None: ) # Exception specific returns if isinstance(e, HTTPException): - return e.description + return e.detail + if FlaskHTTPException and isinstance(e, FlaskHTTPException): + return e.description # type: ignore # Fallback to the string representation of the exception return repr(e) diff --git a/visyn_core/server/visyn_server.py b/visyn_core/server/visyn_server.py index cb99a1d84..1b8971805 100644 --- a/visyn_core/server/visyn_server.py +++ b/visyn_core/server/visyn_server.py @@ -56,7 +56,7 @@ def create_visyn_server( # Filter out the metrics endpoint from the access log class EndpointFilter(logging.Filter): def filter(self, record: logging.LogRecord) -> bool: - return "GET /metrics" and "GET /health" not in record.getMessage() + return "GET /api/metrics" and "GET /api/health" and "GET /metrics" and "GET /health" not in record.getMessage() logging.getLogger("uvicorn.access").addFilter(EndpointFilter()) @@ -69,7 +69,7 @@ def filter(self, record: logging.LogRecord) -> bool: plugins = load_all_plugins() # With all the plugins, load the corresponding configuration files and create a new model based on the global settings, with all plugin models as sub-models [plugin_config_files, plugin_settings_models] = get_config_from_plugins(plugins) - visyn_server_settings = create_model("VisynServerSettings", __base__=GlobalSettings, **plugin_settings_models) + visyn_server_settings = create_model("VisynServerSettings", __base__=GlobalSettings, **plugin_settings_models) # type: ignore # Patch the global settings by instantiating the new settings model with the global config, all config.json(s), and pydantic models manager.settings = visyn_server_settings(**deep_update(*plugin_config_files, workspace_config)) @@ -140,10 +140,8 @@ def filter(self, record: logging.LogRecord) -> bool: _log.info(f"Registering {len(namespace_plugins)} legacy namespace(s) via WSGIMiddleware") for p in namespace_plugins: namespace = p.namespace # type: ignore - sub_app = p.load().factory() init_legacy_app(sub_app) - app.mount(namespace, WSGIMiddleware(sub_app)) # Load all FastAPI apis @@ -153,11 +151,9 @@ def filter(self, record: logging.LogRecord) -> bool: for p in router_plugins: app.include_router(p.load().factory()) - # TODO: Check mainapp.py what it does and transfer them here. Currently, we cannot mount a flask app at root, such that the flask app is now mounted at /app/ - from .mainapp import build_info, health + from .mainapp import mainapp_router - app.add_api_route("/health", health, methods=["GET", "HEAD"]) # type: ignore - app.add_api_route("/api/buildInfo.json", build_info) # type: ignore + app.include_router(mainapp_router) @app.on_event("startup") async def change_anyio_total_tokens(): diff --git a/visyn_core/settings/router.py b/visyn_core/settings/router.py index d6d5d3f05..a9665c126 100644 --- a/visyn_core/settings/router.py +++ b/visyn_core/settings/router.py @@ -5,6 +5,7 @@ router = APIRouter(tags=["Configuration"], prefix="/api/tdp/config", dependencies=[Depends(get_current_user)]) + # TODO: Move to tdp_core @router.get("/{path:path}") def get_config_path(path: str): diff --git a/visyn_core/telemetry/__init__.py b/visyn_core/telemetry/__init__.py index 191c5a0d8..208c552c3 100644 --- a/visyn_core/telemetry/__init__.py +++ b/visyn_core/telemetry/__init__.py @@ -56,9 +56,11 @@ def filter(self, record: logging.LogRecord) -> bool: PeriodicExportingMetricReader( exporter=OTLPMetricExporter( # If we are using the global exporter settings, append the metrics path - endpoint=_append_metrics_path(exporter_settings.endpoint) - if exporter_settings == global_exporter_settings - else exporter_settings.endpoint, + endpoint=( + _append_metrics_path(exporter_settings.endpoint) + if exporter_settings == global_exporter_settings + else exporter_settings.endpoint + ), headers=exporter_settings.headers, timeout=exporter_settings.timeout, **exporter_settings.kwargs, @@ -89,13 +91,21 @@ def shutdown_meter_event(): class CustomMetricsResponse(Response): media_type = CONTENT_TYPE_LATEST - @app.get("/metrics", tags=["Telemetry"], response_class=CustomMetricsResponse) + @app.get("/api/metrics", tags=["Telemetry"], response_class=CustomMetricsResponse) def prometheus_metrics(): """ Prometheus metrics endpoint. Is not required as we are pushing metrics using OTLPMetricExporter, but can be used for debugging purposes. """ return CustomMetricsResponse(generate_latest(REGISTRY), headers={"Content-Type": CONTENT_TYPE_LATEST}) + @app.get("/metrics", tags=["Telemetry"], response_class=CustomMetricsResponse) + def deprecated_prometheus_metrics(): + """ + Deprecated: Consider using /api/metrics instead. + """ + _log.warn("Using deprecated /metrics endpoint. Consider switching to /api/metrics.") + return CustomMetricsResponse(generate_latest(REGISTRY), headers={"Content-Type": CONTENT_TYPE_LATEST}) + tracer_provider: TracerProvider | None = None if settings.traces.enabled: _log.info("Enabling OpenTelemetry traces") @@ -112,9 +122,11 @@ def prometheus_metrics(): BatchSpanProcessor( OTLPSpanExporter( # If we are using the global exporter settings, append the traces path - endpoint=_append_trace_path(exporter_settings.endpoint) - if exporter_settings == global_exporter_settings - else exporter_settings.endpoint, + endpoint=( + _append_trace_path(exporter_settings.endpoint) + if exporter_settings == global_exporter_settings + else exporter_settings.endpoint + ), headers=exporter_settings.headers, timeout=exporter_settings.timeout, **exporter_settings.kwargs, @@ -155,9 +167,11 @@ def shutdown_tracer_event(): BatchLogRecordProcessor( OTLPLogExporter( # If we are using the global exporter settings, append the logs path - endpoint=_append_logs_path(exporter_settings.endpoint) - if exporter_settings == global_exporter_settings - else exporter_settings.endpoint, + endpoint=( + _append_logs_path(exporter_settings.endpoint) + if exporter_settings == global_exporter_settings + else exporter_settings.endpoint + ), headers=exporter_settings.headers, timeout=exporter_settings.timeout, **exporter_settings.kwargs, diff --git a/visyn_core/tests/fixtures/postgres_db.py b/visyn_core/tests/fixtures/postgres_db.py index 6dcd17c63..30e32f9d2 100644 --- a/visyn_core/tests/fixtures/postgres_db.py +++ b/visyn_core/tests/fixtures/postgres_db.py @@ -16,7 +16,7 @@ class PostgreSQLExecutorWithUrl(PostgreSQLExecutor): def postgres_db(postgresql_proc) -> Generator[PostgreSQLExecutorWithUrl, None, None]: d = postgresql_proc d.url = f"postgresql://{d.user}:{d.password}@{d.host}:{d.port}/{d.dbname}" - janitor = DatabaseJanitor(d.user, d.host, d.port, d.dbname, d.version, d.password) + janitor = DatabaseJanitor(user=d.user, host=d.host, port=d.port, dbname=d.dbname, version=d.version, password=d.password) janitor.init() # import this ONCE in your conftest.py, not in each test module yield d janitor.drop() diff --git a/visyn_core/tests/test_main_app.py b/visyn_core/tests/test_main_app.py index 70dfe8e3b..4571a743a 100644 --- a/visyn_core/tests/test_main_app.py +++ b/visyn_core/tests/test_main_app.py @@ -1,21 +1,9 @@ def test_health(client): - response = client.get("/health") + response = client.get("/api/health") assert response.status_code == 200 assert response.json() == "ok" -def test_buildinfo_json(client): - response = client.get("/api/buildInfo.json") - assert response.status_code == 200 - build_info = response.json() - # Check for the main build name - assert build_info["name"] == "visyn_core" - # Check if plugins are returned as list - assert isinstance(build_info["plugins"], list) - # Check if dependencies are returned (i.e. look for FastAPI) - assert next(d for d in build_info["dependencies"] if d.lower().startswith("fastapi")) - - def test_idtype(client): response = client.get("/api/idtype/") assert response.status_code == 200 diff --git a/visyn_core/tests/test_security_login.py b/visyn_core/tests/test_security_login.py index e6edc7dc7..0eaa3b687 100644 --- a/visyn_core/tests/test_security_login.py +++ b/visyn_core/tests/test_security_login.py @@ -9,13 +9,13 @@ def test_api_key(client: TestClient): - assert client.get("/loggedinas", headers={"apiKey": "invalid_user:password"}).json() == '"not_yet_logged_in"' - assert client.get("/loggedinas", headers={"apiKey": "admin:admin"}).json()["name"] == "admin" + assert client.get("/api/loggedinas", headers={"apiKey": "invalid_user:password"}).json() == '"not_yet_logged_in"' + assert client.get("/api/loggedinas", headers={"apiKey": "admin:admin"}).json()["name"] == "admin" def test_basic_authorization(client: TestClient): - assert client.get("/loggedinas", auth=("invalid_user", "password")).json() == '"not_yet_logged_in"' - assert client.get("/loggedinas", auth=("admin", "admin")).json()["name"] == "admin" + assert client.get("/api/loggedinas", auth=("invalid_user", "password")).json() == '"not_yet_logged_in"' + assert client.get("/api/loggedinas", auth=("admin", "admin")).json()["name"] == "admin" def test_jwt_login(client: TestClient): @@ -32,12 +32,12 @@ def claims_loader_2(user: User): assert stores == [{"id": "DummyStore", "ui": "DefaultLoginForm", "configuration": {}}] # Check if we are actually not logged in - response = client.get("/loggedinas") + response = client.get("/api/loggedinas") assert response.status_code == 200 assert response.json() == '"not_yet_logged_in"' # Login with the dummy user - response = client.post("/login", data={"username": "admin", "password": "admin"}) + response = client.post("/api/login", data={"username": "admin", "password": "admin"}) assert response.status_code == 200 user: dict = response.json() assert user["name"] == "admin" @@ -46,7 +46,7 @@ def claims_loader_2(user: User): assert user["payload"]["username"] == "admin" # Check if we are logged in and get the same response as from the login - response = client.get("/loggedinas") + response = client.get("/api/loggedinas") assert response.status_code == 200 assert user == response.json() assert ( @@ -58,7 +58,7 @@ def claims_loader_2(user: User): manager.settings.jwt_refresh_if_expiring_in_seconds = manager.settings.jwt_expire_in_seconds + 5 # Check if we are still logged in and get the same response as the refresh happens *after* the request - assert user == client.get("/loggedinas").json() + assert user == client.get("/api/loggedinas").json() assert ( client.cookies.get(manager.settings.jwt_access_cookie_name) != user["access_token"] ) # Access token is different in response and cookies @@ -67,7 +67,7 @@ def claims_loader_2(user: User): manager.settings.jwt_refresh_if_expiring_in_seconds = original_jwt_refresh_if_expiring_in_seconds # Check if we are logged in and get a different response as the cookie was auto-refreshed in the last request - refreshed_user = client.get("/loggedinas").json() + refreshed_user = client.get("/api/loggedinas").json() assert user["name"] == refreshed_user["name"] # Same user assert user["access_token"] != refreshed_user["access_token"] # But different token assert user["payload"]["exp"] < refreshed_user["payload"]["exp"] # With longer expiry date @@ -76,18 +76,18 @@ def claims_loader_2(user: User): ) # Access token is equal in new response and cookies # Logout - response = client.post("/logout") + response = client.post("/api/logout") assert response.status_code == 200 # Check if we are actually not logged in anymore - response = client.get("/loggedinas") + response = client.get("/api/loggedinas") assert response.status_code == 200 assert response.json() == '"not_yet_logged_in"' def test_jwt_token_location(client: TestClient): # Login to set a cookie - response = client.post("/login", data={"username": "admin", "password": "admin"}) + response = client.post("/api/login", data={"username": "admin", "password": "admin"}) assert response.status_code == 200 access_token = response.json()["access_token"] @@ -95,25 +95,25 @@ def test_jwt_token_location(client: TestClient): manager.settings.jwt_token_location = [] # Does not work even though both header and cookies are passed - response = client.get("/loggedinas", headers={"Authorization": f"Bearer {access_token}"}) + response = client.get("/api/loggedinas", headers={"Authorization": f"Bearer {access_token}"}) assert response.json() == '"not_yet_logged_in"' # Allow headers manager.settings.jwt_token_location = ["headers"] # Does not work as only headers are accepted - response = client.get("/loggedinas") + response = client.get("/api/loggedinas") assert response.json() == '"not_yet_logged_in"' # Does work as header is passed - response = client.get("/loggedinas", headers={"Authorization": f"Bearer {access_token}"}) + response = client.get("/api/loggedinas", headers={"Authorization": f"Bearer {access_token}"}) assert response.json() == '"not_yet_logged_in"' # Allow cookies manager.settings.jwt_token_location = ["cookies"] # Does work even without header - response = client.get("/loggedinas") + response = client.get("/api/loggedinas") assert response.json() != '"not_yet_logged_in"' @@ -123,7 +123,7 @@ def test_alb_security_store(client: TestClient): manager.settings.visyn_core.security.store.alb_security_store.email_token_field = ["field1", "field2", "email"] manager.settings.visyn_core.security.store.alb_security_store.decode_options = {"verify_signature": False} manager.settings.visyn_core.security.store.alb_security_store.cookie_name = "TestCookie" - manager.settings.visyn_core.security.store.alb_security_store.signout_url = "http://localhost/logout" + manager.settings.visyn_core.security.store.alb_security_store.signout_url = "http://localhost/api/logout" store = create_alb_security_store() assert store is not None @@ -141,26 +141,26 @@ def test_alb_security_store(client: TestClient): } # Check loggedinas with a JWT - response = client.get("/loggedinas", headers=headers) + response = client.get("/api/loggedinas", headers=headers) assert response.status_code == 200 assert response.json() != '"not_yet_logged_in"' assert response.json()["name"] == "admin@localhost" # Logout and check if we get the correct redirect url - response = client.post("/logout", headers=headers) + response = client.post("/api/logout", headers=headers) assert response.status_code == 200 - assert response.json()["redirect"] == "http://localhost/logout" + assert response.json()["redirect"] == "http://localhost/api/logout" # Test if we are not logged in if we use invalid fields store.email_token_fields = ["field1", "field2"] - assert client.get("/loggedinas", headers=headers).json() == '"not_yet_logged_in"' + assert client.get("/api/loggedinas", headers=headers).json() == '"not_yet_logged_in"' def test_oauth2_security_store(client: TestClient): # Add some basic configuration manager.settings.visyn_core.security.store.oauth2_security_store.enable = True manager.settings.visyn_core.security.store.oauth2_security_store.cookie_name = "TestCookie" - manager.settings.visyn_core.security.store.oauth2_security_store.signout_url = "http://localhost/logout" + manager.settings.visyn_core.security.store.oauth2_security_store.signout_url = "http://localhost/api/logout" store = create_oauth2_security_store() assert store is not None @@ -176,15 +176,15 @@ def test_oauth2_security_store(client: TestClient): } # Check loggedinas with a JWT - response = client.get("/loggedinas", headers=headers) + response = client.get("/api/loggedinas", headers=headers) assert response.status_code == 200 assert response.json() != '"not_yet_logged_in"' assert response.json()["name"] == "admin@localhost" # Logout and check if we get the correct redirect url - response = client.post("/logout", headers=headers) + response = client.post("/api/logout", headers=headers) assert response.status_code == 200 - assert response.json()["redirect"] == "http://localhost/logout" + assert response.json()["redirect"] == "http://localhost/api/logout" def test_no_security_store(client: TestClient): @@ -198,7 +198,7 @@ def test_no_security_store(client: TestClient): manager.security.user_stores = [store] - user_info = client.get("/loggedinas").json() + user_info = client.get("/api/loggedinas").json() assert user_info != '"not_yet_logged_in"' assert user_info["name"] == "test_name" assert user_info["roles"] == ["test_role"] @@ -214,7 +214,7 @@ def on_user_loaded_increment(user: User): assert counter == 0 - client.get("/loggedinas", auth=("admin", "admin")) + client.get("/api/loggedinas", auth=("admin", "admin")) assert counter == 1 @@ -223,6 +223,6 @@ def on_user_loaded_decrement(user: User): nonlocal counter counter -= 1 - client.get("/loggedinas", auth=("admin", "admin")) + client.get("/api/loggedinas", auth=("admin", "admin")) assert counter == 1 diff --git a/visyn_core/tests/test_telemetry.py b/visyn_core/tests/test_telemetry.py index 5e953f09b..5351de03e 100644 --- a/visyn_core/tests/test_telemetry.py +++ b/visyn_core/tests/test_telemetry.py @@ -23,9 +23,9 @@ ) def test_fastapi_metrics(client: TestClient): # Trigger a request - client.get("/health") + client.get("/api/health") - metrics_text = client.get("/metrics").text + metrics_text = client.get("/api/metrics").text parsed = {m.name: m for m in text_string_to_metric_families(metrics_text)} # Check for app info @@ -36,20 +36,20 @@ def test_fastapi_metrics(client: TestClient): # Check for request counts fastapi_requests_metric = parsed["fastapi_requests_1"] # TODO: Why _1? assert len(fastapi_requests_metric.samples) == 2 - assert fastapi_requests_metric.samples[0].labels["path"] == "/health" + assert fastapi_requests_metric.samples[0].labels["path"] == "/api/health" assert fastapi_requests_metric.samples[0].value == 1 - assert fastapi_requests_metric.samples[1].labels["path"] == "/metrics" + assert fastapi_requests_metric.samples[1].labels["path"] == "/api/metrics" assert fastapi_requests_metric.samples[1].value == 1 # Trigger it again - client.get("/health") - metrics_text = client.get("/metrics").text + client.get("/api/health") + metrics_text = client.get("/api/metrics").text parsed = {m.name: m for m in text_string_to_metric_families(metrics_text)} # And check for increased counts fastapi_requests_metric = parsed["fastapi_requests_1"] # TODO: Why _1? assert len(fastapi_requests_metric.samples) == 2 - assert fastapi_requests_metric.samples[0].labels["path"] == "/health" + assert fastapi_requests_metric.samples[0].labels["path"] == "/api/health" assert fastapi_requests_metric.samples[0].value == 2 - assert fastapi_requests_metric.samples[1].labels["path"] == "/metrics" + assert fastapi_requests_metric.samples[1].labels["path"] == "/api/metrics" assert fastapi_requests_metric.samples[1].value == 2 diff --git a/visyn_core/tests/test_xlsx.py b/visyn_core/tests/test_xlsx.py new file mode 100644 index 000000000..838d9a2c7 --- /dev/null +++ b/visyn_core/tests/test_xlsx.py @@ -0,0 +1,48 @@ +from starlette.testclient import TestClient + +table_defintion_json = { + "sheets": [ + { + "title": "TestTable", + "columns": [{"name": "Col1", "type": "string"}, {"name": "Col2", "type": "float"}, {"name": "Col3", "type": "boolean"}], + "rows": [{"Col1": "test1", "Col2": 0.5, "Col3": False}, {"Col1": "test2", "Col2": None, "Col3": True}], + } + ] +} + +# this is the xlsx representation of the table_defintion_json above +xlsx_from_json_result = b"PK\x03\x04\x14\x00\x00\x00\x08\x00\ti\x8cXFZ\xc1\x0c\x82\x00\x00\x00\xb1\x00\x00\x00\x10\x00\x00\x00docProps/app.xmlM\x8eM\x0b\xc20\x10D\xffJ\xe9\xddnU\xf0 1 \xd4\xa3\xe0\xc9{H76\x90dCv\x85\xfc|S\xc1\x8f\xdb<\xde0\x8c\xba\x15\xcaX\xc4#w5\x86\xc4\xa7~\x11\xc9G\x00\xb6\x0bF\xc3C\xd3\xa9\x19G%\x1aiX\x1e@\xcey\x8b\x13\xd9g\xc4$\xb0\x1b\xc7\x03`\x15L3\xce\x9b\xfc\x1d\xec\xb5:\xe7\x1c\xbc5\xe2)\xe9\xab\xb7\x85\x98\x9ct\x97j1(\xf8\x97k\xf3\x8e\x85\xd7\xbc\x1f\xb6o\xf9a\x05\xbf\x93\xfa\x05PK\x03\x04\x14\x00\x00\x00\x08\x00\ti\x8cX\xddR\xb3\x7f\xea\x00\x00\x00\xcb\x01\x00\x00\x11\x00\x00\x00docProps/core.xml\xa5\x91\xc1j\xc30\x0c\x86_\xa5\xe4\x9e(N\xcb(\xc6\xf5ec\xa7\x16\x06+l\xecfd\xb5\r\x8b\x13ck$}\xfb9Y\x9bnl\xb7\x1d\xad\xff\xd3'\t+\xf4\x12\xbb@O\xa1\xf3\x14\xb8\xa6\xb8\x18\\\xd3F\x89~\x93\x9d\x98\xbd\x04\x88x\"gb\x91\x886\x85\x87.8\xc3\xe9\x19\x8e\xe0\r\xbe\x9b#AU\x96w\xe0\x88\x8d5l`\x14\xe6~6f\x17\xa5\xc5Y\xe9?B3\t,\x025\xe4\xa8\xe5\x08\xa2\x10pc\x99\x82\x8b\x7f6L\xc9L\x0e\xb1\x9e\xa9\xbe\xef\x8b~9qi#\x01\xaf\xbb\xed\xf3\xb4|^\xb7\x91M\x8b\x94ieQb \xc3]\xd0\xe3E\xfe<4\n\xbe\x15\xd5e\xf6W\x81\xec\"M\x90|\xf6\xb4\xc9\xae\xc9\xcb\xf2\xfea\xff\x98\xe9\xaa\xacVy\xb9\xcaE\xb5\x17B\x96k)\xd6o\xa3\xebG\xffM\xe8:[\x1f\xea\x7f\x18\xaf\x02\xad\xe0\xd7\xbf\xe9OPK\x03\x04\x14\x00\x00\x00\x08\x00\ti\x8cX\x99\\\x9c#\x10\x06\x00\x00\x9c'\x00\x00\x13\x00\x00\x00xl/theme/theme1.xml\xedZ[s\xda8\x14~\xef\xaf\xd0xg\xf6m\x0b\xc66\x81\xb6\xb4\x13siv\xdb\xb4\x99\x84\xedN\x1f\x85\x11X\x8dlyd\x91\x84\x7f\xbfG6\x10\xcb\x96\r\xed\x92M\xba\x9b<\x04,\xe9\xfb\xceEG\xe7\xe88y\xf3\xee.b\xe8\x86\x88\x94\xf2x`\xd9/\xdb\xd6\xbb\xb7/\xde\xe0W2$\x11A0\x19\xa7\xaf\xf0\xc0\n\xa5L^\xb5Zi\x00\xc38}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xb4~7\xa0\xe2\x8b\xe8\xb2\x8abp\x13\x15\x080w\x17\x9c\xcf\xfc\xae\xfe\xceo\xcf_\xb4\xfd<\xba\x82\x94\xd7\x7f\x8e\xda\xb2G\xc3:~\xf2\xfa\xa9\x9b\x12\xc0\xdcg\xff\xc6}\x1a+\x9a\xf5\xed\xa6kWk\x023Z\x91\xef0\xfbb\xe6\xa3\x19\xb9\xb0\\E\xed\xc8\xdb\x96\xa9\xb7\xcds\xfe-m\xdc\xe9\xba\t\xe0V\xb5\xac\xa3\xa3\xb0\xcfW\xb0\"\x93\xfc\x8d\xb5|\x94\xe5u\xd5#\x14\x16WM\xf2W\x98\x94\xac\x98\x0e\x88\x0b\xc6U\xcbN\xac\xad\xa3j\x0e\x8d\x17\x13'\xb8\xb0\xf1\xf2\x8c\xd7\xd0\xce_\x08\x84\xb2\x02\x88@\x00\xa2\xb1\xd04PV\xe0\xa1\xb1\xfe\xc7\xba\xd6x]\x01D3\\\xdf\x87\xd68k\x8d\xb3\x02\xef.T\xfb\x1b\x8d\x85\xb0Jw!%\x97e\x9e\x17\x05\xda\xde\xba\xbe\x9fF\x8d\xf6\xb0(\xe0\x878D3\x04\x0e\x1a\x0b\xa2\xfdi\xe7\x17\x06`al\xde\x99\rt\x97\x17\xc7\x06-yaD\xd1\x92\x17:\x0f\x10\xd2C\xe0\x94%2\x00h,\xe0\xa0\x9b\x82N\x14$\x81\xc4\x82QCXy\x0e\xfb\x8cf\x88\x1e\xf3\x05\xa8,Q\x08\x86\x14\x99\xde\xa2\xc0\x1aU\xc0\x8d\xec\x17z\x88\xf2\xbc,\x11\x08@$\x8d\xa4\xaf\xbeg\xe9\xe5;\x97N\xffY\xb7\xbf\x01PK\x03\x04\x14\x00\x00\x00\x08\x00\ti\x8cX\xb7G\xeb\x8a\xc0\x00\x00\x00\x16\x02\x00\x00\x0b\x00\x00\x00_rels/.rels\x9d\x92Kn\x021\x0c@\xaf\x12e_L\xa9\xc4\x021\xac\xd8\xb0C\x88\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\xa6T\x93\xa1\xb1\x05\x16\xac\xff\xc8\xebhs\xa3+\x9f\x14\xd1\xd5{\xcc\\\xaaY\x11\x80-\xb2\x974\x91\xf8:\x98\xae\x8d!\x92\xbcj\x06K\x12X\x17\x01y\x8e\xa1\xc1\xab\xe6\x9b:\xa2\x1ah\xd1A\xf3\x12X>6B\xb0:\\5>\x894\xbd\xbe\x99\xdc\x86\x00\x07c\xee\x83\xf6\xea\x9eI7?\xde\xc6\xc3\xde}\x01PK\x03\x04\x14\x00\x00\x00\x08\x00\ti\x8cX3\xeb\xe3\xba\xad\x00\x00\x00\xfb\x01\x00\x00\x1a\x00\x00\x00xl/_rels/workbook.xml.rels\xb5\x91=\x0e\x830\x0c\x85\xaf\x12\xe5\x00\x18\xa8\xd4\xa1\x02\xa6.\xac\x15\x17\x88\x82\xf9\x11\x81D\xb1\xab\xc2\xed\x1b\xc1\x00H\x1d\xba0Y\xcf\x96\xbf\xf7dg/4\x8a{;Q\xd7;\x12\xf3h&\xcae\xc7\xec\x1e\x00\xa4;\x1c\x15E\xd6\xe1\x14&\x8d\xf5\xa3\xe2 }\x0bN\xe9A\xb5\x08i\x1c\xdf\xc1\x1f\x19\xb2\xc8\x8eLQ-\x0e\xff!\xda\xa6\xe95>\xad~\x8f8\xf1\x0f0|\xac\x1f\xa8Cd)*\xe5[\xe4\\\xc2l\xf66\xc1Z\x92(\x90\xa5(\xeb\\\xfa\xb2N\xa4\x80\xcb\x12\x11/\x06i\x8f\xb3\xe9\x93\x7fz\xa5?\x87]\xdc\xedW\xb95\xcfG\xb8\xad!\xe0\xf4\xeb\xe2\x0bPK\x03\x04\x14\x00\x00\x00\x08\x00\ti\x8cX\x9b\x86B\x84\x1b\x01\x00\x00\xd7\x03\x00\x00\x13\x00\x00\x00[Content_Types].xml\xad\x93\xcfN\xc30\x0c\xc6_\xa5\xeauj38p@\xeb.\x8c+\xec\xc0\x0b\x84\xc4]\xa3\xe6\x9fboto\x8f\xdb\xb2J\xa0\xb1\r\x95K\xa3\xc6\xf6\xf7s\xfc%\xab\xb7c\x04\xcc:g=VyC\x14\x1f\x85@\xd5\x80\x93X\x86\x08\x9e#uHN\x12\xff\xa6\x9d\x88R\xb5r\x07\xe2~\xb9|\x10*x\x02O\x05\xf5\x1a\xf9z\xb5\x81Z\xee-e\xcf\x1do\xa3\t\xbe\xca\x13X\xcc\xb3\xa71\xb1gU\xb9\x8c\xd1\x1a%\x89\xe3\xe2\xe0\xf5\x0fJ\xf1E(\xb9r\xc8\xc1\xc6D\\pB\x9e\x89\xb3\x88!\xf4+\xe1T\xf8z\x80\x94\x8c\x86l+\x13\xbdH\xc7i\xa2\xb3\x02\xe9h\x01\xcb\xcb\x1ag\xba\x0cum\x14\xe8\xa0\xf6\x8eKJ\x8c\t\xa4\xc6\x06\x80\x9c-G\xd1\xc5\x154\xf1\x90a\xfc\xde\xcdn`\x90\xb9H\xe4\xd4m\n\x11\xd9\xb5\x04\x7f\xe7\x9dl\xe9\xab\x8b\xc8B\x90\xc8\\9\xe4\x84d\xed\xd9'\x84\xdeq\r\xfaV8O\xf8#\xa4v\xf0\x04\xc5\xb0\xcc\x1f\xf3w\x9f'\xfd[\x1ay\x0f\xa1\xfd\xef{\xd6\xaf\xa5\x93\xc6O\r\x88\xe1=\xaf?\x01PK\x01\x02\x14\x03\x14\x00\x00\x00\x08\x00\ti\x8cXFZ\xc1\x0c\x82\x00\x00\x00\xb1\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x00\x00\x00\x00docProps/app.xmlPK\x01\x02\x14\x03\x14\x00\x00\x00\x08\x00\ti\x8cX\xddR\xb3\x7f\xea\x00\x00\x00\xcb\x01\x00\x00\x11\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\xb0\x00\x00\x00docProps/core.xmlPK\x01\x02\x14\x03\x14\x00\x00\x00\x08\x00\ti\x8cX\x99\\\x9c#\x10\x06\x00\x00\x9c'\x00\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\xc9\x01\x00\x00xl/theme/theme1.xmlPK\x01\x02\x14\x03\x14\x00\x00\x00\x08\x00\ti\x8cX\x04q\xaa\xb1n\x01\x00\x00F\x03\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x81\n\x08\x00\x00xl/worksheets/sheet1.xmlPK\x01\x02\x14\x03\x14\x00\x00\x00\x08\x00\ti\x8cX\x18\xb4\x1cWd\x02\x00\x00\xc0\n\x00\x00\r\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\xae\t\x00\x00xl/styles.xmlPK\x01\x02\x14\x03\x14\x00\x00\x00\x08\x00\ti\x8cX\xb7G\xeb\x8a\xc0\x00\x00\x00\x16\x02\x00\x00\x0b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01=\x0c\x00\x00_rels/.relsPK\x01\x02\x14\x03\x14\x00\x00\x00\x08\x00\ti\x8cXg\xc5t\x873\x01\x00\x00,\x02\x00\x00\x0f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01&\r\x00\x00xl/workbook.xmlPK\x01\x02\x14\x03\x14\x00\x00\x00\x08\x00\ti\x8cX3\xeb\xe3\xba\xad\x00\x00\x00\xfb\x01\x00\x00\x1a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x86\x0e\x00\x00xl/_rels/workbook.xml.relsPK\x01\x02\x14\x03\x14\x00\x00\x00\x08\x00\ti\x8cX\x9b\x86B\x84\x1b\x01\x00\x00\xd7\x03\x00\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01k\x0f\x00\x00[Content_Types].xmlPK\x05\x06\x00\x00\x00\x00\t\x00\t\x00>\x02\x00\x00\xb7\x10\x00\x00\x00\x00" + + +table_definition_json_array = [["Col1", "Col2", "Col3"], ["test1", 0.5, False], ["test2", None, True]] + +# this is the xlsx representation of the table_definition_json_array above +xlsx_from_json_array_result = b"PK\x03\x04\x14\x00\x00\x00\x08\x00\x99j\x8cXFZ\xc1\x0c\x82\x00\x00\x00\xb1\x00\x00\x00\x10\x00\x00\x00docProps/app.xmlM\x8eM\x0b\xc20\x10D\xffJ\xe9\xddnU\xf0 1 \xd4\xa3\xe0\xc9{H76\x90dCv\x85\xfc|S\xc1\x8f\xdb<\xde0\x8c\xba\x15\xcaX\xc4#w5\x86\xc4\xa7~\x11\xc9G\x00\xb6\x0bF\xc3C\xd3\xa9\x19G%\x1aiX\x1e@\xcey\x8b\x13\xd9g\xc4$\xb0\x1b\xc7\x03`\x15L3\xce\x9b\xfc\x1d\xec\xb5:\xe7\x1c\xbc5\xe2)\xe9\xab\xb7\x85\x98\x9ct\x97j1(\xf8\x97k\xf3\x8e\x85\xd7\xbc\x1f\xb6o\xf9a\x05\xbf\x93\xfa\x05PK\x03\x04\x14\x00\x00\x00\x08\x00\x99j\x8cXh\xedm\xda\xea\x00\x00\x00\xcb\x01\x00\x00\x11\x00\x00\x00docProps/core.xml\xa5\x91MO\xc30\x0c\x86\xff\xca\x94{\xeb\xa4\x1b\x1c\xa2\xae\x97\xa1\x9d\x86\x84\xc4$\x10\xb7(\xf1\xb6\x88\xe6C\x89Q\xbb\x7fO[\xb6\x0e\x047\x8e\xf1\xfb\xf8\xb1\xad\xd4:J\x1d\x12>\xa5\x101\x91\xc5\xbc\xe8]\xeb\xb3\xd4q\xcdNDQ\x02d}B\xa7r9\x10~\x08\x0f!9E\xc33\x1d!*\xfd\xae\x8e\x08\x15\xe7\xf7\xe0\x90\x94Q\xa4`\x14\x16q6\xb2\x8b\xd2\xe8Y\x19?R;\t\x8c\x06l\xd1\xa1\xa7\x0c\xa2\x14pc\t\x93\xcb\x7f6L\xc9L\xf6\xd9\xceT\xd7ue\xb7\x9c\xb8a#\x01\xaf\x8f\xbb\xe7i\xf9\xc2\xfaL\xcakdMm\xb4\xd4\t\x15\x85\xd4\x8c\x17\xc5s\xdf\xd6\x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x06\x13\x01\xcd\x94\xc9D\xf0\x02\x82d\xa6\x1c\x80\x98\xfa\x0b\xbd\xf2\x0c\xb9)\x15\xce\xad>9\x7fE,\x83\x86N^\xd2%\x12\x14\x8a\xb0\x0c\x05!\x17r\xe3\xef\xef\x93jw\x8c\xd7\xfa,\x81m\x84T2d\xd5\x17\xcaC\x89\xc1=3rC\xd8T%\xf3\xae\xda&\x0b\x85\xdb\xe2T\xcd\xbb\x1a\xbe&`K\xc3zn\x9d-'\xff\xdb^\xd4=\xb4\x17=F\xf3\xa3\x99\xe0\x1e\xb3\x87s\x9bz\xb8\xc2E\xac\xffX\xd6\x1e\xf92\xdf9p\xdb:\xde\x03^\xe6\x13,C\xa4~\xc1}\x8a\x8a\x80\x11\xabb\xbe\xba\xafO\xf9%\x9c;\xb4{\xf1\x81 \x9b\xfc\xd6\xdb\xa4\xf6\xdd\xe0\x0c|\xd4\xabZ\xa5d+\x11?K\x07|\x1f\x92\x06c\x8c[\xf44_\x8f\x14b\xad\xa6\xb1\xad\xc6\xda1\x0cy\x80X\xf3\x0c\xa1f8\xdf\x87E\x9a\x1a3\xd5\x8b\xac9\x8d\noA\xd5@\xe5?\xdb\xd4\rh\xf6\r4\x1c\x91\x05^1\x99\xb66\xa3\xe4N\n<\xdc\xfe\xef\r\xb0\xc2\xc4\x8e\xe1\xed\x8b\xbf\x01PK\x03\x04\x14\x00\x00\x00\x08\x00\x99j\x8cX\t\xf8\xfa\x7fm\x01\x00\x004\x03\x00\x00\x18\x00\x00\x00xl/worksheets/sheet1.xml}S]O\xc20\x14\xfd+K\x7f\x00\x1d[Pc\xb6%\x821\xfa`B \xeas7\xee\xb6\x86v\x9d\xed\x85\xe9\xbf\xb7\xed\xb0\x19\x06y\xe2~\x9c{\xce\xe9\xee%\x1b\x94\xde\x9b\x16\x00\xa3/):\x93\x93\x16\xb1\xbf\xa7\xd4T-Hff\xaa\x87\xcevj\xa5%C\x9b\xea\x86\x9a^\x03\xdb\xf9!)h\x12\xc77T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\xf4\x17h\xb9,\xf3\xbc(\xe0\xf6V\xd5c\x19\x15\xdc\xc3\xa2\xa0\x1fH\x08\x15\x12\x07\xd6\xa2j\x7f\xbb\xf3\x13\x03016\x7f\x98\rx\xca\x93c\x03[\x9e\x18Q\xd8\xf2\xc4\xce\x13\x04\xf6\x908e\t\x06\x00\xd6\"\x0e<\x148Q$\x02\xd4\xa2Q\x03\xac<\xa7s\x86\n\xe1k>\x01\x95%\x84hH\xc1\xf4\x16\x05\xda\xa8\x82np^\xf0%\xca\xf3\xb2\x04\x10\x81@F\x9eC\x88^\xd8\t\x08\xca !\x10\xca\xf3\xf8!}\xf3=\xcb\xce\xdf\xb9\xec\xfa\xd7q\xf3\x1bPK\x03\x04\x14\x00\x00\x00\x08\x00\x99j\x8cX\xb7G\xeb\x8a\xc0\x00\x00\x00\x16\x02\x00\x00\x0b\x00\x00\x00_rels/.rels\x9d\x92Kn\x021\x0c@\xaf\x12e_L\xa9\xc4\x021\xac\xd8\xb0C\x88\x0b\xb8\x89\xe7\xa3\x99\xc4\x91c\xc4\xf4\xf6\x8d\xd8\xc0 h\x11K\xff\x9e\x9e-\xaf\x0f4\xa0v\x1cs\xdb\xa5l\xc60\xc4\\\xd9V5\xad\x00\xb2k)`\x9eq\xa2X*5K@-\xa14\x90\xd0\xf5\xd8\x10,\xe6\xf3%\xc8-\xc3n\xd6\xb7Ls\xfcI\xf4\n\x91\xeb\xbas\xb4ew\n\x14\xf5\x01\xf8\xae\xc3\x9a#JCZ\xd9q\x803K\xff\xcd\xdc\xcf\n\xd4\x9a\x9d\xaf\xac\xec\xfc\xa75\xf0\xa6\xcc\xf3\xf5 \x90\xa2GEp,\xf4\x91\xa4L\x8bv\x94\xaf>\x9e\xdd\xbe\xa4\xf3\xa5cb\xb4x\xdf\xe8\xff\xf3\xd0\xa8\x14=\xf9\xbf\x9d0\xa5\x89\xd2\xd7E\t&o\xb0\xf9\x05PK\x03\x04\x14\x00\x00\x00\x08\x00\x99j\x8cX\xe4\xb0k\xee0\x01\x00\x00(\x02\x00\x00\x0f\x00\x00\x00xl/workbook.xml\x8d\x90\xd1N\xc30\x0cE\x7f\xa5\xca\x07\xd0n\x82IL\xeb^\x98\x80I\x08\x10C{\xcfZw\xb5\x96\xc4\x95\xe3n\xb0\xaf'I)L\xe2\x85'\xc7\xd7\xd6\xc9\xbd^\x9c\x88\x0f;\xa2C\xf6a\x8d\xf3s.U+\xd2\xcd\xf3\xdcW-X\xed\xaf\xa8\x03\x17f\r\xb1\xd5\x12Z\xde\xe7\xd44X\xc1\x8a\xaa\xde\x82\x93|Z\x14\xb3\x9c\xc1hAr\xbe\xc5\xce\xab\x81\xf6\x1f\x96\xef\x18t\xed[\x00\xb1f@Y\x8dN-\x17\xa3\xb3W\xce\xf2\xcb\x8e\x04\xaa\xf8ST\xa3\xb2E8\xf9\xdf\x85\xd8fG\xf4\xb8C\x83\xf2Y\xaa\xf46\xa02\x8b\x0e-\x9e\xa1.U\xa12\xdf\xd2\xe9\x91\x18\xcf\xe4D\x9bM\xc5dL\xa9&\xc3`\x0b,X\xfd\x917\xd1\xe6\xbb\xde\xf9\xa4\x88\xde\xbd\xc5\xcc\xa5\x9a\x15\x01\xd8 {I\x1b\x89\xaf\x83\xc9#\x84\xe5\xa1\xeb\x85\xee\xd1\x08\xf0J\x0b<0\xf5\x1d\xba}\xc2\x84\x18\xf9E\x8et\x8a\xb1fN[(U\xa2F\x0b\xa1\xac\xeb\xc1\x8e\x04\xceE8\x9ec\x18\xf0\xba\xfe&\x8e\x98\x1a\x1atP?\x07\x8e\x8f\x83\x10\xaa\n\x17\x8d%\x91\xa6\xd77\x93\xdb`\xbe7\xe6.h/\xee\x89t\xfd\xe3k<\xea\xf2\x0bPK\x03\x04\x14\x00\x00\x00\x08\x00\x99j\x8cX3\xeb\xe3\xba\xad\x00\x00\x00\xfb\x01\x00\x00\x1a\x00\x00\x00xl/_rels/workbook.xml.rels\xb5\x91=\x0e\x830\x0c\x85\xaf\x12\xe5\x00\x18\xa8\xd4\xa1\x02\xa6.\xac\x15\x17\x88\x82\xf9\x11\x81D\xb1\xab\xc2\xed\x1b\xc1\x00H\x1d\xba0Y\xcf\x96\xbf\xf7dg/4\x8a{;Q\xd7;\x12\xf3h&\xcae\xc7\xec\x1e\x00\xa4;\x1c\x15E\xd6\xe1\x14&\x8d\xf5\xa3\xe2 }\x0bN\xe9A\xb5\x08i\x1c\xdf\xc1\x1f\x19\xb2\xc8\x8eLQ-\x0e\xff!\xda\xa6\xe95>\xad~\x8f8\xf1\x0f0|\xac\x1f\xa8Cd)*\xe5[\xe4\\\xc2l\xf66\xc1Z\x92(\x90\xa5(\xeb\\\xfa\xb2N\xa4\x80\xcb\x12\x11/\x06i\x8f\xb3\xe9\x93\x7fz\xa5?\x87]\xdc\xedW\xb95\xcfG\xb8\xad!\xe0\xf4\xeb\xe2\x0bPK\x03\x04\x14\x00\x00\x00\x08\x00\x99j\x8cX\x9b\x86B\x84\x1b\x01\x00\x00\xd7\x03\x00\x00\x13\x00\x00\x00[Content_Types].xml\xad\x93\xcfN\xc30\x0c\xc6_\xa5\xeauj38p@\xeb.\x8c+\xec\xc0\x0b\x84\xc4]\xa3\xe6\x9fboto\x8f\xdb\xb2J\xa0\xb1\r\x95K\xa3\xc6\xf6\xf7s\xfc%\xab\xb7c\x04\xcc:g=VyC\x14\x1f\x85@\xd5\x80\x93X\x86\x08\x9e#uHN\x12\xff\xa6\x9d\x88R\xb5r\x07\xe2~\xb9|\x10*x\x02O\x05\xf5\x1a\xf9z\xb5\x81Z\xee-e\xcf\x1do\xa3\t\xbe\xca\x13X\xcc\xb3\xa71\xb1gU\xb9\x8c\xd1\x1a%\x89\xe3\xe2\xe0\xf5\x0fJ\xf1E(\xb9r\xc8\xc1\xc6D\\pB\x9e\x89\xb3\x88!\xf4+\xe1T\xf8z\x80\x94\x8c\x86l+\x13\xbdH\xc7i\xa2\xb3\x02\xe9h\x01\xcb\xcb\x1ag\xba\x0cum\x14\xe8\xa0\xf6\x8eKJ\x8c\t\xa4\xc6\x06\x80\x9c-G\xd1\xc5\x154\xf1\x90a\xfc\xde\xcdn`\x90\xb9H\xe4\xd4m\n\x11\xd9\xb5\x04\x7f\xe7\x9dl\xe9\xab\x8b\xc8B\x90\xc8\\9\xe4\x84d\xed\xd9'\x84\xdeq\r\xfaV8O\xf8#\xa4v\xf0\x04\xc5\xb0\xcc\x1f\xf3w\x9f'\xfd[\x1ay\x0f\xa1\xfd\xef{\xd6\xaf\xa5\x93\xc6O\r\x88\xe1=\xaf?\x01PK\x01\x02\x14\x03\x14\x00\x00\x00\x08\x00\x99j\x8cXFZ\xc1\x0c\x82\x00\x00\x00\xb1\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x00\x00\x00\x00docProps/app.xmlPK\x01\x02\x14\x03\x14\x00\x00\x00\x08\x00\x99j\x8cXh\xedm\xda\xea\x00\x00\x00\xcb\x01\x00\x00\x11\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\xb0\x00\x00\x00docProps/core.xmlPK\x01\x02\x14\x03\x14\x00\x00\x00\x08\x00\x99j\x8cX\x99\\\x9c#\x10\x06\x00\x00\x9c'\x00\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\xc9\x01\x00\x00xl/theme/theme1.xmlPK\x01\x02\x14\x03\x14\x00\x00\x00\x08\x00\x99j\x8cX\t\xf8\xfa\x7fm\x01\x00\x004\x03\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x81\n\x08\x00\x00xl/worksheets/sheet1.xmlPK\x01\x02\x14\x03\x14\x00\x00\x00\x08\x00\x99j\x8cX\xd2\x05\xf1FR\x02\x00\x00G\n\x00\x00\r\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\xad\t\x00\x00xl/styles.xmlPK\x01\x02\x14\x03\x14\x00\x00\x00\x08\x00\x99j\x8cX\xb7G\xeb\x8a\xc0\x00\x00\x00\x16\x02\x00\x00\x0b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01*\x0c\x00\x00_rels/.relsPK\x01\x02\x14\x03\x14\x00\x00\x00\x08\x00\x99j\x8cX\xe4\xb0k\xee0\x01\x00\x00(\x02\x00\x00\x0f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x13\r\x00\x00xl/workbook.xmlPK\x01\x02\x14\x03\x14\x00\x00\x00\x08\x00\x99j\x8cX3\xeb\xe3\xba\xad\x00\x00\x00\xfb\x01\x00\x00\x1a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01p\x0e\x00\x00xl/_rels/workbook.xml.relsPK\x01\x02\x14\x03\x14\x00\x00\x00\x08\x00\x99j\x8cX\x9b\x86B\x84\x1b\x01\x00\x00\xd7\x03\x00\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01U\x0f\x00\x00[Content_Types].xmlPK\x05\x06\x00\x00\x00\x00\t\x00\t\x00>\x02\x00\x00\xa1\x10\x00\x00\x00\x00" + + +def test_xlsx_from_json(client: TestClient): + res = client.post("/api/xlsx/from_json", json=table_defintion_json) + xlsx_file = res.content + assert res.status_code == 200 + assert isinstance(xlsx_file, (bytes, bytearray)) + + +def test_xlsx_to_json(client: TestClient): + res = client.post("/api/xlsx/to_json", files={"file": xlsx_from_json_result}) + assert res.status_code == 200 + # Result must be the same as the input for table download + assert res.json() == table_defintion_json + + +def test_xlsx_from_json_array(client: TestClient): + res = client.post("/api/xlsx/from_json_array", json=table_definition_json_array) + xlsx_file = res.content + assert res.status_code == 200 + assert isinstance(xlsx_file, (bytes, bytearray)) + + +def test_xlsx_to_json_array(client: TestClient): + res = client.post("/api/xlsx/to_json_array", files={"file": xlsx_from_json_array_result}) + assert res.status_code == 200 + # Result must be the same as the input for table download + assert res.json() == table_definition_json_array diff --git a/visyn_core/xlsx.py b/visyn_core/xlsx.py index fa5977433..a95d86877 100644 --- a/visyn_core/xlsx.py +++ b/visyn_core/xlsx.py @@ -1,19 +1,20 @@ import logging from datetime import datetime +from io import BytesIO from tempfile import NamedTemporaryFile +from typing import Annotated, Any import dateutil.parser -from flask import Flask, abort, jsonify, request -from flask.wrappers import Response +from fastapi import APIRouter, File, HTTPException, Response from openpyxl import Workbook, load_workbook from openpyxl.cell import WriteOnlyCell from openpyxl.styles import Font +from pydantic import BaseModel -_log = logging.getLogger(__name__) -app = Flask(__name__) - +router = APIRouter(prefix="/api/xlsx", tags=["xlsx"]) _types = {"b": "boolean", "s": "string"} +_log = logging.getLogger(__name__) def to_type(cell): @@ -37,20 +38,36 @@ def _convert_value(v): return v -@app.route("/to_json", methods=["POST"]) -def _xlsx2json(): - file = request.files.get("file") +class TableColumn(BaseModel): + name: str + type: str + + +CELL_CONTENT = str | int | float | bool | datetime | None + + +class TableSheet(BaseModel): + title: str + columns: list[TableColumn] + rows: list[dict[str, Any]] + + +class TableData(BaseModel): + sheets: list[TableSheet] + + +@router.post("/to_json/", response_model=TableData) +def xlsx2json(file: Annotated[bytes, File()]): if not file: - abort(403, "missing file") + raise HTTPException(status_code=403, detail="missing file") - wb = load_workbook(file, read_only=True, data_only=True) # type: ignore + wb = load_workbook(filename=BytesIO(file), read_only=True, data_only=True) # type: ignore - def convert_row(row, cols): + def convert_row(row, cols: list[TableColumn]) -> dict[str, CELL_CONTENT]: result = {} - for r, c in zip(cols, row, strict=False): - result[c["name"]] = _convert_value(r.value) - + for r, c in zip(row, cols, strict=False): + result[c.name] = _convert_value(r.value) return result def convert_sheet(ws): @@ -59,43 +76,39 @@ def convert_sheet(ws): ws_cols = next(ws_rows, []) ws_first_row = next(ws_rows, []) - cols = [{"name": h.value, "type": to_type(r)} for h, r in zip(ws_cols, ws_first_row, strict=False)] + cols = [TableColumn(name=h.value, type=to_type(r)) for h, r in zip(ws_cols, ws_first_row, strict=False)] rows = [] - rows.append(convert_row(cols, ws_first_row)) + rows.append(convert_row(ws_first_row, cols)) for row in ws_rows: - rows.append(str(convert_row(cols, row))) - - return {"title": ws.title, "columns": cols, "rows": rows} - - data = {"sheets": [convert_sheet(ws) for ws in wb.worksheets]} + rows.append(convert_row(row, cols)) + return TableSheet(title=ws.title, columns=cols, rows=rows) - return jsonify(data) + data = TableData(sheets=[convert_sheet(ws) for ws in wb.worksheets]) + return data -@app.route("/to_json_array", methods=["POST"]) -def _xlsx2json_array(): - file = request.files.get("file") +@router.post("/to_json_array/", response_model=list[list[Any]]) +def xlsx2json_array(file: Annotated[bytes, File()]): if not file: - abort(403, "missing file") + raise HTTPException(status_code=403, detail="missing file") - wb = load_workbook(file, read_only=True, data_only=True) # type: ignore + wb = load_workbook(filename=BytesIO(file), read_only=True, data_only=True) def convert_row(row): return [_convert_value(cell.value) for cell in row] if not wb.worksheets: - return jsonify([]) + return [] ws = wb.worksheets[0] rows = [convert_row(row) for row in ws.iter_rows()] - return jsonify(rows) + return rows -@app.route("/from_json", methods=["POST"]) -def _json2xlsx(): - data: dict = request.json # type: ignore +@router.post("/from_json/") +def json2xlsx(data: TableData): wb = Workbook(write_only=True) bold = Font(bold=True) @@ -127,27 +140,26 @@ def to_value(v, coltype): v = dateutil.parser.parse(v) return to_cell(v) - for sheet in data.get("sheets", []): - ws = wb.create_sheet(title=sheet["title"]) - cols = sheet["columns"] - ws.append(to_header(col["name"]) for col in cols) + for sheet in data.sheets: + ws = wb.create_sheet(title=sheet.title) + cols = sheet.columns + ws.append(to_header(col.name) for col in cols) - for row in sheet["rows"]: - ws.append(to_value(row.get(col["name"], None), col["type"]) for col in cols) + for row in sheet.rows: + ws.append(to_value(row.get(col.name, None), col.type) for col in cols) with NamedTemporaryFile() as tmp: wb.save(tmp.name) tmp.seek(0) s = tmp.read() return Response( - s, - mimetype="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", + content=s, + media_type="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", ) -@app.route("/from_json_array", methods=["POST"]) -def _json_array2xlsx(): - data: list = request.json # type: ignore +@router.post("/from_json_array/") +def json_array2xlsx(data: list[list[Any]]): wb = Workbook(write_only=True) ws = wb.create_sheet() @@ -159,8 +171,8 @@ def _json_array2xlsx(): tmp.seek(0) s = tmp.read() return Response( - s, - mimetype="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", + content=s, + media_type="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", ) @@ -168,4 +180,4 @@ def create(): """ entry point of this plugin """ - return app + return router From 4053b6361d498fde01ba0d577d62bf4d73a5ea3a Mon Sep 17 00:00:00 2001 From: Holger Stitz Date: Tue, 23 Apr 2024 11:23:10 +0200 Subject: [PATCH 12/16] refactor: rename labels of filter buttons (#266) refactor: update labels of filter buttons --- src/vis/sidebar/FilterButtons.tsx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/vis/sidebar/FilterButtons.tsx b/src/vis/sidebar/FilterButtons.tsx index 3ddafef47..64449c843 100644 --- a/src/vis/sidebar/FilterButtons.tsx +++ b/src/vis/sidebar/FilterButtons.tsx @@ -8,21 +8,21 @@ interface FilterButtonsProps { export function FilterButtons({ callback }: FilterButtonsProps) { return ( - + - + - + - + From 2eeecb1689cb7118342fb3e1daaedda8b62f7737 Mon Sep 17 00:00:00 2001 From: Holger Stitz Date: Tue, 23 Apr 2024 11:36:16 +0200 Subject: [PATCH 13/16] fix: use correct labels according to functionality --- src/vis/sidebar/FilterButtons.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/vis/sidebar/FilterButtons.tsx b/src/vis/sidebar/FilterButtons.tsx index 64449c843..527f42c6c 100644 --- a/src/vis/sidebar/FilterButtons.tsx +++ b/src/vis/sidebar/FilterButtons.tsx @@ -10,17 +10,17 @@ export function FilterButtons({ callback }: FilterButtonsProps) { return ( - + - + - + From 13f531042640d96785a09bb75515f95f84bde38c Mon Sep 17 00:00:00 2001 From: Usama Ansari <115616380+dv-usama-ansari@users.noreply.github.com> Date: Wed, 24 Apr 2024 10:33:20 +0200 Subject: [PATCH 14/16] fix(vis): duplicate option values in scatterplot sidebar select (#261) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Michael PĆ¼hringer <51900829+puehringer@users.noreply.github.com> Co-authored-by: Holger Stitz --- src/vis/sidebar/MultiSelect.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/vis/sidebar/MultiSelect.tsx b/src/vis/sidebar/MultiSelect.tsx index ce2535e78..a4707ce10 100644 --- a/src/vis/sidebar/MultiSelect.tsx +++ b/src/vis/sidebar/MultiSelect.tsx @@ -26,9 +26,9 @@ export function MultiSelect({ callback(currentSelected.filter((s) => s.id !== id)); }; - const handleValueSelect = (name: string) => { - const itemToAdd = filteredColumns.find((c) => c.info.name === name); - currentSelected.find((c) => c.name === name) ? handleValueRemove(itemToAdd.info.id) : callback([...currentSelected, itemToAdd.info]); + const handleValueSelect = (id: string) => { + const itemToAdd = filteredColumns.find((c) => c.info.id === id); + currentSelected.find((c) => c.id === id) ? handleValueRemove(itemToAdd.info.id) : callback([...currentSelected, itemToAdd.info]); }; const handleValueRemoveAll = () => { @@ -39,7 +39,7 @@ export function MultiSelect({ .filter((c) => !currentSelected.map((s) => s.id).includes(c.info.id)) .map((item) => { return ( - + Date: Wed, 24 Apr 2024 21:03:16 +0200 Subject: [PATCH 15/16] fix(vis): violin vis selection events (#267) * fix violin plot selection * partial fix vis stories * move null value filtering to trace creation function * disable zoom for violin plot * small refactor * pin storybook/node-logger * remove resolution * small useEffect dependency array fix * replace null values in categorical columns with missing * add scrollarea to multiselect --------- Co-authored-by: Holger Stitz --- src/vis/sidebar/MultiSelect.tsx | 8 ++- src/vis/stories/Iris.stories.tsx | 2 +- src/vis/stories/Vis/Bar/BarRandom.stories.tsx | 2 +- .../Correlation/CorrelationIris.stories.tsx | 2 +- .../Vis/Heatmap/HeatmapRandom.stories.tsx | 2 +- .../Vis/Hexbin/HexbinRandom.stories.tsx | 2 +- .../Vis/Raincloud/RaincloudRandom.stories.tsx | 2 +- .../Vis/Scatter/ScatterRandom.stories.tsx | 2 +- .../stories/Vis/Violin/ViolinIris.stories.tsx | 2 +- src/vis/violin/ViolinVis.tsx | 56 ++++--------------- src/vis/violin/utils.ts | 19 ++++--- 11 files changed, 36 insertions(+), 63 deletions(-) diff --git a/src/vis/sidebar/MultiSelect.tsx b/src/vis/sidebar/MultiSelect.tsx index a4707ce10..66ec7a957 100644 --- a/src/vis/sidebar/MultiSelect.tsx +++ b/src/vis/sidebar/MultiSelect.tsx @@ -1,4 +1,4 @@ -import { CloseButton, Combobox, Input, Pill, PillsInput, Stack, Tooltip, useCombobox, Text, Group } from '@mantine/core'; +import { CloseButton, Combobox, Input, Pill, PillsInput, Stack, Tooltip, useCombobox, Text, Group, ScrollArea } from '@mantine/core'; import * as React from 'react'; import { ColumnInfo, EColumnTypes, VisColumn } from '../interfaces'; @@ -121,7 +121,11 @@ export function MultiSelect({ - {options.length === 0 ? All options selected : options} + + + {options.length === 0 ? All options selected : options} + + ); diff --git a/src/vis/stories/Iris.stories.tsx b/src/vis/stories/Iris.stories.tsx index 66b8df58c..5f5fbf8dd 100644 --- a/src/vis/stories/Iris.stories.tsx +++ b/src/vis/stories/Iris.stories.tsx @@ -22,7 +22,7 @@ const Template: ComponentStory = (args) => { return (
- + {}} columns={columns} selected={selection} selectionCallback={setSelection} />
); diff --git a/src/vis/stories/Vis/Bar/BarRandom.stories.tsx b/src/vis/stories/Vis/Bar/BarRandom.stories.tsx index da050a9be..a7ca4d5b9 100644 --- a/src/vis/stories/Vis/Bar/BarRandom.stories.tsx +++ b/src/vis/stories/Vis/Bar/BarRandom.stories.tsx @@ -123,7 +123,7 @@ const Template: ComponentStory = (args) => {
- + {}} columns={columns} />
diff --git a/src/vis/stories/Vis/Correlation/CorrelationIris.stories.tsx b/src/vis/stories/Vis/Correlation/CorrelationIris.stories.tsx index 58a40691d..8b7799a0e 100644 --- a/src/vis/stories/Vis/Correlation/CorrelationIris.stories.tsx +++ b/src/vis/stories/Vis/Correlation/CorrelationIris.stories.tsx @@ -26,7 +26,7 @@ const Template: ComponentStory = (args) => {
- + {}} columns={columns} selected={selection} selectionCallback={setSelection} />
diff --git a/src/vis/stories/Vis/Heatmap/HeatmapRandom.stories.tsx b/src/vis/stories/Vis/Heatmap/HeatmapRandom.stories.tsx index 26d7dad43..7c33c3dfb 100644 --- a/src/vis/stories/Vis/Heatmap/HeatmapRandom.stories.tsx +++ b/src/vis/stories/Vis/Heatmap/HeatmapRandom.stories.tsx @@ -129,7 +129,7 @@ const Template: ComponentStory = (args) => {
- + {}} selected={selected} selectionCallback={setSelected} columns={columns} />
diff --git a/src/vis/stories/Vis/Hexbin/HexbinRandom.stories.tsx b/src/vis/stories/Vis/Hexbin/HexbinRandom.stories.tsx index 485167000..dddeb84f6 100644 --- a/src/vis/stories/Vis/Hexbin/HexbinRandom.stories.tsx +++ b/src/vis/stories/Vis/Hexbin/HexbinRandom.stories.tsx @@ -100,7 +100,7 @@ const Template: ComponentStory = (args) => {
- + {}} columns={columns} />
diff --git a/src/vis/stories/Vis/Raincloud/RaincloudRandom.stories.tsx b/src/vis/stories/Vis/Raincloud/RaincloudRandom.stories.tsx index 7eee5d333..9584e166c 100644 --- a/src/vis/stories/Vis/Raincloud/RaincloudRandom.stories.tsx +++ b/src/vis/stories/Vis/Raincloud/RaincloudRandom.stories.tsx @@ -132,7 +132,7 @@ const Template: ComponentStory = (args) => {
- + {}} columns={columns} selected={selected} selectionCallback={setSelected} />
diff --git a/src/vis/stories/Vis/Scatter/ScatterRandom.stories.tsx b/src/vis/stories/Vis/Scatter/ScatterRandom.stories.tsx index 91e59eedf..7ada2bf84 100644 --- a/src/vis/stories/Vis/Scatter/ScatterRandom.stories.tsx +++ b/src/vis/stories/Vis/Scatter/ScatterRandom.stories.tsx @@ -111,7 +111,7 @@ const Template: ComponentStory = (args) => {
- + {}} selected={selected} selectionCallback={setSelected} columns={columns} />
diff --git a/src/vis/stories/Vis/Violin/ViolinIris.stories.tsx b/src/vis/stories/Vis/Violin/ViolinIris.stories.tsx index 72329b34c..ba96d6654 100644 --- a/src/vis/stories/Vis/Violin/ViolinIris.stories.tsx +++ b/src/vis/stories/Vis/Violin/ViolinIris.stories.tsx @@ -21,7 +21,7 @@ const Template: ComponentStory = (args) => {
- + {}} columns={columns} />
diff --git a/src/vis/violin/ViolinVis.tsx b/src/vis/violin/ViolinVis.tsx index 458d02c11..f2011d388 100644 --- a/src/vis/violin/ViolinVis.tsx +++ b/src/vis/violin/ViolinVis.tsx @@ -8,43 +8,16 @@ import { Plotly } from '../../plotly/full'; import { InvalidCols } from '../general'; import { beautifyLayout } from '../general/layoutUtils'; import { ICommonVisProps } from '../interfaces'; -import { createViolinTraces } from './utils'; import { IViolinConfig } from './interfaces'; +import { createViolinTraces } from './utils'; export function ViolinVis({ config, columns, scales, dimensions, selectedList, selectedMap, selectionCallback }: ICommonVisProps) { const { value: traces, status: traceStatus, error: traceError } = useAsync(createViolinTraces, [columns, config, scales, selectedList, selectedMap]); - const [clearTimeoutValue, setClearTimeoutValue] = useState(null); const id = useMemo(() => uniqueId('ViolinVis'), []); const [layout, setLayout] = useState>(null); - // Filter out null values from traces as null values cause the tooltip to not show up - const filteredTraces = useMemo(() => { - if (!traces) return null; - const indexWithNull = traces.plots?.map( - (plot) => (plot?.data.y as PlotlyTypes.Datum[])?.reduce((acc: number[], curr, i) => (curr === null ? [...acc, i] : acc), []) as number[], - ); - const filtered = { - ...traces, - plots: traces?.plots?.map((p, p_index) => { - return { - ...p, - data: { - ...p.data, - y: (p.data?.y as PlotlyTypes.Datum[])?.filter((v, i) => !indexWithNull[p_index].includes(i)), - x: (p.data?.x as PlotlyTypes.Datum[])?.filter((v, i) => !indexWithNull[p_index].includes(i)), - ids: p.data?.ids?.filter((v, i) => !indexWithNull[p_index].includes(i)), - transforms: p.data?.transforms?.map( - (t) => (t.groups as unknown[])?.filter((v, i) => !indexWithNull[p_index].includes(i)) as Partial, - ), - }, - }; - }), - }; - return filtered; - }, [traces]); - const onClick = (e: (Readonly & { event: MouseEvent }) | null) => { if (!e || !e.points || !e.points[0]) { selectionCallback([]); @@ -87,22 +60,12 @@ export function ViolinVis({ config, columns, scales, dimensions, selectedList, s if (plotDiv) { // NOTE: @dv-usama-ansari: This is a hack to update the plotly plots on resize. // The `setTimeout` is used to pass the resize function to the next event loop, so that the plotly plots are rendered first. - const n = setTimeout(() => Plotly.Plots.resize(plotDiv)); - setClearTimeoutValue(n); + setTimeout(() => Plotly.Plots.resize(plotDiv)); } }, [id, dimensions, traces]); - // NOTE: @dv-usama-ansari: Clear the timeout on unmount. useEffect(() => { - return () => { - if (clearTimeoutValue) { - clearTimeout(clearTimeoutValue); - } - }; - }, [clearTimeoutValue]); - - useEffect(() => { - if (!filteredTraces) { + if (!traces) { return; } @@ -122,13 +85,14 @@ export function ViolinVis({ config, columns, scales, dimensions, selectedList, s family: 'Roboto, sans-serif', }, clickmode: 'event+select', + dragmode: false, // Disables zoom (makes no sense in violin plots) autosize: true, - grid: { rows: filteredTraces.rows, columns: filteredTraces.cols, xgap: 0.3, pattern: 'independent' }, + grid: { rows: traces.rows, columns: traces.cols, xgap: 0.3, pattern: 'independent' }, shapes: [], }; - setLayout((prev) => ({ ...prev, ...beautifyLayout(filteredTraces, innerLayout, prev, true) })); - }, [filteredTraces]); + setLayout((prev) => ({ ...prev, ...beautifyLayout(traces, innerLayout, prev, true) })); + }, [traces]); return ( - {traceStatus === 'success' && layout && filteredTraces?.plots.length > 0 ? ( + {traceStatus === 'success' && layout && traces?.plots.length > 0 ? ( p.data), ...filteredTraces.legendPlots.map((p) => p.data)]} + data={[...traces.plots.map((p) => p.data), ...traces.legendPlots.map((p) => p.data)]} layout={layout} config={{ responsive: true, displayModeBar: false }} useResizeHandler @@ -163,7 +127,7 @@ export function ViolinVis({ config, columns, scales, dimensions, selectedList, s }} /> ) : traceStatus !== 'pending' && traceStatus !== 'idle' && layout ? ( - + ) : null} ); diff --git a/src/vis/violin/utils.ts b/src/vis/violin/utils.ts index 4c6cb29e2..36ecfa35e 100644 --- a/src/vis/violin/utils.ts +++ b/src/vis/violin/utils.ts @@ -54,9 +54,10 @@ export async function createViolinTraces( // if we onl have numerical columns, add them individually. if (catColValues.length === 0) { for (const numCurr of numColValues) { + const y = numCurr.resolvedValues.map((v) => v.val); plots.push({ data: { - y: numCurr.resolvedValues.map((v) => v.val), + y, ids: numCurr.resolvedValues.map((v) => v.id), xaxis: plotCounter === 1 ? 'x' : `x${plotCounter}`, yaxis: plotCounter === 1 ? 'y' : `y${plotCounter}`, @@ -88,11 +89,15 @@ export async function createViolinTraces( for (const numCurr of numColValues) { for (const catCurr of catColValues) { + const y = numCurr.resolvedValues.map((v) => v.val); + // Null values in categorical columns would break the plot --> replace with 'missing' + const categoriesWithMissing = catCurr.resolvedValues?.map((v) => ({ ...v, val: v.val || 'missing' })); + const x = categoriesWithMissing.map((v) => v.val); plots.push({ data: { - x: catCurr.resolvedValues.map((v) => v.val), - ids: catCurr.resolvedValues.map((v) => v.id), - y: numCurr.resolvedValues.map((v) => v.val), + x, + y, + ids: categoriesWithMissing.map((v) => v.id), xaxis: plotCounter === 1 ? 'x' : `x${plotCounter}`, yaxis: plotCounter === 1 ? 'y' : `y${plotCounter}`, type: 'violin', @@ -112,14 +117,14 @@ export async function createViolinTraces( transforms: [ { type: 'groupby', - groups: catCurr.resolvedValues.map((v) => v.val) as string[], - styles: [...new Set(catCurr.resolvedValues.map((v) => v.val) as string[])].map((c) => { + groups: x as string[], + styles: [...new Set(x as string[])].map((c) => { return { target: c, value: { line: { color: - selectedList.length !== 0 && catCurr.resolvedValues.filter((val) => val.val === c).find((val) => selectedMap[val.id]) + selectedList.length !== 0 && categoriesWithMissing.filter((val) => val.val === c).find((val) => selectedMap[val.id]) ? SELECT_COLOR : '#878E95', }, From 9766492ec87d3c3e64242f9cbc45bd3ae882fe54 Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Thu, 25 Apr 2024 08:40:12 +0200 Subject: [PATCH 16/16] prepare release 10.0.0 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index c63b79ae4..110a3a0a6 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "visyn_core", "description": "Core repository for datavisyn applications.", - "version": "9.2.3-SNAPSHOT", + "version": "10.0.0", "author": { "name": "datavisyn GmbH", "email": "contact@datavisyn.io", @@ -114,7 +114,7 @@ "react-plotly.js": "^2.5.1", "react-spring": "^9.7.1", "use-deep-compare-effect": "^1.8.0", - "visyn_scripts": "^8.0.0" + "visyn_scripts": "^9.0.0" }, "devDependencies": { "chromatic": "^6.19.9",