diff --git a/package-lock.json b/package-lock.json
index 24fa69199..40f20ada1 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -70,12 +70,14 @@
"@types/codemirror": "^5.60.15",
"@types/color": "^3.0.6",
"@types/cors": "^2.8.17",
+ "@types/file-saver": "^2.0.7",
"@types/lodash.capitalize": "^4.2.9",
"@types/lodash.isequal": "^4.5.8",
"@types/lodash.throttle": "^4.1.9",
"@types/react": "^16.14.52",
"@types/react-aria-modal": "^4.0.9",
"@types/react-autocomplete": "^1.8.9",
+ "@types/react-collapse": "^5.0.4",
"@types/react-color": "^3.0.10",
"@types/react-dom": "^16.9.24",
"@types/react-file-reader-input": "^2.0.4",
@@ -4711,6 +4713,12 @@
"@types/send": "*"
}
},
+ "node_modules/@types/file-saver": {
+ "version": "2.0.7",
+ "resolved": "https://registry.npmjs.org/@types/file-saver/-/file-saver-2.0.7.tgz",
+ "integrity": "sha512-dNKVfHd/jk0SkR/exKGj2ggkB45MAkzvWCaqLUUgkyjITkGNzH8H+yUwr+BLJUBjZOe9w8X3wgmXhZDRg1ED6A==",
+ "dev": true
+ },
"node_modules/@types/find-cache-dir": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/@types/find-cache-dir/-/find-cache-dir-3.2.1.tgz",
@@ -4899,6 +4907,15 @@
"@types/react": "*"
}
},
+ "node_modules/@types/react-collapse": {
+ "version": "5.0.4",
+ "resolved": "https://registry.npmjs.org/@types/react-collapse/-/react-collapse-5.0.4.tgz",
+ "integrity": "sha512-tM5cVB6skGLneNYnRK2E3R56VOHguSeJQHslGPTIMC58ytL3oelT8L/l1onkwHGn5vSEs2BEq2Olzrur+YdliA==",
+ "dev": true,
+ "dependencies": {
+ "@types/react": "*"
+ }
+ },
"node_modules/@types/react-color": {
"version": "3.0.10",
"resolved": "https://registry.npmjs.org/@types/react-color/-/react-color-3.0.10.tgz",
diff --git a/package.json b/package.json
index fd9e96242..eea99ee4b 100644
--- a/package.json
+++ b/package.json
@@ -99,12 +99,14 @@
"@types/codemirror": "^5.60.15",
"@types/color": "^3.0.6",
"@types/cors": "^2.8.17",
+ "@types/file-saver": "^2.0.7",
"@types/lodash.capitalize": "^4.2.9",
"@types/lodash.isequal": "^4.5.8",
"@types/lodash.throttle": "^4.1.9",
"@types/react": "^16.14.52",
"@types/react-aria-modal": "^4.0.9",
"@types/react-autocomplete": "^1.8.9",
+ "@types/react-collapse": "^5.0.4",
"@types/react-color": "^3.0.10",
"@types/react-dom": "^16.9.24",
"@types/react-file-reader-input": "^2.0.4",
diff --git a/src/components/AppLayout.jsx b/src/components/AppLayout.tsx
similarity index 73%
rename from src/components/AppLayout.jsx
rename to src/components/AppLayout.tsx
index 99b669ea5..90392ab92 100644
--- a/src/components/AppLayout.jsx
+++ b/src/components/AppLayout.tsx
@@ -2,16 +2,16 @@ import React from 'react'
import PropTypes from 'prop-types'
import ScrollContainer from './ScrollContainer'
-class AppLayout extends React.Component {
- static propTypes = {
- toolbar: PropTypes.element.isRequired,
- layerList: PropTypes.element.isRequired,
- layerEditor: PropTypes.element,
- map: PropTypes.element.isRequired,
- bottom: PropTypes.element,
- modals: PropTypes.node,
- }
+type AppLayoutProps = {
+ toolbar: React.ReactElement
+ layerList: React.ReactElement
+ layerEditor?: React.ReactElement
+ map: React.ReactElement
+ bottom?: React.ReactElement
+ modals?: React.ReactNode
+};
+class AppLayout extends React.Component
{m}
}) diff --git a/src/components/AppToolbar.jsx b/src/components/AppToolbar.tsx similarity index 77% rename from src/components/AppToolbar.jsx rename to src/components/AppToolbar.tsx index 13d62caef..97e4ac793 100644 --- a/src/components/AppToolbar.jsx +++ b/src/components/AppToolbar.tsx @@ -1,5 +1,4 @@ import React from 'react' -import PropTypes from 'prop-types' import classnames from 'classnames' import {detect} from 'detect-browser'; @@ -9,27 +8,28 @@ import pkgJson from '../../package.json' // This is required because of