/*! * Copyright (c) Microsoft Corporation and contributors. All rights reserved. * Licensed under the MIT License. */ import { SharedPropertyTree } from "@fluid-experimental/property-dds"; import { UpgradeType } from "../internal/semvermap.js"; import { DataBindingDefinition } from "./dataBinder.js"; /** * A DataBindingRegistry allows one to register and create representations. The type of the representation is * provided (ex. 'BINDING', 'DRAW', 'UI', etc.), along with its creation function, and an id for this registration. * The id for the registration is usually the type id of the objects being represented (like a PropertySet template * id). * * Common representations are data bindings (business objects) representing property sets, and UI or Graphics * representing data bindings. * @hidden */ export declare class DataBindingRegistry { private _applicableBindingCache; private _bindingTypeMap; /** * Registers a Data Binding. * * This function allows registering multiple data bindings for the same id. The bindings registered here will later * be created in the same order in which they have been registered. The same DataBindingObject may be registered * multiple times and there are no checks to prevent this * * @param bindingType - The type of the representation. (ex. 'VIEW', 'DRAW', 'UI', etc.) * @param typeid - The id to use for this registration, usually the type id of the objects being represented * (like a PropertySet template id). * @param upgradeType - What semver range this data binding applies to. * @param dataBindingObject - The Data Binding and its associated metadata. * @public */ register(bindingType: string, typeid: string, upgradeType: UpgradeType, dataBindingObject: DataBindingDefinition): void; /** * Unregisters a Data Binding. * * @param bindingType - The type of the representation. * @param typeid - The registration id. * @returns True if the representation was successfully removed * @public */ unregister(bindingType: string, typeid: string): boolean; /** * @param bindingType - The type of the representation. * @param typeid - The registration id. * @returns true if there is a precise rule for this bindingtype/typeid pair * @public */ has(bindingType: string, typeid: string): boolean; /** * Return all the bindings that apply to this type * * @param in_typeId - the type for which we want binding definitions * @param in_requestedBindingType - a specific binding type to filter for, all are returned if no type * provided * @param in_propertyTree - the current Property Tree, if present * * @returns Array of applicable bindings * * @private */ getApplicableBindingDefinitions(in_typeId: string, in_requestedBindingType?: string, in_propertyTree?: SharedPropertyTree): any[]; /** * Given a typeid and binding type, the function returns the most appropriate databinding definition, taking * inheritance into account. * * @param in_typeid - The typeid of the property to query for * @param in_bindingType - The registered DataBinding must have this binding type to be considered. * @param in_propertyTree - the current property Tree, if present * @returns The definition a registered template or null if no template is found. */ getRegisteredDefinition(in_typeid: string, in_bindingType: string, in_propertyTree?: SharedPropertyTree): object | null; } //# sourceMappingURL=dataBindingRegistry.d.ts.map