@thoughtspot/visual-embed-sdk 1.40.1-alpha.2 → 1.40.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 (155) hide show
  1. package/cjs/package.json +7 -6
  2. package/cjs/src/css-variables.d.ts +316 -0
  3. package/cjs/src/css-variables.d.ts.map +1 -1
  4. package/cjs/src/embed/app.d.ts +6 -1
  5. package/cjs/src/embed/app.d.ts.map +1 -1
  6. package/cjs/src/embed/app.js +22 -0
  7. package/cjs/src/embed/app.js.map +1 -1
  8. package/cjs/src/embed/app.spec.js +39 -2
  9. package/cjs/src/embed/app.spec.js.map +1 -1
  10. package/cjs/src/embed/bodyless-conversation.d.ts +0 -1
  11. package/cjs/src/embed/bodyless-conversation.d.ts.map +1 -1
  12. package/cjs/src/embed/bodyless-conversation.js +3 -7
  13. package/cjs/src/embed/bodyless-conversation.js.map +1 -1
  14. package/cjs/src/embed/conversation.d.ts +63 -3
  15. package/cjs/src/embed/conversation.d.ts.map +1 -1
  16. package/cjs/src/embed/conversation.js +11 -8
  17. package/cjs/src/embed/conversation.js.map +1 -1
  18. package/cjs/src/embed/conversation.spec.js +102 -0
  19. package/cjs/src/embed/conversation.spec.js.map +1 -1
  20. package/cjs/src/embed/liveboard.d.ts +11 -3
  21. package/cjs/src/embed/liveboard.d.ts.map +1 -1
  22. package/cjs/src/embed/liveboard.js +23 -33
  23. package/cjs/src/embed/liveboard.js.map +1 -1
  24. package/cjs/src/embed/liveboard.spec.js +182 -29
  25. package/cjs/src/embed/liveboard.spec.js.map +1 -1
  26. package/cjs/src/embed/sage.d.ts +0 -1
  27. package/cjs/src/embed/sage.d.ts.map +1 -1
  28. package/cjs/src/embed/sage.js +6 -10
  29. package/cjs/src/embed/sage.js.map +1 -1
  30. package/cjs/src/embed/search-bar.d.ts +0 -1
  31. package/cjs/src/embed/search-bar.d.ts.map +1 -1
  32. package/cjs/src/embed/search-bar.js +7 -11
  33. package/cjs/src/embed/search-bar.js.map +1 -1
  34. package/cjs/src/embed/search.d.ts +0 -1
  35. package/cjs/src/embed/search.d.ts.map +1 -1
  36. package/cjs/src/embed/search.js +8 -7
  37. package/cjs/src/embed/search.js.map +1 -1
  38. package/cjs/src/embed/ts-embed.d.ts +22 -9
  39. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  40. package/cjs/src/embed/ts-embed.js +75 -59
  41. package/cjs/src/embed/ts-embed.js.map +1 -1
  42. package/cjs/src/embed/ts-embed.spec.js +173 -1
  43. package/cjs/src/embed/ts-embed.spec.js.map +1 -1
  44. package/cjs/src/types.d.ts +154 -54
  45. package/cjs/src/types.d.ts.map +1 -1
  46. package/cjs/src/types.js +140 -52
  47. package/cjs/src/types.js.map +1 -1
  48. package/cjs/src/utils/liveboardService/liveboardService.d.ts +21 -6
  49. package/cjs/src/utils/liveboardService/liveboardService.d.ts.map +1 -1
  50. package/cjs/src/utils/liveboardService/liveboardService.js +21 -6
  51. package/cjs/src/utils/liveboardService/liveboardService.js.map +1 -1
  52. package/dist/{index-CmEQfuE3.js → index-P5YjBOuJ.js} +1 -1
  53. package/dist/src/css-variables.d.ts +316 -0
  54. package/dist/src/css-variables.d.ts.map +1 -1
  55. package/dist/src/embed/app.d.ts +6 -1
  56. package/dist/src/embed/app.d.ts.map +1 -1
  57. package/dist/src/embed/bodyless-conversation.d.ts +0 -1
  58. package/dist/src/embed/bodyless-conversation.d.ts.map +1 -1
  59. package/dist/src/embed/conversation.d.ts +63 -3
  60. package/dist/src/embed/conversation.d.ts.map +1 -1
  61. package/dist/src/embed/liveboard.d.ts +11 -3
  62. package/dist/src/embed/liveboard.d.ts.map +1 -1
  63. package/dist/src/embed/sage.d.ts +0 -1
  64. package/dist/src/embed/sage.d.ts.map +1 -1
  65. package/dist/src/embed/search-bar.d.ts +0 -1
  66. package/dist/src/embed/search-bar.d.ts.map +1 -1
  67. package/dist/src/embed/search.d.ts +0 -1
  68. package/dist/src/embed/search.d.ts.map +1 -1
  69. package/dist/src/embed/ts-embed.d.ts +22 -9
  70. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  71. package/dist/src/types.d.ts +154 -54
  72. package/dist/src/types.d.ts.map +1 -1
  73. package/dist/src/utils/liveboardService/liveboardService.d.ts +21 -6
  74. package/dist/src/utils/liveboardService/liveboardService.d.ts.map +1 -1
  75. package/dist/tsembed-react.es.js +298 -190
  76. package/dist/tsembed-react.js +297 -189
  77. package/dist/tsembed.es.js +319 -196
  78. package/dist/tsembed.js +318 -195
  79. package/dist/visual-embed-sdk-react-full.d.ts +583 -76
  80. package/dist/visual-embed-sdk-react.d.ts +583 -76
  81. package/dist/visual-embed-sdk.d.ts +583 -76
  82. package/lib/package.json +7 -6
  83. package/lib/src/css-variables.d.ts +316 -0
  84. package/lib/src/css-variables.d.ts.map +1 -1
  85. package/lib/src/embed/app.d.ts +6 -1
  86. package/lib/src/embed/app.d.ts.map +1 -1
  87. package/lib/src/embed/app.js +22 -0
  88. package/lib/src/embed/app.js.map +1 -1
  89. package/lib/src/embed/app.spec.js +39 -2
  90. package/lib/src/embed/app.spec.js.map +1 -1
  91. package/lib/src/embed/bodyless-conversation.d.ts +0 -1
  92. package/lib/src/embed/bodyless-conversation.d.ts.map +1 -1
  93. package/lib/src/embed/bodyless-conversation.js +3 -7
  94. package/lib/src/embed/bodyless-conversation.js.map +1 -1
  95. package/lib/src/embed/conversation.d.ts +63 -3
  96. package/lib/src/embed/conversation.d.ts.map +1 -1
  97. package/lib/src/embed/conversation.js +12 -9
  98. package/lib/src/embed/conversation.js.map +1 -1
  99. package/lib/src/embed/conversation.spec.js +104 -2
  100. package/lib/src/embed/conversation.spec.js.map +1 -1
  101. package/lib/src/embed/liveboard.d.ts +11 -3
  102. package/lib/src/embed/liveboard.d.ts.map +1 -1
  103. package/lib/src/embed/liveboard.js +23 -33
  104. package/lib/src/embed/liveboard.js.map +1 -1
  105. package/lib/src/embed/liveboard.spec.js +182 -29
  106. package/lib/src/embed/liveboard.spec.js.map +1 -1
  107. package/lib/src/embed/sage.d.ts +0 -1
  108. package/lib/src/embed/sage.d.ts.map +1 -1
  109. package/lib/src/embed/sage.js +6 -10
  110. package/lib/src/embed/sage.js.map +1 -1
  111. package/lib/src/embed/search-bar.d.ts +0 -1
  112. package/lib/src/embed/search-bar.d.ts.map +1 -1
  113. package/lib/src/embed/search-bar.js +7 -11
  114. package/lib/src/embed/search-bar.js.map +1 -1
  115. package/lib/src/embed/search.d.ts +0 -1
  116. package/lib/src/embed/search.d.ts.map +1 -1
  117. package/lib/src/embed/search.js +8 -7
  118. package/lib/src/embed/search.js.map +1 -1
  119. package/lib/src/embed/ts-embed.d.ts +22 -9
  120. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  121. package/lib/src/embed/ts-embed.js +75 -59
  122. package/lib/src/embed/ts-embed.js.map +1 -1
  123. package/lib/src/embed/ts-embed.spec.js +173 -1
  124. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  125. package/lib/src/types.d.ts +154 -54
  126. package/lib/src/types.d.ts.map +1 -1
  127. package/lib/src/types.js +140 -52
  128. package/lib/src/types.js.map +1 -1
  129. package/lib/src/utils/liveboardService/liveboardService.d.ts +21 -6
  130. package/lib/src/utils/liveboardService/liveboardService.d.ts.map +1 -1
  131. package/lib/src/utils/liveboardService/liveboardService.js +21 -6
  132. package/lib/src/utils/liveboardService/liveboardService.js.map +1 -1
  133. package/lib/src/visual-embed-sdk.d.ts +584 -77
  134. package/package.json +7 -6
  135. package/src/css-variables.ts +396 -1
  136. package/src/embed/app.spec.ts +54 -2
  137. package/src/embed/app.ts +24 -0
  138. package/src/embed/bodyless-conversation.ts +3 -9
  139. package/src/embed/conversation.spec.ts +131 -5
  140. package/src/embed/conversation.ts +87 -23
  141. package/src/embed/liveboard.spec.ts +233 -32
  142. package/src/embed/liveboard.ts +24 -39
  143. package/src/embed/sage.ts +6 -11
  144. package/src/embed/search-bar.tsx +7 -14
  145. package/src/embed/search.ts +7 -18
  146. package/src/embed/ts-embed.spec.ts +344 -112
  147. package/src/embed/ts-embed.ts +82 -70
  148. package/src/types.ts +153 -54
  149. package/src/utils/liveboardService/liveboardService.ts +21 -6
  150. package/dist/index-D1pyb7RG.js +0 -7371
  151. package/dist/index-DeFzsyFF.js +0 -7371
  152. package/dist/index-Dpf0rd6w.js +0 -7371
  153. package/dist/index-UuEbsISo.js +0 -7447
  154. package/dist/index-e3Uw3YFO.js +0 -7371
  155. package/dist/index-k7pkZMhx.js +0 -7371
@@ -1,4 +1,4 @@
1
- /* @thoughtspot/visual-embed-sdk version 1.40.1-alpha.2 */
1
+ /* @thoughtspot/visual-embed-sdk version 1.40.1 */
2
2
  'use client';
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) :
@@ -1245,7 +1245,7 @@
1245
1245
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1246
1246
  * @example
1247
1247
  *```js
1248
- * liveboardEmbed.on(EmbedEvent.AnswerChartSwitcher, payload => {
1248
+ * liveboardEmbed.on(EmbedEvent.LiveboardInfo, payload => {
1249
1249
  * console.log('Liveboard details', payload);
1250
1250
  * })
1251
1251
  *```
@@ -1620,58 +1620,58 @@
1620
1620
  */
1621
1621
  EmbedEvent["RequestVisibleEmbedCoordinates"] = "requestVisibleEmbedCoordinates";
1622
1622
  /**
1623
- * Emitted when spotter response is text data
1623
+ * Emitted when Spotter response is text data
1624
1624
  * @example
1625
1625
  * ```js
1626
1626
  * spotterEmbed.on(EmbedEvent.SpotterData, (payload) => {
1627
1627
  * console.log('payload', payload);
1628
1628
  * })
1629
1629
  *```
1630
- * @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
1630
+ * @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
1631
1631
  */
1632
1632
  EmbedEvent["SpotterData"] = "SpotterData";
1633
1633
  /**
1634
- * Emitted when user opens up the worksheet preview modal in spotter embed.
1634
+ * Emitted when user opens up the worksheet preview modal in Spotter embed.
1635
1635
  * @example
1636
1636
  * ```js
1637
1637
  * spotterEmbed.on(EmbedEvent.PreviewSpotterData, (payload) => {
1638
1638
  * console.log('payload', payload);
1639
1639
  * })
1640
1640
  *```
1641
- * @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
1641
+ * @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
1642
1642
  */
1643
1643
  EmbedEvent["PreviewSpotterData"] = "PreviewSpotterData";
1644
1644
  /**
1645
- * Emitted when the spotter query is triggered in spotter embed.
1645
+ * Emitted when the Spotter query is triggered in Spotter embed.
1646
1646
  * @example
1647
1647
  * ```js
1648
1648
  * spotterEmbed.on(EmbedEvent.SpotterQueryTriggered, (payload) => {
1649
1649
  * console.log('payload', payload);
1650
1650
  * })
1651
1651
  *```
1652
- * @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
1652
+ * @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
1653
1653
  */
1654
1654
  EmbedEvent["SpotterQueryTriggered"] = "SpotterQueryTriggered";
1655
1655
  /**
1656
- * Emitted when the last spotter query is edited in spotter embed.
1656
+ * Emitted when the last Spotter query is edited in Spotter embed.
1657
1657
  * @example
1658
1658
  * ```js
1659
1659
  * spotterEmbed.on(EmbedEvent.LastPromptEdited, (payload) => {
1660
1660
  * console.log('payload', payload);
1661
1661
  * })
1662
1662
  *```
1663
- * @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
1663
+ * @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
1664
1664
  */
1665
1665
  EmbedEvent["LastPromptEdited"] = "LastPromptEdited";
1666
1666
  /**
1667
- * Emitted when the last spotter query is deleted in spotter embed.
1667
+ * Emitted when the last Spotter query is deleted in Spotter embed.
1668
1668
  * @example
1669
1669
  * ```js
1670
1670
  * spotterEmbed.on(EmbedEvent.LastPromptDeleted, (payload) => {
1671
1671
  * console.log('payload', payload);
1672
1672
  * })
1673
1673
  *```
1674
- * @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
1674
+ * @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
1675
1675
  */
1676
1676
  EmbedEvent["LastPromptDeleted"] = "LastPromptDeleted";
1677
1677
  /**
@@ -1682,7 +1682,7 @@
1682
1682
  * console.log('payload', payload);
1683
1683
  * })
1684
1684
  *```
1685
- * @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
1685
+ * @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
1686
1686
  */
1687
1687
  EmbedEvent["ResetSpotterConversation"] = "ResetSpotterConversation";
1688
1688
  /**
@@ -1695,7 +1695,19 @@
1695
1695
  *```
1696
1696
  * @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
1697
1697
  */
1698
- EmbedEvent["SpotterInit"] = "SpotterInit";
1698
+ EmbedEvent["SpotterInit"] = "spotterInit";
1699
+ /**
1700
+ * @hidden
1701
+ * Triggers when the embed listener is ready to receive events.
1702
+ * This is used to trigger events after the embed container is loaded.
1703
+ * @example
1704
+ * ```js
1705
+ * liveboardEmbed.on(EmbedEvent.EmbedListenerReady, () => {
1706
+ * console.log('EmbedListenerReady');
1707
+ * })
1708
+ * ```
1709
+ */
1710
+ EmbedEvent["EmbedListenerReady"] = "EmbedListenerReady";
1699
1711
  })(exports.EmbedEvent || (exports.EmbedEvent = {}));
1700
1712
  /**
1701
1713
  * Event types that can be triggered by the host application
@@ -1785,6 +1797,7 @@
1785
1797
  * done automatically on the most popular column.
1786
1798
  * @param - vizId [TS >= 9.8.0] - Optional. The GUID of the visualization to drill
1787
1799
  * in case of a Liveboard.
1800
+ * @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
1788
1801
  * @example
1789
1802
  * ```js
1790
1803
  * searchEmbed.on(EmbedEvent.VizPointDoubleClick, (payload) => {
@@ -2104,12 +2117,21 @@
2104
2117
  * Trigger the **Download PDF** action on an embedded Liveboard,
2105
2118
  * visualization or Answer.
2106
2119
  *
2120
+ * @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
2121
+ *
2107
2122
  * **NOTE**: The **Download** > **PDF** action is available on
2108
2123
  * visualizations and Answers if the data is in tabular format.
2109
2124
  * @example
2110
2125
  * ```js
2111
2126
  * liveboardEmbed.trigger(HostEvent.DownloadAsPdf)
2112
2127
  * ```
2128
+ * @example
2129
+ * ```js
2130
+ * spotterEmbed.trigger(HostEvent.DownloadAsPdf, {
2131
+ * vizId:'730496d6-6903-4601-937e-2c691821af3c'
2132
+ * });
2133
+ * ```
2134
+ *
2113
2135
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2114
2136
  */
2115
2137
  HostEvent["DownloadAsPdf"] = "downloadAsPdf";
@@ -2211,7 +2233,8 @@
2211
2233
  * This event is not supported in visualization embed and search embed.
2212
2234
  * @param - object - To trigger the action for a specific visualization
2213
2235
  * in Liveboard embed, pass in `vizId` as a key.
2214
- * **Required** in Spotter embed.
2236
+ * @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
2237
+ *
2215
2238
  * @example
2216
2239
  * ```js
2217
2240
  * liveboardEmbed.trigger(HostEvent.Edit)
@@ -2226,6 +2249,12 @@
2226
2249
  * vizId:'730496d6-6903-4601-937e-2c691821af3c'
2227
2250
  * });
2228
2251
  * ```
2252
+ * @example
2253
+ * ```js
2254
+ * const editResponse = await spotterEmbed.trigger(HostEvent.Edit, {
2255
+ * vizId:'730496d6-6903-4601-937e-2c691821af3c'
2256
+ * });
2257
+ * ```
2229
2258
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2230
2259
  */
2231
2260
  HostEvent["Edit"] = "edit";
@@ -2346,6 +2375,7 @@
2346
2375
  /**
2347
2376
  * Trigger the **Download** action on charts in
2348
2377
  * the embedded view.
2378
+ * @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
2349
2379
  * @example
2350
2380
  * ```js
2351
2381
  * liveboardEmbed.trigger(HostEvent.Download, {vizId:
@@ -2354,6 +2384,11 @@
2354
2384
  * ```js
2355
2385
  * embed.trigger(HostEvent.Download)
2356
2386
  * ```
2387
+ * ```js
2388
+ * spotterEmbed.trigger(HostEvent.Download, {
2389
+ * vizId:'730496d6-6903-4601-937e-2c691821af3c'
2390
+ * });
2391
+ * ```
2357
2392
  * @deprecated from SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl ,9.4.1.sw
2358
2393
  * Use {@link DownloadAsPng}
2359
2394
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
@@ -2382,6 +2417,7 @@
2382
2417
  /**
2383
2418
  * Trigger the **Download** > **CSV** action on tables in
2384
2419
  * the embedded view.
2420
+ * @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
2385
2421
  * @example
2386
2422
  * ```js
2387
2423
  * liveboardEmbed.trigger(HostEvent.DownloadAsCsv, {vizId:
@@ -2404,6 +2440,7 @@
2404
2440
  /**
2405
2441
  * Trigger the **Download** > **XLSX** action on tables
2406
2442
  * in the embedded view.
2443
+ * @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
2407
2444
  * @example
2408
2445
  * ```js
2409
2446
  * liveboardEmbed.trigger(HostEvent.DownloadAsXlsx, {vizId:
@@ -2439,7 +2476,7 @@
2439
2476
  /**
2440
2477
  * Trigger the **Save** action on a Liveboard or Answer.
2441
2478
  * Saves the changes.
2442
- * @param - `vizId` is required in Spotter Embed.
2479
+ * @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
2443
2480
  * @example
2444
2481
  * ```js
2445
2482
  * liveboardEmbed.trigger(HostEvent.Save)
@@ -2749,6 +2786,7 @@
2749
2786
  HostEvent["UpdateParameters"] = "UpdateParameters";
2750
2787
  /**
2751
2788
  * Triggers GetParameters to fetch the runtime Parameters.
2789
+ * @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
2752
2790
  * ```js
2753
2791
  * liveboardEmbed.trigger(HostEvent.GetParameters).then((parameter) => {
2754
2792
  * console.log('parameters', parameter);
@@ -2792,7 +2830,7 @@
2792
2830
  * @param - optional attributes to set Answer properties.
2793
2831
  * `name` - Name string for the Answer.
2794
2832
  * `description` - Description text for the Answer.
2795
- *
2833
+ * @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
2796
2834
  * @example
2797
2835
  * ```js
2798
2836
  * const saveAnswerResponse = await searchEmbed.trigger(HostEvent.SaveAnswer, {
@@ -2800,6 +2838,14 @@
2800
2838
  * description: "Total sales by states in MidWest"
2801
2839
  * });
2802
2840
  * ```
2841
+ * @example
2842
+ * ```js
2843
+ * const saveAnswerResponse = await spotterEmbed.trigger(HostEvent.SaveAnswer, {
2844
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c',
2845
+ * name: "Sales by states",
2846
+ * description: "Total sales by states in MidWest"
2847
+ * });
2848
+ * ```
2803
2849
  * @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
2804
2850
  */
2805
2851
  HostEvent["SaveAnswer"] = "saveAnswer";
@@ -2831,7 +2877,7 @@
2831
2877
  /**
2832
2878
  * Triggers a search operation with the search tokens specified in
2833
2879
  * the search query string in spotter embed.
2834
- * @param - `queryString`: Text string in Natural Language format
2880
+ * @param - `query`: Text string in Natural Language format
2835
2881
  * @param - `executeSearch`: Boolean to execute search and update search query
2836
2882
  * @example
2837
2883
  * ```js
@@ -2840,6 +2886,7 @@
2840
2886
  * executeSearch: true,
2841
2887
  * })
2842
2888
  * ```
2889
+ * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
2843
2890
  */
2844
2891
  HostEvent["SpotterSearch"] = "SpotterSearch";
2845
2892
  /**
@@ -2849,6 +2896,7 @@
2849
2896
  * ```js
2850
2897
  * spotterEmbed.trigger(HostEvent.EditLastPrompt, "revenue per year");
2851
2898
  * ```
2899
+ * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
2852
2900
  */
2853
2901
  HostEvent["EditLastPrompt"] = "EditLastPrompt";
2854
2902
  /**
@@ -2857,6 +2905,7 @@
2857
2905
  * ```js
2858
2906
  * spotterEmbed.trigger(HostEvent.PreviewSpotterData);
2859
2907
  * ```
2908
+ * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
2860
2909
  */
2861
2910
  HostEvent["PreviewSpotterData"] = "PreviewSpotterData";
2862
2911
  /**
@@ -2865,6 +2914,7 @@
2865
2914
  * ```js
2866
2915
  * spotterEmbed.trigger(HostEvent.ResetSpotterConversation);
2867
2916
  * ```
2917
+ * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
2868
2918
  */
2869
2919
  HostEvent["ResetSpotterConversation"] = "ResetSpotterConversation";
2870
2920
  /**
@@ -2873,17 +2923,19 @@
2873
2923
  * ```js
2874
2924
  * spotterEmbed.trigger(HostEvent.DeleteLastPrompt);
2875
2925
  * ```
2926
+ * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
2876
2927
  */
2877
2928
  HostEvent["DeleteLastPrompt"] = "DeleteLastPrompt";
2878
2929
  /**
2879
2930
  * Toggle the visualization to chart or table view.
2880
- * @param - `vizId ` In Spotter Embed, vizId is required.
2931
+ * @param - `vizId ` refers to the answer id in spotter Embed, it is required in spotter Embed.
2881
2932
  * @example
2882
2933
  * ```js
2883
2934
  * spotterEmbed.trigger(HostEvent.AnswerChartSwitcher, {
2884
- * vizId:"'b535c760-8bbe-4e6f-bb26-af56b4129a1e'"
2935
+ * vizId:'b535c760-8bbe-4e6f-bb26-af56b4129a1e'
2885
2936
  * });
2886
2937
  *```
2938
+ * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
2887
2939
  */
2888
2940
  HostEvent["AnswerChartSwitcher"] = "answerChartSwitcher";
2889
2941
  /**
@@ -2910,25 +2962,16 @@
2910
2962
  */
2911
2963
  HostEvent["VisibleEmbedCoordinates"] = "visibleEmbedCoordinates";
2912
2964
  /**
2913
- * Trigger the *Ask Sage* action for visualizations
2965
+ * Trigger the *Ask Spotter* action for visualizations
2966
+ * @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
2914
2967
  * @example
2915
2968
  * ```js
2916
- * liveboardEmbed.trigger(HostEvent.AskSpotter,
2917
- * {containerId:'730496d6-6903-4601-937e-2c691821af3c'})
2969
+ * spotterEmbed.trigger(HostEvent.AskSpotter,
2970
+ * {vizId:'730496d6-6903-4601-937e-2c691821af3c'})
2918
2971
  * ```
2919
2972
  * @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
2920
2973
  */
2921
- HostEvent["AskSpotter"] = "askSpotter";
2922
- /**
2923
- * @hidden
2924
- * Triggers the update of the embed params.
2925
- *
2926
- * @example
2927
- * ```js
2928
- * liveboardEmbed.trigger(HostEvent.UpdateEmbedParams, viewConfig);
2929
- * ```
2930
- */
2931
- HostEvent["UpdateEmbedParams"] = "updateEmbedParams";
2974
+ HostEvent["AskSpotter"] = "AskSpotter";
2932
2975
  })(exports.HostEvent || (exports.HostEvent = {}));
2933
2976
  /**
2934
2977
  * The different visual modes that the data sources panel within
@@ -3034,6 +3077,7 @@
3034
3077
  Param["Query"] = "query";
3035
3078
  Param["HideHomepageLeftNav"] = "hideHomepageLeftNav";
3036
3079
  Param["ModularHomeExperienceEnabled"] = "modularHomeExperience";
3080
+ Param["HomepageVersion"] = "homepageVersion";
3037
3081
  Param["ListPageVersion"] = "listpageVersion";
3038
3082
  Param["PendoTrackingKey"] = "additionalPendoKey";
3039
3083
  Param["LiveboardHeaderSticky"] = "isLiveboardHeaderSticky";
@@ -3228,27 +3272,27 @@
3228
3272
  */
3229
3273
  Action["ConfigureFilter"] = "configureFilter";
3230
3274
  /**
3231
- * The **Collapse data sources** icon on the Search page.
3232
- * Collapses the panel showing data sources.
3233
- *
3234
- * @example
3235
- * ```js
3236
- * disabledActions: [Action.CollapseDataPanel]
3237
- * ```
3238
- * @version: SDK: 1.1.0 | ThoughtSpot Cloud: ts7.may.cl, 8.4.1.sw
3239
- */
3275
+ * The **Collapse data sources** icon on the Search page.
3276
+ * Collapses the panel showing data sources.
3277
+ *
3278
+ * @example
3279
+ * ```js
3280
+ * disabledActions: [Action.CollapseDataPanel]
3281
+ * ```
3282
+ * @version: SDK: 1.1.0 | ThoughtSpot Cloud: ts7.may.cl, 8.4.1.sw
3283
+ */
3240
3284
  Action["CollapseDataSources"] = "collapseDataSources";
3241
3285
  /**
3242
- * The **Collapse data panel** icon on the Search page.
3243
- * Collapses the data panel view.
3244
- *
3245
- * @version: SDK: 1.34.0 | ThoughtSpot Cloud: 10.3.0.cl
3246
- *
3247
- * @example
3248
- * ```js
3249
- * disabledActions: [Action.CollapseDataPanel]
3250
- * ```
3251
- */
3286
+ * The **Collapse data panel** icon on the Search page.
3287
+ * Collapses the data panel view.
3288
+ *
3289
+ * @version: SDK: 1.34.0 | ThoughtSpot Cloud: 10.3.0.cl
3290
+ *
3291
+ * @example
3292
+ * ```js
3293
+ * disabledActions: [Action.CollapseDataPanel]
3294
+ * ```
3295
+ */
3252
3296
  Action["CollapseDataPanel"] = "collapseDataPanel";
3253
3297
  /**
3254
3298
  * The **Choose sources** button on Search page.
@@ -3944,6 +3988,17 @@
3944
3988
  * @version SDK: 1.25.0 | ThoughtSpot Cloud: 9.6.0.cl
3945
3989
  */
3946
3990
  Action["EnableContextualChangeAnalysis"] = "enableContextualChangeAnalysis";
3991
+ /**
3992
+ * Action ID to hide or disable Iterative Change Analysis option
3993
+ * on contextual change analysis Inisght charts context menu
3994
+ *
3995
+ * @example
3996
+ * ```js
3997
+ * disabledActions: [Action.EnableIterativeChangeAnalysis]
3998
+ * ```
3999
+ * @version SDK: 1.41.0 | ThoughtSpot Cloud: 9.12.0.cl
4000
+ */
4001
+ Action["EnableIterativeChangeAnalysis"] = "enableIterativeChangeAnalysis";
3947
4002
  /**
3948
4003
  * Action ID to hide or disable Natural Language Search query.
3949
4004
  *
@@ -4313,6 +4368,39 @@
4313
4368
  * @version SDK: 1.39.0 | ThoughtSpot Cloud: 10.10.0.cl
4314
4369
  */
4315
4370
  Action["InConversationTraining"] = "InConversationTraining";
4371
+ /**
4372
+ * Action ID to hide the warnings banner in
4373
+ * Spotter results. It's an EA feature and
4374
+ * handled by LD.
4375
+ * @example
4376
+ * ```js
4377
+ * hiddenAction: [Action.SpotterWarningsBanner]
4378
+ * ```
4379
+ * @version SDK: 1.41.0 | ThoughtSpot Cloud: 10.13.0.cl
4380
+ */
4381
+ Action["SpotterWarningsBanner"] = "SpotterWarningsBanner";
4382
+ /**
4383
+ * Action ID to hide the warnings border on the knowledge
4384
+ * card in Spotter results. It's an EA feature and
4385
+ * handled by LD.
4386
+ * @example
4387
+ * ```js
4388
+ * hiddenAction: [Action.SpotterWarningsOnTokens]
4389
+ * ```
4390
+ * @version SDK: 1.41.0 | ThoughtSpot Cloud: 10.13.0.cl
4391
+ */
4392
+ Action["SpotterWarningsOnTokens"] = "SpotterWarningsOnTokens";
4393
+ /**
4394
+ * Action ID to disable the click event handler on knowledge
4395
+ * card in Spotter results. It's an EA feature and
4396
+ * handled by LD.
4397
+ * @example
4398
+ * ```js
4399
+ * hiddenAction: [Action.SpotterTokenQuickEdit]
4400
+ * ```
4401
+ * @version SDK: 1.41.0 | ThoughtSpot Cloud: 10.13.0.cl
4402
+ */
4403
+ Action["SpotterTokenQuickEdit"] = "SpotterTokenQuickEdit";
4316
4404
  })(exports.Action || (exports.Action = {}));
4317
4405
  var PrefetchFeatures;
4318
4406
  (function (PrefetchFeatures) {
@@ -15792,7 +15880,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
15792
15880
  return e;
15793
15881
  }
15794
15882
 
15795
- var name="@thoughtspot/visual-embed-sdk";var version$1="1.40.1-alpha.2";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 . --incremental false; tsc -p . --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts","bundle-dts":"dts-bundle --name ../../dist/visual-embed-sdk --main lib/src/index.d.ts --outputAsModuleFolder=true","bundle-dts-react":"dts-bundle --name ../../../dist/visual-embed-sdk-react --main lib/src/react/index.d.ts --outputAsModuleFolder=true","bundle-dts-react-full":"dts-bundle --name ../../../dist/visual-embed-sdk-react-full --main lib/src/react/all-types-export.d.ts --outputAsModuleFolder=true",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.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 | coveralls","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":"^8.2.6","@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",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1",coveralls:"^3.1.0",crypto:"^1.0.1","current-git-branch":"^1.1.0","dts-bundle":"^0.7.3",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":"^1.1.1",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:"31 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};
15883
+ var name="@thoughtspot/visual-embed-sdk";var version$1="1.40.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 . --incremental false; tsc -p . --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts","bundle-dts":"dts-bundle --name ../../dist/visual-embed-sdk --main lib/src/index.d.ts --outputAsModuleFolder=true","bundle-dts-react":"dts-bundle --name ../../../dist/visual-embed-sdk-react --main lib/src/react/index.d.ts --outputAsModuleFolder=true","bundle-dts-react-full":"dts-bundle --name ../../../dist/visual-embed-sdk-react-full --main lib/src/react/all-types-export.d.ts --outputAsModuleFolder=true",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.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":"^0.7.3",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};
15796
15884
 
15797
15885
  /**
15798
15886
  * Reloads the ThoughtSpot iframe.
@@ -16018,7 +16106,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
16018
16106
  */
16019
16107
  this.fullscreenChangeHandler = null;
16020
16108
  this.subscribedListeners = {};
16021
- this.isEmbedContainerLoaded = false;
16022
16109
  /**
16023
16110
  * Send Custom style as part of payload of APP_INIT
16024
16111
  * @param _
@@ -16090,20 +16177,49 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
16090
16177
  });
16091
16178
  notifyAuthFailure(AuthFailureType.IDLE_SESSION_TIMEOUT);
16092
16179
  };
16093
- this.pendingEvents = [];
16094
16180
  /**
16095
16181
  * Register APP_INIT event and sendback init payload
16096
16182
  */
16097
16183
  this.registerAppInit = () => {
16098
16184
  this.on(exports.EmbedEvent.APP_INIT, this.appInitCb, { start: false }, true);
16099
- this.on(exports.EmbedEvent.AuthInit, () => {
16100
- this.isEmbedContainerLoaded = true;
16101
- this.executePendingEvents();
16102
- }, { start: false }, true);
16103
16185
  this.on(exports.EmbedEvent.AuthExpire, this.updateAuthToken, { start: false }, true);
16104
16186
  this.on(exports.EmbedEvent.IdleSessionTimeout, this.idleSessionTimeout, { start: false }, true);
16187
+ const embedListenerReadyHandler = this.createEmbedContainerHandler(exports.EmbedEvent.EmbedListenerReady);
16188
+ this.on(exports.EmbedEvent.EmbedListenerReady, embedListenerReadyHandler, { start: false }, true);
16189
+ const authInitHandler = this.createEmbedContainerHandler(exports.EmbedEvent.AuthInit);
16190
+ this.on(exports.EmbedEvent.AuthInit, authInitHandler, { start: false }, true);
16105
16191
  };
16106
16192
  this.showPreRenderByDefault = false;
16193
+ /**
16194
+ * @hidden
16195
+ * Internal state to track if the embed container is loaded.
16196
+ * This is used to trigger events after the embed container is loaded.
16197
+ */
16198
+ this.isEmbedContainerLoaded = false;
16199
+ /**
16200
+ * @hidden
16201
+ * Internal state to track the callbacks to be executed after the embed container
16202
+ * is loaded.
16203
+ * This is used to trigger events after the embed container is loaded.
16204
+ */
16205
+ this.embedContainerReadyCallbacks = [];
16206
+ this.createEmbedContainerHandler = (source) => () => {
16207
+ const processEmbedContainerReady = () => {
16208
+ logger$3.debug('processEmbedContainerReady');
16209
+ this.isEmbedContainerLoaded = true;
16210
+ this.executeEmbedContainerReadyCallbacks();
16211
+ };
16212
+ if (source === exports.EmbedEvent.AuthInit) {
16213
+ const AUTH_INIT_FALLBACK_DELAY = 1000;
16214
+ // Wait for 1 second to ensure the embed container is loaded
16215
+ // This is a workaround to ensure the embed container is loaded
16216
+ // this is needed until all clusters have EmbedListenerReady event
16217
+ setTimeout(processEmbedContainerReady, AUTH_INIT_FALLBACK_DELAY);
16218
+ }
16219
+ else if (source === exports.EmbedEvent.EmbedListenerReady) {
16220
+ processEmbedContainerReady();
16221
+ }
16222
+ };
16107
16223
  this.validatePreRenderViewConfig = (viewConfig) => {
16108
16224
  var _a;
16109
16225
  const preRenderAllowedKeys = ['preRenderId', 'vizId', 'liveboardId'];
@@ -16125,7 +16241,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
16125
16241
  });
16126
16242
  }
16127
16243
  };
16128
- this.id = Date.now().toString();
16129
16244
  this.el = getDOMNode(domSelector);
16130
16245
  this.eventHandlerMap = new Map();
16131
16246
  this.isError = false;
@@ -16139,9 +16254,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
16139
16254
  ...viewConfig,
16140
16255
  });
16141
16256
  this.hostEventClient = new HostEventClient(this.iFrame);
16142
- const embedConfig = getEmbedConfig();
16143
- this.embedConfig = embedConfig;
16144
16257
  this.isReadyForRenderPromise = getInitPromise().then(async () => {
16258
+ const embedConfig = getEmbedConfig();
16259
+ this.embedConfig = embedConfig;
16145
16260
  if (!embedConfig.authTriggerContainer && !embedConfig.useEventForSAMLPopup) {
16146
16261
  this.embedConfig.authTriggerContainer = domSelector;
16147
16262
  }
@@ -16312,43 +16427,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
16312
16427
  async getAppInitData() {
16313
16428
  return this.getDefaultAppInitData();
16314
16429
  }
16315
- getPreRenderObj() {
16316
- var _a;
16317
- const embedObj = (_a = this.insertedDomEl) === null || _a === void 0 ? void 0 : _a[this.embedNodeKey];
16318
- if (embedObj === this) {
16319
- logger$3.info('embedObj is same as this');
16320
- }
16321
- return embedObj;
16322
- }
16323
- checkEmbedContainerLoaded() {
16324
- if (this.isEmbedContainerLoaded)
16325
- return true;
16326
- const preRenderObj = this.getPreRenderObj();
16327
- if (preRenderObj && preRenderObj.isEmbedContainerLoaded) {
16328
- this.isEmbedContainerLoaded = true;
16329
- }
16330
- return this.isEmbedContainerLoaded;
16331
- }
16332
- executePendingEvents() {
16333
- logger$3.debug('executePendingEvents', this.pendingEvents);
16334
- setTimeout(() => {
16335
- this.pendingEvents.forEach((event) => {
16336
- var _a;
16337
- this.trigger(event.eventType, event.data);
16338
- (_a = event.onEventTriggered) === null || _a === void 0 ? void 0 : _a.call(event);
16339
- });
16340
- this.pendingEvents = [];
16341
- }, 1000);
16342
- }
16343
- triggerAfterLoad(eventType, data, onEventTriggered) {
16344
- if (this.checkEmbedContainerLoaded()) {
16345
- this.trigger(eventType, data);
16346
- onEventTriggered === null || onEventTriggered === void 0 ? void 0 : onEventTriggered();
16347
- }
16348
- else {
16349
- this.pendingEvents.push({ eventType, data, onEventTriggered });
16350
- }
16351
- }
16352
16430
  /**
16353
16431
  * Constructs the base URL string to load the ThoughtSpot app.
16354
16432
  * @param query
@@ -16363,11 +16441,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
16363
16441
  .join('/');
16364
16442
  return `${basePath}#`;
16365
16443
  }
16366
- getUpdateEmbedParamsObject() {
16367
- let queryParams = this.getEmbedParamsObject();
16368
- queryParams = { ...this.viewConfig, ...queryParams };
16369
- return queryParams;
16370
- }
16371
16444
  /**
16372
16445
  * Common query params set for all the embed modes.
16373
16446
  * @param queryParams
@@ -16517,13 +16590,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
16517
16590
  return path;
16518
16591
  }
16519
16592
  getEmbedParams() {
16520
- const queryParams = this.getEmbedParamsObject();
16593
+ const queryParams = this.getBaseQueryParams();
16521
16594
  return getQueryParamString(queryParams);
16522
16595
  }
16523
- getEmbedParamsObject() {
16524
- const params = this.getBaseQueryParams();
16525
- return params;
16526
- }
16527
16596
  getRootIframeSrc() {
16528
16597
  const query = this.getEmbedParams();
16529
16598
  return this.getEmbedBasePath(query);
@@ -16903,6 +16972,43 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
16903
16972
  logger$3.log('Event Port is not defined');
16904
16973
  }
16905
16974
  }
16975
+ getPreRenderObj() {
16976
+ var _a;
16977
+ const embedObj = (_a = this.insertedDomEl) === null || _a === void 0 ? void 0 : _a[this.embedNodeKey];
16978
+ if (embedObj === this) {
16979
+ logger$3.info('embedObj is same as this');
16980
+ }
16981
+ return embedObj;
16982
+ }
16983
+ checkEmbedContainerLoaded() {
16984
+ if (this.isEmbedContainerLoaded)
16985
+ return true;
16986
+ const preRenderObj = this.getPreRenderObj();
16987
+ if (preRenderObj && preRenderObj.isEmbedContainerLoaded) {
16988
+ this.isEmbedContainerLoaded = true;
16989
+ }
16990
+ return this.isEmbedContainerLoaded;
16991
+ }
16992
+ executeEmbedContainerReadyCallbacks() {
16993
+ logger$3.debug('executePendingEvents', this.embedContainerReadyCallbacks);
16994
+ this.embedContainerReadyCallbacks.forEach((callback) => {
16995
+ callback === null || callback === void 0 ? void 0 : callback();
16996
+ });
16997
+ this.embedContainerReadyCallbacks = [];
16998
+ }
16999
+ /**
17000
+ * Executes a callback after the embed container is loaded.
17001
+ * @param callback The callback to execute
17002
+ */
17003
+ executeAfterEmbedContainerLoaded(callback) {
17004
+ if (this.checkEmbedContainerLoaded()) {
17005
+ callback === null || callback === void 0 ? void 0 : callback();
17006
+ }
17007
+ else {
17008
+ logger$3.debug('pushing callback to embedContainerReadyCallbacks', callback);
17009
+ this.embedContainerReadyCallbacks.push(callback);
17010
+ }
17011
+ }
16906
17012
  /**
16907
17013
  * Triggers an event to the embedded app
16908
17014
  * @param {HostEvent} messageType The event type
@@ -17047,10 +17153,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
17047
17153
  return this.preRender(true);
17048
17154
  }
17049
17155
  this.validatePreRenderViewConfig(this.viewConfig);
17050
- logger$3.debug('triggering UpdateEmbedParams', this.viewConfig);
17051
- this.triggerAfterLoad(exports.HostEvent.UpdateEmbedParams, this.getUpdateEmbedParamsObject());
17052
17156
  }
17053
- this.beforePrerenderVisible();
17054
17157
  if (this.el) {
17055
17158
  this.syncPreRenderStyle();
17056
17159
  if (!this.viewConfig.doNotTrackPreRenderSize) {
@@ -17067,6 +17170,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
17067
17170
  this.resizeObserver.observe(this.el);
17068
17171
  }
17069
17172
  }
17173
+ this.beforePrerenderVisible();
17070
17174
  removeStyleProperties(this.preRenderWrapper, ['z-index', 'opacity', 'pointer-events']);
17071
17175
  this.subscribeToEvents();
17072
17176
  // Setup fullscreen change handler for prerendered components
@@ -17255,9 +17359,15 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
17255
17359
  this.embedComponentType = 'SearchBarEmbed';
17256
17360
  this.viewConfig = viewConfig;
17257
17361
  }
17258
- getEmbedParamsObject() {
17362
+ /**
17363
+ * Construct the URL of the embedded ThoughtSpot search to be
17364
+ * loaded in the iframe
17365
+ * @param dataSources A list of data source GUIDs
17366
+ */
17367
+ getIFrameSrc() {
17259
17368
  var _a;
17260
17369
  const { searchOptions, dataSource, dataSources, useLastSelectedSources = false, excludeSearchTokenStringFromURL, } = this.viewConfig;
17370
+ const path = 'search-bar-embed';
17261
17371
  const queryParams = this.getBaseQueryParams();
17262
17372
  queryParams[Param.HideActions] = [...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : [])];
17263
17373
  if (dataSources && dataSources.length) {
@@ -17279,16 +17389,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
17279
17389
  queryParams[Param.UseLastSelectedDataSource] = false;
17280
17390
  }
17281
17391
  queryParams[Param.searchEmbed] = true;
17282
- return queryParams;
17283
- }
17284
- /**
17285
- * Construct the URL of the embedded ThoughtSpot search to be
17286
- * loaded in the iframe
17287
- * @param dataSources A list of data source GUIDs
17288
- */
17289
- getIFrameSrc() {
17290
- const queryParams = this.getEmbedParamsObject();
17291
- const path = 'search-bar-embed';
17292
17392
  let query = '';
17293
17393
  const queryParamsString = getQueryParamString(queryParams, true);
17294
17394
  if (queryParamsString) {
@@ -17339,7 +17439,12 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
17339
17439
  viewConfig.embedComponentType = 'SageEmbed';
17340
17440
  super(domSelector, viewConfig);
17341
17441
  }
17342
- getEmbedParamsObject() {
17442
+ /**
17443
+ * Constructs a map of parameters to be passed on to the
17444
+ * embedded Eureka or Sage search page.
17445
+ * @returns {string} query string
17446
+ */
17447
+ getEmbedParams() {
17343
17448
  const { disableWorksheetChange, hideWorksheetSelector, showObjectSuggestions, dataPanelV2, hideSampleQuestions, isProductTour, hideSageAnswerHeader, hideAutocompleteSuggestions, } = this.viewConfig;
17344
17449
  const params = this.getBaseQueryParams();
17345
17450
  params[Param.DataPanelV2Enabled] = !!dataPanelV2;
@@ -17354,15 +17459,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
17354
17459
  params[Param.HideSampleQuestions] = !!hideSampleQuestions;
17355
17460
  params[Param.IsProductTour] = !!isProductTour;
17356
17461
  params[Param.HideSageAnswerHeader] = !!hideSageAnswerHeader;
17357
- return params;
17358
- }
17359
- /**
17360
- * Constructs a map of parameters to be passed on to the
17361
- * embedded Eureka or Sage search page.
17362
- * @returns {string} query string
17363
- */
17364
- getEmbedParams() {
17365
- const params = this.getEmbedParamsObject();
17366
17462
  return getQueryParamString(params, true);
17367
17463
  }
17368
17464
  /**
@@ -17472,9 +17568,11 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
17472
17568
  const defaultAppInitData = await super.getAppInitData();
17473
17569
  return { ...defaultAppInitData, ...this.getSearchInitData() };
17474
17570
  }
17475
- getEmbedParamsObject() {
17571
+ getEmbedParams() {
17476
17572
  var _a;
17477
- const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, hideSearchBar, dataPanelV2 = false, useLastSelectedSources = false, runtimeParameters, collapseSearchBarInitially = false, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false, dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL, focusSearchBarOnRender = true, excludeRuntimeParametersfromURL, excludeSearchTokenStringFromURL, collapseSearchBar = true, } = this.viewConfig;
17573
+ const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, hideSearchBar, dataPanelV2 = false, useLastSelectedSources = false, runtimeParameters, collapseSearchBarInitially = false, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false,
17574
+ /* eslint-disable-next-line max-len */
17575
+ dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL, focusSearchBarOnRender = true, excludeRuntimeParametersfromURL, excludeSearchTokenStringFromURL, collapseSearchBar = true, } = this.viewConfig;
17478
17576
  const queryParams = this.getBaseQueryParams();
17479
17577
  queryParams[Param.HideActions] = [
17480
17578
  ...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : []),
@@ -17507,6 +17605,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
17507
17605
  queryParams[Param.HideSearchBar] = true;
17508
17606
  }
17509
17607
  if (isOnBeforeGetVizDataInterceptEnabled) {
17608
+ /* eslint-disable-next-line max-len */
17510
17609
  queryParams[Param.IsOnBeforeGetVizDataInterceptEnabled] = isOnBeforeGetVizDataInterceptEnabled;
17511
17610
  }
17512
17611
  if (!focusSearchBarOnRender) {
@@ -17519,22 +17618,20 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
17519
17618
  queryParams[Param.UseLastSelectedDataSource] = false;
17520
17619
  }
17521
17620
  queryParams[Param.searchEmbed] = true;
17621
+ /* eslint-disable-next-line max-len */
17522
17622
  queryParams[Param.CollapseSearchBarInitially] = collapseSearchBarInitially || collapseSearchBar;
17523
17623
  queryParams[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
17524
17624
  if (dataPanelCustomGroupsAccordionInitialState
17525
17625
  === DataPanelCustomColumnGroupsAccordionState$1.COLLAPSE_ALL
17526
17626
  || dataPanelCustomGroupsAccordionInitialState
17527
17627
  === DataPanelCustomColumnGroupsAccordionState$1.EXPAND_FIRST) {
17628
+ /* eslint-disable-next-line max-len */
17528
17629
  queryParams[Param.DataPanelCustomGroupsAccordionInitialState] = dataPanelCustomGroupsAccordionInitialState;
17529
17630
  }
17530
17631
  else {
17632
+ /* eslint-disable-next-line max-len */
17531
17633
  queryParams[Param.DataPanelCustomGroupsAccordionInitialState] = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL;
17532
17634
  }
17533
- return queryParams;
17534
- }
17535
- getEmbedParams() {
17536
- const { runtimeParameters, runtimeFilters, excludeRuntimeParametersfromURL, excludeRuntimeFiltersfromURL, } = this.viewConfig;
17537
- const queryParams = this.getEmbedParamsObject();
17538
17635
  let query = '';
17539
17636
  const queryParamsString = getQueryParamString(queryParams, true);
17540
17637
  if (queryParamsString) {
@@ -17675,6 +17772,11 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
17675
17772
  * It serves as the foundational version of the home page.
17676
17773
  */
17677
17774
  HomePage["Modular"] = "v2";
17775
+ /**
17776
+ * ModularWithStylingChanges (v3) introduces Modular Home Experience
17777
+ * with styling changes.
17778
+ */
17779
+ HomePage["ModularWithStylingChanges"] = "v3";
17678
17780
  })(HomePage || (HomePage = {}));
17679
17781
  /**
17680
17782
  * Define the version of the list page
@@ -17840,16 +17942,33 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
17840
17942
  else {
17841
17943
  params[Param.DataPanelCustomGroupsAccordionInitialState] = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL;
17842
17944
  }
17945
+ // Set navigation to v2 by default to avoid problems like the app
17946
+ // switcher (9-dot menu) not showing when v3 navigation is turned on
17947
+ // at the cluster level.
17948
+ // To use v3 navigation, we must manually set the discoveryExperience
17949
+ // settings.
17950
+ params[Param.NavigationVersion] = 'v2';
17951
+ // Set homePageVersion to v2 by default to reset the LD flag value
17952
+ // for the homepageVersion.
17953
+ params[Param.HomepageVersion] = 'v2';
17843
17954
  if (discoveryExperience) {
17844
17955
  // primaryNavbarVersion v3 will enabled the new left navigation
17845
17956
  if (discoveryExperience.primaryNavbarVersion === PrimaryNavbarVersion.Sliding) {
17846
17957
  params[Param.NavigationVersion] = discoveryExperience.primaryNavbarVersion;
17958
+ // Enable the modularHomeExperience when Sliding is enabled.
17959
+ params[Param.ModularHomeExperienceEnabled] = true;
17847
17960
  }
17848
17961
  // homePage v2 will enable the modular home page
17849
17962
  // and it will override the modularHomeExperience value
17850
17963
  if (discoveryExperience.homePage === HomePage.Modular) {
17851
17964
  params[Param.ModularHomeExperienceEnabled] = true;
17852
17965
  }
17966
+ // ModularWithStylingChanges (v3) introduces the styling changes
17967
+ // to the Modular Homepage.
17968
+ // v3 will be the base version of homePageVersion.
17969
+ if (discoveryExperience.homePage === HomePage.ModularWithStylingChanges) {
17970
+ params[Param.HomepageVersion] = HomePage.ModularWithStylingChanges;
17971
+ }
17853
17972
  // listPageVersion v3 will enable the new list page
17854
17973
  if (discoveryExperience.listPageVersion === ListPage.ListWithUXChanges) {
17855
17974
  params[Param.ListPageVersion] = discoveryExperience.listPageVersion;
@@ -18127,7 +18246,16 @@ query GetEurekaVizSnapshots(
18127
18246
  }
18128
18247
  this.setIFrameHeight(frameHeight || this.defaultHeight);
18129
18248
  };
18130
- this.currentLiveboardId = this.viewConfig.liveboardId;
18249
+ /**
18250
+ * @hidden
18251
+ * Internal state to track the current liveboard id.
18252
+ * This is used to navigate to the correct liveboard when the prerender is visible.
18253
+ */
18254
+ this.currentLiveboardState = {
18255
+ liveboardId: this.viewConfig.liveboardId,
18256
+ vizId: this.viewConfig.vizId,
18257
+ activeTabId: this.viewConfig.activeTabId,
18258
+ };
18131
18259
  if (this.viewConfig.fullHeight === true) {
18132
18260
  if (this.viewConfig.vizId) {
18133
18261
  logger$3.warn('Full height is currently only supported for Liveboard embeds.' +
@@ -18144,11 +18272,6 @@ query GetEurekaVizSnapshots(
18144
18272
  * embedded Liveboard or visualization.
18145
18273
  */
18146
18274
  getEmbedParams() {
18147
- const params = this.getEmbedParamsObject();
18148
- const queryParams = getQueryParamString(params, true);
18149
- return queryParams;
18150
- }
18151
- getEmbedParamsObject() {
18152
18275
  let params = {};
18153
18276
  params = this.getBaseQueryParams(params);
18154
18277
  const { enableVizTransformations, fullHeight, defaultHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, enableAskSage, enable2ColumnLayout, dataPanelV2 = false, enableCustomColumnGroups = false, oAuthPollingInterval, isForceRedirect, dataSourceId, coverAndFilterOptionInPDF = false, isLiveboardStylingAndGroupingEnabled, } = this.viewConfig;
@@ -18218,27 +18341,8 @@ query GetEurekaVizSnapshots(
18218
18341
  params[Param.DataPanelV2Enabled] = dataPanelV2;
18219
18342
  params[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
18220
18343
  params[Param.CoverAndFilterOptionInPDF] = coverAndFilterOptionInPDF;
18221
- if (oAuthPollingInterval !== undefined) {
18222
- params[Param.OauthPollingInterval] = oAuthPollingInterval;
18223
- }
18224
- if (isForceRedirect) {
18225
- params[Param.IsForceRedirect] = isForceRedirect;
18226
- }
18227
- if (dataSourceId !== undefined) {
18228
- params[Param.DataSourceId] = dataSourceId;
18229
- }
18230
- if (isLiveboardStylingAndGroupingEnabled !== undefined) {
18231
- params[Param.IsLiveboardStylingAndGroupingEnabled] = isLiveboardStylingAndGroupingEnabled;
18232
- }
18233
- params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
18234
- params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
18235
- params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;
18236
- params[Param.ShowLiveboardReverifyBanner] = showLiveboardReverifyBanner;
18237
- params[Param.HideIrrelevantFiltersInTab] = hideIrrelevantChipsInLiveboardTabs;
18238
- params[Param.DataPanelV2Enabled] = dataPanelV2;
18239
- params[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
18240
- params[Param.CoverAndFilterOptionInPDF] = coverAndFilterOptionInPDF;
18241
- return params;
18344
+ const queryParams = getQueryParamString(params, true);
18345
+ return queryParams;
18242
18346
  }
18243
18347
  getIframeSuffixSrc(liveboardId, vizId, activeTabId) {
18244
18348
  let suffix = `/embed/viz/${liveboardId}`;
@@ -18301,10 +18405,15 @@ query GetEurekaVizSnapshots(
18301
18405
  }
18302
18406
  beforePrerenderVisible() {
18303
18407
  const embedObj = this.getPreRenderObj();
18304
- const libId = this.currentLiveboardId;
18305
- this.navigateToLiveboard(libId, this.viewConfig.vizId, this.viewConfig.activeTabId, () => {
18306
- if (embedObj)
18307
- embedObj.currentLiveboardId = libId;
18408
+ this.executeAfterEmbedContainerLoaded(() => {
18409
+ this.navigateToLiveboard(this.viewConfig.liveboardId, this.viewConfig.vizId, this.viewConfig.activeTabId);
18410
+ if (embedObj) {
18411
+ embedObj.currentLiveboardState = {
18412
+ liveboardId: this.viewConfig.liveboardId,
18413
+ vizId: this.viewConfig.vizId,
18414
+ activeTabId: this.viewConfig.activeTabId,
18415
+ };
18416
+ }
18308
18417
  });
18309
18418
  }
18310
18419
  async handleRenderForPrerender() {
@@ -18367,13 +18476,13 @@ query GetEurekaVizSnapshots(
18367
18476
  this.postRender();
18368
18477
  return this;
18369
18478
  }
18370
- navigateToLiveboard(liveboardId, vizId, activeTabId, onNavigateCalled) {
18479
+ navigateToLiveboard(liveboardId, vizId, activeTabId) {
18371
18480
  const path = this.getIframeSuffixSrc(liveboardId, vizId, activeTabId);
18372
18481
  this.viewConfig.liveboardId = liveboardId;
18373
18482
  this.viewConfig.activeTabId = activeTabId;
18374
18483
  this.viewConfig.vizId = vizId;
18375
18484
  if (this.isRendered) {
18376
- this.triggerAfterLoad(exports.HostEvent.Navigate, path.substring(1), onNavigateCalled);
18485
+ this.trigger(exports.HostEvent.Navigate, path.substring(1));
18377
18486
  }
18378
18487
  else if (this.viewConfig.preRenderId) {
18379
18488
  this.preRender(true);
@@ -18791,17 +18900,13 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
18791
18900
  super(container, viewConfig);
18792
18901
  this.viewConfig = viewConfig;
18793
18902
  }
18794
- getEmbedParamsObject() {
18903
+ getIframeSrc() {
18795
18904
  var _a;
18905
+ const { sessionId, genNo, acSessionId, acGenNo, convId, messageId, } = this.viewConfig;
18906
+ const path = 'conv-assist-answer';
18796
18907
  const queryParams = this.getBaseQueryParams();
18797
18908
  queryParams[Param.HideActions] = [...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : [])];
18798
18909
  queryParams[Param.isSpotterAgentEmbed] = true;
18799
- return queryParams;
18800
- }
18801
- getIframeSrc() {
18802
- const { sessionId, genNo, acSessionId, acGenNo, convId, messageId, } = this.viewConfig;
18803
- const path = 'conv-assist-answer';
18804
- const queryParams = this.getEmbedParamsObject();
18805
18910
  let query = '';
18806
18911
  const queryParamsString = getQueryParamString(queryParams, true);
18807
18912
  if (queryParamsString) {
@@ -18957,8 +19062,9 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
18957
19062
  super(container, viewConfig);
18958
19063
  this.viewConfig = viewConfig;
18959
19064
  }
18960
- getEmbedParamsObject() {
18961
- const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, } = this.viewConfig;
19065
+ getIframeSrc() {
19066
+ const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, } = this.viewConfig;
19067
+ const path = 'insights/conv-assist';
18962
19068
  if (!worksheetId) {
18963
19069
  this.handleError(ERROR_MESSAGE.SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND);
18964
19070
  }
@@ -18979,17 +19085,19 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
18979
19085
  if (!isUndefined_1(hideSampleQuestions)) {
18980
19086
  queryParams[Param.HideSampleQuestions] = !!hideSampleQuestions;
18981
19087
  }
18982
- return queryParams;
18983
- }
18984
- getIframeSrc() {
18985
- const { worksheetId, searchOptions, } = this.viewConfig;
18986
- const path = 'insights/conv-assist';
18987
- const queryParams = this.getEmbedParamsObject();
18988
19088
  let query = '';
18989
19089
  const queryParamsString = getQueryParamString(queryParams, true);
18990
19090
  if (queryParamsString) {
18991
19091
  query = `?${queryParamsString}`;
18992
19092
  }
19093
+ const filterQuery = getFilterQuery(runtimeFilters || []);
19094
+ if (filterQuery && !excludeRuntimeFiltersfromURL) {
19095
+ query += `&${filterQuery}`;
19096
+ }
19097
+ const parameterQuery = getRuntimeParameters(runtimeParameters || []);
19098
+ if (parameterQuery && !excludeRuntimeParametersfromURL) {
19099
+ query += `&${parameterQuery}`;
19100
+ }
18993
19101
  const tsPostHashParams = this.getThoughtSpotPostUrlParams({
18994
19102
  worksheet: worksheetId,
18995
19103
  query: (searchOptions === null || searchOptions === void 0 ? void 0 : searchOptions.searchQuery) || '',