@thoughtspot/visual-embed-sdk 1.52.0 → 1.52.2-beta

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 (385) hide show
  1. package/cjs/package.json +19 -4
  2. package/cjs/src/contracts/contracts.spec.d.ts +2 -0
  3. package/cjs/src/contracts/contracts.spec.d.ts.map +1 -0
  4. package/cjs/src/contracts/contracts.spec.js +345 -0
  5. package/cjs/src/contracts/contracts.spec.js.map +1 -0
  6. package/cjs/src/contracts/embed-event-payloads.d.ts +73 -0
  7. package/cjs/src/contracts/embed-event-payloads.d.ts.map +1 -0
  8. package/cjs/src/contracts/embed-event-payloads.js +3 -0
  9. package/cjs/src/contracts/embed-event-payloads.js.map +1 -0
  10. package/cjs/src/contracts/host-event-contracts.d.ts +416 -0
  11. package/cjs/src/contracts/host-event-contracts.d.ts.map +1 -0
  12. package/cjs/src/contracts/host-event-contracts.js +3 -0
  13. package/cjs/src/contracts/host-event-contracts.js.map +1 -0
  14. package/cjs/src/contracts/index.d.ts +22 -0
  15. package/cjs/src/contracts/index.d.ts.map +1 -0
  16. package/cjs/src/contracts/index.js +33 -0
  17. package/cjs/src/contracts/index.js.map +1 -0
  18. package/cjs/src/contracts/ui-passthrough-contracts.d.ts +277 -0
  19. package/cjs/src/contracts/ui-passthrough-contracts.d.ts.map +1 -0
  20. package/cjs/src/{embed/hostEventClient/contracts.js → contracts/ui-passthrough-contracts.js} +6 -2
  21. package/cjs/src/contracts/ui-passthrough-contracts.js.map +1 -0
  22. package/cjs/src/embed/app.d.ts +21 -143
  23. package/cjs/src/embed/app.d.ts.map +1 -1
  24. package/cjs/src/embed/app.js +21 -121
  25. package/cjs/src/embed/app.js.map +1 -1
  26. package/cjs/src/embed/app.spec.js +80 -26
  27. package/cjs/src/embed/app.spec.js.map +1 -1
  28. package/cjs/src/embed/auto-frame-renderer.js +1 -1
  29. package/cjs/src/embed/auto-frame-renderer.js.map +1 -1
  30. package/cjs/src/embed/auto-frame-renderer.spec.js +24 -13
  31. package/cjs/src/embed/auto-frame-renderer.spec.js.map +1 -1
  32. package/cjs/src/embed/bodyless-conversation.js +1 -1
  33. package/cjs/src/embed/bodyless-conversation.js.map +1 -1
  34. package/cjs/src/embed/conversation.d.ts +1 -0
  35. package/cjs/src/embed/conversation.d.ts.map +1 -1
  36. package/cjs/src/embed/conversation.js +4 -4
  37. package/cjs/src/embed/conversation.js.map +1 -1
  38. package/cjs/src/embed/conversation.spec.js +35 -24
  39. package/cjs/src/embed/conversation.spec.js.map +1 -1
  40. package/cjs/src/embed/embedConfig.spec.js +2 -1
  41. package/cjs/src/embed/embedConfig.spec.js.map +1 -1
  42. package/cjs/src/embed/events.spec.js +12 -2
  43. package/cjs/src/embed/events.spec.js.map +1 -1
  44. package/cjs/src/embed/hostEventClient/host-event-client.d.ts +5 -4
  45. package/cjs/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
  46. package/cjs/src/embed/hostEventClient/host-event-client.js +34 -23
  47. package/cjs/src/embed/hostEventClient/host-event-client.js.map +1 -1
  48. package/cjs/src/embed/hostEventClient/host-event-client.spec.js +50 -44
  49. package/cjs/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
  50. package/cjs/src/embed/hostEventClient/utils.d.ts +10 -1
  51. package/cjs/src/embed/hostEventClient/utils.d.ts.map +1 -1
  52. package/cjs/src/embed/hostEventClient/utils.js +52 -6
  53. package/cjs/src/embed/hostEventClient/utils.js.map +1 -1
  54. package/cjs/src/embed/hostEventClient/utils.spec.js +151 -0
  55. package/cjs/src/embed/hostEventClient/utils.spec.js.map +1 -1
  56. package/cjs/src/embed/liveboard.d.ts +13 -164
  57. package/cjs/src/embed/liveboard.d.ts.map +1 -1
  58. package/cjs/src/embed/liveboard.js +72 -135
  59. package/cjs/src/embed/liveboard.js.map +1 -1
  60. package/cjs/src/embed/liveboard.spec.js +213 -29
  61. package/cjs/src/embed/liveboard.spec.js.map +1 -1
  62. package/cjs/src/embed/search-bar.js +1 -1
  63. package/cjs/src/embed/search-bar.js.map +1 -1
  64. package/cjs/src/embed/search.d.ts +14 -0
  65. package/cjs/src/embed/search.d.ts.map +1 -1
  66. package/cjs/src/embed/search.js +5 -2
  67. package/cjs/src/embed/search.js.map +1 -1
  68. package/cjs/src/embed/search.spec.js +85 -0
  69. package/cjs/src/embed/search.spec.js.map +1 -1
  70. package/cjs/src/embed/spotter-utils.d.ts +8 -1
  71. package/cjs/src/embed/spotter-utils.d.ts.map +1 -1
  72. package/cjs/src/embed/spotter-utils.js +14 -1
  73. package/cjs/src/embed/spotter-utils.js.map +1 -1
  74. package/cjs/src/embed/spotter-utils.spec.js +26 -0
  75. package/cjs/src/embed/spotter-utils.spec.js.map +1 -1
  76. package/cjs/src/embed/ts-embed.d.ts +20 -22
  77. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  78. package/cjs/src/embed/ts-embed.js +171 -66
  79. package/cjs/src/embed/ts-embed.js.map +1 -1
  80. package/cjs/src/embed/ts-embed.spec.js +486 -38
  81. package/cjs/src/embed/ts-embed.spec.js.map +1 -1
  82. package/cjs/src/errors.js +1 -1
  83. package/cjs/src/errors.js.map +1 -1
  84. package/cjs/src/full-height.d.ts +137 -0
  85. package/cjs/src/full-height.d.ts.map +1 -0
  86. package/cjs/src/full-height.js +272 -0
  87. package/cjs/src/full-height.js.map +1 -0
  88. package/cjs/src/full-height.spec.d.ts +2 -0
  89. package/cjs/src/full-height.spec.d.ts.map +1 -0
  90. package/cjs/src/full-height.spec.js +835 -0
  91. package/cjs/src/full-height.spec.js.map +1 -0
  92. package/cjs/src/index.d.ts +5 -3
  93. package/cjs/src/index.d.ts.map +1 -1
  94. package/cjs/src/index.js +6 -4
  95. package/cjs/src/index.js.map +1 -1
  96. package/cjs/src/react/all-types-export.d.ts +1 -1
  97. package/cjs/src/react/all-types-export.d.ts.map +1 -1
  98. package/cjs/src/react/all-types-export.js +2 -1
  99. package/cjs/src/react/all-types-export.js.map +1 -1
  100. package/cjs/src/react/all-types-export.parity.spec.js +55 -3
  101. package/cjs/src/react/all-types-export.parity.spec.js.map +1 -1
  102. package/cjs/src/types.d.ts +584 -24
  103. package/cjs/src/types.d.ts.map +1 -1
  104. package/cjs/src/types.js +370 -22
  105. package/cjs/src/types.js.map +1 -1
  106. package/cjs/src/utils/authService/tokenizedAuthService.spec.js +2 -1
  107. package/cjs/src/utils/authService/tokenizedAuthService.spec.js.map +1 -1
  108. package/cjs/src/utils/custom-actions.spec.js +4 -2
  109. package/cjs/src/utils/custom-actions.spec.js.map +1 -1
  110. package/cjs/src/utils/filterConverter.d.ts +106 -0
  111. package/cjs/src/utils/filterConverter.d.ts.map +1 -0
  112. package/cjs/src/utils/filterConverter.js +215 -0
  113. package/cjs/src/utils/filterConverter.js.map +1 -0
  114. package/cjs/src/utils/filterConverter.spec.d.ts +2 -0
  115. package/cjs/src/utils/filterConverter.spec.d.ts.map +1 -0
  116. package/cjs/src/utils/filterConverter.spec.js +709 -0
  117. package/cjs/src/utils/filterConverter.spec.js.map +1 -0
  118. package/cjs/src/utils/processData.spec.js +2 -1
  119. package/cjs/src/utils/processData.spec.js.map +1 -1
  120. package/cjs/src/utils/processTrigger.d.ts +3 -1
  121. package/cjs/src/utils/processTrigger.d.ts.map +1 -1
  122. package/cjs/src/utils/processTrigger.js +19 -51
  123. package/cjs/src/utils/processTrigger.js.map +1 -1
  124. package/cjs/src/utils/transport/iframe-transport.d.ts +55 -0
  125. package/cjs/src/utils/transport/iframe-transport.d.ts.map +1 -0
  126. package/cjs/src/utils/transport/iframe-transport.js +108 -0
  127. package/cjs/src/utils/transport/iframe-transport.js.map +1 -0
  128. package/cjs/src/utils/transport/iframe-transport.spec.d.ts +2 -0
  129. package/cjs/src/utils/transport/iframe-transport.spec.d.ts.map +1 -0
  130. package/cjs/src/utils/transport/iframe-transport.spec.js +140 -0
  131. package/cjs/src/utils/transport/iframe-transport.spec.js.map +1 -0
  132. package/cjs/src/utils.d.ts +18 -0
  133. package/cjs/src/utils.d.ts.map +1 -1
  134. package/cjs/src/utils.js +39 -1
  135. package/cjs/src/utils.js.map +1 -1
  136. package/cjs/src/utils.spec.js +62 -0
  137. package/cjs/src/utils.spec.js.map +1 -1
  138. package/dist/{index-BMppCU63.js → index-CcBYlGo9.js} +1 -1
  139. package/dist/src/contracts/contracts.spec.d.ts +2 -0
  140. package/dist/src/contracts/contracts.spec.d.ts.map +1 -0
  141. package/dist/src/contracts/embed-event-payloads.d.ts +73 -0
  142. package/dist/src/contracts/embed-event-payloads.d.ts.map +1 -0
  143. package/dist/src/contracts/host-event-contracts.d.ts +416 -0
  144. package/dist/src/contracts/host-event-contracts.d.ts.map +1 -0
  145. package/dist/src/contracts/index.d.ts +22 -0
  146. package/dist/src/contracts/index.d.ts.map +1 -0
  147. package/dist/src/contracts/ui-passthrough-contracts.d.ts +277 -0
  148. package/dist/src/contracts/ui-passthrough-contracts.d.ts.map +1 -0
  149. package/dist/src/embed/app.d.ts +21 -143
  150. package/dist/src/embed/app.d.ts.map +1 -1
  151. package/dist/src/embed/conversation.d.ts +1 -0
  152. package/dist/src/embed/conversation.d.ts.map +1 -1
  153. package/dist/src/embed/hostEventClient/host-event-client.d.ts +5 -4
  154. package/dist/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
  155. package/dist/src/embed/hostEventClient/utils.d.ts +10 -1
  156. package/dist/src/embed/hostEventClient/utils.d.ts.map +1 -1
  157. package/dist/src/embed/liveboard.d.ts +13 -164
  158. package/dist/src/embed/liveboard.d.ts.map +1 -1
  159. package/dist/src/embed/search.d.ts +14 -0
  160. package/dist/src/embed/search.d.ts.map +1 -1
  161. package/dist/src/embed/spotter-utils.d.ts +8 -1
  162. package/dist/src/embed/spotter-utils.d.ts.map +1 -1
  163. package/dist/src/embed/ts-embed.d.ts +20 -22
  164. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  165. package/dist/src/full-height.d.ts +137 -0
  166. package/dist/src/full-height.d.ts.map +1 -0
  167. package/dist/src/full-height.spec.d.ts +2 -0
  168. package/dist/src/full-height.spec.d.ts.map +1 -0
  169. package/dist/src/index.d.ts +5 -3
  170. package/dist/src/index.d.ts.map +1 -1
  171. package/dist/src/react/all-types-export.d.ts +1 -1
  172. package/dist/src/react/all-types-export.d.ts.map +1 -1
  173. package/dist/src/types.d.ts +584 -24
  174. package/dist/src/types.d.ts.map +1 -1
  175. package/dist/src/utils/filterConverter.d.ts +106 -0
  176. package/dist/src/utils/filterConverter.d.ts.map +1 -0
  177. package/dist/src/utils/filterConverter.spec.d.ts +2 -0
  178. package/dist/src/utils/filterConverter.spec.d.ts.map +1 -0
  179. package/dist/src/utils/processTrigger.d.ts +3 -1
  180. package/dist/src/utils/processTrigger.d.ts.map +1 -1
  181. package/dist/src/utils/transport/iframe-transport.d.ts +55 -0
  182. package/dist/src/utils/transport/iframe-transport.d.ts.map +1 -0
  183. package/dist/src/utils/transport/iframe-transport.spec.d.ts +2 -0
  184. package/dist/src/utils/transport/iframe-transport.spec.d.ts.map +1 -0
  185. package/dist/src/utils.d.ts +18 -0
  186. package/dist/src/utils.d.ts.map +1 -1
  187. package/dist/tsembed-react.es.js +1144 -412
  188. package/dist/tsembed-react.js +1143 -411
  189. package/dist/tsembed.es.js +1357 -418
  190. package/dist/tsembed.js +1352 -412
  191. package/dist/visual-embed-sdk-react-full.d.ts +1514 -651
  192. package/dist/visual-embed-sdk-react.d.ts +1351 -632
  193. package/dist/visual-embed-sdk.d.ts +1508 -668
  194. package/lib/package.json +19 -4
  195. package/lib/src/contracts/contracts.spec.d.ts +2 -0
  196. package/lib/src/contracts/contracts.spec.d.ts.map +1 -0
  197. package/lib/src/contracts/contracts.spec.js +342 -0
  198. package/lib/src/contracts/contracts.spec.js.map +1 -0
  199. package/lib/src/contracts/embed-event-payloads.d.ts +73 -0
  200. package/lib/src/contracts/embed-event-payloads.d.ts.map +1 -0
  201. package/lib/src/contracts/embed-event-payloads.js +2 -0
  202. package/lib/src/contracts/embed-event-payloads.js.map +1 -0
  203. package/lib/src/contracts/host-event-contracts.d.ts +416 -0
  204. package/lib/src/contracts/host-event-contracts.d.ts.map +1 -0
  205. package/lib/src/contracts/host-event-contracts.js +2 -0
  206. package/lib/src/contracts/host-event-contracts.js.map +1 -0
  207. package/lib/src/contracts/index.d.ts +22 -0
  208. package/lib/src/contracts/index.d.ts.map +1 -0
  209. package/lib/src/contracts/index.js +22 -0
  210. package/lib/src/contracts/index.js.map +1 -0
  211. package/lib/src/contracts/ui-passthrough-contracts.d.ts +277 -0
  212. package/lib/src/contracts/ui-passthrough-contracts.d.ts.map +1 -0
  213. package/lib/src/{embed/hostEventClient/contracts.js → contracts/ui-passthrough-contracts.js} +6 -2
  214. package/lib/src/contracts/ui-passthrough-contracts.js.map +1 -0
  215. package/lib/src/embed/app.d.ts +21 -143
  216. package/lib/src/embed/app.d.ts.map +1 -1
  217. package/lib/src/embed/app.js +23 -123
  218. package/lib/src/embed/app.js.map +1 -1
  219. package/lib/src/embed/app.spec.js +80 -26
  220. package/lib/src/embed/app.spec.js.map +1 -1
  221. package/lib/src/embed/auto-frame-renderer.js +1 -1
  222. package/lib/src/embed/auto-frame-renderer.js.map +1 -1
  223. package/lib/src/embed/auto-frame-renderer.spec.js +24 -13
  224. package/lib/src/embed/auto-frame-renderer.spec.js.map +1 -1
  225. package/lib/src/embed/bodyless-conversation.js +1 -1
  226. package/lib/src/embed/bodyless-conversation.js.map +1 -1
  227. package/lib/src/embed/conversation.d.ts +1 -0
  228. package/lib/src/embed/conversation.d.ts.map +1 -1
  229. package/lib/src/embed/conversation.js +5 -5
  230. package/lib/src/embed/conversation.js.map +1 -1
  231. package/lib/src/embed/conversation.spec.js +35 -24
  232. package/lib/src/embed/conversation.spec.js.map +1 -1
  233. package/lib/src/embed/embedConfig.spec.js +2 -1
  234. package/lib/src/embed/embedConfig.spec.js.map +1 -1
  235. package/lib/src/embed/events.spec.js +12 -2
  236. package/lib/src/embed/events.spec.js.map +1 -1
  237. package/lib/src/embed/hostEventClient/host-event-client.d.ts +5 -4
  238. package/lib/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
  239. package/lib/src/embed/hostEventClient/host-event-client.js +19 -8
  240. package/lib/src/embed/hostEventClient/host-event-client.js.map +1 -1
  241. package/lib/src/embed/hostEventClient/host-event-client.spec.js +15 -9
  242. package/lib/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
  243. package/lib/src/embed/hostEventClient/utils.d.ts +10 -1
  244. package/lib/src/embed/hostEventClient/utils.d.ts.map +1 -1
  245. package/lib/src/embed/hostEventClient/utils.js +48 -3
  246. package/lib/src/embed/hostEventClient/utils.js.map +1 -1
  247. package/lib/src/embed/hostEventClient/utils.spec.js +152 -1
  248. package/lib/src/embed/hostEventClient/utils.spec.js.map +1 -1
  249. package/lib/src/embed/liveboard.d.ts +13 -164
  250. package/lib/src/embed/liveboard.d.ts.map +1 -1
  251. package/lib/src/embed/liveboard.js +73 -136
  252. package/lib/src/embed/liveboard.js.map +1 -1
  253. package/lib/src/embed/liveboard.spec.js +213 -29
  254. package/lib/src/embed/liveboard.spec.js.map +1 -1
  255. package/lib/src/embed/search-bar.js +1 -1
  256. package/lib/src/embed/search-bar.js.map +1 -1
  257. package/lib/src/embed/search.d.ts +14 -0
  258. package/lib/src/embed/search.d.ts.map +1 -1
  259. package/lib/src/embed/search.js +5 -2
  260. package/lib/src/embed/search.js.map +1 -1
  261. package/lib/src/embed/search.spec.js +85 -0
  262. package/lib/src/embed/search.spec.js.map +1 -1
  263. package/lib/src/embed/spotter-utils.d.ts +8 -1
  264. package/lib/src/embed/spotter-utils.d.ts.map +1 -1
  265. package/lib/src/embed/spotter-utils.js +12 -0
  266. package/lib/src/embed/spotter-utils.js.map +1 -1
  267. package/lib/src/embed/spotter-utils.spec.js +27 -1
  268. package/lib/src/embed/spotter-utils.spec.js.map +1 -1
  269. package/lib/src/embed/ts-embed.d.ts +20 -22
  270. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  271. package/lib/src/embed/ts-embed.js +171 -66
  272. package/lib/src/embed/ts-embed.js.map +1 -1
  273. package/lib/src/embed/ts-embed.spec.js +484 -36
  274. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  275. package/lib/src/errors.js +1 -1
  276. package/lib/src/errors.js.map +1 -1
  277. package/lib/src/full-height.d.ts +137 -0
  278. package/lib/src/full-height.d.ts.map +1 -0
  279. package/lib/src/full-height.js +268 -0
  280. package/lib/src/full-height.js.map +1 -0
  281. package/lib/src/full-height.spec.d.ts +2 -0
  282. package/lib/src/full-height.spec.d.ts.map +1 -0
  283. package/lib/src/full-height.spec.js +833 -0
  284. package/lib/src/full-height.spec.js.map +1 -0
  285. package/lib/src/index.d.ts +5 -3
  286. package/lib/src/index.d.ts.map +1 -1
  287. package/lib/src/index.js +3 -2
  288. package/lib/src/index.js.map +1 -1
  289. package/lib/src/react/all-types-export.d.ts +1 -1
  290. package/lib/src/react/all-types-export.d.ts.map +1 -1
  291. package/lib/src/react/all-types-export.js +1 -1
  292. package/lib/src/react/all-types-export.js.map +1 -1
  293. package/lib/src/react/all-types-export.parity.spec.js +55 -3
  294. package/lib/src/react/all-types-export.parity.spec.js.map +1 -1
  295. package/lib/src/types.d.ts +584 -24
  296. package/lib/src/types.d.ts.map +1 -1
  297. package/lib/src/types.js +370 -22
  298. package/lib/src/types.js.map +1 -1
  299. package/lib/src/utils/authService/tokenizedAuthService.spec.js +2 -1
  300. package/lib/src/utils/authService/tokenizedAuthService.spec.js.map +1 -1
  301. package/lib/src/utils/custom-actions.spec.js +4 -2
  302. package/lib/src/utils/custom-actions.spec.js.map +1 -1
  303. package/lib/src/utils/filterConverter.d.ts +106 -0
  304. package/lib/src/utils/filterConverter.d.ts.map +1 -0
  305. package/lib/src/utils/filterConverter.js +210 -0
  306. package/lib/src/utils/filterConverter.js.map +1 -0
  307. package/lib/src/utils/filterConverter.spec.d.ts +2 -0
  308. package/lib/src/utils/filterConverter.spec.d.ts.map +1 -0
  309. package/lib/src/utils/filterConverter.spec.js +707 -0
  310. package/lib/src/utils/filterConverter.spec.js.map +1 -0
  311. package/lib/src/utils/processData.spec.js +2 -1
  312. package/lib/src/utils/processData.spec.js.map +1 -1
  313. package/lib/src/utils/processTrigger.d.ts +3 -1
  314. package/lib/src/utils/processTrigger.d.ts.map +1 -1
  315. package/lib/src/utils/processTrigger.js +19 -51
  316. package/lib/src/utils/processTrigger.js.map +1 -1
  317. package/lib/src/utils/transport/iframe-transport.d.ts +55 -0
  318. package/lib/src/utils/transport/iframe-transport.d.ts.map +1 -0
  319. package/lib/src/utils/transport/iframe-transport.js +101 -0
  320. package/lib/src/utils/transport/iframe-transport.js.map +1 -0
  321. package/lib/src/utils/transport/iframe-transport.spec.d.ts +2 -0
  322. package/lib/src/utils/transport/iframe-transport.spec.d.ts.map +1 -0
  323. package/lib/src/utils/transport/iframe-transport.spec.js +138 -0
  324. package/lib/src/utils/transport/iframe-transport.spec.js.map +1 -0
  325. package/lib/src/utils.d.ts +18 -0
  326. package/lib/src/utils.d.ts.map +1 -1
  327. package/lib/src/utils.js +37 -0
  328. package/lib/src/utils.js.map +1 -1
  329. package/lib/src/utils.spec.js +63 -1
  330. package/lib/src/utils.spec.js.map +1 -1
  331. package/lib/src/visual-embed-sdk.d.ts +1508 -668
  332. package/package.json +19 -4
  333. package/src/contracts/contracts.spec.ts +392 -0
  334. package/src/contracts/embed-event-payloads.ts +83 -0
  335. package/src/contracts/host-event-contracts.ts +500 -0
  336. package/src/contracts/index.ts +53 -0
  337. package/src/contracts/ui-passthrough-contracts.ts +301 -0
  338. package/src/embed/app.spec.ts +101 -34
  339. package/src/embed/app.ts +42 -268
  340. package/src/embed/auto-frame-renderer.spec.ts +24 -13
  341. package/src/embed/auto-frame-renderer.ts +1 -1
  342. package/src/embed/bodyless-conversation.ts +1 -1
  343. package/src/embed/conversation.spec.ts +38 -27
  344. package/src/embed/conversation.ts +5 -5
  345. package/src/embed/embedConfig.spec.ts +2 -1
  346. package/src/embed/events.spec.ts +14 -2
  347. package/src/embed/hostEventClient/host-event-client.spec.ts +16 -10
  348. package/src/embed/hostEventClient/host-event-client.ts +31 -10
  349. package/src/embed/hostEventClient/utils.spec.ts +176 -1
  350. package/src/embed/hostEventClient/utils.ts +53 -3
  351. package/src/embed/liveboard.spec.ts +261 -41
  352. package/src/embed/liveboard.ts +85 -300
  353. package/src/embed/search-bar.tsx +1 -1
  354. package/src/embed/search.spec.ts +103 -0
  355. package/src/embed/search.ts +21 -1
  356. package/src/embed/spotter-utils.spec.ts +29 -0
  357. package/src/embed/spotter-utils.ts +16 -0
  358. package/src/embed/ts-embed.spec.ts +650 -36
  359. package/src/embed/ts-embed.ts +205 -76
  360. package/src/errors.ts +1 -1
  361. package/src/full-height.spec.ts +1008 -0
  362. package/src/full-height.ts +361 -0
  363. package/src/index.ts +103 -5
  364. package/src/react/all-types-export.parity.spec.ts +63 -3
  365. package/src/react/all-types-export.ts +49 -0
  366. package/src/types.ts +584 -22
  367. package/src/utils/authService/tokenizedAuthService.spec.ts +2 -1
  368. package/src/utils/custom-actions.spec.ts +4 -2
  369. package/src/utils/filterConverter.spec.ts +801 -0
  370. package/src/utils/filterConverter.ts +304 -0
  371. package/src/utils/processData.spec.ts +2 -1
  372. package/src/utils/processTrigger.ts +28 -58
  373. package/src/utils/transport/iframe-transport.spec.ts +177 -0
  374. package/src/utils/transport/iframe-transport.ts +122 -0
  375. package/src/utils.spec.ts +71 -0
  376. package/src/utils.ts +38 -0
  377. package/cjs/src/embed/hostEventClient/contracts.d.ts +0 -231
  378. package/cjs/src/embed/hostEventClient/contracts.d.ts.map +0 -1
  379. package/cjs/src/embed/hostEventClient/contracts.js.map +0 -1
  380. package/dist/src/embed/hostEventClient/contracts.d.ts +0 -231
  381. package/dist/src/embed/hostEventClient/contracts.d.ts.map +0 -1
  382. package/lib/src/embed/hostEventClient/contracts.d.ts +0 -231
  383. package/lib/src/embed/hostEventClient/contracts.d.ts.map +0 -1
  384. package/lib/src/embed/hostEventClient/contracts.js.map +0 -1
  385. package/src/embed/hostEventClient/contracts.ts +0 -262
@@ -1,4 +1,4 @@
1
- /* @thoughtspot/visual-embed-sdk version 1.52.0 */
1
+ /* @thoughtspot/visual-embed-sdk version 1.52.2-beta */
2
2
  'use client';
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) :
@@ -1065,6 +1065,9 @@
1065
1065
  EmbedEvent["Download"] = "download";
1066
1066
  /**
1067
1067
  * Emitted when the download action is triggered on an Answer.
1068
+ * Payload varies by context: {@link VizScopedRequest} (Search, Answer,
1069
+ * Liveboard), {@link RequiredVizRequest} (Spotter, vizId required). trigger()
1070
+ * accepts the union now; per-context enforced next release.
1068
1071
  * Use start:true to subscribe to when download is initiated, or end:true to
1069
1072
  * subscribe to when download is completed. Default is end:true.
1070
1073
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.0.sw
@@ -1081,6 +1084,9 @@
1081
1084
  EmbedEvent["DownloadAsPng"] = "downloadAsPng";
1082
1085
  /**
1083
1086
  * Emitted when the Download as PDF action is triggered on an Answer
1087
+ * Payload varies by context: {@link VizScopedRequest} (Search, Answer; plus
1088
+ * liveboardId on Liveboard), {@link RequiredVizRequest} (Spotter). trigger()
1089
+ * accepts the union now; per-context enforced next release.
1084
1090
  * Use start:true to subscribe to when download as PDF is initiated, or end:true to
1085
1091
  * subscribe to when download as PDF is completed. Default is end:true.
1086
1092
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
@@ -1097,6 +1103,9 @@
1097
1103
  EmbedEvent["DownloadAsPdf"] = "downloadAsPdf";
1098
1104
  /**
1099
1105
  * Emitted when the Download as CSV action is triggered on an Answer.
1106
+ * Payload varies by context: {@link VizScopedRequest} (Search, Answer,
1107
+ * Liveboard), {@link RequiredVizRequest} (Spotter, vizId required). trigger()
1108
+ * accepts the union now; per-context enforced next release.
1100
1109
  * Use start:true to subscribe to when download as CSV is initiated, or end:true to
1101
1110
  * subscribe to when download as CSV is completed. Default is end:true.
1102
1111
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
@@ -1113,6 +1122,9 @@
1113
1122
  EmbedEvent["DownloadAsCsv"] = "downloadAsCsv";
1114
1123
  /**
1115
1124
  * Emitted when the Download as XLSX action is triggered on an Answer.
1125
+ * Payload varies by context: {@link VizScopedRequest} (Search, Answer,
1126
+ * Liveboard), {@link RequiredVizRequest} (Spotter, vizId required). trigger()
1127
+ * accepts the union now; per-context enforced next release.
1116
1128
  * Use start:true to subscribe to when download as XLSX is initiated, or end:true to
1117
1129
  * subscribe to when download as XLSX is completed. Default is end:true.
1118
1130
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
@@ -1391,6 +1403,9 @@
1391
1403
  EmbedEvent["Schedule"] = "subscription";
1392
1404
  /**
1393
1405
  * Emitted when a user clicks **Edit** on a Liveboard or visualization
1406
+ * Payload varies by context: {@link VizScopedRequest} (Liveboard),
1407
+ * {@link RequiredVizRequest} (Spotter, vizId required). trigger() accepts the
1408
+ * union now; per-context enforced next release.
1394
1409
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1395
1410
  * @example
1396
1411
  * ```js
@@ -2470,6 +2485,7 @@
2470
2485
  * the search query string.
2471
2486
  * Supported in `AppEmbed` and `SearchEmbed` deployments.
2472
2487
  * Includes the following properties:
2488
+ * Payload: {@link SearchRequest}.
2473
2489
  * @param - Includes the following keys:
2474
2490
  * - `searchQuery`: Query string with search tokens.
2475
2491
  * - `dataSources`: Data source GUID to search on.
@@ -2497,6 +2513,9 @@
2497
2513
  HostEvent["Search"] = "search";
2498
2514
  /**
2499
2515
  * Triggers a drill on certain points of the specified column
2516
+ * Payload: {@link DrillDownRequest}; in Liveboard context vizId is required
2517
+ * ({@link RequiredVizRequest}). trigger() accepts the union now; per-context
2518
+ * enforced next release.
2500
2519
  * Includes the following properties:
2501
2520
  * @param - Includes the following keys:
2502
2521
  * - `points`: An object containing `selectedPoints` and/or `clickedPoint`
@@ -2576,6 +2595,8 @@
2576
2595
  HostEvent["Reload"] = "reload";
2577
2596
  /**
2578
2597
  * Get iframe URL for the current embed view.
2598
+ * Payload: none.
2599
+ * Response: {@link GetIframeUrlResponse}.
2579
2600
  * @example
2580
2601
  * ```js
2581
2602
  * const url = embed.trigger(HostEvent.GetIframeUrl);
@@ -2594,6 +2615,7 @@
2594
2615
  HostEvent["GetIframeUrl"] = "GetIframeUrl";
2595
2616
  /**
2596
2617
  * Display specific visualizations on a Liveboard.
2618
+ * Payload: `string[]`.
2597
2619
  * @param - An array of GUIDs of the visualization to show. The visualization IDs not passed
2598
2620
  * in this parameter will be hidden.
2599
2621
  * @example
@@ -2616,6 +2638,7 @@
2616
2638
  HostEvent["SetVisibleVizs"] = "SetPinboardVisibleVizs";
2617
2639
  /**
2618
2640
  * Set a Liveboard tab as an active tab.
2641
+ * Payload: {@link SetActiveTabRequest}.
2619
2642
  * @param - tabId - string of id of Tab to show
2620
2643
  * @example
2621
2644
  * ```js
@@ -2643,6 +2666,7 @@
2643
2666
  * and `AppEmbed` only. In full application embedding, this event updates
2644
2667
  * the runtime filters applied on the Liveboard and saved Answer objects.
2645
2668
  *
2669
+ * Payload: {@link RuntimeFilter}[].
2646
2670
  * @param - Array of {@link RuntimeFilter} objects. Each item includes:
2647
2671
  * - `columnName`: Name of the column to filter on.
2648
2672
  * - `operator`: {@link RuntimeFilterOp} to apply. For more information, see
@@ -2684,6 +2708,7 @@
2684
2708
  * Accepts either a plain value or an object with `path`
2685
2709
  * and an optional `replace` flag.
2686
2710
  *
2711
+ * Payload: `string` | `number` | {@link NavigateRequest}.
2687
2712
  * @param data - A string path, a numeric history delta, or an object
2688
2713
  * `{ path: string | number, replace?: boolean }`.
2689
2714
  * - `path` — the route to navigate to, or a history delta such as `1`
@@ -2711,6 +2736,9 @@
2711
2736
  /**
2712
2737
  * Open the filter panel for a particular column.
2713
2738
  * Works with Search and Liveboard embed.
2739
+ * Payload: {@link OpenFilterRequest} (the cross-context superset). The
2740
+ * accepted fields vary by context: {@link OpenFilterLiveboardRequest},
2741
+ * {@link OpenFilterSpotterRequest}, {@link OpenFilterSearchRequest}.
2714
2742
  * @param - { columnId: string,
2715
2743
  * name: string,
2716
2744
  * type: ATTRIBUTE/MEASURE,
@@ -2793,6 +2821,7 @@
2793
2821
  /**
2794
2822
  * Open the parameter panel for a particular parameter on a Liveboard.
2795
2823
  * Mirrors {@link HostEvent.OpenFilter} for parameters.
2824
+ * Payload: {@link OpenParameterRequest}.
2796
2825
  * @param - Includes the following keys:
2797
2826
  * - `parameter`: An object identifying the parameter to open, for
2798
2827
  * example, `{ parameterId: '<parameter-GUID>' }`.
@@ -2824,6 +2853,7 @@
2824
2853
  HostEvent["OpenParameter"] = "openParameter";
2825
2854
  /**
2826
2855
  * Add columns to the current search query.
2856
+ * Payload: `{ columnIds: string[] }`.
2827
2857
  * @param - { columnIds: string[] }
2828
2858
  * @example
2829
2859
  * ```js
@@ -2842,6 +2872,7 @@
2842
2872
  HostEvent["AddColumns"] = "addColumns";
2843
2873
  /**
2844
2874
  * Remove a column from the current search query.
2875
+ * Payload: `{ columnId: string }`.
2845
2876
  * @param - { columnId: string }
2846
2877
  * @example
2847
2878
  * ```js
@@ -2866,6 +2897,8 @@
2866
2897
  * sorting, toggling of legends, and data drill down.
2867
2898
  * For more information, see
2868
2899
  * link:https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#transient-lb-content[Liveboard data with unsaved changes].
2900
+ * Payload: none.
2901
+ * Response: {@link GetExportRequestForCurrentPinboardResponse}.
2869
2902
  * @example
2870
2903
  * ```js
2871
2904
  * liveboardEmbed.trigger(HostEvent.getExportRequestForCurrentPinboard).then(
@@ -2887,6 +2920,8 @@
2887
2920
  * requiring additional user input via the *Pin to Liveboard* modal, define
2888
2921
  * the following parameters:
2889
2922
  *
2923
+ * Payload: {@link PinAnswerToLiveboardRequest}.
2924
+ * Response: {@link PinAnswerToLiveboardResponse}.
2890
2925
  * @param - Includes the following keys:
2891
2926
  * - `vizId`: GUID of the saved Answer or Spotter visualization ID to pin to a
2892
2927
  * Liveboard.
@@ -3001,6 +3036,7 @@
3001
3036
  HostEvent["LiveboardInfo"] = "pinboardInfo";
3002
3037
  /**
3003
3038
  * Trigger the **Schedule** action on an embedded Liveboard.
3039
+ * Payload: {@link VizScopedRequest}.
3004
3040
  * @example
3005
3041
  * ```js
3006
3042
  * liveboardEmbed.trigger(HostEvent.Schedule)
@@ -3016,6 +3052,7 @@
3016
3052
  HostEvent["Schedule"] = "subscription";
3017
3053
  /**
3018
3054
  * Trigger the **Manage schedule** action on an embedded Liveboard
3055
+ * Payload: {@link VizScopedRequest}.
3019
3056
  * @example
3020
3057
  * ```js
3021
3058
  * liveboardEmbed.trigger(HostEvent.SchedulesList)
@@ -3032,6 +3069,7 @@
3032
3069
  /**
3033
3070
  * Trigger the **Export TML** action on an embedded Liveboard or
3034
3071
  * Answer.
3072
+ * Payload: {@link VizScopedRequest}.
3035
3073
  * @example
3036
3074
  * ```js
3037
3075
  * liveboardEmbed.trigger(HostEvent.ExportTML)
@@ -3054,6 +3092,7 @@
3054
3092
  /**
3055
3093
  * Trigger the **Edit TML** action on an embedded Liveboard or
3056
3094
  * saved Answers in the full application embedding.
3095
+ * Payload: {@link VizScopedRequest}.
3057
3096
  * @example
3058
3097
  * ```js
3059
3098
  * liveboardEmbed.trigger(HostEvent.EditTML)
@@ -3075,6 +3114,7 @@
3075
3114
  HostEvent["EditTML"] = "editTSL";
3076
3115
  /**
3077
3116
  * Trigger the **Update TML** action on an embedded Liveboard.
3117
+ * Payload: {@link VizScopedRequest}.
3078
3118
  * @example
3079
3119
  * ```js
3080
3120
  * liveboardEmbed.trigger(HostEvent.UpdateTML)
@@ -3092,6 +3132,7 @@
3092
3132
  * Trigger the **Download PDF** action on an embedded Liveboard,
3093
3133
  * visualization or Answer.
3094
3134
  *
3135
+ * Payload: {@link VizScopedRequest} plus optional `liveboardId`.
3095
3136
  * @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
3096
3137
  *
3097
3138
  * **NOTE**: The **Download** > **PDF** action is available on
@@ -3142,6 +3183,7 @@
3142
3183
  /**
3143
3184
  * Trigger the **AI Highlights** action on an embedded Liveboard
3144
3185
  *
3186
+ * Payload: none.
3145
3187
  * @example
3146
3188
  * ```js
3147
3189
  * liveboardEmbed.trigger(HostEvent.AIHighlights)
@@ -3196,6 +3238,9 @@
3196
3238
  HostEvent["MakeACopy"] = "makeACopy";
3197
3239
  /**
3198
3240
  * Trigger the **Delete** action for a Liveboard.
3241
+ * Payload varies by context: {@link RequiredVizRequest} (Liveboard, vizId
3242
+ * required), {@link VizScopedRequest} (Search). trigger() accepts the union
3243
+ * now; per-context enforced next release.
3199
3244
  * @example
3200
3245
  * ```js
3201
3246
  * appEmbed.trigger(HostEvent.Remove)
@@ -3210,6 +3255,7 @@
3210
3255
  HostEvent["Remove"] = "delete";
3211
3256
  /**
3212
3257
  * Trigger the **Explore** action on a visualization.
3258
+ * Payload: {@link RequiredVizRequest}.
3213
3259
  * @param - an object with `vizId` as a key
3214
3260
  * @example
3215
3261
  * ```js
@@ -3229,6 +3275,7 @@
3229
3275
  /**
3230
3276
  * Trigger the **Create alert** action on a KPI chart
3231
3277
  * in a Liveboard or saved Answer.
3278
+ * Payload: {@link VizScopedRequest}.
3232
3279
  * @param - an object with `vizId` as a key
3233
3280
  * @example
3234
3281
  * ```js
@@ -3260,6 +3307,7 @@
3260
3307
  /**
3261
3308
  * Trigger the **Manage alerts** action on a KPI chart
3262
3309
  * in a visualization or saved Answer.
3310
+ * Payload: {@link VizScopedRequest}.
3263
3311
  * @param - an object with `vizId` as a key
3264
3312
  * @example
3265
3313
  * ```js
@@ -3297,6 +3345,7 @@
3297
3345
  * on a Liveboard.
3298
3346
  *
3299
3347
  * This event is not supported in visualization embed and search embed.
3348
+ * Payload: {@link VizScopedRequest}.
3300
3349
  * @param - Object parameter. Includes the following keys:
3301
3350
  * - `vizId`: To trigger the action for a specific visualization in Liveboard embed,
3302
3351
  * pass in `vizId` as a key. In Spotter embed, `vizId` refers to the Answer ID and
@@ -3339,6 +3388,7 @@
3339
3388
  HostEvent["Edit"] = "edit";
3340
3389
  /**
3341
3390
  * Trigger the **Copy link** action on a Liveboard or visualization
3391
+ * Payload: {@link VizScopedRequest}.
3342
3392
  * @param - object - to trigger the action for a
3343
3393
  * specific visualization in Liveboard embed, pass in `vizId` as a key
3344
3394
  * @example
@@ -3384,6 +3434,7 @@
3384
3434
  HostEvent["CopyLink"] = "embedDocument";
3385
3435
  /**
3386
3436
  * Trigger the **Present** action on a Liveboard or visualization
3437
+ * Payload: {@link VizScopedRequest}.
3387
3438
  * @param - object - to trigger the action for a specific visualization
3388
3439
  * in Liveboard embed, pass in `vizId` as a key
3389
3440
  * @example
@@ -3429,6 +3480,8 @@
3429
3480
  HostEvent["Present"] = "present";
3430
3481
  /**
3431
3482
  * Get TML for the current search.
3483
+ * Payload: {@link GetTMLRequest}.
3484
+ * Response: `Record<string, any>`.
3432
3485
  * @example
3433
3486
  * ```js
3434
3487
  * searchEmbed.trigger(HostEvent.GetTML).then((tml) => {
@@ -3478,6 +3531,7 @@
3478
3531
  * Trigger the **Show underlying data** action on a
3479
3532
  * chart or table.
3480
3533
  *
3534
+ * Payload: {@link VizScopedRequest}.
3481
3535
  * @param - an object with vizId as a key
3482
3536
  * @example
3483
3537
  * ```js
@@ -3511,6 +3565,7 @@
3511
3565
  * Trigger the **Delete** action for a visualization
3512
3566
  * in an embedded Liveboard, or a chart or table
3513
3567
  * generated from Search.
3568
+ * Payload: {@link VizScopedRequest}.
3514
3569
  * @param - Liveboard embed takes an object with `vizId` as a key.
3515
3570
  * Can be left empty if embedding Search or visualization.
3516
3571
  * @example
@@ -3539,6 +3594,7 @@
3539
3594
  /**
3540
3595
  * Trigger the **SpotIQ analyze** action on a
3541
3596
  * chart or table.
3597
+ * Payload: {@link VizScopedRequest}.
3542
3598
  * @param - Liveboard embed takes `vizId` as a
3543
3599
  * key. Can be left undefined when embedding Search or
3544
3600
  * visualization.
@@ -3601,6 +3657,7 @@
3601
3657
  /**
3602
3658
  * Trigger the **Download** > **PNG** action on
3603
3659
  * charts in the embedded view.
3660
+ * Payload: {@link VizScopedRequest}.
3604
3661
  * @example
3605
3662
  * ```js
3606
3663
  * liveboardEmbed.trigger(HostEvent.DownloadAsPng,
@@ -3632,6 +3689,7 @@
3632
3689
  /**
3633
3690
  * Trigger the **Download** > **CSV** action on tables in
3634
3691
  * the embedded view.
3692
+ * Payload: {@link VizScopedRequest}.
3635
3693
  * @param - `vizId` refers to the Visualization ID in Spotter embed and is required in Spotter embed.
3636
3694
  * @example
3637
3695
  * ```js
@@ -3671,6 +3729,7 @@
3671
3729
  /**
3672
3730
  * Trigger the **Download** > **XLSX** action on tables
3673
3731
  * in the embedded view.
3732
+ * Payload: {@link VizScopedRequest}.
3674
3733
  * @param - `vizId` refers to the Visualization ID in Spotter embed and is required in Spotter embed.
3675
3734
  * @example
3676
3735
  * ```js
@@ -3710,6 +3769,7 @@
3710
3769
  /**
3711
3770
  * Trigger the **Share** action on an embedded
3712
3771
  * Liveboard or Answer.
3772
+ * Payload: {@link VizScopedRequest}.
3713
3773
  * @example
3714
3774
  * ```js
3715
3775
  * liveboardEmbed.trigger(HostEvent.Share)
@@ -3736,6 +3796,7 @@
3736
3796
  * Trigger the **Save** action on a Liveboard, Answer, or Spotter.
3737
3797
  * Saves the changes.
3738
3798
  *
3799
+ * Payload: {@link VizScopedRequest}.
3739
3800
  * @param - `vizId` refers to the Spotter Visualization Id used in Spotter embed.
3740
3801
  * It is required and can be retrieved from the data embed event.
3741
3802
  *
@@ -3787,6 +3848,7 @@
3787
3848
  /**
3788
3849
  * Trigger the **Sync to Sheets** action on an embedded visualization or Answer
3789
3850
  * Sends data from an Answer or Liveboard visualization to a Google sheet.
3851
+ * Payload: {@link VizScopedRequest}.
3790
3852
  * @param - an object with `vizId` as a key
3791
3853
  * @example
3792
3854
  * ```js
@@ -3817,6 +3879,7 @@
3817
3879
  * Trigger the **Sync to Other Apps** action on an embedded visualization or Answer
3818
3880
  * Sends data from an Answer or Liveboard visualization to third-party apps such
3819
3881
  * as Slack, Salesforce, Microsoft Teams, ServiceNow and so on.
3882
+ * Payload: {@link VizScopedRequest}.
3820
3883
  * @param - an object with vizId as a key
3821
3884
  * @example
3822
3885
  * ```js
@@ -3847,6 +3910,7 @@
3847
3910
  * Trigger the **Manage pipelines** action on an embedded
3848
3911
  * visualization or Answer.
3849
3912
  * Allows users to manage ThoughtSpot Sync pipelines.
3913
+ * Payload: {@link VizScopedRequest}.
3850
3914
  * @param - an object with `vizId` as a key
3851
3915
  * @example
3852
3916
  * ```js
@@ -3875,6 +3939,7 @@
3875
3939
  HostEvent["ManagePipelines"] = "manage-pipeline";
3876
3940
  /**
3877
3941
  * Reset search operation on the Search or Answer page.
3942
+ * Payload: none.
3878
3943
  * @example
3879
3944
  * ```js
3880
3945
  * searchEmbed.trigger(HostEvent.ResetSearch)
@@ -3902,10 +3967,18 @@
3902
3967
  * whole Liveboard.
3903
3968
  * The `applicability` attribute is available from SDK: 1.53.0 |
3904
3969
  * ThoughtSpot: 26.10.0.cl.
3970
+ * Payload: {@link GetFiltersRequest}.
3971
+ * Response: {@link GetFiltersResponse}.
3905
3972
  * @example
3906
3973
  * ```js
3907
3974
  * const data = await liveboardEmbed.trigger(HostEvent.GetFilters);
3908
3975
  * console.log('data', data);
3976
+ * // {
3977
+ * // liveboardFilters: [ ... ],
3978
+ * // runtimeFilters: [
3979
+ * // { columnName: "Region", operator: "IN", values: ["West"] }
3980
+ * // ]
3981
+ * // }
3909
3982
  * ```
3910
3983
  * @example
3911
3984
  * ```js
@@ -3921,6 +3994,7 @@
3921
3994
  HostEvent["GetFilters"] = "getFilters";
3922
3995
  /**
3923
3996
  * Update one or several filters applied on a Liveboard.
3997
+ * Payload: {@link UpdateFiltersRequest}.
3924
3998
  * @param - Includes the following keys:
3925
3999
  * - `filter`: A single filter object containing column name, filter operator, and
3926
4000
  * values.
@@ -3929,9 +4003,9 @@
3929
4003
  *
3930
4004
  * Each filter object must include the following attributes:
3931
4005
  *
3932
- * `column` - Name of the column to filter on.
4006
+ * `columnName` - Name of the column to filter on.
3933
4007
  *
3934
- * `oper` - Filter operator, for example, EQ, IN, CONTAINS.
4008
+ * `operator` - Filter operator, for example, EQ, IN, CONTAINS.
3935
4009
  * For information about the supported filter operators,
3936
4010
  * see link:https://developers.thoughtspot.com/docs/runtime-filters#rtOperator[Developer Documentation].
3937
4011
  *
@@ -3958,8 +4032,8 @@
3958
4032
  *
3959
4033
  * liveboardEmbed.trigger(HostEvent.UpdateFilters, {
3960
4034
  * filter: {
3961
- * column: "item type",
3962
- * oper: "IN",
4035
+ * columnName: "item type",
4036
+ * operator: "IN",
3963
4037
  * values: ["bags","shirts"]
3964
4038
  * }
3965
4039
  * });
@@ -3969,8 +4043,8 @@
3969
4043
  *
3970
4044
  * liveboardEmbed.trigger(HostEvent.UpdateFilters, {
3971
4045
  * filter: {
3972
- * column: "date",
3973
- * oper: "EQ",
4046
+ * columnName: "date",
4047
+ * operator: "EQ",
3974
4048
  * values: ["JULY","2023"],
3975
4049
  * type: "MONTH_YEAR"
3976
4050
  * }
@@ -3981,18 +4055,18 @@
3981
4055
  * ```js
3982
4056
  * liveboardEmbed.trigger(HostEvent.UpdateFilters, {
3983
4057
  * filters: [{
3984
- * column: "Item Type",
3985
- * oper: 'IN',
4058
+ * columnName: "Item Type",
4059
+ * operator: 'IN',
3986
4060
  * values: ["bags","shirts"]
3987
4061
  * },
3988
4062
  * {
3989
- * column: "Region",
3990
- * oper: 'IN',
4063
+ * columnName: "Region",
4064
+ * operator: 'IN',
3991
4065
  * values: ["West","Midwest"]
3992
4066
  * },
3993
4067
  * {
3994
- * column: "Date",
3995
- * oper: 'EQ',
4068
+ * columnName: "Date",
4069
+ * operator: 'EQ',
3996
4070
  * values: ["2023-07-31"],
3997
4071
  * type: "EXACT_DATE"
3998
4072
  * }]
@@ -4006,13 +4080,13 @@
4006
4080
  * ```js
4007
4081
  * liveboardEmbed.trigger(HostEvent.UpdateFilters, {
4008
4082
  * filters: [{
4009
- * column: "(Sample) Retail - Apparel::city",
4010
- * oper: 'IN',
4083
+ * columnName: "(Sample) Retail - Apparel::city",
4084
+ * operator: 'IN',
4011
4085
  * values: ["atlanta"]
4012
4086
  * },
4013
4087
  * {
4014
- * column: "(Sample) Retail - Apparel::Region",
4015
- * oper: 'IN',
4088
+ * columnName: "(Sample) Retail - Apparel::Region",
4089
+ * operator: 'IN',
4016
4090
  * values: ["West","Midwest"]
4017
4091
  * }]
4018
4092
  * });
@@ -4023,8 +4097,8 @@
4023
4097
  * import { ContextType } from '@thoughtspot/visual-embed-sdk';
4024
4098
  * liveboardEmbed.trigger(HostEvent.UpdateFilters, {
4025
4099
  * filter: {
4026
- * column: "item type",
4027
- * oper: "IN",
4100
+ * columnName: "item type",
4101
+ * operator: "IN",
4028
4102
  * values: ["shoes", "boots"]
4029
4103
  * }
4030
4104
  * }, ContextType.Liveboard);
@@ -4034,8 +4108,8 @@
4034
4108
  * // Scope the filter to a specific Liveboard tab
4035
4109
  * liveboardEmbed.trigger(HostEvent.UpdateFilters, {
4036
4110
  * filter: {
4037
- * column: "item type",
4038
- * oper: "IN",
4111
+ * columnName: "item type",
4112
+ * operator: "IN",
4039
4113
  * values: ["bags", "shirts"],
4040
4114
  * applicability: {
4041
4115
  * level: "TAB",
@@ -4044,11 +4118,19 @@
4044
4118
  * }
4045
4119
  * });
4046
4120
  * ```
4121
+ * Use `columnName` and `operator` - the same spelling as
4122
+ * {@link RuntimeFilter}. The older `column` and `oper` spellings are
4123
+ * deprecated; they are still accepted, but pass only one spelling of each
4124
+ * field, never both. To reapply the filter state captured from
4125
+ * {@link EmbedEvent.FilterChanged}, use `convertFilterChangedToUpdateFiltersPayload`
4126
+ * to convert its payload into the shape expected here.
4047
4127
  * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
4048
4128
  */
4049
4129
  HostEvent["UpdateFilters"] = "updateFilters";
4050
4130
  /**
4051
4131
  * Get tab details for the current Liveboard.
4132
+ * Payload: none.
4133
+ * Response: {@link GetTabsResponse}.
4052
4134
  * @example
4053
4135
  * ```js
4054
4136
  * liveboardEmbed.trigger(HostEvent.GetTabs).then((tabDetails) => {
@@ -4074,6 +4156,8 @@
4074
4156
  /**
4075
4157
  * Get group details for the current Liveboard.
4076
4158
  * Mirrors {@link HostEvent.GetTabs} for filter/parameter groups.
4159
+ * Payload: none.
4160
+ * Response: {@link GetGroupsResponse}.
4077
4161
  * @example
4078
4162
  * ```js
4079
4163
  * liveboardEmbed.trigger(HostEvent.GetGroups).then((groupDetails) => {
@@ -4098,6 +4182,7 @@
4098
4182
  HostEvent["GetGroups"] = "getGroups";
4099
4183
  /**
4100
4184
  * Set the visible tabs on a Liveboard.
4185
+ * Payload: `string[]`.
4101
4186
  * @param - an array of ids of tabs to show, the IDs not passed
4102
4187
  * will be hidden.
4103
4188
  * @example
@@ -4120,6 +4205,7 @@
4120
4205
  HostEvent["SetVisibleTabs"] = "SetPinboardVisibleTabs";
4121
4206
  /**
4122
4207
  * Set the hidden tabs on a Liveboard.
4208
+ * Payload: `string[]`.
4123
4209
  * @param - an array of the IDs of the tabs to hide.
4124
4210
  * The IDs not passed will be shown.
4125
4211
  * @example
@@ -4148,6 +4234,8 @@
4148
4234
  * `getAnswerService()` method on the embed instance to get an AnswerService
4149
4235
  * object that provides a more convenient interface for working with answers.
4150
4236
  *
4237
+ * Payload: {@link GetAnswerSessionRequest}.
4238
+ * Response: {@link GetAnswerSessionResponse}.
4151
4239
  * @example
4152
4240
  * ```js
4153
4241
  * // Preferred way to get an AnswerService
@@ -4175,6 +4263,7 @@
4175
4263
  HostEvent["GetAnswerSession"] = "getAnswerSession";
4176
4264
  /**
4177
4265
  * Trigger the *Ask Sage* action for visualizations
4266
+ * Payload: {@link RequiredVizRequest}.
4178
4267
  * @example
4179
4268
  * ```js
4180
4269
  * liveboardEmbed.trigger(HostEvent.AskSage,
@@ -4186,6 +4275,7 @@
4186
4275
  /**
4187
4276
  * Trigger cross filter update action on a Liveboard.
4188
4277
  *
4278
+ * Payload: {@link UpdateCrossFilterRequest}.
4189
4279
  * @example
4190
4280
  * ```js
4191
4281
  * liveboardEmbed.trigger(HostEvent.UpdateCrossFilter, {
@@ -4201,7 +4291,9 @@
4201
4291
  HostEvent["UpdateCrossFilter"] = "UpdateCrossFilter";
4202
4292
  /**
4203
4293
  * Trigger reset action for a personalized Liveboard view.
4204
- * This event is deprecated. Use {@link HostEvent.ResetLiveboardPersonalizedView} instead.
4294
+ * This event is deprecated.
4295
+ * Use {@link HostEvent.ResetLiveboardPersonalizedView} instead.
4296
+ * Payload: none.
4205
4297
  * @example
4206
4298
  * ```js
4207
4299
  * liveboardEmbed.trigger(HostEvent.ResetLiveboardPersonalisedView);
@@ -4222,6 +4314,7 @@
4222
4314
  /**
4223
4315
  * Triggers an action to update Parameter values on embedded
4224
4316
  * Answers, Liveboard, and Spotter answer in Edit mode.
4317
+ * Payload: {@link RuntimeParameter}[].
4225
4318
  * @param - Includes the following keys for each item:
4226
4319
  * - `name`: Name of the parameter.
4227
4320
  * - `value`: The value to set for the parameter.
@@ -4279,6 +4372,8 @@
4279
4372
  * whole Liveboard.
4280
4373
  * The `applicability` attribute is available from SDK: 1.53.0 |
4281
4374
  * ThoughtSpot: 26.10.0.cl.
4375
+ * Payload: none.
4376
+ * Response: {@link GetParametersResponse}.
4282
4377
  * @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
4283
4378
  * ```js
4284
4379
  * liveboardEmbed.trigger(HostEvent.GetParameters).then((parameter) => {
@@ -4316,6 +4411,7 @@
4316
4411
  * ```js
4317
4412
  * liveboardEmbed.trigger(HostEvent.UpdatePersonalisedView, {viewId: '1234'})
4318
4413
  * ```
4414
+ * Payload: {@link PersonalisedViewRequest} (`viewId` only).
4319
4415
  * @example
4320
4416
  * ```js
4321
4417
  * // Update personalized view from liveboard context
@@ -4348,6 +4444,7 @@
4348
4444
  * If neither is provided, the Liveboard resets to the original/default view.
4349
4445
  * When a `viewName` is provided and multiple views share
4350
4446
  * the same name, the first match is selected.
4447
+ * Payload: {@link PersonalisedViewRequest}.
4351
4448
  * @example
4352
4449
  * ```js
4353
4450
  * liveboardEmbed.trigger(
@@ -4391,6 +4488,8 @@
4391
4488
  * If no parameters are specified, the save action is
4392
4489
  * triggered with a modal to prompt users to
4393
4490
  * add a name and description for the Answer.
4491
+ * Payload: {@link SaveAnswerRequest}.
4492
+ * Response: {@link SaveAnswerResponse}.
4394
4493
  * @param - Includes the following keys:
4395
4494
  * - `vizId`: Refers to the Answer ID in Spotter embed and is **required** in Spotter
4396
4495
  * embed.
@@ -4476,6 +4575,7 @@
4476
4575
  /**
4477
4576
  * Triggers a search operation with the search tokens specified in
4478
4577
  * the search query string in spotter embed.
4578
+ * Payload: {@link SpotterSearchRequest}.
4479
4579
  * @param - Includes the following keys:
4480
4580
  * - `query`: Text string in Natural Language format.
4481
4581
  * - `executeSearch`: Boolean to execute search and update search query.
@@ -4500,6 +4600,7 @@
4500
4600
  HostEvent["SpotterSearch"] = "SpotterSearch";
4501
4601
  /**
4502
4602
  * Edits the last prompt in spotter embed.
4603
+ * Payload: `string`.
4503
4604
  * @param - `query`: Text string
4504
4605
  * @example
4505
4606
  * ```js
@@ -4516,6 +4617,7 @@
4516
4617
  HostEvent["EditLastPrompt"] = "EditLastPrompt";
4517
4618
  /**
4518
4619
  * Opens the data source preview modal in Spotter Embed.
4620
+ * Payload: none.
4519
4621
  * @example
4520
4622
  * ```js
4521
4623
  * spotterEmbed.trigger(HostEvent.PreviewSpotterData);
@@ -4551,6 +4653,7 @@
4551
4653
  HostEvent["DataModelInstructions"] = "DataModelInstructions";
4552
4654
  /**
4553
4655
  * Resets the Spotter Embed Conversation.
4656
+ * Payload: none.
4554
4657
  * @example
4555
4658
  * ```js
4556
4659
  * spotterEmbed.trigger(HostEvent.ResetSpotterConversation);
@@ -4563,6 +4666,7 @@
4563
4666
  * `conversationId` is **mandatory** — you must pass the id of the
4564
4667
  * conversation to share. Also no-op when sharing is disabled
4565
4668
  * (enableShareConversation off) or when already in the read-only shared view.
4669
+ * Payload: {@link ConversationScopedRequest}.
4566
4670
  * @example
4567
4671
  * ```js
4568
4672
  * spotterEmbed.trigger(HostEvent.ShareSpotterConversation, { conversationId: 'abc' });
@@ -4572,6 +4676,7 @@
4572
4676
  HostEvent["ShareSpotterConversation"] = "ShareSpotterConversation";
4573
4677
  /**
4574
4678
  * Closes the Spotter share-conversation modal. No-op if none is open.
4679
+ * Payload: none.
4575
4680
  * @example
4576
4681
  * ```js
4577
4682
  * spotterEmbed.trigger(HostEvent.CloseSpotterShareConversation);
@@ -4581,6 +4686,7 @@
4581
4686
  HostEvent["CloseSpotterShareConversation"] = "CloseSpotterShareConversation";
4582
4687
  /**
4583
4688
  * Exits the read-only shared-conversation view.
4689
+ * Payload: none.
4584
4690
  * @example
4585
4691
  * ```js
4586
4692
  * spotterEmbed.trigger(HostEvent.ExitSpotterSharedConversation);
@@ -4590,6 +4696,7 @@
4590
4696
  HostEvent["ExitSpotterSharedConversation"] = "ExitSpotterSharedConversation";
4591
4697
  /**
4592
4698
  * Deletes the last prompt in spotter embed.
4699
+ * Payload: none.
4593
4700
  * @example
4594
4701
  * ```js
4595
4702
  * spotterEmbed.trigger(HostEvent.DeleteLastPrompt);
@@ -4599,6 +4706,7 @@
4599
4706
  HostEvent["DeleteLastPrompt"] = "DeleteLastPrompt";
4600
4707
  /**
4601
4708
  * Toggle the visualization to chart or table view.
4709
+ * Payload: {@link RequiredVizRequest}.
4602
4710
  * @param - `vizId ` refers to the Visualization ID in Spotter embed and is required.
4603
4711
  * @example
4604
4712
  * ```js
@@ -4637,6 +4745,7 @@
4637
4745
  HostEvent["VisibleEmbedCoordinates"] = "visibleEmbedCoordinates";
4638
4746
  /**
4639
4747
  * Trigger the *Spotter* action for visualizations present on the liveboard's vizzes.
4748
+ * Payload: {@link RequiredVizRequest}.
4640
4749
  * @param - `vizId` refers to the Visualization ID in Spotter embed and is required.
4641
4750
  * @example
4642
4751
  * ```js
@@ -4698,6 +4807,7 @@
4698
4807
  * instance. Contact your admin or ThoughtSpot Support to enable chat history on your
4699
4808
  * instance.
4700
4809
  *
4810
+ * Payload: {@link ConversationScopedRequest}.
4701
4811
  * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
4702
4812
  * @example
4703
4813
  * ```js
@@ -4715,6 +4825,7 @@
4715
4825
  * instance. Contact your admin or ThoughtSpot Support to enable chat history on your
4716
4826
  * instance.
4717
4827
  *
4828
+ * Payload: {@link ConversationScopedRequest}.
4718
4829
  * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
4719
4830
  * @example
4720
4831
  * ```js
@@ -4739,6 +4850,7 @@
4739
4850
  * Trigger the **Send Test Email** action in the Liveboard schedule modal.
4740
4851
  * Sends a test schedule email to self or all recipients.
4741
4852
  * Requires `isSendNowLiveboardSchedulingEnabled` to be enabled.
4853
+ * Payload: {@link ScheduleEmailRequest}.
4742
4854
  * @example
4743
4855
  * ```js
4744
4856
  * liveboardEmbed.trigger(HostEvent.SendTestScheduleEmail, {
@@ -4757,6 +4869,7 @@
4757
4869
  HostEvent["SendTestScheduleEmail"] = "sendTestScheduleEmail";
4758
4870
  /**
4759
4871
  * Sends a user message (prompt) to the SpotterViz panel programmatically.
4872
+ * Payload: `{ query: string }`.
4760
4873
  * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
4761
4874
  * @param query - the prompt text to send.
4762
4875
  * @example
@@ -4769,6 +4882,7 @@
4769
4882
  HostEvent["SpotterVizSendUserMessage"] = "SpotterVizSendUserMessage";
4770
4883
  /**
4771
4884
  * Initializes a new SpotterViz conversation.
4885
+ * Payload: none.
4772
4886
  * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
4773
4887
  * @example
4774
4888
  * ```js
@@ -4778,6 +4892,7 @@
4778
4892
  HostEvent["InitSpotterVizConversation"] = "InitSpotterVizConversation";
4779
4893
  /**
4780
4894
  * Opens the SpotterViz panel.
4895
+ * Payload: none.
4781
4896
  * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
4782
4897
  * @example
4783
4898
  * ```js
@@ -4787,6 +4902,7 @@
4787
4902
  HostEvent["OpenSpotterVizPanel"] = "OpenSpotterVizPanel";
4788
4903
  /**
4789
4904
  * Closes the SpotterViz panel.
4905
+ * Payload: none.
4790
4906
  * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
4791
4907
  * @example
4792
4908
  * ```js
@@ -4797,6 +4913,7 @@
4797
4913
  /**
4798
4914
  * Clears browser cache and fetches new data for liveboard ChartViz Containers.
4799
4915
  * Requires `enableLiveboardDataCache` to be enabled.
4916
+ * Payload: {@link ScheduleEmailRequest}.
4800
4917
  * @example
4801
4918
  * ```js
4802
4919
  * liveboardEmbed.trigger(HostEvent.RefreshLiveboardBrowserCache);
@@ -4992,8 +5109,8 @@
4992
5109
  Param["IsStarterPromptsEnabled"] = "enableStarterPrompts";
4993
5110
  Param["UpdatedSpotterExperience"] = "updatedSpotterExperience";
4994
5111
  Param["SpotterDataSources"] = "spotterDataSources";
4995
- Param["AnalystId"] = "analystId";
4996
5112
  Param["OpenSpotterOnLiveboardByDefault"] = "openSpotterOnLiveboardByDefault";
5113
+ Param["ShowAnswerEditPanel"] = "showAnswerEditPanel";
4997
5114
  })(Param || (Param = {}));
4998
5115
  /**
4999
5116
  * ThoughtSpot application pages include actions and menu commands
@@ -6998,6 +7115,237 @@
6998
7115
  * ```
6999
7116
  */
7000
7117
  Action["SpotterOnLiveboard"] = "spotterOnLiveboard";
7118
+ /**
7119
+ * Controls the visibility and disabled state of the "Chart Type" menu item
7120
+ * in Chart Settings V2.
7121
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
7122
+ * @example
7123
+ * ```js
7124
+ * {
7125
+ * hiddenActions: [Action.ChartTypeSettings],
7126
+ * disabledActions: [Action.ChartTypeSettings],
7127
+ * }
7128
+ * ```
7129
+ */
7130
+ Action["ChartTypeSettings"] = "CHART_TYPE";
7131
+ /**
7132
+ * Controls the visibility and disabled state of the "Layout" menu item
7133
+ * in Chart Settings V2.
7134
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
7135
+ * @example
7136
+ * ```js
7137
+ * {
7138
+ * hiddenActions: [Action.LayoutSettings],
7139
+ * disabledActions: [Action.LayoutSettings],
7140
+ * }
7141
+ * ```
7142
+ */
7143
+ Action["LayoutSettings"] = "LAYOUT";
7144
+ /**
7145
+ * Controls the visibility and disabled state of the "Column" menu item
7146
+ * in Chart Settings V2.
7147
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
7148
+ * @example
7149
+ * ```js
7150
+ * {
7151
+ * hiddenActions: [Action.ColumnSettings],
7152
+ * disabledActions: [Action.ColumnSettings],
7153
+ * }
7154
+ * ```
7155
+ */
7156
+ Action["ColumnSettings"] = "COLUMN";
7157
+ /**
7158
+ * Controls the visibility and disabled state of the "Axis" menu item
7159
+ * in Chart Settings V2.
7160
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
7161
+ * @example
7162
+ * ```js
7163
+ * {
7164
+ * hiddenActions: [Action.AxisSettings],
7165
+ * disabledActions: [Action.AxisSettings],
7166
+ * }
7167
+ * ```
7168
+ */
7169
+ Action["AxisSettings"] = "AXIS";
7170
+ /**
7171
+ * Controls the visibility and disabled state of the "Data Label" menu item
7172
+ * in Chart Settings V2.
7173
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
7174
+ * @example
7175
+ * ```js
7176
+ * {
7177
+ * hiddenActions: [Action.DataLabelSettings],
7178
+ * disabledActions: [Action.DataLabelSettings],
7179
+ * }
7180
+ * ```
7181
+ */
7182
+ Action["DataLabelSettings"] = "DATA_LABEL";
7183
+ /**
7184
+ * Controls the visibility and disabled state of the "Tooltip" menu item
7185
+ * in Chart Settings V2.
7186
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
7187
+ * @example
7188
+ * ```js
7189
+ * {
7190
+ * hiddenActions: [Action.TooltipSettings],
7191
+ * disabledActions: [Action.TooltipSettings],
7192
+ * }
7193
+ * ```
7194
+ */
7195
+ Action["TooltipSettings"] = "TOOLTIP";
7196
+ /**
7197
+ * Controls the visibility and disabled state of the "Legend" menu item
7198
+ * in Chart Settings V2.
7199
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
7200
+ * @example
7201
+ * ```js
7202
+ * {
7203
+ * hiddenActions: [Action.LegendSettings],
7204
+ * disabledActions: [Action.LegendSettings],
7205
+ * }
7206
+ * ```
7207
+ */
7208
+ Action["LegendSettings"] = "LEGEND";
7209
+ /**
7210
+ * Controls the visibility and disabled state of the "Display" menu item
7211
+ * in Chart Settings V2.
7212
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
7213
+ * @example
7214
+ * ```js
7215
+ * {
7216
+ * hiddenActions: [Action.DisplaySettings],
7217
+ * disabledActions: [Action.DisplaySettings],
7218
+ * }
7219
+ * ```
7220
+ */
7221
+ Action["DisplaySettings"] = "DISPLAY";
7222
+ /**
7223
+ * Controls the visibility and disabled state of the "Query Details" menu
7224
+ * item in Chart Settings V2.
7225
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
7226
+ * @example
7227
+ * ```js
7228
+ * {
7229
+ * hiddenActions: [Action.QuerySettings],
7230
+ * disabledActions: [Action.QuerySettings],
7231
+ * }
7232
+ * ```
7233
+ */
7234
+ Action["QuerySettings"] = "QUERY_DETAILS";
7235
+ /**
7236
+ * Controls the visibility and disabled state of the "Custom Action" menu
7237
+ * item in Chart Settings V2.
7238
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
7239
+ * @example
7240
+ * ```js
7241
+ * {
7242
+ * hiddenActions: [Action.CustomSettings],
7243
+ * disabledActions: [Action.CustomSettings],
7244
+ * }
7245
+ * ```
7246
+ */
7247
+ Action["CustomSettings"] = "CUSTOM_ACTION";
7248
+ /**
7249
+ * Controls the visibility and disabled state of the "Muze AI" menu item
7250
+ * in Chart Settings V2.
7251
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
7252
+ * @example
7253
+ * ```js
7254
+ * {
7255
+ * hiddenActions: [Action.MuzeAiSettings],
7256
+ * disabledActions: [Action.MuzeAiSettings],
7257
+ * }
7258
+ * ```
7259
+ */
7260
+ Action["MuzeAiSettings"] = "MUZE_AI";
7261
+ /**
7262
+ * Controls the visibility and disabled state of the "R Analysis" menu item
7263
+ * in Chart Settings V2.
7264
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
7265
+ * @example
7266
+ * ```js
7267
+ * {
7268
+ * hiddenActions: [Action.RAnalysisSettings],
7269
+ * disabledActions: [Action.RAnalysisSettings],
7270
+ * }
7271
+ * ```
7272
+ */
7273
+ Action["RAnalysisSettings"] = "R_ANALYSIS";
7274
+ /**
7275
+ * Controls the visibility and disabled state of the "Add to Collection" menu item.
7276
+ * @version SDK: 1.52.1 | ThoughtSpot Cloud: 26.5.0.cl
7277
+ * @example
7278
+ * ```js
7279
+ * {
7280
+ * hiddenActions: [Action.AddToCollection],
7281
+ * disabledActions: [Action.AddToCollection],
7282
+ * }
7283
+ * ```
7284
+ */
7285
+ Action["AddToCollection"] = "addToCollection";
7286
+ /**
7287
+ * Controls the visibility and disabled state of the "Create Collection" button.
7288
+ * @version SDK: 1.52.1 | ThoughtSpot Cloud: 26.5.0.cl
7289
+ * @example
7290
+ * ```js
7291
+ * {
7292
+ * hiddenActions: [Action.CreateCollection],
7293
+ * disabledActions: [Action.CreateCollection],
7294
+ * }
7295
+ * ```
7296
+ */
7297
+ Action["CreateCollection"] = "createCollection";
7298
+ /**
7299
+ * Controls the visibility and disabled state of the "Move" menu item in a
7300
+ * Collection.
7301
+ * @version SDK: 1.52.1 | ThoughtSpot Cloud: 26.5.0.cl
7302
+ * @example
7303
+ * ```js
7304
+ * {
7305
+ * hiddenActions: [Action.MoveToCollection],
7306
+ * disabledActions: [Action.MoveToCollection],
7307
+ * }
7308
+ * ```
7309
+ */
7310
+ Action["MoveToCollection"] = "moveToCollection";
7311
+ /**
7312
+ * Controls the visibility and disabled state of the "Remove" menu item in a
7313
+ * Collection.
7314
+ * @version SDK: 1.52.1 | ThoughtSpot Cloud: 26.5.0.cl
7315
+ * @example
7316
+ * ```js
7317
+ * {
7318
+ * hiddenActions: [Action.RemoveFromCollection],
7319
+ * disabledActions: [Action.RemoveFromCollection],
7320
+ * }
7321
+ * ```
7322
+ */
7323
+ Action["RemoveFromCollection"] = "removeFromCollection";
7324
+ /**
7325
+ * Controls the visibility and disabled state of the "Delete" menu item for a
7326
+ * Collection.
7327
+ * @version SDK: 1.52.1 | ThoughtSpot Cloud: 26.5.0.cl
7328
+ * @example
7329
+ * ```js
7330
+ * {
7331
+ * hiddenActions: [Action.DeleteCollection],
7332
+ * disabledActions: [Action.DeleteCollection],
7333
+ * }
7334
+ * ```
7335
+ */
7336
+ Action["DeleteCollection"] = "deleteCollection";
7337
+ /**
7338
+ * Controls the visibility of the "Customize homepage" button on the
7339
+ * embedded home page.
7340
+ * @version SDK: 1.55.0 | ThoughtSpot Cloud: 26.12.0.cl
7341
+ * @example
7342
+ * ```js
7343
+ * {
7344
+ * hiddenActions: [Action.CustomizeHomepage],
7345
+ * }
7346
+ * ```
7347
+ */
7348
+ Action["CustomizeHomepage"] = "customizeHomepage";
7001
7349
  })(exports.Action || (exports.Action = {}));
7002
7350
  var PrefetchFeatures;
7003
7351
  (function (PrefetchFeatures) {
@@ -7502,7 +7850,7 @@
7502
7850
  TableContentDensity["Compact"] = "COMPACT";
7503
7851
  })(TableContentDensity || (TableContentDensity = {}));
7504
7852
 
7505
- var version$1="1.52.0";var pkg = {version:version$1};
7853
+ var version$1="1.52.2-beta";var pkg = {version:version$1};
7506
7854
 
7507
7855
  const { version } = pkg;
7508
7856
 
@@ -7606,7 +7954,7 @@
7606
7954
  SSR_ENVIRONMENT_ERROR: 'SSR environment detected. This function cannot be called in SSR environment.',
7607
7955
  UPDATE_PARAMS_FAILED: 'Failed to update embed parameters',
7608
7956
  INVALID_SPOTTER_DOCUMENTATION_URL: 'Invalid spotterDocumentationUrl. Please provide a valid http or https URL.',
7609
- UPDATEFILTERS_INVALID_PAYLOAD: 'UpdateFilters requires a valid filter or filters array. Expected: { filter: { column, oper, values } } or { filters: [{ column, oper, values }, ...] }',
7957
+ UPDATEFILTERS_INVALID_PAYLOAD: 'UpdateFilters requires a valid filter or filters array. Expected: { filter: { columnName, operator, values } } or { filters: [{ columnName, operator, values }, ...] }',
7610
7958
  DRILLDOWN_INVALID_PAYLOAD: 'DrillDown requires a valid points object. Expected: { points: { clickedPoint?, selectedPoints? }, autoDrillDown?, vizId? }',
7611
7959
  UPDATEPARAMETERS_INVALID_PAYLOAD: 'UpdateParameters received an invalid applicability. Expected: { level: LIVEBOARD | TAB | GROUP, targetId } where targetId is required for TAB and GROUP levels',
7612
7960
  };
@@ -8255,6 +8603,43 @@
8255
8603
  if (value !== undefined) {
8256
8604
  queryParams[param] = asBoolean ? !!value : value;
8257
8605
  }
8606
+ };
8607
+ /**
8608
+ * Calculates the element center for the currently visible viewport of the
8609
+ * element, using the scroll position of the host app, the offsetTop of the
8610
+ * element in the host app, and the viewport height of the tab.
8611
+ *
8612
+ * The returned keys are sent to the ThoughtSpot app over postMessage, so they
8613
+ * are named after the iframe and must not be renamed.
8614
+ * @param element The element to measure
8615
+ * @returns The element center within the visible viewport, the element height,
8616
+ * and the viewport height.
8617
+ */
8618
+ const calculateElementCenter = (element) => {
8619
+ const offsetTopClient = getOffsetTop(element);
8620
+ const scrollTopClient = window.scrollY;
8621
+ const viewPortHeight = window.innerHeight;
8622
+ const iframeHeight = element.offsetHeight;
8623
+ const iframeScrolled = scrollTopClient - offsetTopClient;
8624
+ let iframeVisibleViewPort;
8625
+ let iframeOffset;
8626
+ if (iframeScrolled < 0) {
8627
+ iframeVisibleViewPort = viewPortHeight - (offsetTopClient - scrollTopClient);
8628
+ iframeVisibleViewPort = Math.min(iframeHeight, iframeVisibleViewPort);
8629
+ iframeOffset = 0;
8630
+ }
8631
+ else {
8632
+ iframeVisibleViewPort = Math.min(iframeHeight - iframeScrolled, viewPortHeight);
8633
+ iframeOffset = iframeScrolled;
8634
+ }
8635
+ const iframeCenter = iframeOffset + iframeVisibleViewPort / 2;
8636
+ return {
8637
+ iframeCenter,
8638
+ iframeScrolled,
8639
+ iframeHeight,
8640
+ viewPortHeight,
8641
+ iframeVisibleViewPort,
8642
+ };
8258
8643
  };
8259
8644
 
8260
8645
  /** Used for built-in method references. */
@@ -9165,7 +9550,110 @@
9165
9550
  UIPassthroughEvent["GetTabs"] = "getTabs";
9166
9551
  UIPassthroughEvent["GetGroups"] = "getGroups";
9167
9552
  UIPassthroughEvent["GetExportRequestForCurrentPinboard"] = "getExportRequestForCurrentPinboard";
9168
- })(UIPassthroughEvent || (UIPassthroughEvent = {}));
9553
+ })(UIPassthroughEvent || (UIPassthroughEvent = {}));
9554
+ // NOTE: HostEventRequest / HostEventResponse / TriggerPayload / TriggerResponse
9555
+ // live in the sibling ./host-event-contracts, which layers the
9556
+ // HostEventRequestMap on top of the UI-passthrough mapping above.
9557
+ // The former 2-tier definitions that lived here were superseded and removed.
9558
+
9559
+ /**
9560
+ * Copyright (c) 2026
9561
+ *
9562
+ * Dedicated transport layer for SDK <-> ThoughtSpot iframe messaging.
9563
+ *
9564
+ * Owns the postMessage/MessageChannel mechanics and origin resolution so
9565
+ * that embed/business logic (ts-embed.ts, hostEventClient) never touches
9566
+ * the wire directly. The wire format is unchanged from the historical
9567
+ * implementation — this layer is a pure structural extraction.
9568
+ */
9569
+ /**
9570
+ * Default time to wait for the app to respond to a request-response
9571
+ * message before giving up and reclaiming the channel.
9572
+ */
9573
+ const MESSAGE_RESPONSE_TIMEOUT = 30000;
9574
+ /**
9575
+ * Single implementation of origin resolution for the embedded app.
9576
+ * Returns the origin (scheme://host[:port]) for a ThoughtSpot host URL,
9577
+ * or null when it cannot be parsed.
9578
+ * @param thoughtSpotHost
9579
+ */
9580
+ const resolveMessageOrigin = (thoughtSpotHost) => {
9581
+ try {
9582
+ return new URL(thoughtSpotHost).origin;
9583
+ }
9584
+ catch (e) {
9585
+ return null;
9586
+ }
9587
+ };
9588
+ /**
9589
+ * Validates that an inbound window message came from the embedded
9590
+ * ThoughtSpot app: the source window must be the embed iframe's window and,
9591
+ * when the expected origin is resolvable, the message origin must match it.
9592
+ *
9593
+ * Fails open (returns true) on the origin check when the expected origin
9594
+ * cannot be resolved, to avoid breaking unconventional-but-working setups;
9595
+ * a warning is logged on mismatch either way.
9596
+ * @param event The message event received on window.
9597
+ * @param iFrame The embed iframe the message should originate from.
9598
+ * @param thoughtSpotHost The configured ThoughtSpot host.
9599
+ */
9600
+ const isMessageFromIframe = (event, iFrame, thoughtSpotHost) => {
9601
+ if (event.source !== (iFrame === null || iFrame === void 0 ? void 0 : iFrame.contentWindow)) {
9602
+ return false;
9603
+ }
9604
+ const expectedOrigin = resolveMessageOrigin(thoughtSpotHost);
9605
+ if (expectedOrigin && event.origin && event.origin !== expectedOrigin) {
9606
+ logger$3.warn(`Dropped message from unexpected origin ${event.origin}; expected ${expectedOrigin}`);
9607
+ return false;
9608
+ }
9609
+ return true;
9610
+ };
9611
+ /**
9612
+ * Posts a one-way message to the embedded app's iframe, optionally
9613
+ * transferring a MessageChannel port for the response.
9614
+ * @param iFrame
9615
+ * @param message
9616
+ * @param thoughtSpotHost Used as the postMessage targetOrigin.
9617
+ * @param channel
9618
+ */
9619
+ const postMessageToIframe = (iFrame, message, thoughtSpotHost, channel) => {
9620
+ var _a;
9621
+ return (_a = iFrame.contentWindow) === null || _a === void 0 ? void 0 : _a.postMessage(message, thoughtSpotHost, channel ? [channel.port2] : []);
9622
+ };
9623
+ /**
9624
+ * Sends a request-response message to the embedded app over a dedicated
9625
+ * MessageChannel. Resolves with the response payload; rejects when the app
9626
+ * responds with an error; resolves with a timeout Error object when no
9627
+ * response arrives in time (historical behavior, preserved for backward
9628
+ * compatibility).
9629
+ * @param iFrame
9630
+ * @param message
9631
+ * @param thoughtSpotHost
9632
+ * @param timeoutMs
9633
+ */
9634
+ function sendMessageWithResponse(iFrame, message, thoughtSpotHost, timeoutMs = MESSAGE_RESPONSE_TIMEOUT) {
9635
+ return new Promise((res, rej) => {
9636
+ const channel = new MessageChannel();
9637
+ // Close the messageChannel and resolve the promise if timeout.
9638
+ const timeoutId = setTimeout(() => {
9639
+ channel.port1.close();
9640
+ res(new Error(ERROR_MESSAGE.TRIGGER_TIMED_OUT));
9641
+ }, timeoutMs);
9642
+ channel.port1.onmessage = ({ data: responseData }) => {
9643
+ var _a;
9644
+ clearTimeout(timeoutId);
9645
+ channel.port1.close();
9646
+ 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);
9647
+ if (error) {
9648
+ rej(error);
9649
+ }
9650
+ else {
9651
+ res(responseData);
9652
+ }
9653
+ };
9654
+ postMessageToIframe(iFrame, message, thoughtSpotHost, channel);
9655
+ });
9656
+ }
9169
9657
 
9170
9658
  const EndPoints = {
9171
9659
  AUTH_VERIFICATION: '/callosum/v1/session/info',
@@ -20375,23 +20863,11 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
20375
20863
  iFrame.src = src;
20376
20864
  }, 100);
20377
20865
  };
20866
+ const TRIGGER_TIMEOUT = MESSAGE_RESPONSE_TIMEOUT;
20378
20867
  /**
20379
- * Post iframe message.
20380
- * @param iFrame
20381
- * @param message
20382
- * @param message.type
20383
- * @param message.data
20384
- * @param message.context
20385
- * @param thoughtSpotHost
20386
- * @param channel
20387
- */
20388
- function postIframeMessage(iFrame, message, thoughtSpotHost, channel) {
20389
- var _a;
20390
- return (_a = iFrame.contentWindow) === null || _a === void 0 ? void 0 : _a.postMessage(message, thoughtSpotHost, [channel === null || channel === void 0 ? void 0 : channel.port2]);
20391
- }
20392
- const TRIGGER_TIMEOUT = 30000;
20393
- /**
20394
- *
20868
+ * Processes a host event trigger: handles SDK-local events (Reload,
20869
+ * Present) and forwards everything else to the embedded app over the
20870
+ * iframe transport.
20395
20871
  * @param iFrame
20396
20872
  * @param messageType
20397
20873
  * @param thoughtSpotHost
@@ -20399,42 +20875,22 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
20399
20875
  * @param context
20400
20876
  */
20401
20877
  function processTrigger(iFrame, messageType, thoughtSpotHost, data, context) {
20402
- return new Promise((res, rej) => {
20403
- var _a;
20404
- if (messageType === exports.HostEvent.Reload) {
20405
- reload(iFrame);
20406
- return res(null);
20407
- }
20408
- if (messageType === exports.HostEvent.Present) {
20409
- const embedConfig = getEmbedConfig();
20410
- const disableFullscreenPresentation = (_a = embedConfig === null || embedConfig === void 0 ? void 0 : embedConfig.disableFullscreenPresentation) !== null && _a !== void 0 ? _a : true;
20411
- if (!disableFullscreenPresentation) {
20412
- handlePresentEvent(iFrame);
20413
- }
20414
- else {
20415
- logger$3.warn('Fullscreen presentation mode is disabled. Set disableFullscreenPresentation: false to enable this feature.');
20416
- }
20878
+ var _a;
20879
+ if (messageType === exports.HostEvent.Reload) {
20880
+ reload(iFrame);
20881
+ return Promise.resolve(null);
20882
+ }
20883
+ if (messageType === exports.HostEvent.Present) {
20884
+ const embedConfig = getEmbedConfig();
20885
+ const disableFullscreenPresentation = (_a = embedConfig === null || embedConfig === void 0 ? void 0 : embedConfig.disableFullscreenPresentation) !== null && _a !== void 0 ? _a : true;
20886
+ if (!disableFullscreenPresentation) {
20887
+ handlePresentEvent(iFrame);
20417
20888
  }
20418
- const channel = new MessageChannel();
20419
- // Close the messageChannel and resolve the promise if timeout.
20420
- const timeoutId = setTimeout(() => {
20421
- channel.port1.close();
20422
- res(new Error(ERROR_MESSAGE.TRIGGER_TIMED_OUT));
20423
- }, TRIGGER_TIMEOUT);
20424
- channel.port1.onmessage = ({ data: responseData }) => {
20425
- var _a;
20426
- clearTimeout(timeoutId);
20427
- channel.port1.close();
20428
- 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);
20429
- if (error) {
20430
- rej(error);
20431
- }
20432
- else {
20433
- res(responseData);
20434
- }
20435
- };
20436
- return postIframeMessage(iFrame, { type: messageType, data, context }, thoughtSpotHost, channel);
20437
- });
20889
+ else {
20890
+ logger$3.warn('Fullscreen presentation mode is disabled. Set disableFullscreenPresentation: false to enable this feature.');
20891
+ }
20892
+ }
20893
+ return sendMessageWithResponse(iFrame, { type: messageType, data, context }, thoughtSpotHost, TRIGGER_TIMEOUT);
20438
20894
  }
20439
20895
 
20440
20896
  /**
@@ -20925,7 +21381,8 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
20925
21381
  const isValidApplicability = (a) => {
20926
21382
  if (isUndefined_1(a))
20927
21383
  return true;
20928
- // targetId is not required at LIVEBOARD level, since the filter applies to the whole Liveboard
21384
+ // targetId is not required at LIVEBOARD level, since the filter applies to
21385
+ // the whole Liveboard
20929
21386
  return isPlainObject_1(a)
20930
21387
  && Object.values(ApplicabilityLevel).includes(a.level)
20931
21388
  && (a.level === ApplicabilityLevel.Liveboard || (isString_1(a.targetId) && a.targetId.trim().length > 0));
@@ -20944,8 +21401,52 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
20944
21401
  const hasValidFilters = Array.isArray(payload.filters) && payload.filters.length > 0 && payload.filters.every(isValidFilter);
20945
21402
  return !!(hasValidFilter || hasValidFilters);
20946
21403
  }
21404
+ /**
21405
+ * Rewrites one filter's `columnName`/`operator` to `column`/`oper`.
21406
+ *
21407
+ * Callers may use either spelling: `columnName`/`operator` match
21408
+ * {@link RuntimeFilter} and the `EmbedEvent.FilterChanged` payload, so a
21409
+ * converted payload can be replayed as-is. But the payload is forwarded to the
21410
+ * embedded app unchanged, and only `column`/`oper` are known to be understood
21411
+ * there - so the alias must be swapped here, or it would pass validation and
21412
+ * then be silently ignored.
21413
+ *
21414
+ * If a caller supplies both spellings of a field - which TypeScript rejects,
21415
+ * but JavaScript callers can still do - the documented `columnName`/`operator`
21416
+ * wins. Deferring to the deprecated spelling would quietly discard the value
21417
+ * the rest of the SDK tells people to use.
21418
+ * @param filter One entry from the UpdateFilters payload.
21419
+ */
21420
+ function resolveFilterAliases(filter) {
21421
+ var _a, _b;
21422
+ if (!isPlainObject_1(filter))
21423
+ return filter;
21424
+ const column = (_a = filter.columnName) !== null && _a !== void 0 ? _a : filter.column;
21425
+ const oper = (_b = filter.operator) !== null && _b !== void 0 ? _b : filter.oper;
21426
+ const { columnName, operator, ...rest } = filter;
21427
+ return {
21428
+ ...rest,
21429
+ ...(isUndefined_1(column) ? {} : { column }),
21430
+ ...(isUndefined_1(oper) ? {} : { oper }),
21431
+ };
21432
+ }
21433
+ /**
21434
+ * Rewrites every filter in an UpdateFilters payload to use `column`/`oper`,
21435
+ * whichever spelling the caller supplied. Call after validation.
21436
+ * @param payload The UpdateFilters host event payload.
21437
+ */
21438
+ function resolveUpdateFiltersAliases(payload) {
21439
+ if (!isPlainObject_1(payload))
21440
+ return payload;
21441
+ return {
21442
+ ...payload,
21443
+ ...(payload.filter ? { filter: resolveFilterAliases(payload.filter) } : {}),
21444
+ ...(Array.isArray(payload.filters) ? { filters: payload.filters.map(resolveFilterAliases) } : {}),
21445
+ };
21446
+ }
20947
21447
  function isValidUpdateParametersPayload(payload) {
20948
- // Only validates the applicability of each parameter (null treated as absent); the rest is forwarded as-is for backward compatibility.
21448
+ // Only validates the applicability of each parameter (null treated as
21449
+ // absent); the rest is forwarded as-is for backward compatibility.
20949
21450
  if (!Array.isArray(payload))
20950
21451
  return true;
20951
21452
  return payload.every((p) => {
@@ -20993,7 +21494,8 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
20993
21494
  /**
20994
21495
  * Maps HostEvent to its corresponding UIPassthroughEvent.
20995
21496
  * Includes both custom-handler events (Pin, SaveAnswer, UpdateFilters, DrillDown)
20996
- * and getter events (GetAnswerSession, GetFilters, etc.) that use getDataWithPassthroughFallback.
21497
+ * and getter events (GetAnswerSession, GetFilters, etc.) that use
21498
+ * getDataWithPassthroughFallback.
20997
21499
  */
20998
21500
  const PASSTHROUGH_MAP = {
20999
21501
  // Custom handlers (setters with special logic)
@@ -21143,13 +21645,22 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
21143
21645
  if (!isValidUpdateFiltersPayload(payload)) {
21144
21646
  throwUpdateFiltersValidationError();
21145
21647
  }
21146
- return this.handleHostEventWithParam(UIPassthroughEvent.UpdateFilters, payload, context);
21648
+ // The shared contract accepts both current (columnName/operator) and
21649
+ // legacy (column/oper) filter field names, but only the legacy pair is
21650
+ // understood downstream, so the payload is rewritten before it is
21651
+ // forwarded — otherwise a columnName/operator filter passes validation
21652
+ // here and is then silently ignored by the app. The cast bridges the
21653
+ // UIPassthrough FilterUpdate type, which still declares only the legacy
21654
+ // names.
21655
+ const resolvedPayload = resolveUpdateFiltersAliases(payload);
21656
+ return this.handleHostEventWithParam(UIPassthroughEvent.UpdateFilters, resolvedPayload, context);
21147
21657
  }
21148
21658
  handleUpdateParametersEvent(payload, context) {
21149
21659
  if (!isValidUpdateParametersPayload(payload)) {
21150
21660
  throwUpdateParametersValidationError();
21151
21661
  }
21152
- // UpdateParameters has no UI passthrough contract; dispatch over the legacy channel
21662
+ // UpdateParameters has no UI passthrough contract; dispatch over the
21663
+ // legacy channel
21153
21664
  return this.hostEventFallback(exports.HostEvent.UpdateParameters, payload, context);
21154
21665
  }
21155
21666
  handleDrillDownEvent(payload, context) {
@@ -21160,8 +21671,8 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
21160
21671
  }
21161
21672
  /**
21162
21673
  * Dispatches a host event using the appropriate channel:
21163
- * 1. If the embedded app supports UI passthrough for this event, use it (custom handler or getter).
21164
- * 2. Otherwise fall back to the legacy host event channel.
21674
+ * 1. If the embedded app supports UI passthrough for this event, use it (custom
21675
+ * handler or getter). 2. Otherwise fall back to the legacy host event channel.
21165
21676
  *
21166
21677
  * @param hostEvent - The host event to trigger
21167
21678
  * @param payload - Optional payload for the event
@@ -21170,7 +21681,8 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
21170
21681
  async triggerHostEvent(hostEvent, payload, context) {
21171
21682
  const customHandler = this.customHandlers[hostEvent];
21172
21683
  const passthroughEvent = PASSTHROUGH_MAP[hostEvent];
21173
- // If embedded app supports passthrough but not this event, use legacy channel
21684
+ // If embedded app supports passthrough but not this event, use legacy
21685
+ // channel
21174
21686
  const keys = passthroughEvent ? await this.getAvailableUIPassthroughKeys(context) : [];
21175
21687
  if (passthroughEvent && keys.length > 0 && !keys.includes(passthroughEvent)) {
21176
21688
  return this.hostEventFallback(hostEvent, payload, context);
@@ -21377,6 +21889,63 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
21377
21889
  */
21378
21890
  const PRERENDER_CONTAINER_ORIGINAL_POSITION_KEY = 'tsEmbedOriginalPosition';
21379
21891
  const PRERENDER_WRAPPER_ID_PREFIX = 'tsEmbed-pre-render-wrapper-';
21892
+ // The container applies UpdateEmbedParams through React state, so a delivered
21893
+ // post is not the same as the params being in effect.
21894
+ const UPDATE_EMBED_PARAMS_SETTLE_MS = 200;
21895
+ // The container ignores runtimeFilterParams/runtimeParameterParams unless
21896
+ // truthy, so null or '' leaves the previous embed's values in place. '&' is
21897
+ // truthy and parses to {}.
21898
+ const NO_RUNTIME_PARAMS = '&';
21899
+ /**
21900
+ * Query parameters that stay on the iframe `src` while config is excluded from
21901
+ * the URL, which is the default unless the embed sets the
21902
+ * `excludeConfigFromURL` additional flag to `false`. These are the parameters the
21903
+ * application shell needs before it can receive a postMessage at all: the
21904
+ * embed marker, the host application URL used to validate the message origin,
21905
+ * the SDK version, the flags that pick the authentication flow, and the
21906
+ * boot-time settings that would otherwise be applied a frame late (viewport,
21907
+ * log level, locale, formatting and org). Everything else is delivered over
21908
+ * `HostEvent.UpdateEmbedParams`.
21909
+ * @internal
21910
+ */
21911
+ const BOOTSTRAP_URL_PARAMS = new Set([
21912
+ Param.EmbedApp,
21913
+ Param.HostAppUrl,
21914
+ Param.Version,
21915
+ Param.AuthType,
21916
+ Param.AutoLogin,
21917
+ Param.DisableLoginRedirect,
21918
+ Param.ForceSAMLAutoRedirect,
21919
+ Param.cookieless,
21920
+ Param.preAuthCache,
21921
+ Param.blockNonEmbedFullAppAccess,
21922
+ Param.OverrideOrgId,
21923
+ Param.ViewPortHeight,
21924
+ Param.ViewPortWidth,
21925
+ Param.ClientLogLevel,
21926
+ Param.OverrideNativeConsole,
21927
+ Param.PendoTrackingKey,
21928
+ Param.NumberFormatLocale,
21929
+ Param.DateFormatLocale,
21930
+ Param.CurrencyFormat,
21931
+ Param.Locale,
21932
+ Param.searchEmbed,
21933
+ Param.livedBoardEmbed,
21934
+ Param.isSpotterAgentEmbed,
21935
+ Param.SpotterEnabled,
21936
+ Param.IsFullAppEmbed,
21937
+ Param.IsOnBeforeGetVizDataInterceptEnabled,
21938
+ Param.LinkOverride,
21939
+ Param.EnableLinkOverridesV2,
21940
+ Param.DisableRedirectionLinksInNewTab,
21941
+ Param.OverrideHistoryState,
21942
+ Param.ForceTable,
21943
+ Param.StringIDsUrl,
21944
+ Param.DataSources,
21945
+ Param.ExposeTranslationIDs,
21946
+ Param.IconSpriteUrl,
21947
+ Param.Tag,
21948
+ ]);
21380
21949
  /**
21381
21950
  * The event id map from v2 event names to v1 event id
21382
21951
  * v1 events are the classic embed events implemented in Blink v1
@@ -21403,6 +21972,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
21403
21972
  * The key to store the embed instance in the DOM node
21404
21973
  */
21405
21974
  this.embedNodeKey = '__tsEmbed';
21975
+ this.embedContainerLoadedKey = '__tsEmbedContainerLoaded';
21406
21976
  this.isAppInitialized = false;
21407
21977
  /**
21408
21978
  * Should we encode URL Query Params using base64 encoding which ThoughtSpot
@@ -21423,7 +21993,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
21423
21993
  const eventType = this.getEventType(event);
21424
21994
  const eventPort = this.getEventPort(event);
21425
21995
  const eventData = this.formatEventData(event, eventType);
21426
- if (event.source === this.iFrame.contentWindow) {
21996
+ if (isMessageFromIframe(event, this.iFrame, this.thoughtSpotHost)) {
21427
21997
  const processedEventData = processEventData(eventType, eventData, this.thoughtSpotHost, this.isPreRendered ? this.preRenderWrapper : this.hostElement);
21428
21998
  if (eventType === exports.EmbedEvent.ApiIntercept) {
21429
21999
  this.handleApiInterceptEvent({ eventData, eventPort });
@@ -21565,20 +22135,28 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
21565
22135
  this.createEmbedContainerHandler = (source) => () => {
21566
22136
  const processEmbedContainerReady = () => {
21567
22137
  logger$3.debug('processEmbedContainerReady');
21568
- this.isEmbedContainerLoaded = true;
22138
+ this.markEmbedContainerLoaded();
21569
22139
  this.executeEmbedContainerReadyCallbacks();
21570
22140
  };
21571
22141
  if (source === exports.EmbedEvent.AuthInit) {
21572
22142
  const AUTH_INIT_FALLBACK_DELAY = 1000;
21573
22143
  // Wait for 1 second to ensure the embed container is loaded
21574
22144
  // This is a workaround to ensure the embed container is loaded
21575
- // this is needed until all clusters have EmbedListenerReady event
22145
+ // this is needed until all clusters have EmbedListenerReady
22146
+ // event
21576
22147
  setTimeout(processEmbedContainerReady, AUTH_INIT_FALLBACK_DELAY);
21577
22148
  }
21578
22149
  else if (source === exports.EmbedEvent.EmbedListenerReady) {
21579
22150
  processEmbedContainerReady();
22151
+ if (this.isConfigExcludedFromUrl()) {
22152
+ this.triggerUpdateEmbedParams();
22153
+ }
21580
22154
  }
21581
22155
  };
22156
+ // Subclasses that navigate the pre-render on show must await this before
22157
+ // triggering Navigate. Resolves even on failure, so navigation is never
22158
+ // blocked.
22159
+ this.preRenderParamsApplied = Promise.resolve();
21582
22160
  this.hostElement = getDOMNode(domSelector);
21583
22161
  this.eventHandlerMap = new Map();
21584
22162
  this.isError = false;
@@ -21895,6 +22473,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
21895
22473
  return `${basePath}#`;
21896
22474
  }
21897
22475
  async getUpdateEmbedParamsObject() {
22476
+ var _a, _b;
21898
22477
  const queryParams = this.getEmbedParamsObject();
21899
22478
  // Values are URL-serialized (e.g. dataSources as '["guid"]'); parse
21900
22479
  // them back so the event payload matches a URL load (SCAL-334713).
@@ -21902,7 +22481,17 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
21902
22481
  queryParams[key] = deserializeParam(queryParams[key]);
21903
22482
  });
21904
22483
  const appInitData = await this.getAppInitData();
21905
- return { ...this.viewConfig, ...queryParams, ...appInitData };
22484
+ return {
22485
+ ...this.viewConfig,
22486
+ ...queryParams,
22487
+ ...appInitData,
22488
+ // A show cycle has no URL to carry these, so the payload always
22489
+ // states them — including "none", which is the case that leaks the
22490
+ // previous filters.
22491
+ runtimeFilterParams: getFilterQuery((_a = this.viewConfig.runtimeFilters) !== null && _a !== void 0 ? _a : []) || NO_RUNTIME_PARAMS,
22492
+ runtimeParameterParams: getRuntimeParameters((_b = this.viewConfig.runtimeParameters) !== null && _b !== void 0 ? _b : [])
22493
+ || NO_RUNTIME_PARAMS,
22494
+ };
21906
22495
  }
21907
22496
  /**
21908
22497
  * Common query params set for all the embed modes.
@@ -22066,13 +22655,20 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
22066
22655
  return path;
22067
22656
  }
22068
22657
  getEmbedParams() {
22069
- const queryParams = this.getEmbedParamsObject();
22658
+ const queryParams = this.getUrlQueryParamsObject();
22070
22659
  return getQueryParamString(queryParams);
22071
22660
  }
22072
22661
  getEmbedParamsObject() {
22073
22662
  const params = this.getBaseQueryParams();
22074
22663
  return params;
22075
22664
  }
22665
+ getUrlQueryParamsObject() {
22666
+ const queryParams = this.getEmbedParamsObject();
22667
+ if (!this.isConfigExcludedFromUrl()) {
22668
+ return queryParams;
22669
+ }
22670
+ return Object.fromEntries(Object.entries(queryParams).filter(([key]) => BOOTSTRAP_URL_PARAMS.has(key)));
22671
+ }
22076
22672
  getRootIframeSrc() {
22077
22673
  const query = this.getEmbedParams();
22078
22674
  return this.getEmbedBasePath(query);
@@ -22533,40 +23129,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
22533
23129
  getCompatibleEventType(eventType) {
22534
23130
  return V1EventMap[eventType] || eventType;
22535
23131
  }
22536
- /**
22537
- * Calculates the iframe center for the current visible viewPort
22538
- * of iframe using Scroll position of Host App, offsetTop for iframe
22539
- * in Host app. ViewPort height of the tab.
22540
- * @returns iframe Center in visible viewport,
22541
- * Iframe height,
22542
- * View port height.
22543
- */
22544
- getIframeCenter() {
22545
- const offsetTopClient = getOffsetTop(this.iFrame);
22546
- const scrollTopClient = window.scrollY;
22547
- const viewPortHeight = window.innerHeight;
22548
- const iframeHeight = this.iFrame.offsetHeight;
22549
- const iframeScrolled = scrollTopClient - offsetTopClient;
22550
- let iframeVisibleViewPort;
22551
- let iframeOffset;
22552
- if (iframeScrolled < 0) {
22553
- iframeVisibleViewPort = viewPortHeight - (offsetTopClient - scrollTopClient);
22554
- iframeVisibleViewPort = Math.min(iframeHeight, iframeVisibleViewPort);
22555
- iframeOffset = 0;
22556
- }
22557
- else {
22558
- iframeVisibleViewPort = Math.min(iframeHeight - iframeScrolled, viewPortHeight);
22559
- iframeOffset = iframeScrolled;
22560
- }
22561
- const iframeCenter = iframeOffset + iframeVisibleViewPort / 2;
22562
- return {
22563
- iframeCenter,
22564
- iframeScrolled,
22565
- iframeHeight,
22566
- viewPortHeight,
22567
- iframeVisibleViewPort,
22568
- };
22569
- }
22570
23132
  /**
22571
23133
  * Registers an event listener to trigger an alert when the ThoughtSpot app
22572
23134
  * sends an event of a particular message type to the host application.
@@ -22650,13 +23212,33 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
22650
23212
  var _a;
22651
23213
  const embedObj = (_a = this.preRenderWrapper) === null || _a === void 0 ? void 0 : _a[this.embedNodeKey];
22652
23214
  if (embedObj === this) {
22653
- logger$3.info('embedObj is same as this');
23215
+ logger$3.debug('embedObj is same as this');
22654
23216
  }
22655
23217
  return embedObj;
22656
23218
  }
23219
+ takeOverPreRender() {
23220
+ if (!this.preRenderWrapper)
23221
+ return;
23222
+ this.preRenderWrapper[this.embedNodeKey] = this;
23223
+ }
23224
+ // The flag lives on the wrapper because it describes the iframe: an
23225
+ // instance hidden when the container announced itself would otherwise
23226
+ // report false forever.
23227
+ markEmbedContainerLoaded() {
23228
+ this.isEmbedContainerLoaded = true;
23229
+ if (this.preRenderWrapper) {
23230
+ this.preRenderWrapper[this.embedContainerLoadedKey] = true;
23231
+ }
23232
+ }
22657
23233
  checkEmbedContainerLoaded() {
23234
+ var _a;
22658
23235
  if (this.isEmbedContainerLoaded)
22659
23236
  return true;
23237
+ if ((_a = this.preRenderWrapper) === null || _a === void 0 ? void 0 : _a[this.embedContainerLoadedKey]) {
23238
+ this.isEmbedContainerLoaded = true;
23239
+ return true;
23240
+ }
23241
+ // Older builds stamped the flag on the instance, not the wrapper.
22660
23242
  const preRenderObj = this.getPreRenderObj();
22661
23243
  if (preRenderObj && preRenderObj.isEmbedContainerLoaded) {
22662
23244
  this.isEmbedContainerLoaded = true;
@@ -22685,8 +23267,12 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
22685
23267
  }
22686
23268
  /**
22687
23269
  * Triggers an event to the embedded app
23270
+ *
23271
+ * Payload typing: from SDK 1.52.0 (ThoughtSpot Cloud 26.9.0.cl), unknown fields
23272
+ * on a known event's payload fail to compile. From SDK 1.54.0 (26.11.0.cl) the
23273
+ * payload is checked strictly against the event contract — update call sites now.
22688
23274
  * @param {HostEvent} messageType The event type
22689
- * @param {any} data The payload to send with the message
23275
+ * @param {TriggerData} data The payload, typed against the event's contract
22690
23276
  * @param {ContextType} context Optional context type to specify the context from which the event is triggered.
22691
23277
  * Use ContextType.Search for search answer context, ContextType.Answer for answer/explore context,
22692
23278
  * ContextType.Liveboard for liveboard context, or ContextType.Spotter for spotter context.
@@ -22703,7 +23289,11 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
22703
23289
  * ```
22704
23290
  * @version SDK: 1.45.2 | ThoughtSpot: 26.3.0.cl (for context parameter)
22705
23291
  */
22706
- async trigger(messageType, data = {}, context) {
23292
+ async trigger(messageType,
23293
+ // Contract shape is the contextual type: payload fields autocomplete
23294
+ // and unknown fields on object literals are flagged. Strict checks
23295
+ // land in SDK 1.54.0 — see TriggerData.
23296
+ data = {}, context) {
22707
23297
  uploadMixpanelEvent(`${MIXPANEL_EVENT.VISUAL_SDK_TRIGGER}-${messageType}`);
22708
23298
  if (!this.isRendered) {
22709
23299
  this.handleError({
@@ -22986,25 +23576,43 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
22986
23576
  this.isRendered = true;
22987
23577
  return this.renderIFrame(prerenderFrameSrc);
22988
23578
  }
23579
+ isConfigExcludedFromUrl() {
23580
+ var _a, _b, _c;
23581
+ const flag = (_b = (_a = this.viewConfig.additionalFlags) === null || _a === void 0 ? void 0 : _a.excludeConfigFromURL) !== null && _b !== void 0 ? _b : (_c = this.embedConfig.additionalFlags) === null || _c === void 0 ? void 0 : _c.excludeConfigFromURL;
23582
+ // Enabled by default; only an explicit false opts out.
23583
+ return flag !== false && flag !== 'false';
23584
+ }
23585
+ async triggerUpdateEmbedParams() {
23586
+ try {
23587
+ const params = await this.getUpdateEmbedParamsObject();
23588
+ this.trigger(exports.HostEvent.UpdateEmbedParams, params);
23589
+ }
23590
+ catch (error) {
23591
+ logger$3.error(ERROR_MESSAGE.UPDATE_PARAMS_FAILED, error);
23592
+ this.handleError({
23593
+ errorType: ErrorDetailsTypes.API,
23594
+ message: (error === null || error === void 0 ? void 0 : error.message) || ERROR_MESSAGE.UPDATE_PARAMS_FAILED,
23595
+ code: EmbedErrorCodes.UPDATE_PARAMS_FAILED,
23596
+ error: (error === null || error === void 0 ? void 0 : error.message) || error,
23597
+ });
23598
+ }
23599
+ }
22989
23600
  beforePrerenderVisible() {
22990
23601
  // We can ignore this as its a bit expensive and the newer customers
22991
23602
  // have moved on to UpdateEmbedParams supported clusters
22992
23603
  // this.validatePreRenderViewConfig(this.viewConfig); removed in #517
22993
23604
  logger$3.debug('triggering UpdateEmbedParams', this.viewConfig);
22994
- this.executeAfterEmbedContainerLoaded(async () => {
22995
- try {
22996
- const params = await this.getUpdateEmbedParamsObject();
22997
- this.trigger(exports.HostEvent.UpdateEmbedParams, params);
22998
- }
22999
- catch (error) {
23000
- logger$3.error(ERROR_MESSAGE.UPDATE_PARAMS_FAILED, error);
23001
- this.handleError({
23002
- errorType: ErrorDetailsTypes.API,
23003
- message: (error === null || error === void 0 ? void 0 : error.message) || ERROR_MESSAGE.UPDATE_PARAMS_FAILED,
23004
- code: EmbedErrorCodes.UPDATE_PARAMS_FAILED,
23005
- error: (error === null || error === void 0 ? void 0 : error.message) || error,
23006
- });
23007
- }
23605
+ // Created synchronously: a queued navigation needs something to await
23606
+ // whether the container is already loaded or not.
23607
+ this.preRenderParamsApplied = new Promise((resolve) => {
23608
+ this.executeAfterEmbedContainerLoaded(async () => {
23609
+ try {
23610
+ await this.triggerUpdateEmbedParams();
23611
+ }
23612
+ finally {
23613
+ setTimeout(resolve, UPDATE_EMBED_PARAMS_SETTLE_MS);
23614
+ }
23615
+ });
23008
23616
  });
23009
23617
  }
23010
23618
  /**
@@ -23034,8 +23642,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
23034
23642
  if (this.hostElement) {
23035
23643
  this.insertedDomEl = this.createPreRenderPlaceholder();
23036
23644
  if (this.viewConfig.fullHeight) {
23037
- // If fullHeight has already sized the wrapper, seed the placeholder
23038
- // with the same height so syncPreRenderStyle gets an accurate rect.
23645
+ // If fullHeight has already sized the wrapper, seed the
23646
+ // placeholder with the same height so syncPreRenderStyle gets
23647
+ // an accurate rect.
23039
23648
  const existingHeight = this.preRenderWrapper.style.height;
23040
23649
  if (existingHeight) {
23041
23650
  this.insertedDomEl.style.height = existingHeight;
@@ -23043,12 +23652,13 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
23043
23652
  }
23044
23653
  const placeHolderId = this.getPreRenderIds().placeHolder;
23045
23654
  // Remove any stale placeholder from a previous cycle. It is located
23046
- // via a subtree-wide querySelector, so it may be nested deeper than a
23047
- // direct child (E.g.: with fullHeight the host app can wrap it). Use
23048
- // Element.remove() — which detaches from whatever the real parent is —
23049
- // rather than hostElement.removeChild(), which throws NotFoundError
23050
- // when the match is not a direct child. Mirrors the wrapper/child
23051
- // cleanup in createPreRenderWrapper()/createPreRenderChild().
23655
+ // via a subtree-wide querySelector, so it may be nested deeper
23656
+ // than a direct child (E.g.: with fullHeight the host app can wrap
23657
+ // it). Use Element.remove() — which detaches from whatever the real
23658
+ // parent is — rather than hostElement.removeChild(), which throws
23659
+ // NotFoundError when the match is not a direct child. Mirrors the
23660
+ // wrapper/child cleanup in
23661
+ // createPreRenderWrapper()/createPreRenderChild().
23052
23662
  (_a = this.hostElement.querySelector(`#${placeHolderId}`)) === null || _a === void 0 ? void 0 : _a.remove();
23053
23663
  this.hostElement.appendChild(this.insertedDomEl);
23054
23664
  this.syncPreRenderStyle();
@@ -23080,6 +23690,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
23080
23690
  if (this.iFrame) {
23081
23691
  this.setupFullscreenChangeHandler();
23082
23692
  }
23693
+ // Last, so everything above still sees the instance being taken over
23694
+ // from.
23695
+ this.takeOverPreRender();
23083
23696
  return this;
23084
23697
  }
23085
23698
  getPreRenderPlaceHolderElement() {
@@ -23282,6 +23895,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
23282
23895
  * ```
23283
23896
  */
23284
23897
  on(messageType, callback, options = { start: false }) {
23898
+ // Mirror the base TsEmbed.on generic signature so the enriched
23899
+ // EmbedEventPayload (e.g. CustomAction's answerService) flows through
23900
+ // the override too, and the class hierarchy stays assignable.
23285
23901
  const eventType = this.getCompatibleEventType(messageType);
23286
23902
  return super.on(eventType, callback, options);
23287
23903
  }
@@ -23330,7 +23946,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
23330
23946
  * @param dataSources A list of data source GUIDs
23331
23947
  */
23332
23948
  getIFrameSrc() {
23333
- const queryParams = this.getEmbedParamsObject();
23949
+ const queryParams = this.getUrlQueryParamsObject();
23334
23950
  const path = 'search-bar-embed';
23335
23951
  let query = '';
23336
23952
  const queryParamsString = getQueryParamString(queryParams, true);
@@ -23451,7 +24067,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
23451
24067
  }
23452
24068
  getEmbedParamsObject() {
23453
24069
  var _a;
23454
- const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, hideSearchBar, dataPanelV2 = true, useLastSelectedSources = false, runtimeParameters, collapseSearchBarInitially = false, enableCustomColumnGroups = false, dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL, focusSearchBarOnRender = true, excludeRuntimeParametersfromURL, excludeSearchTokenStringFromURL, collapseSearchBar = true, isThisPeriodInDateFiltersEnabled, newChartsLibrary, } = this.viewConfig;
24070
+ const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, hideSearchBar, dataPanelV2 = true, useLastSelectedSources = false, runtimeParameters, collapseSearchBarInitially = false, enableCustomColumnGroups = false, dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL, focusSearchBarOnRender = true, excludeRuntimeParametersfromURL, excludeSearchTokenStringFromURL, collapseSearchBar = true, isThisPeriodInDateFiltersEnabled, newChartsLibrary, hideAnswerEditPanel, } = this.viewConfig;
23455
24071
  const queryParams = this.getBaseQueryParams();
23456
24072
  queryParams[Param.HideActions] = [
23457
24073
  ...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : []),
@@ -23474,6 +24090,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
23474
24090
  if (enableSearchAssist) {
23475
24091
  queryParams[Param.EnableSearchAssist] = true;
23476
24092
  }
24093
+ if (hideAnswerEditPanel !== undefined) {
24094
+ queryParams[Param.ShowAnswerEditPanel] = !hideAnswerEditPanel;
24095
+ }
23477
24096
  if (hideResults) {
23478
24097
  queryParams[Param.HideResult] = true;
23479
24098
  }
@@ -23514,7 +24133,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
23514
24133
  }
23515
24134
  getEmbedParams() {
23516
24135
  const { runtimeParameters, runtimeFilters, excludeRuntimeParametersfromURL, excludeRuntimeFiltersfromURL, } = this.viewConfig;
23517
- const queryParams = this.getEmbedParamsObject();
24136
+ const queryParams = this.getUrlQueryParamsObject();
23518
24137
  let query = '';
23519
24138
  const queryParamsString = getQueryParamString(queryParams, true);
23520
24139
  if (queryParamsString) {
@@ -23559,6 +24178,270 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
23559
24178
  }
23560
24179
  };
23561
24180
 
24181
+ /**
24182
+ * Copyright (c) 2025
24183
+ *
24184
+ * Full-height support for the Liveboard and app embeds.
24185
+ * @summary Full height
24186
+ */
24187
+ /**
24188
+ * The height the embed falls back to when the host app has not configured
24189
+ * `minimumHeight` or `defaultHeight`.
24190
+ */
24191
+ const DEFAULT_MINIMUM_HEIGHT = 500;
24192
+ /**
24193
+ * Routes that are part of the Liveboard experience itself. Navigating between
24194
+ * these does not reset the frame height, because the ThoughtSpot app keeps
24195
+ * reporting a height of its own for them.
24196
+ */
24197
+ const LIVEBOARD_RELATED_ROUTES = [
24198
+ '/pinboard/',
24199
+ '/insights/pinboard/',
24200
+ '/schedules/',
24201
+ '/embed/viz/',
24202
+ '/embed/insights/viz/',
24203
+ '/liveboard/',
24204
+ '/insights/liveboard/',
24205
+ '/tsl-editor/PINBOARD_ANSWER_BOOK/',
24206
+ '/import-tsl/PINBOARD_ANSWER_BOOK/',
24207
+ ];
24208
+ /**
24209
+ * Owns every piece of full-height behavior for an embed: the height
24210
+ * negotiation with the ThoughtSpot app, the query parameters that switch the
24211
+ * feature on, and the viewport listeners that drive lazy loading.
24212
+ *
24213
+ * The controller is inert unless `fullHeight` is enabled, so embeds can create
24214
+ * one unconditionally.
24215
+ */
24216
+ class FullHeightController {
24217
+ constructor(viewConfig, host) {
24218
+ this.host = host;
24219
+ this.scrollContainers = [];
24220
+ /**
24221
+ * Sets the frame height to the height reported by the ThoughtSpot app,
24222
+ * never going below the configured minimum.
24223
+ */
24224
+ this.handleEmbedHeight = (payload) => {
24225
+ const height = Number(payload === null || payload === void 0 ? void 0 : payload.data);
24226
+ if (!isNaN(height)) {
24227
+ this.host.setFrameHeight(Math.max(height, this.minimumHeight));
24228
+ }
24229
+ this.sendVisibleCoordinates();
24230
+ };
24231
+ /**
24232
+ * Answers the app's request for the center of the visible embed region.
24233
+ */
24234
+ this.handleEmbedIframeCenter = (payload, responder) => {
24235
+ const iframe = this.host.getIframe();
24236
+ if (!iframe) {
24237
+ return;
24238
+ }
24239
+ responder === null || responder === void 0 ? void 0 : responder({
24240
+ type: exports.EmbedEvent.EmbedIframeCenter,
24241
+ data: calculateElementCenter(iframe),
24242
+ });
24243
+ };
24244
+ /**
24245
+ * Answers the app's request for the currently visible embed coordinates.
24246
+ */
24247
+ this.handleRequestVisibleCoordinates = (payload, responder) => {
24248
+ logger$3.info('Sending RequestVisibleEmbedCoordinates', payload);
24249
+ responder === null || responder === void 0 ? void 0 : responder({
24250
+ type: exports.EmbedEvent.RequestVisibleEmbedCoordinates,
24251
+ data: this.getVisibleCoordinates(),
24252
+ });
24253
+ };
24254
+ /**
24255
+ * Resets the frame height when the app navigates away from a Liveboard,
24256
+ * since only Liveboard routes report a height of their own.
24257
+ */
24258
+ this.handleRouteChange = (payload) => {
24259
+ var _a, _b;
24260
+ const currentPath = (_a = payload === null || payload === void 0 ? void 0 : payload.data) === null || _a === void 0 ? void 0 : _a.currentPath;
24261
+ if (!currentPath) {
24262
+ return;
24263
+ }
24264
+ if (LIVEBOARD_RELATED_ROUTES.some((route) => currentPath.startsWith(route))) {
24265
+ return;
24266
+ }
24267
+ this.host.setFrameHeight(((_b = this.config.frameParams) === null || _b === void 0 ? void 0 : _b.height) || this.minimumHeight);
24268
+ };
24269
+ /**
24270
+ * Pushes the visible embed region to the app so it can decide which
24271
+ * visualizations to load.
24272
+ */
24273
+ this.sendVisibleCoordinates = () => {
24274
+ if (!this.isLazyLoadEnabled) {
24275
+ return;
24276
+ }
24277
+ const coordinates = this.getVisibleCoordinates();
24278
+ if (coordinates) {
24279
+ this.host.trigger(exports.HostEvent.VisibleEmbedCoordinates, coordinates);
24280
+ }
24281
+ };
24282
+ this.config = FullHeightController.withLazyLoadingDefaults(viewConfig);
24283
+ this.registerEventHandlers();
24284
+ }
24285
+ /**
24286
+ * The view config the controller runs on: the host app's own config with
24287
+ * the lazy-loading defaults filled in. Read-only, so the only way to change
24288
+ * it is through the setter, which re-resolves the defaults.
24289
+ */
24290
+ get viewConfig() {
24291
+ return this.config;
24292
+ }
24293
+ /**
24294
+ * Replaces the view config the controller runs on and re-resolves the
24295
+ * lazy-loading defaults against it. The config the caller passes is never
24296
+ * written to; the controller keeps a copy of its own.
24297
+ */
24298
+ set viewConfig(viewConfig) {
24299
+ this.config = FullHeightController.withLazyLoadingDefaults(viewConfig);
24300
+ }
24301
+ /**
24302
+ * The view config with the lazy-loading settings the embed falls back to
24303
+ * when the host app has not chosen its own.
24304
+ *
24305
+ * Pure by design: it returns a new config rather than writing to the one it
24306
+ * is given, so the host app's object is left untouched.
24307
+ * @param viewConfig The embed's view config
24308
+ * @returns A copy with the defaults filled in, host app choices preserved
24309
+ */
24310
+ static withLazyLoadingDefaults(viewConfig) {
24311
+ return {
24312
+ ...viewConfig,
24313
+ lazyLoadingForFullHeight: viewConfig.lazyLoadingForFullHeight === undefined
24314
+ ? true
24315
+ : viewConfig.lazyLoadingForFullHeight,
24316
+ enableScrollableContainerLazyLoading: viewConfig.enableScrollableContainerLazyLoading === undefined
24317
+ ? true
24318
+ : viewConfig.enableScrollableContainerLazyLoading,
24319
+ lazyLoadingMargin: viewConfig.lazyLoadingMargin === undefined
24320
+ ? DEFAULT_LAZY_LOADING_MARGIN
24321
+ : viewConfig.lazyLoadingMargin,
24322
+ };
24323
+ }
24324
+ /**
24325
+ * Whether the host app asked for a full-height embed.
24326
+ */
24327
+ get isEnabled() {
24328
+ return this.config.fullHeight === true;
24329
+ }
24330
+ /**
24331
+ * Whether visualizations should load as they scroll into view, which
24332
+ * requires the SDK to report the visible region of the embed.
24333
+ */
24334
+ get isLazyLoadEnabled() {
24335
+ return this.isEnabled && !!this.config.lazyLoadingForFullHeight;
24336
+ }
24337
+ /**
24338
+ * The floor for the frame height. `defaultHeight` is the deprecated
24339
+ * spelling of `minimumHeight` and is still honored for compatibility.
24340
+ */
24341
+ get minimumHeight() {
24342
+ const { minimumHeight, defaultHeight } = this.config;
24343
+ return minimumHeight || defaultHeight || DEFAULT_MINIMUM_HEIGHT;
24344
+ }
24345
+ /**
24346
+ * Registers the embed event handlers the feature depends on. Called from
24347
+ * the constructor, so the handlers are in place before `render`.
24348
+ */
24349
+ registerEventHandlers() {
24350
+ if (!this.isEnabled) {
24351
+ return;
24352
+ }
24353
+ this.host.on(exports.EmbedEvent.RouteChange, this.handleRouteChange);
24354
+ this.host.on(exports.EmbedEvent.EmbedHeight, this.handleEmbedHeight);
24355
+ this.host.on(exports.EmbedEvent.EmbedIframeCenter, this.handleEmbedIframeCenter);
24356
+ this.host.on(exports.EmbedEvent.RequestVisibleEmbedCoordinates, this.handleRequestVisibleCoordinates);
24357
+ }
24358
+ /**
24359
+ * Adds the full-height query parameters to the embed URL params.
24360
+ * @param params The query parameters being built by the embed
24361
+ */
24362
+ addQueryParams(params) {
24363
+ if (!this.isEnabled) {
24364
+ return;
24365
+ }
24366
+ params[Param.fullHeight] = true;
24367
+ if (!this.config.lazyLoadingForFullHeight) {
24368
+ return;
24369
+ }
24370
+ params[Param.IsLazyLoadingForEmbedEnabled] = true;
24371
+ if (isValidCssMargin(this.config.lazyLoadingMargin)) {
24372
+ params[Param.RootMarginForLazyLoad] = this.config.lazyLoadingMargin;
24373
+ }
24374
+ }
24375
+ /**
24376
+ * Attaches the viewport listeners that keep lazy loading in sync. Call this
24377
+ * once the embed has rendered and the iframe exists.
24378
+ */
24379
+ onRender() {
24380
+ this.registerLazyLoadListeners();
24381
+ }
24382
+ /**
24383
+ * Detaches every listener and observer owned by the controller.
24384
+ */
24385
+ destroy() {
24386
+ this.unregisterLazyLoadListeners();
24387
+ }
24388
+ getVisibleCoordinates() {
24389
+ const iframe = this.host.getIframe();
24390
+ if (!iframe) {
24391
+ return null;
24392
+ }
24393
+ return calculateVisibleElementData(iframe, this.config.enableScrollableContainerLazyLoading);
24394
+ }
24395
+ registerLazyLoadListeners() {
24396
+ if (!this.isLazyLoadEnabled || !this.host.getIframe()) {
24397
+ return;
24398
+ }
24399
+ // Re-registering is safe: drop whatever a previous render attached.
24400
+ this.unregisterLazyLoadListeners();
24401
+ // TODO: Use passive: true, install modernizr to check for passive
24402
+ window.addEventListener('resize', this.sendVisibleCoordinates);
24403
+ window.addEventListener('scroll', this.sendVisibleCoordinates, true);
24404
+ if (!this.config.enableScrollableContainerLazyLoading) {
24405
+ return;
24406
+ }
24407
+ this.observeScrollableContainers();
24408
+ }
24409
+ /**
24410
+ * Tracks the ancestors that can scroll or clip the embed, so the visible
24411
+ * region stays correct when the embed lives inside its own scroll
24412
+ * container rather than the page.
24413
+ */
24414
+ observeScrollableContainers() {
24415
+ const iFrame = this.host.getIframe();
24416
+ this.scrollContainers = getScrollableAncestors(iFrame);
24417
+ this.scrollContainers.forEach((scrollContainer) => {
24418
+ scrollContainer.addEventListener('scroll', this.sendVisibleCoordinates);
24419
+ });
24420
+ if (typeof ResizeObserver === 'undefined') {
24421
+ return;
24422
+ }
24423
+ const resizeTargets = new Set([iFrame.parentElement, ...getEffectiveClippingAncestors(iFrame)].filter(Boolean));
24424
+ this.resizeObserver = new ResizeObserver(this.sendVisibleCoordinates);
24425
+ resizeTargets.forEach((resizeTarget) => {
24426
+ this.resizeObserver.observe(resizeTarget);
24427
+ });
24428
+ }
24429
+ unregisterLazyLoadListeners() {
24430
+ var _a;
24431
+ if (!this.isLazyLoadEnabled) {
24432
+ return;
24433
+ }
24434
+ window.removeEventListener('resize', this.sendVisibleCoordinates);
24435
+ window.removeEventListener('scroll', this.sendVisibleCoordinates, true);
24436
+ (_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
24437
+ this.resizeObserver = undefined;
24438
+ this.scrollContainers.forEach((scrollContainer) => {
24439
+ scrollContainer.removeEventListener('scroll', this.sendVisibleCoordinates);
24440
+ });
24441
+ this.scrollContainers = [];
24442
+ }
24443
+ }
24444
+
23562
24445
  /**
23563
24446
  * Resolves enablePastConversationsSidebar with
23564
24447
  * spotterSidebarConfig taking precedence over the
@@ -23634,6 +24517,18 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
23634
24517
  starterPrompts,
23635
24518
  },
23636
24519
  };
24520
+ }
24521
+ function buildSpotterAnalystAppInitData(initData, viewConfig) {
24522
+ const { spotterAnalystConfig } = viewConfig;
24523
+ if (!(spotterAnalystConfig === null || spotterAnalystConfig === void 0 ? void 0 : spotterAnalystConfig.analystId))
24524
+ return initData;
24525
+ return {
24526
+ ...initData,
24527
+ embedParams: {
24528
+ ...(initData.embedParams || {}),
24529
+ spotterAnalystConfig,
24530
+ },
24531
+ };
23637
24532
  }
23638
24533
 
23639
24534
  function buildSpotterVizAppInitData(initData, viewConfig) {
@@ -23794,73 +24689,17 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
23794
24689
  constructor(domSelector, viewConfig) {
23795
24690
  viewConfig.embedComponentType = 'AppEmbed';
23796
24691
  super(domSelector, viewConfig);
23797
- this.defaultHeight = 500;
23798
- this.lazyLoadScrollContainers = [];
23799
- this.sendFullHeightLazyLoadData = () => {
23800
- const data = calculateVisibleElementData(this.iFrame, this.viewConfig.enableScrollableContainerLazyLoading);
23801
- // this should be fired only if the lazyLoadingForFullHeight and fullHeight are true
23802
- if (this.viewConfig.lazyLoadingForFullHeight && this.viewConfig.fullHeight) {
23803
- this.trigger(exports.HostEvent.VisibleEmbedCoordinates, data);
23804
- }
23805
- };
23806
- /**
23807
- * This is a handler for the RequestVisibleEmbedCoordinates event.
23808
- * It is used to send the visible coordinates data to the host application.
23809
- * @param data The event payload
23810
- * @param responder The responder function
23811
- */
23812
- this.requestVisibleEmbedCoordinatesHandler = (data, responder) => {
23813
- logger$3.info('Sending RequestVisibleEmbedCoordinates', data);
23814
- const visibleCoordinatesData = calculateVisibleElementData(this.iFrame, this.viewConfig.enableScrollableContainerLazyLoading);
23815
- responder({ type: exports.EmbedEvent.RequestVisibleEmbedCoordinates, data: visibleCoordinatesData });
23816
- };
23817
- /**
23818
- * Set the iframe height as per the computed height received
23819
- * from the ThoughtSpot app.
23820
- * @param data The event payload
23821
- */
23822
- this.updateIFrameHeight = (data) => {
23823
- this.setIFrameHeight(Math.max(data.data, this.defaultHeight));
23824
- this.sendFullHeightLazyLoadData();
23825
- };
23826
- this.embedIframeCenter = (data, responder) => {
23827
- const obj = this.getIframeCenter();
23828
- responder({ type: exports.EmbedEvent.EmbedIframeCenter, data: obj });
23829
- };
23830
- this.setIframeHeightForNonEmbedLiveboard = (data) => {
23831
- const { height: frameHeight } = this.viewConfig.frameParams || {};
23832
- const liveboardRelatedRoutes = [
23833
- '/pinboard/',
23834
- '/insights/pinboard/',
23835
- '/schedules/',
23836
- '/embed/viz/',
23837
- '/embed/insights/viz/',
23838
- '/liveboard/',
23839
- '/insights/liveboard/',
23840
- '/tsl-editor/PINBOARD_ANSWER_BOOK/',
23841
- '/import-tsl/PINBOARD_ANSWER_BOOK/',
23842
- ];
23843
- if (liveboardRelatedRoutes.some((path) => data.data.currentPath.startsWith(path))) {
23844
- // Ignore the height reset of the frame, if the navigation is
23845
- // only within the liveboard page.
23846
- return;
23847
- }
23848
- this.setIFrameHeight(frameHeight || this.defaultHeight);
23849
- };
23850
24692
  if (this.viewConfig.fullHeight === true) {
23851
- if (this.viewConfig.lazyLoadingForFullHeight === undefined) {
23852
- this.viewConfig.lazyLoadingForFullHeight = true;
23853
- }
23854
- if (this.viewConfig.enableScrollableContainerLazyLoading === undefined) {
23855
- this.viewConfig.enableScrollableContainerLazyLoading = true;
23856
- }
23857
- if (this.viewConfig.lazyLoadingMargin === undefined) {
23858
- this.viewConfig.lazyLoadingMargin = DEFAULT_LAZY_LOADING_MARGIN;
23859
- }
23860
- this.on(exports.EmbedEvent.RouteChange, this.setIframeHeightForNonEmbedLiveboard);
23861
- this.on(exports.EmbedEvent.EmbedHeight, this.updateIFrameHeight);
23862
- this.on(exports.EmbedEvent.EmbedIframeCenter, this.embedIframeCenter);
23863
- this.on(exports.EmbedEvent.RequestVisibleEmbedCoordinates, this.requestVisibleEmbedCoordinatesHandler);
24693
+ this.fullHeightController = new FullHeightController(this.viewConfig, {
24694
+ getIframe: () => this.iFrame,
24695
+ setFrameHeight: (height) => this.setIFrameHeight(height),
24696
+ on: (eventType, callback) => {
24697
+ this.on(eventType, callback);
24698
+ },
24699
+ trigger: (hostEvent, data) => {
24700
+ this.trigger(hostEvent, data);
24701
+ },
24702
+ });
23864
24703
  }
23865
24704
  }
23866
24705
  /**
@@ -23887,11 +24726,12 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
23887
24726
  * embedded Liveboard or visualization.
23888
24727
  */
23889
24728
  getEmbedParams() {
23890
- const params = this.getEmbedParamsObject();
24729
+ const params = this.getUrlQueryParamsObject();
23891
24730
  return getQueryParamString(params, true);
23892
24731
  }
23893
24732
  getEmbedParamsObject() {
23894
- 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.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;
24733
+ var _a;
24734
+ 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.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;
23895
24735
  let params = {};
23896
24736
  params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
23897
24737
  params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
@@ -23927,6 +24767,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
23927
24767
  if (!isUndefined$1(coverAndFilterOptionInPDF)) {
23928
24768
  params[Param.CoverAndFilterOptionInPDF] = !!coverAndFilterOptionInPDF;
23929
24769
  }
24770
+ if (!isUndefined$1(hideAnswerEditPanel)) {
24771
+ params[Param.ShowAnswerEditPanel] = !hideAnswerEditPanel;
24772
+ }
23930
24773
  params = this.getBaseQueryParams(params);
23931
24774
  if (!isUndefined$1(updatedSpotterChatPrompt)) {
23932
24775
  params[Param.UpdatedSpotterChatPrompt] = !!updatedSpotterChatPrompt;
@@ -23973,15 +24816,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
23973
24816
  if (hideNotification) {
23974
24817
  params[Param.HideNotification] = !!hideNotification;
23975
24818
  }
23976
- if (fullHeight === true) {
23977
- params[Param.fullHeight] = true;
23978
- if (this.viewConfig.lazyLoadingForFullHeight) {
23979
- params[Param.IsLazyLoadingForEmbedEnabled] = true;
23980
- if (isValidCssMargin(this.viewConfig.lazyLoadingMargin)) {
23981
- params[Param.RootMarginForLazyLoad] = this.viewConfig.lazyLoadingMargin;
23982
- }
23983
- }
23984
- }
24819
+ (_a = this.fullHeightController) === null || _a === void 0 ? void 0 : _a.addQueryParams(params);
23985
24820
  if (tag) {
23986
24821
  params[Param.Tag] = tag;
23987
24822
  }
@@ -24048,7 +24883,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
24048
24883
  if (isContinuousLiveboardPDFEnabled !== undefined) {
24049
24884
  params[Param.IsWYSIWYGLiveboardPDFEnabled] = isContinuousLiveboardPDFEnabled;
24050
24885
  }
24051
- this.defaultHeight = minimumHeight || this.defaultHeight;
24052
24886
  if (enableLiveboardDataCache !== undefined) {
24053
24887
  params[Param.EnableLiveboardDataCache] = enableLiveboardDataCache;
24054
24888
  }
@@ -24187,52 +25021,13 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
24187
25021
  * @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
24188
25022
  */
24189
25023
  destroy() {
25024
+ var _a;
24190
25025
  super.destroy();
24191
- this.unregisterLazyLoadEvents();
25026
+ (_a = this.fullHeightController) === null || _a === void 0 ? void 0 : _a.destroy();
24192
25027
  }
24193
25028
  postRender() {
24194
- this.registerLazyLoadEvents();
24195
- }
24196
- registerLazyLoadEvents() {
24197
- if (!this.iFrame) {
24198
- return;
24199
- }
24200
- if (this.viewConfig.fullHeight && this.viewConfig.lazyLoadingForFullHeight) {
24201
- this.unregisterLazyLoadEvents();
24202
- // TODO: Use passive: true, install modernizr to check for passive
24203
- window.addEventListener('resize', this.sendFullHeightLazyLoadData);
24204
- window.addEventListener('scroll', this.sendFullHeightLazyLoadData, true);
24205
- if (!this.viewConfig.enableScrollableContainerLazyLoading) {
24206
- return;
24207
- }
24208
- this.lazyLoadScrollContainers = getScrollableAncestors(this.iFrame);
24209
- this.lazyLoadScrollContainers.forEach((scrollContainer) => {
24210
- scrollContainer.addEventListener('scroll', this.sendFullHeightLazyLoadData);
24211
- });
24212
- if (typeof ResizeObserver !== 'undefined') {
24213
- const resizeTargets = new Set([
24214
- this.iFrame.parentElement,
24215
- ...getEffectiveClippingAncestors(this.iFrame),
24216
- ].filter(Boolean));
24217
- this.lazyLoadResizeObserver = new ResizeObserver(this.sendFullHeightLazyLoadData);
24218
- resizeTargets.forEach((resizeTarget) => {
24219
- this.lazyLoadResizeObserver.observe(resizeTarget);
24220
- });
24221
- }
24222
- }
24223
- }
24224
- unregisterLazyLoadEvents() {
24225
25029
  var _a;
24226
- if (this.viewConfig.fullHeight && this.viewConfig.lazyLoadingForFullHeight) {
24227
- window.removeEventListener('resize', this.sendFullHeightLazyLoadData);
24228
- window.removeEventListener('scroll', this.sendFullHeightLazyLoadData, true);
24229
- (_a = this.lazyLoadResizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
24230
- this.lazyLoadResizeObserver = undefined;
24231
- this.lazyLoadScrollContainers.forEach((scrollContainer) => {
24232
- scrollContainer.removeEventListener('scroll', this.sendFullHeightLazyLoadData);
24233
- });
24234
- this.lazyLoadScrollContainers = [];
24235
- }
25030
+ (_a = this.fullHeightController) === null || _a === void 0 ? void 0 : _a.onRender();
24236
25031
  }
24237
25032
  /**
24238
25033
  * Renders the embedded application pages in the ThoughtSpot app.
@@ -24327,6 +25122,11 @@ query GetEurekaVizSnapshots(
24327
25122
  * @summary Liveboard & visualization embed
24328
25123
  * @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
24329
25124
  */
25125
+ // Home unmounts the liveboard container, which is how its state gets cleared.
25126
+ // The settle window gives the container time to do it before we ask for the
25127
+ // liveboard back.
25128
+ const HOME_ROUTE = 'home';
25129
+ const HOME_SETTLE_MS = 200;
24330
25130
  /**
24331
25131
  * Embed a ThoughtSpot Liveboard or visualization. When rendered it already
24332
25132
  * waits for the authentication to complete, so you need not wait for
@@ -24346,59 +25146,6 @@ query GetEurekaVizSnapshots(
24346
25146
  constructor(domSelector, viewConfig) {
24347
25147
  viewConfig.embedComponentType = 'LiveboardEmbed';
24348
25148
  super(domSelector, viewConfig);
24349
- this.defaultHeight = 500;
24350
- this.lazyLoadScrollContainers = [];
24351
- this.sendFullHeightLazyLoadData = () => {
24352
- const data = calculateVisibleElementData(this.iFrame, this.viewConfig.enableScrollableContainerLazyLoading);
24353
- // this should be fired only if the lazyLoadingForFullHeight and fullHeight are true
24354
- if (this.viewConfig.lazyLoadingForFullHeight && this.viewConfig.fullHeight) {
24355
- this.trigger(exports.HostEvent.VisibleEmbedCoordinates, data);
24356
- }
24357
- };
24358
- /**
24359
- * This is a handler for the RequestVisibleEmbedCoordinates event.
24360
- * It is used to send the visible coordinates data to the host application.
24361
- * @param data The event payload
24362
- * @param responder The responder function
24363
- */
24364
- this.requestVisibleEmbedCoordinatesHandler = (data, responder) => {
24365
- logger$3.info('Sending RequestVisibleEmbedCoordinates', data);
24366
- const visibleCoordinatesData = calculateVisibleElementData(this.iFrame, this.viewConfig.enableScrollableContainerLazyLoading);
24367
- responder({ type: exports.EmbedEvent.RequestVisibleEmbedCoordinates, data: visibleCoordinatesData });
24368
- };
24369
- /**
24370
- * Set the iframe height as per the computed height received
24371
- * from the ThoughtSpot app.
24372
- * @param data The event payload
24373
- */
24374
- this.updateIFrameHeight = (data) => {
24375
- this.setIFrameHeight(Math.max(data.data, this.defaultHeight));
24376
- this.sendFullHeightLazyLoadData();
24377
- };
24378
- this.embedIframeCenter = (data, responder) => {
24379
- const obj = this.getIframeCenter();
24380
- responder({ type: exports.EmbedEvent.EmbedIframeCenter, data: obj });
24381
- };
24382
- this.setIframeHeightForNonEmbedLiveboard = (data) => {
24383
- const { height: frameHeight } = this.viewConfig.frameParams || {};
24384
- const liveboardRelatedRoutes = [
24385
- '/pinboard/',
24386
- '/insights/pinboard/',
24387
- '/schedules/',
24388
- '/embed/viz/',
24389
- '/embed/insights/viz/',
24390
- '/liveboard/',
24391
- '/insights/liveboard/',
24392
- '/tsl-editor/PINBOARD_ANSWER_BOOK/',
24393
- '/import-tsl/PINBOARD_ANSWER_BOOK/',
24394
- ];
24395
- if (liveboardRelatedRoutes.some((path) => data.data.currentPath.startsWith(path))) {
24396
- // Ignore the height reset of the frame, if the navigation is
24397
- // only within the liveboard page.
24398
- return;
24399
- }
24400
- this.setIFrameHeight(frameHeight || this.defaultHeight);
24401
- };
24402
25149
  /**
24403
25150
  * @hidden
24404
25151
  * Internal state to track the current liveboard id.
@@ -24412,22 +25159,19 @@ query GetEurekaVizSnapshots(
24412
25159
  };
24413
25160
  if (this.viewConfig.fullHeight === true) {
24414
25161
  if (this.viewConfig.vizId) {
24415
- logger$3.warn('Full height is currently only supported for Liveboard embeds.' +
24416
- 'Using full height with vizId might lead to unexpected behavior.');
24417
- }
24418
- if (this.viewConfig.lazyLoadingForFullHeight === undefined) {
24419
- this.viewConfig.lazyLoadingForFullHeight = true;
24420
- }
24421
- if (this.viewConfig.enableScrollableContainerLazyLoading === undefined) {
24422
- this.viewConfig.enableScrollableContainerLazyLoading = true;
25162
+ logger$3.warn('Full height is currently only supported for Liveboard embeds.'
25163
+ + 'Using full height with vizId might lead to unexpected behavior.');
24423
25164
  }
24424
- if (this.viewConfig.lazyLoadingMargin === undefined) {
24425
- this.viewConfig.lazyLoadingMargin = DEFAULT_LAZY_LOADING_MARGIN;
24426
- }
24427
- this.on(exports.EmbedEvent.RouteChange, this.setIframeHeightForNonEmbedLiveboard);
24428
- this.on(exports.EmbedEvent.EmbedHeight, this.updateIFrameHeight);
24429
- this.on(exports.EmbedEvent.EmbedIframeCenter, this.embedIframeCenter);
24430
- this.on(exports.EmbedEvent.RequestVisibleEmbedCoordinates, this.requestVisibleEmbedCoordinatesHandler);
25165
+ this.fullHeightController = new FullHeightController(this.viewConfig, {
25166
+ getIframe: () => this.iFrame,
25167
+ setFrameHeight: (height) => this.setIFrameHeight(height),
25168
+ on: (eventType, callback) => {
25169
+ this.on(eventType, callback);
25170
+ },
25171
+ trigger: (hostEvent, data) => {
25172
+ this.trigger(hostEvent, data);
25173
+ },
25174
+ });
24431
25175
  }
24432
25176
  }
24433
25177
  async getAppInitData() {
@@ -24440,26 +25184,18 @@ query GetEurekaVizSnapshots(
24440
25184
  * embedded Liveboard or visualization.
24441
25185
  */
24442
25186
  getEmbedParams() {
24443
- const params = this.getEmbedParamsObject();
25187
+ const params = this.getUrlQueryParamsObject();
24444
25188
  const queryParams = getQueryParamString(params, true);
24445
25189
  return queryParams;
24446
25190
  }
24447
25191
  getEmbedParamsObject() {
25192
+ var _a;
24448
25193
  let params = {};
24449
25194
  params = this.getBaseQueryParams(params);
24450
- 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;
25195
+ 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;
24451
25196
  const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
24452
25197
  || this.viewConfig.preventPinboardFilterRemoval;
24453
- if (fullHeight === true) {
24454
- params[Param.fullHeight] = true;
24455
- if (this.viewConfig.lazyLoadingForFullHeight) {
24456
- params[Param.IsLazyLoadingForEmbedEnabled] = true;
24457
- if (isValidCssMargin(this.viewConfig.lazyLoadingMargin)) {
24458
- params[Param.RootMarginForLazyLoad] = this.viewConfig.lazyLoadingMargin;
24459
- }
24460
- }
24461
- }
24462
- this.defaultHeight = minimumHeight || defaultHeight || this.defaultHeight;
25198
+ (_a = this.fullHeightController) === null || _a === void 0 ? void 0 : _a.addQueryParams(params);
24463
25199
  if (enableVizTransformations !== undefined) {
24464
25200
  params[Param.EnableVizTransformations] = enableVizTransformations.toString();
24465
25201
  }
@@ -24686,19 +25422,49 @@ query GetEurekaVizSnapshots(
24686
25422
  }
24687
25423
  beforePrerenderVisible() {
24688
25424
  super.beforePrerenderVisible();
24689
- const embedObj = this.getPreRenderObj();
24690
- this.executeAfterEmbedContainerLoaded(() => {
24691
- this.navigateToLiveboard(this.viewConfig.liveboardId, this.viewConfig.vizId, this.viewConfig.activeTabId, this.viewConfig.personalizedViewId);
24692
- if (embedObj) {
24693
- embedObj.currentLiveboardState = {
24694
- liveboardId: this.viewConfig.liveboardId,
24695
- vizId: this.viewConfig.vizId,
24696
- activeTabId: this.viewConfig.activeTabId,
24697
- personalizedViewId: this.viewConfig.personalizedViewId,
24698
- };
25425
+ // Captured before showPreRender() hands the wrapper over to this
25426
+ // instance. Itself means a hide/show, not a hand-over, so there is
25427
+ // nothing stale to clear.
25428
+ const previous = this.getPreRenderObj();
25429
+ const showing = previous === this ? undefined : previous === null || previous === void 0 ? void 0 : previous.currentLiveboardState;
25430
+ this.executeAfterEmbedContainerLoaded(async () => {
25431
+ // Without this the params callback suspends on its await and
25432
+ // Navigate goes out first, so the container loads with the previous
25433
+ // config's filters.
25434
+ await this.preRenderParamsApplied;
25435
+ if (this.isShowingLiveboardRoute(showing)) {
25436
+ // Navigate to the route we are already on is a no-op, so the
25437
+ // liveboard keeps its state. Home unmounts the container, which
25438
+ // clears it.
25439
+ this.trigger(exports.HostEvent.Navigate, HOME_ROUTE)
25440
+ .catch((error) => logger$3.warn('Could not route via home', error));
25441
+ // Not awaited above: the container never acks Navigate, so
25442
+ // that promise only settles on the 30s trigger timeout.
25443
+ await new Promise((resolve) => {
25444
+ setTimeout(resolve, HOME_SETTLE_MS);
25445
+ });
24699
25446
  }
25447
+ this.navigateToLiveboard(this.viewConfig.liveboardId, this.viewConfig.vizId, this.viewConfig.activeTabId, this.viewConfig.personalizedViewId);
25448
+ this.currentLiveboardState = {
25449
+ liveboardId: this.viewConfig.liveboardId,
25450
+ vizId: this.viewConfig.vizId,
25451
+ activeTabId: this.viewConfig.activeTabId,
25452
+ personalizedViewId: this.viewConfig.personalizedViewId,
25453
+ };
24700
25454
  });
24701
25455
  }
25456
+ // The whole route, not just the liveboard id: the path is built from the
25457
+ // viz, tab and view too, so a same-liveboard show onto another tab is a
25458
+ // real navigation.
25459
+ isShowingLiveboardRoute(showing) {
25460
+ if (!(showing === null || showing === void 0 ? void 0 : showing.liveboardId))
25461
+ return false;
25462
+ const { liveboardId, vizId, activeTabId, personalizedViewId, } = this.viewConfig;
25463
+ return showing.liveboardId === liveboardId
25464
+ && showing.vizId === vizId
25465
+ && showing.activeTabId === activeTabId
25466
+ && showing.personalizedViewId === personalizedViewId;
25467
+ }
24702
25468
  async handleRenderForPrerender() {
24703
25469
  if (isUndefined$1(this.viewConfig.liveboardId)) {
24704
25470
  return this.prerenderGeneric();
@@ -24707,11 +25473,16 @@ query GetEurekaVizSnapshots(
24707
25473
  }
24708
25474
  /**
24709
25475
  * Triggers an event to the embedded app
25476
+ * Payload typing follows {@link TsEmbed.trigger}: unknown fields fail to compile
25477
+ * from SDK 1.52.0; strict contract checks land in SDK 1.54.0.
24710
25478
  * @param {HostEvent} messageType The event type
24711
- * @param {any} data The payload to send with the message
25479
+ * @param {TriggerData} data The payload, typed against the event's contract
24712
25480
  * @returns A promise that resolves with the response from the embedded app
24713
25481
  */
24714
- trigger(messageType, data = {}, context) {
25482
+ trigger(messageType,
25483
+ // Mirror TsEmbed.trigger: contract shape is the contextual type and
25484
+ // unknown fields on object literals are flagged. Strict in SDK 1.54.0.
25485
+ data = {}, context) {
24715
25486
  const dataWithVizId = data;
24716
25487
  if (messageType === exports.HostEvent.SetActiveTab) {
24717
25488
  this.setActiveTab(data);
@@ -24727,52 +25498,13 @@ query GetEurekaVizSnapshots(
24727
25498
  * @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
24728
25499
  */
24729
25500
  destroy() {
25501
+ var _a;
24730
25502
  super.destroy();
24731
- this.unregisterLazyLoadEvents();
25503
+ (_a = this.fullHeightController) === null || _a === void 0 ? void 0 : _a.destroy();
24732
25504
  }
24733
25505
  postRender() {
24734
- this.registerLazyLoadEvents();
24735
- }
24736
- registerLazyLoadEvents() {
24737
- if (!this.iFrame) {
24738
- return;
24739
- }
24740
- if (this.viewConfig.fullHeight && this.viewConfig.lazyLoadingForFullHeight) {
24741
- this.unregisterLazyLoadEvents();
24742
- // TODO: Use passive: true, install modernizr to check for passive
24743
- window.addEventListener('resize', this.sendFullHeightLazyLoadData);
24744
- window.addEventListener('scroll', this.sendFullHeightLazyLoadData, true);
24745
- if (!this.viewConfig.enableScrollableContainerLazyLoading) {
24746
- return;
24747
- }
24748
- this.lazyLoadScrollContainers = getScrollableAncestors(this.iFrame);
24749
- this.lazyLoadScrollContainers.forEach((scrollContainer) => {
24750
- scrollContainer.addEventListener('scroll', this.sendFullHeightLazyLoadData);
24751
- });
24752
- if (typeof ResizeObserver !== 'undefined') {
24753
- const resizeTargets = new Set([
24754
- this.iFrame.parentElement,
24755
- ...getEffectiveClippingAncestors(this.iFrame),
24756
- ].filter(Boolean));
24757
- this.lazyLoadResizeObserver = new ResizeObserver(this.sendFullHeightLazyLoadData);
24758
- resizeTargets.forEach((resizeTarget) => {
24759
- this.lazyLoadResizeObserver.observe(resizeTarget);
24760
- });
24761
- }
24762
- }
24763
- }
24764
- unregisterLazyLoadEvents() {
24765
25506
  var _a;
24766
- if (this.viewConfig.fullHeight && this.viewConfig.lazyLoadingForFullHeight) {
24767
- window.removeEventListener('resize', this.sendFullHeightLazyLoadData);
24768
- window.removeEventListener('scroll', this.sendFullHeightLazyLoadData, true);
24769
- (_a = this.lazyLoadResizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
24770
- this.lazyLoadResizeObserver = undefined;
24771
- this.lazyLoadScrollContainers.forEach((scrollContainer) => {
24772
- scrollContainer.removeEventListener('scroll', this.sendFullHeightLazyLoadData);
24773
- });
24774
- this.lazyLoadScrollContainers = [];
24775
- }
25507
+ (_a = this.fullHeightController) === null || _a === void 0 ? void 0 : _a.onRender();
24776
25508
  }
24777
25509
  /**
24778
25510
  * Render an embedded ThoughtSpot Liveboard or visualization
@@ -25225,7 +25957,7 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
25225
25957
  getIframeSrc() {
25226
25958
  const { sessionId, genNo, acSessionId, acGenNo, convId, messageId, } = this.viewConfig;
25227
25959
  const path = 'conv-assist-answer';
25228
- const queryParams = this.getEmbedParamsObject();
25960
+ const queryParams = this.getUrlQueryParamsObject();
25229
25961
  let query = '';
25230
25962
  const queryParamsString = getQueryParamString(queryParams, true);
25231
25963
  if (queryParamsString) {
@@ -25388,10 +26120,11 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
25388
26120
  const defaultAppInitData = await super.getAppInitData();
25389
26121
  const sidebarInitData = buildSpotterSidebarAppInitData(defaultAppInitData, this.viewConfig, this.handleError.bind(this));
25390
26122
  const shareInitData = buildSpotterShareConversationAppInitData(sidebarInitData, this.viewConfig);
25391
- return buildStarterPromptsAppInitData(shareInitData, this.viewConfig);
26123
+ const starterPromptsInitData = buildStarterPromptsAppInitData(shareInitData, this.viewConfig);
26124
+ return buildSpotterAnalystAppInitData(starterPromptsInitData, this.viewConfig);
25392
26125
  }
25393
26126
  getEmbedParamsObject() {
25394
- const { searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, updatedSpotterExperience, showSpotterLimitations, hideSampleQuestions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, updatedSpotterChatPrompt, showSpotterRadiance, defaultQueryMode, enableStopAnswerGenerationEmbed, spotterChatConfig, spotterAnalystConfig, } = this.viewConfig;
26127
+ const { searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, updatedSpotterExperience, showSpotterLimitations, hideSampleQuestions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, updatedSpotterChatPrompt, showSpotterRadiance, defaultQueryMode, enableStopAnswerGenerationEmbed, spotterChatConfig, } = this.viewConfig;
25395
26128
  const queryParams = this.getBaseQueryParams();
25396
26129
  queryParams[Param.SpotterEnabled] = true;
25397
26130
  // Boolean params
@@ -25404,7 +26137,6 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
25404
26137
  setParamIfDefined(queryParams, Param.ShowSpotterRadiance, showSpotterRadiance, true);
25405
26138
  setParamIfDefined(queryParams, Param.DefaultQueryMode, defaultQueryMode);
25406
26139
  setParamIfDefined(queryParams, Param.EnableStopAnswerGenerationEmbed, enableStopAnswerGenerationEmbed, true);
25407
- setParamIfDefined(queryParams, Param.AnalystId, spotterAnalystConfig === null || spotterAnalystConfig === void 0 ? void 0 : spotterAnalystConfig.analystId);
25408
26140
  // Handle spotterChatConfig params
25409
26141
  if (spotterChatConfig) {
25410
26142
  const { hideToolResponseCardBranding, toolResponseCardBrandingLabel, spotterFileUploadEnabled, spotterFileUploadFileTypes, enableStarterPrompts, } = spotterChatConfig;
@@ -25428,7 +26160,7 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
25428
26160
  const path = sharedConversationId
25429
26161
  ? `insights/conv-assist/s/${encodeURIComponent(sharedConversationId)}`
25430
26162
  : 'insights/conv-assist';
25431
- const queryParams = this.getEmbedParamsObject();
26163
+ const queryParams = this.getUrlQueryParamsObject();
25432
26164
  let query = '';
25433
26165
  const queryParamsString = getQueryParamString(queryParams, true);
25434
26166
  if (queryParamsString) {