packageDocumentation module import { BeUiEvent } from "@itwin/core-bentley" ; import { AbstractMenuItemProps } from "./items/AbstractMenuItemProps" ; import { AbstractToolbarProps } from "./items/AbstractToolbarProps" ; import { RelativePosition } from "./items/RelativePosition" ; import { PropertyDescription } from "./properties/Description" ; import { Primitives } from "./properties/PrimitiveTypes" ; import { OnCancelFunc , OnItemExecutedFunc , OnNumberCommitFunc , OnValueCommitFunc } from "./utils/callbacks" ; import { PropertyRecord } from "./properties/Record" ; import { UiDataProvider } from "./dialogs/UiDataProvider" ; import { DialogLayoutDataProvider } from "./dialogs/UiLayoutDataProvider" ; import { PointProps } from "./utils/PointProps" ; import { loggerCategory } from "./utils/misc" ; import { MessagePresenter } from "./notification/MessagePresenter" ; import { UiError } from "./utils/UiError" ; public export interface GenericUiEventArgs { uiComponentId : string ; } public export interface DialogProps { /** Indicates whether the user can resize dialog with cursor. */ resizable ? : boolean ; /** Indicates whether the user can move dialog with cursor.*/ movable ? : boolean ; /** Initial width of dialog. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. */ width ? : string | number ; /** Initial height of dialog. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. */ height ? : string | number ; /** Minimum width that the dialog may be resized to. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. */ minWidth ? : string | number ; /** Minimum height that the dialog may be resized to. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. */ minHeight ? : string | number ; /** Maximum width that the dialog may be resized to. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. */ maxWidth ? : string | number ; /** Maximum height that the dialog may be resized to. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. */ maxHeight ? : string | number ; } public export class GenericUiEvent extends BeUiEvent < GenericUiEventArgs > { } public export interface UiFlags { /** if true then Ctrl+F2 will show popup key-in palette */ allowKeyinPalette ? : boolean ; } public export class UiAdmin { private _featureFlags : UiFlags = { } ; private static _messagePresenter ? : MessagePresenter ; /** The MessagePresenter used to display messages. */ public static get messagePresenter ( ) : MessagePresenter { if ( ! UiAdmin . _messagePresenter ) throw new UiError ( loggerCategory ( this ) , "UiAdmin.messagePresenter not set" ) ; return UiAdmin . _messagePresenter ; } public static set messagePresenter ( mp ) { UiAdmin . _messagePresenter = mp ; } public get featureFlags ( ) : UiFlags { return { ... this . _featureFlags } ; } public updateFeatureFlags ( uiFlags ) { this . _featureFlags = { ... this . _featureFlags , ... uiFlags } ; } internal public onInitialized ( ) { } /** Get the cursor X and Y position. */ public get cursorPosition ( ) : PointProps { return { x : 0 , y : 0 } ; } /** Create a PointProps object. */ public createXAndY ( x , y ) { return { x , y } ; } /** Determines if focus is set to Home */ public get isFocusOnHome ( ) : boolean { return false ; } /** Sets focus to Home */ public setFocusToHome ( ) { } param _menuItemsProps param _location param _htmlElement return public showContextMenu ( _menuItemsProps , _location , _htmlElement ? ) { return false ; } param _toolbarProps param _location param _offset param _onItemExecuted param _onCancel param _relativePosition param _htmlElement return public showToolbar ( _toolbarProps , _location , _offset , _onItemExecuted , _onCancel , _relativePosition ? , _htmlElement ? ) { return false ; } /** Hides the toolbar. */ public hideToolbar ( ) { return false ; } param _id param _menuItemsProps param _location param _htmlElement return public showMenuButton ( _id , _menuItemsProps , _location , _htmlElement ? ) { return false ; } param _id return public hideMenuButton ( _id ) { return false ; } param _initialValue param _resultIcon param _location param _onCommit param _onCancel param _htmlElement return public showCalculator ( _initialValue , _resultIcon , _location , _onCommit , _onCancel , _htmlElement ? ) { return false ; } /** Hides the calculator. */ public hideCalculator ( ) { return false ; } param _initialValue param _location param _onCommit param _onCancel param _htmlElement return public showAngleEditor ( _initialValue , _location , _onCommit , _onCancel , _htmlElement ? ) { return false ; } param _initialValue param _location param _onCommit param _onCancel param _htmlElement return public showLengthEditor ( _initialValue , _location , _onCommit , _onCancel , _htmlElement ? ) { return false ; } param _initialValue param _location param _onCommit param _onCancel param _htmlElement return public showHeightEditor ( _initialValue , _location , _onCommit , _onCancel , _htmlElement ? ) { return false ; } param _initialValue param _propertyDescription param _location param _onCommit param _onCancel param _htmlElement return public showInputEditor ( _initialValue , _propertyDescription , _location , _onCommit , _onCancel , _htmlElement ? ) { return false ; } /** Hides the input editor. */ public hideInputEditor ( ) { return false ; } param _displayElement param _location param _offset param _onCancel param _relativePosition param _anchorElement return public showHTMLElement ( _displayElement , _location , _offset , _onCancel , _relativePosition ? , _anchorElement ? ) { return false ; } /** Hides the HTML Element. */ public hideHTMLElement ( ) { return false ; } param _content param _title param _toolbarProps param _location param _offset param _onItemExecuted param _onCancel param _relativePosition param _anchorElement return public showCard ( _content , _title , _toolbarProps , _location , _offset , _onItemExecuted , _onCancel , _relativePosition ? , _anchorElement ? ) { return false ; } /** Hides the Card. */ public hideCard ( ) { return false ; } param _dataProvider param _location param _offset param _onCancel param _relativePosition param _anchorElement return public openToolSettingsPopup ( _dataProvider , _location , _offset , _onCancel , _relativePosition ? , _anchorElement ? ) { return false ; } /** Closes the Tool Settings Ui popup. */ public closeToolSettingsPopup ( ) { return false ; } param _htmlElement return public showKeyinPalette ( _htmlElement ? ) { return false ; } /** Hides the Keyin Palette. */ public hideKeyinPalette ( ) { return false ; } /** Send a UI event */ public static sendUiEvent ( args ) { UiAdmin . onGenericUiEvent . emit ( args ) ; } /** GenericUiEvent  */ public static readonly onGenericUiEvent = new GenericUiEvent ( ) ; param _uiDataProvider param _title param _isModal param _id param _optionalProps return public openDialog ( _uiDataProvider , _title , _isModal , _id , _optionalProps ? ) { return false ; } /** Closes the Dialog with a given Id. */ public closeDialog ( _dialogId ) { return false ; } }