diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index e50316821..000000000 --- a/.dockerignore +++ /dev/null @@ -1,4 +0,0 @@ -node_modules -npm-debug.log -.git -dist diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 6e87a003d..000000000 --- a/.editorconfig +++ /dev/null @@ -1,13 +0,0 @@ -# Editor configuration, see http://editorconfig.org -root = true - -[*] -charset = utf-8 -indent_style = space -indent_size = 2 -insert_final_newline = true -trim_trailing_whitespace = true - -[*.md] -max_line_length = off -trim_trailing_whitespace = false diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index 06cc47d9a..000000000 --- a/.eslintrc.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "root": true, - "ignorePatterns": ["**/*"], - "plugins": ["@nrwl/nx"], - "overrides": [ - { - "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], - "rules": { - "@nrwl/nx/enforce-module-boundaries": [ - "error", - { - "enforceBuildableLibDependency": true, - "allow": [], - "depConstraints": [ - { - "sourceTag": "*", - "onlyDependOnLibsWithTags": ["*"] - } - ] - } - ] - } - }, - { - "files": ["*.ts", "*.tsx"], - "extends": ["plugin:@nrwl/nx/typescript"], - "rules": {} - }, - { - "files": ["*.js", "*.jsx"], - "extends": ["plugin:@nrwl/nx/javascript"], - "rules": {} - } - ] -} diff --git a/.github/workflows/github-actions-PR-validation.yml b/.github/workflows/github-actions-PR-validation.yml index 273c125e1..184003597 100644 --- a/.github/workflows/github-actions-PR-validation.yml +++ b/.github/workflows/github-actions-PR-validation.yml @@ -24,7 +24,7 @@ jobs: git diff --name-only origin/${{ github.base_ref }} origin/${{ github.head_ref }} - uses: actions/setup-node@v3 with: - node-version: 12 + node-version: 18 - name: Report runtime details run: | echo "Github runner OS: ${{ runner.os }}" diff --git a/.gitignore b/.gitignore index 90d75eaa9..a08a36a3c 100644 --- a/.gitignore +++ b/.gitignore @@ -7,7 +7,11 @@ package-lock.json /out-tsc # dependencies -node_modules +/node_modules +/dist +/src/dist +/src/public/sitemap.xml +/src/public/main-sitemap.xml # IDEs and editors /.idea diff --git a/.nvm_install b/.nvm_install deleted file mode 100644 index acc6ed5d5..000000000 --- a/.nvm_install +++ /dev/null @@ -1,3 +0,0 @@ -export NVM_DIR="$HOME/.nvm" -[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm -[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion diff --git a/.nvmrc b/.nvmrc index 518633e16..a77793ecc 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -lts/fermium +lts/hydrogen diff --git a/.prettierignore b/.prettierignore deleted file mode 100644 index dafccb67a..000000000 --- a/.prettierignore +++ /dev/null @@ -1,4 +0,0 @@ -# Add files here to ignore them from prettier formatting -/apps/main-app -/dist -/coverage diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index 92cde390a..000000000 --- a/.prettierrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "singleQuote": true -} \ No newline at end of file diff --git a/.storybook/main.js b/.storybook/main.js deleted file mode 100644 index 1665525a6..000000000 --- a/.storybook/main.js +++ /dev/null @@ -1,4 +0,0 @@ -module.exports = { - stories: [], - addons: ['@storybook/addon-essentials', '@storybook/addon-knobs'], -}; diff --git a/.storybook/tsconfig.json b/.storybook/tsconfig.json deleted file mode 100644 index 4b1101543..000000000 --- a/.storybook/tsconfig.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "../tsconfig.base.json", - "exclude": [ - "../**/*.spec.js", - "../**/*.spec.ts", - "../**/*.spec.tsx", - "../**/*.spec.jsx" - ], - "include": ["../**/*"] -} diff --git a/.storybook/webpack.config.js b/.storybook/webpack.config.js deleted file mode 100644 index 8b26c0981..000000000 --- a/.storybook/webpack.config.js +++ /dev/null @@ -1,31 +0,0 @@ -const path = require('path'); - -/** - * Export a function. Accept the base config as the only param. - * @param {Object} options - * @param {Required} options.config - * @param {'DEVELOPMENT' | 'PRODUCTION'} options.mode - change the build configuration. 'PRODUCTION' is used when building the static version of storybook. - */ -module.exports = async ({ config, mode }) => { - // Make whatever fine-grained changes you need - - const pngRulesIndex = config.module.rules.findIndex((rule) => { - const { test } = rule; - return test.toString().includes('png'); - }); - - // storybook's default file oader for interferes with the url-loader - if (pngRulesIndex > -1) { - config.module.rules[pngRulesIndex].exclude = - config.module.rules[pngRulesIndex].exclude || []; - config.module.rules[pngRulesIndex].exclude.push( - path.resolve(__dirname, '../libs/') - ); - config.module.rules[pngRulesIndex].exclude.push( - path.resolve(__dirname, '../apps/') - ); - } - - // Return the altered config - return config; -}; diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index dff9b454f..000000000 --- a/Dockerfile +++ /dev/null @@ -1,32 +0,0 @@ -ARG DOCKER_PULL_TAG=latest -ARG REG=100225593120.dkr.ecr.us-east-1.amazonaws.com -FROM ${REG}/agr_base_linux_env:${DOCKER_PULL_TAG} as build-stage - -WORKDIR /workdir/agr_ui - -ADD package.json package.json -ADD .nvmrc .nvmrc - -RUN /bin/bash -c '. $HOME/.nvm/nvm.sh --no-use && \ - nvm install && \ - nvm use && \ - npm install' - -ADD . . - -ARG NODE_ENV=production -ENV NODE_ENV ${NODE_ENV} - -RUN mkdir /workdir/agr_ui/dist - -RUN /bin/bash -c '. $HOME/.nvm/nvm.sh && npm run build' -RUN /bin/bash -c '. $HOME/.nvm/nvm.sh && npx nx run-many --target=test --all' - -FROM nginx - -WORKDIR /workdir/agr_ui/dist - -COPY --from=build-stage /workdir/agr_ui/dist /workdir/agr_ui/dist -COPY --from=build-stage /workdir/agr_ui/nginx.conf /etc/nginx/conf.d/default.conf - -EXPOSE 2992 diff --git a/LICENSE.md b/LICENSE.md deleted file mode 100644 index 02c1c6932..000000000 --- a/LICENSE.md +++ /dev/null @@ -1,7 +0,0 @@ -Copyright 2017 Alliance of Genome Resources - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md index f68140806..58beeaccd 100644 --- a/README.md +++ b/README.md @@ -1,150 +1,70 @@ -![project logo](https://raw.githubusercontent.com/alliance-genome/agr_ui/master/src/containers/layout/agrLogo.png) +# Getting Started with Create React App -# Alliance of Genome Resources UI +This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). -Frontend code for the Alliance of Genome Resources website. +## Available Scripts -This repository uses [Nx](https://nx.dev/react) to facilitate development of multiple apps and libraries in a single [monorepo](https://nx.dev/latest/react/core-concepts/why-monorepos). +In the project directory, you can run: -The [Nx CLI](https://nx.dev/latest/react/getting-started/cli-overview) or the interactive [Nx Console]() is used to build, run, test apps and libs, as well as generating library or application code with modern tooling enabled (such as ESLint/TSlint, Prettier, Jest, Cypress, Storybook). +### `npm start` -## Folder structure +Runs the app in the development mode.\ +Open [http://localhost:3000](http://localhost:3000) to view it in your browser. -**If you developed in this repo before it was reorganizated, you will find that code moved to [apps/main-app/](apps/main-app/).** +The page will reload when you make changes.\ +You may also see any lint errors in the console. -`apps/` contains frontend sites that can be developed and deployed independently +### `npm test` -`libs/` contains shared libraries across apps. These libaraies can be published for use outside of this repo. But publishing a library is not necessary for using it within the repo. +Launches the test runner in the interactive watch mode.\ +See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. -`package.json`, `package-lock.json` and `node_modules/` track the dependencies for by all apps and libs. This means that dependencies installation for any app or library should happend at the **root** of the project. +### `npm run build` -`workspace.json` is where configuration for apps and libs are defined. +Builds the app for production to the `build` folder.\ +It correctly bundles React in production mode and optimizes the build for the best performance. -## Prerequisites +The build is minified and the filenames include the hashes.\ +Your app is ready to be deployed! -nvm is used to manage Node.js versions. [Follow these instructions](https://github.com/nvm-sh/nvm#installing-and-updating) to install nvm. +See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. -It is not strictly required, but highly recommended that you have configured your development environment to use [EditorConfig](https://editorconfig.org/) and [ESLint](https://eslint.org/docs/user-guide/integrations). +### `npm run eject` -## Installation +**Note: this is a one-way operation. Once you `eject`, you can't go back!** -Ensure the correct version of Node.js is **installed**, if using the particular version of Node.js for the same time: +If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. -```bash -nvm install -``` +Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own. -_Note: the command uses **nvm**, not npm. Nvm deals with the version of Node.js itself._ +You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it. -Ensure the correct version of Node.js is **activated**: -(Applicable every time when changing into the directory for this project) +## Learn More -```bash -nvm use -``` +You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). -Install dependencies after first cloning the repository or after pulling in new changes to `package.json`: +To learn React, check out the [React documentation](https://reactjs.org/). -```bash -npm install -``` +### Code Splitting -_Note: the command uses **npm**, not nvm. NPM deals with package dependencies._ +This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting) -## Development +### Analyzing the Bundle Size -### Development of the [Main App](apps/main-app/) +This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size) -[apps/main-app/](apps/main-app/) holds most of the AGR UI code written before the re-organization of this repo. +### Making a Progressive Web App -Development is done using a webpack development server, which is configured using [these configurations](apps/main-app/webpack.js). +This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app) -To start the development server: +### Advanced Configuration -``` -npm start -``` +This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration) -The development server will be started at [http://localhost:2992](http://localhost:2992). +### Deployment -When you edit source files, the changes will automatically be compiled and updated in your browser. +This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment) -The development server proxies API requests to the API server. The API server can be specified using the `API_URL` environment variable. It is set to `https://build.alliancegenome.org` by default. +### `npm run build` fails to minify -To change the API server host for the proxy, run: - -```bash -export API_URL=https://stage.alliancegenome.org # to send proxied requests to the stage server. -``` - -and re-start the development server. - -### Development of Additional Apps - -To start the development environment for other apps found in [apps](apps/), the command can be run with the respective app name. - -Take the [example-app](apps/example-app/) for example, to start the development server, run: - -```bash -npm start example-app -``` - -## Tests - -To run linter on source files: - -```bash -npm run lint # for the main-app -``` - -OR - -```bash -npm run lint [app-name] # for other apps or libs -``` - -Execute tests: - -```bash -npm run test # for the main-app -``` - -OR - -```bash -npm run test [app-name] # for other apps or libs -``` - -## Build - -To build an app or lib for production - -```bash -npm run build --prod # for the main-app -``` - -OR - -```bash -npm run build [app-name] --prod # for other apps or libs -``` - -## Create a Shared Library - -To create a library interactively via CLI: - -```bash - -npm run nx generate @nrwl/react:library [lib-name] -``` - -Or using a graphical interface via the [Nx Console VSCode plugin](https://nx.dev/latest/react/getting-started/console). - -## Frameworks & Tools - -- [React](https://reactjs.org/) for routing and building user interface components -- [Nx](https://nx.dev/) for consistent code generation and execution, and managing multiple node modules in one repo -- [Redux](https://redux.js.org/) and [Immutable](https://immutable-js.github.io/immutable-js/) for state management -- [Bootstrap](https://getbootstrap.com/), [reactstrap](https://reactstrap.github.io), [Sass](https://sass-lang.com/), [CSS Modules](https://github.com/css-modules/css-modules) for styling -- [Mocha](https://mochajs.org/) for testing -- [Webpack](https://webpack.js.org/) and [Babel](https://babeljs.io/) for compiling and bundling +This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify) diff --git a/apps/main-app/.babelrc b/apps/main-app/.babelrc deleted file mode 100644 index 09d67939c..000000000 --- a/apps/main-app/.babelrc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "presets": ["@nrwl/react/babel"], - "plugins": [] -} diff --git a/apps/main-app/.browserslistrc b/apps/main-app/.browserslistrc deleted file mode 100644 index f1d12df4f..000000000 --- a/apps/main-app/.browserslistrc +++ /dev/null @@ -1,16 +0,0 @@ -# This file is used by: -# 1. autoprefixer to adjust CSS to support the below specified browsers -# 2. babel preset-env to adjust included polyfills -# -# For additional information regarding the format and rule options, please see: -# https://github.com/browserslist/browserslist#queries -# -# If you need to support different browsers in production, you may tweak the list below. - -last 1 Chrome version -last 1 Firefox version -last 2 Edge major versions -last 2 Safari major version -last 2 iOS major versions -Firefox ESR -not IE 9-11 # For IE 9-11 support, remove 'not'. \ No newline at end of file diff --git a/apps/main-app/.eslintrc.json b/apps/main-app/.eslintrc.json deleted file mode 100644 index 4fd19144b..000000000 --- a/apps/main-app/.eslintrc.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "extends": ["plugin:@nrwl/nx/react", "../../.eslintrc.json"], - "ignorePatterns": ["!**/*"], - "rules": {}, - "overrides": [ - { - "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], - "rules": {} - }, - { - "files": ["*.ts", "*.tsx"], - "rules": {} - }, - { - "files": ["*.js", "*.jsx"], - "rules": {} - } - ] -} diff --git a/apps/main-app/babel-jest.config.json b/apps/main-app/babel-jest.config.json deleted file mode 100644 index bf04d5f81..000000000 --- a/apps/main-app/babel-jest.config.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "presets": [ - [ - "@babel/preset-env", - { - "targets": { - "node": "current" - } - } - ], - "@babel/preset-typescript", - "@babel/preset-react" - ] -} diff --git a/apps/main-app/jest.config.js b/apps/main-app/jest.config.js deleted file mode 100644 index 934ff7ae2..000000000 --- a/apps/main-app/jest.config.js +++ /dev/null @@ -1,13 +0,0 @@ -module.exports = { - displayName: 'main-app-import-test-run', - preset: '../../jest.preset.js', - transform: { - '^(?!.*\\.(js|jsx|ts|tsx|css|json)$)': '@nrwl/react/plugins/jest', - '^.+\\.[tj]sx?$': [ - 'babel-jest', - { cwd: __dirname, configFile: './babel-jest.config.json' }, - ], - }, - moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'], - coverageDirectory: '../../coverage/apps/main-app-import-test-run', -}; diff --git a/apps/main-app/src/assets/.gitkeep b/apps/main-app/src/assets/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/apps/main-app/tsconfig.app.json b/apps/main-app/tsconfig.app.json deleted file mode 100644 index 71adee65d..000000000 --- a/apps/main-app/tsconfig.app.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../dist/out-tsc", - "types": ["node"] - }, - "files": [ - "../../node_modules/@nrwl/react/typings/cssmodule.d.ts", - "../../node_modules/@nrwl/react/typings/image.d.ts" - ], - "exclude": ["**/*.spec.ts", "**/*.spec.tsx"], - "include": ["**/*.js", "**/*.jsx", "**/*.ts", "**/*.tsx"] -} diff --git a/apps/main-app/tsconfig.json b/apps/main-app/tsconfig.json deleted file mode 100644 index 3fe23e029..000000000 --- a/apps/main-app/tsconfig.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "jsx": "react-jsx", - "allowJs": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true - }, - "files": [], - "include": [], - "references": [ - { - "path": "./tsconfig.app.json" - }, - { - "path": "./tsconfig.spec.json" - } - ] -} diff --git a/apps/main-app/tsconfig.spec.json b/apps/main-app/tsconfig.spec.json deleted file mode 100644 index fee141bb0..000000000 --- a/apps/main-app/tsconfig.spec.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../dist/out-tsc", - "module": "commonjs", - "types": ["jest", "node"] - }, - "include": [ - "**/*.spec.ts", - "**/*.spec.tsx", - "**/*.spec.js", - "**/*.spec.jsx", - "**/*.d.ts" - ], - "files": [ - "../../node_modules/@nrwl/react/typings/cssmodule.d.ts", - "../../node_modules/@nrwl/react/typings/image.d.ts" - ] -} diff --git a/apps/main-app/webpack.config-test.js b/apps/main-app/webpack.config-test.js deleted file mode 100644 index 22b6890f1..000000000 --- a/apps/main-app/webpack.config-test.js +++ /dev/null @@ -1,36 +0,0 @@ -var nodeExternals = require('webpack-node-externals'); - -module.exports = { - mode: 'development', - target: 'node', // in order to ignore built-in modules like path, fs, etc. - externals: [nodeExternals()], // in order to ignore all modules in node_modules folder - output: { - devtoolModuleFilenameTemplate : '[absolute-resource-path]', - devtoolFallbackModuleFilenameTemplate: '[absolute-resource-path]?[hash]' - }, - devtool: '#inline-cheap-module-source-map', - module: { - rules: [ - { - test: /\.js$/, - exclude: /node_modules/, - use: 'babel-loader' - }, - { - test: /\.(css|scss)$/, - exclude: /node_modules/, - use: 'null-loader' - }, - { - test: /\.(css|scss)$/, - exclude: /src/, - use: 'null-loader' - }, - { - test: /\.(jpg|png|ttf|eot|woff|woff2|svg)$/, - exclude: /node_modules/, - use: 'null-loader' - } - ] - }, -}; diff --git a/apps/main-app/webpack.config.babel.js b/apps/main-app/webpack.config.babel.js deleted file mode 100644 index 456547ad5..000000000 --- a/apps/main-app/webpack.config.babel.js +++ /dev/null @@ -1,132 +0,0 @@ -const getWebpackConfig = require('@nrwl/react/plugins/webpack'); -const path = require('path'); - -/* const FaviconsWebpackPlugin = require('favicons-webpack-plugin'); -const HtmlWebpackPlugin = require('html-webpack-plugin'); -const MiniCssExtractPlugin = require('mini-css-extract-plugin'); -const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin'); -const TerserPlugin = require('terser-webpack-plugin'); */ -const RobotstxtPlugin = require('robotstxt-webpack-plugin'); - -const isDev = process.env.NODE_ENV !== 'production'; - -const robotstxtProdOptions = { - policy: [ - { - userAgent: '*', - allow: '/', - disallow: '/search', - disallow: '/alliancemine', - disallow: '/jbrowse', - }, - ], - sitemap: [ - 'https://www.alliancegenome.org/sitemap.xml', - 'https://www.alliancegenome.org/api/sitemap.xml', - ], -}; -const robotstxtDevOptions = { - policy: [ - { - userAgent: '*', - disallow: '/', - }, - ], -}; - -const devServer = { - historyApiFallback: { - disableDotRule: true - }, - proxy: { - '/api': { - target: process.env.API_URL || 'http://localhost:8080', - secure: false, - changeOrigin: true - }, - '/swagger-ui': { - target: process.env.API_URL || 'http://localhost:8080', - secure: false, - changeOrigin: true - }, - '/openapi': { - target: process.env.API_URL || 'http://localhost:8080', - secure: false, - changeOrigin: true - }, - '/apollo': { - target: process.env.APOLLO_URL || process.env.API_URL, - secure: false, - changeOrigin: true - }, - '/jbrowse': { - target: process.env.JBROWSE_URL || process.env.API_URL, - secure: false, - changeOrigin: true - } - } -}; - -const plugins = [ -/* new HtmlWebpackPlugin({ - template: folders.TEMPLATE - }), - new FaviconsWebpackPlugin({ - logo: folders.LOGO, - inject: true, - title: 'Alliance of Genome Resources' - }), - new webpack.EnvironmentPlugin({ - ALLIANCE_RELEASE: '[dev]', - }), - new MiniCssExtractPlugin({ - filename: '[name].[hash].css', - chunkFilename: '[id].[hash].css' - }), */ - new RobotstxtPlugin(isDev ? robotstxtDevOptions : robotstxtProdOptions), -]; - -module.exports = function (configOriginal) { - const config = getWebpackConfig(configOriginal); - - config.devServer = { - ...config.devServer, - ...devServer, - }; - - config.plugins = [ - ...config.plugins, - ...plugins, - ] - - Object.defineProperty(RegExp.prototype, 'toJSON', { - value: RegExp.prototype.toString, - }); - // console.log(JSON.stringify(config.module.rules, null, 2)); - - /* by default the styles are treated as modules */ - const [styleRule] = config.module.rules.filter(({test}) => ( - test.toString().search(/\.scss/) > -1 - )); - - if (styleRule && styleRule.oneOf) { - const scssModuleRuleIndex = styleRule.oneOf.findIndex(({test}) => ( - test.test('somepath/style.module.scss') - )); - if (scssModuleRuleIndex > -1) { - styleRule.oneOf.splice( - scssModuleRuleIndex + 1, - 0, - { - ...styleRule.oneOf[scssModuleRuleIndex], - test: /\.(scss|sass)$/, - include: path.resolve(__dirname, 'src'), - exclude: path.resolve(__dirname, 'src/style.scss'), - }, - ); - } - } - - // console.log(JSON.stringify(config.module.rules, null, 2)); - return config; -} diff --git a/babel.config.json b/babel.config.json deleted file mode 100644 index d89174a39..000000000 --- a/babel.config.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "presets": [], - "babelrcRoots": ["*"], - "plugins": [ - "@babel/plugin-proposal-private-methods", - "@babel/plugin-proposal-class-properties" - ] -} diff --git a/bin/build_resource_descriptors.js b/bin/build_resource_descriptors.js index 3a0872d82..09b0ee82d 100644 --- a/bin/build_resource_descriptors.js +++ b/bin/build_resource_descriptors.js @@ -5,7 +5,7 @@ const fs = require('fs'); console.log("Build resource desriptors is running..."); // Get document, or throw exception on error const url = 'https://raw.githubusercontent.com/alliance-genome/agr_schemas/master/resourceDescriptors.yaml'; -const dir = './dist'; +const dir = './src/dist'; if(!fs.existsSync(dir)){ fs.mkdirSync(dir); @@ -23,17 +23,17 @@ https.get(url, function(response) { file.close(); console.log("File Saved: " + file.path); - const stringFile = fs.readFileSync("./dist/resourceDescriptors.yaml"); + const stringFile = fs.readFileSync("./src/dist/resourceDescriptors.yaml"); console.log("Converting ymal to js"); const resourceDesciptors = yaml.load(stringFile); console.log(resourceDesciptors.length + " Resource Descriptors converted"); fs.writeFileSync( - './dist/resourceDescriptors.js', + './src/dist/resourceDescriptors.js', "export const resourceDescriptors = " + JSON.stringify(resourceDesciptors) ); console.log("Finished writting js file: "); console.log("Deleting old yaml file"); - fs.unlinkSync("./dist/resourceDescriptors.yaml"); + fs.unlinkSync("./src/dist/resourceDescriptors.yaml"); console.log("Resource Descriptors Build has Completed"); }); }); diff --git a/bin/build_sitemap.js b/bin/build_sitemap.js index 359faabc9..564e60349 100644 --- a/bin/build_sitemap.js +++ b/bin/build_sitemap.js @@ -7,7 +7,7 @@ var sitemapindex = sm.buildSitemapIndex({ ] }); -fs.writeFileSync('dist/apps/main-app/sitemap.xml', sitemapindex.toString()); +fs.writeFileSync('src/public/sitemap.xml', sitemapindex.toString()); var sitemap = sm.createSitemap({ hostname: 'https://www.alliancegenome.org', @@ -28,4 +28,4 @@ var sitemap = sm.createSitemap({ ] }); -fs.writeFileSync('dist/apps/main-app/main-sitemap.xml', sitemap.toString()); +fs.writeFileSync('src/public/main-sitemap.xml', sitemap.toString()); diff --git a/build/favicon.ico b/build/favicon.ico new file mode 100644 index 000000000..a11777cc4 Binary files /dev/null and b/build/favicon.ico differ diff --git a/build/logo192.png b/build/logo192.png new file mode 100644 index 000000000..fc44b0a37 Binary files /dev/null and b/build/logo192.png differ diff --git a/build/logo512.png b/build/logo512.png new file mode 100644 index 000000000..a4e47a654 Binary files /dev/null and b/build/logo512.png differ diff --git a/build/manifest.json b/build/manifest.json new file mode 100644 index 000000000..080d6c77a --- /dev/null +++ b/build/manifest.json @@ -0,0 +1,25 @@ +{ + "short_name": "React App", + "name": "Create React App Sample", + "icons": [ + { + "src": "favicon.ico", + "sizes": "64x64 32x32 24x24 16x16", + "type": "image/x-icon" + }, + { + "src": "logo192.png", + "type": "image/png", + "sizes": "192x192" + }, + { + "src": "logo512.png", + "type": "image/png", + "sizes": "512x512" + } + ], + "start_url": ".", + "display": "standalone", + "theme_color": "#000000", + "background_color": "#ffffff" +} diff --git a/build/robots.txt b/build/robots.txt new file mode 100644 index 000000000..e9e57dc4d --- /dev/null +++ b/build/robots.txt @@ -0,0 +1,3 @@ +# https://www.robotstxt.org/robotstxt.html +User-agent: * +Disallow: diff --git a/cdk.context.json b/cdk.context.json deleted file mode 100644 index 52aef963e..000000000 --- a/cdk.context.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "vpc-provider:account=100225593120:filter.tag:Name=Docker:region=us-east-1:returnAsymmetricSubnets=true": { - "vpcId": "vpc-55522232", - "vpcCidrBlock": "172.31.0.0/16", - "ownerAccountId": "100225593120", - "availabilityZones": [], - "subnetGroups": [ - { - "name": "Public", - "type": "Public", - "subnets": [ - { - "subnetId": "subnet-3ebf4477", - "cidr": "172.31.0.0/20", - "availabilityZone": "us-east-1a", - "routeTableId": "rtb-c63af6a0" - }, - { - "subnetId": "subnet-df7c7487", - "cidr": "172.31.16.0/20", - "availabilityZone": "us-east-1b", - "routeTableId": "rtb-c63af6a0" - }, - { - "subnetId": "subnet-81c95ee4", - "cidr": "172.31.64.0/20", - "availabilityZone": "us-east-1c", - "routeTableId": "rtb-c63af6a0" - }, - { - "subnetId": "subnet-ff838bd5", - "cidr": "172.31.48.0/20", - "availabilityZone": "us-east-1d", - "routeTableId": "rtb-c63af6a0" - }, - { - "subnetId": "subnet-af62dca3", - "cidr": "172.31.80.0/20", - "availabilityZone": "us-east-1f", - "routeTableId": "rtb-c63af6a0" - } - ] - }, - { - "name": "Private", - "type": "Private", - "subnets": [ - { - "subnetId": "subnet-0d4703177afb1797d", - "cidr": "172.31.96.0/24", - "availabilityZone": "us-east-1a", - "routeTableId": "rtb-05e12b551f60b37ed" - }, - { - "subnetId": "subnet-04262fc338f638054", - "cidr": "172.31.97.0/24", - "availabilityZone": "us-east-1b", - "routeTableId": "rtb-05e12b551f60b37ed" - }, - { - "subnetId": "subnet-044457c061edf85f2", - "cidr": "172.31.98.0/24", - "availabilityZone": "us-east-1c", - "routeTableId": "rtb-05e12b551f60b37ed" - }, - { - "subnetId": "subnet-04019d42d5c9e6fb9", - "cidr": "172.31.99.0/24", - "availabilityZone": "us-east-1d", - "routeTableId": "rtb-05e12b551f60b37ed" - }, - { - "subnetId": "subnet-049778993fb504a7c", - "cidr": "172.31.101.0/24", - "availabilityZone": "us-east-1f", - "routeTableId": "rtb-05e12b551f60b37ed" - } - ] - } - ] - }, - "security-group:account=100225593120:region=us-east-1:securityGroupId=sg-21ac675b": { - "securityGroupId": "sg-21ac675b", - "allowAllOutbound": false - }, - "security-group:account=100225593120:region=us-east-1:securityGroupId=sg-0415cab61ab6b45c5": { - "securityGroupId": "sg-0415cab61ab6b45c5", - "allowAllOutbound": false - } -} diff --git a/jest.config.js b/jest.config.js deleted file mode 100644 index 83179673b..000000000 --- a/jest.config.js +++ /dev/null @@ -1,8 +0,0 @@ -const { getJestProjects } = require('@nrwl/jest'); - -module.exports = { - projects: [ - ...getJestProjects(), - '/apps/example-app-import-test-run', - ], -}; diff --git a/jest.preset.js b/jest.preset.js deleted file mode 100644 index c93ed9dc7..000000000 --- a/jest.preset.js +++ /dev/null @@ -1,3 +0,0 @@ -const nxPreset = require('@nrwl/jest/preset'); - -module.exports = { ...nxPreset }; diff --git a/libs/.gitkeep b/libs/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/libs/app-shell/.babelrc b/libs/app-shell/.babelrc deleted file mode 100644 index aa568c3be..000000000 --- a/libs/app-shell/.babelrc +++ /dev/null @@ -1,22 +0,0 @@ -{ - "presets": ["@nrwl/react/babel"], - "plugins": [ - "babel-plugin-macros", - [ - "@emotion/babel-plugin-jsx-pragmatic", - { - "export": "jsx", - "import": "__cssprop", - "module": "@emotion/react" - } - ], - [ - "@babel/plugin-transform-react-jsx", - { - "pragma": "__cssprop", - "pragmaFrag": "React.Fragment" - } - ], - "@emotion/babel-plugin" - ] -} diff --git a/libs/app-shell/.eslintrc.json b/libs/app-shell/.eslintrc.json deleted file mode 100644 index 734ddacee..000000000 --- a/libs/app-shell/.eslintrc.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "extends": ["plugin:@nrwl/nx/react", "../../.eslintrc.json"], - "ignorePatterns": ["!**/*"], - "overrides": [ - { - "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], - "rules": {} - }, - { - "files": ["*.ts", "*.tsx"], - "rules": {} - }, - { - "files": ["*.js", "*.jsx"], - "rules": {} - } - ] -} diff --git a/libs/app-shell/.storybook/main.js b/libs/app-shell/.storybook/main.js deleted file mode 100644 index c0665be65..000000000 --- a/libs/app-shell/.storybook/main.js +++ /dev/null @@ -1,9 +0,0 @@ -const rootMain = require('../../../.storybook/main'); - -// Use the following syntax to add addons! -// rootMain.addons.push(''); -rootMain.stories.push( - ...['../src/lib/**/*.stories.mdx', '../src/lib/**/*.stories.@(js|jsx|ts|tsx)'] -); - -module.exports = rootMain; diff --git a/libs/app-shell/.storybook/preview.js b/libs/app-shell/.storybook/preview.js deleted file mode 100644 index 3b4319cbe..000000000 --- a/libs/app-shell/.storybook/preview.js +++ /dev/null @@ -1,19 +0,0 @@ -import React from 'react'; -import { addDecorator } from '@storybook/react'; -import { withKnobs } from '@storybook/addon-knobs'; -import { GlobalStyles } from 'twin.macro'; - -addDecorator(withKnobs); - -export const parameters = { - layout: 'fullscreen', -}; - -export const decorators = [ - (Story) => ( - <> - - - - ), -]; diff --git a/libs/app-shell/.storybook/tsconfig.json b/libs/app-shell/.storybook/tsconfig.json deleted file mode 100644 index fae45546b..000000000 --- a/libs/app-shell/.storybook/tsconfig.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "extends": "../tsconfig.json", - "compilerOptions": { - "emitDecoratorMetadata": true, - "outDir": "" - }, - "exclude": [ - "../**/*.spec.ts", - "../**/*.spec.js", - "../**/*.spec.tsx", - "../**/*.spec.jsx" - ], - "include": ["../src/**/*", "./*.js"], - "files": [ - "../../../node_modules/@nrwl/react/typings/cssmodule.d.ts", - "../../../node_modules/@nrwl/react/typings/image.d.ts" - ] -} diff --git a/libs/app-shell/.storybook/webpack.config.js b/libs/app-shell/.storybook/webpack.config.js deleted file mode 100644 index 7aa83b395..000000000 --- a/libs/app-shell/.storybook/webpack.config.js +++ /dev/null @@ -1,83 +0,0 @@ -const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin'); -const rootWebpackConfig = require('../../../.storybook/webpack.config'); -/** - * Export a function. Accept the base config as the only param. - * - * @param {Parameters[0]} options - */ -module.exports = async ({ config, mode }) => { - config = await rootWebpackConfig({ config, mode }); - - const tsPaths = new TsconfigPathsPlugin({ - configFile: './tsconfig.base.json', - }); - - config.resolve.plugins - ? config.resolve.plugins.push(tsPaths) - : (config.resolve.plugins = [tsPaths]); - - // Found this here: https://github.com/nrwl/nx/issues/2859 - // And copied the part of the solution that made it work - - const svgRuleIndex = config.module.rules.findIndex((rule) => { - const { test } = rule; - - return test.toString().startsWith('/\\.(svg|ico'); - }); - config.module.rules[ - svgRuleIndex - ].test = /\.(ico|jpg|jpeg|png|gif|eot|otf|webp|ttf|woff|woff2|cur|ani|pdf)(\?.*)?$/; - - config.module.rules.push( - { - test: /\.(png|jpe?g|gif|webp)$/, - loader: require.resolve('url-loader'), - options: { - limit: Number.MAX_VALUE, - }, - }, - { - test: /\.svg$/, - oneOf: [ - // If coming from JS/TS file, then transform into React component using SVGR. - { - issuer: { - test: /\.[jt]sx?$/, - }, - use: [ - { - loader: require.resolve('@svgr/webpack'), - options: { - svgo: false, - titleProp: true, - ref: true, - }, - }, - { - loader: require.resolve('url-loader'), - options: { - limit: 10000, // 10kB - name: '[name].[hash:7].[ext]', - esModule: false, - }, - }, - ], - }, - // Fallback to plain URL loader. - { - use: [ - { - loader: require.resolve('url-loader'), - options: { - limit: 10000, // 10kB - name: '[name].[hash:7].[ext]', - }, - }, - ], - }, - ], - } - ); - - return config; -}; diff --git a/libs/app-shell/README.md b/libs/app-shell/README.md deleted file mode 100644 index e544f33e4..000000000 --- a/libs/app-shell/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# app-shell - -This library was generated with [Nx](https://nx.dev). - -## Running unit tests - -Run `nx test app-shell` to execute the unit tests via [Jest](https://jestjs.io). diff --git a/libs/app-shell/__mocks__/fileMock.js b/libs/app-shell/__mocks__/fileMock.js deleted file mode 100644 index 86059f362..000000000 --- a/libs/app-shell/__mocks__/fileMock.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 'test-file-stub'; diff --git a/libs/app-shell/__mocks__/styleMock.js b/libs/app-shell/__mocks__/styleMock.js deleted file mode 100644 index f053ebf79..000000000 --- a/libs/app-shell/__mocks__/styleMock.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = {}; diff --git a/libs/app-shell/__mocks__/svgrMock.js b/libs/app-shell/__mocks__/svgrMock.js deleted file mode 100644 index 771dfd311..000000000 --- a/libs/app-shell/__mocks__/svgrMock.js +++ /dev/null @@ -1,3 +0,0 @@ -import * as React from 'react'; -export default 'SvgrURL'; -export const ReactComponent = 'div'; diff --git a/libs/app-shell/babel-jest.config.json b/libs/app-shell/babel-jest.config.json deleted file mode 100644 index e3aed4d0e..000000000 --- a/libs/app-shell/babel-jest.config.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "presets": [ - [ - "@babel/preset-env", - { - "targets": { - "node": "current" - } - } - ], - "@babel/preset-typescript", - "@babel/preset-react" - ], - "plugins": ["@emotion/babel-plugin", "babel-plugin-macros"] -} diff --git a/libs/app-shell/jest.config.js b/libs/app-shell/jest.config.js deleted file mode 100644 index a81021e0d..000000000 --- a/libs/app-shell/jest.config.js +++ /dev/null @@ -1,18 +0,0 @@ -module.exports = { - displayName: 'app-shell', - preset: '../../jest.preset.js', - transform: { - '^.+\\.[tj]sx?$': [ - 'babel-jest', - { cwd: __dirname, configFile: './babel-jest.config.json' }, - ], - }, - moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'], - coverageDirectory: '../../coverage/libs/app-shell', - moduleNameMapper: { - '\\.(jpg|jpeg|png|gif|eot|otf|webp|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': - '/__mocks__/fileMock.js', - '\\.svg$': '/__mocks__/svgrMock.js', - '\\.(css|less)$': '/__mocks__/styleMock.js', - }, -}; diff --git a/libs/app-shell/package.json b/libs/app-shell/package.json deleted file mode 100644 index 83f9d91a6..000000000 --- a/libs/app-shell/package.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "@alliancegenome/app-shell", - "version": "0.0.1" -} diff --git a/libs/app-shell/rollup.config.js b/libs/app-shell/rollup.config.js deleted file mode 100644 index badff2e32..000000000 --- a/libs/app-shell/rollup.config.js +++ /dev/null @@ -1,9 +0,0 @@ -const getRollupOptionsDefault = require('@nrwl/react/plugins/bundle-rollup'); -const svgr = require('@svgr/rollup').default; - -function getRollupOptions(optionsDefault) { - const options = getRollupOptionsDefault(optionsDefault); - options.plugins = [...options.plugins, svgr()]; - return options; -} -module.exports = getRollupOptions; diff --git a/libs/app-shell/src/assets/bars-solid.svg b/libs/app-shell/src/assets/bars-solid.svg deleted file mode 100644 index 8a8b715c9..000000000 --- a/libs/app-shell/src/assets/bars-solid.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/libs/app-shell/src/assets/caret-down-solid.svg b/libs/app-shell/src/assets/caret-down-solid.svg deleted file mode 100644 index e1d07232b..000000000 --- a/libs/app-shell/src/assets/caret-down-solid.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/libs/app-shell/src/assets/facebook-brands.svg b/libs/app-shell/src/assets/facebook-brands.svg deleted file mode 100644 index 649b49451..000000000 --- a/libs/app-shell/src/assets/facebook-brands.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/libs/app-shell/src/assets/github-brands.svg b/libs/app-shell/src/assets/github-brands.svg deleted file mode 100644 index 7870c06dc..000000000 --- a/libs/app-shell/src/assets/github-brands.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/libs/app-shell/src/assets/times-solid.svg b/libs/app-shell/src/assets/times-solid.svg deleted file mode 100644 index 814462245..000000000 --- a/libs/app-shell/src/assets/times-solid.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/libs/app-shell/src/assets/twitter-brands.svg b/libs/app-shell/src/assets/twitter-brands.svg deleted file mode 100644 index 9ac9e0b99..000000000 --- a/libs/app-shell/src/assets/twitter-brands.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/libs/app-shell/src/index.js b/libs/app-shell/src/index.js deleted file mode 100644 index 613d545f2..000000000 --- a/libs/app-shell/src/index.js +++ /dev/null @@ -1,4 +0,0 @@ -export * from './lib/page-footer/PageFooter'; -export * from './lib/menu/Menu'; -export * from './lib/link-render-provider/LinkRenderProvider'; -export * from './lib/app-shell'; diff --git a/libs/app-shell/src/lib/app-shell.js b/libs/app-shell/src/lib/app-shell.js deleted file mode 100644 index e45ca36e8..000000000 --- a/libs/app-shell/src/lib/app-shell.js +++ /dev/null @@ -1,69 +0,0 @@ -import React, { useCallback, useMemo, useState } from 'react'; -import { Global } from '@emotion/react'; -import tw from 'twin.macro'; -import { Logo, getOrganizationById } from '@alliancegenome/shared-assets'; -import Menu from './menu/Menu'; -import LinkRenderProvider from './link-render-provider/LinkRenderProvider'; -import LinkRenderDefault from './link-render-provider/LinkRenderDefault'; -import MODThemeProvider from './modtheme-provider/MODThemeProvider'; -import PageFooter from './page-footer/PageFooter'; -import { ReactComponent as HamburgerIcon } from '../assets/bars-solid.svg'; -import { ReactComponent as CloseIcon } from '../assets/times-solid.svg'; - -export function AppShell({ - children, - renderLink = LinkRenderDefault, - renderHeaderActions, - mod, -}) { - const organization = getOrganizationById(mod); - const [isMenuOpen, setMenuOpen] = useState(false); // for small screens - const handleToggleMenu = () => setMenuOpen(!isMenuOpen); - - return ( - - -
-
-
- - - - - {organization ? ( -
- - - {organization.name} - - - {organization.abbreviation} - -
- ) : null} - {renderHeaderActions && renderHeaderActions()} -
- - -
-
{children}
- -
-
-
- ); -} -export default AppShell; diff --git a/libs/app-shell/src/lib/app-shell.spec.js b/libs/app-shell/src/lib/app-shell.spec.js deleted file mode 100644 index 0d686413f..000000000 --- a/libs/app-shell/src/lib/app-shell.spec.js +++ /dev/null @@ -1,9 +0,0 @@ -import React from 'react'; -import { render } from '@testing-library/react'; -import AppShell from './app-shell'; -describe('AppShell', () => { - it('should render successfully', () => { - const { baseElement } = render(); - expect(baseElement).toBeTruthy(); - }); -}); diff --git a/libs/app-shell/src/lib/app-shell.stories.js b/libs/app-shell/src/lib/app-shell.stories.js deleted file mode 100644 index 72c07d115..000000000 --- a/libs/app-shell/src/lib/app-shell.stories.js +++ /dev/null @@ -1,32 +0,0 @@ -import React from 'react'; -import tw from 'twin.macro'; -import { AppShell } from './app-shell'; - -export default { - component: AppShell, - title: 'AppShell', -}; - -const PlaceHolder = () => ( -

Placeholder // Some great content will be here!

-); - -export const Default = () => { - return ( - <> - - - - - ); -}; - -export const WormBase = () => { - return ( - <> - - - - - ); -}; diff --git a/libs/app-shell/src/lib/link-render-provider/LinkRenderDefault.js b/libs/app-shell/src/lib/link-render-provider/LinkRenderDefault.js deleted file mode 100644 index 69d92f722..000000000 --- a/libs/app-shell/src/lib/link-render-provider/LinkRenderDefault.js +++ /dev/null @@ -1,19 +0,0 @@ -import React, { useCallback } from 'react'; - -export function LinkRenderDefault({ to, closeMenu, children, ...props }) { - const handleClick = useCallback( - (event) => { - event.preventDefault(); - closeMenu && closeMenu(); - window.location.href = to; - }, - [closeMenu, window] - ); - return ( - - {children} - - ); -} - -export default LinkRenderDefault; diff --git a/libs/app-shell/src/lib/link-render-provider/LinkRenderProvider.js b/libs/app-shell/src/lib/link-render-provider/LinkRenderProvider.js deleted file mode 100644 index 06f30abc7..000000000 --- a/libs/app-shell/src/lib/link-render-provider/LinkRenderProvider.js +++ /dev/null @@ -1,28 +0,0 @@ -import React, { useContext, useMemo } from 'react'; - -const LinkContext = React.createContext({ - renderLink: () => {}, -}); - -export function useRenderLink() { - const context = useContext(LinkContext); - if (context === undefined) { - throw new Error('useRenderLink must be used within a LinkContext'); - } - return context.renderLink; -} - -export function LinkRenderProvider({ renderLink, children }) { - const linkContextValue = useMemo( - () => ({ - renderLink, - }), - [renderLink] - ); - return ( - - {children} - - ); -} -export default LinkRenderProvider; diff --git a/libs/app-shell/src/lib/link-render-provider/LinkRenderProvider.spec.js b/libs/app-shell/src/lib/link-render-provider/LinkRenderProvider.spec.js deleted file mode 100644 index 52915404c..000000000 --- a/libs/app-shell/src/lib/link-render-provider/LinkRenderProvider.spec.js +++ /dev/null @@ -1,9 +0,0 @@ -import React from 'react'; -import { render } from '@testing-library/react'; -import LinkRenderProvider from './LinkRenderProvider'; -describe('LinkRenderProvider', () => { - it('should render successfully', () => { - const { baseElement } = render(); - expect(baseElement).toBeTruthy(); - }); -}); diff --git a/libs/app-shell/src/lib/menu/Menu.js b/libs/app-shell/src/lib/menu/Menu.js deleted file mode 100644 index bb0838d8c..000000000 --- a/libs/app-shell/src/lib/menu/Menu.js +++ /dev/null @@ -1,92 +0,0 @@ -import React, { - useMemo, - useRef, - useCallback, - useState, - useEffect, -} from 'react'; -import tw, { css } from 'twin.macro'; -import MenuItem from './MenuItem'; -import SubMenu from './SubMenu'; -import MenuContext from './MenuContext'; -import Link from './MenuLink'; -import sitemap from '../sitemap'; - -const Menu = () => { - const [itemOpen, setItemOpen] = useState(null); - const menuContextValue = useMemo(() => { - return { - itemOpen, - setItemOpen, - resetItemOpen: () => setItemOpen(null), - }; - }, [itemOpen, setItemOpen]); - - const menuRef = useRef(); - const handleClick = useCallback( - (event) => { - if (!menuRef.current.contains(event.target)) { - setItemOpen(null); - } - }, - [setItemOpen] - ); - - useEffect(() => { - document.addEventListener('mousedown', handleClick); - // return function to be called when unmounted - return () => { - document.removeEventListener('mousedown', handleClick); - }; - }, [handleClick]); - - return ( - -
    - {sitemap.map(({ sub, label, route }) => - sub ? ( - - {sub.map(({ label, route }) => ( - - {label} - - ))} - - ) : ( - - {label} - - ) - )} - - - SGD - - - WormBase - - - FlyBase - - - ZFIN - - - MGD - - - RGD - - - GOC - - -
-
- ); -}; - -export default Menu; diff --git a/libs/app-shell/src/lib/menu/Menu.spec.js b/libs/app-shell/src/lib/menu/Menu.spec.js deleted file mode 100644 index e2d12515f..000000000 --- a/libs/app-shell/src/lib/menu/Menu.spec.js +++ /dev/null @@ -1,16 +0,0 @@ -import React from 'react'; -import { render } from '@testing-library/react'; -import Menu from './Menu'; -import LinkRenderProvider from './link-render-provider/LinkRenderProvider'; -import LinkRenderDefault from './link-render-provider/LinkRenderDefault'; - -describe('Menu', () => { - it('should render successfully', () => { - const { baseElement } = render( - - - - ); - expect(baseElement).toBeTruthy(); - }); -}); diff --git a/libs/app-shell/src/lib/menu/MenuContext.js b/libs/app-shell/src/lib/menu/MenuContext.js deleted file mode 100644 index 04236394c..000000000 --- a/libs/app-shell/src/lib/menu/MenuContext.js +++ /dev/null @@ -1,10 +0,0 @@ -import React from 'react'; - -const MenuContext = React.createContext({ - itemOpen: null, - setItemOpen: () => {}, - resetItemOpen: () => {}, - renderLink: () => {}, -}); - -export default MenuContext; diff --git a/libs/app-shell/src/lib/menu/MenuItem.js b/libs/app-shell/src/lib/menu/MenuItem.js deleted file mode 100644 index 971e642a3..000000000 --- a/libs/app-shell/src/lib/menu/MenuItem.js +++ /dev/null @@ -1,18 +0,0 @@ -import React from 'react'; -import tw, { css } from 'twin.macro'; - -const MenuItem = ({ children }) => ( -
  • - {children} -
  • -); - -export default MenuItem; diff --git a/libs/app-shell/src/lib/menu/MenuLink.js b/libs/app-shell/src/lib/menu/MenuLink.js deleted file mode 100644 index 958ae03b9..000000000 --- a/libs/app-shell/src/lib/menu/MenuLink.js +++ /dev/null @@ -1,19 +0,0 @@ -import React, { useContext, useCallback } from 'react'; -import { Link } from 'react-router-dom'; -import { useRenderLink } from '../link-render-provider/LinkRenderProvider'; -import MenuContext from './MenuContext'; - -const MenuLink = ({ to, children }) => { - const { resetItemOpen } = useContext(MenuContext); - const renderLink = useRenderLink(); - const closeMenu = useCallback(() => { - resetItemOpen(); - }, [resetItemOpen]); - return renderLink({ - to, - children, - closeMenu, - }); -}; - -export default MenuLink; diff --git a/libs/app-shell/src/lib/menu/SubMenu.js b/libs/app-shell/src/lib/menu/SubMenu.js deleted file mode 100644 index 3166fc428..000000000 --- a/libs/app-shell/src/lib/menu/SubMenu.js +++ /dev/null @@ -1,32 +0,0 @@ -import React, { useState, useContext, useCallback } from 'react'; -import tw from 'twin.macro'; -import MenuItem from './MenuItem'; -import MenuContext from './MenuContext'; -import { ReactComponent as DownArrowIcon } from '../../assets/caret-down-solid.svg'; - -const SubMenu = ({ title, children }) => { - const { itemOpen, setItemOpen } = useContext(MenuContext); - const handleClick = useCallback(() => { - setItemOpen(title); - }, [setItemOpen, title]); - - return ( - - - - - - {title} - {itemOpen === title ? ( -
      {children}
    - ) : ( -
      {children}
    - )} -
    - ); -}; - -export default SubMenu; diff --git a/libs/app-shell/src/lib/modtheme-provider/MODThemeProvider.js b/libs/app-shell/src/lib/modtheme-provider/MODThemeProvider.js deleted file mode 100644 index 4c3990189..000000000 --- a/libs/app-shell/src/lib/modtheme-provider/MODThemeProvider.js +++ /dev/null @@ -1,47 +0,0 @@ -import React from 'react'; -import { Global } from '@emotion/react'; -import { css } from 'twin.macro'; - -const stylesBase = css` - .agr { - --mod-primary: #2598c5; - } - - .wormbase { - --mod-primary: #1e40af; - } - - .sgd { - --mod-primary: #696599; - } - - .zfin { - --mod-primary: teal; - } - - .flybase { - --mod-primary: #036; - } - - .mgd { - --mod-primary: #0ea5e9; - } - - .rgd { - --mod-primary: #2865a3; - } - - .goc { - --mod-primary: #00174f; - } -`; - -export function MODThemeProvider({ mod = 'agr', children }) { - return ( - <> - -
    {children}
    - - ); -} -export default MODThemeProvider; diff --git a/libs/app-shell/src/lib/modtheme-provider/MODThemeProvider.spec.js b/libs/app-shell/src/lib/modtheme-provider/MODThemeProvider.spec.js deleted file mode 100644 index e42ea2f50..000000000 --- a/libs/app-shell/src/lib/modtheme-provider/MODThemeProvider.spec.js +++ /dev/null @@ -1,9 +0,0 @@ -import React from 'react'; -import { render } from '@testing-library/react'; -import MODThemeProvider from './MODThemeProvider'; -describe('MODThemeProvider', () => { - it('should render successfully', () => { - const { baseElement } = render(); - expect(baseElement).toBeTruthy(); - }); -}); diff --git a/libs/app-shell/src/lib/page-footer/PageFooter.js b/libs/app-shell/src/lib/page-footer/PageFooter.js deleted file mode 100644 index 274ef6b3a..000000000 --- a/libs/app-shell/src/lib/page-footer/PageFooter.js +++ /dev/null @@ -1,62 +0,0 @@ -import tw, { css } from 'twin.macro'; -import React from 'react'; -import { allianceLogoWhiteBase64 } from '@alliancegenome/shared-assets'; -import { useRenderLink } from '../link-render-provider/LinkRenderProvider'; -import PageFooterLinkGroup from './PageFooterLinkGroup'; -import PageFooterLinkGroupLabel from './PageFooterLinkGroupLabel'; -import sitemap from '../sitemap'; -import PageFooterLink from './PageFooterLink'; -import SocialIcon from './SocialIcon'; -import { ReactComponent as FacebookIcon } from '../../assets/facebook-brands.svg'; -import { ReactComponent as TwitterIcon } from '../../assets/twitter-brands.svg'; -import { ReactComponent as GitHubIcon } from '../../assets/github-brands.svg'; - -export function PageFooter(props) { - const Link = useRenderLink(); - return ( -
    -
    - {sitemap.map(({ sub, label, route }) => - route === '/' ? null : ( - - - {route ? {label} : label} - - {sub && - sub.map(({ label, route }) => ( - - {label} - - ))} - - ) - )} - - Connect With Us - - Facebook - - - Twitter - - - GitHub - - -
    -
    - - Alliance of Genome Resources logo - -
    -
    - ); -} -export default PageFooter; diff --git a/libs/app-shell/src/lib/page-footer/PageFooter.spec.js b/libs/app-shell/src/lib/page-footer/PageFooter.spec.js deleted file mode 100644 index 6fed1c9e0..000000000 --- a/libs/app-shell/src/lib/page-footer/PageFooter.spec.js +++ /dev/null @@ -1,16 +0,0 @@ -import React from 'react'; -import { render } from '@testing-library/react'; -import PageFooter from './PageFooter'; -import LinkRenderProvider from './link-render-provider/LinkRenderProvider'; -import LinkRenderDefault from './link-render-provider/LinkRenderDefault'; - -describe('PageFooter', () => { - it('should render successfully', () => { - const { baseElement } = render( - - - - ); - expect(baseElement).toBeTruthy(); - }); -}); diff --git a/libs/app-shell/src/lib/page-footer/PageFooterLink.js b/libs/app-shell/src/lib/page-footer/PageFooterLink.js deleted file mode 100644 index 01dbc6f21..000000000 --- a/libs/app-shell/src/lib/page-footer/PageFooterLink.js +++ /dev/null @@ -1,13 +0,0 @@ -import React from 'react'; -import tw from 'twin.macro'; - -import { useRenderLink } from '../link-render-provider/LinkRenderProvider'; - -export default function PageFooterLink({ children, to }) { - const Link = useRenderLink(); - return ( - - {children} - - ); -} diff --git a/libs/app-shell/src/lib/page-footer/PageFooterLinkGroup.js b/libs/app-shell/src/lib/page-footer/PageFooterLinkGroup.js deleted file mode 100644 index 100802028..000000000 --- a/libs/app-shell/src/lib/page-footer/PageFooterLinkGroup.js +++ /dev/null @@ -1,6 +0,0 @@ -import tw from 'twin.macro'; -import React from 'react'; - -export default function PageFooterLinkGroup({ children }) { - return
    {children}
    ; -} diff --git a/libs/app-shell/src/lib/page-footer/PageFooterLinkGroupLabel.js b/libs/app-shell/src/lib/page-footer/PageFooterLinkGroupLabel.js deleted file mode 100644 index c552a565a..000000000 --- a/libs/app-shell/src/lib/page-footer/PageFooterLinkGroupLabel.js +++ /dev/null @@ -1,6 +0,0 @@ -import tw from 'twin.macro'; -import React from 'react'; - -export default function PageFooterLinkGroupLabel({ children }) { - return {children}; -} diff --git a/libs/app-shell/src/lib/page-footer/SocialIcon.js b/libs/app-shell/src/lib/page-footer/SocialIcon.js deleted file mode 100644 index 04c089044..000000000 --- a/libs/app-shell/src/lib/page-footer/SocialIcon.js +++ /dev/null @@ -1,8 +0,0 @@ -import tw from 'twin.macro'; -import React from 'react'; - -const SocialIcon = ({ IconComponent }) => ( - -); - -export default SocialIcon; diff --git a/libs/app-shell/src/lib/sitemap.js b/libs/app-shell/src/lib/sitemap.js deleted file mode 100644 index 1efe0a352..000000000 --- a/libs/app-shell/src/lib/sitemap.js +++ /dev/null @@ -1,117 +0,0 @@ -const sitemap = [ - { - label: 'Home', - route: '/', - }, - { - label: 'Data and Tools', - sub: [ - { - label: 'Downloads', - route: '/downloads', - }, - { - label: 'API', - route: '/api/swagger-ui', - }, - { - label: 'Tools and Prototypes', - route: '/prototypes', - }, - { - label: 'AllianceMine', - route: '/bluegenes', - }, - { - label: 'JBrowse', - route: '/jbrowse?data=data%2FHomo%20sapiens', - } - ], - }, - { - label: 'News', - sub: [ - { - label: 'News and Events', - route: '/news', - }, - { - label: 'Release Notes', - route: '/release-notes', - }, - ], - }, - { - label: 'About', - sub: [ - { - label: 'About Us', - route: '/about-us', - }, - { - label: 'Funding', - route: '/funding', - }, - { - label: 'Organization and Governance', - route: '/organization-and-governance', - }, - { - label: 'Privacy, Warranty, and Licensing', - route: '/privacy-warranty-licensing', - }, - { - label: 'Publications', - route: '/publications', - }, - ], - }, - { - label: 'Working Groups', - route: '/working-groups', - }, - { - label: 'Help', - sub: [ - { - label: 'FAQ / Known Issues', - route: '/faq', - }, - { - label: 'Glossary', - route: '/glossary', - }, - { - label: 'Tutorials', - route: '/tutorials', - }, - { - label: 'User Documentation', - route: '/help', - }, - ], - }, - { - label: 'Community', - sub: [ - { - label: 'Alliance User Community', - route: 'https://groups.google.com/a/alliancegenome.org/g/community', - }, - { - label: 'Twitter', - route: 'https://twitter.com/alliancegenome', - }, - ], - }, - { - label: 'Contact Us', - route: '/contact-us', - }, - { - label: 'Cite Us', - route: '/cite-us', - }, -]; - -export default sitemap; diff --git a/libs/app-shell/tsconfig.json b/libs/app-shell/tsconfig.json deleted file mode 100644 index ef9683c5f..000000000 --- a/libs/app-shell/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "jsx": "react-jsx", - "allowJs": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true - }, - "files": [], - "include": [], - "references": [ - { - "path": "./tsconfig.lib.json" - }, - { - "path": "./tsconfig.spec.json" - }, - { - "path": "./.storybook/tsconfig.json" - } - ] -} diff --git a/libs/app-shell/tsconfig.lib.json b/libs/app-shell/tsconfig.lib.json deleted file mode 100644 index 43da15fb5..000000000 --- a/libs/app-shell/tsconfig.lib.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../dist/out-tsc", - "types": ["node"] - }, - "files": [ - "../../node_modules/@nrwl/react/typings/cssmodule.d.ts", - "../../node_modules/@nrwl/react/typings/image.d.ts" - ], - "exclude": [ - "**/*.spec.ts", - "**/*.spec.tsx", - "**/*.stories.ts", - "**/*.stories.js", - "**/*.stories.jsx", - "**/*.stories.tsx" - ], - "include": ["**/*.js", "**/*.jsx", "**/*.ts", "**/*.tsx"] -} diff --git a/libs/app-shell/tsconfig.spec.json b/libs/app-shell/tsconfig.spec.json deleted file mode 100644 index 559410b96..000000000 --- a/libs/app-shell/tsconfig.spec.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../dist/out-tsc", - "module": "commonjs", - "types": ["jest", "node"] - }, - "include": [ - "**/*.spec.ts", - "**/*.spec.tsx", - "**/*.spec.js", - "**/*.spec.jsx", - "**/*.d.ts" - ] -} diff --git a/libs/shared-assets/.babelrc b/libs/shared-assets/.babelrc deleted file mode 100644 index 09d67939c..000000000 --- a/libs/shared-assets/.babelrc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "presets": ["@nrwl/react/babel"], - "plugins": [] -} diff --git a/libs/shared-assets/.eslintrc.json b/libs/shared-assets/.eslintrc.json deleted file mode 100644 index 4fd19144b..000000000 --- a/libs/shared-assets/.eslintrc.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "extends": ["plugin:@nrwl/nx/react", "../../.eslintrc.json"], - "ignorePatterns": ["!**/*"], - "rules": {}, - "overrides": [ - { - "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], - "rules": {} - }, - { - "files": ["*.ts", "*.tsx"], - "rules": {} - }, - { - "files": ["*.js", "*.jsx"], - "rules": {} - } - ] -} diff --git a/libs/shared-assets/.storybook/main.js b/libs/shared-assets/.storybook/main.js deleted file mode 100644 index c0665be65..000000000 --- a/libs/shared-assets/.storybook/main.js +++ /dev/null @@ -1,9 +0,0 @@ -const rootMain = require('../../../.storybook/main'); - -// Use the following syntax to add addons! -// rootMain.addons.push(''); -rootMain.stories.push( - ...['../src/lib/**/*.stories.mdx', '../src/lib/**/*.stories.@(js|jsx|ts|tsx)'] -); - -module.exports = rootMain; diff --git a/libs/shared-assets/.storybook/preview.js b/libs/shared-assets/.storybook/preview.js deleted file mode 100644 index a3fb353a3..000000000 --- a/libs/shared-assets/.storybook/preview.js +++ /dev/null @@ -1,4 +0,0 @@ -import { addDecorator } from '@storybook/react'; -import { withKnobs } from '@storybook/addon-knobs'; - -addDecorator(withKnobs); diff --git a/libs/shared-assets/.storybook/tsconfig.json b/libs/shared-assets/.storybook/tsconfig.json deleted file mode 100644 index fae45546b..000000000 --- a/libs/shared-assets/.storybook/tsconfig.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "extends": "../tsconfig.json", - "compilerOptions": { - "emitDecoratorMetadata": true, - "outDir": "" - }, - "exclude": [ - "../**/*.spec.ts", - "../**/*.spec.js", - "../**/*.spec.tsx", - "../**/*.spec.jsx" - ], - "include": ["../src/**/*", "./*.js"], - "files": [ - "../../../node_modules/@nrwl/react/typings/cssmodule.d.ts", - "../../../node_modules/@nrwl/react/typings/image.d.ts" - ] -} diff --git a/libs/shared-assets/.storybook/webpack.config.js b/libs/shared-assets/.storybook/webpack.config.js deleted file mode 100644 index ab3498da6..000000000 --- a/libs/shared-assets/.storybook/webpack.config.js +++ /dev/null @@ -1,89 +0,0 @@ -const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin'); -const rootWebpackConfig = require('../../../.storybook/webpack.config'); - -/** - * Export a function. Accept the base config as the only param. - * - * @param {Parameters[0]} options - */ -module.exports = async ({ config, mode }) => { - config = await rootWebpackConfig({ config, mode }); - - const tsPaths = new TsconfigPathsPlugin({ - configFile: './tsconfig.base.json', - }); - - config.resolve.plugins - ? config.resolve.plugins.push(tsPaths) - : (config.resolve.plugins = [tsPaths]); - - // Found this here: https://github.com/nrwl/nx/issues/2859 - // And copied the part of the solution that made it work - - const svgRuleIndex = config.module.rules.findIndex((rule) => { - const { test } = rule; - - return test.toString().startsWith('/\\.(svg|ico'); - }); - config.module.rules[ - svgRuleIndex - ].test = /\.(ico|jpg|jpeg|png|gif|eot|otf|webp|ttf|woff|woff2|cur|ani|pdf)(\?.*)?$/; - - config.module.rules.push( - { - test: /\.(png|jpe?g|gif|webp)$/, - loader: require.resolve('url-loader'), - options: { - limit: Number.MAX_VALUE, - }, - }, - { - test: /\.svg$/, - oneOf: [ - // If coming from JS/TS file, then transform into React component using SVGR. - { - issuer: { - test: /\.[jt]sx?$/, - }, - use: [ - { - loader: require.resolve('@svgr/webpack'), - options: { - svgo: false, - titleProp: true, - ref: true, - }, - }, - { - loader: require.resolve('url-loader'), - options: { - limit: 10000, // 10kB - name: '[name].[hash:7].[ext]', - esModule: false, - }, - }, - ], - }, - // Fallback to plain URL loader. - { - use: [ - { - loader: require.resolve('url-loader'), - options: { - limit: 10000, // 10kB - name: '[name].[hash:7].[ext]', - }, - }, - ], - }, - ], - } - ); - - /* Object.defineProperty(RegExp.prototype, 'toJSON', { - value: RegExp.prototype.toString, - }); - console.log(JSON.stringify(config, null, 2)); */ - - return config; -}; diff --git a/libs/shared-assets/README.md b/libs/shared-assets/README.md deleted file mode 100644 index b95220792..000000000 --- a/libs/shared-assets/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# shared-assets - -This library was generated with [Nx](https://nx.dev). - -## Running unit tests - -Run `nx test shared-assets` to execute the unit tests via [Jest](https://jestjs.io). diff --git a/libs/shared-assets/__mocks__/fileMock.js b/libs/shared-assets/__mocks__/fileMock.js deleted file mode 100644 index 86059f362..000000000 --- a/libs/shared-assets/__mocks__/fileMock.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 'test-file-stub'; diff --git a/libs/shared-assets/__mocks__/styleMock.js b/libs/shared-assets/__mocks__/styleMock.js deleted file mode 100644 index f053ebf79..000000000 --- a/libs/shared-assets/__mocks__/styleMock.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = {}; diff --git a/libs/shared-assets/babel-jest.config.json b/libs/shared-assets/babel-jest.config.json deleted file mode 100644 index bf04d5f81..000000000 --- a/libs/shared-assets/babel-jest.config.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "presets": [ - [ - "@babel/preset-env", - { - "targets": { - "node": "current" - } - } - ], - "@babel/preset-typescript", - "@babel/preset-react" - ] -} diff --git a/libs/shared-assets/jest.config.js b/libs/shared-assets/jest.config.js deleted file mode 100644 index 33fe527bf..000000000 --- a/libs/shared-assets/jest.config.js +++ /dev/null @@ -1,17 +0,0 @@ -module.exports = { - displayName: 'shared-assets', - preset: '../../jest.preset.js', - transform: { - '^.+\\.[tj]sx?$': [ - 'babel-jest', - { cwd: __dirname, configFile: './babel-jest.config.json' }, - ], - }, - moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'], - coverageDirectory: '../../coverage/libs/shared-assets', - moduleNameMapper: { - '\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': - '/__mocks__/fileMock.js', - '\\.(css|less)$': '/__mocks__/styleMock.js', - }, -}; diff --git a/libs/shared-assets/package.json b/libs/shared-assets/package.json deleted file mode 100644 index 2bd3a4ed4..000000000 --- a/libs/shared-assets/package.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "@alliancegenome/shared-assets", - "version": "0.0.1" -} diff --git a/libs/shared-assets/src/index.js b/libs/shared-assets/src/index.js deleted file mode 100644 index 5457d0ba3..000000000 --- a/libs/shared-assets/src/index.js +++ /dev/null @@ -1 +0,0 @@ -export * from './lib/shared-assets'; diff --git a/libs/shared-assets/src/lib/logo/Logo.js b/libs/shared-assets/src/lib/logo/Logo.js deleted file mode 100644 index 3186332c2..000000000 --- a/libs/shared-assets/src/lib/logo/Logo.js +++ /dev/null @@ -1,14 +0,0 @@ -import React from 'react'; -import organizations, { getOrganizationById } from '../organizations'; -import { allianceLogoBase64 } from '../assets'; - -export function Logo({ id, ...props }) { - const organization = getOrganizationById(id); - return ( - - ); -} -export default Logo; diff --git a/libs/shared-assets/src/lib/logo/Logo.spec.js b/libs/shared-assets/src/lib/logo/Logo.spec.js deleted file mode 100644 index dec04c96d..000000000 --- a/libs/shared-assets/src/lib/logo/Logo.spec.js +++ /dev/null @@ -1,9 +0,0 @@ -import React from 'react'; -import { render } from '@testing-library/react'; -import Logo from './Logo'; -describe('Logo', () => { - it('should render successfully', () => { - const { baseElement } = render(); - expect(baseElement).toBeTruthy(); - }); -}); diff --git a/libs/shared-assets/src/lib/logo/Logo.stories.js b/libs/shared-assets/src/lib/logo/Logo.stories.js deleted file mode 100644 index d2172c6e0..000000000 --- a/libs/shared-assets/src/lib/logo/Logo.stories.js +++ /dev/null @@ -1,11 +0,0 @@ -import React from 'react'; -import { Logo } from './Logo'; - -export default { - component: Logo, - title: 'Logo', -}; - -export const primary = () => { - return ; -}; diff --git a/libs/shared-assets/src/lib/organizations.js b/libs/shared-assets/src/lib/organizations.js deleted file mode 100644 index bcfd6012f..000000000 --- a/libs/shared-assets/src/lib/organizations.js +++ /dev/null @@ -1,79 +0,0 @@ -import { func } from 'prop-types'; -import { - allianceLogoHgncBase64, - allianceLogoMgdBase64, - allianceLogoSgdBase64, - allianceLogoZfinBase64, - allianceLogoFlybaseBase64, - allianceLogoRgdBase64, - allianceLogoWormbaseBase64, - allianceLogoGocBase64, -} from './assets'; - -const organizations = [ - { - id: 'hgnc', - name: 'HGNC', - abbreviation: 'HGNC', - logo: allianceLogoHgncBase64, - }, - { - id: 'mgd', - name: 'Mouse Genome Database', - abbreviation: 'MGD', - logo: allianceLogoMgdBase64, - }, - { - id: 'sgd', - name: 'Saccharomyces Genome Database', - abbreviation: 'SGD', - logo: allianceLogoSgdBase64, - }, - { - id: 'zfin', - name: 'Zebrafish Information Network', - abbreviation: 'ZFIN', - logo: allianceLogoZfinBase64, - }, - { - id: 'flybase', - name: 'FlyBase', - abbreviation: 'FlyBase', - logo: allianceLogoFlybaseBase64, - }, - { - id: 'rgd', - name: 'Rat Genome Database', - abbreviation: 'RGD', - logo: allianceLogoRgdBase64, - }, - { - id: 'wormbase', - name: 'WormBase', - abbreviation: 'WormBase', - logo: allianceLogoWormbaseBase64, - }, - { - id: 'goc', - name: 'Gene Ontology Consortium', - abbreviation: 'GOC', - logo: allianceLogoGocBase64, - }, -]; - -export function getAllMembers() { - return organizations.filter(({ id }) => id !== 'hgnc'); -} - -export function getAllSpecies() { - return organizations.filter(({ id }) => id !== 'goc'); -} - -export function getOrganizationById(id) { - const [org] = organizations.filter((org) => { - return org.id === id; - }); - return org; -} - -export default organizations; diff --git a/libs/shared-assets/src/lib/shared-assets.js b/libs/shared-assets/src/lib/shared-assets.js deleted file mode 100644 index 661cd5ed0..000000000 --- a/libs/shared-assets/src/lib/shared-assets.js +++ /dev/null @@ -1,8 +0,0 @@ -import React from 'react'; -export * from './assets/'; -export * from './organizations'; -export { default as Logo } from './logo/Logo'; -export function SharedAssets(props) { - return
    ; -} -export default SharedAssets; diff --git a/libs/shared-assets/src/lib/shared-assets.spec.js b/libs/shared-assets/src/lib/shared-assets.spec.js deleted file mode 100644 index d9661e709..000000000 --- a/libs/shared-assets/src/lib/shared-assets.spec.js +++ /dev/null @@ -1,9 +0,0 @@ -import React from 'react'; -import { render } from '@testing-library/react'; -import SharedAssets from './shared-assets'; -describe('SharedAssets', () => { - it('should render successfully', () => { - const { baseElement } = render(); - expect(baseElement).toBeTruthy(); - }); -}); diff --git a/libs/shared-assets/src/lib/shared-assets.stories.js b/libs/shared-assets/src/lib/shared-assets.stories.js deleted file mode 100644 index 606fab47c..000000000 --- a/libs/shared-assets/src/lib/shared-assets.stories.js +++ /dev/null @@ -1,11 +0,0 @@ -import React from 'react'; -import { SharedAssets } from './shared-assets'; - -export default { - component: SharedAssets, - title: 'SharedAssets', -}; - -export const primary = () => { - return ; -}; diff --git a/libs/shared-assets/tsconfig.json b/libs/shared-assets/tsconfig.json deleted file mode 100644 index ef9683c5f..000000000 --- a/libs/shared-assets/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "jsx": "react-jsx", - "allowJs": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true - }, - "files": [], - "include": [], - "references": [ - { - "path": "./tsconfig.lib.json" - }, - { - "path": "./tsconfig.spec.json" - }, - { - "path": "./.storybook/tsconfig.json" - } - ] -} diff --git a/libs/shared-assets/tsconfig.lib.json b/libs/shared-assets/tsconfig.lib.json deleted file mode 100644 index 43da15fb5..000000000 --- a/libs/shared-assets/tsconfig.lib.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../dist/out-tsc", - "types": ["node"] - }, - "files": [ - "../../node_modules/@nrwl/react/typings/cssmodule.d.ts", - "../../node_modules/@nrwl/react/typings/image.d.ts" - ], - "exclude": [ - "**/*.spec.ts", - "**/*.spec.tsx", - "**/*.stories.ts", - "**/*.stories.js", - "**/*.stories.jsx", - "**/*.stories.tsx" - ], - "include": ["**/*.js", "**/*.jsx", "**/*.ts", "**/*.tsx"] -} diff --git a/libs/shared-assets/tsconfig.spec.json b/libs/shared-assets/tsconfig.spec.json deleted file mode 100644 index 559410b96..000000000 --- a/libs/shared-assets/tsconfig.spec.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../dist/out-tsc", - "module": "commonjs", - "types": ["jest", "node"] - }, - "include": [ - "**/*.spec.ts", - "**/*.spec.tsx", - "**/*.spec.js", - "**/*.spec.jsx", - "**/*.d.ts" - ] -} diff --git a/nginx.conf b/nginx.conf deleted file mode 100644 index 93de6c014..000000000 --- a/nginx.conf +++ /dev/null @@ -1,7 +0,0 @@ -server { - listen 2992; - root /workdir/agr_ui/dist/apps/main-app; - index index.html; - - error_page 404 =200 /index.html; -} diff --git a/nx.json b/nx.json deleted file mode 100644 index 08816bb4f..000000000 --- a/nx.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "implicitDependencies": { - "workspace.json": "*", - "package.json": { - "dependencies": "*", - "devDependencies": "*" - }, - "tsconfig.base.json": "*", - "tslint.json": "*", - ".eslintrc.json": "*", - "nx.json": "*" - }, - "affected": { - "defaultBase": "master" - }, - "npmScope": "agr-modular-ui", - "tasksRunnerOptions": { - "default": { - "runner": "@nrwl/workspace/tasks-runners/default", - "options": { - "cacheableOperations": [ - "build", - "lint", - "test", - "e2e", - "build-storybook" - ] - } - } - }, - "projects": { - "app-shell": { - "tags": [] - }, - "main-app": { - "tags": [] - }, - "shared-assets": { - "tags": [] - } - }, - "targetDependencies": { - "build": [ - { - "target": "build", - "projects": "dependencies" - } - ] - } -} diff --git a/package.json b/package.json index a6b7c367d..884b604ce 100644 --- a/package.json +++ b/package.json @@ -1,70 +1,34 @@ { "name": "agr_ui", - "version": "4.2.0", - "license": "MIT", - "scripts": { - "nx": "nx", - "start": "nx serve", - "build": "echo \"# trick Amplify SSG detection with next build && next export\" && nx build", - "test": "nx test", - "lint": "nx workspace-lint && nx lint", - "e2e": "nx e2e", - "affected:apps": "nx affected:apps", - "affected:libs": "nx affected:libs", - "affected:build": "nx affected:build", - "affected:e2e": "nx affected:e2e", - "affected:test": "nx affected:test", - "affected:lint": "nx affected:lint", - "affected:dep-graph": "nx affected:dep-graph", - "affected": "nx affected", - "format": "nx format:write", - "format:write": "nx format:write", - "format:check": "nx format:check", - "update": "nx migrate latest", - "workspace-generator": "nx workspace-generator", - "dep-graph": "nx dep-graph", - "help": "nx help", - "prebuild": "npm run resource-descriptors", - "postbuild": "npm run sitemap", - "sitemap": "node bin/build_sitemap.js", - "resource-descriptors": "node bin/build_resource_descriptors.js" - }, + "version": "0.1.0", "private": true, "dependencies": { - "@emotion/react": "11.1.5", - "@emotion/server": "11.0.0", - "@emotion/styled": "11.1.5", "@geneontology/curie-util-es5": "^1.2.4", "@geneontology/wc-gocam-viz": "0.0.51", "@geneontology/wc-ribbon-strips": "0.0.37", "@geneontology/wc-ribbon-table": "0.0.57", - "@testing-library/jest-dom": "^5.16.1", - "abortcontroller-polyfill": "^1.5.0", + "@testing-library/jest-dom": "^5.17.0", + "@testing-library/react": "^13.4.0", + "@testing-library/user-event": "^13.5.0", "agr_genomefeaturecomponent": "^0.3.24", "aws-cdk": "^2.95.1", "aws-cdk-lib": "^2.95.1", - "aws-lambda": "^1.0.7", "bootstrap": "4.6.1", + "buffer": "^6.0.3", "constructs": "^10.2.70", - "core-js": "^3.6.5", "custom-event-polyfill": "^1.0.6", "d3-selection": "2.0.0", "document-register-element": "1.13.1", "generic-sequence-panel": "^1.3.1", "html-react-parser": "^0.10.0", "immutable": "^3.8.1", - "js-yaml": "^4.1.0", "lodash.clone": "^4.5.0", "lodash.isequal": "^4.5.0", "lodash.without": "^4.4.0", - "next": "12.1.0", "numeral": "^2.0.6", - "object-hash": "2.1.1", - "popper.js": "1.16.1", - "prop-types": "^15.5.10", - "qs": "^6.9.4", "react": "17.0.2", "react-autosuggest": "^10.0.0", + "react-bootstrap": "^2.9.1", "react-bootstrap-table-next": "^3.0.1", "react-bootstrap-table2-filter": "1.3.3", "react-bootstrap-table2-paginator": "^2.0.4", @@ -72,83 +36,53 @@ "react-ga": "^3.3.1", "react-ga4": "^2.1.0", "react-helmet": "^6.0.0", - "react-hot-loader": "^4.3.11", "react-query": "2.26.4", "react-redux": "7.2.3", "react-router-dom": "^5.2.0", "react-router-hash-link": "^1.2.0", "react-router-scroll-4": "1.0.0-beta.2", + "react-scripts": "5.0.1", "react-scrollspy": "^3.3.5", "react-select": "2.4.4", - "react-test-renderer": "^17.0.2", "react-twitter-widgets": "^1.3.0", "reactstrap": "8.9.0", - "redux": "^4.0.5", - "redux-mock-store": "^1.5.4", - "redux-thunk": "^2.4.1", - "regenerator-runtime": "^0.13.7", "reselect": "^2.5.4", + "sass": "^1.69.4", "sitemap": "^1.13.0", - "source-map-support": "^0.5.21", - "tslib": "^2.0.0", - "twin.macro": "2.2.3", - "whatwg-fetch": "^3.4.0" + "web-vitals": "^2.1.4" + }, + "scripts": { + "start": "react-scripts start", + "build": "react-scripts build", + "test": "react-scripts test", + "eject": "react-scripts eject", + "prebuild": "npm run resource-descriptors", + "postbuild": "npm run sitemap", + "sitemap": "node bin/build_sitemap.js", + "resource-descriptors": "node bin/build_resource_descriptors.js" + }, + "eslintConfig": { + "extends": [ + "react-app", + "react-app/jest" + ] + }, + "browserslist": { + "production": [ + ">0.2%", + "not dead", + "not op_mini all" + ], + "development": [ + "last 1 chrome version", + "last 1 firefox version", + "last 1 safari version" + ] + }, + "overrides": { + "autoprefixer": "10.4.5" }, "devDependencies": { - "@babel/core": "7.9.6", - "@babel/plugin-proposal-private-property-in-object": "^7.21.11", - "@babel/preset-env": "7.9.6", - "@babel/preset-react": "7.9.4", - "@babel/preset-typescript": "7.9.0", - "@emotion/babel-plugin": "11.2.0", - "@emotion/babel-plugin-jsx-pragmatic": "0.1.5", - "@nrwl/cli": "12.7.2", - "@nrwl/cypress": "12.7.2", - "@nrwl/eslint-plugin-nx": "12.7.2", - "@nrwl/jest": "12.7.2", - "@nrwl/linter": "12.7.2", - "@nrwl/next": "12.7.2", - "@nrwl/react": "12.7.2", - "@nrwl/storybook": "12.7.2", - "@nrwl/tao": "12.7.2", - "@nrwl/web": "12.7.2", - "@nrwl/workspace": "12.7.2", - "@storybook/addon-essentials": "~6.3.0", - "@storybook/addon-knobs": "~6.3.0", - "@storybook/react": "~6.3.0", - "@svgr/rollup": "5.5.0", - "@svgr/webpack": "^5.4.0", - "@testing-library/react": "11.2.5", - "@types/jest": "26.0.8", - "@types/node": "14.14.33", - "@types/react": "17.0.3", - "@types/react-dom": "17.0.3", - "@types/react-router-dom": "5.1.7", - "@types/react-test-renderer": "^17.0.1", - "@types/webpack": "4.41.21", - "@typescript-eslint/eslint-plugin": "4.28.5", - "@typescript-eslint/parser": "4.28.5", - "ajv": "8.1.0", - "babel-jest": "26.2.2", - "babel-loader": "8.1.0", - "babel-plugin-macros": "3.0.1", - "buffer": "^6.0.3", - "cypress": "^6.0.1", - "dotenv": "10.0.0", - "eslint": "7.10.0", - "eslint-config-prettier": "8.1.0", - "eslint-plugin-cypress": "^2.10.3", - "eslint-plugin-import": "2.22.1", - "eslint-plugin-jsx-a11y": "6.4.1", - "eslint-plugin-react": "7.23.1", - "eslint-plugin-react-hooks": "4.2.0", - "file-loader": "6.2.0", - "jest": "27.0.3", - "prettier": "2.3.2", - "robotstxt-webpack-plugin": "5.0.0", - "ts-jest": "27.0.3", - "ts-node": "~9.1.1", - "typescript": "4.3.5", - "url-loader": "^3.0.0" + "@babel/plugin-proposal-private-property-in-object": "^7.21.11" } } diff --git a/apps/main-app/src/assets/favicons/favicon-16x16.png b/public/favicon-16x16.png similarity index 100% rename from apps/main-app/src/assets/favicons/favicon-16x16.png rename to public/favicon-16x16.png diff --git a/apps/main-app/src/assets/favicons/favicon-32x32.png b/public/favicon-32x32.png similarity index 100% rename from apps/main-app/src/assets/favicons/favicon-32x32.png rename to public/favicon-32x32.png diff --git a/apps/main-app/src/assets/favicons/favicon.ico b/public/favicon.ico similarity index 100% rename from apps/main-app/src/assets/favicons/favicon.ico rename to public/favicon.ico diff --git a/public/index.html b/public/index.html new file mode 100644 index 000000000..ae7a0cbe1 --- /dev/null +++ b/public/index.html @@ -0,0 +1,34 @@ + + + + + + Alliance of Genome Resources + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + diff --git a/public/manifest.json b/public/manifest.json new file mode 100644 index 000000000..4dd6d29aa --- /dev/null +++ b/public/manifest.json @@ -0,0 +1,24 @@ +{ + "name": "Alliance of Genome Resources", + "short_name": "Alliance of Genome Resources", + "icons": [ + { + "src": "favicon.ico", + "sizes": "64x64 32x32 24x24 16x16", + "type": "image/png" + }, + { + "src": "android-chrome-192x192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "android-chrome-512x512.png", + "sizes": "512x512", + "type": "image/png" + } + ], + "theme_color": "#ffffff", + "background_color": "#ffffff", + "display": "standalone" +} diff --git a/public/robots.txt b/public/robots.txt new file mode 100644 index 000000000..e9e57dc4d --- /dev/null +++ b/public/robots.txt @@ -0,0 +1,3 @@ +# https://www.robotstxt.org/robotstxt.html +User-agent: * +Disallow: diff --git a/apps/main-app/src/_mixins.scss b/src/_mixins.module.scss similarity index 100% rename from apps/main-app/src/_mixins.scss rename to src/_mixins.module.scss diff --git a/apps/main-app/src/_theme.scss b/src/_theme.module.scss similarity index 100% rename from apps/main-app/src/_theme.scss rename to src/_theme.module.scss diff --git a/apps/main-app/src/actions/loadingActions.js b/src/actions/loadingActions.js similarity index 100% rename from apps/main-app/src/actions/loadingActions.js rename to src/actions/loadingActions.js diff --git a/apps/main-app/src/actions/search.js b/src/actions/search.js similarity index 100% rename from apps/main-app/src/actions/search.js rename to src/actions/search.js diff --git a/apps/main-app/src/app/app.js b/src/app/app.js similarity index 100% rename from apps/main-app/src/app/app.js rename to src/app/app.js diff --git a/apps/main-app/src/app/app.spec.js b/src/app/app.spec.js similarity index 100% rename from apps/main-app/src/app/app.spec.js rename to src/app/app.spec.js diff --git a/apps/main-app/src/app/logo.svg b/src/app/logo.svg similarity index 100% rename from apps/main-app/src/app/logo.svg rename to src/app/logo.svg diff --git a/apps/main-app/src/app/star.svg b/src/app/star.svg similarity index 100% rename from apps/main-app/src/app/star.svg rename to src/app/star.svg diff --git a/apps/.gitkeep b/src/assets/.gitkeep similarity index 100% rename from apps/.gitkeep rename to src/assets/.gitkeep diff --git a/apps/main-app/src/assets/browserconfig.xml b/src/assets/browserconfig.xml similarity index 100% rename from apps/main-app/src/assets/browserconfig.xml rename to src/assets/browserconfig.xml diff --git a/apps/main-app/src/assets/favicons/android-chrome-192x192.png b/src/assets/favicons/android-chrome-192x192.png similarity index 100% rename from apps/main-app/src/assets/favicons/android-chrome-192x192.png rename to src/assets/favicons/android-chrome-192x192.png diff --git a/apps/main-app/src/assets/favicons/android-chrome-512x512.png b/src/assets/favicons/android-chrome-512x512.png similarity index 100% rename from apps/main-app/src/assets/favicons/android-chrome-512x512.png rename to src/assets/favicons/android-chrome-512x512.png diff --git a/apps/main-app/src/assets/favicons/apple-touch-icon.png b/src/assets/favicons/apple-touch-icon.png similarity index 100% rename from apps/main-app/src/assets/favicons/apple-touch-icon.png rename to src/assets/favicons/apple-touch-icon.png diff --git a/src/assets/favicons/favicon-16x16.png b/src/assets/favicons/favicon-16x16.png new file mode 100644 index 000000000..d840aabbc Binary files /dev/null and b/src/assets/favicons/favicon-16x16.png differ diff --git a/src/assets/favicons/favicon-32x32.png b/src/assets/favicons/favicon-32x32.png new file mode 100644 index 000000000..b6dfca960 Binary files /dev/null and b/src/assets/favicons/favicon-32x32.png differ diff --git a/src/assets/favicons/favicon.ico b/src/assets/favicons/favicon.ico new file mode 100644 index 000000000..55533f899 Binary files /dev/null and b/src/assets/favicons/favicon.ico differ diff --git a/apps/main-app/src/assets/favicons/mstile-150x150.png b/src/assets/favicons/mstile-150x150.png similarity index 100% rename from apps/main-app/src/assets/favicons/mstile-150x150.png rename to src/assets/favicons/mstile-150x150.png diff --git a/apps/main-app/src/assets/favicons/safari-pinned-tab.svg b/src/assets/favicons/safari-pinned-tab.svg similarity index 100% rename from apps/main-app/src/assets/favicons/safari-pinned-tab.svg rename to src/assets/favicons/safari-pinned-tab.svg diff --git a/libs/shared-assets/src/lib/assets/alliance_logo.png b/src/assets/images/alliance_logo.png similarity index 100% rename from libs/shared-assets/src/lib/assets/alliance_logo.png rename to src/assets/images/alliance_logo.png diff --git a/libs/shared-assets/src/lib/assets/alliance_logo_agr.png b/src/assets/images/alliance_logo_agr.png similarity index 100% rename from libs/shared-assets/src/lib/assets/alliance_logo_agr.png rename to src/assets/images/alliance_logo_agr.png diff --git a/libs/shared-assets/src/lib/assets/alliance_logo_flybase.png b/src/assets/images/alliance_logo_flybase.png similarity index 100% rename from libs/shared-assets/src/lib/assets/alliance_logo_flybase.png rename to src/assets/images/alliance_logo_flybase.png diff --git a/libs/shared-assets/src/lib/assets/alliance_logo_goc.png b/src/assets/images/alliance_logo_goc.png similarity index 100% rename from libs/shared-assets/src/lib/assets/alliance_logo_goc.png rename to src/assets/images/alliance_logo_goc.png diff --git a/libs/shared-assets/src/lib/assets/alliance_logo_hgnc.png b/src/assets/images/alliance_logo_hgnc.png similarity index 100% rename from libs/shared-assets/src/lib/assets/alliance_logo_hgnc.png rename to src/assets/images/alliance_logo_hgnc.png diff --git a/libs/shared-assets/src/lib/assets/alliance_logo_light.png b/src/assets/images/alliance_logo_light.png similarity index 100% rename from libs/shared-assets/src/lib/assets/alliance_logo_light.png rename to src/assets/images/alliance_logo_light.png diff --git a/libs/shared-assets/src/lib/assets/alliance_logo_light.tif b/src/assets/images/alliance_logo_light.tif similarity index 100% rename from libs/shared-assets/src/lib/assets/alliance_logo_light.tif rename to src/assets/images/alliance_logo_light.tif diff --git a/libs/shared-assets/src/lib/assets/alliance_logo_mgd.png b/src/assets/images/alliance_logo_mgd.png similarity index 100% rename from libs/shared-assets/src/lib/assets/alliance_logo_mgd.png rename to src/assets/images/alliance_logo_mgd.png diff --git a/libs/shared-assets/src/lib/assets/alliance_logo_rgd.png b/src/assets/images/alliance_logo_rgd.png similarity index 100% rename from libs/shared-assets/src/lib/assets/alliance_logo_rgd.png rename to src/assets/images/alliance_logo_rgd.png diff --git a/libs/shared-assets/src/lib/assets/alliance_logo_sgd.png b/src/assets/images/alliance_logo_sgd.png similarity index 100% rename from libs/shared-assets/src/lib/assets/alliance_logo_sgd.png rename to src/assets/images/alliance_logo_sgd.png diff --git a/libs/shared-assets/src/lib/assets/alliance_logo_white.png b/src/assets/images/alliance_logo_white.png similarity index 100% rename from libs/shared-assets/src/lib/assets/alliance_logo_white.png rename to src/assets/images/alliance_logo_white.png diff --git a/libs/shared-assets/src/lib/assets/alliance_logo_wormbase.png b/src/assets/images/alliance_logo_wormbase.png similarity index 100% rename from libs/shared-assets/src/lib/assets/alliance_logo_wormbase.png rename to src/assets/images/alliance_logo_wormbase.png diff --git a/libs/shared-assets/src/lib/assets/alliance_logo_xenbase.png b/src/assets/images/alliance_logo_xenbase.png similarity index 100% rename from libs/shared-assets/src/lib/assets/alliance_logo_xenbase.png rename to src/assets/images/alliance_logo_xenbase.png diff --git a/libs/shared-assets/src/lib/assets/alliance_logo_zfin.png b/src/assets/images/alliance_logo_zfin.png similarity index 100% rename from libs/shared-assets/src/lib/assets/alliance_logo_zfin.png rename to src/assets/images/alliance_logo_zfin.png diff --git a/libs/shared-assets/src/lib/assets/banner_bacteria.jpg b/src/assets/images/banner_bacteria.jpg similarity index 100% rename from libs/shared-assets/src/lib/assets/banner_bacteria.jpg rename to src/assets/images/banner_bacteria.jpg diff --git a/libs/shared-assets/src/lib/assets/banner_cells.jpg b/src/assets/images/banner_cells.jpg similarity index 100% rename from libs/shared-assets/src/lib/assets/banner_cells.jpg rename to src/assets/images/banner_cells.jpg diff --git a/libs/shared-assets/src/lib/assets/banner_covid19.png b/src/assets/images/banner_covid19.png similarity index 100% rename from libs/shared-assets/src/lib/assets/banner_covid19.png rename to src/assets/images/banner_covid19.png diff --git a/libs/shared-assets/src/lib/assets/banner_dnahelix.jpg b/src/assets/images/banner_dnahelix.jpg similarity index 100% rename from libs/shared-assets/src/lib/assets/banner_dnahelix.jpg rename to src/assets/images/banner_dnahelix.jpg diff --git a/libs/shared-assets/src/lib/assets/banner_virus.jpg b/src/assets/images/banner_virus.jpg similarity index 100% rename from libs/shared-assets/src/lib/assets/banner_virus.jpg rename to src/assets/images/banner_virus.jpg diff --git a/libs/shared-assets/src/lib/assets/banner_working_groups.jpg b/src/assets/images/banner_working_groups.jpg similarity index 100% rename from libs/shared-assets/src/lib/assets/banner_working_groups.jpg rename to src/assets/images/banner_working_groups.jpg diff --git a/libs/shared-assets/src/lib/assets/index.js b/src/assets/images/index.js similarity index 100% rename from libs/shared-assets/src/lib/assets/index.js rename to src/assets/images/index.js diff --git a/apps/main-app/src/assets/site.webmanifest b/src/assets/site.webmanifest similarity index 100% rename from apps/main-app/src/assets/site.webmanifest rename to src/assets/site.webmanifest diff --git a/apps/main-app/src/components/AssociationType.js b/src/components/AssociationType.js similarity index 70% rename from apps/main-app/src/components/AssociationType.js rename to src/components/AssociationType.js index 515e72d10..8928b96f7 100644 --- a/apps/main-app/src/components/AssociationType.js +++ b/src/components/AssociationType.js @@ -4,9 +4,9 @@ import PropTypes from 'prop-types'; const NOT = NOT; const AssociationType = ({type, showOnlyNot = false}) => { - type = type.toLowerCase(); + type = type?.toLowerCase(); - if (showOnlyNot && type.indexOf('_not_') < 0) { + if (showOnlyNot && type?.indexOf('_not_') < 0) { return null; } @@ -14,13 +14,12 @@ const AssociationType = ({type, showOnlyNot = false}) => { return <>does {NOT} model; } - const words = type - .replaceAll('_', ' ') + const words = type?.replaceAll('_', ' ') .split(/(?:^| )not(?: |$)/, 2); return ( <> - {words[0]} - {words.length > 1 && <> {NOT} {words[1]}} + {words?.[0]} + {words?.length > 1 && <> {NOT} {words[1]}} ); }; diff --git a/apps/main-app/src/components/ConstructLink.js b/src/components/ConstructLink.js similarity index 100% rename from apps/main-app/src/components/ConstructLink.js rename to src/components/ConstructLink.js diff --git a/apps/main-app/src/components/CovidInfoLink.js b/src/components/CovidInfoLink.js similarity index 100% rename from apps/main-app/src/components/CovidInfoLink.js rename to src/components/CovidInfoLink.js diff --git a/apps/main-app/src/components/ExternalLink.js b/src/components/ExternalLink.js similarity index 94% rename from apps/main-app/src/components/ExternalLink.js rename to src/components/ExternalLink.js index dba673678..e63f825b1 100644 --- a/apps/main-app/src/components/ExternalLink.js +++ b/src/components/ExternalLink.js @@ -1,6 +1,6 @@ import React from 'react'; import PropTypes from 'prop-types'; -import style from './style.scss'; +import style from './style.module.scss'; const ExternalLink = ({children, className, href, id, title, ...rest}) => { if (href) { diff --git a/apps/main-app/src/components/GeneSymbol.js b/src/components/GeneSymbol.js similarity index 100% rename from apps/main-app/src/components/GeneSymbol.js rename to src/components/GeneSymbol.js diff --git a/apps/main-app/src/components/GeneSymbolCuration.js b/src/components/GeneSymbolCuration.js similarity index 84% rename from apps/main-app/src/components/GeneSymbolCuration.js rename to src/components/GeneSymbolCuration.js index 8d8c88ddf..faa47e859 100644 --- a/apps/main-app/src/components/GeneSymbolCuration.js +++ b/src/components/GeneSymbolCuration.js @@ -1,5 +1,4 @@ import React from 'react'; -import PropTypes from 'prop-types'; const GeneSymbolCuration = ({gene}) => { return ; diff --git a/apps/main-app/src/components/OrthologPicker.js b/src/components/OrthologPicker.js similarity index 98% rename from apps/main-app/src/components/OrthologPicker.js rename to src/components/OrthologPicker.js index 83e7cacf3..d2220418b 100644 --- a/apps/main-app/src/components/OrthologPicker.js +++ b/src/components/OrthologPicker.js @@ -110,6 +110,7 @@ const OrthologPicker =({ } } onChange(selectedOrthologs); + // eslint-disable-next-line react-hooks/exhaustive-deps }, [orthology.isLoading, checkboxValue, stringency, selectedSpecies]); // if the stringency changes, ensure the checkbox is enabled but not on the @@ -124,6 +125,7 @@ const OrthologPicker =({ if (stringency) { onCheckboxValueChange(true); } + // eslint-disable-next-line react-hooks/exhaustive-deps }, [stringency]); // if the selected species change, ensure the checkbox is enabled @@ -131,6 +133,7 @@ const OrthologPicker =({ if (selectedSpecies.length) { onCheckboxValueChange(true); } + // eslint-disable-next-line react-hooks/exhaustive-deps }, [selectedSpecies.length]); // when the focus gene changes, ensure that the species is allowed to have @@ -143,6 +146,7 @@ const OrthologPicker =({ } else { setInputDisabled(false); } + // eslint-disable-next-line react-hooks/exhaustive-deps }, [focusTaxonId]); const toggleVertebrates = (checked) => { diff --git a/apps/main-app/src/components/RibbonGeneSubjectLabel.js b/src/components/RibbonGeneSubjectLabel.js similarity index 92% rename from apps/main-app/src/components/RibbonGeneSubjectLabel.js rename to src/components/RibbonGeneSubjectLabel.js index 395dc1d3b..e32aef835 100644 --- a/apps/main-app/src/components/RibbonGeneSubjectLabel.js +++ b/src/components/RibbonGeneSubjectLabel.js @@ -2,7 +2,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import {shortSpeciesName} from '../lib/utils'; import {Link} from 'react-router-dom'; -import style from './style.scss'; +import style from './style.module.scss'; const RibbonGeneSubjectLabel = ({isFocusGene, gene}) => ( diff --git a/apps/main-app/src/components/SpeciesName.js b/src/components/SpeciesName.js similarity index 79% rename from apps/main-app/src/components/SpeciesName.js rename to src/components/SpeciesName.js index 1ac3a2c65..7db531804 100644 --- a/apps/main-app/src/components/SpeciesName.js +++ b/src/components/SpeciesName.js @@ -1,6 +1,6 @@ import React from 'react'; -import style from './SpeciesName.scss'; +import style from './SpeciesName.module.scss'; const SpeciesName = (props) => { return ; diff --git a/apps/main-app/src/components/SpeciesName.scss b/src/components/SpeciesName.module.scss similarity index 100% rename from apps/main-app/src/components/SpeciesName.scss rename to src/components/SpeciesName.module.scss diff --git a/apps/main-app/src/components/TwitterFeed.js b/src/components/TwitterFeed.js similarity index 100% rename from apps/main-app/src/components/TwitterFeed.js rename to src/components/TwitterFeed.js diff --git a/apps/main-app/src/components/alleleTable/alleleTableSectionHelp.js b/src/components/alleleTable/alleleTableSectionHelp.js similarity index 100% rename from apps/main-app/src/components/alleleTable/alleleTableSectionHelp.js rename to src/components/alleleTable/alleleTableSectionHelp.js diff --git a/apps/main-app/src/components/attribute/AttributeLabel.js b/src/components/attribute/AttributeLabel.js similarity index 100% rename from apps/main-app/src/components/attribute/AttributeLabel.js rename to src/components/attribute/AttributeLabel.js diff --git a/apps/main-app/src/components/attribute/AttributeList.js b/src/components/attribute/AttributeList.js similarity index 100% rename from apps/main-app/src/components/attribute/AttributeList.js rename to src/components/attribute/AttributeList.js diff --git a/apps/main-app/src/components/attribute/AttributeValue.js b/src/components/attribute/AttributeValue.js similarity index 100% rename from apps/main-app/src/components/attribute/AttributeValue.js rename to src/components/attribute/AttributeValue.js diff --git a/apps/main-app/src/components/attribute/index.js b/src/components/attribute/index.js similarity index 100% rename from apps/main-app/src/components/attribute/index.js rename to src/components/attribute/index.js diff --git a/apps/main-app/src/components/collapsibleList/collapsibleList.js b/src/components/collapsibleList/collapsibleList.js similarity index 97% rename from apps/main-app/src/components/collapsibleList/collapsibleList.js rename to src/components/collapsibleList/collapsibleList.js index 046413b12..b4bb043ab 100644 --- a/apps/main-app/src/components/collapsibleList/collapsibleList.js +++ b/src/components/collapsibleList/collapsibleList.js @@ -1,7 +1,7 @@ import React, { useState } from 'react'; import PropTypes from 'prop-types'; -import style from './style.scss'; +import style from './style.module.scss'; const CollapsibleList = ({ children, collapsedSize, showBullets }) => { const [ collapsed, setCollapsed ] = useState(true); diff --git a/apps/main-app/src/components/collapsibleList/index.js b/src/components/collapsibleList/index.js similarity index 100% rename from apps/main-app/src/components/collapsibleList/index.js rename to src/components/collapsibleList/index.js diff --git a/apps/main-app/src/components/collapsibleList/style.scss b/src/components/collapsibleList/style.module.scss similarity index 100% rename from apps/main-app/src/components/collapsibleList/style.scss rename to src/components/collapsibleList/style.module.scss diff --git a/apps/main-app/src/components/collapsiblePanel.js b/src/components/collapsiblePanel.js similarity index 100% rename from apps/main-app/src/components/collapsiblePanel.js rename to src/components/collapsiblePanel.js diff --git a/apps/main-app/src/components/commaSeparatedList.js b/src/components/commaSeparatedList.js similarity index 91% rename from apps/main-app/src/components/commaSeparatedList.js rename to src/components/commaSeparatedList.js index 26bcd1fe3..568260fd0 100644 --- a/apps/main-app/src/components/commaSeparatedList.js +++ b/src/components/commaSeparatedList.js @@ -1,7 +1,7 @@ import React from 'react'; import PropTypes from 'prop-types'; -import style from './style.scss'; +import style from './style.module.scss'; const CommaSeparatedList = ({children, listItemClassName}) => { return ( diff --git a/apps/main-app/src/components/controlsContainer.js b/src/components/controlsContainer.js similarity index 100% rename from apps/main-app/src/components/controlsContainer.js rename to src/components/controlsContainer.js diff --git a/apps/main-app/src/components/crossReferenceList.js b/src/components/crossReferenceList.js similarity index 100% rename from apps/main-app/src/components/crossReferenceList.js rename to src/components/crossReferenceList.js diff --git a/apps/main-app/src/components/dataPage/PageCategoryLabel.js b/src/components/dataPage/PageCategoryLabel.js similarity index 90% rename from apps/main-app/src/components/dataPage/PageCategoryLabel.js rename to src/components/dataPage/PageCategoryLabel.js index ea1f1a8cf..e118c4df5 100644 --- a/apps/main-app/src/components/dataPage/PageCategoryLabel.js +++ b/src/components/dataPage/PageCategoryLabel.js @@ -2,7 +2,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import CategoryLabel from '../../containers/search/categoryLabel'; -import style from './style.scss'; +import style from './style.module.scss'; const PageCategoryLabel = ({category}) => (
    diff --git a/apps/main-app/src/components/dataPage/PageNavEntity.js b/src/components/dataPage/PageNavEntity.js similarity index 93% rename from apps/main-app/src/components/dataPage/PageNavEntity.js rename to src/components/dataPage/PageNavEntity.js index 1f451dffd..dde7c8af1 100644 --- a/apps/main-app/src/components/dataPage/PageNavEntity.js +++ b/src/components/dataPage/PageNavEntity.js @@ -1,6 +1,6 @@ import React, { useState, useCallback } from 'react'; import PropTypes from 'prop-types'; -import style from './style.scss'; +import style from './style.module.scss'; import { UncontrolledTooltip } from 'reactstrap'; const PageNavEntity = ({children, entityName, icon, truncateName}) => { @@ -12,6 +12,7 @@ const PageNavEntity = ({children, entityName, icon, truncateName}) => { if (truncateName && node !== null) { setAttachTooltip(node.scrollWidth > node.clientWidth); } + // eslint-disable-next-line react-hooks/exhaustive-deps }, [entityName, truncateName]); return ( diff --git a/apps/main-app/src/components/dataPage/dataPage.js b/src/components/dataPage/dataPage.js similarity index 90% rename from apps/main-app/src/components/dataPage/dataPage.js rename to src/components/dataPage/dataPage.js index 79019fcae..799197e22 100644 --- a/apps/main-app/src/components/dataPage/dataPage.js +++ b/src/components/dataPage/dataPage.js @@ -2,7 +2,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import ErrorBoundary from '../errorBoundary'; -import style from './style.scss'; +import style from './style.module.scss'; const DataPage = ({children}) => { return ( diff --git a/apps/main-app/src/components/dataPage/index.js b/src/components/dataPage/index.js similarity index 100% rename from apps/main-app/src/components/dataPage/index.js rename to src/components/dataPage/index.js diff --git a/apps/main-app/src/components/dataPage/pageData.js b/src/components/dataPage/pageData.js similarity index 86% rename from apps/main-app/src/components/dataPage/pageData.js rename to src/components/dataPage/pageData.js index 7e8aca7b4..e555ffeb0 100644 --- a/apps/main-app/src/components/dataPage/pageData.js +++ b/src/components/dataPage/pageData.js @@ -1,7 +1,7 @@ import React from 'react'; import PropTypes from 'prop-types'; -import style from './style.scss'; +import style from './style.module.scss'; const PageData = ({children}) => { return ( diff --git a/apps/main-app/src/components/dataPage/pageHeader.js b/src/components/dataPage/pageHeader.js similarity index 100% rename from apps/main-app/src/components/dataPage/pageHeader.js rename to src/components/dataPage/pageHeader.js diff --git a/apps/main-app/src/components/dataPage/pageNav.js b/src/components/dataPage/pageNav.js similarity index 97% rename from apps/main-app/src/components/dataPage/pageNav.js rename to src/components/dataPage/pageNav.js index 150ecab2d..a46a4075d 100644 --- a/apps/main-app/src/components/dataPage/pageNav.js +++ b/src/components/dataPage/pageNav.js @@ -6,7 +6,7 @@ import Scrollspy from 'react-scrollspy'; import { makeId } from '../../lib/utils'; -import style from './style.scss'; +import style from './style.module.scss'; const PageNav = ({children, sections}) => { const [isOpen, setIsOpen] = useState(false); diff --git a/apps/main-app/src/components/dataPage/style.scss b/src/components/dataPage/style.module.scss similarity index 97% rename from apps/main-app/src/components/dataPage/style.scss rename to src/components/dataPage/style.module.scss index 64c13b97f..35fc37fd4 100644 --- a/apps/main-app/src/components/dataPage/style.scss +++ b/src/components/dataPage/style.module.scss @@ -1,4 +1,4 @@ -@import "../../theme"; +@import "../../theme.module"; @import '~bootstrap/scss/functions'; @import '~bootstrap/scss/variables'; @import '~bootstrap/scss/mixins'; diff --git a/apps/main-app/src/components/dataSourceLink.js b/src/components/dataSourceLink.js similarity index 100% rename from apps/main-app/src/components/dataSourceLink.js rename to src/components/dataSourceLink.js diff --git a/apps/main-app/src/components/dataSourceLinkCuration.js b/src/components/dataSourceLinkCuration.js similarity index 100% rename from apps/main-app/src/components/dataSourceLinkCuration.js rename to src/components/dataSourceLinkCuration.js diff --git a/apps/main-app/src/components/dataTable/AlleleCell.js b/src/components/dataTable/AlleleCell.js similarity index 100% rename from apps/main-app/src/components/dataTable/AlleleCell.js rename to src/components/dataTable/AlleleCell.js diff --git a/apps/main-app/src/components/dataTable/AnnotatedEntitiesPopup.js b/src/components/dataTable/AnnotatedEntitiesPopup.js similarity index 96% rename from apps/main-app/src/components/dataTable/AnnotatedEntitiesPopup.js rename to src/components/dataTable/AnnotatedEntitiesPopup.js index 13f1f84b1..43190ad1c 100644 --- a/apps/main-app/src/components/dataTable/AnnotatedEntitiesPopup.js +++ b/src/components/dataTable/AnnotatedEntitiesPopup.js @@ -1,3 +1,4 @@ +/* eslint-disable jsx-a11y/anchor-is-valid */ import React from 'react'; import PropTypes from 'prop-types'; import { @@ -8,7 +9,7 @@ import { import {ReferenceCell} from './index'; import ExperimentalConditionCell from './ExperimentalConditionCell'; -import style from './style.scss'; +import style from './style.module.scss'; import ExternalLink from '../ExternalLink'; import {Link} from 'react-router-dom'; diff --git a/apps/main-app/src/components/dataTable/AnnotatedEntitiesPopupCuration.js b/src/components/dataTable/AnnotatedEntitiesPopupCuration.js similarity index 95% rename from apps/main-app/src/components/dataTable/AnnotatedEntitiesPopupCuration.js rename to src/components/dataTable/AnnotatedEntitiesPopupCuration.js index f5878d793..7c56243a9 100644 --- a/apps/main-app/src/components/dataTable/AnnotatedEntitiesPopupCuration.js +++ b/src/components/dataTable/AnnotatedEntitiesPopupCuration.js @@ -1,4 +1,5 @@ -import React, { useState } from 'react'; +/* eslint-disable jsx-a11y/anchor-is-valid */ +import React from 'react'; import PropTypes from 'prop-types'; import { DropdownMenu, @@ -8,13 +9,11 @@ import { import { SingleReferenceCellCuration } from './index'; import ExperimentalConditionCellCuration from './ExperimentalConditionCellCuration'; -import style from './style.scss'; +import style from './style.module.scss'; import ExternalLink from '../ExternalLink'; import { Link } from 'react-router-dom'; import { getResourceUrl } from "./getResourceUrl"; import TypeCellCuration from './TypeCellCuration'; -import StrainBackground from './StrainBackground'; -import AssertedGenes from './AssertedGenes'; import RelatedNotes from './RelatedNotes'; import EvidenceCodesCellCuration from './evidenceCodesCellCuration'; import ProviderCellCuration from './ProviderCellCuration'; @@ -42,7 +41,7 @@ function renderLink(entity) { } function AnnotatedEntitiesPopupCuration(props) { - const {children, entities, mainRowCurie} = props; + const {children, entities } = props; if (!entities || !entities.length) { return null; diff --git a/apps/main-app/src/components/dataTable/AnnotationType.js b/src/components/dataTable/AnnotationType.js similarity index 100% rename from apps/main-app/src/components/dataTable/AnnotationType.js rename to src/components/dataTable/AnnotationType.js diff --git a/apps/main-app/src/components/dataTable/AssertedGenes.js b/src/components/dataTable/AssertedGenes.js similarity index 100% rename from apps/main-app/src/components/dataTable/AssertedGenes.js rename to src/components/dataTable/AssertedGenes.js diff --git a/apps/main-app/src/components/dataTable/AssociationCellCuration.js b/src/components/dataTable/AssociationCellCuration.js similarity index 80% rename from apps/main-app/src/components/dataTable/AssociationCellCuration.js rename to src/components/dataTable/AssociationCellCuration.js index 3906c3ecc..03bccc703 100644 --- a/apps/main-app/src/components/dataTable/AssociationCellCuration.js +++ b/src/components/dataTable/AssociationCellCuration.js @@ -1,5 +1,5 @@ function AssociationCellCuration({ association }){ - if(!association) return; + if(!association) return null; return association.replaceAll('_', ' '); } diff --git a/apps/main-app/src/components/dataTable/BooleanLinkCell.js b/src/components/dataTable/BooleanLinkCell.js similarity index 100% rename from apps/main-app/src/components/dataTable/BooleanLinkCell.js rename to src/components/dataTable/BooleanLinkCell.js diff --git a/apps/main-app/src/components/dataTable/CellTooltip.js b/src/components/dataTable/CellTooltip.js similarity index 100% rename from apps/main-app/src/components/dataTable/CellTooltip.js rename to src/components/dataTable/CellTooltip.js diff --git a/apps/main-app/src/components/dataTable/DataTable.js b/src/components/dataTable/DataTable.js similarity index 99% rename from apps/main-app/src/components/dataTable/DataTable.js rename to src/components/dataTable/DataTable.js index 645a66c36..b1c674a23 100644 --- a/apps/main-app/src/components/dataTable/DataTable.js +++ b/src/components/dataTable/DataTable.js @@ -96,7 +96,7 @@ const DataTable = ({ } // the initial fetch is happening, show spinner, don't render the table yet - if (isLoading) { + if (isLoading || isFetching) { return ; } diff --git a/apps/main-app/src/components/dataTable/DiseaseQualifiersColumn.js b/src/components/dataTable/DiseaseQualifiersColumn.js similarity index 89% rename from apps/main-app/src/components/dataTable/DiseaseQualifiersColumn.js rename to src/components/dataTable/DiseaseQualifiersColumn.js index 0560a2227..7703a5886 100644 --- a/apps/main-app/src/components/dataTable/DiseaseQualifiersColumn.js +++ b/src/components/dataTable/DiseaseQualifiersColumn.js @@ -1,7 +1,6 @@ import React from 'react'; import PropTypes from 'prop-types'; import CommaSeparatedList from '../commaSeparatedList'; -import EvidenceCodeCuration from './EvidenceCodeCuration'; const DiseaseQualifiersColumn = ({qualifiers}) => { diff --git a/apps/main-app/src/components/dataTable/DropdownCheckboxFilter.js b/src/components/dataTable/DropdownCheckboxFilter.js similarity index 100% rename from apps/main-app/src/components/dataTable/DropdownCheckboxFilter.js rename to src/components/dataTable/DropdownCheckboxFilter.js diff --git a/apps/main-app/src/components/dataTable/DropdownNoDataFilter.js b/src/components/dataTable/DropdownNoDataFilter.js similarity index 100% rename from apps/main-app/src/components/dataTable/DropdownNoDataFilter.js rename to src/components/dataTable/DropdownNoDataFilter.js diff --git a/apps/main-app/src/components/dataTable/EvidenceCode.js b/src/components/dataTable/EvidenceCode.js similarity index 100% rename from apps/main-app/src/components/dataTable/EvidenceCode.js rename to src/components/dataTable/EvidenceCode.js diff --git a/apps/main-app/src/components/dataTable/EvidenceCodeCuration.js b/src/components/dataTable/EvidenceCodeCuration.js similarity index 100% rename from apps/main-app/src/components/dataTable/EvidenceCodeCuration.js rename to src/components/dataTable/EvidenceCodeCuration.js diff --git a/apps/main-app/src/components/dataTable/ExperimentalConditionCell.js b/src/components/dataTable/ExperimentalConditionCell.js similarity index 100% rename from apps/main-app/src/components/dataTable/ExperimentalConditionCell.js rename to src/components/dataTable/ExperimentalConditionCell.js diff --git a/apps/main-app/src/components/dataTable/ExperimentalConditionCellCuration.js b/src/components/dataTable/ExperimentalConditionCellCuration.js similarity index 95% rename from apps/main-app/src/components/dataTable/ExperimentalConditionCellCuration.js rename to src/components/dataTable/ExperimentalConditionCellCuration.js index 71c8cf475..409d22091 100644 --- a/apps/main-app/src/components/dataTable/ExperimentalConditionCellCuration.js +++ b/src/components/dataTable/ExperimentalConditionCellCuration.js @@ -1,5 +1,5 @@ import React from 'react'; -import PropTypes from 'prop-types'; + const ExperimentalConditionCellCuration = ({ conditions }) => { return conditions? (
    diff --git a/apps/main-app/src/components/dataTable/GeneticModifiersCellCuration.js b/src/components/dataTable/GeneticModifiersCellCuration.js similarity index 100% rename from apps/main-app/src/components/dataTable/GeneticModifiersCellCuration.js rename to src/components/dataTable/GeneticModifiersCellCuration.js diff --git a/apps/main-app/src/components/dataTable/GeneticSex.js b/src/components/dataTable/GeneticSex.js similarity index 100% rename from apps/main-app/src/components/dataTable/GeneticSex.js rename to src/components/dataTable/GeneticSex.js diff --git a/apps/main-app/src/components/dataTable/NoteCell.js b/src/components/dataTable/NoteCell.js similarity index 100% rename from apps/main-app/src/components/dataTable/NoteCell.js rename to src/components/dataTable/NoteCell.js diff --git a/apps/main-app/src/components/dataTable/ProviderCellCuration.js b/src/components/dataTable/ProviderCellCuration.js similarity index 100% rename from apps/main-app/src/components/dataTable/ProviderCellCuration.js rename to src/components/dataTable/ProviderCellCuration.js diff --git a/apps/main-app/src/components/dataTable/ProvidersCell.js b/src/components/dataTable/ProvidersCell.js similarity index 100% rename from apps/main-app/src/components/dataTable/ProvidersCell.js rename to src/components/dataTable/ProvidersCell.js diff --git a/apps/main-app/src/components/dataTable/ProvidersCellCuration.js b/src/components/dataTable/ProvidersCellCuration.js similarity index 100% rename from apps/main-app/src/components/dataTable/ProvidersCellCuration.js rename to src/components/dataTable/ProvidersCellCuration.js diff --git a/apps/main-app/src/components/dataTable/RelatedNotes.js b/src/components/dataTable/RelatedNotes.js similarity index 100% rename from apps/main-app/src/components/dataTable/RelatedNotes.js rename to src/components/dataTable/RelatedNotes.js diff --git a/apps/main-app/src/components/dataTable/RotatedHeaderCell.js b/src/components/dataTable/RotatedHeaderCell.js similarity index 84% rename from apps/main-app/src/components/dataTable/RotatedHeaderCell.js rename to src/components/dataTable/RotatedHeaderCell.js index 4ab9682c4..cd225eacb 100644 --- a/apps/main-app/src/components/dataTable/RotatedHeaderCell.js +++ b/src/components/dataTable/RotatedHeaderCell.js @@ -1,7 +1,7 @@ import React from 'react'; import PropTypes from 'prop-types'; -import style from './RotatedHeaderCell.scss'; +import style from './RotatedHeaderCell.module.scss'; const RotatedHeaderCell = ({children}) => { return ( diff --git a/apps/main-app/src/components/dataTable/RotatedHeaderCell.scss b/src/components/dataTable/RotatedHeaderCell.module.scss similarity index 100% rename from apps/main-app/src/components/dataTable/RotatedHeaderCell.scss rename to src/components/dataTable/RotatedHeaderCell.module.scss diff --git a/apps/main-app/src/components/dataTable/SpeciesCell.js b/src/components/dataTable/SpeciesCell.js similarity index 100% rename from apps/main-app/src/components/dataTable/SpeciesCell.js rename to src/components/dataTable/SpeciesCell.js diff --git a/apps/main-app/src/components/dataTable/StrainBackground.js b/src/components/dataTable/StrainBackground.js similarity index 100% rename from apps/main-app/src/components/dataTable/StrainBackground.js rename to src/components/dataTable/StrainBackground.js diff --git a/apps/main-app/src/components/dataTable/TypeCellCuration.js b/src/components/dataTable/TypeCellCuration.js similarity index 100% rename from apps/main-app/src/components/dataTable/TypeCellCuration.js rename to src/components/dataTable/TypeCellCuration.js diff --git a/apps/main-app/src/components/dataTable/VEPTextCell.js b/src/components/dataTable/VEPTextCell.js similarity index 100% rename from apps/main-app/src/components/dataTable/VEPTextCell.js rename to src/components/dataTable/VEPTextCell.js diff --git a/apps/main-app/src/components/dataTable/assayCell.js b/src/components/dataTable/assayCell.js similarity index 100% rename from apps/main-app/src/components/dataTable/assayCell.js rename to src/components/dataTable/assayCell.js diff --git a/apps/main-app/src/components/dataTable/basedOnGeneCell.js b/src/components/dataTable/basedOnGeneCell.js similarity index 100% rename from apps/main-app/src/components/dataTable/basedOnGeneCell.js rename to src/components/dataTable/basedOnGeneCell.js diff --git a/apps/main-app/src/components/dataTable/basedOnGeneCellCuration.js b/src/components/dataTable/basedOnGeneCellCuration.js similarity index 100% rename from apps/main-app/src/components/dataTable/basedOnGeneCellCuration.js rename to src/components/dataTable/basedOnGeneCellCuration.js diff --git a/apps/main-app/src/components/dataTable/columnHeader.js b/src/components/dataTable/columnHeader.js similarity index 97% rename from apps/main-app/src/components/dataTable/columnHeader.js rename to src/components/dataTable/columnHeader.js index 95605ee6e..69d9c8fa7 100644 --- a/apps/main-app/src/components/dataTable/columnHeader.js +++ b/src/components/dataTable/columnHeader.js @@ -3,7 +3,7 @@ import PropTypes from 'prop-types'; import { UncontrolledButtonDropdown, DropdownMenu, DropdownToggle } from 'reactstrap'; import HelpPopup from '../helpPopup'; -import style from './style.scss'; +import style from './style.module.scss'; class ColumnHeader extends React.Component { render() { diff --git a/apps/main-app/src/components/dataTable/downloadButton.js b/src/components/dataTable/downloadButton.js similarity index 100% rename from apps/main-app/src/components/dataTable/downloadButton.js rename to src/components/dataTable/downloadButton.js diff --git a/apps/main-app/src/components/dataTable/dropdownTextFilter.js b/src/components/dataTable/dropdownTextFilter.js similarity index 100% rename from apps/main-app/src/components/dataTable/dropdownTextFilter.js rename to src/components/dataTable/dropdownTextFilter.js diff --git a/apps/main-app/src/components/dataTable/evidenceCodesCell.js b/src/components/dataTable/evidenceCodesCell.js similarity index 100% rename from apps/main-app/src/components/dataTable/evidenceCodesCell.js rename to src/components/dataTable/evidenceCodesCell.js diff --git a/apps/main-app/src/components/dataTable/evidenceCodesCellCuration.js b/src/components/dataTable/evidenceCodesCellCuration.js similarity index 100% rename from apps/main-app/src/components/dataTable/evidenceCodesCellCuration.js rename to src/components/dataTable/evidenceCodesCellCuration.js diff --git a/apps/main-app/src/components/dataTable/geneCell.js b/src/components/dataTable/geneCell.js similarity index 89% rename from apps/main-app/src/components/dataTable/geneCell.js rename to src/components/dataTable/geneCell.js index 1c305b85f..302f223c5 100644 --- a/apps/main-app/src/components/dataTable/geneCell.js +++ b/src/components/dataTable/geneCell.js @@ -2,7 +2,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import { Link } from 'react-router-dom'; -import style from './style.scss'; +import style from './style.module.scss'; const GeneCell = ({id, symbol} = {}) => { return ( diff --git a/apps/main-app/src/components/dataTable/geneCellCuration.js b/src/components/dataTable/geneCellCuration.js similarity index 90% rename from apps/main-app/src/components/dataTable/geneCellCuration.js rename to src/components/dataTable/geneCellCuration.js index 5067ba847..d834dedd1 100644 --- a/apps/main-app/src/components/dataTable/geneCellCuration.js +++ b/src/components/dataTable/geneCellCuration.js @@ -2,7 +2,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import { Link } from 'react-router-dom'; -import style from './style.scss'; +import style from './style.module.scss'; const GeneCellCuration = ({ curie, geneSymbol } = {}) => { diff --git a/apps/main-app/src/components/dataTable/getResourceUrl.js b/src/components/dataTable/getResourceUrl.js similarity index 91% rename from apps/main-app/src/components/dataTable/getResourceUrl.js rename to src/components/dataTable/getResourceUrl.js index e9d6aa792..44e57e421 100644 --- a/apps/main-app/src/components/dataTable/getResourceUrl.js +++ b/src/components/dataTable/getResourceUrl.js @@ -1,4 +1,4 @@ -import { resourceDescriptors } from "../../../../../dist/resourceDescriptors"; +import { resourceDescriptors } from "../../dist/resourceDescriptors"; export const getResourceUrl = (curie, type, subtype ) => { const [prefix, id] = curie.split(':'); diff --git a/apps/main-app/src/components/dataTable/index.js b/src/components/dataTable/index.js similarity index 100% rename from apps/main-app/src/components/dataTable/index.js rename to src/components/dataTable/index.js diff --git a/apps/main-app/src/components/dataTable/loadingOverlay.js b/src/components/dataTable/loadingOverlay.js similarity index 89% rename from apps/main-app/src/components/dataTable/loadingOverlay.js rename to src/components/dataTable/loadingOverlay.js index 4f15cf9e3..9754515eb 100644 --- a/apps/main-app/src/components/dataTable/loadingOverlay.js +++ b/src/components/dataTable/loadingOverlay.js @@ -1,7 +1,7 @@ import React from 'react'; import PropTypes from 'prop-types'; -import style from './style.scss'; +import style from './style.module.scss'; const LoadingOverlay = ({loading}) => { return ( diff --git a/apps/main-app/src/components/dataTable/pagePerSizeSelector.js b/src/components/dataTable/pagePerSizeSelector.js similarity index 100% rename from apps/main-app/src/components/dataTable/pagePerSizeSelector.js rename to src/components/dataTable/pagePerSizeSelector.js diff --git a/apps/main-app/src/components/dataTable/paginationPanel.js b/src/components/dataTable/paginationPanel.js similarity index 100% rename from apps/main-app/src/components/dataTable/paginationPanel.js rename to src/components/dataTable/paginationPanel.js diff --git a/apps/main-app/src/components/dataTable/referenceCell.js b/src/components/dataTable/referenceCell.js similarity index 100% rename from apps/main-app/src/components/dataTable/referenceCell.js rename to src/components/dataTable/referenceCell.js diff --git a/apps/main-app/src/components/dataTable/referencesCellCuration.js b/src/components/dataTable/referencesCellCuration.js similarity index 100% rename from apps/main-app/src/components/dataTable/referencesCellCuration.js rename to src/components/dataTable/referencesCellCuration.js diff --git a/apps/main-app/src/components/dataTable/singleReferenceCellCuration.js b/src/components/dataTable/singleReferenceCellCuration.js similarity index 100% rename from apps/main-app/src/components/dataTable/singleReferenceCellCuration.js rename to src/components/dataTable/singleReferenceCellCuration.js diff --git a/apps/main-app/src/components/dataTable/sourceCell.js b/src/components/dataTable/sourceCell.js similarity index 100% rename from apps/main-app/src/components/dataTable/sourceCell.js rename to src/components/dataTable/sourceCell.js diff --git a/apps/main-app/src/components/dataTable/style.scss b/src/components/dataTable/style.module.scss similarity index 96% rename from apps/main-app/src/components/dataTable/style.scss rename to src/components/dataTable/style.module.scss index 5f510090b..e340875a8 100644 --- a/apps/main-app/src/components/dataTable/style.scss +++ b/src/components/dataTable/style.module.scss @@ -1,4 +1,4 @@ -@import "../../theme"; +@import "../../theme.module"; @import '~bootstrap/scss/functions'; @import '~bootstrap/scss/variables'; diff --git a/apps/main-app/src/components/dataTable/tableSummary.js b/src/components/dataTable/tableSummary.js similarity index 100% rename from apps/main-app/src/components/dataTable/tableSummary.js rename to src/components/dataTable/tableSummary.js diff --git a/apps/main-app/src/components/dataTable/utils.js b/src/components/dataTable/utils.js similarity index 98% rename from apps/main-app/src/components/dataTable/utils.js rename to src/components/dataTable/utils.js index 2d88be9ee..884066775 100644 --- a/apps/main-app/src/components/dataTable/utils.js +++ b/src/components/dataTable/utils.js @@ -3,7 +3,7 @@ import { compareAlphabeticalCaseInsensitive } from '../../lib/utils'; import { getResourceUrl } from "./getResourceUrl"; export const renderPaginationShowsTotal = (start, end, total) => { - return Showing { start } - { end } of { total.toLocaleString() } rows; + return Showing { start } - { end } of { total?.toLocaleString() } rows; }; export const getDistinctFieldValue = (response, field) => { diff --git a/apps/main-app/src/components/disease/DiseaseLink.js b/src/components/disease/DiseaseLink.js similarity index 100% rename from apps/main-app/src/components/disease/DiseaseLink.js rename to src/components/disease/DiseaseLink.js diff --git a/apps/main-app/src/components/disease/DiseaseLinkCuration.js b/src/components/disease/DiseaseLinkCuration.js similarity index 100% rename from apps/main-app/src/components/disease/DiseaseLinkCuration.js rename to src/components/disease/DiseaseLinkCuration.js diff --git a/apps/main-app/src/components/disease/DiseaseName.js b/src/components/disease/DiseaseName.js similarity index 100% rename from apps/main-app/src/components/disease/DiseaseName.js rename to src/components/disease/DiseaseName.js diff --git a/apps/main-app/src/components/disease/diseaseAnnotationTable.js b/src/components/disease/diseaseAnnotationTable.js similarity index 100% rename from apps/main-app/src/components/disease/diseaseAnnotationTable.js rename to src/components/disease/diseaseAnnotationTable.js diff --git a/apps/main-app/src/components/disease/diseaseComparisonRibbon.js b/src/components/disease/diseaseComparisonRibbon.js similarity index 100% rename from apps/main-app/src/components/disease/diseaseComparisonRibbon.js rename to src/components/disease/diseaseComparisonRibbon.js diff --git a/apps/main-app/src/components/disease/diseaseControlsHelp.js b/src/components/disease/diseaseControlsHelp.js similarity index 100% rename from apps/main-app/src/components/disease/diseaseControlsHelp.js rename to src/components/disease/diseaseControlsHelp.js diff --git a/apps/main-app/src/components/disease/diseaseSectionHelp.js b/src/components/disease/diseaseSectionHelp.js similarity index 100% rename from apps/main-app/src/components/disease/diseaseSectionHelp.js rename to src/components/disease/diseaseSectionHelp.js diff --git a/apps/main-app/src/components/disease/index.js b/src/components/disease/index.js similarity index 100% rename from apps/main-app/src/components/disease/index.js rename to src/components/disease/index.js diff --git a/apps/main-app/src/components/errorBoundary.js b/src/components/errorBoundary.js similarity index 100% rename from apps/main-app/src/components/errorBoundary.js rename to src/components/errorBoundary.js diff --git a/apps/main-app/src/components/expression/expressionAnnotationTable.js b/src/components/expression/expressionAnnotationTable.js similarity index 100% rename from apps/main-app/src/components/expression/expressionAnnotationTable.js rename to src/components/expression/expressionAnnotationTable.js diff --git a/apps/main-app/src/components/expression/expressionComparisonRibbon.js b/src/components/expression/expressionComparisonRibbon.js similarity index 100% rename from apps/main-app/src/components/expression/expressionComparisonRibbon.js rename to src/components/expression/expressionComparisonRibbon.js diff --git a/apps/main-app/src/components/expression/expressionControlsHelp.js b/src/components/expression/expressionControlsHelp.js similarity index 100% rename from apps/main-app/src/components/expression/expressionControlsHelp.js rename to src/components/expression/expressionControlsHelp.js diff --git a/apps/main-app/src/components/expression/expressionUserGuide.js b/src/components/expression/expressionUserGuide.js similarity index 100% rename from apps/main-app/src/components/expression/expressionUserGuide.js rename to src/components/expression/expressionUserGuide.js diff --git a/apps/main-app/src/components/expression/index.js b/src/components/expression/index.js similarity index 100% rename from apps/main-app/src/components/expression/index.js rename to src/components/expression/index.js diff --git a/apps/main-app/src/components/geneOntologyRibbon/goControlsHelp.js b/src/components/geneOntologyRibbon/goControlsHelp.js similarity index 100% rename from apps/main-app/src/components/geneOntologyRibbon/goControlsHelp.js rename to src/components/geneOntologyRibbon/goControlsHelp.js diff --git a/apps/main-app/src/components/geneOntologyRibbon/goUserGuide.js b/src/components/geneOntologyRibbon/goUserGuide.js similarity index 100% rename from apps/main-app/src/components/geneOntologyRibbon/goUserGuide.js rename to src/components/geneOntologyRibbon/goUserGuide.js diff --git a/apps/main-app/src/components/geneOntologyRibbon/index.js b/src/components/geneOntologyRibbon/index.js similarity index 100% rename from apps/main-app/src/components/geneOntologyRibbon/index.js rename to src/components/geneOntologyRibbon/index.js diff --git a/apps/main-app/src/components/headMetaTags.js b/src/components/headMetaTags.js similarity index 100% rename from apps/main-app/src/components/headMetaTags.js rename to src/components/headMetaTags.js diff --git a/apps/main-app/src/components/helpPopup.js b/src/components/helpPopup.js similarity index 100% rename from apps/main-app/src/components/helpPopup.js rename to src/components/helpPopup.js diff --git a/apps/main-app/src/components/homology/booleanCell.js b/src/components/homology/booleanCell.js similarity index 92% rename from apps/main-app/src/components/homology/booleanCell.js rename to src/components/homology/booleanCell.js index 7fdb83cb8..8f352f665 100644 --- a/apps/main-app/src/components/homology/booleanCell.js +++ b/src/components/homology/booleanCell.js @@ -1,5 +1,5 @@ import PropTypes from 'prop-types'; -import style from './style.scss'; +import style from './style.module.scss'; const BooleanCell = ({value, isTrueFunc, render}) => { const rendered = render ? render(value) : value; diff --git a/apps/main-app/src/components/homology/constants.js b/src/components/homology/constants.js similarity index 100% rename from apps/main-app/src/components/homology/constants.js rename to src/components/homology/constants.js diff --git a/apps/main-app/src/components/homology/homologyFilterHelp.js b/src/components/homology/homologyFilterHelp.js similarity index 100% rename from apps/main-app/src/components/homology/homologyFilterHelp.js rename to src/components/homology/homologyFilterHelp.js diff --git a/apps/main-app/src/components/homology/homologyUserGuide.js b/src/components/homology/homologyUserGuide.js similarity index 100% rename from apps/main-app/src/components/homology/homologyUserGuide.js rename to src/components/homology/homologyUserGuide.js diff --git a/apps/main-app/src/components/homology/methodCell.js b/src/components/homology/methodCell.js similarity index 100% rename from apps/main-app/src/components/homology/methodCell.js rename to src/components/homology/methodCell.js diff --git a/apps/main-app/src/components/homology/methodHeader.js b/src/components/homology/methodHeader.js similarity index 100% rename from apps/main-app/src/components/homology/methodHeader.js rename to src/components/homology/methodHeader.js diff --git a/apps/main-app/src/components/homology/methodLogo.js b/src/components/homology/methodLogo.js similarity index 100% rename from apps/main-app/src/components/homology/methodLogo.js rename to src/components/homology/methodLogo.js diff --git a/apps/main-app/src/components/homology/stringencySelection.js b/src/components/homology/stringencySelection.js similarity index 100% rename from apps/main-app/src/components/homology/stringencySelection.js rename to src/components/homology/stringencySelection.js diff --git a/apps/main-app/src/components/homology/style.scss b/src/components/homology/style.module.scss similarity index 86% rename from apps/main-app/src/components/homology/style.scss rename to src/components/homology/style.module.scss index 3633d87bd..cf101f636 100644 --- a/apps/main-app/src/components/homology/style.scss +++ b/src/components/homology/style.module.scss @@ -1,4 +1,4 @@ -@import "../../theme"; +@import "../../theme.module"; @import '~bootstrap/scss/functions'; @import '~bootstrap/scss/variables'; diff --git a/apps/main-app/src/components/homology/utils.js b/src/components/homology/utils.js similarity index 100% rename from apps/main-app/src/components/homology/utils.js rename to src/components/homology/utils.js diff --git a/apps/main-app/src/components/horizontalScroll.js b/src/components/horizontalScroll.js similarity index 94% rename from apps/main-app/src/components/horizontalScroll.js rename to src/components/horizontalScroll.js index 214832913..2f97b5034 100644 --- a/apps/main-app/src/components/horizontalScroll.js +++ b/src/components/horizontalScroll.js @@ -2,7 +2,7 @@ import React, { useEffect, useState, useRef } from 'react'; // import React from 'react'; import PropTypes from 'prop-types'; -import style from './style.scss'; +import style from './style.module.scss'; const HorizontalScroll = ({children, width}) => { const [startOffset, setStartOffset] = useState(0); @@ -35,6 +35,7 @@ const HorizontalScroll = ({children, width}) => { useEffect(() => { window.addEventListener('resize', throttledUpdate); return () => window.removeEventListener('resize', throttledUpdate); + // eslint-disable-next-line react-hooks/exhaustive-deps }, []); return ( diff --git a/apps/main-app/src/components/interaction/GeneGeneticInteractionDetailTable.js b/src/components/interaction/GeneGeneticInteractionDetailTable.js similarity index 99% rename from apps/main-app/src/components/interaction/GeneGeneticInteractionDetailTable.js rename to src/components/interaction/GeneGeneticInteractionDetailTable.js index 0c71c8db9..2ae7daa36 100644 --- a/apps/main-app/src/components/interaction/GeneGeneticInteractionDetailTable.js +++ b/src/components/interaction/GeneGeneticInteractionDetailTable.js @@ -167,6 +167,7 @@ const GeneGeneticInteractionDetailTable = ({ filterName: 'reference', } ] + // eslint-disable-next-line react-hooks/exhaustive-deps ), [focusGeneDisplayName, tableProps]); const sortOptions = useMemo(() => ( diff --git a/apps/main-app/src/components/interaction/MITerm.js b/src/components/interaction/MITerm.js similarity index 100% rename from apps/main-app/src/components/interaction/MITerm.js rename to src/components/interaction/MITerm.js diff --git a/apps/main-app/src/components/interaction/geneInteractionCrossReference.js b/src/components/interaction/geneInteractionCrossReference.js similarity index 100% rename from apps/main-app/src/components/interaction/geneInteractionCrossReference.js rename to src/components/interaction/geneInteractionCrossReference.js diff --git a/apps/main-app/src/components/interaction/genePhysicalInteractionDetailTable.js b/src/components/interaction/genePhysicalInteractionDetailTable.js similarity index 99% rename from apps/main-app/src/components/interaction/genePhysicalInteractionDetailTable.js rename to src/components/interaction/genePhysicalInteractionDetailTable.js index c9ab51213..63a7d400d 100644 --- a/apps/main-app/src/components/interaction/genePhysicalInteractionDetailTable.js +++ b/src/components/interaction/genePhysicalInteractionDetailTable.js @@ -7,7 +7,7 @@ import { import CommaSeparatedList from '../commaSeparatedList'; import ExternalLink from '../ExternalLink'; import MITerm from './MITerm'; -import style from './genePhysicalInteractionDetailTable.scss'; +import style from './genePhysicalInteractionDetailTable.module.scss'; import {getDistinctFieldValue} from '../dataTable/utils'; import { compareByFixedOrder, htmlToPlainText } from '../../lib/utils'; import {SPECIES_NAME_ORDER} from '../../constants'; diff --git a/apps/main-app/src/components/interaction/genePhysicalInteractionDetailTable.scss b/src/components/interaction/genePhysicalInteractionDetailTable.module.scss similarity index 100% rename from apps/main-app/src/components/interaction/genePhysicalInteractionDetailTable.scss rename to src/components/interaction/genePhysicalInteractionDetailTable.module.scss diff --git a/apps/main-app/src/components/interaction/geneticInteractionSectionHelp.js b/src/components/interaction/geneticInteractionSectionHelp.js similarity index 100% rename from apps/main-app/src/components/interaction/geneticInteractionSectionHelp.js rename to src/components/interaction/geneticInteractionSectionHelp.js diff --git a/apps/main-app/src/components/interaction/index.js b/src/components/interaction/index.js similarity index 100% rename from apps/main-app/src/components/interaction/index.js rename to src/components/interaction/index.js diff --git a/apps/main-app/src/components/interaction/interactionUserGuide.js b/src/components/interaction/interactionUserGuide.js similarity index 100% rename from apps/main-app/src/components/interaction/interactionUserGuide.js rename to src/components/interaction/interactionUserGuide.js diff --git a/apps/main-app/src/components/loadingPage.js b/src/components/loadingPage.js similarity index 94% rename from apps/main-app/src/components/loadingPage.js rename to src/components/loadingPage.js index 01d214d48..e93f74ddf 100644 --- a/apps/main-app/src/components/loadingPage.js +++ b/src/components/loadingPage.js @@ -1,6 +1,6 @@ import React, { Component } from 'react'; -import style from './style.scss'; +import style from './style.module.scss'; import { SMALL_COL_CLASS, LARGE_COL_CLASS } from '../constants'; class LoadingPage extends Component { diff --git a/apps/main-app/src/components/loadingSpinner.js b/src/components/loadingSpinner.js similarity index 100% rename from apps/main-app/src/components/loadingSpinner.js rename to src/components/loadingSpinner.js diff --git a/apps/main-app/src/components/model/modelSectionHelp.js b/src/components/model/modelSectionHelp.js similarity index 100% rename from apps/main-app/src/components/model/modelSectionHelp.js rename to src/components/model/modelSectionHelp.js diff --git a/apps/main-app/src/components/noData.js b/src/components/noData.js similarity index 100% rename from apps/main-app/src/components/noData.js rename to src/components/noData.js diff --git a/apps/main-app/src/components/notFound.js b/src/components/notFound.js similarity index 82% rename from apps/main-app/src/components/notFound.js rename to src/components/notFound.js index b04881aef..dad882731 100644 --- a/apps/main-app/src/components/notFound.js +++ b/src/components/notFound.js @@ -13,7 +13,7 @@ class NotFound extends Component { If you continue to see this page, please email {HELP_EMAIL}.

    - + ); } diff --git a/apps/main-app/src/components/notFound.png b/src/components/notFound.png similarity index 100% rename from apps/main-app/src/components/notFound.png rename to src/components/notFound.png diff --git a/apps/main-app/src/components/orthology/index.js b/src/components/orthology/index.js similarity index 100% rename from apps/main-app/src/components/orthology/index.js rename to src/components/orthology/index.js diff --git a/apps/main-app/src/components/orthology/orthologyBasicInfo.js b/src/components/orthology/orthologyBasicInfo.js similarity index 100% rename from apps/main-app/src/components/orthology/orthologyBasicInfo.js rename to src/components/orthology/orthologyBasicInfo.js diff --git a/apps/main-app/src/components/orthology/orthologyFilteredTable.js b/src/components/orthology/orthologyFilteredTable.js similarity index 100% rename from apps/main-app/src/components/orthology/orthologyFilteredTable.js rename to src/components/orthology/orthologyFilteredTable.js diff --git a/apps/main-app/src/components/orthology/orthologyTable.js b/src/components/orthology/orthologyTable.js similarity index 98% rename from apps/main-app/src/components/orthology/orthologyTable.js rename to src/components/orthology/orthologyTable.js index c2d5e7006..020292103 100644 --- a/apps/main-app/src/components/orthology/orthologyTable.js +++ b/src/components/orthology/orthologyTable.js @@ -14,7 +14,7 @@ import { sortBy, compareByFixedOrder } from '../../lib/utils'; import { TAXON_ORDER } from '../../constants'; import HelpPopup from '../helpPopup'; -import style from '../homology/style.scss'; +import style from '../homology/style.module.scss'; import SpeciesName from '../SpeciesName'; const columns = [ diff --git a/apps/main-app/src/components/paralogy/alignmentHelp.js b/src/components/paralogy/alignmentHelp.js similarity index 100% rename from apps/main-app/src/components/paralogy/alignmentHelp.js rename to src/components/paralogy/alignmentHelp.js diff --git a/apps/main-app/src/components/paralogy/methods.js b/src/components/paralogy/methods.js similarity index 100% rename from apps/main-app/src/components/paralogy/methods.js rename to src/components/paralogy/methods.js diff --git a/apps/main-app/src/components/paralogy/paralogyTable.js b/src/components/paralogy/paralogyTable.js similarity index 100% rename from apps/main-app/src/components/paralogy/paralogyTable.js rename to src/components/paralogy/paralogyTable.js diff --git a/apps/main-app/src/components/paralogy/paralogyUserGuide.js b/src/components/paralogy/paralogyUserGuide.js similarity index 100% rename from apps/main-app/src/components/paralogy/paralogyUserGuide.js rename to src/components/paralogy/paralogyUserGuide.js diff --git a/apps/main-app/src/components/paralogy/rankHelp.js b/src/components/paralogy/rankHelp.js similarity index 100% rename from apps/main-app/src/components/paralogy/rankHelp.js rename to src/components/paralogy/rankHelp.js diff --git a/apps/main-app/src/components/pathway/pathwayLegend.png b/src/components/pathway/pathwayLegend.png similarity index 100% rename from apps/main-app/src/components/pathway/pathwayLegend.png rename to src/components/pathway/pathwayLegend.png diff --git a/apps/main-app/src/components/pathway/pathwayUserGuide.js b/src/components/pathway/pathwayUserGuide.js similarity index 100% rename from apps/main-app/src/components/pathway/pathwayUserGuide.js rename to src/components/pathway/pathwayUserGuide.js diff --git a/apps/main-app/src/components/pathway/pathwayWidget.js b/src/components/pathway/pathwayWidget.js similarity index 100% rename from apps/main-app/src/components/pathway/pathwayWidget.js rename to src/components/pathway/pathwayWidget.js diff --git a/apps/main-app/src/components/routeListener.js b/src/components/routeListener.js similarity index 100% rename from apps/main-app/src/components/routeListener.js rename to src/components/routeListener.js diff --git a/apps/main-app/src/components/scrollToTop/index.js b/src/components/scrollToTop/index.js similarity index 100% rename from apps/main-app/src/components/scrollToTop/index.js rename to src/components/scrollToTop/index.js diff --git a/apps/main-app/src/components/sequenceFeatureViewer/sequenceFeatureViewerSectionHelp.js b/src/components/sequenceFeatureViewer/sequenceFeatureViewerSectionHelp.js similarity index 100% rename from apps/main-app/src/components/sequenceFeatureViewer/sequenceFeatureViewerSectionHelp.js rename to src/components/sequenceFeatureViewer/sequenceFeatureViewerSectionHelp.js diff --git a/apps/main-app/src/components/sequenceFeatureViewer/sequenceFeatureViewerSubsectionHelp.js b/src/components/sequenceFeatureViewer/sequenceFeatureViewerSubsectionHelp.js similarity index 100% rename from apps/main-app/src/components/sequenceFeatureViewer/sequenceFeatureViewerSubsectionHelp.js rename to src/components/sequenceFeatureViewer/sequenceFeatureViewerSubsectionHelp.js diff --git a/apps/main-app/src/components/sequencePanel/sequencePanelSectionHelp.js b/src/components/sequencePanel/sequencePanelSectionHelp.js similarity index 100% rename from apps/main-app/src/components/sequencePanel/sequencePanelSectionHelp.js rename to src/components/sequencePanel/sequencePanelSectionHelp.js diff --git a/apps/main-app/src/components/speciesIcon/index.js b/src/components/speciesIcon/index.js similarity index 94% rename from apps/main-app/src/components/speciesIcon/index.js rename to src/components/speciesIcon/index.js index 00f42adb5..4b261e03b 100644 --- a/apps/main-app/src/components/speciesIcon/index.js +++ b/src/components/speciesIcon/index.js @@ -1,7 +1,7 @@ import React from 'react'; import PropTypes from 'prop-types'; -import style from './style.scss'; +import style from './style.module.scss'; const SpeciesIcon = ({inNav = false, species, scale = 1, iconClass}) => { if (!species) { diff --git a/apps/main-app/src/components/speciesIcon/speciesSprite-2x.png b/src/components/speciesIcon/speciesSprite-2x.png similarity index 100% rename from apps/main-app/src/components/speciesIcon/speciesSprite-2x.png rename to src/components/speciesIcon/speciesSprite-2x.png diff --git a/apps/main-app/src/components/speciesIcon/speciesSprite.png b/src/components/speciesIcon/speciesSprite.png similarity index 100% rename from apps/main-app/src/components/speciesIcon/speciesSprite.png rename to src/components/speciesIcon/speciesSprite.png diff --git a/apps/main-app/src/components/speciesIcon/style.scss b/src/components/speciesIcon/style.module.scss similarity index 100% rename from apps/main-app/src/components/speciesIcon/style.scss rename to src/components/speciesIcon/style.module.scss diff --git a/apps/main-app/src/components/style.scss b/src/components/style.module.scss similarity index 97% rename from apps/main-app/src/components/style.scss rename to src/components/style.module.scss index 6188f4b3a..a9a2b296b 100644 --- a/apps/main-app/src/components/style.scss +++ b/src/components/style.module.scss @@ -1,5 +1,5 @@ -@import "../theme"; -@import "../mixins"; +@import "../theme.module"; +@import "../mixins.module"; @import '~bootstrap/scss/functions'; @import '~bootstrap/scss/variables'; diff --git a/apps/main-app/src/components/subsection.js b/src/components/subsection.js similarity index 92% rename from apps/main-app/src/components/subsection.js rename to src/components/subsection.js index cc0c02e40..04c434eae 100644 --- a/apps/main-app/src/components/subsection.js +++ b/src/components/subsection.js @@ -1,7 +1,9 @@ +/* eslint-disable jsx-a11y/anchor-is-valid */ +/* eslint-disable jsx-a11y/anchor-has-content */ import React, { Component } from 'react'; import PropTypes from 'prop-types'; -import style from './style.scss'; +import style from './style.module.scss'; import { makeId } from '../lib/utils'; import NoData from './noData'; diff --git a/apps/main-app/src/components/synonymList.js b/src/components/synonymList.js similarity index 100% rename from apps/main-app/src/components/synonymList.js rename to src/components/synonymList.js diff --git a/apps/main-app/src/components/transgenicAlleles/transgenicAllelesSectionHelp.js b/src/components/transgenicAlleles/transgenicAllelesSectionHelp.js similarity index 100% rename from apps/main-app/src/components/transgenicAlleles/transgenicAllelesSectionHelp.js rename to src/components/transgenicAlleles/transgenicAllelesSectionHelp.js diff --git a/apps/main-app/src/components/variant/VariantJBrowseLink.js b/src/components/variant/VariantJBrowseLink.js similarity index 100% rename from apps/main-app/src/components/variant/VariantJBrowseLink.js rename to src/components/variant/VariantJBrowseLink.js diff --git a/apps/main-app/src/components/variant/index.js b/src/components/variant/index.js similarity index 100% rename from apps/main-app/src/components/variant/index.js rename to src/components/variant/index.js diff --git a/apps/main-app/src/constants.js b/src/constants.js similarity index 100% rename from apps/main-app/src/constants.js rename to src/constants.js diff --git a/apps/main-app/src/containers/GeneAlleleDetailsPage/GeneAlleleDetailsTable.js b/src/containers/GeneAlleleDetailsPage/GeneAlleleDetailsTable.js similarity index 97% rename from apps/main-app/src/containers/GeneAlleleDetailsPage/GeneAlleleDetailsTable.js rename to src/containers/GeneAlleleDetailsPage/GeneAlleleDetailsTable.js index 728854544..5807bda66 100644 --- a/apps/main-app/src/containers/GeneAlleleDetailsPage/GeneAlleleDetailsTable.js +++ b/src/containers/GeneAlleleDetailsPage/GeneAlleleDetailsTable.js @@ -13,7 +13,6 @@ import SynonymList from '../../components/synonymList'; import NoData from '../../components/noData'; import VariantJBrowseLink from '../../components/variant/VariantJBrowseLink'; import useDataTableQuery from '../../hooks/useDataTableQuery'; -import usePageLoadingQuery from '../../hooks/usePageLoadingQuery'; import { getSingleGenomeLocation, findFminFmax, getTableUrl } from '../../lib/utils'; import VariantsSequenceViewer from '../genePage/VariantsSequenceViewer'; import ErrorBoundary from '../../components/errorBoundary'; @@ -46,11 +45,7 @@ const getPolyphenStyle = (polyphen) => { } }; -const GeneAlleleDetailsTable = ({geneId}) => { - const { isLoading: isLoadingGene, isError: isErrorGene, data: gene } = usePageLoadingQuery(`/api/gene/${geneId}`); - if (isLoadingGene || isErrorGene) { - return null; - } +const GeneAlleleDetailsTable = ({ isLoadingGene, gene, geneId }) => { const geneLocation = getSingleGenomeLocation(gene.genomeLocations); const baseUrl = `/api/gene/${geneId}/allele-variant-detail`; @@ -291,6 +286,7 @@ const GeneAlleleDetailsTable = ({geneId}) => { allelesVisible: allelesFiltered.data ? allelesFiltered.data.results.map(({allele}) => formatAllele(allele.id)) : [], onAllelesSelect: setAlleleIdsSelected, }; + // eslint-disable-next-line react-hooks/exhaustive-deps }, [isLoading, allelesFiltered.data, alleleIdsSelected, setAlleleIdsSelected]); const selectRow = useMemo(() => { diff --git a/src/containers/GeneAlleleDetailsPage/GeneAlleleDetailsTableWrapper.js b/src/containers/GeneAlleleDetailsPage/GeneAlleleDetailsTableWrapper.js new file mode 100644 index 000000000..5f6e2ae9c --- /dev/null +++ b/src/containers/GeneAlleleDetailsPage/GeneAlleleDetailsTableWrapper.js @@ -0,0 +1,10 @@ +import usePageLoadingQuery from '../../hooks/usePageLoadingQuery'; +import GeneAlleleDetailsTable from './GeneAlleleDetailsTable'; + +export const GeneAlleleDetailsTableWrapper = ({ geneId }) => { + const { isLoading, isError, data } = usePageLoadingQuery(`/api/gene/${geneId}`); + if (isLoading || isError) { + return null; + } + return +} \ No newline at end of file diff --git a/apps/main-app/src/containers/GeneAlleleDetailsPage/index.js b/src/containers/GeneAlleleDetailsPage/index.js similarity index 100% rename from apps/main-app/src/containers/GeneAlleleDetailsPage/index.js rename to src/containers/GeneAlleleDetailsPage/index.js diff --git a/apps/main-app/src/containers/allelePage/AlleleMolecularConsequences.js b/src/containers/allelePage/AlleleMolecularConsequences.js similarity index 98% rename from apps/main-app/src/containers/allelePage/AlleleMolecularConsequences.js rename to src/containers/allelePage/AlleleMolecularConsequences.js index e43548a17..2eeee3477 100644 --- a/apps/main-app/src/containers/allelePage/AlleleMolecularConsequences.js +++ b/src/containers/allelePage/AlleleMolecularConsequences.js @@ -11,7 +11,7 @@ import NoData from '../../components/noData'; // import { VariantJBrowseLink } from '../../components/variant'; import Subsection from '../../components/subsection'; import VariantToTranscriptTable from './VariantToTranscriptTable'; -import style from './style.scss'; +import style from './style.module.scss'; import useAllAlleleVariants from '../../hooks/useAlleleVariants'; import { makeId } from '../../lib/utils'; diff --git a/apps/main-app/src/containers/allelePage/AllelePage.js b/src/containers/allelePage/AllelePage.js similarity index 98% rename from apps/main-app/src/containers/allelePage/AllelePage.js rename to src/containers/allelePage/AllelePage.js index 7d55a698f..4ecd8ea76 100644 --- a/apps/main-app/src/containers/allelePage/AllelePage.js +++ b/src/containers/allelePage/AllelePage.js @@ -19,7 +19,6 @@ import {Link} from 'react-router-dom'; import AlleleToPhenotypeTable from './AlleleToPhenotypeTable'; import PageCategoryLabel from '../../components/dataPage/PageCategoryLabel'; import AlleleToDiseaseTable from './AlleleToDiseaseTable'; -import AlleleToVariantTable from './AlleleToVariantTable'; import AlleleSequenceView from './AlleleSequenceView'; import AlleleTransgenicConstructs from './AlleleTransgenicConstructs'; import AlleleMolecularConsequences from './AlleleMolecularConsequences'; diff --git a/apps/main-app/src/containers/allelePage/AlleleSequenceView.js b/src/containers/allelePage/AlleleSequenceView.js similarity index 100% rename from apps/main-app/src/containers/allelePage/AlleleSequenceView.js rename to src/containers/allelePage/AlleleSequenceView.js diff --git a/apps/main-app/src/containers/allelePage/AlleleSummary.js b/src/containers/allelePage/AlleleSummary.js similarity index 100% rename from apps/main-app/src/containers/allelePage/AlleleSummary.js rename to src/containers/allelePage/AlleleSummary.js diff --git a/apps/main-app/src/containers/allelePage/AlleleSymbol.js b/src/containers/allelePage/AlleleSymbol.js similarity index 100% rename from apps/main-app/src/containers/allelePage/AlleleSymbol.js rename to src/containers/allelePage/AlleleSymbol.js diff --git a/apps/main-app/src/containers/allelePage/AlleleToDiseaseTable.js b/src/containers/allelePage/AlleleToDiseaseTable.js similarity index 100% rename from apps/main-app/src/containers/allelePage/AlleleToDiseaseTable.js rename to src/containers/allelePage/AlleleToDiseaseTable.js diff --git a/apps/main-app/src/containers/allelePage/AlleleToPhenotypeTable.js b/src/containers/allelePage/AlleleToPhenotypeTable.js similarity index 100% rename from apps/main-app/src/containers/allelePage/AlleleToPhenotypeTable.js rename to src/containers/allelePage/AlleleToPhenotypeTable.js diff --git a/apps/main-app/src/containers/allelePage/AlleleToVariantTable.js b/src/containers/allelePage/AlleleToVariantTable.js similarity index 100% rename from apps/main-app/src/containers/allelePage/AlleleToVariantTable.js rename to src/containers/allelePage/AlleleToVariantTable.js diff --git a/apps/main-app/src/containers/allelePage/AlleleTransgenicConstructs.js b/src/containers/allelePage/AlleleTransgenicConstructs.js similarity index 100% rename from apps/main-app/src/containers/allelePage/AlleleTransgenicConstructs.js rename to src/containers/allelePage/AlleleTransgenicConstructs.js diff --git a/apps/main-app/src/containers/allelePage/AlleleVariantsSummary.js b/src/containers/allelePage/AlleleVariantsSummary.js similarity index 100% rename from apps/main-app/src/containers/allelePage/AlleleVariantsSummary.js rename to src/containers/allelePage/AlleleVariantsSummary.js diff --git a/apps/main-app/src/containers/allelePage/CommaSeparatedGeneList.js b/src/containers/allelePage/CommaSeparatedGeneList.js similarity index 100% rename from apps/main-app/src/containers/allelePage/CommaSeparatedGeneList.js rename to src/containers/allelePage/CommaSeparatedGeneList.js diff --git a/apps/main-app/src/containers/allelePage/MolecularConsequenceHelp.js b/src/containers/allelePage/MolecularConsequenceHelp.js similarity index 100% rename from apps/main-app/src/containers/allelePage/MolecularConsequenceHelp.js rename to src/containers/allelePage/MolecularConsequenceHelp.js diff --git a/apps/main-app/src/containers/allelePage/Position.js b/src/containers/allelePage/Position.js similarity index 100% rename from apps/main-app/src/containers/allelePage/Position.js rename to src/containers/allelePage/Position.js diff --git a/apps/main-app/src/containers/allelePage/Sequence.js b/src/containers/allelePage/Sequence.js similarity index 97% rename from apps/main-app/src/containers/allelePage/Sequence.js rename to src/containers/allelePage/Sequence.js index cba16d20f..3892ef721 100644 --- a/apps/main-app/src/containers/allelePage/Sequence.js +++ b/src/containers/allelePage/Sequence.js @@ -1,7 +1,7 @@ import React, {useState} from 'react'; import PropTypes from 'prop-types'; import { Modal, ModalHeader, ModalBody, ModalFooter } from 'reactstrap'; -import style from './sequence.scss'; +import style from './sequence.module.scss'; const Sequence = ({ diff --git a/apps/main-app/src/containers/allelePage/Translation.js b/src/containers/allelePage/Translation.js similarity index 98% rename from apps/main-app/src/containers/allelePage/Translation.js rename to src/containers/allelePage/Translation.js index 990e21bbe..11c914081 100644 --- a/apps/main-app/src/containers/allelePage/Translation.js +++ b/src/containers/allelePage/Translation.js @@ -1,7 +1,7 @@ import React from 'react'; import PropTypes from 'prop-types'; // import Position from './Position'; -import translationStyles from './translation.scss'; +import translationStyles from './translation.module.scss'; const TranslationRow = ({ aminoAcids: aminoAcidsRaw = [], diff --git a/apps/main-app/src/containers/allelePage/VariantEffectDetails.js b/src/containers/allelePage/VariantEffectDetails.js similarity index 98% rename from apps/main-app/src/containers/allelePage/VariantEffectDetails.js rename to src/containers/allelePage/VariantEffectDetails.js index 59d2e8b3b..afb3d532f 100644 --- a/apps/main-app/src/containers/allelePage/VariantEffectDetails.js +++ b/src/containers/allelePage/VariantEffectDetails.js @@ -9,7 +9,7 @@ import { CollapsibleList } from '../../components/collapsibleList'; import { VariantJBrowseLink } from '../../components/variant'; import Translation from './Translation'; import Position from './Position'; -import styles from './style.scss'; +import styles from './style.module.scss'; const VariantEffectDetails = ({ consequence = {}, @@ -198,7 +198,7 @@ VariantEffectDetails.propTypes = { }), variant: PropTypes.shape({ id: PropTypes.string, - name: PropTypes.name, + name: PropTypes.string, type: PropTypes.shape({ name: PropTypes.string, }), diff --git a/apps/main-app/src/containers/allelePage/VariantPage.js b/src/containers/allelePage/VariantPage.js similarity index 100% rename from apps/main-app/src/containers/allelePage/VariantPage.js rename to src/containers/allelePage/VariantPage.js diff --git a/apps/main-app/src/containers/allelePage/VariantSequenceView.js b/src/containers/allelePage/VariantSequenceView.js similarity index 100% rename from apps/main-app/src/containers/allelePage/VariantSequenceView.js rename to src/containers/allelePage/VariantSequenceView.js diff --git a/apps/main-app/src/containers/allelePage/VariantSummary.js b/src/containers/allelePage/VariantSummary.js similarity index 100% rename from apps/main-app/src/containers/allelePage/VariantSummary.js rename to src/containers/allelePage/VariantSummary.js diff --git a/apps/main-app/src/containers/allelePage/VariantToTranscriptTable.js b/src/containers/allelePage/VariantToTranscriptTable.js similarity index 99% rename from apps/main-app/src/containers/allelePage/VariantToTranscriptTable.js rename to src/containers/allelePage/VariantToTranscriptTable.js index d04392a18..9b0758420 100644 --- a/apps/main-app/src/containers/allelePage/VariantToTranscriptTable.js +++ b/src/containers/allelePage/VariantToTranscriptTable.js @@ -5,7 +5,7 @@ import { DataTable } from '../../components/dataTable'; import { CollapsibleList } from '../../components/collapsibleList'; import Translation from './Translation'; import VariantEffectDetails from './VariantEffectDetails'; -import styles from './style.scss'; +import styles from './style.module.scss'; import useDataTableQuery from '../../hooks/useDataTableQuery'; const VariantToTranscriptTable = ({variant}) => { diff --git a/apps/main-app/src/containers/allelePage/getVariantGenomeLocation.js b/src/containers/allelePage/getVariantGenomeLocation.js similarity index 100% rename from apps/main-app/src/containers/allelePage/getVariantGenomeLocation.js rename to src/containers/allelePage/getVariantGenomeLocation.js diff --git a/apps/main-app/src/containers/allelePage/index.js b/src/containers/allelePage/index.js similarity index 100% rename from apps/main-app/src/containers/allelePage/index.js rename to src/containers/allelePage/index.js diff --git a/apps/main-app/src/containers/allelePage/sequence.scss b/src/containers/allelePage/sequence.module.scss similarity index 100% rename from apps/main-app/src/containers/allelePage/sequence.scss rename to src/containers/allelePage/sequence.module.scss diff --git a/apps/main-app/src/containers/allelePage/style.scss b/src/containers/allelePage/style.module.scss similarity index 100% rename from apps/main-app/src/containers/allelePage/style.scss rename to src/containers/allelePage/style.module.scss diff --git a/apps/main-app/src/containers/allelePage/translation.scss b/src/containers/allelePage/translation.module.scss similarity index 100% rename from apps/main-app/src/containers/allelePage/translation.scss rename to src/containers/allelePage/translation.module.scss diff --git a/apps/main-app/src/containers/diseasePage/DiseaseToAlleleTable.js b/src/containers/diseasePage/DiseaseToAlleleTable.js similarity index 100% rename from apps/main-app/src/containers/diseasePage/DiseaseToAlleleTable.js rename to src/containers/diseasePage/DiseaseToAlleleTable.js diff --git a/apps/main-app/src/containers/diseasePage/DiseaseToGeneTable.js b/src/containers/diseasePage/DiseaseToGeneTable.js similarity index 100% rename from apps/main-app/src/containers/diseasePage/DiseaseToGeneTable.js rename to src/containers/diseasePage/DiseaseToGeneTable.js diff --git a/apps/main-app/src/containers/diseasePage/DiseaseToModelTable.js b/src/containers/diseasePage/DiseaseToModelTable.js similarity index 100% rename from apps/main-app/src/containers/diseasePage/DiseaseToModelTable.js rename to src/containers/diseasePage/DiseaseToModelTable.js diff --git a/apps/main-app/src/containers/diseasePage/basicDiseaseInfo.js b/src/containers/diseasePage/basicDiseaseInfo.js similarity index 98% rename from apps/main-app/src/containers/diseasePage/basicDiseaseInfo.js rename to src/containers/diseasePage/basicDiseaseInfo.js index a02bd2b3a..22d24b0c9 100644 --- a/apps/main-app/src/containers/diseasePage/basicDiseaseInfo.js +++ b/src/containers/diseasePage/basicDiseaseInfo.js @@ -3,7 +3,7 @@ import { Link } from 'react-router-dom'; import PropTypes from 'prop-types'; import { UncontrolledTooltip } from 'reactstrap'; -import style from './style.scss'; +import style from './style.module.scss'; import { AttributeList, diff --git a/apps/main-app/src/containers/diseasePage/index.js b/src/containers/diseasePage/index.js similarity index 100% rename from apps/main-app/src/containers/diseasePage/index.js rename to src/containers/diseasePage/index.js diff --git a/apps/main-app/src/containers/diseasePage/style.scss b/src/containers/diseasePage/style.module.scss similarity index 100% rename from apps/main-app/src/containers/diseasePage/style.scss rename to src/containers/diseasePage/style.module.scss diff --git a/apps/main-app/src/containers/downloadsPage/DownloadFileRow.js b/src/containers/downloadsPage/DownloadFileRow.js similarity index 100% rename from apps/main-app/src/containers/downloadsPage/DownloadFileRow.js rename to src/containers/downloadsPage/DownloadFileRow.js diff --git a/apps/main-app/src/containers/downloadsPage/downloadFileLink.js b/src/containers/downloadsPage/downloadFileLink.js similarity index 92% rename from apps/main-app/src/containers/downloadsPage/downloadFileLink.js rename to src/containers/downloadsPage/downloadFileLink.js index d0f3fa918..2d0294da0 100644 --- a/apps/main-app/src/containers/downloadsPage/downloadFileLink.js +++ b/src/containers/downloadsPage/downloadFileLink.js @@ -1,7 +1,7 @@ import React from 'react'; import PropTypes from 'prop-types'; -import style from './style.scss'; +import style from './style.module.scss'; const fileExtension = (filename) => { return filename.substring(filename.lastIndexOf('.') + 1); diff --git a/apps/main-app/src/containers/downloadsPage/downloadFileTable.js b/src/containers/downloadsPage/downloadFileTable.js similarity index 100% rename from apps/main-app/src/containers/downloadsPage/downloadFileTable.js rename to src/containers/downloadsPage/downloadFileTable.js diff --git a/apps/main-app/src/containers/downloadsPage/geneDescriptionsHelp.js b/src/containers/downloadsPage/geneDescriptionsHelp.js similarity index 100% rename from apps/main-app/src/containers/downloadsPage/geneDescriptionsHelp.js rename to src/containers/downloadsPage/geneDescriptionsHelp.js diff --git a/apps/main-app/src/containers/downloadsPage/geneticInteractionsHelp.js b/src/containers/downloadsPage/geneticInteractionsHelp.js similarity index 100% rename from apps/main-app/src/containers/downloadsPage/geneticInteractionsHelp.js rename to src/containers/downloadsPage/geneticInteractionsHelp.js diff --git a/apps/main-app/src/containers/downloadsPage/index.js b/src/containers/downloadsPage/index.js similarity index 100% rename from apps/main-app/src/containers/downloadsPage/index.js rename to src/containers/downloadsPage/index.js diff --git a/apps/main-app/src/containers/downloadsPage/style.scss b/src/containers/downloadsPage/style.module.scss similarity index 87% rename from apps/main-app/src/containers/downloadsPage/style.scss rename to src/containers/downloadsPage/style.module.scss index 126f28e35..4f19025fe 100644 --- a/apps/main-app/src/containers/downloadsPage/style.scss +++ b/src/containers/downloadsPage/style.module.scss @@ -1,4 +1,4 @@ -@import "../../theme"; +@import "../../theme.module"; .fileLink { background-color: $primary; diff --git a/apps/main-app/src/containers/downloadsPage/variantsHelp.js b/src/containers/downloadsPage/variantsHelp.js similarity index 100% rename from apps/main-app/src/containers/downloadsPage/variantsHelp.js rename to src/containers/downloadsPage/variantsHelp.js diff --git a/apps/main-app/src/containers/genePage/GeneMetaTags.js b/src/containers/genePage/GeneMetaTags.js similarity index 100% rename from apps/main-app/src/containers/genePage/GeneMetaTags.js rename to src/containers/genePage/GeneMetaTags.js diff --git a/apps/main-app/src/containers/genePage/GeneModelsTable.js b/src/containers/genePage/GeneModelsTable.js similarity index 100% rename from apps/main-app/src/containers/genePage/GeneModelsTable.js rename to src/containers/genePage/GeneModelsTable.js diff --git a/apps/main-app/src/containers/genePage/PhenotypeCrossRefs.js b/src/containers/genePage/PhenotypeCrossRefs.js similarity index 100% rename from apps/main-app/src/containers/genePage/PhenotypeCrossRefs.js rename to src/containers/genePage/PhenotypeCrossRefs.js diff --git a/apps/main-app/src/containers/genePage/TransgenicAlleleTable.js b/src/containers/genePage/TransgenicAlleleTable.js similarity index 100% rename from apps/main-app/src/containers/genePage/TransgenicAlleleTable.js rename to src/containers/genePage/TransgenicAlleleTable.js diff --git a/apps/main-app/src/containers/genePage/VariantsSequenceViewer.js b/src/containers/genePage/VariantsSequenceViewer.js similarity index 93% rename from apps/main-app/src/containers/genePage/VariantsSequenceViewer.js rename to src/containers/genePage/VariantsSequenceViewer.js index 454df5c49..4a574c4c9 100644 --- a/apps/main-app/src/containers/genePage/VariantsSequenceViewer.js +++ b/src/containers/genePage/VariantsSequenceViewer.js @@ -7,7 +7,7 @@ const VariantsSequenceViewer = ({ gene, fmin, fmax, allelesSelected, allelesVisi const genomeLocationList = gene.genomeLocations; const genomeLocation = getSingleGenomeLocation(genomeLocationList); - const displayType = gene.species.name == "Homo sapiens" ? 'ISOFORM' : 'ISOFORM_AND_VARIANT'; + const displayType = gene.species.name === "Homo sapiens" ? 'ISOFORM' : 'ISOFORM_AND_VARIANT'; // TODO: remove when onAllelesSelect is in use // onAllelesSelect is to be called with a list of allele IDs, when selecting alleles throw the viewer. @@ -24,7 +24,6 @@ const VariantsSequenceViewer = ({ gene, fmin, fmax, allelesSelected, allelesVisi assembly={genomeLocation.assembly} biotype={gene.soTermName} chromosome={genomeLocation.chromosome} - displayType='ISOFORM_AND_VARIANT' displayType={displayType} fmax={fmax} fmin={fmin} diff --git a/apps/main-app/src/containers/genePage/alleleTable.js b/src/containers/genePage/alleleTable.js similarity index 97% rename from apps/main-app/src/containers/genePage/alleleTable.js rename to src/containers/genePage/alleleTable.js index 72a445667..40b716eef 100644 --- a/apps/main-app/src/containers/genePage/alleleTable.js +++ b/src/containers/genePage/alleleTable.js @@ -16,15 +16,10 @@ import RotatedHeaderCell from '../../components/dataTable/RotatedHeaderCell'; import BooleanLinkCell from '../../components/dataTable/BooleanLinkCell'; import VariantsSequenceViewer from './VariantsSequenceViewer'; import useDataTableQuery from '../../hooks/useDataTableQuery'; -import usePageLoadingQuery from '../../hooks/usePageLoadingQuery'; import useAllVariants from '../../hooks/useAllVariants'; -const AlleleTable = ({geneId}) => { +const AlleleTable = ({ isLoadingGene, gene, geneId}) => { - const { isLoading: isLoadingGene, isError: isErrorGene, data: gene } = usePageLoadingQuery(`/api/gene/${geneId}`); - if (isLoadingGene || isErrorGene) { - return null; - } const geneLocation = getSingleGenomeLocation(gene.genomeLocations); const tableProps = useDataTableQuery(`/api/gene/${geneId}/alleles`); @@ -44,6 +39,7 @@ const AlleleTable = ({geneId}) => { }, disease: allele.diseases.sort(compareAlphabeticalCaseInsensitive(disease => disease.name)) })) : []; + // eslint-disable-next-line react-hooks/exhaustive-deps }, [resolvedData]); const [alleleIdsSelected, setAlleleIdsSelected] = useState([]); @@ -81,6 +77,7 @@ const AlleleTable = ({geneId}) => { allelesVisible: alleleIdsFiltered.map(formatAllele), onAllelesSelect: setAlleleIdsSelected, }; + // eslint-disable-next-line react-hooks/exhaustive-deps }, [resolvedData, allelesFiltered.data, alleleIdsSelected, setAlleleIdsSelected]); const selectRow = useMemo(() => ({ diff --git a/src/containers/genePage/alleleTableWrapper.js b/src/containers/genePage/alleleTableWrapper.js new file mode 100644 index 000000000..186614f5e --- /dev/null +++ b/src/containers/genePage/alleleTableWrapper.js @@ -0,0 +1,10 @@ +import usePageLoadingQuery from '../../hooks/usePageLoadingQuery'; +import AlleleTable from './alleleTable'; + +export const AlleleTableWrapper = ({ geneId }) => { + const { isLoading, isError, data } = usePageLoadingQuery(`/api/gene/${geneId}`); + if (isLoading || isError) { + return null; + } + return +} \ No newline at end of file diff --git a/apps/main-app/src/containers/genePage/basicGeneInfo.js b/src/containers/genePage/basicGeneInfo.js similarity index 100% rename from apps/main-app/src/containers/genePage/basicGeneInfo.js rename to src/containers/genePage/basicGeneInfo.js diff --git a/apps/main-app/src/containers/genePage/expressionLinks.js b/src/containers/genePage/expressionLinks.js similarity index 100% rename from apps/main-app/src/containers/genePage/expressionLinks.js rename to src/containers/genePage/expressionLinks.js diff --git a/apps/main-app/src/containers/genePage/genomeFeatureWrapper.js b/src/containers/genePage/genomeFeatureWrapper.js similarity index 93% rename from apps/main-app/src/containers/genePage/genomeFeatureWrapper.js rename to src/containers/genePage/genomeFeatureWrapper.js index 3fada83b0..a329f749e 100644 --- a/apps/main-app/src/containers/genePage/genomeFeatureWrapper.js +++ b/src/containers/genePage/genomeFeatureWrapper.js @@ -10,14 +10,13 @@ import ExternalLink from '../../components/ExternalLink'; import GenomeFeatureViewer from 'agr_genomefeaturecomponent'; import {getTranscriptTypes} from '../../lib/genomeFeatureTypes'; import LoadingSpinner from '../../components/loadingSpinner'; -import '../../style.scss'; import HorizontalScroll from '../../components/horizontalScroll'; import HelpPopup from '../../components/helpPopup'; import isEqual from 'lodash.isequal'; import CommaSeparatedList from '../../components/commaSeparatedList'; import {select} from 'd3-selection'; -import style from './style.scss'; +import style from './style.module.scss'; import { getSpecies, getSingleGenomeLocation, @@ -27,7 +26,8 @@ import SequenceFeatureViewerSubsectionHelp from '../../components/sequenceFeatur const APOLLO_SERVER_PREFIX = '/apollo/'; const LINK_BUFFER = 1.2; -const helpSequenceViewer = 'The Allele/Variant Sequence Viewer shows the positions of allele-associated variants, where this data exists, in the context of the transcripts for the gene. Since the viewer is showing the genomic positions, alleles where the genomic location of the alteration is not known currently will not be displayed in the viewer. Polymorphisms determined by whole genome or whole exon sequencing are also not shown in this view due to the overwhelming number of these variants. To view these, use the link to the Alliance JBrowse below the viewer.'; +//is this needed? +// const helpSequenceViewer = 'The Allele/Variant Sequence Viewer shows the positions of allele-associated variants, where this data exists, in the context of the transcripts for the gene. Since the viewer is showing the genomic positions, alleles where the genomic location of the alteration is not known currently will not be displayed in the viewer. Polymorphisms determined by whole genome or whole exon sequencing are also not shown in this view due to the overwhelming number of these variants. To view these, use the link to the Alliance JBrowse below the viewer.'; @@ -46,7 +46,7 @@ class GenomeFeatureWrapper extends Component { this.handleClick = this.handleClick.bind(this); } - handleClick() { + handleClick(event) { const {id}= event.target; if(!id || id === `${this.props.id}` || typeof this.props.onAllelesSelect === 'undefined'){return;} @@ -92,7 +92,7 @@ class GenomeFeatureWrapper extends Component { generateJBrowseLink(chr, start, end) { const geneSymbolUrl = '&lookupSymbol=' + this.props.geneSymbol; - const externalJBrowsePrefix = '/jbrowse/?' + 'data=data%2F' + encodeURIComponent(getSpecies(this.props.species).jBrowseName); + const externalJBrowsePrefix = '/jbrowse/?data=data%2F' + encodeURIComponent(getSpecies(this.props.species).jBrowseName); const linkLength = end - start; let bufferedMin = Math.round(start - (linkLength * LINK_BUFFER / 2.0)); bufferedMin = bufferedMin < 0 ? 0 : bufferedMin; diff --git a/apps/main-app/src/containers/genePage/index.js b/src/containers/genePage/index.js similarity index 98% rename from apps/main-app/src/containers/genePage/index.js rename to src/containers/genePage/index.js index 9faef3115..f4876d16b 100644 --- a/apps/main-app/src/containers/genePage/index.js +++ b/src/containers/genePage/index.js @@ -14,7 +14,6 @@ import GeneOntologyRibbon from '../../components/geneOntologyRibbon'; import PathwayWidget from '../../components/pathway/pathwayWidget'; import NotFound from '../../components/notFound'; import Subsection from '../../components/subsection'; -import AlleleTable from './alleleTable'; import { GenePhysicalInteractionDetailTable, GeneGeneticInteractionDetailTable, @@ -48,6 +47,7 @@ import SequenceFeatureViewerSectionHelp from '../../components/sequenceFeatureVi import SequencePanelSectionHelp from '../../components/sequencePanel/sequencePanelSectionHelp'; import TransgenicAlleleSectionHelp from '../../components/transgenicAlleles/transgenicAllelesSectionHelp'; import DiseaseSectionHelp from '../../components/disease/diseaseSectionHelp'; +import { AlleleTableWrapper } from './alleleTableWrapper'; const SUMMARY = 'Summary'; const SEQUENCE_FEATURE_VIEWER = 'Sequence Feature Viewer'; @@ -176,9 +176,7 @@ const GenePage = ({geneId}) => { } title={ALLELES}> - + }title={TG_ALLELES}> diff --git a/apps/main-app/src/containers/genePage/modGeneDescription.js b/src/containers/genePage/modGeneDescription.js similarity index 100% rename from apps/main-app/src/containers/genePage/modGeneDescription.js rename to src/containers/genePage/modGeneDescription.js diff --git a/apps/main-app/src/containers/genePage/phenotypeTable.js b/src/containers/genePage/phenotypeTable.js similarity index 100% rename from apps/main-app/src/containers/genePage/phenotypeTable.js rename to src/containers/genePage/phenotypeTable.js diff --git a/apps/main-app/src/containers/genePage/sequencePanelWrapper.js b/src/containers/genePage/sequencePanelWrapper.js similarity index 100% rename from apps/main-app/src/containers/genePage/sequencePanelWrapper.js rename to src/containers/genePage/sequencePanelWrapper.js diff --git a/apps/main-app/src/containers/genePage/style.scss b/src/containers/genePage/style.module.scss similarity index 100% rename from apps/main-app/src/containers/genePage/style.scss rename to src/containers/genePage/style.module.scss diff --git a/apps/main-app/src/containers/genePage/test.js b/src/containers/genePage/test.js similarity index 100% rename from apps/main-app/src/containers/genePage/test.js rename to src/containers/genePage/test.js diff --git a/apps/main-app/src/containers/homepage/AboutSection.js b/src/containers/homepage/AboutSection.js similarity index 96% rename from apps/main-app/src/containers/homepage/AboutSection.js rename to src/containers/homepage/AboutSection.js index f824297e6..40ee1a984 100644 --- a/apps/main-app/src/containers/homepage/AboutSection.js +++ b/src/containers/homepage/AboutSection.js @@ -1,7 +1,7 @@ import React from 'react'; import WordpressInject from '../wordpress/wordpressInject'; -import style from './style.scss'; +import style from './style.module.scss'; const AboutSection = () => { return ( diff --git a/apps/main-app/src/containers/homepage/ActionButton.js b/src/containers/homepage/ActionButton.js similarity index 94% rename from apps/main-app/src/containers/homepage/ActionButton.js rename to src/containers/homepage/ActionButton.js index 80b60b5e4..a2262175e 100644 --- a/apps/main-app/src/containers/homepage/ActionButton.js +++ b/src/containers/homepage/ActionButton.js @@ -3,7 +3,7 @@ import PropTypes from 'prop-types'; import {Link} from 'react-router-dom'; import {UncontrolledTooltip} from 'reactstrap'; -import style from './style.scss'; +import style from './style.module.scss'; const ActionButton = ({children, icon, id, to, tooltip}) => { return ( diff --git a/apps/main-app/src/containers/homepage/MembersSection.js b/src/containers/homepage/MembersSection.js similarity index 55% rename from apps/main-app/src/containers/homepage/MembersSection.js rename to src/containers/homepage/MembersSection.js index 7844a055f..80df86883 100644 --- a/apps/main-app/src/containers/homepage/MembersSection.js +++ b/src/containers/homepage/MembersSection.js @@ -1,15 +1,15 @@ import React from 'react'; -import {Link} from 'react-router-dom'; -import flybaseLogo from '../../../../../libs/shared-assets/src/lib/assets/alliance_logo_flybase.png'; -import mgdLogo from '../../../../../libs/shared-assets/src/lib/assets/alliance_logo_mgd.png'; -import rgdLogo from '../../../../../libs/shared-assets/src/lib/assets/alliance_logo_rgd.png'; -import sgdLogo from '../../../../../libs/shared-assets/src/lib/assets/alliance_logo_sgd.png'; -import wormbaseLogo from '../../../../../libs/shared-assets/src/lib/assets/alliance_logo_wormbase.png'; -import zfinLogo from '../../../../../libs/shared-assets/src/lib/assets/alliance_logo_zfin.png'; -import xenbaseLogo from '../../../../../libs/shared-assets/src/lib/assets/alliance_logo_xenbase.png'; -import gocLogo from '../../../../../libs/shared-assets/src/lib/assets/alliance_logo_goc.png'; +import { Link } from 'react-router-dom'; +import flybaseLogo from '../../assets/images/alliance_logo_flybase.png'; +import mgdLogo from '../../assets/images/alliance_logo_mgd.png'; +import rgdLogo from '../../assets/images/alliance_logo_rgd.png'; +import sgdLogo from '../../assets/images/alliance_logo_sgd.png'; +import wormbaseLogo from '../../assets/images/alliance_logo_wormbase.png'; +import zfinLogo from '../../assets/images/alliance_logo_zfin.png'; +import xenbaseLogo from '../../assets/images/alliance_logo_xenbase.png'; +import gocLogo from '../../assets/images/alliance_logo_goc.png'; -import style from './style.scss'; +import style from './style.module.scss'; const MembersSection = () => { return ( @@ -19,49 +19,49 @@ const MembersSection = () => {
    - + FlyBase
    - + MGD
    - + RGD
    - + SGD
    - + WormBase
    - + ZFIN
    - + GOC
    diff --git a/apps/main-app/src/containers/homepage/SearchExample.js b/src/containers/homepage/SearchExample.js similarity index 100% rename from apps/main-app/src/containers/homepage/SearchExample.js rename to src/containers/homepage/SearchExample.js diff --git a/apps/main-app/src/containers/homepage/SearchSection.js b/src/containers/homepage/SearchSection.js similarity index 98% rename from apps/main-app/src/containers/homepage/SearchSection.js rename to src/containers/homepage/SearchSection.js index cf44c0edd..dfd9041f7 100644 --- a/apps/main-app/src/containers/homepage/SearchSection.js +++ b/src/containers/homepage/SearchSection.js @@ -1,5 +1,5 @@ import React from 'react'; -import style from './style.scss'; +import style from './style.module.scss'; import {SearchBarComponent} from '../layout/searchBar'; import SearchExample from './SearchExample'; import ActionButton from './ActionButton'; diff --git a/apps/main-app/src/containers/homepage/index.js b/src/containers/homepage/index.js similarity index 94% rename from apps/main-app/src/containers/homepage/index.js rename to src/containers/homepage/index.js index fdaf13584..13bbe2d0a 100644 --- a/apps/main-app/src/containers/homepage/index.js +++ b/src/containers/homepage/index.js @@ -3,7 +3,7 @@ import HeadMetaTags from '../../components/headMetaTags'; import SearchSection from './SearchSection'; import AboutSection from './AboutSection'; import MembersSection from './MembersSection'; -import style from './style.scss'; +import style from './style.module.scss'; import WordpressInject from '../wordpress/wordpressInject'; const Homepage = () => { diff --git a/apps/main-app/src/containers/homepage/style.scss b/src/containers/homepage/style.module.scss similarity index 94% rename from apps/main-app/src/containers/homepage/style.scss rename to src/containers/homepage/style.module.scss index 77bc6c1e1..bc41371eb 100644 --- a/apps/main-app/src/containers/homepage/style.scss +++ b/src/containers/homepage/style.module.scss @@ -1,4 +1,4 @@ -@import "../../theme"; +@import "../../theme.module"; @import '~bootstrap/scss/functions'; @import '~bootstrap/scss/variables'; @import '~bootstrap/scss/mixins'; @@ -11,7 +11,8 @@ $max-width: 800px; } .searchBackground { - background: $primary-300; /* fallback for old browsers */ + background: $primary-300; + /* fallback for old browsers */ background: linear-gradient(13deg, $accent-300 0%, $tertiary-300 25%, $primary-300 100%); } @@ -89,4 +90,4 @@ $max-width: 800px; max-width: 100%; margin-bottom: 0.5rem; } -} +} \ No newline at end of file diff --git a/apps/main-app/src/containers/layout/Footer.js b/src/containers/layout/Footer.js similarity index 84% rename from apps/main-app/src/containers/layout/Footer.js rename to src/containers/layout/Footer.js index 691031fd1..64a7e7301 100644 --- a/apps/main-app/src/containers/layout/Footer.js +++ b/src/containers/layout/Footer.js @@ -1,10 +1,11 @@ import React from 'react'; import {Link} from 'react-router-dom'; -import logo from '../../../../../libs/shared-assets/src/lib/assets/alliance_logo_light.png'; +import logo from '../../assets/images/alliance_logo_light.png'; import SocialMedia from './SocialMedia'; import SiteMap from './SiteMap'; -import style from './style.scss'; +import style from './style.module.scss'; + const Footer = () => { return ( diff --git a/apps/main-app/src/containers/layout/ReleaseBanner.js b/src/containers/layout/ReleaseBanner.js similarity index 100% rename from apps/main-app/src/containers/layout/ReleaseBanner.js rename to src/containers/layout/ReleaseBanner.js diff --git a/apps/main-app/src/containers/layout/SiteMap.js b/src/containers/layout/SiteMap.js similarity index 94% rename from apps/main-app/src/containers/layout/SiteMap.js rename to src/containers/layout/SiteMap.js index cd4343b61..ea3a7d952 100644 --- a/apps/main-app/src/containers/layout/SiteMap.js +++ b/src/containers/layout/SiteMap.js @@ -3,7 +3,7 @@ import {Link} from 'react-router-dom'; import {NAV_MENU} from '../../constants'; -import style from './style.scss'; +import style from './style.module.scss'; import SubMenuItem from './navigation/SubMenuItem'; const SiteMap = () => { @@ -13,7 +13,7 @@ const SiteMap = () => { NAV_MENU.map(page => { // no need for the Home link here if (page.route === '/') { - return; + return null; } const item = page.route ? {page.label} : diff --git a/apps/main-app/src/containers/layout/SocialMedia.js b/src/containers/layout/SocialMedia.js similarity index 94% rename from apps/main-app/src/containers/layout/SocialMedia.js rename to src/containers/layout/SocialMedia.js index ef73c3623..f23cb2c97 100644 --- a/apps/main-app/src/containers/layout/SocialMedia.js +++ b/src/containers/layout/SocialMedia.js @@ -1,6 +1,6 @@ import React from 'react'; import PropTypes from 'prop-types'; -import style from './style.scss'; +import style from './style.module.scss'; const SocialMedia = ({showText = false}) => { return ( diff --git a/apps/main-app/src/containers/layout/WarningBanner.js b/src/containers/layout/WarningBanner.js similarity index 95% rename from apps/main-app/src/containers/layout/WarningBanner.js rename to src/containers/layout/WarningBanner.js index 32e6c87ef..6d86971e6 100644 --- a/apps/main-app/src/containers/layout/WarningBanner.js +++ b/src/containers/layout/WarningBanner.js @@ -1,7 +1,7 @@ import React from 'react'; import { useQuery } from 'react-query'; import { WARNING_BANNER_SLUG, WORDPRESS_PAGE_BASE_URL } from '../../constants'; -import style from './style.scss'; +import style from './style.module.scss'; import ReplaceLinks from '../wordpress/ReplaceLinks'; import fetchWordpress from '../../lib/fetchWordpress'; diff --git a/apps/main-app/src/containers/layout/index.js b/src/containers/layout/index.js similarity index 94% rename from apps/main-app/src/containers/layout/index.js rename to src/containers/layout/index.js index 84fe069a7..160591c2b 100644 --- a/apps/main-app/src/containers/layout/index.js +++ b/src/containers/layout/index.js @@ -3,9 +3,9 @@ import React, { Component } from 'react'; import { connect } from 'react-redux'; import PropTypes from 'prop-types'; import {Link, withRouter} from 'react-router-dom'; -import style from './style.scss'; +import style from './style.module.scss'; import Loader from './loader/index'; -import logo from '../../../../../libs/shared-assets/src/lib/assets/alliance_logo_agr.png'; +import logo from '../../assets/images/alliance_logo_agr.png'; import SearchBar from './searchBar'; import { MenuItems } from './navigation'; import ReleaseBanner from './ReleaseBanner'; @@ -60,7 +60,7 @@ class Layout extends Component {
    - + diff --git a/apps/main-app/src/containers/layout/loader/index.js b/src/containers/layout/loader/index.js similarity index 97% rename from apps/main-app/src/containers/layout/loader/index.js rename to src/containers/layout/loader/index.js index 1e7bbd359..90917a37b 100644 --- a/apps/main-app/src/containers/layout/loader/index.js +++ b/src/containers/layout/loader/index.js @@ -2,7 +2,7 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; -import style from './style.scss'; +import style from './style.module.scss'; import {selectPageLoading} from '../../../selectors/loadingSelector'; const FINISH_INTERVAL = 250; diff --git a/apps/main-app/src/containers/layout/loader/style.scss b/src/containers/layout/loader/style.module.scss similarity index 92% rename from apps/main-app/src/containers/layout/loader/style.scss rename to src/containers/layout/loader/style.module.scss index dce0dd615..32fa5fe64 100644 --- a/apps/main-app/src/containers/layout/loader/style.scss +++ b/src/containers/layout/loader/style.module.scss @@ -1,4 +1,4 @@ -@import "../../../theme"; +@import "../../../theme.module"; .done { height: 0 !important; diff --git a/apps/main-app/src/containers/layout/navigation/MenuItem.js b/src/containers/layout/navigation/MenuItem.js similarity index 100% rename from apps/main-app/src/containers/layout/navigation/MenuItem.js rename to src/containers/layout/navigation/MenuItem.js diff --git a/apps/main-app/src/containers/layout/navigation/SubMenuItem.js b/src/containers/layout/navigation/SubMenuItem.js similarity index 100% rename from apps/main-app/src/containers/layout/navigation/SubMenuItem.js rename to src/containers/layout/navigation/SubMenuItem.js diff --git a/apps/main-app/src/containers/layout/navigation/index.js b/src/containers/layout/navigation/index.js similarity index 100% rename from apps/main-app/src/containers/layout/navigation/index.js rename to src/containers/layout/navigation/index.js diff --git a/apps/main-app/src/containers/layout/navigation/menuItems.js b/src/containers/layout/navigation/menuItems.js similarity index 100% rename from apps/main-app/src/containers/layout/navigation/menuItems.js rename to src/containers/layout/navigation/menuItems.js diff --git a/apps/main-app/src/containers/layout/searchBar/index.js b/src/containers/layout/searchBar/index.js similarity index 99% rename from apps/main-app/src/containers/layout/searchBar/index.js rename to src/containers/layout/searchBar/index.js index ec4f9b5ae..f3301e25f 100644 --- a/apps/main-app/src/containers/layout/searchBar/index.js +++ b/src/containers/layout/searchBar/index.js @@ -10,21 +10,22 @@ import { UncontrolledDropdown } from 'reactstrap'; -import style from './style.scss'; +import style from './style.module.scss'; import CategoryLabel from '../../search/categoryLabel'; import fetchData from '../../../lib/fetchData'; import { CATEGORIES } from '../../../constants'; -const AUTO_BASE_URL = '/api/search_autocomplete'; -const DEFAULT_CAT = CATEGORIES[0]; - import { autocompleteGoToPageEvent, autocompleteSearchEvent } from '../../../lib/analytics.js'; import { getURLForEntry } from '../../../lib/searchHelpers'; +const AUTO_BASE_URL = '/api/search_autocomplete'; +const DEFAULT_CAT = CATEGORIES[0]; + + class SearchBarComponent extends Component { constructor(props) { super(props); @@ -245,3 +246,4 @@ const SearchBarComponentWithHistory = withRouter(SearchBarComponent); export { SearchBarComponentWithHistory as SearchBarComponent }; export default SearchBarComponentWithHistory; + diff --git a/apps/main-app/src/containers/layout/searchBar/style.scss b/src/containers/layout/searchBar/style.module.scss similarity index 97% rename from apps/main-app/src/containers/layout/searchBar/style.scss rename to src/containers/layout/searchBar/style.module.scss index 13bd74316..fc9a198d8 100644 --- a/apps/main-app/src/containers/layout/searchBar/style.scss +++ b/src/containers/layout/searchBar/style.module.scss @@ -1,4 +1,4 @@ -@import "../../../theme"; +@import "../../../theme.module"; @import '~bootstrap/scss/functions'; @import '~bootstrap/scss/variables'; diff --git a/apps/main-app/src/containers/layout/style.scss b/src/containers/layout/style.module.scss similarity index 98% rename from apps/main-app/src/containers/layout/style.scss rename to src/containers/layout/style.module.scss index b0bc38ee4..99fb1d38b 100644 --- a/apps/main-app/src/containers/layout/style.scss +++ b/src/containers/layout/style.module.scss @@ -1,4 +1,4 @@ -@import "../../theme"; +@import "../../theme.module"; @import '~bootstrap/scss/functions'; @import '~bootstrap/scss/variables'; @import '~bootstrap/scss/mixins'; diff --git a/apps/main-app/src/containers/layout/test.js b/src/containers/layout/test.js similarity index 100% rename from apps/main-app/src/containers/layout/test.js rename to src/containers/layout/test.js diff --git a/apps/main-app/src/containers/layout/topBar.js b/src/containers/layout/topBar.js similarity index 92% rename from apps/main-app/src/containers/layout/topBar.js rename to src/containers/layout/topBar.js index 140190678..7a1cd4273 100644 --- a/apps/main-app/src/containers/layout/topBar.js +++ b/src/containers/layout/topBar.js @@ -3,7 +3,7 @@ import React, {Component} from 'react'; import { HELP_EMAIL } from '../../constants'; import SocialMedia from './SocialMedia'; -import style from './style.scss'; +import style from './style.module.scss'; class TopBar extends Component { render() { diff --git a/apps/main-app/src/containers/modLanding/About.js b/src/containers/modLanding/About.js similarity index 93% rename from apps/main-app/src/containers/modLanding/About.js rename to src/containers/modLanding/About.js index 7c0b52538..3e81a2e60 100644 --- a/apps/main-app/src/containers/modLanding/About.js +++ b/src/containers/modLanding/About.js @@ -1,5 +1,5 @@ import React from 'react'; -import style from './style.scss'; +import style from './style.module.scss'; import PropTypes from 'prop-types'; const About = ({htmlContent, sectionStyle}) => { diff --git a/apps/main-app/src/containers/modLanding/FooterAlt.js b/src/containers/modLanding/FooterAlt.js similarity index 93% rename from apps/main-app/src/containers/modLanding/FooterAlt.js rename to src/containers/modLanding/FooterAlt.js index 6e5dc7a43..f0db0d085 100644 --- a/apps/main-app/src/containers/modLanding/FooterAlt.js +++ b/src/containers/modLanding/FooterAlt.js @@ -1,4 +1,4 @@ -import style from './style.scss'; +import style from './style.module.scss'; import PropTypes from "prop-types"; const FooterAlt = ({link, links, note, footerStyle, logoImgSrc, titleBarStyle, modShortName}) => { @@ -10,7 +10,7 @@ const FooterAlt = ({link, links, note, footerStyle, logoImgSrc, titleBarStyle, m
    - + { return ( diff --git a/apps/main-app/src/containers/modLanding/Main.js b/src/containers/modLanding/Main.js similarity index 98% rename from apps/main-app/src/containers/modLanding/Main.js rename to src/containers/modLanding/Main.js index 947821e9b..3c1be5702 100644 --- a/apps/main-app/src/containers/modLanding/Main.js +++ b/src/containers/modLanding/Main.js @@ -1,7 +1,7 @@ import React from 'react'; import HeadMetaTags from '../../components/headMetaTags'; import PropTypes from 'prop-types'; -import style from './style.scss'; +import style from './style.module.scss'; import {MODContent} from './content'; import About from "./About"; import Title from "./Title"; diff --git a/apps/main-app/src/containers/modLanding/Meetings.js b/src/containers/modLanding/Meetings.js similarity index 97% rename from apps/main-app/src/containers/modLanding/Meetings.js rename to src/containers/modLanding/Meetings.js index 28b954974..24f577f29 100644 --- a/apps/main-app/src/containers/modLanding/Meetings.js +++ b/src/containers/modLanding/Meetings.js @@ -1,5 +1,5 @@ import React from 'react'; -import style from './style.scss'; +import style from './style.module.scss'; import PropTypes from "prop-types"; import MeetingsZfin from "./MeetingsZfin" import MeetingsRgd from "./MeetingsRgd" diff --git a/apps/main-app/src/containers/modLanding/MeetingsRgd.js b/src/containers/modLanding/MeetingsRgd.js similarity index 94% rename from apps/main-app/src/containers/modLanding/MeetingsRgd.js rename to src/containers/modLanding/MeetingsRgd.js index 7190a749e..dff086d79 100644 --- a/apps/main-app/src/containers/modLanding/MeetingsRgd.js +++ b/src/containers/modLanding/MeetingsRgd.js @@ -1,5 +1,5 @@ import React from 'react'; -import style from './style.scss'; +import style from './style.module.scss'; import LoadingSpinner from '../../components/loadingSpinner'; import usePageLoadingQuery from '../../hooks/usePageLoadingQuery'; import PropTypes from "prop-types"; @@ -34,10 +34,10 @@ const MeetingsRgd = ({urlMeetingsMod, fetchMeetingsCount, linkToMeetingsPage}) = {isLoading && } { postList && parseRgdPosts(postList).map(post => { - if (count > fetchMeetingsCount) { return; } + if (count > fetchMeetingsCount) { return null; } count++; let key = "meetings_" + count; - post.text = post.text.replace(/\[…\]/, '[…]<\a>'); + post.text = post.text.replace(/\[…\]/, '[…]<\\a>'); return (
    diff --git a/apps/main-app/src/containers/modLanding/MeetingsZfin.js b/src/containers/modLanding/MeetingsZfin.js similarity index 93% rename from apps/main-app/src/containers/modLanding/MeetingsZfin.js rename to src/containers/modLanding/MeetingsZfin.js index adc45df95..b4ee6651d 100644 --- a/apps/main-app/src/containers/modLanding/MeetingsZfin.js +++ b/src/containers/modLanding/MeetingsZfin.js @@ -1,5 +1,5 @@ import React from 'react'; -import style from './style.scss'; +import style from './style.module.scss'; import LoadingSpinner from '../../components/loadingSpinner'; import usePageLoadingQuery from '../../hooks/usePageLoadingQuery'; import PropTypes from "prop-types"; @@ -29,11 +29,11 @@ const MeetingsZfin = ({urlMeetingsMod, fetchMeetingsCount, linkToMeetingsPage}) {isLoading && } { postList && parseZfinPosts(postList).map(post => { - if (count > fetchMeetingsCount) { return; } + if (count > fetchMeetingsCount) { return null; } count++; let key = "meetings_" + count; if (post.text !== undefined) { - post.text = post.text.replace(/\[…\]/, '[…]<\a>'); + post.text = post.text.replace(/\[…\]/, '[…]<\\a>'); } return (
    diff --git a/apps/main-app/src/containers/modLanding/News.js b/src/containers/modLanding/News.js similarity index 97% rename from apps/main-app/src/containers/modLanding/News.js rename to src/containers/modLanding/News.js index df5f783f8..8cb472c76 100644 --- a/apps/main-app/src/containers/modLanding/News.js +++ b/src/containers/modLanding/News.js @@ -1,5 +1,5 @@ import React from 'react'; -import style from './style.scss'; +import style from './style.module.scss'; import PropTypes from "prop-types"; import WordpressNews from "./wordpressNews" import NewsFlybase from "./NewsFlybase" diff --git a/apps/main-app/src/containers/modLanding/NewsFlybase.js b/src/containers/modLanding/NewsFlybase.js similarity index 93% rename from apps/main-app/src/containers/modLanding/NewsFlybase.js rename to src/containers/modLanding/NewsFlybase.js index 7611550f4..8c499870c 100644 --- a/apps/main-app/src/containers/modLanding/NewsFlybase.js +++ b/src/containers/modLanding/NewsFlybase.js @@ -1,5 +1,5 @@ import React from 'react'; -import style from './style.scss'; +import style from './style.module.scss'; import LoadingSpinner from '../../components/loadingSpinner'; import usePageLoadingQuery from '../../hooks/usePageLoadingQuery'; import PropTypes from "prop-types"; @@ -29,10 +29,10 @@ const NewsFlybase = ({urlNewsMod, fetchNewsCount, linkToNewsPage}) => { {isLoading && } { postList && parseFlybasePosts(postList).map(post => { - if (count > fetchNewsCount) { return; } + if (count > fetchNewsCount) { return null; } count++; let key = "news_" + count; - post.text = post.text.replace(/\[…\]/, '[…]<\a>'); + post.text = post.text.replace(/\[…\]/, '[…]<\\a>'); return (
    diff --git a/apps/main-app/src/containers/modLanding/NewsZfin.js b/src/containers/modLanding/NewsZfin.js similarity index 93% rename from apps/main-app/src/containers/modLanding/NewsZfin.js rename to src/containers/modLanding/NewsZfin.js index 37a735aa4..56cbcbe18 100644 --- a/apps/main-app/src/containers/modLanding/NewsZfin.js +++ b/src/containers/modLanding/NewsZfin.js @@ -1,5 +1,5 @@ import React from 'react'; -import style from './style.scss'; +import style from './style.module.scss'; import LoadingSpinner from '../../components/loadingSpinner'; import usePageLoadingQuery from '../../hooks/usePageLoadingQuery'; import PropTypes from "prop-types"; @@ -29,11 +29,11 @@ const NewsZfin = ({urlNewsMod, fetchNewsCount, linkToNewsPage}) => { {isLoading && } { postList && parseZfinPosts(postList).map(post => { - if (count > fetchNewsCount) { return; } + if (count > fetchNewsCount) { return null; } count++; let key = "news_" + count; if (post.text !== undefined) { - post.text = post.text.replace(/\[…\]/, '[…]<\a>'); + post.text = post.text.replace(/\[…\]/, '[…]<\\a>'); } return (
    diff --git a/apps/main-app/src/containers/modLanding/Resources.js b/src/containers/modLanding/Resources.js similarity index 96% rename from apps/main-app/src/containers/modLanding/Resources.js rename to src/containers/modLanding/Resources.js index 1faf224d8..5cc0a27df 100644 --- a/apps/main-app/src/containers/modLanding/Resources.js +++ b/src/containers/modLanding/Resources.js @@ -1,5 +1,5 @@ import React from 'react'; -import style from './style.scss'; +import style from './style.module.scss'; const Resources = ({links, sectionStyle}) => { return ( diff --git a/apps/main-app/src/containers/modLanding/Search.js b/src/containers/modLanding/Search.js similarity index 96% rename from apps/main-app/src/containers/modLanding/Search.js rename to src/containers/modLanding/Search.js index 6d53bef74..5a5b6ac88 100644 --- a/apps/main-app/src/containers/modLanding/Search.js +++ b/src/containers/modLanding/Search.js @@ -1,5 +1,5 @@ import React from 'react'; -import style from './style.scss'; +import style from './style.module.scss'; const Search = ({links, sectionStyle}) => { return ( diff --git a/apps/main-app/src/containers/modLanding/Title.js b/src/containers/modLanding/Title.js similarity index 95% rename from apps/main-app/src/containers/modLanding/Title.js rename to src/containers/modLanding/Title.js index 185394524..b76273986 100644 --- a/apps/main-app/src/containers/modLanding/Title.js +++ b/src/containers/modLanding/Title.js @@ -1,4 +1,4 @@ -import style from './style.scss'; +import style from './style.module.scss'; import PropTypes from "prop-types"; const Title = ({bannerStyle, titleBarStyle, logoImgSrc, modFullName}) => { diff --git a/apps/main-app/src/containers/modLanding/VisitMod.js b/src/containers/modLanding/VisitMod.js similarity index 94% rename from apps/main-app/src/containers/modLanding/VisitMod.js rename to src/containers/modLanding/VisitMod.js index 8e482cbe2..354976e85 100644 --- a/apps/main-app/src/containers/modLanding/VisitMod.js +++ b/src/containers/modLanding/VisitMod.js @@ -1,5 +1,5 @@ import React from 'react'; -import style from './style.scss'; +import style from './style.module.scss'; import PropTypes from 'prop-types'; const VisitMod = ({modVisitButtonText, linkToMod, sectionStyle}) => { diff --git a/apps/main-app/src/containers/modLanding/assets/topBannerFB.png b/src/containers/modLanding/assets/topBannerFB.png similarity index 100% rename from apps/main-app/src/containers/modLanding/assets/topBannerFB.png rename to src/containers/modLanding/assets/topBannerFB.png diff --git a/apps/main-app/src/containers/modLanding/assets/topBannerGOC.png b/src/containers/modLanding/assets/topBannerGOC.png similarity index 100% rename from apps/main-app/src/containers/modLanding/assets/topBannerGOC.png rename to src/containers/modLanding/assets/topBannerGOC.png diff --git a/apps/main-app/src/containers/modLanding/assets/topBannerMGD.png b/src/containers/modLanding/assets/topBannerMGD.png similarity index 100% rename from apps/main-app/src/containers/modLanding/assets/topBannerMGD.png rename to src/containers/modLanding/assets/topBannerMGD.png diff --git a/apps/main-app/src/containers/modLanding/assets/topBannerRGD.png b/src/containers/modLanding/assets/topBannerRGD.png similarity index 100% rename from apps/main-app/src/containers/modLanding/assets/topBannerRGD.png rename to src/containers/modLanding/assets/topBannerRGD.png diff --git a/apps/main-app/src/containers/modLanding/assets/topBannerSGD.jpg b/src/containers/modLanding/assets/topBannerSGD.jpg similarity index 100% rename from apps/main-app/src/containers/modLanding/assets/topBannerSGD.jpg rename to src/containers/modLanding/assets/topBannerSGD.jpg diff --git a/apps/main-app/src/containers/modLanding/assets/topBannerSGD.png b/src/containers/modLanding/assets/topBannerSGD.png similarity index 100% rename from apps/main-app/src/containers/modLanding/assets/topBannerSGD.png rename to src/containers/modLanding/assets/topBannerSGD.png diff --git a/apps/main-app/src/containers/modLanding/assets/topBannerWB.jpg b/src/containers/modLanding/assets/topBannerWB.jpg similarity index 100% rename from apps/main-app/src/containers/modLanding/assets/topBannerWB.jpg rename to src/containers/modLanding/assets/topBannerWB.jpg diff --git a/apps/main-app/src/containers/modLanding/assets/topBannerWB.png b/src/containers/modLanding/assets/topBannerWB.png similarity index 100% rename from apps/main-app/src/containers/modLanding/assets/topBannerWB.png rename to src/containers/modLanding/assets/topBannerWB.png diff --git a/apps/main-app/src/containers/modLanding/assets/topBannerZFIN.png b/src/containers/modLanding/assets/topBannerZFIN.png similarity index 100% rename from apps/main-app/src/containers/modLanding/assets/topBannerZFIN.png rename to src/containers/modLanding/assets/topBannerZFIN.png diff --git a/apps/main-app/src/containers/modLanding/content.js b/src/containers/modLanding/content.js similarity index 97% rename from apps/main-app/src/containers/modLanding/content.js rename to src/containers/modLanding/content.js index 5efbc556e..fe037c832 100644 --- a/apps/main-app/src/containers/modLanding/content.js +++ b/src/containers/modLanding/content.js @@ -1,12 +1,12 @@ -import flybaseLogo from '../../../../../libs/shared-assets/src/lib/assets/alliance_logo_flybase.png'; -import mgdLogo from '../../../../../libs/shared-assets/src/lib/assets/alliance_logo_mgd.png'; -import rgdLogo from '../../../../../libs/shared-assets/src/lib/assets/alliance_logo_rgd.png'; -import sgdLogo from '../../../../../libs/shared-assets/src/lib/assets/alliance_logo_sgd.png'; -import wormbaseLogo from '../../../../../libs/shared-assets/src/lib/assets/alliance_logo_wormbase.png'; -import zfinLogo from '../../../../../libs/shared-assets/src/lib/assets/alliance_logo_zfin.png'; -import gocLogo from '../../../../../libs/shared-assets/src/lib/assets/alliance_logo_goc.png'; +import flybaseLogo from '../../assets/images/alliance_logo_flybase.png'; +import mgdLogo from '../../assets/images/alliance_logo_mgd.png'; +import rgdLogo from '../../assets/images/alliance_logo_rgd.png'; +import sgdLogo from '../../assets/images/alliance_logo_sgd.png'; +import wormbaseLogo from '../../assets/images/alliance_logo_wormbase.png'; +import zfinLogo from '../../assets/images/alliance_logo_zfin.png'; +import gocLogo from '../../assets/images/alliance_logo_goc.png'; -import style from './style.scss'; +import style from './style.module.scss'; export const MODContent = { 'wormbase': { diff --git a/apps/main-app/src/containers/modLanding/googleapisMeetings.js b/src/containers/modLanding/googleapisMeetings.js similarity index 99% rename from apps/main-app/src/containers/modLanding/googleapisMeetings.js rename to src/containers/modLanding/googleapisMeetings.js index 90315609d..1f9ef25ad 100644 --- a/apps/main-app/src/containers/modLanding/googleapisMeetings.js +++ b/src/containers/modLanding/googleapisMeetings.js @@ -1,5 +1,5 @@ import React from 'react'; -import style from './style.scss'; +import style from './style.module.scss'; import LoadingSpinner from '../../components/loadingSpinner'; import usePageLoadingQuery from '../../hooks/usePageLoadingQuery'; import PropTypes from "prop-types"; diff --git a/apps/main-app/src/containers/modLanding/style.scss b/src/containers/modLanding/style.module.scss similarity index 97% rename from apps/main-app/src/containers/modLanding/style.scss rename to src/containers/modLanding/style.module.scss index 86b9732f0..7aa8d0fdc 100644 --- a/apps/main-app/src/containers/modLanding/style.scss +++ b/src/containers/modLanding/style.module.scss @@ -1,4 +1,4 @@ -@import "../../theme"; +@import "../../theme.module"; @import '~bootstrap/scss/functions'; @import '~bootstrap/scss/variables'; @import '~bootstrap/scss/mixins'; @@ -197,7 +197,7 @@ $secondaryColor__MGD: #143055; } .banner__DEFAULT { - background-image: url('../../../../../libs/shared-assets/src/lib/assets/banner_dnahelix.jpg'); + background-image: url('../../assets/images/banner_dnahelix.jpg'); } .banner__WB { diff --git a/apps/main-app/src/containers/modLanding/tests/About/about.test.js b/src/containers/modLanding/tests/About/about.test.js similarity index 100% rename from apps/main-app/src/containers/modLanding/tests/About/about.test.js rename to src/containers/modLanding/tests/About/about.test.js diff --git a/apps/main-app/src/containers/modLanding/tests/Footer/fb_footer.test.js b/src/containers/modLanding/tests/Footer/fb_footer.test.js similarity index 100% rename from apps/main-app/src/containers/modLanding/tests/Footer/fb_footer.test.js rename to src/containers/modLanding/tests/Footer/fb_footer.test.js diff --git a/apps/main-app/src/containers/modLanding/tests/Footer/go_footer.test.js b/src/containers/modLanding/tests/Footer/go_footer.test.js similarity index 100% rename from apps/main-app/src/containers/modLanding/tests/Footer/go_footer.test.js rename to src/containers/modLanding/tests/Footer/go_footer.test.js diff --git a/apps/main-app/src/containers/modLanding/tests/Footer/mgi_footer.test.js b/src/containers/modLanding/tests/Footer/mgi_footer.test.js similarity index 100% rename from apps/main-app/src/containers/modLanding/tests/Footer/mgi_footer.test.js rename to src/containers/modLanding/tests/Footer/mgi_footer.test.js diff --git a/apps/main-app/src/containers/modLanding/tests/Footer/rgd_footer.test.js b/src/containers/modLanding/tests/Footer/rgd_footer.test.js similarity index 100% rename from apps/main-app/src/containers/modLanding/tests/Footer/rgd_footer.test.js rename to src/containers/modLanding/tests/Footer/rgd_footer.test.js diff --git a/apps/main-app/src/containers/modLanding/tests/Footer/sgd_footer.test.js b/src/containers/modLanding/tests/Footer/sgd_footer.test.js similarity index 100% rename from apps/main-app/src/containers/modLanding/tests/Footer/sgd_footer.test.js rename to src/containers/modLanding/tests/Footer/sgd_footer.test.js diff --git a/apps/main-app/src/containers/modLanding/tests/Footer/wb_footer.test.js b/src/containers/modLanding/tests/Footer/wb_footer.test.js similarity index 100% rename from apps/main-app/src/containers/modLanding/tests/Footer/wb_footer.test.js rename to src/containers/modLanding/tests/Footer/wb_footer.test.js diff --git a/apps/main-app/src/containers/modLanding/tests/Footer/zfin_footer.test.js b/src/containers/modLanding/tests/Footer/zfin_footer.test.js similarity index 100% rename from apps/main-app/src/containers/modLanding/tests/Footer/zfin_footer.test.js rename to src/containers/modLanding/tests/Footer/zfin_footer.test.js diff --git a/apps/main-app/src/containers/modLanding/tests/Meetings/meetings_link_only.test.js b/src/containers/modLanding/tests/Meetings/meetings_link_only.test.js similarity index 100% rename from apps/main-app/src/containers/modLanding/tests/Meetings/meetings_link_only.test.js rename to src/containers/modLanding/tests/Meetings/meetings_link_only.test.js diff --git a/apps/main-app/src/containers/modLanding/tests/Meetings/rgd_meetings.test.js b/src/containers/modLanding/tests/Meetings/rgd_meetings.test.js similarity index 100% rename from apps/main-app/src/containers/modLanding/tests/Meetings/rgd_meetings.test.js rename to src/containers/modLanding/tests/Meetings/rgd_meetings.test.js diff --git a/apps/main-app/src/containers/modLanding/tests/Meetings/sgd_meetings.test.js b/src/containers/modLanding/tests/Meetings/sgd_meetings.test.js similarity index 100% rename from apps/main-app/src/containers/modLanding/tests/Meetings/sgd_meetings.test.js rename to src/containers/modLanding/tests/Meetings/sgd_meetings.test.js diff --git a/apps/main-app/src/containers/modLanding/tests/Meetings/zfin_meetings.test.js b/src/containers/modLanding/tests/Meetings/zfin_meetings.test.js similarity index 100% rename from apps/main-app/src/containers/modLanding/tests/Meetings/zfin_meetings.test.js rename to src/containers/modLanding/tests/Meetings/zfin_meetings.test.js diff --git a/apps/main-app/src/containers/modLanding/tests/ModPage/test_whole.test.js b/src/containers/modLanding/tests/ModPage/test_whole.test.js similarity index 100% rename from apps/main-app/src/containers/modLanding/tests/ModPage/test_whole.test.js rename to src/containers/modLanding/tests/ModPage/test_whole.test.js diff --git a/apps/main-app/src/containers/modLanding/tests/News/fb_news.test.js b/src/containers/modLanding/tests/News/fb_news.test.js similarity index 100% rename from apps/main-app/src/containers/modLanding/tests/News/fb_news.test.js rename to src/containers/modLanding/tests/News/fb_news.test.js diff --git a/apps/main-app/src/containers/modLanding/tests/News/news_link_only.test.js b/src/containers/modLanding/tests/News/news_link_only.test.js similarity index 100% rename from apps/main-app/src/containers/modLanding/tests/News/news_link_only.test.js rename to src/containers/modLanding/tests/News/news_link_only.test.js diff --git a/apps/main-app/src/containers/modLanding/tests/News/rgd_news.test.js b/src/containers/modLanding/tests/News/rgd_news.test.js similarity index 100% rename from apps/main-app/src/containers/modLanding/tests/News/rgd_news.test.js rename to src/containers/modLanding/tests/News/rgd_news.test.js diff --git a/apps/main-app/src/containers/modLanding/tests/News/sgd_news.test.js b/src/containers/modLanding/tests/News/sgd_news.test.js similarity index 100% rename from apps/main-app/src/containers/modLanding/tests/News/sgd_news.test.js rename to src/containers/modLanding/tests/News/sgd_news.test.js diff --git a/apps/main-app/src/containers/modLanding/tests/News/wb_news.test.js b/src/containers/modLanding/tests/News/wb_news.test.js similarity index 100% rename from apps/main-app/src/containers/modLanding/tests/News/wb_news.test.js rename to src/containers/modLanding/tests/News/wb_news.test.js diff --git a/apps/main-app/src/containers/modLanding/tests/News/zfin_news.test.js b/src/containers/modLanding/tests/News/zfin_news.test.js similarity index 100% rename from apps/main-app/src/containers/modLanding/tests/News/zfin_news.test.js rename to src/containers/modLanding/tests/News/zfin_news.test.js diff --git a/apps/main-app/src/containers/modLanding/tests/Resources/fb_resources.test.js b/src/containers/modLanding/tests/Resources/fb_resources.test.js similarity index 100% rename from apps/main-app/src/containers/modLanding/tests/Resources/fb_resources.test.js rename to src/containers/modLanding/tests/Resources/fb_resources.test.js diff --git a/apps/main-app/src/containers/modLanding/tests/Resources/goc_resources.test.js b/src/containers/modLanding/tests/Resources/goc_resources.test.js similarity index 100% rename from apps/main-app/src/containers/modLanding/tests/Resources/goc_resources.test.js rename to src/containers/modLanding/tests/Resources/goc_resources.test.js diff --git a/apps/main-app/src/containers/modLanding/tests/Resources/mgd_resources.test.js b/src/containers/modLanding/tests/Resources/mgd_resources.test.js similarity index 100% rename from apps/main-app/src/containers/modLanding/tests/Resources/mgd_resources.test.js rename to src/containers/modLanding/tests/Resources/mgd_resources.test.js diff --git a/apps/main-app/src/containers/modLanding/tests/Resources/rgd_resources.test.js b/src/containers/modLanding/tests/Resources/rgd_resources.test.js similarity index 100% rename from apps/main-app/src/containers/modLanding/tests/Resources/rgd_resources.test.js rename to src/containers/modLanding/tests/Resources/rgd_resources.test.js diff --git a/apps/main-app/src/containers/modLanding/tests/Resources/sgd_resources.test.js b/src/containers/modLanding/tests/Resources/sgd_resources.test.js similarity index 100% rename from apps/main-app/src/containers/modLanding/tests/Resources/sgd_resources.test.js rename to src/containers/modLanding/tests/Resources/sgd_resources.test.js diff --git a/apps/main-app/src/containers/modLanding/tests/Resources/wb_resources.test.js b/src/containers/modLanding/tests/Resources/wb_resources.test.js similarity index 100% rename from apps/main-app/src/containers/modLanding/tests/Resources/wb_resources.test.js rename to src/containers/modLanding/tests/Resources/wb_resources.test.js diff --git a/apps/main-app/src/containers/modLanding/tests/Resources/zfin_resources.test.js b/src/containers/modLanding/tests/Resources/zfin_resources.test.js similarity index 100% rename from apps/main-app/src/containers/modLanding/tests/Resources/zfin_resources.test.js rename to src/containers/modLanding/tests/Resources/zfin_resources.test.js diff --git a/apps/main-app/src/containers/modLanding/tests/Search/fb_search.test.js b/src/containers/modLanding/tests/Search/fb_search.test.js similarity index 100% rename from apps/main-app/src/containers/modLanding/tests/Search/fb_search.test.js rename to src/containers/modLanding/tests/Search/fb_search.test.js diff --git a/apps/main-app/src/containers/modLanding/tests/Search/goc_search.test.js b/src/containers/modLanding/tests/Search/goc_search.test.js similarity index 100% rename from apps/main-app/src/containers/modLanding/tests/Search/goc_search.test.js rename to src/containers/modLanding/tests/Search/goc_search.test.js diff --git a/apps/main-app/src/containers/modLanding/tests/Search/mgd_search.test.js b/src/containers/modLanding/tests/Search/mgd_search.test.js similarity index 100% rename from apps/main-app/src/containers/modLanding/tests/Search/mgd_search.test.js rename to src/containers/modLanding/tests/Search/mgd_search.test.js diff --git a/apps/main-app/src/containers/modLanding/tests/Search/rgd_search.test.js b/src/containers/modLanding/tests/Search/rgd_search.test.js similarity index 100% rename from apps/main-app/src/containers/modLanding/tests/Search/rgd_search.test.js rename to src/containers/modLanding/tests/Search/rgd_search.test.js diff --git a/apps/main-app/src/containers/modLanding/tests/Search/sgd_search.test.js b/src/containers/modLanding/tests/Search/sgd_search.test.js similarity index 100% rename from apps/main-app/src/containers/modLanding/tests/Search/sgd_search.test.js rename to src/containers/modLanding/tests/Search/sgd_search.test.js diff --git a/apps/main-app/src/containers/modLanding/tests/Search/wb_search.test.js b/src/containers/modLanding/tests/Search/wb_search.test.js similarity index 100% rename from apps/main-app/src/containers/modLanding/tests/Search/wb_search.test.js rename to src/containers/modLanding/tests/Search/wb_search.test.js diff --git a/apps/main-app/src/containers/modLanding/tests/Search/zfin_search.test.js b/src/containers/modLanding/tests/Search/zfin_search.test.js similarity index 100% rename from apps/main-app/src/containers/modLanding/tests/Search/zfin_search.test.js rename to src/containers/modLanding/tests/Search/zfin_search.test.js diff --git a/apps/main-app/src/containers/modLanding/tests/Title/title.test.js b/src/containers/modLanding/tests/Title/title.test.js similarity index 100% rename from apps/main-app/src/containers/modLanding/tests/Title/title.test.js rename to src/containers/modLanding/tests/Title/title.test.js diff --git a/apps/main-app/src/containers/modLanding/tests/VisitMod/visitmod.test.js b/src/containers/modLanding/tests/VisitMod/visitmod.test.js similarity index 100% rename from apps/main-app/src/containers/modLanding/tests/VisitMod/visitmod.test.js rename to src/containers/modLanding/tests/VisitMod/visitmod.test.js diff --git a/apps/main-app/src/containers/modLanding/tests/jobScript.js b/src/containers/modLanding/tests/jobScript.js similarity index 100% rename from apps/main-app/src/containers/modLanding/tests/jobScript.js rename to src/containers/modLanding/tests/jobScript.js diff --git a/apps/main-app/src/containers/modLanding/tests/server.js b/src/containers/modLanding/tests/server.js similarity index 100% rename from apps/main-app/src/containers/modLanding/tests/server.js rename to src/containers/modLanding/tests/server.js diff --git a/apps/main-app/src/containers/modLanding/wordpressNews.js b/src/containers/modLanding/wordpressNews.js similarity index 91% rename from apps/main-app/src/containers/modLanding/wordpressNews.js rename to src/containers/modLanding/wordpressNews.js index e23058bb7..cf67f11bc 100644 --- a/apps/main-app/src/containers/modLanding/wordpressNews.js +++ b/src/containers/modLanding/wordpressNews.js @@ -1,5 +1,5 @@ import React from 'react'; -import style from './style.scss'; +import style from './style.module.scss'; import LoadingSpinner from '../../components/loadingSpinner'; import usePageLoadingQuery from '../../hooks/usePageLoadingQuery'; import PropTypes from "prop-types"; @@ -31,11 +31,11 @@ const WordpressNews = ({urlNewsMod, fetchNewsCount, linkToNewsPage}) => { {isLoading && } { postList && parseWordpressPosts(postList).map(post => { - if (post.status !== 'publish') { return; } - if (count > fetchNewsCount) { return; } + if (post.status !== 'publish') { return null; } + if (count > fetchNewsCount) { return null; } count++; let key = "news_" + count; - post.text = post.text.replace(/\[…\]/, '[…]<\a>'); + post.text = post.text.replace(/\[…\]/, '[…]<\\a>'); return (
    { diff --git a/apps/main-app/src/containers/search/categoryLabel.js b/src/containers/search/categoryLabel.js similarity index 93% rename from apps/main-app/src/containers/search/categoryLabel.js rename to src/containers/search/categoryLabel.js index 0866b0f9d..18ac1f996 100644 --- a/apps/main-app/src/containers/search/categoryLabel.js +++ b/src/containers/search/categoryLabel.js @@ -1,7 +1,7 @@ import React from 'react'; import PropTypes from 'prop-types'; -import style from './style.scss'; +import style from './style.module.scss'; import {CATEGORIES} from '../../constants'; const CategoryLabel = ({category, hideImage, hideLabel}) => { diff --git a/apps/main-app/src/containers/search/detailList.js b/src/containers/search/detailList.js similarity index 98% rename from apps/main-app/src/containers/search/detailList.js rename to src/containers/search/detailList.js index afc0ec838..8a416877f 100644 --- a/apps/main-app/src/containers/search/detailList.js +++ b/src/containers/search/detailList.js @@ -1,7 +1,7 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; -import style from './style.scss'; +import style from './style.module.scss'; import { makeFieldDisplayName } from '../../lib/searchHelpers'; import NoData from '../../components/noData'; import { CollapsibleList } from '../../components/collapsibleList'; diff --git a/apps/main-app/src/containers/search/explainNode.js b/src/containers/search/explainNode.js similarity index 94% rename from apps/main-app/src/containers/search/explainNode.js rename to src/containers/search/explainNode.js index 66063d43a..f1cc2b3cb 100644 --- a/apps/main-app/src/containers/search/explainNode.js +++ b/src/containers/search/explainNode.js @@ -1,6 +1,6 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; -import style from './style.scss'; +import style from './style.module.scss'; class ExplainNode extends Component { diff --git a/apps/main-app/src/containers/search/filterSelector/collapsibleFacet.js b/src/containers/search/filterSelector/collapsibleFacet.js similarity index 93% rename from apps/main-app/src/containers/search/filterSelector/collapsibleFacet.js rename to src/containers/search/filterSelector/collapsibleFacet.js index 0ffa7d5f3..a12e9634f 100644 --- a/apps/main-app/src/containers/search/filterSelector/collapsibleFacet.js +++ b/src/containers/search/filterSelector/collapsibleFacet.js @@ -1,6 +1,7 @@ +/* eslint-disable jsx-a11y/anchor-is-valid */ import React, { Component } from 'react'; import PropTypes from 'prop-types'; -import style from './style.scss'; +import style from './style.module.scss'; class CollapsibleFacet extends Component { diff --git a/apps/main-app/src/containers/search/filterSelector/excludeLink.js b/src/containers/search/filterSelector/excludeLink.js similarity index 97% rename from apps/main-app/src/containers/search/filterSelector/excludeLink.js rename to src/containers/search/filterSelector/excludeLink.js index b27cdac74..cd985a7c9 100644 --- a/apps/main-app/src/containers/search/filterSelector/excludeLink.js +++ b/src/containers/search/filterSelector/excludeLink.js @@ -6,7 +6,7 @@ import { import {Link} from 'react-router-dom'; import React from 'react'; import * as PropTypes from 'prop-types'; -import style from './style.scss'; +import style from './style.module.scss'; import UncontrolledTooltip from 'reactstrap/lib/UncontrolledTooltip'; /** diff --git a/apps/main-app/src/containers/search/filterSelector/filterLink.js b/src/containers/search/filterSelector/filterLink.js similarity index 96% rename from apps/main-app/src/containers/search/filterSelector/filterLink.js rename to src/containers/search/filterSelector/filterLink.js index 0e49a7d72..7e89b2c1f 100644 --- a/apps/main-app/src/containers/search/filterSelector/filterLink.js +++ b/src/containers/search/filterSelector/filterLink.js @@ -1,4 +1,4 @@ -import style from './style.scss'; +import style from './style.module.scss'; import {Link} from 'react-router-dom'; import {stringifyQuery} from '../../../lib/searchHelpers'; import React from 'react'; diff --git a/apps/main-app/src/containers/search/filterSelector/filterSelector.js b/src/containers/search/filterSelector/filterSelector.js similarity index 96% rename from apps/main-app/src/containers/search/filterSelector/filterSelector.js rename to src/containers/search/filterSelector/filterSelector.js index c0a89771e..21b45e8ed 100644 --- a/apps/main-app/src/containers/search/filterSelector/filterSelector.js +++ b/src/containers/search/filterSelector/filterSelector.js @@ -3,7 +3,7 @@ import PropTypes from 'prop-types'; import { Link } from 'react-router-dom'; import { connect } from 'react-redux'; -import style from './style.scss'; +import style from './style.module.scss'; import SingleFilterSelector from './singleFilterSelector'; import { getQueryParamWithValueChanged, @@ -94,5 +94,5 @@ function mapStateToProps(state) { }; } -export { FilterSelectorComponent as FilterSelectorComponent }; +export { FilterSelectorComponent }; export default connect(mapStateToProps)(FilterSelectorComponent); diff --git a/apps/main-app/src/containers/search/filterSelector/singleFilterSelector.js b/src/containers/search/filterSelector/singleFilterSelector.js similarity index 96% rename from apps/main-app/src/containers/search/filterSelector/singleFilterSelector.js rename to src/containers/search/filterSelector/singleFilterSelector.js index 6d9f53447..99b967d23 100644 --- a/apps/main-app/src/containers/search/filterSelector/singleFilterSelector.js +++ b/src/containers/search/filterSelector/singleFilterSelector.js @@ -1,10 +1,12 @@ +/* eslint-disable jsx-a11y/anchor-is-valid */ +/* eslint-disable react/jsx-no-comment-textnodes */ import React, {Component} from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { withRouter } from 'react-router-dom'; import Select from 'react-select'; -import style from './style.scss'; +import style from './style.module.scss'; import { getQueryParamWithoutPage, removeBlankValue, stringifyQuery diff --git a/apps/main-app/src/containers/search/filterSelector/singleFilterValue.js b/src/containers/search/filterSelector/singleFilterValue.js similarity index 98% rename from apps/main-app/src/containers/search/filterSelector/singleFilterValue.js rename to src/containers/search/filterSelector/singleFilterValue.js index 0260d727e..e768589f9 100644 --- a/apps/main-app/src/containers/search/filterSelector/singleFilterValue.js +++ b/src/containers/search/filterSelector/singleFilterValue.js @@ -2,7 +2,7 @@ import CategoryLabel from '../categoryLabel'; import { getQueryParamWithoutPage } from '../../../lib/searchHelpers'; -import style from './style.scss'; +import style from './style.module.scss'; import React, {useState} from 'react'; import PropTypes from 'prop-types'; import ExcludeLink from './excludeLink'; diff --git a/apps/main-app/src/containers/search/filterSelector/style.scss b/src/containers/search/filterSelector/style.module.scss similarity index 100% rename from apps/main-app/src/containers/search/filterSelector/style.scss rename to src/containers/search/filterSelector/style.module.scss diff --git a/apps/main-app/src/containers/search/index.js b/src/containers/search/index.js similarity index 100% rename from apps/main-app/src/containers/search/index.js rename to src/containers/search/index.js diff --git a/apps/main-app/src/containers/search/multiTable.js b/src/containers/search/multiTable.js similarity index 98% rename from apps/main-app/src/containers/search/multiTable.js rename to src/containers/search/multiTable.js index 5b39a82f3..d85071a17 100644 --- a/apps/main-app/src/containers/search/multiTable.js +++ b/src/containers/search/multiTable.js @@ -4,7 +4,7 @@ import { connect } from 'react-redux'; import { Link } from 'react-router-dom'; import clone from 'lodash.clone'; -import style from './style.scss'; +import style from './style.module.scss'; import ResultsTable from './resultsTable'; import CategoryLabel from './categoryLabel'; import fetchData from '../../lib/fetchData'; @@ -170,5 +170,5 @@ function mapStateToProps(state) { }; } -export { MultiTableComponent as MultiTableComponent }; +export { MultiTableComponent }; export default connect(mapStateToProps)(MultiTableComponent); diff --git a/apps/main-app/src/containers/search/resultExplanation.js b/src/containers/search/resultExplanation.js similarity index 97% rename from apps/main-app/src/containers/search/resultExplanation.js rename to src/containers/search/resultExplanation.js index c04ea50d8..613b6b24d 100644 --- a/apps/main-app/src/containers/search/resultExplanation.js +++ b/src/containers/search/resultExplanation.js @@ -1,6 +1,6 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; -import style from './style.scss'; +import style from './style.module.scss'; import { makeFieldDisplayName } from '../../lib/searchHelpers'; import ExplainNode from './explainNode'; diff --git a/apps/main-app/src/containers/search/resultsList.js b/src/containers/search/resultsList.js similarity index 99% rename from apps/main-app/src/containers/search/resultsList.js rename to src/containers/search/resultsList.js index d354c5066..d475a4ad9 100644 --- a/apps/main-app/src/containers/search/resultsList.js +++ b/src/containers/search/resultsList.js @@ -1,7 +1,7 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; -import style from './style.scss'; +import style from './style.module.scss'; import CategoryLabel from './categoryLabel'; import DetailList from './detailList'; import ResultExplanation from './resultExplanation'; diff --git a/apps/main-app/src/containers/search/resultsTable.js b/src/containers/search/resultsTable.js similarity index 98% rename from apps/main-app/src/containers/search/resultsTable.js rename to src/containers/search/resultsTable.js index e6673fc74..5b3519eec 100644 --- a/apps/main-app/src/containers/search/resultsTable.js +++ b/src/containers/search/resultsTable.js @@ -1,7 +1,7 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; -import style from './style.scss'; +import style from './style.module.scss'; import DetailList from './detailList'; import { getLinkForEntry, makeFieldDisplayName } from '../../lib/searchHelpers'; import { NON_HIGHLIGHTED_FIELDS } from '../../constants'; diff --git a/apps/main-app/src/containers/search/search.js b/src/containers/search/search.js similarity index 98% rename from apps/main-app/src/containers/search/search.js rename to src/containers/search/search.js index 794fed34e..e5da88f8d 100644 --- a/apps/main-app/src/containers/search/search.js +++ b/src/containers/search/search.js @@ -16,7 +16,7 @@ import { receiveResponse, setError } from '../../actions/search'; import LoadingPage from '../../components/loadingPage'; import HeadMetaTags from '../../components/headMetaTags'; -import style from './style.scss'; +import style from './style.module.scss'; // used to test rendering fixture response import fixtureResponse from './tests/fixtureResponse'; @@ -188,5 +188,5 @@ function mapStateToProps(state, ownProps) { }; } -export { SearchComponent as SearchComponent }; +export { SearchComponent }; export default connect(mapStateToProps)(SearchComponent); diff --git a/apps/main-app/src/containers/search/searchBreadcrumbs.js b/src/containers/search/searchBreadcrumbs.js similarity index 100% rename from apps/main-app/src/containers/search/searchBreadcrumbs.js rename to src/containers/search/searchBreadcrumbs.js diff --git a/apps/main-app/src/containers/search/searchControls.js b/src/containers/search/searchControls.js similarity index 95% rename from apps/main-app/src/containers/search/searchControls.js rename to src/containers/search/searchControls.js index cc734518e..fb1e9d0ec 100644 --- a/apps/main-app/src/containers/search/searchControls.js +++ b/src/containers/search/searchControls.js @@ -3,7 +3,7 @@ import PropTypes from 'prop-types'; import {Link} from 'react-router-dom'; import {connect} from 'react-redux'; -import style from './style.scss'; +import style from './style.module.scss'; import { getQueryParamWithValueChanged, stringifyQuery @@ -68,5 +68,5 @@ function mapStateToProps(state, ownProps) { }; } -export { SearchControlsComponent as SearchControlsComponent }; +export { SearchControlsComponent }; export default connect(mapStateToProps)(SearchControlsComponent); diff --git a/apps/main-app/src/containers/search/style.scss b/src/containers/search/style.module.scss similarity index 98% rename from apps/main-app/src/containers/search/style.scss rename to src/containers/search/style.module.scss index 908017cbd..b2dfa4a11 100644 --- a/apps/main-app/src/containers/search/style.scss +++ b/src/containers/search/style.module.scss @@ -1,4 +1,4 @@ -@import "../../theme"; +@import "../../theme.module"; @import '~bootstrap/scss/functions'; @import '~bootstrap/scss/variables'; @import '~bootstrap/scss/mixins'; diff --git a/apps/main-app/src/containers/search/tests/fixtureResponse.js b/src/containers/search/tests/fixtureResponse.js similarity index 98% rename from apps/main-app/src/containers/search/tests/fixtureResponse.js rename to src/containers/search/tests/fixtureResponse.js index 30cb21fe3..e1c64f81a 100644 --- a/apps/main-app/src/containers/search/tests/fixtureResponse.js +++ b/src/containers/search/tests/fixtureResponse.js @@ -1,3 +1,4 @@ +/*eslint-disable import/no-anonymous-default-export*/ /*eslint-disable quotes */ export default { "aggregations": [ diff --git a/apps/main-app/src/containers/search/tests/test.js b/src/containers/search/tests/test.js similarity index 100% rename from apps/main-app/src/containers/search/tests/test.js rename to src/containers/search/tests/test.js diff --git a/apps/main-app/src/containers/wordpress/ReplaceLinks.js b/src/containers/wordpress/ReplaceLinks.js similarity index 100% rename from apps/main-app/src/containers/wordpress/ReplaceLinks.js rename to src/containers/wordpress/ReplaceLinks.js diff --git a/apps/main-app/src/containers/wordpress/index.js b/src/containers/wordpress/index.js similarity index 100% rename from apps/main-app/src/containers/wordpress/index.js rename to src/containers/wordpress/index.js diff --git a/apps/main-app/src/containers/wordpress/secondaryNav.js b/src/containers/wordpress/secondaryNav.js similarity index 97% rename from apps/main-app/src/containers/wordpress/secondaryNav.js rename to src/containers/wordpress/secondaryNav.js index bb648c4c5..b66e09bdc 100644 --- a/apps/main-app/src/containers/wordpress/secondaryNav.js +++ b/src/containers/wordpress/secondaryNav.js @@ -1,7 +1,7 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; -import style from './style.scss'; +import style from './style.module.scss'; class SecondaryNav extends Component { getStyle (menuCat) { @@ -23,6 +23,8 @@ class SecondaryNav extends Component { return style.citeMenuContainer; case 'post': return style.postMenuContainer; + default: + return; } } diff --git a/apps/main-app/src/containers/wordpress/style.scss b/src/containers/wordpress/style.module.scss similarity index 63% rename from apps/main-app/src/containers/wordpress/style.scss rename to src/containers/wordpress/style.module.scss index 9e9f7ae7b..ce5f4ff86 100644 --- a/apps/main-app/src/containers/wordpress/style.scss +++ b/src/containers/wordpress/style.module.scss @@ -1,4 +1,4 @@ -@import "../../theme"; +@import "../../theme.module"; @import '~bootstrap/scss/functions'; @import '~bootstrap/scss/variables'; @@ -23,27 +23,27 @@ } .postMenuContainer { - background-image: url('../../../../../libs/shared-assets/src/lib/assets/banner_bacteria.jpg'); + background-image: url('../../assets/images/banner_bacteria.jpg'); } .aboutMenuContainer { - background-image: url('../../../../../libs/shared-assets/src/lib/assets/banner_dnahelix.jpg'); + background-image: url('../../assets/images/banner_dnahelix.jpg'); } .contactMenuContainer { - background-image: url('../../../../../libs/shared-assets/src/lib/assets/banner_virus.jpg'); + background-image: url('../../assets/images/banner_virus.jpg'); } .workingGroupsMenuContainer { - background-image: url('../../../../../libs/shared-assets/src/lib/assets/banner_working_groups.jpg'); + background-image: url('../../assets/images/banner_working_groups.jpg'); } .helpMenuContainer { - background-image: url('../../../../../libs/shared-assets/src/lib/assets/banner_cells.jpg'); + background-image: url('../../assets/images/banner_cells.jpg'); } .citeMenuContainer { - background-image: url('../../../../../libs/shared-assets/src/lib/assets/banner_virus.jpg'); + background-image: url('../../assets/images/banner_virus.jpg'); } .secondaryNavEmptyRow, .postMenuContainer.secondaryNav { diff --git a/apps/main-app/src/containers/wordpress/test.js b/src/containers/wordpress/test.js similarity index 100% rename from apps/main-app/src/containers/wordpress/test.js rename to src/containers/wordpress/test.js diff --git a/apps/main-app/src/containers/wordpress/wordpressInject.js b/src/containers/wordpress/wordpressInject.js similarity index 91% rename from apps/main-app/src/containers/wordpress/wordpressInject.js rename to src/containers/wordpress/wordpressInject.js index 43f1aa0ff..0408ac828 100644 --- a/apps/main-app/src/containers/wordpress/wordpressInject.js +++ b/src/containers/wordpress/wordpressInject.js @@ -1,6 +1,5 @@ import React from 'react'; import PropTypes from 'prop-types'; -import style from './style.scss'; import ReplaceLinks from './ReplaceLinks'; import usePageLoadingQuery from '../../hooks/usePageLoadingQuery'; import { WORDPRESS_PAGE_BASE_URL } from '../../constants'; @@ -22,7 +21,6 @@ const WordpressInject = ({slug}) => { return null; } - const title = post.title.rendered; return ( ); diff --git a/apps/main-app/src/containers/wordpress/wordpressPage.js b/src/containers/wordpress/wordpressPage.js similarity index 96% rename from apps/main-app/src/containers/wordpress/wordpressPage.js rename to src/containers/wordpress/wordpressPage.js index 1f7cfd4a3..98c0d10d6 100644 --- a/apps/main-app/src/containers/wordpress/wordpressPage.js +++ b/src/containers/wordpress/wordpressPage.js @@ -1,6 +1,6 @@ import React from 'react'; import PropTypes from 'prop-types'; -import style from './style.scss'; +import style from './style.module.scss'; import HeadMetaTags from '../../components/headMetaTags'; import LoadingPage from '../../components/loadingPage'; import SecondaryNav from './secondaryNav'; diff --git a/apps/main-app/src/containers/wordpress/wordpressPost.js b/src/containers/wordpress/wordpressPost.js similarity index 94% rename from apps/main-app/src/containers/wordpress/wordpressPost.js rename to src/containers/wordpress/wordpressPost.js index abd11f1b8..ec2acaf50 100644 --- a/apps/main-app/src/containers/wordpress/wordpressPost.js +++ b/src/containers/wordpress/wordpressPost.js @@ -1,6 +1,7 @@ +/* eslint-disable jsx-a11y/alt-text */ import React from 'react'; import PropTypes from 'prop-types'; -import style from './style.scss'; +import style from './style.module.scss'; import HeadMetaTags from '../../components/headMetaTags'; import LoadingPage from '../../components/loadingPage'; import SecondaryNav from './secondaryNav'; diff --git a/apps/main-app/src/containers/wordpress/wordpressPostList.js b/src/containers/wordpress/wordpressPostList.js similarity index 93% rename from apps/main-app/src/containers/wordpress/wordpressPostList.js rename to src/containers/wordpress/wordpressPostList.js index 0f0a23d6a..14d0db542 100644 --- a/apps/main-app/src/containers/wordpress/wordpressPostList.js +++ b/src/containers/wordpress/wordpressPostList.js @@ -1,6 +1,6 @@ import React from 'react'; import { Link } from 'react-router-dom'; -import style from './style.scss'; +import style from './style.module.scss'; import SecondaryNav from './secondaryNav'; import HeadMetaTags from '../../components/headMetaTags'; import TwitterFeed from '../../components/TwitterFeed'; @@ -26,7 +26,7 @@ const WordpressPostList = () => { {isLoading && } { postList && postList.map(post => { - if (post.status !== 'publish') { return; } + if (post.status !== 'publish') { return null; } const link = `/news/${post.slug}`; return (
    diff --git a/apps/main-app/src/environments/environment.js b/src/environments/environment.js similarity index 100% rename from apps/main-app/src/environments/environment.js rename to src/environments/environment.js diff --git a/apps/main-app/src/environments/environment.prod.js b/src/environments/environment.prod.js similarity index 100% rename from apps/main-app/src/environments/environment.prod.js rename to src/environments/environment.prod.js diff --git a/apps/main-app/src/favicon.ico b/src/favicon.ico similarity index 100% rename from apps/main-app/src/favicon.ico rename to src/favicon.ico diff --git a/apps/main-app/src/hooks/ReleaseContextProvider.js b/src/hooks/ReleaseContextProvider.js similarity index 100% rename from apps/main-app/src/hooks/ReleaseContextProvider.js rename to src/hooks/ReleaseContextProvider.js diff --git a/apps/main-app/src/hooks/useAllVariants.js b/src/hooks/useAllVariants.js similarity index 100% rename from apps/main-app/src/hooks/useAllVariants.js rename to src/hooks/useAllVariants.js diff --git a/apps/main-app/src/hooks/useAlleleVariants.js b/src/hooks/useAlleleVariants.js similarity index 100% rename from apps/main-app/src/hooks/useAlleleVariants.js rename to src/hooks/useAlleleVariants.js diff --git a/apps/main-app/src/hooks/useComparisonRibbonQuery.js b/src/hooks/useComparisonRibbonQuery.js similarity index 100% rename from apps/main-app/src/hooks/useComparisonRibbonQuery.js rename to src/hooks/useComparisonRibbonQuery.js diff --git a/apps/main-app/src/hooks/useComparisonRibbonTableQuery.js b/src/hooks/useComparisonRibbonTableQuery.js similarity index 100% rename from apps/main-app/src/hooks/useComparisonRibbonTableQuery.js rename to src/hooks/useComparisonRibbonTableQuery.js diff --git a/apps/main-app/src/hooks/useDataTableQuery.js b/src/hooks/useDataTableQuery.js similarity index 100% rename from apps/main-app/src/hooks/useDataTableQuery.js rename to src/hooks/useDataTableQuery.js diff --git a/apps/main-app/src/hooks/useEventListener.js b/src/hooks/useEventListener.js similarity index 87% rename from apps/main-app/src/hooks/useEventListener.js rename to src/hooks/useEventListener.js index a3664023c..b313466db 100644 --- a/apps/main-app/src/hooks/useEventListener.js +++ b/src/hooks/useEventListener.js @@ -1,3 +1,4 @@ +/* eslint-disable react-hooks/exhaustive-deps */ import { useEffect } from 'react'; export default function useEventListener(ref, type, listener) { diff --git a/apps/main-app/src/hooks/useGeneOrthology.js b/src/hooks/useGeneOrthology.js similarity index 100% rename from apps/main-app/src/hooks/useGeneOrthology.js rename to src/hooks/useGeneOrthology.js diff --git a/apps/main-app/src/hooks/useGeneParalogy.js b/src/hooks/useGeneParalogy.js similarity index 100% rename from apps/main-app/src/hooks/useGeneParalogy.js rename to src/hooks/useGeneParalogy.js diff --git a/apps/main-app/src/hooks/usePageLoadingQuery.js b/src/hooks/usePageLoadingQuery.js similarity index 100% rename from apps/main-app/src/hooks/usePageLoadingQuery.js rename to src/hooks/usePageLoadingQuery.js diff --git a/apps/main-app/src/hooks/useResettableState.js b/src/hooks/useResettableState.js similarity index 100% rename from apps/main-app/src/hooks/useResettableState.js rename to src/hooks/useResettableState.js diff --git a/apps/main-app/src/main.js b/src/index.js similarity index 99% rename from apps/main-app/src/main.js rename to src/index.js index 24ddd78a6..63c493ee6 100644 --- a/apps/main-app/src/main.js +++ b/src/index.js @@ -39,4 +39,4 @@ applyPolyfills2().then(() => { applyPolyfills3().then(() => { defineCustomElements3(window); -}); \ No newline at end of file +}); diff --git a/apps/main-app/src/lib/__mocks__/fetchData.js b/src/lib/__mocks__/fetchData.js similarity index 100% rename from apps/main-app/src/lib/__mocks__/fetchData.js rename to src/lib/__mocks__/fetchData.js diff --git a/apps/main-app/src/lib/analytics.js b/src/lib/analytics.js similarity index 58% rename from apps/main-app/src/lib/analytics.js rename to src/lib/analytics.js index ae5203b39..f33fc83be 100644 --- a/apps/main-app/src/lib/analytics.js +++ b/src/lib/analytics.js @@ -1,35 +1,22 @@ -import ReactGA from 'react-ga'; import { default as ReactGA4 } from 'react-ga4'; -import { GA_PROPERTY_ID_UA, GA_PROPERTY_ID_GA4, GA_EVENT_CATEGORY, GA_EVENT_ACTION } from '../constants'; +import { GA_PROPERTY_ID_GA4, GA_EVENT_CATEGORY, GA_EVENT_ACTION } from '../constants'; export const initialize = () => { if (process.env.NODE_ENV === 'production') { - ReactGA.initialize(GA_PROPERTY_ID_UA); ReactGA4.initialize(GA_PROPERTY_ID_GA4); } }; export const autocompleteSearchEvent = (query) => { - ReactGA.event({ - category: GA_EVENT_CATEGORY.AUTOCOMPLETE, - action: GA_EVENT_ACTION.GO_TO_SEARCH_RESULTS, - label: query - }); ReactGA4.event({ category: GA_EVENT_CATEGORY.AUTOCOMPLETE, action: GA_EVENT_ACTION.GO_TO_SEARCH_RESULTS, label: query }); - }; export const autocompleteGoToPageEvent = (id) => { - ReactGA.event({ - category: GA_EVENT_CATEGORY.AUTOCOMPLETE, - action: GA_EVENT_ACTION.GO_TO_PAGE, - label: id - }); ReactGA4.event({ category: GA_EVENT_CATEGORY.AUTOCOMPLETE, action: GA_EVENT_ACTION.GO_TO_PAGE, @@ -39,16 +26,10 @@ export const autocompleteGoToPageEvent = (id) => { export const logPageView = (location) => { const page = location.pathname + location.search; - ReactGA.send({ hitType: "pageview", page: page }); ReactGA4.send({ hitType: "pageview", page: page }); }; export const logTablePageEvent = (page) => { - ReactGA.event({ - category: GA_EVENT_CATEGORY.TABLE, - action: GA_EVENT_ACTION.GO_TO_PAGE, - label: page - }); ReactGA4.event({ category: GA_EVENT_CATEGORY.TABLE, action: GA_EVENT_ACTION.GO_TO_PAGE, @@ -57,11 +38,6 @@ export const logTablePageEvent = (page) => { }; export const logTableSizeEvent = (size) => { - ReactGA.event({ - category: GA_EVENT_CATEGORY.TABLE, - action: GA_EVENT_ACTION.SET_PAGE_SIZE, - label: size.toString() - }); ReactGA4.event({ category: GA_EVENT_CATEGORY.TABLE, action: GA_EVENT_ACTION.SET_PAGE_SIZE, diff --git a/apps/main-app/src/lib/configureStore.js b/src/lib/configureStore.js similarity index 100% rename from apps/main-app/src/lib/configureStore.js rename to src/lib/configureStore.js diff --git a/apps/main-app/src/lib/fetchData.js b/src/lib/fetchData.js similarity index 100% rename from apps/main-app/src/lib/fetchData.js rename to src/lib/fetchData.js diff --git a/apps/main-app/src/lib/fetchWordpress.js b/src/lib/fetchWordpress.js similarity index 100% rename from apps/main-app/src/lib/fetchWordpress.js rename to src/lib/fetchWordpress.js diff --git a/apps/main-app/src/lib/genomeFeatureTypes.js b/src/lib/genomeFeatureTypes.js similarity index 100% rename from apps/main-app/src/lib/genomeFeatureTypes.js rename to src/lib/genomeFeatureTypes.js diff --git a/apps/main-app/src/lib/searchHelpers.js b/src/lib/searchHelpers.js similarity index 98% rename from apps/main-app/src/lib/searchHelpers.js rename to src/lib/searchHelpers.js index 00582ce59..a235cd5f8 100644 --- a/apps/main-app/src/lib/searchHelpers.js +++ b/src/lib/searchHelpers.js @@ -189,6 +189,8 @@ export const getURLForEntry = (category, id, alterationType) => { return `/variant/${id}`; } return `/allele/${id}`; + default: + return ""; } }; @@ -231,6 +233,7 @@ export function markAsExcluded(queryObject, value){ let newValue = '-' + value.name; + // eslint-disable-next-line array-callback-return qKeys.find(key =>{ if(Array.isArray(qp[key])){ if(qp[key].find(item => item === value.name)){ diff --git a/apps/main-app/src/lib/tests/store.test.js b/src/lib/tests/store.test.js similarity index 100% rename from apps/main-app/src/lib/tests/store.test.js rename to src/lib/tests/store.test.js diff --git a/apps/main-app/src/lib/tests/utils.test.js b/src/lib/tests/utils.test.js similarity index 100% rename from apps/main-app/src/lib/tests/utils.test.js rename to src/lib/tests/utils.test.js diff --git a/apps/main-app/src/lib/types.js b/src/lib/types.js similarity index 100% rename from apps/main-app/src/lib/types.js rename to src/lib/types.js diff --git a/apps/main-app/src/lib/utils.js b/src/lib/utils.js similarity index 100% rename from apps/main-app/src/lib/utils.js rename to src/lib/utils.js diff --git a/apps/main-app/src/polyfills.js b/src/polyfills.js similarity index 100% rename from apps/main-app/src/polyfills.js rename to src/polyfills.js diff --git a/apps/main-app/src/public/index.html b/src/public/index.html similarity index 100% rename from apps/main-app/src/public/index.html rename to src/public/index.html diff --git a/apps/main-app/src/public/logo.png b/src/public/logo.png similarity index 100% rename from apps/main-app/src/public/logo.png rename to src/public/logo.png diff --git a/apps/main-app/src/reactApplication.js b/src/reactApplication.js similarity index 99% rename from apps/main-app/src/reactApplication.js rename to src/reactApplication.js index b9e0a50ee..427f8d12a 100644 --- a/apps/main-app/src/reactApplication.js +++ b/src/reactApplication.js @@ -54,3 +54,4 @@ ReactApp.propTypes = { }; export default ReactApp; + diff --git a/apps/main-app/src/reducers/fixtures.js b/src/reducers/fixtures.js similarity index 100% rename from apps/main-app/src/reducers/fixtures.js rename to src/reducers/fixtures.js diff --git a/apps/main-app/src/reducers/index.js b/src/reducers/index.js similarity index 72% rename from apps/main-app/src/reducers/index.js rename to src/reducers/index.js index bc7ab621f..bc699203d 100644 --- a/apps/main-app/src/reducers/index.js +++ b/src/reducers/index.js @@ -1,6 +1,7 @@ import searchReducer from './searchReducer'; import loadingReducer from './loadingReducer'; +// eslint-disable-next-line import/no-anonymous-default-export export default { search: searchReducer, loading: loadingReducer, diff --git a/apps/main-app/src/reducers/loadingReducer.js b/src/reducers/loadingReducer.js similarity index 100% rename from apps/main-app/src/reducers/loadingReducer.js rename to src/reducers/loadingReducer.js diff --git a/apps/main-app/src/reducers/searchParsers.js b/src/reducers/searchParsers.js similarity index 100% rename from apps/main-app/src/reducers/searchParsers.js rename to src/reducers/searchParsers.js index 5633967f1..05026e2bf 100644 --- a/apps/main-app/src/reducers/searchParsers.js +++ b/src/reducers/searchParsers.js @@ -1,5 +1,3 @@ -const JOIN_HIGHLIGHT_BY = '...'; - import { makeFieldDisplayName, makeValueDisplayName @@ -10,6 +8,8 @@ import { NON_HIGHLIGHTED_FIELDS } from '../constants'; +const JOIN_HIGHLIGHT_BY = '...'; + function flattenWithPrettyFieldNames(highlights, category='') { if (highlights === undefined) { return highlights; diff --git a/apps/main-app/src/reducers/searchReducer.js b/src/reducers/searchReducer.js similarity index 100% rename from apps/main-app/src/reducers/searchReducer.js rename to src/reducers/searchReducer.js diff --git a/apps/main-app/src/routes.js b/src/routes.js similarity index 100% rename from apps/main-app/src/routes.js rename to src/routes.js diff --git a/apps/main-app/src/selectors/loadingSelector.js b/src/selectors/loadingSelector.js similarity index 100% rename from apps/main-app/src/selectors/loadingSelector.js rename to src/selectors/loadingSelector.js diff --git a/apps/main-app/src/selectors/searchSelectors.js b/src/selectors/searchSelectors.js similarity index 100% rename from apps/main-app/src/selectors/searchSelectors.js rename to src/selectors/searchSelectors.js diff --git a/apps/main-app/src/selectors/tests/searchSelectors.test.js b/src/selectors/tests/searchSelectors.test.js similarity index 100% rename from apps/main-app/src/selectors/tests/searchSelectors.test.js rename to src/selectors/tests/searchSelectors.test.js diff --git a/src/setupProxy.js b/src/setupProxy.js new file mode 100644 index 000000000..29bf15583 --- /dev/null +++ b/src/setupProxy.js @@ -0,0 +1,40 @@ +const { createProxyMiddleware } = require('http-proxy-middleware'); + +module.exports = function(app) { + app.use( + '/api', + createProxyMiddleware({ + target: process.env.API_URL || 'http://localhost:8080', + changeOrigin: true, + }) + ); + + app.use( + '/jbrowse', + createProxyMiddleware({ + target: process.env.API_URL || 'http://localhost:8080', + changeOrigin: true, + }) + ); + app.use( + '/bluegenes', + createProxyMiddleware({ + target: process.env.API_URL || 'http://localhost:8080', + changeOrigin: true, + }) + ); + app.use( + '/swagger-ui', + createProxyMiddleware({ + target: process.env.API_URL || 'http://localhost:8080', + changeOrigin: true, + }) + ); + app.use( + '/openapi', + createProxyMiddleware({ + target: process.env.API_URL || 'http://localhost:8080', + changeOrigin: true, + }) + ); +}; diff --git a/apps/main-app/src/style.scss b/src/style.scss similarity index 97% rename from apps/main-app/src/style.scss rename to src/style.scss index 24d67b8ec..bb549479e 100644 --- a/apps/main-app/src/style.scss +++ b/src/style.scss @@ -1,5 +1,5 @@ -@import "theme"; -@import "mixins"; +@import "theme.module"; +@import "mixins.module"; @import "~bootstrap/scss/bootstrap"; .react-bootstrap-table table, .table { diff --git a/apps/main-app/src/tests/application.test.js b/src/tests/application.test.js similarity index 100% rename from apps/main-app/src/tests/application.test.js rename to src/tests/application.test.js diff --git a/tailwind.config.js b/tailwind.config.js deleted file mode 100644 index 4ab797050..000000000 --- a/tailwind.config.js +++ /dev/null @@ -1,10 +0,0 @@ -module.exports = { - theme: { - extend: { - colors: { - primary: 'var(--mod-primary)', - }, - }, - }, - plugins: [], -}; diff --git a/tools/generators/.gitkeep b/tools/generators/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/tools/tsconfig.tools.json b/tools/tsconfig.tools.json deleted file mode 100644 index 99428e147..000000000 --- a/tools/tsconfig.tools.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "../tsconfig.base.json", - "compilerOptions": { - "outDir": "../dist/out-tsc/tools", - "rootDir": ".", - "module": "commonjs", - "target": "es5", - "types": ["node"], - "importHelpers": false - }, - "include": ["**/*.ts"] -} diff --git a/tsconfig.base.json b/tsconfig.base.json deleted file mode 100644 index b58b43b5c..000000000 --- a/tsconfig.base.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "compileOnSave": false, - "compilerOptions": { - "rootDir": ".", - "sourceMap": true, - "declaration": false, - "moduleResolution": "node", - "emitDecoratorMetadata": true, - "experimentalDecorators": true, - "importHelpers": true, - "target": "es2015", - "module": "esnext", - "lib": ["es2017", "dom"], - "skipLibCheck": true, - "skipDefaultLibCheck": true, - "baseUrl": ".", - "paths": { - "@alliancegenome/app-shell": ["libs/app-shell/src/index.js"], - "@alliancegenome/shared-assets": ["libs/shared-assets/src/index.js"] - } - }, - "exclude": ["node_modules", "tmp"] -} diff --git a/tsconfig.json b/tsconfig.json deleted file mode 100644 index f26d10908..000000000 --- a/tsconfig.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "compilerOptions": { - "target": "ES2018", - "module": "commonjs", - "lib": ["es2018", "ESNext.AsyncIterable"], - "allowJs": true, - "checkJs": true, - "removeComments": true, - "resolveJsonModule": true, - "declaration": true, - "strict": true, - "noImplicitAny": true, - "strictNullChecks": true, - "strictPropertyInitialization": true, - "noImplicitThis": true, - "alwaysStrict": true, - "noUnusedLocals": false, - "noUnusedParameters": false, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "inlineSourceMap": true, - "inlineSources": true, - "skipLibCheck": true, - "forceConsistentCasingInFileNames": true, - "experimentalDecorators": true, - "typeRoots": ["./node_modules/@types"], - "isolatedModules": true - }, - "exclude": ["node_modules", "**/node_modules/*", "cdk.out"] -} diff --git a/workspace.json b/workspace.json deleted file mode 100644 index 8141480ae..000000000 --- a/workspace.json +++ /dev/null @@ -1,253 +0,0 @@ -{ - "version": 2, - "cli": { - "defaultCollection": "@nrwl/react" - }, - "defaultProject": "main-app", - "generators": { - "@nrwl/react": { - "application": { - "style": "scss", - "linter": "eslint", - "babel": true - }, - "component": { - "style": "scss" - }, - "library": { - "style": "scss", - "linter": "eslint" - } - }, - "@nrwl/next": { - "application": { - "style": "@emotion/styled", - "linter": "eslint" - } - } - }, - "projects": { - "app-shell": { - "root": "libs/app-shell", - "sourceRoot": "libs/app-shell/src", - "projectType": "library", - "targets": { - "lint": { - "executor": "@nrwl/linter:eslint", - "options": { - "lintFilePatterns": ["libs/app-shell/**/*.{ts,tsx,js,jsx}"] - } - }, - "build": { - "executor": "@nrwl/web:package", - "outputs": ["{options.outputPath}"], - "options": { - "outputPath": "dist/libs/app-shell", - "tsConfig": "libs/app-shell/tsconfig.lib.json", - "project": "libs/app-shell/package.json", - "entryFile": "libs/app-shell/src/index.js", - "external": [ - "react", - "react-dom", - "@emotion/styled", - "@emotion/react" - ], - "babelConfig": "@nrwl/react/plugins/bundle-babel", - "rollupConfig": "libs/app-shell/rollup.config.js", - "assets": [ - { - "glob": "README.md", - "input": ".", - "output": "." - } - ] - } - }, - "test": { - "executor": "@nrwl/jest:jest", - "outputs": ["coverage/libs/app-shell"], - "options": { - "jestConfig": "libs/app-shell/jest.config.js", - "passWithNoTests": true - } - }, - "storybook": { - "executor": "@nrwl/storybook:storybook", - "options": { - "uiFramework": "@storybook/react", - "port": 4400, - "config": { - "configFolder": "libs/app-shell/.storybook" - } - }, - "configurations": { - "ci": { - "quiet": true - } - } - }, - "build-storybook": { - "executor": "@nrwl/storybook:build", - "outputs": ["{options.outputPath}"], - "options": { - "uiFramework": "@storybook/react", - "outputPath": "dist/storybook/app-shell", - "config": { - "configFolder": "libs/app-shell/.storybook" - } - }, - "configurations": { - "ci": { - "quiet": true - } - } - } - } - }, - "main-app": { - "root": "apps/main-app", - "sourceRoot": "apps/main-app/src", - "projectType": "application", - "targets": { - "build": { - "executor": "@nrwl/web:build", - "outputs": ["{options.outputPath}"], - "options": { - "outputPath": "dist/apps/main-app", - "index": "apps/main-app/src/public/index.html", - "main": "apps/main-app/src/main.js", - "polyfills": "apps/main-app/src/polyfills.js", - "tsConfig": "apps/main-app/tsconfig.app.json", - "assets": ["apps/main-app/src/assets"], - "styles": [], - "scripts": [], - "webpackConfig": "apps/main-app/webpack.config.babel.js" - }, - "configurations": { - "production": { - "fileReplacements": [ - { - "replace": "apps/main-app/src/environments/environment.js", - "with": "apps/main-app/src/environments/environment.prod.js" - } - ], - "optimization": true, - "outputHashing": "all", - "sourceMap": false, - "extractCss": false, - "namedChunks": false, - "extractLicenses": true, - "vendorChunk": false, - "budgets": [ - { - "type": "initial", - "maximumWarning": "6mb", - "maximumError": "10mb" - } - ] - } - } - }, - "serve": { - "executor": "@nrwl/web:dev-server", - "options": { - "buildTarget": "main-app:build", - "port": 2992 - }, - "configurations": { - "production": { - "buildTarget": "main-app:build:production" - } - } - }, - "lint": { - "executor": "@nrwl/linter:eslint", - "options": { - "lintFilePatterns": ["apps/main-app/**/*.{ts,tsx,js,jsx}"] - } - }, - "test": { - "executor": "@nrwl/jest:jest", - "outputs": ["coverage/apps/main-app"], - "options": { - "jestConfig": "apps/main-app/jest.config.js", - "passWithNoTests": true - } - } - } - }, - "shared-assets": { - "root": "libs/shared-assets", - "sourceRoot": "libs/shared-assets/src", - "projectType": "library", - "targets": { - "build": { - "executor": "@nrwl/web:package", - "outputs": ["{options.outputPath}"], - "options": { - "outputPath": "dist/libs/shared-assets", - "tsConfig": "libs/shared-assets/tsconfig.lib.json", - "project": "libs/shared-assets/package.json", - "entryFile": "libs/shared-assets/src/index.js", - "external": ["react", "react-dom"], - "babelConfig": "@nrwl/react/plugins/bundle-babel", - "rollupConfig": "@nrwl/react/plugins/bundle-rollup", - "assets": [ - { - "glob": "README.md", - "input": ".", - "output": "." - }, - "libs/shared-assets/src/lib/assets" - ] - } - }, - "lint": { - "executor": "@nrwl/linter:eslint", - "options": { - "lintFilePatterns": ["libs/shared-assets/**/*.{ts,tsx,js,jsx}"] - } - }, - "test": { - "executor": "@nrwl/jest:jest", - "outputs": ["coverage/libs/shared-assets"], - "options": { - "jestConfig": "libs/shared-assets/jest.config.js", - "passWithNoTests": true - } - }, - "storybook": { - "executor": "@nrwl/storybook:storybook", - "options": { - "uiFramework": "@storybook/react", - "port": 4400, - "config": { - "configFolder": "libs/shared-assets/.storybook" - } - }, - "configurations": { - "ci": { - "quiet": true - } - } - }, - "build-storybook": { - "executor": "@nrwl/storybook:build", - "outputs": ["{options.outputPath}"], - "options": { - "uiFramework": "@storybook/react", - "outputPath": "dist/storybook/shared-assets", - "config": { - "configFolder": "libs/shared-assets/.storybook" - } - }, - "configurations": { - "ci": { - "quiet": true - } - } - } - } - } - } -}