diff --git a/.github/workflows/end-to-end-test-portals.yml b/.github/workflows/end-to-end-test-portals.yml index b1d0648452..0f965e2989 100644 --- a/.github/workflows/end-to-end-test-portals.yml +++ b/.github/workflows/end-to-end-test-portals.yml @@ -29,7 +29,6 @@ jobs: elportal, genie, nf, - psychencode, stopadportal, ] runs-on: ubuntu-latest diff --git a/apps/portals-e2e/src/configs/bannersConfig.ts b/apps/portals-e2e/src/configs/bannersConfig.ts index 8f7d51e812..6c9097c0d5 100644 --- a/apps/portals-e2e/src/configs/bannersConfig.ts +++ b/apps/portals-e2e/src/configs/bannersConfig.ts @@ -15,7 +15,6 @@ const bannerConfig: BannerConfig = { digitalhealth: ['cookies'], elportal: ['cookies', 'beta'], nf: ['cookies', 'survey'], - psychencode: ['cookies'], stopadportal: ['cookies'], genie: ['cookies', 'survey'], } diff --git a/apps/portals-e2e/src/configs/exploreConfig.ts b/apps/portals-e2e/src/configs/exploreConfig.ts index f529d0b162..e1fb3ad7dd 100644 --- a/apps/portals-e2e/src/configs/exploreConfig.ts +++ b/apps/portals-e2e/src/configs/exploreConfig.ts @@ -61,12 +61,6 @@ const exploreConfig: ExploreConfig = { cards: ['Initiatives'], cards_charts: ['Studies', 'Datasets', 'Publications', 'Tools', 'Hackathon'], }, - psychencode: { - table_charts: ['Data'], - cards: ['Publications'], - cards_charts: ['Studies', 'Grants'], - people_charts: ['People'], - }, stopadportal: {}, genie: { // getByRole('tab', { name: 'GENIE' }) resolves to 2 elements (the GENIE tab and GENIE-BPC tab) diff --git a/apps/portals-e2e/src/configs/routesConfig.ts b/apps/portals-e2e/src/configs/routesConfig.ts index 848bea7971..d418262bd6 100644 --- a/apps/portals-e2e/src/configs/routesConfig.ts +++ b/apps/portals-e2e/src/configs/routesConfig.ts @@ -8,7 +8,6 @@ export type Portal = | 'elportal' | 'genie' | 'nf' - | 'psychencode' | 'stopadportal' type RouteButtonsLinks = { buttons: string[]; links: string[] } @@ -61,10 +60,6 @@ const routesConfig: RouteConfig = { ], links: ['Contribute Data', 'News', 'Help'], }, - psychencode: { - buttons: ['Home', 'Explore', 'Sign In'], - links: ['Data Access', 'News', 'About', 'Help'], - }, stopadportal: { buttons: ['Help', 'Sign In'], links: ['Home', 'Apply'], diff --git a/apps/portals/crc-researcher/.env b/apps/portals/crc-researcher/.env deleted file mode 100644 index 47ba3821c7..0000000000 --- a/apps/portals/crc-researcher/.env +++ /dev/null @@ -1,3 +0,0 @@ -VITE_PORTAL_NAME="Participant Manager" -VITE_PORTAL_DESCRIPTION="Covid Recovery Corps Participant Manager" -VITE_PORTAL_KEY="crc-researcher" diff --git a/apps/portals/crc-researcher/index.html b/apps/portals/crc-researcher/index.html deleted file mode 100644 index 400bf54bd4..0000000000 --- a/apps/portals/crc-researcher/index.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - - <%- headContent %> - - - - - - <%- gtmNoscript %> - -
- - diff --git a/apps/portals/crc-researcher/package.json b/apps/portals/crc-researcher/package.json deleted file mode 100644 index f425c51c0d..0000000000 --- a/apps/portals/crc-researcher/package.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "crc-researcher", - "version": "0.0.0", - "private": true, - "type": "module", - "dependencies": { - "@sage-bionetworks/synapse-types": "workspace:*", - "katex": "^0.16.10", - "@sage-bionetworks/synapse-portal-framework": "workspace:*", - "react": "^18.2.0", - "react-dom": "^18.2.0", - "react-router-dom": "^5.3.4", - "synapse-react-client": "workspace:*", - "vite": "^5.4.3" - }, - "devDependencies": { - "@types/react": "18.2.64", - "@types/react-dom": "18.0.6", - "sass": "^1.72.0", - "tslib": "^2.6.2", - "typescript": "^5.5.2", - "vite-config": "workspace:*", - "vitest": "^1.6.0" - }, - "scripts": { - "start": "vite", - "build": "pnpm save-build-date && vite build && pnpm run generate-sitemap crc-researcher", - "preview": "vite preview", - "type-check": "tsc", - "lint": "eslint src", - "_generate-sitemap": "node ../../synapse-portal-framework/sitemap/generate-sitemap.cjs \\\"$VITE_PORTAL_KEY\\\"", - "generate-sitemap": "dotenv -- pnpm _generate-sitemap", - "save-build-date": "mkdir -p public && date > public/build-date.txt" - } -} diff --git a/apps/portals/crc-researcher/src/App.scss b/apps/portals/crc-researcher/src/App.scss deleted file mode 100644 index ae9961c79f..0000000000 --- a/apps/portals/crc-researcher/src/App.scss +++ /dev/null @@ -1,7 +0,0 @@ -// Load variable_overrides first, so correct values for variables will be applied to the rest of the styles -@use './config/style/variable_overrides'; - -@use '@sage-bionetworks/synapse-portal-framework/src/style/App'; - -// style_overrides should be last to ensure its styles have highest priority -@use './config/style/style_overrides'; diff --git a/apps/portals/crc-researcher/src/config/columnAliases.ts b/apps/portals/crc-researcher/src/config/columnAliases.ts deleted file mode 100644 index 910b98c5f2..0000000000 --- a/apps/portals/crc-researcher/src/config/columnAliases.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - exampleColumn: 'Example Display Column Name', -} diff --git a/apps/portals/crc-researcher/src/config/footerConfig.ts b/apps/portals/crc-researcher/src/config/footerConfig.ts deleted file mode 100644 index 1d7763648d..0000000000 --- a/apps/portals/crc-researcher/src/config/footerConfig.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { FooterConfig } from '@sage-bionetworks/synapse-portal-framework/types/portal-config' - -const footer: FooterConfig = { - contactUs: 'mailto:synapseinfo@sagebionetworks.org', -} - -export default footer diff --git a/apps/portals/crc-researcher/src/config/handleParticipantWorkflowChange.tsx b/apps/portals/crc-researcher/src/config/handleParticipantWorkflowChange.tsx deleted file mode 100644 index f31b2e0b01..0000000000 --- a/apps/portals/crc-researcher/src/config/handleParticipantWorkflowChange.tsx +++ /dev/null @@ -1,60 +0,0 @@ -import { - PartialRow, - TableUpdateTransactionRequest, -} from '@sage-bionetworks/synapse-types' -import { CustomControlCallbackData, SynapseClient } from 'synapse-react-client' - -const handleParticipantWorkflowChange = async ( - event: CustomControlCallbackData, - newWorkflowState: string, -) => { - // Demo custom control updates all values in a particular column for the selected rows (CRC) - // test Updating a Synapse Table for the first time from SRC, by updating the WorkflowState column value - const entityId: string = event.tableId - // find target column - const targetColumn = event.queryMetadata?.columnModels!.find( - (cm: any) => cm.name === 'WorkflowState', - ) - // collect all selected rows (create PartialRow objects) - const rowUpdates: PartialRow[] = [] - for (let index = 0; index < event.selectedRows!.length; index++) { - rowUpdates.push({ - rowId: event.selectedRows![index].rowId!, - values: [ - { - key: targetColumn?.id!, - value: newWorkflowState, - }, - ], - }) - } - - const request: TableUpdateTransactionRequest = { - concreteType: - 'org.sagebionetworks.repo.model.table.TableUpdateTransactionRequest', - entityId, - changes: [ - { - concreteType: - 'org.sagebionetworks.repo.model.table.AppendableRowSetRequest', - entityId, - toAppend: { - concreteType: 'org.sagebionetworks.repo.model.table.PartialRowSet', - tableId: entityId, - rows: rowUpdates, - }, - }, - ], - } - const token = await SynapseClient.getAccessTokenFromCookie() - SynapseClient.updateTable(request, token) - .then(() => { - // refresh data after successful update - event.refresh() - }) - .catch(err => { - console.error(err) - }) -} - -export default handleParticipantWorkflowChange diff --git a/apps/portals/crc-researcher/src/config/headerConfig.tsx b/apps/portals/crc-researcher/src/config/headerConfig.tsx deleted file mode 100644 index bf2dde719f..0000000000 --- a/apps/portals/crc-researcher/src/config/headerConfig.tsx +++ /dev/null @@ -1,10 +0,0 @@ -import React from 'react' -import { HomePageHeaderConfig } from '@sage-bionetworks/synapse-portal-framework/types/portal-config' - -const homePageHeader: HomePageHeaderConfig = { - summary: <>, - title: 'Welcome to the Covid Recovery Corps Participant Manager', - showBlur: false, -} - -export default homePageHeader diff --git a/apps/portals/crc-researcher/src/config/logoFooterConfig.ts b/apps/portals/crc-researcher/src/config/logoFooterConfig.ts deleted file mode 100644 index f311446374..0000000000 --- a/apps/portals/crc-researcher/src/config/logoFooterConfig.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { LogoConfig } from '@sage-bionetworks/synapse-portal-framework/types/portal-config' -const logo: LogoConfig = { - name: 'Participant Manager', -} -export default logo diff --git a/apps/portals/crc-researcher/src/config/logoHeaderConfig.ts b/apps/portals/crc-researcher/src/config/logoHeaderConfig.ts deleted file mode 100644 index 2eb4985ff1..0000000000 --- a/apps/portals/crc-researcher/src/config/logoHeaderConfig.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { LogoConfig } from '@sage-bionetworks/synapse-portal-framework/types/portal-config' - -const logoHeader: LogoConfig = { - name: 'Participant Manager', -} -export default logoHeader diff --git a/apps/portals/crc-researcher/src/config/paletteConfig.ts b/apps/portals/crc-researcher/src/config/paletteConfig.ts deleted file mode 100644 index 3bb2c5ecab..0000000000 --- a/apps/portals/crc-researcher/src/config/paletteConfig.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { Palettes } from 'synapse-react-client' - -const palette = Palettes.crcResearcherPortalPalette - -export default palette diff --git a/apps/portals/crc-researcher/src/config/routeControlWrapperProps.ts b/apps/portals/crc-researcher/src/config/routeControlWrapperProps.ts deleted file mode 100644 index a2a54f8a28..0000000000 --- a/apps/portals/crc-researcher/src/config/routeControlWrapperProps.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { RouteControlWrapperProps } from '@sage-bionetworks/synapse-portal-framework/components/RouteControlWrapper' -import { - hidden, - invited, - potential, - scheduled, - tested, - uncategorized, -} from './synapseConfigs' -const routeControlProps: RouteControlWrapperProps = { - customRoutes: [ - { path: '1. Uncategorized', synapseConfigArray: [uncategorized] }, - { path: '2. Potential', synapseConfigArray: [potential] }, - { path: '3. Invited', synapseConfigArray: [invited] }, - { path: '4. Scheduled', synapseConfigArray: [scheduled] }, - { path: '5. Tested', synapseConfigArray: [tested] }, - { path: 'Hidden', synapseConfigArray: [hidden] }, - ], -} - -export default routeControlProps diff --git a/apps/portals/crc-researcher/src/config/routesConfig.ts b/apps/portals/crc-researcher/src/config/routesConfig.ts deleted file mode 100644 index 5aa9abf7c2..0000000000 --- a/apps/portals/crc-researcher/src/config/routesConfig.ts +++ /dev/null @@ -1,88 +0,0 @@ -import { GenericRoute } from '@sage-bionetworks/synapse-portal-framework/types/portal-config' -import RouteControlWrapperProps from './routeControlWrapperProps' - -const routes: GenericRoute[] = [ - { - path: '', - exact: true, - synapseConfigArray: [ - { - name: 'SurveysCompletedPlots', - isOutsideContainer: true, - props: {}, - }, - { - name: 'ParticipantsBarPlot', - isOutsideContainer: true, - props: {}, - }, - { - name: 'StatusLineChart', - isOutsideContainer: true, - props: { - style: { paddingTop: 10, paddingBottom: 50 }, - }, - }, - { - name: 'SynapsePlot', - isOutsideContainer: false, - props: { - synapsePlotWidgetParams: { - query: - 'SELECT "date", CONTACT as "New accounts created", survey_1 as "Completed Survey 1", survey_2 as "Completed Survey 2", survey_3 as "Completed Survey 3", survey_4 as "Completed Survey 4" FROM syn22314856', - title: 'New Participants Per Survey Per Day', - xtitle: 'Date', - ytitle: 'Count', - type: 'scatter', - horizontal: true, - // xaxistype:, - showlegend: true, - }, - }, - }, - ], - }, - { - path: 'Explore', - routes: [ - { - path: ':slug/', - hideRouteFromNavbar: true, - exact: true, - synapseConfigArray: [ - { - name: 'RouteControlWrapper', - isOutsideContainer: true, - props: RouteControlWrapperProps, - }, - ], - }, - { - path: '1. Uncategorized', - hideRouteFromNavbar: false, - }, - { - path: '2. Potential', - hideRouteFromNavbar: false, - }, - { - path: '3. Invited', - hideRouteFromNavbar: false, - }, - { - path: '4. Scheduled', - hideRouteFromNavbar: false, - }, - { - path: '5. Tested', - hideRouteFromNavbar: false, - }, - { - path: 'Hidden', - hideRouteFromNavbar: false, - }, - ], - }, -] - -export default routes diff --git a/apps/portals/crc-researcher/src/config/scripts/exportS3ProductionBucketName.sh b/apps/portals/crc-researcher/src/config/scripts/exportS3ProductionBucketName.sh deleted file mode 100644 index a4dd3f7be6..0000000000 --- a/apps/portals/crc-researcher/src/config/scripts/exportS3ProductionBucketName.sh +++ /dev/null @@ -1 +0,0 @@ -export S3_PRODUCTION_BUCK_LOCATION=s3://prod.covidrecoverycorpsresearcher.synapse.org \ No newline at end of file diff --git a/apps/portals/crc-researcher/src/config/scripts/exportS3StagingBucketName.sh b/apps/portals/crc-researcher/src/config/scripts/exportS3StagingBucketName.sh deleted file mode 100644 index ec9a76e67b..0000000000 --- a/apps/portals/crc-researcher/src/config/scripts/exportS3StagingBucketName.sh +++ /dev/null @@ -1 +0,0 @@ -export S3_STAGING_BUCKET_LOCATION=s3://staging.covidrecoverycorpsresearcher.synapse.org \ No newline at end of file diff --git a/apps/portals/crc-researcher/src/config/style/_style_overrides.scss b/apps/portals/crc-researcher/src/config/style/_style_overrides.scss deleted file mode 100644 index e8d1e6cd50..0000000000 --- a/apps/portals/crc-researcher/src/config/style/_style_overrides.scss +++ /dev/null @@ -1,19 +0,0 @@ -@use '@sage-bionetworks/synapse-portal-framework/src/style/variables' as Portal; - -#header, -#footer { - background-blend-mode: multiply; -} - -.SynapseTable td { - .markdown.markdown-inline { - a { - white-space: nowrap; - } - - a::after { - font-family: 'Font Awesome 5 Free'; - content: '\f35d'; - } - } -} diff --git a/apps/portals/crc-researcher/src/config/style/_variable_overrides.scss b/apps/portals/crc-researcher/src/config/style/_variable_overrides.scss deleted file mode 100644 index 3fe31bbfce..0000000000 --- a/apps/portals/crc-researcher/src/config/style/_variable_overrides.scss +++ /dev/null @@ -1,6 +0,0 @@ -@use '@sage-bionetworks/synapse-portal-framework/src/style/variables' with ( - $primary-action-color: #0085ff, - $secondary-action-color: #0085ff, - $header-url: 'dna_header.svg', - $footer-url: 'dna.svg' -); diff --git a/apps/portals/crc-researcher/src/config/style/dna.svg b/apps/portals/crc-researcher/src/config/style/dna.svg deleted file mode 100755 index d94bab19c9..0000000000 --- a/apps/portals/crc-researcher/src/config/style/dna.svg +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/apps/portals/crc-researcher/src/config/style/dna_header.svg b/apps/portals/crc-researcher/src/config/style/dna_header.svg deleted file mode 100755 index 9a560f0cd5..0000000000 --- a/apps/portals/crc-researcher/src/config/style/dna_header.svg +++ /dev/null @@ -1,179 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/apps/portals/crc-researcher/src/config/synapseConfigs/hidden.ts b/apps/portals/crc-researcher/src/config/synapseConfigs/hidden.ts deleted file mode 100644 index 76db289e73..0000000000 --- a/apps/portals/crc-researcher/src/config/synapseConfigs/hidden.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { SynapseConfig } from '@sage-bionetworks/synapse-portal-framework/types/portal-config' -import columnAliases from '../columnAliases' -import handleParticipantWorkflowChange from '../handleParticipantWorkflowChange' -import { baseDataSql, allFacetsToPlot } from './uncategorized' - -const rgbIndex = 0 -export const dataSql = `${baseDataSql} 'Hidden'` -const sql = dataSql - -export const hidden: SynapseConfig = { - name: 'QueryWrapperPlotNav', - props: { - rgbIndex, - shouldDeepLink: true, - sql, - name: 'Hidden Participants', - columnAliases, - facetsToPlot: allFacetsToPlot, - tableConfiguration: {}, - isRowSelectionVisible: true, - visibleColumnCount: 10, - customControls: [ - { - buttonText: 'Unhide', - classNames: 'exampleClassNameToAddToButton', - onClick: event => { - handleParticipantWorkflowChange(event, 'Uncategorized') - }, - }, - ], - }, -} - -export default hidden diff --git a/apps/portals/crc-researcher/src/config/synapseConfigs/index.ts b/apps/portals/crc-researcher/src/config/synapseConfigs/index.ts deleted file mode 100644 index adb8019ea1..0000000000 --- a/apps/portals/crc-researcher/src/config/synapseConfigs/index.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { uncategorized } from './uncategorized' -import { potential } from './potential' -import { hidden } from './hidden' -import { invited } from './invited' -import { scheduled } from './scheduled' -import { tested } from './tested' - -export { uncategorized, potential, invited, scheduled, tested, hidden } - -export default { uncategorized, potential, invited, scheduled, tested, hidden } diff --git a/apps/portals/crc-researcher/src/config/synapseConfigs/invited.ts b/apps/portals/crc-researcher/src/config/synapseConfigs/invited.ts deleted file mode 100644 index 8a69ae9284..0000000000 --- a/apps/portals/crc-researcher/src/config/synapseConfigs/invited.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { SynapseConfig } from '@sage-bionetworks/synapse-portal-framework/types/portal-config' -import columnAliases from '../columnAliases' -import { - baseDataSqlColumns, - baseDataSqlFrom, - baseDataSqlWhere, - allFacetsToPlot, -} from './uncategorized' - -const rgbIndex = 0 -export const dataSql = `SELECT inviteSentOn, ${baseDataSqlColumns} ${baseDataSqlFrom} ${baseDataSqlWhere} 'Invited'` -const sql = dataSql - -export const invited: SynapseConfig = { - name: 'QueryWrapperPlotNav', - props: { - rgbIndex, - shouldDeepLink: true, - sql, - name: 'Invited Participants', - columnAliases, - tableConfiguration: {}, - facetsToPlot: allFacetsToPlot, - }, -} - -export default invited diff --git a/apps/portals/crc-researcher/src/config/synapseConfigs/potential.ts b/apps/portals/crc-researcher/src/config/synapseConfigs/potential.ts deleted file mode 100644 index fc2fc65443..0000000000 --- a/apps/portals/crc-researcher/src/config/synapseConfigs/potential.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { SynapseConfig } from '@sage-bionetworks/synapse-portal-framework/types/portal-config' -import columnAliases from '../columnAliases' -import handleParticipantWorkflowChange from '../handleParticipantWorkflowChange' -import { baseDataSql, allFacetsToPlot } from './uncategorized' - -const rgbIndex = 0 -export const dataSql = `${baseDataSql} 'Potential'` -const sql = dataSql - -export const potential: SynapseConfig = { - name: 'QueryWrapperPlotNav', - props: { - rgbIndex, - shouldDeepLink: true, - sql, - name: 'Potential Participants', - columnAliases, - facetsToPlot: allFacetsToPlot, - tableConfiguration: {}, - isRowSelectionVisible: true, - visibleColumnCount: 10, - customControls: [ - { - buttonText: 'Send lab invitation', - classNames: 'exampleClassNameToAddToButton', - onClick: event => { - handleParticipantWorkflowChange(event, 'Invited') - }, - }, - { - buttonText: 'Move to uncategorized', - classNames: 'exampleClassNameToAddToButton', - onClick: event => { - handleParticipantWorkflowChange(event, 'Uncategorized') - }, - }, - ], - }, -} - -export default potential diff --git a/apps/portals/crc-researcher/src/config/synapseConfigs/scheduled.ts b/apps/portals/crc-researcher/src/config/synapseConfigs/scheduled.ts deleted file mode 100644 index 91afecfaf7..0000000000 --- a/apps/portals/crc-researcher/src/config/synapseConfigs/scheduled.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { SynapseConfig } from '@sage-bionetworks/synapse-portal-framework/types/portal-config' -import columnAliases from '../columnAliases' -import { - baseDataSqlColumns, - baseDataSqlFrom, - baseDataSqlWhere, - allFacetsToPlot, -} from './uncategorized' - -const rgbIndex = 0 -export const dataSql = `SELECT scheduledLabDrawOn, ${baseDataSqlColumns}, noShow ${baseDataSqlFrom} ${baseDataSqlWhere} 'Scheduled'` -const sql = dataSql - -export const scheduled: SynapseConfig = { - name: 'QueryWrapperPlotNav', - props: { - rgbIndex, - shouldDeepLink: true, - sql, - name: 'Scheduled Participants', - columnAliases, - tableConfiguration: {}, - facetsToPlot: allFacetsToPlot, - }, -} - -export default scheduled diff --git a/apps/portals/crc-researcher/src/config/synapseConfigs/tested.ts b/apps/portals/crc-researcher/src/config/synapseConfigs/tested.ts deleted file mode 100644 index bd5e0d87e5..0000000000 --- a/apps/portals/crc-researcher/src/config/synapseConfigs/tested.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { SynapseConfig } from '@sage-bionetworks/synapse-portal-framework/types/portal-config' -import columnAliases from '../columnAliases' -import { - baseDataSqlColumns, - baseDataSqlFrom, - baseDataSqlWhere, - allFacetsToPlot, -} from './uncategorized' - -const rgbIndex = 0 -export const dataSql = `SELECT ${baseDataSqlColumns} ${baseDataSqlFrom} ${baseDataSqlWhere} 'Results Ready'` -const sql = dataSql - -export const tested: SynapseConfig = { - name: 'QueryWrapperPlotNav', - props: { - rgbIndex, - shouldDeepLink: true, - sql, - name: 'Tested Participants', - columnAliases, - tableConfiguration: {}, - facetsToPlot: allFacetsToPlot, - }, -} - -export default tested diff --git a/apps/portals/crc-researcher/src/config/synapseConfigs/uncategorized.ts b/apps/portals/crc-researcher/src/config/synapseConfigs/uncategorized.ts deleted file mode 100644 index fef902a092..0000000000 --- a/apps/portals/crc-researcher/src/config/synapseConfigs/uncategorized.ts +++ /dev/null @@ -1,82 +0,0 @@ -import { SynapseConfig } from '@sage-bionetworks/synapse-portal-framework/types/portal-config' -import columnAliases from '../columnAliases' -import handleParticipantWorkflowChange from '../handleParticipantWorkflowChange' - -const rgbIndex = 0 - -export const baseDataSqlColumns = `symptom, - firstDayOfSymptoms, - lastDayOfSymptoms, - worstDayOfSymptoms, - dontFeelBetter, - recoveryDateOfSymptoms, - stillHaveSymptoms, - testType, - feverHighest, - otherSpecify, - howWasItTreated, - gender, - age, - ethnicity, - zipcode, - nasalSwabDate, - nasalSwabResult, - serumTestDate, - serumTestResult, - uploadDate, - healthCode, - recordId, - testLocation, - dataGroups, - how_heard, - allSurveysComplete` - -export const baseDataSqlFrom = ` FROM syn22154087 ` -export const baseDataSqlWhere = ` WHERE testLocation IN ('lab', 'home', 'noTest') AND dataGroups NOT HAS ('test_user') AND allSurveysComplete = 'TRUE' AND WorkflowState = ` - -export const baseDataSql = `SELECT ${baseDataSqlColumns} ${baseDataSqlFrom} ${baseDataSqlWhere} ` - -export const allFacetsToPlot = [ - 'gender', - 'ethnicity', - 'testType', - 'zipcode', - 'symptom', - 'testLocation', - 'nasalSwabResult', - 'serumTestResult', -] -export const dataSql = `${baseDataSql} 'Uncategorized'` -const sql = dataSql - -export const uncategorized: SynapseConfig = { - name: 'QueryWrapperPlotNav', - props: { - rgbIndex, - shouldDeepLink: true, - sql, - name: 'Uncategorized Participants', - columnAliases, - tableConfiguration: {}, - isRowSelectionVisible: true, - facetsToPlot: allFacetsToPlot, - customControls: [ - { - buttonText: 'Select as potential', - classNames: 'exampleClassNameToAddToButton', - onClick: event => { - handleParticipantWorkflowChange(event, 'Potential') - }, - }, - { - buttonText: 'Hide from view', - classNames: 'exampleClassNameToAddToButton', - onClick: event => { - handleParticipantWorkflowChange(event, 'Hidden') - }, - }, - ], - }, -} - -export default uncategorized diff --git a/apps/portals/crc-researcher/src/index.tsx b/apps/portals/crc-researcher/src/index.tsx deleted file mode 100644 index 33c1a1b992..0000000000 --- a/apps/portals/crc-researcher/src/index.tsx +++ /dev/null @@ -1,32 +0,0 @@ -import React from 'react' -import { createRoot } from 'react-dom/client' -import Portal from '@sage-bionetworks/synapse-portal-framework' -import palette from './config/paletteConfig' -import routes from './config/routesConfig' -import footerConfig from './config/footerConfig' -import logoHeaderConfig from './config/logoHeaderConfig' -import logoFooterConfig from './config/logoFooterConfig' - -// KaTeX CSS is not included in the SRC style bundle since it includes many large font files. -import 'katex/dist/katex.css' - -import './App.scss' -import headerConfig from './config/headerConfig' - -const container = document.getElementById('root') - -const root = createRoot(container!) - -root.render( - - - , -) diff --git a/apps/portals/crc-researcher/src/svg.d.ts b/apps/portals/crc-researcher/src/svg.d.ts deleted file mode 100644 index 29cf98cda4..0000000000 --- a/apps/portals/crc-researcher/src/svg.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -declare module '*.svg' { - import React from 'react' - - export const ReactComponent: React.FunctionComponent< - React.SVGProps & { title?: string } - > -} diff --git a/apps/portals/crc-researcher/src/types.d.ts b/apps/portals/crc-researcher/src/types.d.ts deleted file mode 100644 index 611afcc60f..0000000000 --- a/apps/portals/crc-researcher/src/types.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -/// -interface ImportMetaEnv { - readonly VITE_PORTAL_NAME: string - readonly VITE_PORTAL_DESCRIPTION: string - readonly VITE_PORTAL_KEY: string -} - -interface ImportMeta { - readonly env: ImportMetaEnv -} - -// Import MUI type augmentations from 'synapse-react-client' so we can use custom property values defined for our MUI theme -import 'synapse-react-client/ThemeTypes' diff --git a/apps/portals/crc-researcher/tsconfig.json b/apps/portals/crc-researcher/tsconfig.json deleted file mode 100644 index b0ca5ea852..0000000000 --- a/apps/portals/crc-researcher/tsconfig.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "extends": "../../../shared/tsconfig.base.json", - "compilerOptions": { - "baseUrl": ".", - "lib": ["dom", "dom.iterable", "esnext"], - "noImplicitAny": false, - "moduleResolution": "bundler", - "types": ["vite/client"], - "paths": { - "@sage-bionetworks/synapse-portal-framework": [ - "../../synapse-portal-framework/src" - ], - "@sage-bionetworks/synapse-portal-framework/*": [ - "../../synapse-portal-framework/src/*" - ] - } - }, - "include": ["src/**/*.tsx", "src/**/*.ts"], - "files": ["src/types.d.ts"] -} diff --git a/apps/portals/crc-researcher/vite.config.ts b/apps/portals/crc-researcher/vite.config.ts deleted file mode 100644 index bd2599888e..0000000000 --- a/apps/portals/crc-researcher/vite.config.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { portalsViteConfig } from 'vite-config' -import { mergeConfig } from 'vite' -import { resolve } from 'path' - -const projectRootDir = resolve(__dirname) - -// Unless absolutely necessary, all changes should go into the shared vite configuration, not the individual portal configuration -export default mergeConfig(portalsViteConfig, { - // TODO: PORTALS-3159 - // Until we create a build/exports strategy for synapse-portal-framework, we have to create an alias so Vite can resolve the module - // This must be configured for each file because it depends on the projectRootDir - resolve: { - alias: [ - { - find: /^@sage-bionetworks\/synapse-portal-framework$/, - replacement: resolve( - projectRootDir, - '../../synapse-portal-framework/src/index.ts', - ), - }, - { - find: /@sage-bionetworks\/synapse-portal-framework/, - replacement: resolve(projectRootDir, '../../synapse-portal-framework'), - }, - ], - }, -}) diff --git a/apps/portals/psychencode/.env b/apps/portals/psychencode/.env deleted file mode 100644 index b97b7f0f60..0000000000 --- a/apps/portals/psychencode/.env +++ /dev/null @@ -1,3 +0,0 @@ -VITE_PORTAL_NAME="Welcome to the PsychENCODE Knowledge Portal" -VITE_PORTAL_DESCRIPTION="Learn more about the PsychENCODE Consortium’s investigation of genomic influences on neuropsychiatric disease and download large-scale data sets generated by the initiative." -VITE_PORTAL_KEY="psychencode" diff --git a/apps/portals/psychencode/index.html b/apps/portals/psychencode/index.html deleted file mode 100644 index 400bf54bd4..0000000000 --- a/apps/portals/psychencode/index.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - - <%- headContent %> - - - - - - <%- gtmNoscript %> - -
- - diff --git a/apps/portals/psychencode/package.json b/apps/portals/psychencode/package.json deleted file mode 100644 index ad750f9a62..0000000000 --- a/apps/portals/psychencode/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "psychencode", - "version": "0.0.0", - "private": true, - "type": "module", - "dependencies": { - "@sage-bionetworks/synapse-types": "workspace:*", - "katex": "^0.16.10", - "pluralize": "^8.0.0", - "@sage-bionetworks/synapse-portal-framework": "workspace:*", - "react": "^18.2.0", - "react-dom": "^18.2.0", - "react-router-dom": "^5.3.4", - "synapse-react-client": "workspace:*", - "vite": "^5.4.3" - }, - "devDependencies": { - "@types/react": "18.2.64", - "@types/react-dom": "18.0.6", - "sass": "^1.72.0", - "tslib": "^2.6.2", - "typescript": "^5.5.2", - "vite-config": "workspace:*", - "vitest": "^1.6.0" - }, - "scripts": { - "start": "vite", - "build": "pnpm save-build-date && vite build && pnpm run generate-sitemap psychencode", - "preview": "vite preview", - "type-check": "tsc", - "lint": "eslint src", - "_generate-sitemap": "node ../../synapse-portal-framework/sitemap/generate-sitemap.cjs \\\"$VITE_PORTAL_KEY\\\"", - "generate-sitemap": "dotenv -- pnpm _generate-sitemap", - "save-build-date": "mkdir -p public && date > public/build-date.txt" - } -} diff --git a/apps/portals/psychencode/public/favicon.svg b/apps/portals/psychencode/public/favicon.svg deleted file mode 100644 index 5709074eac..0000000000 --- a/apps/portals/psychencode/public/favicon.svg +++ /dev/null @@ -1,133 +0,0 @@ - - - - - PsychENCODE Logo - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/apps/portals/psychencode/public/logo.svg b/apps/portals/psychencode/public/logo.svg deleted file mode 100644 index 8ddf38204a..0000000000 --- a/apps/portals/psychencode/public/logo.svg +++ /dev/null @@ -1 +0,0 @@ -Asset 2FNL \ No newline at end of file diff --git a/apps/portals/psychencode/public/socialmedia.png b/apps/portals/psychencode/public/socialmedia.png deleted file mode 100644 index 4ca8e6de72..0000000000 Binary files a/apps/portals/psychencode/public/socialmedia.png and /dev/null differ diff --git a/apps/portals/psychencode/src/App.scss b/apps/portals/psychencode/src/App.scss deleted file mode 100644 index ae9961c79f..0000000000 --- a/apps/portals/psychencode/src/App.scss +++ /dev/null @@ -1,7 +0,0 @@ -// Load variable_overrides first, so correct values for variables will be applied to the rest of the styles -@use './config/style/variable_overrides'; - -@use '@sage-bionetworks/synapse-portal-framework/src/style/App'; - -// style_overrides should be last to ensure its styles have highest priority -@use './config/style/style_overrides'; diff --git a/apps/portals/psychencode/src/config/footerConfig.ts b/apps/portals/psychencode/src/config/footerConfig.ts deleted file mode 100644 index 891c0efb47..0000000000 --- a/apps/portals/psychencode/src/config/footerConfig.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { FooterConfig } from '@sage-bionetworks/synapse-portal-framework/types/portal-config' - -const footer: FooterConfig = { - contactUs: 'mailto:info@psychencode.org', -} - -export default footer diff --git a/apps/portals/psychencode/src/config/headerConfig.ts b/apps/portals/psychencode/src/config/headerConfig.ts deleted file mode 100644 index 29288006fa..0000000000 --- a/apps/portals/psychencode/src/config/headerConfig.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { HomePageHeaderConfig } from '@sage-bionetworks/synapse-portal-framework/types/portal-config' - -const homePageHeader: HomePageHeaderConfig = { - summary: `Learn more about the PsychENCODE Consortium’s investigation of genomic influences on neuropsychiatric disease and download large-scale data sets generated by the initiative.`, - title: 'Welcome to the PsychENCODE Knowledge Portal', -} - -export default homePageHeader diff --git a/apps/portals/psychencode/src/config/logoFooterConfig.ts b/apps/portals/psychencode/src/config/logoFooterConfig.ts deleted file mode 100644 index 96236b0fca..0000000000 --- a/apps/portals/psychencode/src/config/logoFooterConfig.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { LogoConfig } from '@sage-bionetworks/synapse-portal-framework/types/portal-config' -import iconFooterSvg from './style/iconFooter.svg?url' -const logo: LogoConfig = { - icon: iconFooterSvg, -} -export default logo diff --git a/apps/portals/psychencode/src/config/logoHeaderConfig.ts b/apps/portals/psychencode/src/config/logoHeaderConfig.ts deleted file mode 100644 index 594478e2a2..0000000000 --- a/apps/portals/psychencode/src/config/logoHeaderConfig.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { LogoConfig } from '@sage-bionetworks/synapse-portal-framework/types/portal-config' -import icon from '/logo.svg?url' - -const logoHeader: LogoConfig = { - icon, -} -export default logoHeader diff --git a/apps/portals/psychencode/src/config/paletteConfig.ts b/apps/portals/psychencode/src/config/paletteConfig.ts deleted file mode 100644 index db6bc7b806..0000000000 --- a/apps/portals/psychencode/src/config/paletteConfig.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { Palettes } from 'synapse-react-client' - -const palette = Palettes.psychEncodePortalPalette - -export default palette diff --git a/apps/portals/psychencode/src/config/resources.ts b/apps/portals/psychencode/src/config/resources.ts deleted file mode 100644 index 87d9514ba7..0000000000 --- a/apps/portals/psychencode/src/config/resources.ts +++ /dev/null @@ -1,11 +0,0 @@ -// Portal owners can change the versions of the resources by modifying the -// version of the entity used in the sql below - -const dataSynId = 'syn20821313.15' -export const studiesSql = 'SELECT * FROM syn21783965.11' -export const dataSql = `SELECT * FROM ${dataSynId}` -export const metadataSql = `SELECT id, metadataType, dataType, assay FROM ${dataSynId} WHERE "resourceType" = 'metadata'` -export const peopleSql = 'SELECT * FROM syn22096112.4' -export const grantSql = 'SELECT * FROM syn22096130.5' -export const publicationSql = 'SELECT * FROM syn22095937.7 order by authors asc' -export const upsetplotSql = `SELECT unnest(individualID), assay FROM ${dataSynId} WHERE individualID is not null GROUP BY assay, unnest(individualID)` diff --git a/apps/portals/psychencode/src/config/routeControlWrapperProps.ts b/apps/portals/psychencode/src/config/routeControlWrapperProps.ts deleted file mode 100644 index 50dc9cfc32..0000000000 --- a/apps/portals/psychencode/src/config/routeControlWrapperProps.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { RouteControlWrapperProps } from '@sage-bionetworks/synapse-portal-framework/components/RouteControlWrapper' -import { studies } from './synapseConfigs/studies' -import { data } from './synapseConfigs/data' -import { grants } from './synapseConfigs/grants' -import { publications } from './synapseConfigs/publications' -import { people } from './synapseConfigs/people' - -const routeControlProps: RouteControlWrapperProps = { - customRoutes: [ - { path: 'Studies', synapseConfigArray: [studies] }, - { path: 'Data', synapseConfigArray: [data] }, - { path: 'Grants', synapseConfigArray: [grants] }, - { path: 'Publications', synapseConfigArray: [publications] }, - { path: 'People', synapseConfigArray: [people] }, - ], -} - -export default routeControlProps diff --git a/apps/portals/psychencode/src/config/routesConfig.ts b/apps/portals/psychencode/src/config/routesConfig.ts deleted file mode 100644 index 12c560f64f..0000000000 --- a/apps/portals/psychencode/src/config/routesConfig.ts +++ /dev/null @@ -1,199 +0,0 @@ -import { GenericRoute } from '@sage-bionetworks/synapse-portal-framework/types/portal-config' -import { studyDetailPage } from './synapseConfigs/studies' -import RouteControlWrapperProps from './routeControlWrapperProps' -import { grantsDetailPage } from './synapseConfigs/grants' -import { peopleSql, upsetplotSql } from './resources' - -const routes: GenericRoute[] = [ - { - path: '', - exact: true, - synapseConfigArray: [ - { - name: 'Goals', - title: 'Portal Goals', - centerTitle: true, - outsideContainerClassName: 'home-spacer', - props: { - entityId: 'syn22315959', - }, - }, - { - name: 'Markdown', - title: 'About the Portal', - centerTitle: true, - outsideContainerClassName: 'home-bg-dark home-spacer', - className: 'home-container-description', - props: { - ownerId: 'syn21557271', - wikiId: '605319', - loadingSkeletonRowCount: 10, - }, - }, - { - name: 'Markdown', - title: 'Featured Data', - outsideContainerClassName: '', - className: 'home-container-description', - centerTitle: true, - props: { - ownerId: 'syn21557271', - wikiId: '605308', - }, - }, - { - name: 'UpsetPlot', - className: 'whatThePlot', - outsideContainerClassName: 'home-spacer', - centerTitle: true, - props: { - sql: upsetplotSql, - rgbIndex: 0, - maxBarCount: 20, - setName: '# Individuals per assay', - combinationName: '# Individuals', - summaryLinkText: 'Explore All Data', - summaryLink: '/Explore/Data', - }, - }, - { - name: 'UserCardListRotate', - title: 'Our People and Institutions', - outsideContainerClassName: 'home-spacer home-bg-dark', - centerTitle: true, - props: { - sql: `${peopleSql} where feature=true`, - count: 3, - summaryLink: 'Explore/People', - summaryLinkText: 'Explore All People', - }, - }, - { - name: 'Resources', - outsideContainerClassName: 'home-spacer', - title: 'Related Resources', - centerTitle: true, - props: { - entityId: 'syn22311127', - }, - }, - { - name: 'RssFeedCards', - title: "What's New", - centerTitle: true, - outsideContainerClassName: 'home-spacer', - props: { - url: 'https://news.psychencode.org', - itemsToShow: 3, - allowCategories: ['Data Releases', 'Preprint', 'Publication'], - }, - }, - { - name: 'Markdown', - outsideContainerClassName: '', - className: '', - props: { - ownerId: 'syn21557271', - wikiId: '605340', - loadingSkeletonRowCount: 10, - }, - }, - ], - }, - { - path: 'Explore', - routes: [ - { - path: ':slug/', - hideRouteFromNavbar: true, - exact: true, - synapseConfigArray: [ - { - name: 'RouteControlWrapper', - isOutsideContainer: true, - props: RouteControlWrapperProps, - }, - ], - }, - { - path: 'Studies', - hideRouteFromNavbar: false, - routes: [ - { - path: 'DetailsPage', - synapseConfigArray: studyDetailPage, - }, - ], - }, - { - path: 'Data', - hideRouteFromNavbar: false, - }, - { - path: 'Grants', - hideRouteFromNavbar: false, - routes: [ - { - path: 'DetailsPage', - synapseConfigArray: grantsDetailPage, - }, - ], - }, - { - path: 'Publications', - hideRouteFromNavbar: false, - }, - { - path: 'People', - hideRouteFromNavbar: false, - }, - ], - }, - { - displayName: 'Data Access', - path: 'DataAccess', - exact: true, - synapseConfigArray: [ - { - name: 'Markdown', - title: 'Data Access', - props: { - ownerId: 'syn4921369', - wikiId: '477467', - loadingSkeletonRowCount: 20, - }, - }, - ], - }, - { - exact: true, - displayName: 'News', - path: undefined, - target: '_blank', - link: 'https://news.psychencode.org/', - }, - { - path: 'About', - exact: true, - synapseConfigArray: [ - { - name: 'Markdown', - title: 'About', - props: { - ownerId: 'syn4921369', - wikiId: '607829', - loadingSkeletonRowCount: 20, - }, - }, - ], - }, - { - exact: true, - displayName: 'Help', - path: undefined, - target: '_blank', - link: 'https://help.psychencode.synapse.org/', - }, -] - -export default routes diff --git a/apps/portals/psychencode/src/config/scripts/exportS3ProductionBucketName.sh b/apps/portals/psychencode/src/config/scripts/exportS3ProductionBucketName.sh deleted file mode 100755 index 0ca52e1b69..0000000000 --- a/apps/portals/psychencode/src/config/scripts/exportS3ProductionBucketName.sh +++ /dev/null @@ -1 +0,0 @@ -export S3_PRODUCTION_BUCK_LOCATION=s3://prod.psychencode.synapse.org \ No newline at end of file diff --git a/apps/portals/psychencode/src/config/scripts/exportS3StagingBucketName.sh b/apps/portals/psychencode/src/config/scripts/exportS3StagingBucketName.sh deleted file mode 100755 index 07aeac05bf..0000000000 --- a/apps/portals/psychencode/src/config/scripts/exportS3StagingBucketName.sh +++ /dev/null @@ -1 +0,0 @@ -export S3_STAGING_BUCKET_LOCATION=s3://staging.psychencode.synapse.org \ No newline at end of file diff --git a/apps/portals/psychencode/src/config/style/_style_overrides.scss b/apps/portals/psychencode/src/config/style/_style_overrides.scss deleted file mode 100644 index bc14612682..0000000000 --- a/apps/portals/psychencode/src/config/style/_style_overrides.scss +++ /dev/null @@ -1,17 +0,0 @@ -@use '@sage-bionetworks/synapse-portal-framework/src/style/variables' as Portal; - -#header, -#footer { - background-color: hsl(182, 35%, 45%); - background-blend-mode: multiply; -} - -.arc-diagram { - margin-top: 20px; - width: 100%; -} - -p.center-title { - max-width: 80%; - margin-left: 10%; -} diff --git a/apps/portals/psychencode/src/config/style/_variable_overrides.scss b/apps/portals/psychencode/src/config/style/_variable_overrides.scss deleted file mode 100644 index 9d735b26dc..0000000000 --- a/apps/portals/psychencode/src/config/style/_variable_overrides.scss +++ /dev/null @@ -1,6 +0,0 @@ -@use '@sage-bionetworks/synapse-portal-framework/src/style/variables' with ( - $primary-action-color: #00565e, - $secondary-action-color: #f7a700, - $header-url: 'molecule-back.svg', - $footer-url: '' -); diff --git a/apps/portals/psychencode/src/config/style/iconFooter.svg b/apps/portals/psychencode/src/config/style/iconFooter.svg deleted file mode 100644 index 4d607964f5..0000000000 --- a/apps/portals/psychencode/src/config/style/iconFooter.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/apps/portals/psychencode/src/config/style/molecule-back.svg b/apps/portals/psychencode/src/config/style/molecule-back.svg deleted file mode 100644 index f42258a6c6..0000000000 --- a/apps/portals/psychencode/src/config/style/molecule-back.svg +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/apps/portals/psychencode/src/config/synapseConfigs/data.ts b/apps/portals/psychencode/src/config/synapseConfigs/data.ts deleted file mode 100644 index 6d0ad42040..0000000000 --- a/apps/portals/psychencode/src/config/synapseConfigs/data.ts +++ /dev/null @@ -1,71 +0,0 @@ -import { SynapseConfig } from '@sage-bionetworks/synapse-portal-framework/types/portal-config' - -import { dataSql } from '../resources' - -const columnAliases = { - id: 'File', -} - -const rgbIndex = 8 - -export const data: SynapseConfig = { - name: 'QueryWrapperPlotNav', - props: { - rgbIndex, - sql: dataSql, - tableConfiguration: { - showAccessColumn: true, - showDownloadColumn: true, - columnLinks: [ - { - matchColumnName: 'study', - URLColumnName: 'studyName', - baseURL: 'Explore/Studies/DetailsPage', - isMarkdown: false, - }, - ], - }, - searchConfiguration: { - searchable: [ - 'study', - 'dataType', - 'resourceType', - 'species', - 'assay', - 'nucleicAcidSource', - 'tissue', - 'cellType', - 'referenceSet', - 'fileFormat', - 'metadataType', - 'individualID', - 'diagnosis', - 'specimenID', - 'organ', - 'contributor', - 'PI', - 'grant', - 'brodmannArea', - 'platform', - 'libraryPrep', - 'libraryPreparationMethod', - 'readLength', - 'isStranded', - 'runType', - 'alignmentMethod', - ], - }, - visibleColumnCount: 10, - shouldDeepLink: true, - name: 'Data', - columnAliases, - facetsToPlot: [ - 'study', - 'dataType', - 'species', - 'tissue', - 'referenceSet', - 'fileFormat', - ], - }, -} diff --git a/apps/portals/psychencode/src/config/synapseConfigs/grants.ts b/apps/portals/psychencode/src/config/synapseConfigs/grants.ts deleted file mode 100644 index 8d42a4a3cb..0000000000 --- a/apps/portals/psychencode/src/config/synapseConfigs/grants.ts +++ /dev/null @@ -1,115 +0,0 @@ -import { - CardConfiguration, - GenericCardSchema, - IconOptions, - ProjectIcon, - SynapseConstants, -} from 'synapse-react-client' -import { SynapseConfig } from '@sage-bionetworks/synapse-portal-framework/types/portal-config' -import { DetailsPageProps } from '@sage-bionetworks/synapse-portal-framework/types/portal-util-types' -import { studyDetailPageProps } from './studies' -import { publicationDetailPageProps } from './publications' -import { peopleDetailPageProps } from './people' -import { grantSql } from '../resources' -import { ColumnSingleValueFilterOperator } from '@sage-bionetworks/synapse-types' - -const rgbIndex = 2 - -export const grantSchema: GenericCardSchema = { - type: 'Grant', - title: 'title', - subTitle: 'keyInvestigators', - description: 'abstract', - secondaryLabels: ['institutions', 'grants', 'phase'], -} - -const iconOptions: IconOptions = { - Grant: ProjectIcon as unknown as string, -} - -export const grantCardConfiguration: CardConfiguration = { - type: SynapseConstants.GENERIC_CARD, - genericCardSchema: grantSchema, - titleLinkConfig: { - isMarkdown: false, - matchColumnName: 'grants', - URLColumnName: 'grants', - baseURL: 'Explore/Grants/DetailsPage', - }, - iconOptions, -} - -export const grants: SynapseConfig = { - name: 'QueryWrapperPlotNav', - props: { - rgbIndex, - cardConfiguration: grantCardConfiguration, - sql: grantSql, - shouldDeepLink: true, - hideDownload: true, - name: 'Grants', - facetsToPlot: ['grants', 'phase'], - searchConfiguration: { - searchable: ['title', 'keyInvestigators', 'institutions', 'grants'], - }, - }, -} - -const details: DetailsPageProps = { - sql: grantSql, - sqlOperator: ColumnSingleValueFilterOperator.LIKE, - synapseConfigArray: [ - { - name: 'CardContainerLogic', - props: studyDetailPageProps, - columnName: 'grants', - tableSqlKeys: ['grants'], - title: 'Studies', - }, - { - name: 'CardContainerLogic', - props: publicationDetailPageProps, - columnName: 'grants', - tableSqlKeys: ['grants'], - title: 'Publications', - }, - { - name: 'CardContainerLogic', - props: peopleDetailPageProps, - columnName: 'grants', - tableSqlKeys: ['grants'], - title: 'People', - }, - { - name: 'CardContainerLogic', - props: { - sql: grantSql, - ...grantCardConfiguration, - }, - columnName: 'relatedGrants', - tableSqlKeys: ['grants'], - title: 'Related Grants', - }, - ], -} - -export const grantsDetailPage: SynapseConfig[] = [ - { - name: 'CardContainerLogic', - isOutsideContainer: true, - props: { - isHeader: true, - isAlignToLeftNav: true, - - ...grantCardConfiguration, - titleLinkConfig: undefined, - genericCardSchema: grantSchema, - rgbIndex, - sql: grantSql, - }, - }, - { - name: 'DetailsPage', - props: details, - }, -] diff --git a/apps/portals/psychencode/src/config/synapseConfigs/people.ts b/apps/portals/psychencode/src/config/synapseConfigs/people.ts deleted file mode 100644 index cb325fc040..0000000000 --- a/apps/portals/psychencode/src/config/synapseConfigs/people.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { SynapseConfig } from '@sage-bionetworks/synapse-portal-framework/types/portal-config' -import { SynapseConstants } from 'synapse-react-client' -import { ColumnMultiValueFunction } from '@sage-bionetworks/synapse-types' - -import { peopleSql } from '../resources' - -const name = 'People' -const sql = 'SELECT * FROM syn22096112' -const rgbIndex = 4 - -export const people: SynapseConfig = { - name: 'QueryWrapperPlotNav', - props: { - sql: peopleSql, - cardConfiguration: { - type: SynapseConstants.MEDIUM_USER_CARD, - }, - rgbIndex, - name, - shouldDeepLink: true, - hideDownload: true, - searchConfiguration: { - searchable: ['grants', 'firstName', 'lastName'], - }, - }, -} - -export const peopleDetailPageProps = { - sql, - type: SynapseConstants.MEDIUM_USER_CARD, - sqlOperator: ColumnMultiValueFunction.HAS, -} diff --git a/apps/portals/psychencode/src/config/synapseConfigs/publications.ts b/apps/portals/psychencode/src/config/synapseConfigs/publications.ts deleted file mode 100644 index ec8f91f17a..0000000000 --- a/apps/portals/psychencode/src/config/synapseConfigs/publications.ts +++ /dev/null @@ -1,60 +0,0 @@ -import type { CardConfiguration, GenericCardSchema } from 'synapse-react-client' -import { CardContainerLogicProps, SynapseConstants } from 'synapse-react-client' -import { SynapseConfig } from '@sage-bionetworks/synapse-portal-framework/types/portal-config' -import { publicationSql } from '../resources' -import { ColumnMultiValueFunction } from '@sage-bionetworks/synapse-types' - -const rgbIndex = 1 - -export const publicationSchema: GenericCardSchema = { - type: SynapseConstants.PUBLICATION, - title: 'title', - subTitle: 'authors', - description: 'abstract', - secondaryLabels: ['year', 'journal', 'study', 'grants', 'DOI'], -} - -export const publicationsCardConfiguration: CardConfiguration = { - type: SynapseConstants.GENERIC_CARD, - genericCardSchema: publicationSchema, - labelLinkConfig: [ - { - URLColumnName: 'studyName', - matchColumnName: 'study', - isMarkdown: false, - baseURL: 'Explore/Studies/DetailsPage', - }, - ], - secondaryLabelLimit: 5, -} - -export const publications: SynapseConfig = { - name: 'QueryWrapperPlotNav', - props: { - rgbIndex, - sql: publicationSql, - shouldDeepLink: true, - hideDownload: true, - cardConfiguration: publicationsCardConfiguration, - searchConfiguration: { - searchable: [ - 'title', - 'authors', - 'year', - 'journal', - 'study', - 'grants', - 'DOI', - 'pubmedId', - ], - }, - facetsToPlot: ['study', 'grants'], - name: 'Publications', - }, -} - -export const publicationDetailPageProps: CardContainerLogicProps = { - sql: publicationSql, - sqlOperator: ColumnMultiValueFunction.HAS, - ...publicationsCardConfiguration, -} diff --git a/apps/portals/psychencode/src/config/synapseConfigs/studies.ts b/apps/portals/psychencode/src/config/synapseConfigs/studies.ts deleted file mode 100644 index a2aad50158..0000000000 --- a/apps/portals/psychencode/src/config/synapseConfigs/studies.ts +++ /dev/null @@ -1,228 +0,0 @@ -import { CardContainerLogicProps, SynapseConstants } from 'synapse-react-client' - -import type { GenericCardSchema } from 'synapse-react-client' -import type { CardConfiguration } from 'synapse-react-client' -import { SynapseConfig } from '@sage-bionetworks/synapse-portal-framework/types/portal-config' -import { DetailsPageProps } from '@sage-bionetworks/synapse-portal-framework/types/portal-util-types' -import { studiesSql, dataSql, metadataSql } from '../resources' -import { publicationDetailPageProps } from './publications' -import { - ColumnMultiValueFunction, - ColumnSingleValueFilterOperator, -} from '@sage-bionetworks/synapse-types' -const rgbIndex = 1 - -export const studySchema: GenericCardSchema = { - type: SynapseConstants.STUDY, - title: 'studyName', - subTitle: 'contributingInstitution', - description: 'studyDescription', - secondaryLabels: [ - 'dataTypes', - 'diagnosis', - 'tissue', - 'nucleicAcidSource', - 'species', - 'numberOfIndividuals', - 'grants', - ], -} - -export const studyCardConfiguration: CardConfiguration = { - type: SynapseConstants.GENERIC_CARD, - genericCardSchema: studySchema, - secondaryLabelLimit: 7, - titleLinkConfig: { - baseURL: 'Explore/Studies/DetailsPage', - URLColumnName: 'study', - matchColumnName: 'study', - isMarkdown: false, - }, - labelLinkConfig: [ - { - matchColumnName: 'grants', - URLColumnName: 'grants', - isMarkdown: false, - baseURL: 'Explore/Grants/DetailsPage', - }, - ], -} - -export const studies: SynapseConfig = { - name: 'QueryWrapperPlotNav', - props: { - rgbIndex, - sql: studiesSql, - shouldDeepLink: true, - cardConfiguration: studyCardConfiguration, - name: 'Studies', - searchConfiguration: { - searchable: [ - 'contributingInstitution', - 'dataTypes', - 'diagnosis', - 'grants', - 'tissue', - 'species', - 'studyName', - ], - }, - }, -} - -export const details: DetailsPageProps = { - sql: studiesSql, - sqlOperator: ColumnSingleValueFilterOperator.EQUAL, - tabLayout: [ - { - title: 'Study Details', - uriValue: 'StudyDetails', - iconName: 'study', - toolTip: 'Description, methods, acknowledgements and related studies', - synapseConfigArray: [ - { - name: 'Markdown', - props: {}, - injectMarkdown: false, - columnName: 'study', - title: 'Study Description', - }, - { - name: 'Markdown', - props: {}, - columnName: 'methods', - title: 'Methods', - resolveSynId: { - title: true, - }, - }, - { - name: 'CardContainerLogic', - title: 'Related Studies', - props: { - ...studyCardConfiguration, - sql: studiesSql, - }, - columnName: 'relatedStudies', - tableSqlKeys: ['study'], - }, - { - name: 'CardContainerLogic', - title: 'Publications', - props: publicationDetailPageProps, - columnName: 'study', - tableSqlKeys: ['study'], - resolveSynId: { - value: true, - }, - }, - ], - }, - { - title: 'Study Data', - uriValue: 'StudyData', - iconName: 'database', - toolTip: 'All of the Data generated within this study', - cssClass: 'tab-database', - synapseConfigArray: [ - { - name: 'Markdown', - props: { - ownerId: 'syn4921369', - wikiId: '477467', - }, - title: 'Access Requirements', - standalone: true, - }, - { - name: 'StandaloneQueryWrapper', - props: { - sql: metadataSql, - columnAliases: { - id: 'File Name', - metadataType: 'Metadata Type', - dataType: 'Data Type', - assay: 'Assay', - }, - rgbIndex, - sqlOperator: ColumnMultiValueFunction.HAS, - }, - resolveSynId: { - value: true, - }, - tableSqlKeys: ['study'], - columnName: 'study', - title: 'Study Metadata', - className: 'metadata-table', - }, - { - name: 'QueryWrapperPlotNav', - props: { - rgbIndex: 8, - sql: dataSql, - sqlOperator: ColumnMultiValueFunction.HAS, - tableConfiguration: { - showAccessColumn: true, - showDownloadColumn: true, - columnLinks: [ - { - matchColumnName: 'study', - URLColumnName: 'studyName', - baseURL: 'Explore/Studies/DetailsPage', - isMarkdown: false, - }, - ], - }, - visibleColumnCount: 10, - shouldDeepLink: false, - name: 'Study Data', - columnAliases: { - id: 'File', - }, - facetsToPlot: [ - 'study', - 'dataType', - 'species', - 'tissue', - 'referenceSet', - 'fileFormat', - ], - }, - resolveSynId: { - value: true, - }, - tableSqlKeys: ['study'], - columnName: 'study', - }, - ], - }, - ], -} - -export const studyDetailPage: SynapseConfig[] = [ - { - name: 'CardContainerLogic', - isOutsideContainer: true, - props: { - isHeader: true, - isAlignToLeftNav: true, - ...studyCardConfiguration, - titleLinkConfig: undefined, - rgbIndex, - genericCardSchema: studySchema, - sql: studiesSql, - sqlOperator: ColumnSingleValueFilterOperator.EQUAL, - }, - }, - { - name: 'DetailsPage', - props: details, - containerClassName: 'container-full-width', - }, -] - -export const studyDetailPageProps: CardContainerLogicProps = { - sql: studiesSql, - sqlOperator: ColumnMultiValueFunction.HAS, - ...studyCardConfiguration, -} diff --git a/apps/portals/psychencode/src/index.tsx b/apps/portals/psychencode/src/index.tsx deleted file mode 100644 index 33c1a1b992..0000000000 --- a/apps/portals/psychencode/src/index.tsx +++ /dev/null @@ -1,32 +0,0 @@ -import React from 'react' -import { createRoot } from 'react-dom/client' -import Portal from '@sage-bionetworks/synapse-portal-framework' -import palette from './config/paletteConfig' -import routes from './config/routesConfig' -import footerConfig from './config/footerConfig' -import logoHeaderConfig from './config/logoHeaderConfig' -import logoFooterConfig from './config/logoFooterConfig' - -// KaTeX CSS is not included in the SRC style bundle since it includes many large font files. -import 'katex/dist/katex.css' - -import './App.scss' -import headerConfig from './config/headerConfig' - -const container = document.getElementById('root') - -const root = createRoot(container!) - -root.render( - - - , -) diff --git a/apps/portals/psychencode/src/svg.d.ts b/apps/portals/psychencode/src/svg.d.ts deleted file mode 100644 index 29cf98cda4..0000000000 --- a/apps/portals/psychencode/src/svg.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -declare module '*.svg' { - import React from 'react' - - export const ReactComponent: React.FunctionComponent< - React.SVGProps & { title?: string } - > -} diff --git a/apps/portals/psychencode/src/types.d.ts b/apps/portals/psychencode/src/types.d.ts deleted file mode 100644 index 611afcc60f..0000000000 --- a/apps/portals/psychencode/src/types.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -/// -interface ImportMetaEnv { - readonly VITE_PORTAL_NAME: string - readonly VITE_PORTAL_DESCRIPTION: string - readonly VITE_PORTAL_KEY: string -} - -interface ImportMeta { - readonly env: ImportMetaEnv -} - -// Import MUI type augmentations from 'synapse-react-client' so we can use custom property values defined for our MUI theme -import 'synapse-react-client/ThemeTypes' diff --git a/apps/portals/psychencode/tsconfig.json b/apps/portals/psychencode/tsconfig.json deleted file mode 100644 index b0ca5ea852..0000000000 --- a/apps/portals/psychencode/tsconfig.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "extends": "../../../shared/tsconfig.base.json", - "compilerOptions": { - "baseUrl": ".", - "lib": ["dom", "dom.iterable", "esnext"], - "noImplicitAny": false, - "moduleResolution": "bundler", - "types": ["vite/client"], - "paths": { - "@sage-bionetworks/synapse-portal-framework": [ - "../../synapse-portal-framework/src" - ], - "@sage-bionetworks/synapse-portal-framework/*": [ - "../../synapse-portal-framework/src/*" - ] - } - }, - "include": ["src/**/*.tsx", "src/**/*.ts"], - "files": ["src/types.d.ts"] -} diff --git a/apps/portals/psychencode/vite.config.ts b/apps/portals/psychencode/vite.config.ts deleted file mode 100644 index bd2599888e..0000000000 --- a/apps/portals/psychencode/vite.config.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { portalsViteConfig } from 'vite-config' -import { mergeConfig } from 'vite' -import { resolve } from 'path' - -const projectRootDir = resolve(__dirname) - -// Unless absolutely necessary, all changes should go into the shared vite configuration, not the individual portal configuration -export default mergeConfig(portalsViteConfig, { - // TODO: PORTALS-3159 - // Until we create a build/exports strategy for synapse-portal-framework, we have to create an alias so Vite can resolve the module - // This must be configured for each file because it depends on the projectRootDir - resolve: { - alias: [ - { - find: /^@sage-bionetworks\/synapse-portal-framework$/, - replacement: resolve( - projectRootDir, - '../../synapse-portal-framework/src/index.ts', - ), - }, - { - find: /@sage-bionetworks\/synapse-portal-framework/, - replacement: resolve(projectRootDir, '../../synapse-portal-framework'), - }, - ], - }, -}) diff --git a/packages/synapse-react-client/.storybook/preview.tsx b/packages/synapse-react-client/.storybook/preview.tsx index b29c1af994..a11015fdfa 100644 --- a/packages/synapse-react-client/.storybook/preview.tsx +++ b/packages/synapse-react-client/.storybook/preview.tsx @@ -20,7 +20,6 @@ import { elPortalPalette, mtbPalette, nfPortalPalette, - psychEncodePortalPalette, sageBionetworksPalette, stopAdPortalPalette, geniePalette, @@ -149,9 +148,6 @@ export const decorators: Decorator[] = [ ['BSMN Portal']: createTheme(defaultMuiThemeOptions, { palette: bsmnPortalPalette, }), - ['PsychENCODE Portal']: createTheme(defaultMuiThemeOptions, { - palette: psychEncodePortalPalette, - }), ['STOP AD Portal']: createTheme(defaultMuiThemeOptions, { palette: stopAdPortalPalette, }), diff --git a/packages/synapse-react-client/src/theme/palette/Palettes.ts b/packages/synapse-react-client/src/theme/palette/Palettes.ts index 52cffe33af..ab307b31ba 100644 --- a/packages/synapse-react-client/src/theme/palette/Palettes.ts +++ b/packages/synapse-react-client/src/theme/palette/Palettes.ts @@ -131,12 +131,6 @@ export const bsmnPortalPalette: PaletteOptions = { secondary: generatePalette('#2699a7'), } -export const psychEncodePortalPalette: PaletteOptions = { - ...palette, - primary: generatePalette('#00565e'), - secondary: generatePalette('#f7a700'), -} - export const stopAdPortalPalette: PaletteOptions = { ...palette, primary: generatePalette('#4d5491'), @@ -189,7 +183,6 @@ export default { elPortalPalette, nfPortalPalette, bsmnPortalPalette, - psychEncodePortalPalette, stopAdPortalPalette, digitalHealthPortalPalette, crcResearcherPortalPalette, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c5d0947029..c11a908268 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -529,55 +529,6 @@ importers: specifier: ^1.6.0 version: 1.6.0(@types/node@20.14.10)(@vitest/ui@1.6.0)(jsdom@21.1.2)(sass@1.77.6)(terser@5.31.2) - apps/portals/crc-researcher: - dependencies: - '@sage-bionetworks/synapse-portal-framework': - specifier: workspace:* - version: link:../../synapse-portal-framework - '@sage-bionetworks/synapse-types': - specifier: workspace:* - version: link:../../../packages/synapse-types - katex: - specifier: ^0.16.10 - version: 0.16.10 - react: - specifier: ^18.2.0 - version: 18.2.0 - react-dom: - specifier: ^18.2.0 - version: 18.2.0(react@18.2.0) - react-router-dom: - specifier: ^5.3.4 - version: 5.3.4(react@18.2.0) - synapse-react-client: - specifier: workspace:* - version: link:../../../packages/synapse-react-client - vite: - specifier: ^5.4.3 - version: 5.4.3(@types/node@20.14.10)(sass@1.77.6)(terser@5.31.2) - devDependencies: - '@types/react': - specifier: 18.2.64 - version: 18.2.64 - '@types/react-dom': - specifier: 18.0.6 - version: 18.0.6 - sass: - specifier: ^1.72.0 - version: 1.77.6 - tslib: - specifier: ^2.6.2 - version: 2.6.3 - typescript: - specifier: ^5.5.2 - version: 5.5.2 - vite-config: - specifier: workspace:* - version: link:../../../packages/vite-config - vitest: - specifier: ^1.6.0 - version: 1.6.0(@types/node@20.14.10)(@vitest/ui@1.6.0)(jsdom@21.1.2)(sass@1.77.6)(terser@5.31.2) - apps/portals/digitalhealth: dependencies: '@sage-bionetworks/synapse-portal-framework': @@ -792,58 +743,6 @@ importers: specifier: ^1.6.0 version: 1.6.0(@types/node@20.14.10)(@vitest/ui@1.6.0)(jsdom@21.1.2)(sass@1.77.6)(terser@5.31.2) - apps/portals/psychencode: - dependencies: - '@sage-bionetworks/synapse-portal-framework': - specifier: workspace:* - version: link:../../synapse-portal-framework - '@sage-bionetworks/synapse-types': - specifier: workspace:* - version: link:../../../packages/synapse-types - katex: - specifier: ^0.16.10 - version: 0.16.10 - pluralize: - specifier: ^8.0.0 - version: 8.0.0 - react: - specifier: ^18.2.0 - version: 18.2.0 - react-dom: - specifier: ^18.2.0 - version: 18.2.0(react@18.2.0) - react-router-dom: - specifier: ^5.3.4 - version: 5.3.4(react@18.2.0) - synapse-react-client: - specifier: workspace:* - version: link:../../../packages/synapse-react-client - vite: - specifier: ^5.4.3 - version: 5.4.3(@types/node@20.14.10)(sass@1.77.6)(terser@5.31.2) - devDependencies: - '@types/react': - specifier: 18.2.64 - version: 18.2.64 - '@types/react-dom': - specifier: 18.0.6 - version: 18.0.6 - sass: - specifier: ^1.72.0 - version: 1.77.6 - tslib: - specifier: ^2.6.2 - version: 2.6.3 - typescript: - specifier: ^5.5.2 - version: 5.5.2 - vite-config: - specifier: workspace:* - version: link:../../../packages/vite-config - vitest: - specifier: ^1.6.0 - version: 1.6.0(@types/node@20.14.10)(@vitest/ui@1.6.0)(jsdom@21.1.2)(sass@1.77.6)(terser@5.31.2) - apps/portals/stopadportal: dependencies: '@sage-bionetworks/synapse-portal-framework':