@thoughtspot/visual-embed-sdk 1.53.0 → 1.53.2-beta

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 (203) hide show
  1. package/cjs/package.json +1 -1
  2. package/cjs/src/auth.d.ts.map +1 -1
  3. package/cjs/src/auth.js +25 -6
  4. package/cjs/src/auth.js.map +1 -1
  5. package/cjs/src/auth.spec.js +40 -8
  6. package/cjs/src/auth.spec.js.map +1 -1
  7. package/cjs/src/contracts/contracts.spec.js +169 -2
  8. package/cjs/src/contracts/contracts.spec.js.map +1 -1
  9. package/cjs/src/contracts/embed-event-payloads.d.ts +212 -14
  10. package/cjs/src/contracts/embed-event-payloads.d.ts.map +1 -1
  11. package/cjs/src/contracts/host-event-contracts.d.ts +11 -0
  12. package/cjs/src/contracts/host-event-contracts.d.ts.map +1 -1
  13. package/cjs/src/css-variables.d.ts +140 -0
  14. package/cjs/src/css-variables.d.ts.map +1 -1
  15. package/cjs/src/embed/app.d.ts +1 -0
  16. package/cjs/src/embed/app.d.ts.map +1 -1
  17. package/cjs/src/embed/app.js.map +1 -1
  18. package/cjs/src/embed/auto-frame-renderer.d.ts +14 -1
  19. package/cjs/src/embed/auto-frame-renderer.d.ts.map +1 -1
  20. package/cjs/src/embed/auto-frame-renderer.js +91 -2
  21. package/cjs/src/embed/auto-frame-renderer.js.map +1 -1
  22. package/cjs/src/embed/auto-frame-renderer.spec.js +112 -7
  23. package/cjs/src/embed/auto-frame-renderer.spec.js.map +1 -1
  24. package/cjs/src/embed/conversation.d.ts +14 -0
  25. package/cjs/src/embed/conversation.d.ts.map +1 -1
  26. package/cjs/src/embed/conversation.js.map +1 -1
  27. package/cjs/src/embed/conversation.spec.js +22 -0
  28. package/cjs/src/embed/conversation.spec.js.map +1 -1
  29. package/cjs/src/embed/host-events.spec.js +50 -0
  30. package/cjs/src/embed/host-events.spec.js.map +1 -1
  31. package/cjs/src/embed/liveboard.d.ts +2 -16
  32. package/cjs/src/embed/liveboard.d.ts.map +1 -1
  33. package/cjs/src/embed/liveboard.js +29 -10
  34. package/cjs/src/embed/liveboard.js.map +1 -1
  35. package/cjs/src/embed/liveboard.spec.js +139 -0
  36. package/cjs/src/embed/liveboard.spec.js.map +1 -1
  37. package/cjs/src/embed/spotter-utils.d.ts +1 -0
  38. package/cjs/src/embed/spotter-utils.d.ts.map +1 -1
  39. package/cjs/src/embed/spotter-utils.js +7 -1
  40. package/cjs/src/embed/spotter-utils.js.map +1 -1
  41. package/cjs/src/embed/spotter-utils.spec.js +19 -0
  42. package/cjs/src/embed/spotter-utils.spec.js.map +1 -1
  43. package/cjs/src/embed/ts-embed.d.ts +21 -16
  44. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  45. package/cjs/src/embed/ts-embed.js +77 -63
  46. package/cjs/src/embed/ts-embed.js.map +1 -1
  47. package/cjs/src/embed/ts-embed.spec.js +240 -7
  48. package/cjs/src/embed/ts-embed.spec.js.map +1 -1
  49. package/cjs/src/index.d.ts +2 -2
  50. package/cjs/src/index.d.ts.map +1 -1
  51. package/cjs/src/index.js.map +1 -1
  52. package/cjs/src/react/all-types-export.d.ts +1 -1
  53. package/cjs/src/react/all-types-export.d.ts.map +1 -1
  54. package/cjs/src/react/all-types-export.js.map +1 -1
  55. package/cjs/src/react/util.d.ts +8 -1
  56. package/cjs/src/react/util.d.ts.map +1 -1
  57. package/cjs/src/react/util.js.map +1 -1
  58. package/cjs/src/types.d.ts +249 -2
  59. package/cjs/src/types.d.ts.map +1 -1
  60. package/cjs/src/types.js +247 -0
  61. package/cjs/src/types.js.map +1 -1
  62. package/cjs/src/utils/runtimeTelemetry.d.ts +11 -0
  63. package/cjs/src/utils/runtimeTelemetry.d.ts.map +1 -0
  64. package/cjs/src/utils/runtimeTelemetry.js +34 -0
  65. package/cjs/src/utils/runtimeTelemetry.js.map +1 -0
  66. package/cjs/src/utils/runtimeTelemetry.spec.d.ts +2 -0
  67. package/cjs/src/utils/runtimeTelemetry.spec.d.ts.map +1 -0
  68. package/cjs/src/utils/runtimeTelemetry.spec.js +124 -0
  69. package/cjs/src/utils/runtimeTelemetry.spec.js.map +1 -0
  70. package/dist/{index-CyDR8j_0.js → index-DQ7r5f1z.js} +1 -1
  71. package/dist/src/auth.d.ts.map +1 -1
  72. package/dist/src/contracts/embed-event-payloads.d.ts +212 -14
  73. package/dist/src/contracts/embed-event-payloads.d.ts.map +1 -1
  74. package/dist/src/contracts/host-event-contracts.d.ts +11 -0
  75. package/dist/src/contracts/host-event-contracts.d.ts.map +1 -1
  76. package/dist/src/css-variables.d.ts +140 -0
  77. package/dist/src/css-variables.d.ts.map +1 -1
  78. package/dist/src/embed/app.d.ts +1 -0
  79. package/dist/src/embed/app.d.ts.map +1 -1
  80. package/dist/src/embed/auto-frame-renderer.d.ts +14 -1
  81. package/dist/src/embed/auto-frame-renderer.d.ts.map +1 -1
  82. package/dist/src/embed/conversation.d.ts +14 -0
  83. package/dist/src/embed/conversation.d.ts.map +1 -1
  84. package/dist/src/embed/liveboard.d.ts +2 -16
  85. package/dist/src/embed/liveboard.d.ts.map +1 -1
  86. package/dist/src/embed/spotter-utils.d.ts +1 -0
  87. package/dist/src/embed/spotter-utils.d.ts.map +1 -1
  88. package/dist/src/embed/ts-embed.d.ts +21 -16
  89. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  90. package/dist/src/index.d.ts +2 -2
  91. package/dist/src/index.d.ts.map +1 -1
  92. package/dist/src/react/all-types-export.d.ts +1 -1
  93. package/dist/src/react/all-types-export.d.ts.map +1 -1
  94. package/dist/src/react/util.d.ts +8 -1
  95. package/dist/src/react/util.d.ts.map +1 -1
  96. package/dist/src/types.d.ts +249 -2
  97. package/dist/src/types.d.ts.map +1 -1
  98. package/dist/src/utils/runtimeTelemetry.d.ts +11 -0
  99. package/dist/src/utils/runtimeTelemetry.d.ts.map +1 -0
  100. package/dist/src/utils/runtimeTelemetry.spec.d.ts +2 -0
  101. package/dist/src/utils/runtimeTelemetry.spec.d.ts.map +1 -0
  102. package/dist/tsembed-react.es.js +474 -84
  103. package/dist/tsembed-react.js +473 -83
  104. package/dist/tsembed.es.js +542 -85
  105. package/dist/tsembed.js +541 -84
  106. package/dist/visual-embed-sdk-react-full.d.ts +649 -30
  107. package/dist/visual-embed-sdk-react.d.ts +646 -28
  108. package/dist/visual-embed-sdk.d.ts +642 -44
  109. package/lib/package.json +1 -1
  110. package/lib/src/auth.d.ts.map +1 -1
  111. package/lib/src/auth.js +25 -6
  112. package/lib/src/auth.js.map +1 -1
  113. package/lib/src/auth.spec.js +40 -8
  114. package/lib/src/auth.spec.js.map +1 -1
  115. package/lib/src/contracts/contracts.spec.js +169 -2
  116. package/lib/src/contracts/contracts.spec.js.map +1 -1
  117. package/lib/src/contracts/embed-event-payloads.d.ts +212 -14
  118. package/lib/src/contracts/embed-event-payloads.d.ts.map +1 -1
  119. package/lib/src/contracts/host-event-contracts.d.ts +11 -0
  120. package/lib/src/contracts/host-event-contracts.d.ts.map +1 -1
  121. package/lib/src/css-variables.d.ts +140 -0
  122. package/lib/src/css-variables.d.ts.map +1 -1
  123. package/lib/src/embed/app.d.ts +1 -0
  124. package/lib/src/embed/app.d.ts.map +1 -1
  125. package/lib/src/embed/app.js.map +1 -1
  126. package/lib/src/embed/auto-frame-renderer.d.ts +14 -1
  127. package/lib/src/embed/auto-frame-renderer.d.ts.map +1 -1
  128. package/lib/src/embed/auto-frame-renderer.js +91 -2
  129. package/lib/src/embed/auto-frame-renderer.js.map +1 -1
  130. package/lib/src/embed/auto-frame-renderer.spec.js +113 -8
  131. package/lib/src/embed/auto-frame-renderer.spec.js.map +1 -1
  132. package/lib/src/embed/conversation.d.ts +14 -0
  133. package/lib/src/embed/conversation.d.ts.map +1 -1
  134. package/lib/src/embed/conversation.js.map +1 -1
  135. package/lib/src/embed/conversation.spec.js +22 -0
  136. package/lib/src/embed/conversation.spec.js.map +1 -1
  137. package/lib/src/embed/host-events.spec.js +50 -0
  138. package/lib/src/embed/host-events.spec.js.map +1 -1
  139. package/lib/src/embed/liveboard.d.ts +2 -16
  140. package/lib/src/embed/liveboard.d.ts.map +1 -1
  141. package/lib/src/embed/liveboard.js +28 -10
  142. package/lib/src/embed/liveboard.js.map +1 -1
  143. package/lib/src/embed/liveboard.spec.js +139 -0
  144. package/lib/src/embed/liveboard.spec.js.map +1 -1
  145. package/lib/src/embed/spotter-utils.d.ts +1 -0
  146. package/lib/src/embed/spotter-utils.d.ts.map +1 -1
  147. package/lib/src/embed/spotter-utils.js +7 -1
  148. package/lib/src/embed/spotter-utils.js.map +1 -1
  149. package/lib/src/embed/spotter-utils.spec.js +19 -0
  150. package/lib/src/embed/spotter-utils.spec.js.map +1 -1
  151. package/lib/src/embed/ts-embed.d.ts +21 -16
  152. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  153. package/lib/src/embed/ts-embed.js +78 -64
  154. package/lib/src/embed/ts-embed.js.map +1 -1
  155. package/lib/src/embed/ts-embed.spec.js +240 -7
  156. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  157. package/lib/src/index.d.ts +2 -2
  158. package/lib/src/index.d.ts.map +1 -1
  159. package/lib/src/index.js.map +1 -1
  160. package/lib/src/react/all-types-export.d.ts +1 -1
  161. package/lib/src/react/all-types-export.d.ts.map +1 -1
  162. package/lib/src/react/all-types-export.js.map +1 -1
  163. package/lib/src/react/util.d.ts +8 -1
  164. package/lib/src/react/util.d.ts.map +1 -1
  165. package/lib/src/react/util.js.map +1 -1
  166. package/lib/src/types.d.ts +249 -2
  167. package/lib/src/types.d.ts.map +1 -1
  168. package/lib/src/types.js +247 -0
  169. package/lib/src/types.js.map +1 -1
  170. package/lib/src/utils/runtimeTelemetry.d.ts +11 -0
  171. package/lib/src/utils/runtimeTelemetry.d.ts.map +1 -0
  172. package/lib/src/utils/runtimeTelemetry.js +28 -0
  173. package/lib/src/utils/runtimeTelemetry.js.map +1 -0
  174. package/lib/src/utils/runtimeTelemetry.spec.d.ts +2 -0
  175. package/lib/src/utils/runtimeTelemetry.spec.d.ts.map +1 -0
  176. package/lib/src/utils/runtimeTelemetry.spec.js +122 -0
  177. package/lib/src/utils/runtimeTelemetry.spec.js.map +1 -0
  178. package/lib/src/visual-embed-sdk.d.ts +642 -44
  179. package/package.json +1 -1
  180. package/src/auth.spec.ts +47 -11
  181. package/src/auth.ts +35 -6
  182. package/src/contracts/contracts.spec.ts +186 -3
  183. package/src/contracts/embed-event-payloads.ts +281 -14
  184. package/src/contracts/host-event-contracts.ts +14 -0
  185. package/src/css-variables.ts +168 -0
  186. package/src/embed/app.ts +1 -0
  187. package/src/embed/auto-frame-renderer.spec.ts +134 -8
  188. package/src/embed/auto-frame-renderer.ts +103 -2
  189. package/src/embed/conversation.spec.ts +24 -0
  190. package/src/embed/conversation.ts +14 -0
  191. package/src/embed/host-events.spec.ts +68 -0
  192. package/src/embed/liveboard.spec.ts +156 -0
  193. package/src/embed/liveboard.ts +34 -10
  194. package/src/embed/spotter-utils.spec.ts +20 -0
  195. package/src/embed/spotter-utils.ts +12 -1
  196. package/src/embed/ts-embed.spec.ts +297 -8
  197. package/src/embed/ts-embed.ts +79 -64
  198. package/src/index.ts +2 -0
  199. package/src/react/all-types-export.ts +1 -0
  200. package/src/react/util.ts +13 -1
  201. package/src/types.ts +249 -0
  202. package/src/utils/runtimeTelemetry.spec.ts +148 -0
  203. package/src/utils/runtimeTelemetry.ts +50 -0
@@ -1,4 +1,4 @@
1
- /* @thoughtspot/visual-embed-sdk version 1.53.0 */
1
+ /* @thoughtspot/visual-embed-sdk version 1.53.2-beta */
2
2
  'use client';
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) :
@@ -678,6 +678,7 @@
678
678
  * })
679
679
  * ```
680
680
  * @returns isLoggedIn - A Boolean specifying whether authentication was successful.
681
+ * Payload: {@link AuthInitPayload}.
681
682
  */
682
683
  EmbedEvent["AuthInit"] = "authInit";
683
684
  /**
@@ -697,6 +698,7 @@
697
698
  /**
698
699
  * Data pertaining to an Answer, Liveboard or Spotter visualization is received.
699
700
  * The event payload includes the raw data of the object.
701
+ * Payload: {@link DataEventPayload}.
700
702
  * @return data - Answer of Liveboard data
701
703
  * @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
702
704
  * @example
@@ -710,6 +712,7 @@
710
712
  EmbedEvent["Data"] = "data";
711
713
  /**
712
714
  * Search query has been updated by the user.
715
+ * Payload: {@link QueryChangedPayload} or a string.
713
716
  * @version SDK: 1.4.0 | ThoughtSpot: ts7.sep.cl, 8.4.1.sw
714
717
  * @example
715
718
  * ```js
@@ -752,6 +755,7 @@
752
755
  * })
753
756
  * })
754
757
  * ```
758
+ * Payload: {@link DrilldownPayload}.
755
759
  */
756
760
  EmbedEvent["Drilldown"] = "drillDown";
757
761
  /**
@@ -764,6 +768,7 @@
764
768
  * console.log('DataSourceSelected', payload);
765
769
  * })
766
770
  * ```
771
+ * Payload: {@link DataSourceSelectedPayload} or string[].
767
772
  */
768
773
  EmbedEvent["DataSourceSelected"] = "dataSourceSelected";
769
774
  /**
@@ -776,6 +781,7 @@
776
781
  * console.log('AddRemoveColumns', payload);
777
782
  * })
778
783
  * ```
784
+ * Payload: string[].
779
785
  */
780
786
  EmbedEvent["AddRemoveColumns"] = "addRemoveColumns";
781
787
  /**
@@ -793,6 +799,7 @@
793
799
  * }
794
800
  * })
795
801
  * ```
802
+ * Payload: {@link CustomActionPayload} (on() enriches it to {@link CustomActionEventPayload}).
796
803
  */
797
804
  EmbedEvent["CustomAction"] = "customAction";
798
805
  /**
@@ -805,6 +812,7 @@
805
812
  * console.log('VizPointDoubleClick', payload);
806
813
  * })
807
814
  * ```
815
+ * Payload: {@link VizInteractionPayload}.
808
816
  */
809
817
  EmbedEvent["VizPointDoubleClick"] = "vizPointDoubleClick";
810
818
  /**
@@ -824,6 +832,7 @@
824
832
  * )
825
833
  * });
826
834
  * ```
835
+ * Payload: {@link VizInteractionPayload}.
827
836
  */
828
837
  EmbedEvent["VizPointClick"] = "vizPointClick";
829
838
  /**
@@ -876,6 +885,7 @@
876
885
  * // { errorType: "API", message: '...', code: '...' }
877
886
  * });
878
887
  * ```
888
+ * Payload: {@link EmbedErrorPayload} or a string.
879
889
  */
880
890
  EmbedEvent["Error"] = "Error";
881
891
  /**
@@ -926,6 +936,7 @@
926
936
  * The center of visible iframe viewport is calculated.
927
937
  * @returns data - The center of the visible Iframe viewport.
928
938
  * @hidden
939
+ * Payload: none.
929
940
  */
930
941
  EmbedEvent["EmbedIframeCenter"] = "EmbedIframeCenter";
931
942
  /**
@@ -982,6 +993,7 @@
982
993
  * console.log('dialog open', payload);
983
994
  * })
984
995
  * ```
996
+ * Payload: none.
985
997
  */
986
998
  EmbedEvent["DialogOpen"] = "dialog-open";
987
999
  /**
@@ -993,6 +1005,7 @@
993
1005
  * console.log('dialog close', payload);
994
1006
  * })
995
1007
  * ```
1008
+ * Payload: none.
996
1009
  */
997
1010
  EmbedEvent["DialogClose"] = "dialog-close";
998
1011
  /**
@@ -1015,6 +1028,7 @@
1015
1028
  * embed.trigger(HostEvent.SetVisibleVizs, ['viz1', 'viz2']);
1016
1029
  * };
1017
1030
  * ```
1031
+ * Payload: none.
1018
1032
  */
1019
1033
  EmbedEvent["LiveboardRendered"] = "PinboardRendered";
1020
1034
  /**
@@ -1045,6 +1059,7 @@
1045
1059
  * console.log('Save', payload)
1046
1060
  * })
1047
1061
  * ```
1062
+ * Payload: {@link SaveEventPayload}.
1048
1063
  */
1049
1064
  EmbedEvent["Save"] = "save";
1050
1065
  /**
@@ -1061,6 +1076,7 @@
1061
1076
  * vizId: '730496d6-6903-4601-937e-2c691821af3c'
1062
1077
  * })
1063
1078
  * ```
1079
+ * Payload: {@link VizScope}.
1064
1080
  */
1065
1081
  EmbedEvent["Download"] = "download";
1066
1082
  /**
@@ -1080,6 +1096,7 @@
1080
1096
  * searchEmbed.on(EmbedEvent.DownloadAsPng, payload => {
1081
1097
  * console.log('download PNG', payload)})
1082
1098
  * ```
1099
+ * Payload: {@link DownloadEventPayload}.
1083
1100
  */
1084
1101
  EmbedEvent["DownloadAsPng"] = "downloadAsPng";
1085
1102
  /**
@@ -1099,6 +1116,7 @@
1099
1116
  * searchEmbed.on(EmbedEvent.DownloadAsPdf, payload => {
1100
1117
  * console.log('download PDF', payload)})
1101
1118
  * ```
1119
+ * Payload: {@link DownloadEventPayload}.
1102
1120
  */
1103
1121
  EmbedEvent["DownloadAsPdf"] = "downloadAsPdf";
1104
1122
  /**
@@ -1118,6 +1136,7 @@
1118
1136
  * searchEmbed.on(EmbedEvent.DownloadAsCsv, payload => {
1119
1137
  * console.log('download CSV', payload)})
1120
1138
  * ```
1139
+ * Payload: {@link DownloadEventPayload}.
1121
1140
  */
1122
1141
  EmbedEvent["DownloadAsCsv"] = "downloadAsCsv";
1123
1142
  /**
@@ -1137,6 +1156,7 @@
1137
1156
  * searchEmbed.on(EmbedEvent.DownloadAsXlsx, payload => {
1138
1157
  * console.log('download Xlsx', payload)})
1139
1158
  * ```
1159
+ * Payload: {@link DownloadEventPayload}.
1140
1160
  */
1141
1161
  EmbedEvent["DownloadAsXlsx"] = "downloadAsXlsx";
1142
1162
  /**
@@ -1148,6 +1168,7 @@
1148
1168
  * liveboardEmbed.on(EmbedEvent.DownloadLiveboardAsContinuousPDF, payload => {
1149
1169
  * console.log('download liveboard as continuous PDF', payload)})
1150
1170
  * ```
1171
+ * Payload: {@link LiveboardScope}.
1151
1172
  */
1152
1173
  EmbedEvent["DownloadLiveboardAsContinuousPDF"] = "downloadLiveboardAsContinuousPDF";
1153
1174
  /**
@@ -1164,6 +1185,7 @@
1164
1185
  * appEmbed.on(EmbedEvent.AnswerDelete, payload => {
1165
1186
  * console.log('delete answer', payload)})
1166
1187
  * ```
1188
+ * Payload: {@link AnswerScope}.
1167
1189
  */
1168
1190
  EmbedEvent["AnswerDelete"] = "answerDelete";
1169
1191
  /**
@@ -1175,6 +1197,7 @@
1175
1197
  * console.log('AI Highlights', payload);
1176
1198
  * })
1177
1199
  * ```
1200
+ * Payload: {@link LiveboardScope}.
1178
1201
  */
1179
1202
  EmbedEvent["AIHighlights"] = "AIHighlights";
1180
1203
  /**
@@ -1196,6 +1219,7 @@
1196
1219
  * console.log('pin', payload)
1197
1220
  * })
1198
1221
  * ```
1222
+ * Payload: {@link PinEventPayload}.
1199
1223
  */
1200
1224
  EmbedEvent["Pin"] = "pin";
1201
1225
  /**
@@ -1214,6 +1238,7 @@
1214
1238
  * console.log('SpotIQ analyze', payload)
1215
1239
  * })
1216
1240
  * ```
1241
+ * Payload: {@link AnswerScope}.
1217
1242
  */
1218
1243
  EmbedEvent["SpotIQAnalyze"] = "spotIQAnalyze";
1219
1244
  /**
@@ -1267,6 +1292,7 @@
1267
1292
  * console.log('copy to clipboard', payload);
1268
1293
  * })
1269
1294
  * ```
1295
+ * Payload: {@link CopyToClipboardPayload}.
1270
1296
  */
1271
1297
  EmbedEvent["CopyToClipboard"] = "context-menu-item-copy-to-clipboard";
1272
1298
  /**
@@ -1278,6 +1304,7 @@
1278
1304
  * liveboardEmbed.on(EmbedEvent.UpdateTML)
1279
1305
  * })
1280
1306
  * ```
1307
+ * Payload: {@link TmlEventPayload}.
1281
1308
  */
1282
1309
  EmbedEvent["UpdateTML"] = "updateTSL";
1283
1310
  /**
@@ -1290,6 +1317,7 @@
1290
1317
  * console.log('Edit TML', payload);
1291
1318
  * })
1292
1319
  * ```
1320
+ * Payload: {@link TmlEventPayload}.
1293
1321
  */
1294
1322
  EmbedEvent["EditTML"] = "editTSL";
1295
1323
  /**
@@ -1307,6 +1335,7 @@
1307
1335
  * searchEmbed.on(EmbedEvent.ExportTML, payload => {
1308
1336
  * console.log('Export TML', payload)})
1309
1337
  * ```
1338
+ * Payload: {@link TmlEventPayload}.
1310
1339
  */
1311
1340
  EmbedEvent["ExportTML"] = "exportTSL";
1312
1341
  /**
@@ -1345,6 +1374,7 @@
1345
1374
  * console.log('show data', payload);
1346
1375
  * })
1347
1376
  * ```
1377
+ * Payload: {@link AnswerScope}.
1348
1378
  */
1349
1379
  EmbedEvent["ShowUnderlyingData"] = "showUnderlyingData";
1350
1380
  /**
@@ -1356,6 +1386,7 @@
1356
1386
  * console.log('switch view', payload);
1357
1387
  * })
1358
1388
  * ```
1389
+ * Payload: {@link AnswerChartSwitcherPayload}.
1359
1390
  */
1360
1391
  EmbedEvent["AnswerChartSwitcher"] = "answerChartSwitcher";
1361
1392
  /**
@@ -1377,6 +1408,7 @@
1377
1408
  * console.log('Liveboard details', payload);
1378
1409
  * })
1379
1410
  * ```
1411
+ * Payload: {@link LiveboardScope}.
1380
1412
  */
1381
1413
  EmbedEvent["LiveboardInfo"] = "pinboardInfo";
1382
1414
  /**
@@ -1388,6 +1420,7 @@
1388
1420
  * console.log('favorites', payload);
1389
1421
  * })
1390
1422
  * ```
1423
+ * Payload: {@link FavoritePayload}.
1391
1424
  */
1392
1425
  EmbedEvent["AddToFavorites"] = "addToFavorites";
1393
1426
  /**
@@ -1399,6 +1432,7 @@
1399
1432
  * console.log('Liveboard schedule', payload);
1400
1433
  * })
1401
1434
  * ```
1435
+ * Payload: {@link LiveboardScope}.
1402
1436
  */
1403
1437
  EmbedEvent["Schedule"] = "subscription";
1404
1438
  /**
@@ -1413,6 +1447,7 @@
1413
1447
  * console.log('Liveboard edit', payload);
1414
1448
  * })
1415
1449
  * ```
1450
+ * Payload: {@link LiveboardVizScope}.
1416
1451
  */
1417
1452
  EmbedEvent["Edit"] = "edit";
1418
1453
  /**
@@ -1454,6 +1489,7 @@
1454
1489
  * console.log('Copy', payload);
1455
1490
  * })
1456
1491
  * ```
1492
+ * Payload: {@link MakeACopyPayload}.
1457
1493
  */
1458
1494
  EmbedEvent["MakeACopy"] = "makeACopy";
1459
1495
  /**
@@ -1469,6 +1505,7 @@
1469
1505
  * vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1470
1506
  * })
1471
1507
  * ```
1508
+ * Payload: {@link LiveboardVizScope}.
1472
1509
  */
1473
1510
  EmbedEvent["Present"] = "present";
1474
1511
  /**
@@ -1479,6 +1516,7 @@
1479
1516
  * liveboardEmbed.on(EmbedEvent.Delete,
1480
1517
  * {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1481
1518
  * ```
1519
+ * Payload: {@link LiveboardScope}.
1482
1520
  */
1483
1521
  EmbedEvent["Delete"] = "delete";
1484
1522
  /**
@@ -1488,6 +1526,7 @@
1488
1526
  * ```js
1489
1527
  * liveboardEmbed.on(EmbedEvent.SchedulesList)
1490
1528
  * ```
1529
+ * Payload: {@link LiveboardScope}.
1491
1530
  */
1492
1531
  EmbedEvent["SchedulesList"] = "schedule-list";
1493
1532
  /**
@@ -1497,6 +1536,7 @@
1497
1536
  * ```js
1498
1537
  * liveboardEmbed.on(EmbedEvent.Cancel)
1499
1538
  * ```
1539
+ * Payload: {@link LiveboardScope}.
1500
1540
  */
1501
1541
  EmbedEvent["Cancel"] = "cancel";
1502
1542
  /**
@@ -1507,6 +1547,7 @@
1507
1547
  * liveboardEmbed.on(EmbedEvent.Explore, {
1508
1548
  * vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1509
1549
  * ```
1550
+ * Payload: {@link LiveboardVizScope}.
1510
1551
  */
1511
1552
  EmbedEvent["Explore"] = "explore";
1512
1553
  /**
@@ -1517,6 +1558,7 @@
1517
1558
  * liveboardEmbed.on(EmbedEvent.CopyLink, {
1518
1559
  * vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1519
1560
  * ```
1561
+ * Payload: {@link CopyLinkPayload}.
1520
1562
  */
1521
1563
  EmbedEvent["CopyLink"] = "embedDocument";
1522
1564
  /**
@@ -1528,6 +1570,7 @@
1528
1570
  * liveboardEmbed.on(EmbedEvent.CrossFilterChanged, {
1529
1571
  * vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1530
1572
  * ```
1573
+ * Payload: {@link CrossFilterChangedPayload}.
1531
1574
  */
1532
1575
  EmbedEvent["CrossFilterChanged"] = "cross-filter-changed";
1533
1576
  /**
@@ -1539,6 +1582,7 @@
1539
1582
  * console.log('VizPointClick', payload)
1540
1583
  * })
1541
1584
  * ```
1585
+ * Payload: {@link VizInteractionPayload}.
1542
1586
  */
1543
1587
  EmbedEvent["VizPointRightClick"] = "vizPointRightClick";
1544
1588
  /**
@@ -1566,6 +1610,7 @@
1566
1610
  * })
1567
1611
  * ```
1568
1612
  * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl, 9.5.0.sw
1613
+ * Payload: {@link FilterChangedPayload}.
1569
1614
  */
1570
1615
  EmbedEvent["FilterChanged"] = "filterChanged";
1571
1616
  /**
@@ -1588,6 +1633,7 @@
1588
1633
  * @returns isPublic: boolean
1589
1634
  * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
1590
1635
  * @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
1636
+ * Payload: {@link PersonalisedViewPayload}.
1591
1637
  */
1592
1638
  EmbedEvent["UpdatePersonalisedView"] = "updatePersonalisedView";
1593
1639
  /**
@@ -1609,6 +1655,7 @@
1609
1655
  * @returns isPublic: boolean
1610
1656
  * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
1611
1657
  * @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
1658
+ * Payload: {@link PersonalisedViewPayload}.
1612
1659
  */
1613
1660
  EmbedEvent["SavePersonalisedView"] = "savePersonalisedView";
1614
1661
  /**
@@ -1683,6 +1730,7 @@
1683
1730
  /**
1684
1731
  * Emitted when a Liveboard or visualization is renamed.
1685
1732
  * @version SDK: 1.28.0 | ThoughtSpot: 9.10.5.cl, 10.1.0.sw
1733
+ * Payload: {@link RenamePayload}.
1686
1734
  */
1687
1735
  EmbedEvent["Rename"] = "rename";
1688
1736
  /**
@@ -1768,6 +1816,7 @@
1768
1816
  * })
1769
1817
  * ```
1770
1818
  * @version SDK: 1.29.0 | ThoughtSpot: 10.3.0.cl
1819
+ * Payload: {@link ParameterChangedPayload}.
1771
1820
  */
1772
1821
  EmbedEvent["ParameterChanged"] = "parameterChanged";
1773
1822
  /**
@@ -1811,6 +1860,7 @@
1811
1860
  * })
1812
1861
  * ```
1813
1862
  * @version SDK: 1.37.0 | ThoughtSpot: 10.8.0.cl
1863
+ * Payload: {@link TableVizRenderedPayload}.
1814
1864
  */
1815
1865
  EmbedEvent["TableVizRendered"] = "TableVizRendered";
1816
1866
  /**
@@ -1835,12 +1885,14 @@
1835
1885
  * @hidden
1836
1886
  * Emitted when a user exits present mode.
1837
1887
  * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
1888
+ * Payload: {@link ExitPresentModePayload}.
1838
1889
  */
1839
1890
  EmbedEvent["ExitPresentMode"] = "exitPresentMode";
1840
1891
  /**
1841
1892
  * Emitted when a user requests the full height lazy load data.
1842
1893
  * @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
1843
1894
  * @hidden
1895
+ * Payload: none.
1844
1896
  */
1845
1897
  EmbedEvent["RequestVisibleEmbedCoordinates"] = "requestVisibleEmbedCoordinates";
1846
1898
  /**
@@ -1874,6 +1926,7 @@
1874
1926
  * })
1875
1927
  * ```
1876
1928
  * @version SDK: 1.45.0 | ThoughtSpot: 26.2.0.cl
1929
+ * Payload: {@link VizScope}.
1877
1930
  */
1878
1931
  EmbedEvent["AddToCoaching"] = "addToCoaching";
1879
1932
  /**
@@ -1963,6 +2016,7 @@
1963
2016
  * console.log('EmbedListenerReady');
1964
2017
  * })
1965
2018
  * ```
2019
+ * Payload: none.
1966
2020
  */
1967
2021
  EmbedEvent["EmbedListenerReady"] = "EmbedListenerReady";
1968
2022
  /**
@@ -2337,6 +2391,7 @@
2337
2391
  * })
2338
2392
  * ```
2339
2393
  * @version SDK: 1.48.0 | ThoughtSpot Cloud: 26.5.0.cl
2394
+ * Payload: {@link TestScheduleEmailPayload}.
2340
2395
  */
2341
2396
  EmbedEvent["SendTestScheduleEmail"] = "sendTestScheduleEmail";
2342
2397
  /**
@@ -2848,6 +2903,19 @@
2848
2903
  * ```
2849
2904
  */
2850
2905
  HostEvent["OpenAddParameterModal"] = "openAddParameterModal";
2906
+ /**
2907
+ * Add a tab to the Liveboard, the same action as the *Tab* option in the
2908
+ * *Add* dropdown in the Liveboard edit header.
2909
+ *
2910
+ * The Liveboard must be in edit mode; the event is ignored otherwise.
2911
+ *
2912
+ * @version SDK: 1.56.0 | ThoughtSpot Cloud: 27.1.0.cl
2913
+ * @example
2914
+ * ```js
2915
+ * liveboardEmbed.trigger(HostEvent.OpenAddTabModal);
2916
+ * ```
2917
+ */
2918
+ HostEvent["OpenAddTabModal"] = "openAddTabModal";
2851
2919
  /**
2852
2920
  * Open the parameter panel for a particular parameter on a Liveboard.
2853
2921
  * Mirrors {@link HostEvent.OpenFilter} for parameters.
@@ -3445,6 +3513,17 @@
3445
3513
  * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
3446
3514
  */
3447
3515
  HostEvent["EditVisualization"] = "editVisualization";
3516
+ /**
3517
+ * Exits Liveboard edit mode , equivalent to clicking the
3518
+ * *Cancel* button in the Liveboard edit header. The Liveboard returns to
3519
+ * view mode and the embedded app emits the {@link EmbedEvent.Cancel} event.
3520
+ * @version SDK: 1.55.0 | ThoughtSpot Cloud: 26.12.0.cl
3521
+ * @example
3522
+ * ```js
3523
+ * liveboardEmbed.trigger(HostEvent.ExitEditMode);
3524
+ * ```
3525
+ */
3526
+ HostEvent["ExitEditMode"] = "exitEditMode";
3448
3527
  /**
3449
3528
  * Trigger the **Copy link** action on a Liveboard or visualization
3450
3529
  * Payload: {@link VizScopedRequest}.
@@ -4980,6 +5059,39 @@
4980
5059
  * @version SDK: 1.49.0 | ThoughtSpot Cloud: 26.6.0.cl
4981
5060
  */
4982
5061
  HostEvent["RefreshLiveboardBrowserCache"] = "refreshLiveboardBrowserCache";
5062
+ /**
5063
+ * Switch the embed between dark appearance and its default appearance
5064
+ * while it is open, without reloading it.
5065
+ * Payload: {@link UpdateThemeRequest}.
5066
+ *
5067
+ * Use it to keep the embed in step with a theme switch in your
5068
+ * application; the appearance the embed loads with is set by `isDarkMode`.
5069
+ * The event resolves with the applied value, such as `{ isDarkMode: true }`.
5070
+ * When dark appearance is not available in the embed, the embed does not
5071
+ * change and the event rejects with an error message instead.
5072
+ * @version SDK: 1.55.0 | ThoughtSpot Cloud: 26.12.0.cl
5073
+ * @param - `isDarkMode` - `true` for dark appearance, `false` for the
5074
+ * default appearance.
5075
+ * @example
5076
+ * ```js
5077
+ * appEmbed.trigger(HostEvent.UpdateTheme, { isDarkMode: true });
5078
+ * ```
5079
+ * @example
5080
+ * ```js
5081
+ * // Follow a theme switch in your application
5082
+ * const themeSwitch = document.querySelector('#theme-switch');
5083
+ * themeSwitch.addEventListener('change', async (event) => {
5084
+ * try {
5085
+ * await appEmbed.trigger(HostEvent.UpdateTheme, {
5086
+ * isDarkMode: event.target.checked,
5087
+ * });
5088
+ * } catch (error) {
5089
+ * console.warn(error);
5090
+ * }
5091
+ * });
5092
+ * ```
5093
+ */
5094
+ HostEvent["UpdateTheme"] = "UpdateTheme";
4983
5095
  })(exports.HostEvent || (exports.HostEvent = {}));
4984
5096
  /**
4985
5097
  * The different visual modes that the data sources panel within
@@ -5023,6 +5135,7 @@
5023
5135
  * @version SDK: 1.52.2 | ThoughtSpot Cloud: 26.9.0.cl
5024
5136
  */
5025
5137
  Param["TsmcpAnswerIndex"] = "tsmcpAnswerIndex";
5138
+ Param["IsMcpAnswerEmbed"] = "isMcpAnswerEmbed";
5026
5139
  Param["EmbedApp"] = "embedApp";
5027
5140
  Param["DataSources"] = "dataSources";
5028
5141
  Param["DataSourceMode"] = "dataSourceMode";
@@ -5225,6 +5338,21 @@
5225
5338
  exports.Action = void 0;
5226
5339
  (function (Action) {
5227
5340
  /**
5341
+ * The **Add** button on a Liveboard in edit mode.
5342
+ * Controls the visibility and disabled state of the Add panel button
5343
+ * in the Liveboard edit toolbar, which allows users to add
5344
+ * visualizations, filters, parameters, and tabs.
5345
+ * @example
5346
+ * ```js
5347
+ * hiddenActions: [Action.LiveboardAddPanel]
5348
+ * // or
5349
+ * disabledActions: [Action.LiveboardAddPanel]
5350
+ * ```
5351
+ * @version SDK: 1.56.0 | ThoughtSpot Cloud: 27.1.0.cl
5352
+ */
5353
+ Action["LiveboardAddPanel"] = "liveboardAddPanel";
5354
+ /**
5355
+ *
5228
5356
  * The **Save** action on an Answer or Liveboard.
5229
5357
  * Allows users to save the changes.
5230
5358
  * @example
@@ -7455,6 +7583,125 @@
7455
7583
  * ```
7456
7584
  */
7457
7585
  Action["CustomizeHomepage"] = "customizeHomepage";
7586
+ /**
7587
+ * Controls the visibility and disabled state of the *Cancel* button in the
7588
+ * Liveboard edit header, the button that discards the changes made in edit
7589
+ * mode and returns the Liveboard to view mode. The button is shown only
7590
+ * while the Liveboard is in edit mode.
7591
+ * @version SDK: 1.55.0 | ThoughtSpot Cloud: 26.12.0.cl
7592
+ * @example
7593
+ * ```js
7594
+ * const liveboardEmbed = new LiveboardEmbed('#tsEmbed', {
7595
+ * ... // other embed view config
7596
+ * hiddenActions: [Action.Cancel],
7597
+ * });
7598
+ * ```
7599
+ * @example
7600
+ * ```js
7601
+ * const liveboardEmbed = new LiveboardEmbed('#tsEmbed', {
7602
+ * ... // other embed view config
7603
+ * disabledActions: [Action.Cancel],
7604
+ * disabledActionReason: 'Save your changes to leave edit mode',
7605
+ * });
7606
+ * ```
7607
+ */
7608
+ Action["Cancel"] = "cancel";
7609
+ /**
7610
+ * Controls the visibility and disabled state of the "Version history" menu item for a Liveboard or Answer.
7611
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 9.8.0.cl
7612
+ * @example
7613
+ * ```js
7614
+ * {
7615
+ * hiddenActions: [Action.ShowVersionHistory],
7616
+ * disabledActions: [Action.ShowVersionHistory],
7617
+ * }
7618
+ * ```
7619
+ */
7620
+ Action["ShowVersionHistory"] = "showVersionHistory";
7621
+ /**
7622
+ * Controls the visibility and disabled state of the "Enable version control" menu item for a Liveboard or Answer.
7623
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 9.10.0.cl
7624
+ * @example
7625
+ * ```js
7626
+ * {
7627
+ * hiddenActions: [Action.EnableVersionControl],
7628
+ * disabledActions: [Action.EnableVersionControl],
7629
+ * }
7630
+ * ```
7631
+ */
7632
+ Action["EnableVersionControl"] = "enableVersionControl";
7633
+ /**
7634
+ * Controls the visibility and disabled state of the "Disable version control" menu item for a Liveboard or Answer.
7635
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 9.10.0.cl
7636
+ * @example
7637
+ * ```js
7638
+ * {
7639
+ * hiddenActions: [Action.DisableVersionControl],
7640
+ * disabledActions: [Action.DisableVersionControl],
7641
+ * }
7642
+ * ```
7643
+ */
7644
+ Action["DisableVersionControl"] = "disableVersionControl";
7645
+ /**
7646
+ * Controls the visibility and disabled state of the "Withdraw verification" menu item for a verified Liveboard.
7647
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 9.8.0.cl
7648
+ * @example
7649
+ * ```js
7650
+ * {
7651
+ * hiddenActions: [Action.WithdrawVerification],
7652
+ * disabledActions: [Action.WithdrawVerification],
7653
+ * }
7654
+ * ```
7655
+ */
7656
+ Action["WithdrawVerification"] = "withdrawVerification";
7657
+ /**
7658
+ * Controls the visibility and disabled state of the "Switch to new chart experience" menu item on an Answer.
7659
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 10.10.0.cl
7660
+ * @example
7661
+ * ```js
7662
+ * {
7663
+ * hiddenActions: [Action.SwitchToNewChartExperience],
7664
+ * disabledActions: [Action.SwitchToNewChartExperience],
7665
+ * }
7666
+ * ```
7667
+ */
7668
+ Action["SwitchToNewChartExperience"] = "switchToNewChartExperience";
7669
+ /**
7670
+ * Controls the visibility and disabled state of the "Switch to classic chart experience" menu item on an Answer.
7671
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 10.10.0.cl
7672
+ * @example
7673
+ * ```js
7674
+ * {
7675
+ * hiddenActions: [Action.SwitchToClassicChartExperience],
7676
+ * disabledActions: [Action.SwitchToClassicChartExperience],
7677
+ * }
7678
+ * ```
7679
+ */
7680
+ Action["SwitchToClassicChartExperience"] = "switchToClassicChartExperience";
7681
+ /**
7682
+ * Controls the visibility and disabled state of the "Monitor" menu item on an Answer, which includes the alert options.
7683
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 10.5.0.cl
7684
+ * @example
7685
+ * ```js
7686
+ * {
7687
+ * hiddenActions: [Action.Monitor],
7688
+ * disabledActions: [Action.Monitor],
7689
+ * }
7690
+ * ```
7691
+ */
7692
+ Action["Monitor"] = "monitor";
7693
+ /**
7694
+ * Controls the visibility and disabled state of the "View explanation" button in the footer of a Spotter answer, which opens the explanation and verification details.
7695
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
7696
+ * @example
7697
+ * ```js
7698
+ * {
7699
+ * hiddenActions: [Action.SpotterViewExplanation],
7700
+ * disabledActions: [Action.SpotterViewExplanation],
7701
+ * }
7702
+ * ```
7703
+ */
7704
+ Action["SpotterViewExplanation"] = "spotterViewExplanation";
7458
7705
  })(exports.Action || (exports.Action = {}));
7459
7706
  var PrefetchFeatures;
7460
7707
  (function (PrefetchFeatures) {
@@ -7959,7 +8206,7 @@
7959
8206
  TableContentDensity["Compact"] = "COMPACT";
7960
8207
  })(TableContentDensity || (TableContentDensity = {}));
7961
8208
 
7962
- var version$1="1.53.0";var pkg = {version:version$1};
8209
+ var version$1="1.53.2-beta";var pkg = {version:version$1};
7963
8210
 
7964
8211
  const { version } = pkg;
7965
8212
 
@@ -19912,6 +20159,32 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
19912
20159
  }
19913
20160
  }
19914
20161
 
20162
+ // Membership is checked, not just the key: a bare key allowlist would upload an
20163
+ // arbitrary customer string sitting under `operator` verbatim.
20164
+ const isEnumMember = (enumObject, value) => typeof value === 'string' && Object.values(enumObject).includes(value);
20165
+ const uniqueEnumMembers = (enumObject, values) => Array.from(new Set(values.filter((v) => isEnumMember(enumObject, v))));
20166
+ const describeRuntimeFilters = (runtimeFilters) => ({
20167
+ count: runtimeFilters.length,
20168
+ operators: uniqueEnumMembers(exports.RuntimeFilterOp, runtimeFilters.map((filter) => filter === null || filter === void 0 ? void 0 : filter.operator)),
20169
+ });
20170
+ const describeRuntimeParameters = (runtimeParameters) => ({
20171
+ count: runtimeParameters.length,
20172
+ applicabilityLevels: uniqueEnumMembers(ApplicabilityLevel, runtimeParameters.map((parameter) => { var _a; return (_a = parameter === null || parameter === void 0 ? void 0 : parameter.applicability) === null || _a === void 0 ? void 0 : _a.level; })),
20173
+ });
20174
+ // Column names, parameter names and operands are customer data and must never
20175
+ // reach Mixpanel; an unrecognized shape is dropped rather than forwarded.
20176
+ const summarizeRuntimeDataForTelemetry = (viewConfig) => {
20177
+ const { runtimeFilters, runtimeParameters, ...rest } = viewConfig !== null && viewConfig !== void 0 ? viewConfig : {};
20178
+ const telemetryProps = { ...rest };
20179
+ if (Array.isArray(runtimeFilters)) {
20180
+ telemetryProps.runtimeFilters = describeRuntimeFilters(runtimeFilters);
20181
+ }
20182
+ if (Array.isArray(runtimeParameters)) {
20183
+ telemetryProps.runtimeParameters = describeRuntimeParameters(runtimeParameters);
20184
+ }
20185
+ return telemetryProps;
20186
+ };
20187
+
19915
20188
  var eventemitter3 = createCommonjsModule(function (module) {
19916
20189
 
19917
20190
  var has = Object.prototype.hasOwnProperty
@@ -20856,11 +21129,13 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
20856
21129
  * @param ssoURL
20857
21130
  * @param triggerContainer
20858
21131
  * @param triggerText
21132
+ * @param thoughtSpotHost
20859
21133
  */
20860
- async function samlPopupFlow(ssoURL, triggerContainer, triggerText) {
21134
+ async function samlPopupFlow(ssoURL, triggerContainer, triggerText, thoughtSpotHost) {
21135
+ const thoughtSpotOrigin = new URL(thoughtSpotHost).origin;
20861
21136
  let popupClosedCheck;
20862
21137
  const openPopup = () => {
20863
- if (samlAuthWindow === null || samlAuthWindow.closed) {
21138
+ if (!samlAuthWindow || samlAuthWindow.closed) {
20864
21139
  samlAuthWindow = window.open(ssoURL, '_blank', 'location=no,height=570,width=520,scrollbars=yes,status=yes');
20865
21140
  if (samlAuthWindow) {
20866
21141
  popupClosedCheck = setInterval(() => {
@@ -20888,7 +21163,14 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
20888
21163
  }
20889
21164
  samlCompletionPromise = samlCompletionPromise || new Promise((resolve, reject) => {
20890
21165
  window.addEventListener('message', (e) => {
20891
- if (e.data.type === exports.EmbedEvent.SAMLComplete) {
21166
+ var _a;
21167
+ // Only the SSO popup we opened, on the ThoughtSpot origin, may
21168
+ // complete the flow or hand us a token; anything else could
21169
+ // inject an attacker's token into the auth cache.
21170
+ if (e.origin !== thoughtSpotOrigin || !samlAuthWindow || e.source !== samlAuthWindow) {
21171
+ return;
21172
+ }
21173
+ if (((_a = e.data) === null || _a === void 0 ? void 0 : _a.type) === exports.EmbedEvent.SAMLComplete) {
20892
21174
  if (e.data.accessToken) {
20893
21175
  const decodedToken = decodeURIComponent(e.data.accessToken);
20894
21176
  storeAuthTokenInCache(decodedToken);
@@ -20929,7 +21211,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
20929
21211
  }
20930
21212
  const ssoURL = `${thoughtSpotHost}${ssoEndPoint}`;
20931
21213
  if (embedConfig.inPopup) {
20932
- await samlPopupFlow(ssoURL, embedConfig.authTriggerContainer, embedConfig.authTriggerText);
21214
+ await samlPopupFlow(ssoURL, embedConfig.authTriggerContainer, embedConfig.authTriggerText, thoughtSpotHost);
20933
21215
  const cachedToken = getCacheAuthToken();
20934
21216
  if (cachedToken) {
20935
21217
  loggedInStatus = true;
@@ -20941,12 +21223,22 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
20941
21223
  }
20942
21224
  window.location.href = ssoURL;
20943
21225
  };
21226
+ /**
21227
+ * The popup's SSO completion page. hostAppOrigin tells ThoughtSpot which
21228
+ * origin opened the popup; the cluster only posts a token back to it if it
21229
+ * is an allowed redirect domain.
21230
+ * @param thoughtSpotHost
21231
+ */
21232
+ const getSSOCompletePageUrl = (thoughtSpotHost) => {
21233
+ const hostAppOrigin = encodeURIComponent(window.location.origin);
21234
+ return `${thoughtSpotHost}/v2/#/embed/saml-complete?hostAppOrigin=${hostAppOrigin}`;
21235
+ };
20944
21236
  const doSamlAuth = async (embedConfig) => {
20945
21237
  const { thoughtSpotHost } = embedConfig;
20946
21238
  // redirect for SSO, when the SSO authentication is done, this page will be
20947
21239
  // loaded again and the same JS will execute again.
20948
21240
  const ssoRedirectUrl = embedConfig.inPopup
20949
- ? `${thoughtSpotHost}/v2/#/embed/saml-complete`
21241
+ ? getSSOCompletePageUrl(thoughtSpotHost)
20950
21242
  : getRedirectUrl(window.location.href, SSO_REDIRECTION_MARKER_GUID, embedConfig.redirectPath);
20951
21243
  // bring back the page to the same URL
20952
21244
  const ssoEndPoint = `${EndPoints.SAML_LOGIN_TEMPLATE(encodeURIComponent(ssoRedirectUrl))}`;
@@ -20958,7 +21250,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
20958
21250
  // redirect for SSO, when the SSO authentication is done, this page will be
20959
21251
  // loaded again and the same JS will execute again.
20960
21252
  const ssoRedirectUrl = embedConfig.noRedirect || embedConfig.inPopup
20961
- ? `${thoughtSpotHost}/v2/#/embed/saml-complete`
21253
+ ? getSSOCompletePageUrl(thoughtSpotHost)
20962
21254
  : getRedirectUrl(window.location.href, SSO_REDIRECTION_MARKER_GUID, embedConfig.redirectPath);
20963
21255
  // bring back the page to the same URL
20964
21256
  const baseEndpoint = `${EndPoints.OIDC_LOGIN_TEMPLATE(encodeURIComponent(ssoRedirectUrl))}`;
@@ -22041,6 +22333,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
22041
22333
  */
22042
22334
  const PRERENDER_CONTAINER_ORIGINAL_POSITION_KEY = 'tsEmbedOriginalPosition';
22043
22335
  const PRERENDER_WRAPPER_ID_PREFIX = 'tsEmbed-pre-render-wrapper-';
22336
+ const PRERENDER_PARKED_TRANSFORM = 'translateY(-100%)';
22337
+ /** The height createPreRenderWrapper() seeds before anything is measured. */
22338
+ const UNMEASURED_WRAPPER_HEIGHT = '100vh';
22044
22339
  // The container applies UpdateEmbedParams through React state, so a delivered
22045
22340
  // post is not the same as the params being in effect.
22046
22341
  const UPDATE_EMBED_PARAMS_SETTLE_MS = 200;
@@ -22177,7 +22472,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
22177
22472
  this.shouldEncodeUrlQueryParams = false;
22178
22473
  this.defaultHiddenActions = [exports.Action.ReportError];
22179
22474
  this.preRenderContainerEl = document.body;
22180
- this.containerScrollListener = null;
22181
22475
  /**
22182
22476
  * Handler for fullscreen change events
22183
22477
  */
@@ -22357,9 +22651,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
22357
22651
  ...viewConfig,
22358
22652
  };
22359
22653
  this.registerAppInit();
22360
- uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_EMBED_CREATE, {
22361
- ...viewConfig,
22362
- });
22654
+ uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_EMBED_CREATE, summarizeRuntimeDataForTelemetry(viewConfig));
22363
22655
  const embedConfig = getEmbedConfig();
22364
22656
  if (embedConfig) {
22365
22657
  this.embedConfig = embedConfig;
@@ -23063,7 +23355,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
23063
23355
  top: '0',
23064
23356
  left: '0',
23065
23357
  width: '100vw',
23066
- height: '100vh',
23358
+ height: UNMEASURED_WRAPPER_HEIGHT,
23067
23359
  };
23068
23360
  setStyleProperties(preRenderWrapper, initialPreRenderWrapperStyle);
23069
23361
  return preRenderWrapper;
@@ -23131,10 +23423,12 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
23131
23423
  return placeholder;
23132
23424
  }
23133
23425
  /**
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.
23426
+ * Resolves the configured preRenderContainer, or defaults to the host's
23427
+ * nearest scrolling ancestor (document.body if none). The absolutely
23428
+ * positioned wrapper only follows the page while it sits inside what
23429
+ * scrolls, so body is right only when the document itself scrolls — an inner
23430
+ * scroller left the frame pinned to the viewport (SCAL-338563). A string
23431
+ * selector is re-queried each call so a remounted container resolves fresh.
23138
23432
  */
23139
23433
  resolvePreRenderContainerTarget() {
23140
23434
  var _a;
@@ -23154,7 +23448,13 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
23154
23448
  else if (containerConfig) {
23155
23449
  container = containerConfig;
23156
23450
  }
23157
- return (_a = container) !== null && _a !== void 0 ? _a : document.body;
23451
+ if (container) {
23452
+ return container;
23453
+ }
23454
+ if (!this.hostElement) {
23455
+ return document.body;
23456
+ }
23457
+ return (_a = getScrollableAncestors(this.hostElement)[0]) !== null && _a !== void 0 ? _a : document.body;
23158
23458
  }
23159
23459
  inheritPreRenderContainer() {
23160
23460
  var _a;
@@ -23199,8 +23499,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
23199
23499
  * Re-attaches the wrapper to a live container when the previously resolved
23200
23500
  * one has been detached or no longer holds the wrapper — e.g. the host app
23201
23501
  * remounted a custom preRenderContainer, which would otherwise leave a stale
23202
- * reference and collapse the wrapper. Only string selectors can be
23203
- * re-resolved; a container passed as an element is left untouched.
23502
+ * reference and collapse the wrapper. Selectors and the auto-resolved
23503
+ * scrolling ancestor are both re-resolved; a container passed as an element
23504
+ * is left untouched, as there is nothing to re-query.
23204
23505
  */
23205
23506
  reconcilePreRenderContainer() {
23206
23507
  const wrapper = this.preRenderWrapper;
@@ -23219,14 +23520,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
23219
23520
  if (resolved === stored && stored.contains(wrapper)) {
23220
23521
  return;
23221
23522
  }
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
- }
23230
23523
  this.preRenderContainerEl = resolved;
23231
23524
  this.applyPreRenderContainerPositioning();
23232
23525
  if (wrapper.parentNode !== resolved) {
@@ -23288,11 +23581,12 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
23288
23581
  */
23289
23582
  setIFrameHeight(height) {
23290
23583
  if (this.isPreRendered) {
23584
+ const next = getCssDimension(height);
23291
23585
  if (this.insertedDomEl) {
23292
- this.insertedDomEl.style.height = getCssDimension(height);
23586
+ this.insertedDomEl.style.height = next;
23293
23587
  }
23294
23588
  else if (this.preRenderWrapper) {
23295
- this.preRenderWrapper.style.height = getCssDimension(height);
23589
+ this.preRenderWrapper.style.height = next;
23296
23590
  }
23297
23591
  }
23298
23592
  else {
@@ -23734,34 +24028,47 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
23734
24028
  delete container.dataset[PRERENDER_CONTAINER_ORIGINAL_POSITION_KEY];
23735
24029
  }
23736
24030
  /**
23737
- * Detaches and clears the container scroll listener, if one is attached.
23738
- */
23739
- removeContainerScrollListener() {
23740
- if (!this.containerScrollListener) {
24031
+ * Re-sizes the wrapper when its placeholder changes size.
24032
+ *
24033
+ * Position deliberately has no equivalent. An absolutely positioned wrapper
24034
+ * follows its containing block for free, so a correctly placed frame is the
24035
+ * browser's job and costs nothing; repositioning it on scroll would mean a
24036
+ * layout read and a style write per frame to compensate for placing it in
24037
+ * the wrong box. Size is the one thing the browser will not do for us: the
24038
+ * placeholder grows when the embedded app reports a new height, and the
24039
+ * wrapper has to be told.
24040
+ */
24041
+ observePreRenderSize() {
24042
+ var _a;
24043
+ if (this.getPreRenderConfig().doNotTrackSize || typeof ResizeObserver === 'undefined') {
23741
24044
  return;
23742
24045
  }
23743
- const customContainer = this.getCustomPreRenderContainer();
23744
- customContainer === null || customContainer === void 0 ? void 0 : customContainer.removeEventListener('scroll', this.containerScrollListener);
23745
- this.containerScrollListener = null;
24046
+ const placeholder = this.getPreRenderPlaceHolderElement();
24047
+ if (!placeholder) {
24048
+ return;
24049
+ }
24050
+ (_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
24051
+ this.resizeObserver = new ResizeObserver(() => this.syncPreRenderStyle());
24052
+ this.resizeObserver.observe(placeholder);
23746
24053
  }
23747
24054
  /**
23748
24055
  * Destroys the ThoughtSpot embed, and remove any nodes from the DOM.
23749
24056
  * @version SDK: 1.19.1 | ThoughtSpot: *
23750
24057
  */
23751
24058
  destroy() {
23752
- var _a, _b, _c;
24059
+ var _a, _b, _c, _d;
23753
24060
  try {
23754
24061
  this.removeFullscreenChangeHandler();
23755
- this.removeContainerScrollListener();
24062
+ (_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
23756
24063
  this.unsubscribeToEvents();
23757
- (_a = this.preRenderWrapper) === null || _a === void 0 ? void 0 : _a.remove();
24064
+ (_b = this.preRenderWrapper) === null || _b === void 0 ? void 0 : _b.remove();
23758
24065
  this.restorePreRenderContainerPosition();
23759
24066
  if (!this.isRendered) {
23760
24067
  return;
23761
24068
  }
23762
24069
  if (!getEmbedConfig().waitForCleanupOnDestroy) {
23763
24070
  this.trigger(exports.HostEvent.DestroyEmbed);
23764
- (_c = (_b = this.insertedDomEl) === null || _b === void 0 ? void 0 : _b.parentNode) === null || _c === void 0 ? void 0 : _c.removeChild(this.insertedDomEl);
24071
+ (_d = (_c = this.insertedDomEl) === null || _c === void 0 ? void 0 : _c.parentNode) === null || _d === void 0 ? void 0 : _d.removeChild(this.insertedDomEl);
23765
24072
  }
23766
24073
  else {
23767
24074
  const cleanupTimeout = getEmbedConfig().cleanupTimeout;
@@ -23852,7 +24159,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
23852
24159
  * wrapper to overlay it.
23853
24160
  */
23854
24161
  async showPreRender() {
23855
- var _a, _b;
24162
+ var _a;
23856
24163
  uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_SHOW_PRE_RENDER, {
23857
24164
  preRenderId: this.getPreRenderConfig().id,
23858
24165
  embedComponentType: this.viewConfig.embedComponentType,
@@ -23871,14 +24178,16 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
23871
24178
  this.beforePrerenderVisible();
23872
24179
  if (this.hostElement) {
23873
24180
  this.insertedDomEl = this.createPreRenderPlaceholder();
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
- }
24181
+ // Carry a height fullHeight has already measured onto the fresh
24182
+ // placeholder, so a re-show does not flash at frameParams height.
24183
+ // UNMEASURED_WRAPPER_HEIGHT is what createPreRenderWrapper() seeds
24184
+ // before anything has been measured; treating that as a measurement
24185
+ // is what made a first reveal overshoot to a full viewport.
24186
+ const wrapperHeight = this.preRenderWrapper.style.height;
24187
+ if (this.viewConfig.fullHeight
24188
+ && wrapperHeight
24189
+ && wrapperHeight !== UNMEASURED_WRAPPER_HEIGHT) {
24190
+ this.insertedDomEl.style.height = wrapperHeight;
23882
24191
  }
23883
24192
  const placeHolderId = this.getPreRenderIds().placeHolder;
23884
24193
  // Remove any stale placeholder from a previous cycle. It is located
@@ -23892,29 +24201,19 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
23892
24201
  (_a = this.hostElement.querySelector(`#${placeHolderId}`)) === null || _a === void 0 ? void 0 : _a.remove();
23893
24202
  this.hostElement.appendChild(this.insertedDomEl);
23894
24203
  this.syncPreRenderStyle();
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
- }
24204
+ this.observePreRenderSize();
23911
24205
  }
23912
24206
  removeStyleProperties(this.preRenderWrapper, [
23913
24207
  'z-index',
23914
24208
  'opacity',
23915
- 'pointer-events',
23916
24209
  'overflow',
24210
+ 'transform',
23917
24211
  ]);
24212
+ // Set rather than removed: a container that carries `pointer-events:
24213
+ // none` — the usual styling for a parking root that must not swallow
24214
+ // clicks — passes it down, and dropping the property here would leave
24215
+ // the inherited `none` in force and the frame dead to input.
24216
+ setStyleProperties(this.preRenderWrapper, { pointerEvents: 'auto' });
23918
24217
  this.subscribeToEvents();
23919
24218
  // Setup fullscreen change handler for prerendered components
23920
24219
  if (this.iFrame) {
@@ -23967,6 +24266,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
23967
24266
  * If the component is not preRendered, it issues a warning.
23968
24267
  */
23969
24268
  hidePreRender() {
24269
+ var _a;
23970
24270
  uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_HIDE_PRE_RENDER, {
23971
24271
  preRenderId: this.getPreRenderConfig().id,
23972
24272
  embedComponentType: this.viewConfig.embedComponentType,
@@ -23978,20 +24278,25 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
23978
24278
  return;
23979
24279
  }
23980
24280
  const { zIndex } = this.getPreRenderConfig();
24281
+ // A hidden pre-render frame must add no scroll space to the host page.
23981
24282
  const preRenderHideStyles = {
23982
24283
  opacity: '0',
23983
24284
  pointerEvents: 'none',
23984
24285
  zIndex: zIndex !== undefined ? String(zIndex) : '-1000',
23985
- position: 'absolute',
24286
+ // Resolves to the viewport, so the hidden frame belongs to no
24287
+ // scroll container's overflow; syncPreRenderStyle restores absolute
24288
+ // on show.
24289
+ position: 'fixed',
23986
24290
  top: '0',
23987
24291
  left: '0',
23988
24292
  overflow: 'hidden',
24293
+ // The one exception: a transformed or contained ancestor captures
24294
+ // `fixed`; parking above the top edge keeps it out of that
24295
+ // overflow.
24296
+ transform: PRERENDER_PARKED_TRANSFORM,
23989
24297
  };
23990
24298
  setStyleProperties(this.preRenderWrapper, preRenderHideStyles);
23991
- this.removeContainerScrollListener();
23992
- if (this.resizeObserver) {
23993
- this.resizeObserver.disconnect();
23994
- }
24299
+ (_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
23995
24300
  const placeHolderEle = this.getPreRenderPlaceHolderElement();
23996
24301
  if (placeHolderEle) {
23997
24302
  placeHolderEle.parentElement.removeChild(placeHolderEle);
@@ -24696,8 +25001,11 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
24696
25001
  embedParams: { visualOverridesParams: visualOverrides },
24697
25002
  };
24698
25003
  }
25004
+ // The app reads enableSpotterInstructionAndMoreSettings from the top level
25005
+ // of embedParams, so lift it out of the sidebar config.
25006
+ const { enableSpotterInstructionAndMoreSettings, ...sidebarConfigRest } = spotterSidebarConfig || {};
24699
25007
  const resolvedSidebarConfig = {
24700
- ...spotterSidebarConfig,
25008
+ ...sidebarConfigRest,
24701
25009
  ...(resolvedEnablePastConversations !== undefined && {
24702
25010
  enablePastConversationsSidebar: resolvedEnablePastConversations,
24703
25011
  }),
@@ -24719,6 +25027,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
24719
25027
  embedParams: {
24720
25028
  ...(defaultAppInitData.embedParams || {}),
24721
25029
  spotterSidebarConfig: resolvedSidebarConfig,
25030
+ ...(enableSpotterInstructionAndMoreSettings !== undefined
25031
+ ? { enableSpotterInstructionAndMoreSettings }
25032
+ : {}),
24722
25033
  ...(visualOverrides !== undefined ? { visualOverridesParams: visualOverrides } : {}),
24723
25034
  },
24724
25035
  };
@@ -25288,6 +25599,46 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
25288
25599
  }
25289
25600
  };
25290
25601
 
25602
+ /**
25603
+ * This method is like `_.isEqual` except that it accepts `customizer` which
25604
+ * is invoked to compare values. If `customizer` returns `undefined`, comparisons
25605
+ * are handled by the method instead. The `customizer` is invoked with up to
25606
+ * six arguments: (objValue, othValue [, index|key, object, other, stack]).
25607
+ *
25608
+ * @static
25609
+ * @memberOf _
25610
+ * @since 4.0.0
25611
+ * @category Lang
25612
+ * @param {*} value The value to compare.
25613
+ * @param {*} other The other value to compare.
25614
+ * @param {Function} [customizer] The function to customize comparisons.
25615
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
25616
+ * @example
25617
+ *
25618
+ * function isGreeting(value) {
25619
+ * return /^h(?:i|ello)$/.test(value);
25620
+ * }
25621
+ *
25622
+ * function customizer(objValue, othValue) {
25623
+ * if (isGreeting(objValue) && isGreeting(othValue)) {
25624
+ * return true;
25625
+ * }
25626
+ * }
25627
+ *
25628
+ * var array = ['hello', 'goodbye'];
25629
+ * var other = ['hi', 'goodbye'];
25630
+ *
25631
+ * _.isEqualWith(array, other, customizer);
25632
+ * // => true
25633
+ */
25634
+ function isEqualWith(value, other, customizer) {
25635
+ customizer = typeof customizer == 'function' ? customizer : undefined;
25636
+ var result = customizer ? customizer(value, other) : undefined;
25637
+ return result === undefined ? _baseIsEqual(value, other, undefined, customizer) : !!result;
25638
+ }
25639
+
25640
+ var isEqualWith_1 = isEqualWith;
25641
+
25291
25642
  const getPreviewQuery = `
25292
25643
  query GetEurekaVizSnapshots(
25293
25644
  $vizId: String!, $liveboardId: String!) {
@@ -25402,6 +25753,11 @@ query GetEurekaVizSnapshots(
25402
25753
  * })
25403
25754
  * ```
25404
25755
  */
25756
+ /**
25757
+ * A shallow copy without the keys whose value is `undefined`, so a key that was
25758
+ * assigned `undefined` compares equal to one that was never set.
25759
+ */
25760
+ const definedEntries = (config = {}) => Object.fromEntries(Object.entries(config).filter(([, value]) => value !== undefined));
25405
25761
  let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
25406
25762
  constructor(domSelector, viewConfig) {
25407
25763
  viewConfig.embedComponentType = 'LiveboardEmbed';
@@ -25687,16 +26043,18 @@ query GetEurekaVizSnapshots(
25687
26043
  beforePrerenderVisible() {
25688
26044
  super.beforePrerenderVisible();
25689
26045
  // Captured before showPreRender() hands the wrapper over to this
25690
- // instance. Itself means a hide/show, not a hand-over, so there is
25691
- // nothing stale to clear.
26046
+ // instance. React builds a new instance per mount, so an equal config
26047
+ // is a hide/show, not a hand-over: there is nothing stale to clear.
25692
26048
  const previous = this.getPreRenderObj();
25693
- const showing = previous === this ? undefined : previous === null || previous === void 0 ? void 0 : previous.currentLiveboardState;
26049
+ const previousRoute = this.isSameEmbedConfig(previous)
26050
+ ? undefined
26051
+ : previous === null || previous === void 0 ? void 0 : previous.currentLiveboardState;
25694
26052
  this.executeAfterEmbedContainerLoaded(async () => {
25695
26053
  // Without this the params callback suspends on its await and
25696
26054
  // Navigate goes out first, so the container loads with the previous
25697
26055
  // config's filters.
25698
26056
  await this.preRenderParamsApplied;
25699
- if (this.isShowingLiveboardRoute(showing)) {
26057
+ if (this.isAlreadyOnSameRoute(previousRoute)) {
25700
26058
  // Navigate to the route we are already on is a no-op, so the
25701
26059
  // liveboard keeps its state. Home unmounts the container, which
25702
26060
  // clears it.
@@ -25717,17 +26075,27 @@ query GetEurekaVizSnapshots(
25717
26075
  };
25718
26076
  });
25719
26077
  }
26078
+ // definedEntries drops undefined-valued keys: a shown instance carries
26079
+ // vizId/activeTabId/etc as undefined, so a raw isEqual never matches again.
26080
+ // Functions compare equal, since React passes a fresh closure per render.
26081
+ isSameEmbedConfig(previous) {
26082
+ if (!previous)
26083
+ return false;
26084
+ if (previous === this)
26085
+ return true;
26086
+ return isEqualWith_1(definedEntries(previous.viewConfig), definedEntries(this.viewConfig), (a, b) => (typeof a === 'function' && typeof b === 'function' ? true : undefined));
26087
+ }
25720
26088
  // The whole route, not just the liveboard id: the path is built from the
25721
26089
  // viz, tab and view too, so a same-liveboard show onto another tab is a
25722
26090
  // real navigation.
25723
- isShowingLiveboardRoute(showing) {
25724
- if (!(showing === null || showing === void 0 ? void 0 : showing.liveboardId))
26091
+ isAlreadyOnSameRoute(previousRoute) {
26092
+ if (!(previousRoute === null || previousRoute === void 0 ? void 0 : previousRoute.liveboardId))
25725
26093
  return false;
25726
26094
  const { liveboardId, vizId, activeTabId, personalizedViewId, } = this.viewConfig;
25727
- return showing.liveboardId === liveboardId
25728
- && showing.vizId === vizId
25729
- && showing.activeTabId === activeTabId
25730
- && showing.personalizedViewId === personalizedViewId;
26095
+ return previousRoute.liveboardId === liveboardId
26096
+ && previousRoute.vizId === vizId
26097
+ && previousRoute.activeTabId === activeTabId
26098
+ && previousRoute.personalizedViewId === personalizedViewId;
25731
26099
  }
25732
26100
  async handleRenderForPrerender() {
25733
26101
  if (isUndefined$1(this.viewConfig.liveboardId)) {
@@ -26489,6 +26857,28 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
26489
26857
  }
26490
26858
  };
26491
26859
 
26860
+ /**
26861
+ * Actions hidden by default on Answers rendered by the ThoughtSpot MCP server
26862
+ * (iframes carrying the `tsmcp=true` marker). Applied automatically by
26863
+ * {@link AutoFrameRenderer} so the auto-rendered answer exposes a curated set of
26864
+ * controls: Pin/Save/Download at the top level, Aggregate/Filter/Sort/Position in
26865
+ * the column menu, and Exclude/Only include/Drill down/Show underlying data in the
26866
+ * axis menu remain visible, while the actions below are removed.
26867
+ *
26868
+ * This is a denylist merged into {@link Param.HideActions}; anything not listed
26869
+ * here stays visible. It is skipped when the caller supplies a `visibleActions`
26870
+ * allowlist (see {@link AutoFrameRenderer.getEmbedParamsObject}).
26871
+ */
26872
+ [
26873
+ exports.Action.Edit,
26874
+ exports.Action.InConversationTraining,
26875
+ exports.Action.AxisMenuConditionalFormat,
26876
+ exports.Action.AxisMenuRename,
26877
+ exports.Action.AxisMenuEdit,
26878
+ exports.Action.AxisMenuRemove,
26879
+ exports.Action.MakeACopy,
26880
+ ];
26881
+
26492
26882
  const componentFactory = (EmbedConstructor,
26493
26883
  // isPreRenderedComponent: Specifies whether the component being returned is
26494
26884
  // intended for preRendering. If set to true, the component will call the