From 926c3326f96befa28004ee071b24af2589255021 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20Erik=20St=C3=B8wer?= Date: Wed, 18 Dec 2024 10:22:15 +0100 Subject: [PATCH] Organize imports with prettier --- package-lock.json | 17 +++++ package.json | 5 ++ src/actions/AssessmentActions.js | 2 +- src/actions/EquipmentActions.js | 2 +- src/actions/StopPlaceActions.js | 9 +-- src/actions/StopPlacesGroupActions.js | 7 +- src/actions/TiamatActions.js | 52 ++++++------- src/actions/UserActions.js | 16 ++-- src/actions/index.ts | 10 +-- src/auth/auth.test.tsx | 4 +- src/auth/auth.tsx | 3 +- .../Dialogs/AddAdjacentStopsDialog.js | 10 +-- src/components/Dialogs/AddMemberToGroup.js | 12 +-- .../Dialogs/AddStopPlaceSuggestionList.js | 2 +- .../Dialogs/AddStopPlaceSuggestionListItem.js | 8 +- .../Dialogs/AddStopPlaceToParent.js | 12 +-- src/components/Dialogs/AltNamesDialog.js | 12 +-- .../Dialogs/CompassBearingDialog.js | 4 +- .../Dialogs/CompassBearingSelector.js | 2 +- src/components/Dialogs/ConfirmDialog.js | 4 +- src/components/Dialogs/CoordinatesDialog.js | 6 +- src/components/Dialogs/DeleteQuayDialog.js | 10 +-- src/components/Dialogs/DialogHeader.js | 4 +- src/components/Dialogs/EditAltName.js | 8 +- src/components/Dialogs/FavoriteNameDialog.js | 8 +- src/components/Dialogs/GroupErrorDialog.js | 2 +- src/components/Dialogs/KeyValuesDialog.js | 14 ++-- src/components/Dialogs/Loader.js | 1 - src/components/Dialogs/MergeQuaysDialog.js | 12 +-- src/components/Dialogs/MergeStopDialog.js | 12 +-- src/components/Dialogs/MoveQuayDialog.js | 12 +-- .../Dialogs/MoveQuayNewStopDialog.js | 12 +-- src/components/Dialogs/NewAltName.js | 4 +- .../Dialogs/RemoveStopFromParentDialog.js | 8 +- .../Dialogs/RequiredFieldsMissingDialog.js | 6 +- src/components/Dialogs/SaveDialog.js | 10 +-- src/components/Dialogs/SaveGroupDialog.js | 2 +- src/components/Dialogs/ScrollableQuayItem.js | 2 +- src/components/Dialogs/ScrollableQuayList.js | 2 +- src/components/Dialogs/TariffZonesItem.js | 1 - .../Dialogs/TerminateStopPlaceDialog.js | 28 +++---- .../Dialogs/WalkingDistanceDialog.js | 4 +- .../AdjacentStopConnection.js | 8 +- .../EditParentStopPage/AdjacentStopList.js | 2 +- .../EditParentStopPage/EditParentGeneral.js | 33 ++++---- .../EditParentStopPage/ParentStopDetails.js | 36 ++++----- .../StopPlaceChildrenItems.js | 2 +- .../EditParentStopPage/StopPlaceList.js | 12 +-- .../StopPlaceListChildItem.js | 2 +- .../EditParentStopPage/StopPlaceListItem.js | 12 +-- .../StopPlaceListItemDetails.js | 12 +-- .../StopPlaceListItemQuayItem.js | 6 +- .../StopPlaceListItemQuays.js | 2 +- src/components/EditStopPage/AcceptChanges.js | 2 +- .../EditStopPage/AcessibilityQuayTab.js | 10 +-- .../EditStopPage/AcessibilityStopTab.js | 10 +-- .../EditStopPage/AddTagAutoComplete.js | 5 +- src/components/EditStopPage/AddTagDialog.js | 6 +- .../EditStopPage/BoardingPositionItem.tsx | 7 +- .../EditStopPage/BoardingPositionsTab.tsx | 2 +- .../EditStopPage/ColumnFilterPopover.js | 6 +- .../EditStopPage/CompassBearingInfo.js | 1 - .../EditStopPage/CreateKeyValuePair.js | 4 +- .../EditStopPage/EditKeyValuePair.js | 4 +- .../EditStopPage/EditQuayAdditional.js | 11 +-- .../EditStopPage/EditStopAdditional.js | 8 +- .../EditStopPage/EditStopBoxTabs.js | 6 +- .../EditStopPage/EditStopGeneral.js | 76 +++++++++---------- .../EditStopPage/FacilitiesQuayTab.js | 28 +++---- .../EditStopPage/FacilitiesStopTab.js | 30 ++++---- src/components/EditStopPage/ImportedId.js | 2 - .../EditStopPage/InformationBanner.js | 6 +- src/components/EditStopPage/Item.js | 2 +- src/components/EditStopPage/ItemHeader.js | 5 +- src/components/EditStopPage/MakeExpandable.js | 4 +- .../EditStopPage/ModalitiesMenuItems.js | 7 +- src/components/EditStopPage/ModalityFilter.js | 4 +- src/components/EditStopPage/NewElementsBox.js | 8 +- .../EditStopPage/NewStopPlaceInfo.js | 6 +- src/components/EditStopPage/ParkingItem.js | 25 +++--- .../ParkingItemPayAndRideExpandedFields.js | 22 +++--- src/components/EditStopPage/QuayDetails.js | 2 +- src/components/EditStopPage/QuayItem.js | 34 ++++----- .../RechargingAvailablePopover.js | 13 ++-- .../EditStopPage/StepFreePopover.js | 11 ++- .../EditStopPage/StopPlaceDetails.js | 69 ++++++++--------- src/components/EditStopPage/TagItem.js | 6 +- src/components/EditStopPage/TagsDialog.js | 6 +- src/components/EditStopPage/ToolTipIcon.js | 1 - src/components/EditStopPage/ToolTippable.js | 2 +- .../EditStopPage/VersionsPopover.js | 6 +- .../EditStopPage/WeightingPopover.js | 12 +-- .../EditStopPage/WheelChairPopover.js | 6 +- .../EditGroupOfStopPlaces.js | 20 ++--- .../GroupOfStopPlacesDetails.js | 8 +- .../GroupOfStopPlacesList.js | 10 +-- .../GroupOfStopPlaces/GroupOfStopPlacesMap.js | 7 +- src/components/Header.js | 44 ++++++----- src/components/MainPage/BelongsToGroup.js | 1 - src/components/MainPage/CircularNumber.js | 2 - src/components/MainPage/CreateNewStop.js | 2 +- src/components/MainPage/FavoritePopover.js | 13 ++-- .../MainPage/GroupOfStopPlacesLink.js | 3 +- src/components/MainPage/GroupResultInfo.js | 6 +- src/components/MainPage/HasExpiredInfo.js | 4 +- src/components/MainPage/ModalityIconImg.js | 2 +- src/components/MainPage/ModalityIconSvg.js | 4 +- src/components/MainPage/MoreMenuItem.tsx | 12 +-- .../MainPage/ParentStopPlaceResultInfo.js | 14 ++-- src/components/MainPage/SearchBox.js | 60 +++++++-------- src/components/MainPage/SearchBoxDetails.js | 9 +-- .../MainPage/SearchBoxEditActions.js | 4 +- .../MainPage/SearchBoxGeoWarning.js | 4 +- .../MainPage/SearchBoxUsingTempGeo.js | 2 +- src/components/MainPage/SearchMenuItem.js | 7 +- .../MainPage/StopPlaceResultInfo.js | 14 ++-- src/components/MainPage/Tag.js | 4 +- src/components/MainPage/TagTray.js | 2 +- .../MainPage/TopographicalFilter.js | 2 +- src/components/Map/BoardingPositionMarker.tsx | 4 +- src/components/Map/CoordinateMarker.js | 4 +- src/components/Map/CustomMarkerIcon.js | 1 - src/components/Map/CycleParkingMarker.js | 10 +-- src/components/Map/EditStopMap.js | 14 ++-- src/components/Map/LeafletMap.js | 21 +++-- src/components/Map/MarkerList.js | 31 ++++---- src/components/Map/MultimodalStopEdges.js | 4 +- src/components/Map/NeighbourMarker.js | 12 +-- src/components/Map/NewStopMarker.js | 6 +- src/components/Map/ParkAndRideMarker.js | 8 +- src/components/Map/PathLink.js | 8 +- src/components/Map/PopupButton.js | 2 +- src/components/Map/QuayMarker.js | 12 +-- src/components/Map/StopPlaceGroup.js | 2 +- src/components/Map/StopPlaceGroupList.js | 5 +- src/components/Map/StopPlaceMarker.js | 8 +- src/components/Map/StopPlacesMap.js | 12 +-- src/components/Map/WMTSLayer.tsx | 4 +- src/components/Map/hooks/useGktToken.ts | 2 +- .../ReportPage/AdvancedReportFilters.js | 8 +- .../ReportPage/GeneralReportFilters.js | 8 +- src/components/ReportPage/ModalityIconTray.js | 4 +- src/components/ReportPage/ReportPageFooter.js | 13 ++-- .../ReportPage/ShowMoreMenuFooter.js | 2 +- src/components/ReportPage/StopPlaceLink.js | 1 - src/components/ReportPage/TagFilterTray.js | 2 +- .../ReportPage/TagSuggestionPopover.js | 18 ++--- src/components/ReportPageV2/StopTypeFilter.js | 11 ++- src/components/SnackbarWrapper.js | 12 +-- src/components/Zones/FareZones.tsx | 8 +- src/components/Zones/TariffZones.tsx | 8 +- src/components/Zones/Zones.tsx | 10 +-- src/config/ConfigContext.ts | 2 +- src/config/themeConfig.js | 12 ++- src/containers/App.js | 22 +++--- src/containers/GroupOfStopPlaces.js | 10 +-- src/containers/LoadingPage.js | 2 +- src/containers/ReportPage.js | 32 ++++---- src/containers/StopPlace.tsx | 24 +++--- src/containers/StopPlaces.js | 16 ++-- src/graphql/OTP/actions.js | 2 +- src/index.js | 26 +++---- src/modelUtils/equipmentHelpers.js | 2 +- src/modelUtils/mapToClient.js | 22 +++--- src/modelUtils/mapToQueryVariables.js | 4 +- src/models/GroupOfStopPlaces.js | 6 +- src/models/ParentStopPlace.js | 6 +- src/models/Parking.js | 2 +- src/models/PathLink.js | 2 +- src/models/StopPlace.js | 10 +-- src/models/columnTransformers.js | 21 +++-- src/reducers/groupOfStopPlacesReducer.js | 4 +- src/reducers/groupReducerUtils.js | 2 +- src/reducers/index.ts | 8 +- src/reducers/rolesReducer.js | 4 +- src/reducers/rolesReducerUtils.js | 6 +- src/reducers/snackbarReducer.js | 2 +- src/reducers/stopPlaceReducer.js | 12 +-- src/roles/rolesParser.js | 6 +- src/static/icons/ParkingIcon.js | 1 - src/static/icons/TransportSign.js | 1 - .../icons/accessibility/NoWheelChair.js | 1 - src/static/icons/accessibility/Stairs.js | 1 - src/static/icons/accessibility/StepFree.js | 1 - src/static/icons/facilities/BikeParking.js | 1 - src/static/icons/facilities/BusShelter.js | 1 - src/static/icons/facilities/Enclosed.js | 1 - src/static/icons/facilities/Heated.js | 1 - src/static/icons/facilities/NoBusShelter.js | 1 - .../icons/facilities/NoTicketMachine.js | 1 - src/static/icons/facilities/TicketMachine.js | 1 - src/static/icons/facilities/WaitingRoom.js | 1 - src/static/icons/spinner.js | 1 - src/store/hooks.ts | 2 +- src/store/store.ts | 4 +- src/test/duplicateIds.spec.js | 4 +- src/test/languages/strings.spec.js | 2 +- src/test/reducers/group.spec.js | 2 +- src/test/reducers/roles.spec.js | 16 ++-- src/test/reducers/stop.model.spec.js | 6 +- src/test/snackbar.spec.js | 2 +- src/test/userAndRoles.spec.js | 2 +- src/utils/iconUtils.ts | 22 +++--- 203 files changed, 891 insertions(+), 950 deletions(-) diff --git a/package-lock.json b/package-lock.json index 50592f682..aab901290 100644 --- a/package-lock.json +++ b/package-lock.json @@ -63,6 +63,7 @@ "jsdom": "25.0.1", "lint-staged": "15.2.11", "prettier": "3.4.2", + "prettier-plugin-organize-imports": "4.1.0", "redux-devtools": "3.7.0", "source-map-explorer": "2.5.3", "typescript": "5.7.2", @@ -5589,6 +5590,22 @@ "url": "https://github.com/prettier/prettier?sponsor=1" } }, + "node_modules/prettier-plugin-organize-imports": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/prettier-plugin-organize-imports/-/prettier-plugin-organize-imports-4.1.0.tgz", + "integrity": "sha512-5aWRdCgv645xaa58X8lOxzZoiHAldAPChljr/MT0crXVOWTZ+Svl4hIWlz+niYSlO6ikE5UXkN1JrRvIP2ut0A==", + "dev": true, + "peerDependencies": { + "prettier": ">=2.0", + "typescript": ">=2.9", + "vue-tsc": "^2.1.0" + }, + "peerDependenciesMeta": { + "vue-tsc": { + "optional": true + } + } + }, "node_modules/pretty-format": { "version": "27.5.1", "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz", diff --git a/package.json b/package.json index 82fb72035..0dc9c856c 100644 --- a/package.json +++ b/package.json @@ -63,6 +63,10 @@ "prettier --write" ] }, + "prettier":{ + "plugins": [ + "prettier-plugin-organize-imports"] + }, "devDependencies": { "@mui/types": "7.2.20", "@testing-library/react": "14.3.1", @@ -82,6 +86,7 @@ "jsdom": "25.0.1", "lint-staged": "15.2.11", "prettier": "3.4.2", + "prettier-plugin-organize-imports": "4.1.0", "redux-devtools": "3.7.0", "source-map-explorer": "2.5.3", "typescript": "5.7.2", diff --git a/src/actions/AssessmentActions.js b/src/actions/AssessmentActions.js index 348f9f859..9decca59b 100644 --- a/src/actions/AssessmentActions.js +++ b/src/actions/AssessmentActions.js @@ -12,9 +12,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import * as types from "./Types"; import * as limitations from "../models/Limitations"; import { createThunk } from "./"; +import * as types from "./Types"; var AssessmentActions = {}; diff --git a/src/actions/EquipmentActions.js b/src/actions/EquipmentActions.js index 0c23ec565..96886a1a9 100644 --- a/src/actions/EquipmentActions.js +++ b/src/actions/EquipmentActions.js @@ -12,8 +12,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import * as types from "./Types"; import { createThunk } from "./"; +import * as types from "./Types"; var EquipmentActions = {}; diff --git a/src/actions/StopPlaceActions.js b/src/actions/StopPlaceActions.js index 84b81d9ae..bbe0ea358 100644 --- a/src/actions/StopPlaceActions.js +++ b/src/actions/StopPlaceActions.js @@ -12,13 +12,12 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import * as types from "./Types"; -import { getCentroid } from "../utils/mapUtils"; -import { UserActions } from "."; +import { createThunk, UserActions } from "."; +import { Entities } from "../models/Entities"; import { getIn } from "../utils"; +import { getCentroid } from "../utils/mapUtils"; import { updateURLWithId } from "../utils/URLhelpers"; -import { createThunk } from "."; -import { Entities } from "../models/Entities"; +import * as types from "./Types"; var StopPlaceActions = {}; diff --git a/src/actions/StopPlacesGroupActions.js b/src/actions/StopPlacesGroupActions.js index 16cf23cc9..da218ac45 100644 --- a/src/actions/StopPlacesGroupActions.js +++ b/src/actions/StopPlacesGroupActions.js @@ -12,14 +12,13 @@ See the Licence for the specific language governing permissions and limitations under the Licence. */ -import * as types from "./Types"; -import { createThunk } from "./"; import { - getStopPlaceById, getAddStopPlaceInfo, + getStopPlaceById, } from "../actions/TiamatActions"; -import { UserActions } from "./"; import Routes from "../routes/"; +import { createThunk, UserActions } from "./"; +import * as types from "./Types"; var StopPlacesGroupActions = {}; diff --git a/src/actions/TiamatActions.js b/src/actions/TiamatActions.js index 7e6027e9c..49498b04f 100644 --- a/src/actions/TiamatActions.js +++ b/src/actions/TiamatActions.js @@ -13,54 +13,54 @@ See the Licence for the specific language governing permissions and limitations under the Licence. */ import { + deleteGroupMutation, + deleteParkingMutation, + mutateAddToMultiModalStopPlace, + mutateCreateMultiModalStopPlace, + mutateCreateTag, mutateDeleteQuay, mutateDeleteStopPlace, + mutateGroupOfStopPlaces, mutateMergeQuays, mutateMergeStopPlaces, - mutateMoveQuaysToStop, mutateMoveQuaysToNewStop, + mutateMoveQuaysToStop, mutateParentStopPlace, - mutateAddToMultiModalStopPlace, - mutateCreateMultiModalStopPlace, - removeStopPlaceFromParent, - mutateStopPlace, - updateChildOfParentStop, + mutateParking, + mutatePathLink, mutateRemoveTag, - mutateCreateTag, + mutateStopPlace, mutateTerminateStopPlace, - mutateGroupOfStopPlaces, - deleteGroupMutation, - deleteParkingMutation, - mutatePathLink, - mutateParking, + removeStopPlaceFromParent, + updateChildOfParentStop, } from "../graphql/Tiamat/mutations"; import { - allVersionsOfStopPlace, allEntities, - stopPlaceBBQuery, - getMergeInfoStopPlace, - topopGraphicalPlacesQuery, + allVersionsOfStopPlace, findStop, - getStopPlacesById, - getPolygons as getPolygonsQuery, - getTagsQuery, + findStopForReport as findStopForReportQuery, findTagByNameQuery, - getStopById, + getGroupOfStopPlaceQuery, + getMergeInfoStopPlace, + getParkingForMultipleStopPlaces as getParkingForMultipleStopPlacesQuery, + getPolygons as getPolygonsQuery, getQueryTopographicPlaces, + getStopById, + getStopPlacesById, getTagsByNameQuery, - getGroupOfStopPlaceQuery, + getTagsQuery, + neighbourStopPlaceQuays, stopPlaceAndPathLinkByVersion, - findStopForReport as findStopForReportQuery, - getParkingForMultipleStopPlaces as getParkingForMultipleStopPlacesQuery, + stopPlaceBBQuery, + topopGraphicalPlacesQuery, topopGraphicalPlacesReportQuery, - neighbourStopPlaceQuays, } from "../graphql/Tiamat/queries"; import mapToMutationVariables from "../modelUtils/mapToQueryVariables"; -import { createApolloErrorThunk, createApolloThunk } from "."; -import * as types from "./Types"; import { v4 as uuidv4 } from "uuid"; +import { createApolloErrorThunk, createApolloThunk } from "."; import { getTiamatClient } from "../graphql/clients"; +import * as types from "./Types"; export const getContext = async (auth) => { let token; diff --git a/src/actions/UserActions.js b/src/actions/UserActions.js index 5ae1ce9ea..626df881c 100644 --- a/src/actions/UserActions.js +++ b/src/actions/UserActions.js @@ -12,20 +12,20 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import * as types from "./Types"; -import configureLocalization from "../localization/localization"; -import FavoriteManager from "../singletons/FavoriteManager"; -import SettingsManager from "../singletons/SettingsManager"; +import { push } from "redux-first-history"; import { - getMergeInfoForStops, getAddStopPlaceInfo, + getMergeInfoForStops, } from "../actions/TiamatActions"; -import { getIn } from "../utils/"; +import { checkQuayUsage, checkStopPlaceUsage } from "../graphql/OTP/actions"; +import configureLocalization from "../localization/localization"; import ParentStopPlace from "../models/ParentStopPlace"; import Routes from "../routes/"; +import FavoriteManager from "../singletons/FavoriteManager"; +import SettingsManager from "../singletons/SettingsManager"; +import { getIn } from "../utils/"; import { createThunk } from "./"; -import { checkStopPlaceUsage, checkQuayUsage } from "../graphql/OTP/actions"; -import { push } from "redux-first-history"; +import * as types from "./Types"; var UserActions = {}; diff --git a/src/actions/index.ts b/src/actions/index.ts index edb9b31af..d21fdb234 100644 --- a/src/actions/index.ts +++ b/src/actions/index.ts @@ -12,19 +12,19 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import StopPlaceActions from "./StopPlaceActions"; -import UserActions from "./UserActions"; +import { getOperationAST } from "graphql"; import AssessmentActions from "./AssessmentActions"; import EquipmentActions from "./EquipmentActions"; +import StopPlaceActions from "./StopPlaceActions"; import StopPlacesGroupActions from "./StopPlacesGroupActions"; -import { getOperationAST } from "graphql"; +import UserActions from "./UserActions"; export { - StopPlaceActions, - UserActions, AssessmentActions, EquipmentActions, + StopPlaceActions, StopPlacesGroupActions, + UserActions, }; export const createThunk = (type: string, payload: any) => ({ diff --git a/src/auth/auth.test.tsx b/src/auth/auth.test.tsx index cdbb67335..0e6640cae 100644 --- a/src/auth/auth.test.tsx +++ b/src/auth/auth.test.tsx @@ -1,9 +1,9 @@ import { renderHook } from "@testing-library/react"; -import { useAuth } from "./auth"; import { ConfigContext } from "../config/ConfigContext"; +import { useAuth } from "./auth"; -import { describe, test, expect, vi } from "vitest"; +import { describe, expect, test, vi } from "vitest"; vi.mock("react-oidc-context", async () => { return { diff --git a/src/auth/auth.tsx b/src/auth/auth.tsx index c1fc94a01..969a8f838 100644 --- a/src/auth/auth.tsx +++ b/src/auth/auth.tsx @@ -1,7 +1,6 @@ -import { useCallback, useEffect } from "react"; +import { useCallback } from "react"; import { AuthProvider as OidcAuthProvider, - hasAuthParams, useAuth as useOidcAuth, } from "react-oidc-context"; import { useConfig } from "../config/ConfigContext"; diff --git a/src/components/Dialogs/AddAdjacentStopsDialog.js b/src/components/Dialogs/AddAdjacentStopsDialog.js index 9abece4c5..7305e40d2 100644 --- a/src/components/Dialogs/AddAdjacentStopsDialog.js +++ b/src/components/Dialogs/AddAdjacentStopsDialog.js @@ -12,11 +12,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; -import PropTypes from "prop-types"; -import { injectIntl } from "react-intl"; -import { connect } from "react-redux"; -import AddStopPlaceSuggestionListItem from "./AddStopPlaceSuggestionListItem"; import { Box, Button, @@ -25,6 +20,11 @@ import { DialogContent, DialogTitle, } from "@mui/material"; +import PropTypes from "prop-types"; +import React from "react"; +import { injectIntl } from "react-intl"; +import { connect } from "react-redux"; +import AddStopPlaceSuggestionListItem from "./AddStopPlaceSuggestionListItem"; class AddAdjacentStopDialog extends React.Component { constructor(props) { diff --git a/src/components/Dialogs/AddMemberToGroup.js b/src/components/Dialogs/AddMemberToGroup.js index b868942ff..4b8079423 100644 --- a/src/components/Dialogs/AddMemberToGroup.js +++ b/src/components/Dialogs/AddMemberToGroup.js @@ -12,12 +12,6 @@ See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React, { Component } from "react"; -import { injectIntl } from "react-intl"; -import PropTypes from "prop-types"; -import { connect } from "react-redux"; -import { getGroupMemberSuggestions } from "../../modelUtils/leafletUtils"; -import AddStopPlaceSuggestionList from "./AddStopPlaceSuggestionList"; import { Box, Button, @@ -26,6 +20,12 @@ import { DialogContent, DialogTitle, } from "@mui/material"; +import PropTypes from "prop-types"; +import { Component } from "react"; +import { injectIntl } from "react-intl"; +import { connect } from "react-redux"; +import { getGroupMemberSuggestions } from "../../modelUtils/leafletUtils"; +import AddStopPlaceSuggestionList from "./AddStopPlaceSuggestionList"; class AddMemberToGroup extends Component { constructor(props) { diff --git a/src/components/Dialogs/AddStopPlaceSuggestionList.js b/src/components/Dialogs/AddStopPlaceSuggestionList.js index 26b3bc007..003617ab3 100644 --- a/src/components/Dialogs/AddStopPlaceSuggestionList.js +++ b/src/components/Dialogs/AddStopPlaceSuggestionList.js @@ -12,8 +12,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React, { Component } from "react"; import PropTypes from "prop-types"; +import { Component } from "react"; import AddStopPlaceSuggestionListItem from "./AddStopPlaceSuggestionListItem"; class AddStopPlaceSuggestionList extends Component { diff --git a/src/components/Dialogs/AddStopPlaceSuggestionListItem.js b/src/components/Dialogs/AddStopPlaceSuggestionListItem.js index 271f5e918..41215f1f3 100644 --- a/src/components/Dialogs/AddStopPlaceSuggestionListItem.js +++ b/src/components/Dialogs/AddStopPlaceSuggestionListItem.js @@ -12,13 +12,13 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React, { Component } from "react"; -import PropTypes from "prop-types"; +import { FormControlLabel } from "@mui/material"; import Checkbox from "@mui/material/Checkbox"; -import ModalityIconImg from "../MainPage/ModalityIconImg"; +import PropTypes from "prop-types"; +import { Component } from "react"; import { injectIntl } from "react-intl"; import HasExpiredInfo from "../MainPage/HasExpiredInfo"; -import { FormControlLabel } from "@mui/material"; +import ModalityIconImg from "../MainPage/ModalityIconImg"; class AddStopPlaceSuggestionListItem extends Component { render() { diff --git a/src/components/Dialogs/AddStopPlaceToParent.js b/src/components/Dialogs/AddStopPlaceToParent.js index 5acee6a2d..bd31edfd0 100644 --- a/src/components/Dialogs/AddStopPlaceToParent.js +++ b/src/components/Dialogs/AddStopPlaceToParent.js @@ -12,12 +12,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React, { Component } from "react"; -import { injectIntl } from "react-intl"; -import PropTypes from "prop-types"; -import { connect } from "react-redux"; -import { getChildStopPlaceSuggestions } from "../../modelUtils/leafletUtils"; -import AddStopPlaceSuggestionList from "./AddStopPlaceSuggestionList"; import { Box, Button, @@ -27,6 +21,12 @@ import { DialogContent, DialogTitle, } from "@mui/material"; +import PropTypes from "prop-types"; +import { Component } from "react"; +import { injectIntl } from "react-intl"; +import { connect } from "react-redux"; +import { getChildStopPlaceSuggestions } from "../../modelUtils/leafletUtils"; +import AddStopPlaceSuggestionList from "./AddStopPlaceSuggestionList"; class AddStopPlaceToParent extends Component { constructor(props) { diff --git a/src/components/Dialogs/AltNamesDialog.js b/src/components/Dialogs/AltNamesDialog.js index 893c6d096..558b96299 100644 --- a/src/components/Dialogs/AltNamesDialog.js +++ b/src/components/Dialogs/AltNamesDialog.js @@ -12,18 +12,18 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; -import { connect } from "react-redux"; import MdDelete from "@mui/icons-material/Delete"; -import * as altNameConfig from "../../config/altNamesConfig"; import MdEdit from "@mui/icons-material/ModeEdit"; import IconButton from "@mui/material/IconButton"; +import React from "react"; +import { connect } from "react-redux"; import { StopPlaceActions } from "../../actions/"; -import ConfirmDialog from "./ConfirmDialog"; +import * as altNameConfig from "../../config/altNamesConfig"; import { getPrimaryColor } from "../../config/themeConfig"; -import NewAltName from "./NewAltName"; -import EditAltName from "./EditAltName"; +import ConfirmDialog from "./ConfirmDialog"; import DialogHeader from "./DialogHeader"; +import EditAltName from "./EditAltName"; +import NewAltName from "./NewAltName"; class AltNamesDialog extends React.Component { constructor(props) { diff --git a/src/components/Dialogs/CompassBearingDialog.js b/src/components/Dialogs/CompassBearingDialog.js index 0f6c97a8c..4ec0776ac 100644 --- a/src/components/Dialogs/CompassBearingDialog.js +++ b/src/components/Dialogs/CompassBearingDialog.js @@ -1,5 +1,3 @@ -import React from "react"; -import PropTypes from "prop-types"; import { Button, Dialog, @@ -8,6 +6,8 @@ import { DialogTitle, TextField, } from "@mui/material"; +import PropTypes from "prop-types"; +import React from "react"; import CompassBearingSelector from "./CompassBearingSelector"; class CompassBearingDialog extends React.Component { diff --git a/src/components/Dialogs/CompassBearingSelector.js b/src/components/Dialogs/CompassBearingSelector.js index 13c031ec8..d1e310176 100644 --- a/src/components/Dialogs/CompassBearingSelector.js +++ b/src/components/Dialogs/CompassBearingSelector.js @@ -1,5 +1,5 @@ -import React, { useRef } from "react"; import { Box, Typography } from "@mui/material"; +import { useRef } from "react"; const CompassBearingSelector = ({ bearing, onBearingChange }) => { const compassRef = useRef(null); diff --git a/src/components/Dialogs/ConfirmDialog.js b/src/components/Dialogs/ConfirmDialog.js index cba0cd590..583b25a19 100644 --- a/src/components/Dialogs/ConfirmDialog.js +++ b/src/components/Dialogs/ConfirmDialog.js @@ -12,8 +12,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; -import PropTypes from "prop-types"; import { Button, ButtonGroup, @@ -22,6 +20,8 @@ import { DialogContent, DialogTitle, } from "@mui/material"; +import PropTypes from "prop-types"; +import React from "react"; class ConfirmDialog extends React.Component { static propTypes = { diff --git a/src/components/Dialogs/CoordinatesDialog.js b/src/components/Dialogs/CoordinatesDialog.js index a351a4ddc..2e6513899 100644 --- a/src/components/Dialogs/CoordinatesDialog.js +++ b/src/components/Dialogs/CoordinatesDialog.js @@ -12,16 +12,16 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; -import PropTypes from "prop-types"; import { Button, Dialog, DialogActions, DialogContent, DialogTitle, + TextField, } from "@mui/material"; -import { TextField } from "@mui/material"; +import PropTypes from "prop-types"; +import React from "react"; import { extractCoordinates } from "../../utils/"; class CoordinatesDialog extends React.Component { diff --git a/src/components/Dialogs/DeleteQuayDialog.js b/src/components/Dialogs/DeleteQuayDialog.js index c2ca0b936..9f66913b3 100644 --- a/src/components/Dialogs/DeleteQuayDialog.js +++ b/src/components/Dialogs/DeleteQuayDialog.js @@ -12,10 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; -import PropTypes from "prop-types"; -import Spinner from "../../static/icons/spinner"; -import { getQuaySearchUrl } from "../../utils/shamash"; +import { Cancel, Delete, Warning } from "@mui/icons-material"; import { Button, Checkbox, @@ -25,7 +22,10 @@ import { DialogTitle, FormControlLabel, } from "@mui/material"; -import { Cancel, Delete, Warning } from "@mui/icons-material"; +import PropTypes from "prop-types"; +import React from "react"; +import Spinner from "../../static/icons/spinner"; +import { getQuaySearchUrl } from "../../utils/shamash"; class DeleteQuayDialog extends React.Component { constructor(props) { diff --git a/src/components/Dialogs/DialogHeader.js b/src/components/Dialogs/DialogHeader.js index 65254b9d5..a19e0af28 100644 --- a/src/components/Dialogs/DialogHeader.js +++ b/src/components/Dialogs/DialogHeader.js @@ -12,10 +12,10 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React, { Component } from "react"; -import PropTypes from "prop-types"; import MdClose from "@mui/icons-material/Close"; import IconButton from "@mui/material/IconButton"; +import PropTypes from "prop-types"; +import { Component } from "react"; class DialogHeader extends Component { render() { diff --git a/src/components/Dialogs/EditAltName.js b/src/components/Dialogs/EditAltName.js index a7e5b32a9..98922c7bf 100644 --- a/src/components/Dialogs/EditAltName.js +++ b/src/components/Dialogs/EditAltName.js @@ -12,15 +12,15 @@ See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React, { Component } from "react"; +import MdClose from "@mui/icons-material/Close"; import FlatButton from "@mui/material/Button"; -import Select from "@mui/material/Select"; +import IconButton from "@mui/material/IconButton"; import MenuItem from "@mui/material/MenuItem"; +import Select from "@mui/material/Select"; import TextField from "@mui/material/TextField"; +import { Component } from "react"; import * as altNameConfig from "../../config/altNamesConfig"; import { getIn } from "../../utils/"; -import MdClose from "@mui/icons-material/Close"; -import IconButton from "@mui/material/IconButton"; class EditAltName extends Component { constructor(props) { diff --git a/src/components/Dialogs/FavoriteNameDialog.js b/src/components/Dialogs/FavoriteNameDialog.js index b18a3b8d9..4cd9777bd 100644 --- a/src/components/Dialogs/FavoriteNameDialog.js +++ b/src/components/Dialogs/FavoriteNameDialog.js @@ -12,10 +12,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; -import { connect } from "react-redux"; -import { injectIntl } from "react-intl"; -import { UserActions } from "../../actions/"; import { Button, Dialog, @@ -24,6 +20,10 @@ import { DialogTitle, TextField, } from "@mui/material"; +import React from "react"; +import { injectIntl } from "react-intl"; +import { connect } from "react-redux"; +import { UserActions } from "../../actions/"; class FavoriteNameDialog extends React.Component { constructor(props) { diff --git a/src/components/Dialogs/GroupErrorDialog.js b/src/components/Dialogs/GroupErrorDialog.js index 9a619eb8c..563f52211 100644 --- a/src/components/Dialogs/GroupErrorDialog.js +++ b/src/components/Dialogs/GroupErrorDialog.js @@ -19,7 +19,7 @@ import { DialogContent, DialogTitle, } from "@mui/material"; -import React, { Component } from "react"; +import { Component } from "react"; import { injectIntl } from "react-intl"; class GroupErrorDialog extends Component { diff --git a/src/components/Dialogs/KeyValuesDialog.js b/src/components/Dialogs/KeyValuesDialog.js index 260e455c8..10d9a506a 100644 --- a/src/components/Dialogs/KeyValuesDialog.js +++ b/src/components/Dialogs/KeyValuesDialog.js @@ -12,18 +12,18 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ +import Add from "@mui/icons-material/Add"; +import MdRemove from "@mui/icons-material/Delete"; +import MdEdit from "@mui/icons-material/ModeEdit"; +import Fab from "@mui/material/Fab"; import React from "react"; import { connect } from "react-redux"; -import MdEdit from "@mui/icons-material/ModeEdit"; -import MdRemove from "@mui/icons-material/Delete"; -import { getPrimaryColor } from "../../config/themeConfig"; -import EditKeyValuePair from "../EditStopPage/EditKeyValuePair"; -import CreateKeyValuePair from "../EditStopPage/CreateKeyValuePair"; import { StopPlaceActions, UserActions } from "../../actions/"; -import Fab from "@mui/material/Fab"; +import { getPrimaryColor } from "../../config/themeConfig"; import { selectKeyValuesDataSource } from "../../reducers/selectors"; +import CreateKeyValuePair from "../EditStopPage/CreateKeyValuePair"; +import EditKeyValuePair from "../EditStopPage/EditKeyValuePair"; import DialogHeader from "./DialogHeader"; -import Add from "@mui/icons-material/Add"; class KeyValuesDialog extends React.Component { constructor(props) { diff --git a/src/components/Dialogs/Loader.js b/src/components/Dialogs/Loader.js index 523f2e3e2..38c2b3a09 100644 --- a/src/components/Dialogs/Loader.js +++ b/src/components/Dialogs/Loader.js @@ -12,7 +12,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; import CircularProgress from "@mui/material/CircularProgress"; const Loader = () => { diff --git a/src/components/Dialogs/MergeQuaysDialog.js b/src/components/Dialogs/MergeQuaysDialog.js index 4c6d15b80..c8a5b06b4 100644 --- a/src/components/Dialogs/MergeQuaysDialog.js +++ b/src/components/Dialogs/MergeQuaysDialog.js @@ -12,11 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; -import PropTypes from "prop-types"; -import MergeQuaysDetails from "../EditStopPage/MergeQuaysDetails"; -import AcceptChanges from "../EditStopPage/AcceptChanges"; -import Spinner from "../../static/icons/spinner"; +import { Cancel, Merge } from "@mui/icons-material"; import { Button, Dialog, @@ -24,7 +20,11 @@ import { DialogContent, DialogTitle, } from "@mui/material"; -import { Cancel, Merge } from "@mui/icons-material"; +import PropTypes from "prop-types"; +import React from "react"; +import Spinner from "../../static/icons/spinner"; +import AcceptChanges from "../EditStopPage/AcceptChanges"; +import MergeQuaysDetails from "../EditStopPage/MergeQuaysDetails"; class MergeQuaysDialog extends React.Component { constructor(props) { diff --git a/src/components/Dialogs/MergeStopDialog.js b/src/components/Dialogs/MergeStopDialog.js index a29a0bcac..df3e20c44 100644 --- a/src/components/Dialogs/MergeStopDialog.js +++ b/src/components/Dialogs/MergeStopDialog.js @@ -12,11 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; -import PropTypes from "prop-types"; -import AcceptChanges from "../EditStopPage/AcceptChanges"; -import QuayDetails from "../EditStopPage/QuayDetails"; -import Spinner from "../../static/icons/spinner"; +import { Cancel, Merge } from "@mui/icons-material"; import { Button, Dialog, @@ -24,7 +20,11 @@ import { DialogContent, DialogTitle, } from "@mui/material"; -import { Cancel, Merge } from "@mui/icons-material"; +import PropTypes from "prop-types"; +import React from "react"; +import Spinner from "../../static/icons/spinner"; +import AcceptChanges from "../EditStopPage/AcceptChanges"; +import QuayDetails from "../EditStopPage/QuayDetails"; class MergeStopDialog extends React.Component { constructor(props) { diff --git a/src/components/Dialogs/MoveQuayDialog.js b/src/components/Dialogs/MoveQuayDialog.js index 95b364311..1822987be 100644 --- a/src/components/Dialogs/MoveQuayDialog.js +++ b/src/components/Dialogs/MoveQuayDialog.js @@ -12,11 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; -import PropTypes from "prop-types"; -import Code from "../EditStopPage/Code"; -import AcceptChanges from "../EditStopPage/AcceptChanges"; -import Spinner from "../../static/icons/spinner"; +import { Cancel, Merge } from "@mui/icons-material"; import { Button, Dialog, @@ -24,7 +20,11 @@ import { DialogContent, DialogTitle, } from "@mui/material"; -import { Cancel, Merge } from "@mui/icons-material"; +import PropTypes from "prop-types"; +import React from "react"; +import Spinner from "../../static/icons/spinner"; +import AcceptChanges from "../EditStopPage/AcceptChanges"; +import Code from "../EditStopPage/Code"; class MoveQuayDialog extends React.Component { constructor(props) { diff --git a/src/components/Dialogs/MoveQuayNewStopDialog.js b/src/components/Dialogs/MoveQuayNewStopDialog.js index c9e867225..f17184c82 100644 --- a/src/components/Dialogs/MoveQuayNewStopDialog.js +++ b/src/components/Dialogs/MoveQuayNewStopDialog.js @@ -12,11 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; -import PropTypes from "prop-types"; -import AcceptChanges from "../EditStopPage/AcceptChanges"; -import ScrollableQuayList from "./ScrollableQuayList"; -import Spinner from "../../static/icons/spinner"; +import { Cancel, Merge } from "@mui/icons-material"; import { Button, Dialog, @@ -24,7 +20,11 @@ import { DialogContent, DialogTitle, } from "@mui/material"; -import { Cancel, Merge } from "@mui/icons-material"; +import PropTypes from "prop-types"; +import React from "react"; +import Spinner from "../../static/icons/spinner"; +import AcceptChanges from "../EditStopPage/AcceptChanges"; +import ScrollableQuayList from "./ScrollableQuayList"; class MoveQuayNewStopDialog extends React.Component { constructor(props) { diff --git a/src/components/Dialogs/NewAltName.js b/src/components/Dialogs/NewAltName.js index 92dbf506e..401f99d03 100644 --- a/src/components/Dialogs/NewAltName.js +++ b/src/components/Dialogs/NewAltName.js @@ -12,11 +12,11 @@ See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React, { Component } from "react"; import FlatButton from "@mui/material/Button"; -import Select from "@mui/material/Select"; import MenuItem from "@mui/material/MenuItem"; +import Select from "@mui/material/Select"; import TextField from "@mui/material/TextField"; +import { Component } from "react"; import * as altNameConfig from "../../config/altNamesConfig"; class NewAltName extends Component { diff --git a/src/components/Dialogs/RemoveStopFromParentDialog.js b/src/components/Dialogs/RemoveStopFromParentDialog.js index 37ac64fc5..21469181c 100644 --- a/src/components/Dialogs/RemoveStopFromParentDialog.js +++ b/src/components/Dialogs/RemoveStopFromParentDialog.js @@ -12,9 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; -import PropTypes from "prop-types"; -import Spinner from "../../static/icons/spinner"; +import { Cancel, Delete, Warning } from "@mui/icons-material"; import { Button, Checkbox, @@ -24,7 +22,9 @@ import { DialogTitle, FormControlLabel, } from "@mui/material"; -import { Cancel, Delete, Warning } from "@mui/icons-material"; +import PropTypes from "prop-types"; +import React from "react"; +import Spinner from "../../static/icons/spinner"; class RemoveStopFromParentDialog extends React.Component { constructor(props) { diff --git a/src/components/Dialogs/RequiredFieldsMissingDialog.js b/src/components/Dialogs/RequiredFieldsMissingDialog.js index fd25026ad..f059692b6 100644 --- a/src/components/Dialogs/RequiredFieldsMissingDialog.js +++ b/src/components/Dialogs/RequiredFieldsMissingDialog.js @@ -1,5 +1,4 @@ -import React, { Component } from "react"; -import PropTypes from "prop-types"; +import { Info } from "@mui/icons-material"; import { Button, Dialog, @@ -7,7 +6,8 @@ import { DialogContent, DialogTitle, } from "@mui/material"; -import { Info } from "@mui/icons-material"; +import PropTypes from "prop-types"; +import { Component } from "react"; class RequiredFieldsMissingDialog extends Component { render() { diff --git a/src/components/Dialogs/SaveDialog.js b/src/components/Dialogs/SaveDialog.js index 73a686238..cebae3ce3 100644 --- a/src/components/Dialogs/SaveDialog.js +++ b/src/components/Dialogs/SaveDialog.js @@ -12,18 +12,18 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; -import PropTypes from "prop-types"; -import MdSpinner from "../../static/icons/spinner"; +import { Cancel, Save } from "@mui/icons-material"; import { Button, Dialog, DialogActions, DialogContent, DialogTitle, + TextField, } from "@mui/material"; -import { Cancel, Save } from "@mui/icons-material"; -import { TextField } from "@mui/material"; +import PropTypes from "prop-types"; +import React from "react"; +import MdSpinner from "../../static/icons/spinner"; class SaveDialog extends React.Component { constructor(props) { diff --git a/src/components/Dialogs/SaveGroupDialog.js b/src/components/Dialogs/SaveGroupDialog.js index 7c47e0e72..58e71d16b 100644 --- a/src/components/Dialogs/SaveGroupDialog.js +++ b/src/components/Dialogs/SaveGroupDialog.js @@ -19,7 +19,7 @@ import { DialogContent, DialogTitle, } from "@mui/material"; -import React, { Component } from "react"; +import { Component } from "react"; import { injectIntl } from "react-intl"; class SaveGroupDialog extends Component { diff --git a/src/components/Dialogs/ScrollableQuayItem.js b/src/components/Dialogs/ScrollableQuayItem.js index 4ed38a86f..0031e5c24 100644 --- a/src/components/Dialogs/ScrollableQuayItem.js +++ b/src/components/Dialogs/ScrollableQuayItem.js @@ -12,9 +12,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ +import Checkbox from "@mui/material/Checkbox"; import React from "react"; import Code from "../EditStopPage/Code"; -import Checkbox from "@mui/material/Checkbox"; class ScrollableQuayItem extends React.Component { render() { diff --git a/src/components/Dialogs/ScrollableQuayList.js b/src/components/Dialogs/ScrollableQuayList.js index 5fc5316ac..27fdff013 100644 --- a/src/components/Dialogs/ScrollableQuayList.js +++ b/src/components/Dialogs/ScrollableQuayList.js @@ -13,8 +13,8 @@ See the Licence for the specific language governing permissions and limitations under the Licence. */ import React from "react"; -import ScrollableQuayItem from "./ScrollableQuayItem"; import { getPrimaryColor } from "../../config/themeConfig"; +import ScrollableQuayItem from "./ScrollableQuayItem"; class ScrollableQuayList extends React.Component { constructor(props) { diff --git a/src/components/Dialogs/TariffZonesItem.js b/src/components/Dialogs/TariffZonesItem.js index 24d1f0a52..7f8b78824 100644 --- a/src/components/Dialogs/TariffZonesItem.js +++ b/src/components/Dialogs/TariffZonesItem.js @@ -12,7 +12,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; import PropTypes from "prop-types"; const itemStyle = { diff --git a/src/components/Dialogs/TerminateStopPlaceDialog.js b/src/components/Dialogs/TerminateStopPlaceDialog.js index 49377a912..c5649bfeb 100644 --- a/src/components/Dialogs/TerminateStopPlaceDialog.js +++ b/src/components/Dialogs/TerminateStopPlaceDialog.js @@ -12,21 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; -import PropTypes from "prop-types"; -import Checkbox from "@mui/material/Checkbox"; -import { - DatePicker, - MuiPickersAdapterContext, - TimePicker, -} from "@mui/x-date-pickers/"; -import { LocalizationProvider } from "@mui/x-date-pickers/LocalizationProvider"; -import { AdapterMoment } from "@mui/x-date-pickers/AdapterMoment"; -import { getEarliestFromDate } from "../../utils/saveDialogUtils"; -import TextField from "@mui/material/TextField"; -import helpers from "../../modelUtils/mapToQueryVariables"; -import Spinner from "../../static/icons/spinner"; -import { getStopPlaceSearchUrl } from "../../utils/shamash"; +import { Cancel, Delete, DeleteForever, Warning } from "@mui/icons-material"; import { Button, Dialog, @@ -36,8 +22,18 @@ import { FormControlLabel, FormGroup, } from "@mui/material"; -import { Cancel, Delete, DeleteForever, Warning } from "@mui/icons-material"; +import Checkbox from "@mui/material/Checkbox"; +import TextField from "@mui/material/TextField"; +import { DatePicker, TimePicker } from "@mui/x-date-pickers/"; +import { AdapterMoment } from "@mui/x-date-pickers/AdapterMoment"; +import { LocalizationProvider } from "@mui/x-date-pickers/LocalizationProvider"; import moment from "moment"; +import PropTypes from "prop-types"; +import React from "react"; +import helpers from "../../modelUtils/mapToQueryVariables"; +import Spinner from "../../static/icons/spinner"; +import { getEarliestFromDate } from "../../utils/saveDialogUtils"; +import { getStopPlaceSearchUrl } from "../../utils/shamash"; class TerminateStopPlaceDialog extends React.Component { static propTypes = { diff --git a/src/components/Dialogs/WalkingDistanceDialog.js b/src/components/Dialogs/WalkingDistanceDialog.js index da18a1e54..30481d68f 100644 --- a/src/components/Dialogs/WalkingDistanceDialog.js +++ b/src/components/Dialogs/WalkingDistanceDialog.js @@ -12,8 +12,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; -import PropTypes from "prop-types"; import { Button, Dialog, @@ -22,6 +20,8 @@ import { DialogTitle, TextField, } from "@mui/material"; +import PropTypes from "prop-types"; +import React from "react"; class WalkingDistanceDialog extends React.Component { constructor(props) { diff --git a/src/components/EditParentStopPage/AdjacentStopConnection.js b/src/components/EditParentStopPage/AdjacentStopConnection.js index 6fedc1fb5..522f257eb 100644 --- a/src/components/EditParentStopPage/AdjacentStopConnection.js +++ b/src/components/EditParentStopPage/AdjacentStopConnection.js @@ -12,12 +12,12 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React, { Component } from "react"; -import PropTypes from "prop-types"; -import { injectIntl } from "react-intl"; -import EditorInsertLink from "@mui/icons-material/InsertLink"; import MdDelete from "@mui/icons-material/Delete"; +import EditorInsertLink from "@mui/icons-material/InsertLink"; import IconButton from "@mui/material/IconButton"; +import PropTypes from "prop-types"; +import { Component } from "react"; +import { injectIntl } from "react-intl"; class AdjacentStopConnection extends Component { handleRemoveAdjacentConnection = () => { diff --git a/src/components/EditParentStopPage/AdjacentStopList.js b/src/components/EditParentStopPage/AdjacentStopList.js index a8570d329..199bf7fcd 100644 --- a/src/components/EditParentStopPage/AdjacentStopList.js +++ b/src/components/EditParentStopPage/AdjacentStopList.js @@ -12,8 +12,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React, { Component } from "react"; import PropTypes from "prop-types"; +import { Component } from "react"; import { injectIntl } from "react-intl"; import AdjacentStopConnection from "./AdjacentStopConnection"; diff --git a/src/components/EditParentStopPage/EditParentGeneral.js b/src/components/EditParentStopPage/EditParentGeneral.js index 8bb332b9b..d802c1395 100644 --- a/src/components/EditParentStopPage/EditParentGeneral.js +++ b/src/components/EditParentStopPage/EditParentGeneral.js @@ -12,25 +12,14 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; -import { connect } from "react-redux"; -import { injectIntl } from "react-intl"; -import FlatButton from "@mui/material/Button"; -import ParentStopDetails from "./ParentStopDetails"; import MdBack from "@mui/icons-material/ArrowBack"; -import VersionsPopover from "../EditStopPage/VersionsPopover"; -import MdUndo from "@mui/icons-material/Undo"; import MdSave from "@mui/icons-material/Save"; -import ConfirmDialog from "../Dialogs/ConfirmDialog"; +import MdUndo from "@mui/icons-material/Undo"; +import FlatButton from "@mui/material/Button"; +import React from "react"; +import { injectIntl } from "react-intl"; +import { connect } from "react-redux"; import { StopPlaceActions, UserActions } from "../../actions/"; -import SaveDialog from "../Dialogs/SaveDialog"; -import AddAdjacentStopsDialog from "../Dialogs/AddAdjacentStopsDialog"; -import mapToMutationVariables from "../../modelUtils/mapToQueryVariables"; -import * as types from "../../actions/Types"; -import { MutationErrorCodes } from "../../models/ErrorCodes"; -import RemoveStopFromParentDialog from "../Dialogs/RemoveStopFromParentDialog"; -import TerminateStopPlaceDialog from "../Dialogs/TerminateStopPlaceDialog"; -import { getIn, getIsCurrentVersionMax } from "../../utils/"; import { addToMultiModalStopPlace, createParentStopPlace, @@ -42,8 +31,18 @@ import { saveParentStopPlace, terminateStop, } from "../../actions/TiamatActions"; -import Routes from "../../routes"; +import * as types from "../../actions/Types"; +import { MutationErrorCodes } from "../../models/ErrorCodes"; +import mapToMutationVariables from "../../modelUtils/mapToQueryVariables"; import SettingsManager from "../../singletons/SettingsManager"; +import { getIn, getIsCurrentVersionMax } from "../../utils/"; +import AddAdjacentStopsDialog from "../Dialogs/AddAdjacentStopsDialog"; +import ConfirmDialog from "../Dialogs/ConfirmDialog"; +import RemoveStopFromParentDialog from "../Dialogs/RemoveStopFromParentDialog"; +import SaveDialog from "../Dialogs/SaveDialog"; +import TerminateStopPlaceDialog from "../Dialogs/TerminateStopPlaceDialog"; +import VersionsPopover from "../EditStopPage/VersionsPopover"; +import ParentStopDetails from "./ParentStopDetails"; class EditParentGeneral extends React.Component { constructor(props) { diff --git a/src/components/EditParentStopPage/ParentStopDetails.js b/src/components/EditParentStopPage/ParentStopDetails.js index 4b6fc0985..148d980a7 100644 --- a/src/components/EditParentStopPage/ParentStopDetails.js +++ b/src/components/EditParentStopPage/ParentStopDetails.js @@ -12,27 +12,16 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React, { Component } from "react"; -import { connect } from "react-redux"; -import { injectIntl } from "react-intl"; +import MdLanguage from "@mui/icons-material/Language"; import MdWarning from "@mui/icons-material/Warning"; +import FlatButton from "@mui/material/Button"; +import Divider from "@mui/material/Divider"; import IconButton from "@mui/material/IconButton"; -import MdLanguage from "@mui/icons-material/Language"; -import ImportedId from "../EditStopPage/ImportedId"; -import { StopPlaceActions } from "../../actions/"; import TextField from "@mui/material/TextField"; -import Divider from "@mui/material/Divider"; -import StopPlaceList from "./StopPlaceList"; -import FlatButton from "@mui/material/Button"; -import CoordinatesDialog from "../Dialogs/CoordinatesDialog"; -import AddStopPlaceToParent from "../Dialogs/AddStopPlaceToParent"; -import TagsDialog from "../EditStopPage/TagsDialog"; -import TagTray from "../MainPage/TagTray"; -import BelongsToGroup from "./../MainPage/BelongsToGroup"; -import ToolTippable from "../EditStopPage/ToolTippable"; -import AltNamesDialog from "../Dialogs/AltNamesDialog"; -import { getPrimaryDarkerColor } from "../../config/themeConfig"; -import UserActions from "../../actions/UserActions"; +import { Component } from "react"; +import { injectIntl } from "react-intl"; +import { connect } from "react-redux"; +import { StopPlaceActions } from "../../actions/"; import { addTag, findTagByName, @@ -40,6 +29,17 @@ import { getTags, removeTag, } from "../../actions/TiamatActions"; +import UserActions from "../../actions/UserActions"; +import { getPrimaryDarkerColor } from "../../config/themeConfig"; +import AddStopPlaceToParent from "../Dialogs/AddStopPlaceToParent"; +import AltNamesDialog from "../Dialogs/AltNamesDialog"; +import CoordinatesDialog from "../Dialogs/CoordinatesDialog"; +import ImportedId from "../EditStopPage/ImportedId"; +import TagsDialog from "../EditStopPage/TagsDialog"; +import ToolTippable from "../EditStopPage/ToolTippable"; +import TagTray from "../MainPage/TagTray"; +import BelongsToGroup from "./../MainPage/BelongsToGroup"; +import StopPlaceList from "./StopPlaceList"; class ParentStopDetails extends Component { constructor(props) { diff --git a/src/components/EditParentStopPage/StopPlaceChildrenItems.js b/src/components/EditParentStopPage/StopPlaceChildrenItems.js index 7237c6a03..12dd81fb4 100644 --- a/src/components/EditParentStopPage/StopPlaceChildrenItems.js +++ b/src/components/EditParentStopPage/StopPlaceChildrenItems.js @@ -12,7 +12,7 @@ See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React, { Component } from "react"; +import { Component } from "react"; import StopPlaceListChildItem from "./StopPlaceListChildItem"; class StopPlaceChildrenItems extends Component { diff --git a/src/components/EditParentStopPage/StopPlaceList.js b/src/components/EditParentStopPage/StopPlaceList.js index dc5d81565..4ef8bd0dc 100644 --- a/src/components/EditParentStopPage/StopPlaceList.js +++ b/src/components/EditParentStopPage/StopPlaceList.js @@ -12,16 +12,16 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React, { Component } from "react"; -import PropTypes from "prop-types"; -import StopPlaceListItem from "./StopPlaceListItem"; -import Fab from "@mui/material/Fab"; import ContentAdd from "@mui/icons-material/Add"; +import Fab from "@mui/material/Fab"; +import PropTypes from "prop-types"; +import { Component } from "react"; import { injectIntl } from "react-intl"; -import Loader from "../Dialogs/Loader"; -import { StopPlaceActions, UserActions } from "../../actions/"; import { connect } from "react-redux"; +import { StopPlaceActions, UserActions } from "../../actions/"; import { getPrimaryColor } from "../../config/themeConfig"; +import Loader from "../Dialogs/Loader"; +import StopPlaceListItem from "./StopPlaceListItem"; class StopPlaceList extends Component { constructor(props) { diff --git a/src/components/EditParentStopPage/StopPlaceListChildItem.js b/src/components/EditParentStopPage/StopPlaceListChildItem.js index 479a254aa..81d7b6361 100644 --- a/src/components/EditParentStopPage/StopPlaceListChildItem.js +++ b/src/components/EditParentStopPage/StopPlaceListChildItem.js @@ -12,8 +12,8 @@ See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React, { Component } from "react"; import Divider from "@mui/material/Divider"; +import { Component } from "react"; import ModalityIcon from "../MainPage/ModalityIconSvg"; import StopPlaceLink from "../ReportPage/StopPlaceLink"; diff --git a/src/components/EditParentStopPage/StopPlaceListItem.js b/src/components/EditParentStopPage/StopPlaceListItem.js index fd124af0e..8f75da716 100644 --- a/src/components/EditParentStopPage/StopPlaceListItem.js +++ b/src/components/EditParentStopPage/StopPlaceListItem.js @@ -12,15 +12,15 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React, { Component } from "react"; -import ModalityIconImg from "../MainPage/ModalityIconImg"; -import Divider from "@mui/material/Divider"; -import NavigationExpandMore from "@mui/icons-material/ExpandMore"; import NavigationExpandLess from "@mui/icons-material/ExpandLess"; +import NavigationExpandMore from "@mui/icons-material/ExpandMore"; import EditorInsertLink from "@mui/icons-material/InsertLink"; -import StopPlaceListItemDetails from "./StopPlaceListItemDetails"; -import StopPlaceLink from "../ReportPage/StopPlaceLink"; +import Divider from "@mui/material/Divider"; +import { Component } from "react"; +import ModalityIconImg from "../MainPage/ModalityIconImg"; import ModalityIconTray from "../ReportPage/ModalityIconTray"; +import StopPlaceLink from "../ReportPage/StopPlaceLink"; +import StopPlaceListItemDetails from "./StopPlaceListItemDetails"; class StopPlaceListItem extends Component { render() { diff --git a/src/components/EditParentStopPage/StopPlaceListItemDetails.js b/src/components/EditParentStopPage/StopPlaceListItemDetails.js index 6b4a0015d..3d15b0836 100644 --- a/src/components/EditParentStopPage/StopPlaceListItemDetails.js +++ b/src/components/EditParentStopPage/StopPlaceListItemDetails.js @@ -12,15 +12,15 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React, { Component } from "react"; -import { injectIntl } from "react-intl"; import MdDelete from "@mui/icons-material/Delete"; -import IconButton from "@mui/material/IconButton"; import MdWarning from "@mui/icons-material/Warning"; -import StopPlaceListItemQuays from "./StopPlaceListItemQuays"; -import StopPlaceChildrenItems from "./StopPlaceChildrenItems"; -import AdjacentStopList from "./AdjacentStopList"; +import IconButton from "@mui/material/IconButton"; import PropTypes from "prop-types"; +import { Component } from "react"; +import { injectIntl } from "react-intl"; +import AdjacentStopList from "./AdjacentStopList"; +import StopPlaceChildrenItems from "./StopPlaceChildrenItems"; +import StopPlaceListItemQuays from "./StopPlaceListItemQuays"; class StopPlaceListItemDetails extends Component { render() { diff --git a/src/components/EditParentStopPage/StopPlaceListItemQuayItem.js b/src/components/EditParentStopPage/StopPlaceListItemQuayItem.js index 9a97c365d..32af7cd58 100644 --- a/src/components/EditParentStopPage/StopPlaceListItemQuayItem.js +++ b/src/components/EditParentStopPage/StopPlaceListItemQuayItem.js @@ -12,11 +12,11 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React, { Component } from "react"; -import PropTypes from "prop-types"; import Divider from "@mui/material/Divider"; -import Code from "../EditStopPage/Code"; +import PropTypes from "prop-types"; +import { Component } from "react"; import { injectIntl } from "react-intl"; +import Code from "../EditStopPage/Code"; class StopPlaceListItemQuayItem extends Component { render() { diff --git a/src/components/EditParentStopPage/StopPlaceListItemQuays.js b/src/components/EditParentStopPage/StopPlaceListItemQuays.js index e9fbef6d6..ad726e1b0 100644 --- a/src/components/EditParentStopPage/StopPlaceListItemQuays.js +++ b/src/components/EditParentStopPage/StopPlaceListItemQuays.js @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React, { Component } from "react"; +import { Component } from "react"; import StopPlaceListItemQuayItem from "./StopPlaceListItemQuayItem"; class StopPlaceListItemQuays extends Component { diff --git a/src/components/EditStopPage/AcceptChanges.js b/src/components/EditStopPage/AcceptChanges.js index ba45efdc9..ab5b8f30b 100644 --- a/src/components/EditStopPage/AcceptChanges.js +++ b/src/components/EditStopPage/AcceptChanges.js @@ -12,9 +12,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; import MdWarning from "@mui/icons-material/Warning"; import Checkbox from "@mui/material/Checkbox"; +import React from "react"; import { injectIntl } from "react-intl"; import { getPrimaryColor } from "../../config/themeConfig"; diff --git a/src/components/EditStopPage/AcessibilityQuayTab.js b/src/components/EditStopPage/AcessibilityQuayTab.js index 08564f2d0..072541c42 100644 --- a/src/components/EditStopPage/AcessibilityQuayTab.js +++ b/src/components/EditStopPage/AcessibilityQuayTab.js @@ -12,14 +12,14 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; -import WheelChairPopover from "./WheelChairPopover"; -import StepFreePopover from "./StepFreePopover"; -import ToolTipIcon from "./ToolTipIcon"; import Divider from "@mui/material/Divider"; -import { getIn } from "../../utils/"; +import React from "react"; import { connect } from "react-redux"; import { AssessmentActions } from "../../actions/"; +import { getIn } from "../../utils/"; +import StepFreePopover from "./StepFreePopover"; +import ToolTipIcon from "./ToolTipIcon"; +import WheelChairPopover from "./WheelChairPopover"; class AcessibilityQuayTab extends React.Component { constructor(props) { diff --git a/src/components/EditStopPage/AcessibilityStopTab.js b/src/components/EditStopPage/AcessibilityStopTab.js index 6aefdb68a..8b5958663 100644 --- a/src/components/EditStopPage/AcessibilityStopTab.js +++ b/src/components/EditStopPage/AcessibilityStopTab.js @@ -12,14 +12,14 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; -import ToolTipIcon from "./ToolTipIcon"; import Divider from "@mui/material/Divider"; -import WheelChairPopover from "./WheelChairPopover"; -import StepFreePopover from "./StepFreePopover"; +import React from "react"; import { connect } from "react-redux"; -import { getIn } from "../../utils"; import { AssessmentActions } from "../../actions/"; +import { getIn } from "../../utils"; +import StepFreePopover from "./StepFreePopover"; +import ToolTipIcon from "./ToolTipIcon"; +import WheelChairPopover from "./WheelChairPopover"; class AcessibilityStopTab extends React.Component { handleWheelChairChange(value) { diff --git a/src/components/EditStopPage/AddTagAutoComplete.js b/src/components/EditStopPage/AddTagAutoComplete.js index 9e5d9b9da..ba78d777e 100644 --- a/src/components/EditStopPage/AddTagAutoComplete.js +++ b/src/components/EditStopPage/AddTagAutoComplete.js @@ -12,13 +12,12 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React, { Component } from "react"; import AutoComplete from "@mui/material/Autocomplete"; import TextField from "@mui/material/TextField"; import debounce from "lodash.debounce"; -import MenuItem from "@mui/material/MenuItem"; -import { toCamelCase } from "../../utils/"; +import { Component } from "react"; import { injectIntl } from "react-intl"; +import { toCamelCase } from "../../utils/"; class AddTagAutoComplete extends Component { constructor(props) { diff --git a/src/components/EditStopPage/AddTagDialog.js b/src/components/EditStopPage/AddTagDialog.js index 2770a8e8c..e06453b07 100644 --- a/src/components/EditStopPage/AddTagDialog.js +++ b/src/components/EditStopPage/AddTagDialog.js @@ -12,10 +12,10 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React, { Component } from "react"; -import AddTagAutoComplete from "./AddTagAutoComplete"; -import TextField from "@mui/material/TextField"; import FlatButton from "@mui/material/Button"; +import TextField from "@mui/material/TextField"; +import { Component } from "react"; +import AddTagAutoComplete from "./AddTagAutoComplete"; class AddTagDialog extends Component { constructor(props) { diff --git a/src/components/EditStopPage/BoardingPositionItem.tsx b/src/components/EditStopPage/BoardingPositionItem.tsx index de0992b90..5c050f9af 100644 --- a/src/components/EditStopPage/BoardingPositionItem.tsx +++ b/src/components/EditStopPage/BoardingPositionItem.tsx @@ -1,13 +1,12 @@ -import React from "react"; +import MdDelete from "@mui/icons-material/DeleteForever"; +import { IconButton } from "@mui/material"; import TextField from "@mui/material/TextField"; import { injectIntl } from "react-intl"; -import MdDelete from "@mui/icons-material/DeleteForever"; +import { BoardingPosition } from "./BoardingPositionsTab"; import Code from "./Code"; import Item from "./Item"; import ItemHeader from "./ItemHeader"; -import { BoardingPosition } from "./BoardingPositionsTab"; import ToolTippable from "./ToolTippable"; -import { IconButton } from "@mui/material"; type Props = { boardingPosition: BoardingPosition; diff --git a/src/components/EditStopPage/BoardingPositionsTab.tsx b/src/components/EditStopPage/BoardingPositionsTab.tsx index 6e95a1cb7..a82d60410 100644 --- a/src/components/EditStopPage/BoardingPositionsTab.tsx +++ b/src/components/EditStopPage/BoardingPositionsTab.tsx @@ -1,4 +1,4 @@ -import React, { useCallback } from "react"; +import { useCallback } from "react"; import { useDispatch } from "react-redux"; import { AnyAction } from "redux"; import { StopPlaceActions } from "../../actions"; diff --git a/src/components/EditStopPage/ColumnFilterPopover.js b/src/components/EditStopPage/ColumnFilterPopover.js index 15a7a429e..388b0d7d8 100644 --- a/src/components/EditStopPage/ColumnFilterPopover.js +++ b/src/components/EditStopPage/ColumnFilterPopover.js @@ -12,11 +12,11 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; +import { FormControlLabel } from "@mui/material"; import RaisedButton from "@mui/material/Button"; -import Menu from "@mui/material/Menu"; import Checkbox from "@mui/material/Checkbox"; -import { FormControlLabel, Popover } from "@mui/material"; +import Menu from "@mui/material/Menu"; +import React from "react"; class ColumnFilterPopover extends React.Component { constructor(props) { diff --git a/src/components/EditStopPage/CompassBearingInfo.js b/src/components/EditStopPage/CompassBearingInfo.js index 999074679..f3be100ce 100644 --- a/src/components/EditStopPage/CompassBearingInfo.js +++ b/src/components/EditStopPage/CompassBearingInfo.js @@ -12,7 +12,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; import icon from "../../static/icons/compass.png"; const CompassBearingInfo = ({ value }, { defaultValue }) => { diff --git a/src/components/EditStopPage/CreateKeyValuePair.js b/src/components/EditStopPage/CreateKeyValuePair.js index 988aeb3c3..91d2ac227 100644 --- a/src/components/EditStopPage/CreateKeyValuePair.js +++ b/src/components/EditStopPage/CreateKeyValuePair.js @@ -12,9 +12,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; -import TextField from "@mui/material/TextField"; import FlatButton from "@mui/material/Button"; +import TextField from "@mui/material/TextField"; +import React from "react"; import { injectIntl } from "react-intl"; class CreateKeyValuePair extends React.Component { diff --git a/src/components/EditStopPage/EditKeyValuePair.js b/src/components/EditStopPage/EditKeyValuePair.js index 750227076..6b8c1921d 100644 --- a/src/components/EditStopPage/EditKeyValuePair.js +++ b/src/components/EditStopPage/EditKeyValuePair.js @@ -1,6 +1,6 @@ -import React from "react"; -import TextField from "@mui/material/TextField"; import FlatButton from "@mui/material/Button"; +import TextField from "@mui/material/TextField"; +import React from "react"; import { injectIntl } from "react-intl"; class EditKeyValuePair extends React.Component { diff --git a/src/components/EditStopPage/EditQuayAdditional.js b/src/components/EditStopPage/EditQuayAdditional.js index 7c2069cf4..750c567de 100644 --- a/src/components/EditStopPage/EditQuayAdditional.js +++ b/src/components/EditStopPage/EditQuayAdditional.js @@ -12,17 +12,14 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; -import Tabs from "@mui/material/Tabs"; import Tab from "@mui/material/Tab"; +import Tabs from "@mui/material/Tabs"; +import React from "react"; +import { injectIntl } from "react-intl"; import { connect } from "react-redux"; -import FacilitiesQuayTab from "./FacilitiesQuayTab"; import AccessiblityQuayTab from "./AcessibilityQuayTab"; -import { injectIntl } from "react-intl"; import BoardingPositionsTab from "./BoardingPositionsTab"; -import { UserActions } from "../../actions"; -import AcessibilityStopTab from "./AcessibilityStopTab"; -import FacilitiesStopTab from "./FacilitiesStopTab"; +import FacilitiesQuayTab from "./FacilitiesQuayTab"; class EditQuayAdditional extends React.Component { constructor(props) { diff --git a/src/components/EditStopPage/EditStopAdditional.js b/src/components/EditStopPage/EditStopAdditional.js index 1c5d8fb7d..26558ea2c 100644 --- a/src/components/EditStopPage/EditStopAdditional.js +++ b/src/components/EditStopPage/EditStopAdditional.js @@ -12,12 +12,12 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; -import Tabs from "@mui/material/Tabs"; import Tab from "@mui/material/Tab"; -import FacilitiesStopTab from "./FacilitiesStopTab"; -import AcessibilityStopTab from "./AcessibilityStopTab"; +import Tabs from "@mui/material/Tabs"; +import React from "react"; import { injectIntl } from "react-intl"; +import AcessibilityStopTab from "./AcessibilityStopTab"; +import FacilitiesStopTab from "./FacilitiesStopTab"; class EditStopAdditional extends React.Component { constructor(props) { diff --git a/src/components/EditStopPage/EditStopBoxTabs.js b/src/components/EditStopPage/EditStopBoxTabs.js index c21178541..769ec4105 100644 --- a/src/components/EditStopPage/EditStopBoxTabs.js +++ b/src/components/EditStopPage/EditStopBoxTabs.js @@ -12,13 +12,13 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ +import MdSortByAlpha from "@mui/icons-material/SortByAlpha"; import React from "react"; -import QuayItem from "./QuayItem"; -import ParkingItem from "./ParkingItem"; import { connect } from "react-redux"; import { StopPlaceActions, UserActions } from "../../actions/"; import { CodeBadge } from "./Code"; -import MdSortByAlpha from "@mui/icons-material/SortByAlpha"; +import ParkingItem from "./ParkingItem"; +import QuayItem from "./QuayItem"; class EditStopBoxTabs extends React.Component { handleLocateOnMap(position, index, type) { diff --git a/src/components/EditStopPage/EditStopGeneral.js b/src/components/EditStopPage/EditStopGeneral.js index 3ee2ae8f3..07fc4226e 100644 --- a/src/components/EditStopPage/EditStopGeneral.js +++ b/src/components/EditStopPage/EditStopGeneral.js @@ -12,62 +12,58 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import { connect } from "react-redux"; -import React from "react"; -import FlatButton from "@mui/material/Button"; -import { StopPlaceActions, UserActions } from "../../actions/"; -import { injectIntl } from "react-intl"; -import ConfirmDialog from "../Dialogs/ConfirmDialog"; -import EditStopBoxTabs from "./EditStopBoxTabs"; -import Tabs from "@mui/material/Tabs"; -import Tab from "@mui/material/Tab"; -import TabContext from "@mui/lab/TabContext"; -import TabList from "@mui/lab/TabList"; -import TabPanel from "@mui/lab/TabPanel"; -import StopPlaceDetails from "./StopPlaceDetails"; -import mapToMutationVariables from "../../modelUtils/mapToQueryVariables"; -import { mutatePathLink, mutateParking } from "../../graphql/Tiamat/mutations"; -import * as types from "../../actions/Types"; -import EditStopAdditional from "./EditStopAdditional"; -import MdUndo from "@mui/icons-material/Undo"; -import MdSave from "@mui/icons-material/Save"; import MdBack from "@mui/icons-material/ArrowBack"; import MdLess from "@mui/icons-material/ExpandLess"; +import MdSave from "@mui/icons-material/Save"; +import MdUndo from "@mui/icons-material/Undo"; +import FlatButton from "@mui/material/Button"; import Divider from "@mui/material/Divider"; -import SaveDialog from "../Dialogs/SaveDialog"; -import MergeStopDialog from "../Dialogs/MergeStopDialog"; -import MergeQuaysDialog from "../Dialogs/MergeQuaysDialog"; -import { MutationErrorCodes } from "../../models/ErrorCodes"; -import DeleteQuayDialog from "../Dialogs/DeleteQuayDialog"; +import Tab from "@mui/material/Tab"; +import Tabs from "@mui/material/Tabs"; +import React from "react"; +import { injectIntl } from "react-intl"; +import { connect } from "react-redux"; +import { replace } from "redux-first-history"; +import { StopPlaceActions, UserActions } from "../../actions/"; import { deleteQuay, - getStopPlaceVersions, deleteStopPlace, - mergeQuays, + getNeighbourStops, + getStopPlaceAndPathLinkByVersion, + getStopPlaceVersions, getStopPlaceWithAll, mergeAllQuaysFromStop, - moveQuaysToStop, - getNeighbourStops, + mergeQuays, moveQuaysToNewStop, + moveQuaysToStop, + saveParking, + savePathLink, saveStopPlaceBasedOnType, terminateStop, - getStopPlaceAndPathLinkByVersion, - savePathLink, - saveParking, } from "../../actions/TiamatActions"; -import TerminateStopPlaceDialog from "../Dialogs/TerminateStopPlaceDialog"; -import MoveQuayDialog from "../Dialogs/MoveQuayDialog"; -import MoveQuayNewStopDialog from "../Dialogs/MoveQuayNewStopDialog"; -import Settings from "../../singletons/SettingsManager"; -import { getIn, getIsCurrentVersionMax } from "../../utils/"; -import VersionsPopover from "./VersionsPopover"; -import RequiredFieldsMissingDialog from "../Dialogs/RequiredFieldsMissingDialog"; -import Routes from "../../routes/"; +import * as types from "../../actions/Types"; +import { MutationErrorCodes } from "../../models/ErrorCodes"; +import mapToMutationVariables from "../../modelUtils/mapToQueryVariables"; import { shouldMutateParking, shouldMutatePathLinks, } from "../../modelUtils/shouldMutate"; -import { replace } from "redux-first-history"; +import Routes from "../../routes/"; +import Settings from "../../singletons/SettingsManager"; +import { getIn, getIsCurrentVersionMax } from "../../utils/"; +import ConfirmDialog from "../Dialogs/ConfirmDialog"; +import DeleteQuayDialog from "../Dialogs/DeleteQuayDialog"; +import MergeQuaysDialog from "../Dialogs/MergeQuaysDialog"; +import MergeStopDialog from "../Dialogs/MergeStopDialog"; +import MoveQuayDialog from "../Dialogs/MoveQuayDialog"; +import MoveQuayNewStopDialog from "../Dialogs/MoveQuayNewStopDialog"; +import RequiredFieldsMissingDialog from "../Dialogs/RequiredFieldsMissingDialog"; +import SaveDialog from "../Dialogs/SaveDialog"; +import TerminateStopPlaceDialog from "../Dialogs/TerminateStopPlaceDialog"; +import EditStopAdditional from "./EditStopAdditional"; +import EditStopBoxTabs from "./EditStopBoxTabs"; +import StopPlaceDetails from "./StopPlaceDetails"; +import VersionsPopover from "./VersionsPopover"; class EditStopGeneral extends React.Component { constructor(props) { diff --git a/src/components/EditStopPage/FacilitiesQuayTab.js b/src/components/EditStopPage/FacilitiesQuayTab.js index a3cc9ac22..7526b472d 100644 --- a/src/components/EditStopPage/FacilitiesQuayTab.js +++ b/src/components/EditStopPage/FacilitiesQuayTab.js @@ -12,27 +12,27 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; -import { connect } from "react-redux"; +import MdLess from "@mui/icons-material/ExpandLess"; +import MdMore from "@mui/icons-material/ExpandMore"; +import MdWc from "@mui/icons-material/Wc"; +import { FormControlLabel } from "@mui/material"; +import FlatButton from "@mui/material/Button"; import Checkbox from "@mui/material/Checkbox"; -import TicketMachine from "../../static/icons/facilities/TicketMachine"; -import BusShelter from "../../static/icons/facilities/BusShelter"; import Divider from "@mui/material/Divider"; -import ToolTipIcon from "./ToolTipIcon"; -import MdWc from "@mui/icons-material/Wc"; -import WaitingRoom from "../../static/icons/facilities/WaitingRoom"; import TextField from "@mui/material/TextField"; -import MdMore from "@mui/icons-material/ExpandMore"; -import MdLess from "@mui/icons-material/ExpandLess"; -import FlatButton from "@mui/material/Button"; +import React from "react"; +import { connect } from "react-redux"; +import { EquipmentActions } from "../../actions/"; +import equipmentHelpers from "../../modelUtils/equipmentHelpers"; import StairsIcon from "../../static/icons/accessibility/Stairs"; +import BusShelter from "../../static/icons/facilities/BusShelter"; import EnclosedIcon from "../../static/icons/facilities/Enclosed"; import Heated from "../../static/icons/facilities/Heated"; -import equipmentHelpers from "../../modelUtils/equipmentHelpers"; -import { EquipmentActions } from "../../actions/"; -import { getIn } from "../../utils/"; +import TicketMachine from "../../static/icons/facilities/TicketMachine"; +import WaitingRoom from "../../static/icons/facilities/WaitingRoom"; import Sign512 from "../../static/icons/TransportSign"; -import { FormControlLabel } from "@mui/material"; +import { getIn } from "../../utils/"; +import ToolTipIcon from "./ToolTipIcon"; class FacilitiesQuayTab extends React.Component { constructor(props) { diff --git a/src/components/EditStopPage/FacilitiesStopTab.js b/src/components/EditStopPage/FacilitiesStopTab.js index ac6d441ba..07d2f8d45 100644 --- a/src/components/EditStopPage/FacilitiesStopTab.js +++ b/src/components/EditStopPage/FacilitiesStopTab.js @@ -12,29 +12,27 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; -import { connect } from "react-redux"; +import MdLess from "@mui/icons-material/ExpandLess"; +import MdMore from "@mui/icons-material/ExpandMore"; +import MdWc from "@mui/icons-material/Wc"; +import { FormControlLabel } from "@mui/material"; import Checkbox from "@mui/material/Checkbox"; -import TicketMachine from "../../static/icons/facilities/TicketMachine"; -import BusShelter from "../../static/icons/facilities/BusShelter"; import Divider from "@mui/material/Divider"; -import MdWc from "@mui/icons-material/Wc"; -import WaitingRoom from "../../static/icons/facilities/WaitingRoom"; -import ToolTipIcon from "./ToolTipIcon"; +import IconButton from "@mui/material/IconButton"; import TextField from "@mui/material/TextField"; -import MdMore from "@mui/icons-material/ExpandMore"; -import MdLess from "@mui/icons-material/ExpandLess"; -import FlatButton from "@mui/material/Button"; +import React from "react"; +import { connect } from "react-redux"; +import { EquipmentActions } from "../../actions/"; +import equiptmentHelpers from "../../modelUtils/equipmentHelpers"; import StairsIcon from "../../static/icons/accessibility/Stairs"; +import BusShelter from "../../static/icons/facilities/BusShelter"; import EnclosedIcon from "../../static/icons/facilities/Enclosed"; import Heated from "../../static/icons/facilities/Heated"; -import { getIn } from "../../utils/"; -import equiptmentHelpers from "../../modelUtils/equipmentHelpers"; -import { EquipmentActions } from "../../actions/"; -import Sign512 from "../../static/icons/TransportSign"; +import TicketMachine from "../../static/icons/facilities/TicketMachine"; +import WaitingRoom from "../../static/icons/facilities/WaitingRoom"; import TransportSign from "../../static/icons/TransportSign"; -import { FormControlLabel } from "@mui/material"; -import IconButton from "@mui/material/IconButton"; +import { getIn } from "../../utils/"; +import ToolTipIcon from "./ToolTipIcon"; class FacilitiesStopTab extends React.Component { constructor(props) { diff --git a/src/components/EditStopPage/ImportedId.js b/src/components/EditStopPage/ImportedId.js index e94be276c..d32421761 100644 --- a/src/components/EditStopPage/ImportedId.js +++ b/src/components/EditStopPage/ImportedId.js @@ -12,8 +12,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; - const ImportedId = ({ text, id = [] }) => { return (
diff --git a/src/components/EditStopPage/InformationBanner.js b/src/components/EditStopPage/InformationBanner.js index 5977f833e..1156ee50e 100644 --- a/src/components/EditStopPage/InformationBanner.js +++ b/src/components/EditStopPage/InformationBanner.js @@ -12,10 +12,10 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; -import PropTypes from "prop-types"; -import FlatButton from "@mui/material/Button"; import InformationIcon from "@mui/icons-material/Info"; +import FlatButton from "@mui/material/Button"; +import PropTypes from "prop-types"; +import React from "react"; class InformationBanner extends React.Component { constructor(props) { diff --git a/src/components/EditStopPage/Item.js b/src/components/EditStopPage/Item.js index d550330c8..855e27c6e 100644 --- a/src/components/EditStopPage/Item.js +++ b/src/components/EditStopPage/Item.js @@ -1,7 +1,7 @@ +import Divider from "@mui/material/Divider"; import React from "react"; import { injectIntl } from "react-intl"; import CoordinatesDialog from "../Dialogs/CoordinatesDialog"; -import Divider from "@mui/material/Divider"; class Item extends React.Component { constructor(props) { diff --git a/src/components/EditStopPage/ItemHeader.js b/src/components/EditStopPage/ItemHeader.js index 3095ad782..859c9ca1b 100644 --- a/src/components/EditStopPage/ItemHeader.js +++ b/src/components/EditStopPage/ItemHeader.js @@ -1,8 +1,7 @@ -import React from "react"; -import NavigationExpandMore from "@mui/icons-material/ExpandMore"; +import MdError from "@mui/icons-material/Error"; import NavigationExpandLess from "@mui/icons-material/ExpandLess"; +import NavigationExpandMore from "@mui/icons-material/ExpandMore"; import MapsMyLocation from "@mui/icons-material/MyLocation"; -import MdError from "@mui/icons-material/Error"; const locationStyle = { marginRight: 5, diff --git a/src/components/EditStopPage/MakeExpandable.js b/src/components/EditStopPage/MakeExpandable.js index c0cc064b5..cae7068d6 100644 --- a/src/components/EditStopPage/MakeExpandable.js +++ b/src/components/EditStopPage/MakeExpandable.js @@ -12,10 +12,10 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; -import MdExpand from "@mui/icons-material/ExpandMore"; import MdCollapse from "@mui/icons-material/ExpandLess"; +import MdExpand from "@mui/icons-material/ExpandMore"; import IconButton from "@mui/material/IconButton"; +import React from "react"; class MakeExpandable extends React.PureComponent { constructor(props) { diff --git a/src/components/EditStopPage/ModalitiesMenuItems.js b/src/components/EditStopPage/ModalitiesMenuItems.js index 3d94eca03..067108a3f 100644 --- a/src/components/EditStopPage/ModalitiesMenuItems.js +++ b/src/components/EditStopPage/ModalitiesMenuItems.js @@ -12,14 +12,13 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; import MenuItem from "@mui/material/MenuItem"; -import ModalityIconSvg from "../MainPage/ModalityIconSvg"; -import ArrowDropRight from "@mui/icons-material/ArrowRight"; +import React from "react"; import { - getStopPlacesForSubmodes, getInverseSubmodesWhitelist, + getStopPlacesForSubmodes, } from "../../roles/rolesParser"; +import ModalityIconSvg from "../MainPage/ModalityIconSvg"; import MoreMenuItem from "../MainPage/MoreMenuItem"; class ModalitiesMenuItems extends React.Component { diff --git a/src/components/EditStopPage/ModalityFilter.js b/src/components/EditStopPage/ModalityFilter.js index 70d2b6baa..48015289e 100644 --- a/src/components/EditStopPage/ModalityFilter.js +++ b/src/components/EditStopPage/ModalityFilter.js @@ -12,10 +12,10 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ +import Checkbox from "@mui/material/Checkbox"; import React from "react"; -import ModalityIconSvg from "../MainPage/ModalityIconSvg"; import stopTypes from "../../models/stopTypes"; -import Checkbox from "@mui/material/Checkbox"; +import ModalityIconSvg from "../MainPage/ModalityIconSvg"; class ModalityFilter extends React.Component { handleOnCheck(checked, value) { diff --git a/src/components/EditStopPage/NewElementsBox.js b/src/components/EditStopPage/NewElementsBox.js index 45a800139..74afe331d 100644 --- a/src/components/EditStopPage/NewElementsBox.js +++ b/src/components/EditStopPage/NewElementsBox.js @@ -13,17 +13,17 @@ See the Licence for the specific language governing permissions and limitations under the Licence. */ import React from "react"; -import { connect } from "react-redux"; import { injectIntl } from "react-intl"; +import { connect } from "react-redux"; import { StopPlaceActions } from "../../actions"; import { setDecimalPrecision } from "../../utils"; import ConfirmDialog from "../Dialogs/ConfirmDialog"; -import quayIcon from "../../static/icons/pin-50x82-red-quay.png"; -import boardingPositionIcon from "../../static/icons/pin-50x82-purple-boardingPosition.png"; import newStopIcon from "../../static/icons/new-stop-icon-2x.png"; -import parkAndRideIcon from "../../static/icons/pin-50x82-blue-parkAndRide.png"; import bikeParkingIcon from "../../static/icons/pin-50x82-blue-bikepark.png"; +import parkAndRideIcon from "../../static/icons/pin-50x82-blue-parkAndRide.png"; +import boardingPositionIcon from "../../static/icons/pin-50x82-purple-boardingPosition.png"; +import quayIcon from "../../static/icons/pin-50x82-red-quay.png"; class NewElementsBox extends React.Component { constructor(props) { diff --git a/src/components/EditStopPage/NewStopPlaceInfo.js b/src/components/EditStopPage/NewStopPlaceInfo.js index 5662eb156..18e5d1fd6 100644 --- a/src/components/EditStopPage/NewStopPlaceInfo.js +++ b/src/components/EditStopPage/NewStopPlaceInfo.js @@ -12,13 +12,13 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; -import { injectIntl } from "react-intl"; import InformationIcon from "@mui/icons-material/Info"; import FlatButton from "@mui/material/Button"; -import { getPrimaryDarkerColor } from "../../config/themeConfig"; +import React from "react"; +import { injectIntl } from "react-intl"; import { connect } from "react-redux"; import { UserActions } from "../../actions/"; +import { getPrimaryDarkerColor } from "../../config/themeConfig"; import { createStopPlaceHref } from "../../utils/"; class NewStopPlaceInfo extends React.Component { diff --git a/src/components/EditStopPage/ParkingItem.js b/src/components/EditStopPage/ParkingItem.js index 7af94fecb..f0c166c6f 100644 --- a/src/components/EditStopPage/ParkingItem.js +++ b/src/components/EditStopPage/ParkingItem.js @@ -12,25 +12,24 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; +import MdDeleteForver from "@mui/icons-material/DeleteForever"; +import Warning from "@mui/icons-material/Warning"; +import FlatButton from "@mui/material/Button"; +import TextField from "@mui/material/TextField"; import PropTypes from "prop-types"; +import React from "react"; +import { injectIntl } from "react-intl"; import { connect } from "react-redux"; import { StopPlaceActions, UserActions } from "../../actions/"; -import Warning from "@mui/icons-material/Warning"; -import MdDeleteForver from "@mui/icons-material/DeleteForever"; -import ToolTippable from "./ToolTippable"; -import { injectIntl } from "react-intl"; -import ConfirmDialog from "../Dialogs/ConfirmDialog"; import { deleteParking } from "../../actions/TiamatActions"; import * as types from "../../actions/Types"; -import FlatButton from "@mui/material/Button"; -import TextField from "@mui/material/TextField"; -import ParkingItemPayAndRideExpandedFields from "./ParkingItemPayAndRideExpandedFields"; -import ItemHeader from "./ItemHeader"; -import Item from "./Item"; -import Code from "./Code"; import PARKING_TYPE from "../../models/parkingType"; -import MdDelete from "@mui/icons-material/DeleteForever"; +import ConfirmDialog from "../Dialogs/ConfirmDialog"; +import Code from "./Code"; +import Item from "./Item"; +import ItemHeader from "./ItemHeader"; +import ParkingItemPayAndRideExpandedFields from "./ParkingItemPayAndRideExpandedFields"; +import ToolTippable from "./ToolTippable"; class ParkingItem extends React.Component { state = { diff --git a/src/components/EditStopPage/ParkingItemPayAndRideExpandedFields.js b/src/components/EditStopPage/ParkingItemPayAndRideExpandedFields.js index d6a52936d..a44fd6e3c 100644 --- a/src/components/EditStopPage/ParkingItemPayAndRideExpandedFields.js +++ b/src/components/EditStopPage/ParkingItemPayAndRideExpandedFields.js @@ -12,24 +12,22 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; -import { styled } from "@mui/material/styles"; -import Select from "@mui/material/Select"; -import MenuItem from "@mui/material/MenuItem"; +import { Accessible } from "@mui/icons-material/"; +import LocalParking from "@mui/icons-material/LocalParking"; +import Payment from "@mui/icons-material/Payment"; +import { Grid, ListSubheader, TextField } from "@mui/material"; +import Box from "@mui/material/Box"; +import Checkbox from "@mui/material/Checkbox"; import Input from "@mui/material/Input"; import InputLabel from "@mui/material/InputLabel"; import ListItemText from "@mui/material/ListItemText"; -import Checkbox from "@mui/material/Checkbox"; +import MenuItem from "@mui/material/MenuItem"; +import Select from "@mui/material/Select"; +import { styled } from "@mui/material/styles"; import { injectIntl } from "react-intl"; -import { parkingPaymentProcesses } from "../../models/parkingPaymentProcess"; import { parkingLayouts } from "../../models/parkingLayout"; -import { TextField, ListSubheader } from "@mui/material"; +import { parkingPaymentProcesses } from "../../models/parkingPaymentProcess"; import RechargingAvailablePopover from "./RechargingAvailablePopover"; -import LocalParking from "@mui/icons-material/LocalParking"; -import { Accessible } from "@mui/icons-material/"; -import Payment from "@mui/icons-material/Payment"; -import Box from "@mui/material/Box"; -import { Grid } from "@mui/material"; const PREFIX = "ParkingItemPayAndRideExpandedFields"; const classes = { diff --git a/src/components/EditStopPage/QuayDetails.js b/src/components/EditStopPage/QuayDetails.js index 9c33e3ec3..fccfe8224 100644 --- a/src/components/EditStopPage/QuayDetails.js +++ b/src/components/EditStopPage/QuayDetails.js @@ -13,9 +13,9 @@ See the Licence for the specific language governing permissions and limitations under the Licence. */ import React from "react"; +import { injectIntl } from "react-intl"; import Code from "./Code"; import CompassBearingInfo from "./CompassBearingInfo"; -import { injectIntl } from "react-intl"; class QuayDetails extends React.Component { render() { diff --git a/src/components/EditStopPage/QuayItem.js b/src/components/EditStopPage/QuayItem.js index 2cc5425fa..7bf6799c7 100644 --- a/src/components/EditStopPage/QuayItem.js +++ b/src/components/EditStopPage/QuayItem.js @@ -12,39 +12,39 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; -import PropTypes from "prop-types"; +import Checkbox from "@mui/material/Checkbox"; +import IconButton from "@mui/material/IconButton"; import TextField from "@mui/material/TextField"; +import PropTypes from "prop-types"; +import React from "react"; +import { connect } from "react-redux"; import { - StopPlaceActions, AssessmentActions, EquipmentActions, + StopPlaceActions, UserActions, } from "../../actions/"; -import { connect } from "react-redux"; -import Checkbox from "@mui/material/Checkbox"; -import IconButton from "@mui/material/IconButton"; -import TicketMachine from "../../static/icons/facilities/TicketMachine"; -import BusShelter from "../../static/icons/facilities/BusShelter"; -import { injectIntl } from "react-intl"; -import FlatButton from "@mui/material/Button"; -import ImportedId from "./ImportedId"; import MdLess from "@mui/icons-material/ExpandLess"; -import EditQuayAdditional from "./EditQuayAdditional"; -import WheelChairPopover from "./WheelChairPopover"; -import StepFreePopover from "./StepFreePopover"; -import { getIn } from "../../utils/"; +import FlatButton from "@mui/material/Button"; +import { injectIntl } from "react-intl"; import equipmentHelpers from "../../modelUtils/equipmentHelpers"; +import BusShelter from "../../static/icons/facilities/BusShelter"; +import TicketMachine from "../../static/icons/facilities/TicketMachine"; import Sign512 from "../../static/icons/TransportSign"; +import { getIn } from "../../utils/"; +import EditQuayAdditional from "./EditQuayAdditional"; +import ImportedId from "./ImportedId"; +import StepFreePopover from "./StepFreePopover"; +import WheelChairPopover from "./WheelChairPopover"; -import ToolTippable from "./ToolTippable"; import MdDelete from "@mui/icons-material/DeleteForever"; import MdKey from "@mui/icons-material/VpnKey"; import { getPrimaryDarkerColor } from "../../config/themeConfig"; import Code from "./Code"; -import ItemHeader from "./ItemHeader"; import Item from "./Item"; +import ItemHeader from "./ItemHeader"; +import ToolTippable from "./ToolTippable"; class QuayItem extends React.Component { static propTypes = { diff --git a/src/components/EditStopPage/RechargingAvailablePopover.js b/src/components/EditStopPage/RechargingAvailablePopover.js index f7f43d0e3..d1ccf9eb8 100644 --- a/src/components/EditStopPage/RechargingAvailablePopover.js +++ b/src/components/EditStopPage/RechargingAvailablePopover.js @@ -1,13 +1,12 @@ -import React from "react"; -import { injectIntl } from "react-intl"; -import IconButton from "@mui/material/IconButton"; -import MenuItem from "@mui/material/MenuItem"; import EvStation from "@mui/icons-material/EvStation"; -import { colors as rechargingAvailableColors } from "../../models/rechargingAvailable"; import { Popover } from "@mui/material"; -import ListItemText from "@mui/material/ListItemText"; +import IconButton from "@mui/material/IconButton"; import ListItemIcon from "@mui/material/ListItemIcon"; -import accessibilityAssessments from "../../models/accessibilityAssessments"; +import ListItemText from "@mui/material/ListItemText"; +import MenuItem from "@mui/material/MenuItem"; +import React from "react"; +import { injectIntl } from "react-intl"; +import { colors as rechargingAvailableColors } from "../../models/rechargingAvailable"; class RechargingAvailablePopover extends React.Component { constructor(props) { diff --git a/src/components/EditStopPage/StepFreePopover.js b/src/components/EditStopPage/StepFreePopover.js index 1b7db7665..469ee9f1e 100644 --- a/src/components/EditStopPage/StepFreePopover.js +++ b/src/components/EditStopPage/StepFreePopover.js @@ -12,15 +12,14 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; -import MenuItem from "@mui/material/MenuItem"; -import accessibilityAssessments from "../../models/accessibilityAssessments"; -import StairsIcon from "../../static/icons/accessibility/Stairs"; -import IconButton from "@mui/material/IconButton"; import { Popover } from "@mui/material"; +import IconButton from "@mui/material/IconButton"; import ListItemIcon from "@mui/material/ListItemIcon"; -import WheelChair from "@mui/icons-material/Accessible"; import ListItemText from "@mui/material/ListItemText"; +import MenuItem from "@mui/material/MenuItem"; +import React from "react"; +import accessibilityAssessments from "../../models/accessibilityAssessments"; +import StairsIcon from "../../static/icons/accessibility/Stairs"; class StepFreePopover extends React.Component { constructor(props) { diff --git a/src/components/EditStopPage/StopPlaceDetails.js b/src/components/EditStopPage/StopPlaceDetails.js index bfbc282e6..b839def51 100644 --- a/src/components/EditStopPage/StopPlaceDetails.js +++ b/src/components/EditStopPage/StopPlaceDetails.js @@ -12,57 +12,54 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; -import ModalityIconSvg from "../MainPage/ModalityIconSvg"; +import MdLanguage from "@mui/icons-material/Language"; +import MdTransfer from "@mui/icons-material/TransferWithinAStation"; +import MdKey from "@mui/icons-material/VpnKey"; +import MdWarning from "@mui/icons-material/Warning"; +import MdWC from "@mui/icons-material/Wc"; +import FlatButton from "@mui/material/Button"; +import Checkbox from "@mui/material/Checkbox"; import IconButton from "@mui/material/IconButton"; +import Menu from "@mui/material/Menu"; import TextField from "@mui/material/TextField"; -import ImportedId from "./ImportedId"; +import debounce from "lodash.debounce"; +import React from "react"; +import { connect } from "react-redux"; +import { Link } from "react-router-dom"; import { - StopPlaceActions, AssessmentActions, EquipmentActions, + StopPlaceActions, UserActions, } from "../../actions/"; -import { connect } from "react-redux"; -import TicketMachine from "../../static/icons/facilities/TicketMachine"; -import BusShelter from "../../static/icons/facilities/BusShelter"; -import debounce from "lodash.debounce"; -import Checkbox from "@mui/material/Checkbox"; -import stopTypes from "../../models/stopTypes"; -import MdWC from "@mui/icons-material/Wc"; -import WaitingRoom from "../../static/icons/facilities/WaitingRoom"; -import WheelChairPopover from "./WheelChairPopover"; -import { getIn } from "../../utils"; -import equipmentHelpers from "../../modelUtils/equipmentHelpers"; -import MdLanguage from "@mui/icons-material/Language"; -import { getPrimaryDarkerColor } from "../../config/themeConfig"; -import AltNamesDialog from "../Dialogs/AltNamesDialog"; -import TariffZonesDialog from "../Dialogs/TariffZonesDialog"; -import MdTransfer from "@mui/icons-material/TransferWithinAStation"; -import WeightingPopover from "./WeightingPopover"; -import weightTypes, { weightColors } from "../../models/weightTypes"; -import Sign512 from "../../static/icons/TransportSign"; -import MdWarning from "@mui/icons-material/Warning"; -import ToolTippable from "./ToolTippable"; -import MdKey from "@mui/icons-material/VpnKey"; -import KeyValuesDialog from "../Dialogs/KeyValuesDialog"; -import ModalitiesMenuItems from "./ModalitiesMenuItems"; -import FlatButton from "@mui/material/Button"; -import TagsDialog from "./TagsDialog"; -import TagTray from "../MainPage/TagTray"; -import BelongsToGroup from "./../MainPage/BelongsToGroup"; import { addTag, findTagByName, getTags, removeTag, } from "../../actions/TiamatActions"; -import { Popover } from "@mui/material"; -import { Link } from "react-router-dom"; +import { getPrimaryDarkerColor } from "../../config/themeConfig"; +import stopTypes from "../../models/stopTypes"; +import weightTypes, { weightColors } from "../../models/weightTypes"; +import equipmentHelpers from "../../modelUtils/equipmentHelpers"; import Routes from "../../routes"; -import { Signpost } from "@mui/icons-material"; +import BusShelter from "../../static/icons/facilities/BusShelter"; +import TicketMachine from "../../static/icons/facilities/TicketMachine"; +import WaitingRoom from "../../static/icons/facilities/WaitingRoom"; import TransportSign from "../../static/icons/TransportSign"; -import Menu from "@mui/material/Menu"; +import { getIn } from "../../utils"; +import AltNamesDialog from "../Dialogs/AltNamesDialog"; +import KeyValuesDialog from "../Dialogs/KeyValuesDialog"; +import TariffZonesDialog from "../Dialogs/TariffZonesDialog"; +import ModalityIconSvg from "../MainPage/ModalityIconSvg"; +import TagTray from "../MainPage/TagTray"; +import BelongsToGroup from "./../MainPage/BelongsToGroup"; +import ImportedId from "./ImportedId"; +import ModalitiesMenuItems from "./ModalitiesMenuItems"; +import TagsDialog from "./TagsDialog"; +import ToolTippable from "./ToolTippable"; +import WeightingPopover from "./WeightingPopover"; +import WheelChairPopover from "./WheelChairPopover"; class StopPlaceDetails extends React.Component { constructor(props) { diff --git a/src/components/EditStopPage/TagItem.js b/src/components/EditStopPage/TagItem.js index 9fc17a8c4..5e4d3faf4 100644 --- a/src/components/EditStopPage/TagItem.js +++ b/src/components/EditStopPage/TagItem.js @@ -12,11 +12,11 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React, { Component } from "react"; -import Tag from "../MainPage/Tag"; -import moment from "moment"; import MdDelete from "@mui/icons-material/Delete"; import IconButton from "@mui/material/IconButton"; +import moment from "moment"; +import { Component } from "react"; +import Tag from "../MainPage/Tag"; class TagItem extends Component { render() { diff --git a/src/components/EditStopPage/TagsDialog.js b/src/components/EditStopPage/TagsDialog.js index 6d6385947..e6ecc1a78 100644 --- a/src/components/EditStopPage/TagsDialog.js +++ b/src/components/EditStopPage/TagsDialog.js @@ -12,12 +12,12 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React, { Component } from "react"; import MdClose from "@mui/icons-material/Close"; +import CircularProgress from "@mui/material/CircularProgress"; import IconButton from "@mui/material/IconButton"; -import TagItem from "./TagItem"; +import { Component } from "react"; import AddTagDialog from "./AddTagDialog"; -import CircularProgress from "@mui/material/CircularProgress"; +import TagItem from "./TagItem"; class TagsDialog extends Component { constructor(props) { diff --git a/src/components/EditStopPage/ToolTipIcon.js b/src/components/EditStopPage/ToolTipIcon.js index ed550c06b..3502ce1fc 100644 --- a/src/components/EditStopPage/ToolTipIcon.js +++ b/src/components/EditStopPage/ToolTipIcon.js @@ -12,7 +12,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; import MdInfo from "@mui/icons-material/Info"; import { getPrimaryDarkerColor } from "../../config/themeConfig"; diff --git a/src/components/EditStopPage/ToolTippable.js b/src/components/EditStopPage/ToolTippable.js index 0b1483b94..ec5c79ce5 100644 --- a/src/components/EditStopPage/ToolTippable.js +++ b/src/components/EditStopPage/ToolTippable.js @@ -1,5 +1,5 @@ -import React, { useState, useRef, useEffect } from "react"; import PropTypes from "prop-types"; +import { useEffect, useRef, useState } from "react"; import { createPortal } from "react-dom"; const ToolTippable = ({ children, toolTipText, toolTipStyle }) => { diff --git a/src/components/EditStopPage/VersionsPopover.js b/src/components/EditStopPage/VersionsPopover.js index e04d48367..efe71607f 100644 --- a/src/components/EditStopPage/VersionsPopover.js +++ b/src/components/EditStopPage/VersionsPopover.js @@ -12,13 +12,11 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React, { Component } from "react"; -import PropTypes from "prop-types"; import Menu from "@mui/material/Menu"; import MenuItem from "@mui/material/MenuItem"; +import PropTypes from "prop-types"; +import { Component } from "react"; import { sortVersions } from "../../utils"; -import { Popover } from "@mui/material"; -import Divider from "@mui/material/Divider"; class VersionsPopover extends Component { constructor(props) { diff --git a/src/components/EditStopPage/WeightingPopover.js b/src/components/EditStopPage/WeightingPopover.js index 4d5ca2f14..622a1c492 100644 --- a/src/components/EditStopPage/WeightingPopover.js +++ b/src/components/EditStopPage/WeightingPopover.js @@ -12,14 +12,14 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; -import MenuItem from "@mui/material/MenuItem"; import MdTransfer from "@mui/icons-material/TransferWithinAStation"; -import weightTypes, { weightColors } from "../../models/weightTypes"; -import { injectIntl } from "react-intl"; -import Menu from "@mui/material/Menu"; -import ListItemText from "@mui/material/ListItemText"; import ListItemIcon from "@mui/material/ListItemIcon"; +import ListItemText from "@mui/material/ListItemText"; +import Menu from "@mui/material/Menu"; +import MenuItem from "@mui/material/MenuItem"; +import React from "react"; +import { injectIntl } from "react-intl"; +import weightTypes, { weightColors } from "../../models/weightTypes"; class WeightingPopover extends React.Component { render() { diff --git a/src/components/EditStopPage/WheelChairPopover.js b/src/components/EditStopPage/WheelChairPopover.js index 42e8ac794..48a284569 100644 --- a/src/components/EditStopPage/WheelChairPopover.js +++ b/src/components/EditStopPage/WheelChairPopover.js @@ -12,15 +12,15 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; -import MenuItem from "@mui/material/MenuItem"; import WheelChair from "@mui/icons-material/Accessible"; import IconButton from "@mui/material/IconButton"; +import MenuItem from "@mui/material/MenuItem"; +import React from "react"; import accessibilityAssessments from "../../models/accessibilityAssessments"; -import Menu from "@mui/material/Menu"; import ListItemIcon from "@mui/material/ListItemIcon"; import ListItemText from "@mui/material/ListItemText"; +import Menu from "@mui/material/Menu"; class WheelChairPopover extends React.Component { constructor(props) { diff --git a/src/components/GroupOfStopPlaces/EditGroupOfStopPlaces.js b/src/components/GroupOfStopPlaces/EditGroupOfStopPlaces.js index fcac703da..7d4630030 100644 --- a/src/components/GroupOfStopPlaces/EditGroupOfStopPlaces.js +++ b/src/components/GroupOfStopPlaces/EditGroupOfStopPlaces.js @@ -12,25 +12,25 @@ See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React, { Component } from "react"; import MdBack from "@mui/icons-material/ArrowBack"; -import GroupOfStopPlaceDetails from "./GroupOfStopPlacesDetails"; -import { injectIntl } from "react-intl"; -import FlatButton from "@mui/material/Button"; -import MdUndo from "@mui/icons-material/Undo"; import MdSave from "@mui/icons-material/Save"; +import MdUndo from "@mui/icons-material/Undo"; +import FlatButton from "@mui/material/Button"; +import { Component } from "react"; +import { injectIntl } from "react-intl"; import { connect } from "react-redux"; -import SaveGroupDialog from "../Dialogs/SaveGroupDialog"; -import mapHelper from "../../modelUtils/mapToQueryVariables"; +import { StopPlacesGroupActions, UserActions } from "../../actions/"; import { - mutateGroupOfStopPlace, deleteGroupOfStopPlaces, + mutateGroupOfStopPlace, } from "../../actions/TiamatActions"; import * as types from "../../actions/Types"; +import mapHelper from "../../modelUtils/mapToQueryVariables"; import Routes from "../../routes/"; -import { UserActions, StopPlacesGroupActions } from "../../actions/"; -import ConfirmDialog from "../Dialogs/ConfirmDialog"; import { getIn } from "../../utils/"; +import ConfirmDialog from "../Dialogs/ConfirmDialog"; +import SaveGroupDialog from "../Dialogs/SaveGroupDialog"; +import GroupOfStopPlaceDetails from "./GroupOfStopPlacesDetails"; class EditGroupOfStopPlaces extends Component { constructor(props) { diff --git a/src/components/GroupOfStopPlaces/GroupOfStopPlacesDetails.js b/src/components/GroupOfStopPlaces/GroupOfStopPlacesDetails.js index b72ada941..098ae1481 100644 --- a/src/components/GroupOfStopPlaces/GroupOfStopPlacesDetails.js +++ b/src/components/GroupOfStopPlaces/GroupOfStopPlacesDetails.js @@ -1,9 +1,9 @@ -import React, { Component } from "react"; -import TextField from "@mui/material/TextField"; import Divider from "@mui/material/Divider"; -import GroupOfStopPlacesList from "./GroupOfStopPlacesList"; -import { StopPlacesGroupActions } from "../../actions/"; +import TextField from "@mui/material/TextField"; +import { Component } from "react"; import { connect } from "react-redux"; +import { StopPlacesGroupActions } from "../../actions/"; +import GroupOfStopPlacesList from "./GroupOfStopPlacesList"; class GroupOfStopPlacesDetails extends Component { handleChangeName(e, name) { diff --git a/src/components/GroupOfStopPlaces/GroupOfStopPlacesList.js b/src/components/GroupOfStopPlaces/GroupOfStopPlacesList.js index fe1df93a5..bce0d8fd2 100644 --- a/src/components/GroupOfStopPlaces/GroupOfStopPlacesList.js +++ b/src/components/GroupOfStopPlaces/GroupOfStopPlacesList.js @@ -12,15 +12,15 @@ See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React, { Component } from "react"; -import StopPlaceListItem from "../EditParentStopPage/StopPlaceListItem"; -import { injectIntl } from "react-intl"; -import Fab from "@mui/material/Fab"; import ContentAdd from "@mui/icons-material/Add"; +import Fab from "@mui/material/Fab"; +import { Component } from "react"; +import { injectIntl } from "react-intl"; import { connect } from "react-redux"; import StopPlacesGroupActions from "../../actions/StopPlacesGroupActions"; -import AddMemberToGroup from "../Dialogs/AddMemberToGroup"; import { getPrimaryColor } from "../../config/themeConfig"; +import AddMemberToGroup from "../Dialogs/AddMemberToGroup"; +import StopPlaceListItem from "../EditParentStopPage/StopPlaceListItem"; class GroupOfStopPlacesList extends Component { constructor(props) { diff --git a/src/components/GroupOfStopPlaces/GroupOfStopPlacesMap.js b/src/components/GroupOfStopPlaces/GroupOfStopPlacesMap.js index 47fdc7796..4ddcf10e8 100644 --- a/src/components/GroupOfStopPlaces/GroupOfStopPlacesMap.js +++ b/src/components/GroupOfStopPlaces/GroupOfStopPlacesMap.js @@ -12,13 +12,12 @@ See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React, { Component } from "react"; -import LeafletMap from "../Map/LeafletMap"; -import { connect } from "react-redux"; import debounce from "lodash.debounce"; +import { Component } from "react"; +import { connect } from "react-redux"; import { getNeighbourStops } from "../../actions/TiamatActions"; import Settings from "../../singletons/SettingsManager"; -import { StopPlaceActions } from "../../actions"; +import LeafletMap from "../Map/LeafletMap"; class GroupOfStopPlaceMap extends Component { constructor(props) { diff --git a/src/components/Header.js b/src/components/Header.js index 1d8c80c38..6421da010 100644 --- a/src/components/Header.js +++ b/src/components/Header.js @@ -12,35 +12,39 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; -import MoreMenuItem from "./MainPage/MoreMenuItem"; -import { connect } from "react-redux"; -import AppBar from "@mui/material/AppBar"; -import Toolbar from "@mui/material/Toolbar"; -import IconButton from "@mui/material/IconButton"; -import MenuItem from "@mui/material/MenuItem"; -import MoreVertIcon from "@mui/icons-material/MoreVert"; -import Typography from "@mui/material/Typography"; -import { getEnvColor, getLogo, getTheme } from "../config/themeConfig"; +import { Check } from "@mui/icons-material"; import MdAccount from "@mui/icons-material/AccountCircle"; +import MdHelp from "@mui/icons-material/Help"; import MdLanguage from "@mui/icons-material/Language"; -import MdSettings from "@mui/icons-material/Settings"; import MdMap from "@mui/icons-material/Map"; -import { UserActions } from "../actions/"; -import { getIn } from "../utils"; +import MoreVertIcon from "@mui/icons-material/MoreVert"; import MdReport from "@mui/icons-material/Report"; -import MdHelp from "@mui/icons-material/Help"; -import { getTiamatEnv } from "../config/themeConfig"; -import ConfirmDialog from "./Dialogs/ConfirmDialog"; +import MdSettings from "@mui/icons-material/Settings"; import { Button } from "@mui/material"; +import AppBar from "@mui/material/AppBar"; +import IconButton from "@mui/material/IconButton"; +import Menu from "@mui/material/Menu"; +import MenuItem from "@mui/material/MenuItem"; +import Toolbar from "@mui/material/Toolbar"; +import Typography from "@mui/material/Typography"; +import React from "react"; +import { Helmet } from "react-helmet"; +import { injectIntl } from "react-intl"; +import { connect } from "react-redux"; +import { UserActions } from "../actions/"; +import { + getEnvColor, + getLogo, + getTheme, + getTiamatEnv, +} from "../config/themeConfig"; import { toggleShowFareZonesInMap, toggleShowTariffZonesInMap, } from "../reducers/zonesSlice"; -import { injectIntl } from "react-intl"; -import { Helmet } from "react-helmet"; -import Menu from "@mui/material/Menu"; -import { Check } from "@mui/icons-material"; +import { getIn } from "../utils"; +import ConfirmDialog from "./Dialogs/ConfirmDialog"; +import MoreMenuItem from "./MainPage/MoreMenuItem"; class Header extends React.Component { constructor(props) { diff --git a/src/components/MainPage/BelongsToGroup.js b/src/components/MainPage/BelongsToGroup.js index a29967f6f..16baccc7a 100644 --- a/src/components/MainPage/BelongsToGroup.js +++ b/src/components/MainPage/BelongsToGroup.js @@ -1,4 +1,3 @@ -import React from "react"; import GroupOfStopPlacesLink from "./GroupOfStopPlacesLink"; const BelongsToGroup = ({ formatMessage, groups = [], style }) => { diff --git a/src/components/MainPage/CircularNumber.js b/src/components/MainPage/CircularNumber.js index 3765a4cb8..d966db687 100644 --- a/src/components/MainPage/CircularNumber.js +++ b/src/components/MainPage/CircularNumber.js @@ -12,8 +12,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; - export default ({ number, color }) => { let numberCircleStyle = { display: "block", diff --git a/src/components/MainPage/CreateNewStop.js b/src/components/MainPage/CreateNewStop.js index 31cae4b0a..c28d61ebf 100644 --- a/src/components/MainPage/CreateNewStop.js +++ b/src/components/MainPage/CreateNewStop.js @@ -12,8 +12,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; import Button from "@mui/material/Button"; +import React from "react"; import { connect } from "react-redux"; import { UserActions } from "../../actions/"; import newStopIcon from "../../static/icons/new-stop-icon-2x.png"; diff --git a/src/components/MainPage/FavoritePopover.js b/src/components/MainPage/FavoritePopover.js index 5d07e70cc..d556a5393 100644 --- a/src/components/MainPage/FavoritePopover.js +++ b/src/components/MainPage/FavoritePopover.js @@ -12,16 +12,15 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; -import { connect } from "react-redux"; -import MenuItem from "@mui/material/MenuItem"; -import FlatButton from "@mui/material/Button"; -import FavoriteManager from "../../singletons/FavoriteManager"; -import StarIcon from "@mui/icons-material/Star"; import MdDelete from "@mui/icons-material/Delete"; -import { UserActions } from "../../actions/"; +import StarIcon from "@mui/icons-material/Star"; import { Popover } from "@mui/material"; import IconButton from "@mui/material/IconButton"; +import MenuItem from "@mui/material/MenuItem"; +import React from "react"; +import { connect } from "react-redux"; +import { UserActions } from "../../actions/"; +import FavoriteManager from "../../singletons/FavoriteManager"; class FilterPopover extends React.Component { constructor(props) { diff --git a/src/components/MainPage/GroupOfStopPlacesLink.js b/src/components/MainPage/GroupOfStopPlacesLink.js index 28cb7bd43..99405a26a 100644 --- a/src/components/MainPage/GroupOfStopPlacesLink.js +++ b/src/components/MainPage/GroupOfStopPlacesLink.js @@ -12,9 +12,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; -import Routes from "../../routes/"; import PropTypes from "prop-types"; +import Routes from "../../routes/"; const GroupOfStopPlacesLink = ({ name, id, style }) => { const url = `${window.location.origin}/${Routes.GROUP_OF_STOP_PLACE}/${id}`; diff --git a/src/components/MainPage/GroupResultInfo.js b/src/components/MainPage/GroupResultInfo.js index dd35369d2..ef131d251 100644 --- a/src/components/MainPage/GroupResultInfo.js +++ b/src/components/MainPage/GroupResultInfo.js @@ -12,12 +12,12 @@ See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React, { Component } from "react"; -import PropTypes from "prop-types"; import MdGroup from "@mui/icons-material/GroupWork"; -import CircularNumber from "./CircularNumber"; +import PropTypes from "prop-types"; +import { Component } from "react"; import { getPrimaryDarkerColor } from "../../config/themeConfig"; import StopPlaceLink from "../ReportPage/StopPlaceLink"; +import CircularNumber from "./CircularNumber"; class GroupResultInfo extends Component { render() { diff --git a/src/components/MainPage/HasExpiredInfo.js b/src/components/MainPage/HasExpiredInfo.js index 77e86c726..2a41d0585 100644 --- a/src/components/MainPage/HasExpiredInfo.js +++ b/src/components/MainPage/HasExpiredInfo.js @@ -12,9 +12,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React, { Component } from "react"; -import { injectIntl } from "react-intl"; import Warning from "@mui/icons-material/Warning"; +import { Component } from "react"; +import { injectIntl } from "react-intl"; class HasExpiredInfo extends Component { render() { diff --git a/src/components/MainPage/ModalityIconImg.js b/src/components/MainPage/ModalityIconImg.js index a67a1faad..630259ea4 100644 --- a/src/components/MainPage/ModalityIconImg.js +++ b/src/components/MainPage/ModalityIconImg.js @@ -12,8 +12,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; import PropTypes from "prop-types"; +import React from "react"; import "../../styles/menu.css"; import { getSvgIconByTypeOrSubmode } from "../../utils/iconUtils"; diff --git a/src/components/MainPage/ModalityIconSvg.js b/src/components/MainPage/ModalityIconSvg.js index 26da3911d..ed8cef0c1 100644 --- a/src/components/MainPage/ModalityIconSvg.js +++ b/src/components/MainPage/ModalityIconSvg.js @@ -12,11 +12,11 @@ See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; import SvgIcon from "@mui/material/SvgIcon"; import PropTypes from "prop-types"; -import "../../styles/menu.css"; +import React from "react"; import svgSprite from "../../static/icons/svg-sprite.svg"; +import "../../styles/menu.css"; class ModalityIconSvg extends React.Component { shouldComponentUpdate(nextProps) { diff --git a/src/components/MainPage/MoreMenuItem.tsx b/src/components/MainPage/MoreMenuItem.tsx index 397a64a12..01aa35edd 100644 --- a/src/components/MainPage/MoreMenuItem.tsx +++ b/src/components/MainPage/MoreMenuItem.tsx @@ -1,13 +1,13 @@ -import React, { +import NavigateNextIcon from "@mui/icons-material/NavigateNext"; +import { Menu, MenuItem, MenuItemProps, MenuProps } from "@mui/material"; +import { + FC, KeyboardEventHandler, - useRef, - useState, useCallback, useId, - FC, + useRef, + useState, } from "react"; -import { MenuItemProps, MenuItem, Menu, MenuProps } from "@mui/material"; -import NavigateNextIcon from "@mui/icons-material/NavigateNext"; type MoreMenuItemProps = { button?: true; diff --git a/src/components/MainPage/ParentStopPlaceResultInfo.js b/src/components/MainPage/ParentStopPlaceResultInfo.js index b11859fa6..f08b0cc50 100644 --- a/src/components/MainPage/ParentStopPlaceResultInfo.js +++ b/src/components/MainPage/ParentStopPlaceResultInfo.js @@ -12,17 +12,17 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ +import WheelChair from "@mui/icons-material/Accessible"; +import { Component } from "react"; +import { getPrimaryDarkerColor } from "../../config/themeConfig"; +import { getIn } from "../../utils/"; +import ModalityTray from "../ReportPage/ModalityIconTray"; +import StopPlaceLink from "../ReportPage/StopPlaceLink"; import BelongsToGroup from "./BelongsToGroup"; import CircularNumber from "./CircularNumber"; import HasExpiredInfo from "./HasExpiredInfo"; -import ModalityTray from "../ReportPage/ModalityIconTray"; -import React, { Component } from "react"; -import StopPlaceLink from "../ReportPage/StopPlaceLink"; -import TagTray from "./TagTray"; -import WheelChair from "@mui/icons-material/Accessible"; -import { getIn } from "../../utils/"; -import { getPrimaryDarkerColor } from "../../config/themeConfig"; import ModalityIconImg from "./ModalityIconImg"; +import TagTray from "./TagTray"; class ParentStopPlaceResultInfo extends Component { render() { diff --git a/src/components/MainPage/SearchBox.js b/src/components/MainPage/SearchBox.js index a79d77d7e..28c699c92 100644 --- a/src/components/MainPage/SearchBox.js +++ b/src/components/MainPage/SearchBox.js @@ -12,47 +12,45 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import { connect } from "react-redux"; -import React from "react"; -import ReactDOM from "react-dom"; -import Autocomplete, { createFilterOptions } from "@mui/material/Autocomplete"; import MdMore from "@mui/icons-material/ExpandMore"; -import { StopPlaceActions, UserActions } from "../../actions/"; -import SearchBoxDetails from "./SearchBoxDetails"; -import NewStopPlace from "./CreateNewStop"; -import { injectIntl } from "react-intl"; -import MenuItem from "@mui/material/MenuItem"; -import SearchIcon from "@mui/icons-material/Search"; -import FavoriteManager from "../../singletons/FavoriteManager"; -import CoordinatesDialog from "../Dialogs/CoordinatesDialog"; -import { - findEntitiesWithFilters, - findTopographicalPlace, -} from "../../actions/TiamatActions"; -import FavoritePopover from "./FavoritePopover"; -import ModalityFilter from "../EditStopPage/ModalityFilter"; -import FavoriteNameDialog from "../Dialogs/FavoriteNameDialog"; -import TopographicalFilter from "./TopographicalFilter"; -import debounce from "lodash.debounce"; -import { getIn } from "../../utils/"; -import { getPrimaryDarkerColor } from "../../config/themeConfig"; import MdLocationSearching from "@mui/icons-material/LocationSearching"; -import MdSpinner from "../../static/icons/spinner"; -import { createSearchMenuItem } from "./SearchMenuItem"; -import Menu from "@mui/material/Menu"; -import CheckBox from "@mui/material/Checkbox"; -import Routes from "../../routes/"; -import { Entities } from "../../models/Entities"; -import RoleParser from "../../roles/rolesParser"; +import SearchIcon from "@mui/icons-material/Search"; import { Box, Button, Checkbox, FormControlLabel, FormGroup, - Popover, } from "@mui/material"; +import Autocomplete, { createFilterOptions } from "@mui/material/Autocomplete"; +import Menu from "@mui/material/Menu"; +import MenuItem from "@mui/material/MenuItem"; import TextField from "@mui/material/TextField"; +import debounce from "lodash.debounce"; +import React from "react"; +import ReactDOM from "react-dom"; +import { injectIntl } from "react-intl"; +import { connect } from "react-redux"; +import { StopPlaceActions, UserActions } from "../../actions/"; +import { + findEntitiesWithFilters, + findTopographicalPlace, +} from "../../actions/TiamatActions"; +import { getPrimaryDarkerColor } from "../../config/themeConfig"; +import { Entities } from "../../models/Entities"; +import RoleParser from "../../roles/rolesParser"; +import Routes from "../../routes/"; +import FavoriteManager from "../../singletons/FavoriteManager"; +import MdSpinner from "../../static/icons/spinner"; +import { getIn } from "../../utils/"; +import CoordinatesDialog from "../Dialogs/CoordinatesDialog"; +import FavoriteNameDialog from "../Dialogs/FavoriteNameDialog"; +import ModalityFilter from "../EditStopPage/ModalityFilter"; +import NewStopPlace from "./CreateNewStop"; +import FavoritePopover from "./FavoritePopover"; +import SearchBoxDetails from "./SearchBoxDetails"; +import { createSearchMenuItem } from "./SearchMenuItem"; +import TopographicalFilter from "./TopographicalFilter"; class SearchBox extends React.Component { constructor(props) { diff --git a/src/components/MainPage/SearchBoxDetails.js b/src/components/MainPage/SearchBoxDetails.js index 7817d25dd..a3bde6c77 100644 --- a/src/components/MainPage/SearchBoxDetails.js +++ b/src/components/MainPage/SearchBoxDetails.js @@ -12,14 +12,13 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; +import { Entities } from "../../models/Entities"; +import GroupResultInfo from "./GroupResultInfo"; +import ParentStopPlaceResultInfo from "./ParentStopPlaceResultInfo"; import SearchBoxEdit from "./SearchBoxEditActions"; -import SearchBoxUsingTempGeo from "./SearchBoxUsingTempGeo"; import SearchBoxGeoWarning from "./SearchBoxGeoWarning"; +import SearchBoxUsingTempGeo from "./SearchBoxUsingTempGeo"; import StopPlaceResultInfo from "./StopPlaceResultInfo"; -import ParentStopPlaceResultInfo from "./ParentStopPlaceResultInfo"; -import GroupResultInfo from "./GroupResultInfo"; -import { Entities } from "../../models/Entities"; const SearchBoxDetails = ({ text, diff --git a/src/components/MainPage/SearchBoxEditActions.js b/src/components/MainPage/SearchBoxEditActions.js index 5aa008bb3..ee7968482 100644 --- a/src/components/MainPage/SearchBoxEditActions.js +++ b/src/components/MainPage/SearchBoxEditActions.js @@ -12,10 +12,10 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React, { Component } from "react"; import Edit from "@mui/icons-material/ModeEdit"; -import FlatButton from "@mui/material/Button"; import MapsMyLocation from "@mui/icons-material/MyLocation"; +import FlatButton from "@mui/material/Button"; +import { Component } from "react"; class SearchBoxEditAction extends Component { render() { diff --git a/src/components/MainPage/SearchBoxGeoWarning.js b/src/components/MainPage/SearchBoxGeoWarning.js index 707a22092..7478e68c2 100644 --- a/src/components/MainPage/SearchBoxGeoWarning.js +++ b/src/components/MainPage/SearchBoxGeoWarning.js @@ -12,9 +12,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React, { Component } from "react"; -import { FormattedMessage } from "react-intl"; import Warning from "@mui/icons-material/Warning"; +import { Component } from "react"; +import { FormattedMessage } from "react-intl"; class SearchBoxGeoWarning extends Component { render() { diff --git a/src/components/MainPage/SearchBoxUsingTempGeo.js b/src/components/MainPage/SearchBoxUsingTempGeo.js index cdf6ac07c..0b3301aa8 100644 --- a/src/components/MainPage/SearchBoxUsingTempGeo.js +++ b/src/components/MainPage/SearchBoxUsingTempGeo.js @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React, { Component } from "react"; +import { Component } from "react"; import { FormattedMessage } from "react-intl"; class SearchBoxMissingGeo extends Component { diff --git a/src/components/MainPage/SearchMenuItem.js b/src/components/MainPage/SearchMenuItem.js index 669c196c2..f1aab11e4 100644 --- a/src/components/MainPage/SearchMenuItem.js +++ b/src/components/MainPage/SearchMenuItem.js @@ -12,12 +12,11 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; -import ModalityIconImg from "./ModalityIconImg"; -import ModalityIconTray from "../ReportPage/ModalityIconTray"; +import MdGroup from "@mui/icons-material/GroupWork"; import { hasExpired, isFuture } from "../../modelUtils/validBetween"; import { Entities } from "../../models/Entities"; -import MdGroup from "@mui/icons-material/GroupWork"; +import ModalityIconTray from "../ReportPage/ModalityIconTray"; +import ModalityIconImg from "./ModalityIconImg"; export const createSearchMenuItem = (element, formatMessage) => { if (!element) return null; diff --git a/src/components/MainPage/StopPlaceResultInfo.js b/src/components/MainPage/StopPlaceResultInfo.js index 4af654e91..67f6e9329 100644 --- a/src/components/MainPage/StopPlaceResultInfo.js +++ b/src/components/MainPage/StopPlaceResultInfo.js @@ -12,16 +12,16 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React, { Component } from "react"; -import HasExpiredInfo from "./HasExpiredInfo"; -import ModalityIconImg from "./ModalityIconImg"; -import CircularNumber from "./CircularNumber"; import WheelChair from "@mui/icons-material/Accessible"; -import { getIn } from "../../utils/"; -import TagTray from "./TagTray"; +import { Component } from "react"; import { getPrimaryDarkerColor } from "../../config/themeConfig"; -import BelongsToGroup from "./BelongsToGroup"; +import { getIn } from "../../utils/"; import Code from "../EditStopPage/Code"; +import BelongsToGroup from "./BelongsToGroup"; +import CircularNumber from "./CircularNumber"; +import HasExpiredInfo from "./HasExpiredInfo"; +import ModalityIconImg from "./ModalityIconImg"; +import TagTray from "./TagTray"; class StopPlaceResultInfo extends Component { render() { diff --git a/src/components/MainPage/Tag.js b/src/components/MainPage/Tag.js index 6ea4b0412..09a54d687 100644 --- a/src/components/MainPage/Tag.js +++ b/src/components/MainPage/Tag.js @@ -12,10 +12,10 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React, { Component } from "react"; import PropTypes from "prop-types"; -import ToolTippable from "../EditStopPage/ToolTippable"; +import { Component } from "react"; import { injectIntl } from "react-intl"; +import ToolTippable from "../EditStopPage/ToolTippable"; class Tag extends Component { render() { diff --git a/src/components/MainPage/TagTray.js b/src/components/MainPage/TagTray.js index 4fc57ff84..0819b3368 100644 --- a/src/components/MainPage/TagTray.js +++ b/src/components/MainPage/TagTray.js @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React, { Component } from "react"; +import { Component } from "react"; import Tag from "./Tag"; class TagTray extends Component { diff --git a/src/components/MainPage/TopographicalFilter.js b/src/components/MainPage/TopographicalFilter.js index 567cd8f87..b4965c541 100644 --- a/src/components/MainPage/TopographicalFilter.js +++ b/src/components/MainPage/TopographicalFilter.js @@ -12,8 +12,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; import Chip from "@mui/material/Chip"; +import React from "react"; class TopographicalFilter extends React.Component { renderChip(data) { diff --git a/src/components/Map/BoardingPositionMarker.tsx b/src/components/Map/BoardingPositionMarker.tsx index 2f0640504..2b63b152f 100644 --- a/src/components/Map/BoardingPositionMarker.tsx +++ b/src/components/Map/BoardingPositionMarker.tsx @@ -1,9 +1,9 @@ +import { divIcon, DragEndEvent } from "leaflet"; import React from "react"; import ReactDOM from "react-dom/server"; import { Marker, Popup } from "react-leaflet"; -import { divIcon, DragEndEvent } from "leaflet"; -import BoardingPositionMarkerIcon from "./BoardingPositionMarkerIcon"; import Code from "../EditStopPage/Code"; +import BoardingPositionMarkerIcon from "./BoardingPositionMarkerIcon"; type Props = { position: [number, number]; diff --git a/src/components/Map/CoordinateMarker.js b/src/components/Map/CoordinateMarker.js index 91c148555..a187ef29a 100644 --- a/src/components/Map/CoordinateMarker.js +++ b/src/components/Map/CoordinateMarker.js @@ -12,13 +12,13 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ +import L from "leaflet"; import React from "react"; +import { injectIntl } from "react-intl"; import { Marker, Popup } from "react-leaflet"; import { connect } from "react-redux"; import { UserActions } from "../../actions/"; -import L from "leaflet"; import coordinatesIcon from "../../static/icons/coordinates-marker.png"; -import { injectIntl } from "react-intl"; import mapCenterIcon from "../../static/icons/map-center.png"; import mapZoomIn from "../../static/icons/map-zoom-in.png"; diff --git a/src/components/Map/CustomMarkerIcon.js b/src/components/Map/CustomMarkerIcon.js index 1ab9ea587..a2d062420 100644 --- a/src/components/Map/CustomMarkerIcon.js +++ b/src/components/Map/CustomMarkerIcon.js @@ -12,7 +12,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; import { getIconByTypeOrSubmode } from "../../utils/iconUtils"; const CustomMarkerIcon = ({ diff --git a/src/components/Map/CycleParkingMarker.js b/src/components/Map/CycleParkingMarker.js index 90476908d..ae1cf9593 100644 --- a/src/components/Map/CycleParkingMarker.js +++ b/src/components/Map/CycleParkingMarker.js @@ -12,15 +12,15 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React, { Component } from "react"; +import classNames from "classnames"; +import L from "leaflet"; import PropTypes from "prop-types"; +import { Component } from "react"; import { Marker, Popup } from "react-leaflet"; -import L from "leaflet"; import { connect } from "react-redux"; -import classNames from "classnames"; -import CycleParkingIcon from "../../static/icons/cycle-parking-icon.png"; -import { getPrimaryDarkerColor } from "../../config/themeConfig"; import { StopPlaceActions } from "../../actions/"; +import { getPrimaryDarkerColor } from "../../config/themeConfig"; +import CycleParkingIcon from "../../static/icons/cycle-parking-icon.png"; import { shallowCycleParkingMarker as shallowCompare } from "./shallowCompare/"; class CycleParkingMarker extends Component { diff --git a/src/components/Map/EditStopMap.js b/src/components/Map/EditStopMap.js index cd72d83eb..7fe15f9c4 100644 --- a/src/components/Map/EditStopMap.js +++ b/src/components/Map/EditStopMap.js @@ -12,17 +12,17 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import { connect } from "react-redux"; +import debounce from "lodash.debounce"; import React from "react"; -import LeafletMap from "./LeafletMap"; -import { StopPlaceActions, UserActions } from "../../actions/"; import { injectIntl } from "react-intl"; -import { setDecimalPrecision } from "../../utils"; -import CoordinatesDialog from "../Dialogs/CoordinatesDialog"; -import CompassBearingDialog from "../Dialogs/CompassBearingDialog"; -import debounce from "lodash.debounce"; +import { connect } from "react-redux"; +import { StopPlaceActions, UserActions } from "../../actions/"; import { getNeighbourStops } from "../../actions/TiamatActions"; import Settings from "../../singletons/SettingsManager"; +import { setDecimalPrecision } from "../../utils"; +import CompassBearingDialog from "../Dialogs/CompassBearingDialog"; +import CoordinatesDialog from "../Dialogs/CoordinatesDialog"; +import LeafletMap from "./LeafletMap"; class EditStopMap extends React.Component { constructor(props) { diff --git a/src/components/Map/LeafletMap.js b/src/components/Map/LeafletMap.js index 663bc77c0..e6c396de8 100644 --- a/src/components/Map/LeafletMap.js +++ b/src/components/Map/LeafletMap.js @@ -12,24 +12,23 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React, { useContext, useEffect, useMemo, useState } from "react"; -import MarkerList from "./MarkerList"; +import { useContext, useEffect, useMemo, useState } from "react"; import { + LayersControl, MapContainer, + ScaleControl, TileLayer, ZoomControl, - LayersControl, - ScaleControl, } from "react-leaflet"; -import { GoogleLayer } from "@entur/react-leaflet-google"; -import MultiPolylineList from "./PathLink"; -import MultimodalStopEdges from "./MultimodalStopEdges"; -import StopPlaceGroupList from "./StopPlaceGroupList"; -import { MapEvents } from "./MapEvents"; -import { KartverketFlyFotoLayer } from "./KartverketFlyFotoLayer"; +import { ConfigContext } from "../../config/ConfigContext"; import { FareZones } from "../Zones/FareZones"; import { TariffZones } from "../Zones/TariffZones"; -import { ConfigContext } from "../../config/ConfigContext"; +import { KartverketFlyFotoLayer } from "./KartverketFlyFotoLayer"; +import { MapEvents } from "./MapEvents"; +import MarkerList from "./MarkerList"; +import MultimodalStopEdges from "./MultimodalStopEdges"; +import MultiPolylineList from "./PathLink"; +import StopPlaceGroupList from "./StopPlaceGroupList"; const lmapStyle = { border: "2px solid #eee", diff --git a/src/components/Map/MarkerList.js b/src/components/Map/MarkerList.js index 895784f76..e436d1d5a 100644 --- a/src/components/Map/MarkerList.js +++ b/src/components/Map/MarkerList.js @@ -12,31 +12,28 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; import PropTypes from "prop-types"; -import StopPlaceMarker from "./StopPlaceMarker"; -import NewStopMarker from "./NewStopMarker"; +import React from "react"; +import { injectIntl } from "react-intl"; +import { connect } from "react-redux"; import { StopPlaceActions, - UserActions, StopPlacesGroupActions, + UserActions, } from "../../actions/"; -import { connect } from "react-redux"; -import { injectIntl } from "react-intl"; +import { getNeighbourStopPlaceQuays } from "../../actions/TiamatActions"; +import { Entities } from "../../models/Entities"; +import Routes from "../../routes/"; +import { getIn, setDecimalPrecision } from "../../utils"; +import BoardingPositionMarker from "./BoardingPositionMarker"; +import CoordinateMarker from "./CoordinateMarker"; +import CycleParkingMarker from "./CycleParkingMarker"; +import * as MarkerStrings from "./markerText"; import NeighbourMarker from "./NeighbourMarker"; +import NewStopMarker from "./NewStopMarker"; import ParkAndRideMarker from "./ParkAndRideMarker"; -import CycleParkingMarker from "./CycleParkingMarker"; -import { setDecimalPrecision, getIn } from "../../utils"; import QuayMarker from "./QuayMarker"; -import CoordinateMarker from "./CoordinateMarker"; -import Routes from "../../routes/"; -import * as MarkerStrings from "./markerText"; -import { Entities } from "../../models/Entities"; -import { - getNeighbourStopPlaceQuays, - getStopPlaceWithAll, -} from "../../actions/TiamatActions"; -import BoardingPositionMarker from "./BoardingPositionMarker"; +import StopPlaceMarker from "./StopPlaceMarker"; class MarkerList extends React.Component { static propTypes = { diff --git a/src/components/Map/MultimodalStopEdges.js b/src/components/Map/MultimodalStopEdges.js index 3e2afff19..e3bd391d2 100644 --- a/src/components/Map/MultimodalStopEdges.js +++ b/src/components/Map/MultimodalStopEdges.js @@ -12,8 +12,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React, { Component } from "react"; -import { Polyline, FeatureGroup } from "react-leaflet"; +import { Component } from "react"; +import { FeatureGroup, Polyline } from "react-leaflet"; import { connect } from "react-redux"; import { getCoordinatesFromGeometry } from "../../utils/"; diff --git a/src/components/Map/NeighbourMarker.js b/src/components/Map/NeighbourMarker.js index db370bc76..65bcdab64 100644 --- a/src/components/Map/NeighbourMarker.js +++ b/src/components/Map/NeighbourMarker.js @@ -12,16 +12,16 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; -import PropTypes from "prop-types"; -import { Marker, Popup } from "react-leaflet"; import { divIcon } from "leaflet"; +import PropTypes from "prop-types"; +import React from "react"; import ReactDOM from "react-dom/server"; +import { Marker, Popup } from "react-leaflet"; +import { connect } from "react-redux"; +import { isLegalChildStopPlace } from "../../utils/roleUtils"; import CustomMarkerIcon from "./CustomMarkerIcon"; -import { shallowCompareNeighbourMarker as shallowCompare } from "./shallowCompare/"; import PopupButton from "./PopupButton"; -import { isLegalChildStopPlace } from "../../utils/roleUtils"; -import { connect } from "react-redux"; +import { shallowCompareNeighbourMarker as shallowCompare } from "./shallowCompare/"; class NeighbourMarker extends React.Component { constructor(props) { diff --git a/src/components/Map/NewStopMarker.js b/src/components/Map/NewStopMarker.js index 7e4d73f88..78f6985e4 100644 --- a/src/components/Map/NewStopMarker.js +++ b/src/components/Map/NewStopMarker.js @@ -12,15 +12,15 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; +import L from "leaflet"; import PropTypes from "prop-types"; +import React from "react"; import { Marker, Popup } from "react-leaflet"; -import L from "leaflet"; import { connect } from "react-redux"; import { isPointInPolygon } from "../../utils/mapUtils"; -import newStopIcon from "../../static/icons/new-stop-icon-2x.png"; import markerShadow from "../../static/icons/marker-shadow.png"; +import newStopIcon from "../../static/icons/new-stop-icon-2x.png"; class NewStopMarker extends React.Component { static propTypes = { diff --git a/src/components/Map/ParkAndRideMarker.js b/src/components/Map/ParkAndRideMarker.js index 0be4c8414..60ddd582d 100644 --- a/src/components/Map/ParkAndRideMarker.js +++ b/src/components/Map/ParkAndRideMarker.js @@ -12,16 +12,16 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ +import classNames from "classnames"; +import L from "leaflet"; +import PropTypes from "prop-types"; import React from "react"; import { Marker, Popup } from "react-leaflet"; -import PropTypes from "prop-types"; -import L from "leaflet"; import { connect } from "react-redux"; -import classNames from "classnames"; import ParkingIcon from "../../static/icons/parking-icon.png"; -import { getPrimaryDarkerColor } from "../../config/themeConfig"; import { StopPlaceActions } from "../../actions/"; +import { getPrimaryDarkerColor } from "../../config/themeConfig"; import { shallowCompareParkNRide as shallowCompare } from "./shallowCompare/"; class ParkingAndRideMarker extends React.Component { diff --git a/src/components/Map/PathLink.js b/src/components/Map/PathLink.js index 54859de30..07cc58ec4 100644 --- a/src/components/Map/PathLink.js +++ b/src/components/Map/PathLink.js @@ -13,13 +13,13 @@ See the Licence for the specific language governing permissions and limitations under the Licence. */ import React from "react"; -import { Polyline, Popup, FeatureGroup } from "react-leaflet"; +import { injectIntl } from "react-intl"; +import { FeatureGroup, Polyline, Popup } from "react-leaflet"; import { connect } from "react-redux"; -import GenerateColor from "../../models/Colors"; import { UserActions } from "../../actions"; -import { injectIntl } from "react-intl"; -import WalkingDistanceDialog from "../Dialogs/WalkingDistanceDialog"; +import GenerateColor from "../../models/Colors"; import { getIn } from "../../utils"; +import WalkingDistanceDialog from "../Dialogs/WalkingDistanceDialog"; class PathLink extends React.Component { constructor(props) { diff --git a/src/components/Map/PopupButton.js b/src/components/Map/PopupButton.js index f71840966..5eb128ffb 100644 --- a/src/components/Map/PopupButton.js +++ b/src/components/Map/PopupButton.js @@ -12,8 +12,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React, { Component } from "react"; import PropTypes from "prop-types"; +import { Component } from "react"; class PopupButton extends Component { render() { diff --git a/src/components/Map/QuayMarker.js b/src/components/Map/QuayMarker.js index 6c5192b1d..6f2266eac 100644 --- a/src/components/Map/QuayMarker.js +++ b/src/components/Map/QuayMarker.js @@ -12,21 +12,21 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; -import PropTypes from "prop-types"; -import { Marker, Popup } from "react-leaflet"; import { divIcon } from "leaflet"; +import PropTypes from "prop-types"; +import React from "react"; import ReactDOM from "react-dom/server"; +import { Marker, Popup } from "react-leaflet"; import { connect } from "react-redux"; +import { StopPlaceActions, UserActions } from "../../actions/"; import compassIcon from "../../static/icons/compass.png"; -import { UserActions, StopPlaceActions } from "../../actions/"; import OSMIcon from "../../static/icons/osm_logo.png"; import StreetViewIcon from "../../static/icons/street_view_logo.png"; import { getIn } from "../../utils/"; import Code from "../EditStopPage/Code"; -import { compareShallowQuayMarker as shallowCompare } from "./shallowCompare/"; -import QuayMarkerIcon from "./QuayMarkerIcon"; import PopupButton from "./PopupButton"; +import QuayMarkerIcon from "./QuayMarkerIcon"; +import { compareShallowQuayMarker as shallowCompare } from "./shallowCompare/"; class QuayMarker extends React.Component { static propTypes = { diff --git a/src/components/Map/StopPlaceGroup.js b/src/components/Map/StopPlaceGroup.js index e36e01cd0..67bfdfcb6 100644 --- a/src/components/Map/StopPlaceGroup.js +++ b/src/components/Map/StopPlaceGroup.js @@ -1,4 +1,4 @@ -import React, { Component } from "react"; +import { Component } from "react"; import { Polygon, Popup } from "react-leaflet"; import { sortPolygonByAngles } from "../../utils/mapUtils"; diff --git a/src/components/Map/StopPlaceGroupList.js b/src/components/Map/StopPlaceGroupList.js index 676ed279a..be61841e3 100644 --- a/src/components/Map/StopPlaceGroupList.js +++ b/src/components/Map/StopPlaceGroupList.js @@ -12,11 +12,10 @@ See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; -import StopPlaceGroup from "./StopPlaceGroup"; +import { FeatureGroup } from "react-leaflet"; import { connect } from "react-redux"; import { Entities } from "../../models/Entities"; -import { FeatureGroup } from "react-leaflet"; +import StopPlaceGroup from "./StopPlaceGroup"; const StopPlaceGroupList = ({ list }) => ( diff --git a/src/components/Map/StopPlaceMarker.js b/src/components/Map/StopPlaceMarker.js index 20760618d..92ae0b5e0 100644 --- a/src/components/Map/StopPlaceMarker.js +++ b/src/components/Map/StopPlaceMarker.js @@ -12,14 +12,14 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; -import PropTypes from "prop-types"; -import { Marker, Popup } from "react-leaflet"; import { divIcon } from "leaflet"; +import PropTypes from "prop-types"; +import React from "react"; import ReactDOM from "react-dom/server"; +import { Marker, Popup } from "react-leaflet"; +import PopupButton from "../Map/PopupButton"; import CustomMarkerIcon from "./CustomMarkerIcon"; import { shallowCompareStopPlaceMarker as shallowCompare } from "./shallowCompare/"; -import PopupButton from "../Map/PopupButton"; class StopPlaceMarker extends React.Component { static propTypes = { diff --git a/src/components/Map/StopPlacesMap.js b/src/components/Map/StopPlacesMap.js index 76ce52fbc..fce799db9 100644 --- a/src/components/Map/StopPlacesMap.js +++ b/src/components/Map/StopPlacesMap.js @@ -12,16 +12,16 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import { connect } from "react-redux"; +import debounce from "lodash.debounce"; import React from "react"; -import LeafletMap from "./LeafletMap"; -import { StopPlaceActions, UserActions } from "../../actions/"; -import { getIn } from "../../utils/"; import { injectIntl } from "react-intl"; +import { connect } from "react-redux"; +import { StopPlaceActions, UserActions } from "../../actions/"; import { getNeighbourStops } from "../../actions/TiamatActions"; -import Settings from "../../singletons/SettingsManager"; -import debounce from "lodash.debounce"; import { getMarkersForMap } from "../../selectors/StopPlaceMap"; +import Settings from "../../singletons/SettingsManager"; +import { getIn } from "../../utils/"; +import LeafletMap from "./LeafletMap"; class StopPlacesMap extends React.Component { constructor(props) { diff --git a/src/components/Map/WMTSLayer.tsx b/src/components/Map/WMTSLayer.tsx index 690cce65a..0d0e6e279 100644 --- a/src/components/Map/WMTSLayer.tsx +++ b/src/components/Map/WMTSLayer.tsx @@ -1,6 +1,6 @@ -import React, { useEffect, useMemo } from "react"; -import { TileLayer } from "react-leaflet"; import L from "leaflet"; +import React, { useMemo } from "react"; +import { TileLayer } from "react-leaflet"; export interface WMTSLayerProps { baseUrl: string; diff --git a/src/components/Map/hooks/useGktToken.ts b/src/components/Map/hooks/useGktToken.ts index 1f1e49bec..04ac1542e 100644 --- a/src/components/Map/hooks/useGktToken.ts +++ b/src/components/Map/hooks/useGktToken.ts @@ -1,5 +1,5 @@ -import { useContext, useEffect, useState } from "react"; import Axios from "axios"; +import { useContext, useEffect, useState } from "react"; import { ConfigContext } from "../../../config/ConfigContext"; const INTERVAL_IN_MS = 60000; diff --git a/src/components/ReportPage/AdvancedReportFilters.js b/src/components/ReportPage/AdvancedReportFilters.js index 73575d03e..5f010bc6c 100644 --- a/src/components/ReportPage/AdvancedReportFilters.js +++ b/src/components/ReportPage/AdvancedReportFilters.js @@ -12,13 +12,13 @@ See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React, { Component } from "react"; -import Checkbox from "@mui/material/Checkbox"; +import MdMore from "@mui/icons-material/ExpandMore"; +import { FormControlLabel } from "@mui/material"; import Button from "@mui/material/Button"; +import Checkbox from "@mui/material/Checkbox"; import Menu from "@mui/material/Menu"; import MenuItem from "@mui/material/MenuItem"; -import { FormControlLabel, Popover } from "@mui/material"; -import MdMore from "@mui/icons-material/ExpandMore"; +import { Component } from "react"; class AdvancedReportFilters extends Component { constructor(props) { diff --git a/src/components/ReportPage/GeneralReportFilters.js b/src/components/ReportPage/GeneralReportFilters.js index 2c093044b..de79905af 100644 --- a/src/components/ReportPage/GeneralReportFilters.js +++ b/src/components/ReportPage/GeneralReportFilters.js @@ -12,13 +12,13 @@ See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React, { Component } from "react"; -import Checkbox from "@mui/material/Checkbox"; +import MdMore from "@mui/icons-material/ExpandMore"; +import { FormControlLabel } from "@mui/material"; import Button from "@mui/material/Button"; +import Checkbox from "@mui/material/Checkbox"; import Menu from "@mui/material/Menu"; import MenuItem from "@mui/material/MenuItem"; -import { FormControlLabel, Popover } from "@mui/material"; -import MdMore from "@mui/icons-material/ExpandMore"; +import { Component } from "react"; class GeneralReportFilters extends Component { constructor(props) { diff --git a/src/components/ReportPage/ModalityIconTray.js b/src/components/ReportPage/ModalityIconTray.js index aa45e3745..1952cf925 100644 --- a/src/components/ReportPage/ModalityIconTray.js +++ b/src/components/ReportPage/ModalityIconTray.js @@ -12,10 +12,10 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React, { Component } from "react"; import PropTypes from "prop-types"; -import ModalityIconImg from "../MainPage/ModalityIconImg"; +import { Component } from "react"; import { getUniqueStopPlaceTypes } from "../../models/stopPlaceUtils"; +import ModalityIconImg from "../MainPage/ModalityIconImg"; class ModalityIconTray extends Component { render() { diff --git a/src/components/ReportPage/ReportPageFooter.js b/src/components/ReportPage/ReportPageFooter.js index fe55bf159..47462ce84 100644 --- a/src/components/ReportPage/ReportPageFooter.js +++ b/src/components/ReportPage/ReportPageFooter.js @@ -12,18 +12,17 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; import Button from "@mui/material/Button"; -import { jsonArrayToCSV } from "../../utils/CSVHelper"; -import { - ColumnTransformersStopPlace, - ColumnTransformersQuays, -} from "../../models/columnTransformers"; import Menu from "@mui/material/Menu"; import MenuItem from "@mui/material/MenuItem"; import moment from "moment"; +import React from "react"; import { getDarkColor } from "../../config/themeConfig"; -import { Popover } from "@mui/material"; +import { + ColumnTransformersQuays, + ColumnTransformersStopPlace, +} from "../../models/columnTransformers"; +import { jsonArrayToCSV } from "../../utils/CSVHelper"; class ReportPageFooter extends React.Component { constructor(props) { diff --git a/src/components/ReportPage/ShowMoreMenuFooter.js b/src/components/ReportPage/ShowMoreMenuFooter.js index d0f1e30ae..4430e82f5 100644 --- a/src/components/ReportPage/ShowMoreMenuFooter.js +++ b/src/components/ReportPage/ShowMoreMenuFooter.js @@ -12,9 +12,9 @@ See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React, { Component } from "react"; import FlatButton from "@mui/material/Button"; import Typography from "@mui/material/Typography"; +import { Component } from "react"; class ShowMoreMenuFooter extends Component { render() { diff --git a/src/components/ReportPage/StopPlaceLink.js b/src/components/ReportPage/StopPlaceLink.js index c35af53bb..44f9bd9b0 100644 --- a/src/components/ReportPage/StopPlaceLink.js +++ b/src/components/ReportPage/StopPlaceLink.js @@ -12,7 +12,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; import { Link } from "react-router-dom"; import Routes from "../../routes/"; diff --git a/src/components/ReportPage/TagFilterTray.js b/src/components/ReportPage/TagFilterTray.js index ce7912d19..1c25d8cf0 100644 --- a/src/components/ReportPage/TagFilterTray.js +++ b/src/components/ReportPage/TagFilterTray.js @@ -12,8 +12,8 @@ See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React, { Component } from "react"; import Chip from "@mui/material/Chip"; +import { Component } from "react"; import TagSuggestionPopover from "./TagSuggestionPopover"; class TagFilterTray extends Component { diff --git a/src/components/ReportPage/TagSuggestionPopover.js b/src/components/ReportPage/TagSuggestionPopover.js index 3659b77d4..2641fb679 100644 --- a/src/components/ReportPage/TagSuggestionPopover.js +++ b/src/components/ReportPage/TagSuggestionPopover.js @@ -12,19 +12,19 @@ See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React, { Component } from "react"; +import MdAdd from "@mui/icons-material/Add"; +import { FormControlLabel } from "@mui/material"; import FlatButton from "@mui/material/Button"; -import { getTagsByName } from "../../actions/TiamatActions"; -import MenuItem from "@mui/material/MenuItem"; -import Menu from "@mui/material/Menu"; import Checkbox from "@mui/material/Checkbox"; -import ShowMoreMenuFooter from "./ShowMoreMenuFooter"; -import { injectIntl } from "react-intl"; +import Menu from "@mui/material/Menu"; +import MenuItem from "@mui/material/MenuItem"; import TextField from "@mui/material/TextField"; -import MdAdd from "@mui/icons-material/Add"; -import { connect } from "react-redux"; -import { FormControlLabel, Popover } from "@mui/material"; import Typography from "@mui/material/Typography"; +import { Component } from "react"; +import { injectIntl } from "react-intl"; +import { connect } from "react-redux"; +import { getTagsByName } from "../../actions/TiamatActions"; +import ShowMoreMenuFooter from "./ShowMoreMenuFooter"; class TagSuggestionPopover extends Component { constructor(props) { diff --git a/src/components/ReportPageV2/StopTypeFilter.js b/src/components/ReportPageV2/StopTypeFilter.js index da4c33ec4..e0ab4a1a1 100644 --- a/src/components/ReportPageV2/StopTypeFilter.js +++ b/src/components/ReportPageV2/StopTypeFilter.js @@ -1,13 +1,12 @@ -import React from "react"; -import { styled } from "@mui/material/styles"; -import { injectIntl } from "react-intl"; +import FormControl from "@mui/material/FormControl"; import Input from "@mui/material/Input"; import InputLabel from "@mui/material/InputLabel"; -import MenuItem from "@mui/material/MenuItem"; -import FormControl from "@mui/material/FormControl"; -import ListItemText from "@mui/material/ListItemText"; import ListItemIcon from "@mui/material/ListItemIcon"; +import ListItemText from "@mui/material/ListItemText"; +import MenuItem from "@mui/material/MenuItem"; import Select from "@mui/material/Select"; +import { styled } from "@mui/material/styles"; +import { injectIntl } from "react-intl"; import stopTypes from "../../models/stopTypes"; import ModalityIconSvg from "../MainPage/ModalityIconSvg"; diff --git a/src/components/SnackbarWrapper.js b/src/components/SnackbarWrapper.js index 0e85e7270..fa15698eb 100644 --- a/src/components/SnackbarWrapper.js +++ b/src/components/SnackbarWrapper.js @@ -12,16 +12,16 @@ See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React, { Component } from "react"; -import { connect } from "react-redux"; -import Snackbar from "@mui/material/Snackbar"; -import * as types from "../actions/Types"; import MdCheck from "@mui/icons-material/Check"; import MdError from "@mui/icons-material/Error"; -import { UserActions } from "../actions/"; -import Button from "@mui/material/Button"; import MdInfo from "@mui/icons-material/InfoOutlined"; +import Button from "@mui/material/Button"; +import Snackbar from "@mui/material/Snackbar"; +import { Component } from "react"; import { injectIntl } from "react-intl"; +import { connect } from "react-redux"; +import { UserActions } from "../actions/"; +import * as types from "../actions/Types"; class SnackbarWrapper extends Component { constructor(props) { diff --git a/src/components/Zones/FareZones.tsx b/src/components/Zones/FareZones.tsx index 7bbe67a51..01f179104 100644 --- a/src/components/Zones/FareZones.tsx +++ b/src/components/Zones/FareZones.tsx @@ -1,14 +1,14 @@ -import React from "react"; import { ControlPosition } from "leaflet"; -import { FareZone } from "../../models/FareZone"; -import { Zones } from "./Zones"; -import { getColorByCodespace } from "./getColorByCodespace"; +import React from "react"; import { useIntl } from "react-intl"; +import { FareZone } from "../../models/FareZone"; import { getFareZonesByIdsAction, getFareZonesForFilterAction, setSelectedFareZones, } from "../../reducers/zonesSlice"; +import { Zones } from "./Zones"; +import { getColorByCodespace } from "./getColorByCodespace"; export interface FareZonesProps { position: ControlPosition; diff --git a/src/components/Zones/TariffZones.tsx b/src/components/Zones/TariffZones.tsx index f682bbf6a..55cb7460f 100644 --- a/src/components/Zones/TariffZones.tsx +++ b/src/components/Zones/TariffZones.tsx @@ -1,14 +1,14 @@ -import React from "react"; import { ControlPosition } from "leaflet"; -import { Zones } from "./Zones"; -import { TariffZone } from "../../models/TariffZone"; -import { getColorByCodespace } from "./getColorByCodespace"; +import React from "react"; import { useIntl } from "react-intl"; +import { TariffZone } from "../../models/TariffZone"; import { getTariffZonesByIdsAction, getTariffZonesForFilterAction, setSelectedTariffZones, } from "../../reducers/zonesSlice"; +import { getColorByCodespace } from "./getColorByCodespace"; +import { Zones } from "./Zones"; export interface TariffZonesProps { position: ControlPosition; diff --git a/src/components/Zones/Zones.tsx b/src/components/Zones/Zones.tsx index 47f0094b4..a0417997f 100644 --- a/src/components/Zones/Zones.tsx +++ b/src/components/Zones/Zones.tsx @@ -1,13 +1,7 @@ -import { - ActionCreatorWithoutPayload, - ActionCreatorWithPayload, - AsyncThunk, - AsyncThunkAction, -} from "@reduxjs/toolkit"; +import { ActionCreatorWithPayload, AsyncThunk } from "@reduxjs/toolkit"; import { ControlPosition } from "leaflet"; -import { Dispatch } from "redux"; import { TariffZone } from "../../models/TariffZone"; -import { AppDispatch, RootState } from "../../store/store"; +import { RootState } from "../../store/store"; import { useZones } from "./useZones"; import { ZonesControl } from "./ZonesControl"; import { ZonesLayer } from "./ZonesLayer"; diff --git a/src/config/ConfigContext.ts b/src/config/ConfigContext.ts index 6787ad6bf..8388f1011 100644 --- a/src/config/ConfigContext.ts +++ b/src/config/ConfigContext.ts @@ -1,5 +1,5 @@ -import React, { useContext } from "react"; import { OidcClientSettings } from "oidc-client-ts"; +import React, { useContext } from "react"; export interface Config { tiamatBaseUrl?: string; diff --git a/src/config/themeConfig.js b/src/config/themeConfig.js index ef51308bd..18de63d27 100644 --- a/src/config/themeConfig.js +++ b/src/config/themeConfig.js @@ -13,17 +13,15 @@ limitations under the Licence. */ import { getIn } from "../utils"; -import { getEnvColor as defaultEnvColor } from "./themes/default/defaultTheme"; import { - getV0Theme as getV0DefaultTheme, + darkColor as defaultDarkColor, + getEnvColor as defaultEnvColor, + primary as defaultPrimary, + primaryDarker as defaultPrimaryDarker, getTheme as getDefaultTheme, + getV0Theme as getV0DefaultTheme, } from "./themes/default/defaultTheme"; import defaultLogo from "./themes/default/logo.png"; -import { primary as defaultPrimary } from "./themes/default/defaultTheme"; -import { - primaryDarker as defaultPrimaryDarker, - darkColor as defaultDarkColor, -} from "./themes/default/defaultTheme"; export const getTiamatEnv = () => { return getIn(window, ["config", "tiamatEnv"], "development"); diff --git a/src/containers/App.js b/src/containers/App.js index fb8dccd37..8583b6177 100644 --- a/src/containers/App.js +++ b/src/containers/App.js @@ -12,25 +12,21 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React, { useEffect } from "react"; -import { - ThemeProvider, - createTheme, - StyledEngineProvider, -} from "@mui/material/styles"; +import { createTheme, StyledEngineProvider } from "@mui/material/styles"; +import { useEffect } from "react"; +import MuiThemeProvider from "@mui/material/styles/ThemeProvider"; +import { Helmet } from "react-helmet"; import { IntlProvider } from "react-intl"; import { useDispatch } from "react-redux"; +import { UserActions } from "../actions"; +import { fetchPolygons, updateAuth } from "../actions/RolesActions"; +import { useAuth } from "../auth/auth"; import Header from "../components/Header"; -import { getTheme, getV0Theme } from "../config/themeConfig"; import SnackbarWrapper from "../components/SnackbarWrapper"; -import { fetchPolygons, updateAuth } from "../actions/RolesActions"; -import { useAppSelector } from "../store/hooks"; +import { getTheme } from "../config/themeConfig"; import configureLocalization from "../localization/localization"; -import { UserActions } from "../actions"; -import { Helmet } from "react-helmet"; -import { useAuth } from "../auth/auth"; -import MuiThemeProvider from "@mui/material/styles/ThemeProvider"; +import { useAppSelector } from "../store/hooks"; const muiTheme = createTheme(getTheme()); diff --git a/src/containers/GroupOfStopPlaces.js b/src/containers/GroupOfStopPlaces.js index 226b852d0..215ad5dfd 100644 --- a/src/containers/GroupOfStopPlaces.js +++ b/src/containers/GroupOfStopPlaces.js @@ -12,14 +12,14 @@ See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React, { Component } from "react"; +import { Component } from "react"; import { connect } from "react-redux"; +import { StopPlacesGroupActions, UserActions } from "../actions/"; import { getGroupOfStopPlacesById } from "../actions/TiamatActions"; -import GroupOfStopPlaceMap from "../components/GroupOfStopPlaces/GroupOfStopPlacesMap"; -import EditGroupOfStopPlace from "../components/GroupOfStopPlaces/EditGroupOfStopPlaces"; -import Loader from "../components/Dialogs/Loader"; import GroupErrorDialog from "../components/Dialogs/GroupErrorDialog"; -import { UserActions, StopPlacesGroupActions } from "../actions/"; +import Loader from "../components/Dialogs/Loader"; +import EditGroupOfStopPlace from "../components/GroupOfStopPlaces/EditGroupOfStopPlaces"; +import GroupOfStopPlaceMap from "../components/GroupOfStopPlaces/GroupOfStopPlacesMap"; class GroupOfStopPlaces extends Component { constructor(props) { diff --git a/src/containers/LoadingPage.js b/src/containers/LoadingPage.js index 05715f538..9671eb76a 100644 --- a/src/containers/LoadingPage.js +++ b/src/containers/LoadingPage.js @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import { CircularProgress, Backdrop } from "@mui/material"; +import { Backdrop, CircularProgress } from "@mui/material"; import React from "react"; class LoadingPage extends React.Component { diff --git a/src/containers/ReportPage.js b/src/containers/ReportPage.js index ee546fe0c..a5218553e 100644 --- a/src/containers/ReportPage.js +++ b/src/containers/ReportPage.js @@ -12,40 +12,38 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ +import MdSearch from "@mui/icons-material/Search"; +import Autocomplete from "@mui/material/Autocomplete"; +import Button from "@mui/material/Button"; +import MenuItem from "@mui/material/MenuItem"; +import TextField from "@mui/material/TextField"; import React from "react"; +import { injectIntl } from "react-intl"; import { connect } from "react-redux"; -import ReportPageFooter from "../components/ReportPage/ReportPageFooter"; -import ReportResultView from "../components/ReportPage/ReportResultView"; -import ReportFilterBox from "../components/ReportPage/ReportFilterBox"; -import ModalityFilter from "../components/EditStopPage/ModalityFilter"; -import TopographicalFilter from "../components/MainPage/TopographicalFilter"; -import AutoComplete from "@mui/material/Autocomplete"; import { findStopForReport, - findTopographicalPlace, getParkingForMultipleStopPlaces, getTopographicPlaces, topographicalPlaceSearch, } from "../actions/TiamatActions"; -import MenuItem from "@mui/material/MenuItem"; -import Button from "@mui/material/Button"; -import TextField from "@mui/material/TextField"; -import MdSpinner from "../static/icons/spinner"; -import MdSearch from "@mui/icons-material/Search"; import ColumnFilterPopover from "../components/EditStopPage/ColumnFilterPopover"; -import { injectIntl } from "react-intl"; +import ModalityFilter from "../components/EditStopPage/ModalityFilter"; +import TopographicalFilter from "../components/MainPage/TopographicalFilter"; +import AdvancedReportFilters from "../components/ReportPage/AdvancedReportFilters"; +import GeneralReportFilters from "../components/ReportPage/GeneralReportFilters"; +import ReportFilterBox from "../components/ReportPage/ReportFilterBox"; +import ReportPageFooter from "../components/ReportPage/ReportPageFooter"; +import ReportResultView from "../components/ReportPage/ReportResultView"; +import TagFilterTray from "../components/ReportPage/TagFilterTray"; import { columnOptionsQuays, columnOptionsStopPlace, } from "../config/columnOptions"; +import MdSpinner from "../static/icons/spinner"; import { buildReportSearchQuery, extractQueryParamsFromUrl, } from "../utils/URLhelpers"; -import TagFilterTray from "../components/ReportPage/TagFilterTray"; -import AdvancedReportFilters from "../components/ReportPage/AdvancedReportFilters"; -import GeneralReportFilters from "../components/ReportPage/GeneralReportFilters"; -import Autocomplete from "@mui/material/Autocomplete"; class ReportPage extends React.Component { constructor(props) { diff --git a/src/containers/StopPlace.tsx b/src/containers/StopPlace.tsx index 2b45f9b07..afc08d503 100644 --- a/src/containers/StopPlace.tsx +++ b/src/containers/StopPlace.tsx @@ -12,25 +12,25 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ +import { Button, Dialog, DialogActions, DialogContent } from "@mui/material"; +import { createSelector } from "@reduxjs/toolkit"; import { useCallback, useEffect, useMemo, useState } from "react"; -import EditStopMap from "../components/Map/EditStopMap"; -import EditStopGeneral from "../components/EditStopPage/EditStopGeneral"; -import EditParentGeneral from "../components/EditParentStopPage/EditParentGeneral"; -import InformationBanner from "../components/EditStopPage/InformationBanner"; +import { Helmet } from "react-helmet"; import { useIntl } from "react-intl"; -import InformationManager from "../singletons/InformationManager"; -import "../styles/main.css"; import { UserActions } from "../actions"; -import { getIn } from "../utils"; +import { getStopPlaceWithAll } from "../actions/TiamatActions"; +import EditParentGeneral from "../components/EditParentStopPage/EditParentGeneral"; +import EditStopGeneral from "../components/EditStopPage/EditStopGeneral"; +import InformationBanner from "../components/EditStopPage/InformationBanner"; import NewElementsBox from "../components/EditStopPage/NewElementsBox"; import NewStopPlaceInfo from "../components/EditStopPage/NewStopPlaceInfo"; -import LoadingPage from "./LoadingPage"; -import { getStopPlaceWithAll } from "../actions/TiamatActions"; -import { Button, Dialog, DialogActions, DialogContent } from "@mui/material"; +import EditStopMap from "../components/Map/EditStopMap"; +import InformationManager from "../singletons/InformationManager"; import { useAppDispatch, useAppSelector } from "../store/hooks"; -import { createSelector } from "@reduxjs/toolkit"; import { RootState } from "../store/store"; -import { Helmet } from "react-helmet"; +import "../styles/main.css"; +import { getIn } from "../utils"; +import LoadingPage from "./LoadingPage"; const selectProps = createSelector( (state: RootState) => state, diff --git a/src/containers/StopPlaces.js b/src/containers/StopPlaces.js index e4a98a7a9..6b0485cbc 100644 --- a/src/containers/StopPlaces.js +++ b/src/containers/StopPlaces.js @@ -14,22 +14,22 @@ limitations under the Licence. */ import React from "react"; import { connect } from "react-redux"; -import SearchBox from "../components/MainPage/SearchBox"; -import StopPlacesMap from "../components/Map/StopPlacesMap"; +import StopPlaceActions from "../actions/StopPlaceActions"; import { - getStopPlaceById, getGroupOfStopPlacesById, + getStopPlaceById, } from "../actions/TiamatActions"; +import Loader from "../components/Dialogs/Loader"; +import SearchBox from "../components/MainPage/SearchBox"; +import StopPlacesMap from "../components/Map/StopPlacesMap"; import formatHelpers from "../modelUtils/mapToClient"; -import StopPlaceActions from "../actions/StopPlaceActions"; +import "../styles/main.css"; import { + getGroupOfStopPlacesIdFromURL, + getStopPlaceIdFromURL, removeIdParamFromURL, updateURLWithId, - getStopPlaceIdFromURL, - getGroupOfStopPlacesIdFromURL, } from "../utils/URLhelpers"; -import "../styles/main.css"; -import Loader from "../components/Dialogs/Loader"; class StopPlaces extends React.Component { constructor(props) { diff --git a/src/graphql/OTP/actions.js b/src/graphql/OTP/actions.js index d15704106..d493e8dd5 100644 --- a/src/graphql/OTP/actions.js +++ b/src/graphql/OTP/actions.js @@ -1,5 +1,5 @@ import { getOTPClient } from "../clients"; -import { findStopPlaceUsage, findQuayUsage } from "./queries"; +import { findQuayUsage, findStopPlaceUsage } from "./queries"; export const checkStopPlaceUsage = (stopPlaceId) => { const client = getOTPClient(); diff --git a/src/index.js b/src/index.js index 4a6f65deb..0a4f86fc8 100644 --- a/src/index.js +++ b/src/index.js @@ -12,25 +12,25 @@ See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React, { useContext } from "react"; -import { createRoot } from "react-dom/client"; -import { Route, Routes } from "react-router-dom"; -import { HistoryRouter as Router } from "redux-first-history/rr6"; import { ApolloProvider } from "@apollo/client"; -import { Provider } from "react-redux"; import * as Sentry from "@sentry/react"; import { BrowserTracing } from "@sentry/tracing"; +import { useContext } from "react"; +import { createRoot } from "react-dom/client"; +import { Provider } from "react-redux"; +import { Route, Routes } from "react-router-dom"; +import { HistoryRouter as Router } from "redux-first-history/rr6"; +import { AuthProvider } from "./auth/auth"; +import { ConfigContext } from "./config/ConfigContext"; +import { fetchConfig } from "./config/fetchConfig"; import App from "./containers/App"; -import StopPlaces from "./containers/StopPlaces"; -import { StopPlace } from "./containers/StopPlace"; -import ReportPage from "./containers/ReportPage"; import GroupOfStopPlaces from "./containers/GroupOfStopPlaces"; -import AppRoutes from "./routes"; +import ReportPage from "./containers/ReportPage"; +import { StopPlace } from "./containers/StopPlace"; +import StopPlaces from "./containers/StopPlaces"; import { getTiamatClient } from "./graphql/clients"; -import { store, history } from "./store/store"; -import { ConfigContext } from "./config/ConfigContext"; -import { AuthProvider } from "./auth/auth"; -import { fetchConfig } from "./config/fetchConfig"; +import AppRoutes from "./routes"; +import { history, store } from "./store/store"; const AuthenticatedApp = () => { const config = useContext(ConfigContext); diff --git a/src/modelUtils/equipmentHelpers.js b/src/modelUtils/equipmentHelpers.js index e8ba3b361..a3f416059 100644 --- a/src/modelUtils/equipmentHelpers.js +++ b/src/modelUtils/equipmentHelpers.js @@ -12,8 +12,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import { getIn } from "../utils"; import { defaultEquipments, types } from "../models/Equipments"; +import { getIn } from "../utils"; const EquipmentHelpers = {}; diff --git a/src/modelUtils/mapToClient.js b/src/modelUtils/mapToClient.js index 0e128cbee..7934017d8 100644 --- a/src/modelUtils/mapToClient.js +++ b/src/modelUtils/mapToClient.js @@ -12,26 +12,26 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import { setDecimalPrecision, getIn, getInTransform } from "../utils/"; -import * as types from "../actions/Types"; import moment from "moment"; -import { hasExpired } from "../modelUtils/validBetween"; -import { getImportedId } from "../models/stopPlaceUtils"; +import * as types from "../actions/Types"; import { - getUniquePathLinks, calculateDistance, calculateEstimate, + getUniquePathLinks, } from "../modelUtils/leafletUtils"; -import Quay from "../models/Quay"; -import StopPlace from "../models/StopPlace"; -import ParentStopPlace from "../models/ParentStopPlace"; -import GroupOfStopPlaces from "../models/GroupOfStopPlaces"; -import PathLink from "../models/PathLink"; -import Parking from "../models/Parking"; +import { hasExpired } from "../modelUtils/validBetween"; import ChildOfParentStopPlace from "../models/ChildOfParentStopPlace"; import { Entities } from "../models/Entities"; +import GroupOfStopPlaces from "../models/GroupOfStopPlaces"; +import ParentStopPlace from "../models/ParentStopPlace"; +import Parking from "../models/Parking"; +import PathLink from "../models/PathLink"; +import Quay from "../models/Quay"; +import StopPlace from "../models/StopPlace"; import PARKING_TYPE from "../models/parkingType"; import PARKING_VEHICLE_TYPE from "../models/parkingVehicleType"; +import { getImportedId } from "../models/stopPlaceUtils"; +import { getIn, getInTransform, setDecimalPrecision } from "../utils/"; const helpers = {}; diff --git a/src/modelUtils/mapToQueryVariables.js b/src/modelUtils/mapToQueryVariables.js index ea9f87420..6d0e00ceb 100644 --- a/src/modelUtils/mapToQueryVariables.js +++ b/src/modelUtils/mapToQueryVariables.js @@ -14,11 +14,11 @@ limitations under the Licence. */ import moment from "moment"; import { defaultLimitations } from "../models/Limitations"; +import PARKING_TYPE from "../models/parkingType"; import { - netexifyPlaceEquipment, netexifyBoardingPositions, + netexifyPlaceEquipment, } from "../models/stopPlaceUtils"; -import PARKING_TYPE from "../models/parkingType"; const helpers = {}; diff --git a/src/models/GroupOfStopPlaces.js b/src/models/GroupOfStopPlaces.js index 0b95b89cd..4c1e72281 100644 --- a/src/models/GroupOfStopPlaces.js +++ b/src/models/GroupOfStopPlaces.js @@ -12,10 +12,10 @@ See the Licence for the specific language governing permissions and limitations under the Licence. */ -import StopPlace from "./StopPlace"; -import ParentStopPlace from "./ParentStopPlace"; -import { Entities } from "./Entities"; import { calculatePolygonCenter } from "../utils/mapUtils"; +import { Entities } from "./Entities"; +import ParentStopPlace from "./ParentStopPlace"; +import StopPlace from "./StopPlace"; class GroupOfStopPlace { constructor(data) { diff --git a/src/models/ParentStopPlace.js b/src/models/ParentStopPlace.js index 0ca7c232d..47c3c6120 100644 --- a/src/models/ParentStopPlace.js +++ b/src/models/ParentStopPlace.js @@ -12,12 +12,12 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import { extractAlternativeNames, getImportedId } from "./stopPlaceUtils"; import { getAssessmentSetBasedOnQuays } from "../modelUtils/limitationHelpers"; -import { setDecimalPrecision } from "../utils/"; import { hasExpired, isFuture } from "../modelUtils/validBetween"; -import StopPlace from "./StopPlace"; +import { setDecimalPrecision } from "../utils/"; import { Entities } from "./Entities"; +import StopPlace from "./StopPlace"; +import { extractAlternativeNames, getImportedId } from "./stopPlaceUtils"; class ParentStopPlace { constructor(stop, isActive, parking, userDefinedCoordinates) { diff --git a/src/models/Parking.js b/src/models/Parking.js index a869d8098..79a478903 100644 --- a/src/models/Parking.js +++ b/src/models/Parking.js @@ -12,8 +12,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import { getIn } from "../utils/"; import { hasExpired } from "../modelUtils/validBetween"; +import { getIn } from "../utils/"; import PARKING_TYPE from "./parkingType"; import PARKING_VEHICLE_TYPE from "./parkingVehicleType"; diff --git a/src/models/PathLink.js b/src/models/PathLink.js index 7aa3c3a7c..0ccbfc6f5 100644 --- a/src/models/PathLink.js +++ b/src/models/PathLink.js @@ -12,11 +12,11 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import { getIn } from "../utils/"; import { calculateDistance, calculateEstimate, } from "../modelUtils/leafletUtils"; +import { getIn } from "../utils/"; class PathLink { constructor(pathLink) { diff --git a/src/models/StopPlace.js b/src/models/StopPlace.js index 3ecc510e0..be8e38e01 100644 --- a/src/models/StopPlace.js +++ b/src/models/StopPlace.js @@ -12,16 +12,16 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ +import { getAssessmentSetBasedOnQuays } from "../modelUtils/limitationHelpers"; +import { hasExpired, isFuture } from "../modelUtils/validBetween"; +import { setDecimalPrecision } from "../utils/"; +import { Entities } from "./Entities"; +import Quay from "./Quay"; import { extractAlternativeNames, getImportedId, simplifyPlaceEquipment, } from "./stopPlaceUtils"; -import { getAssessmentSetBasedOnQuays } from "../modelUtils/limitationHelpers"; -import { setDecimalPrecision } from "../utils/"; -import { hasExpired, isFuture } from "../modelUtils/validBetween"; -import Quay from "./Quay"; -import { Entities } from "./Entities"; class StopPlace { constructor(stop, isActive, parking, userDefinedCoordinates) { diff --git a/src/models/columnTransformers.js b/src/models/columnTransformers.js index 3a4b548a6..949559293 100644 --- a/src/models/columnTransformers.js +++ b/src/models/columnTransformers.js @@ -12,22 +12,21 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; -import StopPlaceLink from "../components/ReportPage/StopPlaceLink"; -import ModalityIconSvg from "../components/MainPage/ModalityIconSvg"; -import CarParkingIcon from "../static/icons/ParkingIcon"; -import BikeParkingIcon from "../static/icons/facilities/BikeParking"; -import { getIn, getInTransform } from "../utils/"; -import accessibilityAssessments from "../models/accessibilityAssessments"; import WheelChair from "@mui/icons-material/Accessible"; import MdCheck from "@mui/icons-material/CheckCircle"; import MdNotChecked from "@mui/icons-material/HighlightOff"; -import StairsIcon from "../static/icons/accessibility/Stairs"; +import moment from "moment"; +import ToolTippable from "../components/EditStopPage/ToolTippable"; +import ModalityIconSvg from "../components/MainPage/ModalityIconSvg"; +import TagTray from "../components/MainPage/TagTray"; import ModalityIconTray from "../components/ReportPage/ModalityIconTray"; +import StopPlaceLink from "../components/ReportPage/StopPlaceLink"; import { darkColor } from "../config/themes/default/defaultTheme"; -import TagTray from "../components/MainPage/TagTray"; -import ToolTippable from "../components/EditStopPage/ToolTippable"; -import moment from "moment"; +import accessibilityAssessments from "../models/accessibilityAssessments"; +import CarParkingIcon from "../static/icons/ParkingIcon"; +import StairsIcon from "../static/icons/accessibility/Stairs"; +import BikeParkingIcon from "../static/icons/facilities/BikeParking"; +import { getIn, getInTransform } from "../utils/"; const getParkingElements = (parking = [], formatMessage) => { if (!parking || !parking.length) { diff --git a/src/reducers/groupOfStopPlacesReducer.js b/src/reducers/groupOfStopPlacesReducer.js index 8846c28a9..7cbc3c322 100644 --- a/src/reducers/groupOfStopPlacesReducer.js +++ b/src/reducers/groupOfStopPlacesReducer.js @@ -13,12 +13,12 @@ limitations under the Licence. */ import * as types from "../actions/Types"; +import { calculatePolygonCenter } from "../utils/mapUtils"; import { - getGroupOfStopPlace, addMemberToGroup, + getGroupOfStopPlace, removeMemberFromGroup, } from "./groupReducerUtils"; -import { calculatePolygonCenter } from "../utils/mapUtils"; const newGroup = { name: "", diff --git a/src/reducers/groupReducerUtils.js b/src/reducers/groupReducerUtils.js index 72d32f673..8d6f5566e 100644 --- a/src/reducers/groupReducerUtils.js +++ b/src/reducers/groupReducerUtils.js @@ -13,8 +13,8 @@ limitations under the Licence. */ import GroupOfStopPlace from "../models/GroupOfStopPlaces"; -import StopPlace from "../models/StopPlace"; import ParentStopPlace from "../models/ParentStopPlace"; +import StopPlace from "../models/StopPlace"; import { calculatePolygonCenter } from "../utils/mapUtils"; export const getGroupOfStopPlace = (state, action) => { diff --git a/src/reducers/index.ts b/src/reducers/index.ts index 3ca51e018..e35d34581 100644 --- a/src/reducers/index.ts +++ b/src/reducers/index.ts @@ -14,15 +14,15 @@ limitations under the Licence. */ import { combineReducers } from "@reduxjs/toolkit"; -import userReducer from "./userReducer"; +import type { Reducer } from "redux"; +import groupOfStopPlaceReducer from "./groupOfStopPlacesReducer"; import mapReducer from "./mapReducer"; -import stopPlaceReducer from "./stopPlaceReducer"; import reportReducer from "./reportReducer"; import rolesReducer from "./rolesReducer"; import snackbarReducer from "./snackbarReducer"; -import groupOfStopPlaceReducer from "./groupOfStopPlacesReducer"; +import stopPlaceReducer from "./stopPlaceReducer"; +import userReducer from "./userReducer"; import zonesSlice from "./zonesSlice"; -import type { Reducer } from "redux"; export const createRootReducer = (routerReducer: Reducer) => combineReducers({ diff --git a/src/reducers/rolesReducer.js b/src/reducers/rolesReducer.js index cea1b6630..cc78eed48 100644 --- a/src/reducers/rolesReducer.js +++ b/src/reducers/rolesReducer.js @@ -15,9 +15,9 @@ limitations under the Licence. */ import * as types from "../actions/Types"; import { getAllowanceInfoForGroup, - getAllowanceSearchInfo, - getAllowanceInfoFromPosition, getAllowanceInfoForStop, + getAllowanceInfoFromPosition, + getAllowanceSearchInfo, getLatLng, reduceFetchedPolygons, } from "./rolesReducerUtils"; diff --git a/src/reducers/rolesReducerUtils.js b/src/reducers/rolesReducerUtils.js index da0d645a6..ad3ea0331 100644 --- a/src/reducers/rolesReducerUtils.js +++ b/src/reducers/rolesReducerUtils.js @@ -12,14 +12,14 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ +import { Entities } from "../models/Entities"; +import stopTypes, { submodes } from "../models/stopTypes"; import roleParser, { getRoleOptions, - isModeOptionsValidForMode, isInArrayIgnoreCase, + isModeOptionsValidForMode, } from "../roles/rolesParser"; import { getIn } from "../utils/"; -import stopTypes, { submodes } from "../models/stopTypes"; -import { Entities } from "../models/Entities"; export const reduceFetchedPolygons = (result) => { return Object.keys(result.data).reduce((fetchedPolygons, key) => { diff --git a/src/reducers/snackbarReducer.js b/src/reducers/snackbarReducer.js index 27f699b4d..7573609b6 100644 --- a/src/reducers/snackbarReducer.js +++ b/src/reducers/snackbarReducer.js @@ -14,9 +14,9 @@ import { APOLLO_MUTATION_ERROR, + DISMISSED_SNACKBAR, ERROR, OPENED_SNACKBAR, - DISMISSED_SNACKBAR, } from "../actions/Types"; export const initialState = { diff --git a/src/reducers/stopPlaceReducer.js b/src/reducers/stopPlaceReducer.js index b0065da9f..bec8676c7 100644 --- a/src/reducers/stopPlaceReducer.js +++ b/src/reducers/stopPlaceReducer.js @@ -12,15 +12,15 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import { getStateByOperation } from "./stopPlaceReducerUtils"; import * as types from "../actions/Types"; -import formatHelpers from "../modelUtils/mapToClient"; -import limitationHelpers from "../modelUtils/limitationHelpers"; -import equipmentHelpers from "../modelUtils/equipmentHelpers"; -import AdjacentStopRemover from "../modelUtils/adjacentStopRemover"; import AdjacentStopAdder from "../modelUtils/adjacentStopAdder"; -import { setDecimalPrecision } from "../utils/"; +import AdjacentStopRemover from "../modelUtils/adjacentStopRemover"; +import equipmentHelpers from "../modelUtils/equipmentHelpers"; +import limitationHelpers from "../modelUtils/limitationHelpers"; +import formatHelpers from "../modelUtils/mapToClient"; import SettingsManager from "../singletons/SettingsManager"; +import { setDecimalPrecision } from "../utils/"; +import { getStateByOperation } from "./stopPlaceReducerUtils"; const Settings = new SettingsManager(); diff --git a/src/roles/rolesParser.js b/src/roles/rolesParser.js index 49cfc7782..06d887ead 100644 --- a/src/roles/rolesParser.js +++ b/src/roles/rolesParser.js @@ -12,13 +12,13 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ +import { Entities } from "../models/Entities"; import stopTypes from "../models/stopTypes"; +import { submodes as allSubmodes } from "../models/submodes"; import { - getLegalSubmodes, getLegalStopPlaceTypes, + getLegalSubmodes, } from "../reducers/rolesReducerUtils"; -import { submodes as allSubmodes } from "../models/submodes"; -import { Entities } from "../models/Entities"; import { isPointInPolygon } from "../utils/mapUtils"; const RoleParser = {}; diff --git a/src/static/icons/ParkingIcon.js b/src/static/icons/ParkingIcon.js index 2aeddc466..2e3d0d9d3 100644 --- a/src/static/icons/ParkingIcon.js +++ b/src/static/icons/ParkingIcon.js @@ -12,7 +12,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; import SvgIcon from "@mui/material/SvgIcon"; const ParkingIcon = (props) => ( diff --git a/src/static/icons/TransportSign.js b/src/static/icons/TransportSign.js index e3c1e1ec6..98707aa8d 100644 --- a/src/static/icons/TransportSign.js +++ b/src/static/icons/TransportSign.js @@ -12,7 +12,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; import SvgIcon from "@mui/material/SvgIcon"; const TransportSign = (props) => { diff --git a/src/static/icons/accessibility/NoWheelChair.js b/src/static/icons/accessibility/NoWheelChair.js index 38df394ff..990fcf1db 100644 --- a/src/static/icons/accessibility/NoWheelChair.js +++ b/src/static/icons/accessibility/NoWheelChair.js @@ -12,7 +12,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; import SvgIcon from "@mui/material/SvgIcon"; const NoWheelChair = (props) => ( diff --git a/src/static/icons/accessibility/Stairs.js b/src/static/icons/accessibility/Stairs.js index 35c6a66ac..19a520ba8 100644 --- a/src/static/icons/accessibility/Stairs.js +++ b/src/static/icons/accessibility/Stairs.js @@ -12,7 +12,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; import SvgIcon from "@mui/material/SvgIcon"; const Stairs = (props) => ( diff --git a/src/static/icons/accessibility/StepFree.js b/src/static/icons/accessibility/StepFree.js index 212c71444..7fb95c3d9 100644 --- a/src/static/icons/accessibility/StepFree.js +++ b/src/static/icons/accessibility/StepFree.js @@ -12,7 +12,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; import SvgIcon from "@mui/material/SvgIcon"; const StepFree = (props) => ( diff --git a/src/static/icons/facilities/BikeParking.js b/src/static/icons/facilities/BikeParking.js index a1d76efcc..30dc93f38 100644 --- a/src/static/icons/facilities/BikeParking.js +++ b/src/static/icons/facilities/BikeParking.js @@ -12,7 +12,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; import SvgIcon from "@mui/material/SvgIcon"; const BikeParking = (props) => ( diff --git a/src/static/icons/facilities/BusShelter.js b/src/static/icons/facilities/BusShelter.js index 02cf9934a..9edadb1b6 100644 --- a/src/static/icons/facilities/BusShelter.js +++ b/src/static/icons/facilities/BusShelter.js @@ -12,7 +12,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; import SvgIcon from "@mui/material/SvgIcon"; const BusShelter = (props) => ( diff --git a/src/static/icons/facilities/Enclosed.js b/src/static/icons/facilities/Enclosed.js index a4f3ec7ea..7f9af401e 100644 --- a/src/static/icons/facilities/Enclosed.js +++ b/src/static/icons/facilities/Enclosed.js @@ -12,7 +12,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; import SvgIcon from "@mui/material/SvgIcon"; const Enclosed = (props) => ( diff --git a/src/static/icons/facilities/Heated.js b/src/static/icons/facilities/Heated.js index 0d274fe33..27beb4dc9 100644 --- a/src/static/icons/facilities/Heated.js +++ b/src/static/icons/facilities/Heated.js @@ -12,7 +12,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; import SvgIcon from "@mui/material/SvgIcon"; const Heated = (props) => ( diff --git a/src/static/icons/facilities/NoBusShelter.js b/src/static/icons/facilities/NoBusShelter.js index 132a7db71..9129f0abd 100644 --- a/src/static/icons/facilities/NoBusShelter.js +++ b/src/static/icons/facilities/NoBusShelter.js @@ -12,7 +12,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; import SvgIcon from "@mui/material/SvgIcon"; const BusShelter = (props) => ( diff --git a/src/static/icons/facilities/NoTicketMachine.js b/src/static/icons/facilities/NoTicketMachine.js index 0bf8e4e59..f01b4a9ab 100644 --- a/src/static/icons/facilities/NoTicketMachine.js +++ b/src/static/icons/facilities/NoTicketMachine.js @@ -12,7 +12,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; import SvgIcon from "@mui/material/SvgIcon"; const NoTicketMachine = (props) => ( diff --git a/src/static/icons/facilities/TicketMachine.js b/src/static/icons/facilities/TicketMachine.js index 1d55ae207..ae5981c33 100644 --- a/src/static/icons/facilities/TicketMachine.js +++ b/src/static/icons/facilities/TicketMachine.js @@ -12,7 +12,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; import SvgIcon from "@mui/material/SvgIcon"; const TicketMachine = (props) => ( diff --git a/src/static/icons/facilities/WaitingRoom.js b/src/static/icons/facilities/WaitingRoom.js index 3e8ea810d..3e0c68751 100644 --- a/src/static/icons/facilities/WaitingRoom.js +++ b/src/static/icons/facilities/WaitingRoom.js @@ -12,7 +12,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; import SvgIcon from "@mui/material/SvgIcon"; const WaitingRoom = (props) => ( diff --git a/src/static/icons/spinner.js b/src/static/icons/spinner.js index 76edb0cb8..0c6b911ab 100644 --- a/src/static/icons/spinner.js +++ b/src/static/icons/spinner.js @@ -12,7 +12,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import React from "react"; import SvgIcon from "@mui/material/SvgIcon"; import "../../styles/spinner.css"; diff --git a/src/store/hooks.ts b/src/store/hooks.ts index f151d5363..1705e0166 100644 --- a/src/store/hooks.ts +++ b/src/store/hooks.ts @@ -1,5 +1,5 @@ import { TypedUseSelectorHook, useDispatch, useSelector } from "react-redux"; -import type { RootState, AppDispatch } from "./store"; +import type { AppDispatch, RootState } from "./store"; export const useAppDispatch = () => useDispatch(); export const useAppSelector: TypedUseSelectorHook = useSelector; diff --git a/src/store/store.ts b/src/store/store.ts index 7ee12f543..a06def6ac 100644 --- a/src/store/store.ts +++ b/src/store/store.ts @@ -13,11 +13,11 @@ See the Licence for the specific language governing permissions and limitations under the Licence. */ import { configureStore } from "@reduxjs/toolkit"; -import { createReduxHistoryContext } from "redux-first-history"; +import * as Sentry from "@sentry/react"; import { createBrowserHistory } from "history"; +import { createReduxHistoryContext } from "redux-first-history"; import loggerMiddleware from "redux-logger"; import { createRootReducer } from "../reducers"; -import * as Sentry from "@sentry/react"; const { createReduxHistory, routerMiddleware, routerReducer } = createReduxHistoryContext({ diff --git a/src/test/duplicateIds.spec.js b/src/test/duplicateIds.spec.js index abd751af0..4f17ea08c 100644 --- a/src/test/duplicateIds.spec.js +++ b/src/test/duplicateIds.spec.js @@ -12,10 +12,10 @@ See the Licence for the specific language governing permissions and limitations under the Licence. */ +import { findDuplicateImportedIds } from "../utils/"; +import DrammenOsloConflict from "./mock/DrammenOsloConflict"; import StopWithDuplicateImportedIds from "./mock/StopWithDuplicateImportedIds"; import StopsWithDuplicateImportedIds from "./mock/StopsWithSharedDupId"; -import DrammenOsloConflict from "./mock/DrammenOsloConflict"; -import { findDuplicateImportedIds } from "../utils/"; describe("duplicateIds", () => { test("should find all duplicate Ids on quays within stopPlace", () => { diff --git a/src/test/languages/strings.spec.js b/src/test/languages/strings.spec.js index 52066a2fd..09557fdc0 100644 --- a/src/test/languages/strings.spec.js +++ b/src/test/languages/strings.spec.js @@ -12,8 +12,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import nb_lang from "../../static/lang/nb.json"; import en_lang from "../../static/lang/en.json"; +import nb_lang from "../../static/lang/nb.json"; describe("language support", () => { test("should support translations for all strings in all languages", () => { diff --git a/src/test/reducers/group.spec.js b/src/test/reducers/group.spec.js index d40d74a8e..527f02a89 100644 --- a/src/test/reducers/group.spec.js +++ b/src/test/reducers/group.spec.js @@ -12,10 +12,10 @@ See the Licence for the specific language governing permissions and limitations under the Licence. */ +import mapHelper from "../../modelUtils/mapToQueryVariables"; import groupOfStopPlaceReducer from "./../../reducers/groupOfStopPlacesReducer"; import groupOfStopPlaceQuery from "./json/groupOfStopPlace.json"; import groupOfStopPlaceMutation from "./json/groupOfStopPlaceMutation.json"; -import mapHelper from "../../modelUtils/mapToQueryVariables"; window.config = { defaultLanguageCode: "nor", diff --git a/src/test/reducers/roles.spec.js b/src/test/reducers/roles.spec.js index 2c56f872c..0888ead64 100644 --- a/src/test/reducers/roles.spec.js +++ b/src/test/reducers/roles.spec.js @@ -12,11 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ -import { - isModeOptionsValidForMode, - getRoleOptions, - doesStopTypeAllowEdit, -} from "../../roles/rolesParser"; +import stopTypes, { submodes } from "../../models/stopTypes"; import { getAllowanceInfoForStop, getLatLng, @@ -24,12 +20,16 @@ import { getLegalSubmodes, getStopPlace, } from "../../reducers/rolesReducerUtils"; -import stopTypes, { submodes } from "../../models/stopTypes"; -import mockRailReplacementStop from "../mock/mockRailReplacementStop"; +import { + doesStopTypeAllowEdit, + getRoleOptions, + isModeOptionsValidForMode, +} from "../../roles/rolesParser"; import mockBusStop from "../mock/mockBusStop"; -import stopWithoutStopPlaceType from "../mock/stopWithoutStopPlaceType"; +import mockRailReplacementStop from "../mock/mockRailReplacementStop"; import mockRailStop from "../mock/mockRailStop"; import { mockedAllowanceInfoAction } from "../mock/mockedAllowanceInfoAction"; +import stopWithoutStopPlaceType from "../mock/stopWithoutStopPlaceType"; const stopPlaceResult = { data: { diff --git a/src/test/reducers/stop.model.spec.js b/src/test/reducers/stop.model.spec.js index e65dfaf83..09e9a8f34 100644 --- a/src/test/reducers/stop.model.spec.js +++ b/src/test/reducers/stop.model.spec.js @@ -12,12 +12,12 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence. */ +import QueryVariablesMapper from "../../modelUtils/mapToQueryVariables"; +import { hasExpired } from "../../modelUtils/validBetween"; import stopPlaceReducer from "./../../reducers/stopPlaceReducer"; +import clientStop from "./json/clientStop.json"; import stopPlaceMock from "./json/stopPlace.json"; import stopPlaceMock10Quays from "./json/stopPlaceWith10Quays.json"; -import clientStop from "./json/clientStop.json"; -import QueryVariablesMapper from "../../modelUtils/mapToQueryVariables"; -import { hasExpired } from "../../modelUtils/validBetween"; window.config = { defaultLanguageCode: "nor", diff --git a/src/test/snackbar.spec.js b/src/test/snackbar.spec.js index b2bacc3bd..7cf3e00cc 100644 --- a/src/test/snackbar.spec.js +++ b/src/test/snackbar.spec.js @@ -12,12 +12,12 @@ See the Licence for the specific language governing permissions and limitations under the Licence. */ -import snackbarReducer, { initialState } from "../reducers/snackbarReducer"; import { APOLLO_MUTATION_ERROR, ERROR, OPENED_SNACKBAR, } from "../actions/Types"; +import snackbarReducer, { initialState } from "../reducers/snackbarReducer"; describe("snackbar", () => { test("Should open snackbar on Apollo error", () => { diff --git a/src/test/userAndRoles.spec.js b/src/test/userAndRoles.spec.js index 09767d5ea..29a023efd 100644 --- a/src/test/userAndRoles.spec.js +++ b/src/test/userAndRoles.spec.js @@ -13,9 +13,9 @@ See the Licence for the specific language governing permissions and limitations under the Licence. */ import { getAllowanceInfoForStop } from "../reducers/rolesReducerUtils"; +import mockBusStop from "./mock/mockBusStop"; import mockRailReplacementStop from "./mock/mockRailReplacementStop"; import mockRailStop from "./mock/mockRailStop"; -import mockBusStop from "./mock/mockBusStop"; import mockStopWithoutModality from "./mock/mockStopWithoutModality"; import { mockedAllowanceInfoAction } from "./mock/mockedAllowanceInfoAction"; diff --git a/src/utils/iconUtils.ts b/src/utils/iconUtils.ts index 1edee0c5a..b2041e905 100644 --- a/src/utils/iconUtils.ts +++ b/src/utils/iconUtils.ts @@ -1,27 +1,27 @@ -import railReplacementBus from "../static/icons/modalities/railReplacement.png"; -import multiModal from "../static/icons/modalities/multiModal.png"; +import airport from "../static/icons/modalities/airport-without-box.png"; import onstreetBus from "../static/icons/modalities/bus-without-box.png"; -import onstreetTram from "../static/icons/modalities/tram-without-box.png"; -import railStation from "../static/icons/modalities/rails-without-box.png"; -import metroStation from "../static/icons/modalities/metro-without-box.png"; import busStation from "../static/icons/modalities/busstation-without-box.png"; import ferryStop from "../static/icons/modalities/ferry-without-box.png"; -import airport from "../static/icons/modalities/airport-without-box.png"; import harbourPort from "../static/icons/modalities/harbour_port.png"; import liftStation from "../static/icons/modalities/lift-without-box.png"; +import metroStation from "../static/icons/modalities/metro-without-box.png"; +import multiModal from "../static/icons/modalities/multiModal.png"; import noInformation from "../static/icons/modalities/no-information.png"; +import railReplacementBus from "../static/icons/modalities/railReplacement.png"; +import railStation from "../static/icons/modalities/rails-without-box.png"; +import onstreetTram from "../static/icons/modalities/tram-without-box.png"; -import railReplacementBusSvg from "../static/icons/modalities/svg/railReplacement.svg"; +import airportSvg from "../static/icons/modalities/svg/airplane-withoutBox.svg"; import onstreetBusSvg from "../static/icons/modalities/svg/bus-withoutBox.svg"; -import onstreetTramSvg from "../static/icons/modalities/svg/tram-withoutBox.svg"; -import railStationSvg from "../static/icons/modalities/svg/rail-withoutBox.svg"; -import metroStationSvg from "../static/icons/modalities/svg/subway-withoutBox.svg"; import busStationSvg from "../static/icons/modalities/svg/busstation-withoutBox.svg"; import ferryStopSvg from "../static/icons/modalities/svg/ferry-withoutBox.svg"; -import airportSvg from "../static/icons/modalities/svg/airplane-withoutBox.svg"; import harbourPortSvg from "../static/icons/modalities/svg/harbour_port.svg"; import liftStationSvg from "../static/icons/modalities/svg/lift.svg"; import noInformationSvg from "../static/icons/modalities/svg/no-information.svg"; +import railStationSvg from "../static/icons/modalities/svg/rail-withoutBox.svg"; +import railReplacementBusSvg from "../static/icons/modalities/svg/railReplacement.svg"; +import metroStationSvg from "../static/icons/modalities/svg/subway-withoutBox.svg"; +import onstreetTramSvg from "../static/icons/modalities/svg/tram-withoutBox.svg"; type Submodes = "railReplacementBus"; type Modalities =