@thoughtspot/visual-embed-sdk 1.52.2-beta.2 → 1.53.0

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 (237) hide show
  1. package/cjs/package.json +1 -1
  2. package/cjs/src/css-variables.d.ts +373 -5
  3. package/cjs/src/css-variables.d.ts.map +1 -1
  4. package/cjs/src/embed/app.d.ts +14 -0
  5. package/cjs/src/embed/app.d.ts.map +1 -1
  6. package/cjs/src/embed/app.js +6 -3
  7. package/cjs/src/embed/app.js.map +1 -1
  8. package/cjs/src/embed/app.spec.js +28 -0
  9. package/cjs/src/embed/app.spec.js.map +1 -1
  10. package/cjs/src/embed/auto-frame-renderer.d.ts.map +1 -1
  11. package/cjs/src/embed/auto-frame-renderer.js +244 -4
  12. package/cjs/src/embed/auto-frame-renderer.js.map +1 -1
  13. package/cjs/src/embed/auto-frame-renderer.spec.js +389 -0
  14. package/cjs/src/embed/auto-frame-renderer.spec.js.map +1 -1
  15. package/cjs/src/embed/bodyless-conversation.js +1 -1
  16. package/cjs/src/embed/bodyless-conversation.js.map +1 -1
  17. package/cjs/src/embed/conversation.d.ts +15 -0
  18. package/cjs/src/embed/conversation.d.ts.map +1 -1
  19. package/cjs/src/embed/conversation.js +7 -3
  20. package/cjs/src/embed/conversation.js.map +1 -1
  21. package/cjs/src/embed/conversation.spec.js +66 -0
  22. package/cjs/src/embed/conversation.spec.js.map +1 -1
  23. package/cjs/src/embed/liveboard-override-utils.d.ts +59 -0
  24. package/cjs/src/embed/liveboard-override-utils.d.ts.map +1 -0
  25. package/cjs/src/embed/liveboard-override-utils.js +19 -0
  26. package/cjs/src/embed/liveboard-override-utils.js.map +1 -0
  27. package/cjs/src/embed/liveboard-override-utils.spec.d.ts +2 -0
  28. package/cjs/src/embed/liveboard-override-utils.spec.d.ts.map +1 -0
  29. package/cjs/src/embed/liveboard-override-utils.spec.js +34 -0
  30. package/cjs/src/embed/liveboard-override-utils.spec.js.map +1 -0
  31. package/cjs/src/embed/liveboard.d.ts +58 -13
  32. package/cjs/src/embed/liveboard.d.ts.map +1 -1
  33. package/cjs/src/embed/liveboard.js +11 -34
  34. package/cjs/src/embed/liveboard.js.map +1 -1
  35. package/cjs/src/embed/liveboard.spec.js +104 -79
  36. package/cjs/src/embed/liveboard.spec.js.map +1 -1
  37. package/cjs/src/embed/search-bar.js +1 -1
  38. package/cjs/src/embed/search-bar.js.map +1 -1
  39. package/cjs/src/embed/search.js +1 -1
  40. package/cjs/src/embed/search.js.map +1 -1
  41. package/cjs/src/embed/search.spec.js +20 -0
  42. package/cjs/src/embed/search.spec.js.map +1 -1
  43. package/cjs/src/embed/spotter-utils.d.ts +11 -0
  44. package/cjs/src/embed/spotter-utils.d.ts.map +1 -1
  45. package/cjs/src/embed/spotter-utils.js +13 -1
  46. package/cjs/src/embed/spotter-utils.js.map +1 -1
  47. package/cjs/src/embed/spotter-viz-utils.d.ts +15 -0
  48. package/cjs/src/embed/spotter-viz-utils.d.ts.map +1 -1
  49. package/cjs/src/embed/spotter-viz-utils.js.map +1 -1
  50. package/cjs/src/embed/spotter-viz-utils.spec.js +11 -0
  51. package/cjs/src/embed/spotter-viz-utils.spec.js.map +1 -1
  52. package/cjs/src/embed/ts-embed.d.ts +27 -34
  53. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  54. package/cjs/src/embed/ts-embed.js +224 -102
  55. package/cjs/src/embed/ts-embed.js.map +1 -1
  56. package/cjs/src/embed/ts-embed.spec.d.ts.map +1 -1
  57. package/cjs/src/embed/ts-embed.spec.js +543 -166
  58. package/cjs/src/embed/ts-embed.spec.js.map +1 -1
  59. package/cjs/src/index.d.ts +4 -2
  60. package/cjs/src/index.d.ts.map +1 -1
  61. package/cjs/src/index.js +4 -2
  62. package/cjs/src/index.js.map +1 -1
  63. package/cjs/src/mixpanel-service.d.ts +1 -0
  64. package/cjs/src/mixpanel-service.d.ts.map +1 -1
  65. package/cjs/src/mixpanel-service.js +1 -0
  66. package/cjs/src/mixpanel-service.js.map +1 -1
  67. package/cjs/src/react/all-types-export.d.ts +1 -1
  68. package/cjs/src/react/all-types-export.d.ts.map +1 -1
  69. package/cjs/src/react/all-types-export.js +2 -1
  70. package/cjs/src/react/all-types-export.js.map +1 -1
  71. package/cjs/src/types.d.ts +182 -2
  72. package/cjs/src/types.d.ts.map +1 -1
  73. package/cjs/src/types.js +109 -0
  74. package/cjs/src/types.js.map +1 -1
  75. package/cjs/src/utils/graphql/answerService/answer-queries.d.ts +1 -0
  76. package/cjs/src/utils/graphql/answerService/answer-queries.d.ts.map +1 -1
  77. package/cjs/src/utils/graphql/answerService/answer-queries.js +8 -1
  78. package/cjs/src/utils/graphql/answerService/answer-queries.js.map +1 -1
  79. package/cjs/src/utils/graphql/answerService/answerService.d.ts +28 -4
  80. package/cjs/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
  81. package/cjs/src/utils/graphql/answerService/answerService.js +39 -4
  82. package/cjs/src/utils/graphql/answerService/answerService.js.map +1 -1
  83. package/cjs/src/utils/graphql/answerService/answerService.spec.js +124 -0
  84. package/cjs/src/utils/graphql/answerService/answerService.spec.js.map +1 -1
  85. package/dist/{index-CnHREfvN.js → index-CyDR8j_0.js} +1 -1
  86. package/dist/src/css-variables.d.ts +373 -5
  87. package/dist/src/css-variables.d.ts.map +1 -1
  88. package/dist/src/embed/app.d.ts +14 -0
  89. package/dist/src/embed/app.d.ts.map +1 -1
  90. package/dist/src/embed/auto-frame-renderer.d.ts.map +1 -1
  91. package/dist/src/embed/conversation.d.ts +15 -0
  92. package/dist/src/embed/conversation.d.ts.map +1 -1
  93. package/dist/src/embed/liveboard-override-utils.d.ts +59 -0
  94. package/dist/src/embed/liveboard-override-utils.d.ts.map +1 -0
  95. package/dist/src/embed/liveboard-override-utils.spec.d.ts +2 -0
  96. package/dist/src/embed/liveboard-override-utils.spec.d.ts.map +1 -0
  97. package/dist/src/embed/liveboard.d.ts +58 -13
  98. package/dist/src/embed/liveboard.d.ts.map +1 -1
  99. package/dist/src/embed/spotter-utils.d.ts +11 -0
  100. package/dist/src/embed/spotter-utils.d.ts.map +1 -1
  101. package/dist/src/embed/spotter-viz-utils.d.ts +15 -0
  102. package/dist/src/embed/spotter-viz-utils.d.ts.map +1 -1
  103. package/dist/src/embed/ts-embed.d.ts +27 -34
  104. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  105. package/dist/src/embed/ts-embed.spec.d.ts.map +1 -1
  106. package/dist/src/index.d.ts +4 -2
  107. package/dist/src/index.d.ts.map +1 -1
  108. package/dist/src/mixpanel-service.d.ts +1 -0
  109. package/dist/src/mixpanel-service.d.ts.map +1 -1
  110. package/dist/src/react/all-types-export.d.ts +1 -1
  111. package/dist/src/react/all-types-export.d.ts.map +1 -1
  112. package/dist/src/types.d.ts +182 -2
  113. package/dist/src/types.d.ts.map +1 -1
  114. package/dist/src/utils/graphql/answerService/answer-queries.d.ts +1 -0
  115. package/dist/src/utils/graphql/answerService/answer-queries.d.ts.map +1 -1
  116. package/dist/src/utils/graphql/answerService/answerService.d.ts +28 -4
  117. package/dist/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
  118. package/dist/tsembed-react.es.js +437 -191
  119. package/dist/tsembed-react.js +436 -190
  120. package/dist/tsembed.es.js +680 -196
  121. package/dist/tsembed.js +678 -194
  122. package/dist/visual-embed-sdk-react-full.d.ts +702 -56
  123. package/dist/visual-embed-sdk-react.d.ts +697 -56
  124. package/dist/visual-embed-sdk.d.ts +744 -57
  125. package/lib/package.json +1 -1
  126. package/lib/src/css-variables.d.ts +373 -5
  127. package/lib/src/css-variables.d.ts.map +1 -1
  128. package/lib/src/embed/app.d.ts +14 -0
  129. package/lib/src/embed/app.d.ts.map +1 -1
  130. package/lib/src/embed/app.js +7 -4
  131. package/lib/src/embed/app.js.map +1 -1
  132. package/lib/src/embed/app.spec.js +28 -0
  133. package/lib/src/embed/app.spec.js.map +1 -1
  134. package/lib/src/embed/auto-frame-renderer.d.ts.map +1 -1
  135. package/lib/src/embed/auto-frame-renderer.js +244 -4
  136. package/lib/src/embed/auto-frame-renderer.js.map +1 -1
  137. package/lib/src/embed/auto-frame-renderer.spec.js +389 -0
  138. package/lib/src/embed/auto-frame-renderer.spec.js.map +1 -1
  139. package/lib/src/embed/bodyless-conversation.js +1 -1
  140. package/lib/src/embed/bodyless-conversation.js.map +1 -1
  141. package/lib/src/embed/conversation.d.ts +15 -0
  142. package/lib/src/embed/conversation.d.ts.map +1 -1
  143. package/lib/src/embed/conversation.js +8 -4
  144. package/lib/src/embed/conversation.js.map +1 -1
  145. package/lib/src/embed/conversation.spec.js +67 -1
  146. package/lib/src/embed/conversation.spec.js.map +1 -1
  147. package/lib/src/embed/liveboard-override-utils.d.ts +59 -0
  148. package/lib/src/embed/liveboard-override-utils.d.ts.map +1 -0
  149. package/lib/src/embed/liveboard-override-utils.js +15 -0
  150. package/lib/src/embed/liveboard-override-utils.js.map +1 -0
  151. package/lib/src/embed/liveboard-override-utils.spec.d.ts +2 -0
  152. package/lib/src/embed/liveboard-override-utils.spec.d.ts.map +1 -0
  153. package/lib/src/embed/liveboard-override-utils.spec.js +32 -0
  154. package/lib/src/embed/liveboard-override-utils.spec.js.map +1 -0
  155. package/lib/src/embed/liveboard.d.ts +58 -13
  156. package/lib/src/embed/liveboard.d.ts.map +1 -1
  157. package/lib/src/embed/liveboard.js +11 -33
  158. package/lib/src/embed/liveboard.js.map +1 -1
  159. package/lib/src/embed/liveboard.spec.js +104 -79
  160. package/lib/src/embed/liveboard.spec.js.map +1 -1
  161. package/lib/src/embed/search-bar.js +1 -1
  162. package/lib/src/embed/search-bar.js.map +1 -1
  163. package/lib/src/embed/search.js +1 -1
  164. package/lib/src/embed/search.js.map +1 -1
  165. package/lib/src/embed/search.spec.js +20 -0
  166. package/lib/src/embed/search.spec.js.map +1 -1
  167. package/lib/src/embed/spotter-utils.d.ts +11 -0
  168. package/lib/src/embed/spotter-utils.d.ts.map +1 -1
  169. package/lib/src/embed/spotter-utils.js +12 -0
  170. package/lib/src/embed/spotter-utils.js.map +1 -1
  171. package/lib/src/embed/spotter-viz-utils.d.ts +15 -0
  172. package/lib/src/embed/spotter-viz-utils.d.ts.map +1 -1
  173. package/lib/src/embed/spotter-viz-utils.js.map +1 -1
  174. package/lib/src/embed/spotter-viz-utils.spec.js +11 -0
  175. package/lib/src/embed/spotter-viz-utils.spec.js.map +1 -1
  176. package/lib/src/embed/ts-embed.d.ts +27 -34
  177. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  178. package/lib/src/embed/ts-embed.js +224 -102
  179. package/lib/src/embed/ts-embed.js.map +1 -1
  180. package/lib/src/embed/ts-embed.spec.d.ts.map +1 -1
  181. package/lib/src/embed/ts-embed.spec.js +544 -167
  182. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  183. package/lib/src/index.d.ts +4 -2
  184. package/lib/src/index.d.ts.map +1 -1
  185. package/lib/src/index.js +3 -2
  186. package/lib/src/index.js.map +1 -1
  187. package/lib/src/mixpanel-service.d.ts +1 -0
  188. package/lib/src/mixpanel-service.d.ts.map +1 -1
  189. package/lib/src/mixpanel-service.js +1 -0
  190. package/lib/src/mixpanel-service.js.map +1 -1
  191. package/lib/src/react/all-types-export.d.ts +1 -1
  192. package/lib/src/react/all-types-export.d.ts.map +1 -1
  193. package/lib/src/react/all-types-export.js +1 -1
  194. package/lib/src/react/all-types-export.js.map +1 -1
  195. package/lib/src/types.d.ts +182 -2
  196. package/lib/src/types.d.ts.map +1 -1
  197. package/lib/src/types.js +109 -0
  198. package/lib/src/types.js.map +1 -1
  199. package/lib/src/utils/graphql/answerService/answer-queries.d.ts +1 -0
  200. package/lib/src/utils/graphql/answerService/answer-queries.d.ts.map +1 -1
  201. package/lib/src/utils/graphql/answerService/answer-queries.js +7 -0
  202. package/lib/src/utils/graphql/answerService/answer-queries.js.map +1 -1
  203. package/lib/src/utils/graphql/answerService/answerService.d.ts +28 -4
  204. package/lib/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
  205. package/lib/src/utils/graphql/answerService/answerService.js +39 -4
  206. package/lib/src/utils/graphql/answerService/answerService.js.map +1 -1
  207. package/lib/src/utils/graphql/answerService/answerService.spec.js +125 -1
  208. package/lib/src/utils/graphql/answerService/answerService.spec.js.map +1 -1
  209. package/lib/src/visual-embed-sdk.d.ts +744 -57
  210. package/package.json +1 -1
  211. package/src/css-variables.ts +475 -26
  212. package/src/embed/app.spec.ts +32 -0
  213. package/src/embed/app.ts +28 -4
  214. package/src/embed/auto-frame-renderer.spec.ts +464 -0
  215. package/src/embed/auto-frame-renderer.ts +305 -6
  216. package/src/embed/bodyless-conversation.ts +1 -1
  217. package/src/embed/conversation.spec.ts +94 -1
  218. package/src/embed/conversation.ts +28 -3
  219. package/src/embed/liveboard-override-utils.spec.ts +38 -0
  220. package/src/embed/liveboard-override-utils.ts +71 -0
  221. package/src/embed/liveboard.spec.ts +119 -92
  222. package/src/embed/liveboard.ts +56 -40
  223. package/src/embed/search-bar.tsx +1 -1
  224. package/src/embed/search.spec.ts +23 -0
  225. package/src/embed/search.ts +1 -1
  226. package/src/embed/spotter-utils.ts +12 -0
  227. package/src/embed/spotter-viz-utils.spec.ts +11 -0
  228. package/src/embed/spotter-viz-utils.ts +15 -0
  229. package/src/embed/ts-embed.spec.ts +685 -207
  230. package/src/embed/ts-embed.ts +227 -97
  231. package/src/index.ts +16 -1
  232. package/src/mixpanel-service.ts +1 -0
  233. package/src/react/all-types-export.ts +6 -0
  234. package/src/types.ts +186 -5
  235. package/src/utils/graphql/answerService/answer-queries.ts +8 -0
  236. package/src/utils/graphql/answerService/answerService.spec.ts +145 -1
  237. package/src/utils/graphql/answerService/answerService.ts +65 -3
@@ -1,4 +1,4 @@
1
- /* @thoughtspot/visual-embed-sdk version 1.52.2-beta.2 */
1
+ /* @thoughtspot/visual-embed-sdk version 1.53.0 */
2
2
  'use client';
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) :
@@ -1415,6 +1415,36 @@
1415
1415
  * ```
1416
1416
  */
1417
1417
  EmbedEvent["Edit"] = "edit";
1418
+ /**
1419
+ * Emitted when a user clicks **Edit** on a Liveboard.
1420
+ *
1421
+ * Fired alongside {@link EmbedEvent.Edit} for backward compatibility;
1422
+ * listen to this instead of `Edit` to target the Liveboard surface only.
1423
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
1424
+ * @example
1425
+ * ```js
1426
+ * liveboardEmbed.on(EmbedEvent.EditLiveboard, payload => {
1427
+ * console.log('Liveboard edit', payload);
1428
+ * })
1429
+ * ```
1430
+ */
1431
+ EmbedEvent["EditLiveboard"] = "editLiveboard";
1432
+ /**
1433
+ * Emitted when a user clicks **Edit** on a visualization inside a
1434
+ * Liveboard.
1435
+ *
1436
+ * Fired alongside {@link EmbedEvent.Edit} for backward compatibility;
1437
+ * listen to this instead of `Edit` to target the visualization surface
1438
+ * only.
1439
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
1440
+ * @example
1441
+ * ```js
1442
+ * liveboardEmbed.on(EmbedEvent.EditVisualization, payload => {
1443
+ * console.log('visualization edit', payload);
1444
+ * })
1445
+ * ```
1446
+ */
1447
+ EmbedEvent["EditVisualization"] = "editVisualization";
1418
1448
  /**
1419
1449
  * Emitted when a user clicks *Make a copy* on a Liveboard
1420
1450
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
@@ -3386,6 +3416,35 @@
3386
3416
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
3387
3417
  */
3388
3418
  HostEvent["Edit"] = "edit";
3419
+ /**
3420
+ * Trigger the **Edit** action on a Liveboard only — does not affect a
3421
+ * visualization's edit surface.
3422
+ *
3423
+ * Behaves like {@link HostEvent.Edit} restricted to the Liveboard
3424
+ * surface. Use {@link HostEvent.EditVisualization} to target a
3425
+ * visualization instead, or `HostEvent.Edit` to control whichever
3426
+ * surface applies contextually (unchanged, existing behavior).
3427
+ * @example
3428
+ * ```js
3429
+ * liveboardEmbed.trigger(HostEvent.EditLiveboard)
3430
+ * ```
3431
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
3432
+ */
3433
+ HostEvent["EditLiveboard"] = "editLiveboard";
3434
+ /**
3435
+ * Trigger the **Edit** action on a specific visualization inside a
3436
+ * Liveboard only — does not affect the Liveboard-level edit surface.
3437
+ * @param - Object parameter. Includes the following keys:
3438
+ * - `vizId`: **Required.** The visualization to edit.
3439
+ *
3440
+ * @example
3441
+ * ```js
3442
+ * liveboardEmbed.trigger(HostEvent.EditVisualization, {vizId:
3443
+ * '730496d6-6903-4601-937e-2c691821af3c'})
3444
+ * ```
3445
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
3446
+ */
3447
+ HostEvent["EditVisualization"] = "editVisualization";
3389
3448
  /**
3390
3449
  * Trigger the **Copy link** action on a Liveboard or visualization
3391
3450
  * Payload: {@link VizScopedRequest}.
@@ -4948,6 +5007,22 @@
4948
5007
  var Param;
4949
5008
  (function (Param) {
4950
5009
  Param["Tsmcp"] = "tsmcp";
5010
+ /**
5011
+ * Marker added by a host app replaying a stored conversation. Carries the
5012
+ * analytical session (conversation) identifier, from which the renderer
5013
+ * resolves the answer's current session parameters. Stripped before the
5014
+ * URL reaches the ThoughtSpot application.
5015
+ * @version SDK: 1.52.2 | ThoughtSpot Cloud: 26.9.0.cl
5016
+ */
5017
+ Param["TsmcpConversationId"] = "tsmcpConversationId";
5018
+ /**
5019
+ * Zero-based position of the answer within the conversation, counting only
5020
+ * non-thinking answer items in message order. Accompanies
5021
+ * {@link TsmcpConversationId}; defaults to 0 when absent. Stripped before
5022
+ * the URL reaches the ThoughtSpot application.
5023
+ * @version SDK: 1.52.2 | ThoughtSpot Cloud: 26.9.0.cl
5024
+ */
5025
+ Param["TsmcpAnswerIndex"] = "tsmcpAnswerIndex";
4951
5026
  Param["EmbedApp"] = "embedApp";
4952
5027
  Param["DataSources"] = "dataSources";
4953
5028
  Param["DataSourceMode"] = "dataSourceMode";
@@ -5111,6 +5186,9 @@
5111
5186
  Param["SpotterDataSources"] = "spotterDataSources";
5112
5187
  Param["OpenSpotterOnLiveboardByDefault"] = "openSpotterOnLiveboardByDefault";
5113
5188
  Param["ShowAnswerEditPanel"] = "showAnswerEditPanel";
5189
+ Param["IsDarkMode"] = "isDarkMode";
5190
+ Param["RadiantThemeEnabled"] = "radiantThemeEnabled";
5191
+ Param["SpotterExperienceVersion"] = "spotterExperienceVersion";
5114
5192
  })(Param || (Param = {}));
5115
5193
  /**
5116
5194
  * ThoughtSpot application pages include actions and menu commands
@@ -5565,12 +5643,43 @@
5565
5643
  * The *Edit* action on the Liveboard page and in the
5566
5644
  * visualization menu.
5567
5645
  * Opens a Liveboard or visualization in edit mode.
5646
+ *
5647
+ * Controls both surfaces together. To target one surface only, use
5648
+ * {@link Action.EditLiveboard} or {@link Action.EditVisualization}.
5568
5649
  * @example
5569
5650
  * ```js
5570
5651
  * disabledActions: [Action.Edit]
5571
5652
  * ```
5572
5653
  */
5573
5654
  Action["Edit"] = "edit";
5655
+ /**
5656
+ * The *Edit* action on the Liveboard page only.
5657
+ * Opens a Liveboard in edit mode.
5658
+ *
5659
+ * Does not affect the *Edit* action in the visualization menu; use
5660
+ * {@link Action.EditVisualization} for that, or {@link Action.Edit} to
5661
+ * control both surfaces together.
5662
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
5663
+ * @example
5664
+ * ```js
5665
+ * disabledActions: [Action.EditLiveboard]
5666
+ * ```
5667
+ */
5668
+ Action["EditLiveboard"] = "editLiveboard";
5669
+ /**
5670
+ * The *Edit* action in the visualization `...` menu only.
5671
+ * Opens a visualization in the editor.
5672
+ *
5673
+ * Does not affect the *Edit* action on the Liveboard page; use
5674
+ * {@link Action.EditLiveboard} for that, or {@link Action.Edit} to
5675
+ * control both surfaces together.
5676
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
5677
+ * @example
5678
+ * ```js
5679
+ * disabledActions: [Action.EditVisualization]
5680
+ * ```
5681
+ */
5682
+ Action["EditVisualization"] = "editVisualization";
5574
5683
  /**
5575
5684
  * The text edit option for Liveboard and visualization titles.
5576
5685
  * @example
@@ -7850,7 +7959,7 @@
7850
7959
  TableContentDensity["Compact"] = "COMPACT";
7851
7960
  })(TableContentDensity || (TableContentDensity = {}));
7852
7961
 
7853
- var version$1="1.52.2-beta.2";var pkg = {version:version$1};
7962
+ var version$1="1.53.0";var pkg = {version:version$1};
7854
7963
 
7855
7964
  const { version } = pkg;
7856
7965
 
@@ -10118,6 +10227,13 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
10118
10227
  ${bachSessionId}
10119
10228
  }
10120
10229
  }
10230
+ `;
10231
+ const updateSort = `
10232
+ mutation UpdateSort($session: BachSessionIdInput!, $sortOrder: [AnswerColumnSortInput!]!) {
10233
+ Answer__updateSort(session: $session, sortOrder: $sortOrder) {
10234
+ ${bachSessionId}
10235
+ }
10236
+ }
10121
10237
  `;
10122
10238
  const getAnswer = `
10123
10239
  query GetAnswer($session: BachSessionIdInput!) {
@@ -10423,6 +10539,26 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
10423
10539
  },
10424
10540
  });
10425
10541
  }
10542
+ /**
10543
+ * Adapt the sort options into the `updateSort` payload and send it.
10544
+ * @param sortOptions Columns to sort by, each with a direction.
10545
+ * @param sourceDetail
10546
+ */
10547
+ async adaptSorting(sortOptions, sourceDetail) {
10548
+ const { answer } = await this.executeQuery(getAnswer, {});
10549
+ const guidToColumnId = getGuidToColumnIdMap(answer);
10550
+ const sortOrder = sortOptions.map((sort) => {
10551
+ const guid = getGuidsFromColumnNames(sourceDetail, [sort.columnName])
10552
+ .values().next().value;
10553
+ return {
10554
+ columnId: guidToColumnId.get(guid),
10555
+ sortType: sort.ascending ? 'ASCENDING' : 'DESCENDING',
10556
+ };
10557
+ });
10558
+ return this.executeQuery(updateSort, {
10559
+ sortOrder,
10560
+ });
10561
+ }
10426
10562
  async updateDisplayMode(displayMode = "TABLE_MODE") {
10427
10563
  return this.executeQuery(updateDisplayMode, {
10428
10564
  displayMode,
@@ -10510,18 +10646,21 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
10510
10646
  * automatically passed.
10511
10647
  * @param outputColumnNames
10512
10648
  * @param selectedPoints
10649
+ * @param sortOptions Optional columns to sort the underlying data by.
10513
10650
  * @example
10514
10651
  * ```js
10515
10652
  * embed.on(EmbedEvent.CustomAction, e => {
10516
- * const underlying = await e.answerService.getUnderlyingDataForPoint([
10517
- * 'col name 1' // The column should exist in the data source.
10518
- * ]);
10653
+ * const underlying = await e.answerService.getUnderlyingDataForPoint(
10654
+ * ['col name 1'], // The column should exist in the data source.
10655
+ * undefined,
10656
+ * [{ columnName: 'col name 1', ascending: true }],
10657
+ * );
10519
10658
  * const data = await underlying.fetchData(0, 100);
10520
10659
  * })
10521
10660
  * ```
10522
10661
  * @version SDK: 1.25.0 | ThoughtSpot: 9.10.0.cl
10523
10662
  */
10524
- async getUnderlyingDataForPoint(outputColumnNames, selectedPoints) {
10663
+ async getUnderlyingDataForPoint(outputColumnNames, selectedPoints, sortOptions) {
10525
10664
  if (!selectedPoints && !this.selectedPoints) {
10526
10665
  throw new Error('Needs to be triggered in context of a point');
10527
10666
  }
@@ -10549,6 +10688,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
10549
10688
  if (columnsToRemove.length) {
10550
10689
  await unaggAnswerSession.removeColumns(columnsToRemove);
10551
10690
  }
10691
+ if (sortOptions === null || sortOptions === void 0 ? void 0 : sortOptions.length) {
10692
+ await unaggAnswerSession.adaptSorting(sortOptions, sourceDetail);
10693
+ }
10552
10694
  return unaggAnswerSession;
10553
10695
  }
10554
10696
  /**
@@ -10608,6 +10750,15 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
10608
10750
  this.tmlOverride = override;
10609
10751
  }
10610
10752
  }
10753
+ /**
10754
+ * Build a map from a source column guid to the answer's viz column id, using
10755
+ * the `referencedColumns` link on each viz column.
10756
+ * @param answer
10757
+ */
10758
+ function getGuidToColumnIdMap(answer) {
10759
+ const tableViz = answer.visualizations.find((viz) => viz.columns);
10760
+ return new Map(tableViz.columns.map((col) => [col.column.referencedColumns[0].guid, col.column.id]));
10761
+ }
10611
10762
  /**
10612
10763
  *
10613
10764
  * @param sourceDetail
@@ -19688,6 +19839,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
19688
19839
  const MIXPANEL_EVENT = {
19689
19840
  VISUAL_SDK_RENDER_START: 'visual-sdk-render-start',
19690
19841
  VISUAL_SDK_CALLED_INIT: 'visual-sdk-called-init',
19842
+ VISUAL_SDK_INIT_ACTIONS: 'visual-sdk-init-actions',
19691
19843
  VISUAL_SDK_RENDER_COMPLETE: 'visual-sdk-render-complete',
19692
19844
  VISUAL_SDK_RENDER_FAILED: 'visual-sdk-render-failed',
19693
19845
  VISUAL_SDK_TRIGGER: 'visual-sdk-trigger',
@@ -21889,9 +22041,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
21889
22041
  */
21890
22042
  const PRERENDER_CONTAINER_ORIGINAL_POSITION_KEY = 'tsEmbedOriginalPosition';
21891
22043
  const PRERENDER_WRAPPER_ID_PREFIX = 'tsEmbed-pre-render-wrapper-';
21892
- const PRERENDER_PARKED_TRANSFORM = 'translateY(-100%)';
21893
- /** The height createPreRenderWrapper() seeds before anything is measured. */
21894
- const UNMEASURED_WRAPPER_HEIGHT = '100vh';
21895
22044
  // The container applies UpdateEmbedParams through React state, so a delivered
21896
22045
  // post is not the same as the params being in effect.
21897
22046
  const UPDATE_EMBED_PARAMS_SETTLE_MS = 200;
@@ -21899,6 +22048,97 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
21899
22048
  // truthy, so null or '' leaves the previous embed's values in place. '&' is
21900
22049
  // truthy and parses to {}.
21901
22050
  const NO_RUNTIME_PARAMS = '&';
22051
+ /**
22052
+ * Params kept on the iframe `src` when `excludeConfigFromURL` is set. The rest
22053
+ * are sent in the APP_INIT payload.
22054
+ * @internal
22055
+ */
22056
+ const BOOTSTRAP_URL_PARAMS = new Set([
22057
+ // Marks the app as embedded.
22058
+ Param.EmbedApp,
22059
+ // The host page URL, used to validate the postMessage origin.
22060
+ Param.HostAppUrl,
22061
+ // The SDK version.
22062
+ Param.Version,
22063
+ // The authentication type set in init.
22064
+ Param.AuthType,
22065
+ // Whether the app signs the user in automatically.
22066
+ Param.AutoLogin,
22067
+ // Stops the app from redirecting to its login page.
22068
+ Param.DisableLoginRedirect,
22069
+ // Forces the SAML redirect for EmbeddedSSO.
22070
+ Param.ForceSAMLAutoRedirect,
22071
+ // Set for cookieless trusted authentication.
22072
+ Param.cookieless,
22073
+ // Lets the app use the pre-fetched auth info.
22074
+ Param.preAuthCache,
22075
+ // Blocks access to the full app outside the embed.
22076
+ Param.blockNonEmbedFullAppAccess,
22077
+ // The org to load, which the auth info depends on.
22078
+ Param.OverrideOrgId,
22079
+ // The host window height when the iframe loads.
22080
+ Param.ViewPortHeight,
22081
+ // The host window width when the iframe loads.
22082
+ Param.ViewPortWidth,
22083
+ // The app's client log level.
22084
+ Param.ClientLogLevel,
22085
+ // Lets the app override the native console.
22086
+ Param.OverrideNativeConsole,
22087
+ // An extra Pendo tracking key.
22088
+ Param.PendoTrackingKey,
22089
+ // The locale for number formatting.
22090
+ Param.NumberFormatLocale,
22091
+ // The locale for date formatting.
22092
+ Param.DateFormatLocale,
22093
+ // The currency format.
22094
+ Param.CurrencyFormat,
22095
+ // The UI language.
22096
+ Param.Locale,
22097
+ // Turns on dark mode.
22098
+ Param.IsDarkMode,
22099
+ // Turns on the radiant theme that dark mode needs.
22100
+ Param.RadiantThemeEnabled,
22101
+ // Marks a SearchEmbed or SearchBarEmbed.
22102
+ Param.searchEmbed,
22103
+ // Marks a LiveboardEmbed.
22104
+ Param.livedBoardEmbed,
22105
+ // Marks a SpotterAgentEmbed.
22106
+ Param.isSpotterAgentEmbed,
22107
+ // Marks a SpotterEmbed.
22108
+ Param.SpotterEnabled,
22109
+ // Marks an AppEmbed.
22110
+ Param.IsFullAppEmbed,
22111
+ // Legacy flag for the onBeforeGetVizData API intercept.
22112
+ Param.IsOnBeforeGetVizDataInterceptEnabled,
22113
+ // Lets the host override links in the app.
22114
+ Param.LinkOverride,
22115
+ // Turns on version 2 of the link overrides.
22116
+ Param.EnableLinkOverridesV2,
22117
+ // Stops links from opening in a new tab.
22118
+ Param.DisableRedirectionLinksInNewTab,
22119
+ // Uses replaceState instead of pushState for app navigation.
22120
+ Param.OverrideHistoryState,
22121
+ // Shows search results as a table.
22122
+ Param.ForceTable,
22123
+ // The URL of the custom string IDs file.
22124
+ Param.StringIDsUrl,
22125
+ // The data sources that search opens with.
22126
+ Param.DataSources,
22127
+ // Exposes translation IDs in the app.
22128
+ Param.ExposeTranslationIDs,
22129
+ // The URL of the custom icon sprite.
22130
+ Param.IconSpriteUrl,
22131
+ // The tag that filters the metadata lists in an AppEmbed.
22132
+ Param.Tag,
22133
+ // Set when a Liveboard embed shows a single visualization (vizId).
22134
+ Param.vizEmbed,
22135
+ // Whether search opens with the last-selected data sources.
22136
+ Param.UseLastSelectedDataSource,
22137
+ // The query mode Spotter opens in.
22138
+ Param.DefaultQueryMode,
22139
+ // The initial search query. Omitted with excludeSearchTokenStringFromURL.
22140
+ Param.searchTokenString,
22141
+ ]);
21902
22142
  /**
21903
22143
  * The event id map from v2 event names to v1 event id
21904
22144
  * v1 events are the classic embed events implemented in Blink v1
@@ -21927,6 +22167,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
21927
22167
  this.embedNodeKey = '__tsEmbed';
21928
22168
  this.embedContainerLoadedKey = '__tsEmbedContainerLoaded';
21929
22169
  this.isAppInitialized = false;
22170
+ this.initDataParams = {};
21930
22171
  /**
21931
22172
  * Should we encode URL Query Params using base64 encoding which ThoughtSpot
21932
22173
  * will generate for embedding. This provides additional security to
@@ -21936,6 +22177,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
21936
22177
  this.shouldEncodeUrlQueryParams = false;
21937
22178
  this.defaultHiddenActions = [exports.Action.ReportError];
21938
22179
  this.preRenderContainerEl = document.body;
22180
+ this.containerScrollListener = null;
21939
22181
  /**
21940
22182
  * Handler for fullscreen change events
21941
22183
  */
@@ -21961,7 +22203,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
21961
22203
  */
21962
22204
  this.appInitCb = async (_, responder) => {
21963
22205
  try {
21964
- const appInitData = await this.getAppInitData();
22206
+ const appInitData = this.withInitDataParams(await this.getAppInitData());
21965
22207
  this.isAppInitialized = true;
21966
22208
  responder({
21967
22209
  type: exports.EmbedEvent.APP_INIT,
@@ -22389,6 +22631,18 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
22389
22631
  async getAppInitData() {
22390
22632
  return this.getDefaultAppInitData();
22391
22633
  }
22634
+ withInitDataParams(appInitData) {
22635
+ if (isEmpty_1(this.initDataParams)) {
22636
+ return appInitData;
22637
+ }
22638
+ return {
22639
+ ...appInitData,
22640
+ embedParams: {
22641
+ ...this.initDataParams,
22642
+ ...(appInitData.embedParams || {}),
22643
+ },
22644
+ };
22645
+ }
22392
22646
  /**
22393
22647
  * Helper method to refresh/update auth token for TrustedAuthTokenCookieless auth type
22394
22648
  * @param responder - Function to send response back
@@ -22448,7 +22702,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
22448
22702
  * @returns queryParams
22449
22703
  */
22450
22704
  getBaseQueryParams(queryParams = {}) {
22451
- var _a, _b, _c, _d;
22705
+ var _a, _b, _c, _d, _e;
22452
22706
  let hostAppUrl = ((_a = window === null || window === void 0 ? void 0 : window.location) === null || _a === void 0 ? void 0 : _a.host) || '';
22453
22707
  // The below check is needed because TS Cloud firewall, blocks
22454
22708
  // localhost/127.0.0.1 in any url param.
@@ -22485,6 +22739,15 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
22485
22739
  if (this.embedConfig.currencyFormat) {
22486
22740
  queryParams[Param.CurrencyFormat] = this.embedConfig.currencyFormat;
22487
22741
  }
22742
+ // The view config wins over init, so an embed can opt out of a dark
22743
+ // mode set in `init`. `??` and not `||`, so that an explicit `false`
22744
+ // overrides an init-level `true`.
22745
+ const isDarkMode = (_c = this.viewConfig.isDarkMode) !== null && _c !== void 0 ? _c : this.embedConfig.isDarkMode;
22746
+ setParamIfDefined(queryParams, Param.IsDarkMode, isDarkMode, true);
22747
+ // The app's dark mode lives in its radiant theme, so turn that on too.
22748
+ if (isDarkMode) {
22749
+ queryParams[Param.RadiantThemeEnabled] = true;
22750
+ }
22488
22751
  const { disabledActions, disabledActionReason, hiddenActions, visibleActions, hiddenTabs, visibleTabs, showAlerts, additionalFlags: additionalFlagsFromView, locale, customizations, contextMenuTrigger, linkOverride, enableLinkOverridesV2, insertInToSlide, disableRedirectionLinksInNewTab, overrideOrgId, overrideHistoryState, exposeTranslationIDs, primaryAction, } = this.viewConfig;
22489
22752
  const { additionalFlags: additionalFlagsFromInit } = this.embedConfig;
22490
22753
  const additionalFlags = {
@@ -22550,7 +22813,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
22550
22813
  if (spriteUrl) {
22551
22814
  queryParams[Param.IconSpriteUrl] = spriteUrl.replace('https://', '');
22552
22815
  }
22553
- const stringIDsUrl = ((_c = customizations === null || customizations === void 0 ? void 0 : customizations.content) === null || _c === void 0 ? void 0 : _c.stringIDsUrl) || ((_d = embedCustomizations === null || embedCustomizations === void 0 ? void 0 : embedCustomizations.content) === null || _d === void 0 ? void 0 : _d.stringIDsUrl);
22816
+ const stringIDsUrl = ((_d = customizations === null || customizations === void 0 ? void 0 : customizations.content) === null || _d === void 0 ? void 0 : _d.stringIDsUrl) || ((_e = embedCustomizations === null || embedCustomizations === void 0 ? void 0 : embedCustomizations.content) === null || _e === void 0 ? void 0 : _e.stringIDsUrl);
22554
22817
  if (stringIDsUrl) {
22555
22818
  queryParams[Param.StringIDsUrl] = stringIDsUrl;
22556
22819
  }
@@ -22604,13 +22867,32 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
22604
22867
  return path;
22605
22868
  }
22606
22869
  getEmbedParams() {
22607
- const queryParams = this.getEmbedParamsObject();
22870
+ const queryParams = this.getUrlQueryParamsObject();
22608
22871
  return getQueryParamString(queryParams);
22609
22872
  }
22610
22873
  getEmbedParamsObject() {
22611
22874
  const params = this.getBaseQueryParams();
22612
22875
  return params;
22613
22876
  }
22877
+ getUrlQueryParamsObject() {
22878
+ const queryParams = this.getEmbedParamsObject();
22879
+ if (!this.isConfigExcludedFromUrl()) {
22880
+ this.initDataParams = {};
22881
+ return queryParams;
22882
+ }
22883
+ const urlParams = {};
22884
+ const excludedParams = {};
22885
+ Object.entries(queryParams).forEach(([key, value]) => {
22886
+ if (BOOTSTRAP_URL_PARAMS.has(key)) {
22887
+ urlParams[key] = value;
22888
+ }
22889
+ else {
22890
+ excludedParams[key] = deserializeParam(value);
22891
+ }
22892
+ });
22893
+ this.initDataParams = excludedParams;
22894
+ return urlParams;
22895
+ }
22614
22896
  getRootIframeSrc() {
22615
22897
  const query = this.getEmbedParams();
22616
22898
  return this.getEmbedBasePath(query);
@@ -22781,7 +23063,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
22781
23063
  top: '0',
22782
23064
  left: '0',
22783
23065
  width: '100vw',
22784
- height: UNMEASURED_WRAPPER_HEIGHT,
23066
+ height: '100vh',
22785
23067
  };
22786
23068
  setStyleProperties(preRenderWrapper, initialPreRenderWrapperStyle);
22787
23069
  return preRenderWrapper;
@@ -22849,26 +23131,10 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
22849
23131
  return placeholder;
22850
23132
  }
22851
23133
  /**
22852
- * Resolves the configured preRenderContainer to a live element. A string
22853
- * selector is re-queried on every call so a remounted container (E.g.: React
22854
- * replacing the node) resolves to the fresh element; an element passed
22855
- * directly cannot be re-resolved.
22856
- *
22857
- * With nothing configured the frame goes into the host element's nearest
22858
- * scrolling ancestor, falling back to `document.body`.
22859
- *
22860
- * The wrapper is absolutely positioned, so it follows the page for free —
22861
- * but only while it sits inside whatever scrolls. `document.body` is right
22862
- * only when the document itself is the scroller; an app that scrolls an
22863
- * inner element instead left the frame pinned to the viewport while the page
22864
- * moved under it (SCAL-338563). Being inside the scroller also lets wheel
22865
- * events chain out of the frame into it, which they cannot do from
22866
- * `document.body`.
22867
- *
22868
- * A scrolling ancestor is layout chrome rather than route content, so it
22869
- * outlives the embed in practice; and if it does go, the host element goes
22870
- * with it and this instance is remounting anyway.
22871
- * `reconcilePreRenderContainer` re-runs this on a detached container.
23134
+ * Resolves the configured preRenderContainer to a live element, falling
23135
+ * back to `document.body`. A string selector is re-queried on every call so
23136
+ * a remounted container (E.g.: React replacing the node) resolves to the
23137
+ * fresh element; an element passed directly cannot be re-resolved.
22872
23138
  */
22873
23139
  resolvePreRenderContainerTarget() {
22874
23140
  var _a;
@@ -22888,13 +23154,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
22888
23154
  else if (containerConfig) {
22889
23155
  container = containerConfig;
22890
23156
  }
22891
- if (container) {
22892
- return container;
22893
- }
22894
- if (!this.hostElement) {
22895
- return document.body;
22896
- }
22897
- return (_a = getScrollableAncestors(this.hostElement)[0]) !== null && _a !== void 0 ? _a : document.body;
23157
+ return (_a = container) !== null && _a !== void 0 ? _a : document.body;
22898
23158
  }
22899
23159
  inheritPreRenderContainer() {
22900
23160
  var _a;
@@ -22939,9 +23199,8 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
22939
23199
  * Re-attaches the wrapper to a live container when the previously resolved
22940
23200
  * one has been detached or no longer holds the wrapper — e.g. the host app
22941
23201
  * remounted a custom preRenderContainer, which would otherwise leave a stale
22942
- * reference and collapse the wrapper. Selectors and the auto-resolved
22943
- * scrolling ancestor are both re-resolved; a container passed as an element
22944
- * is left untouched, as there is nothing to re-query.
23202
+ * reference and collapse the wrapper. Only string selectors can be
23203
+ * re-resolved; a container passed as an element is left untouched.
22945
23204
  */
22946
23205
  reconcilePreRenderContainer() {
22947
23206
  const wrapper = this.preRenderWrapper;
@@ -22960,6 +23219,14 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
22960
23219
  if (resolved === stored && stored.contains(wrapper)) {
22961
23220
  return;
22962
23221
  }
23222
+ if (this.containerScrollListener && stored !== resolved) {
23223
+ if (stored !== document.body) {
23224
+ stored.removeEventListener('scroll', this.containerScrollListener);
23225
+ }
23226
+ if (resolved !== document.body) {
23227
+ resolved.addEventListener('scroll', this.containerScrollListener);
23228
+ }
23229
+ }
22963
23230
  this.preRenderContainerEl = resolved;
22964
23231
  this.applyPreRenderContainerPositioning();
22965
23232
  if (wrapper.parentNode !== resolved) {
@@ -23021,12 +23288,11 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
23021
23288
  */
23022
23289
  setIFrameHeight(height) {
23023
23290
  if (this.isPreRendered) {
23024
- const next = getCssDimension(height);
23025
23291
  if (this.insertedDomEl) {
23026
- this.insertedDomEl.style.height = next;
23292
+ this.insertedDomEl.style.height = getCssDimension(height);
23027
23293
  }
23028
23294
  else if (this.preRenderWrapper) {
23029
- this.preRenderWrapper.style.height = next;
23295
+ this.preRenderWrapper.style.height = getCssDimension(height);
23030
23296
  }
23031
23297
  }
23032
23298
  else {
@@ -23310,9 +23576,16 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
23310
23576
  * @param args
23311
23577
  */
23312
23578
  async render() {
23579
+ var _a, _b, _c;
23313
23580
  uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_RENDER_CALLED, {
23314
23581
  embedComponentType: this.viewConfig.embedComponentType,
23315
23582
  });
23583
+ uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_INIT_ACTIONS, {
23584
+ embedComponentType: this.viewConfig.embedComponentType,
23585
+ hiddenActions: (_a = this.viewConfig.hiddenActions) !== null && _a !== void 0 ? _a : [],
23586
+ visibleActions: (_b = this.viewConfig.visibleActions) !== null && _b !== void 0 ? _b : [],
23587
+ disabledActions: (_c = this.viewConfig.disabledActions) !== null && _c !== void 0 ? _c : [],
23588
+ });
23316
23589
  if (!getIsInitCalled()) {
23317
23590
  logger$3.error(ERROR_MESSAGE.RENDER_CALLED_BEFORE_INIT);
23318
23591
  }
@@ -23461,47 +23734,34 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
23461
23734
  delete container.dataset[PRERENDER_CONTAINER_ORIGINAL_POSITION_KEY];
23462
23735
  }
23463
23736
  /**
23464
- * Re-sizes the wrapper when its placeholder changes size.
23465
- *
23466
- * Position deliberately has no equivalent. An absolutely positioned wrapper
23467
- * follows its containing block for free, so a correctly placed frame is the
23468
- * browser's job and costs nothing; repositioning it on scroll would mean a
23469
- * layout read and a style write per frame to compensate for placing it in
23470
- * the wrong box. Size is the one thing the browser will not do for us: the
23471
- * placeholder grows when the embedded app reports a new height, and the
23472
- * wrapper has to be told.
23473
- */
23474
- observePreRenderSize() {
23475
- var _a;
23476
- if (this.getPreRenderConfig().doNotTrackSize || typeof ResizeObserver === 'undefined') {
23477
- return;
23478
- }
23479
- const placeholder = this.getPreRenderPlaceHolderElement();
23480
- if (!placeholder) {
23737
+ * Detaches and clears the container scroll listener, if one is attached.
23738
+ */
23739
+ removeContainerScrollListener() {
23740
+ if (!this.containerScrollListener) {
23481
23741
  return;
23482
23742
  }
23483
- (_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
23484
- this.resizeObserver = new ResizeObserver(() => this.syncPreRenderStyle());
23485
- this.resizeObserver.observe(placeholder);
23743
+ const customContainer = this.getCustomPreRenderContainer();
23744
+ customContainer === null || customContainer === void 0 ? void 0 : customContainer.removeEventListener('scroll', this.containerScrollListener);
23745
+ this.containerScrollListener = null;
23486
23746
  }
23487
23747
  /**
23488
23748
  * Destroys the ThoughtSpot embed, and remove any nodes from the DOM.
23489
23749
  * @version SDK: 1.19.1 | ThoughtSpot: *
23490
23750
  */
23491
23751
  destroy() {
23492
- var _a, _b, _c, _d;
23752
+ var _a, _b, _c;
23493
23753
  try {
23494
23754
  this.removeFullscreenChangeHandler();
23495
- (_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
23755
+ this.removeContainerScrollListener();
23496
23756
  this.unsubscribeToEvents();
23497
- (_b = this.preRenderWrapper) === null || _b === void 0 ? void 0 : _b.remove();
23757
+ (_a = this.preRenderWrapper) === null || _a === void 0 ? void 0 : _a.remove();
23498
23758
  this.restorePreRenderContainerPosition();
23499
23759
  if (!this.isRendered) {
23500
23760
  return;
23501
23761
  }
23502
23762
  if (!getEmbedConfig().waitForCleanupOnDestroy) {
23503
23763
  this.trigger(exports.HostEvent.DestroyEmbed);
23504
- (_d = (_c = this.insertedDomEl) === null || _c === void 0 ? void 0 : _c.parentNode) === null || _d === void 0 ? void 0 : _d.removeChild(this.insertedDomEl);
23764
+ (_c = (_b = this.insertedDomEl) === null || _b === void 0 ? void 0 : _b.parentNode) === null || _c === void 0 ? void 0 : _c.removeChild(this.insertedDomEl);
23505
23765
  }
23506
23766
  else {
23507
23767
  const cleanupTimeout = getEmbedConfig().cleanupTimeout;
@@ -23547,6 +23807,26 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
23547
23807
  this.isRendered = true;
23548
23808
  return this.renderIFrame(prerenderFrameSrc);
23549
23809
  }
23810
+ isConfigExcludedFromUrl() {
23811
+ var _a, _b, _c;
23812
+ const flag = (_b = (_a = this.viewConfig.additionalFlags) === null || _a === void 0 ? void 0 : _a.excludeConfigFromURL) !== null && _b !== void 0 ? _b : (_c = this.embedConfig.additionalFlags) === null || _c === void 0 ? void 0 : _c.excludeConfigFromURL;
23813
+ return flag === true || flag === 'true';
23814
+ }
23815
+ async triggerUpdateEmbedParams() {
23816
+ try {
23817
+ const params = await this.getUpdateEmbedParamsObject();
23818
+ this.trigger(exports.HostEvent.UpdateEmbedParams, params);
23819
+ }
23820
+ catch (error) {
23821
+ logger$3.error(ERROR_MESSAGE.UPDATE_PARAMS_FAILED, error);
23822
+ this.handleError({
23823
+ errorType: ErrorDetailsTypes.API,
23824
+ message: (error === null || error === void 0 ? void 0 : error.message) || ERROR_MESSAGE.UPDATE_PARAMS_FAILED,
23825
+ code: EmbedErrorCodes.UPDATE_PARAMS_FAILED,
23826
+ error: (error === null || error === void 0 ? void 0 : error.message) || error,
23827
+ });
23828
+ }
23829
+ }
23550
23830
  beforePrerenderVisible() {
23551
23831
  // We can ignore this as its a bit expensive and the newer customers
23552
23832
  // have moved on to UpdateEmbedParams supported clusters
@@ -23557,17 +23837,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
23557
23837
  this.preRenderParamsApplied = new Promise((resolve) => {
23558
23838
  this.executeAfterEmbedContainerLoaded(async () => {
23559
23839
  try {
23560
- const params = await this.getUpdateEmbedParamsObject();
23561
- this.trigger(exports.HostEvent.UpdateEmbedParams, params);
23562
- }
23563
- catch (error) {
23564
- logger$3.error(ERROR_MESSAGE.UPDATE_PARAMS_FAILED, error);
23565
- this.handleError({
23566
- errorType: ErrorDetailsTypes.API,
23567
- message: (error === null || error === void 0 ? void 0 : error.message) || ERROR_MESSAGE.UPDATE_PARAMS_FAILED,
23568
- code: EmbedErrorCodes.UPDATE_PARAMS_FAILED,
23569
- error: (error === null || error === void 0 ? void 0 : error.message) || error,
23570
- });
23840
+ await this.triggerUpdateEmbedParams();
23571
23841
  }
23572
23842
  finally {
23573
23843
  setTimeout(resolve, UPDATE_EMBED_PARAMS_SETTLE_MS);
@@ -23582,7 +23852,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
23582
23852
  * wrapper to overlay it.
23583
23853
  */
23584
23854
  async showPreRender() {
23585
- var _a;
23855
+ var _a, _b;
23586
23856
  uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_SHOW_PRE_RENDER, {
23587
23857
  preRenderId: this.getPreRenderConfig().id,
23588
23858
  embedComponentType: this.viewConfig.embedComponentType,
@@ -23601,16 +23871,14 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
23601
23871
  this.beforePrerenderVisible();
23602
23872
  if (this.hostElement) {
23603
23873
  this.insertedDomEl = this.createPreRenderPlaceholder();
23604
- // Carry a height fullHeight has already measured onto the fresh
23605
- // placeholder, so a re-show does not flash at frameParams height.
23606
- // UNMEASURED_WRAPPER_HEIGHT is what createPreRenderWrapper() seeds
23607
- // before anything has been measured; treating that as a measurement
23608
- // is what made a first reveal overshoot to a full viewport.
23609
- const wrapperHeight = this.preRenderWrapper.style.height;
23610
- if (this.viewConfig.fullHeight
23611
- && wrapperHeight
23612
- && wrapperHeight !== UNMEASURED_WRAPPER_HEIGHT) {
23613
- this.insertedDomEl.style.height = wrapperHeight;
23874
+ if (this.viewConfig.fullHeight) {
23875
+ // If fullHeight has already sized the wrapper, seed the
23876
+ // placeholder with the same height so syncPreRenderStyle gets
23877
+ // an accurate rect.
23878
+ const existingHeight = this.preRenderWrapper.style.height;
23879
+ if (existingHeight) {
23880
+ this.insertedDomEl.style.height = existingHeight;
23881
+ }
23614
23882
  }
23615
23883
  const placeHolderId = this.getPreRenderIds().placeHolder;
23616
23884
  // Remove any stale placeholder from a previous cycle. It is located
@@ -23624,19 +23892,29 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
23624
23892
  (_a = this.hostElement.querySelector(`#${placeHolderId}`)) === null || _a === void 0 ? void 0 : _a.remove();
23625
23893
  this.hostElement.appendChild(this.insertedDomEl);
23626
23894
  this.syncPreRenderStyle();
23627
- this.observePreRenderSize();
23895
+ const customContainer = this.getCustomPreRenderContainer();
23896
+ if (customContainer && !this.containerScrollListener) {
23897
+ this.containerScrollListener = () => this.syncPreRenderStyle();
23898
+ customContainer.addEventListener('scroll', this.containerScrollListener);
23899
+ }
23900
+ if (!this.getPreRenderConfig().doNotTrackSize) {
23901
+ const observeTarget = (_b = this.insertedDomEl) !== null && _b !== void 0 ? _b : this.hostElement;
23902
+ this.resizeObserver = new ResizeObserver((entries) => {
23903
+ entries.forEach((entry) => {
23904
+ if (entry.target === observeTarget) {
23905
+ this.syncPreRenderStyle();
23906
+ }
23907
+ });
23908
+ });
23909
+ this.resizeObserver.observe(observeTarget);
23910
+ }
23628
23911
  }
23629
23912
  removeStyleProperties(this.preRenderWrapper, [
23630
23913
  'z-index',
23631
23914
  'opacity',
23915
+ 'pointer-events',
23632
23916
  'overflow',
23633
- 'transform',
23634
23917
  ]);
23635
- // Set rather than removed: a container that carries `pointer-events:
23636
- // none` — the usual styling for a parking root that must not swallow
23637
- // clicks — passes it down, and dropping the property here would leave
23638
- // the inherited `none` in force and the frame dead to input.
23639
- setStyleProperties(this.preRenderWrapper, { pointerEvents: 'auto' });
23640
23918
  this.subscribeToEvents();
23641
23919
  // Setup fullscreen change handler for prerendered components
23642
23920
  if (this.iFrame) {
@@ -23689,7 +23967,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
23689
23967
  * If the component is not preRendered, it issues a warning.
23690
23968
  */
23691
23969
  hidePreRender() {
23692
- var _a;
23693
23970
  uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_HIDE_PRE_RENDER, {
23694
23971
  preRenderId: this.getPreRenderConfig().id,
23695
23972
  embedComponentType: this.viewConfig.embedComponentType,
@@ -23709,15 +23986,12 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
23709
23986
  top: '0',
23710
23987
  left: '0',
23711
23988
  overflow: 'hidden',
23712
- // Keeps the measured size — so the next show needs no resize, which
23713
- // is the point of pre-rendering — while lifting the box out of
23714
- // the container's scrollable area. Overflow only extends
23715
- // downwards, so a hidden frame parked above the top edge adds
23716
- // none, where one left at full height shows as blank scroll space.
23717
- transform: PRERENDER_PARKED_TRANSFORM,
23718
23989
  };
23719
23990
  setStyleProperties(this.preRenderWrapper, preRenderHideStyles);
23720
- (_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
23991
+ this.removeContainerScrollListener();
23992
+ if (this.resizeObserver) {
23993
+ this.resizeObserver.disconnect();
23994
+ }
23721
23995
  const placeHolderEle = this.getPreRenderPlaceHolderElement();
23722
23996
  if (placeHolderEle) {
23723
23997
  placeHolderEle.parentElement.removeChild(placeHolderEle);
@@ -23902,7 +24176,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
23902
24176
  * @param dataSources A list of data source GUIDs
23903
24177
  */
23904
24178
  getIFrameSrc() {
23905
- const queryParams = this.getEmbedParamsObject();
24179
+ const queryParams = this.getUrlQueryParamsObject();
23906
24180
  const path = 'search-bar-embed';
23907
24181
  let query = '';
23908
24182
  const queryParamsString = getQueryParamString(queryParams, true);
@@ -24089,7 +24363,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
24089
24363
  }
24090
24364
  getEmbedParams() {
24091
24365
  const { runtimeParameters, runtimeFilters, excludeRuntimeParametersfromURL, excludeRuntimeFiltersfromURL, } = this.viewConfig;
24092
- const queryParams = this.getEmbedParamsObject();
24366
+ const queryParams = this.getUrlQueryParamsObject();
24093
24367
  let query = '';
24094
24368
  const queryParamsString = getQueryParamString(queryParams, true);
24095
24369
  if (queryParamsString) {
@@ -24485,7 +24759,19 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
24485
24759
  spotterAnalystConfig,
24486
24760
  },
24487
24761
  };
24488
- }
24762
+ }
24763
+ /**
24764
+ * The Spotter experience version to load in the embedded view.
24765
+ * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.11.0.cl
24766
+ * @group Embed components
24767
+ */
24768
+ var SpotterExperienceVersion;
24769
+ (function (SpotterExperienceVersion) {
24770
+ /**
24771
+ * The Spotter experience version introduced in ThoughtSpot 26.11.
24772
+ */
24773
+ SpotterExperienceVersion["SPOTTER_2026_11"] = "spotter_2026_11";
24774
+ })(SpotterExperienceVersion || (SpotterExperienceVersion = {}));
24489
24775
 
24490
24776
  function buildSpotterVizAppInitData(initData, viewConfig) {
24491
24777
  const { spotterViz } = viewConfig;
@@ -24682,12 +24968,12 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
24682
24968
  * embedded Liveboard or visualization.
24683
24969
  */
24684
24970
  getEmbedParams() {
24685
- const params = this.getEmbedParamsObject();
24971
+ const params = this.getUrlQueryParamsObject();
24686
24972
  return getQueryParamString(params, true);
24687
24973
  }
24688
24974
  getEmbedParamsObject() {
24689
24975
  var _a;
24690
- const { tag, hideTagFilterChips, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideHamburger, hideObjectSearch, hideNotification, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, newConnectionsExperience, dataPanelV2 = true, updatedSpotterExperience, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, showMaskedFilterChip = false, isLiveboardMasterpiecesEnabled, newChartsLibrary, hideHomepageLeftNav = false, modularHomeExperience, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, enable2ColumnLayout, isLiveboardAlwaysOn12ColLayout, enableCustomColumnGroups = false, dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs, isEnhancedFilterInteractivityEnabled, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, discoveryExperience, coverAndFilterOptionInPDF, isLiveboardStylingAndGroupingEnabled, liveboardGutter, isPNGInScheduledEmailsEnabled = false, isLiveboardXLSXCSVDownloadEnabled, isGranularXLSXCSVSchedulesEnabled, isCentralizedLiveboardFilterUXEnabled = false, isScopedLiveboardFilteringEnabled, isLinkParametersEnabled, updatedSpotterChatPrompt, showSpotterRadiance, defaultQueryMode, enableStopAnswerGenerationEmbed, spotterChatConfig, spotterDataSources, isThisPeriodInDateFiltersEnabled, enableHomepageAnnouncement = false, isContinuousLiveboardPDFEnabled, enableLiveboardDataCache, hideAnswerEditPanel, } = this.viewConfig;
24976
+ const { tag, hideTagFilterChips, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideHamburger, hideObjectSearch, hideNotification, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, newConnectionsExperience, dataPanelV2 = true, updatedSpotterExperience, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, showMaskedFilterChip = false, isLiveboardMasterpiecesEnabled, newChartsLibrary, hideHomepageLeftNav = false, modularHomeExperience, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, enable2ColumnLayout, isLiveboardAlwaysOn12ColLayout, enableCustomColumnGroups = false, dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs, isEnhancedFilterInteractivityEnabled, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, discoveryExperience, coverAndFilterOptionInPDF, isLiveboardStylingAndGroupingEnabled, liveboardGutter, isPNGInScheduledEmailsEnabled = false, isLiveboardXLSXCSVDownloadEnabled, isGranularXLSXCSVSchedulesEnabled, isCentralizedLiveboardFilterUXEnabled = false, isScopedLiveboardFilteringEnabled, isLinkParametersEnabled, updatedSpotterChatPrompt, showSpotterRadiance, defaultQueryMode, enableStopAnswerGenerationEmbed, spotterChatConfig, spotterDataSources, isThisPeriodInDateFiltersEnabled, enableHomepageAnnouncement = false, isContinuousLiveboardPDFEnabled, enableLiveboardDataCache, hideAnswerEditPanel, spotterExperienceVersion, } = this.viewConfig;
24691
24977
  let params = {};
24692
24978
  params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
24693
24979
  params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
@@ -24742,6 +25028,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
24742
25028
  if (spotterDataSources && spotterDataSources.length) {
24743
25029
  params[Param.SpotterDataSources] = JSON.stringify(spotterDataSources);
24744
25030
  }
25031
+ if (spotterExperienceVersion !== undefined) {
25032
+ params[Param.SpotterExperienceVersion] = spotterExperienceVersion;
25033
+ }
24745
25034
  // Handle spotterChatConfig params
24746
25035
  if (spotterChatConfig) {
24747
25036
  const { hideToolResponseCardBranding, toolResponseCardBrandingLabel, spotterFileUploadEnabled, spotterFileUploadFileTypes, enableStarterPrompts, openSpotterOnLiveboardByDefault, } = spotterChatConfig;
@@ -24860,7 +25149,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
24860
25149
  }
24861
25150
  // Navigation V1/V2 and home page V1/V2 are deprecated. V3 is now the
24862
25151
  // default experience, Need to send navigationVersion=v3 and
24863
- // homepageVersion=v3 even when the no discoveryExperience /
25152
+ // homepageVersion=v3 even when the no discoveryExperience /
24864
25153
  // modularHomeExperience config is set. Without these
24865
25154
  // params, older TSA versions (< 26.7) fall back to V2 for nav and
24866
25155
  // home page, so the defaults must be sent explicitly from the SDK.
@@ -24999,46 +25288,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
24999
25288
  }
25000
25289
  };
25001
25290
 
25002
- /**
25003
- * This method is like `_.isEqual` except that it accepts `customizer` which
25004
- * is invoked to compare values. If `customizer` returns `undefined`, comparisons
25005
- * are handled by the method instead. The `customizer` is invoked with up to
25006
- * six arguments: (objValue, othValue [, index|key, object, other, stack]).
25007
- *
25008
- * @static
25009
- * @memberOf _
25010
- * @since 4.0.0
25011
- * @category Lang
25012
- * @param {*} value The value to compare.
25013
- * @param {*} other The other value to compare.
25014
- * @param {Function} [customizer] The function to customize comparisons.
25015
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
25016
- * @example
25017
- *
25018
- * function isGreeting(value) {
25019
- * return /^h(?:i|ello)$/.test(value);
25020
- * }
25021
- *
25022
- * function customizer(objValue, othValue) {
25023
- * if (isGreeting(objValue) && isGreeting(othValue)) {
25024
- * return true;
25025
- * }
25026
- * }
25027
- *
25028
- * var array = ['hello', 'goodbye'];
25029
- * var other = ['hi', 'goodbye'];
25030
- *
25031
- * _.isEqualWith(array, other, customizer);
25032
- * // => true
25033
- */
25034
- function isEqualWith(value, other, customizer) {
25035
- customizer = typeof customizer == 'function' ? customizer : undefined;
25036
- var result = customizer ? customizer(value, other) : undefined;
25037
- return result === undefined ? _baseIsEqual(value, other, undefined, customizer) : !!result;
25038
- }
25039
-
25040
- var isEqualWith_1 = isEqualWith;
25041
-
25042
25291
  const getPreviewQuery = `
25043
25292
  query GetEurekaVizSnapshots(
25044
25293
  $vizId: String!, $liveboardId: String!) {
@@ -25109,6 +25358,21 @@ query GetEurekaVizSnapshots(
25109
25358
  document.head.insertAdjacentHTML('beforeend', previewStyles);
25110
25359
  };
25111
25360
 
25361
+ function buildLiveboardOverrideAppInitData(initData, viewConfig) {
25362
+ var _a;
25363
+ const { liveboardOverride } = viewConfig;
25364
+ // ThoughtSpot ignores an override with no data source entries; skip it.
25365
+ if (!((_a = liveboardOverride === null || liveboardOverride === void 0 ? void 0 : liveboardOverride.dataSourceOverride) === null || _a === void 0 ? void 0 : _a.length))
25366
+ return initData;
25367
+ return {
25368
+ ...initData,
25369
+ embedParams: {
25370
+ ...(initData.embedParams || {}),
25371
+ liveboardOverride,
25372
+ },
25373
+ };
25374
+ }
25375
+
25112
25376
  /**
25113
25377
  * Copyright (c) 2022
25114
25378
  *
@@ -25138,11 +25402,6 @@ query GetEurekaVizSnapshots(
25138
25402
  * })
25139
25403
  * ```
25140
25404
  */
25141
- /**
25142
- * A shallow copy without the keys whose value is `undefined`, so a key that was
25143
- * assigned `undefined` compares equal to one that was never set.
25144
- */
25145
- const definedEntries = (config = {}) => Object.fromEntries(Object.entries(config).filter(([, value]) => value !== undefined));
25146
25405
  let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
25147
25406
  constructor(domSelector, viewConfig) {
25148
25407
  viewConfig.embedComponentType = 'LiveboardEmbed';
@@ -25178,14 +25437,15 @@ query GetEurekaVizSnapshots(
25178
25437
  async getAppInitData() {
25179
25438
  const defaultAppInitData = await super.getAppInitData();
25180
25439
  const vizInitData = buildSpotterVizAppInitData(defaultAppInitData, this.viewConfig);
25181
- return buildStarterPromptsAppInitData(vizInitData, this.viewConfig);
25440
+ const starterPromptsInitData = buildStarterPromptsAppInitData(vizInitData, this.viewConfig);
25441
+ return buildLiveboardOverrideAppInitData(starterPromptsInitData, this.viewConfig);
25182
25442
  }
25183
25443
  /**
25184
25444
  * Construct a map of params to be passed on to the
25185
25445
  * embedded Liveboard or visualization.
25186
25446
  */
25187
25447
  getEmbedParams() {
25188
- const params = this.getEmbedParamsObject();
25448
+ const params = this.getUrlQueryParamsObject();
25189
25449
  const queryParams = getQueryParamString(params, true);
25190
25450
  return queryParams;
25191
25451
  }
@@ -25193,7 +25453,7 @@ query GetEurekaVizSnapshots(
25193
25453
  var _a;
25194
25454
  let params = {};
25195
25455
  params = this.getBaseQueryParams(params);
25196
- const { enableVizTransformations, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, isLiveboardCompactHeaderEnabled, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs, showMaskedFilterChip = false, isLiveboardMasterpiecesEnabled, newChartsLibrary, isEnhancedFilterInteractivityEnabled, enableAskSage, enable2ColumnLayout, isLiveboardAlwaysOn12ColLayout, dataPanelV2 = true, updatedSpotterExperience, enableCustomColumnGroups = false, oAuthPollingInterval, isForceRedirect, dataSourceId, coverAndFilterOptionInPDF, isLiveboardStylingAndGroupingEnabled, liveboardGutter, isPNGInScheduledEmailsEnabled = false, isLiveboardXLSXCSVDownloadEnabled, isGranularXLSXCSVSchedulesEnabled, showSpotterLimitations, isCentralizedLiveboardFilterUXEnabled = false, isScopedLiveboardFilteringEnabled, isLinkParametersEnabled, updatedSpotterChatPrompt, showSpotterRadiance, enableStopAnswerGenerationEmbed, spotterChatConfig, isThisPeriodInDateFiltersEnabled, isContinuousLiveboardPDFEnabled, enableLiveboardDataCache, } = this.viewConfig;
25456
+ const { enableVizTransformations, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, isLiveboardCompactHeaderEnabled, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs, showMaskedFilterChip = false, isLiveboardMasterpiecesEnabled, newChartsLibrary, isEnhancedFilterInteractivityEnabled, enableAskSage, enable2ColumnLayout, isLiveboardAlwaysOn12ColLayout, dataPanelV2 = true, updatedSpotterExperience, enableCustomColumnGroups = false, oAuthPollingInterval, isForceRedirect, dataSourceId, coverAndFilterOptionInPDF, isLiveboardStylingAndGroupingEnabled, liveboardGutter, isPNGInScheduledEmailsEnabled = false, isLiveboardXLSXCSVDownloadEnabled, isGranularXLSXCSVSchedulesEnabled, showSpotterLimitations, isCentralizedLiveboardFilterUXEnabled = false, isScopedLiveboardFilteringEnabled, isLinkParametersEnabled, updatedSpotterChatPrompt, showSpotterRadiance, enableStopAnswerGenerationEmbed, spotterChatConfig, isThisPeriodInDateFiltersEnabled, isContinuousLiveboardPDFEnabled, enableLiveboardDataCache, spotterExperienceVersion, } = this.viewConfig;
25197
25457
  const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
25198
25458
  || this.viewConfig.preventPinboardFilterRemoval;
25199
25459
  (_a = this.fullHeightController) === null || _a === void 0 ? void 0 : _a.addQueryParams(params);
@@ -25255,6 +25515,9 @@ query GetEurekaVizSnapshots(
25255
25515
  if (isLiveboardStylingAndGroupingEnabled !== undefined) {
25256
25516
  params[Param.IsLiveboardStylingAndGroupingEnabled] = isLiveboardStylingAndGroupingEnabled;
25257
25517
  }
25518
+ if (spotterExperienceVersion !== undefined) {
25519
+ params[Param.SpotterExperienceVersion] = spotterExperienceVersion;
25520
+ }
25258
25521
  if (liveboardGutter !== undefined) {
25259
25522
  params[Param.LiveboardGutter] = liveboardGutter;
25260
25523
  }
@@ -25424,12 +25687,10 @@ query GetEurekaVizSnapshots(
25424
25687
  beforePrerenderVisible() {
25425
25688
  super.beforePrerenderVisible();
25426
25689
  // Captured before showPreRender() hands the wrapper over to this
25427
- // instance. React builds a new instance per mount, so an equal config
25428
- // is a hide/show, not a hand-over: there is nothing stale to clear.
25690
+ // instance. Itself means a hide/show, not a hand-over, so there is
25691
+ // nothing stale to clear.
25429
25692
  const previous = this.getPreRenderObj();
25430
- const showing = this.isSameEmbedConfig(previous)
25431
- ? undefined
25432
- : previous === null || previous === void 0 ? void 0 : previous.currentLiveboardState;
25693
+ const showing = previous === this ? undefined : previous === null || previous === void 0 ? void 0 : previous.currentLiveboardState;
25433
25694
  this.executeAfterEmbedContainerLoaded(async () => {
25434
25695
  // Without this the params callback suspends on its await and
25435
25696
  // Navigate goes out first, so the container loads with the previous
@@ -25456,25 +25717,6 @@ query GetEurekaVizSnapshots(
25456
25717
  };
25457
25718
  });
25458
25719
  }
25459
- /**
25460
- * Whether `previous` was showing what this instance is about to show.
25461
- *
25462
- * Undefined-valued keys are dropped before comparing. `navigateToLiveboard`
25463
- * assigns `vizId`, `activeTabId` and `personalizedViewId` unconditionally,
25464
- * so an instance that has been shown once carries those keys as `undefined`
25465
- * while a freshly constructed one does not have them at all. `isEqual`
25466
- * counts own keys, so without this the comparison can never be true after
25467
- * the first show — which is the whole case this exists for.
25468
- *
25469
- * Callbacks compare as equal: React passes a fresh closure per render.
25470
- */
25471
- isSameEmbedConfig(previous) {
25472
- if (!previous)
25473
- return false;
25474
- if (previous === this)
25475
- return true;
25476
- return isEqualWith_1(definedEntries(previous.viewConfig), definedEntries(this.viewConfig), (a, b) => (typeof a === 'function' && typeof b === 'function' ? true : undefined));
25477
- }
25478
25720
  // The whole route, not just the liveboard id: the path is built from the
25479
25721
  // viz, tab and view too, so a same-liveboard show onto another tab is a
25480
25722
  // real navigation.
@@ -25979,7 +26221,7 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
25979
26221
  getIframeSrc() {
25980
26222
  const { sessionId, genNo, acSessionId, acGenNo, convId, messageId, } = this.viewConfig;
25981
26223
  const path = 'conv-assist-answer';
25982
- const queryParams = this.getEmbedParamsObject();
26224
+ const queryParams = this.getUrlQueryParamsObject();
25983
26225
  let query = '';
25984
26226
  const queryParamsString = getQueryParamString(queryParams, true);
25985
26227
  if (queryParamsString) {
@@ -26171,18 +26413,22 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
26171
26413
  }
26172
26414
  }
26173
26415
  setParamIfDefined(queryParams, Param.UpdatedSpotterExperience, updatedSpotterExperience, true);
26416
+ setParamIfDefined(queryParams, Param.SpotterExperienceVersion, this.viewConfig.spotterExperienceVersion);
26174
26417
  return queryParams;
26175
26418
  }
26176
26419
  getIframeSrc() {
26177
- const { worksheetId, searchOptions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, sharedConversationId, dataSources, } = this.viewConfig;
26420
+ const { worksheetId, searchOptions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, sharedConversationId, dataSources, spotterExperienceVersion, } = this.viewConfig;
26178
26421
  // Deep-link into the read-only shared-conversation reader view when a
26179
26422
  // shared conversation id is supplied (e.g. a recipient landing from a
26180
26423
  // host-configured CONVERSATION_URL share link); otherwise the normal
26181
26424
  // Spotter conversation surface.
26182
- const path = sharedConversationId
26425
+ let path = sharedConversationId
26183
26426
  ? `insights/conv-assist/s/${encodeURIComponent(sharedConversationId)}`
26184
26427
  : 'insights/conv-assist';
26185
- const queryParams = this.getEmbedParamsObject();
26428
+ if (spotterExperienceVersion === SpotterExperienceVersion.SPOTTER_2026_11) {
26429
+ path = path.replace('insights/conv-assist', 'insights/spotter');
26430
+ }
26431
+ const queryParams = this.getUrlQueryParamsObject();
26186
26432
  let query = '';
26187
26433
  const queryParamsString = getQueryParamString(queryParams, true);
26188
26434
  if (queryParamsString) {