@thoughtspot/visual-embed-sdk 1.51.2 → 1.52.1

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 (316) hide show
  1. package/cjs/package.json +9 -1
  2. package/cjs/src/api-intercept.d.ts.map +1 -1
  3. package/cjs/src/api-intercept.js +1 -0
  4. package/cjs/src/api-intercept.js.map +1 -1
  5. package/cjs/src/contracts/contracts.spec.d.ts +2 -0
  6. package/cjs/src/contracts/contracts.spec.d.ts.map +1 -0
  7. package/cjs/src/contracts/contracts.spec.js +345 -0
  8. package/cjs/src/contracts/contracts.spec.js.map +1 -0
  9. package/cjs/src/contracts/embed-event-payloads.d.ts +73 -0
  10. package/cjs/src/contracts/embed-event-payloads.d.ts.map +1 -0
  11. package/cjs/src/contracts/embed-event-payloads.js +3 -0
  12. package/cjs/src/contracts/embed-event-payloads.js.map +1 -0
  13. package/cjs/src/contracts/host-event-contracts.d.ts +378 -0
  14. package/cjs/src/contracts/host-event-contracts.d.ts.map +1 -0
  15. package/cjs/src/contracts/host-event-contracts.js +3 -0
  16. package/cjs/src/contracts/host-event-contracts.js.map +1 -0
  17. package/cjs/src/contracts/index.d.ts +22 -0
  18. package/cjs/src/contracts/index.d.ts.map +1 -0
  19. package/cjs/src/contracts/index.js +33 -0
  20. package/cjs/src/contracts/index.js.map +1 -0
  21. package/cjs/src/contracts/ui-passthrough-contracts.d.ts +277 -0
  22. package/cjs/src/contracts/ui-passthrough-contracts.d.ts.map +1 -0
  23. package/cjs/src/{embed/hostEventClient/contracts.js → contracts/ui-passthrough-contracts.js} +6 -2
  24. package/cjs/src/contracts/ui-passthrough-contracts.js.map +1 -0
  25. package/cjs/src/css-variables.d.ts +1 -1
  26. package/cjs/src/embed/app.d.ts +17 -140
  27. package/cjs/src/embed/app.d.ts.map +1 -1
  28. package/cjs/src/embed/app.js +20 -120
  29. package/cjs/src/embed/app.js.map +1 -1
  30. package/cjs/src/embed/app.spec.js +70 -26
  31. package/cjs/src/embed/app.spec.js.map +1 -1
  32. package/cjs/src/embed/conversation.d.ts +5 -5
  33. package/cjs/src/embed/events.spec.js +12 -2
  34. package/cjs/src/embed/events.spec.js.map +1 -1
  35. package/cjs/src/embed/hostEventClient/host-event-client.d.ts +3 -2
  36. package/cjs/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
  37. package/cjs/src/embed/hostEventClient/host-event-client.js +23 -18
  38. package/cjs/src/embed/hostEventClient/host-event-client.js.map +1 -1
  39. package/cjs/src/embed/hostEventClient/host-event-client.spec.js +36 -36
  40. package/cjs/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
  41. package/cjs/src/embed/hostEventClient/utils.d.ts +1 -1
  42. package/cjs/src/embed/hostEventClient/utils.d.ts.map +1 -1
  43. package/cjs/src/embed/hostEventClient/utils.js +3 -3
  44. package/cjs/src/embed/hostEventClient/utils.js.map +1 -1
  45. package/cjs/src/embed/liveboard.d.ts +9 -161
  46. package/cjs/src/embed/liveboard.d.ts.map +1 -1
  47. package/cjs/src/embed/liveboard.js +68 -135
  48. package/cjs/src/embed/liveboard.js.map +1 -1
  49. package/cjs/src/embed/liveboard.spec.js +215 -32
  50. package/cjs/src/embed/liveboard.spec.js.map +1 -1
  51. package/cjs/src/embed/search.d.ts +14 -0
  52. package/cjs/src/embed/search.d.ts.map +1 -1
  53. package/cjs/src/embed/search.js +4 -1
  54. package/cjs/src/embed/search.js.map +1 -1
  55. package/cjs/src/embed/search.spec.js +65 -0
  56. package/cjs/src/embed/search.spec.js.map +1 -1
  57. package/cjs/src/embed/ts-embed.d.ts +21 -25
  58. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  59. package/cjs/src/embed/ts-embed.js +105 -72
  60. package/cjs/src/embed/ts-embed.js.map +1 -1
  61. package/cjs/src/embed/ts-embed.spec.d.ts.map +1 -1
  62. package/cjs/src/embed/ts-embed.spec.js +380 -33
  63. package/cjs/src/embed/ts-embed.spec.js.map +1 -1
  64. package/cjs/src/full-height.d.ts +137 -0
  65. package/cjs/src/full-height.d.ts.map +1 -0
  66. package/cjs/src/full-height.js +272 -0
  67. package/cjs/src/full-height.js.map +1 -0
  68. package/cjs/src/full-height.spec.d.ts +2 -0
  69. package/cjs/src/full-height.spec.d.ts.map +1 -0
  70. package/cjs/src/full-height.spec.js +835 -0
  71. package/cjs/src/full-height.spec.js.map +1 -0
  72. package/cjs/src/index.d.ts +4 -3
  73. package/cjs/src/index.d.ts.map +1 -1
  74. package/cjs/src/index.js +5 -4
  75. package/cjs/src/index.js.map +1 -1
  76. package/cjs/src/react/all-types-export.d.ts +1 -1
  77. package/cjs/src/react/all-types-export.d.ts.map +1 -1
  78. package/cjs/src/react/all-types-export.js +2 -1
  79. package/cjs/src/react/all-types-export.js.map +1 -1
  80. package/cjs/src/react/all-types-export.parity.spec.js +55 -3
  81. package/cjs/src/react/all-types-export.parity.spec.js.map +1 -1
  82. package/cjs/src/react/index.d.ts +8 -8
  83. package/cjs/src/react/index.d.ts.map +1 -1
  84. package/cjs/src/react/index.js +1 -1
  85. package/cjs/src/react/index.js.map +1 -1
  86. package/cjs/src/react/index.spec.js +7 -7
  87. package/cjs/src/react/index.spec.js.map +1 -1
  88. package/cjs/src/types.d.ts +664 -39
  89. package/cjs/src/types.d.ts.map +1 -1
  90. package/cjs/src/types.js +406 -13
  91. package/cjs/src/types.js.map +1 -1
  92. package/cjs/src/utils/processTrigger.d.ts +3 -1
  93. package/cjs/src/utils/processTrigger.d.ts.map +1 -1
  94. package/cjs/src/utils/processTrigger.js +19 -51
  95. package/cjs/src/utils/processTrigger.js.map +1 -1
  96. package/cjs/src/utils/transport/iframe-transport.d.ts +55 -0
  97. package/cjs/src/utils/transport/iframe-transport.d.ts.map +1 -0
  98. package/cjs/src/utils/transport/iframe-transport.js +108 -0
  99. package/cjs/src/utils/transport/iframe-transport.js.map +1 -0
  100. package/cjs/src/utils/transport/iframe-transport.spec.d.ts +2 -0
  101. package/cjs/src/utils/transport/iframe-transport.spec.d.ts.map +1 -0
  102. package/cjs/src/utils/transport/iframe-transport.spec.js +140 -0
  103. package/cjs/src/utils/transport/iframe-transport.spec.js.map +1 -0
  104. package/cjs/src/utils.d.ts +18 -0
  105. package/cjs/src/utils.d.ts.map +1 -1
  106. package/cjs/src/utils.js +39 -1
  107. package/cjs/src/utils.js.map +1 -1
  108. package/cjs/src/utils.spec.js +62 -0
  109. package/cjs/src/utils.spec.js.map +1 -1
  110. package/dist/{index-D8_Zs-Nr.js → index-C1pmYb5H.js} +1 -1
  111. package/dist/src/api-intercept.d.ts.map +1 -1
  112. package/dist/src/contracts/contracts.spec.d.ts +2 -0
  113. package/dist/src/contracts/contracts.spec.d.ts.map +1 -0
  114. package/dist/src/contracts/embed-event-payloads.d.ts +73 -0
  115. package/dist/src/contracts/embed-event-payloads.d.ts.map +1 -0
  116. package/dist/src/contracts/host-event-contracts.d.ts +378 -0
  117. package/dist/src/contracts/host-event-contracts.d.ts.map +1 -0
  118. package/dist/src/contracts/index.d.ts +22 -0
  119. package/dist/src/contracts/index.d.ts.map +1 -0
  120. package/dist/src/contracts/ui-passthrough-contracts.d.ts +277 -0
  121. package/dist/src/contracts/ui-passthrough-contracts.d.ts.map +1 -0
  122. package/dist/src/css-variables.d.ts +1 -1
  123. package/dist/src/embed/app.d.ts +17 -140
  124. package/dist/src/embed/app.d.ts.map +1 -1
  125. package/dist/src/embed/conversation.d.ts +5 -5
  126. package/dist/src/embed/hostEventClient/host-event-client.d.ts +3 -2
  127. package/dist/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
  128. package/dist/src/embed/hostEventClient/utils.d.ts +1 -1
  129. package/dist/src/embed/hostEventClient/utils.d.ts.map +1 -1
  130. package/dist/src/embed/liveboard.d.ts +9 -161
  131. package/dist/src/embed/liveboard.d.ts.map +1 -1
  132. package/dist/src/embed/search.d.ts +14 -0
  133. package/dist/src/embed/search.d.ts.map +1 -1
  134. package/dist/src/embed/ts-embed.d.ts +21 -25
  135. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  136. package/dist/src/embed/ts-embed.spec.d.ts.map +1 -1
  137. package/dist/src/full-height.d.ts +137 -0
  138. package/dist/src/full-height.d.ts.map +1 -0
  139. package/dist/src/full-height.spec.d.ts +2 -0
  140. package/dist/src/full-height.spec.d.ts.map +1 -0
  141. package/dist/src/index.d.ts +4 -3
  142. package/dist/src/index.d.ts.map +1 -1
  143. package/dist/src/react/all-types-export.d.ts +1 -1
  144. package/dist/src/react/all-types-export.d.ts.map +1 -1
  145. package/dist/src/react/index.d.ts +8 -8
  146. package/dist/src/react/index.d.ts.map +1 -1
  147. package/dist/src/types.d.ts +664 -39
  148. package/dist/src/types.d.ts.map +1 -1
  149. package/dist/src/utils/processTrigger.d.ts +3 -1
  150. package/dist/src/utils/processTrigger.d.ts.map +1 -1
  151. package/dist/src/utils/transport/iframe-transport.d.ts +55 -0
  152. package/dist/src/utils/transport/iframe-transport.d.ts.map +1 -0
  153. package/dist/src/utils/transport/iframe-transport.spec.d.ts +2 -0
  154. package/dist/src/utils/transport/iframe-transport.spec.d.ts.map +1 -0
  155. package/dist/src/utils.d.ts +18 -0
  156. package/dist/src/utils.d.ts.map +1 -1
  157. package/dist/tsembed-react.es.js +1031 -392
  158. package/dist/tsembed-react.js +1030 -391
  159. package/dist/tsembed.es.js +1031 -392
  160. package/dist/tsembed.js +1029 -390
  161. package/dist/visual-embed-sdk-react-full.d.ts +1483 -693
  162. package/dist/visual-embed-sdk-react.d.ts +1364 -647
  163. package/dist/visual-embed-sdk.d.ts +1426 -659
  164. package/lib/package.json +9 -1
  165. package/lib/src/api-intercept.d.ts.map +1 -1
  166. package/lib/src/api-intercept.js +2 -1
  167. package/lib/src/api-intercept.js.map +1 -1
  168. package/lib/src/contracts/contracts.spec.d.ts +2 -0
  169. package/lib/src/contracts/contracts.spec.d.ts.map +1 -0
  170. package/lib/src/contracts/contracts.spec.js +342 -0
  171. package/lib/src/contracts/contracts.spec.js.map +1 -0
  172. package/lib/src/contracts/embed-event-payloads.d.ts +73 -0
  173. package/lib/src/contracts/embed-event-payloads.d.ts.map +1 -0
  174. package/lib/src/contracts/embed-event-payloads.js +2 -0
  175. package/lib/src/contracts/embed-event-payloads.js.map +1 -0
  176. package/lib/src/contracts/host-event-contracts.d.ts +378 -0
  177. package/lib/src/contracts/host-event-contracts.d.ts.map +1 -0
  178. package/lib/src/contracts/host-event-contracts.js +2 -0
  179. package/lib/src/contracts/host-event-contracts.js.map +1 -0
  180. package/lib/src/contracts/index.d.ts +22 -0
  181. package/lib/src/contracts/index.d.ts.map +1 -0
  182. package/lib/src/contracts/index.js +22 -0
  183. package/lib/src/contracts/index.js.map +1 -0
  184. package/lib/src/contracts/ui-passthrough-contracts.d.ts +277 -0
  185. package/lib/src/contracts/ui-passthrough-contracts.d.ts.map +1 -0
  186. package/lib/src/{embed/hostEventClient/contracts.js → contracts/ui-passthrough-contracts.js} +6 -2
  187. package/lib/src/contracts/ui-passthrough-contracts.js.map +1 -0
  188. package/lib/src/css-variables.d.ts +1 -1
  189. package/lib/src/embed/app.d.ts +17 -140
  190. package/lib/src/embed/app.d.ts.map +1 -1
  191. package/lib/src/embed/app.js +22 -122
  192. package/lib/src/embed/app.js.map +1 -1
  193. package/lib/src/embed/app.spec.js +70 -26
  194. package/lib/src/embed/app.spec.js.map +1 -1
  195. package/lib/src/embed/conversation.d.ts +5 -5
  196. package/lib/src/embed/events.spec.js +12 -2
  197. package/lib/src/embed/events.spec.js.map +1 -1
  198. package/lib/src/embed/hostEventClient/host-event-client.d.ts +3 -2
  199. package/lib/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
  200. package/lib/src/embed/hostEventClient/host-event-client.js +6 -1
  201. package/lib/src/embed/hostEventClient/host-event-client.js.map +1 -1
  202. package/lib/src/embed/hostEventClient/host-event-client.spec.js +1 -1
  203. package/lib/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
  204. package/lib/src/embed/hostEventClient/utils.d.ts +1 -1
  205. package/lib/src/embed/hostEventClient/utils.d.ts.map +1 -1
  206. package/lib/src/embed/hostEventClient/utils.js +1 -1
  207. package/lib/src/embed/hostEventClient/utils.js.map +1 -1
  208. package/lib/src/embed/liveboard.d.ts +9 -161
  209. package/lib/src/embed/liveboard.d.ts.map +1 -1
  210. package/lib/src/embed/liveboard.js +70 -137
  211. package/lib/src/embed/liveboard.js.map +1 -1
  212. package/lib/src/embed/liveboard.spec.js +215 -32
  213. package/lib/src/embed/liveboard.spec.js.map +1 -1
  214. package/lib/src/embed/search.d.ts +14 -0
  215. package/lib/src/embed/search.d.ts.map +1 -1
  216. package/lib/src/embed/search.js +4 -1
  217. package/lib/src/embed/search.js.map +1 -1
  218. package/lib/src/embed/search.spec.js +65 -0
  219. package/lib/src/embed/search.spec.js.map +1 -1
  220. package/lib/src/embed/ts-embed.d.ts +21 -25
  221. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  222. package/lib/src/embed/ts-embed.js +106 -73
  223. package/lib/src/embed/ts-embed.js.map +1 -1
  224. package/lib/src/embed/ts-embed.spec.d.ts.map +1 -1
  225. package/lib/src/embed/ts-embed.spec.js +378 -31
  226. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  227. package/lib/src/full-height.d.ts +137 -0
  228. package/lib/src/full-height.d.ts.map +1 -0
  229. package/lib/src/full-height.js +268 -0
  230. package/lib/src/full-height.js.map +1 -0
  231. package/lib/src/full-height.spec.d.ts +2 -0
  232. package/lib/src/full-height.spec.d.ts.map +1 -0
  233. package/lib/src/full-height.spec.js +833 -0
  234. package/lib/src/full-height.spec.js.map +1 -0
  235. package/lib/src/index.d.ts +4 -3
  236. package/lib/src/index.d.ts.map +1 -1
  237. package/lib/src/index.js +3 -3
  238. package/lib/src/index.js.map +1 -1
  239. package/lib/src/react/all-types-export.d.ts +1 -1
  240. package/lib/src/react/all-types-export.d.ts.map +1 -1
  241. package/lib/src/react/all-types-export.js +1 -1
  242. package/lib/src/react/all-types-export.js.map +1 -1
  243. package/lib/src/react/all-types-export.parity.spec.js +55 -3
  244. package/lib/src/react/all-types-export.parity.spec.js.map +1 -1
  245. package/lib/src/react/index.d.ts +8 -8
  246. package/lib/src/react/index.d.ts.map +1 -1
  247. package/lib/src/react/index.js +1 -1
  248. package/lib/src/react/index.js.map +1 -1
  249. package/lib/src/react/index.spec.js +7 -7
  250. package/lib/src/react/index.spec.js.map +1 -1
  251. package/lib/src/types.d.ts +664 -39
  252. package/lib/src/types.d.ts.map +1 -1
  253. package/lib/src/types.js +405 -12
  254. package/lib/src/types.js.map +1 -1
  255. package/lib/src/utils/processTrigger.d.ts +3 -1
  256. package/lib/src/utils/processTrigger.d.ts.map +1 -1
  257. package/lib/src/utils/processTrigger.js +19 -51
  258. package/lib/src/utils/processTrigger.js.map +1 -1
  259. package/lib/src/utils/transport/iframe-transport.d.ts +55 -0
  260. package/lib/src/utils/transport/iframe-transport.d.ts.map +1 -0
  261. package/lib/src/utils/transport/iframe-transport.js +101 -0
  262. package/lib/src/utils/transport/iframe-transport.js.map +1 -0
  263. package/lib/src/utils/transport/iframe-transport.spec.d.ts +2 -0
  264. package/lib/src/utils/transport/iframe-transport.spec.d.ts.map +1 -0
  265. package/lib/src/utils/transport/iframe-transport.spec.js +138 -0
  266. package/lib/src/utils/transport/iframe-transport.spec.js.map +1 -0
  267. package/lib/src/utils.d.ts +18 -0
  268. package/lib/src/utils.d.ts.map +1 -1
  269. package/lib/src/utils.js +37 -0
  270. package/lib/src/utils.js.map +1 -1
  271. package/lib/src/utils.spec.js +63 -1
  272. package/lib/src/utils.spec.js.map +1 -1
  273. package/lib/src/visual-embed-sdk.d.ts +1426 -659
  274. package/package.json +9 -1
  275. package/src/api-intercept.ts +2 -1
  276. package/src/contracts/contracts.spec.ts +392 -0
  277. package/src/contracts/embed-event-payloads.ts +83 -0
  278. package/src/contracts/host-event-contracts.ts +456 -0
  279. package/src/contracts/index.ts +53 -0
  280. package/src/contracts/ui-passthrough-contracts.ts +301 -0
  281. package/src/css-variables.ts +1 -1
  282. package/src/embed/app.spec.ts +86 -34
  283. package/src/embed/app.ts +37 -264
  284. package/src/embed/conversation.ts +5 -5
  285. package/src/embed/events.spec.ts +14 -2
  286. package/src/embed/hostEventClient/host-event-client.spec.ts +2 -2
  287. package/src/embed/hostEventClient/host-event-client.ts +18 -5
  288. package/src/embed/hostEventClient/utils.ts +2 -1
  289. package/src/embed/liveboard.spec.ts +261 -42
  290. package/src/embed/liveboard.ts +78 -297
  291. package/src/embed/search.spec.ts +80 -0
  292. package/src/embed/search.ts +20 -0
  293. package/src/embed/ts-embed.spec.ts +518 -31
  294. package/src/embed/ts-embed.ts +133 -82
  295. package/src/full-height.spec.ts +1008 -0
  296. package/src/full-height.ts +361 -0
  297. package/src/index.ts +95 -5
  298. package/src/react/all-types-export.parity.spec.ts +63 -3
  299. package/src/react/all-types-export.ts +46 -0
  300. package/src/react/index.spec.tsx +7 -7
  301. package/src/react/index.tsx +9 -9
  302. package/src/types.ts +665 -37
  303. package/src/utils/processTrigger.ts +28 -58
  304. package/src/utils/transport/iframe-transport.spec.ts +177 -0
  305. package/src/utils/transport/iframe-transport.ts +122 -0
  306. package/src/utils.spec.ts +71 -0
  307. package/src/utils.ts +38 -0
  308. package/cjs/src/embed/hostEventClient/contracts.d.ts +0 -231
  309. package/cjs/src/embed/hostEventClient/contracts.d.ts.map +0 -1
  310. package/cjs/src/embed/hostEventClient/contracts.js.map +0 -1
  311. package/dist/src/embed/hostEventClient/contracts.d.ts +0 -231
  312. package/dist/src/embed/hostEventClient/contracts.d.ts.map +0 -1
  313. package/lib/src/embed/hostEventClient/contracts.d.ts +0 -231
  314. package/lib/src/embed/hostEventClient/contracts.d.ts.map +0 -1
  315. package/lib/src/embed/hostEventClient/contracts.js.map +0 -1
  316. package/src/embed/hostEventClient/contracts.ts +0 -262
@@ -1,4 +1,4 @@
1
- /* @thoughtspot/visual-embed-sdk version 1.51.2 */
1
+ /* @thoughtspot/visual-embed-sdk version 1.52.1 */
2
2
  'use client';
3
3
  function _mergeNamespaces(n, m) {
4
4
  m.forEach(function (e) {
@@ -858,6 +858,9 @@ var EmbedEvent;
858
858
  EmbedEvent["Download"] = "download";
859
859
  /**
860
860
  * Emitted when the download action is triggered on an Answer.
861
+ * Payload varies by context: {@link VizScopedRequest} (Search, Answer,
862
+ * Liveboard), {@link RequiredVizRequest} (Spotter, vizId required). trigger()
863
+ * accepts the union now; per-context enforced next release.
861
864
  * Use start:true to subscribe to when download is initiated, or end:true to
862
865
  * subscribe to when download is completed. Default is end:true.
863
866
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.0.sw
@@ -874,6 +877,9 @@ var EmbedEvent;
874
877
  EmbedEvent["DownloadAsPng"] = "downloadAsPng";
875
878
  /**
876
879
  * Emitted when the Download as PDF action is triggered on an Answer
880
+ * Payload varies by context: {@link VizScopedRequest} (Search, Answer; plus
881
+ * liveboardId on Liveboard), {@link RequiredVizRequest} (Spotter). trigger()
882
+ * accepts the union now; per-context enforced next release.
877
883
  * Use start:true to subscribe to when download as PDF is initiated, or end:true to
878
884
  * subscribe to when download as PDF is completed. Default is end:true.
879
885
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
@@ -890,6 +896,9 @@ var EmbedEvent;
890
896
  EmbedEvent["DownloadAsPdf"] = "downloadAsPdf";
891
897
  /**
892
898
  * Emitted when the Download as CSV action is triggered on an Answer.
899
+ * Payload varies by context: {@link VizScopedRequest} (Search, Answer,
900
+ * Liveboard), {@link RequiredVizRequest} (Spotter, vizId required). trigger()
901
+ * accepts the union now; per-context enforced next release.
893
902
  * Use start:true to subscribe to when download as CSV is initiated, or end:true to
894
903
  * subscribe to when download as CSV is completed. Default is end:true.
895
904
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
@@ -906,6 +915,9 @@ var EmbedEvent;
906
915
  EmbedEvent["DownloadAsCsv"] = "downloadAsCsv";
907
916
  /**
908
917
  * Emitted when the Download as XLSX action is triggered on an Answer.
918
+ * Payload varies by context: {@link VizScopedRequest} (Search, Answer,
919
+ * Liveboard), {@link RequiredVizRequest} (Spotter, vizId required). trigger()
920
+ * accepts the union now; per-context enforced next release.
909
921
  * Use start:true to subscribe to when download as XLSX is initiated, or end:true to
910
922
  * subscribe to when download as XLSX is completed. Default is end:true.
911
923
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
@@ -1184,6 +1196,9 @@ var EmbedEvent;
1184
1196
  EmbedEvent["Schedule"] = "subscription";
1185
1197
  /**
1186
1198
  * Emitted when a user clicks **Edit** on a Liveboard or visualization
1199
+ * Payload varies by context: {@link VizScopedRequest} (Liveboard),
1200
+ * {@link RequiredVizRequest} (Spotter, vizId required). trigger() accepts the
1201
+ * union now; per-context enforced next release.
1187
1202
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1188
1203
  * @example
1189
1204
  * ```js
@@ -1725,7 +1740,32 @@ var EmbedEvent;
1725
1740
  */
1726
1741
  EmbedEvent["OrgSwitched"] = "orgSwitched";
1727
1742
  /**
1728
- * Emitted when the user intercepts a URL.
1743
+ * Emitted before the embedded ThoughtSpot app sends a network request whose
1744
+ * fully resolved URL matches one of the `interceptUrls` in the view config.
1745
+ * The request is held until you call `responder`, which decides whether the
1746
+ * real request goes out or a response you supply is used in its place.
1747
+ *
1748
+ * Setting `interceptUrls` is what enables this; there is no separate enable
1749
+ * flag. If `responder` is not called within `interceptTimeout` (30000 ms by
1750
+ * default) the request fails and `EmbedEvent.Error` is emitted.
1751
+ *
1752
+ * The payload is `{ input, init, urlType }`, where `input` is the request
1753
+ * URL and `init` is the `fetch` init object, with `init.body` parsed into an
1754
+ * object when it is valid JSON. `urlType` is the matching
1755
+ * `InterceptedApiType`; it is `InterceptedApiType.ALL` for any URL outside
1756
+ * the recognized API groups.
1757
+ *
1758
+ * Interception wraps the outermost layer of `fetch`, so `init` holds the
1759
+ * request as the application composed it, before ThoughtSpot attaches its
1760
+ * authentication headers. Those headers, and any token refresh and retry,
1761
+ * are applied afterwards and only when you pass `execute: true`. Only
1762
+ * requests made through `fetch` are intercepted.
1763
+ *
1764
+ * Pass `execute: true` to let the original request proceed untouched, in
1765
+ * which case any `response` you supply alongside it is ignored. With
1766
+ * `execute: false` the request is never sent, and your `response.body` is
1767
+ * returned to the app as JSON, defaulting to status 200 and a
1768
+ * `Content-Type: application/json` header.
1729
1769
  *
1730
1770
  * Supported on all embed types.
1731
1771
  *
@@ -2238,6 +2278,7 @@ var HostEvent;
2238
2278
  * the search query string.
2239
2279
  * Supported in `AppEmbed` and `SearchEmbed` deployments.
2240
2280
  * Includes the following properties:
2281
+ * Payload: {@link SearchRequest}.
2241
2282
  * @param - Includes the following keys:
2242
2283
  * - `searchQuery`: Query string with search tokens.
2243
2284
  * - `dataSources`: Data source GUID to search on.
@@ -2265,6 +2306,9 @@ var HostEvent;
2265
2306
  HostEvent["Search"] = "search";
2266
2307
  /**
2267
2308
  * Triggers a drill on certain points of the specified column
2309
+ * Payload: {@link DrillDownRequest}; in Liveboard context vizId is required
2310
+ * ({@link RequiredVizRequest}). trigger() accepts the union now; per-context
2311
+ * enforced next release.
2268
2312
  * Includes the following properties:
2269
2313
  * @param - Includes the following keys:
2270
2314
  * - `points`: An object containing `selectedPoints` and/or `clickedPoint`
@@ -2344,6 +2388,8 @@ var HostEvent;
2344
2388
  HostEvent["Reload"] = "reload";
2345
2389
  /**
2346
2390
  * Get iframe URL for the current embed view.
2391
+ * Payload: none.
2392
+ * Response: {@link GetIframeUrlResponse}.
2347
2393
  * @example
2348
2394
  * ```js
2349
2395
  * const url = embed.trigger(HostEvent.GetIframeUrl);
@@ -2362,6 +2408,7 @@ var HostEvent;
2362
2408
  HostEvent["GetIframeUrl"] = "GetIframeUrl";
2363
2409
  /**
2364
2410
  * Display specific visualizations on a Liveboard.
2411
+ * Payload: `string[]`.
2365
2412
  * @param - An array of GUIDs of the visualization to show. The visualization IDs not passed
2366
2413
  * in this parameter will be hidden.
2367
2414
  * @example
@@ -2384,6 +2431,7 @@ var HostEvent;
2384
2431
  HostEvent["SetVisibleVizs"] = "SetPinboardVisibleVizs";
2385
2432
  /**
2386
2433
  * Set a Liveboard tab as an active tab.
2434
+ * Payload: {@link SetActiveTabRequest}.
2387
2435
  * @param - tabId - string of id of Tab to show
2388
2436
  * @example
2389
2437
  * ```js
@@ -2411,6 +2459,7 @@ var HostEvent;
2411
2459
  * and `AppEmbed` only. In full application embedding, this event updates
2412
2460
  * the runtime filters applied on the Liveboard and saved Answer objects.
2413
2461
  *
2462
+ * Payload: {@link RuntimeFilter}[].
2414
2463
  * @param - Array of {@link RuntimeFilter} objects. Each item includes:
2415
2464
  * - `columnName`: Name of the column to filter on.
2416
2465
  * - `operator`: {@link RuntimeFilterOp} to apply. For more information, see
@@ -2452,6 +2501,7 @@ var HostEvent;
2452
2501
  * Accepts either a plain value or an object with `path`
2453
2502
  * and an optional `replace` flag.
2454
2503
  *
2504
+ * Payload: `string` | `number` | {@link NavigateRequest}.
2455
2505
  * @param data - A string path, a numeric history delta, or an object
2456
2506
  * `{ path: string | number, replace?: boolean }`.
2457
2507
  * - `path` — the route to navigate to, or a history delta such as `1`
@@ -2479,6 +2529,9 @@ var HostEvent;
2479
2529
  /**
2480
2530
  * Open the filter panel for a particular column.
2481
2531
  * Works with Search and Liveboard embed.
2532
+ * Payload: {@link OpenFilterRequest} (the cross-context superset). The
2533
+ * accepted fields vary by context: {@link OpenFilterLiveboardRequest},
2534
+ * {@link OpenFilterSpotterRequest}, {@link OpenFilterSearchRequest}.
2482
2535
  * @param - { columnId: string,
2483
2536
  * name: string,
2484
2537
  * type: ATTRIBUTE/MEASURE,
@@ -2535,7 +2588,7 @@ var HostEvent;
2535
2588
  *
2536
2589
  * Unlike {@link HostEvent.OpenFilter}, which opens the panel of an
2537
2590
  * existing filter, this event starts the creation of a new filter.
2538
- * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
2591
+ * @version SDK: 1.51.1 | ThoughtSpot Cloud: 26.8.0.cl
2539
2592
  * @example
2540
2593
  * ```js
2541
2594
  * liveboardEmbed.trigger(HostEvent.OpenAddFilterModal);
@@ -2551,7 +2604,7 @@ var HostEvent;
2551
2604
  * Hiding the *Add parameter* button with `hiddenActions:
2552
2605
  * [Action.AddParameter]` does not block this event, but disabling it
2553
2606
  * with `disabledActions` does.
2554
- * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
2607
+ * @version SDK: 1.51.1 | ThoughtSpot Cloud: 26.8.0.cl
2555
2608
  * @example
2556
2609
  * ```js
2557
2610
  * liveboardEmbed.trigger(HostEvent.OpenAddParameterModal);
@@ -2561,6 +2614,7 @@ var HostEvent;
2561
2614
  /**
2562
2615
  * Open the parameter panel for a particular parameter on a Liveboard.
2563
2616
  * Mirrors {@link HostEvent.OpenFilter} for parameters.
2617
+ * Payload: {@link OpenParameterRequest}.
2564
2618
  * @param - Includes the following keys:
2565
2619
  * - `parameter`: An object identifying the parameter to open, for
2566
2620
  * example, `{ parameterId: '<parameter-GUID>' }`.
@@ -2592,6 +2646,7 @@ var HostEvent;
2592
2646
  HostEvent["OpenParameter"] = "openParameter";
2593
2647
  /**
2594
2648
  * Add columns to the current search query.
2649
+ * Payload: `{ columnIds: string[] }`.
2595
2650
  * @param - { columnIds: string[] }
2596
2651
  * @example
2597
2652
  * ```js
@@ -2610,6 +2665,7 @@ var HostEvent;
2610
2665
  HostEvent["AddColumns"] = "addColumns";
2611
2666
  /**
2612
2667
  * Remove a column from the current search query.
2668
+ * Payload: `{ columnId: string }`.
2613
2669
  * @param - { columnId: string }
2614
2670
  * @example
2615
2671
  * ```js
@@ -2634,6 +2690,8 @@ var HostEvent;
2634
2690
  * sorting, toggling of legends, and data drill down.
2635
2691
  * For more information, see
2636
2692
  * link:https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#transient-lb-content[Liveboard data with unsaved changes].
2693
+ * Payload: none.
2694
+ * Response: {@link GetExportRequestForCurrentPinboardResponse}.
2637
2695
  * @example
2638
2696
  * ```js
2639
2697
  * liveboardEmbed.trigger(HostEvent.getExportRequestForCurrentPinboard).then(
@@ -2655,6 +2713,8 @@ var HostEvent;
2655
2713
  * requiring additional user input via the *Pin to Liveboard* modal, define
2656
2714
  * the following parameters:
2657
2715
  *
2716
+ * Payload: {@link PinAnswerToLiveboardRequest}.
2717
+ * Response: {@link PinAnswerToLiveboardResponse}.
2658
2718
  * @param - Includes the following keys:
2659
2719
  * - `vizId`: GUID of the saved Answer or Spotter visualization ID to pin to a
2660
2720
  * Liveboard.
@@ -2769,6 +2829,7 @@ var HostEvent;
2769
2829
  HostEvent["LiveboardInfo"] = "pinboardInfo";
2770
2830
  /**
2771
2831
  * Trigger the **Schedule** action on an embedded Liveboard.
2832
+ * Payload: {@link VizScopedRequest}.
2772
2833
  * @example
2773
2834
  * ```js
2774
2835
  * liveboardEmbed.trigger(HostEvent.Schedule)
@@ -2784,6 +2845,7 @@ var HostEvent;
2784
2845
  HostEvent["Schedule"] = "subscription";
2785
2846
  /**
2786
2847
  * Trigger the **Manage schedule** action on an embedded Liveboard
2848
+ * Payload: {@link VizScopedRequest}.
2787
2849
  * @example
2788
2850
  * ```js
2789
2851
  * liveboardEmbed.trigger(HostEvent.SchedulesList)
@@ -2800,6 +2862,7 @@ var HostEvent;
2800
2862
  /**
2801
2863
  * Trigger the **Export TML** action on an embedded Liveboard or
2802
2864
  * Answer.
2865
+ * Payload: {@link VizScopedRequest}.
2803
2866
  * @example
2804
2867
  * ```js
2805
2868
  * liveboardEmbed.trigger(HostEvent.ExportTML)
@@ -2822,6 +2885,7 @@ var HostEvent;
2822
2885
  /**
2823
2886
  * Trigger the **Edit TML** action on an embedded Liveboard or
2824
2887
  * saved Answers in the full application embedding.
2888
+ * Payload: {@link VizScopedRequest}.
2825
2889
  * @example
2826
2890
  * ```js
2827
2891
  * liveboardEmbed.trigger(HostEvent.EditTML)
@@ -2843,6 +2907,7 @@ var HostEvent;
2843
2907
  HostEvent["EditTML"] = "editTSL";
2844
2908
  /**
2845
2909
  * Trigger the **Update TML** action on an embedded Liveboard.
2910
+ * Payload: {@link VizScopedRequest}.
2846
2911
  * @example
2847
2912
  * ```js
2848
2913
  * liveboardEmbed.trigger(HostEvent.UpdateTML)
@@ -2860,6 +2925,7 @@ var HostEvent;
2860
2925
  * Trigger the **Download PDF** action on an embedded Liveboard,
2861
2926
  * visualization or Answer.
2862
2927
  *
2928
+ * Payload: {@link VizScopedRequest} plus optional `liveboardId`.
2863
2929
  * @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
2864
2930
  *
2865
2931
  * **NOTE**: The **Download** > **PDF** action is available on
@@ -2910,6 +2976,7 @@ var HostEvent;
2910
2976
  /**
2911
2977
  * Trigger the **AI Highlights** action on an embedded Liveboard
2912
2978
  *
2979
+ * Payload: none.
2913
2980
  * @example
2914
2981
  * ```js
2915
2982
  * liveboardEmbed.trigger(HostEvent.AIHighlights)
@@ -2964,6 +3031,9 @@ var HostEvent;
2964
3031
  HostEvent["MakeACopy"] = "makeACopy";
2965
3032
  /**
2966
3033
  * Trigger the **Delete** action for a Liveboard.
3034
+ * Payload varies by context: {@link RequiredVizRequest} (Liveboard, vizId
3035
+ * required), {@link VizScopedRequest} (Search). trigger() accepts the union
3036
+ * now; per-context enforced next release.
2967
3037
  * @example
2968
3038
  * ```js
2969
3039
  * appEmbed.trigger(HostEvent.Remove)
@@ -2978,6 +3048,7 @@ var HostEvent;
2978
3048
  HostEvent["Remove"] = "delete";
2979
3049
  /**
2980
3050
  * Trigger the **Explore** action on a visualization.
3051
+ * Payload: {@link RequiredVizRequest}.
2981
3052
  * @param - an object with `vizId` as a key
2982
3053
  * @example
2983
3054
  * ```js
@@ -2997,6 +3068,7 @@ var HostEvent;
2997
3068
  /**
2998
3069
  * Trigger the **Create alert** action on a KPI chart
2999
3070
  * in a Liveboard or saved Answer.
3071
+ * Payload: {@link VizScopedRequest}.
3000
3072
  * @param - an object with `vizId` as a key
3001
3073
  * @example
3002
3074
  * ```js
@@ -3028,6 +3100,7 @@ var HostEvent;
3028
3100
  /**
3029
3101
  * Trigger the **Manage alerts** action on a KPI chart
3030
3102
  * in a visualization or saved Answer.
3103
+ * Payload: {@link VizScopedRequest}.
3031
3104
  * @param - an object with `vizId` as a key
3032
3105
  * @example
3033
3106
  * ```js
@@ -3065,6 +3138,7 @@ var HostEvent;
3065
3138
  * on a Liveboard.
3066
3139
  *
3067
3140
  * This event is not supported in visualization embed and search embed.
3141
+ * Payload: {@link VizScopedRequest}.
3068
3142
  * @param - Object parameter. Includes the following keys:
3069
3143
  * - `vizId`: To trigger the action for a specific visualization in Liveboard embed,
3070
3144
  * pass in `vizId` as a key. In Spotter embed, `vizId` refers to the Answer ID and
@@ -3107,6 +3181,7 @@ var HostEvent;
3107
3181
  HostEvent["Edit"] = "edit";
3108
3182
  /**
3109
3183
  * Trigger the **Copy link** action on a Liveboard or visualization
3184
+ * Payload: {@link VizScopedRequest}.
3110
3185
  * @param - object - to trigger the action for a
3111
3186
  * specific visualization in Liveboard embed, pass in `vizId` as a key
3112
3187
  * @example
@@ -3152,6 +3227,7 @@ var HostEvent;
3152
3227
  HostEvent["CopyLink"] = "embedDocument";
3153
3228
  /**
3154
3229
  * Trigger the **Present** action on a Liveboard or visualization
3230
+ * Payload: {@link VizScopedRequest}.
3155
3231
  * @param - object - to trigger the action for a specific visualization
3156
3232
  * in Liveboard embed, pass in `vizId` as a key
3157
3233
  * @example
@@ -3197,6 +3273,8 @@ var HostEvent;
3197
3273
  HostEvent["Present"] = "present";
3198
3274
  /**
3199
3275
  * Get TML for the current search.
3276
+ * Payload: {@link GetTMLRequest}.
3277
+ * Response: `Record<string, any>`.
3200
3278
  * @example
3201
3279
  * ```js
3202
3280
  * searchEmbed.trigger(HostEvent.GetTML).then((tml) => {
@@ -3246,6 +3324,7 @@ var HostEvent;
3246
3324
  * Trigger the **Show underlying data** action on a
3247
3325
  * chart or table.
3248
3326
  *
3327
+ * Payload: {@link VizScopedRequest}.
3249
3328
  * @param - an object with vizId as a key
3250
3329
  * @example
3251
3330
  * ```js
@@ -3279,6 +3358,7 @@ var HostEvent;
3279
3358
  * Trigger the **Delete** action for a visualization
3280
3359
  * in an embedded Liveboard, or a chart or table
3281
3360
  * generated from Search.
3361
+ * Payload: {@link VizScopedRequest}.
3282
3362
  * @param - Liveboard embed takes an object with `vizId` as a key.
3283
3363
  * Can be left empty if embedding Search or visualization.
3284
3364
  * @example
@@ -3307,6 +3387,7 @@ var HostEvent;
3307
3387
  /**
3308
3388
  * Trigger the **SpotIQ analyze** action on a
3309
3389
  * chart or table.
3390
+ * Payload: {@link VizScopedRequest}.
3310
3391
  * @param - Liveboard embed takes `vizId` as a
3311
3392
  * key. Can be left undefined when embedding Search or
3312
3393
  * visualization.
@@ -3369,6 +3450,7 @@ var HostEvent;
3369
3450
  /**
3370
3451
  * Trigger the **Download** > **PNG** action on
3371
3452
  * charts in the embedded view.
3453
+ * Payload: {@link VizScopedRequest}.
3372
3454
  * @example
3373
3455
  * ```js
3374
3456
  * liveboardEmbed.trigger(HostEvent.DownloadAsPng,
@@ -3400,6 +3482,7 @@ var HostEvent;
3400
3482
  /**
3401
3483
  * Trigger the **Download** > **CSV** action on tables in
3402
3484
  * the embedded view.
3485
+ * Payload: {@link VizScopedRequest}.
3403
3486
  * @param - `vizId` refers to the Visualization ID in Spotter embed and is required in Spotter embed.
3404
3487
  * @example
3405
3488
  * ```js
@@ -3439,6 +3522,7 @@ var HostEvent;
3439
3522
  /**
3440
3523
  * Trigger the **Download** > **XLSX** action on tables
3441
3524
  * in the embedded view.
3525
+ * Payload: {@link VizScopedRequest}.
3442
3526
  * @param - `vizId` refers to the Visualization ID in Spotter embed and is required in Spotter embed.
3443
3527
  * @example
3444
3528
  * ```js
@@ -3478,6 +3562,7 @@ var HostEvent;
3478
3562
  /**
3479
3563
  * Trigger the **Share** action on an embedded
3480
3564
  * Liveboard or Answer.
3565
+ * Payload: {@link VizScopedRequest}.
3481
3566
  * @example
3482
3567
  * ```js
3483
3568
  * liveboardEmbed.trigger(HostEvent.Share)
@@ -3504,6 +3589,7 @@ var HostEvent;
3504
3589
  * Trigger the **Save** action on a Liveboard, Answer, or Spotter.
3505
3590
  * Saves the changes.
3506
3591
  *
3592
+ * Payload: {@link VizScopedRequest}.
3507
3593
  * @param - `vizId` refers to the Spotter Visualization Id used in Spotter embed.
3508
3594
  * It is required and can be retrieved from the data embed event.
3509
3595
  *
@@ -3555,6 +3641,7 @@ var HostEvent;
3555
3641
  /**
3556
3642
  * Trigger the **Sync to Sheets** action on an embedded visualization or Answer
3557
3643
  * Sends data from an Answer or Liveboard visualization to a Google sheet.
3644
+ * Payload: {@link VizScopedRequest}.
3558
3645
  * @param - an object with `vizId` as a key
3559
3646
  * @example
3560
3647
  * ```js
@@ -3585,6 +3672,7 @@ var HostEvent;
3585
3672
  * Trigger the **Sync to Other Apps** action on an embedded visualization or Answer
3586
3673
  * Sends data from an Answer or Liveboard visualization to third-party apps such
3587
3674
  * as Slack, Salesforce, Microsoft Teams, ServiceNow and so on.
3675
+ * Payload: {@link VizScopedRequest}.
3588
3676
  * @param - an object with vizId as a key
3589
3677
  * @example
3590
3678
  * ```js
@@ -3615,6 +3703,7 @@ var HostEvent;
3615
3703
  * Trigger the **Manage pipelines** action on an embedded
3616
3704
  * visualization or Answer.
3617
3705
  * Allows users to manage ThoughtSpot Sync pipelines.
3706
+ * Payload: {@link VizScopedRequest}.
3618
3707
  * @param - an object with `vizId` as a key
3619
3708
  * @example
3620
3709
  * ```js
@@ -3643,6 +3732,7 @@ var HostEvent;
3643
3732
  HostEvent["ManagePipelines"] = "manage-pipeline";
3644
3733
  /**
3645
3734
  * Reset search operation on the Search or Answer page.
3735
+ * Payload: none.
3646
3736
  * @example
3647
3737
  * ```js
3648
3738
  * searchEmbed.trigger(HostEvent.ResetSearch)
@@ -3670,6 +3760,8 @@ var HostEvent;
3670
3760
  * whole Liveboard.
3671
3761
  * The `applicability` attribute is available from SDK: 1.53.0 |
3672
3762
  * ThoughtSpot: 26.10.0.cl.
3763
+ * Payload: {@link GetFiltersRequest}.
3764
+ * Response: {@link GetFiltersResponse}.
3673
3765
  * @example
3674
3766
  * ```js
3675
3767
  * const data = await liveboardEmbed.trigger(HostEvent.GetFilters);
@@ -3689,6 +3781,7 @@ var HostEvent;
3689
3781
  HostEvent["GetFilters"] = "getFilters";
3690
3782
  /**
3691
3783
  * Update one or several filters applied on a Liveboard.
3784
+ * Payload: {@link UpdateFiltersRequest}.
3692
3785
  * @param - Includes the following keys:
3693
3786
  * - `filter`: A single filter object containing column name, filter operator, and
3694
3787
  * values.
@@ -3817,6 +3910,8 @@ var HostEvent;
3817
3910
  HostEvent["UpdateFilters"] = "updateFilters";
3818
3911
  /**
3819
3912
  * Get tab details for the current Liveboard.
3913
+ * Payload: none.
3914
+ * Response: {@link GetTabsResponse}.
3820
3915
  * @example
3821
3916
  * ```js
3822
3917
  * liveboardEmbed.trigger(HostEvent.GetTabs).then((tabDetails) => {
@@ -3842,6 +3937,8 @@ var HostEvent;
3842
3937
  /**
3843
3938
  * Get group details for the current Liveboard.
3844
3939
  * Mirrors {@link HostEvent.GetTabs} for filter/parameter groups.
3940
+ * Payload: none.
3941
+ * Response: {@link GetGroupsResponse}.
3845
3942
  * @example
3846
3943
  * ```js
3847
3944
  * liveboardEmbed.trigger(HostEvent.GetGroups).then((groupDetails) => {
@@ -3866,6 +3963,7 @@ var HostEvent;
3866
3963
  HostEvent["GetGroups"] = "getGroups";
3867
3964
  /**
3868
3965
  * Set the visible tabs on a Liveboard.
3966
+ * Payload: `string[]`.
3869
3967
  * @param - an array of ids of tabs to show, the IDs not passed
3870
3968
  * will be hidden.
3871
3969
  * @example
@@ -3888,6 +3986,7 @@ var HostEvent;
3888
3986
  HostEvent["SetVisibleTabs"] = "SetPinboardVisibleTabs";
3889
3987
  /**
3890
3988
  * Set the hidden tabs on a Liveboard.
3989
+ * Payload: `string[]`.
3891
3990
  * @param - an array of the IDs of the tabs to hide.
3892
3991
  * The IDs not passed will be shown.
3893
3992
  * @example
@@ -3916,6 +4015,8 @@ var HostEvent;
3916
4015
  * `getAnswerService()` method on the embed instance to get an AnswerService
3917
4016
  * object that provides a more convenient interface for working with answers.
3918
4017
  *
4018
+ * Payload: {@link GetAnswerSessionRequest}.
4019
+ * Response: {@link GetAnswerSessionResponse}.
3919
4020
  * @example
3920
4021
  * ```js
3921
4022
  * // Preferred way to get an AnswerService
@@ -3943,6 +4044,7 @@ var HostEvent;
3943
4044
  HostEvent["GetAnswerSession"] = "getAnswerSession";
3944
4045
  /**
3945
4046
  * Trigger the *Ask Sage* action for visualizations
4047
+ * Payload: {@link RequiredVizRequest}.
3946
4048
  * @example
3947
4049
  * ```js
3948
4050
  * liveboardEmbed.trigger(HostEvent.AskSage,
@@ -3954,6 +4056,7 @@ var HostEvent;
3954
4056
  /**
3955
4057
  * Trigger cross filter update action on a Liveboard.
3956
4058
  *
4059
+ * Payload: {@link UpdateCrossFilterRequest}.
3957
4060
  * @example
3958
4061
  * ```js
3959
4062
  * liveboardEmbed.trigger(HostEvent.UpdateCrossFilter, {
@@ -3969,7 +4072,9 @@ var HostEvent;
3969
4072
  HostEvent["UpdateCrossFilter"] = "UpdateCrossFilter";
3970
4073
  /**
3971
4074
  * Trigger reset action for a personalized Liveboard view.
3972
- * This event is deprecated. Use {@link HostEvent.ResetLiveboardPersonalizedView} instead.
4075
+ * This event is deprecated.
4076
+ * Use {@link HostEvent.ResetLiveboardPersonalizedView} instead.
4077
+ * Payload: none.
3973
4078
  * @example
3974
4079
  * ```js
3975
4080
  * liveboardEmbed.trigger(HostEvent.ResetLiveboardPersonalisedView);
@@ -3990,6 +4095,7 @@ var HostEvent;
3990
4095
  /**
3991
4096
  * Triggers an action to update Parameter values on embedded
3992
4097
  * Answers, Liveboard, and Spotter answer in Edit mode.
4098
+ * Payload: {@link RuntimeParameter}[].
3993
4099
  * @param - Includes the following keys for each item:
3994
4100
  * - `name`: Name of the parameter.
3995
4101
  * - `value`: The value to set for the parameter.
@@ -4047,6 +4153,8 @@ var HostEvent;
4047
4153
  * whole Liveboard.
4048
4154
  * The `applicability` attribute is available from SDK: 1.53.0 |
4049
4155
  * ThoughtSpot: 26.10.0.cl.
4156
+ * Payload: none.
4157
+ * Response: {@link GetParametersResponse}.
4050
4158
  * @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
4051
4159
  * ```js
4052
4160
  * liveboardEmbed.trigger(HostEvent.GetParameters).then((parameter) => {
@@ -4084,6 +4192,7 @@ var HostEvent;
4084
4192
  * ```js
4085
4193
  * liveboardEmbed.trigger(HostEvent.UpdatePersonalisedView, {viewId: '1234'})
4086
4194
  * ```
4195
+ * Payload: {@link PersonalisedViewRequest} (`viewId` only).
4087
4196
  * @example
4088
4197
  * ```js
4089
4198
  * // Update personalized view from liveboard context
@@ -4116,6 +4225,7 @@ var HostEvent;
4116
4225
  * If neither is provided, the Liveboard resets to the original/default view.
4117
4226
  * When a `viewName` is provided and multiple views share
4118
4227
  * the same name, the first match is selected.
4228
+ * Payload: {@link PersonalisedViewRequest}.
4119
4229
  * @example
4120
4230
  * ```js
4121
4231
  * liveboardEmbed.trigger(
@@ -4159,6 +4269,8 @@ var HostEvent;
4159
4269
  * If no parameters are specified, the save action is
4160
4270
  * triggered with a modal to prompt users to
4161
4271
  * add a name and description for the Answer.
4272
+ * Payload: {@link SaveAnswerRequest}.
4273
+ * Response: {@link SaveAnswerResponse}.
4162
4274
  * @param - Includes the following keys:
4163
4275
  * - `vizId`: Refers to the Answer ID in Spotter embed and is **required** in Spotter
4164
4276
  * embed.
@@ -4244,6 +4356,7 @@ var HostEvent;
4244
4356
  /**
4245
4357
  * Triggers a search operation with the search tokens specified in
4246
4358
  * the search query string in spotter embed.
4359
+ * Payload: {@link SpotterSearchRequest}.
4247
4360
  * @param - Includes the following keys:
4248
4361
  * - `query`: Text string in Natural Language format.
4249
4362
  * - `executeSearch`: Boolean to execute search and update search query.
@@ -4268,6 +4381,7 @@ var HostEvent;
4268
4381
  HostEvent["SpotterSearch"] = "SpotterSearch";
4269
4382
  /**
4270
4383
  * Edits the last prompt in spotter embed.
4384
+ * Payload: `string`.
4271
4385
  * @param - `query`: Text string
4272
4386
  * @example
4273
4387
  * ```js
@@ -4284,6 +4398,7 @@ var HostEvent;
4284
4398
  HostEvent["EditLastPrompt"] = "EditLastPrompt";
4285
4399
  /**
4286
4400
  * Opens the data source preview modal in Spotter Embed.
4401
+ * Payload: none.
4287
4402
  * @example
4288
4403
  * ```js
4289
4404
  * spotterEmbed.trigger(HostEvent.PreviewSpotterData);
@@ -4319,6 +4434,7 @@ var HostEvent;
4319
4434
  HostEvent["DataModelInstructions"] = "DataModelInstructions";
4320
4435
  /**
4321
4436
  * Resets the Spotter Embed Conversation.
4437
+ * Payload: none.
4322
4438
  * @example
4323
4439
  * ```js
4324
4440
  * spotterEmbed.trigger(HostEvent.ResetSpotterConversation);
@@ -4331,6 +4447,7 @@ var HostEvent;
4331
4447
  * `conversationId` is **mandatory** — you must pass the id of the
4332
4448
  * conversation to share. Also no-op when sharing is disabled
4333
4449
  * (enableShareConversation off) or when already in the read-only shared view.
4450
+ * Payload: {@link ConversationScopedRequest}.
4334
4451
  * @example
4335
4452
  * ```js
4336
4453
  * spotterEmbed.trigger(HostEvent.ShareSpotterConversation, { conversationId: 'abc' });
@@ -4340,6 +4457,7 @@ var HostEvent;
4340
4457
  HostEvent["ShareSpotterConversation"] = "ShareSpotterConversation";
4341
4458
  /**
4342
4459
  * Closes the Spotter share-conversation modal. No-op if none is open.
4460
+ * Payload: none.
4343
4461
  * @example
4344
4462
  * ```js
4345
4463
  * spotterEmbed.trigger(HostEvent.CloseSpotterShareConversation);
@@ -4349,6 +4467,7 @@ var HostEvent;
4349
4467
  HostEvent["CloseSpotterShareConversation"] = "CloseSpotterShareConversation";
4350
4468
  /**
4351
4469
  * Exits the read-only shared-conversation view.
4470
+ * Payload: none.
4352
4471
  * @example
4353
4472
  * ```js
4354
4473
  * spotterEmbed.trigger(HostEvent.ExitSpotterSharedConversation);
@@ -4358,6 +4477,7 @@ var HostEvent;
4358
4477
  HostEvent["ExitSpotterSharedConversation"] = "ExitSpotterSharedConversation";
4359
4478
  /**
4360
4479
  * Deletes the last prompt in spotter embed.
4480
+ * Payload: none.
4361
4481
  * @example
4362
4482
  * ```js
4363
4483
  * spotterEmbed.trigger(HostEvent.DeleteLastPrompt);
@@ -4367,6 +4487,7 @@ var HostEvent;
4367
4487
  HostEvent["DeleteLastPrompt"] = "DeleteLastPrompt";
4368
4488
  /**
4369
4489
  * Toggle the visualization to chart or table view.
4490
+ * Payload: {@link RequiredVizRequest}.
4370
4491
  * @param - `vizId ` refers to the Visualization ID in Spotter embed and is required.
4371
4492
  * @example
4372
4493
  * ```js
@@ -4405,6 +4526,7 @@ var HostEvent;
4405
4526
  HostEvent["VisibleEmbedCoordinates"] = "visibleEmbedCoordinates";
4406
4527
  /**
4407
4528
  * Trigger the *Spotter* action for visualizations present on the liveboard's vizzes.
4529
+ * Payload: {@link RequiredVizRequest}.
4408
4530
  * @param - `vizId` refers to the Visualization ID in Spotter embed and is required.
4409
4531
  * @example
4410
4532
  * ```js
@@ -4429,7 +4551,13 @@ var HostEvent;
4429
4551
  */
4430
4552
  HostEvent["UpdateEmbedParams"] = "updateEmbedParams";
4431
4553
  /**
4432
- * Triggered when the embed needs to be destroyed. This is used to clean up any embed-related resources internally.
4554
+ * Notifies the embedded ThoughtSpot app that the embed is being torn down, so that
4555
+ * it can release any resources it holds before the iframe is removed from the DOM.
4556
+ *
4557
+ * This is triggered for you by `embed.destroy()`; you rarely need to trigger it
4558
+ * directly. If `waitForCleanupOnDestroy` is set in the embed config, `destroy()`
4559
+ * waits for the app to acknowledge this event (up to `cleanupTimeout`) before
4560
+ * removing the iframe.
4433
4561
  * @example
4434
4562
  * ```js
4435
4563
  * liveboardEmbed.trigger(HostEvent.DestroyEmbed);
@@ -4460,6 +4588,7 @@ var HostEvent;
4460
4588
  * instance. Contact your admin or ThoughtSpot Support to enable chat history on your
4461
4589
  * instance.
4462
4590
  *
4591
+ * Payload: {@link ConversationScopedRequest}.
4463
4592
  * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
4464
4593
  * @example
4465
4594
  * ```js
@@ -4477,6 +4606,7 @@ var HostEvent;
4477
4606
  * instance. Contact your admin or ThoughtSpot Support to enable chat history on your
4478
4607
  * instance.
4479
4608
  *
4609
+ * Payload: {@link ConversationScopedRequest}.
4480
4610
  * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
4481
4611
  * @example
4482
4612
  * ```js
@@ -4501,6 +4631,7 @@ var HostEvent;
4501
4631
  * Trigger the **Send Test Email** action in the Liveboard schedule modal.
4502
4632
  * Sends a test schedule email to self or all recipients.
4503
4633
  * Requires `isSendNowLiveboardSchedulingEnabled` to be enabled.
4634
+ * Payload: {@link ScheduleEmailRequest}.
4504
4635
  * @example
4505
4636
  * ```js
4506
4637
  * liveboardEmbed.trigger(HostEvent.SendTestScheduleEmail, {
@@ -4519,6 +4650,7 @@ var HostEvent;
4519
4650
  HostEvent["SendTestScheduleEmail"] = "sendTestScheduleEmail";
4520
4651
  /**
4521
4652
  * Sends a user message (prompt) to the SpotterViz panel programmatically.
4653
+ * Payload: `{ query: string }`.
4522
4654
  * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
4523
4655
  * @param query - the prompt text to send.
4524
4656
  * @example
@@ -4531,6 +4663,7 @@ var HostEvent;
4531
4663
  HostEvent["SpotterVizSendUserMessage"] = "SpotterVizSendUserMessage";
4532
4664
  /**
4533
4665
  * Initializes a new SpotterViz conversation.
4666
+ * Payload: none.
4534
4667
  * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
4535
4668
  * @example
4536
4669
  * ```js
@@ -4540,6 +4673,7 @@ var HostEvent;
4540
4673
  HostEvent["InitSpotterVizConversation"] = "InitSpotterVizConversation";
4541
4674
  /**
4542
4675
  * Opens the SpotterViz panel.
4676
+ * Payload: none.
4543
4677
  * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
4544
4678
  * @example
4545
4679
  * ```js
@@ -4549,6 +4683,7 @@ var HostEvent;
4549
4683
  HostEvent["OpenSpotterVizPanel"] = "OpenSpotterVizPanel";
4550
4684
  /**
4551
4685
  * Closes the SpotterViz panel.
4686
+ * Payload: none.
4552
4687
  * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
4553
4688
  * @example
4554
4689
  * ```js
@@ -4559,6 +4694,7 @@ var HostEvent;
4559
4694
  /**
4560
4695
  * Clears browser cache and fetches new data for liveboard ChartViz Containers.
4561
4696
  * Requires `enableLiveboardDataCache` to be enabled.
4697
+ * Payload: {@link ScheduleEmailRequest}.
4562
4698
  * @example
4563
4699
  * ```js
4564
4700
  * liveboardEmbed.trigger(HostEvent.RefreshLiveboardBrowserCache);
@@ -4756,6 +4892,7 @@ var Param;
4756
4892
  Param["SpotterDataSources"] = "spotterDataSources";
4757
4893
  Param["AnalystId"] = "analystId";
4758
4894
  Param["OpenSpotterOnLiveboardByDefault"] = "openSpotterOnLiveboardByDefault";
4895
+ Param["ShowAnswerEditPanel"] = "showAnswerEditPanel";
4759
4896
  })(Param || (Param = {}));
4760
4897
  /**
4761
4898
  * ThoughtSpot application pages include actions and menu commands
@@ -6547,7 +6684,7 @@ var Action;
6547
6684
  * ```js
6548
6685
  * hiddenActions: [Action.QuickSearchPill]
6549
6686
  * ```
6550
- * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
6687
+ * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
6551
6688
  */
6552
6689
  Action["QuickSearchPill"] = "quickSearchPill";
6553
6690
  /**
@@ -6562,7 +6699,7 @@ var Action;
6562
6699
  * ```js
6563
6700
  * hiddenActions: [Action.DeepAnalysisPill]
6564
6701
  * ```
6565
- * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
6702
+ * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
6566
6703
  */
6567
6704
  Action["DeepAnalysisPill"] = "deepAnalysisPill";
6568
6705
  /**
@@ -6577,7 +6714,7 @@ var Action;
6577
6714
  * ```js
6578
6715
  * hiddenActions: [Action.DataLiteracyPill]
6579
6716
  * ```
6580
- * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
6717
+ * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
6581
6718
  */
6582
6719
  Action["DataLiteracyPill"] = "dataLiteracyPill";
6583
6720
  /**
@@ -6760,6 +6897,225 @@ var Action;
6760
6897
  * ```
6761
6898
  */
6762
6899
  Action["SpotterOnLiveboard"] = "spotterOnLiveboard";
6900
+ /**
6901
+ * Controls the visibility and disabled state of the "Chart Type" menu item
6902
+ * in Chart Settings V2.
6903
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
6904
+ * @example
6905
+ * ```js
6906
+ * {
6907
+ * hiddenActions: [Action.ChartTypeSettings],
6908
+ * disabledActions: [Action.ChartTypeSettings],
6909
+ * }
6910
+ * ```
6911
+ */
6912
+ Action["ChartTypeSettings"] = "CHART_TYPE";
6913
+ /**
6914
+ * Controls the visibility and disabled state of the "Layout" menu item
6915
+ * in Chart Settings V2.
6916
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
6917
+ * @example
6918
+ * ```js
6919
+ * {
6920
+ * hiddenActions: [Action.LayoutSettings],
6921
+ * disabledActions: [Action.LayoutSettings],
6922
+ * }
6923
+ * ```
6924
+ */
6925
+ Action["LayoutSettings"] = "LAYOUT";
6926
+ /**
6927
+ * Controls the visibility and disabled state of the "Column" menu item
6928
+ * in Chart Settings V2.
6929
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
6930
+ * @example
6931
+ * ```js
6932
+ * {
6933
+ * hiddenActions: [Action.ColumnSettings],
6934
+ * disabledActions: [Action.ColumnSettings],
6935
+ * }
6936
+ * ```
6937
+ */
6938
+ Action["ColumnSettings"] = "COLUMN";
6939
+ /**
6940
+ * Controls the visibility and disabled state of the "Axis" menu item
6941
+ * in Chart Settings V2.
6942
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
6943
+ * @example
6944
+ * ```js
6945
+ * {
6946
+ * hiddenActions: [Action.AxisSettings],
6947
+ * disabledActions: [Action.AxisSettings],
6948
+ * }
6949
+ * ```
6950
+ */
6951
+ Action["AxisSettings"] = "AXIS";
6952
+ /**
6953
+ * Controls the visibility and disabled state of the "Data Label" menu item
6954
+ * in Chart Settings V2.
6955
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
6956
+ * @example
6957
+ * ```js
6958
+ * {
6959
+ * hiddenActions: [Action.DataLabelSettings],
6960
+ * disabledActions: [Action.DataLabelSettings],
6961
+ * }
6962
+ * ```
6963
+ */
6964
+ Action["DataLabelSettings"] = "DATA_LABEL";
6965
+ /**
6966
+ * Controls the visibility and disabled state of the "Tooltip" menu item
6967
+ * in Chart Settings V2.
6968
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
6969
+ * @example
6970
+ * ```js
6971
+ * {
6972
+ * hiddenActions: [Action.TooltipSettings],
6973
+ * disabledActions: [Action.TooltipSettings],
6974
+ * }
6975
+ * ```
6976
+ */
6977
+ Action["TooltipSettings"] = "TOOLTIP";
6978
+ /**
6979
+ * Controls the visibility and disabled state of the "Legend" menu item
6980
+ * in Chart Settings V2.
6981
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
6982
+ * @example
6983
+ * ```js
6984
+ * {
6985
+ * hiddenActions: [Action.LegendSettings],
6986
+ * disabledActions: [Action.LegendSettings],
6987
+ * }
6988
+ * ```
6989
+ */
6990
+ Action["LegendSettings"] = "LEGEND";
6991
+ /**
6992
+ * Controls the visibility and disabled state of the "Display" menu item
6993
+ * in Chart Settings V2.
6994
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
6995
+ * @example
6996
+ * ```js
6997
+ * {
6998
+ * hiddenActions: [Action.DisplaySettings],
6999
+ * disabledActions: [Action.DisplaySettings],
7000
+ * }
7001
+ * ```
7002
+ */
7003
+ Action["DisplaySettings"] = "DISPLAY";
7004
+ /**
7005
+ * Controls the visibility and disabled state of the "Query Details" menu
7006
+ * item in Chart Settings V2.
7007
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
7008
+ * @example
7009
+ * ```js
7010
+ * {
7011
+ * hiddenActions: [Action.QuerySettings],
7012
+ * disabledActions: [Action.QuerySettings],
7013
+ * }
7014
+ * ```
7015
+ */
7016
+ Action["QuerySettings"] = "QUERY_DETAILS";
7017
+ /**
7018
+ * Controls the visibility and disabled state of the "Custom Action" menu
7019
+ * item in Chart Settings V2.
7020
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
7021
+ * @example
7022
+ * ```js
7023
+ * {
7024
+ * hiddenActions: [Action.CustomSettings],
7025
+ * disabledActions: [Action.CustomSettings],
7026
+ * }
7027
+ * ```
7028
+ */
7029
+ Action["CustomSettings"] = "CUSTOM_ACTION";
7030
+ /**
7031
+ * Controls the visibility and disabled state of the "Muze AI" menu item
7032
+ * in Chart Settings V2.
7033
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
7034
+ * @example
7035
+ * ```js
7036
+ * {
7037
+ * hiddenActions: [Action.MuzeAiSettings],
7038
+ * disabledActions: [Action.MuzeAiSettings],
7039
+ * }
7040
+ * ```
7041
+ */
7042
+ Action["MuzeAiSettings"] = "MUZE_AI";
7043
+ /**
7044
+ * Controls the visibility and disabled state of the "R Analysis" menu item
7045
+ * in Chart Settings V2.
7046
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
7047
+ * @example
7048
+ * ```js
7049
+ * {
7050
+ * hiddenActions: [Action.RAnalysisSettings],
7051
+ * disabledActions: [Action.RAnalysisSettings],
7052
+ * }
7053
+ * ```
7054
+ */
7055
+ Action["RAnalysisSettings"] = "R_ANALYSIS";
7056
+ /**
7057
+ * Controls the visibility and disabled state of the "Add to Collection" menu item.
7058
+ * @version SDK: 1.52.1 | ThoughtSpot Cloud: 26.5.0.cl
7059
+ * @example
7060
+ * ```js
7061
+ * {
7062
+ * hiddenActions: [Action.AddToCollection],
7063
+ * disabledActions: [Action.AddToCollection],
7064
+ * }
7065
+ * ```
7066
+ */
7067
+ Action["AddToCollection"] = "addToCollection";
7068
+ /**
7069
+ * Controls the visibility and disabled state of the "Create Collection" button.
7070
+ * @version SDK: 1.52.1 | ThoughtSpot Cloud: 26.5.0.cl
7071
+ * @example
7072
+ * ```js
7073
+ * {
7074
+ * hiddenActions: [Action.CreateCollection],
7075
+ * disabledActions: [Action.CreateCollection],
7076
+ * }
7077
+ * ```
7078
+ */
7079
+ Action["CreateCollection"] = "createCollection";
7080
+ /**
7081
+ * Controls the visibility and disabled state of the "Move" menu item in a
7082
+ * Collection.
7083
+ * @version SDK: 1.52.1 | ThoughtSpot Cloud: 26.5.0.cl
7084
+ * @example
7085
+ * ```js
7086
+ * {
7087
+ * hiddenActions: [Action.MoveToCollection],
7088
+ * disabledActions: [Action.MoveToCollection],
7089
+ * }
7090
+ * ```
7091
+ */
7092
+ Action["MoveToCollection"] = "moveToCollection";
7093
+ /**
7094
+ * Controls the visibility and disabled state of the "Remove" menu item in a
7095
+ * Collection.
7096
+ * @version SDK: 1.52.1 | ThoughtSpot Cloud: 26.5.0.cl
7097
+ * @example
7098
+ * ```js
7099
+ * {
7100
+ * hiddenActions: [Action.RemoveFromCollection],
7101
+ * disabledActions: [Action.RemoveFromCollection],
7102
+ * }
7103
+ * ```
7104
+ */
7105
+ Action["RemoveFromCollection"] = "removeFromCollection";
7106
+ /**
7107
+ * Controls the visibility and disabled state of the "Delete" menu item for a
7108
+ * Collection.
7109
+ * @version SDK: 1.52.1 | ThoughtSpot Cloud: 26.5.0.cl
7110
+ * @example
7111
+ * ```js
7112
+ * {
7113
+ * hiddenActions: [Action.DeleteCollection],
7114
+ * disabledActions: [Action.DeleteCollection],
7115
+ * }
7116
+ * ```
7117
+ */
7118
+ Action["DeleteCollection"] = "deleteCollection";
6763
7119
  })(Action || (Action = {}));
6764
7120
  var PrefetchFeatures;
6765
7121
  (function (PrefetchFeatures) {
@@ -7050,6 +7406,36 @@ var EmbedErrorCodes;
7050
7406
  /** UpdateParameters payload is invalid - malformed applicability */
7051
7407
  EmbedErrorCodes["UPDATEPARAMETERS_INVALID_PAYLOAD"] = "UPDATEPARAMETERS_INVALID_PAYLOAD";
7052
7408
  })(EmbedErrorCodes || (EmbedErrorCodes = {}));
7409
+ /**
7410
+ * How badly an error affects the embed, so the host can decide whether it is
7411
+ * worth surfacing to the end user.
7412
+ *
7413
+ * Mirrors the severity that ThoughtSpot itself stamps on errors raised inside
7414
+ * the embedded app, so a host can apply one rule to both sources.
7415
+ *
7416
+ * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
7417
+ * @group Error Handling
7418
+ *
7419
+ * @example
7420
+ * Only surface errors that took the embed down
7421
+ *
7422
+ * ```js
7423
+ * embed.on(EmbedEvent.Error, (error) => {
7424
+ * if (error.severity === EmbedErrorSeverity.SEV1) {
7425
+ * showBanner(error.message);
7426
+ * }
7427
+ * });
7428
+ * ```
7429
+ */
7430
+ var EmbedErrorSeverity;
7431
+ (function (EmbedErrorSeverity) {
7432
+ /** The embed cannot render. Nothing usable is on screen. */
7433
+ EmbedErrorSeverity[EmbedErrorSeverity["SEV1"] = 1] = "SEV1";
7434
+ /** Something is degraded but the embed still works. */
7435
+ EmbedErrorSeverity[EmbedErrorSeverity["SEV2"] = 2] = "SEV2";
7436
+ /** Everything else, including validation of the embedder's own input. */
7437
+ EmbedErrorSeverity[EmbedErrorSeverity["SEV3"] = 3] = "SEV3";
7438
+ })(EmbedErrorSeverity || (EmbedErrorSeverity = {}));
7053
7439
  /**
7054
7440
  * Context types for specifying the page context when triggering host events.
7055
7441
  * Used as the third parameter in the `trigger` method to help ThoughtSpot
@@ -7090,20 +7476,27 @@ var ContextType;
7090
7476
  ContextType["Other"] = "other";
7091
7477
  })(ContextType || (ContextType = {}));
7092
7478
  /**
7093
- * Enum for the type of API intercepted
7479
+ * Named groups of ThoughtSpot APIs that can be intercepted, for use in
7480
+ * `interceptUrls`. Each group expands to the underlying request URLs, so you do
7481
+ * not have to list them individually.
7094
7482
  */
7095
7483
  var InterceptedApiType;
7096
7484
  (function (InterceptedApiType) {
7097
7485
  /**
7098
- * The apis that are use to get the data for the embed
7486
+ * The APIs that fetch the data backing an Answer, including its chart,
7487
+ * table, and headline data.
7099
7488
  */
7100
7489
  InterceptedApiType["AnswerData"] = "AnswerData";
7101
7490
  /**
7102
- * This will intercept all the apis
7491
+ * Intercepts every `fetch` request the embedded application makes, not only
7492
+ * the data APIs. This includes authentication, session, and metadata calls,
7493
+ * so the handler must respond to requests it does not recognize by passing
7494
+ * `execute: true`. Listing this alongside other entries in `interceptUrls`
7495
+ * supersedes them.
7103
7496
  */
7104
7497
  InterceptedApiType["ALL"] = "ALL";
7105
7498
  /**
7106
- * The apis that are use to get the data for the liveboard
7499
+ * The APIs that fetch the data backing a Liveboard.
7107
7500
  */
7108
7501
  InterceptedApiType["LiveboardData"] = "LiveboardData";
7109
7502
  })(InterceptedApiType || (InterceptedApiType = {}));
@@ -7227,7 +7620,7 @@ var TableContentDensity;
7227
7620
  TableContentDensity["Compact"] = "COMPACT";
7228
7621
  })(TableContentDensity || (TableContentDensity = {}));
7229
7622
 
7230
- var version$1="1.51.2";var pkg = {version:version$1};
7623
+ var version$1="1.52.1";var pkg = {version:version$1};
7231
7624
 
7232
7625
  const { version } = pkg;
7233
7626
 
@@ -8049,6 +8442,43 @@ const setParamIfDefined = (queryParams, param, value, asBoolean = false) => {
8049
8442
  if (value !== undefined) {
8050
8443
  queryParams[param] = asBoolean ? !!value : value;
8051
8444
  }
8445
+ };
8446
+ /**
8447
+ * Calculates the element center for the currently visible viewport of the
8448
+ * element, using the scroll position of the host app, the offsetTop of the
8449
+ * element in the host app, and the viewport height of the tab.
8450
+ *
8451
+ * The returned keys are sent to the ThoughtSpot app over postMessage, so they
8452
+ * are named after the iframe and must not be renamed.
8453
+ * @param element The element to measure
8454
+ * @returns The element center within the visible viewport, the element height,
8455
+ * and the viewport height.
8456
+ */
8457
+ const calculateElementCenter = (element) => {
8458
+ const offsetTopClient = getOffsetTop(element);
8459
+ const scrollTopClient = window.scrollY;
8460
+ const viewPortHeight = window.innerHeight;
8461
+ const iframeHeight = element.offsetHeight;
8462
+ const iframeScrolled = scrollTopClient - offsetTopClient;
8463
+ let iframeVisibleViewPort;
8464
+ let iframeOffset;
8465
+ if (iframeScrolled < 0) {
8466
+ iframeVisibleViewPort = viewPortHeight - (offsetTopClient - scrollTopClient);
8467
+ iframeVisibleViewPort = Math.min(iframeHeight, iframeVisibleViewPort);
8468
+ iframeOffset = 0;
8469
+ }
8470
+ else {
8471
+ iframeVisibleViewPort = Math.min(iframeHeight - iframeScrolled, viewPortHeight);
8472
+ iframeOffset = iframeScrolled;
8473
+ }
8474
+ const iframeCenter = iframeOffset + iframeVisibleViewPort / 2;
8475
+ return {
8476
+ iframeCenter,
8477
+ iframeScrolled,
8478
+ iframeHeight,
8479
+ viewPortHeight,
8480
+ iframeVisibleViewPort,
8481
+ };
8052
8482
  };
8053
8483
 
8054
8484
  /**
@@ -8117,6 +8547,270 @@ const DEFAULT_EMBED_WIDTH = '100%';
8117
8547
  const DEFAULT_EMBED_HEIGHT = '100%';
8118
8548
  const DEFAULT_LAZY_LOADING_MARGIN = '500px 0px';
8119
8549
 
8550
+ /**
8551
+ * Copyright (c) 2025
8552
+ *
8553
+ * Full-height support for the Liveboard and app embeds.
8554
+ * @summary Full height
8555
+ */
8556
+ /**
8557
+ * The height the embed falls back to when the host app has not configured
8558
+ * `minimumHeight` or `defaultHeight`.
8559
+ */
8560
+ const DEFAULT_MINIMUM_HEIGHT = 500;
8561
+ /**
8562
+ * Routes that are part of the Liveboard experience itself. Navigating between
8563
+ * these does not reset the frame height, because the ThoughtSpot app keeps
8564
+ * reporting a height of its own for them.
8565
+ */
8566
+ const LIVEBOARD_RELATED_ROUTES = [
8567
+ '/pinboard/',
8568
+ '/insights/pinboard/',
8569
+ '/schedules/',
8570
+ '/embed/viz/',
8571
+ '/embed/insights/viz/',
8572
+ '/liveboard/',
8573
+ '/insights/liveboard/',
8574
+ '/tsl-editor/PINBOARD_ANSWER_BOOK/',
8575
+ '/import-tsl/PINBOARD_ANSWER_BOOK/',
8576
+ ];
8577
+ /**
8578
+ * Owns every piece of full-height behavior for an embed: the height
8579
+ * negotiation with the ThoughtSpot app, the query parameters that switch the
8580
+ * feature on, and the viewport listeners that drive lazy loading.
8581
+ *
8582
+ * The controller is inert unless `fullHeight` is enabled, so embeds can create
8583
+ * one unconditionally.
8584
+ */
8585
+ class FullHeightController {
8586
+ constructor(viewConfig, host) {
8587
+ this.host = host;
8588
+ this.scrollContainers = [];
8589
+ /**
8590
+ * Sets the frame height to the height reported by the ThoughtSpot app,
8591
+ * never going below the configured minimum.
8592
+ */
8593
+ this.handleEmbedHeight = (payload) => {
8594
+ const height = Number(payload === null || payload === void 0 ? void 0 : payload.data);
8595
+ if (!isNaN(height)) {
8596
+ this.host.setFrameHeight(Math.max(height, this.minimumHeight));
8597
+ }
8598
+ this.sendVisibleCoordinates();
8599
+ };
8600
+ /**
8601
+ * Answers the app's request for the center of the visible embed region.
8602
+ */
8603
+ this.handleEmbedIframeCenter = (payload, responder) => {
8604
+ const iframe = this.host.getIframe();
8605
+ if (!iframe) {
8606
+ return;
8607
+ }
8608
+ responder === null || responder === void 0 ? void 0 : responder({
8609
+ type: EmbedEvent.EmbedIframeCenter,
8610
+ data: calculateElementCenter(iframe),
8611
+ });
8612
+ };
8613
+ /**
8614
+ * Answers the app's request for the currently visible embed coordinates.
8615
+ */
8616
+ this.handleRequestVisibleCoordinates = (payload, responder) => {
8617
+ logger$3.info('Sending RequestVisibleEmbedCoordinates', payload);
8618
+ responder === null || responder === void 0 ? void 0 : responder({
8619
+ type: EmbedEvent.RequestVisibleEmbedCoordinates,
8620
+ data: this.getVisibleCoordinates(),
8621
+ });
8622
+ };
8623
+ /**
8624
+ * Resets the frame height when the app navigates away from a Liveboard,
8625
+ * since only Liveboard routes report a height of their own.
8626
+ */
8627
+ this.handleRouteChange = (payload) => {
8628
+ var _a, _b;
8629
+ const currentPath = (_a = payload === null || payload === void 0 ? void 0 : payload.data) === null || _a === void 0 ? void 0 : _a.currentPath;
8630
+ if (!currentPath) {
8631
+ return;
8632
+ }
8633
+ if (LIVEBOARD_RELATED_ROUTES.some((route) => currentPath.startsWith(route))) {
8634
+ return;
8635
+ }
8636
+ this.host.setFrameHeight(((_b = this.config.frameParams) === null || _b === void 0 ? void 0 : _b.height) || this.minimumHeight);
8637
+ };
8638
+ /**
8639
+ * Pushes the visible embed region to the app so it can decide which
8640
+ * visualizations to load.
8641
+ */
8642
+ this.sendVisibleCoordinates = () => {
8643
+ if (!this.isLazyLoadEnabled) {
8644
+ return;
8645
+ }
8646
+ const coordinates = this.getVisibleCoordinates();
8647
+ if (coordinates) {
8648
+ this.host.trigger(HostEvent.VisibleEmbedCoordinates, coordinates);
8649
+ }
8650
+ };
8651
+ this.config = FullHeightController.withLazyLoadingDefaults(viewConfig);
8652
+ this.registerEventHandlers();
8653
+ }
8654
+ /**
8655
+ * The view config the controller runs on: the host app's own config with
8656
+ * the lazy-loading defaults filled in. Read-only, so the only way to change
8657
+ * it is through the setter, which re-resolves the defaults.
8658
+ */
8659
+ get viewConfig() {
8660
+ return this.config;
8661
+ }
8662
+ /**
8663
+ * Replaces the view config the controller runs on and re-resolves the
8664
+ * lazy-loading defaults against it. The config the caller passes is never
8665
+ * written to; the controller keeps a copy of its own.
8666
+ */
8667
+ set viewConfig(viewConfig) {
8668
+ this.config = FullHeightController.withLazyLoadingDefaults(viewConfig);
8669
+ }
8670
+ /**
8671
+ * The view config with the lazy-loading settings the embed falls back to
8672
+ * when the host app has not chosen its own.
8673
+ *
8674
+ * Pure by design: it returns a new config rather than writing to the one it
8675
+ * is given, so the host app's object is left untouched.
8676
+ * @param viewConfig The embed's view config
8677
+ * @returns A copy with the defaults filled in, host app choices preserved
8678
+ */
8679
+ static withLazyLoadingDefaults(viewConfig) {
8680
+ return {
8681
+ ...viewConfig,
8682
+ lazyLoadingForFullHeight: viewConfig.lazyLoadingForFullHeight === undefined
8683
+ ? true
8684
+ : viewConfig.lazyLoadingForFullHeight,
8685
+ enableScrollableContainerLazyLoading: viewConfig.enableScrollableContainerLazyLoading === undefined
8686
+ ? true
8687
+ : viewConfig.enableScrollableContainerLazyLoading,
8688
+ lazyLoadingMargin: viewConfig.lazyLoadingMargin === undefined
8689
+ ? DEFAULT_LAZY_LOADING_MARGIN
8690
+ : viewConfig.lazyLoadingMargin,
8691
+ };
8692
+ }
8693
+ /**
8694
+ * Whether the host app asked for a full-height embed.
8695
+ */
8696
+ get isEnabled() {
8697
+ return this.config.fullHeight === true;
8698
+ }
8699
+ /**
8700
+ * Whether visualizations should load as they scroll into view, which
8701
+ * requires the SDK to report the visible region of the embed.
8702
+ */
8703
+ get isLazyLoadEnabled() {
8704
+ return this.isEnabled && !!this.config.lazyLoadingForFullHeight;
8705
+ }
8706
+ /**
8707
+ * The floor for the frame height. `defaultHeight` is the deprecated
8708
+ * spelling of `minimumHeight` and is still honored for compatibility.
8709
+ */
8710
+ get minimumHeight() {
8711
+ const { minimumHeight, defaultHeight } = this.config;
8712
+ return minimumHeight || defaultHeight || DEFAULT_MINIMUM_HEIGHT;
8713
+ }
8714
+ /**
8715
+ * Registers the embed event handlers the feature depends on. Called from
8716
+ * the constructor, so the handlers are in place before `render`.
8717
+ */
8718
+ registerEventHandlers() {
8719
+ if (!this.isEnabled) {
8720
+ return;
8721
+ }
8722
+ this.host.on(EmbedEvent.RouteChange, this.handleRouteChange);
8723
+ this.host.on(EmbedEvent.EmbedHeight, this.handleEmbedHeight);
8724
+ this.host.on(EmbedEvent.EmbedIframeCenter, this.handleEmbedIframeCenter);
8725
+ this.host.on(EmbedEvent.RequestVisibleEmbedCoordinates, this.handleRequestVisibleCoordinates);
8726
+ }
8727
+ /**
8728
+ * Adds the full-height query parameters to the embed URL params.
8729
+ * @param params The query parameters being built by the embed
8730
+ */
8731
+ addQueryParams(params) {
8732
+ if (!this.isEnabled) {
8733
+ return;
8734
+ }
8735
+ params[Param.fullHeight] = true;
8736
+ if (!this.config.lazyLoadingForFullHeight) {
8737
+ return;
8738
+ }
8739
+ params[Param.IsLazyLoadingForEmbedEnabled] = true;
8740
+ if (isValidCssMargin(this.config.lazyLoadingMargin)) {
8741
+ params[Param.RootMarginForLazyLoad] = this.config.lazyLoadingMargin;
8742
+ }
8743
+ }
8744
+ /**
8745
+ * Attaches the viewport listeners that keep lazy loading in sync. Call this
8746
+ * once the embed has rendered and the iframe exists.
8747
+ */
8748
+ onRender() {
8749
+ this.registerLazyLoadListeners();
8750
+ }
8751
+ /**
8752
+ * Detaches every listener and observer owned by the controller.
8753
+ */
8754
+ destroy() {
8755
+ this.unregisterLazyLoadListeners();
8756
+ }
8757
+ getVisibleCoordinates() {
8758
+ const iframe = this.host.getIframe();
8759
+ if (!iframe) {
8760
+ return null;
8761
+ }
8762
+ return calculateVisibleElementData(iframe, this.config.enableScrollableContainerLazyLoading);
8763
+ }
8764
+ registerLazyLoadListeners() {
8765
+ if (!this.isLazyLoadEnabled || !this.host.getIframe()) {
8766
+ return;
8767
+ }
8768
+ // Re-registering is safe: drop whatever a previous render attached.
8769
+ this.unregisterLazyLoadListeners();
8770
+ // TODO: Use passive: true, install modernizr to check for passive
8771
+ window.addEventListener('resize', this.sendVisibleCoordinates);
8772
+ window.addEventListener('scroll', this.sendVisibleCoordinates, true);
8773
+ if (!this.config.enableScrollableContainerLazyLoading) {
8774
+ return;
8775
+ }
8776
+ this.observeScrollableContainers();
8777
+ }
8778
+ /**
8779
+ * Tracks the ancestors that can scroll or clip the embed, so the visible
8780
+ * region stays correct when the embed lives inside its own scroll
8781
+ * container rather than the page.
8782
+ */
8783
+ observeScrollableContainers() {
8784
+ const iFrame = this.host.getIframe();
8785
+ this.scrollContainers = getScrollableAncestors(iFrame);
8786
+ this.scrollContainers.forEach((scrollContainer) => {
8787
+ scrollContainer.addEventListener('scroll', this.sendVisibleCoordinates);
8788
+ });
8789
+ if (typeof ResizeObserver === 'undefined') {
8790
+ return;
8791
+ }
8792
+ const resizeTargets = new Set([iFrame.parentElement, ...getEffectiveClippingAncestors(iFrame)].filter(Boolean));
8793
+ this.resizeObserver = new ResizeObserver(this.sendVisibleCoordinates);
8794
+ resizeTargets.forEach((resizeTarget) => {
8795
+ this.resizeObserver.observe(resizeTarget);
8796
+ });
8797
+ }
8798
+ unregisterLazyLoadListeners() {
8799
+ var _a;
8800
+ if (!this.isLazyLoadEnabled) {
8801
+ return;
8802
+ }
8803
+ window.removeEventListener('resize', this.sendVisibleCoordinates);
8804
+ window.removeEventListener('scroll', this.sendVisibleCoordinates, true);
8805
+ (_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
8806
+ this.resizeObserver = undefined;
8807
+ this.scrollContainers.forEach((scrollContainer) => {
8808
+ scrollContainer.removeEventListener('scroll', this.sendVisibleCoordinates);
8809
+ });
8810
+ this.scrollContainers = [];
8811
+ }
8812
+ }
8813
+
8120
8814
  /** Used for built-in method references. */
8121
8815
  var objectProto$d = Object.prototype;
8122
8816
 
@@ -9025,7 +9719,110 @@ var UIPassthroughEvent;
9025
9719
  UIPassthroughEvent["GetTabs"] = "getTabs";
9026
9720
  UIPassthroughEvent["GetGroups"] = "getGroups";
9027
9721
  UIPassthroughEvent["GetExportRequestForCurrentPinboard"] = "getExportRequestForCurrentPinboard";
9028
- })(UIPassthroughEvent || (UIPassthroughEvent = {}));
9722
+ })(UIPassthroughEvent || (UIPassthroughEvent = {}));
9723
+ // NOTE: HostEventRequest / HostEventResponse / TriggerPayload / TriggerResponse
9724
+ // live in the sibling ./host-event-contracts, which layers the
9725
+ // HostEventRequestMap on top of the UI-passthrough mapping above.
9726
+ // The former 2-tier definitions that lived here were superseded and removed.
9727
+
9728
+ /**
9729
+ * Copyright (c) 2026
9730
+ *
9731
+ * Dedicated transport layer for SDK <-> ThoughtSpot iframe messaging.
9732
+ *
9733
+ * Owns the postMessage/MessageChannel mechanics and origin resolution so
9734
+ * that embed/business logic (ts-embed.ts, hostEventClient) never touches
9735
+ * the wire directly. The wire format is unchanged from the historical
9736
+ * implementation — this layer is a pure structural extraction.
9737
+ */
9738
+ /**
9739
+ * Default time to wait for the app to respond to a request-response
9740
+ * message before giving up and reclaiming the channel.
9741
+ */
9742
+ const MESSAGE_RESPONSE_TIMEOUT = 30000;
9743
+ /**
9744
+ * Single implementation of origin resolution for the embedded app.
9745
+ * Returns the origin (scheme://host[:port]) for a ThoughtSpot host URL,
9746
+ * or null when it cannot be parsed.
9747
+ * @param thoughtSpotHost
9748
+ */
9749
+ const resolveMessageOrigin = (thoughtSpotHost) => {
9750
+ try {
9751
+ return new URL(thoughtSpotHost).origin;
9752
+ }
9753
+ catch (e) {
9754
+ return null;
9755
+ }
9756
+ };
9757
+ /**
9758
+ * Validates that an inbound window message came from the embedded
9759
+ * ThoughtSpot app: the source window must be the embed iframe's window and,
9760
+ * when the expected origin is resolvable, the message origin must match it.
9761
+ *
9762
+ * Fails open (returns true) on the origin check when the expected origin
9763
+ * cannot be resolved, to avoid breaking unconventional-but-working setups;
9764
+ * a warning is logged on mismatch either way.
9765
+ * @param event The message event received on window.
9766
+ * @param iFrame The embed iframe the message should originate from.
9767
+ * @param thoughtSpotHost The configured ThoughtSpot host.
9768
+ */
9769
+ const isMessageFromIframe = (event, iFrame, thoughtSpotHost) => {
9770
+ if (event.source !== (iFrame === null || iFrame === void 0 ? void 0 : iFrame.contentWindow)) {
9771
+ return false;
9772
+ }
9773
+ const expectedOrigin = resolveMessageOrigin(thoughtSpotHost);
9774
+ if (expectedOrigin && event.origin && event.origin !== expectedOrigin) {
9775
+ logger$3.warn(`Dropped message from unexpected origin ${event.origin}; expected ${expectedOrigin}`);
9776
+ return false;
9777
+ }
9778
+ return true;
9779
+ };
9780
+ /**
9781
+ * Posts a one-way message to the embedded app's iframe, optionally
9782
+ * transferring a MessageChannel port for the response.
9783
+ * @param iFrame
9784
+ * @param message
9785
+ * @param thoughtSpotHost Used as the postMessage targetOrigin.
9786
+ * @param channel
9787
+ */
9788
+ const postMessageToIframe = (iFrame, message, thoughtSpotHost, channel) => {
9789
+ var _a;
9790
+ return (_a = iFrame.contentWindow) === null || _a === void 0 ? void 0 : _a.postMessage(message, thoughtSpotHost, channel ? [channel.port2] : []);
9791
+ };
9792
+ /**
9793
+ * Sends a request-response message to the embedded app over a dedicated
9794
+ * MessageChannel. Resolves with the response payload; rejects when the app
9795
+ * responds with an error; resolves with a timeout Error object when no
9796
+ * response arrives in time (historical behavior, preserved for backward
9797
+ * compatibility).
9798
+ * @param iFrame
9799
+ * @param message
9800
+ * @param thoughtSpotHost
9801
+ * @param timeoutMs
9802
+ */
9803
+ function sendMessageWithResponse(iFrame, message, thoughtSpotHost, timeoutMs = MESSAGE_RESPONSE_TIMEOUT) {
9804
+ return new Promise((res, rej) => {
9805
+ const channel = new MessageChannel();
9806
+ // Close the messageChannel and resolve the promise if timeout.
9807
+ const timeoutId = setTimeout(() => {
9808
+ channel.port1.close();
9809
+ res(new Error(ERROR_MESSAGE.TRIGGER_TIMED_OUT));
9810
+ }, timeoutMs);
9811
+ channel.port1.onmessage = ({ data: responseData }) => {
9812
+ var _a;
9813
+ clearTimeout(timeoutId);
9814
+ channel.port1.close();
9815
+ const error = (responseData === null || responseData === void 0 ? void 0 : responseData.error) || ((_a = responseData === null || responseData === void 0 ? void 0 : responseData.data) === null || _a === void 0 ? void 0 : _a.error);
9816
+ if (error) {
9817
+ rej(error);
9818
+ }
9819
+ else {
9820
+ res(responseData);
9821
+ }
9822
+ };
9823
+ postMessageToIframe(iFrame, message, thoughtSpotHost, channel);
9824
+ });
9825
+ }
9029
9826
 
9030
9827
  const EndPoints = {
9031
9828
  AUTH_VERIFICATION: '/callosum/v1/session/info',
@@ -9959,7 +10756,7 @@ class AnswerService {
9959
10756
  async getTML() {
9960
10757
  const { object } = await this.executeQuery(getAnswerTML, {});
9961
10758
  const edoc = object[0].edoc;
9962
- const YAML = await import('./index-D8_Zs-Nr.js');
10759
+ const YAML = await import('./index-C1pmYb5H.js');
9963
10760
  const parsedDoc = YAML.parse(edoc);
9964
10761
  return {
9965
10762
  answer: {
@@ -20197,23 +20994,11 @@ const reload = (iFrame) => {
20197
20994
  iFrame.src = src;
20198
20995
  }, 100);
20199
20996
  };
20997
+ const TRIGGER_TIMEOUT = MESSAGE_RESPONSE_TIMEOUT;
20200
20998
  /**
20201
- * Post iframe message.
20202
- * @param iFrame
20203
- * @param message
20204
- * @param message.type
20205
- * @param message.data
20206
- * @param message.context
20207
- * @param thoughtSpotHost
20208
- * @param channel
20209
- */
20210
- function postIframeMessage(iFrame, message, thoughtSpotHost, channel) {
20211
- var _a;
20212
- return (_a = iFrame.contentWindow) === null || _a === void 0 ? void 0 : _a.postMessage(message, thoughtSpotHost, [channel === null || channel === void 0 ? void 0 : channel.port2]);
20213
- }
20214
- const TRIGGER_TIMEOUT = 30000;
20215
- /**
20216
- *
20999
+ * Processes a host event trigger: handles SDK-local events (Reload,
21000
+ * Present) and forwards everything else to the embedded app over the
21001
+ * iframe transport.
20217
21002
  * @param iFrame
20218
21003
  * @param messageType
20219
21004
  * @param thoughtSpotHost
@@ -20221,42 +21006,22 @@ const TRIGGER_TIMEOUT = 30000;
20221
21006
  * @param context
20222
21007
  */
20223
21008
  function processTrigger(iFrame, messageType, thoughtSpotHost, data, context) {
20224
- return new Promise((res, rej) => {
20225
- var _a;
20226
- if (messageType === HostEvent.Reload) {
20227
- reload(iFrame);
20228
- return res(null);
20229
- }
20230
- if (messageType === HostEvent.Present) {
20231
- const embedConfig = getEmbedConfig();
20232
- const disableFullscreenPresentation = (_a = embedConfig === null || embedConfig === void 0 ? void 0 : embedConfig.disableFullscreenPresentation) !== null && _a !== void 0 ? _a : true;
20233
- if (!disableFullscreenPresentation) {
20234
- handlePresentEvent(iFrame);
20235
- }
20236
- else {
20237
- logger$3.warn('Fullscreen presentation mode is disabled. Set disableFullscreenPresentation: false to enable this feature.');
20238
- }
21009
+ var _a;
21010
+ if (messageType === HostEvent.Reload) {
21011
+ reload(iFrame);
21012
+ return Promise.resolve(null);
21013
+ }
21014
+ if (messageType === HostEvent.Present) {
21015
+ const embedConfig = getEmbedConfig();
21016
+ const disableFullscreenPresentation = (_a = embedConfig === null || embedConfig === void 0 ? void 0 : embedConfig.disableFullscreenPresentation) !== null && _a !== void 0 ? _a : true;
21017
+ if (!disableFullscreenPresentation) {
21018
+ handlePresentEvent(iFrame);
20239
21019
  }
20240
- const channel = new MessageChannel();
20241
- // Close the messageChannel and resolve the promise if timeout.
20242
- const timeoutId = setTimeout(() => {
20243
- channel.port1.close();
20244
- res(new Error(ERROR_MESSAGE.TRIGGER_TIMED_OUT));
20245
- }, TRIGGER_TIMEOUT);
20246
- channel.port1.onmessage = ({ data: responseData }) => {
20247
- var _a;
20248
- clearTimeout(timeoutId);
20249
- channel.port1.close();
20250
- const error = (responseData === null || responseData === void 0 ? void 0 : responseData.error) || ((_a = responseData === null || responseData === void 0 ? void 0 : responseData.data) === null || _a === void 0 ? void 0 : _a.error);
20251
- if (error) {
20252
- rej(error);
20253
- }
20254
- else {
20255
- res(responseData);
20256
- }
20257
- };
20258
- return postIframeMessage(iFrame, { type: messageType, data, context }, thoughtSpotHost, channel);
20259
- });
21020
+ else {
21021
+ logger$3.warn('Fullscreen presentation mode is disabled. Set disableFullscreenPresentation: false to enable this feature.');
21022
+ }
21023
+ }
21024
+ return sendMessageWithResponse(iFrame, { type: messageType, data, context }, thoughtSpotHost, TRIGGER_TIMEOUT);
20260
21025
  }
20261
21026
 
20262
21027
  /**
@@ -21118,6 +21883,11 @@ class HostEventClient {
21118
21883
  if (!isValidUpdateFiltersPayload(payload)) {
21119
21884
  throwUpdateFiltersValidationError();
21120
21885
  }
21886
+ // The shared contract accepts both current (columnName/operator) and
21887
+ // legacy (column/oper) filter field names — as does the validation
21888
+ // above and the app at runtime. The UIPassthrough FilterUpdate type
21889
+ // still requires the legacy names; bridge until that contract is
21890
+ // audited.
21121
21891
  return this.handleHostEventWithParam(UIPassthroughEvent.UpdateFilters, payload, context);
21122
21892
  }
21123
21893
  handleUpdateParametersEvent(payload, context) {
@@ -21268,6 +22038,7 @@ const handleInterceptEvent = async (params) => {
21268
22038
  errorType: ErrorDetailsTypes.API,
21269
22039
  message: ERROR_MESSAGE.ERROR_PARSING_API_INTERCEPT_BODY,
21270
22040
  code: EmbedErrorCodes.PARSING_API_INTERCEPT_BODY_ERROR,
22041
+ severity: EmbedErrorSeverity.SEV3,
21271
22042
  error: ERROR_MESSAGE.ERROR_PARSING_API_INTERCEPT_BODY,
21272
22043
  };
21273
22044
  executeEvent(EmbedEvent.Error, errorDetails);
@@ -21351,6 +22122,12 @@ const TS_EMBED_ID = '_thoughtspot-embed';
21351
22122
  */
21352
22123
  const PRERENDER_CONTAINER_ORIGINAL_POSITION_KEY = 'tsEmbedOriginalPosition';
21353
22124
  const PRERENDER_WRAPPER_ID_PREFIX = 'tsEmbed-pre-render-wrapper-';
22125
+ // The container applies UpdateEmbedParams through React state, so a delivered
22126
+ // post is not the same as the params being in effect.
22127
+ const UPDATE_EMBED_PARAMS_SETTLE_MS = 200;
22128
+ // The container ignores runtimeFilterParams/runtimeParameterParams unless truthy, so
22129
+ // null or '' leaves the previous embed's values in place. '&' is truthy and parses to {}.
22130
+ const NO_RUNTIME_PARAMS = '&';
21354
22131
  /**
21355
22132
  * The event id map from v2 event names to v1 event id
21356
22133
  * v1 events are the classic embed events implemented in Blink v1
@@ -21377,6 +22154,7 @@ class TsEmbed {
21377
22154
  * The key to store the embed instance in the DOM node
21378
22155
  */
21379
22156
  this.embedNodeKey = '__tsEmbed';
22157
+ this.embedContainerLoadedKey = '__tsEmbedContainerLoaded';
21380
22158
  this.isAppInitialized = false;
21381
22159
  /**
21382
22160
  * Should we encode URL Query Params using base64 encoding which ThoughtSpot
@@ -21397,7 +22175,7 @@ class TsEmbed {
21397
22175
  const eventType = this.getEventType(event);
21398
22176
  const eventPort = this.getEventPort(event);
21399
22177
  const eventData = this.formatEventData(event, eventType);
21400
- if (event.source === this.iFrame.contentWindow) {
22178
+ if (isMessageFromIframe(event, this.iFrame, this.thoughtSpotHost)) {
21401
22179
  const processedEventData = processEventData(eventType, eventData, this.thoughtSpotHost, this.isPreRendered ? this.preRenderWrapper : this.hostElement);
21402
22180
  if (eventType === EmbedEvent.ApiIntercept) {
21403
22181
  this.handleApiInterceptEvent({ eventData, eventPort });
@@ -21539,7 +22317,7 @@ class TsEmbed {
21539
22317
  this.createEmbedContainerHandler = (source) => () => {
21540
22318
  const processEmbedContainerReady = () => {
21541
22319
  logger$3.debug('processEmbedContainerReady');
21542
- this.isEmbedContainerLoaded = true;
22320
+ this.markEmbedContainerLoaded();
21543
22321
  this.executeEmbedContainerReadyCallbacks();
21544
22322
  };
21545
22323
  if (source === EmbedEvent.AuthInit) {
@@ -21553,6 +22331,9 @@ class TsEmbed {
21553
22331
  processEmbedContainerReady();
21554
22332
  }
21555
22333
  };
22334
+ // Subclasses that navigate the pre-render on show must await this before
22335
+ // triggering Navigate. Resolves even on failure, so navigation is never blocked.
22336
+ this.preRenderParamsApplied = Promise.resolve();
21556
22337
  this.hostElement = getDOMNode(domSelector);
21557
22338
  this.eventHandlerMap = new Map();
21558
22339
  this.isError = false;
@@ -21612,6 +22393,7 @@ class TsEmbed {
21612
22393
  errorType: ErrorDetailsTypes.VALIDATION_ERROR,
21613
22394
  message: ERROR_MESSAGE.INIT_SDK_REQUIRED,
21614
22395
  code: EmbedErrorCodes.INIT_ERROR,
22396
+ severity: EmbedErrorSeverity.SEV1,
21615
22397
  error: ERROR_MESSAGE.INIT_SDK_REQUIRED,
21616
22398
  });
21617
22399
  }
@@ -21622,7 +22404,10 @@ class TsEmbed {
21622
22404
  */
21623
22405
  handleError(errorDetails) {
21624
22406
  this.isError = true;
21625
- this.executeCallbacks(EmbedEvent.Error, errorDetails);
22407
+ this.executeCallbacks(EmbedEvent.Error, {
22408
+ severity: EmbedErrorSeverity.SEV3,
22409
+ ...errorDetails,
22410
+ });
21626
22411
  // Log error
21627
22412
  logger$3.error(errorDetails);
21628
22413
  }
@@ -21707,6 +22492,7 @@ class TsEmbed {
21707
22492
  errorType: ErrorDetailsTypes.NETWORK,
21708
22493
  message: ERROR_MESSAGE.OFFLINE_WARNING,
21709
22494
  code: EmbedErrorCodes.NETWORK_ERROR,
22495
+ severity: EmbedErrorSeverity.SEV2,
21710
22496
  offlineWarning: ERROR_MESSAGE.OFFLINE_WARNING,
21711
22497
  };
21712
22498
  this.executeCallbacks(EmbedEvent.Error, errorDetails);
@@ -21864,6 +22650,7 @@ class TsEmbed {
21864
22650
  return `${basePath}#`;
21865
22651
  }
21866
22652
  async getUpdateEmbedParamsObject() {
22653
+ var _a, _b;
21867
22654
  const queryParams = this.getEmbedParamsObject();
21868
22655
  // Values are URL-serialized (e.g. dataSources as '["guid"]'); parse
21869
22656
  // them back so the event payload matches a URL load (SCAL-334713).
@@ -21871,7 +22658,16 @@ class TsEmbed {
21871
22658
  queryParams[key] = deserializeParam(queryParams[key]);
21872
22659
  });
21873
22660
  const appInitData = await this.getAppInitData();
21874
- return { ...this.viewConfig, ...queryParams, ...appInitData };
22661
+ return {
22662
+ ...this.viewConfig,
22663
+ ...queryParams,
22664
+ ...appInitData,
22665
+ // A show cycle has no URL to carry these, so the payload always states them
22666
+ // — including "none", which is the case that leaks the previous filters.
22667
+ runtimeFilterParams: getFilterQuery((_a = this.viewConfig.runtimeFilters) !== null && _a !== void 0 ? _a : []) || NO_RUNTIME_PARAMS,
22668
+ runtimeParameterParams: getRuntimeParameters((_b = this.viewConfig.runtimeParameters) !== null && _b !== void 0 ? _b : [])
22669
+ || NO_RUNTIME_PARAMS,
22670
+ };
21875
22671
  }
21876
22672
  /**
21877
22673
  * Common query params set for all the embed modes.
@@ -22079,9 +22875,10 @@ class TsEmbed {
22079
22875
  return iFrame;
22080
22876
  }
22081
22877
  /**
22082
- * Returns a merged {@link PreRenderConfig} object where each shared key
22083
- * prefers `preRenderConfig.key` over the top-level `viewConfig.key` for
22084
- * backward compatibility.
22878
+ * Returns a merged {@link PreRenderConfig} object where each key prefers the
22879
+ * value from `preRenderConfig` over its deprecated top-level `viewConfig`
22880
+ * counterpart (`id`/`preRenderId`, `containerSelector`/`preRenderContainer`,
22881
+ * `doNotTrackSize`/`doNotTrackPreRenderSize`) for backward compatibility.
22085
22882
  */
22086
22883
  getPreRenderConfig() {
22087
22884
  var _a, _b, _c, _d;
@@ -22089,16 +22886,16 @@ class TsEmbed {
22089
22886
  const preRenderCfg = (_a = viewCfg.preRenderConfig) !== null && _a !== void 0 ? _a : {};
22090
22887
  return {
22091
22888
  ...preRenderCfg,
22092
- preRenderId: (_b = preRenderCfg.preRenderId) !== null && _b !== void 0 ? _b : viewCfg.preRenderId,
22093
- preRenderContainer: (_c = preRenderCfg.preRenderContainer) !== null && _c !== void 0 ? _c : viewCfg.preRenderContainer,
22094
- doNotTrackPreRenderSize: (_d = preRenderCfg.doNotTrackPreRenderSize) !== null && _d !== void 0 ? _d : viewCfg.doNotTrackPreRenderSize,
22889
+ id: (_b = preRenderCfg.id) !== null && _b !== void 0 ? _b : viewCfg.preRenderId,
22890
+ containerSelector: (_c = preRenderCfg.containerSelector) !== null && _c !== void 0 ? _c : viewCfg.preRenderContainer,
22891
+ doNotTrackSize: (_d = preRenderCfg.doNotTrackSize) !== null && _d !== void 0 ? _d : viewCfg.doNotTrackPreRenderSize,
22095
22892
  };
22096
22893
  }
22097
22894
  /**
22098
22895
  * Returns true if this embed instance is configured for pre-rendering.
22099
22896
  */
22100
22897
  isPreRenderEmbed() {
22101
- return !!this.getPreRenderConfig().preRenderId;
22898
+ return !!this.getPreRenderConfig().id;
22102
22899
  }
22103
22900
  handleInsertionIntoDOM(child) {
22104
22901
  if (this.isPreRenderEmbed()) {
@@ -22194,6 +22991,7 @@ class TsEmbed {
22194
22991
  errorType: ErrorDetailsTypes.API,
22195
22992
  message: error.message || ERROR_MESSAGE.LOGIN_FAILED,
22196
22993
  code: EmbedErrorCodes.LOGIN_FAILED,
22994
+ severity: EmbedErrorSeverity.SEV1,
22197
22995
  error: error,
22198
22996
  });
22199
22997
  });
@@ -22285,7 +23083,7 @@ class TsEmbed {
22285
23083
  */
22286
23084
  resolvePreRenderContainerTarget() {
22287
23085
  var _a;
22288
- const containerConfig = this.getPreRenderConfig().preRenderContainer;
23086
+ const containerConfig = this.getPreRenderConfig().containerSelector;
22289
23087
  let container = null;
22290
23088
  if (typeof containerConfig === 'string') {
22291
23089
  try {
@@ -22310,7 +23108,7 @@ class TsEmbed {
22310
23108
  return;
22311
23109
  }
22312
23110
  const ownerContainer = (_a = preRenderedObject.preRenderContainerEl) !== null && _a !== void 0 ? _a : document.body;
22313
- if (this.getPreRenderConfig().preRenderContainer
23111
+ if (this.getPreRenderConfig().containerSelector
22314
23112
  && this.resolvePreRenderContainerTarget() !== ownerContainer) {
22315
23113
  logger$3.warn('preRenderContainer is applied only by the component that creates the preRender; '
22316
23114
  + 'the one passed here is ignored. Set it on the PreRender component instead.');
@@ -22500,40 +23298,6 @@ class TsEmbed {
22500
23298
  getCompatibleEventType(eventType) {
22501
23299
  return V1EventMap[eventType] || eventType;
22502
23300
  }
22503
- /**
22504
- * Calculates the iframe center for the current visible viewPort
22505
- * of iframe using Scroll position of Host App, offsetTop for iframe
22506
- * in Host app. ViewPort height of the tab.
22507
- * @returns iframe Center in visible viewport,
22508
- * Iframe height,
22509
- * View port height.
22510
- */
22511
- getIframeCenter() {
22512
- const offsetTopClient = getOffsetTop(this.iFrame);
22513
- const scrollTopClient = window.scrollY;
22514
- const viewPortHeight = window.innerHeight;
22515
- const iframeHeight = this.iFrame.offsetHeight;
22516
- const iframeScrolled = scrollTopClient - offsetTopClient;
22517
- let iframeVisibleViewPort;
22518
- let iframeOffset;
22519
- if (iframeScrolled < 0) {
22520
- iframeVisibleViewPort = viewPortHeight - (offsetTopClient - scrollTopClient);
22521
- iframeVisibleViewPort = Math.min(iframeHeight, iframeVisibleViewPort);
22522
- iframeOffset = 0;
22523
- }
22524
- else {
22525
- iframeVisibleViewPort = Math.min(iframeHeight - iframeScrolled, viewPortHeight);
22526
- iframeOffset = iframeScrolled;
22527
- }
22528
- const iframeCenter = iframeOffset + iframeVisibleViewPort / 2;
22529
- return {
22530
- iframeCenter,
22531
- iframeScrolled,
22532
- iframeHeight,
22533
- viewPortHeight,
22534
- iframeVisibleViewPort,
22535
- };
22536
- }
22537
23301
  /**
22538
23302
  * Registers an event listener to trigger an alert when the ThoughtSpot app
22539
23303
  * sends an event of a particular message type to the host application.
@@ -22617,13 +23381,32 @@ class TsEmbed {
22617
23381
  var _a;
22618
23382
  const embedObj = (_a = this.preRenderWrapper) === null || _a === void 0 ? void 0 : _a[this.embedNodeKey];
22619
23383
  if (embedObj === this) {
22620
- logger$3.info('embedObj is same as this');
23384
+ logger$3.debug('embedObj is same as this');
22621
23385
  }
22622
23386
  return embedObj;
22623
23387
  }
23388
+ takeOverPreRender() {
23389
+ if (!this.preRenderWrapper)
23390
+ return;
23391
+ this.preRenderWrapper[this.embedNodeKey] = this;
23392
+ }
23393
+ // The flag lives on the wrapper because it describes the iframe: an instance
23394
+ // hidden when the container announced itself would otherwise report false forever.
23395
+ markEmbedContainerLoaded() {
23396
+ this.isEmbedContainerLoaded = true;
23397
+ if (this.preRenderWrapper) {
23398
+ this.preRenderWrapper[this.embedContainerLoadedKey] = true;
23399
+ }
23400
+ }
22624
23401
  checkEmbedContainerLoaded() {
23402
+ var _a;
22625
23403
  if (this.isEmbedContainerLoaded)
22626
23404
  return true;
23405
+ if ((_a = this.preRenderWrapper) === null || _a === void 0 ? void 0 : _a[this.embedContainerLoadedKey]) {
23406
+ this.isEmbedContainerLoaded = true;
23407
+ return true;
23408
+ }
23409
+ // Older builds stamped the flag on the instance, not the wrapper.
22627
23410
  const preRenderObj = this.getPreRenderObj();
22628
23411
  if (preRenderObj && preRenderObj.isEmbedContainerLoaded) {
22629
23412
  this.isEmbedContainerLoaded = true;
@@ -22652,8 +23435,12 @@ class TsEmbed {
22652
23435
  }
22653
23436
  /**
22654
23437
  * Triggers an event to the embedded app
23438
+ *
23439
+ * Payload typing: from SDK 1.52.0 (ThoughtSpot Cloud 26.9.0.cl), unknown fields
23440
+ * on a known event's payload fail to compile. From SDK 1.54.0 (26.11.0.cl) the
23441
+ * payload is checked strictly against the event contract — update call sites now.
22655
23442
  * @param {HostEvent} messageType The event type
22656
- * @param {any} data The payload to send with the message
23443
+ * @param {TriggerData} data The payload, typed against the event's contract
22657
23444
  * @param {ContextType} context Optional context type to specify the context from which the event is triggered.
22658
23445
  * Use ContextType.Search for search answer context, ContextType.Answer for answer/explore context,
22659
23446
  * ContextType.Liveboard for liveboard context, or ContextType.Spotter for spotter context.
@@ -22670,7 +23457,11 @@ class TsEmbed {
22670
23457
  * ```
22671
23458
  * @version SDK: 1.45.2 | ThoughtSpot: 26.3.0.cl (for context parameter)
22672
23459
  */
22673
- async trigger(messageType, data = {}, context) {
23460
+ async trigger(messageType,
23461
+ // Contract shape is the contextual type: payload fields autocomplete
23462
+ // and unknown fields on object literals are flagged. Strict checks
23463
+ // land in SDK 1.54.0 — see TriggerData.
23464
+ data = {}, context) {
22674
23465
  uploadMixpanelEvent(`${MIXPANEL_EVENT.VISUAL_SDK_TRIGGER}-${messageType}`);
22675
23466
  if (!this.isRendered) {
22676
23467
  this.handleError({
@@ -22807,7 +23598,7 @@ class TsEmbed {
22807
23598
  showPreRenderByDefault,
22808
23599
  replaceExistingPreRender,
22809
23600
  });
22810
- if (!this.getPreRenderConfig().preRenderId) {
23601
+ if (!this.getPreRenderConfig().id) {
22811
23602
  logger$3.error(ERROR_MESSAGE.PRERENDER_ID_MISSING);
22812
23603
  return this;
22813
23604
  }
@@ -22958,20 +23749,27 @@ class TsEmbed {
22958
23749
  // have moved on to UpdateEmbedParams supported clusters
22959
23750
  // this.validatePreRenderViewConfig(this.viewConfig); removed in #517
22960
23751
  logger$3.debug('triggering UpdateEmbedParams', this.viewConfig);
22961
- this.executeAfterEmbedContainerLoaded(async () => {
22962
- try {
22963
- const params = await this.getUpdateEmbedParamsObject();
22964
- this.trigger(HostEvent.UpdateEmbedParams, params);
22965
- }
22966
- catch (error) {
22967
- logger$3.error(ERROR_MESSAGE.UPDATE_PARAMS_FAILED, error);
22968
- this.handleError({
22969
- errorType: ErrorDetailsTypes.API,
22970
- message: (error === null || error === void 0 ? void 0 : error.message) || ERROR_MESSAGE.UPDATE_PARAMS_FAILED,
22971
- code: EmbedErrorCodes.UPDATE_PARAMS_FAILED,
22972
- error: (error === null || error === void 0 ? void 0 : error.message) || error,
22973
- });
22974
- }
23752
+ // Created synchronously: a queued navigation needs something to await
23753
+ // whether the container is already loaded or not.
23754
+ this.preRenderParamsApplied = new Promise((resolve) => {
23755
+ this.executeAfterEmbedContainerLoaded(async () => {
23756
+ try {
23757
+ const params = await this.getUpdateEmbedParamsObject();
23758
+ this.trigger(HostEvent.UpdateEmbedParams, params);
23759
+ }
23760
+ catch (error) {
23761
+ logger$3.error(ERROR_MESSAGE.UPDATE_PARAMS_FAILED, error);
23762
+ this.handleError({
23763
+ errorType: ErrorDetailsTypes.API,
23764
+ message: (error === null || error === void 0 ? void 0 : error.message) || ERROR_MESSAGE.UPDATE_PARAMS_FAILED,
23765
+ code: EmbedErrorCodes.UPDATE_PARAMS_FAILED,
23766
+ error: (error === null || error === void 0 ? void 0 : error.message) || error,
23767
+ });
23768
+ }
23769
+ finally {
23770
+ setTimeout(resolve, UPDATE_EMBED_PARAMS_SETTLE_MS);
23771
+ }
23772
+ });
22975
23773
  });
22976
23774
  }
22977
23775
  /**
@@ -22983,12 +23781,12 @@ class TsEmbed {
22983
23781
  async showPreRender() {
22984
23782
  var _a, _b;
22985
23783
  uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_SHOW_PRE_RENDER, {
22986
- preRenderId: this.getPreRenderConfig().preRenderId,
23784
+ preRenderId: this.getPreRenderConfig().id,
22987
23785
  embedComponentType: this.viewConfig.embedComponentType,
22988
23786
  });
22989
23787
  if (this.shouldWaitForRenderPromise)
22990
23788
  await this.isReadyForRenderPromise;
22991
- if (!this.getPreRenderConfig().preRenderId) {
23789
+ if (!this.getPreRenderConfig().id) {
22992
23790
  logger$3.error(ERROR_MESSAGE.PRERENDER_ID_MISSING);
22993
23791
  return this;
22994
23792
  }
@@ -23024,7 +23822,7 @@ class TsEmbed {
23024
23822
  this.containerScrollListener = () => this.syncPreRenderStyle();
23025
23823
  customContainer.addEventListener('scroll', this.containerScrollListener);
23026
23824
  }
23027
- if (!this.getPreRenderConfig().doNotTrackPreRenderSize) {
23825
+ if (!this.getPreRenderConfig().doNotTrackSize) {
23028
23826
  const observeTarget = (_b = this.insertedDomEl) !== null && _b !== void 0 ? _b : this.hostElement;
23029
23827
  this.resizeObserver = new ResizeObserver((entries) => {
23030
23828
  entries.forEach((entry) => {
@@ -23047,6 +23845,8 @@ class TsEmbed {
23047
23845
  if (this.iFrame) {
23048
23846
  this.setupFullscreenChangeHandler();
23049
23847
  }
23848
+ // Last, so everything above still sees the instance being taken over from.
23849
+ this.takeOverPreRender();
23050
23850
  return this;
23051
23851
  }
23052
23852
  getPreRenderPlaceHolderElement() {
@@ -23092,7 +23892,7 @@ class TsEmbed {
23092
23892
  */
23093
23893
  hidePreRender() {
23094
23894
  uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_HIDE_PRE_RENDER, {
23095
- preRenderId: this.getPreRenderConfig().preRenderId,
23895
+ preRenderId: this.getPreRenderConfig().id,
23096
23896
  embedComponentType: this.viewConfig.embedComponentType,
23097
23897
  });
23098
23898
  logger$3.debug('HidePreRender Called');
@@ -23130,7 +23930,7 @@ class TsEmbed {
23130
23930
  * @property {string} child - The HTML element ID for the PreRender child.
23131
23931
  */
23132
23932
  getPreRenderIds() {
23133
- const preRenderId = this.getPreRenderConfig().preRenderId;
23933
+ const preRenderId = this.getPreRenderConfig().id;
23134
23934
  return {
23135
23935
  wrapper: `${PRERENDER_WRAPPER_ID_PREFIX}${preRenderId}`,
23136
23936
  child: `tsEmbed-pre-render-child-${preRenderId}`,
@@ -23249,6 +24049,9 @@ class V1Embed extends TsEmbed {
23249
24049
  * ```
23250
24050
  */
23251
24051
  on(messageType, callback, options = { start: false }) {
24052
+ // Mirror the base TsEmbed.on generic signature so the enriched
24053
+ // EmbedEventPayload (e.g. CustomAction's answerService) flows through
24054
+ // the override too, and the class hierarchy stays assignable.
23252
24055
  const eventType = this.getCompatibleEventType(messageType);
23253
24056
  return super.on(eventType, callback, options);
23254
24057
  }
@@ -23489,73 +24292,17 @@ class AppEmbed extends V1Embed {
23489
24292
  constructor(domSelector, viewConfig) {
23490
24293
  viewConfig.embedComponentType = 'AppEmbed';
23491
24294
  super(domSelector, viewConfig);
23492
- this.defaultHeight = 500;
23493
- this.lazyLoadScrollContainers = [];
23494
- this.sendFullHeightLazyLoadData = () => {
23495
- const data = calculateVisibleElementData(this.iFrame, this.viewConfig.enableScrollableContainerLazyLoading);
23496
- // this should be fired only if the lazyLoadingForFullHeight and fullHeight are true
23497
- if (this.viewConfig.lazyLoadingForFullHeight && this.viewConfig.fullHeight) {
23498
- this.trigger(HostEvent.VisibleEmbedCoordinates, data);
23499
- }
23500
- };
23501
- /**
23502
- * This is a handler for the RequestVisibleEmbedCoordinates event.
23503
- * It is used to send the visible coordinates data to the host application.
23504
- * @param data The event payload
23505
- * @param responder The responder function
23506
- */
23507
- this.requestVisibleEmbedCoordinatesHandler = (data, responder) => {
23508
- logger$3.info('Sending RequestVisibleEmbedCoordinates', data);
23509
- const visibleCoordinatesData = calculateVisibleElementData(this.iFrame, this.viewConfig.enableScrollableContainerLazyLoading);
23510
- responder({ type: EmbedEvent.RequestVisibleEmbedCoordinates, data: visibleCoordinatesData });
23511
- };
23512
- /**
23513
- * Set the iframe height as per the computed height received
23514
- * from the ThoughtSpot app.
23515
- * @param data The event payload
23516
- */
23517
- this.updateIFrameHeight = (data) => {
23518
- this.setIFrameHeight(Math.max(data.data, this.defaultHeight));
23519
- this.sendFullHeightLazyLoadData();
23520
- };
23521
- this.embedIframeCenter = (data, responder) => {
23522
- const obj = this.getIframeCenter();
23523
- responder({ type: EmbedEvent.EmbedIframeCenter, data: obj });
23524
- };
23525
- this.setIframeHeightForNonEmbedLiveboard = (data) => {
23526
- const { height: frameHeight } = this.viewConfig.frameParams || {};
23527
- const liveboardRelatedRoutes = [
23528
- '/pinboard/',
23529
- '/insights/pinboard/',
23530
- '/schedules/',
23531
- '/embed/viz/',
23532
- '/embed/insights/viz/',
23533
- '/liveboard/',
23534
- '/insights/liveboard/',
23535
- '/tsl-editor/PINBOARD_ANSWER_BOOK/',
23536
- '/import-tsl/PINBOARD_ANSWER_BOOK/',
23537
- ];
23538
- if (liveboardRelatedRoutes.some((path) => data.data.currentPath.startsWith(path))) {
23539
- // Ignore the height reset of the frame, if the navigation is
23540
- // only within the liveboard page.
23541
- return;
23542
- }
23543
- this.setIFrameHeight(frameHeight || this.defaultHeight);
23544
- };
23545
24295
  if (this.viewConfig.fullHeight === true) {
23546
- if (this.viewConfig.lazyLoadingForFullHeight === undefined) {
23547
- this.viewConfig.lazyLoadingForFullHeight = true;
23548
- }
23549
- if (this.viewConfig.enableScrollableContainerLazyLoading === undefined) {
23550
- this.viewConfig.enableScrollableContainerLazyLoading = true;
23551
- }
23552
- if (this.viewConfig.lazyLoadingMargin === undefined) {
23553
- this.viewConfig.lazyLoadingMargin = DEFAULT_LAZY_LOADING_MARGIN;
23554
- }
23555
- this.on(EmbedEvent.RouteChange, this.setIframeHeightForNonEmbedLiveboard);
23556
- this.on(EmbedEvent.EmbedHeight, this.updateIFrameHeight);
23557
- this.on(EmbedEvent.EmbedIframeCenter, this.embedIframeCenter);
23558
- this.on(EmbedEvent.RequestVisibleEmbedCoordinates, this.requestVisibleEmbedCoordinatesHandler);
24296
+ this.fullHeightController = new FullHeightController(this.viewConfig, {
24297
+ getIframe: () => this.iFrame,
24298
+ setFrameHeight: (height) => this.setIFrameHeight(height),
24299
+ on: (eventType, callback) => {
24300
+ this.on(eventType, callback);
24301
+ },
24302
+ trigger: (hostEvent, data) => {
24303
+ this.trigger(hostEvent, data);
24304
+ },
24305
+ });
23559
24306
  }
23560
24307
  }
23561
24308
  /**
@@ -23586,7 +24333,8 @@ class AppEmbed extends V1Embed {
23586
24333
  return getQueryParamString(params, true);
23587
24334
  }
23588
24335
  getEmbedParamsObject() {
23589
- 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 = DataPanelCustomColumnGroupsAccordionState$1.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;
24336
+ var _a;
24337
+ const { tag, hideTagFilterChips, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideHamburger, hideObjectSearch, hideNotification, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, newConnectionsExperience, 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 = DataPanelCustomColumnGroupsAccordionState$1.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, isThisPeriodInDateFiltersEnabled, enableHomepageAnnouncement = false, isContinuousLiveboardPDFEnabled, enableLiveboardDataCache, hideAnswerEditPanel, } = this.viewConfig;
23590
24338
  let params = {};
23591
24339
  params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
23592
24340
  params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
@@ -23622,6 +24370,9 @@ class AppEmbed extends V1Embed {
23622
24370
  if (!isUndefined$1(coverAndFilterOptionInPDF)) {
23623
24371
  params[Param.CoverAndFilterOptionInPDF] = !!coverAndFilterOptionInPDF;
23624
24372
  }
24373
+ if (!isUndefined$1(hideAnswerEditPanel)) {
24374
+ params[Param.ShowAnswerEditPanel] = !hideAnswerEditPanel;
24375
+ }
23625
24376
  params = this.getBaseQueryParams(params);
23626
24377
  if (!isUndefined$1(updatedSpotterChatPrompt)) {
23627
24378
  params[Param.UpdatedSpotterChatPrompt] = !!updatedSpotterChatPrompt;
@@ -23668,15 +24419,7 @@ class AppEmbed extends V1Embed {
23668
24419
  if (hideNotification) {
23669
24420
  params[Param.HideNotification] = !!hideNotification;
23670
24421
  }
23671
- if (fullHeight === true) {
23672
- params[Param.fullHeight] = true;
23673
- if (this.viewConfig.lazyLoadingForFullHeight) {
23674
- params[Param.IsLazyLoadingForEmbedEnabled] = true;
23675
- if (isValidCssMargin(this.viewConfig.lazyLoadingMargin)) {
23676
- params[Param.RootMarginForLazyLoad] = this.viewConfig.lazyLoadingMargin;
23677
- }
23678
- }
23679
- }
24422
+ (_a = this.fullHeightController) === null || _a === void 0 ? void 0 : _a.addQueryParams(params);
23680
24423
  if (tag) {
23681
24424
  params[Param.Tag] = tag;
23682
24425
  }
@@ -23743,7 +24486,6 @@ class AppEmbed extends V1Embed {
23743
24486
  if (isContinuousLiveboardPDFEnabled !== undefined) {
23744
24487
  params[Param.IsWYSIWYGLiveboardPDFEnabled] = isContinuousLiveboardPDFEnabled;
23745
24488
  }
23746
- this.defaultHeight = minimumHeight || this.defaultHeight;
23747
24489
  if (enableLiveboardDataCache !== undefined) {
23748
24490
  params[Param.EnableLiveboardDataCache] = enableLiveboardDataCache;
23749
24491
  }
@@ -23882,52 +24624,13 @@ class AppEmbed extends V1Embed {
23882
24624
  * @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
23883
24625
  */
23884
24626
  destroy() {
24627
+ var _a;
23885
24628
  super.destroy();
23886
- this.unregisterLazyLoadEvents();
24629
+ (_a = this.fullHeightController) === null || _a === void 0 ? void 0 : _a.destroy();
23887
24630
  }
23888
24631
  postRender() {
23889
- this.registerLazyLoadEvents();
23890
- }
23891
- registerLazyLoadEvents() {
23892
- if (!this.iFrame) {
23893
- return;
23894
- }
23895
- if (this.viewConfig.fullHeight && this.viewConfig.lazyLoadingForFullHeight) {
23896
- this.unregisterLazyLoadEvents();
23897
- // TODO: Use passive: true, install modernizr to check for passive
23898
- window.addEventListener('resize', this.sendFullHeightLazyLoadData);
23899
- window.addEventListener('scroll', this.sendFullHeightLazyLoadData, true);
23900
- if (!this.viewConfig.enableScrollableContainerLazyLoading) {
23901
- return;
23902
- }
23903
- this.lazyLoadScrollContainers = getScrollableAncestors(this.iFrame);
23904
- this.lazyLoadScrollContainers.forEach((scrollContainer) => {
23905
- scrollContainer.addEventListener('scroll', this.sendFullHeightLazyLoadData);
23906
- });
23907
- if (typeof ResizeObserver !== 'undefined') {
23908
- const resizeTargets = new Set([
23909
- this.iFrame.parentElement,
23910
- ...getEffectiveClippingAncestors(this.iFrame),
23911
- ].filter(Boolean));
23912
- this.lazyLoadResizeObserver = new ResizeObserver(this.sendFullHeightLazyLoadData);
23913
- resizeTargets.forEach((resizeTarget) => {
23914
- this.lazyLoadResizeObserver.observe(resizeTarget);
23915
- });
23916
- }
23917
- }
23918
- }
23919
- unregisterLazyLoadEvents() {
23920
24632
  var _a;
23921
- if (this.viewConfig.fullHeight && this.viewConfig.lazyLoadingForFullHeight) {
23922
- window.removeEventListener('resize', this.sendFullHeightLazyLoadData);
23923
- window.removeEventListener('scroll', this.sendFullHeightLazyLoadData, true);
23924
- (_a = this.lazyLoadResizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
23925
- this.lazyLoadResizeObserver = undefined;
23926
- this.lazyLoadScrollContainers.forEach((scrollContainer) => {
23927
- scrollContainer.removeEventListener('scroll', this.sendFullHeightLazyLoadData);
23928
- });
23929
- this.lazyLoadScrollContainers = [];
23930
- }
24633
+ (_a = this.fullHeightController) === null || _a === void 0 ? void 0 : _a.onRender();
23931
24634
  }
23932
24635
  /**
23933
24636
  * Renders the embedded application pages in the ThoughtSpot app.
@@ -24022,6 +24725,10 @@ const addPreviewStylesIfNotPresent = () => {
24022
24725
  * @summary Liveboard & visualization embed
24023
24726
  * @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
24024
24727
  */
24728
+ // Home unmounts the liveboard container, which is how its state gets cleared. The
24729
+ // settle window gives the container time to do it before we ask for the liveboard back.
24730
+ const HOME_ROUTE = 'home';
24731
+ const HOME_SETTLE_MS = 200;
24025
24732
  /**
24026
24733
  * Embed a ThoughtSpot Liveboard or visualization. When rendered it already
24027
24734
  * waits for the authentication to complete, so you need not wait for
@@ -24041,59 +24748,6 @@ class LiveboardEmbed extends V1Embed {
24041
24748
  constructor(domSelector, viewConfig) {
24042
24749
  viewConfig.embedComponentType = 'LiveboardEmbed';
24043
24750
  super(domSelector, viewConfig);
24044
- this.defaultHeight = 500;
24045
- this.lazyLoadScrollContainers = [];
24046
- this.sendFullHeightLazyLoadData = () => {
24047
- const data = calculateVisibleElementData(this.iFrame, this.viewConfig.enableScrollableContainerLazyLoading);
24048
- // this should be fired only if the lazyLoadingForFullHeight and fullHeight are true
24049
- if (this.viewConfig.lazyLoadingForFullHeight && this.viewConfig.fullHeight) {
24050
- this.trigger(HostEvent.VisibleEmbedCoordinates, data);
24051
- }
24052
- };
24053
- /**
24054
- * This is a handler for the RequestVisibleEmbedCoordinates event.
24055
- * It is used to send the visible coordinates data to the host application.
24056
- * @param data The event payload
24057
- * @param responder The responder function
24058
- */
24059
- this.requestVisibleEmbedCoordinatesHandler = (data, responder) => {
24060
- logger$3.info('Sending RequestVisibleEmbedCoordinates', data);
24061
- const visibleCoordinatesData = calculateVisibleElementData(this.iFrame, this.viewConfig.enableScrollableContainerLazyLoading);
24062
- responder({ type: EmbedEvent.RequestVisibleEmbedCoordinates, data: visibleCoordinatesData });
24063
- };
24064
- /**
24065
- * Set the iframe height as per the computed height received
24066
- * from the ThoughtSpot app.
24067
- * @param data The event payload
24068
- */
24069
- this.updateIFrameHeight = (data) => {
24070
- this.setIFrameHeight(Math.max(data.data, this.defaultHeight));
24071
- this.sendFullHeightLazyLoadData();
24072
- };
24073
- this.embedIframeCenter = (data, responder) => {
24074
- const obj = this.getIframeCenter();
24075
- responder({ type: EmbedEvent.EmbedIframeCenter, data: obj });
24076
- };
24077
- this.setIframeHeightForNonEmbedLiveboard = (data) => {
24078
- const { height: frameHeight } = this.viewConfig.frameParams || {};
24079
- const liveboardRelatedRoutes = [
24080
- '/pinboard/',
24081
- '/insights/pinboard/',
24082
- '/schedules/',
24083
- '/embed/viz/',
24084
- '/embed/insights/viz/',
24085
- '/liveboard/',
24086
- '/insights/liveboard/',
24087
- '/tsl-editor/PINBOARD_ANSWER_BOOK/',
24088
- '/import-tsl/PINBOARD_ANSWER_BOOK/',
24089
- ];
24090
- if (liveboardRelatedRoutes.some((path) => data.data.currentPath.startsWith(path))) {
24091
- // Ignore the height reset of the frame, if the navigation is
24092
- // only within the liveboard page.
24093
- return;
24094
- }
24095
- this.setIFrameHeight(frameHeight || this.defaultHeight);
24096
- };
24097
24751
  /**
24098
24752
  * @hidden
24099
24753
  * Internal state to track the current liveboard id.
@@ -24107,22 +24761,19 @@ class LiveboardEmbed extends V1Embed {
24107
24761
  };
24108
24762
  if (this.viewConfig.fullHeight === true) {
24109
24763
  if (this.viewConfig.vizId) {
24110
- logger$3.warn('Full height is currently only supported for Liveboard embeds.' +
24111
- 'Using full height with vizId might lead to unexpected behavior.');
24112
- }
24113
- if (this.viewConfig.lazyLoadingForFullHeight === undefined) {
24114
- this.viewConfig.lazyLoadingForFullHeight = true;
24764
+ logger$3.warn('Full height is currently only supported for Liveboard embeds.'
24765
+ + 'Using full height with vizId might lead to unexpected behavior.');
24115
24766
  }
24116
- if (this.viewConfig.enableScrollableContainerLazyLoading === undefined) {
24117
- this.viewConfig.enableScrollableContainerLazyLoading = true;
24118
- }
24119
- if (this.viewConfig.lazyLoadingMargin === undefined) {
24120
- this.viewConfig.lazyLoadingMargin = DEFAULT_LAZY_LOADING_MARGIN;
24121
- }
24122
- this.on(EmbedEvent.RouteChange, this.setIframeHeightForNonEmbedLiveboard);
24123
- this.on(EmbedEvent.EmbedHeight, this.updateIFrameHeight);
24124
- this.on(EmbedEvent.EmbedIframeCenter, this.embedIframeCenter);
24125
- this.on(EmbedEvent.RequestVisibleEmbedCoordinates, this.requestVisibleEmbedCoordinatesHandler);
24767
+ this.fullHeightController = new FullHeightController(this.viewConfig, {
24768
+ getIframe: () => this.iFrame,
24769
+ setFrameHeight: (height) => this.setIFrameHeight(height),
24770
+ on: (eventType, callback) => {
24771
+ this.on(eventType, callback);
24772
+ },
24773
+ trigger: (hostEvent, data) => {
24774
+ this.trigger(hostEvent, data);
24775
+ },
24776
+ });
24126
24777
  }
24127
24778
  }
24128
24779
  async getAppInitData() {
@@ -24140,21 +24791,13 @@ class LiveboardEmbed extends V1Embed {
24140
24791
  return queryParams;
24141
24792
  }
24142
24793
  getEmbedParamsObject() {
24794
+ var _a;
24143
24795
  let params = {};
24144
24796
  params = this.getBaseQueryParams(params);
24145
- 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;
24797
+ const { enableVizTransformations, 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;
24146
24798
  const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
24147
24799
  || this.viewConfig.preventPinboardFilterRemoval;
24148
- if (fullHeight === true) {
24149
- params[Param.fullHeight] = true;
24150
- if (this.viewConfig.lazyLoadingForFullHeight) {
24151
- params[Param.IsLazyLoadingForEmbedEnabled] = true;
24152
- if (isValidCssMargin(this.viewConfig.lazyLoadingMargin)) {
24153
- params[Param.RootMarginForLazyLoad] = this.viewConfig.lazyLoadingMargin;
24154
- }
24155
- }
24156
- }
24157
- this.defaultHeight = minimumHeight || defaultHeight || this.defaultHeight;
24800
+ (_a = this.fullHeightController) === null || _a === void 0 ? void 0 : _a.addQueryParams(params);
24158
24801
  if (enableVizTransformations !== undefined) {
24159
24802
  params[Param.EnableVizTransformations] = enableVizTransformations.toString();
24160
24803
  }
@@ -24339,6 +24982,7 @@ class LiveboardEmbed extends V1Embed {
24339
24982
  errorType: ErrorDetailsTypes.VALIDATION_ERROR,
24340
24983
  message: ERROR_MESSAGE.LIVEBOARD_VIZ_ID_VALIDATION,
24341
24984
  code: EmbedErrorCodes.LIVEBOARD_ID_MISSING,
24985
+ severity: EmbedErrorSeverity.SEV1,
24342
24986
  error: ERROR_MESSAGE.LIVEBOARD_VIZ_ID_VALIDATION,
24343
24987
  });
24344
24988
  }
@@ -24380,19 +25024,45 @@ class LiveboardEmbed extends V1Embed {
24380
25024
  }
24381
25025
  beforePrerenderVisible() {
24382
25026
  super.beforePrerenderVisible();
24383
- const embedObj = this.getPreRenderObj();
24384
- this.executeAfterEmbedContainerLoaded(() => {
24385
- this.navigateToLiveboard(this.viewConfig.liveboardId, this.viewConfig.vizId, this.viewConfig.activeTabId, this.viewConfig.personalizedViewId);
24386
- if (embedObj) {
24387
- embedObj.currentLiveboardState = {
24388
- liveboardId: this.viewConfig.liveboardId,
24389
- vizId: this.viewConfig.vizId,
24390
- activeTabId: this.viewConfig.activeTabId,
24391
- personalizedViewId: this.viewConfig.personalizedViewId,
24392
- };
25027
+ // Captured before showPreRender() hands the wrapper over to this instance.
25028
+ // Itself means a hide/show, not a hand-over, so there is nothing stale to clear.
25029
+ const previous = this.getPreRenderObj();
25030
+ const showing = previous === this ? undefined : previous === null || previous === void 0 ? void 0 : previous.currentLiveboardState;
25031
+ this.executeAfterEmbedContainerLoaded(async () => {
25032
+ // Without this the params callback suspends on its await and Navigate
25033
+ // goes out first, so the container loads with the previous config's filters.
25034
+ await this.preRenderParamsApplied;
25035
+ if (this.isShowingLiveboardRoute(showing)) {
25036
+ // Navigate to the route we are already on is a no-op, so the liveboard
25037
+ // keeps its state. Home unmounts the container, which clears it.
25038
+ this.trigger(HostEvent.Navigate, HOME_ROUTE)
25039
+ .catch((error) => logger$3.warn('Could not route via home', error));
25040
+ // Not awaited above: the container never acks Navigate, so that promise
25041
+ // only settles on the 30s trigger timeout.
25042
+ await new Promise((resolve) => {
25043
+ setTimeout(resolve, HOME_SETTLE_MS);
25044
+ });
24393
25045
  }
25046
+ this.navigateToLiveboard(this.viewConfig.liveboardId, this.viewConfig.vizId, this.viewConfig.activeTabId, this.viewConfig.personalizedViewId);
25047
+ this.currentLiveboardState = {
25048
+ liveboardId: this.viewConfig.liveboardId,
25049
+ vizId: this.viewConfig.vizId,
25050
+ activeTabId: this.viewConfig.activeTabId,
25051
+ personalizedViewId: this.viewConfig.personalizedViewId,
25052
+ };
24394
25053
  });
24395
25054
  }
25055
+ // The whole route, not just the liveboard id: the path is built from the viz, tab
25056
+ // and view too, so a same-liveboard show onto another tab is a real navigation.
25057
+ isShowingLiveboardRoute(showing) {
25058
+ if (!(showing === null || showing === void 0 ? void 0 : showing.liveboardId))
25059
+ return false;
25060
+ const { liveboardId, vizId, activeTabId, personalizedViewId, } = this.viewConfig;
25061
+ return showing.liveboardId === liveboardId
25062
+ && showing.vizId === vizId
25063
+ && showing.activeTabId === activeTabId
25064
+ && showing.personalizedViewId === personalizedViewId;
25065
+ }
24396
25066
  async handleRenderForPrerender() {
24397
25067
  if (isUndefined$1(this.viewConfig.liveboardId)) {
24398
25068
  return this.prerenderGeneric();
@@ -24401,11 +25071,16 @@ class LiveboardEmbed extends V1Embed {
24401
25071
  }
24402
25072
  /**
24403
25073
  * Triggers an event to the embedded app
25074
+ * Payload typing follows {@link TsEmbed.trigger}: unknown fields fail to compile
25075
+ * from SDK 1.52.0; strict contract checks land in SDK 1.54.0.
24404
25076
  * @param {HostEvent} messageType The event type
24405
- * @param {any} data The payload to send with the message
25077
+ * @param {TriggerData} data The payload, typed against the event's contract
24406
25078
  * @returns A promise that resolves with the response from the embedded app
24407
25079
  */
24408
- trigger(messageType, data = {}, context) {
25080
+ trigger(messageType,
25081
+ // Mirror TsEmbed.trigger: contract shape is the contextual type and
25082
+ // unknown fields on object literals are flagged. Strict in SDK 1.54.0.
25083
+ data = {}, context) {
24409
25084
  const dataWithVizId = data;
24410
25085
  if (messageType === HostEvent.SetActiveTab) {
24411
25086
  this.setActiveTab(data);
@@ -24421,52 +25096,13 @@ class LiveboardEmbed extends V1Embed {
24421
25096
  * @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
24422
25097
  */
24423
25098
  destroy() {
25099
+ var _a;
24424
25100
  super.destroy();
24425
- this.unregisterLazyLoadEvents();
25101
+ (_a = this.fullHeightController) === null || _a === void 0 ? void 0 : _a.destroy();
24426
25102
  }
24427
25103
  postRender() {
24428
- this.registerLazyLoadEvents();
24429
- }
24430
- registerLazyLoadEvents() {
24431
- if (!this.iFrame) {
24432
- return;
24433
- }
24434
- if (this.viewConfig.fullHeight && this.viewConfig.lazyLoadingForFullHeight) {
24435
- this.unregisterLazyLoadEvents();
24436
- // TODO: Use passive: true, install modernizr to check for passive
24437
- window.addEventListener('resize', this.sendFullHeightLazyLoadData);
24438
- window.addEventListener('scroll', this.sendFullHeightLazyLoadData, true);
24439
- if (!this.viewConfig.enableScrollableContainerLazyLoading) {
24440
- return;
24441
- }
24442
- this.lazyLoadScrollContainers = getScrollableAncestors(this.iFrame);
24443
- this.lazyLoadScrollContainers.forEach((scrollContainer) => {
24444
- scrollContainer.addEventListener('scroll', this.sendFullHeightLazyLoadData);
24445
- });
24446
- if (typeof ResizeObserver !== 'undefined') {
24447
- const resizeTargets = new Set([
24448
- this.iFrame.parentElement,
24449
- ...getEffectiveClippingAncestors(this.iFrame),
24450
- ].filter(Boolean));
24451
- this.lazyLoadResizeObserver = new ResizeObserver(this.sendFullHeightLazyLoadData);
24452
- resizeTargets.forEach((resizeTarget) => {
24453
- this.lazyLoadResizeObserver.observe(resizeTarget);
24454
- });
24455
- }
24456
- }
24457
- }
24458
- unregisterLazyLoadEvents() {
24459
25104
  var _a;
24460
- if (this.viewConfig.fullHeight && this.viewConfig.lazyLoadingForFullHeight) {
24461
- window.removeEventListener('resize', this.sendFullHeightLazyLoadData);
24462
- window.removeEventListener('scroll', this.sendFullHeightLazyLoadData, true);
24463
- (_a = this.lazyLoadResizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
24464
- this.lazyLoadResizeObserver = undefined;
24465
- this.lazyLoadScrollContainers.forEach((scrollContainer) => {
24466
- scrollContainer.removeEventListener('scroll', this.sendFullHeightLazyLoadData);
24467
- });
24468
- this.lazyLoadScrollContainers = [];
24469
- }
25105
+ (_a = this.fullHeightController) === null || _a === void 0 ? void 0 : _a.onRender();
24470
25106
  }
24471
25107
  /**
24472
25108
  * Render an embedded ThoughtSpot Liveboard or visualization
@@ -24490,7 +25126,7 @@ class LiveboardEmbed extends V1Embed {
24490
25126
  if (this.isRendered) {
24491
25127
  this.trigger(HostEvent.Navigate, path.substring(1));
24492
25128
  }
24493
- else if (this.getPreRenderConfig().preRenderId) {
25129
+ else if (this.getPreRenderConfig().id) {
24494
25130
  this.preRender(true);
24495
25131
  }
24496
25132
  else {
@@ -24611,7 +25247,7 @@ class SearchEmbed extends TsEmbed {
24611
25247
  }
24612
25248
  getEmbedParamsObject() {
24613
25249
  var _a;
24614
- const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, hideSearchBar, dataPanelV2 = true, useLastSelectedSources = false, runtimeParameters, collapseSearchBarInitially = false, enableCustomColumnGroups = false, dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, focusSearchBarOnRender = true, excludeRuntimeParametersfromURL, excludeSearchTokenStringFromURL, collapseSearchBar = true, isThisPeriodInDateFiltersEnabled, newChartsLibrary, } = this.viewConfig;
25250
+ const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, hideSearchBar, dataPanelV2 = true, useLastSelectedSources = false, runtimeParameters, collapseSearchBarInitially = false, enableCustomColumnGroups = false, dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, focusSearchBarOnRender = true, excludeRuntimeParametersfromURL, excludeSearchTokenStringFromURL, collapseSearchBar = true, isThisPeriodInDateFiltersEnabled, newChartsLibrary, hideAnswerEditPanel, } = this.viewConfig;
24615
25251
  const queryParams = this.getBaseQueryParams();
24616
25252
  queryParams[Param.HideActions] = [
24617
25253
  ...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : []),
@@ -24634,6 +25270,9 @@ class SearchEmbed extends TsEmbed {
24634
25270
  if (enableSearchAssist) {
24635
25271
  queryParams[Param.EnableSearchAssist] = true;
24636
25272
  }
25273
+ if (hideAnswerEditPanel !== undefined) {
25274
+ queryParams[Param.ShowAnswerEditPanel] = !hideAnswerEditPanel;
25275
+ }
24637
25276
  if (hideResults) {
24638
25277
  queryParams[Param.HideResult] = true;
24639
25278
  }
@@ -26130,4 +26769,4 @@ class AutoFrameRenderer extends TsEmbed {
26130
26769
  }
26131
26770
  }
26132
26771
 
26133
- export { Action, AnswerService, AppEmbed, ApplicabilityLevel, AuthEvent, AuthFailureType, AuthStatus, AuthType, BackgroundFormatType, BodylessConversation, ConditionalFormattingComparisonType, ConditionalFormattingOperator, ContextMenuTriggerOptions, ContextType, ConversationEmbed, CustomActionTarget, CustomActionsPosition, DataLabelFilterOperator, DataPanelCustomColumnGroupsAccordionState$1 as DataPanelCustomColumnGroupsAccordionState, DataSourceVisualMode, EmbedErrorCodes, EmbedEvent, ErrorDetailsTypes, HomeLeftNavItem, HomePage, HomePageSearchBarMode, HomepageModule, HostEvent, InterceptedApiType, LegendPosition, ListPage, ListPageColumns, LiveboardEmbed, LogLevel, MIXPANEL_EVENT, Page, PinboardEmbed, PrefetchFeatures, PrimaryNavbarVersion, RuntimeFilterOp, SearchBarEmbed, SearchEmbed, SpotterAgentEmbed, SpotterEmbed, SpotterQueryMode, TableContentDensity, TableTheme, UIPassthroughEvent, createLiveboardWithAnswers, executeTML, exportTML, getAnswerFromQuery, getEmbedConfig as getInitConfig, getSessionInfo, init, logout, prefetch, reloadIframe, resetCachedAuthToken, startAutoMCPFrameRenderer, tokenizedFetch, uploadMixpanelEvent };
26772
+ export { Action, AnswerService, AppEmbed, ApplicabilityLevel, AuthEvent, AuthFailureType, AuthStatus, AuthType, BackgroundFormatType, BodylessConversation, ConditionalFormattingComparisonType, ConditionalFormattingOperator, ContextMenuTriggerOptions, ContextType, ConversationEmbed, CustomActionTarget, CustomActionsPosition, DataLabelFilterOperator, DataPanelCustomColumnGroupsAccordionState$1 as DataPanelCustomColumnGroupsAccordionState, DataSourceVisualMode, EmbedErrorCodes, EmbedErrorSeverity, EmbedEvent, ErrorDetailsTypes, HomeLeftNavItem, HomePage, HomePageSearchBarMode, HomepageModule, HostEvent, InterceptedApiType, LegendPosition, ListPage, ListPageColumns, LiveboardEmbed, LogLevel, MIXPANEL_EVENT, Page, PinboardEmbed, PrefetchFeatures, PrimaryNavbarVersion, RuntimeFilterOp, SearchBarEmbed, SearchEmbed, SpotterAgentEmbed, SpotterEmbed, SpotterQueryMode, TableContentDensity, TableTheme, UIPassthroughEvent, createLiveboardWithAnswers, executeTML, exportTML, getAnswerFromQuery, getEmbedConfig as getInitConfig, getSessionInfo, init, logout, prefetch, reloadIframe, resetCachedAuthToken, startAutoMCPFrameRenderer, tokenizedFetch, uploadMixpanelEvent };