kepler.gl
Version:
kepler.gl is a webgl based application to visualize large scale location data in the browser
50 lines (49 loc) • 1.83 kB
TypeScript
import React, { ComponentType } from 'react';
import { Field, TooltipField } from '@kepler.gl/types';
import FieldTokenFactory from '../common/field-token';
export declare type FieldListItemFactoryProps = {
value: Field;
displayOption: (field: Field) => string;
};
export declare function FieldListItemFactoryFactory(FieldToken: any): (showToken?: boolean) => ({ value, displayOption }: FieldListItemFactoryProps) => React.JSX.Element;
export declare namespace FieldListItemFactoryFactory {
var deps: (typeof FieldTokenFactory)[];
}
export declare type MinimalField = {
name: string;
displayName: string;
format: string;
type?: string;
};
export declare type FieldType = string | TooltipField | Field;
export declare type FieldValue = string | {
name: string;
} | string[] | {
name: string;
}[];
export declare type FieldSelectorProps<Option extends MinimalField> = {
id?: string;
fields: Option[];
onSelect: (items: ReadonlyArray<string | number | boolean | object> | string | number | boolean | object | null) => void;
value?: FieldValue | null;
filterFieldTypes?: string | string[];
inputTheme?: string;
placement?: string;
placeholder?: string;
erasable?: boolean;
disabled?: boolean;
error?: boolean;
multiSelect?: boolean;
closeOnSelect?: boolean;
showToken?: boolean;
suggested?: Option[] | null;
CustomChickletComponent?: ComponentType<any>;
size?: string;
reorderItems?: (newOrder: any) => void;
className?: string;
};
declare function FieldSelectorFactory(FieldListItemFactory: ReturnType<typeof FieldListItemFactoryFactory>): ComponentType<FieldSelectorProps<MinimalField>>;
declare namespace FieldSelectorFactory {
var deps: (typeof FieldListItemFactoryFactory)[];
}
export default FieldSelectorFactory;