@thoughtspot/visual-embed-sdk 1.50.0 → 1.51.0-test

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 (285) hide show
  1. package/cjs/package.json +1 -1
  2. package/cjs/src/config.d.ts +1 -0
  3. package/cjs/src/config.d.ts.map +1 -1
  4. package/cjs/src/config.js +2 -1
  5. package/cjs/src/config.js.map +1 -1
  6. package/cjs/src/css-variables.d.ts +122 -0
  7. package/cjs/src/css-variables.d.ts.map +1 -1
  8. package/cjs/src/embed/app.d.ts +176 -24
  9. package/cjs/src/embed/app.d.ts.map +1 -1
  10. package/cjs/src/embed/app.js +86 -38
  11. package/cjs/src/embed/app.js.map +1 -1
  12. package/cjs/src/embed/app.spec.js +672 -150
  13. package/cjs/src/embed/app.spec.js.map +1 -1
  14. package/cjs/src/embed/base.d.ts +1 -1
  15. package/cjs/src/embed/base.js +1 -1
  16. package/cjs/src/embed/conversation.d.ts +401 -2
  17. package/cjs/src/embed/conversation.d.ts.map +1 -1
  18. package/cjs/src/embed/conversation.js +32 -16
  19. package/cjs/src/embed/conversation.js.map +1 -1
  20. package/cjs/src/embed/conversation.spec.js +346 -17
  21. package/cjs/src/embed/conversation.spec.js.map +1 -1
  22. package/cjs/src/embed/events.spec.js +638 -0
  23. package/cjs/src/embed/events.spec.js.map +1 -1
  24. package/cjs/src/embed/host-events.spec.js +187 -0
  25. package/cjs/src/embed/host-events.spec.js.map +1 -1
  26. package/cjs/src/embed/hostEventClient/contracts.d.ts +51 -14
  27. package/cjs/src/embed/hostEventClient/contracts.d.ts.map +1 -1
  28. package/cjs/src/embed/hostEventClient/contracts.js +11 -1
  29. package/cjs/src/embed/hostEventClient/contracts.js.map +1 -1
  30. package/cjs/src/embed/hostEventClient/host-event-client.d.ts +2 -1
  31. package/cjs/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
  32. package/cjs/src/embed/hostEventClient/host-event-client.js +9 -0
  33. package/cjs/src/embed/hostEventClient/host-event-client.js.map +1 -1
  34. package/cjs/src/embed/hostEventClient/host-event-client.spec.js +236 -0
  35. package/cjs/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
  36. package/cjs/src/embed/hostEventClient/utils.d.ts +2 -0
  37. package/cjs/src/embed/hostEventClient/utils.d.ts.map +1 -1
  38. package/cjs/src/embed/hostEventClient/utils.js +32 -2
  39. package/cjs/src/embed/hostEventClient/utils.js.map +1 -1
  40. package/cjs/src/embed/hostEventClient/utils.spec.js +178 -0
  41. package/cjs/src/embed/hostEventClient/utils.spec.js.map +1 -1
  42. package/cjs/src/embed/liveboard.d.ts +81 -13
  43. package/cjs/src/embed/liveboard.d.ts.map +1 -1
  44. package/cjs/src/embed/liveboard.js +50 -9
  45. package/cjs/src/embed/liveboard.js.map +1 -1
  46. package/cjs/src/embed/liveboard.spec.js +432 -4
  47. package/cjs/src/embed/liveboard.spec.js.map +1 -1
  48. package/cjs/src/embed/spotter-utils.d.ts +15 -1
  49. package/cjs/src/embed/spotter-utils.d.ts.map +1 -1
  50. package/cjs/src/embed/spotter-utils.js +28 -1
  51. package/cjs/src/embed/spotter-utils.js.map +1 -1
  52. package/cjs/src/embed/spotter-utils.spec.js +129 -0
  53. package/cjs/src/embed/spotter-utils.spec.js.map +1 -1
  54. package/cjs/src/embed/spotter-viz-utils.d.ts +37 -4
  55. package/cjs/src/embed/spotter-viz-utils.d.ts.map +1 -1
  56. package/cjs/src/embed/spotter-viz-utils.js.map +1 -1
  57. package/cjs/src/embed/spotter-viz-utils.spec.js +17 -0
  58. package/cjs/src/embed/spotter-viz-utils.spec.js.map +1 -1
  59. package/cjs/src/embed/ts-embed.d.ts +16 -8
  60. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  61. package/cjs/src/embed/ts-embed.js +96 -37
  62. package/cjs/src/embed/ts-embed.js.map +1 -1
  63. package/cjs/src/embed/ts-embed.spec.js +683 -3
  64. package/cjs/src/embed/ts-embed.spec.js.map +1 -1
  65. package/cjs/src/errors.d.ts +1 -0
  66. package/cjs/src/errors.d.ts.map +1 -1
  67. package/cjs/src/errors.js +1 -0
  68. package/cjs/src/errors.js.map +1 -1
  69. package/cjs/src/index.d.ts +3 -3
  70. package/cjs/src/index.d.ts.map +1 -1
  71. package/cjs/src/index.js +4 -2
  72. package/cjs/src/index.js.map +1 -1
  73. package/cjs/src/mixpanel-service.d.ts +4 -0
  74. package/cjs/src/mixpanel-service.d.ts.map +1 -1
  75. package/cjs/src/mixpanel-service.js +4 -0
  76. package/cjs/src/mixpanel-service.js.map +1 -1
  77. package/cjs/src/react/all-types-export.d.ts +1 -1
  78. package/cjs/src/react/all-types-export.d.ts.map +1 -1
  79. package/cjs/src/react/all-types-export.js +2 -1
  80. package/cjs/src/react/all-types-export.js.map +1 -1
  81. package/cjs/src/react/all-types-export.parity.spec.d.ts +2 -0
  82. package/cjs/src/react/all-types-export.parity.spec.d.ts.map +1 -0
  83. package/cjs/src/react/all-types-export.parity.spec.js +194 -0
  84. package/cjs/src/react/all-types-export.parity.spec.js.map +1 -0
  85. package/cjs/src/react/index.d.ts +66 -32
  86. package/cjs/src/react/index.d.ts.map +1 -1
  87. package/cjs/src/react/index.js +5 -3
  88. package/cjs/src/react/index.js.map +1 -1
  89. package/cjs/src/react/index.spec.js +101 -0
  90. package/cjs/src/react/index.spec.js.map +1 -1
  91. package/cjs/src/react/util.spec.js +251 -0
  92. package/cjs/src/react/util.spec.js.map +1 -1
  93. package/cjs/src/types.d.ts +902 -28
  94. package/cjs/src/types.d.ts.map +1 -1
  95. package/cjs/src/types.js +701 -14
  96. package/cjs/src/types.js.map +1 -1
  97. package/cjs/src/utils/processData.spec.js +93 -0
  98. package/cjs/src/utils/processData.spec.js.map +1 -1
  99. package/cjs/src/utils/processTrigger.spec.js +61 -0
  100. package/cjs/src/utils/processTrigger.spec.js.map +1 -1
  101. package/cjs/src/utils.spec.js +4 -0
  102. package/cjs/src/utils.spec.js.map +1 -1
  103. package/dist/{index-B5xoN6Cp.js → index-Bivg-mDx.js} +1 -1
  104. package/dist/src/config.d.ts +1 -0
  105. package/dist/src/config.d.ts.map +1 -1
  106. package/dist/src/css-variables.d.ts +122 -0
  107. package/dist/src/css-variables.d.ts.map +1 -1
  108. package/dist/src/embed/app.d.ts +176 -24
  109. package/dist/src/embed/app.d.ts.map +1 -1
  110. package/dist/src/embed/base.d.ts +1 -1
  111. package/dist/src/embed/conversation.d.ts +401 -2
  112. package/dist/src/embed/conversation.d.ts.map +1 -1
  113. package/dist/src/embed/hostEventClient/contracts.d.ts +51 -14
  114. package/dist/src/embed/hostEventClient/contracts.d.ts.map +1 -1
  115. package/dist/src/embed/hostEventClient/host-event-client.d.ts +2 -1
  116. package/dist/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
  117. package/dist/src/embed/hostEventClient/utils.d.ts +2 -0
  118. package/dist/src/embed/hostEventClient/utils.d.ts.map +1 -1
  119. package/dist/src/embed/liveboard.d.ts +81 -13
  120. package/dist/src/embed/liveboard.d.ts.map +1 -1
  121. package/dist/src/embed/spotter-utils.d.ts +15 -1
  122. package/dist/src/embed/spotter-utils.d.ts.map +1 -1
  123. package/dist/src/embed/spotter-viz-utils.d.ts +37 -4
  124. package/dist/src/embed/spotter-viz-utils.d.ts.map +1 -1
  125. package/dist/src/embed/ts-embed.d.ts +16 -8
  126. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  127. package/dist/src/errors.d.ts +1 -0
  128. package/dist/src/errors.d.ts.map +1 -1
  129. package/dist/src/index.d.ts +3 -3
  130. package/dist/src/index.d.ts.map +1 -1
  131. package/dist/src/mixpanel-service.d.ts +4 -0
  132. package/dist/src/mixpanel-service.d.ts.map +1 -1
  133. package/dist/src/react/all-types-export.d.ts +1 -1
  134. package/dist/src/react/all-types-export.d.ts.map +1 -1
  135. package/dist/src/react/all-types-export.parity.spec.d.ts +2 -0
  136. package/dist/src/react/all-types-export.parity.spec.d.ts.map +1 -0
  137. package/dist/src/react/index.d.ts +66 -32
  138. package/dist/src/react/index.d.ts.map +1 -1
  139. package/dist/src/types.d.ts +902 -28
  140. package/dist/src/types.d.ts.map +1 -1
  141. package/dist/tsembed-react.es.js +1269 -206
  142. package/dist/tsembed-react.js +1268 -205
  143. package/dist/tsembed.es.js +1364 -304
  144. package/dist/tsembed.js +1362 -302
  145. package/dist/visual-embed-sdk-react-full.d.ts +1867 -157
  146. package/dist/visual-embed-sdk-react.d.ts +1872 -161
  147. package/dist/visual-embed-sdk.d.ts +1815 -127
  148. package/lib/package.json +1 -1
  149. package/lib/src/config.d.ts +1 -0
  150. package/lib/src/config.d.ts.map +1 -1
  151. package/lib/src/config.js +1 -0
  152. package/lib/src/config.js.map +1 -1
  153. package/lib/src/css-variables.d.ts +122 -0
  154. package/lib/src/css-variables.d.ts.map +1 -1
  155. package/lib/src/embed/app.d.ts +176 -24
  156. package/lib/src/embed/app.d.ts.map +1 -1
  157. package/lib/src/embed/app.js +87 -39
  158. package/lib/src/embed/app.js.map +1 -1
  159. package/lib/src/embed/app.spec.js +673 -151
  160. package/lib/src/embed/app.spec.js.map +1 -1
  161. package/lib/src/embed/base.d.ts +1 -1
  162. package/lib/src/embed/base.js +1 -1
  163. package/lib/src/embed/conversation.d.ts +401 -2
  164. package/lib/src/embed/conversation.d.ts.map +1 -1
  165. package/lib/src/embed/conversation.js +33 -17
  166. package/lib/src/embed/conversation.js.map +1 -1
  167. package/lib/src/embed/conversation.spec.js +347 -18
  168. package/lib/src/embed/conversation.spec.js.map +1 -1
  169. package/lib/src/embed/events.spec.js +638 -0
  170. package/lib/src/embed/events.spec.js.map +1 -1
  171. package/lib/src/embed/host-events.spec.js +188 -1
  172. package/lib/src/embed/host-events.spec.js.map +1 -1
  173. package/lib/src/embed/hostEventClient/contracts.d.ts +51 -14
  174. package/lib/src/embed/hostEventClient/contracts.d.ts.map +1 -1
  175. package/lib/src/embed/hostEventClient/contracts.js +10 -0
  176. package/lib/src/embed/hostEventClient/contracts.js.map +1 -1
  177. package/lib/src/embed/hostEventClient/host-event-client.d.ts +2 -1
  178. package/lib/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
  179. package/lib/src/embed/hostEventClient/host-event-client.js +10 -1
  180. package/lib/src/embed/hostEventClient/host-event-client.js.map +1 -1
  181. package/lib/src/embed/hostEventClient/host-event-client.spec.js +236 -0
  182. package/lib/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
  183. package/lib/src/embed/hostEventClient/utils.d.ts +2 -0
  184. package/lib/src/embed/hostEventClient/utils.d.ts.map +1 -1
  185. package/lib/src/embed/hostEventClient/utils.js +28 -1
  186. package/lib/src/embed/hostEventClient/utils.js.map +1 -1
  187. package/lib/src/embed/hostEventClient/utils.spec.js +179 -1
  188. package/lib/src/embed/hostEventClient/utils.spec.js.map +1 -1
  189. package/lib/src/embed/liveboard.d.ts +81 -13
  190. package/lib/src/embed/liveboard.d.ts.map +1 -1
  191. package/lib/src/embed/liveboard.js +50 -9
  192. package/lib/src/embed/liveboard.js.map +1 -1
  193. package/lib/src/embed/liveboard.spec.js +432 -4
  194. package/lib/src/embed/liveboard.spec.js.map +1 -1
  195. package/lib/src/embed/spotter-utils.d.ts +15 -1
  196. package/lib/src/embed/spotter-utils.d.ts.map +1 -1
  197. package/lib/src/embed/spotter-utils.js +25 -0
  198. package/lib/src/embed/spotter-utils.js.map +1 -1
  199. package/lib/src/embed/spotter-utils.spec.js +130 -1
  200. package/lib/src/embed/spotter-utils.spec.js.map +1 -1
  201. package/lib/src/embed/spotter-viz-utils.d.ts +37 -4
  202. package/lib/src/embed/spotter-viz-utils.d.ts.map +1 -1
  203. package/lib/src/embed/spotter-viz-utils.js.map +1 -1
  204. package/lib/src/embed/spotter-viz-utils.spec.js +17 -0
  205. package/lib/src/embed/spotter-viz-utils.spec.js.map +1 -1
  206. package/lib/src/embed/ts-embed.d.ts +16 -8
  207. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  208. package/lib/src/embed/ts-embed.js +96 -37
  209. package/lib/src/embed/ts-embed.js.map +1 -1
  210. package/lib/src/embed/ts-embed.spec.js +683 -3
  211. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  212. package/lib/src/errors.d.ts +1 -0
  213. package/lib/src/errors.d.ts.map +1 -1
  214. package/lib/src/errors.js +1 -0
  215. package/lib/src/errors.js.map +1 -1
  216. package/lib/src/index.d.ts +3 -3
  217. package/lib/src/index.d.ts.map +1 -1
  218. package/lib/src/index.js +3 -3
  219. package/lib/src/index.js.map +1 -1
  220. package/lib/src/mixpanel-service.d.ts +4 -0
  221. package/lib/src/mixpanel-service.d.ts.map +1 -1
  222. package/lib/src/mixpanel-service.js +4 -0
  223. package/lib/src/mixpanel-service.js.map +1 -1
  224. package/lib/src/react/all-types-export.d.ts +1 -1
  225. package/lib/src/react/all-types-export.d.ts.map +1 -1
  226. package/lib/src/react/all-types-export.js +1 -1
  227. package/lib/src/react/all-types-export.js.map +1 -1
  228. package/lib/src/react/all-types-export.parity.spec.d.ts +2 -0
  229. package/lib/src/react/all-types-export.parity.spec.d.ts.map +1 -0
  230. package/lib/src/react/all-types-export.parity.spec.js +191 -0
  231. package/lib/src/react/all-types-export.parity.spec.js.map +1 -0
  232. package/lib/src/react/index.d.ts +66 -32
  233. package/lib/src/react/index.d.ts.map +1 -1
  234. package/lib/src/react/index.js +5 -3
  235. package/lib/src/react/index.js.map +1 -1
  236. package/lib/src/react/index.spec.js +102 -1
  237. package/lib/src/react/index.spec.js.map +1 -1
  238. package/lib/src/react/util.spec.js +251 -0
  239. package/lib/src/react/util.spec.js.map +1 -1
  240. package/lib/src/types.d.ts +902 -28
  241. package/lib/src/types.d.ts.map +1 -1
  242. package/lib/src/types.js +701 -14
  243. package/lib/src/types.js.map +1 -1
  244. package/lib/src/utils/processData.spec.js +93 -0
  245. package/lib/src/utils/processData.spec.js.map +1 -1
  246. package/lib/src/utils/processTrigger.spec.js +61 -0
  247. package/lib/src/utils/processTrigger.spec.js.map +1 -1
  248. package/lib/src/utils.spec.js +4 -0
  249. package/lib/src/utils.spec.js.map +1 -1
  250. package/lib/src/visual-embed-sdk.d.ts +1815 -127
  251. package/package.json +1 -1
  252. package/src/config.ts +1 -0
  253. package/src/css-variables.ts +150 -0
  254. package/src/embed/app.spec.ts +877 -196
  255. package/src/embed/app.ts +276 -75
  256. package/src/embed/base.ts +1 -1
  257. package/src/embed/conversation.spec.ts +411 -21
  258. package/src/embed/conversation.ts +441 -18
  259. package/src/embed/events.spec.ts +761 -1
  260. package/src/embed/host-events.spec.ts +242 -0
  261. package/src/embed/hostEventClient/contracts.ts +57 -14
  262. package/src/embed/hostEventClient/host-event-client.spec.ts +372 -0
  263. package/src/embed/hostEventClient/host-event-client.ts +18 -2
  264. package/src/embed/hostEventClient/utils.spec.ts +204 -0
  265. package/src/embed/hostEventClient/utils.ts +37 -10
  266. package/src/embed/liveboard.spec.ts +565 -4
  267. package/src/embed/liveboard.ts +155 -28
  268. package/src/embed/spotter-utils.spec.ts +140 -1
  269. package/src/embed/spotter-utils.ts +36 -1
  270. package/src/embed/spotter-viz-utils.spec.ts +17 -0
  271. package/src/embed/spotter-viz-utils.ts +37 -4
  272. package/src/embed/ts-embed.spec.ts +885 -3
  273. package/src/embed/ts-embed.ts +111 -39
  274. package/src/errors.ts +1 -0
  275. package/src/index.ts +45 -2
  276. package/src/mixpanel-service.ts +4 -0
  277. package/src/react/all-types-export.parity.spec.ts +208 -0
  278. package/src/react/all-types-export.ts +22 -0
  279. package/src/react/index.spec.tsx +158 -0
  280. package/src/react/index.tsx +70 -33
  281. package/src/react/util.spec.tsx +255 -0
  282. package/src/types.ts +904 -24
  283. package/src/utils/processData.spec.ts +97 -0
  284. package/src/utils/processTrigger.spec.ts +91 -0
  285. package/src/utils.spec.ts +5 -0
package/dist/tsembed.js CHANGED
@@ -1,4 +1,4 @@
1
- /* @thoughtspot/visual-embed-sdk version 1.50.0 */
1
+ /* @thoughtspot/visual-embed-sdk version 1.51.0-test */
2
2
  'use client';
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
@@ -195,7 +195,9 @@
195
195
  })(exports.AuthType || (exports.AuthType = {}));
196
196
  /**
197
197
  *
198
- * **Note**: This attribute is not supported in the classic (V1) homepage experience.
198
+ * **Note**: The classic (V1) and Modular (V2) home page experiences are
199
+ * deprecated. This attribute applies to V3 (ModularWithStylingChanges) and
200
+ * V4 (Focused) home page experiences.
199
201
  *
200
202
  */
201
203
  exports.HomeLeftNavItem = void 0;
@@ -263,6 +265,13 @@
263
265
  * @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
264
266
  */
265
267
  HomeLeftNavItem["Favorites"] = "favorites";
268
+ /**
269
+ * The *Collections* menu option in
270
+ * the *Insights* left navigation panel.
271
+ * Shown when collections are enabled on the cluster.
272
+ * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
273
+ */
274
+ HomeLeftNavItem["Collections"] = "collections";
266
275
  })(exports.HomeLeftNavItem || (exports.HomeLeftNavItem = {}));
267
276
  /**
268
277
  * A map of the supported runtime filter operations
@@ -335,7 +344,9 @@
335
344
  * via `hiddenHomepageModules` and reordered via
336
345
  * `reorderedHomepageModules`.
337
346
  *
338
- * **Note**: This option is not supported in the classic (v1) experience.
347
+ * **Note**: The classic (V1) and Modular (V2) home page experiences are
348
+ * deprecated. These modules apply to V3 (ModularWithStylingChanges) and
349
+ * V4 (Focused) home page experiences.
339
350
  * @version SDK: 1.28.0 | ThoughtSpot: 9.12.5.cl, 10.1.0.sw
340
351
  */
341
352
  exports.HomepageModule = void 0;
@@ -513,7 +524,7 @@
513
524
  * @returns nonFilteredColumns - The columns that were not filtered
514
525
  * @example
515
526
  * ```js
516
- * searchEmbed.on(EmbedEvent.DrillDown, {
527
+ * searchEmbed.on(EmbedEvent.Drilldown, {
517
528
  * points: {
518
529
  * clickedPoint,
519
530
  * selectedPoints: selectedPoint
@@ -574,7 +585,7 @@
574
585
  * @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
575
586
  * @example
576
587
  * ```js
577
- * appEmbed.on(EmbedEvent.customAction, payload => {
588
+ * appEmbed.on(EmbedEvent.CustomAction, payload => {
578
589
  * const data = payload.data;
579
590
  * if (data.id === 'insert Custom Action ID here') {
580
591
  * console.log('Custom Action event:', data.embedAnswerData);
@@ -840,8 +851,8 @@
840
851
  *
841
852
  * **Note**: This event is deprecated in v1.21.0.
842
853
  * To fire an event when a download action is initiated on a chart or table,
843
- * use `EmbedEvent.DownloadAsPng`, `EmbedEvent.DownloadAsPDF`,
844
- * `EmbedEvent.DownloadAsCSV`, or `EmbedEvent.DownloadAsXLSX`
854
+ * use `EmbedEvent.DownloadAsPng`, `EmbedEvent.DownloadAsPdf`,
855
+ * `EmbedEvent.DownloadAsCsv`, or `EmbedEvent.DownloadAsXlsx`
845
856
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
846
857
  * @example
847
858
  * ```js
@@ -891,10 +902,10 @@
891
902
  * @example
892
903
  * ```js
893
904
  * //emit when action starts
894
- * searchEmbed.on(EmbedEvent.DownloadAsCSV, payload => {
905
+ * searchEmbed.on(EmbedEvent.DownloadAsCsv, payload => {
895
906
  * console.log('download CSV', payload)}, {start: true })
896
907
  * //emit when action ends
897
- * searchEmbed.on(EmbedEvent.DownloadAsCSV, payload => {
908
+ * searchEmbed.on(EmbedEvent.DownloadAsCsv, payload => {
898
909
  * console.log('download CSV', payload)})
899
910
  * ```
900
911
  */
@@ -1293,11 +1304,19 @@
1293
1304
  * Emitted when a user changes any filter on a Liveboard.
1294
1305
  * Returns filter type and name, column name and ID, and runtime
1295
1306
  * filter details.
1307
+ * The payload includes an optional `applicability` attribute indicating the
1308
+ * scope of the changed filter. It contains a `level` (`LIVEBOARD`,
1309
+ * `TAB`, or `GROUP`) and, when `level` is `TAB` or `GROUP`, a
1310
+ * `targetId` with the GUID of the target. At `LIVEBOARD` level there
1311
+ * is no `targetId`, since the filter applies to the whole Liveboard.
1312
+ * The `applicability` attribute is available from SDK: 1.53.0 |
1313
+ * ThoughtSpot: 26.10.0.cl.
1296
1314
  * @example
1297
1315
  *
1298
1316
  * ```js
1299
1317
  * LiveboardEmbed.on(EmbedEvent.FilterChanged, (payload) => {
1300
1318
  * console.log('payload', payload);
1319
+ * // payload.data optionally includes applicability: { level, targetId }
1301
1320
  * })
1302
1321
  * ```
1303
1322
  * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl, 9.5.0.sw
@@ -1489,9 +1508,17 @@
1489
1508
  /**
1490
1509
  * Emitted when parameter changes in an Answer
1491
1510
  * or Liveboard.
1511
+ * The payload includes an optional `applicability` attribute indicating the
1512
+ * scope of the changed parameter. It contains a `level` (`LIVEBOARD`,
1513
+ * `TAB`, or `GROUP`) and, when `level` is `TAB` or `GROUP`, a
1514
+ * `targetId` with the GUID of the target. At `LIVEBOARD` level there
1515
+ * is no `targetId`, since the parameter applies to the whole Liveboard.
1516
+ * The `applicability` attribute is available from SDK: 1.53.0 |
1517
+ * ThoughtSpot: 26.10.0.cl.
1492
1518
  * ```js
1493
1519
  * liveboardEmbed.on(EmbedEvent.ParameterChanged, (payload) => {
1494
1520
  * console.log('payload', payload);
1521
+ * // payload.data optionally includes applicability: { level, targetId }
1495
1522
  * })
1496
1523
  * ```
1497
1524
  * @version SDK: 1.29.0 | ThoughtSpot: 10.3.0.cl
@@ -1793,6 +1820,158 @@
1793
1820
  * @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl
1794
1821
  */
1795
1822
  EmbedEvent["SpotterConversationDeleted"] = "spotterConversationDeleted";
1823
+ /**
1824
+ * Emitted when the header Share button is clicked. Fires `Start` then `End`
1825
+ * to bracket the interaction. App→host counterpart of the
1826
+ * `ShareSpotterConversation` host event (user-driven vs programmatic open).
1827
+ * @example
1828
+ * ```js
1829
+ * spotterEmbed.on(EmbedEvent.SpotterShareConversationButtonHeaderClicked, (payload) => {
1830
+ * // payload: { convId: string }
1831
+ * })
1832
+ * ```
1833
+ * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
1834
+ */
1835
+ EmbedEvent["SpotterShareConversationButtonHeaderClicked"] = "spotterShareConversationButtonHeaderClicked";
1836
+ /**
1837
+ * Emitted when the sidebar Share item is clicked. Fires `Start` then `End`
1838
+ * to bracket the interaction.
1839
+ * @example
1840
+ * ```js
1841
+ * spotterEmbed.on(EmbedEvent.SpotterShareConversationMenuItemSidebarClicked, (payload) => {
1842
+ * // payload: { convId: string }
1843
+ * })
1844
+ * ```
1845
+ * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
1846
+ */
1847
+ EmbedEvent["SpotterShareConversationMenuItemSidebarClicked"] = "spotterShareConversationMenuItemSidebarClicked";
1848
+ /**
1849
+ * Emitted when a Spotter conversation is shared (recipients added, or a new
1850
+ * share created). The host builds its own link from shareId/convId + its
1851
+ * configured CONVERSATION_URL — no link string is sent. Distinct from
1852
+ * `SpotterShareModalConfirmButtonClicked`, which fires at click time before
1853
+ * the save resolves.
1854
+ * @example
1855
+ * ```js
1856
+ * spotterEmbed.on(EmbedEvent.SpotterConversationShared, (payload) => {
1857
+ * // payload: { convId: string, shareId: string,
1858
+ * // recipientsAdded: string[], recipientsRemoved: string[] }
1859
+ * })
1860
+ * ```
1861
+ * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
1862
+ */
1863
+ EmbedEvent["SpotterConversationShared"] = "spotterConversationShared";
1864
+ /**
1865
+ * Emitted when access to a shared Spotter conversation is revoked
1866
+ * (recipients removed). `fullyRevoked` is true when the last sharee is removed
1867
+ * and the share is deleted entirely.
1868
+ * @example
1869
+ * ```js
1870
+ * spotterEmbed.on(EmbedEvent.SpotterConversationShareRevoked, (payload) => {
1871
+ * // payload: { convId: string, shareId: string,
1872
+ * // recipientsRemoved: string[], fullyRevoked: boolean }
1873
+ * })
1874
+ * ```
1875
+ * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
1876
+ */
1877
+ EmbedEvent["SpotterConversationShareRevoked"] = "spotterConversationShareRevoked";
1878
+ /**
1879
+ * Emitted when a recipient opens a shared Spotter conversation (read-only
1880
+ * view). No shareId available viewer-side.
1881
+ * @example
1882
+ * ```js
1883
+ * spotterEmbed.on(EmbedEvent.SpotterSharedConversationViewed, (payload) => {
1884
+ * // payload: { convId: string, sourceConvId: string }
1885
+ * // convId = resolved snapshot conv id; sourceConvId = the shared URL id
1886
+ * })
1887
+ * ```
1888
+ * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
1889
+ */
1890
+ EmbedEvent["SpotterSharedConversationViewed"] = "spotterSharedConversationViewed";
1891
+ /**
1892
+ * Emitted when the user toggles the share-modal "include new messages since
1893
+ * last shared version" checkbox.
1894
+ * @example
1895
+ * ```js
1896
+ * spotterEmbed.on(EmbedEvent.SpotterShareIncludeNewMessagesCheckboxToggled, (payload) => {
1897
+ * // payload: { convId: string, includeNewMessages: boolean }
1898
+ * })
1899
+ * ```
1900
+ * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
1901
+ */
1902
+ EmbedEvent["SpotterShareIncludeNewMessagesCheckboxToggled"] = "spotterShareIncludeNewMessagesCheckboxToggled";
1903
+ /**
1904
+ * Emitted when the user dismisses the stale-snapshot info banner via its
1905
+ * cross (distinct from the include-new-messages checkbox toggle).
1906
+ * @example
1907
+ * ```js
1908
+ * spotterEmbed.on(EmbedEvent.SpotterShareStaleInfoBannerDismissed, (payload) => {
1909
+ * // payload: { convId: string }
1910
+ * })
1911
+ * ```
1912
+ * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
1913
+ */
1914
+ EmbedEvent["SpotterShareStaleInfoBannerDismissed"] = "spotterShareStaleInfoBannerDismissed";
1915
+ /**
1916
+ * Emitted when the modal Share (confirm) button is clicked — fires at click
1917
+ * time, before the save resolves. Distinct from the `SpotterConversationShared`
1918
+ * / `SpotterConversationShareRevoked` result events.
1919
+ * @example
1920
+ * ```js
1921
+ * spotterEmbed.on(EmbedEvent.SpotterShareModalConfirmButtonClicked, (payload) => {
1922
+ * // payload: { convId: string }
1923
+ * })
1924
+ * ```
1925
+ * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
1926
+ */
1927
+ EmbedEvent["SpotterShareModalConfirmButtonClicked"] = "spotterShareModalConfirmButtonClicked";
1928
+ /**
1929
+ * Emitted when the share modal is dismissed via the Cancel button.
1930
+ * @example
1931
+ * ```js
1932
+ * spotterEmbed.on(EmbedEvent.SpotterShareModalCancelButtonClicked, (payload) => {
1933
+ * // payload: { convId: string }
1934
+ * })
1935
+ * ```
1936
+ * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
1937
+ */
1938
+ EmbedEvent["SpotterShareModalCancelButtonClicked"] = "spotterShareModalCancelButtonClicked";
1939
+ /**
1940
+ * Emitted when a recipient leaves the read-only shared view via the Exit
1941
+ * button.
1942
+ * @example
1943
+ * ```js
1944
+ * spotterEmbed.on(EmbedEvent.SpotterSharedConversationExitButtonClicked, (payload) => {
1945
+ * // payload: { convId: string }
1946
+ * })
1947
+ * ```
1948
+ * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
1949
+ */
1950
+ EmbedEvent["SpotterSharedConversationExitButtonClicked"] = "spotterSharedConversationExitButtonClicked";
1951
+ /**
1952
+ * Emitted when a Spotter conversation is pinned.
1953
+ * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
1954
+ * @example
1955
+ * ```js
1956
+ * spotterEmbed.on(EmbedEvent.SpotterConversationPinned, (payload) => {
1957
+ * console.log('Conversation pinned', payload);
1958
+ * // payload: { conversationId: string, pinnedAt: string (ISO 8601) }
1959
+ * })
1960
+ * ```
1961
+ */
1962
+ EmbedEvent["SpotterConversationPinned"] = "spotterConversationPinned";
1963
+ /**
1964
+ * Emitted when a Spotter conversation is unpinned.
1965
+ * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
1966
+ * @example
1967
+ * ```js
1968
+ * spotterEmbed.on(EmbedEvent.SpotterConversationUnpinned, (payload) => {
1969
+ * console.log('Conversation unpinned', payload);
1970
+ * // payload: { conversationId: string, unpinnedAt: string (ISO 8601) }
1971
+ * })
1972
+ * ```
1973
+ */
1974
+ EmbedEvent["SpotterConversationUnpinned"] = "spotterConversationUnpinned";
1796
1975
  /**
1797
1976
  * Emitted when a Spotter conversation is selected/clicked.
1798
1977
  * @example
@@ -1805,6 +1984,30 @@
1805
1984
  * @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl
1806
1985
  */
1807
1986
  EmbedEvent["SpotterConversationSelected"] = "spotterConversationSelected";
1987
+ /**
1988
+ * Emitted when the Spotter agent finishes streaming/rendering a response.
1989
+ * Includes the conversation and message identifiers so the host app can
1990
+ * fetch the full conversation history via the REST API if needed.
1991
+ *
1992
+ * The payload data has the shape `{ convId: string, messageId: string }`.
1993
+ *
1994
+ * Works with SpotterEmbed as well as AppEmbed (when Spotter is reached
1995
+ * inside the full application).
1996
+ * @example
1997
+ * ```js
1998
+ * spotterEmbed.on(EmbedEvent.SpotterResponseComplete, (payload) => {
1999
+ * console.log('Spotter response complete', payload);
2000
+ * })
2001
+ * ```
2002
+ * @example
2003
+ * ```js
2004
+ * appEmbed.on(EmbedEvent.SpotterResponseComplete, (payload) => {
2005
+ * console.log('Spotter response complete', payload);
2006
+ * })
2007
+ * ```
2008
+ * @version SDK: 1.51.0 | ThoughtSpot Cloud: 26.9.0.cl
2009
+ */
2010
+ EmbedEvent["SpotterResponseComplete"] = "spotterResponseComplete";
1808
2011
  /**
1809
2012
  * @hidden
1810
2013
  * Emitted when the auth token is about to get expired and needs to be refreshed.
@@ -2159,6 +2362,7 @@
2159
2362
  * const url = await appEmbed.trigger(HostEvent.GetIframeUrl, {}, ContextType.Answer);
2160
2363
  * console.log("iFrameURL", url);
2161
2364
  * ```
2365
+ * @returns iframeUrl - The URL currently loaded in the embedded iframe.
2162
2366
  * @version SDK: 1.35.0 | ThoughtSpot: 10.4.0.cl
2163
2367
  */
2164
2368
  HostEvent["GetIframeUrl"] = "GetIframeUrl";
@@ -2285,6 +2489,17 @@
2285
2489
  * name: string,
2286
2490
  * type: ATTRIBUTE/MEASURE,
2287
2491
  * dataType: INT64/CHAR/DATE }
2492
+ *
2493
+ * `applicability` - Optional. Scopes the filter to a specific target,
2494
+ * for example, a single Liveboard tab, so the panel for the correct
2495
+ * scoped filter is opened. Available from SDK: 1.53.0 |
2496
+ * ThoughtSpot: 26.10.0.cl. Includes the following attributes:
2497
+ *
2498
+ * - `level`: The scope of the filter: `LIVEBOARD`, `TAB`, or `GROUP`.
2499
+ * - `targetId`: The GUID of the target, for example, the tab GUID.
2500
+ * Required when `level` is `TAB` or `GROUP`. Do not pass it when
2501
+ * `level` is `LIVEBOARD`, since the filter applies to the whole
2502
+ * Liveboard. Omitting `applicability` targets the `LIVEBOARD` level.
2288
2503
  * @example
2289
2504
  * ```js
2290
2505
  * searchEmbed.trigger(HostEvent.OpenFilter,
@@ -2297,6 +2512,14 @@
2297
2512
  * ```
2298
2513
  * @example
2299
2514
  * ```js
2515
+ * // Open a filter scoped to a specific Liveboard tab
2516
+ * liveboardEmbed.trigger(HostEvent.OpenFilter, {
2517
+ * column: { columnId: '<column-GUID>' },
2518
+ * applicability: { level: 'TAB', targetId: '<tab-GUID>' }
2519
+ * });
2520
+ * ```
2521
+ * @example
2522
+ * ```js
2300
2523
  * // Open filter from search context
2301
2524
  * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2302
2525
  * searchEmbed.trigger(HostEvent.OpenFilter, {
@@ -2306,6 +2529,73 @@
2306
2529
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
2307
2530
  */
2308
2531
  HostEvent["OpenFilter"] = "openFilter";
2532
+ /**
2533
+ * Open the add-filter modal of a Liveboard, the same dialog that the
2534
+ * *Add filter* button in the Liveboard edit header opens, so the host
2535
+ * app can start the add-filter flow from its own UI.
2536
+ *
2537
+ * The Liveboard must be in edit mode; the event is ignored otherwise.
2538
+ * Hiding the *Add filter* button with `hiddenActions:
2539
+ * [Action.AddFilter]` does not block this event, but disabling it with
2540
+ * `disabledActions` does.
2541
+ *
2542
+ * Unlike {@link HostEvent.OpenFilter}, which opens the panel of an
2543
+ * existing filter, this event starts the creation of a new filter.
2544
+ * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
2545
+ * @example
2546
+ * ```js
2547
+ * liveboardEmbed.trigger(HostEvent.OpenAddFilterModal);
2548
+ * ```
2549
+ */
2550
+ HostEvent["OpenAddFilterModal"] = "openAddFilterModal";
2551
+ /**
2552
+ * Open the add-parameter panel of a Liveboard, the same panel that the
2553
+ * *Add parameter* button in the Liveboard edit header opens.
2554
+ * Mirrors {@link HostEvent.OpenAddFilterModal} for parameters.
2555
+ *
2556
+ * The Liveboard must be in edit mode; the event is ignored otherwise.
2557
+ * Hiding the *Add parameter* button with `hiddenActions:
2558
+ * [Action.AddParameter]` does not block this event, but disabling it
2559
+ * with `disabledActions` does.
2560
+ * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
2561
+ * @example
2562
+ * ```js
2563
+ * liveboardEmbed.trigger(HostEvent.OpenAddParameterModal);
2564
+ * ```
2565
+ */
2566
+ HostEvent["OpenAddParameterModal"] = "openAddParameterModal";
2567
+ /**
2568
+ * Open the parameter panel for a particular parameter on a Liveboard.
2569
+ * Mirrors {@link HostEvent.OpenFilter} for parameters.
2570
+ * @param - Includes the following keys:
2571
+ * - `parameter`: An object identifying the parameter to open, for
2572
+ * example, `{ parameterId: '<parameter-GUID>' }`.
2573
+ * - `applicability`: Optional. Scopes the parameter to a specific target,
2574
+ * for example, a single Liveboard tab, so the panel for the correct
2575
+ * scoped parameter is opened. Includes the following attributes:
2576
+ *
2577
+ * - `level`: The scope of the parameter: `LIVEBOARD`, `TAB`, or `GROUP`.
2578
+ * - `targetId`: The GUID of the target, for example, the tab GUID.
2579
+ * Required when `level` is `TAB` or `GROUP`. Do not pass it when
2580
+ * `level` is `LIVEBOARD`, since the parameter applies to the whole
2581
+ * Liveboard. Omitting `applicability` targets the `LIVEBOARD` level.
2582
+ * @example
2583
+ * ```js
2584
+ * liveboardEmbed.trigger(HostEvent.OpenParameter, {
2585
+ * parameter: { parameterId: '<parameter-GUID>' }
2586
+ * });
2587
+ * ```
2588
+ * @example
2589
+ * ```js
2590
+ * // Open a parameter scoped to a specific group
2591
+ * liveboardEmbed.trigger(HostEvent.OpenParameter, {
2592
+ * parameter: { parameterId: '<parameter-GUID>' },
2593
+ * applicability: { level: 'GROUP', targetId: '<group-GUID>' }
2594
+ * });
2595
+ * ```
2596
+ * @version SDK: 1.53.0 | ThoughtSpot: 26.10.0.cl
2597
+ */
2598
+ HostEvent["OpenParameter"] = "openParameter";
2309
2599
  /**
2310
2600
  * Add columns to the current search query.
2311
2601
  * @param - { columnIds: string[] }
@@ -2355,6 +2645,10 @@
2355
2645
  * liveboardEmbed.trigger(HostEvent.getExportRequestForCurrentPinboard).then(
2356
2646
  * data=>console.log(data))
2357
2647
  * ```
2648
+ * @returns data - Object with a `v2Content` string: the export request
2649
+ * payload for the current Liveboard.
2650
+ * @returns type - The passthrough event name,
2651
+ * `getExportRequestForCurrentPinboard`.
2358
2652
  * @version SDK: 1.13.0 | ThoughtSpot: 8.5.0.cl, 8.8.1.sw
2359
2653
  */
2360
2654
  HostEvent["getExportRequestForCurrentPinboard"] = "getExportRequestForCurrentPinboard";
@@ -2457,6 +2751,9 @@
2457
2751
  * }, ContextType.Spotter);
2458
2752
  * ```
2459
2753
  *
2754
+ * @returns liveboardId - GUID of the Liveboard the Answer was pinned to.
2755
+ * @returns tabId - GUID of the tab within that Liveboard.
2756
+ * @returns vizId - GUID of the newly created visualization.
2460
2757
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2461
2758
  */
2462
2759
  HostEvent["Pin"] = "pin";
@@ -2495,13 +2792,13 @@
2495
2792
  * Trigger the **Manage schedule** action on an embedded Liveboard
2496
2793
  * @example
2497
2794
  * ```js
2498
- * liveboardEmbed.trigger(HostEvent.ScheduleList)
2795
+ * liveboardEmbed.trigger(HostEvent.SchedulesList)
2499
2796
  * ```
2500
2797
  * @example
2501
2798
  * ```js
2502
2799
  * // Manage schedules from liveboard context
2503
2800
  * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2504
- * liveboardEmbed.trigger(HostEvent.ScheduleList, {}, ContextType.Liveboard);
2801
+ * liveboardEmbed.trigger(HostEvent.SchedulesList, {}, ContextType.Liveboard);
2505
2802
  * ```
2506
2803
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2507
2804
  */
@@ -2946,6 +3243,7 @@
2946
3243
  * console.log(tml.answer);
2947
3244
  * });
2948
3245
  * ```
3246
+ * @returns The TML representation of the current Answer, as an object.
2949
3247
  * @version SDK: 1.18.0 | ThoughtSpot: 8.10.0.cl, 9.0.1.sw
2950
3248
  * @important
2951
3249
  */
@@ -3370,6 +3668,14 @@
3370
3668
  /**
3371
3669
  * Get details of filters applied on the Liveboard.
3372
3670
  * Returns arrays containing Liveboard filter and runtime filter elements.
3671
+ * Each Liveboard filter includes an optional `applicability` attribute
3672
+ * indicating the scope of the filter. It contains a `level`
3673
+ * (`LIVEBOARD`, `TAB`, or `GROUP`) and, when `level` is `TAB` or
3674
+ * `GROUP`, a `targetId` with the GUID of the target. At `LIVEBOARD`
3675
+ * level there is no `targetId`, since the filter applies to the
3676
+ * whole Liveboard.
3677
+ * The `applicability` attribute is available from SDK: 1.53.0 |
3678
+ * ThoughtSpot: 26.10.0.cl.
3373
3679
  * @example
3374
3680
  * ```js
3375
3681
  * const data = await liveboardEmbed.trigger(HostEvent.GetFilters);
@@ -3382,6 +3688,8 @@
3382
3688
  * const data = await liveboardEmbed.trigger(HostEvent.GetFilters, {}, ContextType.Liveboard);
3383
3689
  * console.log('filters', data);
3384
3690
  * ```
3691
+ * @returns liveboardFilters - Filters applied on the Liveboard.
3692
+ * @returns runtimeFilters - Runtime filters applied on the Liveboard.
3385
3693
  * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
3386
3694
  */
3387
3695
  HostEvent["GetFilters"] = "getFilters";
@@ -3409,6 +3717,16 @@
3409
3717
  *
3410
3718
  * `type` - To update filters for date time, specify the date format type.
3411
3719
  * For more information and examples, see link:https://developers.thoughtspot.com/docs/embed-liveboard#_date_filters[Date filters].
3720
+ *
3721
+ * `applicability` - Optional. Scopes the filter to a specific target,
3722
+ * for example, a single Liveboard tab. Available from SDK: 1.53.0 |
3723
+ * ThoughtSpot: 26.10.0.cl. Includes the following attributes:
3724
+ *
3725
+ * - `level`: The scope of the filter: `LIVEBOARD`, `TAB`, or `GROUP`.
3726
+ * - `targetId`: The GUID of the target, for example, the tab GUID.
3727
+ * Required when `level` is `TAB` or `GROUP`. Do not pass it when
3728
+ * `level` is `LIVEBOARD`, since the filter applies to the whole
3729
+ * Liveboard.
3412
3730
  * @example
3413
3731
  * ```js
3414
3732
  *
@@ -3485,6 +3803,21 @@
3485
3803
  * }
3486
3804
  * }, ContextType.Liveboard);
3487
3805
  * ```
3806
+ * @example
3807
+ * ```js
3808
+ * // Scope the filter to a specific Liveboard tab
3809
+ * liveboardEmbed.trigger(HostEvent.UpdateFilters, {
3810
+ * filter: {
3811
+ * column: "item type",
3812
+ * oper: "IN",
3813
+ * values: ["bags", "shirts"],
3814
+ * applicability: {
3815
+ * level: "TAB",
3816
+ * targetId: "e0836cad-4fdf-42d4-bd97-567a6b2a6058"
3817
+ * }
3818
+ * }
3819
+ * });
3820
+ * ```
3488
3821
  * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
3489
3822
  */
3490
3823
  HostEvent["UpdateFilters"] = "updateFilters";
@@ -3506,9 +3839,37 @@
3506
3839
  * console.log('tabs', tabDetails);
3507
3840
  * });
3508
3841
  * ```
3842
+ * @returns orderedTabIds - Tab GUIDs in the order they appear.
3843
+ * @returns numberOfTabs - Total number of tabs on the Liveboard.
3844
+ * @returns Tabs - Tab details, each with at least `id` and `name`.
3509
3845
  * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl
3510
3846
  */
3511
3847
  HostEvent["GetTabs"] = "getTabs";
3848
+ /**
3849
+ * Get group details for the current Liveboard.
3850
+ * Mirrors {@link HostEvent.GetTabs} for filter/parameter groups.
3851
+ * @example
3852
+ * ```js
3853
+ * liveboardEmbed.trigger(HostEvent.GetGroups).then((groupDetails) => {
3854
+ * console.log(
3855
+ * groupDetails // GroupDetails of current Liveboard
3856
+ * );
3857
+ * })
3858
+ * ```
3859
+ * @example
3860
+ * ```js
3861
+ * // Get groups from liveboard context
3862
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3863
+ * liveboardEmbed.trigger(HostEvent.GetGroups, {}, ContextType.Liveboard).then((groupDetails) => {
3864
+ * console.log('groups', groupDetails);
3865
+ * });
3866
+ * ```
3867
+ * @returns orderedGroupIds - Group GUIDs in the order they appear.
3868
+ * @returns numberOfGroups - Total number of groups on the Liveboard.
3869
+ * @returns Groups - Group details, each with at least `id` and `name`.
3870
+ * @version SDK: 1.53.0 | ThoughtSpot: 26.10.0.cl
3871
+ */
3872
+ HostEvent["GetGroups"] = "getGroups";
3512
3873
  /**
3513
3874
  * Set the visible tabs on a Liveboard.
3514
3875
  * @param - an array of ids of tabs to show, the IDs not passed
@@ -3580,6 +3941,9 @@
3580
3941
  * // Alternative direct usage (not recommended)
3581
3942
  * const {session} = await embed.trigger( HostEvent.GetAnswerSession )
3582
3943
  * ```
3944
+ * @returns session - Session identifier for the Answer, for use with the
3945
+ * `AnswerService`.
3946
+ * @returns embedAnswerData - Data backing the Answer, when available.
3583
3947
  * @version SDK: 1.26.0 | ThoughtSpot: 9.10.0.cl, 10.1.0.sw
3584
3948
  */
3585
3949
  HostEvent["GetAnswerSession"] = "getAnswerSession";
@@ -3636,6 +4000,15 @@
3636
4000
  * - `name`: Name of the parameter.
3637
4001
  * - `value`: The value to set for the parameter.
3638
4002
  * - `isVisibleToUser`: Optional. To control the visibility of the parameter chip.
4003
+ * - `applicability`: Optional. Scopes the parameter to a specific target,
4004
+ * for example, a single Liveboard tab. Available from SDK: 1.53.0 |
4005
+ * ThoughtSpot: 26.10.0.cl. Includes the following attributes:
4006
+ *
4007
+ * - `level`: The scope of the parameter: `LIVEBOARD`, `TAB`, or `GROUP`.
4008
+ * - `targetId`: The GUID of the target, for example, the tab GUID.
4009
+ * Required when `level` is `TAB` or `GROUP`. Do not pass it when
4010
+ * `level` is `LIVEBOARD`, since the parameter applies to the whole
4011
+ * Liveboard.
3639
4012
  *
3640
4013
  * @example
3641
4014
  * ```js
@@ -3647,6 +4020,18 @@
3647
4020
  * ```
3648
4021
  * @example
3649
4022
  * ```js
4023
+ * // Scope the parameter to a specific Liveboard tab
4024
+ * liveboardEmbed.trigger(HostEvent.UpdateParameters, [{
4025
+ * name: "Integer Range Param",
4026
+ * value: 10,
4027
+ * applicability: {
4028
+ * level: "TAB",
4029
+ * targetId: "e0836cad-4fdf-42d4-bd97-567a6b2a6058"
4030
+ * }
4031
+ * }])
4032
+ * ```
4033
+ * @example
4034
+ * ```js
3650
4035
  * // Update parameters from liveboard context
3651
4036
  * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3652
4037
  * liveboardEmbed.trigger(HostEvent.UpdateParameters, [{
@@ -3660,6 +4045,14 @@
3660
4045
  HostEvent["UpdateParameters"] = "UpdateParameters";
3661
4046
  /**
3662
4047
  * Triggers GetParameters to fetch the runtime Parameters.
4048
+ * Each parameter includes an optional `applicability` attribute
4049
+ * indicating the scope of the parameter. It contains a `level`
4050
+ * (`LIVEBOARD`, `TAB`, or `GROUP`) and, when `level` is `TAB` or
4051
+ * `GROUP`, a `targetId` with the GUID of the target. At `LIVEBOARD`
4052
+ * level there is no `targetId`, since the parameter applies to the
4053
+ * whole Liveboard.
4054
+ * The `applicability` attribute is available from SDK: 1.53.0 |
4055
+ * ThoughtSpot: 26.10.0.cl.
3663
4056
  * @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
3664
4057
  * ```js
3665
4058
  * liveboardEmbed.trigger(HostEvent.GetParameters).then((parameter) => {
@@ -3684,12 +4077,16 @@
3684
4077
  * console.log('parameters', parameters);
3685
4078
  * });
3686
4079
  * ```
4080
+ * @returns parameters - Parameters currently applied on the Liveboard.
3687
4081
  * @version SDK: 1.29.0 | ThoughtSpot: 10.1.0.cl, 10.1.0.sw
3688
4082
  */
3689
4083
  HostEvent["GetParameters"] = "GetParameters";
3690
4084
  /**
3691
4085
  * Triggers an event to update a personalized view of a Liveboard.
3692
- * This event is deprecated. Use {@link HostEvent.UpdatePersonalizedView} instead.
4086
+ * This event is deprecated. Use {@link HostEvent.SelectPersonalizedView} instead,
4087
+ * which additionally accepts a `viewName`, resets to the original view when
4088
+ * called with an empty payload, and reports an error when a named view
4089
+ * cannot be found.
3693
4090
  * ```js
3694
4091
  * liveboardEmbed.trigger(HostEvent.UpdatePersonalisedView, {viewId: '1234'})
3695
4092
  * ```
@@ -3707,10 +4104,15 @@
3707
4104
  HostEvent["UpdatePersonalisedView"] = "UpdatePersonalisedView";
3708
4105
  /**
3709
4106
  * Triggers an event to update a personalized view of a Liveboard.
4107
+ * This event is deprecated. Use {@link HostEvent.SelectPersonalizedView} instead,
4108
+ * which additionally accepts a `viewName`, resets to the original view when
4109
+ * called with an empty payload, and reports an error when a named view
4110
+ * cannot be found.
3710
4111
  * ```js
3711
4112
  * liveboardEmbed.trigger(HostEvent.UpdatePersonalisedView, {viewId: '1234'})
3712
4113
  * ```
3713
4114
  * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
4115
+ * @deprecated SDK: 1.53.0 | ThoughtSpot: 26.10.0.cl
3714
4116
  */
3715
4117
  HostEvent["UpdatePersonalizedView"] = "UpdatePersonalisedView";
3716
4118
  /**
@@ -3813,6 +4215,10 @@
3813
4215
  * description: "Generated from Spotter"
3814
4216
  * }, ContextType.Spotter);
3815
4217
  * ```
4218
+ * @returns answerId - GUID of the saved Answer.
4219
+ * @returns saveResponse - Raw response from the save operation.
4220
+ * @returns shareResponse - Raw response from the share operation, when the
4221
+ * Answer was also made discoverable.
3816
4222
  * @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
3817
4223
  */
3818
4224
  HostEvent["SaveAnswer"] = "saveAnswer";
@@ -3926,6 +4332,36 @@
3926
4332
  * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
3927
4333
  */
3928
4334
  HostEvent["ResetSpotterConversation"] = "ResetSpotterConversation";
4335
+ /**
4336
+ * Opens the Spotter share-conversation modal for the given conversation.
4337
+ * `conversationId` is **mandatory** — you must pass the id of the
4338
+ * conversation to share. Also no-op when sharing is disabled
4339
+ * (enableShareConversation off) or when already in the read-only shared view.
4340
+ * @example
4341
+ * ```js
4342
+ * spotterEmbed.trigger(HostEvent.ShareSpotterConversation, { conversationId: 'abc' });
4343
+ * ```
4344
+ * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
4345
+ */
4346
+ HostEvent["ShareSpotterConversation"] = "ShareSpotterConversation";
4347
+ /**
4348
+ * Closes the Spotter share-conversation modal. No-op if none is open.
4349
+ * @example
4350
+ * ```js
4351
+ * spotterEmbed.trigger(HostEvent.CloseSpotterShareConversation);
4352
+ * ```
4353
+ * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
4354
+ */
4355
+ HostEvent["CloseSpotterShareConversation"] = "CloseSpotterShareConversation";
4356
+ /**
4357
+ * Exits the read-only shared-conversation view.
4358
+ * @example
4359
+ * ```js
4360
+ * spotterEmbed.trigger(HostEvent.ExitSpotterSharedConversation);
4361
+ * ```
4362
+ * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
4363
+ */
4364
+ HostEvent["ExitSpotterSharedConversation"] = "ExitSpotterSharedConversation";
3929
4365
  /**
3930
4366
  * Deletes the last prompt in spotter embed.
3931
4367
  * @example
@@ -4021,6 +4457,41 @@
4021
4457
  * @version SDK: 1.45.0 | ThoughtSpot: 26.2.0.cl
4022
4458
  */
4023
4459
  HostEvent["StartNewSpotterConversation"] = "StartNewSpotterConversation";
4460
+ /**
4461
+ * Pins a saved Spotter conversation so it floats to the top of the past
4462
+ * conversations sidebar. The `conversationId` of the conversation to pin is
4463
+ * required.
4464
+ *
4465
+ * This feature is available only when chat history is enabled on your ThoughtSpot
4466
+ * instance. Contact your admin or ThoughtSpot Support to enable chat history on your
4467
+ * instance.
4468
+ *
4469
+ * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
4470
+ * @example
4471
+ * ```js
4472
+ * spotterEmbed.trigger(HostEvent.PinSpotterConversation, {
4473
+ * conversationId: '<conversation-id>',
4474
+ * });
4475
+ * ```
4476
+ */
4477
+ HostEvent["PinSpotterConversation"] = "PinSpotterConversation";
4478
+ /**
4479
+ * Unpins a previously pinned Spotter conversation. The `conversationId` of the
4480
+ * conversation to unpin is required.
4481
+ *
4482
+ * This feature is available only when chat history is enabled on your ThoughtSpot
4483
+ * instance. Contact your admin or ThoughtSpot Support to enable chat history on your
4484
+ * instance.
4485
+ *
4486
+ * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
4487
+ * @example
4488
+ * ```js
4489
+ * spotterEmbed.trigger(HostEvent.UnpinSpotterConversation, {
4490
+ * conversationId: '<conversation-id>',
4491
+ * });
4492
+ * ```
4493
+ */
4494
+ HostEvent["UnpinSpotterConversation"] = "UnpinSpotterConversation";
4024
4495
  /**
4025
4496
  * @hidden
4026
4497
  * Get the current context of the embedded page.
@@ -4229,6 +4700,7 @@
4229
4700
  Param["NumberFormatLocale"] = "numberFormatLocale";
4230
4701
  Param["CurrencyFormat"] = "currencyFormat";
4231
4702
  Param["Enable2ColumnLayout"] = "enable2ColumnLayout";
4703
+ Param["IsLiveboardAlwaysOn12ColLayout"] = "isLiveboardAlwaysOn12ColLayout";
4232
4704
  Param["IsFullAppEmbed"] = "isFullAppEmbed";
4233
4705
  Param["IsOnBeforeGetVizDataInterceptEnabled"] = "isOnBeforeGetVizDataInterceptEnabled";
4234
4706
  Param["FocusSearchBarOnRender"] = "focusSearchBarOnRender";
@@ -4242,6 +4714,7 @@
4242
4714
  Param["SpotterEnabled"] = "isSpotterExperienceEnabled";
4243
4715
  Param["IsUnifiedSearchExperienceEnabled"] = "isUnifiedSearchExperienceEnabled";
4244
4716
  Param["OverrideOrgId"] = "orgId";
4717
+ Param["OverrideHistoryState"] = "overrideHistoryState";
4245
4718
  Param["OauthPollingInterval"] = "oAuthPollingInterval";
4246
4719
  Param["IsForceRedirect"] = "isForceRedirect";
4247
4720
  Param["DataSourceId"] = "dataSourceId";
@@ -4251,6 +4724,7 @@
4251
4724
  Param["PrimaryAction"] = "primaryAction";
4252
4725
  Param["isSpotterAgentEmbed"] = "isSpotterAgentEmbed";
4253
4726
  Param["IsLiveboardStylingAndGroupingEnabled"] = "isLiveboardStylingAndGroupingEnabled";
4727
+ Param["LiveboardGutter"] = "liveboardGutter";
4254
4728
  Param["IsLazyLoadingForEmbedEnabled"] = "isLazyLoadingForEmbedEnabled";
4255
4729
  Param["RootMarginForLazyLoad"] = "rootMarginForLazyLoad";
4256
4730
  Param["isPNGInScheduledEmailsEnabled"] = "isPNGInScheduledEmailsEnabled";
@@ -4259,9 +4733,12 @@
4259
4733
  Param["isGranularXLSXCSVSchedulesEnabled"] = "isGranularXLSXCSVSchedulesEnabled";
4260
4734
  Param["isSendNowLiveboardSchedulingEnabled"] = "isSendNowLiveboardSchedulingEnabled";
4261
4735
  Param["isCentralizedLiveboardFilterUXEnabled"] = "isCentralizedLiveboardFilterUXEnabled";
4736
+ Param["isScopedLiveboardFilteringEnabled"] = "isScopedLiveboardFilteringEnabled";
4262
4737
  Param["isLinkParametersEnabled"] = "isLinkParametersEnabled";
4263
4738
  Param["EnablePastConversationsSidebar"] = "enablePastConversationsSidebar";
4264
4739
  Param["UpdatedSpotterChatPrompt"] = "updatedSpotterChatPrompt";
4740
+ Param["ShowSpotterRadiance"] = "showSpotterRadiance";
4741
+ Param["DefaultQueryMode"] = "defaultQueryMode";
4265
4742
  Param["EnableStopAnswerGenerationEmbed"] = "enableStopAnswerGenerationEmbed";
4266
4743
  Param["SpotterSidebarTitle"] = "spotterSidebarTitle";
4267
4744
  Param["SpotterSidebarDefaultExpanded"] = "spotterSidebarDefaultExpanded";
@@ -4281,14 +4758,19 @@
4281
4758
  Param["SpotterFileUploadEnabled"] = "spotterFileUploadEnabled";
4282
4759
  Param["SpotterFileUploadFileTypes"] = "spotterFileUploadFileTypes";
4283
4760
  Param["IsStarterPromptsEnabled"] = "enableStarterPrompts";
4761
+ Param["UpdatedSpotterExperience"] = "updatedSpotterExperience";
4762
+ Param["SpotterDataSources"] = "spotterDataSources";
4763
+ Param["AnalystId"] = "analystId";
4764
+ Param["OpenSpotterOnLiveboardByDefault"] = "openSpotterOnLiveboardByDefault";
4284
4765
  })(Param || (Param = {}));
4285
4766
  /**
4286
4767
  * ThoughtSpot application pages include actions and menu commands
4287
4768
  * for various user-initiated operations. These actions are represented
4288
4769
  * as enumeration members in the SDK. To control actions in the embedded view:
4289
- * - disabledActions — the action is grayed out and still visible, but non-interactive (user can see but not click).
4290
- * - hiddenActions — the action is completely removed from the UI (user cannot see it at all).
4291
- * - visibleActions — allowlist, only these actions are shown; all others are hidden.
4770
+ * - disabledActions — the action is grayed out and still visible, but non-interactive
4771
+ * (user can see but not click). - hiddenActions — the action is completely removed from
4772
+ * the UI (user cannot see it at all). - visibleActions — allowlist, only these actions
4773
+ * are shown; all others are hidden.
4292
4774
  *
4293
4775
  * Use disabledActions to disable (gray out) an action.
4294
4776
  * Use hiddenActions to hide (fully remove) an action.
@@ -4342,6 +4824,17 @@
4342
4824
  * ```
4343
4825
  */
4344
4826
  Action["SaveAsView"] = "saveAsView";
4827
+ /**
4828
+ * The **EditInputTable** action on a Liveboard
4829
+ * page. Allows users to edit an input table used in an Answer directly from
4830
+ * a Liveboard.
4831
+ * @example
4832
+ * ```js
4833
+ * disabledActions: [Action.EditInputTable]
4834
+ * ```
4835
+ * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
4836
+ */
4837
+ Action["EditInputTable"] = "editInputTable";
4345
4838
  /**
4346
4839
  * The **Make a copy** action on a Liveboard or Answer
4347
4840
  * page. Creates a copy of the Liveboard.
@@ -5545,6 +6038,19 @@
5545
6038
  * @version SDK: 1.36.0 | ThoughtSpot Cloud: 10.6.0.cl
5546
6039
  */
5547
6040
  Action["ChangeFilterVisibilityInTab"] = "changeFilterVisibilityInTab";
6041
+ /**
6042
+ * Action ID to show, hide, or disable all filter surfaces on a Liveboard,
6043
+ * including filter, parameter, and cross-filter chips at the liveboard,
6044
+ * tab, and group levels. Parameter and cross-filter chips are hide-only.
6045
+ *
6046
+ * @example
6047
+ * ```js
6048
+ * hiddenActions: [Action.AllLiveboardFilters]
6049
+ * disabledActions: [Action.AllLiveboardFilters]
6050
+ * ```
6051
+ * @version SDK: 1.53.0 | ThoughtSpot: 26.10.0.cl
6052
+ */
6053
+ Action["AllLiveboardFilters"] = "allLiveboardFilters";
5548
6054
  /**
5549
6055
  * The **Data model instructions** button on the Spotter interface.
5550
6056
  * Allows opening the data model instructions modal.
@@ -5646,6 +6152,10 @@
5646
6152
  * The **Add to Coaching** feature allows adding reference questions and
5647
6153
  * business terms to improve Spotter’s responses. This feature is generally available
5648
6154
  * (GA) from version 26.2.0.cl and enabled by default on embed deployments.
6155
+ *
6156
+ * This action governs both the answer-card **Add to memory** CTA and its
6157
+ * Spotter 3 successor, the response-footer **Remember this** CTA
6158
+ * (they are mutually exclusive).
5649
6159
  * @example
5650
6160
  * ```js
5651
6161
  * hiddenAction: [Action.InConversationTraining]
@@ -5880,6 +6390,89 @@
5880
6390
  * @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
5881
6391
  */
5882
6392
  Action["SpotterChatRename"] = "spotterChatRename";
6393
+ /**
6394
+ * Controls visibility and disable state of the Spotter conversation Share
6395
+ * button in the chat header. Only takes effect once sharing is enabled
6396
+ * (enableShareConversation on).
6397
+ * @example
6398
+ * ```js
6399
+ * disabledActions: [Action.SpotterShareConversationButtonHeader]
6400
+ * ```
6401
+ * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
6402
+ */
6403
+ Action["SpotterShareConversationButtonHeader"] = "spotterShareConversationButtonHeader";
6404
+ /**
6405
+ * Controls visibility and disable state of the Share item in the Spotter
6406
+ * conversation history (sidebar) edit menu. Independent of the header button
6407
+ * above, so a host can show Share in one entry point and hide it in the other.
6408
+ * @example
6409
+ * ```js
6410
+ * disabledActions: [Action.SpotterShareConversationMenuItemSidebar]
6411
+ * ```
6412
+ * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
6413
+ */
6414
+ Action["SpotterShareConversationMenuItemSidebar"] = "spotterShareConversationMenuItemSidebar";
6415
+ /**
6416
+ * Controls visibility of the entire read-only shared-conversation data-access
6417
+ * banner shown when a recipient opens a shared view. Hide-only.
6418
+ * @example
6419
+ * ```js
6420
+ * hiddenActions: [Action.SpotterSharedConversationBanner]
6421
+ * ```
6422
+ * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
6423
+ */
6424
+ Action["SpotterSharedConversationBanner"] = "spotterSharedConversationBanner";
6425
+ /**
6426
+ * Controls visibility and disable state of the cross/close button on the
6427
+ * read-only shared-conversation data-access banner (keeps the banner itself).
6428
+ * @example
6429
+ * ```js
6430
+ * hiddenActions: [Action.SpotterSharedConversationBannerDismissButton]
6431
+ * ```
6432
+ * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
6433
+ */
6434
+ Action["SpotterSharedConversationBannerDismissButton"] = "spotterSharedConversationBannerDismissButton";
6435
+ /**
6436
+ * Controls visibility and disable state of the Exit button in the read-only
6437
+ * shared-view header. Hiding it does not disable the ExitSpotterSharedConversation
6438
+ * host event.
6439
+ * @example
6440
+ * ```js
6441
+ * hiddenActions: [Action.SpotterSharedConversationExitButton]
6442
+ * ```
6443
+ * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
6444
+ */
6445
+ Action["SpotterSharedConversationExitButton"] = "spotterSharedConversationExitButton";
6446
+ /**
6447
+ * Controls visibility of the share-modal footer note ("Chat will be shared up
6448
+ * to the current moment…"). Hide-only.
6449
+ * @example
6450
+ * ```js
6451
+ * hiddenActions: [Action.SpotterShareUpToCurrentInfo]
6452
+ * ```
6453
+ * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
6454
+ */
6455
+ Action["SpotterShareUpToCurrentInfo"] = "spotterShareUpToCurrentInfo";
6456
+ /**
6457
+ * Controls visibility and disable state of the share-modal "include new
6458
+ * messages since last shared version" checkbox.
6459
+ * @example
6460
+ * ```js
6461
+ * disabledActions: [Action.SpotterShareIncludeNewMessagesCheckbox]
6462
+ * ```
6463
+ * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
6464
+ */
6465
+ Action["SpotterShareIncludeNewMessagesCheckbox"] = "spotterShareIncludeNewMessagesCheckbox";
6466
+ /**
6467
+ * Controls visibility and disable state of the cross on the share-modal
6468
+ * stale-snapshot info banner.
6469
+ * @example
6470
+ * ```js
6471
+ * hiddenActions: [Action.SpotterShareStaleInfoBannerDismissButton]
6472
+ * ```
6473
+ * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
6474
+ */
6475
+ Action["SpotterShareStaleInfoBannerDismissButton"] = "spotterShareStaleInfoBannerDismissButton";
5883
6476
  /**
5884
6477
  * Controls visibility and disable state of the delete action
5885
6478
  * in the Spotter conversation edit menu.
@@ -5890,6 +6483,16 @@
5890
6483
  * @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
5891
6484
  */
5892
6485
  Action["SpotterChatDelete"] = "spotterChatDelete";
6486
+ /**
6487
+ * Controls visibility and disable state of the pin/unpin action
6488
+ * in the Spotter conversation edit menu.
6489
+ * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
6490
+ * @example
6491
+ * ```js
6492
+ * disabledActions: [Action.SpotterChatPin]
6493
+ * ```
6494
+ */
6495
+ Action["SpotterChatPin"] = "spotterChatPin";
5893
6496
  /**
5894
6497
  * Controls visibility and disable state of the documentation/best practices
5895
6498
  * link in the Spotter sidebar footer.
@@ -5933,6 +6536,56 @@
5933
6536
  * @version SDK: 1.48.0 | ThoughtSpot Cloud: 26.5.0.cl
5934
6537
  */
5935
6538
  Action["SpotterChatModeSwitcher"] = "spotterChatModeSwitcher";
6539
+ /**
6540
+ * The **Basic Search** starter prompt pill.
6541
+ *
6542
+ * Starter prompt pills are the row of category buttons shown above the
6543
+ * Spotter chat input before a conversation starts. They give a new user
6544
+ * ready-made questions to click instead of typing one from scratch, and
6545
+ * disappear once the conversation begins. There are three, one per action
6546
+ * below.
6547
+ *
6548
+ * Clicking this pill opens a card of suggested simple questions; picking one
6549
+ * submits it to Spotter right away. Visible by default, and hidden along
6550
+ * with the other pills when the surface itself is off (see
6551
+ * {@link SpotterChatViewConfig.starterPrompts}).
6552
+ * @example
6553
+ * ```js
6554
+ * hiddenActions: [Action.QuickSearchPill]
6555
+ * ```
6556
+ * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
6557
+ */
6558
+ Action["QuickSearchPill"] = "quickSearchPill";
6559
+ /**
6560
+ * The **Deep Analysis** starter prompt pill, next to
6561
+ * {@link Action.QuickSearchPill} above the Spotter chat input.
6562
+ *
6563
+ * Clicking it opens a card of suggested investigative questions ("why did
6564
+ * revenue drop?"). Picking one fills the chat input in Deep Analysis mode
6565
+ * rather than submitting immediately, so the user can edit it first.
6566
+ * Visible by default.
6567
+ * @example
6568
+ * ```js
6569
+ * hiddenActions: [Action.DeepAnalysisPill]
6570
+ * ```
6571
+ * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
6572
+ */
6573
+ Action["DeepAnalysisPill"] = "deepAnalysisPill";
6574
+ /**
6575
+ * The **Data Literacy** starter prompt pill, next to
6576
+ * {@link Action.QuickSearchPill} above the Spotter chat input.
6577
+ *
6578
+ * Unlike the other two pills it opens no card: clicking it submits a prompt
6579
+ * that describes the data the model can answer over, helping a user who does
6580
+ * not yet know what is in the data source. The prompt text always comes from
6581
+ * ThoughtSpot, so only its label is customizable. Visible by default.
6582
+ * @example
6583
+ * ```js
6584
+ * hiddenActions: [Action.DataLiteracyPill]
6585
+ * ```
6586
+ * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
6587
+ */
6588
+ Action["DataLiteracyPill"] = "dataLiteracyPill";
5936
6589
  /**
5937
6590
  * The **Include current period** checkbox for date filters.
5938
6591
  * Controls the visibility and availability of the option to include
@@ -6081,6 +6734,38 @@
6081
6734
  * ```
6082
6735
  */
6083
6736
  Action["SpotterAnalystSidebar"] = "spotterAnalystSidebar";
6737
+ /**
6738
+ * Controls visibility and disable state of the analyst list
6739
+ * ("Show all") in the Spotter Analyst interface.
6740
+ * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
6741
+ * @example
6742
+ * ```js
6743
+ * hiddenActions: [Action.SpotterAnalystList]
6744
+ * disabledActions: [Action.SpotterAnalystList]
6745
+ * ```
6746
+ */
6747
+ Action["SpotterAnalystList"] = "spotterAnalystList";
6748
+ /**
6749
+ * Controls visibility and disable state of the default Spotter analyst
6750
+ * entry in the Spotter Analyst interface.
6751
+ * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
6752
+ * @example
6753
+ * ```js
6754
+ * hiddenActions: [Action.SpotterDefaultAnalyst]
6755
+ * disabledActions: [Action.SpotterDefaultAnalyst]
6756
+ * ```
6757
+ */
6758
+ Action["SpotterDefaultAnalyst"] = "spotterDefaultAnalyst";
6759
+ /**
6760
+ * The **Spotter** button in the Liveboard header.
6761
+ * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
6762
+ * @example
6763
+ * ```js
6764
+ * hiddenActions: [Action.SpotterOnLiveboard]
6765
+ * disabledActions: [Action.SpotterOnLiveboard]
6766
+ * ```
6767
+ */
6768
+ Action["SpotterOnLiveboard"] = "spotterOnLiveboard";
6084
6769
  })(exports.Action || (exports.Action = {}));
6085
6770
  exports.PrefetchFeatures = void 0;
6086
6771
  (function (PrefetchFeatures) {
@@ -6368,6 +7053,8 @@
6368
7053
  EmbedErrorCodes["UPDATEFILTERS_INVALID_PAYLOAD"] = "UPDATEFILTERS_INVALID_PAYLOAD";
6369
7054
  /** DrillDown payload is invalid - missing or malformed points */
6370
7055
  EmbedErrorCodes["DRILLDOWN_INVALID_PAYLOAD"] = "DRILLDOWN_INVALID_PAYLOAD";
7056
+ /** UpdateParameters payload is invalid - malformed applicability */
7057
+ EmbedErrorCodes["UPDATEPARAMETERS_INVALID_PAYLOAD"] = "UPDATEPARAMETERS_INVALID_PAYLOAD";
6371
7058
  })(exports.EmbedErrorCodes || (exports.EmbedErrorCodes = {}));
6372
7059
  /**
6373
7060
  * Context types for specifying the page context when triggering host events.
@@ -6546,7 +7233,7 @@
6546
7233
  TableContentDensity["Compact"] = "COMPACT";
6547
7234
  })(exports.TableContentDensity || (exports.TableContentDensity = {}));
6548
7235
 
6549
- var version$1="1.50.0";var pkg = {version:version$1};
7236
+ var version$1="1.51.0-test";var pkg = {version:version$1};
6550
7237
 
6551
7238
  const { version } = pkg;
6552
7239
 
@@ -6692,7 +7379,6 @@
6692
7379
 
6693
7380
  const ERROR_MESSAGE = {
6694
7381
  INVALID_THOUGHTSPOT_HOST: 'Error parsing ThoughtSpot host. Please provide a valid URL.',
6695
- SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND: 'Please select a Model to get started',
6696
7382
  LIVEBOARD_VIZ_ID_VALIDATION: 'Please select a Liveboard to embed.',
6697
7383
  TRIGGER_TIMED_OUT: 'Trigger timed-out in getting a response',
6698
7384
  SEARCHEMBED_BETA_WRANING_MESSAGE: 'SearchEmbed is in Beta in this release.',
@@ -6722,6 +7408,7 @@
6722
7408
  INVALID_SPOTTER_DOCUMENTATION_URL: 'Invalid spotterDocumentationUrl. Please provide a valid http or https URL.',
6723
7409
  UPDATEFILTERS_INVALID_PAYLOAD: 'UpdateFilters requires a valid filter or filters array. Expected: { filter: { column, oper, values } } or { filters: [{ column, oper, values }, ...] }',
6724
7410
  DRILLDOWN_INVALID_PAYLOAD: 'DrillDown requires a valid points object. Expected: { points: { clickedPoint?, selectedPoints? }, autoDrillDown?, vizId? }',
7411
+ UPDATEPARAMETERS_INVALID_PAYLOAD: 'UpdateParameters received an invalid applicability. Expected: { level: LIVEBOARD | TAB | GROUP, targetId } where targetId is required for TAB and GROUP levels',
6725
7412
  };
6726
7413
  const CUSTOM_ACTIONS_ERROR_MESSAGE = {
6727
7414
  INVALID_ACTION_OBJECT: 'Custom Action Validation Error: Invalid action object provided',
@@ -6840,7 +7527,7 @@
6840
7527
  * @returns true if the value is a valid CSS margin value, false otherwise
6841
7528
  */
6842
7529
  const isValidCssMargin = (value) => {
6843
- if (isUndefined(value)) {
7530
+ if (isUndefined$1(value)) {
6844
7531
  return false;
6845
7532
  }
6846
7533
  if (typeof value !== 'string') {
@@ -7049,7 +7736,7 @@
7049
7736
  element.style.removeProperty(styleProperty);
7050
7737
  });
7051
7738
  };
7052
- const isUndefined = (value) => value === undefined;
7739
+ const isUndefined$1 = (value) => value === undefined;
7053
7740
  // Return if the value is a string, double or boolean.
7054
7741
  const getTypeFromValue = (value) => {
7055
7742
  if (typeof value === 'string') {
@@ -7353,8 +8040,74 @@
7353
8040
  }
7354
8041
  };
7355
8042
 
8043
+ /**
8044
+ * Copyright (c) 2023
8045
+ *
8046
+ * Utilities related to reading configuration objects
8047
+ * @summary Config-related utils
8048
+ * @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
8049
+ */
8050
+ const urlRegex = new RegExp([
8051
+ '(^(https?:)//)?',
8052
+ '(([^:/?#]*)(?::([0-9]+))?)',
8053
+ '(/{0,1}[^?#]*)',
8054
+ '(\\?[^#]*|)',
8055
+ '(#.*|)$', // hash
8056
+ ].join(''));
8057
+ /**
8058
+ * Parse and construct the ThoughtSpot hostname or IP address
8059
+ * from the embed configuration object.
8060
+ * @param config
8061
+ */
8062
+ const getThoughtSpotHost = (config) => {
8063
+ if (!config.thoughtSpotHost) {
8064
+ throw new Error(ERROR_MESSAGE.INVALID_THOUGHTSPOT_HOST);
8065
+ }
8066
+ const urlParts = config.thoughtSpotHost.match(urlRegex);
8067
+ if (!urlParts) {
8068
+ throw new Error(ERROR_MESSAGE.INVALID_THOUGHTSPOT_HOST);
8069
+ }
8070
+ const protocol = urlParts[2] || window.location.protocol;
8071
+ const host = urlParts[3];
8072
+ let path = urlParts[6];
8073
+ // Lose the trailing / if any
8074
+ if (path.charAt(path.length - 1) === '/') {
8075
+ path = path.substring(0, path.length - 1);
8076
+ }
8077
+ // const urlParams = urlParts[7];
8078
+ // const hash = urlParts[8];
8079
+ return `${protocol}//${host}${path}`;
8080
+ };
8081
+ const getV2BasePath = (config) => {
8082
+ if (config.basepath) {
8083
+ return config.basepath;
8084
+ }
8085
+ const tsHost = getThoughtSpotHost(config);
8086
+ // This is to handle when e2e's. Search is run on pods for
8087
+ // comp-blink-test-pipeline with baseUrl=https://localhost:8443.
8088
+ // This is to handle when the developer is developing in their local
8089
+ // environment.
8090
+ if (tsHost.includes('://localhost') && !tsHost.includes(':8443')) {
8091
+ return '';
8092
+ }
8093
+ return 'v2';
8094
+ };
8095
+ /**
8096
+ * It is a good idea to keep URLs under 2000 chars.
8097
+ * If this is ever breached, since we pass view configuration through
8098
+ * URL params, we would like to log a warning.
8099
+ * Reference: https://stackoverflow.com/questions/417142/what-is-the-maximum-length-of-a-url-in-different-browsers
8100
+ */
8101
+ const URL_MAX_LENGTH = 2000;
8102
+ /**
8103
+ * The default CSS dimensions of the embedded app
8104
+ */
8105
+ const DEFAULT_EMBED_WIDTH = '100%';
8106
+ const DEFAULT_EMBED_HEIGHT = '100%';
8107
+ const DEFAULT_LAZY_LOADING_MARGIN = '500px 0px';
8108
+
7356
8109
  /** Used for built-in method references. */
7357
- var objectProto$c = Object.prototype;
8110
+ var objectProto$d = Object.prototype;
7358
8111
 
7359
8112
  /**
7360
8113
  * Checks if `value` is likely a prototype object.
@@ -7365,7 +8118,7 @@
7365
8118
  */
7366
8119
  function isPrototype(value) {
7367
8120
  var Ctor = value && value.constructor,
7368
- proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$c;
8121
+ proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$d;
7369
8122
 
7370
8123
  return value === proto;
7371
8124
  }
@@ -7394,10 +8147,10 @@
7394
8147
  var _nativeKeys = nativeKeys;
7395
8148
 
7396
8149
  /** Used for built-in method references. */
7397
- var objectProto$b = Object.prototype;
8150
+ var objectProto$c = Object.prototype;
7398
8151
 
7399
8152
  /** Used to check objects for own properties. */
7400
- var hasOwnProperty$a = objectProto$b.hasOwnProperty;
8153
+ var hasOwnProperty$b = objectProto$c.hasOwnProperty;
7401
8154
 
7402
8155
  /**
7403
8156
  * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
@@ -7412,7 +8165,7 @@
7412
8165
  }
7413
8166
  var result = [];
7414
8167
  for (var key in Object(object)) {
7415
- if (hasOwnProperty$a.call(object, key) && key != 'constructor') {
8168
+ if (hasOwnProperty$b.call(object, key) && key != 'constructor') {
7416
8169
  result.push(key);
7417
8170
  }
7418
8171
  }
@@ -7448,17 +8201,17 @@
7448
8201
  var _Symbol = Symbol$1;
7449
8202
 
7450
8203
  /** Used for built-in method references. */
7451
- var objectProto$a = Object.prototype;
8204
+ var objectProto$b = Object.prototype;
7452
8205
 
7453
8206
  /** Used to check objects for own properties. */
7454
- var hasOwnProperty$9 = objectProto$a.hasOwnProperty;
8207
+ var hasOwnProperty$a = objectProto$b.hasOwnProperty;
7455
8208
 
7456
8209
  /**
7457
8210
  * Used to resolve the
7458
8211
  * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
7459
8212
  * of values.
7460
8213
  */
7461
- var nativeObjectToString$1 = objectProto$a.toString;
8214
+ var nativeObjectToString$1 = objectProto$b.toString;
7462
8215
 
7463
8216
  /** Built-in value references. */
7464
8217
  var symToStringTag$1 = _Symbol ? _Symbol.toStringTag : undefined;
@@ -7471,7 +8224,7 @@
7471
8224
  * @returns {string} Returns the raw `toStringTag`.
7472
8225
  */
7473
8226
  function getRawTag(value) {
7474
- var isOwn = hasOwnProperty$9.call(value, symToStringTag$1),
8227
+ var isOwn = hasOwnProperty$a.call(value, symToStringTag$1),
7475
8228
  tag = value[symToStringTag$1];
7476
8229
 
7477
8230
  try {
@@ -7493,14 +8246,14 @@
7493
8246
  var _getRawTag = getRawTag;
7494
8247
 
7495
8248
  /** Used for built-in method references. */
7496
- var objectProto$9 = Object.prototype;
8249
+ var objectProto$a = Object.prototype;
7497
8250
 
7498
8251
  /**
7499
8252
  * Used to resolve the
7500
8253
  * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
7501
8254
  * of values.
7502
8255
  */
7503
- var nativeObjectToString = objectProto$9.toString;
8256
+ var nativeObjectToString = objectProto$a.toString;
7504
8257
 
7505
8258
  /**
7506
8259
  * Converts `value` to a string using `Object.prototype.toString`.
@@ -7632,10 +8385,10 @@
7632
8385
  var _isMasked = isMasked;
7633
8386
 
7634
8387
  /** Used for built-in method references. */
7635
- var funcProto$1 = Function.prototype;
8388
+ var funcProto$2 = Function.prototype;
7636
8389
 
7637
8390
  /** Used to resolve the decompiled source of functions. */
7638
- var funcToString$1 = funcProto$1.toString;
8391
+ var funcToString$2 = funcProto$2.toString;
7639
8392
 
7640
8393
  /**
7641
8394
  * Converts `func` to its source code.
@@ -7647,7 +8400,7 @@
7647
8400
  function toSource(func) {
7648
8401
  if (func != null) {
7649
8402
  try {
7650
- return funcToString$1.call(func);
8403
+ return funcToString$2.call(func);
7651
8404
  } catch (e) {}
7652
8405
  try {
7653
8406
  return (func + '');
@@ -7668,18 +8421,18 @@
7668
8421
  var reIsHostCtor = /^\[object .+?Constructor\]$/;
7669
8422
 
7670
8423
  /** Used for built-in method references. */
7671
- var funcProto = Function.prototype,
7672
- objectProto$8 = Object.prototype;
8424
+ var funcProto$1 = Function.prototype,
8425
+ objectProto$9 = Object.prototype;
7673
8426
 
7674
8427
  /** Used to resolve the decompiled source of functions. */
7675
- var funcToString = funcProto.toString;
8428
+ var funcToString$1 = funcProto$1.toString;
7676
8429
 
7677
8430
  /** Used to check objects for own properties. */
7678
- var hasOwnProperty$8 = objectProto$8.hasOwnProperty;
8431
+ var hasOwnProperty$9 = objectProto$9.hasOwnProperty;
7679
8432
 
7680
8433
  /** Used to detect if a method is native. */
7681
8434
  var reIsNative = RegExp('^' +
7682
- funcToString.call(hasOwnProperty$8).replace(reRegExpChar, '\\$&')
8435
+ funcToString$1.call(hasOwnProperty$9).replace(reRegExpChar, '\\$&')
7683
8436
  .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
7684
8437
  );
7685
8438
 
@@ -7757,7 +8510,7 @@
7757
8510
 
7758
8511
  /** `Object#toString` result references. */
7759
8512
  var mapTag$3 = '[object Map]',
7760
- objectTag$2 = '[object Object]',
8513
+ objectTag$3 = '[object Object]',
7761
8514
  promiseTag = '[object Promise]',
7762
8515
  setTag$3 = '[object Set]',
7763
8516
  weakMapTag$1 = '[object WeakMap]';
@@ -7788,7 +8541,7 @@
7788
8541
  (_WeakMap && getTag(new _WeakMap) != weakMapTag$1)) {
7789
8542
  getTag = function(value) {
7790
8543
  var result = _baseGetTag(value),
7791
- Ctor = result == objectTag$2 ? value.constructor : undefined,
8544
+ Ctor = result == objectTag$3 ? value.constructor : undefined,
7792
8545
  ctorString = Ctor ? _toSource(Ctor) : '';
7793
8546
 
7794
8547
  if (ctorString) {
@@ -7853,13 +8606,13 @@
7853
8606
  var _baseIsArguments = baseIsArguments;
7854
8607
 
7855
8608
  /** Used for built-in method references. */
7856
- var objectProto$7 = Object.prototype;
8609
+ var objectProto$8 = Object.prototype;
7857
8610
 
7858
8611
  /** Used to check objects for own properties. */
7859
- var hasOwnProperty$7 = objectProto$7.hasOwnProperty;
8612
+ var hasOwnProperty$8 = objectProto$8.hasOwnProperty;
7860
8613
 
7861
8614
  /** Built-in value references. */
7862
- var propertyIsEnumerable$1 = objectProto$7.propertyIsEnumerable;
8615
+ var propertyIsEnumerable$1 = objectProto$8.propertyIsEnumerable;
7863
8616
 
7864
8617
  /**
7865
8618
  * Checks if `value` is likely an `arguments` object.
@@ -7880,7 +8633,7 @@
7880
8633
  * // => false
7881
8634
  */
7882
8635
  var isArguments = _baseIsArguments(function() { return arguments; }()) ? _baseIsArguments : function(value) {
7883
- return isObjectLike_1(value) && hasOwnProperty$7.call(value, 'callee') &&
8636
+ return isObjectLike_1(value) && hasOwnProperty$8.call(value, 'callee') &&
7884
8637
  !propertyIsEnumerable$1.call(value, 'callee');
7885
8638
  };
7886
8639
 
@@ -8046,10 +8799,10 @@
8046
8799
  funcTag = '[object Function]',
8047
8800
  mapTag$2 = '[object Map]',
8048
8801
  numberTag$1 = '[object Number]',
8049
- objectTag$1 = '[object Object]',
8802
+ objectTag$2 = '[object Object]',
8050
8803
  regexpTag$1 = '[object RegExp]',
8051
8804
  setTag$2 = '[object Set]',
8052
- stringTag$1 = '[object String]',
8805
+ stringTag$2 = '[object String]',
8053
8806
  weakMapTag = '[object WeakMap]';
8054
8807
 
8055
8808
  var arrayBufferTag$1 = '[object ArrayBuffer]',
@@ -8076,8 +8829,8 @@
8076
8829
  typedArrayTags[dataViewTag$1] = typedArrayTags[dateTag$1] =
8077
8830
  typedArrayTags[errorTag$1] = typedArrayTags[funcTag] =
8078
8831
  typedArrayTags[mapTag$2] = typedArrayTags[numberTag$1] =
8079
- typedArrayTags[objectTag$1] = typedArrayTags[regexpTag$1] =
8080
- typedArrayTags[setTag$2] = typedArrayTags[stringTag$1] =
8832
+ typedArrayTags[objectTag$2] = typedArrayTags[regexpTag$1] =
8833
+ typedArrayTags[setTag$2] = typedArrayTags[stringTag$2] =
8081
8834
  typedArrayTags[weakMapTag] = false;
8082
8835
 
8083
8836
  /**
@@ -8169,10 +8922,10 @@
8169
8922
  setTag$1 = '[object Set]';
8170
8923
 
8171
8924
  /** Used for built-in method references. */
8172
- var objectProto$6 = Object.prototype;
8925
+ var objectProto$7 = Object.prototype;
8173
8926
 
8174
8927
  /** Used to check objects for own properties. */
8175
- var hasOwnProperty$6 = objectProto$6.hasOwnProperty;
8928
+ var hasOwnProperty$7 = objectProto$7.hasOwnProperty;
8176
8929
 
8177
8930
  /**
8178
8931
  * Checks if `value` is an empty object, collection, map, or set.
@@ -8224,7 +8977,7 @@
8224
8977
  return !_baseKeys(value).length;
8225
8978
  }
8226
8979
  for (var key in value) {
8227
- if (hasOwnProperty$6.call(value, key)) {
8980
+ if (hasOwnProperty$7.call(value, key)) {
8228
8981
  return false;
8229
8982
  }
8230
8983
  }
@@ -8233,6 +8986,15 @@
8233
8986
 
8234
8987
  var isEmpty_1 = isEmpty$1;
8235
8988
 
8989
+ /**
8990
+ * Levels at which a filter or parameter can be applied.
8991
+ */
8992
+ exports.ApplicabilityLevel = void 0;
8993
+ (function (ApplicabilityLevel) {
8994
+ ApplicabilityLevel["Liveboard"] = "LIVEBOARD";
8995
+ ApplicabilityLevel["Tab"] = "TAB";
8996
+ ApplicabilityLevel["Group"] = "GROUP";
8997
+ })(exports.ApplicabilityLevel || (exports.ApplicabilityLevel = {}));
8236
8998
  exports.UIPassthroughEvent = void 0;
8237
8999
  (function (UIPassthroughEvent) {
8238
9000
  UIPassthroughEvent["PinAnswerToLiveboard"] = "addVizToPinboard";
@@ -8250,6 +9012,7 @@
8250
9012
  UIPassthroughEvent["GetParameters"] = "getParameters";
8251
9013
  UIPassthroughEvent["GetTML"] = "getTML";
8252
9014
  UIPassthroughEvent["GetTabs"] = "getTabs";
9015
+ UIPassthroughEvent["GetGroups"] = "getGroups";
8253
9016
  UIPassthroughEvent["GetExportRequestForCurrentPinboard"] = "getExportRequestForCurrentPinboard";
8254
9017
  })(exports.UIPassthroughEvent || (exports.UIPassthroughEvent = {}));
8255
9018
 
@@ -9470,10 +10233,10 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
9470
10233
  var HASH_UNDEFINED$2 = '__lodash_hash_undefined__';
9471
10234
 
9472
10235
  /** Used for built-in method references. */
9473
- var objectProto$5 = Object.prototype;
10236
+ var objectProto$6 = Object.prototype;
9474
10237
 
9475
10238
  /** Used to check objects for own properties. */
9476
- var hasOwnProperty$5 = objectProto$5.hasOwnProperty;
10239
+ var hasOwnProperty$6 = objectProto$6.hasOwnProperty;
9477
10240
 
9478
10241
  /**
9479
10242
  * Gets the hash value for `key`.
@@ -9490,16 +10253,16 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
9490
10253
  var result = data[key];
9491
10254
  return result === HASH_UNDEFINED$2 ? undefined : result;
9492
10255
  }
9493
- return hasOwnProperty$5.call(data, key) ? data[key] : undefined;
10256
+ return hasOwnProperty$6.call(data, key) ? data[key] : undefined;
9494
10257
  }
9495
10258
 
9496
10259
  var _hashGet = hashGet;
9497
10260
 
9498
10261
  /** Used for built-in method references. */
9499
- var objectProto$4 = Object.prototype;
10262
+ var objectProto$5 = Object.prototype;
9500
10263
 
9501
10264
  /** Used to check objects for own properties. */
9502
- var hasOwnProperty$4 = objectProto$4.hasOwnProperty;
10265
+ var hasOwnProperty$5 = objectProto$5.hasOwnProperty;
9503
10266
 
9504
10267
  /**
9505
10268
  * Checks if a hash value for `key` exists.
@@ -9512,7 +10275,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
9512
10275
  */
9513
10276
  function hashHas(key) {
9514
10277
  var data = this.__data__;
9515
- return _nativeCreate ? (data[key] !== undefined) : hasOwnProperty$4.call(data, key);
10278
+ return _nativeCreate ? (data[key] !== undefined) : hasOwnProperty$5.call(data, key);
9516
10279
  }
9517
10280
 
9518
10281
  var _hashHas = hashHas;
@@ -10487,7 +11250,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
10487
11250
  numberTag = '[object Number]',
10488
11251
  regexpTag = '[object RegExp]',
10489
11252
  setTag = '[object Set]',
10490
- stringTag = '[object String]',
11253
+ stringTag$1 = '[object String]',
10491
11254
  symbolTag = '[object Symbol]';
10492
11255
 
10493
11256
  var arrayBufferTag = '[object ArrayBuffer]',
@@ -10542,7 +11305,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
10542
11305
  return object.name == other.name && object.message == other.message;
10543
11306
 
10544
11307
  case regexpTag:
10545
- case stringTag:
11308
+ case stringTag$1:
10546
11309
  // Coerce regexes to strings and treat strings, primitives and objects,
10547
11310
  // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
10548
11311
  // for more details.
@@ -10650,10 +11413,10 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
10650
11413
  var stubArray_1 = stubArray;
10651
11414
 
10652
11415
  /** Used for built-in method references. */
10653
- var objectProto$3 = Object.prototype;
11416
+ var objectProto$4 = Object.prototype;
10654
11417
 
10655
11418
  /** Built-in value references. */
10656
- var propertyIsEnumerable = objectProto$3.propertyIsEnumerable;
11419
+ var propertyIsEnumerable = objectProto$4.propertyIsEnumerable;
10657
11420
 
10658
11421
  /* Built-in method references for those with the same name as other `lodash` methods. */
10659
11422
  var nativeGetSymbols = Object.getOwnPropertySymbols;
@@ -10725,10 +11488,10 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
10725
11488
  var _isIndex = isIndex;
10726
11489
 
10727
11490
  /** Used for built-in method references. */
10728
- var objectProto$2 = Object.prototype;
11491
+ var objectProto$3 = Object.prototype;
10729
11492
 
10730
11493
  /** Used to check objects for own properties. */
10731
- var hasOwnProperty$3 = objectProto$2.hasOwnProperty;
11494
+ var hasOwnProperty$4 = objectProto$3.hasOwnProperty;
10732
11495
 
10733
11496
  /**
10734
11497
  * Creates an array of the enumerable property names of the array-like `value`.
@@ -10748,7 +11511,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
10748
11511
  length = result.length;
10749
11512
 
10750
11513
  for (var key in value) {
10751
- if ((inherited || hasOwnProperty$3.call(value, key)) &&
11514
+ if ((inherited || hasOwnProperty$4.call(value, key)) &&
10752
11515
  !(skipIndexes && (
10753
11516
  // Safari 9 has enumerable `arguments.length` in strict mode.
10754
11517
  key == 'length' ||
@@ -10818,10 +11581,10 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
10818
11581
  var COMPARE_PARTIAL_FLAG$3 = 1;
10819
11582
 
10820
11583
  /** Used for built-in method references. */
10821
- var objectProto$1 = Object.prototype;
11584
+ var objectProto$2 = Object.prototype;
10822
11585
 
10823
11586
  /** Used to check objects for own properties. */
10824
- var hasOwnProperty$2 = objectProto$1.hasOwnProperty;
11587
+ var hasOwnProperty$3 = objectProto$2.hasOwnProperty;
10825
11588
 
10826
11589
  /**
10827
11590
  * A specialized version of `baseIsEqualDeep` for objects with support for
@@ -10849,7 +11612,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
10849
11612
  var index = objLength;
10850
11613
  while (index--) {
10851
11614
  var key = objProps[index];
10852
- if (!(isPartial ? key in other : hasOwnProperty$2.call(other, key))) {
11615
+ if (!(isPartial ? key in other : hasOwnProperty$3.call(other, key))) {
10853
11616
  return false;
10854
11617
  }
10855
11618
  }
@@ -10909,13 +11672,13 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
10909
11672
  /** `Object#toString` result references. */
10910
11673
  var argsTag = '[object Arguments]',
10911
11674
  arrayTag = '[object Array]',
10912
- objectTag = '[object Object]';
11675
+ objectTag$1 = '[object Object]';
10913
11676
 
10914
11677
  /** Used for built-in method references. */
10915
- var objectProto = Object.prototype;
11678
+ var objectProto$1 = Object.prototype;
10916
11679
 
10917
11680
  /** Used to check objects for own properties. */
10918
- var hasOwnProperty$1 = objectProto.hasOwnProperty;
11681
+ var hasOwnProperty$2 = objectProto$1.hasOwnProperty;
10919
11682
 
10920
11683
  /**
10921
11684
  * A specialized version of `baseIsEqual` for arrays and objects which performs
@@ -10937,11 +11700,11 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
10937
11700
  objTag = objIsArr ? arrayTag : _getTag(object),
10938
11701
  othTag = othIsArr ? arrayTag : _getTag(other);
10939
11702
 
10940
- objTag = objTag == argsTag ? objectTag : objTag;
10941
- othTag = othTag == argsTag ? objectTag : othTag;
11703
+ objTag = objTag == argsTag ? objectTag$1 : objTag;
11704
+ othTag = othTag == argsTag ? objectTag$1 : othTag;
10942
11705
 
10943
- var objIsObj = objTag == objectTag,
10944
- othIsObj = othTag == objectTag,
11706
+ var objIsObj = objTag == objectTag$1,
11707
+ othIsObj = othTag == objectTag$1,
10945
11708
  isSameTag = objTag == othTag;
10946
11709
 
10947
11710
  if (isSameTag && isBuffer_1(object)) {
@@ -10958,8 +11721,8 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
10958
11721
  : _equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
10959
11722
  }
10960
11723
  if (!(bitmask & COMPARE_PARTIAL_FLAG$2)) {
10961
- var objIsWrapped = objIsObj && hasOwnProperty$1.call(object, '__wrapped__'),
10962
- othIsWrapped = othIsObj && hasOwnProperty$1.call(other, '__wrapped__');
11724
+ var objIsWrapped = objIsObj && hasOwnProperty$2.call(object, '__wrapped__'),
11725
+ othIsWrapped = othIsObj && hasOwnProperty$2.call(other, '__wrapped__');
10963
11726
 
10964
11727
  if (objIsWrapped || othIsWrapped) {
10965
11728
  var objUnwrapped = objIsWrapped ? object.value() : object,
@@ -12019,122 +12782,57 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
12019
12782
  return { actions: actionsWithUniqueIds, errors };
12020
12783
  };
12021
12784
  /**
12022
- * Validates and processes custom actions
12023
- * @param customActions - Array of custom actions to validate
12024
- * @returns Object containing valid actions and any validation errors
12025
- */
12026
- const getCustomActions = (customActions) => {
12027
- const errors = [];
12028
- if (!customActions || !Array.isArray(customActions)) {
12029
- return { actions: [], errors: [] };
12030
- }
12031
- // Step 1: Handle invalid actions first (null, undefined, missing required
12032
- // fields)
12033
- const validActions = customActions.filter(action => {
12034
- const validation = validateActionStructure(action);
12035
- if (!validation.isValid) {
12036
- if (!action || typeof action !== 'object') {
12037
- errors.push(CUSTOM_ACTIONS_ERROR_MESSAGE.INVALID_ACTION_OBJECT);
12038
- }
12039
- else {
12040
- errors.push(CUSTOM_ACTIONS_ERROR_MESSAGE.MISSING_REQUIRED_FIELDS(action.id, validation.missingFields));
12041
- }
12042
- return false;
12043
- }
12044
- return true;
12045
- });
12046
- // Step 2: Check for duplicate IDs among valid actions
12047
- const { actions: actionsWithUniqueIds, errors: duplicateErrors } = filterDuplicateIds(validActions);
12048
- // Add duplicate errors to the errors array
12049
- duplicateErrors.forEach(error => errors.push(error));
12050
- // Step 3: Validate actions with unique IDs
12051
- const finalValidActions = [];
12052
- actionsWithUniqueIds.forEach((action) => {
12053
- const { isValid, errors: validationErrors } = validateCustomAction(action);
12054
- validationErrors.forEach(error => errors.push(error));
12055
- if (isValid) {
12056
- finalValidActions.push(action);
12057
- }
12058
- });
12059
- // Step 4: Collect warnings for long custom action names
12060
- const MAX_ACTION_NAME_LENGTH = 30;
12061
- const warnings = finalValidActions
12062
- .filter(action => action.name.length > MAX_ACTION_NAME_LENGTH)
12063
- .map(action => `Custom action name '${action.name}' exceeds ${MAX_ACTION_NAME_LENGTH} characters. This may cause display or truncation issues in the UI.`);
12064
- if (warnings.length > 0) {
12065
- logger$3.warn(warnings);
12066
- }
12067
- const sortedActions = sortBy_1(finalValidActions, (a) => a.name.toLocaleLowerCase());
12068
- return {
12069
- actions: sortedActions,
12070
- errors: errors,
12071
- };
12072
- };
12073
-
12074
- /**
12075
- * Copyright (c) 2023
12076
- *
12077
- * Utilities related to reading configuration objects
12078
- * @summary Config-related utils
12079
- * @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
12080
- */
12081
- const urlRegex = new RegExp([
12082
- '(^(https?:)//)?',
12083
- '(([^:/?#]*)(?::([0-9]+))?)',
12084
- '(/{0,1}[^?#]*)',
12085
- '(\\?[^#]*|)',
12086
- '(#.*|)$', // hash
12087
- ].join(''));
12088
- /**
12089
- * Parse and construct the ThoughtSpot hostname or IP address
12090
- * from the embed configuration object.
12091
- * @param config
12092
- */
12093
- const getThoughtSpotHost = (config) => {
12094
- if (!config.thoughtSpotHost) {
12095
- throw new Error(ERROR_MESSAGE.INVALID_THOUGHTSPOT_HOST);
12096
- }
12097
- const urlParts = config.thoughtSpotHost.match(urlRegex);
12098
- if (!urlParts) {
12099
- throw new Error(ERROR_MESSAGE.INVALID_THOUGHTSPOT_HOST);
12100
- }
12101
- const protocol = urlParts[2] || window.location.protocol;
12102
- const host = urlParts[3];
12103
- let path = urlParts[6];
12104
- // Lose the trailing / if any
12105
- if (path.charAt(path.length - 1) === '/') {
12106
- path = path.substring(0, path.length - 1);
12107
- }
12108
- // const urlParams = urlParts[7];
12109
- // const hash = urlParts[8];
12110
- return `${protocol}//${host}${path}`;
12111
- };
12112
- const getV2BasePath = (config) => {
12113
- if (config.basepath) {
12114
- return config.basepath;
12115
- }
12116
- const tsHost = getThoughtSpotHost(config);
12117
- // This is to handle when e2e's. Search is run on pods for
12118
- // comp-blink-test-pipeline with baseUrl=https://localhost:8443.
12119
- // This is to handle when the developer is developing in their local
12120
- // environment.
12121
- if (tsHost.includes('://localhost') && !tsHost.includes(':8443')) {
12122
- return '';
12123
- }
12124
- return 'v2';
12125
- };
12126
- /**
12127
- * It is a good idea to keep URLs under 2000 chars.
12128
- * If this is ever breached, since we pass view configuration through
12129
- * URL params, we would like to log a warning.
12130
- * Reference: https://stackoverflow.com/questions/417142/what-is-the-maximum-length-of-a-url-in-different-browsers
12131
- */
12132
- const URL_MAX_LENGTH = 2000;
12133
- /**
12134
- * The default CSS dimensions of the embedded app
12785
+ * Validates and processes custom actions
12786
+ * @param customActions - Array of custom actions to validate
12787
+ * @returns Object containing valid actions and any validation errors
12135
12788
  */
12136
- const DEFAULT_EMBED_WIDTH = '100%';
12137
- const DEFAULT_EMBED_HEIGHT = '100%';
12789
+ const getCustomActions = (customActions) => {
12790
+ const errors = [];
12791
+ if (!customActions || !Array.isArray(customActions)) {
12792
+ return { actions: [], errors: [] };
12793
+ }
12794
+ // Step 1: Handle invalid actions first (null, undefined, missing required
12795
+ // fields)
12796
+ const validActions = customActions.filter(action => {
12797
+ const validation = validateActionStructure(action);
12798
+ if (!validation.isValid) {
12799
+ if (!action || typeof action !== 'object') {
12800
+ errors.push(CUSTOM_ACTIONS_ERROR_MESSAGE.INVALID_ACTION_OBJECT);
12801
+ }
12802
+ else {
12803
+ errors.push(CUSTOM_ACTIONS_ERROR_MESSAGE.MISSING_REQUIRED_FIELDS(action.id, validation.missingFields));
12804
+ }
12805
+ return false;
12806
+ }
12807
+ return true;
12808
+ });
12809
+ // Step 2: Check for duplicate IDs among valid actions
12810
+ const { actions: actionsWithUniqueIds, errors: duplicateErrors } = filterDuplicateIds(validActions);
12811
+ // Add duplicate errors to the errors array
12812
+ duplicateErrors.forEach(error => errors.push(error));
12813
+ // Step 3: Validate actions with unique IDs
12814
+ const finalValidActions = [];
12815
+ actionsWithUniqueIds.forEach((action) => {
12816
+ const { isValid, errors: validationErrors } = validateCustomAction(action);
12817
+ validationErrors.forEach(error => errors.push(error));
12818
+ if (isValid) {
12819
+ finalValidActions.push(action);
12820
+ }
12821
+ });
12822
+ // Step 4: Collect warnings for long custom action names
12823
+ const MAX_ACTION_NAME_LENGTH = 30;
12824
+ const warnings = finalValidActions
12825
+ .filter(action => action.name.length > MAX_ACTION_NAME_LENGTH)
12826
+ .map(action => `Custom action name '${action.name}' exceeds ${MAX_ACTION_NAME_LENGTH} characters. This may cause display or truncation issues in the UI.`);
12827
+ if (warnings.length > 0) {
12828
+ logger$3.warn(warnings);
12829
+ }
12830
+ const sortedActions = sortBy_1(finalValidActions, (a) => a.name.toLocaleLowerCase());
12831
+ return {
12832
+ actions: sortedActions,
12833
+ errors: errors,
12834
+ };
12835
+ };
12138
12836
 
12139
12837
  var Config = {
12140
12838
  DEBUG: false,
@@ -12170,7 +12868,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
12170
12868
  var ObjProto = Object.prototype;
12171
12869
  var slice = ArrayProto.slice;
12172
12870
  var toString = ObjProto.toString;
12173
- var hasOwnProperty = ObjProto.hasOwnProperty;
12871
+ var hasOwnProperty$1 = ObjProto.hasOwnProperty;
12174
12872
  var windowConsole = window$1.console;
12175
12873
  var navigator = window$1.navigator;
12176
12874
  var document$1 = window$1.document;
@@ -12307,7 +13005,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
12307
13005
  }
12308
13006
  } else {
12309
13007
  for (var key in obj) {
12310
- if (hasOwnProperty.call(obj, key)) {
13008
+ if (hasOwnProperty$1.call(obj, key)) {
12311
13009
  if (iterator.call(context, obj[key], key, obj) === breaker) {
12312
13010
  return;
12313
13011
  }
@@ -12343,7 +13041,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
12343
13041
  };
12344
13042
 
12345
13043
  _.isArguments = function(obj) {
12346
- return !!(obj && hasOwnProperty.call(obj, 'callee'));
13044
+ return !!(obj && hasOwnProperty$1.call(obj, 'callee'));
12347
13045
  };
12348
13046
 
12349
13047
  _.toArray = function(iterable) {
@@ -12431,7 +13129,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
12431
13129
  _.isEmptyObject = function(obj) {
12432
13130
  if (_.isObject(obj)) {
12433
13131
  for (var key in obj) {
12434
- if (hasOwnProperty.call(obj, key)) {
13132
+ if (hasOwnProperty$1.call(obj, key)) {
12435
13133
  return false;
12436
13134
  }
12437
13135
  }
@@ -12623,7 +13321,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
12623
13321
 
12624
13322
  // Iterate through all of the keys in the object.
12625
13323
  for (k in value) {
12626
- if (hasOwnProperty.call(value, k)) {
13324
+ if (hasOwnProperty$1.call(value, k)) {
12627
13325
  v = str(k, value);
12628
13326
  if (v) {
12629
13327
  partial.push(quote(k) + (gap ? ': ' : ':') + v);
@@ -18292,6 +18990,10 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
18292
18990
  VISUAL_SDK_IFRAME_LOAD_PERFORMANCE: 'visual-sdk-iframe-load-performance',
18293
18991
  VISUAL_SDK_EMBED_CREATE: 'visual-sdk-embed-create',
18294
18992
  VERCEL_INTEGRATION_COMPLETED: 'vercel-integration-completed',
18993
+ VISUAL_SDK_RENDER_CALLED: 'visual-sdk-render-called',
18994
+ VISUAL_SDK_PRE_RENDER: 'visual-sdk-pre-render',
18995
+ VISUAL_SDK_SHOW_PRE_RENDER: 'visual-sdk-show-pre-render',
18996
+ VISUAL_SDK_HIDE_PRE_RENDER: 'visual-sdk-hide-pre-render',
18295
18997
  };
18296
18998
  let isMixpanelInitialized = false;
18297
18999
  let eventQueue = [];
@@ -19693,7 +20395,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
19693
20395
  /**
19694
20396
  * Initializes the Visual Embed SDK globally and perform
19695
20397
  * authentication if applicable. This function needs to be called before any ThoughtSpot
19696
- * component like Liveboard etc can be embedded. But need not wait for AuthEvent.SUCCESS
20398
+ * component like Liveboard etc can be embedded. But need not wait for AuthStatus.SUCCESS
19697
20399
  * to actually embed. That is handled internally.
19698
20400
  * @param embedConfig The configuration object containing ThoughtSpot host,
19699
20401
  * authentication mechanism and so on.
@@ -20044,6 +20746,154 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
20044
20746
  return eventData;
20045
20747
  }
20046
20748
 
20749
+ /**
20750
+ * Checks if `value` is `null` or `undefined`.
20751
+ *
20752
+ * @static
20753
+ * @memberOf _
20754
+ * @since 4.0.0
20755
+ * @category Lang
20756
+ * @param {*} value The value to check.
20757
+ * @returns {boolean} Returns `true` if `value` is nullish, else `false`.
20758
+ * @example
20759
+ *
20760
+ * _.isNil(null);
20761
+ * // => true
20762
+ *
20763
+ * _.isNil(void 0);
20764
+ * // => true
20765
+ *
20766
+ * _.isNil(NaN);
20767
+ * // => false
20768
+ */
20769
+ function isNil(value) {
20770
+ return value == null;
20771
+ }
20772
+
20773
+ var isNil_1 = isNil;
20774
+
20775
+ /** Built-in value references. */
20776
+ var getPrototype = _overArg(Object.getPrototypeOf, Object);
20777
+
20778
+ var _getPrototype = getPrototype;
20779
+
20780
+ /** `Object#toString` result references. */
20781
+ var objectTag = '[object Object]';
20782
+
20783
+ /** Used for built-in method references. */
20784
+ var funcProto = Function.prototype,
20785
+ objectProto = Object.prototype;
20786
+
20787
+ /** Used to resolve the decompiled source of functions. */
20788
+ var funcToString = funcProto.toString;
20789
+
20790
+ /** Used to check objects for own properties. */
20791
+ var hasOwnProperty = objectProto.hasOwnProperty;
20792
+
20793
+ /** Used to infer the `Object` constructor. */
20794
+ var objectCtorString = funcToString.call(Object);
20795
+
20796
+ /**
20797
+ * Checks if `value` is a plain object, that is, an object created by the
20798
+ * `Object` constructor or one with a `[[Prototype]]` of `null`.
20799
+ *
20800
+ * @static
20801
+ * @memberOf _
20802
+ * @since 0.8.0
20803
+ * @category Lang
20804
+ * @param {*} value The value to check.
20805
+ * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
20806
+ * @example
20807
+ *
20808
+ * function Foo() {
20809
+ * this.a = 1;
20810
+ * }
20811
+ *
20812
+ * _.isPlainObject(new Foo);
20813
+ * // => false
20814
+ *
20815
+ * _.isPlainObject([1, 2, 3]);
20816
+ * // => false
20817
+ *
20818
+ * _.isPlainObject({ 'x': 0, 'y': 0 });
20819
+ * // => true
20820
+ *
20821
+ * _.isPlainObject(Object.create(null));
20822
+ * // => true
20823
+ */
20824
+ function isPlainObject(value) {
20825
+ if (!isObjectLike_1(value) || _baseGetTag(value) != objectTag) {
20826
+ return false;
20827
+ }
20828
+ var proto = _getPrototype(value);
20829
+ if (proto === null) {
20830
+ return true;
20831
+ }
20832
+ var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
20833
+ return typeof Ctor == 'function' && Ctor instanceof Ctor &&
20834
+ funcToString.call(Ctor) == objectCtorString;
20835
+ }
20836
+
20837
+ var isPlainObject_1 = isPlainObject;
20838
+
20839
+ /** `Object#toString` result references. */
20840
+ var stringTag = '[object String]';
20841
+
20842
+ /**
20843
+ * Checks if `value` is classified as a `String` primitive or object.
20844
+ *
20845
+ * @static
20846
+ * @since 0.1.0
20847
+ * @memberOf _
20848
+ * @category Lang
20849
+ * @param {*} value The value to check.
20850
+ * @returns {boolean} Returns `true` if `value` is a string, else `false`.
20851
+ * @example
20852
+ *
20853
+ * _.isString('abc');
20854
+ * // => true
20855
+ *
20856
+ * _.isString(1);
20857
+ * // => false
20858
+ */
20859
+ function isString(value) {
20860
+ return typeof value == 'string' ||
20861
+ (!isArray_1(value) && isObjectLike_1(value) && _baseGetTag(value) == stringTag);
20862
+ }
20863
+
20864
+ var isString_1 = isString;
20865
+
20866
+ /**
20867
+ * Checks if `value` is `undefined`.
20868
+ *
20869
+ * @static
20870
+ * @since 0.1.0
20871
+ * @memberOf _
20872
+ * @category Lang
20873
+ * @param {*} value The value to check.
20874
+ * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
20875
+ * @example
20876
+ *
20877
+ * _.isUndefined(void 0);
20878
+ * // => true
20879
+ *
20880
+ * _.isUndefined(null);
20881
+ * // => false
20882
+ */
20883
+ function isUndefined(value) {
20884
+ return value === undefined;
20885
+ }
20886
+
20887
+ var isUndefined_1 = isUndefined;
20888
+
20889
+ const isValidApplicability = (a) => {
20890
+ if (isUndefined_1(a))
20891
+ return true;
20892
+ // targetId is not required at LIVEBOARD level, since the filter applies to the whole Liveboard
20893
+ return isPlainObject_1(a)
20894
+ && Object.values(exports.ApplicabilityLevel).includes(a.level)
20895
+ && (a.level === exports.ApplicabilityLevel.Liveboard || (isString_1(a.targetId) && a.targetId.trim().length > 0));
20896
+ };
20047
20897
  function isValidUpdateFiltersPayload(payload) {
20048
20898
  if (!payload)
20049
20899
  return false;
@@ -20052,12 +20902,23 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
20052
20902
  const hasOperator = typeof f.oper === 'string' || typeof f.operator === 'string';
20053
20903
  const hasValues = Array.isArray(f.values);
20054
20904
  const validType = !f.type || typeof f.type === 'string';
20055
- return hasColumn && hasOperator && hasValues && validType;
20905
+ return hasColumn && hasOperator && hasValues && validType && isValidApplicability(f.applicability);
20056
20906
  };
20057
20907
  const hasValidFilter = payload.filter && isValidFilter(payload.filter);
20058
20908
  const hasValidFilters = Array.isArray(payload.filters) && payload.filters.length > 0 && payload.filters.every(isValidFilter);
20059
20909
  return !!(hasValidFilter || hasValidFilters);
20060
20910
  }
20911
+ function isValidUpdateParametersPayload(payload) {
20912
+ // Only validates the applicability of each parameter (null treated as absent); the rest is forwarded as-is for backward compatibility.
20913
+ if (!Array.isArray(payload))
20914
+ return true;
20915
+ return payload.every((p) => {
20916
+ if (!isPlainObject_1(p))
20917
+ return true;
20918
+ const { applicability } = p;
20919
+ return isNil_1(applicability) || isValidApplicability(applicability);
20920
+ });
20921
+ }
20061
20922
  function isValidDrillDownPayload(payload) {
20062
20923
  if (!payload)
20063
20924
  return false;
@@ -20088,6 +20949,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
20088
20949
  }
20089
20950
  function throwDrillDownValidationError() {
20090
20951
  createValidationError(ERROR_MESSAGE.DRILLDOWN_INVALID_PAYLOAD);
20952
+ }
20953
+ function throwUpdateParametersValidationError() {
20954
+ createValidationError(ERROR_MESSAGE.UPDATEPARAMETERS_INVALID_PAYLOAD);
20091
20955
  }
20092
20956
 
20093
20957
  /**
@@ -20108,6 +20972,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
20108
20972
  [exports.HostEvent.GetParameters]: exports.UIPassthroughEvent.GetParameters,
20109
20973
  [exports.HostEvent.GetTML]: exports.UIPassthroughEvent.GetTML,
20110
20974
  [exports.HostEvent.GetTabs]: exports.UIPassthroughEvent.GetTabs,
20975
+ [exports.HostEvent.GetGroups]: exports.UIPassthroughEvent.GetGroups,
20111
20976
  [exports.HostEvent.getExportRequestForCurrentPinboard]: exports.UIPassthroughEvent.GetExportRequestForCurrentPinboard,
20112
20977
  };
20113
20978
  class HostEventClient {
@@ -20119,6 +20984,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
20119
20984
  [exports.HostEvent.Pin]: (p, c) => this.handlePinEvent(p, c),
20120
20985
  [exports.HostEvent.SaveAnswer]: (p, c) => this.handleSaveAnswerEvent(p, c),
20121
20986
  [exports.HostEvent.UpdateFilters]: (p, c) => this.handleUpdateFiltersEvent(p, c),
20987
+ [exports.HostEvent.UpdateParameters]: (p, c) => this.handleUpdateParametersEvent(p, c),
20122
20988
  [exports.HostEvent.DrillDown]: (p, c) => this.handleDrillDownEvent(p, c),
20123
20989
  };
20124
20990
  }
@@ -20243,6 +21109,13 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
20243
21109
  }
20244
21110
  return this.handleHostEventWithParam(exports.UIPassthroughEvent.UpdateFilters, payload, context);
20245
21111
  }
21112
+ handleUpdateParametersEvent(payload, context) {
21113
+ if (!isValidUpdateParametersPayload(payload)) {
21114
+ throwUpdateParametersValidationError();
21115
+ }
21116
+ // UpdateParameters has no UI passthrough contract; dispatch over the legacy channel
21117
+ return this.hostEventFallback(exports.HostEvent.UpdateParameters, payload, context);
21118
+ }
20246
21119
  handleDrillDownEvent(payload, context) {
20247
21120
  if (!isValidDrillDownPayload(payload)) {
20248
21121
  throwDrillDownValidationError();
@@ -20502,7 +21375,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
20502
21375
  */
20503
21376
  this.shouldEncodeUrlQueryParams = false;
20504
21377
  this.defaultHiddenActions = [exports.Action.ReportError];
20505
- this.preRenderContainerEl = null;
21378
+ this.preRenderContainerEl = document.body;
20506
21379
  this.containerScrollListener = null;
20507
21380
  /**
20508
21381
  * Handler for fullscreen change events
@@ -21028,7 +21901,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
21028
21901
  if (this.embedConfig.currencyFormat) {
21029
21902
  queryParams[Param.CurrencyFormat] = this.embedConfig.currencyFormat;
21030
21903
  }
21031
- const { disabledActions, disabledActionReason, hiddenActions, visibleActions, hiddenTabs, visibleTabs, showAlerts, additionalFlags: additionalFlagsFromView, locale, customizations, contextMenuTrigger, linkOverride, enableLinkOverridesV2, insertInToSlide, disableRedirectionLinksInNewTab, overrideOrgId, exposeTranslationIDs, primaryAction, } = this.viewConfig;
21904
+ const { disabledActions, disabledActionReason, hiddenActions, visibleActions, hiddenTabs, visibleTabs, showAlerts, additionalFlags: additionalFlagsFromView, locale, customizations, contextMenuTrigger, linkOverride, enableLinkOverridesV2, insertInToSlide, disableRedirectionLinksInNewTab, overrideOrgId, overrideHistoryState, exposeTranslationIDs, primaryAction, } = this.viewConfig;
21032
21905
  const { additionalFlags: additionalFlagsFromInit } = this.embedConfig;
21033
21906
  const additionalFlags = {
21034
21907
  ...additionalFlagsFromInit,
@@ -21116,6 +21989,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
21116
21989
  if (overrideOrgId !== undefined) {
21117
21990
  queryParams[Param.OverrideOrgId] = overrideOrgId;
21118
21991
  }
21992
+ if (overrideHistoryState !== undefined) {
21993
+ queryParams[Param.OverrideHistoryState] = overrideHistoryState;
21994
+ }
21119
21995
  if (this.isPreAuthCacheEnabled()) {
21120
21996
  queryParams[Param.preAuthCache] = true;
21121
21997
  }
@@ -21187,11 +22063,27 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
21187
22063
  iFrame.name = 'ThoughtSpot Embedded Analytics';
21188
22064
  return iFrame;
21189
22065
  }
22066
+ /**
22067
+ * Returns a merged {@link PreRenderConfig} object where each shared key
22068
+ * prefers `preRenderConfig.key` over the top-level `viewConfig.key` for
22069
+ * backward compatibility.
22070
+ */
22071
+ getPreRenderConfig() {
22072
+ var _a, _b, _c, _d;
22073
+ const viewCfg = this.viewConfig;
22074
+ const preRenderCfg = (_a = viewCfg.preRenderConfig) !== null && _a !== void 0 ? _a : {};
22075
+ return {
22076
+ ...preRenderCfg,
22077
+ preRenderId: (_b = preRenderCfg.preRenderId) !== null && _b !== void 0 ? _b : viewCfg.preRenderId,
22078
+ preRenderContainer: (_c = preRenderCfg.preRenderContainer) !== null && _c !== void 0 ? _c : viewCfg.preRenderContainer,
22079
+ doNotTrackPreRenderSize: (_d = preRenderCfg.doNotTrackPreRenderSize) !== null && _d !== void 0 ? _d : viewCfg.doNotTrackPreRenderSize,
22080
+ };
22081
+ }
21190
22082
  /**
21191
22083
  * Returns true if this embed instance is configured for pre-rendering.
21192
22084
  */
21193
22085
  isPreRenderEmbed() {
21194
- return !!this.viewConfig.preRenderId;
22086
+ return !!this.getPreRenderConfig().preRenderId;
21195
22087
  }
21196
22088
  handleInsertionIntoDOM(child) {
21197
22089
  if (this.isPreRenderEmbed()) {
@@ -21327,6 +22219,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
21327
22219
  this.setIframeElement(this.preRenderChild);
21328
22220
  }
21329
22221
  this.isRendered = true;
22222
+ this.inheritPreRenderContainer();
21330
22223
  }
21331
22224
  return this.isPreRenderConnected();
21332
22225
  }
@@ -21377,7 +22270,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
21377
22270
  */
21378
22271
  resolvePreRenderContainerTarget() {
21379
22272
  var _a;
21380
- const containerConfig = this.viewConfig.preRenderContainer;
22273
+ const containerConfig = this.getPreRenderConfig().preRenderContainer;
21381
22274
  let container = null;
21382
22275
  if (typeof containerConfig === 'string') {
21383
22276
  try {
@@ -21395,15 +22288,35 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
21395
22288
  }
21396
22289
  return (_a = container) !== null && _a !== void 0 ? _a : document.body;
21397
22290
  }
22291
+ inheritPreRenderContainer() {
22292
+ var _a;
22293
+ const preRenderedObject = this.getPreRenderObj();
22294
+ if (!preRenderedObject || preRenderedObject === this) {
22295
+ return;
22296
+ }
22297
+ const ownerContainer = (_a = preRenderedObject.preRenderContainerEl) !== null && _a !== void 0 ? _a : document.body;
22298
+ if (this.getPreRenderConfig().preRenderContainer
22299
+ && this.resolvePreRenderContainerTarget() !== ownerContainer) {
22300
+ logger$3.warn('preRenderContainer is applied only by the component that creates the preRender; '
22301
+ + 'the one passed here is ignored. Set it on the PreRender component instead.');
22302
+ }
22303
+ this.preRenderContainerEl = ownerContainer;
22304
+ this.applyPreRenderContainerPositioning();
22305
+ }
22306
+ getCustomPreRenderContainer() {
22307
+ const container = this.preRenderContainerEl;
22308
+ return container && container !== document.body ? container : null;
22309
+ }
21398
22310
  /**
21399
- * Makes the container a positioning context for the absolutely positioned
21400
- * wrapper, stashing the original inline `position` on the element (once) so
21401
- * destroy() can restore it exactly, leaving no trace. Recording it on the
21402
- * element rather than per-instance lets the override be reverted even when
21403
- * embeds share the same container.
22311
+ * Makes the resolved container a positioning context for the absolutely
22312
+ * positioned wrapper, stashing the original inline `position` on the element
22313
+ * (once) so destroy() can restore it exactly, leaving no trace. Recording it
22314
+ * on the element rather than per-instance lets the override be reverted even
22315
+ * when embeds share the same container.
21404
22316
  */
21405
- applyPreRenderContainerPositioning(container) {
21406
- if (container === document.body) {
22317
+ applyPreRenderContainerPositioning() {
22318
+ const container = this.getCustomPreRenderContainer();
22319
+ if (!container) {
21407
22320
  return;
21408
22321
  }
21409
22322
  const pos = window.getComputedStyle(container).position;
@@ -21446,11 +22359,11 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
21446
22359
  resolved.addEventListener('scroll', this.containerScrollListener);
21447
22360
  }
21448
22361
  }
21449
- this.applyPreRenderContainerPositioning(resolved);
22362
+ this.preRenderContainerEl = resolved;
22363
+ this.applyPreRenderContainerPositioning();
21450
22364
  if (wrapper.parentNode !== resolved) {
21451
22365
  resolved.appendChild(wrapper);
21452
22366
  }
21453
- this.preRenderContainerEl = resolved;
21454
22367
  }
21455
22368
  insertIntoDOMForPreRender(child) {
21456
22369
  const preRenderChild = this.createPreRenderChild(child);
@@ -21473,7 +22386,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
21473
22386
  }
21474
22387
  const targetContainer = this.resolvePreRenderContainerTarget();
21475
22388
  this.preRenderContainerEl = targetContainer;
21476
- this.applyPreRenderContainerPositioning(targetContainer);
22389
+ this.applyPreRenderContainerPositioning();
21477
22390
  targetContainer.appendChild(preRenderWrapper);
21478
22391
  }
21479
22392
  insertIntoDOM(child) {
@@ -21801,6 +22714,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
21801
22714
  * @param args
21802
22715
  */
21803
22716
  async render() {
22717
+ uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_RENDER_CALLED, {
22718
+ embedComponentType: this.viewConfig.embedComponentType,
22719
+ });
21804
22720
  if (!getIsInitCalled()) {
21805
22721
  logger$3.error(ERROR_MESSAGE.RENDER_CALLED_BEFORE_INIT);
21806
22722
  }
@@ -21872,7 +22788,11 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
21872
22788
  * @param showPreRenderByDefault - Show the preRender after render, hidden by default
21873
22789
  */
21874
22790
  async preRender(showPreRenderByDefault = false, replaceExistingPreRender = false) {
21875
- if (!this.viewConfig.preRenderId) {
22791
+ uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_PRE_RENDER, {
22792
+ showPreRenderByDefault,
22793
+ replaceExistingPreRender,
22794
+ });
22795
+ if (!this.getPreRenderConfig().preRenderId) {
21876
22796
  logger$3.error(ERROR_MESSAGE.PRERENDER_ID_MISSING);
21877
22797
  return this;
21878
22798
  }
@@ -21928,7 +22848,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
21928
22848
  }
21929
22849
  // Drop our reference up front so a destroyed embed never pins a
21930
22850
  // detached container in memory; restoration uses the local handle.
21931
- this.preRenderContainerEl = null;
22851
+ this.preRenderContainerEl = document.body;
21932
22852
  const originalPosition = container.dataset[PRERENDER_CONTAINER_ORIGINAL_POSITION_KEY];
21933
22853
  if (originalPosition === undefined) {
21934
22854
  // We never overrode this container's position; nothing to restore.
@@ -21951,9 +22871,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
21951
22871
  if (!this.containerScrollListener) {
21952
22872
  return;
21953
22873
  }
21954
- const customContainer = this.preRenderContainerEl && this.preRenderContainerEl !== document.body
21955
- ? this.preRenderContainerEl
21956
- : null;
22874
+ const customContainer = this.getCustomPreRenderContainer();
21957
22875
  customContainer === null || customContainer === void 0 ? void 0 : customContainer.removeEventListener('scroll', this.containerScrollListener);
21958
22876
  this.containerScrollListener = null;
21959
22877
  }
@@ -22048,10 +22966,14 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
22048
22966
  * wrapper to overlay it.
22049
22967
  */
22050
22968
  async showPreRender() {
22051
- var _a;
22969
+ var _a, _b;
22970
+ uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_SHOW_PRE_RENDER, {
22971
+ preRenderId: this.getPreRenderConfig().preRenderId,
22972
+ embedComponentType: this.viewConfig.embedComponentType,
22973
+ });
22052
22974
  if (this.shouldWaitForRenderPromise)
22053
22975
  await this.isReadyForRenderPromise;
22054
- if (!this.viewConfig.preRenderId) {
22976
+ if (!this.getPreRenderConfig().preRenderId) {
22055
22977
  logger$3.error(ERROR_MESSAGE.PRERENDER_ID_MISSING);
22056
22978
  return this;
22057
22979
  }
@@ -22072,21 +22994,23 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
22072
22994
  }
22073
22995
  }
22074
22996
  const placeHolderId = this.getPreRenderIds().placeHolder;
22075
- const oldEle = this.hostElement.querySelector(`#${placeHolderId}`);
22076
- if (oldEle) {
22077
- this.hostElement.removeChild(oldEle);
22078
- }
22997
+ // Remove any stale placeholder from a previous cycle. It is located
22998
+ // via a subtree-wide querySelector, so it may be nested deeper than a
22999
+ // direct child (E.g.: with fullHeight the host app can wrap it). Use
23000
+ // Element.remove() — which detaches from whatever the real parent is —
23001
+ // rather than hostElement.removeChild(), which throws NotFoundError
23002
+ // when the match is not a direct child. Mirrors the wrapper/child
23003
+ // cleanup in createPreRenderWrapper()/createPreRenderChild().
23004
+ (_a = this.hostElement.querySelector(`#${placeHolderId}`)) === null || _a === void 0 ? void 0 : _a.remove();
22079
23005
  this.hostElement.appendChild(this.insertedDomEl);
22080
23006
  this.syncPreRenderStyle();
22081
- const customContainer = this.preRenderContainerEl && this.preRenderContainerEl !== document.body
22082
- ? this.preRenderContainerEl
22083
- : null;
23007
+ const customContainer = this.getCustomPreRenderContainer();
22084
23008
  if (customContainer && !this.containerScrollListener) {
22085
23009
  this.containerScrollListener = () => this.syncPreRenderStyle();
22086
23010
  customContainer.addEventListener('scroll', this.containerScrollListener);
22087
23011
  }
22088
- if (!this.viewConfig.doNotTrackPreRenderSize) {
22089
- const observeTarget = (_a = this.insertedDomEl) !== null && _a !== void 0 ? _a : this.hostElement;
23012
+ if (!this.getPreRenderConfig().doNotTrackPreRenderSize) {
23013
+ const observeTarget = (_b = this.insertedDomEl) !== null && _b !== void 0 ? _b : this.hostElement;
22090
23014
  this.resizeObserver = new ResizeObserver((entries) => {
22091
23015
  entries.forEach((entry) => {
22092
23016
  if (entry.target === observeTarget) {
@@ -22127,13 +23051,15 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
22127
23051
  logger$3.error(ERROR_MESSAGE.SYNC_STYLE_CALLED_BEFORE_RENDER);
22128
23052
  return;
22129
23053
  }
23054
+ if (!this.getPreRenderPlaceHolderElement().isConnected) {
23055
+ logger$3.debug('syncPreRenderStyle skipped: placeholder is detached');
23056
+ return;
23057
+ }
22130
23058
  // Self-heal if the resolved container was remounted/detached, so we
22131
23059
  // never measure a stale node (which would collapse the wrapper).
22132
23060
  this.reconcilePreRenderContainer();
22133
23061
  const elBoundingClient = this.getPreRenderPlaceHolderElement().getBoundingClientRect();
22134
- const containerEl = this.preRenderContainerEl && this.preRenderContainerEl !== document.body
22135
- ? this.preRenderContainerEl
22136
- : null;
23062
+ const containerEl = this.getCustomPreRenderContainer();
22137
23063
  const containerRect = (_a = containerEl === null || containerEl === void 0 ? void 0 : containerEl.getBoundingClientRect()) !== null && _a !== void 0 ? _a : { x: 0, y: 0 };
22138
23064
  const scrollX = containerEl ? containerEl.scrollLeft : window.scrollX;
22139
23065
  const scrollY = containerEl ? containerEl.scrollTop : window.scrollY;
@@ -22150,16 +23076,21 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
22150
23076
  * If the component is not preRendered, it issues a warning.
22151
23077
  */
22152
23078
  hidePreRender() {
23079
+ uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_HIDE_PRE_RENDER, {
23080
+ preRenderId: this.getPreRenderConfig().preRenderId,
23081
+ embedComponentType: this.viewConfig.embedComponentType,
23082
+ });
22153
23083
  logger$3.debug('HidePreRender Called');
22154
23084
  if (!this.isPreRenderConnected()) {
22155
23085
  // if the embed component is not preRendered , nothing to hide
22156
23086
  logger$3.warn('PreRender should be called before hiding it using hidePreRender.');
22157
23087
  return;
22158
23088
  }
23089
+ const { zIndex } = this.getPreRenderConfig();
22159
23090
  const preRenderHideStyles = {
22160
23091
  opacity: '0',
22161
23092
  pointerEvents: 'none',
22162
- zIndex: '-1000',
23093
+ zIndex: zIndex !== undefined ? String(zIndex) : '-1000',
22163
23094
  position: 'absolute',
22164
23095
  top: '0',
22165
23096
  left: '0',
@@ -22184,10 +23115,11 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
22184
23115
  * @property {string} child - The HTML element ID for the PreRender child.
22185
23116
  */
22186
23117
  getPreRenderIds() {
23118
+ const preRenderId = this.getPreRenderConfig().preRenderId;
22187
23119
  return {
22188
- wrapper: `${PRERENDER_WRAPPER_ID_PREFIX}${this.viewConfig.preRenderId}`,
22189
- child: `tsEmbed-pre-render-child-${this.viewConfig.preRenderId}`,
22190
- placeHolder: `tsEmbed-pre-render-placeholder-${this.viewConfig.preRenderId}`,
23120
+ wrapper: `${PRERENDER_WRAPPER_ID_PREFIX}${preRenderId}`,
23121
+ child: `tsEmbed-pre-render-child-${preRenderId}`,
23122
+ placeHolder: `tsEmbed-pre-render-placeholder-${preRenderId}`,
22191
23123
  };
22192
23124
  }
22193
23125
  /**
@@ -22357,6 +23289,31 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
22357
23289
  ...(visualOverrides !== undefined ? { visualOverridesParams: visualOverrides } : {}),
22358
23290
  },
22359
23291
  };
23292
+ }
23293
+ function buildSpotterShareConversationAppInitData(initData, viewConfig) {
23294
+ const { spotterShareConversationConfig } = viewConfig;
23295
+ if (!spotterShareConversationConfig)
23296
+ return initData;
23297
+ return {
23298
+ ...initData,
23299
+ embedParams: {
23300
+ ...(initData.embedParams || {}),
23301
+ spotterShareConversationConfig,
23302
+ },
23303
+ };
23304
+ }
23305
+ function buildStarterPromptsAppInitData(initData, viewConfig) {
23306
+ var _a;
23307
+ const starterPrompts = (_a = viewConfig.spotterChatConfig) === null || _a === void 0 ? void 0 : _a.starterPrompts;
23308
+ if (!starterPrompts)
23309
+ return initData;
23310
+ return {
23311
+ ...initData,
23312
+ embedParams: {
23313
+ ...(initData.embedParams || {}),
23314
+ starterPrompts,
23315
+ },
23316
+ };
22360
23317
  }
22361
23318
 
22362
23319
  function buildSpotterVizAppInitData(initData, viewConfig) {
@@ -22418,6 +23375,14 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
22418
23375
  * Monitor Alerts Page
22419
23376
  */
22420
23377
  Page["Monitor"] = "monitor";
23378
+ /**
23379
+ * Collections listing page
23380
+ */
23381
+ Page["Collections"] = "collections";
23382
+ /**
23383
+ * Liveboard schedules listing page
23384
+ */
23385
+ Page["LiveboardSchedules"] = "liveboard-schedules";
22421
23386
  })(exports.Page || (exports.Page = {}));
22422
23387
  /**
22423
23388
  * Define the initial state of column custom group accordions
@@ -22466,6 +23431,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
22466
23431
  /**
22467
23432
  * Modular (v2) introduces the updated Modular Home Experience.
22468
23433
  * It serves as the foundational version of the home page.
23434
+ * Use {@link HomePage.ModularWithStylingChanges} (V3) or
23435
+ * {@link HomePage.Focused} (V4) instead.
23436
+ * @deprecated V1 and V2 home page experiences are deprecated.
22469
23437
  */
22470
23438
  HomePage["Modular"] = "v2";
22471
23439
  /**
@@ -22560,6 +23528,15 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
22560
23528
  this.setIFrameHeight(frameHeight || this.defaultHeight);
22561
23529
  };
22562
23530
  if (this.viewConfig.fullHeight === true) {
23531
+ if (this.viewConfig.lazyLoadingForFullHeight === undefined) {
23532
+ this.viewConfig.lazyLoadingForFullHeight = true;
23533
+ }
23534
+ if (this.viewConfig.enableScrollableContainerLazyLoading === undefined) {
23535
+ this.viewConfig.enableScrollableContainerLazyLoading = true;
23536
+ }
23537
+ if (this.viewConfig.lazyLoadingMargin === undefined) {
23538
+ this.viewConfig.lazyLoadingMargin = DEFAULT_LAZY_LOADING_MARGIN;
23539
+ }
22563
23540
  this.on(exports.EmbedEvent.RouteChange, this.setIframeHeightForNonEmbedLiveboard);
22564
23541
  this.on(exports.EmbedEvent.EmbedHeight, this.updateIFrameHeight);
22565
23542
  this.on(exports.EmbedEvent.EmbedIframeCenter, this.embedIframeCenter);
@@ -22581,14 +23558,20 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
22581
23558
  async getAppInitData() {
22582
23559
  const defaultAppInitData = await super.getAppInitData();
22583
23560
  const sidebarInitData = buildSpotterSidebarAppInitData(defaultAppInitData, this.viewConfig, this.handleError.bind(this));
22584
- return buildSpotterVizAppInitData(sidebarInitData, this.viewConfig);
23561
+ const vizInitData = buildSpotterVizAppInitData(sidebarInitData, this.viewConfig);
23562
+ const shareInitData = buildSpotterShareConversationAppInitData(vizInitData, this.viewConfig);
23563
+ return buildStarterPromptsAppInitData(shareInitData, this.viewConfig);
22585
23564
  }
22586
23565
  /**
22587
23566
  * Constructs a map of parameters to be passed on to the
22588
23567
  * embedded Liveboard or visualization.
22589
23568
  */
22590
23569
  getEmbedParams() {
22591
- const { tag, hideTagFilterChips, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideHamburger, hideObjectSearch, hideNotification, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, newConnectionsExperience, fullHeight, dataPanelV2 = true, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, showMaskedFilterChip = false, isLiveboardMasterpiecesEnabled = false, newChartsLibrary, hideHomepageLeftNav = false, modularHomeExperience = false, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, enable2ColumnLayout, enableCustomColumnGroups = false, dataPanelCustomGroupsAccordionInitialState = exports.DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, isEnhancedFilterInteractivityEnabled = false, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, discoveryExperience, coverAndFilterOptionInPDF = false, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, isLiveboardXLSXCSVDownloadEnabled = false, isGranularXLSXCSVSchedulesEnabled = false, isCentralizedLiveboardFilterUXEnabled = false, isLinkParametersEnabled, updatedSpotterChatPrompt, enableStopAnswerGenerationEmbed, spotterChatConfig, minimumHeight, isThisPeriodInDateFiltersEnabled, enableHomepageAnnouncement = false, isContinuousLiveboardPDFEnabled = false, enableLiveboardDataCache, } = this.viewConfig;
23570
+ const params = this.getEmbedParamsObject();
23571
+ return getQueryParamString(params, true);
23572
+ }
23573
+ getEmbedParamsObject() {
23574
+ const { tag, hideTagFilterChips, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideHamburger, hideObjectSearch, hideNotification, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, newConnectionsExperience, fullHeight, dataPanelV2 = true, updatedSpotterExperience, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, showMaskedFilterChip = false, isLiveboardMasterpiecesEnabled, newChartsLibrary, hideHomepageLeftNav = false, modularHomeExperience, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, enable2ColumnLayout, isLiveboardAlwaysOn12ColLayout, enableCustomColumnGroups = false, dataPanelCustomGroupsAccordionInitialState = exports.DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs, isEnhancedFilterInteractivityEnabled, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, discoveryExperience, coverAndFilterOptionInPDF, isLiveboardStylingAndGroupingEnabled, liveboardGutter, isPNGInScheduledEmailsEnabled = false, isLiveboardXLSXCSVDownloadEnabled, isGranularXLSXCSVSchedulesEnabled, isCentralizedLiveboardFilterUXEnabled = false, isScopedLiveboardFilteringEnabled, isLinkParametersEnabled, updatedSpotterChatPrompt, showSpotterRadiance, defaultQueryMode, enableStopAnswerGenerationEmbed, spotterChatConfig, spotterDataSources, minimumHeight, isThisPeriodInDateFiltersEnabled, enableHomepageAnnouncement = false, isContinuousLiveboardPDFEnabled, enableLiveboardDataCache, } = this.viewConfig;
22592
23575
  let params = {};
22593
23576
  params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
22594
23577
  params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
@@ -22598,31 +23581,51 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
22598
23581
  params[Param.ShowLiveboardTitle] = showLiveboardTitle;
22599
23582
  params[Param.ShowLiveboardDescription] = !!showLiveboardDescription;
22600
23583
  params[Param.ShowMaskedFilterChip] = showMaskedFilterChip;
22601
- params[Param.IsLiveboardMasterpiecesEnabled] = isLiveboardMasterpiecesEnabled;
23584
+ if (!isUndefined$1(isLiveboardMasterpiecesEnabled)) {
23585
+ params[Param.IsLiveboardMasterpiecesEnabled] = isLiveboardMasterpiecesEnabled;
23586
+ }
22602
23587
  if (newChartsLibrary !== undefined) {
22603
23588
  params[Param.EnableNewChartLibrary] = newChartsLibrary;
22604
23589
  }
22605
23590
  params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
22606
23591
  params[Param.IsFullAppEmbed] = true;
22607
- params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
22608
- params[Param.IsEnhancedFilterInteractivityEnabled] = isEnhancedFilterInteractivityEnabled;
23592
+ if (!isUndefined$1(isLiveboardCompactHeaderEnabled)) {
23593
+ params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
23594
+ }
23595
+ if (!isUndefined$1(isEnhancedFilterInteractivityEnabled)) {
23596
+ params[Param.IsEnhancedFilterInteractivityEnabled] =
23597
+ isEnhancedFilterInteractivityEnabled;
23598
+ }
22609
23599
  params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;
22610
23600
  params[Param.ShowLiveboardReverifyBanner] = showLiveboardReverifyBanner;
22611
- params[Param.HideIrrelevantFiltersInTab] = hideIrrelevantChipsInLiveboardTabs;
23601
+ if (!isUndefined$1(hideIrrelevantChipsInLiveboardTabs)) {
23602
+ params[Param.HideIrrelevantFiltersInTab] = hideIrrelevantChipsInLiveboardTabs;
23603
+ }
22612
23604
  if (isUnifiedSearchExperienceEnabled !== undefined) {
22613
23605
  params[Param.IsUnifiedSearchExperienceEnabled] = isUnifiedSearchExperienceEnabled;
22614
23606
  }
22615
- params[Param.CoverAndFilterOptionInPDF] = !!coverAndFilterOptionInPDF;
23607
+ if (!isUndefined$1(coverAndFilterOptionInPDF)) {
23608
+ params[Param.CoverAndFilterOptionInPDF] = !!coverAndFilterOptionInPDF;
23609
+ }
22616
23610
  params = this.getBaseQueryParams(params);
22617
- if (!isUndefined(updatedSpotterChatPrompt)) {
23611
+ if (!isUndefined$1(updatedSpotterChatPrompt)) {
22618
23612
  params[Param.UpdatedSpotterChatPrompt] = !!updatedSpotterChatPrompt;
22619
23613
  }
22620
- if (!isUndefined(enableStopAnswerGenerationEmbed)) {
23614
+ if (!isUndefined$1(showSpotterRadiance)) {
23615
+ params[Param.ShowSpotterRadiance] = !!showSpotterRadiance;
23616
+ }
23617
+ if (!isUndefined$1(defaultQueryMode)) {
23618
+ params[Param.DefaultQueryMode] = defaultQueryMode;
23619
+ }
23620
+ if (!isUndefined$1(enableStopAnswerGenerationEmbed)) {
22621
23621
  params[Param.EnableStopAnswerGenerationEmbed] = !!enableStopAnswerGenerationEmbed;
22622
23622
  }
23623
+ if (spotterDataSources && spotterDataSources.length) {
23624
+ params[Param.SpotterDataSources] = JSON.stringify(spotterDataSources);
23625
+ }
22623
23626
  // Handle spotterChatConfig params
22624
23627
  if (spotterChatConfig) {
22625
- const { hideToolResponseCardBranding, toolResponseCardBrandingLabel, spotterFileUploadEnabled, spotterFileUploadFileTypes, enableStarterPrompts, } = spotterChatConfig;
23628
+ const { hideToolResponseCardBranding, toolResponseCardBrandingLabel, spotterFileUploadEnabled, spotterFileUploadFileTypes, enableStarterPrompts, openSpotterOnLiveboardByDefault, } = spotterChatConfig;
22626
23629
  setParamIfDefined(params, Param.HideToolResponseCardBranding, hideToolResponseCardBranding, true);
22627
23630
  setParamIfDefined(params, Param.ToolResponseCardBrandingLabel, toolResponseCardBrandingLabel);
22628
23631
  if (spotterFileUploadEnabled !== undefined) {
@@ -22631,10 +23634,16 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
22631
23634
  if (enableStarterPrompts !== undefined) {
22632
23635
  params[Param.IsStarterPromptsEnabled] = enableStarterPrompts;
22633
23636
  }
23637
+ if (openSpotterOnLiveboardByDefault !== undefined) {
23638
+ params[Param.OpenSpotterOnLiveboardByDefault] = openSpotterOnLiveboardByDefault;
23639
+ }
22634
23640
  if (spotterFileUploadFileTypes !== undefined) {
22635
23641
  params[Param.SpotterFileUploadFileTypes] = JSON.stringify(spotterFileUploadFileTypes);
22636
23642
  }
22637
23643
  }
23644
+ if (!isUndefined$1(updatedSpotterExperience)) {
23645
+ params[Param.UpdatedSpotterExperience] = !!updatedSpotterExperience;
23646
+ }
22638
23647
  if (hideObjectSearch) {
22639
23648
  params[Param.HideObjectSearch] = !!hideObjectSearch;
22640
23649
  }
@@ -22671,6 +23680,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
22671
23680
  if (enable2ColumnLayout !== undefined) {
22672
23681
  params[Param.Enable2ColumnLayout] = enable2ColumnLayout;
22673
23682
  }
23683
+ if (isLiveboardAlwaysOn12ColLayout !== undefined) {
23684
+ params[Param.IsLiveboardAlwaysOn12ColLayout] = isLiveboardAlwaysOn12ColLayout;
23685
+ }
22674
23686
  if (enableAskSage) {
22675
23687
  params[Param.enableAskSage] = enableAskSage;
22676
23688
  }
@@ -22683,6 +23695,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
22683
23695
  if (isLiveboardStylingAndGroupingEnabled !== undefined) {
22684
23696
  params[Param.IsLiveboardStylingAndGroupingEnabled] = isLiveboardStylingAndGroupingEnabled;
22685
23697
  }
23698
+ if (liveboardGutter !== undefined) {
23699
+ params[Param.LiveboardGutter] = liveboardGutter;
23700
+ }
22686
23701
  if (isPNGInScheduledEmailsEnabled !== undefined) {
22687
23702
  params[Param.isPNGInScheduledEmailsEnabled] = isPNGInScheduledEmailsEnabled;
22688
23703
  }
@@ -22701,6 +23716,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
22701
23716
  if (isCentralizedLiveboardFilterUXEnabled != undefined) {
22702
23717
  params[Param.isCentralizedLiveboardFilterUXEnabled] = isCentralizedLiveboardFilterUXEnabled;
22703
23718
  }
23719
+ if (isScopedLiveboardFilteringEnabled !== undefined) {
23720
+ params[Param.isScopedLiveboardFilteringEnabled] = isScopedLiveboardFilteringEnabled;
23721
+ }
22704
23722
  if (isThisPeriodInDateFiltersEnabled !== undefined) {
22705
23723
  params[Param.IsThisPeriodInDateFiltersEnabled] = isThisPeriodInDateFiltersEnabled;
22706
23724
  }
@@ -22716,7 +23734,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
22716
23734
  }
22717
23735
  params[Param.DataPanelV2Enabled] = dataPanelV2;
22718
23736
  params[Param.HideHomepageLeftNav] = hideHomepageLeftNav;
22719
- params[Param.ModularHomeExperienceEnabled] = modularHomeExperience;
22720
23737
  params[Param.CollapseSearchBarInitially] = collapseSearchBarInitially || collapseSearchBar;
22721
23738
  params[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
22722
23739
  if (dataPanelCustomGroupsAccordionInitialState
@@ -22731,33 +23748,15 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
22731
23748
  if (modularHomeExperience !== undefined) {
22732
23749
  params[Param.ModularHomeExperienceEnabled] = modularHomeExperience;
22733
23750
  }
22734
- // Set navigation to v2 by default to avoid problems like the app
22735
- // switcher (9-dot menu) not showing when v3 navigation is turned on
22736
- // at the cluster level.
22737
- // To use v3 navigation, we must manually set the discoveryExperience
22738
- // settings.
22739
- params[Param.NavigationVersion] = 'v2';
22740
- // Set homePageVersion to v2 by default to reset the LD flag value
22741
- // for the homepageVersion.
22742
- params[Param.HomepageVersion] = 'v2';
23751
+ // Navigation V1/V2 and home page V1/V2 are deprecated. V3 is now the
23752
+ // default experience, Need to send navigationVersion=v3 and
23753
+ // homepageVersion=v3 even when the no discoveryExperience /
23754
+ // modularHomeExperience config is set. Without these
23755
+ // params, older TSA versions (< 26.7) fall back to V2 for nav and
23756
+ // home page, so the defaults must be sent explicitly from the SDK.
23757
+ params[Param.NavigationVersion] = exports.PrimaryNavbarVersion.Sliding;
23758
+ params[Param.HomepageVersion] = exports.HomePage.ModularWithStylingChanges;
22743
23759
  if (discoveryExperience) {
22744
- // primaryNavbarVersion v3 will enabled the new left navigation
22745
- if (discoveryExperience.primaryNavbarVersion === exports.PrimaryNavbarVersion.Sliding) {
22746
- params[Param.NavigationVersion] = discoveryExperience.primaryNavbarVersion;
22747
- // Enable the modularHomeExperience when Sliding is enabled.
22748
- params[Param.ModularHomeExperienceEnabled] = true;
22749
- }
22750
- // homePage v2 will enable the modular home page
22751
- // and it will override the modularHomeExperience value
22752
- if (discoveryExperience.homePage === exports.HomePage.Modular) {
22753
- params[Param.ModularHomeExperienceEnabled] = true;
22754
- }
22755
- // ModularWithStylingChanges (v3) introduces the styling changes
22756
- // to the Modular Homepage.
22757
- // v3 will be the base version of homePageVersion.
22758
- if (discoveryExperience.homePage === exports.HomePage.ModularWithStylingChanges) {
22759
- params[Param.HomepageVersion] = exports.HomePage.ModularWithStylingChanges;
22760
- }
22761
23760
  // listPageVersion can be changed to v2 or v3
22762
23761
  if (discoveryExperience.listPageVersion !== undefined) {
22763
23762
  params[Param.ListPageVersion] = discoveryExperience.listPageVersion;
@@ -22767,13 +23766,12 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
22767
23766
  // The Focused (V4) homepage experience requires the updated
22768
23767
  // Spotter chat prompt. Enable it automatically unless the
22769
23768
  // developer has explicitly set updatedSpotterChatPrompt.
22770
- if (isUndefined(updatedSpotterChatPrompt)) {
23769
+ if (isUndefined$1(updatedSpotterChatPrompt)) {
22771
23770
  params[Param.UpdatedSpotterChatPrompt] = true;
22772
23771
  }
22773
23772
  }
22774
23773
  }
22775
- const queryParams = getQueryParamString(params, true);
22776
- return queryParams;
23774
+ return params;
22777
23775
  }
22778
23776
  /**
22779
23777
  * Constructs the URL of the ThoughtSpot app page to be rendered.
@@ -22808,6 +23806,10 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
22808
23806
  return modularHomeExperience ? 'home/spotiq-analysis' : 'insights/results';
22809
23807
  case exports.Page.Monitor:
22810
23808
  return modularHomeExperience ? 'home/monitor-alerts' : 'insights/monitor-alerts';
23809
+ case exports.Page.Collections:
23810
+ return 'collections';
23811
+ case exports.Page.LiveboardSchedules:
23812
+ return 'home/liveboard-schedules';
22811
23813
  case exports.Page.Home:
22812
23814
  default:
22813
23815
  return 'home';
@@ -22840,11 +23842,13 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
22840
23842
  * @version SDK: 1.12.0 | ThoughtSpot: 8.4.0.cl, 8.4.1-sw
22841
23843
  */
22842
23844
  navigateToPage(path, noReload = false) {
23845
+ var _a;
22843
23846
  if (!this.iFrame) {
22844
23847
  logger$3.log('Please call render before invoking this method');
22845
23848
  return;
22846
23849
  }
22847
- if (noReload) {
23850
+ const overrideHistoryState = (_a = this.viewConfig) === null || _a === void 0 ? void 0 : _a.overrideHistoryState;
23851
+ if (noReload || overrideHistoryState) {
22848
23852
  this.trigger(exports.HostEvent.Navigate, path);
22849
23853
  }
22850
23854
  else {
@@ -23091,6 +24095,15 @@ query GetEurekaVizSnapshots(
23091
24095
  logger$3.warn('Full height is currently only supported for Liveboard embeds.' +
23092
24096
  'Using full height with vizId might lead to unexpected behavior.');
23093
24097
  }
24098
+ if (this.viewConfig.lazyLoadingForFullHeight === undefined) {
24099
+ this.viewConfig.lazyLoadingForFullHeight = true;
24100
+ }
24101
+ if (this.viewConfig.enableScrollableContainerLazyLoading === undefined) {
24102
+ this.viewConfig.enableScrollableContainerLazyLoading = true;
24103
+ }
24104
+ if (this.viewConfig.lazyLoadingMargin === undefined) {
24105
+ this.viewConfig.lazyLoadingMargin = DEFAULT_LAZY_LOADING_MARGIN;
24106
+ }
23094
24107
  this.on(exports.EmbedEvent.RouteChange, this.setIframeHeightForNonEmbedLiveboard);
23095
24108
  this.on(exports.EmbedEvent.EmbedHeight, this.updateIFrameHeight);
23096
24109
  this.on(exports.EmbedEvent.EmbedIframeCenter, this.embedIframeCenter);
@@ -23099,7 +24112,8 @@ query GetEurekaVizSnapshots(
23099
24112
  }
23100
24113
  async getAppInitData() {
23101
24114
  const defaultAppInitData = await super.getAppInitData();
23102
- return buildSpotterVizAppInitData(defaultAppInitData, this.viewConfig);
24115
+ const vizInitData = buildSpotterVizAppInitData(defaultAppInitData, this.viewConfig);
24116
+ return buildStarterPromptsAppInitData(vizInitData, this.viewConfig);
23103
24117
  }
23104
24118
  /**
23105
24119
  * Construct a map of params to be passed on to the
@@ -23113,7 +24127,7 @@ query GetEurekaVizSnapshots(
23113
24127
  getEmbedParamsObject() {
23114
24128
  let params = {};
23115
24129
  params = this.getBaseQueryParams(params);
23116
- const { enableVizTransformations, fullHeight, defaultHeight, minimumHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, showMaskedFilterChip = false, isLiveboardMasterpiecesEnabled = false, newChartsLibrary, isEnhancedFilterInteractivityEnabled = false, enableAskSage, enable2ColumnLayout, dataPanelV2 = true, enableCustomColumnGroups = false, oAuthPollingInterval, isForceRedirect, dataSourceId, coverAndFilterOptionInPDF = false, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, isLiveboardXLSXCSVDownloadEnabled = false, isGranularXLSXCSVSchedulesEnabled = false, showSpotterLimitations, isCentralizedLiveboardFilterUXEnabled = false, isLinkParametersEnabled, updatedSpotterChatPrompt, enableStopAnswerGenerationEmbed, spotterChatConfig, isThisPeriodInDateFiltersEnabled, isContinuousLiveboardPDFEnabled = false, enableLiveboardDataCache, } = this.viewConfig;
24130
+ const { enableVizTransformations, fullHeight, defaultHeight, minimumHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, isLiveboardCompactHeaderEnabled, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs, showMaskedFilterChip = false, isLiveboardMasterpiecesEnabled, newChartsLibrary, isEnhancedFilterInteractivityEnabled, enableAskSage, enable2ColumnLayout, isLiveboardAlwaysOn12ColLayout, dataPanelV2 = true, updatedSpotterExperience, enableCustomColumnGroups = false, oAuthPollingInterval, isForceRedirect, dataSourceId, coverAndFilterOptionInPDF, isLiveboardStylingAndGroupingEnabled, liveboardGutter, isPNGInScheduledEmailsEnabled = false, isLiveboardXLSXCSVDownloadEnabled, isGranularXLSXCSVSchedulesEnabled, showSpotterLimitations, isCentralizedLiveboardFilterUXEnabled = false, isScopedLiveboardFilteringEnabled, isLinkParametersEnabled, updatedSpotterChatPrompt, showSpotterRadiance, enableStopAnswerGenerationEmbed, spotterChatConfig, isThisPeriodInDateFiltersEnabled, isContinuousLiveboardPDFEnabled, enableLiveboardDataCache, } = this.viewConfig;
23117
24131
  const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
23118
24132
  || this.viewConfig.preventPinboardFilterRemoval;
23119
24133
  if (fullHeight === true) {
@@ -23132,10 +24146,13 @@ query GetEurekaVizSnapshots(
23132
24146
  if (preventLiveboardFilterRemoval) {
23133
24147
  params[Param.preventLiveboardFilterRemoval] = true;
23134
24148
  }
23135
- if (!isUndefined(updatedSpotterChatPrompt)) {
24149
+ if (!isUndefined$1(updatedSpotterChatPrompt)) {
23136
24150
  params[Param.UpdatedSpotterChatPrompt] = !!updatedSpotterChatPrompt;
23137
24151
  }
23138
- if (!isUndefined(enableStopAnswerGenerationEmbed)) {
24152
+ if (!isUndefined$1(showSpotterRadiance)) {
24153
+ params[Param.ShowSpotterRadiance] = !!showSpotterRadiance;
24154
+ }
24155
+ if (!isUndefined$1(enableStopAnswerGenerationEmbed)) {
23139
24156
  params[Param.EnableStopAnswerGenerationEmbed] = !!enableStopAnswerGenerationEmbed;
23140
24157
  }
23141
24158
  if (visibleVizs) {
@@ -23151,6 +24168,9 @@ query GetEurekaVizSnapshots(
23151
24168
  if (enable2ColumnLayout !== undefined) {
23152
24169
  params[Param.Enable2ColumnLayout] = enable2ColumnLayout;
23153
24170
  }
24171
+ if (isLiveboardAlwaysOn12ColLayout !== undefined) {
24172
+ params[Param.IsLiveboardAlwaysOn12ColLayout] = isLiveboardAlwaysOn12ColLayout;
24173
+ }
23154
24174
  if (hideTabPanel) {
23155
24175
  params[Param.HideTabPanel] = hideTabPanel;
23156
24176
  }
@@ -23178,6 +24198,9 @@ query GetEurekaVizSnapshots(
23178
24198
  if (isLiveboardStylingAndGroupingEnabled !== undefined) {
23179
24199
  params[Param.IsLiveboardStylingAndGroupingEnabled] = isLiveboardStylingAndGroupingEnabled;
23180
24200
  }
24201
+ if (liveboardGutter !== undefined) {
24202
+ params[Param.LiveboardGutter] = liveboardGutter;
24203
+ }
23181
24204
  if (isPNGInScheduledEmailsEnabled !== undefined) {
23182
24205
  params[Param.isPNGInScheduledEmailsEnabled] = isPNGInScheduledEmailsEnabled;
23183
24206
  }
@@ -23190,9 +24213,12 @@ query GetEurekaVizSnapshots(
23190
24213
  if (showSpotterLimitations !== undefined) {
23191
24214
  params[Param.ShowSpotterLimitations] = showSpotterLimitations;
23192
24215
  }
24216
+ if (!isUndefined$1(updatedSpotterExperience)) {
24217
+ params[Param.UpdatedSpotterExperience] = !!updatedSpotterExperience;
24218
+ }
23193
24219
  // Handle spotterChatConfig params
23194
24220
  if (spotterChatConfig) {
23195
- const { hideToolResponseCardBranding, toolResponseCardBrandingLabel, spotterFileUploadEnabled, spotterFileUploadFileTypes, enableStarterPrompts, } = spotterChatConfig;
24221
+ const { hideToolResponseCardBranding, toolResponseCardBrandingLabel, spotterFileUploadEnabled, spotterFileUploadFileTypes, enableStarterPrompts, openSpotterOnLiveboardByDefault, } = spotterChatConfig;
23196
24222
  setParamIfDefined(params, Param.HideToolResponseCardBranding, hideToolResponseCardBranding, true);
23197
24223
  setParamIfDefined(params, Param.ToolResponseCardBrandingLabel, toolResponseCardBrandingLabel);
23198
24224
  if (spotterFileUploadEnabled !== undefined) {
@@ -23201,6 +24227,9 @@ query GetEurekaVizSnapshots(
23201
24227
  if (enableStarterPrompts !== undefined) {
23202
24228
  params[Param.IsStarterPromptsEnabled] = enableStarterPrompts;
23203
24229
  }
24230
+ if (openSpotterOnLiveboardByDefault !== undefined) {
24231
+ params[Param.OpenSpotterOnLiveboardByDefault] = openSpotterOnLiveboardByDefault;
24232
+ }
23204
24233
  if (spotterFileUploadFileTypes !== undefined) {
23205
24234
  params[Param.SpotterFileUploadFileTypes] = JSON.stringify(spotterFileUploadFileTypes);
23206
24235
  }
@@ -23211,6 +24240,9 @@ query GetEurekaVizSnapshots(
23211
24240
  if (isCentralizedLiveboardFilterUXEnabled !== undefined) {
23212
24241
  params[Param.isCentralizedLiveboardFilterUXEnabled] = isCentralizedLiveboardFilterUXEnabled;
23213
24242
  }
24243
+ if (isScopedLiveboardFilteringEnabled !== undefined) {
24244
+ params[Param.isScopedLiveboardFilteringEnabled] = isScopedLiveboardFilteringEnabled;
24245
+ }
23214
24246
  if (isThisPeriodInDateFiltersEnabled !== undefined) {
23215
24247
  params[Param.IsThisPeriodInDateFiltersEnabled] = isThisPeriodInDateFiltersEnabled;
23216
24248
  }
@@ -23224,16 +24256,27 @@ query GetEurekaVizSnapshots(
23224
24256
  params[Param.EnableNewChartLibrary] = newChartsLibrary;
23225
24257
  }
23226
24258
  params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
23227
- params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
24259
+ if (!isUndefined$1(isLiveboardCompactHeaderEnabled)) {
24260
+ params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
24261
+ }
23228
24262
  params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;
23229
24263
  params[Param.ShowLiveboardReverifyBanner] = showLiveboardReverifyBanner;
23230
- params[Param.HideIrrelevantFiltersInTab] = hideIrrelevantChipsInLiveboardTabs;
24264
+ if (!isUndefined$1(hideIrrelevantChipsInLiveboardTabs)) {
24265
+ params[Param.HideIrrelevantFiltersInTab] = hideIrrelevantChipsInLiveboardTabs;
24266
+ }
23231
24267
  params[Param.ShowMaskedFilterChip] = showMaskedFilterChip;
23232
- params[Param.IsLiveboardMasterpiecesEnabled] = isLiveboardMasterpiecesEnabled;
23233
- params[Param.IsEnhancedFilterInteractivityEnabled] = isEnhancedFilterInteractivityEnabled;
24268
+ if (!isUndefined$1(isLiveboardMasterpiecesEnabled)) {
24269
+ params[Param.IsLiveboardMasterpiecesEnabled] = isLiveboardMasterpiecesEnabled;
24270
+ }
24271
+ if (!isUndefined$1(isEnhancedFilterInteractivityEnabled)) {
24272
+ params[Param.IsEnhancedFilterInteractivityEnabled] =
24273
+ isEnhancedFilterInteractivityEnabled;
24274
+ }
23234
24275
  params[Param.DataPanelV2Enabled] = dataPanelV2;
23235
24276
  params[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
23236
- params[Param.CoverAndFilterOptionInPDF] = coverAndFilterOptionInPDF;
24277
+ if (!isUndefined$1(coverAndFilterOptionInPDF)) {
24278
+ params[Param.CoverAndFilterOptionInPDF] = coverAndFilterOptionInPDF;
24279
+ }
23237
24280
  getQueryParamString(params, true);
23238
24281
  return params;
23239
24282
  }
@@ -23336,7 +24379,7 @@ query GetEurekaVizSnapshots(
23336
24379
  });
23337
24380
  }
23338
24381
  async handleRenderForPrerender() {
23339
- if (isUndefined(this.viewConfig.liveboardId)) {
24382
+ if (isUndefined$1(this.viewConfig.liveboardId)) {
23340
24383
  return this.prerenderGeneric();
23341
24384
  }
23342
24385
  return super.handleRenderForPrerender();
@@ -23432,7 +24475,7 @@ query GetEurekaVizSnapshots(
23432
24475
  if (this.isRendered) {
23433
24476
  this.trigger(exports.HostEvent.Navigate, path.substring(1));
23434
24477
  }
23435
- else if (this.viewConfig.preRenderId) {
24478
+ else if (this.getPreRenderConfig().preRenderId) {
23436
24479
  this.preRender(true);
23437
24480
  }
23438
24481
  else {
@@ -24255,6 +25298,15 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
24255
25298
  }
24256
25299
  }
24257
25300
 
25301
+ /**
25302
+ * The query mode Spotter uses when answering a question.
25303
+ * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
25304
+ */
25305
+ exports.SpotterQueryMode = void 0;
25306
+ (function (SpotterQueryMode) {
25307
+ SpotterQueryMode["FAST_SEARCH"] = "fastSearch";
25308
+ SpotterQueryMode["RESEARCH"] = "research";
25309
+ })(exports.SpotterQueryMode || (exports.SpotterQueryMode = {}));
24258
25310
  /**
24259
25311
  * Embed ThoughtSpot AI Conversation.
24260
25312
  * @version SDK: 1.37.0 | ThoughtSpot: 10.9.0.cl
@@ -24295,18 +25347,12 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
24295
25347
  */
24296
25348
  async getAppInitData() {
24297
25349
  const defaultAppInitData = await super.getAppInitData();
24298
- return buildSpotterSidebarAppInitData(defaultAppInitData, this.viewConfig, this.handleError.bind(this));
25350
+ const sidebarInitData = buildSpotterSidebarAppInitData(defaultAppInitData, this.viewConfig, this.handleError.bind(this));
25351
+ const shareInitData = buildSpotterShareConversationAppInitData(sidebarInitData, this.viewConfig);
25352
+ return buildStarterPromptsAppInitData(shareInitData, this.viewConfig);
24299
25353
  }
24300
25354
  getEmbedParamsObject() {
24301
- const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, updatedSpotterChatPrompt, enableStopAnswerGenerationEmbed, spotterChatConfig, } = this.viewConfig;
24302
- if (!worksheetId) {
24303
- this.handleError({
24304
- errorType: exports.ErrorDetailsTypes.VALIDATION_ERROR,
24305
- message: ERROR_MESSAGE.SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND,
24306
- code: exports.EmbedErrorCodes.WORKSHEET_ID_NOT_FOUND,
24307
- error: ERROR_MESSAGE.SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND,
24308
- });
24309
- }
25355
+ const { searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, updatedSpotterExperience, showSpotterLimitations, hideSampleQuestions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, updatedSpotterChatPrompt, showSpotterRadiance, defaultQueryMode, enableStopAnswerGenerationEmbed, spotterChatConfig, spotterAnalystConfig, } = this.viewConfig;
24310
25356
  const queryParams = this.getBaseQueryParams();
24311
25357
  queryParams[Param.SpotterEnabled] = true;
24312
25358
  // Boolean params
@@ -24316,7 +25362,10 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
24316
25362
  setParamIfDefined(queryParams, Param.ShowSpotterLimitations, showSpotterLimitations, true);
24317
25363
  setParamIfDefined(queryParams, Param.HideSampleQuestions, hideSampleQuestions, true);
24318
25364
  setParamIfDefined(queryParams, Param.UpdatedSpotterChatPrompt, updatedSpotterChatPrompt, true);
25365
+ setParamIfDefined(queryParams, Param.ShowSpotterRadiance, showSpotterRadiance, true);
25366
+ setParamIfDefined(queryParams, Param.DefaultQueryMode, defaultQueryMode);
24319
25367
  setParamIfDefined(queryParams, Param.EnableStopAnswerGenerationEmbed, enableStopAnswerGenerationEmbed, true);
25368
+ setParamIfDefined(queryParams, Param.AnalystId, spotterAnalystConfig === null || spotterAnalystConfig === void 0 ? void 0 : spotterAnalystConfig.analystId);
24320
25369
  // Handle spotterChatConfig params
24321
25370
  if (spotterChatConfig) {
24322
25371
  const { hideToolResponseCardBranding, toolResponseCardBrandingLabel, spotterFileUploadEnabled, spotterFileUploadFileTypes, enableStarterPrompts, } = spotterChatConfig;
@@ -24328,11 +25377,18 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
24328
25377
  queryParams[Param.SpotterFileUploadFileTypes] = JSON.stringify(spotterFileUploadFileTypes);
24329
25378
  }
24330
25379
  }
25380
+ setParamIfDefined(queryParams, Param.UpdatedSpotterExperience, updatedSpotterExperience, true);
24331
25381
  return queryParams;
24332
25382
  }
24333
25383
  getIframeSrc() {
24334
- const { worksheetId, searchOptions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, } = this.viewConfig;
24335
- const path = 'insights/conv-assist';
25384
+ const { worksheetId, searchOptions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, sharedConversationId, dataSources, } = this.viewConfig;
25385
+ // Deep-link into the read-only shared-conversation reader view when a
25386
+ // shared conversation id is supplied (e.g. a recipient landing from a
25387
+ // host-configured CONVERSATION_URL share link); otherwise the normal
25388
+ // Spotter conversation surface.
25389
+ const path = sharedConversationId
25390
+ ? `insights/conv-assist/s/${encodeURIComponent(sharedConversationId)}`
25391
+ : 'insights/conv-assist';
24336
25392
  const queryParams = this.getEmbedParamsObject();
24337
25393
  let query = '';
24338
25394
  const queryParamsString = getQueryParamString(queryParams, true);
@@ -24348,8 +25404,12 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
24348
25404
  query += `&${parameterQuery}`;
24349
25405
  }
24350
25406
  const tsPostHashParams = this.getThoughtSpotPostUrlParams({
24351
- worksheet: worksheetId,
24352
- query: (searchOptions === null || searchOptions === void 0 ? void 0 : searchOptions.searchQuery) || '',
25407
+ ...(!(Array.isArray(dataSources) && dataSources.length > 0) && worksheetId
25408
+ && { worksheet: worksheetId }),
25409
+ ...((searchOptions === null || searchOptions === void 0 ? void 0 : searchOptions.searchQuery) && { query: searchOptions.searchQuery }),
25410
+ ...(Array.isArray(dataSources)
25411
+ && dataSources.length > 0
25412
+ && { dataSources: JSON.stringify(dataSources) }),
24353
25413
  });
24354
25414
  return `${this.getEmbedBasePath(query)}/embed/${path}${tsPostHashParams}`;
24355
25415
  }