Skip to content

Commit

Permalink
Merge branch '416-update-dependencies' into 'master'
Browse files Browse the repository at this point in the history
internal: Update dependencies

See merge request TIBHannover/orkg/orkg-frontend!980
  • Loading branch information
aoelen committed Nov 25, 2022
2 parents c5f816c + 0666ada commit 2838900
Show file tree
Hide file tree
Showing 44 changed files with 3,347 additions and 2,728 deletions.
2,942 changes: 1,956 additions & 986 deletions package-lock.json

Large diffs are not rendered by default.

88 changes: 43 additions & 45 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,109 +8,106 @@
"@citation-js/plugin-bibtex": "^0.6.1",
"@citation-js/plugin-csl": "^0.6.4",
"@citation-js/plugin-doi": "^0.6.1",
"@fortawesome/fontawesome-svg-core": "^6.1.2",
"@fortawesome/free-brands-svg-icons": "^6.1.2",
"@fortawesome/free-regular-svg-icons": "^6.1.2",
"@fortawesome/free-solid-svg-icons": "^6.1.2",
"@fortawesome/fontawesome-svg-core": "^6.2.0",
"@fortawesome/free-brands-svg-icons": "^6.2.0",
"@fortawesome/free-regular-svg-icons": "^6.2.0",
"@fortawesome/free-solid-svg-icons": "^6.2.0",
"@fortawesome/react-fontawesome": "^0.2.0",
"@handsontable/react": "^11.0.1",
"@jonkoops/matomo-tracker-react": "^0.7.0",
"@reduxjs/toolkit": "^1.8.3",
"@reduxjs/toolkit": "^1.9.0",
"@tippyjs/react": "^4.2.6",
"@trainiac/html2canvas": "^1.0.0",
"@webscopeio/react-textarea-autocomplete": "^4.9.1",
"@webscopeio/react-textarea-autocomplete": "^4.9.2",
"@xobotyi/scrollbar-width": "^1.9.5",
"array-move": "^3.0.1",
"bootstrap": "^5.2.0",
"bootstrap": "^5.2.2",
"capitalize": "^2.0.4",
"classnames": "^2.3.1",
"classnames": "^2.3.2",
"d3": "^3.5.6",
"detect-browser": "^5.3.0",
"dompurify": "^2.3.10",
"dompurify": "^2.4.1",
"dot-prop-immutable": "^2.1.1",
"fast-text-encoding": "^1.0.4",
"fast-text-encoding": "^1.0.6",
"greeting-time": "^1.0.0",
"handsontable": "^11.0.1",
"he": "^1.2.0",
"immutability-helper": "^3.0.2",
"indefinite": "^2.4.1",
"indefinite": "^2.4.2",
"intro.js": "^6.0.0",
"intro.js-react": "^0.7.0",
"joi": "^17.6.0",
"joi": "^17.7.0",
"jspdf": "^2.5.1",
"lodash": "^4.17.21",
"make-latex": "^0.1.0",
"marked": "^4.0.18",
"marked": "^4.2.2",
"moment": "^2.29.4",
"named-urls": "^2.0.0",
"node-html-parser": "^5.3.3",
"node-html-parser": "^6.1.3",
"olap-cube": "^1.0.0",
"path-to-regexp": "^6.2.1",
"pdfjs-dist": "^2.11.338",
"pluralize": "^8.0.0",
"prop-types": "^15.8.1",
"query-string": "^7.1.1",
"querystring": "^0.2.1",
"randomcolor": "^0.6.2",
"rangy": "^1.3.0",
"rc-tabs": "^11.16.1",
"rdf": "^4.1.0",
"rangy": "^1.3.1",
"rc-tabs": "^12.3.0",
"rdf": "^4.1.1",
"react": "^18.2.0",
"react-app-polyfill": "^3.0.0",
"react-content-loader": "^6.2.0",
"react-contexify": "^5.0.0",
"react-contexify": "^6.0.0",
"react-cookie": "^4.1.1",
"react-copy-to-clipboard": "^5.1.0",
"react-countup": "^6.3.0",
"react-countup": "^6.3.2",
"react-csv": "^2.2.2",
"react-csv-reader": "^3.5.0",
"react-diff-viewer": "^3.1.1",
"react-dnd": "^14.0.3",
"react-dnd-html5-backend": "^14.0.1",
"react-dnd": "^16.0.1",
"react-dnd-html5-backend": "^16.0.1",
"react-dom": "^18.2.0",
"react-dotdotdot": "^1.3.1",
"react-dropzone": "^14.2.2",
"react-dropzone": "^14.2.3",
"react-flip-move": "^3.0.4",
"react-flow-renderer": "^10.3.14",
"react-google-charts": "^4.0.0",
"react-gravatar": "^2.6.3",
"react-helmet": "^6.1.0",
"react-image-lightbox": "^5.1.4",
"react-loading-overlay": "^1.0.1",
"react-mathjax-preview": "^2.2.6",
"react-native-listener": "^1.1.0",
"react-papaparse": "^4.0.2",
"react-papaparse": "^4.1.0",
"react-pdf-highlighter": "^5.4.0",
"react-range": "^1.8.14",
"react-redux": "^8.0.2",
"react-redux": "^8.0.5",
"react-responsive-tabs": "^4.4.3",
"react-router-dom": "^6.3.0",
"react-scroll-sync": "^0.11.0",
"react-select": "^5.4.0",
"react-select-async-paginate": "^0.6.2",
"react-select": "^5.6.0",
"react-select-async-paginate": "^0.7.0",
"react-slick": "^0.29.0",
"react-sortable-hoc": "^2.0.0",
"react-string-replace": "^1.1.0",
"react-table": "^7.8.0",
"react-table-sticky": "^1.1.3",
"react-textarea-autosize": "^8.3.4",
"react-toastify": "^9.0.7",
"react-textarea-autosize": "^8.4.0",
"react-toastify": "^9.1.1",
"react-transition-group": "^4.4.5",
"react-twitter-widgets": "^1.11.0",
"react-use": "^17.4.0",
"react-visibility-sensor": "^5.1.1",
"reactstrap": "^9.1.2",
"reactflow": "^11.2.0",
"reactstrap": "^9.1.5",
"redux": "^4.2.0",
"redux-first-history": "^5.0.12",
"redux-first-history": "^5.1.1",
"sbd": "^1.0.19",
"showdown": "^2.1.0",
"showdown-footnotes": "^2.1.2",
"slugify": "^1.6.5",
"source-map-explorer": "^2.5.2",
"stopwords-en": "^0.3.0",
"strict-mode": "^1.1.5",
"string-format": "^2.0.0",
"styled-components": "^5.3.5",
"styled-components": "^5.3.6",
"typed.js": "^2.0.12",
"use-resize-observer": "^9.0.2"
},
Expand All @@ -130,26 +127,27 @@
"prepare": "husky install"
},
"devDependencies": {
"@babel/preset-env": "^7.18.10",
"@babel/preset-env": "^7.20.2",
"@beam-australia/react-env": "^3.1.1",
"@testing-library/jest-dom": "^5.16.4",
"@testing-library/react": "^13.3.0",
"@testing-library/user-event": "^14.4.1",
"@faker-js/faker": "^7.6.0",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^14.4.3",
"auto-changelog": "^2.4.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-jsx-a11y": "^6.6.1",
"eslint-plugin-prettier": "^4.2.1",
"faker": "^5.5.3",
"husky": "^8.0.1",
"husky": "^8.0.2",
"jest-canvas-mock": "^2.4.0",
"jest-junit": "^14.0.0",
"jest-junit": "^14.0.1",
"lint-staged": "^13.0.3",
"msw": "^0.44.2",
"msw": "^0.48.2",
"prettier": "^2.7.1",
"react-scripts": "5.0.1",
"react-select-event": "^5.5.0",
"sass": "^1.54.1"
"react-select-event": "^5.5.1",
"sass": "^1.56.1",
"source-map-explorer": "^2.5.3"
},
"jest-junit": {
"classNameTemplate": "{classname}",
Expand Down
9 changes: 4 additions & 5 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
https://cdn.syndication.twimg.com
https://cdnjs.cloudflare.com
https://app.chatwoot.com
https://unpkg.com/[email protected]/build/pdf.worker.min.js
;
style-src 'self' 'unsafe-inline'
https://orkg.org
Expand Down Expand Up @@ -95,9 +96,7 @@
<meta property="og:image" content="%PUBLIC_URL%/og_image.png" />
</head>
<body>
<noscript>
You need to enable JavaScript to run this app.
</noscript>
<noscript> You need to enable JavaScript to run this app. </noscript>
<div id="root"></div>
<!--
This HTML file is a template.
Expand All @@ -114,13 +113,13 @@
if (window.__ENV) {
const chatwoot_token = window.__ENV.REACT_APP_CHATWOOT_WEBSITE_TOKEN;
if (chatwoot_token && !chatwoot_token.includes('REACT_APP_CHATWOOT_WEBSITE_TOKEN')) {
(function(d, t) {
(function (d, t) {
var BASE_URL = 'https://app.chatwoot.com';
var g = d.createElement(t),
s = d.getElementsByTagName(t)[0];
g.src = BASE_URL + '/packs/js/sdk.js';
s.parentNode.insertBefore(g, s);
g.onload = function() {
g.onload = function () {
window.chatwootSDK.run({
websiteToken: chatwoot_token,
baseUrl: BASE_URL,
Expand Down
5 changes: 5 additions & 0 deletions src/App.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ jest.mock(
null,
);

jest.mock('react-dnd', () => ({
useDrag: jest.fn().mockImplementation(() => [jest.fn(), jest.fn(), jest.fn()]),
useDrop: jest.fn().mockImplementation(() => [jest.fn(), jest.fn(), jest.fn()]),
}));

window.scrollTo = jest.fn();

const setup = () => {
Expand Down
8 changes: 7 additions & 1 deletion src/assets/scss/DefaultLayout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
@import '~bootstrap/scss/mixins';

body {

color: #646464;
overflow-y: scroll; // always show scrollbars to prevent moving elements when scrollbars become visible
}
Expand Down Expand Up @@ -32,4 +33,9 @@ body {
}
.introjs-ORKG-tooltip{
max-width: 550px !important;
}
}

// react-contexify
.contexify_item:not(.contexify_item-disabled):hover > .contexify_itemContent, .contexify_item:not(.contexify_item-disabled):focus > .contexify_itemContent {
background-color: $primary;
}
49 changes: 33 additions & 16 deletions src/components/AddPaper/BioAssaysModal/BioAssaysModal.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useState } from 'react';
import { Button, Modal, ModalHeader, ModalBody, ModalFooter, Label, FormGroup, FormFeedback, Input } from 'reactstrap';
import { Button, Modal, ModalHeader, ModalBody, ModalFooter, Label, FormGroup, FormFeedback, Input, InputGroup } from 'reactstrap';
import { semantifyBioassays } from 'services/orkgNlp/index';
import CsvReader from 'react-csv-reader';
import { useCSVReader } from 'react-papaparse';
import PropTypes from 'prop-types';
import { toast } from 'react-toastify';
import { FontAwesomeIcon as Icon } from '@fortawesome/react-fontawesome';
Expand All @@ -16,7 +16,7 @@ const BioAssaysModal = props => {
const resourceId = useSelector(state =>
state.addPaper.contributions.byId[props.selectedResource] ? state.addPaper.contributions.byId[props.selectedResource].resourceId : null,
);

const { CSVReader } = useCSVReader();
const [bioassaysTest, setBioassaysTest] = useState('');
const [isLoadingData, setIsLoadingData] = useState(false);
const [isLoadingDataFailed, setIsLoadingDataFailed] = useState(false);
Expand Down Expand Up @@ -50,7 +50,7 @@ const BioAssaysModal = props => {
setIsLoadingDataFailed(false);
}
})
.catch(e => {
.catch(() => {
setIsSubmitted(false);
setIsLoadingData(false);
setIsLoadingDataFailed(true);
Expand Down Expand Up @@ -109,6 +109,10 @@ const BioAssaysModal = props => {
props.toggle();
};

const PARSER_OPTIONS = {
skipEmptyLines: true,
};

return (
<Modal size="lg" isOpen={props.showDialog} toggle={props.toggle}>
<ModalHeader toggle={props.toggle}>Semantification of Bioassays</ModalHeader>
Expand All @@ -126,19 +130,32 @@ const BioAssaysModal = props => {
<div>
<FormGroup>
<div className="custom-file mb-3">
<CsvReader
cssClass="csv-reader-input"
cssInputClass="form-control"
<CSVReader
accept=".txt"
onFileLoaded={(data, fileInfo) => setBioassaysTest(data.join('\n'))}
parserOptions={{
skipEmptyLines: true,
}}
inputStyle={{ cursor: 'pointer' }}
/>
<label className="custom-file-label" htmlFor="exampleCustomFileBrowser">
Click to upload bioassay .txt file
</label>
config={PARSER_OPTIONS}
onUploadAccepted={result => setBioassaysTest(result.data.join('\n'))}
>
{({ getRootProps, acceptedFile, ProgressBar }) => (
<>
<InputGroup>
<Button {...getRootProps()}>Browse file</Button>
<div
{...getRootProps()}
style={{
border: '1px solid #ccc',
lineHeight: 2.2,
paddingLeft: 10,
flexGrow: '1',
}}
>
{acceptedFile && acceptedFile.name}
{!acceptedFile && 'Click to upload bioassay .txt file'}
</div>
</InputGroup>
<ProgressBar style={{ backgroundColor: '#dbdde5' }} />
</>
)}
</CSVReader>
</div>
<Label for="bioassaysText">Enter the Bioassays</Label>
<Input
Expand Down
40 changes: 19 additions & 21 deletions src/components/AddPaper/Contributions/Contributions.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import ContributionTab from 'components/ContributionTabs/ContributionTab';
import { StyledContributionTabs } from 'components/ContributionTabs/styled';
import StatementBrowser from 'components/StatementBrowser/StatementBrowser';
import Tooltip from 'components/Utils/Tooltip';
import Tabs, { TabPane } from 'rc-tabs';
import Tabs from 'rc-tabs';
import { useEffect, useState } from 'react';
import { useDispatch, useSelector } from 'react-redux';
import BIOASSAYS_FIELDS_LIST from 'constants/bioassayFieldList';
Expand Down Expand Up @@ -234,24 +234,22 @@ const Contributions = () => {
activeKey={selectedContribution}
onChange={onTabChange}
destroyInactiveTabPane={true}
>
{contributions.allIds.map(contributionId => {
items={contributions.allIds.map(contributionId => {
const contribution = contributions.byId[contributionId];
return (
<TabPane
tab={
<ContributionTab
handleChangeContributionLabel={handleChange}
isSelected={contribution.id === selectedContribution}
canDelete={contributions.allIds.length !== 1}
contribution={contribution}
key={contribution.id}
toggleDeleteContribution={toggleDeleteContribution}
enableEdit={true}
/>
}
key={contribution.id}
>
return {
label: (
<ContributionTab
handleChangeContributionLabel={handleChange}
isSelected={contribution.id === selectedContribution}
canDelete={contributions.allIds.length !== 1}
contribution={contribution}
key={contribution.id}
toggleDeleteContribution={toggleDeleteContribution}
enableEdit={true}
/>
),
key: contribution.id,
children: (
<div className="contributionData">
<StatementBrowser
enableEdit={true}
Expand All @@ -262,10 +260,10 @@ const Contributions = () => {
renderTemplateBox={true}
/>
</div>
</TabPane>
);
),
};
})}
</Tabs>
/>
</StyledContributionTabs>
</Col>

Expand Down
Loading

0 comments on commit 2838900

Please sign in to comment.