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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (221) 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/bodyless-conversation.d.ts +1 -1
  11. package/cjs/src/embed/conversation.d.ts +16 -0
  12. package/cjs/src/embed/conversation.d.ts.map +1 -1
  13. package/cjs/src/embed/conversation.js +5 -2
  14. package/cjs/src/embed/conversation.js.map +1 -1
  15. package/cjs/src/embed/conversation.spec.js +25 -1
  16. package/cjs/src/embed/conversation.spec.js.map +1 -1
  17. package/cjs/src/embed/hostEventClient/contracts.d.ts +1 -11
  18. package/cjs/src/embed/hostEventClient/contracts.d.ts.map +1 -1
  19. package/cjs/src/embed/hostEventClient/contracts.js +0 -1
  20. package/cjs/src/embed/hostEventClient/contracts.js.map +1 -1
  21. package/cjs/src/embed/liveboard.d.ts.map +1 -1
  22. package/cjs/src/embed/liveboard.js +5 -1
  23. package/cjs/src/embed/liveboard.js.map +1 -1
  24. package/cjs/src/embed/liveboard.spec.js +46 -0
  25. package/cjs/src/embed/liveboard.spec.js.map +1 -1
  26. package/cjs/src/embed/sage.d.ts +4 -4
  27. package/cjs/src/embed/search.d.ts.map +1 -1
  28. package/cjs/src/embed/search.js +1 -3
  29. package/cjs/src/embed/search.js.map +1 -1
  30. package/cjs/src/embed/ts-embed.d.ts +0 -2
  31. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  32. package/cjs/src/embed/ts-embed.js +14 -42
  33. package/cjs/src/embed/ts-embed.js.map +1 -1
  34. package/cjs/src/embed/ts-embed.spec.js +0 -2
  35. package/cjs/src/embed/ts-embed.spec.js.map +1 -1
  36. package/cjs/src/errors.js +1 -1
  37. package/cjs/src/errors.js.map +1 -1
  38. package/cjs/src/index.d.ts +3 -3
  39. package/cjs/src/index.d.ts.map +1 -1
  40. package/cjs/src/index.js +1 -2
  41. package/cjs/src/index.js.map +1 -1
  42. package/cjs/src/react/all-types-export.d.ts +1 -2
  43. package/cjs/src/react/all-types-export.d.ts.map +1 -1
  44. package/cjs/src/react/all-types-export.js +5 -3
  45. package/cjs/src/react/all-types-export.js.map +1 -1
  46. package/cjs/src/react/all-types-export.spec.js +0 -8
  47. package/cjs/src/react/all-types-export.spec.js.map +1 -1
  48. package/cjs/src/react/index.d.ts +1 -2
  49. package/cjs/src/react/index.d.ts.map +1 -1
  50. package/cjs/src/react/index.js +2 -1
  51. package/cjs/src/react/index.js.map +1 -1
  52. package/cjs/src/react/util.d.ts +1 -0
  53. package/cjs/src/react/util.d.ts.map +1 -1
  54. package/cjs/src/types.d.ts +58 -93
  55. package/cjs/src/types.d.ts.map +1 -1
  56. package/cjs/src/types.js +21 -46
  57. package/cjs/src/types.js.map +1 -1
  58. package/cjs/src/utils/custom-actions.d.ts.map +1 -1
  59. package/cjs/src/utils/custom-actions.js +9 -0
  60. package/cjs/src/utils/custom-actions.js.map +1 -1
  61. package/cjs/src/utils/custom-actions.spec.js +20 -0
  62. package/cjs/src/utils/custom-actions.spec.js.map +1 -1
  63. package/cjs/src/utils/processData.d.ts +1 -1
  64. package/cjs/src/utils/processData.d.ts.map +1 -1
  65. package/cjs/src/utils/processData.js +8 -8
  66. package/cjs/src/utils/processData.js.map +1 -1
  67. package/cjs/src/utils/processData.spec.js.map +1 -1
  68. package/dist/{index-DvNA626T.js → index-CjbriUI0.js} +1 -1
  69. package/dist/src/css-variables.d.ts +0 -48
  70. package/dist/src/css-variables.d.ts.map +1 -1
  71. package/dist/src/embed/app.d.ts +20 -0
  72. package/dist/src/embed/app.d.ts.map +1 -1
  73. package/dist/src/embed/bodyless-conversation.d.ts +1 -1
  74. package/dist/src/embed/conversation.d.ts +16 -0
  75. package/dist/src/embed/conversation.d.ts.map +1 -1
  76. package/dist/src/embed/hostEventClient/contracts.d.ts +1 -11
  77. package/dist/src/embed/hostEventClient/contracts.d.ts.map +1 -1
  78. package/dist/src/embed/liveboard.d.ts.map +1 -1
  79. package/dist/src/embed/sage.d.ts +4 -4
  80. package/dist/src/embed/search.d.ts.map +1 -1
  81. package/dist/src/embed/ts-embed.d.ts +0 -2
  82. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  83. package/dist/src/index.d.ts +3 -3
  84. package/dist/src/index.d.ts.map +1 -1
  85. package/dist/src/react/all-types-export.d.ts +1 -2
  86. package/dist/src/react/all-types-export.d.ts.map +1 -1
  87. package/dist/src/react/index.d.ts +1 -2
  88. package/dist/src/react/index.d.ts.map +1 -1
  89. package/dist/src/react/util.d.ts +1 -0
  90. package/dist/src/react/util.d.ts.map +1 -1
  91. package/dist/src/types.d.ts +58 -93
  92. package/dist/src/types.d.ts.map +1 -1
  93. package/dist/src/utils/custom-actions.d.ts.map +1 -1
  94. package/dist/src/utils/processData.d.ts +1 -1
  95. package/dist/src/utils/processData.d.ts.map +1 -1
  96. package/dist/tsembed-react.es.js +86 -222
  97. package/dist/tsembed-react.js +230 -442
  98. package/dist/tsembed.es.js +85 -222
  99. package/dist/tsembed.js +228 -441
  100. package/dist/visual-embed-sdk-react-full.d.ts +104 -160
  101. package/dist/visual-embed-sdk-react.d.ts +95 -155
  102. package/dist/visual-embed-sdk.d.ts +95 -158
  103. package/lib/package.json +4 -3
  104. package/lib/src/css-variables.d.ts +0 -48
  105. package/lib/src/css-variables.d.ts.map +1 -1
  106. package/lib/src/embed/app.d.ts +20 -0
  107. package/lib/src/embed/app.d.ts.map +1 -1
  108. package/lib/src/embed/app.js +9 -4
  109. package/lib/src/embed/app.js.map +1 -1
  110. package/lib/src/embed/app.spec.js +62 -0
  111. package/lib/src/embed/app.spec.js.map +1 -1
  112. package/lib/src/embed/bodyless-conversation.d.ts +1 -1
  113. package/lib/src/embed/conversation.d.ts +16 -0
  114. package/lib/src/embed/conversation.d.ts.map +1 -1
  115. package/lib/src/embed/conversation.js +5 -2
  116. package/lib/src/embed/conversation.js.map +1 -1
  117. package/lib/src/embed/conversation.spec.js +25 -1
  118. package/lib/src/embed/conversation.spec.js.map +1 -1
  119. package/lib/src/embed/hostEventClient/contracts.d.ts +1 -11
  120. package/lib/src/embed/hostEventClient/contracts.d.ts.map +1 -1
  121. package/lib/src/embed/hostEventClient/contracts.js +0 -1
  122. package/lib/src/embed/hostEventClient/contracts.js.map +1 -1
  123. package/lib/src/embed/liveboard.d.ts.map +1 -1
  124. package/lib/src/embed/liveboard.js +5 -1
  125. package/lib/src/embed/liveboard.js.map +1 -1
  126. package/lib/src/embed/liveboard.spec.js +47 -1
  127. package/lib/src/embed/liveboard.spec.js.map +1 -1
  128. package/lib/src/embed/sage.d.ts +4 -4
  129. package/lib/src/embed/search.d.ts.map +1 -1
  130. package/lib/src/embed/search.js +1 -3
  131. package/lib/src/embed/search.js.map +1 -1
  132. package/lib/src/embed/ts-embed.d.ts +0 -2
  133. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  134. package/lib/src/embed/ts-embed.js +14 -42
  135. package/lib/src/embed/ts-embed.js.map +1 -1
  136. package/lib/src/embed/ts-embed.spec.js +0 -2
  137. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  138. package/lib/src/errors.js +1 -1
  139. package/lib/src/errors.js.map +1 -1
  140. package/lib/src/index.d.ts +3 -3
  141. package/lib/src/index.d.ts.map +1 -1
  142. package/lib/src/index.js +2 -2
  143. package/lib/src/index.js.map +1 -1
  144. package/lib/src/react/all-types-export.d.ts +1 -2
  145. package/lib/src/react/all-types-export.d.ts.map +1 -1
  146. package/lib/src/react/all-types-export.js +2 -2
  147. package/lib/src/react/all-types-export.js.map +1 -1
  148. package/lib/src/react/all-types-export.spec.js +0 -8
  149. package/lib/src/react/all-types-export.spec.js.map +1 -1
  150. package/lib/src/react/index.d.ts +1 -2
  151. package/lib/src/react/index.d.ts.map +1 -1
  152. package/lib/src/react/index.js +4 -3
  153. package/lib/src/react/index.js.map +1 -1
  154. package/lib/src/react/util.d.ts +1 -0
  155. package/lib/src/react/util.d.ts.map +1 -1
  156. package/lib/src/types.d.ts +58 -93
  157. package/lib/src/types.d.ts.map +1 -1
  158. package/lib/src/types.js +20 -45
  159. package/lib/src/types.js.map +1 -1
  160. package/lib/src/utils/custom-actions.d.ts.map +1 -1
  161. package/lib/src/utils/custom-actions.js +9 -0
  162. package/lib/src/utils/custom-actions.js.map +1 -1
  163. package/lib/src/utils/custom-actions.spec.js +20 -0
  164. package/lib/src/utils/custom-actions.spec.js.map +1 -1
  165. package/lib/src/utils/processData.d.ts +1 -1
  166. package/lib/src/utils/processData.d.ts.map +1 -1
  167. package/lib/src/utils/processData.js +8 -8
  168. package/lib/src/utils/processData.js.map +1 -1
  169. package/lib/src/utils/processData.spec.js.map +1 -1
  170. package/package.json +4 -3
  171. package/src/css-variables.ts +0 -58
  172. package/src/embed/app.spec.ts +87 -0
  173. package/src/embed/app.ts +35 -4
  174. package/src/embed/bodyless-conversation.ts +1 -1
  175. package/src/embed/conversation.spec.ts +35 -1
  176. package/src/embed/conversation.ts +22 -0
  177. package/src/embed/hostEventClient/contracts.ts +0 -10
  178. package/src/embed/liveboard.spec.ts +60 -0
  179. package/src/embed/liveboard.ts +9 -0
  180. package/src/embed/sage.ts +4 -4
  181. package/src/embed/search.ts +1 -3
  182. package/src/embed/ts-embed.spec.ts +7 -9
  183. package/src/embed/ts-embed.ts +31 -67
  184. package/src/errors.ts +1 -1
  185. package/src/index.ts +3 -4
  186. package/src/react/all-types-export.spec.ts +1 -9
  187. package/src/react/all-types-export.ts +8 -10
  188. package/src/react/index.tsx +130 -155
  189. package/src/types.ts +56 -94
  190. package/src/utils/custom-actions.spec.ts +22 -0
  191. package/src/utils/custom-actions.ts +11 -0
  192. package/src/utils/processData.spec.ts +1 -0
  193. package/src/utils/processData.ts +11 -11
  194. package/cjs/src/api-intercept.d.ts +0 -31
  195. package/cjs/src/api-intercept.d.ts.map +0 -1
  196. package/cjs/src/api-intercept.js +0 -119
  197. package/cjs/src/api-intercept.js.map +0 -1
  198. package/cjs/src/api-intercept.spec.d.ts +0 -2
  199. package/cjs/src/api-intercept.spec.d.ts.map +0 -1
  200. package/cjs/src/api-intercept.spec.js +0 -122
  201. package/cjs/src/api-intercept.spec.js.map +0 -1
  202. package/dist/index-BCC3Z072.js +0 -7371
  203. package/dist/index-BEzW4MDA.js +0 -7371
  204. package/dist/index-BaESA9rq.js +0 -7371
  205. package/dist/index-CFNZIcKr.js +0 -7447
  206. package/dist/index-CqKTa1Fe.js +0 -7447
  207. package/dist/index-DFnPKcjZ.js +0 -7447
  208. package/dist/index-DhFH7b7U.js +0 -7447
  209. package/dist/src/api-intercept.d.ts +0 -31
  210. package/dist/src/api-intercept.d.ts.map +0 -1
  211. package/dist/src/api-intercept.spec.d.ts +0 -2
  212. package/dist/src/api-intercept.spec.d.ts.map +0 -1
  213. package/lib/src/api-intercept.d.ts +0 -31
  214. package/lib/src/api-intercept.d.ts.map +0 -1
  215. package/lib/src/api-intercept.js +0 -112
  216. package/lib/src/api-intercept.js.map +0 -1
  217. package/lib/src/api-intercept.spec.d.ts +0 -2
  218. package/lib/src/api-intercept.spec.d.ts.map +0 -1
  219. package/lib/src/api-intercept.spec.js +0 -119
  220. package/lib/src/api-intercept.spec.js.map +0 -1
  221. 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.2 */
2
2
  'use client';
3
3
  function _mergeNamespaces(n, m) {
4
4
  m.forEach(function (e) {
@@ -1853,7 +1853,7 @@ var EmbedEvent;
1853
1853
  * the table visualization.
1854
1854
  *
1855
1855
  * If the Row-Level Security (RLS) rules are applied on the
1856
- * Worksheet or Model, exercise caution when changing column
1856
+ * Model, exercise caution when changing column
1857
1857
  * or table cell values to maintain data security.
1858
1858
  *
1859
1859
  * @example
@@ -1911,7 +1911,7 @@ var EmbedEvent;
1911
1911
  */
1912
1912
  EmbedEvent["SpotterData"] = "SpotterData";
1913
1913
  /**
1914
- * Emitted when user opens up the worksheet preview modal in Spotter embed.
1914
+ * Emitted when user opens up the data source preview modal in Spotter embed.
1915
1915
  * @example
1916
1916
  * ```js
1917
1917
  * spotterEmbed.on(EmbedEvent.PreviewSpotterData, (payload) => {
@@ -1999,21 +1999,6 @@ var EmbedEvent;
1999
1999
  * @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
2000
2000
  */
2001
2001
  EmbedEvent["OrgSwitched"] = "orgSwitched";
2002
- /**
2003
- * Emitted when the user intercepts a URL.
2004
- *
2005
- * Supported on all embed types.
2006
- *
2007
- * @example
2008
- * ```js
2009
- * embed.on(EmbedEvent.ApiIntercept, (payload) => {
2010
- * console.log('payload', payload);
2011
- * })
2012
- * ```
2013
- *
2014
- * @version SDK: 1.42.0 | ThoughtSpot: 10.14.0.cl
2015
- */
2016
- EmbedEvent["ApiIntercept"] = "ApiIntercept";
2017
2002
  })(EmbedEvent || (EmbedEvent = {}));
2018
2003
  /**
2019
2004
  * Event types that can be triggered by the host application
@@ -2152,9 +2137,7 @@ var HostEvent;
2152
2137
  */
2153
2138
  HostEvent["Reload"] = "reload";
2154
2139
  /**
2155
- * Get iframe URL for the current embed view on the playground.
2156
- * Developers can use this URL to embed a ThoughtSpot object
2157
- * in apps like Salesforce or Sharepoint.
2140
+ * Get iframe URL for the current embed view.
2158
2141
  * @example
2159
2142
  * ```js
2160
2143
  * const url = embed.trigger(HostEvent.GetIframeUrl);
@@ -3226,7 +3209,7 @@ var HostEvent;
3226
3209
  */
3227
3210
  HostEvent["EditLastPrompt"] = "EditLastPrompt";
3228
3211
  /**
3229
- * Opens the Worksheet preview modal in Spotter Embed.
3212
+ * Opens the data source preview modal in Spotter Embed.
3230
3213
  * @example
3231
3214
  * ```js
3232
3215
  * spotterEmbed.trigger(HostEvent.PreviewSpotterData);
@@ -3351,6 +3334,7 @@ var Param;
3351
3334
  Param["HideResult"] = "hideResult";
3352
3335
  Param["UseLastSelectedDataSource"] = "useLastSelectedSources";
3353
3336
  Param["Tag"] = "tag";
3337
+ Param["HideTagFilterChips"] = "hideTagFilterChips";
3354
3338
  Param["AutoLogin"] = "autoLogin";
3355
3339
  Param["searchTokenString"] = "searchTokenString";
3356
3340
  Param["executeSearch"] = "executeSearch";
@@ -3439,6 +3423,7 @@ var Param;
3439
3423
  Param["ShowLiveboardReverifyBanner"] = "showLiveboardReverifyBanner";
3440
3424
  Param["LiveboardHeaderV2"] = "isLiveboardHeaderV2Enabled";
3441
3425
  Param["HideIrrelevantFiltersInTab"] = "hideIrrelevantFiltersAtTabLevel";
3426
+ Param["IsEnhancedFilterInteractivityEnabled"] = "isLiveboardPermissionV2Enabled";
3442
3427
  Param["SpotterEnabled"] = "isSpotterExperienceEnabled";
3443
3428
  Param["IsUnifiedSearchExperienceEnabled"] = "isUnifiedSearchExperienceEnabled";
3444
3429
  Param["OverrideOrgId"] = "orgId";
@@ -3455,7 +3440,9 @@ var Param;
3455
3440
  Param["RootMarginForLazyLoad"] = "rootMarginForLazyLoad";
3456
3441
  Param["LiveboardXLSXCSVDownload"] = "isLiveboardXLSXCSVDownloadEnabled";
3457
3442
  Param["isPNGInScheduledEmailsEnabled"] = "isPNGInScheduledEmailsEnabled";
3443
+ Param["isCentralizedLiveboardFilterUXEnabled"] = "isCentralizedLiveboardFilterUXEnabled";
3458
3444
  Param["isLinkParametersEnabled"] = "isLinkParametersEnabled";
3445
+ Param["EnablePastConversationsSidebar"] = "enablePastConversationsSidebar";
3459
3446
  })(Param || (Param = {}));
3460
3447
  /**
3461
3448
  * ThoughtSpot application pages include actions and menu commands
@@ -3568,7 +3555,7 @@ var Action;
3568
3555
  */
3569
3556
  Action["SchedulesList"] = "schedule-list";
3570
3557
  /**
3571
- * The **Share** action on a Liveboard, Answer, or Worksheet.
3558
+ * The **Share** action on a Liveboard, Answer, or Model.
3572
3559
  * Allows users to share an object with other users and groups.
3573
3560
  * @example
3574
3561
  * ```js
@@ -4026,7 +4013,7 @@ var Action;
4026
4013
  Action["AnswerChartSwitcher"] = "answerChartSwitcher";
4027
4014
  /**
4028
4015
  * The Favorites icon (*) for Answers,
4029
- * Liveboard, and data objects like Worksheet, Model,
4016
+ * Liveboard, and data objects like Model,
4030
4017
  * Tables and Views.
4031
4018
  * Allows adding an object to the user's favorites list.
4032
4019
  * @example
@@ -4760,6 +4747,16 @@ var Action;
4760
4747
  * @version SDK: 1.42.0 | ThoughtSpot Cloud: 10.14.0.cl
4761
4748
  */
4762
4749
  Action["RemoveAttachment"] = "removeAttachment";
4750
+ /**
4751
+ * The **Style panel** on a Liveboard.
4752
+ * Controls the visibility of the Liveboard style panel.
4753
+ * @example
4754
+ * ```js
4755
+ * hiddenActions: [Action.LiveboardStylePanel]
4756
+ * ```
4757
+ * @version SDK: 1.43.0 | ThoughtSpot Cloud: 10.15.0.cl
4758
+ */
4759
+ Action["LiveboardStylePanel"] = "liveboardStylePanel";
4763
4760
  })(Action || (Action = {}));
4764
4761
  var PrefetchFeatures;
4765
4762
  (function (PrefetchFeatures) {
@@ -4881,29 +4878,7 @@ var LogLevel;
4881
4878
  * @version SDK: 1.26.7 | ThoughtSpot Cloud: 9.10.0.cl
4882
4879
  */
4883
4880
  LogLevel["TRACE"] = "TRACE";
4884
- })(LogLevel || (LogLevel = {}));
4885
- /**
4886
- * Enum for the type of API intercepted
4887
- */
4888
- var InterceptedApiType;
4889
- (function (InterceptedApiType) {
4890
- /**
4891
- * The apis that are use to get the metadata for the embed
4892
- */
4893
- InterceptedApiType["METADATA"] = "METADATA";
4894
- /**
4895
- * The apis that are use to get the data for the embed
4896
- */
4897
- InterceptedApiType["ANSWER_DATA"] = "ANSWER_DATA";
4898
- /**
4899
- * This will intercept all the apis
4900
- */
4901
- InterceptedApiType["ALL"] = "ALL";
4902
- /**
4903
- * The apis that are use to get the data for the liveboard
4904
- */
4905
- InterceptedApiType["LIVEBOARD_DATA"] = "LIVEBOARD_DATA";
4906
- })(InterceptedApiType || (InterceptedApiType = {}));
4881
+ })(LogLevel || (LogLevel = {}));
4907
4882
 
4908
4883
  const logFunctions = {
4909
4884
  [LogLevel.SILENT]: () => undefined,
@@ -7249,20 +7224,9 @@ function isEmpty(value) {
7249
7224
 
7250
7225
  var isEmpty_1 = isEmpty;
7251
7226
 
7252
- var UIPassthroughEvent;
7253
- (function (UIPassthroughEvent) {
7254
- UIPassthroughEvent["PinAnswerToLiveboard"] = "addVizToPinboard";
7255
- UIPassthroughEvent["SaveAnswer"] = "saveAnswer";
7256
- UIPassthroughEvent["GetDiscoverabilityStatus"] = "getDiscoverabilityStatus";
7257
- UIPassthroughEvent["GetAvailableUIPassthroughs"] = "getAvailableUiPassthroughs";
7258
- UIPassthroughEvent["GetAnswerConfig"] = "getAnswerPageConfig";
7259
- UIPassthroughEvent["GetLiveboardConfig"] = "getPinboardPageConfig";
7260
- UIPassthroughEvent["GetUnsavedAnswerTML"] = "getUnsavedAnswerTML";
7261
- })(UIPassthroughEvent || (UIPassthroughEvent = {}));
7262
-
7263
7227
  const ERROR_MESSAGE = {
7264
7228
  INVALID_THOUGHTSPOT_HOST: 'Error parsing ThoughtSpot host. Please provide a valid URL.',
7265
- SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND: 'Please select a worksheet to get started',
7229
+ SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND: 'Please select a Model to get started',
7266
7230
  LIVEBOARD_VIZ_ID_VALIDATION: 'Please select a Liveboard to embed.',
7267
7231
  TRIGGER_TIMED_OUT: 'Trigger timed-out in getting a response',
7268
7232
  SEARCHEMBED_BETA_WRANING_MESSAGE: 'SearchEmbed is in Beta in this release.',
@@ -8191,7 +8155,7 @@ class AnswerService {
8191
8155
  async getTML() {
8192
8156
  const { object } = await this.executeQuery(getAnswerTML, {});
8193
8157
  const edoc = object[0].edoc;
8194
- const YAML = await import('./index-CqKTa1Fe.js');
8158
+ const YAML = await import('./index-CjbriUI0.js');
8195
8159
  const parsedDoc = YAML.parse(edoc);
8196
8160
  return {
8197
8161
  answer: {
@@ -9712,6 +9676,14 @@ const getCustomActions = (customActions) => {
9712
9676
  finalValidActions.push(action);
9713
9677
  }
9714
9678
  });
9679
+ // Step 4: Collect warnings for long custom action names
9680
+ const MAX_ACTION_NAME_LENGTH = 30;
9681
+ const warnings = finalValidActions
9682
+ .filter(action => action.name.length > MAX_ACTION_NAME_LENGTH)
9683
+ .map(action => `Custom action name '${action.name}' exceeds ${MAX_ACTION_NAME_LENGTH} characters. This may cause display or truncation issues in the UI.`);
9684
+ if (warnings.length > 0) {
9685
+ logger$3.warn(warnings);
9686
+ }
9715
9687
  const sortedActions = sortBy_1(finalValidActions, (a) => a.name.toLocaleLowerCase());
9716
9688
  return {
9717
9689
  actions: sortedActions,
@@ -17510,27 +17482,27 @@ function processAuthLogout(e, containerEl) {
17510
17482
  * @param thoughtSpotHost
17511
17483
  * @param containerEl
17512
17484
  */
17513
- function processEventData(type, eventData, thoughtSpotHost, containerEl) {
17485
+ function processEventData(type, e, thoughtSpotHost, containerEl) {
17514
17486
  switch (type) {
17515
17487
  case EmbedEvent.CustomAction:
17516
- return processCustomAction(eventData, thoughtSpotHost);
17488
+ return processCustomAction(e, thoughtSpotHost);
17517
17489
  case EmbedEvent.AuthInit:
17518
- return processAuthInit(eventData);
17490
+ return processAuthInit(e);
17519
17491
  case EmbedEvent.NoCookieAccess:
17520
- return processNoCookieAccess(eventData, containerEl);
17492
+ return processNoCookieAccess(e, containerEl);
17521
17493
  case EmbedEvent.AuthFailure:
17522
- return processAuthFailure(eventData, containerEl);
17494
+ return processAuthFailure(e, containerEl);
17523
17495
  case EmbedEvent.AuthLogout:
17524
- return processAuthLogout(eventData, containerEl);
17496
+ return processAuthLogout(e, containerEl);
17525
17497
  case EmbedEvent.ExitPresentMode:
17526
17498
  return processExitPresentMode();
17527
17499
  case EmbedEvent.CLEAR_INFO_CACHE:
17528
17500
  return processClearInfoCache();
17529
17501
  }
17530
- return eventData;
17502
+ return e;
17531
17503
  }
17532
17504
 
17533
- 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};
17505
+ var name="@thoughtspot/visual-embed-sdk";var version$1="1.42.2";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p tsconfig.build.json --incremental false; tsc -p tsconfig.build.json --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle-generator --config ./dts-config/dts-bundle-file.config.js","bundle-dts":"dts-bundle-generator --config ./dts-config/dts-bundle.config.js","bundle-dts-react":"dts-bundle-generator --config ./dts-config/dts-bundle-react.config.js","bundle-dts-react-full":"dts-bundle-generator --config ./dts-config/dts-bundle-react-full.config.js",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.build.json --theme typedoc-theme --json static/typedoc/typedoc.json --disableOutputCheck","test-sdk":"jest -c jest.config.sdk.js --runInBand",test:"npm run test-sdk",posttest:"cat ./coverage/sdk/lcov.info | npx coveralls-next","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest",dev:"vite -c vite.local.config.ts"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={classnames:"^2.3.1",eventemitter3:"^4.0.7",lodash:"^4.17.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};
17534
17506
 
17535
17507
  /**
17536
17508
  * Reloads the ThoughtSpot iframe.
@@ -17602,6 +17574,16 @@ function processTrigger(iFrame, messageType, thoughtSpotHost, data) {
17602
17574
  });
17603
17575
  }
17604
17576
 
17577
+ var UIPassthroughEvent;
17578
+ (function (UIPassthroughEvent) {
17579
+ UIPassthroughEvent["PinAnswerToLiveboard"] = "addVizToPinboard";
17580
+ UIPassthroughEvent["SaveAnswer"] = "saveAnswer";
17581
+ UIPassthroughEvent["GetDiscoverabilityStatus"] = "getDiscoverabilityStatus";
17582
+ UIPassthroughEvent["GetAvailableUIPassthroughs"] = "getAvailableUiPassthroughs";
17583
+ UIPassthroughEvent["GetAnswerConfig"] = "getAnswerPageConfig";
17584
+ UIPassthroughEvent["GetLiveboardConfig"] = "getPinboardPageConfig";
17585
+ })(UIPassthroughEvent || (UIPassthroughEvent = {}));
17586
+
17605
17587
  class HostEventClient {
17606
17588
  constructor(iFrame) {
17607
17589
  this.iFrame = iFrame;
@@ -17693,111 +17675,6 @@ class HostEventClient {
17693
17675
  }
17694
17676
  }
17695
17677
 
17696
- const defaultUrls = {
17697
- [InterceptedApiType.METADATA]: [
17698
- '/prism/?op=CreateAnswerSession',
17699
- '/prism/?op=GetV2SourceDetail',
17700
- ],
17701
- [InterceptedApiType.ANSWER_DATA]: [
17702
- '/prism/?op=GetChartWithData',
17703
- '/prism/?op=GetTableWithHeadlineData',
17704
- ],
17705
- [InterceptedApiType.LIVEBOARD_DATA]: [
17706
- '/prism/?op=LoadContextBook'
17707
- ],
17708
- };
17709
- const formatInterceptUrl = (url) => {
17710
- const host = getThoughtSpotHost(getEmbedConfig());
17711
- if (url.startsWith('/'))
17712
- return `${host}${url}`;
17713
- return url;
17714
- };
17715
- const processInterceptUrls = (interceptUrls) => {
17716
- let processedUrls = [...interceptUrls];
17717
- Object.entries(defaultUrls).forEach(([apiType, apiTypeUrls]) => {
17718
- if (!processedUrls.includes(apiType))
17719
- return;
17720
- processedUrls = processedUrls.filter(url => url !== apiType);
17721
- processedUrls = [...processedUrls, ...apiTypeUrls];
17722
- });
17723
- return processedUrls.map(url => formatInterceptUrl(url));
17724
- };
17725
- const getInterceptInitData = (embedConfig, viewConfig) => {
17726
- const enableApiIntercept = (embedConfig.enableApiIntercept || viewConfig.enableApiIntercept) && (viewConfig.enableApiIntercept !== false);
17727
- if (!enableApiIntercept)
17728
- return {
17729
- enableApiIntercept: false,
17730
- };
17731
- const combinedUrls = [...(embedConfig.interceptUrls || []), ...(viewConfig.interceptUrls || [])];
17732
- if (viewConfig.isOnBeforeGetVizDataInterceptEnabled) {
17733
- combinedUrls.push(InterceptedApiType.ANSWER_DATA);
17734
- }
17735
- const shouldInterceptAll = combinedUrls.includes(InterceptedApiType.ALL);
17736
- const interceptUrls = shouldInterceptAll ? [InterceptedApiType.ALL] : processInterceptUrls(combinedUrls);
17737
- const interceptTimeout = embedConfig.interceptTimeout || viewConfig.interceptTimeout;
17738
- return {
17739
- interceptUrls,
17740
- interceptTimeout,
17741
- enableApiIntercept,
17742
- };
17743
- };
17744
- /**
17745
- *
17746
- * @param fetchInit
17747
- */
17748
- const parseInterceptData = (eventDataString) => {
17749
- try {
17750
- const { input, init } = JSON.parse(eventDataString);
17751
- init.body = JSON.parse(init.body);
17752
- const parsedInit = { input, init };
17753
- return [parsedInit, null];
17754
- }
17755
- catch (error) {
17756
- return [null, error];
17757
- }
17758
- };
17759
- const handleInterceptEvent = async (params) => {
17760
- var _a, _b, _c, _d, _e;
17761
- const { eventData, executeEvent, viewConfig, getUnsavedAnswerTml } = params;
17762
- const [interceptData, bodyParseError] = parseInterceptData(eventData.data);
17763
- if (bodyParseError) {
17764
- executeEvent(EmbedEvent.Error, {
17765
- error: 'Error parsing api intercept body',
17766
- });
17767
- logger$3.error('Error parsing request body', bodyParseError);
17768
- return;
17769
- }
17770
- const { input: requestUrl, init } = interceptData;
17771
- 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;
17772
- 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;
17773
- if (defaultUrls.ANSWER_DATA.includes(requestUrl) && viewConfig.isOnBeforeGetVizDataInterceptEnabled) {
17774
- const answerTml = await getUnsavedAnswerTml({ sessionId, vizId });
17775
- executeEvent(EmbedEvent.OnBeforeGetVizDataIntercept, { data: { data: answerTml } });
17776
- }
17777
- executeEvent(EmbedEvent.ApiIntercept, interceptData);
17778
- };
17779
- const processLegacyInterceptResponse = (payload) => {
17780
- var _a, _b, _c, _d, _e, _f, _g;
17781
- 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);
17782
- 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);
17783
- const payloadToSend = {
17784
- execute: (_g = payload === null || payload === void 0 ? void 0 : payload.data) === null || _g === void 0 ? void 0 : _g.execute,
17785
- response: {
17786
- body: {
17787
- errors: [
17788
- {
17789
- title: errorText,
17790
- description: errorDescription,
17791
- isUserError: true,
17792
- },
17793
- ],
17794
- data: {},
17795
- },
17796
- },
17797
- };
17798
- return { data: payloadToSend };
17799
- };
17800
-
17801
17678
  /**
17802
17679
  * Copyright (c) 2022
17803
17680
  *
@@ -17851,27 +17728,6 @@ class TsEmbed {
17851
17728
  */
17852
17729
  this.fullscreenChangeHandler = null;
17853
17730
  this.subscribedListeners = {};
17854
- this.messageEventListener = async (event) => {
17855
- const eventType = this.getEventType(event);
17856
- const eventPort = this.getEventPort(event);
17857
- const eventData = this.formatEventData(event, eventType);
17858
- if (event.source === this.iFrame.contentWindow) {
17859
- const processedEventData = await processEventData(eventType, eventData, this.thoughtSpotHost, this.isPreRendered ? this.preRenderWrapper : this.el);
17860
- const executeEvent = (_eventType, data) => {
17861
- this.executeCallbacks(_eventType, data, eventPort);
17862
- };
17863
- if (eventType === EmbedEvent.ApiIntercept && this.viewConfig.enableApiIntercept) {
17864
- const getUnsavedAnswerTml = async (props) => {
17865
- var _a;
17866
- const response = await this.triggerUIPassThrough(UIPassthroughEvent.GetUnsavedAnswerTML, props);
17867
- return (_a = response[0]) === null || _a === void 0 ? void 0 : _a.value;
17868
- };
17869
- handleInterceptEvent({ eventData: processedEventData, executeEvent, embedConfig: this.embedConfig, viewConfig: this.viewConfig, getUnsavedAnswerTml });
17870
- return;
17871
- }
17872
- this.executeCallbacks(eventType, processedEventData, eventPort);
17873
- }
17874
- };
17875
17731
  /**
17876
17732
  * Send Custom style as part of payload of APP_INIT
17877
17733
  * @param _
@@ -17956,18 +17812,6 @@ class TsEmbed {
17956
17812
  this.on(EmbedEvent.AuthInit, authInitHandler, { start: false }, true);
17957
17813
  };
17958
17814
  this.showPreRenderByDefault = false;
17959
- this.createEmbedEventResponder = (eventPort, eventType) => {
17960
- const { enableApiIntercept } = getInterceptInitData(this.embedConfig, this.viewConfig);
17961
- if (eventType === EmbedEvent.OnBeforeGetVizDataIntercept && enableApiIntercept) {
17962
- return (payload) => {
17963
- const payloadToSend = processLegacyInterceptResponse(payload);
17964
- this.triggerEventOnPort(eventPort, payloadToSend);
17965
- };
17966
- }
17967
- return (payload) => {
17968
- this.triggerEventOnPort(eventPort, payload);
17969
- };
17970
- };
17971
17815
  /**
17972
17816
  * @hidden
17973
17817
  * Internal state to track if the embed container is loaded.
@@ -18153,8 +17997,16 @@ class TsEmbed {
18153
17997
  */
18154
17998
  subscribeToMessageEvents() {
18155
17999
  this.unsubscribeToMessageEvents();
18156
- window.addEventListener('message', this.messageEventListener);
18157
- this.subscribedListeners.message = this.messageEventListener;
18000
+ const messageEventListener = (event) => {
18001
+ const eventType = this.getEventType(event);
18002
+ const eventPort = this.getEventPort(event);
18003
+ const eventData = this.formatEventData(event, eventType);
18004
+ if (event.source === this.iFrame.contentWindow) {
18005
+ this.executeCallbacks(eventType, processEventData(eventType, eventData, this.thoughtSpotHost, this.isPreRendered ? this.preRenderWrapper : this.el), eventPort);
18006
+ }
18007
+ };
18008
+ window.addEventListener('message', messageEventListener);
18009
+ this.subscribedListeners.message = messageEventListener;
18158
18010
  }
18159
18011
  /**
18160
18012
  * Adds event listeners for both network and message events.
@@ -18215,7 +18067,7 @@ class TsEmbed {
18215
18067
  message: customActionsResult.errors,
18216
18068
  });
18217
18069
  }
18218
- const baseInitData = {
18070
+ return {
18219
18071
  customisations: getCustomisations(this.embedConfig, this.viewConfig),
18220
18072
  authToken,
18221
18073
  runtimeFilterParams: this.viewConfig.excludeRuntimeFiltersfromURL
@@ -18233,9 +18085,7 @@ class TsEmbed {
18233
18085
  customVariablesForThirdPartyTools: this.embedConfig.customVariablesForThirdPartyTools || {},
18234
18086
  hiddenListColumns: this.viewConfig.hiddenListColumns || [],
18235
18087
  customActions: customActionsResult.actions,
18236
- ...getInterceptInitData(this.embedConfig, this.viewConfig),
18237
18088
  };
18238
- return baseInitData;
18239
18089
  }
18240
18090
  async getAppInitData() {
18241
18091
  return this.getDefaultAppInitData();
@@ -18664,8 +18514,9 @@ class TsEmbed {
18664
18514
  // When start status is false it trigger only end releated
18665
18515
  // payload
18666
18516
  || (!callbackObj.options.start && dataStatus === embedEventStatus.END)) {
18667
- const responder = this.createEmbedEventResponder(eventPort, eventType);
18668
- callbackObj.callback(data, responder);
18517
+ callbackObj.callback(data, (payload) => {
18518
+ this.triggerEventOnPort(eventPort, payload);
18519
+ });
18669
18520
  }
18670
18521
  });
18671
18522
  }
@@ -19375,7 +19226,7 @@ class AppEmbed extends V1Embed {
19375
19226
  * embedded Liveboard or visualization.
19376
19227
  */
19377
19228
  getEmbedParams() {
19378
- 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$1.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;
19229
+ 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$1.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;
19379
19230
  let params = {};
19380
19231
  params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
19381
19232
  params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
@@ -19387,6 +19238,7 @@ class AppEmbed extends V1Embed {
19387
19238
  params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
19388
19239
  params[Param.IsFullAppEmbed] = true;
19389
19240
  params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
19241
+ params[Param.IsEnhancedFilterInteractivityEnabled] = isEnhancedFilterInteractivityEnabled;
19390
19242
  params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;
19391
19243
  params[Param.ShowLiveboardReverifyBanner] = showLiveboardReverifyBanner;
19392
19244
  params[Param.HideIrrelevantFiltersInTab] = hideIrrelevantChipsInLiveboardTabs;
@@ -19428,8 +19280,7 @@ class AppEmbed extends V1Embed {
19428
19280
  if (enableAskSage) {
19429
19281
  params[Param.enableAskSage] = enableAskSage;
19430
19282
  }
19431
- const { enableApiIntercept } = getInterceptInitData(this.embedConfig, this.viewConfig);
19432
- if (isOnBeforeGetVizDataInterceptEnabled && !enableApiIntercept) {
19283
+ if (isOnBeforeGetVizDataInterceptEnabled) {
19433
19284
  params[Param.IsOnBeforeGetVizDataInterceptEnabled] = isOnBeforeGetVizDataInterceptEnabled;
19434
19285
  }
19435
19286
  if (homePageSearchBarMode) {
@@ -19444,9 +19295,15 @@ class AppEmbed extends V1Embed {
19444
19295
  if (isPNGInScheduledEmailsEnabled !== undefined) {
19445
19296
  params[Param.isPNGInScheduledEmailsEnabled] = isPNGInScheduledEmailsEnabled;
19446
19297
  }
19298
+ if (hideTagFilterChips !== undefined) {
19299
+ params[Param.HideTagFilterChips] = hideTagFilterChips;
19300
+ }
19447
19301
  if (isLinkParametersEnabled !== undefined) {
19448
19302
  params[Param.isLinkParametersEnabled] = isLinkParametersEnabled;
19449
19303
  }
19304
+ if (isCentralizedLiveboardFilterUXEnabled != undefined) {
19305
+ params[Param.isCentralizedLiveboardFilterUXEnabled] = isCentralizedLiveboardFilterUXEnabled;
19306
+ }
19450
19307
  params[Param.DataPanelV2Enabled] = dataPanelV2;
19451
19308
  params[Param.HideHomepageLeftNav] = hideHomepageLeftNav;
19452
19309
  params[Param.ModularHomeExperienceEnabled] = modularHomeExperience;
@@ -19801,7 +19658,7 @@ class LiveboardEmbed extends V1Embed {
19801
19658
  getEmbedParamsObject() {
19802
19659
  let params = {};
19803
19660
  params = this.getBaseQueryParams(params);
19804
- 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;
19661
+ 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;
19805
19662
  const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
19806
19663
  || this.viewConfig.preventPinboardFilterRemoval;
19807
19664
  if (fullHeight === true) {
@@ -19869,11 +19726,15 @@ class LiveboardEmbed extends V1Embed {
19869
19726
  if (isLinkParametersEnabled !== undefined) {
19870
19727
  params[Param.isLinkParametersEnabled] = isLinkParametersEnabled;
19871
19728
  }
19729
+ if (isCentralizedLiveboardFilterUXEnabled !== undefined) {
19730
+ params[Param.isCentralizedLiveboardFilterUXEnabled] = isCentralizedLiveboardFilterUXEnabled;
19731
+ }
19872
19732
  params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
19873
19733
  params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
19874
19734
  params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;
19875
19735
  params[Param.ShowLiveboardReverifyBanner] = showLiveboardReverifyBanner;
19876
19736
  params[Param.HideIrrelevantFiltersInTab] = hideIrrelevantChipsInLiveboardTabs;
19737
+ params[Param.IsEnhancedFilterInteractivityEnabled] = isEnhancedFilterInteractivityEnabled;
19877
19738
  params[Param.DataPanelV2Enabled] = dataPanelV2;
19878
19739
  params[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
19879
19740
  params[Param.CoverAndFilterOptionInPDF] = coverAndFilterOptionInPDF;
@@ -20155,8 +20016,7 @@ class SearchEmbed extends TsEmbed {
20155
20016
  if (hideSearchBar) {
20156
20017
  queryParams[Param.HideSearchBar] = true;
20157
20018
  }
20158
- const { enableApiIntercept } = getInterceptInitData(this.embedConfig, this.viewConfig);
20159
- if (isOnBeforeGetVizDataInterceptEnabled && !enableApiIntercept) {
20019
+ if (isOnBeforeGetVizDataInterceptEnabled) {
20160
20020
  queryParams[Param.IsOnBeforeGetVizDataInterceptEnabled] = isOnBeforeGetVizDataInterceptEnabled;
20161
20021
  }
20162
20022
  if (!focusSearchBarOnRender) {
@@ -20868,7 +20728,7 @@ class SpotterEmbed extends TsEmbed {
20868
20728
  this.viewConfig = viewConfig;
20869
20729
  }
20870
20730
  getEmbedParamsObject() {
20871
- const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, } = this.viewConfig;
20731
+ const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, enablePastConversationsSidebar, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, } = this.viewConfig;
20872
20732
  if (!worksheetId) {
20873
20733
  this.handleError(ERROR_MESSAGE.SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND);
20874
20734
  }
@@ -20892,9 +20752,12 @@ class SpotterEmbed extends TsEmbed {
20892
20752
  return queryParams;
20893
20753
  }
20894
20754
  getIframeSrc() {
20895
- const { worksheetId, searchOptions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, } = this.viewConfig;
20755
+ const { worksheetId, searchOptions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, enablePastConversationsSidebar } = this.viewConfig;
20896
20756
  const path = 'insights/conv-assist';
20897
20757
  const queryParams = this.getEmbedParamsObject();
20758
+ if (!isUndefined_1(enablePastConversationsSidebar)) {
20759
+ queryParams[Param.EnablePastConversationsSidebar] = !!enablePastConversationsSidebar;
20760
+ }
20898
20761
  let query = '';
20899
20762
  const queryParamsString = getQueryParamString(queryParams, true);
20900
20763
  if (queryParamsString) {
@@ -21550,4 +21413,4 @@ const createLiveboardWithAnswers = async (answers, name) => {
21550
21413
  return result;
21551
21414
  };
21552
21415
 
21553
- export { Action, AnswerService, AppEmbed, AuthEvent, AuthFailureType, AuthStatus, AuthType, BodylessConversation, ContextMenuTriggerOptions, ConversationEmbed, CustomActionTarget, CustomActionsPosition, DataPanelCustomColumnGroupsAccordionState$1 as DataPanelCustomColumnGroupsAccordionState, DataSourceVisualMode, EmbedEvent, HomeLeftNavItem, HomePage, HomePageSearchBarMode, HomepageModule, HostEvent, InterceptedApiType, ListPage, ListPageColumns, LiveboardEmbed, LogLevel, MIXPANEL_EVENT, Page, PinboardEmbed, PrefetchFeatures, PrimaryNavbarVersion, RuntimeFilterOp, SageEmbed, SearchBarEmbed, SearchEmbed, SpotterAgentEmbed, SpotterEmbed, UIPassthroughEvent, createLiveboardWithAnswers, executeTML, exportTML, getAnswerFromQuery, getEmbedConfig as getInitConfig, getSessionInfo, init, logout, prefetch, resetCachedAuthToken, tokenizedFetch, uploadMixpanelEvent };
21416
+ export { Action, AnswerService, AppEmbed, AuthEvent, AuthFailureType, AuthStatus, AuthType, BodylessConversation, ContextMenuTriggerOptions, ConversationEmbed, CustomActionTarget, CustomActionsPosition, DataPanelCustomColumnGroupsAccordionState$1 as DataPanelCustomColumnGroupsAccordionState, DataSourceVisualMode, EmbedEvent, HomeLeftNavItem, HomePage, HomePageSearchBarMode, HomepageModule, HostEvent, ListPage, ListPageColumns, LiveboardEmbed, LogLevel, MIXPANEL_EVENT, Page, PinboardEmbed, PrefetchFeatures, PrimaryNavbarVersion, RuntimeFilterOp, SageEmbed, SearchBarEmbed, SearchEmbed, SpotterAgentEmbed, SpotterEmbed, UIPassthroughEvent, createLiveboardWithAnswers, executeTML, exportTML, getAnswerFromQuery, getEmbedConfig as getInitConfig, getSessionInfo, init, logout, prefetch, resetCachedAuthToken, tokenizedFetch, uploadMixpanelEvent };