@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.
Files changed (178) hide show
  1. package/cjs/package.json +1 -1
  2. package/cjs/src/api-intercept.d.ts +51 -0
  3. package/cjs/src/api-intercept.d.ts.map +1 -0
  4. package/cjs/src/api-intercept.js +180 -0
  5. package/cjs/src/api-intercept.js.map +1 -0
  6. package/cjs/src/api-intercept.spec.d.ts +2 -0
  7. package/cjs/src/api-intercept.spec.d.ts.map +1 -0
  8. package/cjs/src/api-intercept.spec.js +672 -0
  9. package/cjs/src/api-intercept.spec.js.map +1 -0
  10. package/cjs/src/css-variables.d.ts +4 -0
  11. package/cjs/src/css-variables.d.ts.map +1 -1
  12. package/cjs/src/embed/app.d.ts +0 -5
  13. package/cjs/src/embed/app.d.ts.map +1 -1
  14. package/cjs/src/embed/app.js +4 -5
  15. package/cjs/src/embed/app.js.map +1 -1
  16. package/cjs/src/embed/app.spec.js +10 -0
  17. package/cjs/src/embed/app.spec.js.map +1 -1
  18. package/cjs/src/embed/conversation.d.ts +2 -2
  19. package/cjs/src/embed/conversation.js +1 -1
  20. package/cjs/src/embed/conversation.js.map +1 -1
  21. package/cjs/src/embed/conversation.spec.js +17 -0
  22. package/cjs/src/embed/conversation.spec.js.map +1 -1
  23. package/cjs/src/embed/hostEventClient/contracts.d.ts +11 -1
  24. package/cjs/src/embed/hostEventClient/contracts.d.ts.map +1 -1
  25. package/cjs/src/embed/hostEventClient/contracts.js +1 -0
  26. package/cjs/src/embed/hostEventClient/contracts.js.map +1 -1
  27. package/cjs/src/embed/liveboard.d.ts.map +1 -1
  28. package/cjs/src/embed/liveboard.js +4 -2
  29. package/cjs/src/embed/liveboard.js.map +1 -1
  30. package/cjs/src/embed/liveboard.spec.js +11 -0
  31. package/cjs/src/embed/liveboard.spec.js.map +1 -1
  32. package/cjs/src/embed/search.d.ts +0 -7
  33. package/cjs/src/embed/search.d.ts.map +1 -1
  34. package/cjs/src/embed/search.js +1 -4
  35. package/cjs/src/embed/search.js.map +1 -1
  36. package/cjs/src/embed/ts-embed.d.ts +10 -0
  37. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  38. package/cjs/src/embed/ts-embed.js +56 -15
  39. package/cjs/src/embed/ts-embed.js.map +1 -1
  40. package/cjs/src/embed/ts-embed.spec.d.ts.map +1 -1
  41. package/cjs/src/embed/ts-embed.spec.js +412 -238
  42. package/cjs/src/embed/ts-embed.spec.js.map +1 -1
  43. package/cjs/src/index.d.ts +2 -2
  44. package/cjs/src/index.d.ts.map +1 -1
  45. package/cjs/src/index.js +2 -1
  46. package/cjs/src/index.js.map +1 -1
  47. package/cjs/src/react/all-types-export.d.ts +1 -1
  48. package/cjs/src/react/all-types-export.d.ts.map +1 -1
  49. package/cjs/src/react/all-types-export.js +2 -1
  50. package/cjs/src/react/all-types-export.js.map +1 -1
  51. package/cjs/src/types.d.ts +244 -88
  52. package/cjs/src/types.d.ts.map +1 -1
  53. package/cjs/src/types.js +181 -70
  54. package/cjs/src/types.js.map +1 -1
  55. package/cjs/src/utils/logger.d.ts.map +1 -1
  56. package/cjs/src/utils/logger.js +1 -2
  57. package/cjs/src/utils/logger.js.map +1 -1
  58. package/cjs/src/utils/processData.d.ts +1 -1
  59. package/cjs/src/utils/processData.d.ts.map +1 -1
  60. package/cjs/src/utils/processData.js +8 -8
  61. package/cjs/src/utils/processData.js.map +1 -1
  62. package/cjs/src/utils/processData.spec.js.map +1 -1
  63. package/dist/{index-HZ94j9Ey.js → index-CpkMygsc.js} +1 -1
  64. package/dist/src/api-intercept.d.ts +51 -0
  65. package/dist/src/api-intercept.d.ts.map +1 -0
  66. package/dist/src/api-intercept.spec.d.ts +2 -0
  67. package/dist/src/api-intercept.spec.d.ts.map +1 -0
  68. package/dist/src/css-variables.d.ts +4 -0
  69. package/dist/src/css-variables.d.ts.map +1 -1
  70. package/dist/src/embed/app.d.ts +0 -5
  71. package/dist/src/embed/app.d.ts.map +1 -1
  72. package/dist/src/embed/conversation.d.ts +2 -2
  73. package/dist/src/embed/hostEventClient/contracts.d.ts +11 -1
  74. package/dist/src/embed/hostEventClient/contracts.d.ts.map +1 -1
  75. package/dist/src/embed/liveboard.d.ts.map +1 -1
  76. package/dist/src/embed/search.d.ts +0 -7
  77. package/dist/src/embed/search.d.ts.map +1 -1
  78. package/dist/src/embed/ts-embed.d.ts +10 -0
  79. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  80. package/dist/src/embed/ts-embed.spec.d.ts.map +1 -1
  81. package/dist/src/index.d.ts +2 -2
  82. package/dist/src/index.d.ts.map +1 -1
  83. package/dist/src/react/all-types-export.d.ts +1 -1
  84. package/dist/src/react/all-types-export.d.ts.map +1 -1
  85. package/dist/src/types.d.ts +244 -88
  86. package/dist/src/types.d.ts.map +1 -1
  87. package/dist/src/utils/logger.d.ts.map +1 -1
  88. package/dist/src/utils/processData.d.ts +1 -1
  89. package/dist/src/utils/processData.d.ts.map +1 -1
  90. package/dist/tsembed-react.es.js +435 -118
  91. package/dist/tsembed-react.js +434 -117
  92. package/dist/tsembed.es.js +3577 -3260
  93. package/dist/tsembed.js +3575 -3258
  94. package/dist/visual-embed-sdk-react-full.d.ts +271 -103
  95. package/dist/visual-embed-sdk-react.d.ts +268 -103
  96. package/dist/visual-embed-sdk.d.ts +271 -103
  97. package/lib/package.json +1 -1
  98. package/lib/src/api-intercept.d.ts +51 -0
  99. package/lib/src/api-intercept.d.ts.map +1 -0
  100. package/lib/src/api-intercept.js +173 -0
  101. package/lib/src/api-intercept.js.map +1 -0
  102. package/lib/src/api-intercept.spec.d.ts +2 -0
  103. package/lib/src/api-intercept.spec.d.ts.map +1 -0
  104. package/lib/src/api-intercept.spec.js +669 -0
  105. package/lib/src/api-intercept.spec.js.map +1 -0
  106. package/lib/src/css-variables.d.ts +4 -0
  107. package/lib/src/css-variables.d.ts.map +1 -1
  108. package/lib/src/embed/app.d.ts +0 -5
  109. package/lib/src/embed/app.d.ts.map +1 -1
  110. package/lib/src/embed/app.js +4 -5
  111. package/lib/src/embed/app.js.map +1 -1
  112. package/lib/src/embed/app.spec.js +10 -0
  113. package/lib/src/embed/app.spec.js.map +1 -1
  114. package/lib/src/embed/conversation.d.ts +2 -2
  115. package/lib/src/embed/conversation.js +1 -1
  116. package/lib/src/embed/conversation.js.map +1 -1
  117. package/lib/src/embed/conversation.spec.js +17 -0
  118. package/lib/src/embed/conversation.spec.js.map +1 -1
  119. package/lib/src/embed/hostEventClient/contracts.d.ts +11 -1
  120. package/lib/src/embed/hostEventClient/contracts.d.ts.map +1 -1
  121. package/lib/src/embed/hostEventClient/contracts.js +1 -0
  122. package/lib/src/embed/hostEventClient/contracts.js.map +1 -1
  123. package/lib/src/embed/liveboard.d.ts.map +1 -1
  124. package/lib/src/embed/liveboard.js +4 -2
  125. package/lib/src/embed/liveboard.js.map +1 -1
  126. package/lib/src/embed/liveboard.spec.js +11 -0
  127. package/lib/src/embed/liveboard.spec.js.map +1 -1
  128. package/lib/src/embed/search.d.ts +0 -7
  129. package/lib/src/embed/search.d.ts.map +1 -1
  130. package/lib/src/embed/search.js +1 -4
  131. package/lib/src/embed/search.js.map +1 -1
  132. package/lib/src/embed/ts-embed.d.ts +10 -0
  133. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  134. package/lib/src/embed/ts-embed.js +56 -15
  135. package/lib/src/embed/ts-embed.js.map +1 -1
  136. package/lib/src/embed/ts-embed.spec.d.ts.map +1 -1
  137. package/lib/src/embed/ts-embed.spec.js +412 -238
  138. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  139. package/lib/src/index.d.ts +2 -2
  140. package/lib/src/index.d.ts.map +1 -1
  141. package/lib/src/index.js +2 -2
  142. package/lib/src/index.js.map +1 -1
  143. package/lib/src/react/all-types-export.d.ts +1 -1
  144. package/lib/src/react/all-types-export.d.ts.map +1 -1
  145. package/lib/src/react/all-types-export.js +1 -1
  146. package/lib/src/react/all-types-export.js.map +1 -1
  147. package/lib/src/types.d.ts +244 -88
  148. package/lib/src/types.d.ts.map +1 -1
  149. package/lib/src/types.js +180 -69
  150. package/lib/src/types.js.map +1 -1
  151. package/lib/src/utils/logger.d.ts.map +1 -1
  152. package/lib/src/utils/logger.js +1 -2
  153. package/lib/src/utils/logger.js.map +1 -1
  154. package/lib/src/utils/processData.d.ts +1 -1
  155. package/lib/src/utils/processData.d.ts.map +1 -1
  156. package/lib/src/utils/processData.js +8 -8
  157. package/lib/src/utils/processData.js.map +1 -1
  158. package/lib/src/utils/processData.spec.js.map +1 -1
  159. package/package.json +1 -1
  160. package/src/api-intercept.spec.ts +856 -0
  161. package/src/api-intercept.ts +204 -0
  162. package/src/css-variables.ts +5 -0
  163. package/src/embed/app.spec.ts +11 -0
  164. package/src/embed/app.ts +5 -16
  165. package/src/embed/conversation.spec.ts +22 -0
  166. package/src/embed/conversation.ts +3 -3
  167. package/src/embed/hostEventClient/contracts.ts +10 -0
  168. package/src/embed/liveboard.spec.ts +12 -0
  169. package/src/embed/liveboard.ts +6 -2
  170. package/src/embed/search.ts +1 -14
  171. package/src/embed/ts-embed.spec.ts +498 -250
  172. package/src/embed/ts-embed.ts +80 -32
  173. package/src/index.ts +2 -0
  174. package/src/react/all-types-export.ts +1 -0
  175. package/src/types.ts +327 -165
  176. package/src/utils/logger.ts +1 -2
  177. package/src/utils/processData.spec.ts +0 -1
  178. package/src/utils/processData.ts +10 -11
@@ -1,4 +1,4 @@
1
- /* @thoughtspot/visual-embed-sdk version 1.43.0 */
1
+ /* @thoughtspot/visual-embed-sdk version 1.43.1 */
2
2
  'use client';
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) :
@@ -1496,21 +1496,24 @@
1496
1496
 
1497
1497
  * Prerequisite: Set `isOnBeforeGetVizDataInterceptEnabled` to `true`
1498
1498
  * for this embed event to get emitted.
1499
- * @param: payload
1500
- * @param: responder
1499
+ * @param:payload The payload received from the embed related to the Data API call.
1500
+ * @param:responder
1501
1501
  * Contains elements that lets developers define whether ThoughtSpot
1502
1502
  * should run the search, and if not, what error message
1503
1503
  * should be shown to the user.
1504
1504
  *
1505
- * execute: When execute returns `true`, the search will be run.
1505
+ * `execute` - When execute returns `true`, the search will be run.
1506
1506
  * When execute returns `false`, the search will not be executed.
1507
1507
  *
1508
- * error: Developers can customize the error message text when `execute`
1509
- * returns `false` using the error parameter in responder.
1508
+ * `error` - Developers can customize the error message text when `execute`
1509
+ * is `false` using the `errorText` and `errorDescription` parameters in responder.
1510
+ *
1511
+ * `errorText` - The error message text to be shown to the user.
1512
+ * `errorDescription (ThoughtSpot: 10.15.0.cl and above)` - The error description to be shown to the user.
1510
1513
  * @version SDK : 1.29.0 | ThoughtSpot: 10.3.0.cl
1511
1514
  * @example
1512
1515
  *```js
1513
- * .on(EmbedEvent.OnBeforeGetVizDataIntercept,
1516
+ * embed.on(EmbedEvent.OnBeforeGetVizDataIntercept,
1514
1517
  * (payload, responder) => {
1515
1518
  * responder({
1516
1519
  * data: {
@@ -1526,7 +1529,7 @@
1526
1529
  * ```
1527
1530
  *
1528
1531
  *```js
1529
- * .on(EmbedEvent.OnBeforeGetVizDataIntercept,
1532
+ * embed.on(EmbedEvent.OnBeforeGetVizDataIntercept,
1530
1533
  * (payload, responder) => {
1531
1534
  * const query = payload.data.data.answer.search_query
1532
1535
  * responder({
@@ -1537,7 +1540,8 @@
1537
1540
  * error: {
1538
1541
  * //Provide a custom error message to explain to your end user
1539
1542
  * // why their search did not run, and which searches are accepted by your custom logic.
1540
- * errorText: "You can't use this query :" + query + ".
1543
+ * errorText: "Error Occurred",
1544
+ * errorDescription: "You can't use this query :" + query + ".
1541
1545
  * The 'sales' measures can never be used at the 'county' level.
1542
1546
  * Please try another measure, or remove 'county' from your search."
1543
1547
  * }
@@ -1601,17 +1605,17 @@
1601
1605
  */
1602
1606
  EmbedEvent["TableVizRendered"] = "TableVizRendered";
1603
1607
  /**
1604
- * Emitted when the liveboard is created from pin modal or Liveboard list page.
1605
- * You can use this event as a hook to trigger
1606
- * other events on liveboard creation.
1607
- *
1608
- * ```js
1609
- * liveboardEmbed.on(EmbedEvent.CreateLiveboard, (payload) => {
1610
- * console.log('payload', payload);
1611
- * })
1612
- *```
1613
- * @version SDK : 1.37.0 | ThoughtSpot: 10.8.0.cl
1614
- */
1608
+ * Emitted when the liveboard is created from pin modal or Liveboard list page.
1609
+ * You can use this event as a hook to trigger
1610
+ * other events on liveboard creation.
1611
+ *
1612
+ * ```js
1613
+ * liveboardEmbed.on(EmbedEvent.CreateLiveboard, (payload) => {
1614
+ * console.log('payload', payload);
1615
+ * })
1616
+ *```
1617
+ * @version SDK : 1.37.0 | ThoughtSpot: 10.8.0.cl
1618
+ */
1615
1619
  EmbedEvent["CreateLiveboard"] = "createLiveboard";
1616
1620
  /**
1617
1621
  * Emitted when a user creates a Model.
@@ -1707,6 +1711,17 @@
1707
1711
  * @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
1708
1712
  */
1709
1713
  EmbedEvent["SpotterInit"] = "spotterInit";
1714
+ /**
1715
+ * Emitted when a *Spotter* conversation has been successfully created.
1716
+ * @example
1717
+ * ```js
1718
+ * spotterEmbed.on(EmbedEvent.SpotterLoadComplete, (payload) => {
1719
+ * console.log('payload', payload);
1720
+ * })
1721
+ *```
1722
+ * @version SDK: 1.44.0 | ThoughtSpot: 26.2.0.cl
1723
+ */
1724
+ EmbedEvent["SpotterLoadComplete"] = "spotterLoadComplete";
1710
1725
  /**
1711
1726
  * @hidden
1712
1727
  * Triggers when the embed listener is ready to receive events.
@@ -1730,6 +1745,72 @@
1730
1745
  * @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
1731
1746
  */
1732
1747
  EmbedEvent["OrgSwitched"] = "orgSwitched";
1748
+ /**
1749
+ * Emitted when the user intercepts a URL.
1750
+ *
1751
+ * Supported on all embed types.
1752
+ *
1753
+ * @example
1754
+ *
1755
+ * ```js
1756
+ * embed.on(EmbedEvent.ApiIntercept, (payload, responder) => {
1757
+ * console.log('payload', payload);
1758
+ * responder({
1759
+ * data: {
1760
+ * execute: false,
1761
+ * error: {
1762
+ * errorText: 'Error Occurred',
1763
+ * }
1764
+ * }
1765
+ * })
1766
+ * })
1767
+ * ```
1768
+ *
1769
+ * ```js
1770
+ * // We can also send a response for the intercepted api
1771
+ * embed.on(EmbedEvent.ApiIntercept, (payload, responder) => {
1772
+ * console.log('payload', payload);
1773
+ * responder({
1774
+ * data: {
1775
+ * execute: false,
1776
+ * response: {
1777
+ * body: {
1778
+ * data: {
1779
+ * // Some api response
1780
+ * },
1781
+ * }
1782
+ * }
1783
+ * }
1784
+ * })
1785
+ * })
1786
+ *
1787
+ * // here embed will use the response from the responder as the response for the api
1788
+ * ```
1789
+ *
1790
+ * ```js
1791
+ * // We can also send error in response for the intercepted api
1792
+ * embed.on(EmbedEvent.ApiIntercept, (payload, responder) => {
1793
+ * console.log('payload', payload);
1794
+ * responder({
1795
+ * data: {
1796
+ * execute: false,
1797
+ * response: {
1798
+ * body: {
1799
+ * errors: [{
1800
+ * title: 'Error Occurred',
1801
+ * description: 'Error Description',
1802
+ * isUserError: true,
1803
+ * }],
1804
+ * data: {},
1805
+ * },
1806
+ * }
1807
+ * }
1808
+ * })
1809
+ * })
1810
+ * ```
1811
+ * @version SDK: 1.43.0 | ThoughtSpot: 10.15.0.cl
1812
+ */
1813
+ EmbedEvent["ApiIntercept"] = "ApiIntercept";
1733
1814
  })(exports.EmbedEvent || (exports.EmbedEvent = {}));
1734
1815
  /**
1735
1816
  * Event types that can be triggered by the host application
@@ -2197,14 +2278,14 @@
2197
2278
  * ```
2198
2279
  * @example
2199
2280
  * ```js
2200
- * // You can use the Data event dispatched on each answer creation to get the vizId and use in MakeACopy host event.
2201
- * let latestSpotterVizId = '';
2202
- * spotterEmbed.on(EmbedEvent.Data, (payload) => {
2203
- * latestSpotterVizId = payload.data.id;
2204
- * });
2205
- *
2206
- * spotterEmbed.trigger(HostEvent.MakeACopy, { vizId: latestSpotterVizId });
2207
- * ```
2281
+ * // You can use the Data event dispatched on each answer creation to get the vizId and use in MakeACopy host event.
2282
+ * let latestSpotterVizId = '';
2283
+ * spotterEmbed.on(EmbedEvent.Data, (payload) => {
2284
+ * latestSpotterVizId = payload.data.id;
2285
+ * });
2286
+ *
2287
+ * spotterEmbed.trigger(HostEvent.MakeACopy, { vizId: latestSpotterVizId });
2288
+ * ```
2208
2289
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2209
2290
  */
2210
2291
  HostEvent["MakeACopy"] = "makeACopy";
@@ -2428,14 +2509,14 @@
2428
2509
  * embed.trigger(HostEvent.Download)
2429
2510
  * ```
2430
2511
  * ```js
2431
- * // You can use the Data event dispatched on each answer creation to get the vizId and use in Download host event.
2432
- * let latestSpotterVizId = '';
2433
- * spotterEmbed.on(EmbedEvent.Data, (payload) => {
2434
- * latestSpotterVizId = payload.data.id;
2435
- * });
2436
- *
2437
- * spotterEmbed.trigger(HostEvent.Download, { vizId: latestSpotterVizId });
2438
- * ```
2512
+ * // You can use the Data event dispatched on each answer creation to get the vizId and use in Download host event.
2513
+ * let latestSpotterVizId = '';
2514
+ * spotterEmbed.on(EmbedEvent.Data, (payload) => {
2515
+ * latestSpotterVizId = payload.data.id;
2516
+ * });
2517
+ *
2518
+ * spotterEmbed.trigger(HostEvent.Download, { vizId: latestSpotterVizId });
2519
+ * ```
2439
2520
  * @deprecated from SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl ,9.4.1.sw
2440
2521
  * Use {@link DownloadAsPng}
2441
2522
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
@@ -2453,13 +2534,13 @@
2453
2534
  *
2454
2535
  * searchEmbed.trigger(HostEvent.DownloadAsPng)
2455
2536
  *
2456
- * // You can use the Data event dispatched on each answer creation to get the vizId and use in DownloadAsPng host event.
2457
- * let latestSpotterVizId = '';
2458
- * spotterEmbed.on(EmbedEvent.Data, (payload) => {
2459
- * latestSpotterVizId = payload.data.id;
2460
- * });
2461
- *
2462
- * spotterEmbed.trigger(HostEvent.DownloadAsPng, { vizId: latestSpotterVizId });
2537
+ * // You can use the Data event dispatched on each answer creation to get the vizId and use in DownloadAsPng host event.
2538
+ * let latestSpotterVizId = '';
2539
+ * spotterEmbed.on(EmbedEvent.Data, (payload) => {
2540
+ * latestSpotterVizId = payload.data.id;
2541
+ * });
2542
+ *
2543
+ * spotterEmbed.trigger(HostEvent.DownloadAsPng, { vizId: latestSpotterVizId });
2463
2544
  * ```
2464
2545
  *
2465
2546
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.1.sw
@@ -2481,13 +2562,13 @@
2481
2562
  * searchEmbed.trigger(HostEvent.DownloadAsCsv)
2482
2563
  * ```
2483
2564
  * ```js
2484
- * // You can use the Data event dispatched on each answer creation to get the vizId and use in DownloadAsCsv host event.
2485
- * let latestSpotterVizId = '';
2486
- * spotterEmbed.on(EmbedEvent.Data, (payload) => {
2487
- * latestSpotterVizId = payload.data.id;
2488
- * });
2489
- *
2490
- * spotterEmbed.trigger(HostEvent.DownloadAsCsv, { vizId: latestSpotterVizId });
2565
+ * // You can use the Data event dispatched on each answer creation to get the vizId and use in DownloadAsCsv host event.
2566
+ * let latestSpotterVizId = '';
2567
+ * spotterEmbed.on(EmbedEvent.Data, (payload) => {
2568
+ * latestSpotterVizId = payload.data.id;
2569
+ * });
2570
+ *
2571
+ * spotterEmbed.trigger(HostEvent.DownloadAsCsv, { vizId: latestSpotterVizId });
2491
2572
  * ```
2492
2573
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
2493
2574
  */
@@ -2508,13 +2589,13 @@
2508
2589
  * searchEmbed.trigger(HostEvent.DownloadAsXlsx)
2509
2590
  * ```
2510
2591
  * ```js
2511
- * // You can use the Data event dispatched on each answer creation to get the vizId and use in DownloadAsXlsx host event.
2512
- * let latestSpotterVizId = '';
2513
- * spotterEmbed.on(EmbedEvent.Data, (payload) => {
2514
- * latestSpotterVizId = payload.data.id;
2515
- * });
2516
- *
2517
- * spotterEmbed.trigger(HostEvent.DownloadAsXlsx, { vizId: latestSpotterVizId });
2592
+ * // You can use the Data event dispatched on each answer creation to get the vizId and use in DownloadAsXlsx host event.
2593
+ * let latestSpotterVizId = '';
2594
+ * spotterEmbed.on(EmbedEvent.Data, (payload) => {
2595
+ * latestSpotterVizId = payload.data.id;
2596
+ * });
2597
+ *
2598
+ * spotterEmbed.trigger(HostEvent.DownloadAsXlsx, { vizId: latestSpotterVizId });
2518
2599
  * ```
2519
2600
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
2520
2601
  */
@@ -2879,13 +2960,13 @@
2879
2960
  * });
2880
2961
  *```
2881
2962
  *```js
2882
- * // You can use the Data event dispatched on each answer creation to get the vizId and use in GetParameters host event.
2883
- * let latestSpotterVizId = '';
2884
- * spotterEmbed.on(EmbedEvent.Data, (payload) => {
2885
- * latestSpotterVizId = payload.data.id;
2886
- * });
2887
- *
2888
- * spotterEmbed.trigger(HostEvent.GetParameters, { vizId: latestSpotterVizId });
2963
+ * // You can use the Data event dispatched on each answer creation to get the vizId and use in GetParameters host event.
2964
+ * let latestSpotterVizId = '';
2965
+ * spotterEmbed.on(EmbedEvent.Data, (payload) => {
2966
+ * latestSpotterVizId = payload.data.id;
2967
+ * });
2968
+ *
2969
+ * spotterEmbed.trigger(HostEvent.GetParameters, { vizId: latestSpotterVizId });
2889
2970
  *```
2890
2971
  * @version SDK: 1.29.0 | ThoughtSpot: 10.1.0.cl, 10.1.0.sw
2891
2972
  */
@@ -2934,8 +3015,8 @@
2934
3015
  * spotterEmbed.on(EmbedEvent.Data, (payload) => {
2935
3016
  * latestSpotterVizId = payload.data.id;
2936
3017
  * });
2937
- *
2938
- * spotterEmbed.trigger(HostEvent.SaveAnswer, { vizId: latestSpotterVizId });
3018
+ *
3019
+ * spotterEmbed.trigger(HostEvent.SaveAnswer, { vizId: latestSpotterVizId });
2939
3020
  * ```
2940
3021
  * @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
2941
3022
  */
@@ -3026,8 +3107,8 @@
3026
3107
  * spotterEmbed.on(EmbedEvent.Data, (payload) => {
3027
3108
  * latestSpotterVizId = payload.data.id;
3028
3109
  * });
3029
- *
3030
- * spotterEmbed.trigger(HostEvent.AnswerChartSwitcher, { vizId: latestSpotterVizId });
3110
+ *
3111
+ * spotterEmbed.trigger(HostEvent.AnswerChartSwitcher, { vizId: latestSpotterVizId });
3031
3112
  *```
3032
3113
  * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
3033
3114
  */
@@ -3064,8 +3145,8 @@
3064
3145
  * spotterEmbed.on(EmbedEvent.Data, (payload) => {
3065
3146
  * latestSpotterVizId = payload.data.id;
3066
3147
  * });
3067
- *
3068
- * spotterEmbed.trigger(HostEvent.AskSpotter, { vizId: latestSpotterVizId });
3148
+ *
3149
+ * spotterEmbed.trigger(HostEvent.AskSpotter, { vizId: latestSpotterVizId });
3069
3150
  * ```
3070
3151
  * @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
3071
3152
  */
@@ -3089,6 +3170,18 @@
3089
3170
  * @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
3090
3171
  */
3091
3172
  HostEvent["DestroyEmbed"] = "EmbedDestroyed";
3173
+ /** Triggers a create new conversation operation in spotter embed.
3174
+ * @example
3175
+ * ```js
3176
+ * This feature is available only when chat history is enabled on your ThoughtSpot instance.
3177
+ * Contact your admin or ThoughtSpot Support to enable chat history on your instance.
3178
+ * @example
3179
+ * ```js
3180
+ * spotterEmbed.trigger(HostEvent.StartNewSpotterConversation);
3181
+ * ```
3182
+ * @version SDK: 1.45.0 | ThoughtSpot: 26.2.0.cl
3183
+ */
3184
+ HostEvent["StartNewSpotterConversation"] = "StartNewSpotterConversation";
3092
3185
  })(exports.HostEvent || (exports.HostEvent = {}));
3093
3186
  /**
3094
3187
  * The different visual modes that the data sources panel within
@@ -4676,7 +4769,25 @@
4676
4769
  * @version SDK: 1.26.7 | ThoughtSpot Cloud: 9.10.0.cl
4677
4770
  */
4678
4771
  LogLevel["TRACE"] = "TRACE";
4679
- })(exports.LogLevel || (exports.LogLevel = {}));
4772
+ })(exports.LogLevel || (exports.LogLevel = {}));
4773
+ /**
4774
+ * Enum for the type of API intercepted
4775
+ */
4776
+ var InterceptedApiType;
4777
+ (function (InterceptedApiType) {
4778
+ /**
4779
+ * The apis that are use to get the data for the embed
4780
+ */
4781
+ InterceptedApiType["AnswerData"] = "AnswerData";
4782
+ /**
4783
+ * This will intercept all the apis
4784
+ */
4785
+ InterceptedApiType["ALL"] = "ALL";
4786
+ /**
4787
+ * The apis that are use to get the data for the liveboard
4788
+ */
4789
+ InterceptedApiType["LiveboardData"] = "LiveboardData";
4790
+ })(InterceptedApiType || (InterceptedApiType = {}));
4680
4791
 
4681
4792
  const logFunctions = {
4682
4793
  [exports.LogLevel.SILENT]: () => undefined,
@@ -4714,7 +4825,7 @@
4714
4825
  canLog(logLevel) {
4715
4826
  if (logLevel === exports.LogLevel.SILENT)
4716
4827
  return false;
4717
- if (!isUndefined$1(globalLogLevelOverride)) {
4828
+ if (globalLogLevelOverride !== undefined) {
4718
4829
  return compareLogLevels(globalLogLevelOverride, logLevel) >= 0;
4719
4830
  }
4720
4831
  return compareLogLevels(this.logLevel, logLevel) >= 0;
@@ -7439,6 +7550,17 @@
7439
7550
 
7440
7551
  var isEmpty_1 = isEmpty$1;
7441
7552
 
7553
+ var UIPassthroughEvent;
7554
+ (function (UIPassthroughEvent) {
7555
+ UIPassthroughEvent["PinAnswerToLiveboard"] = "addVizToPinboard";
7556
+ UIPassthroughEvent["SaveAnswer"] = "saveAnswer";
7557
+ UIPassthroughEvent["GetDiscoverabilityStatus"] = "getDiscoverabilityStatus";
7558
+ UIPassthroughEvent["GetAvailableUIPassthroughs"] = "getAvailableUiPassthroughs";
7559
+ UIPassthroughEvent["GetAnswerConfig"] = "getAnswerPageConfig";
7560
+ UIPassthroughEvent["GetLiveboardConfig"] = "getPinboardPageConfig";
7561
+ UIPassthroughEvent["GetUnsavedAnswerTML"] = "getUnsavedAnswerTML";
7562
+ })(UIPassthroughEvent || (UIPassthroughEvent = {}));
7563
+
7442
7564
  const ERROR_MESSAGE = {
7443
7565
  INVALID_THOUGHTSPOT_HOST: 'Error parsing ThoughtSpot host. Please provide a valid URL.',
7444
7566
  SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND: 'Please select a Model to get started',
@@ -17533,27 +17655,27 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
17533
17655
  * @param thoughtSpotHost
17534
17656
  * @param containerEl
17535
17657
  */
17536
- function processEventData(type, e, thoughtSpotHost, containerEl) {
17658
+ function processEventData(type, eventData, thoughtSpotHost, containerEl) {
17537
17659
  switch (type) {
17538
17660
  case exports.EmbedEvent.CustomAction:
17539
- return processCustomAction(e, thoughtSpotHost);
17661
+ return processCustomAction(eventData, thoughtSpotHost);
17540
17662
  case exports.EmbedEvent.AuthInit:
17541
- return processAuthInit(e);
17663
+ return processAuthInit(eventData);
17542
17664
  case exports.EmbedEvent.NoCookieAccess:
17543
- return processNoCookieAccess(e, containerEl);
17665
+ return processNoCookieAccess(eventData, containerEl);
17544
17666
  case exports.EmbedEvent.AuthFailure:
17545
- return processAuthFailure(e, containerEl);
17667
+ return processAuthFailure(eventData, containerEl);
17546
17668
  case exports.EmbedEvent.AuthLogout:
17547
- return processAuthLogout(e, containerEl);
17669
+ return processAuthLogout(eventData, containerEl);
17548
17670
  case exports.EmbedEvent.ExitPresentMode:
17549
17671
  return processExitPresentMode();
17550
17672
  case exports.EmbedEvent.CLEAR_INFO_CACHE:
17551
17673
  return processClearInfoCache();
17552
17674
  }
17553
- return e;
17675
+ return eventData;
17554
17676
  }
17555
17677
 
17556
- var name="@thoughtspot/visual-embed-sdk";var version$1="1.43.0";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","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$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};
17678
+ 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$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","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$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};
17557
17679
 
17558
17680
  /**
17559
17681
  * Reloads the ThoughtSpot iframe.
@@ -17625,16 +17747,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
17625
17747
  });
17626
17748
  }
17627
17749
 
17628
- var UIPassthroughEvent;
17629
- (function (UIPassthroughEvent) {
17630
- UIPassthroughEvent["PinAnswerToLiveboard"] = "addVizToPinboard";
17631
- UIPassthroughEvent["SaveAnswer"] = "saveAnswer";
17632
- UIPassthroughEvent["GetDiscoverabilityStatus"] = "getDiscoverabilityStatus";
17633
- UIPassthroughEvent["GetAvailableUIPassthroughs"] = "getAvailableUiPassthroughs";
17634
- UIPassthroughEvent["GetAnswerConfig"] = "getAnswerPageConfig";
17635
- UIPassthroughEvent["GetLiveboardConfig"] = "getPinboardPageConfig";
17636
- })(UIPassthroughEvent || (UIPassthroughEvent = {}));
17637
-
17638
17750
  class HostEventClient {
17639
17751
  constructor(iFrame) {
17640
17752
  this.iFrame = iFrame;
@@ -17726,6 +17838,174 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
17726
17838
  }
17727
17839
  }
17728
17840
 
17841
+ const DefaultInterceptUrlsMap = {
17842
+ [InterceptedApiType.AnswerData]: [
17843
+ '/prism/?op=GetChartWithData',
17844
+ '/prism/?op=GetTableWithHeadlineData',
17845
+ '/prism/?op=GetTableWithData',
17846
+ ],
17847
+ [InterceptedApiType.LiveboardData]: [
17848
+ '/prism/?op=LoadContextBook'
17849
+ ],
17850
+ };
17851
+ const formatInterceptUrl = (url) => {
17852
+ const host = getThoughtSpotHost(getEmbedConfig());
17853
+ if (url.startsWith('/'))
17854
+ return `${host}${url}`;
17855
+ return url;
17856
+ };
17857
+ /**
17858
+ * Converts user passed url values to proper urls
17859
+ * [ANSER_DATA] => ['https://host/pris/op?=op']
17860
+ * @param interceptUrls
17861
+ * @returns
17862
+ */
17863
+ const processInterceptUrls = (interceptUrls) => {
17864
+ let processedUrls = [...interceptUrls];
17865
+ Object.entries(DefaultInterceptUrlsMap).forEach(([apiType, apiTypeUrls]) => {
17866
+ if (!processedUrls.includes(apiType))
17867
+ return;
17868
+ processedUrls = processedUrls.filter(url => url !== apiType);
17869
+ processedUrls = [...processedUrls, ...apiTypeUrls];
17870
+ });
17871
+ return processedUrls.map(url => formatInterceptUrl(url));
17872
+ };
17873
+ /**
17874
+ * Returns the data to be sent to embed to setup intercepts
17875
+ * the urls to intercept, timeout etc
17876
+ * @param viewConfig
17877
+ * @returns
17878
+ */
17879
+ const getInterceptInitData = (viewConfig) => {
17880
+ const combinedUrls = [...(viewConfig.interceptUrls || [])];
17881
+ if (viewConfig.isOnBeforeGetVizDataInterceptEnabled) {
17882
+ combinedUrls.push(InterceptedApiType.AnswerData);
17883
+ }
17884
+ const shouldInterceptAll = combinedUrls.includes(InterceptedApiType.ALL);
17885
+ const interceptUrls = shouldInterceptAll ? [InterceptedApiType.ALL] : processInterceptUrls(combinedUrls);
17886
+ const interceptTimeout = viewConfig.interceptTimeout;
17887
+ return {
17888
+ interceptUrls,
17889
+ interceptTimeout,
17890
+ };
17891
+ };
17892
+ const parseJson = (jsonString) => {
17893
+ try {
17894
+ const json = JSON.parse(jsonString);
17895
+ return [json, null];
17896
+ }
17897
+ catch (error) {
17898
+ return [null, error];
17899
+ }
17900
+ };
17901
+ /**
17902
+ * Parse the api intercept data and return the parsed data and error if any
17903
+ * Embed returns the input and init from the fetch call
17904
+ */
17905
+ const parseInterceptData = (eventDataString) => {
17906
+ try {
17907
+ const [parsedData, error] = parseJson(eventDataString);
17908
+ if (error) {
17909
+ return [null, error];
17910
+ }
17911
+ const { input, init } = parsedData;
17912
+ const [parsedBody, bodyParseError] = parseJson(init.body);
17913
+ if (!bodyParseError) {
17914
+ init.body = parsedBody;
17915
+ }
17916
+ const parsedInit = { input, init };
17917
+ return [parsedInit, null];
17918
+ }
17919
+ catch (error) {
17920
+ return [null, error];
17921
+ }
17922
+ };
17923
+ const getUrlType = (url) => {
17924
+ for (const [apiType, apiTypeUrls] of Object.entries(DefaultInterceptUrlsMap)) {
17925
+ if (apiTypeUrls.includes(url))
17926
+ return apiType;
17927
+ }
17928
+ // TODO: have a unknown type maybe ??
17929
+ return InterceptedApiType.ALL;
17930
+ };
17931
+ /**
17932
+ * Handle Api intercept event and simulate legacy onBeforeGetVizDataIntercept event
17933
+ *
17934
+ * embed sends -> ApiIntercept -> we send
17935
+ * ApiIntercept
17936
+ * OnBeforeGetVizDataIntercept (if url is part of DefaultUrlMap.AnswerData)
17937
+ *
17938
+ * @param params
17939
+ * @returns
17940
+ */
17941
+ const handleInterceptEvent = async (params) => {
17942
+ var _a, _b, _c, _d, _e;
17943
+ const { eventData, executeEvent, viewConfig, getUnsavedAnswerTml } = params;
17944
+ const [interceptData, bodyParseError] = parseInterceptData(eventData.data);
17945
+ if (bodyParseError) {
17946
+ executeEvent(exports.EmbedEvent.Error, {
17947
+ error: 'Error parsing api intercept body',
17948
+ });
17949
+ logger$3.error('Error parsing request body', bodyParseError);
17950
+ return;
17951
+ }
17952
+ const { input: requestUrl, init } = interceptData;
17953
+ 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;
17954
+ 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;
17955
+ const answerDataUrls = DefaultInterceptUrlsMap[InterceptedApiType.AnswerData];
17956
+ const legacyInterceptEnabled = viewConfig.isOnBeforeGetVizDataInterceptEnabled;
17957
+ const isAnswerDataUrl = answerDataUrls.includes(requestUrl);
17958
+ const sendLegacyIntercept = isAnswerDataUrl && legacyInterceptEnabled;
17959
+ if (sendLegacyIntercept) {
17960
+ const answerTml = await getUnsavedAnswerTml({ sessionId, vizId });
17961
+ // Build the legacy payload for backwards compatibility
17962
+ const legacyPayload = {
17963
+ data: {
17964
+ data: answerTml,
17965
+ status: embedEventStatus.END,
17966
+ type: exports.EmbedEvent.OnBeforeGetVizDataIntercept
17967
+ }
17968
+ };
17969
+ executeEvent(exports.EmbedEvent.OnBeforeGetVizDataIntercept, legacyPayload);
17970
+ }
17971
+ const urlType = getUrlType(requestUrl);
17972
+ executeEvent(exports.EmbedEvent.ApiIntercept, { ...interceptData, urlType });
17973
+ };
17974
+ /**
17975
+ * Support both the legacy and new format of the api intercept response
17976
+ * @param payload
17977
+ * @returns
17978
+ */
17979
+ const processApiInterceptResponse = (payload) => {
17980
+ var _a;
17981
+ const isLegacyFormat = (_a = payload === null || payload === void 0 ? void 0 : payload.data) === null || _a === void 0 ? void 0 : _a.error;
17982
+ if (isLegacyFormat) {
17983
+ return processLegacyInterceptResponse(payload);
17984
+ }
17985
+ return payload;
17986
+ };
17987
+ const processLegacyInterceptResponse = (payload) => {
17988
+ var _a, _b, _c, _d, _e;
17989
+ 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;
17990
+ 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;
17991
+ const payloadToSend = {
17992
+ execute: (_e = payload === null || payload === void 0 ? void 0 : payload.data) === null || _e === void 0 ? void 0 : _e.execute,
17993
+ response: {
17994
+ body: {
17995
+ errors: [
17996
+ {
17997
+ title: errorText,
17998
+ description: errorDescription,
17999
+ isUserError: true,
18000
+ },
18001
+ ],
18002
+ data: {},
18003
+ },
18004
+ },
18005
+ };
18006
+ return { data: payloadToSend };
18007
+ };
18008
+
17729
18009
  /**
17730
18010
  * Copyright (c) 2022
17731
18011
  *
@@ -17779,6 +18059,19 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
17779
18059
  */
17780
18060
  this.fullscreenChangeHandler = null;
17781
18061
  this.subscribedListeners = {};
18062
+ this.messageEventListener = (event) => {
18063
+ const eventType = this.getEventType(event);
18064
+ const eventPort = this.getEventPort(event);
18065
+ const eventData = this.formatEventData(event, eventType);
18066
+ if (event.source === this.iFrame.contentWindow) {
18067
+ const processedEventData = processEventData(eventType, eventData, this.thoughtSpotHost, this.isPreRendered ? this.preRenderWrapper : this.el);
18068
+ if (eventType === exports.EmbedEvent.ApiIntercept) {
18069
+ this.handleApiInterceptEvent({ eventData, eventPort });
18070
+ return;
18071
+ }
18072
+ this.executeCallbacks(eventType, processedEventData, eventPort);
18073
+ }
18074
+ };
17782
18075
  /**
17783
18076
  * Send Custom style as part of payload of APP_INIT
17784
18077
  * @param _
@@ -17863,6 +18156,28 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
17863
18156
  this.on(exports.EmbedEvent.AuthInit, authInitHandler, { start: false }, true);
17864
18157
  };
17865
18158
  this.showPreRenderByDefault = false;
18159
+ /**
18160
+ * We can process the customer given payload before sending it to the embed port
18161
+ * Embed event handler -> responder -> createEmbedEventResponder -> send response
18162
+ * @param eventPort The event port for a specific MessageChannel
18163
+ * @param eventType The event type
18164
+ * @returns
18165
+ */
18166
+ this.createEmbedEventResponder = (eventPort, eventType) => {
18167
+ const getPayloadToSend = (payload) => {
18168
+ if (eventType === exports.EmbedEvent.OnBeforeGetVizDataIntercept) {
18169
+ return processLegacyInterceptResponse(payload);
18170
+ }
18171
+ if (eventType === exports.EmbedEvent.ApiIntercept) {
18172
+ return processApiInterceptResponse(payload);
18173
+ }
18174
+ return payload;
18175
+ };
18176
+ return (payload) => {
18177
+ const payloadToSend = getPayloadToSend(payload);
18178
+ this.triggerEventOnPort(eventPort, payloadToSend);
18179
+ };
18180
+ };
17866
18181
  /**
17867
18182
  * @hidden
17868
18183
  * Internal state to track if the embed container is loaded.
@@ -18043,21 +18358,24 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
18043
18358
  this.subscribedListeners.online = onlineEventListener;
18044
18359
  this.subscribedListeners.offline = offlineEventListener;
18045
18360
  }
18361
+ handleApiInterceptEvent({ eventData, eventPort }) {
18362
+ const executeEvent = (_eventType, data) => {
18363
+ this.executeCallbacks(_eventType, data, eventPort);
18364
+ };
18365
+ const getUnsavedAnswerTml = async (props) => {
18366
+ var _a, _b;
18367
+ const response = await this.triggerUIPassThrough(UIPassthroughEvent.GetUnsavedAnswerTML, props);
18368
+ return (_b = (_a = response.filter((item) => item.value)) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.value;
18369
+ };
18370
+ handleInterceptEvent({ eventData, executeEvent, viewConfig: this.viewConfig, getUnsavedAnswerTml });
18371
+ }
18046
18372
  /**
18047
18373
  * Subscribe to message events that depend on successful iframe setup
18048
18374
  */
18049
18375
  subscribeToMessageEvents() {
18050
18376
  this.unsubscribeToMessageEvents();
18051
- const messageEventListener = (event) => {
18052
- const eventType = this.getEventType(event);
18053
- const eventPort = this.getEventPort(event);
18054
- const eventData = this.formatEventData(event, eventType);
18055
- if (event.source === this.iFrame.contentWindow) {
18056
- this.executeCallbacks(eventType, processEventData(eventType, eventData, this.thoughtSpotHost, this.isPreRendered ? this.preRenderWrapper : this.el), eventPort);
18057
- }
18058
- };
18059
- window.addEventListener('message', messageEventListener);
18060
- this.subscribedListeners.message = messageEventListener;
18377
+ window.addEventListener('message', this.messageEventListener);
18378
+ this.subscribedListeners.message = this.messageEventListener;
18061
18379
  }
18062
18380
  /**
18063
18381
  * Adds event listeners for both network and message events.
@@ -18118,7 +18436,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
18118
18436
  message: customActionsResult.errors,
18119
18437
  });
18120
18438
  }
18121
- return {
18439
+ const baseInitData = {
18122
18440
  customisations: getCustomisations(this.embedConfig, this.viewConfig),
18123
18441
  authToken,
18124
18442
  runtimeFilterParams: this.viewConfig.excludeRuntimeFiltersfromURL
@@ -18136,7 +18454,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
18136
18454
  customVariablesForThirdPartyTools: this.embedConfig.customVariablesForThirdPartyTools || {},
18137
18455
  hiddenListColumns: this.viewConfig.hiddenListColumns || [],
18138
18456
  customActions: customActionsResult.actions,
18457
+ ...getInterceptInitData(this.viewConfig),
18139
18458
  };
18459
+ return baseInitData;
18140
18460
  }
18141
18461
  async getAppInitData() {
18142
18462
  return this.getDefaultAppInitData();
@@ -18157,7 +18477,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
18157
18477
  }
18158
18478
  getUpdateEmbedParamsObject() {
18159
18479
  let queryParams = this.getEmbedParamsObject();
18160
- queryParams = { ...this.viewConfig, ...queryParams };
18480
+ queryParams = { ...this.viewConfig, ...queryParams, ...this.getAppInitData() };
18161
18481
  return queryParams;
18162
18482
  }
18163
18483
  /**
@@ -18565,9 +18885,8 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
18565
18885
  // When start status is false it trigger only end releated
18566
18886
  // payload
18567
18887
  || (!callbackObj.options.start && dataStatus === embedEventStatus.END)) {
18568
- callbackObj.callback(data, (payload) => {
18569
- this.triggerEventOnPort(eventPort, payload);
18570
- });
18888
+ const responder = this.createEmbedEventResponder(eventPort, eventType);
18889
+ callbackObj.callback(data, responder);
18571
18890
  }
18572
18891
  });
18573
18892
  }
@@ -19334,7 +19653,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
19334
19653
  }
19335
19654
  getEmbedParamsObject() {
19336
19655
  var _a;
19337
- const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, hideSearchBar, dataPanelV2 = true, useLastSelectedSources = false, runtimeParameters, collapseSearchBarInitially = false, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false, dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL, focusSearchBarOnRender = true, excludeRuntimeParametersfromURL, excludeSearchTokenStringFromURL, collapseSearchBar = true, } = this.viewConfig;
19656
+ 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;
19338
19657
  const queryParams = this.getBaseQueryParams();
19339
19658
  queryParams[Param.HideActions] = [
19340
19659
  ...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : []),
@@ -19366,9 +19685,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
19366
19685
  if (hideSearchBar) {
19367
19686
  queryParams[Param.HideSearchBar] = true;
19368
19687
  }
19369
- if (isOnBeforeGetVizDataInterceptEnabled) {
19370
- queryParams[Param.IsOnBeforeGetVizDataInterceptEnabled] = isOnBeforeGetVizDataInterceptEnabled;
19371
- }
19372
19688
  if (!focusSearchBarOnRender) {
19373
19689
  queryParams[Param.FocusSearchBarOnRender] = focusSearchBarOnRender;
19374
19690
  }
@@ -19627,7 +19943,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
19627
19943
  * embedded Liveboard or visualization.
19628
19944
  */
19629
19945
  getEmbedParams() {
19630
- 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, isOnBeforeGetVizDataInterceptEnabled = 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 = false, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, isCentralizedLiveboardFilterUXEnabled = false, isLinkParametersEnabled, } = this.viewConfig;
19946
+ 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;
19631
19947
  let params = {};
19632
19948
  params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
19633
19949
  params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
@@ -19645,7 +19961,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
19645
19961
  params[Param.HideIrrelevantFiltersInTab] = hideIrrelevantChipsInLiveboardTabs;
19646
19962
  params[Param.IsUnifiedSearchExperienceEnabled] = isUnifiedSearchExperienceEnabled;
19647
19963
  params[Param.CoverAndFilterOptionInPDF] = !!coverAndFilterOptionInPDF;
19648
- params[Param.LiveboardXLSXCSVDownload] = !!liveboardXLSXCSVDownload;
19649
19964
  params = this.getBaseQueryParams(params);
19650
19965
  if (hideObjectSearch) {
19651
19966
  params[Param.HideObjectSearch] = !!hideObjectSearch;
@@ -19681,9 +19996,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
19681
19996
  if (enableAskSage) {
19682
19997
  params[Param.enableAskSage] = enableAskSage;
19683
19998
  }
19684
- if (isOnBeforeGetVizDataInterceptEnabled) {
19685
- params[Param.IsOnBeforeGetVizDataInterceptEnabled] = isOnBeforeGetVizDataInterceptEnabled;
19686
- }
19687
19999
  if (homePageSearchBarMode) {
19688
20000
  params[Param.HomePageSearchBarMode] = homePageSearchBarMode;
19689
20001
  }
@@ -19693,6 +20005,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
19693
20005
  if (isLiveboardStylingAndGroupingEnabled !== undefined) {
19694
20006
  params[Param.IsLiveboardStylingAndGroupingEnabled] = isLiveboardStylingAndGroupingEnabled;
19695
20007
  }
20008
+ if (liveboardXLSXCSVDownload !== undefined) {
20009
+ params[Param.LiveboardXLSXCSVDownload] = !!liveboardXLSXCSVDownload;
20010
+ }
19696
20011
  if (isPNGInScheduledEmailsEnabled !== undefined) {
19697
20012
  params[Param.isPNGInScheduledEmailsEnabled] = isPNGInScheduledEmailsEnabled;
19698
20013
  }
@@ -20059,7 +20374,7 @@ query GetEurekaVizSnapshots(
20059
20374
  getEmbedParamsObject() {
20060
20375
  let params = {};
20061
20376
  params = this.getBaseQueryParams(params);
20062
- 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 = false, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, showSpotterLimitations, isCentralizedLiveboardFilterUXEnabled = false, isLinkParametersEnabled, } = this.viewConfig;
20377
+ 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;
20063
20378
  const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
20064
20379
  || this.viewConfig.preventPinboardFilterRemoval;
20065
20380
  if (fullHeight === true) {
@@ -20139,7 +20454,9 @@ query GetEurekaVizSnapshots(
20139
20454
  params[Param.DataPanelV2Enabled] = dataPanelV2;
20140
20455
  params[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
20141
20456
  params[Param.CoverAndFilterOptionInPDF] = coverAndFilterOptionInPDF;
20142
- params[Param.LiveboardXLSXCSVDownload] = !!liveboardXLSXCSVDownload;
20457
+ if (liveboardXLSXCSVDownload !== undefined) {
20458
+ params[Param.LiveboardXLSXCSVDownload] = !!liveboardXLSXCSVDownload;
20459
+ }
20143
20460
  getQueryParamString(params, true);
20144
20461
  return params;
20145
20462
  }
@@ -20890,7 +21207,7 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
20890
21207
  return queryParams;
20891
21208
  }
20892
21209
  getIframeSrc() {
20893
- const { worksheetId, searchOptions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, enablePastConversationsSidebar } = this.viewConfig;
21210
+ const { worksheetId, searchOptions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, enablePastConversationsSidebar, } = this.viewConfig;
20894
21211
  const path = 'insights/conv-assist';
20895
21212
  const queryParams = this.getEmbedParamsObject();
20896
21213
  if (!isUndefined_1(enablePastConversationsSidebar)) {