@thoughtspot/visual-embed-sdk 1.46.4 → 1.46.5
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 +87 -17
- package/cjs/src/css-variables.d.ts.map +1 -1
- package/cjs/src/embed/app.d.ts +41 -1
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +25 -36
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/app.spec.js +35 -23
- 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/conversation.d.ts +23 -1
- package/cjs/src/embed/conversation.d.ts.map +1 -1
- package/cjs/src/embed/conversation.js +18 -33
- package/cjs/src/embed/conversation.js.map +1 -1
- package/cjs/src/embed/conversation.spec.js +129 -97
- package/cjs/src/embed/conversation.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 +105 -3
- package/cjs/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/cjs/src/embed/hostEventClient/contracts.js +9 -0
- package/cjs/src/embed/hostEventClient/contracts.js.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.d.ts +28 -0
- package/cjs/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.js +106 -9
- package/cjs/src/embed/hostEventClient/host-event-client.js.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.spec.js +327 -6
- package/cjs/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
- package/cjs/src/embed/hostEventClient/utils.d.ts +22 -0
- package/cjs/src/embed/hostEventClient/utils.d.ts.map +1 -0
- package/cjs/src/embed/hostEventClient/utils.js +51 -0
- package/cjs/src/embed/hostEventClient/utils.js.map +1 -0
- package/cjs/src/embed/hostEventClient/utils.spec.d.ts +2 -0
- package/cjs/src/embed/hostEventClient/utils.spec.d.ts.map +1 -0
- package/cjs/src/embed/hostEventClient/utils.spec.js +115 -0
- package/cjs/src/embed/hostEventClient/utils.spec.js.map +1 -0
- package/cjs/src/embed/liveboard.d.ts +18 -0
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +10 -3
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/liveboard.spec.js +54 -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/spotter-utils.d.ts +20 -0
- package/cjs/src/embed/spotter-utils.d.ts.map +1 -0
- package/cjs/src/embed/spotter-utils.js +52 -0
- package/cjs/src/embed/spotter-utils.js.map +1 -0
- package/cjs/src/embed/spotter-utils.spec.d.ts +2 -0
- package/cjs/src/embed/spotter-utils.spec.d.ts.map +1 -0
- package/cjs/src/embed/spotter-utils.spec.js +54 -0
- package/cjs/src/embed/spotter-utils.spec.js.map +1 -0
- 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 +54 -3
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/errors.d.ts +2 -0
- package/cjs/src/errors.d.ts.map +1 -1
- package/cjs/src/errors.js +2 -0
- package/cjs/src/errors.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 +832 -33
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +835 -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/cjs/src/utils.d.ts +0 -9
- package/cjs/src/utils.d.ts.map +1 -1
- package/cjs/src/utils.js +1 -10
- package/cjs/src/utils.js.map +1 -1
- package/dist/index-ChNydfIz.js +7371 -0
- package/dist/index-DW2wEHqy.js +7371 -0
- 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 +87 -17
- package/dist/src/css-variables.d.ts.map +1 -1
- package/dist/src/embed/app.d.ts +41 -1
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/base.d.ts.map +1 -1
- package/dist/src/embed/conversation.d.ts +23 -1
- package/dist/src/embed/conversation.d.ts.map +1 -1
- package/dist/src/embed/hostEventClient/contracts.d.ts +105 -3
- package/dist/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/dist/src/embed/hostEventClient/host-event-client.d.ts +28 -0
- package/dist/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/dist/src/embed/hostEventClient/utils.d.ts +22 -0
- package/dist/src/embed/hostEventClient/utils.d.ts.map +1 -0
- package/dist/src/embed/hostEventClient/utils.spec.d.ts +2 -0
- package/dist/src/embed/hostEventClient/utils.spec.d.ts.map +1 -0
- package/dist/src/embed/liveboard.d.ts +18 -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/spotter-utils.d.ts +20 -0
- package/dist/src/embed/spotter-utils.d.ts.map +1 -0
- package/dist/src/embed/spotter-utils.spec.d.ts +2 -0
- package/dist/src/embed/spotter-utils.spec.d.ts.map +1 -0
- package/dist/src/embed/ts-embed.d.ts +41 -2
- package/dist/src/embed/ts-embed.d.ts.map +1 -1
- package/dist/src/errors.d.ts +2 -0
- package/dist/src/errors.d.ts.map +1 -1
- package/dist/src/react/index.d.ts.map +1 -1
- package/dist/src/types.d.ts +832 -33
- 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/src/utils.d.ts +0 -9
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +1208 -154
- package/dist/tsembed-react.js +1206 -152
- package/dist/tsembed.es.js +1150 -101
- package/dist/tsembed.js +1148 -99
- package/dist/visual-embed-sdk-react-full.d.ts +1156 -55
- package/dist/visual-embed-sdk-react.d.ts +1156 -55
- package/dist/visual-embed-sdk.d.ts +1179 -60
- 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 +87 -17
- package/lib/src/css-variables.d.ts.map +1 -1
- package/lib/src/embed/app.d.ts +41 -1
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +27 -38
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/app.spec.js +35 -23
- 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/conversation.d.ts +23 -1
- package/lib/src/embed/conversation.d.ts.map +1 -1
- package/lib/src/embed/conversation.js +19 -34
- package/lib/src/embed/conversation.js.map +1 -1
- package/lib/src/embed/conversation.spec.js +131 -99
- package/lib/src/embed/conversation.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 +105 -3
- package/lib/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/lib/src/embed/hostEventClient/contracts.js +9 -0
- package/lib/src/embed/hostEventClient/contracts.js.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.d.ts +28 -0
- package/lib/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.js +106 -9
- package/lib/src/embed/hostEventClient/host-event-client.js.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.spec.js +327 -6
- package/lib/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
- package/lib/src/embed/hostEventClient/utils.d.ts +22 -0
- package/lib/src/embed/hostEventClient/utils.d.ts.map +1 -0
- package/lib/src/embed/hostEventClient/utils.js +43 -0
- package/lib/src/embed/hostEventClient/utils.js.map +1 -0
- package/lib/src/embed/hostEventClient/utils.spec.d.ts +2 -0
- package/lib/src/embed/hostEventClient/utils.spec.d.ts.map +1 -0
- package/lib/src/embed/hostEventClient/utils.spec.js +113 -0
- package/lib/src/embed/hostEventClient/utils.spec.js.map +1 -0
- package/lib/src/embed/liveboard.d.ts +18 -0
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +10 -3
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +54 -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/spotter-utils.d.ts +20 -0
- package/lib/src/embed/spotter-utils.d.ts.map +1 -0
- package/lib/src/embed/spotter-utils.js +47 -0
- package/lib/src/embed/spotter-utils.js.map +1 -0
- package/lib/src/embed/spotter-utils.spec.d.ts +2 -0
- package/lib/src/embed/spotter-utils.spec.d.ts.map +1 -0
- package/lib/src/embed/spotter-utils.spec.js +52 -0
- package/lib/src/embed/spotter-utils.spec.js.map +1 -0
- 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 +55 -4
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/errors.d.ts +2 -0
- package/lib/src/errors.d.ts.map +1 -1
- package/lib/src/errors.js +2 -0
- package/lib/src/errors.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 +832 -33
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +835 -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/utils.d.ts +0 -9
- package/lib/src/utils.d.ts.map +1 -1
- package/lib/src/utils.js +0 -8
- package/lib/src/utils.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +1179 -60
- 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 +96 -17
- package/src/embed/app.spec.ts +48 -30
- package/src/embed/app.ts +59 -54
- package/src/embed/base.spec.ts +1 -2
- package/src/embed/base.ts +1 -4
- package/src/embed/conversation.spec.ts +150 -119
- package/src/embed/conversation.ts +30 -54
- package/src/embed/events.spec.ts +88 -0
- package/src/embed/hostEventClient/contracts.ts +105 -2
- package/src/embed/hostEventClient/host-event-client.spec.ts +504 -6
- package/src/embed/hostEventClient/host-event-client.ts +146 -15
- package/src/embed/hostEventClient/utils.spec.ts +137 -0
- package/src/embed/hostEventClient/utils.ts +61 -0
- package/src/embed/liveboard.spec.ts +71 -2
- package/src/embed/liveboard.ts +29 -2
- package/src/embed/sage.ts +0 -1
- package/src/embed/search.spec.ts +0 -2
- package/src/embed/spotter-utils.spec.ts +56 -0
- package/src/embed/spotter-utils.ts +65 -0
- package/src/embed/ts-embed.ts +58 -4
- package/src/errors.ts +2 -0
- package/src/react/index.tsx +76 -72
- package/src/types.ts +843 -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/src/utils.ts +0 -14
package/dist/tsembed-react.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @thoughtspot/visual-embed-sdk version 1.46.
|
|
1
|
+
/* @thoughtspot/visual-embed-sdk version 1.46.5 */
|
|
2
2
|
'use client';
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) :
|
|
@@ -260,6 +260,7 @@
|
|
|
260
260
|
* @deprecated This option is deprecated.
|
|
261
261
|
* @hidden
|
|
262
262
|
*/
|
|
263
|
+
// eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values
|
|
263
264
|
AuthType["SAML"] = "SSO_SAML";
|
|
264
265
|
/**
|
|
265
266
|
* SSO using SAML
|
|
@@ -305,6 +306,7 @@
|
|
|
305
306
|
* });
|
|
306
307
|
* ```
|
|
307
308
|
*/
|
|
309
|
+
// eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values
|
|
308
310
|
AuthType["SAMLRedirect"] = "SSO_SAML";
|
|
309
311
|
/**
|
|
310
312
|
* SSO using OIDC
|
|
@@ -318,6 +320,7 @@
|
|
|
318
320
|
* Will make the host application redirect to the OIDC IdP.
|
|
319
321
|
* See code samples in {@link SAMLRedirect}.
|
|
320
322
|
*/
|
|
323
|
+
// eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values
|
|
321
324
|
AuthType["OIDCRedirect"] = "SSO_OIDC";
|
|
322
325
|
/**
|
|
323
326
|
* Trusted authentication server
|
|
@@ -343,6 +346,7 @@
|
|
|
343
346
|
* });
|
|
344
347
|
* ```
|
|
345
348
|
*/
|
|
349
|
+
// eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values
|
|
346
350
|
AuthType["TrustedAuthToken"] = "AuthServer";
|
|
347
351
|
/**
|
|
348
352
|
* Trusted authentication server Cookieless, Use your own authentication
|
|
@@ -1079,6 +1083,17 @@
|
|
|
1079
1083
|
* ```
|
|
1080
1084
|
*/
|
|
1081
1085
|
EmbedEvent["DownloadAsXlsx"] = "downloadAsXlsx";
|
|
1086
|
+
/**
|
|
1087
|
+
* Emitted when the Download Liveboard as Continuous PDF action is triggered
|
|
1088
|
+
* on a Liveboard.
|
|
1089
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
1090
|
+
* @example
|
|
1091
|
+
* ```js
|
|
1092
|
+
* liveboardEmbed.on(EmbedEvent.DownloadLiveboardAsContinuousPDF, payload => {
|
|
1093
|
+
* console.log('download liveboard as continuous PDF', payload)})
|
|
1094
|
+
* ```
|
|
1095
|
+
*/
|
|
1096
|
+
EmbedEvent["DownloadLiveboardAsContinuousPDF"] = "downloadLiveboardAsContinuousPDF";
|
|
1082
1097
|
/**
|
|
1083
1098
|
* Emitted when an Answer is deleted in the app
|
|
1084
1099
|
* Use start:true to subscribe to when delete is initiated, or end:true to subscribe
|
|
@@ -1482,22 +1497,45 @@
|
|
|
1482
1497
|
/**
|
|
1483
1498
|
* Emitted when name, status (private or public) or filter values of a
|
|
1484
1499
|
* Personalised view is updated.
|
|
1500
|
+
* This event is deprecated. Use {@link EmbedEvent.UpdatePersonalizedView} instead.
|
|
1485
1501
|
* @returns viewName: string
|
|
1486
1502
|
* @returns viewId: string
|
|
1487
1503
|
* @returns liveboardId: string
|
|
1488
1504
|
* @returns isPublic: boolean
|
|
1489
1505
|
* @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
|
|
1506
|
+
* @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
1490
1507
|
*/
|
|
1491
1508
|
EmbedEvent["UpdatePersonalisedView"] = "updatePersonalisedView";
|
|
1509
|
+
/**
|
|
1510
|
+
* Emitted when name, status (private or public) or filter values of a
|
|
1511
|
+
* Personalized view is updated.
|
|
1512
|
+
* @returns viewName: string
|
|
1513
|
+
* @returns viewId: string
|
|
1514
|
+
* @returns liveboardId: string
|
|
1515
|
+
* @returns isPublic: boolean
|
|
1516
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
1517
|
+
*/
|
|
1518
|
+
EmbedEvent["UpdatePersonalizedView"] = "updatePersonalisedView";
|
|
1492
1519
|
/**
|
|
1493
1520
|
* Emitted when a Personalised view is saved.
|
|
1521
|
+
* This event is deprecated. Use {@link EmbedEvent.SavePersonalizedView} instead.
|
|
1494
1522
|
* @returns viewName: string
|
|
1495
1523
|
* @returns viewId: string
|
|
1496
1524
|
* @returns liveboardId: string
|
|
1497
1525
|
* @returns isPublic: boolean
|
|
1498
1526
|
* @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
|
|
1527
|
+
* @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
1499
1528
|
*/
|
|
1500
1529
|
EmbedEvent["SavePersonalisedView"] = "savePersonalisedView";
|
|
1530
|
+
/**
|
|
1531
|
+
* Emitted when a Personalized view is saved.
|
|
1532
|
+
* @returns viewName: string
|
|
1533
|
+
* @returns viewId: string
|
|
1534
|
+
* @returns liveboardId: string
|
|
1535
|
+
* @returns isPublic: boolean
|
|
1536
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
1537
|
+
*/
|
|
1538
|
+
EmbedEvent["SavePersonalizedView"] = "savePersonalisedView";
|
|
1501
1539
|
/**
|
|
1502
1540
|
* Emitted when a Liveboard is reset.
|
|
1503
1541
|
* @returns viewName: string
|
|
@@ -1509,11 +1547,41 @@
|
|
|
1509
1547
|
EmbedEvent["ResetLiveboard"] = "resetLiveboard";
|
|
1510
1548
|
/**
|
|
1511
1549
|
* Emitted when a PersonalisedView is deleted.
|
|
1550
|
+
* This event is deprecated. Use {@link EmbedEvent.DeletePersonalizedView} instead.
|
|
1512
1551
|
* @returns views: string[]
|
|
1513
1552
|
* @returns liveboardId: string
|
|
1514
1553
|
* @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
|
|
1554
|
+
* @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
1515
1555
|
*/
|
|
1516
1556
|
EmbedEvent["DeletePersonalisedView"] = "deletePersonalisedView";
|
|
1557
|
+
/**
|
|
1558
|
+
* Emitted when a PersonalizedView is deleted.
|
|
1559
|
+
* @returns views: string[]
|
|
1560
|
+
* @returns liveboardId: string
|
|
1561
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
1562
|
+
*/
|
|
1563
|
+
EmbedEvent["DeletePersonalizedView"] = "deletePersonalisedView";
|
|
1564
|
+
/**
|
|
1565
|
+
* Emitted when a user selects a different Personalized View or
|
|
1566
|
+
* resets to the original/default view on a Liveboard.
|
|
1567
|
+
* @example
|
|
1568
|
+
* ```js
|
|
1569
|
+
* liveboardEmbed.on(EmbedEvent.ChangePersonalizedView, (data) => {
|
|
1570
|
+
* console.log(data.viewName); // 'Q4 Revenue' or 'Original View'
|
|
1571
|
+
* console.log(data.viewId); // '2a021a12-...' or null (default)
|
|
1572
|
+
* console.log(data.liveboardId); // 'abc123...'
|
|
1573
|
+
* console.log(data.isPublic); // true | false
|
|
1574
|
+
* })
|
|
1575
|
+
* ```
|
|
1576
|
+
* @returns viewName: string - Name of the selected view,
|
|
1577
|
+
* or 'Original View' when reset to default.
|
|
1578
|
+
* @returns viewId: string | null - GUID of the selected view,
|
|
1579
|
+
* or null when reset to default.
|
|
1580
|
+
* @returns liveboardId: string
|
|
1581
|
+
* @returns isPublic: boolean
|
|
1582
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
1583
|
+
*/
|
|
1584
|
+
EmbedEvent["ChangePersonalizedView"] = "changePersonalisedView";
|
|
1517
1585
|
/**
|
|
1518
1586
|
* Emitted when a user creates a Worksheet.
|
|
1519
1587
|
* @version SDK: 1.27.0 | ThoughtSpot: 9.8.0.cl, 9.8.0.sw
|
|
@@ -1547,7 +1615,8 @@
|
|
|
1547
1615
|
* @param - Includes the following parameters:
|
|
1548
1616
|
* - `payload`: The payload received from the embed related to the Data API call.
|
|
1549
1617
|
* - `responder`: Contains elements that let developers define whether ThoughtSpot
|
|
1550
|
-
* will run or block the search operation, and if blocked, which error message to
|
|
1618
|
+
* will run or block the search operation, and if blocked, which error message to
|
|
1619
|
+
* provide.
|
|
1551
1620
|
* - `execute` - When `execute` returns `true`, the search is run.
|
|
1552
1621
|
* When `execute` returns `false`, the search is not executed.
|
|
1553
1622
|
* - `error` - Developers can customize the user-facing error message when `execute`
|
|
@@ -1981,6 +2050,25 @@
|
|
|
1981
2050
|
* );
|
|
1982
2051
|
* }
|
|
1983
2052
|
* ```
|
|
2053
|
+
*
|
|
2054
|
+
* **Context Parameter (SDK: 1.45.2+)**
|
|
2055
|
+
*
|
|
2056
|
+
* Starting from SDK version 1.45.2 | ThoughtSpot: 26.3.0.cl, you can optionally pass a
|
|
2057
|
+
* `ContextType` as the third parameter to the `trigger` method to specify the context
|
|
2058
|
+
* from which the event is triggered. This helps ThoughtSpot understand the current page
|
|
2059
|
+
* context (Search, Answer, Liveboard, or Spotter) for better event handling.
|
|
2060
|
+
*
|
|
2061
|
+
* @example
|
|
2062
|
+
* ```js
|
|
2063
|
+
* import { HostEvent, ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2064
|
+
*
|
|
2065
|
+
* // Trigger Pin event with Search context
|
|
2066
|
+
* appEmbed.trigger(HostEvent.Pin, {
|
|
2067
|
+
* vizId: "123",
|
|
2068
|
+
* liveboardId: "456"
|
|
2069
|
+
* }, ContextType.Search);
|
|
2070
|
+
* ```
|
|
2071
|
+
*
|
|
1984
2072
|
* @group Events
|
|
1985
2073
|
*/
|
|
1986
2074
|
exports.HostEvent = void 0;
|
|
@@ -2003,6 +2091,16 @@
|
|
|
2003
2091
|
execute: true
|
|
2004
2092
|
});
|
|
2005
2093
|
* ```
|
|
2094
|
+
* @example
|
|
2095
|
+
* ```js
|
|
2096
|
+
* // Trigger search from search context
|
|
2097
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2098
|
+
* appEmbed.trigger(HostEvent.Search, {
|
|
2099
|
+
* searchQuery: "[revenue] by [region]",
|
|
2100
|
+
* dataSources: ["cd252e5c-b552-49a8-821d-3eadaa049cca"],
|
|
2101
|
+
* execute: true
|
|
2102
|
+
* }, ContextType.Search);
|
|
2103
|
+
* ```
|
|
2006
2104
|
*/
|
|
2007
2105
|
HostEvent["Search"] = "search";
|
|
2008
2106
|
/**
|
|
@@ -2053,6 +2151,24 @@
|
|
|
2053
2151
|
* });
|
|
2054
2152
|
* })
|
|
2055
2153
|
* ```
|
|
2154
|
+
* @example
|
|
2155
|
+
* ```js
|
|
2156
|
+
* // Drill down from answer context
|
|
2157
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2158
|
+
* appEmbed.trigger(HostEvent.DrillDown, {
|
|
2159
|
+
* points: { clickedPoint, selectedPoints },
|
|
2160
|
+
* autoDrillDown: true
|
|
2161
|
+
* }, ContextType.Answer);
|
|
2162
|
+
* ```
|
|
2163
|
+
* @example
|
|
2164
|
+
* ```js
|
|
2165
|
+
* // Drill down from search context
|
|
2166
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2167
|
+
* searchEmbed.trigger(HostEvent.DrillDown, {
|
|
2168
|
+
* points: { clickedPoint, selectedPoints },
|
|
2169
|
+
* columnGuid: "column-guid"
|
|
2170
|
+
* }, ContextType.Search);
|
|
2171
|
+
* ```
|
|
2056
2172
|
* @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
|
|
2057
2173
|
*/
|
|
2058
2174
|
HostEvent["DrillDown"] = "triggerDrillDown";
|
|
@@ -2073,6 +2189,13 @@
|
|
|
2073
2189
|
* const url = embed.trigger(HostEvent.GetIframeUrl);
|
|
2074
2190
|
* console.log("iFrameURL",url);
|
|
2075
2191
|
* ```
|
|
2192
|
+
* @example
|
|
2193
|
+
* ```js
|
|
2194
|
+
* // Get iframe URL from specific context
|
|
2195
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2196
|
+
* const url = await appEmbed.trigger(HostEvent.GetIframeUrl, {}, ContextType.Answer);
|
|
2197
|
+
* console.log("iFrameURL", url);
|
|
2198
|
+
* ```
|
|
2076
2199
|
* @version SDK: 1.35.0 | ThoughtSpot: 10.4.0.cl
|
|
2077
2200
|
*/
|
|
2078
2201
|
HostEvent["GetIframeUrl"] = "GetIframeUrl";
|
|
@@ -2086,6 +2209,15 @@
|
|
|
2086
2209
|
* '730496d6-6903-4601-937e-2c691821af3c',
|
|
2087
2210
|
* 'd547ec54-2a37-4516-a222-2b06719af726'])
|
|
2088
2211
|
* ```
|
|
2212
|
+
* @example
|
|
2213
|
+
* ```js
|
|
2214
|
+
* // Set visible vizs from liveboard context
|
|
2215
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2216
|
+
* liveboardEmbed.trigger(HostEvent.SetVisibleVizs, [
|
|
2217
|
+
* '730496d6-6903-4601-937e-2c691821af3c',
|
|
2218
|
+
* 'd547ec54-2a37-4516-a222-2b06719af726'
|
|
2219
|
+
* ], ContextType.Liveboard);
|
|
2220
|
+
* ```
|
|
2089
2221
|
* @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
|
|
2090
2222
|
*/
|
|
2091
2223
|
HostEvent["SetVisibleVizs"] = "SetPinboardVisibleVizs";
|
|
@@ -2098,6 +2230,14 @@
|
|
|
2098
2230
|
* tabId:'730496d6-6903-4601-937e-2c691821af3c'
|
|
2099
2231
|
* })
|
|
2100
2232
|
* ```
|
|
2233
|
+
* @example
|
|
2234
|
+
* ```js
|
|
2235
|
+
* // Set active tab from liveboard context
|
|
2236
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2237
|
+
* liveboardEmbed.trigger(HostEvent.SetActiveTab, {
|
|
2238
|
+
* tabId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
2239
|
+
* }, ContextType.Liveboard);
|
|
2240
|
+
* ```
|
|
2101
2241
|
* @version SDK: 1.24.0 | ThoughtSpot: 9.5.0.cl, 9.5.1-sw
|
|
2102
2242
|
*/
|
|
2103
2243
|
HostEvent["SetActiveTab"] = "SetActiveTab";
|
|
@@ -2131,6 +2271,15 @@
|
|
|
2131
2271
|
* {columnName: "item type",operator: RuntimeFilterOp.EQ,values: ["Jackets"]}
|
|
2132
2272
|
* ])
|
|
2133
2273
|
* ```
|
|
2274
|
+
* @example
|
|
2275
|
+
* ```js
|
|
2276
|
+
* // Update runtime filters from liveboard context
|
|
2277
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2278
|
+
* liveboardEmbed.trigger(HostEvent.UpdateRuntimeFilters, [
|
|
2279
|
+
* {columnName: "region", operator: RuntimeFilterOp.EQ, values: ["west"]},
|
|
2280
|
+
* {columnName: "product", operator: RuntimeFilterOp.IN, values: ["shoes", "boots"]}
|
|
2281
|
+
* ], ContextType.Liveboard);
|
|
2282
|
+
* ```
|
|
2134
2283
|
* @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl, 8.4.1.sw
|
|
2135
2284
|
* @important
|
|
2136
2285
|
*/
|
|
@@ -2164,6 +2313,14 @@
|
|
|
2164
2313
|
* LiveboardEmbed.trigger(HostEvent.OpenFilter,
|
|
2165
2314
|
* { column: {columnId: '<column-GUID>'}})
|
|
2166
2315
|
* ```
|
|
2316
|
+
* @example
|
|
2317
|
+
* ```js
|
|
2318
|
+
* // Open filter from search context
|
|
2319
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2320
|
+
* searchEmbed.trigger(HostEvent.OpenFilter, {
|
|
2321
|
+
* column: { columnId: '<column-GUID>', name: 'region', type: 'ATTRIBUTE', dataType: 'CHAR'}
|
|
2322
|
+
* }, ContextType.Search);
|
|
2323
|
+
* ```
|
|
2167
2324
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
|
|
2168
2325
|
*/
|
|
2169
2326
|
HostEvent["OpenFilter"] = "openFilter";
|
|
@@ -2174,6 +2331,14 @@
|
|
|
2174
2331
|
* ```js
|
|
2175
2332
|
* searchEmbed.trigger(HostEvent.AddColumns, { columnIds: ['<column-GUID>','<column-GUID>'] })
|
|
2176
2333
|
* ```
|
|
2334
|
+
* @example
|
|
2335
|
+
* ```js
|
|
2336
|
+
* // Add columns from search context
|
|
2337
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2338
|
+
* searchEmbed.trigger(HostEvent.AddColumns, {
|
|
2339
|
+
* columnIds: ['col-guid-1', 'col-guid-2']
|
|
2340
|
+
* }, ContextType.Search);
|
|
2341
|
+
* ```
|
|
2177
2342
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
|
|
2178
2343
|
*/
|
|
2179
2344
|
HostEvent["AddColumns"] = "addColumns";
|
|
@@ -2184,6 +2349,14 @@
|
|
|
2184
2349
|
* ```js
|
|
2185
2350
|
* searchEmbed.trigger(HostEvent.RemoveColumn, { columnId: '<column-Guid>' })
|
|
2186
2351
|
* ```
|
|
2352
|
+
* @example
|
|
2353
|
+
* ```js
|
|
2354
|
+
* // Remove column from search context
|
|
2355
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2356
|
+
* searchEmbed.trigger(HostEvent.RemoveColumn, {
|
|
2357
|
+
* columnId: 'column-guid'
|
|
2358
|
+
* }, ContextType.Search);
|
|
2359
|
+
* ```
|
|
2187
2360
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
|
|
2188
2361
|
*/
|
|
2189
2362
|
HostEvent["RemoveColumn"] = "removeColumn";
|
|
@@ -2270,6 +2443,37 @@
|
|
|
2270
2443
|
*
|
|
2271
2444
|
* spotterEmbed.trigger(HostEvent.Pin, { vizId: latestSpotterVizId });
|
|
2272
2445
|
* ```
|
|
2446
|
+
* @example
|
|
2447
|
+
* ```js
|
|
2448
|
+
* // Using context parameter to specify the context type (SDK: 1.45.2+)
|
|
2449
|
+
* // Pin from a search answer context
|
|
2450
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2451
|
+
* appEmbed.trigger(HostEvent.Pin, {
|
|
2452
|
+
* vizId: "123",
|
|
2453
|
+
* newVizName: "Sales by region",
|
|
2454
|
+
* liveboardId: "456"
|
|
2455
|
+
* }, ContextType.Search);
|
|
2456
|
+
* ```
|
|
2457
|
+
* @example
|
|
2458
|
+
* ```js
|
|
2459
|
+
* // Pin from an answer context (explore modal/page) (SDK: 1.45.2+)
|
|
2460
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2461
|
+
* appEmbed.trigger(HostEvent.Pin, {
|
|
2462
|
+
* vizId: "789",
|
|
2463
|
+
* newVizName: "Revenue trends",
|
|
2464
|
+
* liveboardId: "456"
|
|
2465
|
+
* }, ContextType.Answer);
|
|
2466
|
+
* ```
|
|
2467
|
+
* @example
|
|
2468
|
+
* ```js
|
|
2469
|
+
* // Pin from a spotter context (SDK: 1.45.2+)
|
|
2470
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2471
|
+
* appEmbed.trigger(HostEvent.Pin, {
|
|
2472
|
+
* vizId: latestSpotterVizId,
|
|
2473
|
+
* newVizName: "AI-generated insights",
|
|
2474
|
+
* liveboardId: "456"
|
|
2475
|
+
* }, ContextType.Spotter);
|
|
2476
|
+
* ```
|
|
2273
2477
|
*
|
|
2274
2478
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2275
2479
|
*/
|
|
@@ -2280,6 +2484,12 @@
|
|
|
2280
2484
|
* @example
|
|
2281
2485
|
* ```js
|
|
2282
2486
|
* liveboardEmbed.trigger(HostEvent.LiveboardInfo)
|
|
2487
|
+
*```
|
|
2488
|
+
* @example
|
|
2489
|
+
* ```js
|
|
2490
|
+
* // Show liveboard info from liveboard context
|
|
2491
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2492
|
+
* liveboardEmbed.trigger(HostEvent.LiveboardInfo, {}, ContextType.Liveboard);
|
|
2283
2493
|
* ```
|
|
2284
2494
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2285
2495
|
*/
|
|
@@ -2290,6 +2500,12 @@
|
|
|
2290
2500
|
* ```js
|
|
2291
2501
|
* liveboardEmbed.trigger(HostEvent.Schedule)
|
|
2292
2502
|
* ```
|
|
2503
|
+
* @example
|
|
2504
|
+
* ```js
|
|
2505
|
+
* // Schedule from liveboard context
|
|
2506
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2507
|
+
* liveboardEmbed.trigger(HostEvent.Schedule, {}, ContextType.Liveboard);
|
|
2508
|
+
* ```
|
|
2293
2509
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2294
2510
|
*/
|
|
2295
2511
|
HostEvent["Schedule"] = "subscription";
|
|
@@ -2299,6 +2515,12 @@
|
|
|
2299
2515
|
* ```js
|
|
2300
2516
|
* liveboardEmbed.trigger(HostEvent.ScheduleList)
|
|
2301
2517
|
* ```
|
|
2518
|
+
* @example
|
|
2519
|
+
* ```js
|
|
2520
|
+
* // Manage schedules from liveboard context
|
|
2521
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2522
|
+
* liveboardEmbed.trigger(HostEvent.ScheduleList, {}, ContextType.Liveboard);
|
|
2523
|
+
* ```
|
|
2302
2524
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2303
2525
|
*/
|
|
2304
2526
|
HostEvent["SchedulesList"] = "schedule-list";
|
|
@@ -2309,6 +2531,18 @@
|
|
|
2309
2531
|
* ```js
|
|
2310
2532
|
* liveboardEmbed.trigger(HostEvent.ExportTML)
|
|
2311
2533
|
* ```
|
|
2534
|
+
* @example
|
|
2535
|
+
* ```js
|
|
2536
|
+
* // Export TML from liveboard context
|
|
2537
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2538
|
+
* liveboardEmbed.trigger(HostEvent.ExportTML, {}, ContextType.Liveboard);
|
|
2539
|
+
* ```
|
|
2540
|
+
* @example
|
|
2541
|
+
* ```js
|
|
2542
|
+
* // Export TML from search-answer context
|
|
2543
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2544
|
+
* appEmbed.trigger(HostEvent.ExportTML, {}, ContextType.Search);
|
|
2545
|
+
* ```
|
|
2312
2546
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2313
2547
|
*/
|
|
2314
2548
|
HostEvent["ExportTML"] = "exportTSL";
|
|
@@ -2319,6 +2553,18 @@
|
|
|
2319
2553
|
* ```js
|
|
2320
2554
|
* liveboardEmbed.trigger(HostEvent.EditTML)
|
|
2321
2555
|
* ```
|
|
2556
|
+
* @example
|
|
2557
|
+
* ```js
|
|
2558
|
+
* // Edit TML from liveboard context
|
|
2559
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2560
|
+
* liveboardEmbed.trigger(HostEvent.EditTML, {}, ContextType.Liveboard);
|
|
2561
|
+
* ```
|
|
2562
|
+
* @example
|
|
2563
|
+
* ```js
|
|
2564
|
+
* // Edit TML from search-answer context
|
|
2565
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2566
|
+
* appEmbed.trigger(HostEvent.EditTML, {}, ContextType.Search);
|
|
2567
|
+
* ```
|
|
2322
2568
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2323
2569
|
*/
|
|
2324
2570
|
HostEvent["EditTML"] = "editTSL";
|
|
@@ -2328,6 +2574,12 @@
|
|
|
2328
2574
|
* ```js
|
|
2329
2575
|
* liveboardEmbed.trigger(HostEvent.UpdateTML)
|
|
2330
2576
|
* ```
|
|
2577
|
+
* @example
|
|
2578
|
+
* ```js
|
|
2579
|
+
* // Update TML from liveboard context
|
|
2580
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2581
|
+
* liveboardEmbed.trigger(HostEvent.UpdateTML, {}, ContextType.Liveboard);
|
|
2582
|
+
* ```
|
|
2331
2583
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2332
2584
|
*/
|
|
2333
2585
|
HostEvent["UpdateTML"] = "updateTSL";
|
|
@@ -2354,10 +2606,34 @@
|
|
|
2354
2606
|
*
|
|
2355
2607
|
* spotterEmbed.trigger(HostEvent.DownloadAsPdf, { vizId: latestSpotterVizId });
|
|
2356
2608
|
* ```
|
|
2609
|
+
* @example
|
|
2610
|
+
* ```js
|
|
2611
|
+
* // Download as PDF from search-answer context
|
|
2612
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2613
|
+
* appEmbed.trigger(HostEvent.DownloadAsPdf, {}, ContextType.Search);
|
|
2614
|
+
* ```
|
|
2615
|
+
* @example
|
|
2616
|
+
* ```js
|
|
2617
|
+
* // Download as PDF from liveboard context
|
|
2618
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2619
|
+
* liveboardEmbed.trigger(HostEvent.DownloadAsPdf, {}, ContextType.Liveboard);
|
|
2620
|
+
* ```
|
|
2357
2621
|
*
|
|
2358
2622
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2359
2623
|
*/
|
|
2360
2624
|
HostEvent["DownloadAsPdf"] = "downloadAsPdf";
|
|
2625
|
+
/**
|
|
2626
|
+
* Trigger the **Download Liveboard as Continuous PDF** action on an
|
|
2627
|
+
* embedded Liveboard.
|
|
2628
|
+
*
|
|
2629
|
+
* @example
|
|
2630
|
+
* ```js
|
|
2631
|
+
* liveboardEmbed.trigger(HostEvent.DownloadLiveboardAsContinuousPDF)
|
|
2632
|
+
* ```
|
|
2633
|
+
*
|
|
2634
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
2635
|
+
*/
|
|
2636
|
+
HostEvent["DownloadLiveboardAsContinuousPDF"] = "downloadLiveboardAsContinuousPDF";
|
|
2361
2637
|
/**
|
|
2362
2638
|
* Trigger the **AI Highlights** action on an embedded Liveboard
|
|
2363
2639
|
*
|
|
@@ -2398,6 +2674,18 @@
|
|
|
2398
2674
|
*
|
|
2399
2675
|
* spotterEmbed.trigger(HostEvent.MakeACopy, { vizId: latestSpotterVizId });
|
|
2400
2676
|
* ```
|
|
2677
|
+
* @example
|
|
2678
|
+
* ```js
|
|
2679
|
+
* // Make a copy from answer context
|
|
2680
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2681
|
+
* appEmbed.trigger(HostEvent.MakeACopy, {}, ContextType.Answer);
|
|
2682
|
+
* ```
|
|
2683
|
+
* @example
|
|
2684
|
+
* ```js
|
|
2685
|
+
* // Make a copy from search context
|
|
2686
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2687
|
+
* appEmbed.trigger(HostEvent.MakeACopy, {}, ContextType.Search);
|
|
2688
|
+
* ```
|
|
2401
2689
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2402
2690
|
*/
|
|
2403
2691
|
HostEvent["MakeACopy"] = "makeACopy";
|
|
@@ -2422,6 +2710,14 @@
|
|
|
2422
2710
|
* ```js
|
|
2423
2711
|
* liveboardEmbed.trigger(HostEvent.Explore, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
2424
2712
|
* ```
|
|
2713
|
+
* @example
|
|
2714
|
+
* ```js
|
|
2715
|
+
* // Explore from liveboard context
|
|
2716
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2717
|
+
* liveboardEmbed.trigger(HostEvent.Explore, {
|
|
2718
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
2719
|
+
* }, ContextType.Liveboard);
|
|
2720
|
+
* ```
|
|
2425
2721
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2426
2722
|
*/
|
|
2427
2723
|
HostEvent["Explore"] = "explore";
|
|
@@ -2439,6 +2735,20 @@
|
|
|
2439
2735
|
* ```js
|
|
2440
2736
|
* searchEmbed.trigger(HostEvent.CreateMonitor)
|
|
2441
2737
|
* ```
|
|
2738
|
+
* @example
|
|
2739
|
+
* ```js
|
|
2740
|
+
* // Create monitor from answer context
|
|
2741
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2742
|
+
* appEmbed.trigger(HostEvent.CreateMonitor, {}, ContextType.Answer);
|
|
2743
|
+
* ```
|
|
2744
|
+
* @example
|
|
2745
|
+
* ```js
|
|
2746
|
+
* // Create monitor from liveboard context
|
|
2747
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2748
|
+
* liveboardEmbed.trigger(HostEvent.CreateMonitor, {
|
|
2749
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
2750
|
+
* }, ContextType.Liveboard);
|
|
2751
|
+
* ```
|
|
2442
2752
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2443
2753
|
*/
|
|
2444
2754
|
HostEvent["CreateMonitor"] = "createMonitor";
|
|
@@ -2460,6 +2770,20 @@
|
|
|
2460
2770
|
* ```js
|
|
2461
2771
|
* vizEmbed.trigger(HostEvent.ManageMonitor)
|
|
2462
2772
|
* ```
|
|
2773
|
+
* @example
|
|
2774
|
+
* ```js
|
|
2775
|
+
* // Manage monitor from answer context
|
|
2776
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2777
|
+
* appEmbed.trigger(HostEvent.ManageMonitor, {}, ContextType.Answer);
|
|
2778
|
+
* ```
|
|
2779
|
+
* @example
|
|
2780
|
+
* ```js
|
|
2781
|
+
* // Manage monitor from liveboard context
|
|
2782
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2783
|
+
* liveboardEmbed.trigger(HostEvent.ManageMonitor, {
|
|
2784
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
2785
|
+
* }, ContextType.Liveboard);
|
|
2786
|
+
* ```
|
|
2463
2787
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2464
2788
|
*/
|
|
2465
2789
|
HostEvent["ManageMonitor"] = "manageMonitor";
|
|
@@ -2485,6 +2809,26 @@
|
|
|
2485
2809
|
* ```js
|
|
2486
2810
|
* spotterEmbed.trigger(HostEvent.Edit);
|
|
2487
2811
|
* ```
|
|
2812
|
+
* @example
|
|
2813
|
+
* ```js
|
|
2814
|
+
* // Using context parameter to edit liveboard context
|
|
2815
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2816
|
+
* liveboardEmbed.trigger(HostEvent.Edit, {}, ContextType.Liveboard);
|
|
2817
|
+
* ```
|
|
2818
|
+
* @example
|
|
2819
|
+
* ```js
|
|
2820
|
+
* // Edit from search context
|
|
2821
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2822
|
+
* appEmbed.trigger(HostEvent.Edit, {}, ContextType.Search);
|
|
2823
|
+
* ```
|
|
2824
|
+
* * @example
|
|
2825
|
+
* ```js
|
|
2826
|
+
* // Edit from spotter context
|
|
2827
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2828
|
+
* appEmbed.trigger(HostEvent.Edit, {
|
|
2829
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
2830
|
+
* }, ContextType.Spotter);
|
|
2831
|
+
* ```
|
|
2488
2832
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2489
2833
|
*/
|
|
2490
2834
|
HostEvent["Edit"] = "edit";
|
|
@@ -2502,6 +2846,34 @@
|
|
|
2502
2846
|
* ```js
|
|
2503
2847
|
* vizEmbed.trigger(HostEvent.CopyLink)
|
|
2504
2848
|
* ```
|
|
2849
|
+
* @example
|
|
2850
|
+
* ```js
|
|
2851
|
+
* // Copy link from liveboard context
|
|
2852
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2853
|
+
* liveboardEmbed.trigger(HostEvent.CopyLink, {}, ContextType.Liveboard);
|
|
2854
|
+
* ```
|
|
2855
|
+
* @example
|
|
2856
|
+
* ```js
|
|
2857
|
+
* // Copy link from liveboard visualization context
|
|
2858
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2859
|
+
* liveboardEmbed.trigger(HostEvent.CopyLink, {
|
|
2860
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
2861
|
+
* }, ContextType.Liveboard);
|
|
2862
|
+
* ```
|
|
2863
|
+
* @example
|
|
2864
|
+
* ```js
|
|
2865
|
+
* // Copy link from liveboard context
|
|
2866
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2867
|
+
* liveboardEmbed.trigger(HostEvent.CopyLink, {}, ContextType.Liveboard);
|
|
2868
|
+
* ```
|
|
2869
|
+
* @example
|
|
2870
|
+
* ```js
|
|
2871
|
+
* // Copy link from liveboard visualization context
|
|
2872
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2873
|
+
* liveboardEmbed.trigger(HostEvent.CopyLink, {
|
|
2874
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
2875
|
+
* }, ContextType.Liveboard);
|
|
2876
|
+
* ```
|
|
2505
2877
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2506
2878
|
*/
|
|
2507
2879
|
HostEvent["CopyLink"] = "embedDocument";
|
|
@@ -2519,6 +2891,34 @@
|
|
|
2519
2891
|
* ```js
|
|
2520
2892
|
* vizEmbed.trigger(HostEvent.Present)
|
|
2521
2893
|
* ```
|
|
2894
|
+
* @example
|
|
2895
|
+
* ```js
|
|
2896
|
+
* // Present from liveboard visualization context
|
|
2897
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2898
|
+
* liveboardEmbed.trigger(HostEvent.Present, {
|
|
2899
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
2900
|
+
* }, ContextType.Liveboard);
|
|
2901
|
+
* ```
|
|
2902
|
+
* @example
|
|
2903
|
+
* ```js
|
|
2904
|
+
* // Present from liveboard context
|
|
2905
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2906
|
+
* liveboardEmbed.trigger(HostEvent.Present, {}, ContextType.Liveboard);
|
|
2907
|
+
* ```
|
|
2908
|
+
* @example
|
|
2909
|
+
* ```js
|
|
2910
|
+
* // Present from liveboard visualization context
|
|
2911
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2912
|
+
* liveboardEmbed.trigger(HostEvent.Present, {
|
|
2913
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
2914
|
+
* }, ContextType.Liveboard);
|
|
2915
|
+
* ```
|
|
2916
|
+
* @example
|
|
2917
|
+
* ```js
|
|
2918
|
+
* // Present from liveboard context
|
|
2919
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2920
|
+
* liveboardEmbed.trigger(HostEvent.Present, {}, ContextType.Liveboard);
|
|
2921
|
+
* ```
|
|
2522
2922
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2523
2923
|
*/
|
|
2524
2924
|
HostEvent["Present"] = "present";
|
|
@@ -2547,6 +2947,22 @@
|
|
|
2547
2947
|
* tml.answer.search_query // TML representation of the search query
|
|
2548
2948
|
* );
|
|
2549
2949
|
* })
|
|
2950
|
+
* ```
|
|
2951
|
+
* @example
|
|
2952
|
+
* ```js
|
|
2953
|
+
* // Get TML from search context
|
|
2954
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2955
|
+
* appEmbed.trigger(HostEvent.GetTML, {}, ContextType.Search).then((tml) => {
|
|
2956
|
+
* console.log(tml.answer.search_query);
|
|
2957
|
+
* });
|
|
2958
|
+
* ```
|
|
2959
|
+
* @example
|
|
2960
|
+
* ```js
|
|
2961
|
+
* // Get TML from search-answer context
|
|
2962
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2963
|
+
* appEmbed.trigger(HostEvent.GetTML, {}, ContextType.Search).then((tml) => {
|
|
2964
|
+
* console.log(tml.answer);
|
|
2965
|
+
* });
|
|
2550
2966
|
* ```
|
|
2551
2967
|
* @version SDK: 1.18.0 | ThoughtSpot: 8.10.0.cl, 9.0.1.sw
|
|
2552
2968
|
* @important
|
|
@@ -2568,6 +2984,20 @@
|
|
|
2568
2984
|
* ```js
|
|
2569
2985
|
* searchEmbed.trigger(HostEvent.ShowUnderlyingData)
|
|
2570
2986
|
* ```
|
|
2987
|
+
* @example
|
|
2988
|
+
* ```js
|
|
2989
|
+
* // Show underlying data from liveboard visualization context
|
|
2990
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2991
|
+
* appEmbed.trigger(HostEvent.ShowUnderlyingData, {
|
|
2992
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
2993
|
+
* }, ContextType.Liveboard);
|
|
2994
|
+
* ```
|
|
2995
|
+
* @example
|
|
2996
|
+
* ```js
|
|
2997
|
+
* // Show underlying data from search context
|
|
2998
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2999
|
+
* appEmbed.trigger(HostEvent.ShowUnderlyingData, {}, ContextType.Search);
|
|
3000
|
+
* ```
|
|
2571
3001
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
2572
3002
|
*/
|
|
2573
3003
|
HostEvent["ShowUnderlyingData"] = "showUnderlyingData";
|
|
@@ -2585,6 +3015,18 @@
|
|
|
2585
3015
|
* ```js
|
|
2586
3016
|
* searchEmbed.trigger(HostEvent.Delete)
|
|
2587
3017
|
* ```
|
|
3018
|
+
* @example
|
|
3019
|
+
* ```js
|
|
3020
|
+
* // Delete from liveboard context
|
|
3021
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3022
|
+
* liveboardEmbed.trigger(HostEvent.Delete, {}, ContextType.Liveboard);
|
|
3023
|
+
* ```
|
|
3024
|
+
* @example
|
|
3025
|
+
* ```js
|
|
3026
|
+
* // Delete from search context
|
|
3027
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3028
|
+
* appEmbed.trigger(HostEvent.Delete, {}, ContextType.Search);
|
|
3029
|
+
* ```
|
|
2588
3030
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
2589
3031
|
*/
|
|
2590
3032
|
HostEvent["Delete"] = "onDeleteAnswer";
|
|
@@ -2605,6 +3047,20 @@
|
|
|
2605
3047
|
* ```js
|
|
2606
3048
|
* searchEmbed.trigger(HostEvent.SpotIQAnalyze)
|
|
2607
3049
|
* ```
|
|
3050
|
+
* @example
|
|
3051
|
+
* ```js
|
|
3052
|
+
* // SpotIQ analyze from search-answer context
|
|
3053
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3054
|
+
* appEmbed.trigger(HostEvent.SpotIQAnalyze, { vizId: '730496d6-6903-4601-937e-2c691821af3c' }, ContextType.Search);
|
|
3055
|
+
* ```
|
|
3056
|
+
* @example
|
|
3057
|
+
* ```js
|
|
3058
|
+
* // SpotIQ analyze from search context
|
|
3059
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3060
|
+
* liveboardEmbed.trigger(HostEvent.SpotIQAnalyze, {
|
|
3061
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
3062
|
+
* }, ContextType.Liveboard);
|
|
3063
|
+
* ```
|
|
2608
3064
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
2609
3065
|
*/
|
|
2610
3066
|
HostEvent["SpotIQAnalyze"] = "spotIQAnalyze";
|
|
@@ -2656,9 +3112,16 @@
|
|
|
2656
3112
|
*
|
|
2657
3113
|
* spotterEmbed.trigger(HostEvent.DownloadAsPng, { vizId: latestSpotterVizId });
|
|
2658
3114
|
* ```
|
|
3115
|
+
* @example
|
|
3116
|
+
* ```js
|
|
3117
|
+
* // Download as PNG from search-answer context
|
|
3118
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3119
|
+
* appEmbed.trigger(HostEvent.DownloadAsPng, {}, ContextType.Search);
|
|
3120
|
+
* ```
|
|
2659
3121
|
*
|
|
2660
3122
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.1.sw
|
|
2661
3123
|
*/
|
|
3124
|
+
// eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values
|
|
2662
3125
|
HostEvent["DownloadAsPng"] = "downloadAsPng";
|
|
2663
3126
|
/**
|
|
2664
3127
|
* Trigger the **Download** > **CSV** action on tables in
|
|
@@ -2684,6 +3147,18 @@
|
|
|
2684
3147
|
*
|
|
2685
3148
|
* spotterEmbed.trigger(HostEvent.DownloadAsCsv, { vizId: latestSpotterVizId });
|
|
2686
3149
|
* ```
|
|
3150
|
+
* @example
|
|
3151
|
+
* ```js
|
|
3152
|
+
* // Download as CSV from search-answer context
|
|
3153
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3154
|
+
* appEmbed.trigger(HostEvent.DownloadAsCsv, {}, ContextType.Search);
|
|
3155
|
+
* ```
|
|
3156
|
+
* @example
|
|
3157
|
+
* ```js
|
|
3158
|
+
* // Download as CSV from search context
|
|
3159
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3160
|
+
* searchEmbed.trigger(HostEvent.DownloadAsCsv, {}, ContextType.Search);
|
|
3161
|
+
* ```
|
|
2687
3162
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
2688
3163
|
*/
|
|
2689
3164
|
HostEvent["DownloadAsCsv"] = "downloadAsCSV";
|
|
@@ -2711,6 +3186,18 @@
|
|
|
2711
3186
|
*
|
|
2712
3187
|
* spotterEmbed.trigger(HostEvent.DownloadAsXlsx, { vizId: latestSpotterVizId });
|
|
2713
3188
|
* ```
|
|
3189
|
+
* @example
|
|
3190
|
+
* ```js
|
|
3191
|
+
* // Download as XLSX from answer context
|
|
3192
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3193
|
+
* appEmbed.trigger(HostEvent.DownloadAsXlsx, {}, ContextType.Answer);
|
|
3194
|
+
* ```
|
|
3195
|
+
* @example
|
|
3196
|
+
* ```js
|
|
3197
|
+
* // Download as XLSX from search context
|
|
3198
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3199
|
+
* searchEmbed.trigger(HostEvent.DownloadAsXlsx, {}, ContextType.Search);
|
|
3200
|
+
* ```
|
|
2714
3201
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
2715
3202
|
*/
|
|
2716
3203
|
HostEvent["DownloadAsXlsx"] = "downloadAsXLSX";
|
|
@@ -2724,6 +3211,18 @@
|
|
|
2724
3211
|
* ```js
|
|
2725
3212
|
* searchEmbed.trigger(HostEvent.Share)
|
|
2726
3213
|
* ```
|
|
3214
|
+
* @example
|
|
3215
|
+
* ```js
|
|
3216
|
+
* // Share from Liveboard context
|
|
3217
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3218
|
+
* liveboardEmbed.trigger(HostEvent.Share, {}, ContextType.Liveboard);
|
|
3219
|
+
* ```
|
|
3220
|
+
* @example
|
|
3221
|
+
* ```js
|
|
3222
|
+
* // Share from search-answer context
|
|
3223
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3224
|
+
* appEmbed.trigger(HostEvent.Share, {}, ContextType.Search);
|
|
3225
|
+
* ```
|
|
2727
3226
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
2728
3227
|
*/
|
|
2729
3228
|
HostEvent["Share"] = "share";
|
|
@@ -2763,6 +3262,18 @@
|
|
|
2763
3262
|
*
|
|
2764
3263
|
* spotterEmbed.trigger(HostEvent.Save, { vizId: latestSpotterVizId });
|
|
2765
3264
|
* ```
|
|
3265
|
+
* @example
|
|
3266
|
+
* ```js
|
|
3267
|
+
* // Save from answer context
|
|
3268
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3269
|
+
* appEmbed.trigger(HostEvent.Save, {}, ContextType.Answer);
|
|
3270
|
+
* ```
|
|
3271
|
+
* @example
|
|
3272
|
+
* ```js
|
|
3273
|
+
* // Save from search context
|
|
3274
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3275
|
+
* searchEmbed.trigger(HostEvent.Save, {}, ContextType.Search);
|
|
3276
|
+
* ```
|
|
2766
3277
|
*
|
|
2767
3278
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
2768
3279
|
*/
|
|
@@ -2779,6 +3290,20 @@
|
|
|
2779
3290
|
* ```js
|
|
2780
3291
|
* vizEmbed.trigger(HostEvent.SyncToSheets)
|
|
2781
3292
|
* ```
|
|
3293
|
+
* @example
|
|
3294
|
+
* ```js
|
|
3295
|
+
* // Sync to sheets from answer context
|
|
3296
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3297
|
+
* appEmbed.trigger(HostEvent.SyncToSheets, {}, ContextType.Answer);
|
|
3298
|
+
* ```
|
|
3299
|
+
* @example
|
|
3300
|
+
* ```js
|
|
3301
|
+
* // Sync to sheets from liveboard context
|
|
3302
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3303
|
+
* liveboardEmbed.trigger(HostEvent.SyncToSheets, {
|
|
3304
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
3305
|
+
* }, ContextType.Liveboard);
|
|
3306
|
+
* ```
|
|
2782
3307
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
2783
3308
|
*/
|
|
2784
3309
|
HostEvent["SyncToSheets"] = "sync-to-sheets";
|
|
@@ -2795,6 +3320,20 @@
|
|
|
2795
3320
|
* ```js
|
|
2796
3321
|
* vizEmbed.trigger(HostEvent.SyncToOtherApps)
|
|
2797
3322
|
* ```
|
|
3323
|
+
* @example
|
|
3324
|
+
* ```js
|
|
3325
|
+
* // Sync to other apps from answer context
|
|
3326
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3327
|
+
* appEmbed.trigger(HostEvent.SyncToOtherApps, {}, ContextType.Answer);
|
|
3328
|
+
* ```
|
|
3329
|
+
* @example
|
|
3330
|
+
* ```js
|
|
3331
|
+
* // Sync to other apps from liveboard context
|
|
3332
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3333
|
+
* liveboardEmbed.trigger(HostEvent.SyncToOtherApps, {
|
|
3334
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
3335
|
+
* }, ContextType.Liveboard);
|
|
3336
|
+
* ```
|
|
2798
3337
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
2799
3338
|
*/
|
|
2800
3339
|
HostEvent["SyncToOtherApps"] = "sync-to-other-apps";
|
|
@@ -2811,6 +3350,20 @@
|
|
|
2811
3350
|
* ```js
|
|
2812
3351
|
* vizEmbed.trigger(HostEvent.ManagePipelines)
|
|
2813
3352
|
* ```
|
|
3353
|
+
* @example
|
|
3354
|
+
* ```js
|
|
3355
|
+
* // Manage pipelines from answer context
|
|
3356
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3357
|
+
* appEmbed.trigger(HostEvent.ManagePipelines, {}, ContextType.Answer);
|
|
3358
|
+
* ```
|
|
3359
|
+
* @example
|
|
3360
|
+
* ```js
|
|
3361
|
+
* // Manage pipelines from liveboard context
|
|
3362
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3363
|
+
* liveboardEmbed.trigger(HostEvent.ManagePipelines, {
|
|
3364
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
3365
|
+
* }, ContextType.Liveboard);
|
|
3366
|
+
* ```
|
|
2814
3367
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
2815
3368
|
*/
|
|
2816
3369
|
HostEvent["ManagePipelines"] = "manage-pipeline";
|
|
@@ -2823,6 +3376,12 @@
|
|
|
2823
3376
|
* ```js
|
|
2824
3377
|
* appEmbed.trigger(HostEvent.ResetSearch)
|
|
2825
3378
|
* ```
|
|
3379
|
+
* @example
|
|
3380
|
+
* ```js
|
|
3381
|
+
* // Reset search from search context
|
|
3382
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3383
|
+
* searchEmbed.trigger(HostEvent.ResetSearch, {}, ContextType.Search);
|
|
3384
|
+
* ```
|
|
2826
3385
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.0.1.sw
|
|
2827
3386
|
*/
|
|
2828
3387
|
HostEvent["ResetSearch"] = "resetSearch";
|
|
@@ -2834,6 +3393,13 @@
|
|
|
2834
3393
|
* const data = await liveboardEmbed.trigger(HostEvent.GetFilters);
|
|
2835
3394
|
* console.log('data', data);
|
|
2836
3395
|
* ```
|
|
3396
|
+
* @example
|
|
3397
|
+
* ```js
|
|
3398
|
+
* // Get filters from liveboard context
|
|
3399
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3400
|
+
* const data = await liveboardEmbed.trigger(HostEvent.GetFilters, {}, ContextType.Liveboard);
|
|
3401
|
+
* console.log('filters', data);
|
|
3402
|
+
* ```
|
|
2837
3403
|
* @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
|
|
2838
3404
|
*/
|
|
2839
3405
|
HostEvent["GetFilters"] = "getFilters";
|
|
@@ -2841,7 +3407,8 @@
|
|
|
2841
3407
|
* Update one or several filters applied on a Liveboard.
|
|
2842
3408
|
* @param - Includes the following keys:
|
|
2843
3409
|
* - `filter`: A single filter object containing column name, filter operator, and
|
|
2844
|
-
* values.
|
|
3410
|
+
* values.
|
|
3411
|
+
* - `filters`: Multiple filter objects with column name, filter operator,
|
|
2845
3412
|
* and values for each.
|
|
2846
3413
|
*
|
|
2847
3414
|
* Each filter object must include the following attributes:
|
|
@@ -2924,6 +3491,18 @@
|
|
|
2924
3491
|
* }]
|
|
2925
3492
|
* });
|
|
2926
3493
|
* ```
|
|
3494
|
+
* @example
|
|
3495
|
+
* ```js
|
|
3496
|
+
* // Update filters from liveboard context
|
|
3497
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3498
|
+
* liveboardEmbed.trigger(HostEvent.UpdateFilters, {
|
|
3499
|
+
* filter: {
|
|
3500
|
+
* column: "item type",
|
|
3501
|
+
* oper: "IN",
|
|
3502
|
+
* values: ["shoes", "boots"]
|
|
3503
|
+
* }
|
|
3504
|
+
* }, ContextType.Liveboard);
|
|
3505
|
+
* ```
|
|
2927
3506
|
* @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
|
|
2928
3507
|
*/
|
|
2929
3508
|
HostEvent["UpdateFilters"] = "updateFilters";
|
|
@@ -2937,6 +3516,14 @@
|
|
|
2937
3516
|
* );
|
|
2938
3517
|
* })
|
|
2939
3518
|
* ```
|
|
3519
|
+
* @example
|
|
3520
|
+
* ```js
|
|
3521
|
+
* // Get tabs from liveboard context
|
|
3522
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3523
|
+
* liveboardEmbed.trigger(HostEvent.GetTabs, {}, ContextType.Liveboard).then((tabDetails) => {
|
|
3524
|
+
* console.log('tabs', tabDetails);
|
|
3525
|
+
* });
|
|
3526
|
+
* ```
|
|
2940
3527
|
* @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl
|
|
2941
3528
|
*/
|
|
2942
3529
|
HostEvent["GetTabs"] = "getTabs";
|
|
@@ -2950,6 +3537,15 @@
|
|
|
2950
3537
|
* '430496d6-6903-4601-937e-2c691821af3c',
|
|
2951
3538
|
* 'f547ec54-2a37-4516-a222-2b06719af726'])
|
|
2952
3539
|
* ```
|
|
3540
|
+
* @example
|
|
3541
|
+
* ```js
|
|
3542
|
+
* // Set visible tabs from liveboard context
|
|
3543
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3544
|
+
* liveboardEmbed.trigger(HostEvent.SetVisibleTabs, [
|
|
3545
|
+
* '430496d6-6903-4601-937e-2c691821af3c',
|
|
3546
|
+
* 'f547ec54-2a37-4516-a222-2b06719af726'
|
|
3547
|
+
* ], ContextType.Liveboard);
|
|
3548
|
+
* ```
|
|
2953
3549
|
* @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
|
|
2954
3550
|
*/
|
|
2955
3551
|
HostEvent["SetVisibleTabs"] = "SetPinboardVisibleTabs";
|
|
@@ -2963,6 +3559,15 @@
|
|
|
2963
3559
|
* '630496d6-6903-4601-937e-2c691821af3c',
|
|
2964
3560
|
* 'i547ec54-2a37-4516-a222-2b06719af726'])
|
|
2965
3561
|
* ```
|
|
3562
|
+
* @example
|
|
3563
|
+
* ```js
|
|
3564
|
+
* // Set hidden tabs from liveboard context
|
|
3565
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3566
|
+
* liveboardEmbed.trigger(HostEvent.SetHiddenTabs, [
|
|
3567
|
+
* '630496d6-6903-4601-937e-2c691821af3c',
|
|
3568
|
+
* 'i547ec54-2a37-4516-a222-2b06719af726'
|
|
3569
|
+
* ], ContextType.Liveboard);
|
|
3570
|
+
* ```
|
|
2966
3571
|
* @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
|
|
2967
3572
|
*/
|
|
2968
3573
|
HostEvent["SetHiddenTabs"] = "SetPinboardHiddenTabs";
|
|
@@ -3039,13 +3644,24 @@
|
|
|
3039
3644
|
HostEvent["UpdateCrossFilter"] = "UpdateCrossFilter";
|
|
3040
3645
|
/**
|
|
3041
3646
|
* Trigger reset action for a personalized Liveboard view.
|
|
3647
|
+
* This event is deprecated. Use {@link HostEvent.ResetLiveboardPersonalizedView} instead.
|
|
3042
3648
|
* @example
|
|
3043
3649
|
* ```js
|
|
3044
3650
|
* liveboardEmbed.trigger(HostEvent.ResetLiveboardPersonalisedView);
|
|
3045
3651
|
* ```
|
|
3046
3652
|
* @version SDK: 1.29.0 | ThoughtSpot Cloud: 10.1.0.cl, 10.1.0.sw
|
|
3653
|
+
* @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
3047
3654
|
*/
|
|
3048
3655
|
HostEvent["ResetLiveboardPersonalisedView"] = "ResetLiveboardPersonalisedView";
|
|
3656
|
+
/**
|
|
3657
|
+
* Trigger reset action for a personalized Liveboard view.
|
|
3658
|
+
* @example
|
|
3659
|
+
* ```js
|
|
3660
|
+
* liveboardEmbed.trigger(HostEvent.ResetLiveboardPersonalizedView);
|
|
3661
|
+
* ```
|
|
3662
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
3663
|
+
*/
|
|
3664
|
+
HostEvent["ResetLiveboardPersonalizedView"] = "ResetLiveboardPersonalisedView";
|
|
3049
3665
|
/**
|
|
3050
3666
|
* Triggers an action to update Parameter values on embedded
|
|
3051
3667
|
* Answers, Liveboard, and Spotter answer in Edit mode.
|
|
@@ -3062,6 +3678,16 @@
|
|
|
3062
3678
|
* isVisibleToUser: false
|
|
3063
3679
|
* }])
|
|
3064
3680
|
* ```
|
|
3681
|
+
* @example
|
|
3682
|
+
* ```js
|
|
3683
|
+
* // Update parameters from liveboard context
|
|
3684
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3685
|
+
* liveboardEmbed.trigger(HostEvent.UpdateParameters, [{
|
|
3686
|
+
* name: "Region Param",
|
|
3687
|
+
* value: "West",
|
|
3688
|
+
* isVisibleToUser: true
|
|
3689
|
+
* }], ContextType.Liveboard);
|
|
3690
|
+
* ```
|
|
3065
3691
|
* @version SDK: 1.29.0 | ThoughtSpot: 10.1.0.cl, 10.1.0.sw
|
|
3066
3692
|
*/
|
|
3067
3693
|
HostEvent["UpdateParameters"] = "UpdateParameters";
|
|
@@ -3081,18 +3707,77 @@
|
|
|
3081
3707
|
* });
|
|
3082
3708
|
*
|
|
3083
3709
|
* spotterEmbed.trigger(HostEvent.GetParameters, { vizId: latestSpotterVizId });
|
|
3710
|
+
*```
|
|
3711
|
+
* @example
|
|
3712
|
+
* ```js
|
|
3713
|
+
* // Get parameters from liveboard context
|
|
3714
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3715
|
+
* liveboardEmbed.trigger(HostEvent.GetParameters, {}, ContextType.Liveboard).then((parameters) => {
|
|
3716
|
+
* console.log('parameters', parameters);
|
|
3717
|
+
* });
|
|
3084
3718
|
* ```
|
|
3085
3719
|
* @version SDK: 1.29.0 | ThoughtSpot: 10.1.0.cl, 10.1.0.sw
|
|
3086
3720
|
*/
|
|
3087
3721
|
HostEvent["GetParameters"] = "GetParameters";
|
|
3088
3722
|
/**
|
|
3089
3723
|
* Triggers an event to update a personalized view of a Liveboard.
|
|
3724
|
+
* This event is deprecated. Use {@link HostEvent.UpdatePersonalizedView} instead.
|
|
3090
3725
|
* ```js
|
|
3091
3726
|
* liveboardEmbed.trigger(HostEvent.UpdatePersonalisedView, {viewId: '1234'})
|
|
3092
3727
|
* ```
|
|
3728
|
+
* @example
|
|
3729
|
+
* ```js
|
|
3730
|
+
* // Update personalized view from liveboard context
|
|
3731
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3732
|
+
* liveboardEmbed.trigger(HostEvent.UpdatePersonalisedView, {
|
|
3733
|
+
* viewId: '1234'
|
|
3734
|
+
* }, ContextType.Liveboard);
|
|
3735
|
+
* ```
|
|
3093
3736
|
* @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
|
|
3737
|
+
* @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
3094
3738
|
*/
|
|
3095
3739
|
HostEvent["UpdatePersonalisedView"] = "UpdatePersonalisedView";
|
|
3740
|
+
/**
|
|
3741
|
+
* Triggers an event to update a personalized view of a Liveboard.
|
|
3742
|
+
* ```js
|
|
3743
|
+
* liveboardEmbed.trigger(HostEvent.UpdatePersonalisedView, {viewId: '1234'})
|
|
3744
|
+
* ```
|
|
3745
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
3746
|
+
*/
|
|
3747
|
+
HostEvent["UpdatePersonalizedView"] = "UpdatePersonalisedView";
|
|
3748
|
+
/**
|
|
3749
|
+
* Triggers selection of a specific Personalized View on a
|
|
3750
|
+
* Liveboard without reloading the embed. Pass either a
|
|
3751
|
+
* `viewId` (GUID) or `viewName`. If both are provided, `viewId` takes precedence.
|
|
3752
|
+
* If neither is provided, the Liveboard resets to the original/default view.
|
|
3753
|
+
* When a `viewName` is provided and multiple views share
|
|
3754
|
+
* the same name, the first match is selected.
|
|
3755
|
+
* @example
|
|
3756
|
+
* ```js
|
|
3757
|
+
* liveboardEmbed.trigger(
|
|
3758
|
+
* HostEvent.SelectPersonalizedView,
|
|
3759
|
+
* { viewId: '2a021a12-1aed-425d-984b-141ee916ce72' },
|
|
3760
|
+
* )
|
|
3761
|
+
* ```
|
|
3762
|
+
* @example
|
|
3763
|
+
* ```js
|
|
3764
|
+
* // Select by name
|
|
3765
|
+
* liveboardEmbed.trigger(
|
|
3766
|
+
* HostEvent.SelectPersonalizedView,
|
|
3767
|
+
* { viewName: 'Dr Smith Cardiology' },
|
|
3768
|
+
* )
|
|
3769
|
+
* ```
|
|
3770
|
+
* @example
|
|
3771
|
+
* ```js
|
|
3772
|
+
* // Reset to default view
|
|
3773
|
+
* liveboardEmbed.trigger(
|
|
3774
|
+
* HostEvent.SelectPersonalizedView,
|
|
3775
|
+
* {},
|
|
3776
|
+
* )
|
|
3777
|
+
* ```
|
|
3778
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
3779
|
+
*/
|
|
3780
|
+
HostEvent["SelectPersonalizedView"] = "SelectPersonalisedView";
|
|
3096
3781
|
/**
|
|
3097
3782
|
* @hidden
|
|
3098
3783
|
* Notify when info call is completed successfully
|
|
@@ -3112,7 +3797,8 @@
|
|
|
3112
3797
|
* add a name and description for the Answer.
|
|
3113
3798
|
* @param - Includes the following keys:
|
|
3114
3799
|
* - `vizId`: Refers to the Answer ID in Spotter embed and is **required** in Spotter
|
|
3115
|
-
* embed.
|
|
3800
|
+
* embed.
|
|
3801
|
+
* - `name`: Optional. Name string for the Answer.
|
|
3116
3802
|
* - `description`: Optional. Description text for the Answer.
|
|
3117
3803
|
* @example
|
|
3118
3804
|
* ```js
|
|
@@ -3131,6 +3817,34 @@
|
|
|
3131
3817
|
*
|
|
3132
3818
|
* spotterEmbed.trigger(HostEvent.SaveAnswer, { vizId: latestSpotterVizId });
|
|
3133
3819
|
* ```
|
|
3820
|
+
* @example
|
|
3821
|
+
* ```js
|
|
3822
|
+
* // Using context parameter to save answer from search context
|
|
3823
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3824
|
+
* const saveAnswerResponse = await appEmbed.trigger(HostEvent.SaveAnswer, {
|
|
3825
|
+
* name: "Regional sales analysis",
|
|
3826
|
+
* description: "Sales breakdown by region"
|
|
3827
|
+
* }, ContextType.Search);
|
|
3828
|
+
* ```
|
|
3829
|
+
* @example
|
|
3830
|
+
* ```js
|
|
3831
|
+
* // Save answer from answer context (explore modal)
|
|
3832
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3833
|
+
* const saveAnswerResponse = await appEmbed.trigger(HostEvent.SaveAnswer, {
|
|
3834
|
+
* name: "Modified analysis",
|
|
3835
|
+
* description: "Updated from explore view"
|
|
3836
|
+
* }, ContextType.Answer);
|
|
3837
|
+
* ```
|
|
3838
|
+
* @example
|
|
3839
|
+
* ```js
|
|
3840
|
+
* // Save answer from spotter context
|
|
3841
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3842
|
+
* const saveAnswerResponse = await appEmbed.trigger(HostEvent.SaveAnswer, {
|
|
3843
|
+
* vizId: latestSpotterVizId,
|
|
3844
|
+
* name: "AI insights",
|
|
3845
|
+
* description: "Generated from Spotter"
|
|
3846
|
+
* }, ContextType.Spotter);
|
|
3847
|
+
* ```
|
|
3134
3848
|
* @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
|
|
3135
3849
|
*/
|
|
3136
3850
|
HostEvent["SaveAnswer"] = "saveAnswer";
|
|
@@ -3172,6 +3886,15 @@
|
|
|
3172
3886
|
* executeSearch: true,
|
|
3173
3887
|
* })
|
|
3174
3888
|
* ```
|
|
3889
|
+
* @example
|
|
3890
|
+
* ```js
|
|
3891
|
+
* // Spotter search from spotter context
|
|
3892
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3893
|
+
* spotterEmbed.trigger(HostEvent.SpotterSearch, {
|
|
3894
|
+
* query: 'sales by region',
|
|
3895
|
+
* executeSearch: true
|
|
3896
|
+
* }, ContextType.Spotter);
|
|
3897
|
+
* ```
|
|
3175
3898
|
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
3176
3899
|
*/
|
|
3177
3900
|
HostEvent["SpotterSearch"] = "SpotterSearch";
|
|
@@ -3182,6 +3905,12 @@
|
|
|
3182
3905
|
* ```js
|
|
3183
3906
|
* spotterEmbed.trigger(HostEvent.EditLastPrompt, "revenue per year");
|
|
3184
3907
|
* ```
|
|
3908
|
+
* @example
|
|
3909
|
+
* ```js
|
|
3910
|
+
* // Edit last prompt from spotter context
|
|
3911
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3912
|
+
* spotterEmbed.trigger(HostEvent.EditLastPrompt, "sales by region", ContextType.Spotter);
|
|
3913
|
+
* ```
|
|
3185
3914
|
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
3186
3915
|
*/
|
|
3187
3916
|
HostEvent["EditLastPrompt"] = "EditLastPrompt";
|
|
@@ -3191,6 +3920,12 @@
|
|
|
3191
3920
|
* ```js
|
|
3192
3921
|
* spotterEmbed.trigger(HostEvent.PreviewSpotterData);
|
|
3193
3922
|
* ```
|
|
3923
|
+
* @example
|
|
3924
|
+
* ```js
|
|
3925
|
+
* // Preview spotter data from spotter context
|
|
3926
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3927
|
+
* spotterEmbed.trigger(HostEvent.PreviewSpotterData, {}, ContextType.Spotter);
|
|
3928
|
+
* ```
|
|
3194
3929
|
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
3195
3930
|
*/
|
|
3196
3931
|
HostEvent["PreviewSpotterData"] = "PreviewSpotterData";
|
|
@@ -3481,6 +4216,7 @@
|
|
|
3481
4216
|
Param["IsLazyLoadingForEmbedEnabled"] = "isLazyLoadingForEmbedEnabled";
|
|
3482
4217
|
Param["RootMarginForLazyLoad"] = "rootMarginForLazyLoad";
|
|
3483
4218
|
Param["isPNGInScheduledEmailsEnabled"] = "isPNGInScheduledEmailsEnabled";
|
|
4219
|
+
Param["IsWYSIWYGLiveboardPDFEnabled"] = "isWYSIWYGLiveboardPDFEnabled";
|
|
3484
4220
|
Param["isLiveboardXLSXCSVDownloadEnabled"] = "isLiveboardXLSXCSVDownloadEnabled";
|
|
3485
4221
|
Param["isGranularXLSXCSVSchedulesEnabled"] = "isGranularXLSXCSVSchedulesEnabled";
|
|
3486
4222
|
Param["isCentralizedLiveboardFilterUXEnabled"] = "isCentralizedLiveboardFilterUXEnabled";
|
|
@@ -3825,6 +4561,16 @@
|
|
|
3825
4561
|
* @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl
|
|
3826
4562
|
*/
|
|
3827
4563
|
Action["DownloadLiveboard"] = "downloadLiveboard";
|
|
4564
|
+
/**
|
|
4565
|
+
* The **Download Liveboard as Continuous PDF** menu action on a Liveboard.
|
|
4566
|
+
* Allows downloading the entire Liveboard as a continuous PDF.
|
|
4567
|
+
* @example
|
|
4568
|
+
* ```js
|
|
4569
|
+
* disabledActions: [Action.DownloadLiveboardAsContinuousPDF]
|
|
4570
|
+
* ```
|
|
4571
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
4572
|
+
*/
|
|
4573
|
+
Action["DownloadLiveboardAsContinuousPDF"] = "downloadLiveboardAsContinuousPDF";
|
|
3828
4574
|
/**
|
|
3829
4575
|
* @hidden
|
|
3830
4576
|
*/
|
|
@@ -3949,6 +4695,7 @@
|
|
|
3949
4695
|
* disabledActions: [Action.LiveboardInfo]
|
|
3950
4696
|
* ```
|
|
3951
4697
|
*/
|
|
4698
|
+
// eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values
|
|
3952
4699
|
Action["LiveboardInfo"] = "pinboardInfo";
|
|
3953
4700
|
/**
|
|
3954
4701
|
* @hidden
|
|
@@ -3979,6 +4726,7 @@
|
|
|
3979
4726
|
* disabledActions: [Action.Subscription]
|
|
3980
4727
|
* ```
|
|
3981
4728
|
*/
|
|
4729
|
+
// eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values
|
|
3982
4730
|
Action["Subscription"] = "subscription";
|
|
3983
4731
|
/**
|
|
3984
4732
|
* The **Explore** action on Liveboard visualizations
|
|
@@ -4458,13 +5206,25 @@
|
|
|
4458
5206
|
/**
|
|
4459
5207
|
* The Liveboard Personalised Views dropdown.
|
|
4460
5208
|
* Allows navigating to a personalized Liveboard View.
|
|
5209
|
+
* This action is deprecated. Use {@link Action.PersonalizedViewsDropdown} instead.
|
|
4461
5210
|
* @example
|
|
4462
5211
|
* ```js
|
|
4463
5212
|
* disabledActions: [Action.PersonalisedViewsDropdown]
|
|
4464
5213
|
* ```
|
|
4465
5214
|
* @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 10.1.0.sw
|
|
5215
|
+
* @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
4466
5216
|
*/
|
|
4467
5217
|
Action["PersonalisedViewsDropdown"] = "personalisedViewsDropdown";
|
|
5218
|
+
/**
|
|
5219
|
+
* The Liveboard Personalized Views dropdown.
|
|
5220
|
+
* Allows navigating to a personalized Liveboard View.
|
|
5221
|
+
* @example
|
|
5222
|
+
* ```js
|
|
5223
|
+
* disabledActions: [Action.PersonalizedViewsDropdown]
|
|
5224
|
+
* ```
|
|
5225
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
5226
|
+
*/
|
|
5227
|
+
Action["PersonalizedViewsDropdown"] = "personalisedViewsDropdown";
|
|
4468
5228
|
/**
|
|
4469
5229
|
* Action ID for show or hide the user details on a
|
|
4470
5230
|
* Liveboard (Recently visited / social proof)
|
|
@@ -4552,14 +5312,27 @@
|
|
|
4552
5312
|
/**
|
|
4553
5313
|
* The **Organize Favourites** action on Homepage
|
|
4554
5314
|
* *Favorites* module.
|
|
5315
|
+
* This action is deprecated. Use {@link Action.OrganizeFavorites} instead.
|
|
4555
5316
|
*
|
|
4556
5317
|
* @example
|
|
4557
5318
|
* ```js
|
|
4558
5319
|
* disabledActions: [Action.OrganiseFavourites]
|
|
4559
5320
|
* ```
|
|
4560
5321
|
* @version SDK: 1.32.0 | ThoughtSpot: 10.0.0.cl
|
|
5322
|
+
* @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
4561
5323
|
*/
|
|
4562
5324
|
Action["OrganiseFavourites"] = "organiseFavourites";
|
|
5325
|
+
/**
|
|
5326
|
+
* The **Organize Favorites** action on Homepage
|
|
5327
|
+
* *Favorites* module.
|
|
5328
|
+
*
|
|
5329
|
+
* @example
|
|
5330
|
+
* ```js
|
|
5331
|
+
* disabledActions: [Action.OrganizeFavorites]
|
|
5332
|
+
* ```
|
|
5333
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
5334
|
+
*/
|
|
5335
|
+
Action["OrganizeFavorites"] = "organiseFavourites";
|
|
4563
5336
|
/**
|
|
4564
5337
|
* The **AI Highlights** action on a Liveboard.
|
|
4565
5338
|
*
|
|
@@ -5015,6 +5788,39 @@
|
|
|
5015
5788
|
* @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
|
|
5016
5789
|
*/
|
|
5017
5790
|
Action["SpotterDocs"] = "spotterDocs";
|
|
5791
|
+
/**
|
|
5792
|
+
* Controls visibility and disable state of the connector resources
|
|
5793
|
+
* section in the Spotter chat interface.
|
|
5794
|
+
* @example
|
|
5795
|
+
* ```js
|
|
5796
|
+
* hiddenActions: [Action.SpotterChatConnectorResources]
|
|
5797
|
+
* disabledActions: [Action.SpotterChatConnectorResources]
|
|
5798
|
+
* ```
|
|
5799
|
+
* @version SDK: 1.48.0 | ThoughtSpot Cloud: 26.5.0.cl
|
|
5800
|
+
*/
|
|
5801
|
+
Action["SpotterChatConnectorResources"] = "spotterChatConnectorResources";
|
|
5802
|
+
/**
|
|
5803
|
+
* Controls visibility and disable state of the connectors
|
|
5804
|
+
* in the Spotter chat interface.
|
|
5805
|
+
* @example
|
|
5806
|
+
* ```js
|
|
5807
|
+
* hiddenActions: [Action.SpotterChatConnectors]
|
|
5808
|
+
* disabledActions: [Action.SpotterChatConnectors]
|
|
5809
|
+
* ```
|
|
5810
|
+
* @version SDK: 1.48.0 | ThoughtSpot Cloud: 26.5.0.cl
|
|
5811
|
+
*/
|
|
5812
|
+
Action["SpotterChatConnectors"] = "spotterChatConnectors";
|
|
5813
|
+
/**
|
|
5814
|
+
* Controls visibility and disable state of the mode switcher
|
|
5815
|
+
* in the Spotter chat interface.
|
|
5816
|
+
* @example
|
|
5817
|
+
* ```js
|
|
5818
|
+
* hiddenActions: [Action.SpotterChatModeSwitcher]
|
|
5819
|
+
* disabledActions: [Action.SpotterChatModeSwitcher]
|
|
5820
|
+
* ```
|
|
5821
|
+
* @version SDK: 1.48.0 | ThoughtSpot Cloud: 26.5.0.cl
|
|
5822
|
+
*/
|
|
5823
|
+
Action["SpotterChatModeSwitcher"] = "spotterChatModeSwitcher";
|
|
5018
5824
|
/**
|
|
5019
5825
|
* The **Include current period** checkbox for date filters.
|
|
5020
5826
|
* Controls the visibility and availability of the option to include
|
|
@@ -5308,7 +6114,29 @@
|
|
|
5308
6114
|
EmbedErrorCodes["UPDATE_PARAMS_FAILED"] = "UPDATE_PARAMS_FAILED";
|
|
5309
6115
|
/** Invalid URL provided in configuration */
|
|
5310
6116
|
EmbedErrorCodes["INVALID_URL"] = "INVALID_URL";
|
|
6117
|
+
/** Host event payload validation failed */
|
|
6118
|
+
EmbedErrorCodes["HOST_EVENT_VALIDATION"] = "HOST_EVENT_VALIDATION";
|
|
6119
|
+
/** UpdateFilters payload is invalid - missing or malformed filter/filters */
|
|
6120
|
+
EmbedErrorCodes["UPDATEFILTERS_INVALID_PAYLOAD"] = "UPDATEFILTERS_INVALID_PAYLOAD";
|
|
6121
|
+
/** DrillDown payload is invalid - missing or malformed points */
|
|
6122
|
+
EmbedErrorCodes["DRILLDOWN_INVALID_PAYLOAD"] = "DRILLDOWN_INVALID_PAYLOAD";
|
|
5311
6123
|
})(EmbedErrorCodes || (EmbedErrorCodes = {}));
|
|
6124
|
+
/**
|
|
6125
|
+
* Context types for specifying the page context when triggering host events.
|
|
6126
|
+
* Used as the third parameter in the `trigger` method to help ThoughtSpot
|
|
6127
|
+
* understand the current page context for better event handling.
|
|
6128
|
+
*
|
|
6129
|
+
* @example
|
|
6130
|
+
* ```js
|
|
6131
|
+
* import { HostEvent, ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
6132
|
+
*
|
|
6133
|
+
* // Trigger an event with specific context
|
|
6134
|
+
* embed.trigger(HostEvent.Pin, { vizId: "123", liveboardId: "456" }, ContextType.Search);
|
|
6135
|
+
* ```
|
|
6136
|
+
*
|
|
6137
|
+
* @version SDK: 1.45.2 | ThoughtSpot: 26.3.0.cl
|
|
6138
|
+
* @group Events
|
|
6139
|
+
*/
|
|
5312
6140
|
var ContextType;
|
|
5313
6141
|
(function (ContextType) {
|
|
5314
6142
|
/**
|
|
@@ -5327,6 +6155,10 @@
|
|
|
5327
6155
|
* Spotter context for spotter modal/page.
|
|
5328
6156
|
*/
|
|
5329
6157
|
ContextType["Spotter"] = "spotter";
|
|
6158
|
+
/**
|
|
6159
|
+
* Other context for any other generic page.
|
|
6160
|
+
*/
|
|
6161
|
+
ContextType["Other"] = "other";
|
|
5330
6162
|
})(ContextType || (ContextType = {}));
|
|
5331
6163
|
/**
|
|
5332
6164
|
* Enum for the type of API intercepted
|
|
@@ -5449,6 +6281,8 @@
|
|
|
5449
6281
|
SSR_ENVIRONMENT_ERROR: 'SSR environment detected. This function cannot be called in SSR environment.',
|
|
5450
6282
|
UPDATE_PARAMS_FAILED: 'Failed to update embed parameters',
|
|
5451
6283
|
INVALID_SPOTTER_DOCUMENTATION_URL: 'Invalid spotterDocumentationUrl. Please provide a valid http or https URL.',
|
|
6284
|
+
UPDATEFILTERS_INVALID_PAYLOAD: 'UpdateFilters requires a valid filter or filters array. Expected: { filter: { column, oper, values } } or { filters: [{ column, oper, values }, ...] }',
|
|
6285
|
+
DRILLDOWN_INVALID_PAYLOAD: 'DrillDown requires a valid points object. Expected: { points: { clickedPoint?, selectedPoints? }, autoDrillDown?, vizId? }',
|
|
5452
6286
|
};
|
|
5453
6287
|
const CUSTOM_ACTIONS_ERROR_MESSAGE = {
|
|
5454
6288
|
INVALID_ACTION_OBJECT: 'Custom Action Validation Error: Invalid action object provided',
|
|
@@ -5952,14 +6786,6 @@
|
|
|
5952
6786
|
return [false, error instanceof Error ? error : new Error(String(error))];
|
|
5953
6787
|
}
|
|
5954
6788
|
};
|
|
5955
|
-
/**
|
|
5956
|
-
* Resolves enablePastConversationsSidebar with
|
|
5957
|
-
* spotterSidebarConfig taking precedence over the
|
|
5958
|
-
* standalone flag.
|
|
5959
|
-
*/
|
|
5960
|
-
const resolveEnablePastConversationsSidebar = (params) => (params.spotterSidebarConfigValue !== undefined
|
|
5961
|
-
? params.spotterSidebarConfigValue
|
|
5962
|
-
: params.standaloneValue);
|
|
5963
6789
|
/**
|
|
5964
6790
|
* Sets a query parameter if the value is defined.
|
|
5965
6791
|
* @param queryParams - The query params object to modify
|
|
@@ -8256,6 +9082,15 @@
|
|
|
8256
9082
|
UIPassthroughEvent["GetAnswerConfig"] = "getAnswerPageConfig";
|
|
8257
9083
|
UIPassthroughEvent["GetLiveboardConfig"] = "getPinboardPageConfig";
|
|
8258
9084
|
UIPassthroughEvent["GetUnsavedAnswerTML"] = "getUnsavedAnswerTML";
|
|
9085
|
+
UIPassthroughEvent["UpdateFilters"] = "updateFilters";
|
|
9086
|
+
UIPassthroughEvent["Drilldown"] = "drillDown";
|
|
9087
|
+
UIPassthroughEvent["GetAnswerSession"] = "getAnswerSession";
|
|
9088
|
+
UIPassthroughEvent["GetFilters"] = "getFilters";
|
|
9089
|
+
UIPassthroughEvent["GetIframeUrl"] = "getIframeUrl";
|
|
9090
|
+
UIPassthroughEvent["GetParameters"] = "getParameters";
|
|
9091
|
+
UIPassthroughEvent["GetTML"] = "getTML";
|
|
9092
|
+
UIPassthroughEvent["GetTabs"] = "getTabs";
|
|
9093
|
+
UIPassthroughEvent["GetExportRequestForCurrentPinboard"] = "getExportRequestForCurrentPinboard";
|
|
8259
9094
|
})(UIPassthroughEvent || (UIPassthroughEvent = {}));
|
|
8260
9095
|
|
|
8261
9096
|
const EndPoints = {
|
|
@@ -8889,9 +9724,11 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
8889
9724
|
* You can use this service to:
|
|
8890
9725
|
*
|
|
8891
9726
|
* - Add or remove columns from Answers (`addColumns`, `removeColumns`,
|
|
8892
|
-
* `addColumnsByName`)
|
|
9727
|
+
* `addColumnsByName`)
|
|
9728
|
+
* - Apply filters to Answers (`addFilter`)
|
|
8893
9729
|
* - Get data from Answers in different formats (JSON, CSV, PNG) (`fetchData`,
|
|
8894
|
-
* `fetchCSVBlob`, `fetchPNGBlob`)
|
|
9730
|
+
* `fetchCSVBlob`, `fetchPNGBlob`)
|
|
9731
|
+
* - Get data for specific points in visualizations
|
|
8895
9732
|
* (`getUnderlyingDataForPoint`)
|
|
8896
9733
|
* - Run custom queries (`executeQuery`)
|
|
8897
9734
|
* - Add visualizations to Liveboards (`addDisplayedVizToLiveboard`)
|
|
@@ -17640,7 +18477,8 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
17640
18477
|
/**
|
|
17641
18478
|
* The current authentication token or session has expired.
|
|
17642
18479
|
*
|
|
17643
|
-
* Emitted when the embed receives an auth-expiry signal and starts auth refresh
|
|
18480
|
+
* Emitted when the embed receives an auth-expiry signal and starts auth refresh
|
|
18481
|
+
* handling.
|
|
17644
18482
|
*/
|
|
17645
18483
|
AuthFailureType["EXPIRY"] = "EXPIRY";
|
|
17646
18484
|
/**
|
|
@@ -18487,11 +19325,79 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18487
19325
|
return eventData;
|
|
18488
19326
|
}
|
|
18489
19327
|
|
|
18490
|
-
var name="@thoughtspot/visual-embed-sdk";var version$1="1.46.
|
|
19328
|
+
var name="@thoughtspot/visual-embed-sdk";var version$1="1.46.5";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports$1={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p tsconfig.build.json --incremental false; tsc -p tsconfig.build.json --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle-generator --config ./dts-config/dts-bundle-file.config.js && node dts-config/wrap-ambient-module.mjs","bundle-dts":"dts-bundle-generator --config ./dts-config/dts-bundle.config.js","bundle-dts-react":"dts-bundle-generator --config ./dts-config/dts-bundle-react.config.js","bundle-dts-react-full":"dts-bundle-generator --config ./dts-config/dts-bundle-react-full.config.js",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.build.json --theme typedoc-theme --json static/typedoc/typedoc.json --disableOutputCheck","test-sdk":"jest -c jest.config.sdk.js --runInBand",test:"npm run test-sdk",posttest:"cat ./coverage/sdk/lcov.info | npx coveralls-next || echo 'Warning: Coveralls upload failed but not breaking the build.'","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest",dev:"vite -c vite.local.config.ts"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={classnames:"^2.3.1",eventemitter3:"^4.0.7",lodash:"^4.17.23","mixpanel-browser":"2.47.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1",yaml:"^2.5.1"};var devDependencies={"@mdx-js/mdx":"^1.6.22","@mdx-js/react":"^1.6.22","@react-icons/all-files":"^4.1.0","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^5.0.2","@size-limit/preset-big-lib":"^11.2.0","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^30.0.0","@types/lodash":"^4.17.0","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^8.28.0","@typescript-eslint/parser":"^8.28.0",ajv:"^8.17.1",asciidoctor:"^2.2.1","babel-jest":"^30.2.0","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1","coveralls-next":"^5.0.0",crypto:"^1.0.1","current-git-branch":"^1.1.0","dts-bundle-generator":"^9.5.1",eslint:"^9.23.0","eslint-config-airbnb-base":"^15.0.0","eslint-config-prettier":"^10.1.1","eslint-import-resolver-typescript":"^4.2.5","eslint-plugin-comment-length":"2.2.1","eslint-plugin-import":"^2.31.0","eslint-plugin-jsdoc":"^50.6.9","eslint-plugin-prettier":"^5.2.5","eslint-plugin-react":"^7.37.5","eslint-plugin-react-hooks":"^5.2.0","fs-extra":"^10.0.0","gh-pages":"6.3.0",globals:"^16.0.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^2.0.0",jest:"^30.2.0","jest-environment-jsdom":"^29.7.0","jest-fetch-mock":"^3.0.3",jsdom:"^17.0.0",prettier:"2.1.2",react:"^16.14.0","react-dom":"^16.14.0","react-resizable":"^1.11.0","react-resize-detector":"^6.6.0","react-test-renderer":"^17.0.2","react-use-flexsearch":"^0.1.1",rollup:"4.59.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^29.4.6","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","typescript-eslint":"^8.29.1","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^6.3.5"};var author="ThoughtSpot";var email="support@thoughtspot.com";var license="ThoughtSpot Development Tools End User License Agreement";var directories={lib:"lib"};var repository={type:"git",url:"git+https://github.com/thoughtspot/visual-embed-sdk.git"};var publishConfig={registry:"https://registry.npmjs.org"};var keywords=["thoughtspot","everywhere","embedded","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version$1,description:description,module:module,main:main,types:types,files:files,exports:exports$1,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.es.js",limit:"34 kB"}],scripts:scripts,peerDependencies:peerDependencies,dependencies:dependencies,devDependencies:devDependencies,author:author,email:email,license:license,directories:directories,repository:repository,publishConfig:publishConfig,keywords:keywords,bugs:bugs,homepage:homepage,globals:globals};
|
|
19329
|
+
|
|
19330
|
+
function isValidUpdateFiltersPayload(payload) {
|
|
19331
|
+
if (!payload)
|
|
19332
|
+
return false;
|
|
19333
|
+
const isValidFilter = (f) => !!f && typeof f.column === 'string' && typeof f.oper === 'string' && Array.isArray(f.values);
|
|
19334
|
+
const hasValidFilter = payload.filter && isValidFilter(payload.filter);
|
|
19335
|
+
const hasValidFilters = Array.isArray(payload.filters) && payload.filters.length > 0 && payload.filters.every(isValidFilter);
|
|
19336
|
+
return !!(hasValidFilter || hasValidFilters);
|
|
19337
|
+
}
|
|
19338
|
+
function isValidDrillDownPayload(payload) {
|
|
19339
|
+
if (!payload)
|
|
19340
|
+
return false;
|
|
19341
|
+
const points = payload.points;
|
|
19342
|
+
if (!points || typeof points !== 'object')
|
|
19343
|
+
return false;
|
|
19344
|
+
const hasClickedPoint = 'clickedPoint' in points && points.clickedPoint != null;
|
|
19345
|
+
const hasSelectedPoints = Array.isArray(points.selectedPoints) && points.selectedPoints.length > 0;
|
|
19346
|
+
return hasClickedPoint || hasSelectedPoints;
|
|
19347
|
+
}
|
|
19348
|
+
function createValidationError(message) {
|
|
19349
|
+
const err = new Error(message);
|
|
19350
|
+
err.isValidationError = true;
|
|
19351
|
+
err.embedErrorDetails = {
|
|
19352
|
+
type: exports.EmbedEvent.Error,
|
|
19353
|
+
data: {
|
|
19354
|
+
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
19355
|
+
message,
|
|
19356
|
+
code: EmbedErrorCodes.HOST_EVENT_VALIDATION,
|
|
19357
|
+
error: message
|
|
19358
|
+
},
|
|
19359
|
+
status: embedEventStatus.END
|
|
19360
|
+
};
|
|
19361
|
+
throw err;
|
|
19362
|
+
}
|
|
19363
|
+
function throwUpdateFiltersValidationError() {
|
|
19364
|
+
createValidationError(ERROR_MESSAGE.UPDATEFILTERS_INVALID_PAYLOAD);
|
|
19365
|
+
}
|
|
19366
|
+
function throwDrillDownValidationError() {
|
|
19367
|
+
createValidationError(ERROR_MESSAGE.DRILLDOWN_INVALID_PAYLOAD);
|
|
19368
|
+
}
|
|
18491
19369
|
|
|
19370
|
+
/**
|
|
19371
|
+
* Maps HostEvent to its corresponding UIPassthroughEvent.
|
|
19372
|
+
* Includes both custom-handler events (Pin, SaveAnswer, UpdateFilters, DrillDown)
|
|
19373
|
+
* and getter events (GetAnswerSession, GetFilters, etc.) that use getDataWithPassthroughFallback.
|
|
19374
|
+
*/
|
|
19375
|
+
const PASSTHROUGH_MAP = {
|
|
19376
|
+
// Custom handlers (setters with special logic)
|
|
19377
|
+
[exports.HostEvent.Pin]: UIPassthroughEvent.PinAnswerToLiveboard,
|
|
19378
|
+
[exports.HostEvent.SaveAnswer]: UIPassthroughEvent.SaveAnswer,
|
|
19379
|
+
[exports.HostEvent.UpdateFilters]: UIPassthroughEvent.UpdateFilters,
|
|
19380
|
+
[exports.HostEvent.DrillDown]: UIPassthroughEvent.Drilldown,
|
|
19381
|
+
// Getters (use getDataWithPassthroughFallback)
|
|
19382
|
+
[exports.HostEvent.GetAnswerSession]: UIPassthroughEvent.GetAnswerSession,
|
|
19383
|
+
[exports.HostEvent.GetFilters]: UIPassthroughEvent.GetFilters,
|
|
19384
|
+
[exports.HostEvent.GetIframeUrl]: UIPassthroughEvent.GetIframeUrl,
|
|
19385
|
+
[exports.HostEvent.GetParameters]: UIPassthroughEvent.GetParameters,
|
|
19386
|
+
[exports.HostEvent.GetTML]: UIPassthroughEvent.GetTML,
|
|
19387
|
+
[exports.HostEvent.GetTabs]: UIPassthroughEvent.GetTabs,
|
|
19388
|
+
[exports.HostEvent.getExportRequestForCurrentPinboard]: UIPassthroughEvent.GetExportRequestForCurrentPinboard,
|
|
19389
|
+
};
|
|
18492
19390
|
class HostEventClient {
|
|
18493
19391
|
constructor(iFrame) {
|
|
19392
|
+
/** Cached list of available UI passthrough keys from the embedded app */
|
|
19393
|
+
this.availablePassthroughKeysCache = null;
|
|
18494
19394
|
this.iFrame = iFrame;
|
|
19395
|
+
this.customHandlers = {
|
|
19396
|
+
[exports.HostEvent.Pin]: (p, c) => this.handlePinEvent(p, c),
|
|
19397
|
+
[exports.HostEvent.SaveAnswer]: (p, c) => this.handleSaveAnswerEvent(p, c),
|
|
19398
|
+
[exports.HostEvent.UpdateFilters]: (p, c) => this.handleUpdateFiltersEvent(p, c),
|
|
19399
|
+
[exports.HostEvent.DrillDown]: (p, c) => this.handleDrillDownEvent(p, c),
|
|
19400
|
+
};
|
|
18495
19401
|
}
|
|
18496
19402
|
/**
|
|
18497
19403
|
* A wrapper over process trigger to
|
|
@@ -18508,7 +19414,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18508
19414
|
}
|
|
18509
19415
|
async handleHostEventWithParam(apiName, parameters, context) {
|
|
18510
19416
|
var _a, _b, _c, _d;
|
|
18511
|
-
const response = (_b = (_a = (await this.triggerUIPassthroughApi(apiName, parameters, context))) === null || _a === void 0 ? void 0 : _a.
|
|
19417
|
+
const response = (_b = (_a = (await this.triggerUIPassthroughApi(apiName, parameters, context))) === null || _a === void 0 ? void 0 : _a.find) === null || _b === void 0 ? void 0 : _b.call(_a, (r) => r.error || r.value);
|
|
18512
19418
|
if (!response) {
|
|
18513
19419
|
const error = `No answer found${parameters.vizId ? ` for vizId: ${parameters.vizId}` : ''}.`;
|
|
18514
19420
|
throw { error };
|
|
@@ -18517,13 +19423,35 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18517
19423
|
|| ((_c = response.value) === null || _c === void 0 ? void 0 : _c.errors)
|
|
18518
19424
|
|| ((_d = response.value) === null || _d === void 0 ? void 0 : _d.error);
|
|
18519
19425
|
if (errors) {
|
|
18520
|
-
|
|
19426
|
+
const message = typeof errors === 'string' ? errors : JSON.stringify(errors);
|
|
19427
|
+
throw { error: message };
|
|
18521
19428
|
}
|
|
18522
19429
|
return { ...response.value };
|
|
18523
19430
|
}
|
|
18524
19431
|
async hostEventFallback(hostEvent, data, context) {
|
|
18525
19432
|
return this.processTrigger(hostEvent, data, context);
|
|
18526
19433
|
}
|
|
19434
|
+
/**
|
|
19435
|
+
* For getter events that return data. Tries UI passthrough first;
|
|
19436
|
+
* if the app doesn't support it (no response data), falls back to
|
|
19437
|
+
* the legacy host event channel. Real errors are thrown as-is.
|
|
19438
|
+
*/
|
|
19439
|
+
async getDataWithPassthroughFallback(passthroughEvent, hostEvent, payload, context) {
|
|
19440
|
+
var _a, _b, _c;
|
|
19441
|
+
const response = await this.triggerUIPassthroughApi(passthroughEvent, payload || {}, context);
|
|
19442
|
+
const matched = (_a = response === null || response === void 0 ? void 0 : response.find) === null || _a === void 0 ? void 0 : _a.call(response, (r) => r.error || r.value);
|
|
19443
|
+
if (!matched) {
|
|
19444
|
+
return this.hostEventFallback(hostEvent, payload, context);
|
|
19445
|
+
}
|
|
19446
|
+
const errors = matched.error
|
|
19447
|
+
|| ((_b = matched.value) === null || _b === void 0 ? void 0 : _b.errors)
|
|
19448
|
+
|| ((_c = matched.value) === null || _c === void 0 ? void 0 : _c.error);
|
|
19449
|
+
if (errors) {
|
|
19450
|
+
const message = typeof errors === 'string' ? errors : JSON.stringify(errors);
|
|
19451
|
+
throw new Error(message);
|
|
19452
|
+
}
|
|
19453
|
+
return { ...matched.value };
|
|
19454
|
+
}
|
|
18527
19455
|
/**
|
|
18528
19456
|
* Setter for the iframe element used for host events
|
|
18529
19457
|
* @param {HTMLIFrameElement} iFrame - the iframe element to set
|
|
@@ -18531,6 +19459,26 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18531
19459
|
setIframeElement(iFrame) {
|
|
18532
19460
|
this.iFrame = iFrame;
|
|
18533
19461
|
}
|
|
19462
|
+
/**
|
|
19463
|
+
* Fetches the list of available UI passthrough keys from the embedded app.
|
|
19464
|
+
* Result is cached for the session. Returns empty array on failure.
|
|
19465
|
+
*/
|
|
19466
|
+
async getAvailableUIPassthroughKeys(context) {
|
|
19467
|
+
var _a, _b;
|
|
19468
|
+
if (this.availablePassthroughKeysCache !== null) {
|
|
19469
|
+
return this.availablePassthroughKeysCache;
|
|
19470
|
+
}
|
|
19471
|
+
try {
|
|
19472
|
+
const response = await this.triggerUIPassthroughApi(UIPassthroughEvent.GetAvailableUIPassthroughs, {}, context);
|
|
19473
|
+
const matched = (_a = response === null || response === void 0 ? void 0 : response.find) === null || _a === void 0 ? void 0 : _a.call(response, (r) => r.value && !r.error);
|
|
19474
|
+
const keys = (_b = matched === null || matched === void 0 ? void 0 : matched.value) === null || _b === void 0 ? void 0 : _b.keys;
|
|
19475
|
+
this.availablePassthroughKeysCache = Array.isArray(keys) ? keys : [];
|
|
19476
|
+
return this.availablePassthroughKeysCache;
|
|
19477
|
+
}
|
|
19478
|
+
catch {
|
|
19479
|
+
return [];
|
|
19480
|
+
}
|
|
19481
|
+
}
|
|
18534
19482
|
async triggerUIPassthroughApi(apiName, parameters, context) {
|
|
18535
19483
|
const res = await this.processTrigger(exports.HostEvent.UIPassthrough, {
|
|
18536
19484
|
type: apiName,
|
|
@@ -18566,15 +19514,41 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18566
19514
|
answerId: (_d = (_c = (_b = (_a = data === null || data === void 0 ? void 0 : data.saveResponse) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.Answer__save) === null || _c === void 0 ? void 0 : _c.answer) === null || _d === void 0 ? void 0 : _d.id,
|
|
18567
19515
|
};
|
|
18568
19516
|
}
|
|
19517
|
+
handleUpdateFiltersEvent(payload, context) {
|
|
19518
|
+
if (!isValidUpdateFiltersPayload(payload)) {
|
|
19519
|
+
throwUpdateFiltersValidationError();
|
|
19520
|
+
}
|
|
19521
|
+
return this.handleHostEventWithParam(UIPassthroughEvent.UpdateFilters, payload, context);
|
|
19522
|
+
}
|
|
19523
|
+
handleDrillDownEvent(payload, context) {
|
|
19524
|
+
if (!isValidDrillDownPayload(payload)) {
|
|
19525
|
+
throwDrillDownValidationError();
|
|
19526
|
+
}
|
|
19527
|
+
return this.handleHostEventWithParam(UIPassthroughEvent.Drilldown, payload, context);
|
|
19528
|
+
}
|
|
19529
|
+
/**
|
|
19530
|
+
* Dispatches a host event using the appropriate channel:
|
|
19531
|
+
* 1. If the embedded app supports UI passthrough for this event, use it (custom handler or getter).
|
|
19532
|
+
* 2. Otherwise fall back to the legacy host event channel.
|
|
19533
|
+
*
|
|
19534
|
+
* @param hostEvent - The host event to trigger
|
|
19535
|
+
* @param payload - Optional payload for the event
|
|
19536
|
+
* @param context - Optional context (e.g. vizId) for scoped operations
|
|
19537
|
+
*/
|
|
18569
19538
|
async triggerHostEvent(hostEvent, payload, context) {
|
|
18570
|
-
|
|
18571
|
-
|
|
18572
|
-
|
|
18573
|
-
|
|
18574
|
-
|
|
18575
|
-
|
|
18576
|
-
return this.hostEventFallback(hostEvent, payload, context);
|
|
19539
|
+
const customHandler = this.customHandlers[hostEvent];
|
|
19540
|
+
const passthroughEvent = PASSTHROUGH_MAP[hostEvent];
|
|
19541
|
+
// If embedded app supports passthrough but not this event, use legacy channel
|
|
19542
|
+
const keys = passthroughEvent ? await this.getAvailableUIPassthroughKeys(context) : [];
|
|
19543
|
+
if (passthroughEvent && keys.length > 0 && !keys.includes(passthroughEvent)) {
|
|
19544
|
+
return this.hostEventFallback(hostEvent, payload, context);
|
|
18577
19545
|
}
|
|
19546
|
+
// Custom handler (setters) > getter passthrough > legacy fallback
|
|
19547
|
+
return (customHandler
|
|
19548
|
+
? customHandler(payload, context)
|
|
19549
|
+
: passthroughEvent
|
|
19550
|
+
? this.getDataWithPassthroughFallback(passthroughEvent, hostEvent, payload, context)
|
|
19551
|
+
: this.hostEventFallback(hostEvent, payload, context));
|
|
18578
19552
|
}
|
|
18579
19553
|
}
|
|
18580
19554
|
|
|
@@ -19865,7 +20839,21 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
19865
20839
|
* Triggers an event to the embedded app
|
|
19866
20840
|
* @param {HostEvent} messageType The event type
|
|
19867
20841
|
* @param {any} data The payload to send with the message
|
|
20842
|
+
* @param {ContextType} context Optional context type to specify the context from which the event is triggered.
|
|
20843
|
+
* Use ContextType.Search for search answer context, ContextType.Answer for answer/explore context,
|
|
20844
|
+
* ContextType.Liveboard for liveboard context, or ContextType.Spotter for spotter context.
|
|
20845
|
+
* Available from SDK version 1.45.2 | ThoughtSpot: 26.3.0.cl
|
|
19868
20846
|
* @returns A promise that resolves with the response from the embedded app
|
|
20847
|
+
* @example
|
|
20848
|
+
* ```js
|
|
20849
|
+
* // Trigger Pin event with context (SDK: 1.45.2+)
|
|
20850
|
+
* import { HostEvent, ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
20851
|
+
* embed.trigger(HostEvent.Pin, {
|
|
20852
|
+
* vizId: "123",
|
|
20853
|
+
* liveboardId: "456"
|
|
20854
|
+
* }, ContextType.Search);
|
|
20855
|
+
* ```
|
|
20856
|
+
* @version SDK: 1.45.2 | ThoughtSpot: 26.3.0.cl (for context parameter)
|
|
19869
20857
|
*/
|
|
19870
20858
|
async trigger(messageType, data = {}, context) {
|
|
19871
20859
|
uploadMixpanelEvent(`${MIXPANEL_EVENT.VISUAL_SDK_TRIGGER}-${messageType}`);
|
|
@@ -19894,7 +20882,19 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
19894
20882
|
return null;
|
|
19895
20883
|
}
|
|
19896
20884
|
// send an empty object, this is needed for liveboard default handlers
|
|
19897
|
-
return this.hostEventClient.triggerHostEvent(messageType, data, context)
|
|
20885
|
+
return this.hostEventClient.triggerHostEvent(messageType, data, context).catch((err) => {
|
|
20886
|
+
var _a;
|
|
20887
|
+
if (err === null || err === void 0 ? void 0 : err.isValidationError) {
|
|
20888
|
+
const errorDetails = (_a = err.embedErrorDetails) !== null && _a !== void 0 ? _a : {
|
|
20889
|
+
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
20890
|
+
message: err.message || ERROR_MESSAGE.UPDATEFILTERS_INVALID_PAYLOAD,
|
|
20891
|
+
code: EmbedErrorCodes.UPDATEFILTERS_INVALID_PAYLOAD,
|
|
20892
|
+
error: err.message,
|
|
20893
|
+
};
|
|
20894
|
+
this.handleError(errorDetails);
|
|
20895
|
+
}
|
|
20896
|
+
throw err;
|
|
20897
|
+
});
|
|
19898
20898
|
}
|
|
19899
20899
|
/**
|
|
19900
20900
|
* Triggers an event to the embedded app, skipping the UI flow.
|
|
@@ -19928,8 +20928,33 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
19928
20928
|
return this.render();
|
|
19929
20929
|
}
|
|
19930
20930
|
/**
|
|
19931
|
-
|
|
19932
|
-
|
|
20931
|
+
* Context object for the embedded component.
|
|
20932
|
+
* @returns {ContextObject} The current context object containing the page type and object ids.
|
|
20933
|
+
* @example
|
|
20934
|
+
* ```js
|
|
20935
|
+
* const context = await embed.getCurrentContext();
|
|
20936
|
+
* console.log(context);
|
|
20937
|
+
*
|
|
20938
|
+
* // Example output
|
|
20939
|
+
* {
|
|
20940
|
+
* stack: [
|
|
20941
|
+
* {
|
|
20942
|
+
* name: 'Liveboard',
|
|
20943
|
+
* type: ContextType.Liveboard,
|
|
20944
|
+
* objectIds: {
|
|
20945
|
+
* liveboardId: '123',
|
|
20946
|
+
* },
|
|
20947
|
+
* },
|
|
20948
|
+
* ],
|
|
20949
|
+
* currentContext: {
|
|
20950
|
+
* name: 'Liveboard',
|
|
20951
|
+
* type: ContextType.Liveboard,
|
|
20952
|
+
* objectIds: {
|
|
20953
|
+
* liveboardId: '123',
|
|
20954
|
+
* },
|
|
20955
|
+
* },
|
|
20956
|
+
* }
|
|
20957
|
+
* ```
|
|
19933
20958
|
* @version SDK: 1.45.2 | ThoughtSpot: 26.3.0.cl
|
|
19934
20959
|
*/
|
|
19935
20960
|
async getCurrentContext() {
|
|
@@ -20611,6 +21636,50 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
20611
21636
|
}
|
|
20612
21637
|
};
|
|
20613
21638
|
|
|
21639
|
+
/**
|
|
21640
|
+
* Resolves enablePastConversationsSidebar with
|
|
21641
|
+
* spotterSidebarConfig taking precedence over the
|
|
21642
|
+
* standalone flag.
|
|
21643
|
+
*/
|
|
21644
|
+
const resolveEnablePastConversationsSidebar = (params) => (params.spotterSidebarConfigValue !== undefined
|
|
21645
|
+
? params.spotterSidebarConfigValue
|
|
21646
|
+
: params.standaloneValue);
|
|
21647
|
+
function buildSpotterSidebarAppInitData(defaultAppInitData, viewConfig, handleError) {
|
|
21648
|
+
const { spotterSidebarConfig, enablePastConversationsSidebar } = viewConfig;
|
|
21649
|
+
const resolvedEnablePastConversations = resolveEnablePastConversationsSidebar({
|
|
21650
|
+
spotterSidebarConfigValue: spotterSidebarConfig === null || spotterSidebarConfig === void 0 ? void 0 : spotterSidebarConfig.enablePastConversationsSidebar,
|
|
21651
|
+
standaloneValue: enablePastConversationsSidebar,
|
|
21652
|
+
});
|
|
21653
|
+
const hasConfig = spotterSidebarConfig || resolvedEnablePastConversations !== undefined;
|
|
21654
|
+
if (!hasConfig)
|
|
21655
|
+
return defaultAppInitData;
|
|
21656
|
+
const resolvedSidebarConfig = {
|
|
21657
|
+
...spotterSidebarConfig,
|
|
21658
|
+
...(resolvedEnablePastConversations !== undefined && {
|
|
21659
|
+
enablePastConversationsSidebar: resolvedEnablePastConversations,
|
|
21660
|
+
}),
|
|
21661
|
+
};
|
|
21662
|
+
if (resolvedSidebarConfig.spotterDocumentationUrl !== undefined) {
|
|
21663
|
+
const [isValid, validationError] = validateHttpUrl(resolvedSidebarConfig.spotterDocumentationUrl);
|
|
21664
|
+
if (!isValid) {
|
|
21665
|
+
handleError({
|
|
21666
|
+
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
21667
|
+
message: ERROR_MESSAGE.INVALID_SPOTTER_DOCUMENTATION_URL,
|
|
21668
|
+
code: EmbedErrorCodes.INVALID_URL,
|
|
21669
|
+
error: (validationError === null || validationError === void 0 ? void 0 : validationError.message) || ERROR_MESSAGE.INVALID_SPOTTER_DOCUMENTATION_URL,
|
|
21670
|
+
});
|
|
21671
|
+
delete resolvedSidebarConfig.spotterDocumentationUrl;
|
|
21672
|
+
}
|
|
21673
|
+
}
|
|
21674
|
+
return {
|
|
21675
|
+
...defaultAppInitData,
|
|
21676
|
+
embedParams: {
|
|
21677
|
+
...(defaultAppInitData.embedParams || {}),
|
|
21678
|
+
spotterSidebarConfig: resolvedSidebarConfig,
|
|
21679
|
+
},
|
|
21680
|
+
};
|
|
21681
|
+
}
|
|
21682
|
+
|
|
20614
21683
|
/**
|
|
20615
21684
|
* Copyright (c) 2022
|
|
20616
21685
|
*
|
|
@@ -20740,7 +21809,10 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
20740
21809
|
this.defaultHeight = 500;
|
|
20741
21810
|
this.sendFullHeightLazyLoadData = () => {
|
|
20742
21811
|
const data = calculateVisibleElementData(this.iFrame);
|
|
20743
|
-
this
|
|
21812
|
+
// this should be fired only if the lazyLoadingForFullHeight and fullHeight are true
|
|
21813
|
+
if (this.viewConfig.lazyLoadingForFullHeight && this.viewConfig.fullHeight) {
|
|
21814
|
+
this.trigger(exports.HostEvent.VisibleEmbedCoordinates, data);
|
|
21815
|
+
}
|
|
20744
21816
|
};
|
|
20745
21817
|
/**
|
|
20746
21818
|
* This is a handler for the RequestVisibleEmbedCoordinates event.
|
|
@@ -20793,12 +21865,28 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
20793
21865
|
this.on(exports.EmbedEvent.RequestVisibleEmbedCoordinates, this.requestVisibleEmbedCoordinatesHandler);
|
|
20794
21866
|
}
|
|
20795
21867
|
}
|
|
21868
|
+
/**
|
|
21869
|
+
* Extends the default APP_INIT payload with `embedParams.spotterSidebarConfig`
|
|
21870
|
+
* so the conv-assist app can read sidebar configuration on initialisation.
|
|
21871
|
+
*
|
|
21872
|
+
* Precedence for `enablePastConversationsSidebar`:
|
|
21873
|
+
* `spotterSidebarConfig.enablePastConversationsSidebar` wins over the
|
|
21874
|
+
* deprecated top-level `enablePastConversationsSidebar` flag; if the former
|
|
21875
|
+
* is absent the latter is used as a fallback.
|
|
21876
|
+
*
|
|
21877
|
+
* An invalid `spotterDocumentationUrl` triggers a validation error and is
|
|
21878
|
+
* excluded from the payload rather than forwarded to the app.
|
|
21879
|
+
*/
|
|
21880
|
+
async getAppInitData() {
|
|
21881
|
+
const defaultAppInitData = await super.getAppInitData();
|
|
21882
|
+
return buildSpotterSidebarAppInitData(defaultAppInitData, this.viewConfig, this.handleError.bind(this));
|
|
21883
|
+
}
|
|
20796
21884
|
/**
|
|
20797
21885
|
* Constructs a map of parameters to be passed on to the
|
|
20798
21886
|
* embedded Liveboard or visualization.
|
|
20799
21887
|
*/
|
|
20800
21888
|
getEmbedParams() {
|
|
20801
|
-
const { tag, hideTagFilterChips, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideHamburger, hideObjectSearch, hideNotification, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 = true, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, showMaskedFilterChip = false, isLiveboardMasterpiecesEnabled = false, hideHomepageLeftNav = false, modularHomeExperience = false, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, enable2ColumnLayout, enableCustomColumnGroups = false, dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, isEnhancedFilterInteractivityEnabled = false, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, discoveryExperience, coverAndFilterOptionInPDF = false, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, isLiveboardXLSXCSVDownloadEnabled = false, isGranularXLSXCSVSchedulesEnabled = false, isCentralizedLiveboardFilterUXEnabled = false, isLinkParametersEnabled, updatedSpotterChatPrompt,
|
|
21889
|
+
const { tag, hideTagFilterChips, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideHamburger, hideObjectSearch, hideNotification, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 = true, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, showMaskedFilterChip = false, isLiveboardMasterpiecesEnabled = false, hideHomepageLeftNav = false, modularHomeExperience = false, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, enable2ColumnLayout, enableCustomColumnGroups = false, dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, isEnhancedFilterInteractivityEnabled = false, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, discoveryExperience, coverAndFilterOptionInPDF = false, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, isLiveboardXLSXCSVDownloadEnabled = false, isGranularXLSXCSVSchedulesEnabled = false, isCentralizedLiveboardFilterUXEnabled = false, isLinkParametersEnabled, updatedSpotterChatPrompt, spotterChatConfig, minimumHeight, isThisPeriodInDateFiltersEnabled, enableHomepageAnnouncement = false, isContinuousLiveboardPDFEnabled, } = this.viewConfig;
|
|
20802
21890
|
let params = {};
|
|
20803
21891
|
params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
|
|
20804
21892
|
params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
|
|
@@ -20822,39 +21910,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
20822
21910
|
if (!isUndefined(updatedSpotterChatPrompt)) {
|
|
20823
21911
|
params[Param.UpdatedSpotterChatPrompt] = !!updatedSpotterChatPrompt;
|
|
20824
21912
|
}
|
|
20825
|
-
const resolvedEnablePastConversationsSidebar = resolveEnablePastConversationsSidebar({
|
|
20826
|
-
spotterSidebarConfigValue: spotterSidebarConfig === null || spotterSidebarConfig === void 0 ? void 0 : spotterSidebarConfig.enablePastConversationsSidebar,
|
|
20827
|
-
standaloneValue: this.viewConfig.enablePastConversationsSidebar,
|
|
20828
|
-
});
|
|
20829
|
-
setParamIfDefined(params, Param.EnablePastConversationsSidebar, resolvedEnablePastConversationsSidebar, true);
|
|
20830
|
-
// Handle spotterSidebarConfig params
|
|
20831
|
-
if (spotterSidebarConfig) {
|
|
20832
|
-
const { spotterSidebarTitle, spotterSidebarDefaultExpanded, spotterChatRenameLabel, spotterChatDeleteLabel, spotterDeleteConversationModalTitle, spotterPastConversationAlertMessage, spotterDocumentationUrl, spotterBestPracticesLabel, spotterConversationsBatchSize, spotterNewChatButtonTitle, } = spotterSidebarConfig;
|
|
20833
|
-
setParamIfDefined(params, Param.SpotterSidebarDefaultExpanded, spotterSidebarDefaultExpanded, true);
|
|
20834
|
-
setParamIfDefined(params, Param.SpotterSidebarTitle, spotterSidebarTitle);
|
|
20835
|
-
setParamIfDefined(params, Param.SpotterChatRenameLabel, spotterChatRenameLabel);
|
|
20836
|
-
setParamIfDefined(params, Param.SpotterChatDeleteLabel, spotterChatDeleteLabel);
|
|
20837
|
-
setParamIfDefined(params, Param.SpotterDeleteConversationModalTitle, spotterDeleteConversationModalTitle);
|
|
20838
|
-
setParamIfDefined(params, Param.SpotterPastConversationAlertMessage, spotterPastConversationAlertMessage);
|
|
20839
|
-
setParamIfDefined(params, Param.SpotterBestPracticesLabel, spotterBestPracticesLabel);
|
|
20840
|
-
setParamIfDefined(params, Param.SpotterConversationsBatchSize, spotterConversationsBatchSize);
|
|
20841
|
-
setParamIfDefined(params, Param.SpotterNewChatButtonTitle, spotterNewChatButtonTitle);
|
|
20842
|
-
// URL param with validation
|
|
20843
|
-
if (spotterDocumentationUrl !== undefined) {
|
|
20844
|
-
const [isValid, validationError] = validateHttpUrl(spotterDocumentationUrl);
|
|
20845
|
-
if (isValid) {
|
|
20846
|
-
params[Param.SpotterDocumentationUrl] = spotterDocumentationUrl;
|
|
20847
|
-
}
|
|
20848
|
-
else {
|
|
20849
|
-
this.handleError({
|
|
20850
|
-
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
20851
|
-
message: ERROR_MESSAGE.INVALID_SPOTTER_DOCUMENTATION_URL,
|
|
20852
|
-
code: EmbedErrorCodes.INVALID_URL,
|
|
20853
|
-
error: (validationError === null || validationError === void 0 ? void 0 : validationError.message) || ERROR_MESSAGE.INVALID_SPOTTER_DOCUMENTATION_URL,
|
|
20854
|
-
});
|
|
20855
|
-
}
|
|
20856
|
-
}
|
|
20857
|
-
}
|
|
20858
21913
|
// Handle spotterChatConfig params
|
|
20859
21914
|
if (spotterChatConfig) {
|
|
20860
21915
|
const { hideToolResponseCardBranding, toolResponseCardBrandingLabel, } = spotterChatConfig;
|
|
@@ -20930,6 +21985,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
20930
21985
|
if (enableHomepageAnnouncement !== undefined) {
|
|
20931
21986
|
params[Param.EnableHomepageAnnouncement] = enableHomepageAnnouncement;
|
|
20932
21987
|
}
|
|
21988
|
+
if (isContinuousLiveboardPDFEnabled !== undefined) {
|
|
21989
|
+
params[Param.IsWYSIWYGLiveboardPDFEnabled] = isContinuousLiveboardPDFEnabled;
|
|
21990
|
+
}
|
|
20933
21991
|
this.defaultHeight = minimumHeight || this.defaultHeight;
|
|
20934
21992
|
params[Param.DataPanelV2Enabled] = dataPanelV2;
|
|
20935
21993
|
params[Param.HideHomepageLeftNav] = hideHomepageLeftNav;
|
|
@@ -21205,7 +22263,10 @@ query GetEurekaVizSnapshots(
|
|
|
21205
22263
|
this.defaultHeight = 500;
|
|
21206
22264
|
this.sendFullHeightLazyLoadData = () => {
|
|
21207
22265
|
const data = calculateVisibleElementData(this.iFrame);
|
|
21208
|
-
this
|
|
22266
|
+
// this should be fired only if the lazyLoadingForFullHeight and fullHeight are true
|
|
22267
|
+
if (this.viewConfig.lazyLoadingForFullHeight && this.viewConfig.fullHeight) {
|
|
22268
|
+
this.trigger(exports.HostEvent.VisibleEmbedCoordinates, data);
|
|
22269
|
+
}
|
|
21209
22270
|
};
|
|
21210
22271
|
/**
|
|
21211
22272
|
* This is a handler for the RequestVisibleEmbedCoordinates event.
|
|
@@ -21285,7 +22346,7 @@ query GetEurekaVizSnapshots(
|
|
|
21285
22346
|
getEmbedParamsObject() {
|
|
21286
22347
|
let params = {};
|
|
21287
22348
|
params = this.getBaseQueryParams(params);
|
|
21288
|
-
const { enableVizTransformations, fullHeight, defaultHeight, minimumHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, showMaskedFilterChip = false, isLiveboardMasterpiecesEnabled = false, isEnhancedFilterInteractivityEnabled = false, enableAskSage, enable2ColumnLayout, dataPanelV2 = true, enableCustomColumnGroups = false, oAuthPollingInterval, isForceRedirect, dataSourceId, coverAndFilterOptionInPDF = false, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, isLiveboardXLSXCSVDownloadEnabled = false, isGranularXLSXCSVSchedulesEnabled = false, showSpotterLimitations, isCentralizedLiveboardFilterUXEnabled = false, isLinkParametersEnabled, updatedSpotterChatPrompt, spotterChatConfig, isThisPeriodInDateFiltersEnabled, } = this.viewConfig;
|
|
22349
|
+
const { enableVizTransformations, fullHeight, defaultHeight, minimumHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, showMaskedFilterChip = false, isLiveboardMasterpiecesEnabled = false, isEnhancedFilterInteractivityEnabled = false, enableAskSage, enable2ColumnLayout, dataPanelV2 = true, enableCustomColumnGroups = false, oAuthPollingInterval, isForceRedirect, dataSourceId, coverAndFilterOptionInPDF = false, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, isLiveboardXLSXCSVDownloadEnabled = false, isGranularXLSXCSVSchedulesEnabled = false, showSpotterLimitations, isCentralizedLiveboardFilterUXEnabled = false, isLinkParametersEnabled, updatedSpotterChatPrompt, spotterChatConfig, isThisPeriodInDateFiltersEnabled, isContinuousLiveboardPDFEnabled, } = this.viewConfig;
|
|
21289
22350
|
const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
|
|
21290
22351
|
|| this.viewConfig.preventPinboardFilterRemoval;
|
|
21291
22352
|
if (fullHeight === true) {
|
|
@@ -21374,6 +22435,9 @@ query GetEurekaVizSnapshots(
|
|
|
21374
22435
|
if (isThisPeriodInDateFiltersEnabled !== undefined) {
|
|
21375
22436
|
params[Param.IsThisPeriodInDateFiltersEnabled] = isThisPeriodInDateFiltersEnabled;
|
|
21376
22437
|
}
|
|
22438
|
+
if (isContinuousLiveboardPDFEnabled !== undefined) {
|
|
22439
|
+
params[Param.IsWYSIWYGLiveboardPDFEnabled] = isContinuousLiveboardPDFEnabled;
|
|
22440
|
+
}
|
|
21377
22441
|
params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
|
|
21378
22442
|
params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
|
|
21379
22443
|
params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;
|
|
@@ -21390,7 +22454,8 @@ query GetEurekaVizSnapshots(
|
|
|
21390
22454
|
}
|
|
21391
22455
|
getIframeSuffixSrc(liveboardId, vizId, activeTabId, personalizedViewId) {
|
|
21392
22456
|
// Extract view from liveboardId if passed along with it (legacy
|
|
21393
|
-
// approach)
|
|
22457
|
+
// approach)
|
|
22458
|
+
// View must be appended as query param at the end, not
|
|
21394
22459
|
// embedded in path
|
|
21395
22460
|
let liveboardGuid = liveboardId;
|
|
21396
22461
|
let legacyViewId;
|
|
@@ -22120,14 +23185,24 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
22120
23185
|
super(container, viewConfig);
|
|
22121
23186
|
this.viewConfig = viewConfig;
|
|
22122
23187
|
}
|
|
23188
|
+
/**
|
|
23189
|
+
* Extends the default APP_INIT payload with `embedParams.spotterSidebarConfig`
|
|
23190
|
+
* so the conv-assist app can read sidebar configuration on initialisation.
|
|
23191
|
+
*
|
|
23192
|
+
* Precedence for `enablePastConversationsSidebar`:
|
|
23193
|
+
* `spotterSidebarConfig.enablePastConversationsSidebar` wins over the
|
|
23194
|
+
* deprecated top-level `enablePastConversationsSidebar` flag; if the former
|
|
23195
|
+
* is absent the latter is used as a fallback.
|
|
23196
|
+
*
|
|
23197
|
+
* An invalid `spotterDocumentationUrl` triggers a validation error and is
|
|
23198
|
+
* excluded from the payload rather than forwarded to the app.
|
|
23199
|
+
*/
|
|
23200
|
+
async getAppInitData() {
|
|
23201
|
+
const defaultAppInitData = await super.getAppInitData();
|
|
23202
|
+
return buildSpotterSidebarAppInitData(defaultAppInitData, this.viewConfig, this.handleError.bind(this));
|
|
23203
|
+
}
|
|
22123
23204
|
getEmbedParamsObject() {
|
|
22124
|
-
const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, updatedSpotterChatPrompt,
|
|
22125
|
-
// Extract sidebar config properties
|
|
22126
|
-
const { enablePastConversationsSidebar: sidebarEnablePastConversationsSidebar, spotterSidebarTitle, spotterSidebarDefaultExpanded, spotterChatRenameLabel, spotterChatDeleteLabel, spotterDeleteConversationModalTitle, spotterPastConversationAlertMessage, spotterDocumentationUrl, spotterBestPracticesLabel, spotterConversationsBatchSize, spotterNewChatButtonTitle, } = spotterSidebarConfig || {};
|
|
22127
|
-
const resolvedEnablePastConversationsSidebar = resolveEnablePastConversationsSidebar({
|
|
22128
|
-
spotterSidebarConfigValue: sidebarEnablePastConversationsSidebar,
|
|
22129
|
-
standaloneValue: this.viewConfig.enablePastConversationsSidebar,
|
|
22130
|
-
});
|
|
23205
|
+
const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, updatedSpotterChatPrompt, spotterChatConfig, } = this.viewConfig;
|
|
22131
23206
|
if (!worksheetId) {
|
|
22132
23207
|
this.handleError({
|
|
22133
23208
|
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
@@ -22145,32 +23220,6 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
22145
23220
|
setParamIfDefined(queryParams, Param.ShowSpotterLimitations, showSpotterLimitations, true);
|
|
22146
23221
|
setParamIfDefined(queryParams, Param.HideSampleQuestions, hideSampleQuestions, true);
|
|
22147
23222
|
setParamIfDefined(queryParams, Param.UpdatedSpotterChatPrompt, updatedSpotterChatPrompt, true);
|
|
22148
|
-
setParamIfDefined(queryParams, Param.EnablePastConversationsSidebar, resolvedEnablePastConversationsSidebar, true);
|
|
22149
|
-
setParamIfDefined(queryParams, Param.SpotterSidebarDefaultExpanded, spotterSidebarDefaultExpanded, true);
|
|
22150
|
-
// String params
|
|
22151
|
-
setParamIfDefined(queryParams, Param.SpotterSidebarTitle, spotterSidebarTitle);
|
|
22152
|
-
setParamIfDefined(queryParams, Param.SpotterChatRenameLabel, spotterChatRenameLabel);
|
|
22153
|
-
setParamIfDefined(queryParams, Param.SpotterChatDeleteLabel, spotterChatDeleteLabel);
|
|
22154
|
-
setParamIfDefined(queryParams, Param.SpotterDeleteConversationModalTitle, spotterDeleteConversationModalTitle);
|
|
22155
|
-
setParamIfDefined(queryParams, Param.SpotterPastConversationAlertMessage, spotterPastConversationAlertMessage);
|
|
22156
|
-
setParamIfDefined(queryParams, Param.SpotterBestPracticesLabel, spotterBestPracticesLabel);
|
|
22157
|
-
setParamIfDefined(queryParams, Param.SpotterConversationsBatchSize, spotterConversationsBatchSize);
|
|
22158
|
-
setParamIfDefined(queryParams, Param.SpotterNewChatButtonTitle, spotterNewChatButtonTitle);
|
|
22159
|
-
// URL param with validation
|
|
22160
|
-
if (spotterDocumentationUrl !== undefined) {
|
|
22161
|
-
const [isValid, validationError] = validateHttpUrl(spotterDocumentationUrl);
|
|
22162
|
-
if (isValid) {
|
|
22163
|
-
queryParams[Param.SpotterDocumentationUrl] = spotterDocumentationUrl;
|
|
22164
|
-
}
|
|
22165
|
-
else {
|
|
22166
|
-
this.handleError({
|
|
22167
|
-
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
22168
|
-
message: ERROR_MESSAGE.INVALID_SPOTTER_DOCUMENTATION_URL,
|
|
22169
|
-
code: EmbedErrorCodes.INVALID_URL,
|
|
22170
|
-
error: (validationError === null || validationError === void 0 ? void 0 : validationError.message) || ERROR_MESSAGE.INVALID_SPOTTER_DOCUMENTATION_URL,
|
|
22171
|
-
});
|
|
22172
|
-
}
|
|
22173
|
-
}
|
|
22174
23223
|
// Handle spotterChatConfig params
|
|
22175
23224
|
if (spotterChatConfig) {
|
|
22176
23225
|
const { hideToolResponseCardBranding, toolResponseCardBrandingLabel, } = spotterChatConfig;
|
|
@@ -22244,60 +23293,64 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
22244
23293
|
// intended for preRendering. If set to true, the component will call the
|
|
22245
23294
|
// Embed.preRender() method instead of the usual render method, and it will
|
|
22246
23295
|
// not be destroyed when the component is unmounted.
|
|
22247
|
-
isPreRenderedComponent = false) =>
|
|
22248
|
-
const
|
|
22249
|
-
|
|
22250
|
-
|
|
22251
|
-
|
|
22252
|
-
|
|
22253
|
-
|
|
22254
|
-
|
|
22255
|
-
|
|
22256
|
-
|
|
22257
|
-
|
|
22258
|
-
|
|
22259
|
-
|
|
22260
|
-
|
|
22261
|
-
|
|
22262
|
-
const handlePreRenderRendering = (tsEmbed) => {
|
|
22263
|
-
tsEmbed.preRender();
|
|
22264
|
-
};
|
|
22265
|
-
const handleDefaultRendering = (tsEmbed) => {
|
|
22266
|
-
// if component is connected to a preRendered component
|
|
22267
|
-
if (props.preRenderId) {
|
|
22268
|
-
tsEmbed.showPreRender();
|
|
22269
|
-
return;
|
|
22270
|
-
}
|
|
22271
|
-
tsEmbed.render();
|
|
22272
|
-
};
|
|
22273
|
-
const handleRendering = (tsEmbed) => {
|
|
22274
|
-
if (isPreRenderedComponent) {
|
|
22275
|
-
handlePreRenderRendering(tsEmbed);
|
|
22276
|
-
return;
|
|
22277
|
-
}
|
|
22278
|
-
handleDefaultRendering(tsEmbed);
|
|
22279
|
-
};
|
|
22280
|
-
useDeepCompareEffect(() => {
|
|
22281
|
-
const tsEmbed = new EmbedConstructor(ref.current, deepMerge({
|
|
22282
|
-
insertAsSibling: viewConfig.insertAsSibling,
|
|
22283
|
-
frameParams: {
|
|
22284
|
-
class: viewConfig.insertAsSibling ? className || '' : '',
|
|
22285
|
-
},
|
|
22286
|
-
}, viewConfig));
|
|
22287
|
-
Object.keys(listeners).forEach((eventName) => {
|
|
22288
|
-
tsEmbed.on(eventName, listeners[eventName]);
|
|
22289
|
-
});
|
|
22290
|
-
handleRendering(tsEmbed);
|
|
22291
|
-
if (forwardedRef) {
|
|
22292
|
-
forwardedRef.current = tsEmbed;
|
|
22293
|
-
}
|
|
22294
|
-
return () => {
|
|
22295
|
-
handleDestroy(tsEmbed);
|
|
23296
|
+
isPreRenderedComponent = false) => {
|
|
23297
|
+
const Component = React.forwardRef((props, forwardedRef) => {
|
|
23298
|
+
const ref = React.useRef(null);
|
|
23299
|
+
const { className, style, ...embedProps } = props;
|
|
23300
|
+
const { viewConfig, listeners } = getViewPropsAndListeners(embedProps);
|
|
23301
|
+
const handleDestroy = (tsEmbed) => {
|
|
23302
|
+
// do not destroy if it is a preRender component
|
|
23303
|
+
if (isPreRenderedComponent)
|
|
23304
|
+
return;
|
|
23305
|
+
// if component is connected to a preRendered component
|
|
23306
|
+
if (props.preRenderId) {
|
|
23307
|
+
tsEmbed.hidePreRender();
|
|
23308
|
+
return;
|
|
23309
|
+
}
|
|
23310
|
+
tsEmbed.destroy();
|
|
22296
23311
|
};
|
|
22297
|
-
|
|
22298
|
-
|
|
22299
|
-
|
|
22300
|
-
|
|
23312
|
+
const handlePreRenderRendering = (tsEmbed) => {
|
|
23313
|
+
tsEmbed.preRender();
|
|
23314
|
+
};
|
|
23315
|
+
const handleDefaultRendering = (tsEmbed) => {
|
|
23316
|
+
// if component is connected to a preRendered component
|
|
23317
|
+
if (props.preRenderId) {
|
|
23318
|
+
tsEmbed.showPreRender();
|
|
23319
|
+
return;
|
|
23320
|
+
}
|
|
23321
|
+
tsEmbed.render();
|
|
23322
|
+
};
|
|
23323
|
+
const handleRendering = (tsEmbed) => {
|
|
23324
|
+
if (isPreRenderedComponent) {
|
|
23325
|
+
handlePreRenderRendering(tsEmbed);
|
|
23326
|
+
return;
|
|
23327
|
+
}
|
|
23328
|
+
handleDefaultRendering(tsEmbed);
|
|
23329
|
+
};
|
|
23330
|
+
useDeepCompareEffect(() => {
|
|
23331
|
+
const tsEmbed = new EmbedConstructor(ref.current, deepMerge({
|
|
23332
|
+
insertAsSibling: viewConfig.insertAsSibling,
|
|
23333
|
+
frameParams: {
|
|
23334
|
+
class: viewConfig.insertAsSibling ? className || '' : '',
|
|
23335
|
+
},
|
|
23336
|
+
}, viewConfig));
|
|
23337
|
+
Object.keys(listeners).forEach((eventName) => {
|
|
23338
|
+
tsEmbed.on(eventName, listeners[eventName]);
|
|
23339
|
+
});
|
|
23340
|
+
handleRendering(tsEmbed);
|
|
23341
|
+
if (forwardedRef) {
|
|
23342
|
+
forwardedRef.current = tsEmbed;
|
|
23343
|
+
}
|
|
23344
|
+
return () => {
|
|
23345
|
+
handleDestroy(tsEmbed);
|
|
23346
|
+
};
|
|
23347
|
+
}, [viewConfig, listeners]);
|
|
23348
|
+
const preRenderStyles = isPreRenderedComponent ? { display: 'none' } : {};
|
|
23349
|
+
return viewConfig.insertAsSibling ? (React.createElement("span", { "data-testid": "tsEmbed", ref: ref, style: { position: 'absolute', ...preRenderStyles } })) : (React.createElement("div", { "data-testid": "tsEmbed", ref: ref, style: { ...style, ...preRenderStyles }, className: `ts-embed-container ${className}` }));
|
|
23350
|
+
});
|
|
23351
|
+
Component.displayName = EmbedConstructor.name || 'EmbedComponent';
|
|
23352
|
+
return Component;
|
|
23353
|
+
};
|
|
22301
23354
|
/**
|
|
22302
23355
|
* React component for Search Embed.
|
|
22303
23356
|
* @example
|
|
@@ -22511,6 +23564,7 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
22511
23564
|
const { message, query: _, ...otherProps } = props;
|
|
22512
23565
|
return (React.createElement(ConversationMessage, { ref: ref, ...message, ...otherProps }));
|
|
22513
23566
|
});
|
|
23567
|
+
SpotterMessage.displayName = 'SpotterMessage';
|
|
22514
23568
|
/**
|
|
22515
23569
|
* React component for PreRendered Conversation embed.
|
|
22516
23570
|
*
|