import React from 'react'; import { COMPONENT_MODE, GET_DATASET_STATUS } from './constants'; import type { Layout } from '../app'; import type { DatasetConfig } from '../dataset-manager'; export type ComponentConfig = { id: string; type: string; datasetId: DatasetConfig['id']; config: Record; layout: Layout; [key: string]: any; }; export type QueryDatasetStatus = keyof typeof GET_DATASET_STATUS; export type ComponentMode = keyof typeof COMPONENT_MODE; export type ComponentPluginViewProps = { id: string; data: any; config: T; }; export type ConfigPanelSchema = { type: string; property: string; name: string; initialValue?: any; children?: ConfigPanelSchema; [key: string]: any; }[]; export type ComponentPlugin = { title: string; type: string; icon?: string; configPanelSchema: ConfigPanelSchema; View: React.ComponentType>; }; export type ConfigPanelPluginComponentProps = { name: string; childComponents?: React.ComponentType[]; onChange: (value: any) => void; [key: string]: any; }; export type ConfigPanelPlugin = { type: string; Component: React.ComponentType; };