@thoughtspot/visual-embed-sdk 1.46.4 → 1.46.5-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/package.json +2 -2
- package/cjs/src/auth.d.ts +2 -1
- package/cjs/src/auth.d.ts.map +1 -1
- package/cjs/src/auth.js +2 -1
- package/cjs/src/auth.js.map +1 -1
- package/cjs/src/authToken.d.ts.map +1 -1
- package/cjs/src/authToken.js.map +1 -1
- package/cjs/src/css-variables.d.ts +51 -17
- package/cjs/src/css-variables.d.ts.map +1 -1
- package/cjs/src/embed/app.d.ts +1 -0
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +10 -1
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/app.spec.js +46 -1
- package/cjs/src/embed/app.spec.js.map +1 -1
- package/cjs/src/embed/base.d.ts.map +1 -1
- package/cjs/src/embed/base.js.map +1 -1
- package/cjs/src/embed/base.spec.js.map +1 -1
- package/cjs/src/embed/events.spec.js +72 -0
- package/cjs/src/embed/events.spec.js.map +1 -1
- package/cjs/src/embed/hostEventClient/contracts.d.ts +74 -3
- package/cjs/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/cjs/src/embed/hostEventClient/contracts.js +7 -0
- package/cjs/src/embed/hostEventClient/contracts.js.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.d.ts +10 -0
- package/cjs/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.js +46 -9
- package/cjs/src/embed/hostEventClient/host-event-client.js.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.spec.js +155 -0
- package/cjs/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts +1 -0
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +11 -2
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/liveboard.spec.js +96 -2
- package/cjs/src/embed/liveboard.spec.js.map +1 -1
- package/cjs/src/embed/sage.d.ts.map +1 -1
- package/cjs/src/embed/sage.js.map +1 -1
- package/cjs/src/embed/search.spec.js.map +1 -1
- package/cjs/src/embed/ts-embed.d.ts +41 -2
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +41 -2
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/react/index.d.ts.map +1 -1
- package/cjs/src/react/index.js +58 -53
- package/cjs/src/react/index.js.map +1 -1
- package/cjs/src/types.d.ts +730 -32
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +734 -3
- package/cjs/src/types.js.map +1 -1
- package/cjs/src/utils/graphql/answerService/answerService.d.ts +4 -2
- package/cjs/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
- package/cjs/src/utils/graphql/answerService/answerService.js +4 -2
- package/cjs/src/utils/graphql/answerService/answerService.js.map +1 -1
- package/cjs/src/utils/graphql/preview-service.d.ts.map +1 -1
- package/cjs/src/utils/graphql/preview-service.js.map +1 -1
- package/cjs/src/utils/processData.d.ts.map +1 -1
- package/cjs/src/utils/processData.js.map +1 -1
- package/dist/{index-DGV_zh53.js → index-DW2wEHqy.js} +1 -1
- package/dist/src/auth.d.ts +2 -1
- package/dist/src/auth.d.ts.map +1 -1
- package/dist/src/authToken.d.ts.map +1 -1
- package/dist/src/css-variables.d.ts +51 -17
- package/dist/src/css-variables.d.ts.map +1 -1
- package/dist/src/embed/app.d.ts +1 -0
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/base.d.ts.map +1 -1
- package/dist/src/embed/hostEventClient/contracts.d.ts +74 -3
- package/dist/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/dist/src/embed/hostEventClient/host-event-client.d.ts +10 -0
- package/dist/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts +1 -0
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/embed/sage.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.d.ts +41 -2
- package/dist/src/embed/ts-embed.d.ts.map +1 -1
- package/dist/src/react/index.d.ts.map +1 -1
- package/dist/src/types.d.ts +730 -32
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/graphql/answerService/answerService.d.ts +4 -2
- package/dist/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
- package/dist/src/utils/graphql/preview-service.d.ts.map +1 -1
- package/dist/src/utils/processData.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +917 -77
- package/dist/tsembed-react.js +915 -75
- package/dist/tsembed.es.js +859 -24
- package/dist/tsembed.js +857 -22
- package/dist/visual-embed-sdk-react-full.d.ts +892 -54
- package/dist/visual-embed-sdk-react.d.ts +892 -54
- package/dist/visual-embed-sdk.d.ts +912 -56
- package/lib/package.json +2 -2
- package/lib/src/auth.d.ts +2 -1
- package/lib/src/auth.d.ts.map +1 -1
- package/lib/src/auth.js +2 -1
- package/lib/src/auth.js.map +1 -1
- package/lib/src/authToken.d.ts.map +1 -1
- package/lib/src/authToken.js.map +1 -1
- package/lib/src/css-variables.d.ts +51 -17
- package/lib/src/css-variables.d.ts.map +1 -1
- package/lib/src/embed/app.d.ts +1 -0
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +10 -1
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/app.spec.js +46 -1
- package/lib/src/embed/app.spec.js.map +1 -1
- package/lib/src/embed/base.d.ts.map +1 -1
- package/lib/src/embed/base.js.map +1 -1
- package/lib/src/embed/base.spec.js.map +1 -1
- package/lib/src/embed/events.spec.js +73 -1
- package/lib/src/embed/events.spec.js.map +1 -1
- package/lib/src/embed/hostEventClient/contracts.d.ts +74 -3
- package/lib/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/lib/src/embed/hostEventClient/contracts.js +7 -0
- package/lib/src/embed/hostEventClient/contracts.js.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.d.ts +10 -0
- package/lib/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.js +46 -9
- package/lib/src/embed/hostEventClient/host-event-client.js.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.spec.js +155 -0
- package/lib/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts +1 -0
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +11 -2
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +96 -2
- package/lib/src/embed/liveboard.spec.js.map +1 -1
- package/lib/src/embed/sage.d.ts.map +1 -1
- package/lib/src/embed/sage.js.map +1 -1
- package/lib/src/embed/search.spec.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts +41 -2
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +42 -3
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/react/index.d.ts.map +1 -1
- package/lib/src/react/index.js +58 -53
- package/lib/src/react/index.js.map +1 -1
- package/lib/src/types.d.ts +730 -32
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +734 -3
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils/graphql/answerService/answerService.d.ts +4 -2
- package/lib/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
- package/lib/src/utils/graphql/answerService/answerService.js +4 -2
- package/lib/src/utils/graphql/answerService/answerService.js.map +1 -1
- package/lib/src/utils/graphql/preview-service.d.ts.map +1 -1
- package/lib/src/utils/graphql/preview-service.js.map +1 -1
- package/lib/src/utils/processData.d.ts.map +1 -1
- package/lib/src/utils/processData.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +912 -56
- package/package.json +2 -2
- package/src/auth.spec.ts +1 -1
- package/src/auth.ts +2 -1
- package/src/authToken.ts +0 -1
- package/src/css-variables.ts +51 -17
- package/src/embed/app.spec.ts +62 -3
- package/src/embed/app.ts +10 -1
- package/src/embed/base.spec.ts +1 -2
- package/src/embed/base.ts +1 -4
- package/src/embed/events.spec.ts +88 -0
- package/src/embed/hostEventClient/contracts.ts +74 -2
- package/src/embed/hostEventClient/host-event-client.spec.ts +257 -0
- package/src/embed/hostEventClient/host-event-client.ts +70 -15
- package/src/embed/liveboard.spec.ts +126 -2
- package/src/embed/liveboard.ts +11 -2
- package/src/embed/sage.ts +0 -1
- package/src/embed/search.spec.ts +0 -2
- package/src/embed/ts-embed.ts +43 -3
- package/src/react/index.tsx +76 -72
- package/src/types.ts +739 -31
- package/src/utils/graphql/answerService/answerService.ts +4 -5
- package/src/utils/graphql/preview-service.ts +0 -1
- package/src/utils/processData.ts +0 -5
package/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-beta.1 */
|
|
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
|
|
@@ -1482,22 +1486,45 @@
|
|
|
1482
1486
|
/**
|
|
1483
1487
|
* Emitted when name, status (private or public) or filter values of a
|
|
1484
1488
|
* Personalised view is updated.
|
|
1489
|
+
* This event is deprecated. Use {@link EmbedEvent.UpdatePersonalizedView} instead.
|
|
1485
1490
|
* @returns viewName: string
|
|
1486
1491
|
* @returns viewId: string
|
|
1487
1492
|
* @returns liveboardId: string
|
|
1488
1493
|
* @returns isPublic: boolean
|
|
1489
1494
|
* @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
|
|
1495
|
+
* @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
1490
1496
|
*/
|
|
1491
1497
|
EmbedEvent["UpdatePersonalisedView"] = "updatePersonalisedView";
|
|
1498
|
+
/**
|
|
1499
|
+
* Emitted when name, status (private or public) or filter values of a
|
|
1500
|
+
* Personalized view is updated.
|
|
1501
|
+
* @returns viewName: string
|
|
1502
|
+
* @returns viewId: string
|
|
1503
|
+
* @returns liveboardId: string
|
|
1504
|
+
* @returns isPublic: boolean
|
|
1505
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
1506
|
+
*/
|
|
1507
|
+
EmbedEvent["UpdatePersonalizedView"] = "updatePersonalisedView";
|
|
1492
1508
|
/**
|
|
1493
1509
|
* Emitted when a Personalised view is saved.
|
|
1510
|
+
* This event is deprecated. Use {@link EmbedEvent.SavePersonalizedView} instead.
|
|
1494
1511
|
* @returns viewName: string
|
|
1495
1512
|
* @returns viewId: string
|
|
1496
1513
|
* @returns liveboardId: string
|
|
1497
1514
|
* @returns isPublic: boolean
|
|
1498
1515
|
* @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
|
|
1516
|
+
* @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
1499
1517
|
*/
|
|
1500
1518
|
EmbedEvent["SavePersonalisedView"] = "savePersonalisedView";
|
|
1519
|
+
/**
|
|
1520
|
+
* Emitted when a Personalized view is saved.
|
|
1521
|
+
* @returns viewName: string
|
|
1522
|
+
* @returns viewId: string
|
|
1523
|
+
* @returns liveboardId: string
|
|
1524
|
+
* @returns isPublic: boolean
|
|
1525
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
1526
|
+
*/
|
|
1527
|
+
EmbedEvent["SavePersonalizedView"] = "savePersonalisedView";
|
|
1501
1528
|
/**
|
|
1502
1529
|
* Emitted when a Liveboard is reset.
|
|
1503
1530
|
* @returns viewName: string
|
|
@@ -1509,11 +1536,41 @@
|
|
|
1509
1536
|
EmbedEvent["ResetLiveboard"] = "resetLiveboard";
|
|
1510
1537
|
/**
|
|
1511
1538
|
* Emitted when a PersonalisedView is deleted.
|
|
1539
|
+
* This event is deprecated. Use {@link EmbedEvent.DeletePersonalizedView} instead.
|
|
1512
1540
|
* @returns views: string[]
|
|
1513
1541
|
* @returns liveboardId: string
|
|
1514
1542
|
* @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
|
|
1543
|
+
* @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
1515
1544
|
*/
|
|
1516
1545
|
EmbedEvent["DeletePersonalisedView"] = "deletePersonalisedView";
|
|
1546
|
+
/**
|
|
1547
|
+
* Emitted when a PersonalizedView is deleted.
|
|
1548
|
+
* @returns views: string[]
|
|
1549
|
+
* @returns liveboardId: string
|
|
1550
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
1551
|
+
*/
|
|
1552
|
+
EmbedEvent["DeletePersonalizedView"] = "deletePersonalisedView";
|
|
1553
|
+
/**
|
|
1554
|
+
* Emitted when a user selects a different Personalized View or
|
|
1555
|
+
* resets to the original/default view on a Liveboard.
|
|
1556
|
+
* @example
|
|
1557
|
+
* ```js
|
|
1558
|
+
* liveboardEmbed.on(EmbedEvent.ChangePersonalizedView, (data) => {
|
|
1559
|
+
* console.log(data.viewName); // 'Q4 Revenue' or 'Original View'
|
|
1560
|
+
* console.log(data.viewId); // '2a021a12-...' or null (default)
|
|
1561
|
+
* console.log(data.liveboardId); // 'abc123...'
|
|
1562
|
+
* console.log(data.isPublic); // true | false
|
|
1563
|
+
* })
|
|
1564
|
+
* ```
|
|
1565
|
+
* @returns viewName: string - Name of the selected view,
|
|
1566
|
+
* or 'Original View' when reset to default.
|
|
1567
|
+
* @returns viewId: string | null - GUID of the selected view,
|
|
1568
|
+
* or null when reset to default.
|
|
1569
|
+
* @returns liveboardId: string
|
|
1570
|
+
* @returns isPublic: boolean
|
|
1571
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
1572
|
+
*/
|
|
1573
|
+
EmbedEvent["ChangePersonalizedView"] = "changePersonalisedView";
|
|
1517
1574
|
/**
|
|
1518
1575
|
* Emitted when a user creates a Worksheet.
|
|
1519
1576
|
* @version SDK: 1.27.0 | ThoughtSpot: 9.8.0.cl, 9.8.0.sw
|
|
@@ -1547,7 +1604,8 @@
|
|
|
1547
1604
|
* @param - Includes the following parameters:
|
|
1548
1605
|
* - `payload`: The payload received from the embed related to the Data API call.
|
|
1549
1606
|
* - `responder`: Contains elements that let developers define whether ThoughtSpot
|
|
1550
|
-
* will run or block the search operation, and if blocked, which error message to
|
|
1607
|
+
* will run or block the search operation, and if blocked, which error message to
|
|
1608
|
+
* provide.
|
|
1551
1609
|
* - `execute` - When `execute` returns `true`, the search is run.
|
|
1552
1610
|
* When `execute` returns `false`, the search is not executed.
|
|
1553
1611
|
* - `error` - Developers can customize the user-facing error message when `execute`
|
|
@@ -1981,6 +2039,25 @@
|
|
|
1981
2039
|
* );
|
|
1982
2040
|
* }
|
|
1983
2041
|
* ```
|
|
2042
|
+
*
|
|
2043
|
+
* **Context Parameter (SDK: 1.45.2+)**
|
|
2044
|
+
*
|
|
2045
|
+
* Starting from SDK version 1.45.2 | ThoughtSpot: 26.3.0.cl, you can optionally pass a
|
|
2046
|
+
* `ContextType` as the third parameter to the `trigger` method to specify the context
|
|
2047
|
+
* from which the event is triggered. This helps ThoughtSpot understand the current page
|
|
2048
|
+
* context (Search, Answer, Liveboard, or Spotter) for better event handling.
|
|
2049
|
+
*
|
|
2050
|
+
* @example
|
|
2051
|
+
* ```js
|
|
2052
|
+
* import { HostEvent, ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2053
|
+
*
|
|
2054
|
+
* // Trigger Pin event with Search context
|
|
2055
|
+
* appEmbed.trigger(HostEvent.Pin, {
|
|
2056
|
+
* vizId: "123",
|
|
2057
|
+
* liveboardId: "456"
|
|
2058
|
+
* }, ContextType.Search);
|
|
2059
|
+
* ```
|
|
2060
|
+
*
|
|
1984
2061
|
* @group Events
|
|
1985
2062
|
*/
|
|
1986
2063
|
exports.HostEvent = void 0;
|
|
@@ -2003,6 +2080,16 @@
|
|
|
2003
2080
|
execute: true
|
|
2004
2081
|
});
|
|
2005
2082
|
* ```
|
|
2083
|
+
* @example
|
|
2084
|
+
* ```js
|
|
2085
|
+
* // Trigger search from search context
|
|
2086
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2087
|
+
* appEmbed.trigger(HostEvent.Search, {
|
|
2088
|
+
* searchQuery: "[revenue] by [region]",
|
|
2089
|
+
* dataSources: ["cd252e5c-b552-49a8-821d-3eadaa049cca"],
|
|
2090
|
+
* execute: true
|
|
2091
|
+
* }, ContextType.Search);
|
|
2092
|
+
* ```
|
|
2006
2093
|
*/
|
|
2007
2094
|
HostEvent["Search"] = "search";
|
|
2008
2095
|
/**
|
|
@@ -2053,6 +2140,24 @@
|
|
|
2053
2140
|
* });
|
|
2054
2141
|
* })
|
|
2055
2142
|
* ```
|
|
2143
|
+
* @example
|
|
2144
|
+
* ```js
|
|
2145
|
+
* // Drill down from answer context
|
|
2146
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2147
|
+
* appEmbed.trigger(HostEvent.DrillDown, {
|
|
2148
|
+
* points: { clickedPoint, selectedPoints },
|
|
2149
|
+
* autoDrillDown: true
|
|
2150
|
+
* }, ContextType.Answer);
|
|
2151
|
+
* ```
|
|
2152
|
+
* @example
|
|
2153
|
+
* ```js
|
|
2154
|
+
* // Drill down from search context
|
|
2155
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2156
|
+
* searchEmbed.trigger(HostEvent.DrillDown, {
|
|
2157
|
+
* points: { clickedPoint, selectedPoints },
|
|
2158
|
+
* columnGuid: "column-guid"
|
|
2159
|
+
* }, ContextType.Search);
|
|
2160
|
+
* ```
|
|
2056
2161
|
* @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
|
|
2057
2162
|
*/
|
|
2058
2163
|
HostEvent["DrillDown"] = "triggerDrillDown";
|
|
@@ -2073,6 +2178,13 @@
|
|
|
2073
2178
|
* const url = embed.trigger(HostEvent.GetIframeUrl);
|
|
2074
2179
|
* console.log("iFrameURL",url);
|
|
2075
2180
|
* ```
|
|
2181
|
+
* @example
|
|
2182
|
+
* ```js
|
|
2183
|
+
* // Get iframe URL from specific context
|
|
2184
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2185
|
+
* const url = await appEmbed.trigger(HostEvent.GetIframeUrl, {}, ContextType.Answer);
|
|
2186
|
+
* console.log("iFrameURL", url);
|
|
2187
|
+
* ```
|
|
2076
2188
|
* @version SDK: 1.35.0 | ThoughtSpot: 10.4.0.cl
|
|
2077
2189
|
*/
|
|
2078
2190
|
HostEvent["GetIframeUrl"] = "GetIframeUrl";
|
|
@@ -2086,6 +2198,15 @@
|
|
|
2086
2198
|
* '730496d6-6903-4601-937e-2c691821af3c',
|
|
2087
2199
|
* 'd547ec54-2a37-4516-a222-2b06719af726'])
|
|
2088
2200
|
* ```
|
|
2201
|
+
* @example
|
|
2202
|
+
* ```js
|
|
2203
|
+
* // Set visible vizs from liveboard context
|
|
2204
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2205
|
+
* liveboardEmbed.trigger(HostEvent.SetVisibleVizs, [
|
|
2206
|
+
* '730496d6-6903-4601-937e-2c691821af3c',
|
|
2207
|
+
* 'd547ec54-2a37-4516-a222-2b06719af726'
|
|
2208
|
+
* ], ContextType.Liveboard);
|
|
2209
|
+
* ```
|
|
2089
2210
|
* @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
|
|
2090
2211
|
*/
|
|
2091
2212
|
HostEvent["SetVisibleVizs"] = "SetPinboardVisibleVizs";
|
|
@@ -2098,6 +2219,14 @@
|
|
|
2098
2219
|
* tabId:'730496d6-6903-4601-937e-2c691821af3c'
|
|
2099
2220
|
* })
|
|
2100
2221
|
* ```
|
|
2222
|
+
* @example
|
|
2223
|
+
* ```js
|
|
2224
|
+
* // Set active tab from liveboard context
|
|
2225
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2226
|
+
* liveboardEmbed.trigger(HostEvent.SetActiveTab, {
|
|
2227
|
+
* tabId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
2228
|
+
* }, ContextType.Liveboard);
|
|
2229
|
+
* ```
|
|
2101
2230
|
* @version SDK: 1.24.0 | ThoughtSpot: 9.5.0.cl, 9.5.1-sw
|
|
2102
2231
|
*/
|
|
2103
2232
|
HostEvent["SetActiveTab"] = "SetActiveTab";
|
|
@@ -2131,6 +2260,15 @@
|
|
|
2131
2260
|
* {columnName: "item type",operator: RuntimeFilterOp.EQ,values: ["Jackets"]}
|
|
2132
2261
|
* ])
|
|
2133
2262
|
* ```
|
|
2263
|
+
* @example
|
|
2264
|
+
* ```js
|
|
2265
|
+
* // Update runtime filters from liveboard context
|
|
2266
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2267
|
+
* liveboardEmbed.trigger(HostEvent.UpdateRuntimeFilters, [
|
|
2268
|
+
* {columnName: "region", operator: RuntimeFilterOp.EQ, values: ["west"]},
|
|
2269
|
+
* {columnName: "product", operator: RuntimeFilterOp.IN, values: ["shoes", "boots"]}
|
|
2270
|
+
* ], ContextType.Liveboard);
|
|
2271
|
+
* ```
|
|
2134
2272
|
* @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl, 8.4.1.sw
|
|
2135
2273
|
* @important
|
|
2136
2274
|
*/
|
|
@@ -2164,6 +2302,14 @@
|
|
|
2164
2302
|
* LiveboardEmbed.trigger(HostEvent.OpenFilter,
|
|
2165
2303
|
* { column: {columnId: '<column-GUID>'}})
|
|
2166
2304
|
* ```
|
|
2305
|
+
* @example
|
|
2306
|
+
* ```js
|
|
2307
|
+
* // Open filter from search context
|
|
2308
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2309
|
+
* searchEmbed.trigger(HostEvent.OpenFilter, {
|
|
2310
|
+
* column: { columnId: '<column-GUID>', name: 'region', type: 'ATTRIBUTE', dataType: 'CHAR'}
|
|
2311
|
+
* }, ContextType.Search);
|
|
2312
|
+
* ```
|
|
2167
2313
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
|
|
2168
2314
|
*/
|
|
2169
2315
|
HostEvent["OpenFilter"] = "openFilter";
|
|
@@ -2174,6 +2320,14 @@
|
|
|
2174
2320
|
* ```js
|
|
2175
2321
|
* searchEmbed.trigger(HostEvent.AddColumns, { columnIds: ['<column-GUID>','<column-GUID>'] })
|
|
2176
2322
|
* ```
|
|
2323
|
+
* @example
|
|
2324
|
+
* ```js
|
|
2325
|
+
* // Add columns from search context
|
|
2326
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2327
|
+
* searchEmbed.trigger(HostEvent.AddColumns, {
|
|
2328
|
+
* columnIds: ['col-guid-1', 'col-guid-2']
|
|
2329
|
+
* }, ContextType.Search);
|
|
2330
|
+
* ```
|
|
2177
2331
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
|
|
2178
2332
|
*/
|
|
2179
2333
|
HostEvent["AddColumns"] = "addColumns";
|
|
@@ -2184,6 +2338,14 @@
|
|
|
2184
2338
|
* ```js
|
|
2185
2339
|
* searchEmbed.trigger(HostEvent.RemoveColumn, { columnId: '<column-Guid>' })
|
|
2186
2340
|
* ```
|
|
2341
|
+
* @example
|
|
2342
|
+
* ```js
|
|
2343
|
+
* // Remove column from search context
|
|
2344
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2345
|
+
* searchEmbed.trigger(HostEvent.RemoveColumn, {
|
|
2346
|
+
* columnId: 'column-guid'
|
|
2347
|
+
* }, ContextType.Search);
|
|
2348
|
+
* ```
|
|
2187
2349
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
|
|
2188
2350
|
*/
|
|
2189
2351
|
HostEvent["RemoveColumn"] = "removeColumn";
|
|
@@ -2270,6 +2432,37 @@
|
|
|
2270
2432
|
*
|
|
2271
2433
|
* spotterEmbed.trigger(HostEvent.Pin, { vizId: latestSpotterVizId });
|
|
2272
2434
|
* ```
|
|
2435
|
+
* @example
|
|
2436
|
+
* ```js
|
|
2437
|
+
* // Using context parameter to specify the context type (SDK: 1.45.2+)
|
|
2438
|
+
* // Pin from a search answer context
|
|
2439
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2440
|
+
* appEmbed.trigger(HostEvent.Pin, {
|
|
2441
|
+
* vizId: "123",
|
|
2442
|
+
* newVizName: "Sales by region",
|
|
2443
|
+
* liveboardId: "456"
|
|
2444
|
+
* }, ContextType.Search);
|
|
2445
|
+
* ```
|
|
2446
|
+
* @example
|
|
2447
|
+
* ```js
|
|
2448
|
+
* // Pin from an answer context (explore modal/page) (SDK: 1.45.2+)
|
|
2449
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2450
|
+
* appEmbed.trigger(HostEvent.Pin, {
|
|
2451
|
+
* vizId: "789",
|
|
2452
|
+
* newVizName: "Revenue trends",
|
|
2453
|
+
* liveboardId: "456"
|
|
2454
|
+
* }, ContextType.Answer);
|
|
2455
|
+
* ```
|
|
2456
|
+
* @example
|
|
2457
|
+
* ```js
|
|
2458
|
+
* // Pin from a spotter context (SDK: 1.45.2+)
|
|
2459
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2460
|
+
* appEmbed.trigger(HostEvent.Pin, {
|
|
2461
|
+
* vizId: latestSpotterVizId,
|
|
2462
|
+
* newVizName: "AI-generated insights",
|
|
2463
|
+
* liveboardId: "456"
|
|
2464
|
+
* }, ContextType.Spotter);
|
|
2465
|
+
* ```
|
|
2273
2466
|
*
|
|
2274
2467
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2275
2468
|
*/
|
|
@@ -2280,6 +2473,12 @@
|
|
|
2280
2473
|
* @example
|
|
2281
2474
|
* ```js
|
|
2282
2475
|
* liveboardEmbed.trigger(HostEvent.LiveboardInfo)
|
|
2476
|
+
*```
|
|
2477
|
+
* @example
|
|
2478
|
+
* ```js
|
|
2479
|
+
* // Show liveboard info from liveboard context
|
|
2480
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2481
|
+
* liveboardEmbed.trigger(HostEvent.LiveboardInfo, {}, ContextType.Liveboard);
|
|
2283
2482
|
* ```
|
|
2284
2483
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2285
2484
|
*/
|
|
@@ -2290,6 +2489,12 @@
|
|
|
2290
2489
|
* ```js
|
|
2291
2490
|
* liveboardEmbed.trigger(HostEvent.Schedule)
|
|
2292
2491
|
* ```
|
|
2492
|
+
* @example
|
|
2493
|
+
* ```js
|
|
2494
|
+
* // Schedule from liveboard context
|
|
2495
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2496
|
+
* liveboardEmbed.trigger(HostEvent.Schedule, {}, ContextType.Liveboard);
|
|
2497
|
+
* ```
|
|
2293
2498
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2294
2499
|
*/
|
|
2295
2500
|
HostEvent["Schedule"] = "subscription";
|
|
@@ -2299,6 +2504,12 @@
|
|
|
2299
2504
|
* ```js
|
|
2300
2505
|
* liveboardEmbed.trigger(HostEvent.ScheduleList)
|
|
2301
2506
|
* ```
|
|
2507
|
+
* @example
|
|
2508
|
+
* ```js
|
|
2509
|
+
* // Manage schedules from liveboard context
|
|
2510
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2511
|
+
* liveboardEmbed.trigger(HostEvent.ScheduleList, {}, ContextType.Liveboard);
|
|
2512
|
+
* ```
|
|
2302
2513
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2303
2514
|
*/
|
|
2304
2515
|
HostEvent["SchedulesList"] = "schedule-list";
|
|
@@ -2309,6 +2520,18 @@
|
|
|
2309
2520
|
* ```js
|
|
2310
2521
|
* liveboardEmbed.trigger(HostEvent.ExportTML)
|
|
2311
2522
|
* ```
|
|
2523
|
+
* @example
|
|
2524
|
+
* ```js
|
|
2525
|
+
* // Export TML from liveboard context
|
|
2526
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2527
|
+
* liveboardEmbed.trigger(HostEvent.ExportTML, {}, ContextType.Liveboard);
|
|
2528
|
+
* ```
|
|
2529
|
+
* @example
|
|
2530
|
+
* ```js
|
|
2531
|
+
* // Export TML from search-answer context
|
|
2532
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2533
|
+
* appEmbed.trigger(HostEvent.ExportTML, {}, ContextType.Search);
|
|
2534
|
+
* ```
|
|
2312
2535
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2313
2536
|
*/
|
|
2314
2537
|
HostEvent["ExportTML"] = "exportTSL";
|
|
@@ -2319,6 +2542,18 @@
|
|
|
2319
2542
|
* ```js
|
|
2320
2543
|
* liveboardEmbed.trigger(HostEvent.EditTML)
|
|
2321
2544
|
* ```
|
|
2545
|
+
* @example
|
|
2546
|
+
* ```js
|
|
2547
|
+
* // Edit TML from liveboard context
|
|
2548
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2549
|
+
* liveboardEmbed.trigger(HostEvent.EditTML, {}, ContextType.Liveboard);
|
|
2550
|
+
* ```
|
|
2551
|
+
* @example
|
|
2552
|
+
* ```js
|
|
2553
|
+
* // Edit TML from search-answer context
|
|
2554
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2555
|
+
* appEmbed.trigger(HostEvent.EditTML, {}, ContextType.Search);
|
|
2556
|
+
* ```
|
|
2322
2557
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2323
2558
|
*/
|
|
2324
2559
|
HostEvent["EditTML"] = "editTSL";
|
|
@@ -2328,6 +2563,12 @@
|
|
|
2328
2563
|
* ```js
|
|
2329
2564
|
* liveboardEmbed.trigger(HostEvent.UpdateTML)
|
|
2330
2565
|
* ```
|
|
2566
|
+
* @example
|
|
2567
|
+
* ```js
|
|
2568
|
+
* // Update TML from liveboard context
|
|
2569
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2570
|
+
* liveboardEmbed.trigger(HostEvent.UpdateTML, {}, ContextType.Liveboard);
|
|
2571
|
+
* ```
|
|
2331
2572
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2332
2573
|
*/
|
|
2333
2574
|
HostEvent["UpdateTML"] = "updateTSL";
|
|
@@ -2354,6 +2595,18 @@
|
|
|
2354
2595
|
*
|
|
2355
2596
|
* spotterEmbed.trigger(HostEvent.DownloadAsPdf, { vizId: latestSpotterVizId });
|
|
2356
2597
|
* ```
|
|
2598
|
+
* @example
|
|
2599
|
+
* ```js
|
|
2600
|
+
* // Download as PDF from search-answer context
|
|
2601
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2602
|
+
* appEmbed.trigger(HostEvent.DownloadAsPdf, {}, ContextType.Search);
|
|
2603
|
+
* ```
|
|
2604
|
+
* @example
|
|
2605
|
+
* ```js
|
|
2606
|
+
* // Download as PDF from liveboard context
|
|
2607
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2608
|
+
* liveboardEmbed.trigger(HostEvent.DownloadAsPdf, {}, ContextType.Liveboard);
|
|
2609
|
+
* ```
|
|
2357
2610
|
*
|
|
2358
2611
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2359
2612
|
*/
|
|
@@ -2398,6 +2651,18 @@
|
|
|
2398
2651
|
*
|
|
2399
2652
|
* spotterEmbed.trigger(HostEvent.MakeACopy, { vizId: latestSpotterVizId });
|
|
2400
2653
|
* ```
|
|
2654
|
+
* @example
|
|
2655
|
+
* ```js
|
|
2656
|
+
* // Make a copy from answer context
|
|
2657
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2658
|
+
* appEmbed.trigger(HostEvent.MakeACopy, {}, ContextType.Answer);
|
|
2659
|
+
* ```
|
|
2660
|
+
* @example
|
|
2661
|
+
* ```js
|
|
2662
|
+
* // Make a copy from search context
|
|
2663
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2664
|
+
* appEmbed.trigger(HostEvent.MakeACopy, {}, ContextType.Search);
|
|
2665
|
+
* ```
|
|
2401
2666
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2402
2667
|
*/
|
|
2403
2668
|
HostEvent["MakeACopy"] = "makeACopy";
|
|
@@ -2422,6 +2687,14 @@
|
|
|
2422
2687
|
* ```js
|
|
2423
2688
|
* liveboardEmbed.trigger(HostEvent.Explore, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
2424
2689
|
* ```
|
|
2690
|
+
* @example
|
|
2691
|
+
* ```js
|
|
2692
|
+
* // Explore from liveboard context
|
|
2693
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2694
|
+
* liveboardEmbed.trigger(HostEvent.Explore, {
|
|
2695
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
2696
|
+
* }, ContextType.Liveboard);
|
|
2697
|
+
* ```
|
|
2425
2698
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2426
2699
|
*/
|
|
2427
2700
|
HostEvent["Explore"] = "explore";
|
|
@@ -2439,6 +2712,20 @@
|
|
|
2439
2712
|
* ```js
|
|
2440
2713
|
* searchEmbed.trigger(HostEvent.CreateMonitor)
|
|
2441
2714
|
* ```
|
|
2715
|
+
* @example
|
|
2716
|
+
* ```js
|
|
2717
|
+
* // Create monitor from answer context
|
|
2718
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2719
|
+
* appEmbed.trigger(HostEvent.CreateMonitor, {}, ContextType.Answer);
|
|
2720
|
+
* ```
|
|
2721
|
+
* @example
|
|
2722
|
+
* ```js
|
|
2723
|
+
* // Create monitor from liveboard context
|
|
2724
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2725
|
+
* liveboardEmbed.trigger(HostEvent.CreateMonitor, {
|
|
2726
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
2727
|
+
* }, ContextType.Liveboard);
|
|
2728
|
+
* ```
|
|
2442
2729
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2443
2730
|
*/
|
|
2444
2731
|
HostEvent["CreateMonitor"] = "createMonitor";
|
|
@@ -2460,6 +2747,20 @@
|
|
|
2460
2747
|
* ```js
|
|
2461
2748
|
* vizEmbed.trigger(HostEvent.ManageMonitor)
|
|
2462
2749
|
* ```
|
|
2750
|
+
* @example
|
|
2751
|
+
* ```js
|
|
2752
|
+
* // Manage monitor from answer context
|
|
2753
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2754
|
+
* appEmbed.trigger(HostEvent.ManageMonitor, {}, ContextType.Answer);
|
|
2755
|
+
* ```
|
|
2756
|
+
* @example
|
|
2757
|
+
* ```js
|
|
2758
|
+
* // Manage monitor from liveboard context
|
|
2759
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2760
|
+
* liveboardEmbed.trigger(HostEvent.ManageMonitor, {
|
|
2761
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
2762
|
+
* }, ContextType.Liveboard);
|
|
2763
|
+
* ```
|
|
2463
2764
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2464
2765
|
*/
|
|
2465
2766
|
HostEvent["ManageMonitor"] = "manageMonitor";
|
|
@@ -2485,6 +2786,26 @@
|
|
|
2485
2786
|
* ```js
|
|
2486
2787
|
* spotterEmbed.trigger(HostEvent.Edit);
|
|
2487
2788
|
* ```
|
|
2789
|
+
* @example
|
|
2790
|
+
* ```js
|
|
2791
|
+
* // Using context parameter to edit liveboard context
|
|
2792
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2793
|
+
* liveboardEmbed.trigger(HostEvent.Edit, {}, ContextType.Liveboard);
|
|
2794
|
+
* ```
|
|
2795
|
+
* @example
|
|
2796
|
+
* ```js
|
|
2797
|
+
* // Edit from search context
|
|
2798
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2799
|
+
* appEmbed.trigger(HostEvent.Edit, {}, ContextType.Search);
|
|
2800
|
+
* ```
|
|
2801
|
+
* * @example
|
|
2802
|
+
* ```js
|
|
2803
|
+
* // Edit from spotter context
|
|
2804
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2805
|
+
* appEmbed.trigger(HostEvent.Edit, {
|
|
2806
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
2807
|
+
* }, ContextType.Spotter);
|
|
2808
|
+
* ```
|
|
2488
2809
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2489
2810
|
*/
|
|
2490
2811
|
HostEvent["Edit"] = "edit";
|
|
@@ -2502,6 +2823,20 @@
|
|
|
2502
2823
|
* ```js
|
|
2503
2824
|
* vizEmbed.trigger(HostEvent.CopyLink)
|
|
2504
2825
|
* ```
|
|
2826
|
+
* @example
|
|
2827
|
+
* ```js
|
|
2828
|
+
* // Copy link from liveboard context
|
|
2829
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2830
|
+
* liveboardEmbed.trigger(HostEvent.CopyLink, {}, ContextType.Liveboard);
|
|
2831
|
+
* ```
|
|
2832
|
+
* @example
|
|
2833
|
+
* ```js
|
|
2834
|
+
* // Copy link from liveboard visualization context
|
|
2835
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2836
|
+
* liveboardEmbed.trigger(HostEvent.CopyLink, {
|
|
2837
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
2838
|
+
* }, ContextType.Liveboard);
|
|
2839
|
+
* ```
|
|
2505
2840
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2506
2841
|
*/
|
|
2507
2842
|
HostEvent["CopyLink"] = "embedDocument";
|
|
@@ -2519,6 +2854,20 @@
|
|
|
2519
2854
|
* ```js
|
|
2520
2855
|
* vizEmbed.trigger(HostEvent.Present)
|
|
2521
2856
|
* ```
|
|
2857
|
+
* @example
|
|
2858
|
+
* ```js
|
|
2859
|
+
* // Present from liveboard visualization context
|
|
2860
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2861
|
+
* liveboardEmbed.trigger(HostEvent.Present, {
|
|
2862
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
2863
|
+
* }, ContextType.Liveboard);
|
|
2864
|
+
* ```
|
|
2865
|
+
* @example
|
|
2866
|
+
* ```js
|
|
2867
|
+
* // Present from liveboard context
|
|
2868
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2869
|
+
* liveboardEmbed.trigger(HostEvent.Present, {}, ContextType.Liveboard);
|
|
2870
|
+
* ```
|
|
2522
2871
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2523
2872
|
*/
|
|
2524
2873
|
HostEvent["Present"] = "present";
|
|
@@ -2547,6 +2896,22 @@
|
|
|
2547
2896
|
* tml.answer.search_query // TML representation of the search query
|
|
2548
2897
|
* );
|
|
2549
2898
|
* })
|
|
2899
|
+
* ```
|
|
2900
|
+
* @example
|
|
2901
|
+
* ```js
|
|
2902
|
+
* // Get TML from search context
|
|
2903
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2904
|
+
* appEmbed.trigger(HostEvent.GetTML, {}, ContextType.Search).then((tml) => {
|
|
2905
|
+
* console.log(tml.answer.search_query);
|
|
2906
|
+
* });
|
|
2907
|
+
* ```
|
|
2908
|
+
* @example
|
|
2909
|
+
* ```js
|
|
2910
|
+
* // Get TML from search-answer context
|
|
2911
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2912
|
+
* appEmbed.trigger(HostEvent.GetTML, {}, ContextType.Search).then((tml) => {
|
|
2913
|
+
* console.log(tml.answer);
|
|
2914
|
+
* });
|
|
2550
2915
|
* ```
|
|
2551
2916
|
* @version SDK: 1.18.0 | ThoughtSpot: 8.10.0.cl, 9.0.1.sw
|
|
2552
2917
|
* @important
|
|
@@ -2568,6 +2933,20 @@
|
|
|
2568
2933
|
* ```js
|
|
2569
2934
|
* searchEmbed.trigger(HostEvent.ShowUnderlyingData)
|
|
2570
2935
|
* ```
|
|
2936
|
+
* @example
|
|
2937
|
+
* ```js
|
|
2938
|
+
* // Show underlying data from liveboard visualization context
|
|
2939
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2940
|
+
* appEmbed.trigger(HostEvent.ShowUnderlyingData, {
|
|
2941
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
2942
|
+
* }, ContextType.Liveboard);
|
|
2943
|
+
* ```
|
|
2944
|
+
* @example
|
|
2945
|
+
* ```js
|
|
2946
|
+
* // Show underlying data from search context
|
|
2947
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2948
|
+
* appEmbed.trigger(HostEvent.ShowUnderlyingData, {}, ContextType.Search);
|
|
2949
|
+
* ```
|
|
2571
2950
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
2572
2951
|
*/
|
|
2573
2952
|
HostEvent["ShowUnderlyingData"] = "showUnderlyingData";
|
|
@@ -2585,6 +2964,18 @@
|
|
|
2585
2964
|
* ```js
|
|
2586
2965
|
* searchEmbed.trigger(HostEvent.Delete)
|
|
2587
2966
|
* ```
|
|
2967
|
+
* @example
|
|
2968
|
+
* ```js
|
|
2969
|
+
* // Delete from liveboard context
|
|
2970
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2971
|
+
* liveboardEmbed.trigger(HostEvent.Delete, {}, ContextType.Liveboard);
|
|
2972
|
+
* ```
|
|
2973
|
+
* @example
|
|
2974
|
+
* ```js
|
|
2975
|
+
* // Delete from search context
|
|
2976
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2977
|
+
* appEmbed.trigger(HostEvent.Delete, {}, ContextType.Search);
|
|
2978
|
+
* ```
|
|
2588
2979
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
2589
2980
|
*/
|
|
2590
2981
|
HostEvent["Delete"] = "onDeleteAnswer";
|
|
@@ -2605,6 +2996,20 @@
|
|
|
2605
2996
|
* ```js
|
|
2606
2997
|
* searchEmbed.trigger(HostEvent.SpotIQAnalyze)
|
|
2607
2998
|
* ```
|
|
2999
|
+
* @example
|
|
3000
|
+
* ```js
|
|
3001
|
+
* // SpotIQ analyze from search-answer context
|
|
3002
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3003
|
+
* appEmbed.trigger(HostEvent.SpotIQAnalyze, { vizId: '730496d6-6903-4601-937e-2c691821af3c' }, ContextType.Search);
|
|
3004
|
+
* ```
|
|
3005
|
+
* @example
|
|
3006
|
+
* ```js
|
|
3007
|
+
* // SpotIQ analyze from search context
|
|
3008
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3009
|
+
* liveboardEmbed.trigger(HostEvent.SpotIQAnalyze, {
|
|
3010
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
3011
|
+
* }, ContextType.Liveboard);
|
|
3012
|
+
* ```
|
|
2608
3013
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
2609
3014
|
*/
|
|
2610
3015
|
HostEvent["SpotIQAnalyze"] = "spotIQAnalyze";
|
|
@@ -2656,9 +3061,16 @@
|
|
|
2656
3061
|
*
|
|
2657
3062
|
* spotterEmbed.trigger(HostEvent.DownloadAsPng, { vizId: latestSpotterVizId });
|
|
2658
3063
|
* ```
|
|
3064
|
+
* @example
|
|
3065
|
+
* ```js
|
|
3066
|
+
* // Download as PNG from search-answer context
|
|
3067
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3068
|
+
* appEmbed.trigger(HostEvent.DownloadAsPng, {}, ContextType.Search);
|
|
3069
|
+
* ```
|
|
2659
3070
|
*
|
|
2660
3071
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.1.sw
|
|
2661
3072
|
*/
|
|
3073
|
+
// eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values
|
|
2662
3074
|
HostEvent["DownloadAsPng"] = "downloadAsPng";
|
|
2663
3075
|
/**
|
|
2664
3076
|
* Trigger the **Download** > **CSV** action on tables in
|
|
@@ -2684,6 +3096,18 @@
|
|
|
2684
3096
|
*
|
|
2685
3097
|
* spotterEmbed.trigger(HostEvent.DownloadAsCsv, { vizId: latestSpotterVizId });
|
|
2686
3098
|
* ```
|
|
3099
|
+
* @example
|
|
3100
|
+
* ```js
|
|
3101
|
+
* // Download as CSV from search-answer context
|
|
3102
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3103
|
+
* appEmbed.trigger(HostEvent.DownloadAsCsv, {}, ContextType.Search);
|
|
3104
|
+
* ```
|
|
3105
|
+
* @example
|
|
3106
|
+
* ```js
|
|
3107
|
+
* // Download as CSV from search context
|
|
3108
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3109
|
+
* searchEmbed.trigger(HostEvent.DownloadAsCsv, {}, ContextType.Search);
|
|
3110
|
+
* ```
|
|
2687
3111
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
2688
3112
|
*/
|
|
2689
3113
|
HostEvent["DownloadAsCsv"] = "downloadAsCSV";
|
|
@@ -2711,6 +3135,18 @@
|
|
|
2711
3135
|
*
|
|
2712
3136
|
* spotterEmbed.trigger(HostEvent.DownloadAsXlsx, { vizId: latestSpotterVizId });
|
|
2713
3137
|
* ```
|
|
3138
|
+
* @example
|
|
3139
|
+
* ```js
|
|
3140
|
+
* // Download as XLSX from answer context
|
|
3141
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3142
|
+
* appEmbed.trigger(HostEvent.DownloadAsXlsx, {}, ContextType.Answer);
|
|
3143
|
+
* ```
|
|
3144
|
+
* @example
|
|
3145
|
+
* ```js
|
|
3146
|
+
* // Download as XLSX from search context
|
|
3147
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3148
|
+
* searchEmbed.trigger(HostEvent.DownloadAsXlsx, {}, ContextType.Search);
|
|
3149
|
+
* ```
|
|
2714
3150
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
2715
3151
|
*/
|
|
2716
3152
|
HostEvent["DownloadAsXlsx"] = "downloadAsXLSX";
|
|
@@ -2724,6 +3160,18 @@
|
|
|
2724
3160
|
* ```js
|
|
2725
3161
|
* searchEmbed.trigger(HostEvent.Share)
|
|
2726
3162
|
* ```
|
|
3163
|
+
* @example
|
|
3164
|
+
* ```js
|
|
3165
|
+
* // Share from Liveboard context
|
|
3166
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3167
|
+
* liveboardEmbed.trigger(HostEvent.Share, {}, ContextType.Liveboard);
|
|
3168
|
+
* ```
|
|
3169
|
+
* @example
|
|
3170
|
+
* ```js
|
|
3171
|
+
* // Share from search-answer context
|
|
3172
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3173
|
+
* appEmbed.trigger(HostEvent.Share, {}, ContextType.Search);
|
|
3174
|
+
* ```
|
|
2727
3175
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
2728
3176
|
*/
|
|
2729
3177
|
HostEvent["Share"] = "share";
|
|
@@ -2763,6 +3211,18 @@
|
|
|
2763
3211
|
*
|
|
2764
3212
|
* spotterEmbed.trigger(HostEvent.Save, { vizId: latestSpotterVizId });
|
|
2765
3213
|
* ```
|
|
3214
|
+
* @example
|
|
3215
|
+
* ```js
|
|
3216
|
+
* // Save from answer context
|
|
3217
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3218
|
+
* appEmbed.trigger(HostEvent.Save, {}, ContextType.Answer);
|
|
3219
|
+
* ```
|
|
3220
|
+
* @example
|
|
3221
|
+
* ```js
|
|
3222
|
+
* // Save from search context
|
|
3223
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3224
|
+
* searchEmbed.trigger(HostEvent.Save, {}, ContextType.Search);
|
|
3225
|
+
* ```
|
|
2766
3226
|
*
|
|
2767
3227
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
2768
3228
|
*/
|
|
@@ -2779,6 +3239,20 @@
|
|
|
2779
3239
|
* ```js
|
|
2780
3240
|
* vizEmbed.trigger(HostEvent.SyncToSheets)
|
|
2781
3241
|
* ```
|
|
3242
|
+
* @example
|
|
3243
|
+
* ```js
|
|
3244
|
+
* // Sync to sheets from answer context
|
|
3245
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3246
|
+
* appEmbed.trigger(HostEvent.SyncToSheets, {}, ContextType.Answer);
|
|
3247
|
+
* ```
|
|
3248
|
+
* @example
|
|
3249
|
+
* ```js
|
|
3250
|
+
* // Sync to sheets from liveboard context
|
|
3251
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3252
|
+
* liveboardEmbed.trigger(HostEvent.SyncToSheets, {
|
|
3253
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
3254
|
+
* }, ContextType.Liveboard);
|
|
3255
|
+
* ```
|
|
2782
3256
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
2783
3257
|
*/
|
|
2784
3258
|
HostEvent["SyncToSheets"] = "sync-to-sheets";
|
|
@@ -2795,6 +3269,20 @@
|
|
|
2795
3269
|
* ```js
|
|
2796
3270
|
* vizEmbed.trigger(HostEvent.SyncToOtherApps)
|
|
2797
3271
|
* ```
|
|
3272
|
+
* @example
|
|
3273
|
+
* ```js
|
|
3274
|
+
* // Sync to other apps from answer context
|
|
3275
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3276
|
+
* appEmbed.trigger(HostEvent.SyncToOtherApps, {}, ContextType.Answer);
|
|
3277
|
+
* ```
|
|
3278
|
+
* @example
|
|
3279
|
+
* ```js
|
|
3280
|
+
* // Sync to other apps from liveboard context
|
|
3281
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3282
|
+
* liveboardEmbed.trigger(HostEvent.SyncToOtherApps, {
|
|
3283
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
3284
|
+
* }, ContextType.Liveboard);
|
|
3285
|
+
* ```
|
|
2798
3286
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
2799
3287
|
*/
|
|
2800
3288
|
HostEvent["SyncToOtherApps"] = "sync-to-other-apps";
|
|
@@ -2811,6 +3299,20 @@
|
|
|
2811
3299
|
* ```js
|
|
2812
3300
|
* vizEmbed.trigger(HostEvent.ManagePipelines)
|
|
2813
3301
|
* ```
|
|
3302
|
+
* @example
|
|
3303
|
+
* ```js
|
|
3304
|
+
* // Manage pipelines from answer context
|
|
3305
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3306
|
+
* appEmbed.trigger(HostEvent.ManagePipelines, {}, ContextType.Answer);
|
|
3307
|
+
* ```
|
|
3308
|
+
* @example
|
|
3309
|
+
* ```js
|
|
3310
|
+
* // Manage pipelines from liveboard context
|
|
3311
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3312
|
+
* liveboardEmbed.trigger(HostEvent.ManagePipelines, {
|
|
3313
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
3314
|
+
* }, ContextType.Liveboard);
|
|
3315
|
+
* ```
|
|
2814
3316
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
2815
3317
|
*/
|
|
2816
3318
|
HostEvent["ManagePipelines"] = "manage-pipeline";
|
|
@@ -2823,6 +3325,12 @@
|
|
|
2823
3325
|
* ```js
|
|
2824
3326
|
* appEmbed.trigger(HostEvent.ResetSearch)
|
|
2825
3327
|
* ```
|
|
3328
|
+
* @example
|
|
3329
|
+
* ```js
|
|
3330
|
+
* // Reset search from search context
|
|
3331
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3332
|
+
* searchEmbed.trigger(HostEvent.ResetSearch, {}, ContextType.Search);
|
|
3333
|
+
* ```
|
|
2826
3334
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.0.1.sw
|
|
2827
3335
|
*/
|
|
2828
3336
|
HostEvent["ResetSearch"] = "resetSearch";
|
|
@@ -2834,6 +3342,13 @@
|
|
|
2834
3342
|
* const data = await liveboardEmbed.trigger(HostEvent.GetFilters);
|
|
2835
3343
|
* console.log('data', data);
|
|
2836
3344
|
* ```
|
|
3345
|
+
* @example
|
|
3346
|
+
* ```js
|
|
3347
|
+
* // Get filters from liveboard context
|
|
3348
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3349
|
+
* const data = await liveboardEmbed.trigger(HostEvent.GetFilters, {}, ContextType.Liveboard);
|
|
3350
|
+
* console.log('filters', data);
|
|
3351
|
+
* ```
|
|
2837
3352
|
* @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
|
|
2838
3353
|
*/
|
|
2839
3354
|
HostEvent["GetFilters"] = "getFilters";
|
|
@@ -2841,7 +3356,8 @@
|
|
|
2841
3356
|
* Update one or several filters applied on a Liveboard.
|
|
2842
3357
|
* @param - Includes the following keys:
|
|
2843
3358
|
* - `filter`: A single filter object containing column name, filter operator, and
|
|
2844
|
-
* values.
|
|
3359
|
+
* values.
|
|
3360
|
+
* - `filters`: Multiple filter objects with column name, filter operator,
|
|
2845
3361
|
* and values for each.
|
|
2846
3362
|
*
|
|
2847
3363
|
* Each filter object must include the following attributes:
|
|
@@ -2924,6 +3440,18 @@
|
|
|
2924
3440
|
* }]
|
|
2925
3441
|
* });
|
|
2926
3442
|
* ```
|
|
3443
|
+
* @example
|
|
3444
|
+
* ```js
|
|
3445
|
+
* // Update filters from liveboard context
|
|
3446
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3447
|
+
* liveboardEmbed.trigger(HostEvent.UpdateFilters, {
|
|
3448
|
+
* filter: {
|
|
3449
|
+
* column: "item type",
|
|
3450
|
+
* oper: "IN",
|
|
3451
|
+
* values: ["shoes", "boots"]
|
|
3452
|
+
* }
|
|
3453
|
+
* }, ContextType.Liveboard);
|
|
3454
|
+
* ```
|
|
2927
3455
|
* @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
|
|
2928
3456
|
*/
|
|
2929
3457
|
HostEvent["UpdateFilters"] = "updateFilters";
|
|
@@ -2937,6 +3465,14 @@
|
|
|
2937
3465
|
* );
|
|
2938
3466
|
* })
|
|
2939
3467
|
* ```
|
|
3468
|
+
* @example
|
|
3469
|
+
* ```js
|
|
3470
|
+
* // Get tabs from liveboard context
|
|
3471
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3472
|
+
* liveboardEmbed.trigger(HostEvent.GetTabs, {}, ContextType.Liveboard).then((tabDetails) => {
|
|
3473
|
+
* console.log('tabs', tabDetails);
|
|
3474
|
+
* });
|
|
3475
|
+
* ```
|
|
2940
3476
|
* @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl
|
|
2941
3477
|
*/
|
|
2942
3478
|
HostEvent["GetTabs"] = "getTabs";
|
|
@@ -2950,6 +3486,15 @@
|
|
|
2950
3486
|
* '430496d6-6903-4601-937e-2c691821af3c',
|
|
2951
3487
|
* 'f547ec54-2a37-4516-a222-2b06719af726'])
|
|
2952
3488
|
* ```
|
|
3489
|
+
* @example
|
|
3490
|
+
* ```js
|
|
3491
|
+
* // Set visible tabs from liveboard context
|
|
3492
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3493
|
+
* liveboardEmbed.trigger(HostEvent.SetVisibleTabs, [
|
|
3494
|
+
* '430496d6-6903-4601-937e-2c691821af3c',
|
|
3495
|
+
* 'f547ec54-2a37-4516-a222-2b06719af726'
|
|
3496
|
+
* ], ContextType.Liveboard);
|
|
3497
|
+
* ```
|
|
2953
3498
|
* @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
|
|
2954
3499
|
*/
|
|
2955
3500
|
HostEvent["SetVisibleTabs"] = "SetPinboardVisibleTabs";
|
|
@@ -2963,6 +3508,15 @@
|
|
|
2963
3508
|
* '630496d6-6903-4601-937e-2c691821af3c',
|
|
2964
3509
|
* 'i547ec54-2a37-4516-a222-2b06719af726'])
|
|
2965
3510
|
* ```
|
|
3511
|
+
* @example
|
|
3512
|
+
* ```js
|
|
3513
|
+
* // Set hidden tabs from liveboard context
|
|
3514
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3515
|
+
* liveboardEmbed.trigger(HostEvent.SetHiddenTabs, [
|
|
3516
|
+
* '630496d6-6903-4601-937e-2c691821af3c',
|
|
3517
|
+
* 'i547ec54-2a37-4516-a222-2b06719af726'
|
|
3518
|
+
* ], ContextType.Liveboard);
|
|
3519
|
+
* ```
|
|
2966
3520
|
* @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
|
|
2967
3521
|
*/
|
|
2968
3522
|
HostEvent["SetHiddenTabs"] = "SetPinboardHiddenTabs";
|
|
@@ -3039,13 +3593,24 @@
|
|
|
3039
3593
|
HostEvent["UpdateCrossFilter"] = "UpdateCrossFilter";
|
|
3040
3594
|
/**
|
|
3041
3595
|
* Trigger reset action for a personalized Liveboard view.
|
|
3596
|
+
* This event is deprecated. Use {@link HostEvent.ResetLiveboardPersonalizedView} instead.
|
|
3042
3597
|
* @example
|
|
3043
3598
|
* ```js
|
|
3044
3599
|
* liveboardEmbed.trigger(HostEvent.ResetLiveboardPersonalisedView);
|
|
3045
3600
|
* ```
|
|
3046
3601
|
* @version SDK: 1.29.0 | ThoughtSpot Cloud: 10.1.0.cl, 10.1.0.sw
|
|
3602
|
+
* @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
3047
3603
|
*/
|
|
3048
3604
|
HostEvent["ResetLiveboardPersonalisedView"] = "ResetLiveboardPersonalisedView";
|
|
3605
|
+
/**
|
|
3606
|
+
* Trigger reset action for a personalized Liveboard view.
|
|
3607
|
+
* @example
|
|
3608
|
+
* ```js
|
|
3609
|
+
* liveboardEmbed.trigger(HostEvent.ResetLiveboardPersonalizedView);
|
|
3610
|
+
* ```
|
|
3611
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
3612
|
+
*/
|
|
3613
|
+
HostEvent["ResetLiveboardPersonalizedView"] = "ResetLiveboardPersonalisedView";
|
|
3049
3614
|
/**
|
|
3050
3615
|
* Triggers an action to update Parameter values on embedded
|
|
3051
3616
|
* Answers, Liveboard, and Spotter answer in Edit mode.
|
|
@@ -3062,6 +3627,16 @@
|
|
|
3062
3627
|
* isVisibleToUser: false
|
|
3063
3628
|
* }])
|
|
3064
3629
|
* ```
|
|
3630
|
+
* @example
|
|
3631
|
+
* ```js
|
|
3632
|
+
* // Update parameters from liveboard context
|
|
3633
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3634
|
+
* liveboardEmbed.trigger(HostEvent.UpdateParameters, [{
|
|
3635
|
+
* name: "Region Param",
|
|
3636
|
+
* value: "West",
|
|
3637
|
+
* isVisibleToUser: true
|
|
3638
|
+
* }], ContextType.Liveboard);
|
|
3639
|
+
* ```
|
|
3065
3640
|
* @version SDK: 1.29.0 | ThoughtSpot: 10.1.0.cl, 10.1.0.sw
|
|
3066
3641
|
*/
|
|
3067
3642
|
HostEvent["UpdateParameters"] = "UpdateParameters";
|
|
@@ -3081,18 +3656,77 @@
|
|
|
3081
3656
|
* });
|
|
3082
3657
|
*
|
|
3083
3658
|
* spotterEmbed.trigger(HostEvent.GetParameters, { vizId: latestSpotterVizId });
|
|
3659
|
+
*```
|
|
3660
|
+
* @example
|
|
3661
|
+
* ```js
|
|
3662
|
+
* // Get parameters from liveboard context
|
|
3663
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3664
|
+
* liveboardEmbed.trigger(HostEvent.GetParameters, {}, ContextType.Liveboard).then((parameters) => {
|
|
3665
|
+
* console.log('parameters', parameters);
|
|
3666
|
+
* });
|
|
3084
3667
|
* ```
|
|
3085
3668
|
* @version SDK: 1.29.0 | ThoughtSpot: 10.1.0.cl, 10.1.0.sw
|
|
3086
3669
|
*/
|
|
3087
3670
|
HostEvent["GetParameters"] = "GetParameters";
|
|
3088
3671
|
/**
|
|
3089
3672
|
* Triggers an event to update a personalized view of a Liveboard.
|
|
3673
|
+
* This event is deprecated. Use {@link HostEvent.UpdatePersonalizedView} instead.
|
|
3090
3674
|
* ```js
|
|
3091
3675
|
* liveboardEmbed.trigger(HostEvent.UpdatePersonalisedView, {viewId: '1234'})
|
|
3092
3676
|
* ```
|
|
3677
|
+
* @example
|
|
3678
|
+
* ```js
|
|
3679
|
+
* // Update personalized view from liveboard context
|
|
3680
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3681
|
+
* liveboardEmbed.trigger(HostEvent.UpdatePersonalisedView, {
|
|
3682
|
+
* viewId: '1234'
|
|
3683
|
+
* }, ContextType.Liveboard);
|
|
3684
|
+
* ```
|
|
3093
3685
|
* @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
|
|
3686
|
+
* @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
3094
3687
|
*/
|
|
3095
3688
|
HostEvent["UpdatePersonalisedView"] = "UpdatePersonalisedView";
|
|
3689
|
+
/**
|
|
3690
|
+
* Triggers an event to update a personalized view of a Liveboard.
|
|
3691
|
+
* ```js
|
|
3692
|
+
* liveboardEmbed.trigger(HostEvent.UpdatePersonalisedView, {viewId: '1234'})
|
|
3693
|
+
* ```
|
|
3694
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
3695
|
+
*/
|
|
3696
|
+
HostEvent["UpdatePersonalizedView"] = "UpdatePersonalisedView";
|
|
3697
|
+
/**
|
|
3698
|
+
* Triggers selection of a specific Personalized View on a
|
|
3699
|
+
* Liveboard without reloading the embed. Pass either a
|
|
3700
|
+
* `viewId` (GUID) or `viewName`. If both are provided, `viewId` takes precedence.
|
|
3701
|
+
* If neither is provided, the Liveboard resets to the original/default view.
|
|
3702
|
+
* When a `viewName` is provided and multiple views share
|
|
3703
|
+
* the same name, the first match is selected.
|
|
3704
|
+
* @example
|
|
3705
|
+
* ```js
|
|
3706
|
+
* liveboardEmbed.trigger(
|
|
3707
|
+
* HostEvent.SelectPersonalizedView,
|
|
3708
|
+
* { viewId: '2a021a12-1aed-425d-984b-141ee916ce72' },
|
|
3709
|
+
* )
|
|
3710
|
+
* ```
|
|
3711
|
+
* @example
|
|
3712
|
+
* ```js
|
|
3713
|
+
* // Select by name
|
|
3714
|
+
* liveboardEmbed.trigger(
|
|
3715
|
+
* HostEvent.SelectPersonalizedView,
|
|
3716
|
+
* { viewName: 'Dr Smith Cardiology' },
|
|
3717
|
+
* )
|
|
3718
|
+
* ```
|
|
3719
|
+
* @example
|
|
3720
|
+
* ```js
|
|
3721
|
+
* // Reset to default view
|
|
3722
|
+
* liveboardEmbed.trigger(
|
|
3723
|
+
* HostEvent.SelectPersonalizedView,
|
|
3724
|
+
* {},
|
|
3725
|
+
* )
|
|
3726
|
+
* ```
|
|
3727
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
3728
|
+
*/
|
|
3729
|
+
HostEvent["SelectPersonalizedView"] = "SelectPersonalisedView";
|
|
3096
3730
|
/**
|
|
3097
3731
|
* @hidden
|
|
3098
3732
|
* Notify when info call is completed successfully
|
|
@@ -3112,7 +3746,8 @@
|
|
|
3112
3746
|
* add a name and description for the Answer.
|
|
3113
3747
|
* @param - Includes the following keys:
|
|
3114
3748
|
* - `vizId`: Refers to the Answer ID in Spotter embed and is **required** in Spotter
|
|
3115
|
-
* embed.
|
|
3749
|
+
* embed.
|
|
3750
|
+
* - `name`: Optional. Name string for the Answer.
|
|
3116
3751
|
* - `description`: Optional. Description text for the Answer.
|
|
3117
3752
|
* @example
|
|
3118
3753
|
* ```js
|
|
@@ -3131,6 +3766,34 @@
|
|
|
3131
3766
|
*
|
|
3132
3767
|
* spotterEmbed.trigger(HostEvent.SaveAnswer, { vizId: latestSpotterVizId });
|
|
3133
3768
|
* ```
|
|
3769
|
+
* @example
|
|
3770
|
+
* ```js
|
|
3771
|
+
* // Using context parameter to save answer from search context
|
|
3772
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3773
|
+
* const saveAnswerResponse = await appEmbed.trigger(HostEvent.SaveAnswer, {
|
|
3774
|
+
* name: "Regional sales analysis",
|
|
3775
|
+
* description: "Sales breakdown by region"
|
|
3776
|
+
* }, ContextType.Search);
|
|
3777
|
+
* ```
|
|
3778
|
+
* @example
|
|
3779
|
+
* ```js
|
|
3780
|
+
* // Save answer from answer context (explore modal)
|
|
3781
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3782
|
+
* const saveAnswerResponse = await appEmbed.trigger(HostEvent.SaveAnswer, {
|
|
3783
|
+
* name: "Modified analysis",
|
|
3784
|
+
* description: "Updated from explore view"
|
|
3785
|
+
* }, ContextType.Answer);
|
|
3786
|
+
* ```
|
|
3787
|
+
* @example
|
|
3788
|
+
* ```js
|
|
3789
|
+
* // Save answer from spotter context
|
|
3790
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3791
|
+
* const saveAnswerResponse = await appEmbed.trigger(HostEvent.SaveAnswer, {
|
|
3792
|
+
* vizId: latestSpotterVizId,
|
|
3793
|
+
* name: "AI insights",
|
|
3794
|
+
* description: "Generated from Spotter"
|
|
3795
|
+
* }, ContextType.Spotter);
|
|
3796
|
+
* ```
|
|
3134
3797
|
* @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
|
|
3135
3798
|
*/
|
|
3136
3799
|
HostEvent["SaveAnswer"] = "saveAnswer";
|
|
@@ -3172,6 +3835,15 @@
|
|
|
3172
3835
|
* executeSearch: true,
|
|
3173
3836
|
* })
|
|
3174
3837
|
* ```
|
|
3838
|
+
* @example
|
|
3839
|
+
* ```js
|
|
3840
|
+
* // Spotter search from spotter context
|
|
3841
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3842
|
+
* spotterEmbed.trigger(HostEvent.SpotterSearch, {
|
|
3843
|
+
* query: 'sales by region',
|
|
3844
|
+
* executeSearch: true
|
|
3845
|
+
* }, ContextType.Spotter);
|
|
3846
|
+
* ```
|
|
3175
3847
|
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
3176
3848
|
*/
|
|
3177
3849
|
HostEvent["SpotterSearch"] = "SpotterSearch";
|
|
@@ -3182,6 +3854,12 @@
|
|
|
3182
3854
|
* ```js
|
|
3183
3855
|
* spotterEmbed.trigger(HostEvent.EditLastPrompt, "revenue per year");
|
|
3184
3856
|
* ```
|
|
3857
|
+
* @example
|
|
3858
|
+
* ```js
|
|
3859
|
+
* // Edit last prompt from spotter context
|
|
3860
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3861
|
+
* spotterEmbed.trigger(HostEvent.EditLastPrompt, "sales by region", ContextType.Spotter);
|
|
3862
|
+
* ```
|
|
3185
3863
|
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
3186
3864
|
*/
|
|
3187
3865
|
HostEvent["EditLastPrompt"] = "EditLastPrompt";
|
|
@@ -3191,6 +3869,12 @@
|
|
|
3191
3869
|
* ```js
|
|
3192
3870
|
* spotterEmbed.trigger(HostEvent.PreviewSpotterData);
|
|
3193
3871
|
* ```
|
|
3872
|
+
* @example
|
|
3873
|
+
* ```js
|
|
3874
|
+
* // Preview spotter data from spotter context
|
|
3875
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3876
|
+
* spotterEmbed.trigger(HostEvent.PreviewSpotterData, {}, ContextType.Spotter);
|
|
3877
|
+
* ```
|
|
3194
3878
|
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
3195
3879
|
*/
|
|
3196
3880
|
HostEvent["PreviewSpotterData"] = "PreviewSpotterData";
|
|
@@ -3949,6 +4633,7 @@
|
|
|
3949
4633
|
* disabledActions: [Action.LiveboardInfo]
|
|
3950
4634
|
* ```
|
|
3951
4635
|
*/
|
|
4636
|
+
// eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values
|
|
3952
4637
|
Action["LiveboardInfo"] = "pinboardInfo";
|
|
3953
4638
|
/**
|
|
3954
4639
|
* @hidden
|
|
@@ -3979,6 +4664,7 @@
|
|
|
3979
4664
|
* disabledActions: [Action.Subscription]
|
|
3980
4665
|
* ```
|
|
3981
4666
|
*/
|
|
4667
|
+
// eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values
|
|
3982
4668
|
Action["Subscription"] = "subscription";
|
|
3983
4669
|
/**
|
|
3984
4670
|
* The **Explore** action on Liveboard visualizations
|
|
@@ -4458,13 +5144,25 @@
|
|
|
4458
5144
|
/**
|
|
4459
5145
|
* The Liveboard Personalised Views dropdown.
|
|
4460
5146
|
* Allows navigating to a personalized Liveboard View.
|
|
5147
|
+
* This action is deprecated. Use {@link Action.PersonalizedViewsDropdown} instead.
|
|
4461
5148
|
* @example
|
|
4462
5149
|
* ```js
|
|
4463
5150
|
* disabledActions: [Action.PersonalisedViewsDropdown]
|
|
4464
5151
|
* ```
|
|
4465
5152
|
* @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 10.1.0.sw
|
|
5153
|
+
* @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
4466
5154
|
*/
|
|
4467
5155
|
Action["PersonalisedViewsDropdown"] = "personalisedViewsDropdown";
|
|
5156
|
+
/**
|
|
5157
|
+
* The Liveboard Personalized Views dropdown.
|
|
5158
|
+
* Allows navigating to a personalized Liveboard View.
|
|
5159
|
+
* @example
|
|
5160
|
+
* ```js
|
|
5161
|
+
* disabledActions: [Action.PersonalizedViewsDropdown]
|
|
5162
|
+
* ```
|
|
5163
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
5164
|
+
*/
|
|
5165
|
+
Action["PersonalizedViewsDropdown"] = "personalisedViewsDropdown";
|
|
4468
5166
|
/**
|
|
4469
5167
|
* Action ID for show or hide the user details on a
|
|
4470
5168
|
* Liveboard (Recently visited / social proof)
|
|
@@ -4552,14 +5250,27 @@
|
|
|
4552
5250
|
/**
|
|
4553
5251
|
* The **Organize Favourites** action on Homepage
|
|
4554
5252
|
* *Favorites* module.
|
|
5253
|
+
* This action is deprecated. Use {@link Action.OrganizeFavorites} instead.
|
|
4555
5254
|
*
|
|
4556
5255
|
* @example
|
|
4557
5256
|
* ```js
|
|
4558
5257
|
* disabledActions: [Action.OrganiseFavourites]
|
|
4559
5258
|
* ```
|
|
4560
5259
|
* @version SDK: 1.32.0 | ThoughtSpot: 10.0.0.cl
|
|
5260
|
+
* @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
4561
5261
|
*/
|
|
4562
5262
|
Action["OrganiseFavourites"] = "organiseFavourites";
|
|
5263
|
+
/**
|
|
5264
|
+
* The **Organize Favorites** action on Homepage
|
|
5265
|
+
* *Favorites* module.
|
|
5266
|
+
*
|
|
5267
|
+
* @example
|
|
5268
|
+
* ```js
|
|
5269
|
+
* disabledActions: [Action.OrganizeFavorites]
|
|
5270
|
+
* ```
|
|
5271
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
5272
|
+
*/
|
|
5273
|
+
Action["OrganizeFavorites"] = "organiseFavourites";
|
|
4563
5274
|
/**
|
|
4564
5275
|
* The **AI Highlights** action on a Liveboard.
|
|
4565
5276
|
*
|
|
@@ -5309,6 +6020,22 @@
|
|
|
5309
6020
|
/** Invalid URL provided in configuration */
|
|
5310
6021
|
EmbedErrorCodes["INVALID_URL"] = "INVALID_URL";
|
|
5311
6022
|
})(EmbedErrorCodes || (EmbedErrorCodes = {}));
|
|
6023
|
+
/**
|
|
6024
|
+
* Context types for specifying the page context when triggering host events.
|
|
6025
|
+
* Used as the third parameter in the `trigger` method to help ThoughtSpot
|
|
6026
|
+
* understand the current page context for better event handling.
|
|
6027
|
+
*
|
|
6028
|
+
* @example
|
|
6029
|
+
* ```js
|
|
6030
|
+
* import { HostEvent, ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
6031
|
+
*
|
|
6032
|
+
* // Trigger an event with specific context
|
|
6033
|
+
* embed.trigger(HostEvent.Pin, { vizId: "123", liveboardId: "456" }, ContextType.Search);
|
|
6034
|
+
* ```
|
|
6035
|
+
*
|
|
6036
|
+
* @version SDK: 1.45.2 | ThoughtSpot: 26.3.0.cl
|
|
6037
|
+
* @group Events
|
|
6038
|
+
*/
|
|
5312
6039
|
var ContextType;
|
|
5313
6040
|
(function (ContextType) {
|
|
5314
6041
|
/**
|
|
@@ -5327,6 +6054,10 @@
|
|
|
5327
6054
|
* Spotter context for spotter modal/page.
|
|
5328
6055
|
*/
|
|
5329
6056
|
ContextType["Spotter"] = "spotter";
|
|
6057
|
+
/**
|
|
6058
|
+
* Other context for any other generic page.
|
|
6059
|
+
*/
|
|
6060
|
+
ContextType["Other"] = "other";
|
|
5330
6061
|
})(ContextType || (ContextType = {}));
|
|
5331
6062
|
/**
|
|
5332
6063
|
* Enum for the type of API intercepted
|
|
@@ -8256,6 +8987,13 @@
|
|
|
8256
8987
|
UIPassthroughEvent["GetAnswerConfig"] = "getAnswerPageConfig";
|
|
8257
8988
|
UIPassthroughEvent["GetLiveboardConfig"] = "getPinboardPageConfig";
|
|
8258
8989
|
UIPassthroughEvent["GetUnsavedAnswerTML"] = "getUnsavedAnswerTML";
|
|
8990
|
+
UIPassthroughEvent["GetAnswerSession"] = "getAnswerSession";
|
|
8991
|
+
UIPassthroughEvent["GetFilters"] = "getFilters";
|
|
8992
|
+
UIPassthroughEvent["GetIframeUrl"] = "getIframeUrl";
|
|
8993
|
+
UIPassthroughEvent["GetParameters"] = "getParameters";
|
|
8994
|
+
UIPassthroughEvent["GetTML"] = "getTML";
|
|
8995
|
+
UIPassthroughEvent["GetTabs"] = "getTabs";
|
|
8996
|
+
UIPassthroughEvent["GetExportRequestForCurrentPinboard"] = "getExportRequestForCurrentPinboard";
|
|
8259
8997
|
})(UIPassthroughEvent || (UIPassthroughEvent = {}));
|
|
8260
8998
|
|
|
8261
8999
|
const EndPoints = {
|
|
@@ -8889,9 +9627,11 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
8889
9627
|
* You can use this service to:
|
|
8890
9628
|
*
|
|
8891
9629
|
* - Add or remove columns from Answers (`addColumns`, `removeColumns`,
|
|
8892
|
-
* `addColumnsByName`)
|
|
9630
|
+
* `addColumnsByName`)
|
|
9631
|
+
* - Apply filters to Answers (`addFilter`)
|
|
8893
9632
|
* - Get data from Answers in different formats (JSON, CSV, PNG) (`fetchData`,
|
|
8894
|
-
* `fetchCSVBlob`, `fetchPNGBlob`)
|
|
9633
|
+
* `fetchCSVBlob`, `fetchPNGBlob`)
|
|
9634
|
+
* - Get data for specific points in visualizations
|
|
8895
9635
|
* (`getUnderlyingDataForPoint`)
|
|
8896
9636
|
* - Run custom queries (`executeQuery`)
|
|
8897
9637
|
* - Add visualizations to Liveboards (`addDisplayedVizToLiveboard`)
|
|
@@ -17640,7 +18380,8 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
17640
18380
|
/**
|
|
17641
18381
|
* The current authentication token or session has expired.
|
|
17642
18382
|
*
|
|
17643
|
-
* Emitted when the embed receives an auth-expiry signal and starts auth refresh
|
|
18383
|
+
* Emitted when the embed receives an auth-expiry signal and starts auth refresh
|
|
18384
|
+
* handling.
|
|
17644
18385
|
*/
|
|
17645
18386
|
AuthFailureType["EXPIRY"] = "EXPIRY";
|
|
17646
18387
|
/**
|
|
@@ -18487,11 +19228,25 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18487
19228
|
return eventData;
|
|
18488
19229
|
}
|
|
18489
19230
|
|
|
18490
|
-
var name="@thoughtspot/visual-embed-sdk";var version$1="1.46.
|
|
19231
|
+
var name="@thoughtspot/visual-embed-sdk";var version$1="1.46.5-beta.1";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 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.24.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:"32 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};
|
|
18491
19232
|
|
|
19233
|
+
/** Host events that use getDataWithPassthroughFallback (getter-style APIs) */
|
|
19234
|
+
const HOST_EVENT_PASSTHROUGH_MAP = {
|
|
19235
|
+
[exports.HostEvent.GetAnswerSession]: UIPassthroughEvent.GetAnswerSession,
|
|
19236
|
+
[exports.HostEvent.GetFilters]: UIPassthroughEvent.GetFilters,
|
|
19237
|
+
[exports.HostEvent.GetIframeUrl]: UIPassthroughEvent.GetIframeUrl,
|
|
19238
|
+
[exports.HostEvent.GetParameters]: UIPassthroughEvent.GetParameters,
|
|
19239
|
+
[exports.HostEvent.GetTML]: UIPassthroughEvent.GetTML,
|
|
19240
|
+
[exports.HostEvent.GetTabs]: UIPassthroughEvent.GetTabs,
|
|
19241
|
+
[exports.HostEvent.getExportRequestForCurrentPinboard]: UIPassthroughEvent.GetExportRequestForCurrentPinboard,
|
|
19242
|
+
};
|
|
18492
19243
|
class HostEventClient {
|
|
18493
19244
|
constructor(iFrame) {
|
|
18494
19245
|
this.iFrame = iFrame;
|
|
19246
|
+
this.customHandlers = {
|
|
19247
|
+
[exports.HostEvent.Pin]: (p, c) => this.handlePinEvent(p, c),
|
|
19248
|
+
[exports.HostEvent.SaveAnswer]: (p, c) => this.handleSaveAnswerEvent(p, c),
|
|
19249
|
+
};
|
|
18495
19250
|
}
|
|
18496
19251
|
/**
|
|
18497
19252
|
* A wrapper over process trigger to
|
|
@@ -18508,7 +19263,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18508
19263
|
}
|
|
18509
19264
|
async handleHostEventWithParam(apiName, parameters, context) {
|
|
18510
19265
|
var _a, _b, _c, _d;
|
|
18511
|
-
const response = (_b = (_a = (await this.triggerUIPassthroughApi(apiName, parameters, context))) === null || _a === void 0 ? void 0 : _a.
|
|
19266
|
+
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
19267
|
if (!response) {
|
|
18513
19268
|
const error = `No answer found${parameters.vizId ? ` for vizId: ${parameters.vizId}` : ''}.`;
|
|
18514
19269
|
throw { error };
|
|
@@ -18517,13 +19272,35 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18517
19272
|
|| ((_c = response.value) === null || _c === void 0 ? void 0 : _c.errors)
|
|
18518
19273
|
|| ((_d = response.value) === null || _d === void 0 ? void 0 : _d.error);
|
|
18519
19274
|
if (errors) {
|
|
18520
|
-
|
|
19275
|
+
const message = typeof errors === 'string' ? errors : JSON.stringify(errors);
|
|
19276
|
+
throw { error: message };
|
|
18521
19277
|
}
|
|
18522
19278
|
return { ...response.value };
|
|
18523
19279
|
}
|
|
18524
19280
|
async hostEventFallback(hostEvent, data, context) {
|
|
18525
19281
|
return this.processTrigger(hostEvent, data, context);
|
|
18526
19282
|
}
|
|
19283
|
+
/**
|
|
19284
|
+
* For getter events that return data. Tries UI passthrough first;
|
|
19285
|
+
* if the app doesn't support it (no response data), falls back to
|
|
19286
|
+
* the legacy host event channel. Real errors are thrown as-is.
|
|
19287
|
+
*/
|
|
19288
|
+
async getDataWithPassthroughFallback(passthroughEvent, hostEvent, payload, context) {
|
|
19289
|
+
var _a, _b, _c;
|
|
19290
|
+
const response = await this.triggerUIPassthroughApi(passthroughEvent, payload || {}, context);
|
|
19291
|
+
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);
|
|
19292
|
+
if (!matched) {
|
|
19293
|
+
return this.hostEventFallback(hostEvent, payload, context);
|
|
19294
|
+
}
|
|
19295
|
+
const errors = matched.error
|
|
19296
|
+
|| ((_b = matched.value) === null || _b === void 0 ? void 0 : _b.errors)
|
|
19297
|
+
|| ((_c = matched.value) === null || _c === void 0 ? void 0 : _c.error);
|
|
19298
|
+
if (errors) {
|
|
19299
|
+
const message = typeof errors === 'string' ? errors : JSON.stringify(errors);
|
|
19300
|
+
throw new Error(message);
|
|
19301
|
+
}
|
|
19302
|
+
return { ...matched.value };
|
|
19303
|
+
}
|
|
18527
19304
|
/**
|
|
18528
19305
|
* Setter for the iframe element used for host events
|
|
18529
19306
|
* @param {HTMLIFrameElement} iFrame - the iframe element to set
|
|
@@ -18567,14 +19344,15 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18567
19344
|
};
|
|
18568
19345
|
}
|
|
18569
19346
|
async triggerHostEvent(hostEvent, payload, context) {
|
|
18570
|
-
|
|
18571
|
-
|
|
18572
|
-
|
|
18573
|
-
|
|
18574
|
-
|
|
18575
|
-
|
|
18576
|
-
|
|
19347
|
+
const customHandler = this.customHandlers[hostEvent];
|
|
19348
|
+
if (customHandler) {
|
|
19349
|
+
return customHandler(payload, context);
|
|
19350
|
+
}
|
|
19351
|
+
const passthroughEvent = HOST_EVENT_PASSTHROUGH_MAP[hostEvent];
|
|
19352
|
+
if (passthroughEvent) {
|
|
19353
|
+
return this.getDataWithPassthroughFallback(passthroughEvent, hostEvent, payload, context);
|
|
18577
19354
|
}
|
|
19355
|
+
return this.hostEventFallback(hostEvent, payload, context);
|
|
18578
19356
|
}
|
|
18579
19357
|
}
|
|
18580
19358
|
|
|
@@ -19865,7 +20643,21 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
19865
20643
|
* Triggers an event to the embedded app
|
|
19866
20644
|
* @param {HostEvent} messageType The event type
|
|
19867
20645
|
* @param {any} data The payload to send with the message
|
|
20646
|
+
* @param {ContextType} context Optional context type to specify the context from which the event is triggered.
|
|
20647
|
+
* Use ContextType.Search for search answer context, ContextType.Answer for answer/explore context,
|
|
20648
|
+
* ContextType.Liveboard for liveboard context, or ContextType.Spotter for spotter context.
|
|
20649
|
+
* Available from SDK version 1.45.2 | ThoughtSpot: 26.3.0.cl
|
|
19868
20650
|
* @returns A promise that resolves with the response from the embedded app
|
|
20651
|
+
* @example
|
|
20652
|
+
* ```js
|
|
20653
|
+
* // Trigger Pin event with context (SDK: 1.45.2+)
|
|
20654
|
+
* import { HostEvent, ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
20655
|
+
* embed.trigger(HostEvent.Pin, {
|
|
20656
|
+
* vizId: "123",
|
|
20657
|
+
* liveboardId: "456"
|
|
20658
|
+
* }, ContextType.Search);
|
|
20659
|
+
* ```
|
|
20660
|
+
* @version SDK: 1.45.2 | ThoughtSpot: 26.3.0.cl (for context parameter)
|
|
19869
20661
|
*/
|
|
19870
20662
|
async trigger(messageType, data = {}, context) {
|
|
19871
20663
|
uploadMixpanelEvent(`${MIXPANEL_EVENT.VISUAL_SDK_TRIGGER}-${messageType}`);
|
|
@@ -19928,8 +20720,33 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
19928
20720
|
return this.render();
|
|
19929
20721
|
}
|
|
19930
20722
|
/**
|
|
19931
|
-
|
|
19932
|
-
|
|
20723
|
+
* Context object for the embedded component.
|
|
20724
|
+
* @returns {ContextObject} The current context object containing the page type and object ids.
|
|
20725
|
+
* @example
|
|
20726
|
+
* ```js
|
|
20727
|
+
* const context = await embed.getCurrentContext();
|
|
20728
|
+
* console.log(context);
|
|
20729
|
+
*
|
|
20730
|
+
* // Example output
|
|
20731
|
+
* {
|
|
20732
|
+
* stack: [
|
|
20733
|
+
* {
|
|
20734
|
+
* name: 'Liveboard',
|
|
20735
|
+
* type: ContextType.Liveboard,
|
|
20736
|
+
* objectIds: {
|
|
20737
|
+
* liveboardId: '123',
|
|
20738
|
+
* },
|
|
20739
|
+
* },
|
|
20740
|
+
* ],
|
|
20741
|
+
* currentContext: {
|
|
20742
|
+
* name: 'Liveboard',
|
|
20743
|
+
* type: ContextType.Liveboard,
|
|
20744
|
+
* objectIds: {
|
|
20745
|
+
* liveboardId: '123',
|
|
20746
|
+
* },
|
|
20747
|
+
* },
|
|
20748
|
+
* }
|
|
20749
|
+
* ```
|
|
19933
20750
|
* @version SDK: 1.45.2 | ThoughtSpot: 26.3.0.cl
|
|
19934
20751
|
*/
|
|
19935
20752
|
async getCurrentContext() {
|
|
@@ -20753,13 +21570,22 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
20753
21570
|
const visibleCoordinatesData = calculateVisibleElementData(this.iFrame);
|
|
20754
21571
|
responder({ type: exports.EmbedEvent.RequestVisibleEmbedCoordinates, data: visibleCoordinatesData });
|
|
20755
21572
|
};
|
|
21573
|
+
this.HEIGHT_CHANAGE_THRESHOLD = 30;
|
|
20756
21574
|
/**
|
|
20757
21575
|
* Set the iframe height as per the computed height received
|
|
20758
21576
|
* from the ThoughtSpot app.
|
|
20759
21577
|
* @param data The event payload
|
|
20760
21578
|
*/
|
|
20761
21579
|
this.updateIFrameHeight = (data) => {
|
|
20762
|
-
|
|
21580
|
+
logger$3.error('Updating iframe height', data);
|
|
21581
|
+
const currentHeight = this.iFrame.getBoundingClientRect().height;
|
|
21582
|
+
const heightToSet = Math.max(data.data, this.defaultHeight);
|
|
21583
|
+
const heightChange = Math.abs(heightToSet - currentHeight);
|
|
21584
|
+
if (heightChange < this.HEIGHT_CHANAGE_THRESHOLD) {
|
|
21585
|
+
logger$3.info('Height change is less than the threshold, skipping height update', { heightChange, heightToSet, currentHeight });
|
|
21586
|
+
return;
|
|
21587
|
+
}
|
|
21588
|
+
this.setIFrameHeight(heightToSet);
|
|
20763
21589
|
this.sendFullHeightLazyLoadData();
|
|
20764
21590
|
};
|
|
20765
21591
|
this.embedIframeCenter = (data, responder) => {
|
|
@@ -21218,13 +22044,21 @@ query GetEurekaVizSnapshots(
|
|
|
21218
22044
|
const visibleCoordinatesData = calculateVisibleElementData(this.iFrame);
|
|
21219
22045
|
responder({ type: exports.EmbedEvent.RequestVisibleEmbedCoordinates, data: visibleCoordinatesData });
|
|
21220
22046
|
};
|
|
22047
|
+
this.HEIGHT_CHANAGE_THRESHOLD = 30;
|
|
21221
22048
|
/**
|
|
21222
22049
|
* Set the iframe height as per the computed height received
|
|
21223
22050
|
* from the ThoughtSpot app.
|
|
21224
22051
|
* @param data The event payload
|
|
21225
22052
|
*/
|
|
21226
22053
|
this.updateIFrameHeight = (data) => {
|
|
21227
|
-
this.
|
|
22054
|
+
const currentHeight = this.iFrame.getBoundingClientRect().height;
|
|
22055
|
+
const heightToSet = Math.max(data.data, this.defaultHeight);
|
|
22056
|
+
const heightChange = Math.abs(heightToSet - currentHeight);
|
|
22057
|
+
if (heightChange < this.HEIGHT_CHANAGE_THRESHOLD) {
|
|
22058
|
+
logger$3.info('Height change is less than the threshold, skipping height update', { heightChange, heightToSet, currentHeight });
|
|
22059
|
+
return;
|
|
22060
|
+
}
|
|
22061
|
+
this.setIFrameHeight(heightToSet);
|
|
21228
22062
|
this.sendFullHeightLazyLoadData();
|
|
21229
22063
|
};
|
|
21230
22064
|
this.embedIframeCenter = (data, responder) => {
|
|
@@ -21390,7 +22224,8 @@ query GetEurekaVizSnapshots(
|
|
|
21390
22224
|
}
|
|
21391
22225
|
getIframeSuffixSrc(liveboardId, vizId, activeTabId, personalizedViewId) {
|
|
21392
22226
|
// Extract view from liveboardId if passed along with it (legacy
|
|
21393
|
-
// approach)
|
|
22227
|
+
// approach)
|
|
22228
|
+
// View must be appended as query param at the end, not
|
|
21394
22229
|
// embedded in path
|
|
21395
22230
|
let liveboardGuid = liveboardId;
|
|
21396
22231
|
let legacyViewId;
|
|
@@ -22244,60 +23079,64 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
22244
23079
|
// intended for preRendering. If set to true, the component will call the
|
|
22245
23080
|
// Embed.preRender() method instead of the usual render method, and it will
|
|
22246
23081
|
// 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);
|
|
23082
|
+
isPreRenderedComponent = false) => {
|
|
23083
|
+
const Component = React.forwardRef((props, forwardedRef) => {
|
|
23084
|
+
const ref = React.useRef(null);
|
|
23085
|
+
const { className, style, ...embedProps } = props;
|
|
23086
|
+
const { viewConfig, listeners } = getViewPropsAndListeners(embedProps);
|
|
23087
|
+
const handleDestroy = (tsEmbed) => {
|
|
23088
|
+
// do not destroy if it is a preRender component
|
|
23089
|
+
if (isPreRenderedComponent)
|
|
23090
|
+
return;
|
|
23091
|
+
// if component is connected to a preRendered component
|
|
23092
|
+
if (props.preRenderId) {
|
|
23093
|
+
tsEmbed.hidePreRender();
|
|
23094
|
+
return;
|
|
23095
|
+
}
|
|
23096
|
+
tsEmbed.destroy();
|
|
22296
23097
|
};
|
|
22297
|
-
|
|
22298
|
-
|
|
22299
|
-
|
|
22300
|
-
|
|
23098
|
+
const handlePreRenderRendering = (tsEmbed) => {
|
|
23099
|
+
tsEmbed.preRender();
|
|
23100
|
+
};
|
|
23101
|
+
const handleDefaultRendering = (tsEmbed) => {
|
|
23102
|
+
// if component is connected to a preRendered component
|
|
23103
|
+
if (props.preRenderId) {
|
|
23104
|
+
tsEmbed.showPreRender();
|
|
23105
|
+
return;
|
|
23106
|
+
}
|
|
23107
|
+
tsEmbed.render();
|
|
23108
|
+
};
|
|
23109
|
+
const handleRendering = (tsEmbed) => {
|
|
23110
|
+
if (isPreRenderedComponent) {
|
|
23111
|
+
handlePreRenderRendering(tsEmbed);
|
|
23112
|
+
return;
|
|
23113
|
+
}
|
|
23114
|
+
handleDefaultRendering(tsEmbed);
|
|
23115
|
+
};
|
|
23116
|
+
useDeepCompareEffect(() => {
|
|
23117
|
+
const tsEmbed = new EmbedConstructor(ref.current, deepMerge({
|
|
23118
|
+
insertAsSibling: viewConfig.insertAsSibling,
|
|
23119
|
+
frameParams: {
|
|
23120
|
+
class: viewConfig.insertAsSibling ? className || '' : '',
|
|
23121
|
+
},
|
|
23122
|
+
}, viewConfig));
|
|
23123
|
+
Object.keys(listeners).forEach((eventName) => {
|
|
23124
|
+
tsEmbed.on(eventName, listeners[eventName]);
|
|
23125
|
+
});
|
|
23126
|
+
handleRendering(tsEmbed);
|
|
23127
|
+
if (forwardedRef) {
|
|
23128
|
+
forwardedRef.current = tsEmbed;
|
|
23129
|
+
}
|
|
23130
|
+
return () => {
|
|
23131
|
+
handleDestroy(tsEmbed);
|
|
23132
|
+
};
|
|
23133
|
+
}, [viewConfig, listeners]);
|
|
23134
|
+
const preRenderStyles = isPreRenderedComponent ? { display: 'none' } : {};
|
|
23135
|
+
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}` }));
|
|
23136
|
+
});
|
|
23137
|
+
Component.displayName = EmbedConstructor.name || 'EmbedComponent';
|
|
23138
|
+
return Component;
|
|
23139
|
+
};
|
|
22301
23140
|
/**
|
|
22302
23141
|
* React component for Search Embed.
|
|
22303
23142
|
* @example
|
|
@@ -22511,6 +23350,7 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
22511
23350
|
const { message, query: _, ...otherProps } = props;
|
|
22512
23351
|
return (React.createElement(ConversationMessage, { ref: ref, ...message, ...otherProps }));
|
|
22513
23352
|
});
|
|
23353
|
+
SpotterMessage.displayName = 'SpotterMessage';
|
|
22514
23354
|
/**
|
|
22515
23355
|
* React component for PreRendered Conversation embed.
|
|
22516
23356
|
*
|