Skip to content
On this page

@bridge/windows

Module that provides access to bridge's window system.

Variables

BaseWindow

Const BaseWindow: any

link https://github.com/bridge-core/editor/blob/main/src/components/Windows/BaseWindow.ts

Functions

createConfirmWindow

createConfirmWindow(displayContent, confirmText, cancelText, onConfirm, onCancel): void

Creates a confirm window and displays it.

Parameters

NameTypeDescription
displayContentstringText content of the window.
confirmTextstringText to show on the confirm button.
cancelTextstringText to show on the cancel button.
onConfirm() => voidCallback to run when the confirm button is pressed.
onCancel() => voidCallback to run when the cancel button is pressed.

Returns

void


createDropdownWindow

createDropdownWindow(displayName, placeholder, options, defaultSelected, onConfirm): void

Creates a new dropdown window and displays it.

Parameters

NameTypeDescription
displayNamestringTitle of the window.
placeholderstringPlaceholder text of the dropdown input.
optionsstring[]List of options to be available in the dropdown.
defaultSelectedstringThe value from 'options' that should be selected by default.
onConfirm(input: string) => voidCallback to run when the confirm button is pressed.

Returns

void


createInformationWindow

createInformationWindow(displayName, displayContent): void

Creates a new information window and displays it.

Parameters

NameTypeDescription
displayNamestringTitle of the window.
displayContentstringText content of the window.

Returns

void


createInputWindow

createInputWindow(displayName, inputLabel, defaultValue, onConfirm, expandText?): void

Create a new input window and displays it.

Parameters

NameTypeDescription
displayNamestringTitle of the window.
inputLabelstringLabel to show on the input.
defaultValuestringDefault value of the input.
onConfirm(input: string) => voidCallback to run when the confirm button is pressed.
expandText?stringText to append to the input.

Returns

void


createWindow

createWindow(vueComponent, state): any

deprecated Calling "createWindow" is deprecated. Please replace direct function calls by defining a class based window instead.

Parameters

NameType
vueComponentany
stateRecord<string, unknown>

Returns

any

Released under the GPL-3.0 License.