@nova-ui/dashboards
Version:
Nova Dashboards is a framework designed to provide feature developers with a common solution for presenting data coming from various sources within a single view, as well as a set of predefined widget visualizations that are 100% configuration-driven and
38 lines (37 loc) • 1.72 kB
TypeScript
import { ErrorNodeKey } from "./types";
import { IComponentConfiguration } from "../../../types";
/**
* Component definition for the widget header node
*/
export declare const WIDGET_HEADER: IComponentConfiguration;
/**
* Component definition for the loading node
*/
export declare const WIDGET_LOADING: IComponentConfiguration;
/**
* Component configuration definition for the basic widget body node
*/
export declare const WIDGET_BODY: IComponentConfiguration;
/**
* A map of error codes to widget error node keys
* --
* An error code doesn't have to be an HTTP status code; it may be any string that matches an expected
* data source error type. Additionally, the node keys may be any string as long as they correspond to an
* error configuration node defined in the widget structure.
*/
export declare const ERROR_FALLBACK_MAP: Record<string, ErrorNodeKey>;
/**
* An index of common error configurations
*/
export declare const ERROR_NODES: Record<string, IComponentConfiguration>;
/**
* Retrieves an index of the basic widget body content nodes including fallback nodes
*
* @param mainContentNodeKey The key corresponding to the main body content node
* @param fallbackAdapterId The id for the adapter responsible for activating fallback content in case of an error
* @param fallbackMap A map of node keys to fallback content definitions
* @param fallbackNodes An index of fallback content definitions
*
* @returns An index of component configurations
*/
export declare function widgetBodyContentNodes(mainContentNodeKey: string, fallbackAdapterId?: string, fallbackMap?: Record<string, string>, fallbackNodes?: Record<string, IComponentConfiguration>): Record<string, IComponentConfiguration>;