Widget<TSettings>
Defined in: js-api/src/widgets/base.ts:265
Base class for controls that have a visual root and a set of properties.
Extended by
DomainGridColumnGridDartWidgetFilterFuncCallEditorDropDownViewBaseViewerSketcherBaseSketcher
Type Parameters
| Type Parameter | Default type |
|---|---|
TSettings | any |
Constructors
Constructor
new Widget<
TSettings>(widgetRoot):Widget<TSettings>
Defined in: js-api/src/widgets/base.ts:284
Parameters
| Parameter | Type |
|---|---|
widgetRoot | HTMLElement |
Returns
Widget<TSettings>
Constructs
Widget and initializes its root.
Properties
| Property | Modifier | Type | Default value | Description | Defined in |
|---|---|---|---|---|---|
_functions | protected | Func[] | [] | - | js-api/src/widgets/base.ts:277 |
_properties | protected | Property[] | [] | - | js-api/src/widgets/base.ts:276 |
_root | protected | HTMLElement | undefined | - | js-api/src/widgets/base.ts:275 |
dart | public | any | undefined | - | js-api/src/widgets/base.ts:280 |
factory | public | Func | null | null | Constructor function. No parameters, returns [Widget]. | js-api/src/widgets/base.ts:273 |
isDetached | public | boolean | false | - | js-api/src/widgets/base.ts:281 |
props | public | TSettings & ObjectPropertyBag | undefined | - | js-api/src/widgets/base.ts:278 |
subs | public | Subscription[] | undefined | - | js-api/src/widgets/base.ts:279 |
temp | public | any | undefined | Contains auxiliary information | js-api/src/widgets/base.ts:270 |
Accessors
aiDescription
Get Signature
get aiDescription():
string|null
Defined in: js-api/src/widgets/base.ts:340
A short AI-facing briefing: what this widget is, what its functions do, and how the assistant should approach it (e.g. which getFunctions entries to call first). Shown to the AI assistant as part of the workspace context.
Returns
string | null
Set Signature
set aiDescription(
x):void
Defined in: js-api/src/widgets/base.ts:341
Parameters
| Parameter | Type |
|---|---|
x | string | null |
Returns
void
children
Get Signature
get children():
Widget<any>[]
Defined in: js-api/src/widgets/base.ts:362
Parent widget up the DOM tree, or null.
Returns
Widget<any>[]
parent
Get Signature
get parent():
Widget<any> |null
Defined in: js-api/src/widgets/base.ts:359
Parent widget up the DOM tree, or null.
Returns
Widget<any> | null
root
Get Signature
get root():
HTMLElement
Defined in: js-api/src/widgets/base.ts:366
Widget's visual root.
Returns
HTMLElement
Set Signature
set root(
r):void
Defined in: js-api/src/widgets/base.ts:367
Parameters
| Parameter | Type |
|---|---|
r | HTMLElement |
Returns
void
type
Get Signature
get type():
string
Defined in: js-api/src/widgets/base.ts:267
Returns
string
Methods
apply()
apply(
properties):Widget
Defined in: js-api/src/widgets/base.ts:318
Parameters
| Parameter | Type | Description |
|---|---|---|
properties | object | - |
Returns
Widget
detach()
detach():
void
Defined in: js-api/src/widgets/base.ts:371
Gets called when a widget is detached and will no longer be used. Typically used for unsubscribing from events. Be sure to call super.detach() if this method is overridden.
Returns
void
getDartProperties()
getDartProperties():
any[]
Defined in: js-api/src/widgets/base.ts:347
Returns
any[]
getFunctions()
getFunctions():
Func[]
Defined in: js-api/src/widgets/base.ts:333
Functions that are applicable to this particular widget. Used in the UI to display context actions, and for the AI integrations.
Returns
Func[]
getProperties()
getProperties():
Property[]
Defined in: js-api/src/widgets/base.ts:329
Returns all properties of this widget.
Returns
Property[]
getWidgetStatus()
getWidgetStatus():
IWidgetStatus
Defined in: js-api/src/widgets/base.ts:418
Returns the widget's runtime structure for automated testing and introspection.
Returns
onEvent()
onEvent(
eventId?):Observable<any>
Defined in: js-api/src/widgets/base.ts:415
Observes events with the specified eventId. Override in subclasses to provide actual events.
Parameters
| Parameter | Type | Default value |
|---|---|---|
eventId | string | null | null |
Returns
Observable<any>
onFrameAttached()
onFrameAttached(
dataFrame):void
Defined in: js-api/src/widgets/base.ts:353
Parameters
| Parameter | Type |
|---|---|
dataFrame | DataFrame |
Returns
void
onPropertyChanged()
onPropertyChanged(
property):void
Defined in: js-api/src/widgets/base.ts:345
Gets called when viewer's property is changed.
Parameters
| Parameter | Type | Description |
|---|---|---|
property | Property | null | or null, if multiple properties were changed. |
Returns
void
sourceRowsChanged()
sourceRowsChanged():
void
Defined in: js-api/src/widgets/base.ts:351
Returns
void
sub()
sub(
subscription):void
Defined in: js-api/src/widgets/base.ts:311
Registers a subscription to an external event.
Parameters
| Parameter | Type | Description |
|---|---|---|
subscription | Subscription | - |
Returns
void
toDart()
toDart():
any
Defined in: js-api/src/widgets/base.ts:303
Returns
any
find()
staticfind(root):Widget<any> |null
Defined in: js-api/src/widgets/base.ts:299
Finds existing widget from its visual root.
Parameters
| Parameter | Type |
|---|---|
root | Element |
Returns
Widget<any> | null
fromRoot()
staticfromRoot(root):Widget
Defined in: js-api/src/widgets/base.ts:421
Creates a new widget from the root element.
Parameters
| Parameter | Type |
|---|---|
root | HTMLElement |
Returns
Widget
getAll()
staticgetAll():Widget<any>[]
Defined in: js-api/src/widgets/base.ts:294
Returns all currently active widgets.
Returns
Widget<any>[]