- Modifiers
- .modifiers :
Object
- .measureBase
- .getExpression(measure) ⇒
string
- .getExpressionRef(measure) ⇒
string
- .getLibraryIdRef(measure) ⇒
string
- .getLibraryId(measure) ⇒
string
- .getLabelRef(measure) ⇒
string
- .getLabelExpressionRef(measure) ⇒
string
- .getExpression(measure) ⇒
- .initBase(measure, hardSet)
- .apply(options) ⇒
Promise
- .applyModifiers(options) ⇒
Promise
- .cleanUpMeasure(measure)
- .destroy(model)
- .hasActiveModifiers(options) ⇒
Boolean
- .limitedSorting(options)
- .getActiveModifier(measure)
- .ifEnableTotalsFunction(measure)
- .modifiers :
An object literal containing all available modifiers
Kind: static property of Modifiers
Utility functions for accessing input/base properties of a measure
Kind: static constant of Modifiers
- .measureBase
- .getExpression(measure) ⇒
string
- .getExpressionRef(measure) ⇒
string
- .getLibraryIdRef(measure) ⇒
string
- .getLibraryId(measure) ⇒
string
- .getLabelRef(measure) ⇒
string
- .getLabelExpressionRef(measure) ⇒
string
- .getExpression(measure) ⇒
Get the qDef property - from the base if it exists, otherwise returns qDef.qDef of the measure
Kind: static method of measureBase
Returns: string
- The original/input expression
Param | Type | Description |
---|---|---|
measure | Object |
Properties for a measure in a hypercube def (from qHyperCubeDef.qMeasures array) |
Get path to expression (e.g. "qDef.qDef")
Kind: static method of measureBase
Returns: string
- Reference to the the original/input expression property (qDef)
Param | Type | Description |
---|---|---|
measure | Object |
Properties for a measure in a hypercube def (from qHyperCubeDef.qMeasures array) |
Get path to the qLibraryId property - from the base if it exists, otherwise from the measure as normal
Kind: static method of measureBase
Returns: string
- Reference to the original/input libraryId property (qLibraryId)
Param | Type | Description |
---|---|---|
measure | Object |
Properties for a measure in a hypercube def (from qHyperCubeDef.qMeasures array) |
Get the qLibraryId property - from the base if it exists, otherwise returns qLibraryId of the measure
Kind: static method of measureBase
Returns: string
- The original/input libraryId
Param | Type | Description |
---|---|---|
measure | Object |
Properties for a measure in a hypercube def (from qHyperCubeDef.qMeasures array) |
Get the qLabel property - from the base if it exists, otherwise returns qLabel of the measure
Kind: static method of measureBase
Returns: string
- Reference to the original/input label property (qLabel)
Param | Type | Description |
---|---|---|
measure | Object |
Properties for a measure in a hypercube def (from qHyperCubeDef.qMeasures array) |
Get the qLabelExpression property - from the base if it exists, otherwise returns qLabelExpression of the measure
Kind: static method of measureBase
Returns: string
- Reference to the original/input labelExpression property (qLabelExpression)
Param | Type | Description |
---|---|---|
measure | Object |
Properties for a measure in a hypercube def (from qHyperCubeDef.qMeasures array) |
Initialize the base for a measure - Creates a base object literal with the original qDef.qDef and qLibrary properties.
Kind: static method of Modifiers
Param | Type | Description |
---|---|---|
measure | Object |
Properties for a measure in a hypercube def (from qHyperCubeDef.qMeasures array) |
hardSet | Boolean |
force initialize base |
Applies defined modifiers to measures in hypercubeDef (!subscribes to master items layout changes, call destroy function to unsubscribe)
Kind: static method of Modifiers
Returns: Promise
- Promise resolving with a boolean - modified: true/false (true if a setProperties or applyPatches has run)
Param | Type | Default | Description |
---|---|---|---|
options | Object |
An object with all input parameters | |
options.model | Object |
Enigma model of the object fetched from engine (mandatory) | |
[options.properties] | Object |
object properties. | |
[options.isSnapshot] | boolean |
false |
is it a snapshot or not? |
[options.masterItem] | Object |
layout of master item |
Applies defined modifiers to measures in hypercubeDef (!subscribes to master items layout changes, call destroy function to unsubscribe)
Kind: static method of Modifiers
Returns: Promise
- Promise resolving with a boolean - modified: true/false (true if a setProperties or applyPatches has run)
Param | Type | Default | Description |
---|---|---|---|
options | Object |
An object with all input parameters | |
options.model | Object |
Enigma model of the object fetched from engine (mandatory) | |
[options.properties] | Object |
Object properties | |
[options.measures] | Array.<Object> |
An array of measure properties | |
[options.runUpdateIfChange] | boolean |
false |
Wether of not properties should be persisted (soft patched when readonly access) |
[options.masterItem] | Object |
layout of master item |
Restores the measure properties to how it was before modifiers were applied
Kind: static method of Modifiers
Param | Type | Description |
---|---|---|
measure | Object |
The measure properties object from the enigma model |
Removes layout subscribers (listeners for master items). Make sure to run this when not using the object any longer to avoid memory leaks.
Kind: static method of Modifiers
Param | Type | Description |
---|---|---|
model | Object |
Enigma model of the object fetched from engine (mandatory) |
Checks if there is some active modifier in any of the provided measures
Kind: static method of Modifiers
Returns: Boolean
- true if the there are any active modifiers
Param | Type | Description |
---|---|---|
options | Object |
An object with all input parameters |
options.measures | Array.<Object> |
Array with measure properties or layout |
[options.properties] | Object |
object properties (needs either this or the layout) |
[options.layout] | Object |
object layout (needs either this or the properties) |
Is sorting capabilities limited due to applied modifier? Can operate either on layout or properties
Kind: static method of Modifiers
Param | Type | Description |
---|---|---|
options | Object |
An object with all input parameters |
options.measures | Array.<Object> |
Array with measure properties or layout |
[options.properties] | Object |
object properties (needs either this or the layout) |
[options.layout] | Object |
object layout (needs either this or the properties) |
Get active modifier
Kind: static method of Modifiers
Param | Type | Description |
---|---|---|
measure | Object |
The measure properties object |
Check if one type of modifier should enable totals function in table
Kind: static method of Modifiers
Param | Type | Description |
---|---|---|
measure | Object |
The measure properties object |