@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
  import * as React from 'react';
4
4
  import React__default, { useRef, useCallback } from 'react';
@@ -656,6 +656,7 @@ var EmbedEvent;
656
656
  * })
657
657
  * ```
658
658
  * @returns isLoggedIn - A Boolean specifying whether authentication was successful.
659
+ * Payload: {@link AuthInitPayload}.
659
660
  */
660
661
  EmbedEvent["AuthInit"] = "authInit";
661
662
  /**
@@ -675,6 +676,7 @@ var EmbedEvent;
675
676
  /**
676
677
  * Data pertaining to an Answer, Liveboard or Spotter visualization is received.
677
678
  * The event payload includes the raw data of the object.
679
+ * Payload: {@link DataEventPayload}.
678
680
  * @return data - Answer of Liveboard data
679
681
  * @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
680
682
  * @example
@@ -688,6 +690,7 @@ var EmbedEvent;
688
690
  EmbedEvent["Data"] = "data";
689
691
  /**
690
692
  * Search query has been updated by the user.
693
+ * Payload: {@link QueryChangedPayload} or a string.
691
694
  * @version SDK: 1.4.0 | ThoughtSpot: ts7.sep.cl, 8.4.1.sw
692
695
  * @example
693
696
  * ```js
@@ -730,6 +733,7 @@ var EmbedEvent;
730
733
  * })
731
734
  * })
732
735
  * ```
736
+ * Payload: {@link DrilldownPayload}.
733
737
  */
734
738
  EmbedEvent["Drilldown"] = "drillDown";
735
739
  /**
@@ -742,6 +746,7 @@ var EmbedEvent;
742
746
  * console.log('DataSourceSelected', payload);
743
747
  * })
744
748
  * ```
749
+ * Payload: {@link DataSourceSelectedPayload} or string[].
745
750
  */
746
751
  EmbedEvent["DataSourceSelected"] = "dataSourceSelected";
747
752
  /**
@@ -754,6 +759,7 @@ var EmbedEvent;
754
759
  * console.log('AddRemoveColumns', payload);
755
760
  * })
756
761
  * ```
762
+ * Payload: string[].
757
763
  */
758
764
  EmbedEvent["AddRemoveColumns"] = "addRemoveColumns";
759
765
  /**
@@ -771,6 +777,7 @@ var EmbedEvent;
771
777
  * }
772
778
  * })
773
779
  * ```
780
+ * Payload: {@link CustomActionPayload} (on() enriches it to {@link CustomActionEventPayload}).
774
781
  */
775
782
  EmbedEvent["CustomAction"] = "customAction";
776
783
  /**
@@ -783,6 +790,7 @@ var EmbedEvent;
783
790
  * console.log('VizPointDoubleClick', payload);
784
791
  * })
785
792
  * ```
793
+ * Payload: {@link VizInteractionPayload}.
786
794
  */
787
795
  EmbedEvent["VizPointDoubleClick"] = "vizPointDoubleClick";
788
796
  /**
@@ -802,6 +810,7 @@ var EmbedEvent;
802
810
  * )
803
811
  * });
804
812
  * ```
813
+ * Payload: {@link VizInteractionPayload}.
805
814
  */
806
815
  EmbedEvent["VizPointClick"] = "vizPointClick";
807
816
  /**
@@ -854,6 +863,7 @@ var EmbedEvent;
854
863
  * // { errorType: "API", message: '...', code: '...' }
855
864
  * });
856
865
  * ```
866
+ * Payload: {@link EmbedErrorPayload} or a string.
857
867
  */
858
868
  EmbedEvent["Error"] = "Error";
859
869
  /**
@@ -904,6 +914,7 @@ var EmbedEvent;
904
914
  * The center of visible iframe viewport is calculated.
905
915
  * @returns data - The center of the visible Iframe viewport.
906
916
  * @hidden
917
+ * Payload: none.
907
918
  */
908
919
  EmbedEvent["EmbedIframeCenter"] = "EmbedIframeCenter";
909
920
  /**
@@ -960,6 +971,7 @@ var EmbedEvent;
960
971
  * console.log('dialog open', payload);
961
972
  * })
962
973
  * ```
974
+ * Payload: none.
963
975
  */
964
976
  EmbedEvent["DialogOpen"] = "dialog-open";
965
977
  /**
@@ -971,6 +983,7 @@ var EmbedEvent;
971
983
  * console.log('dialog close', payload);
972
984
  * })
973
985
  * ```
986
+ * Payload: none.
974
987
  */
975
988
  EmbedEvent["DialogClose"] = "dialog-close";
976
989
  /**
@@ -993,6 +1006,7 @@ var EmbedEvent;
993
1006
  * embed.trigger(HostEvent.SetVisibleVizs, ['viz1', 'viz2']);
994
1007
  * };
995
1008
  * ```
1009
+ * Payload: none.
996
1010
  */
997
1011
  EmbedEvent["LiveboardRendered"] = "PinboardRendered";
998
1012
  /**
@@ -1023,6 +1037,7 @@ var EmbedEvent;
1023
1037
  * console.log('Save', payload)
1024
1038
  * })
1025
1039
  * ```
1040
+ * Payload: {@link SaveEventPayload}.
1026
1041
  */
1027
1042
  EmbedEvent["Save"] = "save";
1028
1043
  /**
@@ -1039,6 +1054,7 @@ var EmbedEvent;
1039
1054
  * vizId: '730496d6-6903-4601-937e-2c691821af3c'
1040
1055
  * })
1041
1056
  * ```
1057
+ * Payload: {@link VizScope}.
1042
1058
  */
1043
1059
  EmbedEvent["Download"] = "download";
1044
1060
  /**
@@ -1058,6 +1074,7 @@ var EmbedEvent;
1058
1074
  * searchEmbed.on(EmbedEvent.DownloadAsPng, payload => {
1059
1075
  * console.log('download PNG', payload)})
1060
1076
  * ```
1077
+ * Payload: {@link DownloadEventPayload}.
1061
1078
  */
1062
1079
  EmbedEvent["DownloadAsPng"] = "downloadAsPng";
1063
1080
  /**
@@ -1077,6 +1094,7 @@ var EmbedEvent;
1077
1094
  * searchEmbed.on(EmbedEvent.DownloadAsPdf, payload => {
1078
1095
  * console.log('download PDF', payload)})
1079
1096
  * ```
1097
+ * Payload: {@link DownloadEventPayload}.
1080
1098
  */
1081
1099
  EmbedEvent["DownloadAsPdf"] = "downloadAsPdf";
1082
1100
  /**
@@ -1096,6 +1114,7 @@ var EmbedEvent;
1096
1114
  * searchEmbed.on(EmbedEvent.DownloadAsCsv, payload => {
1097
1115
  * console.log('download CSV', payload)})
1098
1116
  * ```
1117
+ * Payload: {@link DownloadEventPayload}.
1099
1118
  */
1100
1119
  EmbedEvent["DownloadAsCsv"] = "downloadAsCsv";
1101
1120
  /**
@@ -1115,6 +1134,7 @@ var EmbedEvent;
1115
1134
  * searchEmbed.on(EmbedEvent.DownloadAsXlsx, payload => {
1116
1135
  * console.log('download Xlsx', payload)})
1117
1136
  * ```
1137
+ * Payload: {@link DownloadEventPayload}.
1118
1138
  */
1119
1139
  EmbedEvent["DownloadAsXlsx"] = "downloadAsXlsx";
1120
1140
  /**
@@ -1126,6 +1146,7 @@ var EmbedEvent;
1126
1146
  * liveboardEmbed.on(EmbedEvent.DownloadLiveboardAsContinuousPDF, payload => {
1127
1147
  * console.log('download liveboard as continuous PDF', payload)})
1128
1148
  * ```
1149
+ * Payload: {@link LiveboardScope}.
1129
1150
  */
1130
1151
  EmbedEvent["DownloadLiveboardAsContinuousPDF"] = "downloadLiveboardAsContinuousPDF";
1131
1152
  /**
@@ -1142,6 +1163,7 @@ var EmbedEvent;
1142
1163
  * appEmbed.on(EmbedEvent.AnswerDelete, payload => {
1143
1164
  * console.log('delete answer', payload)})
1144
1165
  * ```
1166
+ * Payload: {@link AnswerScope}.
1145
1167
  */
1146
1168
  EmbedEvent["AnswerDelete"] = "answerDelete";
1147
1169
  /**
@@ -1153,6 +1175,7 @@ var EmbedEvent;
1153
1175
  * console.log('AI Highlights', payload);
1154
1176
  * })
1155
1177
  * ```
1178
+ * Payload: {@link LiveboardScope}.
1156
1179
  */
1157
1180
  EmbedEvent["AIHighlights"] = "AIHighlights";
1158
1181
  /**
@@ -1174,6 +1197,7 @@ var EmbedEvent;
1174
1197
  * console.log('pin', payload)
1175
1198
  * })
1176
1199
  * ```
1200
+ * Payload: {@link PinEventPayload}.
1177
1201
  */
1178
1202
  EmbedEvent["Pin"] = "pin";
1179
1203
  /**
@@ -1192,6 +1216,7 @@ var EmbedEvent;
1192
1216
  * console.log('SpotIQ analyze', payload)
1193
1217
  * })
1194
1218
  * ```
1219
+ * Payload: {@link AnswerScope}.
1195
1220
  */
1196
1221
  EmbedEvent["SpotIQAnalyze"] = "spotIQAnalyze";
1197
1222
  /**
@@ -1245,6 +1270,7 @@ var EmbedEvent;
1245
1270
  * console.log('copy to clipboard', payload);
1246
1271
  * })
1247
1272
  * ```
1273
+ * Payload: {@link CopyToClipboardPayload}.
1248
1274
  */
1249
1275
  EmbedEvent["CopyToClipboard"] = "context-menu-item-copy-to-clipboard";
1250
1276
  /**
@@ -1256,6 +1282,7 @@ var EmbedEvent;
1256
1282
  * liveboardEmbed.on(EmbedEvent.UpdateTML)
1257
1283
  * })
1258
1284
  * ```
1285
+ * Payload: {@link TmlEventPayload}.
1259
1286
  */
1260
1287
  EmbedEvent["UpdateTML"] = "updateTSL";
1261
1288
  /**
@@ -1268,6 +1295,7 @@ var EmbedEvent;
1268
1295
  * console.log('Edit TML', payload);
1269
1296
  * })
1270
1297
  * ```
1298
+ * Payload: {@link TmlEventPayload}.
1271
1299
  */
1272
1300
  EmbedEvent["EditTML"] = "editTSL";
1273
1301
  /**
@@ -1285,6 +1313,7 @@ var EmbedEvent;
1285
1313
  * searchEmbed.on(EmbedEvent.ExportTML, payload => {
1286
1314
  * console.log('Export TML', payload)})
1287
1315
  * ```
1316
+ * Payload: {@link TmlEventPayload}.
1288
1317
  */
1289
1318
  EmbedEvent["ExportTML"] = "exportTSL";
1290
1319
  /**
@@ -1323,6 +1352,7 @@ var EmbedEvent;
1323
1352
  * console.log('show data', payload);
1324
1353
  * })
1325
1354
  * ```
1355
+ * Payload: {@link AnswerScope}.
1326
1356
  */
1327
1357
  EmbedEvent["ShowUnderlyingData"] = "showUnderlyingData";
1328
1358
  /**
@@ -1334,6 +1364,7 @@ var EmbedEvent;
1334
1364
  * console.log('switch view', payload);
1335
1365
  * })
1336
1366
  * ```
1367
+ * Payload: {@link AnswerChartSwitcherPayload}.
1337
1368
  */
1338
1369
  EmbedEvent["AnswerChartSwitcher"] = "answerChartSwitcher";
1339
1370
  /**
@@ -1355,6 +1386,7 @@ var EmbedEvent;
1355
1386
  * console.log('Liveboard details', payload);
1356
1387
  * })
1357
1388
  * ```
1389
+ * Payload: {@link LiveboardScope}.
1358
1390
  */
1359
1391
  EmbedEvent["LiveboardInfo"] = "pinboardInfo";
1360
1392
  /**
@@ -1366,6 +1398,7 @@ var EmbedEvent;
1366
1398
  * console.log('favorites', payload);
1367
1399
  * })
1368
1400
  * ```
1401
+ * Payload: {@link FavoritePayload}.
1369
1402
  */
1370
1403
  EmbedEvent["AddToFavorites"] = "addToFavorites";
1371
1404
  /**
@@ -1377,6 +1410,7 @@ var EmbedEvent;
1377
1410
  * console.log('Liveboard schedule', payload);
1378
1411
  * })
1379
1412
  * ```
1413
+ * Payload: {@link LiveboardScope}.
1380
1414
  */
1381
1415
  EmbedEvent["Schedule"] = "subscription";
1382
1416
  /**
@@ -1391,6 +1425,7 @@ var EmbedEvent;
1391
1425
  * console.log('Liveboard edit', payload);
1392
1426
  * })
1393
1427
  * ```
1428
+ * Payload: {@link LiveboardVizScope}.
1394
1429
  */
1395
1430
  EmbedEvent["Edit"] = "edit";
1396
1431
  /**
@@ -1432,6 +1467,7 @@ var EmbedEvent;
1432
1467
  * console.log('Copy', payload);
1433
1468
  * })
1434
1469
  * ```
1470
+ * Payload: {@link MakeACopyPayload}.
1435
1471
  */
1436
1472
  EmbedEvent["MakeACopy"] = "makeACopy";
1437
1473
  /**
@@ -1447,6 +1483,7 @@ var EmbedEvent;
1447
1483
  * vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1448
1484
  * })
1449
1485
  * ```
1486
+ * Payload: {@link LiveboardVizScope}.
1450
1487
  */
1451
1488
  EmbedEvent["Present"] = "present";
1452
1489
  /**
@@ -1457,6 +1494,7 @@ var EmbedEvent;
1457
1494
  * liveboardEmbed.on(EmbedEvent.Delete,
1458
1495
  * {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1459
1496
  * ```
1497
+ * Payload: {@link LiveboardScope}.
1460
1498
  */
1461
1499
  EmbedEvent["Delete"] = "delete";
1462
1500
  /**
@@ -1466,6 +1504,7 @@ var EmbedEvent;
1466
1504
  * ```js
1467
1505
  * liveboardEmbed.on(EmbedEvent.SchedulesList)
1468
1506
  * ```
1507
+ * Payload: {@link LiveboardScope}.
1469
1508
  */
1470
1509
  EmbedEvent["SchedulesList"] = "schedule-list";
1471
1510
  /**
@@ -1475,6 +1514,7 @@ var EmbedEvent;
1475
1514
  * ```js
1476
1515
  * liveboardEmbed.on(EmbedEvent.Cancel)
1477
1516
  * ```
1517
+ * Payload: {@link LiveboardScope}.
1478
1518
  */
1479
1519
  EmbedEvent["Cancel"] = "cancel";
1480
1520
  /**
@@ -1485,6 +1525,7 @@ var EmbedEvent;
1485
1525
  * liveboardEmbed.on(EmbedEvent.Explore, {
1486
1526
  * vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1487
1527
  * ```
1528
+ * Payload: {@link LiveboardVizScope}.
1488
1529
  */
1489
1530
  EmbedEvent["Explore"] = "explore";
1490
1531
  /**
@@ -1495,6 +1536,7 @@ var EmbedEvent;
1495
1536
  * liveboardEmbed.on(EmbedEvent.CopyLink, {
1496
1537
  * vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1497
1538
  * ```
1539
+ * Payload: {@link CopyLinkPayload}.
1498
1540
  */
1499
1541
  EmbedEvent["CopyLink"] = "embedDocument";
1500
1542
  /**
@@ -1506,6 +1548,7 @@ var EmbedEvent;
1506
1548
  * liveboardEmbed.on(EmbedEvent.CrossFilterChanged, {
1507
1549
  * vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1508
1550
  * ```
1551
+ * Payload: {@link CrossFilterChangedPayload}.
1509
1552
  */
1510
1553
  EmbedEvent["CrossFilterChanged"] = "cross-filter-changed";
1511
1554
  /**
@@ -1517,6 +1560,7 @@ var EmbedEvent;
1517
1560
  * console.log('VizPointClick', payload)
1518
1561
  * })
1519
1562
  * ```
1563
+ * Payload: {@link VizInteractionPayload}.
1520
1564
  */
1521
1565
  EmbedEvent["VizPointRightClick"] = "vizPointRightClick";
1522
1566
  /**
@@ -1544,6 +1588,7 @@ var EmbedEvent;
1544
1588
  * })
1545
1589
  * ```
1546
1590
  * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl, 9.5.0.sw
1591
+ * Payload: {@link FilterChangedPayload}.
1547
1592
  */
1548
1593
  EmbedEvent["FilterChanged"] = "filterChanged";
1549
1594
  /**
@@ -1566,6 +1611,7 @@ var EmbedEvent;
1566
1611
  * @returns isPublic: boolean
1567
1612
  * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
1568
1613
  * @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
1614
+ * Payload: {@link PersonalisedViewPayload}.
1569
1615
  */
1570
1616
  EmbedEvent["UpdatePersonalisedView"] = "updatePersonalisedView";
1571
1617
  /**
@@ -1587,6 +1633,7 @@ var EmbedEvent;
1587
1633
  * @returns isPublic: boolean
1588
1634
  * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
1589
1635
  * @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
1636
+ * Payload: {@link PersonalisedViewPayload}.
1590
1637
  */
1591
1638
  EmbedEvent["SavePersonalisedView"] = "savePersonalisedView";
1592
1639
  /**
@@ -1661,6 +1708,7 @@ var EmbedEvent;
1661
1708
  /**
1662
1709
  * Emitted when a Liveboard or visualization is renamed.
1663
1710
  * @version SDK: 1.28.0 | ThoughtSpot: 9.10.5.cl, 10.1.0.sw
1711
+ * Payload: {@link RenamePayload}.
1664
1712
  */
1665
1713
  EmbedEvent["Rename"] = "rename";
1666
1714
  /**
@@ -1746,6 +1794,7 @@ var EmbedEvent;
1746
1794
  * })
1747
1795
  * ```
1748
1796
  * @version SDK: 1.29.0 | ThoughtSpot: 10.3.0.cl
1797
+ * Payload: {@link ParameterChangedPayload}.
1749
1798
  */
1750
1799
  EmbedEvent["ParameterChanged"] = "parameterChanged";
1751
1800
  /**
@@ -1789,6 +1838,7 @@ var EmbedEvent;
1789
1838
  * })
1790
1839
  * ```
1791
1840
  * @version SDK: 1.37.0 | ThoughtSpot: 10.8.0.cl
1841
+ * Payload: {@link TableVizRenderedPayload}.
1792
1842
  */
1793
1843
  EmbedEvent["TableVizRendered"] = "TableVizRendered";
1794
1844
  /**
@@ -1813,12 +1863,14 @@ var EmbedEvent;
1813
1863
  * @hidden
1814
1864
  * Emitted when a user exits present mode.
1815
1865
  * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
1866
+ * Payload: {@link ExitPresentModePayload}.
1816
1867
  */
1817
1868
  EmbedEvent["ExitPresentMode"] = "exitPresentMode";
1818
1869
  /**
1819
1870
  * Emitted when a user requests the full height lazy load data.
1820
1871
  * @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
1821
1872
  * @hidden
1873
+ * Payload: none.
1822
1874
  */
1823
1875
  EmbedEvent["RequestVisibleEmbedCoordinates"] = "requestVisibleEmbedCoordinates";
1824
1876
  /**
@@ -1852,6 +1904,7 @@ var EmbedEvent;
1852
1904
  * })
1853
1905
  * ```
1854
1906
  * @version SDK: 1.45.0 | ThoughtSpot: 26.2.0.cl
1907
+ * Payload: {@link VizScope}.
1855
1908
  */
1856
1909
  EmbedEvent["AddToCoaching"] = "addToCoaching";
1857
1910
  /**
@@ -1941,6 +1994,7 @@ var EmbedEvent;
1941
1994
  * console.log('EmbedListenerReady');
1942
1995
  * })
1943
1996
  * ```
1997
+ * Payload: none.
1944
1998
  */
1945
1999
  EmbedEvent["EmbedListenerReady"] = "EmbedListenerReady";
1946
2000
  /**
@@ -2315,6 +2369,7 @@ var EmbedEvent;
2315
2369
  * })
2316
2370
  * ```
2317
2371
  * @version SDK: 1.48.0 | ThoughtSpot Cloud: 26.5.0.cl
2372
+ * Payload: {@link TestScheduleEmailPayload}.
2318
2373
  */
2319
2374
  EmbedEvent["SendTestScheduleEmail"] = "sendTestScheduleEmail";
2320
2375
  /**
@@ -2826,6 +2881,19 @@ var HostEvent;
2826
2881
  * ```
2827
2882
  */
2828
2883
  HostEvent["OpenAddParameterModal"] = "openAddParameterModal";
2884
+ /**
2885
+ * Add a tab to the Liveboard, the same action as the *Tab* option in the
2886
+ * *Add* dropdown in the Liveboard edit header.
2887
+ *
2888
+ * The Liveboard must be in edit mode; the event is ignored otherwise.
2889
+ *
2890
+ * @version SDK: 1.56.0 | ThoughtSpot Cloud: 27.1.0.cl
2891
+ * @example
2892
+ * ```js
2893
+ * liveboardEmbed.trigger(HostEvent.OpenAddTabModal);
2894
+ * ```
2895
+ */
2896
+ HostEvent["OpenAddTabModal"] = "openAddTabModal";
2829
2897
  /**
2830
2898
  * Open the parameter panel for a particular parameter on a Liveboard.
2831
2899
  * Mirrors {@link HostEvent.OpenFilter} for parameters.
@@ -3423,6 +3491,17 @@ var HostEvent;
3423
3491
  * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
3424
3492
  */
3425
3493
  HostEvent["EditVisualization"] = "editVisualization";
3494
+ /**
3495
+ * Exits Liveboard edit mode , equivalent to clicking the
3496
+ * *Cancel* button in the Liveboard edit header. The Liveboard returns to
3497
+ * view mode and the embedded app emits the {@link EmbedEvent.Cancel} event.
3498
+ * @version SDK: 1.55.0 | ThoughtSpot Cloud: 26.12.0.cl
3499
+ * @example
3500
+ * ```js
3501
+ * liveboardEmbed.trigger(HostEvent.ExitEditMode);
3502
+ * ```
3503
+ */
3504
+ HostEvent["ExitEditMode"] = "exitEditMode";
3426
3505
  /**
3427
3506
  * Trigger the **Copy link** action on a Liveboard or visualization
3428
3507
  * Payload: {@link VizScopedRequest}.
@@ -4958,6 +5037,39 @@ var HostEvent;
4958
5037
  * @version SDK: 1.49.0 | ThoughtSpot Cloud: 26.6.0.cl
4959
5038
  */
4960
5039
  HostEvent["RefreshLiveboardBrowserCache"] = "refreshLiveboardBrowserCache";
5040
+ /**
5041
+ * Switch the embed between dark appearance and its default appearance
5042
+ * while it is open, without reloading it.
5043
+ * Payload: {@link UpdateThemeRequest}.
5044
+ *
5045
+ * Use it to keep the embed in step with a theme switch in your
5046
+ * application; the appearance the embed loads with is set by `isDarkMode`.
5047
+ * The event resolves with the applied value, such as `{ isDarkMode: true }`.
5048
+ * When dark appearance is not available in the embed, the embed does not
5049
+ * change and the event rejects with an error message instead.
5050
+ * @version SDK: 1.55.0 | ThoughtSpot Cloud: 26.12.0.cl
5051
+ * @param - `isDarkMode` - `true` for dark appearance, `false` for the
5052
+ * default appearance.
5053
+ * @example
5054
+ * ```js
5055
+ * appEmbed.trigger(HostEvent.UpdateTheme, { isDarkMode: true });
5056
+ * ```
5057
+ * @example
5058
+ * ```js
5059
+ * // Follow a theme switch in your application
5060
+ * const themeSwitch = document.querySelector('#theme-switch');
5061
+ * themeSwitch.addEventListener('change', async (event) => {
5062
+ * try {
5063
+ * await appEmbed.trigger(HostEvent.UpdateTheme, {
5064
+ * isDarkMode: event.target.checked,
5065
+ * });
5066
+ * } catch (error) {
5067
+ * console.warn(error);
5068
+ * }
5069
+ * });
5070
+ * ```
5071
+ */
5072
+ HostEvent["UpdateTheme"] = "UpdateTheme";
4961
5073
  })(HostEvent || (HostEvent = {}));
4962
5074
  /**
4963
5075
  * The different visual modes that the data sources panel within
@@ -5001,6 +5113,7 @@ var Param;
5001
5113
  * @version SDK: 1.52.2 | ThoughtSpot Cloud: 26.9.0.cl
5002
5114
  */
5003
5115
  Param["TsmcpAnswerIndex"] = "tsmcpAnswerIndex";
5116
+ Param["IsMcpAnswerEmbed"] = "isMcpAnswerEmbed";
5004
5117
  Param["EmbedApp"] = "embedApp";
5005
5118
  Param["DataSources"] = "dataSources";
5006
5119
  Param["DataSourceMode"] = "dataSourceMode";
@@ -5203,6 +5316,21 @@ var Param;
5203
5316
  var Action;
5204
5317
  (function (Action) {
5205
5318
  /**
5319
+ * The **Add** button on a Liveboard in edit mode.
5320
+ * Controls the visibility and disabled state of the Add panel button
5321
+ * in the Liveboard edit toolbar, which allows users to add
5322
+ * visualizations, filters, parameters, and tabs.
5323
+ * @example
5324
+ * ```js
5325
+ * hiddenActions: [Action.LiveboardAddPanel]
5326
+ * // or
5327
+ * disabledActions: [Action.LiveboardAddPanel]
5328
+ * ```
5329
+ * @version SDK: 1.56.0 | ThoughtSpot Cloud: 27.1.0.cl
5330
+ */
5331
+ Action["LiveboardAddPanel"] = "liveboardAddPanel";
5332
+ /**
5333
+ *
5206
5334
  * The **Save** action on an Answer or Liveboard.
5207
5335
  * Allows users to save the changes.
5208
5336
  * @example
@@ -7433,6 +7561,125 @@ var Action;
7433
7561
  * ```
7434
7562
  */
7435
7563
  Action["CustomizeHomepage"] = "customizeHomepage";
7564
+ /**
7565
+ * Controls the visibility and disabled state of the *Cancel* button in the
7566
+ * Liveboard edit header, the button that discards the changes made in edit
7567
+ * mode and returns the Liveboard to view mode. The button is shown only
7568
+ * while the Liveboard is in edit mode.
7569
+ * @version SDK: 1.55.0 | ThoughtSpot Cloud: 26.12.0.cl
7570
+ * @example
7571
+ * ```js
7572
+ * const liveboardEmbed = new LiveboardEmbed('#tsEmbed', {
7573
+ * ... // other embed view config
7574
+ * hiddenActions: [Action.Cancel],
7575
+ * });
7576
+ * ```
7577
+ * @example
7578
+ * ```js
7579
+ * const liveboardEmbed = new LiveboardEmbed('#tsEmbed', {
7580
+ * ... // other embed view config
7581
+ * disabledActions: [Action.Cancel],
7582
+ * disabledActionReason: 'Save your changes to leave edit mode',
7583
+ * });
7584
+ * ```
7585
+ */
7586
+ Action["Cancel"] = "cancel";
7587
+ /**
7588
+ * Controls the visibility and disabled state of the "Version history" menu item for a Liveboard or Answer.
7589
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 9.8.0.cl
7590
+ * @example
7591
+ * ```js
7592
+ * {
7593
+ * hiddenActions: [Action.ShowVersionHistory],
7594
+ * disabledActions: [Action.ShowVersionHistory],
7595
+ * }
7596
+ * ```
7597
+ */
7598
+ Action["ShowVersionHistory"] = "showVersionHistory";
7599
+ /**
7600
+ * Controls the visibility and disabled state of the "Enable version control" menu item for a Liveboard or Answer.
7601
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 9.10.0.cl
7602
+ * @example
7603
+ * ```js
7604
+ * {
7605
+ * hiddenActions: [Action.EnableVersionControl],
7606
+ * disabledActions: [Action.EnableVersionControl],
7607
+ * }
7608
+ * ```
7609
+ */
7610
+ Action["EnableVersionControl"] = "enableVersionControl";
7611
+ /**
7612
+ * Controls the visibility and disabled state of the "Disable version control" menu item for a Liveboard or Answer.
7613
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 9.10.0.cl
7614
+ * @example
7615
+ * ```js
7616
+ * {
7617
+ * hiddenActions: [Action.DisableVersionControl],
7618
+ * disabledActions: [Action.DisableVersionControl],
7619
+ * }
7620
+ * ```
7621
+ */
7622
+ Action["DisableVersionControl"] = "disableVersionControl";
7623
+ /**
7624
+ * Controls the visibility and disabled state of the "Withdraw verification" menu item for a verified Liveboard.
7625
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 9.8.0.cl
7626
+ * @example
7627
+ * ```js
7628
+ * {
7629
+ * hiddenActions: [Action.WithdrawVerification],
7630
+ * disabledActions: [Action.WithdrawVerification],
7631
+ * }
7632
+ * ```
7633
+ */
7634
+ Action["WithdrawVerification"] = "withdrawVerification";
7635
+ /**
7636
+ * Controls the visibility and disabled state of the "Switch to new chart experience" menu item on an Answer.
7637
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 10.10.0.cl
7638
+ * @example
7639
+ * ```js
7640
+ * {
7641
+ * hiddenActions: [Action.SwitchToNewChartExperience],
7642
+ * disabledActions: [Action.SwitchToNewChartExperience],
7643
+ * }
7644
+ * ```
7645
+ */
7646
+ Action["SwitchToNewChartExperience"] = "switchToNewChartExperience";
7647
+ /**
7648
+ * Controls the visibility and disabled state of the "Switch to classic chart experience" menu item on an Answer.
7649
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 10.10.0.cl
7650
+ * @example
7651
+ * ```js
7652
+ * {
7653
+ * hiddenActions: [Action.SwitchToClassicChartExperience],
7654
+ * disabledActions: [Action.SwitchToClassicChartExperience],
7655
+ * }
7656
+ * ```
7657
+ */
7658
+ Action["SwitchToClassicChartExperience"] = "switchToClassicChartExperience";
7659
+ /**
7660
+ * Controls the visibility and disabled state of the "Monitor" menu item on an Answer, which includes the alert options.
7661
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 10.5.0.cl
7662
+ * @example
7663
+ * ```js
7664
+ * {
7665
+ * hiddenActions: [Action.Monitor],
7666
+ * disabledActions: [Action.Monitor],
7667
+ * }
7668
+ * ```
7669
+ */
7670
+ Action["Monitor"] = "monitor";
7671
+ /**
7672
+ * 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.
7673
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
7674
+ * @example
7675
+ * ```js
7676
+ * {
7677
+ * hiddenActions: [Action.SpotterViewExplanation],
7678
+ * disabledActions: [Action.SpotterViewExplanation],
7679
+ * }
7680
+ * ```
7681
+ */
7682
+ Action["SpotterViewExplanation"] = "spotterViewExplanation";
7436
7683
  })(Action || (Action = {}));
7437
7684
  var PrefetchFeatures;
7438
7685
  (function (PrefetchFeatures) {
@@ -7937,7 +8184,7 @@ var TableContentDensity;
7937
8184
  TableContentDensity["Compact"] = "COMPACT";
7938
8185
  })(TableContentDensity || (TableContentDensity = {}));
7939
8186
 
7940
- var version$1="1.53.0";var pkg = {version:version$1};
8187
+ var version$1="1.53.2-beta";var pkg = {version:version$1};
7941
8188
 
7942
8189
  const { version } = pkg;
7943
8190
 
@@ -10707,7 +10954,7 @@ class AnswerService {
10707
10954
  async getTML() {
10708
10955
  const { object } = await this.executeQuery(getAnswerTML, {});
10709
10956
  const edoc = object[0].edoc;
10710
- const YAML = await import('./index-CyDR8j_0.js');
10957
+ const YAML = await import('./index-DQ7r5f1z.js');
10711
10958
  const parsedDoc = YAML.parse(edoc);
10712
10959
  return {
10713
10960
  answer: {
@@ -19890,6 +20137,32 @@ function initMixpanel(sessionInfo) {
19890
20137
  }
19891
20138
  }
19892
20139
 
20140
+ // Membership is checked, not just the key: a bare key allowlist would upload an
20141
+ // arbitrary customer string sitting under `operator` verbatim.
20142
+ const isEnumMember = (enumObject, value) => typeof value === 'string' && Object.values(enumObject).includes(value);
20143
+ const uniqueEnumMembers = (enumObject, values) => Array.from(new Set(values.filter((v) => isEnumMember(enumObject, v))));
20144
+ const describeRuntimeFilters = (runtimeFilters) => ({
20145
+ count: runtimeFilters.length,
20146
+ operators: uniqueEnumMembers(RuntimeFilterOp, runtimeFilters.map((filter) => filter === null || filter === void 0 ? void 0 : filter.operator)),
20147
+ });
20148
+ const describeRuntimeParameters = (runtimeParameters) => ({
20149
+ count: runtimeParameters.length,
20150
+ 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; })),
20151
+ });
20152
+ // Column names, parameter names and operands are customer data and must never
20153
+ // reach Mixpanel; an unrecognized shape is dropped rather than forwarded.
20154
+ const summarizeRuntimeDataForTelemetry = (viewConfig) => {
20155
+ const { runtimeFilters, runtimeParameters, ...rest } = viewConfig !== null && viewConfig !== void 0 ? viewConfig : {};
20156
+ const telemetryProps = { ...rest };
20157
+ if (Array.isArray(runtimeFilters)) {
20158
+ telemetryProps.runtimeFilters = describeRuntimeFilters(runtimeFilters);
20159
+ }
20160
+ if (Array.isArray(runtimeParameters)) {
20161
+ telemetryProps.runtimeParameters = describeRuntimeParameters(runtimeParameters);
20162
+ }
20163
+ return telemetryProps;
20164
+ };
20165
+
19893
20166
  var eventemitter3 = createCommonjsModule(function (module) {
19894
20167
 
19895
20168
  var has = Object.prototype.hasOwnProperty
@@ -20834,11 +21107,13 @@ const doBasicAuth = async (embedConfig) => {
20834
21107
  * @param ssoURL
20835
21108
  * @param triggerContainer
20836
21109
  * @param triggerText
21110
+ * @param thoughtSpotHost
20837
21111
  */
20838
- async function samlPopupFlow(ssoURL, triggerContainer, triggerText) {
21112
+ async function samlPopupFlow(ssoURL, triggerContainer, triggerText, thoughtSpotHost) {
21113
+ const thoughtSpotOrigin = new URL(thoughtSpotHost).origin;
20839
21114
  let popupClosedCheck;
20840
21115
  const openPopup = () => {
20841
- if (samlAuthWindow === null || samlAuthWindow.closed) {
21116
+ if (!samlAuthWindow || samlAuthWindow.closed) {
20842
21117
  samlAuthWindow = window.open(ssoURL, '_blank', 'location=no,height=570,width=520,scrollbars=yes,status=yes');
20843
21118
  if (samlAuthWindow) {
20844
21119
  popupClosedCheck = setInterval(() => {
@@ -20866,7 +21141,14 @@ async function samlPopupFlow(ssoURL, triggerContainer, triggerText) {
20866
21141
  }
20867
21142
  samlCompletionPromise = samlCompletionPromise || new Promise((resolve, reject) => {
20868
21143
  window.addEventListener('message', (e) => {
20869
- if (e.data.type === EmbedEvent.SAMLComplete) {
21144
+ var _a;
21145
+ // Only the SSO popup we opened, on the ThoughtSpot origin, may
21146
+ // complete the flow or hand us a token; anything else could
21147
+ // inject an attacker's token into the auth cache.
21148
+ if (e.origin !== thoughtSpotOrigin || !samlAuthWindow || e.source !== samlAuthWindow) {
21149
+ return;
21150
+ }
21151
+ if (((_a = e.data) === null || _a === void 0 ? void 0 : _a.type) === EmbedEvent.SAMLComplete) {
20870
21152
  if (e.data.accessToken) {
20871
21153
  const decodedToken = decodeURIComponent(e.data.accessToken);
20872
21154
  storeAuthTokenInCache(decodedToken);
@@ -20907,7 +21189,7 @@ const doSSOAuth = async (embedConfig, ssoEndPoint) => {
20907
21189
  }
20908
21190
  const ssoURL = `${thoughtSpotHost}${ssoEndPoint}`;
20909
21191
  if (embedConfig.inPopup) {
20910
- await samlPopupFlow(ssoURL, embedConfig.authTriggerContainer, embedConfig.authTriggerText);
21192
+ await samlPopupFlow(ssoURL, embedConfig.authTriggerContainer, embedConfig.authTriggerText, thoughtSpotHost);
20911
21193
  const cachedToken = getCacheAuthToken();
20912
21194
  if (cachedToken) {
20913
21195
  loggedInStatus = true;
@@ -20919,12 +21201,22 @@ const doSSOAuth = async (embedConfig, ssoEndPoint) => {
20919
21201
  }
20920
21202
  window.location.href = ssoURL;
20921
21203
  };
21204
+ /**
21205
+ * The popup's SSO completion page. hostAppOrigin tells ThoughtSpot which
21206
+ * origin opened the popup; the cluster only posts a token back to it if it
21207
+ * is an allowed redirect domain.
21208
+ * @param thoughtSpotHost
21209
+ */
21210
+ const getSSOCompletePageUrl = (thoughtSpotHost) => {
21211
+ const hostAppOrigin = encodeURIComponent(window.location.origin);
21212
+ return `${thoughtSpotHost}/v2/#/embed/saml-complete?hostAppOrigin=${hostAppOrigin}`;
21213
+ };
20922
21214
  const doSamlAuth = async (embedConfig) => {
20923
21215
  const { thoughtSpotHost } = embedConfig;
20924
21216
  // redirect for SSO, when the SSO authentication is done, this page will be
20925
21217
  // loaded again and the same JS will execute again.
20926
21218
  const ssoRedirectUrl = embedConfig.inPopup
20927
- ? `${thoughtSpotHost}/v2/#/embed/saml-complete`
21219
+ ? getSSOCompletePageUrl(thoughtSpotHost)
20928
21220
  : getRedirectUrl(window.location.href, SSO_REDIRECTION_MARKER_GUID, embedConfig.redirectPath);
20929
21221
  // bring back the page to the same URL
20930
21222
  const ssoEndPoint = `${EndPoints.SAML_LOGIN_TEMPLATE(encodeURIComponent(ssoRedirectUrl))}`;
@@ -20936,7 +21228,7 @@ const doOIDCAuth = async (embedConfig) => {
20936
21228
  // redirect for SSO, when the SSO authentication is done, this page will be
20937
21229
  // loaded again and the same JS will execute again.
20938
21230
  const ssoRedirectUrl = embedConfig.noRedirect || embedConfig.inPopup
20939
- ? `${thoughtSpotHost}/v2/#/embed/saml-complete`
21231
+ ? getSSOCompletePageUrl(thoughtSpotHost)
20940
21232
  : getRedirectUrl(window.location.href, SSO_REDIRECTION_MARKER_GUID, embedConfig.redirectPath);
20941
21233
  // bring back the page to the same URL
20942
21234
  const baseEndpoint = `${EndPoints.OIDC_LOGIN_TEMPLATE(encodeURIComponent(ssoRedirectUrl))}`;
@@ -22019,6 +22311,9 @@ const TS_EMBED_ID = '_thoughtspot-embed';
22019
22311
  */
22020
22312
  const PRERENDER_CONTAINER_ORIGINAL_POSITION_KEY = 'tsEmbedOriginalPosition';
22021
22313
  const PRERENDER_WRAPPER_ID_PREFIX = 'tsEmbed-pre-render-wrapper-';
22314
+ const PRERENDER_PARKED_TRANSFORM = 'translateY(-100%)';
22315
+ /** The height createPreRenderWrapper() seeds before anything is measured. */
22316
+ const UNMEASURED_WRAPPER_HEIGHT = '100vh';
22022
22317
  // The container applies UpdateEmbedParams through React state, so a delivered
22023
22318
  // post is not the same as the params being in effect.
22024
22319
  const UPDATE_EMBED_PARAMS_SETTLE_MS = 200;
@@ -22155,7 +22450,6 @@ class TsEmbed {
22155
22450
  this.shouldEncodeUrlQueryParams = false;
22156
22451
  this.defaultHiddenActions = [Action.ReportError];
22157
22452
  this.preRenderContainerEl = document.body;
22158
- this.containerScrollListener = null;
22159
22453
  /**
22160
22454
  * Handler for fullscreen change events
22161
22455
  */
@@ -22335,9 +22629,7 @@ class TsEmbed {
22335
22629
  ...viewConfig,
22336
22630
  };
22337
22631
  this.registerAppInit();
22338
- uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_EMBED_CREATE, {
22339
- ...viewConfig,
22340
- });
22632
+ uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_EMBED_CREATE, summarizeRuntimeDataForTelemetry(viewConfig));
22341
22633
  const embedConfig = getEmbedConfig();
22342
22634
  if (embedConfig) {
22343
22635
  this.embedConfig = embedConfig;
@@ -23041,7 +23333,7 @@ class TsEmbed {
23041
23333
  top: '0',
23042
23334
  left: '0',
23043
23335
  width: '100vw',
23044
- height: '100vh',
23336
+ height: UNMEASURED_WRAPPER_HEIGHT,
23045
23337
  };
23046
23338
  setStyleProperties(preRenderWrapper, initialPreRenderWrapperStyle);
23047
23339
  return preRenderWrapper;
@@ -23109,10 +23401,12 @@ class TsEmbed {
23109
23401
  return placeholder;
23110
23402
  }
23111
23403
  /**
23112
- * Resolves the configured preRenderContainer to a live element, falling
23113
- * back to `document.body`. A string selector is re-queried on every call so
23114
- * a remounted container (E.g.: React replacing the node) resolves to the
23115
- * fresh element; an element passed directly cannot be re-resolved.
23404
+ * Resolves the configured preRenderContainer, or defaults to the host's
23405
+ * nearest scrolling ancestor (document.body if none). The absolutely
23406
+ * positioned wrapper only follows the page while it sits inside what
23407
+ * scrolls, so body is right only when the document itself scrolls — an inner
23408
+ * scroller left the frame pinned to the viewport (SCAL-338563). A string
23409
+ * selector is re-queried each call so a remounted container resolves fresh.
23116
23410
  */
23117
23411
  resolvePreRenderContainerTarget() {
23118
23412
  var _a;
@@ -23132,7 +23426,13 @@ class TsEmbed {
23132
23426
  else if (containerConfig) {
23133
23427
  container = containerConfig;
23134
23428
  }
23135
- return (_a = container) !== null && _a !== void 0 ? _a : document.body;
23429
+ if (container) {
23430
+ return container;
23431
+ }
23432
+ if (!this.hostElement) {
23433
+ return document.body;
23434
+ }
23435
+ return (_a = getScrollableAncestors(this.hostElement)[0]) !== null && _a !== void 0 ? _a : document.body;
23136
23436
  }
23137
23437
  inheritPreRenderContainer() {
23138
23438
  var _a;
@@ -23177,8 +23477,9 @@ class TsEmbed {
23177
23477
  * Re-attaches the wrapper to a live container when the previously resolved
23178
23478
  * one has been detached or no longer holds the wrapper — e.g. the host app
23179
23479
  * remounted a custom preRenderContainer, which would otherwise leave a stale
23180
- * reference and collapse the wrapper. Only string selectors can be
23181
- * re-resolved; a container passed as an element is left untouched.
23480
+ * reference and collapse the wrapper. Selectors and the auto-resolved
23481
+ * scrolling ancestor are both re-resolved; a container passed as an element
23482
+ * is left untouched, as there is nothing to re-query.
23182
23483
  */
23183
23484
  reconcilePreRenderContainer() {
23184
23485
  const wrapper = this.preRenderWrapper;
@@ -23197,14 +23498,6 @@ class TsEmbed {
23197
23498
  if (resolved === stored && stored.contains(wrapper)) {
23198
23499
  return;
23199
23500
  }
23200
- if (this.containerScrollListener && stored !== resolved) {
23201
- if (stored !== document.body) {
23202
- stored.removeEventListener('scroll', this.containerScrollListener);
23203
- }
23204
- if (resolved !== document.body) {
23205
- resolved.addEventListener('scroll', this.containerScrollListener);
23206
- }
23207
- }
23208
23501
  this.preRenderContainerEl = resolved;
23209
23502
  this.applyPreRenderContainerPositioning();
23210
23503
  if (wrapper.parentNode !== resolved) {
@@ -23266,11 +23559,12 @@ class TsEmbed {
23266
23559
  */
23267
23560
  setIFrameHeight(height) {
23268
23561
  if (this.isPreRendered) {
23562
+ const next = getCssDimension(height);
23269
23563
  if (this.insertedDomEl) {
23270
- this.insertedDomEl.style.height = getCssDimension(height);
23564
+ this.insertedDomEl.style.height = next;
23271
23565
  }
23272
23566
  else if (this.preRenderWrapper) {
23273
- this.preRenderWrapper.style.height = getCssDimension(height);
23567
+ this.preRenderWrapper.style.height = next;
23274
23568
  }
23275
23569
  }
23276
23570
  else {
@@ -23712,34 +24006,47 @@ class TsEmbed {
23712
24006
  delete container.dataset[PRERENDER_CONTAINER_ORIGINAL_POSITION_KEY];
23713
24007
  }
23714
24008
  /**
23715
- * Detaches and clears the container scroll listener, if one is attached.
23716
- */
23717
- removeContainerScrollListener() {
23718
- if (!this.containerScrollListener) {
24009
+ * Re-sizes the wrapper when its placeholder changes size.
24010
+ *
24011
+ * Position deliberately has no equivalent. An absolutely positioned wrapper
24012
+ * follows its containing block for free, so a correctly placed frame is the
24013
+ * browser's job and costs nothing; repositioning it on scroll would mean a
24014
+ * layout read and a style write per frame to compensate for placing it in
24015
+ * the wrong box. Size is the one thing the browser will not do for us: the
24016
+ * placeholder grows when the embedded app reports a new height, and the
24017
+ * wrapper has to be told.
24018
+ */
24019
+ observePreRenderSize() {
24020
+ var _a;
24021
+ if (this.getPreRenderConfig().doNotTrackSize || typeof ResizeObserver === 'undefined') {
23719
24022
  return;
23720
24023
  }
23721
- const customContainer = this.getCustomPreRenderContainer();
23722
- customContainer === null || customContainer === void 0 ? void 0 : customContainer.removeEventListener('scroll', this.containerScrollListener);
23723
- this.containerScrollListener = null;
24024
+ const placeholder = this.getPreRenderPlaceHolderElement();
24025
+ if (!placeholder) {
24026
+ return;
24027
+ }
24028
+ (_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
24029
+ this.resizeObserver = new ResizeObserver(() => this.syncPreRenderStyle());
24030
+ this.resizeObserver.observe(placeholder);
23724
24031
  }
23725
24032
  /**
23726
24033
  * Destroys the ThoughtSpot embed, and remove any nodes from the DOM.
23727
24034
  * @version SDK: 1.19.1 | ThoughtSpot: *
23728
24035
  */
23729
24036
  destroy() {
23730
- var _a, _b, _c;
24037
+ var _a, _b, _c, _d;
23731
24038
  try {
23732
24039
  this.removeFullscreenChangeHandler();
23733
- this.removeContainerScrollListener();
24040
+ (_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
23734
24041
  this.unsubscribeToEvents();
23735
- (_a = this.preRenderWrapper) === null || _a === void 0 ? void 0 : _a.remove();
24042
+ (_b = this.preRenderWrapper) === null || _b === void 0 ? void 0 : _b.remove();
23736
24043
  this.restorePreRenderContainerPosition();
23737
24044
  if (!this.isRendered) {
23738
24045
  return;
23739
24046
  }
23740
24047
  if (!getEmbedConfig().waitForCleanupOnDestroy) {
23741
24048
  this.trigger(HostEvent.DestroyEmbed);
23742
- (_c = (_b = this.insertedDomEl) === null || _b === void 0 ? void 0 : _b.parentNode) === null || _c === void 0 ? void 0 : _c.removeChild(this.insertedDomEl);
24049
+ (_d = (_c = this.insertedDomEl) === null || _c === void 0 ? void 0 : _c.parentNode) === null || _d === void 0 ? void 0 : _d.removeChild(this.insertedDomEl);
23743
24050
  }
23744
24051
  else {
23745
24052
  const cleanupTimeout = getEmbedConfig().cleanupTimeout;
@@ -23830,7 +24137,7 @@ class TsEmbed {
23830
24137
  * wrapper to overlay it.
23831
24138
  */
23832
24139
  async showPreRender() {
23833
- var _a, _b;
24140
+ var _a;
23834
24141
  uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_SHOW_PRE_RENDER, {
23835
24142
  preRenderId: this.getPreRenderConfig().id,
23836
24143
  embedComponentType: this.viewConfig.embedComponentType,
@@ -23849,14 +24156,16 @@ class TsEmbed {
23849
24156
  this.beforePrerenderVisible();
23850
24157
  if (this.hostElement) {
23851
24158
  this.insertedDomEl = this.createPreRenderPlaceholder();
23852
- if (this.viewConfig.fullHeight) {
23853
- // If fullHeight has already sized the wrapper, seed the
23854
- // placeholder with the same height so syncPreRenderStyle gets
23855
- // an accurate rect.
23856
- const existingHeight = this.preRenderWrapper.style.height;
23857
- if (existingHeight) {
23858
- this.insertedDomEl.style.height = existingHeight;
23859
- }
24159
+ // Carry a height fullHeight has already measured onto the fresh
24160
+ // placeholder, so a re-show does not flash at frameParams height.
24161
+ // UNMEASURED_WRAPPER_HEIGHT is what createPreRenderWrapper() seeds
24162
+ // before anything has been measured; treating that as a measurement
24163
+ // is what made a first reveal overshoot to a full viewport.
24164
+ const wrapperHeight = this.preRenderWrapper.style.height;
24165
+ if (this.viewConfig.fullHeight
24166
+ && wrapperHeight
24167
+ && wrapperHeight !== UNMEASURED_WRAPPER_HEIGHT) {
24168
+ this.insertedDomEl.style.height = wrapperHeight;
23860
24169
  }
23861
24170
  const placeHolderId = this.getPreRenderIds().placeHolder;
23862
24171
  // Remove any stale placeholder from a previous cycle. It is located
@@ -23870,29 +24179,19 @@ class TsEmbed {
23870
24179
  (_a = this.hostElement.querySelector(`#${placeHolderId}`)) === null || _a === void 0 ? void 0 : _a.remove();
23871
24180
  this.hostElement.appendChild(this.insertedDomEl);
23872
24181
  this.syncPreRenderStyle();
23873
- const customContainer = this.getCustomPreRenderContainer();
23874
- if (customContainer && !this.containerScrollListener) {
23875
- this.containerScrollListener = () => this.syncPreRenderStyle();
23876
- customContainer.addEventListener('scroll', this.containerScrollListener);
23877
- }
23878
- if (!this.getPreRenderConfig().doNotTrackSize) {
23879
- const observeTarget = (_b = this.insertedDomEl) !== null && _b !== void 0 ? _b : this.hostElement;
23880
- this.resizeObserver = new ResizeObserver((entries) => {
23881
- entries.forEach((entry) => {
23882
- if (entry.target === observeTarget) {
23883
- this.syncPreRenderStyle();
23884
- }
23885
- });
23886
- });
23887
- this.resizeObserver.observe(observeTarget);
23888
- }
24182
+ this.observePreRenderSize();
23889
24183
  }
23890
24184
  removeStyleProperties(this.preRenderWrapper, [
23891
24185
  'z-index',
23892
24186
  'opacity',
23893
- 'pointer-events',
23894
24187
  'overflow',
24188
+ 'transform',
23895
24189
  ]);
24190
+ // Set rather than removed: a container that carries `pointer-events:
24191
+ // none` — the usual styling for a parking root that must not swallow
24192
+ // clicks — passes it down, and dropping the property here would leave
24193
+ // the inherited `none` in force and the frame dead to input.
24194
+ setStyleProperties(this.preRenderWrapper, { pointerEvents: 'auto' });
23896
24195
  this.subscribeToEvents();
23897
24196
  // Setup fullscreen change handler for prerendered components
23898
24197
  if (this.iFrame) {
@@ -23945,6 +24244,7 @@ class TsEmbed {
23945
24244
  * If the component is not preRendered, it issues a warning.
23946
24245
  */
23947
24246
  hidePreRender() {
24247
+ var _a;
23948
24248
  uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_HIDE_PRE_RENDER, {
23949
24249
  preRenderId: this.getPreRenderConfig().id,
23950
24250
  embedComponentType: this.viewConfig.embedComponentType,
@@ -23956,20 +24256,25 @@ class TsEmbed {
23956
24256
  return;
23957
24257
  }
23958
24258
  const { zIndex } = this.getPreRenderConfig();
24259
+ // A hidden pre-render frame must add no scroll space to the host page.
23959
24260
  const preRenderHideStyles = {
23960
24261
  opacity: '0',
23961
24262
  pointerEvents: 'none',
23962
24263
  zIndex: zIndex !== undefined ? String(zIndex) : '-1000',
23963
- position: 'absolute',
24264
+ // Resolves to the viewport, so the hidden frame belongs to no
24265
+ // scroll container's overflow; syncPreRenderStyle restores absolute
24266
+ // on show.
24267
+ position: 'fixed',
23964
24268
  top: '0',
23965
24269
  left: '0',
23966
24270
  overflow: 'hidden',
24271
+ // The one exception: a transformed or contained ancestor captures
24272
+ // `fixed`; parking above the top edge keeps it out of that
24273
+ // overflow.
24274
+ transform: PRERENDER_PARKED_TRANSFORM,
23967
24275
  };
23968
24276
  setStyleProperties(this.preRenderWrapper, preRenderHideStyles);
23969
- this.removeContainerScrollListener();
23970
- if (this.resizeObserver) {
23971
- this.resizeObserver.disconnect();
23972
- }
24277
+ (_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
23973
24278
  const placeHolderEle = this.getPreRenderPlaceHolderElement();
23974
24279
  if (placeHolderEle) {
23975
24280
  placeHolderEle.parentElement.removeChild(placeHolderEle);
@@ -24674,8 +24979,11 @@ function buildSpotterSidebarAppInitData(defaultAppInitData, viewConfig, handleEr
24674
24979
  embedParams: { visualOverridesParams: visualOverrides },
24675
24980
  };
24676
24981
  }
24982
+ // The app reads enableSpotterInstructionAndMoreSettings from the top level
24983
+ // of embedParams, so lift it out of the sidebar config.
24984
+ const { enableSpotterInstructionAndMoreSettings, ...sidebarConfigRest } = spotterSidebarConfig || {};
24677
24985
  const resolvedSidebarConfig = {
24678
- ...spotterSidebarConfig,
24986
+ ...sidebarConfigRest,
24679
24987
  ...(resolvedEnablePastConversations !== undefined && {
24680
24988
  enablePastConversationsSidebar: resolvedEnablePastConversations,
24681
24989
  }),
@@ -24697,6 +25005,9 @@ function buildSpotterSidebarAppInitData(defaultAppInitData, viewConfig, handleEr
24697
25005
  embedParams: {
24698
25006
  ...(defaultAppInitData.embedParams || {}),
24699
25007
  spotterSidebarConfig: resolvedSidebarConfig,
25008
+ ...(enableSpotterInstructionAndMoreSettings !== undefined
25009
+ ? { enableSpotterInstructionAndMoreSettings }
25010
+ : {}),
24700
25011
  ...(visualOverrides !== undefined ? { visualOverridesParams: visualOverrides } : {}),
24701
25012
  },
24702
25013
  };
@@ -25266,6 +25577,46 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
25266
25577
  }
25267
25578
  };
25268
25579
 
25580
+ /**
25581
+ * This method is like `_.isEqual` except that it accepts `customizer` which
25582
+ * is invoked to compare values. If `customizer` returns `undefined`, comparisons
25583
+ * are handled by the method instead. The `customizer` is invoked with up to
25584
+ * six arguments: (objValue, othValue [, index|key, object, other, stack]).
25585
+ *
25586
+ * @static
25587
+ * @memberOf _
25588
+ * @since 4.0.0
25589
+ * @category Lang
25590
+ * @param {*} value The value to compare.
25591
+ * @param {*} other The other value to compare.
25592
+ * @param {Function} [customizer] The function to customize comparisons.
25593
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
25594
+ * @example
25595
+ *
25596
+ * function isGreeting(value) {
25597
+ * return /^h(?:i|ello)$/.test(value);
25598
+ * }
25599
+ *
25600
+ * function customizer(objValue, othValue) {
25601
+ * if (isGreeting(objValue) && isGreeting(othValue)) {
25602
+ * return true;
25603
+ * }
25604
+ * }
25605
+ *
25606
+ * var array = ['hello', 'goodbye'];
25607
+ * var other = ['hi', 'goodbye'];
25608
+ *
25609
+ * _.isEqualWith(array, other, customizer);
25610
+ * // => true
25611
+ */
25612
+ function isEqualWith(value, other, customizer) {
25613
+ customizer = typeof customizer == 'function' ? customizer : undefined;
25614
+ var result = customizer ? customizer(value, other) : undefined;
25615
+ return result === undefined ? _baseIsEqual(value, other, undefined, customizer) : !!result;
25616
+ }
25617
+
25618
+ var isEqualWith_1 = isEqualWith;
25619
+
25269
25620
  const getPreviewQuery = `
25270
25621
  query GetEurekaVizSnapshots(
25271
25622
  $vizId: String!, $liveboardId: String!) {
@@ -25380,6 +25731,11 @@ const HOME_SETTLE_MS = 200;
25380
25731
  * })
25381
25732
  * ```
25382
25733
  */
25734
+ /**
25735
+ * A shallow copy without the keys whose value is `undefined`, so a key that was
25736
+ * assigned `undefined` compares equal to one that was never set.
25737
+ */
25738
+ const definedEntries = (config = {}) => Object.fromEntries(Object.entries(config).filter(([, value]) => value !== undefined));
25383
25739
  let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
25384
25740
  constructor(domSelector, viewConfig) {
25385
25741
  viewConfig.embedComponentType = 'LiveboardEmbed';
@@ -25665,16 +26021,18 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
25665
26021
  beforePrerenderVisible() {
25666
26022
  super.beforePrerenderVisible();
25667
26023
  // Captured before showPreRender() hands the wrapper over to this
25668
- // instance. Itself means a hide/show, not a hand-over, so there is
25669
- // nothing stale to clear.
26024
+ // instance. React builds a new instance per mount, so an equal config
26025
+ // is a hide/show, not a hand-over: there is nothing stale to clear.
25670
26026
  const previous = this.getPreRenderObj();
25671
- const showing = previous === this ? undefined : previous === null || previous === void 0 ? void 0 : previous.currentLiveboardState;
26027
+ const previousRoute = this.isSameEmbedConfig(previous)
26028
+ ? undefined
26029
+ : previous === null || previous === void 0 ? void 0 : previous.currentLiveboardState;
25672
26030
  this.executeAfterEmbedContainerLoaded(async () => {
25673
26031
  // Without this the params callback suspends on its await and
25674
26032
  // Navigate goes out first, so the container loads with the previous
25675
26033
  // config's filters.
25676
26034
  await this.preRenderParamsApplied;
25677
- if (this.isShowingLiveboardRoute(showing)) {
26035
+ if (this.isAlreadyOnSameRoute(previousRoute)) {
25678
26036
  // Navigate to the route we are already on is a no-op, so the
25679
26037
  // liveboard keeps its state. Home unmounts the container, which
25680
26038
  // clears it.
@@ -25695,17 +26053,27 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
25695
26053
  };
25696
26054
  });
25697
26055
  }
26056
+ // definedEntries drops undefined-valued keys: a shown instance carries
26057
+ // vizId/activeTabId/etc as undefined, so a raw isEqual never matches again.
26058
+ // Functions compare equal, since React passes a fresh closure per render.
26059
+ isSameEmbedConfig(previous) {
26060
+ if (!previous)
26061
+ return false;
26062
+ if (previous === this)
26063
+ return true;
26064
+ return isEqualWith_1(definedEntries(previous.viewConfig), definedEntries(this.viewConfig), (a, b) => (typeof a === 'function' && typeof b === 'function' ? true : undefined));
26065
+ }
25698
26066
  // The whole route, not just the liveboard id: the path is built from the
25699
26067
  // viz, tab and view too, so a same-liveboard show onto another tab is a
25700
26068
  // real navigation.
25701
- isShowingLiveboardRoute(showing) {
25702
- if (!(showing === null || showing === void 0 ? void 0 : showing.liveboardId))
26069
+ isAlreadyOnSameRoute(previousRoute) {
26070
+ if (!(previousRoute === null || previousRoute === void 0 ? void 0 : previousRoute.liveboardId))
25703
26071
  return false;
25704
26072
  const { liveboardId, vizId, activeTabId, personalizedViewId, } = this.viewConfig;
25705
- return showing.liveboardId === liveboardId
25706
- && showing.vizId === vizId
25707
- && showing.activeTabId === activeTabId
25708
- && showing.personalizedViewId === personalizedViewId;
26073
+ return previousRoute.liveboardId === liveboardId
26074
+ && previousRoute.vizId === vizId
26075
+ && previousRoute.activeTabId === activeTabId
26076
+ && previousRoute.personalizedViewId === personalizedViewId;
25709
26077
  }
25710
26078
  async handleRenderForPrerender() {
25711
26079
  if (isUndefined$1(this.viewConfig.liveboardId)) {
@@ -26467,6 +26835,28 @@ let ConversationEmbed$1 = class ConversationEmbed extends SpotterEmbed$1 {
26467
26835
  }
26468
26836
  };
26469
26837
 
26838
+ /**
26839
+ * Actions hidden by default on Answers rendered by the ThoughtSpot MCP server
26840
+ * (iframes carrying the `tsmcp=true` marker). Applied automatically by
26841
+ * {@link AutoFrameRenderer} so the auto-rendered answer exposes a curated set of
26842
+ * controls: Pin/Save/Download at the top level, Aggregate/Filter/Sort/Position in
26843
+ * the column menu, and Exclude/Only include/Drill down/Show underlying data in the
26844
+ * axis menu remain visible, while the actions below are removed.
26845
+ *
26846
+ * This is a denylist merged into {@link Param.HideActions}; anything not listed
26847
+ * here stays visible. It is skipped when the caller supplies a `visibleActions`
26848
+ * allowlist (see {@link AutoFrameRenderer.getEmbedParamsObject}).
26849
+ */
26850
+ [
26851
+ Action.Edit,
26852
+ Action.InConversationTraining,
26853
+ Action.AxisMenuConditionalFormat,
26854
+ Action.AxisMenuRename,
26855
+ Action.AxisMenuEdit,
26856
+ Action.AxisMenuRemove,
26857
+ Action.MakeACopy,
26858
+ ];
26859
+
26470
26860
  const componentFactory = (EmbedConstructor,
26471
26861
  // isPreRenderedComponent: Specifies whether the component being returned is
26472
26862
  // intended for preRendering. If set to true, the component will call the