import { CommonPlotProps, CommonPlotState } from './common.contracts'; /** * Wrapper for UUID/v4 */ export declare const GetGuid: () => string; /** * For comparing a new hash against an old one. * Return whether the hashes have changed, as well as the contents of the new hash */ export interface HashAndCompareResult { /** * New hash string */ newHash: string; /** * Whether the new hash has changed from the previous one */ hasChanged: boolean; } /** * Get a SHA1 hash of an item * @param input Input item to hash * @returns hash of item as string */ export declare const GetHash: (input: T) => string; /** * Get a SHA1 hash of an item, and compare it to the previous value. * Returns whether the new hash has changed from previous + the contents of the new hash * * @typeparam T The type to hash * @param input Input item used to generate new hash + compare to previous * @param prevHash Previous hash string */ export declare const GetAndCompareHash: (input: T, prevHash?: string) => HashAndCompareResult; /** * If the input data has changed (according to a hash), increment the plot revision and store new hash */ export declare const HandleDerivedStateUpdate: (propsIn: TProps, stateIn: TState) => { dataset: import("./common.contracts").AppPlotData[]; revision: number; dataHash: string; };