import { IDataset } from './dataset'; import { ILayer } from './layer'; import { IFilter } from './filter'; import { IInteractive } from './interactive'; import { DeepPartial } from './common'; import { IMapTheme, IMapType } from './map'; import { IPlan } from './plan'; export type IBaseComponentProps< ValueType = string, Extends = Record, > = | boolean | ({ display: boolean; defaultValue: ValueType; onChange: (newValue: ValueType) => void; } & Extends); export type IMapThemeConfig = IBaseComponentProps; export type IMapTypeConfig = IBaseComponentProps; export type IPreviewConfig = IBaseComponentProps; export type ILayerConfig = IBaseComponentProps; export type IFilterConfig = IBaseComponentProps; export type IInteractiveConfig = IBaseComponentProps; export type IDatasetConfig = IBaseComponentProps; export interface IComponentProps { mapTheme: IMapThemeConfig; mapType: IMapTypeConfig; preview: IPreviewConfig; dataset: IDatasetConfig; layer: ILayerConfig; filter: IFilterConfig; interactive: IInteractiveConfig; } export interface IDemo extends IPlan { imgSrc: string; demoName: string; } export interface IGlobalProps { component?: DeepPartial; store?: boolean; onChange?: () => void; demos?: IDemo[]; }