@thoughtspot/visual-embed-sdk
Version:
ThoughtSpot Embed SDK
1,509 lines (1,484 loc) • 771 kB
JavaScript
/* @thoughtspot/visual-embed-sdk version 1.44.4 */
'use client';
import * as React from 'react';
import React__default, { useRef, useCallback } from 'react';
function _mergeNamespaces(n, m) {
m.forEach(function (e) {
e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) {
if (k !== 'default' && !(k in n)) {
var d = Object.getOwnPropertyDescriptor(e, k);
Object.defineProperty(n, k, d.get ? d : {
enumerable: true,
get: function () { return e[k]; }
});
}
});
});
return Object.freeze(n);
}
var has = Object.prototype.hasOwnProperty;
function find(iter, tar, key) {
for (key of iter.keys()) {
if (dequal(key, tar)) return key;
}
}
function dequal(foo, bar) {
var ctor, len, tmp;
if (foo === bar) return true;
if (foo && bar && (ctor=foo.constructor) === bar.constructor) {
if (ctor === Date) return foo.getTime() === bar.getTime();
if (ctor === RegExp) return foo.toString() === bar.toString();
if (ctor === Array) {
if ((len=foo.length) === bar.length) {
while (len-- && dequal(foo[len], bar[len]));
}
return len === -1;
}
if (ctor === Set) {
if (foo.size !== bar.size) {
return false;
}
for (len of foo) {
tmp = len;
if (tmp && typeof tmp === 'object') {
tmp = find(bar, tmp);
if (!tmp) return false;
}
if (!bar.has(tmp)) return false;
}
return true;
}
if (ctor === Map) {
if (foo.size !== bar.size) {
return false;
}
for (len of foo) {
tmp = len[0];
if (tmp && typeof tmp === 'object') {
tmp = find(bar, tmp);
if (!tmp) return false;
}
if (!dequal(len[1], bar.get(tmp))) {
return false;
}
}
return true;
}
if (ctor === ArrayBuffer) {
foo = new Uint8Array(foo);
bar = new Uint8Array(bar);
} else if (ctor === DataView) {
if ((len=foo.byteLength) === bar.byteLength) {
while (len-- && foo.getInt8(len) === bar.getInt8(len));
}
return len === -1;
}
if (ArrayBuffer.isView(foo)) {
if ((len=foo.byteLength) === bar.byteLength) {
while (len-- && foo[len] === bar[len]);
}
return len === -1;
}
if (!ctor || typeof foo === 'object') {
len = 0;
for (ctor in foo) {
if (has.call(foo, ctor) && ++len && !has.call(bar, ctor)) return false;
if (!(ctor in bar) || !dequal(foo[ctor], bar[ctor])) return false;
}
return Object.keys(bar).length === len;
}
}
return foo !== foo && bar !== bar;
}
/**
* @param value the value to be memoized (usually a dependency list)
* @returns a momoized version of the value as long as it remains deeply equal
*/
function useDeepCompareMemoize(value) {
var ref = React.useRef(value);
var signalRef = React.useRef(0);
if (!dequal(value, ref.current)) {
ref.current = value;
signalRef.current += 1;
} // eslint-disable-next-line react-hooks/exhaustive-deps
return React.useMemo(function () {
return ref.current;
}, [signalRef.current]);
}
function useDeepCompareEffect(callback, dependencies) {
return React.useEffect(callback, useDeepCompareMemoize(dependencies));
}
// istanbul ignore next
const isObject$1 = (obj) => {
if (typeof obj === "object" && obj !== null) {
if (typeof Object.getPrototypeOf === "function") {
const prototype = Object.getPrototypeOf(obj);
return prototype === Object.prototype || prototype === null;
}
return Object.prototype.toString.call(obj) === "[object Object]";
}
return false;
};
const merge = (...objects) => objects.reduce((result, current) => {
if (Array.isArray(current)) {
throw new TypeError("Arguments provided to ts-deepmerge must be objects, not arrays.");
}
Object.keys(current).forEach((key) => {
if (["__proto__", "constructor", "prototype"].includes(key)) {
return;
}
if (Array.isArray(result[key]) && Array.isArray(current[key])) {
result[key] = merge.options.mergeArrays
? merge.options.uniqueArrayItems
? Array.from(new Set(result[key].concat(current[key])))
: [...result[key], ...current[key]]
: current[key];
}
else if (isObject$1(result[key]) && isObject$1(current[key])) {
result[key] = merge(result[key], current[key]);
}
else {
result[key] =
current[key] === undefined
? merge.options.allowUndefinedOverrides
? current[key]
: result[key]
: current[key];
}
});
return result;
}, {});
const defaultOptions = {
allowUndefinedOverrides: true,
mergeArrays: true,
uniqueArrayItems: true,
};
merge.options = defaultOptions;
merge.withOptions = (options, ...objects) => {
merge.options = Object.assign(Object.assign({}, defaultOptions), options);
const result = merge(...objects);
merge.options = defaultOptions;
return result;
};
/**
* Copyright (c) 2023
*
* TypeScript type definitions for ThoughtSpot Visual Embed SDK
* @summary Type definitions for Embed SDK
* @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
*/
/**
* The authentication mechanism for allowing access to the
* the embedded app
* @group Authentication / Init
*/
var AuthType;
(function (AuthType) {
/**
* No authentication on the SDK. Pass-through to the embedded App. Alias for
* `Passthrough`.
* @example
* ```js
* init({
* // ...
* authType: AuthType.None,
* });
* ```
*/
AuthType["None"] = "None";
/**
* Passthrough SSO to the embedded application within the iframe. Requires least
* configuration, but may not be supported by all IDPs. This will behave like `None`
* if SSO is not configured on ThoughtSpot.
*
* To use this:
* Your SAML or OpenID provider must allow iframe redirects.
* For example, if you are using Okta as IdP, you can enable iframe embedding.
* @example
* ```js
* init({
* // ...
* authType: AuthType.EmbeddedSSO,
* });
* ```
* @version: SDK: 1.15.0 | ThoughtSpot: 8.8.0.cl
*/
AuthType["EmbeddedSSO"] = "EmbeddedSSO";
/**
* SSO using SAML
* @deprecated Use {@link SAMLRedirect} instead
* @hidden
*/
AuthType["SSO"] = "SSO_SAML";
/**
* SSO using SAML
* @deprecated Use {@link SAMLRedirect} instead
* @hidden
*/
AuthType["SAML"] = "SSO_SAML";
/**
* SSO using SAML
* Makes the host application redirect to the SAML IdP. Use this
* if your IdP does not allow itself to be embedded.
*
* This redirects the host application to the SAML IdP. The host application
* will be redirected back to the ThoughtSpot app after authentication.
* @example
* ```js
* init({
* // ...
* authType: AuthType.SAMLRedirect,
* });
* ```
*
* This opens the SAML IdP in a popup window. The popup is triggered
* when the user clicks the trigger button. The popup window will be
* closed automatically after authentication.
* @example
* ```js
* init({
* // ...
* authType: AuthType.SAMLRedirect,
* authTriggerText: 'Login with SAML',
* authTriggerContainer: '#tsEmbed',
* inPopup: true,
* });
* ```
*
* Can also use the event to trigger the popup flow. Works the same
* as the above example.
* @example
* ```js
* const authEE = init({
* // ...
* authType: AuthType.SAMLRedirect,
* inPopup: true,
* });
*
* someButtonOnYourPage.addEventListener('click', () => {
* authEE.emit(AuthEvent.TRIGGER_SSO_POPUP);
* });
* ```
*/
AuthType["SAMLRedirect"] = "SSO_SAML";
/**
* SSO using OIDC
* @hidden
* @deprecated Use {@link OIDCRedirect} instead
*/
AuthType["OIDC"] = "SSO_OIDC";
/**
* SSO using OIDC
* Will make the host application redirect to the OIDC IdP.
* See code samples in {@link SAMLRedirect}.
*/
AuthType["OIDCRedirect"] = "SSO_OIDC";
/**
* Trusted authentication server
* @hidden
* @deprecated Use {@link TrustedAuth} instead
*/
AuthType["AuthServer"] = "AuthServer";
/**
* Trusted authentication server. Use your own authentication server
* which returns a bearer token, generated using the `secret_key` obtained
* from ThoughtSpot.
* @example
* ```js
* init({
* // ...
* authType: AuthType.TrustedAuthToken,
* getAuthToken: () => {
* return fetch('https://my-backend.app/ts-token')
* .then((response) => response.json())
* .then((data) => data.token);
* }
* });
* ```
*/
AuthType["TrustedAuthToken"] = "AuthServer";
/**
* Trusted authentication server Cookieless, Use your own authentication
* server which returns a bearer token, generated using the `secret_key`
* obtained from ThoughtSpot. This uses a cookieless authentication
* approach, recommended to bypass the third-party cookie-blocking restriction
* implemented by some browsers.
* @example
* ```js
* init({
* // ...
* authType: AuthType.TrustedAuthTokenCookieless,
* getAuthToken: () => {
* return fetch('https://my-backend.app/ts-token')
* .then((response) => response.json())
* .then((data) => data.token);
* }
* ```
* @version SDK: 1.22.0| ThoughtSpot: 9.3.0.cl, 9.5.1.sw
*/
AuthType["TrustedAuthTokenCookieless"] = "AuthServerCookieless";
/**
* Use the ThoughtSpot login API to authenticate to the cluster directly.
*
* Warning: This feature is primarily intended for developer testing. It is
* strongly advised not to use this authentication method in production.
*/
AuthType["Basic"] = "Basic";
})(AuthType || (AuthType = {}));
/**
*
* **Note**: This attribute is not supported in the classic (V1) homepage experience.
*
*/
var HomeLeftNavItem;
(function (HomeLeftNavItem) {
/**
* The *Search data* option in
* the *Insights* left navigation panel.
* @version SDK: 1.28.0| ThoughtSpot: 9.12.5.cl
*/
HomeLeftNavItem["SearchData"] = "search-data";
/**
* The *Home* menu option in
* the *Insights* left navigation panel.
* @version SDK: 1.28.0| ThoughtSpot: 9.12.5.cl
*/
HomeLeftNavItem["Home"] = "insights-home";
/**
* The *Liveboards* menu option in
* the *Insights* left navigation panel.
* @version SDK: 1.28.0| ThoughtSpot: 9.12.5.cl
*/
HomeLeftNavItem["Liveboards"] = "liveboards";
/**
* The *Answers* menu option in
* the *Insights* left navigation panel.
* @version SDK: 1.28.0| ThoughtSpot: 9.12.5.cl
*/
HomeLeftNavItem["Answers"] = "answers";
/**
* The *Monitor subscriptions* menu option in
* the *Insights* left navigation panel.
* @version SDK: 1.28.0| ThoughtSpot: 9.12.5.cl
*/
HomeLeftNavItem["MonitorSubscription"] = "monitor-alerts";
/**
* The *SpotIQ analysis* menu option in
* the *Insights* left navigation panel.
* @version SDK: 1.28.0| ThoughtSpot: 9.12.5.cl
*/
HomeLeftNavItem["SpotIQAnalysis"] = "spotiq-analysis";
/**
* The *Liveboard schedules* menu option in
* the *Insights* left navigation panel.
* @version SDK: 1.34.0| ThoughtSpot: 10.3.0.cl
*/
HomeLeftNavItem["LiveboardSchedules"] = "liveboard-schedules";
/**
* The create option in the *Insights*
* left navigation panel.
* Available in the V3 navigation experience.
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
*/
HomeLeftNavItem["Create"] = "create";
/**
* The *Spotter* menu option in the *Insights*
* left navigation panel.
* Available in the V3 navigation experience.
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
*/
HomeLeftNavItem["Spotter"] = "spotter";
/**
* The *Favorites* section in the *Insights*
* left navigation panel.
* Available in the V3 navigation experience.
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
*/
HomeLeftNavItem["Favorites"] = "favorites";
})(HomeLeftNavItem || (HomeLeftNavItem = {}));
/**
* A map of the supported runtime filter operations
*/
var RuntimeFilterOp;
(function (RuntimeFilterOp) {
/**
* Equals
*/
RuntimeFilterOp["EQ"] = "EQ";
/**
* Does not equal
*/
RuntimeFilterOp["NE"] = "NE";
/**
* Less than
*/
RuntimeFilterOp["LT"] = "LT";
/**
* Less than or equal to
*/
RuntimeFilterOp["LE"] = "LE";
/**
* Greater than
*/
RuntimeFilterOp["GT"] = "GT";
/**
* Greater than or equal to
*/
RuntimeFilterOp["GE"] = "GE";
/**
* Contains
*/
RuntimeFilterOp["CONTAINS"] = "CONTAINS";
/**
* Begins with
*/
RuntimeFilterOp["BEGINS_WITH"] = "BEGINS_WITH";
/**
* Ends with
*/
RuntimeFilterOp["ENDS_WITH"] = "ENDS_WITH";
/**
* Between, inclusive of higher value
*/
RuntimeFilterOp["BW_INC_MAX"] = "BW_INC_MAX";
/**
* Between, inclusive of lower value
*/
RuntimeFilterOp["BW_INC_MIN"] = "BW_INC_MIN";
/**
* Between, inclusive of both higher and lower value
*/
RuntimeFilterOp["BW_INC"] = "BW_INC";
/**
* Between, non-inclusive
*/
RuntimeFilterOp["BW"] = "BW";
/**
* Is included in this list of values
*/
RuntimeFilterOp["IN"] = "IN";
/**
* Is not included in this list of values
*/
RuntimeFilterOp["NOT_IN"] = "NOT_IN";
})(RuntimeFilterOp || (RuntimeFilterOp = {}));
/**
* Home page modules that can be hidden
* via `hiddenHomepageModules` and reordered via
* `reorderedHomepageModules`.
*
* **Note**: This option is not supported in the classic (v1) experience.
* @version SDK: 1.28.0 | ThoughtSpot: 9.12.5.cl, 10.1.0.sw
*/
var HomepageModule;
(function (HomepageModule) {
/**
* Search bar
*/
HomepageModule["Search"] = "SEARCH";
/**
* kPI watchlist module
*/
HomepageModule["Watchlist"] = "WATCHLIST";
/**
* Favorite module
*/
HomepageModule["Favorite"] = "FAVORITE";
/**
* List of answers and Liveboards
*/
HomepageModule["MyLibrary"] = "MY_LIBRARY";
/**
* Trending list
*/
HomepageModule["Trending"] = "TRENDING";
/**
* Learning videos
*/
HomepageModule["Learning"] = "LEARNING";
})(HomepageModule || (HomepageModule = {}));
/**
* List page columns that can be hidden.
* **Note**: This option is applicable to full app embedding only.
* @version SDK: 1.38.0 | ThoughtSpot: 10.9.0.cl
*/
var ListPageColumns;
(function (ListPageColumns) {
/**
* Favourite
*/
ListPageColumns["Favourite"] = "FAVOURITE";
/**
* Tags
*/
ListPageColumns["Tags"] = "TAGS";
/**
* Author
*/
ListPageColumns["Author"] = "AUTHOR";
/**
* Last viewed/Last modified
*/
ListPageColumns["DateSort"] = "DATE_SORT";
/**
* Share
*/
ListPageColumns["Share"] = "SHARE";
})(ListPageColumns || (ListPageColumns = {}));
/**
* Event types emitted by the embedded ThoughtSpot application.
*
* To add an event listener use the corresponding
* {@link LiveboardEmbed.on} or {@link AppEmbed.on} or {@link SearchEmbed.on} method.
* @example
* ```js
* import { EmbedEvent } from '@thoughtspot/visual-embed-sdk';
* // Or
* // const { EmbedEvent } = window.tsembed;
*
* // create the liveboard embed.
*
* liveboardEmbed.on(EmbedEvent.Drilldown, (drilldown) => {
* console.log('Drilldown event', drilldown);
* }));
* ```
*
* If you are using React components for embedding, you can register to any
* events from the `EmbedEvent` list by using the `on<EventName>` convention.
* For example,`onAlert`, `onCopyToClipboard` and so on.
* @example
* ```js
* // ...
* const MyComponent = ({ dataSources }) => {
* const onLoad = () => {
* console.log(EmbedEvent.Load, {});
* };
*
* return (
* <SearchEmbed
* dataSources={dataSources}
* onLoad = {logEvent("Load")}
* />
* );
* };
* ```
* @group Events
*/
var EmbedEvent;
(function (EmbedEvent) {
/**
* Rendering has initialized.
* @example
*```js
* liveboardEmbed.on(EmbedEvent.Init, showLoader)
* //show a loader
* function showLoader() {
* document.getElementById("loader");
* }
*```
* @returns timestamp - The timestamp when the event was generated.
*/
EmbedEvent["Init"] = "init";
/**
* Authentication has either succeeded or failed.
* @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
* @example
*```js
* appEmbed.on(EmbedEvent.AuthInit, payload => {
* console.log('AuthInit', payload);
* })
*```
* @returns isLoggedIn - A Boolean specifying whether authentication was successful.
*/
EmbedEvent["AuthInit"] = "authInit";
/**
* The embed object container has loaded.
* @returns timestamp - The timestamp when the event was generated.
* @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
* @example
*```js
* liveboardEmbed.on(EmbedEvent.Load, hideLoader)
* //hide loader
* function hideLoader() {
* document.getElementById("loader");
* }
*```
*/
EmbedEvent["Load"] = "load";
/**
* Data pertaining to an Answer, Liveboard or Spotter visualization is received.
* The event payload includes the raw data of the object.
* @return data - Answer of Liveboard data
* @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
* @example
*```js
* liveboardEmbed.on(EmbedEvent.Data, payload => {
* console.log('data', payload);
* })
*```
* @important
*/
EmbedEvent["Data"] = "data";
/**
* Search query has been updated by the user.
* @version SDK: 1.4.0 | ThoughtSpot: ts7.sep.cl, 8.4.1.sw
* @example
*```js
* searchEmbed.on(EmbedEvent.QueryChanged, payload => console.log('data', payload))
*```
*/
EmbedEvent["QueryChanged"] = "queryChanged";
/**
* A drill-down operation has been performed.
* @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
* @returns additionalFilters - Any additional filters applied
* @returns drillDownColumns - The columns on which drill down was performed
* @returns nonFilteredColumns - The columns that were not filtered
* @example
*```js
* searchEmbed.on(EmbedEvent.DrillDown, {
* points: {
* clickedPoint,
* selectedPoints: selectedPoint
* },
* autoDrillDown: true,
* })
*```
* In this example, `VizPointDoubleClick` event is used for
* triggering the `DrillDown` event when an area or specific
* data point on a table or chart is double-clicked.
* @example
*```js
* searchEmbed.on(EmbedEvent.VizPointDoubleClick, (payload) => {
* console.log(payload);
* const clickedPoint = payload.data.clickedPoint;
* const selectedPoint = payload.data.selectedPoints;
* console.log('>>> called', clickedPoint);
* embed.trigger(HostEvent.DrillDown, {
* points: {
* clickedPoint,
* selectedPoints: selectedPoint
* },
* autoDrillDown: true,
* })
* })
*```
*/
EmbedEvent["Drilldown"] = "drillDown";
/**
* One or more data sources have been selected.
* @returns dataSourceIds - the list of data sources
* @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
* @example
* ```js
* searchEmbed.on(EmbedEvent.DataSourceSelected, payload => {
* console.log('DataSourceSelected', payload);
* })
* ```
*/
EmbedEvent["DataSourceSelected"] = "dataSourceSelected";
/**
* One or more data columns have been selected.
* @returns columnIds - the list of columns
* @version SDK: 1.10.0 | ThoughtSpot: 8.2.0.cl, 8.4.1.sw
* @example
* ```js
* appEmbed.on(EmbedEvent.AddRemoveColumns, payload => {
* console.log('AddRemoveColumns', payload);
* })
* ```
*/
EmbedEvent["AddRemoveColumns"] = "addRemoveColumns";
/**
* A custom action has been triggered.
* @returns actionId - ID of the custom action
* @returns payload {@link CustomActionPayload} - Response payload with the
* Answer or Liveboard data
* @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
* @example
* ```js
* appEmbed.on(EmbedEvent.customAction, payload => {
* const data = payload.data;
* if (data.id === 'insert Custom Action ID here') {
* console.log('Custom Action event:', data.embedAnswerData);
* }
* })
* ```
*/
EmbedEvent["CustomAction"] = "customAction";
/**
* Listen to double click actions on a visualization.
* @return ContextMenuInputPoints - Data point that is double-clicked
* @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
* @example
* ```js
* LiveboardEmbed.on(EmbedEvent.VizPointDoubleClick, payload => {
* console.log('VizPointDoubleClick', payload);
* })
* ```
*/
EmbedEvent["VizPointDoubleClick"] = "vizPointDoubleClick";
/**
* Listen to clicks on a visualization in a Liveboard or Search result.
* @return viz, clickedPoint - metadata about the point that is clicked
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
* @important
* @example
* ```js
* embed.on(EmbedEvent.VizPointClick, ({data}) => {
* console.log(
* data.vizId, // viz id
* data.clickedPoint.selectedAttributes[0].value,
* data.clickedPoint.selectedAttributes[0].column.name,
* data.clickedPoint.selectedMeasures[0].value,
* data.clickedPoint.selectedMeasures[0].column.name,
* )
* });
* ```
*/
EmbedEvent["VizPointClick"] = "vizPointClick";
/**
* An error has occurred. This event is fired for the following error types:
*
* `API` - API call failure error.
* `FULLSCREEN` - Error when presenting a Liveboard or visualization in full screen
* mode. `SINGLE_VALUE_FILTER` - Error due to multiple values in the single value
* filter. `NON_EXIST_FILTER` - Error due to a non-existent filter.
* `INVALID_DATE_VALUE` - Invalid date value error.
* `INVALID_OPERATOR` - Use of invalid operator during filter application.
*
* For more information, see https://developers.thoughtspot.com/docs/events-app-integration#errorType
* @returns error - An error object or message
* @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
* @example
* ```js
* // API error
* SearchEmbed.on(EmbedEvent.Error, (error) => {
* console.log(error);
* // { type: "Error", data: { errorType: "API", error: { message: '...', error: '...' } } }
* // { errorType: "API", message: '...', code: '...' } new format
* });
* ```
* @example
* ```js
* // Fullscreen error (Errors during presenting of a liveboard)
* LiveboardEmbed.on(EmbedEvent.Error, (error) => {
* console.log(error);
* // { type: "Error", data: { errorType: "FULLSCREEN", error: {
* // message: "Fullscreen API is not enabled",
* // stack: "..."
* // } }}
* // { errorType: "FULLSCREEN", message: "Fullscreen API is not enabled", code: '...' } new format
* })
* ```
*/
EmbedEvent["Error"] = "Error";
/**
* The embedded object has sent an alert.
* @returns alert - An alert object
* @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
* @example
* ```js
* searchEmbed.on(EmbedEvent.Alert)
* ```
*/
EmbedEvent["Alert"] = "alert";
/**
* The ThoughtSpot authentication session has expired.
* @version SDK: 1.4.0 | ThoughtSpot: ts7.sep.cl, 8.4.1.sw
* @example
*```js
* appEmbed.on(EmbedEvent.AuthExpire, showAuthExpired)
* //show auth expired banner
* function showAuthExpired() {
* document.getElementById("authExpiredBanner");
* }
*```
*/
EmbedEvent["AuthExpire"] = "ThoughtspotAuthExpired";
/**
* ThoughtSpot failed to validate the auth session.
* @hidden
*/
EmbedEvent["AuthFailure"] = "ThoughtspotAuthFailure";
/**
* ThoughtSpot failed to re validate the auth session.
* @hidden
*/
EmbedEvent["IdleSessionTimeout"] = "IdleSessionTimeout";
/**
* ThoughtSpot failed to validate the auth session.
* @hidden
*/
EmbedEvent["AuthLogout"] = "ThoughtspotAuthLogout";
/**
* The height of the embedded Liveboard or visualization has been computed.
* @returns data - The height of the embedded Liveboard or visualization
* @hidden
*/
EmbedEvent["EmbedHeight"] = "EMBED_HEIGHT";
/**
* The center of visible iframe viewport is calculated.
* @returns data - The center of the visible Iframe viewport.
* @hidden
*/
EmbedEvent["EmbedIframeCenter"] = "EmbedIframeCenter";
/**
* Emitted when the **Get Data** action is initiated.
* Applicable to `SearchBarEmbed` only.
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
* @example
*```js
* searchbarEmbed.on(EmbedEvent.GetDataClick)
* .then(data => {
* console.log('Answer Data:', data);
* })
*```
*/
EmbedEvent["GetDataClick"] = "getDataClick";
/**
* Detects the route change.
* @version SDK: 1.7.0 | ThoughtSpot: 8.0.0.cl, 8.4.1.sw
* @example
*```js
* searchEmbed.on(EmbedEvent.RouteChange, payload =>
* console.log('data', payload))
*```
*/
EmbedEvent["RouteChange"] = "ROUTE_CHANGE";
/**
* The v1 event type for Data
* @hidden
*/
EmbedEvent["V1Data"] = "exportVizDataToParent";
/**
* Emitted when the embed does not have cookie access. This happens
* when Safari and other Web browsers block third-party cookies
* are blocked by default. `NoCookieAccess` can trigger.
* @example
*```js
* appEmbed.on(EmbedEvent.NoCookieAccess)
*```
* @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 7.2.1.sw
*/
EmbedEvent["NoCookieAccess"] = "noCookieAccess";
/**
* Emitted when SAML is complete
* @private
* @hidden
*/
EmbedEvent["SAMLComplete"] = "samlComplete";
/**
* Emitted when any modal is opened in the app
* @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
* @example
*```js
* appEmbed.on(EmbedEvent.DialogOpen, payload => {
* console.log('dialog open', payload);
* })
*```
*/
EmbedEvent["DialogOpen"] = "dialog-open";
/**
* Emitted when any modal is closed in the app
* @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
* @example
*```js
* appEmbed.on(EmbedEvent.DialogClose, payload => {
* console.log('dialog close', payload);
* })
*```
*/
EmbedEvent["DialogClose"] = "dialog-close";
/**
* Emitted when the Liveboard shell loads.
* You can use this event as a hook to trigger
* other events on the rendered Liveboard.
* @version SDK: 1.9.1 | ThoughtSpot: 8.1.0.cl, 8.4.1.sw
* @example
*```js
* liveboardEmbed.on(EmbedEvent.LiveboardRendered, payload => {
console.log('Liveboard is rendered', payload);
})
*```
* The following example shows how to trigger
* `SetVisibleVizs` event using LiveboardRendered embed event:
* @example
*```js
* const embedRef = useEmbedRef();
* const onLiveboardRendered = () => {
* embed.trigger(HostEvent.SetVisibleVizs, ['viz1', 'viz2']);
* };
*```
*/
EmbedEvent["LiveboardRendered"] = "PinboardRendered";
/**
* Emits all events.
* @Version SDK: 1.10.0 | ThoughtSpot: 8.2.0.cl, 8.4.1.sw
* @example
*```js
* appEmbed.on(EmbedEvent.ALL, payload => {
* console.log('Embed Events', payload)
* })
*```
*/
EmbedEvent["ALL"] = "*";
/**
* Emitted when an Answer is saved in the app.
* Use start:true to subscribe to when save is initiated, or end:true to subscribe to when save is completed. Default is end:true.
* @Version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
* @example
*```js
* //Emit when action starts
* searchEmbed.on(EmbedEvent.Save, payload => {
* console.log('Save', payload)
* }, {
* start: true
* })
* //emit when action ends
* searchEmbed.on(EmbedEvent.Save, payload => {
* console.log('Save', payload)
* })
*```
*/
EmbedEvent["Save"] = "save";
/**
* Emitted when the download action is triggered on an Answer.
*
* **Note**: This event is deprecated in v1.21.0.
* To fire an event when a download action is initiated on a chart or table,
* use `EmbedEvent.DownloadAsPng`, `EmbedEvent.DownloadAsPDF`,
* `EmbedEvent.DownloadAsCSV`, or `EmbedEvent.DownloadAsXLSX`
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
* @example
*```js
* liveboardEmbed.on(EmbedEvent.Download, {
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
* })
*```
*/
EmbedEvent["Download"] = "download";
/**
* Emitted when the download action is triggered on an Answer.
* Use start:true to subscribe to when download is initiated, or end:true to subscribe to when download is completed. Default is end:true.
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.0.sw
* @example
*```js
* //emit when action starts
* searchEmbed.on(EmbedEvent.DownloadAsPng, payload => {
* console.log('download PNG', payload)}, {start: true })
* //emit when action ends
* searchEmbed.on(EmbedEvent.DownloadAsPng, payload => {
* console.log('download PNG', payload)})
*```
*/
EmbedEvent["DownloadAsPng"] = "downloadAsPng";
/**
* Emitted when the Download as PDF action is triggered on an Answer
* Use start:true to subscribe to when download as PDF is initiated, or end:true to subscribe to when download as PDF is completed. Default is end:true.
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
* @example
*```js
* //emit when action starts
* searchEmbed.on(EmbedEvent.DownloadAsPdf, payload => {
* console.log('download PDF', payload)}, {start: true })
* //emit when action ends
* searchEmbed.on(EmbedEvent.DownloadAsPdf, payload => {
* console.log('download PDF', payload)})
*```
*/
EmbedEvent["DownloadAsPdf"] = "downloadAsPdf";
/**
* Emitted when the Download as CSV action is triggered on an Answer.
* Use start:true to subscribe to when download as CSV is initiated, or end:true to subscribe to when download as CSV is completed. Default is end:true.
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
* @example
*```js
* //emit when action starts
* searchEmbed.on(EmbedEvent.DownloadAsCSV, payload => {
* console.log('download CSV', payload)}, {start: true })
* //emit when action ends
* searchEmbed.on(EmbedEvent.DownloadAsCSV, payload => {
* console.log('download CSV', payload)})
*```
*/
EmbedEvent["DownloadAsCsv"] = "downloadAsCsv";
/**
* Emitted when the Download as XLSX action is triggered on an Answer.
* Use start:true to subscribe to when download as XLSX is initiated, or end:true to subscribe to when download as XLSX is completed. Default is end:true.
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
* @example
*```js
* //emit when action starts
* searchEmbed.on(EmbedEvent.DownloadAsXlsx, payload => {
* console.log('download Xlsx', payload)}, { start: true })
* //emit when action ends
* searchEmbed.on(EmbedEvent.DownloadAsXlsx, payload => {
* console.log('download Xlsx', payload)})
*```
*/
EmbedEvent["DownloadAsXlsx"] = "downloadAsXlsx";
/**
* Emitted when an Answer is deleted in the app
* Use start:true to subscribe to when delete is initiated, or end:true to subscribe to when delete is completed. Default is end:true.
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
* @example
*```js
* //emit when action starts
* appEmbed.on(EmbedEvent.AnswerDelete, payload => {
* console.log('delete answer', payload)}, {start: true })
* //trigger when action is completed
* appEmbed.on(EmbedEvent.AnswerDelete, payload => {
* console.log('delete answer', payload)})
*```
*/
EmbedEvent["AnswerDelete"] = "answerDelete";
/**
* Emitted when the AI Highlights action is triggered on a Liveboard
* @version SDK: 1.44.0 | ThoughtSpot: 10.15.0.cl
* @example
*```js
* liveboardEmbed.on(EmbedEvent.AIHighlights, (payload) => {
* console.log('AI Highlights', payload);
* })
*```
*/
EmbedEvent["AIHighlights"] = "AIHighlights";
/**
* Emitted when a user initiates the Pin action to
* add an Answer to a Liveboard.
* Use start:true to subscribe to when pin is initiated, or end:true to subscribe to when pin is completed. Default is end:true.
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
* @example
*```js
* //emit when action starts
* searchEmbed.on(EmbedEvent.Pin, payload => {
* console.log('pin', payload)
* }, {
* start: true
* })
* //emit when action ends
* searchEmbed.on(EmbedEvent.Pin, payload => {
* console.log('pin', payload)
* })
*```
*/
EmbedEvent["Pin"] = "pin";
/**
* Emitted when SpotIQ analysis is triggered
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
* @example
*```js
* //emit when action starts
* searchEmbed.on(EmbedEvent.SpotIQAnalyze, payload => {
* console.log('SpotIQAnalyze', payload)
* }, {
* start: true
* })
* //emit when action ends
* searchEmbed.on(EmbedEvent.SpotIQAnalyze, payload => {
* console.log('SpotIQ analyze', payload)
* })
*```
*/
EmbedEvent["SpotIQAnalyze"] = "spotIQAnalyze";
/**
* Emitted when a user shares an object with another user or group
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
* @example
*```js
* //emit when action starts
* searchEmbed.on(EmbedEvent.Share, payload => {
* console.log('Share', payload)
* }, {
* start: true
* })
* //emit when action ends
* searchEmbed.on(EmbedEvent.Share, payload => {
* console.log('Share', payload)
* })
*```
*/
EmbedEvent["Share"] = "share";
/**
* Emitted when a user clicks the **Include** action to include a specific value or
* data on a chart or table.
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
* @example
*```js
* appEmbed.on(EmbedEvent.DrillInclude, payload => {
* console.log('Drill include', payload);
* })
*```
*/
EmbedEvent["DrillInclude"] = "context-menu-item-include";
/**
* Emitted when a user clicks the **Exclude** action to exclude a specific value or
* data on a chart or table
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
* @example
*```js
* appEmbed.on(EmbedEvent.DrillExclude, payload => {
* console.log('Drill exclude', payload);
* })
*```
*/
EmbedEvent["DrillExclude"] = "context-menu-item-exclude";
/**
* Emitted when a column value is copied in the embedded app.
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
* @example
*```js
* seachEmbed.on(EmbedEvent.CopyToClipboard, payload => {
* console.log('copy to clipboard', payload);
* })
*```
*/
EmbedEvent["CopyToClipboard"] = "context-menu-item-copy-to-clipboard";
/**
* Emitted when a user clicks the **Update TML** action on
* embedded Liveboard.
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
* @example
*```js
* liveboardEmbed.on(EmbedEvent.UpdateTML)
* })
*```
*/
EmbedEvent["UpdateTML"] = "updateTSL";
/**
* Emitted when a user clicks the **Edit TML** action
* on an embedded Liveboard.
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
* @example
*```js
* appEmbed.on(EmbedEvent.EditTML, payload => {
* console.log('Edit TML', payload);
* })
*```
*/
EmbedEvent["EditTML"] = "editTSL";
/**
* Emitted when the **Export TML** action is triggered on an
* an embedded object in the app
* Use start:true to subscribe to when export is initiated, or end:true to subscribe to when export is completed. Default is end:true.
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
* @example
*```js
* //emit when action starts
* searchEmbed.on(EmbedEvent.ExportTML, payload => {
* console.log('Export TML', payload)}, { start: true })
* //emit when action ends
* searchEmbed.on(EmbedEvent.ExportTML, payload => {
* console.log('Export TML', payload)})
*```
*/
EmbedEvent["ExportTML"] = "exportTSL";
/**
* Emitted when an Answer is saved as a View.
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
* @example
*```js
* appEmbed.on(EmbedEvent.SaveAsView, payload => {
* console.log('View', payload);
* })
*```
*/
EmbedEvent["SaveAsView"] = "saveAsView";
/**
* Emitted when the user creates a copy of an Answer.
* Use start:true to subscribe to when copy and edit is initiated, or end:true to subscribe to when copy and edit is completed. Default is end:true.
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
* @example
*```js
* //emit when action starts
* appEmbed.on(EmbedEvent.CopyAEdit, payload => {
* console.log('Copy and edit', payload)}, {start: true })
* //emit when action ends
* appEmbed.on(EmbedEvent.CopyAEdit, payload => {
* console.log('Copy and edit', payload)})
*```
*/
EmbedEvent["CopyAEdit"] = "copyAEdit";
/**
* Emitted when a user clicks *Show underlying data* on an Answer.
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
* @example
*```js
* liveboardEmbed.on(EmbedEvent.ShowUnderlyingData, payload => {
* console.log('show data', payload);
* })
*```
*/
EmbedEvent["ShowUnderlyingData"] = "showUnderlyingData";
/**
* Emitted when an Answer is switched to a chart or table view.
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
* @example
*```js
* searchEmbed.on(EmbedEvent.AnswerChartSwitcher, payload => {
* console.log('switch view', payload);
* })
*```
*/
EmbedEvent["AnswerChartSwitcher"] = "answerChartSwitcher";
/**
* Internal event to communicate the initial settings back to the ThoughtSpot app
* @hidden
*/
EmbedEvent["APP_INIT"] = "appInit";
/**
* Internal event to clear the cached info
* @hidden
*/
EmbedEvent["CLEAR_INFO_CACHE"] = "clearInfoCache";
/**
* Emitted when a user clicks **Show Liveboard details** on a Liveboard
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
* @example
*```js
* liveboardEmbed.on(EmbedEvent.LiveboardInfo, payload => {
* console.log('Liveboard details', payload);
* })
*```
*/
EmbedEvent["LiveboardInfo"] = "pinboardInfo";
/**
* Emitted when a user clicks on the Favorite icon on a Liveboard
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
* @example
*```js
* liveboardEmbed.on(EmbedEvent.AddToFavorites, payload => {
* console.log('favorites', payload);
* })
*```
*/
EmbedEvent["AddToFavorites"] = "addToFavorites";
/**
* Emitted when a user clicks **Schedule** on a Liveboard
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
* @example
*```js
* liveboardEmbed.on(EmbedEvent.Schedule, payload => {
* console.log(`Liveboard schedule', payload);
* })
*```
*/
EmbedEvent["Schedule"] = "subscription";
/**
* Emitted when a user clicks **Edit** on a Liveboard or visualization
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
* @example
*```js
* liveboardEmbed.on(EmbedEvent.Edit, payload => {
* console.log(`Liveboard edit', payload);
* })
*```
*/
EmbedEvent["Edit"] = "edit";
/**
* Emitted when a user clicks *Make a copy* on a Liveboard
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
* @example
*```js
* liveboardEmbed.on(EmbedEvent.MakeACopy, payload => {
* console.log(`Copy', payload);
* })
*```
*/
EmbedEvent["MakeACopy"] = "makeACopy";
/**
* Emitted when a user clicks **Present** on a Liveboard or visualization
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
* @example
*```js
* liveboardEmbed.on(EmbedEvent.Present)
*```
* @example
*```js
* liveboardEmbed.on(EmbedEvent.Present, {
* vizId: '730496d6-6903-4601-937e-2c691821af3c'})
* })
*```
*/
EmbedEvent["Present"] = "present";
/**
* Emitted when a user clicks **Delete** on a visualization
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
* @example
*```js
* liveboardEmbed.on(EmbedEvent.Delete,
* {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
*```
*/
EmbedEvent["Delete"] = "delete";
/**
* Emitted when a user clicks Manage schedules on a Liveboard
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
* @example
*```js
* liveboardEmbed.on(EmbedEvent.SchedulesList)
*```
*/
EmbedEvent["SchedulesList"] = "schedule-list";
/**
* Emitted when a user clicks **Cancel** in edit mode on a Liveboard
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
* @example
*```js
* liveboardEmbed.on(EmbedEvent.Cancel)
*```
*/
EmbedEvent["Cancel"] = "cancel";
/**
* Emitted when a user clicks **Explore** on a visualization
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
* @example
*```js
* liveboardEmbed.on(EmbedEvent.Explore, {
* vizId: '730496d6-6903-4601-937e-2c691821af3c'})
*```
*/
EmbedEvent["Explore"] = "explore";
/**
* Emitted when a user clicks **Copy link** action on a visualization.
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
* @example
*```js
* liveboardEmbed.on(EmbedEvent.CopyLink, {
* vizId: '730496d6-6903-4601-937e-2c691821af3c'})
*```
*/
EmbedEvent["CopyLink"] = "embedDocument";
/**
* Emitted when a user interacts with cross filters on a
* visualization or Liveboard.
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.5.0.sw
* @example
*```js
* liveboardEmbed.on(EmbedEvent.CrossFilterChanged, {
* vizId: '730496d6-6903-4601-937e-2c691821af3c'})
*```
*/
EmbedEvent["CrossFilterChanged"] = "cross-filter-changed";
/**
* Emitted when a user right clicks on a visualization (chart or table)
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.5.0.sw
* @example
*```js
* LiveboardEmbed.on(EmbedEvent.VizPointRightClick, payload => {
* console.log('VizPointClick', payload)
* })
*```
*/
EmbedEvent["VizPointRightClick"] = "vizPointRightClick";
/**
* Emitted when a user clicks **Insert to slide** on a visualization
* @hidden
*/
EmbedEvent["InsertIntoSlide"] = "insertInToSlide";
/**
* Emitted when a user changes any filter on a Liveboard.
* Returns filter type and name, column name and ID, and runtime
* filter details.
* @example
*
*```js
* LiveboardEmbed.on(EmbedEvent.FilterChanged, (payload) => {
* console.log('payload', payload);
* })
*
* @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl, 9.5.0.sw
*/
EmbedEvent["FilterChanged"] = "filterChanged";
/**
* Emitted when a user clicks the **Go** button to initiate
* a Natural Language Search query
* @version SDK : 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
*/
EmbedEvent["SageEmbedQuery"] = "sageEmbedQuery";
/**
* Emitted when a user selects a data source on the embedded
* Natural Language Search interface.
*
* @version SDK : 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
*/
EmbedEvent["SageWorksheetUpdated"] = "sageWorksheetUpdated";
/**
* Emitted when a user updates a connection on the **Data** page
* @version SDK : 1.27.0 | ThoughtSpot: 9.8.0.cl, 9.8.0.sw
*/
EmbedEvent["UpdateConnection"] = "updateConnection";
/**
* Emitted when a user updates a connection on the **Data** page
* @version SDK : 1.27.0 | ThoughtSpot: 9.8.0.cl, 9.8.0.sw
*/
EmbedEvent["CreateConnection"] = "createConnection";
/**
* Emitted when name, status (private or public) or filter values of a
* Personalised view is updated.
* @returns viewName: string
* @returns viewId: string
* @returns liveboardId: string
* @returns isPublic: boolean
* @version SDK : 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
*/
EmbedEvent["UpdatePersonalisedView"] = "updatePersonalisedView";
/**
* Emitted when a Personalised view is saved.
* @returns viewName: string
* @returns viewId: string
* @returns liveboardId: string
* @returns isPublic: boolean
* @version SDK : 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
*/
EmbedEvent["SavePersonalisedView"] = "savePersonalisedView";
/**
* Emitted when a Liveboard is reset.
* @returns viewName: string
* @returns viewId: string
* @returns liveboardId: string
* @returns isPublic: boolean
* @version SDK : 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
*/
EmbedEvent["ResetLiveboard"] = "resetLiveboard";
/**
* Emitted when a PersonalisedView is deleted.
* @returns views: string[]
* @returns liveboardId: string
* @version SDK : 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
*/
EmbedEvent["DeletePersonalisedView"] = "deletePersonalisedView";
/**
* Emitted when a user creates a Worksheet.
* @version SDK : 1.27.0 | ThoughtSpot: 9.8.0.cl, 9.8.0.sw
*/
EmbedEvent["CreateWorksheet"] = "createWorksheet";
/**
* Emitted when the *Ask Sage* is initialized.
* @returns viewName: string
* @returns viewId: string
* @returns liveboardId: string
* @returns isPublic: boolean
* @version SDK : 1.29.0 | ThoughtSpot Cloud: 9.12.0.cl
*/
EmbedEvent["AskSageInit"] = "AskSageInit";
/**
* Emitted when a Liveboard or visualization is renamed.
* @version SDK : 1.28.0 | ThoughtSpot: 9.10.5.cl, 10.1.0.sw
*/
EmbedEvent["Rename"] = "rename";
/**
*
* This event can be emitted to intercept search execution initiated by
* the users and implement the logic to allow or restrict search execution.
* You can can also show custom error text if the search query must be
* restricted due to your application or business requirements.
* Prerequisite: Set `isOnBeforeGetVizDataInterceptEnabled` to `true`
* for this embed event to get emitted.
* @param:payload The payload received from the embed related to the Data API call.
* @param:responder
* Contains elements that lets developers define whether ThoughtSpot
* should run the search, and if not, what error message
* should be shown to the user.
*