@thoughtspot/visual-embed-sdk 1.45.2 → 1.45.3-mcp.2

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 (250) hide show
  1. package/cjs/package.json +2 -2
  2. package/cjs/src/css-variables.d.ts +48 -0
  3. package/cjs/src/css-variables.d.ts.map +1 -1
  4. package/cjs/src/embed/app.d.ts +37 -0
  5. package/cjs/src/embed/app.d.ts.map +1 -1
  6. package/cjs/src/embed/app.js +37 -1
  7. package/cjs/src/embed/app.js.map +1 -1
  8. package/cjs/src/embed/app.spec.js +24 -0
  9. package/cjs/src/embed/app.spec.js.map +1 -1
  10. package/cjs/src/embed/auto-frame-renderer.d.ts +3 -0
  11. package/cjs/src/embed/auto-frame-renderer.d.ts.map +1 -0
  12. package/cjs/src/embed/auto-frame-renderer.js +70 -0
  13. package/cjs/src/embed/auto-frame-renderer.js.map +1 -0
  14. package/cjs/src/embed/base.d.ts.map +1 -1
  15. package/cjs/src/embed/base.js.map +1 -1
  16. package/cjs/src/embed/conversation.d.ts +128 -10
  17. package/cjs/src/embed/conversation.d.ts.map +1 -1
  18. package/cjs/src/embed/conversation.js +41 -18
  19. package/cjs/src/embed/conversation.js.map +1 -1
  20. package/cjs/src/embed/conversation.spec.js +96 -3
  21. package/cjs/src/embed/conversation.spec.js.map +1 -1
  22. package/cjs/src/embed/liveboard.d.ts +38 -1
  23. package/cjs/src/embed/liveboard.d.ts.map +1 -1
  24. package/cjs/src/embed/liveboard.js +38 -10
  25. package/cjs/src/embed/liveboard.js.map +1 -1
  26. package/cjs/src/embed/liveboard.spec.js +179 -7
  27. package/cjs/src/embed/liveboard.spec.js.map +1 -1
  28. package/cjs/src/embed/searchEmbed-basic-auth.spec.d.ts +2 -0
  29. package/cjs/src/embed/searchEmbed-basic-auth.spec.d.ts.map +1 -0
  30. package/cjs/src/embed/searchEmbed-basic-auth.spec.js +104 -0
  31. package/cjs/src/embed/searchEmbed-basic-auth.spec.js.map +1 -0
  32. package/cjs/src/errors.d.ts +1 -0
  33. package/cjs/src/errors.d.ts.map +1 -1
  34. package/cjs/src/errors.js +1 -0
  35. package/cjs/src/errors.js.map +1 -1
  36. package/cjs/src/index.d.ts +4 -3
  37. package/cjs/src/index.d.ts.map +1 -1
  38. package/cjs/src/index.js +3 -1
  39. package/cjs/src/index.js.map +1 -1
  40. package/cjs/src/types.d.ts +196 -41
  41. package/cjs/src/types.d.ts.map +1 -1
  42. package/cjs/src/types.js +185 -19
  43. package/cjs/src/types.js.map +1 -1
  44. package/cjs/src/utils/answerService/answerService.d.ts +34 -0
  45. package/cjs/src/utils/answerService/answerService.d.ts.map +1 -0
  46. package/cjs/src/utils/answerService/answerService.js +142 -0
  47. package/cjs/src/utils/answerService/answerService.js.map +1 -0
  48. package/cjs/src/utils/answerService/answerService.spec.d.ts +1 -0
  49. package/cjs/src/utils/answerService/answerService.spec.d.ts.map +1 -0
  50. package/cjs/src/utils/answerService/answerService.spec.js +1 -0
  51. package/cjs/src/utils/answerService/answerService.spec.js.map +1 -0
  52. package/cjs/src/utils/answerService/graphql-queries.d.ts +6 -0
  53. package/cjs/src/utils/answerService/graphql-queries.d.ts.map +1 -0
  54. package/cjs/src/utils/answerService/graphql-queries.js +123 -0
  55. package/cjs/src/utils/answerService/graphql-queries.js.map +1 -0
  56. package/cjs/src/utils/answerService.d.ts +10 -0
  57. package/cjs/src/utils/answerService.d.ts.map +1 -0
  58. package/cjs/src/utils/answerService.js +61 -0
  59. package/cjs/src/utils/answerService.js.map +1 -0
  60. package/cjs/src/utils/answerService.spec.d.ts +2 -0
  61. package/cjs/src/utils/answerService.spec.d.ts.map +1 -0
  62. package/cjs/src/utils/answerService.spec.js +31 -0
  63. package/cjs/src/utils/answerService.spec.js.map +1 -0
  64. package/cjs/src/utils/authService.d.ts +37 -0
  65. package/cjs/src/utils/authService.d.ts.map +1 -0
  66. package/cjs/src/utils/authService.js +106 -0
  67. package/cjs/src/utils/authService.js.map +1 -0
  68. package/cjs/src/utils/authService.spec.d.ts +2 -0
  69. package/cjs/src/utils/authService.spec.d.ts.map +1 -0
  70. package/cjs/src/utils/authService.spec.js +72 -0
  71. package/cjs/src/utils/authService.spec.js.map +1 -0
  72. package/cjs/src/utils/graphql/answerService/answer-queries.d.ts +1 -0
  73. package/cjs/src/utils/graphql/answerService/answer-queries.d.ts.map +1 -1
  74. package/cjs/src/utils/graphql/answerService/answer-queries.js +23 -1
  75. package/cjs/src/utils/graphql/answerService/answer-queries.js.map +1 -1
  76. package/cjs/src/utils/graphql/answerService/answerService.d.ts +2 -1
  77. package/cjs/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
  78. package/cjs/src/utils/graphql/answerService/answerService.js +9 -1
  79. package/cjs/src/utils/graphql/answerService/answerService.js.map +1 -1
  80. package/cjs/src/utils/graphql/answerService/answerService.spec.js +73 -0
  81. package/cjs/src/utils/graphql/answerService/answerService.spec.js.map +1 -1
  82. package/cjs/src/utils/graphql/answerService/graphql-queries.d.ts +5 -0
  83. package/cjs/src/utils/graphql/answerService/graphql-queries.d.ts.map +1 -0
  84. package/cjs/src/utils/graphql/answerService/graphql-queries.js +80 -0
  85. package/cjs/src/utils/graphql/answerService/graphql-queries.js.map +1 -0
  86. package/cjs/src/utils/graphql/conversationService/conversation-queries.d.ts +3 -0
  87. package/cjs/src/utils/graphql/conversationService/conversation-queries.d.ts.map +1 -0
  88. package/cjs/src/utils/graphql/conversationService/conversation-queries.js +318 -0
  89. package/cjs/src/utils/graphql/conversationService/conversation-queries.js.map +1 -0
  90. package/cjs/src/utils/graphql/conversationService/conversation-service.d.ts +12 -0
  91. package/cjs/src/utils/graphql/conversationService/conversation-service.d.ts.map +1 -0
  92. package/cjs/src/utils/graphql/conversationService/conversation-service.js +89 -0
  93. package/cjs/src/utils/graphql/conversationService/conversation-service.js.map +1 -0
  94. package/cjs/src/utils/graphql/spotterService/conversation-queries.d.ts +3 -0
  95. package/cjs/src/utils/graphql/spotterService/conversation-queries.d.ts.map +1 -0
  96. package/cjs/src/utils/graphql/spotterService/conversation-queries.js +318 -0
  97. package/cjs/src/utils/graphql/spotterService/conversation-queries.js.map +1 -0
  98. package/cjs/src/utils/graphql/spotterService/conversation-service.d.ts +12 -0
  99. package/cjs/src/utils/graphql/spotterService/conversation-service.d.ts.map +1 -0
  100. package/cjs/src/utils/graphql/spotterService/conversation-service.js +89 -0
  101. package/cjs/src/utils/graphql/spotterService/conversation-service.js.map +1 -0
  102. package/cjs/src/utils/graphql/spotterService/nls-answer-queries.d.ts +2 -0
  103. package/cjs/src/utils/graphql/spotterService/nls-answer-queries.d.ts.map +1 -0
  104. package/cjs/src/utils/graphql/spotterService/nls-answer-queries.js +403 -0
  105. package/cjs/src/utils/graphql/spotterService/nls-answer-queries.js.map +1 -0
  106. package/cjs/src/utils/graphql/spotterService/nls-answer-service.d.ts +12 -0
  107. package/cjs/src/utils/graphql/spotterService/nls-answer-service.d.ts.map +1 -0
  108. package/cjs/src/utils/graphql/spotterService/nls-answer-service.js +55 -0
  109. package/cjs/src/utils/graphql/spotterService/nls-answer-service.js.map +1 -0
  110. package/cjs/src/utils.d.ts +15 -0
  111. package/cjs/src/utils.d.ts.map +1 -1
  112. package/cjs/src/utils.js +33 -1
  113. package/cjs/src/utils.js.map +1 -1
  114. package/cjs/src/utils.spec.js +49 -0
  115. package/cjs/src/utils.spec.js.map +1 -1
  116. package/dist/{index-BdkKLLo1.js → index-0serzuii.js} +1 -1
  117. package/dist/index-CqrIh3Vj.js +7370 -0
  118. package/dist/index-aFN9fe8V.js +7371 -0
  119. package/dist/src/css-variables.d.ts +48 -0
  120. package/dist/src/css-variables.d.ts.map +1 -1
  121. package/dist/src/embed/app.d.ts +37 -0
  122. package/dist/src/embed/app.d.ts.map +1 -1
  123. package/dist/src/embed/auto-frame-renderer.d.ts +3 -0
  124. package/dist/src/embed/auto-frame-renderer.d.ts.map +1 -0
  125. package/dist/src/embed/base.d.ts.map +1 -1
  126. package/dist/src/embed/conversation.d.ts +128 -10
  127. package/dist/src/embed/conversation.d.ts.map +1 -1
  128. package/dist/src/embed/liveboard.d.ts +38 -1
  129. package/dist/src/embed/liveboard.d.ts.map +1 -1
  130. package/dist/src/errors.d.ts +1 -0
  131. package/dist/src/errors.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/types.d.ts +196 -41
  135. package/dist/src/types.d.ts.map +1 -1
  136. package/dist/src/utils/graphql/answerService/answer-queries.d.ts +1 -0
  137. package/dist/src/utils/graphql/answerService/answer-queries.d.ts.map +1 -1
  138. package/dist/src/utils/graphql/answerService/answerService.d.ts +2 -1
  139. package/dist/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
  140. package/dist/src/utils.d.ts +15 -0
  141. package/dist/src/utils.d.ts.map +1 -1
  142. package/dist/tsembed-react.es.js +365 -52
  143. package/dist/tsembed-react.js +364 -51
  144. package/dist/tsembed.es.js +429 -53
  145. package/dist/tsembed.js +428 -51
  146. package/dist/visual-embed-sdk-react-full.d.ts +697 -343
  147. package/dist/visual-embed-sdk-react.d.ts +686 -332
  148. package/dist/visual-embed-sdk.d.ts +761 -380
  149. package/lib/package.json +2 -2
  150. package/lib/src/css-variables.d.ts +48 -0
  151. package/lib/src/css-variables.d.ts.map +1 -1
  152. package/lib/src/embed/app.d.ts +37 -0
  153. package/lib/src/embed/app.d.ts.map +1 -1
  154. package/lib/src/embed/app.js +39 -3
  155. package/lib/src/embed/app.js.map +1 -1
  156. package/lib/src/embed/app.spec.js +24 -0
  157. package/lib/src/embed/app.spec.js.map +1 -1
  158. package/lib/src/embed/auto-frame-renderer.d.ts +3 -0
  159. package/lib/src/embed/auto-frame-renderer.d.ts.map +1 -0
  160. package/lib/src/embed/auto-frame-renderer.js +66 -0
  161. package/lib/src/embed/auto-frame-renderer.js.map +1 -0
  162. package/lib/src/embed/base.d.ts.map +1 -1
  163. package/lib/src/embed/base.js.map +1 -1
  164. package/lib/src/embed/conversation.d.ts +128 -10
  165. package/lib/src/embed/conversation.d.ts.map +1 -1
  166. package/lib/src/embed/conversation.js +42 -19
  167. package/lib/src/embed/conversation.js.map +1 -1
  168. package/lib/src/embed/conversation.spec.js +96 -3
  169. package/lib/src/embed/conversation.spec.js.map +1 -1
  170. package/lib/src/embed/liveboard.d.ts +38 -1
  171. package/lib/src/embed/liveboard.d.ts.map +1 -1
  172. package/lib/src/embed/liveboard.js +39 -11
  173. package/lib/src/embed/liveboard.js.map +1 -1
  174. package/lib/src/embed/liveboard.spec.js +179 -7
  175. package/lib/src/embed/liveboard.spec.js.map +1 -1
  176. package/lib/src/embed/searchEmbed-basic-auth.spec.d.ts +2 -0
  177. package/lib/src/embed/searchEmbed-basic-auth.spec.d.ts.map +1 -0
  178. package/lib/src/embed/searchEmbed-basic-auth.spec.js +101 -0
  179. package/lib/src/embed/searchEmbed-basic-auth.spec.js.map +1 -0
  180. package/lib/src/errors.d.ts +1 -0
  181. package/lib/src/errors.d.ts.map +1 -1
  182. package/lib/src/errors.js +1 -0
  183. package/lib/src/errors.js.map +1 -1
  184. package/lib/src/index.d.ts +4 -3
  185. package/lib/src/index.d.ts.map +1 -1
  186. package/lib/src/index.js +1 -0
  187. package/lib/src/index.js.map +1 -1
  188. package/lib/src/types.d.ts +196 -41
  189. package/lib/src/types.d.ts.map +1 -1
  190. package/lib/src/types.js +185 -19
  191. package/lib/src/types.js.map +1 -1
  192. package/lib/src/utils/graphql/answerService/answer-queries.d.ts +1 -0
  193. package/lib/src/utils/graphql/answerService/answer-queries.d.ts.map +1 -1
  194. package/lib/src/utils/graphql/answerService/answer-queries.js +22 -0
  195. package/lib/src/utils/graphql/answerService/answer-queries.js.map +1 -1
  196. package/lib/src/utils/graphql/answerService/answerService.d.ts +2 -1
  197. package/lib/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
  198. package/lib/src/utils/graphql/answerService/answerService.js +9 -1
  199. package/lib/src/utils/graphql/answerService/answerService.js.map +1 -1
  200. package/lib/src/utils/graphql/answerService/answerService.spec.js +73 -0
  201. package/lib/src/utils/graphql/answerService/answerService.spec.js.map +1 -1
  202. package/lib/src/utils/graphql/conversationService/conversation-queries.d.ts +3 -0
  203. package/lib/src/utils/graphql/conversationService/conversation-queries.d.ts.map +1 -0
  204. package/lib/src/utils/graphql/conversationService/conversation-queries.js +315 -0
  205. package/lib/src/utils/graphql/conversationService/conversation-queries.js.map +1 -0
  206. package/lib/src/utils/graphql/conversationService/conversation-service.d.ts +12 -0
  207. package/lib/src/utils/graphql/conversationService/conversation-service.d.ts.map +1 -0
  208. package/lib/src/utils/graphql/conversationService/conversation-service.js +84 -0
  209. package/lib/src/utils/graphql/conversationService/conversation-service.js.map +1 -0
  210. package/lib/src/utils/graphql/spotterService/conversation-queries.d.ts +3 -0
  211. package/lib/src/utils/graphql/spotterService/conversation-queries.d.ts.map +1 -0
  212. package/lib/src/utils/graphql/spotterService/conversation-queries.js +315 -0
  213. package/lib/src/utils/graphql/spotterService/conversation-queries.js.map +1 -0
  214. package/lib/src/utils/graphql/spotterService/conversation-service.d.ts +12 -0
  215. package/lib/src/utils/graphql/spotterService/conversation-service.d.ts.map +1 -0
  216. package/lib/src/utils/graphql/spotterService/conversation-service.js +84 -0
  217. package/lib/src/utils/graphql/spotterService/conversation-service.js.map +1 -0
  218. package/lib/src/utils/graphql/spotterService/nls-answer-queries.d.ts +2 -0
  219. package/lib/src/utils/graphql/spotterService/nls-answer-queries.d.ts.map +1 -0
  220. package/lib/src/utils/graphql/spotterService/nls-answer-queries.js +400 -0
  221. package/lib/src/utils/graphql/spotterService/nls-answer-queries.js.map +1 -0
  222. package/lib/src/utils/graphql/spotterService/nls-answer-service.d.ts +12 -0
  223. package/lib/src/utils/graphql/spotterService/nls-answer-service.d.ts.map +1 -0
  224. package/lib/src/utils/graphql/spotterService/nls-answer-service.js +50 -0
  225. package/lib/src/utils/graphql/spotterService/nls-answer-service.js.map +1 -0
  226. package/lib/src/utils.d.ts +15 -0
  227. package/lib/src/utils.d.ts.map +1 -1
  228. package/lib/src/utils.js +30 -0
  229. package/lib/src/utils.js.map +1 -1
  230. package/lib/src/utils.spec.js +50 -1
  231. package/lib/src/utils.spec.js.map +1 -1
  232. package/lib/src/visual-embed-sdk.d.ts +7186 -0
  233. package/package.json +3 -3
  234. package/src/css-variables.ts +60 -0
  235. package/src/embed/app.spec.ts +32 -0
  236. package/src/embed/app.ts +97 -1
  237. package/src/embed/auto-frame-renderer.ts +78 -0
  238. package/src/embed/base.ts +1 -0
  239. package/src/embed/conversation.spec.ts +117 -3
  240. package/src/embed/conversation.ts +189 -30
  241. package/src/embed/liveboard.spec.ts +264 -10
  242. package/src/embed/liveboard.ts +100 -11
  243. package/src/errors.ts +1 -0
  244. package/src/index.ts +8 -1
  245. package/src/types.ts +198 -42
  246. package/src/utils/graphql/answerService/answer-queries.ts +23 -0
  247. package/src/utils/graphql/answerService/answerService.spec.ts +87 -0
  248. package/src/utils/graphql/answerService/answerService.ts +13 -1
  249. package/src/utils.spec.ts +56 -0
  250. package/src/utils.ts +36 -0
@@ -1,4 +1,4 @@
1
- /* @thoughtspot/visual-embed-sdk version 1.45.2 */
1
+ /* @thoughtspot/visual-embed-sdk version 1.45.3-mcp.2 */
2
2
  'use client';
3
3
  function _mergeNamespaces(n, m) {
4
4
  m.forEach(function (e) {
@@ -1677,6 +1677,42 @@ var EmbedEvent;
1677
1677
  * @version SDK: 1.43.0 | ThoughtSpot: 10.15.0.cl
1678
1678
  */
1679
1679
  EmbedEvent["ApiIntercept"] = "ApiIntercept";
1680
+ /**
1681
+ * Emitted when a Spotter conversation is renamed.
1682
+ * @example
1683
+ * ```js
1684
+ * spotterEmbed.on(EmbedEvent.SpotterConversationRenamed, (payload) => {
1685
+ * console.log('Conversation renamed', payload);
1686
+ * // payload: { convId: string, oldTitle: string, newTitle: string }
1687
+ * })
1688
+ * ```
1689
+ * @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl
1690
+ */
1691
+ EmbedEvent["SpotterConversationRenamed"] = "spotterConversationRenamed";
1692
+ /**
1693
+ * Emitted when a Spotter conversation is deleted.
1694
+ * @example
1695
+ * ```js
1696
+ * spotterEmbed.on(EmbedEvent.SpotterConversationDeleted, (payload) => {
1697
+ * console.log('Conversation deleted', payload);
1698
+ * // payload: { convId: string, title: string }
1699
+ * })
1700
+ * ```
1701
+ * @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl
1702
+ */
1703
+ EmbedEvent["SpotterConversationDeleted"] = "spotterConversationDeleted";
1704
+ /**
1705
+ * Emitted when a Spotter conversation is selected/clicked.
1706
+ * @example
1707
+ * ```js
1708
+ * spotterEmbed.on(EmbedEvent.SpotterConversationSelected, (payload) => {
1709
+ * console.log('Conversation selected', payload);
1710
+ * // payload: { convId: string, title: string, worksheetId: string }
1711
+ * })
1712
+ * ```
1713
+ * @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl
1714
+ */
1715
+ EmbedEvent["SpotterConversationSelected"] = "spotterConversationSelected";
1680
1716
  /**
1681
1717
  * @hidden
1682
1718
  * Emitted when the auth token is about to get expired and needs to be refreshed.
@@ -3109,6 +3145,7 @@ var DataSourceVisualMode;
3109
3145
  */
3110
3146
  var Param;
3111
3147
  (function (Param) {
3148
+ Param["Tsmcp"] = "tsmcp";
3112
3149
  Param["EmbedApp"] = "embedApp";
3113
3150
  Param["DataSources"] = "dataSources";
3114
3151
  Param["DataSourceMode"] = "dataSourceMode";
@@ -3239,7 +3276,19 @@ var Param;
3239
3276
  Param["isLinkParametersEnabled"] = "isLinkParametersEnabled";
3240
3277
  Param["EnablePastConversationsSidebar"] = "enablePastConversationsSidebar";
3241
3278
  Param["UpdatedSpotterChatPrompt"] = "updatedSpotterChatPrompt";
3279
+ Param["SpotterSidebarTitle"] = "spotterSidebarTitle";
3280
+ Param["SpotterSidebarDefaultExpanded"] = "spotterSidebarDefaultExpanded";
3281
+ Param["SpotterChatRenameLabel"] = "spotterChatRenameLabel";
3282
+ Param["SpotterChatDeleteLabel"] = "spotterChatDeleteLabel";
3283
+ Param["SpotterDeleteConversationModalTitle"] = "spotterDeleteConversationModalTitle";
3284
+ Param["SpotterPastConversationAlertMessage"] = "spotterPastConversationAlertMessage";
3285
+ Param["SpotterDocumentationUrl"] = "spotterDocumentationUrl";
3286
+ Param["SpotterBestPracticesLabel"] = "spotterBestPracticesLabel";
3287
+ Param["SpotterConversationsBatchSize"] = "spotterConversationsBatchSize";
3288
+ Param["SpotterNewChatButtonTitle"] = "spotterNewChatButtonTitle";
3242
3289
  Param["IsThisPeriodInDateFiltersEnabled"] = "isThisPeriodInDateFiltersEnabled";
3290
+ Param["HideToolResponseCardBranding"] = "hideToolResponseCardBranding";
3291
+ Param["ToolResponseCardBrandingLabel"] = "toolResponseCardBrandingLabel";
3243
3292
  })(Param || (Param = {}));
3244
3293
  /**
3245
3294
  * ThoughtSpot application pages include actions and menu commands
@@ -4665,6 +4714,96 @@ var Action;
4665
4714
  * @version SDK: 1.44.0 | ThoughtSpot Cloud: 26.2.0.cl
4666
4715
  */
4667
4716
  Action["UngroupLiveboardGroup"] = "ungroupLiveboardGroup";
4717
+ /**
4718
+ * Controls visibility of the sidebar header (title and toggle button)
4719
+ * in the Spotter past conversations sidebar.
4720
+ * @example
4721
+ * ```js
4722
+ * hiddenActions: [Action.SpotterSidebarHeader]
4723
+ * ```
4724
+ * @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
4725
+ */
4726
+ Action["SpotterSidebarHeader"] = "spotterSidebarHeader";
4727
+ /**
4728
+ * Controls visibility of the sidebar footer (documentation link)
4729
+ * in the Spotter past conversations sidebar.
4730
+ * @example
4731
+ * ```js
4732
+ * hiddenActions: [Action.SpotterSidebarFooter]
4733
+ * ```
4734
+ * @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
4735
+ */
4736
+ Action["SpotterSidebarFooter"] = "spotterSidebarFooter";
4737
+ /**
4738
+ * Controls visibility and disable state of the sidebar toggle/expand button
4739
+ * in the Spotter past conversations sidebar.
4740
+ * @example
4741
+ * ```js
4742
+ * disabledActions: [Action.SpotterSidebarToggle]
4743
+ * ```
4744
+ * @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
4745
+ */
4746
+ Action["SpotterSidebarToggle"] = "spotterSidebarToggle";
4747
+ /**
4748
+ * Controls visibility and disable state of the "New Chat" button
4749
+ * in the Spotter past conversations sidebar.
4750
+ * @example
4751
+ * ```js
4752
+ * disabledActions: [Action.SpotterNewChat]
4753
+ * ```
4754
+ * @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
4755
+ */
4756
+ Action["SpotterNewChat"] = "spotterNewChat";
4757
+ /**
4758
+ * Controls visibility of the past conversation banner alert
4759
+ * in the Spotter interface.
4760
+ * @example
4761
+ * ```js
4762
+ * hiddenActions: [Action.SpotterPastChatBanner]
4763
+ * ```
4764
+ * @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
4765
+ */
4766
+ Action["SpotterPastChatBanner"] = "spotterPastChatBanner";
4767
+ /**
4768
+ * Controls visibility and disable state of the conversation edit menu
4769
+ * (three-dot menu) in the Spotter past conversations sidebar.
4770
+ * @example
4771
+ * ```js
4772
+ * disabledActions: [Action.SpotterChatMenu]
4773
+ * ```
4774
+ * @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
4775
+ */
4776
+ Action["SpotterChatMenu"] = "spotterChatMenu";
4777
+ /**
4778
+ * Controls visibility and disable state of the rename action
4779
+ * in the Spotter conversation edit menu.
4780
+ * @example
4781
+ * ```js
4782
+ * disabledActions: [Action.SpotterChatRename]
4783
+ * ```
4784
+ * @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
4785
+ */
4786
+ Action["SpotterChatRename"] = "spotterChatRename";
4787
+ /**
4788
+ * Controls visibility and disable state of the delete action
4789
+ * in the Spotter conversation edit menu.
4790
+ * @example
4791
+ * ```js
4792
+ * disabledActions: [Action.SpotterChatDelete]
4793
+ * ```
4794
+ * @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
4795
+ */
4796
+ Action["SpotterChatDelete"] = "spotterChatDelete";
4797
+ /**
4798
+ * Controls visibility and disable state of the documentation/best practices
4799
+ * link in the Spotter sidebar footer.
4800
+ * @example
4801
+ * ```js
4802
+ * disabledActions: [Action.SpotterDocs]
4803
+ * ```
4804
+ * @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
4805
+ */
4806
+ Action["SpotterDocs"] = "spotterDocs";
4668
4807
  /**
4669
4808
  * The **Include current period** checkbox for date filters.
4670
4809
  * Controls the visibility and availability of the option to include
@@ -4803,13 +4942,30 @@ var LogLevel;
4803
4942
  * Error types emitted by embedded components.
4804
4943
  *
4805
4944
  * These enum values categorize different types of errors that can occur during
4806
- * the lifecycle of an embedded ThoughtSpot component. Use these values to implement
4807
- * specific error handling logic based on the error category.
4808
- *
4809
- * @see {@link EmbedErrorDetailsEvent} - The error event object structure
4810
- * @see {@link EmbedEvent.Error} - The event that emits these errors
4945
+ * the lifecycle of an embedded ThoughtSpot component.
4946
+ * Use {@link EmbedErrorDetailsEvent} and {@link EmbedErrorCodes} to handle specific errors.
4811
4947
  * @version SDK: 1.44.2 | ThoughtSpot: 26.2.0.cl
4812
4948
  * @group Error Handling
4949
+ *
4950
+ * @example
4951
+ * Handle specific error types
4952
+ * ```js
4953
+ * embed.on(EmbedEvent.Error, (error) => {
4954
+ * switch (error.errorType) {
4955
+ * case ErrorDetailsTypes.API:
4956
+ * console.error('API error:', error.message);
4957
+ * break;
4958
+ * case ErrorDetailsTypes.VALIDATION_ERROR:
4959
+ * console.error('Validation error:', error.message);
4960
+ * break;
4961
+ * case ErrorDetailsTypes.NETWORK:
4962
+ * console.error('Network error:', error.message);
4963
+ * break;
4964
+ * default:
4965
+ * console.error('Unknown error:', error);
4966
+ * }
4967
+ * });
4968
+ * ```
4813
4969
  */
4814
4970
  var ErrorDetailsTypes;
4815
4971
  (function (ErrorDetailsTypes) {
@@ -4821,35 +4977,43 @@ var ErrorDetailsTypes;
4821
4977
  ErrorDetailsTypes["NETWORK"] = "NETWORK";
4822
4978
  })(ErrorDetailsTypes || (ErrorDetailsTypes = {}));
4823
4979
  /**
4824
- * Error codes for identifying specific issues in embedded ThoughtSpot components.
4825
- *
4826
- * Use these codes for precise error handling and debugging. Each code maps to a
4827
- * distinct failure scenario, enabling targeted recovery strategies.
4980
+ * Error codes for identifying specific issues in embedded ThoughtSpot components. Use {@link EmbedErrorDetailsEvent} and {@link ErrorDetailsTypes} codes for precise error handling and debugging.
4828
4981
  *
4829
4982
  * @version SDK: 1.44.2 | ThoughtSpot: 26.2.0.cl
4830
4983
  * @group Error Handling
4831
- *
4832
- * @see {@link EmbedErrorDetailsEvent} - The error event object that includes these codes
4833
- * @see {@link ErrorDetailsTypes} - General error type categories
4834
- *
4984
+
4835
4985
  * @example
4836
4986
  * Handle specific error codes in the error event handler
4837
- *
4987
+ * ```js
4838
4988
  * embed.on(EmbedEvent.Error, (error) => {
4839
- * if (error.code === EmbedErrorCodes.WORKSHEET_ID_NOT_FOUND) {
4840
- * console.error('Worksheet ID not found:', error.message);
4989
+ * switch (error.code) {
4990
+ * case EmbedErrorCodes.WORKSHEET_ID_NOT_FOUND:
4991
+ * console.error('Worksheet ID not found:', error.message);
4992
+ * break;
4993
+ * case EmbedErrorCodes.LIVEBOARD_ID_MISSING:
4994
+ * console.error('Liveboard ID is missing:', error.message);
4995
+ * break;
4996
+ * case EmbedErrorCodes.CONFLICTING_ACTIONS_CONFIG:
4997
+ * console.error('Conflicting actions configuration:', error.message);
4998
+ * break;
4999
+ * case EmbedErrorCodes.CONFLICTING_TABS_CONFIG:
5000
+ * console.error('Conflicting tabs configuration:', error.message);
5001
+ * break;
5002
+ * default:
5003
+ * console.error('Unknown error:', error);
4841
5004
  * }
4842
5005
  * });
4843
- * */
5006
+ * ```
5007
+ * */
4844
5008
  var EmbedErrorCodes;
4845
5009
  (function (EmbedErrorCodes) {
4846
5010
  /** Worksheet ID not found or does not exist */
4847
5011
  EmbedErrorCodes["WORKSHEET_ID_NOT_FOUND"] = "WORKSHEET_ID_NOT_FOUND";
4848
5012
  /** Required Liveboard ID is missing from configuration */
4849
5013
  EmbedErrorCodes["LIVEBOARD_ID_MISSING"] = "LIVEBOARD_ID_MISSING";
4850
- /** Conflicting action configuration detected (e.g., both hiddenActions and visibleActions specified) */
5014
+ /** Conflicting action configuration detected */
4851
5015
  EmbedErrorCodes["CONFLICTING_ACTIONS_CONFIG"] = "CONFLICTING_ACTIONS_CONFIG";
4852
- /** Conflicting tab configuration detected (e.g., both hiddenTabs and visibleTabs specified) */
5016
+ /** Conflicting tab configuration detected */
4853
5017
  EmbedErrorCodes["CONFLICTING_TABS_CONFIG"] = "CONFLICTING_TABS_CONFIG";
4854
5018
  /** Error during component initialization */
4855
5019
  EmbedErrorCodes["INIT_ERROR"] = "INIT_ERROR";
@@ -4867,6 +5031,8 @@ var EmbedErrorCodes;
4867
5031
  EmbedErrorCodes["PARSING_API_INTERCEPT_BODY_ERROR"] = "PARSING_API_INTERCEPT_BODY_ERROR";
4868
5032
  /** Failed to update embed parameters during pre-render */
4869
5033
  EmbedErrorCodes["UPDATE_PARAMS_FAILED"] = "UPDATE_PARAMS_FAILED";
5034
+ /** Invalid URL provided in configuration */
5035
+ EmbedErrorCodes["INVALID_URL"] = "INVALID_URL";
4870
5036
  })(EmbedErrorCodes || (EmbedErrorCodes = {}));
4871
5037
  var ContextType;
4872
5038
  (function (ContextType) {
@@ -5060,6 +5226,7 @@ const ERROR_MESSAGE = {
5060
5226
  ERROR_PARSING_API_INTERCEPT_BODY: 'Error parsing api intercept body',
5061
5227
  SSR_ENVIRONMENT_ERROR: 'SSR environment detected. This function cannot be called in SSR environment.',
5062
5228
  UPDATE_PARAMS_FAILED: 'Failed to update embed parameters',
5229
+ INVALID_SPOTTER_DOCUMENTATION_URL: 'Invalid spotterDocumentationUrl. Please provide a valid http or https URL.',
5063
5230
  };
5064
5231
  const CUSTOM_ACTIONS_ERROR_MESSAGE = {
5065
5232
  INVALID_ACTION_OBJECT: 'Custom Action Validation Error: Invalid action object provided',
@@ -5544,6 +5711,36 @@ const isWindowUndefined = () => {
5544
5711
  return true;
5545
5712
  }
5546
5713
  return false;
5714
+ };
5715
+ /**
5716
+ * Validates that a URL uses only http: or https: protocols.
5717
+ * Returns a tuple of [isValid, error] so the caller can handle validation errors.
5718
+ * @param url - The URL string to validate
5719
+ * @returns [true, null] if valid, [false, Error] if invalid
5720
+ */
5721
+ const validateHttpUrl = (url) => {
5722
+ try {
5723
+ const parsedUrl = new URL(url);
5724
+ if (parsedUrl.protocol !== 'http:' && parsedUrl.protocol !== 'https:') {
5725
+ return [false, new Error(`Invalid protocol: ${parsedUrl.protocol}. Only http: and https: are allowed.`)];
5726
+ }
5727
+ return [true, null];
5728
+ }
5729
+ catch (error) {
5730
+ return [false, error instanceof Error ? error : new Error(String(error))];
5731
+ }
5732
+ };
5733
+ /**
5734
+ * Sets a query parameter if the value is defined.
5735
+ * @param queryParams - The query params object to modify
5736
+ * @param param - The parameter key
5737
+ * @param value - The value to set
5738
+ * @param asBoolean - If true, coerces value to boolean
5739
+ */
5740
+ const setParamIfDefined = (queryParams, param, value, asBoolean = false) => {
5741
+ if (value !== undefined) {
5742
+ queryParams[param] = asBoolean ? !!value : value;
5743
+ }
5547
5744
  };
5548
5745
 
5549
5746
  /**
@@ -8404,6 +8601,28 @@ const getSQLQuery = `
8404
8601
  }
8405
8602
  }
8406
8603
  `;
8604
+ const updateDisplayMode = `
8605
+ mutation UpdateDisplayMode(
8606
+ $session: BachSessionIdInput!
8607
+ $displayMode: DisplayMode
8608
+ ) {
8609
+ Answer__updateProperties(session: $session, displayMode: $displayMode) {
8610
+ id {
8611
+ sessionId
8612
+ genNo
8613
+ acSession {
8614
+ sessionId
8615
+ genNo
8616
+ }
8617
+ }
8618
+ answer {
8619
+ id
8620
+ displayMode
8621
+ suggestedDisplayMode
8622
+ }
8623
+ }
8624
+ }
8625
+ `;
8407
8626
  const getAnswerTML = `
8408
8627
  mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies: Boolean, $formatType: EDocFormatType, $exportPermissions: Boolean, $exportFqn: Boolean) {
8409
8628
  UnsavedAnswer_getTML(
@@ -8571,7 +8790,15 @@ class AnswerService {
8571
8790
  },
8572
8791
  });
8573
8792
  }
8574
- async getSQLQuery() {
8793
+ async updateDisplayMode(displayMode = "TABLE_MODE") {
8794
+ return this.executeQuery(updateDisplayMode, {
8795
+ displayMode,
8796
+ });
8797
+ }
8798
+ async getSQLQuery(fetchSQLWithAllColumns = false) {
8799
+ if (fetchSQLWithAllColumns) {
8800
+ await this.updateDisplayMode("TABLE_MODE");
8801
+ }
8575
8802
  const { sql } = await this.executeQuery(getSQLQuery, {});
8576
8803
  return sql;
8577
8804
  }
@@ -8727,7 +8954,7 @@ class AnswerService {
8727
8954
  async getTML() {
8728
8955
  const { object } = await this.executeQuery(getAnswerTML, {});
8729
8956
  const edoc = object[0].edoc;
8730
- const YAML = await import('./index-BdkKLLo1.js');
8957
+ const YAML = await import('./index-aFN9fe8V.js');
8731
8958
  const parsedDoc = YAML.parse(edoc);
8732
8959
  return {
8733
8960
  answer: {
@@ -18165,7 +18392,7 @@ function processEventData(type, eventData, thoughtSpotHost, containerEl) {
18165
18392
  return eventData;
18166
18393
  }
18167
18394
 
18168
- var name="@thoughtspot/visual-embed-sdk";var version$1="1.45.2";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p tsconfig.build.json --incremental false; tsc -p tsconfig.build.json --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle-generator --config ./dts-config/dts-bundle-file.config.js","bundle-dts":"dts-bundle-generator --config ./dts-config/dts-bundle.config.js","bundle-dts-react":"dts-bundle-generator --config ./dts-config/dts-bundle-react.config.js","bundle-dts-react-full":"dts-bundle-generator --config ./dts-config/dts-bundle-react-full.config.js",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.build.json --theme typedoc-theme --json static/typedoc/typedoc.json --disableOutputCheck","test-sdk":"jest -c jest.config.sdk.js --runInBand",test:"npm run test-sdk",posttest:"cat ./coverage/sdk/lcov.info | npx coveralls-next","is-publish-allowed":"node scripts/is-publish-allowed.js",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","check-size":"npm run build && size-limit","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest",dev:"vite -c vite.local.config.ts"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={classnames:"^2.3.1",eventemitter3:"^4.0.7",lodash:"^4.17.23","mixpanel-browser":"2.47.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1",yaml:"^2.5.1"};var devDependencies={"@mdx-js/mdx":"^1.6.22","@mdx-js/react":"^1.6.22","@react-icons/all-files":"^4.1.0","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^5.0.2","@size-limit/preset-big-lib":"^11.2.0","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^30.0.0","@types/lodash":"^4.17.0","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^8.28.0","@typescript-eslint/parser":"^8.28.0",ajv:"^8.17.1",asciidoctor:"^2.2.1","babel-jest":"^30.2.0","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1","coveralls-next":"^5.0.0",crypto:"^1.0.1","current-git-branch":"^1.1.0","dts-bundle-generator":"^9.5.1",eslint:"^9.23.0","eslint-config-airbnb-base":"^15.0.0","eslint-config-prettier":"^10.1.1","eslint-import-resolver-typescript":"^4.2.5","eslint-plugin-comment-length":"2.2.1","eslint-plugin-import":"^2.31.0","eslint-plugin-jsdoc":"^50.6.9","eslint-plugin-prettier":"^5.2.5","eslint-plugin-react":"^7.37.5","eslint-plugin-react-hooks":"^5.2.0","fs-extra":"^10.0.0","gh-pages":"6.3.0",globals:"^16.0.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^2.0.0",jest:"^30.2.0","jest-environment-jsdom":"^29.7.0","jest-fetch-mock":"^3.0.3",jsdom:"^17.0.0",prettier:"2.1.2",react:"^16.14.0","react-dom":"^16.14.0","react-resizable":"^1.11.0","react-resize-detector":"^6.6.0","react-test-renderer":"^17.0.2","react-use-flexsearch":"^0.1.1",rollup:"4.24.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^29.4.6","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","typescript-eslint":"^8.29.1","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^6.3.5"};var author="ThoughtSpot";var email="support@thoughtspot.com";var license="ThoughtSpot Development Tools End User License Agreement";var directories={lib:"lib"};var repository={type:"git",url:"git+https://github.com/thoughtspot/visual-embed-sdk.git"};var publishConfig={registry:"https://registry.npmjs.org"};var keywords=["thoughtspot","everywhere","embedded","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version$1,description:description,module:module,main:main,types:types,files:files,exports:exports,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.es.js",limit:"32 kB"}],scripts:scripts,peerDependencies:peerDependencies,dependencies:dependencies,devDependencies:devDependencies,author:author,email:email,license:license,directories:directories,repository:repository,publishConfig:publishConfig,keywords:keywords,bugs:bugs,homepage:homepage,globals:globals};
18395
+ var name="@thoughtspot/visual-embed-sdk";var version$1="1.45.3-mcp.2";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p tsconfig.build.json --incremental false; tsc -p tsconfig.build.json --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle-generator --config ./dts-config/dts-bundle-file.config.js","bundle-dts":"dts-bundle-generator --config ./dts-config/dts-bundle.config.js","bundle-dts-react":"dts-bundle-generator --config ./dts-config/dts-bundle-react.config.js","bundle-dts-react-full":"dts-bundle-generator --config ./dts-config/dts-bundle-react-full.config.js",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.build.json --theme typedoc-theme --json static/typedoc/typedoc.json --disableOutputCheck","test-sdk":"jest -c jest.config.sdk.js --runInBand",test:"npm run test-sdk",posttest:"cat ./coverage/sdk/lcov.info | npx coveralls-next","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && 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","check-size":"npm run build && size-limit","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest",dev:"vite -c vite.local.config.ts"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={classnames:"^2.3.1",eventemitter3:"^4.0.7",lodash:"^4.17.23","mixpanel-browser":"2.47.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1",yaml:"^2.5.1"};var devDependencies={"@mdx-js/mdx":"^1.6.22","@mdx-js/react":"^1.6.22","@react-icons/all-files":"^4.1.0","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^5.0.2","@size-limit/preset-big-lib":"^11.2.0","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^30.0.0","@types/lodash":"^4.17.0","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^8.28.0","@typescript-eslint/parser":"^8.28.0",ajv:"^8.17.1",asciidoctor:"^2.2.1","babel-jest":"^30.2.0","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1","coveralls-next":"^5.0.0",crypto:"^1.0.1","current-git-branch":"^1.1.0","dts-bundle-generator":"^9.5.1",eslint:"^9.23.0","eslint-config-airbnb-base":"^15.0.0","eslint-config-prettier":"^10.1.1","eslint-import-resolver-typescript":"^4.2.5","eslint-plugin-comment-length":"2.2.1","eslint-plugin-import":"^2.31.0","eslint-plugin-jsdoc":"^50.6.9","eslint-plugin-prettier":"^5.2.5","eslint-plugin-react":"^7.37.5","eslint-plugin-react-hooks":"^5.2.0","fs-extra":"^10.0.0","gh-pages":"6.3.0",globals:"^16.0.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^2.0.0",jest:"^30.2.0","jest-environment-jsdom":"^29.7.0","jest-fetch-mock":"^3.0.3",jsdom:"^17.0.0",prettier:"2.1.2",react:"^16.14.0","react-dom":"^16.14.0","react-resizable":"^1.11.0","react-resize-detector":"^6.6.0","react-test-renderer":"^17.0.2","react-use-flexsearch":"^0.1.1",rollup:"4.24.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^29.4.6","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","typescript-eslint":"^8.29.1","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^6.3.5"};var author="ThoughtSpot";var email="support@thoughtspot.com";var license="ThoughtSpot Development Tools End User License Agreement";var directories={lib:"lib"};var repository={type:"git",url:"git+https://github.com/thoughtspot/visual-embed-sdk.git"};var publishConfig={registry:"https://registry.npmjs.org"};var keywords=["thoughtspot","everywhere","embedded","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version$1,description:description,module:module,main:main,types:types,files:files,exports:exports,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.es.js",limit:"32 kB"}],scripts:scripts,peerDependencies:peerDependencies,dependencies:dependencies,devDependencies:devDependencies,author:author,email:email,license:license,directories:directories,repository:repository,publishConfig:publishConfig,keywords:keywords,bugs:bugs,homepage:homepage,globals:globals};
18169
18396
 
18170
18397
  class HostEventClient {
18171
18398
  constructor(iFrame) {
@@ -20131,7 +20358,7 @@ class AppEmbed extends V1Embed {
20131
20358
  * embedded Liveboard or visualization.
20132
20359
  */
20133
20360
  getEmbedParams() {
20134
- const { tag, hideTagFilterChips, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideHamburger, hideObjectSearch, hideNotification, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 = true, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, showMaskedFilterChip = false, isLiveboardMasterpiecesEnabled = false, hideHomepageLeftNav = false, modularHomeExperience = false, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, enable2ColumnLayout, enableCustomColumnGroups = false, dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, isEnhancedFilterInteractivityEnabled = false, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, discoveryExperience, coverAndFilterOptionInPDF = false, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, isLiveboardXLSXCSVDownloadEnabled = false, isGranularXLSXCSVSchedulesEnabled = false, isCentralizedLiveboardFilterUXEnabled = false, isLinkParametersEnabled, updatedSpotterChatPrompt, minimumHeight, isThisPeriodInDateFiltersEnabled, } = this.viewConfig;
20361
+ const { tag, hideTagFilterChips, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideHamburger, hideObjectSearch, hideNotification, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 = true, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, showMaskedFilterChip = false, isLiveboardMasterpiecesEnabled = false, hideHomepageLeftNav = false, modularHomeExperience = false, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, enable2ColumnLayout, enableCustomColumnGroups = false, dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, isEnhancedFilterInteractivityEnabled = false, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, discoveryExperience, coverAndFilterOptionInPDF = false, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, isLiveboardXLSXCSVDownloadEnabled = false, isGranularXLSXCSVSchedulesEnabled = false, isCentralizedLiveboardFilterUXEnabled = false, isLinkParametersEnabled, updatedSpotterChatPrompt, spotterSidebarConfig, spotterChatConfig, minimumHeight, isThisPeriodInDateFiltersEnabled, } = this.viewConfig;
20135
20362
  let params = {};
20136
20363
  params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
20137
20364
  params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
@@ -20155,6 +20382,41 @@ class AppEmbed extends V1Embed {
20155
20382
  if (!isUndefined$1(updatedSpotterChatPrompt)) {
20156
20383
  params[Param.UpdatedSpotterChatPrompt] = !!updatedSpotterChatPrompt;
20157
20384
  }
20385
+ // Handle spotterSidebarConfig params
20386
+ if (spotterSidebarConfig) {
20387
+ const { enablePastConversationsSidebar, spotterSidebarTitle, spotterSidebarDefaultExpanded, spotterChatRenameLabel, spotterChatDeleteLabel, spotterDeleteConversationModalTitle, spotterPastConversationAlertMessage, spotterDocumentationUrl, spotterBestPracticesLabel, spotterConversationsBatchSize, spotterNewChatButtonTitle, } = spotterSidebarConfig;
20388
+ setParamIfDefined(params, Param.EnablePastConversationsSidebar, enablePastConversationsSidebar, true);
20389
+ setParamIfDefined(params, Param.SpotterSidebarDefaultExpanded, spotterSidebarDefaultExpanded, true);
20390
+ setParamIfDefined(params, Param.SpotterSidebarTitle, spotterSidebarTitle);
20391
+ setParamIfDefined(params, Param.SpotterChatRenameLabel, spotterChatRenameLabel);
20392
+ setParamIfDefined(params, Param.SpotterChatDeleteLabel, spotterChatDeleteLabel);
20393
+ setParamIfDefined(params, Param.SpotterDeleteConversationModalTitle, spotterDeleteConversationModalTitle);
20394
+ setParamIfDefined(params, Param.SpotterPastConversationAlertMessage, spotterPastConversationAlertMessage);
20395
+ setParamIfDefined(params, Param.SpotterBestPracticesLabel, spotterBestPracticesLabel);
20396
+ setParamIfDefined(params, Param.SpotterConversationsBatchSize, spotterConversationsBatchSize);
20397
+ setParamIfDefined(params, Param.SpotterNewChatButtonTitle, spotterNewChatButtonTitle);
20398
+ // URL param with validation
20399
+ if (spotterDocumentationUrl !== undefined) {
20400
+ const [isValid, validationError] = validateHttpUrl(spotterDocumentationUrl);
20401
+ if (isValid) {
20402
+ params[Param.SpotterDocumentationUrl] = spotterDocumentationUrl;
20403
+ }
20404
+ else {
20405
+ this.handleError({
20406
+ errorType: ErrorDetailsTypes.VALIDATION_ERROR,
20407
+ message: ERROR_MESSAGE.INVALID_SPOTTER_DOCUMENTATION_URL,
20408
+ code: EmbedErrorCodes.INVALID_URL,
20409
+ error: (validationError === null || validationError === void 0 ? void 0 : validationError.message) || ERROR_MESSAGE.INVALID_SPOTTER_DOCUMENTATION_URL,
20410
+ });
20411
+ }
20412
+ }
20413
+ }
20414
+ // Handle spotterChatConfig params
20415
+ if (spotterChatConfig) {
20416
+ const { hideToolResponseCardBranding, toolResponseCardBrandingLabel, } = spotterChatConfig;
20417
+ setParamIfDefined(params, Param.HideToolResponseCardBranding, hideToolResponseCardBranding, true);
20418
+ setParamIfDefined(params, Param.ToolResponseCardBrandingLabel, toolResponseCardBrandingLabel);
20419
+ }
20158
20420
  if (hideObjectSearch) {
20159
20421
  params[Param.HideObjectSearch] = !!hideObjectSearch;
20160
20422
  }
@@ -20552,6 +20814,7 @@ class LiveboardEmbed extends V1Embed {
20552
20814
  liveboardId: this.viewConfig.liveboardId,
20553
20815
  vizId: this.viewConfig.vizId,
20554
20816
  activeTabId: this.viewConfig.activeTabId,
20817
+ personalizedViewId: this.viewConfig.personalizedViewId,
20555
20818
  };
20556
20819
  if (this.viewConfig.fullHeight === true) {
20557
20820
  if (this.viewConfig.vizId) {
@@ -20576,7 +20839,7 @@ class LiveboardEmbed extends V1Embed {
20576
20839
  getEmbedParamsObject() {
20577
20840
  let params = {};
20578
20841
  params = this.getBaseQueryParams(params);
20579
- const { enableVizTransformations, fullHeight, defaultHeight, minimumHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, showMaskedFilterChip = false, isLiveboardMasterpiecesEnabled = false, isEnhancedFilterInteractivityEnabled = false, enableAskSage, enable2ColumnLayout, dataPanelV2 = true, enableCustomColumnGroups = false, oAuthPollingInterval, isForceRedirect, dataSourceId, coverAndFilterOptionInPDF = false, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, isLiveboardXLSXCSVDownloadEnabled = false, isGranularXLSXCSVSchedulesEnabled = false, showSpotterLimitations, isCentralizedLiveboardFilterUXEnabled = false, isLinkParametersEnabled, updatedSpotterChatPrompt, isThisPeriodInDateFiltersEnabled, } = this.viewConfig;
20842
+ const { enableVizTransformations, fullHeight, defaultHeight, minimumHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, showMaskedFilterChip = false, isLiveboardMasterpiecesEnabled = false, isEnhancedFilterInteractivityEnabled = false, enableAskSage, enable2ColumnLayout, dataPanelV2 = true, enableCustomColumnGroups = false, oAuthPollingInterval, isForceRedirect, dataSourceId, coverAndFilterOptionInPDF = false, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, isLiveboardXLSXCSVDownloadEnabled = false, isGranularXLSXCSVSchedulesEnabled = false, showSpotterLimitations, isCentralizedLiveboardFilterUXEnabled = false, isLinkParametersEnabled, updatedSpotterChatPrompt, spotterChatConfig, isThisPeriodInDateFiltersEnabled, } = this.viewConfig;
20580
20843
  const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
20581
20844
  || this.viewConfig.preventPinboardFilterRemoval;
20582
20845
  if (fullHeight === true) {
@@ -20650,6 +20913,12 @@ class LiveboardEmbed extends V1Embed {
20650
20913
  if (showSpotterLimitations !== undefined) {
20651
20914
  params[Param.ShowSpotterLimitations] = showSpotterLimitations;
20652
20915
  }
20916
+ // Handle spotterChatConfig params
20917
+ if (spotterChatConfig) {
20918
+ const { hideToolResponseCardBranding, toolResponseCardBrandingLabel, } = spotterChatConfig;
20919
+ setParamIfDefined(params, Param.HideToolResponseCardBranding, hideToolResponseCardBranding, true);
20920
+ setParamIfDefined(params, Param.ToolResponseCardBrandingLabel, toolResponseCardBrandingLabel);
20921
+ }
20653
20922
  if (isLinkParametersEnabled !== undefined) {
20654
20923
  params[Param.isLinkParametersEnabled] = isLinkParametersEnabled;
20655
20924
  }
@@ -20673,15 +20942,31 @@ class LiveboardEmbed extends V1Embed {
20673
20942
  getQueryParamString(params, true);
20674
20943
  return params;
20675
20944
  }
20676
- getIframeSuffixSrc(liveboardId, vizId, activeTabId) {
20677
- let suffix = `/embed/viz/${liveboardId}`;
20945
+ getIframeSuffixSrc(liveboardId, vizId, activeTabId, personalizedViewId) {
20946
+ // Extract view from liveboardId if passed along with it (legacy approach)
20947
+ // View must be appended as query param at the end, not embedded in path
20948
+ let liveboardGuid = liveboardId;
20949
+ let legacyViewId;
20950
+ if (liveboardId === null || liveboardId === void 0 ? void 0 : liveboardId.includes('?')) {
20951
+ const [id, query] = liveboardId.split('?');
20952
+ liveboardGuid = id;
20953
+ const params = new URLSearchParams(query);
20954
+ legacyViewId = params.get('view') || undefined;
20955
+ }
20956
+ // personalizedViewId takes precedence over legacyViewId (when passed as part of liveboardId)
20957
+ const effectiveViewId = personalizedViewId || legacyViewId;
20958
+ let suffix = `/embed/viz/${liveboardGuid}`;
20678
20959
  if (activeTabId) {
20679
- suffix = `${suffix}/tab/${activeTabId} `;
20960
+ suffix = `${suffix}/tab/${activeTabId}`;
20680
20961
  }
20681
20962
  if (vizId) {
20682
20963
  suffix = `${suffix}/${vizId}`;
20683
20964
  }
20684
- const tsPostHashParams = this.getThoughtSpotPostUrlParams();
20965
+ const additionalParams = {};
20966
+ if (effectiveViewId) {
20967
+ additionalParams.view = effectiveViewId;
20968
+ }
20969
+ const tsPostHashParams = this.getThoughtSpotPostUrlParams(additionalParams);
20685
20970
  suffix = `${suffix}${tsPostHashParams}`;
20686
20971
  return suffix;
20687
20972
  }
@@ -20691,7 +20976,7 @@ class LiveboardEmbed extends V1Embed {
20691
20976
  */
20692
20977
  getIFrameSrc() {
20693
20978
  var _a;
20694
- const { vizId, activeTabId } = this.viewConfig;
20979
+ const { vizId, activeTabId, personalizedViewId } = this.viewConfig;
20695
20980
  const liveboardId = (_a = this.viewConfig.liveboardId) !== null && _a !== void 0 ? _a : this.viewConfig.pinboardId;
20696
20981
  if (!liveboardId) {
20697
20982
  this.handleError({
@@ -20701,7 +20986,7 @@ class LiveboardEmbed extends V1Embed {
20701
20986
  error: ERROR_MESSAGE.LIVEBOARD_VIZ_ID_VALIDATION,
20702
20987
  });
20703
20988
  }
20704
- return `${this.getRootIframeSrc()}${this.getIframeSuffixSrc(liveboardId, vizId, activeTabId)}`;
20989
+ return `${this.getRootIframeSrc()}${this.getIframeSuffixSrc(liveboardId, vizId, activeTabId, personalizedViewId)}`;
20705
20990
  }
20706
20991
  setActiveTab(data) {
20707
20992
  if (!this.viewConfig.vizId) {
@@ -20740,12 +21025,13 @@ class LiveboardEmbed extends V1Embed {
20740
21025
  beforePrerenderVisible() {
20741
21026
  const embedObj = this.getPreRenderObj();
20742
21027
  this.executeAfterEmbedContainerLoaded(() => {
20743
- this.navigateToLiveboard(this.viewConfig.liveboardId, this.viewConfig.vizId, this.viewConfig.activeTabId);
21028
+ this.navigateToLiveboard(this.viewConfig.liveboardId, this.viewConfig.vizId, this.viewConfig.activeTabId, this.viewConfig.personalizedViewId);
20744
21029
  if (embedObj) {
20745
21030
  embedObj.currentLiveboardState = {
20746
21031
  liveboardId: this.viewConfig.liveboardId,
20747
21032
  vizId: this.viewConfig.vizId,
20748
21033
  activeTabId: this.viewConfig.activeTabId,
21034
+ personalizedViewId: this.viewConfig.personalizedViewId,
20749
21035
  };
20750
21036
  }
20751
21037
  });
@@ -20810,11 +21096,12 @@ class LiveboardEmbed extends V1Embed {
20810
21096
  this.postRender();
20811
21097
  return this;
20812
21098
  }
20813
- navigateToLiveboard(liveboardId, vizId, activeTabId) {
20814
- const path = this.getIframeSuffixSrc(liveboardId, vizId, activeTabId);
21099
+ navigateToLiveboard(liveboardId, vizId, activeTabId, personalizedViewId) {
21100
+ const path = this.getIframeSuffixSrc(liveboardId, vizId, activeTabId, personalizedViewId);
20815
21101
  this.viewConfig.liveboardId = liveboardId;
20816
21102
  this.viewConfig.activeTabId = activeTabId;
20817
21103
  this.viewConfig.vizId = vizId;
21104
+ this.viewConfig.personalizedViewId = personalizedViewId;
20818
21105
  if (this.isRendered) {
20819
21106
  this.trigger(HostEvent.Navigate, path.substring(1));
20820
21107
  }
@@ -20838,6 +21125,9 @@ class LiveboardEmbed extends V1Embed {
20838
21125
  if (this.viewConfig.vizId) {
20839
21126
  url = `${url}/${this.viewConfig.vizId}`;
20840
21127
  }
21128
+ if (this.viewConfig.personalizedViewId) {
21129
+ url = `${url}?view=${this.viewConfig.personalizedViewId}`;
21130
+ }
20841
21131
  return url;
20842
21132
  }
20843
21133
  }
@@ -21674,7 +21964,9 @@ class SpotterEmbed extends TsEmbed {
21674
21964
  this.viewConfig = viewConfig;
21675
21965
  }
21676
21966
  getEmbedParamsObject() {
21677
- const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, enablePastConversationsSidebar, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, updatedSpotterChatPrompt, } = this.viewConfig;
21967
+ const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, updatedSpotterChatPrompt, spotterSidebarConfig, spotterChatConfig, } = this.viewConfig;
21968
+ // Extract sidebar config properties
21969
+ const { enablePastConversationsSidebar, spotterSidebarTitle, spotterSidebarDefaultExpanded, spotterChatRenameLabel, spotterChatDeleteLabel, spotterDeleteConversationModalTitle, spotterPastConversationAlertMessage, spotterDocumentationUrl, spotterBestPracticesLabel, spotterConversationsBatchSize, spotterNewChatButtonTitle, } = spotterSidebarConfig || {};
21678
21970
  if (!worksheetId) {
21679
21971
  this.handleError({
21680
21972
  errorType: ErrorDetailsTypes.VALIDATION_ERROR,
@@ -21685,30 +21977,51 @@ class SpotterEmbed extends TsEmbed {
21685
21977
  }
21686
21978
  const queryParams = this.getBaseQueryParams();
21687
21979
  queryParams[Param.SpotterEnabled] = true;
21688
- if (!isUndefined_1(disableSourceSelection)) {
21689
- queryParams[Param.DisableSourceSelection] = !!disableSourceSelection;
21690
- }
21691
- if (!isUndefined_1(hideSourceSelection)) {
21692
- queryParams[Param.HideSourceSelection] = !!hideSourceSelection;
21693
- }
21694
- if (!isUndefined_1(dataPanelV2)) {
21695
- queryParams[Param.DataPanelV2Enabled] = !!dataPanelV2;
21696
- }
21697
- if (!isUndefined_1(showSpotterLimitations)) {
21698
- queryParams[Param.ShowSpotterLimitations] = !!showSpotterLimitations;
21699
- }
21700
- if (!isUndefined_1(hideSampleQuestions)) {
21701
- queryParams[Param.HideSampleQuestions] = !!hideSampleQuestions;
21980
+ // Boolean params
21981
+ setParamIfDefined(queryParams, Param.DisableSourceSelection, disableSourceSelection, true);
21982
+ setParamIfDefined(queryParams, Param.HideSourceSelection, hideSourceSelection, true);
21983
+ setParamIfDefined(queryParams, Param.DataPanelV2Enabled, dataPanelV2, true);
21984
+ setParamIfDefined(queryParams, Param.ShowSpotterLimitations, showSpotterLimitations, true);
21985
+ setParamIfDefined(queryParams, Param.HideSampleQuestions, hideSampleQuestions, true);
21986
+ setParamIfDefined(queryParams, Param.UpdatedSpotterChatPrompt, updatedSpotterChatPrompt, true);
21987
+ setParamIfDefined(queryParams, Param.SpotterSidebarDefaultExpanded, spotterSidebarDefaultExpanded, true);
21988
+ // String params
21989
+ setParamIfDefined(queryParams, Param.SpotterSidebarTitle, spotterSidebarTitle);
21990
+ setParamIfDefined(queryParams, Param.SpotterChatRenameLabel, spotterChatRenameLabel);
21991
+ setParamIfDefined(queryParams, Param.SpotterChatDeleteLabel, spotterChatDeleteLabel);
21992
+ setParamIfDefined(queryParams, Param.SpotterDeleteConversationModalTitle, spotterDeleteConversationModalTitle);
21993
+ setParamIfDefined(queryParams, Param.SpotterPastConversationAlertMessage, spotterPastConversationAlertMessage);
21994
+ setParamIfDefined(queryParams, Param.SpotterBestPracticesLabel, spotterBestPracticesLabel);
21995
+ setParamIfDefined(queryParams, Param.SpotterConversationsBatchSize, spotterConversationsBatchSize);
21996
+ setParamIfDefined(queryParams, Param.SpotterNewChatButtonTitle, spotterNewChatButtonTitle);
21997
+ // URL param with validation
21998
+ if (spotterDocumentationUrl !== undefined) {
21999
+ const [isValid, validationError] = validateHttpUrl(spotterDocumentationUrl);
22000
+ if (isValid) {
22001
+ queryParams[Param.SpotterDocumentationUrl] = spotterDocumentationUrl;
22002
+ }
22003
+ else {
22004
+ this.handleError({
22005
+ errorType: ErrorDetailsTypes.VALIDATION_ERROR,
22006
+ message: ERROR_MESSAGE.INVALID_SPOTTER_DOCUMENTATION_URL,
22007
+ code: EmbedErrorCodes.INVALID_URL,
22008
+ error: (validationError === null || validationError === void 0 ? void 0 : validationError.message) || ERROR_MESSAGE.INVALID_SPOTTER_DOCUMENTATION_URL,
22009
+ });
22010
+ }
21702
22011
  }
21703
- if (!isUndefined_1(updatedSpotterChatPrompt)) {
21704
- queryParams[Param.UpdatedSpotterChatPrompt] = !!updatedSpotterChatPrompt;
22012
+ // Handle spotterChatConfig params
22013
+ if (spotterChatConfig) {
22014
+ const { hideToolResponseCardBranding, toolResponseCardBrandingLabel, } = spotterChatConfig;
22015
+ setParamIfDefined(queryParams, Param.HideToolResponseCardBranding, hideToolResponseCardBranding, true);
22016
+ setParamIfDefined(queryParams, Param.ToolResponseCardBrandingLabel, toolResponseCardBrandingLabel);
21705
22017
  }
21706
22018
  return queryParams;
21707
22019
  }
21708
22020
  getIframeSrc() {
21709
- const { worksheetId, searchOptions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, enablePastConversationsSidebar, } = this.viewConfig;
22021
+ const { worksheetId, searchOptions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, spotterSidebarConfig, } = this.viewConfig;
21710
22022
  const path = 'insights/conv-assist';
21711
22023
  const queryParams = this.getEmbedParamsObject();
22024
+ const enablePastConversationsSidebar = spotterSidebarConfig === null || spotterSidebarConfig === void 0 ? void 0 : spotterSidebarConfig.enablePastConversationsSidebar;
21712
22025
  if (!isUndefined_1(enablePastConversationsSidebar)) {
21713
22026
  queryParams[Param.EnablePastConversationsSidebar] = !!enablePastConversationsSidebar;
21714
22027
  }
@@ -22372,4 +22685,67 @@ const createLiveboardWithAnswers = async (answers, name) => {
22372
22685
  return result;
22373
22686
  };
22374
22687
 
22375
- export { Action, AnswerService, AppEmbed, AuthEvent, AuthFailureType, AuthStatus, AuthType, BodylessConversation, ContextMenuTriggerOptions, ContextType, ConversationEmbed, CustomActionTarget, CustomActionsPosition, DataPanelCustomColumnGroupsAccordionState$1 as DataPanelCustomColumnGroupsAccordionState, DataSourceVisualMode, EmbedErrorCodes, EmbedEvent, ErrorDetailsTypes, HomeLeftNavItem, HomePage, HomePageSearchBarMode, HomepageModule, HostEvent, InterceptedApiType, ListPage, ListPageColumns, LiveboardEmbed, LogLevel, MIXPANEL_EVENT, Page, PinboardEmbed, PrefetchFeatures, PrimaryNavbarVersion, RuntimeFilterOp, SageEmbed, SearchBarEmbed, SearchEmbed, SpotterAgentEmbed, SpotterEmbed, UIPassthroughEvent, createLiveboardWithAnswers, executeTML, exportTML, getAnswerFromQuery, getEmbedConfig as getInitConfig, getSessionInfo, init, logout, prefetch, reloadIframe, resetCachedAuthToken, tokenizedFetch, uploadMixpanelEvent };
22688
+ function startAutoMCPFrameRenderer(viewConfig = {}) {
22689
+ const replaceWithMCPIframe = (iframe) => {
22690
+ const autoMCPFrameRenderer = new AutoFrameRenderer(viewConfig);
22691
+ autoMCPFrameRenderer.replaceIframe(iframe);
22692
+ };
22693
+ const observer = new MutationObserver((mutations) => {
22694
+ for (const mutation of mutations) {
22695
+ for (const node of Array.from(mutation.addedNodes)) {
22696
+ if (node instanceof HTMLIFrameElement && isTSMCPIframe(node)) {
22697
+ replaceWithMCPIframe(node);
22698
+ }
22699
+ if (node instanceof HTMLElement) {
22700
+ node.querySelectorAll('iframe').forEach((iframe) => {
22701
+ if (isTSMCPIframe(iframe)) {
22702
+ replaceWithMCPIframe(iframe);
22703
+ }
22704
+ });
22705
+ }
22706
+ }
22707
+ }
22708
+ });
22709
+ observer.observe(document.body, { childList: true, subtree: true });
22710
+ return observer;
22711
+ }
22712
+ function isTSMCPIframe(iframe) {
22713
+ const src = iframe.src;
22714
+ return src.includes(`${Param.Tsmcp}=true`);
22715
+ }
22716
+ class AutoFrameRenderer extends TsEmbed {
22717
+ constructor(viewConfig) {
22718
+ viewConfig.embedComponentType = 'auto-frame-renderer';
22719
+ const container = document.createElement('div');
22720
+ super(container, viewConfig);
22721
+ this.viewConfig = viewConfig;
22722
+ }
22723
+ getMCPIframeSrc(sourceSrc) {
22724
+ const queryParams = this.getEmbedParamsObject();
22725
+ const sourceURL = new URL(sourceSrc);
22726
+ const existingQueryParams = sourceURL.searchParams;
22727
+ // convert existing query params to an object
22728
+ const existingQueryParamsObject = Object.fromEntries(existingQueryParams);
22729
+ delete existingQueryParamsObject[Param.Tsmcp];
22730
+ // merge the existing query params with the new query params
22731
+ const mergedQueryParams = { ...queryParams, ...existingQueryParamsObject };
22732
+ const mergedQueryParamsString = getQueryParamString(mergedQueryParams);
22733
+ const frameSrc = `${sourceURL.origin}${sourceURL.pathname}?${mergedQueryParamsString}/${sourceURL.hash}`;
22734
+ return frameSrc;
22735
+ }
22736
+ handleInsertionIntoDOM(child) {
22737
+ if (this.frameToReplace) {
22738
+ this.frameToReplace.replaceWith(child);
22739
+ }
22740
+ else {
22741
+ super.handleInsertionIntoDOM(child);
22742
+ }
22743
+ }
22744
+ async replaceIframe(iframe) {
22745
+ this.frameToReplace = iframe;
22746
+ const src = this.getMCPIframeSrc(iframe.src);
22747
+ await this.renderIFrame(src);
22748
+ }
22749
+ }
22750
+
22751
+ export { Action, AnswerService, AppEmbed, AuthEvent, AuthFailureType, AuthStatus, AuthType, BodylessConversation, ContextMenuTriggerOptions, ContextType, ConversationEmbed, CustomActionTarget, CustomActionsPosition, DataPanelCustomColumnGroupsAccordionState$1 as DataPanelCustomColumnGroupsAccordionState, DataSourceVisualMode, EmbedErrorCodes, EmbedEvent, ErrorDetailsTypes, HomeLeftNavItem, HomePage, HomePageSearchBarMode, HomepageModule, HostEvent, InterceptedApiType, ListPage, ListPageColumns, LiveboardEmbed, LogLevel, MIXPANEL_EVENT, Page, PinboardEmbed, PrefetchFeatures, PrimaryNavbarVersion, RuntimeFilterOp, SageEmbed, SearchBarEmbed, SearchEmbed, SpotterAgentEmbed, SpotterEmbed, UIPassthroughEvent, createLiveboardWithAnswers, executeTML, exportTML, getAnswerFromQuery, getEmbedConfig as getInitConfig, getSessionInfo, init, logout, prefetch, reloadIframe, resetCachedAuthToken, startAutoMCPFrameRenderer, tokenizedFetch, uploadMixpanelEvent };