kepler.gl
Version:
kepler.gl is a webgl based application to visualize large scale location data in the browser
68 lines (67 loc) • 4.88 kB
TypeScript
import React from 'react';
import SourceDataSelectorFactory from '../common/source-data-selector';
import AggrScaleSelectorFactory from './aggr-scale-selector';
import ChannelByValueSelectorFactory from './channel-by-value-selector';
import { ArcLayerColorSelectorFactory, LayerColorRangeSelectorFactory, LayerColorSelectorFactory } from './layer-color-selector';
import LayerColumnModeConfigFactory from './layer-column-mode-config';
import LayerConfigGroupFactory from './layer-config-group';
import LayerTypeSelectorFactory from './layer-type-selector';
import TextLabelPanelFactory from './text-label-panel';
import VisConfigSliderFactory from './vis-config-slider';
import VisConfigSwitchFactory from './vis-config-switch';
import VectorTileLayerConfiguratorFactory from './vector-tile-layer-configurator';
import { ActionHandler, toggleModal } from '@kepler.gl/actions';
import { AggregationLayer, Layer, LayerBaseConfig, VisualChannel } from '@kepler.gl/layers';
import { Datasets } from '@kepler.gl/table';
import { ColorUI, LayerVisConfig, NestedPartial } from '@kepler.gl/types';
declare type LayerConfiguratorProps = {
layer: Layer;
datasets: Datasets;
layerTypeOptions: {
id: string;
label: string;
icon: React.ElementType;
requireData: boolean;
}[];
openModal: ActionHandler<typeof toggleModal>;
updateLayerConfig: (newConfig: Partial<LayerBaseConfig>) => void;
updateLayerType: (newType: string) => void;
updateLayerVisConfig: (newVisConfig: Partial<LayerVisConfig>) => void;
updateLayerVisualChannelConfig: (newConfig: Partial<LayerBaseConfig>, channel: string, newVisConfig?: Partial<LayerVisConfig>) => void;
updateLayerColorUI: (prop: string, newConfig: NestedPartial<ColorUI>) => void;
updateLayerTextLabel: (idx: number | 'all', prop: string, value: any) => void;
disableTypeSelect?: boolean;
};
declare type AggregationSelectorProps = {
channel: VisualChannel;
layer: AggregationLayer;
onChange: (val: Record<string, string | number | boolean | object | readonly (string | number | boolean | object)[] | null>, key: string) => void;
};
export declare const getLayerFields: (datasets: Datasets, layer: Layer) => any;
/** Return any to be able to customize the Dataset entity */
export declare const getLayerDataset: (datasets: Datasets, layer: Layer) => any;
export declare const getLayerConfiguratorProps: (props: LayerConfiguratorProps) => {
layer: Layer;
fields: any;
onChange: (newConfig: Partial<LayerBaseConfig>) => void;
setColorUI: (prop: string, newConfig: NestedPartial<ColorUI>) => void;
};
export declare const getVisConfiguratorProps: (props: LayerConfiguratorProps) => {
layer: Layer;
fields: any;
onChange: (newVisConfig: Partial<LayerVisConfig>) => void;
setColorUI: (prop: string, newConfig: NestedPartial<ColorUI>) => void;
};
export declare const getLayerChannelConfigProps: (props: LayerConfiguratorProps) => {
layer: Layer;
dataset: any;
fields: any;
onChange: (newConfig: Partial<LayerBaseConfig>, channel: string, newVisConfig?: Partial<LayerVisConfig>) => void;
setColorUI: (prop: string, newConfig: NestedPartial<ColorUI>) => void;
};
declare function LayerConfiguratorFactory(SourceDataSelector: ReturnType<typeof SourceDataSelectorFactory>, VisConfigSlider: ReturnType<typeof VisConfigSliderFactory>, TextLabelPanel: ReturnType<typeof TextLabelPanelFactory>, LayerConfigGroup: ReturnType<typeof LayerConfigGroupFactory>, ChannelByValueSelector: ReturnType<typeof ChannelByValueSelectorFactory>, LayerColumnModeConfig: ReturnType<typeof LayerColumnModeConfigFactory>, LayerTypeSelector: ReturnType<typeof LayerTypeSelectorFactory>, VisConfigSwitch: ReturnType<typeof VisConfigSwitchFactory>, LayerColorSelector: ReturnType<typeof LayerColorSelectorFactory>, LayerColorRangeSelector: ReturnType<typeof LayerColorRangeSelectorFactory>, ArcLayerColorSelector: ReturnType<typeof ArcLayerColorSelectorFactory>, AggrScaleSelector: ReturnType<typeof AggrScaleSelectorFactory>, VectorTileLayerConfigurator: ReturnType<typeof VectorTileLayerConfiguratorFactory>): React.ComponentType<LayerConfiguratorProps>;
declare namespace LayerConfiguratorFactory {
var deps: (typeof VectorTileLayerConfiguratorFactory | typeof VisConfigSwitchFactory | typeof ChannelByValueSelectorFactory | typeof LayerColorRangeSelectorFactory | typeof LayerColorSelectorFactory | typeof LayerConfigGroupFactory | typeof VisConfigSliderFactory | typeof SourceDataSelectorFactory | typeof TextLabelPanelFactory | typeof LayerColumnModeConfigFactory | typeof LayerTypeSelectorFactory | typeof ArcLayerColorSelectorFactory | typeof AggrScaleSelectorFactory)[];
}
export default LayerConfiguratorFactory;
export declare const AggregationTypeSelector: ({ channel, layer, onChange }: AggregationSelectorProps) => React.JSX.Element;