UNPKG

ze-react-component-library

Version:
107 lines (106 loc) 4.08 kB
import { LogicformAPIResultType, LogicformType, RepresentationType } from "zeroetp-api-sdk"; import { MenuProps } from "antd"; import { TableProps } from "../components/Table/Table.types"; import { ZESheetProps } from "../ZESheet/ZESheet.types"; import { ZELogicformVisualizerProps } from "../ZELogicformVisualizer/ZELogicformVisualizer.types"; import { ZEValueDisplayerProps } from "../ZEValueDisplayer/ZEValueDisplayer"; import { S2DataConfig } from "@antv/s2"; import type { ChartRepresentationProps } from "./representations/common/chart.types"; import { DetailProps } from "../components/Detail"; import { ChartType } from "./representations"; import { CSSProperties } from "react"; import type { LLMChatterProps } from "./LLMChatter"; import { AskAnswerType } from "../hooks/useAsk"; export declare type ZECardOnChangeParams = { logicform?: LogicformType; representation?: string; title?: string; question?: string; chartProps?: { userChartOptionStr?: Record<string, string>; }; sheetProps?: { s2DataConfig?: S2DataConfig; }; echartsSetting?: EchartsSetting; }; export declare type EchartsSetting = { seriesLabel?: { show?: boolean; }; averageLine?: { show?: boolean; }; sheet?: { showSubTotals?: boolean; }; }; export declare type ZECardProps = { loading?: boolean; title?: string; showTitleEditor?: boolean; question?: string; id?: string; titleRender?: (title?: string) => React.ReactNode; logicform?: LogicformType & { currency?: string; }; logicformQuery?: LogicformType["query"]; askProps?: { askContext?: LogicformType; formatAnswer?: (answer: AskAnswerType) => AskAnswerType; onAnswerError?: (answer: AskAnswerType) => void; }; formatResult?: (data: any) => any; representation?: RepresentationType | ChartType; warning?: string; showExtra?: boolean; extra?: React.ReactNode; extraMenus?: MenuProps["items"]; menuFilter?: (key: string) => void; mainContent?: (logicform?: LogicformType, result?: LogicformAPIResultType, changeLogicform?: (logicform: LogicformType) => void) => React.ReactNode | null; additionalContent?: (logicform: LogicformType, result: LogicformAPIResultType, changeLogicform?: (logicform: LogicformType) => void) => React.ReactNode | null; footer?: React.ReactNode | ((logicform: LogicformType) => React.ReactNode); compact?: boolean; headStyle?: React.CSSProperties; bodyStyle?: React.CSSProperties; getResult?: (result: LogicformAPIResultType) => void; exportToExcel?: boolean | string; xlsx?: any; debug?: boolean; showMainContentOnly?: boolean; showRepresentationChanger?: boolean; showRecommender?: boolean; showFeedback?: boolean; askMore?: (question: string) => void; onChangeQuestion?: (question: string) => void; tableProps?: Omit<TableProps, "logicform" | "result" | "setLogicform" | "reload" | "onChange">; sheetProps?: Omit<ZESheetProps, "logicform" | "result" | "onChange">; detailProps?: Pick<DetailProps, "showRefDetail">; showVisualizer?: boolean; visualizerProps?: Omit<ZELogicformVisualizerProps, "logicform">; chartProps?: Omit<ChartRepresentationProps, "result">; pieThreshold?: number; barFirst?: boolean; valueDisplayerProps?: Omit<ZEValueDisplayerProps, "data">; close?: () => void; enableGroupByMenu?: boolean; onChange?: (params: ZECardOnChangeParams) => void; askError?: string; askErrorHelperLink?: string; askErrorPath?: any[]; useSheet?: boolean; allowDrillDown?: boolean; preprocessDrilldownLogicform?: (logicform: LogicformType) => void; useLLM?: boolean; promptTemplate?: string; echartsSetting?: EchartsSetting; enableEchartsSetting?: boolean; llmMaxRows?: number; llmProps?: Pick<LLMChatterProps, "showSearch">; chatAvatar?: string; refreshInterval?: number; theme?: "light" | "dark"; style?: CSSProperties; analyzer?: boolean; };