/** * This file is part of the NocoBase (R) project. * Copyright (c) 2020-2024 NocoBase Co., Ltd. * Authors: NocoBase Team. * * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License. * For more information, please refer to: https://www.nocobase.com/agreement. */ import { ChildPageModel, DataBlockModel } from '@nocobase/client-v2'; import { SQLResource } from '@nocobase/flow-engine'; import React from 'react'; import type { EChartsType } from 'echarts'; import { ChartOptions } from './Chart'; import { ChartResource } from '../resources/ChartResource'; import PluginDataVisualizationClient from '../../plugin'; type ChartBlockModelStructure = { subModels: { page: ChildPageModel; }; }; type ChartProps = { chart: ChartOptions & { optionRaw?: string; Component?: React.FC; }; }; export declare class ChartBlockModel extends DataBlockModel { props: ChartProps; _previousStepParams: any; get resource(): ChartResource | SQLResource; private __onResourceRefresh; private __eventsBoundChart?; private __eventsBoundRaw?; private chartEventsCleanup?; private __eventsApplyToken; private lastRefreshSnapshot; private dirtyRefreshing; private __onChartRefReady; private getCurrentRefreshSnapshot; private rememberRefreshSnapshot; private refreshAndRememberSnapshot; onActive(forceRefresh?: boolean): Promise; refresh(): Promise; initResource(mode?: string): void; getResourceSettingsInitParams(): any; private getConfiguredEventsRaw; private shouldSkipApplyEvents; private markEventsBound; private clearEventsBound; private resetEventsBound; private runChartEventCleanups; private cleanupChartEvents; buildQueryRequest(query: any): Promise; onInit(options: any): Promise; renderComponent(): React.JSX.Element; getFilterFields(): Promise<{ name: string; title: string; type: string; interface: string; target?: string; filterable?: { operators: { label: string; value: string; }[]; }; }[]>; checkResource(query: any): void; applyQuery(query: any): void; setDataResult(): void; applyChartOptions(payload: { mode: 'basic' | 'custom'; builder?: any; raw?: string; query?: any; }): Promise; getRegisteredChart(type?: string): import("../..").ChartType; getV2DataVisualizationPlugin(): PluginDataVisualizationClient; getDataVisualizationPlugin(): PluginDataVisualizationClient; getRegisteredChartGeneral(builder?: any): any; getRegisteredChartFieldProps(query: any, data?: Record[]): Record; formatRegisteredChartData(data?: Record[], fieldProps?: Record): { [x: string]: any; }[]; getRegisteredChartDisplayFieldProps(fieldProps?: Record): {}; getRegisteredChartFieldTransformer(field?: any, item?: any): (value: any) => any; getCollectionFieldByPath(query: any, field: string | string[] | undefined): any; applyEvents(raw?: string, chartInstance?: EChartsType): Promise; private runChartEvents; renderChart(): void; onPreview(params: { query: any; chart: any; }, needQueryData?: boolean): Promise; cancelPreview(): Promise; } export {};