import * as Enums from "./enums"; import { Dictionary } from "./shared"; import { HostConfig } from "./host-config"; import { HostCapabilities } from "./host-capabilities"; import { SerializableObject, StringProperty, SerializableObjectProperty, IValidationEvent, PropertyDefinition } from "./serialization"; export declare class ValidationResults { readonly allIds: Dictionary; readonly validationEvents: IValidationEvent[]; addFailure(cardObject: CardObject, event: Enums.ValidationEvent, message: string): void; } export type CardObjectType = { new (): CardObject; }; export declare abstract class CardObject extends SerializableObject { static readonly typeNameProperty: StringProperty; static readonly idProperty: StringProperty; static readonly requiresProperty: SerializableObjectProperty; protected getSchemaKey(): string; id?: string; get requires(): HostCapabilities; private _shouldFallback; protected _parent?: CardObject; protected _renderedElement?: HTMLElement; /** * Checks if this CardObject contains the given DOM Node. * @param node The DOM Node to look for. * @returns `true` if the DOM Node was found, `false` otherwise. */ protected contains(node: Node): boolean; onPreProcessPropertyValue?: (sender: CardObject, property: PropertyDefinition, value: any) => any; abstract getJsonTypeName(): string; abstract get hostConfig(): HostConfig; preProcessPropertyValue(prop: PropertyDefinition, propertyValue?: any): any; setParent(value: CardObject | undefined): void; setShouldFallback(value: boolean): void; shouldFallback(): boolean; getRootObject(): CardObject; internalValidateProperties(context: ValidationResults): void; validateProperties(): ValidationResults; /** * Recursively searches this CardObject and any children to find the * innermost CardObject that owns the given DOM Node. * * @param node The DOM Node to look for. * * @returns The owner of the given DOM Node, or `undefined` if no owner was found. */ findDOMNodeOwner(node: Node): CardObject | undefined; releaseDOMResources(): void; get parent(): CardObject | undefined; get renderedElement(): HTMLElement | undefined; }