@thoughtspot/visual-embed-sdk 1.42.1-alpha.7 → 1.42.3

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 (229) hide show
  1. package/cjs/package.json +4 -3
  2. package/cjs/src/css-variables.d.ts +0 -48
  3. package/cjs/src/css-variables.d.ts.map +1 -1
  4. package/cjs/src/embed/app.d.ts +20 -0
  5. package/cjs/src/embed/app.d.ts.map +1 -1
  6. package/cjs/src/embed/app.js +9 -4
  7. package/cjs/src/embed/app.js.map +1 -1
  8. package/cjs/src/embed/app.spec.js +62 -0
  9. package/cjs/src/embed/app.spec.js.map +1 -1
  10. package/cjs/src/embed/base.d.ts.map +1 -1
  11. package/cjs/src/embed/base.js +2 -0
  12. package/cjs/src/embed/base.js.map +1 -1
  13. package/cjs/src/embed/bodyless-conversation.d.ts +1 -1
  14. package/cjs/src/embed/conversation.d.ts +16 -0
  15. package/cjs/src/embed/conversation.d.ts.map +1 -1
  16. package/cjs/src/embed/conversation.js +5 -2
  17. package/cjs/src/embed/conversation.js.map +1 -1
  18. package/cjs/src/embed/conversation.spec.js +25 -1
  19. package/cjs/src/embed/conversation.spec.js.map +1 -1
  20. package/cjs/src/embed/hostEventClient/contracts.d.ts +1 -11
  21. package/cjs/src/embed/hostEventClient/contracts.d.ts.map +1 -1
  22. package/cjs/src/embed/hostEventClient/contracts.js +0 -1
  23. package/cjs/src/embed/hostEventClient/contracts.js.map +1 -1
  24. package/cjs/src/embed/liveboard.d.ts.map +1 -1
  25. package/cjs/src/embed/liveboard.js +5 -1
  26. package/cjs/src/embed/liveboard.js.map +1 -1
  27. package/cjs/src/embed/liveboard.spec.js +46 -0
  28. package/cjs/src/embed/liveboard.spec.js.map +1 -1
  29. package/cjs/src/embed/sage.d.ts +4 -4
  30. package/cjs/src/embed/search.d.ts.map +1 -1
  31. package/cjs/src/embed/search.js +1 -3
  32. package/cjs/src/embed/search.js.map +1 -1
  33. package/cjs/src/embed/ts-embed.d.ts +0 -2
  34. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  35. package/cjs/src/embed/ts-embed.js +31 -44
  36. package/cjs/src/embed/ts-embed.js.map +1 -1
  37. package/cjs/src/embed/ts-embed.spec.js +134 -43
  38. package/cjs/src/embed/ts-embed.spec.js.map +1 -1
  39. package/cjs/src/errors.js +1 -1
  40. package/cjs/src/errors.js.map +1 -1
  41. package/cjs/src/index.d.ts +3 -3
  42. package/cjs/src/index.d.ts.map +1 -1
  43. package/cjs/src/index.js +1 -2
  44. package/cjs/src/index.js.map +1 -1
  45. package/cjs/src/react/all-types-export.d.ts +1 -2
  46. package/cjs/src/react/all-types-export.d.ts.map +1 -1
  47. package/cjs/src/react/all-types-export.js +5 -3
  48. package/cjs/src/react/all-types-export.js.map +1 -1
  49. package/cjs/src/react/all-types-export.spec.js +0 -8
  50. package/cjs/src/react/all-types-export.spec.js.map +1 -1
  51. package/cjs/src/react/index.d.ts +1 -2
  52. package/cjs/src/react/index.d.ts.map +1 -1
  53. package/cjs/src/react/index.js +2 -1
  54. package/cjs/src/react/index.js.map +1 -1
  55. package/cjs/src/react/util.d.ts +1 -0
  56. package/cjs/src/react/util.d.ts.map +1 -1
  57. package/cjs/src/types.d.ts +80 -94
  58. package/cjs/src/types.d.ts.map +1 -1
  59. package/cjs/src/types.js +30 -46
  60. package/cjs/src/types.js.map +1 -1
  61. package/cjs/src/utils/custom-actions.d.ts.map +1 -1
  62. package/cjs/src/utils/custom-actions.js +9 -0
  63. package/cjs/src/utils/custom-actions.js.map +1 -1
  64. package/cjs/src/utils/custom-actions.spec.js +20 -0
  65. package/cjs/src/utils/custom-actions.spec.js.map +1 -1
  66. package/cjs/src/utils/processData.d.ts +1 -1
  67. package/cjs/src/utils/processData.d.ts.map +1 -1
  68. package/cjs/src/utils/processData.js +8 -8
  69. package/cjs/src/utils/processData.js.map +1 -1
  70. package/cjs/src/utils/processData.spec.js.map +1 -1
  71. package/dist/{index-DvNA626T.js → index-SVcLgSqi.js} +1 -1
  72. package/dist/src/css-variables.d.ts +0 -48
  73. package/dist/src/css-variables.d.ts.map +1 -1
  74. package/dist/src/embed/app.d.ts +20 -0
  75. package/dist/src/embed/app.d.ts.map +1 -1
  76. package/dist/src/embed/base.d.ts.map +1 -1
  77. package/dist/src/embed/bodyless-conversation.d.ts +1 -1
  78. package/dist/src/embed/conversation.d.ts +16 -0
  79. package/dist/src/embed/conversation.d.ts.map +1 -1
  80. package/dist/src/embed/hostEventClient/contracts.d.ts +1 -11
  81. package/dist/src/embed/hostEventClient/contracts.d.ts.map +1 -1
  82. package/dist/src/embed/liveboard.d.ts.map +1 -1
  83. package/dist/src/embed/sage.d.ts +4 -4
  84. package/dist/src/embed/search.d.ts.map +1 -1
  85. package/dist/src/embed/ts-embed.d.ts +0 -2
  86. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  87. package/dist/src/index.d.ts +3 -3
  88. package/dist/src/index.d.ts.map +1 -1
  89. package/dist/src/react/all-types-export.d.ts +1 -2
  90. package/dist/src/react/all-types-export.d.ts.map +1 -1
  91. package/dist/src/react/index.d.ts +1 -2
  92. package/dist/src/react/index.d.ts.map +1 -1
  93. package/dist/src/react/util.d.ts +1 -0
  94. package/dist/src/react/util.d.ts.map +1 -1
  95. package/dist/src/types.d.ts +80 -94
  96. package/dist/src/types.d.ts.map +1 -1
  97. package/dist/src/utils/custom-actions.d.ts.map +1 -1
  98. package/dist/src/utils/processData.d.ts +1 -1
  99. package/dist/src/utils/processData.d.ts.map +1 -1
  100. package/dist/tsembed-react.es.js +114 -224
  101. package/dist/tsembed-react.js +258 -444
  102. package/dist/tsembed.es.js +113 -224
  103. package/dist/tsembed.js +256 -443
  104. package/dist/visual-embed-sdk-react-full.d.ts +126 -161
  105. package/dist/visual-embed-sdk-react.d.ts +117 -156
  106. package/dist/visual-embed-sdk.d.ts +117 -159
  107. package/lib/package.json +4 -3
  108. package/lib/src/css-variables.d.ts +0 -48
  109. package/lib/src/css-variables.d.ts.map +1 -1
  110. package/lib/src/embed/app.d.ts +20 -0
  111. package/lib/src/embed/app.d.ts.map +1 -1
  112. package/lib/src/embed/app.js +9 -4
  113. package/lib/src/embed/app.js.map +1 -1
  114. package/lib/src/embed/app.spec.js +62 -0
  115. package/lib/src/embed/app.spec.js.map +1 -1
  116. package/lib/src/embed/base.d.ts.map +1 -1
  117. package/lib/src/embed/base.js +2 -0
  118. package/lib/src/embed/base.js.map +1 -1
  119. package/lib/src/embed/bodyless-conversation.d.ts +1 -1
  120. package/lib/src/embed/conversation.d.ts +16 -0
  121. package/lib/src/embed/conversation.d.ts.map +1 -1
  122. package/lib/src/embed/conversation.js +5 -2
  123. package/lib/src/embed/conversation.js.map +1 -1
  124. package/lib/src/embed/conversation.spec.js +25 -1
  125. package/lib/src/embed/conversation.spec.js.map +1 -1
  126. package/lib/src/embed/hostEventClient/contracts.d.ts +1 -11
  127. package/lib/src/embed/hostEventClient/contracts.d.ts.map +1 -1
  128. package/lib/src/embed/hostEventClient/contracts.js +0 -1
  129. package/lib/src/embed/hostEventClient/contracts.js.map +1 -1
  130. package/lib/src/embed/liveboard.d.ts.map +1 -1
  131. package/lib/src/embed/liveboard.js +5 -1
  132. package/lib/src/embed/liveboard.js.map +1 -1
  133. package/lib/src/embed/liveboard.spec.js +47 -1
  134. package/lib/src/embed/liveboard.spec.js.map +1 -1
  135. package/lib/src/embed/sage.d.ts +4 -4
  136. package/lib/src/embed/search.d.ts.map +1 -1
  137. package/lib/src/embed/search.js +1 -3
  138. package/lib/src/embed/search.js.map +1 -1
  139. package/lib/src/embed/ts-embed.d.ts +0 -2
  140. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  141. package/lib/src/embed/ts-embed.js +31 -44
  142. package/lib/src/embed/ts-embed.js.map +1 -1
  143. package/lib/src/embed/ts-embed.spec.js +134 -43
  144. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  145. package/lib/src/errors.js +1 -1
  146. package/lib/src/errors.js.map +1 -1
  147. package/lib/src/index.d.ts +3 -3
  148. package/lib/src/index.d.ts.map +1 -1
  149. package/lib/src/index.js +2 -2
  150. package/lib/src/index.js.map +1 -1
  151. package/lib/src/react/all-types-export.d.ts +1 -2
  152. package/lib/src/react/all-types-export.d.ts.map +1 -1
  153. package/lib/src/react/all-types-export.js +2 -2
  154. package/lib/src/react/all-types-export.js.map +1 -1
  155. package/lib/src/react/all-types-export.spec.js +0 -8
  156. package/lib/src/react/all-types-export.spec.js.map +1 -1
  157. package/lib/src/react/index.d.ts +1 -2
  158. package/lib/src/react/index.d.ts.map +1 -1
  159. package/lib/src/react/index.js +4 -3
  160. package/lib/src/react/index.js.map +1 -1
  161. package/lib/src/react/util.d.ts +1 -0
  162. package/lib/src/react/util.d.ts.map +1 -1
  163. package/lib/src/types.d.ts +80 -94
  164. package/lib/src/types.d.ts.map +1 -1
  165. package/lib/src/types.js +29 -45
  166. package/lib/src/types.js.map +1 -1
  167. package/lib/src/utils/custom-actions.d.ts.map +1 -1
  168. package/lib/src/utils/custom-actions.js +9 -0
  169. package/lib/src/utils/custom-actions.js.map +1 -1
  170. package/lib/src/utils/custom-actions.spec.js +20 -0
  171. package/lib/src/utils/custom-actions.spec.js.map +1 -1
  172. package/lib/src/utils/processData.d.ts +1 -1
  173. package/lib/src/utils/processData.d.ts.map +1 -1
  174. package/lib/src/utils/processData.js +8 -8
  175. package/lib/src/utils/processData.js.map +1 -1
  176. package/lib/src/utils/processData.spec.js.map +1 -1
  177. package/package.json +4 -3
  178. package/src/css-variables.ts +0 -58
  179. package/src/embed/app.spec.ts +87 -0
  180. package/src/embed/app.ts +35 -4
  181. package/src/embed/base.ts +2 -0
  182. package/src/embed/bodyless-conversation.ts +1 -1
  183. package/src/embed/conversation.spec.ts +35 -1
  184. package/src/embed/conversation.ts +22 -0
  185. package/src/embed/hostEventClient/contracts.ts +0 -10
  186. package/src/embed/liveboard.spec.ts +60 -0
  187. package/src/embed/liveboard.ts +9 -0
  188. package/src/embed/sage.ts +4 -4
  189. package/src/embed/search.ts +1 -3
  190. package/src/embed/ts-embed.spec.ts +175 -53
  191. package/src/embed/ts-embed.ts +45 -68
  192. package/src/errors.ts +1 -1
  193. package/src/index.ts +3 -4
  194. package/src/react/all-types-export.spec.ts +1 -9
  195. package/src/react/all-types-export.ts +8 -10
  196. package/src/react/index.tsx +130 -155
  197. package/src/types.ts +78 -94
  198. package/src/utils/custom-actions.spec.ts +22 -0
  199. package/src/utils/custom-actions.ts +11 -0
  200. package/src/utils/processData.spec.ts +1 -0
  201. package/src/utils/processData.ts +11 -11
  202. package/cjs/src/api-intercept.d.ts +0 -31
  203. package/cjs/src/api-intercept.d.ts.map +0 -1
  204. package/cjs/src/api-intercept.js +0 -119
  205. package/cjs/src/api-intercept.js.map +0 -1
  206. package/cjs/src/api-intercept.spec.d.ts +0 -2
  207. package/cjs/src/api-intercept.spec.d.ts.map +0 -1
  208. package/cjs/src/api-intercept.spec.js +0 -122
  209. package/cjs/src/api-intercept.spec.js.map +0 -1
  210. package/dist/index-BCC3Z072.js +0 -7371
  211. package/dist/index-BEzW4MDA.js +0 -7371
  212. package/dist/index-BaESA9rq.js +0 -7371
  213. package/dist/index-CFNZIcKr.js +0 -7447
  214. package/dist/index-CqKTa1Fe.js +0 -7447
  215. package/dist/index-DFnPKcjZ.js +0 -7447
  216. package/dist/index-DhFH7b7U.js +0 -7447
  217. package/dist/src/api-intercept.d.ts +0 -31
  218. package/dist/src/api-intercept.d.ts.map +0 -1
  219. package/dist/src/api-intercept.spec.d.ts +0 -2
  220. package/dist/src/api-intercept.spec.d.ts.map +0 -1
  221. package/lib/src/api-intercept.d.ts +0 -31
  222. package/lib/src/api-intercept.d.ts.map +0 -1
  223. package/lib/src/api-intercept.js +0 -112
  224. package/lib/src/api-intercept.js.map +0 -1
  225. package/lib/src/api-intercept.spec.d.ts +0 -2
  226. package/lib/src/api-intercept.spec.d.ts.map +0 -1
  227. package/lib/src/api-intercept.spec.js +0 -119
  228. package/lib/src/api-intercept.spec.js.map +0 -1
  229. package/src/api-intercept.ts +0 -139
@@ -1,4 +1,4 @@
1
- /* @thoughtspot/visual-embed-sdk version 1.42.1-alpha.7 */
1
+ /* @thoughtspot/visual-embed-sdk version 1.42.3 */
2
2
  'use client';
3
3
  import * as React from 'react';
4
4
  import React__default, { useRef, useCallback } from 'react';
@@ -1551,7 +1551,7 @@ var EmbedEvent;
1551
1551
  * the table visualization.
1552
1552
  *
1553
1553
  * If the Row-Level Security (RLS) rules are applied on the
1554
- * Worksheet or Model, exercise caution when changing column
1554
+ * Model, exercise caution when changing column
1555
1555
  * or table cell values to maintain data security.
1556
1556
  *
1557
1557
  * @example
@@ -1609,7 +1609,7 @@ var EmbedEvent;
1609
1609
  */
1610
1610
  EmbedEvent["SpotterData"] = "SpotterData";
1611
1611
  /**
1612
- * Emitted when user opens up the worksheet preview modal in Spotter embed.
1612
+ * Emitted when user opens up the data source preview modal in Spotter embed.
1613
1613
  * @example
1614
1614
  * ```js
1615
1615
  * spotterEmbed.on(EmbedEvent.PreviewSpotterData, (payload) => {
@@ -1697,21 +1697,6 @@ var EmbedEvent;
1697
1697
  * @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
1698
1698
  */
1699
1699
  EmbedEvent["OrgSwitched"] = "orgSwitched";
1700
- /**
1701
- * Emitted when the user intercepts a URL.
1702
- *
1703
- * Supported on all embed types.
1704
- *
1705
- * @example
1706
- * ```js
1707
- * embed.on(EmbedEvent.ApiIntercept, (payload) => {
1708
- * console.log('payload', payload);
1709
- * })
1710
- * ```
1711
- *
1712
- * @version SDK: 1.42.0 | ThoughtSpot: 10.14.0.cl
1713
- */
1714
- EmbedEvent["ApiIntercept"] = "ApiIntercept";
1715
1700
  })(EmbedEvent || (EmbedEvent = {}));
1716
1701
  /**
1717
1702
  * Event types that can be triggered by the host application
@@ -1850,9 +1835,7 @@ var HostEvent;
1850
1835
  */
1851
1836
  HostEvent["Reload"] = "reload";
1852
1837
  /**
1853
- * Get iframe URL for the current embed view on the playground.
1854
- * Developers can use this URL to embed a ThoughtSpot object
1855
- * in apps like Salesforce or Sharepoint.
1838
+ * Get iframe URL for the current embed view.
1856
1839
  * @example
1857
1840
  * ```js
1858
1841
  * const url = embed.trigger(HostEvent.GetIframeUrl);
@@ -2924,7 +2907,7 @@ var HostEvent;
2924
2907
  */
2925
2908
  HostEvent["EditLastPrompt"] = "EditLastPrompt";
2926
2909
  /**
2927
- * Opens the Worksheet preview modal in Spotter Embed.
2910
+ * Opens the data source preview modal in Spotter Embed.
2928
2911
  * @example
2929
2912
  * ```js
2930
2913
  * spotterEmbed.trigger(HostEvent.PreviewSpotterData);
@@ -3006,6 +2989,15 @@ var HostEvent;
3006
2989
  * ```
3007
2990
  */
3008
2991
  HostEvent["UpdateEmbedParams"] = "updateEmbedParams";
2992
+ /**
2993
+ * Triggered when the embed is needed to be destroyed. This is used to clean up any embed related resources internally.
2994
+ * @example
2995
+ * ```js
2996
+ * liveboardEmbed.trigger(HostEvent.DestroyEmbed);
2997
+ * ```
2998
+ * @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
2999
+ */
3000
+ HostEvent["DestroyEmbed"] = "EmbedDestroyed";
3009
3001
  })(HostEvent || (HostEvent = {}));
3010
3002
  /**
3011
3003
  * The different visual modes that the data sources panel within
@@ -3049,6 +3041,7 @@ var Param;
3049
3041
  Param["HideResult"] = "hideResult";
3050
3042
  Param["UseLastSelectedDataSource"] = "useLastSelectedSources";
3051
3043
  Param["Tag"] = "tag";
3044
+ Param["HideTagFilterChips"] = "hideTagFilterChips";
3052
3045
  Param["AutoLogin"] = "autoLogin";
3053
3046
  Param["searchTokenString"] = "searchTokenString";
3054
3047
  Param["executeSearch"] = "executeSearch";
@@ -3137,6 +3130,7 @@ var Param;
3137
3130
  Param["ShowLiveboardReverifyBanner"] = "showLiveboardReverifyBanner";
3138
3131
  Param["LiveboardHeaderV2"] = "isLiveboardHeaderV2Enabled";
3139
3132
  Param["HideIrrelevantFiltersInTab"] = "hideIrrelevantFiltersAtTabLevel";
3133
+ Param["IsEnhancedFilterInteractivityEnabled"] = "isLiveboardPermissionV2Enabled";
3140
3134
  Param["SpotterEnabled"] = "isSpotterExperienceEnabled";
3141
3135
  Param["IsUnifiedSearchExperienceEnabled"] = "isUnifiedSearchExperienceEnabled";
3142
3136
  Param["OverrideOrgId"] = "orgId";
@@ -3153,7 +3147,9 @@ var Param;
3153
3147
  Param["RootMarginForLazyLoad"] = "rootMarginForLazyLoad";
3154
3148
  Param["LiveboardXLSXCSVDownload"] = "isLiveboardXLSXCSVDownloadEnabled";
3155
3149
  Param["isPNGInScheduledEmailsEnabled"] = "isPNGInScheduledEmailsEnabled";
3150
+ Param["isCentralizedLiveboardFilterUXEnabled"] = "isCentralizedLiveboardFilterUXEnabled";
3156
3151
  Param["isLinkParametersEnabled"] = "isLinkParametersEnabled";
3152
+ Param["EnablePastConversationsSidebar"] = "enablePastConversationsSidebar";
3157
3153
  })(Param || (Param = {}));
3158
3154
  /**
3159
3155
  * ThoughtSpot application pages include actions and menu commands
@@ -3266,7 +3262,7 @@ var Action;
3266
3262
  */
3267
3263
  Action["SchedulesList"] = "schedule-list";
3268
3264
  /**
3269
- * The **Share** action on a Liveboard, Answer, or Worksheet.
3265
+ * The **Share** action on a Liveboard, Answer, or Model.
3270
3266
  * Allows users to share an object with other users and groups.
3271
3267
  * @example
3272
3268
  * ```js
@@ -3724,7 +3720,7 @@ var Action;
3724
3720
  Action["AnswerChartSwitcher"] = "answerChartSwitcher";
3725
3721
  /**
3726
3722
  * The Favorites icon (*) for Answers,
3727
- * Liveboard, and data objects like Worksheet, Model,
3723
+ * Liveboard, and data objects like Model,
3728
3724
  * Tables and Views.
3729
3725
  * Allows adding an object to the user's favorites list.
3730
3726
  * @example
@@ -4458,6 +4454,16 @@ var Action;
4458
4454
  * @version SDK: 1.42.0 | ThoughtSpot Cloud: 10.14.0.cl
4459
4455
  */
4460
4456
  Action["RemoveAttachment"] = "removeAttachment";
4457
+ /**
4458
+ * The **Style panel** on a Liveboard.
4459
+ * Controls the visibility of the Liveboard style panel.
4460
+ * @example
4461
+ * ```js
4462
+ * hiddenActions: [Action.LiveboardStylePanel]
4463
+ * ```
4464
+ * @version SDK: 1.43.0 | ThoughtSpot Cloud: 10.15.0.cl
4465
+ */
4466
+ Action["LiveboardStylePanel"] = "liveboardStylePanel";
4461
4467
  })(Action || (Action = {}));
4462
4468
  var PrefetchFeatures;
4463
4469
  (function (PrefetchFeatures) {
@@ -4579,29 +4585,7 @@ var LogLevel;
4579
4585
  * @version SDK: 1.26.7 | ThoughtSpot Cloud: 9.10.0.cl
4580
4586
  */
4581
4587
  LogLevel["TRACE"] = "TRACE";
4582
- })(LogLevel || (LogLevel = {}));
4583
- /**
4584
- * Enum for the type of API intercepted
4585
- */
4586
- var InterceptedApiType;
4587
- (function (InterceptedApiType) {
4588
- /**
4589
- * The apis that are use to get the metadata for the embed
4590
- */
4591
- InterceptedApiType["METADATA"] = "METADATA";
4592
- /**
4593
- * The apis that are use to get the data for the embed
4594
- */
4595
- InterceptedApiType["ANSWER_DATA"] = "ANSWER_DATA";
4596
- /**
4597
- * This will intercept all the apis
4598
- */
4599
- InterceptedApiType["ALL"] = "ALL";
4600
- /**
4601
- * The apis that are use to get the data for the liveboard
4602
- */
4603
- InterceptedApiType["LIVEBOARD_DATA"] = "LIVEBOARD_DATA";
4604
- })(InterceptedApiType || (InterceptedApiType = {}));
4588
+ })(LogLevel || (LogLevel = {}));
4605
4589
 
4606
4590
  const logFunctions = {
4607
4591
  [LogLevel.SILENT]: () => undefined,
@@ -7364,20 +7348,9 @@ function isEmpty(value) {
7364
7348
 
7365
7349
  var isEmpty_1 = isEmpty;
7366
7350
 
7367
- var UIPassthroughEvent;
7368
- (function (UIPassthroughEvent) {
7369
- UIPassthroughEvent["PinAnswerToLiveboard"] = "addVizToPinboard";
7370
- UIPassthroughEvent["SaveAnswer"] = "saveAnswer";
7371
- UIPassthroughEvent["GetDiscoverabilityStatus"] = "getDiscoverabilityStatus";
7372
- UIPassthroughEvent["GetAvailableUIPassthroughs"] = "getAvailableUiPassthroughs";
7373
- UIPassthroughEvent["GetAnswerConfig"] = "getAnswerPageConfig";
7374
- UIPassthroughEvent["GetLiveboardConfig"] = "getPinboardPageConfig";
7375
- UIPassthroughEvent["GetUnsavedAnswerTML"] = "getUnsavedAnswerTML";
7376
- })(UIPassthroughEvent || (UIPassthroughEvent = {}));
7377
-
7378
7351
  const ERROR_MESSAGE = {
7379
7352
  INVALID_THOUGHTSPOT_HOST: 'Error parsing ThoughtSpot host. Please provide a valid URL.',
7380
- SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND: 'Please select a worksheet to get started',
7353
+ SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND: 'Please select a Model to get started',
7381
7354
  LIVEBOARD_VIZ_ID_VALIDATION: 'Please select a Liveboard to embed.',
7382
7355
  TRIGGER_TIMED_OUT: 'Trigger timed-out in getting a response',
7383
7356
  SEARCHEMBED_BETA_WRANING_MESSAGE: 'SearchEmbed is in Beta in this release.',
@@ -8306,7 +8279,7 @@ class AnswerService {
8306
8279
  async getTML() {
8307
8280
  const { object } = await this.executeQuery(getAnswerTML, {});
8308
8281
  const edoc = object[0].edoc;
8309
- const YAML = await import('./index-CqKTa1Fe.js');
8282
+ const YAML = await import('./index-SVcLgSqi.js');
8310
8283
  const parsedDoc = YAML.parse(edoc);
8311
8284
  return {
8312
8285
  answer: {
@@ -9827,6 +9800,14 @@ const getCustomActions = (customActions) => {
9827
9800
  finalValidActions.push(action);
9828
9801
  }
9829
9802
  });
9803
+ // Step 4: Collect warnings for long custom action names
9804
+ const MAX_ACTION_NAME_LENGTH = 30;
9805
+ const warnings = finalValidActions
9806
+ .filter(action => action.name.length > MAX_ACTION_NAME_LENGTH)
9807
+ .map(action => `Custom action name '${action.name}' exceeds ${MAX_ACTION_NAME_LENGTH} characters. This may cause display or truncation issues in the UI.`);
9808
+ if (warnings.length > 0) {
9809
+ logger$3.warn(warnings);
9810
+ }
9830
9811
  const sortedActions = sortBy_1(finalValidActions, (a) => a.name.toLocaleLowerCase());
9831
9812
  return {
9832
9813
  actions: sortedActions,
@@ -17157,6 +17138,8 @@ const CONFIG_DEFAULTS = {
17157
17138
  authTriggerText: 'Authorize',
17158
17139
  authType: AuthType.None,
17159
17140
  logLevel: LogLevel.ERROR,
17141
+ waitForCleanupOnDestroy: false,
17142
+ cleanupTimeout: 5000,
17160
17143
  };
17161
17144
  let authPromise;
17162
17145
  const getAuthPromise = () => authPromise;
@@ -17459,27 +17442,27 @@ function processAuthLogout(e, containerEl) {
17459
17442
  * @param thoughtSpotHost
17460
17443
  * @param containerEl
17461
17444
  */
17462
- function processEventData(type, eventData, thoughtSpotHost, containerEl) {
17445
+ function processEventData(type, e, thoughtSpotHost, containerEl) {
17463
17446
  switch (type) {
17464
17447
  case EmbedEvent.CustomAction:
17465
- return processCustomAction(eventData, thoughtSpotHost);
17448
+ return processCustomAction(e, thoughtSpotHost);
17466
17449
  case EmbedEvent.AuthInit:
17467
- return processAuthInit(eventData);
17450
+ return processAuthInit(e);
17468
17451
  case EmbedEvent.NoCookieAccess:
17469
- return processNoCookieAccess(eventData, containerEl);
17452
+ return processNoCookieAccess(e, containerEl);
17470
17453
  case EmbedEvent.AuthFailure:
17471
- return processAuthFailure(eventData, containerEl);
17454
+ return processAuthFailure(e, containerEl);
17472
17455
  case EmbedEvent.AuthLogout:
17473
- return processAuthLogout(eventData, containerEl);
17456
+ return processAuthLogout(e, containerEl);
17474
17457
  case EmbedEvent.ExitPresentMode:
17475
17458
  return processExitPresentMode();
17476
17459
  case EmbedEvent.CLEAR_INFO_CACHE:
17477
17460
  return processClearInfoCache();
17478
17461
  }
17479
- return eventData;
17462
+ return e;
17480
17463
  }
17481
17464
 
17482
- var name="@thoughtspot/visual-embed-sdk";var version$1="1.42.1-alpha.7";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p tsconfig.build.json --incremental false; tsc -p tsconfig.build.json --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle-generator --config ./dts-config/dts-bundle-file.config.js","bundle-dts":"dts-bundle-generator --config ./dts-config/dts-bundle.config.js","bundle-dts-react":"dts-bundle-generator --config ./dts-config/dts-bundle-react.config.js","bundle-dts-react-full":"dts-bundle-generator --config ./dts-config/dts-bundle-react-full.config.js",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.build.json --theme typedoc-theme --json static/typedoc/typedoc.json --disableOutputCheck","test-sdk":"NODE_OPTIONS=--max_old_space_size=8192 jest -c jest.config.sdk.js --runInBand --no-cache",test:"npm run test-sdk",posttest:"cat ./coverage/sdk/lcov.info | npx coveralls-next","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest",dev:"vite -c vite.local.config.ts"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={classnames:"^2.3.1",eventemitter3:"^4.0.7",lodash:"^4.17.21","mixpanel-browser":"2.47.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1",yaml:"^2.5.1"};var devDependencies={"@mdx-js/mdx":"^1.6.22","@mdx-js/react":"^1.6.22","@react-icons/all-files":"^4.1.0","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^5.0.2","@size-limit/preset-big-lib":"^11.2.0","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^22.2.3","@types/lodash":"^4.17.0","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^8.28.0","@typescript-eslint/parser":"^8.28.0",ajv:"^8.17.1",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1","coveralls-next":"^5.0.0",crypto:"^1.0.1","current-git-branch":"^1.1.0","dts-bundle-generator":"^9.5.1",eslint:"^9.23.0","eslint-config-airbnb-base":"^15.0.0","eslint-config-prettier":"^10.1.1","eslint-import-resolver-typescript":"^4.2.5","eslint-plugin-comment-length":"2.2.1","eslint-plugin-import":"^2.31.0","eslint-plugin-jsdoc":"^50.6.9","eslint-plugin-prettier":"^5.2.5","eslint-plugin-react":"^7.37.5","eslint-plugin-react-hooks":"^5.2.0","fs-extra":"^10.0.0","gh-pages":"6.3.0",globals:"^16.0.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^2.0.0",jest:"^26.6.3","jest-fetch-mock":"^3.0.3",jsdom:"^17.0.0",prettier:"2.1.2",react:"^16.14.0","react-dom":"^16.14.0","react-resizable":"^1.11.0","react-resize-detector":"^6.6.0","react-test-renderer":"^17.0.2","react-use-flexsearch":"^0.1.1",rollup:"4.24.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^26.5.5","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","typescript-eslint":"^8.29.1","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^6.3.5"};var author="ThoughtSpot";var email="support@thoughtspot.com";var license="ThoughtSpot Development Tools End User License Agreement";var directories={lib:"lib"};var repository={type:"git",url:"git+https://github.com/thoughtspot/visual-embed-sdk.git"};var publishConfig={registry:"https://registry.npmjs.org"};var keywords=["thoughtspot","everywhere","embedded","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version$1,description:description,module:module,main:main,types:types,files:files,exports:exports,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.es.js",limit:"32 kB"}],scripts:scripts,peerDependencies:peerDependencies,dependencies:dependencies,devDependencies:devDependencies,author:author,email:email,license:license,directories:directories,repository:repository,publishConfig:publishConfig,keywords:keywords,bugs:bugs,homepage:homepage,globals:globals};
17465
+ var name="@thoughtspot/visual-embed-sdk";var version$1="1.42.3";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p tsconfig.build.json --incremental false; tsc -p tsconfig.build.json --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle-generator --config ./dts-config/dts-bundle-file.config.js","bundle-dts":"dts-bundle-generator --config ./dts-config/dts-bundle.config.js","bundle-dts-react":"dts-bundle-generator --config ./dts-config/dts-bundle-react.config.js","bundle-dts-react-full":"dts-bundle-generator --config ./dts-config/dts-bundle-react-full.config.js",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.build.json --theme typedoc-theme --json static/typedoc/typedoc.json --disableOutputCheck","test-sdk":"jest -c jest.config.sdk.js --runInBand",test:"npm run test-sdk",posttest:"cat ./coverage/sdk/lcov.info | npx coveralls-next","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest",dev:"vite -c vite.local.config.ts"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={classnames:"^2.3.1",eventemitter3:"^4.0.7",lodash:"^4.17.21","mixpanel-browser":"2.47.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1",yaml:"^2.5.1"};var devDependencies={"@mdx-js/mdx":"^1.6.22","@mdx-js/react":"^1.6.22","@react-icons/all-files":"^4.1.0","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^5.0.2","@size-limit/preset-big-lib":"^11.2.0","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^22.2.3","@types/lodash":"^4.17.0","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^8.28.0","@typescript-eslint/parser":"^8.28.0",ajv:"^8.17.1",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1","coveralls-next":"^5.0.0",crypto:"^1.0.1","current-git-branch":"^1.1.0","dts-bundle-generator":"^9.5.1",eslint:"^9.23.0","eslint-config-airbnb-base":"^15.0.0","eslint-config-prettier":"^10.1.1","eslint-import-resolver-typescript":"^4.2.5","eslint-plugin-comment-length":"2.2.1","eslint-plugin-import":"^2.31.0","eslint-plugin-jsdoc":"^50.6.9","eslint-plugin-prettier":"^5.2.5","eslint-plugin-react":"^7.37.5","eslint-plugin-react-hooks":"^5.2.0","fs-extra":"^10.0.0","gh-pages":"6.3.0",globals:"^16.0.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^2.0.0",jest:"^26.6.3","jest-fetch-mock":"^3.0.3",jsdom:"^17.0.0",prettier:"2.1.2",react:"^16.14.0","react-dom":"^16.14.0","react-resizable":"^1.11.0","react-resize-detector":"^6.6.0","react-test-renderer":"^17.0.2","react-use-flexsearch":"^0.1.1",rollup:"4.24.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^26.5.5","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","typescript-eslint":"^8.29.1","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^6.3.5"};var author="ThoughtSpot";var email="support@thoughtspot.com";var license="ThoughtSpot Development Tools End User License Agreement";var directories={lib:"lib"};var repository={type:"git",url:"git+https://github.com/thoughtspot/visual-embed-sdk.git"};var publishConfig={registry:"https://registry.npmjs.org"};var keywords=["thoughtspot","everywhere","embedded","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version$1,description:description,module:module,main:main,types:types,files:files,exports:exports,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.es.js",limit:"32 kB"}],scripts:scripts,peerDependencies:peerDependencies,dependencies:dependencies,devDependencies:devDependencies,author:author,email:email,license:license,directories:directories,repository:repository,publishConfig:publishConfig,keywords:keywords,bugs:bugs,homepage:homepage,globals:globals};
17483
17466
 
17484
17467
  /**
17485
17468
  * Reloads the ThoughtSpot iframe.
@@ -17551,6 +17534,16 @@ function processTrigger(iFrame, messageType, thoughtSpotHost, data) {
17551
17534
  });
17552
17535
  }
17553
17536
 
17537
+ var UIPassthroughEvent;
17538
+ (function (UIPassthroughEvent) {
17539
+ UIPassthroughEvent["PinAnswerToLiveboard"] = "addVizToPinboard";
17540
+ UIPassthroughEvent["SaveAnswer"] = "saveAnswer";
17541
+ UIPassthroughEvent["GetDiscoverabilityStatus"] = "getDiscoverabilityStatus";
17542
+ UIPassthroughEvent["GetAvailableUIPassthroughs"] = "getAvailableUiPassthroughs";
17543
+ UIPassthroughEvent["GetAnswerConfig"] = "getAnswerPageConfig";
17544
+ UIPassthroughEvent["GetLiveboardConfig"] = "getPinboardPageConfig";
17545
+ })(UIPassthroughEvent || (UIPassthroughEvent = {}));
17546
+
17554
17547
  class HostEventClient {
17555
17548
  constructor(iFrame) {
17556
17549
  this.iFrame = iFrame;
@@ -17642,111 +17635,6 @@ class HostEventClient {
17642
17635
  }
17643
17636
  }
17644
17637
 
17645
- const defaultUrls = {
17646
- [InterceptedApiType.METADATA]: [
17647
- '/prism/?op=CreateAnswerSession',
17648
- '/prism/?op=GetV2SourceDetail',
17649
- ],
17650
- [InterceptedApiType.ANSWER_DATA]: [
17651
- '/prism/?op=GetChartWithData',
17652
- '/prism/?op=GetTableWithHeadlineData',
17653
- ],
17654
- [InterceptedApiType.LIVEBOARD_DATA]: [
17655
- '/prism/?op=LoadContextBook'
17656
- ],
17657
- };
17658
- const formatInterceptUrl = (url) => {
17659
- const host = getThoughtSpotHost(getEmbedConfig());
17660
- if (url.startsWith('/'))
17661
- return `${host}${url}`;
17662
- return url;
17663
- };
17664
- const processInterceptUrls = (interceptUrls) => {
17665
- let processedUrls = [...interceptUrls];
17666
- Object.entries(defaultUrls).forEach(([apiType, apiTypeUrls]) => {
17667
- if (!processedUrls.includes(apiType))
17668
- return;
17669
- processedUrls = processedUrls.filter(url => url !== apiType);
17670
- processedUrls = [...processedUrls, ...apiTypeUrls];
17671
- });
17672
- return processedUrls.map(url => formatInterceptUrl(url));
17673
- };
17674
- const getInterceptInitData = (embedConfig, viewConfig) => {
17675
- const enableApiIntercept = (embedConfig.enableApiIntercept || viewConfig.enableApiIntercept) && (viewConfig.enableApiIntercept !== false);
17676
- if (!enableApiIntercept)
17677
- return {
17678
- enableApiIntercept: false,
17679
- };
17680
- const combinedUrls = [...(embedConfig.interceptUrls || []), ...(viewConfig.interceptUrls || [])];
17681
- if (viewConfig.isOnBeforeGetVizDataInterceptEnabled) {
17682
- combinedUrls.push(InterceptedApiType.ANSWER_DATA);
17683
- }
17684
- const shouldInterceptAll = combinedUrls.includes(InterceptedApiType.ALL);
17685
- const interceptUrls = shouldInterceptAll ? [InterceptedApiType.ALL] : processInterceptUrls(combinedUrls);
17686
- const interceptTimeout = embedConfig.interceptTimeout || viewConfig.interceptTimeout;
17687
- return {
17688
- interceptUrls,
17689
- interceptTimeout,
17690
- enableApiIntercept,
17691
- };
17692
- };
17693
- /**
17694
- *
17695
- * @param fetchInit
17696
- */
17697
- const parseInterceptData = (eventDataString) => {
17698
- try {
17699
- const { input, init } = JSON.parse(eventDataString);
17700
- init.body = JSON.parse(init.body);
17701
- const parsedInit = { input, init };
17702
- return [parsedInit, null];
17703
- }
17704
- catch (error) {
17705
- return [null, error];
17706
- }
17707
- };
17708
- const handleInterceptEvent = async (params) => {
17709
- var _a, _b, _c, _d, _e;
17710
- const { eventData, executeEvent, viewConfig, getUnsavedAnswerTml } = params;
17711
- const [interceptData, bodyParseError] = parseInterceptData(eventData.data);
17712
- if (bodyParseError) {
17713
- executeEvent(EmbedEvent.Error, {
17714
- error: 'Error parsing api intercept body',
17715
- });
17716
- logger$3.error('Error parsing request body', bodyParseError);
17717
- return;
17718
- }
17719
- const { input: requestUrl, init } = interceptData;
17720
- const sessionId = (_c = (_b = (_a = init === null || init === void 0 ? void 0 : init.body) === null || _a === void 0 ? void 0 : _a.variables) === null || _b === void 0 ? void 0 : _b.session) === null || _c === void 0 ? void 0 : _c.sessionId;
17721
- const vizId = (_e = (_d = init === null || init === void 0 ? void 0 : init.body) === null || _d === void 0 ? void 0 : _d.variables) === null || _e === void 0 ? void 0 : _e.contextBookId;
17722
- if (defaultUrls.ANSWER_DATA.includes(requestUrl) && viewConfig.isOnBeforeGetVizDataInterceptEnabled) {
17723
- const answerTml = await getUnsavedAnswerTml({ sessionId, vizId });
17724
- executeEvent(EmbedEvent.OnBeforeGetVizDataIntercept, { data: { data: answerTml } });
17725
- }
17726
- executeEvent(EmbedEvent.ApiIntercept, interceptData);
17727
- };
17728
- const processLegacyInterceptResponse = (payload) => {
17729
- var _a, _b, _c, _d, _e, _f, _g;
17730
- const errorText = ((_a = payload === null || payload === void 0 ? void 0 : payload.data) === null || _a === void 0 ? void 0 : _a.errorText) || ((_c = (_b = payload === null || payload === void 0 ? void 0 : payload.data) === null || _b === void 0 ? void 0 : _b.error) === null || _c === void 0 ? void 0 : _c.errorText);
17731
- const errorDescription = ((_d = payload === null || payload === void 0 ? void 0 : payload.data) === null || _d === void 0 ? void 0 : _d.errorDescription) || ((_f = (_e = payload === null || payload === void 0 ? void 0 : payload.data) === null || _e === void 0 ? void 0 : _e.error) === null || _f === void 0 ? void 0 : _f.errorDescription);
17732
- const payloadToSend = {
17733
- execute: (_g = payload === null || payload === void 0 ? void 0 : payload.data) === null || _g === void 0 ? void 0 : _g.execute,
17734
- response: {
17735
- body: {
17736
- errors: [
17737
- {
17738
- title: errorText,
17739
- description: errorDescription,
17740
- isUserError: true,
17741
- },
17742
- ],
17743
- data: {},
17744
- },
17745
- },
17746
- };
17747
- return { data: payloadToSend };
17748
- };
17749
-
17750
17638
  /**
17751
17639
  * Copyright (c) 2022
17752
17640
  *
@@ -17800,27 +17688,6 @@ class TsEmbed {
17800
17688
  */
17801
17689
  this.fullscreenChangeHandler = null;
17802
17690
  this.subscribedListeners = {};
17803
- this.messageEventListener = async (event) => {
17804
- const eventType = this.getEventType(event);
17805
- const eventPort = this.getEventPort(event);
17806
- const eventData = this.formatEventData(event, eventType);
17807
- if (event.source === this.iFrame.contentWindow) {
17808
- const processedEventData = await processEventData(eventType, eventData, this.thoughtSpotHost, this.isPreRendered ? this.preRenderWrapper : this.el);
17809
- const executeEvent = (_eventType, data) => {
17810
- this.executeCallbacks(_eventType, data, eventPort);
17811
- };
17812
- if (eventType === EmbedEvent.ApiIntercept && this.viewConfig.enableApiIntercept) {
17813
- const getUnsavedAnswerTml = async (props) => {
17814
- var _a;
17815
- const response = await this.triggerUIPassThrough(UIPassthroughEvent.GetUnsavedAnswerTML, props);
17816
- return (_a = response[0]) === null || _a === void 0 ? void 0 : _a.value;
17817
- };
17818
- handleInterceptEvent({ eventData: processedEventData, executeEvent, embedConfig: this.embedConfig, viewConfig: this.viewConfig, getUnsavedAnswerTml });
17819
- return;
17820
- }
17821
- this.executeCallbacks(eventType, processedEventData, eventPort);
17822
- }
17823
- };
17824
17691
  /**
17825
17692
  * Send Custom style as part of payload of APP_INIT
17826
17693
  * @param _
@@ -17905,18 +17772,6 @@ class TsEmbed {
17905
17772
  this.on(EmbedEvent.AuthInit, authInitHandler, { start: false }, true);
17906
17773
  };
17907
17774
  this.showPreRenderByDefault = false;
17908
- this.createEmbedEventResponder = (eventPort, eventType) => {
17909
- const { enableApiIntercept } = getInterceptInitData(this.embedConfig, this.viewConfig);
17910
- if (eventType === EmbedEvent.OnBeforeGetVizDataIntercept && enableApiIntercept) {
17911
- return (payload) => {
17912
- const payloadToSend = processLegacyInterceptResponse(payload);
17913
- this.triggerEventOnPort(eventPort, payloadToSend);
17914
- };
17915
- }
17916
- return (payload) => {
17917
- this.triggerEventOnPort(eventPort, payload);
17918
- };
17919
- };
17920
17775
  /**
17921
17776
  * @hidden
17922
17777
  * Internal state to track if the embed container is loaded.
@@ -18102,8 +17957,16 @@ class TsEmbed {
18102
17957
  */
18103
17958
  subscribeToMessageEvents() {
18104
17959
  this.unsubscribeToMessageEvents();
18105
- window.addEventListener('message', this.messageEventListener);
18106
- this.subscribedListeners.message = this.messageEventListener;
17960
+ const messageEventListener = (event) => {
17961
+ const eventType = this.getEventType(event);
17962
+ const eventPort = this.getEventPort(event);
17963
+ const eventData = this.formatEventData(event, eventType);
17964
+ if (event.source === this.iFrame.contentWindow) {
17965
+ this.executeCallbacks(eventType, processEventData(eventType, eventData, this.thoughtSpotHost, this.isPreRendered ? this.preRenderWrapper : this.el), eventPort);
17966
+ }
17967
+ };
17968
+ window.addEventListener('message', messageEventListener);
17969
+ this.subscribedListeners.message = messageEventListener;
18107
17970
  }
18108
17971
  /**
18109
17972
  * Adds event listeners for both network and message events.
@@ -18164,7 +18027,7 @@ class TsEmbed {
18164
18027
  message: customActionsResult.errors,
18165
18028
  });
18166
18029
  }
18167
- const baseInitData = {
18030
+ return {
18168
18031
  customisations: getCustomisations(this.embedConfig, this.viewConfig),
18169
18032
  authToken,
18170
18033
  runtimeFilterParams: this.viewConfig.excludeRuntimeFiltersfromURL
@@ -18182,9 +18045,7 @@ class TsEmbed {
18182
18045
  customVariablesForThirdPartyTools: this.embedConfig.customVariablesForThirdPartyTools || {},
18183
18046
  hiddenListColumns: this.viewConfig.hiddenListColumns || [],
18184
18047
  customActions: customActionsResult.actions,
18185
- ...getInterceptInitData(this.embedConfig, this.viewConfig),
18186
18048
  };
18187
- return baseInitData;
18188
18049
  }
18189
18050
  async getAppInitData() {
18190
18051
  return this.getDefaultAppInitData();
@@ -18613,8 +18474,9 @@ class TsEmbed {
18613
18474
  // When start status is false it trigger only end releated
18614
18475
  // payload
18615
18476
  || (!callbackObj.options.start && dataStatus === embedEventStatus.END)) {
18616
- const responder = this.createEmbedEventResponder(eventPort, eventType);
18617
- callbackObj.callback(data, responder);
18477
+ callbackObj.callback(data, (payload) => {
18478
+ this.triggerEventOnPort(eventPort, payload);
18479
+ });
18618
18480
  }
18619
18481
  });
18620
18482
  }
@@ -18887,11 +18749,26 @@ class TsEmbed {
18887
18749
  * @version SDK: 1.19.1 | ThoughtSpot: *
18888
18750
  */
18889
18751
  destroy() {
18890
- var _a;
18752
+ var _a, _b;
18891
18753
  try {
18892
18754
  this.removeFullscreenChangeHandler();
18893
- (_a = this.insertedDomEl) === null || _a === void 0 ? void 0 : _a.parentNode.removeChild(this.insertedDomEl);
18894
18755
  this.unsubscribeToEvents();
18756
+ if (!getEmbedConfig().waitForCleanupOnDestroy) {
18757
+ this.trigger(HostEvent.DestroyEmbed);
18758
+ (_b = (_a = this.insertedDomEl) === null || _a === void 0 ? void 0 : _a.parentNode) === null || _b === void 0 ? void 0 : _b.removeChild(this.insertedDomEl);
18759
+ }
18760
+ else {
18761
+ const cleanupTimeout = getEmbedConfig().cleanupTimeout;
18762
+ Promise.race([
18763
+ this.trigger(HostEvent.DestroyEmbed),
18764
+ new Promise((resolve) => setTimeout(resolve, cleanupTimeout)),
18765
+ ]).then(() => {
18766
+ var _a, _b;
18767
+ (_b = (_a = this.insertedDomEl) === null || _a === void 0 ? void 0 : _a.parentNode) === null || _b === void 0 ? void 0 : _b.removeChild(this.insertedDomEl);
18768
+ }).catch((e) => {
18769
+ logger$3.log('Error destroying TS Embed', e);
18770
+ });
18771
+ }
18895
18772
  }
18896
18773
  catch (e) {
18897
18774
  logger$3.log('Error destroying TS Embed', e);
@@ -19398,8 +19275,7 @@ let SearchEmbed$1 = class SearchEmbed extends TsEmbed {
19398
19275
  if (hideSearchBar) {
19399
19276
  queryParams[Param.HideSearchBar] = true;
19400
19277
  }
19401
- const { enableApiIntercept } = getInterceptInitData(this.embedConfig, this.viewConfig);
19402
- if (isOnBeforeGetVizDataInterceptEnabled && !enableApiIntercept) {
19278
+ if (isOnBeforeGetVizDataInterceptEnabled) {
19403
19279
  queryParams[Param.IsOnBeforeGetVizDataInterceptEnabled] = isOnBeforeGetVizDataInterceptEnabled;
19404
19280
  }
19405
19281
  if (!focusSearchBarOnRender) {
@@ -19660,7 +19536,7 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
19660
19536
  * embedded Liveboard or visualization.
19661
19537
  */
19662
19538
  getEmbedParams() {
19663
- const { tag, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideHamburger, hideObjectSearch, hideNotification, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 = true, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, hideHomepageLeftNav = false, modularHomeExperience = false, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, enable2ColumnLayout, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false, dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, discoveryExperience, coverAndFilterOptionInPDF = false, liveboardXLSXCSVDownload = false, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, isLinkParametersEnabled, } = this.viewConfig;
19539
+ const { tag, hideTagFilterChips, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideHamburger, hideObjectSearch, hideNotification, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 = true, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, hideHomepageLeftNav = false, modularHomeExperience = false, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, enable2ColumnLayout, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false, dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, isEnhancedFilterInteractivityEnabled = false, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, discoveryExperience, coverAndFilterOptionInPDF = false, liveboardXLSXCSVDownload = false, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, isCentralizedLiveboardFilterUXEnabled = false, isLinkParametersEnabled, } = this.viewConfig;
19664
19540
  let params = {};
19665
19541
  params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
19666
19542
  params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
@@ -19672,6 +19548,7 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
19672
19548
  params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
19673
19549
  params[Param.IsFullAppEmbed] = true;
19674
19550
  params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
19551
+ params[Param.IsEnhancedFilterInteractivityEnabled] = isEnhancedFilterInteractivityEnabled;
19675
19552
  params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;
19676
19553
  params[Param.ShowLiveboardReverifyBanner] = showLiveboardReverifyBanner;
19677
19554
  params[Param.HideIrrelevantFiltersInTab] = hideIrrelevantChipsInLiveboardTabs;
@@ -19713,8 +19590,7 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
19713
19590
  if (enableAskSage) {
19714
19591
  params[Param.enableAskSage] = enableAskSage;
19715
19592
  }
19716
- const { enableApiIntercept } = getInterceptInitData(this.embedConfig, this.viewConfig);
19717
- if (isOnBeforeGetVizDataInterceptEnabled && !enableApiIntercept) {
19593
+ if (isOnBeforeGetVizDataInterceptEnabled) {
19718
19594
  params[Param.IsOnBeforeGetVizDataInterceptEnabled] = isOnBeforeGetVizDataInterceptEnabled;
19719
19595
  }
19720
19596
  if (homePageSearchBarMode) {
@@ -19729,9 +19605,15 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
19729
19605
  if (isPNGInScheduledEmailsEnabled !== undefined) {
19730
19606
  params[Param.isPNGInScheduledEmailsEnabled] = isPNGInScheduledEmailsEnabled;
19731
19607
  }
19608
+ if (hideTagFilterChips !== undefined) {
19609
+ params[Param.HideTagFilterChips] = hideTagFilterChips;
19610
+ }
19732
19611
  if (isLinkParametersEnabled !== undefined) {
19733
19612
  params[Param.isLinkParametersEnabled] = isLinkParametersEnabled;
19734
19613
  }
19614
+ if (isCentralizedLiveboardFilterUXEnabled != undefined) {
19615
+ params[Param.isCentralizedLiveboardFilterUXEnabled] = isCentralizedLiveboardFilterUXEnabled;
19616
+ }
19735
19617
  params[Param.DataPanelV2Enabled] = dataPanelV2;
19736
19618
  params[Param.HideHomepageLeftNav] = hideHomepageLeftNav;
19737
19619
  params[Param.ModularHomeExperienceEnabled] = modularHomeExperience;
@@ -20086,7 +19968,7 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
20086
19968
  getEmbedParamsObject() {
20087
19969
  let params = {};
20088
19970
  params = this.getBaseQueryParams(params);
20089
- const { enableVizTransformations, fullHeight, defaultHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, enableAskSage, enable2ColumnLayout, dataPanelV2 = true, enableCustomColumnGroups = false, oAuthPollingInterval, isForceRedirect, dataSourceId, coverAndFilterOptionInPDF = false, liveboardXLSXCSVDownload = false, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, showSpotterLimitations, isLinkParametersEnabled, } = this.viewConfig;
19971
+ const { enableVizTransformations, fullHeight, defaultHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, isEnhancedFilterInteractivityEnabled = false, enableAskSage, enable2ColumnLayout, dataPanelV2 = true, enableCustomColumnGroups = false, oAuthPollingInterval, isForceRedirect, dataSourceId, coverAndFilterOptionInPDF = false, liveboardXLSXCSVDownload = false, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, showSpotterLimitations, isCentralizedLiveboardFilterUXEnabled = false, isLinkParametersEnabled, } = this.viewConfig;
20090
19972
  const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
20091
19973
  || this.viewConfig.preventPinboardFilterRemoval;
20092
19974
  if (fullHeight === true) {
@@ -20154,11 +20036,15 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
20154
20036
  if (isLinkParametersEnabled !== undefined) {
20155
20037
  params[Param.isLinkParametersEnabled] = isLinkParametersEnabled;
20156
20038
  }
20039
+ if (isCentralizedLiveboardFilterUXEnabled !== undefined) {
20040
+ params[Param.isCentralizedLiveboardFilterUXEnabled] = isCentralizedLiveboardFilterUXEnabled;
20041
+ }
20157
20042
  params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
20158
20043
  params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
20159
20044
  params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;
20160
20045
  params[Param.ShowLiveboardReverifyBanner] = showLiveboardReverifyBanner;
20161
20046
  params[Param.HideIrrelevantFiltersInTab] = hideIrrelevantChipsInLiveboardTabs;
20047
+ params[Param.IsEnhancedFilterInteractivityEnabled] = isEnhancedFilterInteractivityEnabled;
20162
20048
  params[Param.DataPanelV2Enabled] = dataPanelV2;
20163
20049
  params[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
20164
20050
  params[Param.CoverAndFilterOptionInPDF] = coverAndFilterOptionInPDF;
@@ -20889,7 +20775,7 @@ let SpotterEmbed$1 = class SpotterEmbed extends TsEmbed {
20889
20775
  this.viewConfig = viewConfig;
20890
20776
  }
20891
20777
  getEmbedParamsObject() {
20892
- const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, } = this.viewConfig;
20778
+ const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, enablePastConversationsSidebar, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, } = this.viewConfig;
20893
20779
  if (!worksheetId) {
20894
20780
  this.handleError(ERROR_MESSAGE.SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND);
20895
20781
  }
@@ -20913,9 +20799,12 @@ let SpotterEmbed$1 = class SpotterEmbed extends TsEmbed {
20913
20799
  return queryParams;
20914
20800
  }
20915
20801
  getIframeSrc() {
20916
- const { worksheetId, searchOptions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, } = this.viewConfig;
20802
+ const { worksheetId, searchOptions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, enablePastConversationsSidebar } = this.viewConfig;
20917
20803
  const path = 'insights/conv-assist';
20918
20804
  const queryParams = this.getEmbedParamsObject();
20805
+ if (!isUndefined_1(enablePastConversationsSidebar)) {
20806
+ queryParams[Param.EnablePastConversationsSidebar] = !!enablePastConversationsSidebar;
20807
+ }
20919
20808
  let query = '';
20920
20809
  const queryParamsString = getQueryParamString(queryParams, true);
20921
20810
  if (queryParamsString) {
@@ -21017,6 +20906,7 @@ isPreRenderedComponent = false) => React__default.forwardRef((props, forwardedRe
21017
20906
  });
21018
20907
  handleRendering(tsEmbed);
21019
20908
  if (forwardedRef) {
20909
+ // eslint-disable-next-line no-param-reassign
21020
20910
  forwardedRef.current = tsEmbed;
21021
20911
  }
21022
20912
  return () => {
@@ -21237,7 +21127,7 @@ const ConversationMessage = componentFactory(ConversationMessage$1);
21237
21127
  */
21238
21128
  const SpotterMessage = React__default.forwardRef((props, ref) => {
21239
21129
  const { message, query: _, ...otherProps } = props;
21240
- return React__default.createElement(ConversationMessage, { ref: ref, ...message, ...otherProps });
21130
+ return (React__default.createElement(ConversationMessage, { ref: ref, ...message, ...otherProps }));
21241
21131
  });
21242
21132
  /**
21243
21133
  * React component for PreRendered Conversation embed.