@thoughtspot/visual-embed-sdk 1.42.1-alpha.6 → 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 (202) hide show
  1. package/cjs/package.json +3 -2
  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.map +1 -1
  35. package/cjs/src/errors.js +1 -1
  36. package/cjs/src/errors.js.map +1 -1
  37. package/cjs/src/index.d.ts +2 -2
  38. package/cjs/src/index.d.ts.map +1 -1
  39. package/cjs/src/index.js +1 -2
  40. package/cjs/src/index.js.map +1 -1
  41. package/cjs/src/react/all-types-export.d.ts +1 -1
  42. package/cjs/src/react/all-types-export.d.ts.map +1 -1
  43. package/cjs/src/react/all-types-export.js +3 -2
  44. package/cjs/src/react/all-types-export.js.map +1 -1
  45. package/cjs/src/react/util.d.ts +1 -0
  46. package/cjs/src/react/util.d.ts.map +1 -1
  47. package/cjs/src/types.d.ts +58 -93
  48. package/cjs/src/types.d.ts.map +1 -1
  49. package/cjs/src/types.js +21 -46
  50. package/cjs/src/types.js.map +1 -1
  51. package/cjs/src/utils/custom-actions.d.ts.map +1 -1
  52. package/cjs/src/utils/custom-actions.js +9 -0
  53. package/cjs/src/utils/custom-actions.js.map +1 -1
  54. package/cjs/src/utils/custom-actions.spec.js +20 -0
  55. package/cjs/src/utils/custom-actions.spec.js.map +1 -1
  56. package/cjs/src/utils/processData.d.ts +1 -1
  57. package/cjs/src/utils/processData.d.ts.map +1 -1
  58. package/cjs/src/utils/processData.js +8 -8
  59. package/cjs/src/utils/processData.js.map +1 -1
  60. package/cjs/src/utils/processData.spec.js.map +1 -1
  61. package/dist/{index-DvNA626T.js → index-CjbriUI0.js} +1 -1
  62. package/dist/src/css-variables.d.ts +0 -48
  63. package/dist/src/css-variables.d.ts.map +1 -1
  64. package/dist/src/embed/app.d.ts +20 -0
  65. package/dist/src/embed/app.d.ts.map +1 -1
  66. package/dist/src/embed/bodyless-conversation.d.ts +1 -1
  67. package/dist/src/embed/conversation.d.ts +16 -0
  68. package/dist/src/embed/conversation.d.ts.map +1 -1
  69. package/dist/src/embed/hostEventClient/contracts.d.ts +1 -11
  70. package/dist/src/embed/hostEventClient/contracts.d.ts.map +1 -1
  71. package/dist/src/embed/liveboard.d.ts.map +1 -1
  72. package/dist/src/embed/sage.d.ts +4 -4
  73. package/dist/src/embed/search.d.ts.map +1 -1
  74. package/dist/src/embed/ts-embed.d.ts +0 -2
  75. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  76. package/dist/src/index.d.ts +2 -2
  77. package/dist/src/index.d.ts.map +1 -1
  78. package/dist/src/react/all-types-export.d.ts +1 -1
  79. package/dist/src/react/all-types-export.d.ts.map +1 -1
  80. package/dist/src/react/util.d.ts +1 -0
  81. package/dist/src/react/util.d.ts.map +1 -1
  82. package/dist/src/types.d.ts +58 -93
  83. package/dist/src/types.d.ts.map +1 -1
  84. package/dist/src/utils/custom-actions.d.ts.map +1 -1
  85. package/dist/src/utils/processData.d.ts +1 -1
  86. package/dist/src/utils/processData.d.ts.map +1 -1
  87. package/dist/tsembed-react.es.js +84 -219
  88. package/dist/tsembed-react.js +228 -439
  89. package/dist/tsembed.es.js +85 -220
  90. package/dist/tsembed.js +228 -439
  91. package/dist/visual-embed-sdk-react-full.d.ts +104 -160
  92. package/dist/visual-embed-sdk-react.d.ts +95 -155
  93. package/dist/visual-embed-sdk.d.ts +95 -158
  94. package/lib/package.json +3 -2
  95. package/lib/src/css-variables.d.ts +0 -48
  96. package/lib/src/css-variables.d.ts.map +1 -1
  97. package/lib/src/embed/app.d.ts +20 -0
  98. package/lib/src/embed/app.d.ts.map +1 -1
  99. package/lib/src/embed/app.js +9 -4
  100. package/lib/src/embed/app.js.map +1 -1
  101. package/lib/src/embed/app.spec.js +62 -0
  102. package/lib/src/embed/app.spec.js.map +1 -1
  103. package/lib/src/embed/bodyless-conversation.d.ts +1 -1
  104. package/lib/src/embed/conversation.d.ts +16 -0
  105. package/lib/src/embed/conversation.d.ts.map +1 -1
  106. package/lib/src/embed/conversation.js +5 -2
  107. package/lib/src/embed/conversation.js.map +1 -1
  108. package/lib/src/embed/conversation.spec.js +25 -1
  109. package/lib/src/embed/conversation.spec.js.map +1 -1
  110. package/lib/src/embed/hostEventClient/contracts.d.ts +1 -11
  111. package/lib/src/embed/hostEventClient/contracts.d.ts.map +1 -1
  112. package/lib/src/embed/hostEventClient/contracts.js +0 -1
  113. package/lib/src/embed/hostEventClient/contracts.js.map +1 -1
  114. package/lib/src/embed/liveboard.d.ts.map +1 -1
  115. package/lib/src/embed/liveboard.js +5 -1
  116. package/lib/src/embed/liveboard.js.map +1 -1
  117. package/lib/src/embed/liveboard.spec.js +47 -1
  118. package/lib/src/embed/liveboard.spec.js.map +1 -1
  119. package/lib/src/embed/sage.d.ts +4 -4
  120. package/lib/src/embed/search.d.ts.map +1 -1
  121. package/lib/src/embed/search.js +1 -3
  122. package/lib/src/embed/search.js.map +1 -1
  123. package/lib/src/embed/ts-embed.d.ts +0 -2
  124. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  125. package/lib/src/embed/ts-embed.js +14 -42
  126. package/lib/src/embed/ts-embed.js.map +1 -1
  127. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  128. package/lib/src/errors.js +1 -1
  129. package/lib/src/errors.js.map +1 -1
  130. package/lib/src/index.d.ts +2 -2
  131. package/lib/src/index.d.ts.map +1 -1
  132. package/lib/src/index.js +2 -2
  133. package/lib/src/index.js.map +1 -1
  134. package/lib/src/react/all-types-export.d.ts +1 -1
  135. package/lib/src/react/all-types-export.d.ts.map +1 -1
  136. package/lib/src/react/all-types-export.js +1 -1
  137. package/lib/src/react/all-types-export.js.map +1 -1
  138. package/lib/src/react/util.d.ts +1 -0
  139. package/lib/src/react/util.d.ts.map +1 -1
  140. package/lib/src/types.d.ts +58 -93
  141. package/lib/src/types.d.ts.map +1 -1
  142. package/lib/src/types.js +20 -45
  143. package/lib/src/types.js.map +1 -1
  144. package/lib/src/utils/custom-actions.d.ts.map +1 -1
  145. package/lib/src/utils/custom-actions.js +9 -0
  146. package/lib/src/utils/custom-actions.js.map +1 -1
  147. package/lib/src/utils/custom-actions.spec.js +20 -0
  148. package/lib/src/utils/custom-actions.spec.js.map +1 -1
  149. package/lib/src/utils/processData.d.ts +1 -1
  150. package/lib/src/utils/processData.d.ts.map +1 -1
  151. package/lib/src/utils/processData.js +8 -8
  152. package/lib/src/utils/processData.js.map +1 -1
  153. package/lib/src/utils/processData.spec.js.map +1 -1
  154. package/package.json +3 -2
  155. package/src/css-variables.ts +0 -58
  156. package/src/embed/app.spec.ts +87 -0
  157. package/src/embed/app.ts +35 -4
  158. package/src/embed/bodyless-conversation.ts +1 -1
  159. package/src/embed/conversation.spec.ts +35 -1
  160. package/src/embed/conversation.ts +22 -0
  161. package/src/embed/hostEventClient/contracts.ts +0 -10
  162. package/src/embed/liveboard.spec.ts +60 -0
  163. package/src/embed/liveboard.ts +9 -0
  164. package/src/embed/sage.ts +4 -4
  165. package/src/embed/search.ts +1 -3
  166. package/src/embed/ts-embed.spec.ts +7 -7
  167. package/src/embed/ts-embed.ts +31 -67
  168. package/src/errors.ts +1 -1
  169. package/src/index.ts +0 -2
  170. package/src/react/all-types-export.ts +2 -1
  171. package/src/types.ts +56 -94
  172. package/src/utils/custom-actions.spec.ts +22 -0
  173. package/src/utils/custom-actions.ts +11 -0
  174. package/src/utils/processData.spec.ts +1 -0
  175. package/src/utils/processData.ts +11 -11
  176. package/cjs/src/api-intercept.d.ts +0 -31
  177. package/cjs/src/api-intercept.d.ts.map +0 -1
  178. package/cjs/src/api-intercept.js +0 -117
  179. package/cjs/src/api-intercept.js.map +0 -1
  180. package/cjs/src/api-intercept.spec.d.ts +0 -2
  181. package/cjs/src/api-intercept.spec.d.ts.map +0 -1
  182. package/cjs/src/api-intercept.spec.js +0 -122
  183. package/cjs/src/api-intercept.spec.js.map +0 -1
  184. package/dist/index-BCC3Z072.js +0 -7371
  185. package/dist/index-BEzW4MDA.js +0 -7371
  186. package/dist/index-BaESA9rq.js +0 -7371
  187. package/dist/index-CFNZIcKr.js +0 -7447
  188. package/dist/index-DFnPKcjZ.js +0 -7447
  189. package/dist/index-DhFH7b7U.js +0 -7447
  190. package/dist/src/api-intercept.d.ts +0 -31
  191. package/dist/src/api-intercept.d.ts.map +0 -1
  192. package/dist/src/api-intercept.spec.d.ts +0 -2
  193. package/dist/src/api-intercept.spec.d.ts.map +0 -1
  194. package/lib/src/api-intercept.d.ts +0 -31
  195. package/lib/src/api-intercept.d.ts.map +0 -1
  196. package/lib/src/api-intercept.js +0 -110
  197. package/lib/src/api-intercept.js.map +0 -1
  198. package/lib/src/api-intercept.spec.d.ts +0 -2
  199. package/lib/src/api-intercept.spec.d.ts.map +0 -1
  200. package/lib/src/api-intercept.spec.js +0 -119
  201. package/lib/src/api-intercept.spec.js.map +0 -1
  202. package/src/api-intercept.ts +0 -136
@@ -1,4 +1,4 @@
1
- /* @thoughtspot/visual-embed-sdk version 1.42.1-alpha.6 */
1
+ /* @thoughtspot/visual-embed-sdk version 1.42.2 */
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);
@@ -3049,6 +3032,7 @@ var Param;
3049
3032
  Param["HideResult"] = "hideResult";
3050
3033
  Param["UseLastSelectedDataSource"] = "useLastSelectedSources";
3051
3034
  Param["Tag"] = "tag";
3035
+ Param["HideTagFilterChips"] = "hideTagFilterChips";
3052
3036
  Param["AutoLogin"] = "autoLogin";
3053
3037
  Param["searchTokenString"] = "searchTokenString";
3054
3038
  Param["executeSearch"] = "executeSearch";
@@ -3137,6 +3121,7 @@ var Param;
3137
3121
  Param["ShowLiveboardReverifyBanner"] = "showLiveboardReverifyBanner";
3138
3122
  Param["LiveboardHeaderV2"] = "isLiveboardHeaderV2Enabled";
3139
3123
  Param["HideIrrelevantFiltersInTab"] = "hideIrrelevantFiltersAtTabLevel";
3124
+ Param["IsEnhancedFilterInteractivityEnabled"] = "isLiveboardPermissionV2Enabled";
3140
3125
  Param["SpotterEnabled"] = "isSpotterExperienceEnabled";
3141
3126
  Param["IsUnifiedSearchExperienceEnabled"] = "isUnifiedSearchExperienceEnabled";
3142
3127
  Param["OverrideOrgId"] = "orgId";
@@ -3153,7 +3138,9 @@ var Param;
3153
3138
  Param["RootMarginForLazyLoad"] = "rootMarginForLazyLoad";
3154
3139
  Param["LiveboardXLSXCSVDownload"] = "isLiveboardXLSXCSVDownloadEnabled";
3155
3140
  Param["isPNGInScheduledEmailsEnabled"] = "isPNGInScheduledEmailsEnabled";
3141
+ Param["isCentralizedLiveboardFilterUXEnabled"] = "isCentralizedLiveboardFilterUXEnabled";
3156
3142
  Param["isLinkParametersEnabled"] = "isLinkParametersEnabled";
3143
+ Param["EnablePastConversationsSidebar"] = "enablePastConversationsSidebar";
3157
3144
  })(Param || (Param = {}));
3158
3145
  /**
3159
3146
  * ThoughtSpot application pages include actions and menu commands
@@ -3266,7 +3253,7 @@ var Action;
3266
3253
  */
3267
3254
  Action["SchedulesList"] = "schedule-list";
3268
3255
  /**
3269
- * The **Share** action on a Liveboard, Answer, or Worksheet.
3256
+ * The **Share** action on a Liveboard, Answer, or Model.
3270
3257
  * Allows users to share an object with other users and groups.
3271
3258
  * @example
3272
3259
  * ```js
@@ -3724,7 +3711,7 @@ var Action;
3724
3711
  Action["AnswerChartSwitcher"] = "answerChartSwitcher";
3725
3712
  /**
3726
3713
  * The Favorites icon (*) for Answers,
3727
- * Liveboard, and data objects like Worksheet, Model,
3714
+ * Liveboard, and data objects like Model,
3728
3715
  * Tables and Views.
3729
3716
  * Allows adding an object to the user's favorites list.
3730
3717
  * @example
@@ -4458,6 +4445,16 @@ var Action;
4458
4445
  * @version SDK: 1.42.0 | ThoughtSpot Cloud: 10.14.0.cl
4459
4446
  */
4460
4447
  Action["RemoveAttachment"] = "removeAttachment";
4448
+ /**
4449
+ * The **Style panel** on a Liveboard.
4450
+ * Controls the visibility of the Liveboard style panel.
4451
+ * @example
4452
+ * ```js
4453
+ * hiddenActions: [Action.LiveboardStylePanel]
4454
+ * ```
4455
+ * @version SDK: 1.43.0 | ThoughtSpot Cloud: 10.15.0.cl
4456
+ */
4457
+ Action["LiveboardStylePanel"] = "liveboardStylePanel";
4461
4458
  })(Action || (Action = {}));
4462
4459
  var PrefetchFeatures;
4463
4460
  (function (PrefetchFeatures) {
@@ -4579,29 +4576,7 @@ var LogLevel;
4579
4576
  * @version SDK: 1.26.7 | ThoughtSpot Cloud: 9.10.0.cl
4580
4577
  */
4581
4578
  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 = {}));
4579
+ })(LogLevel || (LogLevel = {}));
4605
4580
 
4606
4581
  const logFunctions = {
4607
4582
  [LogLevel.SILENT]: () => undefined,
@@ -7364,20 +7339,9 @@ function isEmpty(value) {
7364
7339
 
7365
7340
  var isEmpty_1 = isEmpty;
7366
7341
 
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
7342
  const ERROR_MESSAGE = {
7379
7343
  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',
7344
+ SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND: 'Please select a Model to get started',
7381
7345
  LIVEBOARD_VIZ_ID_VALIDATION: 'Please select a Liveboard to embed.',
7382
7346
  TRIGGER_TIMED_OUT: 'Trigger timed-out in getting a response',
7383
7347
  SEARCHEMBED_BETA_WRANING_MESSAGE: 'SearchEmbed is in Beta in this release.',
@@ -8306,7 +8270,7 @@ class AnswerService {
8306
8270
  async getTML() {
8307
8271
  const { object } = await this.executeQuery(getAnswerTML, {});
8308
8272
  const edoc = object[0].edoc;
8309
- const YAML = await import('./index-CFNZIcKr.js');
8273
+ const YAML = await import('./index-CjbriUI0.js');
8310
8274
  const parsedDoc = YAML.parse(edoc);
8311
8275
  return {
8312
8276
  answer: {
@@ -9827,6 +9791,14 @@ const getCustomActions = (customActions) => {
9827
9791
  finalValidActions.push(action);
9828
9792
  }
9829
9793
  });
9794
+ // Step 4: Collect warnings for long custom action names
9795
+ const MAX_ACTION_NAME_LENGTH = 30;
9796
+ const warnings = finalValidActions
9797
+ .filter(action => action.name.length > MAX_ACTION_NAME_LENGTH)
9798
+ .map(action => `Custom action name '${action.name}' exceeds ${MAX_ACTION_NAME_LENGTH} characters. This may cause display or truncation issues in the UI.`);
9799
+ if (warnings.length > 0) {
9800
+ logger$3.warn(warnings);
9801
+ }
9830
9802
  const sortedActions = sortBy_1(finalValidActions, (a) => a.name.toLocaleLowerCase());
9831
9803
  return {
9832
9804
  actions: sortedActions,
@@ -17459,27 +17431,27 @@ function processAuthLogout(e, containerEl) {
17459
17431
  * @param thoughtSpotHost
17460
17432
  * @param containerEl
17461
17433
  */
17462
- function processEventData(type, eventData, thoughtSpotHost, containerEl) {
17434
+ function processEventData(type, e, thoughtSpotHost, containerEl) {
17463
17435
  switch (type) {
17464
17436
  case EmbedEvent.CustomAction:
17465
- return processCustomAction(eventData, thoughtSpotHost);
17437
+ return processCustomAction(e, thoughtSpotHost);
17466
17438
  case EmbedEvent.AuthInit:
17467
- return processAuthInit(eventData);
17439
+ return processAuthInit(e);
17468
17440
  case EmbedEvent.NoCookieAccess:
17469
- return processNoCookieAccess(eventData, containerEl);
17441
+ return processNoCookieAccess(e, containerEl);
17470
17442
  case EmbedEvent.AuthFailure:
17471
- return processAuthFailure(eventData, containerEl);
17443
+ return processAuthFailure(e, containerEl);
17472
17444
  case EmbedEvent.AuthLogout:
17473
- return processAuthLogout(eventData, containerEl);
17445
+ return processAuthLogout(e, containerEl);
17474
17446
  case EmbedEvent.ExitPresentMode:
17475
17447
  return processExitPresentMode();
17476
17448
  case EmbedEvent.CLEAR_INFO_CACHE:
17477
17449
  return processClearInfoCache();
17478
17450
  }
17479
- return eventData;
17451
+ return e;
17480
17452
  }
17481
17453
 
17482
- var name="@thoughtspot/visual-embed-sdk";var version$1="1.42.1-alpha.6";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 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};
17454
+ 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};
17483
17455
 
17484
17456
  /**
17485
17457
  * Reloads the ThoughtSpot iframe.
@@ -17551,6 +17523,16 @@ function processTrigger(iFrame, messageType, thoughtSpotHost, data) {
17551
17523
  });
17552
17524
  }
17553
17525
 
17526
+ var UIPassthroughEvent;
17527
+ (function (UIPassthroughEvent) {
17528
+ UIPassthroughEvent["PinAnswerToLiveboard"] = "addVizToPinboard";
17529
+ UIPassthroughEvent["SaveAnswer"] = "saveAnswer";
17530
+ UIPassthroughEvent["GetDiscoverabilityStatus"] = "getDiscoverabilityStatus";
17531
+ UIPassthroughEvent["GetAvailableUIPassthroughs"] = "getAvailableUiPassthroughs";
17532
+ UIPassthroughEvent["GetAnswerConfig"] = "getAnswerPageConfig";
17533
+ UIPassthroughEvent["GetLiveboardConfig"] = "getPinboardPageConfig";
17534
+ })(UIPassthroughEvent || (UIPassthroughEvent = {}));
17535
+
17554
17536
  class HostEventClient {
17555
17537
  constructor(iFrame) {
17556
17538
  this.iFrame = iFrame;
@@ -17642,109 +17624,6 @@ class HostEventClient {
17642
17624
  }
17643
17625
  }
17644
17626
 
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;
17730
- const payloadToSend = {
17731
- execute: (_a = payload === null || payload === void 0 ? void 0 : payload.data) === null || _a === void 0 ? void 0 : _a.execute,
17732
- response: {
17733
- body: {
17734
- errors: [
17735
- {
17736
- title: (_b = payload === null || payload === void 0 ? void 0 : payload.data) === null || _b === void 0 ? void 0 : _b.errorText,
17737
- message: (_c = payload === null || payload === void 0 ? void 0 : payload.data) === null || _c === void 0 ? void 0 : _c.errorDescription,
17738
- isUserError: true,
17739
- },
17740
- ],
17741
- data: {},
17742
- },
17743
- },
17744
- };
17745
- return { data: payloadToSend };
17746
- };
17747
-
17748
17627
  /**
17749
17628
  * Copyright (c) 2022
17750
17629
  *
@@ -17798,27 +17677,6 @@ class TsEmbed {
17798
17677
  */
17799
17678
  this.fullscreenChangeHandler = null;
17800
17679
  this.subscribedListeners = {};
17801
- this.messageEventListener = async (event) => {
17802
- const eventType = this.getEventType(event);
17803
- const eventPort = this.getEventPort(event);
17804
- const eventData = this.formatEventData(event, eventType);
17805
- if (event.source === this.iFrame.contentWindow) {
17806
- const processedEventData = await processEventData(eventType, eventData, this.thoughtSpotHost, this.isPreRendered ? this.preRenderWrapper : this.el);
17807
- const executeEvent = (_eventType, data) => {
17808
- this.executeCallbacks(_eventType, data, eventPort);
17809
- };
17810
- if (eventType === EmbedEvent.ApiIntercept && this.viewConfig.enableApiIntercept) {
17811
- const getUnsavedAnswerTml = async (props) => {
17812
- var _a;
17813
- const response = await this.triggerUIPassThrough(UIPassthroughEvent.GetUnsavedAnswerTML, props);
17814
- return (_a = response[0]) === null || _a === void 0 ? void 0 : _a.value;
17815
- };
17816
- handleInterceptEvent({ eventData: processedEventData, executeEvent, embedConfig: this.embedConfig, viewConfig: this.viewConfig, getUnsavedAnswerTml });
17817
- return;
17818
- }
17819
- this.executeCallbacks(eventType, processedEventData, eventPort);
17820
- }
17821
- };
17822
17680
  /**
17823
17681
  * Send Custom style as part of payload of APP_INIT
17824
17682
  * @param _
@@ -17903,18 +17761,6 @@ class TsEmbed {
17903
17761
  this.on(EmbedEvent.AuthInit, authInitHandler, { start: false }, true);
17904
17762
  };
17905
17763
  this.showPreRenderByDefault = false;
17906
- this.createEmbedEventResponder = (eventPort, eventType) => {
17907
- const { enableApiIntercept } = getInterceptInitData(this.embedConfig, this.viewConfig);
17908
- if (eventType === EmbedEvent.OnBeforeGetVizDataIntercept && enableApiIntercept) {
17909
- return (payload) => {
17910
- const payloadToSend = processLegacyInterceptResponse(payload);
17911
- this.triggerEventOnPort(eventPort, payloadToSend);
17912
- };
17913
- }
17914
- return (payload) => {
17915
- this.triggerEventOnPort(eventPort, payload);
17916
- };
17917
- };
17918
17764
  /**
17919
17765
  * @hidden
17920
17766
  * Internal state to track if the embed container is loaded.
@@ -18100,8 +17946,16 @@ class TsEmbed {
18100
17946
  */
18101
17947
  subscribeToMessageEvents() {
18102
17948
  this.unsubscribeToMessageEvents();
18103
- window.addEventListener('message', this.messageEventListener);
18104
- this.subscribedListeners.message = this.messageEventListener;
17949
+ const messageEventListener = (event) => {
17950
+ const eventType = this.getEventType(event);
17951
+ const eventPort = this.getEventPort(event);
17952
+ const eventData = this.formatEventData(event, eventType);
17953
+ if (event.source === this.iFrame.contentWindow) {
17954
+ this.executeCallbacks(eventType, processEventData(eventType, eventData, this.thoughtSpotHost, this.isPreRendered ? this.preRenderWrapper : this.el), eventPort);
17955
+ }
17956
+ };
17957
+ window.addEventListener('message', messageEventListener);
17958
+ this.subscribedListeners.message = messageEventListener;
18105
17959
  }
18106
17960
  /**
18107
17961
  * Adds event listeners for both network and message events.
@@ -18162,7 +18016,7 @@ class TsEmbed {
18162
18016
  message: customActionsResult.errors,
18163
18017
  });
18164
18018
  }
18165
- const baseInitData = {
18019
+ return {
18166
18020
  customisations: getCustomisations(this.embedConfig, this.viewConfig),
18167
18021
  authToken,
18168
18022
  runtimeFilterParams: this.viewConfig.excludeRuntimeFiltersfromURL
@@ -18180,9 +18034,7 @@ class TsEmbed {
18180
18034
  customVariablesForThirdPartyTools: this.embedConfig.customVariablesForThirdPartyTools || {},
18181
18035
  hiddenListColumns: this.viewConfig.hiddenListColumns || [],
18182
18036
  customActions: customActionsResult.actions,
18183
- ...getInterceptInitData(this.embedConfig, this.viewConfig),
18184
18037
  };
18185
- return baseInitData;
18186
18038
  }
18187
18039
  async getAppInitData() {
18188
18040
  return this.getDefaultAppInitData();
@@ -18611,8 +18463,9 @@ class TsEmbed {
18611
18463
  // When start status is false it trigger only end releated
18612
18464
  // payload
18613
18465
  || (!callbackObj.options.start && dataStatus === embedEventStatus.END)) {
18614
- const responder = this.createEmbedEventResponder(eventPort, eventType);
18615
- callbackObj.callback(data, responder);
18466
+ callbackObj.callback(data, (payload) => {
18467
+ this.triggerEventOnPort(eventPort, payload);
18468
+ });
18616
18469
  }
18617
18470
  });
18618
18471
  }
@@ -19396,8 +19249,7 @@ let SearchEmbed$1 = class SearchEmbed extends TsEmbed {
19396
19249
  if (hideSearchBar) {
19397
19250
  queryParams[Param.HideSearchBar] = true;
19398
19251
  }
19399
- const { enableApiIntercept } = getInterceptInitData(this.embedConfig, this.viewConfig);
19400
- if (isOnBeforeGetVizDataInterceptEnabled && !enableApiIntercept) {
19252
+ if (isOnBeforeGetVizDataInterceptEnabled) {
19401
19253
  queryParams[Param.IsOnBeforeGetVizDataInterceptEnabled] = isOnBeforeGetVizDataInterceptEnabled;
19402
19254
  }
19403
19255
  if (!focusSearchBarOnRender) {
@@ -19658,7 +19510,7 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
19658
19510
  * embedded Liveboard or visualization.
19659
19511
  */
19660
19512
  getEmbedParams() {
19661
- 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;
19513
+ 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;
19662
19514
  let params = {};
19663
19515
  params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
19664
19516
  params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
@@ -19670,6 +19522,7 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
19670
19522
  params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
19671
19523
  params[Param.IsFullAppEmbed] = true;
19672
19524
  params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
19525
+ params[Param.IsEnhancedFilterInteractivityEnabled] = isEnhancedFilterInteractivityEnabled;
19673
19526
  params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;
19674
19527
  params[Param.ShowLiveboardReverifyBanner] = showLiveboardReverifyBanner;
19675
19528
  params[Param.HideIrrelevantFiltersInTab] = hideIrrelevantChipsInLiveboardTabs;
@@ -19711,8 +19564,7 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
19711
19564
  if (enableAskSage) {
19712
19565
  params[Param.enableAskSage] = enableAskSage;
19713
19566
  }
19714
- const { enableApiIntercept } = getInterceptInitData(this.embedConfig, this.viewConfig);
19715
- if (isOnBeforeGetVizDataInterceptEnabled && !enableApiIntercept) {
19567
+ if (isOnBeforeGetVizDataInterceptEnabled) {
19716
19568
  params[Param.IsOnBeforeGetVizDataInterceptEnabled] = isOnBeforeGetVizDataInterceptEnabled;
19717
19569
  }
19718
19570
  if (homePageSearchBarMode) {
@@ -19727,9 +19579,15 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
19727
19579
  if (isPNGInScheduledEmailsEnabled !== undefined) {
19728
19580
  params[Param.isPNGInScheduledEmailsEnabled] = isPNGInScheduledEmailsEnabled;
19729
19581
  }
19582
+ if (hideTagFilterChips !== undefined) {
19583
+ params[Param.HideTagFilterChips] = hideTagFilterChips;
19584
+ }
19730
19585
  if (isLinkParametersEnabled !== undefined) {
19731
19586
  params[Param.isLinkParametersEnabled] = isLinkParametersEnabled;
19732
19587
  }
19588
+ if (isCentralizedLiveboardFilterUXEnabled != undefined) {
19589
+ params[Param.isCentralizedLiveboardFilterUXEnabled] = isCentralizedLiveboardFilterUXEnabled;
19590
+ }
19733
19591
  params[Param.DataPanelV2Enabled] = dataPanelV2;
19734
19592
  params[Param.HideHomepageLeftNav] = hideHomepageLeftNav;
19735
19593
  params[Param.ModularHomeExperienceEnabled] = modularHomeExperience;
@@ -20084,7 +19942,7 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
20084
19942
  getEmbedParamsObject() {
20085
19943
  let params = {};
20086
19944
  params = this.getBaseQueryParams(params);
20087
- 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;
19945
+ 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;
20088
19946
  const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
20089
19947
  || this.viewConfig.preventPinboardFilterRemoval;
20090
19948
  if (fullHeight === true) {
@@ -20152,11 +20010,15 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
20152
20010
  if (isLinkParametersEnabled !== undefined) {
20153
20011
  params[Param.isLinkParametersEnabled] = isLinkParametersEnabled;
20154
20012
  }
20013
+ if (isCentralizedLiveboardFilterUXEnabled !== undefined) {
20014
+ params[Param.isCentralizedLiveboardFilterUXEnabled] = isCentralizedLiveboardFilterUXEnabled;
20015
+ }
20155
20016
  params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
20156
20017
  params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
20157
20018
  params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;
20158
20019
  params[Param.ShowLiveboardReverifyBanner] = showLiveboardReverifyBanner;
20159
20020
  params[Param.HideIrrelevantFiltersInTab] = hideIrrelevantChipsInLiveboardTabs;
20021
+ params[Param.IsEnhancedFilterInteractivityEnabled] = isEnhancedFilterInteractivityEnabled;
20160
20022
  params[Param.DataPanelV2Enabled] = dataPanelV2;
20161
20023
  params[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
20162
20024
  params[Param.CoverAndFilterOptionInPDF] = coverAndFilterOptionInPDF;
@@ -20887,7 +20749,7 @@ let SpotterEmbed$1 = class SpotterEmbed extends TsEmbed {
20887
20749
  this.viewConfig = viewConfig;
20888
20750
  }
20889
20751
  getEmbedParamsObject() {
20890
- const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, } = this.viewConfig;
20752
+ const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, enablePastConversationsSidebar, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, } = this.viewConfig;
20891
20753
  if (!worksheetId) {
20892
20754
  this.handleError(ERROR_MESSAGE.SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND);
20893
20755
  }
@@ -20911,9 +20773,12 @@ let SpotterEmbed$1 = class SpotterEmbed extends TsEmbed {
20911
20773
  return queryParams;
20912
20774
  }
20913
20775
  getIframeSrc() {
20914
- const { worksheetId, searchOptions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, } = this.viewConfig;
20776
+ const { worksheetId, searchOptions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, enablePastConversationsSidebar } = this.viewConfig;
20915
20777
  const path = 'insights/conv-assist';
20916
20778
  const queryParams = this.getEmbedParamsObject();
20779
+ if (!isUndefined_1(enablePastConversationsSidebar)) {
20780
+ queryParams[Param.EnablePastConversationsSidebar] = !!enablePastConversationsSidebar;
20781
+ }
20917
20782
  let query = '';
20918
20783
  const queryParamsString = getQueryParamString(queryParams, true);
20919
20784
  if (queryParamsString) {