import { isDynamicOption } from '@splunk/visualizations-shared/configUtils'; import { VizConfig } from '../interfaces/VizConfig'; import { EditorLayoutConfig } from '../interfaces/Editor'; export { enhanceOptionsSchemaWithDynamicOptions } from '@splunk/visualization-schemas'; export interface PresetEntry { name: string; value: any; label: string; } /** * Helper function to enhance a Visualization Config as needed based on behaviors specified in supports block * this function also collapse all editor panels * @param vizConfig a Visualization Config * @returns an enhanced Visualization Config containing updated config entries based on behaviors it supports * and containing `open: false` for all editor panels in editorConfig */ declare function enhanceConfig(vizConfig: VizConfig): VizConfig; /** * Helper function to uncollapse all editor panels by adding `open: true` to the editorConfig * Created for editor unit tests * @param vizConfig a Visualization Config * @returns a Visualization Config containing `open: true` for all editor panels in editorConfig */ declare function uncollapseEditorConfig(vizConfig: VizConfig): VizConfig; /** * Evaluates whether there is an initialPreset that fits the current state of vizContext + vizOptions * This function ignores extraneous vizOptions or vizContext keys, as they could be outside the scope of what the preset is intended to configure * * @param {Object} vizContext - the current vizContext definition * @param {Object} vizOptions - the current vizOptions definition * @param {PresetEntry[]} presets - the list of presets, one of which can be considered an initialPreset */ declare function getInitialPreset(vizContext: { [configKey: string]: any; }, vizOptions: { [configKey: string]: any; }, presets: PresetEntry[]): PresetEntry | null; interface PrecisionOption { label: string; value: number; } /** * generates number precision values for a Select editor * * @param {Number} numPrecisionValues - number of integer precision values to generate * @returns {{ label: string; value; string }[]} array of { label, value } tuples */ declare function generatePrecisionValues(numPrecisionValues: number): PrecisionOption[]; export { enhanceConfig, getInitialPreset, generatePrecisionValues, uncollapseEditorConfig, isDynamicOption }; /** * insert layout in layout array, return a new layout array instead of updating the original * * @param {EditorLayoutConfig[][]} layout - editor layout * @param {Number} index - the index to insert layout item(s) * @param {EditorLayoutConfig[][]} layoutItems - the item(s) to insert * @returns {EditorLayoutConfig[][]} new editor layout with insertion */ export declare const insertLayout: (layout: EditorLayoutConfig[][], index: number, ...layoutItems: EditorLayoutConfig[][]) => EditorLayoutConfig[][]; //# sourceMappingURL=configUtils.d.ts.map