kepler.gl
Version:
kepler.gl is a webgl based application to visualize large scale location data in the browser
92 lines (91 loc) • 3.33 kB
TypeScript
import React from 'react';
import { ToolbarItemProps } from '../common/toolbar-item';
import { UiState } from '@kepler.gl/types';
import { BaseProps } from '../common/icons';
declare type ActionItem = {
id: string;
label?: string;
blank?: boolean;
href?: string;
tooltip?: string;
iconComponent: React.ComponentType<Partial<BaseProps>>;
iconComponentProps?: BaseProps;
dropdownComponent?: React.ComponentType<DropdownComponentProps>;
onClick?: () => void;
};
declare type PanelActionProps = {
item: ActionItem;
showExportDropdown: (string: any) => void;
};
declare type PanelHeaderDropdownProps = {
items: ToolbarItemProps[];
show?: boolean;
onClose: () => void;
id: string;
};
declare type LogoComponentProps = {
appName: string;
appWebsite: string;
version: string;
};
declare type DropdownCallbacks = {
logoComponent?: React.FC<LogoComponentProps> | React.ComponentType<LogoComponentProps>;
onExportImage: () => void;
onExportData: () => void;
onExportConfig?: () => void;
onExportMap: () => void;
onSaveToStorage: (() => void) | null;
onSaveAsToStorage: (() => void) | null;
onSaveMap?: () => void;
onShareMap: (() => void) | null;
};
declare type Item = {
label: string;
icon: React.ComponentType<Partial<BaseProps>>;
key: string;
onClick: (p: DropdownComponentProps) => (() => void) | null;
};
declare type DropdownComponentProps = {
show: boolean;
onClose: () => void;
items?: Item[];
} & DropdownCallbacks;
export declare type PanelHeaderProps = {
appName: string;
appWebsite: string;
version: string;
visibleDropdown: UiState['visibleDropdown'];
actionItems?: ActionItem[];
showExportDropdown: (i: string) => void;
hideExportDropdown: () => void;
} & DropdownCallbacks;
declare const PanelAction: React.FC<PanelActionProps>;
export { PanelAction };
export declare const PanelHeaderDropdownFactory: () => React.FC<PanelHeaderDropdownProps>;
export declare const SaveExportDropdownFactory: {
(PanelHeaderDropdown: ReturnType<typeof PanelHeaderDropdownFactory>): React.FC<DropdownComponentProps> & {
defaultItems: ToolbarItemProps[];
};
deps: (() => React.FC<PanelHeaderDropdownProps>)[];
};
export declare const CloudStorageDropdownFactory: {
(PanelHeaderDropdown: ReturnType<typeof PanelHeaderDropdownFactory>): React.FC<DropdownComponentProps> & {
defaultItems: DropdownComponentProps['items'];
};
deps: (() => React.FC<PanelHeaderDropdownProps>)[];
};
declare function PanelHeaderFactory(SaveExportDropdown: ReturnType<typeof SaveExportDropdownFactory>, CloudStorageDropdown: ReturnType<typeof CloudStorageDropdownFactory>): React.ComponentType<PanelHeaderProps>;
declare namespace PanelHeaderFactory {
var deps: ({
(PanelHeaderDropdown: React.FC<PanelHeaderDropdownProps>): React.FC<DropdownComponentProps> & {
defaultItems: ToolbarItemProps[];
};
deps: (() => React.FC<PanelHeaderDropdownProps>)[];
} | {
(PanelHeaderDropdown: React.FC<PanelHeaderDropdownProps>): React.FC<DropdownComponentProps> & {
defaultItems: Item[] | undefined;
};
deps: (() => React.FC<PanelHeaderDropdownProps>)[];
})[];
}
export default PanelHeaderFactory;