Skip to content

Commit

Permalink
Merge branch '3.0.0' of https://github.com/CBIIT/crdc-datahub-ui into C…
Browse files Browse the repository at this point in the history
  • Loading branch information
Alejandro-Vega committed Apr 2, 2024
2 parents b5362a8 + 05789f1 commit 5aef14d
Show file tree
Hide file tree
Showing 49 changed files with 1,927 additions and 120 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ module.exports = {
}
},
root: true,
ignorePatterns: ["public/injectEnv.js", "public/js/session.js"],
ignorePatterns: ["public/js/*.js"],
rules: {
"react/jsx-filename-extension": [1, { extensions: [".js", ".jsx", ".tsx", ".ts"] }],
"no-empty-function": "warn",
Expand Down
4 changes: 2 additions & 2 deletions conf/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

WWW_DIR=/usr/share/nginx/html
INJECT_FILE_SRC="${WWW_DIR}/inject.template.js"
INJECT_FILE_DST="${WWW_DIR}/injectEnv.js"
INJECT_FILE_DST="${WWW_DIR}/js/injectEnv.js"
envsubst < "${INJECT_FILE_SRC}" > "${INJECT_FILE_DST}"

[ -z "$@" ] && nginx -g 'daemon off;' || $@
[ -z "$@" ] && nginx -g 'daemon off;' || $@
21 changes: 1 addition & 20 deletions conf/inject.template.js
Original file line number Diff line number Diff line change
@@ -1,30 +1,11 @@
/* eslint-disable */
window.injectedEnv = {
NIH_CLIENT_ID: '${NIH_CLIENT_ID}',
NIH_AUTHORIZE_URL: '${NIH_AUTHORIZE_URL}',
NIH_REDIRECT_URL: '${NIH_REDIRECT_URL}',
REACT_APP_BACKEND_GETUSERINFO_API: '${REACT_APP_BACKEND_GETUSERINFO_API}',
REACT_APP_LOGIN_URL: '${REACT_APP_LOGIN_URL}',
REACT_APP_USER_LOGOUT_URL: '${REACT_APP_USER_LOGOUT_URL}',
REACT_APP_BACKEND_API: '${REACT_APP_BACKEND_API}',
REACT_APP_BE_VERSION: '${REACT_APP_BE_VERSION}',
REACT_APP_FE_VERSION: '${REACT_APP_FE_VERSION}',
REACT_APP_APPLICATION_VERSION: '${REACT_APP_APPLICATION_VERSION}',
REACT_APP_GA_TRACKING_ID: '${REACT_APP_GA_TRACKING_ID}',
REACT_APP_FILE_SERVICE_API: '${REACT_APP_FILE_SERVICE_API}',
REACT_APP_AUTH_API: '${REACT_APP_AUTH_API}',
REACT_APP_GOOGLE_CLIENT_ID: '${REACT_APP_GOOGLE_CLIENT_ID}',
REACT_APP_AUTH_SERVICE_API: '${REACT_APP_AUTH_SERVICE_API}',
REACT_APP_USER_SERVICE_API: '${REACT_APP_USER_SERVICE_API}',
REACT_APP_NIH_CLIENT_ID: '${REACT_APP_NIH_CLIENT_ID}',
REACT_APP_NIH_AUTH_URL: '${REACT_APP_NIH_AUTH_URL}',
REACT_APP_NIH_AUTHORIZE_URL: '${REACT_APP_NIH_AUTHORIZE_URL}',
REACT_APP_NIH_AUTHORIZE_URL: '${NIH_AUTHORIZE_URL}',
REACT_APP_NIH_REDIRECT_URL: '${REACT_APP_NIH_REDIRECT_URL}',
REACT_APP_BACKEND_PUBLIC_API: '${REACT_APP_BACKEND_PUBLIC_API}',
REACT_APP_AUTH: '${REACT_APP_AUTH}',
REACT_APP_DEV_TIER: '${DEV_TIER}',
REACT_APP_UPLOADER_CLI: '${REACT_APP_UPLOADER_CLI}',
PUBLIC_ACCESS: '${PUBLIC_ACCESS}',
NODE_LEVEL_ACCESS:'${NODE_LEVEL_ACCESS}',
NODE_LABEL: '${NODE_LABEL}'
};
90 changes: 74 additions & 16 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@apollo/client": "^3.7.16",
"@apollo/client": "^3.9.8",
"@emotion/react": "^11.11.0",
"@emotion/styled": "^11.11.0",
"@jalik/form-parser": "^3.1.0",
Expand All @@ -19,6 +19,7 @@
"graphql": "^16.7.1",
"lodash": "^4.17.21",
"notistack": "^3.0.1",
"papaparse": "^5.4.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-ga4": "^2.1.0",
Expand Down Expand Up @@ -71,6 +72,7 @@
"@types/jest-axe": "^3.5.9",
"@types/lodash": "^4.14.198",
"@types/node": "^20.4.0",
"@types/papaparse": "^5.3.14",
"@types/react": "^18.2.42",
"@types/react-dom": "^18.2.17",
"@types/recharts": "^1.8.29",
Expand Down
2 changes: 1 addition & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<title>CRDC DataHub</title>
<script src="%PUBLIC_URL%/injectEnv.js"></script>
<script src="%PUBLIC_URL%/js/injectEnv.js"></script>
<script src="%PUBLIC_URL%/js/session.js"></script>
<script src="https://assets.adobedtm.com/6a4249cd0a2c/785de09de161/launch-70d67a6a40a8.min.js" async></script>
</head>
Expand Down
1 change: 1 addition & 0 deletions public/injectEnv.js → public/js/injectEnv.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ window.injectedEnv = {
REACT_APP_UPLOADER_CLI: '',
REACT_APP_GA_TRACKING_ID: '',
REACT_APP_FE_VERSION: '',
REACT_APP_BACKEND_API: '',
};
1 change: 0 additions & 1 deletion src/components/Contexts/AuthContext.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React, { FC } from 'react';
import '@testing-library/jest-dom';
import { GraphQLError } from 'graphql';
import { render, waitFor } from '@testing-library/react';
import { MockedProvider, MockedResponse } from '@apollo/client/testing';
Expand Down
1 change: 0 additions & 1 deletion src/components/Contexts/DataCommonContext.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React, { FC } from 'react';
import '@testing-library/jest-dom';
import { render, waitFor } from '@testing-library/react';
import { useDataCommonContext, Status as DCStatus, DataCommonProvider } from './DataCommonContext';
import { DataCommons } from '../../config/DataCommons';
Expand Down
1 change: 0 additions & 1 deletion src/components/Contexts/FormContext.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React, { FC } from 'react';
import '@testing-library/jest-dom';
import { render, waitFor } from '@testing-library/react';
import { MockedProvider, MockedResponse } from '@apollo/client/testing';
import { GraphQLError } from 'graphql';
Expand Down
2 changes: 0 additions & 2 deletions src/components/DataSubmissions/DataSubmissionSummary.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import "@testing-library/jest-dom";
import "jest-axe/extend-expect";
import { render, fireEvent, waitFor } from "@testing-library/react";
import { act } from 'react-dom/test-utils';
import { BrowserRouter } from "react-router-dom";
Expand Down
Loading

0 comments on commit 5aef14d

Please sign in to comment.