MessageManager Class

The MessageManager class manages messages and prompts. It is used by the AppNotificationManager class.

Methods

Name Description
constructor(): MessageManager    
addMessage(message: NotifyMessageDetailsType): void Static Output a message and/or alert to the user.  
addToMessageCenter(message: NotifyMessageDetailsType): void Static Add a message to the Message Center.  
clearMessages(): void Static Clear the message list.  
displayInputFieldMessage(target: HTMLElement, messageText: MessageType, detailedMessage: MessageType"", priority: OutputMessagePriorityOutputMessagePriority.Error): void Static Displays an input field message near target element.  
displayMessage(message: NotifyMessageDetailsType, options?: ToastOptions, settings?: [settings]): undefined | { close: () => void } Static Display a message.  
endActivityMessage(isCompleted: boolean): boolean Static Dismisses current ActivityMessage and ends activity if canceled.  
getIconClassName(details: NotifyMessageDetailsType): string Static Gets an icon CSS class name based on a given NotifyMessageDetailsType. Deprecated  
getIconSpecFromDetails(details: NotifyMessageDetailsType): IconSpec Static Extracts the message severity from the message details and returns the corresponding React icon. Deprecated  
getIconType(details: NotifyMessageDetailsType): MessageBoxIconType Static Gets a MessageBoxIconType based on a given NotifyMessageDetailsType.  
getSeverity(details: NotifyMessageDetailsType): MessageSeverity Static Gets a MessageSeverity based on a given NotifyMessageDetailsType.  
hideInputFieldMessage(): void Static Hides the currently displayed input field message.  
openMessageBox(mbType: MessageBoxType, message: MessageType, icon: MessageBoxIconType): Promise<MessageBoxValue> Static Output a MessageBox and wait for response from the user.  
openMessageCenter(): void Static Opens message center.  
openToolTip(htmlElement: HTMLElement, message: MessageType, location?: Readonly<WritableXAndY>, options?: ToolTipOptions): void Static Show a tooltip window.  
outputActivityMessage(message: MessageType, percentComplete: number): boolean Static Output an activity message to the user.  
outputMessage(message: NotifyMessageDetailsType): void Static Output a message and/or alert to the user.  
outputPrompt(prompt: string): void Static Output a prompt to the user.  
registerAnimateOutToElement(element: "null" | HTMLElement): void Static Set the element where messages should be animated out to on exit.  
setMaxCachedMessages(max: number): void Static Set the maximum number of cached message.  
setToolAssistance(instructions: ToolAssistanceInstructions): void Static Setup tool assistance instructions for a tool.  
setupActivityMessageDetails(details: ActivityMessageDetails): boolean Static Sets details for setting up an Activity message.  
setupActivityMessageValues(message: MessageType, percentage: number, restored?: boolean): boolean Static Sets values on _OngoingActivityMessage to be referenced when displaying  
updateMessages(): void Static Update the message list.  

Properties

Name Type Description
activeMessageManager Accessor Static ReadOnly Manager of active messages.  
maxDisplayedStickyMessages Accessor Static number The maximum number of displayed Sticky messages.  
messages Accessor Static ReadOnly ReadonlyArray<NotifyMessageDetailsType> List of messages as NotifyMessageDetailsType.  
onActivityMessageCancelledEvent Static Readonly ActivityMessageCancelledEvent The ActivityMessageCancelledEvent is fired when an Activity message is cancelled via  
onActivityMessageUpdatedEvent Static Readonly ActivityMessageUpdatedEvent The ActivityMessageUpdatedEvent is fired when an Activity message updates via outputActivityMessage().  
onInputFieldMessageAddedEvent Static Readonly InputFieldMessageAddedEvent    
onInputFieldMessageRemovedEvent Static Readonly InputFieldMessageRemovedEvent    
onMessageAddedEvent Static Readonly MessageAddedEvent The MessageAddedEvent is fired when a message is added via outputMessage().  
onMessagesUpdatedEvent Static Readonly MessagesUpdatedEvent The MessagesUpdatedEvent is fired when a message is added or the messages are cleared.  
onOpenMessageCenterEvent Static Readonly OpenMessageCenterEvent    
onToolAssistanceChangedEvent Static Readonly ToolAssistanceChangedEvent The ToolAssistanceChangedEvent is fired when a tool calls IModelApp.notifications.setToolAssistance().  

Defined in

Last Updated: 17 December, 2024