diff --git a/package.json b/package.json index 91cb5e8..5c1f985 100644 --- a/package.json +++ b/package.json @@ -60,9 +60,13 @@ "react-router-dom": "^5.2.0", "visyn_scripts": "git+ssh://git@github.com/datavisyn/visyn_scripts.git#develop" }, + "resolutions": { + "@types/react": "~18.2.0", + "@types/react-dom": "~18.2.0", + "react": "~18.2.0", + "react-dom": "~18.2.0" + }, "devDependencies": { - "@types/react": "^16.14.6", - "@types/react-dom": "^16.9.5", "@types/react-router-dom": "^5.1.7", "mkdirp": "0.5.1", "tslint": "~5.20.1", diff --git a/src/initialize.welcome.tsx b/src/initialize.welcome.tsx index 04976a0..aa6cdcd 100644 --- a/src/initialize.welcome.tsx +++ b/src/initialize.welcome.tsx @@ -1,12 +1,12 @@ import 'ordino/dist/robots.txt'; import * as React from 'react'; -import * as ReactDOM from 'react-dom'; +import { createRoot } from 'react-dom/client'; import { HashRouter, Switch, Route } from 'react-router-dom'; import { RouterScrollToTop } from 'coral'; import { DatasetsPage, Error404Page, FeaturesPage, HelpPage, HomePage, NewsPage, PublicationPage } from './pages'; -ReactDOM.render( +createRoot(document.querySelector('#welcome')).render( {/* A looks through its children s and @@ -45,5 +45,4 @@ ReactDOM.render( , - document.querySelector('#welcome'), ); diff --git a/src/pages/components/SourceCodeCard.tsx b/src/pages/components/SourceCodeCard.tsx index 7b6f06e..d548a48 100644 --- a/src/pages/components/SourceCodeCard.tsx +++ b/src/pages/components/SourceCodeCard.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { useAsync } from 'visyn_core'; +import { useAsync } from 'visyn_core/hooks'; import { AppMetaDataUtils } from 'tdp_core'; export function SourceCodeCard() { diff --git a/src/phovea.ts b/src/phovea.ts index fd09396..ac614eb 100644 --- a/src/phovea.ts +++ b/src/phovea.ts @@ -15,7 +15,7 @@ import { IOrdinoLogoDesc, IStartMenuTabShortcutDesc, } from 'ordino'; -import { IRegistry, PluginRegistry } from 'visyn_core'; +import { IRegistry, PluginRegistry } from 'visyn_core/plugin'; import { EXTENSION_POINT_CUSTOMIZED_LOGIN_FORM } from 'tdp_core'; export default function (registry: IRegistry) { diff --git a/src/phovea_registry.ts b/src/phovea_registry.ts index abb9731..5ba402f 100644 --- a/src/phovea_registry.ts +++ b/src/phovea_registry.ts @@ -4,7 +4,7 @@ * Licensed under the new BSD license, available at http://caleydo.org/license **************************************************************************** */ -import { PluginRegistry } from 'visyn_core'; +import { PluginRegistry } from 'visyn_core/plugin'; import reg from './phovea'; /** diff --git a/tsconfig.json b/tsconfig.json index 7968650..1fb0636 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,12 +1,10 @@ -{ - "extends": "visyn_scripts/config/tsconfig.template.json", + { "extends": "visyn_scripts/config/tsconfig.template.json", "compilerOptions": { "outDir": "./dist", - "moduleResolution": "node", }, "include": [ "src/**/*.ts", "src/**/*.tsx", "tsd.d.ts" ] -} +} \ No newline at end of file