Appearance
ModulesPanelTabApi
Version Availability
This interface is available starting from v3.7.0
API interface for Modules Panel Tab implementations.
typescript
interface ModulesPanelTabApi extends BaseApi, BaseModifierApiDescription
The ModulesPanelTabApi provides access to editor functionalities specifically for ModulesPanelTab instances. It extends BaseApi and BaseModifierApi to support UI element management, translation, and document modifications.
Import
typescript
import { ModulesPanelTabApi } from '@stripoinc/ui-editor-extensions';Inheritance
- Extends: BaseApi, BaseModifierApi
Methods
setVisibility()
Sets the visibility of a specific UI element within the tab's scope.
typescript
setVisibility(uiElementName: string, isVisible: boolean): voidParameters
| Name | Type | Description |
|---|---|---|
| uiElementName | string | ID of the UI element to show/hide |
| isVisible | boolean | True to show the element, false to hide it |
setUIEAttribute()
Sets a specific attribute on a target UI element within the tab's scope.
typescript
setUIEAttribute(uiElementName: string, attribute: string, value: unknown): voidParameters
| Name | Type | Description |
|---|---|---|
| uiElementName | string | ID of the target UI element |
| attribute | string | Attribute name (use values from UEAttr) |
| value | unknown | Attribute value |
updateValues()
Updates the values of multiple UI elements within the tab's scope at once.
typescript
updateValues(valuesMap: Record<string, unknown>): voidParameters
| Name | Type | Description |
|---|---|---|
| valuesMap | Record<string, unknown> | UI element IDs mapped to their new values |
getValues()
Returns the current values of all UI elements managed by this tab.
typescript
getValues(): Record<string, unknown>Returns
Record<string, unknown> - Current values keyed by UI element ID
onValueChanged()
Registers a callback function to be invoked when the value of a specific UI element changes.
typescript
onValueChanged(
uiElementName: string,
callback: (newValue: unknown, oldValue: unknown) => void
): voidParameters
| Name | Type | Description |
|---|---|---|
| uiElementName | string | ID of the UI element to listen to |
| callback | (newValue: unknown, oldValue: unknown) => void | Callback for value changes |