@thoughtspot/visual-embed-sdk 1.43.0 → 1.44.0

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 (184) 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 +15 -5
  13. package/cjs/src/embed/app.d.ts.map +1 -1
  14. package/cjs/src/embed/app.js +7 -5
  15. package/cjs/src/embed/app.js.map +1 -1
  16. package/cjs/src/embed/app.spec.js +30 -0
  17. package/cjs/src/embed/app.spec.js.map +1 -1
  18. package/cjs/src/embed/conversation.d.ts +17 -2
  19. package/cjs/src/embed/conversation.d.ts.map +1 -1
  20. package/cjs/src/embed/conversation.js +5 -2
  21. package/cjs/src/embed/conversation.js.map +1 -1
  22. package/cjs/src/embed/conversation.spec.js +41 -0
  23. package/cjs/src/embed/conversation.spec.js.map +1 -1
  24. package/cjs/src/embed/hostEventClient/contracts.d.ts +11 -1
  25. package/cjs/src/embed/hostEventClient/contracts.d.ts.map +1 -1
  26. package/cjs/src/embed/hostEventClient/contracts.js +1 -0
  27. package/cjs/src/embed/hostEventClient/contracts.js.map +1 -1
  28. package/cjs/src/embed/liveboard.d.ts +15 -0
  29. package/cjs/src/embed/liveboard.d.ts.map +1 -1
  30. package/cjs/src/embed/liveboard.js +7 -2
  31. package/cjs/src/embed/liveboard.js.map +1 -1
  32. package/cjs/src/embed/liveboard.spec.js +33 -0
  33. package/cjs/src/embed/liveboard.spec.js.map +1 -1
  34. package/cjs/src/embed/search.d.ts +0 -7
  35. package/cjs/src/embed/search.d.ts.map +1 -1
  36. package/cjs/src/embed/search.js +1 -4
  37. package/cjs/src/embed/search.js.map +1 -1
  38. package/cjs/src/embed/ts-embed.d.ts +10 -0
  39. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  40. package/cjs/src/embed/ts-embed.js +56 -15
  41. package/cjs/src/embed/ts-embed.js.map +1 -1
  42. package/cjs/src/embed/ts-embed.spec.d.ts.map +1 -1
  43. package/cjs/src/embed/ts-embed.spec.js +412 -238
  44. package/cjs/src/embed/ts-embed.spec.js.map +1 -1
  45. package/cjs/src/index.d.ts +2 -2
  46. package/cjs/src/index.d.ts.map +1 -1
  47. package/cjs/src/index.js +2 -1
  48. package/cjs/src/index.js.map +1 -1
  49. package/cjs/src/react/all-types-export.d.ts +1 -1
  50. package/cjs/src/react/all-types-export.d.ts.map +1 -1
  51. package/cjs/src/react/all-types-export.js +2 -1
  52. package/cjs/src/react/all-types-export.js.map +1 -1
  53. package/cjs/src/types.d.ts +246 -89
  54. package/cjs/src/types.d.ts.map +1 -1
  55. package/cjs/src/types.js +182 -70
  56. package/cjs/src/types.js.map +1 -1
  57. package/cjs/src/utils/logger.d.ts.map +1 -1
  58. package/cjs/src/utils/logger.js +1 -2
  59. package/cjs/src/utils/logger.js.map +1 -1
  60. package/cjs/src/utils/processData.d.ts +1 -1
  61. package/cjs/src/utils/processData.d.ts.map +1 -1
  62. package/cjs/src/utils/processData.js +8 -8
  63. package/cjs/src/utils/processData.js.map +1 -1
  64. package/cjs/src/utils/processData.spec.js.map +1 -1
  65. package/dist/{index-HZ94j9Ey.js → index-B2QPwxuL.js} +1 -1
  66. package/dist/src/api-intercept.d.ts +51 -0
  67. package/dist/src/api-intercept.d.ts.map +1 -0
  68. package/dist/src/api-intercept.spec.d.ts +2 -0
  69. package/dist/src/api-intercept.spec.d.ts.map +1 -0
  70. package/dist/src/css-variables.d.ts +4 -0
  71. package/dist/src/css-variables.d.ts.map +1 -1
  72. package/dist/src/embed/app.d.ts +15 -5
  73. package/dist/src/embed/app.d.ts.map +1 -1
  74. package/dist/src/embed/conversation.d.ts +17 -2
  75. package/dist/src/embed/conversation.d.ts.map +1 -1
  76. package/dist/src/embed/hostEventClient/contracts.d.ts +11 -1
  77. package/dist/src/embed/hostEventClient/contracts.d.ts.map +1 -1
  78. package/dist/src/embed/liveboard.d.ts +15 -0
  79. package/dist/src/embed/liveboard.d.ts.map +1 -1
  80. package/dist/src/embed/search.d.ts +0 -7
  81. package/dist/src/embed/search.d.ts.map +1 -1
  82. package/dist/src/embed/ts-embed.d.ts +10 -0
  83. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  84. package/dist/src/embed/ts-embed.spec.d.ts.map +1 -1
  85. package/dist/src/index.d.ts +2 -2
  86. package/dist/src/index.d.ts.map +1 -1
  87. package/dist/src/react/all-types-export.d.ts +1 -1
  88. package/dist/src/react/all-types-export.d.ts.map +1 -1
  89. package/dist/src/types.d.ts +246 -89
  90. package/dist/src/types.d.ts.map +1 -1
  91. package/dist/src/utils/logger.d.ts.map +1 -1
  92. package/dist/src/utils/processData.d.ts +1 -1
  93. package/dist/src/utils/processData.d.ts.map +1 -1
  94. package/dist/tsembed-react.es.js +446 -119
  95. package/dist/tsembed-react.js +445 -118
  96. package/dist/tsembed.es.js +3588 -3261
  97. package/dist/tsembed.js +3586 -3259
  98. package/dist/visual-embed-sdk-react-full.d.ts +316 -103
  99. package/dist/visual-embed-sdk-react.d.ts +313 -103
  100. package/dist/visual-embed-sdk.d.ts +316 -103
  101. package/lib/package.json +1 -1
  102. package/lib/src/api-intercept.d.ts +51 -0
  103. package/lib/src/api-intercept.d.ts.map +1 -0
  104. package/lib/src/api-intercept.js +173 -0
  105. package/lib/src/api-intercept.js.map +1 -0
  106. package/lib/src/api-intercept.spec.d.ts +2 -0
  107. package/lib/src/api-intercept.spec.d.ts.map +1 -0
  108. package/lib/src/api-intercept.spec.js +669 -0
  109. package/lib/src/api-intercept.spec.js.map +1 -0
  110. package/lib/src/css-variables.d.ts +4 -0
  111. package/lib/src/css-variables.d.ts.map +1 -1
  112. package/lib/src/embed/app.d.ts +15 -5
  113. package/lib/src/embed/app.d.ts.map +1 -1
  114. package/lib/src/embed/app.js +8 -6
  115. package/lib/src/embed/app.js.map +1 -1
  116. package/lib/src/embed/app.spec.js +30 -0
  117. package/lib/src/embed/app.spec.js.map +1 -1
  118. package/lib/src/embed/conversation.d.ts +17 -2
  119. package/lib/src/embed/conversation.d.ts.map +1 -1
  120. package/lib/src/embed/conversation.js +5 -2
  121. package/lib/src/embed/conversation.js.map +1 -1
  122. package/lib/src/embed/conversation.spec.js +41 -0
  123. package/lib/src/embed/conversation.spec.js.map +1 -1
  124. package/lib/src/embed/hostEventClient/contracts.d.ts +11 -1
  125. package/lib/src/embed/hostEventClient/contracts.d.ts.map +1 -1
  126. package/lib/src/embed/hostEventClient/contracts.js +1 -0
  127. package/lib/src/embed/hostEventClient/contracts.js.map +1 -1
  128. package/lib/src/embed/liveboard.d.ts +15 -0
  129. package/lib/src/embed/liveboard.d.ts.map +1 -1
  130. package/lib/src/embed/liveboard.js +7 -2
  131. package/lib/src/embed/liveboard.js.map +1 -1
  132. package/lib/src/embed/liveboard.spec.js +33 -0
  133. package/lib/src/embed/liveboard.spec.js.map +1 -1
  134. package/lib/src/embed/search.d.ts +0 -7
  135. package/lib/src/embed/search.d.ts.map +1 -1
  136. package/lib/src/embed/search.js +1 -4
  137. package/lib/src/embed/search.js.map +1 -1
  138. package/lib/src/embed/ts-embed.d.ts +10 -0
  139. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  140. package/lib/src/embed/ts-embed.js +56 -15
  141. package/lib/src/embed/ts-embed.js.map +1 -1
  142. package/lib/src/embed/ts-embed.spec.d.ts.map +1 -1
  143. package/lib/src/embed/ts-embed.spec.js +412 -238
  144. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  145. package/lib/src/index.d.ts +2 -2
  146. package/lib/src/index.d.ts.map +1 -1
  147. package/lib/src/index.js +2 -2
  148. package/lib/src/index.js.map +1 -1
  149. package/lib/src/react/all-types-export.d.ts +1 -1
  150. package/lib/src/react/all-types-export.d.ts.map +1 -1
  151. package/lib/src/react/all-types-export.js +1 -1
  152. package/lib/src/react/all-types-export.js.map +1 -1
  153. package/lib/src/types.d.ts +246 -89
  154. package/lib/src/types.d.ts.map +1 -1
  155. package/lib/src/types.js +181 -69
  156. package/lib/src/types.js.map +1 -1
  157. package/lib/src/utils/logger.d.ts.map +1 -1
  158. package/lib/src/utils/logger.js +1 -2
  159. package/lib/src/utils/logger.js.map +1 -1
  160. package/lib/src/utils/processData.d.ts +1 -1
  161. package/lib/src/utils/processData.d.ts.map +1 -1
  162. package/lib/src/utils/processData.js +8 -8
  163. package/lib/src/utils/processData.js.map +1 -1
  164. package/lib/src/utils/processData.spec.js.map +1 -1
  165. package/package.json +1 -1
  166. package/src/api-intercept.spec.ts +856 -0
  167. package/src/api-intercept.ts +204 -0
  168. package/src/css-variables.ts +5 -0
  169. package/src/embed/app.spec.ts +41 -2
  170. package/src/embed/app.ts +48 -38
  171. package/src/embed/conversation.spec.ts +54 -0
  172. package/src/embed/conversation.ts +24 -3
  173. package/src/embed/hostEventClient/contracts.ts +10 -0
  174. package/src/embed/liveboard.spec.ts +41 -0
  175. package/src/embed/liveboard.ts +25 -2
  176. package/src/embed/search.ts +1 -14
  177. package/src/embed/ts-embed.spec.ts +498 -250
  178. package/src/embed/ts-embed.ts +80 -32
  179. package/src/index.ts +2 -0
  180. package/src/react/all-types-export.ts +1 -0
  181. package/src/types.ts +328 -165
  182. package/src/utils/logger.ts +1 -2
  183. package/src/utils/processData.spec.ts +0 -1
  184. 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.44.0 */
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
@@ -3241,6 +3334,7 @@
3241
3334
  Param["isCentralizedLiveboardFilterUXEnabled"] = "isCentralizedLiveboardFilterUXEnabled";
3242
3335
  Param["isLinkParametersEnabled"] = "isLinkParametersEnabled";
3243
3336
  Param["EnablePastConversationsSidebar"] = "enablePastConversationsSidebar";
3337
+ Param["UpdatedSpotterChatPrompt"] = "updatedSpotterChatPrompt";
3244
3338
  })(Param || (Param = {}));
3245
3339
  /**
3246
3340
  * ThoughtSpot application pages include actions and menu commands
@@ -4676,7 +4770,25 @@
4676
4770
  * @version SDK: 1.26.7 | ThoughtSpot Cloud: 9.10.0.cl
4677
4771
  */
4678
4772
  LogLevel["TRACE"] = "TRACE";
4679
- })(exports.LogLevel || (exports.LogLevel = {}));
4773
+ })(exports.LogLevel || (exports.LogLevel = {}));
4774
+ /**
4775
+ * Enum for the type of API intercepted
4776
+ */
4777
+ var InterceptedApiType;
4778
+ (function (InterceptedApiType) {
4779
+ /**
4780
+ * The apis that are use to get the data for the embed
4781
+ */
4782
+ InterceptedApiType["AnswerData"] = "AnswerData";
4783
+ /**
4784
+ * This will intercept all the apis
4785
+ */
4786
+ InterceptedApiType["ALL"] = "ALL";
4787
+ /**
4788
+ * The apis that are use to get the data for the liveboard
4789
+ */
4790
+ InterceptedApiType["LiveboardData"] = "LiveboardData";
4791
+ })(InterceptedApiType || (InterceptedApiType = {}));
4680
4792
 
4681
4793
  const logFunctions = {
4682
4794
  [exports.LogLevel.SILENT]: () => undefined,
@@ -4714,7 +4826,7 @@
4714
4826
  canLog(logLevel) {
4715
4827
  if (logLevel === exports.LogLevel.SILENT)
4716
4828
  return false;
4717
- if (!isUndefined$1(globalLogLevelOverride)) {
4829
+ if (globalLogLevelOverride !== undefined) {
4718
4830
  return compareLogLevels(globalLogLevelOverride, logLevel) >= 0;
4719
4831
  }
4720
4832
  return compareLogLevels(this.logLevel, logLevel) >= 0;
@@ -7439,6 +7551,17 @@
7439
7551
 
7440
7552
  var isEmpty_1 = isEmpty$1;
7441
7553
 
7554
+ var UIPassthroughEvent;
7555
+ (function (UIPassthroughEvent) {
7556
+ UIPassthroughEvent["PinAnswerToLiveboard"] = "addVizToPinboard";
7557
+ UIPassthroughEvent["SaveAnswer"] = "saveAnswer";
7558
+ UIPassthroughEvent["GetDiscoverabilityStatus"] = "getDiscoverabilityStatus";
7559
+ UIPassthroughEvent["GetAvailableUIPassthroughs"] = "getAvailableUiPassthroughs";
7560
+ UIPassthroughEvent["GetAnswerConfig"] = "getAnswerPageConfig";
7561
+ UIPassthroughEvent["GetLiveboardConfig"] = "getPinboardPageConfig";
7562
+ UIPassthroughEvent["GetUnsavedAnswerTML"] = "getUnsavedAnswerTML";
7563
+ })(UIPassthroughEvent || (UIPassthroughEvent = {}));
7564
+
7442
7565
  const ERROR_MESSAGE = {
7443
7566
  INVALID_THOUGHTSPOT_HOST: 'Error parsing ThoughtSpot host. Please provide a valid URL.',
7444
7567
  SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND: 'Please select a Model to get started',
@@ -17533,27 +17656,27 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
17533
17656
  * @param thoughtSpotHost
17534
17657
  * @param containerEl
17535
17658
  */
17536
- function processEventData(type, e, thoughtSpotHost, containerEl) {
17659
+ function processEventData(type, eventData, thoughtSpotHost, containerEl) {
17537
17660
  switch (type) {
17538
17661
  case exports.EmbedEvent.CustomAction:
17539
- return processCustomAction(e, thoughtSpotHost);
17662
+ return processCustomAction(eventData, thoughtSpotHost);
17540
17663
  case exports.EmbedEvent.AuthInit:
17541
- return processAuthInit(e);
17664
+ return processAuthInit(eventData);
17542
17665
  case exports.EmbedEvent.NoCookieAccess:
17543
- return processNoCookieAccess(e, containerEl);
17666
+ return processNoCookieAccess(eventData, containerEl);
17544
17667
  case exports.EmbedEvent.AuthFailure:
17545
- return processAuthFailure(e, containerEl);
17668
+ return processAuthFailure(eventData, containerEl);
17546
17669
  case exports.EmbedEvent.AuthLogout:
17547
- return processAuthLogout(e, containerEl);
17670
+ return processAuthLogout(eventData, containerEl);
17548
17671
  case exports.EmbedEvent.ExitPresentMode:
17549
17672
  return processExitPresentMode();
17550
17673
  case exports.EmbedEvent.CLEAR_INFO_CACHE:
17551
17674
  return processClearInfoCache();
17552
17675
  }
17553
- return e;
17676
+ return eventData;
17554
17677
  }
17555
17678
 
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};
17679
+ var name="@thoughtspot/visual-embed-sdk";var version$1="1.44.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};
17557
17680
 
17558
17681
  /**
17559
17682
  * Reloads the ThoughtSpot iframe.
@@ -17625,16 +17748,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
17625
17748
  });
17626
17749
  }
17627
17750
 
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
17751
  class HostEventClient {
17639
17752
  constructor(iFrame) {
17640
17753
  this.iFrame = iFrame;
@@ -17726,6 +17839,174 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
17726
17839
  }
17727
17840
  }
17728
17841
 
17842
+ const DefaultInterceptUrlsMap = {
17843
+ [InterceptedApiType.AnswerData]: [
17844
+ '/prism/?op=GetChartWithData',
17845
+ '/prism/?op=GetTableWithHeadlineData',
17846
+ '/prism/?op=GetTableWithData',
17847
+ ],
17848
+ [InterceptedApiType.LiveboardData]: [
17849
+ '/prism/?op=LoadContextBook'
17850
+ ],
17851
+ };
17852
+ const formatInterceptUrl = (url) => {
17853
+ const host = getThoughtSpotHost(getEmbedConfig());
17854
+ if (url.startsWith('/'))
17855
+ return `${host}${url}`;
17856
+ return url;
17857
+ };
17858
+ /**
17859
+ * Converts user passed url values to proper urls
17860
+ * [ANSER_DATA] => ['https://host/pris/op?=op']
17861
+ * @param interceptUrls
17862
+ * @returns
17863
+ */
17864
+ const processInterceptUrls = (interceptUrls) => {
17865
+ let processedUrls = [...interceptUrls];
17866
+ Object.entries(DefaultInterceptUrlsMap).forEach(([apiType, apiTypeUrls]) => {
17867
+ if (!processedUrls.includes(apiType))
17868
+ return;
17869
+ processedUrls = processedUrls.filter(url => url !== apiType);
17870
+ processedUrls = [...processedUrls, ...apiTypeUrls];
17871
+ });
17872
+ return processedUrls.map(url => formatInterceptUrl(url));
17873
+ };
17874
+ /**
17875
+ * Returns the data to be sent to embed to setup intercepts
17876
+ * the urls to intercept, timeout etc
17877
+ * @param viewConfig
17878
+ * @returns
17879
+ */
17880
+ const getInterceptInitData = (viewConfig) => {
17881
+ const combinedUrls = [...(viewConfig.interceptUrls || [])];
17882
+ if (viewConfig.isOnBeforeGetVizDataInterceptEnabled) {
17883
+ combinedUrls.push(InterceptedApiType.AnswerData);
17884
+ }
17885
+ const shouldInterceptAll = combinedUrls.includes(InterceptedApiType.ALL);
17886
+ const interceptUrls = shouldInterceptAll ? [InterceptedApiType.ALL] : processInterceptUrls(combinedUrls);
17887
+ const interceptTimeout = viewConfig.interceptTimeout;
17888
+ return {
17889
+ interceptUrls,
17890
+ interceptTimeout,
17891
+ };
17892
+ };
17893
+ const parseJson = (jsonString) => {
17894
+ try {
17895
+ const json = JSON.parse(jsonString);
17896
+ return [json, null];
17897
+ }
17898
+ catch (error) {
17899
+ return [null, error];
17900
+ }
17901
+ };
17902
+ /**
17903
+ * Parse the api intercept data and return the parsed data and error if any
17904
+ * Embed returns the input and init from the fetch call
17905
+ */
17906
+ const parseInterceptData = (eventDataString) => {
17907
+ try {
17908
+ const [parsedData, error] = parseJson(eventDataString);
17909
+ if (error) {
17910
+ return [null, error];
17911
+ }
17912
+ const { input, init } = parsedData;
17913
+ const [parsedBody, bodyParseError] = parseJson(init.body);
17914
+ if (!bodyParseError) {
17915
+ init.body = parsedBody;
17916
+ }
17917
+ const parsedInit = { input, init };
17918
+ return [parsedInit, null];
17919
+ }
17920
+ catch (error) {
17921
+ return [null, error];
17922
+ }
17923
+ };
17924
+ const getUrlType = (url) => {
17925
+ for (const [apiType, apiTypeUrls] of Object.entries(DefaultInterceptUrlsMap)) {
17926
+ if (apiTypeUrls.includes(url))
17927
+ return apiType;
17928
+ }
17929
+ // TODO: have a unknown type maybe ??
17930
+ return InterceptedApiType.ALL;
17931
+ };
17932
+ /**
17933
+ * Handle Api intercept event and simulate legacy onBeforeGetVizDataIntercept event
17934
+ *
17935
+ * embed sends -> ApiIntercept -> we send
17936
+ * ApiIntercept
17937
+ * OnBeforeGetVizDataIntercept (if url is part of DefaultUrlMap.AnswerData)
17938
+ *
17939
+ * @param params
17940
+ * @returns
17941
+ */
17942
+ const handleInterceptEvent = async (params) => {
17943
+ var _a, _b, _c, _d, _e;
17944
+ const { eventData, executeEvent, viewConfig, getUnsavedAnswerTml } = params;
17945
+ const [interceptData, bodyParseError] = parseInterceptData(eventData.data);
17946
+ if (bodyParseError) {
17947
+ executeEvent(exports.EmbedEvent.Error, {
17948
+ error: 'Error parsing api intercept body',
17949
+ });
17950
+ logger$3.error('Error parsing request body', bodyParseError);
17951
+ return;
17952
+ }
17953
+ const { input: requestUrl, init } = interceptData;
17954
+ 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;
17955
+ 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;
17956
+ const answerDataUrls = DefaultInterceptUrlsMap[InterceptedApiType.AnswerData];
17957
+ const legacyInterceptEnabled = viewConfig.isOnBeforeGetVizDataInterceptEnabled;
17958
+ const isAnswerDataUrl = answerDataUrls.includes(requestUrl);
17959
+ const sendLegacyIntercept = isAnswerDataUrl && legacyInterceptEnabled;
17960
+ if (sendLegacyIntercept) {
17961
+ const answerTml = await getUnsavedAnswerTml({ sessionId, vizId });
17962
+ // Build the legacy payload for backwards compatibility
17963
+ const legacyPayload = {
17964
+ data: {
17965
+ data: answerTml,
17966
+ status: embedEventStatus.END,
17967
+ type: exports.EmbedEvent.OnBeforeGetVizDataIntercept
17968
+ }
17969
+ };
17970
+ executeEvent(exports.EmbedEvent.OnBeforeGetVizDataIntercept, legacyPayload);
17971
+ }
17972
+ const urlType = getUrlType(requestUrl);
17973
+ executeEvent(exports.EmbedEvent.ApiIntercept, { ...interceptData, urlType });
17974
+ };
17975
+ /**
17976
+ * Support both the legacy and new format of the api intercept response
17977
+ * @param payload
17978
+ * @returns
17979
+ */
17980
+ const processApiInterceptResponse = (payload) => {
17981
+ var _a;
17982
+ const isLegacyFormat = (_a = payload === null || payload === void 0 ? void 0 : payload.data) === null || _a === void 0 ? void 0 : _a.error;
17983
+ if (isLegacyFormat) {
17984
+ return processLegacyInterceptResponse(payload);
17985
+ }
17986
+ return payload;
17987
+ };
17988
+ const processLegacyInterceptResponse = (payload) => {
17989
+ var _a, _b, _c, _d, _e;
17990
+ 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;
17991
+ 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;
17992
+ const payloadToSend = {
17993
+ execute: (_e = payload === null || payload === void 0 ? void 0 : payload.data) === null || _e === void 0 ? void 0 : _e.execute,
17994
+ response: {
17995
+ body: {
17996
+ errors: [
17997
+ {
17998
+ title: errorText,
17999
+ description: errorDescription,
18000
+ isUserError: true,
18001
+ },
18002
+ ],
18003
+ data: {},
18004
+ },
18005
+ },
18006
+ };
18007
+ return { data: payloadToSend };
18008
+ };
18009
+
17729
18010
  /**
17730
18011
  * Copyright (c) 2022
17731
18012
  *
@@ -17779,6 +18060,19 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
17779
18060
  */
17780
18061
  this.fullscreenChangeHandler = null;
17781
18062
  this.subscribedListeners = {};
18063
+ this.messageEventListener = (event) => {
18064
+ const eventType = this.getEventType(event);
18065
+ const eventPort = this.getEventPort(event);
18066
+ const eventData = this.formatEventData(event, eventType);
18067
+ if (event.source === this.iFrame.contentWindow) {
18068
+ const processedEventData = processEventData(eventType, eventData, this.thoughtSpotHost, this.isPreRendered ? this.preRenderWrapper : this.el);
18069
+ if (eventType === exports.EmbedEvent.ApiIntercept) {
18070
+ this.handleApiInterceptEvent({ eventData, eventPort });
18071
+ return;
18072
+ }
18073
+ this.executeCallbacks(eventType, processedEventData, eventPort);
18074
+ }
18075
+ };
17782
18076
  /**
17783
18077
  * Send Custom style as part of payload of APP_INIT
17784
18078
  * @param _
@@ -17863,6 +18157,28 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
17863
18157
  this.on(exports.EmbedEvent.AuthInit, authInitHandler, { start: false }, true);
17864
18158
  };
17865
18159
  this.showPreRenderByDefault = false;
18160
+ /**
18161
+ * We can process the customer given payload before sending it to the embed port
18162
+ * Embed event handler -> responder -> createEmbedEventResponder -> send response
18163
+ * @param eventPort The event port for a specific MessageChannel
18164
+ * @param eventType The event type
18165
+ * @returns
18166
+ */
18167
+ this.createEmbedEventResponder = (eventPort, eventType) => {
18168
+ const getPayloadToSend = (payload) => {
18169
+ if (eventType === exports.EmbedEvent.OnBeforeGetVizDataIntercept) {
18170
+ return processLegacyInterceptResponse(payload);
18171
+ }
18172
+ if (eventType === exports.EmbedEvent.ApiIntercept) {
18173
+ return processApiInterceptResponse(payload);
18174
+ }
18175
+ return payload;
18176
+ };
18177
+ return (payload) => {
18178
+ const payloadToSend = getPayloadToSend(payload);
18179
+ this.triggerEventOnPort(eventPort, payloadToSend);
18180
+ };
18181
+ };
17866
18182
  /**
17867
18183
  * @hidden
17868
18184
  * Internal state to track if the embed container is loaded.
@@ -18043,21 +18359,24 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
18043
18359
  this.subscribedListeners.online = onlineEventListener;
18044
18360
  this.subscribedListeners.offline = offlineEventListener;
18045
18361
  }
18362
+ handleApiInterceptEvent({ eventData, eventPort }) {
18363
+ const executeEvent = (_eventType, data) => {
18364
+ this.executeCallbacks(_eventType, data, eventPort);
18365
+ };
18366
+ const getUnsavedAnswerTml = async (props) => {
18367
+ var _a, _b;
18368
+ const response = await this.triggerUIPassThrough(UIPassthroughEvent.GetUnsavedAnswerTML, props);
18369
+ return (_b = (_a = response.filter((item) => item.value)) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.value;
18370
+ };
18371
+ handleInterceptEvent({ eventData, executeEvent, viewConfig: this.viewConfig, getUnsavedAnswerTml });
18372
+ }
18046
18373
  /**
18047
18374
  * Subscribe to message events that depend on successful iframe setup
18048
18375
  */
18049
18376
  subscribeToMessageEvents() {
18050
18377
  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;
18378
+ window.addEventListener('message', this.messageEventListener);
18379
+ this.subscribedListeners.message = this.messageEventListener;
18061
18380
  }
18062
18381
  /**
18063
18382
  * Adds event listeners for both network and message events.
@@ -18118,7 +18437,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
18118
18437
  message: customActionsResult.errors,
18119
18438
  });
18120
18439
  }
18121
- return {
18440
+ const baseInitData = {
18122
18441
  customisations: getCustomisations(this.embedConfig, this.viewConfig),
18123
18442
  authToken,
18124
18443
  runtimeFilterParams: this.viewConfig.excludeRuntimeFiltersfromURL
@@ -18136,7 +18455,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
18136
18455
  customVariablesForThirdPartyTools: this.embedConfig.customVariablesForThirdPartyTools || {},
18137
18456
  hiddenListColumns: this.viewConfig.hiddenListColumns || [],
18138
18457
  customActions: customActionsResult.actions,
18458
+ ...getInterceptInitData(this.viewConfig),
18139
18459
  };
18460
+ return baseInitData;
18140
18461
  }
18141
18462
  async getAppInitData() {
18142
18463
  return this.getDefaultAppInitData();
@@ -18157,7 +18478,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
18157
18478
  }
18158
18479
  getUpdateEmbedParamsObject() {
18159
18480
  let queryParams = this.getEmbedParamsObject();
18160
- queryParams = { ...this.viewConfig, ...queryParams };
18481
+ queryParams = { ...this.viewConfig, ...queryParams, ...this.getAppInitData() };
18161
18482
  return queryParams;
18162
18483
  }
18163
18484
  /**
@@ -18565,9 +18886,8 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
18565
18886
  // When start status is false it trigger only end releated
18566
18887
  // payload
18567
18888
  || (!callbackObj.options.start && dataStatus === embedEventStatus.END)) {
18568
- callbackObj.callback(data, (payload) => {
18569
- this.triggerEventOnPort(eventPort, payload);
18570
- });
18889
+ const responder = this.createEmbedEventResponder(eventPort, eventType);
18890
+ callbackObj.callback(data, responder);
18571
18891
  }
18572
18892
  });
18573
18893
  }
@@ -19334,7 +19654,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
19334
19654
  }
19335
19655
  getEmbedParamsObject() {
19336
19656
  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;
19657
+ 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
19658
  const queryParams = this.getBaseQueryParams();
19339
19659
  queryParams[Param.HideActions] = [
19340
19660
  ...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : []),
@@ -19366,9 +19686,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
19366
19686
  if (hideSearchBar) {
19367
19687
  queryParams[Param.HideSearchBar] = true;
19368
19688
  }
19369
- if (isOnBeforeGetVizDataInterceptEnabled) {
19370
- queryParams[Param.IsOnBeforeGetVizDataInterceptEnabled] = isOnBeforeGetVizDataInterceptEnabled;
19371
- }
19372
19689
  if (!focusSearchBarOnRender) {
19373
19690
  queryParams[Param.FocusSearchBarOnRender] = focusSearchBarOnRender;
19374
19691
  }
@@ -19627,7 +19944,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
19627
19944
  * embedded Liveboard or visualization.
19628
19945
  */
19629
19946
  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;
19947
+ 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, updatedSpotterChatPrompt, } = this.viewConfig;
19631
19948
  let params = {};
19632
19949
  params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
19633
19950
  params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
@@ -19645,8 +19962,10 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
19645
19962
  params[Param.HideIrrelevantFiltersInTab] = hideIrrelevantChipsInLiveboardTabs;
19646
19963
  params[Param.IsUnifiedSearchExperienceEnabled] = isUnifiedSearchExperienceEnabled;
19647
19964
  params[Param.CoverAndFilterOptionInPDF] = !!coverAndFilterOptionInPDF;
19648
- params[Param.LiveboardXLSXCSVDownload] = !!liveboardXLSXCSVDownload;
19649
19965
  params = this.getBaseQueryParams(params);
19966
+ if (!isUndefined$1(updatedSpotterChatPrompt)) {
19967
+ params[Param.UpdatedSpotterChatPrompt] = !!updatedSpotterChatPrompt;
19968
+ }
19650
19969
  if (hideObjectSearch) {
19651
19970
  params[Param.HideObjectSearch] = !!hideObjectSearch;
19652
19971
  }
@@ -19681,9 +20000,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
19681
20000
  if (enableAskSage) {
19682
20001
  params[Param.enableAskSage] = enableAskSage;
19683
20002
  }
19684
- if (isOnBeforeGetVizDataInterceptEnabled) {
19685
- params[Param.IsOnBeforeGetVizDataInterceptEnabled] = isOnBeforeGetVizDataInterceptEnabled;
19686
- }
19687
20003
  if (homePageSearchBarMode) {
19688
20004
  params[Param.HomePageSearchBarMode] = homePageSearchBarMode;
19689
20005
  }
@@ -19693,6 +20009,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
19693
20009
  if (isLiveboardStylingAndGroupingEnabled !== undefined) {
19694
20010
  params[Param.IsLiveboardStylingAndGroupingEnabled] = isLiveboardStylingAndGroupingEnabled;
19695
20011
  }
20012
+ if (liveboardXLSXCSVDownload !== undefined) {
20013
+ params[Param.LiveboardXLSXCSVDownload] = !!liveboardXLSXCSVDownload;
20014
+ }
19696
20015
  if (isPNGInScheduledEmailsEnabled !== undefined) {
19697
20016
  params[Param.isPNGInScheduledEmailsEnabled] = isPNGInScheduledEmailsEnabled;
19698
20017
  }
@@ -20059,7 +20378,7 @@ query GetEurekaVizSnapshots(
20059
20378
  getEmbedParamsObject() {
20060
20379
  let params = {};
20061
20380
  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;
20381
+ 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, updatedSpotterChatPrompt, } = this.viewConfig;
20063
20382
  const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
20064
20383
  || this.viewConfig.preventPinboardFilterRemoval;
20065
20384
  if (fullHeight === true) {
@@ -20078,6 +20397,9 @@ query GetEurekaVizSnapshots(
20078
20397
  if (preventLiveboardFilterRemoval) {
20079
20398
  params[Param.preventLiveboardFilterRemoval] = true;
20080
20399
  }
20400
+ if (!isUndefined$1(updatedSpotterChatPrompt)) {
20401
+ params[Param.UpdatedSpotterChatPrompt] = !!updatedSpotterChatPrompt;
20402
+ }
20081
20403
  if (visibleVizs) {
20082
20404
  params[Param.visibleVizs] = visibleVizs;
20083
20405
  }
@@ -20139,7 +20461,9 @@ query GetEurekaVizSnapshots(
20139
20461
  params[Param.DataPanelV2Enabled] = dataPanelV2;
20140
20462
  params[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
20141
20463
  params[Param.CoverAndFilterOptionInPDF] = coverAndFilterOptionInPDF;
20142
- params[Param.LiveboardXLSXCSVDownload] = !!liveboardXLSXCSVDownload;
20464
+ if (liveboardXLSXCSVDownload !== undefined) {
20465
+ params[Param.LiveboardXLSXCSVDownload] = !!liveboardXLSXCSVDownload;
20466
+ }
20143
20467
  getQueryParamString(params, true);
20144
20468
  return params;
20145
20469
  }
@@ -20866,7 +21190,7 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
20866
21190
  this.viewConfig = viewConfig;
20867
21191
  }
20868
21192
  getEmbedParamsObject() {
20869
- const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, enablePastConversationsSidebar, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, } = this.viewConfig;
21193
+ const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, enablePastConversationsSidebar, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, updatedSpotterChatPrompt, } = this.viewConfig;
20870
21194
  if (!worksheetId) {
20871
21195
  this.handleError(ERROR_MESSAGE.SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND);
20872
21196
  }
@@ -20887,10 +21211,13 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
20887
21211
  if (!isUndefined_1(hideSampleQuestions)) {
20888
21212
  queryParams[Param.HideSampleQuestions] = !!hideSampleQuestions;
20889
21213
  }
21214
+ if (!isUndefined_1(updatedSpotterChatPrompt)) {
21215
+ queryParams[Param.UpdatedSpotterChatPrompt] = !!updatedSpotterChatPrompt;
21216
+ }
20890
21217
  return queryParams;
20891
21218
  }
20892
21219
  getIframeSrc() {
20893
- const { worksheetId, searchOptions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, enablePastConversationsSidebar } = this.viewConfig;
21220
+ const { worksheetId, searchOptions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, enablePastConversationsSidebar, } = this.viewConfig;
20894
21221
  const path = 'insights/conv-assist';
20895
21222
  const queryParams = this.getEmbedParamsObject();
20896
21223
  if (!isUndefined_1(enablePastConversationsSidebar)) {