@thoughtspot/visual-embed-sdk 1.24.0-sage.3 → 1.24.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (308) hide show
  1. package/README.md +1 -1
  2. package/cjs/package.json +10 -3
  3. package/cjs/src/auth.d.ts.map +1 -1
  4. package/cjs/src/auth.js +3 -0
  5. package/cjs/src/auth.js.map +1 -1
  6. package/cjs/src/css-variables.d.ts +38 -0
  7. package/cjs/src/css-variables.d.ts.map +1 -1
  8. package/cjs/src/embed/app.d.ts +33 -1
  9. package/cjs/src/embed/app.d.ts.map +1 -1
  10. package/cjs/src/embed/app.js +12 -8
  11. package/cjs/src/embed/app.js.map +1 -1
  12. package/cjs/src/embed/app.spec.js +46 -0
  13. package/cjs/src/embed/app.spec.js.map +1 -1
  14. package/cjs/src/embed/base.d.ts +6 -1
  15. package/cjs/src/embed/base.d.ts.map +1 -1
  16. package/cjs/src/embed/base.js +8 -3
  17. package/cjs/src/embed/base.js.map +1 -1
  18. package/cjs/src/embed/liveboard.d.ts +6 -1
  19. package/cjs/src/embed/liveboard.d.ts.map +1 -1
  20. package/cjs/src/embed/liveboard.js +6 -2
  21. package/cjs/src/embed/liveboard.js.map +1 -1
  22. package/cjs/src/embed/liveboard.spec.js +23 -7
  23. package/cjs/src/embed/liveboard.spec.js.map +1 -1
  24. package/cjs/src/embed/sage.d.ts +1 -0
  25. package/cjs/src/embed/sage.d.ts.map +1 -1
  26. package/cjs/src/embed/sage.js +1 -0
  27. package/cjs/src/embed/sage.js.map +1 -1
  28. package/cjs/src/embed/search-bar.d.ts +7 -0
  29. package/cjs/src/embed/search-bar.d.ts.map +1 -1
  30. package/cjs/src/embed/search-bar.js +6 -2
  31. package/cjs/src/embed/search-bar.js.map +1 -1
  32. package/cjs/src/embed/search.d.ts +16 -2
  33. package/cjs/src/embed/search.d.ts.map +1 -1
  34. package/cjs/src/embed/search.js +9 -2
  35. package/cjs/src/embed/search.js.map +1 -1
  36. package/cjs/src/embed/search.spec.js +49 -0
  37. package/cjs/src/embed/search.spec.js.map +1 -1
  38. package/cjs/src/embed/ts-embed.d.ts +4 -1
  39. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  40. package/cjs/src/embed/ts-embed.js +31 -8
  41. package/cjs/src/embed/ts-embed.js.map +1 -1
  42. package/cjs/src/embed/ts-embed.spec.js +186 -3
  43. package/cjs/src/embed/ts-embed.spec.js.map +1 -1
  44. package/cjs/src/index.d.ts +4 -3
  45. package/cjs/src/index.d.ts.map +1 -1
  46. package/cjs/src/index.js +5 -1
  47. package/cjs/src/index.js.map +1 -1
  48. package/cjs/src/mixpanel-service.d.ts +1 -0
  49. package/cjs/src/mixpanel-service.d.ts.map +1 -1
  50. package/cjs/src/mixpanel-service.js +12 -3
  51. package/cjs/src/mixpanel-service.js.map +1 -1
  52. package/cjs/src/mixpanel-service.spec.js +13 -3
  53. package/cjs/src/mixpanel-service.spec.js.map +1 -1
  54. package/cjs/src/react/index.d.ts +15 -15
  55. package/cjs/src/react/index.d.ts.map +1 -1
  56. package/cjs/src/react/index.js +7 -3
  57. package/cjs/src/react/index.js.map +1 -1
  58. package/cjs/src/react/index.spec.js +12 -0
  59. package/cjs/src/react/index.spec.js.map +1 -1
  60. package/cjs/src/types.d.ts +216 -21
  61. package/cjs/src/types.d.ts.map +1 -1
  62. package/cjs/src/types.js +133 -13
  63. package/cjs/src/types.js.map +1 -1
  64. package/cjs/src/utils/answerService/answerService.d.ts +34 -0
  65. package/cjs/src/utils/answerService/answerService.d.ts.map +1 -0
  66. package/cjs/src/utils/answerService/answerService.js +142 -0
  67. package/cjs/src/utils/answerService/answerService.js.map +1 -0
  68. package/cjs/src/utils/answerService/answerService.spec.d.ts +1 -0
  69. package/cjs/src/utils/answerService/answerService.spec.d.ts.map +1 -0
  70. package/cjs/src/utils/answerService/answerService.spec.js +1 -0
  71. package/cjs/src/utils/answerService/answerService.spec.js.map +1 -0
  72. package/cjs/src/utils/answerService/graphql-queries.d.ts +6 -0
  73. package/cjs/src/utils/answerService/graphql-queries.d.ts.map +1 -0
  74. package/cjs/src/utils/answerService/graphql-queries.js +123 -0
  75. package/cjs/src/utils/answerService/graphql-queries.js.map +1 -0
  76. package/cjs/src/utils/graphql/answerService/answer-queries.d.ts +5 -0
  77. package/cjs/src/utils/graphql/answerService/answer-queries.d.ts.map +1 -0
  78. package/cjs/src/utils/graphql/answerService/answer-queries.js +80 -0
  79. package/cjs/src/utils/graphql/answerService/answer-queries.js.map +1 -0
  80. package/cjs/src/utils/graphql/answerService/answerService.d.ts +61 -0
  81. package/cjs/src/utils/graphql/answerService/answerService.d.ts.map +1 -0
  82. package/cjs/src/utils/graphql/answerService/answerService.js +182 -0
  83. package/cjs/src/utils/graphql/answerService/answerService.js.map +1 -0
  84. package/cjs/src/utils/graphql/answerService/answerService.spec.d.ts +2 -0
  85. package/cjs/src/utils/graphql/answerService/answerService.spec.d.ts.map +1 -0
  86. package/cjs/src/utils/graphql/answerService/answerService.spec.js +201 -0
  87. package/cjs/src/utils/graphql/answerService/answerService.spec.js.map +1 -0
  88. package/cjs/src/utils/graphql/answerService/graphql-queries.d.ts +5 -0
  89. package/cjs/src/utils/graphql/answerService/graphql-queries.d.ts.map +1 -0
  90. package/cjs/src/utils/graphql/answerService/graphql-queries.js +80 -0
  91. package/cjs/src/utils/graphql/answerService/graphql-queries.js.map +1 -0
  92. package/cjs/src/utils/graphql/graphql-request.d.ts +15 -0
  93. package/cjs/src/utils/graphql/graphql-request.d.ts.map +1 -0
  94. package/cjs/src/utils/graphql/graphql-request.js +40 -0
  95. package/cjs/src/utils/graphql/graphql-request.js.map +1 -0
  96. package/cjs/src/utils/graphql/sourceService.d.ts +8 -0
  97. package/cjs/src/utils/graphql/sourceService.d.ts.map +1 -0
  98. package/cjs/src/utils/graphql/sourceService.js +69 -0
  99. package/cjs/src/utils/graphql/sourceService.js.map +1 -0
  100. package/cjs/src/utils/graphql/sourceService.spec.d.ts +2 -0
  101. package/cjs/src/utils/graphql/sourceService.spec.d.ts.map +1 -0
  102. package/cjs/src/utils/graphql/sourceService.spec.js +12 -0
  103. package/cjs/src/utils/graphql/sourceService.spec.js.map +1 -0
  104. package/cjs/src/utils/processData.d.ts.map +1 -1
  105. package/cjs/src/utils/processData.js +7 -11
  106. package/cjs/src/utils/processData.js.map +1 -1
  107. package/cjs/src/utils/processData.spec.js +13 -17
  108. package/cjs/src/utils/processData.spec.js.map +1 -1
  109. package/cjs/src/utils.d.ts +13 -1
  110. package/cjs/src/utils.d.ts.map +1 -1
  111. package/cjs/src/utils.js +45 -1
  112. package/cjs/src/utils.js.map +1 -1
  113. package/cjs/src/utils.spec.js +24 -0
  114. package/cjs/src/utils.spec.js.map +1 -1
  115. package/dist/src/auth.d.ts.map +1 -1
  116. package/dist/src/css-variables.d.ts +38 -0
  117. package/dist/src/css-variables.d.ts.map +1 -1
  118. package/dist/src/embed/app.d.ts +33 -1
  119. package/dist/src/embed/app.d.ts.map +1 -1
  120. package/dist/src/embed/base.d.ts +6 -1
  121. package/dist/src/embed/base.d.ts.map +1 -1
  122. package/dist/src/embed/liveboard.d.ts +6 -1
  123. package/dist/src/embed/liveboard.d.ts.map +1 -1
  124. package/dist/src/embed/sage.d.ts +1 -0
  125. package/dist/src/embed/sage.d.ts.map +1 -1
  126. package/dist/src/embed/search-bar.d.ts +7 -0
  127. package/dist/src/embed/search-bar.d.ts.map +1 -1
  128. package/dist/src/embed/search.d.ts +16 -2
  129. package/dist/src/embed/search.d.ts.map +1 -1
  130. package/dist/src/embed/ts-embed.d.ts +4 -1
  131. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  132. package/dist/src/index.d.ts +4 -3
  133. package/dist/src/index.d.ts.map +1 -1
  134. package/dist/src/mixpanel-service.d.ts +1 -0
  135. package/dist/src/mixpanel-service.d.ts.map +1 -1
  136. package/dist/src/react/index.d.ts +15 -15
  137. package/dist/src/react/index.d.ts.map +1 -1
  138. package/dist/src/types.d.ts +216 -21
  139. package/dist/src/types.d.ts.map +1 -1
  140. package/dist/src/utils/graphql/answerService/answer-queries.d.ts +5 -0
  141. package/dist/src/utils/graphql/answerService/answer-queries.d.ts.map +1 -0
  142. package/dist/src/utils/graphql/answerService/answerService.d.ts +61 -0
  143. package/dist/src/utils/graphql/answerService/answerService.d.ts.map +1 -0
  144. package/dist/src/utils/graphql/answerService/answerService.spec.d.ts +2 -0
  145. package/dist/src/utils/graphql/answerService/answerService.spec.d.ts.map +1 -0
  146. package/dist/src/utils/graphql/graphql-request.d.ts +15 -0
  147. package/dist/src/utils/graphql/graphql-request.d.ts.map +1 -0
  148. package/dist/src/utils/graphql/sourceService.d.ts +8 -0
  149. package/dist/src/utils/graphql/sourceService.d.ts.map +1 -0
  150. package/dist/src/utils/graphql/sourceService.spec.d.ts +2 -0
  151. package/dist/src/utils/graphql/sourceService.spec.d.ts.map +1 -0
  152. package/dist/src/utils/processData.d.ts.map +1 -1
  153. package/dist/src/utils.d.ts +13 -1
  154. package/dist/src/utils.d.ts.map +1 -1
  155. package/dist/tsembed-react.es.js +603 -96
  156. package/dist/tsembed-react.js +596 -95
  157. package/dist/tsembed.es.js +655 -100
  158. package/dist/tsembed.js +649 -99
  159. package/dist/visual-embed-sdk-react-full.d.ts +615 -260
  160. package/dist/visual-embed-sdk-react.d.ts +617 -262
  161. package/dist/visual-embed-sdk.d.ts +380 -26
  162. package/lib/package.json +10 -3
  163. package/lib/src/.index.d.ts.swp +0 -0
  164. package/lib/src/auth.d.ts.map +1 -1
  165. package/lib/src/auth.js +3 -0
  166. package/lib/src/auth.js.map +1 -1
  167. package/lib/src/css-variables.d.ts +38 -0
  168. package/lib/src/css-variables.d.ts.map +1 -1
  169. package/lib/src/embed/app.d.ts +33 -1
  170. package/lib/src/embed/app.d.ts.map +1 -1
  171. package/lib/src/embed/app.js +12 -8
  172. package/lib/src/embed/app.js.map +1 -1
  173. package/lib/src/embed/app.spec.js +46 -0
  174. package/lib/src/embed/app.spec.js.map +1 -1
  175. package/lib/src/embed/base.d.ts +6 -1
  176. package/lib/src/embed/base.d.ts.map +1 -1
  177. package/lib/src/embed/base.js +8 -3
  178. package/lib/src/embed/base.js.map +1 -1
  179. package/lib/src/embed/liveboard.d.ts +6 -1
  180. package/lib/src/embed/liveboard.d.ts.map +1 -1
  181. package/lib/src/embed/liveboard.js +7 -3
  182. package/lib/src/embed/liveboard.js.map +1 -1
  183. package/lib/src/embed/liveboard.spec.js +23 -7
  184. package/lib/src/embed/liveboard.spec.js.map +1 -1
  185. package/lib/src/embed/sage.d.ts +1 -0
  186. package/lib/src/embed/sage.d.ts.map +1 -1
  187. package/lib/src/embed/sage.js +1 -0
  188. package/lib/src/embed/sage.js.map +1 -1
  189. package/lib/src/embed/search-bar.d.ts +7 -0
  190. package/lib/src/embed/search-bar.d.ts.map +1 -1
  191. package/lib/src/embed/search-bar.js +7 -3
  192. package/lib/src/embed/search-bar.js.map +1 -1
  193. package/lib/src/embed/search.d.ts +16 -2
  194. package/lib/src/embed/search.d.ts.map +1 -1
  195. package/lib/src/embed/search.js +10 -3
  196. package/lib/src/embed/search.js.map +1 -1
  197. package/lib/src/embed/search.spec.js +49 -0
  198. package/lib/src/embed/search.spec.js.map +1 -1
  199. package/lib/src/embed/ts-embed.d.ts +4 -1
  200. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  201. package/lib/src/embed/ts-embed.js +32 -9
  202. package/lib/src/embed/ts-embed.js.map +1 -1
  203. package/lib/src/embed/ts-embed.spec.js +187 -4
  204. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  205. package/lib/src/index.d.ts +4 -3
  206. package/lib/src/index.d.ts.map +1 -1
  207. package/lib/src/index.js +4 -3
  208. package/lib/src/index.js.map +1 -1
  209. package/lib/src/mixpanel-service.d.ts +1 -0
  210. package/lib/src/mixpanel-service.d.ts.map +1 -1
  211. package/lib/src/mixpanel-service.js +12 -3
  212. package/lib/src/mixpanel-service.js.map +1 -1
  213. package/lib/src/mixpanel-service.spec.js +13 -3
  214. package/lib/src/mixpanel-service.spec.js.map +1 -1
  215. package/lib/src/react/index.d.ts +15 -15
  216. package/lib/src/react/index.d.ts.map +1 -1
  217. package/lib/src/react/index.js +5 -3
  218. package/lib/src/react/index.js.map +1 -1
  219. package/lib/src/react/index.spec.js +13 -1
  220. package/lib/src/react/index.spec.js.map +1 -1
  221. package/lib/src/types.d.ts +216 -21
  222. package/lib/src/types.d.ts.map +1 -1
  223. package/lib/src/types.js +132 -12
  224. package/lib/src/types.js.map +1 -1
  225. package/lib/src/utils/answerService/answerService.d.ts +34 -0
  226. package/lib/src/utils/answerService/answerService.d.ts.map +1 -0
  227. package/lib/src/utils/answerService/answerService.js +137 -0
  228. package/lib/src/utils/answerService/answerService.js.map +1 -0
  229. package/lib/src/utils/answerService/answerService.spec.d.ts +1 -0
  230. package/lib/src/utils/answerService/answerService.spec.d.ts.map +1 -0
  231. package/lib/src/utils/answerService/answerService.spec.js +1 -0
  232. package/lib/src/utils/answerService/answerService.spec.js.map +1 -0
  233. package/lib/src/utils/answerService/graphql-queries.d.ts +6 -0
  234. package/lib/src/utils/answerService/graphql-queries.d.ts.map +1 -0
  235. package/lib/src/utils/answerService/graphql-queries.js +120 -0
  236. package/lib/src/utils/answerService/graphql-queries.js.map +1 -0
  237. package/lib/src/utils/graphql/answerService/answer-queries.d.ts +5 -0
  238. package/lib/src/utils/graphql/answerService/answer-queries.d.ts.map +1 -0
  239. package/lib/src/utils/graphql/answerService/answer-queries.js +77 -0
  240. package/lib/src/utils/graphql/answerService/answer-queries.js.map +1 -0
  241. package/lib/src/utils/graphql/answerService/answerService.d.ts +61 -0
  242. package/lib/src/utils/graphql/answerService/answerService.d.ts.map +1 -0
  243. package/lib/src/utils/graphql/answerService/answerService.js +177 -0
  244. package/lib/src/utils/graphql/answerService/answerService.js.map +1 -0
  245. package/lib/src/utils/graphql/answerService/answerService.spec.d.ts +2 -0
  246. package/lib/src/utils/graphql/answerService/answerService.spec.d.ts.map +1 -0
  247. package/lib/src/utils/graphql/answerService/answerService.spec.js +199 -0
  248. package/lib/src/utils/graphql/answerService/answerService.spec.js.map +1 -0
  249. package/lib/src/utils/graphql/answerService/graphql-queries.d.ts +5 -0
  250. package/lib/src/utils/graphql/answerService/graphql-queries.d.ts.map +1 -0
  251. package/lib/src/utils/graphql/answerService/graphql-queries.js +77 -0
  252. package/lib/src/utils/graphql/answerService/graphql-queries.js.map +1 -0
  253. package/lib/src/utils/graphql/graphql-request.d.ts +15 -0
  254. package/lib/src/utils/graphql/graphql-request.d.ts.map +1 -0
  255. package/lib/src/utils/graphql/graphql-request.js +36 -0
  256. package/lib/src/utils/graphql/graphql-request.js.map +1 -0
  257. package/lib/src/utils/graphql/sourceService.d.ts +8 -0
  258. package/lib/src/utils/graphql/sourceService.d.ts.map +1 -0
  259. package/lib/src/utils/graphql/sourceService.js +65 -0
  260. package/lib/src/utils/graphql/sourceService.js.map +1 -0
  261. package/lib/src/utils/graphql/sourceService.spec.d.ts +2 -0
  262. package/lib/src/utils/graphql/sourceService.spec.d.ts.map +1 -0
  263. package/lib/src/utils/graphql/sourceService.spec.js +10 -0
  264. package/lib/src/utils/graphql/sourceService.spec.js.map +1 -0
  265. package/lib/src/utils/processData.d.ts.map +1 -1
  266. package/lib/src/utils/processData.js +8 -12
  267. package/lib/src/utils/processData.js.map +1 -1
  268. package/lib/src/utils/processData.spec.js +14 -18
  269. package/lib/src/utils/processData.spec.js.map +1 -1
  270. package/lib/src/utils.d.ts +13 -1
  271. package/lib/src/utils.d.ts.map +1 -1
  272. package/lib/src/utils.js +41 -0
  273. package/lib/src/utils.js.map +1 -1
  274. package/lib/src/utils.spec.js +25 -1
  275. package/lib/src/utils.spec.js.map +1 -1
  276. package/lib/src/visual-embed-sdk.d.ts +389 -30
  277. package/package.json +10 -3
  278. package/src/auth.ts +6 -3
  279. package/src/css-variables.ts +47 -0
  280. package/src/embed/app.spec.ts +63 -0
  281. package/src/embed/app.ts +52 -15
  282. package/src/embed/base.ts +11 -6
  283. package/src/embed/liveboard.spec.ts +29 -10
  284. package/src/embed/liveboard.ts +13 -2
  285. package/src/embed/sage.ts +2 -0
  286. package/src/embed/search-bar.tsx +21 -6
  287. package/src/embed/search.spec.ts +61 -0
  288. package/src/embed/search.ts +36 -3
  289. package/src/embed/ts-embed.spec.ts +211 -8
  290. package/src/embed/ts-embed.ts +34 -9
  291. package/src/index.ts +9 -0
  292. package/src/mixpanel-service.spec.ts +13 -3
  293. package/src/mixpanel-service.ts +11 -3
  294. package/src/react/index.spec.tsx +33 -2
  295. package/src/react/index.tsx +37 -26
  296. package/src/types.ts +305 -103
  297. package/src/utils/graphql/answerService/answer-queries.ts +80 -0
  298. package/src/utils/graphql/answerService/answerService.spec.ts +231 -0
  299. package/src/utils/graphql/answerService/answerService.ts +234 -0
  300. package/src/utils/graphql/graphql-request.ts +45 -0
  301. package/src/utils/graphql/sourceService.spec.ts +10 -0
  302. package/src/utils/graphql/sourceService.ts +71 -0
  303. package/src/utils/processData.spec.ts +15 -25
  304. package/src/utils/processData.ts +13 -15
  305. package/src/utils.spec.ts +31 -0
  306. package/src/utils.ts +47 -0
  307. package/src/utils/answerService.spec.ts +0 -41
  308. package/src/utils/answerService.ts +0 -63
@@ -21,7 +21,7 @@ interface SearchProps extends EmbedProps, SearchViewConfig {
21
21
  * }
22
22
  * ```
23
23
  */
24
- export const SearchEmbed: React.ForwardRefExoticComponent<SearchProps & React.RefAttributes<TsEmbed>>;
24
+ export const SearchEmbed: React.ForwardRefExoticComponent<SearchProps & React.RefAttributes<_SearchEmbed>>;
25
25
  interface AppProps extends EmbedProps, AppViewConfig {
26
26
  }
27
27
  /**
@@ -38,7 +38,7 @@ interface AppProps extends EmbedProps, AppViewConfig {
38
38
  * }
39
39
  * ```
40
40
  */
41
- export const AppEmbed: React.ForwardRefExoticComponent<AppProps & React.RefAttributes<TsEmbed>>;
41
+ export const AppEmbed: React.ForwardRefExoticComponent<AppProps & React.RefAttributes<_AppEmbed>>;
42
42
  interface LiveboardProps extends EmbedProps, LiveboardViewConfig {
43
43
  }
44
44
  /**
@@ -56,8 +56,8 @@ interface LiveboardProps extends EmbedProps, LiveboardViewConfig {
56
56
  * }
57
57
  * ```
58
58
  */
59
- export const LiveboardEmbed: React.ForwardRefExoticComponent<LiveboardProps & React.RefAttributes<TsEmbed>>;
60
- export const PinboardEmbed: React.ForwardRefExoticComponent<LiveboardProps & React.RefAttributes<TsEmbed>>;
59
+ export const LiveboardEmbed: React.ForwardRefExoticComponent<LiveboardProps & React.RefAttributes<_LiveboardEmbed>>;
60
+ export const PinboardEmbed: React.ForwardRefExoticComponent<LiveboardProps & React.RefAttributes<_LiveboardEmbed>>;
61
61
  interface SearchBarEmbedProps extends EmbedProps, SearchBarViewConfig {
62
62
  }
63
63
  /**
@@ -73,7 +73,7 @@ interface SearchBarEmbedProps extends EmbedProps, SearchBarViewConfig {
73
73
  * }
74
74
  * ```
75
75
  */
76
- export const SearchBarEmbed: React.ForwardRefExoticComponent<SearchBarEmbedProps & React.RefAttributes<TsEmbed>>;
76
+ export const SearchBarEmbed: React.ForwardRefExoticComponent<SearchBarEmbedProps & React.RefAttributes<_SearchBarEmbed>>;
77
77
  interface SageEmbedProps extends EmbedProps, SageViewConfig {
78
78
  }
79
79
  /**
@@ -89,7 +89,8 @@ interface SageEmbedProps extends EmbedProps, SageViewConfig {
89
89
  * }
90
90
  * ```
91
91
  */
92
- export const SageEmbed: React.ForwardRefExoticComponent<SageEmbedProps & React.RefAttributes<TsEmbed>>;
92
+ export const SageEmbed: React.ForwardRefExoticComponent<SageEmbedProps & React.RefAttributes<_SageEmbed>>;
93
+ type EmbedComponent = typeof SearchEmbed | typeof AppEmbed | typeof LiveboardEmbed | typeof SearchBarEmbed | typeof SageEmbed;
93
94
  /**
94
95
  * Get a reference to the embed component to trigger events on the component.
95
96
  *
@@ -105,9 +106,9 @@ export const SageEmbed: React.ForwardRefExoticComponent<SageEmbedProps & React.R
105
106
  * return <LiveboardEmbed ref={ref} liveboardId={<id>} />
106
107
  * }
107
108
  * ```
108
- * @returns {React.MutableRefObject<TsEmbed>} ref
109
+ * @returns {React.MutableRefObject<T extends TsEmbed>} ref
109
110
  */
110
- export const useEmbedRef: () => React.MutableRefObject<TsEmbed>;
111
+ export function useEmbedRef<T extends EmbedComponent>(): React.MutableRefObject<React.ComponentRef<T>>;
111
112
 
112
113
  /**
113
114
  * @group Embed components
@@ -126,6 +127,12 @@ export interface SearchBarViewConfig extends Omit<ViewConfig, 'runtimeFilters' |
126
127
  * @version: SDK: 1.19.0
127
128
  */
128
129
  dataSource?: string;
130
+ /**
131
+ * Flag to set if last selected dataSource should be used
132
+ *
133
+ * @version: SDK: 1.24.0
134
+ */
135
+ useLastSelectedSources?: boolean;
129
136
  /**
130
137
  * Configuration for search options
131
138
  */
@@ -142,6 +149,7 @@ export declare class SearchBarEmbed extends TsEmbed {
142
149
  * The view configuration for the embedded ThoughtSpot search bar.
143
150
  */
144
151
  protected viewConfig: SearchBarViewConfig;
152
+ protected embedComponentType: string;
145
153
  constructor(domSelector: string, viewConfig: SearchBarViewConfig);
146
154
  /**
147
155
  * Render the embedded ThoughtSpot search
@@ -232,6 +240,7 @@ export declare class SageEmbed extends V1Embed {
232
240
  *
233
241
  */
234
242
  protected viewConfig: SageViewConfig;
243
+ protected embedComponentType: string;
235
244
  constructor(domSelector: DOMSelector, viewConfig: SageViewConfig);
236
245
  /**
237
246
  * Constructs a map of parameters to be passed on to the
@@ -293,6 +302,10 @@ export interface SearchViewConfig extends ViewConfig {
293
302
  * using raw answer data.
294
303
  */
295
304
  hideResults?: boolean;
305
+ /**
306
+ * If set to true, expands all the data sources panel.
307
+ */
308
+ expandAllDataSource?: boolean;
296
309
  /**
297
310
  * If set to true, the Search Assist feature is enabled.
298
311
  *
@@ -343,9 +356,18 @@ export interface SearchViewConfig extends ViewConfig {
343
356
  *
344
357
  * @default false
345
358
  * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
346
- * @hidden
347
359
  */
348
360
  dataPanelV2?: boolean;
361
+ /**
362
+ * Flag to set if last selected dataSource should be used
363
+ *
364
+ * @version: SDK: 1.24.0
365
+ */
366
+ useLastSelectedSources?: boolean;
367
+ /**
368
+ * The list of parameter override to apply to a search answer.
369
+ */
370
+ runtimeParameters?: RuntimeParameter[];
349
371
  }
350
372
  export declare const HiddenActionItemByDefaultForSearchEmbed: Action[];
351
373
  /**
@@ -358,6 +380,7 @@ export declare class SearchEmbed extends TsEmbed {
358
380
  * The view configuration for the embedded ThoughtSpot search.
359
381
  */
360
382
  protected viewConfig: SearchViewConfig;
383
+ protected embedComponentType: string;
361
384
  constructor(domSelector: DOMSelector, viewConfig: SearchViewConfig);
362
385
  protected getEmbedParams(): string;
363
386
  /**
@@ -418,8 +441,19 @@ export interface AppViewConfig extends ViewConfig {
418
441
  /**
419
442
  * If true, the main navigation bar within the ThoughtSpot app
420
443
  * is displayed. By default, the navigation bar is hidden.
444
+ * This flag also control the homepage left nav-bar.
421
445
  */
422
446
  showPrimaryNavbar?: boolean;
447
+ /**
448
+ * Flag to control Homepage Left Nav Bar
449
+ * If showPrimaryNavbar is true, ie navigation bar(Global nav-bar) and Homepage left
450
+ * nav-bar is visible, this flag will only hide the homepage left nav.
451
+ * Precedence of showPrimaryNavbar flag > hideHomepageLeftNav flag.
452
+ *
453
+ * @default false
454
+ * @version SDK: 1.27.0 | Thoughtspot: 9.8.0.cl
455
+ */
456
+ hideHomepageLeftNav?: boolean;
423
457
  /**
424
458
  * If true, help and profile buttons will hide on NavBar. By default,
425
459
  * they are shown.
@@ -438,12 +472,24 @@ export interface AppViewConfig extends ViewConfig {
438
472
  /**
439
473
  * A URL path within the app that is to be embedded.
440
474
  * If both path and pageId attributes are defined, the path definition
441
- * takes precedence.
475
+ * takes precedence. This is the path post the `#/` in the URL of the standalone
476
+ * ThoughtSpot app. Use this to open the embedded view to a specific path.
477
+ *
478
+ * For eg, if you want the component to open to a specific liveboard
479
+ * you could set the path to `pinboard/<liveboardId>/tab/<tabId>`.
480
+ *
481
+ * @example
482
+ * ```
483
+ * <AppEmbed path="pinboard/1234/tab/7464" />
484
+ * ```
442
485
  */
443
486
  path?: string;
444
487
  /**
445
488
  * The application page to set as the start page
446
489
  * in the embedded view.
490
+ *
491
+ * Use this to open to particular page in the app. To open to a specific
492
+ * path within the app, use the `path` attribute which is more flexible.
447
493
  */
448
494
  pageId?: Page;
449
495
  /**
@@ -485,6 +531,13 @@ export interface AppViewConfig extends ViewConfig {
485
531
  * @hidden
486
532
  */
487
533
  dataPanelV2?: boolean;
534
+ /**
535
+ * Flag to control new Modular Home experience
536
+ *
537
+ * @default false
538
+ * @version SDK: 1.27.0 | Thoughtspot: 9.8.0.cl
539
+ */
540
+ modularHomeExperience?: boolean;
488
541
  }
489
542
  /**
490
543
  * Embeds full ThoughtSpot experience in a host application.
@@ -493,6 +546,7 @@ export interface AppViewConfig extends ViewConfig {
493
546
  */
494
547
  export declare class AppEmbed extends V1Embed {
495
548
  protected viewConfig: AppViewConfig;
549
+ protected embedComponentType: string;
496
550
  constructor(domSelector: DOMSelector, viewConfig: AppViewConfig);
497
551
  /**
498
552
  * Constructs a map of parameters to be passed on to the
@@ -620,6 +674,10 @@ export interface LiveboardViewConfig extends ViewConfig {
620
674
  * @version SDK: 1.25.0 | Thoughtspot: 9.6.0.cl
621
675
  */
622
676
  hideTabPanel?: boolean;
677
+ /**
678
+ * The list of parameter override to apply to a Liveboard.
679
+ */
680
+ runtimeParameters?: RuntimeParameter[];
623
681
  }
624
682
  /**
625
683
  * Embed a ThoughtSpot Liveboard or a Thoughtspot visualization. When rendered it already
@@ -638,6 +696,7 @@ export interface LiveboardViewConfig extends ViewConfig {
638
696
  */
639
697
  export declare class LiveboardEmbed extends V1Embed {
640
698
  protected viewConfig: LiveboardViewConfig;
699
+ protected embedComponentType: string;
641
700
  constructor(domSelector: DOMSelector, viewConfig: LiveboardViewConfig);
642
701
  /**
643
702
  * Construct a map of params to be passed on to the
@@ -666,233 +725,6 @@ export declare class LiveboardEmbed extends V1Embed {
666
725
  export declare class PinboardEmbed extends LiveboardEmbed {
667
726
  }
668
727
 
669
- /**
670
- * Copyright (c) 2022
671
- *
672
- * Base classes
673
- *
674
- * @summary Base classes
675
- * @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
676
- */
677
- /**
678
- * Global prefix for all Thoughtspot postHash Params.
679
- */
680
- export declare const THOUGHTSPOT_PARAM_PREFIX = "ts-";
681
- /**
682
- * Base class for embedding v2 experience
683
- * Note: the v2 version of ThoughtSpot Blink is built on the new stack:
684
- * React+GraphQL
685
- */
686
- export declare class TsEmbed {
687
- protected isAppInitialized: boolean;
688
- /**
689
- * A reference to the iframe within which the ThoughtSpot app
690
- * will be rendered.
691
- */
692
- protected iFrame: HTMLIFrameElement;
693
- protected viewConfig: ViewConfig;
694
- protected embedConfig: EmbedConfig;
695
- /**
696
- * The ThoughtSpot hostname or IP address
697
- */
698
- protected thoughtSpotHost: string;
699
- protected thoughtSpotV2Base: string;
700
- constructor(domSelector: DOMSelector, viewConfig?: ViewConfig);
701
- /**
702
- * Handles errors within the SDK
703
- *
704
- * @param error The error message or object
705
- */
706
- protected handleError(error: string | Record<string, unknown>): void;
707
- /**
708
- * Constructs the base URL string to load the ThoughtSpot app.
709
- *
710
- * @param query
711
- */
712
- protected getEmbedBasePath(query: string): string;
713
- /**
714
- * Common query params set for all the embed modes.
715
- *
716
- * @param queryParams
717
- * @returns queryParams
718
- */
719
- protected getBaseQueryParams(queryParams?: {}): {};
720
- /**
721
- * Constructs the base URL string to load v1 of the ThoughtSpot app.
722
- * This is used for embedding Liveboards, visualizations, and full application.
723
- *
724
- * @param queryString The query string to append to the URL.
725
- * @param isAppEmbed A Boolean parameter to specify if you are embedding
726
- * the full application.
727
- */
728
- protected getV1EmbedBasePath(queryString: string): string;
729
- protected getEmbedParams(): string;
730
- protected getRootIframeSrc(): string;
731
- protected createIframeEl(frameSrc: string): HTMLIFrameElement;
732
- /**
733
- * Renders the embedded ThoughtSpot app in an iframe and sets up
734
- * event listeners.
735
- *
736
- * @param url
737
- * @param frameOptions
738
- */
739
- protected renderIFrame(url: string): Promise<any>;
740
- protected insertIntoDOM(child: string | Node): void;
741
- /**
742
- * Sets the height of the iframe
743
- *
744
- * @param height The height in pixels
745
- */
746
- protected setIFrameHeight(height: number | string): void;
747
- /**
748
- * Executes all registered event handlers for a particular event type
749
- *
750
- * @param eventType The event type
751
- * @param data The payload invoked with the event handler
752
- * @param eventPort The event Port for a specific MessageChannel
753
- */
754
- protected executeCallbacks(eventType: EmbedEvent, data: any, eventPort?: MessagePort | void): void;
755
- /**
756
- * Returns the ThoughtSpot hostname or IP address.
757
- */
758
- protected getThoughtSpotHost(): string;
759
- /**
760
- * Gets the v1 event type (if applicable) for the EmbedEvent type
761
- *
762
- * @param eventType The v2 event type
763
- * @returns The corresponding v1 event type if one exists
764
- * or else the v2 event type itself
765
- */
766
- protected getCompatibleEventType(eventType: EmbedEvent): EmbedEvent;
767
- /**
768
- * Calculates the iframe center for the current visible viewPort
769
- * of iframe using Scroll position of Host App, offsetTop for iframe
770
- * in Host app. ViewPort height of the tab.
771
- *
772
- * @returns iframe Center in visible viewport,
773
- * Iframe height,
774
- * View port height.
775
- */
776
- protected getIframeCenter(): {
777
- iframeCenter: number;
778
- iframeScrolled: number;
779
- iframeHeight: number;
780
- viewPortHeight: number;
781
- iframeVisibleViewPort: number;
782
- };
783
- /**
784
- * Registers an event listener to trigger an alert when the ThoughtSpot app
785
- * sends an event of a particular message type to the host application.
786
- *
787
- * @param messageType The message type
788
- * @param callback A callback as a function
789
- * @param options The message options
790
- * @example
791
- * ```js
792
- * tsEmbed.on(EmbedEvent.Error, (data) => {
793
- * console.error(data);
794
- * });
795
- * ```
796
- * @example
797
- * ```js
798
- * tsEmbed.on(EmbedEvent.Save, (data) => {
799
- * console.log("Answer save clicked", data);
800
- * }, {
801
- * start: true // This will trigger the callback on start of save
802
- * });
803
- * ```
804
- */
805
- on(messageType: EmbedEvent, callback: MessageCallback, options?: MessageOptions): typeof TsEmbed.prototype;
806
- /**
807
- * Removes an event listener for a particular event type.
808
- *
809
- * @param messageType The message type
810
- * @param callback The callback to remove
811
- * @example
812
- * ```js
813
- * const errorHandler = (data) => { console.error(data); };
814
- * tsEmbed.on(EmbedEvent.Error, errorHandler);
815
- * tsEmbed.off(EmbedEvent.Error, errorHandler);
816
- * ```
817
- */
818
- off(messageType: EmbedEvent, callback: MessageCallback): typeof TsEmbed.prototype;
819
- /**
820
- * Triggers an event to the embedded app
821
- *
822
- * @param messageType The event type
823
- * @param data The payload to send with the message
824
- */
825
- trigger(messageType: HostEvent, data?: any): Promise<any>;
826
- /**
827
- * Marks the ThoughtSpot object to have been rendered
828
- * Needs to be overridden by subclasses to do the actual
829
- * rendering of the iframe.
830
- *
831
- * @param args
832
- */
833
- render(): TsEmbed;
834
- /**
835
- * Get the Post Url Params for THOUGHTSPOT from the current
836
- * host app URL.
837
- * THOUGHTSPOT URL params starts with a prefix "ts-"
838
- *
839
- * @version SDK: 1.14.0 | ThoughtSpot: 8.4.0.cl, 8.4.1-sw
840
- */
841
- getThoughtSpotPostUrlParams(): string;
842
- /**
843
- * Destroys the ThoughtSpot embed, and remove any nodes from the DOM.
844
- *
845
- * @version SDK: 1.19.1 | ThoughtSpot: *
846
- */
847
- destroy(): void;
848
- getUnderlyingFrameElement(): HTMLIFrameElement;
849
- /**
850
- * Prerenders a generic instance of the TS component.
851
- * This means without the path but with the flags already applied.
852
- * This is useful for prerendering the component in the background.
853
- *
854
- * @version SDK: 1.22.0
855
- * @returns
856
- */
857
- prerenderGeneric(): Promise<any>;
858
- }
859
- /**
860
- * Base class for embedding v1 experience
861
- * Note: The v1 version of ThoughtSpot Blink works on the AngularJS stack
862
- * which is currently under migration to v2
863
- *
864
- * @inheritdoc
865
- */
866
- export declare class V1Embed extends TsEmbed {
867
- protected viewConfig: ViewConfig;
868
- constructor(domSelector: DOMSelector, viewConfig: ViewConfig);
869
- /**
870
- * Render the app in an iframe and set up event handlers
871
- *
872
- * @param iframeSrc
873
- */
874
- protected renderV1Embed(iframeSrc: string): any;
875
- protected getRootIframeSrc(): string;
876
- /**
877
- * @inheritdoc
878
- * @example
879
- * ```js
880
- * tsEmbed.on(EmbedEvent.Error, (data) => {
881
- * console.error(data);
882
- * });
883
- * ```
884
- * @example
885
- * ```js
886
- * tsEmbed.on(EmbedEvent.Save, (data) => {
887
- * console.log("Answer save clicked", data);
888
- * }, {
889
- * start: true // This will trigger the callback on start of save
890
- * });
891
- * ```
892
- */
893
- on(messageType: EmbedEvent, callback: MessageCallback, options?: MessageOptions): typeof TsEmbed.prototype;
894
- }
895
-
896
728
  export type EmbedEventHandlers = {
897
729
  [key in keyof typeof EmbedEvent as `on${Capitalize<key>}`]?: MessageCallback;
898
730
  };
@@ -920,7 +752,7 @@ export function getViewPropsAndListeners<T extends EmbedProps, U extends ViewCon
920
752
  * @summary ThoughtSpot Visual Embed SDK
921
753
  * @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
922
754
  */
923
- export { init, logout, prefetch, executeTML, exportTML, getEmbedConfig as getInitConfig, getSessionInfo, SearchEmbed, SearchBarEmbed, PinboardEmbed, LiveboardEmbed, SageEmbed, AppEmbed, AuthFailureType, AuthStatus, AuthEvent, AuthEventEmitter, Page, AuthType, RuntimeFilter, RuntimeFilterOp, EmbedEvent, HostEvent, DataSourceVisualMode, Action, ContextMenuTriggerOptions, EmbedConfig, SearchViewConfig, SearchBarViewConfig, LiveboardViewConfig, SageViewConfig, AppViewConfig, PrefetchFeatures, FrameParams, DOMSelector, MessageOptions, MessageCallback, MessagePayload, CustomisationsInterface, CustomStyles, customCssInterface, CustomCssVariables, };
755
+ export { init, logout, prefetch, executeTML, exportTML, executeTMLInput, exportTMLInput, getEmbedConfig as getInitConfig, getSessionInfo, SearchEmbed, SearchBarEmbed, PinboardEmbed, LiveboardEmbed, SageEmbed, AppEmbed, AuthFailureType, AuthStatus, AuthEvent, AuthEventEmitter, AnswerService, Page, AuthType, RuntimeFilter, RuntimeFilterOp, EmbedEvent, HostEvent, DataSourceVisualMode, Action, ContextMenuTriggerOptions, EmbedConfig, SearchViewConfig, SearchBarViewConfig, LiveboardViewConfig, SageViewConfig, AppViewConfig, PrefetchFeatures, FrameParams, HomeLeftNavItem, HomepageModule, DOMSelector, MessageOptions, MessageCallback, MessagePayload, CustomisationsInterface, CustomStyles, customCssInterface, CustomCssVariables, };
924
756
 
925
757
  /**
926
758
  * Copyright (c) 2023
@@ -1097,8 +929,19 @@ export declare enum AuthType {
1097
929
  */
1098
930
  Basic = "Basic"
1099
931
  }
1100
- export type DOMSelector = string | HTMLElement;
1101
- /**
932
+ export declare enum HomeLeftNavItem {
933
+ QueryBuilder = "query-builder",
934
+ Home = "insights-home",
935
+ Liveboards = "liveboards",
936
+ Answers = "answers",
937
+ MonitorSubscription = "monitor-alerts",
938
+ SpotIQAnalysis = "spotiq-analysis",
939
+ Tutorials = "tutorials",
940
+ Documentation = "documentation",
941
+ Community = "community"
942
+ }
943
+ export type DOMSelector = string | HTMLElement;
944
+ /**
1102
945
  * inline customCSS within the {@link CustomisationsInterface}.
1103
946
  * Use {@link CustomCssVariables} or css rules.
1104
947
  */
@@ -1402,12 +1245,21 @@ export interface EmbedConfig {
1402
1245
  blockNonEmbedFullAppAccess?: boolean;
1403
1246
  /**
1404
1247
  * Host config incase embedded app is inside TS app itself
1248
+ *
1249
+ * @hidden
1405
1250
  */
1406
1251
  hostConfig?: {
1407
1252
  hostUserGuid: string;
1408
1253
  hostClusterId: string;
1409
1254
  hostClusterName: string;
1410
1255
  };
1256
+ /**
1257
+ * Pendo API key to enable Pendo tracking to your own subscription, the key
1258
+ * is added as an additional key to the embed, as per this [doc](https://support.pendo.io/hc/en-us/articles/360032201951-Send-data-to-multiple-subscriptions).
1259
+ *
1260
+ * @version SDK: 1.27.0 | ThoughtSpot: 9.8.0.cl
1261
+ */
1262
+ pendoTrackingKey?: string;
1411
1263
  }
1412
1264
  export interface LayoutConfig {
1413
1265
  }
@@ -1515,6 +1367,11 @@ export interface ViewConfig {
1515
1367
  * visualization, or Liveboard.
1516
1368
  */
1517
1369
  runtimeFilters?: RuntimeFilter[];
1370
+ /**
1371
+ * The list of parameter override to apply to a search answer,
1372
+ * visualization, or Liveboard.
1373
+ */
1374
+ runtimeParameters?: RuntimeParameter[];
1518
1375
  /**
1519
1376
  * The locale/language to use for the embedded view.
1520
1377
  *
@@ -1621,6 +1478,19 @@ export interface ViewConfig {
1621
1478
  * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
1622
1479
  */
1623
1480
  hiddenTabs?: string[];
1481
+ /**
1482
+ * Hide the home page modules
1483
+ * eg: hiddenHomepageModules = [HomepageModule.MyLibrary]
1484
+ *
1485
+ * @version SDK: 1.27.0 | Thoughtspot: 9.8.0.cl
1486
+ */
1487
+ hiddenHomepageModules?: HomepageModule[];
1488
+ /**
1489
+ * reordering the home page modules
1490
+ * eg: reorderedHomepageModules = [HomepageModule.MyLibrary, HomepageModule.Watchlist]
1491
+ * @version SDK: 1.28.0 | Thoughtspot: 9.9.0.cl
1492
+ */
1493
+ reorderedHomepageModules?: HomepageModule[];
1624
1494
  /**
1625
1495
  * The list of tab IDs to show in the embedded.
1626
1496
  * Only this Tabs will be shown in their respective LBs.
@@ -1640,6 +1510,15 @@ export interface ViewConfig {
1640
1510
  * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
1641
1511
  */
1642
1512
  visibleTabs?: string[];
1513
+ /**
1514
+ * homepageLeftNavItems : show/hide Homeapage Left Nav Bar Items
1515
+ * There are 8 home nav list items, we will send those item as list
1516
+ * which we want to hide for TSE.
1517
+ * eg: hiddenHomeLeftNavItems = [HomeLeftNavItem.Home] to hide home.
1518
+ *
1519
+ * @version SDK: 1.27.0 | Thoughtspot: 9.8.0.cl
1520
+ */
1521
+ hiddenHomeLeftNavItems?: HomeLeftNavItem[];
1643
1522
  }
1644
1523
  /**
1645
1524
  * MessagePayload: Embed event payload: message type, data and status (start/end)
@@ -1751,6 +1630,35 @@ export declare enum RuntimeFilterOp {
1751
1630
  */
1752
1631
  IN = "IN"
1753
1632
  }
1633
+ /**
1634
+ * Home page module that can be hide
1635
+ */
1636
+ export declare enum HomepageModule {
1637
+ /**
1638
+ * Search bar
1639
+ */
1640
+ Search = "SEARCH",
1641
+ /**
1642
+ * kPI watchlist module
1643
+ */
1644
+ Watchlist = "WATCHLIST",
1645
+ /**
1646
+ * favorite objects
1647
+ */
1648
+ Favorite = "FAVORITE",
1649
+ /**
1650
+ * List of answers and liveboards
1651
+ */
1652
+ MyLibrary = "MY_LIBRARY",
1653
+ /**
1654
+ * Trending list
1655
+ */
1656
+ Trending = "TRENDING",
1657
+ /**
1658
+ * Learning videos
1659
+ */
1660
+ Learning = "LEARNING"
1661
+ }
1754
1662
  /**
1755
1663
  * A filter that can be applied to ThoughtSpot answers, Liveboards, or
1756
1664
  * visualizations at runtime.
@@ -1771,6 +1679,20 @@ export interface RuntimeFilter {
1771
1679
  */
1772
1680
  values: (number | boolean | string)[];
1773
1681
  }
1682
+ /**
1683
+ * A filter that can be applied to ThoughtSpot answers, Liveboards, or
1684
+ * visualizations at runtime.
1685
+ */
1686
+ export interface RuntimeParameter {
1687
+ /**
1688
+ * The name of the runtime parameter to filter on (case-sensitive)
1689
+ */
1690
+ name: string;
1691
+ /**
1692
+ * Values
1693
+ */
1694
+ value: number | boolean | string;
1695
+ }
1774
1696
  /**
1775
1697
  * Event types emitted by the embedded ThoughtSpot application.
1776
1698
  *
@@ -2195,23 +2117,74 @@ export declare enum EmbedEvent {
2195
2117
  */
2196
2118
  InsertIntoSlide = "insertInToSlide",
2197
2119
  /**
2120
+ * @hidden
2198
2121
  * Emitted when a user changes any filter on a Liveboard.
2199
- *
2200
2122
  * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
2201
2123
  */
2202
2124
  FilterChanged = "filterChanged",
2203
2125
  /**
2204
2126
  * Emitted when a user click on Go button in Sage Embed
2205
2127
  *
2206
- * @version SDK : 1.27.0 | Thoughtspot: 9.7.0.cl
2128
+ * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
2207
2129
  */
2208
2130
  SageEmbedQuery = "sageEmbedQuery",
2209
2131
  /**
2210
2132
  * Emitten when a user select data source in Sage Embed
2211
2133
  *
2212
- * @version SDK : 1.27.0 | Thoughtspot: 9.7.0.cl
2134
+ * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
2213
2135
  */
2214
- SageWorksheetUpdated = "sageWorksheetUpdated"
2136
+ SageWorksheetUpdated = "sageWorksheetUpdated",
2137
+ /**
2138
+ * Emitten when a user updates a connection in Data tab
2139
+ *
2140
+ * @version SDK : 1.27.0 | Thoughtspot: 9.8.0.cl
2141
+ */
2142
+ UpdateConnection = "updateConnection",
2143
+ /**
2144
+ * Emitted when name, status (private or public) or filter values of a
2145
+ * PersonalisedView is updated.
2146
+ *
2147
+ * @returns viewName: string
2148
+ * @returns viewId: string
2149
+ * @returns liveboardId: string
2150
+ * @returns isPublic: boolean
2151
+ * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
2152
+ */
2153
+ UpdatePersonalisedView = "updatePersonalisedView",
2154
+ /**
2155
+ * Emitted when a PersonalisedView is saved.
2156
+ *
2157
+ * @returns viewName: string
2158
+ * @returns viewId: string
2159
+ * @returns liveboardId: string
2160
+ * @returns isPublic: boolean
2161
+ * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
2162
+ */
2163
+ SavePersonalisedView = "savePersonalisedView",
2164
+ /**
2165
+ * Emitted when a Liveboard is reset.
2166
+ *
2167
+ * @returns viewName: string
2168
+ * @returns viewId: string
2169
+ * @returns liveboardId: string
2170
+ * @returns isPublic: boolean
2171
+ * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
2172
+ */
2173
+ ResetLiveboard = "resetLiveboard",
2174
+ /**
2175
+ * Emitted when a PersonalisedView is deleted.
2176
+ *
2177
+ * @returns views: string[]
2178
+ * @returns liveboardId: string
2179
+ * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
2180
+ */
2181
+ DeletePersonalisedView = "deletePersonalisedView",
2182
+ /**
2183
+ * Emitten when a user creates a new worksheet
2184
+ *
2185
+ * @version SDK : 1.27.0 | Thoughtspot: 9.8.0.cl
2186
+ */
2187
+ CreateWorksheet = "createWorksheet"
2215
2188
  }
2216
2189
  /**
2217
2190
  * Event types that can be triggered by the host application
@@ -2854,16 +2827,16 @@ export declare enum HostEvent {
2854
2827
  */
2855
2828
  ResetSearch = "resetSearch",
2856
2829
  /**
2830
+ * @hidden
2857
2831
  * Gets the currents visible and runtime filters applied on a Liveboard
2858
- *
2859
2832
  * @example
2860
2833
  * liveboardEmbed.trigger(HostEvent.GetFilters)
2861
2834
  * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
2862
2835
  */
2863
2836
  GetFilters = "getFilters",
2864
2837
  /**
2838
+ * @hidden
2865
2839
  * Updates the visible filters on the Liveboard.
2866
- *
2867
2840
  * @param - filter: filter object containing column name and filter operation and values
2868
2841
  * @example
2869
2842
  *
@@ -3014,7 +2987,10 @@ export declare enum Param {
3014
2987
  HideTabPanel = "hideTabPanel",
3015
2988
  HideSampleQuestions = "hideSampleQuestions",
3016
2989
  WorksheetId = "worksheet",
3017
- Query = "query"
2990
+ Query = "query",
2991
+ HideHomepageLeftNav = "hideHomepageLeftNav",
2992
+ ModularHomeExperienceEnabled = "modularHomeExperience",
2993
+ PendoTrackingKey = "additionalPendoKey"
3018
2994
  }
3019
2995
  /**
3020
2996
  * ThoughtSpot application pages include actions and menu commands
@@ -3517,7 +3493,7 @@ export declare enum Action {
3517
3493
  * disabledActions: [Action.QueryDetailsButtons]
3518
3494
  * ```
3519
3495
  */
3520
- QueryDetailsButtons = "QueryDetailsButtons",
3496
+ QueryDetailsButtons = "queryDetailsButtons",
3521
3497
  /**
3522
3498
  * The **Delete** action for Answers.
3523
3499
  *
@@ -3821,19 +3797,36 @@ export declare enum Action {
3821
3797
  /**
3822
3798
  * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
3823
3799
  */
3824
- ModifySageAnswer = "modifySageAnswer"
3825
- }
3826
- export interface SessionInterface {
3827
- sessionId: string;
3828
- genNo: number;
3829
- acSession: {
3830
- sessionId: string;
3831
- genNo: number;
3832
- };
3833
- }
3834
- export declare enum OperationType {
3835
- GetChartWithData = "GetChartWithData",
3836
- GetTableWithHeadlineData = "GetTableWithHeadlineData"
3800
+ ModifySageAnswer = "modifySageAnswer",
3801
+ /**
3802
+ * The **Move to Tab** menu action on visualizations in liveboard edit mode.
3803
+ * Allows moving a visualization to a different tab.
3804
+ *
3805
+ * @example
3806
+ * ```js
3807
+ * disabledActions: [Action.MoveToTab]
3808
+ * ```
3809
+ */
3810
+ MoveToTab = "onContainerMove",
3811
+ /**
3812
+ * The **Manage Alertsb** menu action on KPI visualizations.
3813
+ *
3814
+ * @example
3815
+ * ```js
3816
+ * disabledActions: [Action.ManageMonitor]
3817
+ * ```
3818
+ */
3819
+ ManageMonitor = "ManageMonitor",
3820
+ /**
3821
+ * Action ID for Liveboard Personalised Views dropdown
3822
+ *
3823
+ * @example
3824
+ * ```js
3825
+ * disabledActions: [Action.PersonalisedViewsDropdown]
3826
+ * ```
3827
+ * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
3828
+ */
3829
+ PersonalisedViewsDropdown = "personalisedViewsDropdown"
3837
3830
  }
3838
3831
  export interface AnswerServiceType {
3839
3832
  getAnswer?: (offset: number, batchSize: number) => any;
@@ -3851,6 +3844,269 @@ export declare enum ContextMenuTriggerOptions {
3851
3844
  LEFT_CLICK = "left-click",
3852
3845
  RIGHT_CLICK = "right-click"
3853
3846
  }
3847
+ export interface ColumnValue {
3848
+ column: {
3849
+ id: string;
3850
+ name: string;
3851
+ dataType: string;
3852
+ [key: string]: any;
3853
+ };
3854
+ value: string | number | boolean;
3855
+ }
3856
+ export interface VizPoint {
3857
+ selectedAttributes: ColumnValue[];
3858
+ selectedMeasures: ColumnValue[];
3859
+ }
3860
+ export interface CustomActionPayload {
3861
+ contextMenuPoints?: {
3862
+ clickedPoint: VizPoint;
3863
+ selectedPoints: VizPoint[];
3864
+ };
3865
+ embedAnswerData: {
3866
+ name: string;
3867
+ id: string;
3868
+ sources: {
3869
+ header: {
3870
+ guid: string;
3871
+ };
3872
+ };
3873
+ columns: any[];
3874
+ data: any[];
3875
+ [key: string]: any;
3876
+ };
3877
+ session: SessionInterface;
3878
+ vizId?: string;
3879
+ }
3880
+
3881
+ /**
3882
+ * Copyright (c) 2022
3883
+ *
3884
+ * Base classes
3885
+ *
3886
+ * @summary Base classes
3887
+ * @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
3888
+ */
3889
+ /**
3890
+ * Global prefix for all Thoughtspot postHash Params.
3891
+ */
3892
+ export declare const THOUGHTSPOT_PARAM_PREFIX = "ts-";
3893
+ /**
3894
+ * Base class for embedding v2 experience
3895
+ * Note: the v2 version of ThoughtSpot Blink is built on the new stack:
3896
+ * React+GraphQL
3897
+ */
3898
+ export declare class TsEmbed {
3899
+ protected isAppInitialized: boolean;
3900
+ /**
3901
+ * A reference to the iframe within which the ThoughtSpot app
3902
+ * will be rendered.
3903
+ */
3904
+ protected iFrame: HTMLIFrameElement;
3905
+ protected viewConfig: ViewConfig;
3906
+ protected embedConfig: EmbedConfig;
3907
+ /**
3908
+ * The ThoughtSpot hostname or IP address
3909
+ */
3910
+ protected thoughtSpotHost: string;
3911
+ protected thoughtSpotV2Base: string;
3912
+ protected embedComponentType: string;
3913
+ constructor(domSelector: DOMSelector, viewConfig?: ViewConfig);
3914
+ /**
3915
+ * Handles errors within the SDK
3916
+ *
3917
+ * @param error The error message or object
3918
+ */
3919
+ protected handleError(error: string | Record<string, unknown>): void;
3920
+ /**
3921
+ * Constructs the base URL string to load the ThoughtSpot app.
3922
+ *
3923
+ * @param query
3924
+ */
3925
+ protected getEmbedBasePath(query: string): string;
3926
+ /**
3927
+ * Common query params set for all the embed modes.
3928
+ *
3929
+ * @param queryParams
3930
+ * @returns queryParams
3931
+ */
3932
+ protected getBaseQueryParams(queryParams?: {}): {};
3933
+ /**
3934
+ * Constructs the base URL string to load v1 of the ThoughtSpot app.
3935
+ * This is used for embedding Liveboards, visualizations, and full application.
3936
+ *
3937
+ * @param queryString The query string to append to the URL.
3938
+ * @param isAppEmbed A Boolean parameter to specify if you are embedding
3939
+ * the full application.
3940
+ */
3941
+ protected getV1EmbedBasePath(queryString: string): string;
3942
+ protected getEmbedParams(): string;
3943
+ protected getRootIframeSrc(): string;
3944
+ protected createIframeEl(frameSrc: string): HTMLIFrameElement;
3945
+ /**
3946
+ * Renders the embedded ThoughtSpot app in an iframe and sets up
3947
+ * event listeners.
3948
+ *
3949
+ * @param url
3950
+ * @param frameOptions
3951
+ */
3952
+ protected renderIFrame(url: string): Promise<any>;
3953
+ protected insertIntoDOM(child: string | Node): void;
3954
+ /**
3955
+ * Sets the height of the iframe
3956
+ *
3957
+ * @param height The height in pixels
3958
+ */
3959
+ protected setIFrameHeight(height: number | string): void;
3960
+ /**
3961
+ * Executes all registered event handlers for a particular event type
3962
+ *
3963
+ * @param eventType The event type
3964
+ * @param data The payload invoked with the event handler
3965
+ * @param eventPort The event Port for a specific MessageChannel
3966
+ */
3967
+ protected executeCallbacks(eventType: EmbedEvent, data: any, eventPort?: MessagePort | void): void;
3968
+ /**
3969
+ * Returns the ThoughtSpot hostname or IP address.
3970
+ */
3971
+ protected getThoughtSpotHost(): string;
3972
+ /**
3973
+ * Gets the v1 event type (if applicable) for the EmbedEvent type
3974
+ *
3975
+ * @param eventType The v2 event type
3976
+ * @returns The corresponding v1 event type if one exists
3977
+ * or else the v2 event type itself
3978
+ */
3979
+ protected getCompatibleEventType(eventType: EmbedEvent): EmbedEvent;
3980
+ /**
3981
+ * Calculates the iframe center for the current visible viewPort
3982
+ * of iframe using Scroll position of Host App, offsetTop for iframe
3983
+ * in Host app. ViewPort height of the tab.
3984
+ *
3985
+ * @returns iframe Center in visible viewport,
3986
+ * Iframe height,
3987
+ * View port height.
3988
+ */
3989
+ protected getIframeCenter(): {
3990
+ iframeCenter: number;
3991
+ iframeScrolled: number;
3992
+ iframeHeight: number;
3993
+ viewPortHeight: number;
3994
+ iframeVisibleViewPort: number;
3995
+ };
3996
+ /**
3997
+ * Registers an event listener to trigger an alert when the ThoughtSpot app
3998
+ * sends an event of a particular message type to the host application.
3999
+ *
4000
+ * @param messageType The message type
4001
+ * @param callback A callback as a function
4002
+ * @param options The message options
4003
+ * @param isSelf
4004
+ * @param isRegisteredBySDK
4005
+ * @example
4006
+ * ```js
4007
+ * tsEmbed.on(EmbedEvent.Error, (data) => {
4008
+ * console.error(data);
4009
+ * });
4010
+ * ```
4011
+ * @example
4012
+ * ```js
4013
+ * tsEmbed.on(EmbedEvent.Save, (data) => {
4014
+ * console.log("Answer save clicked", data);
4015
+ * }, {
4016
+ * start: true // This will trigger the callback on start of save
4017
+ * });
4018
+ * ```
4019
+ */
4020
+ on(messageType: EmbedEvent, callback: MessageCallback, options?: MessageOptions, isRegisteredBySDK?: boolean): typeof TsEmbed.prototype;
4021
+ /**
4022
+ * Removes an event listener for a particular event type.
4023
+ *
4024
+ * @param messageType The message type
4025
+ * @param callback The callback to remove
4026
+ * @example
4027
+ * ```js
4028
+ * const errorHandler = (data) => { console.error(data); };
4029
+ * tsEmbed.on(EmbedEvent.Error, errorHandler);
4030
+ * tsEmbed.off(EmbedEvent.Error, errorHandler);
4031
+ * ```
4032
+ */
4033
+ off(messageType: EmbedEvent, callback: MessageCallback): typeof TsEmbed.prototype;
4034
+ /**
4035
+ * Triggers an event to the embedded app
4036
+ *
4037
+ * @param messageType The event type
4038
+ * @param data The payload to send with the message
4039
+ */
4040
+ trigger(messageType: HostEvent, data?: any): Promise<any>;
4041
+ /**
4042
+ * Marks the ThoughtSpot object to have been rendered
4043
+ * Needs to be overridden by subclasses to do the actual
4044
+ * rendering of the iframe.
4045
+ *
4046
+ * @param args
4047
+ */
4048
+ render(): TsEmbed;
4049
+ /**
4050
+ * Get the Post Url Params for THOUGHTSPOT from the current
4051
+ * host app URL.
4052
+ * THOUGHTSPOT URL params starts with a prefix "ts-"
4053
+ *
4054
+ * @version SDK: 1.14.0 | ThoughtSpot: 8.4.0.cl, 8.4.1-sw
4055
+ */
4056
+ getThoughtSpotPostUrlParams(): string;
4057
+ /**
4058
+ * Destroys the ThoughtSpot embed, and remove any nodes from the DOM.
4059
+ *
4060
+ * @version SDK: 1.19.1 | ThoughtSpot: *
4061
+ */
4062
+ destroy(): void;
4063
+ getUnderlyingFrameElement(): HTMLIFrameElement;
4064
+ /**
4065
+ * Prerenders a generic instance of the TS component.
4066
+ * This means without the path but with the flags already applied.
4067
+ * This is useful for prerendering the component in the background.
4068
+ *
4069
+ * @version SDK: 1.22.0
4070
+ * @returns
4071
+ */
4072
+ prerenderGeneric(): Promise<any>;
4073
+ }
4074
+ /**
4075
+ * Base class for embedding v1 experience
4076
+ * Note: The v1 version of ThoughtSpot Blink works on the AngularJS stack
4077
+ * which is currently under migration to v2
4078
+ *
4079
+ * @inheritdoc
4080
+ */
4081
+ export declare class V1Embed extends TsEmbed {
4082
+ protected viewConfig: ViewConfig;
4083
+ constructor(domSelector: DOMSelector, viewConfig: ViewConfig);
4084
+ /**
4085
+ * Render the app in an iframe and set up event handlers
4086
+ *
4087
+ * @param iframeSrc
4088
+ */
4089
+ protected renderV1Embed(iframeSrc: string): any;
4090
+ protected getRootIframeSrc(): string;
4091
+ /**
4092
+ * @inheritdoc
4093
+ * @example
4094
+ * ```js
4095
+ * tsEmbed.on(EmbedEvent.Error, (data) => {
4096
+ * console.error(data);
4097
+ * });
4098
+ * ```
4099
+ * @example
4100
+ * ```js
4101
+ * tsEmbed.on(EmbedEvent.Save, (data) => {
4102
+ * console.log("Answer save clicked", data);
4103
+ * }, {
4104
+ * start: true // This will trigger the callback on start of save
4105
+ * });
4106
+ * ```
4107
+ */
4108
+ on(messageType: EmbedEvent, callback: MessageCallback, options?: MessageOptions): typeof TsEmbed.prototype;
4109
+ }
3854
4110
 
3855
4111
  export interface executeTMLInput {
3856
4112
  metadata_tmls: string[];
@@ -3940,14 +4196,19 @@ export declare const logout: (doNotDisableAutoLogin?: boolean) => Promise<boolea
3940
4196
  export declare const renderInQueue: (fn: (next?: (val?: any) => void) => Promise<any>) => Promise<any>;
3941
4197
  /**
3942
4198
  * Imports TML representation of the metadata objects into ThoughtSpot.
4199
+ *
3943
4200
  * @param data
3944
4201
  * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
4202
+ * @group Global methods
3945
4203
  */
3946
4204
  export declare const executeTML: (data: executeTMLInput) => Promise<any>;
3947
4205
  /**
3948
- * Exports TML representation of the metadata objects from ThoughtSpot in JSON or YAML format.
4206
+ * Exports TML representation of the metadata objects from ThoughtSpot in JSON or YAML
4207
+ * format.
4208
+ *
3949
4209
  * @param data
3950
4210
  * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
4211
+ * @group Global methods
3951
4212
  */
3952
4213
  export declare const exportTML: (data: exportTMLInput) => Promise<any>;
3953
4214
  /**
@@ -4159,6 +4420,12 @@ export interface CustomCssVariables {
4159
4420
  * Text transformation specification for UI elements in the app.
4160
4421
  */
4161
4422
  '--ts-var-root-text-transform'?: string;
4423
+ /**
4424
+ * application color, it replaces #2770EF which is rd-color(blue,base) and
4425
+ * its similar colors like rd-color(blue,60), rd-color(accent, base) and
4426
+ * rd-color(text, accent) in the app.
4427
+ */
4428
+ '--ts-var-application-color'?: string;
4162
4429
  /**
4163
4430
  * Background color of the top navigation panel.
4164
4431
  */
@@ -4419,6 +4686,10 @@ export interface CustomCssVariables {
4419
4686
  * Background color for menu items on hover.
4420
4687
  */
4421
4688
  '--ts-var-menu--hover-background'?: string;
4689
+ /**
4690
+ * Text color for selected menu items.
4691
+ */
4692
+ '--ts-var-menu-selected-text-color'?: string;
4422
4693
  /**
4423
4694
  * Background color of the dialogs.
4424
4695
  */
@@ -4439,5 +4710,89 @@ export interface CustomCssVariables {
4439
4710
  * Background color of the footer area on dialogs.
4440
4711
  */
4441
4712
  '--ts-var-dialog-footer-background'?: string;
4713
+ /**
4714
+ * Background for selected state in list
4715
+ */
4716
+ '--ts-var-list-selected-background'?: string;
4717
+ /**
4718
+ * Background for hover state in list
4719
+ */
4720
+ '--ts-var-list-hover-background'?: string;
4721
+ /**
4722
+ * Background for hover state in segment control.
4723
+ */
4724
+ '--ts-var-segment-control-hover-background'?: string;
4725
+ /**
4726
+ * Text color for slected item in modular home's watchlist.
4727
+ */
4728
+ '--ts-var-home-watchlist-selected-text-color'?: string;
4729
+ /**
4730
+ * Text color for favorite carousel find your favorites card in modular home.
4731
+ */
4732
+ '--ts-var-home-favorite-suggestion-card-text-color'?: string;
4733
+ /**
4734
+ * Icon color for favorite carousel find your favorites card in modular home.
4735
+ */
4736
+ '--ts-var-home-favorite-suggestion-card-icon-color'?: string;
4737
+ /**
4738
+ * Background for favorite carousel find your favorites card in modular home.
4739
+ */
4740
+ '--ts-var-home-favorite-suggestion-card-background'?: string;
4442
4741
  }
4443
4742
 
4743
+ export interface SessionInterface {
4744
+ sessionId: string;
4745
+ genNo: number;
4746
+ acSession: {
4747
+ sessionId: string;
4748
+ genNo: number;
4749
+ };
4750
+ }
4751
+ export declare enum OperationType {
4752
+ GetChartWithData = "GetChartWithData",
4753
+ GetTableWithHeadlineData = "GetTableWithHeadlineData"
4754
+ }
4755
+ interface UnderlyingDataPoint {
4756
+ columnId: string;
4757
+ dataValue: any;
4758
+ }
4759
+ /**
4760
+ * Class representing the answer service provided with the
4761
+ * custom action payload. This service could be used to run
4762
+ * graphql queries in the context of the answer on which the
4763
+ * custom action was triggered.
4764
+ *
4765
+ * @example
4766
+ * ```js
4767
+ * embed.on(EmbedEvent.CustomAction, e => {
4768
+ * const underlying = await e.answerService.getUnderlyingDataForPoint([
4769
+ * 'col name 1'
4770
+ * ]);
4771
+ * const data = await underlying.fetchData(0, 100);
4772
+ * })
4773
+ * ```
4774
+ * @version
4775
+ * ThoughtSpot: 9.9.0.cl / SDK: 1.25.0
4776
+ */
4777
+ export declare class AnswerService {
4778
+ constructor(session: SessionInterface, answer: any, thoughtSpotHost: string, selectedPoints?: VizPoint[]);
4779
+ getSourceDetail(): Promise<any>;
4780
+ removeColumns(columnIds: string[]): Promise<any>;
4781
+ addColumns(columnIds: string[]): Promise<any>;
4782
+ fetchData(offset?: number, size?: number): Promise<{
4783
+ columns: any;
4784
+ data: any;
4785
+ }>;
4786
+ /**
4787
+ *
4788
+ * @param userLocale
4789
+ * @param omitInfo Omit the download Info on top of the CSV
4790
+ * @returns Response
4791
+ */
4792
+ fetchCSVBlob(userLocale?: string, omitInfo?: boolean): Promise<Response>;
4793
+ getUnderlyingDataForPoint(outputColumnNames: string[], selectedPoints?: UnderlyingDataPoint[]): Promise<AnswerService>;
4794
+ executeQuery(query: string, variables: any): Promise<any>;
4795
+ getSession(): SessionInterface;
4796
+ }
4797
+ export {};
4798
+