UNPKG

kepler.gl

Version:

kepler.gl is a webgl based application to visualize large scale location data in the browser

370 lines (369 loc) 15.6 kB
import React, { Dispatch } from 'react'; import { FeatureFlags } from './context'; import { AttributionWithStyle, DatasetAttribution, OnErrorCallBack, OnSuccessCallBack, Viewport } from '@kepler.gl/types'; import { MapStateActions, MapStyleActions, ProviderActions, UIStateActions, VisStateActions } from '@kepler.gl/actions'; declare type KeplerGlActions = { visStateActions: typeof VisStateActions; mapStateActions: typeof MapStateActions; mapStyleActions: typeof MapStyleActions; uiStateActions: typeof UIStateActions; providerActions: typeof ProviderActions; }; import SidePanelFactory from './side-panel'; import MapContainerFactory from './map-container'; import MapsLayoutFactory from './maps-layout'; import BottomWidgetFactory from './bottom-widget'; import ModalContainerFactory from './modal-container'; import PlotContainerFactory from './plot-container'; import NotificationPanelFactory from './notification-panel'; import GeoCoderPanelFactory from './geocoder-panel'; import EffectManagerFactory from './effects/effect-manager'; import DndContextFactory from './dnd-context'; import { KeplerGlState } from '@kepler.gl/reducers'; import { Provider } from '@kepler.gl/cloud-providers'; export declare const isViewportDisjointed: (props: any) => any; export declare const mapStateSelector: (props: any, index: number) => any; export declare const mapFieldsSelector: (props: KeplerGLProps, index?: number) => { getMapboxRef: (() => React.RefObject<any>) | undefined; mapboxApiAccessToken: string; mapboxApiUrl: string; mapState: any; datasetAttributions: DatasetAttribution[]; mapStyle: import("@kepler.gl/reducers").MapStyle; onDeckInitialized: (() => void) | undefined; onViewStateChange: ((viewState: Viewport) => void) | undefined; onMouseMove: ((event: React.MouseEvent & { lngLat?: [number, number]; }) => void) | undefined; deckGlProps: object | undefined; uiStateActions: typeof UIStateActions; visStateActions: typeof VisStateActions; mapStateActions: typeof MapStateActions; visState: import("@kepler.gl/schemas").VisState; activeSidePanel: string | null; mapControls: import("@kepler.gl/types").MapControls; readOnly: boolean; locale: string; isLoadingIndicatorVisible: boolean; sidePanelWidth: number; topMapContainerProps: object | undefined; bottomMapContainerProps: object | undefined; transformRequest: ((url: string) => { url: string; }) | undefined; }; export declare function getVisibleDatasets(datasets: any): {}; export declare const sidePanelSelector: (props: KeplerGLProps, availableProviders: any, filteredDatasets: any) => { appName: string; version: string; appWebsite: any; mapStyle: import("@kepler.gl/reducers").MapStyle; onSaveMap: (() => void) | undefined; uiState: import("@kepler.gl/types").UiState; mapStyleActions: typeof MapStyleActions; visStateActions: typeof VisStateActions; uiStateActions: typeof UIStateActions; mapStateActions: typeof MapStateActions; datasets: any; filters: import("@kepler.gl/types").Filter[]; layers: import("@kepler.gl/layers/dist/base-layer").default[]; layerOrder: string[]; layerClasses: { point: typeof import("@kepler.gl/layers/dist/point-layer/point-layer").default; arc: typeof import("@kepler.gl/layers/dist/arc-layer/arc-layer").default; line: typeof import("@kepler.gl/layers/dist/line-layer/line-layer").default; grid: typeof import("@kepler.gl/layers/dist/grid-layer/grid-layer").default; hexagon: typeof import("@kepler.gl/layers/dist/hexagon-layer/hexagon-layer").default; geojson: typeof import("@kepler.gl/layers/dist/geojson-layer/geojson-layer").default; cluster: typeof import("@kepler.gl/layers/dist/cluster-layer/cluster-layer").default; icon: typeof import("@kepler.gl/layers/dist/icon-layer/icon-layer").default; heatmap: typeof import("@kepler.gl/layers/dist/heatmap-layer/heatmap-layer").default; hexagonId: typeof import("@kepler.gl/layers/dist/h3-hexagon-layer/h3-hexagon-layer").default; "3D": typeof import("@kepler.gl/layers").ScenegraphLayer; trip: typeof import("@kepler.gl/layers/dist/trip-layer/trip-layer").default; s2: typeof import("@kepler.gl/layers/dist/s2-geometry-layer/s2-geometry-layer").default; vectorTile: typeof import("@kepler.gl/layers").VectorTileLayer; }; interactionConfig: import("@kepler.gl/types").InteractionConfig; mapInfo: import("@kepler.gl/types").MapInfo; layerBlending: string; overlayBlending: string | undefined; width: number; availableProviders: any; mapSaved: string | null; }; export declare const plotContainerSelector: (props: KeplerGLProps) => { width: number | undefined; height: number | undefined; exportImageSetting: import("@kepler.gl/types").ExportImage; mapFields: { getMapboxRef: (() => React.RefObject<any>) | undefined; mapboxApiAccessToken: string; mapboxApiUrl: string; mapState: any; datasetAttributions: DatasetAttribution[]; mapStyle: import("@kepler.gl/reducers").MapStyle; onDeckInitialized: (() => void) | undefined; onViewStateChange: ((viewState: Viewport) => void) | undefined; onMouseMove: ((event: React.MouseEvent & { lngLat?: [number, number]; }) => void) | undefined; deckGlProps: object | undefined; uiStateActions: typeof UIStateActions; visStateActions: typeof VisStateActions; mapStateActions: typeof MapStateActions; visState: import("@kepler.gl/schemas").VisState; activeSidePanel: string | null; mapControls: import("@kepler.gl/types").MapControls; readOnly: boolean; locale: string; isLoadingIndicatorVisible: boolean; sidePanelWidth: number; topMapContainerProps: object | undefined; bottomMapContainerProps: object | undefined; transformRequest: ((url: string) => { url: string; }) | undefined; }; addNotification: (notification: object) => { payload: object; type: "@@kepler.gl/ADD_NOTIFICATION"; }; setExportImageSetting: (newSetting: Partial<import("@kepler.gl/constants").ExportImage>) => { payload: Partial<import("@kepler.gl/constants").ExportImage>; type: "@@kepler.gl/SET_EXPORT_IMAGE_SETTING"; }; setExportImageDataUri: (dataUri: string) => { payload: string; type: "@@kepler.gl/SET_EXPORT_IMAGE_DATA_URI"; }; setExportImageError: (error: Error) => { payload: Error; type: "@@kepler.gl/SET_EXPORT_IMAGE_ERROR"; }; splitMaps: import("@kepler.gl/types").SplitMap[]; }; export declare const isSplitSelector: (props: KeplerGLProps) => boolean; export declare const bottomWidgetSelector: (props: KeplerGLProps, theme: any) => { filters: import("@kepler.gl/types").Filter[]; datasets: Datasets; uiState: import("@kepler.gl/types").UiState; layers: import("@kepler.gl/layers/dist/base-layer").default[]; animationConfig: import("@kepler.gl/types").AnimationConfig; visStateActions: typeof VisStateActions; toggleModal: (id: string | null) => { payload: string | null; type: "@@kepler.gl/TOGGLE_MODAL"; }; sidePanelWidth: any; }; export declare const modalContainerSelector: (props: KeplerGLProps, rootNode: any) => { appName: string; mapStyle: import("@kepler.gl/reducers").MapStyle; visState: import("@kepler.gl/schemas").VisState; mapState: import("@kepler.gl/types").MapState; uiState: import("@kepler.gl/types").UiState; providerState: import("@kepler.gl/reducers").ProviderState; mapboxApiAccessToken: string; mapboxApiUrl: string | undefined; visStateActions: typeof VisStateActions; uiStateActions: typeof UIStateActions; mapStyleActions: typeof MapStyleActions; providerActions: typeof ProviderActions; rootNode: any; cloudProviders: Provider[]; onExportToCloudSuccess: OnSuccessCallBack | undefined; onLoadCloudMapSuccess: OnSuccessCallBack | undefined; onLoadCloudMapError: OnErrorCallBack | undefined; onExportToCloudError: OnErrorCallBack | undefined; }; export declare const geoCoderPanelSelector: (props: KeplerGLProps, dimensions: { width: number; height: number; }) => { isGeocoderEnabled: boolean; mapboxApiAccessToken: string; mapState: import("@kepler.gl/types").MapState; uiState: import("@kepler.gl/types").UiState; layerOrder: string[]; updateVisData: typeof VisStateActions.updateVisData; removeDataset: typeof VisStateActions.removeDataset; updateMap: (viewport: Viewport, mapIndex?: number | undefined) => { payload: { viewport: Viewport; mapIndex?: number | undefined; }; type: "@@kepler.gl/UPDATE_MAP"; }; appWidth: number; }; /** * Returns array of unique dataset attributions, each with title and url properties. */ export declare const datasetAttributionSelector: ((state: any) => DatasetAttribution[]) & import("reselect").OutputSelectorFields<(args_0: any) => DatasetAttribution[], { clearCache: () => void; }> & { clearCache: () => void; }; /** * Deduplicated dataset and layer text attributions and logos. * Returns text attributions and logos to display. */ export declare const attributionSelector: ((state: any) => { sources: DatasetAttribution[]; logos: AttributionWithStyle[]; }) & import("reselect").OutputSelectorFields<(args_0: DatasetAttribution[]) => { sources: DatasetAttribution[]; logos: AttributionWithStyle[]; }, { clearCache: () => void; }> & { clearCache: () => void; }; export declare const notificationPanelSelector: (props: KeplerGLProps) => { removeNotification: (id: string) => { payload: string; type: "@@kepler.gl/REMOVE_NOTIFICATION"; }; notifications: import("@kepler.gl/types").Notifications[]; }; export declare const DEFAULT_KEPLER_GL_PROPS: { mapStyles: never[]; mapStylesReplaceDefault: boolean; mapboxApiUrl: string; width: number; height: number; appName: string; version: string; sidePanelWidth: number; theme: {}; cloudProviders: never[]; readOnly: boolean; featureFlags: {}; }; declare type KeplerGLBasicProps = { mapboxApiAccessToken: string; mapboxApiUrl?: string; id: string; width?: number; height?: number; appWebsite?: any; onSaveMap?: () => void; onViewStateChange?: (viewState: Viewport) => void; onDeckInitialized?: () => void; onKeplerGlInitialized?: () => void; getMapboxRef?: () => React.RefObject<any>; mapStyles?: { id: string; style?: object; }[]; mapStylesReplaceDefault?: boolean; appName?: string; version?: string; sidePanelWidth?: number; theme?: object; cloudProviders?: Provider[]; deckGlProps?: object; onLoadCloudMapSuccess?: OnSuccessCallBack; onLoadCloudMapError?: OnErrorCallBack; onMouseMove?: (event: React.MouseEvent & { lngLat?: [number, number]; }) => void; onExportToCloudSuccess?: OnSuccessCallBack; onExportToCloudError?: OnErrorCallBack; readOnly?: boolean; featureFlags?: FeatureFlags; localeMessages?: { [key: string]: { [key: string]: string; }; }; dispatch: Dispatch<any>; topMapContainerProps?: object; bottomMapContainerProps?: object; transformRequest?: (url: string) => { url: string; }; }; declare type KeplerGLProps = KeplerGlState & KeplerGlActions & KeplerGLBasicProps; declare function KeplerGlFactory(BottomWidget: ReturnType<typeof BottomWidgetFactory>, GeoCoderPanel: ReturnType<typeof GeoCoderPanelFactory>, MapContainer: ReturnType<typeof MapContainerFactory>, MapsLayout: ReturnType<typeof MapsLayoutFactory>, ModalContainer: ReturnType<typeof ModalContainerFactory>, SidePanel: ReturnType<typeof SidePanelFactory>, PlotContainer: ReturnType<typeof PlotContainerFactory>, NotificationPanel: ReturnType<typeof NotificationPanelFactory>, DndContext: ReturnType<typeof DndContextFactory>): React.ComponentType<KeplerGLBasicProps & { selector: (...args: any[]) => KeplerGlState; }>; declare namespace KeplerGlFactory { var deps: (typeof DndContextFactory | typeof BottomWidgetFactory | typeof GeoCoderPanelFactory | typeof MapContainerFactory | typeof MapsLayoutFactory | typeof ModalContainerFactory | typeof SidePanelFactory | typeof PlotContainerFactory | typeof NotificationPanelFactory | typeof EffectManagerFactory)[]; } export declare function mapStateToProps(state: KeplerGlState, props: KeplerGLProps): { visState: import("@kepler.gl/schemas").VisState; mapStyle: import("@kepler.gl/reducers").MapStyle; mapState: import("@kepler.gl/types").MapState; uiState: import("@kepler.gl/types").UiState; providerState: import("@kepler.gl/reducers").ProviderState; visStateActions: typeof VisStateActions; mapStateActions: typeof MapStateActions; mapStyleActions: typeof MapStyleActions; uiStateActions: typeof UIStateActions; providerActions: typeof ProviderActions; mapboxApiAccessToken: string; mapboxApiUrl?: string | undefined; id: string; width?: number | undefined; height?: number | undefined; appWebsite?: any; onSaveMap?: (() => void) | undefined; onViewStateChange?: ((viewState: Viewport) => void) | undefined; onDeckInitialized?: (() => void) | undefined; onKeplerGlInitialized?: (() => void) | undefined; getMapboxRef?: (() => React.RefObject<any>) | undefined; mapStyles?: { id: string; style?: object | undefined; }[] | undefined; mapStylesReplaceDefault?: boolean | undefined; appName?: string | undefined; version?: string | undefined; sidePanelWidth?: number | undefined; theme?: object | undefined; cloudProviders?: Provider[] | undefined; deckGlProps?: object | undefined; onLoadCloudMapSuccess?: OnSuccessCallBack | undefined; onLoadCloudMapError?: OnErrorCallBack | undefined; onMouseMove?: ((event: React.MouseEvent<Element, MouseEvent> & { lngLat?: [number, number] | undefined; }) => void) | undefined; onExportToCloudSuccess?: OnSuccessCallBack | undefined; onExportToCloudError?: OnErrorCallBack | undefined; readOnly?: boolean | undefined; featureFlags?: FeatureFlags | undefined; localeMessages?: { [key: string]: { [key: string]: string; }; } | undefined; dispatch: React.Dispatch<any>; topMapContainerProps?: object | undefined; bottomMapContainerProps?: object | undefined; transformRequest?: ((url: string) => { url: string; }) | undefined; }; /** @type {() => import('reselect').OutputParametricSelector<any, any, any, any>} */ export declare function makeGetActionCreators(): ((state: any, props: any) => { visStateActions: any; mapStateActions: any; mapStyleActions: any; uiStateActions: any; providerActions: any; dispatch: any; }) & import("reselect").OutputSelectorFields<(args_0: any, args_1: any) => { visStateActions: any; mapStateActions: any; mapStyleActions: any; uiStateActions: any; providerActions: any; dispatch: any; }, { clearCache: () => void; }> & { clearCache: () => void; }; export default KeplerGlFactory;