@thoughtspot/visual-embed-sdk 1.36.1 → 1.36.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (203) hide show
  1. package/cjs/package.json +1 -1
  2. package/cjs/src/auth.d.ts.map +1 -1
  3. package/cjs/src/auth.js +2 -1
  4. package/cjs/src/auth.js.map +1 -1
  5. package/cjs/src/authToken.d.ts.map +1 -1
  6. package/cjs/src/authToken.js +10 -3
  7. package/cjs/src/authToken.js.map +1 -1
  8. package/cjs/src/embed/app.d.ts +14 -0
  9. package/cjs/src/embed/app.d.ts.map +1 -1
  10. package/cjs/src/embed/app.js +4 -1
  11. package/cjs/src/embed/app.js.map +1 -1
  12. package/cjs/src/embed/app.spec.js +17 -0
  13. package/cjs/src/embed/app.spec.js.map +1 -1
  14. package/cjs/src/embed/base.d.ts.map +1 -1
  15. package/cjs/src/embed/base.js +2 -2
  16. package/cjs/src/embed/base.js.map +1 -1
  17. package/cjs/src/embed/base.spec.js +24 -0
  18. package/cjs/src/embed/base.spec.js.map +1 -1
  19. package/cjs/src/embed/embedConfig.d.ts +1 -1
  20. package/cjs/src/embed/embedConfig.d.ts.map +1 -1
  21. package/cjs/src/embed/embedConfig.js +5 -4
  22. package/cjs/src/embed/embedConfig.js.map +1 -1
  23. package/cjs/src/embed/liveboard.d.ts +4 -1
  24. package/cjs/src/embed/liveboard.d.ts.map +1 -1
  25. package/cjs/src/embed/liveboard.js.map +1 -1
  26. package/cjs/src/types.d.ts +85 -66
  27. package/cjs/src/types.d.ts.map +1 -1
  28. package/cjs/src/types.js +78 -59
  29. package/cjs/src/types.js.map +1 -1
  30. package/cjs/src/utils/resetServices.d.ts +8 -0
  31. package/cjs/src/utils/resetServices.d.ts.map +1 -0
  32. package/cjs/src/utils/resetServices.js +18 -0
  33. package/cjs/src/utils/resetServices.js.map +1 -0
  34. package/cjs/src/utils/resetServices.spec.d.ts +2 -0
  35. package/cjs/src/utils/resetServices.spec.d.ts.map +1 -0
  36. package/cjs/src/utils/resetServices.spec.js +18 -0
  37. package/cjs/src/utils/resetServices.spec.js.map +1 -0
  38. package/cjs/src/utils/sessionInfoService.d.ts +14 -2
  39. package/cjs/src/utils/sessionInfoService.d.ts.map +1 -1
  40. package/cjs/src/utils/sessionInfoService.js +18 -3
  41. package/cjs/src/utils/sessionInfoService.js.map +1 -1
  42. package/cjs/src/utils.d.ts +12 -0
  43. package/cjs/src/utils.d.ts.map +1 -1
  44. package/cjs/src/utils.js +21 -1
  45. package/cjs/src/utils.js.map +1 -1
  46. package/cjs/src/utils.spec.js +15 -0
  47. package/cjs/src/utils.spec.js.map +1 -1
  48. package/dist/{index-B3hd6DTM.js → index-BJx3m5_V.js} +1 -1
  49. package/dist/src/auth.d.ts.map +1 -1
  50. package/dist/src/authToken.d.ts.map +1 -1
  51. package/dist/src/embed/app.d.ts +14 -0
  52. package/dist/src/embed/app.d.ts.map +1 -1
  53. package/dist/src/embed/base.d.ts.map +1 -1
  54. package/dist/src/embed/embedConfig.d.ts +1 -1
  55. package/dist/src/embed/embedConfig.d.ts.map +1 -1
  56. package/dist/src/embed/liveboard.d.ts +4 -1
  57. package/dist/src/embed/liveboard.d.ts.map +1 -1
  58. package/dist/src/types.d.ts +85 -66
  59. package/dist/src/types.d.ts.map +1 -1
  60. package/dist/src/utils/resetServices.d.ts +8 -0
  61. package/dist/src/utils/resetServices.d.ts.map +1 -0
  62. package/dist/src/utils/resetServices.spec.d.ts +2 -0
  63. package/dist/src/utils/resetServices.spec.d.ts.map +1 -0
  64. package/dist/src/utils/sessionInfoService.d.ts +14 -2
  65. package/dist/src/utils/sessionInfoService.d.ts.map +1 -1
  66. package/dist/src/utils.d.ts +12 -0
  67. package/dist/src/utils.d.ts.map +1 -1
  68. package/dist/tsembed-react.es.js +117 -70
  69. package/dist/tsembed-react.js +116 -69
  70. package/dist/tsembed.es.js +160 -75
  71. package/dist/tsembed.js +159 -74
  72. package/dist/visual-embed-sdk-react-full.d.ts +118 -70
  73. package/dist/visual-embed-sdk-react.d.ts +118 -70
  74. package/dist/visual-embed-sdk.d.ts +118 -70
  75. package/lib/package.json +1 -1
  76. package/lib/src/auth.d.ts.map +1 -1
  77. package/lib/src/auth.js +3 -2
  78. package/lib/src/auth.js.map +1 -1
  79. package/lib/src/authToken.d.ts.map +1 -1
  80. package/lib/src/authToken.js +10 -3
  81. package/lib/src/authToken.js.map +1 -1
  82. package/lib/src/embed/app.d.ts +14 -0
  83. package/lib/src/embed/app.d.ts.map +1 -1
  84. package/lib/src/embed/app.js +4 -1
  85. package/lib/src/embed/app.js.map +1 -1
  86. package/lib/src/embed/app.spec.js +17 -0
  87. package/lib/src/embed/app.spec.js.map +1 -1
  88. package/lib/src/embed/base.d.ts.map +1 -1
  89. package/lib/src/embed/base.js +2 -2
  90. package/lib/src/embed/base.js.map +1 -1
  91. package/lib/src/embed/base.spec.js +24 -0
  92. package/lib/src/embed/base.spec.js.map +1 -1
  93. package/lib/src/embed/embedConfig.d.ts +1 -1
  94. package/lib/src/embed/embedConfig.d.ts.map +1 -1
  95. package/lib/src/embed/embedConfig.js +5 -4
  96. package/lib/src/embed/embedConfig.js.map +1 -1
  97. package/lib/src/embed/liveboard.d.ts +4 -1
  98. package/lib/src/embed/liveboard.d.ts.map +1 -1
  99. package/lib/src/embed/liveboard.js.map +1 -1
  100. package/lib/src/types.d.ts +85 -66
  101. package/lib/src/types.d.ts.map +1 -1
  102. package/lib/src/types.js +78 -59
  103. package/lib/src/types.js.map +1 -1
  104. package/lib/src/utils/resetServices.d.ts +8 -0
  105. package/lib/src/utils/resetServices.d.ts.map +1 -0
  106. package/lib/src/utils/resetServices.js +14 -0
  107. package/lib/src/utils/resetServices.js.map +1 -0
  108. package/lib/src/utils/resetServices.spec.d.ts +2 -0
  109. package/lib/src/utils/resetServices.spec.d.ts.map +1 -0
  110. package/lib/src/utils/resetServices.spec.js +15 -0
  111. package/lib/src/utils/resetServices.spec.js.map +1 -0
  112. package/lib/src/utils/sessionInfoService.d.ts +14 -2
  113. package/lib/src/utils/sessionInfoService.d.ts.map +1 -1
  114. package/lib/src/utils/sessionInfoService.js +16 -2
  115. package/lib/src/utils/sessionInfoService.js.map +1 -1
  116. package/lib/src/utils.d.ts +12 -0
  117. package/lib/src/utils.d.ts.map +1 -1
  118. package/lib/src/utils.js +18 -0
  119. package/lib/src/utils.js.map +1 -1
  120. package/lib/src/utils.spec.js +16 -1
  121. package/lib/src/utils.spec.js.map +1 -1
  122. package/lib/src/visual-embed-sdk.d.ts +118 -70
  123. package/package.json +1 -1
  124. package/src/auth.ts +3 -2
  125. package/src/authToken.ts +11 -3
  126. package/src/embed/app.spec.ts +27 -0
  127. package/src/embed/app.ts +19 -0
  128. package/src/embed/base.spec.ts +26 -0
  129. package/src/embed/base.ts +2 -2
  130. package/src/embed/embedConfig.ts +5 -4
  131. package/src/embed/liveboard.ts +4 -1
  132. package/src/types.ts +89 -70
  133. package/src/utils/resetServices.spec.ts +15 -0
  134. package/src/utils/resetServices.ts +14 -0
  135. package/src/utils/sessionInfoService.ts +17 -2
  136. package/src/utils.spec.ts +21 -0
  137. package/src/utils.ts +21 -0
  138. package/cjs/src/embed/searchEmbed-basic-auth.spec.d.ts +0 -2
  139. package/cjs/src/embed/searchEmbed-basic-auth.spec.d.ts.map +0 -1
  140. package/cjs/src/embed/searchEmbed-basic-auth.spec.js +0 -104
  141. package/cjs/src/embed/searchEmbed-basic-auth.spec.js.map +0 -1
  142. package/cjs/src/hostEventsTypeMapping.d.ts +0 -2
  143. package/cjs/src/hostEventsTypeMapping.d.ts.map +0 -1
  144. package/cjs/src/hostEventsTypeMapping.js +0 -4
  145. package/cjs/src/hostEventsTypeMapping.js.map +0 -1
  146. package/cjs/src/utils/embedApi/contracts.d.ts +0 -101
  147. package/cjs/src/utils/embedApi/contracts.d.ts.map +0 -1
  148. package/cjs/src/utils/embedApi/contracts.js +0 -17
  149. package/cjs/src/utils/embedApi/contracts.js.map +0 -1
  150. package/cjs/src/utils/embedApi/embedApiClient.d.ts +0 -12
  151. package/cjs/src/utils/embedApi/embedApiClient.d.ts.map +0 -1
  152. package/cjs/src/utils/embedApi/embedApiClient.js +0 -46
  153. package/cjs/src/utils/embedApi/embedApiClient.js.map +0 -1
  154. package/cjs/src/utils/embedApi/processEmbedApi.d.ts +0 -9
  155. package/cjs/src/utils/embedApi/processEmbedApi.d.ts.map +0 -1
  156. package/cjs/src/utils/embedApi/processEmbedApi.js +0 -18
  157. package/cjs/src/utils/embedApi/processEmbedApi.js.map +0 -1
  158. package/dist/index-BBBimG1x.js +0 -7370
  159. package/dist/index-BGnxP5NY.js +0 -7370
  160. package/dist/index-CENLvayL.js +0 -7370
  161. package/dist/index-CR5u7BMC.js +0 -7370
  162. package/dist/index-CbltIawo.js +0 -7370
  163. package/dist/index-CoQfqaHj.js +0 -7370
  164. package/dist/index-CzwzS0P4.js +0 -7370
  165. package/dist/index-D-9WUCUl.js +0 -7370
  166. package/dist/index-DFwi_pV_.js +0 -7370
  167. package/dist/index-DOIjN0N_.js +0 -7370
  168. package/dist/index-DYBx8SuE.js +0 -7370
  169. package/dist/index-DaLHJaLd.js +0 -7370
  170. package/dist/index-DnJX-gN2.js +0 -7370
  171. package/dist/index-IDmSUe93.js +0 -7370
  172. package/dist/index-nWevLycs.js +0 -7370
  173. package/dist/index-vxW97_xb.js +0 -7370
  174. package/dist/src/embed/searchEmbed-basic-auth.spec.d.ts +0 -2
  175. package/dist/src/embed/searchEmbed-basic-auth.spec.d.ts.map +0 -1
  176. package/dist/src/hostEventsTypeMapping.d.ts +0 -2
  177. package/dist/src/hostEventsTypeMapping.d.ts.map +0 -1
  178. package/dist/src/utils/embedApi/contracts.d.ts +0 -101
  179. package/dist/src/utils/embedApi/contracts.d.ts.map +0 -1
  180. package/dist/src/utils/embedApi/embedApiClient.d.ts +0 -12
  181. package/dist/src/utils/embedApi/embedApiClient.d.ts.map +0 -1
  182. package/dist/src/utils/embedApi/processEmbedApi.d.ts +0 -9
  183. package/dist/src/utils/embedApi/processEmbedApi.d.ts.map +0 -1
  184. package/lib/src/embed/searchEmbed-basic-auth.spec.d.ts +0 -2
  185. package/lib/src/embed/searchEmbed-basic-auth.spec.d.ts.map +0 -1
  186. package/lib/src/embed/searchEmbed-basic-auth.spec.js +0 -101
  187. package/lib/src/embed/searchEmbed-basic-auth.spec.js.map +0 -1
  188. package/lib/src/hostEventsTypeMapping.d.ts +0 -2
  189. package/lib/src/hostEventsTypeMapping.d.ts.map +0 -1
  190. package/lib/src/hostEventsTypeMapping.js +0 -2
  191. package/lib/src/hostEventsTypeMapping.js.map +0 -1
  192. package/lib/src/utils/embedApi/contracts.d.ts +0 -101
  193. package/lib/src/utils/embedApi/contracts.d.ts.map +0 -1
  194. package/lib/src/utils/embedApi/contracts.js +0 -14
  195. package/lib/src/utils/embedApi/contracts.js.map +0 -1
  196. package/lib/src/utils/embedApi/embedApiClient.d.ts +0 -12
  197. package/lib/src/utils/embedApi/embedApiClient.d.ts.map +0 -1
  198. package/lib/src/utils/embedApi/embedApiClient.js +0 -42
  199. package/lib/src/utils/embedApi/embedApiClient.js.map +0 -1
  200. package/lib/src/utils/embedApi/processEmbedApi.d.ts +0 -9
  201. package/lib/src/utils/embedApi/processEmbedApi.d.ts.map +0 -1
  202. package/lib/src/utils/embedApi/processEmbedApi.js +0 -14
  203. package/lib/src/utils/embedApi/processEmbedApi.js.map +0 -1
@@ -160,6 +160,20 @@ declare module '@thoughtspot/visual-embed-sdk/embed/app' {
160
160
  * ```
161
161
  */
162
162
  disableProfileAndHelp?: boolean;
163
+ /**
164
+ * @version SDK: 1.36.3 | ThoughtSpot: 10.1.0.cl
165
+ * @default true
166
+ * Whether the help menu in the top nav bar should be served
167
+ * from Pendo or ThoughtSpot's internal help items.
168
+ * @example
169
+ * ```js
170
+ * const embed = new AppEmbed('#tsEmbed', {
171
+ * ... // other options
172
+ * enablePendoHelp: false,
173
+ * });
174
+ * ```
175
+ */
176
+ enablePendoHelp?: boolean;
163
177
  /**
164
178
  * Control the visibility of the application switcher button on the nav-bar.
165
179
  * By default, the application switcher is shown.
@@ -947,7 +961,10 @@ declare module '@thoughtspot/visual-embed-sdk/embed/liveboard' {
947
961
  */
948
962
  showPreviewLoader?: boolean;
949
963
  /**
950
- * This flag is used to enable the compact header on a Liveboard
964
+ * Enables or disables the compact header feature on a Liveboard.
965
+ * Compact Liveboard header is turned off by default on Liveboards in
966
+ * ThoughtSpot Embedded apps.
967
+ *
951
968
  * @type {boolean}
952
969
  * @default false
953
970
  * @version SDK: 1.35.0 | ThoughtSpot:10.3.0.cl
@@ -1888,9 +1905,10 @@ declare module '@thoughtspot/visual-embed-sdk/utils/sessionInfoService' {
1888
1905
  */
1889
1906
  export function getPreauthInfo(allowCache?: boolean): Promise<PreauthInfo>;
1890
1907
  /**
1891
- * Returns the session info object and caches it for future use.
1908
+ * Returns the cached session info object and caches it for future use.
1892
1909
  * Once fetched the session info object is cached and returned from the cache on
1893
1910
  * subsequent calls.
1911
+ * This cache is cleared when inti is called OR resetCachedSessionInfo is called.
1894
1912
  * @example ```js
1895
1913
  * const sessionInfo = await getSessionInfo();
1896
1914
  * console.log(sessionInfo);
@@ -1933,10 +1951,21 @@ declare module '@thoughtspot/visual-embed-sdk/utils/sessionInfoService' {
1933
1951
  * const sessionInfo = await getSessionInfo();
1934
1952
  * console.log(sessionInfo);
1935
1953
  * ```
1936
- * @version SDK: 1.28.3 | ThoughtSpot ts7.april.cl, 7.2.1
1954
+ * @version SDK: 1.28.3 | ThoughtSpot: *
1937
1955
  * @returns {void}
1938
1956
  */
1939
1957
  export function resetCachedSessionInfo(): void;
1958
+ /**
1959
+ * Resets the cached preauth info object and forces a new fetch on the next call.
1960
+ * @example ```js
1961
+ * resetCachedPreauthInfo();
1962
+ * const preauthInfo = await getPreauthInfo();
1963
+ * console.log(preauthInfo);
1964
+ * ```
1965
+ * @version SDK: 1.28.3 | ThoughtSpot: *
1966
+ * @returns {void}
1967
+ */
1968
+ export function resetCachedPreauthInfo(): void;
1940
1969
  }
1941
1970
 
1942
1971
  declare module '@thoughtspot/visual-embed-sdk/types' {
@@ -2152,9 +2181,9 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
2152
2181
  export interface customCssInterface {
2153
2182
  /**
2154
2183
  * The custom css variables, which can be set.
2155
- * The allowed list is in the CustomCssVariables
2184
+ * The variables are available in the {@link CustomCssVariables}
2156
2185
  * interface. For more information, see
2157
- * link:https://developers.thoughtspot.com/docs/css-variables-reference
2186
+ * link:https://developers.thoughtspot.com/docs/css-variables-reference[CSS variable reference].
2158
2187
  */
2159
2188
  variables?: CustomCssVariables;
2160
2189
  /**
@@ -2681,7 +2710,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
2681
2710
  */
2682
2711
  showAlerts?: boolean;
2683
2712
  /**
2684
- * The list of runtime filters to apply to a search answer,
2713
+ * The list of runtime filters to apply to a search Answer,
2685
2714
  * visualization, or Liveboard.
2686
2715
  * @version SDK: 1.9.4 | ThoughtSpot 8.1.0.cl, 8.4.1.sw
2687
2716
  * @example
@@ -2700,7 +2729,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
2700
2729
  */
2701
2730
  runtimeFilters?: RuntimeFilter[];
2702
2731
  /**
2703
- * The list of parameter override to apply to a search answer,
2732
+ * The list of parameter override to apply to a search Answer,
2704
2733
  * visualization, or Liveboard.
2705
2734
  * @version SDK : 1.25.0 | ThoughtSpot: 9.2.0.cl, 9.5.0.sw
2706
2735
  * @example
@@ -2718,7 +2747,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
2718
2747
  */
2719
2748
  runtimeParameters?: RuntimeParameter[];
2720
2749
  /**
2721
- * The locale/language to use for the embedded view.
2750
+ * The locale settings to apply to the embedded view.
2722
2751
  * @version SDK: 1.9.4 | ThoughtSpot 8.1.0.cl, 8.4.1.sw
2723
2752
  * @example
2724
2753
  * ```js
@@ -2785,7 +2814,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
2785
2814
  */
2786
2815
  contextMenuTrigger?: ContextMenuTriggerOptions;
2787
2816
  /**
2788
- * Flag to override openNew tab context menu link
2817
+ * Flag to override the *Open Link in New Tab* context menu option.
2789
2818
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
2790
2819
  * @example
2791
2820
  * ```js
@@ -2924,7 +2953,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
2924
2953
  */
2925
2954
  preRenderId?: string;
2926
2955
  /**
2927
- * Determines whether the PreRender component should not dynamically track the size
2956
+ * Determines if the PreRender component should dynamically track the size
2928
2957
  * of its embedding element and adjust its own size accordingly.
2929
2958
  * Enabling this option allows the PreRender component to automatically adapt
2930
2959
  * its dimensions based on changes to the size of the embedding element.
@@ -3296,8 +3325,8 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
3296
3325
  */
3297
3326
  Load = "load",
3298
3327
  /**
3299
- * Data pertaining to answer or Liveboard is received
3300
- * @return data - The answer or Liveboard data
3328
+ * Data pertaining to an Answer or Liveboard is received
3329
+ * @return data - The Answer or Liveboard data
3301
3330
  * @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
3302
3331
  * @example
3303
3332
  *```js
@@ -3471,7 +3500,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
3471
3500
  */
3472
3501
  Alert = "alert",
3473
3502
  /**
3474
- * The ThoughtSpot auth session has expired.
3503
+ * The ThoughtSpot authentication session has expired.
3475
3504
  * @version SDK: 1.4.0 | ThoughtSpot: ts7.sep.cl, 8.4.1.sw
3476
3505
  * @example
3477
3506
  *```js
@@ -3541,7 +3570,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
3541
3570
  /**
3542
3571
  * Emitted when the embed does not have cookie access. This happens
3543
3572
  * when Safari and other Web browsers block third-party cookies
3544
- * are blocked by default. `NoCookieAccess` can trigger
3573
+ * are blocked by default. `NoCookieAccess` can trigger.
3545
3574
  * @example
3546
3575
  *```js
3547
3576
  * appEmbed.on(EmbedEvent.NoCookieAccess)
@@ -3629,7 +3658,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
3629
3658
  */
3630
3659
  Save = "save",
3631
3660
  /**
3632
- * Emitted when the download action is triggered on an answer
3661
+ * Emitted when the download action is triggered on an Answer.
3633
3662
  *
3634
3663
  * **Note**: This event is deprecated in v1.21.0.
3635
3664
  * To fire an event when a download action is initiated on a chart or table,
@@ -3645,7 +3674,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
3645
3674
  */
3646
3675
  Download = "download",
3647
3676
  /**
3648
- * Emitted when the download action is triggered on an answer
3677
+ * Emitted when the download action is triggered on an Answer.
3649
3678
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.0.sw
3650
3679
  * @example
3651
3680
  *```js
@@ -3659,7 +3688,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
3659
3688
  */
3660
3689
  DownloadAsPng = "downloadAsPng",
3661
3690
  /**
3662
- * Emitted when the Download as PDF action is triggered on an answer
3691
+ * Emitted when the Download as PDF action is triggered on an Answer
3663
3692
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
3664
3693
  * @example
3665
3694
  *```js
@@ -3673,7 +3702,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
3673
3702
  */
3674
3703
  DownloadAsPdf = "downloadAsPdf",
3675
3704
  /**
3676
- * Emitted when the Download as CSV action is triggered on an answer
3705
+ * Emitted when the Download as CSV action is triggered on an Answer.
3677
3706
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
3678
3707
  * @example
3679
3708
  *```js
@@ -3687,7 +3716,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
3687
3716
  */
3688
3717
  DownloadAsCsv = "downloadAsCsv",
3689
3718
  /**
3690
- * Emitted when the Download as XLSX action is triggered on an answer
3719
+ * Emitted when the Download as XLSX action is triggered on an Answer.
3691
3720
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
3692
3721
  * @example
3693
3722
  *```js
@@ -3715,7 +3744,8 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
3715
3744
  */
3716
3745
  AnswerDelete = "answerDelete",
3717
3746
  /**
3718
- * Emitted when an answer is pinned to a Liveboard
3747
+ * Emitted when a user initiates the Pin action to
3748
+ * add an Answer to a Liveboard.
3719
3749
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
3720
3750
  * @example
3721
3751
  *```js
@@ -3853,7 +3883,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
3853
3883
  */
3854
3884
  SaveAsView = "saveAsView",
3855
3885
  /**
3856
- * Emitted when the user creates a copy of an Answer
3886
+ * Emitted when the user creates a copy of an Answer.
3857
3887
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
3858
3888
  * @example
3859
3889
  *```js
@@ -3867,7 +3897,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
3867
3897
  */
3868
3898
  CopyAEdit = "copyAEdit",
3869
3899
  /**
3870
- * Emitted when a user clicks Show underlying data on an Answer
3900
+ * Emitted when a user clicks *Show underlying data* on an Answer.
3871
3901
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
3872
3902
  * @example
3873
3903
  *```js
@@ -3878,7 +3908,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
3878
3908
  */
3879
3909
  ShowUnderlyingData = "showUnderlyingData",
3880
3910
  /**
3881
- * Emitted when an answer is switched to a chart or table view.
3911
+ * Emitted when an Answer is switched to a chart or table view.
3882
3912
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
3883
3913
  * @example
3884
3914
  *```js
@@ -4012,11 +4042,12 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
4012
4042
  */
4013
4043
  CopyLink = "embedDocument",
4014
4044
  /**
4015
- * Emitted when a user interacts with cross filters on a visualization or Liveboard
4045
+ * Emitted when a user interacts with cross filters on a
4046
+ * visualization or Liveboard.
4016
4047
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.5.0.sw
4017
4048
  * @example
4018
4049
  *```js
4019
- * liveboardEmbed.trigger(HostEvent.CrossFilterChanged, {
4050
+ * liveboardEmbed.on(EmbedEvent.CrossFilterChanged, {
4020
4051
  * vizId: '730496d6-6903-4601-937e-2c691821af3c'})
4021
4052
  *```
4022
4053
  */
@@ -4110,8 +4141,8 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
4110
4141
  */
4111
4142
  DeletePersonalisedView = "deletePersonalisedView",
4112
4143
  /**
4113
- * Emitted when a user creates a new worksheet
4114
- * @version SDK : 1.27.0 | ThoughtSpot Cloud: 9.8.0.cl
4144
+ * Emitted when a user creates a Worksheet.
4145
+ * @version SDK : 1.27.0 | ThoughtSpot: 9.8.0.cl, 9.8.0.sw
4115
4146
  */
4116
4147
  CreateWorksheet = "createWorksheet",
4117
4148
  /**
@@ -4124,8 +4155,8 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
4124
4155
  */
4125
4156
  AskSageInit = "AskSageInit",
4126
4157
  /**
4127
- * Emitted when a LB/viz is renamed
4128
- * @version SDK : 1.28.0 | ThoughtSpot: 9.10.5.cl
4158
+ * Emitted when a Liveboard or visualization is renamed.
4159
+ * @version SDK : 1.28.0 | ThoughtSpot: 9.10.5.cl, 10.1.0.sw
4129
4160
  */
4130
4161
  Rename = "rename",
4131
4162
  /**
@@ -4189,8 +4220,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
4189
4220
  OnBeforeGetVizDataIntercept = "onBeforeGetVizDataIntercept",
4190
4221
  /**
4191
4222
  * Emitted when parameter changes in an Answer
4192
- * or Liveboard
4193
- *
4223
+ * or Liveboard.
4194
4224
  * ```js
4195
4225
  * liveboardEmbed.on(EmbedEvent.ParameterChanged, (payload) => {
4196
4226
  * console.log('payload', payload);
@@ -4217,7 +4247,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
4217
4247
  */
4218
4248
  TableVizRendered = "TableVizRendered",
4219
4249
  /**
4220
- * Emitted when the liveboard is created from pin modal or liveboard list page.
4250
+ * Emitted when the liveboard is created from pin modal or Liveboard list page.
4221
4251
  * You can use this event as a hook to trigger
4222
4252
  * other events on liveboard creation.
4223
4253
  *
@@ -4360,7 +4390,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
4360
4390
  */
4361
4391
  Filter = "filter",
4362
4392
  /**
4363
- * Reload the answer or visualization
4393
+ * Reload the Answer or visualization
4364
4394
  * @hidden
4365
4395
  */
4366
4396
  Reload = "reload",
@@ -4410,12 +4440,10 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
4410
4440
  * and `AppEmbed` only. In full application embedding, this event updates
4411
4441
  * the runtime filters applied on the Liveboard and saved Answer objects.
4412
4442
  *
4413
- *
4414
- * Pass an array of runtime filters with the following attributes:
4415
- *
4443
+ * @param - Pass an array of {@link RuntimeFilter} with the following attributes:
4416
4444
  * `columnName` - _String_. The name of the column to filter on.
4417
4445
  *
4418
- * `operator` - Runtime filter operator to apply. For more information,
4446
+ * `operator` - {@link RuntimeFilterOp} to apply. For more information,
4419
4447
  * see link:https://developers.thoughtspot.com/docs/?pageid=runtime-filters#rtOperator[Developer Documentation].
4420
4448
  *
4421
4449
  * `values` - List of operands. Some operators such as EQ and LE allow a
@@ -4427,7 +4455,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
4427
4455
  * will be cleared, restoring the original visualization
4428
4456
  * with the updated filters.
4429
4457
  *
4430
- * @param - {@link RuntimeFilter}[] an array of {@link RuntimeFilter} Types.
4458
+
4431
4459
  * @example
4432
4460
  * ```js
4433
4461
  * liveboardEmbed.trigger(HostEvent.UpdateRuntimeFilters, [
@@ -4666,6 +4694,11 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
4666
4694
  * appEmbed.trigger(HostEvent.Remove)
4667
4695
  * ```
4668
4696
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
4697
+ * * @example
4698
+ * ```js
4699
+ * liveboardEmbed.trigger(HostEvent.Remove)
4700
+ * ```
4701
+ * @version SDK: 1.37.0 | ThoughtSpot: 10.8.0.cl, 10.10.0.sw
4669
4702
  */
4670
4703
  Remove = "delete",
4671
4704
  /**
@@ -5076,7 +5109,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
5076
5109
  * ```js
5077
5110
  * liveboardEmbed.trigger(HostEvent.GetTabs).then((tabDetails) => {
5078
5111
  * console.log(
5079
- * tabDetails // TabDetails of current LB
5112
+ * tabDetails // TabDetails of current Liveboard
5080
5113
  * );
5081
5114
  * })
5082
5115
  * ```
@@ -5124,7 +5157,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
5124
5157
  */
5125
5158
  UpdateSageQuery = "updateSageQuery",
5126
5159
  /**
5127
- * Get the answer session for a Search or
5160
+ * Get the Answer session for a Search or
5128
5161
  * Liveboard visualization.
5129
5162
  * @example
5130
5163
  * ```js
@@ -5299,6 +5332,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
5299
5332
  HostAppUrl = "hostAppUrl",
5300
5333
  EnableVizTransformations = "enableVizTransform",
5301
5334
  EnableSearchAssist = "enableSearchAssist",
5335
+ EnablePendoHelp = "enablePendoHelp",
5302
5336
  HideResult = "hideResult",
5303
5337
  UseLastSelectedDataSource = "useLastSelectedSources",
5304
5338
  Tag = "tag",
@@ -5523,9 +5557,10 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
5523
5557
  */
5524
5558
  AddDataPanelObjects = "addDataPanelObjects",
5525
5559
  /**
5526
- * Filter configuration options on a Liveboard page.
5527
- * Allows configuring filters on a
5528
- * Liveboard.
5560
+ * The filter configuration options for a Liveboard.
5561
+ * The configuration options are available when adding
5562
+ * filters on a Liveboard.
5563
+ *
5529
5564
  * @example
5530
5565
  * ```js
5531
5566
  * disabledActions: [Action.ConfigureFilter]
@@ -5623,14 +5658,17 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
5623
5658
  * @hidden
5624
5659
  */
5625
5660
  SpotIQFollow = "spotIQFollow",
5661
+ /**
5662
+ * The Share action for a Liveboard visualization.
5663
+ */
5626
5664
  ShareViz = "shareViz",
5627
5665
  /**
5628
5666
  * @hidden
5629
5667
  */
5630
5668
  ReplaySearch = "replaySearch",
5631
5669
  /**
5632
- * The **Show underlying data** menu action on a visualization or
5633
- * Answer page.
5670
+ * The **Show underlying data** menu action on a
5671
+ * visualization or Answer page.
5634
5672
  * Displays detailed information and raw data
5635
5673
  * for a given visualization.
5636
5674
  * @example
@@ -5640,8 +5678,8 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
5640
5678
  */
5641
5679
  ShowUnderlyingData = "showUnderlyingData",
5642
5680
  /**
5643
- * The **Download** menu action on Liveboard visualizations
5644
- * and Answers.
5681
+ * The **Download** menu action on Liveboard
5682
+ * visualizations and Answers.
5645
5683
  * Allows downloading a visualization or Answer.
5646
5684
  * @example
5647
5685
  * ```js
@@ -5662,11 +5700,10 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
5662
5700
  /**
5663
5701
  *
5664
5702
  *The **Download PDF** action that downloads a Liveboard,
5665
- *visualization, or Answer as a PDF file.
5666
- *
5703
+ * visualization, or Answer as a PDF file.
5667
5704
  *
5668
- ***NOTE**: The **Download** > **PDF** action is available on
5669
- *visualizations and Answers if the data is in tabular format.
5705
+ * **NOTE**: The **Download** > **PDF** option is available for
5706
+ * tables in visualizations and Answers.
5670
5707
  * @example
5671
5708
  * ```js
5672
5709
  * disabledActions: [Action.DownloadAsPdf]
@@ -5698,9 +5735,11 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
5698
5735
  */
5699
5736
  DownloadTrace = "downloadTrace",
5700
5737
  /**
5701
- * The **Export TML** menu action on Liveboard, Answers
5702
- * Worksheets and Data Connections page.
5703
- * Exports an object as a TML file.
5738
+ * The **Export TML** menu action on a Liveboard, Answer, and
5739
+ * the Data Workspace pages for data objects and connections.
5740
+ *
5741
+ * Allows exporting an object as a TML file.
5742
+ *
5704
5743
  * @example
5705
5744
  * ```js
5706
5745
  * disabledActions: [Action.ExportTML]
@@ -5708,7 +5747,8 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
5708
5747
  */
5709
5748
  ExportTML = "exportTSL",
5710
5749
  /**
5711
- * The **Import TML** menu action for Liveboards and Answers.
5750
+ * The **Import TML** menu action on the
5751
+ * *Data Workspace* > *Utilities* page.
5712
5752
  * Imports TML representation of ThoughtSpot objects.
5713
5753
  * @example
5714
5754
  * ```js
@@ -5718,7 +5758,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
5718
5758
  ImportTML = "importTSL",
5719
5759
  /**
5720
5760
  * The **Update TML** menu action for Liveboards and Answers.
5721
- * Update TML representation of ThoughtSpot objects.
5761
+ * Updates TML representation of ThoughtSpot objects.
5722
5762
  * @example
5723
5763
  * ```js
5724
5764
  * disabledActions: [Action.UpdateTML]
@@ -5745,8 +5785,11 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
5745
5785
  */
5746
5786
  Present = "present",
5747
5787
  /**
5748
- * The tile resize options in the visualization menu.
5749
- * Allows switching between different preset layouts.
5788
+ * The visualization tile resize option.
5789
+ * Also available via More `...` options menu on a visualization.
5790
+ * Allows resizing visualization tiles and switching
5791
+ * between different preset layout option.
5792
+ *
5750
5793
  * @example
5751
5794
  * ```js
5752
5795
  * disabledActions: [Action.ToggleSize]
@@ -5772,8 +5815,9 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
5772
5815
  */
5773
5816
  EditTitle = "editTitle",
5774
5817
  /**
5775
- * The **Delete** menu action on Liveboards and visualizations.
5776
- * Deletes a Liveboard or a visualization from a Liveboard.
5818
+ * The **Delete** action on a Liveboard, *Liveboards* and
5819
+ * *Answers* list pages in full application embedding.
5820
+ *
5777
5821
  * @example
5778
5822
  * ```js
5779
5823
  * disabledActions: [Action.Remove]
@@ -5850,8 +5894,9 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
5850
5894
  */
5851
5895
  Explore = "explore",
5852
5896
  /**
5853
- * The action to include data points on a drilled-down Answer
5854
- * or visualization
5897
+ * The contextual menu action to include a specific data point
5898
+ * when drilling down a table or chart on an Answer.
5899
+ *
5855
5900
  * @example
5856
5901
  * ```js
5857
5902
  * disabledActions: [Action.DrillInclude]
@@ -5859,8 +5904,8 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
5859
5904
  */
5860
5905
  DrillInclude = "context-menu-item-include",
5861
5906
  /**
5862
- * The action to exclude data points on a drilled-down Answer
5863
- * or visualization
5907
+ * The contextual menu action to exclude a specific data point
5908
+ * when drilling down a table or chart on an Answer.
5864
5909
  * @example
5865
5910
  * ```js
5866
5911
  * disabledActions: [Action.DrillInclude]
@@ -6007,7 +6052,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
6007
6052
  * Allows users to manage data sync pipelines to third-party apps.
6008
6053
  * @example
6009
6054
  * ```js
6010
- * disabledActions: [Action.SyncToOtherApps]
6055
+ * disabledActions: [Action.ManagePipelines]
6011
6056
  * ```
6012
6057
  * @version SDK: 1.18.0| ThoughtSpot: 8.10.0.cl, 9.0.1.sw
6013
6058
  */
@@ -6326,7 +6371,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
6326
6371
  /**
6327
6372
  * Action ID for the Parent TML action
6328
6373
  * The parent action **TML** must be included to access TML-related options
6329
- * within the cascading menu (specific to the answer page)
6374
+ * within the cascading menu (specific to the Answer page)
6330
6375
  * @example
6331
6376
  * ```js
6332
6377
  * // to include specific TML actions
@@ -6365,8 +6410,10 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
6365
6410
  */
6366
6411
  VerifiedLiveboard = "verifiedLiveboard",
6367
6412
  /**
6368
- * The *Ask Sage* action for Answers and visualizations.
6369
- * Allows initiating a Natural Language Search query.
6413
+ * Action ID for the *Ask Sage* In Natural Language Search embed,
6414
+ * *Spotter* in Liveboard, full app, and Spotter embed.
6415
+ *
6416
+ * Allows initiating a conversation with ThoughtSpot AI analyst.
6370
6417
  *
6371
6418
  * @example
6372
6419
  * ```js
@@ -6562,7 +6609,8 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
6562
6609
  */
6563
6610
  DeletePreviousPrompt = "deletePreviousPrompt",
6564
6611
  /**
6565
- * Action ID for hide/disable edit of tokens on spotter results.
6612
+ * Action ID for hide or disable editing tokens generated from
6613
+ * Spotter results.
6566
6614
  * @example
6567
6615
  * ```js
6568
6616
  * hiddenAction: [Action.EditTokens]
@@ -7463,7 +7511,7 @@ declare module '@thoughtspot/visual-embed-sdk/embed/embedConfig' {
7463
7511
  * @version SDK: 1.27.0 | ThoughtSpot: *
7464
7512
  * @group Global methods
7465
7513
  */
7466
- export const setEmbedConfig: (newConfig: EmbedConfig) => EmbedConfig;
7514
+ export const setEmbedConfig: (newConfig: EmbedConfig) => any;
7467
7515
  }
7468
7516
 
7469
7517
  declare module '@thoughtspot/visual-embed-sdk/mixpanel-service' {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thoughtspot/visual-embed-sdk",
3
- "version": "1.36.1",
3
+ "version": "1.36.3",
4
4
  "description": "ThoughtSpot Embed SDK",
5
5
  "module": "lib/src/index.js",
6
6
  "main": "dist/tsembed.js",
package/src/auth.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import EventEmitter from 'eventemitter3';
2
- import { getAuthenticationToken, resetCachedAuthToken } from './authToken';
2
+ import { getAuthenticationToken } from './authToken';
3
3
  import { getEmbedConfig } from './embed/embedConfig';
4
4
  import { initMixpanel } from './mixpanel-service';
5
5
  import {
@@ -17,6 +17,7 @@ import { isActiveService } from './utils/authService/tokenizedAuthService';
17
17
  import { logger } from './utils/logger';
18
18
  import { getSessionInfo, getPreauthInfo } from './utils/sessionInfoService';
19
19
  import { ERROR_MESSAGE } from './errors';
20
+ import { resetAllCachedServices } from './utils/resetServices';
20
21
 
21
22
  // eslint-disable-next-line import/no-mutable-exports
22
23
  export let loggedInStatus = false;
@@ -470,7 +471,7 @@ export const doOIDCAuth = async (embedConfig: EmbedConfig) => {
470
471
  export const logout = async (embedConfig: EmbedConfig): Promise<boolean> => {
471
472
  const { thoughtSpotHost } = embedConfig;
472
473
  await fetchLogoutService(thoughtSpotHost);
473
- resetCachedAuthToken();
474
+ resetAllCachedServices();
474
475
  const thoughtspotIframes = document.querySelectorAll("[data-ts-iframe='true']");
475
476
  if (thoughtspotIframes?.length) {
476
477
  thoughtspotIframes.forEach((el) => {
package/src/authToken.ts CHANGED
@@ -1,9 +1,15 @@
1
1
  import { ERROR_MESSAGE } from './errors';
2
2
  import { EmbedConfig } from './types';
3
+ import { getValueFromWindow, storeValueInWindow } from './utils';
3
4
  import { fetchAuthTokenService, verifyTokenService } from './utils/authService/authService';
4
5
  import { logger } from './utils/logger';
5
6
 
6
- let cachedAuthToken: string | null = null;
7
+ const cacheAuthTokenKey = 'cachedAuthToken';
8
+
9
+ const getCacheAuthToken = (): string | null => getValueFromWindow(cacheAuthTokenKey);
10
+ const storeAuthTokenInCache = (token: string): void => {
11
+ storeValueInWindow(cacheAuthTokenKey, token);
12
+ };
7
13
 
8
14
  // This method can be used to get the authToken using the embedConfig
9
15
  /**
@@ -11,6 +17,7 @@ let cachedAuthToken: string | null = null;
11
17
  * @param embedConfig
12
18
  */
13
19
  export async function getAuthenticationToken(embedConfig: EmbedConfig): Promise<string> {
20
+ const cachedAuthToken = getCacheAuthToken();
14
21
  // Since we don't have token validation enabled , we cannot tell if the
15
22
  // cached token is valid or not. So we will always fetch a new token.
16
23
  if (cachedAuthToken && !embedConfig.disableTokenVerification) {
@@ -42,7 +49,7 @@ export async function getAuthenticationToken(embedConfig: EmbedConfig): Promise<
42
49
  throw e;
43
50
  }
44
51
 
45
- cachedAuthToken = authToken;
52
+ storeAuthTokenInCache(authToken);
46
53
  return authToken;
47
54
  }
48
55
 
@@ -51,6 +58,7 @@ const validateAuthToken = async (
51
58
  authToken: string,
52
59
  suppressAlert?: boolean,
53
60
  ): Promise<boolean> => {
61
+ const cachedAuthToken = getCacheAuthToken();
54
62
  if (embedConfig.disableTokenVerification) {
55
63
  logger.info('Token verification is disabled. Assuming token is valid.');
56
64
  return true;
@@ -83,5 +91,5 @@ const validateAuthToken = async (
83
91
  * @group Authentication / Init
84
92
  */
85
93
  export const resetCachedAuthToken = (): void => {
86
- cachedAuthToken = null;
94
+ storeAuthTokenInCache(null);
87
95
  };
@@ -509,6 +509,33 @@ describe('App embed tests', () => {
509
509
  });
510
510
  });
511
511
 
512
+ test('Should add enablePendoHelp flag to the iframe src conditional on navbar', async () => {
513
+ const appEmbed = new AppEmbed(getRootEl(), {
514
+ ...defaultViewConfig,
515
+ } as AppViewConfig);
516
+
517
+ appEmbed.render();
518
+ await executeAfterWait(() => {
519
+ expectUrlMatchesWithParams(
520
+ getIFrameSrc(),
521
+ `http://${thoughtSpotHost}/?enablePendoHelp=true&embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=false${defaultParams}${defaultParamsPost}#/home`,
522
+ );
523
+ });
524
+
525
+ const noNavEmbed = new AppEmbed(getRootEl(), {
526
+ ...defaultViewConfig,
527
+ enablePendoHelp: false,
528
+ } as AppViewConfig);
529
+
530
+ noNavEmbed.render();
531
+ await executeAfterWait(() => {
532
+ expectUrlMatchesWithParams(
533
+ getIFrameSrc(),
534
+ `http://${thoughtSpotHost}/?enablePendoHelp=false&embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=false${defaultParams}${defaultParamsPost}#/home`,
535
+ );
536
+ });
537
+ });
538
+
512
539
  test('Should add HomePageSearchBarMode flag with object search to the iframe src', async () => {
513
540
  const appEmbed = new AppEmbed(getRootEl(), {
514
541
  ...defaultViewConfig,