/** * 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 type { Collection, FlowEngine } from '@nocobase/flow-engine'; type ChartQueryFieldItem = { field?: unknown; }; export type ChartQueryForDirtyTracking = { mode?: string; collectionPath?: unknown[]; measures?: ChartQueryFieldItem[]; dimensions?: ChartQueryFieldItem[]; orders?: ChartQueryFieldItem[]; filter?: unknown; }; export type ChartDirtyRefreshSnapshot = { query: ChartQueryForDirtyTracking; targetKey: string; dirtyVersion: number; }; type DataSourceManagerLike = { getCollection?: (dataSourceKey: string, collectionName: string) => Collection | undefined; }; export declare function getChartDirtyRefreshSnapshot(options: { engine: FlowEngine; dataSourceManager: DataSourceManagerLike; query?: ChartQueryForDirtyTracking; }): ChartDirtyRefreshSnapshot | null; export declare function shouldRefreshChartOnActive(options: { forceRefresh?: boolean; currentSnapshot: ChartDirtyRefreshSnapshot | null; lastSnapshot: ChartDirtyRefreshSnapshot | null; }): boolean; export {};