Skip to content

Commit

Permalink
[chore] Type and export fixups (#2152)
Browse files Browse the repository at this point in the history
Signed-off-by: Ihor Dykhta <dikhta.igor@gmail.com>
Co-authored-by: Ilija Puaca <ipuaca@gmail.com>
  • Loading branch information
igorDykhta and ilijapuaca committed Mar 8, 2023
1 parent 245ac53 commit 2e57238
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
1 change: 1 addition & 0 deletions src/actions/package.json
Expand Up @@ -30,6 +30,7 @@
"umd"
],
"dependencies": {
"@deck.gl/core": "^8.6.0",
"@kepler.gl/cloud-providers": "3.0.0-alpha.0",
"@kepler.gl/constants": "3.0.0-alpha.0",
"@kepler.gl/layers": "3.0.0-alpha.0",
Expand Down
2 changes: 1 addition & 1 deletion src/actions/src/action-types.ts
Expand Up @@ -50,7 +50,7 @@ export const ACTION_PREFIX = '@@kepler.gl/';
*
* export default createStore(reducers, {}, applyMiddleware(taskMiddleware))
*/
const ActionTypes = {
export const ActionTypes = {
// identity action
REGISTER_ENTRY: `${ACTION_PREFIX}REGISTER_ENTRY`,
DELETE_ENTRY: `${ACTION_PREFIX}DELETE_ENTRY`,
Expand Down
9 changes: 5 additions & 4 deletions src/actions/src/vis-state-actions.ts
Expand Up @@ -19,6 +19,7 @@
// THE SOFTWARE.

// vis-state-reducer
import {PickInfo} from '@deck.gl/core/lib/deck';
import {default as ActionTypes} from './action-types';
import {FileCacheItem} from '@kepler.gl/processors';
import {Layer, LayerBaseConfig} from '@kepler.gl/layers';
Expand Down Expand Up @@ -874,7 +875,7 @@ export function toggleFilterFeature(
}

export type OnLayerHoverUpdaterAction = {
info: {picked?: boolean} | null;
info: PickInfo<any> | null;
};
/**
* Trigger layer hover event with hovered object
Expand All @@ -884,7 +885,7 @@ export type OnLayerHoverUpdaterAction = {
* @public
*/
export function onLayerHover(
info: {picked?: boolean} | null
info: PickInfo<any> | null
): Merge<OnLayerHoverUpdaterAction, {type: typeof ActionTypes.LAYER_HOVER}> {
return {
type: ActionTypes.LAYER_HOVER,
Expand All @@ -893,7 +894,7 @@ export function onLayerHover(
}

export type OnLayerClickUpdaterAction = {
info: {picked?: boolean} | null;
info: PickInfo<any> | null;
};
/**
* Trigger layer click event with clicked object
Expand All @@ -903,7 +904,7 @@ export type OnLayerClickUpdaterAction = {
* @public
*/
export function onLayerClick(
info: {picked?: boolean} | null
info: PickInfo<any> | null
): Merge<OnLayerClickUpdaterAction, {type: typeof ActionTypes.LAYER_CLICK}> {
return {
type: ActionTypes.LAYER_CLICK,
Expand Down
8 changes: 2 additions & 6 deletions src/components/src/map-container.tsx
Expand Up @@ -22,6 +22,7 @@
import React, {Component, createRef, useMemo} from 'react';
import styled, {withTheme} from 'styled-components';
import {StaticMap, MapRef} from 'react-map-gl';
import {PickInfo} from '@deck.gl/core/lib/deck';
import DeckGL from '@deck.gl/react';
import {createSelector, Selector} from 'reselect';
import mapboxgl from 'mapbox-gl';
Expand Down Expand Up @@ -412,12 +413,7 @@ export default function MapContainerFactory(
this.props.visStateActions.onLayerClick(null);
};

_onLayerHover = (
idx: number,
info: {
picked?: boolean;
} | null
) => {
_onLayerHover = (idx: number, info: PickInfo<any> | null) => {
this.props.visStateActions.onLayerHover(info);
};

Expand Down

0 comments on commit 2e57238

Please sign in to comment.