@thoughtspot/visual-embed-sdk 1.33.0-alpha.2 → 1.33.0-dc.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 (516) hide show
  1. package/cjs/package.json +12 -28
  2. package/cjs/src/auth.d.ts +0 -1
  3. package/cjs/src/auth.d.ts.map +1 -1
  4. package/cjs/src/auth.js +1 -2
  5. package/cjs/src/auth.js.map +1 -1
  6. package/cjs/src/auth.spec.d.ts +1 -11
  7. package/cjs/src/auth.spec.d.ts.map +1 -1
  8. package/cjs/src/auth.spec.js +5 -14
  9. package/cjs/src/auth.spec.js.map +1 -1
  10. package/cjs/src/authToken.d.ts +4 -0
  11. package/cjs/src/authToken.d.ts.map +1 -1
  12. package/cjs/src/authToken.js +4 -0
  13. package/cjs/src/authToken.js.map +1 -1
  14. package/cjs/src/css-variables.d.ts +46 -3
  15. package/cjs/src/css-variables.d.ts.map +1 -1
  16. package/cjs/src/embed/app.d.ts +47 -14
  17. package/cjs/src/embed/app.d.ts.map +1 -1
  18. package/cjs/src/embed/app.js +10 -1
  19. package/cjs/src/embed/app.js.map +1 -1
  20. package/cjs/src/embed/app.spec.js +32 -0
  21. package/cjs/src/embed/app.spec.js.map +1 -1
  22. package/cjs/src/embed/base.d.ts +35 -33
  23. package/cjs/src/embed/base.d.ts.map +1 -1
  24. package/cjs/src/embed/base.js +35 -33
  25. package/cjs/src/embed/base.js.map +1 -1
  26. package/cjs/src/embed/bodyless-conversation.d.ts +26 -0
  27. package/cjs/src/embed/bodyless-conversation.d.ts.map +1 -0
  28. package/cjs/src/embed/bodyless-conversation.js +70 -0
  29. package/cjs/src/embed/bodyless-conversation.js.map +1 -0
  30. package/cjs/src/embed/bodyless-conversation.spec.d.ts +2 -0
  31. package/cjs/src/embed/bodyless-conversation.spec.d.ts.map +1 -0
  32. package/cjs/src/embed/bodyless-conversation.spec.js +125 -0
  33. package/cjs/src/embed/bodyless-conversation.spec.js.map +1 -0
  34. package/cjs/src/embed/conversation.d.ts +28 -0
  35. package/cjs/src/embed/conversation.d.ts.map +1 -0
  36. package/cjs/src/embed/conversation.js +34 -0
  37. package/cjs/src/embed/conversation.js.map +1 -0
  38. package/cjs/src/embed/conversation.spec.d.ts +2 -0
  39. package/cjs/src/embed/conversation.spec.d.ts.map +1 -0
  40. package/cjs/src/embed/conversation.spec.js +32 -0
  41. package/cjs/src/embed/conversation.spec.js.map +1 -0
  42. package/cjs/src/embed/embed.spec.js +0 -19
  43. package/cjs/src/embed/embed.spec.js.map +1 -1
  44. package/cjs/src/embed/liveboard.d.ts +49 -0
  45. package/cjs/src/embed/liveboard.d.ts.map +1 -1
  46. package/cjs/src/embed/liveboard.js +21 -1
  47. package/cjs/src/embed/liveboard.js.map +1 -1
  48. package/cjs/src/embed/liveboard.spec.js +43 -0
  49. package/cjs/src/embed/liveboard.spec.js.map +1 -1
  50. package/cjs/src/embed/search.d.ts +0 -13
  51. package/cjs/src/embed/search.d.ts.map +1 -1
  52. package/cjs/src/embed/search.js.map +1 -1
  53. package/cjs/src/embed/ts-embed.d.ts +3 -2
  54. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  55. package/cjs/src/embed/ts-embed.js +10 -13
  56. package/cjs/src/embed/ts-embed.js.map +1 -1
  57. package/cjs/src/embed/ts-embed.spec.js +0 -9
  58. package/cjs/src/embed/ts-embed.spec.js.map +1 -1
  59. package/cjs/src/index.d.ts +4 -1
  60. package/cjs/src/index.d.ts.map +1 -1
  61. package/cjs/src/index.js +7 -1
  62. package/cjs/src/index.js.map +1 -1
  63. package/cjs/src/mixpanel-service.d.ts +4 -0
  64. package/cjs/src/mixpanel-service.d.ts.map +1 -1
  65. package/cjs/src/mixpanel-service.js +4 -0
  66. package/cjs/src/mixpanel-service.js.map +1 -1
  67. package/cjs/src/react/index.d.ts +39 -1
  68. package/cjs/src/react/index.d.ts.map +1 -1
  69. package/cjs/src/react/index.js +37 -1
  70. package/cjs/src/react/index.js.map +1 -1
  71. package/cjs/src/test/test-utils.d.ts +13 -0
  72. package/cjs/src/test/test-utils.d.ts.map +1 -1
  73. package/cjs/src/test/test-utils.js +41 -4
  74. package/cjs/src/test/test-utils.js.map +1 -1
  75. package/cjs/src/tokenizedFetch.d.ts.map +1 -1
  76. package/cjs/src/tokenizedFetch.js +5 -1
  77. package/cjs/src/tokenizedFetch.js.map +1 -1
  78. package/cjs/src/types.d.ts +166 -22
  79. package/cjs/src/types.d.ts.map +1 -1
  80. package/cjs/src/types.js +143 -12
  81. package/cjs/src/types.js.map +1 -1
  82. package/cjs/src/utils/answerService/answerService.d.ts +34 -0
  83. package/cjs/src/utils/answerService/answerService.d.ts.map +1 -0
  84. package/cjs/src/utils/answerService/answerService.js +142 -0
  85. package/cjs/src/utils/answerService/answerService.js.map +1 -0
  86. package/cjs/src/utils/answerService/answerService.spec.d.ts +1 -0
  87. package/cjs/src/utils/answerService/answerService.spec.d.ts.map +1 -0
  88. package/cjs/src/utils/answerService/answerService.spec.js +1 -0
  89. package/cjs/src/utils/answerService/answerService.spec.js.map +1 -0
  90. package/cjs/src/utils/answerService/graphql-queries.d.ts +6 -0
  91. package/cjs/src/utils/answerService/graphql-queries.d.ts.map +1 -0
  92. package/cjs/src/utils/answerService/graphql-queries.js +123 -0
  93. package/cjs/src/utils/answerService/graphql-queries.js.map +1 -0
  94. package/cjs/src/utils/answerService.d.ts +10 -0
  95. package/cjs/src/utils/answerService.d.ts.map +1 -0
  96. package/cjs/src/utils/answerService.js +61 -0
  97. package/cjs/src/utils/answerService.js.map +1 -0
  98. package/cjs/src/utils/answerService.spec.d.ts +2 -0
  99. package/cjs/src/utils/answerService.spec.d.ts.map +1 -0
  100. package/cjs/src/utils/answerService.spec.js +31 -0
  101. package/cjs/src/utils/answerService.spec.js.map +1 -0
  102. package/cjs/src/utils/authService/authService.spec.js +11 -2
  103. package/cjs/src/utils/authService/authService.spec.js.map +1 -1
  104. package/cjs/src/utils/authService/tokenizedAuthService.d.ts +0 -2
  105. package/cjs/src/utils/authService/tokenizedAuthService.d.ts.map +1 -1
  106. package/cjs/src/utils/authService/tokenizedAuthService.js +0 -2
  107. package/cjs/src/utils/authService/tokenizedAuthService.js.map +1 -1
  108. package/cjs/src/utils/authService.d.ts +37 -0
  109. package/cjs/src/utils/authService.d.ts.map +1 -0
  110. package/cjs/src/utils/authService.js +106 -0
  111. package/cjs/src/utils/authService.js.map +1 -0
  112. package/cjs/src/utils/authService.spec.d.ts +2 -0
  113. package/cjs/src/utils/authService.spec.d.ts.map +1 -0
  114. package/cjs/src/utils/authService.spec.js +72 -0
  115. package/cjs/src/utils/authService.spec.js.map +1 -0
  116. package/cjs/src/utils/global-styles.spec.d.ts +2 -0
  117. package/cjs/src/utils/global-styles.spec.d.ts.map +1 -0
  118. package/cjs/src/utils/global-styles.spec.js +21 -0
  119. package/cjs/src/utils/global-styles.spec.js.map +1 -0
  120. package/cjs/src/utils/graphql/answerService/answer-queries.d.ts +2 -0
  121. package/cjs/src/utils/graphql/answerService/answer-queries.d.ts.map +1 -1
  122. package/cjs/src/utils/graphql/answerService/answer-queries.js +32 -2
  123. package/cjs/src/utils/graphql/answerService/answer-queries.js.map +1 -1
  124. package/cjs/src/utils/graphql/answerService/answerService.d.ts +23 -0
  125. package/cjs/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
  126. package/cjs/src/utils/graphql/answerService/answerService.js +76 -8
  127. package/cjs/src/utils/graphql/answerService/answerService.js.map +1 -1
  128. package/cjs/src/utils/graphql/answerService/answerService.spec.js +109 -0
  129. package/cjs/src/utils/graphql/answerService/answerService.spec.js.map +1 -1
  130. package/cjs/src/utils/graphql/answerService/graphql-queries.d.ts +5 -0
  131. package/cjs/src/utils/graphql/answerService/graphql-queries.d.ts.map +1 -0
  132. package/cjs/src/utils/graphql/answerService/graphql-queries.js +80 -0
  133. package/cjs/src/utils/graphql/answerService/graphql-queries.js.map +1 -0
  134. package/cjs/src/utils/graphql/conversationService/conversation-queries.d.ts +3 -0
  135. package/cjs/src/utils/graphql/conversationService/conversation-queries.d.ts.map +1 -0
  136. package/cjs/src/utils/graphql/conversationService/conversation-queries.js +318 -0
  137. package/cjs/src/utils/graphql/conversationService/conversation-queries.js.map +1 -0
  138. package/cjs/src/utils/graphql/conversationService/conversation-service.d.ts +12 -0
  139. package/cjs/src/utils/graphql/conversationService/conversation-service.d.ts.map +1 -0
  140. package/cjs/src/utils/graphql/conversationService/conversation-service.js +89 -0
  141. package/cjs/src/utils/graphql/conversationService/conversation-service.js.map +1 -0
  142. package/cjs/src/utils/graphql/graphql-request.d.ts.map +1 -1
  143. package/cjs/src/utils/graphql/graphql-request.spec.d.ts +2 -0
  144. package/cjs/src/utils/graphql/graphql-request.spec.d.ts.map +1 -0
  145. package/cjs/src/utils/graphql/graphql-request.spec.js +48 -0
  146. package/cjs/src/utils/graphql/graphql-request.spec.js.map +1 -0
  147. package/cjs/src/utils/graphql/nlsService/conversation-queries.d.ts +3 -0
  148. package/cjs/src/utils/graphql/nlsService/conversation-queries.d.ts.map +1 -0
  149. package/cjs/src/utils/graphql/nlsService/conversation-queries.js +313 -0
  150. package/cjs/src/utils/graphql/nlsService/conversation-queries.js.map +1 -0
  151. package/cjs/src/utils/graphql/nlsService/conversation-service.d.ts +12 -0
  152. package/cjs/src/utils/graphql/nlsService/conversation-service.d.ts.map +1 -0
  153. package/cjs/src/utils/graphql/nlsService/conversation-service.js +75 -0
  154. package/cjs/src/utils/graphql/nlsService/conversation-service.js.map +1 -0
  155. package/cjs/src/utils/graphql/nlsService/nls-answer-queries.d.ts +2 -0
  156. package/cjs/src/utils/graphql/nlsService/nls-answer-queries.d.ts.map +1 -0
  157. package/cjs/src/utils/graphql/nlsService/nls-answer-queries.js +403 -0
  158. package/cjs/src/utils/graphql/nlsService/nls-answer-queries.js.map +1 -0
  159. package/cjs/src/utils/graphql/nlsService/nls-answer-service.d.ts +12 -0
  160. package/cjs/src/utils/graphql/nlsService/nls-answer-service.d.ts.map +1 -0
  161. package/cjs/src/utils/graphql/nlsService/nls-answer-service.js +55 -0
  162. package/cjs/src/utils/graphql/nlsService/nls-answer-service.js.map +1 -0
  163. package/cjs/src/utils/graphql/nlsService/nls-answer-service.spec.d.ts +2 -0
  164. package/cjs/src/utils/graphql/nlsService/nls-answer-service.spec.d.ts.map +1 -0
  165. package/cjs/src/utils/graphql/nlsService/nls-answer-service.spec.js +33 -0
  166. package/cjs/src/utils/graphql/nlsService/nls-answer-service.spec.js.map +1 -0
  167. package/cjs/src/utils/graphql/preview-service.d.ts +6 -0
  168. package/cjs/src/utils/graphql/preview-service.d.ts.map +1 -1
  169. package/cjs/src/utils/graphql/preview-service.js +6 -0
  170. package/cjs/src/utils/graphql/preview-service.js.map +1 -1
  171. package/cjs/src/utils/graphql/preview-service.spec.d.ts +2 -0
  172. package/cjs/src/utils/graphql/preview-service.spec.d.ts.map +1 -0
  173. package/cjs/src/utils/graphql/preview-service.spec.js +20 -0
  174. package/cjs/src/utils/graphql/preview-service.spec.js.map +1 -0
  175. package/cjs/src/utils/graphql/spotterService/conversation-queries.d.ts +3 -0
  176. package/cjs/src/utils/graphql/spotterService/conversation-queries.d.ts.map +1 -0
  177. package/cjs/src/utils/graphql/spotterService/conversation-queries.js +318 -0
  178. package/cjs/src/utils/graphql/spotterService/conversation-queries.js.map +1 -0
  179. package/cjs/src/utils/graphql/spotterService/conversation-service.d.ts +12 -0
  180. package/cjs/src/utils/graphql/spotterService/conversation-service.d.ts.map +1 -0
  181. package/cjs/src/utils/graphql/spotterService/conversation-service.js +89 -0
  182. package/cjs/src/utils/graphql/spotterService/conversation-service.js.map +1 -0
  183. package/cjs/src/utils/graphql/spotterService/nls-answer-queries.d.ts +2 -0
  184. package/cjs/src/utils/graphql/spotterService/nls-answer-queries.d.ts.map +1 -0
  185. package/cjs/src/utils/graphql/spotterService/nls-answer-queries.js +403 -0
  186. package/cjs/src/utils/graphql/spotterService/nls-answer-queries.js.map +1 -0
  187. package/cjs/src/utils/graphql/spotterService/nls-answer-service.d.ts +12 -0
  188. package/cjs/src/utils/graphql/spotterService/nls-answer-service.d.ts.map +1 -0
  189. package/cjs/src/utils/graphql/spotterService/nls-answer-service.js +55 -0
  190. package/cjs/src/utils/graphql/spotterService/nls-answer-service.js.map +1 -0
  191. package/cjs/src/utils/liveboardService/liveboardService.d.ts +3 -0
  192. package/cjs/src/utils/liveboardService/liveboardService.d.ts.map +1 -0
  193. package/cjs/src/utils/liveboardService/liveboardService.js +50 -0
  194. package/cjs/src/utils/liveboardService/liveboardService.js.map +1 -0
  195. package/cjs/src/utils/liveboardService/liveboardService.spec.d.ts +2 -0
  196. package/cjs/src/utils/liveboardService/liveboardService.spec.d.ts.map +1 -0
  197. package/cjs/src/utils/liveboardService/liveboardService.spec.js +64 -0
  198. package/cjs/src/utils/liveboardService/liveboardService.spec.js.map +1 -0
  199. package/cjs/src/utils/processData.js +2 -2
  200. package/cjs/src/utils/processData.js.map +1 -1
  201. package/cjs/src/utils/processData.spec.js +15 -0
  202. package/cjs/src/utils/processData.spec.js.map +1 -1
  203. package/cjs/src/utils/processTrigger.d.ts +1 -0
  204. package/cjs/src/utils/processTrigger.d.ts.map +1 -1
  205. package/cjs/src/utils/processTrigger.js +3 -3
  206. package/cjs/src/utils/processTrigger.js.map +1 -1
  207. package/cjs/src/utils/processTrigger.spec.js +10 -0
  208. package/cjs/src/utils/processTrigger.spec.js.map +1 -1
  209. package/cjs/src/utils.d.ts.map +1 -1
  210. package/cjs/src/utils.js +1 -3
  211. package/cjs/src/utils.js.map +1 -1
  212. package/dist/src/auth.d.ts +0 -1
  213. package/dist/src/auth.d.ts.map +1 -1
  214. package/dist/src/auth.spec.d.ts +1 -11
  215. package/dist/src/auth.spec.d.ts.map +1 -1
  216. package/dist/src/authToken.d.ts +4 -0
  217. package/dist/src/authToken.d.ts.map +1 -1
  218. package/dist/src/css-variables.d.ts +46 -3
  219. package/dist/src/css-variables.d.ts.map +1 -1
  220. package/dist/src/embed/app.d.ts +47 -14
  221. package/dist/src/embed/app.d.ts.map +1 -1
  222. package/dist/src/embed/base.d.ts +35 -33
  223. package/dist/src/embed/base.d.ts.map +1 -1
  224. package/dist/src/embed/bodyless-conversation.d.ts +26 -0
  225. package/dist/src/embed/bodyless-conversation.d.ts.map +1 -0
  226. package/dist/src/embed/bodyless-conversation.spec.d.ts +2 -0
  227. package/dist/src/embed/bodyless-conversation.spec.d.ts.map +1 -0
  228. package/dist/src/embed/conversation.d.ts +28 -0
  229. package/dist/src/embed/conversation.d.ts.map +1 -0
  230. package/dist/src/embed/conversation.spec.d.ts +2 -0
  231. package/dist/src/embed/conversation.spec.d.ts.map +1 -0
  232. package/dist/src/embed/liveboard.d.ts +49 -0
  233. package/dist/src/embed/liveboard.d.ts.map +1 -1
  234. package/dist/src/embed/search.d.ts +0 -13
  235. package/dist/src/embed/search.d.ts.map +1 -1
  236. package/dist/src/embed/ts-embed.d.ts +3 -2
  237. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  238. package/dist/src/index.d.ts +4 -1
  239. package/dist/src/index.d.ts.map +1 -1
  240. package/dist/src/mixpanel-service.d.ts +4 -0
  241. package/dist/src/mixpanel-service.d.ts.map +1 -1
  242. package/dist/src/react/index.d.ts +39 -1
  243. package/dist/src/react/index.d.ts.map +1 -1
  244. package/dist/src/test/test-utils.d.ts +13 -0
  245. package/dist/src/test/test-utils.d.ts.map +1 -1
  246. package/dist/src/tokenizedFetch.d.ts.map +1 -1
  247. package/dist/src/types.d.ts +166 -22
  248. package/dist/src/types.d.ts.map +1 -1
  249. package/dist/src/utils/authService/tokenizedAuthService.d.ts +0 -2
  250. package/dist/src/utils/authService/tokenizedAuthService.d.ts.map +1 -1
  251. package/dist/src/utils/global-styles.spec.d.ts +2 -0
  252. package/dist/src/utils/global-styles.spec.d.ts.map +1 -0
  253. package/dist/src/utils/graphql/answerService/answer-queries.d.ts +2 -0
  254. package/dist/src/utils/graphql/answerService/answer-queries.d.ts.map +1 -1
  255. package/dist/src/utils/graphql/answerService/answerService.d.ts +23 -0
  256. package/dist/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
  257. package/dist/src/utils/graphql/graphql-request.d.ts.map +1 -1
  258. package/dist/src/utils/graphql/graphql-request.spec.d.ts +2 -0
  259. package/dist/src/utils/graphql/graphql-request.spec.d.ts.map +1 -0
  260. package/dist/src/utils/graphql/nlsService/conversation-queries.d.ts +3 -0
  261. package/dist/src/utils/graphql/nlsService/conversation-queries.d.ts.map +1 -0
  262. package/dist/src/utils/graphql/nlsService/conversation-service.d.ts +12 -0
  263. package/dist/src/utils/graphql/nlsService/conversation-service.d.ts.map +1 -0
  264. package/dist/src/utils/graphql/nlsService/nls-answer-queries.d.ts +2 -0
  265. package/dist/src/utils/graphql/nlsService/nls-answer-queries.d.ts.map +1 -0
  266. package/dist/src/utils/graphql/nlsService/nls-answer-service.d.ts +12 -0
  267. package/dist/src/utils/graphql/nlsService/nls-answer-service.d.ts.map +1 -0
  268. package/dist/src/utils/graphql/nlsService/nls-answer-service.spec.d.ts +2 -0
  269. package/dist/src/utils/graphql/nlsService/nls-answer-service.spec.d.ts.map +1 -0
  270. package/dist/src/utils/graphql/preview-service.d.ts +6 -0
  271. package/dist/src/utils/graphql/preview-service.d.ts.map +1 -1
  272. package/dist/src/utils/graphql/preview-service.spec.d.ts +2 -0
  273. package/dist/src/utils/graphql/preview-service.spec.d.ts.map +1 -0
  274. package/dist/src/utils/liveboardService/liveboardService.d.ts +3 -0
  275. package/dist/src/utils/liveboardService/liveboardService.d.ts.map +1 -0
  276. package/dist/src/utils/liveboardService/liveboardService.spec.d.ts +2 -0
  277. package/dist/src/utils/liveboardService/liveboardService.spec.d.ts.map +1 -0
  278. package/dist/src/utils/processTrigger.d.ts +1 -0
  279. package/dist/src/utils/processTrigger.d.ts.map +1 -1
  280. package/dist/src/utils.d.ts.map +1 -1
  281. package/dist/tsembed-react.es.js +8087 -175
  282. package/dist/tsembed-react.js +8028 -170
  283. package/dist/tsembed.es.js +8981 -202
  284. package/dist/tsembed.js +8947 -221
  285. package/dist/visual-embed-sdk-react-full.d.ts +485 -98
  286. package/dist/visual-embed-sdk-react.d.ts +485 -98
  287. package/dist/visual-embed-sdk.d.ts +421 -97
  288. package/lib/package.json +12 -28
  289. package/lib/src/auth.d.ts +0 -1
  290. package/lib/src/auth.d.ts.map +1 -1
  291. package/lib/src/auth.js +1 -2
  292. package/lib/src/auth.js.map +1 -1
  293. package/lib/src/auth.spec.d.ts +1 -11
  294. package/lib/src/auth.spec.d.ts.map +1 -1
  295. package/lib/src/auth.spec.js +3 -12
  296. package/lib/src/auth.spec.js.map +1 -1
  297. package/lib/src/authToken.d.ts +4 -0
  298. package/lib/src/authToken.d.ts.map +1 -1
  299. package/lib/src/authToken.js +4 -0
  300. package/lib/src/authToken.js.map +1 -1
  301. package/lib/src/css-variables.d.ts +46 -3
  302. package/lib/src/css-variables.d.ts.map +1 -1
  303. package/lib/src/embed/app.d.ts +47 -14
  304. package/lib/src/embed/app.d.ts.map +1 -1
  305. package/lib/src/embed/app.js +10 -1
  306. package/lib/src/embed/app.js.map +1 -1
  307. package/lib/src/embed/app.spec.js +32 -0
  308. package/lib/src/embed/app.spec.js.map +1 -1
  309. package/lib/src/embed/base.d.ts +35 -33
  310. package/lib/src/embed/base.d.ts.map +1 -1
  311. package/lib/src/embed/base.js +35 -33
  312. package/lib/src/embed/base.js.map +1 -1
  313. package/lib/src/embed/bodyless-conversation.d.ts +26 -0
  314. package/lib/src/embed/bodyless-conversation.d.ts.map +1 -0
  315. package/lib/src/embed/bodyless-conversation.js +66 -0
  316. package/lib/src/embed/bodyless-conversation.js.map +1 -0
  317. package/lib/src/embed/bodyless-conversation.spec.d.ts +2 -0
  318. package/lib/src/embed/bodyless-conversation.spec.d.ts.map +1 -0
  319. package/lib/src/embed/bodyless-conversation.spec.js +122 -0
  320. package/lib/src/embed/bodyless-conversation.spec.js.map +1 -0
  321. package/lib/src/embed/conversation.d.ts +28 -0
  322. package/lib/src/embed/conversation.d.ts.map +1 -0
  323. package/lib/src/embed/conversation.js +30 -0
  324. package/lib/src/embed/conversation.js.map +1 -0
  325. package/lib/src/embed/conversation.spec.d.ts +2 -0
  326. package/lib/src/embed/conversation.spec.d.ts.map +1 -0
  327. package/lib/src/embed/conversation.spec.js +29 -0
  328. package/lib/src/embed/conversation.spec.js.map +1 -0
  329. package/lib/src/embed/embed.spec.js +0 -19
  330. package/lib/src/embed/embed.spec.js.map +1 -1
  331. package/lib/src/embed/liveboard.d.ts +49 -0
  332. package/lib/src/embed/liveboard.d.ts.map +1 -1
  333. package/lib/src/embed/liveboard.js +21 -1
  334. package/lib/src/embed/liveboard.js.map +1 -1
  335. package/lib/src/embed/liveboard.spec.js +43 -0
  336. package/lib/src/embed/liveboard.spec.js.map +1 -1
  337. package/lib/src/embed/search.d.ts +0 -13
  338. package/lib/src/embed/search.d.ts.map +1 -1
  339. package/lib/src/embed/search.js.map +1 -1
  340. package/lib/src/embed/ts-embed.d.ts +3 -2
  341. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  342. package/lib/src/embed/ts-embed.js +10 -13
  343. package/lib/src/embed/ts-embed.js.map +1 -1
  344. package/lib/src/embed/ts-embed.spec.js +0 -9
  345. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  346. package/lib/src/index.d.ts +4 -1
  347. package/lib/src/index.d.ts.map +1 -1
  348. package/lib/src/index.js +4 -1
  349. package/lib/src/index.js.map +1 -1
  350. package/lib/src/mixpanel-service.d.ts +4 -0
  351. package/lib/src/mixpanel-service.d.ts.map +1 -1
  352. package/lib/src/mixpanel-service.js +4 -0
  353. package/lib/src/mixpanel-service.js.map +1 -1
  354. package/lib/src/react/index.d.ts +39 -1
  355. package/lib/src/react/index.d.ts.map +1 -1
  356. package/lib/src/react/index.js +36 -0
  357. package/lib/src/react/index.js.map +1 -1
  358. package/lib/src/test/test-utils.d.ts +13 -0
  359. package/lib/src/test/test-utils.d.ts.map +1 -1
  360. package/lib/src/test/test-utils.js +38 -3
  361. package/lib/src/test/test-utils.js.map +1 -1
  362. package/lib/src/tokenizedFetch.d.ts.map +1 -1
  363. package/lib/src/tokenizedFetch.js +5 -1
  364. package/lib/src/tokenizedFetch.js.map +1 -1
  365. package/lib/src/types.d.ts +166 -22
  366. package/lib/src/types.d.ts.map +1 -1
  367. package/lib/src/types.js +143 -12
  368. package/lib/src/types.js.map +1 -1
  369. package/lib/src/utils/authService/authService.spec.js +11 -2
  370. package/lib/src/utils/authService/authService.spec.js.map +1 -1
  371. package/lib/src/utils/authService/tokenizedAuthService.d.ts +0 -2
  372. package/lib/src/utils/authService/tokenizedAuthService.d.ts.map +1 -1
  373. package/lib/src/utils/authService/tokenizedAuthService.js +0 -2
  374. package/lib/src/utils/authService/tokenizedAuthService.js.map +1 -1
  375. package/lib/src/utils/global-styles.spec.d.ts +2 -0
  376. package/lib/src/utils/global-styles.spec.d.ts.map +1 -0
  377. package/lib/src/utils/global-styles.spec.js +19 -0
  378. package/lib/src/utils/global-styles.spec.js.map +1 -0
  379. package/lib/src/utils/graphql/answerService/answer-queries.d.ts +2 -0
  380. package/lib/src/utils/graphql/answerService/answer-queries.d.ts.map +1 -1
  381. package/lib/src/utils/graphql/answerService/answer-queries.js +31 -1
  382. package/lib/src/utils/graphql/answerService/answer-queries.js.map +1 -1
  383. package/lib/src/utils/graphql/answerService/answerService.d.ts +23 -0
  384. package/lib/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
  385. package/lib/src/utils/graphql/answerService/answerService.js +76 -8
  386. package/lib/src/utils/graphql/answerService/answerService.js.map +1 -1
  387. package/lib/src/utils/graphql/answerService/answerService.spec.js +110 -1
  388. package/lib/src/utils/graphql/answerService/answerService.spec.js.map +1 -1
  389. package/lib/src/utils/graphql/conversationService/conversation-queries.d.ts +3 -0
  390. package/lib/src/utils/graphql/conversationService/conversation-queries.d.ts.map +1 -0
  391. package/lib/src/utils/graphql/conversationService/conversation-queries.js +315 -0
  392. package/lib/src/utils/graphql/conversationService/conversation-queries.js.map +1 -0
  393. package/lib/src/utils/graphql/conversationService/conversation-service.d.ts +12 -0
  394. package/lib/src/utils/graphql/conversationService/conversation-service.d.ts.map +1 -0
  395. package/lib/src/utils/graphql/conversationService/conversation-service.js +84 -0
  396. package/lib/src/utils/graphql/conversationService/conversation-service.js.map +1 -0
  397. package/lib/src/utils/graphql/graphql-request.d.ts.map +1 -1
  398. package/lib/src/utils/graphql/graphql-request.spec.d.ts +2 -0
  399. package/lib/src/utils/graphql/graphql-request.spec.d.ts.map +1 -0
  400. package/lib/src/utils/graphql/graphql-request.spec.js +45 -0
  401. package/lib/src/utils/graphql/graphql-request.spec.js.map +1 -0
  402. package/lib/src/utils/graphql/nlsService/conversation-queries.d.ts +3 -0
  403. package/lib/src/utils/graphql/nlsService/conversation-queries.d.ts.map +1 -0
  404. package/lib/src/utils/graphql/nlsService/conversation-queries.js +310 -0
  405. package/lib/src/utils/graphql/nlsService/conversation-queries.js.map +1 -0
  406. package/lib/src/utils/graphql/nlsService/conversation-service.d.ts +12 -0
  407. package/lib/src/utils/graphql/nlsService/conversation-service.d.ts.map +1 -0
  408. package/lib/src/utils/graphql/nlsService/conversation-service.js +70 -0
  409. package/lib/src/utils/graphql/nlsService/conversation-service.js.map +1 -0
  410. package/lib/src/utils/graphql/nlsService/nls-answer-queries.d.ts +2 -0
  411. package/lib/src/utils/graphql/nlsService/nls-answer-queries.d.ts.map +1 -0
  412. package/lib/src/utils/graphql/nlsService/nls-answer-queries.js +400 -0
  413. package/lib/src/utils/graphql/nlsService/nls-answer-queries.js.map +1 -0
  414. package/lib/src/utils/graphql/nlsService/nls-answer-service.d.ts +12 -0
  415. package/lib/src/utils/graphql/nlsService/nls-answer-service.d.ts.map +1 -0
  416. package/lib/src/utils/graphql/nlsService/nls-answer-service.js +50 -0
  417. package/lib/src/utils/graphql/nlsService/nls-answer-service.js.map +1 -0
  418. package/lib/src/utils/graphql/nlsService/nls-answer-service.spec.d.ts +2 -0
  419. package/lib/src/utils/graphql/nlsService/nls-answer-service.spec.d.ts.map +1 -0
  420. package/lib/src/utils/graphql/nlsService/nls-answer-service.spec.js +31 -0
  421. package/lib/src/utils/graphql/nlsService/nls-answer-service.spec.js.map +1 -0
  422. package/lib/src/utils/graphql/preview-service.d.ts +6 -0
  423. package/lib/src/utils/graphql/preview-service.d.ts.map +1 -1
  424. package/lib/src/utils/graphql/preview-service.js +6 -0
  425. package/lib/src/utils/graphql/preview-service.js.map +1 -1
  426. package/lib/src/utils/graphql/preview-service.spec.d.ts +2 -0
  427. package/lib/src/utils/graphql/preview-service.spec.d.ts.map +1 -0
  428. package/lib/src/utils/graphql/preview-service.spec.js +18 -0
  429. package/lib/src/utils/graphql/preview-service.spec.js.map +1 -0
  430. package/lib/src/utils/graphql/spotterService/conversation-queries.d.ts +3 -0
  431. package/lib/src/utils/graphql/spotterService/conversation-queries.d.ts.map +1 -0
  432. package/lib/src/utils/graphql/spotterService/conversation-queries.js +315 -0
  433. package/lib/src/utils/graphql/spotterService/conversation-queries.js.map +1 -0
  434. package/lib/src/utils/graphql/spotterService/conversation-service.d.ts +12 -0
  435. package/lib/src/utils/graphql/spotterService/conversation-service.d.ts.map +1 -0
  436. package/lib/src/utils/graphql/spotterService/conversation-service.js +84 -0
  437. package/lib/src/utils/graphql/spotterService/conversation-service.js.map +1 -0
  438. package/lib/src/utils/graphql/spotterService/nls-answer-queries.d.ts +2 -0
  439. package/lib/src/utils/graphql/spotterService/nls-answer-queries.d.ts.map +1 -0
  440. package/lib/src/utils/graphql/spotterService/nls-answer-queries.js +400 -0
  441. package/lib/src/utils/graphql/spotterService/nls-answer-queries.js.map +1 -0
  442. package/lib/src/utils/graphql/spotterService/nls-answer-service.d.ts +12 -0
  443. package/lib/src/utils/graphql/spotterService/nls-answer-service.d.ts.map +1 -0
  444. package/lib/src/utils/graphql/spotterService/nls-answer-service.js +50 -0
  445. package/lib/src/utils/graphql/spotterService/nls-answer-service.js.map +1 -0
  446. package/lib/src/utils/liveboardService/liveboardService.d.ts +3 -0
  447. package/lib/src/utils/liveboardService/liveboardService.d.ts.map +1 -0
  448. package/lib/src/utils/liveboardService/liveboardService.js +46 -0
  449. package/lib/src/utils/liveboardService/liveboardService.js.map +1 -0
  450. package/lib/src/utils/liveboardService/liveboardService.spec.d.ts +2 -0
  451. package/lib/src/utils/liveboardService/liveboardService.spec.d.ts.map +1 -0
  452. package/lib/src/utils/liveboardService/liveboardService.spec.js +61 -0
  453. package/lib/src/utils/liveboardService/liveboardService.spec.js.map +1 -0
  454. package/lib/src/utils/processData.js +2 -2
  455. package/lib/src/utils/processData.js.map +1 -1
  456. package/lib/src/utils/processData.spec.js +15 -0
  457. package/lib/src/utils/processData.spec.js.map +1 -1
  458. package/lib/src/utils/processTrigger.d.ts +1 -0
  459. package/lib/src/utils/processTrigger.d.ts.map +1 -1
  460. package/lib/src/utils/processTrigger.js +1 -1
  461. package/lib/src/utils/processTrigger.js.map +1 -1
  462. package/lib/src/utils/processTrigger.spec.js +10 -0
  463. package/lib/src/utils/processTrigger.spec.js.map +1 -1
  464. package/lib/src/utils.d.ts.map +1 -1
  465. package/lib/src/utils.js +1 -3
  466. package/lib/src/utils.js.map +1 -1
  467. package/lib/src/visual-embed-sdk.d.ts +433 -97
  468. package/package.json +12 -28
  469. package/src/auth.spec.ts +3 -12
  470. package/src/auth.ts +1 -2
  471. package/src/authToken.ts +4 -0
  472. package/src/css-variables.ts +49 -3
  473. package/src/embed/app.spec.ts +47 -0
  474. package/src/embed/app.ts +54 -13
  475. package/src/embed/base.ts +35 -33
  476. package/src/embed/bodyless-conversation.spec.ts +141 -0
  477. package/src/embed/bodyless-conversation.ts +95 -0
  478. package/src/embed/conversation.spec.ts +46 -0
  479. package/src/embed/conversation.ts +58 -0
  480. package/src/embed/embed.spec.ts +0 -22
  481. package/src/embed/liveboard.spec.ts +62 -0
  482. package/src/embed/liveboard.ts +69 -0
  483. package/src/embed/search.ts +0 -13
  484. package/src/embed/ts-embed.spec.ts +0 -11
  485. package/src/embed/ts-embed.ts +13 -13
  486. package/src/index.ts +7 -0
  487. package/src/mixpanel-service.ts +4 -0
  488. package/src/react/index.tsx +89 -41
  489. package/src/test/test-utils.ts +46 -3
  490. package/src/tokenizedFetch.ts +5 -1
  491. package/src/types.ts +167 -21
  492. package/src/utils/authService/authService.spec.ts +11 -2
  493. package/src/utils/authService/tokenizedAuthService.ts +0 -2
  494. package/src/utils/global-styles.spec.ts +20 -0
  495. package/src/utils/graphql/answerService/answer-queries.ts +33 -1
  496. package/src/utils/graphql/answerService/answerService.spec.ts +131 -0
  497. package/src/utils/graphql/answerService/answerService.ts +102 -10
  498. package/src/utils/graphql/graphql-request.spec.ts +51 -0
  499. package/src/utils/graphql/graphql-request.ts +1 -1
  500. package/src/utils/graphql/nlsService/conversation-queries.ts +310 -0
  501. package/src/utils/graphql/nlsService/conversation-service.ts +81 -0
  502. package/src/utils/graphql/nlsService/nls-answer-queries.ts +399 -0
  503. package/src/utils/graphql/nlsService/nls-answer-service.spec.ts +35 -0
  504. package/src/utils/graphql/nlsService/nls-answer-service.ts +58 -0
  505. package/src/utils/graphql/preview-service.spec.ts +20 -0
  506. package/src/utils/graphql/preview-service.ts +6 -0
  507. package/src/utils/liveboardService/liveboardService.spec.ts +63 -0
  508. package/src/utils/liveboardService/liveboardService.ts +55 -0
  509. package/src/utils/processData.spec.ts +17 -0
  510. package/src/utils/processData.ts +2 -2
  511. package/src/utils/processTrigger.spec.ts +19 -0
  512. package/src/utils/processTrigger.ts +1 -1
  513. package/src/utils.ts +1 -3
  514. package/dist/src/embed/searchEmbed-basic-auth.spec.d.ts +0 -2
  515. package/dist/src/embed/searchEmbed-basic-auth.spec.d.ts.map +0 -1
  516. package/src/embed/searchEmbed-basic-auth.spec.ts +0 -110
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thoughtspot/visual-embed-sdk",
3
- "version": "1.33.0-alpha.2",
3
+ "version": "1.33.0-dc.1",
4
4
  "description": "ThoughtSpot Embed SDK",
5
5
  "module": "lib/src/index.js",
6
6
  "main": "dist/tsembed.js",
@@ -37,19 +37,14 @@
37
37
  },
38
38
  "size-limit": [
39
39
  {
40
- "path": "dist/tsembed.js",
41
- "limit": "48 kB"
40
+ "path": "lib/src/index.js",
41
+ "limit": "49 kB"
42
42
  }
43
43
  ],
44
44
  "scripts": {
45
45
  "lint": "eslint 'src/**'",
46
46
  "lint:fix": "eslint 'src/**/*.*' --fix",
47
47
  "tsc": "tsc -p . --incremental false; tsc -p . --incremental false --module commonjs --outDir cjs",
48
- "start": "gatsby develop",
49
- "build:gatsby": "npm run clean:gatsby && gatsby build --prefix-paths",
50
- "build:gatsby:noprefix": "npm run clean:gatsby && gatsby build",
51
- "serve:gatsby": "gatsby serve",
52
- "clean:gatsby": "gatsby clean",
53
48
  "build-and-publish": "npm run build:gatsby && npm run publish",
54
49
  "bundle-dts-file": "dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts",
55
50
  "bundle-dts": "dts-bundle --name ../../dist/visual-embed-sdk --main lib/src/index.d.ts --outputAsModuleFolder=true",
@@ -57,16 +52,14 @@
57
52
  "bundle-dts-react-full": "dts-bundle --name ../../../dist/visual-embed-sdk-react-full --main lib/src/react/all-types-export.d.ts --outputAsModuleFolder=true",
58
53
  "build": "rollup -c",
59
54
  "watch": "rollup -cw",
60
- "docs-cmd": "node scripts/gatsby-commands.js",
61
- "docgen": "typedoc --tsconfig tsconfig.json --theme typedoc-theme",
55
+ "docgen": "typedoc --tsconfig tsconfig.json --theme typedoc-theme --json static/typedoc/typedoc.json --disableOutputCheck",
62
56
  "test-sdk": "jest -c jest.config.sdk.js --runInBand",
63
- "test-docs": "jest -c jest.config.docs.js",
64
- "test": "npm run test-sdk && npm run test-docs",
57
+ "test": "npm run test-sdk",
65
58
  "posttest": "cat ./coverage/sdk/lcov.info | coveralls",
66
59
  "is-publish-allowed": "node scripts/is-publish-allowed.js",
67
- "prepublishOnly": "npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build",
60
+ "prepublishOnly": "npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build",
68
61
  "check-size": "npm run build && size-limit",
69
- "publish-dev": "npm publish --tag dev",
62
+ "publish-dev": "npm publish --tag dc",
70
63
  "publish-prod": "npm publish --tag latest",
71
64
  "dev": "vite -c vite.local.config.ts"
72
65
  },
@@ -84,10 +77,11 @@
84
77
  "gatsby-plugin-vercel": "^1.0.3",
85
78
  "html-react-parser": "^1.4.12",
86
79
  "lodash": "^4.17.21",
87
- "mixpanel-browser": "^2.45.0",
80
+ "mixpanel-browser": "2.47.0",
88
81
  "ts-deepmerge": "^6.0.2",
89
82
  "tslib": "^2.5.3",
90
- "use-deep-compare-effect": "^1.8.1"
83
+ "use-deep-compare-effect": "^1.8.1",
84
+ "yaml": "^2.5.1"
91
85
  },
92
86
  "devDependencies": {
93
87
  "@mdx-js/mdx": "^1.6.22",
@@ -103,6 +97,7 @@
103
97
  "@testing-library/react": "^11.2.7",
104
98
  "@testing-library/user-event": "^13.1.8",
105
99
  "@types/jest": "^22.2.3",
100
+ "@types/lodash": "^4.17.0",
106
101
  "@types/mixpanel-browser": "^2.35.6",
107
102
  "@types/react-test-renderer": "^17.0.1",
108
103
  "@typescript-eslint/eslint-plugin": "^4.6.0",
@@ -112,6 +107,7 @@
112
107
  "babel-preset-gatsby": "^1.10.0",
113
108
  "command-line-args": "^5.1.1",
114
109
  "coveralls": "^3.1.0",
110
+ "crypto": "^1.0.1",
115
111
  "current-git-branch": "^1.1.0",
116
112
  "dts-bundle": "^0.7.3",
117
113
  "eslint": "^7.12.1",
@@ -122,18 +118,6 @@
122
118
  "eslint-plugin-prettier": "^3.1.4",
123
119
  "eslint-plugin-react-hooks": "^4.2.0",
124
120
  "fs-extra": "^10.0.0",
125
- "gatsby": "3.13.1",
126
- "gatsby-plugin-algolia": "^0.22.2",
127
- "gatsby-plugin-catch-links": "^3.1.0",
128
- "gatsby-plugin-env-variables": "^2.1.0",
129
- "gatsby-plugin-intl": "^0.3.3",
130
- "gatsby-plugin-manifest": "^3.2.0",
131
- "gatsby-plugin-output": "^0.1.3",
132
- "gatsby-plugin-sass": "6.7.0",
133
- "gatsby-plugin-sitemap": "^4.10.0",
134
- "gatsby-source-filesystem": "3.1.0",
135
- "gatsby-transformer-asciidoc": "2.1.0",
136
- "gatsby-transformer-rehype": "2.0.0",
137
121
  "gh-pages": "^3.1.0",
138
122
  "highlight.js": "^10.6.0",
139
123
  "html-to-text": "^8.0.0",
package/src/auth.spec.ts CHANGED
@@ -1,8 +1,9 @@
1
+ import 'jest-fetch-mock';
1
2
  import * as authInstance from './auth';
2
3
  import * as authTokenService from './authToken';
3
4
  import * as EmbedConfig from './embed/embedConfig';
4
5
  import * as mixPanelService from './mixpanel-service';
5
- import { executeAfterWait } from './test/test-utils';
6
+ import { executeAfterWait, mockSessionInfo } from './test/test-utils';
6
7
  import { AuthType, EmbedEvent } from './types';
7
8
  import * as checkReleaseVersionInBetaInstance from './utils';
8
9
  import * as authService from './utils/authService/authService';
@@ -102,17 +103,6 @@ export const embedConfig: any = {
102
103
  };
103
104
 
104
105
  const originalWindow = window;
105
- export const mockSessionInfo = {
106
- userGUID: '1234',
107
- mixpanelToken: 'abc123',
108
- isPublicUser: false,
109
- sessionId: '6588e7d9-710c-453e-a7b4-535fb3a8cbb2',
110
- genNo: 3,
111
- acSession: {
112
- sessionId: 'cb202c48-b14b-4466-8a70-899ea666d46q',
113
- genNo: 5,
114
- },
115
- };
116
106
 
117
107
  export const mockSessionInfoApiResponse = {
118
108
  userGUID: '1234',
@@ -205,6 +195,7 @@ describe('Unit test for auth', () => {
205
195
  });
206
196
 
207
197
  test('doTokenAuth: when user is not loggedIn & getAuthToken not present, isLoggedIn should called', async () => {
198
+ fetchMock.mockResponse(JSON.stringify({ mixpanelAccessToken: '' }));
208
199
  jest.spyOn(tokenAuthService, 'isActiveService').mockImplementation(async () => false);
209
200
  jest.spyOn(authService, 'fetchAuthTokenService').mockImplementation(() => ({
210
201
  text: () => Promise.resolve('abc'),
package/src/auth.ts CHANGED
@@ -214,7 +214,6 @@ async function isLoggedIn(thoughtSpotHost: string): Promise<boolean> {
214
214
  * Services to be called after the login is successful,
215
215
  * This should be called after the cookie is set for cookie auth or
216
216
  * after the token is set for cookieless.
217
- *
218
217
  * @return {Promise<void>}
219
218
  * @example
220
219
  * ```js
@@ -231,7 +230,7 @@ export async function postLoginService(): Promise<void> {
231
230
  initMixpanel(sessionInfo);
232
231
  }
233
232
  } catch (e) {
234
- logger.error('Post login services failed.', e.message);
233
+ logger.error('Post login services failed.', e.message, e);
235
234
  }
236
235
  }
237
236
 
package/src/authToken.ts CHANGED
@@ -6,6 +6,10 @@ import { logger } from './utils/logger';
6
6
  let cachedAuthToken: string | null = null;
7
7
 
8
8
  // This method can be used to get the authToken using the embedConfig
9
+ /**
10
+ *
11
+ * @param embedConfig
12
+ */
9
13
  export async function getAuthenticationToken(embedConfig: EmbedConfig): Promise<string> {
10
14
  // Since we don't have token validation enabled , we cannot tell if the
11
15
  // cached token is valid or not. So we will always fetch a new token.
@@ -24,9 +24,12 @@ export interface CustomCssVariables {
24
24
  '--ts-var-root-text-transform'?: string;
25
25
 
26
26
  /**
27
- * application color, it replaces #2770EF which is rd-color(blue,base) and
28
- * its similar colors like rd-color(blue,60), rd-color(accent, base) and
29
- * rd-color(text, accent) in the app.
27
+ * Font color of the text on toggle buttons such as
28
+ * **All**, **Answers**, and **Liveboards** on the Home page (Classic experience),
29
+ * the text color of the chart and table tiles on Home page (New modular Homepage experience),
30
+ * and title text on the AI-generated charts and tables.
31
+ * The default color code is #2770EF.
32
+ *
30
33
  */
31
34
  '--ts-var-application-color'?: string;
32
35
 
@@ -163,6 +166,11 @@ export interface CustomCssVariables {
163
166
  */
164
167
  '--ts-var-button--primary--hover-background'?: string;
165
168
 
169
+ /**
170
+ * Backgroud color of the primary buttons when active.
171
+ */
172
+ '--ts-var-button--primary--active-background'?: string;
173
+
166
174
  /**
167
175
  * Font color of the text on the secondary buttons.
168
176
  */
@@ -183,6 +191,11 @@ export interface CustomCssVariables {
183
191
  */
184
192
  '--ts-var-button--secondary--hover-background'?: string;
185
193
 
194
+ /**
195
+ * Backgroud color of the secondary buttons when active.
196
+ */
197
+ '--ts-var-button--secondary--active-background'?: string;
198
+
186
199
  /**
187
200
  * Font color of the tertiary button. For example, the *Undo*, *Redo*, and *Reset*
188
201
  * buttons on the *Search* page.
@@ -199,6 +212,11 @@ export interface CustomCssVariables {
199
212
  */
200
213
  '--ts-var-button--tertiary--hover-background'?: string;
201
214
 
215
+ /**
216
+ * Backgroud color of the tertiary buttons when active.
217
+ */
218
+ '--ts-var-button--tertiary--active-background'?: string;
219
+
202
220
  /**
203
221
  * Font color of the title text of a visualization or Answer.
204
222
  */
@@ -416,4 +434,32 @@ export interface CustomCssVariables {
416
434
  * Background for favorite carousel find your favorites card in modular home.
417
435
  */
418
436
  '--ts-var-home-favorite-suggestion-card-background'?: string;
437
+ /**
438
+ * Border color of checkbox in error state.
439
+ */
440
+ '--ts-var-checkbox-error-border'?: string;
441
+ /**
442
+ * Border color of checkbox.
443
+ */
444
+ '--ts-var-checkbox-border-color'?: string;
445
+ /**
446
+ * Border color of checkbox in hover state.
447
+ */
448
+ '--ts-var-checkbox-hover-border'?: string;
449
+ /**
450
+ * Border and font color of checkbox in active state.
451
+ */
452
+ '--ts-var-checkbox-active-color'?: string;
453
+ /**
454
+ * Border color and font color of checkbox in checked state.
455
+ */
456
+ '--ts-var-checkbox-checked-color'?: string;
457
+ /**
458
+ * Border and font color of checkbox in disabled state.
459
+ */
460
+ '--ts-var-checkbox-checked-disabled'?: string;
461
+ /**
462
+ * Background color of checkbox.
463
+ */
464
+ '--ts-var-checkbox-background-color'?: string;
419
465
  }
@@ -138,6 +138,7 @@ describe('App embed tests', () => {
138
138
  [Page.Data]: 'data/tables',
139
139
  [Page.Home]: 'home',
140
140
  [Page.SpotIQ]: 'insights/results',
141
+ [Page.Monitor]: 'insights/monitor-alerts',
141
142
  };
142
143
 
143
144
  const pageIds = Object.keys(pageRouteMap);
@@ -170,6 +171,7 @@ describe('App embed tests', () => {
170
171
  [Page.Data]: 'data/tables',
171
172
  [Page.Home]: 'home',
172
173
  [Page.SpotIQ]: 'home/spotiq-analysis',
174
+ [Page.Monitor]: 'home/monitor-alerts',
173
175
  };
174
176
 
175
177
  const pageIdsForModularHomes = Object.keys(pageRouteMapForModularHome);
@@ -373,6 +375,51 @@ describe('App embed tests', () => {
373
375
  });
374
376
  });
375
377
 
378
+ test('Should add isLiveboardCompactHeaderEnabled flag to the iframe src', async () => {
379
+ const appEmbed = new AppEmbed(getRootEl(), {
380
+ ...defaultViewConfig,
381
+ isLiveboardCompactHeaderEnabled: false,
382
+ } as AppViewConfig);
383
+
384
+ appEmbed.render();
385
+ await executeAfterWait(() => {
386
+ expectUrlMatchesWithParams(
387
+ getIFrameSrc(),
388
+ `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isLiveboardHeaderV2Enabled=false${defaultParams}${defaultParamsPost}#/home`,
389
+ );
390
+ });
391
+ });
392
+
393
+ test('Should add showLiveboardReverifyBanner flag to the iframe src', async () => {
394
+ const appEmbed = new AppEmbed(getRootEl(), {
395
+ ...defaultViewConfig,
396
+ showLiveboardReverifyBanner: false,
397
+ } as AppViewConfig);
398
+
399
+ appEmbed.render();
400
+ await executeAfterWait(() => {
401
+ expectUrlMatchesWithParams(
402
+ getIFrameSrc(),
403
+ `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&showLiveboardReverifyBanner=false${defaultParams}${defaultParamsPost}#/home`,
404
+ );
405
+ });
406
+ });
407
+
408
+ test('Should add showLiveboardVerifiedBadge flag to the iframe src', async () => {
409
+ const appEmbed = new AppEmbed(getRootEl(), {
410
+ ...defaultViewConfig,
411
+ showLiveboardVerifiedBadge: false,
412
+ } as AppViewConfig);
413
+
414
+ appEmbed.render();
415
+ await executeAfterWait(() => {
416
+ expectUrlMatchesWithParams(
417
+ getIFrameSrc(),
418
+ `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&showLiveboardVerifiedBadge=false${defaultParams}${defaultParamsPost}#/home`,
419
+ );
420
+ });
421
+ });
422
+
376
423
  test('Should add default values of flags to the iframe src', async () => {
377
424
  const appEmbed = new AppEmbed(getRootEl(), {
378
425
  ...defaultViewConfig,
package/src/embed/app.ts CHANGED
@@ -53,6 +53,10 @@ export enum Page {
53
53
  * SpotIQ listing page
54
54
  */
55
55
  SpotIQ = 'insights',
56
+ /**
57
+ * Monitor Alerts Page
58
+ */
59
+ Monitor = 'monitor'
56
60
  }
57
61
 
58
62
  /**
@@ -265,19 +269,6 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
265
269
  * ```
266
270
  */
267
271
  fullHeight?: boolean;
268
- /**
269
- * Flag to control Data panel experience
270
- * @default true
271
- * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
272
- * @example
273
- * ```js
274
- * const embed = new AppEmbed('#tsEmbed', {
275
- * ... // other options
276
- * dataPanelV2: true,
277
- * })
278
- * ```
279
- */
280
- dataPanelV2?: boolean;
281
272
  /**
282
273
  * Show or hide Liveboard header
283
274
  * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
@@ -411,6 +402,48 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
411
402
  * @version SDK : 1.33.0 | Thoughtspot : 10.2.0.cl
412
403
  */
413
404
  homePageSearchBarMode?: HomePageSearchBarMode;
405
+ /**
406
+ * This flag is used to enable the compact header in liveboard
407
+ * @type {boolean}
408
+ * @default false
409
+ * @version SDK: 1.35.0 | ThoughtSpot:10.3.0.cl
410
+ * @example
411
+ * ```js
412
+ * const embed = new AppEmbed('#embed-container', {
413
+ * ... // other options
414
+ * isLiveboardCompactHeaderEnabled: true,
415
+ * })
416
+ * ```
417
+ */
418
+ isLiveboardCompactHeaderEnabled?: boolean;
419
+ /**
420
+ * This flag is used to show/hide verified Icon in liveboard compact header
421
+ * @type {boolean}
422
+ * @default true
423
+ * @version SDK: 1.35.0 | ThoughtSpot:10.4.0.cl
424
+ * @example
425
+ * ```js
426
+ * const embed = new AppEmbed('#embed-container', {
427
+ * ... // other options
428
+ * showLiveboardVerifiedBadge: true,
429
+ * })
430
+ * ```
431
+ */
432
+ showLiveboardVerifiedBadge?: boolean;
433
+ /**
434
+ * This flag is used to show/hide re-verify banner in liveboard compact header
435
+ * @type {boolean}
436
+ * @default true
437
+ * @version SDK: 1.35.0 | ThoughtSpot:10.4.0.cl
438
+ * @example
439
+ * ```js
440
+ * const embed = new AppEmbed('#embed-container', {
441
+ * ... // other options
442
+ * showLiveboardReverifyBanner: true,
443
+ * })
444
+ * ```
445
+ */
446
+ showLiveboardReverifyBanner?: boolean;
414
447
  }
415
448
 
416
449
  /**
@@ -463,6 +496,9 @@ export class AppEmbed extends V1Embed {
463
496
  /* eslint-disable-next-line max-len */
464
497
  dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL,
465
498
  collapseSearchBar = true,
499
+ isLiveboardCompactHeaderEnabled = false,
500
+ showLiveboardVerifiedBadge = true,
501
+ showLiveboardReverifyBanner = true,
466
502
  homePageSearchBarMode,
467
503
  } = this.viewConfig;
468
504
 
@@ -477,6 +513,9 @@ export class AppEmbed extends V1Embed {
477
513
  params[Param.ShowLiveboardDescription] = !!showLiveboardDescription;
478
514
  params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
479
515
  params[Param.IsFullAppEmbed] = true;
516
+ params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
517
+ params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;
518
+ params[Param.ShowLiveboardReverifyBanner] = showLiveboardReverifyBanner;
480
519
 
481
520
  params = this.getBaseQueryParams(params);
482
521
 
@@ -595,6 +634,8 @@ export class AppEmbed extends V1Embed {
595
634
  return 'data/tables';
596
635
  case Page.SpotIQ:
597
636
  return modularHomeExperience ? 'home/spotiq-analysis' : 'insights/results';
637
+ case Page.Monitor:
638
+ return modularHomeExperience ? 'home/monitor-alerts' : 'insights/monitor-alerts';
598
639
  case Page.Home:
599
640
  default:
600
641
  return 'home';
package/src/embed/base.ts CHANGED
@@ -260,22 +260,23 @@ export const renderInQueue = (fn: (next?: (val?: any) => void) => Promise<any>):
260
260
  /**
261
261
  * Imports TML representation of the metadata objects into ThoughtSpot.
262
262
  * @param data
263
+ * @returns imports TML data into ThoughtSpot
263
264
  * @example
264
265
  * ```js
265
- * executeTML({
266
- * //Array of metadata Tmls
267
- metadata_tmls: [
268
- "'\''{\"guid\":\"9bd202f5-d431-44bf-9a07-b4f7be372125\",
269
- \"liveboard\":{\"name\":\"Parameters Liveboard\"}}'\''"
270
- ],
271
- import_policy: 'PARTIAL', // Specifies the import policy for the TML import.
272
- create_new: false, // If selected, creates TML objects with new GUIDs.
273
- }).then(result => {
274
- console.log(result);
275
- }).catch(error => {
276
- console.error(error);
277
- });
278
- *
266
+ * executeTML({
267
+ * //Array of metadata Tmls in string format
268
+ * metadata_tmls: [
269
+ * "'\''{\"guid\":\"9bd202f5-d431-44bf-9a07-b4f7be372125\",
270
+ * \"liveboard\":{\"name\":\"Parameters Liveboard\"}}'\''"
271
+ * ],
272
+ * import_policy: 'PARTIAL', // Specifies the import policy for the TML import.
273
+ * create_new: false, // If selected, creates TML objects with new GUIDs.
274
+ * }).then(result => {
275
+ * console.log(result);
276
+ * }).catch(error => {
277
+ * console.error(error);
278
+ * });
279
+ *```
279
280
  * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
280
281
  * @group Global methods
281
282
  */
@@ -320,27 +321,28 @@ export const executeTML = async (data: executeTMLInput): Promise<any> => {
320
321
  * Exports TML representation of the metadata objects from ThoughtSpot in JSON or YAML
321
322
  * format.
322
323
  * @param data
324
+ * @returns exports TML data
323
325
  * @example
324
326
  * ```js
325
- exportTML({
326
- metadata: [
327
- {
328
- type: "LIVEBOARD", //Metadata Type
329
- identifier: "9bd202f5-d431-44bf-9a07-b4f7be372125" //Metadata Id
330
- }
331
- ],
332
- export_associated: false,//indicates whether to export associated metadata objects
333
- export_fqn: false, //Adds FQNs of the referenced objects.For example, if you are
334
- //exporting a Liveboard and its associated objects, the API
335
- //returns the Liveboard TML data with the FQNs of the referenced
336
- //worksheet. If the exported TML data includes FQNs, you don't need
337
- //to manually add FQNs of the referenced objects during TML import.
338
- edoc_format: "JSON" //It takes JSON or YAML value
339
- }).then(result => {
340
- console.log(result);
341
- }).catch(error => {
342
- console.error(error);
343
- });
327
+ * exportTML({
328
+ * metadata: [
329
+ * {
330
+ * type: "LIVEBOARD", //Metadata Type
331
+ * identifier: "9bd202f5-d431-44bf-9a07-b4f7be372125" //Metadata Id
332
+ * }
333
+ * ],
334
+ * export_associated: false,//indicates whether to export associated metadata objects
335
+ * export_fqn: false, //Adds FQNs of the referenced objects.For example, if you are
336
+ * //exporting a Liveboard and its associated objects, the API
337
+ * //returns the Liveboard TML data with the FQNs of the referenced
338
+ * //worksheet. If the exported TML data includes FQNs, you don't need
339
+ * //to manually add FQNs of the referenced objects during TML import.
340
+ * edoc_format: "JSON" //It takes JSON or YAML value
341
+ * }).then(result => {
342
+ * console.log(result);
343
+ * }).catch(error => {
344
+ * console.error(error);
345
+ * });
344
346
  * ```
345
347
  * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
346
348
  * @group Global methods
@@ -0,0 +1,141 @@
1
+ import 'jest-fetch-mock';
2
+ import { BodylessConversation, BodylessConversationViewConfig } from './bodyless-conversation';
3
+ import * as authInstance from '../auth';
4
+ import { init } from '../index';
5
+ import { Action, AuthType, RuntimeFilterOp } from '../types';
6
+ import {
7
+ executeAfterWait,
8
+ getDocumentBody,
9
+ getIFrameSrc,
10
+ getRootEl,
11
+ fixedEncodeURI,
12
+ defaultParamsWithoutHiddenActions as defaultParams,
13
+ expectUrlMatchesWithParams,
14
+ expectUrlToHaveParamsWithValues,
15
+ } from '../test/test-utils';
16
+
17
+ describe('BodylessConversation', () => {
18
+ const thoughtSpotHost = 'tshost';
19
+
20
+ beforeAll(() => {
21
+ init({
22
+ thoughtSpotHost,
23
+ authType: AuthType.None,
24
+ });
25
+ jest.spyOn(authInstance, 'postLoginService').mockImplementation(() => Promise.resolve({}));
26
+ spyOn(window, 'alert');
27
+ document.body.innerHTML = getDocumentBody();
28
+ });
29
+
30
+ beforeEach(() => {
31
+ fetchMock.resetMocks();
32
+ });
33
+
34
+ test('should render the bodyless conversation embed', async () => {
35
+ fetchMock.mockResponses(
36
+ JSON.stringify({
37
+ data: {
38
+ ConvAssist__createConversation: {
39
+ convId: 'conversationId',
40
+ initialCtx: {
41
+ type: 'TS_ANSWER',
42
+ tsAnsCtx: {
43
+ sessionId: 'sessionId',
44
+ genNo: 1,
45
+ stateKey: {
46
+ transactionId: 'transactionId',
47
+ generationNumber: 1,
48
+ },
49
+ worksheet: {
50
+ worksheetId: 'worksheetId',
51
+ worksheetName: 'GTM',
52
+ },
53
+ },
54
+ },
55
+ },
56
+ },
57
+ }),
58
+ JSON.stringify({
59
+ data: {
60
+ ConvAssist__sendMessage: {
61
+ responses: [
62
+ {
63
+ msgId: 'msgId',
64
+ data: {
65
+ asstRespData: {
66
+ tool: 'TS_NLS',
67
+ asstRespText: '',
68
+ nlsAnsData: {
69
+ sageQuerySuggestions: [
70
+ {
71
+ llmReasoning: {
72
+ assumptions: 'You want the total [COL|sales] for [COL|item_type] [VAL|jackets] for [VAL|this year].',
73
+ clarifications: '',
74
+ interpretation: '',
75
+ __typename: 'eureka_SageQuerySuggestion_LLMReasoning',
76
+ },
77
+ tokens: [
78
+ 'sum sales',
79
+ "item type = 'jackets'",
80
+ "date = 'this year'",
81
+ ],
82
+ tmlTokens: [
83
+ 'sum [sales]',
84
+ "[date] = [date].'this year'",
85
+ "[item type] = [item type].'jackets'",
86
+ ],
87
+ worksheetId: 'worksheetId',
88
+ description: '',
89
+ title: '',
90
+ cached: false,
91
+ sqlQuery: "SELECT SUM(sales) FROM __Sample_Retail_Apparel WHERE item_type = 'jackets' AND date = _this_year();",
92
+ sessionId: 'sessionId',
93
+ genNo: 2,
94
+ formulaInfo: [],
95
+ tmlPhrases: [],
96
+ stateKey: {
97
+ transactionId: 'transactionId',
98
+ generationNumber: 1,
99
+ __typename: 'sage_auto_complete_v2_ACStateKey',
100
+ },
101
+ __typename: 'eureka_SageQuerySuggestion',
102
+ },
103
+ ],
104
+ responseType: 'ANSWER',
105
+ __typename: 'convassist_nls_tool_NLSToolAsstRespData',
106
+ },
107
+ __typename: 'convassist_AsstResponseData',
108
+ },
109
+ __typename: 'convassist_MessageData',
110
+ },
111
+ type: 'ASST_RESPONSE',
112
+ __typename: 'convassist_MessagePayload',
113
+ },
114
+ ],
115
+ __typename: 'convassist_SendMessageResponse',
116
+ },
117
+ },
118
+ }),
119
+ );
120
+ const viewConfig: BodylessConversationViewConfig = {
121
+ worksheetId: 'worksheetId',
122
+ };
123
+
124
+ const conversationEmbed = new BodylessConversation(viewConfig);
125
+ const result = await conversationEmbed.sendMessage('userMessage');
126
+ console.log(result.container);
127
+ const iframeSrc = getIFrameSrc(result.container);
128
+ expectUrlToHaveParamsWithValues(iframeSrc, {
129
+ sessionId: 'sessionId',
130
+ genNo: 2,
131
+ acSessionId: 'transactionId',
132
+ acGenNo: 1,
133
+ });
134
+
135
+ fetchMock.mockRejectOnce(
136
+ new Error('error'),
137
+ );
138
+ const errorResult = await conversationEmbed.sendMessage('userMessage');
139
+ expect(errorResult.error instanceof Error).toBeTruthy();
140
+ });
141
+ });