import React from "react"; import type { DataSourceProp, PropertyEditorProps } from "../../../type"; import "./index.scss"; import { MultiVariantEditor, MultiVariantEditorState, VariantOption } from "../multi-variant-editor"; type SelectedTab = "database" | "url" | "array"; interface Props extends PropertyEditorProps { displayMode?: "inner" | "normal"; } interface State extends MultiVariantEditorState { } /** * 数据源参数编辑器:支持三种形态 * - database:数据库 + 实体类型 + 字段 + 过滤条件; * - url:查询/更新/插入/保存/删除 URL; * - array:静态数组(如下拉选项)。 * 页签按当前值形态自动判定:数组值选数组页签,仅有 URL 配置时选 URL 页签,其余为数据库页签。 * displayMode 为 "inner" 时仅渲染内容(不含页签栏),且 database 形态只暴露 entityType。 * * 继承 MultiVariantEditor 复用形态切换逻辑;各形态内容通过组合 ObjectEditor / * ObjectArrayEditor 渲染属性行(不再继承 ComposeEditor)。 */ export declare class DataSourceEditor extends MultiVariantEditor { protected defaultVariant: SelectedTab; protected variantOptions: VariantOption[]; protected getVariant(value: DataSourceProp | undefined): SelectedTab | undefined; private getDataSourceParams; protected renderVariant(variant: SelectedTab, value?: DataSourceProp): React.ReactNode; } export default DataSourceEditor;