@thoughtspot/visual-embed-sdk 1.27.10 → 1.27.11

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 (221) hide show
  1. package/cjs/package.json +2 -2
  2. package/cjs/src/embed/app.d.ts +144 -7
  3. package/cjs/src/embed/app.d.ts.map +1 -1
  4. package/cjs/src/embed/app.js +5 -5
  5. package/cjs/src/embed/app.js.map +1 -1
  6. package/cjs/src/embed/app.spec.js +19 -1
  7. package/cjs/src/embed/app.spec.js.map +1 -1
  8. package/cjs/src/embed/base.d.ts.map +1 -1
  9. package/cjs/src/embed/base.js +0 -3
  10. package/cjs/src/embed/base.js.map +1 -1
  11. package/cjs/src/embed/embed.spec.js +0 -15
  12. package/cjs/src/embed/embed.spec.js.map +1 -1
  13. package/cjs/src/embed/liveboard.d.ts +113 -4
  14. package/cjs/src/embed/liveboard.d.ts.map +1 -1
  15. package/cjs/src/embed/liveboard.js +2 -2
  16. package/cjs/src/embed/liveboard.js.map +1 -1
  17. package/cjs/src/embed/liveboard.spec.js +20 -1
  18. package/cjs/src/embed/liveboard.spec.js.map +1 -1
  19. package/cjs/src/embed/pinboard.spec.js +20 -1
  20. package/cjs/src/embed/pinboard.spec.js.map +1 -1
  21. package/cjs/src/embed/sage.d.ts +1 -1
  22. package/cjs/src/embed/sage.d.ts.map +1 -1
  23. package/cjs/src/embed/sage.js +2 -2
  24. package/cjs/src/embed/sage.js.map +1 -1
  25. package/cjs/src/embed/search-bar.d.ts +37 -6
  26. package/cjs/src/embed/search-bar.d.ts.map +1 -1
  27. package/cjs/src/embed/search-bar.js +2 -2
  28. package/cjs/src/embed/search-bar.js.map +1 -1
  29. package/cjs/src/embed/search.d.ts +80 -1
  30. package/cjs/src/embed/search.d.ts.map +1 -1
  31. package/cjs/src/embed/search.js +3 -3
  32. package/cjs/src/embed/search.js.map +1 -1
  33. package/cjs/src/embed/search.spec.js +25 -1
  34. package/cjs/src/embed/search.spec.js.map +1 -1
  35. package/cjs/src/embed/ts-embed-trigger.spec.d.ts +2 -0
  36. package/cjs/src/embed/ts-embed-trigger.spec.d.ts.map +1 -0
  37. package/cjs/src/embed/ts-embed-trigger.spec.js +34 -0
  38. package/cjs/src/embed/ts-embed-trigger.spec.js.map +1 -0
  39. package/cjs/src/embed/ts-embed.d.ts +1 -1
  40. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  41. package/cjs/src/embed/ts-embed.js +14 -11
  42. package/cjs/src/embed/ts-embed.js.map +1 -1
  43. package/cjs/src/embed/ts-embed.spec.js +50 -17
  44. package/cjs/src/embed/ts-embed.spec.js.map +1 -1
  45. package/cjs/src/index.d.ts +5 -3
  46. package/cjs/src/index.d.ts.map +1 -1
  47. package/cjs/src/index.js +6 -1
  48. package/cjs/src/index.js.map +1 -1
  49. package/cjs/src/mixpanel-service.d.ts +1 -0
  50. package/cjs/src/mixpanel-service.d.ts.map +1 -1
  51. package/cjs/src/mixpanel-service.js +1 -0
  52. package/cjs/src/mixpanel-service.js.map +1 -1
  53. package/cjs/src/react/all-types-export.d.ts +1 -1
  54. package/cjs/src/react/all-types-export.d.ts.map +1 -1
  55. package/cjs/src/react/all-types-export.js +2 -1
  56. package/cjs/src/react/all-types-export.js.map +1 -1
  57. package/cjs/src/react/index.spec.js +1 -1
  58. package/cjs/src/react/index.spec.js.map +1 -1
  59. package/cjs/src/test/test-utils.d.ts +1 -0
  60. package/cjs/src/test/test-utils.d.ts.map +1 -1
  61. package/cjs/src/test/test-utils.js +10 -1
  62. package/cjs/src/test/test-utils.js.map +1 -1
  63. package/cjs/src/tokenizedFetch.d.ts +9 -0
  64. package/cjs/src/tokenizedFetch.d.ts.map +1 -1
  65. package/cjs/src/tokenizedFetch.js +9 -0
  66. package/cjs/src/tokenizedFetch.js.map +1 -1
  67. package/cjs/src/types.d.ts +284 -43
  68. package/cjs/src/types.d.ts.map +1 -1
  69. package/cjs/src/types.js +109 -21
  70. package/cjs/src/types.js.map +1 -1
  71. package/cjs/src/utils/authService/authService.d.ts.map +1 -1
  72. package/cjs/src/utils/authService/authService.js +8 -2
  73. package/cjs/src/utils/authService/authService.js.map +1 -1
  74. package/cjs/src/utils/authService/authService.spec.js +22 -0
  75. package/cjs/src/utils/authService/authService.spec.js.map +1 -1
  76. package/cjs/src/utils/graphql/answerService/answerService.d.ts +56 -2
  77. package/cjs/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
  78. package/cjs/src/utils/graphql/answerService/answerService.js +55 -0
  79. package/cjs/src/utils/graphql/answerService/answerService.js.map +1 -1
  80. package/dist/src/embed/app.d.ts +144 -7
  81. package/dist/src/embed/app.d.ts.map +1 -1
  82. package/dist/src/embed/base.d.ts.map +1 -1
  83. package/dist/src/embed/liveboard.d.ts +113 -4
  84. package/dist/src/embed/liveboard.d.ts.map +1 -1
  85. package/dist/src/embed/sage.d.ts +1 -1
  86. package/dist/src/embed/sage.d.ts.map +1 -1
  87. package/dist/src/embed/search-bar.d.ts +37 -6
  88. package/dist/src/embed/search-bar.d.ts.map +1 -1
  89. package/dist/src/embed/search.d.ts +80 -1
  90. package/dist/src/embed/search.d.ts.map +1 -1
  91. package/dist/src/embed/ts-embed-trigger.spec.d.ts +2 -0
  92. package/dist/src/embed/ts-embed-trigger.spec.d.ts.map +1 -0
  93. package/dist/src/embed/ts-embed.d.ts +1 -1
  94. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  95. package/dist/src/index.d.ts +5 -3
  96. package/dist/src/index.d.ts.map +1 -1
  97. package/dist/src/mixpanel-service.d.ts +1 -0
  98. package/dist/src/mixpanel-service.d.ts.map +1 -1
  99. package/dist/src/react/all-types-export.d.ts +1 -1
  100. package/dist/src/react/all-types-export.d.ts.map +1 -1
  101. package/dist/src/test/test-utils.d.ts +1 -0
  102. package/dist/src/test/test-utils.d.ts.map +1 -1
  103. package/dist/src/tokenizedFetch.d.ts +9 -0
  104. package/dist/src/tokenizedFetch.d.ts.map +1 -1
  105. package/dist/src/types.d.ts +284 -43
  106. package/dist/src/types.d.ts.map +1 -1
  107. package/dist/src/utils/authService/authService.d.ts.map +1 -1
  108. package/dist/src/utils/graphql/answerService/answerService.d.ts +56 -2
  109. package/dist/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
  110. package/dist/tsembed-react.es.js +209 -47
  111. package/dist/tsembed-react.js +202 -47
  112. package/dist/tsembed.es.js +326 -167
  113. package/dist/tsembed.js +15335 -15180
  114. package/dist/visual-embed-sdk-react-full.d.ts +758 -65
  115. package/dist/visual-embed-sdk-react.d.ts +758 -65
  116. package/dist/visual-embed-sdk.d.ts +758 -65
  117. package/lib/package.json +2 -2
  118. package/lib/src/embed/app.d.ts +144 -7
  119. package/lib/src/embed/app.d.ts.map +1 -1
  120. package/lib/src/embed/app.js +5 -5
  121. package/lib/src/embed/app.js.map +1 -1
  122. package/lib/src/embed/app.spec.js +19 -1
  123. package/lib/src/embed/app.spec.js.map +1 -1
  124. package/lib/src/embed/base.d.ts.map +1 -1
  125. package/lib/src/embed/base.js +0 -3
  126. package/lib/src/embed/base.js.map +1 -1
  127. package/lib/src/embed/embed.spec.js +2 -17
  128. package/lib/src/embed/embed.spec.js.map +1 -1
  129. package/lib/src/embed/liveboard.d.ts +113 -4
  130. package/lib/src/embed/liveboard.d.ts.map +1 -1
  131. package/lib/src/embed/liveboard.js +3 -3
  132. package/lib/src/embed/liveboard.js.map +1 -1
  133. package/lib/src/embed/liveboard.spec.js +20 -1
  134. package/lib/src/embed/liveboard.spec.js.map +1 -1
  135. package/lib/src/embed/pinboard.spec.js +20 -1
  136. package/lib/src/embed/pinboard.spec.js.map +1 -1
  137. package/lib/src/embed/sage.d.ts +1 -1
  138. package/lib/src/embed/sage.d.ts.map +1 -1
  139. package/lib/src/embed/sage.js +2 -2
  140. package/lib/src/embed/sage.js.map +1 -1
  141. package/lib/src/embed/search-bar.d.ts +37 -6
  142. package/lib/src/embed/search-bar.d.ts.map +1 -1
  143. package/lib/src/embed/search-bar.js +2 -2
  144. package/lib/src/embed/search-bar.js.map +1 -1
  145. package/lib/src/embed/search.d.ts +80 -1
  146. package/lib/src/embed/search.d.ts.map +1 -1
  147. package/lib/src/embed/search.js +3 -3
  148. package/lib/src/embed/search.js.map +1 -1
  149. package/lib/src/embed/search.spec.js +25 -1
  150. package/lib/src/embed/search.spec.js.map +1 -1
  151. package/lib/src/embed/ts-embed-trigger.spec.d.ts +2 -0
  152. package/lib/src/embed/ts-embed-trigger.spec.d.ts.map +1 -0
  153. package/lib/src/embed/ts-embed-trigger.spec.js +32 -0
  154. package/lib/src/embed/ts-embed-trigger.spec.js.map +1 -0
  155. package/lib/src/embed/ts-embed.d.ts +1 -1
  156. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  157. package/lib/src/embed/ts-embed.js +14 -11
  158. package/lib/src/embed/ts-embed.js.map +1 -1
  159. package/lib/src/embed/ts-embed.spec.js +44 -11
  160. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  161. package/lib/src/index.d.ts +5 -3
  162. package/lib/src/index.d.ts.map +1 -1
  163. package/lib/src/index.js +3 -3
  164. package/lib/src/index.js.map +1 -1
  165. package/lib/src/mixpanel-service.d.ts +1 -0
  166. package/lib/src/mixpanel-service.d.ts.map +1 -1
  167. package/lib/src/mixpanel-service.js +1 -0
  168. package/lib/src/mixpanel-service.js.map +1 -1
  169. package/lib/src/react/all-types-export.d.ts +1 -1
  170. package/lib/src/react/all-types-export.d.ts.map +1 -1
  171. package/lib/src/react/all-types-export.js +1 -1
  172. package/lib/src/react/all-types-export.js.map +1 -1
  173. package/lib/src/react/index.spec.js +1 -1
  174. package/lib/src/react/index.spec.js.map +1 -1
  175. package/lib/src/test/test-utils.d.ts +1 -0
  176. package/lib/src/test/test-utils.d.ts.map +1 -1
  177. package/lib/src/test/test-utils.js +8 -0
  178. package/lib/src/test/test-utils.js.map +1 -1
  179. package/lib/src/tokenizedFetch.d.ts +9 -0
  180. package/lib/src/tokenizedFetch.d.ts.map +1 -1
  181. package/lib/src/tokenizedFetch.js +9 -0
  182. package/lib/src/tokenizedFetch.js.map +1 -1
  183. package/lib/src/types.d.ts +284 -43
  184. package/lib/src/types.d.ts.map +1 -1
  185. package/lib/src/types.js +109 -21
  186. package/lib/src/types.js.map +1 -1
  187. package/lib/src/utils/authService/authService.d.ts.map +1 -1
  188. package/lib/src/utils/authService/authService.js +8 -2
  189. package/lib/src/utils/authService/authService.js.map +1 -1
  190. package/lib/src/utils/authService/authService.spec.js +22 -0
  191. package/lib/src/utils/authService/authService.spec.js.map +1 -1
  192. package/lib/src/utils/graphql/answerService/answerService.d.ts +56 -2
  193. package/lib/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
  194. package/lib/src/utils/graphql/answerService/answerService.js +55 -0
  195. package/lib/src/utils/graphql/answerService/answerService.js.map +1 -1
  196. package/lib/src/visual-embed-sdk.d.ts +767 -68
  197. package/package.json +2 -2
  198. package/src/embed/app.spec.ts +24 -1
  199. package/src/embed/app.ts +148 -13
  200. package/src/embed/base.ts +1 -5
  201. package/src/embed/embed.spec.ts +0 -18
  202. package/src/embed/liveboard.spec.ts +24 -1
  203. package/src/embed/liveboard.ts +121 -15
  204. package/src/embed/pinboard.spec.ts +24 -1
  205. package/src/embed/sage.ts +2 -2
  206. package/src/embed/search-bar.tsx +38 -7
  207. package/src/embed/search.spec.ts +29 -1
  208. package/src/embed/search.ts +82 -3
  209. package/src/embed/ts-embed-trigger.spec.ts +39 -0
  210. package/src/embed/ts-embed.spec.ts +46 -11
  211. package/src/embed/ts-embed.ts +18 -14
  212. package/src/index.ts +12 -1
  213. package/src/mixpanel-service.ts +1 -0
  214. package/src/react/all-types-export.ts +1 -0
  215. package/src/react/index.spec.tsx +1 -0
  216. package/src/test/test-utils.ts +9 -0
  217. package/src/tokenizedFetch.ts +9 -0
  218. package/src/types.ts +285 -42
  219. package/src/utils/authService/authService.spec.ts +27 -0
  220. package/src/utils/authService/authService.ts +13 -12
  221. package/src/utils/graphql/answerService/answerService.ts +56 -1
@@ -1,44 +1,3 @@
1
- /**
2
- * Checks if `value` is `undefined`.
3
- *
4
- * @static
5
- * @since 0.1.0
6
- * @memberOf _
7
- * @category Lang
8
- * @param {*} value The value to check.
9
- * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
10
- * @example
11
- *
12
- * _.isUndefined(void 0);
13
- * // => true
14
- *
15
- * _.isUndefined(null);
16
- * // => false
17
- */
18
- function isUndefined(value) {
19
- return value === undefined;
20
- }
21
-
22
- var isUndefined_1 = isUndefined;
23
-
24
- /**
25
- * This method returns `undefined`.
26
- *
27
- * @static
28
- * @memberOf _
29
- * @since 2.3.0
30
- * @category Util
31
- * @example
32
- *
33
- * _.times(2, _.noop);
34
- * // => [undefined, undefined]
35
- */
36
- function noop() {
37
- // No operation performed.
38
- }
39
-
40
- var noop_1 = noop;
41
-
42
1
  /**
43
2
  * Copyright (c) 2023
44
3
  *
@@ -184,6 +143,7 @@ var AuthType;
184
143
  * .then((data) => data.token);
185
144
  * }
186
145
  * });
146
+ * });
187
147
  * ```
188
148
  */
189
149
  AuthType["TrustedAuthToken"] = "AuthServer";
@@ -216,17 +176,39 @@ var AuthType;
216
176
  */
217
177
  AuthType["Basic"] = "Basic";
218
178
  })(AuthType || (AuthType = {}));
179
+ /**
180
+ *
181
+ * This option does not apply to the classic homepage experience. To access the
182
+ * updated modular homepage, set `modularHomeExperience` to `true` (available in Early
183
+ * Access from 9.12.0.cl onwards).
184
+ *
185
+ */
219
186
  var HomeLeftNavItem;
220
187
  (function (HomeLeftNavItem) {
221
- HomeLeftNavItem["QueryBuilder"] = "query-builder";
188
+ /**
189
+ * @version SDK: 1.27.9| ThoughtSpot: 9.12.0.cl
190
+ */
191
+ HomeLeftNavItem["SearchData"] = "search-data";
192
+ /**
193
+ * @version SDK: 1.27.9| ThoughtSpot: 9.12.0.cl
194
+ */
222
195
  HomeLeftNavItem["Home"] = "insights-home";
196
+ /**
197
+ * @version SDK: 1.27.9| ThoughtSpot: 9.12.0.cl
198
+ */
223
199
  HomeLeftNavItem["Liveboards"] = "liveboards";
200
+ /**
201
+ * @version SDK: 1.27.9| ThoughtSpot: 9.12.0.cl
202
+ */
224
203
  HomeLeftNavItem["Answers"] = "answers";
204
+ /**
205
+ * @version SDK: 1.27.9| ThoughtSpot: 9.12.0.cl
206
+ */
225
207
  HomeLeftNavItem["MonitorSubscription"] = "monitor-alerts";
208
+ /**
209
+ * @version SDK: 1.27.9| ThoughtSpot: 9.12.0.cl
210
+ */
226
211
  HomeLeftNavItem["SpotIQAnalysis"] = "spotiq-analysis";
227
- HomeLeftNavItem["Tutorials"] = "tutorials";
228
- HomeLeftNavItem["Documentation"] = "documentation";
229
- HomeLeftNavItem["Community"] = "community";
230
212
  })(HomeLeftNavItem || (HomeLeftNavItem = {}));
231
213
  /**
232
214
  * A map of the supported runtime filter operations
@@ -315,6 +297,11 @@ var HomepageModule;
315
297
  HomepageModule["MyLibrary"] = "MY_LIBRARY";
316
298
  /**
317
299
  * Trending list
300
+ *
301
+ * **Note**: This option does not apply to the classic homepage.
302
+ * To access the updated modular homepage, set
303
+ * `modularHomeExperience` to `true` (available in Early Access from 9.12.0.cl
304
+ * onwards).
318
305
  */
319
306
  HomepageModule["Trending"] = "TRENDING";
320
307
  /**
@@ -421,7 +408,7 @@ var EmbedEvent;
421
408
  * @returns nonFilteredColumns - The columns that were not filtered
422
409
  * @example
423
410
  *```js
424
- * searchEmbed.trigger(HostEvent.DrillDown, {
411
+ * searchEmbed.trigger(EmbedEvent.DrillDown, {
425
412
  * points: {
426
413
  * clickedPoint,
427
414
  * selectedPoints: selectedPoint
@@ -479,7 +466,8 @@ var EmbedEvent;
479
466
  * A custom action has been triggered.
480
467
  *
481
468
  * @returns actionId - ID of the custom action
482
- * @returns data - Response payload with the Answer or Liveboard data
469
+ * @returns payload {@link CustomActionPayload} - Response payload with the
470
+ * Answer or Liveboard data
483
471
  * @example
484
472
  * ```js
485
473
  * appEmbed.on(EmbedEvent.customAction, payload => {
@@ -499,7 +487,7 @@ var EmbedEvent;
499
487
  * @example
500
488
  * ```js
501
489
  * livebaordEmbed.on(EmbedEvent.VizPointDoubleClick, payload => {
502
- * console.log('VizPointDoubleClick', payload)
490
+ * console.log('VizPointDoubleClick', payload);
503
491
  * })
504
492
  * ```
505
493
  */
@@ -512,7 +500,7 @@ var EmbedEvent;
512
500
  * @important
513
501
  * @example
514
502
  * ```js
515
- * embed.on(ThoughtSpotEmbed.Event.VizPointClick, ({data}) => {
503
+ * embed.on(EmbedEvent.VizPointClick, ({data}) => {
516
504
  * console.log(
517
505
  * data.vizId, // viz id
518
506
  * data.clickedPoint.selectedAttributes[0].value,
@@ -527,18 +515,18 @@ var EmbedEvent;
527
515
  /**
528
516
  * An error has occurred. This event is fired for the following error types:
529
517
  *
530
- * `API` - API call failure error.
518
+ * API - API call failure error.
531
519
  *
532
- * `FULLSCREEN` - Error when presenting a Liveboard or visualization in full screen
520
+ * FULLSCREEN - Error when presenting a Liveboard or visualization in full screen
533
521
  * mode.
534
522
  *
535
- * `SINGLE_VALUE_FILTER` - Error due to multiple values in the single value filter.
523
+ * SINGLE_VALUE_FILTER - Error due to multiple values in the single value filter.
536
524
  *
537
- * `NON_EXIST_FILTER` - Error due to a non-existent filter.
525
+ * NON_EXIST_FILTER - Error due to a non-existent filter.
538
526
  *
539
- * `INVALID_DATE_VALUE` - Invalid date value error.
527
+ * INVALID_DATE_VALUE - Invalid date value error.
540
528
  *
541
- * `INVALID_OPERATOR` - Use of invalid operator during filter application.
529
+ * INVALID_OPERATOR - Use of invalid operator during filter application.
542
530
  *
543
531
  * For more information, see [Developer Documentation](https://developers.thoughtspot.com/docs/events-app-integration#errorType)
544
532
  *
@@ -1106,7 +1094,7 @@ var EmbedEvent;
1106
1094
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1107
1095
  * @example
1108
1096
  *```js
1109
- * liveboardEmbed.trigger(HostEvent.Delete,
1097
+ * liveboardEmbed.trigger(EmbedEvent.Delete,
1110
1098
  * {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1111
1099
  *```
1112
1100
  */
@@ -1117,7 +1105,7 @@ var EmbedEvent;
1117
1105
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1118
1106
  * @example
1119
1107
  *```js
1120
- * liveboardEmbed.trigger(HostEvent.SchedulesList)
1108
+ * liveboardEmbed.trigger(EmbedEvent.SchedulesList)
1121
1109
  *```
1122
1110
  */
1123
1111
  EmbedEvent["SchedulesList"] = "schedule-list";
@@ -1127,7 +1115,7 @@ var EmbedEvent;
1127
1115
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1128
1116
  * @example
1129
1117
  *```js
1130
- * liveboardEmbed.trigger(HostEvent.Cancel)
1118
+ * liveboardEmbed.trigger(EmbedEvent.Cancel)
1131
1119
  *```
1132
1120
  */
1133
1121
  EmbedEvent["Cancel"] = "cancel";
@@ -1137,7 +1125,7 @@ var EmbedEvent;
1137
1125
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1138
1126
  * @example
1139
1127
  *```js
1140
- * liveboardEmbed.trigger(HostEvent.Explore, {
1128
+ * liveboardEmbed.trigger(EmbedEvent.Explore, {
1141
1129
  * vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1142
1130
  *```
1143
1131
  */
@@ -1148,7 +1136,7 @@ var EmbedEvent;
1148
1136
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1149
1137
  * @example
1150
1138
  *```js
1151
- * liveboardEmbed.trigger(HostEvent.CopyLink, {
1139
+ * liveboardEmbed.trigger(EmbedEvent.CopyLink, {
1152
1140
  * vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1153
1141
  *```
1154
1142
  */
@@ -1419,10 +1407,13 @@ var HostEvent;
1419
1407
  * _String_. The name of the column to filter on.
1420
1408
  * `operator`
1421
1409
  * Runtime filter operator to apply. For information,
1422
- * see [Runtime filter operators](https://developers.thoughtspot.com/docs/?pageid=runtime-filters#rtOperator).
1410
+ * see https://developers.thoughtspot.com/docs/?pageid=runtime-filters#rtOperator.
1423
1411
  * `values`
1424
1412
  * List of operands. Some operators such as EQ, LE allow a single value, whereas
1425
1413
  * operators such as BW and IN accept multiple operands.
1414
+ * **Note**: `HostEvent.UpdateRuntimeFilters` is not supported in
1415
+ * Search embedding (SearchEmbed) and Natural Language Search
1416
+ * embedding (SageEmbed).
1426
1417
  *
1427
1418
  * @param - {@link RuntimeFilter}[] an array of {@link RuntimeFilter} Types.
1428
1419
  * @example
@@ -1962,7 +1953,7 @@ var HostEvent;
1962
1953
  *
1963
1954
  * ```js
1964
1955
  * liveboardEmbed.trigger(HostEvent.UpdateFilters, {
1965
- * filter: { column: 'column name', oper: 'in', values: [1,2,3], is_mandatory: false }
1956
+ * filter: { column: 'column name', oper: 'IN', values: [1,2,3], is_mandatory: false }
1966
1957
  * })
1967
1958
  * ```
1968
1959
  * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
@@ -2049,6 +2040,32 @@ var HostEvent;
2049
2040
  * @version SDK: 1.29.0 | Thoughtspot: 9.12.0.cl
2050
2041
  */
2051
2042
  HostEvent["AskSage"] = "AskSage";
2043
+ /**
2044
+ * Trigger UpdateCrossFilter for Liveboard
2045
+ *
2046
+ * @example
2047
+ * ```js
2048
+ * liveboardEmbed.trigger(HostEvent.UpdateCrossFilter, {
2049
+ * vizId: 'b535c760-8bbe-4e6f-bb26-af56b4129a1e',
2050
+ * conditions: [
2051
+ * { columnName: 'Category', values: ['mfgr#12','mfgr#14'] },
2052
+ * { columnName: 'color', values: ['mint','hot'] },
2053
+ * ],
2054
+ * });
2055
+ * ```
2056
+ * @version SDK: 1.29.0 | Thoughtspot: 10.0.0.cl
2057
+ */
2058
+ HostEvent["UpdateCrossFilter"] = "UpdateCrossFilter";
2059
+ /**
2060
+ * Trigger ResetLiveboardPersonalisedView for Liveboard
2061
+ *
2062
+ * @example
2063
+ * ```js
2064
+ * liveboardEmbed.trigger(HostEvent.ResetLiveboardPersonalisedView);
2065
+ * ```
2066
+ * @version SDK: 1.29.0 | Thoughtspot: 10.1.0.cl
2067
+ */
2068
+ HostEvent["ResetLiveboardPersonalisedView"] = "ResetLiveboardPersonalisedView";
2052
2069
  })(HostEvent || (HostEvent = {}));
2053
2070
  /**
2054
2071
  * The different visual modes that the data sources panel within
@@ -3021,6 +3038,36 @@ var Action;
3021
3038
  * @version SDK: 1.29.0 | Thoughtspot: 9.12.0.cl
3022
3039
  */
3023
3040
  Action["AskAi"] = "AskAi";
3041
+ /**
3042
+ * The **Add KPI to Watchlist** action on Home page watchlist.
3043
+ *
3044
+ * @example
3045
+ * ```js
3046
+ * disabledActions: [Action.AddToWatchlist]
3047
+ * ```
3048
+ * @version SDK : 1.27.9 | Thoughtspot: 9.12.5.cl
3049
+ */
3050
+ Action["AddToWatchlist"] = "addToWatchlist";
3051
+ /**
3052
+ * The **Remove from watchlist** menu action on KPI watchlist.
3053
+ *
3054
+ * @example
3055
+ * ```js
3056
+ * disabledActions: [Action.RemoveFromWatchlist]
3057
+ * ```
3058
+ * @version SDK : 1.27.9 | Thoughtspot: 9.12.5.cl
3059
+ */
3060
+ Action["RemoveFromWatchlist"] = "removeFromWatchlist";
3061
+ /**
3062
+ * The **Copy KPI Link** menu action on KPI watchlist.
3063
+ *
3064
+ * @example
3065
+ * ```js
3066
+ * disabledActions: [Action.CopyKpiLink]
3067
+ * ```
3068
+ * @version SDK : 1.27.9 | Thoughtspot: 9.12.5.cl
3069
+ */
3070
+ Action["CopyKpiLink"] = "copyKpiLink";
3024
3071
  /**
3025
3072
  * Action ID for AI Highlights button
3026
3073
  *
@@ -3129,76 +3176,6 @@ var LogLevel;
3129
3176
  LogLevel["TRACE"] = "TRACE";
3130
3177
  })(LogLevel || (LogLevel = {}));
3131
3178
 
3132
- const logFunctions = {
3133
- [LogLevel.SILENT]: noop_1,
3134
- [LogLevel.ERROR]: console.error,
3135
- [LogLevel.WARN]: console.warn,
3136
- [LogLevel.INFO]: console.info,
3137
- [LogLevel.DEBUG]: console.debug,
3138
- [LogLevel.TRACE]: console.trace,
3139
- };
3140
- let globalLogLevelOverride = LogLevel.TRACE;
3141
- const setGlobalLogLevelOverride = (logLevel) => {
3142
- globalLogLevelOverride = logLevel;
3143
- };
3144
- const logLevelToNumber = {
3145
- [LogLevel.SILENT]: 0,
3146
- [LogLevel.ERROR]: 1,
3147
- [LogLevel.WARN]: 2,
3148
- [LogLevel.INFO]: 3,
3149
- [LogLevel.DEBUG]: 4,
3150
- [LogLevel.TRACE]: 5,
3151
- };
3152
- const compareLogLevels = (logLevel1, logLevel2) => {
3153
- const logLevel1Index = logLevelToNumber[logLevel1];
3154
- const logLevel2Index = logLevelToNumber[logLevel2];
3155
- return logLevel1Index - logLevel2Index;
3156
- };
3157
- class Logger {
3158
- constructor() {
3159
- this.logLevel = LogLevel.ERROR;
3160
- this.setLogLevel = (newLogLevel) => {
3161
- this.logLevel = newLogLevel;
3162
- };
3163
- this.getLogLevel = () => this.logLevel;
3164
- }
3165
- canLog(logLevel) {
3166
- if (logLevel === LogLevel.SILENT)
3167
- return false;
3168
- if (!isUndefined_1(globalLogLevelOverride)) {
3169
- return compareLogLevels(globalLogLevelOverride, logLevel) >= 0;
3170
- }
3171
- return compareLogLevels(this.logLevel, logLevel) >= 0;
3172
- }
3173
- logMessages(args, logLevel) {
3174
- if (this.canLog(logLevel)) {
3175
- const logFn = logFunctions[logLevel];
3176
- if (logFn) {
3177
- logFn(...args);
3178
- }
3179
- }
3180
- }
3181
- log(...args) {
3182
- this.info(args);
3183
- }
3184
- info(...args) {
3185
- this.logMessages(args, LogLevel.INFO);
3186
- }
3187
- debug(...args) {
3188
- this.logMessages(args, LogLevel.DEBUG);
3189
- }
3190
- trace(...args) {
3191
- this.logMessages(args, LogLevel.TRACE);
3192
- }
3193
- error(...args) {
3194
- this.logMessages(args, LogLevel.ERROR);
3195
- }
3196
- warn(...args) {
3197
- this.logMessages(args, LogLevel.WARN);
3198
- }
3199
- }
3200
- const logger = new Logger();
3201
-
3202
3179
  // istanbul ignore next
3203
3180
  const isObject = (obj) => {
3204
3181
  if (typeof obj === "object" && obj !== null) {
@@ -3504,7 +3481,118 @@ const removeStyleProperties = (element, styleProperties) => {
3504
3481
  element.style.removeProperty(styleProperty);
3505
3482
  });
3506
3483
  };
3507
- const isUndefined$1 = (value) => value === undefined;
3484
+ const isUndefined = (value) => value === undefined;
3485
+
3486
+ /**
3487
+ * Checks if `value` is `undefined`.
3488
+ *
3489
+ * @static
3490
+ * @since 0.1.0
3491
+ * @memberOf _
3492
+ * @category Lang
3493
+ * @param {*} value The value to check.
3494
+ * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
3495
+ * @example
3496
+ *
3497
+ * _.isUndefined(void 0);
3498
+ * // => true
3499
+ *
3500
+ * _.isUndefined(null);
3501
+ * // => false
3502
+ */
3503
+ function isUndefined$1(value) {
3504
+ return value === undefined;
3505
+ }
3506
+
3507
+ var isUndefined_1 = isUndefined$1;
3508
+
3509
+ /**
3510
+ * This method returns `undefined`.
3511
+ *
3512
+ * @static
3513
+ * @memberOf _
3514
+ * @since 2.3.0
3515
+ * @category Util
3516
+ * @example
3517
+ *
3518
+ * _.times(2, _.noop);
3519
+ * // => [undefined, undefined]
3520
+ */
3521
+ function noop() {
3522
+ // No operation performed.
3523
+ }
3524
+
3525
+ var noop_1 = noop;
3526
+
3527
+ const logFunctions = {
3528
+ [LogLevel.SILENT]: noop_1,
3529
+ [LogLevel.ERROR]: console.error,
3530
+ [LogLevel.WARN]: console.warn,
3531
+ [LogLevel.INFO]: console.info,
3532
+ [LogLevel.DEBUG]: console.debug,
3533
+ [LogLevel.TRACE]: console.trace,
3534
+ };
3535
+ let globalLogLevelOverride = LogLevel.TRACE;
3536
+ const setGlobalLogLevelOverride = (logLevel) => {
3537
+ globalLogLevelOverride = logLevel;
3538
+ };
3539
+ const logLevelToNumber = {
3540
+ [LogLevel.SILENT]: 0,
3541
+ [LogLevel.ERROR]: 1,
3542
+ [LogLevel.WARN]: 2,
3543
+ [LogLevel.INFO]: 3,
3544
+ [LogLevel.DEBUG]: 4,
3545
+ [LogLevel.TRACE]: 5,
3546
+ };
3547
+ const compareLogLevels = (logLevel1, logLevel2) => {
3548
+ const logLevel1Index = logLevelToNumber[logLevel1];
3549
+ const logLevel2Index = logLevelToNumber[logLevel2];
3550
+ return logLevel1Index - logLevel2Index;
3551
+ };
3552
+ class Logger {
3553
+ constructor() {
3554
+ this.logLevel = LogLevel.ERROR;
3555
+ this.setLogLevel = (newLogLevel) => {
3556
+ this.logLevel = newLogLevel;
3557
+ };
3558
+ this.getLogLevel = () => this.logLevel;
3559
+ }
3560
+ canLog(logLevel) {
3561
+ if (logLevel === LogLevel.SILENT)
3562
+ return false;
3563
+ if (!isUndefined_1(globalLogLevelOverride)) {
3564
+ return compareLogLevels(globalLogLevelOverride, logLevel) >= 0;
3565
+ }
3566
+ return compareLogLevels(this.logLevel, logLevel) >= 0;
3567
+ }
3568
+ logMessages(args, logLevel) {
3569
+ if (this.canLog(logLevel)) {
3570
+ const logFn = logFunctions[logLevel];
3571
+ if (logFn) {
3572
+ logFn(...args);
3573
+ }
3574
+ }
3575
+ }
3576
+ log(...args) {
3577
+ this.info(args);
3578
+ }
3579
+ info(...args) {
3580
+ this.logMessages(args, LogLevel.INFO);
3581
+ }
3582
+ debug(...args) {
3583
+ this.logMessages(args, LogLevel.DEBUG);
3584
+ }
3585
+ trace(...args) {
3586
+ this.logMessages(args, LogLevel.TRACE);
3587
+ }
3588
+ error(...args) {
3589
+ this.logMessages(args, LogLevel.ERROR);
3590
+ }
3591
+ warn(...args) {
3592
+ this.logMessages(args, LogLevel.WARN);
3593
+ }
3594
+ }
3595
+ const logger = new Logger();
3508
3596
 
3509
3597
  /**
3510
3598
  * Removes all key-value entries from the list cache.
@@ -5711,7 +5799,7 @@ function isEqual(value, other) {
5711
5799
 
5712
5800
  var isEqual_1 = isEqual;
5713
5801
 
5714
- var name="@thoughtspot/visual-embed-sdk";var version="1.27.10";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};
5802
+ var name="@thoughtspot/visual-embed-sdk";var version="1.27.11";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:"45 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};
5715
5803
 
5716
5804
  const EndPoints = {
5717
5805
  AUTH_VERIFICATION: '/callosum/v1/session/info',
@@ -5775,7 +5863,10 @@ async function fetchAuthTokenService(authEndpoint) {
5775
5863
  * @param authToken
5776
5864
  */
5777
5865
  async function fetchAuthService(thoughtSpotHost, username, authToken) {
5778
- return failureLoggedFetch(`${thoughtSpotHost}${EndPoints.TOKEN_LOGIN}?username=${username}&auth_token=${authToken}`, {
5866
+ const fetchUrlParams = username
5867
+ ? `username=${username}&auth_token=${authToken}`
5868
+ : `auth_token=${authToken}`;
5869
+ return failureLoggedFetch(`${thoughtSpotHost}${EndPoints.TOKEN_LOGIN}?${fetchUrlParams}`, {
5779
5870
  credentials: 'include',
5780
5871
  // We do not want to follow the redirect, as it starts giving a CORS
5781
5872
  // error
@@ -5789,13 +5880,16 @@ async function fetchAuthService(thoughtSpotHost, username, authToken) {
5789
5880
  * @param authToken
5790
5881
  */
5791
5882
  async function fetchAuthPostService(thoughtSpotHost, username, authToken) {
5883
+ const bodyPrams = username
5884
+ ? `username=${encodeURIComponent(username)}&auth_token=${encodeURIComponent(authToken)}`
5885
+ : `auth_token=${encodeURIComponent(authToken)}`;
5792
5886
  return failureLoggedFetch(`${thoughtSpotHost}${EndPoints.TOKEN_LOGIN}`, {
5793
5887
  method: 'POST',
5794
5888
  headers: {
5795
5889
  'content-type': 'application/x-www-form-urlencoded',
5796
5890
  'x-requested-by': 'ThoughtSpot',
5797
5891
  },
5798
- body: `username=${encodeURIComponent(username)}&auth_token=${encodeURIComponent(authToken)}`,
5892
+ body: bodyPrams,
5799
5893
  credentials: 'include',
5800
5894
  // We do not want to follow the redirect, as it starts giving a CORS
5801
5895
  // error
@@ -11854,7 +11948,7 @@ var mixpanel = init_as_module();
11854
11948
  var mixpanel_cjs = mixpanel;
11855
11949
 
11856
11950
  var mixpanel$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.assign(/*#__PURE__*/Object.create(null), mixpanel_cjs, {
11857
- 'default': mixpanel_cjs
11951
+ 'default': mixpanel_cjs
11858
11952
  }));
11859
11953
 
11860
11954
  // Needed to avoid error in CJS builds on some bundlers.
@@ -11869,6 +11963,7 @@ const MIXPANEL_EVENT = {
11869
11963
  VISUAL_SDK_ON: 'visual-sdk-on',
11870
11964
  VISUAL_SDK_IFRAME_LOAD_PERFORMANCE: 'visual-sdk-iframe-load-performance',
11871
11965
  VISUAL_SDK_EMBED_CREATE: 'visual-sdk-embed-create',
11966
+ VERCEL_INTEGRATION_COMPLETED: 'vercel-integration-completed',
11872
11967
  };
11873
11968
  let isMixpanelInitialized = false;
11874
11969
  let eventQueue = [];
@@ -11953,6 +12048,15 @@ const setEmbedConfig = (newConfig) => {
11953
12048
  return newConfig;
11954
12049
  };
11955
12050
 
12051
+ /**
12052
+ * Fetch wrapper that adds the authentication token to the request.
12053
+ * Use this to call the ThoughtSpot APIs when using the visual embed sdk.
12054
+ *
12055
+ * @param input
12056
+ * @param init
12057
+ * @version SDK: 1.28.0
12058
+ * @group Global methods
12059
+ */
11956
12060
  const tokenizedFetch = async (input, init) => {
11957
12061
  const embedConfig = getEmbedConfig();
11958
12062
  if (embedConfig.authType !== AuthType.TrustedAuthTokenCookieless) {
@@ -12686,6 +12790,14 @@ var OperationType;
12686
12790
  * @group Events
12687
12791
  */
12688
12792
  class AnswerService {
12793
+ /**
12794
+ * Should not need to be called directly.
12795
+ *
12796
+ * @param session
12797
+ * @param answer
12798
+ * @param thoughtSpotHost
12799
+ * @param selectedPoints
12800
+ */
12689
12801
  constructor(session, answer, thoughtSpotHost, selectedPoints) {
12690
12802
  this.session = session;
12691
12803
  this.answer = answer;
@@ -12693,20 +12805,43 @@ class AnswerService {
12693
12805
  this.selectedPoints = selectedPoints;
12694
12806
  this.session = removeTypename(session);
12695
12807
  }
12808
+ /**
12809
+ * Get the details about the source used in the answer.
12810
+ * This can be used to get the list of all columns in the data source for example.
12811
+ */
12696
12812
  async getSourceDetail() {
12697
12813
  const sourceId = this.answer.sources[0].header.guid;
12698
12814
  return getSourceDetail(this.thoughtSpotHost, sourceId);
12699
12815
  }
12816
+ /**
12817
+ * Remove columnIds and return updated answer session.
12818
+ *
12819
+ * @param columnIds
12820
+ * @returns
12821
+ */
12700
12822
  async removeColumns(columnIds) {
12701
12823
  return this.executeQuery(removeColumns, {
12702
12824
  logicalColumnIds: columnIds,
12703
12825
  });
12704
12826
  }
12827
+ /**
12828
+ * Add columnIds and return updated answer session.
12829
+ *
12830
+ * @param columnIds
12831
+ * @returns
12832
+ */
12705
12833
  async addColumns(columnIds) {
12706
12834
  return this.executeQuery(addColumns, {
12707
12835
  columns: columnIds.map((colId) => ({ logicalColumnId: colId })),
12708
12836
  });
12709
12837
  }
12838
+ /**
12839
+ * Fetch data from the answer.
12840
+ *
12841
+ * @param offset
12842
+ * @param size
12843
+ * @returns
12844
+ */
12710
12845
  async fetchData(offset = 0, size = 1000) {
12711
12846
  const { answer } = await this.executeQuery(getAnswerData, {
12712
12847
  deadline: 0,
@@ -12723,6 +12858,8 @@ class AnswerService {
12723
12858
  };
12724
12859
  }
12725
12860
  /**
12861
+ * Fetch the data for the answer as a CSV blob. This might be
12862
+ * quicker for larger data.
12726
12863
  *
12727
12864
  * @param userLocale
12728
12865
  * @param includeInfo Include the CSV header in the output
@@ -12734,11 +12871,21 @@ class AnswerService {
12734
12871
  credentials: 'include',
12735
12872
  });
12736
12873
  }
12874
+ /**
12875
+ * Just get the internal URL for this answer's data
12876
+ * as a CSV blob.
12877
+ *
12878
+ * @param userLocale
12879
+ * @param includeInfo
12880
+ * @returns
12881
+ */
12737
12882
  getFetchCSVBlobUrl(userLocale = 'en-us', includeInfo = false) {
12738
12883
  return `${this.thoughtSpotHost}/prism/download/answer/csv?sessionId=${this.session.sessionId}&genNo=${this.session.genNo}&userLocale=${userLocale}&exportFileName=data&hideCsvHeader=${!includeInfo}`;
12739
12884
  }
12740
12885
  /**
12741
12886
  * Get underlying data given a point and the output column names.
12887
+ * In case of a context menu action, the selectedPoints are
12888
+ * automatically passed.
12742
12889
  *
12743
12890
  * @param outputColumnNames
12744
12891
  * @param selectedPoints
@@ -12783,6 +12930,13 @@ class AnswerService {
12783
12930
  }
12784
12931
  return unaggAnswerSession;
12785
12932
  }
12933
+ /**
12934
+ * Execute a custom graphql query in the context of the answer.
12935
+ *
12936
+ * @param query graphql query
12937
+ * @param variables graphql variables
12938
+ * @returns
12939
+ */
12786
12940
  async executeQuery(query, variables) {
12787
12941
  const data = await graphqlQuery({
12788
12942
  query,
@@ -12796,6 +12950,11 @@ class AnswerService {
12796
12950
  this.session = deepMerge(this.session, (data === null || data === void 0 ? void 0 : data.id) || {});
12797
12951
  return data;
12798
12952
  }
12953
+ /**
12954
+ * Get the internal session details for the answer.
12955
+ *
12956
+ * @returns
12957
+ */
12799
12958
  getSession() {
12800
12959
  return this.session;
12801
12960
  }
@@ -13496,9 +13655,6 @@ function sanity(embedConfig) {
13496
13655
  throw new Error('ThoughtSpot host not provided');
13497
13656
  }
13498
13657
  if (embedConfig.authType === AuthType.TrustedAuthToken) {
13499
- if (!embedConfig.username) {
13500
- throw new Error('Username not provided with Trusted auth');
13501
- }
13502
13658
  if (!embedConfig.authEndpoint && typeof embedConfig.getAuthToken !== 'function') {
13503
13659
  throw new Error('Trusted auth should provide either authEndpoint or getAuthToken');
13504
13660
  }
@@ -14007,7 +14163,7 @@ class TsEmbed {
14007
14163
  if (viewConfig.preRenderId) {
14008
14164
  const allOtherKeys = Object.keys(viewConfig).filter((key) => !preRenderAllowedKeys.includes(key) && !key.startsWith('on'));
14009
14165
  allOtherKeys.forEach((key) => {
14010
- if (!isUndefined$1(viewConfig[key])
14166
+ if (!isUndefined(viewConfig[key])
14011
14167
  && !isEqual_1(viewConfig[key], preRenderedObject.viewConfig[key])) {
14012
14168
  logger.warn(`${viewConfig.embedComponentType || 'Component'} was pre-rendered with `
14013
14169
  + `"${key}" as "${JSON.stringify(preRenderedObject.viewConfig[key])}" `
@@ -14029,7 +14185,7 @@ class TsEmbed {
14029
14185
  this.thoughtSpotV2Base = getV2BasePath(this.embedConfig);
14030
14186
  this.eventHandlerMap = new Map();
14031
14187
  this.isError = false;
14032
- this.viewConfig = viewConfig;
14188
+ this.viewConfig = { excludeRuntimeFiltersfromURL: true, ...viewConfig };
14033
14189
  this.shouldEncodeUrlQueryParams = this.embedConfig.shouldEncodeUrlQueryParams;
14034
14190
  this.registerAppInit();
14035
14191
  uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_EMBED_CREATE, {
@@ -14259,10 +14415,7 @@ class TsEmbed {
14259
14415
  const queryParams = this.shouldEncodeUrlQueryParams
14260
14416
  ? `?base64UrlEncodedFlags=${getEncodedQueryParamsString(queryString)}`
14261
14417
  : `?${queryString}`;
14262
- let host = this.thoughtSpotHost;
14263
- if (!isUndefined$1(this.embedConfig.enableReactShell)) {
14264
- host = this.embedConfig.enableReactShell ? '/v2' : '/v1';
14265
- }
14418
+ const host = this.thoughtSpotHost;
14266
14419
  const path = `${host}/${queryParams}#`;
14267
14420
  return path;
14268
14421
  }
@@ -14651,6 +14804,14 @@ class TsEmbed {
14651
14804
  */
14652
14805
  trigger(messageType, data = {}) {
14653
14806
  uploadMixpanelEvent(`${MIXPANEL_EVENT.VISUAL_SDK_TRIGGER}-${messageType}`);
14807
+ if (!this.isRendered) {
14808
+ this.handleError('Please call render before triggering events');
14809
+ return null;
14810
+ }
14811
+ if (!messageType) {
14812
+ this.handleError('Host event type is undefined');
14813
+ return null;
14814
+ }
14654
14815
  return processTrigger(this.iFrame, messageType, this.thoughtSpotHost, data);
14655
14816
  }
14656
14817
  /**
@@ -14660,7 +14821,7 @@ class TsEmbed {
14660
14821
  *
14661
14822
  * @param args
14662
14823
  */
14663
- render() {
14824
+ async render() {
14664
14825
  this.isRendered = true;
14665
14826
  return this;
14666
14827
  }
@@ -14801,8 +14962,8 @@ class TsEmbed {
14801
14962
  }
14802
14963
  const elBoundingClient = this.el.getBoundingClientRect();
14803
14964
  setStyleProperties(this.preRenderWrapper, {
14804
- top: `${elBoundingClient.y}px`,
14805
- left: `${elBoundingClient.x}px`,
14965
+ top: `${elBoundingClient.y + window.scrollY}px`,
14966
+ left: `${elBoundingClient.x + window.scrollX}px`,
14806
14967
  width: `${elBoundingClient.width}px`,
14807
14968
  height: `${elBoundingClient.height}px`,
14808
14969
  });
@@ -14822,8 +14983,6 @@ class TsEmbed {
14822
14983
  pointerEvents: 'none',
14823
14984
  zIndex: '-1000',
14824
14985
  position: 'absolute ',
14825
- top: '0',
14826
- left: '0',
14827
14986
  };
14828
14987
  setStyleProperties(this.preRenderWrapper, preRenderHideStyles);
14829
14988
  if (this.resizeObserver) {
@@ -14867,7 +15026,7 @@ class TsEmbed {
14867
15026
  class V1Embed extends TsEmbed {
14868
15027
  constructor(domSelector, viewConfig) {
14869
15028
  super(domSelector, viewConfig);
14870
- this.viewConfig = viewConfig;
15029
+ this.viewConfig = { excludeRuntimeFiltersfromURL: true, ...viewConfig };
14871
15030
  }
14872
15031
  /**
14873
15032
  * Render the app in an iframe and set up event handlers
@@ -15044,7 +15203,7 @@ class AppEmbed extends V1Embed {
15044
15203
  * @param pageId The ID of the page to be embedded.
15045
15204
  */
15046
15205
  getIFrameSrc() {
15047
- const { pageId, path, modularHomeExperience, } = this.viewConfig;
15206
+ const { pageId, path, modularHomeExperience } = this.viewConfig;
15048
15207
  const pageRoute = this.formatPath(path) || this.getPageRoute(pageId, modularHomeExperience);
15049
15208
  let url = `${this.getRootIframeSrc()}/${pageRoute}`;
15050
15209
  const tsPostHashParams = this.getThoughtSpotPostUrlParams();
@@ -15129,10 +15288,10 @@ class AppEmbed extends V1Embed {
15129
15288
  * @param renderOptions An object containing the page ID
15130
15289
  * to be embedded.
15131
15290
  */
15132
- render() {
15291
+ async render() {
15133
15292
  super.render();
15134
15293
  const src = this.getIFrameSrc();
15135
- this.renderV1Embed(src);
15294
+ await this.renderV1Embed(src);
15136
15295
  return this;
15137
15296
  }
15138
15297
  }
@@ -15280,7 +15439,7 @@ class LiveboardEmbed extends V1Embed {
15280
15439
  beforePrerenderVisible() {
15281
15440
  var _a;
15282
15441
  const embedObj = (_a = this.insertedDomEl) === null || _a === void 0 ? void 0 : _a[this.embedNodeKey];
15283
- if (isUndefined$1(embedObj))
15442
+ if (isUndefined(embedObj))
15284
15443
  return;
15285
15444
  const showDifferentLib = this.viewConfig.liveboardId
15286
15445
  && embedObj.viewConfig.liveboardId !== this.viewConfig.liveboardId;
@@ -15290,7 +15449,7 @@ class LiveboardEmbed extends V1Embed {
15290
15449
  }
15291
15450
  }
15292
15451
  handleRenderForPrerender() {
15293
- if (isUndefined$1(this.viewConfig.liveboardId)) {
15452
+ if (isUndefined(this.viewConfig.liveboardId)) {
15294
15453
  this.prerenderGeneric();
15295
15454
  return;
15296
15455
  }
@@ -15319,10 +15478,10 @@ class LiveboardEmbed extends V1Embed {
15319
15478
  * @param renderOptions An object specifying the Liveboard ID,
15320
15479
  * visualization ID and the runtime filters.
15321
15480
  */
15322
- render() {
15481
+ async render() {
15323
15482
  super.render();
15324
15483
  const src = this.getIFrameSrc();
15325
- this.renderV1Embed(src);
15484
+ await this.renderV1Embed(src);
15326
15485
  return this;
15327
15486
  }
15328
15487
  navigateToLiveboard(liveboardId, vizId, activeTabId) {
@@ -15388,7 +15547,7 @@ class SearchEmbed extends TsEmbed {
15388
15547
  }
15389
15548
  getEmbedParams() {
15390
15549
  var _a;
15391
- const { hideResults, expandAllDataSource, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, hideSearchBar, dataPanelV2 = false, useLastSelectedSources = false, runtimeParameters, } = this.viewConfig;
15550
+ const { hideResults, expandAllDataSource, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL = true, hideSearchBar, dataPanelV2 = false, useLastSelectedSources = false, runtimeParameters, } = this.viewConfig;
15392
15551
  const queryParams = this.getBaseQueryParams();
15393
15552
  queryParams[Param.HideActions] = [
15394
15553
  ...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : []),
@@ -15455,11 +15614,11 @@ class SearchEmbed extends TsEmbed {
15455
15614
  /**
15456
15615
  * Render the embedded ThoughtSpot search
15457
15616
  */
15458
- render() {
15617
+ async render() {
15459
15618
  super.render();
15460
15619
  const { answerId } = this.viewConfig;
15461
15620
  const src = this.getIFrameSrc();
15462
- this.renderIFrame(src);
15621
+ await this.renderIFrame(src);
15463
15622
  getAuthPromise().then(() => {
15464
15623
  if (checkReleaseVersionInBeta(getReleaseVersion(), getEmbedConfig().suppressSearchEmbedBetaWarning
15465
15624
  || getEmbedConfig().suppressErrorAlerts)) {
@@ -15522,10 +15681,10 @@ class SearchBarEmbed extends TsEmbed {
15522
15681
  /**
15523
15682
  * Render the embedded ThoughtSpot search
15524
15683
  */
15525
- render() {
15684
+ async render() {
15526
15685
  super.render();
15527
15686
  const src = this.getIFrameSrc();
15528
- this.renderIFrame(src);
15687
+ await this.renderIFrame(src);
15529
15688
  return this;
15530
15689
  }
15531
15690
  }
@@ -15619,12 +15778,12 @@ class SageEmbed extends V1Embed {
15619
15778
  *
15620
15779
  * @returns {SageEmbed} Eureka/Sage embed
15621
15780
  */
15622
- render() {
15781
+ async render() {
15623
15782
  super.render();
15624
15783
  const src = this.getIFrameSrc();
15625
- this.renderV1Embed(src);
15784
+ await this.renderV1Embed(src);
15626
15785
  return this;
15627
15786
  }
15628
15787
  }
15629
15788
 
15630
- export { Action, AnswerService, AppEmbed, AuthEvent, AuthFailureType, AuthStatus, AuthType, ContextMenuTriggerOptions, DataSourceVisualMode, EmbedEvent, HomeLeftNavItem, HomepageModule, HostEvent, LiveboardEmbed, LogLevel, Page, PinboardEmbed, PrefetchFeatures, RuntimeFilterOp, SageEmbed, SearchBarEmbed, SearchEmbed, executeTML, exportTML, getEmbedConfig as getInitConfig, getSessionInfo, init, logout$1 as logout, prefetch };
15789
+ export { Action, AnswerService, AppEmbed, AuthEvent, AuthFailureType, AuthStatus, AuthType, ContextMenuTriggerOptions, DataSourceVisualMode, EmbedEvent, HomeLeftNavItem, HomepageModule, HostEvent, LiveboardEmbed, LogLevel, MIXPANEL_EVENT, Page, PinboardEmbed, PrefetchFeatures, RuntimeFilterOp, SageEmbed, SearchBarEmbed, SearchEmbed, executeTML, exportTML, getEmbedConfig as getInitConfig, getSessionInfo, init, logout$1 as logout, prefetch, tokenizedFetch, uploadMixpanelEvent };