@thoughtspot/visual-embed-sdk 1.20.2 → 1.20.3

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 (368) hide show
  1. package/README.md +1 -1
  2. package/cjs/package.json +171 -0
  3. package/cjs/src/auth.d.ts +183 -0
  4. package/cjs/src/auth.d.ts.map +1 -0
  5. package/cjs/src/auth.js +457 -0
  6. package/cjs/src/auth.js.map +1 -0
  7. package/cjs/src/auth.spec.d.ts +13 -0
  8. package/cjs/src/auth.spec.d.ts.map +1 -0
  9. package/cjs/src/auth.spec.js +397 -0
  10. package/cjs/src/auth.spec.js.map +1 -0
  11. package/cjs/src/config.d.ts +22 -0
  12. package/cjs/src/config.d.ts.map +1 -0
  13. package/cjs/src/config.js +70 -0
  14. package/cjs/src/config.js.map +1 -0
  15. package/cjs/src/config.spec.d.ts +5 -0
  16. package/cjs/src/config.spec.d.ts.map +1 -0
  17. package/cjs/src/config.spec.js +65 -0
  18. package/cjs/src/config.spec.js.map +1 -0
  19. package/cjs/src/embed/app.d.ts +168 -0
  20. package/cjs/src/embed/app.d.ts.map +1 -0
  21. package/cjs/src/embed/app.js +215 -0
  22. package/cjs/src/embed/app.js.map +1 -0
  23. package/cjs/src/embed/app.spec.d.ts +2 -0
  24. package/cjs/src/embed/app.spec.d.ts.map +1 -0
  25. package/cjs/src/embed/app.spec.js +239 -0
  26. package/cjs/src/embed/app.spec.js.map +1 -0
  27. package/cjs/src/embed/base.d.ts +79 -0
  28. package/cjs/src/embed/base.d.ts.map +1 -0
  29. package/cjs/src/embed/base.js +229 -0
  30. package/cjs/src/embed/base.js.map +1 -0
  31. package/cjs/src/embed/base.spec.d.ts +2 -0
  32. package/cjs/src/embed/base.spec.d.ts.map +1 -0
  33. package/cjs/src/embed/base.spec.js +198 -0
  34. package/cjs/src/embed/base.spec.js.map +1 -0
  35. package/cjs/src/embed/embed.spec.d.ts +2 -0
  36. package/cjs/src/embed/embed.spec.d.ts.map +1 -0
  37. package/cjs/src/embed/embed.spec.js +74 -0
  38. package/cjs/src/embed/embed.spec.js.map +1 -0
  39. package/cjs/src/embed/events.spec.d.ts +2 -0
  40. package/cjs/src/embed/events.spec.d.ts.map +1 -0
  41. package/cjs/src/embed/events.spec.js +238 -0
  42. package/cjs/src/embed/events.spec.js.map +1 -0
  43. package/cjs/src/embed/liveboard.d.ts +150 -0
  44. package/cjs/src/embed/liveboard.d.ts.map +1 -0
  45. package/cjs/src/embed/liveboard.js +168 -0
  46. package/cjs/src/embed/liveboard.js.map +1 -0
  47. package/cjs/src/embed/liveboard.spec.d.ts +2 -0
  48. package/cjs/src/embed/liveboard.spec.d.ts.map +1 -0
  49. package/cjs/src/embed/liveboard.spec.js +229 -0
  50. package/cjs/src/embed/liveboard.spec.js.map +1 -0
  51. package/cjs/src/embed/pinboard.spec.d.ts +2 -0
  52. package/cjs/src/embed/pinboard.spec.d.ts.map +1 -0
  53. package/cjs/src/embed/pinboard.spec.js +148 -0
  54. package/cjs/src/embed/pinboard.spec.js.map +1 -0
  55. package/cjs/src/embed/search-bar.d.ts +50 -0
  56. package/cjs/src/embed/search-bar.d.ts.map +1 -0
  57. package/cjs/src/embed/search-bar.js +63 -0
  58. package/cjs/src/embed/search-bar.js.map +1 -0
  59. package/cjs/src/embed/search.d.ts +129 -0
  60. package/cjs/src/embed/search.d.ts.map +1 -0
  61. package/cjs/src/embed/search.js +121 -0
  62. package/cjs/src/embed/search.js.map +1 -0
  63. package/cjs/src/embed/search.spec.d.ts +2 -0
  64. package/cjs/src/embed/search.spec.d.ts.map +1 -0
  65. package/cjs/src/embed/search.spec.js +238 -0
  66. package/cjs/src/embed/search.spec.js.map +1 -0
  67. package/cjs/src/embed/searchEmbed-basic-auth.spec.d.ts +2 -0
  68. package/cjs/src/embed/searchEmbed-basic-auth.spec.d.ts.map +1 -0
  69. package/cjs/src/embed/searchEmbed-basic-auth.spec.js +103 -0
  70. package/cjs/src/embed/searchEmbed-basic-auth.spec.js.map +1 -0
  71. package/cjs/src/embed/ts-embed.d.ts +323 -0
  72. package/cjs/src/embed/ts-embed.d.ts.map +1 -0
  73. package/cjs/src/embed/ts-embed.js +719 -0
  74. package/cjs/src/embed/ts-embed.js.map +1 -0
  75. package/cjs/src/embed/ts-embed.spec.d.ts +2 -0
  76. package/cjs/src/embed/ts-embed.spec.d.ts.map +1 -0
  77. package/cjs/src/embed/ts-embed.spec.js +771 -0
  78. package/cjs/src/embed/ts-embed.spec.js.map +1 -0
  79. package/cjs/src/errors.d.ts +7 -0
  80. package/cjs/src/errors.d.ts.map +1 -0
  81. package/cjs/src/errors.js +10 -0
  82. package/cjs/src/errors.js.map +1 -0
  83. package/cjs/src/index.d.ts +18 -0
  84. package/cjs/src/index.d.ts.map +1 -0
  85. package/cjs/src/index.js +42 -0
  86. package/cjs/src/index.js.map +1 -0
  87. package/cjs/src/mixpanel-service.d.ts +29 -0
  88. package/cjs/src/mixpanel-service.d.ts.map +1 -0
  89. package/cjs/src/mixpanel-service.js +76 -0
  90. package/cjs/src/mixpanel-service.js.map +1 -0
  91. package/cjs/src/mixpanel-service.spec.d.ts +2 -0
  92. package/cjs/src/mixpanel-service.spec.d.ts.map +1 -0
  93. package/cjs/src/mixpanel-service.spec.js +63 -0
  94. package/cjs/src/mixpanel-service.spec.js.map +1 -0
  95. package/cjs/src/react/all-types-export.d.ts +3 -0
  96. package/cjs/src/react/all-types-export.d.ts.map +1 -0
  97. package/cjs/src/react/all-types-export.js +29 -0
  98. package/cjs/src/react/all-types-export.js.map +1 -0
  99. package/cjs/src/react/all-types-export.spec.d.ts +2 -0
  100. package/cjs/src/react/all-types-export.spec.d.ts.map +1 -0
  101. package/cjs/src/react/all-types-export.spec.js +13 -0
  102. package/cjs/src/react/all-types-export.spec.js.map +1 -0
  103. package/cjs/src/react/index.d.ts +95 -0
  104. package/cjs/src/react/index.d.ts.map +1 -0
  105. package/cjs/src/react/index.js +121 -0
  106. package/cjs/src/react/index.js.map +1 -0
  107. package/cjs/src/react/index.spec.d.ts +3 -0
  108. package/cjs/src/react/index.spec.d.ts.map +1 -0
  109. package/cjs/src/react/index.spec.js +138 -0
  110. package/cjs/src/react/index.spec.js.map +1 -0
  111. package/cjs/src/react/util.d.ts +19 -0
  112. package/cjs/src/react/util.d.ts.map +1 -0
  113. package/cjs/src/react/util.js +25 -0
  114. package/cjs/src/react/util.js.map +1 -0
  115. package/cjs/src/test/test-utils.d.ts +48 -0
  116. package/cjs/src/test/test-utils.d.ts.map +1 -0
  117. package/cjs/src/test/test-utils.js +108 -0
  118. package/cjs/src/test/test-utils.js.map +1 -0
  119. package/cjs/src/types.d.ts +2020 -0
  120. package/cjs/src/types.d.ts.map +1 -0
  121. package/cjs/src/types.js +1543 -0
  122. package/cjs/src/types.js.map +1 -0
  123. package/cjs/src/utils/answerService.d.ts +10 -0
  124. package/cjs/src/utils/answerService.d.ts.map +1 -0
  125. package/cjs/src/utils/answerService.js +61 -0
  126. package/cjs/src/utils/answerService.js.map +1 -0
  127. package/cjs/src/utils/answerService.spec.d.ts +2 -0
  128. package/cjs/src/utils/answerService.spec.d.ts.map +1 -0
  129. package/cjs/src/utils/answerService.spec.js +31 -0
  130. package/cjs/src/utils/answerService.spec.js.map +1 -0
  131. package/cjs/src/utils/authService.d.ts +37 -0
  132. package/cjs/src/utils/authService.d.ts.map +1 -0
  133. package/cjs/src/utils/authService.js +106 -0
  134. package/cjs/src/utils/authService.js.map +1 -0
  135. package/cjs/src/utils/authService.spec.d.ts +2 -0
  136. package/cjs/src/utils/authService.spec.d.ts.map +1 -0
  137. package/cjs/src/utils/authService.spec.js +72 -0
  138. package/cjs/src/utils/authService.spec.js.map +1 -0
  139. package/cjs/src/utils/processData.d.ts +16 -0
  140. package/cjs/src/utils/processData.d.ts.map +1 -0
  141. package/cjs/src/utils/processData.js +110 -0
  142. package/cjs/src/utils/processData.js.map +1 -0
  143. package/cjs/src/utils/processData.spec.d.ts +2 -0
  144. package/cjs/src/utils/processData.spec.d.ts.map +1 -0
  145. package/cjs/src/utils/processData.spec.js +142 -0
  146. package/cjs/src/utils/processData.spec.js.map +1 -0
  147. package/cjs/src/utils/processTrigger.d.ts +10 -0
  148. package/cjs/src/utils/processTrigger.d.ts.map +1 -0
  149. package/cjs/src/utils/processTrigger.js +63 -0
  150. package/cjs/src/utils/processTrigger.js.map +1 -0
  151. package/cjs/src/utils/processTrigger.spec.d.ts +2 -0
  152. package/cjs/src/utils/processTrigger.spec.d.ts.map +1 -0
  153. package/cjs/src/utils/processTrigger.spec.js +58 -0
  154. package/cjs/src/utils/processTrigger.spec.js.map +1 -0
  155. package/cjs/src/utils.d.ts +68 -0
  156. package/cjs/src/utils.d.ts.map +1 -0
  157. package/cjs/src/utils.js +196 -0
  158. package/cjs/src/utils.js.map +1 -0
  159. package/cjs/src/utils.spec.d.ts +5 -0
  160. package/cjs/src/utils.spec.d.ts.map +1 -0
  161. package/cjs/src/utils.spec.js +98 -0
  162. package/cjs/src/utils.spec.js.map +1 -0
  163. package/dist/src/auth.d.ts +54 -5
  164. package/dist/src/auth.d.ts.map +1 -1
  165. package/dist/src/auth.spec.d.ts +3 -0
  166. package/dist/src/auth.spec.d.ts.map +1 -1
  167. package/dist/src/config.d.ts +1 -0
  168. package/dist/src/config.d.ts.map +1 -1
  169. package/dist/src/embed/app.d.ts +35 -6
  170. package/dist/src/embed/app.d.ts.map +1 -1
  171. package/dist/src/embed/base.d.ts +20 -9
  172. package/dist/src/embed/base.d.ts.map +1 -1
  173. package/dist/src/embed/liveboard.d.ts +17 -5
  174. package/dist/src/embed/liveboard.d.ts.map +1 -1
  175. package/dist/src/embed/search-bar.d.ts +3 -0
  176. package/dist/src/embed/search-bar.d.ts.map +1 -1
  177. package/dist/src/embed/search.d.ts +9 -1
  178. package/dist/src/embed/search.d.ts.map +1 -1
  179. package/dist/src/embed/ts-embed.d.ts +65 -7
  180. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  181. package/dist/src/errors.d.ts.map +1 -1
  182. package/dist/src/index.d.ts +2 -2
  183. package/dist/src/index.d.ts.map +1 -1
  184. package/dist/src/mixpanel-service.d.ts +8 -0
  185. package/dist/src/mixpanel-service.d.ts.map +1 -1
  186. package/dist/src/react/all-types-export.d.ts +3 -0
  187. package/dist/src/react/all-types-export.d.ts.map +1 -0
  188. package/dist/src/react/all-types-export.spec.d.ts +2 -0
  189. package/dist/src/react/all-types-export.spec.d.ts.map +1 -0
  190. package/dist/src/react/index.d.ts +72 -0
  191. package/dist/src/react/index.d.ts.map +1 -1
  192. package/dist/src/react/util.d.ts +4 -0
  193. package/dist/src/react/util.d.ts.map +1 -1
  194. package/dist/src/test/test-utils.d.ts +11 -2
  195. package/dist/src/test/test-utils.d.ts.map +1 -1
  196. package/dist/src/types.d.ts +499 -96
  197. package/dist/src/types.d.ts.map +1 -1
  198. package/dist/src/utils/answerService.d.ts +7 -0
  199. package/dist/src/utils/answerService.d.ts.map +1 -1
  200. package/dist/src/utils/authService.d.ts +30 -0
  201. package/dist/src/utils/authService.d.ts.map +1 -1
  202. package/dist/src/utils/processData.d.ts +12 -0
  203. package/dist/src/utils/processData.d.ts.map +1 -1
  204. package/dist/src/utils/processTrigger.d.ts +7 -0
  205. package/dist/src/utils/processTrigger.d.ts.map +1 -1
  206. package/dist/src/utils.d.ts +12 -0
  207. package/dist/src/utils.d.ts.map +1 -1
  208. package/dist/tsembed-react.es.js +28024 -0
  209. package/dist/tsembed-react.js +27966 -0
  210. package/dist/tsembed.es.js +18114 -305
  211. package/dist/tsembed.js +18088 -327
  212. package/dist/visual-embed-sdk-react-full.d.ts +3092 -0
  213. package/dist/visual-embed-sdk-react.d.ts +2781 -0
  214. package/dist/visual-embed-sdk.d.ts +2944 -0
  215. package/lib/package.json +15 -14
  216. package/lib/src/auth.d.ts +54 -5
  217. package/lib/src/auth.d.ts.map +1 -1
  218. package/lib/src/auth.js +91 -31
  219. package/lib/src/auth.js.map +1 -1
  220. package/lib/src/auth.spec.d.ts +3 -0
  221. package/lib/src/auth.spec.d.ts.map +1 -1
  222. package/lib/src/auth.spec.js +37 -6
  223. package/lib/src/auth.spec.js.map +1 -1
  224. package/lib/src/config.d.ts +1 -0
  225. package/lib/src/config.d.ts.map +1 -1
  226. package/lib/src/config.js +5 -3
  227. package/lib/src/config.js.map +1 -1
  228. package/lib/src/config.spec.js.map +1 -1
  229. package/lib/src/embed/app.d.ts +35 -6
  230. package/lib/src/embed/app.d.ts.map +1 -1
  231. package/lib/src/embed/app.js +55 -16
  232. package/lib/src/embed/app.js.map +1 -1
  233. package/lib/src/embed/app.spec.js +41 -12
  234. package/lib/src/embed/app.spec.js.map +1 -1
  235. package/lib/src/embed/base.d.ts +20 -9
  236. package/lib/src/embed/base.d.ts.map +1 -1
  237. package/lib/src/embed/base.js +31 -15
  238. package/lib/src/embed/base.js.map +1 -1
  239. package/lib/src/embed/base.spec.js.map +1 -1
  240. package/lib/src/embed/embed.spec.js +1 -1
  241. package/lib/src/embed/embed.spec.js.map +1 -1
  242. package/lib/src/embed/liveboard.d.ts +17 -5
  243. package/lib/src/embed/liveboard.d.ts.map +1 -1
  244. package/lib/src/embed/liveboard.js +49 -37
  245. package/lib/src/embed/liveboard.js.map +1 -1
  246. package/lib/src/embed/liveboard.spec.js +37 -30
  247. package/lib/src/embed/liveboard.spec.js.map +1 -1
  248. package/lib/src/embed/pinboard.spec.js +14 -26
  249. package/lib/src/embed/pinboard.spec.js.map +1 -1
  250. package/lib/src/embed/search-bar.d.ts +3 -0
  251. package/lib/src/embed/search-bar.d.ts.map +1 -1
  252. package/lib/src/embed/search-bar.js +5 -6
  253. package/lib/src/embed/search-bar.js.map +1 -1
  254. package/lib/src/embed/search.d.ts +9 -1
  255. package/lib/src/embed/search.d.ts.map +1 -1
  256. package/lib/src/embed/search.js +18 -14
  257. package/lib/src/embed/search.js.map +1 -1
  258. package/lib/src/embed/search.spec.js +16 -19
  259. package/lib/src/embed/search.spec.js.map +1 -1
  260. package/lib/src/embed/searchEmbed-basic-auth.spec.js +4 -0
  261. package/lib/src/embed/searchEmbed-basic-auth.spec.js.map +1 -1
  262. package/lib/src/embed/ts-embed.d.ts +65 -7
  263. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  264. package/lib/src/embed/ts-embed.js +154 -77
  265. package/lib/src/embed/ts-embed.js.map +1 -1
  266. package/lib/src/embed/ts-embed.spec.js +46 -24
  267. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  268. package/lib/src/errors.d.ts.map +1 -1
  269. package/lib/src/errors.js.map +1 -1
  270. package/lib/src/index.d.ts +2 -2
  271. package/lib/src/index.d.ts.map +1 -1
  272. package/lib/src/index.js +4 -4
  273. package/lib/src/index.js.map +1 -1
  274. package/lib/src/mixpanel-service.d.ts +8 -0
  275. package/lib/src/mixpanel-service.d.ts.map +1 -1
  276. package/lib/src/mixpanel-service.js +13 -1
  277. package/lib/src/mixpanel-service.js.map +1 -1
  278. package/lib/src/mixpanel-service.spec.js.map +1 -1
  279. package/lib/src/react/all-types-export.d.ts +3 -0
  280. package/lib/src/react/all-types-export.d.ts.map +1 -0
  281. package/lib/src/react/all-types-export.js +5 -0
  282. package/lib/src/react/all-types-export.js.map +1 -0
  283. package/lib/src/react/all-types-export.spec.d.ts +2 -0
  284. package/lib/src/react/all-types-export.spec.d.ts.map +1 -0
  285. package/lib/src/react/all-types-export.spec.js +10 -0
  286. package/lib/src/react/all-types-export.spec.js.map +1 -0
  287. package/lib/src/react/index.d.ts +72 -0
  288. package/lib/src/react/index.d.ts.map +1 -1
  289. package/lib/src/react/index.js +79 -7
  290. package/lib/src/react/index.js.map +1 -1
  291. package/lib/src/react/index.spec.js +27 -6
  292. package/lib/src/react/index.spec.js.map +1 -1
  293. package/lib/src/react/util.d.ts +4 -0
  294. package/lib/src/react/util.d.ts.map +1 -1
  295. package/lib/src/react/util.js +4 -0
  296. package/lib/src/react/util.js.map +1 -1
  297. package/lib/src/test/test-utils.d.ts +11 -2
  298. package/lib/src/test/test-utils.d.ts.map +1 -1
  299. package/lib/src/test/test-utils.js +36 -25
  300. package/lib/src/test/test-utils.js.map +1 -1
  301. package/lib/src/types.d.ts +499 -96
  302. package/lib/src/types.d.ts.map +1 -1
  303. package/lib/src/types.js +374 -68
  304. package/lib/src/types.js.map +1 -1
  305. package/lib/src/utils/answerService.d.ts +7 -0
  306. package/lib/src/utils/answerService.d.ts.map +1 -1
  307. package/lib/src/utils/answerService.js +7 -0
  308. package/lib/src/utils/answerService.js.map +1 -1
  309. package/lib/src/utils/answerService.spec.js.map +1 -1
  310. package/lib/src/utils/authService.d.ts +30 -0
  311. package/lib/src/utils/authService.d.ts.map +1 -1
  312. package/lib/src/utils/authService.js +39 -2
  313. package/lib/src/utils/authService.js.map +1 -1
  314. package/lib/src/utils/authService.spec.js.map +1 -1
  315. package/lib/src/utils/processData.d.ts +12 -0
  316. package/lib/src/utils/processData.d.ts.map +1 -1
  317. package/lib/src/utils/processData.js +33 -5
  318. package/lib/src/utils/processData.js.map +1 -1
  319. package/lib/src/utils/processData.spec.js.map +1 -1
  320. package/lib/src/utils/processTrigger.d.ts +7 -0
  321. package/lib/src/utils/processTrigger.d.ts.map +1 -1
  322. package/lib/src/utils/processTrigger.js +17 -3
  323. package/lib/src/utils/processTrigger.js.map +1 -1
  324. package/lib/src/utils/processTrigger.spec.js.map +1 -1
  325. package/lib/src/utils.d.ts +12 -0
  326. package/lib/src/utils.d.ts.map +1 -1
  327. package/lib/src/utils.js +24 -19
  328. package/lib/src/utils.js.map +1 -1
  329. package/lib/src/utils.spec.js.map +1 -1
  330. package/package.json +15 -14
  331. package/src/auth.spec.ts +83 -133
  332. package/src/auth.ts +148 -115
  333. package/src/config.spec.ts +2 -4
  334. package/src/config.ts +5 -3
  335. package/src/embed/app.spec.ts +57 -14
  336. package/src/embed/app.ts +91 -36
  337. package/src/embed/base.spec.ts +3 -9
  338. package/src/embed/base.ts +51 -53
  339. package/src/embed/embed.spec.ts +5 -6
  340. package/src/embed/liveboard.spec.ts +56 -37
  341. package/src/embed/liveboard.ts +66 -64
  342. package/src/embed/pinboard.spec.ts +26 -29
  343. package/src/embed/search-bar.tsx +10 -8
  344. package/src/embed/search.spec.ts +31 -21
  345. package/src/embed/search.ts +26 -20
  346. package/src/embed/searchEmbed-basic-auth.spec.ts +22 -28
  347. package/src/embed/ts-embed.spec.ts +99 -144
  348. package/src/embed/ts-embed.ts +188 -162
  349. package/src/errors.ts +3 -6
  350. package/src/index.ts +6 -10
  351. package/src/mixpanel-service.spec.ts +1 -3
  352. package/src/mixpanel-service.ts +13 -1
  353. package/src/react/index.spec.tsx +66 -13
  354. package/src/react/index.tsx +111 -62
  355. package/src/react/util.ts +8 -4
  356. package/src/test/test-utils.ts +43 -39
  357. package/src/types.ts +498 -98
  358. package/src/utils/answerService.spec.ts +3 -5
  359. package/src/utils/answerService.ts +21 -17
  360. package/src/utils/authService.spec.ts +26 -41
  361. package/src/utils/authService.ts +47 -21
  362. package/src/utils/processData.spec.ts +26 -59
  363. package/src/utils/processData.ts +36 -14
  364. package/src/utils/processTrigger.spec.ts +1 -6
  365. package/src/utils/processTrigger.ts +18 -9
  366. package/src/utils.spec.ts +8 -12
  367. package/src/utils.ts +25 -26
  368. package/lib/src/visual-embed-sdk.d.ts +0 -2419
@@ -1,2419 +0,0 @@
1
- // Generated by dts-bundle v0.7.3
2
- // Dependencies for this module:
3
- // ../../eventemitter3
4
-
5
- declare module '@thoughtspot/visual-embed-sdk' {
6
- /**
7
- * Copyright (c) 2023
8
- *
9
- * ThoughtSpot Visual Embed SDK for embedding ThoughtSpot analytics
10
- * in other web applications.
11
- *
12
- * @summary ThoughtSpot Visual Embed SDK
13
- * @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
14
- */
15
- import { AppEmbed, Page, AppViewConfig } from '@thoughtspot/visual-embed-sdk/embed/app';
16
- import { init, prefetch, logout, getEmbedConfig } from '@thoughtspot/visual-embed-sdk/embed/base';
17
- import { PinboardEmbed, LiveboardViewConfig, LiveboardEmbed } from '@thoughtspot/visual-embed-sdk/embed/liveboard';
18
- import { SearchEmbed, SearchViewConfig } from '@thoughtspot/visual-embed-sdk/embed/search';
19
- import { SearchBarEmbed, SearchBarViewConfig } from '@thoughtspot/visual-embed-sdk/embed/search-bar';
20
- import { AuthFailureType, AuthStatus, AuthEvent, AuthEventEmitter, getSessionInfo } from '@thoughtspot/visual-embed-sdk/auth';
21
- import { AuthType, RuntimeFilter, RuntimeFilterOp, EmbedEvent, HostEvent, DataSourceVisualMode, Action, EmbedConfig, PrefetchFeatures, FrameParams, DOMSelector, MessageOptions, MessageCallback, MessagePayload, CustomisationsInterface, CustomStyles, customCssInterface } from '@thoughtspot/visual-embed-sdk/types';
22
- export { init, logout, prefetch, getEmbedConfig as getInitConfig, getSessionInfo, SearchEmbed, SearchBarEmbed, PinboardEmbed, LiveboardEmbed, AppEmbed, AuthFailureType, AuthStatus, AuthEvent, AuthEventEmitter, Page, AuthType, RuntimeFilter, RuntimeFilterOp, EmbedEvent, HostEvent, DataSourceVisualMode, Action, EmbedConfig, SearchViewConfig, SearchBarViewConfig, LiveboardViewConfig, AppViewConfig, PrefetchFeatures, FrameParams, DOMSelector, MessageOptions, MessageCallback, MessagePayload, CustomisationsInterface, CustomStyles, customCssInterface, };
23
- }
24
-
25
- declare module '@thoughtspot/visual-embed-sdk/embed/app' {
26
- /**
27
- * Copyright (c) 2022
28
- *
29
- * Full application embedding
30
- * https://developers.thoughtspot.com/docs/?pageid=full-embed
31
- *
32
- * @summary Full app embed
33
- * @module
34
- * @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
35
- */
36
- import { DOMSelector, ViewConfig } from '@thoughtspot/visual-embed-sdk/types';
37
- import { V1Embed } from '@thoughtspot/visual-embed-sdk/embed/ts-embed';
38
- /**
39
- * Pages within the ThoughtSpot app that can be embedded.
40
- */
41
- export enum Page {
42
- /**
43
- * Home page
44
- */
45
- Home = "home",
46
- /**
47
- * Search page
48
- */
49
- Search = "search",
50
- /**
51
- * Saved answers listing page
52
- */
53
- Answers = "answers",
54
- /**
55
- * Liveboards listing page
56
- */
57
- Liveboards = "liveboards",
58
- /**
59
- * @hidden
60
- */
61
- Pinboards = "pinboards",
62
- /**
63
- * Data management page
64
- */
65
- Data = "data",
66
- /**
67
- * SpotIQ listing page
68
- */
69
- SpotIQ = "spotiq"
70
- }
71
- /**
72
- * The view configuration for full app embedding.
73
- * @group Embed components
74
- */
75
- export interface AppViewConfig extends ViewConfig {
76
- /**
77
- * If true, the main navigation bar within the ThoughtSpot app
78
- * is displayed. By default, the navigation bar is hidden.
79
- */
80
- showPrimaryNavbar?: boolean;
81
- /**
82
- * If true, help and profile buttons will hide on NavBar. By default,
83
- * they are shown.
84
- */
85
- disableProfileAndHelp?: boolean;
86
- /**
87
- * A URL path within the app that is to be embedded.
88
- * If both path and pageId attributes are defined, the path definition
89
- * takes precedence.
90
- */
91
- path?: string;
92
- /**
93
- * The application page to set as the start page
94
- * in the embedded view.
95
- */
96
- pageId?: Page;
97
- /**
98
- * This puts a filter tag on the application. All metadata lists in the application, such as
99
- * Liveboards and answers, would be filtered by this tag.
100
- */
101
- tag?: string;
102
- /**
103
- * The array of GUIDs to be hidden
104
- */
105
- hideObjects?: string[];
106
- /**
107
- * Render liveboards using the new v2 rendering mode
108
- * This is a transient flag which is primarily meant for internal use
109
- * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
110
- * @hidden
111
- */
112
- liveboardV2?: boolean;
113
- /**
114
- * If set to true, the Search Assist feature is enabled.
115
- * @version SDK: 1.13.0 | ThoughtSpot: 8.5.0.cl, 8.8.1-sw
116
- */
117
- enableSearchAssist?: boolean;
118
- }
119
- /**
120
- * Embeds full ThoughtSpot experience in a host application.
121
- * @group Embed components
122
- */
123
- export class AppEmbed extends V1Embed {
124
- protected viewConfig: AppViewConfig;
125
- constructor(domSelector: DOMSelector, viewConfig: AppViewConfig);
126
- /**
127
- * Navigate to particular page for app embed. eg:answers/pinboards/home
128
- * This is used for embedding answers, pinboards, visualizations and full application only.
129
- * @param path string | number The string, set to iframe src and navigate to new page
130
- * eg: appEmbed.navigateToPage('pinboards')
131
- * When used with `noReload` this can also be a number like 1/-1 to go forward/back.
132
- * @param noReload boolean Trigger the navigation without reloading the page
133
- * @version SDK: 1.12.0 | ThoughtSpot: 8.4.0.cl, 8.4.1-sw
134
- */
135
- navigateToPage(path: string | number, noReload?: boolean): void;
136
- /**
137
- * Renders the embedded application pages in the ThoughtSpot app.
138
- * @param renderOptions An object containing the page ID
139
- * to be embedded.
140
- */
141
- render(): AppEmbed;
142
- }
143
- }
144
-
145
- declare module '@thoughtspot/visual-embed-sdk/embed/base' {
146
- import { EmbedConfig, PrefetchFeatures } from '@thoughtspot/visual-embed-sdk/types';
147
- import { notifyAuthFailure, notifyAuthSDKSuccess, notifyAuthSuccess, notifyLogout, AuthEventEmitter } from '@thoughtspot/visual-embed-sdk/auth';
148
- export let authPromise: Promise<boolean>;
149
- /**
150
- * Gets the configuration embed was initialized with.
151
- *
152
- * @returns {@link EmbedConfig} The configuration embed was initialized with.
153
- * @version SDK: 1.19.0 | ThoughtSpot: *
154
- * @group Global methods
155
- */
156
- export const getEmbedConfig: () => EmbedConfig;
157
- export const getAuthPromise: () => Promise<boolean>;
158
- export { notifyAuthFailure, notifyAuthSDKSuccess, notifyAuthSuccess, notifyLogout, };
159
- /**
160
- * Perform authentication on the ThoughtSpot app as applicable.
161
- */
162
- export const handleAuth: () => Promise<boolean>;
163
- /**
164
- * Prefetches static resources from the specified URL. Web browsers can then cache the prefetched resources and serve them from the user's local disk to provide faster access to your app.
165
- * @param url The URL provided for prefetch
166
- * @param prefetchFeatures Specify features which needs to be prefetched.
167
- * @version SDK: 1.4.0 | ThoughtSpot: ts7.sep.cl, 7.2.1
168
- * @group Global methods
169
- */
170
- export const prefetch: (url?: string, prefetchFeatures?: PrefetchFeatures[]) => void;
171
- /**
172
- * Initializes the Visual Embed SDK globally and perform
173
- * authentication if applicable. This function needs to be called before any ThoughtSpot
174
- * component like liveboard etc can be embedded. But need not wait for AuthEvent.SUCCESS
175
- * to actually embed. That is handled internally.
176
- * @param embedConfig The configuration object containing ThoughtSpot host,
177
- * authentication mechanism and so on.
178
- *
179
- * @example
180
- * ```js
181
- * const authStatus = init({
182
- * thoughtSpotHost: 'https://my.thoughtspot.cloud',
183
- * authType: AuthType.None,
184
- * });
185
- * authStatus.on(AuthStatus.FAILURE, (reason) => { // do something here });
186
- * ```
187
- *
188
- * @returns {@link AuthEventEmitter} event emitter which emits events on authentication success, failure and logout. See {@link AuthStatus}
189
- * @version SDK: 1.0.0 | ThoughtSpot ts7.april.cl, 7.2.1
190
- * @group Authentication / Init
191
- */
192
- export const init: (embedConfig: EmbedConfig) => AuthEventEmitter;
193
- export function disableAutoLogin(): void;
194
- /**
195
- * Logs out from ThoughtSpot. This also sets the autoLogin flag to false, to prevent
196
- * the SDK from automatically logging in again.
197
- *
198
- * You can call the `init` method again to re login, if autoLogin is set to true in this
199
- * second call it will be honored.
200
- *
201
- * @param doNotDisableAutoLogin This flag when passed will not disable autoLogin
202
- * @returns Promise which resolves when logout completes.
203
- * @version SDK: 1.10.1 | ThoughtSpot: 8.2.0.cl, 8.4.1-sw
204
- * @group Global methods
205
- */
206
- export const logout: (doNotDisableAutoLogin?: boolean) => Promise<boolean>;
207
- /**
208
- * Renders functions in a queue, resolves to next function only after the callback next is called
209
- * @param fn The function being registered
210
- */
211
- export const renderInQueue: (fn: (next?: (val?: any) => void) => Promise<any>) => Promise<any>;
212
- export function reset(): void;
213
- }
214
-
215
- declare module '@thoughtspot/visual-embed-sdk/embed/liveboard' {
216
- /**
217
- * Copyright (c) 2022
218
- *
219
- * Embed a ThoughtSpot Liveboard or visualization
220
- * https://developers.thoughtspot.com/docs/?pageid=embed-pinboard
221
- * https://developers.thoughtspot.com/docs/?pageid=embed-a-viz
222
- *
223
- * @summary Liveboard & visualization embed
224
- * @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
225
- */
226
- import { DOMSelector, HostEvent, ViewConfig } from '@thoughtspot/visual-embed-sdk/types';
227
- import { V1Embed } from '@thoughtspot/visual-embed-sdk/embed/ts-embed';
228
- /**
229
- * The configuration for the embedded Liveboard or visualization page view.
230
- * @group Embed components
231
- */
232
- export interface LiveboardViewConfig extends ViewConfig {
233
- /**
234
- * If set to true, the embedded object container dynamically resizes
235
- * according to the height of the Liveboard.
236
- * @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 7.2.1
237
- */
238
- fullHeight?: boolean;
239
- /**
240
- * This is the minimum height(in pixels) for a full height Liveboard.
241
- * Setting this height helps resolves issues with empty Liveboards and
242
- * other screens navigable from a Liveboard.
243
- * @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
244
- * @default 500
245
- */
246
- defaultHeight?: number;
247
- /**
248
- * @Deprecated If set to true, the context menu in visualizations will be enabled.
249
- */
250
- enableVizTransformations?: boolean;
251
- /**
252
- * The Liveboard to display in the embedded view.
253
- * Use either of liveboardId or pinboardId to reference the Liveboard to embed.
254
- * @version SDK: 1.3.0 | ThoughtSpot ts7.aug.cl, 7.2.1
255
- */
256
- liveboardId?: string;
257
- /**
258
- * To support backward compatibility
259
- * @hidden
260
- */
261
- pinboardId?: string;
262
- /**
263
- * The visualization within the Liveboard to display.
264
- */
265
- vizId?: string;
266
- /**
267
- * If set to true, all filter chips from a
268
- * Liveboard page will be read-only (no X buttons)
269
- * @version SDK: 1.3.0 | ThoughtSpot ts7.aug.cl, 7.2.1
270
- */
271
- preventLiveboardFilterRemoval?: boolean;
272
- /**
273
- * Array of viz ids which should be visible when the liveboard
274
- * first renders. This can be changed by triggering the "SetVisibleVizs"
275
- * event.
276
- * @version SDK: 1.9.1 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw
277
- */
278
- visibleVizs?: string[];
279
- /**
280
- * To support backward compatibilty
281
- * @hidden
282
- */
283
- preventPinboardFilterRemoval?: boolean;
284
- /**
285
- * Render embedded Liveboards and visualizations in the new Liveboard experience mode
286
- * @version SDK: 1.14.0 | ThoughtSpot: 8.6.0.cl, 8.8.1-sw
287
- */
288
- liveboardV2?: boolean;
289
- /**
290
- * Tab Id of the Liveboard that is supposed to be active
291
- * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
292
- */
293
- activeTabId?: string;
294
- }
295
- /**
296
- * Embed a ThoughtSpot Liveboard or a Thoughtspot visualization. When rendered it already
297
- * waits for the authentication to complete, so no need to wait for AuthStatus.SUCCESS.
298
- * @example
299
- * ```js
300
- * import { .. } from '@thoughtspot/visual-embed-sdk';
301
- * init({ ... });
302
- * const embed = new LiveboardEmbed("#container", {
303
- * liveboardId: <your-id-here>,
304
- * // .. other params here.
305
- * })
306
- * ```
307
- * @group Embed components
308
- */
309
- export class LiveboardEmbed extends V1Embed {
310
- protected viewConfig: LiveboardViewConfig;
311
- constructor(domSelector: DOMSelector, viewConfig: LiveboardViewConfig);
312
- /**
313
- * Triggers an event to the embedded app
314
- * @param messageType The event type
315
- * @param data The payload to send with the message
316
- */
317
- trigger(messageType: HostEvent, data?: any): Promise<any>;
318
- /**
319
- * Render an embedded ThoughtSpot Liveboard or visualization
320
- * @param renderOptions An object specifying the Liveboard ID,
321
- * visualization ID and the runtime filters.
322
- */
323
- render(): LiveboardEmbed;
324
- }
325
- /**
326
- * @hidden
327
- */
328
- export class PinboardEmbed extends LiveboardEmbed {
329
- }
330
- }
331
-
332
- declare module '@thoughtspot/visual-embed-sdk/embed/search' {
333
- /**
334
- * Copyright (c) 2022
335
- *
336
- * Embed ThoughtSpot search or a saved answer
337
- *
338
- * @summary Search embed
339
- * @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
340
- */
341
- import { DOMSelector, Action, ViewConfig } from '@thoughtspot/visual-embed-sdk/types';
342
- import { TsEmbed } from '@thoughtspot/visual-embed-sdk/embed/ts-embed';
343
- /**
344
- * Configuration for search options
345
- */
346
- export interface SearchOptions {
347
- /**
348
- * The tml string to load the answer
349
- */
350
- searchTokenString: string;
351
- /**
352
- * Boolean to determine if the search should be executed or not.
353
- * if it is executed, put the focus on the results.
354
- * if it’s not executed, put the focus in the search bar - at the end of the tokens
355
- */
356
- executeSearch?: boolean;
357
- }
358
- /**
359
- * The configuration attributes for the embedded search view.
360
- *
361
- * @group Embed components
362
- */
363
- export interface SearchViewConfig extends ViewConfig {
364
- /**
365
- * If set to true, the data sources panel is collapsed on load,
366
- * but can be expanded manually.
367
- */
368
- collapseDataSources?: boolean;
369
- /**
370
- * If set to true, hides the data sources panel.
371
- */
372
- hideDataSources?: boolean;
373
- /**
374
- * If set to true, hides the charts and tables in search answers.
375
- * This attribute can be used to create a custom visualization
376
- * using raw answer data.
377
- */
378
- hideResults?: boolean;
379
- /**
380
- * If set to true, expands all the data sources panel.
381
- */
382
- expandAllDataSource?: boolean;
383
- /**
384
- * If set to true, the Search Assist feature is enabled.
385
- * @version SDK: 1.13.0 | ThoughtSpot: 8.5.0.cl, 8.8.1-sw
386
- */
387
- enableSearchAssist?: boolean;
388
- /**
389
- * If set to true, the tabular view is set as the default
390
- * format for presenting search data.
391
- */
392
- forceTable?: boolean;
393
- /**
394
- * The array of data source GUIDs to set on load.
395
- * Only a single dataSource supported currently.
396
- * @deprecated Use dataSource instead
397
- */
398
- dataSources?: string[];
399
- /**
400
- * The array of data source GUIDs to set on load.
401
- * @version: SDK: 1.19.0
402
- */
403
- dataSource?: string;
404
- /**
405
- * The initial search query to load the answer with.
406
- * @deprecated Use {@link searchOptions} instead
407
- */
408
- searchQuery?: string;
409
- /**
410
- * Configuration for search options
411
- */
412
- searchOptions?: SearchOptions;
413
- /**
414
- * The GUID of a saved answer to load initially.
415
- */
416
- answerId?: string;
417
- /**
418
- * If set to true, search page will render without the Search Bar
419
- * The chart/table should still be visible.
420
- * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
421
- */
422
- hideSearchBar?: boolean;
423
- }
424
- export const HiddenActionItemByDefaultForSearchEmbed: Action[];
425
- /**
426
- * Embed ThoughtSpot search
427
- *
428
- * @group Embed components
429
- */
430
- export class SearchEmbed extends TsEmbed {
431
- /**
432
- * The view configuration for the embedded ThoughtSpot search.
433
- */
434
- protected viewConfig: SearchViewConfig;
435
- constructor(domSelector: DOMSelector, viewConfig: SearchViewConfig);
436
- /**
437
- * Render the embedded ThoughtSpot search
438
- */
439
- render(): SearchEmbed;
440
- }
441
- }
442
-
443
- declare module '@thoughtspot/visual-embed-sdk/embed/search-bar' {
444
- import { ViewConfig } from '@thoughtspot/visual-embed-sdk/types';
445
- import { TsEmbed } from '@thoughtspot/visual-embed-sdk/embed/ts-embed';
446
- import { SearchOptions } from '@thoughtspot/visual-embed-sdk/embed/search';
447
- /**
448
- * @group Embed components
449
- */
450
- export interface SearchBarViewConfig extends Omit<ViewConfig, 'runtimeFilters' | 'showAlerts'> {
451
- /**
452
- * The array of data source GUIDs to set on load.
453
- * Only a single dataSource supported currently.
454
- * @deprecated Use dataSource instead
455
- */
456
- dataSources?: string[];
457
- /**
458
- * The array of data source GUIDs to set on load.
459
- * @version: SDK: 1.19.0
460
- */
461
- dataSource?: string;
462
- /**
463
- * Configuration for search options
464
- */
465
- searchOptions?: SearchOptions;
466
- }
467
- /**
468
- * Embed ThoughtSpot search bar
469
- *
470
- * @version: SDK: 1.18.0 | ThoughtSpot: 8.10.0.cl, 9.0.1-sw
471
- * @group Embed components
472
- */
473
- export class SearchBarEmbed extends TsEmbed {
474
- /**
475
- * The view configuration for the embedded ThoughtSpot search bar.
476
- */
477
- protected viewConfig: SearchBarViewConfig;
478
- constructor(domSelector: string, viewConfig: SearchBarViewConfig);
479
- /**
480
- * Render the embedded ThoughtSpot search
481
- */
482
- render(): SearchBarEmbed;
483
- }
484
- }
485
-
486
- declare module '@thoughtspot/visual-embed-sdk/auth' {
487
- import EventEmitter from 'eventemitter3';
488
- import { EmbedConfig } from '@thoughtspot/visual-embed-sdk/types';
489
- export let loggedInStatus: boolean;
490
- export let samlAuthWindow: Window;
491
- export let samlCompletionPromise: Promise<void>;
492
- export const SSO_REDIRECTION_MARKER_GUID = "5e16222e-ef02-43e9-9fbd-24226bf3ce5b";
493
- export const EndPoints: {
494
- AUTH_VERIFICATION: string;
495
- SAML_LOGIN_TEMPLATE: (targetUrl: string) => string;
496
- OIDC_LOGIN_TEMPLATE: (targetUrl: string) => string;
497
- TOKEN_LOGIN: string;
498
- BASIC_LOGIN: string;
499
- LOGOUT: string;
500
- };
501
- /**
502
- * Enum for auth failure types. This is the parameter passed to the listner
503
- * of {@link AuthStatus.FAILURE}.
504
- * @group Authentication / Init
505
- */
506
- export enum AuthFailureType {
507
- SDK = "SDK",
508
- NO_COOKIE_ACCESS = "NO_COOKIE_ACCESS",
509
- EXPIRY = "EXPIRY",
510
- OTHER = "OTHER"
511
- }
512
- /**
513
- * Enum for auth status emitted by the emitter returned from {@link init}.
514
- * @group Authentication / Init
515
- */
516
- export enum AuthStatus {
517
- /**
518
- * Emits when the SDK fails to authenticate
519
- */
520
- FAILURE = "FAILURE",
521
- /**
522
- * Emits when the SDK authenticates successfully
523
- */
524
- SDK_SUCCESS = "SDK_SUCCESS",
525
- /**
526
- * Emits when the app sends an authentication success message
527
- */
528
- SUCCESS = "SUCCESS",
529
- /**
530
- * Emits when a user logs out
531
- */
532
- LOGOUT = "LOGOUT",
533
- /**
534
- * Emitted when inPopup: true in the SAMLRedirect flow.
535
- * And, we are waiting for popup to be triggered either programatically
536
- * or by the trigger button.
537
- * @version SDK: 1.19.0
538
- */
539
- WAITING_FOR_POPUP = "WAITING_FOR_POPUP"
540
- }
541
- /**
542
- * Event emitter returned from {@link init}.
543
- * @group Authentication / Init
544
- */
545
- export interface AuthEventEmitter {
546
- /**
547
- * Registed a listener on Auth failure.
548
- * @param event
549
- * @param listener
550
- */
551
- on(event: AuthStatus.FAILURE, listener: (failureType: AuthFailureType) => void): this;
552
- on(event: AuthStatus.SDK_SUCCESS | AuthStatus.LOGOUT | AuthStatus.WAITING_FOR_POPUP, listener: () => void): this;
553
- on(event: AuthStatus.SUCCESS, listener: (sessionInfo: any) => void): this;
554
- /**
555
- * Trigger an event on the emitter returned from init.
556
- * @param {@link AuthEvent}
557
- */
558
- emit(event: AuthEvent): void;
559
- }
560
- /**
561
- * Events which can be triggered on the emitter returned from {@link init}.
562
- * @group Authentication / Init
563
- */
564
- export enum AuthEvent {
565
- /**
566
- * Manually trigger the SSO popup. This is useful with
567
- * authStatus: SAMLRedirect/OIDCRedicre and inPopup: true
568
- */
569
- TRIGGER_SSO_POPUP = "TRIGGER_SSO_POPUP"
570
- }
571
- export function getAuthEE(): EventEmitter<AuthStatus | AuthEvent>;
572
- export function setAuthEE(eventEmitter: EventEmitter<AuthStatus | AuthEvent>): void;
573
- export function notifyAuthSDKSuccess(): void;
574
- export function notifyAuthSuccess(): void;
575
- export function notifyAuthFailure(failureType: AuthFailureType): void;
576
- export function notifyLogout(): void;
577
- /**
578
- * Return releaseVersion if available
579
- */
580
- export function getReleaseVersion(): string;
581
- /**
582
- * Return a promise that resolves with the session information when authentication is
583
- * successful. And info is available.
584
- * @group Global methods
585
- */
586
- export function getSessionInfo(): Promise<any>;
587
- export function initSession(sessionDetails: any): void;
588
- export const getAuthenticaionToken: (embedConfig: EmbedConfig) => Promise<any>;
589
- /**
590
- * Perform token based authentication
591
- * @param embedConfig The embed configuration
592
- */
593
- export const doTokenAuth: (embedConfig: EmbedConfig) => Promise<boolean>;
594
- /**
595
- * Validate embedConfig parameters required for cookielessTokenAuth
596
- * @param embedConfig The embed configuration
597
- */
598
- export const doCookielessTokenAuth: (embedConfig: EmbedConfig) => Promise<boolean>;
599
- /**
600
- * Perform basic authentication to the ThoughtSpot cluster using the cluster
601
- * credentials.
602
- *
603
- * Warning: This feature is primarily intended for developer testing. It is
604
- * strongly advised not to use this authentication method in production.
605
- * @param embedConfig The embed configuration
606
- */
607
- export const doBasicAuth: (embedConfig: EmbedConfig) => Promise<boolean>;
608
- export const doSamlAuth: (embedConfig: EmbedConfig) => Promise<boolean>;
609
- export const doOIDCAuth: (embedConfig: EmbedConfig) => Promise<boolean>;
610
- export const logout: (embedConfig: EmbedConfig) => Promise<boolean>;
611
- /**
612
- * Perform authentication on the ThoughtSpot cluster
613
- * @param embedConfig The embed configuration
614
- */
615
- export const authenticate: (embedConfig: EmbedConfig) => Promise<boolean>;
616
- /**
617
- * Check if we are authenticated to the ThoughtSpot cluster
618
- */
619
- export const isAuthenticated: () => boolean;
620
- }
621
-
622
- declare module '@thoughtspot/visual-embed-sdk/types' {
623
- /**
624
- * The authentication mechanism for allowing access to the
625
- * the embedded app
626
- * @group Authentication / Init
627
- */
628
- export enum AuthType {
629
- /**
630
- * No authentication on the SDK. Passthrough to the embedded App. Alias for `Passthrough`.
631
- */
632
- None = "None",
633
- /**
634
- * Passthrough SSO to the embedded App within the iframe. Requires least configuration, but may not
635
- * be supported by all IDPs. This will behave like `None` if SSO is not configured on ThoughtSpot.
636
- * @version: SDK: 1.15.0 | ThouhgtSpot: 8.8.0.cl
637
- */
638
- EmbeddedSSO = "EmbeddedSSO",
639
- /**
640
- * SSO using SAML
641
- * @deprecated Use {@link SAMLRedirect} instead
642
- * @hidden
643
- */
644
- SSO = "SSO_SAML",
645
- /**
646
- * SSO using SAML
647
- * @deprecated Use {@link SAMLRedirect} instead
648
- * @hidden
649
- */
650
- SAML = "SSO_SAML",
651
- /**
652
- * SSO using SAML
653
- * Will make the host application redirect to the SAML Idp. Use this
654
- * when the idp does not allow itself to be embedded.
655
- *
656
- * This redirects the host application to the SAML Idp. The host application
657
- * will be redirected back to the ThoughtSpot app after authentication.
658
- * @example
659
- * ```js
660
- * init({
661
- * // ...
662
- * authType: AuthType.SAMLRedirect,
663
- * });
664
- * ```
665
- *
666
- * This opens the SAML Idp in a popup window. The popup is triggered
667
- * when the user clicks the trigger button. The popup window will be
668
- * closed automatically after authentication.
669
- * @example
670
- * ```js
671
- * init({
672
- * // ...
673
- * authType: AuthType.SAMLRedirect,
674
- * authTriggerText: 'Login with SAML',
675
- * authTriggerContainer: '#embed-container',
676
- * inPopup: true,
677
- * });
678
- * ```
679
- *
680
- * Can also use event to trigger the popup flow. Works the same
681
- * as above example.
682
- * @example
683
- * ```js
684
- * const authEE = init({
685
- * // ...
686
- * authType: AuthType.SAMLRedirect,
687
- * inPopup: true,
688
- * });
689
- *
690
- * someButtonOnYourPage.addEventListener('click', () => {
691
- * authEE.emit(AuthEvent.TRIGGER_SSO_POPUP);
692
- * });
693
- * ```
694
- */
695
- SAMLRedirect = "SSO_SAML",
696
- /**
697
- * SSO using OIDC
698
- * @hidden
699
- * @deprecated Use {@link OIDCRedirect} instead
700
- */
701
- OIDC = "SSO_OIDC",
702
- /**
703
- * SSO using OIDC
704
- * Will make the host application redirect to the OIDC Idp.
705
- * See code samples in {@link SAMLRedirect}.
706
- */
707
- OIDCRedirect = "SSO_OIDC",
708
- /**
709
- * Trusted authentication server
710
- * @hidden
711
- * @deprecated Use {@link TrustedAuth} instead
712
- */
713
- AuthServer = "AuthServer",
714
- /**
715
- * Trusted authentication server, Use your own authentication server
716
- * which returns a bearer token, generated using the secret_key obtained from
717
- * ThoughtSpot.
718
- *
719
- * @example
720
- * ```js
721
- * init({
722
- * // ...
723
- * authType: AuthType.TrustedAuthToken,
724
- * getAuthToken: () => {
725
- * return fetch('https://my-backend.app/ts-token')
726
- * .then((response) => response.json())
727
- * .then((data) => data.token);
728
- * }
729
- * ```
730
- */
731
- TrustedAuthToken = "AuthServer",
732
- /**
733
- * Trusted authentication server Cookieless, Use you own authentication server
734
- * which returns a bearer token, generated using the secret_key obtained from
735
- * ThoughtSpot. This uses a cookieless authentication approach, recommended
736
- * to by pass third-party cookie-blocking restriction implemented by some browsers
737
- */
738
- TrustedAuthTokenCookieless = "AuthServerCookieless",
739
- /**
740
- * Use the ThoughtSpot login API to authenticate to the cluster directly.
741
- *
742
- * Warning: This feature is primarily intended for developer testing. It is
743
- * strongly advised not to use this authentication method in production.
744
- */
745
- Basic = "Basic"
746
- }
747
- export type DOMSelector = string | HTMLElement;
748
- /**
749
- * inline customCSS within the {@link CustomisationsInterface}.
750
- */
751
- export interface customCssInterface {
752
- variables?: {
753
- [variableName: string]: string;
754
- };
755
- rules_UNSTABLE?: {
756
- [selector: string]: {
757
- [declaration: string]: string;
758
- };
759
- };
760
- }
761
- /**
762
- * Styles within the {@link CustomisationsInterface}.
763
- */
764
- export interface CustomStyles {
765
- customCSSUrl?: string;
766
- customCSS?: customCssInterface;
767
- }
768
- /**
769
- * Configuration to define the customization on the Embedded
770
- * Thoughtspot components.
771
- *
772
- * @example
773
- * ```js
774
- * init({
775
- * // ...
776
- * customizations: {
777
- * style: {
778
- * customCSS: {
779
- * variables: {},
780
- * rules_UNSTABLE: {}
781
- * }
782
- * },
783
- * content: {
784
- * strings: {
785
- * 'LIVEBOARDS': 'Dashboards'
786
- * }
787
- * },
788
- * iconSpriteUrl: 'https://my-custom-icon-sprite.svg'
789
- * }
790
- * })
791
- * ```
792
- */
793
- export interface CustomisationsInterface {
794
- style?: CustomStyles;
795
- content?: {
796
- strings?: Record<string, any>;
797
- [key: string]: any;
798
- };
799
- iconSpriteUrl?: string;
800
- }
801
- /**
802
- * The configuration object for embedding ThoughtSpot content.
803
- * It includes the ThoughtSpot hostname or IP address,
804
- * the type of authentication, and the authentication endpoint
805
- * if a trusted authentication server is used.
806
- *
807
- * @group Authentication / Init
808
- */
809
- export interface EmbedConfig {
810
- /**
811
- * The ThoughtSpot cluster hostname or IP address.
812
- */
813
- thoughtSpotHost: string;
814
- /**
815
- * The authentication mechanism to use.
816
- */
817
- authType: AuthType;
818
- /**
819
- * [AuthServer] The trusted authentication endpoint to use to get the
820
- * authentication token. A GET request is made to the
821
- * authentication API endpoint, which returns the token
822
- * as a plaintext response. For trusted authentication,
823
- * the `authEndpoint` or `getAuthToken` attribute is required.
824
- */
825
- authEndpoint?: string;
826
- /**
827
- * [AuthServer] A function that invokes the trusted authentication endpoint
828
- * and returns a Promise that resolves to the `auth token` string.
829
- * For trusted authentication, the `authEndpoint` or `getAuthToken`
830
- * attribute is required.
831
- *
832
- * It is advisable to fetch a new token inside this method and not
833
- * reuse and older issued token, as because when auth expires this is
834
- * called again and if it is called with an older token the authentication
835
- * will not succeed.
836
- */
837
- getAuthToken?: () => Promise<string>;
838
- /**
839
- * [AuthServer / Basic] The user name of the ThoughtSpot user. This attribute is
840
- * required for trusted authentication.
841
- */
842
- username?: string;
843
- /**
844
- * [Basic] The ThoughtSpot login password corresponding to the user name
845
- *
846
- * Warning: This feature is primarily intended for developer testing. It is
847
- * strongly advised not to use this authentication method in production.
848
- */
849
- password?: string;
850
- /**
851
- * [SSO] For SSO Authentication, if `noRedirect` is set to true, it will open the SAML auth
852
- * flow in a popup, instead of redirecting browser in place.
853
- *
854
- * @default false
855
- * @deprecated
856
- */
857
- noRedirect?: boolean;
858
- /**
859
- * [SSO] For SSO Authentication, if `inPopup` is set to true, it will open the SAML auth
860
- * flow in a popup, instead of redirecting browser in place.
861
- *
862
- * @default false
863
- * @version SDK: 1.18.0
864
- */
865
- inPopup?: boolean;
866
- /**
867
- * [SSO] For SSO Authentication, one can supply an optional path param,
868
- * this will be the path on the host origin where the SAML flow will be
869
- * terminated.
870
- *
871
- * Eg: "/dashboard", "#/foo" [Do not include the host]
872
- * @version SDK: 1.10.2 | 8.2.0.cl, 8.4.1-sw
873
- */
874
- redirectPath?: string;
875
- /** @internal */
876
- basepath?: string;
877
- /**
878
- * Should we encode URL Query Params using base64 encoding which thoughtspot
879
- * will generate for embedding. This provides additional security to
880
- * thoughtspot clusters against Cross site scripting attacks.
881
- * @default false
882
- */
883
- shouldEncodeUrlQueryParams?: boolean;
884
- /**
885
- * Suppress cookie access alert when third party cookies are blocked by the user's browser.
886
- * Third party cookie blocking is the default behaviour on Safari and opt-in for Firefox/Chrome.
887
- * If you set this to `true`, you are encouraged to handle `noCookieAccess` event, to show your own treatment
888
- * in this case.
889
- * @default false
890
- */
891
- suppressNoCookieAccessAlert?: boolean;
892
- /**
893
- * Re-login when session expires with the previous login options
894
- * @default false
895
- */
896
- autoLogin?: boolean;
897
- /**
898
- * Disable redirection to the login page when the embedded session expires
899
- * This flag is typically used alongside the combination of auth modes such as {@link AuthType.AuthServer} and auto login behavior {@link EmbedConfig.autoLogin}
900
- * @version SDK: 1.9.3 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw
901
- * @default false
902
- */
903
- disableLoginRedirect?: boolean;
904
- /**
905
- * This message is displayed on the embed view when the login fails.
906
- * @version SDK: 1.10.1 | ThoughtSpot: 8.2.0.cl, 8.4.1-sw
907
- */
908
- loginFailedMessage?: string;
909
- /**
910
- * Calls the prefetch method internally when set to true
911
- * @default false
912
- */
913
- callPrefetch?: boolean;
914
- /**
915
- * When there are multiple embeds, queue the render of embed to start
916
- * after the previous embed's render is complete. This helps in the load performance
917
- * by decreasing the load on the browser.
918
- * @Version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
919
- * @default false
920
- */
921
- queueMultiRenders?: boolean;
922
- /**
923
- * Dynamic CSS Url to be injected in the loaded application.
924
- * You would also need to set `style-src` in the CSP settings.
925
- * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1-sw
926
- * @default ''
927
- */
928
- customCssUrl?: string;
929
- /**
930
- * [AuthServer|Basic] Detect if 3rd party cookies are enabled by doing an additional call. This is slower
931
- * and should be avoided. Listen to the NO_COOKIE_ACCESS event to handle the situation.
932
- *
933
- * This is slightly slower than letting the browser handle the cookie check, as it involves an extra network call.
934
- * @version SDK: 1.10.4 | ThoughtSpot: 8.2.0.cl, 8.4.1-sw
935
- */
936
- detectCookieAccessSlow?: boolean;
937
- /**
938
- * Hide beta alert warning message for SearchEmbed.
939
- *
940
- * @version SDK: 1.12.0 | ThoughtSpot: 8.4.0.cl, 8.4.1-sw*
941
- */
942
- suppressSearchEmbedBetaWarning?: boolean;
943
- /**
944
- * Custom style params for embed Config.
945
- *
946
- * @version SDK: 1.17.0 | ThoughtSpot: 8.9.0.cl
947
- */
948
- customizations?: CustomisationsInterface;
949
- /**
950
- * For noRedirect SSO Auth, we need a button which the user
951
- * click to trigger the flow. This is the containing element
952
- * for that button.
953
- *
954
- * @version SDK: 1.17.0 | ThoughtSpot: *
955
- */
956
- authTriggerContainer?: string | HTMLElement;
957
- /**
958
- * Text to show in the button which triggers the popup auth flow.
959
- * Default: "Authorize".
960
- * @version SDK: 1.17.0 | ThoughtSpot: *
961
- */
962
- authTriggerText?: string;
963
- }
964
- export interface LayoutConfig {
965
- }
966
- /**
967
- * Embedded iFrame configuration
968
- *
969
- * @group Embed components
970
- */
971
- export interface FrameParams {
972
- /**
973
- * The width of the iFrame (unit is pixels if numeric).
974
- */
975
- width?: number | string;
976
- /**
977
- * The height of the iFrame (unit is pixels if numeric).
978
- */
979
- height?: number | string;
980
- /**
981
- * Set to 'lazy' to enable lazy loading of the embedded TS frame.
982
- * This will defer loading of the frame until it comes into the
983
- * viewport. This is useful for performance optimization.
984
- */
985
- loading?: 'lazy' | 'eager' | 'auto';
986
- /**
987
- * This parameters will be passed on the iframe
988
- * as is.
989
- */
990
- [key: string]: string | number | boolean | undefined;
991
- }
992
- /**
993
- * The configuration object for an embedded view.
994
- */
995
- export interface ViewConfig {
996
- /**
997
- * @hidden
998
- */
999
- layoutConfig?: LayoutConfig;
1000
- /**
1001
- * The <b>width</b> and <b>height</b> dimensions to render an embedded object inside your app. Specify the values in pixels or percentage.
1002
- */
1003
- frameParams?: FrameParams;
1004
- /**
1005
- * @hidden
1006
- */
1007
- theme?: string;
1008
- /**
1009
- * @hidden
1010
- */
1011
- styleSheet__unstable?: string;
1012
- /**
1013
- * The list of actions to disable from the primary menu, more menu
1014
- * (...), and the contextual menu.
1015
- */
1016
- disabledActions?: Action[];
1017
- /**
1018
- * The tooltip to display for disabled actions.
1019
- */
1020
- disabledActionReason?: string;
1021
- /**
1022
- * The list of actions to hide from the primary menu, more menu
1023
- * (...), and the contextual menu.
1024
- */
1025
- hiddenActions?: Action[];
1026
- /**
1027
- * The list of actions to display from the primary menu, more menu
1028
- * (...), and the contextual menu.
1029
- * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1-sw
1030
- */
1031
- visibleActions?: Action[];
1032
- /**
1033
- * Show alert messages and toast messages in the embedded view.
1034
- * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
1035
- */
1036
- showAlerts?: boolean;
1037
- /**
1038
- * The list of runtime filters to apply to a search answer,
1039
- * visualization, or Liveboard.
1040
- */
1041
- runtimeFilters?: RuntimeFilter[];
1042
- /**
1043
- * The locale/language to use for the embedded view.
1044
- * @version SDK: 1.9.4 | ThoughtSpot 8.1.0.cl, 8.4.1-sw
1045
- */
1046
- locale?: string;
1047
- /**
1048
- * This is an object (key/val) of override flags which will be applied
1049
- * to the internal embedded object. This can be used to add any
1050
- * URL flag.
1051
- * Warning: This option is for advanced use only and is used internally
1052
- * to control embed behavior in non-regular ways. We do not publish the
1053
- * list of supported keys and values associated with each.
1054
- * @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw
1055
- */
1056
- additionalFlags?: {
1057
- [key: string]: string | number | boolean;
1058
- };
1059
- /**
1060
- * Dynamic CSSUrl and customCSS to be injected in the loaded application.
1061
- * You would also need to set `style-src` in the CSP settings.
1062
- * @version SDK: 1.17.2 | ThoughtSpot: 8.4.1-sw, 8.4.0.cl
1063
- * @default ''
1064
- */
1065
- customizations?: CustomisationsInterface;
1066
- /**
1067
- * Insert as a sibling of the target container, instead of appending to a child inside it.
1068
- */
1069
- insertAsSibling?: boolean;
1070
- /**
1071
- * flag to set ContextMenu Trigger to either left or right click.
1072
- * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
1073
- */
1074
- contextMenuTrigger?: ContextMenuTriggerOptions;
1075
- /**
1076
- * flag to override openNew tab context menu link
1077
- * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
1078
- */
1079
- linkOverride?: boolean;
1080
- /**
1081
- * flag to enable insert into slides action
1082
- * @hidden
1083
- * @private
1084
- */
1085
- insertInToSlide?: boolean;
1086
- }
1087
- /**
1088
- * MessagePayload: Embed event payload: message type, data and status (start/end)
1089
- * @group Events
1090
- */
1091
- export type MessagePayload = {
1092
- type: string;
1093
- data: any;
1094
- status?: string;
1095
- };
1096
- /**
1097
- * MessageOptions: By Providing options, getting specific event start / end based on option
1098
- * @group Events
1099
- */
1100
- export type MessageOptions = {
1101
- start?: boolean;
1102
- };
1103
- /**
1104
- * MessageCallback: Embed event message callback
1105
- * @group Events
1106
- */
1107
- export type MessageCallback = (payload: MessagePayload, responder?: (data: any) => void) => void;
1108
- /**
1109
- * MessageCallbackObj: contains message options & callback function
1110
- */
1111
- export type MessageCallbackObj = {
1112
- options: MessageOptions;
1113
- callback: MessageCallback;
1114
- };
1115
- export type GenericCallbackFn = (...args: any[]) => any;
1116
- export type QueryParams = {
1117
- [key: string]: string;
1118
- };
1119
- /**
1120
- * A map of the supported runtime filter operations
1121
- */
1122
- export enum RuntimeFilterOp {
1123
- /**
1124
- * Equals
1125
- */
1126
- EQ = "EQ",
1127
- /**
1128
- * Does not equal
1129
- */
1130
- NE = "NE",
1131
- /**
1132
- * Less than
1133
- */
1134
- LT = "LT",
1135
- /**
1136
- * Less than or equal to
1137
- */
1138
- LE = "LE",
1139
- /**
1140
- * Greater than
1141
- */
1142
- GT = "GT",
1143
- /**
1144
- * Greater than or equal to
1145
- */
1146
- GE = "GE",
1147
- /**
1148
- * Contains
1149
- */
1150
- CONTAINS = "CONTAINS",
1151
- /**
1152
- * Begins with
1153
- */
1154
- BEGINS_WITH = "BEGINS_WITH",
1155
- /**
1156
- * Ends with
1157
- */
1158
- ENDS_WITH = "ENDS_WITH",
1159
- /**
1160
- * Between, inclusive of higher value
1161
- */
1162
- BW_INC_MAX = "BW_INC_MAX",
1163
- /**
1164
- * Between, inclusive of lower value
1165
- */
1166
- BW_INC_MIN = "BW_INC_MIN",
1167
- /**
1168
- * Between, inclusive of both higher and lower value
1169
- */
1170
- BW_INC = "BW_INC",
1171
- /**
1172
- * Between, non-inclusive
1173
- */
1174
- BW = "BW",
1175
- /**
1176
- * Is included in this list of values
1177
- */
1178
- IN = "IN"
1179
- }
1180
- /**
1181
- * A filter that can be applied to ThoughtSpot answers, Liveboards, or
1182
- * visualizations at runtime.
1183
- */
1184
- export interface RuntimeFilter {
1185
- /**
1186
- * The name of the column to filter on (case-sensitive)
1187
- */
1188
- columnName: string;
1189
- /**
1190
- * The operator to apply
1191
- */
1192
- operator: RuntimeFilterOp;
1193
- /**
1194
- * The list of operands. Some operators like EQ, LE accept
1195
- * a single operand, whereas other operators like BW and IN accept multiple operands.
1196
- */
1197
- values: (number | boolean | string)[];
1198
- }
1199
- /**
1200
- * Event types emitted by the embedded ThoughtSpot application.
1201
- *
1202
- * To add an event listener use the corresponding
1203
- * {@link LiveboardEmbed.on} or {@link AppEmbed.on} or {@link SearchEmbed.on} method.
1204
- * @group Events
1205
- */
1206
- export enum EmbedEvent {
1207
- /**
1208
- * Rendering has initialized.
1209
- * @return timestamp - The timestamp when the event was generated.
1210
- */
1211
- Init = "init",
1212
- /**
1213
- * Authentication has either succeeded or failed.
1214
- * @return isLoggedIn - A Boolean specifying whether authentication was successful.
1215
- */
1216
- AuthInit = "authInit",
1217
- /**
1218
- * The embed object container has loaded.
1219
- * @return timestamp - The timestamp when the event was generated.
1220
- */
1221
- Load = "load",
1222
- /**
1223
- * Data pertaining to answer or Liveboard is received
1224
- * @return data - The answer or Liveboard data
1225
- */
1226
- Data = "data",
1227
- /**
1228
- * Search/answer/Liveboard filters have been applied/updated
1229
- * @hidden
1230
- */
1231
- FiltersChanged = "filtersChanged",
1232
- /**
1233
- * Search query has been updated
1234
- */
1235
- QueryChanged = "queryChanged",
1236
- /**
1237
- * A drill down operation has been performed.
1238
- * @return additionalFilters - Any additional filters applied
1239
- * @return drillDownColumns - The columns on which drill down was performed
1240
- * @return nonFilteredColumns - The columns that were not filtered
1241
- */
1242
- Drilldown = "drillDown",
1243
- /**
1244
- * One or more data sources have been selected.
1245
- * @return dataSourceIds - the list of data sources
1246
- */
1247
- DataSourceSelected = "dataSourceSelected",
1248
- /**
1249
- * One or more data columns have been selected.
1250
- * @return columnIds - the list of columns
1251
- * @version SDK: 1.10.0 | ThoughtSpot: 8.2.0.cl, 8.4.1-sw
1252
- */
1253
- AddRemoveColumns = "addRemoveColumns",
1254
- /**
1255
- * A custom action has been triggered
1256
- * @return actionId - The id of the custom action
1257
- * @return data - The answer or Liveboard data
1258
- */
1259
- CustomAction = "customAction",
1260
- /**
1261
- * A double click has been triggered on table/chart
1262
- * @return ContextMenuInputPoints - data point that is double clicked
1263
- * @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
1264
- */
1265
- VizPointDoubleClick = "vizPointDoubleClick",
1266
- /**
1267
- * A click has been triggered on table/chart
1268
- * @return ContextMenuInputPoints - data point that is clicked
1269
- * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
1270
- */
1271
- VizPointClick = "vizPointClick",
1272
- /**
1273
- * An error has occurred.
1274
- * @return error - An error object or message
1275
- */
1276
- Error = "Error",
1277
- /**
1278
- * The embedded object has sent an alert
1279
- * @return alert - An alert object
1280
- */
1281
- Alert = "alert",
1282
- /**
1283
- * The ThoughtSpot auth session has expired.
1284
- */
1285
- AuthExpire = "ThoughtspotAuthExpired",
1286
- /**
1287
- * ThoughtSpot failed to validate the auth session.
1288
- * @hidden
1289
- */
1290
- AuthFailure = "ThoughtspotAuthFailure",
1291
- /**
1292
- * ThoughtSpot failed to validate the auth session.
1293
- * @hidden
1294
- */
1295
- AuthLogout = "ThoughtspotAuthLogout",
1296
- /**
1297
- * The height of the embedded Liveboard or visualization has been computed.
1298
- * @return data - The height of the embedded Liveboard or visualization
1299
- * @hidden
1300
- */
1301
- EmbedHeight = "EMBED_HEIGHT",
1302
- /**
1303
- * The center of visible iframe viewport is calculated.
1304
- * @return data - The center of the visible Iframe viewport.
1305
- * @hidden
1306
- */
1307
- EmbedIframeCenter = "EmbedIframeCenter",
1308
- /**
1309
- * Emitted when the "Get Data" button in Search Bar embed
1310
- * is clicked.
1311
- * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.0-sw
1312
- */
1313
- GetDataClick = "getDataClick",
1314
- /**
1315
- * Detects the route change.
1316
- */
1317
- RouteChange = "ROUTE_CHANGE",
1318
- /**
1319
- * The v1 event type for Data
1320
- * @hidden
1321
- */
1322
- V1Data = "exportVizDataToParent",
1323
- /**
1324
- * Emitted when the embed does not have cookie access. This
1325
- * happens on Safari where third-party cookies are blocked by default.
1326
- *
1327
- * @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 7.2.1
1328
- */
1329
- NoCookieAccess = "noCookieAccess",
1330
- /**
1331
- * Emitted when SAML is complete
1332
- * @private
1333
- * @hidden
1334
- */
1335
- SAMLComplete = "samlComplete",
1336
- /**
1337
- * Emitted when any modal is opened in the app
1338
- * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1-sw
1339
- */
1340
- DialogOpen = "dialog-open",
1341
- /**
1342
- * Emitted when any modal is closed in the app
1343
- * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1-sw
1344
- */
1345
- DialogClose = "dialog-close",
1346
- /**
1347
- * Emitted when the Liveboard shell loads.
1348
- * You can use this event as a hook to trigger
1349
- * other events on the rendered Liveboard.
1350
- * @version SDK: 1.9.1 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw
1351
- */
1352
- LiveboardRendered = "PinboardRendered",
1353
- /**
1354
- * This can be used to register an event listener which
1355
- * is triggered on all events.
1356
- * @Version SDK: 1.10.0 | ThoughtSpot: 8.2.0.cl, 8.4.1-sw
1357
- */
1358
- ALL = "*",
1359
- /**
1360
- * Emitted when answer is saved in the app
1361
- * @Version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
1362
- */
1363
- Save = "save",
1364
- /**
1365
- * Emitted when the download action is triggered on an answer
1366
- * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
1367
- */
1368
- Download = "download",
1369
- /**
1370
- * Emitted when the download action is triggered on an answer
1371
- *
1372
- * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.0-sw
1373
- */
1374
- DownloadAsPng = "downloadAsPng",
1375
- /**
1376
- * Emitted when the Download as PDF action is triggered on an answer
1377
- * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
1378
- */
1379
- DownloadAsPdf = "downloadAsPdf",
1380
- /**
1381
- * Emitted when the Download as CSV action is triggered on an answer
1382
- * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
1383
- */
1384
- DownloadAsCsv = "downloadAsCsv",
1385
- /**
1386
- * Emitted when the Download as XLSX action is triggered on an answer
1387
- * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
1388
- */
1389
- DownloadAsXlsx = "downloadAsXlsx",
1390
- /**
1391
- * Emitted when an answer is deleted in the app
1392
- * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
1393
- */
1394
- AnswerDelete = "answerDelete",
1395
- /**
1396
- * Emitted when an answer is pinned to a Liveboard
1397
- * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
1398
- */
1399
- Pin = "pin",
1400
- /**
1401
- * Emitted when SpotIQ analysis is triggered
1402
- * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
1403
- */
1404
- SpotIQAnalyze = "spotIQAnalyze",
1405
- /**
1406
- * Emitted when a user shares an object with another user or group
1407
- * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
1408
- */
1409
- Share = "share",
1410
- /**
1411
- * Emitted when a user clicks the Include action to include a specific value or data on a chart or table
1412
- * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
1413
- */
1414
- DrillInclude = "context-menu-item-include",
1415
- /**
1416
- * Emitted when a user clicks the Exclude action to exclude a specific value or data on a chart or table
1417
- * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
1418
- */
1419
- DrillExclude = "context-menu-item-exclude",
1420
- /**
1421
- * Emitted when copied column value on the app
1422
- * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
1423
- */
1424
- CopyToClipboard = "context-menu-item-copy-to-clipboard",
1425
- /**
1426
- * Emitted when a user clicks the Update TML action
1427
- * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
1428
- */
1429
- UpdateTML = "updateTSL",
1430
- /**
1431
- * Emitted when a user clicks the Edit TML action
1432
- * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
1433
- */
1434
- EditTML = "editTSL",
1435
- /**
1436
- * Emitted when ExportTML trigger in answer on the app
1437
- * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
1438
- */
1439
- ExportTML = "exportTSL",
1440
- /**
1441
- * Emitted when an answer is saved as a view
1442
- * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
1443
- */
1444
- SaveAsView = "saveAsView",
1445
- /**
1446
- * Emitted when copy of existing answer on the app
1447
- * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
1448
- */
1449
- CopyAEdit = "copyAEdit",
1450
- /**
1451
- * Emitted when a user clicks Show underlying data on an answe
1452
- * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
1453
- */
1454
- ShowUnderlyingData = "showUnderlyingData",
1455
- /**
1456
- * Emitted when an answer is switched to a chart or table view
1457
- * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
1458
- */
1459
- AnswerChartSwitcher = "answerChartSwitcher",
1460
- /**
1461
- * Internal event to communicate the initial settings back to the TS APP
1462
- * @hidden
1463
- */
1464
- APP_INIT = "appInit",
1465
- /**
1466
- * Emitted when a user clicks Show Liveboard details on a Liveboard
1467
- * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
1468
- */
1469
- LiveboardInfo = "pinboardInfo",
1470
- /**
1471
- * Emitted when a user clicks on the Favorite icon on a Liveboard
1472
- * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
1473
- */
1474
- AddToFavorites = "addToFavorites",
1475
- /**
1476
- * Emitted when a user clicks Schedule on a Liveboard
1477
- * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
1478
- */
1479
- Schedule = "subscription",
1480
- /**
1481
- * Emitted when a user clicks Edit on a Liveboard or visualization
1482
- * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
1483
- */
1484
- Edit = "edit",
1485
- /**
1486
- * Emitted when a user clicks Make a copy on a Liveboard
1487
- * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
1488
- */
1489
- MakeACopy = "makeACopy",
1490
- /**
1491
- * Emitted when a user clicks Present on a Liveboard or visualization
1492
- * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
1493
- */
1494
- Present = "present",
1495
- /**
1496
- * Emitted when a user clicks Delete on a Liveboard
1497
- * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
1498
- */
1499
- Delete = "delete",
1500
- /**
1501
- * Emitted when a user clicks Manage schedules on a Liveboard
1502
- * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
1503
- */
1504
- SchedulesList = "schedule-list",
1505
- /**
1506
- * Emitted when a user clicks Cancel in edit mode on a Liveboard
1507
- * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
1508
- */
1509
- Cancel = "cancel",
1510
- /**
1511
- * Emitted when a user clicks Explore on a visualization
1512
- * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
1513
- */
1514
- Explore = "explore",
1515
- /**
1516
- * Emitted when a user clicks Copy link action on a visualization
1517
- * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
1518
- */
1519
- CopyLink = "embedDocument",
1520
- /**
1521
- * Emitted when a user interacts with cross filters on a visualization or liveboard
1522
- * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
1523
- */
1524
- CrossFilterChanged = "cross-filter-changed",
1525
- /**
1526
- * Emitted when a user right clicks on chart or table
1527
- * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
1528
- */
1529
- VizPointRightClick = "vizPointRightClick"
1530
- }
1531
- /**
1532
- * Event types that can be triggered by the host application
1533
- * to the embedded ThoughtSpot app
1534
- *
1535
- * To trigger an event use the corresponding
1536
- * {@link LiveboardEmbed.trigger} or {@link AppEmbed.trigger} or {@link SearchEmbed.trigger} method.
1537
- * @group Events
1538
- */
1539
- export enum HostEvent {
1540
- /**
1541
- * Trigger a search
1542
- * @param - dataSourceIds - The data source GUID to Search on
1543
- * - Although an array, only a single source
1544
- * is supported at this time.
1545
- * @param - searchQuery - The search query
1546
- * @param - execute - execute the existing / updated query
1547
- * @example
1548
- * ```js
1549
- * searchEmbed.trigger(HostEvent.Search, {
1550
- * searchQuery: "[sales] by [item type],
1551
- * dataSourceIds: ["cd252e5c-b552-49a8-821d-3eadaa049cca"]
1552
- * execute: true
1553
- * })
1554
- * ```
1555
- */
1556
- Search = "search",
1557
- /**
1558
- * Trigger a drill on certain points by certain column
1559
- * @param - points - an object containing selectedPoints/clickedPoints
1560
- * eg. { selectedPoints: []}
1561
- * @param - columnGuid - a string guid of the column to drill by. This is optional,
1562
- * if not provided it will auto drill by the configured column.
1563
- * @example
1564
- * ```js
1565
- * searchEmbed.trigger(HostEvent.DrillDown, {
1566
- * points: clickedPointData,
1567
- * autoDrillDown: true,
1568
- * })
1569
- * ```
1570
- *
1571
- * @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
1572
- */
1573
- DrillDown = "triggerDrillDown",
1574
- /**
1575
- * Apply filters
1576
- * @hidden
1577
- */
1578
- Filter = "filter",
1579
- /**
1580
- * Reload the answer or visualization
1581
- * @hidden
1582
- */
1583
- Reload = "reload",
1584
- /**
1585
- * Set the visible visualizations on a Liveboard.
1586
- * @param - an array of ids of visualizations to show, the ids not passed
1587
- * will be hidden.
1588
- * @example
1589
- * liveboardEmbed.trigger(HostEvent.SetVisibleVizs, ['730496d6-6903-4601-937e-2c691821af3c', 'd547ec54-2a37-4516-a222-2b06719af726'])
1590
- * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1-sw
1591
- */
1592
- SetVisibleVizs = "SetPinboardVisibleVizs",
1593
- /**
1594
- * Update the runtime filters. The runtime filters passed here are extended
1595
- * on to the existing runtime filters if they exist.
1596
- * @param - {@link RuntimeFilter}[] an array of {@link RuntimeFilter} Types.
1597
- * @example
1598
- * liveboardEmbed.trigger(HostEvent.UpdateRuntimeFilters, [
1599
- * {columnName: "state",operator: RuntimeFilterOp.EQ,values: ["michigan"]},
1600
- * {columnName: "item type",operator: RuntimeFilterOp.EQ,values: ["Jackets"]}
1601
- * ])
1602
- * @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw
1603
- */
1604
- UpdateRuntimeFilters = "UpdateRuntimeFilters",
1605
- /**
1606
- * Navigate to a specific page in App embed without any reload.
1607
- * This is the same as calling `appEmbed.navigateToPage(path, true)`
1608
- * @param - path - the path to navigate to (can be a number[1/-1] to go forward/back)
1609
- * @example
1610
- * ```js
1611
- * appEmbed.navigateToPage(-1)
1612
- * ```
1613
- * @version SDK: 1.12.0 | ThoughtSpot 8.4.0.cl, 8.4.1-sw
1614
- */
1615
- Navigate = "Navigate",
1616
- /**
1617
- * Opens the filter panel for a particular column.
1618
- * Works with Search embed.
1619
- * @param - { columnId: string, name: string, type: INT64/CHAR/DATE, dataType: ATTRIBUTE/MEASURE }
1620
- * @example
1621
- * ```js
1622
- * searchEmbed.trigger(HostEvent.OpenFilter, { columnId: '123', name: 'column name', type: 'INT64', dataType: 'ATTRIBUTE' })
1623
- * ```
1624
- * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
1625
- */
1626
- OpenFilter = "openFilter",
1627
- /**
1628
- * Adds the columns to the current Search.
1629
- * @param - { columnIds: string[] }
1630
- * @example
1631
- * ```js
1632
- * searchEmbed.trigger(HostEvent.AddColumns, { columnIds: ['123', '456'] })
1633
- * ```
1634
- * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
1635
- */
1636
- AddColumns = "addColumns",
1637
- /**
1638
- * Removes a column from the current Search.
1639
- * @param - { columnId: string }
1640
- * @example
1641
- * ```js
1642
- * searchEmbed.trigger(HostEvent.RemoveColumn, { columnId: '123' })
1643
- * ```
1644
- * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
1645
- */
1646
- RemoveColumn = "removeColumn",
1647
- /**
1648
- * Gets the current pinboard content.
1649
- * @example
1650
- * ```js
1651
- * liveboardEmbed.trigger(HostEvent.getExportRequestForCurrentPinboard)
1652
- * ```
1653
- * @version SDK: 1.13.0 | ThoughtSpot: 8.5.0.cl, 8.8.1-sw
1654
- */
1655
- getExportRequestForCurrentPinboard = "getExportRequestForCurrentPinboard",
1656
- /**
1657
- * Triggers the Pin action on an embedded object
1658
- * @param - incase of Liveboard embed, takes in an object with vizId as a key
1659
- * can be left empty for search and visualization embeds
1660
- * @example
1661
- * ```js
1662
- * liveboardEmbed.trigger(HostEvent.Pin, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1663
- * vizEmbed.trigger(HostEvent.Pin)
1664
- * searchEmbed.trigger(HostEvent.Pin)
1665
- * ```
1666
- * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
1667
- */
1668
- Pin = "pin",
1669
- /**
1670
- * Triggers the Show Liveboard details action on a Liveboard
1671
- * @example
1672
- * ```js
1673
- * liveboardEmbed.trigger(HostEvent.LiveboardInfo)
1674
- * ```
1675
- * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
1676
- */
1677
- LiveboardInfo = "pinboardInfo",
1678
- /**
1679
- * Triggers the Schedule action on a Liveboard
1680
- * @example
1681
- * ```js
1682
- * liveboardEmbed.trigger(HostEvent.Schedule)
1683
- * ```
1684
- * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
1685
- */
1686
- Schedule = "subscription",
1687
- /**
1688
- * Triggers the Manage schedule action on a Liveboard
1689
- * @example
1690
- * ```js
1691
- * liveboardEmbed.trigger(HostEvent.ScheduleList)
1692
- * ```
1693
- * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
1694
- */
1695
- SchedulesList = "schedule-list",
1696
- /**
1697
- * Triggers the Export TML action on a Liveboard
1698
- * @example
1699
- * ```js
1700
- * liveboardEmbed.trigger(HostEvent.ExportTML)
1701
- * ```
1702
- * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
1703
- */
1704
- ExportTML = "exportTSL",
1705
- /**
1706
- * Triggers the Edit TML action on a Liveboard
1707
- * @example
1708
- * ```js
1709
- * liveboardEmbed.trigger(HostEvent.EditTML)
1710
- * ```
1711
- * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
1712
- */
1713
- EditTML = "editTSL",
1714
- /**
1715
- * Triggers the Update TML action on a Liveboard
1716
- * @example
1717
- * ```js
1718
- * liveboardEmbed.trigger(HostEvent.UpdateTML)
1719
- * ```
1720
- * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
1721
- */
1722
- UpdateTML = "updateTSL",
1723
- /**
1724
- * Triggers the Download PDF action on a Liveboard
1725
- * @example
1726
- * ```js
1727
- * liveboardEmbed.trigger(HostEvent.DownloadAsPDF)
1728
- * ```
1729
- * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
1730
- */
1731
- DownloadAsPdf = "downloadAsPdf",
1732
- /**
1733
- * Triggers the Make a copy action on a Liveboard, search or visualization
1734
- * @example
1735
- * ```js
1736
- * liveboardEmbed.trigger(HostEvent.MakeACopy, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1737
- * vizEmbed.trigger(HostEvent.MakeACopy)
1738
- * searchEmbed.trigger(HostEvent.MakeACopy)
1739
- * ```
1740
- * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
1741
- */
1742
- MakeACopy = "makeACopy",
1743
- /**
1744
- * Triggers the Delete action on a Liveboard
1745
- * @example
1746
- * ```js
1747
- * appEmbed.trigger(HostEvent.Remove)
1748
- * ```
1749
- * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
1750
- */
1751
- Remove = "delete",
1752
- /**
1753
- * Triggers the Explore action on a visualization
1754
- * @param - an object with vizId as a key
1755
- * @example
1756
- * ```js
1757
- * liveboardEmbed.trigger(HostEvent.Explore, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1758
- * ```
1759
- * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
1760
- */
1761
- Explore = "explore",
1762
- /**
1763
- * Triggers the Create alert action on a visualization
1764
- * @param - an object with vizId as a key
1765
- * @example
1766
- * ```js
1767
- * liveboardEmbed.trigger(HostEvent.CreateMonitor {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1768
- * ```
1769
- * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
1770
- */
1771
- CreateMonitor = "createMonitor",
1772
- /**
1773
- * Triggers the Manage alert action on a visualization
1774
- * @param - an object with vizId as a key
1775
- * @example
1776
- * ```js
1777
- * liveboardEmbed.trigger(HostEvent.ManageMonitor, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1778
- * ```
1779
- * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
1780
- */
1781
- ManageMonitor = "manageMonitor",
1782
- /**
1783
- * Triggers the Edit action on a Liveboard or visualization
1784
- * @param - object - to trigger the action for a specfic visualization in Liveboard embed, pass in vizId as a key
1785
- * @example
1786
- * liveboardEmbed.trigger(HostEvent.Edit)
1787
- * liveboardEmbed.trigger(HostEvent.Edit, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1788
- * vizEmbed.trigger((HostEvent.Edit)
1789
- * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
1790
- */
1791
- Edit = "edit",
1792
- /**
1793
- * Triggers the Copy link action on a Liveboard or visualization
1794
- * @param - object - to trigger the action for a specfic visualization in Liveboard embed, pass in vizId as a key
1795
- * @example
1796
- * ```js
1797
- * liveboardEmbed.trigger(HostEvent.CopyLink)
1798
- * liveboardEmbed.trigger(HostEvent.CopyLink, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1799
- * vizEmbed.trigger((HostEvent.CopyLink)
1800
- * ```
1801
- * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
1802
- */
1803
- CopyLink = "embedDocument",
1804
- /**
1805
- * Triggers the Present action on a Liveboard or visualization
1806
- * @param - object - to trigger the action for a specfic visualization in Liveboard embed, pass in vizId as a key
1807
- * @example
1808
- * ```js
1809
- * liveboardEmbed.trigger(HostEvent.Present)
1810
- * liveboardEmbed.trigger(HostEvent.Present, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1811
- * vizEmbed.trigger((HostEvent.Present)
1812
- * ```
1813
- * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
1814
- */
1815
- Present = "present",
1816
- /**
1817
- * Get TML for the current search.
1818
- * @example
1819
- * ```js
1820
- * searchEmbed.trigger(HostEvent.GetTML)
1821
- * ```
1822
- * @version SDK: 1.18.0 | ThoughtSpot: 8.10.0.cl, 9.0.1-sw
1823
- */
1824
- GetTML = "getTML",
1825
- /**
1826
- * Triggers the ShowUnderlyingData action on visualization or search
1827
- * @param - an object with vizId as a key
1828
- * @example
1829
- * liveboardEmbed.trigger(HostEvent.ShowUnderlyingData, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1830
- * vizEmbed.trigger(HostEvent.ShowUnderlyingData)
1831
- * searchEmbed.trigger(HostEvent.ShowUnderlyingData)
1832
- * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
1833
- */
1834
- ShowUnderlyingData = "showUnderlyingData",
1835
- /**
1836
- * Triggers the Delete action on visualization or search
1837
- * @param - incase of Liveboard embed, takes in an object with vizId as a key
1838
- * can be left empty for search and visualization embeds
1839
- * @example
1840
- * liveboardEmbed.trigger(HostEvent.Delete, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1841
- * vizEmbed.trigger(HostEvent.Delete)
1842
- * searchEmbed.trigger(HostEvent.Delete)
1843
- * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
1844
- */
1845
- Delete = "delete",
1846
- /**
1847
- * Triggers the SpotIQAnalyze action on visualization or search
1848
- * @param - incase of Liveboard embed, takes in an object with vizId as a key
1849
- * can be left empty for search and visualization embeds
1850
- * @example
1851
- * liveboardEmbed.trigger(HostEvent.SpotIQAnalyze, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1852
- * vizEmbed.trigger(HostEvent.SpotIQAnalyze)
1853
- * searchEmbed.trigger(HostEvent.SpotIQAnalyze)
1854
- * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
1855
- */
1856
- SpotIQAnalyze = "spotIQAnalyze",
1857
- /**
1858
- * Triggers the Download action on visualization or search when Displaymode is Chart
1859
- * @example
1860
- * liveboardEmbed.trigger(HostEvent.Download, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1861
- * vizEmbed.trigger(HostEvent.Download)
1862
- * searchEmbed.trigger(HostEvent.Download)
1863
- * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
1864
- */
1865
- Download = "download",
1866
- /**
1867
- * Triggers the downloadAsCSV action on visualization or search when Displaymode is Table
1868
- * @example
1869
- * liveboardEmbed.trigger(HostEvent.DownloadAsCsv, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1870
- * vizEmbed.trigger(HostEvent.DownloadAsCsv)
1871
- * searchEmbed.trigger(HostEvent.DownloadAsCsv)
1872
- * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
1873
- */
1874
- DownloadAsCsv = "downloadAsCSV",
1875
- /**
1876
- * Triggers the downloadAsXLSX action on visualization or search when Displaymode is Table
1877
- * @example
1878
- * liveboardEmbed.trigger(HostEvent.DownloadAsXlsx, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1879
- * vizEmbed.trigger(HostEvent.DownloadAsXlsx)
1880
- * searchEmbed.trigger(HostEvent.DownloadAsXlsx)
1881
- * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
1882
- */
1883
- DownloadAsXlsx = "downloadAsXLSX",
1884
- /**
1885
- * Triggers the Share action on a liveboard or answer
1886
- * @example
1887
- * liveboardEmbed.trigger(HostEvent.Share)
1888
- * searchEmbed.trigger(HostEvent.Share)
1889
- * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
1890
- */
1891
- Share = "share",
1892
- /**
1893
- * Trigger the Save action on a liveboard or answer
1894
- * @example
1895
- * liveboardEmbed.trigger(HostEvent.Save)
1896
- * searchEmbed.trigger(HostEvent.Save)
1897
- * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
1898
- */
1899
- Save = "save",
1900
- /**
1901
- * Triggers the SyncToSheets action on visualization
1902
- * @param - an object with vizId as a key
1903
- * @example
1904
- * liveboardEmbed.trigger(HostEvent.SyncToSheets, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1905
- * vizEmbed.trigger(HostEvent.SyncToSheets)
1906
- * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
1907
- */
1908
- SyncToSheets = "sync-to-sheets",
1909
- /**
1910
- * Triggers the SyncToOtherApps action on visualization
1911
- * @param - an object with vizId as a key
1912
- * @example
1913
- * liveboardEmbed.trigger(HostEvent.SyncToOtherApps, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1914
- * vizEmbed.trigger(HostEvent.SyncToOtherApps)
1915
- * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
1916
- */
1917
- SyncToOtherApps = "sync-to-other-apps",
1918
- /**
1919
- * Triggers the ManagePipelines action on visualization
1920
- * @param - an object with vizId as a key
1921
- * @example
1922
- * liveboardEmbed.trigger(HostEvent.ManagePipelines, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1923
- * vizEmbed.trigger(HostEvent.ManagePipelines)
1924
- * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
1925
- */
1926
- ManagePipelines = "manage-pipeline",
1927
- /**
1928
- * Triggers the Reset search in answer
1929
- * @example
1930
- * searchEmbed.trigger(HostEvent.SearchReset
1931
- * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.0.1-sw
1932
- */
1933
- ResetSearch = "resetSearch"
1934
- }
1935
- /**
1936
- * The different visual modes that the data sources panel within
1937
- * search could appear in, i.e., hidden, collapsed, or expanded.
1938
- */
1939
- export enum DataSourceVisualMode {
1940
- /**
1941
- * Data source panel is hidden.
1942
- */
1943
- Hidden = "hide",
1944
- /**
1945
- * Data source panel is collapsed, but the user can manually expand it.
1946
- */
1947
- Collapsed = "collapse",
1948
- /**
1949
- * Data source panel is expanded, but the user can manually collapse it.
1950
- */
1951
- Expanded = "expand"
1952
- }
1953
- /**
1954
- * The query params passed down to the embedded ThoughtSpot app
1955
- * containing configuration and/or visual information.
1956
- */
1957
- export enum Param {
1958
- DataSources = "dataSources",
1959
- DataSourceMode = "dataSourceMode",
1960
- DisableActions = "disableAction",
1961
- DisableActionReason = "disableHint",
1962
- ForceTable = "forceTable",
1963
- preventLiveboardFilterRemoval = "preventPinboardFilterRemoval",
1964
- SearchQuery = "searchQuery",
1965
- HideActions = "hideAction",
1966
- HideObjects = "hideObjects",
1967
- HostAppUrl = "hostAppUrl",
1968
- EnableVizTransformations = "enableVizTransform",
1969
- EnableSearchAssist = "enableSearchAssist",
1970
- HideResult = "hideResult",
1971
- UseLastSelectedDataSource = "useLastSelectedSources",
1972
- Tag = "tag",
1973
- searchTokenString = "searchTokenString",
1974
- executeSearch = "executeSearch",
1975
- fullHeight = "isFullHeightPinboard",
1976
- livedBoardEmbed = "isLiveboardEmbed",
1977
- searchEmbed = "isSearchEmbed",
1978
- vizEmbed = "isVizEmbed",
1979
- Version = "sdkVersion",
1980
- ViewPortHeight = "viewPortHeight",
1981
- ViewPortWidth = "viewPortWidth",
1982
- VisibleActions = "visibleAction",
1983
- CustomCSSUrl = "customCssUrl",
1984
- DisableLoginRedirect = "disableLoginRedirect",
1985
- visibleVizs = "pinboardVisibleVizs",
1986
- LiveboardV2Enabled = "isPinboardV2Enabled",
1987
- ShowAlerts = "showAlerts",
1988
- Locale = "locale",
1989
- CustomStyle = "customStyle",
1990
- ForceSAMLAutoRedirect = "forceSAMLAutoRedirect",
1991
- AuthType = "authType",
1992
- IconSpriteUrl = "iconSprite",
1993
- cookieless = "cookieless",
1994
- ContextMenuTrigger = "isContextMenuEnabledOnLeftClick",
1995
- LinkOverride = "linkOverride",
1996
- ShowInsertToSlide = "insertInToSlide"
1997
- }
1998
- /**
1999
- * The list of actions that can be performed on visual ThoughtSpot
2000
- * entities, such as answers and Liveboards.
2001
- */
2002
- export enum Action {
2003
- Save = "save",
2004
- /**
2005
- * @hidden
2006
- */
2007
- Update = "update",
2008
- /**
2009
- * @hidden
2010
- */
2011
- SaveUntitled = "saveUntitled",
2012
- SaveAsView = "saveAsView",
2013
- MakeACopy = "makeACopy",
2014
- EditACopy = "editACopy",
2015
- CopyLink = "embedDocument",
2016
- /**
2017
- * @hidden
2018
- */
2019
- ResetLayout = "resetLayout",
2020
- Schedule = "subscription",
2021
- SchedulesList = "schedule-list",
2022
- Share = "share",
2023
- AddFilter = "addFilter",
2024
- ConfigureFilter = "configureFilter",
2025
- CollapseDataSources = "collapseDataSources",
2026
- ChooseDataSources = "chooseDataSources",
2027
- AddFormula = "addFormula",
2028
- AddParameter = "addParameter",
2029
- /**
2030
- * @hidden
2031
- */
2032
- SearchOnTop = "searchOnTop",
2033
- SpotIQAnalyze = "spotIQAnalyze",
2034
- /**
2035
- * @hidden
2036
- */
2037
- ExplainInsight = "explainInsight",
2038
- /**
2039
- * @hidden
2040
- */
2041
- SpotIQFollow = "spotIQFollow",
2042
- ShareViz = "shareViz",
2043
- /**
2044
- * @hidden
2045
- */
2046
- ReplaySearch = "replaySearch",
2047
- ShowUnderlyingData = "showUnderlyingData",
2048
- Download = "download",
2049
- DownloadAsPng = "downloadAsPng",
2050
- DownloadAsPdf = "downloadAsPdf",
2051
- DownloadAsCsv = "downloadAsCSV",
2052
- DownloadAsXlsx = "downloadAsXLSX",
2053
- /**
2054
- * @hidden
2055
- */
2056
- DownloadTrace = "downloadTrace",
2057
- ExportTML = "exportTSL",
2058
- ImportTML = "importTSL",
2059
- UpdateTML = "updateTSL",
2060
- EditTML = "editTSL",
2061
- Present = "present",
2062
- ToggleSize = "toggleSize",
2063
- Edit = "edit",
2064
- EditTitle = "editTitle",
2065
- Remove = "delete",
2066
- /**
2067
- * @hidden
2068
- */
2069
- Ungroup = "ungroup",
2070
- /**
2071
- * @hidden
2072
- */
2073
- Describe = "describe",
2074
- /**
2075
- * @hidden
2076
- */
2077
- Relate = "relate",
2078
- /**
2079
- * @hidden
2080
- */
2081
- CustomizeHeadlines = "customizeHeadlines",
2082
- /**
2083
- * @hidden
2084
- */
2085
- PinboardInfo = "pinboardInfo",
2086
- LiveboardInfo = "pinboardInfo",
2087
- /**
2088
- * @hidden
2089
- */
2090
- SendAnswerFeedback = "sendFeedback",
2091
- /**
2092
- * @hidden
2093
- */
2094
- DownloadEmbraceQueries = "downloadEmbraceQueries",
2095
- Pin = "pin",
2096
- /**
2097
- * @hidden
2098
- */
2099
- AnalysisInfo = "analysisInfo",
2100
- Subscription = "subscription",
2101
- Explore = "explore",
2102
- DrillInclude = "context-menu-item-include",
2103
- DrillExclude = "context-menu-item-exclude",
2104
- CopyToClipboard = "context-menu-item-copy-to-clipboard",
2105
- CopyAndEdit = "context-menu-item-copy-and-edit",
2106
- /**
2107
- * @hidden
2108
- */
2109
- DrillEdit = "context-menu-item-edit",
2110
- EditMeasure = "context-menu-item-edit-measure",
2111
- Separator = "context-menu-item-separator",
2112
- /**
2113
- * @hidden
2114
- */
2115
- DrillDown = "DRILL",
2116
- RequestAccess = "requestAccess",
2117
- QueryDetailsButtons = "queryDetailsButtons",
2118
- /**
2119
- * @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw
2120
- */
2121
- AnswerDelete = "onDeleteAnswer",
2122
- /**
2123
- * @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw
2124
- */
2125
- AnswerChartSwitcher = "answerChartSwitcher",
2126
- /**
2127
- * @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw
2128
- */
2129
- AddToFavorites = "addToFavorites",
2130
- /**
2131
- * @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw
2132
- */
2133
- EditDetails = "editDetails",
2134
- /**
2135
- * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
2136
- */
2137
- CreateMonitor = "createMonitor",
2138
- /**
2139
- * @version SDK: 1.11.1 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
2140
- */
2141
- ReportError = "reportError",
2142
- SyncToSheets = "sync-to-sheets",
2143
- SyncToOtherApps = "sync-to-other-apps",
2144
- ManagePipelines = "manage-pipeline",
2145
- /**
2146
- * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
2147
- */
2148
- CrossFilter = "context-menu-item-cross-filter",
2149
- /**
2150
- * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
2151
- */
2152
- RemoveCrossFilter = "context-menu-item-remove-cross-filter",
2153
- /**
2154
- * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
2155
- */
2156
- AxisMenuAggregate = "axisMenuAggregate",
2157
- /**
2158
- * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
2159
- */
2160
- AxisMenuTimeBucket = "axisMenuTimeBucket",
2161
- /**
2162
- * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
2163
- */
2164
- AxisMenuFilter = "axisMenuFilter",
2165
- /**
2166
- * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
2167
- */
2168
- AxisMenuConditionalFormat = "axisMenuConditionalFormat",
2169
- /**
2170
- * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
2171
- */
2172
- AxisMenuSort = "axisMenuSort",
2173
- /**
2174
- * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
2175
- */
2176
- AxisMenuGroup = "axisMenuGroup",
2177
- /**
2178
- * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
2179
- */
2180
- AxisMenuPosition = "axisMenuPosition",
2181
- /**
2182
- * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
2183
- */
2184
- AxisMenuRename = "axisMenuRename",
2185
- /**
2186
- * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
2187
- */
2188
- AxisMenuEdit = "axisMenuEdit",
2189
- /**
2190
- * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
2191
- */
2192
- AxisMenuNumberFormat = "axisMenuNumberFormat",
2193
- /**
2194
- * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
2195
- */
2196
- AxisMenuTextWrapping = "axisMenuTextWrapping",
2197
- /**
2198
- * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
2199
- */
2200
- AxisMenuRemove = "axisMenuRemove",
2201
- /**
2202
- * @hidden
2203
- */
2204
- InsertInToSlide = "insertInToSlide"
2205
- }
2206
- export interface SessionInterface {
2207
- sessionId: string;
2208
- genNo: number;
2209
- acSession: {
2210
- sessionId: string;
2211
- genNo: number;
2212
- };
2213
- }
2214
- export enum OperationType {
2215
- GetChartWithData = "GetChartWithData",
2216
- GetTableWithHeadlineData = "GetTableWithHeadlineData"
2217
- }
2218
- export interface AnswerServiceType {
2219
- getAnswer?: (offset: number, batchSize: number) => any;
2220
- }
2221
- export enum PrefetchFeatures {
2222
- FullApp = "FullApp",
2223
- SearchEmbed = "SearchEmbed",
2224
- LiveboardEmbed = "LiveboardEmbed",
2225
- VizEmbed = "VizEmbed"
2226
- }
2227
- export enum ContextMenuTriggerOptions {
2228
- LEFT_CLICK = "left-click",
2229
- RIGHT_CLICK = "right-click"
2230
- }
2231
- }
2232
-
2233
- declare module '@thoughtspot/visual-embed-sdk/embed/ts-embed' {
2234
- /**
2235
- * Copyright (c) 2022
2236
- *
2237
- * Base classes
2238
- *
2239
- * @summary Base classes
2240
- * @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
2241
- */
2242
- import { DOMSelector, HostEvent, EmbedEvent, MessageCallback, EmbedConfig, MessageOptions, ViewConfig, FrameParams } from '@thoughtspot/visual-embed-sdk/types';
2243
- /**
2244
- * Global prefix for all Thoughtspot postHash Params.
2245
- */
2246
- export const THOUGHTSPOT_PARAM_PREFIX = "ts-";
2247
- /**
2248
- * Base class for embedding v2 experience
2249
- * Note: the v2 version of ThoughtSpot Blink is built on the new stack:
2250
- * React+GraphQL
2251
- */
2252
- export class TsEmbed {
2253
- /**
2254
- * A reference to the iframe within which the ThoughtSpot app
2255
- * will be rendered.
2256
- */
2257
- protected iFrame: HTMLIFrameElement;
2258
- protected viewConfig: ViewConfig;
2259
- protected embedConfig: EmbedConfig;
2260
- /**
2261
- * The ThoughtSpot hostname or IP address
2262
- */
2263
- protected thoughtSpotHost: string;
2264
- protected thoughtSpotV2Base: string;
2265
- constructor(domSelector: DOMSelector, viewConfig?: ViewConfig);
2266
- /**
2267
- * Handles errors within the SDK
2268
- * @param error The error message or object
2269
- */
2270
- protected handleError(error: string | Record<string, unknown>): void;
2271
- /**
2272
- * Constructs the base URL string to load the ThoughtSpot app.
2273
- */
2274
- protected getEmbedBasePath(query: string): string;
2275
- /**
2276
- * Common query params set for all the embed modes.
2277
- * @returns queryParams
2278
- */
2279
- protected getBaseQueryParams(): {};
2280
- /**
2281
- * Constructs the base URL string to load v1 of the ThoughtSpot app.
2282
- * This is used for embedding Liveboards, visualizations, and full application.
2283
- * @param queryString The query string to append to the URL.
2284
- * @param isAppEmbed A Boolean parameter to specify if you are embedding
2285
- * the full application.
2286
- */
2287
- protected getV1EmbedBasePath(queryString: string, showPrimaryNavbar?: boolean, disableProfileAndHelp?: boolean, isAppEmbed?: boolean, enableSearchAssist?: boolean): string;
2288
- /**
2289
- * Renders the embedded ThoughtSpot app in an iframe and sets up
2290
- * event listeners.
2291
- * @param url
2292
- * @param frameOptions
2293
- */
2294
- protected renderIFrame(url: string, frameOptions?: FrameParams): Promise<any>;
2295
- protected insertIntoDOM(child: string | Node): void;
2296
- /**
2297
- * Sets the height of the iframe
2298
- * @param height The height in pixels
2299
- */
2300
- protected setIFrameHeight(height: number): void;
2301
- /**
2302
- * Executes all registered event handlers for a particular event type
2303
- * @param eventType The event type
2304
- * @param data The payload invoked with the event handler
2305
- * @param eventPort The event Port for a specific MessageChannel
2306
- */
2307
- protected executeCallbacks(eventType: EmbedEvent, data: any, eventPort?: MessagePort | void): void;
2308
- /**
2309
- * Returns the ThoughtSpot hostname or IP address.
2310
- */
2311
- protected getThoughtSpotHost(): string;
2312
- /**
2313
- * Gets the v1 event type (if applicable) for the EmbedEvent type
2314
- * @param eventType The v2 event type
2315
- * @returns The corresponding v1 event type if one exists
2316
- * or else the v2 event type itself
2317
- */
2318
- protected getCompatibleEventType(eventType: EmbedEvent): EmbedEvent;
2319
- /**
2320
- * Calculates the iframe center for the current visible viewPort
2321
- * of iframe using Scroll position of Host App, offsetTop for iframe
2322
- * in Host app. ViewPort height of the tab.
2323
- * @returns iframe Center in visible viewport,
2324
- * Iframe height,
2325
- * View port height.
2326
- */
2327
- protected getIframeCenter(): {
2328
- iframeCenter: number;
2329
- iframeScrolled: number;
2330
- iframeHeight: number;
2331
- viewPortHeight: number;
2332
- iframeVisibleViewPort: number;
2333
- };
2334
- /**
2335
- * Registers an event listener to trigger an alert when the ThoughtSpot app
2336
- * sends an event of a particular message type to the host application.
2337
- *
2338
- * @param messageType The message type
2339
- * @param callback A callback as a function
2340
- * @param options The message options
2341
- * @example
2342
- * ```js
2343
- * tsEmbed.on(EmbedEvent.Error, (data) => {
2344
- * console.error(data);
2345
- * });
2346
- * ```
2347
- * @example
2348
- * ```js
2349
- * tsEmbed.on(EmbedEvent.Save, (data) => {
2350
- * console.log("Answer save clicked", data);
2351
- * }, {
2352
- * start: true // This will trigger the callback on start of save
2353
- * });
2354
- * ```
2355
- */
2356
- on(messageType: EmbedEvent, callback: MessageCallback, options?: MessageOptions): typeof TsEmbed.prototype;
2357
- /**
2358
- * Triggers an event to the embedded app
2359
- * @param messageType The event type
2360
- * @param data The payload to send with the message
2361
- */
2362
- trigger(messageType: HostEvent, data?: any): Promise<any>;
2363
- /**
2364
- * Marks the ThoughtSpot object to have been rendered
2365
- * Needs to be overridden by subclasses to do the actual
2366
- * rendering of the iframe.
2367
- * @param args
2368
- */
2369
- render(): TsEmbed;
2370
- /**
2371
- * Get the Post Url Params for THOUGHTSPOT from the current
2372
- * host app URL.
2373
- * THOUGHTSPOT URL params starts with a prefix "ts-"
2374
- * @version SDK: 1.14.0 | ThoughtSpot: 8.4.0.cl, 8.4.1-sw
2375
- */
2376
- getThoughtSpotPostUrlParams(): string;
2377
- /**
2378
- * Destroys the ThoughtSpot embed, and remove any nodes from the DOM.
2379
- * @version SDK: 1.19.1 | ThoughtSpot: *
2380
- */
2381
- destroy(): void;
2382
- }
2383
- /**
2384
- * Base class for embedding v1 experience
2385
- * Note: The v1 version of ThoughtSpot Blink works on the AngularJS stack
2386
- * which is currently under migration to v2
2387
- *
2388
- * @inheritdoc
2389
- */
2390
- export class V1Embed extends TsEmbed {
2391
- protected viewConfig: ViewConfig;
2392
- constructor(domSelector: DOMSelector, viewConfig: ViewConfig);
2393
- /**
2394
- * Render the ap p in an iframe and set up event handlers
2395
- * @param iframeSrc
2396
- */
2397
- protected renderV1Embed(iframeSrc: string): any;
2398
- /**
2399
- * @inheritdoc TsEmbed.on
2400
- *
2401
- * @example
2402
- * ```js
2403
- * tsEmbed.on(EmbedEvent.Error, (data) => {
2404
- * console.error(data);
2405
- * });
2406
- * ```
2407
- * @example
2408
- * ```js
2409
- * tsEmbed.on(EmbedEvent.Save, (data) => {
2410
- * console.log("Answer save clicked", data);
2411
- * }, {
2412
- * start: true // This will trigger the callback on start of save
2413
- * });
2414
- * ```
2415
- */
2416
- on(messageType: EmbedEvent, callback: MessageCallback, options?: MessageOptions): typeof TsEmbed.prototype;
2417
- }
2418
- }
2419
-