@itwin/appui-abstract
Version:
iTwin.js UI abstractions
56 lines • 2.33 kB
TypeScript
/** @packageDocumentation
* @module Dialog
*/
import { BeUiEvent } from "@itwin/core-bentley";
import { DialogPropertyItem, DialogPropertySyncItem } from "./DialogItem";
/** Sync UI Control Properties Event class.
* @public
*/
export declare class SyncPropertiesChangeEvent extends BeUiEvent<SyncPropertiesChangeEventArgs> {
}
/** [[UiDataProvider]] Abstract class that allows property values to be passed between hosting API and UI.
* @public
*/
export declare abstract class UiDataProvider {
/** Called by UI to inform data provider of changes. */
processChangesInUi(_properties: DialogPropertyItem[]): PropertyChangeResult;
/** Get Sync UI Control Properties Event */
onSyncPropertiesChangeEvent: SyncPropertiesChangeEvent;
onItemsReloadedEvent: BeUiEvent<void>;
/** Called by UI to validate a property value */
validateProperty(_item: DialogPropertyItem): PropertyChangeResult;
/** Called to sync properties synchronously if a UiDataProvider is active for the UI */
syncProperties(syncProperties: DialogPropertySyncItem[]): void;
/** Called to inform listener that the UiDataProvider has updated values for the UI */
fireSyncPropertiesEvent(syncProperties: DialogPropertySyncItem[]): void;
/** Called to inform listeners that new properties are ready for display in UI.
*/
fireItemsReloadedEvent(): void;
/** Used to pass properties between a tool and an explicity defined UI dialog. See method supplyDialogItems in [[UiLayoutDataProvider]] for supplying
* properties that will be used to dynamically create and layout control in a Dialog or Widget.
*/
supplyAvailableProperties(): DialogPropertyItem[];
}
/** Sync UI Control Properties Event Args interface.
* @public
*/
export interface SyncPropertiesChangeEventArgs {
properties: DialogPropertySyncItem[];
}
/** Status of Proposed property changes from UI to UiDataProvider
* @public
*/
export declare enum PropertyChangeStatus {
/** Property Change(s) Succeeded */
Success = 0,
/** Error Processing Property Change(s) */
Error = 2
}
/** Interface used by UiDataProvider to report change status (validation) to UI.
* @public
*/
export interface PropertyChangeResult {
errorMsg?: string;
status: PropertyChangeStatus;
}
//# sourceMappingURL=UiDataProvider.d.ts.map