diff --git a/app/packs/src/components/structureEditor/StructureEditorContent.js b/app/packs/src/components/structureEditor/StructureEditorContent.js deleted file mode 100644 index ace0027f1f..0000000000 --- a/app/packs/src/components/structureEditor/StructureEditorContent.js +++ /dev/null @@ -1,64 +0,0 @@ -import React from 'react'; -import scriptLoader from 'react-async-script-loader'; - - -class StructureEditorContent extends React.Component { - constructor(props) { - super(props); - const { completionCallback, errorCallback } = this.props; - this.state = { - completionCallback, errorCallback - } - this.attachEditor = this.attachEditor.bind(this) - } - - UNSAFE_componentWillReceiveProps({ isScriptLoaded, isScriptLoadSucceed }) { - if (isScriptLoaded && !this.props.isScriptLoaded) { // load finished - if (isScriptLoadSucceed) { - setTimeout(this.attachEditor, 3000); - } - } - } - - componentDidMount() { - const { isScriptLoaded, isScriptLoadSucceed } = this.props - if (isScriptLoaded && isScriptLoadSucceed) { - this.attachEditor(); - this.attachEditor(); - } - } - - attachEditor() { - const { completionCallback, errorCallback } = this.props; - - perkinelmer.ChemdrawWebManager.attach({ - id: 'chemdrawjs-container', - config: window.userConfiguration, - element: this.chemdrawcont, - callback: () => alert('done'), - errorCallback: () => alert('de'), - licenseUrl: 'license.xml', - // loadConfigFromUrl: 'cdjs/chemdrawweb/configuration.json', - // preservePageInfo: false, - // viewonly: true, - }); - } - - - render() { - return ( -
{ this.chemdrawcont = input }} - className="position-absolute top-0 start-0 w-100 vh-70" - /> - ); - } -} -export default scriptLoader( - [ - "cdjs/chemdrawweb/chemdrawweb.js", - ] -)(StructureEditorContent) - - -// export default StructureEditorContent; diff --git a/package.json b/package.json index 23bd91b249..ed06a825ae 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,6 @@ "path": "^0.12.7", "pdf-lib": "^1.17.1", "prop-types": "15.6.2", - "qrcode.react": "^0.6.1", "quagga": "^0.11.5", "querystring-es3": "^0.2.1", "quill": "^1.3.7", @@ -66,7 +65,6 @@ "quill-delta-to-plaintext": "^1.0.0", "raw-loader": "^4.0.2", "react": "^17.0.2", - "react-async-script-loader": "0.3.0", "react-barcode": "^1.1.0", "react-big-calendar": "^1.5.1", "react-bootstrap": "~2.10.2", @@ -114,7 +112,6 @@ "@babel/plugin-proposal-class-properties": "^7.11.0", "@babel/register": "^7.11.5", "@pmmmwh/react-refresh-webpack-plugin": "^0.5.5", - "@webpack-cli/serve": "^1.3.1", "@wojtekmaj/enzyme-adapter-react-17": "^0.6.3", "babel-loader": "^8.2.2", "cypress": "^12.3.0", diff --git a/yarn.lock b/yarn.lock index 11e840d23f..0cee4a90ad 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4643,11 +4643,6 @@ resolved "https://registry.yarnpkg.com/@webpack-cli/info/-/info-2.0.2.tgz#cc3fbf22efeb88ff62310cf885c5b09f44ae0fdd" integrity sha512-zLHQdI/Qs1UyT5UBdWNqsARasIA+AaF8t+4u2aS2nEpBQh2mWIVb8qAklq0eUENnC5mOItrIB4LiS9xMtph18A== -"@webpack-cli/serve@^1.3.1": - version "1.6.1" - resolved "https://registry.npmjs.org/@webpack-cli/serve/-/serve-1.6.1.tgz" - integrity sha512-gNGTiTrjEVQ0OcVnzsRSqTxaBSr+dmTfm+qJsCDluky8uhdLWep7Gcr62QsAKHTMxjCS/8nEITsmFAhfIx+QSw== - "@webpack-cli/serve@^1.7.0": version "1.7.0" resolved "https://registry.yarnpkg.com/@webpack-cli/serve/-/serve-1.7.0.tgz#e1993689ac42d2b16e9194376cfb6753f6254db1" @@ -8884,11 +8879,6 @@ he@1.2.0: resolved "https://registry.npmjs.org/he/-/he-1.2.0.tgz" integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== -hoist-non-react-statics@^1.0.3: - version "1.2.0" - resolved "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-1.2.0.tgz" - integrity sha1-qkSM8JhtVcxAdzsXF0t90GbLfPs= - hoist-non-react-statics@^3.3.0, hoist-non-react-statics@^3.3.1, hoist-non-react-statics@^3.3.2: version "3.3.2" resolved "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz" @@ -12238,23 +12228,11 @@ punycode@^2.3.0: resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.0.tgz#f67fa67c94da8f4d0cfff981aee4118064199b8f" integrity sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA== -qr.js@0.0.0: - version "0.0.0" - resolved "https://registry.npmjs.org/qr.js/-/qr.js-0.0.0.tgz" - integrity sha1-ys6GOG9ZoNuAUPqQ2baw6IoeNk8= - qrcode-terminal@^0.12.0: version "0.12.0" resolved "https://registry.npmjs.org/qrcode-terminal/-/qrcode-terminal-0.12.0.tgz" integrity sha512-EXtzRZmC+YGmGlDFbXKxQiMZNwCLEO6BANKXG4iCtSIM0yqc/pappSx3RIKr4r0uh5JsBckOXeKrB3Iz7mdQpQ== -qrcode.react@^0.6.1: - version "0.6.1" - resolved "https://registry.npmjs.org/qrcode.react/-/qrcode.react-0.6.1.tgz" - integrity sha1-5xgZLRfN+Hyx8VajTOoW3WdXWTI= - dependencies: - qr.js "0.0.0" - qrcode.react@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/qrcode.react/-/qrcode.react-3.1.0.tgz#5c91ddc0340f768316fbdb8fff2765134c2aecd8" @@ -12737,13 +12715,6 @@ rc-virtual-list@^3.11.1, rc-virtual-list@^3.5.1, rc-virtual-list@^3.5.2: rc-resize-observer "^1.0.0" rc-util "^5.36.0" -react-async-script-loader@0.3.0: - version "0.3.0" - resolved "https://registry.npmjs.org/react-async-script-loader/-/react-async-script-loader-0.3.0.tgz" - integrity sha1-x0KzyiXgi6Yat+tkNx+BQCdpK4Y= - dependencies: - hoist-non-react-statics "^1.0.3" - react-barcode@^1.1.0: version "1.4.1" resolved "https://registry.npmjs.org/react-barcode/-/react-barcode-1.4.1.tgz"