From 479fda07cd00992a81ed423f8646f9526dbf32ae Mon Sep 17 00:00:00 2001
From: esikkala <esko.ikkala@aalto.fi>
Date: Mon, 13 Sep 2021 10:54:20 +0300
Subject: [PATCH] Switch to @nosferatu500/react-sortable-tree

---
 package-lock.json                             | 92 +++++++++----------
 package.json                                  |  2 +-
 .../components/facet_bar/HierarchicalFacet.js |  2 +-
 .../facet_bar/HierarchicalFacet.stories.js    |  2 +-
 src/client/index.js                           |  2 +-
 src/server/sparql/Mappers.js                  |  2 +-
 6 files changed, 46 insertions(+), 56 deletions(-)

diff --git a/package-lock.json b/package-lock.json
index bba3c7f3..89d13172 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -6643,6 +6643,32 @@
         "fastq": "^1.6.0"
       }
     },
+    "@nosferatu500/react-dnd-scrollzone": {
+      "version": "1.0.14",
+      "resolved": "https://registry.npmjs.org/@nosferatu500/react-dnd-scrollzone/-/react-dnd-scrollzone-1.0.14.tgz",
+      "integrity": "sha512-Uo62H9u0wsNI/29KKcBtkqFC2a4Z6jZwXaqJ7vKIswHTBEvBzpVImZlXMvcCHqNg216QQNr+Qq9BdPOjroY/eg==",
+      "requires": {
+        "hoist-non-react-statics": "^3.3.2",
+        "lodash.throttle": "^4.1.1",
+        "prop-types": "^15.7.2",
+        "raf": "^3.4.1",
+        "react-display-name": "^0.2.5"
+      }
+    },
+    "@nosferatu500/react-sortable-tree": {
+      "version": "3.0.5",
+      "resolved": "https://registry.npmjs.org/@nosferatu500/react-sortable-tree/-/react-sortable-tree-3.0.5.tgz",
+      "integrity": "sha512-rhOuZOxhkaCU/uKf02zbJFATanqBRC7uB7vUm9DveXI4Y1yTwSRio7gvgto20mNA1M7ZOQX5eP8xKgx5Enf9ig==",
+      "requires": {
+        "@nosferatu500/react-dnd-scrollzone": "^1.0.14",
+        "lodash.isequal": "^4.5.0",
+        "prop-types": "^15.7.2",
+        "react-dnd": "^14.0.2",
+        "react-dnd-html5-backend": "^14.0.0",
+        "react-lifecycles-compat": "^3.0.4",
+        "react-virtualized": "^9.22.3"
+      }
+    },
     "@npmcli/move-file": {
       "version": "1.1.2",
       "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-1.1.2.tgz",
@@ -10189,15 +10215,6 @@
         "@types/unist": "*"
       }
     },
-    "@types/hoist-non-react-statics": {
-      "version": "3.3.1",
-      "resolved": "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz",
-      "integrity": "sha512-iMIqiko6ooLrTh1joXodJK5X9xeEALT1kM5G3ZLhD3hszxBdIEd5C75U834D9mLcINgD4OyZf5uQXjkuYydWvA==",
-      "requires": {
-        "@types/react": "*",
-        "hoist-non-react-statics": "^3.3.0"
-      }
-    },
     "@types/html-minifier-terser": {
       "version": "5.1.1",
       "resolved": "https://registry.npmjs.org/@types/html-minifier-terser/-/html-minifier-terser-5.1.1.tgz",
@@ -15155,13 +15172,13 @@
       "dev": true
     },
     "dnd-core": {
-      "version": "11.1.3",
-      "resolved": "https://registry.npmjs.org/dnd-core/-/dnd-core-11.1.3.tgz",
-      "integrity": "sha512-QugF55dNW+h+vzxVJ/LSJeTeUw9MCJ2cllhmVThVPEtF16ooBkxj0WBE5RB+AceFxMFo1rO6bJKXtqKl+JNnyA==",
+      "version": "14.0.0",
+      "resolved": "https://registry.npmjs.org/dnd-core/-/dnd-core-14.0.0.tgz",
+      "integrity": "sha512-wTDYKyjSqWuYw3ZG0GJ7k+UIfzxTNoZLjDrut37PbcPGNfwhlKYlPUqjAKUjOOv80izshUiqusaKgJPItXSevA==",
       "requires": {
         "@react-dnd/asap": "^4.0.0",
         "@react-dnd/invariant": "^2.0.0",
-        "redux": "^4.0.4"
+        "redux": "^4.0.5"
       }
     },
     "dns-equal": {
@@ -17313,20 +17330,6 @@
         }
       }
     },
-    "frontend-collective-react-dnd-scrollzone": {
-      "version": "1.0.2",
-      "resolved": "https://registry.npmjs.org/frontend-collective-react-dnd-scrollzone/-/frontend-collective-react-dnd-scrollzone-1.0.2.tgz",
-      "integrity": "sha512-me/D9PZJq9j/sjEjs/OPmm6V6nbaHbhgeQiwrWu0t35lhwAOKWc+QBzzKKcZQeboYTkgE8UvCD9el+5ANp+g5Q==",
-      "requires": {
-        "hoist-non-react-statics": "^3.1.0",
-        "lodash.throttle": "^4.0.1",
-        "prop-types": "^15.5.9",
-        "raf": "^3.2.0",
-        "react": "^16.3.0",
-        "react-display-name": "^0.2.0",
-        "react-dom": "^16.3.0"
-      }
-    },
     "fs-extra": {
       "version": "9.1.0",
       "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz",
@@ -24205,22 +24208,23 @@
       "integrity": "sha512-I+vcaK9t4+kypiSgaiVWAipqHRXYmZIuAiS8vzFvXHHXVigg/sMKwlRgLy6LH2i3rmP+0Vzfl5lFsFRwF1r3pg=="
     },
     "react-dnd": {
-      "version": "11.1.3",
-      "resolved": "https://registry.npmjs.org/react-dnd/-/react-dnd-11.1.3.tgz",
-      "integrity": "sha512-8rtzzT8iwHgdSC89VktwhqdKKtfXaAyC4wiqp0SywpHG12TTLvfOoL6xNEIUWXwIEWu+CFfDn4GZJyynCEuHIQ==",
+      "version": "14.0.3",
+      "resolved": "https://registry.npmjs.org/react-dnd/-/react-dnd-14.0.3.tgz",
+      "integrity": "sha512-i73Hx5SKfDRdwXe30+CjF/DidiRdt/gwpPN14ajkPR20t/0osnNKFNHg3DLV6RZym+DJ0pO9H5APeMsBWGU3+Q==",
       "requires": {
+        "@react-dnd/invariant": "^2.0.0",
         "@react-dnd/shallowequal": "^2.0.0",
-        "@types/hoist-non-react-statics": "^3.3.1",
-        "dnd-core": "^11.1.3",
-        "hoist-non-react-statics": "^3.3.0"
+        "dnd-core": "14.0.0",
+        "fast-deep-equal": "^3.1.3",
+        "hoist-non-react-statics": "^3.3.2"
       }
     },
     "react-dnd-html5-backend": {
-      "version": "11.1.3",
-      "resolved": "https://registry.npmjs.org/react-dnd-html5-backend/-/react-dnd-html5-backend-11.1.3.tgz",
-      "integrity": "sha512-/1FjNlJbW/ivkUxlxQd7o3trA5DE33QiRZgxent3zKme8DwF4Nbw3OFVhTRFGaYhHFNL1rZt6Rdj1D78BjnNLw==",
+      "version": "14.0.1",
+      "resolved": "https://registry.npmjs.org/react-dnd-html5-backend/-/react-dnd-html5-backend-14.0.1.tgz",
+      "integrity": "sha512-ZDmpvFpd1NR4riw/CMbr8C3mgP6ZhsTf0c48a36kw4ZW8emgiugNlAz/qhhZ4/Pz9TO6DZ63sQohUTTl+AWGiA==",
       "requires": {
-        "dnd-core": "^11.1.3"
+        "dnd-core": "14.0.0"
       }
     },
     "react-docgen": {
@@ -24503,20 +24507,6 @@
         }
       }
     },
-    "react-sortable-tree": {
-      "version": "2.8.0",
-      "resolved": "https://registry.npmjs.org/react-sortable-tree/-/react-sortable-tree-2.8.0.tgz",
-      "integrity": "sha512-gTjwxRNt7z0FC76KeNTnGqx1qUSlV3N78mMPRushBpSUXzZYhiFNsWHUIruyPnaAbw4SA7LgpItV7VieAuwDpw==",
-      "requires": {
-        "frontend-collective-react-dnd-scrollzone": "^1.0.2",
-        "lodash.isequal": "^4.5.0",
-        "prop-types": "^15.6.1",
-        "react-dnd": "^11.1.3",
-        "react-dnd-html5-backend": "^11.1.3",
-        "react-lifecycles-compat": "^3.0.4",
-        "react-virtualized": "^9.21.2"
-      }
-    },
     "react-sortable-tree-theme-file-explorer": {
       "version": "git+https://github.com/SemanticComputing/react-sortable-tree-theme-file-explorer.git#b7b8045db8060ffdcd0ed70f86ceda1cdeeaaa5a",
       "from": "git+https://github.com/SemanticComputing/react-sortable-tree-theme-file-explorer.git",
diff --git a/package.json b/package.json
index 9cc563b9..e09bc937 100644
--- a/package.json
+++ b/package.json
@@ -32,6 +32,7 @@
     "@material-ui/core": "^4.9.14",
     "@material-ui/icons": "^4.9.1",
     "@material-ui/pickers": "^3.2.10",
+    "@nosferatu500/react-sortable-tree": "^3.0.5",
     "@shakacode/recompose": "^0.30.3",
     "@turf/buffer": "^6.3.0",
     "Leaflet.extra-markers": "git+https://github.com/SemanticComputing/Leaflet.ExtraMarkers.git",
@@ -68,7 +69,6 @@
     "react-redux": "^7.2.0",
     "react-redux-toastr": "^7.4.1",
     "react-router-dom": "^5.2.0",
-    "react-sortable-tree": "2.8.0",
     "react-sortable-tree-theme-file-explorer": "git+https://github.com/SemanticComputing/react-sortable-tree-theme-file-explorer.git",
     "react-virtualized": "^9.22.3",
     "redux": "^4.1.0",
diff --git a/src/client/components/facet_bar/HierarchicalFacet.js b/src/client/components/facet_bar/HierarchicalFacet.js
index 697c10dc..f914776a 100644
--- a/src/client/components/facet_bar/HierarchicalFacet.js
+++ b/src/client/components/facet_bar/HierarchicalFacet.js
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types'
 import intl from 'react-intl-universal'
 import { withStyles } from '@material-ui/core/styles'
 import { has } from 'lodash'
-import SortableTree, { changeNodeAtPath } from 'react-sortable-tree'
+import SortableTree, { changeNodeAtPath } from '@nosferatu500/react-sortable-tree'
 import FileExplorerTheme from 'react-sortable-tree-theme-file-explorer'
 import Checkbox from '@material-ui/core/Checkbox'
 import FormControlLabel from '@material-ui/core/FormControlLabel'
diff --git a/src/client/components/facet_bar/HierarchicalFacet.stories.js b/src/client/components/facet_bar/HierarchicalFacet.stories.js
index 9ce8b132..f79f7121 100644
--- a/src/client/components/facet_bar/HierarchicalFacet.stories.js
+++ b/src/client/components/facet_bar/HierarchicalFacet.stories.js
@@ -3,7 +3,7 @@ import HierarchicalFacet, { HierarchicalFacetComponent } from './HierarchicalFac
 import Center from '../../../../.storybook/Center'
 import PaperContainer from '../../../../.storybook/PaperContainer'
 import { productionPlace } from './HierarchicalFacet.testData'
-import 'react-sortable-tree/style.css' // This only needs to be imported once in your app
+import '@nosferatu500/react-sortable-tree/style.css' // This only needs to be imported once in your app
 
 export default {
   component: HierarchicalFacetComponent,
diff --git a/src/client/index.js b/src/client/index.js
index 2b0154e6..f1775aa4 100644
--- a/src/client/index.js
+++ b/src/client/index.js
@@ -14,7 +14,7 @@ import CircularProgress from '@material-ui/core/CircularProgress'
 import purple from '@material-ui/core/colors/purple'
 
 import './index.css'
-import 'react-sortable-tree/style.css'
+import '@nosferatu500/react-sortable-tree/style.css'
 import 'react-redux-toastr/lib/css/react-redux-toastr.min.css'
 import 'mapbox-gl/dist/mapbox-gl.css'
 
diff --git a/src/server/sparql/Mappers.js b/src/server/sparql/Mappers.js
index 8742cf40..6e5a9426 100644
--- a/src/server/sparql/Mappers.js
+++ b/src/server/sparql/Mappers.js
@@ -1,5 +1,5 @@
 import { has } from 'lodash'
-import { getTreeFromFlatData } from 'react-sortable-tree'
+import { getTreeFromFlatData } from '@nosferatu500/react-sortable-tree'
 
 export const mapPlaces = sparqlBindings => {
   const results = sparqlBindings.map(b => {
-- 
GitLab