@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
  import * as React from 'react';
4
4
  import React__default, { useRef, useCallback } from 'react';
@@ -1043,6 +1043,9 @@ var EmbedEvent;
1043
1043
  EmbedEvent["Download"] = "download";
1044
1044
  /**
1045
1045
  * Emitted when the download action is triggered on an Answer.
1046
+ * Payload varies by context: {@link VizScopedRequest} (Search, Answer,
1047
+ * Liveboard), {@link RequiredVizRequest} (Spotter, vizId required). trigger()
1048
+ * accepts the union now; per-context enforced next release.
1046
1049
  * Use start:true to subscribe to when download is initiated, or end:true to
1047
1050
  * subscribe to when download is completed. Default is end:true.
1048
1051
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.0.sw
@@ -1059,6 +1062,9 @@ var EmbedEvent;
1059
1062
  EmbedEvent["DownloadAsPng"] = "downloadAsPng";
1060
1063
  /**
1061
1064
  * Emitted when the Download as PDF action is triggered on an Answer
1065
+ * Payload varies by context: {@link VizScopedRequest} (Search, Answer; plus
1066
+ * liveboardId on Liveboard), {@link RequiredVizRequest} (Spotter). trigger()
1067
+ * accepts the union now; per-context enforced next release.
1062
1068
  * Use start:true to subscribe to when download as PDF is initiated, or end:true to
1063
1069
  * subscribe to when download as PDF is completed. Default is end:true.
1064
1070
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
@@ -1075,6 +1081,9 @@ var EmbedEvent;
1075
1081
  EmbedEvent["DownloadAsPdf"] = "downloadAsPdf";
1076
1082
  /**
1077
1083
  * Emitted when the Download as CSV action is triggered on an Answer.
1084
+ * Payload varies by context: {@link VizScopedRequest} (Search, Answer,
1085
+ * Liveboard), {@link RequiredVizRequest} (Spotter, vizId required). trigger()
1086
+ * accepts the union now; per-context enforced next release.
1078
1087
  * Use start:true to subscribe to when download as CSV is initiated, or end:true to
1079
1088
  * subscribe to when download as CSV is completed. Default is end:true.
1080
1089
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
@@ -1091,6 +1100,9 @@ var EmbedEvent;
1091
1100
  EmbedEvent["DownloadAsCsv"] = "downloadAsCsv";
1092
1101
  /**
1093
1102
  * Emitted when the Download as XLSX action is triggered on an Answer.
1103
+ * Payload varies by context: {@link VizScopedRequest} (Search, Answer,
1104
+ * Liveboard), {@link RequiredVizRequest} (Spotter, vizId required). trigger()
1105
+ * accepts the union now; per-context enforced next release.
1094
1106
  * Use start:true to subscribe to when download as XLSX is initiated, or end:true to
1095
1107
  * subscribe to when download as XLSX is completed. Default is end:true.
1096
1108
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
@@ -1369,6 +1381,9 @@ var EmbedEvent;
1369
1381
  EmbedEvent["Schedule"] = "subscription";
1370
1382
  /**
1371
1383
  * Emitted when a user clicks **Edit** on a Liveboard or visualization
1384
+ * Payload varies by context: {@link VizScopedRequest} (Liveboard),
1385
+ * {@link RequiredVizRequest} (Spotter, vizId required). trigger() accepts the
1386
+ * union now; per-context enforced next release.
1372
1387
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1373
1388
  * @example
1374
1389
  * ```js
@@ -2448,6 +2463,7 @@ var HostEvent;
2448
2463
  * the search query string.
2449
2464
  * Supported in `AppEmbed` and `SearchEmbed` deployments.
2450
2465
  * Includes the following properties:
2466
+ * Payload: {@link SearchRequest}.
2451
2467
  * @param - Includes the following keys:
2452
2468
  * - `searchQuery`: Query string with search tokens.
2453
2469
  * - `dataSources`: Data source GUID to search on.
@@ -2475,6 +2491,9 @@ var HostEvent;
2475
2491
  HostEvent["Search"] = "search";
2476
2492
  /**
2477
2493
  * Triggers a drill on certain points of the specified column
2494
+ * Payload: {@link DrillDownRequest}; in Liveboard context vizId is required
2495
+ * ({@link RequiredVizRequest}). trigger() accepts the union now; per-context
2496
+ * enforced next release.
2478
2497
  * Includes the following properties:
2479
2498
  * @param - Includes the following keys:
2480
2499
  * - `points`: An object containing `selectedPoints` and/or `clickedPoint`
@@ -2554,6 +2573,8 @@ var HostEvent;
2554
2573
  HostEvent["Reload"] = "reload";
2555
2574
  /**
2556
2575
  * Get iframe URL for the current embed view.
2576
+ * Payload: none.
2577
+ * Response: {@link GetIframeUrlResponse}.
2557
2578
  * @example
2558
2579
  * ```js
2559
2580
  * const url = embed.trigger(HostEvent.GetIframeUrl);
@@ -2572,6 +2593,7 @@ var HostEvent;
2572
2593
  HostEvent["GetIframeUrl"] = "GetIframeUrl";
2573
2594
  /**
2574
2595
  * Display specific visualizations on a Liveboard.
2596
+ * Payload: `string[]`.
2575
2597
  * @param - An array of GUIDs of the visualization to show. The visualization IDs not passed
2576
2598
  * in this parameter will be hidden.
2577
2599
  * @example
@@ -2594,6 +2616,7 @@ var HostEvent;
2594
2616
  HostEvent["SetVisibleVizs"] = "SetPinboardVisibleVizs";
2595
2617
  /**
2596
2618
  * Set a Liveboard tab as an active tab.
2619
+ * Payload: {@link SetActiveTabRequest}.
2597
2620
  * @param - tabId - string of id of Tab to show
2598
2621
  * @example
2599
2622
  * ```js
@@ -2621,6 +2644,7 @@ var HostEvent;
2621
2644
  * and `AppEmbed` only. In full application embedding, this event updates
2622
2645
  * the runtime filters applied on the Liveboard and saved Answer objects.
2623
2646
  *
2647
+ * Payload: {@link RuntimeFilter}[].
2624
2648
  * @param - Array of {@link RuntimeFilter} objects. Each item includes:
2625
2649
  * - `columnName`: Name of the column to filter on.
2626
2650
  * - `operator`: {@link RuntimeFilterOp} to apply. For more information, see
@@ -2662,6 +2686,7 @@ var HostEvent;
2662
2686
  * Accepts either a plain value or an object with `path`
2663
2687
  * and an optional `replace` flag.
2664
2688
  *
2689
+ * Payload: `string` | `number` | {@link NavigateRequest}.
2665
2690
  * @param data - A string path, a numeric history delta, or an object
2666
2691
  * `{ path: string | number, replace?: boolean }`.
2667
2692
  * - `path` — the route to navigate to, or a history delta such as `1`
@@ -2689,6 +2714,9 @@ var HostEvent;
2689
2714
  /**
2690
2715
  * Open the filter panel for a particular column.
2691
2716
  * Works with Search and Liveboard embed.
2717
+ * Payload: {@link OpenFilterRequest} (the cross-context superset). The
2718
+ * accepted fields vary by context: {@link OpenFilterLiveboardRequest},
2719
+ * {@link OpenFilterSpotterRequest}, {@link OpenFilterSearchRequest}.
2692
2720
  * @param - { columnId: string,
2693
2721
  * name: string,
2694
2722
  * type: ATTRIBUTE/MEASURE,
@@ -2771,6 +2799,7 @@ var HostEvent;
2771
2799
  /**
2772
2800
  * Open the parameter panel for a particular parameter on a Liveboard.
2773
2801
  * Mirrors {@link HostEvent.OpenFilter} for parameters.
2802
+ * Payload: {@link OpenParameterRequest}.
2774
2803
  * @param - Includes the following keys:
2775
2804
  * - `parameter`: An object identifying the parameter to open, for
2776
2805
  * example, `{ parameterId: '<parameter-GUID>' }`.
@@ -2802,6 +2831,7 @@ var HostEvent;
2802
2831
  HostEvent["OpenParameter"] = "openParameter";
2803
2832
  /**
2804
2833
  * Add columns to the current search query.
2834
+ * Payload: `{ columnIds: string[] }`.
2805
2835
  * @param - { columnIds: string[] }
2806
2836
  * @example
2807
2837
  * ```js
@@ -2820,6 +2850,7 @@ var HostEvent;
2820
2850
  HostEvent["AddColumns"] = "addColumns";
2821
2851
  /**
2822
2852
  * Remove a column from the current search query.
2853
+ * Payload: `{ columnId: string }`.
2823
2854
  * @param - { columnId: string }
2824
2855
  * @example
2825
2856
  * ```js
@@ -2844,6 +2875,8 @@ var HostEvent;
2844
2875
  * sorting, toggling of legends, and data drill down.
2845
2876
  * For more information, see
2846
2877
  * link:https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#transient-lb-content[Liveboard data with unsaved changes].
2878
+ * Payload: none.
2879
+ * Response: {@link GetExportRequestForCurrentPinboardResponse}.
2847
2880
  * @example
2848
2881
  * ```js
2849
2882
  * liveboardEmbed.trigger(HostEvent.getExportRequestForCurrentPinboard).then(
@@ -2865,6 +2898,8 @@ var HostEvent;
2865
2898
  * requiring additional user input via the *Pin to Liveboard* modal, define
2866
2899
  * the following parameters:
2867
2900
  *
2901
+ * Payload: {@link PinAnswerToLiveboardRequest}.
2902
+ * Response: {@link PinAnswerToLiveboardResponse}.
2868
2903
  * @param - Includes the following keys:
2869
2904
  * - `vizId`: GUID of the saved Answer or Spotter visualization ID to pin to a
2870
2905
  * Liveboard.
@@ -2979,6 +3014,7 @@ var HostEvent;
2979
3014
  HostEvent["LiveboardInfo"] = "pinboardInfo";
2980
3015
  /**
2981
3016
  * Trigger the **Schedule** action on an embedded Liveboard.
3017
+ * Payload: {@link VizScopedRequest}.
2982
3018
  * @example
2983
3019
  * ```js
2984
3020
  * liveboardEmbed.trigger(HostEvent.Schedule)
@@ -2994,6 +3030,7 @@ var HostEvent;
2994
3030
  HostEvent["Schedule"] = "subscription";
2995
3031
  /**
2996
3032
  * Trigger the **Manage schedule** action on an embedded Liveboard
3033
+ * Payload: {@link VizScopedRequest}.
2997
3034
  * @example
2998
3035
  * ```js
2999
3036
  * liveboardEmbed.trigger(HostEvent.SchedulesList)
@@ -3010,6 +3047,7 @@ var HostEvent;
3010
3047
  /**
3011
3048
  * Trigger the **Export TML** action on an embedded Liveboard or
3012
3049
  * Answer.
3050
+ * Payload: {@link VizScopedRequest}.
3013
3051
  * @example
3014
3052
  * ```js
3015
3053
  * liveboardEmbed.trigger(HostEvent.ExportTML)
@@ -3032,6 +3070,7 @@ var HostEvent;
3032
3070
  /**
3033
3071
  * Trigger the **Edit TML** action on an embedded Liveboard or
3034
3072
  * saved Answers in the full application embedding.
3073
+ * Payload: {@link VizScopedRequest}.
3035
3074
  * @example
3036
3075
  * ```js
3037
3076
  * liveboardEmbed.trigger(HostEvent.EditTML)
@@ -3053,6 +3092,7 @@ var HostEvent;
3053
3092
  HostEvent["EditTML"] = "editTSL";
3054
3093
  /**
3055
3094
  * Trigger the **Update TML** action on an embedded Liveboard.
3095
+ * Payload: {@link VizScopedRequest}.
3056
3096
  * @example
3057
3097
  * ```js
3058
3098
  * liveboardEmbed.trigger(HostEvent.UpdateTML)
@@ -3070,6 +3110,7 @@ var HostEvent;
3070
3110
  * Trigger the **Download PDF** action on an embedded Liveboard,
3071
3111
  * visualization or Answer.
3072
3112
  *
3113
+ * Payload: {@link VizScopedRequest} plus optional `liveboardId`.
3073
3114
  * @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
3074
3115
  *
3075
3116
  * **NOTE**: The **Download** > **PDF** action is available on
@@ -3120,6 +3161,7 @@ var HostEvent;
3120
3161
  /**
3121
3162
  * Trigger the **AI Highlights** action on an embedded Liveboard
3122
3163
  *
3164
+ * Payload: none.
3123
3165
  * @example
3124
3166
  * ```js
3125
3167
  * liveboardEmbed.trigger(HostEvent.AIHighlights)
@@ -3174,6 +3216,9 @@ var HostEvent;
3174
3216
  HostEvent["MakeACopy"] = "makeACopy";
3175
3217
  /**
3176
3218
  * Trigger the **Delete** action for a Liveboard.
3219
+ * Payload varies by context: {@link RequiredVizRequest} (Liveboard, vizId
3220
+ * required), {@link VizScopedRequest} (Search). trigger() accepts the union
3221
+ * now; per-context enforced next release.
3177
3222
  * @example
3178
3223
  * ```js
3179
3224
  * appEmbed.trigger(HostEvent.Remove)
@@ -3188,6 +3233,7 @@ var HostEvent;
3188
3233
  HostEvent["Remove"] = "delete";
3189
3234
  /**
3190
3235
  * Trigger the **Explore** action on a visualization.
3236
+ * Payload: {@link RequiredVizRequest}.
3191
3237
  * @param - an object with `vizId` as a key
3192
3238
  * @example
3193
3239
  * ```js
@@ -3207,6 +3253,7 @@ var HostEvent;
3207
3253
  /**
3208
3254
  * Trigger the **Create alert** action on a KPI chart
3209
3255
  * in a Liveboard or saved Answer.
3256
+ * Payload: {@link VizScopedRequest}.
3210
3257
  * @param - an object with `vizId` as a key
3211
3258
  * @example
3212
3259
  * ```js
@@ -3238,6 +3285,7 @@ var HostEvent;
3238
3285
  /**
3239
3286
  * Trigger the **Manage alerts** action on a KPI chart
3240
3287
  * in a visualization or saved Answer.
3288
+ * Payload: {@link VizScopedRequest}.
3241
3289
  * @param - an object with `vizId` as a key
3242
3290
  * @example
3243
3291
  * ```js
@@ -3275,6 +3323,7 @@ var HostEvent;
3275
3323
  * on a Liveboard.
3276
3324
  *
3277
3325
  * This event is not supported in visualization embed and search embed.
3326
+ * Payload: {@link VizScopedRequest}.
3278
3327
  * @param - Object parameter. Includes the following keys:
3279
3328
  * - `vizId`: To trigger the action for a specific visualization in Liveboard embed,
3280
3329
  * pass in `vizId` as a key. In Spotter embed, `vizId` refers to the Answer ID and
@@ -3317,6 +3366,7 @@ var HostEvent;
3317
3366
  HostEvent["Edit"] = "edit";
3318
3367
  /**
3319
3368
  * Trigger the **Copy link** action on a Liveboard or visualization
3369
+ * Payload: {@link VizScopedRequest}.
3320
3370
  * @param - object - to trigger the action for a
3321
3371
  * specific visualization in Liveboard embed, pass in `vizId` as a key
3322
3372
  * @example
@@ -3362,6 +3412,7 @@ var HostEvent;
3362
3412
  HostEvent["CopyLink"] = "embedDocument";
3363
3413
  /**
3364
3414
  * Trigger the **Present** action on a Liveboard or visualization
3415
+ * Payload: {@link VizScopedRequest}.
3365
3416
  * @param - object - to trigger the action for a specific visualization
3366
3417
  * in Liveboard embed, pass in `vizId` as a key
3367
3418
  * @example
@@ -3407,6 +3458,8 @@ var HostEvent;
3407
3458
  HostEvent["Present"] = "present";
3408
3459
  /**
3409
3460
  * Get TML for the current search.
3461
+ * Payload: {@link GetTMLRequest}.
3462
+ * Response: `Record<string, any>`.
3410
3463
  * @example
3411
3464
  * ```js
3412
3465
  * searchEmbed.trigger(HostEvent.GetTML).then((tml) => {
@@ -3456,6 +3509,7 @@ var HostEvent;
3456
3509
  * Trigger the **Show underlying data** action on a
3457
3510
  * chart or table.
3458
3511
  *
3512
+ * Payload: {@link VizScopedRequest}.
3459
3513
  * @param - an object with vizId as a key
3460
3514
  * @example
3461
3515
  * ```js
@@ -3489,6 +3543,7 @@ var HostEvent;
3489
3543
  * Trigger the **Delete** action for a visualization
3490
3544
  * in an embedded Liveboard, or a chart or table
3491
3545
  * generated from Search.
3546
+ * Payload: {@link VizScopedRequest}.
3492
3547
  * @param - Liveboard embed takes an object with `vizId` as a key.
3493
3548
  * Can be left empty if embedding Search or visualization.
3494
3549
  * @example
@@ -3517,6 +3572,7 @@ var HostEvent;
3517
3572
  /**
3518
3573
  * Trigger the **SpotIQ analyze** action on a
3519
3574
  * chart or table.
3575
+ * Payload: {@link VizScopedRequest}.
3520
3576
  * @param - Liveboard embed takes `vizId` as a
3521
3577
  * key. Can be left undefined when embedding Search or
3522
3578
  * visualization.
@@ -3579,6 +3635,7 @@ var HostEvent;
3579
3635
  /**
3580
3636
  * Trigger the **Download** > **PNG** action on
3581
3637
  * charts in the embedded view.
3638
+ * Payload: {@link VizScopedRequest}.
3582
3639
  * @example
3583
3640
  * ```js
3584
3641
  * liveboardEmbed.trigger(HostEvent.DownloadAsPng,
@@ -3610,6 +3667,7 @@ var HostEvent;
3610
3667
  /**
3611
3668
  * Trigger the **Download** > **CSV** action on tables in
3612
3669
  * the embedded view.
3670
+ * Payload: {@link VizScopedRequest}.
3613
3671
  * @param - `vizId` refers to the Visualization ID in Spotter embed and is required in Spotter embed.
3614
3672
  * @example
3615
3673
  * ```js
@@ -3649,6 +3707,7 @@ var HostEvent;
3649
3707
  /**
3650
3708
  * Trigger the **Download** > **XLSX** action on tables
3651
3709
  * in the embedded view.
3710
+ * Payload: {@link VizScopedRequest}.
3652
3711
  * @param - `vizId` refers to the Visualization ID in Spotter embed and is required in Spotter embed.
3653
3712
  * @example
3654
3713
  * ```js
@@ -3688,6 +3747,7 @@ var HostEvent;
3688
3747
  /**
3689
3748
  * Trigger the **Share** action on an embedded
3690
3749
  * Liveboard or Answer.
3750
+ * Payload: {@link VizScopedRequest}.
3691
3751
  * @example
3692
3752
  * ```js
3693
3753
  * liveboardEmbed.trigger(HostEvent.Share)
@@ -3714,6 +3774,7 @@ var HostEvent;
3714
3774
  * Trigger the **Save** action on a Liveboard, Answer, or Spotter.
3715
3775
  * Saves the changes.
3716
3776
  *
3777
+ * Payload: {@link VizScopedRequest}.
3717
3778
  * @param - `vizId` refers to the Spotter Visualization Id used in Spotter embed.
3718
3779
  * It is required and can be retrieved from the data embed event.
3719
3780
  *
@@ -3765,6 +3826,7 @@ var HostEvent;
3765
3826
  /**
3766
3827
  * Trigger the **Sync to Sheets** action on an embedded visualization or Answer
3767
3828
  * Sends data from an Answer or Liveboard visualization to a Google sheet.
3829
+ * Payload: {@link VizScopedRequest}.
3768
3830
  * @param - an object with `vizId` as a key
3769
3831
  * @example
3770
3832
  * ```js
@@ -3795,6 +3857,7 @@ var HostEvent;
3795
3857
  * Trigger the **Sync to Other Apps** action on an embedded visualization or Answer
3796
3858
  * Sends data from an Answer or Liveboard visualization to third-party apps such
3797
3859
  * as Slack, Salesforce, Microsoft Teams, ServiceNow and so on.
3860
+ * Payload: {@link VizScopedRequest}.
3798
3861
  * @param - an object with vizId as a key
3799
3862
  * @example
3800
3863
  * ```js
@@ -3825,6 +3888,7 @@ var HostEvent;
3825
3888
  * Trigger the **Manage pipelines** action on an embedded
3826
3889
  * visualization or Answer.
3827
3890
  * Allows users to manage ThoughtSpot Sync pipelines.
3891
+ * Payload: {@link VizScopedRequest}.
3828
3892
  * @param - an object with `vizId` as a key
3829
3893
  * @example
3830
3894
  * ```js
@@ -3853,6 +3917,7 @@ var HostEvent;
3853
3917
  HostEvent["ManagePipelines"] = "manage-pipeline";
3854
3918
  /**
3855
3919
  * Reset search operation on the Search or Answer page.
3920
+ * Payload: none.
3856
3921
  * @example
3857
3922
  * ```js
3858
3923
  * searchEmbed.trigger(HostEvent.ResetSearch)
@@ -3880,10 +3945,18 @@ var HostEvent;
3880
3945
  * whole Liveboard.
3881
3946
  * The `applicability` attribute is available from SDK: 1.53.0 |
3882
3947
  * ThoughtSpot: 26.10.0.cl.
3948
+ * Payload: {@link GetFiltersRequest}.
3949
+ * Response: {@link GetFiltersResponse}.
3883
3950
  * @example
3884
3951
  * ```js
3885
3952
  * const data = await liveboardEmbed.trigger(HostEvent.GetFilters);
3886
3953
  * console.log('data', data);
3954
+ * // {
3955
+ * // liveboardFilters: [ ... ],
3956
+ * // runtimeFilters: [
3957
+ * // { columnName: "Region", operator: "IN", values: ["West"] }
3958
+ * // ]
3959
+ * // }
3887
3960
  * ```
3888
3961
  * @example
3889
3962
  * ```js
@@ -3899,6 +3972,7 @@ var HostEvent;
3899
3972
  HostEvent["GetFilters"] = "getFilters";
3900
3973
  /**
3901
3974
  * Update one or several filters applied on a Liveboard.
3975
+ * Payload: {@link UpdateFiltersRequest}.
3902
3976
  * @param - Includes the following keys:
3903
3977
  * - `filter`: A single filter object containing column name, filter operator, and
3904
3978
  * values.
@@ -3907,9 +3981,9 @@ var HostEvent;
3907
3981
  *
3908
3982
  * Each filter object must include the following attributes:
3909
3983
  *
3910
- * `column` - Name of the column to filter on.
3984
+ * `columnName` - Name of the column to filter on.
3911
3985
  *
3912
- * `oper` - Filter operator, for example, EQ, IN, CONTAINS.
3986
+ * `operator` - Filter operator, for example, EQ, IN, CONTAINS.
3913
3987
  * For information about the supported filter operators,
3914
3988
  * see link:https://developers.thoughtspot.com/docs/runtime-filters#rtOperator[Developer Documentation].
3915
3989
  *
@@ -3936,8 +4010,8 @@ var HostEvent;
3936
4010
  *
3937
4011
  * liveboardEmbed.trigger(HostEvent.UpdateFilters, {
3938
4012
  * filter: {
3939
- * column: "item type",
3940
- * oper: "IN",
4013
+ * columnName: "item type",
4014
+ * operator: "IN",
3941
4015
  * values: ["bags","shirts"]
3942
4016
  * }
3943
4017
  * });
@@ -3947,8 +4021,8 @@ var HostEvent;
3947
4021
  *
3948
4022
  * liveboardEmbed.trigger(HostEvent.UpdateFilters, {
3949
4023
  * filter: {
3950
- * column: "date",
3951
- * oper: "EQ",
4024
+ * columnName: "date",
4025
+ * operator: "EQ",
3952
4026
  * values: ["JULY","2023"],
3953
4027
  * type: "MONTH_YEAR"
3954
4028
  * }
@@ -3959,18 +4033,18 @@ var HostEvent;
3959
4033
  * ```js
3960
4034
  * liveboardEmbed.trigger(HostEvent.UpdateFilters, {
3961
4035
  * filters: [{
3962
- * column: "Item Type",
3963
- * oper: 'IN',
4036
+ * columnName: "Item Type",
4037
+ * operator: 'IN',
3964
4038
  * values: ["bags","shirts"]
3965
4039
  * },
3966
4040
  * {
3967
- * column: "Region",
3968
- * oper: 'IN',
4041
+ * columnName: "Region",
4042
+ * operator: 'IN',
3969
4043
  * values: ["West","Midwest"]
3970
4044
  * },
3971
4045
  * {
3972
- * column: "Date",
3973
- * oper: 'EQ',
4046
+ * columnName: "Date",
4047
+ * operator: 'EQ',
3974
4048
  * values: ["2023-07-31"],
3975
4049
  * type: "EXACT_DATE"
3976
4050
  * }]
@@ -3984,13 +4058,13 @@ var HostEvent;
3984
4058
  * ```js
3985
4059
  * liveboardEmbed.trigger(HostEvent.UpdateFilters, {
3986
4060
  * filters: [{
3987
- * column: "(Sample) Retail - Apparel::city",
3988
- * oper: 'IN',
4061
+ * columnName: "(Sample) Retail - Apparel::city",
4062
+ * operator: 'IN',
3989
4063
  * values: ["atlanta"]
3990
4064
  * },
3991
4065
  * {
3992
- * column: "(Sample) Retail - Apparel::Region",
3993
- * oper: 'IN',
4066
+ * columnName: "(Sample) Retail - Apparel::Region",
4067
+ * operator: 'IN',
3994
4068
  * values: ["West","Midwest"]
3995
4069
  * }]
3996
4070
  * });
@@ -4001,8 +4075,8 @@ var HostEvent;
4001
4075
  * import { ContextType } from '@thoughtspot/visual-embed-sdk';
4002
4076
  * liveboardEmbed.trigger(HostEvent.UpdateFilters, {
4003
4077
  * filter: {
4004
- * column: "item type",
4005
- * oper: "IN",
4078
+ * columnName: "item type",
4079
+ * operator: "IN",
4006
4080
  * values: ["shoes", "boots"]
4007
4081
  * }
4008
4082
  * }, ContextType.Liveboard);
@@ -4012,8 +4086,8 @@ var HostEvent;
4012
4086
  * // Scope the filter to a specific Liveboard tab
4013
4087
  * liveboardEmbed.trigger(HostEvent.UpdateFilters, {
4014
4088
  * filter: {
4015
- * column: "item type",
4016
- * oper: "IN",
4089
+ * columnName: "item type",
4090
+ * operator: "IN",
4017
4091
  * values: ["bags", "shirts"],
4018
4092
  * applicability: {
4019
4093
  * level: "TAB",
@@ -4022,11 +4096,19 @@ var HostEvent;
4022
4096
  * }
4023
4097
  * });
4024
4098
  * ```
4099
+ * Use `columnName` and `operator` - the same spelling as
4100
+ * {@link RuntimeFilter}. The older `column` and `oper` spellings are
4101
+ * deprecated; they are still accepted, but pass only one spelling of each
4102
+ * field, never both. To reapply the filter state captured from
4103
+ * {@link EmbedEvent.FilterChanged}, use `convertFilterChangedToUpdateFiltersPayload`
4104
+ * to convert its payload into the shape expected here.
4025
4105
  * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
4026
4106
  */
4027
4107
  HostEvent["UpdateFilters"] = "updateFilters";
4028
4108
  /**
4029
4109
  * Get tab details for the current Liveboard.
4110
+ * Payload: none.
4111
+ * Response: {@link GetTabsResponse}.
4030
4112
  * @example
4031
4113
  * ```js
4032
4114
  * liveboardEmbed.trigger(HostEvent.GetTabs).then((tabDetails) => {
@@ -4052,6 +4134,8 @@ var HostEvent;
4052
4134
  /**
4053
4135
  * Get group details for the current Liveboard.
4054
4136
  * Mirrors {@link HostEvent.GetTabs} for filter/parameter groups.
4137
+ * Payload: none.
4138
+ * Response: {@link GetGroupsResponse}.
4055
4139
  * @example
4056
4140
  * ```js
4057
4141
  * liveboardEmbed.trigger(HostEvent.GetGroups).then((groupDetails) => {
@@ -4076,6 +4160,7 @@ var HostEvent;
4076
4160
  HostEvent["GetGroups"] = "getGroups";
4077
4161
  /**
4078
4162
  * Set the visible tabs on a Liveboard.
4163
+ * Payload: `string[]`.
4079
4164
  * @param - an array of ids of tabs to show, the IDs not passed
4080
4165
  * will be hidden.
4081
4166
  * @example
@@ -4098,6 +4183,7 @@ var HostEvent;
4098
4183
  HostEvent["SetVisibleTabs"] = "SetPinboardVisibleTabs";
4099
4184
  /**
4100
4185
  * Set the hidden tabs on a Liveboard.
4186
+ * Payload: `string[]`.
4101
4187
  * @param - an array of the IDs of the tabs to hide.
4102
4188
  * The IDs not passed will be shown.
4103
4189
  * @example
@@ -4126,6 +4212,8 @@ var HostEvent;
4126
4212
  * `getAnswerService()` method on the embed instance to get an AnswerService
4127
4213
  * object that provides a more convenient interface for working with answers.
4128
4214
  *
4215
+ * Payload: {@link GetAnswerSessionRequest}.
4216
+ * Response: {@link GetAnswerSessionResponse}.
4129
4217
  * @example
4130
4218
  * ```js
4131
4219
  * // Preferred way to get an AnswerService
@@ -4153,6 +4241,7 @@ var HostEvent;
4153
4241
  HostEvent["GetAnswerSession"] = "getAnswerSession";
4154
4242
  /**
4155
4243
  * Trigger the *Ask Sage* action for visualizations
4244
+ * Payload: {@link RequiredVizRequest}.
4156
4245
  * @example
4157
4246
  * ```js
4158
4247
  * liveboardEmbed.trigger(HostEvent.AskSage,
@@ -4164,6 +4253,7 @@ var HostEvent;
4164
4253
  /**
4165
4254
  * Trigger cross filter update action on a Liveboard.
4166
4255
  *
4256
+ * Payload: {@link UpdateCrossFilterRequest}.
4167
4257
  * @example
4168
4258
  * ```js
4169
4259
  * liveboardEmbed.trigger(HostEvent.UpdateCrossFilter, {
@@ -4179,7 +4269,9 @@ var HostEvent;
4179
4269
  HostEvent["UpdateCrossFilter"] = "UpdateCrossFilter";
4180
4270
  /**
4181
4271
  * Trigger reset action for a personalized Liveboard view.
4182
- * This event is deprecated. Use {@link HostEvent.ResetLiveboardPersonalizedView} instead.
4272
+ * This event is deprecated.
4273
+ * Use {@link HostEvent.ResetLiveboardPersonalizedView} instead.
4274
+ * Payload: none.
4183
4275
  * @example
4184
4276
  * ```js
4185
4277
  * liveboardEmbed.trigger(HostEvent.ResetLiveboardPersonalisedView);
@@ -4200,6 +4292,7 @@ var HostEvent;
4200
4292
  /**
4201
4293
  * Triggers an action to update Parameter values on embedded
4202
4294
  * Answers, Liveboard, and Spotter answer in Edit mode.
4295
+ * Payload: {@link RuntimeParameter}[].
4203
4296
  * @param - Includes the following keys for each item:
4204
4297
  * - `name`: Name of the parameter.
4205
4298
  * - `value`: The value to set for the parameter.
@@ -4257,6 +4350,8 @@ var HostEvent;
4257
4350
  * whole Liveboard.
4258
4351
  * The `applicability` attribute is available from SDK: 1.53.0 |
4259
4352
  * ThoughtSpot: 26.10.0.cl.
4353
+ * Payload: none.
4354
+ * Response: {@link GetParametersResponse}.
4260
4355
  * @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
4261
4356
  * ```js
4262
4357
  * liveboardEmbed.trigger(HostEvent.GetParameters).then((parameter) => {
@@ -4294,6 +4389,7 @@ var HostEvent;
4294
4389
  * ```js
4295
4390
  * liveboardEmbed.trigger(HostEvent.UpdatePersonalisedView, {viewId: '1234'})
4296
4391
  * ```
4392
+ * Payload: {@link PersonalisedViewRequest} (`viewId` only).
4297
4393
  * @example
4298
4394
  * ```js
4299
4395
  * // Update personalized view from liveboard context
@@ -4326,6 +4422,7 @@ var HostEvent;
4326
4422
  * If neither is provided, the Liveboard resets to the original/default view.
4327
4423
  * When a `viewName` is provided and multiple views share
4328
4424
  * the same name, the first match is selected.
4425
+ * Payload: {@link PersonalisedViewRequest}.
4329
4426
  * @example
4330
4427
  * ```js
4331
4428
  * liveboardEmbed.trigger(
@@ -4369,6 +4466,8 @@ var HostEvent;
4369
4466
  * If no parameters are specified, the save action is
4370
4467
  * triggered with a modal to prompt users to
4371
4468
  * add a name and description for the Answer.
4469
+ * Payload: {@link SaveAnswerRequest}.
4470
+ * Response: {@link SaveAnswerResponse}.
4372
4471
  * @param - Includes the following keys:
4373
4472
  * - `vizId`: Refers to the Answer ID in Spotter embed and is **required** in Spotter
4374
4473
  * embed.
@@ -4454,6 +4553,7 @@ var HostEvent;
4454
4553
  /**
4455
4554
  * Triggers a search operation with the search tokens specified in
4456
4555
  * the search query string in spotter embed.
4556
+ * Payload: {@link SpotterSearchRequest}.
4457
4557
  * @param - Includes the following keys:
4458
4558
  * - `query`: Text string in Natural Language format.
4459
4559
  * - `executeSearch`: Boolean to execute search and update search query.
@@ -4478,6 +4578,7 @@ var HostEvent;
4478
4578
  HostEvent["SpotterSearch"] = "SpotterSearch";
4479
4579
  /**
4480
4580
  * Edits the last prompt in spotter embed.
4581
+ * Payload: `string`.
4481
4582
  * @param - `query`: Text string
4482
4583
  * @example
4483
4584
  * ```js
@@ -4494,6 +4595,7 @@ var HostEvent;
4494
4595
  HostEvent["EditLastPrompt"] = "EditLastPrompt";
4495
4596
  /**
4496
4597
  * Opens the data source preview modal in Spotter Embed.
4598
+ * Payload: none.
4497
4599
  * @example
4498
4600
  * ```js
4499
4601
  * spotterEmbed.trigger(HostEvent.PreviewSpotterData);
@@ -4529,6 +4631,7 @@ var HostEvent;
4529
4631
  HostEvent["DataModelInstructions"] = "DataModelInstructions";
4530
4632
  /**
4531
4633
  * Resets the Spotter Embed Conversation.
4634
+ * Payload: none.
4532
4635
  * @example
4533
4636
  * ```js
4534
4637
  * spotterEmbed.trigger(HostEvent.ResetSpotterConversation);
@@ -4541,6 +4644,7 @@ var HostEvent;
4541
4644
  * `conversationId` is **mandatory** — you must pass the id of the
4542
4645
  * conversation to share. Also no-op when sharing is disabled
4543
4646
  * (enableShareConversation off) or when already in the read-only shared view.
4647
+ * Payload: {@link ConversationScopedRequest}.
4544
4648
  * @example
4545
4649
  * ```js
4546
4650
  * spotterEmbed.trigger(HostEvent.ShareSpotterConversation, { conversationId: 'abc' });
@@ -4550,6 +4654,7 @@ var HostEvent;
4550
4654
  HostEvent["ShareSpotterConversation"] = "ShareSpotterConversation";
4551
4655
  /**
4552
4656
  * Closes the Spotter share-conversation modal. No-op if none is open.
4657
+ * Payload: none.
4553
4658
  * @example
4554
4659
  * ```js
4555
4660
  * spotterEmbed.trigger(HostEvent.CloseSpotterShareConversation);
@@ -4559,6 +4664,7 @@ var HostEvent;
4559
4664
  HostEvent["CloseSpotterShareConversation"] = "CloseSpotterShareConversation";
4560
4665
  /**
4561
4666
  * Exits the read-only shared-conversation view.
4667
+ * Payload: none.
4562
4668
  * @example
4563
4669
  * ```js
4564
4670
  * spotterEmbed.trigger(HostEvent.ExitSpotterSharedConversation);
@@ -4568,6 +4674,7 @@ var HostEvent;
4568
4674
  HostEvent["ExitSpotterSharedConversation"] = "ExitSpotterSharedConversation";
4569
4675
  /**
4570
4676
  * Deletes the last prompt in spotter embed.
4677
+ * Payload: none.
4571
4678
  * @example
4572
4679
  * ```js
4573
4680
  * spotterEmbed.trigger(HostEvent.DeleteLastPrompt);
@@ -4577,6 +4684,7 @@ var HostEvent;
4577
4684
  HostEvent["DeleteLastPrompt"] = "DeleteLastPrompt";
4578
4685
  /**
4579
4686
  * Toggle the visualization to chart or table view.
4687
+ * Payload: {@link RequiredVizRequest}.
4580
4688
  * @param - `vizId ` refers to the Visualization ID in Spotter embed and is required.
4581
4689
  * @example
4582
4690
  * ```js
@@ -4615,6 +4723,7 @@ var HostEvent;
4615
4723
  HostEvent["VisibleEmbedCoordinates"] = "visibleEmbedCoordinates";
4616
4724
  /**
4617
4725
  * Trigger the *Spotter* action for visualizations present on the liveboard's vizzes.
4726
+ * Payload: {@link RequiredVizRequest}.
4618
4727
  * @param - `vizId` refers to the Visualization ID in Spotter embed and is required.
4619
4728
  * @example
4620
4729
  * ```js
@@ -4676,6 +4785,7 @@ var HostEvent;
4676
4785
  * instance. Contact your admin or ThoughtSpot Support to enable chat history on your
4677
4786
  * instance.
4678
4787
  *
4788
+ * Payload: {@link ConversationScopedRequest}.
4679
4789
  * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
4680
4790
  * @example
4681
4791
  * ```js
@@ -4693,6 +4803,7 @@ var HostEvent;
4693
4803
  * instance. Contact your admin or ThoughtSpot Support to enable chat history on your
4694
4804
  * instance.
4695
4805
  *
4806
+ * Payload: {@link ConversationScopedRequest}.
4696
4807
  * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
4697
4808
  * @example
4698
4809
  * ```js
@@ -4717,6 +4828,7 @@ var HostEvent;
4717
4828
  * Trigger the **Send Test Email** action in the Liveboard schedule modal.
4718
4829
  * Sends a test schedule email to self or all recipients.
4719
4830
  * Requires `isSendNowLiveboardSchedulingEnabled` to be enabled.
4831
+ * Payload: {@link ScheduleEmailRequest}.
4720
4832
  * @example
4721
4833
  * ```js
4722
4834
  * liveboardEmbed.trigger(HostEvent.SendTestScheduleEmail, {
@@ -4735,6 +4847,7 @@ var HostEvent;
4735
4847
  HostEvent["SendTestScheduleEmail"] = "sendTestScheduleEmail";
4736
4848
  /**
4737
4849
  * Sends a user message (prompt) to the SpotterViz panel programmatically.
4850
+ * Payload: `{ query: string }`.
4738
4851
  * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
4739
4852
  * @param query - the prompt text to send.
4740
4853
  * @example
@@ -4747,6 +4860,7 @@ var HostEvent;
4747
4860
  HostEvent["SpotterVizSendUserMessage"] = "SpotterVizSendUserMessage";
4748
4861
  /**
4749
4862
  * Initializes a new SpotterViz conversation.
4863
+ * Payload: none.
4750
4864
  * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
4751
4865
  * @example
4752
4866
  * ```js
@@ -4756,6 +4870,7 @@ var HostEvent;
4756
4870
  HostEvent["InitSpotterVizConversation"] = "InitSpotterVizConversation";
4757
4871
  /**
4758
4872
  * Opens the SpotterViz panel.
4873
+ * Payload: none.
4759
4874
  * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
4760
4875
  * @example
4761
4876
  * ```js
@@ -4765,6 +4880,7 @@ var HostEvent;
4765
4880
  HostEvent["OpenSpotterVizPanel"] = "OpenSpotterVizPanel";
4766
4881
  /**
4767
4882
  * Closes the SpotterViz panel.
4883
+ * Payload: none.
4768
4884
  * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
4769
4885
  * @example
4770
4886
  * ```js
@@ -4775,6 +4891,7 @@ var HostEvent;
4775
4891
  /**
4776
4892
  * Clears browser cache and fetches new data for liveboard ChartViz Containers.
4777
4893
  * Requires `enableLiveboardDataCache` to be enabled.
4894
+ * Payload: {@link ScheduleEmailRequest}.
4778
4895
  * @example
4779
4896
  * ```js
4780
4897
  * liveboardEmbed.trigger(HostEvent.RefreshLiveboardBrowserCache);
@@ -4970,8 +5087,8 @@ var Param;
4970
5087
  Param["IsStarterPromptsEnabled"] = "enableStarterPrompts";
4971
5088
  Param["UpdatedSpotterExperience"] = "updatedSpotterExperience";
4972
5089
  Param["SpotterDataSources"] = "spotterDataSources";
4973
- Param["AnalystId"] = "analystId";
4974
5090
  Param["OpenSpotterOnLiveboardByDefault"] = "openSpotterOnLiveboardByDefault";
5091
+ Param["ShowAnswerEditPanel"] = "showAnswerEditPanel";
4975
5092
  })(Param || (Param = {}));
4976
5093
  /**
4977
5094
  * ThoughtSpot application pages include actions and menu commands
@@ -6976,6 +7093,237 @@ var Action;
6976
7093
  * ```
6977
7094
  */
6978
7095
  Action["SpotterOnLiveboard"] = "spotterOnLiveboard";
7096
+ /**
7097
+ * Controls the visibility and disabled state of the "Chart Type" menu item
7098
+ * in Chart Settings V2.
7099
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
7100
+ * @example
7101
+ * ```js
7102
+ * {
7103
+ * hiddenActions: [Action.ChartTypeSettings],
7104
+ * disabledActions: [Action.ChartTypeSettings],
7105
+ * }
7106
+ * ```
7107
+ */
7108
+ Action["ChartTypeSettings"] = "CHART_TYPE";
7109
+ /**
7110
+ * Controls the visibility and disabled state of the "Layout" menu item
7111
+ * in Chart Settings V2.
7112
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
7113
+ * @example
7114
+ * ```js
7115
+ * {
7116
+ * hiddenActions: [Action.LayoutSettings],
7117
+ * disabledActions: [Action.LayoutSettings],
7118
+ * }
7119
+ * ```
7120
+ */
7121
+ Action["LayoutSettings"] = "LAYOUT";
7122
+ /**
7123
+ * Controls the visibility and disabled state of the "Column" menu item
7124
+ * in Chart Settings V2.
7125
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
7126
+ * @example
7127
+ * ```js
7128
+ * {
7129
+ * hiddenActions: [Action.ColumnSettings],
7130
+ * disabledActions: [Action.ColumnSettings],
7131
+ * }
7132
+ * ```
7133
+ */
7134
+ Action["ColumnSettings"] = "COLUMN";
7135
+ /**
7136
+ * Controls the visibility and disabled state of the "Axis" menu item
7137
+ * in Chart Settings V2.
7138
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
7139
+ * @example
7140
+ * ```js
7141
+ * {
7142
+ * hiddenActions: [Action.AxisSettings],
7143
+ * disabledActions: [Action.AxisSettings],
7144
+ * }
7145
+ * ```
7146
+ */
7147
+ Action["AxisSettings"] = "AXIS";
7148
+ /**
7149
+ * Controls the visibility and disabled state of the "Data Label" menu item
7150
+ * in Chart Settings V2.
7151
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
7152
+ * @example
7153
+ * ```js
7154
+ * {
7155
+ * hiddenActions: [Action.DataLabelSettings],
7156
+ * disabledActions: [Action.DataLabelSettings],
7157
+ * }
7158
+ * ```
7159
+ */
7160
+ Action["DataLabelSettings"] = "DATA_LABEL";
7161
+ /**
7162
+ * Controls the visibility and disabled state of the "Tooltip" menu item
7163
+ * in Chart Settings V2.
7164
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
7165
+ * @example
7166
+ * ```js
7167
+ * {
7168
+ * hiddenActions: [Action.TooltipSettings],
7169
+ * disabledActions: [Action.TooltipSettings],
7170
+ * }
7171
+ * ```
7172
+ */
7173
+ Action["TooltipSettings"] = "TOOLTIP";
7174
+ /**
7175
+ * Controls the visibility and disabled state of the "Legend" menu item
7176
+ * in Chart Settings V2.
7177
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
7178
+ * @example
7179
+ * ```js
7180
+ * {
7181
+ * hiddenActions: [Action.LegendSettings],
7182
+ * disabledActions: [Action.LegendSettings],
7183
+ * }
7184
+ * ```
7185
+ */
7186
+ Action["LegendSettings"] = "LEGEND";
7187
+ /**
7188
+ * Controls the visibility and disabled state of the "Display" menu item
7189
+ * in Chart Settings V2.
7190
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
7191
+ * @example
7192
+ * ```js
7193
+ * {
7194
+ * hiddenActions: [Action.DisplaySettings],
7195
+ * disabledActions: [Action.DisplaySettings],
7196
+ * }
7197
+ * ```
7198
+ */
7199
+ Action["DisplaySettings"] = "DISPLAY";
7200
+ /**
7201
+ * Controls the visibility and disabled state of the "Query Details" menu
7202
+ * item in Chart Settings V2.
7203
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
7204
+ * @example
7205
+ * ```js
7206
+ * {
7207
+ * hiddenActions: [Action.QuerySettings],
7208
+ * disabledActions: [Action.QuerySettings],
7209
+ * }
7210
+ * ```
7211
+ */
7212
+ Action["QuerySettings"] = "QUERY_DETAILS";
7213
+ /**
7214
+ * Controls the visibility and disabled state of the "Custom Action" menu
7215
+ * item in Chart Settings V2.
7216
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
7217
+ * @example
7218
+ * ```js
7219
+ * {
7220
+ * hiddenActions: [Action.CustomSettings],
7221
+ * disabledActions: [Action.CustomSettings],
7222
+ * }
7223
+ * ```
7224
+ */
7225
+ Action["CustomSettings"] = "CUSTOM_ACTION";
7226
+ /**
7227
+ * Controls the visibility and disabled state of the "Muze AI" menu item
7228
+ * in Chart Settings V2.
7229
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
7230
+ * @example
7231
+ * ```js
7232
+ * {
7233
+ * hiddenActions: [Action.MuzeAiSettings],
7234
+ * disabledActions: [Action.MuzeAiSettings],
7235
+ * }
7236
+ * ```
7237
+ */
7238
+ Action["MuzeAiSettings"] = "MUZE_AI";
7239
+ /**
7240
+ * Controls the visibility and disabled state of the "R Analysis" menu item
7241
+ * in Chart Settings V2.
7242
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
7243
+ * @example
7244
+ * ```js
7245
+ * {
7246
+ * hiddenActions: [Action.RAnalysisSettings],
7247
+ * disabledActions: [Action.RAnalysisSettings],
7248
+ * }
7249
+ * ```
7250
+ */
7251
+ Action["RAnalysisSettings"] = "R_ANALYSIS";
7252
+ /**
7253
+ * Controls the visibility and disabled state of the "Add to Collection" menu item.
7254
+ * @version SDK: 1.52.1 | ThoughtSpot Cloud: 26.5.0.cl
7255
+ * @example
7256
+ * ```js
7257
+ * {
7258
+ * hiddenActions: [Action.AddToCollection],
7259
+ * disabledActions: [Action.AddToCollection],
7260
+ * }
7261
+ * ```
7262
+ */
7263
+ Action["AddToCollection"] = "addToCollection";
7264
+ /**
7265
+ * Controls the visibility and disabled state of the "Create Collection" button.
7266
+ * @version SDK: 1.52.1 | ThoughtSpot Cloud: 26.5.0.cl
7267
+ * @example
7268
+ * ```js
7269
+ * {
7270
+ * hiddenActions: [Action.CreateCollection],
7271
+ * disabledActions: [Action.CreateCollection],
7272
+ * }
7273
+ * ```
7274
+ */
7275
+ Action["CreateCollection"] = "createCollection";
7276
+ /**
7277
+ * Controls the visibility and disabled state of the "Move" menu item in a
7278
+ * Collection.
7279
+ * @version SDK: 1.52.1 | ThoughtSpot Cloud: 26.5.0.cl
7280
+ * @example
7281
+ * ```js
7282
+ * {
7283
+ * hiddenActions: [Action.MoveToCollection],
7284
+ * disabledActions: [Action.MoveToCollection],
7285
+ * }
7286
+ * ```
7287
+ */
7288
+ Action["MoveToCollection"] = "moveToCollection";
7289
+ /**
7290
+ * Controls the visibility and disabled state of the "Remove" menu item in a
7291
+ * Collection.
7292
+ * @version SDK: 1.52.1 | ThoughtSpot Cloud: 26.5.0.cl
7293
+ * @example
7294
+ * ```js
7295
+ * {
7296
+ * hiddenActions: [Action.RemoveFromCollection],
7297
+ * disabledActions: [Action.RemoveFromCollection],
7298
+ * }
7299
+ * ```
7300
+ */
7301
+ Action["RemoveFromCollection"] = "removeFromCollection";
7302
+ /**
7303
+ * Controls the visibility and disabled state of the "Delete" menu item for a
7304
+ * Collection.
7305
+ * @version SDK: 1.52.1 | ThoughtSpot Cloud: 26.5.0.cl
7306
+ * @example
7307
+ * ```js
7308
+ * {
7309
+ * hiddenActions: [Action.DeleteCollection],
7310
+ * disabledActions: [Action.DeleteCollection],
7311
+ * }
7312
+ * ```
7313
+ */
7314
+ Action["DeleteCollection"] = "deleteCollection";
7315
+ /**
7316
+ * Controls the visibility of the "Customize homepage" button on the
7317
+ * embedded home page.
7318
+ * @version SDK: 1.55.0 | ThoughtSpot Cloud: 26.12.0.cl
7319
+ * @example
7320
+ * ```js
7321
+ * {
7322
+ * hiddenActions: [Action.CustomizeHomepage],
7323
+ * }
7324
+ * ```
7325
+ */
7326
+ Action["CustomizeHomepage"] = "customizeHomepage";
6979
7327
  })(Action || (Action = {}));
6980
7328
  var PrefetchFeatures;
6981
7329
  (function (PrefetchFeatures) {
@@ -7480,7 +7828,7 @@ var TableContentDensity;
7480
7828
  TableContentDensity["Compact"] = "COMPACT";
7481
7829
  })(TableContentDensity || (TableContentDensity = {}));
7482
7830
 
7483
- var version$1="1.52.0";var pkg = {version:version$1};
7831
+ var version$1="1.52.2-beta";var pkg = {version:version$1};
7484
7832
 
7485
7833
  const { version } = pkg;
7486
7834
 
@@ -7584,7 +7932,7 @@ const ERROR_MESSAGE = {
7584
7932
  SSR_ENVIRONMENT_ERROR: 'SSR environment detected. This function cannot be called in SSR environment.',
7585
7933
  UPDATE_PARAMS_FAILED: 'Failed to update embed parameters',
7586
7934
  INVALID_SPOTTER_DOCUMENTATION_URL: 'Invalid spotterDocumentationUrl. Please provide a valid http or https URL.',
7587
- UPDATEFILTERS_INVALID_PAYLOAD: 'UpdateFilters requires a valid filter or filters array. Expected: { filter: { column, oper, values } } or { filters: [{ column, oper, values }, ...] }',
7935
+ UPDATEFILTERS_INVALID_PAYLOAD: 'UpdateFilters requires a valid filter or filters array. Expected: { filter: { columnName, operator, values } } or { filters: [{ columnName, operator, values }, ...] }',
7588
7936
  DRILLDOWN_INVALID_PAYLOAD: 'DrillDown requires a valid points object. Expected: { points: { clickedPoint?, selectedPoints? }, autoDrillDown?, vizId? }',
7589
7937
  UPDATEPARAMETERS_INVALID_PAYLOAD: 'UpdateParameters received an invalid applicability. Expected: { level: LIVEBOARD | TAB | GROUP, targetId } where targetId is required for TAB and GROUP levels',
7590
7938
  };
@@ -8233,6 +8581,43 @@ const setParamIfDefined = (queryParams, param, value, asBoolean = false) => {
8233
8581
  if (value !== undefined) {
8234
8582
  queryParams[param] = asBoolean ? !!value : value;
8235
8583
  }
8584
+ };
8585
+ /**
8586
+ * Calculates the element center for the currently visible viewport of the
8587
+ * element, using the scroll position of the host app, the offsetTop of the
8588
+ * element in the host app, and the viewport height of the tab.
8589
+ *
8590
+ * The returned keys are sent to the ThoughtSpot app over postMessage, so they
8591
+ * are named after the iframe and must not be renamed.
8592
+ * @param element The element to measure
8593
+ * @returns The element center within the visible viewport, the element height,
8594
+ * and the viewport height.
8595
+ */
8596
+ const calculateElementCenter = (element) => {
8597
+ const offsetTopClient = getOffsetTop(element);
8598
+ const scrollTopClient = window.scrollY;
8599
+ const viewPortHeight = window.innerHeight;
8600
+ const iframeHeight = element.offsetHeight;
8601
+ const iframeScrolled = scrollTopClient - offsetTopClient;
8602
+ let iframeVisibleViewPort;
8603
+ let iframeOffset;
8604
+ if (iframeScrolled < 0) {
8605
+ iframeVisibleViewPort = viewPortHeight - (offsetTopClient - scrollTopClient);
8606
+ iframeVisibleViewPort = Math.min(iframeHeight, iframeVisibleViewPort);
8607
+ iframeOffset = 0;
8608
+ }
8609
+ else {
8610
+ iframeVisibleViewPort = Math.min(iframeHeight - iframeScrolled, viewPortHeight);
8611
+ iframeOffset = iframeScrolled;
8612
+ }
8613
+ const iframeCenter = iframeOffset + iframeVisibleViewPort / 2;
8614
+ return {
8615
+ iframeCenter,
8616
+ iframeScrolled,
8617
+ iframeHeight,
8618
+ viewPortHeight,
8619
+ iframeVisibleViewPort,
8620
+ };
8236
8621
  };
8237
8622
 
8238
8623
  /** Used for built-in method references. */
@@ -9143,7 +9528,110 @@ var UIPassthroughEvent;
9143
9528
  UIPassthroughEvent["GetTabs"] = "getTabs";
9144
9529
  UIPassthroughEvent["GetGroups"] = "getGroups";
9145
9530
  UIPassthroughEvent["GetExportRequestForCurrentPinboard"] = "getExportRequestForCurrentPinboard";
9146
- })(UIPassthroughEvent || (UIPassthroughEvent = {}));
9531
+ })(UIPassthroughEvent || (UIPassthroughEvent = {}));
9532
+ // NOTE: HostEventRequest / HostEventResponse / TriggerPayload / TriggerResponse
9533
+ // live in the sibling ./host-event-contracts, which layers the
9534
+ // HostEventRequestMap on top of the UI-passthrough mapping above.
9535
+ // The former 2-tier definitions that lived here were superseded and removed.
9536
+
9537
+ /**
9538
+ * Copyright (c) 2026
9539
+ *
9540
+ * Dedicated transport layer for SDK <-> ThoughtSpot iframe messaging.
9541
+ *
9542
+ * Owns the postMessage/MessageChannel mechanics and origin resolution so
9543
+ * that embed/business logic (ts-embed.ts, hostEventClient) never touches
9544
+ * the wire directly. The wire format is unchanged from the historical
9545
+ * implementation — this layer is a pure structural extraction.
9546
+ */
9547
+ /**
9548
+ * Default time to wait for the app to respond to a request-response
9549
+ * message before giving up and reclaiming the channel.
9550
+ */
9551
+ const MESSAGE_RESPONSE_TIMEOUT = 30000;
9552
+ /**
9553
+ * Single implementation of origin resolution for the embedded app.
9554
+ * Returns the origin (scheme://host[:port]) for a ThoughtSpot host URL,
9555
+ * or null when it cannot be parsed.
9556
+ * @param thoughtSpotHost
9557
+ */
9558
+ const resolveMessageOrigin = (thoughtSpotHost) => {
9559
+ try {
9560
+ return new URL(thoughtSpotHost).origin;
9561
+ }
9562
+ catch (e) {
9563
+ return null;
9564
+ }
9565
+ };
9566
+ /**
9567
+ * Validates that an inbound window message came from the embedded
9568
+ * ThoughtSpot app: the source window must be the embed iframe's window and,
9569
+ * when the expected origin is resolvable, the message origin must match it.
9570
+ *
9571
+ * Fails open (returns true) on the origin check when the expected origin
9572
+ * cannot be resolved, to avoid breaking unconventional-but-working setups;
9573
+ * a warning is logged on mismatch either way.
9574
+ * @param event The message event received on window.
9575
+ * @param iFrame The embed iframe the message should originate from.
9576
+ * @param thoughtSpotHost The configured ThoughtSpot host.
9577
+ */
9578
+ const isMessageFromIframe = (event, iFrame, thoughtSpotHost) => {
9579
+ if (event.source !== (iFrame === null || iFrame === void 0 ? void 0 : iFrame.contentWindow)) {
9580
+ return false;
9581
+ }
9582
+ const expectedOrigin = resolveMessageOrigin(thoughtSpotHost);
9583
+ if (expectedOrigin && event.origin && event.origin !== expectedOrigin) {
9584
+ logger$3.warn(`Dropped message from unexpected origin ${event.origin}; expected ${expectedOrigin}`);
9585
+ return false;
9586
+ }
9587
+ return true;
9588
+ };
9589
+ /**
9590
+ * Posts a one-way message to the embedded app's iframe, optionally
9591
+ * transferring a MessageChannel port for the response.
9592
+ * @param iFrame
9593
+ * @param message
9594
+ * @param thoughtSpotHost Used as the postMessage targetOrigin.
9595
+ * @param channel
9596
+ */
9597
+ const postMessageToIframe = (iFrame, message, thoughtSpotHost, channel) => {
9598
+ var _a;
9599
+ return (_a = iFrame.contentWindow) === null || _a === void 0 ? void 0 : _a.postMessage(message, thoughtSpotHost, channel ? [channel.port2] : []);
9600
+ };
9601
+ /**
9602
+ * Sends a request-response message to the embedded app over a dedicated
9603
+ * MessageChannel. Resolves with the response payload; rejects when the app
9604
+ * responds with an error; resolves with a timeout Error object when no
9605
+ * response arrives in time (historical behavior, preserved for backward
9606
+ * compatibility).
9607
+ * @param iFrame
9608
+ * @param message
9609
+ * @param thoughtSpotHost
9610
+ * @param timeoutMs
9611
+ */
9612
+ function sendMessageWithResponse(iFrame, message, thoughtSpotHost, timeoutMs = MESSAGE_RESPONSE_TIMEOUT) {
9613
+ return new Promise((res, rej) => {
9614
+ const channel = new MessageChannel();
9615
+ // Close the messageChannel and resolve the promise if timeout.
9616
+ const timeoutId = setTimeout(() => {
9617
+ channel.port1.close();
9618
+ res(new Error(ERROR_MESSAGE.TRIGGER_TIMED_OUT));
9619
+ }, timeoutMs);
9620
+ channel.port1.onmessage = ({ data: responseData }) => {
9621
+ var _a;
9622
+ clearTimeout(timeoutId);
9623
+ channel.port1.close();
9624
+ 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);
9625
+ if (error) {
9626
+ rej(error);
9627
+ }
9628
+ else {
9629
+ res(responseData);
9630
+ }
9631
+ };
9632
+ postMessageToIframe(iFrame, message, thoughtSpotHost, channel);
9633
+ });
9634
+ }
9147
9635
 
9148
9636
  const EndPoints = {
9149
9637
  AUTH_VERIFICATION: '/callosum/v1/session/info',
@@ -10077,7 +10565,7 @@ class AnswerService {
10077
10565
  async getTML() {
10078
10566
  const { object } = await this.executeQuery(getAnswerTML, {});
10079
10567
  const edoc = object[0].edoc;
10080
- const YAML = await import('./index-BMppCU63.js');
10568
+ const YAML = await import('./index-CcBYlGo9.js');
10081
10569
  const parsedDoc = YAML.parse(edoc);
10082
10570
  return {
10083
10571
  answer: {
@@ -20353,23 +20841,11 @@ const reload = (iFrame) => {
20353
20841
  iFrame.src = src;
20354
20842
  }, 100);
20355
20843
  };
20844
+ const TRIGGER_TIMEOUT = MESSAGE_RESPONSE_TIMEOUT;
20356
20845
  /**
20357
- * Post iframe message.
20358
- * @param iFrame
20359
- * @param message
20360
- * @param message.type
20361
- * @param message.data
20362
- * @param message.context
20363
- * @param thoughtSpotHost
20364
- * @param channel
20365
- */
20366
- function postIframeMessage(iFrame, message, thoughtSpotHost, channel) {
20367
- var _a;
20368
- return (_a = iFrame.contentWindow) === null || _a === void 0 ? void 0 : _a.postMessage(message, thoughtSpotHost, [channel === null || channel === void 0 ? void 0 : channel.port2]);
20369
- }
20370
- const TRIGGER_TIMEOUT = 30000;
20371
- /**
20372
- *
20846
+ * Processes a host event trigger: handles SDK-local events (Reload,
20847
+ * Present) and forwards everything else to the embedded app over the
20848
+ * iframe transport.
20373
20849
  * @param iFrame
20374
20850
  * @param messageType
20375
20851
  * @param thoughtSpotHost
@@ -20377,42 +20853,22 @@ const TRIGGER_TIMEOUT = 30000;
20377
20853
  * @param context
20378
20854
  */
20379
20855
  function processTrigger(iFrame, messageType, thoughtSpotHost, data, context) {
20380
- return new Promise((res, rej) => {
20381
- var _a;
20382
- if (messageType === HostEvent.Reload) {
20383
- reload(iFrame);
20384
- return res(null);
20385
- }
20386
- if (messageType === HostEvent.Present) {
20387
- const embedConfig = getEmbedConfig();
20388
- const disableFullscreenPresentation = (_a = embedConfig === null || embedConfig === void 0 ? void 0 : embedConfig.disableFullscreenPresentation) !== null && _a !== void 0 ? _a : true;
20389
- if (!disableFullscreenPresentation) {
20390
- handlePresentEvent(iFrame);
20391
- }
20392
- else {
20393
- logger$3.warn('Fullscreen presentation mode is disabled. Set disableFullscreenPresentation: false to enable this feature.');
20394
- }
20856
+ var _a;
20857
+ if (messageType === HostEvent.Reload) {
20858
+ reload(iFrame);
20859
+ return Promise.resolve(null);
20860
+ }
20861
+ if (messageType === HostEvent.Present) {
20862
+ const embedConfig = getEmbedConfig();
20863
+ const disableFullscreenPresentation = (_a = embedConfig === null || embedConfig === void 0 ? void 0 : embedConfig.disableFullscreenPresentation) !== null && _a !== void 0 ? _a : true;
20864
+ if (!disableFullscreenPresentation) {
20865
+ handlePresentEvent(iFrame);
20395
20866
  }
20396
- const channel = new MessageChannel();
20397
- // Close the messageChannel and resolve the promise if timeout.
20398
- const timeoutId = setTimeout(() => {
20399
- channel.port1.close();
20400
- res(new Error(ERROR_MESSAGE.TRIGGER_TIMED_OUT));
20401
- }, TRIGGER_TIMEOUT);
20402
- channel.port1.onmessage = ({ data: responseData }) => {
20403
- var _a;
20404
- clearTimeout(timeoutId);
20405
- channel.port1.close();
20406
- 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);
20407
- if (error) {
20408
- rej(error);
20409
- }
20410
- else {
20411
- res(responseData);
20412
- }
20413
- };
20414
- return postIframeMessage(iFrame, { type: messageType, data, context }, thoughtSpotHost, channel);
20415
- });
20867
+ else {
20868
+ logger$3.warn('Fullscreen presentation mode is disabled. Set disableFullscreenPresentation: false to enable this feature.');
20869
+ }
20870
+ }
20871
+ return sendMessageWithResponse(iFrame, { type: messageType, data, context }, thoughtSpotHost, TRIGGER_TIMEOUT);
20416
20872
  }
20417
20873
 
20418
20874
  /**
@@ -20903,7 +21359,8 @@ var isUndefined_1 = isUndefined;
20903
21359
  const isValidApplicability = (a) => {
20904
21360
  if (isUndefined_1(a))
20905
21361
  return true;
20906
- // targetId is not required at LIVEBOARD level, since the filter applies to the whole Liveboard
21362
+ // targetId is not required at LIVEBOARD level, since the filter applies to
21363
+ // the whole Liveboard
20907
21364
  return isPlainObject_1(a)
20908
21365
  && Object.values(ApplicabilityLevel).includes(a.level)
20909
21366
  && (a.level === ApplicabilityLevel.Liveboard || (isString_1(a.targetId) && a.targetId.trim().length > 0));
@@ -20922,8 +21379,52 @@ function isValidUpdateFiltersPayload(payload) {
20922
21379
  const hasValidFilters = Array.isArray(payload.filters) && payload.filters.length > 0 && payload.filters.every(isValidFilter);
20923
21380
  return !!(hasValidFilter || hasValidFilters);
20924
21381
  }
21382
+ /**
21383
+ * Rewrites one filter's `columnName`/`operator` to `column`/`oper`.
21384
+ *
21385
+ * Callers may use either spelling: `columnName`/`operator` match
21386
+ * {@link RuntimeFilter} and the `EmbedEvent.FilterChanged` payload, so a
21387
+ * converted payload can be replayed as-is. But the payload is forwarded to the
21388
+ * embedded app unchanged, and only `column`/`oper` are known to be understood
21389
+ * there - so the alias must be swapped here, or it would pass validation and
21390
+ * then be silently ignored.
21391
+ *
21392
+ * If a caller supplies both spellings of a field - which TypeScript rejects,
21393
+ * but JavaScript callers can still do - the documented `columnName`/`operator`
21394
+ * wins. Deferring to the deprecated spelling would quietly discard the value
21395
+ * the rest of the SDK tells people to use.
21396
+ * @param filter One entry from the UpdateFilters payload.
21397
+ */
21398
+ function resolveFilterAliases(filter) {
21399
+ var _a, _b;
21400
+ if (!isPlainObject_1(filter))
21401
+ return filter;
21402
+ const column = (_a = filter.columnName) !== null && _a !== void 0 ? _a : filter.column;
21403
+ const oper = (_b = filter.operator) !== null && _b !== void 0 ? _b : filter.oper;
21404
+ const { columnName, operator, ...rest } = filter;
21405
+ return {
21406
+ ...rest,
21407
+ ...(isUndefined_1(column) ? {} : { column }),
21408
+ ...(isUndefined_1(oper) ? {} : { oper }),
21409
+ };
21410
+ }
21411
+ /**
21412
+ * Rewrites every filter in an UpdateFilters payload to use `column`/`oper`,
21413
+ * whichever spelling the caller supplied. Call after validation.
21414
+ * @param payload The UpdateFilters host event payload.
21415
+ */
21416
+ function resolveUpdateFiltersAliases(payload) {
21417
+ if (!isPlainObject_1(payload))
21418
+ return payload;
21419
+ return {
21420
+ ...payload,
21421
+ ...(payload.filter ? { filter: resolveFilterAliases(payload.filter) } : {}),
21422
+ ...(Array.isArray(payload.filters) ? { filters: payload.filters.map(resolveFilterAliases) } : {}),
21423
+ };
21424
+ }
20925
21425
  function isValidUpdateParametersPayload(payload) {
20926
- // Only validates the applicability of each parameter (null treated as absent); the rest is forwarded as-is for backward compatibility.
21426
+ // Only validates the applicability of each parameter (null treated as
21427
+ // absent); the rest is forwarded as-is for backward compatibility.
20927
21428
  if (!Array.isArray(payload))
20928
21429
  return true;
20929
21430
  return payload.every((p) => {
@@ -20971,7 +21472,8 @@ function throwUpdateParametersValidationError() {
20971
21472
  /**
20972
21473
  * Maps HostEvent to its corresponding UIPassthroughEvent.
20973
21474
  * Includes both custom-handler events (Pin, SaveAnswer, UpdateFilters, DrillDown)
20974
- * and getter events (GetAnswerSession, GetFilters, etc.) that use getDataWithPassthroughFallback.
21475
+ * and getter events (GetAnswerSession, GetFilters, etc.) that use
21476
+ * getDataWithPassthroughFallback.
20975
21477
  */
20976
21478
  const PASSTHROUGH_MAP = {
20977
21479
  // Custom handlers (setters with special logic)
@@ -21121,13 +21623,22 @@ class HostEventClient {
21121
21623
  if (!isValidUpdateFiltersPayload(payload)) {
21122
21624
  throwUpdateFiltersValidationError();
21123
21625
  }
21124
- return this.handleHostEventWithParam(UIPassthroughEvent.UpdateFilters, payload, context);
21626
+ // The shared contract accepts both current (columnName/operator) and
21627
+ // legacy (column/oper) filter field names, but only the legacy pair is
21628
+ // understood downstream, so the payload is rewritten before it is
21629
+ // forwarded — otherwise a columnName/operator filter passes validation
21630
+ // here and is then silently ignored by the app. The cast bridges the
21631
+ // UIPassthrough FilterUpdate type, which still declares only the legacy
21632
+ // names.
21633
+ const resolvedPayload = resolveUpdateFiltersAliases(payload);
21634
+ return this.handleHostEventWithParam(UIPassthroughEvent.UpdateFilters, resolvedPayload, context);
21125
21635
  }
21126
21636
  handleUpdateParametersEvent(payload, context) {
21127
21637
  if (!isValidUpdateParametersPayload(payload)) {
21128
21638
  throwUpdateParametersValidationError();
21129
21639
  }
21130
- // UpdateParameters has no UI passthrough contract; dispatch over the legacy channel
21640
+ // UpdateParameters has no UI passthrough contract; dispatch over the
21641
+ // legacy channel
21131
21642
  return this.hostEventFallback(HostEvent.UpdateParameters, payload, context);
21132
21643
  }
21133
21644
  handleDrillDownEvent(payload, context) {
@@ -21138,8 +21649,8 @@ class HostEventClient {
21138
21649
  }
21139
21650
  /**
21140
21651
  * Dispatches a host event using the appropriate channel:
21141
- * 1. If the embedded app supports UI passthrough for this event, use it (custom handler or getter).
21142
- * 2. Otherwise fall back to the legacy host event channel.
21652
+ * 1. If the embedded app supports UI passthrough for this event, use it (custom
21653
+ * handler or getter). 2. Otherwise fall back to the legacy host event channel.
21143
21654
  *
21144
21655
  * @param hostEvent - The host event to trigger
21145
21656
  * @param payload - Optional payload for the event
@@ -21148,7 +21659,8 @@ class HostEventClient {
21148
21659
  async triggerHostEvent(hostEvent, payload, context) {
21149
21660
  const customHandler = this.customHandlers[hostEvent];
21150
21661
  const passthroughEvent = PASSTHROUGH_MAP[hostEvent];
21151
- // If embedded app supports passthrough but not this event, use legacy channel
21662
+ // If embedded app supports passthrough but not this event, use legacy
21663
+ // channel
21152
21664
  const keys = passthroughEvent ? await this.getAvailableUIPassthroughKeys(context) : [];
21153
21665
  if (passthroughEvent && keys.length > 0 && !keys.includes(passthroughEvent)) {
21154
21666
  return this.hostEventFallback(hostEvent, payload, context);
@@ -21355,6 +21867,63 @@ const TS_EMBED_ID = '_thoughtspot-embed';
21355
21867
  */
21356
21868
  const PRERENDER_CONTAINER_ORIGINAL_POSITION_KEY = 'tsEmbedOriginalPosition';
21357
21869
  const PRERENDER_WRAPPER_ID_PREFIX = 'tsEmbed-pre-render-wrapper-';
21870
+ // The container applies UpdateEmbedParams through React state, so a delivered
21871
+ // post is not the same as the params being in effect.
21872
+ const UPDATE_EMBED_PARAMS_SETTLE_MS = 200;
21873
+ // The container ignores runtimeFilterParams/runtimeParameterParams unless
21874
+ // truthy, so null or '' leaves the previous embed's values in place. '&' is
21875
+ // truthy and parses to {}.
21876
+ const NO_RUNTIME_PARAMS = '&';
21877
+ /**
21878
+ * Query parameters that stay on the iframe `src` while config is excluded from
21879
+ * the URL, which is the default unless the embed sets the
21880
+ * `excludeConfigFromURL` additional flag to `false`. These are the parameters the
21881
+ * application shell needs before it can receive a postMessage at all: the
21882
+ * embed marker, the host application URL used to validate the message origin,
21883
+ * the SDK version, the flags that pick the authentication flow, and the
21884
+ * boot-time settings that would otherwise be applied a frame late (viewport,
21885
+ * log level, locale, formatting and org). Everything else is delivered over
21886
+ * `HostEvent.UpdateEmbedParams`.
21887
+ * @internal
21888
+ */
21889
+ const BOOTSTRAP_URL_PARAMS = new Set([
21890
+ Param.EmbedApp,
21891
+ Param.HostAppUrl,
21892
+ Param.Version,
21893
+ Param.AuthType,
21894
+ Param.AutoLogin,
21895
+ Param.DisableLoginRedirect,
21896
+ Param.ForceSAMLAutoRedirect,
21897
+ Param.cookieless,
21898
+ Param.preAuthCache,
21899
+ Param.blockNonEmbedFullAppAccess,
21900
+ Param.OverrideOrgId,
21901
+ Param.ViewPortHeight,
21902
+ Param.ViewPortWidth,
21903
+ Param.ClientLogLevel,
21904
+ Param.OverrideNativeConsole,
21905
+ Param.PendoTrackingKey,
21906
+ Param.NumberFormatLocale,
21907
+ Param.DateFormatLocale,
21908
+ Param.CurrencyFormat,
21909
+ Param.Locale,
21910
+ Param.searchEmbed,
21911
+ Param.livedBoardEmbed,
21912
+ Param.isSpotterAgentEmbed,
21913
+ Param.SpotterEnabled,
21914
+ Param.IsFullAppEmbed,
21915
+ Param.IsOnBeforeGetVizDataInterceptEnabled,
21916
+ Param.LinkOverride,
21917
+ Param.EnableLinkOverridesV2,
21918
+ Param.DisableRedirectionLinksInNewTab,
21919
+ Param.OverrideHistoryState,
21920
+ Param.ForceTable,
21921
+ Param.StringIDsUrl,
21922
+ Param.DataSources,
21923
+ Param.ExposeTranslationIDs,
21924
+ Param.IconSpriteUrl,
21925
+ Param.Tag,
21926
+ ]);
21358
21927
  /**
21359
21928
  * The event id map from v2 event names to v1 event id
21360
21929
  * v1 events are the classic embed events implemented in Blink v1
@@ -21381,6 +21950,7 @@ class TsEmbed {
21381
21950
  * The key to store the embed instance in the DOM node
21382
21951
  */
21383
21952
  this.embedNodeKey = '__tsEmbed';
21953
+ this.embedContainerLoadedKey = '__tsEmbedContainerLoaded';
21384
21954
  this.isAppInitialized = false;
21385
21955
  /**
21386
21956
  * Should we encode URL Query Params using base64 encoding which ThoughtSpot
@@ -21401,7 +21971,7 @@ class TsEmbed {
21401
21971
  const eventType = this.getEventType(event);
21402
21972
  const eventPort = this.getEventPort(event);
21403
21973
  const eventData = this.formatEventData(event, eventType);
21404
- if (event.source === this.iFrame.contentWindow) {
21974
+ if (isMessageFromIframe(event, this.iFrame, this.thoughtSpotHost)) {
21405
21975
  const processedEventData = processEventData(eventType, eventData, this.thoughtSpotHost, this.isPreRendered ? this.preRenderWrapper : this.hostElement);
21406
21976
  if (eventType === EmbedEvent.ApiIntercept) {
21407
21977
  this.handleApiInterceptEvent({ eventData, eventPort });
@@ -21543,20 +22113,28 @@ class TsEmbed {
21543
22113
  this.createEmbedContainerHandler = (source) => () => {
21544
22114
  const processEmbedContainerReady = () => {
21545
22115
  logger$3.debug('processEmbedContainerReady');
21546
- this.isEmbedContainerLoaded = true;
22116
+ this.markEmbedContainerLoaded();
21547
22117
  this.executeEmbedContainerReadyCallbacks();
21548
22118
  };
21549
22119
  if (source === EmbedEvent.AuthInit) {
21550
22120
  const AUTH_INIT_FALLBACK_DELAY = 1000;
21551
22121
  // Wait for 1 second to ensure the embed container is loaded
21552
22122
  // This is a workaround to ensure the embed container is loaded
21553
- // this is needed until all clusters have EmbedListenerReady event
22123
+ // this is needed until all clusters have EmbedListenerReady
22124
+ // event
21554
22125
  setTimeout(processEmbedContainerReady, AUTH_INIT_FALLBACK_DELAY);
21555
22126
  }
21556
22127
  else if (source === EmbedEvent.EmbedListenerReady) {
21557
22128
  processEmbedContainerReady();
22129
+ if (this.isConfigExcludedFromUrl()) {
22130
+ this.triggerUpdateEmbedParams();
22131
+ }
21558
22132
  }
21559
22133
  };
22134
+ // Subclasses that navigate the pre-render on show must await this before
22135
+ // triggering Navigate. Resolves even on failure, so navigation is never
22136
+ // blocked.
22137
+ this.preRenderParamsApplied = Promise.resolve();
21560
22138
  this.hostElement = getDOMNode(domSelector);
21561
22139
  this.eventHandlerMap = new Map();
21562
22140
  this.isError = false;
@@ -21873,6 +22451,7 @@ class TsEmbed {
21873
22451
  return `${basePath}#`;
21874
22452
  }
21875
22453
  async getUpdateEmbedParamsObject() {
22454
+ var _a, _b;
21876
22455
  const queryParams = this.getEmbedParamsObject();
21877
22456
  // Values are URL-serialized (e.g. dataSources as '["guid"]'); parse
21878
22457
  // them back so the event payload matches a URL load (SCAL-334713).
@@ -21880,7 +22459,17 @@ class TsEmbed {
21880
22459
  queryParams[key] = deserializeParam(queryParams[key]);
21881
22460
  });
21882
22461
  const appInitData = await this.getAppInitData();
21883
- return { ...this.viewConfig, ...queryParams, ...appInitData };
22462
+ return {
22463
+ ...this.viewConfig,
22464
+ ...queryParams,
22465
+ ...appInitData,
22466
+ // A show cycle has no URL to carry these, so the payload always
22467
+ // states them — including "none", which is the case that leaks the
22468
+ // previous filters.
22469
+ runtimeFilterParams: getFilterQuery((_a = this.viewConfig.runtimeFilters) !== null && _a !== void 0 ? _a : []) || NO_RUNTIME_PARAMS,
22470
+ runtimeParameterParams: getRuntimeParameters((_b = this.viewConfig.runtimeParameters) !== null && _b !== void 0 ? _b : [])
22471
+ || NO_RUNTIME_PARAMS,
22472
+ };
21884
22473
  }
21885
22474
  /**
21886
22475
  * Common query params set for all the embed modes.
@@ -22044,13 +22633,20 @@ class TsEmbed {
22044
22633
  return path;
22045
22634
  }
22046
22635
  getEmbedParams() {
22047
- const queryParams = this.getEmbedParamsObject();
22636
+ const queryParams = this.getUrlQueryParamsObject();
22048
22637
  return getQueryParamString(queryParams);
22049
22638
  }
22050
22639
  getEmbedParamsObject() {
22051
22640
  const params = this.getBaseQueryParams();
22052
22641
  return params;
22053
22642
  }
22643
+ getUrlQueryParamsObject() {
22644
+ const queryParams = this.getEmbedParamsObject();
22645
+ if (!this.isConfigExcludedFromUrl()) {
22646
+ return queryParams;
22647
+ }
22648
+ return Object.fromEntries(Object.entries(queryParams).filter(([key]) => BOOTSTRAP_URL_PARAMS.has(key)));
22649
+ }
22054
22650
  getRootIframeSrc() {
22055
22651
  const query = this.getEmbedParams();
22056
22652
  return this.getEmbedBasePath(query);
@@ -22511,40 +23107,6 @@ class TsEmbed {
22511
23107
  getCompatibleEventType(eventType) {
22512
23108
  return V1EventMap[eventType] || eventType;
22513
23109
  }
22514
- /**
22515
- * Calculates the iframe center for the current visible viewPort
22516
- * of iframe using Scroll position of Host App, offsetTop for iframe
22517
- * in Host app. ViewPort height of the tab.
22518
- * @returns iframe Center in visible viewport,
22519
- * Iframe height,
22520
- * View port height.
22521
- */
22522
- getIframeCenter() {
22523
- const offsetTopClient = getOffsetTop(this.iFrame);
22524
- const scrollTopClient = window.scrollY;
22525
- const viewPortHeight = window.innerHeight;
22526
- const iframeHeight = this.iFrame.offsetHeight;
22527
- const iframeScrolled = scrollTopClient - offsetTopClient;
22528
- let iframeVisibleViewPort;
22529
- let iframeOffset;
22530
- if (iframeScrolled < 0) {
22531
- iframeVisibleViewPort = viewPortHeight - (offsetTopClient - scrollTopClient);
22532
- iframeVisibleViewPort = Math.min(iframeHeight, iframeVisibleViewPort);
22533
- iframeOffset = 0;
22534
- }
22535
- else {
22536
- iframeVisibleViewPort = Math.min(iframeHeight - iframeScrolled, viewPortHeight);
22537
- iframeOffset = iframeScrolled;
22538
- }
22539
- const iframeCenter = iframeOffset + iframeVisibleViewPort / 2;
22540
- return {
22541
- iframeCenter,
22542
- iframeScrolled,
22543
- iframeHeight,
22544
- viewPortHeight,
22545
- iframeVisibleViewPort,
22546
- };
22547
- }
22548
23110
  /**
22549
23111
  * Registers an event listener to trigger an alert when the ThoughtSpot app
22550
23112
  * sends an event of a particular message type to the host application.
@@ -22628,13 +23190,33 @@ class TsEmbed {
22628
23190
  var _a;
22629
23191
  const embedObj = (_a = this.preRenderWrapper) === null || _a === void 0 ? void 0 : _a[this.embedNodeKey];
22630
23192
  if (embedObj === this) {
22631
- logger$3.info('embedObj is same as this');
23193
+ logger$3.debug('embedObj is same as this');
22632
23194
  }
22633
23195
  return embedObj;
22634
23196
  }
23197
+ takeOverPreRender() {
23198
+ if (!this.preRenderWrapper)
23199
+ return;
23200
+ this.preRenderWrapper[this.embedNodeKey] = this;
23201
+ }
23202
+ // The flag lives on the wrapper because it describes the iframe: an
23203
+ // instance hidden when the container announced itself would otherwise
23204
+ // report false forever.
23205
+ markEmbedContainerLoaded() {
23206
+ this.isEmbedContainerLoaded = true;
23207
+ if (this.preRenderWrapper) {
23208
+ this.preRenderWrapper[this.embedContainerLoadedKey] = true;
23209
+ }
23210
+ }
22635
23211
  checkEmbedContainerLoaded() {
23212
+ var _a;
22636
23213
  if (this.isEmbedContainerLoaded)
22637
23214
  return true;
23215
+ if ((_a = this.preRenderWrapper) === null || _a === void 0 ? void 0 : _a[this.embedContainerLoadedKey]) {
23216
+ this.isEmbedContainerLoaded = true;
23217
+ return true;
23218
+ }
23219
+ // Older builds stamped the flag on the instance, not the wrapper.
22638
23220
  const preRenderObj = this.getPreRenderObj();
22639
23221
  if (preRenderObj && preRenderObj.isEmbedContainerLoaded) {
22640
23222
  this.isEmbedContainerLoaded = true;
@@ -22663,8 +23245,12 @@ class TsEmbed {
22663
23245
  }
22664
23246
  /**
22665
23247
  * Triggers an event to the embedded app
23248
+ *
23249
+ * Payload typing: from SDK 1.52.0 (ThoughtSpot Cloud 26.9.0.cl), unknown fields
23250
+ * on a known event's payload fail to compile. From SDK 1.54.0 (26.11.0.cl) the
23251
+ * payload is checked strictly against the event contract — update call sites now.
22666
23252
  * @param {HostEvent} messageType The event type
22667
- * @param {any} data The payload to send with the message
23253
+ * @param {TriggerData} data The payload, typed against the event's contract
22668
23254
  * @param {ContextType} context Optional context type to specify the context from which the event is triggered.
22669
23255
  * Use ContextType.Search for search answer context, ContextType.Answer for answer/explore context,
22670
23256
  * ContextType.Liveboard for liveboard context, or ContextType.Spotter for spotter context.
@@ -22681,7 +23267,11 @@ class TsEmbed {
22681
23267
  * ```
22682
23268
  * @version SDK: 1.45.2 | ThoughtSpot: 26.3.0.cl (for context parameter)
22683
23269
  */
22684
- async trigger(messageType, data = {}, context) {
23270
+ async trigger(messageType,
23271
+ // Contract shape is the contextual type: payload fields autocomplete
23272
+ // and unknown fields on object literals are flagged. Strict checks
23273
+ // land in SDK 1.54.0 — see TriggerData.
23274
+ data = {}, context) {
22685
23275
  uploadMixpanelEvent(`${MIXPANEL_EVENT.VISUAL_SDK_TRIGGER}-${messageType}`);
22686
23276
  if (!this.isRendered) {
22687
23277
  this.handleError({
@@ -22964,25 +23554,43 @@ class TsEmbed {
22964
23554
  this.isRendered = true;
22965
23555
  return this.renderIFrame(prerenderFrameSrc);
22966
23556
  }
23557
+ isConfigExcludedFromUrl() {
23558
+ var _a, _b, _c;
23559
+ 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;
23560
+ // Enabled by default; only an explicit false opts out.
23561
+ return flag !== false && flag !== 'false';
23562
+ }
23563
+ async triggerUpdateEmbedParams() {
23564
+ try {
23565
+ const params = await this.getUpdateEmbedParamsObject();
23566
+ this.trigger(HostEvent.UpdateEmbedParams, params);
23567
+ }
23568
+ catch (error) {
23569
+ logger$3.error(ERROR_MESSAGE.UPDATE_PARAMS_FAILED, error);
23570
+ this.handleError({
23571
+ errorType: ErrorDetailsTypes.API,
23572
+ message: (error === null || error === void 0 ? void 0 : error.message) || ERROR_MESSAGE.UPDATE_PARAMS_FAILED,
23573
+ code: EmbedErrorCodes.UPDATE_PARAMS_FAILED,
23574
+ error: (error === null || error === void 0 ? void 0 : error.message) || error,
23575
+ });
23576
+ }
23577
+ }
22967
23578
  beforePrerenderVisible() {
22968
23579
  // We can ignore this as its a bit expensive and the newer customers
22969
23580
  // have moved on to UpdateEmbedParams supported clusters
22970
23581
  // this.validatePreRenderViewConfig(this.viewConfig); removed in #517
22971
23582
  logger$3.debug('triggering UpdateEmbedParams', this.viewConfig);
22972
- this.executeAfterEmbedContainerLoaded(async () => {
22973
- try {
22974
- const params = await this.getUpdateEmbedParamsObject();
22975
- this.trigger(HostEvent.UpdateEmbedParams, params);
22976
- }
22977
- catch (error) {
22978
- logger$3.error(ERROR_MESSAGE.UPDATE_PARAMS_FAILED, error);
22979
- this.handleError({
22980
- errorType: ErrorDetailsTypes.API,
22981
- message: (error === null || error === void 0 ? void 0 : error.message) || ERROR_MESSAGE.UPDATE_PARAMS_FAILED,
22982
- code: EmbedErrorCodes.UPDATE_PARAMS_FAILED,
22983
- error: (error === null || error === void 0 ? void 0 : error.message) || error,
22984
- });
22985
- }
23583
+ // Created synchronously: a queued navigation needs something to await
23584
+ // whether the container is already loaded or not.
23585
+ this.preRenderParamsApplied = new Promise((resolve) => {
23586
+ this.executeAfterEmbedContainerLoaded(async () => {
23587
+ try {
23588
+ await this.triggerUpdateEmbedParams();
23589
+ }
23590
+ finally {
23591
+ setTimeout(resolve, UPDATE_EMBED_PARAMS_SETTLE_MS);
23592
+ }
23593
+ });
22986
23594
  });
22987
23595
  }
22988
23596
  /**
@@ -23012,8 +23620,9 @@ class TsEmbed {
23012
23620
  if (this.hostElement) {
23013
23621
  this.insertedDomEl = this.createPreRenderPlaceholder();
23014
23622
  if (this.viewConfig.fullHeight) {
23015
- // If fullHeight has already sized the wrapper, seed the placeholder
23016
- // with the same height so syncPreRenderStyle gets an accurate rect.
23623
+ // If fullHeight has already sized the wrapper, seed the
23624
+ // placeholder with the same height so syncPreRenderStyle gets
23625
+ // an accurate rect.
23017
23626
  const existingHeight = this.preRenderWrapper.style.height;
23018
23627
  if (existingHeight) {
23019
23628
  this.insertedDomEl.style.height = existingHeight;
@@ -23021,12 +23630,13 @@ class TsEmbed {
23021
23630
  }
23022
23631
  const placeHolderId = this.getPreRenderIds().placeHolder;
23023
23632
  // Remove any stale placeholder from a previous cycle. It is located
23024
- // via a subtree-wide querySelector, so it may be nested deeper than a
23025
- // direct child (E.g.: with fullHeight the host app can wrap it). Use
23026
- // Element.remove() — which detaches from whatever the real parent is —
23027
- // rather than hostElement.removeChild(), which throws NotFoundError
23028
- // when the match is not a direct child. Mirrors the wrapper/child
23029
- // cleanup in createPreRenderWrapper()/createPreRenderChild().
23633
+ // via a subtree-wide querySelector, so it may be nested deeper
23634
+ // than a direct child (E.g.: with fullHeight the host app can wrap
23635
+ // it). Use Element.remove() — which detaches from whatever the real
23636
+ // parent is — rather than hostElement.removeChild(), which throws
23637
+ // NotFoundError when the match is not a direct child. Mirrors the
23638
+ // wrapper/child cleanup in
23639
+ // createPreRenderWrapper()/createPreRenderChild().
23030
23640
  (_a = this.hostElement.querySelector(`#${placeHolderId}`)) === null || _a === void 0 ? void 0 : _a.remove();
23031
23641
  this.hostElement.appendChild(this.insertedDomEl);
23032
23642
  this.syncPreRenderStyle();
@@ -23058,6 +23668,9 @@ class TsEmbed {
23058
23668
  if (this.iFrame) {
23059
23669
  this.setupFullscreenChangeHandler();
23060
23670
  }
23671
+ // Last, so everything above still sees the instance being taken over
23672
+ // from.
23673
+ this.takeOverPreRender();
23061
23674
  return this;
23062
23675
  }
23063
23676
  getPreRenderPlaceHolderElement() {
@@ -23260,6 +23873,9 @@ class V1Embed extends TsEmbed {
23260
23873
  * ```
23261
23874
  */
23262
23875
  on(messageType, callback, options = { start: false }) {
23876
+ // Mirror the base TsEmbed.on generic signature so the enriched
23877
+ // EmbedEventPayload (e.g. CustomAction's answerService) flows through
23878
+ // the override too, and the class hierarchy stays assignable.
23263
23879
  const eventType = this.getCompatibleEventType(messageType);
23264
23880
  return super.on(eventType, callback, options);
23265
23881
  }
@@ -23308,7 +23924,7 @@ let SearchBarEmbed$1 = class SearchBarEmbed extends TsEmbed {
23308
23924
  * @param dataSources A list of data source GUIDs
23309
23925
  */
23310
23926
  getIFrameSrc() {
23311
- const queryParams = this.getEmbedParamsObject();
23927
+ const queryParams = this.getUrlQueryParamsObject();
23312
23928
  const path = 'search-bar-embed';
23313
23929
  let query = '';
23314
23930
  const queryParamsString = getQueryParamString(queryParams, true);
@@ -23429,7 +24045,7 @@ let SearchEmbed$1 = class SearchEmbed extends TsEmbed {
23429
24045
  }
23430
24046
  getEmbedParamsObject() {
23431
24047
  var _a;
23432
- 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;
24048
+ 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;
23433
24049
  const queryParams = this.getBaseQueryParams();
23434
24050
  queryParams[Param.HideActions] = [
23435
24051
  ...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : []),
@@ -23452,6 +24068,9 @@ let SearchEmbed$1 = class SearchEmbed extends TsEmbed {
23452
24068
  if (enableSearchAssist) {
23453
24069
  queryParams[Param.EnableSearchAssist] = true;
23454
24070
  }
24071
+ if (hideAnswerEditPanel !== undefined) {
24072
+ queryParams[Param.ShowAnswerEditPanel] = !hideAnswerEditPanel;
24073
+ }
23455
24074
  if (hideResults) {
23456
24075
  queryParams[Param.HideResult] = true;
23457
24076
  }
@@ -23492,7 +24111,7 @@ let SearchEmbed$1 = class SearchEmbed extends TsEmbed {
23492
24111
  }
23493
24112
  getEmbedParams() {
23494
24113
  const { runtimeParameters, runtimeFilters, excludeRuntimeParametersfromURL, excludeRuntimeFiltersfromURL, } = this.viewConfig;
23495
- const queryParams = this.getEmbedParamsObject();
24114
+ const queryParams = this.getUrlQueryParamsObject();
23496
24115
  let query = '';
23497
24116
  const queryParamsString = getQueryParamString(queryParams, true);
23498
24117
  if (queryParamsString) {
@@ -23537,6 +24156,270 @@ let SearchEmbed$1 = class SearchEmbed extends TsEmbed {
23537
24156
  }
23538
24157
  };
23539
24158
 
24159
+ /**
24160
+ * Copyright (c) 2025
24161
+ *
24162
+ * Full-height support for the Liveboard and app embeds.
24163
+ * @summary Full height
24164
+ */
24165
+ /**
24166
+ * The height the embed falls back to when the host app has not configured
24167
+ * `minimumHeight` or `defaultHeight`.
24168
+ */
24169
+ const DEFAULT_MINIMUM_HEIGHT = 500;
24170
+ /**
24171
+ * Routes that are part of the Liveboard experience itself. Navigating between
24172
+ * these does not reset the frame height, because the ThoughtSpot app keeps
24173
+ * reporting a height of its own for them.
24174
+ */
24175
+ const LIVEBOARD_RELATED_ROUTES = [
24176
+ '/pinboard/',
24177
+ '/insights/pinboard/',
24178
+ '/schedules/',
24179
+ '/embed/viz/',
24180
+ '/embed/insights/viz/',
24181
+ '/liveboard/',
24182
+ '/insights/liveboard/',
24183
+ '/tsl-editor/PINBOARD_ANSWER_BOOK/',
24184
+ '/import-tsl/PINBOARD_ANSWER_BOOK/',
24185
+ ];
24186
+ /**
24187
+ * Owns every piece of full-height behavior for an embed: the height
24188
+ * negotiation with the ThoughtSpot app, the query parameters that switch the
24189
+ * feature on, and the viewport listeners that drive lazy loading.
24190
+ *
24191
+ * The controller is inert unless `fullHeight` is enabled, so embeds can create
24192
+ * one unconditionally.
24193
+ */
24194
+ class FullHeightController {
24195
+ constructor(viewConfig, host) {
24196
+ this.host = host;
24197
+ this.scrollContainers = [];
24198
+ /**
24199
+ * Sets the frame height to the height reported by the ThoughtSpot app,
24200
+ * never going below the configured minimum.
24201
+ */
24202
+ this.handleEmbedHeight = (payload) => {
24203
+ const height = Number(payload === null || payload === void 0 ? void 0 : payload.data);
24204
+ if (!isNaN(height)) {
24205
+ this.host.setFrameHeight(Math.max(height, this.minimumHeight));
24206
+ }
24207
+ this.sendVisibleCoordinates();
24208
+ };
24209
+ /**
24210
+ * Answers the app's request for the center of the visible embed region.
24211
+ */
24212
+ this.handleEmbedIframeCenter = (payload, responder) => {
24213
+ const iframe = this.host.getIframe();
24214
+ if (!iframe) {
24215
+ return;
24216
+ }
24217
+ responder === null || responder === void 0 ? void 0 : responder({
24218
+ type: EmbedEvent.EmbedIframeCenter,
24219
+ data: calculateElementCenter(iframe),
24220
+ });
24221
+ };
24222
+ /**
24223
+ * Answers the app's request for the currently visible embed coordinates.
24224
+ */
24225
+ this.handleRequestVisibleCoordinates = (payload, responder) => {
24226
+ logger$3.info('Sending RequestVisibleEmbedCoordinates', payload);
24227
+ responder === null || responder === void 0 ? void 0 : responder({
24228
+ type: EmbedEvent.RequestVisibleEmbedCoordinates,
24229
+ data: this.getVisibleCoordinates(),
24230
+ });
24231
+ };
24232
+ /**
24233
+ * Resets the frame height when the app navigates away from a Liveboard,
24234
+ * since only Liveboard routes report a height of their own.
24235
+ */
24236
+ this.handleRouteChange = (payload) => {
24237
+ var _a, _b;
24238
+ const currentPath = (_a = payload === null || payload === void 0 ? void 0 : payload.data) === null || _a === void 0 ? void 0 : _a.currentPath;
24239
+ if (!currentPath) {
24240
+ return;
24241
+ }
24242
+ if (LIVEBOARD_RELATED_ROUTES.some((route) => currentPath.startsWith(route))) {
24243
+ return;
24244
+ }
24245
+ this.host.setFrameHeight(((_b = this.config.frameParams) === null || _b === void 0 ? void 0 : _b.height) || this.minimumHeight);
24246
+ };
24247
+ /**
24248
+ * Pushes the visible embed region to the app so it can decide which
24249
+ * visualizations to load.
24250
+ */
24251
+ this.sendVisibleCoordinates = () => {
24252
+ if (!this.isLazyLoadEnabled) {
24253
+ return;
24254
+ }
24255
+ const coordinates = this.getVisibleCoordinates();
24256
+ if (coordinates) {
24257
+ this.host.trigger(HostEvent.VisibleEmbedCoordinates, coordinates);
24258
+ }
24259
+ };
24260
+ this.config = FullHeightController.withLazyLoadingDefaults(viewConfig);
24261
+ this.registerEventHandlers();
24262
+ }
24263
+ /**
24264
+ * The view config the controller runs on: the host app's own config with
24265
+ * the lazy-loading defaults filled in. Read-only, so the only way to change
24266
+ * it is through the setter, which re-resolves the defaults.
24267
+ */
24268
+ get viewConfig() {
24269
+ return this.config;
24270
+ }
24271
+ /**
24272
+ * Replaces the view config the controller runs on and re-resolves the
24273
+ * lazy-loading defaults against it. The config the caller passes is never
24274
+ * written to; the controller keeps a copy of its own.
24275
+ */
24276
+ set viewConfig(viewConfig) {
24277
+ this.config = FullHeightController.withLazyLoadingDefaults(viewConfig);
24278
+ }
24279
+ /**
24280
+ * The view config with the lazy-loading settings the embed falls back to
24281
+ * when the host app has not chosen its own.
24282
+ *
24283
+ * Pure by design: it returns a new config rather than writing to the one it
24284
+ * is given, so the host app's object is left untouched.
24285
+ * @param viewConfig The embed's view config
24286
+ * @returns A copy with the defaults filled in, host app choices preserved
24287
+ */
24288
+ static withLazyLoadingDefaults(viewConfig) {
24289
+ return {
24290
+ ...viewConfig,
24291
+ lazyLoadingForFullHeight: viewConfig.lazyLoadingForFullHeight === undefined
24292
+ ? true
24293
+ : viewConfig.lazyLoadingForFullHeight,
24294
+ enableScrollableContainerLazyLoading: viewConfig.enableScrollableContainerLazyLoading === undefined
24295
+ ? true
24296
+ : viewConfig.enableScrollableContainerLazyLoading,
24297
+ lazyLoadingMargin: viewConfig.lazyLoadingMargin === undefined
24298
+ ? DEFAULT_LAZY_LOADING_MARGIN
24299
+ : viewConfig.lazyLoadingMargin,
24300
+ };
24301
+ }
24302
+ /**
24303
+ * Whether the host app asked for a full-height embed.
24304
+ */
24305
+ get isEnabled() {
24306
+ return this.config.fullHeight === true;
24307
+ }
24308
+ /**
24309
+ * Whether visualizations should load as they scroll into view, which
24310
+ * requires the SDK to report the visible region of the embed.
24311
+ */
24312
+ get isLazyLoadEnabled() {
24313
+ return this.isEnabled && !!this.config.lazyLoadingForFullHeight;
24314
+ }
24315
+ /**
24316
+ * The floor for the frame height. `defaultHeight` is the deprecated
24317
+ * spelling of `minimumHeight` and is still honored for compatibility.
24318
+ */
24319
+ get minimumHeight() {
24320
+ const { minimumHeight, defaultHeight } = this.config;
24321
+ return minimumHeight || defaultHeight || DEFAULT_MINIMUM_HEIGHT;
24322
+ }
24323
+ /**
24324
+ * Registers the embed event handlers the feature depends on. Called from
24325
+ * the constructor, so the handlers are in place before `render`.
24326
+ */
24327
+ registerEventHandlers() {
24328
+ if (!this.isEnabled) {
24329
+ return;
24330
+ }
24331
+ this.host.on(EmbedEvent.RouteChange, this.handleRouteChange);
24332
+ this.host.on(EmbedEvent.EmbedHeight, this.handleEmbedHeight);
24333
+ this.host.on(EmbedEvent.EmbedIframeCenter, this.handleEmbedIframeCenter);
24334
+ this.host.on(EmbedEvent.RequestVisibleEmbedCoordinates, this.handleRequestVisibleCoordinates);
24335
+ }
24336
+ /**
24337
+ * Adds the full-height query parameters to the embed URL params.
24338
+ * @param params The query parameters being built by the embed
24339
+ */
24340
+ addQueryParams(params) {
24341
+ if (!this.isEnabled) {
24342
+ return;
24343
+ }
24344
+ params[Param.fullHeight] = true;
24345
+ if (!this.config.lazyLoadingForFullHeight) {
24346
+ return;
24347
+ }
24348
+ params[Param.IsLazyLoadingForEmbedEnabled] = true;
24349
+ if (isValidCssMargin(this.config.lazyLoadingMargin)) {
24350
+ params[Param.RootMarginForLazyLoad] = this.config.lazyLoadingMargin;
24351
+ }
24352
+ }
24353
+ /**
24354
+ * Attaches the viewport listeners that keep lazy loading in sync. Call this
24355
+ * once the embed has rendered and the iframe exists.
24356
+ */
24357
+ onRender() {
24358
+ this.registerLazyLoadListeners();
24359
+ }
24360
+ /**
24361
+ * Detaches every listener and observer owned by the controller.
24362
+ */
24363
+ destroy() {
24364
+ this.unregisterLazyLoadListeners();
24365
+ }
24366
+ getVisibleCoordinates() {
24367
+ const iframe = this.host.getIframe();
24368
+ if (!iframe) {
24369
+ return null;
24370
+ }
24371
+ return calculateVisibleElementData(iframe, this.config.enableScrollableContainerLazyLoading);
24372
+ }
24373
+ registerLazyLoadListeners() {
24374
+ if (!this.isLazyLoadEnabled || !this.host.getIframe()) {
24375
+ return;
24376
+ }
24377
+ // Re-registering is safe: drop whatever a previous render attached.
24378
+ this.unregisterLazyLoadListeners();
24379
+ // TODO: Use passive: true, install modernizr to check for passive
24380
+ window.addEventListener('resize', this.sendVisibleCoordinates);
24381
+ window.addEventListener('scroll', this.sendVisibleCoordinates, true);
24382
+ if (!this.config.enableScrollableContainerLazyLoading) {
24383
+ return;
24384
+ }
24385
+ this.observeScrollableContainers();
24386
+ }
24387
+ /**
24388
+ * Tracks the ancestors that can scroll or clip the embed, so the visible
24389
+ * region stays correct when the embed lives inside its own scroll
24390
+ * container rather than the page.
24391
+ */
24392
+ observeScrollableContainers() {
24393
+ const iFrame = this.host.getIframe();
24394
+ this.scrollContainers = getScrollableAncestors(iFrame);
24395
+ this.scrollContainers.forEach((scrollContainer) => {
24396
+ scrollContainer.addEventListener('scroll', this.sendVisibleCoordinates);
24397
+ });
24398
+ if (typeof ResizeObserver === 'undefined') {
24399
+ return;
24400
+ }
24401
+ const resizeTargets = new Set([iFrame.parentElement, ...getEffectiveClippingAncestors(iFrame)].filter(Boolean));
24402
+ this.resizeObserver = new ResizeObserver(this.sendVisibleCoordinates);
24403
+ resizeTargets.forEach((resizeTarget) => {
24404
+ this.resizeObserver.observe(resizeTarget);
24405
+ });
24406
+ }
24407
+ unregisterLazyLoadListeners() {
24408
+ var _a;
24409
+ if (!this.isLazyLoadEnabled) {
24410
+ return;
24411
+ }
24412
+ window.removeEventListener('resize', this.sendVisibleCoordinates);
24413
+ window.removeEventListener('scroll', this.sendVisibleCoordinates, true);
24414
+ (_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
24415
+ this.resizeObserver = undefined;
24416
+ this.scrollContainers.forEach((scrollContainer) => {
24417
+ scrollContainer.removeEventListener('scroll', this.sendVisibleCoordinates);
24418
+ });
24419
+ this.scrollContainers = [];
24420
+ }
24421
+ }
24422
+
23540
24423
  /**
23541
24424
  * Resolves enablePastConversationsSidebar with
23542
24425
  * spotterSidebarConfig taking precedence over the
@@ -23612,6 +24495,18 @@ function buildStarterPromptsAppInitData(initData, viewConfig) {
23612
24495
  starterPrompts,
23613
24496
  },
23614
24497
  };
24498
+ }
24499
+ function buildSpotterAnalystAppInitData(initData, viewConfig) {
24500
+ const { spotterAnalystConfig } = viewConfig;
24501
+ if (!(spotterAnalystConfig === null || spotterAnalystConfig === void 0 ? void 0 : spotterAnalystConfig.analystId))
24502
+ return initData;
24503
+ return {
24504
+ ...initData,
24505
+ embedParams: {
24506
+ ...(initData.embedParams || {}),
24507
+ spotterAnalystConfig,
24508
+ },
24509
+ };
23615
24510
  }
23616
24511
 
23617
24512
  function buildSpotterVizAppInitData(initData, viewConfig) {
@@ -23772,73 +24667,17 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
23772
24667
  constructor(domSelector, viewConfig) {
23773
24668
  viewConfig.embedComponentType = 'AppEmbed';
23774
24669
  super(domSelector, viewConfig);
23775
- this.defaultHeight = 500;
23776
- this.lazyLoadScrollContainers = [];
23777
- this.sendFullHeightLazyLoadData = () => {
23778
- const data = calculateVisibleElementData(this.iFrame, this.viewConfig.enableScrollableContainerLazyLoading);
23779
- // this should be fired only if the lazyLoadingForFullHeight and fullHeight are true
23780
- if (this.viewConfig.lazyLoadingForFullHeight && this.viewConfig.fullHeight) {
23781
- this.trigger(HostEvent.VisibleEmbedCoordinates, data);
23782
- }
23783
- };
23784
- /**
23785
- * This is a handler for the RequestVisibleEmbedCoordinates event.
23786
- * It is used to send the visible coordinates data to the host application.
23787
- * @param data The event payload
23788
- * @param responder The responder function
23789
- */
23790
- this.requestVisibleEmbedCoordinatesHandler = (data, responder) => {
23791
- logger$3.info('Sending RequestVisibleEmbedCoordinates', data);
23792
- const visibleCoordinatesData = calculateVisibleElementData(this.iFrame, this.viewConfig.enableScrollableContainerLazyLoading);
23793
- responder({ type: EmbedEvent.RequestVisibleEmbedCoordinates, data: visibleCoordinatesData });
23794
- };
23795
- /**
23796
- * Set the iframe height as per the computed height received
23797
- * from the ThoughtSpot app.
23798
- * @param data The event payload
23799
- */
23800
- this.updateIFrameHeight = (data) => {
23801
- this.setIFrameHeight(Math.max(data.data, this.defaultHeight));
23802
- this.sendFullHeightLazyLoadData();
23803
- };
23804
- this.embedIframeCenter = (data, responder) => {
23805
- const obj = this.getIframeCenter();
23806
- responder({ type: EmbedEvent.EmbedIframeCenter, data: obj });
23807
- };
23808
- this.setIframeHeightForNonEmbedLiveboard = (data) => {
23809
- const { height: frameHeight } = this.viewConfig.frameParams || {};
23810
- const liveboardRelatedRoutes = [
23811
- '/pinboard/',
23812
- '/insights/pinboard/',
23813
- '/schedules/',
23814
- '/embed/viz/',
23815
- '/embed/insights/viz/',
23816
- '/liveboard/',
23817
- '/insights/liveboard/',
23818
- '/tsl-editor/PINBOARD_ANSWER_BOOK/',
23819
- '/import-tsl/PINBOARD_ANSWER_BOOK/',
23820
- ];
23821
- if (liveboardRelatedRoutes.some((path) => data.data.currentPath.startsWith(path))) {
23822
- // Ignore the height reset of the frame, if the navigation is
23823
- // only within the liveboard page.
23824
- return;
23825
- }
23826
- this.setIFrameHeight(frameHeight || this.defaultHeight);
23827
- };
23828
24670
  if (this.viewConfig.fullHeight === true) {
23829
- if (this.viewConfig.lazyLoadingForFullHeight === undefined) {
23830
- this.viewConfig.lazyLoadingForFullHeight = true;
23831
- }
23832
- if (this.viewConfig.enableScrollableContainerLazyLoading === undefined) {
23833
- this.viewConfig.enableScrollableContainerLazyLoading = true;
23834
- }
23835
- if (this.viewConfig.lazyLoadingMargin === undefined) {
23836
- this.viewConfig.lazyLoadingMargin = DEFAULT_LAZY_LOADING_MARGIN;
23837
- }
23838
- this.on(EmbedEvent.RouteChange, this.setIframeHeightForNonEmbedLiveboard);
23839
- this.on(EmbedEvent.EmbedHeight, this.updateIFrameHeight);
23840
- this.on(EmbedEvent.EmbedIframeCenter, this.embedIframeCenter);
23841
- this.on(EmbedEvent.RequestVisibleEmbedCoordinates, this.requestVisibleEmbedCoordinatesHandler);
24671
+ this.fullHeightController = new FullHeightController(this.viewConfig, {
24672
+ getIframe: () => this.iFrame,
24673
+ setFrameHeight: (height) => this.setIFrameHeight(height),
24674
+ on: (eventType, callback) => {
24675
+ this.on(eventType, callback);
24676
+ },
24677
+ trigger: (hostEvent, data) => {
24678
+ this.trigger(hostEvent, data);
24679
+ },
24680
+ });
23842
24681
  }
23843
24682
  }
23844
24683
  /**
@@ -23865,11 +24704,12 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
23865
24704
  * embedded Liveboard or visualization.
23866
24705
  */
23867
24706
  getEmbedParams() {
23868
- const params = this.getEmbedParamsObject();
24707
+ const params = this.getUrlQueryParamsObject();
23869
24708
  return getQueryParamString(params, true);
23870
24709
  }
23871
24710
  getEmbedParamsObject() {
23872
- 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;
24711
+ var _a;
24712
+ 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;
23873
24713
  let params = {};
23874
24714
  params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
23875
24715
  params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
@@ -23905,6 +24745,9 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
23905
24745
  if (!isUndefined$1(coverAndFilterOptionInPDF)) {
23906
24746
  params[Param.CoverAndFilterOptionInPDF] = !!coverAndFilterOptionInPDF;
23907
24747
  }
24748
+ if (!isUndefined$1(hideAnswerEditPanel)) {
24749
+ params[Param.ShowAnswerEditPanel] = !hideAnswerEditPanel;
24750
+ }
23908
24751
  params = this.getBaseQueryParams(params);
23909
24752
  if (!isUndefined$1(updatedSpotterChatPrompt)) {
23910
24753
  params[Param.UpdatedSpotterChatPrompt] = !!updatedSpotterChatPrompt;
@@ -23951,15 +24794,7 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
23951
24794
  if (hideNotification) {
23952
24795
  params[Param.HideNotification] = !!hideNotification;
23953
24796
  }
23954
- if (fullHeight === true) {
23955
- params[Param.fullHeight] = true;
23956
- if (this.viewConfig.lazyLoadingForFullHeight) {
23957
- params[Param.IsLazyLoadingForEmbedEnabled] = true;
23958
- if (isValidCssMargin(this.viewConfig.lazyLoadingMargin)) {
23959
- params[Param.RootMarginForLazyLoad] = this.viewConfig.lazyLoadingMargin;
23960
- }
23961
- }
23962
- }
24797
+ (_a = this.fullHeightController) === null || _a === void 0 ? void 0 : _a.addQueryParams(params);
23963
24798
  if (tag) {
23964
24799
  params[Param.Tag] = tag;
23965
24800
  }
@@ -24026,7 +24861,6 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
24026
24861
  if (isContinuousLiveboardPDFEnabled !== undefined) {
24027
24862
  params[Param.IsWYSIWYGLiveboardPDFEnabled] = isContinuousLiveboardPDFEnabled;
24028
24863
  }
24029
- this.defaultHeight = minimumHeight || this.defaultHeight;
24030
24864
  if (enableLiveboardDataCache !== undefined) {
24031
24865
  params[Param.EnableLiveboardDataCache] = enableLiveboardDataCache;
24032
24866
  }
@@ -24165,52 +24999,13 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
24165
24999
  * @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
24166
25000
  */
24167
25001
  destroy() {
25002
+ var _a;
24168
25003
  super.destroy();
24169
- this.unregisterLazyLoadEvents();
25004
+ (_a = this.fullHeightController) === null || _a === void 0 ? void 0 : _a.destroy();
24170
25005
  }
24171
25006
  postRender() {
24172
- this.registerLazyLoadEvents();
24173
- }
24174
- registerLazyLoadEvents() {
24175
- if (!this.iFrame) {
24176
- return;
24177
- }
24178
- if (this.viewConfig.fullHeight && this.viewConfig.lazyLoadingForFullHeight) {
24179
- this.unregisterLazyLoadEvents();
24180
- // TODO: Use passive: true, install modernizr to check for passive
24181
- window.addEventListener('resize', this.sendFullHeightLazyLoadData);
24182
- window.addEventListener('scroll', this.sendFullHeightLazyLoadData, true);
24183
- if (!this.viewConfig.enableScrollableContainerLazyLoading) {
24184
- return;
24185
- }
24186
- this.lazyLoadScrollContainers = getScrollableAncestors(this.iFrame);
24187
- this.lazyLoadScrollContainers.forEach((scrollContainer) => {
24188
- scrollContainer.addEventListener('scroll', this.sendFullHeightLazyLoadData);
24189
- });
24190
- if (typeof ResizeObserver !== 'undefined') {
24191
- const resizeTargets = new Set([
24192
- this.iFrame.parentElement,
24193
- ...getEffectiveClippingAncestors(this.iFrame),
24194
- ].filter(Boolean));
24195
- this.lazyLoadResizeObserver = new ResizeObserver(this.sendFullHeightLazyLoadData);
24196
- resizeTargets.forEach((resizeTarget) => {
24197
- this.lazyLoadResizeObserver.observe(resizeTarget);
24198
- });
24199
- }
24200
- }
24201
- }
24202
- unregisterLazyLoadEvents() {
24203
25007
  var _a;
24204
- if (this.viewConfig.fullHeight && this.viewConfig.lazyLoadingForFullHeight) {
24205
- window.removeEventListener('resize', this.sendFullHeightLazyLoadData);
24206
- window.removeEventListener('scroll', this.sendFullHeightLazyLoadData, true);
24207
- (_a = this.lazyLoadResizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
24208
- this.lazyLoadResizeObserver = undefined;
24209
- this.lazyLoadScrollContainers.forEach((scrollContainer) => {
24210
- scrollContainer.removeEventListener('scroll', this.sendFullHeightLazyLoadData);
24211
- });
24212
- this.lazyLoadScrollContainers = [];
24213
- }
25008
+ (_a = this.fullHeightController) === null || _a === void 0 ? void 0 : _a.onRender();
24214
25009
  }
24215
25010
  /**
24216
25011
  * Renders the embedded application pages in the ThoughtSpot app.
@@ -24305,6 +25100,11 @@ const addPreviewStylesIfNotPresent = () => {
24305
25100
  * @summary Liveboard & visualization embed
24306
25101
  * @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
24307
25102
  */
25103
+ // Home unmounts the liveboard container, which is how its state gets cleared.
25104
+ // The settle window gives the container time to do it before we ask for the
25105
+ // liveboard back.
25106
+ const HOME_ROUTE = 'home';
25107
+ const HOME_SETTLE_MS = 200;
24308
25108
  /**
24309
25109
  * Embed a ThoughtSpot Liveboard or visualization. When rendered it already
24310
25110
  * waits for the authentication to complete, so you need not wait for
@@ -24324,59 +25124,6 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
24324
25124
  constructor(domSelector, viewConfig) {
24325
25125
  viewConfig.embedComponentType = 'LiveboardEmbed';
24326
25126
  super(domSelector, viewConfig);
24327
- this.defaultHeight = 500;
24328
- this.lazyLoadScrollContainers = [];
24329
- this.sendFullHeightLazyLoadData = () => {
24330
- const data = calculateVisibleElementData(this.iFrame, this.viewConfig.enableScrollableContainerLazyLoading);
24331
- // this should be fired only if the lazyLoadingForFullHeight and fullHeight are true
24332
- if (this.viewConfig.lazyLoadingForFullHeight && this.viewConfig.fullHeight) {
24333
- this.trigger(HostEvent.VisibleEmbedCoordinates, data);
24334
- }
24335
- };
24336
- /**
24337
- * This is a handler for the RequestVisibleEmbedCoordinates event.
24338
- * It is used to send the visible coordinates data to the host application.
24339
- * @param data The event payload
24340
- * @param responder The responder function
24341
- */
24342
- this.requestVisibleEmbedCoordinatesHandler = (data, responder) => {
24343
- logger$3.info('Sending RequestVisibleEmbedCoordinates', data);
24344
- const visibleCoordinatesData = calculateVisibleElementData(this.iFrame, this.viewConfig.enableScrollableContainerLazyLoading);
24345
- responder({ type: EmbedEvent.RequestVisibleEmbedCoordinates, data: visibleCoordinatesData });
24346
- };
24347
- /**
24348
- * Set the iframe height as per the computed height received
24349
- * from the ThoughtSpot app.
24350
- * @param data The event payload
24351
- */
24352
- this.updateIFrameHeight = (data) => {
24353
- this.setIFrameHeight(Math.max(data.data, this.defaultHeight));
24354
- this.sendFullHeightLazyLoadData();
24355
- };
24356
- this.embedIframeCenter = (data, responder) => {
24357
- const obj = this.getIframeCenter();
24358
- responder({ type: EmbedEvent.EmbedIframeCenter, data: obj });
24359
- };
24360
- this.setIframeHeightForNonEmbedLiveboard = (data) => {
24361
- const { height: frameHeight } = this.viewConfig.frameParams || {};
24362
- const liveboardRelatedRoutes = [
24363
- '/pinboard/',
24364
- '/insights/pinboard/',
24365
- '/schedules/',
24366
- '/embed/viz/',
24367
- '/embed/insights/viz/',
24368
- '/liveboard/',
24369
- '/insights/liveboard/',
24370
- '/tsl-editor/PINBOARD_ANSWER_BOOK/',
24371
- '/import-tsl/PINBOARD_ANSWER_BOOK/',
24372
- ];
24373
- if (liveboardRelatedRoutes.some((path) => data.data.currentPath.startsWith(path))) {
24374
- // Ignore the height reset of the frame, if the navigation is
24375
- // only within the liveboard page.
24376
- return;
24377
- }
24378
- this.setIFrameHeight(frameHeight || this.defaultHeight);
24379
- };
24380
25127
  /**
24381
25128
  * @hidden
24382
25129
  * Internal state to track the current liveboard id.
@@ -24390,22 +25137,19 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
24390
25137
  };
24391
25138
  if (this.viewConfig.fullHeight === true) {
24392
25139
  if (this.viewConfig.vizId) {
24393
- logger$3.warn('Full height is currently only supported for Liveboard embeds.' +
24394
- 'Using full height with vizId might lead to unexpected behavior.');
24395
- }
24396
- if (this.viewConfig.lazyLoadingForFullHeight === undefined) {
24397
- this.viewConfig.lazyLoadingForFullHeight = true;
24398
- }
24399
- if (this.viewConfig.enableScrollableContainerLazyLoading === undefined) {
24400
- this.viewConfig.enableScrollableContainerLazyLoading = true;
25140
+ logger$3.warn('Full height is currently only supported for Liveboard embeds.'
25141
+ + 'Using full height with vizId might lead to unexpected behavior.');
24401
25142
  }
24402
- if (this.viewConfig.lazyLoadingMargin === undefined) {
24403
- this.viewConfig.lazyLoadingMargin = DEFAULT_LAZY_LOADING_MARGIN;
24404
- }
24405
- this.on(EmbedEvent.RouteChange, this.setIframeHeightForNonEmbedLiveboard);
24406
- this.on(EmbedEvent.EmbedHeight, this.updateIFrameHeight);
24407
- this.on(EmbedEvent.EmbedIframeCenter, this.embedIframeCenter);
24408
- this.on(EmbedEvent.RequestVisibleEmbedCoordinates, this.requestVisibleEmbedCoordinatesHandler);
25143
+ this.fullHeightController = new FullHeightController(this.viewConfig, {
25144
+ getIframe: () => this.iFrame,
25145
+ setFrameHeight: (height) => this.setIFrameHeight(height),
25146
+ on: (eventType, callback) => {
25147
+ this.on(eventType, callback);
25148
+ },
25149
+ trigger: (hostEvent, data) => {
25150
+ this.trigger(hostEvent, data);
25151
+ },
25152
+ });
24409
25153
  }
24410
25154
  }
24411
25155
  async getAppInitData() {
@@ -24418,26 +25162,18 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
24418
25162
  * embedded Liveboard or visualization.
24419
25163
  */
24420
25164
  getEmbedParams() {
24421
- const params = this.getEmbedParamsObject();
25165
+ const params = this.getUrlQueryParamsObject();
24422
25166
  const queryParams = getQueryParamString(params, true);
24423
25167
  return queryParams;
24424
25168
  }
24425
25169
  getEmbedParamsObject() {
25170
+ var _a;
24426
25171
  let params = {};
24427
25172
  params = this.getBaseQueryParams(params);
24428
- 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;
25173
+ 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;
24429
25174
  const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
24430
25175
  || this.viewConfig.preventPinboardFilterRemoval;
24431
- if (fullHeight === true) {
24432
- params[Param.fullHeight] = true;
24433
- if (this.viewConfig.lazyLoadingForFullHeight) {
24434
- params[Param.IsLazyLoadingForEmbedEnabled] = true;
24435
- if (isValidCssMargin(this.viewConfig.lazyLoadingMargin)) {
24436
- params[Param.RootMarginForLazyLoad] = this.viewConfig.lazyLoadingMargin;
24437
- }
24438
- }
24439
- }
24440
- this.defaultHeight = minimumHeight || defaultHeight || this.defaultHeight;
25176
+ (_a = this.fullHeightController) === null || _a === void 0 ? void 0 : _a.addQueryParams(params);
24441
25177
  if (enableVizTransformations !== undefined) {
24442
25178
  params[Param.EnableVizTransformations] = enableVizTransformations.toString();
24443
25179
  }
@@ -24664,19 +25400,49 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
24664
25400
  }
24665
25401
  beforePrerenderVisible() {
24666
25402
  super.beforePrerenderVisible();
24667
- const embedObj = this.getPreRenderObj();
24668
- this.executeAfterEmbedContainerLoaded(() => {
24669
- this.navigateToLiveboard(this.viewConfig.liveboardId, this.viewConfig.vizId, this.viewConfig.activeTabId, this.viewConfig.personalizedViewId);
24670
- if (embedObj) {
24671
- embedObj.currentLiveboardState = {
24672
- liveboardId: this.viewConfig.liveboardId,
24673
- vizId: this.viewConfig.vizId,
24674
- activeTabId: this.viewConfig.activeTabId,
24675
- personalizedViewId: this.viewConfig.personalizedViewId,
24676
- };
25403
+ // Captured before showPreRender() hands the wrapper over to this
25404
+ // instance. Itself means a hide/show, not a hand-over, so there is
25405
+ // nothing stale to clear.
25406
+ const previous = this.getPreRenderObj();
25407
+ const showing = previous === this ? undefined : previous === null || previous === void 0 ? void 0 : previous.currentLiveboardState;
25408
+ this.executeAfterEmbedContainerLoaded(async () => {
25409
+ // Without this the params callback suspends on its await and
25410
+ // Navigate goes out first, so the container loads with the previous
25411
+ // config's filters.
25412
+ await this.preRenderParamsApplied;
25413
+ if (this.isShowingLiveboardRoute(showing)) {
25414
+ // Navigate to the route we are already on is a no-op, so the
25415
+ // liveboard keeps its state. Home unmounts the container, which
25416
+ // clears it.
25417
+ this.trigger(HostEvent.Navigate, HOME_ROUTE)
25418
+ .catch((error) => logger$3.warn('Could not route via home', error));
25419
+ // Not awaited above: the container never acks Navigate, so
25420
+ // that promise only settles on the 30s trigger timeout.
25421
+ await new Promise((resolve) => {
25422
+ setTimeout(resolve, HOME_SETTLE_MS);
25423
+ });
24677
25424
  }
25425
+ this.navigateToLiveboard(this.viewConfig.liveboardId, this.viewConfig.vizId, this.viewConfig.activeTabId, this.viewConfig.personalizedViewId);
25426
+ this.currentLiveboardState = {
25427
+ liveboardId: this.viewConfig.liveboardId,
25428
+ vizId: this.viewConfig.vizId,
25429
+ activeTabId: this.viewConfig.activeTabId,
25430
+ personalizedViewId: this.viewConfig.personalizedViewId,
25431
+ };
24678
25432
  });
24679
25433
  }
25434
+ // The whole route, not just the liveboard id: the path is built from the
25435
+ // viz, tab and view too, so a same-liveboard show onto another tab is a
25436
+ // real navigation.
25437
+ isShowingLiveboardRoute(showing) {
25438
+ if (!(showing === null || showing === void 0 ? void 0 : showing.liveboardId))
25439
+ return false;
25440
+ const { liveboardId, vizId, activeTabId, personalizedViewId, } = this.viewConfig;
25441
+ return showing.liveboardId === liveboardId
25442
+ && showing.vizId === vizId
25443
+ && showing.activeTabId === activeTabId
25444
+ && showing.personalizedViewId === personalizedViewId;
25445
+ }
24680
25446
  async handleRenderForPrerender() {
24681
25447
  if (isUndefined$1(this.viewConfig.liveboardId)) {
24682
25448
  return this.prerenderGeneric();
@@ -24685,11 +25451,16 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
24685
25451
  }
24686
25452
  /**
24687
25453
  * Triggers an event to the embedded app
25454
+ * Payload typing follows {@link TsEmbed.trigger}: unknown fields fail to compile
25455
+ * from SDK 1.52.0; strict contract checks land in SDK 1.54.0.
24688
25456
  * @param {HostEvent} messageType The event type
24689
- * @param {any} data The payload to send with the message
25457
+ * @param {TriggerData} data The payload, typed against the event's contract
24690
25458
  * @returns A promise that resolves with the response from the embedded app
24691
25459
  */
24692
- trigger(messageType, data = {}, context) {
25460
+ trigger(messageType,
25461
+ // Mirror TsEmbed.trigger: contract shape is the contextual type and
25462
+ // unknown fields on object literals are flagged. Strict in SDK 1.54.0.
25463
+ data = {}, context) {
24693
25464
  const dataWithVizId = data;
24694
25465
  if (messageType === HostEvent.SetActiveTab) {
24695
25466
  this.setActiveTab(data);
@@ -24705,52 +25476,13 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
24705
25476
  * @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
24706
25477
  */
24707
25478
  destroy() {
25479
+ var _a;
24708
25480
  super.destroy();
24709
- this.unregisterLazyLoadEvents();
25481
+ (_a = this.fullHeightController) === null || _a === void 0 ? void 0 : _a.destroy();
24710
25482
  }
24711
25483
  postRender() {
24712
- this.registerLazyLoadEvents();
24713
- }
24714
- registerLazyLoadEvents() {
24715
- if (!this.iFrame) {
24716
- return;
24717
- }
24718
- if (this.viewConfig.fullHeight && this.viewConfig.lazyLoadingForFullHeight) {
24719
- this.unregisterLazyLoadEvents();
24720
- // TODO: Use passive: true, install modernizr to check for passive
24721
- window.addEventListener('resize', this.sendFullHeightLazyLoadData);
24722
- window.addEventListener('scroll', this.sendFullHeightLazyLoadData, true);
24723
- if (!this.viewConfig.enableScrollableContainerLazyLoading) {
24724
- return;
24725
- }
24726
- this.lazyLoadScrollContainers = getScrollableAncestors(this.iFrame);
24727
- this.lazyLoadScrollContainers.forEach((scrollContainer) => {
24728
- scrollContainer.addEventListener('scroll', this.sendFullHeightLazyLoadData);
24729
- });
24730
- if (typeof ResizeObserver !== 'undefined') {
24731
- const resizeTargets = new Set([
24732
- this.iFrame.parentElement,
24733
- ...getEffectiveClippingAncestors(this.iFrame),
24734
- ].filter(Boolean));
24735
- this.lazyLoadResizeObserver = new ResizeObserver(this.sendFullHeightLazyLoadData);
24736
- resizeTargets.forEach((resizeTarget) => {
24737
- this.lazyLoadResizeObserver.observe(resizeTarget);
24738
- });
24739
- }
24740
- }
24741
- }
24742
- unregisterLazyLoadEvents() {
24743
25484
  var _a;
24744
- if (this.viewConfig.fullHeight && this.viewConfig.lazyLoadingForFullHeight) {
24745
- window.removeEventListener('resize', this.sendFullHeightLazyLoadData);
24746
- window.removeEventListener('scroll', this.sendFullHeightLazyLoadData, true);
24747
- (_a = this.lazyLoadResizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
24748
- this.lazyLoadResizeObserver = undefined;
24749
- this.lazyLoadScrollContainers.forEach((scrollContainer) => {
24750
- scrollContainer.removeEventListener('scroll', this.sendFullHeightLazyLoadData);
24751
- });
24752
- this.lazyLoadScrollContainers = [];
24753
- }
25485
+ (_a = this.fullHeightController) === null || _a === void 0 ? void 0 : _a.onRender();
24754
25486
  }
24755
25487
  /**
24756
25488
  * Render an embedded ThoughtSpot Liveboard or visualization
@@ -25203,7 +25935,7 @@ let ConversationMessage$1 = class ConversationMessage extends TsEmbed {
25203
25935
  getIframeSrc() {
25204
25936
  const { sessionId, genNo, acSessionId, acGenNo, convId, messageId, } = this.viewConfig;
25205
25937
  const path = 'conv-assist-answer';
25206
- const queryParams = this.getEmbedParamsObject();
25938
+ const queryParams = this.getUrlQueryParamsObject();
25207
25939
  let query = '';
25208
25940
  const queryParamsString = getQueryParamString(queryParams, true);
25209
25941
  if (queryParamsString) {
@@ -25366,10 +26098,11 @@ let SpotterEmbed$1 = class SpotterEmbed extends TsEmbed {
25366
26098
  const defaultAppInitData = await super.getAppInitData();
25367
26099
  const sidebarInitData = buildSpotterSidebarAppInitData(defaultAppInitData, this.viewConfig, this.handleError.bind(this));
25368
26100
  const shareInitData = buildSpotterShareConversationAppInitData(sidebarInitData, this.viewConfig);
25369
- return buildStarterPromptsAppInitData(shareInitData, this.viewConfig);
26101
+ const starterPromptsInitData = buildStarterPromptsAppInitData(shareInitData, this.viewConfig);
26102
+ return buildSpotterAnalystAppInitData(starterPromptsInitData, this.viewConfig);
25370
26103
  }
25371
26104
  getEmbedParamsObject() {
25372
- const { searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, updatedSpotterExperience, showSpotterLimitations, hideSampleQuestions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, updatedSpotterChatPrompt, showSpotterRadiance, defaultQueryMode, enableStopAnswerGenerationEmbed, spotterChatConfig, spotterAnalystConfig, } = this.viewConfig;
26105
+ const { searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, updatedSpotterExperience, showSpotterLimitations, hideSampleQuestions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, updatedSpotterChatPrompt, showSpotterRadiance, defaultQueryMode, enableStopAnswerGenerationEmbed, spotterChatConfig, } = this.viewConfig;
25373
26106
  const queryParams = this.getBaseQueryParams();
25374
26107
  queryParams[Param.SpotterEnabled] = true;
25375
26108
  // Boolean params
@@ -25382,7 +26115,6 @@ let SpotterEmbed$1 = class SpotterEmbed extends TsEmbed {
25382
26115
  setParamIfDefined(queryParams, Param.ShowSpotterRadiance, showSpotterRadiance, true);
25383
26116
  setParamIfDefined(queryParams, Param.DefaultQueryMode, defaultQueryMode);
25384
26117
  setParamIfDefined(queryParams, Param.EnableStopAnswerGenerationEmbed, enableStopAnswerGenerationEmbed, true);
25385
- setParamIfDefined(queryParams, Param.AnalystId, spotterAnalystConfig === null || spotterAnalystConfig === void 0 ? void 0 : spotterAnalystConfig.analystId);
25386
26118
  // Handle spotterChatConfig params
25387
26119
  if (spotterChatConfig) {
25388
26120
  const { hideToolResponseCardBranding, toolResponseCardBrandingLabel, spotterFileUploadEnabled, spotterFileUploadFileTypes, enableStarterPrompts, } = spotterChatConfig;
@@ -25406,7 +26138,7 @@ let SpotterEmbed$1 = class SpotterEmbed extends TsEmbed {
25406
26138
  const path = sharedConversationId
25407
26139
  ? `insights/conv-assist/s/${encodeURIComponent(sharedConversationId)}`
25408
26140
  : 'insights/conv-assist';
25409
- const queryParams = this.getEmbedParamsObject();
26141
+ const queryParams = this.getUrlQueryParamsObject();
25410
26142
  let query = '';
25411
26143
  const queryParamsString = getQueryParamString(queryParams, true);
25412
26144
  if (queryParamsString) {