@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 _mergeNamespaces(n, m) {
4
4
  m.forEach(function (e) {
@@ -1496,7 +1496,7 @@ var EmbedEvent;
1496
1496
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1497
1497
  * @example
1498
1498
  *```js
1499
- * liveboardEmbed.on(EmbedEvent.AnswerChartSwitcher, payload => {
1499
+ * liveboardEmbed.on(EmbedEvent.LiveboardInfo, payload => {
1500
1500
  * console.log('Liveboard details', payload);
1501
1501
  * })
1502
1502
  *```
@@ -1871,58 +1871,58 @@ var EmbedEvent;
1871
1871
  */
1872
1872
  EmbedEvent["RequestVisibleEmbedCoordinates"] = "requestVisibleEmbedCoordinates";
1873
1873
  /**
1874
- * Emitted when spotter response is text data
1874
+ * Emitted when Spotter response is text data
1875
1875
  * @example
1876
1876
  * ```js
1877
1877
  * spotterEmbed.on(EmbedEvent.SpotterData, (payload) => {
1878
1878
  * console.log('payload', payload);
1879
1879
  * })
1880
1880
  *```
1881
- * @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
1881
+ * @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
1882
1882
  */
1883
1883
  EmbedEvent["SpotterData"] = "SpotterData";
1884
1884
  /**
1885
- * Emitted when user opens up the worksheet preview modal in spotter embed.
1885
+ * Emitted when user opens up the worksheet preview modal in Spotter embed.
1886
1886
  * @example
1887
1887
  * ```js
1888
1888
  * spotterEmbed.on(EmbedEvent.PreviewSpotterData, (payload) => {
1889
1889
  * console.log('payload', payload);
1890
1890
  * })
1891
1891
  *```
1892
- * @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
1892
+ * @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
1893
1893
  */
1894
1894
  EmbedEvent["PreviewSpotterData"] = "PreviewSpotterData";
1895
1895
  /**
1896
- * Emitted when the spotter query is triggered in spotter embed.
1896
+ * Emitted when the Spotter query is triggered in Spotter embed.
1897
1897
  * @example
1898
1898
  * ```js
1899
1899
  * spotterEmbed.on(EmbedEvent.SpotterQueryTriggered, (payload) => {
1900
1900
  * console.log('payload', payload);
1901
1901
  * })
1902
1902
  *```
1903
- * @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
1903
+ * @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
1904
1904
  */
1905
1905
  EmbedEvent["SpotterQueryTriggered"] = "SpotterQueryTriggered";
1906
1906
  /**
1907
- * Emitted when the last spotter query is edited in spotter embed.
1907
+ * Emitted when the last Spotter query is edited in Spotter embed.
1908
1908
  * @example
1909
1909
  * ```js
1910
1910
  * spotterEmbed.on(EmbedEvent.LastPromptEdited, (payload) => {
1911
1911
  * console.log('payload', payload);
1912
1912
  * })
1913
1913
  *```
1914
- * @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
1914
+ * @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
1915
1915
  */
1916
1916
  EmbedEvent["LastPromptEdited"] = "LastPromptEdited";
1917
1917
  /**
1918
- * Emitted when the last spotter query is deleted in spotter embed.
1918
+ * Emitted when the last Spotter query is deleted in Spotter embed.
1919
1919
  * @example
1920
1920
  * ```js
1921
1921
  * spotterEmbed.on(EmbedEvent.LastPromptDeleted, (payload) => {
1922
1922
  * console.log('payload', payload);
1923
1923
  * })
1924
1924
  *```
1925
- * @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
1925
+ * @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
1926
1926
  */
1927
1927
  EmbedEvent["LastPromptDeleted"] = "LastPromptDeleted";
1928
1928
  /**
@@ -1933,7 +1933,7 @@ var EmbedEvent;
1933
1933
  * console.log('payload', payload);
1934
1934
  * })
1935
1935
  *```
1936
- * @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
1936
+ * @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
1937
1937
  */
1938
1938
  EmbedEvent["ResetSpotterConversation"] = "ResetSpotterConversation";
1939
1939
  /**
@@ -1946,7 +1946,19 @@ var EmbedEvent;
1946
1946
  *```
1947
1947
  * @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
1948
1948
  */
1949
- EmbedEvent["SpotterInit"] = "SpotterInit";
1949
+ EmbedEvent["SpotterInit"] = "spotterInit";
1950
+ /**
1951
+ * @hidden
1952
+ * Triggers when the embed listener is ready to receive events.
1953
+ * This is used to trigger events after the embed container is loaded.
1954
+ * @example
1955
+ * ```js
1956
+ * liveboardEmbed.on(EmbedEvent.EmbedListenerReady, () => {
1957
+ * console.log('EmbedListenerReady');
1958
+ * })
1959
+ * ```
1960
+ */
1961
+ EmbedEvent["EmbedListenerReady"] = "EmbedListenerReady";
1950
1962
  })(EmbedEvent || (EmbedEvent = {}));
1951
1963
  /**
1952
1964
  * Event types that can be triggered by the host application
@@ -2036,6 +2048,7 @@ var HostEvent;
2036
2048
  * done automatically on the most popular column.
2037
2049
  * @param - vizId [TS >= 9.8.0] - Optional. The GUID of the visualization to drill
2038
2050
  * in case of a Liveboard.
2051
+ * @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
2039
2052
  * @example
2040
2053
  * ```js
2041
2054
  * searchEmbed.on(EmbedEvent.VizPointDoubleClick, (payload) => {
@@ -2355,12 +2368,21 @@ var HostEvent;
2355
2368
  * Trigger the **Download PDF** action on an embedded Liveboard,
2356
2369
  * visualization or Answer.
2357
2370
  *
2371
+ * @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
2372
+ *
2358
2373
  * **NOTE**: The **Download** > **PDF** action is available on
2359
2374
  * visualizations and Answers if the data is in tabular format.
2360
2375
  * @example
2361
2376
  * ```js
2362
2377
  * liveboardEmbed.trigger(HostEvent.DownloadAsPdf)
2363
2378
  * ```
2379
+ * @example
2380
+ * ```js
2381
+ * spotterEmbed.trigger(HostEvent.DownloadAsPdf, {
2382
+ * vizId:'730496d6-6903-4601-937e-2c691821af3c'
2383
+ * });
2384
+ * ```
2385
+ *
2364
2386
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2365
2387
  */
2366
2388
  HostEvent["DownloadAsPdf"] = "downloadAsPdf";
@@ -2462,7 +2484,8 @@ var HostEvent;
2462
2484
  * This event is not supported in visualization embed and search embed.
2463
2485
  * @param - object - To trigger the action for a specific visualization
2464
2486
  * in Liveboard embed, pass in `vizId` as a key.
2465
- * **Required** in Spotter embed.
2487
+ * @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
2488
+ *
2466
2489
  * @example
2467
2490
  * ```js
2468
2491
  * liveboardEmbed.trigger(HostEvent.Edit)
@@ -2477,6 +2500,12 @@ var HostEvent;
2477
2500
  * vizId:'730496d6-6903-4601-937e-2c691821af3c'
2478
2501
  * });
2479
2502
  * ```
2503
+ * @example
2504
+ * ```js
2505
+ * const editResponse = await spotterEmbed.trigger(HostEvent.Edit, {
2506
+ * vizId:'730496d6-6903-4601-937e-2c691821af3c'
2507
+ * });
2508
+ * ```
2480
2509
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2481
2510
  */
2482
2511
  HostEvent["Edit"] = "edit";
@@ -2597,6 +2626,7 @@ var HostEvent;
2597
2626
  /**
2598
2627
  * Trigger the **Download** action on charts in
2599
2628
  * the embedded view.
2629
+ * @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
2600
2630
  * @example
2601
2631
  * ```js
2602
2632
  * liveboardEmbed.trigger(HostEvent.Download, {vizId:
@@ -2605,6 +2635,11 @@ var HostEvent;
2605
2635
  * ```js
2606
2636
  * embed.trigger(HostEvent.Download)
2607
2637
  * ```
2638
+ * ```js
2639
+ * spotterEmbed.trigger(HostEvent.Download, {
2640
+ * vizId:'730496d6-6903-4601-937e-2c691821af3c'
2641
+ * });
2642
+ * ```
2608
2643
  * @deprecated from SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl ,9.4.1.sw
2609
2644
  * Use {@link DownloadAsPng}
2610
2645
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
@@ -2633,6 +2668,7 @@ var HostEvent;
2633
2668
  /**
2634
2669
  * Trigger the **Download** > **CSV** action on tables in
2635
2670
  * the embedded view.
2671
+ * @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
2636
2672
  * @example
2637
2673
  * ```js
2638
2674
  * liveboardEmbed.trigger(HostEvent.DownloadAsCsv, {vizId:
@@ -2655,6 +2691,7 @@ var HostEvent;
2655
2691
  /**
2656
2692
  * Trigger the **Download** > **XLSX** action on tables
2657
2693
  * in the embedded view.
2694
+ * @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
2658
2695
  * @example
2659
2696
  * ```js
2660
2697
  * liveboardEmbed.trigger(HostEvent.DownloadAsXlsx, {vizId:
@@ -2690,7 +2727,7 @@ var HostEvent;
2690
2727
  /**
2691
2728
  * Trigger the **Save** action on a Liveboard or Answer.
2692
2729
  * Saves the changes.
2693
- * @param - `vizId` is required in Spotter Embed.
2730
+ * @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
2694
2731
  * @example
2695
2732
  * ```js
2696
2733
  * liveboardEmbed.trigger(HostEvent.Save)
@@ -3000,6 +3037,7 @@ var HostEvent;
3000
3037
  HostEvent["UpdateParameters"] = "UpdateParameters";
3001
3038
  /**
3002
3039
  * Triggers GetParameters to fetch the runtime Parameters.
3040
+ * @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
3003
3041
  * ```js
3004
3042
  * liveboardEmbed.trigger(HostEvent.GetParameters).then((parameter) => {
3005
3043
  * console.log('parameters', parameter);
@@ -3043,7 +3081,7 @@ var HostEvent;
3043
3081
  * @param - optional attributes to set Answer properties.
3044
3082
  * `name` - Name string for the Answer.
3045
3083
  * `description` - Description text for the Answer.
3046
- *
3084
+ * @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
3047
3085
  * @example
3048
3086
  * ```js
3049
3087
  * const saveAnswerResponse = await searchEmbed.trigger(HostEvent.SaveAnswer, {
@@ -3051,6 +3089,14 @@ var HostEvent;
3051
3089
  * description: "Total sales by states in MidWest"
3052
3090
  * });
3053
3091
  * ```
3092
+ * @example
3093
+ * ```js
3094
+ * const saveAnswerResponse = await spotterEmbed.trigger(HostEvent.SaveAnswer, {
3095
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c',
3096
+ * name: "Sales by states",
3097
+ * description: "Total sales by states in MidWest"
3098
+ * });
3099
+ * ```
3054
3100
  * @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
3055
3101
  */
3056
3102
  HostEvent["SaveAnswer"] = "saveAnswer";
@@ -3082,7 +3128,7 @@ var HostEvent;
3082
3128
  /**
3083
3129
  * Triggers a search operation with the search tokens specified in
3084
3130
  * the search query string in spotter embed.
3085
- * @param - `queryString`: Text string in Natural Language format
3131
+ * @param - `query`: Text string in Natural Language format
3086
3132
  * @param - `executeSearch`: Boolean to execute search and update search query
3087
3133
  * @example
3088
3134
  * ```js
@@ -3091,6 +3137,7 @@ var HostEvent;
3091
3137
  * executeSearch: true,
3092
3138
  * })
3093
3139
  * ```
3140
+ * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
3094
3141
  */
3095
3142
  HostEvent["SpotterSearch"] = "SpotterSearch";
3096
3143
  /**
@@ -3100,6 +3147,7 @@ var HostEvent;
3100
3147
  * ```js
3101
3148
  * spotterEmbed.trigger(HostEvent.EditLastPrompt, "revenue per year");
3102
3149
  * ```
3150
+ * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
3103
3151
  */
3104
3152
  HostEvent["EditLastPrompt"] = "EditLastPrompt";
3105
3153
  /**
@@ -3108,6 +3156,7 @@ var HostEvent;
3108
3156
  * ```js
3109
3157
  * spotterEmbed.trigger(HostEvent.PreviewSpotterData);
3110
3158
  * ```
3159
+ * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
3111
3160
  */
3112
3161
  HostEvent["PreviewSpotterData"] = "PreviewSpotterData";
3113
3162
  /**
@@ -3116,6 +3165,7 @@ var HostEvent;
3116
3165
  * ```js
3117
3166
  * spotterEmbed.trigger(HostEvent.ResetSpotterConversation);
3118
3167
  * ```
3168
+ * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
3119
3169
  */
3120
3170
  HostEvent["ResetSpotterConversation"] = "ResetSpotterConversation";
3121
3171
  /**
@@ -3124,17 +3174,19 @@ var HostEvent;
3124
3174
  * ```js
3125
3175
  * spotterEmbed.trigger(HostEvent.DeleteLastPrompt);
3126
3176
  * ```
3177
+ * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
3127
3178
  */
3128
3179
  HostEvent["DeleteLastPrompt"] = "DeleteLastPrompt";
3129
3180
  /**
3130
3181
  * Toggle the visualization to chart or table view.
3131
- * @param - `vizId ` In Spotter Embed, vizId is required.
3182
+ * @param - `vizId ` refers to the answer id in spotter Embed, it is required in spotter Embed.
3132
3183
  * @example
3133
3184
  * ```js
3134
3185
  * spotterEmbed.trigger(HostEvent.AnswerChartSwitcher, {
3135
- * vizId:"'b535c760-8bbe-4e6f-bb26-af56b4129a1e'"
3186
+ * vizId:'b535c760-8bbe-4e6f-bb26-af56b4129a1e'
3136
3187
  * });
3137
3188
  *```
3189
+ * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
3138
3190
  */
3139
3191
  HostEvent["AnswerChartSwitcher"] = "answerChartSwitcher";
3140
3192
  /**
@@ -3161,25 +3213,16 @@ var HostEvent;
3161
3213
  */
3162
3214
  HostEvent["VisibleEmbedCoordinates"] = "visibleEmbedCoordinates";
3163
3215
  /**
3164
- * Trigger the *Ask Sage* action for visualizations
3216
+ * Trigger the *Ask Spotter* action for visualizations
3217
+ * @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
3165
3218
  * @example
3166
3219
  * ```js
3167
- * liveboardEmbed.trigger(HostEvent.AskSpotter,
3168
- * {containerId:'730496d6-6903-4601-937e-2c691821af3c'})
3220
+ * spotterEmbed.trigger(HostEvent.AskSpotter,
3221
+ * {vizId:'730496d6-6903-4601-937e-2c691821af3c'})
3169
3222
  * ```
3170
3223
  * @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
3171
3224
  */
3172
- HostEvent["AskSpotter"] = "askSpotter";
3173
- /**
3174
- * @hidden
3175
- * Triggers the update of the embed params.
3176
- *
3177
- * @example
3178
- * ```js
3179
- * liveboardEmbed.trigger(HostEvent.UpdateEmbedParams, viewConfig);
3180
- * ```
3181
- */
3182
- HostEvent["UpdateEmbedParams"] = "updateEmbedParams";
3225
+ HostEvent["AskSpotter"] = "AskSpotter";
3183
3226
  })(HostEvent || (HostEvent = {}));
3184
3227
  /**
3185
3228
  * The different visual modes that the data sources panel within
@@ -3285,6 +3328,7 @@ var Param;
3285
3328
  Param["Query"] = "query";
3286
3329
  Param["HideHomepageLeftNav"] = "hideHomepageLeftNav";
3287
3330
  Param["ModularHomeExperienceEnabled"] = "modularHomeExperience";
3331
+ Param["HomepageVersion"] = "homepageVersion";
3288
3332
  Param["ListPageVersion"] = "listpageVersion";
3289
3333
  Param["PendoTrackingKey"] = "additionalPendoKey";
3290
3334
  Param["LiveboardHeaderSticky"] = "isLiveboardHeaderSticky";
@@ -3479,27 +3523,27 @@ var Action;
3479
3523
  */
3480
3524
  Action["ConfigureFilter"] = "configureFilter";
3481
3525
  /**
3482
- * The **Collapse data sources** icon on the Search page.
3483
- * Collapses the panel showing data sources.
3484
- *
3485
- * @example
3486
- * ```js
3487
- * disabledActions: [Action.CollapseDataPanel]
3488
- * ```
3489
- * @version: SDK: 1.1.0 | ThoughtSpot Cloud: ts7.may.cl, 8.4.1.sw
3490
- */
3526
+ * The **Collapse data sources** icon on the Search page.
3527
+ * Collapses the panel showing data sources.
3528
+ *
3529
+ * @example
3530
+ * ```js
3531
+ * disabledActions: [Action.CollapseDataPanel]
3532
+ * ```
3533
+ * @version: SDK: 1.1.0 | ThoughtSpot Cloud: ts7.may.cl, 8.4.1.sw
3534
+ */
3491
3535
  Action["CollapseDataSources"] = "collapseDataSources";
3492
3536
  /**
3493
- * The **Collapse data panel** icon on the Search page.
3494
- * Collapses the data panel view.
3495
- *
3496
- * @version: SDK: 1.34.0 | ThoughtSpot Cloud: 10.3.0.cl
3497
- *
3498
- * @example
3499
- * ```js
3500
- * disabledActions: [Action.CollapseDataPanel]
3501
- * ```
3502
- */
3537
+ * The **Collapse data panel** icon on the Search page.
3538
+ * Collapses the data panel view.
3539
+ *
3540
+ * @version: SDK: 1.34.0 | ThoughtSpot Cloud: 10.3.0.cl
3541
+ *
3542
+ * @example
3543
+ * ```js
3544
+ * disabledActions: [Action.CollapseDataPanel]
3545
+ * ```
3546
+ */
3503
3547
  Action["CollapseDataPanel"] = "collapseDataPanel";
3504
3548
  /**
3505
3549
  * The **Choose sources** button on Search page.
@@ -4195,6 +4239,17 @@ var Action;
4195
4239
  * @version SDK: 1.25.0 | ThoughtSpot Cloud: 9.6.0.cl
4196
4240
  */
4197
4241
  Action["EnableContextualChangeAnalysis"] = "enableContextualChangeAnalysis";
4242
+ /**
4243
+ * Action ID to hide or disable Iterative Change Analysis option
4244
+ * on contextual change analysis Inisght charts context menu
4245
+ *
4246
+ * @example
4247
+ * ```js
4248
+ * disabledActions: [Action.EnableIterativeChangeAnalysis]
4249
+ * ```
4250
+ * @version SDK: 1.41.0 | ThoughtSpot Cloud: 9.12.0.cl
4251
+ */
4252
+ Action["EnableIterativeChangeAnalysis"] = "enableIterativeChangeAnalysis";
4198
4253
  /**
4199
4254
  * Action ID to hide or disable Natural Language Search query.
4200
4255
  *
@@ -4564,6 +4619,39 @@ var Action;
4564
4619
  * @version SDK: 1.39.0 | ThoughtSpot Cloud: 10.10.0.cl
4565
4620
  */
4566
4621
  Action["InConversationTraining"] = "InConversationTraining";
4622
+ /**
4623
+ * Action ID to hide the warnings banner in
4624
+ * Spotter results. It's an EA feature and
4625
+ * handled by LD.
4626
+ * @example
4627
+ * ```js
4628
+ * hiddenAction: [Action.SpotterWarningsBanner]
4629
+ * ```
4630
+ * @version SDK: 1.41.0 | ThoughtSpot Cloud: 10.13.0.cl
4631
+ */
4632
+ Action["SpotterWarningsBanner"] = "SpotterWarningsBanner";
4633
+ /**
4634
+ * Action ID to hide the warnings border on the knowledge
4635
+ * card in Spotter results. It's an EA feature and
4636
+ * handled by LD.
4637
+ * @example
4638
+ * ```js
4639
+ * hiddenAction: [Action.SpotterWarningsOnTokens]
4640
+ * ```
4641
+ * @version SDK: 1.41.0 | ThoughtSpot Cloud: 10.13.0.cl
4642
+ */
4643
+ Action["SpotterWarningsOnTokens"] = "SpotterWarningsOnTokens";
4644
+ /**
4645
+ * Action ID to disable the click event handler on knowledge
4646
+ * card in Spotter results. It's an EA feature and
4647
+ * handled by LD.
4648
+ * @example
4649
+ * ```js
4650
+ * hiddenAction: [Action.SpotterTokenQuickEdit]
4651
+ * ```
4652
+ * @version SDK: 1.41.0 | ThoughtSpot Cloud: 10.13.0.cl
4653
+ */
4654
+ Action["SpotterTokenQuickEdit"] = "SpotterTokenQuickEdit";
4567
4655
  })(Action || (Action = {}));
4568
4656
  var PrefetchFeatures;
4569
4657
  (function (PrefetchFeatures) {
@@ -7921,7 +8009,7 @@ class AnswerService {
7921
8009
  async getTML() {
7922
8010
  const { object } = await this.executeQuery(getAnswerTML, {});
7923
8011
  const edoc = object[0].edoc;
7924
- const YAML = await import('./index-k7pkZMhx.js');
8012
+ const YAML = await import('./index-P5YjBOuJ.js');
7925
8013
  const parsedDoc = YAML.parse(edoc);
7926
8014
  return {
7927
8015
  answer: {
@@ -15821,7 +15909,7 @@ function processEventData(type, e, thoughtSpotHost, containerEl) {
15821
15909
  return e;
15822
15910
  }
15823
15911
 
15824
- 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={".":{"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,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};
15912
+ 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={".":{"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,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};
15825
15913
 
15826
15914
  /**
15827
15915
  * Reloads the ThoughtSpot iframe.
@@ -16047,7 +16135,6 @@ class TsEmbed {
16047
16135
  */
16048
16136
  this.fullscreenChangeHandler = null;
16049
16137
  this.subscribedListeners = {};
16050
- this.isEmbedContainerLoaded = false;
16051
16138
  /**
16052
16139
  * Send Custom style as part of payload of APP_INIT
16053
16140
  * @param _
@@ -16119,20 +16206,49 @@ class TsEmbed {
16119
16206
  });
16120
16207
  notifyAuthFailure(AuthFailureType.IDLE_SESSION_TIMEOUT);
16121
16208
  };
16122
- this.pendingEvents = [];
16123
16209
  /**
16124
16210
  * Register APP_INIT event and sendback init payload
16125
16211
  */
16126
16212
  this.registerAppInit = () => {
16127
16213
  this.on(EmbedEvent.APP_INIT, this.appInitCb, { start: false }, true);
16128
- this.on(EmbedEvent.AuthInit, () => {
16129
- this.isEmbedContainerLoaded = true;
16130
- this.executePendingEvents();
16131
- }, { start: false }, true);
16132
16214
  this.on(EmbedEvent.AuthExpire, this.updateAuthToken, { start: false }, true);
16133
16215
  this.on(EmbedEvent.IdleSessionTimeout, this.idleSessionTimeout, { start: false }, true);
16216
+ const embedListenerReadyHandler = this.createEmbedContainerHandler(EmbedEvent.EmbedListenerReady);
16217
+ this.on(EmbedEvent.EmbedListenerReady, embedListenerReadyHandler, { start: false }, true);
16218
+ const authInitHandler = this.createEmbedContainerHandler(EmbedEvent.AuthInit);
16219
+ this.on(EmbedEvent.AuthInit, authInitHandler, { start: false }, true);
16134
16220
  };
16135
16221
  this.showPreRenderByDefault = false;
16222
+ /**
16223
+ * @hidden
16224
+ * Internal state to track if the embed container is loaded.
16225
+ * This is used to trigger events after the embed container is loaded.
16226
+ */
16227
+ this.isEmbedContainerLoaded = false;
16228
+ /**
16229
+ * @hidden
16230
+ * Internal state to track the callbacks to be executed after the embed container
16231
+ * is loaded.
16232
+ * This is used to trigger events after the embed container is loaded.
16233
+ */
16234
+ this.embedContainerReadyCallbacks = [];
16235
+ this.createEmbedContainerHandler = (source) => () => {
16236
+ const processEmbedContainerReady = () => {
16237
+ logger$3.debug('processEmbedContainerReady');
16238
+ this.isEmbedContainerLoaded = true;
16239
+ this.executeEmbedContainerReadyCallbacks();
16240
+ };
16241
+ if (source === EmbedEvent.AuthInit) {
16242
+ const AUTH_INIT_FALLBACK_DELAY = 1000;
16243
+ // Wait for 1 second to ensure the embed container is loaded
16244
+ // This is a workaround to ensure the embed container is loaded
16245
+ // this is needed until all clusters have EmbedListenerReady event
16246
+ setTimeout(processEmbedContainerReady, AUTH_INIT_FALLBACK_DELAY);
16247
+ }
16248
+ else if (source === EmbedEvent.EmbedListenerReady) {
16249
+ processEmbedContainerReady();
16250
+ }
16251
+ };
16136
16252
  this.validatePreRenderViewConfig = (viewConfig) => {
16137
16253
  var _a;
16138
16254
  const preRenderAllowedKeys = ['preRenderId', 'vizId', 'liveboardId'];
@@ -16154,7 +16270,6 @@ class TsEmbed {
16154
16270
  });
16155
16271
  }
16156
16272
  };
16157
- this.id = Date.now().toString();
16158
16273
  this.el = getDOMNode(domSelector);
16159
16274
  this.eventHandlerMap = new Map();
16160
16275
  this.isError = false;
@@ -16168,9 +16283,9 @@ class TsEmbed {
16168
16283
  ...viewConfig,
16169
16284
  });
16170
16285
  this.hostEventClient = new HostEventClient(this.iFrame);
16171
- const embedConfig = getEmbedConfig();
16172
- this.embedConfig = embedConfig;
16173
16286
  this.isReadyForRenderPromise = getInitPromise().then(async () => {
16287
+ const embedConfig = getEmbedConfig();
16288
+ this.embedConfig = embedConfig;
16174
16289
  if (!embedConfig.authTriggerContainer && !embedConfig.useEventForSAMLPopup) {
16175
16290
  this.embedConfig.authTriggerContainer = domSelector;
16176
16291
  }
@@ -16341,43 +16456,6 @@ class TsEmbed {
16341
16456
  async getAppInitData() {
16342
16457
  return this.getDefaultAppInitData();
16343
16458
  }
16344
- getPreRenderObj() {
16345
- var _a;
16346
- const embedObj = (_a = this.insertedDomEl) === null || _a === void 0 ? void 0 : _a[this.embedNodeKey];
16347
- if (embedObj === this) {
16348
- logger$3.info('embedObj is same as this');
16349
- }
16350
- return embedObj;
16351
- }
16352
- checkEmbedContainerLoaded() {
16353
- if (this.isEmbedContainerLoaded)
16354
- return true;
16355
- const preRenderObj = this.getPreRenderObj();
16356
- if (preRenderObj && preRenderObj.isEmbedContainerLoaded) {
16357
- this.isEmbedContainerLoaded = true;
16358
- }
16359
- return this.isEmbedContainerLoaded;
16360
- }
16361
- executePendingEvents() {
16362
- logger$3.debug('executePendingEvents', this.pendingEvents);
16363
- setTimeout(() => {
16364
- this.pendingEvents.forEach((event) => {
16365
- var _a;
16366
- this.trigger(event.eventType, event.data);
16367
- (_a = event.onEventTriggered) === null || _a === void 0 ? void 0 : _a.call(event);
16368
- });
16369
- this.pendingEvents = [];
16370
- }, 1000);
16371
- }
16372
- triggerAfterLoad(eventType, data, onEventTriggered) {
16373
- if (this.checkEmbedContainerLoaded()) {
16374
- this.trigger(eventType, data);
16375
- onEventTriggered === null || onEventTriggered === void 0 ? void 0 : onEventTriggered();
16376
- }
16377
- else {
16378
- this.pendingEvents.push({ eventType, data, onEventTriggered });
16379
- }
16380
- }
16381
16459
  /**
16382
16460
  * Constructs the base URL string to load the ThoughtSpot app.
16383
16461
  * @param query
@@ -16392,11 +16470,6 @@ class TsEmbed {
16392
16470
  .join('/');
16393
16471
  return `${basePath}#`;
16394
16472
  }
16395
- getUpdateEmbedParamsObject() {
16396
- let queryParams = this.getEmbedParamsObject();
16397
- queryParams = { ...this.viewConfig, ...queryParams };
16398
- return queryParams;
16399
- }
16400
16473
  /**
16401
16474
  * Common query params set for all the embed modes.
16402
16475
  * @param queryParams
@@ -16546,13 +16619,9 @@ class TsEmbed {
16546
16619
  return path;
16547
16620
  }
16548
16621
  getEmbedParams() {
16549
- const queryParams = this.getEmbedParamsObject();
16622
+ const queryParams = this.getBaseQueryParams();
16550
16623
  return getQueryParamString(queryParams);
16551
16624
  }
16552
- getEmbedParamsObject() {
16553
- const params = this.getBaseQueryParams();
16554
- return params;
16555
- }
16556
16625
  getRootIframeSrc() {
16557
16626
  const query = this.getEmbedParams();
16558
16627
  return this.getEmbedBasePath(query);
@@ -16932,6 +17001,43 @@ class TsEmbed {
16932
17001
  logger$3.log('Event Port is not defined');
16933
17002
  }
16934
17003
  }
17004
+ getPreRenderObj() {
17005
+ var _a;
17006
+ const embedObj = (_a = this.insertedDomEl) === null || _a === void 0 ? void 0 : _a[this.embedNodeKey];
17007
+ if (embedObj === this) {
17008
+ logger$3.info('embedObj is same as this');
17009
+ }
17010
+ return embedObj;
17011
+ }
17012
+ checkEmbedContainerLoaded() {
17013
+ if (this.isEmbedContainerLoaded)
17014
+ return true;
17015
+ const preRenderObj = this.getPreRenderObj();
17016
+ if (preRenderObj && preRenderObj.isEmbedContainerLoaded) {
17017
+ this.isEmbedContainerLoaded = true;
17018
+ }
17019
+ return this.isEmbedContainerLoaded;
17020
+ }
17021
+ executeEmbedContainerReadyCallbacks() {
17022
+ logger$3.debug('executePendingEvents', this.embedContainerReadyCallbacks);
17023
+ this.embedContainerReadyCallbacks.forEach((callback) => {
17024
+ callback === null || callback === void 0 ? void 0 : callback();
17025
+ });
17026
+ this.embedContainerReadyCallbacks = [];
17027
+ }
17028
+ /**
17029
+ * Executes a callback after the embed container is loaded.
17030
+ * @param callback The callback to execute
17031
+ */
17032
+ executeAfterEmbedContainerLoaded(callback) {
17033
+ if (this.checkEmbedContainerLoaded()) {
17034
+ callback === null || callback === void 0 ? void 0 : callback();
17035
+ }
17036
+ else {
17037
+ logger$3.debug('pushing callback to embedContainerReadyCallbacks', callback);
17038
+ this.embedContainerReadyCallbacks.push(callback);
17039
+ }
17040
+ }
16935
17041
  /**
16936
17042
  * Triggers an event to the embedded app
16937
17043
  * @param {HostEvent} messageType The event type
@@ -17076,10 +17182,7 @@ class TsEmbed {
17076
17182
  return this.preRender(true);
17077
17183
  }
17078
17184
  this.validatePreRenderViewConfig(this.viewConfig);
17079
- logger$3.debug('triggering UpdateEmbedParams', this.viewConfig);
17080
- this.triggerAfterLoad(HostEvent.UpdateEmbedParams, this.getUpdateEmbedParamsObject());
17081
17185
  }
17082
- this.beforePrerenderVisible();
17083
17186
  if (this.el) {
17084
17187
  this.syncPreRenderStyle();
17085
17188
  if (!this.viewConfig.doNotTrackPreRenderSize) {
@@ -17096,6 +17199,7 @@ class TsEmbed {
17096
17199
  this.resizeObserver.observe(this.el);
17097
17200
  }
17098
17201
  }
17202
+ this.beforePrerenderVisible();
17099
17203
  removeStyleProperties(this.preRenderWrapper, ['z-index', 'opacity', 'pointer-events']);
17100
17204
  this.subscribeToEvents();
17101
17205
  // Setup fullscreen change handler for prerendered components
@@ -17369,6 +17473,11 @@ var HomePage;
17369
17473
  * It serves as the foundational version of the home page.
17370
17474
  */
17371
17475
  HomePage["Modular"] = "v2";
17476
+ /**
17477
+ * ModularWithStylingChanges (v3) introduces Modular Home Experience
17478
+ * with styling changes.
17479
+ */
17480
+ HomePage["ModularWithStylingChanges"] = "v3";
17372
17481
  })(HomePage || (HomePage = {}));
17373
17482
  /**
17374
17483
  * Define the version of the list page
@@ -17534,16 +17643,33 @@ class AppEmbed extends V1Embed {
17534
17643
  else {
17535
17644
  params[Param.DataPanelCustomGroupsAccordionInitialState] = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL;
17536
17645
  }
17646
+ // Set navigation to v2 by default to avoid problems like the app
17647
+ // switcher (9-dot menu) not showing when v3 navigation is turned on
17648
+ // at the cluster level.
17649
+ // To use v3 navigation, we must manually set the discoveryExperience
17650
+ // settings.
17651
+ params[Param.NavigationVersion] = 'v2';
17652
+ // Set homePageVersion to v2 by default to reset the LD flag value
17653
+ // for the homepageVersion.
17654
+ params[Param.HomepageVersion] = 'v2';
17537
17655
  if (discoveryExperience) {
17538
17656
  // primaryNavbarVersion v3 will enabled the new left navigation
17539
17657
  if (discoveryExperience.primaryNavbarVersion === PrimaryNavbarVersion.Sliding) {
17540
17658
  params[Param.NavigationVersion] = discoveryExperience.primaryNavbarVersion;
17659
+ // Enable the modularHomeExperience when Sliding is enabled.
17660
+ params[Param.ModularHomeExperienceEnabled] = true;
17541
17661
  }
17542
17662
  // homePage v2 will enable the modular home page
17543
17663
  // and it will override the modularHomeExperience value
17544
17664
  if (discoveryExperience.homePage === HomePage.Modular) {
17545
17665
  params[Param.ModularHomeExperienceEnabled] = true;
17546
17666
  }
17667
+ // ModularWithStylingChanges (v3) introduces the styling changes
17668
+ // to the Modular Homepage.
17669
+ // v3 will be the base version of homePageVersion.
17670
+ if (discoveryExperience.homePage === HomePage.ModularWithStylingChanges) {
17671
+ params[Param.HomepageVersion] = HomePage.ModularWithStylingChanges;
17672
+ }
17547
17673
  // listPageVersion v3 will enable the new list page
17548
17674
  if (discoveryExperience.listPageVersion === ListPage.ListWithUXChanges) {
17549
17675
  params[Param.ListPageVersion] = discoveryExperience.listPageVersion;
@@ -17821,7 +17947,16 @@ class LiveboardEmbed extends V1Embed {
17821
17947
  }
17822
17948
  this.setIFrameHeight(frameHeight || this.defaultHeight);
17823
17949
  };
17824
- this.currentLiveboardId = this.viewConfig.liveboardId;
17950
+ /**
17951
+ * @hidden
17952
+ * Internal state to track the current liveboard id.
17953
+ * This is used to navigate to the correct liveboard when the prerender is visible.
17954
+ */
17955
+ this.currentLiveboardState = {
17956
+ liveboardId: this.viewConfig.liveboardId,
17957
+ vizId: this.viewConfig.vizId,
17958
+ activeTabId: this.viewConfig.activeTabId,
17959
+ };
17825
17960
  if (this.viewConfig.fullHeight === true) {
17826
17961
  if (this.viewConfig.vizId) {
17827
17962
  logger$3.warn('Full height is currently only supported for Liveboard embeds.' +
@@ -17838,11 +17973,6 @@ class LiveboardEmbed extends V1Embed {
17838
17973
  * embedded Liveboard or visualization.
17839
17974
  */
17840
17975
  getEmbedParams() {
17841
- const params = this.getEmbedParamsObject();
17842
- const queryParams = getQueryParamString(params, true);
17843
- return queryParams;
17844
- }
17845
- getEmbedParamsObject() {
17846
17976
  let params = {};
17847
17977
  params = this.getBaseQueryParams(params);
17848
17978
  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;
@@ -17912,27 +18042,8 @@ class LiveboardEmbed extends V1Embed {
17912
18042
  params[Param.DataPanelV2Enabled] = dataPanelV2;
17913
18043
  params[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
17914
18044
  params[Param.CoverAndFilterOptionInPDF] = coverAndFilterOptionInPDF;
17915
- if (oAuthPollingInterval !== undefined) {
17916
- params[Param.OauthPollingInterval] = oAuthPollingInterval;
17917
- }
17918
- if (isForceRedirect) {
17919
- params[Param.IsForceRedirect] = isForceRedirect;
17920
- }
17921
- if (dataSourceId !== undefined) {
17922
- params[Param.DataSourceId] = dataSourceId;
17923
- }
17924
- if (isLiveboardStylingAndGroupingEnabled !== undefined) {
17925
- params[Param.IsLiveboardStylingAndGroupingEnabled] = isLiveboardStylingAndGroupingEnabled;
17926
- }
17927
- params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
17928
- params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
17929
- params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;
17930
- params[Param.ShowLiveboardReverifyBanner] = showLiveboardReverifyBanner;
17931
- params[Param.HideIrrelevantFiltersInTab] = hideIrrelevantChipsInLiveboardTabs;
17932
- params[Param.DataPanelV2Enabled] = dataPanelV2;
17933
- params[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
17934
- params[Param.CoverAndFilterOptionInPDF] = coverAndFilterOptionInPDF;
17935
- return params;
18045
+ const queryParams = getQueryParamString(params, true);
18046
+ return queryParams;
17936
18047
  }
17937
18048
  getIframeSuffixSrc(liveboardId, vizId, activeTabId) {
17938
18049
  let suffix = `/embed/viz/${liveboardId}`;
@@ -17995,10 +18106,15 @@ class LiveboardEmbed extends V1Embed {
17995
18106
  }
17996
18107
  beforePrerenderVisible() {
17997
18108
  const embedObj = this.getPreRenderObj();
17998
- const libId = this.currentLiveboardId;
17999
- this.navigateToLiveboard(libId, this.viewConfig.vizId, this.viewConfig.activeTabId, () => {
18000
- if (embedObj)
18001
- embedObj.currentLiveboardId = libId;
18109
+ this.executeAfterEmbedContainerLoaded(() => {
18110
+ this.navigateToLiveboard(this.viewConfig.liveboardId, this.viewConfig.vizId, this.viewConfig.activeTabId);
18111
+ if (embedObj) {
18112
+ embedObj.currentLiveboardState = {
18113
+ liveboardId: this.viewConfig.liveboardId,
18114
+ vizId: this.viewConfig.vizId,
18115
+ activeTabId: this.viewConfig.activeTabId,
18116
+ };
18117
+ }
18002
18118
  });
18003
18119
  }
18004
18120
  async handleRenderForPrerender() {
@@ -18061,13 +18177,13 @@ class LiveboardEmbed extends V1Embed {
18061
18177
  this.postRender();
18062
18178
  return this;
18063
18179
  }
18064
- navigateToLiveboard(liveboardId, vizId, activeTabId, onNavigateCalled) {
18180
+ navigateToLiveboard(liveboardId, vizId, activeTabId) {
18065
18181
  const path = this.getIframeSuffixSrc(liveboardId, vizId, activeTabId);
18066
18182
  this.viewConfig.liveboardId = liveboardId;
18067
18183
  this.viewConfig.activeTabId = activeTabId;
18068
18184
  this.viewConfig.vizId = vizId;
18069
18185
  if (this.isRendered) {
18070
- this.triggerAfterLoad(HostEvent.Navigate, path.substring(1), onNavigateCalled);
18186
+ this.trigger(HostEvent.Navigate, path.substring(1));
18071
18187
  }
18072
18188
  else if (this.viewConfig.preRenderId) {
18073
18189
  this.preRender(true);
@@ -18169,9 +18285,11 @@ class SearchEmbed extends TsEmbed {
18169
18285
  const defaultAppInitData = await super.getAppInitData();
18170
18286
  return { ...defaultAppInitData, ...this.getSearchInitData() };
18171
18287
  }
18172
- getEmbedParamsObject() {
18288
+ getEmbedParams() {
18173
18289
  var _a;
18174
- const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, hideSearchBar, dataPanelV2 = false, useLastSelectedSources = false, runtimeParameters, collapseSearchBarInitially = false, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false, dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, focusSearchBarOnRender = true, excludeRuntimeParametersfromURL, excludeSearchTokenStringFromURL, collapseSearchBar = true, } = this.viewConfig;
18290
+ const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, hideSearchBar, dataPanelV2 = false, useLastSelectedSources = false, runtimeParameters, collapseSearchBarInitially = false, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false,
18291
+ /* eslint-disable-next-line max-len */
18292
+ dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, focusSearchBarOnRender = true, excludeRuntimeParametersfromURL, excludeSearchTokenStringFromURL, collapseSearchBar = true, } = this.viewConfig;
18175
18293
  const queryParams = this.getBaseQueryParams();
18176
18294
  queryParams[Param.HideActions] = [
18177
18295
  ...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : []),
@@ -18204,6 +18322,7 @@ class SearchEmbed extends TsEmbed {
18204
18322
  queryParams[Param.HideSearchBar] = true;
18205
18323
  }
18206
18324
  if (isOnBeforeGetVizDataInterceptEnabled) {
18325
+ /* eslint-disable-next-line max-len */
18207
18326
  queryParams[Param.IsOnBeforeGetVizDataInterceptEnabled] = isOnBeforeGetVizDataInterceptEnabled;
18208
18327
  }
18209
18328
  if (!focusSearchBarOnRender) {
@@ -18216,22 +18335,20 @@ class SearchEmbed extends TsEmbed {
18216
18335
  queryParams[Param.UseLastSelectedDataSource] = false;
18217
18336
  }
18218
18337
  queryParams[Param.searchEmbed] = true;
18338
+ /* eslint-disable-next-line max-len */
18219
18339
  queryParams[Param.CollapseSearchBarInitially] = collapseSearchBarInitially || collapseSearchBar;
18220
18340
  queryParams[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
18221
18341
  if (dataPanelCustomGroupsAccordionInitialState
18222
18342
  === DataPanelCustomColumnGroupsAccordionState.COLLAPSE_ALL
18223
18343
  || dataPanelCustomGroupsAccordionInitialState
18224
18344
  === DataPanelCustomColumnGroupsAccordionState.EXPAND_FIRST) {
18345
+ /* eslint-disable-next-line max-len */
18225
18346
  queryParams[Param.DataPanelCustomGroupsAccordionInitialState] = dataPanelCustomGroupsAccordionInitialState;
18226
18347
  }
18227
18348
  else {
18349
+ /* eslint-disable-next-line max-len */
18228
18350
  queryParams[Param.DataPanelCustomGroupsAccordionInitialState] = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL;
18229
18351
  }
18230
- return queryParams;
18231
- }
18232
- getEmbedParams() {
18233
- const { runtimeParameters, runtimeFilters, excludeRuntimeParametersfromURL, excludeRuntimeFiltersfromURL, } = this.viewConfig;
18234
- const queryParams = this.getEmbedParamsObject();
18235
18352
  let query = '';
18236
18353
  const queryParamsString = getQueryParamString(queryParams, true);
18237
18354
  if (queryParamsString) {
@@ -18287,9 +18404,15 @@ class SearchBarEmbed extends TsEmbed {
18287
18404
  this.embedComponentType = 'SearchBarEmbed';
18288
18405
  this.viewConfig = viewConfig;
18289
18406
  }
18290
- getEmbedParamsObject() {
18407
+ /**
18408
+ * Construct the URL of the embedded ThoughtSpot search to be
18409
+ * loaded in the iframe
18410
+ * @param dataSources A list of data source GUIDs
18411
+ */
18412
+ getIFrameSrc() {
18291
18413
  var _a;
18292
18414
  const { searchOptions, dataSource, dataSources, useLastSelectedSources = false, excludeSearchTokenStringFromURL, } = this.viewConfig;
18415
+ const path = 'search-bar-embed';
18293
18416
  const queryParams = this.getBaseQueryParams();
18294
18417
  queryParams[Param.HideActions] = [...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : [])];
18295
18418
  if (dataSources && dataSources.length) {
@@ -18311,16 +18434,6 @@ class SearchBarEmbed extends TsEmbed {
18311
18434
  queryParams[Param.UseLastSelectedDataSource] = false;
18312
18435
  }
18313
18436
  queryParams[Param.searchEmbed] = true;
18314
- return queryParams;
18315
- }
18316
- /**
18317
- * Construct the URL of the embedded ThoughtSpot search to be
18318
- * loaded in the iframe
18319
- * @param dataSources A list of data source GUIDs
18320
- */
18321
- getIFrameSrc() {
18322
- const queryParams = this.getEmbedParamsObject();
18323
- const path = 'search-bar-embed';
18324
18437
  let query = '';
18325
18438
  const queryParamsString = getQueryParamString(queryParams, true);
18326
18439
  if (queryParamsString) {
@@ -18743,17 +18856,13 @@ class ConversationMessage extends TsEmbed {
18743
18856
  super(container, viewConfig);
18744
18857
  this.viewConfig = viewConfig;
18745
18858
  }
18746
- getEmbedParamsObject() {
18859
+ getIframeSrc() {
18747
18860
  var _a;
18861
+ const { sessionId, genNo, acSessionId, acGenNo, convId, messageId, } = this.viewConfig;
18862
+ const path = 'conv-assist-answer';
18748
18863
  const queryParams = this.getBaseQueryParams();
18749
18864
  queryParams[Param.HideActions] = [...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : [])];
18750
18865
  queryParams[Param.isSpotterAgentEmbed] = true;
18751
- return queryParams;
18752
- }
18753
- getIframeSrc() {
18754
- const { sessionId, genNo, acSessionId, acGenNo, convId, messageId, } = this.viewConfig;
18755
- const path = 'conv-assist-answer';
18756
- const queryParams = this.getEmbedParamsObject();
18757
18866
  let query = '';
18758
18867
  const queryParamsString = getQueryParamString(queryParams, true);
18759
18868
  if (queryParamsString) {
@@ -18914,8 +19023,9 @@ class SpotterEmbed extends TsEmbed {
18914
19023
  super(container, viewConfig);
18915
19024
  this.viewConfig = viewConfig;
18916
19025
  }
18917
- getEmbedParamsObject() {
18918
- const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, } = this.viewConfig;
19026
+ getIframeSrc() {
19027
+ const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, } = this.viewConfig;
19028
+ const path = 'insights/conv-assist';
18919
19029
  if (!worksheetId) {
18920
19030
  this.handleError(ERROR_MESSAGE.SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND);
18921
19031
  }
@@ -18936,17 +19046,19 @@ class SpotterEmbed extends TsEmbed {
18936
19046
  if (!isUndefined_1(hideSampleQuestions)) {
18937
19047
  queryParams[Param.HideSampleQuestions] = !!hideSampleQuestions;
18938
19048
  }
18939
- return queryParams;
18940
- }
18941
- getIframeSrc() {
18942
- const { worksheetId, searchOptions, } = this.viewConfig;
18943
- const path = 'insights/conv-assist';
18944
- const queryParams = this.getEmbedParamsObject();
18945
19049
  let query = '';
18946
19050
  const queryParamsString = getQueryParamString(queryParams, true);
18947
19051
  if (queryParamsString) {
18948
19052
  query = `?${queryParamsString}`;
18949
19053
  }
19054
+ const filterQuery = getFilterQuery(runtimeFilters || []);
19055
+ if (filterQuery && !excludeRuntimeFiltersfromURL) {
19056
+ query += `&${filterQuery}`;
19057
+ }
19058
+ const parameterQuery = getRuntimeParameters(runtimeParameters || []);
19059
+ if (parameterQuery && !excludeRuntimeParametersfromURL) {
19060
+ query += `&${parameterQuery}`;
19061
+ }
18950
19062
  const tsPostHashParams = this.getThoughtSpotPostUrlParams({
18951
19063
  worksheet: worksheetId,
18952
19064
  query: (searchOptions === null || searchOptions === void 0 ? void 0 : searchOptions.searchQuery) || '',
@@ -19005,7 +19117,12 @@ class SageEmbed extends V1Embed {
19005
19117
  viewConfig.embedComponentType = 'SageEmbed';
19006
19118
  super(domSelector, viewConfig);
19007
19119
  }
19008
- getEmbedParamsObject() {
19120
+ /**
19121
+ * Constructs a map of parameters to be passed on to the
19122
+ * embedded Eureka or Sage search page.
19123
+ * @returns {string} query string
19124
+ */
19125
+ getEmbedParams() {
19009
19126
  const { disableWorksheetChange, hideWorksheetSelector, showObjectSuggestions, dataPanelV2, hideSampleQuestions, isProductTour, hideSageAnswerHeader, hideAutocompleteSuggestions, } = this.viewConfig;
19010
19127
  const params = this.getBaseQueryParams();
19011
19128
  params[Param.DataPanelV2Enabled] = !!dataPanelV2;
@@ -19020,15 +19137,6 @@ class SageEmbed extends V1Embed {
19020
19137
  params[Param.HideSampleQuestions] = !!hideSampleQuestions;
19021
19138
  params[Param.IsProductTour] = !!isProductTour;
19022
19139
  params[Param.HideSageAnswerHeader] = !!hideSageAnswerHeader;
19023
- return params;
19024
- }
19025
- /**
19026
- * Constructs a map of parameters to be passed on to the
19027
- * embedded Eureka or Sage search page.
19028
- * @returns {string} query string
19029
- */
19030
- getEmbedParams() {
19031
- const params = this.getEmbedParamsObject();
19032
19140
  return getQueryParamString(params, true);
19033
19141
  }
19034
19142
  /**
@@ -19519,16 +19627,31 @@ const getAnswerFromQuery = async (query, worksheetId) => {
19519
19627
  };
19520
19628
 
19521
19629
  /**
19522
- * Create a liveboard with the given answers
19523
- * @param answers AnswerService[]
19524
- * @param name string
19630
+ * Creates a new Liveboard in ThoughtSpot using the provided AnswerService instances.
19631
+ *
19632
+ * Each answer will be added as a visualization to the newly created Liveboard.
19633
+ *
19634
+ * @param {AnswerService[]} answers - An array of initialized `AnswerService` instances
19635
+ * representing the answers to be added to the Liveboard.
19636
+ * @param {string} name - The name of the Liveboard to create.
19525
19637
  * @returns result Promise
19526
19638
  * @version SDK: 1.33.1 | ThoughtSpot: *
19527
19639
  * @example
19528
19640
  * ```js
19529
- * const lb = createLiveboardWithAnswers([
19530
- * new AnswerService(session, null, 'tshost'),
19531
- * ], "my-liveboard");
19641
+ * import { EmbedEvent, AnswerService } from "@thoughtspot/visual-embed-sdk";
19642
+ *
19643
+ * embed.on(EmbedEvent.Data, async () => {
19644
+ * try {
19645
+ * const answerService = await embed.getAnswerService();
19646
+ * const lb = await createLiveboardWithAnswers(
19647
+ * [answerService],
19648
+ * "My Liveboard"
19649
+ * );
19650
+ * console.log("Liveboard created:", lb);
19651
+ * } catch (err) {
19652
+ * console.error("Failed to create liveboard:", err);
19653
+ * }
19654
+ * });
19532
19655
  * ```
19533
19656
  */
19534
19657
  const createLiveboardWithAnswers = async (answers, name) => {