UNPKG

kepler.gl

Version:

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

107 lines (106 loc) 4.85 kB
import React, { ElementType, PropsWithChildren } from 'react'; import { ColorMap, ColorUI, HexColor, NestedPartial } from '@kepler.gl/types'; import { ColorBreak, ColorBreakOrdinal } from '@kepler.gl/utils'; export declare type ActionIcons = { delete: ElementType; sort: ElementType; add: ElementType; }; export declare type EditColorMapFunc = (v: number, i: number) => void; export declare type SetColorUIFunc = (newConfig: NestedPartial<ColorUI>) => void; /** * EditableColorRange */ export declare type EditableColorRangeProps = { item: ColorBreak; isLast: boolean; index: number; editColorMap?: EditColorMapFunc; editable: boolean; }; export declare type CustomPaletteProps = { customPalette: ColorUI['customPalette']; setColorPaletteUI: SetColorUIFunc; showSketcher: number | boolean; ordinalDomain?: string[] | number[]; actionIcons?: ActionIcons; onApply: (e: React.MouseEvent) => void; onCancel: () => void; }; export declare type CustomPaletteInputProps = { index: number; isSorting: boolean; color: HexColor; colorBreaks: ColorBreakOrdinal[] | ColorBreak[] | null; inputColorHex: (index: number, v: HexColor) => void; editColorMapValue: EditColorMapFunc; actionIcons?: ActionIcons; disableAppend?: boolean; disableDelete?: boolean; onDelete: (index: number) => void; onAdd: (index: number) => void; onToggleSketcher: (index: number) => void; }; export declare const ColorPaletteItem: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>; export declare const DividerLine: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>; export declare const ColorSwatch: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("styled-components/dist/types").FastOmit<import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & { ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined; }>, never>, never>>; declare type DragHandleProps = PropsWithChildren<{ className?: string; listeners?: unknown; }>; export declare const DragHandle: React.ComponentClass<DragHandleProps, any>; export declare type ColorPaletteInputProps = { value: string | number; onChange: (val: unknown) => void; id: string; width: string; textAlign: string; editable: boolean; }; export declare const ColorPaletteInput: ({ value, onChange, id, width, textAlign, editable }: ColorPaletteInputProps) => React.JSX.Element; export declare const EditableColorRange: React.FC<EditableColorRangeProps>; export declare const AddColorStop: ({ onColorAdd, IconComponent }: { onColorAdd: any; IconComponent: any; }) => React.JSX.Element; export declare const DeleteColorStop: ({ onColorDelete, IconComponent }: { onColorDelete: any; IconComponent: any; }) => React.JSX.Element; export declare const CustomPaletteInput: React.FC<CustomPaletteInputProps>; export declare type CategoricalSelectorProps = { index: number; selectedValues: (string | number | null)[]; allValues: string[] | number[]; addColorMapValue?: (v: (number | string | null)[], i: number) => void; removeColorMapValue?: (v: number | string, i: number) => void; resetColorMapValue?: (i: number) => void; selectRestColorMapValue?: (i: number) => void; editable?: boolean; }; export declare const CategoricalSelector: React.FC<CategoricalSelectorProps>; export declare type CategoricalCustomPaletteInputProps = { index: number; isSorting: boolean; color: HexColor; colorMap?: ColorMap | null; addColorMapValue: (v: (number | string | null)[], i: number) => void; removeColorMapValue: (v: number | string, i: number) => void; resetColorMapValue: (i: number) => void; selectRestColorMapValue: (i: number) => void; actionIcons?: ActionIcons; onDelete: (index: number) => void; onAdd: (index: number) => void; onToggleSketcher: (index: number) => void; allValues: string[] | number[]; disableDelete?: boolean; }; export declare const CategoricalCustomPaletteInput: React.FC<CategoricalCustomPaletteInputProps>; export declare const BottomAction: ({ onCancel, onConfirm }: { onCancel: any; onConfirm: any; }) => React.JSX.Element; declare function CustomPaletteFactory(): React.FC<CustomPaletteProps>; export default CustomPaletteFactory;