@spotfire/mods-api
Advanced tools
Comparing version 1.2.0 to 1.3.0
{ | ||
"name": "@spotfire/mods-api", | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"description": "Mods API.", | ||
@@ -5,0 +5,0 @@ "files": [ |
@@ -1,2 +0,2 @@ | ||
/* | ||
/* | ||
* Copyright © 2023. Cloud Software Group, Inc. | ||
@@ -1362,2 +1362,21 @@ * This file is subject to the license terms contained | ||
hasExpired(): Promise<boolean>; | ||
/** | ||
* Check whether one or more passed arguments are new since the last time the subscribe loop was called. | ||
* | ||
* @example | ||
* Check if the data view has changed in the subscribe loop. | ||
* | ||
* ``` | ||
* let reader = mod.createReader(mod.visualization.data(), mod.windowSize()); | ||
* reader.subscribe((dataView, size) => { | ||
* console.log(reader.hasValueChanged(dataView)); | ||
* }); | ||
* ``` | ||
* | ||
* @param value - Value from `subscribe` or `once` arguments. | ||
* @param values - Additional values from `subscribe` or `once` arguments. | ||
* @returns true if any of the values are new, otherwise false. | ||
* @version 1.3 | ||
*/ | ||
hasValueChanged(value: UnionFromTupleTypes<T>, ...values: UnionFromTupleTypes<T>[]): boolean; | ||
} | ||
@@ -1582,3 +1601,3 @@ | ||
* | ||
* Subsequent calls to `show`can be made to update the tooltip text. | ||
* Subsequent calls to `show` can be made to update the tooltip text. | ||
* @param content - The text to show in the tooltip. | ||
@@ -1588,2 +1607,16 @@ */ | ||
/** | ||
* Shows a tooltip for the specified `row` as it has been configured in the properties panel. | ||
* | ||
* The tooltip is shown using the same style and initial delay as native Spotfire visualizations. | ||
* Once shown, the tooltip will follow the mouse around until {@link Tooltip.hide} is called. | ||
* | ||
* Subsequent calls to `show` can be made to update the tooltip text. | ||
* | ||
* @note For this feature to work, the dataViewDefinition.tooltip.enabled in the mod-manifest.json needs to be set to true. | ||
* | ||
* @param row - The row to show text for in the tooltip. | ||
* @version 1.3 | ||
*/ | ||
show(row: DataViewRow): void; | ||
/** | ||
* Hides the tooltip that is currently being showed, if any. | ||
@@ -1594,2 +1627,8 @@ */ | ||
/** | ||
* Extract all possible types in a Tuple type. | ||
* @public | ||
*/ | ||
export declare type UnionFromTupleTypes<T extends readonly any[], U = never> = T[number] | U; | ||
export { } |
@@ -159,4 +159,4 @@ { | ||
"description": "Specifies the version of the Mod JavaScript API used by the code of this Mod. Set the lowest possible version number that the Mod requires to ensure best possible backward compatibility with older Spotfire systems. Using a newer API version than specified will result in runtime errors, even if the current Spotfire system includes that API.", | ||
"default": "1.2", | ||
"examples": ["1.0", "1.1", "1.2"], | ||
"default": "1.3", | ||
"examples": ["1.0", "1.1", "1.2", "1.3"], | ||
"pattern": "^(.*)$" | ||
@@ -345,2 +345,17 @@ }, | ||
} | ||
}, | ||
"tooltip": { | ||
"type": "object", | ||
"title": "Use configurable tooltips", | ||
"description": "Specifies how the Mod uses Spotfire native style configurable tooltips. Added in API version 1.3", | ||
"default": {}, | ||
"additionalProperties": false, | ||
"properties": { | ||
"enabled": { | ||
"type": "boolean", | ||
"title": "Enabled", | ||
"default": true, | ||
"description": "Specifies whether to enable configurable tooltips, both in the API and in the properties dialog." | ||
} | ||
} | ||
} | ||
@@ -347,0 +362,0 @@ } |
82561
1949