@thoughtspot/visual-embed-sdk 1.26.2 → 1.27.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (216) hide show
  1. package/README.md +1 -1
  2. package/cjs/package.json +1 -1
  3. package/cjs/src/auth.d.ts +4 -4
  4. package/cjs/src/auth.d.ts.map +1 -1
  5. package/cjs/src/auth.js +10 -4
  6. package/cjs/src/auth.js.map +1 -1
  7. package/cjs/src/embed/app.d.ts +15 -15
  8. package/cjs/src/embed/app.d.ts.map +1 -1
  9. package/cjs/src/embed/app.js +1 -1
  10. package/cjs/src/embed/app.js.map +1 -1
  11. package/cjs/src/embed/liveboard.d.ts +28 -23
  12. package/cjs/src/embed/liveboard.d.ts.map +1 -1
  13. package/cjs/src/embed/liveboard.js +4 -3
  14. package/cjs/src/embed/liveboard.js.map +1 -1
  15. package/cjs/src/embed/sage.d.ts +48 -30
  16. package/cjs/src/embed/sage.d.ts.map +1 -1
  17. package/cjs/src/embed/sage.js +1 -1
  18. package/cjs/src/embed/sage.js.map +1 -1
  19. package/cjs/src/embed/search-bar.d.ts +22 -6
  20. package/cjs/src/embed/search-bar.d.ts.map +1 -1
  21. package/cjs/src/embed/search-bar.js.map +1 -1
  22. package/cjs/src/embed/search.d.ts +34 -19
  23. package/cjs/src/embed/search.d.ts.map +1 -1
  24. package/cjs/src/embed/search.js +7 -3
  25. package/cjs/src/embed/search.js.map +1 -1
  26. package/cjs/src/embed/search.spec.js +10 -0
  27. package/cjs/src/embed/search.spec.js.map +1 -1
  28. package/cjs/src/embed/ts-embed.d.ts +1 -0
  29. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  30. package/cjs/src/embed/ts-embed.js +27 -7
  31. package/cjs/src/embed/ts-embed.js.map +1 -1
  32. package/cjs/src/embed/ts-embed.spec.js +114 -0
  33. package/cjs/src/embed/ts-embed.spec.js.map +1 -1
  34. package/cjs/src/react/index.spec.js +0 -12
  35. package/cjs/src/react/index.spec.js.map +1 -1
  36. package/cjs/src/types.d.ts +727 -242
  37. package/cjs/src/types.d.ts.map +1 -1
  38. package/cjs/src/types.js +653 -175
  39. package/cjs/src/types.js.map +1 -1
  40. package/cjs/src/utils/graphql/answerService/answerService.d.ts +2 -4
  41. package/cjs/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
  42. package/cjs/src/utils/graphql/answerService/answerService.js +2 -4
  43. package/cjs/src/utils/graphql/answerService/answerService.js.map +1 -1
  44. package/cjs/src/utils/processData.d.ts +6 -0
  45. package/cjs/src/utils/processData.d.ts.map +1 -1
  46. package/cjs/src/utils/processData.js +5 -1
  47. package/cjs/src/utils/processData.js.map +1 -1
  48. package/cjs/src/utils/processTrigger.js +1 -1
  49. package/dist/src/auth.d.ts +4 -4
  50. package/dist/src/auth.d.ts.map +1 -1
  51. package/dist/src/embed/app.d.ts +15 -15
  52. package/dist/src/embed/app.d.ts.map +1 -1
  53. package/dist/src/embed/liveboard.d.ts +28 -23
  54. package/dist/src/embed/liveboard.d.ts.map +1 -1
  55. package/dist/src/embed/sage.d.ts +48 -30
  56. package/dist/src/embed/sage.d.ts.map +1 -1
  57. package/dist/src/embed/search-bar.d.ts +22 -6
  58. package/dist/src/embed/search-bar.d.ts.map +1 -1
  59. package/dist/src/embed/search.d.ts +34 -19
  60. package/dist/src/embed/search.d.ts.map +1 -1
  61. package/dist/src/embed/ts-embed.d.ts +1 -0
  62. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  63. package/dist/src/types.d.ts +727 -242
  64. package/dist/src/types.d.ts.map +1 -1
  65. package/dist/src/utils/graphql/answerService/answerService.d.ts +2 -4
  66. package/dist/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
  67. package/dist/src/utils/processData.d.ts +6 -0
  68. package/dist/src/utils/processData.d.ts.map +1 -1
  69. package/dist/tsembed-react.es.js +706 -200
  70. package/dist/tsembed-react.js +705 -199
  71. package/dist/tsembed.es.js +709 -200
  72. package/dist/tsembed.js +707 -198
  73. package/dist/visual-embed-sdk-react-full.d.ts +898 -339
  74. package/dist/visual-embed-sdk-react.d.ts +898 -339
  75. package/dist/visual-embed-sdk.d.ts +898 -339
  76. package/lib/package.json +1 -1
  77. package/lib/src/auth.d.ts +4 -4
  78. package/lib/src/auth.d.ts.map +1 -1
  79. package/lib/src/auth.js +10 -4
  80. package/lib/src/auth.js.map +1 -1
  81. package/lib/src/embed/app.d.ts +15 -15
  82. package/lib/src/embed/app.d.ts.map +1 -1
  83. package/lib/src/embed/app.js +1 -1
  84. package/lib/src/embed/app.js.map +1 -1
  85. package/lib/src/embed/liveboard.d.ts +28 -23
  86. package/lib/src/embed/liveboard.d.ts.map +1 -1
  87. package/lib/src/embed/liveboard.js +4 -3
  88. package/lib/src/embed/liveboard.js.map +1 -1
  89. package/lib/src/embed/sage.d.ts +48 -30
  90. package/lib/src/embed/sage.d.ts.map +1 -1
  91. package/lib/src/embed/sage.js +1 -1
  92. package/lib/src/embed/sage.js.map +1 -1
  93. package/lib/src/embed/search-bar.d.ts +22 -6
  94. package/lib/src/embed/search-bar.d.ts.map +1 -1
  95. package/lib/src/embed/search-bar.js.map +1 -1
  96. package/lib/src/embed/search.d.ts +34 -19
  97. package/lib/src/embed/search.d.ts.map +1 -1
  98. package/lib/src/embed/search.js +7 -3
  99. package/lib/src/embed/search.js.map +1 -1
  100. package/lib/src/embed/search.spec.js +10 -0
  101. package/lib/src/embed/search.spec.js.map +1 -1
  102. package/lib/src/embed/ts-embed.d.ts +1 -0
  103. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  104. package/lib/src/embed/ts-embed.js +28 -8
  105. package/lib/src/embed/ts-embed.js.map +1 -1
  106. package/lib/src/embed/ts-embed.spec.js +114 -0
  107. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  108. package/lib/src/react/index.spec.js +0 -12
  109. package/lib/src/react/index.spec.js.map +1 -1
  110. package/lib/src/types.d.ts +727 -242
  111. package/lib/src/types.d.ts.map +1 -1
  112. package/lib/src/types.js +653 -175
  113. package/lib/src/types.js.map +1 -1
  114. package/lib/src/utils/graphql/answerService/answerService.d.ts +2 -4
  115. package/lib/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
  116. package/lib/src/utils/graphql/answerService/answerService.js +2 -4
  117. package/lib/src/utils/graphql/answerService/answerService.js.map +1 -1
  118. package/lib/src/utils/processData.d.ts +6 -0
  119. package/lib/src/utils/processData.d.ts.map +1 -1
  120. package/lib/src/utils/processData.js +4 -1
  121. package/lib/src/utils/processData.js.map +1 -1
  122. package/lib/src/utils/processTrigger.js +1 -1
  123. package/lib/src/visual-embed-sdk.d.ts +898 -339
  124. package/package.json +1 -1
  125. package/src/auth.ts +10 -4
  126. package/src/embed/app.ts +20 -20
  127. package/src/embed/liveboard.ts +32 -27
  128. package/src/embed/sage.ts +48 -30
  129. package/src/embed/search-bar.tsx +22 -6
  130. package/src/embed/search.spec.ts +13 -0
  131. package/src/embed/search.ts +42 -22
  132. package/src/embed/ts-embed.spec.ts +132 -0
  133. package/src/embed/ts-embed.ts +32 -14
  134. package/src/react/index.spec.tsx +0 -29
  135. package/src/types.ts +727 -243
  136. package/src/utils/graphql/answerService/answerService.ts +2 -4
  137. package/src/utils/processData.ts +4 -1
  138. package/src/utils/processTrigger.ts +1 -1
  139. package/cjs/src/embed/TsEmbed.d.ts +0 -302
  140. package/cjs/src/embed/TsEmbed.d.ts.map +0 -1
  141. package/cjs/src/embed/TsEmbed.js +0 -851
  142. package/cjs/src/embed/TsEmbed.js.map +0 -1
  143. package/cjs/src/utils/answerService.d.ts +0 -10
  144. package/cjs/src/utils/answerService.d.ts.map +0 -1
  145. package/cjs/src/utils/answerService.js +0 -61
  146. package/cjs/src/utils/answerService.js.map +0 -1
  147. package/cjs/src/utils/answerService.spec.d.ts +0 -2
  148. package/cjs/src/utils/answerService.spec.d.ts.map +0 -1
  149. package/cjs/src/utils/answerService.spec.js +0 -31
  150. package/cjs/src/utils/answerService.spec.js.map +0 -1
  151. package/cjs/src/utils/authService/tokenisedAuthSerice.d.ts +0 -11
  152. package/cjs/src/utils/authService/tokenisedAuthSerice.d.ts.map +0 -1
  153. package/cjs/src/utils/authService/tokenisedAuthSerice.js +0 -44
  154. package/cjs/src/utils/authService/tokenisedAuthSerice.js.map +0 -1
  155. package/cjs/src/utils/authService.d.ts +0 -55
  156. package/cjs/src/utils/authService.d.ts.map +0 -1
  157. package/cjs/src/utils/authService.js +0 -139
  158. package/cjs/src/utils/authService.js.map +0 -1
  159. package/cjs/src/utils/authService.spec.d.ts +0 -2
  160. package/cjs/src/utils/authService.spec.d.ts.map +0 -1
  161. package/cjs/src/utils/authService.spec.js +0 -82
  162. package/cjs/src/utils/authService.spec.js.map +0 -1
  163. package/cjs/src/utils/graphql/graphql-request.spec.d.ts +0 -2
  164. package/cjs/src/utils/graphql/graphql-request.spec.d.ts.map +0 -1
  165. package/cjs/src/utils/graphql/graphql-request.spec.js +0 -39
  166. package/cjs/src/utils/graphql/graphql-request.spec.js.map +0 -1
  167. package/cjs/src/utils/logger.d.ts +0 -28
  168. package/cjs/src/utils/logger.d.ts.map +0 -1
  169. package/cjs/src/utils/logger.js +0 -82
  170. package/cjs/src/utils/logger.js.map +0 -1
  171. package/dist/src/utils/answerService.d.ts +0 -10
  172. package/dist/src/utils/answerService.d.ts.map +0 -1
  173. package/dist/src/utils/answerService.spec.d.ts +0 -2
  174. package/dist/src/utils/answerService.spec.d.ts.map +0 -1
  175. package/dist/src/utils/authService/tokenisedAuthSerice.d.ts +0 -11
  176. package/dist/src/utils/authService/tokenisedAuthSerice.d.ts.map +0 -1
  177. package/dist/src/utils/authService.d.ts +0 -55
  178. package/dist/src/utils/authService.d.ts.map +0 -1
  179. package/dist/src/utils/authService.spec.d.ts +0 -2
  180. package/dist/src/utils/authService.spec.d.ts.map +0 -1
  181. package/dist/src/utils/graphql/graphql-request.spec.d.ts +0 -2
  182. package/dist/src/utils/graphql/graphql-request.spec.d.ts.map +0 -1
  183. package/dist/src/utils/logger.d.ts +0 -28
  184. package/dist/src/utils/logger.d.ts.map +0 -1
  185. package/lib/src/embed/TsEmbed.d.ts +0 -302
  186. package/lib/src/embed/TsEmbed.d.ts.map +0 -1
  187. package/lib/src/embed/TsEmbed.js +0 -847
  188. package/lib/src/embed/TsEmbed.js.map +0 -1
  189. package/lib/src/utils/answerService.d.ts +0 -10
  190. package/lib/src/utils/answerService.d.ts.map +0 -1
  191. package/lib/src/utils/answerService.js +0 -57
  192. package/lib/src/utils/answerService.js.map +0 -1
  193. package/lib/src/utils/answerService.spec.d.ts +0 -2
  194. package/lib/src/utils/answerService.spec.d.ts.map +0 -1
  195. package/lib/src/utils/answerService.spec.js +0 -29
  196. package/lib/src/utils/answerService.spec.js.map +0 -1
  197. package/lib/src/utils/authService/tokenisedAuthSerice.d.ts +0 -11
  198. package/lib/src/utils/authService/tokenisedAuthSerice.d.ts.map +0 -1
  199. package/lib/src/utils/authService/tokenisedAuthSerice.js +0 -39
  200. package/lib/src/utils/authService/tokenisedAuthSerice.js.map +0 -1
  201. package/lib/src/utils/authService.d.ts +0 -55
  202. package/lib/src/utils/authService.d.ts.map +0 -1
  203. package/lib/src/utils/authService.js +0 -129
  204. package/lib/src/utils/authService.js.map +0 -1
  205. package/lib/src/utils/authService.spec.d.ts +0 -2
  206. package/lib/src/utils/authService.spec.d.ts.map +0 -1
  207. package/lib/src/utils/authService.spec.js +0 -80
  208. package/lib/src/utils/authService.spec.js.map +0 -1
  209. package/lib/src/utils/graphql/graphql-request.spec.d.ts +0 -2
  210. package/lib/src/utils/graphql/graphql-request.spec.d.ts.map +0 -1
  211. package/lib/src/utils/graphql/graphql-request.spec.js +0 -36
  212. package/lib/src/utils/graphql/graphql-request.spec.js.map +0 -1
  213. package/lib/src/utils/logger.d.ts +0 -28
  214. package/lib/src/utils/logger.d.ts.map +0 -1
  215. package/lib/src/utils/logger.js +0 -75
  216. package/lib/src/utils/logger.js.map +0 -1
@@ -450,10 +450,14 @@ var AuthType;
450
450
  */
451
451
  AuthType["None"] = "None";
452
452
  /**
453
- * Passthrough SSO to the embedded App within the iframe. Requires least
453
+ * Passthrough SSO to the embedded application within the iframe. Requires least
454
454
  * configuration, but may not be supported by all IDPs. This will behave like `None`
455
455
  * if SSO is not configured on ThoughtSpot.
456
456
  *
457
+ * To use this:
458
+ * Your SAML or OpenID provider must allow iframe redirects.
459
+ * For example, if you are using Okta as IdP, you can enable iframe embedding.
460
+ *
457
461
  * @example
458
462
  * ```js
459
463
  * init({
@@ -461,12 +465,7 @@ var AuthType;
461
465
  * authType: AuthType.EmbeddedSSO,
462
466
  * });
463
467
  * ```
464
- * Set authentication type as Embedded SSO.
465
- *
466
- * To use this:
467
- * Your SAML or OpenID provider must allow iframe redirects.
468
- * eg. If you are using okta as IdP, you can enable iFrame embedding.
469
- * @version: SDK: 1.15.0 | ThouhgtSpot: 8.8.0.cl
468
+ * @version: SDK: 1.15.0 | ThoughtSpot: 8.8.0.cl
470
469
  */
471
470
  AuthType["EmbeddedSSO"] = "EmbeddedSSO";
472
471
  /**
@@ -485,10 +484,10 @@ var AuthType;
485
484
  AuthType["SAML"] = "SSO_SAML";
486
485
  /**
487
486
  * SSO using SAML
488
- * Will make the host application redirect to the SAML Idp. Use this
489
- * when the idp does not allow itself to be embedded.
487
+ * Makes the host application redirect to the SAML IdP. Use this
488
+ * if your IdP does not allow itself to be embedded.
490
489
  *
491
- * This redirects the host application to the SAML Idp. The host application
490
+ * This redirects the host application to the SAML IdP. The host application
492
491
  * will be redirected back to the ThoughtSpot app after authentication.
493
492
  *
494
493
  * @example
@@ -499,7 +498,7 @@ var AuthType;
499
498
  * });
500
499
  * ```
501
500
  *
502
- * This opens the SAML Idp in a popup window. The popup is triggered
501
+ * This opens the SAML IdP in a popup window. The popup is triggered
503
502
  * when the user clicks the trigger button. The popup window will be
504
503
  * closed automatically after authentication.
505
504
  * @example
@@ -513,8 +512,8 @@ var AuthType;
513
512
  * });
514
513
  * ```
515
514
  *
516
- * Can also use event to trigger the popup flow. Works the same
517
- * as above example.
515
+ * Can also use the event to trigger the popup flow. Works the same
516
+ * as the above example.
518
517
  * @example
519
518
  * ```js
520
519
  * const authEE = init({
@@ -538,7 +537,7 @@ var AuthType;
538
537
  AuthType["OIDC"] = "SSO_OIDC";
539
538
  /**
540
539
  * SSO using OIDC
541
- * Will make the host application redirect to the OIDC Idp.
540
+ * Will make the host application redirect to the OIDC IdP.
542
541
  * See code samples in {@link SAMLRedirect}.
543
542
  */
544
543
  AuthType["OIDCRedirect"] = "SSO_OIDC";
@@ -550,8 +549,8 @@ var AuthType;
550
549
  */
551
550
  AuthType["AuthServer"] = "AuthServer";
552
551
  /**
553
- * Trusted authentication server, Use your own authentication server
554
- * which returns a bearer token, generated using the secret_key obtained
552
+ * Trusted authentication server. Use your own authentication server
553
+ * which returns a bearer token, generated using the `secret_key` obtained
555
554
  * from ThoughtSpot.
556
555
  *
557
556
  * @example
@@ -568,11 +567,11 @@ var AuthType;
568
567
  */
569
568
  AuthType["TrustedAuthToken"] = "AuthServer";
570
569
  /**
571
- * Trusted authentication server Cookieless, Use you own authentication
572
- * server which returns a bearer token, generated using the secret_key
570
+ * Trusted authentication server Cookieless, Use your own authentication
571
+ * server which returns a bearer token, generated using the `secret_key`
573
572
  * obtained from ThoughtSpot. This uses a cookieless authentication
574
- * approach, recommended to by pass third-party cookie-blocking restriction
575
- * implemented by some browsers
573
+ * approach, recommended to bypass the third-party cookie-blocking restriction
574
+ * implemented by some browsers.
576
575
  *
577
576
  * @example
578
577
  * ```js
@@ -585,7 +584,7 @@ var AuthType;
585
584
  * .then((data) => data.token);
586
585
  * }
587
586
  * ```
588
- * @version SDK: 1.22.0| ThouhgtSpot: 9.3.0.cl, 9.5.1.sw
587
+ * @version SDK: 1.22.0| ThoughtSpot: 9.3.0.cl, 9.5.1.sw
589
588
  */
590
589
  AuthType["TrustedAuthTokenCookieless"] = "AuthServerCookieless";
591
590
  /**
@@ -672,7 +671,7 @@ var RuntimeFilterOp;
672
671
  RuntimeFilterOp["IN"] = "IN";
673
672
  })(RuntimeFilterOp || (RuntimeFilterOp = {}));
674
673
  /**
675
- * Home page module that can be hide
674
+ * Home page module that can be hidden
676
675
  */
677
676
  // eslint-disable-next-line no-shadow
678
677
  var HomepageModule;
@@ -690,7 +689,7 @@ var HomepageModule;
690
689
  */
691
690
  HomepageModule["Favorite"] = "FAVORITE";
692
691
  /**
693
- * List of answers and liveboards
692
+ * List of answers and Liveboards
694
693
  */
695
694
  HomepageModule["MyLibrary"] = "MY_LIBRARY";
696
695
  /**
@@ -727,6 +726,14 @@ var EmbedEvent;
727
726
  (function (EmbedEvent) {
728
727
  /**
729
728
  * Rendering has initialized.
729
+ * @example
730
+ *```js
731
+ * liveboardEmbed.on(EmbedEvent.Init, showLoader)
732
+ * //show a loader
733
+ * function showLoader() {
734
+ * document.getElementById("loader");
735
+ * }
736
+ *```
730
737
  *
731
738
  * @returns timestamp - The timestamp when the event was generated.
732
739
  */
@@ -734,69 +741,162 @@ var EmbedEvent;
734
741
  /**
735
742
  * Authentication has either succeeded or failed.
736
743
  *
744
+ * @example
745
+ *```js
746
+ * appEmbed.on(EmbedEvent.AuthInit, payload => {
747
+ * console.log('AuthInit', payload);
748
+ * })
749
+ *```
750
+ *
737
751
  * @returns isLoggedIn - A Boolean specifying whether authentication was successful.
738
752
  */
739
753
  EmbedEvent["AuthInit"] = "authInit";
740
754
  /**
741
755
  * The embed object container has loaded.
742
- *
743
756
  * @returns timestamp - The timestamp when the event was generated.
757
+ * @example
758
+ *```js
759
+ * liveboardEmbed.on(EmbedEvent.Load, hideLoader)
760
+ * //hide loader
761
+ * function hideLoader() {
762
+ * document.getElementById("loader");
763
+ * }
764
+ *```
744
765
  */
745
766
  EmbedEvent["Load"] = "load";
746
767
  /**
747
768
  * Data pertaining to answer or Liveboard is received
748
- *
749
769
  * @return data - The answer or Liveboard data
770
+ * @example
771
+ *```js
772
+ * liveboardEmbed.on(EmbedEvent.Data, payload => {
773
+ * console.log('data', payload);
774
+ * })
775
+ *```
750
776
  * @important
751
777
  */
752
778
  EmbedEvent["Data"] = "data";
753
779
  /**
754
- * Search/answer/Liveboard filters have been applied/updated by the user.
780
+ * Search/Answer/Liveboard filters have been applied/updated by the user.
755
781
  *
756
782
  * @hidden
757
783
  */
758
784
  EmbedEvent["FiltersChanged"] = "filtersChanged";
759
785
  /**
760
786
  * Search query has been updated by the user.
787
+ *
788
+ * @example
789
+ *```js
790
+ * searchEmbed.on(EmbedEvent.QueryChanged, payload => console.log('data', payload))
791
+ *```
792
+ *
761
793
  */
762
794
  EmbedEvent["QueryChanged"] = "queryChanged";
763
795
  /**
764
- * A drill down operation has been performed.
796
+ * A drill-down operation has been performed.
765
797
  *
766
798
  * @returns additionalFilters - Any additional filters applied
767
799
  * @returns drillDownColumns - The columns on which drill down was performed
768
800
  * @returns nonFilteredColumns - The columns that were not filtered
801
+ *
802
+ * @example
803
+ *```js
804
+ * searchEmbed.trigger(HostEvent.DrillDown, {
805
+ * points: {
806
+ * clickedPoint,
807
+ * selectedPoints: selectedPoint
808
+ * },
809
+ * autoDrillDown: true,
810
+ * })
811
+ *```
812
+ * In this example, `VizPointDoubleClick` event is used for
813
+ * triggering the `DrillDown` event when an area or specific
814
+ * data point on a table or chart is double-clicked.
815
+ *
816
+ * @example
817
+ *```js
818
+ * searchEmbed.on(EmbedEvent.VizPointDoubleClick, (payload) => {
819
+ * console.log(payload);
820
+ * const clickedPoint = payload.data.clickedPoint;
821
+ * const selectedPoint = payload.data.selectedPoints;
822
+ * console.log('>>> called', clickedPoint);
823
+ * embed.trigger(HostEvent.DrillDown, {
824
+ * points: {
825
+ * clickedPoint,
826
+ * selectedPoints: selectedPoint
827
+ * },
828
+ * autoDrillDown: true,
829
+ * })
830
+ * })
831
+ *```
832
+ *
769
833
  */
770
834
  EmbedEvent["Drilldown"] = "drillDown";
771
835
  /**
772
836
  * One or more data sources have been selected.
773
- *
774
837
  * @returns dataSourceIds - the list of data sources
838
+ *
839
+ * @example
840
+ * ```js
841
+ * searchEmbed.on(EmbedEvent.DataSourceSelected, payload => {
842
+ * console.log('DataSourceSelected', payload);
843
+ * })
844
+ * ```
845
+ *
775
846
  */
776
847
  EmbedEvent["DataSourceSelected"] = "dataSourceSelected";
777
848
  /**
778
849
  * One or more data columns have been selected.
779
- *
780
850
  * @returns columnIds - the list of columns
781
851
  * @version SDK: 1.10.0 | ThoughtSpot: 8.2.0.cl, 8.4.1.sw
852
+ *
853
+ * @example
854
+ * ```js
855
+ * appEmbed.on(EmbedEvent.AddRemoveColumns, payload => {
856
+ * console.log('AddRemoveColumns', payload);
857
+ * })
858
+ * ```
859
+ *
782
860
  */
783
861
  EmbedEvent["AddRemoveColumns"] = "addRemoveColumns";
784
862
  /**
785
- * A custom action has been triggered
863
+ * A custom action has been triggered.
864
+ *
865
+ * @returns actionId - ID of the custom action
866
+ * @returns data - Response payload with the Answer or Liveboard data
786
867
  *
787
- * @returns actionId - The id of the custom action
788
- * @returns data - The answer or Liveboard data
868
+ * @example
869
+ * ```js
870
+ * appEmbed.on(EmbedEvent.customAction, payload => {
871
+ * const data = payload.data;
872
+ * if (data.id === 'insert Custom Action ID here') {
873
+ * console.log('Custom Action event:', data.embedAnswerData);
874
+ * }
875
+ * })
876
+ * ```
789
877
  */
790
878
  EmbedEvent["CustomAction"] = "customAction";
791
879
  /**
792
- * Listen to double clicks on a visualization
880
+ * Listen to double click actions on a visualization.
881
+ *
882
+ * @return ContextMenuInputPoints - Data point that is double-clicked
793
883
  *
794
- * @return ContextMenuInputPoints - data point that is double clicked
795
884
  * @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
885
+ *
886
+ * @example
887
+ * ```js
888
+ * livebaordEmbed.on(EmbedEvent.VizPointDoubleClick, payload => {
889
+ * console.log('VizPointDoubleClick', payload)
890
+ * })
891
+ * ```
796
892
  */
797
893
  EmbedEvent["VizPointDoubleClick"] = "vizPointDoubleClick";
798
894
  /**
799
- * Listen to clicks on a visualization in a liveboard or Search result.
895
+ * Listen to clicks on a visualization in a Liveboard or Search result.
896
+ *
897
+ * @return viz, clickedPoint - metadata about the point that is clicked
898
+ * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
899
+ * @important
800
900
  *
801
901
  * @example
802
902
  * ```js
@@ -810,25 +910,46 @@ var EmbedEvent;
810
910
  * )
811
911
  * });
812
912
  * ```
813
- * @return viz, clickedPoint - metadata about point that is clicked
814
- * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
815
- * @important
816
913
  */
817
914
  EmbedEvent["VizPointClick"] = "vizPointClick";
818
915
  /**
819
916
  * An error has occurred.
820
917
  *
821
918
  * @returns error - An error object or message
919
+ *
920
+ * @example
921
+ * ```js
922
+ * SearchEmbed.on(EmbedEvent.Error, showErrorMsg)
923
+ * //show error messaage
924
+ * function showErrorMsg() {
925
+ * document.getElementById("error");
926
+ * ```
927
+ *
822
928
  */
823
929
  EmbedEvent["Error"] = "Error";
824
930
  /**
825
- * The embedded object has sent an alert
931
+ * The embedded object has sent an alert.
826
932
  *
827
933
  * @returns alert - An alert object
934
+ *
935
+ * @example
936
+ * ```js
937
+ * searchEmbed.on(EmbedEvent.Alert)
938
+ * ```
939
+ *
828
940
  */
829
941
  EmbedEvent["Alert"] = "alert";
830
942
  /**
831
943
  * The ThoughtSpot auth session has expired.
944
+ *
945
+ * @example
946
+ *```js
947
+ * appEmbed.on(EmbedEvent.AuthExpire, showAuthExpired)
948
+ * //show auth expired banner
949
+ * function showAuthExpired() {
950
+ * document.getElementById("authExpiredBanner");
951
+ * }
952
+ *```
832
953
  */
833
954
  EmbedEvent["AuthExpire"] = "ThoughtspotAuthExpired";
834
955
  /**
@@ -858,14 +979,28 @@ var EmbedEvent;
858
979
  */
859
980
  EmbedEvent["EmbedIframeCenter"] = "EmbedIframeCenter";
860
981
  /**
861
- * Emitted when the "Get Data" button in Search Bar embed
862
- * is clicked.
982
+ * Emitted when the **Get Data** action is initiated.
983
+ * Applicable to `SearchBarEmbed` only.
984
+ *
985
+ * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
863
986
  *
864
- * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.0.sw
987
+ * @example
988
+ *```js
989
+ * searchbarEmbed.on(EmbedEvent.GetDataClick)
990
+ * .then(data => {
991
+ * console.log('Answer Data:', data);
992
+ * })
993
+ *```
865
994
  */
866
995
  EmbedEvent["GetDataClick"] = "getDataClick";
867
996
  /**
868
997
  * Detects the route change.
998
+ *
999
+ * @example
1000
+ *```js
1001
+ * searchEmbed.on(EmbedEvent.RouteChange, payload =>
1002
+ * console.log('data', payload))
1003
+ *```
869
1004
  */
870
1005
  EmbedEvent["RouteChange"] = "ROUTE_CHANGE";
871
1006
  /**
@@ -875,10 +1010,15 @@ var EmbedEvent;
875
1010
  */
876
1011
  EmbedEvent["V1Data"] = "exportVizDataToParent";
877
1012
  /**
878
- * Emitted when the embed does not have cookie access. This
879
- * happens on Safari where third-party cookies are blocked by default.
1013
+ * Emitted when the embed does not have cookie access. This happens
1014
+ * when Safari and other Web browsers block third-party cookies
1015
+ * are blocked by default. `NoCookieAccess` can trigger
880
1016
  *
881
- * @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 7.2.1
1017
+ * @example
1018
+ *```js
1019
+ * appEmbed.on(EmbedEvent.NoCookieAccess)
1020
+ *```
1021
+ * @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 7.2.1.sw
882
1022
  */
883
1023
  EmbedEvent["NoCookieAccess"] = "noCookieAccess";
884
1024
  /**
@@ -890,239 +1030,539 @@ var EmbedEvent;
890
1030
  EmbedEvent["SAMLComplete"] = "samlComplete";
891
1031
  /**
892
1032
  * Emitted when any modal is opened in the app
893
- *
894
1033
  * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
1034
+ *
1035
+ * @example
1036
+ *```js
1037
+ * appEmbed.on(EmbedEvent.DialogOpen, payload => {
1038
+ * console.log('dialog open', payload);
1039
+ * })
1040
+ *```
895
1041
  */
896
1042
  EmbedEvent["DialogOpen"] = "dialog-open";
897
1043
  /**
898
1044
  * Emitted when any modal is closed in the app
899
- *
900
1045
  * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
1046
+ *
1047
+ * @example
1048
+ *```js
1049
+ * appEmbed.on(EmbedEvent.DialogClose, payload => {
1050
+ * console.log('dialog close', payload);
1051
+ * })
1052
+ *```
901
1053
  */
902
1054
  EmbedEvent["DialogClose"] = "dialog-close";
903
1055
  /**
904
1056
  * Emitted when the Liveboard shell loads.
905
1057
  * You can use this event as a hook to trigger
906
1058
  * other events on the rendered Liveboard.
907
- *
908
1059
  * @version SDK: 1.9.1 | ThoughtSpot: 8.1.0.cl, 8.4.1.sw
1060
+ *
1061
+ * @example
1062
+ *```js
1063
+ * liveboardEmbed.on(EmbedEvent.LiveboardRendered, payload => {
1064
+ console.log('Liveboard is rendered', payload);
1065
+ })
1066
+ *```
1067
+ * The following example shows how to trigger
1068
+ * `SetVisibleVizs` event using LiveboardRendered embed event:
1069
+ *
1070
+ * @example
1071
+ *```js
1072
+ * const embedRef = useEmbedRef();
1073
+ * const onLiveboardRendered = () => {
1074
+ * embed.trigger(HostEvent.SetVisibleVizs, ['viz1', 'viz2']);
1075
+ * };
1076
+ *```
909
1077
  */
910
1078
  EmbedEvent["LiveboardRendered"] = "PinboardRendered";
911
1079
  /**
912
1080
  * This can be used to register an event listener which
913
1081
  * is triggered on all events.
914
- *
915
1082
  * @Version SDK: 1.10.0 | ThoughtSpot: 8.2.0.cl, 8.4.1.sw
1083
+ *
1084
+ * @example
1085
+ *```js
1086
+ * appEmbed.on(EmbedEvent.ALL, payload => {
1087
+ * console.log('Embed Events', payload)
1088
+ * })
1089
+ *```
916
1090
  */
917
1091
  EmbedEvent["ALL"] = "*";
918
1092
  /**
919
1093
  * Emitted when an Answer is saved in the app
920
- *
921
1094
  * @Version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1095
+ * @example
1096
+ *```js
1097
+ * //trigger when action starts
1098
+ * searchEmbed.on(EmbedEvent.Save, payload => {
1099
+ * console.log('Save', payload)
1100
+ * }, {
1101
+ * start: true
1102
+ * })
1103
+ * //trigger when action ends
1104
+ * searchEmbed.on(EmbedEvent.Save, payload => {
1105
+ * console.log('Save', payload)
1106
+ * })
1107
+ *```
922
1108
  */
923
1109
  EmbedEvent["Save"] = "save";
924
1110
  /**
925
1111
  * Emitted when the download action is triggered on an answer
926
1112
  *
1113
+ * **Note**: This event is deprecated in v1.21.0.
1114
+ * To fire an event when a download action is initiated on a chart or table,
1115
+ * use `EmbedEvent.DownloadAsPng`, `EmbedEvent.DownloadAsPDF`, `EmbedEvent.DownloadAsCSV`,
1116
+ * or `EmbedEvent.DownloadAsXLSX`
1117
+ *
927
1118
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1119
+ *
1120
+ * @example
1121
+ *```js
1122
+ * liveboardEmbed.trigger(HostEvent.Download, {
1123
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
1124
+ * })
1125
+ *```
928
1126
  */
929
1127
  EmbedEvent["Download"] = "download";
930
1128
  /**
931
1129
  * Emitted when the download action is triggered on an answer
932
- *
933
1130
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.0.sw
1131
+ *
1132
+ * @example
1133
+ *```js
1134
+ * //trigger when action starts
1135
+ * searchEmbed.on(EmbedEvent.DownloadAsPng, payload => {
1136
+ * console.log('download PNG', payload)}, {start: true })
1137
+ * //trigger when action ends
1138
+ * searchEmbed.on(EmbedEvent.DownloadAsPng, payload => {
1139
+ * console.log('download PNG', payload)})
1140
+ *```
1141
+ *
934
1142
  */
935
1143
  EmbedEvent["DownloadAsPng"] = "downloadAsPng";
936
1144
  /**
937
1145
  * Emitted when the Download as PDF action is triggered on an answer
938
1146
  *
939
1147
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1148
+ *
1149
+ * @example
1150
+ *```js
1151
+ * //trigger when action starts
1152
+ * searchEmbed.on(EmbedEvent.DownloadAsPdf, payload => {
1153
+ * console.log('download PDF', payload)}, {start: true })
1154
+ * //trigger when action ends
1155
+ * searchEmbed.on(EmbedEvent.DownloadAsPdf, payload => {
1156
+ * console.log('download PDF', payload)})
1157
+ *```
1158
+ *
940
1159
  */
941
1160
  EmbedEvent["DownloadAsPdf"] = "downloadAsPdf";
942
1161
  /**
943
1162
  * Emitted when the Download as CSV action is triggered on an answer
944
1163
  *
945
1164
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1165
+ * @example
1166
+ *```js
1167
+ * //trigger when action starts
1168
+ * searchEmbed.on(EmbedEvent.DownloadAsCSV, payload => {
1169
+ * console.log('download CSV', payload)}, {start: true })
1170
+ * //trigger when action ends
1171
+ * searchEmbed.on(EmbedEvent.DownloadAsCSV, payload => {
1172
+ * console.log('download CSV', payload)})
1173
+ *```
946
1174
  */
947
1175
  EmbedEvent["DownloadAsCsv"] = "downloadAsCsv";
948
1176
  /**
949
1177
  * Emitted when the Download as XLSX action is triggered on an answer
950
1178
  *
951
1179
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1180
+ *
1181
+ * @example
1182
+ *```js
1183
+ * //trigger when action starts
1184
+ * searchEmbed.on(EmbedEvent.DownloadAsXlsx, payload => {
1185
+ * console.log('download Xlsx', payload)}, { start: true })
1186
+ * //trigger when action ends
1187
+ * searchEmbed.on(EmbedEvent.DownloadAsXlsx, payload => {
1188
+ * console.log('download Xlsx', payload)})
1189
+ *```
952
1190
  */
953
1191
  EmbedEvent["DownloadAsXlsx"] = "downloadAsXlsx";
954
1192
  /**
955
- * Emitted when an answer is deleted in the app
1193
+ * Emitted when an Answer is deleted in the app
956
1194
  *
957
1195
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1196
+ *
1197
+ * @example
1198
+ *```js
1199
+ * //trigger when action starts
1200
+ * appEmbed.on(EmbedEvent.AnswerDelete, payload => {
1201
+ * console.log('delete answer', payload)}, {start: true })
1202
+ * //trigger when action is completed
1203
+ * appEmbed.on(EmbedEvent.AnswerDelete, payload => {
1204
+ * console.log('delete answer', payload)})
1205
+ *```
958
1206
  */
959
1207
  EmbedEvent["AnswerDelete"] = "answerDelete";
960
1208
  /**
961
1209
  * Emitted when an answer is pinned to a Liveboard
962
1210
  *
963
1211
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1212
+ * @example
1213
+ *```js
1214
+ * //trigger when action starts
1215
+ * searchEmbed.on(EmbedEvent.Pin, payload => {
1216
+ * console.log('pin', payload)
1217
+ * }, {
1218
+ * start: true
1219
+ * })
1220
+ * //trigger when action ends
1221
+ * searchEmbed.on(EmbedEvent.Pin, payload => {
1222
+ * console.log('pin', payload)
1223
+ * })
1224
+ *```
964
1225
  */
965
1226
  EmbedEvent["Pin"] = "pin";
966
1227
  /**
967
1228
  * Emitted when SpotIQ analysis is triggered
968
1229
  *
969
1230
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1231
+ * @example
1232
+ *```js
1233
+ * //trigger when action starts
1234
+ * searchEmbed.on(EmbedEvent.SpotIQAnalyze, payload => {
1235
+ * console.log('SpotIQAnalyze', payload)
1236
+ * }, {
1237
+ * start: true
1238
+ * })
1239
+ * //trigger when action ends
1240
+ * searchEmbed.on(EmbedEvent.SpotIQAnalyze, payload => {
1241
+ * console.log('SpotIQ analyze', payload)
1242
+ * })
1243
+ *```
970
1244
  */
971
1245
  EmbedEvent["SpotIQAnalyze"] = "spotIQAnalyze";
972
1246
  /**
973
1247
  * Emitted when a user shares an object with another user or group
974
1248
  *
975
1249
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1250
+ *
1251
+ * @example
1252
+ *```js
1253
+ * //trigger when action starts
1254
+ * searchEmbed.on(EmbedEvent.Share, payload => {
1255
+ * console.log('Share', payload)
1256
+ * }, {
1257
+ * start: true
1258
+ * })
1259
+ * //trigger when action ends
1260
+ * searchEmbed.on(EmbedEvent.Share, payload => {
1261
+ * console.log('Share', payload)
1262
+ * })
1263
+ *```
976
1264
  */
977
1265
  EmbedEvent["Share"] = "share";
978
1266
  /**
979
- * Emitted when a user clicks the Include action to include a specific value or data
980
- * on a chart or table
1267
+ * Emitted when a user clicks the **Include** action to include a specific value or
1268
+ * data on a chart or table.
981
1269
  *
982
1270
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1271
+ * @example
1272
+ *```js
1273
+ * appEmbed.on(EmbedEvent.DrillInclude, payload => {
1274
+ * console.log('Drill include', payload);
1275
+ * })
1276
+ *```
983
1277
  */
984
1278
  EmbedEvent["DrillInclude"] = "context-menu-item-include";
985
1279
  /**
986
- * Emitted when a user clicks the Exclude action to exclude a specific value or data
987
- * on a chart or table
1280
+ * Emitted when a user clicks the **Exclude** action to exclude a specific value or
1281
+ * data on a chart or table
988
1282
  *
989
1283
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1284
+ * @example
1285
+ *```js
1286
+ * appEmbed.on(EmbedEvent.DrillExclude, payload => {
1287
+ * console.log('Drill exclude', payload);
1288
+ * })
1289
+ *```
990
1290
  */
991
1291
  EmbedEvent["DrillExclude"] = "context-menu-item-exclude";
992
1292
  /**
993
- * Emitted when copied column value on the app
1293
+ * Emitted when a column value is copied in the embedded app.
994
1294
  *
995
1295
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1296
+ * @example
1297
+ *```js
1298
+ * seachEmbed.on(EmbedEvent.CopyToClipboard, payload => {
1299
+ * console.log('copy to clipboard', payload);
1300
+ * })
1301
+ *```
996
1302
  */
997
1303
  EmbedEvent["CopyToClipboard"] = "context-menu-item-copy-to-clipboard";
998
1304
  /**
999
- * Emitted when a user clicks the Update TML action
1305
+ * Emitted when a user clicks the **Update TML** action
1000
1306
  *
1001
1307
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1308
+ * @example
1309
+ *```js
1310
+ * liveboardEmbed.on(EmbedEvent.UpdateTML)
1311
+ * })
1312
+ *```
1002
1313
  */
1003
1314
  EmbedEvent["UpdateTML"] = "updateTSL";
1004
1315
  /**
1005
- * Emitted when a user clicks the Edit TML action
1316
+ * Emitted when a user clicks the **Edit TML** action
1006
1317
  *
1007
1318
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1319
+ * @example
1320
+ *```js
1321
+ * appEmbed.on(EmbedEvent.EditTML, payload => {
1322
+ * console.log('Edit TML', payload);
1323
+ * })
1324
+ *```
1008
1325
  */
1009
1326
  EmbedEvent["EditTML"] = "editTSL";
1010
1327
  /**
1011
- * Emitted when ExportTML trigger in answer on the app
1012
- *
1328
+ * Emitted when the **Export TML** action is triggered on an
1329
+ * an embedded object in the app
1013
1330
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1331
+ * @example
1332
+ *```js
1333
+ * //trigger when action starts
1334
+ * searchEmbed.on(EmbedEvent.ExportTML, payload => {
1335
+ * console.log('Export TML', payload)}, { start: true })
1336
+ * //trigger when action ends
1337
+ * searchEmbed.on(EmbedEvent.ExportTML, payload => {
1338
+ * console.log('Export TML', payload)})
1339
+ *```
1014
1340
  */
1015
1341
  EmbedEvent["ExportTML"] = "exportTSL";
1016
1342
  /**
1017
- * Emitted when an answer is saved as a view
1343
+ * Emitted when an Answer is saved as a View.
1018
1344
  *
1019
1345
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1346
+ * @example
1347
+ *```js
1348
+ * appEmbed.on(EmbedEvent.SaveAsView, payload => {
1349
+ * console.log('View', payload);
1350
+ * })
1351
+ *```
1020
1352
  */
1021
1353
  EmbedEvent["SaveAsView"] = "saveAsView";
1022
1354
  /**
1023
- * Emitted when copy of existing answer on the app
1355
+ * Emitted when the user creates a copy of an Answer
1024
1356
  *
1025
1357
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1358
+ * @example
1359
+ *```js
1360
+ * //trigger when action starts
1361
+ * appEmbed.on(EmbedEvent.CopyAEdit, payload => {
1362
+ * console.log('Copy and edit', payload)}, {start: true })
1363
+ * //trigger when action ends
1364
+ * appEmbed.on(EmbedEvent.CopyAEdit, payload => {
1365
+ * console.log('Copy and edit', payload)})
1366
+ *```
1026
1367
  */
1027
1368
  EmbedEvent["CopyAEdit"] = "copyAEdit";
1028
1369
  /**
1029
- * Emitted when a user clicks Show underlying data on an answe
1370
+ * Emitted when a user clicks Show underlying data on an Answer
1030
1371
  *
1031
1372
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1373
+ * @example
1374
+ *```js
1375
+ * liveboardEmbed.on(EmbedEvent.ShowUnderlyingData, payload => {
1376
+ * console.log('show data', payload);
1377
+ * })
1378
+ *```
1032
1379
  */
1033
1380
  EmbedEvent["ShowUnderlyingData"] = "showUnderlyingData";
1034
1381
  /**
1035
- * Emitted when an answer is switched to a chart or table view
1382
+ * Emitted when an answer is switched to a chart or table view.
1036
1383
  *
1037
1384
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1385
+ * @example
1386
+ *```js
1387
+ * searchEmbed.on(EmbedEvent.AnswerChartSwitcher, payload => {
1388
+ * console.log('switch view', payload);
1389
+ * })
1390
+ *```
1038
1391
  */
1039
1392
  EmbedEvent["AnswerChartSwitcher"] = "answerChartSwitcher";
1040
1393
  /**
1041
- * Internal event to communicate the initial settings back to the TS APP
1394
+ * Internal event to communicate the initial settings back to the ThoughtSpot app
1042
1395
  *
1043
1396
  * @hidden
1044
1397
  */
1045
1398
  EmbedEvent["APP_INIT"] = "appInit";
1046
1399
  /**
1047
- * Emitted when a user clicks Show Liveboard details on a Liveboard
1400
+ * Emitted when a user clicks **Show Liveboard details** on a Liveboard
1048
1401
  *
1049
1402
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1403
+ * @example
1404
+ *```js
1405
+ * liveboardEmbed.on(EmbedEvent.AnswerChartSwitcher, payload => {
1406
+ * console.log('Liveboard details', payload);
1407
+ * })
1408
+ *```
1050
1409
  */
1051
1410
  EmbedEvent["LiveboardInfo"] = "pinboardInfo";
1052
1411
  /**
1053
1412
  * Emitted when a user clicks on the Favorite icon on a Liveboard
1054
1413
  *
1055
1414
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1415
+ * @example
1416
+ *```js
1417
+ * liveboardEmbed.on(EmbedEvent.AddToFavorites, payload => {
1418
+ * console.log('favorites', payload);
1419
+ * })
1420
+ *```
1056
1421
  */
1057
1422
  EmbedEvent["AddToFavorites"] = "addToFavorites";
1058
1423
  /**
1059
- * Emitted when a user clicks Schedule on a Liveboard
1424
+ * Emitted when a user clicks **Schedule** on a Liveboard
1060
1425
  *
1061
1426
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1427
+ * @example
1428
+ *```js
1429
+ * liveboardEmbed.on(EmbedEvent.Schedule, payload => {
1430
+ * console.log(`Liveboard schedule', payload);
1431
+ * })
1432
+ *```
1062
1433
  */
1063
1434
  EmbedEvent["Schedule"] = "subscription";
1064
1435
  /**
1065
- * Emitted when a user clicks Edit on a Liveboard or visualization
1436
+ * Emitted when a user clicks **Edit** on a Liveboard or visualization
1066
1437
  *
1067
1438
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1439
+ * @example
1440
+ *```js
1441
+ * liveboardEmbed.on(EmbedEvent.Edit, payload => {
1442
+ * console.log(`Liveboard edit', payload);
1443
+ * })
1444
+ *```
1068
1445
  */
1069
1446
  EmbedEvent["Edit"] = "edit";
1070
1447
  /**
1071
- * Emitted when a user clicks Make a copy on a Liveboard
1448
+ * Emitted when a user clicks *Make a copy* on a Liveboard
1072
1449
  *
1073
1450
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1451
+ * @example
1452
+ *```js
1453
+ * liveboardEmbed.on(EmbedEvent.MakeACopy, payload => {
1454
+ * console.log(`Copy', payload);
1455
+ * })
1456
+ *```
1074
1457
  */
1075
1458
  EmbedEvent["MakeACopy"] = "makeACopy";
1076
1459
  /**
1077
- * Emitted when a user clicks Present on a Liveboard or visualization
1460
+ * Emitted when a user clicks **Present** on a Liveboard or visualization
1078
1461
  *
1079
1462
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1463
+ * @example
1464
+ *```js
1465
+ * liveboardEmbed.trigger(HostEvent.Present)
1466
+ *```
1467
+ *
1468
+ * @example
1469
+ *```js
1470
+ * liveboardEmbed.on(EmbedEvent.Present, {
1471
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1472
+ * })
1473
+ *```
1080
1474
  */
1081
1475
  EmbedEvent["Present"] = "present";
1082
1476
  /**
1083
- * Emitted when a user clicks Delete on a Liveboard
1477
+ * Emitted when a user clicks **Delete** on a visualization
1084
1478
  *
1085
1479
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1480
+ * @example
1481
+ *```js
1482
+ * liveboardEmbed.trigger(HostEvent.Delete,
1483
+ * {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1484
+ *```
1485
+ *
1086
1486
  */
1087
1487
  EmbedEvent["Delete"] = "delete";
1088
1488
  /**
1089
1489
  * Emitted when a user clicks Manage schedules on a Liveboard
1090
1490
  *
1091
1491
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1492
+ *
1493
+ * @example
1494
+ *```js
1495
+ * liveboardEmbed.trigger(HostEvent.SchedulesList)
1496
+ *```
1497
+ *
1092
1498
  */
1093
1499
  EmbedEvent["SchedulesList"] = "schedule-list";
1094
1500
  /**
1095
- * Emitted when a user clicks Cancel in edit mode on a Liveboard
1501
+ * Emitted when a user clicks **Cancel** in edit mode on a Liveboard
1096
1502
  *
1097
1503
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1504
+ *
1505
+ * @example
1506
+ *```js
1507
+ * liveboardEmbed.trigger(HostEvent.Cancel)
1508
+ *```
1509
+ *
1098
1510
  */
1099
1511
  EmbedEvent["Cancel"] = "cancel";
1100
1512
  /**
1101
- * Emitted when a user clicks Explore on a visualization
1513
+ * Emitted when a user clicks **Explore** on a visualization
1102
1514
  *
1103
1515
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1516
+ *
1517
+ * @example
1518
+ *```js
1519
+ * liveboardEmbed.trigger(HostEvent.Explore, {
1520
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1521
+ *```
1522
+ *
1104
1523
  */
1105
1524
  EmbedEvent["Explore"] = "explore";
1106
1525
  /**
1107
- * Emitted when a user clicks Copy link action on a visualization
1526
+ * Emitted when a user clicks **Copy link** action on a visualization
1108
1527
  *
1109
1528
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1529
+ *
1530
+ * @example
1531
+ *```js
1532
+ * liveboardEmbed.trigger(HostEvent.CopyLink, {
1533
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1534
+ *```
1535
+ *
1110
1536
  */
1111
1537
  EmbedEvent["CopyLink"] = "embedDocument";
1112
1538
  /**
1113
- * Emitted when a user interacts with cross filters on a visualization or liveboard
1539
+ * Emitted when a user interacts with cross filters on a visualization or Liveboard
1540
+ *
1541
+ * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.5.0.sw
1542
+ *
1543
+ * @example
1544
+ *```js
1545
+ * liveboardEmbed.trigger(HostEvent.CrossFilterChanged, {
1546
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1547
+ *```
1114
1548
  *
1115
- * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
1116
1549
  */
1117
1550
  EmbedEvent["CrossFilterChanged"] = "cross-filter-changed";
1118
1551
  /**
1119
1552
  * Emitted when a user right clicks on a visualization (chart or table)
1120
1553
  *
1121
- * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
1554
+ * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.5.0.sw
1555
+ *
1556
+ * @example
1557
+ *```js
1558
+ * LiveboardEmbed.on(EmbedEvent.VizPointRightClick, payload => {
1559
+ * console.log('VizPointClick', payload)
1560
+ * })
1561
+ *```
1122
1562
  */
1123
1563
  EmbedEvent["VizPointRightClick"] = "vizPointRightClick";
1124
1564
  /**
1125
- * Emitted when a user clicks on Insert to slide on a visualization
1565
+ * Emitted when a user clicks **Insert to slide** on a visualization
1126
1566
  *
1127
1567
  * @hidden
1128
1568
  */
@@ -1130,52 +1570,53 @@ var EmbedEvent;
1130
1570
  /**
1131
1571
  * @hidden
1132
1572
  * Emitted when a user changes any filter on a Liveboard.
1133
- * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
1573
+ * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl, 9.5.0.sw
1134
1574
  */
1135
1575
  EmbedEvent["FilterChanged"] = "filterChanged";
1136
1576
  /**
1137
- * Emitted when a user click on Go button in Sage Embed
1577
+ * Emitted when a user clicks the **Go** button on the Search page
1138
1578
  *
1139
- * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
1579
+ * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
1140
1580
  */
1141
1581
  EmbedEvent["SageEmbedQuery"] = "sageEmbedQuery";
1142
1582
  /**
1143
- * Emitten when a user select data source in Sage Embed
1583
+ * Emitted when a user selects a data source.
1584
+ *
1585
+ * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
1144
1586
  *
1145
- * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
1146
1587
  */
1147
1588
  EmbedEvent["SageWorksheetUpdated"] = "sageWorksheetUpdated";
1148
1589
  /**
1149
- * Emitted when a user updates a connection in Data tab
1590
+ * Emitted when a user updates a connection on the **Data** page
1150
1591
  *
1151
- * @version SDK : 1.27.0 | Thoughtspot: 9.8.0.cl
1592
+ * @version SDK : 1.27.0 | Thoughtspot: 9.8.0.cl, 9.8.0.sw
1152
1593
  */
1153
1594
  EmbedEvent["UpdateConnection"] = "updateConnection";
1154
1595
  /**
1155
- * Emitted when a user updates a connection in Data tab
1596
+ * Emitted when a user updates a connection on the **Data** page
1156
1597
  *
1157
- * @version SDK : 1.27.0 | Thoughtspot: 9.8.0.cl
1598
+ * @version SDK : 1.27.0 | Thoughtspot: 9.8.0.cl, 9.8.0.sw
1158
1599
  */
1159
1600
  EmbedEvent["CreateConnection"] = "createConnection";
1160
1601
  /**
1161
1602
  * Emitted when name, status (private or public) or filter values of a
1162
- * PersonalisedView is updated.
1603
+ * Personalised view is updated.
1163
1604
  *
1164
1605
  * @returns viewName: string
1165
1606
  * @returns viewId: string
1166
1607
  * @returns liveboardId: string
1167
1608
  * @returns isPublic: boolean
1168
- * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
1609
+ * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
1169
1610
  */
1170
1611
  EmbedEvent["UpdatePersonalisedView"] = "updatePersonalisedView";
1171
1612
  /**
1172
- * Emitted when a PersonalisedView is saved.
1613
+ * Emitted when a Personalised view is saved.
1173
1614
  *
1174
1615
  * @returns viewName: string
1175
1616
  * @returns viewId: string
1176
1617
  * @returns liveboardId: string
1177
1618
  * @returns isPublic: boolean
1178
- * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
1619
+ * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
1179
1620
  */
1180
1621
  EmbedEvent["SavePersonalisedView"] = "savePersonalisedView";
1181
1622
  /**
@@ -1185,7 +1626,7 @@ var EmbedEvent;
1185
1626
  * @returns viewId: string
1186
1627
  * @returns liveboardId: string
1187
1628
  * @returns isPublic: boolean
1188
- * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
1629
+ * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
1189
1630
  */
1190
1631
  EmbedEvent["ResetLiveboard"] = "resetLiveboard";
1191
1632
  /**
@@ -1193,11 +1634,11 @@ var EmbedEvent;
1193
1634
  *
1194
1635
  * @returns views: string[]
1195
1636
  * @returns liveboardId: string
1196
- * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
1637
+ * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
1197
1638
  */
1198
1639
  EmbedEvent["DeletePersonalisedView"] = "deletePersonalisedView";
1199
1640
  /**
1200
- * Emitten when a user creates a new worksheet
1641
+ * Emitted when a user creates a new worksheet
1201
1642
  *
1202
1643
  * @version SDK : 1.27.0 | Thoughtspot: 9.8.0.cl
1203
1644
  */
@@ -1229,15 +1670,16 @@ var EmbedEvent;
1229
1670
  var HostEvent;
1230
1671
  (function (HostEvent) {
1231
1672
  /**
1232
- * Triggers a search query in AppEmbed and SearchEmbed
1233
- * deployments.
1673
+ * Triggers a search operation with the search tokens specified in
1674
+ * the search query string.
1675
+ * Supported in `AppEmbed` and `SearchEmbed` deployments.
1234
1676
  * Includes the following properties:
1235
1677
  *
1236
- * @param - dataSourceIds - The data source GUID to Search on
1678
+ * @param - `searchQuery` - query string with search tokens
1679
+ * @param - `dataSources` - Data source GUID to Search on
1237
1680
  * - Although an array, only a single source
1238
1681
  * is supported.
1239
- * @param - searchQuery - Query string with search tokens
1240
- * @param - execute - executes the existing / updated query
1682
+ * @param - `execute` - executes search and updates the existing query
1241
1683
  * @example
1242
1684
  * ```js
1243
1685
  * searchembed.trigger(HostEvent.Search, {
@@ -1257,6 +1699,10 @@ var HostEvent;
1257
1699
  * @param - columnGuid - Optional. GUID of the column to drill
1258
1700
  * by. If not provided it will auto drill by the configured
1259
1701
  * column.
1702
+ * @param - autoDrillDown - Optional. If true, the drill down will be
1703
+ * done automatically on the most popular column.
1704
+ * @param - vizId [TS >= 9.8.0] - Optional. The GUID of the visualization to drill
1705
+ * in case of a liveboard.
1260
1706
  * @example
1261
1707
  * ```js
1262
1708
  * searchEmbed.on(EmbedEvent.VizPointDoubleClick, (payload) => {
@@ -1273,6 +1719,25 @@ var HostEvent;
1273
1719
  * });
1274
1720
  * })
1275
1721
  * ```
1722
+ * @example
1723
+ * ```js
1724
+ * // Works with TS 9.8.0 and above
1725
+ *
1726
+ * liveboardEmbed.on(EmbedEvent.VizPointDoubleClick, (payload) => {
1727
+ * console.log(payload);
1728
+ * const clickedPoint = payload.data.clickedPoint;
1729
+ * const selectedPoint = payload.data.selectedPoints;
1730
+ * console.log('>>> called', clickedPoint);
1731
+ * liveboardEmbed.trigger(HostEvent.DrillDown, {
1732
+ * points: {
1733
+ * clickedPoint,
1734
+ * selectedPoints: selectedPoint
1735
+ * },
1736
+ * autoDrillDown: true,
1737
+ * vizId: payload.data.vizId
1738
+ * });
1739
+ * })
1740
+ * ```
1276
1741
  * @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
1277
1742
  */
1278
1743
  HostEvent["DrillDown"] = "triggerDrillDown";
@@ -1289,7 +1754,7 @@ var HostEvent;
1289
1754
  */
1290
1755
  HostEvent["Reload"] = "reload";
1291
1756
  /**
1292
- * Sets the visible visualizations on a Liveboard.
1757
+ * Display specific visualizations on a Liveboard.
1293
1758
  *
1294
1759
  * @param - An array of GUIDs of the visualization to show. The visualization IDs not passed
1295
1760
  * in this parameter will be hidden.
@@ -1303,7 +1768,7 @@ var HostEvent;
1303
1768
  */
1304
1769
  HostEvent["SetVisibleVizs"] = "SetPinboardVisibleVizs";
1305
1770
  /**
1306
- * Set the Active Tab of a Liveboard.
1771
+ * Set a Liveboard tab as an active tab.
1307
1772
  *
1308
1773
  * @param - tabId - string of id of Tab to show
1309
1774
  * @example
@@ -1316,7 +1781,7 @@ var HostEvent;
1316
1781
  */
1317
1782
  HostEvent["SetActiveTab"] = "SetActiveTab";
1318
1783
  /**
1319
- * Updates runtime filters applied on a Saved Answer or Liveboard. The
1784
+ * Update runtime filters applied on a Saved Answer or Liveboard. The
1320
1785
  * runtime filters passed here are appended to the existing runtime
1321
1786
  * filters.
1322
1787
  * Pass an array of runtime filters with the following attributes:
@@ -1342,10 +1807,12 @@ var HostEvent;
1342
1807
  */
1343
1808
  HostEvent["UpdateRuntimeFilters"] = "UpdateRuntimeFilters";
1344
1809
  /**
1345
- * Navigate to a specific page in the embedded application without reloading the page.
1810
+ * Navigate to a specific page in the embedded ThoughtSpot application.
1346
1811
  * This is the same as calling `appEmbed.navigateToPage(path, true)`
1347
1812
  *
1348
- * @param - path - the path to navigate to (can be a number[1/-1] to go forward/back)
1813
+ * @param - `path` - the path to navigate to to go forward or back. The path value can
1814
+ * be a number; for example, `1`, `-1`.
1815
+ *
1349
1816
  * @example
1350
1817
  * ```js
1351
1818
  * appEmbed.navigateToPage(-1)
@@ -1354,7 +1821,7 @@ var HostEvent;
1354
1821
  */
1355
1822
  HostEvent["Navigate"] = "Navigate";
1356
1823
  /**
1357
- * Opens the filter panel for a particular column.
1824
+ * Open the filter panel for a particular column.
1358
1825
  * Works with Search and Liveboard embed.
1359
1826
  *
1360
1827
  * @param - { columnId: string,
@@ -1372,7 +1839,7 @@ var HostEvent;
1372
1839
  */
1373
1840
  HostEvent["OpenFilter"] = "openFilter";
1374
1841
  /**
1375
- * Adds columns to the current search query.
1842
+ * Add columns to the current search query.
1376
1843
  *
1377
1844
  * @param - { columnIds: string[] }
1378
1845
  * @example
@@ -1383,7 +1850,7 @@ var HostEvent;
1383
1850
  */
1384
1851
  HostEvent["AddColumns"] = "addColumns";
1385
1852
  /**
1386
- * Removes a column from the current search query.
1853
+ * Remove a column from the current search query.
1387
1854
  *
1388
1855
  * @param - { columnId: string }
1389
1856
  * @example
@@ -1394,27 +1861,29 @@ var HostEvent;
1394
1861
  */
1395
1862
  HostEvent["RemoveColumn"] = "removeColumn";
1396
1863
  /**
1397
- * Gets the current Liveboard content.
1864
+ * Get the transient state of a Liveboard as encoded content.
1865
+ * This includes unsaved and ad hoc changes such as
1866
+ * Liveboard filters, runtime filters applied on visualizations on a
1867
+ * Liveboard, and Liveboard layout, changes to visualizations such as
1868
+ * sorting, toggling of legends, and data drill down.
1398
1869
  *
1399
1870
  * @example
1400
1871
  * ```js
1401
- * liveboardEmbed.trigger(HostEvent.getExportRequestForCurrentPinboard)
1872
+ * liveboardEmbed.trigger(HostEvent.getexportrequestforcurrentpinboard).then(
1873
+ * data=>console.log(data))
1402
1874
  * ```
1403
1875
  * @version SDK: 1.13.0 | ThoughtSpot: 8.5.0.cl, 8.8.1.sw
1404
1876
  */
1405
1877
  HostEvent["getExportRequestForCurrentPinboard"] = "getExportRequestForCurrentPinboard";
1406
1878
  /**
1407
- * Triggers the **Pin** action on an embedded object
1879
+ * Trigger the **Pin** action on an embedded object
1408
1880
  *
1409
1881
  * @param - Liveboard embed takes the `vizId` as a
1410
- * key. Can be left undefined when embedding Search, full app or
1882
+ * key. Can be left undefined when embedding Search, full app, or
1411
1883
  * a visualization.
1412
1884
  * @example
1413
1885
  * ```js
1414
- * liveboardEmbed.trigger(HostEvent.Pin, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1415
- * ```
1416
- * ```js
1417
- * vizEmbed.trigger(HostEvent.Pin)
1886
+ * appEmbed.trigger(HostEvent.Pin)
1418
1887
  * ```
1419
1888
  * ```js
1420
1889
  * searchEmbed.trigger(HostEvent.Pin)
@@ -1423,17 +1892,18 @@ var HostEvent;
1423
1892
  */
1424
1893
  HostEvent["Pin"] = "pin";
1425
1894
  /**
1426
- * Triggers the **Show Liveboard details** action on a Liveboard
1895
+ * Trigger the **Show Liveboard details** action
1896
+ * on an embedded Liveboard.
1427
1897
  *
1428
1898
  * @example
1429
- * ```js
1430
- * liveboardEmbed.trigger(HostEvent.LiveboardInfo)
1431
- * ```
1899
+ *```js
1900
+ * liveboardEmbed.trigger(HostEvent.LiveboardInfo)
1901
+ *```
1432
1902
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1433
1903
  */
1434
1904
  HostEvent["LiveboardInfo"] = "pinboardInfo";
1435
1905
  /**
1436
- * Triggers the **Schedule** action on a Liveboard
1906
+ * Trigger the **Schedule** action on an embedded Liveboard.
1437
1907
  *
1438
1908
  * @example
1439
1909
  * ```js
@@ -1443,7 +1913,7 @@ var HostEvent;
1443
1913
  */
1444
1914
  HostEvent["Schedule"] = "subscription";
1445
1915
  /**
1446
- * Triggers the **Manage schedule** action on a Liveboard
1916
+ * Trigger the **Manage schedule** action on an embedded Liveboard
1447
1917
  *
1448
1918
  * @example
1449
1919
  * ```js
@@ -1453,7 +1923,7 @@ var HostEvent;
1453
1923
  */
1454
1924
  HostEvent["SchedulesList"] = "schedule-list";
1455
1925
  /**
1456
- * Triggers the **Export TML** action on a Liveboard
1926
+ * Trigger the **Export TML** action on an embedded Liveboard.
1457
1927
  *
1458
1928
  * @example
1459
1929
  * ```js
@@ -1463,7 +1933,7 @@ var HostEvent;
1463
1933
  */
1464
1934
  HostEvent["ExportTML"] = "exportTSL";
1465
1935
  /**
1466
- * Triggers the **Edit TML** action on a Liveboard
1936
+ * Trigger the **Edit TML** action on an embedded Liveboard.
1467
1937
  *
1468
1938
  * @example
1469
1939
  * ```js
@@ -1473,7 +1943,7 @@ var HostEvent;
1473
1943
  */
1474
1944
  HostEvent["EditTML"] = "editTSL";
1475
1945
  /**
1476
- * Triggers the **Update TML** action on a Liveboard
1946
+ * Trigger the **Update TML** action on an embedded Liveboard.
1477
1947
  *
1478
1948
  * @example
1479
1949
  * ```js
@@ -1483,7 +1953,7 @@ var HostEvent;
1483
1953
  */
1484
1954
  HostEvent["UpdateTML"] = "updateTSL";
1485
1955
  /**
1486
- * Triggers the **Download PDF** action on a Liveboard
1956
+ * Trigger the **Download PDF** action on an embedded Liveboard.
1487
1957
  *
1488
1958
  * @example
1489
1959
  * ```js
@@ -1493,8 +1963,8 @@ var HostEvent;
1493
1963
  */
1494
1964
  HostEvent["DownloadAsPdf"] = "downloadAsPdf";
1495
1965
  /**
1496
- * Triggers the **Make a copy** action on a Liveboard, Search, or
1497
- * visualization page
1966
+ * Trigger the **Make a copy** action on a Liveboard, Search, or
1967
+ * visualization page.
1498
1968
  *
1499
1969
  * @example
1500
1970
  * ```js
@@ -1510,7 +1980,7 @@ var HostEvent;
1510
1980
  */
1511
1981
  HostEvent["MakeACopy"] = "makeACopy";
1512
1982
  /**
1513
- * Triggers the **Delete** action on a Liveboard
1983
+ * Trigger the **Delete** action for a Liveboard.
1514
1984
  *
1515
1985
  * @example
1516
1986
  * ```js
@@ -1520,7 +1990,7 @@ var HostEvent;
1520
1990
  */
1521
1991
  HostEvent["Remove"] = "delete";
1522
1992
  /**
1523
- * Triggers the **Explore* action on a visualization
1993
+ * Trigger the **Explore** action on a visualization.
1524
1994
  *
1525
1995
  * @param - an object with `vizId` as a key
1526
1996
  * @example
@@ -1531,7 +2001,7 @@ var HostEvent;
1531
2001
  */
1532
2002
  HostEvent["Explore"] = "explore";
1533
2003
  /**
1534
- * Triggers the **Create alert** action on a visualization
2004
+ * Trigger the **Create alert** action on a visualization
1535
2005
  *
1536
2006
  * @param - an object with `vizId` as a key
1537
2007
  * @example
@@ -1544,7 +2014,7 @@ var HostEvent;
1544
2014
  */
1545
2015
  HostEvent["CreateMonitor"] = "createMonitor";
1546
2016
  /**
1547
- * Triggers the **Manage alerts** action on a visualization
2017
+ * Trigger the **Manage alerts** action on a visualization
1548
2018
  *
1549
2019
  * @param - an object with `vizId` as a key
1550
2020
  * @example
@@ -1557,7 +2027,7 @@ var HostEvent;
1557
2027
  */
1558
2028
  HostEvent["ManageMonitor"] = "manageMonitor";
1559
2029
  /**
1560
- * Triggers the **Edit** action on a Liveboard or visualization
2030
+ * Trigger the **Edit** action on a Liveboard or visualization
1561
2031
  *
1562
2032
  * @param - object - To trigger the action for a specific visualization
1563
2033
  * in Liveboard embed, pass in `vizId` as a key.
@@ -1578,7 +2048,7 @@ var HostEvent;
1578
2048
  */
1579
2049
  HostEvent["Edit"] = "edit";
1580
2050
  /**
1581
- * Triggers the **Copy link** action on a Liveboard or visualization
2051
+ * Trigger the **Copy link** action on a Liveboard or visualization
1582
2052
  *
1583
2053
  * @param - object - to trigger the action for a
1584
2054
  * specific visualization in Liveboard embed, pass in `vizId` as a key
@@ -1596,7 +2066,7 @@ var HostEvent;
1596
2066
  */
1597
2067
  HostEvent["CopyLink"] = "embedDocument";
1598
2068
  /**
1599
- * Triggers the **Present** action on a Liveboard or visualization
2069
+ * Trigger the **Present** action on a Liveboard or visualization
1600
2070
  *
1601
2071
  * @param - object - to trigger the action for a specific visualization
1602
2072
  * in Liveboard embed, pass in `vizId` as a key
@@ -1614,7 +2084,7 @@ var HostEvent;
1614
2084
  */
1615
2085
  HostEvent["Present"] = "present";
1616
2086
  /**
1617
- * Gets TML for the current search.
2087
+ * Get TML for the current search.
1618
2088
  *
1619
2089
  * @example
1620
2090
  * ```js
@@ -1629,7 +2099,7 @@ var HostEvent;
1629
2099
  */
1630
2100
  HostEvent["GetTML"] = "getTML";
1631
2101
  /**
1632
- * Triggers the **Show underlying data** action on visualization or search
2102
+ * Trigger the **Show underlying data** action on visualization or search
1633
2103
  *
1634
2104
  * @param - an object with vizId as a key
1635
2105
  * @example
@@ -1647,7 +2117,9 @@ var HostEvent;
1647
2117
  */
1648
2118
  HostEvent["ShowUnderlyingData"] = "showUnderlyingData";
1649
2119
  /**
1650
- * Triggers the **Delete** action on visualization or search
2120
+ * Trigger the **Delete** action for a visualization
2121
+ * in an embedded Liveboard, or a chart or table
2122
+ * generated from Search.
1651
2123
  *
1652
2124
  * @param - Liveboard embed takes an object with `vizId` as a key.
1653
2125
  * Can be left empty if embedding Search or visualization.
@@ -1657,16 +2129,13 @@ var HostEvent;
1657
2129
  * '730496d6-6903-4601-937e-2c691821af3c'})
1658
2130
  * ```
1659
2131
  * ```js
1660
- * vizEmbed.trigger(HostEvent.Delete)
1661
- * ```
1662
- * ```js
1663
2132
  * searchEmbed.trigger(HostEvent.Delete)
1664
2133
  * ```
1665
2134
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
1666
2135
  */
1667
2136
  HostEvent["Delete"] = "onDeleteAnswer";
1668
2137
  /**
1669
- * Triggers the **SpotIQ analyze** action on visualization
2138
+ * Trigger the **SpotIQ analyze** action on visualization
1670
2139
  * or search.
1671
2140
  *
1672
2141
  * @param - Liveboard embed takes `vizId` as a
@@ -1687,7 +2156,7 @@ var HostEvent;
1687
2156
  */
1688
2157
  HostEvent["SpotIQAnalyze"] = "spotIQAnalyze";
1689
2158
  /**
1690
- * Triggers the **Download** action on charts in
2159
+ * Trigger the **Download** action on charts in
1691
2160
  * the embedded view.
1692
2161
  *
1693
2162
  * @example
@@ -1696,17 +2165,15 @@ var HostEvent;
1696
2165
  * '730496d6-6903-4601-937e-2c691821af3c'})
1697
2166
  * ```
1698
2167
  * ```js
1699
- * vizEmbed.trigger(HostEvent.Download)
2168
+ * embed.trigger(HostEvent.Download)
1700
2169
  * ```
1701
- * ```js
1702
- * searchEmbed.trigger(HostEvent.Download)
1703
- * ```
1704
- * @deprecated from SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl ,9.4.1.sw ,Use {@link DownloadAsPng}
2170
+ * @deprecated from SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl ,9.4.1.sw
2171
+ * Use {@link DownloadAsPng}
1705
2172
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
1706
2173
  */
1707
2174
  HostEvent["Download"] = "downloadAsPng";
1708
2175
  /**
1709
- * Triggers the **Download** > **PNG** action on
2176
+ * Trigger the **Download** > **PNG** action on
1710
2177
  * charts in the embedded view.
1711
2178
  *
1712
2179
  * @example
@@ -1722,7 +2189,7 @@ var HostEvent;
1722
2189
  */
1723
2190
  HostEvent["DownloadAsPng"] = "downloadAsPng";
1724
2191
  /**
1725
- * Triggers the **Download** > **CSV** action on tables in
2192
+ * Trigger the **Download** > **CSV** action on tables in
1726
2193
  * the embedded view.
1727
2194
  *
1728
2195
  * @example
@@ -1740,7 +2207,7 @@ var HostEvent;
1740
2207
  */
1741
2208
  HostEvent["DownloadAsCsv"] = "downloadAsCSV";
1742
2209
  /**
1743
- * Triggers the **Download** > **XLSX** action on tables
2210
+ * Trigger the **Download** > **XLSX** action on tables
1744
2211
  * in the embedded view.
1745
2212
  *
1746
2213
  * @example
@@ -1758,7 +2225,7 @@ var HostEvent;
1758
2225
  */
1759
2226
  HostEvent["DownloadAsXlsx"] = "downloadAsXLSX";
1760
2227
  /**
1761
- * Triggers the **Share** action on an embedded
2228
+ * Trigger the **Share** action on an embedded
1762
2229
  * Liveboard or Answer.
1763
2230
  *
1764
2231
  * @example
@@ -1772,7 +2239,7 @@ var HostEvent;
1772
2239
  */
1773
2240
  HostEvent["Share"] = "share";
1774
2241
  /**
1775
- * Triggers the **Save** action on a Liveboard or Answer.
2242
+ * Trigger the **Save** action on a Liveboard or Answer.
1776
2243
  * Saves the changes.
1777
2244
  *
1778
2245
  * @example
@@ -1786,7 +2253,7 @@ var HostEvent;
1786
2253
  */
1787
2254
  HostEvent["Save"] = "save";
1788
2255
  /**
1789
- * Triggers the **Sync to Sheets** action on an embedded visualization or Answer
2256
+ * Trigger the **Sync to Sheets** action on an embedded visualization or Answer
1790
2257
  * Sends data from an Answer or Liveboard visualization to a Google sheet.
1791
2258
  *
1792
2259
  * @param - an object with `vizId` as a key
@@ -1802,7 +2269,7 @@ var HostEvent;
1802
2269
  */
1803
2270
  HostEvent["SyncToSheets"] = "sync-to-sheets";
1804
2271
  /**
1805
- * Triggers the **Sync to Other Apps** action on an embedded visualization or Answer
2272
+ * Trigger the **Sync to Other Apps** action on an embedded visualization or Answer
1806
2273
  * Sends data from an Answer or Liveboard visualization to third-party apps such
1807
2274
  * as Slack, Salesforce, Microsoft Teams, ServiceNow and so on.
1808
2275
  *
@@ -1819,7 +2286,7 @@ var HostEvent;
1819
2286
  */
1820
2287
  HostEvent["SyncToOtherApps"] = "sync-to-other-apps";
1821
2288
  /**
1822
- * Triggers the **Manage pipelines** action on an embedded
2289
+ * Trigger the **Manage pipelines** action on an embedded
1823
2290
  * visualization or Answer.
1824
2291
  * Allows users to manage ThoughtSpot Sync pipelines.
1825
2292
  *
@@ -1836,18 +2303,21 @@ var HostEvent;
1836
2303
  */
1837
2304
  HostEvent["ManagePipelines"] = "manage-pipeline";
1838
2305
  /**
1839
- * Triggers the Reset search on the Search page
2306
+ * Reset search operation on the Search or Answer page.
1840
2307
  *
1841
2308
  * @example
1842
2309
  * ```js
1843
2310
  * searchEmbed.trigger(HostEvent.ResetSearch)
1844
2311
  * ```
2312
+ * ```js
2313
+ * appEmbed.trigger(HostEvent.ResetSearch)
2314
+ * ```
1845
2315
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.0.1.sw
1846
2316
  */
1847
2317
  HostEvent["ResetSearch"] = "resetSearch";
1848
2318
  /**
1849
2319
  * @hidden
1850
- * Gets the currents visible and runtime filters applied on a Liveboard
2320
+ * Get the currents visible and runtime filters applied on a Liveboard
1851
2321
  * @example
1852
2322
  * liveboardEmbed.trigger(HostEvent.GetFilters)
1853
2323
  * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
@@ -1855,7 +2325,7 @@ var HostEvent;
1855
2325
  HostEvent["GetFilters"] = "getFilters";
1856
2326
  /**
1857
2327
  * @hidden
1858
- * Updates the visible filters on the Liveboard.
2328
+ * Update the visible filters on the Liveboard.
1859
2329
  * @param - filter: filter object containing column name and filter operation and values
1860
2330
  * @example
1861
2331
  *
@@ -1868,7 +2338,7 @@ var HostEvent;
1868
2338
  */
1869
2339
  HostEvent["UpdateFilters"] = "updateFilters";
1870
2340
  /**
1871
- * Get Tab for the current Liveboard.
2341
+ * Get tab details for the current Liveboard.
1872
2342
  *
1873
2343
  * @example
1874
2344
  * ```js
@@ -1882,9 +2352,9 @@ var HostEvent;
1882
2352
  */
1883
2353
  HostEvent["GetTabs"] = "getTabs";
1884
2354
  /**
1885
- * Set the visible Tabs on a Liveboard.
2355
+ * Set the visible tabs on a Liveboard.
1886
2356
  *
1887
- * @param - an array of ids of Tabs to show, the ids not passed
2357
+ * @param - an array of ids of tabs to show, the IDs not passed
1888
2358
  * will be hidden.
1889
2359
  * @example
1890
2360
  * ```js
@@ -1898,8 +2368,8 @@ var HostEvent;
1898
2368
  /**
1899
2369
  * Set the hidden tabs on a Liveboard.
1900
2370
  *
1901
- * @param - an array of ids of Tabs to hide, the ids not passed
1902
- * will be shown.
2371
+ * @param - an array of the IDs of the tabs to hide.
2372
+ * The IDs not passed will be shown.
1903
2373
  * @example
1904
2374
  * ```js
1905
2375
  * liveboardEmbed.trigger(HostEvent.SetHiddenTabs, [
@@ -1910,9 +2380,12 @@ var HostEvent;
1910
2380
  */
1911
2381
  HostEvent["SetHiddenTabs"] = "SetPinboardHiddenTabs";
1912
2382
  /**
1913
- * Updates the search query for sage embed.
2383
+ * Updates the search query string for Natural Language Search operations.
2384
+ *
2385
+ * @param - `queryString`: Text string in Natural Language format
2386
+ *
2387
+ * @param - `executeSearch`: Boolean to execute search and update search query
1914
2388
  *
1915
- * @param - searchOptions: an object queryString and option to execute the query.
1916
2389
  * @example
1917
2390
  * ```js
1918
2391
  * sageEmbed.trigger(HostEvent.UpdateSageQuery, {
@@ -1920,7 +2393,7 @@ var HostEvent;
1920
2393
  * executeSearch: true,
1921
2394
  * })
1922
2395
  * ```
1923
- * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
2396
+ * @version SDK: 1.26.0 | Thoughtspot: 9.8.0.cl, 9.8.0.sw
1924
2397
  */
1925
2398
  HostEvent["UpdateSageQuery"] = "updateSageQuery";
1926
2399
  /**
@@ -1933,26 +2406,27 @@ var HostEvent;
1933
2406
  * vizId: '123', // For Liveboard Visualization.
1934
2407
  * })
1935
2408
  * ```
2409
+ * @version SDK: 1.26.0 | Thoughtspot: 9.10.0.cl
1936
2410
  */
1937
2411
  HostEvent["GetAnswerSession"] = "getAnswerSession";
1938
2412
  })(HostEvent || (HostEvent = {}));
1939
2413
  /**
1940
2414
  * The different visual modes that the data sources panel within
1941
- * search could appear in, i.e., hidden, collapsed, or expanded.
2415
+ * search could appear in, such as hidden, collapsed, or expanded.
1942
2416
  */
1943
2417
  // eslint-disable-next-line no-shadow
1944
2418
  var DataSourceVisualMode;
1945
2419
  (function (DataSourceVisualMode) {
1946
2420
  /**
1947
- * Data source panel is hidden.
2421
+ * The data source panel is hidden.
1948
2422
  */
1949
2423
  DataSourceVisualMode["Hidden"] = "hide";
1950
2424
  /**
1951
- * Data source panel is collapsed, but the user can manually expand it.
2425
+ * The data source panel is collapsed, but the user can manually expand it.
1952
2426
  */
1953
2427
  DataSourceVisualMode["Collapsed"] = "collapse";
1954
2428
  /**
1955
- * Data source panel is expanded, but the user can manually collapse it.
2429
+ * The data source panel is expanded, but the user can manually collapse it.
1956
2430
  */
1957
2431
  DataSourceVisualMode["Expanded"] = "expand";
1958
2432
  })(DataSourceVisualMode || (DataSourceVisualMode = {}));
@@ -2032,6 +2506,7 @@ var Param;
2032
2506
  Param["IsProductTour"] = "isProductTour";
2033
2507
  Param["HideSearchBarTitle"] = "hideSearchBarTitle";
2034
2508
  Param["HideSageAnswerHeader"] = "hideSageAnswerHeader";
2509
+ Param["HideSearchBar"] = "hideSearchBar";
2035
2510
  })(Param || (Param = {}));
2036
2511
  /**
2037
2512
  * ThoughtSpot application pages include actions and menu commands
@@ -2093,9 +2568,11 @@ var Action;
2093
2568
  Action["SaveAsView"] = "saveAsView";
2094
2569
  /**
2095
2570
  * The **Make a copy** action on a Liveboard or Answer
2096
- * page.
2097
- * Creates a copy of the Liveboard, visualization,
2098
- * or Answer.
2571
+ * page. Creates a copy of the Liveboard.
2572
+ * In LiveboardEmbed, the **Make a copy** action is not available for
2573
+ * visualizations in the embedded Liveboard view.
2574
+ * In AppEmbed, the **Make a copy** action is available on both
2575
+ * Liveboards and visualizations.
2099
2576
  *
2100
2577
  * @example
2101
2578
  * ```js
@@ -2279,7 +2756,7 @@ var Action;
2279
2756
  */
2280
2757
  Action["DownloadAsPdf"] = "downloadAsPdf";
2281
2758
  /**
2282
- * The **Download** > **CSV** menu action for tables on a Liveboard
2759
+ * The **Download** > **CSV** menu action for tables on a Liveboard
2283
2760
  * or Answer page.
2284
2761
  * Downloads a visualization or Answer in the XLSX format.
2285
2762
  *
@@ -2810,6 +3287,7 @@ var Action;
2810
3287
  */
2811
3288
  Action["RenameModalTitleDescription"] = "renameModalTitleDescription";
2812
3289
  /**
3290
+ *
2813
3291
  * @version SDK: 1.25.0 | Thoughtspot: 9.6.0.cl
2814
3292
  */
2815
3293
  Action["RequestVerification"] = "requestVerification";
@@ -5269,6 +5747,9 @@ const validateAuthToken = async (embedConfig, authToken, suppressAlert) => {
5269
5747
  else {
5270
5748
  throw new Error(INVALID_TOKEN_ERR);
5271
5749
  }
5750
+ };
5751
+ const resetCachedAuthToken = () => {
5752
+ cachedAuthToken = null;
5272
5753
  };
5273
5754
 
5274
5755
  let config = {};
@@ -5493,8 +5974,7 @@ var OperationType;
5493
5974
  * const data = await underlying.fetchData(0, 100);
5494
5975
  * })
5495
5976
  * ```
5496
- * @version
5497
- * ThoughtSpot: 9.9.0.cl / SDK: 1.25.0
5977
+ * @version SDK: 1.25.0| ThoughtSpot: 9.10.0.cl
5498
5978
  * @group Events
5499
5979
  */
5500
5980
  class AnswerService {
@@ -5563,8 +6043,7 @@ class AnswerService {
5563
6043
  * const data = await underlying.fetchData(0, 100);
5564
6044
  * })
5565
6045
  * ```
5566
- * @version
5567
- * ThoughtSpot: 9.9.0.cl / SDK: 1.25.0
6046
+ * @version SDK: 1.25.0| ThoughtSpot: 9.10.0.cl
5568
6047
  */
5569
6048
  async getUnderlyingDataForPoint(outputColumnNames, selectedPoints) {
5570
6049
  if (!selectedPoints && !this.selectedPoints) {
@@ -12250,8 +12729,8 @@ var AuthStatus;
12250
12729
  */
12251
12730
  AuthStatus["LOGOUT"] = "LOGOUT";
12252
12731
  /**
12253
- * Emitted when inPopup: true in the SAMLRedirect flow.
12254
- * And, we are waiting for popup to be triggered either programatically
12732
+ * Emitted when inPopup is true in the SAMLRedirect flow and the
12733
+ * popup is waiting to be triggered either programmatically
12255
12734
  * or by the trigger button.
12256
12735
  *
12257
12736
  * @version SDK: 1.19.0
@@ -12266,8 +12745,8 @@ var AuthStatus;
12266
12745
  var AuthEvent;
12267
12746
  (function (AuthEvent) {
12268
12747
  /**
12269
- * Manually trigger the SSO popup. This is useful with
12270
- * authStatus: SAMLRedirect/OIDCRedicre and inPopup: true
12748
+ * Manually trigger the SSO popup. This is useful when
12749
+ * authStatus is SAMLRedirect/OIDCRedirect and inPopup is set to true
12271
12750
  */
12272
12751
  AuthEvent["TRIGGER_SSO_POPUP"] = "TRIGGER_SSO_POPUP";
12273
12752
  })(AuthEvent || (AuthEvent = {}));
@@ -12680,6 +13159,7 @@ function processAuthFailure(e, containerEl) {
12680
13159
  containerEl.innerHTML = loginFailedMessage;
12681
13160
  notifyAuthFailure(AuthFailureType.OTHER);
12682
13161
  }
13162
+ resetCachedAuthToken();
12683
13163
  return e;
12684
13164
  }
12685
13165
  /**
@@ -12691,6 +13171,7 @@ function processAuthLogout(e, containerEl) {
12691
13171
  const { loginFailedMessage } = getEmbedConfig();
12692
13172
  // eslint-disable-next-line no-param-reassign
12693
13173
  containerEl.innerHTML = loginFailedMessage;
13174
+ resetCachedAuthToken();
12694
13175
  disableAutoLogin();
12695
13176
  notifyLogout();
12696
13177
  return e;
@@ -12731,7 +13212,7 @@ const reload = (iFrame) => {
12731
13212
  }, 100);
12732
13213
  };
12733
13214
  /**
12734
- * Post Iframe message.
13215
+ * Post iframe message.
12735
13216
  *
12736
13217
  * @param iFrame
12737
13218
  * @param message
@@ -12776,7 +13257,7 @@ function processTrigger(iFrame, messageType, thoughtSpotHost, data) {
12776
13257
  });
12777
13258
  }
12778
13259
 
12779
- var name="@thoughtspot/visual-embed-sdk";var version="1.26.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",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,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};
13260
+ var name="@thoughtspot/visual-embed-sdk";var version="1.27.0-alpha.0";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports={".":{"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,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};
12780
13261
 
12781
13262
  /**
12782
13263
  * Copyright (c) 2022
@@ -12833,7 +13314,13 @@ class TsEmbed {
12833
13314
  var _a, _b;
12834
13315
  let authToken = '';
12835
13316
  if (this.embedConfig.authType === AuthType.TrustedAuthTokenCookieless) {
12836
- authToken = await getAuthenticationToken(this.embedConfig);
13317
+ try {
13318
+ authToken = await getAuthenticationToken(this.embedConfig);
13319
+ }
13320
+ catch (e) {
13321
+ processAuthFailure(e, this.isPreRendered ? this.preRenderWrapper : this.el);
13322
+ return;
13323
+ }
12837
13324
  }
12838
13325
  this.isAppInitialized = true;
12839
13326
  responder({
@@ -12862,11 +13349,17 @@ class TsEmbed {
12862
13349
  this.updateAuthToken = async (_, responder) => {
12863
13350
  const { autoLogin = false, authType } = this.embedConfig; // Set autoLogin default to false
12864
13351
  if (authType === AuthType.TrustedAuthTokenCookieless) {
12865
- const authToken = await getAuthenticationToken(this.embedConfig);
12866
- responder({
12867
- type: EmbedEvent.AuthExpire,
12868
- data: { authToken },
12869
- });
13352
+ let authToken = '';
13353
+ try {
13354
+ authToken = await getAuthenticationToken(this.embedConfig);
13355
+ responder({
13356
+ type: EmbedEvent.AuthExpire,
13357
+ data: { authToken },
13358
+ });
13359
+ }
13360
+ catch (e) {
13361
+ processAuthFailure(e, this.isPreRendered ? this.preRenderWrapper : this.el);
13362
+ }
12870
13363
  }
12871
13364
  else if (autoLogin) {
12872
13365
  handleAuth();
@@ -13141,7 +13634,11 @@ class TsEmbed {
13141
13634
  const queryParams = this.shouldEncodeUrlQueryParams
13142
13635
  ? `?base64UrlEncodedFlags=${getEncodedQueryParamsString(queryString)}`
13143
13636
  : `?${queryString}`;
13144
- const path = `${this.thoughtSpotHost}/${queryParams}#`;
13637
+ let host = this.thoughtSpotHost;
13638
+ if (!isUndefined(this.embedConfig.enableReactShell)) {
13639
+ host = this.embedConfig.enableReactShell ? '/v2' : '/v1';
13640
+ }
13641
+ const path = `${host}/${queryParams}#`;
13145
13642
  return path;
13146
13643
  }
13147
13644
  getEmbedParams() {
@@ -13156,6 +13653,7 @@ class TsEmbed {
13156
13653
  const iFrame = document.createElement('iframe');
13157
13654
  iFrame.src = frameSrc;
13158
13655
  iFrame.id = TS_EMBED_ID;
13656
+ iFrame.setAttribute('data-ts-iframe', 'true');
13159
13657
  // according to screenfull.js documentation
13160
13658
  // allowFullscreen, webkitallowfullscreen and mozallowfullscreen must be
13161
13659
  // true
@@ -13541,6 +14039,9 @@ class TsEmbed {
13541
14039
  this.isRendered = true;
13542
14040
  return this;
13543
14041
  }
14042
+ getIframeSrc() {
14043
+ return '';
14044
+ }
13544
14045
  handleRenderForPrerender() {
13545
14046
  this.render();
13546
14047
  }
@@ -13868,7 +14369,7 @@ const HiddenActionItemByDefaultForSageEmbed = [
13868
14369
  Action.Share,
13869
14370
  ];
13870
14371
  /**
13871
- * Embed ThoughtSpot LLM and GPT based natural language search component.
14372
+ * Embed ThoughtSpot LLM and GPT-based Natural Language Search component.
13872
14373
  *
13873
14374
  * @version: SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl, 9.5.1-sw
13874
14375
  * @group Embed components
@@ -13987,7 +14488,7 @@ class SearchEmbed extends TsEmbed {
13987
14488
  }
13988
14489
  getEmbedParams() {
13989
14490
  var _a;
13990
- const { hideResults, expandAllDataSource, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, dataPanelV2 = false, useLastSelectedSources = false, runtimeParameters, } = this.viewConfig;
14491
+ const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, hideSearchBar, dataPanelV2 = false, useLastSelectedSources = false, runtimeParameters, } = this.viewConfig;
13991
14492
  const queryParams = this.getBaseQueryParams();
13992
14493
  queryParams[Param.HideActions] = [
13993
14494
  ...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : []),
@@ -14014,6 +14515,9 @@ class SearchEmbed extends TsEmbed {
14014
14515
  if (forceTable) {
14015
14516
  queryParams[Param.ForceTable] = true;
14016
14517
  }
14518
+ if (hideSearchBar) {
14519
+ queryParams[Param.HideSearchBar] = true;
14520
+ }
14017
14521
  queryParams[Param.DataPanelV2Enabled] = dataPanelV2;
14018
14522
  queryParams[Param.DataSourceMode] = this.getDataSourceMode();
14019
14523
  queryParams[Param.UseLastSelectedDataSource] = useLastSelectedSources;
@@ -14042,7 +14546,8 @@ class SearchEmbed extends TsEmbed {
14042
14546
  * @param answerId The GUID of a saved answer
14043
14547
  * @param dataSources A list of data source GUIDs
14044
14548
  */
14045
- getIFrameSrc(answerId) {
14549
+ getIFrameSrc() {
14550
+ const { answerId } = this.viewConfig;
14046
14551
  const answerPath = answerId ? `saved-answer/${answerId}` : 'answer';
14047
14552
  const tsPostHashParams = this.getThoughtSpotPostUrlParams();
14048
14553
  return `${this.getRootIframeSrc()}/embed/${answerPath}${tsPostHashParams}`;
@@ -14053,7 +14558,7 @@ class SearchEmbed extends TsEmbed {
14053
14558
  render() {
14054
14559
  super.render();
14055
14560
  const { answerId } = this.viewConfig;
14056
- const src = this.getIFrameSrc(answerId);
14561
+ const src = this.getIFrameSrc();
14057
14562
  this.renderIFrame(src);
14058
14563
  getAuthPromise().then(() => {
14059
14564
  if (checkReleaseVersionInBeta(getReleaseVersion(), getEmbedConfig().suppressSearchEmbedBetaWarning
@@ -14191,7 +14696,7 @@ class AppEmbed extends V1Embed {
14191
14696
  * @param pageId The ID of the page to be embedded.
14192
14697
  */
14193
14698
  getIFrameSrc() {
14194
- const { pageId, path, modularHomeExperience } = this.viewConfig;
14699
+ const { pageId, path, modularHomeExperience, } = this.viewConfig;
14195
14700
  const pageRoute = this.formatPath(path) || this.getPageRoute(pageId, modularHomeExperience);
14196
14701
  let url = `${this.getRootIframeSrc()}/${pageRoute}`;
14197
14702
  const tsPostHashParams = this.getThoughtSpotPostUrlParams();
@@ -14295,8 +14800,9 @@ class AppEmbed extends V1Embed {
14295
14800
  * @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
14296
14801
  */
14297
14802
  /**
14298
- * Embed a ThoughtSpot Liveboard or a Thoughtspot visualization. When rendered it already
14299
- * waits for the authentication to complete, so no need to wait for AuthStatus.SUCCESS.
14803
+ * Embed a ThoughtSpot Liveboard or visualization. When rendered it already
14804
+ * waits for the authentication to complete, so you need not wait for
14805
+ * `AuthStatus.SUCCESS`.
14300
14806
  *
14301
14807
  * @example
14302
14808
  * ```js
@@ -14402,7 +14908,7 @@ class LiveboardEmbed extends V1Embed {
14402
14908
  }
14403
14909
  /**
14404
14910
  * Construct the URL of the embedded ThoughtSpot Liveboard or visualization
14405
- * to be loaded within the iframe.
14911
+ * to be loaded within the iFrame.
14406
14912
  */
14407
14913
  getIFrameSrc() {
14408
14914
  var _a;