packageDocumentation module import { BeUiEvent } from "@itwin/core-bentley" ; import { DialogPropertyItem , DialogPropertySyncItem } from "./DialogItem" ; public export class SyncPropertiesChangeEvent extends BeUiEvent < SyncPropertiesChangeEventArgs > { } public export abstract class UiDataProvider { /** Called by UI to inform data provider of changes. */ public processChangesInUi ( _properties ) { throw ( new Error ( "Derived UiDataProvider must implement this method to apply changes to a bulk set of properties." ) ) ; } /** Get Sync UI Control Properties Event */ public onSyncPropertiesChangeEvent = new SyncPropertiesChangeEvent ( ) ; public onItemsReloadedEvent = new BeUiEvent < void > ( ) ; /** Called by UI to validate a property value */ public validateProperty ( _item ) { return { status : PropertyChangeStatus . Success } ; } /** Called to sync properties synchronously if a UiDataProvider is active for the UI */ public syncProperties ( syncProperties ) { this . fireSyncPropertiesEvent ( syncProperties ) ; } /** Called to inform listener that the UiDataProvider has updated values for the UI */ public fireSyncPropertiesEvent ( syncProperties ) { this . onSyncPropertiesChangeEvent . emit ( { properties : syncProperties } ) ; } /** Called to inform listeners that new properties are ready for display in UI.
     */ public fireItemsReloadedEvent ( ) { this . onItemsReloadedEvent . emit ( ) ; } /** 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.
     */ public supplyAvailableProperties ( ) { throw ( new Error ( "Derived UiDataProvider that want to use DialogPropertyItems must implement this method. Not for use with dynamic UI controls." ) ) ; } } public export interface SyncPropertiesChangeEventArgs { properties : DialogPropertySyncItem [ ] ; } public export enum PropertyChangeStatus { /** Property Change(s) Succeeded */ Success = 0 , /** Error Processing Property Change(s) */ Error = 2 } public export interface PropertyChangeResult { errorMsg ? : string ; status : PropertyChangeStatus ; }