Skip to content

Commit

Permalink
fix: adjust components for new react-geo components
Browse files Browse the repository at this point in the history
  • Loading branch information
mholthausen committed Apr 25, 2024
1 parent 1c08e08 commit 3b9423e
Show file tree
Hide file tree
Showing 42 changed files with 66 additions and 67 deletions.
4 changes: 2 additions & 2 deletions src/components/AddLayerModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ import UrlUtil from '@terrestris/base-util/dist/UrlUtil/UrlUtil';
import CapabilitiesUtil from '@terrestris/ol-util/dist/CapabilitiesUtil/CapabilitiesUtil';
import MapUtil from '@terrestris/ol-util/dist/MapUtil/MapUtil';

import { SimpleButton } from '@terrestris/react-geo';
import SimpleButton from '@terrestris/react-geo/dist/Button/SimpleButton/SimpleButton';
import {
useMap
} from '@terrestris/react-geo/dist/Hook/useMap';
} from '@terrestris/react-util/dist/Hooks/useMap/useMap';

import useAppDispatch from '../../hooks/useAppDispatch';
import useAppSelector from '../../hooks/useAppSelector';
Expand Down
8 changes: 4 additions & 4 deletions src/components/BasicMapComponent/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ import {

import MapUtil from '@terrestris/ol-util/dist/MapUtil/MapUtil';

import useMap from '@terrestris/react-geo/dist/Hook/useMap';

import MapComponent, {
import {
MapComponent,
MapComponentProps
} from '@terrestris/react-geo/dist/Map/MapComponent/MapComponent';
} from '@terrestris/react-util/dist/Components/MapComponent/MapComponent';
import { useMap } from '@terrestris/react-util/dist/Hooks/useMap/useMap';

import usePlugins from '../../hooks/usePlugins';

Expand Down
2 changes: 1 addition & 1 deletion src/components/BasicNominatimSearch/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
import NominatimSearch, {
NominatimSearchProps
} from '@terrestris/react-geo/dist/Field/NominatimSearch/NominatimSearch';
import useMap from '@terrestris/react-geo/dist/Hook/useMap';
import { useMap } from '@terrestris/react-util/dist/Hooks/useMap/useMap';

export const BasicNominatimSearch: React.FC<Partial<NominatimSearchProps>> = ({
...restProps
Expand Down
4 changes: 2 additions & 2 deletions src/components/EditFeatureDrawer/DeleteButton/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ import {

import {
useMap
} from '@terrestris/react-geo/dist/Hook/useMap';
} from '@terrestris/react-util/dist/Hooks/useMap/useMap';
import {
WmsLayer,
isWmsLayer
} from '@terrestris/react-geo/dist/Util/typeUtils';
} from '@terrestris/react-util/dist/Util/typeUtils';

import useExecuteWfsTransaction from '../../../hooks/useExecuteWfsTransaction';
import useWriteWfsTransaction from '../../../hooks/useWriteWfsTransaction';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ import {
Logger
} from '@terrestris/base-util';

import useMap from '@terrestris/react-geo/dist/Hook/useMap';
import { useMap } from '@terrestris/react-util/dist/Hooks/useMap/useMap';

import {
WmsLayer,
isWmsLayer
} from '@terrestris/react-geo/dist/Util/typeUtils';
} from '@terrestris/react-util/dist/Util/typeUtils';

import ShogunFile from '@terrestris/shogun-util/dist/model/File';
import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ import ModifyButton from '@terrestris/react-geo/dist/Button/ModifyButton/ModifyB
import SimpleButton from '@terrestris/react-geo/dist/Button/SimpleButton/SimpleButton';
import ToggleGroup from '@terrestris/react-geo/dist/Button/ToggleGroup/ToggleGroup';

import Toolbar, { ToolbarProps } from '@terrestris/react-geo/dist/Toolbar/Toolbar';

import {
useMap
} from '@terrestris/react-util';
Expand All @@ -52,6 +50,7 @@ import useAppSelector from '../../../hooks/useAppSelector';
import {
setFormDirty
} from '../../../store/editFeature';
import Toolbar, { ToolbarProps } from '../../Toolbar';

import './index.less';

Expand Down
4 changes: 2 additions & 2 deletions src/components/EditFeatureDrawer/EditFeatureSwitch/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ import {

import Logger from '@terrestris/base-util/dist/Logger';

import useMap from '@terrestris/react-geo/dist/Hook/useMap';
import { useMap } from '@terrestris/react-util/dist/Hooks/useMap/useMap';
import {
WmsLayer
} from '@terrestris/react-geo/dist/Util/typeUtils';
} from '@terrestris/react-util/dist/Util/typeUtils';

import useAppDispatch from '../../../hooks/useAppDispatch';
import useAppSelector from '../../../hooks/useAppSelector';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {

import {
WmsLayer
} from '@terrestris/react-geo/dist/Util/typeUtils';
} from '@terrestris/react-util/dist/Util/typeUtils';

import useAppSelector from '../../../hooks/useAppSelector';

Expand Down
4 changes: 2 additions & 2 deletions src/components/EditFeatureDrawer/ResetButton/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ import {

import {
useMap
} from '@terrestris/react-geo/dist/Hook/useMap';
import { DigitizeUtil } from '@terrestris/react-geo/dist/Util/DigitizeUtil';
} from '@terrestris/react-util/dist/Hooks/useMap/useMap';
import { DigitizeUtil } from '@terrestris/react-util/dist/Util/DigitizeUtil';

import useAppDispatch from '../../../hooks/useAppDispatch';
import {
Expand Down
6 changes: 3 additions & 3 deletions src/components/EditFeatureDrawer/SaveButton/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ import {

import {
useMap
} from '@terrestris/react-geo/dist/Hook/useMap';
} from '@terrestris/react-util/dist/Hooks/useMap/useMap';
import {
DigitizeUtil
} from '@terrestris/react-geo/dist/Util/DigitizeUtil';
} from '@terrestris/react-util/dist/Util/DigitizeUtil';
import {
WmsLayer,
isWmsLayer
} from '@terrestris/react-geo/dist/Util/typeUtils';
} from '@terrestris/react-util/dist/Util/typeUtils';

import useAppDispatch from '../../../hooks/useAppDispatch';
import useAppSelector from '../../../hooks/useAppSelector';
Expand Down
4 changes: 2 additions & 2 deletions src/components/EditFeatureDrawer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ import {

import MapUtil from '@terrestris/ol-util/dist/MapUtil/MapUtil';

import useMap from '@terrestris/react-geo/dist/Hook/useMap';
import { useMap } from '@terrestris/react-util/dist/Hooks/useMap/useMap';

import {
WmsLayer,
isWmsLayer
} from '@terrestris/react-geo/dist/Util/typeUtils';
} from '@terrestris/react-util/dist/Util/typeUtils';

import useAppDispatch from '../../hooks/useAppDispatch';
import useAppSelector from '../../hooks/useAppSelector';
Expand Down
2 changes: 1 addition & 1 deletion src/components/Footer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { createStringXY } from 'ol/coordinate';
import { useTranslation } from 'react-i18next';

import ScaleCombo from '@terrestris/react-geo/dist/Field/ScaleCombo/ScaleCombo';
import useMap from '@terrestris/react-geo/dist/Hook/useMap';
import { useMap } from '@terrestris/react-util/dist/Hooks/useMap/useMap';

import './index.less';
import useAppSelector from '../../hooks/useAppSelector';
Expand Down
2 changes: 1 addition & 1 deletion src/components/LayerDetailsModal/LayerDetails/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import CapabilitiesUtil from '@terrestris/ol-util/dist/CapabilitiesUtil/Capabili

import {
isWmsLayer
} from '@terrestris/react-geo/dist/Util/typeUtils';
} from '@terrestris/react-util/dist/Util/typeUtils';

import {
getBearerTokenHeader
Expand Down
2 changes: 1 addition & 1 deletion src/components/LayerDetailsModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import MapUtil from '@terrestris/ol-util/dist/MapUtil/MapUtil';

import {
useMap
} from '@terrestris/react-geo/dist/Hook/useMap';
} from '@terrestris/react-util/dist/Hooks/useMap/useMap';

import useAppDispatch from '../../hooks/useAppDispatch';
import useAppSelector from '../../hooks/useAppSelector';
Expand Down
2 changes: 1 addition & 1 deletion src/components/MapDrawer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import type {
DrawerProps
} from 'antd/es/drawer';

import useMap from '@terrestris/react-geo/dist/Hook/useMap';
import { useMap } from '@terrestris/react-util/dist/Hooks/useMap/useMap';

import './index.less';

Expand Down
2 changes: 1 addition & 1 deletion src/components/MultiSearch/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ import logger from '@terrestris/base-util/dist/Logger';

import MapUtil from '@terrestris/ol-util/dist/MapUtil/MapUtil';
import { NominatimPlace } from '@terrestris/react-geo/dist/Field/NominatimSearch/NominatimSearch';
import useMap from '@terrestris/react-geo/dist/Hook/useMap';
import SearchResultsPanel, {
Category as ResultCategory
} from '@terrestris/react-geo/dist/Panel/SearchResultsPanel/SearchResultsPanel';
import { useMap } from '@terrestris/react-util/dist/Hooks/useMap/useMap';

import {
SearchConfig
Expand Down
2 changes: 1 addition & 1 deletion src/components/Permalink/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import PermalinkUtil from '@terrestris/ol-util/dist/PermalinkUtil/PermalinkUtil'

import {
useMap
} from '@terrestris/react-geo/dist/Hook/useMap';
} from '@terrestris/react-util/dist/Hooks/useMap/useMap';

import Layer from '@terrestris/shogun-util/dist/model/Layer';

Expand Down
2 changes: 1 addition & 1 deletion src/components/PrintForm/ScaleSelect/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
MapFishPrintV3Manager
} from '@terrestris/mapfish-print-manager';

import useMap from '@terrestris/react-geo/dist/Hook/useMap';
import { useMap } from '@terrestris/react-util/dist/Hooks/useMap/useMap';

export interface ScaleSelectProps extends SelectProps<number> {
printManager: MapFishPrintV3Manager;
Expand Down
2 changes: 1 addition & 1 deletion src/components/PrintForm/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import MapFishPrintV3WMTSSerializer

import { LayerUtil } from '@terrestris/ol-util';
import MapUtil from '@terrestris/ol-util/dist/MapUtil/MapUtil';
import { useMap } from '@terrestris/react-geo/dist/Hook/useMap';
import { useMap } from '@terrestris/react-util/dist/Hooks/useMap/useMap';
import { getBearerTokenHeader } from '@terrestris/shogun-util/dist/security/getBearerTokenHeader';

import useAppDispatch from '../../hooks/useAppDispatch';
Expand Down
2 changes: 1 addition & 1 deletion src/components/ToolMenu/Draw/Attributions/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { useTranslation } from 'react-i18next';

import {
useMap
} from '@terrestris/react-geo/dist/Hook/useMap';
} from '@terrestris/react-util/dist/Hooks/useMap/useMap';

import './index.less';
import AttributionRow, { InputFields } from './AttributionRow';
Expand Down
6 changes: 3 additions & 3 deletions src/components/ToolMenu/Draw/DeleteAllButton/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ import {
useTranslation
} from 'react-i18next';

import SimpleButton, { SimpleButtonProps } from '@terrestris/react-geo/dist/Button/SimpleButton/SimpleButton';
import {
SimpleButton, useMap
} from '@terrestris/react-geo';
import { SimpleButtonProps } from '@terrestris/react-geo/dist/Button/SimpleButton/SimpleButton';
useMap
} from '@terrestris/react-util/dist/Hooks/useMap/useMap';
import { DigitizeUtil } from '@terrestris/react-util/dist/Util/DigitizeUtil';

const { confirm } = Modal;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import {
useState
} from 'react';

import CardStyle, {
import {
CardStyle,
CardStyleProps
} from 'geostyler/dist/Component/CardStyle/CardStyle';

Expand All @@ -30,7 +31,7 @@ import MapUtil from '@terrestris/ol-util/dist/MapUtil/MapUtil';

import {
useMap
} from '@terrestris/react-geo/dist/Hook/useMap';
} from '@terrestris/react-util/dist/Hooks/useMap/useMap';

export type StylingComponentProps = CardStyleProps & {};

Expand Down
4 changes: 2 additions & 2 deletions src/components/ToolMenu/Draw/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ import ToggleGroup from '@terrestris/react-geo/dist/Button/ToggleGroup/ToggleGro
import UploadButton from '@terrestris/react-geo/dist/Button/UploadButton/UploadButton';
import {
useMap
} from '@terrestris/react-geo/dist/Hook/useMap';
} from '@terrestris/react-util/dist/Hooks/useMap/useMap';
import {
DigitizeUtil
} from '@terrestris/react-geo/dist/Util/DigitizeUtil';
} from '@terrestris/react-util/dist/Util/DigitizeUtil';

import './index.less';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {

import MapUtil from '@terrestris/ol-util/dist/MapUtil/MapUtil';

import useMap from '@terrestris/react-geo/dist/Hook/useMap';
import { useMap } from '@terrestris/react-util/dist/Hooks/useMap/useMap';

import {
PropertyFormItemReadConfig,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
import MapUtil from '@terrestris/ol-util/dist/MapUtil/MapUtil';

import PropertyGrid from '@terrestris/react-geo/dist/Grid/PropertyGrid/PropertyGrid';
import useMap from '@terrestris/react-geo/dist/Hook/useMap';
import { useMap } from '@terrestris/react-util/dist/Hooks/useMap/useMap';

import useHighlightVectorLayer from '../../../../hooks/useHighlightVectorLayer';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ import Logger from '@terrestris/base-util/dist/Logger';

import {
useMap
} from '@terrestris/react-geo/dist/Hook/useMap';
import { DigitizeUtil } from '@terrestris/react-geo/dist/Util/DigitizeUtil';
} from '@terrestris/react-util/dist/Hooks/useMap/useMap';
import { DigitizeUtil } from '@terrestris/react-util/dist/Util/DigitizeUtil';

import useAppDispatch from '../../../../hooks/useAppDispatch';
import useAppSelector from '../../../../hooks/useAppSelector';
Expand Down
4 changes: 2 additions & 2 deletions src/components/ToolMenu/FeatureInfo/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ import CoordinateInfo, {
CoordinateInfoProps,
CoordinateInfoState
} from '@terrestris/react-geo/dist/CoordinateInfo/CoordinateInfo';
import { useMap } from '@terrestris/react-geo/dist/Hook/useMap';
import { useMap } from '@terrestris/react-util/dist/Hooks/useMap/useMap';
import {
isWmsLayer, WmsLayer
} from '@terrestris/react-geo/dist/Util/typeUtils';
} from '@terrestris/react-util/dist/Util/typeUtils';

import { getBearerTokenHeader } from '@terrestris/shogun-util/dist/security/getBearerTokenHeader';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ import MapUtil from '@terrestris/ol-util/dist/MapUtil/MapUtil';

import {
useMap
} from '@terrestris/react-geo/dist/Hook/useMap';
} from '@terrestris/react-util/dist/Hooks/useMap/useMap';
import {
isWmsLayer
} from '@terrestris/react-geo/dist/Util/typeUtils';
} from '@terrestris/react-util/dist/Util/typeUtils';

import {
DownloadConfig
Expand Down
6 changes: 3 additions & 3 deletions src/components/ToolMenu/LayerTree/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ import {

import MapUtil from '@terrestris/ol-util/dist/MapUtil/MapUtil';

import {
useMap
} from '@terrestris/react-geo/dist/Hook/useMap';
import RgLayerTree, {
LayerTreeProps as RgLayerTreeProps
} from '@terrestris/react-geo/dist/LayerTree/LayerTree';
import Legend from '@terrestris/react-geo/dist/Legend/Legend';
import LayerTransparencySlider from '@terrestris/react-geo/dist/Slider/LayerTransparencySlider/LayerTransparencySlider';
import {
useMap
} from '@terrestris/react-util/dist/Hooks/useMap/useMap';

import LayerType from '@terrestris/shogun-util/dist/model/enum/LayerType';
import {
Expand Down
2 changes: 1 addition & 1 deletion src/components/ToolMenu/Measure/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import MeasureButton from '@terrestris/react-geo/dist/Button/MeasureButton/Measu
import ToggleGroup from '@terrestris/react-geo/dist/Button/ToggleGroup/ToggleGroup';
import {
useMap
} from '@terrestris/react-geo/dist/Hook/useMap';
} from '@terrestris/react-util/dist/Hooks/useMap/useMap';

import './index.less';

Expand Down
2 changes: 1 addition & 1 deletion src/components/ToolMenu/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ import {

import {
useMap
} from '@terrestris/react-geo/dist/Hook/useMap';
} from '@terrestris/react-util/dist/Hooks/useMap/useMap';

import useAppDispatch from '../../hooks/useAppDispatch';
import useAppSelector from '../../hooks/useAppSelector';
Expand Down
2 changes: 1 addition & 1 deletion src/components/UploadDataModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ import MapUtil from '@terrestris/ol-util/dist/MapUtil/MapUtil';

import {
useMap
} from '@terrestris/react-geo/dist/Hook/useMap';
} from '@terrestris/react-util/dist/Hooks/useMap/useMap';

import Layer from '@terrestris/shogun-util/dist/model/Layer';
import SHOGunApplicationUtil from '@terrestris/shogun-util/dist/parser/SHOGunApplicationUtil';
Expand Down
3 changes: 1 addition & 2 deletions src/components/UserMenu/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,14 @@ import {
useTranslation
} from 'react-i18next';

import UserChip from '@terrestris/react-geo/dist/UserChip/UserChip';

import useAppSelector from '../../hooks/useAppSelector';
import useSHOGunAPIClient from '../../hooks/useSHOGunAPIClient';
import {
getGravatarUrl
} from '../../utils/getGravatarUrl';

import ApplicationInfo from '../ApplicationInfo';
import UserChip from '../UserChip';

import './index.less';

Expand Down
Loading

0 comments on commit 3b9423e

Please sign in to comment.