From da391f3691bb1536257b1d53662cf708a5ba3b72 Mon Sep 17 00:00:00 2001 From: Joshua McMichael Date: Tue, 22 Aug 2023 11:17:30 -0500 Subject: [PATCH 01/14] created yarn script to generate icon json data for input to rst gen --- client/package.json | 4 +- client/scripts/generate-icon-data.js | 63 ++ .../src/app/generated/civic.icons.data.json | 624 ++++++++++++++++++ client/yarn.lock | 85 ++- 4 files changed, 774 insertions(+), 2 deletions(-) create mode 100755 client/scripts/generate-icon-data.js create mode 100644 client/src/app/generated/civic.icons.data.json diff --git a/client/package.json b/client/package.json index 7909a433a..fbd09fe02 100644 --- a/client/package.json +++ b/client/package.json @@ -13,7 +13,8 @@ "generate-icon-ts": "svg-to-ts-constants", "generate-icons": "yarn run optimize-icon-svg && yarn run generate-icon-ts", "generate-apollo": "graphql-codegen", - "generate-apollo:start": "graphql-codegen --watch" + "generate-apollo:start": "graphql-codegen --watch", + "generate-icon-data": "scripts/generate-icon-data.js" }, "private": true, "resolutions": { @@ -57,6 +58,7 @@ "@graphql-codegen/typescript-apollo-client-helpers": "^2.2.6", "@graphql-codegen/typescript-operations": "^2.5.12", "@types/node": "^12.11.1", + "directory-tree": "^3.5.1", "graphql": "^16.7.1", "ngx-json-viewer": "^3.0.2", "prettier": "^2.5.1", diff --git a/client/scripts/generate-icon-data.js b/client/scripts/generate-icon-data.js new file mode 100755 index 000000000..ff582406b --- /dev/null +++ b/client/scripts/generate-icon-data.js @@ -0,0 +1,63 @@ +#!/usr/bin/env node +const directoryTree = require('directory-tree') +const path = require('path') +const fs = require('fs') + +const iconsDirectory = path.join(__dirname, '..', 'src', 'assets', 'icons') +const validSubdirectories = ['attribute', 'outline', 'twotone', 'fullcolor'] + +// Utility to remove redundant parent directory name from the filename +function removeRedundantName(type, filename) { + const pattern = + type === 'attribute' ? /-outline$/ : new RegExp(`-${type}$`, 'i') + return filename.replace(pattern, '') +} + +function generateIconObject(tree) { + if (!tree || !tree.children) return [] + + return tree.children + .filter((child) => validSubdirectories.includes(child.name)) + .flatMap((subdir) => { + return subdir.children.map((file) => { + const cleanName = removeRedundantName( + subdir.name, + path.basename(file.name, '.svg') + ) + return { + type: subdir.name, + name: cleanName, + alias: `${subdir.name}-${cleanName}`, + } + }) + }) +} + +const tree = directoryTree(iconsDirectory, { extensions: /\.svg$/ }) + +if (!tree) { + console.error( + `Error: The directory ${iconsDirectory} does not exist or could not be accessed.` + ) + process.exit(1) +} + +const icons = generateIconObject(tree) +const output = { + icons: icons, +} + +// Define the path to the output file +const outputPath = path.join( + __dirname, + '..', + 'src', + 'app', + 'generated', + 'civic.icons.data.json' +) + +// Write the JSON data to the file +fs.writeFileSync(outputPath, JSON.stringify(output, null, 2)) + +console.log(`Data written to ${outputPath}`) diff --git a/client/src/app/generated/civic.icons.data.json b/client/src/app/generated/civic.icons.data.json new file mode 100644 index 000000000..cc51911fe --- /dev/null +++ b/client/src/app/generated/civic.icons.data.json @@ -0,0 +1,624 @@ +{ + "icons": [ + { + "type": "attribute", + "name": "adverseresponse", + "alias": "attribute-adverseresponse" + }, + { + "type": "attribute", + "name": "benign", + "alias": "attribute-benign" + }, + { + "type": "attribute", + "name": "betteroutcome", + "alias": "attribute-betteroutcome" + }, + { + "type": "attribute", + "name": "combination", + "alias": "attribute-combination" + }, + { + "type": "attribute", + "name": "combined", + "alias": "attribute-combined" + }, + { + "type": "attribute", + "name": "commongermline", + "alias": "attribute-commongermline" + }, + { + "type": "attribute", + "name": "diagnostic", + "alias": "attribute-diagnostic" + }, + { + "type": "attribute", + "name": "doesnotsupport", + "alias": "attribute-doesnotsupport" + }, + { + "type": "attribute", + "name": "dominantnegative", + "alias": "attribute-dominantnegative" + }, + { + "type": "attribute", + "name": "functional", + "alias": "attribute-functional" + }, + { + "type": "attribute", + "name": "gainoffunction", + "alias": "attribute-gainoffunction" + }, + { + "type": "attribute", + "name": "levela", + "alias": "attribute-levela" + }, + { + "type": "attribute", + "name": "levelb", + "alias": "attribute-levelb" + }, + { + "type": "attribute", + "name": "levelc", + "alias": "attribute-levelc" + }, + { + "type": "attribute", + "name": "leveld", + "alias": "attribute-leveld" + }, + { + "type": "attribute", + "name": "levele", + "alias": "attribute-levele" + }, + { + "type": "attribute", + "name": "likelybenign", + "alias": "attribute-likelybenign" + }, + { + "type": "attribute", + "name": "likelyoncogenic", + "alias": "attribute-likelyoncogenic" + }, + { + "type": "attribute", + "name": "likelypathogenic", + "alias": "attribute-likelypathogenic" + }, + { + "type": "attribute", + "name": "lossoffunction", + "alias": "attribute-lossoffunction" + }, + { + "type": "attribute", + "name": "na", + "alias": "attribute-na" + }, + { + "type": "attribute", + "name": "negative", + "alias": "attribute-negative" + }, + { + "type": "attribute", + "name": "neomorphic", + "alias": "attribute-neomorphic" + }, + { + "type": "attribute", + "name": "oncogenic", + "alias": "attribute-oncogenic" + }, + { + "type": "attribute", + "name": "oncogenicity", + "alias": "attribute-oncogenicity" + }, + { + "type": "attribute", + "name": "oncogenicsignificance", + "alias": "attribute-oncogenicsignificance" + }, + { + "type": "attribute", + "name": "oncogenictype", + "alias": "attribute-oncogenictype" + }, + { + "type": "attribute", + "name": "pathogenic", + "alias": "attribute-pathogenic" + }, + { + "type": "attribute", + "name": "pooroutcome", + "alias": "attribute-pooroutcome" + }, + { + "type": "attribute", + "name": "positive", + "alias": "attribute-positive" + }, + { + "type": "attribute", + "name": "predictive", + "alias": "attribute-predictive" + }, + { + "type": "attribute", + "name": "predisposing", + "alias": "attribute-predisposing" + }, + { + "type": "attribute", + "name": "predisposition", + "alias": "attribute-predisposition" + }, + { + "type": "attribute", + "name": "prognostic", + "alias": "attribute-prognostic" + }, + { + "type": "attribute", + "name": "protectiveness", + "alias": "attribute-protectiveness" + }, + { + "type": "attribute", + "name": "raregermline", + "alias": "attribute-raregermline" + }, + { + "type": "attribute", + "name": "rating1", + "alias": "attribute-rating1" + }, + { + "type": "attribute", + "name": "rating2", + "alias": "attribute-rating2" + }, + { + "type": "attribute", + "name": "rating3", + "alias": "attribute-rating3" + }, + { + "type": "attribute", + "name": "rating4", + "alias": "attribute-rating4" + }, + { + "type": "attribute", + "name": "rating5", + "alias": "attribute-rating5" + }, + { + "type": "attribute", + "name": "reducedsensitivity", + "alias": "attribute-reducedsensitivity" + }, + { + "type": "attribute", + "name": "resistance", + "alias": "attribute-resistance" + }, + { + "type": "attribute", + "name": "sensitivityresponse", + "alias": "attribute-sensitivityresponse" + }, + { + "type": "attribute", + "name": "sequential", + "alias": "attribute-sequential" + }, + { + "type": "attribute", + "name": "significanceunknown", + "alias": "attribute-significanceunknown" + }, + { + "type": "attribute", + "name": "somatic", + "alias": "attribute-somatic" + }, + { + "type": "attribute", + "name": "substitutes", + "alias": "attribute-substitutes" + }, + { + "type": "attribute", + "name": "supports", + "alias": "attribute-supports" + }, + { + "type": "attribute", + "name": "unalteredfunction", + "alias": "attribute-unalteredfunction" + }, + { + "type": "attribute", + "name": "uncertainsignificance", + "alias": "attribute-uncertainsignificance" + }, + { + "type": "attribute", + "name": "unknown", + "alias": "attribute-unknown" + }, + { + "type": "fullcolor", + "name": "admin", + "alias": "fullcolor-admin" + }, + { + "type": "fullcolor", + "name": "assertion", + "alias": "fullcolor-assertion" + }, + { + "type": "fullcolor", + "name": "clinicaltrial", + "alias": "fullcolor-clinicaltrial" + }, + { + "type": "fullcolor", + "name": "comment", + "alias": "fullcolor-comment" + }, + { + "type": "fullcolor", + "name": "coordinatesystem", + "alias": "fullcolor-coordinatesystem" + }, + { + "type": "fullcolor", + "name": "curator", + "alias": "fullcolor-curator" + }, + { + "type": "fullcolor", + "name": "disease", + "alias": "fullcolor-disease" + }, + { + "type": "fullcolor", + "name": "editor", + "alias": "fullcolor-editor" + }, + { + "type": "fullcolor", + "name": "event", + "alias": "fullcolor-event" + }, + { + "type": "fullcolor", + "name": "evidence", + "alias": "fullcolor-evidence" + }, + { + "type": "fullcolor", + "name": "evidenceitem", + "alias": "fullcolor-evidenceitem" + }, + { + "type": "fullcolor", + "name": "flag", + "alias": "fullcolor-flag" + }, + { + "type": "fullcolor", + "name": "gene", + "alias": "fullcolor-gene" + }, + { + "type": "fullcolor", + "name": "molecularprofile", + "alias": "fullcolor-molecularprofile" + }, + { + "type": "fullcolor", + "name": "organization", + "alias": "fullcolor-organization" + }, + { + "type": "fullcolor", + "name": "phenotype", + "alias": "fullcolor-phenotype" + }, + { + "type": "fullcolor", + "name": "queue", + "alias": "fullcolor-queue" + }, + { + "type": "fullcolor", + "name": "revision", + "alias": "fullcolor-revision" + }, + { + "type": "fullcolor", + "name": "source", + "alias": "fullcolor-source" + }, + { + "type": "fullcolor", + "name": "therapy", + "alias": "fullcolor-therapy" + }, + { + "type": "fullcolor", + "name": "user", + "alias": "fullcolor-user" + }, + { + "type": "fullcolor", + "name": "variant", + "alias": "fullcolor-variant" + }, + { + "type": "fullcolor", + "name": "variantgroup", + "alias": "fullcolor-variantgroup" + }, + { + "type": "fullcolor", + "name": "varianttype", + "alias": "fullcolor-varianttype" + }, + { + "type": "outline", + "name": "admin", + "alias": "outline-admin" + }, + { + "type": "outline", + "name": "assertion", + "alias": "outline-assertion" + }, + { + "type": "outline", + "name": "clinicaltrial", + "alias": "outline-clinicaltrial" + }, + { + "type": "outline", + "name": "comment", + "alias": "outline-comment" + }, + { + "type": "outline", + "name": "coordinatesystem", + "alias": "outline-coordinatesystem" + }, + { + "type": "outline", + "name": "curator", + "alias": "outline-curator" + }, + { + "type": "outline", + "name": "disease", + "alias": "outline-disease" + }, + { + "type": "outline", + "name": "editor", + "alias": "outline-editor" + }, + { + "type": "outline", + "name": "event", + "alias": "outline-event" + }, + { + "type": "outline", + "name": "evidence", + "alias": "outline-evidence" + }, + { + "type": "outline", + "name": "evidenceitem", + "alias": "outline-evidenceitem" + }, + { + "type": "outline", + "name": "flag", + "alias": "outline-flag" + }, + { + "type": "outline", + "name": "gene", + "alias": "outline-gene" + }, + { + "type": "outline", + "name": "molecularprofile", + "alias": "outline-molecularprofile" + }, + { + "type": "outline", + "name": "organization", + "alias": "outline-organization" + }, + { + "type": "outline", + "name": "phenotype", + "alias": "outline-phenotype" + }, + { + "type": "outline", + "name": "queue", + "alias": "outline-queue" + }, + { + "type": "outline", + "name": "revision", + "alias": "outline-revision" + }, + { + "type": "outline", + "name": "source", + "alias": "outline-source" + }, + { + "type": "outline", + "name": "therapy", + "alias": "outline-therapy" + }, + { + "type": "outline", + "name": "user", + "alias": "outline-user" + }, + { + "type": "outline", + "name": "variant", + "alias": "outline-variant" + }, + { + "type": "outline", + "name": "variantgroup", + "alias": "outline-variantgroup" + }, + { + "type": "outline", + "name": "varianttype", + "alias": "outline-varianttype" + }, + { + "type": "twotone", + "name": "admin", + "alias": "twotone-admin" + }, + { + "type": "twotone", + "name": "assertion", + "alias": "twotone-assertion" + }, + { + "type": "twotone", + "name": "clinicaltrial", + "alias": "twotone-clinicaltrial" + }, + { + "type": "twotone", + "name": "comment", + "alias": "twotone-comment" + }, + { + "type": "twotone", + "name": "coordinatesystem", + "alias": "twotone-coordinatesystem" + }, + { + "type": "twotone", + "name": "curator", + "alias": "twotone-curator" + }, + { + "type": "twotone", + "name": "disease", + "alias": "twotone-disease" + }, + { + "type": "twotone", + "name": "editor", + "alias": "twotone-editor" + }, + { + "type": "twotone", + "name": "event", + "alias": "twotone-event" + }, + { + "type": "twotone", + "name": "evidence", + "alias": "twotone-evidence" + }, + { + "type": "twotone", + "name": "evidenceitem", + "alias": "twotone-evidenceitem" + }, + { + "type": "twotone", + "name": "flag", + "alias": "twotone-flag" + }, + { + "type": "twotone", + "name": "gene", + "alias": "twotone-gene" + }, + { + "type": "twotone", + "name": "molecularprofile", + "alias": "twotone-molecularprofile" + }, + { + "type": "twotone", + "name": "organization", + "alias": "twotone-organization" + }, + { + "type": "twotone", + "name": "phenotype", + "alias": "twotone-phenotype" + }, + { + "type": "twotone", + "name": "queue", + "alias": "twotone-queue" + }, + { + "type": "twotone", + "name": "revision", + "alias": "twotone-revision" + }, + { + "type": "twotone", + "name": "source", + "alias": "twotone-source" + }, + { + "type": "twotone", + "name": "therapy", + "alias": "twotone-therapy" + }, + { + "type": "twotone", + "name": "user", + "alias": "twotone-user" + }, + { + "type": "twotone", + "name": "variant", + "alias": "twotone-variant" + }, + { + "type": "twotone", + "name": "variantgroup", + "alias": "twotone-variantgroup" + }, + { + "type": "twotone", + "name": "varianttype", + "alias": "twotone-varianttype" + } + ] +} \ No newline at end of file diff --git a/client/yarn.lock b/client/yarn.lock index 5a673a28b..c35ab188a 100644 --- a/client/yarn.lock +++ b/client/yarn.lock @@ -3297,6 +3297,16 @@ argparse@^2.0.1: resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== +array-back@^3.0.1, array-back@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/array-back/-/array-back-3.1.0.tgz#b8859d7a508871c9a7b2cf42f99428f65e96bfb0" + integrity sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q== + +array-back@^4.0.1, array-back@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/array-back/-/array-back-4.0.2.tgz#8004e999a6274586beeb27342168652fdb89fa1e" + integrity sha512-NbdMezxqf94cnNfWLL7V/im0Ub+Anbb0IoZhvzie8+4HJ4nMQuzHuy49FkGYCJK2yAloZ3meiB6AVMClbrI1vg== + array-flatten@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" @@ -3722,7 +3732,7 @@ caseless@~0.12.0: resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" integrity sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw== -chalk@^2.0.0, chalk@^2.3.0: +chalk@^2.0.0, chalk@^2.3.0, chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== @@ -3935,6 +3945,26 @@ combined-stream@^1.0.8: dependencies: delayed-stream "~1.0.0" +command-line-args@^5.2.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/command-line-args/-/command-line-args-5.2.1.tgz#c44c32e437a57d7c51157696893c5909e9cec42e" + integrity sha512-H4UfQhZyakIjC74I9d34fGYDwk3XpSr17QhEd0Q3I9Xq1CETHo4Hcuo87WyWHpAF1aSLjLRf5lD9ZGX2qStUvg== + dependencies: + array-back "^3.1.0" + find-replace "^3.0.0" + lodash.camelcase "^4.3.0" + typical "^4.0.0" + +command-line-usage@^6.1.1: + version "6.1.3" + resolved "https://registry.yarnpkg.com/command-line-usage/-/command-line-usage-6.1.3.tgz#428fa5acde6a838779dfa30e44686f4b6761d957" + integrity sha512-sH5ZSPr+7UStsloltmDh7Ce5fb8XPlHyoPzTpyyMuYCtervL65+ubVZ6Q61cFtFl62UyJlc8/JwERRbAFPUqgw== + dependencies: + array-back "^4.0.2" + chalk "^2.4.2" + table-layout "^1.0.2" + typical "^5.2.0" + commander@^2.12.1, commander@^2.20.0: version "2.20.3" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" @@ -4268,6 +4298,11 @@ decamelize@^1.2.0: resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" integrity sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA== +deep-extend@~0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" + integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== + default-gateway@^6.0.3: version "6.0.3" resolved "https://registry.yarnpkg.com/default-gateway/-/default-gateway-6.0.3.tgz#819494c888053bdb743edbf343d6cdf7f2943a71" @@ -4339,6 +4374,14 @@ dir-glob@^3.0.1: dependencies: path-type "^4.0.0" +directory-tree@^3.5.1: + version "3.5.1" + resolved "https://registry.yarnpkg.com/directory-tree/-/directory-tree-3.5.1.tgz#004d599c2478d752e7906e3a922b09c7ee2f03e2" + integrity sha512-HqjZ49fDzUnKYUhHxVw9eKBqbQ+lL0v4kSBInlDlaktmLtGoV9tC54a6A0ZfYeIrkMHWTE6MwwmUXP477+UEKQ== + dependencies: + command-line-args "^5.2.0" + command-line-usage "^6.1.1" + dns-equal@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/dns-equal/-/dns-equal-1.0.0.tgz#b39e7f1da6eb0a75ba9c17324b34753c47e0654d" @@ -4817,6 +4860,13 @@ find-cache-dir@^3.3.2: make-dir "^3.0.2" pkg-dir "^4.1.0" +find-replace@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/find-replace/-/find-replace-3.0.0.tgz#3e7e23d3b05167a76f770c9fbd5258b0def68c38" + integrity sha512-6Tb2myMioCAgv5kfvP5/PkZZ/ntTpVK39fHY7WkWBgvbeE+VHd/tZuZ4mrC+bxh4cfOZeYKVPaJIZtZXV7GNCQ== + dependencies: + array-back "^3.0.1" + find-up@^4.0.0, find-up@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" @@ -7152,6 +7202,11 @@ readdirp@~3.6.0: dependencies: picomatch "^2.2.1" +reduce-flatten@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/reduce-flatten/-/reduce-flatten-2.0.0.tgz#734fd84e65f375d7ca4465c69798c25c9d10ae27" + integrity sha512-EJ4UNY/U1t2P/2k6oqotuX2Cc3T6nxJwsM0N0asT7dhrtH1ltUxDn4NalSYmPE2rCkVpcf/X6R0wDwcFpzhd4w== + reflect-metadata@^0.1.2: version "0.1.13" resolved "https://registry.yarnpkg.com/reflect-metadata/-/reflect-metadata-0.1.13.tgz#67ae3ca57c972a2aa1642b10fe363fe32d49dc08" @@ -8014,6 +8069,16 @@ symbol-observable@4.0.0, symbol-observable@^4.0.0: resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-4.0.0.tgz#5b425f192279e87f2f9b937ac8540d1984b39205" integrity sha512-b19dMThMV4HVFynSAM1++gBHAbk2Tc/osgLIBZMKsyqh34jb2e8Os7T6ZW/Bt3pJFdBTd2JwAnAAEQV7rSNvcQ== +table-layout@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/table-layout/-/table-layout-1.0.2.tgz#c4038a1853b0136d63365a734b6931cf4fad4a04" + integrity sha512-qd/R7n5rQTRFi+Zf2sk5XVVd9UQl6ZkduPFC3S7WEGJAmetDTjY3qPN50eSKzwuzEyQKy5TN2TiZdkIjos2L6A== + dependencies: + array-back "^4.0.1" + deep-extend "~0.6.0" + typical "^5.2.0" + wordwrapjs "^4.0.0" + tapable@^2.1.1, tapable@^2.2.0: version "2.2.1" resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0" @@ -8246,6 +8311,16 @@ typescript@^4.9.4: resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.4.tgz#a2a3d2756c079abda241d75f149df9d561091e78" integrity sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg== +typical@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/typical/-/typical-4.0.0.tgz#cbeaff3b9d7ae1e2bbfaf5a4e6f11eccfde94fc4" + integrity sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw== + +typical@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/typical/-/typical-5.2.0.tgz#4daaac4f2b5315460804f0acf6cb69c52bb93066" + integrity sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg== + ua-parser-js@^0.7.30: version "0.7.33" resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.33.tgz#1d04acb4ccef9293df6f70f2c3d22f3030d8b532" @@ -8660,6 +8735,14 @@ wildcard@^2.0.0: resolved "https://registry.yarnpkg.com/wildcard/-/wildcard-2.0.0.tgz#a77d20e5200c6faaac979e4b3aadc7b3dd7f8fec" integrity sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw== +wordwrapjs@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/wordwrapjs/-/wordwrapjs-4.0.1.tgz#d9790bccfb110a0fc7836b5ebce0937b37a8b98f" + integrity sha512-kKlNACbvHrkpIw6oPeYDSmdCTu2hdMHoyXLTcUKala++lx5Y+wjJ/e474Jqv5abnVmwxw08DiTuHmw69lJGksA== + dependencies: + reduce-flatten "^2.0.0" + typical "^5.2.0" + "wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" From a8c7474c7edcd71fef01d39d1d4c08af85f6a3ac Mon Sep 17 00:00:00 2001 From: Joshua McMichael Date: Tue, 22 Aug 2023 12:43:35 -0500 Subject: [PATCH 02/14] created script to generate rst aliases for icons --- client/package.json | 4 +- client/scripts/generate-icon-data.js | 1 + client/scripts/generate-icon-rst.js | 48 + .../src/app/generated/civic-docs.aliases.rst | 995 ++++++++++++++++++ .../src/app/generated/civic.icons.data.json | 124 +++ client/yarn.lock | 5 + 6 files changed, 1176 insertions(+), 1 deletion(-) create mode 100755 client/scripts/generate-icon-rst.js create mode 100644 client/src/app/generated/civic-docs.aliases.rst diff --git a/client/package.json b/client/package.json index fbd09fe02..3596f2049 100644 --- a/client/package.json +++ b/client/package.json @@ -14,7 +14,8 @@ "generate-icons": "yarn run optimize-icon-svg && yarn run generate-icon-ts", "generate-apollo": "graphql-codegen", "generate-apollo:start": "graphql-codegen --watch", - "generate-icon-data": "scripts/generate-icon-data.js" + "generate-icon-data": "scripts/generate-icon-data.js", + "generate-icon-rst": "scripts/generate-icon-rst.js" }, "private": true, "resolutions": { @@ -60,6 +61,7 @@ "@types/node": "^12.11.1", "directory-tree": "^3.5.1", "graphql": "^16.7.1", + "mustache": "^4.2.0", "ngx-json-viewer": "^3.0.2", "prettier": "^2.5.1", "svg-to-ts": "^9.0.0", diff --git a/client/scripts/generate-icon-data.js b/client/scripts/generate-icon-data.js index ff582406b..ce07a2dc3 100755 --- a/client/scripts/generate-icon-data.js +++ b/client/scripts/generate-icon-data.js @@ -26,6 +26,7 @@ function generateIconObject(tree) { ) return { type: subdir.name, + filepath: `${subdir.name}/${file.name}`, name: cleanName, alias: `${subdir.name}-${cleanName}`, } diff --git a/client/scripts/generate-icon-rst.js b/client/scripts/generate-icon-rst.js new file mode 100755 index 000000000..0ab59f27f --- /dev/null +++ b/client/scripts/generate-icon-rst.js @@ -0,0 +1,48 @@ +#!/usr/bin/env node +const fs = require('fs') +const path = require('path') +const mustache = require('mustache') + +// Load the generated icon data JSON +const jsonDataPath = path.join( + __dirname, + '..', + 'src', + 'app', + 'generated', + 'civic.icons.data.json' +) +const iconData = JSON.parse(fs.readFileSync(jsonDataPath, 'utf-8')) + +// Define the mustache template +const template = ` +.. |{{alias}}| image:: /images/icons/{{{filepath}}} + :class: 'cvc-icon' +.. |{{alias}}-sm| image:: /images/icons/{{{filepath}}} + :class: 'cvc-icon-sm' +.. |{{alias}}-lg| image:: /images/icons/{{{filepath}}} + :class: 'cvc-icon-lg' +` + +// Render the RST using mustache +const renderedRst = + '..\n ' + + 'GENERATED BY CiVIC CLIENT DEV SCRIPT, DO NOT EDIT\n ' + + '(unless you know what you are doing)\n ' + + 'Produced by `generate-icon-rst` script in civic-v2/client/scripts\n' + + iconData.icons.map((icon) => mustache.render(template, icon)).join('\n') + +// Define the path to the output RST file +const outputPath = path.join( + __dirname, + '..', + 'src', + 'app', + 'generated', + 'civic-docs.aliases.rst' +) + +// Write the rendered RST to the file +fs.writeFileSync(outputPath, renderedRst) + +console.log(`RST written to ${outputPath}`) diff --git a/client/src/app/generated/civic-docs.aliases.rst b/client/src/app/generated/civic-docs.aliases.rst new file mode 100644 index 000000000..1b7ffccef --- /dev/null +++ b/client/src/app/generated/civic-docs.aliases.rst @@ -0,0 +1,995 @@ +.. + GENERATED BY CiVIC v2 CLIENT SCRIPT, DO NOT EDIT + (unless you know what you are doing) + Produced by `generate-icon-rst` script in civic-v2/client project + +.. |attribute-adverseresponse| image:: /images/icons/attribute/adverseresponse-outline.svg + :class: 'cvc-icon' +.. |attribute-adverseresponse-sm| image:: /images/icons/attribute/adverseresponse-outline.svg + :class: 'cvc-icon-sm' +.. |attribute-adverseresponse-lg| image:: /images/icons/attribute/adverseresponse-outline.svg + :class: 'cvc-icon-lg' + + +.. |attribute-benign| image:: /images/icons/attribute/benign-outline.svg + :class: 'cvc-icon' +.. |attribute-benign-sm| image:: /images/icons/attribute/benign-outline.svg + :class: 'cvc-icon-sm' +.. |attribute-benign-lg| image:: /images/icons/attribute/benign-outline.svg + :class: 'cvc-icon-lg' + + +.. |attribute-betteroutcome| image:: /images/icons/attribute/betteroutcome-outline.svg + :class: 'cvc-icon' +.. |attribute-betteroutcome-sm| image:: /images/icons/attribute/betteroutcome-outline.svg + :class: 'cvc-icon-sm' +.. |attribute-betteroutcome-lg| image:: /images/icons/attribute/betteroutcome-outline.svg + :class: 'cvc-icon-lg' + + +.. |attribute-combination| image:: /images/icons/attribute/combination-outline.svg + :class: 'cvc-icon' +.. |attribute-combination-sm| image:: /images/icons/attribute/combination-outline.svg + :class: 'cvc-icon-sm' +.. |attribute-combination-lg| image:: /images/icons/attribute/combination-outline.svg + :class: 'cvc-icon-lg' + + +.. |attribute-combined| image:: /images/icons/attribute/combined-outline.svg + :class: 'cvc-icon' +.. |attribute-combined-sm| image:: /images/icons/attribute/combined-outline.svg + :class: 'cvc-icon-sm' +.. |attribute-combined-lg| image:: /images/icons/attribute/combined-outline.svg + :class: 'cvc-icon-lg' + + +.. |attribute-commongermline| image:: /images/icons/attribute/commongermline-outline.svg + :class: 'cvc-icon' +.. |attribute-commongermline-sm| image:: /images/icons/attribute/commongermline-outline.svg + :class: 'cvc-icon-sm' +.. |attribute-commongermline-lg| image:: /images/icons/attribute/commongermline-outline.svg + :class: 'cvc-icon-lg' + + +.. |attribute-diagnostic| image:: /images/icons/attribute/diagnostic-outline.svg + :class: 'cvc-icon' +.. |attribute-diagnostic-sm| image:: /images/icons/attribute/diagnostic-outline.svg + :class: 'cvc-icon-sm' +.. |attribute-diagnostic-lg| image:: /images/icons/attribute/diagnostic-outline.svg + :class: 'cvc-icon-lg' + + +.. |attribute-doesnotsupport| image:: /images/icons/attribute/doesnotsupport-outline.svg + :class: 'cvc-icon' +.. |attribute-doesnotsupport-sm| image:: /images/icons/attribute/doesnotsupport-outline.svg + :class: 'cvc-icon-sm' +.. |attribute-doesnotsupport-lg| image:: /images/icons/attribute/doesnotsupport-outline.svg + :class: 'cvc-icon-lg' + + +.. |attribute-dominantnegative| image:: /images/icons/attribute/dominantnegative-outline.svg + :class: 'cvc-icon' +.. |attribute-dominantnegative-sm| image:: /images/icons/attribute/dominantnegative-outline.svg + :class: 'cvc-icon-sm' +.. |attribute-dominantnegative-lg| image:: /images/icons/attribute/dominantnegative-outline.svg + :class: 'cvc-icon-lg' + + +.. |attribute-functional| image:: /images/icons/attribute/functional-outline.svg + :class: 'cvc-icon' +.. |attribute-functional-sm| image:: /images/icons/attribute/functional-outline.svg + :class: 'cvc-icon-sm' +.. |attribute-functional-lg| image:: /images/icons/attribute/functional-outline.svg + :class: 'cvc-icon-lg' + + +.. |attribute-gainoffunction| image:: /images/icons/attribute/gainoffunction-outline.svg + :class: 'cvc-icon' +.. |attribute-gainoffunction-sm| image:: /images/icons/attribute/gainoffunction-outline.svg + :class: 'cvc-icon-sm' +.. |attribute-gainoffunction-lg| image:: /images/icons/attribute/gainoffunction-outline.svg + :class: 'cvc-icon-lg' + + +.. |attribute-levela| image:: /images/icons/attribute/levela-outline.svg + :class: 'cvc-icon' +.. |attribute-levela-sm| image:: /images/icons/attribute/levela-outline.svg + :class: 'cvc-icon-sm' +.. |attribute-levela-lg| image:: /images/icons/attribute/levela-outline.svg + :class: 'cvc-icon-lg' + + +.. |attribute-levelb| image:: /images/icons/attribute/levelb-outline.svg + :class: 'cvc-icon' +.. |attribute-levelb-sm| image:: /images/icons/attribute/levelb-outline.svg + :class: 'cvc-icon-sm' +.. |attribute-levelb-lg| image:: /images/icons/attribute/levelb-outline.svg + :class: 'cvc-icon-lg' + + +.. |attribute-levelc| image:: /images/icons/attribute/levelc-outline.svg + :class: 'cvc-icon' +.. |attribute-levelc-sm| image:: /images/icons/attribute/levelc-outline.svg + :class: 'cvc-icon-sm' +.. |attribute-levelc-lg| image:: /images/icons/attribute/levelc-outline.svg + :class: 'cvc-icon-lg' + + +.. |attribute-leveld| image:: /images/icons/attribute/leveld-outline.svg + :class: 'cvc-icon' +.. |attribute-leveld-sm| image:: /images/icons/attribute/leveld-outline.svg + :class: 'cvc-icon-sm' +.. |attribute-leveld-lg| image:: /images/icons/attribute/leveld-outline.svg + :class: 'cvc-icon-lg' + + +.. |attribute-levele| image:: /images/icons/attribute/levele-outline.svg + :class: 'cvc-icon' +.. |attribute-levele-sm| image:: /images/icons/attribute/levele-outline.svg + :class: 'cvc-icon-sm' +.. |attribute-levele-lg| image:: /images/icons/attribute/levele-outline.svg + :class: 'cvc-icon-lg' + + +.. |attribute-likelybenign| image:: /images/icons/attribute/likelybenign-outline.svg + :class: 'cvc-icon' +.. |attribute-likelybenign-sm| image:: /images/icons/attribute/likelybenign-outline.svg + :class: 'cvc-icon-sm' +.. |attribute-likelybenign-lg| image:: /images/icons/attribute/likelybenign-outline.svg + :class: 'cvc-icon-lg' + + +.. |attribute-likelyoncogenic| image:: /images/icons/attribute/likelyoncogenic-outline.svg + :class: 'cvc-icon' +.. |attribute-likelyoncogenic-sm| image:: /images/icons/attribute/likelyoncogenic-outline.svg + :class: 'cvc-icon-sm' +.. |attribute-likelyoncogenic-lg| image:: /images/icons/attribute/likelyoncogenic-outline.svg + :class: 'cvc-icon-lg' + + +.. |attribute-likelypathogenic| image:: /images/icons/attribute/likelypathogenic-outline.svg + :class: 'cvc-icon' +.. |attribute-likelypathogenic-sm| image:: /images/icons/attribute/likelypathogenic-outline.svg + :class: 'cvc-icon-sm' +.. |attribute-likelypathogenic-lg| image:: /images/icons/attribute/likelypathogenic-outline.svg + :class: 'cvc-icon-lg' + + +.. |attribute-lossoffunction| image:: /images/icons/attribute/lossoffunction-outline.svg + :class: 'cvc-icon' +.. |attribute-lossoffunction-sm| image:: /images/icons/attribute/lossoffunction-outline.svg + :class: 'cvc-icon-sm' +.. |attribute-lossoffunction-lg| image:: /images/icons/attribute/lossoffunction-outline.svg + :class: 'cvc-icon-lg' + + +.. |attribute-na| image:: /images/icons/attribute/na-outline.svg + :class: 'cvc-icon' +.. |attribute-na-sm| image:: /images/icons/attribute/na-outline.svg + :class: 'cvc-icon-sm' +.. |attribute-na-lg| image:: /images/icons/attribute/na-outline.svg + :class: 'cvc-icon-lg' + + +.. |attribute-negative| image:: /images/icons/attribute/negative-outline.svg + :class: 'cvc-icon' +.. |attribute-negative-sm| image:: /images/icons/attribute/negative-outline.svg + :class: 'cvc-icon-sm' +.. |attribute-negative-lg| image:: /images/icons/attribute/negative-outline.svg + :class: 'cvc-icon-lg' + + +.. |attribute-neomorphic| image:: /images/icons/attribute/neomorphic-outline.svg + :class: 'cvc-icon' +.. |attribute-neomorphic-sm| image:: /images/icons/attribute/neomorphic-outline.svg + :class: 'cvc-icon-sm' +.. |attribute-neomorphic-lg| image:: /images/icons/attribute/neomorphic-outline.svg + :class: 'cvc-icon-lg' + + +.. |attribute-oncogenic| image:: /images/icons/attribute/oncogenic-outline.svg + :class: 'cvc-icon' +.. |attribute-oncogenic-sm| image:: /images/icons/attribute/oncogenic-outline.svg + :class: 'cvc-icon-sm' +.. |attribute-oncogenic-lg| image:: /images/icons/attribute/oncogenic-outline.svg + :class: 'cvc-icon-lg' + + +.. |attribute-oncogenicity| image:: /images/icons/attribute/oncogenicity-outline.svg + :class: 'cvc-icon' +.. |attribute-oncogenicity-sm| image:: /images/icons/attribute/oncogenicity-outline.svg + :class: 'cvc-icon-sm' +.. |attribute-oncogenicity-lg| image:: /images/icons/attribute/oncogenicity-outline.svg + :class: 'cvc-icon-lg' + + +.. |attribute-oncogenicsignificance| image:: /images/icons/attribute/oncogenicsignificance-outline.svg + :class: 'cvc-icon' +.. |attribute-oncogenicsignificance-sm| image:: /images/icons/attribute/oncogenicsignificance-outline.svg + :class: 'cvc-icon-sm' +.. |attribute-oncogenicsignificance-lg| image:: /images/icons/attribute/oncogenicsignificance-outline.svg + :class: 'cvc-icon-lg' + + +.. |attribute-oncogenictype| image:: /images/icons/attribute/oncogenictype-outline.svg + :class: 'cvc-icon' +.. |attribute-oncogenictype-sm| image:: /images/icons/attribute/oncogenictype-outline.svg + :class: 'cvc-icon-sm' +.. |attribute-oncogenictype-lg| image:: /images/icons/attribute/oncogenictype-outline.svg + :class: 'cvc-icon-lg' + + +.. |attribute-pathogenic| image:: /images/icons/attribute/pathogenic-outline.svg + :class: 'cvc-icon' +.. |attribute-pathogenic-sm| image:: /images/icons/attribute/pathogenic-outline.svg + :class: 'cvc-icon-sm' +.. |attribute-pathogenic-lg| image:: /images/icons/attribute/pathogenic-outline.svg + :class: 'cvc-icon-lg' + + +.. |attribute-pooroutcome| image:: /images/icons/attribute/pooroutcome-outline.svg + :class: 'cvc-icon' +.. |attribute-pooroutcome-sm| image:: /images/icons/attribute/pooroutcome-outline.svg + :class: 'cvc-icon-sm' +.. |attribute-pooroutcome-lg| image:: /images/icons/attribute/pooroutcome-outline.svg + :class: 'cvc-icon-lg' + + +.. |attribute-positive| image:: /images/icons/attribute/positive-outline.svg + :class: 'cvc-icon' +.. |attribute-positive-sm| image:: /images/icons/attribute/positive-outline.svg + :class: 'cvc-icon-sm' +.. |attribute-positive-lg| image:: /images/icons/attribute/positive-outline.svg + :class: 'cvc-icon-lg' + + +.. |attribute-predictive| image:: /images/icons/attribute/predictive-outline.svg + :class: 'cvc-icon' +.. |attribute-predictive-sm| image:: /images/icons/attribute/predictive-outline.svg + :class: 'cvc-icon-sm' +.. |attribute-predictive-lg| image:: /images/icons/attribute/predictive-outline.svg + :class: 'cvc-icon-lg' + + +.. |attribute-predisposing| image:: /images/icons/attribute/predisposing-outline.svg + :class: 'cvc-icon' +.. |attribute-predisposing-sm| image:: /images/icons/attribute/predisposing-outline.svg + :class: 'cvc-icon-sm' +.. |attribute-predisposing-lg| image:: /images/icons/attribute/predisposing-outline.svg + :class: 'cvc-icon-lg' + + +.. |attribute-predisposition| image:: /images/icons/attribute/predisposition-outline.svg + :class: 'cvc-icon' +.. |attribute-predisposition-sm| image:: /images/icons/attribute/predisposition-outline.svg + :class: 'cvc-icon-sm' +.. |attribute-predisposition-lg| image:: /images/icons/attribute/predisposition-outline.svg + :class: 'cvc-icon-lg' + + +.. |attribute-prognostic| image:: /images/icons/attribute/prognostic-outline.svg + :class: 'cvc-icon' +.. |attribute-prognostic-sm| image:: /images/icons/attribute/prognostic-outline.svg + :class: 'cvc-icon-sm' +.. |attribute-prognostic-lg| image:: /images/icons/attribute/prognostic-outline.svg + :class: 'cvc-icon-lg' + + +.. |attribute-protectiveness| image:: /images/icons/attribute/protectiveness-outline.svg + :class: 'cvc-icon' +.. |attribute-protectiveness-sm| image:: /images/icons/attribute/protectiveness-outline.svg + :class: 'cvc-icon-sm' +.. |attribute-protectiveness-lg| image:: /images/icons/attribute/protectiveness-outline.svg + :class: 'cvc-icon-lg' + + +.. |attribute-raregermline| image:: /images/icons/attribute/raregermline-outline.svg + :class: 'cvc-icon' +.. |attribute-raregermline-sm| image:: /images/icons/attribute/raregermline-outline.svg + :class: 'cvc-icon-sm' +.. |attribute-raregermline-lg| image:: /images/icons/attribute/raregermline-outline.svg + :class: 'cvc-icon-lg' + + +.. |attribute-rating1| image:: /images/icons/attribute/rating1-outline.svg + :class: 'cvc-icon' +.. |attribute-rating1-sm| image:: /images/icons/attribute/rating1-outline.svg + :class: 'cvc-icon-sm' +.. |attribute-rating1-lg| image:: /images/icons/attribute/rating1-outline.svg + :class: 'cvc-icon-lg' + + +.. |attribute-rating2| image:: /images/icons/attribute/rating2-outline.svg + :class: 'cvc-icon' +.. |attribute-rating2-sm| image:: /images/icons/attribute/rating2-outline.svg + :class: 'cvc-icon-sm' +.. |attribute-rating2-lg| image:: /images/icons/attribute/rating2-outline.svg + :class: 'cvc-icon-lg' + + +.. |attribute-rating3| image:: /images/icons/attribute/rating3-outline.svg + :class: 'cvc-icon' +.. |attribute-rating3-sm| image:: /images/icons/attribute/rating3-outline.svg + :class: 'cvc-icon-sm' +.. |attribute-rating3-lg| image:: /images/icons/attribute/rating3-outline.svg + :class: 'cvc-icon-lg' + + +.. |attribute-rating4| image:: /images/icons/attribute/rating4-outline.svg + :class: 'cvc-icon' +.. |attribute-rating4-sm| image:: /images/icons/attribute/rating4-outline.svg + :class: 'cvc-icon-sm' +.. |attribute-rating4-lg| image:: /images/icons/attribute/rating4-outline.svg + :class: 'cvc-icon-lg' + + +.. |attribute-rating5| image:: /images/icons/attribute/rating5-outline.svg + :class: 'cvc-icon' +.. |attribute-rating5-sm| image:: /images/icons/attribute/rating5-outline.svg + :class: 'cvc-icon-sm' +.. |attribute-rating5-lg| image:: /images/icons/attribute/rating5-outline.svg + :class: 'cvc-icon-lg' + + +.. |attribute-reducedsensitivity| image:: /images/icons/attribute/reducedsensitivity-outline.svg + :class: 'cvc-icon' +.. |attribute-reducedsensitivity-sm| image:: /images/icons/attribute/reducedsensitivity-outline.svg + :class: 'cvc-icon-sm' +.. |attribute-reducedsensitivity-lg| image:: /images/icons/attribute/reducedsensitivity-outline.svg + :class: 'cvc-icon-lg' + + +.. |attribute-resistance| image:: /images/icons/attribute/resistance-outline.svg + :class: 'cvc-icon' +.. |attribute-resistance-sm| image:: /images/icons/attribute/resistance-outline.svg + :class: 'cvc-icon-sm' +.. |attribute-resistance-lg| image:: /images/icons/attribute/resistance-outline.svg + :class: 'cvc-icon-lg' + + +.. |attribute-sensitivityresponse| image:: /images/icons/attribute/sensitivityresponse-outline.svg + :class: 'cvc-icon' +.. |attribute-sensitivityresponse-sm| image:: /images/icons/attribute/sensitivityresponse-outline.svg + :class: 'cvc-icon-sm' +.. |attribute-sensitivityresponse-lg| image:: /images/icons/attribute/sensitivityresponse-outline.svg + :class: 'cvc-icon-lg' + + +.. |attribute-sequential| image:: /images/icons/attribute/sequential-outline.svg + :class: 'cvc-icon' +.. |attribute-sequential-sm| image:: /images/icons/attribute/sequential-outline.svg + :class: 'cvc-icon-sm' +.. |attribute-sequential-lg| image:: /images/icons/attribute/sequential-outline.svg + :class: 'cvc-icon-lg' + + +.. |attribute-significanceunknown| image:: /images/icons/attribute/significanceunknown-outline.svg + :class: 'cvc-icon' +.. |attribute-significanceunknown-sm| image:: /images/icons/attribute/significanceunknown-outline.svg + :class: 'cvc-icon-sm' +.. |attribute-significanceunknown-lg| image:: /images/icons/attribute/significanceunknown-outline.svg + :class: 'cvc-icon-lg' + + +.. |attribute-somatic| image:: /images/icons/attribute/somatic-outline.svg + :class: 'cvc-icon' +.. |attribute-somatic-sm| image:: /images/icons/attribute/somatic-outline.svg + :class: 'cvc-icon-sm' +.. |attribute-somatic-lg| image:: /images/icons/attribute/somatic-outline.svg + :class: 'cvc-icon-lg' + + +.. |attribute-substitutes| image:: /images/icons/attribute/substitutes-outline.svg + :class: 'cvc-icon' +.. |attribute-substitutes-sm| image:: /images/icons/attribute/substitutes-outline.svg + :class: 'cvc-icon-sm' +.. |attribute-substitutes-lg| image:: /images/icons/attribute/substitutes-outline.svg + :class: 'cvc-icon-lg' + + +.. |attribute-supports| image:: /images/icons/attribute/supports-outline.svg + :class: 'cvc-icon' +.. |attribute-supports-sm| image:: /images/icons/attribute/supports-outline.svg + :class: 'cvc-icon-sm' +.. |attribute-supports-lg| image:: /images/icons/attribute/supports-outline.svg + :class: 'cvc-icon-lg' + + +.. |attribute-unalteredfunction| image:: /images/icons/attribute/unalteredfunction-outline.svg + :class: 'cvc-icon' +.. |attribute-unalteredfunction-sm| image:: /images/icons/attribute/unalteredfunction-outline.svg + :class: 'cvc-icon-sm' +.. |attribute-unalteredfunction-lg| image:: /images/icons/attribute/unalteredfunction-outline.svg + :class: 'cvc-icon-lg' + + +.. |attribute-uncertainsignificance| image:: /images/icons/attribute/uncertainsignificance-outline.svg + :class: 'cvc-icon' +.. |attribute-uncertainsignificance-sm| image:: /images/icons/attribute/uncertainsignificance-outline.svg + :class: 'cvc-icon-sm' +.. |attribute-uncertainsignificance-lg| image:: /images/icons/attribute/uncertainsignificance-outline.svg + :class: 'cvc-icon-lg' + + +.. |attribute-unknown| image:: /images/icons/attribute/unknown-outline.svg + :class: 'cvc-icon' +.. |attribute-unknown-sm| image:: /images/icons/attribute/unknown-outline.svg + :class: 'cvc-icon-sm' +.. |attribute-unknown-lg| image:: /images/icons/attribute/unknown-outline.svg + :class: 'cvc-icon-lg' + + +.. |fullcolor-admin| image:: /images/icons/fullcolor/admin-fullcolor.svg + :class: 'cvc-icon' +.. |fullcolor-admin-sm| image:: /images/icons/fullcolor/admin-fullcolor.svg + :class: 'cvc-icon-sm' +.. |fullcolor-admin-lg| image:: /images/icons/fullcolor/admin-fullcolor.svg + :class: 'cvc-icon-lg' + + +.. |fullcolor-assertion| image:: /images/icons/fullcolor/assertion-fullcolor.svg + :class: 'cvc-icon' +.. |fullcolor-assertion-sm| image:: /images/icons/fullcolor/assertion-fullcolor.svg + :class: 'cvc-icon-sm' +.. |fullcolor-assertion-lg| image:: /images/icons/fullcolor/assertion-fullcolor.svg + :class: 'cvc-icon-lg' + + +.. |fullcolor-clinicaltrial| image:: /images/icons/fullcolor/clinicaltrial-fullcolor.svg + :class: 'cvc-icon' +.. |fullcolor-clinicaltrial-sm| image:: /images/icons/fullcolor/clinicaltrial-fullcolor.svg + :class: 'cvc-icon-sm' +.. |fullcolor-clinicaltrial-lg| image:: /images/icons/fullcolor/clinicaltrial-fullcolor.svg + :class: 'cvc-icon-lg' + + +.. |fullcolor-comment| image:: /images/icons/fullcolor/comment-fullcolor.svg + :class: 'cvc-icon' +.. |fullcolor-comment-sm| image:: /images/icons/fullcolor/comment-fullcolor.svg + :class: 'cvc-icon-sm' +.. |fullcolor-comment-lg| image:: /images/icons/fullcolor/comment-fullcolor.svg + :class: 'cvc-icon-lg' + + +.. |fullcolor-coordinatesystem| image:: /images/icons/fullcolor/coordinatesystem-fullcolor.svg + :class: 'cvc-icon' +.. |fullcolor-coordinatesystem-sm| image:: /images/icons/fullcolor/coordinatesystem-fullcolor.svg + :class: 'cvc-icon-sm' +.. |fullcolor-coordinatesystem-lg| image:: /images/icons/fullcolor/coordinatesystem-fullcolor.svg + :class: 'cvc-icon-lg' + + +.. |fullcolor-curator| image:: /images/icons/fullcolor/curator-fullcolor.svg + :class: 'cvc-icon' +.. |fullcolor-curator-sm| image:: /images/icons/fullcolor/curator-fullcolor.svg + :class: 'cvc-icon-sm' +.. |fullcolor-curator-lg| image:: /images/icons/fullcolor/curator-fullcolor.svg + :class: 'cvc-icon-lg' + + +.. |fullcolor-disease| image:: /images/icons/fullcolor/disease-fullcolor.svg + :class: 'cvc-icon' +.. |fullcolor-disease-sm| image:: /images/icons/fullcolor/disease-fullcolor.svg + :class: 'cvc-icon-sm' +.. |fullcolor-disease-lg| image:: /images/icons/fullcolor/disease-fullcolor.svg + :class: 'cvc-icon-lg' + + +.. |fullcolor-editor| image:: /images/icons/fullcolor/editor-fullcolor.svg + :class: 'cvc-icon' +.. |fullcolor-editor-sm| image:: /images/icons/fullcolor/editor-fullcolor.svg + :class: 'cvc-icon-sm' +.. |fullcolor-editor-lg| image:: /images/icons/fullcolor/editor-fullcolor.svg + :class: 'cvc-icon-lg' + + +.. |fullcolor-event| image:: /images/icons/fullcolor/event-fullcolor.svg + :class: 'cvc-icon' +.. |fullcolor-event-sm| image:: /images/icons/fullcolor/event-fullcolor.svg + :class: 'cvc-icon-sm' +.. |fullcolor-event-lg| image:: /images/icons/fullcolor/event-fullcolor.svg + :class: 'cvc-icon-lg' + + +.. |fullcolor-evidence| image:: /images/icons/fullcolor/evidence-fullcolor.svg + :class: 'cvc-icon' +.. |fullcolor-evidence-sm| image:: /images/icons/fullcolor/evidence-fullcolor.svg + :class: 'cvc-icon-sm' +.. |fullcolor-evidence-lg| image:: /images/icons/fullcolor/evidence-fullcolor.svg + :class: 'cvc-icon-lg' + + +.. |fullcolor-evidenceitem| image:: /images/icons/fullcolor/evidenceitem-fullcolor.svg + :class: 'cvc-icon' +.. |fullcolor-evidenceitem-sm| image:: /images/icons/fullcolor/evidenceitem-fullcolor.svg + :class: 'cvc-icon-sm' +.. |fullcolor-evidenceitem-lg| image:: /images/icons/fullcolor/evidenceitem-fullcolor.svg + :class: 'cvc-icon-lg' + + +.. |fullcolor-flag| image:: /images/icons/fullcolor/flag-fullcolor.svg + :class: 'cvc-icon' +.. |fullcolor-flag-sm| image:: /images/icons/fullcolor/flag-fullcolor.svg + :class: 'cvc-icon-sm' +.. |fullcolor-flag-lg| image:: /images/icons/fullcolor/flag-fullcolor.svg + :class: 'cvc-icon-lg' + + +.. |fullcolor-gene| image:: /images/icons/fullcolor/gene-fullcolor.svg + :class: 'cvc-icon' +.. |fullcolor-gene-sm| image:: /images/icons/fullcolor/gene-fullcolor.svg + :class: 'cvc-icon-sm' +.. |fullcolor-gene-lg| image:: /images/icons/fullcolor/gene-fullcolor.svg + :class: 'cvc-icon-lg' + + +.. |fullcolor-molecularprofile| image:: /images/icons/fullcolor/molecularprofile-fullcolor.svg + :class: 'cvc-icon' +.. |fullcolor-molecularprofile-sm| image:: /images/icons/fullcolor/molecularprofile-fullcolor.svg + :class: 'cvc-icon-sm' +.. |fullcolor-molecularprofile-lg| image:: /images/icons/fullcolor/molecularprofile-fullcolor.svg + :class: 'cvc-icon-lg' + + +.. |fullcolor-organization| image:: /images/icons/fullcolor/organization-fullcolor.svg + :class: 'cvc-icon' +.. |fullcolor-organization-sm| image:: /images/icons/fullcolor/organization-fullcolor.svg + :class: 'cvc-icon-sm' +.. |fullcolor-organization-lg| image:: /images/icons/fullcolor/organization-fullcolor.svg + :class: 'cvc-icon-lg' + + +.. |fullcolor-phenotype| image:: /images/icons/fullcolor/phenotype-fullcolor.svg + :class: 'cvc-icon' +.. |fullcolor-phenotype-sm| image:: /images/icons/fullcolor/phenotype-fullcolor.svg + :class: 'cvc-icon-sm' +.. |fullcolor-phenotype-lg| image:: /images/icons/fullcolor/phenotype-fullcolor.svg + :class: 'cvc-icon-lg' + + +.. |fullcolor-queue| image:: /images/icons/fullcolor/queue-fullcolor.svg + :class: 'cvc-icon' +.. |fullcolor-queue-sm| image:: /images/icons/fullcolor/queue-fullcolor.svg + :class: 'cvc-icon-sm' +.. |fullcolor-queue-lg| image:: /images/icons/fullcolor/queue-fullcolor.svg + :class: 'cvc-icon-lg' + + +.. |fullcolor-revision| image:: /images/icons/fullcolor/revision-fullcolor.svg + :class: 'cvc-icon' +.. |fullcolor-revision-sm| image:: /images/icons/fullcolor/revision-fullcolor.svg + :class: 'cvc-icon-sm' +.. |fullcolor-revision-lg| image:: /images/icons/fullcolor/revision-fullcolor.svg + :class: 'cvc-icon-lg' + + +.. |fullcolor-source| image:: /images/icons/fullcolor/source-fullcolor.svg + :class: 'cvc-icon' +.. |fullcolor-source-sm| image:: /images/icons/fullcolor/source-fullcolor.svg + :class: 'cvc-icon-sm' +.. |fullcolor-source-lg| image:: /images/icons/fullcolor/source-fullcolor.svg + :class: 'cvc-icon-lg' + + +.. |fullcolor-therapy| image:: /images/icons/fullcolor/therapy-fullcolor.svg + :class: 'cvc-icon' +.. |fullcolor-therapy-sm| image:: /images/icons/fullcolor/therapy-fullcolor.svg + :class: 'cvc-icon-sm' +.. |fullcolor-therapy-lg| image:: /images/icons/fullcolor/therapy-fullcolor.svg + :class: 'cvc-icon-lg' + + +.. |fullcolor-user| image:: /images/icons/fullcolor/user-fullcolor.svg + :class: 'cvc-icon' +.. |fullcolor-user-sm| image:: /images/icons/fullcolor/user-fullcolor.svg + :class: 'cvc-icon-sm' +.. |fullcolor-user-lg| image:: /images/icons/fullcolor/user-fullcolor.svg + :class: 'cvc-icon-lg' + + +.. |fullcolor-variant| image:: /images/icons/fullcolor/variant.svg + :class: 'cvc-icon' +.. |fullcolor-variant-sm| image:: /images/icons/fullcolor/variant.svg + :class: 'cvc-icon-sm' +.. |fullcolor-variant-lg| image:: /images/icons/fullcolor/variant.svg + :class: 'cvc-icon-lg' + + +.. |fullcolor-variantgroup| image:: /images/icons/fullcolor/variantgroup-fullcolor.svg + :class: 'cvc-icon' +.. |fullcolor-variantgroup-sm| image:: /images/icons/fullcolor/variantgroup-fullcolor.svg + :class: 'cvc-icon-sm' +.. |fullcolor-variantgroup-lg| image:: /images/icons/fullcolor/variantgroup-fullcolor.svg + :class: 'cvc-icon-lg' + + +.. |fullcolor-varianttype| image:: /images/icons/fullcolor/varianttype-fullcolor.svg + :class: 'cvc-icon' +.. |fullcolor-varianttype-sm| image:: /images/icons/fullcolor/varianttype-fullcolor.svg + :class: 'cvc-icon-sm' +.. |fullcolor-varianttype-lg| image:: /images/icons/fullcolor/varianttype-fullcolor.svg + :class: 'cvc-icon-lg' + + +.. |outline-admin| image:: /images/icons/outline/admin-outline.svg + :class: 'cvc-icon' +.. |outline-admin-sm| image:: /images/icons/outline/admin-outline.svg + :class: 'cvc-icon-sm' +.. |outline-admin-lg| image:: /images/icons/outline/admin-outline.svg + :class: 'cvc-icon-lg' + + +.. |outline-assertion| image:: /images/icons/outline/assertion-outline.svg + :class: 'cvc-icon' +.. |outline-assertion-sm| image:: /images/icons/outline/assertion-outline.svg + :class: 'cvc-icon-sm' +.. |outline-assertion-lg| image:: /images/icons/outline/assertion-outline.svg + :class: 'cvc-icon-lg' + + +.. |outline-clinicaltrial| image:: /images/icons/outline/clinicaltrial-outline.svg + :class: 'cvc-icon' +.. |outline-clinicaltrial-sm| image:: /images/icons/outline/clinicaltrial-outline.svg + :class: 'cvc-icon-sm' +.. |outline-clinicaltrial-lg| image:: /images/icons/outline/clinicaltrial-outline.svg + :class: 'cvc-icon-lg' + + +.. |outline-comment| image:: /images/icons/outline/comment-outline.svg + :class: 'cvc-icon' +.. |outline-comment-sm| image:: /images/icons/outline/comment-outline.svg + :class: 'cvc-icon-sm' +.. |outline-comment-lg| image:: /images/icons/outline/comment-outline.svg + :class: 'cvc-icon-lg' + + +.. |outline-coordinatesystem| image:: /images/icons/outline/coordinatesystem-outline.svg + :class: 'cvc-icon' +.. |outline-coordinatesystem-sm| image:: /images/icons/outline/coordinatesystem-outline.svg + :class: 'cvc-icon-sm' +.. |outline-coordinatesystem-lg| image:: /images/icons/outline/coordinatesystem-outline.svg + :class: 'cvc-icon-lg' + + +.. |outline-curator| image:: /images/icons/outline/curator-outline.svg + :class: 'cvc-icon' +.. |outline-curator-sm| image:: /images/icons/outline/curator-outline.svg + :class: 'cvc-icon-sm' +.. |outline-curator-lg| image:: /images/icons/outline/curator-outline.svg + :class: 'cvc-icon-lg' + + +.. |outline-disease| image:: /images/icons/outline/disease-outline.svg + :class: 'cvc-icon' +.. |outline-disease-sm| image:: /images/icons/outline/disease-outline.svg + :class: 'cvc-icon-sm' +.. |outline-disease-lg| image:: /images/icons/outline/disease-outline.svg + :class: 'cvc-icon-lg' + + +.. |outline-editor| image:: /images/icons/outline/editor-outline.svg + :class: 'cvc-icon' +.. |outline-editor-sm| image:: /images/icons/outline/editor-outline.svg + :class: 'cvc-icon-sm' +.. |outline-editor-lg| image:: /images/icons/outline/editor-outline.svg + :class: 'cvc-icon-lg' + + +.. |outline-event| image:: /images/icons/outline/event-outline.svg + :class: 'cvc-icon' +.. |outline-event-sm| image:: /images/icons/outline/event-outline.svg + :class: 'cvc-icon-sm' +.. |outline-event-lg| image:: /images/icons/outline/event-outline.svg + :class: 'cvc-icon-lg' + + +.. |outline-evidence| image:: /images/icons/outline/evidence-outline.svg + :class: 'cvc-icon' +.. |outline-evidence-sm| image:: /images/icons/outline/evidence-outline.svg + :class: 'cvc-icon-sm' +.. |outline-evidence-lg| image:: /images/icons/outline/evidence-outline.svg + :class: 'cvc-icon-lg' + + +.. |outline-evidenceitem| image:: /images/icons/outline/evidenceitem-outline.svg + :class: 'cvc-icon' +.. |outline-evidenceitem-sm| image:: /images/icons/outline/evidenceitem-outline.svg + :class: 'cvc-icon-sm' +.. |outline-evidenceitem-lg| image:: /images/icons/outline/evidenceitem-outline.svg + :class: 'cvc-icon-lg' + + +.. |outline-flag| image:: /images/icons/outline/flag-outline.svg + :class: 'cvc-icon' +.. |outline-flag-sm| image:: /images/icons/outline/flag-outline.svg + :class: 'cvc-icon-sm' +.. |outline-flag-lg| image:: /images/icons/outline/flag-outline.svg + :class: 'cvc-icon-lg' + + +.. |outline-gene| image:: /images/icons/outline/gene-outline.svg + :class: 'cvc-icon' +.. |outline-gene-sm| image:: /images/icons/outline/gene-outline.svg + :class: 'cvc-icon-sm' +.. |outline-gene-lg| image:: /images/icons/outline/gene-outline.svg + :class: 'cvc-icon-lg' + + +.. |outline-molecularprofile| image:: /images/icons/outline/molecularprofile-outline.svg + :class: 'cvc-icon' +.. |outline-molecularprofile-sm| image:: /images/icons/outline/molecularprofile-outline.svg + :class: 'cvc-icon-sm' +.. |outline-molecularprofile-lg| image:: /images/icons/outline/molecularprofile-outline.svg + :class: 'cvc-icon-lg' + + +.. |outline-organization| image:: /images/icons/outline/organization-outline.svg + :class: 'cvc-icon' +.. |outline-organization-sm| image:: /images/icons/outline/organization-outline.svg + :class: 'cvc-icon-sm' +.. |outline-organization-lg| image:: /images/icons/outline/organization-outline.svg + :class: 'cvc-icon-lg' + + +.. |outline-phenotype| image:: /images/icons/outline/phenotype-outline.svg + :class: 'cvc-icon' +.. |outline-phenotype-sm| image:: /images/icons/outline/phenotype-outline.svg + :class: 'cvc-icon-sm' +.. |outline-phenotype-lg| image:: /images/icons/outline/phenotype-outline.svg + :class: 'cvc-icon-lg' + + +.. |outline-queue| image:: /images/icons/outline/queue-outline.svg + :class: 'cvc-icon' +.. |outline-queue-sm| image:: /images/icons/outline/queue-outline.svg + :class: 'cvc-icon-sm' +.. |outline-queue-lg| image:: /images/icons/outline/queue-outline.svg + :class: 'cvc-icon-lg' + + +.. |outline-revision| image:: /images/icons/outline/revision-outline.svg + :class: 'cvc-icon' +.. |outline-revision-sm| image:: /images/icons/outline/revision-outline.svg + :class: 'cvc-icon-sm' +.. |outline-revision-lg| image:: /images/icons/outline/revision-outline.svg + :class: 'cvc-icon-lg' + + +.. |outline-source| image:: /images/icons/outline/source-outline.svg + :class: 'cvc-icon' +.. |outline-source-sm| image:: /images/icons/outline/source-outline.svg + :class: 'cvc-icon-sm' +.. |outline-source-lg| image:: /images/icons/outline/source-outline.svg + :class: 'cvc-icon-lg' + + +.. |outline-therapy| image:: /images/icons/outline/therapy-outline.svg + :class: 'cvc-icon' +.. |outline-therapy-sm| image:: /images/icons/outline/therapy-outline.svg + :class: 'cvc-icon-sm' +.. |outline-therapy-lg| image:: /images/icons/outline/therapy-outline.svg + :class: 'cvc-icon-lg' + + +.. |outline-user| image:: /images/icons/outline/user-outline.svg + :class: 'cvc-icon' +.. |outline-user-sm| image:: /images/icons/outline/user-outline.svg + :class: 'cvc-icon-sm' +.. |outline-user-lg| image:: /images/icons/outline/user-outline.svg + :class: 'cvc-icon-lg' + + +.. |outline-variant| image:: /images/icons/outline/variant-outline.svg + :class: 'cvc-icon' +.. |outline-variant-sm| image:: /images/icons/outline/variant-outline.svg + :class: 'cvc-icon-sm' +.. |outline-variant-lg| image:: /images/icons/outline/variant-outline.svg + :class: 'cvc-icon-lg' + + +.. |outline-variantgroup| image:: /images/icons/outline/variantgroup-outline.svg + :class: 'cvc-icon' +.. |outline-variantgroup-sm| image:: /images/icons/outline/variantgroup-outline.svg + :class: 'cvc-icon-sm' +.. |outline-variantgroup-lg| image:: /images/icons/outline/variantgroup-outline.svg + :class: 'cvc-icon-lg' + + +.. |outline-varianttype| image:: /images/icons/outline/varianttype-outline.svg + :class: 'cvc-icon' +.. |outline-varianttype-sm| image:: /images/icons/outline/varianttype-outline.svg + :class: 'cvc-icon-sm' +.. |outline-varianttype-lg| image:: /images/icons/outline/varianttype-outline.svg + :class: 'cvc-icon-lg' + + +.. |twotone-admin| image:: /images/icons/twotone/admin-twotone.svg + :class: 'cvc-icon' +.. |twotone-admin-sm| image:: /images/icons/twotone/admin-twotone.svg + :class: 'cvc-icon-sm' +.. |twotone-admin-lg| image:: /images/icons/twotone/admin-twotone.svg + :class: 'cvc-icon-lg' + + +.. |twotone-assertion| image:: /images/icons/twotone/assertion-twotone.svg + :class: 'cvc-icon' +.. |twotone-assertion-sm| image:: /images/icons/twotone/assertion-twotone.svg + :class: 'cvc-icon-sm' +.. |twotone-assertion-lg| image:: /images/icons/twotone/assertion-twotone.svg + :class: 'cvc-icon-lg' + + +.. |twotone-clinicaltrial| image:: /images/icons/twotone/clinicaltrial-twotone.svg + :class: 'cvc-icon' +.. |twotone-clinicaltrial-sm| image:: /images/icons/twotone/clinicaltrial-twotone.svg + :class: 'cvc-icon-sm' +.. |twotone-clinicaltrial-lg| image:: /images/icons/twotone/clinicaltrial-twotone.svg + :class: 'cvc-icon-lg' + + +.. |twotone-comment| image:: /images/icons/twotone/comment-twotone.svg + :class: 'cvc-icon' +.. |twotone-comment-sm| image:: /images/icons/twotone/comment-twotone.svg + :class: 'cvc-icon-sm' +.. |twotone-comment-lg| image:: /images/icons/twotone/comment-twotone.svg + :class: 'cvc-icon-lg' + + +.. |twotone-coordinatesystem| image:: /images/icons/twotone/coordinatesystem-twotone.svg + :class: 'cvc-icon' +.. |twotone-coordinatesystem-sm| image:: /images/icons/twotone/coordinatesystem-twotone.svg + :class: 'cvc-icon-sm' +.. |twotone-coordinatesystem-lg| image:: /images/icons/twotone/coordinatesystem-twotone.svg + :class: 'cvc-icon-lg' + + +.. |twotone-curator| image:: /images/icons/twotone/curator-twotone.svg + :class: 'cvc-icon' +.. |twotone-curator-sm| image:: /images/icons/twotone/curator-twotone.svg + :class: 'cvc-icon-sm' +.. |twotone-curator-lg| image:: /images/icons/twotone/curator-twotone.svg + :class: 'cvc-icon-lg' + + +.. |twotone-disease| image:: /images/icons/twotone/disease-twotone.svg + :class: 'cvc-icon' +.. |twotone-disease-sm| image:: /images/icons/twotone/disease-twotone.svg + :class: 'cvc-icon-sm' +.. |twotone-disease-lg| image:: /images/icons/twotone/disease-twotone.svg + :class: 'cvc-icon-lg' + + +.. |twotone-editor| image:: /images/icons/twotone/editor-twotone.svg + :class: 'cvc-icon' +.. |twotone-editor-sm| image:: /images/icons/twotone/editor-twotone.svg + :class: 'cvc-icon-sm' +.. |twotone-editor-lg| image:: /images/icons/twotone/editor-twotone.svg + :class: 'cvc-icon-lg' + + +.. |twotone-event| image:: /images/icons/twotone/event-twotone.svg + :class: 'cvc-icon' +.. |twotone-event-sm| image:: /images/icons/twotone/event-twotone.svg + :class: 'cvc-icon-sm' +.. |twotone-event-lg| image:: /images/icons/twotone/event-twotone.svg + :class: 'cvc-icon-lg' + + +.. |twotone-evidence| image:: /images/icons/twotone/evidence-twotone.svg + :class: 'cvc-icon' +.. |twotone-evidence-sm| image:: /images/icons/twotone/evidence-twotone.svg + :class: 'cvc-icon-sm' +.. |twotone-evidence-lg| image:: /images/icons/twotone/evidence-twotone.svg + :class: 'cvc-icon-lg' + + +.. |twotone-evidenceitem| image:: /images/icons/twotone/evidenceitem-twotone.svg + :class: 'cvc-icon' +.. |twotone-evidenceitem-sm| image:: /images/icons/twotone/evidenceitem-twotone.svg + :class: 'cvc-icon-sm' +.. |twotone-evidenceitem-lg| image:: /images/icons/twotone/evidenceitem-twotone.svg + :class: 'cvc-icon-lg' + + +.. |twotone-flag| image:: /images/icons/twotone/flag-twotone.svg + :class: 'cvc-icon' +.. |twotone-flag-sm| image:: /images/icons/twotone/flag-twotone.svg + :class: 'cvc-icon-sm' +.. |twotone-flag-lg| image:: /images/icons/twotone/flag-twotone.svg + :class: 'cvc-icon-lg' + + +.. |twotone-gene| image:: /images/icons/twotone/gene-twotone.svg + :class: 'cvc-icon' +.. |twotone-gene-sm| image:: /images/icons/twotone/gene-twotone.svg + :class: 'cvc-icon-sm' +.. |twotone-gene-lg| image:: /images/icons/twotone/gene-twotone.svg + :class: 'cvc-icon-lg' + + +.. |twotone-molecularprofile| image:: /images/icons/twotone/molecularprofile-twotone.svg + :class: 'cvc-icon' +.. |twotone-molecularprofile-sm| image:: /images/icons/twotone/molecularprofile-twotone.svg + :class: 'cvc-icon-sm' +.. |twotone-molecularprofile-lg| image:: /images/icons/twotone/molecularprofile-twotone.svg + :class: 'cvc-icon-lg' + + +.. |twotone-organization| image:: /images/icons/twotone/organization-twotone.svg + :class: 'cvc-icon' +.. |twotone-organization-sm| image:: /images/icons/twotone/organization-twotone.svg + :class: 'cvc-icon-sm' +.. |twotone-organization-lg| image:: /images/icons/twotone/organization-twotone.svg + :class: 'cvc-icon-lg' + + +.. |twotone-phenotype| image:: /images/icons/twotone/phenotype-twotone.svg + :class: 'cvc-icon' +.. |twotone-phenotype-sm| image:: /images/icons/twotone/phenotype-twotone.svg + :class: 'cvc-icon-sm' +.. |twotone-phenotype-lg| image:: /images/icons/twotone/phenotype-twotone.svg + :class: 'cvc-icon-lg' + + +.. |twotone-queue| image:: /images/icons/twotone/queue-twotone.svg + :class: 'cvc-icon' +.. |twotone-queue-sm| image:: /images/icons/twotone/queue-twotone.svg + :class: 'cvc-icon-sm' +.. |twotone-queue-lg| image:: /images/icons/twotone/queue-twotone.svg + :class: 'cvc-icon-lg' + + +.. |twotone-revision| image:: /images/icons/twotone/revision-twotone.svg + :class: 'cvc-icon' +.. |twotone-revision-sm| image:: /images/icons/twotone/revision-twotone.svg + :class: 'cvc-icon-sm' +.. |twotone-revision-lg| image:: /images/icons/twotone/revision-twotone.svg + :class: 'cvc-icon-lg' + + +.. |twotone-source| image:: /images/icons/twotone/source-twotone.svg + :class: 'cvc-icon' +.. |twotone-source-sm| image:: /images/icons/twotone/source-twotone.svg + :class: 'cvc-icon-sm' +.. |twotone-source-lg| image:: /images/icons/twotone/source-twotone.svg + :class: 'cvc-icon-lg' + + +.. |twotone-therapy| image:: /images/icons/twotone/therapy-twotone.svg + :class: 'cvc-icon' +.. |twotone-therapy-sm| image:: /images/icons/twotone/therapy-twotone.svg + :class: 'cvc-icon-sm' +.. |twotone-therapy-lg| image:: /images/icons/twotone/therapy-twotone.svg + :class: 'cvc-icon-lg' + + +.. |twotone-user| image:: /images/icons/twotone/user-twotone.svg + :class: 'cvc-icon' +.. |twotone-user-sm| image:: /images/icons/twotone/user-twotone.svg + :class: 'cvc-icon-sm' +.. |twotone-user-lg| image:: /images/icons/twotone/user-twotone.svg + :class: 'cvc-icon-lg' + + +.. |twotone-variant| image:: /images/icons/twotone/variant-twotone.svg + :class: 'cvc-icon' +.. |twotone-variant-sm| image:: /images/icons/twotone/variant-twotone.svg + :class: 'cvc-icon-sm' +.. |twotone-variant-lg| image:: /images/icons/twotone/variant-twotone.svg + :class: 'cvc-icon-lg' + + +.. |twotone-variantgroup| image:: /images/icons/twotone/variantgroup-twotone.svg + :class: 'cvc-icon' +.. |twotone-variantgroup-sm| image:: /images/icons/twotone/variantgroup-twotone.svg + :class: 'cvc-icon-sm' +.. |twotone-variantgroup-lg| image:: /images/icons/twotone/variantgroup-twotone.svg + :class: 'cvc-icon-lg' + + +.. |twotone-varianttype| image:: /images/icons/twotone/varianttype-twotone.svg + :class: 'cvc-icon' +.. |twotone-varianttype-sm| image:: /images/icons/twotone/varianttype-twotone.svg + :class: 'cvc-icon-sm' +.. |twotone-varianttype-lg| image:: /images/icons/twotone/varianttype-twotone.svg + :class: 'cvc-icon-lg' diff --git a/client/src/app/generated/civic.icons.data.json b/client/src/app/generated/civic.icons.data.json index cc51911fe..59f0eeb33 100644 --- a/client/src/app/generated/civic.icons.data.json +++ b/client/src/app/generated/civic.icons.data.json @@ -2,621 +2,745 @@ "icons": [ { "type": "attribute", + "filepath": "attribute/adverseresponse-outline.svg", "name": "adverseresponse", "alias": "attribute-adverseresponse" }, { "type": "attribute", + "filepath": "attribute/benign-outline.svg", "name": "benign", "alias": "attribute-benign" }, { "type": "attribute", + "filepath": "attribute/betteroutcome-outline.svg", "name": "betteroutcome", "alias": "attribute-betteroutcome" }, { "type": "attribute", + "filepath": "attribute/combination-outline.svg", "name": "combination", "alias": "attribute-combination" }, { "type": "attribute", + "filepath": "attribute/combined-outline.svg", "name": "combined", "alias": "attribute-combined" }, { "type": "attribute", + "filepath": "attribute/commongermline-outline.svg", "name": "commongermline", "alias": "attribute-commongermline" }, { "type": "attribute", + "filepath": "attribute/diagnostic-outline.svg", "name": "diagnostic", "alias": "attribute-diagnostic" }, { "type": "attribute", + "filepath": "attribute/doesnotsupport-outline.svg", "name": "doesnotsupport", "alias": "attribute-doesnotsupport" }, { "type": "attribute", + "filepath": "attribute/dominantnegative-outline.svg", "name": "dominantnegative", "alias": "attribute-dominantnegative" }, { "type": "attribute", + "filepath": "attribute/functional-outline.svg", "name": "functional", "alias": "attribute-functional" }, { "type": "attribute", + "filepath": "attribute/gainoffunction-outline.svg", "name": "gainoffunction", "alias": "attribute-gainoffunction" }, { "type": "attribute", + "filepath": "attribute/levela-outline.svg", "name": "levela", "alias": "attribute-levela" }, { "type": "attribute", + "filepath": "attribute/levelb-outline.svg", "name": "levelb", "alias": "attribute-levelb" }, { "type": "attribute", + "filepath": "attribute/levelc-outline.svg", "name": "levelc", "alias": "attribute-levelc" }, { "type": "attribute", + "filepath": "attribute/leveld-outline.svg", "name": "leveld", "alias": "attribute-leveld" }, { "type": "attribute", + "filepath": "attribute/levele-outline.svg", "name": "levele", "alias": "attribute-levele" }, { "type": "attribute", + "filepath": "attribute/likelybenign-outline.svg", "name": "likelybenign", "alias": "attribute-likelybenign" }, { "type": "attribute", + "filepath": "attribute/likelyoncogenic-outline.svg", "name": "likelyoncogenic", "alias": "attribute-likelyoncogenic" }, { "type": "attribute", + "filepath": "attribute/likelypathogenic-outline.svg", "name": "likelypathogenic", "alias": "attribute-likelypathogenic" }, { "type": "attribute", + "filepath": "attribute/lossoffunction-outline.svg", "name": "lossoffunction", "alias": "attribute-lossoffunction" }, { "type": "attribute", + "filepath": "attribute/na-outline.svg", "name": "na", "alias": "attribute-na" }, { "type": "attribute", + "filepath": "attribute/negative-outline.svg", "name": "negative", "alias": "attribute-negative" }, { "type": "attribute", + "filepath": "attribute/neomorphic-outline.svg", "name": "neomorphic", "alias": "attribute-neomorphic" }, { "type": "attribute", + "filepath": "attribute/oncogenic-outline.svg", "name": "oncogenic", "alias": "attribute-oncogenic" }, { "type": "attribute", + "filepath": "attribute/oncogenicity-outline.svg", "name": "oncogenicity", "alias": "attribute-oncogenicity" }, { "type": "attribute", + "filepath": "attribute/oncogenicsignificance-outline.svg", "name": "oncogenicsignificance", "alias": "attribute-oncogenicsignificance" }, { "type": "attribute", + "filepath": "attribute/oncogenictype-outline.svg", "name": "oncogenictype", "alias": "attribute-oncogenictype" }, { "type": "attribute", + "filepath": "attribute/pathogenic-outline.svg", "name": "pathogenic", "alias": "attribute-pathogenic" }, { "type": "attribute", + "filepath": "attribute/pooroutcome-outline.svg", "name": "pooroutcome", "alias": "attribute-pooroutcome" }, { "type": "attribute", + "filepath": "attribute/positive-outline.svg", "name": "positive", "alias": "attribute-positive" }, { "type": "attribute", + "filepath": "attribute/predictive-outline.svg", "name": "predictive", "alias": "attribute-predictive" }, { "type": "attribute", + "filepath": "attribute/predisposing-outline.svg", "name": "predisposing", "alias": "attribute-predisposing" }, { "type": "attribute", + "filepath": "attribute/predisposition-outline.svg", "name": "predisposition", "alias": "attribute-predisposition" }, { "type": "attribute", + "filepath": "attribute/prognostic-outline.svg", "name": "prognostic", "alias": "attribute-prognostic" }, { "type": "attribute", + "filepath": "attribute/protectiveness-outline.svg", "name": "protectiveness", "alias": "attribute-protectiveness" }, { "type": "attribute", + "filepath": "attribute/raregermline-outline.svg", "name": "raregermline", "alias": "attribute-raregermline" }, { "type": "attribute", + "filepath": "attribute/rating1-outline.svg", "name": "rating1", "alias": "attribute-rating1" }, { "type": "attribute", + "filepath": "attribute/rating2-outline.svg", "name": "rating2", "alias": "attribute-rating2" }, { "type": "attribute", + "filepath": "attribute/rating3-outline.svg", "name": "rating3", "alias": "attribute-rating3" }, { "type": "attribute", + "filepath": "attribute/rating4-outline.svg", "name": "rating4", "alias": "attribute-rating4" }, { "type": "attribute", + "filepath": "attribute/rating5-outline.svg", "name": "rating5", "alias": "attribute-rating5" }, { "type": "attribute", + "filepath": "attribute/reducedsensitivity-outline.svg", "name": "reducedsensitivity", "alias": "attribute-reducedsensitivity" }, { "type": "attribute", + "filepath": "attribute/resistance-outline.svg", "name": "resistance", "alias": "attribute-resistance" }, { "type": "attribute", + "filepath": "attribute/sensitivityresponse-outline.svg", "name": "sensitivityresponse", "alias": "attribute-sensitivityresponse" }, { "type": "attribute", + "filepath": "attribute/sequential-outline.svg", "name": "sequential", "alias": "attribute-sequential" }, { "type": "attribute", + "filepath": "attribute/significanceunknown-outline.svg", "name": "significanceunknown", "alias": "attribute-significanceunknown" }, { "type": "attribute", + "filepath": "attribute/somatic-outline.svg", "name": "somatic", "alias": "attribute-somatic" }, { "type": "attribute", + "filepath": "attribute/substitutes-outline.svg", "name": "substitutes", "alias": "attribute-substitutes" }, { "type": "attribute", + "filepath": "attribute/supports-outline.svg", "name": "supports", "alias": "attribute-supports" }, { "type": "attribute", + "filepath": "attribute/unalteredfunction-outline.svg", "name": "unalteredfunction", "alias": "attribute-unalteredfunction" }, { "type": "attribute", + "filepath": "attribute/uncertainsignificance-outline.svg", "name": "uncertainsignificance", "alias": "attribute-uncertainsignificance" }, { "type": "attribute", + "filepath": "attribute/unknown-outline.svg", "name": "unknown", "alias": "attribute-unknown" }, { "type": "fullcolor", + "filepath": "fullcolor/admin-fullcolor.svg", "name": "admin", "alias": "fullcolor-admin" }, { "type": "fullcolor", + "filepath": "fullcolor/assertion-fullcolor.svg", "name": "assertion", "alias": "fullcolor-assertion" }, { "type": "fullcolor", + "filepath": "fullcolor/clinicaltrial-fullcolor.svg", "name": "clinicaltrial", "alias": "fullcolor-clinicaltrial" }, { "type": "fullcolor", + "filepath": "fullcolor/comment-fullcolor.svg", "name": "comment", "alias": "fullcolor-comment" }, { "type": "fullcolor", + "filepath": "fullcolor/coordinatesystem-fullcolor.svg", "name": "coordinatesystem", "alias": "fullcolor-coordinatesystem" }, { "type": "fullcolor", + "filepath": "fullcolor/curator-fullcolor.svg", "name": "curator", "alias": "fullcolor-curator" }, { "type": "fullcolor", + "filepath": "fullcolor/disease-fullcolor.svg", "name": "disease", "alias": "fullcolor-disease" }, { "type": "fullcolor", + "filepath": "fullcolor/editor-fullcolor.svg", "name": "editor", "alias": "fullcolor-editor" }, { "type": "fullcolor", + "filepath": "fullcolor/event-fullcolor.svg", "name": "event", "alias": "fullcolor-event" }, { "type": "fullcolor", + "filepath": "fullcolor/evidence-fullcolor.svg", "name": "evidence", "alias": "fullcolor-evidence" }, { "type": "fullcolor", + "filepath": "fullcolor/evidenceitem-fullcolor.svg", "name": "evidenceitem", "alias": "fullcolor-evidenceitem" }, { "type": "fullcolor", + "filepath": "fullcolor/flag-fullcolor.svg", "name": "flag", "alias": "fullcolor-flag" }, { "type": "fullcolor", + "filepath": "fullcolor/gene-fullcolor.svg", "name": "gene", "alias": "fullcolor-gene" }, { "type": "fullcolor", + "filepath": "fullcolor/molecularprofile-fullcolor.svg", "name": "molecularprofile", "alias": "fullcolor-molecularprofile" }, { "type": "fullcolor", + "filepath": "fullcolor/organization-fullcolor.svg", "name": "organization", "alias": "fullcolor-organization" }, { "type": "fullcolor", + "filepath": "fullcolor/phenotype-fullcolor.svg", "name": "phenotype", "alias": "fullcolor-phenotype" }, { "type": "fullcolor", + "filepath": "fullcolor/queue-fullcolor.svg", "name": "queue", "alias": "fullcolor-queue" }, { "type": "fullcolor", + "filepath": "fullcolor/revision-fullcolor.svg", "name": "revision", "alias": "fullcolor-revision" }, { "type": "fullcolor", + "filepath": "fullcolor/source-fullcolor.svg", "name": "source", "alias": "fullcolor-source" }, { "type": "fullcolor", + "filepath": "fullcolor/therapy-fullcolor.svg", "name": "therapy", "alias": "fullcolor-therapy" }, { "type": "fullcolor", + "filepath": "fullcolor/user-fullcolor.svg", "name": "user", "alias": "fullcolor-user" }, { "type": "fullcolor", + "filepath": "fullcolor/variant.svg", "name": "variant", "alias": "fullcolor-variant" }, { "type": "fullcolor", + "filepath": "fullcolor/variantgroup-fullcolor.svg", "name": "variantgroup", "alias": "fullcolor-variantgroup" }, { "type": "fullcolor", + "filepath": "fullcolor/varianttype-fullcolor.svg", "name": "varianttype", "alias": "fullcolor-varianttype" }, { "type": "outline", + "filepath": "outline/admin-outline.svg", "name": "admin", "alias": "outline-admin" }, { "type": "outline", + "filepath": "outline/assertion-outline.svg", "name": "assertion", "alias": "outline-assertion" }, { "type": "outline", + "filepath": "outline/clinicaltrial-outline.svg", "name": "clinicaltrial", "alias": "outline-clinicaltrial" }, { "type": "outline", + "filepath": "outline/comment-outline.svg", "name": "comment", "alias": "outline-comment" }, { "type": "outline", + "filepath": "outline/coordinatesystem-outline.svg", "name": "coordinatesystem", "alias": "outline-coordinatesystem" }, { "type": "outline", + "filepath": "outline/curator-outline.svg", "name": "curator", "alias": "outline-curator" }, { "type": "outline", + "filepath": "outline/disease-outline.svg", "name": "disease", "alias": "outline-disease" }, { "type": "outline", + "filepath": "outline/editor-outline.svg", "name": "editor", "alias": "outline-editor" }, { "type": "outline", + "filepath": "outline/event-outline.svg", "name": "event", "alias": "outline-event" }, { "type": "outline", + "filepath": "outline/evidence-outline.svg", "name": "evidence", "alias": "outline-evidence" }, { "type": "outline", + "filepath": "outline/evidenceitem-outline.svg", "name": "evidenceitem", "alias": "outline-evidenceitem" }, { "type": "outline", + "filepath": "outline/flag-outline.svg", "name": "flag", "alias": "outline-flag" }, { "type": "outline", + "filepath": "outline/gene-outline.svg", "name": "gene", "alias": "outline-gene" }, { "type": "outline", + "filepath": "outline/molecularprofile-outline.svg", "name": "molecularprofile", "alias": "outline-molecularprofile" }, { "type": "outline", + "filepath": "outline/organization-outline.svg", "name": "organization", "alias": "outline-organization" }, { "type": "outline", + "filepath": "outline/phenotype-outline.svg", "name": "phenotype", "alias": "outline-phenotype" }, { "type": "outline", + "filepath": "outline/queue-outline.svg", "name": "queue", "alias": "outline-queue" }, { "type": "outline", + "filepath": "outline/revision-outline.svg", "name": "revision", "alias": "outline-revision" }, { "type": "outline", + "filepath": "outline/source-outline.svg", "name": "source", "alias": "outline-source" }, { "type": "outline", + "filepath": "outline/therapy-outline.svg", "name": "therapy", "alias": "outline-therapy" }, { "type": "outline", + "filepath": "outline/user-outline.svg", "name": "user", "alias": "outline-user" }, { "type": "outline", + "filepath": "outline/variant-outline.svg", "name": "variant", "alias": "outline-variant" }, { "type": "outline", + "filepath": "outline/variantgroup-outline.svg", "name": "variantgroup", "alias": "outline-variantgroup" }, { "type": "outline", + "filepath": "outline/varianttype-outline.svg", "name": "varianttype", "alias": "outline-varianttype" }, { "type": "twotone", + "filepath": "twotone/admin-twotone.svg", "name": "admin", "alias": "twotone-admin" }, { "type": "twotone", + "filepath": "twotone/assertion-twotone.svg", "name": "assertion", "alias": "twotone-assertion" }, { "type": "twotone", + "filepath": "twotone/clinicaltrial-twotone.svg", "name": "clinicaltrial", "alias": "twotone-clinicaltrial" }, { "type": "twotone", + "filepath": "twotone/comment-twotone.svg", "name": "comment", "alias": "twotone-comment" }, { "type": "twotone", + "filepath": "twotone/coordinatesystem-twotone.svg", "name": "coordinatesystem", "alias": "twotone-coordinatesystem" }, { "type": "twotone", + "filepath": "twotone/curator-twotone.svg", "name": "curator", "alias": "twotone-curator" }, { "type": "twotone", + "filepath": "twotone/disease-twotone.svg", "name": "disease", "alias": "twotone-disease" }, { "type": "twotone", + "filepath": "twotone/editor-twotone.svg", "name": "editor", "alias": "twotone-editor" }, { "type": "twotone", + "filepath": "twotone/event-twotone.svg", "name": "event", "alias": "twotone-event" }, { "type": "twotone", + "filepath": "twotone/evidence-twotone.svg", "name": "evidence", "alias": "twotone-evidence" }, { "type": "twotone", + "filepath": "twotone/evidenceitem-twotone.svg", "name": "evidenceitem", "alias": "twotone-evidenceitem" }, { "type": "twotone", + "filepath": "twotone/flag-twotone.svg", "name": "flag", "alias": "twotone-flag" }, { "type": "twotone", + "filepath": "twotone/gene-twotone.svg", "name": "gene", "alias": "twotone-gene" }, { "type": "twotone", + "filepath": "twotone/molecularprofile-twotone.svg", "name": "molecularprofile", "alias": "twotone-molecularprofile" }, { "type": "twotone", + "filepath": "twotone/organization-twotone.svg", "name": "organization", "alias": "twotone-organization" }, { "type": "twotone", + "filepath": "twotone/phenotype-twotone.svg", "name": "phenotype", "alias": "twotone-phenotype" }, { "type": "twotone", + "filepath": "twotone/queue-twotone.svg", "name": "queue", "alias": "twotone-queue" }, { "type": "twotone", + "filepath": "twotone/revision-twotone.svg", "name": "revision", "alias": "twotone-revision" }, { "type": "twotone", + "filepath": "twotone/source-twotone.svg", "name": "source", "alias": "twotone-source" }, { "type": "twotone", + "filepath": "twotone/therapy-twotone.svg", "name": "therapy", "alias": "twotone-therapy" }, { "type": "twotone", + "filepath": "twotone/user-twotone.svg", "name": "user", "alias": "twotone-user" }, { "type": "twotone", + "filepath": "twotone/variant-twotone.svg", "name": "variant", "alias": "twotone-variant" }, { "type": "twotone", + "filepath": "twotone/variantgroup-twotone.svg", "name": "variantgroup", "alias": "twotone-variantgroup" }, { "type": "twotone", + "filepath": "twotone/varianttype-twotone.svg", "name": "varianttype", "alias": "twotone-varianttype" } diff --git a/client/yarn.lock b/client/yarn.lock index c35ab188a..e51f195f4 100644 --- a/client/yarn.lock +++ b/client/yarn.lock @@ -6357,6 +6357,11 @@ multicast-dns@^7.2.5: dns-packet "^5.2.2" thunky "^1.0.2" +mustache@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/mustache/-/mustache-4.2.0.tgz#e5892324d60a12ec9c2a73359edca52972bf6f64" + integrity sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ== + mute-stream@0.0.8: version "0.0.8" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" From b7447bc1bf2b5b4b574fe7536efb0709aa393d4d Mon Sep 17 00:00:00 2001 From: Joshua McMichael Date: Tue, 22 Aug 2023 15:47:08 -0500 Subject: [PATCH 03/14] generate-rst script now will update civic-docs aliases rst if found --- client/scripts/generate-icon-data.js | 4 +- client/scripts/generate-icon-rst.js | 128 ++++++++++++++++-- .../src/app/generated/civic-docs.aliases.rst | 4 +- 3 files changed, 117 insertions(+), 19 deletions(-) diff --git a/client/scripts/generate-icon-data.js b/client/scripts/generate-icon-data.js index ce07a2dc3..a8380adf6 100755 --- a/client/scripts/generate-icon-data.js +++ b/client/scripts/generate-icon-data.js @@ -38,7 +38,7 @@ const tree = directoryTree(iconsDirectory, { extensions: /\.svg$/ }) if (!tree) { console.error( - `Error: The directory ${iconsDirectory} does not exist or could not be accessed.` + `Error: The icon assets folder ${iconsDirectory} does not exist or could not be accessed.` ) process.exit(1) } @@ -61,4 +61,4 @@ const outputPath = path.join( // Write the JSON data to the file fs.writeFileSync(outputPath, JSON.stringify(output, null, 2)) -console.log(`Data written to ${outputPath}`) +console.log(`Icon data written to ${outputPath}`) diff --git a/client/scripts/generate-icon-rst.js b/client/scripts/generate-icon-rst.js index 0ab59f27f..8917c1047 100755 --- a/client/scripts/generate-icon-rst.js +++ b/client/scripts/generate-icon-rst.js @@ -1,10 +1,55 @@ #!/usr/bin/env node +const directoryTree = require('directory-tree') const fs = require('fs') const path = require('path') +const readline = require('readline') const mustache = require('mustache') -// Load the generated icon data JSON -const jsonDataPath = path.join( +const iconsDirectory = path.join(__dirname, '..', 'src', 'assets', 'icons') +const validSubdirectories = ['attribute', 'outline', 'twotone', 'fullcolor'] + +function removeRedundantName(type, filename) { + const pattern = + type === 'attribute' ? /-outline$/ : new RegExp(`-${type}$`, 'i') + return filename.replace(pattern, '') +} + +function generateIconObject(tree) { + if (!tree || !tree.children) return [] + + return tree.children + .filter((child) => validSubdirectories.includes(child.name)) + .flatMap((subdir) => { + return subdir.children.map((file) => { + const cleanName = removeRedundantName( + subdir.name, + path.basename(file.name, '.svg') + ) + return { + type: subdir.name, + filepath: `${subdir.name}/${file.name}`, + name: cleanName, + alias: `${subdir.name}-${cleanName}`, + } + }) + }) +} + +const tree = directoryTree(iconsDirectory, { extensions: /\.svg$/ }) + +if (!tree) { + console.error( + `Error: The directory ${iconsDirectory} does not exist or could not be accessed.` + ) + process.exit(1) +} + +const icons = generateIconObject(tree) +const output = { + icons: icons, +} + +const outputPath = path.join( __dirname, '..', 'src', @@ -12,7 +57,14 @@ const jsonDataPath = path.join( 'generated', 'civic.icons.data.json' ) -const iconData = JSON.parse(fs.readFileSync(jsonDataPath, 'utf-8')) +fs.writeFileSync(outputPath, JSON.stringify(output, null, 2)) +console.log(`Data written to ${outputPath}`) + +// New part for checking civic-docs repository and generating RST + +const docsRepoPath = path.join(__dirname, '..', '..', '..', 'civic-docs') +const targetDirectory = path.join(docsRepoPath, 'docs', 'generated') +const targetFile = path.join(targetDirectory, 'civic-docs.aliases.rst') // Define the mustache template const template = ` @@ -32,17 +84,63 @@ const renderedRst = 'Produced by `generate-icon-rst` script in civic-v2/client/scripts\n' + iconData.icons.map((icon) => mustache.render(template, icon)).join('\n') -// Define the path to the output RST file -const outputPath = path.join( - __dirname, - '..', - 'src', - 'app', - 'generated', - 'civic-docs.aliases.rst' -) +const rl = readline.createInterface({ + input: process.stdin, + output: process.stdout, +}) + +async function promptUser(question) { + return new Promise((resolve) => { + rl.question(question, (answer) => { + const lowercasedAnswer = answer.toLowerCase() + if (['y', 'yes', ''].includes(lowercasedAnswer)) { + resolve(true) + } else if (['n', 'no'].includes(lowercasedAnswer)) { + resolve(false) + } else { + console.log( + "Invalid response. Please answer with 'y', 'yes', 'n', or 'no'." + ) + resolve(promptUser(question)) // re-prompt if invalid response + } + }) + }) +} -// Write the rendered RST to the file -fs.writeFileSync(outputPath, renderedRst) +;(async function () { + if (fs.existsSync(docsRepoPath)) { + if (fs.existsSync(targetDirectory)) { + if (fs.existsSync(targetFile)) { + const answer = await promptUser( + 'civic-docs/generated/civic-docs.aliases.rst exists, overwrite? (Y/n) ' + ) + if (answer) { + fs.writeFileSync(targetFile, renderedRst) + console.log(`Overwrote ${targetFile}`) + } else { + console.log('Did not overwrite the file.') + } + } else { + fs.writeFileSync(targetFile, renderedRst) + console.log(`Wrote to ${targetFile}`) + } + } else { + const answer = await promptUser( + 'Create civic-docs/generated directory and write civic-docs.aliases.rst file? (Y/n) ' + ) + if (answer) { + fs.mkdirSync(targetDirectory, { recursive: true }) + fs.writeFileSync(targetFile, renderedRst) + console.log(`Created directory and wrote to ${targetFile}`) + } else { + console.log('Did not create the directory or write the file.') + } + } + } else { + console.log( + `No civic-docs repository found at ${docsRepoPath}. Will not write civic-docs.aliases.rst file.` + ) + } -console.log(`RST written to ${outputPath}`) + rl.close() +})() diff --git a/client/src/app/generated/civic-docs.aliases.rst b/client/src/app/generated/civic-docs.aliases.rst index 1b7ffccef..c57dd71b6 100644 --- a/client/src/app/generated/civic-docs.aliases.rst +++ b/client/src/app/generated/civic-docs.aliases.rst @@ -1,7 +1,7 @@ .. - GENERATED BY CiVIC v2 CLIENT SCRIPT, DO NOT EDIT + GENERATED BY CiVIC CLIENT DEV SCRIPT, DO NOT EDIT (unless you know what you are doing) - Produced by `generate-icon-rst` script in civic-v2/client project + Produced by `generate-icon-rst` script in civic-v2/client/scripts .. |attribute-adverseresponse| image:: /images/icons/attribute/adverseresponse-outline.svg :class: 'cvc-icon' From f6509381ad8c4b86b1ba97c9e23acde3c2e739bb Mon Sep 17 00:00:00 2001 From: Adam Coffman Date: Wed, 23 Aug 2023 08:20:52 -0500 Subject: [PATCH 04/14] remove legacy scope methods from v1 --- server/app/models/user.rb | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/server/app/models/user.rb b/server/app/models/user.rb index fdf72cf3a..38bf5cae3 100644 --- a/server/app/models/user.rb +++ b/server/app/models/user.rb @@ -40,26 +40,6 @@ class User < ActiveRecord::Base validates :profile_image, content_type: ['image/png', 'image/jpg', 'image/jpeg'], size: { less_than: 5.megabytes , message: 'Image must be smaller than 15MB' } - def self.datatable_scope - joins('LEFT OUTER JOIN events ON events.originating_user_id = users.id') - .joins('LEFT OUTER JOIN affiliations ON users.id = affiliations.user_id') - .joins('LEFT OUTER JOIN organizations ON affiliations.organization_id = organizations.id') - .includes(:badge_awards, domain_expert_tags: [:domain_of_expertise]) - end - - def self.index_scope - includes(:organizations, :most_recent_conflict_of_interest_statement, domain_expert_tags: [:domain_of_expertise]) - end - - def self.view_scope - includes(:organizations, :badge_awards, :most_recent_conflict_of_interest_statement, domain_expert_tags: [:domain_of_expertise]) - end - - def self.domain_experts_scope - joins(:domain_expert_tags) - .includes(domain_expert_tags: [:domain_of_expertise]) - end - def self.create_from_omniauth(auth_hash, authorization) auth_provider_adaptor(auth_hash['provider']).create_from_omniauth(auth_hash).tap do |user| user.authorizations << authorization From 7c5453f4748b840fc2a62a8360a734ab3de73a99 Mon Sep 17 00:00:00 2001 From: Adam Coffman Date: Wed, 23 Aug 2023 09:41:55 -0500 Subject: [PATCH 05/14] add a little validation and hinting for proper social media handle entry --- .../forms/user-profile/user-profile.form.html | 46 ++++++++++++------- .../forms/user-profile/user-profile.module.ts | 2 + server/app/graphql/mutations/edit_user.rb | 12 +++-- server/app/models/user.rb | 10 ++++ 4 files changed, 48 insertions(+), 22 deletions(-) diff --git a/client/src/app/forms/user-profile/user-profile.form.html b/client/src/app/forms/user-profile/user-profile.form.html index febc1026b..0d1419291 100644 --- a/client/src/app/forms/user-profile/user-profile.form.html +++ b/client/src/app/forms/user-profile/user-profile.form.html @@ -71,10 +71,13 @@ ORCID Identifier - + + + Personal Website @@ -84,25 +87,34 @@ style="width: 100%" /> - Twitter Handle - + X/Twitter Handle + + + Facebook Profile - + + + LinkedIn Profile - + + +