Skip to content

Commit

Permalink
Merge pull request #701 from terrestris/remove-type-utils
Browse files Browse the repository at this point in the history
feat: remove type utils and use the ones from `ol-util`
  • Loading branch information
simonseyock authored May 14, 2024
2 parents 3dd7362 + dc33e1e commit 557ea00
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 208 deletions.
10 changes: 5 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"@babel/preset-typescript": "^7.24.1",
"@release-it/conventional-changelog": "^8.0.1",
"@terrestris/eslint-config-typescript": "^5.0.0",
"@terrestris/ol-util": "^17.0.0",
"@terrestris/ol-util": "^18.0.0",
"@testing-library/jest-dom": "^6.4.2",
"@testing-library/react": "^15.0.5",
"@types/jest": "^29.5.12",
Expand All @@ -78,7 +78,7 @@
"watch": "^1.0.2"
},
"peerDependencies": {
"@terrestris/ol-util": ">=17",
"@terrestris/ol-util": ">=18",
"ol": ">=9",
"ol-mapbox-style": ">=12",
"react": ">=18",
Expand Down
2 changes: 1 addition & 1 deletion src/Hooks/useCoordinateInfo/useCoordinateInfo.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Logger from '@terrestris/base-util/dist/Logger';
import { isWfsLayer, isWmsLayer, WfsLayer, WmsLayer } from '@terrestris/ol-util';
import _cloneDeep from 'lodash/cloneDeep';
import _groupBy from 'lodash/groupBy';
import _isNil from 'lodash/isNil';
Expand All @@ -12,7 +13,6 @@ import OlMapBrowserEvent from 'ol/MapBrowserEvent';
import { getUid } from 'ol/util';
import { useCallback, useEffect, useState } from 'react';

import { isWfsLayer, isWmsLayer, WfsLayer, WmsLayer } from '../../Util/typeUtils';
import useMap from '../useMap/useMap';

export type FeatureMap = {
Expand Down
128 changes: 0 additions & 128 deletions src/Util/typeUtils.spec.tsx

This file was deleted.

24 changes: 0 additions & 24 deletions src/Util/typeUtils.ts

This file was deleted.

69 changes: 21 additions & 48 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,48 +1,21 @@
import MapContext from './Context/MapContext/MapContext';
import useAsyncEffect from './Hooks/useAsyncEffect/useAsyncEffect';
import useDebouncedState from './Hooks/useDebouncedState/useDebouncedState';
import useDraw from './Hooks/useDraw/useDraw';
import useDropTargetMap from './Hooks/useDropTargetMap/useDropTargetMap';
import useGeoLocation from './Hooks/useGeoLocation/useGeoLocation';
import useMap from './Hooks/useMap/useMap';
import useModify from './Hooks/useModify/useModify';
import useObjectState from './Hooks/useObjectState/useObjectState';
import useOlInteraction from './Hooks/useOlInteraction/useOlInteraction';
import useOlLayer from './Hooks/useOlLayer/useOlLayer';
import useOlListener from './Hooks/useOlListener/useOlListener';
import usePermalink from './Hooks/usePermalink/usePermalink';
import usePropOrDefault from './Hooks/usePropOrDefault/usePropOrDefault';
import useSelectFeatures from './Hooks/useSelectFeatures/useSelectFeatures';
import useTimeLayerAware from './Hooks/useTimeLayerAware/useTimeLayerAware';
import ClickAwayListener from './Util/ClickAwayListener/ClickAwayListener';
import DigitizeUtil from './Util/DigitizeUtil';
import { InkmapPrintSpec } from './Util/InkmapTypes';
import PrintUtil from './Util/PrintUtil';
import { isWmsLayer, WmsLayer } from './Util/typeUtils';
import { zoomTo } from './Util/ZoomUtil';

export {
ClickAwayListener,
DigitizeUtil,
InkmapPrintSpec,
isWmsLayer,
MapContext,
PrintUtil,
useAsyncEffect,
useDebouncedState,
useDraw,
useDropTargetMap,
useGeoLocation,
useMap,
useModify,
useObjectState,
useOlInteraction,
useOlLayer,
useOlListener,
usePermalink,
usePropOrDefault,
useSelectFeatures,
useTimeLayerAware,
WmsLayer,
zoomTo
};
export { default as MapContext } from './Context/MapContext/MapContext';
export { default as useAsyncEffect } from './Hooks/useAsyncEffect/useAsyncEffect';
export { default as useDebouncedState } from './Hooks/useDebouncedState/useDebouncedState';
export { default as useDraw } from './Hooks/useDraw/useDraw';
export { default as useDropTargetMap } from './Hooks/useDropTargetMap/useDropTargetMap';
export { default as useGeoLocation } from './Hooks/useGeoLocation/useGeoLocation';
export { default as useMap } from './Hooks/useMap/useMap';
export { default as useModify } from './Hooks/useModify/useModify';
export { default as useObjectState } from './Hooks/useObjectState/useObjectState';
export { default as useOlInteraction } from './Hooks/useOlInteraction/useOlInteraction';
export { default as useOlLayer } from './Hooks/useOlLayer/useOlLayer';
export { default as useOlListener } from './Hooks/useOlListener/useOlListener';
export { default as usePermalink } from './Hooks/usePermalink/usePermalink';
export { default as usePropOrDefault } from './Hooks/usePropOrDefault/usePropOrDefault';
export { default as useSelectFeatures } from './Hooks/useSelectFeatures/useSelectFeatures';
export { default as useTimeLayerAware } from './Hooks/useTimeLayerAware/useTimeLayerAware';
export { default as ClickAwayListener } from './Util/ClickAwayListener/ClickAwayListener';
export { default as DigitizeUtil } from './Util/DigitizeUtil';
export { InkmapPrintSpec } from './Util/InkmapTypes';
export { default as PrintUtil } from './Util/PrintUtil';
export { zoomTo } from './Util/ZoomUtil';

0 comments on commit 557ea00

Please sign in to comment.