Skip to content

Commit

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

See merge request TIBHannover/orkg/orkg-frontend!898
  • Loading branch information
aoelen committed Aug 8, 2022
2 parents 2300bc7 + f940ec9 commit 3fac933
Showing 46 changed files with 4,838 additions and 4,586 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ ENV NODE_OPTIONS --max-old-space-size=8192
COPY package.json package-lock.json ./

# NOTE: opencollective is not required but leads to warnings if missing
RUN npm install [email protected] opencollective -g
RUN npm install [email protected] opencollective --location=global

# install the dependencies
# replace npm ci beceause of npm v7
5,587 changes: 2,896 additions & 2,691 deletions package-lock.json

Large diffs are not rendered by default.

107 changes: 59 additions & 48 deletions package.json
Original file line number Diff line number Diff line change
@@ -4,29 +4,32 @@
"private": true,
"homepage": "/",
"dependencies": {
"@citation-js/core": "^0.6.1",
"@citation-js/plugin-bibtex": "^0.6.1",
"@citation-js/plugin-csl": "^0.6.4",
"@citation-js/plugin-doi": "^0.6.1",
"@datapunt/matomo-tracker-react": "^0.5.1",
"@fortawesome/fontawesome-svg-core": "^6.1.1",
"@fortawesome/free-brands-svg-icons": "^6.1.1",
"@fortawesome/free-regular-svg-icons": "^6.1.1",
"@fortawesome/free-solid-svg-icons": "^6.1.1",
"@fortawesome/react-fontawesome": "^0.1.18",
"@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/react-fontawesome": "^0.2.0",
"@handsontable/react": "^11.0.1",
"@reduxjs/toolkit": "^1.8.1",
"@reduxjs/toolkit": "^1.8.3",
"@tippyjs/react": "^4.2.6",
"@trainiac/html2canvas": "^1.0.0",
"@webscopeio/react-textarea-autocomplete": "^4.9.1",
"@xobotyi/scrollbar-width": "^1.9.5",
"array-move": "^3.0.1",
"body-scroll-lock": "^3.1.5",
"bootstrap": "^5.1.3",
"bootstrap": "^5.2.0",
"capitalize": "^2.0.4",
"citation-js": "^0.5.7",
"classnames": "^2.3.1",
"d3": "^3.5.6",
"detect-browser": "^5.3.0",
"dompurify": "^2.3.6",
"dompurify": "^2.3.10",
"dot-prop-immutable": "^2.1.1",
"fast-text-encoding": "^1.0.2",
"fast-text-encoding": "^1.0.4",
"greeting-time": "^1.0.0",
"handsontable": "^11.0.1",
"he": "^1.2.0",
@@ -36,36 +39,36 @@
"jspdf": "^2.5.1",
"lodash": "^4.17.21",
"make-latex": "^0.1.0",
"marked": "^4.0.14",
"moment": "^2.29.3",
"marked": "^4.0.18",
"moment": "^2.29.4",
"named-urls": "^2.0.0",
"node-html-parser": "^5.3.3",
"olap-cube": "^1.0.0",
"path-to-regexp": "^6.2.0",
"path-to-regexp": "^6.2.1",
"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.13.0",
"rc-tabs": "^11.16.1",
"rdf": "^4.1.0",
"react": "^17.0.2",
"react": "^18.2.0",
"react-app-polyfill": "^3.0.0",
"react-content-loader": "^6.2.0",
"react-cookie": "^4.1.1",
"react-copy-to-clipboard": "^5.1.0",
"react-countup": "^6.2.0",
"react-countup": "^6.3.0",
"react-csv": "^2.2.2",
"react-csv-reader": "^3.5.0",
"react-diff-viewer": "^3.1.1",
"react-dnd": "^14.0.4",
"react-dnd-html5-backend": "^14.0.2",
"react-dom": "^17.0.2",
"react-dnd": "^14.0.3",
"react-dnd-html5-backend": "^14.0.1",
"react-dom": "^18.2.0",
"react-dotdotdot": "^1.3.1",
"react-dropzone": "^12.1.0",
"react-dropzone": "^14.2.2",
"react-flip-move": "^3.0.4",
"react-google-charts": "^3.0.15",
"react-google-charts": "^4.0.0",
"react-gravatar": "^2.6.3",
"react-helmet": "^6.1.0",
"react-image-lightbox": "^5.1.4",
@@ -74,28 +77,28 @@
"react-native-listener": "^1.1.0",
"react-papaparse": "^4.0.2",
"react-pdf-highlighter": "^5.4.0",
"react-range": "^1.8.12",
"react-redux": "^8.0.1",
"react-range": "^1.8.14",
"react-redux": "^8.0.2",
"react-responsive-tabs": "^4.4.3",
"react-router-dom": "^6.3.0",
"react-scroll-sync": "^0.9.0",
"react-select": "^5.3.0",
"react-select-async-paginate": "^0.6.1",
"react-scroll-sync": "^0.11.0",
"react-select": "^5.4.0",
"react-select-async-paginate": "^0.6.2",
"react-slick": "^0.29.0",
"react-sortable-hoc": "^2.0.0",
"react-string-replace": "^1.0.0",
"react-table": "^7.7.0",
"react-string-replace": "^1.1.0",
"react-table": "^7.8.0",
"react-table-sticky": "^1.1.3",
"react-textarea-autosize": "^8.3.3",
"react-toastify": "^8.2.0",
"react-transition-group": "^4.4.2",
"react-twitter-widgets": "^1.10.0",
"react-use": "^17.3.2",
"react-textarea-autosize": "^8.3.4",
"react-toastify": "^9.0.7",
"react-transition-group": "^4.4.5",
"react-twitter-widgets": "^1.11.0",
"react-use": "^17.4.0",
"react-visibility-sensor": "^5.1.1",
"reactour": "^1.18.7",
"reactstrap": "^9.0.2",
"reactstrap": "^9.1.2",
"redux": "^4.2.0",
"redux-first-history": "^5.0.9",
"redux-first-history": "^5.0.12",
"sbd": "^1.0.19",
"showdown": "^2.1.0",
"showdown-footnotes": "^2.1.2",
@@ -106,7 +109,7 @@
"string-format": "^2.0.0",
"styled-components": "^5.3.5",
"typed.js": "^2.0.12",
"use-resize-observer": "^8.0.0"
"use-resize-observer": "^9.0.2"
},
"scripts": {
"analyze": "source-map-explorer 'build/static/js/*.js'",
@@ -124,26 +127,26 @@
"prepare": "husky install"
},
"devDependencies": {
"@babel/preset-env": "^7.16.11",
"@babel/preset-env": "^7.18.10",
"@beam-australia/react-env": "^3.1.1",
"@testing-library/jest-dom": "^5.16.1",
"@testing-library/react": "^12.1.2",
"@testing-library/user-event": "^13.5.0",
"@testing-library/jest-dom": "^5.16.4",
"@testing-library/react": "^13.3.0",
"@testing-library/user-event": "^14.4.1",
"auto-changelog": "^2.4.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-jsx-a11y": "^6.5.1",
"eslint-plugin-jsx-a11y": "^6.6.1",
"eslint-plugin-prettier": "^3.3.1",
"faker": "^5.5.3",
"husky": "^7.0.4",
"jest-canvas-mock": "^2.3.1",
"jest-junit": "^13.2.0",
"lint-staged": "^12.4.0",
"msw": "^0.39.2",
"husky": "^8.0.1",
"jest-canvas-mock": "^2.4.0",
"jest-junit": "^14.0.0",
"lint-staged": "^13.0.3",
"msw": "^0.44.2",
"prettier": "1.18.2",
"react-scripts": "5.0.1",
"react-select-event": "^5.5.0",
"sass": "^1.51.0"
"sass": "^1.54.1"
},
"jest-junit": {
"classNameTemplate": "{classname}",
@@ -221,6 +224,15 @@
2,
"as-needed"
],
"no-param-reassign": [
1,
{
"props": true,
"ignorePropertyModificationsFor": [
"state"
]
}
],
"import/no-unresolved": 0,
"indent": 0,
"operator-linebreak": 0,
@@ -230,7 +242,6 @@
"no-unused-vars": 1,
"no-await-in-loop": 1,
"no-nested-ternary": 1,
"no-param-reassign": 1,
"camelcase": 1,
"no-confusing-arrow": 1,
"no-prototype-builtins": 1,
2 changes: 1 addition & 1 deletion public/widget.js

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -6,6 +6,9 @@ import 'react-toastify/dist/ReactToastify.css';
import 'tippy.js/dist/tippy.css';
import 'tippy.js/dist/backdrop.css';
import 'tippy.js/animations/shift-away.css';
import '@citation-js/plugin-bibtex';
import '@citation-js/plugin-doi';
import '@citation-js/plugin-csl';
import { useRoutes } from 'react-router-dom';
import { detect } from 'detect-browser';
import ScrollToTop from 'components/ScrollToTop';
2 changes: 1 addition & 1 deletion src/components/AddPaper/GeneralData/GeneralData.js
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@ import { TransitionGroup, CSSTransition } from 'react-transition-group';
import { useCookies } from 'react-cookie';
import styled, { ThemeContext } from 'styled-components';
import moment from 'moment';
import Cite from 'citation-js';
import { Cite } from '@citation-js/core';
import Tour from 'reactour';
import { useLocation } from 'react-router-dom';
import queryString from 'query-string';
2 changes: 1 addition & 1 deletion src/components/Comparison/Export/ExportToLatex.js
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@ import { useState, useEffect } from 'react';
import { Button, Input, Modal, ModalBody, ModalHeader, Nav, NavItem, NavLink, Label, FormGroup } from 'reactstrap';
import { getStatementsBySubject } from 'services/backend/statements';
import { createShortLink, getComparison } from 'services/similarity/index';
import Cite from 'citation-js';
import { Cite } from '@citation-js/core';
import { CopyToClipboard } from 'react-copy-to-clipboard';
import { FontAwesomeIcon as Icon } from '@fortawesome/react-fontawesome';
import MakeLatex from 'make-latex';
2 changes: 1 addition & 1 deletion src/components/ConfirmBulkImport/useImportBulkData.js
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ import { getPaperByDOI } from 'services/backend/misc';
import { createResource, getResourcesByClass, getResources, getResource } from 'services/backend/resources';
import { getPredicate, getPredicates, createPredicate } from 'services/backend/predicates';
import { saveFullPaper } from 'services/backend/papers';
import Cite from 'citation-js';
import { Cite } from '@citation-js/core';
import { parseCiteResult } from 'utils';
import { toast } from 'react-toastify';
import DATA_TYPES, { checkDataTypeIsInValid, getSuggestionByValue } from 'constants/DataTypes';
13 changes: 6 additions & 7 deletions src/components/Confirmation/Confirmation.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Component } from 'react';
import PropTypes from 'prop-types';
import { render, unmountComponentAtNode } from 'react-dom';
import { createRoot } from 'react-dom/client';
import { Button, Modal, ModalBody, ModalHeader, ModalFooter } from 'reactstrap';

class Confirmation extends Component {
@@ -34,15 +34,15 @@ Confirmation.propTypes = {

const Confirm = ({ message, title = 'Are you sure?', proceedLabel = 'Ok', cancelLabel = 'Cancel', options = {} }) =>
new Promise(resolve => {
let el = document.createElement('div');

let container = document.createElement('div');
const root = createRoot(container);
const handleResolve = result => {
unmountComponentAtNode(el);
el = null;
root.unmount();
container = null;
resolve(result);
};

render(
root.render(
<Confirmation
title={title}
message={message}
@@ -51,7 +51,6 @@ const Confirm = ({ message, title = 'Are you sure?', proceedLabel = 'Ok', cancel
{...options}
proceed={handleResolve}
/>,
el,
);
});

12 changes: 6 additions & 6 deletions src/components/ConfirmationModal/ConfirmationModal.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import { render, unmountComponentAtNode } from 'react-dom';
import { createRoot } from 'react-dom/client';
import NewClassConfirmationModal from './NewClassConfirmationModal';

const confirm = props =>
new Promise(resolve => {
let el = document.createElement('div');

let container = document.createElement('div');
const root = createRoot(container);
const handleResolve = result => {
unmountComponentAtNode(el);
el = null;
root.unmount();
container = null;
resolve(result);
};

render(<NewClassConfirmationModal {...props} onClose={handleResolve} />, el);
root.render(<NewClassConfirmationModal {...props} onClose={handleResolve} />);
});

export default confirm;
10 changes: 5 additions & 5 deletions src/components/ContributionEditor/EditorTable.js
Original file line number Diff line number Diff line change
@@ -78,12 +78,12 @@ const EditorTable = ({ scrollContainerBody }) => {
</FlipMove>
</div>
</div>
{rows.length === 0 && (
<Alert className="mt-0" color="info">
Start adding properties or use templates by using the buttons below
</Alert>
)}
</ScrollSyncPane>
{rows.length === 0 && (
<Alert className="mt-0" color="info">
Start adding properties or use templates by using the buttons below
</Alert>
)}
</div>
</>
);
Original file line number Diff line number Diff line change
@@ -30,17 +30,22 @@ describe('TableCellValueCreate', () => {
it('should switch to autocomplete when resource type is selected', async () => {
setup();
fireEvent.click(screen.getByRole('button', { name: /add value/i, hidden: true }));
await selectEvent.select(screen.getByText(/text/i), ['Resource'], { container: document.body });
const selectInput = screen.getByText(/text/i);
await selectEvent.openMenu(selectInput);
await selectEvent.select(selectInput, ['Resource'], { container: document.body });
expect(screen.getByRole('combobox', { name: /enter a resource/i })).toBeInTheDocument();
});

it('should switch to literal input when literal type is selected', async () => {
setup();
fireEvent.click(screen.getByRole('button', { name: /add value/i, hidden: true }));
// use wait for to prevent "Can't perform a React state update on an unmounted component. This is a no-op" warning
await selectEvent.select(screen.getByText(/text/i), ['Resource'], { container: document.body });
const selectInput = screen.getByText(/text/i);
await selectEvent.openMenu(selectInput);
await selectEvent.select(selectInput, ['Resource'], { container: document.body });
expect(screen.getByRole('combobox', { name: /enter a resource/i })).toBeInTheDocument();
await selectEvent.select(screen.getByText('Resource'), ['Text'], { container: document.body });
await selectEvent.openMenu(selectInput);
await selectEvent.select(selectInput, ['Text'], { container: document.body });
expect(screen.getByPlaceholderText(/enter a value/i)).toBeInTheDocument();
});

2 changes: 1 addition & 1 deletion src/components/CreatePaperModal/DoiItem.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { faSpinner } from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon as Icon } from '@fortawesome/react-fontawesome';
import Cite from 'citation-js';
import { Cite } from '@citation-js/core';
import useExistingPaper from 'components/ExistingPaperModal/useExistingPaper';
import ListItem from 'components/ViewPaper/EditDialog/ListItem';
import { truncate } from 'lodash';
4 changes: 3 additions & 1 deletion src/components/Layout/hooks/useOnLocationChange.js
Original file line number Diff line number Diff line change
@@ -9,7 +9,9 @@ import { useLocation } from 'react-router-dom';
const useOnLocationChange = handleLocationChange => {
const location = useLocation();

useEffect(() => handleLocationChange(location), [location, handleLocationChange]);
useEffect(() => {
handleLocationChange(location);
}, [location, handleLocationChange]);
};

export default useOnLocationChange;
2 changes: 1 addition & 1 deletion src/components/List/AddEntryModal.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { faSpinner } from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon as Icon } from '@fortawesome/react-fontawesome';
import Cite from 'citation-js';
import { Cite } from '@citation-js/core';
import AutocompleteContentTypeTitle from 'components/AutocompleteContentTypeTitle/AutocompleteContentTypeTitle';
import useList from 'components/List/hooks/useList';
import MetadataTable from 'components/List/MetadataTable/MetadataTable';
4 changes: 2 additions & 2 deletions src/components/List/ExportBibtexModal/ExportBibtexModal.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { faClipboard } from '@fortawesome/free-regular-svg-icons';
import { FontAwesomeIcon as Icon } from '@fortawesome/react-fontawesome';
import Cite from 'citation-js';
import { Cite } from '@citation-js/core';
import PropTypes from 'prop-types';
import { useEffect, useState } from 'react';
import { CopyToClipboard } from 'react-copy-to-clipboard';
@@ -25,7 +25,7 @@ const ExportBibtexModal = ({ isOpen, toggle }) => {
type: 'article',
id: paper.paper.id,
title: paper.label,
author: paper.authors.length > 0 ? paper.authors.map(author => ({ name: author.label })) : null,
author: paper.authors?.length > 0 ? paper.authors.map(author => ({ name: author.label })) : null,
year: paper.publicationYear?.label,
});

Loading

0 comments on commit 3fac933

Please sign in to comment.