@eva-ics/webengine-react
Version:
React components for EVA ICS HMI Web Engine
29 lines (28 loc) • 947 B
TypeScript
import { StateProp } from "@eva-ics/webengine";
export interface StateHistoryOIDColMapping {
oid: string;
name: string;
tf_id?: number;
prop?: StateProp;
formula?: string;
}
/**
* Generate CSV from useStateHistory hook data
*
* note: timeColName is used with timeFormatter function only
*
* @param {object} __namedParameters Options
*
* @param {any} data - hookResult.data
* @param {StateHistoryOIDColMapping[]} mapping - OID + prop to col mapping
* @param {(t: number) => string} [timeFormatter] - a custom time formatting function
* @param {string} [timeColName] - time column name (used in custom formatting only)
*
* @throws if a formula is specified but invalid
*/
export declare const generateStateHistoryCSV: ({ data, mapping, timeColName, timeFormatter, }: {
data: any;
mapping: StateHistoryOIDColMapping[];
timeColName?: string;
timeFormatter?: (t: number) => string;
}) => string | null;