@thoughtspot/visual-embed-sdk 1.46.3 → 1.46.5-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/package.json +3 -3
- package/cjs/src/auth.d.ts +2 -1
- package/cjs/src/auth.d.ts.map +1 -1
- package/cjs/src/auth.js +2 -1
- package/cjs/src/auth.js.map +1 -1
- package/cjs/src/authToken.d.ts.map +1 -1
- package/cjs/src/authToken.js.map +1 -1
- package/cjs/src/css-variables.d.ts +51 -17
- package/cjs/src/css-variables.d.ts.map +1 -1
- package/cjs/src/embed/app.d.ts +1 -0
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +10 -1
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/app.spec.js +46 -1
- package/cjs/src/embed/app.spec.js.map +1 -1
- package/cjs/src/embed/base.d.ts.map +1 -1
- package/cjs/src/embed/base.js.map +1 -1
- package/cjs/src/embed/base.spec.js.map +1 -1
- package/cjs/src/embed/events.spec.js +72 -0
- package/cjs/src/embed/events.spec.js.map +1 -1
- package/cjs/src/embed/hostEventClient/contracts.d.ts +74 -3
- package/cjs/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/cjs/src/embed/hostEventClient/contracts.js +7 -0
- package/cjs/src/embed/hostEventClient/contracts.js.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.d.ts +10 -0
- package/cjs/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.js +46 -9
- package/cjs/src/embed/hostEventClient/host-event-client.js.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.spec.js +155 -0
- package/cjs/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts +1 -0
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +11 -2
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/liveboard.spec.js +96 -2
- package/cjs/src/embed/liveboard.spec.js.map +1 -1
- package/cjs/src/embed/sage.d.ts.map +1 -1
- package/cjs/src/embed/sage.js.map +1 -1
- package/cjs/src/embed/search.spec.js.map +1 -1
- package/cjs/src/embed/ts-embed.d.ts +41 -2
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +41 -2
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/react/index.d.ts.map +1 -1
- package/cjs/src/react/index.js +58 -53
- package/cjs/src/react/index.js.map +1 -1
- package/cjs/src/types.d.ts +730 -32
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +734 -3
- package/cjs/src/types.js.map +1 -1
- package/cjs/src/utils/graphql/answerService/answerService.d.ts +4 -2
- package/cjs/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
- package/cjs/src/utils/graphql/answerService/answerService.js +4 -2
- package/cjs/src/utils/graphql/answerService/answerService.js.map +1 -1
- package/cjs/src/utils/graphql/preview-service.d.ts.map +1 -1
- package/cjs/src/utils/graphql/preview-service.js.map +1 -1
- package/cjs/src/utils/processData.d.ts.map +1 -1
- package/cjs/src/utils/processData.js.map +1 -1
- package/dist/{index-DyX-x6uN.js → index-DW2wEHqy.js} +1 -1
- package/dist/src/auth.d.ts +2 -1
- package/dist/src/auth.d.ts.map +1 -1
- package/dist/src/authToken.d.ts.map +1 -1
- package/dist/src/css-variables.d.ts +51 -17
- package/dist/src/css-variables.d.ts.map +1 -1
- package/dist/src/embed/app.d.ts +1 -0
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/base.d.ts.map +1 -1
- package/dist/src/embed/hostEventClient/contracts.d.ts +74 -3
- package/dist/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/dist/src/embed/hostEventClient/host-event-client.d.ts +10 -0
- package/dist/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts +1 -0
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/embed/sage.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.d.ts +41 -2
- package/dist/src/embed/ts-embed.d.ts.map +1 -1
- package/dist/src/react/index.d.ts.map +1 -1
- package/dist/src/types.d.ts +730 -32
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/graphql/answerService/answerService.d.ts +4 -2
- package/dist/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
- package/dist/src/utils/graphql/preview-service.d.ts.map +1 -1
- package/dist/src/utils/processData.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +917 -77
- package/dist/tsembed-react.js +915 -75
- package/dist/tsembed.es.js +859 -24
- package/dist/tsembed.js +857 -22
- package/dist/visual-embed-sdk-react-full.d.ts +892 -54
- package/dist/visual-embed-sdk-react.d.ts +892 -54
- package/dist/visual-embed-sdk.d.ts +912 -56
- package/lib/package.json +3 -3
- package/lib/src/auth.d.ts +2 -1
- package/lib/src/auth.d.ts.map +1 -1
- package/lib/src/auth.js +2 -1
- package/lib/src/auth.js.map +1 -1
- package/lib/src/authToken.d.ts.map +1 -1
- package/lib/src/authToken.js.map +1 -1
- package/lib/src/css-variables.d.ts +51 -17
- package/lib/src/css-variables.d.ts.map +1 -1
- package/lib/src/embed/app.d.ts +1 -0
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +10 -1
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/app.spec.js +46 -1
- package/lib/src/embed/app.spec.js.map +1 -1
- package/lib/src/embed/base.d.ts.map +1 -1
- package/lib/src/embed/base.js.map +1 -1
- package/lib/src/embed/base.spec.js.map +1 -1
- package/lib/src/embed/events.spec.js +73 -1
- package/lib/src/embed/events.spec.js.map +1 -1
- package/lib/src/embed/hostEventClient/contracts.d.ts +74 -3
- package/lib/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/lib/src/embed/hostEventClient/contracts.js +7 -0
- package/lib/src/embed/hostEventClient/contracts.js.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.d.ts +10 -0
- package/lib/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.js +46 -9
- package/lib/src/embed/hostEventClient/host-event-client.js.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.spec.js +155 -0
- package/lib/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts +1 -0
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +11 -2
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +96 -2
- package/lib/src/embed/liveboard.spec.js.map +1 -1
- package/lib/src/embed/sage.d.ts.map +1 -1
- package/lib/src/embed/sage.js.map +1 -1
- package/lib/src/embed/search.spec.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts +41 -2
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +42 -3
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/react/index.d.ts.map +1 -1
- package/lib/src/react/index.js +58 -53
- package/lib/src/react/index.js.map +1 -1
- package/lib/src/types.d.ts +730 -32
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +734 -3
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils/graphql/answerService/answerService.d.ts +4 -2
- package/lib/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
- package/lib/src/utils/graphql/answerService/answerService.js +4 -2
- package/lib/src/utils/graphql/answerService/answerService.js.map +1 -1
- package/lib/src/utils/graphql/preview-service.d.ts.map +1 -1
- package/lib/src/utils/graphql/preview-service.js.map +1 -1
- package/lib/src/utils/processData.d.ts.map +1 -1
- package/lib/src/utils/processData.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +973 -116
- package/package.json +3 -3
- package/src/auth.spec.ts +1 -1
- package/src/auth.ts +2 -1
- package/src/authToken.ts +0 -1
- package/src/css-variables.ts +51 -17
- package/src/embed/app.spec.ts +62 -3
- package/src/embed/app.ts +10 -1
- package/src/embed/base.spec.ts +1 -2
- package/src/embed/base.ts +1 -4
- package/src/embed/events.spec.ts +88 -0
- package/src/embed/hostEventClient/contracts.ts +74 -2
- package/src/embed/hostEventClient/host-event-client.spec.ts +257 -0
- package/src/embed/hostEventClient/host-event-client.ts +70 -15
- package/src/embed/liveboard.spec.ts +126 -2
- package/src/embed/liveboard.ts +11 -2
- package/src/embed/sage.ts +0 -1
- package/src/embed/search.spec.ts +0 -2
- package/src/embed/ts-embed.ts +43 -3
- package/src/react/index.tsx +76 -72
- package/src/types.ts +739 -31
- package/src/utils/graphql/answerService/answerService.ts +4 -5
- package/src/utils/graphql/preview-service.ts +0 -1
- package/src/utils/processData.ts +0 -5
package/cjs/src/types.js
CHANGED
|
@@ -56,6 +56,7 @@ var AuthType;
|
|
|
56
56
|
* @deprecated This option is deprecated.
|
|
57
57
|
* @hidden
|
|
58
58
|
*/
|
|
59
|
+
// eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values
|
|
59
60
|
AuthType["SAML"] = "SSO_SAML";
|
|
60
61
|
/**
|
|
61
62
|
* SSO using SAML
|
|
@@ -101,6 +102,7 @@ var AuthType;
|
|
|
101
102
|
* });
|
|
102
103
|
* ```
|
|
103
104
|
*/
|
|
105
|
+
// eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values
|
|
104
106
|
AuthType["SAMLRedirect"] = "SSO_SAML";
|
|
105
107
|
/**
|
|
106
108
|
* SSO using OIDC
|
|
@@ -114,6 +116,7 @@ var AuthType;
|
|
|
114
116
|
* Will make the host application redirect to the OIDC IdP.
|
|
115
117
|
* See code samples in {@link SAMLRedirect}.
|
|
116
118
|
*/
|
|
119
|
+
// eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values
|
|
117
120
|
AuthType["OIDCRedirect"] = "SSO_OIDC";
|
|
118
121
|
/**
|
|
119
122
|
* Trusted authentication server
|
|
@@ -139,6 +142,7 @@ var AuthType;
|
|
|
139
142
|
* });
|
|
140
143
|
* ```
|
|
141
144
|
*/
|
|
145
|
+
// eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values
|
|
142
146
|
AuthType["TrustedAuthToken"] = "AuthServer";
|
|
143
147
|
/**
|
|
144
148
|
* Trusted authentication server Cookieless, Use your own authentication
|
|
@@ -1278,22 +1282,45 @@ var EmbedEvent;
|
|
|
1278
1282
|
/**
|
|
1279
1283
|
* Emitted when name, status (private or public) or filter values of a
|
|
1280
1284
|
* Personalised view is updated.
|
|
1285
|
+
* This event is deprecated. Use {@link EmbedEvent.UpdatePersonalizedView} instead.
|
|
1281
1286
|
* @returns viewName: string
|
|
1282
1287
|
* @returns viewId: string
|
|
1283
1288
|
* @returns liveboardId: string
|
|
1284
1289
|
* @returns isPublic: boolean
|
|
1285
1290
|
* @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
|
|
1291
|
+
* @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
1286
1292
|
*/
|
|
1287
1293
|
EmbedEvent["UpdatePersonalisedView"] = "updatePersonalisedView";
|
|
1294
|
+
/**
|
|
1295
|
+
* Emitted when name, status (private or public) or filter values of a
|
|
1296
|
+
* Personalized view is updated.
|
|
1297
|
+
* @returns viewName: string
|
|
1298
|
+
* @returns viewId: string
|
|
1299
|
+
* @returns liveboardId: string
|
|
1300
|
+
* @returns isPublic: boolean
|
|
1301
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
1302
|
+
*/
|
|
1303
|
+
EmbedEvent["UpdatePersonalizedView"] = "updatePersonalisedView";
|
|
1288
1304
|
/**
|
|
1289
1305
|
* Emitted when a Personalised view is saved.
|
|
1306
|
+
* This event is deprecated. Use {@link EmbedEvent.SavePersonalizedView} instead.
|
|
1290
1307
|
* @returns viewName: string
|
|
1291
1308
|
* @returns viewId: string
|
|
1292
1309
|
* @returns liveboardId: string
|
|
1293
1310
|
* @returns isPublic: boolean
|
|
1294
1311
|
* @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
|
|
1312
|
+
* @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
1295
1313
|
*/
|
|
1296
1314
|
EmbedEvent["SavePersonalisedView"] = "savePersonalisedView";
|
|
1315
|
+
/**
|
|
1316
|
+
* Emitted when a Personalized view is saved.
|
|
1317
|
+
* @returns viewName: string
|
|
1318
|
+
* @returns viewId: string
|
|
1319
|
+
* @returns liveboardId: string
|
|
1320
|
+
* @returns isPublic: boolean
|
|
1321
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
1322
|
+
*/
|
|
1323
|
+
EmbedEvent["SavePersonalizedView"] = "savePersonalisedView";
|
|
1297
1324
|
/**
|
|
1298
1325
|
* Emitted when a Liveboard is reset.
|
|
1299
1326
|
* @returns viewName: string
|
|
@@ -1305,11 +1332,41 @@ var EmbedEvent;
|
|
|
1305
1332
|
EmbedEvent["ResetLiveboard"] = "resetLiveboard";
|
|
1306
1333
|
/**
|
|
1307
1334
|
* Emitted when a PersonalisedView is deleted.
|
|
1335
|
+
* This event is deprecated. Use {@link EmbedEvent.DeletePersonalizedView} instead.
|
|
1308
1336
|
* @returns views: string[]
|
|
1309
1337
|
* @returns liveboardId: string
|
|
1310
1338
|
* @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
|
|
1339
|
+
* @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
1311
1340
|
*/
|
|
1312
1341
|
EmbedEvent["DeletePersonalisedView"] = "deletePersonalisedView";
|
|
1342
|
+
/**
|
|
1343
|
+
* Emitted when a PersonalizedView is deleted.
|
|
1344
|
+
* @returns views: string[]
|
|
1345
|
+
* @returns liveboardId: string
|
|
1346
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
1347
|
+
*/
|
|
1348
|
+
EmbedEvent["DeletePersonalizedView"] = "deletePersonalisedView";
|
|
1349
|
+
/**
|
|
1350
|
+
* Emitted when a user selects a different Personalized View or
|
|
1351
|
+
* resets to the original/default view on a Liveboard.
|
|
1352
|
+
* @example
|
|
1353
|
+
* ```js
|
|
1354
|
+
* liveboardEmbed.on(EmbedEvent.ChangePersonalizedView, (data) => {
|
|
1355
|
+
* console.log(data.viewName); // 'Q4 Revenue' or 'Original View'
|
|
1356
|
+
* console.log(data.viewId); // '2a021a12-...' or null (default)
|
|
1357
|
+
* console.log(data.liveboardId); // 'abc123...'
|
|
1358
|
+
* console.log(data.isPublic); // true | false
|
|
1359
|
+
* })
|
|
1360
|
+
* ```
|
|
1361
|
+
* @returns viewName: string - Name of the selected view,
|
|
1362
|
+
* or 'Original View' when reset to default.
|
|
1363
|
+
* @returns viewId: string | null - GUID of the selected view,
|
|
1364
|
+
* or null when reset to default.
|
|
1365
|
+
* @returns liveboardId: string
|
|
1366
|
+
* @returns isPublic: boolean
|
|
1367
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
1368
|
+
*/
|
|
1369
|
+
EmbedEvent["ChangePersonalizedView"] = "changePersonalisedView";
|
|
1313
1370
|
/**
|
|
1314
1371
|
* Emitted when a user creates a Worksheet.
|
|
1315
1372
|
* @version SDK: 1.27.0 | ThoughtSpot: 9.8.0.cl, 9.8.0.sw
|
|
@@ -1343,7 +1400,8 @@ var EmbedEvent;
|
|
|
1343
1400
|
* @param - Includes the following parameters:
|
|
1344
1401
|
* - `payload`: The payload received from the embed related to the Data API call.
|
|
1345
1402
|
* - `responder`: Contains elements that let developers define whether ThoughtSpot
|
|
1346
|
-
* will run or block the search operation, and if blocked, which error message to
|
|
1403
|
+
* will run or block the search operation, and if blocked, which error message to
|
|
1404
|
+
* provide.
|
|
1347
1405
|
* - `execute` - When `execute` returns `true`, the search is run.
|
|
1348
1406
|
* When `execute` returns `false`, the search is not executed.
|
|
1349
1407
|
* - `error` - Developers can customize the user-facing error message when `execute`
|
|
@@ -1777,6 +1835,25 @@ var EmbedEvent;
|
|
|
1777
1835
|
* );
|
|
1778
1836
|
* }
|
|
1779
1837
|
* ```
|
|
1838
|
+
*
|
|
1839
|
+
* **Context Parameter (SDK: 1.45.2+)**
|
|
1840
|
+
*
|
|
1841
|
+
* Starting from SDK version 1.45.2 | ThoughtSpot: 26.3.0.cl, you can optionally pass a
|
|
1842
|
+
* `ContextType` as the third parameter to the `trigger` method to specify the context
|
|
1843
|
+
* from which the event is triggered. This helps ThoughtSpot understand the current page
|
|
1844
|
+
* context (Search, Answer, Liveboard, or Spotter) for better event handling.
|
|
1845
|
+
*
|
|
1846
|
+
* @example
|
|
1847
|
+
* ```js
|
|
1848
|
+
* import { HostEvent, ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
1849
|
+
*
|
|
1850
|
+
* // Trigger Pin event with Search context
|
|
1851
|
+
* appEmbed.trigger(HostEvent.Pin, {
|
|
1852
|
+
* vizId: "123",
|
|
1853
|
+
* liveboardId: "456"
|
|
1854
|
+
* }, ContextType.Search);
|
|
1855
|
+
* ```
|
|
1856
|
+
*
|
|
1780
1857
|
* @group Events
|
|
1781
1858
|
*/
|
|
1782
1859
|
var HostEvent;
|
|
@@ -1799,6 +1876,16 @@ var HostEvent;
|
|
|
1799
1876
|
execute: true
|
|
1800
1877
|
});
|
|
1801
1878
|
* ```
|
|
1879
|
+
* @example
|
|
1880
|
+
* ```js
|
|
1881
|
+
* // Trigger search from search context
|
|
1882
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
1883
|
+
* appEmbed.trigger(HostEvent.Search, {
|
|
1884
|
+
* searchQuery: "[revenue] by [region]",
|
|
1885
|
+
* dataSources: ["cd252e5c-b552-49a8-821d-3eadaa049cca"],
|
|
1886
|
+
* execute: true
|
|
1887
|
+
* }, ContextType.Search);
|
|
1888
|
+
* ```
|
|
1802
1889
|
*/
|
|
1803
1890
|
HostEvent["Search"] = "search";
|
|
1804
1891
|
/**
|
|
@@ -1849,6 +1936,24 @@ var HostEvent;
|
|
|
1849
1936
|
* });
|
|
1850
1937
|
* })
|
|
1851
1938
|
* ```
|
|
1939
|
+
* @example
|
|
1940
|
+
* ```js
|
|
1941
|
+
* // Drill down from answer context
|
|
1942
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
1943
|
+
* appEmbed.trigger(HostEvent.DrillDown, {
|
|
1944
|
+
* points: { clickedPoint, selectedPoints },
|
|
1945
|
+
* autoDrillDown: true
|
|
1946
|
+
* }, ContextType.Answer);
|
|
1947
|
+
* ```
|
|
1948
|
+
* @example
|
|
1949
|
+
* ```js
|
|
1950
|
+
* // Drill down from search context
|
|
1951
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
1952
|
+
* searchEmbed.trigger(HostEvent.DrillDown, {
|
|
1953
|
+
* points: { clickedPoint, selectedPoints },
|
|
1954
|
+
* columnGuid: "column-guid"
|
|
1955
|
+
* }, ContextType.Search);
|
|
1956
|
+
* ```
|
|
1852
1957
|
* @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
|
|
1853
1958
|
*/
|
|
1854
1959
|
HostEvent["DrillDown"] = "triggerDrillDown";
|
|
@@ -1869,6 +1974,13 @@ var HostEvent;
|
|
|
1869
1974
|
* const url = embed.trigger(HostEvent.GetIframeUrl);
|
|
1870
1975
|
* console.log("iFrameURL",url);
|
|
1871
1976
|
* ```
|
|
1977
|
+
* @example
|
|
1978
|
+
* ```js
|
|
1979
|
+
* // Get iframe URL from specific context
|
|
1980
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
1981
|
+
* const url = await appEmbed.trigger(HostEvent.GetIframeUrl, {}, ContextType.Answer);
|
|
1982
|
+
* console.log("iFrameURL", url);
|
|
1983
|
+
* ```
|
|
1872
1984
|
* @version SDK: 1.35.0 | ThoughtSpot: 10.4.0.cl
|
|
1873
1985
|
*/
|
|
1874
1986
|
HostEvent["GetIframeUrl"] = "GetIframeUrl";
|
|
@@ -1882,6 +1994,15 @@ var HostEvent;
|
|
|
1882
1994
|
* '730496d6-6903-4601-937e-2c691821af3c',
|
|
1883
1995
|
* 'd547ec54-2a37-4516-a222-2b06719af726'])
|
|
1884
1996
|
* ```
|
|
1997
|
+
* @example
|
|
1998
|
+
* ```js
|
|
1999
|
+
* // Set visible vizs from liveboard context
|
|
2000
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2001
|
+
* liveboardEmbed.trigger(HostEvent.SetVisibleVizs, [
|
|
2002
|
+
* '730496d6-6903-4601-937e-2c691821af3c',
|
|
2003
|
+
* 'd547ec54-2a37-4516-a222-2b06719af726'
|
|
2004
|
+
* ], ContextType.Liveboard);
|
|
2005
|
+
* ```
|
|
1885
2006
|
* @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
|
|
1886
2007
|
*/
|
|
1887
2008
|
HostEvent["SetVisibleVizs"] = "SetPinboardVisibleVizs";
|
|
@@ -1894,6 +2015,14 @@ var HostEvent;
|
|
|
1894
2015
|
* tabId:'730496d6-6903-4601-937e-2c691821af3c'
|
|
1895
2016
|
* })
|
|
1896
2017
|
* ```
|
|
2018
|
+
* @example
|
|
2019
|
+
* ```js
|
|
2020
|
+
* // Set active tab from liveboard context
|
|
2021
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2022
|
+
* liveboardEmbed.trigger(HostEvent.SetActiveTab, {
|
|
2023
|
+
* tabId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
2024
|
+
* }, ContextType.Liveboard);
|
|
2025
|
+
* ```
|
|
1897
2026
|
* @version SDK: 1.24.0 | ThoughtSpot: 9.5.0.cl, 9.5.1-sw
|
|
1898
2027
|
*/
|
|
1899
2028
|
HostEvent["SetActiveTab"] = "SetActiveTab";
|
|
@@ -1927,6 +2056,15 @@ var HostEvent;
|
|
|
1927
2056
|
* {columnName: "item type",operator: RuntimeFilterOp.EQ,values: ["Jackets"]}
|
|
1928
2057
|
* ])
|
|
1929
2058
|
* ```
|
|
2059
|
+
* @example
|
|
2060
|
+
* ```js
|
|
2061
|
+
* // Update runtime filters from liveboard context
|
|
2062
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2063
|
+
* liveboardEmbed.trigger(HostEvent.UpdateRuntimeFilters, [
|
|
2064
|
+
* {columnName: "region", operator: RuntimeFilterOp.EQ, values: ["west"]},
|
|
2065
|
+
* {columnName: "product", operator: RuntimeFilterOp.IN, values: ["shoes", "boots"]}
|
|
2066
|
+
* ], ContextType.Liveboard);
|
|
2067
|
+
* ```
|
|
1930
2068
|
* @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl, 8.4.1.sw
|
|
1931
2069
|
* @important
|
|
1932
2070
|
*/
|
|
@@ -1960,6 +2098,14 @@ var HostEvent;
|
|
|
1960
2098
|
* LiveboardEmbed.trigger(HostEvent.OpenFilter,
|
|
1961
2099
|
* { column: {columnId: '<column-GUID>'}})
|
|
1962
2100
|
* ```
|
|
2101
|
+
* @example
|
|
2102
|
+
* ```js
|
|
2103
|
+
* // Open filter from search context
|
|
2104
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2105
|
+
* searchEmbed.trigger(HostEvent.OpenFilter, {
|
|
2106
|
+
* column: { columnId: '<column-GUID>', name: 'region', type: 'ATTRIBUTE', dataType: 'CHAR'}
|
|
2107
|
+
* }, ContextType.Search);
|
|
2108
|
+
* ```
|
|
1963
2109
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
|
|
1964
2110
|
*/
|
|
1965
2111
|
HostEvent["OpenFilter"] = "openFilter";
|
|
@@ -1970,6 +2116,14 @@ var HostEvent;
|
|
|
1970
2116
|
* ```js
|
|
1971
2117
|
* searchEmbed.trigger(HostEvent.AddColumns, { columnIds: ['<column-GUID>','<column-GUID>'] })
|
|
1972
2118
|
* ```
|
|
2119
|
+
* @example
|
|
2120
|
+
* ```js
|
|
2121
|
+
* // Add columns from search context
|
|
2122
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2123
|
+
* searchEmbed.trigger(HostEvent.AddColumns, {
|
|
2124
|
+
* columnIds: ['col-guid-1', 'col-guid-2']
|
|
2125
|
+
* }, ContextType.Search);
|
|
2126
|
+
* ```
|
|
1973
2127
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
|
|
1974
2128
|
*/
|
|
1975
2129
|
HostEvent["AddColumns"] = "addColumns";
|
|
@@ -1980,6 +2134,14 @@ var HostEvent;
|
|
|
1980
2134
|
* ```js
|
|
1981
2135
|
* searchEmbed.trigger(HostEvent.RemoveColumn, { columnId: '<column-Guid>' })
|
|
1982
2136
|
* ```
|
|
2137
|
+
* @example
|
|
2138
|
+
* ```js
|
|
2139
|
+
* // Remove column from search context
|
|
2140
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2141
|
+
* searchEmbed.trigger(HostEvent.RemoveColumn, {
|
|
2142
|
+
* columnId: 'column-guid'
|
|
2143
|
+
* }, ContextType.Search);
|
|
2144
|
+
* ```
|
|
1983
2145
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
|
|
1984
2146
|
*/
|
|
1985
2147
|
HostEvent["RemoveColumn"] = "removeColumn";
|
|
@@ -2066,6 +2228,37 @@ var HostEvent;
|
|
|
2066
2228
|
*
|
|
2067
2229
|
* spotterEmbed.trigger(HostEvent.Pin, { vizId: latestSpotterVizId });
|
|
2068
2230
|
* ```
|
|
2231
|
+
* @example
|
|
2232
|
+
* ```js
|
|
2233
|
+
* // Using context parameter to specify the context type (SDK: 1.45.2+)
|
|
2234
|
+
* // Pin from a search answer context
|
|
2235
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2236
|
+
* appEmbed.trigger(HostEvent.Pin, {
|
|
2237
|
+
* vizId: "123",
|
|
2238
|
+
* newVizName: "Sales by region",
|
|
2239
|
+
* liveboardId: "456"
|
|
2240
|
+
* }, ContextType.Search);
|
|
2241
|
+
* ```
|
|
2242
|
+
* @example
|
|
2243
|
+
* ```js
|
|
2244
|
+
* // Pin from an answer context (explore modal/page) (SDK: 1.45.2+)
|
|
2245
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2246
|
+
* appEmbed.trigger(HostEvent.Pin, {
|
|
2247
|
+
* vizId: "789",
|
|
2248
|
+
* newVizName: "Revenue trends",
|
|
2249
|
+
* liveboardId: "456"
|
|
2250
|
+
* }, ContextType.Answer);
|
|
2251
|
+
* ```
|
|
2252
|
+
* @example
|
|
2253
|
+
* ```js
|
|
2254
|
+
* // Pin from a spotter context (SDK: 1.45.2+)
|
|
2255
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2256
|
+
* appEmbed.trigger(HostEvent.Pin, {
|
|
2257
|
+
* vizId: latestSpotterVizId,
|
|
2258
|
+
* newVizName: "AI-generated insights",
|
|
2259
|
+
* liveboardId: "456"
|
|
2260
|
+
* }, ContextType.Spotter);
|
|
2261
|
+
* ```
|
|
2069
2262
|
*
|
|
2070
2263
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2071
2264
|
*/
|
|
@@ -2076,6 +2269,12 @@ var HostEvent;
|
|
|
2076
2269
|
* @example
|
|
2077
2270
|
* ```js
|
|
2078
2271
|
* liveboardEmbed.trigger(HostEvent.LiveboardInfo)
|
|
2272
|
+
*```
|
|
2273
|
+
* @example
|
|
2274
|
+
* ```js
|
|
2275
|
+
* // Show liveboard info from liveboard context
|
|
2276
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2277
|
+
* liveboardEmbed.trigger(HostEvent.LiveboardInfo, {}, ContextType.Liveboard);
|
|
2079
2278
|
* ```
|
|
2080
2279
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2081
2280
|
*/
|
|
@@ -2086,6 +2285,12 @@ var HostEvent;
|
|
|
2086
2285
|
* ```js
|
|
2087
2286
|
* liveboardEmbed.trigger(HostEvent.Schedule)
|
|
2088
2287
|
* ```
|
|
2288
|
+
* @example
|
|
2289
|
+
* ```js
|
|
2290
|
+
* // Schedule from liveboard context
|
|
2291
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2292
|
+
* liveboardEmbed.trigger(HostEvent.Schedule, {}, ContextType.Liveboard);
|
|
2293
|
+
* ```
|
|
2089
2294
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2090
2295
|
*/
|
|
2091
2296
|
HostEvent["Schedule"] = "subscription";
|
|
@@ -2095,6 +2300,12 @@ var HostEvent;
|
|
|
2095
2300
|
* ```js
|
|
2096
2301
|
* liveboardEmbed.trigger(HostEvent.ScheduleList)
|
|
2097
2302
|
* ```
|
|
2303
|
+
* @example
|
|
2304
|
+
* ```js
|
|
2305
|
+
* // Manage schedules from liveboard context
|
|
2306
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2307
|
+
* liveboardEmbed.trigger(HostEvent.ScheduleList, {}, ContextType.Liveboard);
|
|
2308
|
+
* ```
|
|
2098
2309
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2099
2310
|
*/
|
|
2100
2311
|
HostEvent["SchedulesList"] = "schedule-list";
|
|
@@ -2105,6 +2316,18 @@ var HostEvent;
|
|
|
2105
2316
|
* ```js
|
|
2106
2317
|
* liveboardEmbed.trigger(HostEvent.ExportTML)
|
|
2107
2318
|
* ```
|
|
2319
|
+
* @example
|
|
2320
|
+
* ```js
|
|
2321
|
+
* // Export TML from liveboard context
|
|
2322
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2323
|
+
* liveboardEmbed.trigger(HostEvent.ExportTML, {}, ContextType.Liveboard);
|
|
2324
|
+
* ```
|
|
2325
|
+
* @example
|
|
2326
|
+
* ```js
|
|
2327
|
+
* // Export TML from search-answer context
|
|
2328
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2329
|
+
* appEmbed.trigger(HostEvent.ExportTML, {}, ContextType.Search);
|
|
2330
|
+
* ```
|
|
2108
2331
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2109
2332
|
*/
|
|
2110
2333
|
HostEvent["ExportTML"] = "exportTSL";
|
|
@@ -2115,6 +2338,18 @@ var HostEvent;
|
|
|
2115
2338
|
* ```js
|
|
2116
2339
|
* liveboardEmbed.trigger(HostEvent.EditTML)
|
|
2117
2340
|
* ```
|
|
2341
|
+
* @example
|
|
2342
|
+
* ```js
|
|
2343
|
+
* // Edit TML from liveboard context
|
|
2344
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2345
|
+
* liveboardEmbed.trigger(HostEvent.EditTML, {}, ContextType.Liveboard);
|
|
2346
|
+
* ```
|
|
2347
|
+
* @example
|
|
2348
|
+
* ```js
|
|
2349
|
+
* // Edit TML from search-answer context
|
|
2350
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2351
|
+
* appEmbed.trigger(HostEvent.EditTML, {}, ContextType.Search);
|
|
2352
|
+
* ```
|
|
2118
2353
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2119
2354
|
*/
|
|
2120
2355
|
HostEvent["EditTML"] = "editTSL";
|
|
@@ -2124,6 +2359,12 @@ var HostEvent;
|
|
|
2124
2359
|
* ```js
|
|
2125
2360
|
* liveboardEmbed.trigger(HostEvent.UpdateTML)
|
|
2126
2361
|
* ```
|
|
2362
|
+
* @example
|
|
2363
|
+
* ```js
|
|
2364
|
+
* // Update TML from liveboard context
|
|
2365
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2366
|
+
* liveboardEmbed.trigger(HostEvent.UpdateTML, {}, ContextType.Liveboard);
|
|
2367
|
+
* ```
|
|
2127
2368
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2128
2369
|
*/
|
|
2129
2370
|
HostEvent["UpdateTML"] = "updateTSL";
|
|
@@ -2150,6 +2391,18 @@ var HostEvent;
|
|
|
2150
2391
|
*
|
|
2151
2392
|
* spotterEmbed.trigger(HostEvent.DownloadAsPdf, { vizId: latestSpotterVizId });
|
|
2152
2393
|
* ```
|
|
2394
|
+
* @example
|
|
2395
|
+
* ```js
|
|
2396
|
+
* // Download as PDF from search-answer context
|
|
2397
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2398
|
+
* appEmbed.trigger(HostEvent.DownloadAsPdf, {}, ContextType.Search);
|
|
2399
|
+
* ```
|
|
2400
|
+
* @example
|
|
2401
|
+
* ```js
|
|
2402
|
+
* // Download as PDF from liveboard context
|
|
2403
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2404
|
+
* liveboardEmbed.trigger(HostEvent.DownloadAsPdf, {}, ContextType.Liveboard);
|
|
2405
|
+
* ```
|
|
2153
2406
|
*
|
|
2154
2407
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2155
2408
|
*/
|
|
@@ -2194,6 +2447,18 @@ var HostEvent;
|
|
|
2194
2447
|
*
|
|
2195
2448
|
* spotterEmbed.trigger(HostEvent.MakeACopy, { vizId: latestSpotterVizId });
|
|
2196
2449
|
* ```
|
|
2450
|
+
* @example
|
|
2451
|
+
* ```js
|
|
2452
|
+
* // Make a copy from answer context
|
|
2453
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2454
|
+
* appEmbed.trigger(HostEvent.MakeACopy, {}, ContextType.Answer);
|
|
2455
|
+
* ```
|
|
2456
|
+
* @example
|
|
2457
|
+
* ```js
|
|
2458
|
+
* // Make a copy from search context
|
|
2459
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2460
|
+
* appEmbed.trigger(HostEvent.MakeACopy, {}, ContextType.Search);
|
|
2461
|
+
* ```
|
|
2197
2462
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2198
2463
|
*/
|
|
2199
2464
|
HostEvent["MakeACopy"] = "makeACopy";
|
|
@@ -2218,6 +2483,14 @@ var HostEvent;
|
|
|
2218
2483
|
* ```js
|
|
2219
2484
|
* liveboardEmbed.trigger(HostEvent.Explore, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
2220
2485
|
* ```
|
|
2486
|
+
* @example
|
|
2487
|
+
* ```js
|
|
2488
|
+
* // Explore from liveboard context
|
|
2489
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2490
|
+
* liveboardEmbed.trigger(HostEvent.Explore, {
|
|
2491
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
2492
|
+
* }, ContextType.Liveboard);
|
|
2493
|
+
* ```
|
|
2221
2494
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2222
2495
|
*/
|
|
2223
2496
|
HostEvent["Explore"] = "explore";
|
|
@@ -2235,6 +2508,20 @@ var HostEvent;
|
|
|
2235
2508
|
* ```js
|
|
2236
2509
|
* searchEmbed.trigger(HostEvent.CreateMonitor)
|
|
2237
2510
|
* ```
|
|
2511
|
+
* @example
|
|
2512
|
+
* ```js
|
|
2513
|
+
* // Create monitor from answer context
|
|
2514
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2515
|
+
* appEmbed.trigger(HostEvent.CreateMonitor, {}, ContextType.Answer);
|
|
2516
|
+
* ```
|
|
2517
|
+
* @example
|
|
2518
|
+
* ```js
|
|
2519
|
+
* // Create monitor from liveboard context
|
|
2520
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2521
|
+
* liveboardEmbed.trigger(HostEvent.CreateMonitor, {
|
|
2522
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
2523
|
+
* }, ContextType.Liveboard);
|
|
2524
|
+
* ```
|
|
2238
2525
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2239
2526
|
*/
|
|
2240
2527
|
HostEvent["CreateMonitor"] = "createMonitor";
|
|
@@ -2256,6 +2543,20 @@ var HostEvent;
|
|
|
2256
2543
|
* ```js
|
|
2257
2544
|
* vizEmbed.trigger(HostEvent.ManageMonitor)
|
|
2258
2545
|
* ```
|
|
2546
|
+
* @example
|
|
2547
|
+
* ```js
|
|
2548
|
+
* // Manage monitor from answer context
|
|
2549
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2550
|
+
* appEmbed.trigger(HostEvent.ManageMonitor, {}, ContextType.Answer);
|
|
2551
|
+
* ```
|
|
2552
|
+
* @example
|
|
2553
|
+
* ```js
|
|
2554
|
+
* // Manage monitor from liveboard context
|
|
2555
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2556
|
+
* liveboardEmbed.trigger(HostEvent.ManageMonitor, {
|
|
2557
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
2558
|
+
* }, ContextType.Liveboard);
|
|
2559
|
+
* ```
|
|
2259
2560
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2260
2561
|
*/
|
|
2261
2562
|
HostEvent["ManageMonitor"] = "manageMonitor";
|
|
@@ -2281,6 +2582,26 @@ var HostEvent;
|
|
|
2281
2582
|
* ```js
|
|
2282
2583
|
* spotterEmbed.trigger(HostEvent.Edit);
|
|
2283
2584
|
* ```
|
|
2585
|
+
* @example
|
|
2586
|
+
* ```js
|
|
2587
|
+
* // Using context parameter to edit liveboard context
|
|
2588
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2589
|
+
* liveboardEmbed.trigger(HostEvent.Edit, {}, ContextType.Liveboard);
|
|
2590
|
+
* ```
|
|
2591
|
+
* @example
|
|
2592
|
+
* ```js
|
|
2593
|
+
* // Edit from search context
|
|
2594
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2595
|
+
* appEmbed.trigger(HostEvent.Edit, {}, ContextType.Search);
|
|
2596
|
+
* ```
|
|
2597
|
+
* * @example
|
|
2598
|
+
* ```js
|
|
2599
|
+
* // Edit from spotter context
|
|
2600
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2601
|
+
* appEmbed.trigger(HostEvent.Edit, {
|
|
2602
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
2603
|
+
* }, ContextType.Spotter);
|
|
2604
|
+
* ```
|
|
2284
2605
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2285
2606
|
*/
|
|
2286
2607
|
HostEvent["Edit"] = "edit";
|
|
@@ -2298,6 +2619,20 @@ var HostEvent;
|
|
|
2298
2619
|
* ```js
|
|
2299
2620
|
* vizEmbed.trigger(HostEvent.CopyLink)
|
|
2300
2621
|
* ```
|
|
2622
|
+
* @example
|
|
2623
|
+
* ```js
|
|
2624
|
+
* // Copy link from liveboard context
|
|
2625
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2626
|
+
* liveboardEmbed.trigger(HostEvent.CopyLink, {}, ContextType.Liveboard);
|
|
2627
|
+
* ```
|
|
2628
|
+
* @example
|
|
2629
|
+
* ```js
|
|
2630
|
+
* // Copy link from liveboard visualization context
|
|
2631
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2632
|
+
* liveboardEmbed.trigger(HostEvent.CopyLink, {
|
|
2633
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
2634
|
+
* }, ContextType.Liveboard);
|
|
2635
|
+
* ```
|
|
2301
2636
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2302
2637
|
*/
|
|
2303
2638
|
HostEvent["CopyLink"] = "embedDocument";
|
|
@@ -2315,6 +2650,20 @@ var HostEvent;
|
|
|
2315
2650
|
* ```js
|
|
2316
2651
|
* vizEmbed.trigger(HostEvent.Present)
|
|
2317
2652
|
* ```
|
|
2653
|
+
* @example
|
|
2654
|
+
* ```js
|
|
2655
|
+
* // Present from liveboard visualization context
|
|
2656
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2657
|
+
* liveboardEmbed.trigger(HostEvent.Present, {
|
|
2658
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
2659
|
+
* }, ContextType.Liveboard);
|
|
2660
|
+
* ```
|
|
2661
|
+
* @example
|
|
2662
|
+
* ```js
|
|
2663
|
+
* // Present from liveboard context
|
|
2664
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2665
|
+
* liveboardEmbed.trigger(HostEvent.Present, {}, ContextType.Liveboard);
|
|
2666
|
+
* ```
|
|
2318
2667
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2319
2668
|
*/
|
|
2320
2669
|
HostEvent["Present"] = "present";
|
|
@@ -2343,6 +2692,22 @@ var HostEvent;
|
|
|
2343
2692
|
* tml.answer.search_query // TML representation of the search query
|
|
2344
2693
|
* );
|
|
2345
2694
|
* })
|
|
2695
|
+
* ```
|
|
2696
|
+
* @example
|
|
2697
|
+
* ```js
|
|
2698
|
+
* // Get TML from search context
|
|
2699
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2700
|
+
* appEmbed.trigger(HostEvent.GetTML, {}, ContextType.Search).then((tml) => {
|
|
2701
|
+
* console.log(tml.answer.search_query);
|
|
2702
|
+
* });
|
|
2703
|
+
* ```
|
|
2704
|
+
* @example
|
|
2705
|
+
* ```js
|
|
2706
|
+
* // Get TML from search-answer context
|
|
2707
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2708
|
+
* appEmbed.trigger(HostEvent.GetTML, {}, ContextType.Search).then((tml) => {
|
|
2709
|
+
* console.log(tml.answer);
|
|
2710
|
+
* });
|
|
2346
2711
|
* ```
|
|
2347
2712
|
* @version SDK: 1.18.0 | ThoughtSpot: 8.10.0.cl, 9.0.1.sw
|
|
2348
2713
|
* @important
|
|
@@ -2364,6 +2729,20 @@ var HostEvent;
|
|
|
2364
2729
|
* ```js
|
|
2365
2730
|
* searchEmbed.trigger(HostEvent.ShowUnderlyingData)
|
|
2366
2731
|
* ```
|
|
2732
|
+
* @example
|
|
2733
|
+
* ```js
|
|
2734
|
+
* // Show underlying data from liveboard visualization context
|
|
2735
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2736
|
+
* appEmbed.trigger(HostEvent.ShowUnderlyingData, {
|
|
2737
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
2738
|
+
* }, ContextType.Liveboard);
|
|
2739
|
+
* ```
|
|
2740
|
+
* @example
|
|
2741
|
+
* ```js
|
|
2742
|
+
* // Show underlying data from search context
|
|
2743
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2744
|
+
* appEmbed.trigger(HostEvent.ShowUnderlyingData, {}, ContextType.Search);
|
|
2745
|
+
* ```
|
|
2367
2746
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
2368
2747
|
*/
|
|
2369
2748
|
HostEvent["ShowUnderlyingData"] = "showUnderlyingData";
|
|
@@ -2381,6 +2760,18 @@ var HostEvent;
|
|
|
2381
2760
|
* ```js
|
|
2382
2761
|
* searchEmbed.trigger(HostEvent.Delete)
|
|
2383
2762
|
* ```
|
|
2763
|
+
* @example
|
|
2764
|
+
* ```js
|
|
2765
|
+
* // Delete from liveboard context
|
|
2766
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2767
|
+
* liveboardEmbed.trigger(HostEvent.Delete, {}, ContextType.Liveboard);
|
|
2768
|
+
* ```
|
|
2769
|
+
* @example
|
|
2770
|
+
* ```js
|
|
2771
|
+
* // Delete from search context
|
|
2772
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2773
|
+
* appEmbed.trigger(HostEvent.Delete, {}, ContextType.Search);
|
|
2774
|
+
* ```
|
|
2384
2775
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
2385
2776
|
*/
|
|
2386
2777
|
HostEvent["Delete"] = "onDeleteAnswer";
|
|
@@ -2401,6 +2792,20 @@ var HostEvent;
|
|
|
2401
2792
|
* ```js
|
|
2402
2793
|
* searchEmbed.trigger(HostEvent.SpotIQAnalyze)
|
|
2403
2794
|
* ```
|
|
2795
|
+
* @example
|
|
2796
|
+
* ```js
|
|
2797
|
+
* // SpotIQ analyze from search-answer context
|
|
2798
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2799
|
+
* appEmbed.trigger(HostEvent.SpotIQAnalyze, { vizId: '730496d6-6903-4601-937e-2c691821af3c' }, ContextType.Search);
|
|
2800
|
+
* ```
|
|
2801
|
+
* @example
|
|
2802
|
+
* ```js
|
|
2803
|
+
* // SpotIQ analyze from search context
|
|
2804
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2805
|
+
* liveboardEmbed.trigger(HostEvent.SpotIQAnalyze, {
|
|
2806
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
2807
|
+
* }, ContextType.Liveboard);
|
|
2808
|
+
* ```
|
|
2404
2809
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
2405
2810
|
*/
|
|
2406
2811
|
HostEvent["SpotIQAnalyze"] = "spotIQAnalyze";
|
|
@@ -2452,9 +2857,16 @@ var HostEvent;
|
|
|
2452
2857
|
*
|
|
2453
2858
|
* spotterEmbed.trigger(HostEvent.DownloadAsPng, { vizId: latestSpotterVizId });
|
|
2454
2859
|
* ```
|
|
2860
|
+
* @example
|
|
2861
|
+
* ```js
|
|
2862
|
+
* // Download as PNG from search-answer context
|
|
2863
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2864
|
+
* appEmbed.trigger(HostEvent.DownloadAsPng, {}, ContextType.Search);
|
|
2865
|
+
* ```
|
|
2455
2866
|
*
|
|
2456
2867
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.1.sw
|
|
2457
2868
|
*/
|
|
2869
|
+
// eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values
|
|
2458
2870
|
HostEvent["DownloadAsPng"] = "downloadAsPng";
|
|
2459
2871
|
/**
|
|
2460
2872
|
* Trigger the **Download** > **CSV** action on tables in
|
|
@@ -2480,6 +2892,18 @@ var HostEvent;
|
|
|
2480
2892
|
*
|
|
2481
2893
|
* spotterEmbed.trigger(HostEvent.DownloadAsCsv, { vizId: latestSpotterVizId });
|
|
2482
2894
|
* ```
|
|
2895
|
+
* @example
|
|
2896
|
+
* ```js
|
|
2897
|
+
* // Download as CSV from search-answer context
|
|
2898
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2899
|
+
* appEmbed.trigger(HostEvent.DownloadAsCsv, {}, ContextType.Search);
|
|
2900
|
+
* ```
|
|
2901
|
+
* @example
|
|
2902
|
+
* ```js
|
|
2903
|
+
* // Download as CSV from search context
|
|
2904
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2905
|
+
* searchEmbed.trigger(HostEvent.DownloadAsCsv, {}, ContextType.Search);
|
|
2906
|
+
* ```
|
|
2483
2907
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
2484
2908
|
*/
|
|
2485
2909
|
HostEvent["DownloadAsCsv"] = "downloadAsCSV";
|
|
@@ -2507,6 +2931,18 @@ var HostEvent;
|
|
|
2507
2931
|
*
|
|
2508
2932
|
* spotterEmbed.trigger(HostEvent.DownloadAsXlsx, { vizId: latestSpotterVizId });
|
|
2509
2933
|
* ```
|
|
2934
|
+
* @example
|
|
2935
|
+
* ```js
|
|
2936
|
+
* // Download as XLSX from answer context
|
|
2937
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2938
|
+
* appEmbed.trigger(HostEvent.DownloadAsXlsx, {}, ContextType.Answer);
|
|
2939
|
+
* ```
|
|
2940
|
+
* @example
|
|
2941
|
+
* ```js
|
|
2942
|
+
* // Download as XLSX from search context
|
|
2943
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2944
|
+
* searchEmbed.trigger(HostEvent.DownloadAsXlsx, {}, ContextType.Search);
|
|
2945
|
+
* ```
|
|
2510
2946
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
2511
2947
|
*/
|
|
2512
2948
|
HostEvent["DownloadAsXlsx"] = "downloadAsXLSX";
|
|
@@ -2520,6 +2956,18 @@ var HostEvent;
|
|
|
2520
2956
|
* ```js
|
|
2521
2957
|
* searchEmbed.trigger(HostEvent.Share)
|
|
2522
2958
|
* ```
|
|
2959
|
+
* @example
|
|
2960
|
+
* ```js
|
|
2961
|
+
* // Share from Liveboard context
|
|
2962
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2963
|
+
* liveboardEmbed.trigger(HostEvent.Share, {}, ContextType.Liveboard);
|
|
2964
|
+
* ```
|
|
2965
|
+
* @example
|
|
2966
|
+
* ```js
|
|
2967
|
+
* // Share from search-answer context
|
|
2968
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2969
|
+
* appEmbed.trigger(HostEvent.Share, {}, ContextType.Search);
|
|
2970
|
+
* ```
|
|
2523
2971
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
2524
2972
|
*/
|
|
2525
2973
|
HostEvent["Share"] = "share";
|
|
@@ -2559,6 +3007,18 @@ var HostEvent;
|
|
|
2559
3007
|
*
|
|
2560
3008
|
* spotterEmbed.trigger(HostEvent.Save, { vizId: latestSpotterVizId });
|
|
2561
3009
|
* ```
|
|
3010
|
+
* @example
|
|
3011
|
+
* ```js
|
|
3012
|
+
* // Save from answer context
|
|
3013
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3014
|
+
* appEmbed.trigger(HostEvent.Save, {}, ContextType.Answer);
|
|
3015
|
+
* ```
|
|
3016
|
+
* @example
|
|
3017
|
+
* ```js
|
|
3018
|
+
* // Save from search context
|
|
3019
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3020
|
+
* searchEmbed.trigger(HostEvent.Save, {}, ContextType.Search);
|
|
3021
|
+
* ```
|
|
2562
3022
|
*
|
|
2563
3023
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
2564
3024
|
*/
|
|
@@ -2575,6 +3035,20 @@ var HostEvent;
|
|
|
2575
3035
|
* ```js
|
|
2576
3036
|
* vizEmbed.trigger(HostEvent.SyncToSheets)
|
|
2577
3037
|
* ```
|
|
3038
|
+
* @example
|
|
3039
|
+
* ```js
|
|
3040
|
+
* // Sync to sheets from answer context
|
|
3041
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3042
|
+
* appEmbed.trigger(HostEvent.SyncToSheets, {}, ContextType.Answer);
|
|
3043
|
+
* ```
|
|
3044
|
+
* @example
|
|
3045
|
+
* ```js
|
|
3046
|
+
* // Sync to sheets from liveboard context
|
|
3047
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3048
|
+
* liveboardEmbed.trigger(HostEvent.SyncToSheets, {
|
|
3049
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
3050
|
+
* }, ContextType.Liveboard);
|
|
3051
|
+
* ```
|
|
2578
3052
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
2579
3053
|
*/
|
|
2580
3054
|
HostEvent["SyncToSheets"] = "sync-to-sheets";
|
|
@@ -2591,6 +3065,20 @@ var HostEvent;
|
|
|
2591
3065
|
* ```js
|
|
2592
3066
|
* vizEmbed.trigger(HostEvent.SyncToOtherApps)
|
|
2593
3067
|
* ```
|
|
3068
|
+
* @example
|
|
3069
|
+
* ```js
|
|
3070
|
+
* // Sync to other apps from answer context
|
|
3071
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3072
|
+
* appEmbed.trigger(HostEvent.SyncToOtherApps, {}, ContextType.Answer);
|
|
3073
|
+
* ```
|
|
3074
|
+
* @example
|
|
3075
|
+
* ```js
|
|
3076
|
+
* // Sync to other apps from liveboard context
|
|
3077
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3078
|
+
* liveboardEmbed.trigger(HostEvent.SyncToOtherApps, {
|
|
3079
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
3080
|
+
* }, ContextType.Liveboard);
|
|
3081
|
+
* ```
|
|
2594
3082
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
2595
3083
|
*/
|
|
2596
3084
|
HostEvent["SyncToOtherApps"] = "sync-to-other-apps";
|
|
@@ -2607,6 +3095,20 @@ var HostEvent;
|
|
|
2607
3095
|
* ```js
|
|
2608
3096
|
* vizEmbed.trigger(HostEvent.ManagePipelines)
|
|
2609
3097
|
* ```
|
|
3098
|
+
* @example
|
|
3099
|
+
* ```js
|
|
3100
|
+
* // Manage pipelines from answer context
|
|
3101
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3102
|
+
* appEmbed.trigger(HostEvent.ManagePipelines, {}, ContextType.Answer);
|
|
3103
|
+
* ```
|
|
3104
|
+
* @example
|
|
3105
|
+
* ```js
|
|
3106
|
+
* // Manage pipelines from liveboard context
|
|
3107
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3108
|
+
* liveboardEmbed.trigger(HostEvent.ManagePipelines, {
|
|
3109
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
3110
|
+
* }, ContextType.Liveboard);
|
|
3111
|
+
* ```
|
|
2610
3112
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
2611
3113
|
*/
|
|
2612
3114
|
HostEvent["ManagePipelines"] = "manage-pipeline";
|
|
@@ -2619,6 +3121,12 @@ var HostEvent;
|
|
|
2619
3121
|
* ```js
|
|
2620
3122
|
* appEmbed.trigger(HostEvent.ResetSearch)
|
|
2621
3123
|
* ```
|
|
3124
|
+
* @example
|
|
3125
|
+
* ```js
|
|
3126
|
+
* // Reset search from search context
|
|
3127
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3128
|
+
* searchEmbed.trigger(HostEvent.ResetSearch, {}, ContextType.Search);
|
|
3129
|
+
* ```
|
|
2622
3130
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.0.1.sw
|
|
2623
3131
|
*/
|
|
2624
3132
|
HostEvent["ResetSearch"] = "resetSearch";
|
|
@@ -2630,6 +3138,13 @@ var HostEvent;
|
|
|
2630
3138
|
* const data = await liveboardEmbed.trigger(HostEvent.GetFilters);
|
|
2631
3139
|
* console.log('data', data);
|
|
2632
3140
|
* ```
|
|
3141
|
+
* @example
|
|
3142
|
+
* ```js
|
|
3143
|
+
* // Get filters from liveboard context
|
|
3144
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3145
|
+
* const data = await liveboardEmbed.trigger(HostEvent.GetFilters, {}, ContextType.Liveboard);
|
|
3146
|
+
* console.log('filters', data);
|
|
3147
|
+
* ```
|
|
2633
3148
|
* @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
|
|
2634
3149
|
*/
|
|
2635
3150
|
HostEvent["GetFilters"] = "getFilters";
|
|
@@ -2637,7 +3152,8 @@ var HostEvent;
|
|
|
2637
3152
|
* Update one or several filters applied on a Liveboard.
|
|
2638
3153
|
* @param - Includes the following keys:
|
|
2639
3154
|
* - `filter`: A single filter object containing column name, filter operator, and
|
|
2640
|
-
* values.
|
|
3155
|
+
* values.
|
|
3156
|
+
* - `filters`: Multiple filter objects with column name, filter operator,
|
|
2641
3157
|
* and values for each.
|
|
2642
3158
|
*
|
|
2643
3159
|
* Each filter object must include the following attributes:
|
|
@@ -2720,6 +3236,18 @@ var HostEvent;
|
|
|
2720
3236
|
* }]
|
|
2721
3237
|
* });
|
|
2722
3238
|
* ```
|
|
3239
|
+
* @example
|
|
3240
|
+
* ```js
|
|
3241
|
+
* // Update filters from liveboard context
|
|
3242
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3243
|
+
* liveboardEmbed.trigger(HostEvent.UpdateFilters, {
|
|
3244
|
+
* filter: {
|
|
3245
|
+
* column: "item type",
|
|
3246
|
+
* oper: "IN",
|
|
3247
|
+
* values: ["shoes", "boots"]
|
|
3248
|
+
* }
|
|
3249
|
+
* }, ContextType.Liveboard);
|
|
3250
|
+
* ```
|
|
2723
3251
|
* @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
|
|
2724
3252
|
*/
|
|
2725
3253
|
HostEvent["UpdateFilters"] = "updateFilters";
|
|
@@ -2733,6 +3261,14 @@ var HostEvent;
|
|
|
2733
3261
|
* );
|
|
2734
3262
|
* })
|
|
2735
3263
|
* ```
|
|
3264
|
+
* @example
|
|
3265
|
+
* ```js
|
|
3266
|
+
* // Get tabs from liveboard context
|
|
3267
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3268
|
+
* liveboardEmbed.trigger(HostEvent.GetTabs, {}, ContextType.Liveboard).then((tabDetails) => {
|
|
3269
|
+
* console.log('tabs', tabDetails);
|
|
3270
|
+
* });
|
|
3271
|
+
* ```
|
|
2736
3272
|
* @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl
|
|
2737
3273
|
*/
|
|
2738
3274
|
HostEvent["GetTabs"] = "getTabs";
|
|
@@ -2746,6 +3282,15 @@ var HostEvent;
|
|
|
2746
3282
|
* '430496d6-6903-4601-937e-2c691821af3c',
|
|
2747
3283
|
* 'f547ec54-2a37-4516-a222-2b06719af726'])
|
|
2748
3284
|
* ```
|
|
3285
|
+
* @example
|
|
3286
|
+
* ```js
|
|
3287
|
+
* // Set visible tabs from liveboard context
|
|
3288
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3289
|
+
* liveboardEmbed.trigger(HostEvent.SetVisibleTabs, [
|
|
3290
|
+
* '430496d6-6903-4601-937e-2c691821af3c',
|
|
3291
|
+
* 'f547ec54-2a37-4516-a222-2b06719af726'
|
|
3292
|
+
* ], ContextType.Liveboard);
|
|
3293
|
+
* ```
|
|
2749
3294
|
* @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
|
|
2750
3295
|
*/
|
|
2751
3296
|
HostEvent["SetVisibleTabs"] = "SetPinboardVisibleTabs";
|
|
@@ -2759,6 +3304,15 @@ var HostEvent;
|
|
|
2759
3304
|
* '630496d6-6903-4601-937e-2c691821af3c',
|
|
2760
3305
|
* 'i547ec54-2a37-4516-a222-2b06719af726'])
|
|
2761
3306
|
* ```
|
|
3307
|
+
* @example
|
|
3308
|
+
* ```js
|
|
3309
|
+
* // Set hidden tabs from liveboard context
|
|
3310
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3311
|
+
* liveboardEmbed.trigger(HostEvent.SetHiddenTabs, [
|
|
3312
|
+
* '630496d6-6903-4601-937e-2c691821af3c',
|
|
3313
|
+
* 'i547ec54-2a37-4516-a222-2b06719af726'
|
|
3314
|
+
* ], ContextType.Liveboard);
|
|
3315
|
+
* ```
|
|
2762
3316
|
* @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
|
|
2763
3317
|
*/
|
|
2764
3318
|
HostEvent["SetHiddenTabs"] = "SetPinboardHiddenTabs";
|
|
@@ -2835,13 +3389,24 @@ var HostEvent;
|
|
|
2835
3389
|
HostEvent["UpdateCrossFilter"] = "UpdateCrossFilter";
|
|
2836
3390
|
/**
|
|
2837
3391
|
* Trigger reset action for a personalized Liveboard view.
|
|
3392
|
+
* This event is deprecated. Use {@link HostEvent.ResetLiveboardPersonalizedView} instead.
|
|
2838
3393
|
* @example
|
|
2839
3394
|
* ```js
|
|
2840
3395
|
* liveboardEmbed.trigger(HostEvent.ResetLiveboardPersonalisedView);
|
|
2841
3396
|
* ```
|
|
2842
3397
|
* @version SDK: 1.29.0 | ThoughtSpot Cloud: 10.1.0.cl, 10.1.0.sw
|
|
3398
|
+
* @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
2843
3399
|
*/
|
|
2844
3400
|
HostEvent["ResetLiveboardPersonalisedView"] = "ResetLiveboardPersonalisedView";
|
|
3401
|
+
/**
|
|
3402
|
+
* Trigger reset action for a personalized Liveboard view.
|
|
3403
|
+
* @example
|
|
3404
|
+
* ```js
|
|
3405
|
+
* liveboardEmbed.trigger(HostEvent.ResetLiveboardPersonalizedView);
|
|
3406
|
+
* ```
|
|
3407
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
3408
|
+
*/
|
|
3409
|
+
HostEvent["ResetLiveboardPersonalizedView"] = "ResetLiveboardPersonalisedView";
|
|
2845
3410
|
/**
|
|
2846
3411
|
* Triggers an action to update Parameter values on embedded
|
|
2847
3412
|
* Answers, Liveboard, and Spotter answer in Edit mode.
|
|
@@ -2858,6 +3423,16 @@ var HostEvent;
|
|
|
2858
3423
|
* isVisibleToUser: false
|
|
2859
3424
|
* }])
|
|
2860
3425
|
* ```
|
|
3426
|
+
* @example
|
|
3427
|
+
* ```js
|
|
3428
|
+
* // Update parameters from liveboard context
|
|
3429
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3430
|
+
* liveboardEmbed.trigger(HostEvent.UpdateParameters, [{
|
|
3431
|
+
* name: "Region Param",
|
|
3432
|
+
* value: "West",
|
|
3433
|
+
* isVisibleToUser: true
|
|
3434
|
+
* }], ContextType.Liveboard);
|
|
3435
|
+
* ```
|
|
2861
3436
|
* @version SDK: 1.29.0 | ThoughtSpot: 10.1.0.cl, 10.1.0.sw
|
|
2862
3437
|
*/
|
|
2863
3438
|
HostEvent["UpdateParameters"] = "UpdateParameters";
|
|
@@ -2877,18 +3452,77 @@ var HostEvent;
|
|
|
2877
3452
|
* });
|
|
2878
3453
|
*
|
|
2879
3454
|
* spotterEmbed.trigger(HostEvent.GetParameters, { vizId: latestSpotterVizId });
|
|
3455
|
+
*```
|
|
3456
|
+
* @example
|
|
3457
|
+
* ```js
|
|
3458
|
+
* // Get parameters from liveboard context
|
|
3459
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3460
|
+
* liveboardEmbed.trigger(HostEvent.GetParameters, {}, ContextType.Liveboard).then((parameters) => {
|
|
3461
|
+
* console.log('parameters', parameters);
|
|
3462
|
+
* });
|
|
2880
3463
|
* ```
|
|
2881
3464
|
* @version SDK: 1.29.0 | ThoughtSpot: 10.1.0.cl, 10.1.0.sw
|
|
2882
3465
|
*/
|
|
2883
3466
|
HostEvent["GetParameters"] = "GetParameters";
|
|
2884
3467
|
/**
|
|
2885
3468
|
* Triggers an event to update a personalized view of a Liveboard.
|
|
3469
|
+
* This event is deprecated. Use {@link HostEvent.UpdatePersonalizedView} instead.
|
|
2886
3470
|
* ```js
|
|
2887
3471
|
* liveboardEmbed.trigger(HostEvent.UpdatePersonalisedView, {viewId: '1234'})
|
|
2888
3472
|
* ```
|
|
3473
|
+
* @example
|
|
3474
|
+
* ```js
|
|
3475
|
+
* // Update personalized view from liveboard context
|
|
3476
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3477
|
+
* liveboardEmbed.trigger(HostEvent.UpdatePersonalisedView, {
|
|
3478
|
+
* viewId: '1234'
|
|
3479
|
+
* }, ContextType.Liveboard);
|
|
3480
|
+
* ```
|
|
2889
3481
|
* @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
|
|
3482
|
+
* @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
2890
3483
|
*/
|
|
2891
3484
|
HostEvent["UpdatePersonalisedView"] = "UpdatePersonalisedView";
|
|
3485
|
+
/**
|
|
3486
|
+
* Triggers an event to update a personalized view of a Liveboard.
|
|
3487
|
+
* ```js
|
|
3488
|
+
* liveboardEmbed.trigger(HostEvent.UpdatePersonalisedView, {viewId: '1234'})
|
|
3489
|
+
* ```
|
|
3490
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
3491
|
+
*/
|
|
3492
|
+
HostEvent["UpdatePersonalizedView"] = "UpdatePersonalisedView";
|
|
3493
|
+
/**
|
|
3494
|
+
* Triggers selection of a specific Personalized View on a
|
|
3495
|
+
* Liveboard without reloading the embed. Pass either a
|
|
3496
|
+
* `viewId` (GUID) or `viewName`. If both are provided, `viewId` takes precedence.
|
|
3497
|
+
* If neither is provided, the Liveboard resets to the original/default view.
|
|
3498
|
+
* When a `viewName` is provided and multiple views share
|
|
3499
|
+
* the same name, the first match is selected.
|
|
3500
|
+
* @example
|
|
3501
|
+
* ```js
|
|
3502
|
+
* liveboardEmbed.trigger(
|
|
3503
|
+
* HostEvent.SelectPersonalizedView,
|
|
3504
|
+
* { viewId: '2a021a12-1aed-425d-984b-141ee916ce72' },
|
|
3505
|
+
* )
|
|
3506
|
+
* ```
|
|
3507
|
+
* @example
|
|
3508
|
+
* ```js
|
|
3509
|
+
* // Select by name
|
|
3510
|
+
* liveboardEmbed.trigger(
|
|
3511
|
+
* HostEvent.SelectPersonalizedView,
|
|
3512
|
+
* { viewName: 'Dr Smith Cardiology' },
|
|
3513
|
+
* )
|
|
3514
|
+
* ```
|
|
3515
|
+
* @example
|
|
3516
|
+
* ```js
|
|
3517
|
+
* // Reset to default view
|
|
3518
|
+
* liveboardEmbed.trigger(
|
|
3519
|
+
* HostEvent.SelectPersonalizedView,
|
|
3520
|
+
* {},
|
|
3521
|
+
* )
|
|
3522
|
+
* ```
|
|
3523
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
3524
|
+
*/
|
|
3525
|
+
HostEvent["SelectPersonalizedView"] = "SelectPersonalisedView";
|
|
2892
3526
|
/**
|
|
2893
3527
|
* @hidden
|
|
2894
3528
|
* Notify when info call is completed successfully
|
|
@@ -2908,7 +3542,8 @@ var HostEvent;
|
|
|
2908
3542
|
* add a name and description for the Answer.
|
|
2909
3543
|
* @param - Includes the following keys:
|
|
2910
3544
|
* - `vizId`: Refers to the Answer ID in Spotter embed and is **required** in Spotter
|
|
2911
|
-
* embed.
|
|
3545
|
+
* embed.
|
|
3546
|
+
* - `name`: Optional. Name string for the Answer.
|
|
2912
3547
|
* - `description`: Optional. Description text for the Answer.
|
|
2913
3548
|
* @example
|
|
2914
3549
|
* ```js
|
|
@@ -2927,6 +3562,34 @@ var HostEvent;
|
|
|
2927
3562
|
*
|
|
2928
3563
|
* spotterEmbed.trigger(HostEvent.SaveAnswer, { vizId: latestSpotterVizId });
|
|
2929
3564
|
* ```
|
|
3565
|
+
* @example
|
|
3566
|
+
* ```js
|
|
3567
|
+
* // Using context parameter to save answer from search context
|
|
3568
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3569
|
+
* const saveAnswerResponse = await appEmbed.trigger(HostEvent.SaveAnswer, {
|
|
3570
|
+
* name: "Regional sales analysis",
|
|
3571
|
+
* description: "Sales breakdown by region"
|
|
3572
|
+
* }, ContextType.Search);
|
|
3573
|
+
* ```
|
|
3574
|
+
* @example
|
|
3575
|
+
* ```js
|
|
3576
|
+
* // Save answer from answer context (explore modal)
|
|
3577
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3578
|
+
* const saveAnswerResponse = await appEmbed.trigger(HostEvent.SaveAnswer, {
|
|
3579
|
+
* name: "Modified analysis",
|
|
3580
|
+
* description: "Updated from explore view"
|
|
3581
|
+
* }, ContextType.Answer);
|
|
3582
|
+
* ```
|
|
3583
|
+
* @example
|
|
3584
|
+
* ```js
|
|
3585
|
+
* // Save answer from spotter context
|
|
3586
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3587
|
+
* const saveAnswerResponse = await appEmbed.trigger(HostEvent.SaveAnswer, {
|
|
3588
|
+
* vizId: latestSpotterVizId,
|
|
3589
|
+
* name: "AI insights",
|
|
3590
|
+
* description: "Generated from Spotter"
|
|
3591
|
+
* }, ContextType.Spotter);
|
|
3592
|
+
* ```
|
|
2930
3593
|
* @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
|
|
2931
3594
|
*/
|
|
2932
3595
|
HostEvent["SaveAnswer"] = "saveAnswer";
|
|
@@ -2968,6 +3631,15 @@ var HostEvent;
|
|
|
2968
3631
|
* executeSearch: true,
|
|
2969
3632
|
* })
|
|
2970
3633
|
* ```
|
|
3634
|
+
* @example
|
|
3635
|
+
* ```js
|
|
3636
|
+
* // Spotter search from spotter context
|
|
3637
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3638
|
+
* spotterEmbed.trigger(HostEvent.SpotterSearch, {
|
|
3639
|
+
* query: 'sales by region',
|
|
3640
|
+
* executeSearch: true
|
|
3641
|
+
* }, ContextType.Spotter);
|
|
3642
|
+
* ```
|
|
2971
3643
|
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
2972
3644
|
*/
|
|
2973
3645
|
HostEvent["SpotterSearch"] = "SpotterSearch";
|
|
@@ -2978,6 +3650,12 @@ var HostEvent;
|
|
|
2978
3650
|
* ```js
|
|
2979
3651
|
* spotterEmbed.trigger(HostEvent.EditLastPrompt, "revenue per year");
|
|
2980
3652
|
* ```
|
|
3653
|
+
* @example
|
|
3654
|
+
* ```js
|
|
3655
|
+
* // Edit last prompt from spotter context
|
|
3656
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3657
|
+
* spotterEmbed.trigger(HostEvent.EditLastPrompt, "sales by region", ContextType.Spotter);
|
|
3658
|
+
* ```
|
|
2981
3659
|
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
2982
3660
|
*/
|
|
2983
3661
|
HostEvent["EditLastPrompt"] = "EditLastPrompt";
|
|
@@ -2987,6 +3665,12 @@ var HostEvent;
|
|
|
2987
3665
|
* ```js
|
|
2988
3666
|
* spotterEmbed.trigger(HostEvent.PreviewSpotterData);
|
|
2989
3667
|
* ```
|
|
3668
|
+
* @example
|
|
3669
|
+
* ```js
|
|
3670
|
+
* // Preview spotter data from spotter context
|
|
3671
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3672
|
+
* spotterEmbed.trigger(HostEvent.PreviewSpotterData, {}, ContextType.Spotter);
|
|
3673
|
+
* ```
|
|
2990
3674
|
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
2991
3675
|
*/
|
|
2992
3676
|
HostEvent["PreviewSpotterData"] = "PreviewSpotterData";
|
|
@@ -3745,6 +4429,7 @@ var Action;
|
|
|
3745
4429
|
* disabledActions: [Action.LiveboardInfo]
|
|
3746
4430
|
* ```
|
|
3747
4431
|
*/
|
|
4432
|
+
// eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values
|
|
3748
4433
|
Action["LiveboardInfo"] = "pinboardInfo";
|
|
3749
4434
|
/**
|
|
3750
4435
|
* @hidden
|
|
@@ -3775,6 +4460,7 @@ var Action;
|
|
|
3775
4460
|
* disabledActions: [Action.Subscription]
|
|
3776
4461
|
* ```
|
|
3777
4462
|
*/
|
|
4463
|
+
// eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values
|
|
3778
4464
|
Action["Subscription"] = "subscription";
|
|
3779
4465
|
/**
|
|
3780
4466
|
* The **Explore** action on Liveboard visualizations
|
|
@@ -4254,13 +4940,25 @@ var Action;
|
|
|
4254
4940
|
/**
|
|
4255
4941
|
* The Liveboard Personalised Views dropdown.
|
|
4256
4942
|
* Allows navigating to a personalized Liveboard View.
|
|
4943
|
+
* This action is deprecated. Use {@link Action.PersonalizedViewsDropdown} instead.
|
|
4257
4944
|
* @example
|
|
4258
4945
|
* ```js
|
|
4259
4946
|
* disabledActions: [Action.PersonalisedViewsDropdown]
|
|
4260
4947
|
* ```
|
|
4261
4948
|
* @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 10.1.0.sw
|
|
4949
|
+
* @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
4262
4950
|
*/
|
|
4263
4951
|
Action["PersonalisedViewsDropdown"] = "personalisedViewsDropdown";
|
|
4952
|
+
/**
|
|
4953
|
+
* The Liveboard Personalized Views dropdown.
|
|
4954
|
+
* Allows navigating to a personalized Liveboard View.
|
|
4955
|
+
* @example
|
|
4956
|
+
* ```js
|
|
4957
|
+
* disabledActions: [Action.PersonalizedViewsDropdown]
|
|
4958
|
+
* ```
|
|
4959
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
4960
|
+
*/
|
|
4961
|
+
Action["PersonalizedViewsDropdown"] = "personalisedViewsDropdown";
|
|
4264
4962
|
/**
|
|
4265
4963
|
* Action ID for show or hide the user details on a
|
|
4266
4964
|
* Liveboard (Recently visited / social proof)
|
|
@@ -4348,14 +5046,27 @@ var Action;
|
|
|
4348
5046
|
/**
|
|
4349
5047
|
* The **Organize Favourites** action on Homepage
|
|
4350
5048
|
* *Favorites* module.
|
|
5049
|
+
* This action is deprecated. Use {@link Action.OrganizeFavorites} instead.
|
|
4351
5050
|
*
|
|
4352
5051
|
* @example
|
|
4353
5052
|
* ```js
|
|
4354
5053
|
* disabledActions: [Action.OrganiseFavourites]
|
|
4355
5054
|
* ```
|
|
4356
5055
|
* @version SDK: 1.32.0 | ThoughtSpot: 10.0.0.cl
|
|
5056
|
+
* @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
4357
5057
|
*/
|
|
4358
5058
|
Action["OrganiseFavourites"] = "organiseFavourites";
|
|
5059
|
+
/**
|
|
5060
|
+
* The **Organize Favorites** action on Homepage
|
|
5061
|
+
* *Favorites* module.
|
|
5062
|
+
*
|
|
5063
|
+
* @example
|
|
5064
|
+
* ```js
|
|
5065
|
+
* disabledActions: [Action.OrganizeFavorites]
|
|
5066
|
+
* ```
|
|
5067
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
5068
|
+
*/
|
|
5069
|
+
Action["OrganizeFavorites"] = "organiseFavourites";
|
|
4359
5070
|
/**
|
|
4360
5071
|
* The **AI Highlights** action on a Liveboard.
|
|
4361
5072
|
*
|
|
@@ -5105,6 +5816,22 @@ var EmbedErrorCodes;
|
|
|
5105
5816
|
/** Invalid URL provided in configuration */
|
|
5106
5817
|
EmbedErrorCodes["INVALID_URL"] = "INVALID_URL";
|
|
5107
5818
|
})(EmbedErrorCodes = exports.EmbedErrorCodes || (exports.EmbedErrorCodes = {}));
|
|
5819
|
+
/**
|
|
5820
|
+
* Context types for specifying the page context when triggering host events.
|
|
5821
|
+
* Used as the third parameter in the `trigger` method to help ThoughtSpot
|
|
5822
|
+
* understand the current page context for better event handling.
|
|
5823
|
+
*
|
|
5824
|
+
* @example
|
|
5825
|
+
* ```js
|
|
5826
|
+
* import { HostEvent, ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5827
|
+
*
|
|
5828
|
+
* // Trigger an event with specific context
|
|
5829
|
+
* embed.trigger(HostEvent.Pin, { vizId: "123", liveboardId: "456" }, ContextType.Search);
|
|
5830
|
+
* ```
|
|
5831
|
+
*
|
|
5832
|
+
* @version SDK: 1.45.2 | ThoughtSpot: 26.3.0.cl
|
|
5833
|
+
* @group Events
|
|
5834
|
+
*/
|
|
5108
5835
|
var ContextType;
|
|
5109
5836
|
(function (ContextType) {
|
|
5110
5837
|
/**
|
|
@@ -5123,6 +5850,10 @@ var ContextType;
|
|
|
5123
5850
|
* Spotter context for spotter modal/page.
|
|
5124
5851
|
*/
|
|
5125
5852
|
ContextType["Spotter"] = "spotter";
|
|
5853
|
+
/**
|
|
5854
|
+
* Other context for any other generic page.
|
|
5855
|
+
*/
|
|
5856
|
+
ContextType["Other"] = "other";
|
|
5126
5857
|
})(ContextType = exports.ContextType || (exports.ContextType = {}));
|
|
5127
5858
|
/**
|
|
5128
5859
|
* Enum for the type of API intercepted
|