Class: Widget

(abstract) Help4.widget.Widget(derivedopt)

Basic widget class.

Constructor

(abstract) new Widget(derivedopt)

Parameters:
Name Type Attributes Description
derived Help4.jscore.ControlBase.Params <optional>
Properties:
Name Type Attributes Description
__visible boolean
_context Help4.widget.Widget.Context
_contextTS number <nullable>
_descriptor Help4.widget.Widget.Descriptor
_eventBusObserver Help4.observer.EventBusObserver
_eventStatus Object
_state Help4.BinaryStorage
_toBeActivated boolean
Source:

Extends

Methods

(protected) ____defineDataFunctions()

Overrides:
Source:

(protected) ____defineProperties(params, derivedopt, nullable)

Parameters:
Name Type Attributes Default Description
params Object
derived Object <optional>
<nullable>
null
Properties
Name Type Description
GET Object
SET Object
Overrides:
Source:

(protected) ____defineProperty(args)

Parameters:
Name Type Description
args Object
Properties
Name Type Attributes Default Description
type string <optional>
'param' for Help4.jscore.DataBase
key string
info Help4.jscore.ControlBase.Param
funGet Help4.jscore.ControlBase.FunGet
funSet Help4.jscore.ControlBase.FunSet
Overrides:
Source:

(protected) ____defineStaticProperties()

auto define all to be cleaned properties
Overrides:
Source:
Throws:
Error

(protected) ____extendParams(dest, src) → {Object}

Parameters:
Name Type Description
dest Object
src Object
Overrides:
Source:
Returns:
Type
Object

(protected) ____getClassConfig() → {Help4.jscore.Base.Params}

Overrides:
Source:
Returns:
Type
Help4.jscore.Base.Params

(protected) ____getData() → {Object}

Overrides:
Source:
Returns:
Type
Object

(protected) ____mergeDerivedParams(level0, level1)

Parameters:
Name Type Description
level0 Help4.jscore.Base.Params
level1 Help4.jscore.Base.Params
Overrides:
Source:
Throws:
Error

(protected) ____resolveDerivedParams(classConfig)

Parameters:
Name Type Description
classConfig Help4.jscore.Base.Params
Overrides:
Source:

(protected) ____setInitValue(args)

Parameters:
Name Type Description
args Object
Properties
Name Type Description
key string
info Help4.jscore.ControlBase.Param
params Object
funSet Help4.jscore.ControlBase.FunSet
Overrides:
Source:

(protected) _cleanInfobar()

Source:

(protected) _destroyControl(…keys)

destroys class properties
Parameters:
Name Type Attributes Description
keys string <repeatable>
Overrides:
Source:

(protected) _fireEvent(event) → {Help4.jscore.Base}

fires an event that can be observed from outside
Parameters:
Name Type Description
event Object the event to be fired
Overrides:
Source:
Returns:
Type
Help4.jscore.Base

(async, protected) _fireEvent2(event) → {Promise.<Array.<Help4.EmbeddedEvent.EventResponse>>}

fires an event that can be observed from outside
Parameters:
Name Type Description
event Object the event to be fired
Overrides:
Source:
Returns:
Type
Promise.<Array.<Help4.EmbeddedEvent.EventResponse>>

(protected) _fireEventSync(event) → {Array.<Help4.EmbeddedEvent.EventResponse>}

fires an event that can be observed from outside
Parameters:
Name Type Description
event Object the event to be fired
Overrides:
Source:
Returns:
Type
Array.<Help4.EmbeddedEvent.EventResponse>

(protected) _fulltextMatchesHtml(fulltext, html) → {boolean}

for use with filter: checks whether the given fulltext matches a HTML
Parameters:
Name Type Description
fulltext string
html string
Source:
Returns:
Type
boolean

(protected) _fulltextMatchesText(fulltext, text) → {boolean}

for use with filter: checks whether the given fulltext matches a text
Parameters:
Name Type Description
fulltext string
text string
Source:
Returns:
Type
boolean

(async, protected) _onAfterActivate(dataopt) → {Promise.<void>}

Parameters:
Name Type Attributes Default Description
data Object <optional>
null
Source:
Returns:
Type
Promise.<void>

(async, protected) _onAfterDeactivate(dataopt) → {Promise.<void>}

Parameters:
Name Type Attributes Default Description
data * <optional>
null
Source:
Returns:
Type
Promise.<void>

(async, protected) _onAfterDestroy() → {Promise.<void>}

Source:
Returns:
Type
Promise.<void>

(async, protected) _onAfterInit() → {Promise.<void>}

Source:
Returns:
Type
Promise.<void>

(async, protected) _onAfterStart() → {Promise.<void>}

Source:
Returns:
Type
Promise.<void>

(async, protected) _onAfterStop() → {Promise.<void>}

Source:
Returns:
Type
Promise.<void>

(async, protected) _onBeforeActivate(dataopt) → {Promise.<(boolean|void)>}

Parameters:
Name Type Attributes Default Description
data Object <optional>
null
Source:
Returns:
Type
Promise.<(boolean|void)>

(async, protected) _onBeforeDeactivate(dataopt) → {Promise.<(boolean|void)>}

Parameters:
Name Type Attributes Default Description
data * <optional>
null
Source:
Returns:
Type
Promise.<(boolean|void)>

(async, protected) _onBeforeDestroy() → {Promise.<(boolean|void)>}

Source:
Returns:
Type
Promise.<(boolean|void)>

(async, protected) _onBeforeInit() → {Promise.<(boolean|void)>}

Source:
Returns:
Type
Promise.<(boolean|void)>

(async, protected) _onBeforeStart() → {Promise.<(boolean|void)>}

Source:
Returns:
Type
Promise.<(boolean|void)>

(async, protected) _onBeforeStop() → {Promise.<(boolean|void)>}

Source:
Returns:
Type
Promise.<(boolean|void)>

(async, protected) _onContextAvailable() → {Promise.<void>}

Source:
Returns:
Type
Promise.<void>

(async, protected) _onControllerClose() → {Promise.<void>}

Source:
Returns:
Type
Promise.<void>

(async, protected) _onControllerEditMode(value) → {Promise.<void>}

Parameters:
Name Type Description
value boolean
Source:
Returns:
Type
Promise.<void>

(async, protected) _onControllerOpen() → {Promise.<void>}

Source:
Returns:
Type
Promise.<void>

(async, protected) _onControllerPlaybackActive(value) → {Promise.<void>}

Parameters:
Name Type Description
value boolean
Source:
Returns:
Type
Promise.<void>

(async, abstract, protected) _onGetDescriptor() → {Promise.<Help4.widget.Widget.Descriptor>}

Source:
Throws:
Error
Returns:
Type
Promise.<Help4.widget.Widget.Descriptor>

(async, protected) _onPropertyChange(event) → {Promise.<void>}

Parameters:
Name Type Description
event Help4.jscore.ControlBase.PropertyChangeEvent the change event
Source:
Returns:
Type
Promise.<void>

(async, protected) _onSerialize() → {Promise.<(Help4.widget.Widget.SerializedData|false)>}

Source:
Returns:
Type
Promise.<(Help4.widget.Widget.SerializedData|false)>

(async, protected) _onSystemNavigate() → {Promise.<void>}

Source:
Returns:
Type
Promise.<void>

(async, protected) _onWidgetActivate(widget) → {Promise.<void>}

Parameters:
Name Type Description
widget Help4.widget.Widget
Source:
Returns:
Type
Promise.<void>

(async, protected) _onWidgetDeactivate(widget, dataopt) → {Promise.<void>}

Parameters:
Name Type Attributes Description
widget Help4.widget.Widget
data * <optional>
Source:
Returns:
Type
Promise.<void>

(async, protected) _onWidgetInvisible(widget) → {Promise.<void>}

Parameters:
Name Type Description
widget Help4.widget.Widget
Source:
Returns:
Type
Promise.<void>

(async, protected) _onWidgetStart(widget) → {Promise.<void>}

Parameters:
Name Type Description
widget Help4.widget.Widget
Source:
Returns:
Type
Promise.<void>

(async, protected) _onWidgetStop(widget) → {Promise.<void>}

Parameters:
Name Type Description
widget Help4.widget.Widget
Source:
Returns:
Type
Promise.<void>

(async, protected) _onWidgetVisible(widget) → {Promise.<void>}

Parameters:
Name Type Description
widget Help4.widget.Widget
Source:
Returns:
Type
Promise.<void>

(async) activate(dataopt) → {Promise.<void>}

Parameters:
Name Type Attributes Default Description
data Object <optional>
null
Source:
Returns:
Type
Promise.<void>

addListenerSync(eventType, listener) → {Help4.jscore.Base}

add an event listener
Parameters:
Name Type Description
eventType string | Array.<string> event type to be observed
listener Help4.EmbeddedEvent.Listener the callback function
Overrides:
Source:
Returns:
Type
Help4.jscore.Base

awaitActivated() → {Promise.<boolean>}

Source:
Returns:
Type
Promise.<boolean>

awaitStarted() → {Promise.<boolean>}

Source:
Returns:
Type
Promise.<boolean>

(async) deactivate(dataopt) → {Promise.<void>}

Parameters:
Name Type Attributes Default Description
data * <optional>
null
Source:
Returns:
Type
Promise.<void>

(async) destroy() → {Promise.<void>}

Overrides:
Source:
Returns:
Type
Promise.<void>

(async) filter(search) → {Promise.<Array.<Help4.widget.Widget.SearchResult>>}

used to retrieve filter results
Parameters:
Name Type Description
search Help4.widget.Widget.SearchFilter
Source:
Returns:
Type
Promise.<Array.<Help4.widget.Widget.SearchResult>>

focus()

accessibility: implement to all to focus the current widget
Source:

focusListItem(direction)

accessibility: implement to all to focus the list item tile using up/down arrow keys
Parameters:
Name Type Description
direction string
Source:

getContext() → {Help4.widget.Widget.Context}

returns system context
Source:
Returns:
Type
Help4.widget.Widget.Context

getDescriptor() → {Help4.widget.Widget.Descriptor}

returns widget descriptor
Source:
Returns:
Type
Help4.widget.Widget.Descriptor

(abstract) getName() → {string}

Source:
Returns:
unique name of widget
Type
string

(async) getTexts() → {Promise.<?Object>}

used to retrieve a list of all visible texts for the current widget
Source:
Returns:
Type
Promise.<?Object>

isActive() → {boolean}

returns whether widget is active
Source:
Returns:
Type
boolean

isDestroyed() → {boolean}

whether instance is destroyed
Overrides:
Source:
Returns:
Type
boolean

isStarted() → {boolean}

returns whether widget is started
Source:
Returns:
Type
boolean

isVisible() → {boolean}

returns whether widget is visible
Source:
Returns:
Type
boolean

(async) redraw() → {Promise.<void>}

called when each widget should consider to redraw itself
Source:
Returns:
Type
Promise.<void>

registerPanel(panelnullable)

registers the panel instance within this widget
Parameters:
Name Type Attributes Description
panel Help4.control2.bubble.Panel <nullable>
Source:

(async) serialize() → {Promise.<(Help4.widget.Widget.SerializedStatus|false)>}

Source:
Returns:
Type
Promise.<(Help4.widget.Widget.SerializedStatus|false)>

(async) setTexts(texts) → {Promise.<void>}

used to replace all visible texts for the current widget
Parameters:
Name Type Description
texts Object
Source:
Returns:
Type
Promise.<void>

(async) start() → {Promise.<void>}

Source:
Returns:
Type
Promise.<void>

(async) stop(forceopt) → {Promise.<void>}

Parameters:
Name Type Attributes Default Description
force boolean <optional>
false
Source:
Returns:
Type
Promise.<void>

(async) updateData() → {Promise.<void>}

Source:
Returns:
Type
Promise.<void>

Type Definitions

Context

Type:
  • Object
Properties:
Name Type Attributes Description
controller Help4.controller.Controller
eventBus Help4.EventBus
panel Help4.control2.bubble.Panel <nullable>
configuration Help4.typedef.SystemConfiguration <nullable>
engine Object
Properties
Name Type Attributes Description
domRefreshEngine Help4.engine.DomRefreshEngine <nullable>
crossOriginEngine Help4.engine.crossorigin.CoreEngine <nullable>
service Object
Properties
Name Type Attributes Description
playbackService Help4.service.recording.PlaybackService <nullable>
playbackCacheService Help4.service.recording.PlaybackCacheService <nullable>
crossOriginService Help4.service.CrossOriginMessageService <nullable>
conditionService Help4.service.ConditionService
infobarService Help4.service.InfobarService
lightboxService Help4.service.LightboxService
hotkey Help4.service.HotkeyService
widget Object
Source:

Descriptor

Type:
  • Object
Properties:
Name Type Attributes Description
id string widget id
enabled boolean whether widget is enabled
showPanel boolean whether this widget needs the panel
requires Help4.widget.Requirement.Requirements <optional>
requirements for widget start
autostart Array.<string> <optional>
autostart this widget of all listed ones are started
tile Object <optional>
tile descriptor (for panel)
Properties
Name Type Attributes Description
position number <optional>
position in panel; works as categories. if more than one widget has the same position they will share that space
text string <optional>
text of the widget tile
title string <optional>
title of the widget tile
icon Help4.control2.ICONS | string <optional>
icon of the widget tile
color Help4.widget.COLOR | string <optional>
color of the widget tile; Help4.widget.COLOR
visible boolean <optional>
whether the tile is visible
Source:

Event

Type:
  • Object
Properties:
Name Type Attributes Description
type string event type
engine Help4.widget.Widget widget engine
value * any data to be transferred
data * any data to be transferred
descriptor Object <optional>
additional widget information
Source:

SearchFilter

Type:
  • Object
Source:

SearchResult

// generic
Type:
  • Object
Source:

SerializedData

Type:
  • Object
Properties:
Name Type Attributes Description
full * <optional>
interaction * <optional>
Source:

SerializedStatus

Type:
  • Object
Properties:
Name Type Description
full Object
Properties
Name Type Description
name string
started boolean
active boolean
visible boolean
data *
interaction Object
Properties
Name Type Description
name string
data *
Source: