cv-dialog-sdk
Version:
Catavolt Dialog Javascript API
63 lines (62 loc) • 2.1 kB
TypeScript
import { StringDictionary } from '../util/StringDictionary';
import { DataAnnotation } from './DataAnnotation';
import { ModelUtil } from "./ModelUtil";
import { TypeNames } from './types';
/**
* Represents a 'value' or field in a row or record. See {@link Record}
* A Prop has a corresponding {@link PropertyDef} that describes the property.
* Like an {@link Record}, a Prop may also have {@link Annotation}s (style annotations),
* but these apply to the property only
*/
export declare class Property {
readonly name: string;
readonly value: any;
readonly format?: string;
readonly annotations: DataAnnotation[];
private type;
static fromJSON(jsonObject: StringDictionary, modelUtil: ModelUtil): Promise<Property>;
/**
* Produce a value that can be used for comparison purposes
* Props considered 'equal' should produce the same identity value
*
* @param o
* @returns {any}
*/
static valueForCompare(o: any): any;
/**
*
* @param {string} name
* @param value
* @param {string} format
* @param {Array<DataAnnotation>} annotations
*/
constructor(name: string, value: any, format?: string, annotations?: DataAnnotation[]);
equals(prop: Property): boolean;
readonly backgroundColor: string;
readonly foregroundColor: string;
readonly imageName: string;
readonly imagePlacement: string;
readonly isBoldText: boolean;
readonly isItalicText: boolean;
readonly isPlacementCenter: boolean;
readonly isPlacementLeft: boolean;
readonly isPlacementRight: boolean;
readonly isPlacementStretchUnder: boolean;
readonly isPlacementUnder: boolean;
readonly isUnderline: boolean;
readonly overrideText: string;
readonly tipText: string;
/**
* Get a primative value appropriate for comparison
*/
readonly comparable: any;
readonly valueForWrite: any;
toJSON(): {
name: string;
value: any;
type: TypeNames;
propertyType: any;
format: any;
};
private static parseJSONValue;
}