@thoughtspot/visual-embed-sdk 1.28.0-alpha.2 → 1.28.0-alpha.3

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 (212) hide show
  1. package/cjs/package.json +1 -1
  2. package/cjs/src/auth.d.ts +16 -1
  3. package/cjs/src/auth.d.ts.map +1 -1
  4. package/cjs/src/auth.js +5 -1
  5. package/cjs/src/auth.js.map +1 -1
  6. package/cjs/src/auth.spec.d.ts.map +1 -1
  7. package/cjs/src/auth.spec.js +9 -0
  8. package/cjs/src/auth.spec.js.map +1 -1
  9. package/cjs/src/embed/app.d.ts +18 -4
  10. package/cjs/src/embed/app.d.ts.map +1 -1
  11. package/cjs/src/embed/app.js +2 -2
  12. package/cjs/src/embed/app.js.map +1 -1
  13. package/cjs/src/embed/app.spec.js +19 -1
  14. package/cjs/src/embed/app.spec.js.map +1 -1
  15. package/cjs/src/embed/base.d.ts.map +1 -1
  16. package/cjs/src/embed/base.js +0 -3
  17. package/cjs/src/embed/base.js.map +1 -1
  18. package/cjs/src/embed/embed.spec.js +0 -15
  19. package/cjs/src/embed/embed.spec.js.map +1 -1
  20. package/cjs/src/embed/liveboard.d.ts +7 -1
  21. package/cjs/src/embed/liveboard.d.ts.map +1 -1
  22. package/cjs/src/embed/liveboard.js +2 -2
  23. package/cjs/src/embed/liveboard.js.map +1 -1
  24. package/cjs/src/embed/liveboard.spec.js +20 -1
  25. package/cjs/src/embed/liveboard.spec.js.map +1 -1
  26. package/cjs/src/embed/pinboard.spec.js +20 -1
  27. package/cjs/src/embed/pinboard.spec.js.map +1 -1
  28. package/cjs/src/embed/sage.d.ts +6 -6
  29. package/cjs/src/embed/sage.d.ts.map +1 -1
  30. package/cjs/src/embed/sage.js +18 -3
  31. package/cjs/src/embed/sage.js.map +1 -1
  32. package/cjs/src/embed/sage.spec.js +11 -11
  33. package/cjs/src/embed/sage.spec.js.map +1 -1
  34. package/cjs/src/embed/search-bar.d.ts +1 -1
  35. package/cjs/src/embed/search-bar.d.ts.map +1 -1
  36. package/cjs/src/embed/search-bar.js +2 -2
  37. package/cjs/src/embed/search-bar.js.map +1 -1
  38. package/cjs/src/embed/search.d.ts +1 -1
  39. package/cjs/src/embed/search.d.ts.map +1 -1
  40. package/cjs/src/embed/search.js +3 -3
  41. package/cjs/src/embed/search.js.map +1 -1
  42. package/cjs/src/embed/search.spec.js +25 -1
  43. package/cjs/src/embed/search.spec.js.map +1 -1
  44. package/cjs/src/embed/ts-embed-trigger.spec.d.ts +2 -0
  45. package/cjs/src/embed/ts-embed-trigger.spec.d.ts.map +1 -0
  46. package/cjs/src/embed/ts-embed-trigger.spec.js +34 -0
  47. package/cjs/src/embed/ts-embed-trigger.spec.js.map +1 -0
  48. package/cjs/src/embed/ts-embed.d.ts +1 -1
  49. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  50. package/cjs/src/embed/ts-embed.js +14 -11
  51. package/cjs/src/embed/ts-embed.js.map +1 -1
  52. package/cjs/src/embed/ts-embed.spec.js +47 -17
  53. package/cjs/src/embed/ts-embed.spec.js.map +1 -1
  54. package/cjs/src/index.d.ts +2 -1
  55. package/cjs/src/index.d.ts.map +1 -1
  56. package/cjs/src/index.js +3 -1
  57. package/cjs/src/index.js.map +1 -1
  58. package/cjs/src/react/index.spec.js +1 -1
  59. package/cjs/src/react/index.spec.js.map +1 -1
  60. package/cjs/src/test/test-utils.d.ts +1 -0
  61. package/cjs/src/test/test-utils.d.ts.map +1 -1
  62. package/cjs/src/test/test-utils.js +10 -1
  63. package/cjs/src/test/test-utils.js.map +1 -1
  64. package/cjs/src/tokenizedFetch.d.ts +9 -0
  65. package/cjs/src/tokenizedFetch.d.ts.map +1 -1
  66. package/cjs/src/tokenizedFetch.js +9 -0
  67. package/cjs/src/tokenizedFetch.js.map +1 -1
  68. package/cjs/src/types.d.ts +150 -35
  69. package/cjs/src/types.d.ts.map +1 -1
  70. package/cjs/src/types.js +110 -19
  71. package/cjs/src/types.js.map +1 -1
  72. package/cjs/src/utils/authService/authService.d.ts.map +1 -1
  73. package/cjs/src/utils/authService/authService.js +9 -3
  74. package/cjs/src/utils/authService/authService.js.map +1 -1
  75. package/cjs/src/utils/authService/authService.spec.js +22 -0
  76. package/cjs/src/utils/authService/authService.spec.js.map +1 -1
  77. package/dist/src/auth.d.ts +16 -1
  78. package/dist/src/auth.d.ts.map +1 -1
  79. package/dist/src/auth.spec.d.ts.map +1 -1
  80. package/dist/src/embed/app.d.ts +18 -4
  81. package/dist/src/embed/app.d.ts.map +1 -1
  82. package/dist/src/embed/base.d.ts.map +1 -1
  83. package/dist/src/embed/liveboard.d.ts +7 -1
  84. package/dist/src/embed/liveboard.d.ts.map +1 -1
  85. package/dist/src/embed/sage.d.ts +6 -6
  86. package/dist/src/embed/sage.d.ts.map +1 -1
  87. package/dist/src/embed/search-bar.d.ts +1 -1
  88. package/dist/src/embed/search-bar.d.ts.map +1 -1
  89. package/dist/src/embed/search.d.ts +1 -1
  90. package/dist/src/embed/search.d.ts.map +1 -1
  91. package/dist/src/embed/ts-embed-trigger.spec.d.ts +2 -0
  92. package/dist/src/embed/ts-embed-trigger.spec.d.ts.map +1 -0
  93. package/dist/src/embed/ts-embed.d.ts +1 -1
  94. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  95. package/dist/src/index.d.ts +2 -1
  96. package/dist/src/index.d.ts.map +1 -1
  97. package/dist/src/test/test-utils.d.ts +1 -0
  98. package/dist/src/test/test-utils.d.ts.map +1 -1
  99. package/dist/src/tokenizedFetch.d.ts +9 -0
  100. package/dist/src/tokenizedFetch.d.ts.map +1 -1
  101. package/dist/src/types.d.ts +150 -35
  102. package/dist/src/types.d.ts.map +1 -1
  103. package/dist/src/utils/authService/authService.d.ts.map +1 -1
  104. package/dist/tsembed-react.es.js +173 -46
  105. package/dist/tsembed-react.js +173 -46
  106. package/dist/tsembed.es.js +174 -50
  107. package/dist/tsembed.js +174 -49
  108. package/dist/visual-embed-sdk-react-full.d.ts +211 -50
  109. package/dist/visual-embed-sdk-react.d.ts +211 -50
  110. package/dist/visual-embed-sdk.d.ts +211 -50
  111. package/lib/package.json +1 -1
  112. package/lib/src/auth.d.ts +16 -1
  113. package/lib/src/auth.d.ts.map +1 -1
  114. package/lib/src/auth.js +5 -1
  115. package/lib/src/auth.js.map +1 -1
  116. package/lib/src/auth.spec.d.ts.map +1 -1
  117. package/lib/src/auth.spec.js +9 -0
  118. package/lib/src/auth.spec.js.map +1 -1
  119. package/lib/src/embed/app.d.ts +18 -4
  120. package/lib/src/embed/app.d.ts.map +1 -1
  121. package/lib/src/embed/app.js +2 -2
  122. package/lib/src/embed/app.js.map +1 -1
  123. package/lib/src/embed/app.spec.js +19 -1
  124. package/lib/src/embed/app.spec.js.map +1 -1
  125. package/lib/src/embed/base.d.ts.map +1 -1
  126. package/lib/src/embed/base.js +0 -3
  127. package/lib/src/embed/base.js.map +1 -1
  128. package/lib/src/embed/embed.spec.js +2 -17
  129. package/lib/src/embed/embed.spec.js.map +1 -1
  130. package/lib/src/embed/liveboard.d.ts +7 -1
  131. package/lib/src/embed/liveboard.d.ts.map +1 -1
  132. package/lib/src/embed/liveboard.js +2 -2
  133. package/lib/src/embed/liveboard.js.map +1 -1
  134. package/lib/src/embed/liveboard.spec.js +20 -1
  135. package/lib/src/embed/liveboard.spec.js.map +1 -1
  136. package/lib/src/embed/pinboard.spec.js +20 -1
  137. package/lib/src/embed/pinboard.spec.js.map +1 -1
  138. package/lib/src/embed/sage.d.ts +6 -6
  139. package/lib/src/embed/sage.d.ts.map +1 -1
  140. package/lib/src/embed/sage.js +18 -3
  141. package/lib/src/embed/sage.js.map +1 -1
  142. package/lib/src/embed/sage.spec.js +11 -11
  143. package/lib/src/embed/sage.spec.js.map +1 -1
  144. package/lib/src/embed/search-bar.d.ts +1 -1
  145. package/lib/src/embed/search-bar.d.ts.map +1 -1
  146. package/lib/src/embed/search-bar.js +2 -2
  147. package/lib/src/embed/search-bar.js.map +1 -1
  148. package/lib/src/embed/search.d.ts +1 -1
  149. package/lib/src/embed/search.d.ts.map +1 -1
  150. package/lib/src/embed/search.js +3 -3
  151. package/lib/src/embed/search.js.map +1 -1
  152. package/lib/src/embed/search.spec.js +25 -1
  153. package/lib/src/embed/search.spec.js.map +1 -1
  154. package/lib/src/embed/ts-embed-trigger.spec.d.ts +2 -0
  155. package/lib/src/embed/ts-embed-trigger.spec.d.ts.map +1 -0
  156. package/lib/src/embed/ts-embed-trigger.spec.js +32 -0
  157. package/lib/src/embed/ts-embed-trigger.spec.js.map +1 -0
  158. package/lib/src/embed/ts-embed.d.ts +1 -1
  159. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  160. package/lib/src/embed/ts-embed.js +14 -11
  161. package/lib/src/embed/ts-embed.js.map +1 -1
  162. package/lib/src/embed/ts-embed.spec.js +41 -11
  163. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  164. package/lib/src/index.d.ts +2 -1
  165. package/lib/src/index.d.ts.map +1 -1
  166. package/lib/src/index.js +2 -1
  167. package/lib/src/index.js.map +1 -1
  168. package/lib/src/react/index.spec.js +1 -1
  169. package/lib/src/react/index.spec.js.map +1 -1
  170. package/lib/src/test/test-utils.d.ts +1 -0
  171. package/lib/src/test/test-utils.d.ts.map +1 -1
  172. package/lib/src/test/test-utils.js +8 -0
  173. package/lib/src/test/test-utils.js.map +1 -1
  174. package/lib/src/tokenizedFetch.d.ts +9 -0
  175. package/lib/src/tokenizedFetch.d.ts.map +1 -1
  176. package/lib/src/tokenizedFetch.js +9 -0
  177. package/lib/src/tokenizedFetch.js.map +1 -1
  178. package/lib/src/types.d.ts +150 -35
  179. package/lib/src/types.d.ts.map +1 -1
  180. package/lib/src/types.js +110 -19
  181. package/lib/src/types.js.map +1 -1
  182. package/lib/src/utils/authService/authService.d.ts.map +1 -1
  183. package/lib/src/utils/authService/authService.js +9 -3
  184. package/lib/src/utils/authService/authService.js.map +1 -1
  185. package/lib/src/utils/authService/authService.spec.js +22 -0
  186. package/lib/src/utils/authService/authService.spec.js.map +1 -1
  187. package/lib/src/visual-embed-sdk.d.ts +215 -51
  188. package/package.json +1 -1
  189. package/src/auth.spec.ts +10 -0
  190. package/src/auth.ts +21 -2
  191. package/src/embed/app.spec.ts +24 -1
  192. package/src/embed/app.ts +19 -5
  193. package/src/embed/base.ts +1 -5
  194. package/src/embed/embed.spec.ts +0 -18
  195. package/src/embed/liveboard.spec.ts +24 -1
  196. package/src/embed/liveboard.ts +8 -2
  197. package/src/embed/pinboard.spec.ts +24 -1
  198. package/src/embed/sage.spec.ts +11 -11
  199. package/src/embed/sage.ts +19 -6
  200. package/src/embed/search-bar.tsx +2 -2
  201. package/src/embed/search.spec.ts +29 -1
  202. package/src/embed/search.ts +3 -3
  203. package/src/embed/ts-embed-trigger.spec.ts +39 -0
  204. package/src/embed/ts-embed.spec.ts +49 -16
  205. package/src/embed/ts-embed.ts +21 -16
  206. package/src/index.ts +2 -0
  207. package/src/react/index.spec.tsx +1 -0
  208. package/src/test/test-utils.ts +9 -0
  209. package/src/tokenizedFetch.ts +9 -0
  210. package/src/types.ts +151 -32
  211. package/src/utils/authService/authService.spec.ts +27 -0
  212. package/src/utils/authService/authService.ts +14 -13
@@ -605,15 +605,30 @@
605
605
  AuthType["Basic"] = "Basic";
606
606
  })(AuthType || (AuthType = {}));
607
607
  (function (HomeLeftNavItem) {
608
- HomeLeftNavItem["QueryBuilder"] = "query-builder";
608
+ /**
609
+ * @version SDK: 1.27.9| ThoughtSpot: 9.12.0.cl
610
+ */
611
+ HomeLeftNavItem["SearchData"] = "search-data";
612
+ /**
613
+ * @version SDK: 1.27.9| ThoughtSpot: 9.12.0.cl
614
+ */
609
615
  HomeLeftNavItem["Home"] = "insights-home";
616
+ /**
617
+ * @version SDK: 1.27.9| ThoughtSpot: 9.12.0.cl
618
+ */
610
619
  HomeLeftNavItem["Liveboards"] = "liveboards";
620
+ /**
621
+ * @version SDK: 1.27.9| ThoughtSpot: 9.12.0.cl
622
+ */
611
623
  HomeLeftNavItem["Answers"] = "answers";
624
+ /**
625
+ * @version SDK: 1.27.9| ThoughtSpot: 9.12.0.cl
626
+ */
612
627
  HomeLeftNavItem["MonitorSubscription"] = "monitor-alerts";
628
+ /**
629
+ * @version SDK: 1.27.9| ThoughtSpot: 9.12.0.cl
630
+ */
613
631
  HomeLeftNavItem["SpotIQAnalysis"] = "spotiq-analysis";
614
- HomeLeftNavItem["Tutorials"] = "tutorials";
615
- HomeLeftNavItem["Documentation"] = "documentation";
616
- HomeLeftNavItem["Community"] = "community";
617
632
  })(exports.HomeLeftNavItem || (exports.HomeLeftNavItem = {}));
618
633
  (function (RuntimeFilterOp) {
619
634
  /**
@@ -692,6 +707,10 @@
692
707
  HomepageModule["MyLibrary"] = "MY_LIBRARY";
693
708
  /**
694
709
  * Trending list
710
+ *
711
+ * **Note**: This option does not apply to the classic homepage.
712
+ * To access the updated modular homepage, set
713
+ * `modularHomeExperience` to `true` (available in Early Access from 9.12.0.cl onwards).
695
714
  */
696
715
  HomepageModule["Trending"] = "TRENDING";
697
716
  /**
@@ -776,7 +795,7 @@
776
795
  * @returns nonFilteredColumns - The columns that were not filtered
777
796
  * @example
778
797
  *```js
779
- * searchEmbed.trigger(HostEvent.DrillDown, {
798
+ * searchEmbed.trigger(EmbedEvent.DrillDown, {
780
799
  * points: {
781
800
  * clickedPoint,
782
801
  * selectedPoints: selectedPoint
@@ -868,7 +887,7 @@
868
887
  * @important
869
888
  * @example
870
889
  * ```js
871
- * embed.on(ThoughtSpotEmbed.Event.VizPointClick, ({data}) => {
890
+ * embed.on(EmbedEvent.VizPointClick, ({data}) => {
872
891
  * console.log(
873
892
  * data.vizId, // viz id
874
893
  * data.clickedPoint.selectedAttributes[0].value,
@@ -883,19 +902,20 @@
883
902
  /**
884
903
  * An error has occurred. This event is fired for the following error types:
885
904
  *
886
- * `API` - API call failure error.
905
+ * API - API call failure error.
887
906
  *
888
- * `FULLSCREEN` - Error when presenting a Liveboard or visualization in full screen mode.
907
+ * FULLSCREEN - Error when presenting a Liveboard or visualization in full screen mode.
889
908
  *
890
- * `SINGLE_VALUE_FILTER` - Error due to multiple values in the single value filter.
909
+ * SINGLE_VALUE_FILTER - Error due to multiple values in the single value filter.
891
910
  *
892
- * `NON_EXIST_FILTER` - Error due to a non-existent filter.
911
+ * NON_EXIST_FILTER - Error due to a non-existent filter.
893
912
  *
894
- * `INVALID_DATE_VALUE` - Invalid date value error.
913
+ * INVALID_DATE_VALUE - Invalid date value error.
895
914
  *
896
- * `INVALID_OPERATOR` - Use of invalid operator during filter application.
915
+ * INVALID_OPERATOR - Use of invalid operator during filter application.
897
916
  *
898
917
  * For more information, see [Developer Documentation](https://developers.thoughtspot.com/docs/events-app-integration#errorType)
918
+ *
899
919
  * @returns error - An error object or message
900
920
  * @example
901
921
  * ```js
@@ -1460,7 +1480,7 @@
1460
1480
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1461
1481
  * @example
1462
1482
  *```js
1463
- * liveboardEmbed.trigger(HostEvent.Delete,
1483
+ * liveboardEmbed.trigger(EmbedEvent.Delete,
1464
1484
  * {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1465
1485
  *```
1466
1486
  */
@@ -1471,7 +1491,7 @@
1471
1491
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1472
1492
  * @example
1473
1493
  *```js
1474
- * liveboardEmbed.trigger(HostEvent.SchedulesList)
1494
+ * liveboardEmbed.trigger(EmbedEvent.SchedulesList)
1475
1495
  *```
1476
1496
  */
1477
1497
  EmbedEvent["SchedulesList"] = "schedule-list";
@@ -1481,7 +1501,7 @@
1481
1501
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1482
1502
  * @example
1483
1503
  *```js
1484
- * liveboardEmbed.trigger(HostEvent.Cancel)
1504
+ * liveboardEmbed.trigger(EmbedEvent.Cancel)
1485
1505
  *```
1486
1506
  */
1487
1507
  EmbedEvent["Cancel"] = "cancel";
@@ -1491,7 +1511,7 @@
1491
1511
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1492
1512
  * @example
1493
1513
  *```js
1494
- * liveboardEmbed.trigger(HostEvent.Explore, {
1514
+ * liveboardEmbed.trigger(EmbedEvent.Explore, {
1495
1515
  * vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1496
1516
  *```
1497
1517
  */
@@ -1502,7 +1522,7 @@
1502
1522
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1503
1523
  * @example
1504
1524
  *```js
1505
- * liveboardEmbed.trigger(HostEvent.CopyLink, {
1525
+ * liveboardEmbed.trigger(EmbedEvent.CopyLink, {
1506
1526
  * vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1507
1527
  *```
1508
1528
  */
@@ -1749,10 +1769,13 @@
1749
1769
  * _String_. The name of the column to filter on.
1750
1770
  * `operator`
1751
1771
  * Runtime filter operator to apply. For information,
1752
- * see [Runtime filter operators](https://developers.thoughtspot.com/docs/?pageid=runtime-filters#rtOperator).
1772
+ * see https://developers.thoughtspot.com/docs/?pageid=runtime-filters#rtOperator.
1753
1773
  * `values`
1754
1774
  * List of operands. Some operators such as EQ, LE allow a single value, whereas
1755
1775
  * operators such as BW and IN accept multiple operands.
1776
+ * **Note**: `HostEvent.UpdateRuntimeFilters` is not supported in
1777
+ * Search embedding (SearchEmbed) and Natural Language Search
1778
+ * embedding (SageEmbed).
1756
1779
  *
1757
1780
  * @param - {@link RuntimeFilter}[] an array of {@link RuntimeFilter} Types.
1758
1781
  * @example
@@ -2277,6 +2300,7 @@
2277
2300
  /**
2278
2301
  *
2279
2302
  * Get the currents visible and runtime filters applied on a Liveboard
2303
+ *
2280
2304
  * @example
2281
2305
  * liveboardEmbed.trigger(HostEvent.GetFilters)
2282
2306
  * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
@@ -2285,12 +2309,13 @@
2285
2309
  /**
2286
2310
  *
2287
2311
  * Update the visible filters on the Liveboard.
2312
+ *
2288
2313
  * @param - filter: filter object containing column name and filter operation and values
2289
2314
  * @example
2290
2315
  *
2291
2316
  * ```js
2292
2317
  * liveboardEmbed.trigger(HostEvent.UpdateFilters, {
2293
- * filter: { column: 'column name', oper: 'in', values: [1,2,3], is_mandatory: false }
2318
+ * filter: { column: 'column name', oper: 'IN', values: [1,2,3], is_mandatory: false }
2294
2319
  * })
2295
2320
  * ```
2296
2321
  * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
@@ -2377,6 +2402,32 @@
2377
2402
  * @version SDK: 1.29.0 | Thoughtspot: 9.12.0.cl
2378
2403
  */
2379
2404
  HostEvent["AskSage"] = "AskSage";
2405
+ /**
2406
+ * Trigger UpdateCrossFilter for Liveboard
2407
+ *
2408
+ * @example
2409
+ * ```js
2410
+ * liveboardEmbed.trigger(HostEvent.UpdateCrossFilter, {
2411
+ * vizId: 'b535c760-8bbe-4e6f-bb26-af56b4129a1e',
2412
+ * conditions: [
2413
+ * { columnName: 'Category', values: ['mfgr#12','mfgr#14'] },
2414
+ * { columnName: 'color', values: ['mint','hot'] },
2415
+ * ],
2416
+ * });
2417
+ * ```
2418
+ * @version SDK: 1.29.0 | Thoughtspot: 10.0.0.cl
2419
+ */
2420
+ HostEvent["UpdateCrossFilter"] = "UpdateCrossFilter";
2421
+ /**
2422
+ * Trigger ResetLiveboardPersonalisedView for Liveboard
2423
+ *
2424
+ * @example
2425
+ * ```js
2426
+ * liveboardEmbed.trigger(HostEvent.ResetLiveboardPersonalisedView);
2427
+ * ```
2428
+ * @version SDK: 1.29.0 | Thoughtspot: 10.1.0.cl
2429
+ */
2430
+ HostEvent["ResetLiveboardPersonalisedView"] = "ResetLiveboardPersonalisedView";
2380
2431
  })(exports.HostEvent || (exports.HostEvent = {}));
2381
2432
  /**
2382
2433
  * The different visual modes that the data sources panel within
@@ -3320,6 +3371,46 @@
3320
3371
  * @version SDK: 1.29.0 | Thoughtspot: 9.12.0.cl
3321
3372
  */
3322
3373
  Action["AskAi"] = "AskAi";
3374
+ /**
3375
+ * The **Add KPI to Watchlist** action on Home page watchlist.
3376
+ *
3377
+ * @example
3378
+ * ```js
3379
+ * disabledActions: [Action.AddToWatchlist]
3380
+ * ```
3381
+ * @version SDK : 1.27.9 | Thoughtspot: 9.12.5.cl
3382
+ */
3383
+ Action["AddToWatchlist"] = "addToWatchlist";
3384
+ /**
3385
+ * The **Remove from watchlist** menu action on KPI watchlist.
3386
+ *
3387
+ * @example
3388
+ * ```js
3389
+ * disabledActions: [Action.RemoveFromWatchlist]
3390
+ * ```
3391
+ * @version SDK : 1.27.9 | Thoughtspot: 9.12.5.cl
3392
+ */
3393
+ Action["RemoveFromWatchlist"] = "removeFromWatchlist";
3394
+ /**
3395
+ * The **Copy KPI Link** menu action on KPI watchlist.
3396
+ *
3397
+ * @example
3398
+ * ```js
3399
+ * disabledActions: [Action.CopyKpiLink]
3400
+ * ```
3401
+ * @version SDK : 1.27.9 | Thoughtspot: 9.12.5.cl
3402
+ */
3403
+ Action["CopyKpiLink"] = "copyKpiLink";
3404
+ /**
3405
+ * Action ID for AI Highlights button
3406
+ *
3407
+ * @example
3408
+ * ```js
3409
+ * hiddenAction: [Action.AIHighlights]
3410
+ * ```
3411
+ * @version SDK: 1.27.10 | Thoughtspot: 9.12.5.cl
3412
+ */
3413
+ Action["AIHighlights"] = "AIHighlights";
3323
3414
  })(exports.Action || (exports.Action = {}));
3324
3415
  var PrefetchFeatures;
3325
3416
  (function (PrefetchFeatures) {
@@ -5774,7 +5865,7 @@
5774
5865
  return res.ok;
5775
5866
  }
5776
5867
  catch (e) {
5777
- logger.error(`Token Verification Service failed : ${e.message}`);
5868
+ logger.warn(`Token Verification Service failed : ${e.message}`);
5778
5869
  }
5779
5870
  return false;
5780
5871
  }
@@ -5792,7 +5883,10 @@
5792
5883
  * @param authToken
5793
5884
  */
5794
5885
  async function fetchAuthService(thoughtSpotHost, username, authToken) {
5795
- return failureLoggedFetch(`${thoughtSpotHost}${EndPoints.TOKEN_LOGIN}?username=${username}&auth_token=${authToken}`, {
5886
+ const fetchUrlParams = username
5887
+ ? `username=${username}&auth_token=${authToken}`
5888
+ : `auth_token=${authToken}`;
5889
+ return failureLoggedFetch(`${thoughtSpotHost}${EndPoints.TOKEN_LOGIN}?${fetchUrlParams}`, {
5796
5890
  credentials: 'include',
5797
5891
  // We do not want to follow the redirect, as it starts giving a CORS
5798
5892
  // error
@@ -5806,13 +5900,16 @@
5806
5900
  * @param authToken
5807
5901
  */
5808
5902
  async function fetchAuthPostService(thoughtSpotHost, username, authToken) {
5903
+ const bodyPrams = username
5904
+ ? `username=${encodeURIComponent(username)}&auth_token=${encodeURIComponent(authToken)}`
5905
+ : `auth_token=${encodeURIComponent(authToken)}`;
5809
5906
  return failureLoggedFetch(`${thoughtSpotHost}${EndPoints.TOKEN_LOGIN}`, {
5810
5907
  method: 'POST',
5811
5908
  headers: {
5812
5909
  'content-type': 'application/x-www-form-urlencoded',
5813
5910
  'x-requested-by': 'ThoughtSpot',
5814
5911
  },
5815
- body: `username=${encodeURIComponent(username)}&auth_token=${encodeURIComponent(authToken)}`,
5912
+ body: bodyPrams,
5816
5913
  credentials: 'include',
5817
5914
  // We do not want to follow the redirect, as it starts giving a CORS
5818
5915
  // error
@@ -5902,6 +5999,15 @@
5902
5999
  */
5903
6000
  const getEmbedConfig = () => config;
5904
6001
 
6002
+ /**
6003
+ * Fetch wrapper that adds the authentication token to the request.
6004
+ * Use this to call the ThoughtSpot APIs when using the visual embed sdk.
6005
+ *
6006
+ * @param input
6007
+ * @param init
6008
+ * @version SDK: 1.28.0
6009
+ * @group Global methods
6010
+ */
5905
6011
  const tokenizedFetch = async (input, init) => {
5906
6012
  const embedConfig = getEmbedConfig();
5907
6013
  if (embedConfig.authType !== AuthType.TrustedAuthTokenCookieless) {
@@ -12966,9 +13072,12 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
12966
13072
  }
12967
13073
  }
12968
13074
  const initSession = (sessionDetails) => {
13075
+ const embedConfig = getEmbedConfig();
12969
13076
  if (sessionInfo == null) {
12970
13077
  sessionInfo = sessionDetails;
12971
- initMixpanel(sessionInfo);
13078
+ if (!embedConfig.disableSDKTracking) {
13079
+ initMixpanel(sessionInfo);
13080
+ }
12972
13081
  sessionInfoResolver(sessionInfo);
12973
13082
  }
12974
13083
  };
@@ -13436,7 +13545,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
13436
13545
  });
13437
13546
  }
13438
13547
 
13439
- var name="@thoughtspot/visual-embed-sdk";var version="1.28.0-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",start:"gatsby develop","build:gatsby":"npm run clean:gatsby && gatsby build --prefix-paths","build:gatsby:noprefix":"npm run clean:gatsby && gatsby build","serve:gatsby":"gatsby serve","clean:gatsby":"gatsby clean","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","docs-cmd":"node scripts/gatsby-commands.js",docgen:"typedoc --tsconfig tsconfig.json --theme typedoc-theme","test-sdk":"jest -c jest.config.sdk.js --runInBand","test-docs":"jest -c jest.config.docs.js",test:"npm run test-sdk && npm run test-docs",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"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={algoliasearch:"^4.10.5",classnames:"^2.3.1",dompurify:"^2.3.4","eslint-plugin-comment-length":"^0.9.2","eslint-plugin-jsdoc":"^46.9.0",eventemitter3:"^4.0.7","gatsby-plugin-vercel":"^1.0.3","html-react-parser":"^1.4.12",lodash:"^4.17.21","mixpanel-browser":"^2.45.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.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/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^4.6.0","@typescript-eslint/parser":"^4.6.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","current-git-branch":"^1.1.0","dts-bundle":"^0.7.3",eslint:"^7.12.1","eslint-config-airbnb-base":"^14.2.0","eslint-config-prettier":"^6.15.0","eslint-import-resolver-typescript":"^2.3.0","eslint-plugin-import":"^2.22.1","eslint-plugin-prettier":"^3.1.4","eslint-plugin-react-hooks":"^4.2.0","fs-extra":"^10.0.0",gatsby:"3.13.1","gatsby-plugin-algolia":"^0.22.2","gatsby-plugin-catch-links":"^3.1.0","gatsby-plugin-env-variables":"^2.1.0","gatsby-plugin-intl":"^0.3.3","gatsby-plugin-manifest":"^3.2.0","gatsby-plugin-output":"^0.1.3","gatsby-plugin-sass":"6.7.0","gatsby-plugin-sitemap":"^4.10.0","gatsby-source-filesystem":"3.1.0","gatsby-transformer-asciidoc":"2.1.0","gatsby-transformer-rehype":"2.0.0","gh-pages":"^3.1.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","node-sass":"^8.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:"2.30.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","url-search-params-polyfill":"^8.1.0",util:"^0.12.4"};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","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,description:description,module:module,main:main,types:types,files:files,exports:exports$1,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.js",limit:"44 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};
13548
+ var name="@thoughtspot/visual-embed-sdk";var version="1.28.0-alpha.3";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",start:"gatsby develop","build:gatsby":"npm run clean:gatsby && gatsby build --prefix-paths","build:gatsby:noprefix":"npm run clean:gatsby && gatsby build","serve:gatsby":"gatsby serve","clean:gatsby":"gatsby clean","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","docs-cmd":"node scripts/gatsby-commands.js",docgen:"typedoc --tsconfig tsconfig.json --theme typedoc-theme","test-sdk":"jest -c jest.config.sdk.js --runInBand","test-docs":"jest -c jest.config.docs.js",test:"npm run test-sdk && npm run test-docs",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"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={algoliasearch:"^4.10.5",classnames:"^2.3.1",dompurify:"^2.3.4","eslint-plugin-comment-length":"^0.9.2","eslint-plugin-jsdoc":"^46.9.0",eventemitter3:"^4.0.7","gatsby-plugin-vercel":"^1.0.3","html-react-parser":"^1.4.12",lodash:"^4.17.21","mixpanel-browser":"^2.45.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.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/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^4.6.0","@typescript-eslint/parser":"^4.6.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","current-git-branch":"^1.1.0","dts-bundle":"^0.7.3",eslint:"^7.12.1","eslint-config-airbnb-base":"^14.2.0","eslint-config-prettier":"^6.15.0","eslint-import-resolver-typescript":"^2.3.0","eslint-plugin-import":"^2.22.1","eslint-plugin-prettier":"^3.1.4","eslint-plugin-react-hooks":"^4.2.0","fs-extra":"^10.0.0",gatsby:"3.13.1","gatsby-plugin-algolia":"^0.22.2","gatsby-plugin-catch-links":"^3.1.0","gatsby-plugin-env-variables":"^2.1.0","gatsby-plugin-intl":"^0.3.3","gatsby-plugin-manifest":"^3.2.0","gatsby-plugin-output":"^0.1.3","gatsby-plugin-sass":"6.7.0","gatsby-plugin-sitemap":"^4.10.0","gatsby-source-filesystem":"3.1.0","gatsby-transformer-asciidoc":"2.1.0","gatsby-transformer-rehype":"2.0.0","gh-pages":"^3.1.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","node-sass":"^8.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:"2.30.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","url-search-params-polyfill":"^8.1.0",util:"^0.12.4"};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","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,description:description,module:module,main:main,types:types,files:files,exports:exports$1,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.js",limit:"44 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};
13440
13549
 
13441
13550
  /**
13442
13551
  * Copyright (c) 2022
@@ -13583,7 +13692,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
13583
13692
  this.thoughtSpotV2Base = getV2BasePath(this.embedConfig);
13584
13693
  this.eventHandlerMap = new Map();
13585
13694
  this.isError = false;
13586
- this.viewConfig = viewConfig;
13695
+ this.viewConfig = { excludeRuntimeFiltersfromURL: true, ...viewConfig };
13587
13696
  this.shouldEncodeUrlQueryParams = this.embedConfig.shouldEncodeUrlQueryParams;
13588
13697
  this.registerAppInit();
13589
13698
  uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_EMBED_CREATE, {
@@ -13813,10 +13922,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
13813
13922
  const queryParams = this.shouldEncodeUrlQueryParams
13814
13923
  ? `?base64UrlEncodedFlags=${getEncodedQueryParamsString(queryString)}`
13815
13924
  : `?${queryString}`;
13816
- let host = this.thoughtSpotHost;
13817
- if (!isUndefined(this.embedConfig.enableReactShell)) {
13818
- host = this.embedConfig.enableReactShell ? '/v2' : '/v1';
13819
- }
13925
+ const host = this.thoughtSpotHost;
13820
13926
  const path = `${host}/${queryParams}#`;
13821
13927
  return path;
13822
13928
  }
@@ -14205,6 +14311,14 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
14205
14311
  */
14206
14312
  trigger(messageType, data = {}) {
14207
14313
  uploadMixpanelEvent(`${MIXPANEL_EVENT.VISUAL_SDK_TRIGGER}-${messageType}`);
14314
+ if (!this.isRendered) {
14315
+ this.handleError('Please call render before triggering events');
14316
+ return null;
14317
+ }
14318
+ if (!messageType) {
14319
+ this.handleError('Host event type is undefined');
14320
+ return null;
14321
+ }
14208
14322
  return processTrigger(this.iFrame, messageType, this.thoughtSpotHost, data);
14209
14323
  }
14210
14324
  /**
@@ -14214,7 +14328,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
14214
14328
  *
14215
14329
  * @param args
14216
14330
  */
14217
- render() {
14331
+ async render() {
14218
14332
  this.isRendered = true;
14219
14333
  return this;
14220
14334
  }
@@ -14355,8 +14469,8 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
14355
14469
  }
14356
14470
  const elBoundingClient = this.el.getBoundingClientRect();
14357
14471
  setStyleProperties(this.preRenderWrapper, {
14358
- top: `${elBoundingClient.y}px`,
14359
- left: `${elBoundingClient.x}px`,
14472
+ top: `${elBoundingClient.y + window.scrollY}px`,
14473
+ left: `${elBoundingClient.x + window.scrollX}px`,
14360
14474
  width: `${elBoundingClient.width}px`,
14361
14475
  height: `${elBoundingClient.height}px`,
14362
14476
  });
@@ -14376,8 +14490,6 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
14376
14490
  pointerEvents: 'none',
14377
14491
  zIndex: '-1000',
14378
14492
  position: 'absolute ',
14379
- top: '0',
14380
- left: '0',
14381
14493
  };
14382
14494
  setStyleProperties(this.preRenderWrapper, preRenderHideStyles);
14383
14495
  if (this.resizeObserver) {
@@ -14421,7 +14533,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
14421
14533
  class V1Embed extends TsEmbed {
14422
14534
  constructor(domSelector, viewConfig) {
14423
14535
  super(domSelector, viewConfig);
14424
- this.viewConfig = viewConfig;
14536
+ this.viewConfig = { excludeRuntimeFiltersfromURL: true, ...viewConfig };
14425
14537
  }
14426
14538
  /**
14427
14539
  * Render the app in an iframe and set up event handlers
@@ -14521,10 +14633,10 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
14521
14633
  /**
14522
14634
  * Render the embedded ThoughtSpot search
14523
14635
  */
14524
- render() {
14636
+ async render() {
14525
14637
  super.render();
14526
14638
  const src = this.getIFrameSrc();
14527
- this.renderIFrame(src);
14639
+ await this.renderIFrame(src);
14528
14640
  return this;
14529
14641
  }
14530
14642
  }
@@ -14537,6 +14649,16 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
14537
14649
  * @summary TS Sage embed
14538
14650
  * @author Mourya Balabhadra <mourya.balabhadra@thoughtspot.com>
14539
14651
  */
14652
+ const HiddenActionItemByDefaultForSageEmbed = [
14653
+ exports.Action.Save,
14654
+ exports.Action.Pin,
14655
+ exports.Action.EditACopy,
14656
+ exports.Action.SaveAsView,
14657
+ exports.Action.UpdateTML,
14658
+ exports.Action.EditTML,
14659
+ exports.Action.AnswerDelete,
14660
+ exports.Action.Share,
14661
+ ];
14540
14662
  /**
14541
14663
  * Embed ThoughtSpot LLM and GPT-based Natural Language Search component.
14542
14664
  *
@@ -14556,6 +14678,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
14556
14678
  * @returns {string} query string
14557
14679
  */
14558
14680
  getEmbedParams() {
14681
+ var _a;
14559
14682
  const { disableWorksheetChange, hideWorksheetSelector, showObjectSuggestions, hideSampleQuestions, isProductTour, hideSearchBarTitle, hideSageAnswerHeader, hideAutocompleteSuggestions, } = this.viewConfig;
14560
14683
  const params = this.getBaseQueryParams();
14561
14684
  params[Param.EmbedApp] = true;
@@ -14571,6 +14694,10 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
14571
14694
  params[Param.IsProductTour] = !!isProductTour;
14572
14695
  params[Param.HideSearchBarTitle] = !!hideSearchBarTitle;
14573
14696
  params[Param.HideSageAnswerHeader] = !!hideSageAnswerHeader;
14697
+ params[Param.HideActions] = [
14698
+ ...((_a = params[Param.HideActions]) !== null && _a !== void 0 ? _a : []),
14699
+ ...HiddenActionItemByDefaultForSageEmbed,
14700
+ ];
14574
14701
  return getQueryParamString(params, true);
14575
14702
  }
14576
14703
  /**
@@ -14603,10 +14730,10 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
14603
14730
  *
14604
14731
  * @returns {SageEmbed} Eureka/Sage embed
14605
14732
  */
14606
- render() {
14733
+ async render() {
14607
14734
  super.render();
14608
14735
  const src = this.getIFrameSrc();
14609
- this.renderV1Embed(src);
14736
+ await this.renderV1Embed(src);
14610
14737
  return this;
14611
14738
  }
14612
14739
  }
@@ -14652,7 +14779,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
14652
14779
  }
14653
14780
  getEmbedParams() {
14654
14781
  var _a;
14655
- const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, hideSearchBar, dataPanelV2 = false, useLastSelectedSources = false, runtimeParameters, } = this.viewConfig;
14782
+ const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL = true, hideSearchBar, dataPanelV2 = false, useLastSelectedSources = false, runtimeParameters, } = this.viewConfig;
14656
14783
  const queryParams = this.getBaseQueryParams();
14657
14784
  queryParams[Param.HideActions] = [
14658
14785
  ...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : []),
@@ -14719,11 +14846,11 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
14719
14846
  /**
14720
14847
  * Render the embedded ThoughtSpot search
14721
14848
  */
14722
- render() {
14849
+ async render() {
14723
14850
  super.render();
14724
14851
  const { answerId } = this.viewConfig;
14725
14852
  const src = this.getIFrameSrc();
14726
- this.renderIFrame(src);
14853
+ await this.renderIFrame(src);
14727
14854
  getAuthPromise().then(() => {
14728
14855
  if (checkReleaseVersionInBeta(getReleaseVersion(), getEmbedConfig().suppressSearchEmbedBetaWarning
14729
14856
  || getEmbedConfig().suppressErrorAlerts)) {
@@ -14943,10 +15070,10 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
14943
15070
  * @param renderOptions An object containing the page ID
14944
15071
  * to be embedded.
14945
15072
  */
14946
- render() {
15073
+ async render() {
14947
15074
  super.render();
14948
15075
  const src = this.getIFrameSrc();
14949
- this.renderV1Embed(src);
15076
+ await this.renderV1Embed(src);
14950
15077
  return this;
14951
15078
  }
14952
15079
  }
@@ -15133,10 +15260,10 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
15133
15260
  * @param renderOptions An object specifying the Liveboard ID,
15134
15261
  * visualization ID and the runtime filters.
15135
15262
  */
15136
- render() {
15263
+ async render() {
15137
15264
  super.render();
15138
15265
  const src = this.getIFrameSrc();
15139
- this.renderV1Embed(src);
15266
+ await this.renderV1Embed(src);
15140
15267
  return this;
15141
15268
  }
15142
15269
  navigateToLiveboard(liveboardId, vizId, activeTabId) {