<protected> new SignalIQDialog()
- Since:
-
- 8.6.0
- 9.1.0 Added emitter.
Extends
Members
-
activeStudy :null|CIQ.Studies.StudyDescriptor
-
Study driving the signal.
Type:
- null | CIQ.Studies.StudyDescriptor
-
editMode :boolean
-
Whether editing a signal (true) or adding one (false).
Type:
- boolean
-
pickers :Set.<string>
-
Implementations of pickers (these are dialogs allowing to choose from an array of options, e.g. emojis.)
Type:
- Set.<string>
-
<static> markup :string
-
Default markup for the component's innerHTML, to be used when the component is added to the DOM without any innerHTML.
Type:
- string
Methods
-
addClaim()
-
Claim any keystrokes that come in. Once claimed, any keystrokes that come in are passed to the element. The element can then choose to capture or propagate the keystrokes. This enables an element to capture keystrokes even if it doesn't have mouse focus.
- Inherited From:
- Overrides:
-
addCondition()
-
Push a new empty array to the
signalParams.conditions
and re-render the condition options UI.- Since:
-
8.6.0
-
addDefaultMarkup(component [, markup])
-
Adds default markup to a web component if the component does not have any child nodes.
Parameters:
Name Type Argument Description component
HTMLElement The component to which the markup is added.
markup
String <optional>
The markup to add to the web component. Unused if the component has a static markup property that specifies the markup; for example, MyComponent.markup.
- Since:
-
7.5.0
- Inherited From:
- Overrides:
-
addStudy(obj, name)
-
Callback function for the study select menu. Adds the selected study to the chart.
Parameters:
Name Type Description obj
object | null Object containing event or null
name
string Name of the study to add.
- Since:
-
8.6.0
-
channelMergeObject(path, value, stx)
-
Merges an object in the chart engine communication channel.
Parameters:
Name Type Description path
String The channel path.
value
Object The value merged to the channel.
stx
CIQ.ChartEngine A reference to the chart engine.
- Since:
-
7.5.0
- Inherited From:
- Overrides:
-
channelRead(path [, stx])
-
Reads the current value in the chart engine communication channel.
Parameters:
Name Type Argument Description path
String The channel path.
stx
CIQ.ChartEngine <optional>
Unused.
- Since:
-
7.5.0
- Inherited From:
- Overrides:
Returns:
The current value in channel.
- Type
- *
-
channelSubscribe(path, cb, stx)
-
Subscribes to the chart engine messaging channel.
Parameters:
Name Type Description path
* The channel path.
cb
* A callback invoked upon subscribing and whenever a new message is posted in the channel.
stx
CIQ.ChartEngine A reference to the chart engine.
- Since:
-
7.5.0
- Inherited From:
- Overrides:
Returns:
A callback invoked when unsubscribing from the channel.
- Type
- function
-
channelWrite(path, value, stx)
-
Writes in the chart engine communication channel.
Parameters:
Name Type Description path
String The channel path.
value
* The value written to the channel.
stx
CIQ.ChartEngine A reference to the chart engine.
- Since:
-
7.5.0
- Inherited From:
- Overrides:
-
clickFocusedItem(items, e)
-
Selects (clicks) the first element in
items
that has acq-focused
attribute.Parameters:
Name Type Description items
NodeList A list of elements that are selectable via keyboard navigation.
e
Event The keystroke event.
- Since:
-
8.3.0
- Inherited From:
- Overrides:
-
close()
-
Closes the dialog.
Designed to be used as a helper method for the included WebComponents. A full tutorial on how to work with and customize the WebComponents can be found here: Web Component Interface.
- Inherited From:
- Overrides:
-
collapse(node)
-
Closes any lifts or popups for the node.
Parameters:
Name Type Description node
HTMLElement Element to collapse.
- Since:
-
8.6.0
-
deactivateItem(item)
-
Blurs and removes the
cq-keyboard-active
attribute fromitem
.Parameters:
Name Type Description item
HTMLElement - Since:
-
8.4.0
- Inherited From:
- Overrides:
-
editStudy(activator)
-
Invoke the Study Edit dialog for the currently active study
Parameters:
Name Type Description activator
Object Properties
Name Type Description e
Event Event associated with activator
- Since:
-
8.6.0
-
emitCustomEvent(params)
-
Emits a custom event from the webcomponent. The event type of the emitted event is determined by the particular user action taken. Up to two events are emitted when this function is executed. The first is an event with the type of action performed, if there is one. For example, events which are spawned without user action will not emit this first event. The second event will have a type derived from the component name. For example, the
cq-study-legend
component will emit a "StudyLegend" type event. The payload of the event will contain a detail section specifying the component which emitted the event as well as theeffect
- which more clearly defines the type of action causing the emittance. The detail section may also include custom fields further categorizing the event and providing additional information. These details are documented within the web component's documentation.Parameters:
Name Type Description params
object Properties
Name Type Argument Default Description cause
string <optional>
The cause of the event. e.g., useraction, timeout, alert. Defaults to "useraction" if not set and
action
parameter is set.effect
string <optional>
The effect of the user's action. Required if not provided in
detail
. e.g., open, help, toggle, select.action
string | null <optional>
"click" The action a user performed, if applicable. e.g. click, longpress, drag. Set to null if no user action was performed.
detail
Object <optional>
{} Optional extra parameters to include in the detail of the Custom Event.
- Since:
-
- 8.9.0
- 9.1.0 Changed
params
object's property names.
- Inherited From:
- Overrides:
-
findFocused(items)
-
Finds the elements in
items
that have acq-focused
attribute.Parameters:
Name Type Description items
NodeList A list of elements that are selectable via keyboard navigation.
- Since:
-
8.3.0
- Inherited From:
- Overrides:
Returns:
The elements in
items
that have acq-focused
attribute, or an empty array if no elements are found.- Type
- array
-
findKeyboardActive(items)
-
Finds the elements in
items
that have acq-keyboard-active
attribute.Parameters:
Name Type Description items
NodeList A list of elements that are selectable via keyboard navigation
- Since:
-
8.4.0
- Inherited From:
- Overrides:
Returns:
The elements in
items
that have acq-keyboard-active
attribute, or an empty array if no elements are found.- Type
- Array
-
focusItem(item)
-
Adds a
cq-focused
attribute toitem
and highlightsitem
.Parameters:
Name Type Description item
HTMLElement Element that receives keyboard focus and is highlighted.
- Since:
-
8.3.0
- Inherited From:
- Overrides:
-
focusNextItem(items [, reverse] [, loop])
-
Focuses the next item in the tab order.
Locates the first element in
items
that has acq-focused
attribute. If an element is found, the attribute is removed from all elements initems
, andcq-focused
is applied to the element that follows (in the tab order) the element that was found.If no elements are found with the
cq-focused
attribute, the attribute is applied to the first element initems
(last element ifreverse
is true). If the last element initems
(first element ifreverse
is true) is found to have thecq-focused
attribute, focus remains on that element. Unlessloop
is set to true, then focus is applied to first element.Parameters:
Name Type Argument Description items
NodeList A list of elements that are selectable via keyboard navigation.
reverse
boolean <optional>
If true, the operation is performed in reverse order; that is, from the last element in
items
to the first.loop
boolean <optional>
Loops back to the first item if the last element in
items
is selected.- Since:
-
8.4.0 Added loop parameter. Return element, instead of true, if focus is changed.
- Inherited From:
- Overrides:
- See:
Returns:
The newly focused element if a
cq-focused
attribute has changed.- Type
- HTMLElement | undefined
-
getChartContainer( [el])
-
Searches the DOM for the chart container element. Begins the search with
el
(orthis
) and proceeds parent-by-parent up the ancestry tree until an element is found.Parameters:
Name Type Argument Description el
HTMLElement <optional>
The element on which to start the search. If not provided,
this
is used.- Since:
-
7.5.0
- Inherited From:
- Overrides:
Returns:
The chart container element or undefined if an element is not found.
- Type
- HTMLElement | undefined
-
getContextContainer( [el])
-
Searches the DOM for the chart context element. Begins the search with
el
(orthis
ifel
is not provided) and proceeds up the ancestry tree until an element is found or the root of the tree has been reached.Parameters:
Name Type Argument Description el
HTMLElement <optional>
The element on which to start the search. If not provided,
this
is used.- Since:
-
7.5.0
- Inherited From:
- Overrides:
Returns:
The chart context element or undefined if an element is not found.
- Type
- HTMLElement | undefined
-
hide()
-
Hides the dialog and resets local signal properties if not in the middle of an interactive add operation.
- Since:
-
8.6.0
-
init(params)
-
Adds local property containing dropdown menu options. Adds form element event handlers.
Parameters:
Name Type Description params
object The parameter object.
Properties
Name Type Argument Description context
CIQ.UI.Context <optional>
A context. See setContext.
- Since:
-
8.6.0
-
inputEntry(node, cb)
-
Attaches a keyboard input entry event.
Parameters:
Name Type Description node
HTMLElement The element to which the input entry event is attached.
cb
function The callback function invoked when input entry occurs.
- Inherited From:
- Overrides:
-
makeMenu(name, currentValue, fields, cb, index, label)
-
Create a cq-menu form element and return it. The created element is not attached to the DOM.
Parameters:
Name Type Description name
string Name of the form element.
currentValue
string Value to select by default.
fields
Array.<string> | Array.<Array.<string>> A one-dimensional array of values or a two-dimensional array of name/value pairs.
cb
string Stringified callback function template, with $val to be replaced, and called when a value is selected.
index
number Numerical index of menu element. Used to differentiate multiple condition selections.
label
string Alternative label for menu when value is not selected. Default is "Select..."
- Since:
-
- 8.6.0
- 8.7.0 Add index and label parameters.
Returns:
cq-menu element
- Type
- HTMLElement
-
makeStudyMenu()
-
Create a cq-menu form element with all available studies and inject a search field in the menu header to filter options. The menu is automatically attached to a local element with class
study-select-container
.- Since:
-
8.6.0
-
naturalTabElements(element)
-
Returns all elements that are navigable by a browser's default tabbing algorithm
Parameters:
Name Type Description element
HTMLElement Element to query selectors from.
- Since:
-
8.8.0
- Inherited From:
- Overrides:
Returns:
Array containing all tab navigable elements.
- Type
- Array.<HTMLElement>
-
open(params)
-
Called when the dialog is invoked. Automatically sets up local properties for either adding or editing a study signal.
Parameters:
Name Type Description params
object The parameter object.
Properties
Name Type Argument Description context
CIQ.UI.Context <optional>
A context. See setContext.
sd
CIQ.Studies.StudyDescriptor The study descriptor.
- Since:
-
8.6.0
- Overrides:
-
qs(path, context)
-
Adapts the querySelector method.
Parameters:
Name Type Description path
String The CSS selectors for which to search.
context
HTMLElement | String The chart context element, which is the starting point of the DOM query, or "thisChart" to indicate the chart context in which this function is called.
- Since:
-
7.5.0
- Inherited From:
- Overrides:
Returns:
The selected DOM element or undefined if an element is not found.
- Type
- HTMLElement | undefined
-
qsa(path, root, bustShadowRoots)
-
Adapts the querySelectorAll method. Returns an array instead of a node list to enable chaining of the array
map
,filter
,forEach
, andreduce
functions.Parameters:
Name Type Description path
String The CSS selectors to find.
root
HTMLElement | String The root element, which is the starting point of the DOM query, or "thisChart" to indicate the chart context in which this function is called.
bustShadowRoots
boolean Set to true to penetrate shadow root boundaries.
- Since:
-
- 7.5.0
- 8.9.0 Added
bustShadowRoots
parameter
- Inherited From:
- Overrides:
Returns:
An array of selected DOM element.
- Type
- Array.<HTMLElement>
-
removeActiveStudy()
-
Remove the active study from the chart.
- Since:
-
8.6.0
-
removeClaim()
-
Remove a claim on keystrokes.
- Inherited From:
- Overrides:
-
removeFocused(items)
-
Removes the
cq-focused
attribute from all elements initems
.Parameters:
Name Type Description items
NodeList A list of elements that are selectable via keyboard navigation.
- Since:
-
8.3.0
- Inherited From:
- Overrides:
-
renderConditionOptions()
-
Update form controls related to marker condition options based on values in
signalParams.conditions
array.- Since:
-
8.6.0
-
renderMarkerPreview()
-
Update marker preview based on values in
signalParams
.- Since:
-
8.6.0
-
renderSignalOptions(condition, idx)
-
Update form controls related to marker options based on values in
signalParams
.Parameters:
Name Type Description condition
Array.<object> Array of parameters representing a condition on which the signal will trigger.
idx
number Index of the condition.
- Since:
-
8.7.0 Rename from renderMarkerOptions to renderSignalOptions to include other notification types.
Returns:
A DOM node tailored to the condition options, as form controls.
- Type
- Node
-
reset()
-
Resets local study signal properties.
- Since:
-
8.6.0
-
save()
-
Apply the current study signal settings to the active study and close the dialog.
- Since:
-
8.6.0
-
setContext(context)
-
Dynamically sets the context for a dialog so that it knows which chart to change when there are multiple charts on the screen.
Parameters:
Name Type Description context
CIQ.UI.Context The context to set.
- Inherited From:
- Overrides:
-
trimInnerHTMLWhitespace()
-
Returns a copy of the innerHTML of an element, with leading and trailing characters stripped. The following characters are stripped: newline, carriage return, tab.
- Since:
-
9.1.0
- Inherited From:
- Overrides:
Returns:
Trimmed innerHTML
- Type
- String
-
updateConditionSignalVal(obj, conditionIdx, paramName, value)
-
Update a marker option value in
signalParams.conditions
at provided index.Parameters:
Name Type Description obj
object | null Object containing event or null.
Properties
Name Type Argument Description e
Event <optional>
Event triggering the update.
conditionIdx
number Index of the condition.
paramName
string Name of the marker property.
value
string | number Value for the condition property.
- Since:
-
8.7.0
-
updateConditionVal(obj, conditionIdx, paramIdx, value)
-
Update a value in
signalParams.conditions
at provided index.Parameters:
Name Type Description obj
object | null Object containing event or null.
Properties
Name Type Argument Description e
Event <optional>
Event triggering the update.
conditionIdx
number Index of the condition.
paramIdx
number Index of the property within the condition.
value
string | number Value for the condition property.
- Since:
-
8.6.0
-
updateFormValues(formToData)
-
Synchronizes dialog HTML elements in the local
formElements
property with values in thesignalParams
object. By default, this will update the element value with its correspondingsignalParams
value. PassingformToData
parameter astrue
will update the correspondingsignalParams
value with the element value.Parameters:
Name Type Description formToData
boolean Update
signalParams
with form values.- Since:
-
8.6.0
-
updateParamValue(obj, name, value)
-
Update the value of a
signalParams
property.Parameters:
Name Type Description obj
object | null Object containing event or null
Properties
Name Type Argument Description e
Event <optional>
Event triggering the update.
name
string Name of the property.
value
string | number Value for the property.
- Since:
-
8.6.0
-
validateCondition(index)
-
Checks local signalParams.conditions array for all properties required by CIQ.SignalIQ#convertStudyToSignal.
Parameters:
Name Type Description index
number Array index to check.
- Since:
-
8.6.0
Returns:
Return
true
if valid.- Type
- boolean
-
validateSignalParams()
-
Checks local signalParams object for all properties required by CIQ.SignalIQ#convertStudyToSignal. Displays appropriate feedback messaging at bottom of dialog.
- Since:
-
8.6.0
Returns:
True if passed all validations.
- Type
- boolean