Class: View

Help4.widget.tour.View(params)

Tour playback for tour widget.

Constructor

new View(params)

Parameters:
Name Type Description
params Help4.widget.tour.View.Params
Properties:
Name Type Attributes Description
__widget Help4.widget.tour.Widget
__projectId string
__catalogueKey Help4.widget.help.CatalogueKeys
__project Help4.widget.help.Project
__whatsnew boolean
__startAt string <nullable>
__startAfter string <nullable>
__history string <nullable>
_step number <nullable>
_status Object
_history Help4.History
_hotspotController Help4.widget.tour.HotspotController <nullable>
_bubbleController Help4.widget.tour.BubbleController <nullable>
_observer Help4.widget.tour.Observer <nullable>
_lastAutoProgress number
_domRefreshExecutor function
_windowObserver Help4.observer.WindowObserver
_eventBusObserver Help4.observer.EventBusObserver
Source:

Extends

Members

_bubbleController :Help4.widget.tour.BubbleController

Type:
Source:

_hotspotController :Help4.widget.tour.HotspotController

Type:
Source:

_observer :Help4.widget.tour.Observer

Type:
Source:

virtualArea :Help4.control2.AreaXYWH

Type:
Source:

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) _applyPropertyToDom(event)

is called on data changes of my control should be used to apply this changes to my DOM
Parameters:
Name Type Description
event Help4.jscore.ControlBase.PropertyChangeEvent the change event
Overrides:
Source:

(protected) _applyTextAttribute(node, textId, value)

used to support text extraction and replacement
Parameters:
Name Type Default Description
node HTMLElement
textId string
value boolean true
Overrides:
Source:

(protected) _createControl(object, params) → {Help4.control2.Control}

Parameters:
Name Type Description
object function
params Help4.control2.Control.Params
Overrides:
Source:
Returns:
Type
Help4.control2.Control

(protected) _createElement(tagName, params) → {HTMLElement}

creates a new DOM element within my control's DOM
Parameters:
Name Type Description
tagName string tag name of new DOM element
params Object additional parameters
Overrides:
Source:
Returns:
Type
HTMLElement

(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) _onAfterInit(params)

called after init
Parameters:
Name Type Description
params Help4.widget.tour.View.Params same params as provided to the constructor
Overrides:
Source:

(protected) _onDomAttached(dom)

called once the DOM node is attached
Parameters:
Name Type Description
dom HTMLElement control DOM
Overrides:
Source:

(protected) _onDomAvailable(dom)

called once the DOM node is available but not yet attached
Parameters:
Name Type Description
dom HTMLElement
Overrides:
Source:

(protected) _onDomFocussed(dom)

called once the DOM's event listeners are attached and the DOM's automatic focus is applied
Parameters:
Name Type Description
dom HTMLElement control DOM
Overrides:
Source:

(protected) _onDragMove()

called on every move of the control during drag & drop
Overrides:
Source:

(protected) _onDragStart()

called once the control starts drag & drop
Overrides:
Source:

(protected) _onDragStop()

called once drag & drop ends
Overrides:
Source:

(protected) _onGetDragDropParams() → {Help4.control2.DragDropParams}

called to configure drag & drop properly
Overrides:
Source:
Returns:
- allows to define specific DOM (object) and dragable area (area)
Type
Help4.control2.DragDropParams

(protected) _onReady()

called once control is completely initialized
Overrides:
Source:

(protected) _removeTextAttribute(node, …textId)

used to support text extraction and replacement
Parameters:
Name Type Attributes Description
node HTMLElement
textId string <repeatable>
Overrides:
Source:

(protected) _setTextAttribute(node, …textId)

used to support text extraction and replacement
Parameters:
Name Type Attributes Description
node HTMLElement
textId string <repeatable>
Overrides:
Source:

abort(message, appearanceopt)

aborts tour playback in case of failure
Parameters:
Name Type Attributes Default Description
message string
appearance string <optional>
'warning'
Source:

add(…params) → {Help4.control2.Control|Array.<?Help4.control2.Control>}

create controls out of parameters and add them to this container
Parameters:
Name Type Attributes Description
params Help4.control2.Control.Params <repeatable>
parameters for the to-be-created controls
Overrides:
Source:
Returns:
the added control(s)
Type
Help4.control2.Control | Array.<?Help4.control2.Control>

addCss(…classNames) → {Help4.control2.Control}

add CSS classnames to this control
Parameters:
Name Type Attributes Description
classNames string <repeatable>
class names to be added to this control's DOM
Overrides:
Source:
Returns:
Type
Help4.control2.Control

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

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

called to deal with navigation events
Source:
Returns:
Type
Promise.<void>

(async) align()

align hotspot and bubble
Source:

clean() → {Help4.control2.container.Container}

Overrides:
Source:
Returns:
Type
Help4.control2.container.Container

count() → {number}

Overrides:
Source:
Returns:
Type
number

(generator) entries()

for (const [index, control] of container.entries()) { ... }
Overrides:
Source:
Yields:
[number, Help4.control2.Control]

every(executor) → {boolean}

iterates the container
Parameters:
Name Type Description
executor Help4.typedef.EveryExecutor
Overrides:
Source:
Returns:
Type
boolean

find(controlId) → {Array.<Help4.control2.Control, number, Help4.control2.container.Container>|Array.<null, null, null>}

is able to find a control also within sub containers
Parameters:
Name Type Description
controlId string
Overrides:
Source:
Returns:
Type
Array.<Help4.control2.Control, number, Help4.control2.container.Container> | Array.<null, null, null>

focus() → {Help4.widget.tour.View}

focus the control's DOM
Overrides:
Source:
Returns:
Type
Help4.widget.tour.View

(async) focusApp() → {Promise.<boolean>}

Source:
Returns:
Type
Promise.<boolean>

forEach(executor)

iterates the container
Parameters:
Name Type Description
executor Help4.typedef.ForEachExecutor
Overrides:
Source:

get(controlId) → (nullable) {Help4.control2.Control}

Parameters:
Name Type Description
controlId * index of control in container, or control ID or metadata information
Overrides:
Source:
Returns:
Type
Help4.control2.Control

getArea() → {Help4.control2.AreaXYWH}

Overrides:
Source:
Returns:
Type
Help4.control2.AreaXYWH

getAutoProgressKeys() → (nullable) {Array.<string>}

Source:
Returns:
Type
Array.<string>

getConnectionPoints(paramsopt) → {Help4.control2.ConnectionPoints}

get possible connection points for this control
Parameters:
Name Type Attributes Description
params Object <optional>
optional parameters to be used by derived classes
Overrides:
Source:
Returns:
- points top,left,bottom,right and middle of this control
Type
Help4.control2.ConnectionPoints

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

Source:
Returns:
Type
Help4.widget.tour.Widget.Context

getControlTexts() → {Object|null}

get all texts within my DOM; they can then be used for e.g. automatic machine learning translation (MLT)
Overrides:
Source:
Throws:
Error
Returns:
Type
Object | null

getCurrentStatus() → (nullable) {Help4.widget.tour.View.HotspotStatus}

see _updateHotspotStatus
Source:
Returns:
Type
Help4.widget.tour.View.HotspotStatus

getCurrentTile() → (nullable) {Help4.widget.help.ProjectTile}

Source:
Returns:
Type
Help4.widget.help.ProjectTile

getDocument() → {Document}

deliver the document that hosts this control
Overrides:
Source:
Returns:
Type
Document

getDom(idopt) → {HTMLElement}

deliver the DOM elements that represents this control or some element inside
Parameters:
Name Type Attributes Description
id string <optional>
a possible sub-dom-id
Overrides:
Source:
Returns:
Type
HTMLElement

getHostedControls(onlyVisibleopt) → {Array.<Help4.control2.Control>}

Parameters:
Name Type Attributes Default Description
onlyVisible boolean <optional>
false deliver only currently visible controls
Overrides:
Source:
Returns:
Type
Array.<Help4.control2.Control>

getHotspotControl() → {Help4.control2.hotspot.Connected|null}

Source:
Returns:
Type
Help4.control2.hotspot.Connected | null

getIndex(controlId) → {number}

Parameters:
Name Type Description
controlId string
Overrides:
Source:
Returns:
Type
number

getMetadata(…keys) → {*}

get information from the metadata store
Parameters:
Name Type Attributes Description
keys string <repeatable>
keys to retrieve the stored meta information
Overrides:
Source:
Returns:
Type
*

getMetadataKeys() → {Array.<string>}

get all currently stored metadata keys
Overrides:
Source:
Returns:
- all currently stored keys
Type
Array.<string>

getOrder() → (nullable) {string}

Overrides:
Source:
Returns:
Type
string

getOwnerDom() → {HTMLElement}

deliver the DOM that contains this control
Overrides:
Source:
Returns:
Type
HTMLElement

getPosition() → {Help4.control2.PositionXY}

get position of this control
Overrides:
Source:
Returns:
- position of this control within DOM
Type
Help4.control2.PositionXY

getProject() → {Help4.widget.help.Project}

Source:
Returns:
Type
Help4.widget.help.Project

getSize() → {Help4.control2.SizeWH}

get size of this control
Overrides:
Source:
Returns:
- size of this control's bounding client rect
Type
Help4.control2.SizeWH

getStatus(step) → (nullable) {Help4.widget.tour.View.HotspotStatus}

see _updateHotspotStatus
Parameters:
Name Type Description
step number | string
Source:
Returns:
Type
Help4.widget.tour.View.HotspotStatus

getStep() → {number|null}

Source:
Returns:
Type
number | null

getSteps() → {number}

Source:
Returns:
Type
number

getTexts(onlyVisibleopt) → {Object|null}

get the texts within my control and within all controls that are within my control
Parameters:
Name Type Attributes Default Description
onlyVisible boolean <optional>
false
Overrides:
Source:
Returns:
Type
Object | null

getTile(step) → (nullable) {Help4.widget.help.ProjectTile}

Parameters:
Name Type Description
step number | string
Source:
Returns:
Type
Help4.widget.help.ProjectTile

getTileIndex(tileId) → {number}

Parameters:
Name Type Description
tileId string
Source:
Returns:
Type
number

hasCss(…classNames) → {boolean}

tests some classnames on this control
Parameters:
Name Type Attributes Description
classNames string <repeatable>
class names to be tested on this control's DOM
Overrides:
Source:
Returns:
Type
boolean

insertAt(params, index) → (nullable) {Help4.control2.Control}

inserts a control at the given position
Parameters:
Name Type Description
params Help4.control2.Control.Params parameters for the to-be-created controls
index number the insert position
Overrides:
Source:
Returns:
the added control
Type
Help4.control2.Control

isDestroyed() → {boolean}

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

isMouseOver() → {boolean}

calculate whether the mouse is on top of my DOM
Overrides:
Source:
Returns:
- whether mouse is over my DOM
Type
boolean

isNextStepAvailable(stepopt, screenIdopt) → {boolean}

Parameters:
Name Type Attributes Description
step number <optional>
screenId string <optional>
Source:
Returns:
Type
boolean

isNextStepSameScreen() → {boolean}

check if the next step will be on the same screen
Source:
Returns:
Type
boolean

isPrevStepAvailable() → {boolean}

Source:
Returns:
Type
boolean

isTileOnScreen(tile, screenIdopt, nullable) → {boolean}

Parameters:
Name Type Attributes Description
tile Help4.widget.help.ProjectTile
screenId string <optional>
<nullable>
Source:
Returns:
Type
boolean

map(executor) → {Array.<*>}

Parameters:
Name Type Description
executor Help4.typedef.MapExecutor
Overrides:
Source:
Returns:
Type
Array.<*>

moveTo(controlId, index)

moves a control to a certain position
Parameters:
Name Type Description
controlId string the control id of the to-be-moved control
index number new position
Overrides:
Source:

(async) nextStep(autoProgressopt) → {Promise.<boolean>}

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

onEvent(event)

handle incoming events
Parameters:
Name Type Description
event Object the received event
Overrides:
Source:

onUrTourEvent(event)

forward Help4.engine.ur.UrHarmonization tour events to Help4.widget.tour.Observer#onElementEvent similar to Help4.widget.tour.View#_onKeyEvent
Parameters:
Name Type Description
event Help4.widget.tour.Observer.ElementEvent
Source:

(async) prevStep() → {Promise.<boolean>}

Source:
Returns:
Type
Promise.<boolean>

remove(controlId) → {Help4.control2.Control|null}

Parameters:
Name Type Description
controlId * index of control in container, or control ID or metadata information
Overrides:
Source:
Returns:
the removed control
Type
Help4.control2.Control | null

removeCss(…classNames) → {Help4.control2.Control}

remove CSS classnames from this control
Parameters:
Name Type Attributes Description
classNames string <repeatable>
class names to be removed from this control's DOM
Overrides:
Source:
Returns:
Type
Help4.control2.Control

replace(params, controlId) → (nullable) {Help4.control2.Control}

replaces a control at the given position
Parameters:
Name Type Description
params Help4.control2.Control.Params parameters for the to-be-created controls
controlId string the control id of the to-be-replaced control
Overrides:
Source:
Returns:
the added control
Type
Help4.control2.Control

resumeDragDrop() → {Help4.control2.Control}

resume drag & drop operation
Overrides:
Source:
Returns:
Type
Help4.control2.Control

serialize() → {Help4.widget.tour.View.SerializedStatus}

Source:
Returns:
Type
Help4.widget.tour.View.SerializedStatus

setAttribute(name, value) → {Help4.control2.Control}

adds an attribute to the DOM
Parameters:
Name Type Description
name string
value *
Overrides:
Source:
Returns:
Type
Help4.control2.Control

setControlTexts(textMap) → {Help4.control2.Control}

exchange all texts of my control; e.g. after successful MLT
Parameters:
Name Type Description
textMap Object
Overrides:
Source:
Throws:
Error
Returns:
Type
Help4.control2.Control

setDom(dom)

Parameters:
Name Type Description
dom HTMLElement
Overrides:
Source:

setMetadata(key, value) → {Help4.control2.Control}

allows to store any external key-value information within this control
Parameters:
Name Type Description
key string | Object the key
value * any value to be stored
Overrides:
Source:
Returns:
Type
Help4.control2.Control

setStyle(styles) → {Help4.control2.Control}

add styles to this control
Parameters:
Name Type Description
styles Object styles to be added to this control's DOM
Overrides:
Source:
Returns:
Type
Help4.control2.Control

setTexts(textMap) → {Help4.control2.Control}

set the texts within my control and within all controls that are within my control
Parameters:
Name Type Description
textMap Object
Overrides:
Source:
Returns:
Type
Help4.control2.Control

(async) showStepAt(step) → {Promise.<boolean>}

Parameters:
Name Type Description
step number
Source:
Returns:
Type
Promise.<boolean>

startElementObservation(tileData) → {Help4.widget.tour.View}

Parameters:
Name Type Description
tileData Help4.data.TileData
Source:
Returns:
Type
Help4.widget.tour.View

stop() → {Help4.widget.tour.View}

Source:
Returns:
Type
Help4.widget.tour.View

stopElementObservation() → {Help4.widget.tour.View}

Source:
Returns:
Type
Help4.widget.tour.View

suspendDragDrop() → {Help4.control2.Control}

suspend drag & drop operation
Overrides:
Source:
Returns:
Type
Help4.control2.Control

trackStep() → {Help4.widget.tour.View}

Source:
Returns:
Type
Help4.widget.tour.View

updateHistory(reason) → {Help4.widget.tour.View}

Parameters:
Name Type Description
reason string
Source:
Returns:
Type
Help4.widget.tour.View

vetoNavigation(screenId) → {boolean}

Help4.controller.Tour.prototype.vetoNavigation
Parameters:
Name Type Description
screenId string
Source:
Returns:
Type
boolean

Type Definitions

HotspotStatus

Type:
  • Object
Properties:
Name Type Attributes Description
checked boolean <nullable>
className string
contentEditable boolean
element HTMLElement <nullable>
exists boolean
focussed boolean
inputType *
label string <nullable>
nodeName string <nullable>
placeholder string <nullable>
point Help4.control2.PositionXY <nullable>
rect Help4.control2.AreaXYWH <nullable>
scrolled boolean
text string <nullable>
topmost boolean <nullable>
value *
visible boolean
Source:

Params

Type:
Properties:
Name Type Attributes Description
widget Help4.widget.tour.Widget the owner widget
projectId string the project ID
catalogueKey Help4.widget.help.CatalogueKeys
project Help4.widget.help.Project the project data
whatsnew boolean whatsnew mode enabled
startAt string <optional>
<nullable>
a possible tour step ID
startAfter string <optional>
<nullable>
a possible tour step ID
history string <optional>
<nullable>
a possible history from last playback
Source:

SerializedStatus

Type:
  • Object
Properties:
Name Type Attributes Description
projectId string
catalogueType Help4.widget.help.CatalogueTypes
catalogueKey Help4.widget.help.CatalogueKeys
step string <optional>
history string <optional>
Source: