@thoughtspot/visual-embed-sdk 1.43.0 → 1.43.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 +1 -1
- package/cjs/src/api-intercept.d.ts +51 -0
- package/cjs/src/api-intercept.d.ts.map +1 -0
- package/cjs/src/api-intercept.js +180 -0
- package/cjs/src/api-intercept.js.map +1 -0
- package/cjs/src/api-intercept.spec.d.ts +2 -0
- package/cjs/src/api-intercept.spec.d.ts.map +1 -0
- package/cjs/src/api-intercept.spec.js +672 -0
- package/cjs/src/api-intercept.spec.js.map +1 -0
- package/cjs/src/css-variables.d.ts +4 -0
- package/cjs/src/css-variables.d.ts.map +1 -1
- package/cjs/src/embed/app.d.ts +0 -5
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +4 -5
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/app.spec.js +10 -0
- package/cjs/src/embed/app.spec.js.map +1 -1
- package/cjs/src/embed/conversation.d.ts +2 -2
- package/cjs/src/embed/conversation.js +1 -1
- package/cjs/src/embed/conversation.js.map +1 -1
- package/cjs/src/embed/conversation.spec.js +17 -0
- package/cjs/src/embed/conversation.spec.js.map +1 -1
- package/cjs/src/embed/hostEventClient/contracts.d.ts +11 -1
- package/cjs/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/cjs/src/embed/hostEventClient/contracts.js +1 -0
- package/cjs/src/embed/hostEventClient/contracts.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +4 -2
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/liveboard.spec.js +11 -0
- package/cjs/src/embed/liveboard.spec.js.map +1 -1
- package/cjs/src/embed/search.d.ts +0 -7
- package/cjs/src/embed/search.d.ts.map +1 -1
- package/cjs/src/embed/search.js +1 -4
- package/cjs/src/embed/search.js.map +1 -1
- package/cjs/src/embed/ts-embed.d.ts +10 -0
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +56 -15
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/embed/ts-embed.spec.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.spec.js +412 -238
- package/cjs/src/embed/ts-embed.spec.js.map +1 -1
- package/cjs/src/index.d.ts +2 -2
- package/cjs/src/index.d.ts.map +1 -1
- package/cjs/src/index.js +2 -1
- package/cjs/src/index.js.map +1 -1
- package/cjs/src/react/all-types-export.d.ts +1 -1
- package/cjs/src/react/all-types-export.d.ts.map +1 -1
- package/cjs/src/react/all-types-export.js +2 -1
- package/cjs/src/react/all-types-export.js.map +1 -1
- package/cjs/src/types.d.ts +244 -88
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +181 -70
- package/cjs/src/types.js.map +1 -1
- package/cjs/src/utils/logger.d.ts.map +1 -1
- package/cjs/src/utils/logger.js +1 -2
- package/cjs/src/utils/logger.js.map +1 -1
- package/cjs/src/utils/processData.d.ts +1 -1
- package/cjs/src/utils/processData.d.ts.map +1 -1
- package/cjs/src/utils/processData.js +8 -8
- package/cjs/src/utils/processData.js.map +1 -1
- package/cjs/src/utils/processData.spec.js.map +1 -1
- package/dist/{index-HZ94j9Ey.js → index-CpkMygsc.js} +1 -1
- package/dist/src/api-intercept.d.ts +51 -0
- package/dist/src/api-intercept.d.ts.map +1 -0
- package/dist/src/api-intercept.spec.d.ts +2 -0
- package/dist/src/api-intercept.spec.d.ts.map +1 -0
- package/dist/src/css-variables.d.ts +4 -0
- package/dist/src/css-variables.d.ts.map +1 -1
- package/dist/src/embed/app.d.ts +0 -5
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/conversation.d.ts +2 -2
- package/dist/src/embed/hostEventClient/contracts.d.ts +11 -1
- package/dist/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/embed/search.d.ts +0 -7
- package/dist/src/embed/search.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.d.ts +10 -0
- package/dist/src/embed/ts-embed.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.spec.d.ts.map +1 -1
- package/dist/src/index.d.ts +2 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/react/all-types-export.d.ts +1 -1
- package/dist/src/react/all-types-export.d.ts.map +1 -1
- package/dist/src/types.d.ts +244 -88
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/logger.d.ts.map +1 -1
- package/dist/src/utils/processData.d.ts +1 -1
- package/dist/src/utils/processData.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +435 -118
- package/dist/tsembed-react.js +434 -117
- package/dist/tsembed.es.js +3577 -3260
- package/dist/tsembed.js +3575 -3258
- package/dist/visual-embed-sdk-react-full.d.ts +271 -103
- package/dist/visual-embed-sdk-react.d.ts +268 -103
- package/dist/visual-embed-sdk.d.ts +271 -103
- package/lib/package.json +1 -1
- package/lib/src/api-intercept.d.ts +51 -0
- package/lib/src/api-intercept.d.ts.map +1 -0
- package/lib/src/api-intercept.js +173 -0
- package/lib/src/api-intercept.js.map +1 -0
- package/lib/src/api-intercept.spec.d.ts +2 -0
- package/lib/src/api-intercept.spec.d.ts.map +1 -0
- package/lib/src/api-intercept.spec.js +669 -0
- package/lib/src/api-intercept.spec.js.map +1 -0
- package/lib/src/css-variables.d.ts +4 -0
- package/lib/src/css-variables.d.ts.map +1 -1
- package/lib/src/embed/app.d.ts +0 -5
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +4 -5
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/app.spec.js +10 -0
- package/lib/src/embed/app.spec.js.map +1 -1
- package/lib/src/embed/conversation.d.ts +2 -2
- package/lib/src/embed/conversation.js +1 -1
- package/lib/src/embed/conversation.js.map +1 -1
- package/lib/src/embed/conversation.spec.js +17 -0
- package/lib/src/embed/conversation.spec.js.map +1 -1
- package/lib/src/embed/hostEventClient/contracts.d.ts +11 -1
- package/lib/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/lib/src/embed/hostEventClient/contracts.js +1 -0
- package/lib/src/embed/hostEventClient/contracts.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +4 -2
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +11 -0
- package/lib/src/embed/liveboard.spec.js.map +1 -1
- package/lib/src/embed/search.d.ts +0 -7
- package/lib/src/embed/search.d.ts.map +1 -1
- package/lib/src/embed/search.js +1 -4
- package/lib/src/embed/search.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts +10 -0
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +56 -15
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/embed/ts-embed.spec.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.spec.js +412 -238
- package/lib/src/embed/ts-embed.spec.js.map +1 -1
- package/lib/src/index.d.ts +2 -2
- package/lib/src/index.d.ts.map +1 -1
- package/lib/src/index.js +2 -2
- package/lib/src/index.js.map +1 -1
- package/lib/src/react/all-types-export.d.ts +1 -1
- package/lib/src/react/all-types-export.d.ts.map +1 -1
- package/lib/src/react/all-types-export.js +1 -1
- package/lib/src/react/all-types-export.js.map +1 -1
- package/lib/src/types.d.ts +244 -88
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +180 -69
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils/logger.d.ts.map +1 -1
- package/lib/src/utils/logger.js +1 -2
- package/lib/src/utils/logger.js.map +1 -1
- package/lib/src/utils/processData.d.ts +1 -1
- package/lib/src/utils/processData.d.ts.map +1 -1
- package/lib/src/utils/processData.js +8 -8
- package/lib/src/utils/processData.js.map +1 -1
- package/lib/src/utils/processData.spec.js.map +1 -1
- package/package.json +1 -1
- package/src/api-intercept.spec.ts +856 -0
- package/src/api-intercept.ts +204 -0
- package/src/css-variables.ts +5 -0
- package/src/embed/app.spec.ts +11 -0
- package/src/embed/app.ts +5 -16
- package/src/embed/conversation.spec.ts +22 -0
- package/src/embed/conversation.ts +3 -3
- package/src/embed/hostEventClient/contracts.ts +10 -0
- package/src/embed/liveboard.spec.ts +12 -0
- package/src/embed/liveboard.ts +6 -2
- package/src/embed/search.ts +1 -14
- package/src/embed/ts-embed.spec.ts +498 -250
- package/src/embed/ts-embed.ts +80 -32
- package/src/index.ts +2 -0
- package/src/react/all-types-export.ts +1 -0
- package/src/types.ts +327 -165
- package/src/utils/logger.ts +1 -2
- package/src/utils/processData.spec.ts +0 -1
- package/src/utils/processData.ts +10 -11
package/dist/tsembed-react.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @thoughtspot/visual-embed-sdk version 1.43.
|
|
1
|
+
/* @thoughtspot/visual-embed-sdk version 1.43.1 */
|
|
2
2
|
'use client';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import React__default, { useRef, useCallback } from 'react';
|
|
@@ -1474,21 +1474,24 @@ var EmbedEvent;
|
|
|
1474
1474
|
|
|
1475
1475
|
* Prerequisite: Set `isOnBeforeGetVizDataInterceptEnabled` to `true`
|
|
1476
1476
|
* for this embed event to get emitted.
|
|
1477
|
-
* @param: payload
|
|
1478
|
-
* @param:
|
|
1477
|
+
* @param:payload The payload received from the embed related to the Data API call.
|
|
1478
|
+
* @param:responder
|
|
1479
1479
|
* Contains elements that lets developers define whether ThoughtSpot
|
|
1480
1480
|
* should run the search, and if not, what error message
|
|
1481
1481
|
* should be shown to the user.
|
|
1482
1482
|
*
|
|
1483
|
-
* execute
|
|
1483
|
+
* `execute` - When execute returns `true`, the search will be run.
|
|
1484
1484
|
* When execute returns `false`, the search will not be executed.
|
|
1485
1485
|
*
|
|
1486
|
-
* error
|
|
1487
|
-
*
|
|
1486
|
+
* `error` - Developers can customize the error message text when `execute`
|
|
1487
|
+
* is `false` using the `errorText` and `errorDescription` parameters in responder.
|
|
1488
|
+
*
|
|
1489
|
+
* `errorText` - The error message text to be shown to the user.
|
|
1490
|
+
* `errorDescription (ThoughtSpot: 10.15.0.cl and above)` - The error description to be shown to the user.
|
|
1488
1491
|
* @version SDK : 1.29.0 | ThoughtSpot: 10.3.0.cl
|
|
1489
1492
|
* @example
|
|
1490
1493
|
*```js
|
|
1491
|
-
* .on(EmbedEvent.OnBeforeGetVizDataIntercept,
|
|
1494
|
+
* embed.on(EmbedEvent.OnBeforeGetVizDataIntercept,
|
|
1492
1495
|
* (payload, responder) => {
|
|
1493
1496
|
* responder({
|
|
1494
1497
|
* data: {
|
|
@@ -1504,7 +1507,7 @@ var EmbedEvent;
|
|
|
1504
1507
|
* ```
|
|
1505
1508
|
*
|
|
1506
1509
|
*```js
|
|
1507
|
-
* .on(EmbedEvent.OnBeforeGetVizDataIntercept,
|
|
1510
|
+
* embed.on(EmbedEvent.OnBeforeGetVizDataIntercept,
|
|
1508
1511
|
* (payload, responder) => {
|
|
1509
1512
|
* const query = payload.data.data.answer.search_query
|
|
1510
1513
|
* responder({
|
|
@@ -1515,7 +1518,8 @@ var EmbedEvent;
|
|
|
1515
1518
|
* error: {
|
|
1516
1519
|
* //Provide a custom error message to explain to your end user
|
|
1517
1520
|
* // why their search did not run, and which searches are accepted by your custom logic.
|
|
1518
|
-
* errorText: "
|
|
1521
|
+
* errorText: "Error Occurred",
|
|
1522
|
+
* errorDescription: "You can't use this query :" + query + ".
|
|
1519
1523
|
* The 'sales' measures can never be used at the 'county' level.
|
|
1520
1524
|
* Please try another measure, or remove 'county' from your search."
|
|
1521
1525
|
* }
|
|
@@ -1579,17 +1583,17 @@ var EmbedEvent;
|
|
|
1579
1583
|
*/
|
|
1580
1584
|
EmbedEvent["TableVizRendered"] = "TableVizRendered";
|
|
1581
1585
|
/**
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1586
|
+
* Emitted when the liveboard is created from pin modal or Liveboard list page.
|
|
1587
|
+
* You can use this event as a hook to trigger
|
|
1588
|
+
* other events on liveboard creation.
|
|
1589
|
+
*
|
|
1590
|
+
* ```js
|
|
1591
|
+
* liveboardEmbed.on(EmbedEvent.CreateLiveboard, (payload) => {
|
|
1592
|
+
* console.log('payload', payload);
|
|
1593
|
+
* })
|
|
1594
|
+
*```
|
|
1595
|
+
* @version SDK : 1.37.0 | ThoughtSpot: 10.8.0.cl
|
|
1596
|
+
*/
|
|
1593
1597
|
EmbedEvent["CreateLiveboard"] = "createLiveboard";
|
|
1594
1598
|
/**
|
|
1595
1599
|
* Emitted when a user creates a Model.
|
|
@@ -1685,6 +1689,17 @@ var EmbedEvent;
|
|
|
1685
1689
|
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
1686
1690
|
*/
|
|
1687
1691
|
EmbedEvent["SpotterInit"] = "spotterInit";
|
|
1692
|
+
/**
|
|
1693
|
+
* Emitted when a *Spotter* conversation has been successfully created.
|
|
1694
|
+
* @example
|
|
1695
|
+
* ```js
|
|
1696
|
+
* spotterEmbed.on(EmbedEvent.SpotterLoadComplete, (payload) => {
|
|
1697
|
+
* console.log('payload', payload);
|
|
1698
|
+
* })
|
|
1699
|
+
*```
|
|
1700
|
+
* @version SDK: 1.44.0 | ThoughtSpot: 26.2.0.cl
|
|
1701
|
+
*/
|
|
1702
|
+
EmbedEvent["SpotterLoadComplete"] = "spotterLoadComplete";
|
|
1688
1703
|
/**
|
|
1689
1704
|
* @hidden
|
|
1690
1705
|
* Triggers when the embed listener is ready to receive events.
|
|
@@ -1708,6 +1723,72 @@ var EmbedEvent;
|
|
|
1708
1723
|
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
1709
1724
|
*/
|
|
1710
1725
|
EmbedEvent["OrgSwitched"] = "orgSwitched";
|
|
1726
|
+
/**
|
|
1727
|
+
* Emitted when the user intercepts a URL.
|
|
1728
|
+
*
|
|
1729
|
+
* Supported on all embed types.
|
|
1730
|
+
*
|
|
1731
|
+
* @example
|
|
1732
|
+
*
|
|
1733
|
+
* ```js
|
|
1734
|
+
* embed.on(EmbedEvent.ApiIntercept, (payload, responder) => {
|
|
1735
|
+
* console.log('payload', payload);
|
|
1736
|
+
* responder({
|
|
1737
|
+
* data: {
|
|
1738
|
+
* execute: false,
|
|
1739
|
+
* error: {
|
|
1740
|
+
* errorText: 'Error Occurred',
|
|
1741
|
+
* }
|
|
1742
|
+
* }
|
|
1743
|
+
* })
|
|
1744
|
+
* })
|
|
1745
|
+
* ```
|
|
1746
|
+
*
|
|
1747
|
+
* ```js
|
|
1748
|
+
* // We can also send a response for the intercepted api
|
|
1749
|
+
* embed.on(EmbedEvent.ApiIntercept, (payload, responder) => {
|
|
1750
|
+
* console.log('payload', payload);
|
|
1751
|
+
* responder({
|
|
1752
|
+
* data: {
|
|
1753
|
+
* execute: false,
|
|
1754
|
+
* response: {
|
|
1755
|
+
* body: {
|
|
1756
|
+
* data: {
|
|
1757
|
+
* // Some api response
|
|
1758
|
+
* },
|
|
1759
|
+
* }
|
|
1760
|
+
* }
|
|
1761
|
+
* }
|
|
1762
|
+
* })
|
|
1763
|
+
* })
|
|
1764
|
+
*
|
|
1765
|
+
* // here embed will use the response from the responder as the response for the api
|
|
1766
|
+
* ```
|
|
1767
|
+
*
|
|
1768
|
+
* ```js
|
|
1769
|
+
* // We can also send error in response for the intercepted api
|
|
1770
|
+
* embed.on(EmbedEvent.ApiIntercept, (payload, responder) => {
|
|
1771
|
+
* console.log('payload', payload);
|
|
1772
|
+
* responder({
|
|
1773
|
+
* data: {
|
|
1774
|
+
* execute: false,
|
|
1775
|
+
* response: {
|
|
1776
|
+
* body: {
|
|
1777
|
+
* errors: [{
|
|
1778
|
+
* title: 'Error Occurred',
|
|
1779
|
+
* description: 'Error Description',
|
|
1780
|
+
* isUserError: true,
|
|
1781
|
+
* }],
|
|
1782
|
+
* data: {},
|
|
1783
|
+
* },
|
|
1784
|
+
* }
|
|
1785
|
+
* }
|
|
1786
|
+
* })
|
|
1787
|
+
* })
|
|
1788
|
+
* ```
|
|
1789
|
+
* @version SDK: 1.43.0 | ThoughtSpot: 10.15.0.cl
|
|
1790
|
+
*/
|
|
1791
|
+
EmbedEvent["ApiIntercept"] = "ApiIntercept";
|
|
1711
1792
|
})(EmbedEvent || (EmbedEvent = {}));
|
|
1712
1793
|
/**
|
|
1713
1794
|
* Event types that can be triggered by the host application
|
|
@@ -2175,14 +2256,14 @@ var HostEvent;
|
|
|
2175
2256
|
* ```
|
|
2176
2257
|
* @example
|
|
2177
2258
|
* ```js
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2259
|
+
* // You can use the Data event dispatched on each answer creation to get the vizId and use in MakeACopy host event.
|
|
2260
|
+
* let latestSpotterVizId = '';
|
|
2261
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
2262
|
+
* latestSpotterVizId = payload.data.id;
|
|
2263
|
+
* });
|
|
2264
|
+
*
|
|
2265
|
+
* spotterEmbed.trigger(HostEvent.MakeACopy, { vizId: latestSpotterVizId });
|
|
2266
|
+
* ```
|
|
2186
2267
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2187
2268
|
*/
|
|
2188
2269
|
HostEvent["MakeACopy"] = "makeACopy";
|
|
@@ -2406,14 +2487,14 @@ var HostEvent;
|
|
|
2406
2487
|
* embed.trigger(HostEvent.Download)
|
|
2407
2488
|
* ```
|
|
2408
2489
|
* ```js
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2490
|
+
* // You can use the Data event dispatched on each answer creation to get the vizId and use in Download host event.
|
|
2491
|
+
* let latestSpotterVizId = '';
|
|
2492
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
2493
|
+
* latestSpotterVizId = payload.data.id;
|
|
2494
|
+
* });
|
|
2495
|
+
*
|
|
2496
|
+
* spotterEmbed.trigger(HostEvent.Download, { vizId: latestSpotterVizId });
|
|
2497
|
+
* ```
|
|
2417
2498
|
* @deprecated from SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl ,9.4.1.sw
|
|
2418
2499
|
* Use {@link DownloadAsPng}
|
|
2419
2500
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
@@ -2431,13 +2512,13 @@ var HostEvent;
|
|
|
2431
2512
|
*
|
|
2432
2513
|
* searchEmbed.trigger(HostEvent.DownloadAsPng)
|
|
2433
2514
|
*
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2515
|
+
* // You can use the Data event dispatched on each answer creation to get the vizId and use in DownloadAsPng host event.
|
|
2516
|
+
* let latestSpotterVizId = '';
|
|
2517
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
2518
|
+
* latestSpotterVizId = payload.data.id;
|
|
2519
|
+
* });
|
|
2520
|
+
*
|
|
2521
|
+
* spotterEmbed.trigger(HostEvent.DownloadAsPng, { vizId: latestSpotterVizId });
|
|
2441
2522
|
* ```
|
|
2442
2523
|
*
|
|
2443
2524
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.1.sw
|
|
@@ -2459,13 +2540,13 @@ var HostEvent;
|
|
|
2459
2540
|
* searchEmbed.trigger(HostEvent.DownloadAsCsv)
|
|
2460
2541
|
* ```
|
|
2461
2542
|
* ```js
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2543
|
+
* // You can use the Data event dispatched on each answer creation to get the vizId and use in DownloadAsCsv host event.
|
|
2544
|
+
* let latestSpotterVizId = '';
|
|
2545
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
2546
|
+
* latestSpotterVizId = payload.data.id;
|
|
2547
|
+
* });
|
|
2548
|
+
*
|
|
2549
|
+
* spotterEmbed.trigger(HostEvent.DownloadAsCsv, { vizId: latestSpotterVizId });
|
|
2469
2550
|
* ```
|
|
2470
2551
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
2471
2552
|
*/
|
|
@@ -2486,13 +2567,13 @@ var HostEvent;
|
|
|
2486
2567
|
* searchEmbed.trigger(HostEvent.DownloadAsXlsx)
|
|
2487
2568
|
* ```
|
|
2488
2569
|
* ```js
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2570
|
+
* // You can use the Data event dispatched on each answer creation to get the vizId and use in DownloadAsXlsx host event.
|
|
2571
|
+
* let latestSpotterVizId = '';
|
|
2572
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
2573
|
+
* latestSpotterVizId = payload.data.id;
|
|
2574
|
+
* });
|
|
2575
|
+
*
|
|
2576
|
+
* spotterEmbed.trigger(HostEvent.DownloadAsXlsx, { vizId: latestSpotterVizId });
|
|
2496
2577
|
* ```
|
|
2497
2578
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
2498
2579
|
*/
|
|
@@ -2857,13 +2938,13 @@ var HostEvent;
|
|
|
2857
2938
|
* });
|
|
2858
2939
|
*```
|
|
2859
2940
|
*```js
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2941
|
+
* // You can use the Data event dispatched on each answer creation to get the vizId and use in GetParameters host event.
|
|
2942
|
+
* let latestSpotterVizId = '';
|
|
2943
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
2944
|
+
* latestSpotterVizId = payload.data.id;
|
|
2945
|
+
* });
|
|
2946
|
+
*
|
|
2947
|
+
* spotterEmbed.trigger(HostEvent.GetParameters, { vizId: latestSpotterVizId });
|
|
2867
2948
|
*```
|
|
2868
2949
|
* @version SDK: 1.29.0 | ThoughtSpot: 10.1.0.cl, 10.1.0.sw
|
|
2869
2950
|
*/
|
|
@@ -2912,8 +2993,8 @@ var HostEvent;
|
|
|
2912
2993
|
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
2913
2994
|
* latestSpotterVizId = payload.data.id;
|
|
2914
2995
|
* });
|
|
2915
|
-
|
|
2916
|
-
|
|
2996
|
+
*
|
|
2997
|
+
* spotterEmbed.trigger(HostEvent.SaveAnswer, { vizId: latestSpotterVizId });
|
|
2917
2998
|
* ```
|
|
2918
2999
|
* @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
|
|
2919
3000
|
*/
|
|
@@ -3004,8 +3085,8 @@ var HostEvent;
|
|
|
3004
3085
|
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
3005
3086
|
* latestSpotterVizId = payload.data.id;
|
|
3006
3087
|
* });
|
|
3007
|
-
|
|
3008
|
-
|
|
3088
|
+
*
|
|
3089
|
+
* spotterEmbed.trigger(HostEvent.AnswerChartSwitcher, { vizId: latestSpotterVizId });
|
|
3009
3090
|
*```
|
|
3010
3091
|
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
3011
3092
|
*/
|
|
@@ -3042,8 +3123,8 @@ var HostEvent;
|
|
|
3042
3123
|
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
3043
3124
|
* latestSpotterVizId = payload.data.id;
|
|
3044
3125
|
* });
|
|
3045
|
-
|
|
3046
|
-
|
|
3126
|
+
*
|
|
3127
|
+
* spotterEmbed.trigger(HostEvent.AskSpotter, { vizId: latestSpotterVizId });
|
|
3047
3128
|
* ```
|
|
3048
3129
|
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
3049
3130
|
*/
|
|
@@ -3067,6 +3148,18 @@ var HostEvent;
|
|
|
3067
3148
|
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
3068
3149
|
*/
|
|
3069
3150
|
HostEvent["DestroyEmbed"] = "EmbedDestroyed";
|
|
3151
|
+
/** Triggers a create new conversation operation in spotter embed.
|
|
3152
|
+
* @example
|
|
3153
|
+
* ```js
|
|
3154
|
+
* This feature is available only when chat history is enabled on your ThoughtSpot instance.
|
|
3155
|
+
* Contact your admin or ThoughtSpot Support to enable chat history on your instance.
|
|
3156
|
+
* @example
|
|
3157
|
+
* ```js
|
|
3158
|
+
* spotterEmbed.trigger(HostEvent.StartNewSpotterConversation);
|
|
3159
|
+
* ```
|
|
3160
|
+
* @version SDK: 1.45.0 | ThoughtSpot: 26.2.0.cl
|
|
3161
|
+
*/
|
|
3162
|
+
HostEvent["StartNewSpotterConversation"] = "StartNewSpotterConversation";
|
|
3070
3163
|
})(HostEvent || (HostEvent = {}));
|
|
3071
3164
|
/**
|
|
3072
3165
|
* The different visual modes that the data sources panel within
|
|
@@ -4654,7 +4747,25 @@ var LogLevel;
|
|
|
4654
4747
|
* @version SDK: 1.26.7 | ThoughtSpot Cloud: 9.10.0.cl
|
|
4655
4748
|
*/
|
|
4656
4749
|
LogLevel["TRACE"] = "TRACE";
|
|
4657
|
-
})(LogLevel || (LogLevel = {}));
|
|
4750
|
+
})(LogLevel || (LogLevel = {}));
|
|
4751
|
+
/**
|
|
4752
|
+
* Enum for the type of API intercepted
|
|
4753
|
+
*/
|
|
4754
|
+
var InterceptedApiType;
|
|
4755
|
+
(function (InterceptedApiType) {
|
|
4756
|
+
/**
|
|
4757
|
+
* The apis that are use to get the data for the embed
|
|
4758
|
+
*/
|
|
4759
|
+
InterceptedApiType["AnswerData"] = "AnswerData";
|
|
4760
|
+
/**
|
|
4761
|
+
* This will intercept all the apis
|
|
4762
|
+
*/
|
|
4763
|
+
InterceptedApiType["ALL"] = "ALL";
|
|
4764
|
+
/**
|
|
4765
|
+
* The apis that are use to get the data for the liveboard
|
|
4766
|
+
*/
|
|
4767
|
+
InterceptedApiType["LiveboardData"] = "LiveboardData";
|
|
4768
|
+
})(InterceptedApiType || (InterceptedApiType = {}));
|
|
4658
4769
|
|
|
4659
4770
|
const logFunctions = {
|
|
4660
4771
|
[LogLevel.SILENT]: () => undefined,
|
|
@@ -4692,7 +4803,7 @@ class Logger {
|
|
|
4692
4803
|
canLog(logLevel) {
|
|
4693
4804
|
if (logLevel === LogLevel.SILENT)
|
|
4694
4805
|
return false;
|
|
4695
|
-
if (
|
|
4806
|
+
if (globalLogLevelOverride !== undefined) {
|
|
4696
4807
|
return compareLogLevels(globalLogLevelOverride, logLevel) >= 0;
|
|
4697
4808
|
}
|
|
4698
4809
|
return compareLogLevels(this.logLevel, logLevel) >= 0;
|
|
@@ -7417,6 +7528,17 @@ function isEmpty(value) {
|
|
|
7417
7528
|
|
|
7418
7529
|
var isEmpty_1 = isEmpty;
|
|
7419
7530
|
|
|
7531
|
+
var UIPassthroughEvent;
|
|
7532
|
+
(function (UIPassthroughEvent) {
|
|
7533
|
+
UIPassthroughEvent["PinAnswerToLiveboard"] = "addVizToPinboard";
|
|
7534
|
+
UIPassthroughEvent["SaveAnswer"] = "saveAnswer";
|
|
7535
|
+
UIPassthroughEvent["GetDiscoverabilityStatus"] = "getDiscoverabilityStatus";
|
|
7536
|
+
UIPassthroughEvent["GetAvailableUIPassthroughs"] = "getAvailableUiPassthroughs";
|
|
7537
|
+
UIPassthroughEvent["GetAnswerConfig"] = "getAnswerPageConfig";
|
|
7538
|
+
UIPassthroughEvent["GetLiveboardConfig"] = "getPinboardPageConfig";
|
|
7539
|
+
UIPassthroughEvent["GetUnsavedAnswerTML"] = "getUnsavedAnswerTML";
|
|
7540
|
+
})(UIPassthroughEvent || (UIPassthroughEvent = {}));
|
|
7541
|
+
|
|
7420
7542
|
const ERROR_MESSAGE = {
|
|
7421
7543
|
INVALID_THOUGHTSPOT_HOST: 'Error parsing ThoughtSpot host. Please provide a valid URL.',
|
|
7422
7544
|
SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND: 'Please select a Model to get started',
|
|
@@ -8348,7 +8470,7 @@ class AnswerService {
|
|
|
8348
8470
|
async getTML() {
|
|
8349
8471
|
const { object } = await this.executeQuery(getAnswerTML, {});
|
|
8350
8472
|
const edoc = object[0].edoc;
|
|
8351
|
-
const YAML = await import('./index-
|
|
8473
|
+
const YAML = await import('./index-CpkMygsc.js');
|
|
8352
8474
|
const parsedDoc = YAML.parse(edoc);
|
|
8353
8475
|
return {
|
|
8354
8476
|
answer: {
|
|
@@ -17511,27 +17633,27 @@ function processAuthLogout(e, containerEl) {
|
|
|
17511
17633
|
* @param thoughtSpotHost
|
|
17512
17634
|
* @param containerEl
|
|
17513
17635
|
*/
|
|
17514
|
-
function processEventData(type,
|
|
17636
|
+
function processEventData(type, eventData, thoughtSpotHost, containerEl) {
|
|
17515
17637
|
switch (type) {
|
|
17516
17638
|
case EmbedEvent.CustomAction:
|
|
17517
|
-
return processCustomAction(
|
|
17639
|
+
return processCustomAction(eventData, thoughtSpotHost);
|
|
17518
17640
|
case EmbedEvent.AuthInit:
|
|
17519
|
-
return processAuthInit(
|
|
17641
|
+
return processAuthInit(eventData);
|
|
17520
17642
|
case EmbedEvent.NoCookieAccess:
|
|
17521
|
-
return processNoCookieAccess(
|
|
17643
|
+
return processNoCookieAccess(eventData, containerEl);
|
|
17522
17644
|
case EmbedEvent.AuthFailure:
|
|
17523
|
-
return processAuthFailure(
|
|
17645
|
+
return processAuthFailure(eventData, containerEl);
|
|
17524
17646
|
case EmbedEvent.AuthLogout:
|
|
17525
|
-
return processAuthLogout(
|
|
17647
|
+
return processAuthLogout(eventData, containerEl);
|
|
17526
17648
|
case EmbedEvent.ExitPresentMode:
|
|
17527
17649
|
return processExitPresentMode();
|
|
17528
17650
|
case EmbedEvent.CLEAR_INFO_CACHE:
|
|
17529
17651
|
return processClearInfoCache();
|
|
17530
17652
|
}
|
|
17531
|
-
return
|
|
17653
|
+
return eventData;
|
|
17532
17654
|
}
|
|
17533
17655
|
|
|
17534
|
-
var name="@thoughtspot/visual-embed-sdk";var version$1="1.43.
|
|
17656
|
+
var name="@thoughtspot/visual-embed-sdk";var version$1="1.43.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={".":{"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","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","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.21","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":"^22.2.3","@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":"^26.6.3","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:"^26.6.3","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":"^26.5.5","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,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};
|
|
17535
17657
|
|
|
17536
17658
|
/**
|
|
17537
17659
|
* Reloads the ThoughtSpot iframe.
|
|
@@ -17603,16 +17725,6 @@ function processTrigger(iFrame, messageType, thoughtSpotHost, data) {
|
|
|
17603
17725
|
});
|
|
17604
17726
|
}
|
|
17605
17727
|
|
|
17606
|
-
var UIPassthroughEvent;
|
|
17607
|
-
(function (UIPassthroughEvent) {
|
|
17608
|
-
UIPassthroughEvent["PinAnswerToLiveboard"] = "addVizToPinboard";
|
|
17609
|
-
UIPassthroughEvent["SaveAnswer"] = "saveAnswer";
|
|
17610
|
-
UIPassthroughEvent["GetDiscoverabilityStatus"] = "getDiscoverabilityStatus";
|
|
17611
|
-
UIPassthroughEvent["GetAvailableUIPassthroughs"] = "getAvailableUiPassthroughs";
|
|
17612
|
-
UIPassthroughEvent["GetAnswerConfig"] = "getAnswerPageConfig";
|
|
17613
|
-
UIPassthroughEvent["GetLiveboardConfig"] = "getPinboardPageConfig";
|
|
17614
|
-
})(UIPassthroughEvent || (UIPassthroughEvent = {}));
|
|
17615
|
-
|
|
17616
17728
|
class HostEventClient {
|
|
17617
17729
|
constructor(iFrame) {
|
|
17618
17730
|
this.iFrame = iFrame;
|
|
@@ -17704,6 +17816,174 @@ class HostEventClient {
|
|
|
17704
17816
|
}
|
|
17705
17817
|
}
|
|
17706
17818
|
|
|
17819
|
+
const DefaultInterceptUrlsMap = {
|
|
17820
|
+
[InterceptedApiType.AnswerData]: [
|
|
17821
|
+
'/prism/?op=GetChartWithData',
|
|
17822
|
+
'/prism/?op=GetTableWithHeadlineData',
|
|
17823
|
+
'/prism/?op=GetTableWithData',
|
|
17824
|
+
],
|
|
17825
|
+
[InterceptedApiType.LiveboardData]: [
|
|
17826
|
+
'/prism/?op=LoadContextBook'
|
|
17827
|
+
],
|
|
17828
|
+
};
|
|
17829
|
+
const formatInterceptUrl = (url) => {
|
|
17830
|
+
const host = getThoughtSpotHost(getEmbedConfig());
|
|
17831
|
+
if (url.startsWith('/'))
|
|
17832
|
+
return `${host}${url}`;
|
|
17833
|
+
return url;
|
|
17834
|
+
};
|
|
17835
|
+
/**
|
|
17836
|
+
* Converts user passed url values to proper urls
|
|
17837
|
+
* [ANSER_DATA] => ['https://host/pris/op?=op']
|
|
17838
|
+
* @param interceptUrls
|
|
17839
|
+
* @returns
|
|
17840
|
+
*/
|
|
17841
|
+
const processInterceptUrls = (interceptUrls) => {
|
|
17842
|
+
let processedUrls = [...interceptUrls];
|
|
17843
|
+
Object.entries(DefaultInterceptUrlsMap).forEach(([apiType, apiTypeUrls]) => {
|
|
17844
|
+
if (!processedUrls.includes(apiType))
|
|
17845
|
+
return;
|
|
17846
|
+
processedUrls = processedUrls.filter(url => url !== apiType);
|
|
17847
|
+
processedUrls = [...processedUrls, ...apiTypeUrls];
|
|
17848
|
+
});
|
|
17849
|
+
return processedUrls.map(url => formatInterceptUrl(url));
|
|
17850
|
+
};
|
|
17851
|
+
/**
|
|
17852
|
+
* Returns the data to be sent to embed to setup intercepts
|
|
17853
|
+
* the urls to intercept, timeout etc
|
|
17854
|
+
* @param viewConfig
|
|
17855
|
+
* @returns
|
|
17856
|
+
*/
|
|
17857
|
+
const getInterceptInitData = (viewConfig) => {
|
|
17858
|
+
const combinedUrls = [...(viewConfig.interceptUrls || [])];
|
|
17859
|
+
if (viewConfig.isOnBeforeGetVizDataInterceptEnabled) {
|
|
17860
|
+
combinedUrls.push(InterceptedApiType.AnswerData);
|
|
17861
|
+
}
|
|
17862
|
+
const shouldInterceptAll = combinedUrls.includes(InterceptedApiType.ALL);
|
|
17863
|
+
const interceptUrls = shouldInterceptAll ? [InterceptedApiType.ALL] : processInterceptUrls(combinedUrls);
|
|
17864
|
+
const interceptTimeout = viewConfig.interceptTimeout;
|
|
17865
|
+
return {
|
|
17866
|
+
interceptUrls,
|
|
17867
|
+
interceptTimeout,
|
|
17868
|
+
};
|
|
17869
|
+
};
|
|
17870
|
+
const parseJson = (jsonString) => {
|
|
17871
|
+
try {
|
|
17872
|
+
const json = JSON.parse(jsonString);
|
|
17873
|
+
return [json, null];
|
|
17874
|
+
}
|
|
17875
|
+
catch (error) {
|
|
17876
|
+
return [null, error];
|
|
17877
|
+
}
|
|
17878
|
+
};
|
|
17879
|
+
/**
|
|
17880
|
+
* Parse the api intercept data and return the parsed data and error if any
|
|
17881
|
+
* Embed returns the input and init from the fetch call
|
|
17882
|
+
*/
|
|
17883
|
+
const parseInterceptData = (eventDataString) => {
|
|
17884
|
+
try {
|
|
17885
|
+
const [parsedData, error] = parseJson(eventDataString);
|
|
17886
|
+
if (error) {
|
|
17887
|
+
return [null, error];
|
|
17888
|
+
}
|
|
17889
|
+
const { input, init } = parsedData;
|
|
17890
|
+
const [parsedBody, bodyParseError] = parseJson(init.body);
|
|
17891
|
+
if (!bodyParseError) {
|
|
17892
|
+
init.body = parsedBody;
|
|
17893
|
+
}
|
|
17894
|
+
const parsedInit = { input, init };
|
|
17895
|
+
return [parsedInit, null];
|
|
17896
|
+
}
|
|
17897
|
+
catch (error) {
|
|
17898
|
+
return [null, error];
|
|
17899
|
+
}
|
|
17900
|
+
};
|
|
17901
|
+
const getUrlType = (url) => {
|
|
17902
|
+
for (const [apiType, apiTypeUrls] of Object.entries(DefaultInterceptUrlsMap)) {
|
|
17903
|
+
if (apiTypeUrls.includes(url))
|
|
17904
|
+
return apiType;
|
|
17905
|
+
}
|
|
17906
|
+
// TODO: have a unknown type maybe ??
|
|
17907
|
+
return InterceptedApiType.ALL;
|
|
17908
|
+
};
|
|
17909
|
+
/**
|
|
17910
|
+
* Handle Api intercept event and simulate legacy onBeforeGetVizDataIntercept event
|
|
17911
|
+
*
|
|
17912
|
+
* embed sends -> ApiIntercept -> we send
|
|
17913
|
+
* ApiIntercept
|
|
17914
|
+
* OnBeforeGetVizDataIntercept (if url is part of DefaultUrlMap.AnswerData)
|
|
17915
|
+
*
|
|
17916
|
+
* @param params
|
|
17917
|
+
* @returns
|
|
17918
|
+
*/
|
|
17919
|
+
const handleInterceptEvent = async (params) => {
|
|
17920
|
+
var _a, _b, _c, _d, _e;
|
|
17921
|
+
const { eventData, executeEvent, viewConfig, getUnsavedAnswerTml } = params;
|
|
17922
|
+
const [interceptData, bodyParseError] = parseInterceptData(eventData.data);
|
|
17923
|
+
if (bodyParseError) {
|
|
17924
|
+
executeEvent(EmbedEvent.Error, {
|
|
17925
|
+
error: 'Error parsing api intercept body',
|
|
17926
|
+
});
|
|
17927
|
+
logger$3.error('Error parsing request body', bodyParseError);
|
|
17928
|
+
return;
|
|
17929
|
+
}
|
|
17930
|
+
const { input: requestUrl, init } = interceptData;
|
|
17931
|
+
const sessionId = (_c = (_b = (_a = init === null || init === void 0 ? void 0 : init.body) === null || _a === void 0 ? void 0 : _a.variables) === null || _b === void 0 ? void 0 : _b.session) === null || _c === void 0 ? void 0 : _c.sessionId;
|
|
17932
|
+
const vizId = (_e = (_d = init === null || init === void 0 ? void 0 : init.body) === null || _d === void 0 ? void 0 : _d.variables) === null || _e === void 0 ? void 0 : _e.contextBookId;
|
|
17933
|
+
const answerDataUrls = DefaultInterceptUrlsMap[InterceptedApiType.AnswerData];
|
|
17934
|
+
const legacyInterceptEnabled = viewConfig.isOnBeforeGetVizDataInterceptEnabled;
|
|
17935
|
+
const isAnswerDataUrl = answerDataUrls.includes(requestUrl);
|
|
17936
|
+
const sendLegacyIntercept = isAnswerDataUrl && legacyInterceptEnabled;
|
|
17937
|
+
if (sendLegacyIntercept) {
|
|
17938
|
+
const answerTml = await getUnsavedAnswerTml({ sessionId, vizId });
|
|
17939
|
+
// Build the legacy payload for backwards compatibility
|
|
17940
|
+
const legacyPayload = {
|
|
17941
|
+
data: {
|
|
17942
|
+
data: answerTml,
|
|
17943
|
+
status: embedEventStatus.END,
|
|
17944
|
+
type: EmbedEvent.OnBeforeGetVizDataIntercept
|
|
17945
|
+
}
|
|
17946
|
+
};
|
|
17947
|
+
executeEvent(EmbedEvent.OnBeforeGetVizDataIntercept, legacyPayload);
|
|
17948
|
+
}
|
|
17949
|
+
const urlType = getUrlType(requestUrl);
|
|
17950
|
+
executeEvent(EmbedEvent.ApiIntercept, { ...interceptData, urlType });
|
|
17951
|
+
};
|
|
17952
|
+
/**
|
|
17953
|
+
* Support both the legacy and new format of the api intercept response
|
|
17954
|
+
* @param payload
|
|
17955
|
+
* @returns
|
|
17956
|
+
*/
|
|
17957
|
+
const processApiInterceptResponse = (payload) => {
|
|
17958
|
+
var _a;
|
|
17959
|
+
const isLegacyFormat = (_a = payload === null || payload === void 0 ? void 0 : payload.data) === null || _a === void 0 ? void 0 : _a.error;
|
|
17960
|
+
if (isLegacyFormat) {
|
|
17961
|
+
return processLegacyInterceptResponse(payload);
|
|
17962
|
+
}
|
|
17963
|
+
return payload;
|
|
17964
|
+
};
|
|
17965
|
+
const processLegacyInterceptResponse = (payload) => {
|
|
17966
|
+
var _a, _b, _c, _d, _e;
|
|
17967
|
+
const errorText = (_b = (_a = payload === null || payload === void 0 ? void 0 : payload.data) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.errorText;
|
|
17968
|
+
const errorDescription = (_d = (_c = payload === null || payload === void 0 ? void 0 : payload.data) === null || _c === void 0 ? void 0 : _c.error) === null || _d === void 0 ? void 0 : _d.errorDescription;
|
|
17969
|
+
const payloadToSend = {
|
|
17970
|
+
execute: (_e = payload === null || payload === void 0 ? void 0 : payload.data) === null || _e === void 0 ? void 0 : _e.execute,
|
|
17971
|
+
response: {
|
|
17972
|
+
body: {
|
|
17973
|
+
errors: [
|
|
17974
|
+
{
|
|
17975
|
+
title: errorText,
|
|
17976
|
+
description: errorDescription,
|
|
17977
|
+
isUserError: true,
|
|
17978
|
+
},
|
|
17979
|
+
],
|
|
17980
|
+
data: {},
|
|
17981
|
+
},
|
|
17982
|
+
},
|
|
17983
|
+
};
|
|
17984
|
+
return { data: payloadToSend };
|
|
17985
|
+
};
|
|
17986
|
+
|
|
17707
17987
|
/**
|
|
17708
17988
|
* Copyright (c) 2022
|
|
17709
17989
|
*
|
|
@@ -17757,6 +18037,19 @@ class TsEmbed {
|
|
|
17757
18037
|
*/
|
|
17758
18038
|
this.fullscreenChangeHandler = null;
|
|
17759
18039
|
this.subscribedListeners = {};
|
|
18040
|
+
this.messageEventListener = (event) => {
|
|
18041
|
+
const eventType = this.getEventType(event);
|
|
18042
|
+
const eventPort = this.getEventPort(event);
|
|
18043
|
+
const eventData = this.formatEventData(event, eventType);
|
|
18044
|
+
if (event.source === this.iFrame.contentWindow) {
|
|
18045
|
+
const processedEventData = processEventData(eventType, eventData, this.thoughtSpotHost, this.isPreRendered ? this.preRenderWrapper : this.el);
|
|
18046
|
+
if (eventType === EmbedEvent.ApiIntercept) {
|
|
18047
|
+
this.handleApiInterceptEvent({ eventData, eventPort });
|
|
18048
|
+
return;
|
|
18049
|
+
}
|
|
18050
|
+
this.executeCallbacks(eventType, processedEventData, eventPort);
|
|
18051
|
+
}
|
|
18052
|
+
};
|
|
17760
18053
|
/**
|
|
17761
18054
|
* Send Custom style as part of payload of APP_INIT
|
|
17762
18055
|
* @param _
|
|
@@ -17841,6 +18134,28 @@ class TsEmbed {
|
|
|
17841
18134
|
this.on(EmbedEvent.AuthInit, authInitHandler, { start: false }, true);
|
|
17842
18135
|
};
|
|
17843
18136
|
this.showPreRenderByDefault = false;
|
|
18137
|
+
/**
|
|
18138
|
+
* We can process the customer given payload before sending it to the embed port
|
|
18139
|
+
* Embed event handler -> responder -> createEmbedEventResponder -> send response
|
|
18140
|
+
* @param eventPort The event port for a specific MessageChannel
|
|
18141
|
+
* @param eventType The event type
|
|
18142
|
+
* @returns
|
|
18143
|
+
*/
|
|
18144
|
+
this.createEmbedEventResponder = (eventPort, eventType) => {
|
|
18145
|
+
const getPayloadToSend = (payload) => {
|
|
18146
|
+
if (eventType === EmbedEvent.OnBeforeGetVizDataIntercept) {
|
|
18147
|
+
return processLegacyInterceptResponse(payload);
|
|
18148
|
+
}
|
|
18149
|
+
if (eventType === EmbedEvent.ApiIntercept) {
|
|
18150
|
+
return processApiInterceptResponse(payload);
|
|
18151
|
+
}
|
|
18152
|
+
return payload;
|
|
18153
|
+
};
|
|
18154
|
+
return (payload) => {
|
|
18155
|
+
const payloadToSend = getPayloadToSend(payload);
|
|
18156
|
+
this.triggerEventOnPort(eventPort, payloadToSend);
|
|
18157
|
+
};
|
|
18158
|
+
};
|
|
17844
18159
|
/**
|
|
17845
18160
|
* @hidden
|
|
17846
18161
|
* Internal state to track if the embed container is loaded.
|
|
@@ -18021,21 +18336,24 @@ class TsEmbed {
|
|
|
18021
18336
|
this.subscribedListeners.online = onlineEventListener;
|
|
18022
18337
|
this.subscribedListeners.offline = offlineEventListener;
|
|
18023
18338
|
}
|
|
18339
|
+
handleApiInterceptEvent({ eventData, eventPort }) {
|
|
18340
|
+
const executeEvent = (_eventType, data) => {
|
|
18341
|
+
this.executeCallbacks(_eventType, data, eventPort);
|
|
18342
|
+
};
|
|
18343
|
+
const getUnsavedAnswerTml = async (props) => {
|
|
18344
|
+
var _a, _b;
|
|
18345
|
+
const response = await this.triggerUIPassThrough(UIPassthroughEvent.GetUnsavedAnswerTML, props);
|
|
18346
|
+
return (_b = (_a = response.filter((item) => item.value)) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.value;
|
|
18347
|
+
};
|
|
18348
|
+
handleInterceptEvent({ eventData, executeEvent, viewConfig: this.viewConfig, getUnsavedAnswerTml });
|
|
18349
|
+
}
|
|
18024
18350
|
/**
|
|
18025
18351
|
* Subscribe to message events that depend on successful iframe setup
|
|
18026
18352
|
*/
|
|
18027
18353
|
subscribeToMessageEvents() {
|
|
18028
18354
|
this.unsubscribeToMessageEvents();
|
|
18029
|
-
|
|
18030
|
-
|
|
18031
|
-
const eventPort = this.getEventPort(event);
|
|
18032
|
-
const eventData = this.formatEventData(event, eventType);
|
|
18033
|
-
if (event.source === this.iFrame.contentWindow) {
|
|
18034
|
-
this.executeCallbacks(eventType, processEventData(eventType, eventData, this.thoughtSpotHost, this.isPreRendered ? this.preRenderWrapper : this.el), eventPort);
|
|
18035
|
-
}
|
|
18036
|
-
};
|
|
18037
|
-
window.addEventListener('message', messageEventListener);
|
|
18038
|
-
this.subscribedListeners.message = messageEventListener;
|
|
18355
|
+
window.addEventListener('message', this.messageEventListener);
|
|
18356
|
+
this.subscribedListeners.message = this.messageEventListener;
|
|
18039
18357
|
}
|
|
18040
18358
|
/**
|
|
18041
18359
|
* Adds event listeners for both network and message events.
|
|
@@ -18096,7 +18414,7 @@ class TsEmbed {
|
|
|
18096
18414
|
message: customActionsResult.errors,
|
|
18097
18415
|
});
|
|
18098
18416
|
}
|
|
18099
|
-
|
|
18417
|
+
const baseInitData = {
|
|
18100
18418
|
customisations: getCustomisations(this.embedConfig, this.viewConfig),
|
|
18101
18419
|
authToken,
|
|
18102
18420
|
runtimeFilterParams: this.viewConfig.excludeRuntimeFiltersfromURL
|
|
@@ -18114,7 +18432,9 @@ class TsEmbed {
|
|
|
18114
18432
|
customVariablesForThirdPartyTools: this.embedConfig.customVariablesForThirdPartyTools || {},
|
|
18115
18433
|
hiddenListColumns: this.viewConfig.hiddenListColumns || [],
|
|
18116
18434
|
customActions: customActionsResult.actions,
|
|
18435
|
+
...getInterceptInitData(this.viewConfig),
|
|
18117
18436
|
};
|
|
18437
|
+
return baseInitData;
|
|
18118
18438
|
}
|
|
18119
18439
|
async getAppInitData() {
|
|
18120
18440
|
return this.getDefaultAppInitData();
|
|
@@ -18135,7 +18455,7 @@ class TsEmbed {
|
|
|
18135
18455
|
}
|
|
18136
18456
|
getUpdateEmbedParamsObject() {
|
|
18137
18457
|
let queryParams = this.getEmbedParamsObject();
|
|
18138
|
-
queryParams = { ...this.viewConfig, ...queryParams };
|
|
18458
|
+
queryParams = { ...this.viewConfig, ...queryParams, ...this.getAppInitData() };
|
|
18139
18459
|
return queryParams;
|
|
18140
18460
|
}
|
|
18141
18461
|
/**
|
|
@@ -18543,9 +18863,8 @@ class TsEmbed {
|
|
|
18543
18863
|
// When start status is false it trigger only end releated
|
|
18544
18864
|
// payload
|
|
18545
18865
|
|| (!callbackObj.options.start && dataStatus === embedEventStatus.END)) {
|
|
18546
|
-
|
|
18547
|
-
|
|
18548
|
-
});
|
|
18866
|
+
const responder = this.createEmbedEventResponder(eventPort, eventType);
|
|
18867
|
+
callbackObj.callback(data, responder);
|
|
18549
18868
|
}
|
|
18550
18869
|
});
|
|
18551
18870
|
}
|
|
@@ -19312,7 +19631,7 @@ let SearchEmbed$1 = class SearchEmbed extends TsEmbed {
|
|
|
19312
19631
|
}
|
|
19313
19632
|
getEmbedParamsObject() {
|
|
19314
19633
|
var _a;
|
|
19315
|
-
const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, hideSearchBar, dataPanelV2 = true, useLastSelectedSources = false, runtimeParameters, collapseSearchBarInitially = false, enableCustomColumnGroups = false,
|
|
19634
|
+
const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, hideSearchBar, dataPanelV2 = true, useLastSelectedSources = false, runtimeParameters, collapseSearchBarInitially = false, enableCustomColumnGroups = false, dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL, focusSearchBarOnRender = true, excludeRuntimeParametersfromURL, excludeSearchTokenStringFromURL, collapseSearchBar = true, } = this.viewConfig;
|
|
19316
19635
|
const queryParams = this.getBaseQueryParams();
|
|
19317
19636
|
queryParams[Param.HideActions] = [
|
|
19318
19637
|
...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : []),
|
|
@@ -19344,9 +19663,6 @@ let SearchEmbed$1 = class SearchEmbed extends TsEmbed {
|
|
|
19344
19663
|
if (hideSearchBar) {
|
|
19345
19664
|
queryParams[Param.HideSearchBar] = true;
|
|
19346
19665
|
}
|
|
19347
|
-
if (isOnBeforeGetVizDataInterceptEnabled) {
|
|
19348
|
-
queryParams[Param.IsOnBeforeGetVizDataInterceptEnabled] = isOnBeforeGetVizDataInterceptEnabled;
|
|
19349
|
-
}
|
|
19350
19666
|
if (!focusSearchBarOnRender) {
|
|
19351
19667
|
queryParams[Param.FocusSearchBarOnRender] = focusSearchBarOnRender;
|
|
19352
19668
|
}
|
|
@@ -19605,7 +19921,7 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
|
|
|
19605
19921
|
* embedded Liveboard or visualization.
|
|
19606
19922
|
*/
|
|
19607
19923
|
getEmbedParams() {
|
|
19608
|
-
const { tag, hideTagFilterChips, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideHamburger, hideObjectSearch, hideNotification, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 = true, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, hideHomepageLeftNav = false, modularHomeExperience = false, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, enable2ColumnLayout, enableCustomColumnGroups = false,
|
|
19924
|
+
const { tag, hideTagFilterChips, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideHamburger, hideObjectSearch, hideNotification, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 = true, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, 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, liveboardXLSXCSVDownload, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, isCentralizedLiveboardFilterUXEnabled = false, isLinkParametersEnabled, } = this.viewConfig;
|
|
19609
19925
|
let params = {};
|
|
19610
19926
|
params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
|
|
19611
19927
|
params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
|
|
@@ -19623,7 +19939,6 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
|
|
|
19623
19939
|
params[Param.HideIrrelevantFiltersInTab] = hideIrrelevantChipsInLiveboardTabs;
|
|
19624
19940
|
params[Param.IsUnifiedSearchExperienceEnabled] = isUnifiedSearchExperienceEnabled;
|
|
19625
19941
|
params[Param.CoverAndFilterOptionInPDF] = !!coverAndFilterOptionInPDF;
|
|
19626
|
-
params[Param.LiveboardXLSXCSVDownload] = !!liveboardXLSXCSVDownload;
|
|
19627
19942
|
params = this.getBaseQueryParams(params);
|
|
19628
19943
|
if (hideObjectSearch) {
|
|
19629
19944
|
params[Param.HideObjectSearch] = !!hideObjectSearch;
|
|
@@ -19659,9 +19974,6 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
|
|
|
19659
19974
|
if (enableAskSage) {
|
|
19660
19975
|
params[Param.enableAskSage] = enableAskSage;
|
|
19661
19976
|
}
|
|
19662
|
-
if (isOnBeforeGetVizDataInterceptEnabled) {
|
|
19663
|
-
params[Param.IsOnBeforeGetVizDataInterceptEnabled] = isOnBeforeGetVizDataInterceptEnabled;
|
|
19664
|
-
}
|
|
19665
19977
|
if (homePageSearchBarMode) {
|
|
19666
19978
|
params[Param.HomePageSearchBarMode] = homePageSearchBarMode;
|
|
19667
19979
|
}
|
|
@@ -19671,6 +19983,9 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
|
|
|
19671
19983
|
if (isLiveboardStylingAndGroupingEnabled !== undefined) {
|
|
19672
19984
|
params[Param.IsLiveboardStylingAndGroupingEnabled] = isLiveboardStylingAndGroupingEnabled;
|
|
19673
19985
|
}
|
|
19986
|
+
if (liveboardXLSXCSVDownload !== undefined) {
|
|
19987
|
+
params[Param.LiveboardXLSXCSVDownload] = !!liveboardXLSXCSVDownload;
|
|
19988
|
+
}
|
|
19674
19989
|
if (isPNGInScheduledEmailsEnabled !== undefined) {
|
|
19675
19990
|
params[Param.isPNGInScheduledEmailsEnabled] = isPNGInScheduledEmailsEnabled;
|
|
19676
19991
|
}
|
|
@@ -20037,7 +20352,7 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
|
|
|
20037
20352
|
getEmbedParamsObject() {
|
|
20038
20353
|
let params = {};
|
|
20039
20354
|
params = this.getBaseQueryParams(params);
|
|
20040
|
-
const { enableVizTransformations, fullHeight, defaultHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, isEnhancedFilterInteractivityEnabled = false, enableAskSage, enable2ColumnLayout, dataPanelV2 = true, enableCustomColumnGroups = false, oAuthPollingInterval, isForceRedirect, dataSourceId, coverAndFilterOptionInPDF = false, liveboardXLSXCSVDownload
|
|
20355
|
+
const { enableVizTransformations, fullHeight, defaultHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, isEnhancedFilterInteractivityEnabled = false, enableAskSage, enable2ColumnLayout, dataPanelV2 = true, enableCustomColumnGroups = false, oAuthPollingInterval, isForceRedirect, dataSourceId, coverAndFilterOptionInPDF = false, liveboardXLSXCSVDownload, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, showSpotterLimitations, isCentralizedLiveboardFilterUXEnabled = false, isLinkParametersEnabled, } = this.viewConfig;
|
|
20041
20356
|
const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
|
|
20042
20357
|
|| this.viewConfig.preventPinboardFilterRemoval;
|
|
20043
20358
|
if (fullHeight === true) {
|
|
@@ -20117,7 +20432,9 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
|
|
|
20117
20432
|
params[Param.DataPanelV2Enabled] = dataPanelV2;
|
|
20118
20433
|
params[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
|
|
20119
20434
|
params[Param.CoverAndFilterOptionInPDF] = coverAndFilterOptionInPDF;
|
|
20120
|
-
|
|
20435
|
+
if (liveboardXLSXCSVDownload !== undefined) {
|
|
20436
|
+
params[Param.LiveboardXLSXCSVDownload] = !!liveboardXLSXCSVDownload;
|
|
20437
|
+
}
|
|
20121
20438
|
getQueryParamString(params, true);
|
|
20122
20439
|
return params;
|
|
20123
20440
|
}
|
|
@@ -20868,7 +21185,7 @@ let SpotterEmbed$1 = class SpotterEmbed extends TsEmbed {
|
|
|
20868
21185
|
return queryParams;
|
|
20869
21186
|
}
|
|
20870
21187
|
getIframeSrc() {
|
|
20871
|
-
const { worksheetId, searchOptions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, enablePastConversationsSidebar } = this.viewConfig;
|
|
21188
|
+
const { worksheetId, searchOptions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, enablePastConversationsSidebar, } = this.viewConfig;
|
|
20872
21189
|
const path = 'insights/conv-assist';
|
|
20873
21190
|
const queryParams = this.getEmbedParamsObject();
|
|
20874
21191
|
if (!isUndefined_1(enablePastConversationsSidebar)) {
|