Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chore] Type and export fixups #2152

Merged
merged 1 commit into from
Mar 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions src/actions/package.json
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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