From bc2ec4d0b7f96ef4ab6dcf110d137c6579555c13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Gasser?= Date: Wed, 22 Aug 2018 22:37:05 -0400 Subject: [PATCH] Remove unused imports --- src/components/App.jsx | 2 +- src/components/Toolbar.jsx | 9 --------- src/components/fields/SpecField.jsx | 1 - src/components/filter/FilterEditor.jsx | 3 --- src/components/layers/LayerEditor.jsx | 3 --- src/components/layers/LayerList.jsx | 3 --- src/components/layers/LayerListItem.jsx | 2 -- src/components/layers/LayerSourceBlock.jsx | 1 - src/components/layers/LayerSourceLayerBlock.jsx | 1 - src/components/map/FeatureLayerPopup.jsx | 2 -- src/components/map/MapboxGlMap.jsx | 1 - src/components/map/OpenLayers3Map.jsx | 2 -- src/components/modals/AddModal.jsx | 2 -- src/components/modals/ExportModal.jsx | 13 ++++++++----- src/components/modals/ShortcutsModal.jsx | 1 - src/libs/style.js | 1 - src/libs/stylestore.js | 2 -- test/functional/history/index.js | 1 - test/functional/index.js | 2 -- test/functional/map/index.js | 2 -- test/functional/screenshots/index.js | 1 - 21 files changed, 9 insertions(+), 46 deletions(-) diff --git a/src/components/App.jsx b/src/components/App.jsx index 4a2652d..b2355ab 100644 --- a/src/components/App.jsx +++ b/src/components/App.jsx @@ -25,7 +25,7 @@ import * as styleSpec from '@mapbox/mapbox-gl-style-spec/style-spec' import style from '../libs/style' import { initialStyleUrl, loadStyleUrl } from '../libs/urlopen' import { undoMessages, redoMessages } from '../libs/diffmessage' -import { loadDefaultStyle, StyleStore } from '../libs/stylestore' +import { StyleStore } from '../libs/stylestore' import { ApiStyleStore } from '../libs/apistore' import { RevisionStore } from '../libs/revisions' import LayerWatcher from '../libs/layerwatcher' diff --git a/src/components/Toolbar.jsx b/src/components/Toolbar.jsx index 87a209f..77ee1ad 100644 --- a/src/components/Toolbar.jsx +++ b/src/components/Toolbar.jsx @@ -1,19 +1,11 @@ import React from 'react' import PropTypes from 'prop-types' -import FileReaderInput from 'react-file-reader-input' import classnames from 'classnames' import MdFileDownload from 'react-icons/lib/md/file-download' -import MdFileUpload from 'react-icons/lib/md/file-upload' import OpenIcon from 'react-icons/lib/md/open-in-browser' import SettingsIcon from 'react-icons/lib/md/settings' -import MdInfo from 'react-icons/lib/md/info' import SourcesIcon from 'react-icons/lib/md/layers' -import MdSave from 'react-icons/lib/md/save' -import MdStyle from 'react-icons/lib/md/style' -import MdMap from 'react-icons/lib/md/map' -import MdInsertEmoticon from 'react-icons/lib/md/insert-emoticon' -import MdFontDownload from 'react-icons/lib/md/font-download' import HelpIcon from 'react-icons/lib/md/help-outline' import InspectionIcon from 'react-icons/lib/md/find-in-page' import SurveyIcon from 'react-icons/lib/md/assignment-turned-in' @@ -21,7 +13,6 @@ import SurveyIcon from 'react-icons/lib/md/assignment-turned-in' import logoImage from 'maputnik-design/logos/logo-color.svg' import pkgJson from '../../package.json' -import style from '../libs/style' class IconText extends React.Component { static propTypes = { diff --git a/src/components/fields/SpecField.jsx b/src/components/fields/SpecField.jsx index 38c5675..226ead3 100644 --- a/src/components/fields/SpecField.jsx +++ b/src/components/fields/SpecField.jsx @@ -1,6 +1,5 @@ import React from 'react' import PropTypes from 'prop-types' -import color from 'color' import ColorField from './ColorField' import NumberInput from '../inputs/NumberInput' diff --git a/src/components/filter/FilterEditor.jsx b/src/components/filter/FilterEditor.jsx index ad2a922..a4c25d8 100644 --- a/src/components/filter/FilterEditor.jsx +++ b/src/components/filter/FilterEditor.jsx @@ -9,9 +9,6 @@ import SingleFilterEditor from './SingleFilterEditor' import FilterEditorBlock from './FilterEditorBlock' import Button from '../Button' -import DeleteIcon from 'react-icons/lib/md/delete' -import AddIcon from 'react-icons/lib/fa/plus' - function hasCombiningFilter(filter) { return combiningFilterOps.indexOf(filter[0]) >= 0 } diff --git a/src/components/layers/LayerEditor.jsx b/src/components/layers/LayerEditor.jsx index 90ca341..cb77be2 100644 --- a/src/components/layers/LayerEditor.jsx +++ b/src/components/layers/LayerEditor.jsx @@ -16,9 +16,6 @@ import LayerSourceLayerBlock from './LayerSourceLayerBlock' import MoreVertIcon from 'react-icons/lib/md/more-vert' -import InputBlock from '../inputs/InputBlock' -import MultiButtonInput from '../inputs/MultiButtonInput' - import { changeType, changeProperty } from '../../libs/layer' import layout from '../../config/layout.json' diff --git a/src/components/layers/LayerList.jsx b/src/components/layers/LayerList.jsx index 0387b63..dcabe6b 100644 --- a/src/components/layers/LayerList.jsx +++ b/src/components/layers/LayerList.jsx @@ -2,13 +2,10 @@ import React from 'react' import PropTypes from 'prop-types' import classnames from 'classnames' -import Button from '../Button' import LayerListGroup from './LayerListGroup' import LayerListItem from './LayerListItem' -import AddIcon from 'react-icons/lib/md/add-circle-outline' import AddModal from '../modals/AddModal' -import style from '../../libs/style.js' import {SortableContainer, SortableHandle} from 'react-sortable-hoc'; const layerListPropTypes = { diff --git a/src/components/layers/LayerListItem.jsx b/src/components/layers/LayerListItem.jsx index 5c65188..805e50f 100644 --- a/src/components/layers/LayerListItem.jsx +++ b/src/components/layers/LayerListItem.jsx @@ -1,6 +1,5 @@ import React from 'react' import PropTypes from 'prop-types' -import Color from 'color' import classnames from 'classnames' import CopyIcon from 'react-icons/lib/md/content-copy' @@ -9,7 +8,6 @@ import VisibilityOffIcon from 'react-icons/lib/md/visibility-off' import DeleteIcon from 'react-icons/lib/md/delete' import LayerIcon from '../icons/LayerIcon' -import LayerEditor from './LayerEditor' import {SortableElement, SortableHandle} from 'react-sortable-hoc' @SortableHandle diff --git a/src/components/layers/LayerSourceBlock.jsx b/src/components/layers/LayerSourceBlock.jsx index 3773f73..9a6b9e2 100644 --- a/src/components/layers/LayerSourceBlock.jsx +++ b/src/components/layers/LayerSourceBlock.jsx @@ -3,7 +3,6 @@ import PropTypes from 'prop-types' import * as styleSpec from '@mapbox/mapbox-gl-style-spec/style-spec' import InputBlock from '../inputs/InputBlock' -import StringInput from '../inputs/StringInput' import AutocompleteInput from '../inputs/AutocompleteInput' class LayerSourceBlock extends React.Component { diff --git a/src/components/layers/LayerSourceLayerBlock.jsx b/src/components/layers/LayerSourceLayerBlock.jsx index 804e93f..15b48b5 100644 --- a/src/components/layers/LayerSourceLayerBlock.jsx +++ b/src/components/layers/LayerSourceLayerBlock.jsx @@ -3,7 +3,6 @@ import PropTypes from 'prop-types' import * as styleSpec from '@mapbox/mapbox-gl-style-spec/style-spec' import InputBlock from '../inputs/InputBlock' -import StringInput from '../inputs/StringInput' import AutocompleteInput from '../inputs/AutocompleteInput' class LayerSourceLayer extends React.Component { diff --git a/src/components/map/FeatureLayerPopup.jsx b/src/components/map/FeatureLayerPopup.jsx index 5d14d01..2d0eacb 100644 --- a/src/components/map/FeatureLayerPopup.jsx +++ b/src/components/map/FeatureLayerPopup.jsx @@ -1,7 +1,5 @@ import React from 'react' import PropTypes from 'prop-types' -import InputBlock from '../inputs/InputBlock' -import StringInput from '../inputs/StringInput' import LayerIcon from '../icons/LayerIcon' function groupFeaturesBySourceLayer(features) { diff --git a/src/components/map/MapboxGlMap.jsx b/src/components/map/MapboxGlMap.jsx index eb27609..d0e3850 100644 --- a/src/components/map/MapboxGlMap.jsx +++ b/src/components/map/MapboxGlMap.jsx @@ -5,7 +5,6 @@ import MapboxGl from 'mapbox-gl' import MapboxInspect from 'mapbox-gl-inspect' import FeatureLayerPopup from './FeatureLayerPopup' import FeaturePropertyPopup from './FeaturePropertyPopup' -import style from '../../libs/style.js' import tokens from '../../config/tokens.json' import colors from 'mapbox-gl-inspect/lib/colors' import Color from 'color' diff --git a/src/components/map/OpenLayers3Map.jsx b/src/components/map/OpenLayers3Map.jsx index 113781a..9cfcbf0 100644 --- a/src/components/map/OpenLayers3Map.jsx +++ b/src/components/map/OpenLayers3Map.jsx @@ -1,7 +1,5 @@ import React from 'react' import PropTypes from 'prop-types' -import style from '../../libs/style.js' -import isEqual from 'lodash.isequal' import { loadJSON } from '../../libs/urlopen' import 'ol/ol.css' diff --git a/src/components/modals/AddModal.jsx b/src/components/modals/AddModal.jsx index 0c9bcfe..0cdac51 100644 --- a/src/components/modals/AddModal.jsx +++ b/src/components/modals/AddModal.jsx @@ -2,8 +2,6 @@ import React from 'react' import PropTypes from 'prop-types' import Button from '../Button' -import InputBlock from '../inputs/InputBlock' -import StringInput from '../inputs/StringInput' import Modal from './Modal' import LayerTypeBlock from '../layers/LayerTypeBlock' diff --git a/src/components/modals/ExportModal.jsx b/src/components/modals/ExportModal.jsx index d74679c..f7d997a 100644 --- a/src/components/modals/ExportModal.jsx +++ b/src/components/modals/ExportModal.jsx @@ -21,11 +21,14 @@ class Gist extends React.Component { onStyleChanged: PropTypes.func.isRequired, } - state = { - preview: false, - public: false, - saving: false, - latestGist: null, + constructor(props) { + super(props); + this.state = { + preview: false, + public: false, + saving: false, + latestGist: null, + } } UNSAFE_componentWillReceiveProps(nextProps) { diff --git a/src/components/modals/ShortcutsModal.jsx b/src/components/modals/ShortcutsModal.jsx index 2ab8f9a..df8312e 100644 --- a/src/components/modals/ShortcutsModal.jsx +++ b/src/components/modals/ShortcutsModal.jsx @@ -1,7 +1,6 @@ import React from 'react' import PropTypes from 'prop-types' -import Button from '../Button' import Modal from './Modal' diff --git a/src/libs/style.js b/src/libs/style.js index b867148..d3c8ad4 100644 --- a/src/libs/style.js +++ b/src/libs/style.js @@ -1,4 +1,3 @@ -import React from 'react'; import deref from '@mapbox/mapbox-gl-style-spec/deref' import tokens from '../config/tokens.json' diff --git a/src/libs/stylestore.js b/src/libs/stylestore.js index c921d5c..17499bd 100644 --- a/src/libs/stylestore.js +++ b/src/libs/stylestore.js @@ -1,8 +1,6 @@ -import { colorizeLayers } from './style.js' import style from './style.js' import { loadStyleUrl } from './urlopen' import publicSources from '../config/styles.json' -import request from 'request' const storagePrefix = "maputnik" const stylePrefix = 'style' diff --git a/test/functional/history/index.js b/test/functional/history/index.js index 2cd5b0e..e788e7e 100644 --- a/test/functional/history/index.js +++ b/test/functional/history/index.js @@ -1,7 +1,6 @@ var assert = require("assert"); var config = require("../../config/specs"); var helper = require("../helper"); -var wd = require("../../wd-helper"); describe.skip("history", function() { diff --git a/test/functional/index.js b/test/functional/index.js index 5522706..3c9f5ec 100644 --- a/test/functional/index.js +++ b/test/functional/index.js @@ -1,6 +1,4 @@ -var assert = require('assert'); var config = require("../config/specs"); -var geoServer = require("../geojson-server"); var helper = require("./helper"); require("./util/webdriverio-ext"); diff --git a/test/functional/map/index.js b/test/functional/map/index.js index 498c0a1..2df5393 100644 --- a/test/functional/map/index.js +++ b/test/functional/map/index.js @@ -1,5 +1,3 @@ -var assert = require('assert'); -var wd = require("../../wd-helper"); var config = require("../../config/specs"); var helper = require("../helper"); diff --git a/test/functional/screenshots/index.js b/test/functional/screenshots/index.js index 9c5634c..a6d6d2a 100644 --- a/test/functional/screenshots/index.js +++ b/test/functional/screenshots/index.js @@ -1,4 +1,3 @@ -var artifacts = require("../../artifacts"); var config = require("../../config/specs"); var helper = require("../helper"); var wd = require("../../wd-helper");