/**
 * 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.
 */
export declare const CHART_DEFAULT_DATA_SOURCE_KEY = "main";
export declare const CHART_QUERY_MODES: readonly ["builder", "sql"];
export declare const CHART_VISUAL_MODES: readonly ["basic", "custom"];
export declare const CHART_BASIC_VISUAL_TYPES: readonly ["line", "area", "bar", "barHorizontal", "pie", "doughnut", "funnel", "scatter"];
export declare const CHART_QUERY_AGGREGATIONS: readonly ["sum", "count", "avg", "max", "min"];
export declare const CHART_SORT_DIRECTIONS: readonly ["asc", "desc"];
export declare const CHART_SORT_NULLS: readonly ["default", "first", "last"];
export declare const CHART_LABEL_TYPES: readonly ["value", "percent"];
export declare const CHART_FUNNEL_SORTS: readonly ["descending", "ascending"];
export type ChartBuilderQueryOutput = {
    alias: string;
    source?: 'builder' | 'sql';
    kind?: 'dimension' | 'measure';
    field?: string | string[];
    aggregation?: (typeof CHART_QUERY_AGGREGATIONS)[number];
    distinct?: boolean;
    format?: string;
};
export type ChartCapabilityHint = {
    key: string;
    title: string;
    description: string;
};
export type ChartStyleValueSupport = {
    type: 'boolean' | 'number' | 'string';
    enumValues?: string[];
    min?: number;
    max?: number;
    description?: string;
};
type DerivedChartResource = {
    dataSourceKey: string;
    collectionName: string;
};
type DerivedSqlChartQuery = {
    mode: 'sql';
    sql?: any;
    sqlDatasource?: any;
};
type DerivedBuilderChartQuery = {
    mode: 'builder';
    resource?: DerivedChartResource | null;
    measures?: any;
    dimensions?: any;
    filter?: any;
    sorting?: any[];
    limit?: any;
    offset?: any;
};
type DerivedChartQuery = DerivedSqlChartQuery | DerivedBuilderChartQuery;
type DerivedChartSemanticState = {
    query?: DerivedChartQuery;
    visual?: ReturnType<typeof deriveChartVisual>;
    events?: ReturnType<typeof deriveChartEvents>;
};
declare function deriveChartVisual(configure: any): Partial<{
    mode: string;
    raw: any;
}> | Partial<{
    style?: Partial<{
        legend: any;
        tooltip: any;
        label: any;
        boundaryGap: any;
        xAxisLabelRotate: any;
        yAxisSplitLine: any;
        smooth: any;
        stack: any;
        radiusInner: any;
        radiusOuter: any;
        labelType: any;
        sort: any;
        minSize: any;
        maxSize: any;
    }>;
    mappings?: Partial<{
        x: any;
        y: any;
        category: any;
        value: any;
        series: any;
        size: any;
    }>;
    mode: string;
    type: string;
}>;
declare function deriveChartEvents(configure: any): Partial<{
    raw: any;
}>;
export declare function deriveChartSemanticState(configure: any): DerivedChartSemanticState;
export declare function getChartBuilderResourceInit(configure: any): {
    dataSourceKey: string;
    collectionName: string;
};
export declare function getChartBuilderQueryOutputs(configure: any): ChartBuilderQueryOutput[];
export declare function getChartBuilderQueryAliases(configure: any): string[];
export declare function getChartSupportedVisualTypes(): ("bar" | "line" | "area" | "barHorizontal" | "pie" | "doughnut" | "funnel" | "scatter")[];
export declare function getChartSupportedMappingsByType(): {
    [k: string]: {
        allowed: string[];
        required: string[];
    };
};
export declare function getChartSupportedStylesByType(): {
    [k: string]: {
        [k: string]: ChartStyleValueSupport;
    };
};
export declare function getChartSafeDefaultHints(): ChartCapabilityHint[];
export declare function getChartRiskyPatternHints(): ChartCapabilityHint[];
export declare function getChartUnsupportedPatternHints(): ChartCapabilityHint[];
export declare function getChartVisualMappingAliases(input: any): string[];
export declare function canonicalizeChartConfigure(configure: any): Record<string, any>;
export declare function buildChartConfigureFromSemanticChanges(currentConfigure: any, changes: Record<string, any>): any;
export declare function isChartBuilderQuery(configure: any): boolean;
export declare function getChartVisualCommonStyleKeys(): string[];
export {};
