@thoughtspot/visual-embed-sdk 1.46.5-beta.1 → 1.46.5

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 (180) hide show
  1. package/cjs/package.json +4 -4
  2. package/cjs/src/css-variables.d.ts +36 -0
  3. package/cjs/src/css-variables.d.ts.map +1 -1
  4. package/cjs/src/embed/app.d.ts +41 -2
  5. package/cjs/src/embed/app.d.ts.map +1 -1
  6. package/cjs/src/embed/app.js +26 -46
  7. package/cjs/src/embed/app.js.map +1 -1
  8. package/cjs/src/embed/app.spec.js +36 -69
  9. package/cjs/src/embed/app.spec.js.map +1 -1
  10. package/cjs/src/embed/conversation.d.ts +23 -1
  11. package/cjs/src/embed/conversation.d.ts.map +1 -1
  12. package/cjs/src/embed/conversation.js +18 -33
  13. package/cjs/src/embed/conversation.js.map +1 -1
  14. package/cjs/src/embed/conversation.spec.js +129 -97
  15. package/cjs/src/embed/conversation.spec.js.map +1 -1
  16. package/cjs/src/embed/hostEventClient/contracts.d.ts +31 -0
  17. package/cjs/src/embed/hostEventClient/contracts.d.ts.map +1 -1
  18. package/cjs/src/embed/hostEventClient/contracts.js +2 -0
  19. package/cjs/src/embed/hostEventClient/contracts.js.map +1 -1
  20. package/cjs/src/embed/hostEventClient/host-event-client.d.ts +18 -0
  21. package/cjs/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
  22. package/cjs/src/embed/hostEventClient/host-event-client.js +69 -9
  23. package/cjs/src/embed/hostEventClient/host-event-client.js.map +1 -1
  24. package/cjs/src/embed/hostEventClient/host-event-client.spec.js +185 -19
  25. package/cjs/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
  26. package/cjs/src/embed/hostEventClient/utils.d.ts +22 -0
  27. package/cjs/src/embed/hostEventClient/utils.d.ts.map +1 -0
  28. package/cjs/src/embed/hostEventClient/utils.js +51 -0
  29. package/cjs/src/embed/hostEventClient/utils.js.map +1 -0
  30. package/cjs/src/embed/hostEventClient/utils.spec.d.ts +2 -0
  31. package/cjs/src/embed/hostEventClient/utils.spec.d.ts.map +1 -0
  32. package/cjs/src/embed/hostEventClient/utils.spec.js +115 -0
  33. package/cjs/src/embed/hostEventClient/utils.spec.js.map +1 -0
  34. package/cjs/src/embed/liveboard.d.ts +18 -1
  35. package/cjs/src/embed/liveboard.d.ts.map +1 -1
  36. package/cjs/src/embed/liveboard.js +9 -11
  37. package/cjs/src/embed/liveboard.js.map +1 -1
  38. package/cjs/src/embed/liveboard.spec.js +29 -71
  39. package/cjs/src/embed/liveboard.spec.js.map +1 -1
  40. package/cjs/src/embed/spotter-utils.d.ts +20 -0
  41. package/cjs/src/embed/spotter-utils.d.ts.map +1 -0
  42. package/cjs/src/embed/spotter-utils.js +52 -0
  43. package/cjs/src/embed/spotter-utils.js.map +1 -0
  44. package/cjs/src/embed/spotter-utils.spec.d.ts +2 -0
  45. package/cjs/src/embed/spotter-utils.spec.d.ts.map +1 -0
  46. package/cjs/src/embed/spotter-utils.spec.js +54 -0
  47. package/cjs/src/embed/spotter-utils.spec.js.map +1 -0
  48. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  49. package/cjs/src/embed/ts-embed.js +13 -1
  50. package/cjs/src/embed/ts-embed.js.map +1 -1
  51. package/cjs/src/errors.d.ts +2 -0
  52. package/cjs/src/errors.d.ts.map +1 -1
  53. package/cjs/src/errors.js +2 -0
  54. package/cjs/src/errors.js.map +1 -1
  55. package/cjs/src/types.d.ts +102 -1
  56. package/cjs/src/types.d.ts.map +1 -1
  57. package/cjs/src/types.js +101 -0
  58. package/cjs/src/types.js.map +1 -1
  59. package/cjs/src/utils.d.ts +0 -9
  60. package/cjs/src/utils.d.ts.map +1 -1
  61. package/cjs/src/utils.js +1 -10
  62. package/cjs/src/utils.js.map +1 -1
  63. package/dist/index-ChNydfIz.js +7371 -0
  64. package/dist/index-DGV_zh53.js +7371 -0
  65. package/dist/src/css-variables.d.ts +36 -0
  66. package/dist/src/css-variables.d.ts.map +1 -1
  67. package/dist/src/embed/app.d.ts +41 -2
  68. package/dist/src/embed/app.d.ts.map +1 -1
  69. package/dist/src/embed/conversation.d.ts +23 -1
  70. package/dist/src/embed/conversation.d.ts.map +1 -1
  71. package/dist/src/embed/hostEventClient/contracts.d.ts +31 -0
  72. package/dist/src/embed/hostEventClient/contracts.d.ts.map +1 -1
  73. package/dist/src/embed/hostEventClient/host-event-client.d.ts +18 -0
  74. package/dist/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
  75. package/dist/src/embed/hostEventClient/utils.d.ts +22 -0
  76. package/dist/src/embed/hostEventClient/utils.d.ts.map +1 -0
  77. package/dist/src/embed/hostEventClient/utils.spec.d.ts +2 -0
  78. package/dist/src/embed/hostEventClient/utils.spec.d.ts.map +1 -0
  79. package/dist/src/embed/liveboard.d.ts +18 -1
  80. package/dist/src/embed/liveboard.d.ts.map +1 -1
  81. package/dist/src/embed/spotter-utils.d.ts +20 -0
  82. package/dist/src/embed/spotter-utils.d.ts.map +1 -0
  83. package/dist/src/embed/spotter-utils.spec.d.ts +2 -0
  84. package/dist/src/embed/spotter-utils.spec.d.ts.map +1 -0
  85. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  86. package/dist/src/errors.d.ts +2 -0
  87. package/dist/src/errors.d.ts.map +1 -1
  88. package/dist/src/types.d.ts +102 -1
  89. package/dist/src/types.d.ts.map +1 -1
  90. package/dist/src/utils.d.ts +0 -9
  91. package/dist/src/utils.d.ts.map +1 -1
  92. package/dist/tsembed-react.es.js +324 -110
  93. package/dist/tsembed-react.js +323 -109
  94. package/dist/tsembed.es.js +324 -110
  95. package/dist/tsembed.js +323 -109
  96. package/dist/visual-embed-sdk-react-full.d.ts +266 -3
  97. package/dist/visual-embed-sdk-react.d.ts +266 -3
  98. package/dist/visual-embed-sdk.d.ts +266 -3
  99. package/lib/package.json +4 -4
  100. package/lib/src/css-variables.d.ts +36 -0
  101. package/lib/src/css-variables.d.ts.map +1 -1
  102. package/lib/src/embed/app.d.ts +41 -2
  103. package/lib/src/embed/app.d.ts.map +1 -1
  104. package/lib/src/embed/app.js +28 -48
  105. package/lib/src/embed/app.js.map +1 -1
  106. package/lib/src/embed/app.spec.js +36 -69
  107. package/lib/src/embed/app.spec.js.map +1 -1
  108. package/lib/src/embed/conversation.d.ts +23 -1
  109. package/lib/src/embed/conversation.d.ts.map +1 -1
  110. package/lib/src/embed/conversation.js +19 -34
  111. package/lib/src/embed/conversation.js.map +1 -1
  112. package/lib/src/embed/conversation.spec.js +131 -99
  113. package/lib/src/embed/conversation.spec.js.map +1 -1
  114. package/lib/src/embed/hostEventClient/contracts.d.ts +31 -0
  115. package/lib/src/embed/hostEventClient/contracts.d.ts.map +1 -1
  116. package/lib/src/embed/hostEventClient/contracts.js +2 -0
  117. package/lib/src/embed/hostEventClient/contracts.js.map +1 -1
  118. package/lib/src/embed/hostEventClient/host-event-client.d.ts +18 -0
  119. package/lib/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
  120. package/lib/src/embed/hostEventClient/host-event-client.js +69 -9
  121. package/lib/src/embed/hostEventClient/host-event-client.js.map +1 -1
  122. package/lib/src/embed/hostEventClient/host-event-client.spec.js +185 -19
  123. package/lib/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
  124. package/lib/src/embed/hostEventClient/utils.d.ts +22 -0
  125. package/lib/src/embed/hostEventClient/utils.d.ts.map +1 -0
  126. package/lib/src/embed/hostEventClient/utils.js +43 -0
  127. package/lib/src/embed/hostEventClient/utils.js.map +1 -0
  128. package/lib/src/embed/hostEventClient/utils.spec.d.ts +2 -0
  129. package/lib/src/embed/hostEventClient/utils.spec.d.ts.map +1 -0
  130. package/lib/src/embed/hostEventClient/utils.spec.js +113 -0
  131. package/lib/src/embed/hostEventClient/utils.spec.js.map +1 -0
  132. package/lib/src/embed/liveboard.d.ts +18 -1
  133. package/lib/src/embed/liveboard.d.ts.map +1 -1
  134. package/lib/src/embed/liveboard.js +9 -11
  135. package/lib/src/embed/liveboard.js.map +1 -1
  136. package/lib/src/embed/liveboard.spec.js +29 -71
  137. package/lib/src/embed/liveboard.spec.js.map +1 -1
  138. package/lib/src/embed/spotter-utils.d.ts +20 -0
  139. package/lib/src/embed/spotter-utils.d.ts.map +1 -0
  140. package/lib/src/embed/spotter-utils.js +47 -0
  141. package/lib/src/embed/spotter-utils.js.map +1 -0
  142. package/lib/src/embed/spotter-utils.spec.d.ts +2 -0
  143. package/lib/src/embed/spotter-utils.spec.d.ts.map +1 -0
  144. package/lib/src/embed/spotter-utils.spec.js +52 -0
  145. package/lib/src/embed/spotter-utils.spec.js.map +1 -0
  146. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  147. package/lib/src/embed/ts-embed.js +13 -1
  148. package/lib/src/embed/ts-embed.js.map +1 -1
  149. package/lib/src/errors.d.ts +2 -0
  150. package/lib/src/errors.d.ts.map +1 -1
  151. package/lib/src/errors.js +2 -0
  152. package/lib/src/errors.js.map +1 -1
  153. package/lib/src/types.d.ts +102 -1
  154. package/lib/src/types.d.ts.map +1 -1
  155. package/lib/src/types.js +101 -0
  156. package/lib/src/types.js.map +1 -1
  157. package/lib/src/utils.d.ts +0 -9
  158. package/lib/src/utils.d.ts.map +1 -1
  159. package/lib/src/utils.js +0 -8
  160. package/lib/src/utils.js.map +1 -1
  161. package/lib/src/visual-embed-sdk.d.ts +266 -3
  162. package/package.json +4 -4
  163. package/src/css-variables.ts +45 -0
  164. package/src/embed/app.spec.ts +51 -92
  165. package/src/embed/app.ts +60 -64
  166. package/src/embed/conversation.spec.ts +150 -119
  167. package/src/embed/conversation.ts +30 -54
  168. package/src/embed/hostEventClient/contracts.ts +31 -0
  169. package/src/embed/hostEventClient/host-event-client.spec.ts +260 -19
  170. package/src/embed/hostEventClient/host-event-client.ts +87 -11
  171. package/src/embed/hostEventClient/utils.spec.ts +137 -0
  172. package/src/embed/hostEventClient/utils.ts +61 -0
  173. package/src/embed/liveboard.spec.ts +38 -93
  174. package/src/embed/liveboard.ts +28 -10
  175. package/src/embed/spotter-utils.spec.ts +56 -0
  176. package/src/embed/spotter-utils.ts +65 -0
  177. package/src/embed/ts-embed.ts +15 -1
  178. package/src/errors.ts +2 -0
  179. package/src/types.ts +104 -0
  180. package/src/utils.ts +0 -14
@@ -1,4 +1,4 @@
1
- /* @thoughtspot/visual-embed-sdk version 1.46.5-beta.1 */
1
+ /* @thoughtspot/visual-embed-sdk version 1.46.5 */
2
2
  'use client';
3
3
  import * as React from 'react';
4
4
  import React__default, { useRef, useCallback } from 'react';
@@ -1061,6 +1061,17 @@ var EmbedEvent;
1061
1061
  * ```
1062
1062
  */
1063
1063
  EmbedEvent["DownloadAsXlsx"] = "downloadAsXlsx";
1064
+ /**
1065
+ * Emitted when the Download Liveboard as Continuous PDF action is triggered
1066
+ * on a Liveboard.
1067
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
1068
+ * @example
1069
+ * ```js
1070
+ * liveboardEmbed.on(EmbedEvent.DownloadLiveboardAsContinuousPDF, payload => {
1071
+ * console.log('download liveboard as continuous PDF', payload)})
1072
+ * ```
1073
+ */
1074
+ EmbedEvent["DownloadLiveboardAsContinuousPDF"] = "downloadLiveboardAsContinuousPDF";
1064
1075
  /**
1065
1076
  * Emitted when an Answer is deleted in the app
1066
1077
  * Use start:true to subscribe to when delete is initiated, or end:true to subscribe
@@ -2589,6 +2600,18 @@ var HostEvent;
2589
2600
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2590
2601
  */
2591
2602
  HostEvent["DownloadAsPdf"] = "downloadAsPdf";
2603
+ /**
2604
+ * Trigger the **Download Liveboard as Continuous PDF** action on an
2605
+ * embedded Liveboard.
2606
+ *
2607
+ * @example
2608
+ * ```js
2609
+ * liveboardEmbed.trigger(HostEvent.DownloadLiveboardAsContinuousPDF)
2610
+ * ```
2611
+ *
2612
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
2613
+ */
2614
+ HostEvent["DownloadLiveboardAsContinuousPDF"] = "downloadLiveboardAsContinuousPDF";
2592
2615
  /**
2593
2616
  * Trigger the **AI Highlights** action on an embedded Liveboard
2594
2617
  *
@@ -2815,6 +2838,20 @@ var HostEvent;
2815
2838
  * vizId: '730496d6-6903-4601-937e-2c691821af3c'
2816
2839
  * }, ContextType.Liveboard);
2817
2840
  * ```
2841
+ * @example
2842
+ * ```js
2843
+ * // Copy link from liveboard context
2844
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2845
+ * liveboardEmbed.trigger(HostEvent.CopyLink, {}, ContextType.Liveboard);
2846
+ * ```
2847
+ * @example
2848
+ * ```js
2849
+ * // Copy link from liveboard visualization context
2850
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2851
+ * liveboardEmbed.trigger(HostEvent.CopyLink, {
2852
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
2853
+ * }, ContextType.Liveboard);
2854
+ * ```
2818
2855
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2819
2856
  */
2820
2857
  HostEvent["CopyLink"] = "embedDocument";
@@ -2846,6 +2883,20 @@ var HostEvent;
2846
2883
  * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2847
2884
  * liveboardEmbed.trigger(HostEvent.Present, {}, ContextType.Liveboard);
2848
2885
  * ```
2886
+ * @example
2887
+ * ```js
2888
+ * // Present from liveboard visualization context
2889
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2890
+ * liveboardEmbed.trigger(HostEvent.Present, {
2891
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
2892
+ * }, ContextType.Liveboard);
2893
+ * ```
2894
+ * @example
2895
+ * ```js
2896
+ * // Present from liveboard context
2897
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2898
+ * liveboardEmbed.trigger(HostEvent.Present, {}, ContextType.Liveboard);
2899
+ * ```
2849
2900
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2850
2901
  */
2851
2902
  HostEvent["Present"] = "present";
@@ -4143,6 +4194,7 @@ var Param;
4143
4194
  Param["IsLazyLoadingForEmbedEnabled"] = "isLazyLoadingForEmbedEnabled";
4144
4195
  Param["RootMarginForLazyLoad"] = "rootMarginForLazyLoad";
4145
4196
  Param["isPNGInScheduledEmailsEnabled"] = "isPNGInScheduledEmailsEnabled";
4197
+ Param["IsWYSIWYGLiveboardPDFEnabled"] = "isWYSIWYGLiveboardPDFEnabled";
4146
4198
  Param["isLiveboardXLSXCSVDownloadEnabled"] = "isLiveboardXLSXCSVDownloadEnabled";
4147
4199
  Param["isGranularXLSXCSVSchedulesEnabled"] = "isGranularXLSXCSVSchedulesEnabled";
4148
4200
  Param["isCentralizedLiveboardFilterUXEnabled"] = "isCentralizedLiveboardFilterUXEnabled";
@@ -4487,6 +4539,16 @@ var Action;
4487
4539
  * @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl
4488
4540
  */
4489
4541
  Action["DownloadLiveboard"] = "downloadLiveboard";
4542
+ /**
4543
+ * The **Download Liveboard as Continuous PDF** menu action on a Liveboard.
4544
+ * Allows downloading the entire Liveboard as a continuous PDF.
4545
+ * @example
4546
+ * ```js
4547
+ * disabledActions: [Action.DownloadLiveboardAsContinuousPDF]
4548
+ * ```
4549
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
4550
+ */
4551
+ Action["DownloadLiveboardAsContinuousPDF"] = "downloadLiveboardAsContinuousPDF";
4490
4552
  /**
4491
4553
  * @hidden
4492
4554
  */
@@ -5704,6 +5766,39 @@ var Action;
5704
5766
  * @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
5705
5767
  */
5706
5768
  Action["SpotterDocs"] = "spotterDocs";
5769
+ /**
5770
+ * Controls visibility and disable state of the connector resources
5771
+ * section in the Spotter chat interface.
5772
+ * @example
5773
+ * ```js
5774
+ * hiddenActions: [Action.SpotterChatConnectorResources]
5775
+ * disabledActions: [Action.SpotterChatConnectorResources]
5776
+ * ```
5777
+ * @version SDK: 1.48.0 | ThoughtSpot Cloud: 26.5.0.cl
5778
+ */
5779
+ Action["SpotterChatConnectorResources"] = "spotterChatConnectorResources";
5780
+ /**
5781
+ * Controls visibility and disable state of the connectors
5782
+ * in the Spotter chat interface.
5783
+ * @example
5784
+ * ```js
5785
+ * hiddenActions: [Action.SpotterChatConnectors]
5786
+ * disabledActions: [Action.SpotterChatConnectors]
5787
+ * ```
5788
+ * @version SDK: 1.48.0 | ThoughtSpot Cloud: 26.5.0.cl
5789
+ */
5790
+ Action["SpotterChatConnectors"] = "spotterChatConnectors";
5791
+ /**
5792
+ * Controls visibility and disable state of the mode switcher
5793
+ * in the Spotter chat interface.
5794
+ * @example
5795
+ * ```js
5796
+ * hiddenActions: [Action.SpotterChatModeSwitcher]
5797
+ * disabledActions: [Action.SpotterChatModeSwitcher]
5798
+ * ```
5799
+ * @version SDK: 1.48.0 | ThoughtSpot Cloud: 26.5.0.cl
5800
+ */
5801
+ Action["SpotterChatModeSwitcher"] = "spotterChatModeSwitcher";
5707
5802
  /**
5708
5803
  * The **Include current period** checkbox for date filters.
5709
5804
  * Controls the visibility and availability of the option to include
@@ -5997,6 +6092,12 @@ var EmbedErrorCodes;
5997
6092
  EmbedErrorCodes["UPDATE_PARAMS_FAILED"] = "UPDATE_PARAMS_FAILED";
5998
6093
  /** Invalid URL provided in configuration */
5999
6094
  EmbedErrorCodes["INVALID_URL"] = "INVALID_URL";
6095
+ /** Host event payload validation failed */
6096
+ EmbedErrorCodes["HOST_EVENT_VALIDATION"] = "HOST_EVENT_VALIDATION";
6097
+ /** UpdateFilters payload is invalid - missing or malformed filter/filters */
6098
+ EmbedErrorCodes["UPDATEFILTERS_INVALID_PAYLOAD"] = "UPDATEFILTERS_INVALID_PAYLOAD";
6099
+ /** DrillDown payload is invalid - missing or malformed points */
6100
+ EmbedErrorCodes["DRILLDOWN_INVALID_PAYLOAD"] = "DRILLDOWN_INVALID_PAYLOAD";
6000
6101
  })(EmbedErrorCodes || (EmbedErrorCodes = {}));
6001
6102
  /**
6002
6103
  * Context types for specifying the page context when triggering host events.
@@ -6158,6 +6259,8 @@ const ERROR_MESSAGE = {
6158
6259
  SSR_ENVIRONMENT_ERROR: 'SSR environment detected. This function cannot be called in SSR environment.',
6159
6260
  UPDATE_PARAMS_FAILED: 'Failed to update embed parameters',
6160
6261
  INVALID_SPOTTER_DOCUMENTATION_URL: 'Invalid spotterDocumentationUrl. Please provide a valid http or https URL.',
6262
+ UPDATEFILTERS_INVALID_PAYLOAD: 'UpdateFilters requires a valid filter or filters array. Expected: { filter: { column, oper, values } } or { filters: [{ column, oper, values }, ...] }',
6263
+ DRILLDOWN_INVALID_PAYLOAD: 'DrillDown requires a valid points object. Expected: { points: { clickedPoint?, selectedPoints? }, autoDrillDown?, vizId? }',
6161
6264
  };
6162
6265
  const CUSTOM_ACTIONS_ERROR_MESSAGE = {
6163
6266
  INVALID_ACTION_OBJECT: 'Custom Action Validation Error: Invalid action object provided',
@@ -6661,14 +6764,6 @@ const validateHttpUrl = (url) => {
6661
6764
  return [false, error instanceof Error ? error : new Error(String(error))];
6662
6765
  }
6663
6766
  };
6664
- /**
6665
- * Resolves enablePastConversationsSidebar with
6666
- * spotterSidebarConfig taking precedence over the
6667
- * standalone flag.
6668
- */
6669
- const resolveEnablePastConversationsSidebar = (params) => (params.spotterSidebarConfigValue !== undefined
6670
- ? params.spotterSidebarConfigValue
6671
- : params.standaloneValue);
6672
6767
  /**
6673
6768
  * Sets a query parameter if the value is defined.
6674
6769
  * @param queryParams - The query params object to modify
@@ -8965,6 +9060,8 @@ var UIPassthroughEvent;
8965
9060
  UIPassthroughEvent["GetAnswerConfig"] = "getAnswerPageConfig";
8966
9061
  UIPassthroughEvent["GetLiveboardConfig"] = "getPinboardPageConfig";
8967
9062
  UIPassthroughEvent["GetUnsavedAnswerTML"] = "getUnsavedAnswerTML";
9063
+ UIPassthroughEvent["UpdateFilters"] = "updateFilters";
9064
+ UIPassthroughEvent["Drilldown"] = "drillDown";
8968
9065
  UIPassthroughEvent["GetAnswerSession"] = "getAnswerSession";
8969
9066
  UIPassthroughEvent["GetFilters"] = "getFilters";
8970
9067
  UIPassthroughEvent["GetIframeUrl"] = "getIframeUrl";
@@ -9903,7 +10000,7 @@ class AnswerService {
9903
10000
  async getTML() {
9904
10001
  const { object } = await this.executeQuery(getAnswerTML, {});
9905
10002
  const edoc = object[0].edoc;
9906
- const YAML = await import('./index-DW2wEHqy.js');
10003
+ const YAML = await import('./index-ChNydfIz.js');
9907
10004
  const parsedDoc = YAML.parse(edoc);
9908
10005
  return {
9909
10006
  answer: {
@@ -19206,10 +19303,60 @@ function processEventData(type, eventData, thoughtSpotHost, containerEl) {
19206
19303
  return eventData;
19207
19304
  }
19208
19305
 
19209
- var name="@thoughtspot/visual-embed-sdk";var version$1="1.46.5-beta.1";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 && node dts-config/wrap-ambient-module.mjs","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 || echo 'Warning: Coveralls upload failed but not breaking the build.'","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.23","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":"^30.0.0","@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":"^30.2.0","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:"^30.2.0","jest-environment-jsdom":"^29.7.0","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":"^29.4.6","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};
19306
+ var name="@thoughtspot/visual-embed-sdk";var version$1="1.46.5";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 && node dts-config/wrap-ambient-module.mjs","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 || echo 'Warning: Coveralls upload failed but not breaking the build.'","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.23","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":"^30.0.0","@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":"^30.2.0","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:"^30.2.0","jest-environment-jsdom":"^29.7.0","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.59.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^29.4.6","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:"34 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};
19307
+
19308
+ function isValidUpdateFiltersPayload(payload) {
19309
+ if (!payload)
19310
+ return false;
19311
+ const isValidFilter = (f) => !!f && typeof f.column === 'string' && typeof f.oper === 'string' && Array.isArray(f.values);
19312
+ const hasValidFilter = payload.filter && isValidFilter(payload.filter);
19313
+ const hasValidFilters = Array.isArray(payload.filters) && payload.filters.length > 0 && payload.filters.every(isValidFilter);
19314
+ return !!(hasValidFilter || hasValidFilters);
19315
+ }
19316
+ function isValidDrillDownPayload(payload) {
19317
+ if (!payload)
19318
+ return false;
19319
+ const points = payload.points;
19320
+ if (!points || typeof points !== 'object')
19321
+ return false;
19322
+ const hasClickedPoint = 'clickedPoint' in points && points.clickedPoint != null;
19323
+ const hasSelectedPoints = Array.isArray(points.selectedPoints) && points.selectedPoints.length > 0;
19324
+ return hasClickedPoint || hasSelectedPoints;
19325
+ }
19326
+ function createValidationError(message) {
19327
+ const err = new Error(message);
19328
+ err.isValidationError = true;
19329
+ err.embedErrorDetails = {
19330
+ type: EmbedEvent.Error,
19331
+ data: {
19332
+ errorType: ErrorDetailsTypes.VALIDATION_ERROR,
19333
+ message,
19334
+ code: EmbedErrorCodes.HOST_EVENT_VALIDATION,
19335
+ error: message
19336
+ },
19337
+ status: embedEventStatus.END
19338
+ };
19339
+ throw err;
19340
+ }
19341
+ function throwUpdateFiltersValidationError() {
19342
+ createValidationError(ERROR_MESSAGE.UPDATEFILTERS_INVALID_PAYLOAD);
19343
+ }
19344
+ function throwDrillDownValidationError() {
19345
+ createValidationError(ERROR_MESSAGE.DRILLDOWN_INVALID_PAYLOAD);
19346
+ }
19210
19347
 
19211
- /** Host events that use getDataWithPassthroughFallback (getter-style APIs) */
19212
- const HOST_EVENT_PASSTHROUGH_MAP = {
19348
+ /**
19349
+ * Maps HostEvent to its corresponding UIPassthroughEvent.
19350
+ * Includes both custom-handler events (Pin, SaveAnswer, UpdateFilters, DrillDown)
19351
+ * and getter events (GetAnswerSession, GetFilters, etc.) that use getDataWithPassthroughFallback.
19352
+ */
19353
+ const PASSTHROUGH_MAP = {
19354
+ // Custom handlers (setters with special logic)
19355
+ [HostEvent.Pin]: UIPassthroughEvent.PinAnswerToLiveboard,
19356
+ [HostEvent.SaveAnswer]: UIPassthroughEvent.SaveAnswer,
19357
+ [HostEvent.UpdateFilters]: UIPassthroughEvent.UpdateFilters,
19358
+ [HostEvent.DrillDown]: UIPassthroughEvent.Drilldown,
19359
+ // Getters (use getDataWithPassthroughFallback)
19213
19360
  [HostEvent.GetAnswerSession]: UIPassthroughEvent.GetAnswerSession,
19214
19361
  [HostEvent.GetFilters]: UIPassthroughEvent.GetFilters,
19215
19362
  [HostEvent.GetIframeUrl]: UIPassthroughEvent.GetIframeUrl,
@@ -19220,10 +19367,14 @@ const HOST_EVENT_PASSTHROUGH_MAP = {
19220
19367
  };
19221
19368
  class HostEventClient {
19222
19369
  constructor(iFrame) {
19370
+ /** Cached list of available UI passthrough keys from the embedded app */
19371
+ this.availablePassthroughKeysCache = null;
19223
19372
  this.iFrame = iFrame;
19224
19373
  this.customHandlers = {
19225
19374
  [HostEvent.Pin]: (p, c) => this.handlePinEvent(p, c),
19226
19375
  [HostEvent.SaveAnswer]: (p, c) => this.handleSaveAnswerEvent(p, c),
19376
+ [HostEvent.UpdateFilters]: (p, c) => this.handleUpdateFiltersEvent(p, c),
19377
+ [HostEvent.DrillDown]: (p, c) => this.handleDrillDownEvent(p, c),
19227
19378
  };
19228
19379
  }
19229
19380
  /**
@@ -19286,6 +19437,26 @@ class HostEventClient {
19286
19437
  setIframeElement(iFrame) {
19287
19438
  this.iFrame = iFrame;
19288
19439
  }
19440
+ /**
19441
+ * Fetches the list of available UI passthrough keys from the embedded app.
19442
+ * Result is cached for the session. Returns empty array on failure.
19443
+ */
19444
+ async getAvailableUIPassthroughKeys(context) {
19445
+ var _a, _b;
19446
+ if (this.availablePassthroughKeysCache !== null) {
19447
+ return this.availablePassthroughKeysCache;
19448
+ }
19449
+ try {
19450
+ const response = await this.triggerUIPassthroughApi(UIPassthroughEvent.GetAvailableUIPassthroughs, {}, context);
19451
+ const matched = (_a = response === null || response === void 0 ? void 0 : response.find) === null || _a === void 0 ? void 0 : _a.call(response, (r) => r.value && !r.error);
19452
+ const keys = (_b = matched === null || matched === void 0 ? void 0 : matched.value) === null || _b === void 0 ? void 0 : _b.keys;
19453
+ this.availablePassthroughKeysCache = Array.isArray(keys) ? keys : [];
19454
+ return this.availablePassthroughKeysCache;
19455
+ }
19456
+ catch {
19457
+ return [];
19458
+ }
19459
+ }
19289
19460
  async triggerUIPassthroughApi(apiName, parameters, context) {
19290
19461
  const res = await this.processTrigger(HostEvent.UIPassthrough, {
19291
19462
  type: apiName,
@@ -19321,16 +19492,41 @@ class HostEventClient {
19321
19492
  answerId: (_d = (_c = (_b = (_a = data === null || data === void 0 ? void 0 : data.saveResponse) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.Answer__save) === null || _c === void 0 ? void 0 : _c.answer) === null || _d === void 0 ? void 0 : _d.id,
19322
19493
  };
19323
19494
  }
19495
+ handleUpdateFiltersEvent(payload, context) {
19496
+ if (!isValidUpdateFiltersPayload(payload)) {
19497
+ throwUpdateFiltersValidationError();
19498
+ }
19499
+ return this.handleHostEventWithParam(UIPassthroughEvent.UpdateFilters, payload, context);
19500
+ }
19501
+ handleDrillDownEvent(payload, context) {
19502
+ if (!isValidDrillDownPayload(payload)) {
19503
+ throwDrillDownValidationError();
19504
+ }
19505
+ return this.handleHostEventWithParam(UIPassthroughEvent.Drilldown, payload, context);
19506
+ }
19507
+ /**
19508
+ * Dispatches a host event using the appropriate channel:
19509
+ * 1. If the embedded app supports UI passthrough for this event, use it (custom handler or getter).
19510
+ * 2. Otherwise fall back to the legacy host event channel.
19511
+ *
19512
+ * @param hostEvent - The host event to trigger
19513
+ * @param payload - Optional payload for the event
19514
+ * @param context - Optional context (e.g. vizId) for scoped operations
19515
+ */
19324
19516
  async triggerHostEvent(hostEvent, payload, context) {
19325
19517
  const customHandler = this.customHandlers[hostEvent];
19326
- if (customHandler) {
19327
- return customHandler(payload, context);
19328
- }
19329
- const passthroughEvent = HOST_EVENT_PASSTHROUGH_MAP[hostEvent];
19330
- if (passthroughEvent) {
19331
- return this.getDataWithPassthroughFallback(passthroughEvent, hostEvent, payload, context);
19518
+ const passthroughEvent = PASSTHROUGH_MAP[hostEvent];
19519
+ // If embedded app supports passthrough but not this event, use legacy channel
19520
+ const keys = passthroughEvent ? await this.getAvailableUIPassthroughKeys(context) : [];
19521
+ if (passthroughEvent && keys.length > 0 && !keys.includes(passthroughEvent)) {
19522
+ return this.hostEventFallback(hostEvent, payload, context);
19332
19523
  }
19333
- return this.hostEventFallback(hostEvent, payload, context);
19524
+ // Custom handler (setters) > getter passthrough > legacy fallback
19525
+ return (customHandler
19526
+ ? customHandler(payload, context)
19527
+ : passthroughEvent
19528
+ ? this.getDataWithPassthroughFallback(passthroughEvent, hostEvent, payload, context)
19529
+ : this.hostEventFallback(hostEvent, payload, context));
19334
19530
  }
19335
19531
  }
19336
19532
 
@@ -20664,7 +20860,19 @@ class TsEmbed {
20664
20860
  return null;
20665
20861
  }
20666
20862
  // send an empty object, this is needed for liveboard default handlers
20667
- return this.hostEventClient.triggerHostEvent(messageType, data, context);
20863
+ return this.hostEventClient.triggerHostEvent(messageType, data, context).catch((err) => {
20864
+ var _a;
20865
+ if (err === null || err === void 0 ? void 0 : err.isValidationError) {
20866
+ const errorDetails = (_a = err.embedErrorDetails) !== null && _a !== void 0 ? _a : {
20867
+ errorType: ErrorDetailsTypes.VALIDATION_ERROR,
20868
+ message: err.message || ERROR_MESSAGE.UPDATEFILTERS_INVALID_PAYLOAD,
20869
+ code: EmbedErrorCodes.UPDATEFILTERS_INVALID_PAYLOAD,
20870
+ error: err.message,
20871
+ };
20872
+ this.handleError(errorDetails);
20873
+ }
20874
+ throw err;
20875
+ });
20668
20876
  }
20669
20877
  /**
20670
20878
  * Triggers an event to the embedded app, skipping the UI flow.
@@ -21406,6 +21614,50 @@ let SearchEmbed$1 = class SearchEmbed extends TsEmbed {
21406
21614
  }
21407
21615
  };
21408
21616
 
21617
+ /**
21618
+ * Resolves enablePastConversationsSidebar with
21619
+ * spotterSidebarConfig taking precedence over the
21620
+ * standalone flag.
21621
+ */
21622
+ const resolveEnablePastConversationsSidebar = (params) => (params.spotterSidebarConfigValue !== undefined
21623
+ ? params.spotterSidebarConfigValue
21624
+ : params.standaloneValue);
21625
+ function buildSpotterSidebarAppInitData(defaultAppInitData, viewConfig, handleError) {
21626
+ const { spotterSidebarConfig, enablePastConversationsSidebar } = viewConfig;
21627
+ const resolvedEnablePastConversations = resolveEnablePastConversationsSidebar({
21628
+ spotterSidebarConfigValue: spotterSidebarConfig === null || spotterSidebarConfig === void 0 ? void 0 : spotterSidebarConfig.enablePastConversationsSidebar,
21629
+ standaloneValue: enablePastConversationsSidebar,
21630
+ });
21631
+ const hasConfig = spotterSidebarConfig || resolvedEnablePastConversations !== undefined;
21632
+ if (!hasConfig)
21633
+ return defaultAppInitData;
21634
+ const resolvedSidebarConfig = {
21635
+ ...spotterSidebarConfig,
21636
+ ...(resolvedEnablePastConversations !== undefined && {
21637
+ enablePastConversationsSidebar: resolvedEnablePastConversations,
21638
+ }),
21639
+ };
21640
+ if (resolvedSidebarConfig.spotterDocumentationUrl !== undefined) {
21641
+ const [isValid, validationError] = validateHttpUrl(resolvedSidebarConfig.spotterDocumentationUrl);
21642
+ if (!isValid) {
21643
+ handleError({
21644
+ errorType: ErrorDetailsTypes.VALIDATION_ERROR,
21645
+ message: ERROR_MESSAGE.INVALID_SPOTTER_DOCUMENTATION_URL,
21646
+ code: EmbedErrorCodes.INVALID_URL,
21647
+ error: (validationError === null || validationError === void 0 ? void 0 : validationError.message) || ERROR_MESSAGE.INVALID_SPOTTER_DOCUMENTATION_URL,
21648
+ });
21649
+ delete resolvedSidebarConfig.spotterDocumentationUrl;
21650
+ }
21651
+ }
21652
+ return {
21653
+ ...defaultAppInitData,
21654
+ embedParams: {
21655
+ ...(defaultAppInitData.embedParams || {}),
21656
+ spotterSidebarConfig: resolvedSidebarConfig,
21657
+ },
21658
+ };
21659
+ }
21660
+
21409
21661
  /**
21410
21662
  * Copyright (c) 2022
21411
21663
  *
@@ -21535,7 +21787,10 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
21535
21787
  this.defaultHeight = 500;
21536
21788
  this.sendFullHeightLazyLoadData = () => {
21537
21789
  const data = calculateVisibleElementData(this.iFrame);
21538
- this.trigger(HostEvent.VisibleEmbedCoordinates, data);
21790
+ // this should be fired only if the lazyLoadingForFullHeight and fullHeight are true
21791
+ if (this.viewConfig.lazyLoadingForFullHeight && this.viewConfig.fullHeight) {
21792
+ this.trigger(HostEvent.VisibleEmbedCoordinates, data);
21793
+ }
21539
21794
  };
21540
21795
  /**
21541
21796
  * This is a handler for the RequestVisibleEmbedCoordinates event.
@@ -21548,22 +21803,13 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
21548
21803
  const visibleCoordinatesData = calculateVisibleElementData(this.iFrame);
21549
21804
  responder({ type: EmbedEvent.RequestVisibleEmbedCoordinates, data: visibleCoordinatesData });
21550
21805
  };
21551
- this.HEIGHT_CHANAGE_THRESHOLD = 30;
21552
21806
  /**
21553
21807
  * Set the iframe height as per the computed height received
21554
21808
  * from the ThoughtSpot app.
21555
21809
  * @param data The event payload
21556
21810
  */
21557
21811
  this.updateIFrameHeight = (data) => {
21558
- logger$3.error('Updating iframe height', data);
21559
- const currentHeight = this.iFrame.getBoundingClientRect().height;
21560
- const heightToSet = Math.max(data.data, this.defaultHeight);
21561
- const heightChange = Math.abs(heightToSet - currentHeight);
21562
- if (heightChange < this.HEIGHT_CHANAGE_THRESHOLD) {
21563
- logger$3.info('Height change is less than the threshold, skipping height update', { heightChange, heightToSet, currentHeight });
21564
- return;
21565
- }
21566
- this.setIFrameHeight(heightToSet);
21812
+ this.setIFrameHeight(Math.max(data.data, this.defaultHeight));
21567
21813
  this.sendFullHeightLazyLoadData();
21568
21814
  };
21569
21815
  this.embedIframeCenter = (data, responder) => {
@@ -21597,12 +21843,28 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
21597
21843
  this.on(EmbedEvent.RequestVisibleEmbedCoordinates, this.requestVisibleEmbedCoordinatesHandler);
21598
21844
  }
21599
21845
  }
21846
+ /**
21847
+ * Extends the default APP_INIT payload with `embedParams.spotterSidebarConfig`
21848
+ * so the conv-assist app can read sidebar configuration on initialisation.
21849
+ *
21850
+ * Precedence for `enablePastConversationsSidebar`:
21851
+ * `spotterSidebarConfig.enablePastConversationsSidebar` wins over the
21852
+ * deprecated top-level `enablePastConversationsSidebar` flag; if the former
21853
+ * is absent the latter is used as a fallback.
21854
+ *
21855
+ * An invalid `spotterDocumentationUrl` triggers a validation error and is
21856
+ * excluded from the payload rather than forwarded to the app.
21857
+ */
21858
+ async getAppInitData() {
21859
+ const defaultAppInitData = await super.getAppInitData();
21860
+ return buildSpotterSidebarAppInitData(defaultAppInitData, this.viewConfig, this.handleError.bind(this));
21861
+ }
21600
21862
  /**
21601
21863
  * Constructs a map of parameters to be passed on to the
21602
21864
  * embedded Liveboard or visualization.
21603
21865
  */
21604
21866
  getEmbedParams() {
21605
- const { tag, hideTagFilterChips, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideHamburger, hideObjectSearch, hideNotification, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 = true, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, showMaskedFilterChip = false, isLiveboardMasterpiecesEnabled = false, hideHomepageLeftNav = false, modularHomeExperience = false, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, enable2ColumnLayout, enableCustomColumnGroups = 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, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, isLiveboardXLSXCSVDownloadEnabled = false, isGranularXLSXCSVSchedulesEnabled = false, isCentralizedLiveboardFilterUXEnabled = false, isLinkParametersEnabled, updatedSpotterChatPrompt, spotterSidebarConfig, spotterChatConfig, minimumHeight, isThisPeriodInDateFiltersEnabled, enableHomepageAnnouncement, } = this.viewConfig;
21867
+ const { tag, hideTagFilterChips, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideHamburger, hideObjectSearch, hideNotification, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 = true, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, showMaskedFilterChip = false, isLiveboardMasterpiecesEnabled = false, hideHomepageLeftNav = false, modularHomeExperience = false, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, enable2ColumnLayout, enableCustomColumnGroups = 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, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, isLiveboardXLSXCSVDownloadEnabled = false, isGranularXLSXCSVSchedulesEnabled = false, isCentralizedLiveboardFilterUXEnabled = false, isLinkParametersEnabled, updatedSpotterChatPrompt, spotterChatConfig, minimumHeight, isThisPeriodInDateFiltersEnabled, enableHomepageAnnouncement = false, isContinuousLiveboardPDFEnabled, } = this.viewConfig;
21606
21868
  let params = {};
21607
21869
  params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
21608
21870
  params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
@@ -21626,39 +21888,6 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
21626
21888
  if (!isUndefined(updatedSpotterChatPrompt)) {
21627
21889
  params[Param.UpdatedSpotterChatPrompt] = !!updatedSpotterChatPrompt;
21628
21890
  }
21629
- const resolvedEnablePastConversationsSidebar = resolveEnablePastConversationsSidebar({
21630
- spotterSidebarConfigValue: spotterSidebarConfig === null || spotterSidebarConfig === void 0 ? void 0 : spotterSidebarConfig.enablePastConversationsSidebar,
21631
- standaloneValue: this.viewConfig.enablePastConversationsSidebar,
21632
- });
21633
- setParamIfDefined(params, Param.EnablePastConversationsSidebar, resolvedEnablePastConversationsSidebar, true);
21634
- // Handle spotterSidebarConfig params
21635
- if (spotterSidebarConfig) {
21636
- const { spotterSidebarTitle, spotterSidebarDefaultExpanded, spotterChatRenameLabel, spotterChatDeleteLabel, spotterDeleteConversationModalTitle, spotterPastConversationAlertMessage, spotterDocumentationUrl, spotterBestPracticesLabel, spotterConversationsBatchSize, spotterNewChatButtonTitle, } = spotterSidebarConfig;
21637
- setParamIfDefined(params, Param.SpotterSidebarDefaultExpanded, spotterSidebarDefaultExpanded, true);
21638
- setParamIfDefined(params, Param.SpotterSidebarTitle, spotterSidebarTitle);
21639
- setParamIfDefined(params, Param.SpotterChatRenameLabel, spotterChatRenameLabel);
21640
- setParamIfDefined(params, Param.SpotterChatDeleteLabel, spotterChatDeleteLabel);
21641
- setParamIfDefined(params, Param.SpotterDeleteConversationModalTitle, spotterDeleteConversationModalTitle);
21642
- setParamIfDefined(params, Param.SpotterPastConversationAlertMessage, spotterPastConversationAlertMessage);
21643
- setParamIfDefined(params, Param.SpotterBestPracticesLabel, spotterBestPracticesLabel);
21644
- setParamIfDefined(params, Param.SpotterConversationsBatchSize, spotterConversationsBatchSize);
21645
- setParamIfDefined(params, Param.SpotterNewChatButtonTitle, spotterNewChatButtonTitle);
21646
- // URL param with validation
21647
- if (spotterDocumentationUrl !== undefined) {
21648
- const [isValid, validationError] = validateHttpUrl(spotterDocumentationUrl);
21649
- if (isValid) {
21650
- params[Param.SpotterDocumentationUrl] = spotterDocumentationUrl;
21651
- }
21652
- else {
21653
- this.handleError({
21654
- errorType: ErrorDetailsTypes.VALIDATION_ERROR,
21655
- message: ERROR_MESSAGE.INVALID_SPOTTER_DOCUMENTATION_URL,
21656
- code: EmbedErrorCodes.INVALID_URL,
21657
- error: (validationError === null || validationError === void 0 ? void 0 : validationError.message) || ERROR_MESSAGE.INVALID_SPOTTER_DOCUMENTATION_URL,
21658
- });
21659
- }
21660
- }
21661
- }
21662
21891
  // Handle spotterChatConfig params
21663
21892
  if (spotterChatConfig) {
21664
21893
  const { hideToolResponseCardBranding, toolResponseCardBrandingLabel, } = spotterChatConfig;
@@ -21734,6 +21963,9 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
21734
21963
  if (enableHomepageAnnouncement !== undefined) {
21735
21964
  params[Param.EnableHomepageAnnouncement] = enableHomepageAnnouncement;
21736
21965
  }
21966
+ if (isContinuousLiveboardPDFEnabled !== undefined) {
21967
+ params[Param.IsWYSIWYGLiveboardPDFEnabled] = isContinuousLiveboardPDFEnabled;
21968
+ }
21737
21969
  this.defaultHeight = minimumHeight || this.defaultHeight;
21738
21970
  params[Param.DataPanelV2Enabled] = dataPanelV2;
21739
21971
  params[Param.HideHomepageLeftNav] = hideHomepageLeftNav;
@@ -22009,7 +22241,10 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
22009
22241
  this.defaultHeight = 500;
22010
22242
  this.sendFullHeightLazyLoadData = () => {
22011
22243
  const data = calculateVisibleElementData(this.iFrame);
22012
- this.trigger(HostEvent.VisibleEmbedCoordinates, data);
22244
+ // this should be fired only if the lazyLoadingForFullHeight and fullHeight are true
22245
+ if (this.viewConfig.lazyLoadingForFullHeight && this.viewConfig.fullHeight) {
22246
+ this.trigger(HostEvent.VisibleEmbedCoordinates, data);
22247
+ }
22013
22248
  };
22014
22249
  /**
22015
22250
  * This is a handler for the RequestVisibleEmbedCoordinates event.
@@ -22022,21 +22257,13 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
22022
22257
  const visibleCoordinatesData = calculateVisibleElementData(this.iFrame);
22023
22258
  responder({ type: EmbedEvent.RequestVisibleEmbedCoordinates, data: visibleCoordinatesData });
22024
22259
  };
22025
- this.HEIGHT_CHANAGE_THRESHOLD = 30;
22026
22260
  /**
22027
22261
  * Set the iframe height as per the computed height received
22028
22262
  * from the ThoughtSpot app.
22029
22263
  * @param data The event payload
22030
22264
  */
22031
22265
  this.updateIFrameHeight = (data) => {
22032
- const currentHeight = this.iFrame.getBoundingClientRect().height;
22033
- const heightToSet = Math.max(data.data, this.defaultHeight);
22034
- const heightChange = Math.abs(heightToSet - currentHeight);
22035
- if (heightChange < this.HEIGHT_CHANAGE_THRESHOLD) {
22036
- logger$3.info('Height change is less than the threshold, skipping height update', { heightChange, heightToSet, currentHeight });
22037
- return;
22038
- }
22039
- this.setIFrameHeight(heightToSet);
22266
+ this.setIFrameHeight(Math.max(data.data, this.defaultHeight));
22040
22267
  this.sendFullHeightLazyLoadData();
22041
22268
  };
22042
22269
  this.embedIframeCenter = (data, responder) => {
@@ -22097,7 +22324,7 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
22097
22324
  getEmbedParamsObject() {
22098
22325
  let params = {};
22099
22326
  params = this.getBaseQueryParams(params);
22100
- const { enableVizTransformations, fullHeight, defaultHeight, minimumHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, showMaskedFilterChip = false, isLiveboardMasterpiecesEnabled = false, isEnhancedFilterInteractivityEnabled = false, enableAskSage, enable2ColumnLayout, dataPanelV2 = true, enableCustomColumnGroups = false, oAuthPollingInterval, isForceRedirect, dataSourceId, coverAndFilterOptionInPDF = false, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, isLiveboardXLSXCSVDownloadEnabled = false, isGranularXLSXCSVSchedulesEnabled = false, showSpotterLimitations, isCentralizedLiveboardFilterUXEnabled = false, isLinkParametersEnabled, updatedSpotterChatPrompt, spotterChatConfig, isThisPeriodInDateFiltersEnabled, } = this.viewConfig;
22327
+ const { enableVizTransformations, fullHeight, defaultHeight, minimumHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, showMaskedFilterChip = false, isLiveboardMasterpiecesEnabled = false, isEnhancedFilterInteractivityEnabled = false, enableAskSage, enable2ColumnLayout, dataPanelV2 = true, enableCustomColumnGroups = false, oAuthPollingInterval, isForceRedirect, dataSourceId, coverAndFilterOptionInPDF = false, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, isLiveboardXLSXCSVDownloadEnabled = false, isGranularXLSXCSVSchedulesEnabled = false, showSpotterLimitations, isCentralizedLiveboardFilterUXEnabled = false, isLinkParametersEnabled, updatedSpotterChatPrompt, spotterChatConfig, isThisPeriodInDateFiltersEnabled, isContinuousLiveboardPDFEnabled, } = this.viewConfig;
22101
22328
  const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
22102
22329
  || this.viewConfig.preventPinboardFilterRemoval;
22103
22330
  if (fullHeight === true) {
@@ -22186,6 +22413,9 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
22186
22413
  if (isThisPeriodInDateFiltersEnabled !== undefined) {
22187
22414
  params[Param.IsThisPeriodInDateFiltersEnabled] = isThisPeriodInDateFiltersEnabled;
22188
22415
  }
22416
+ if (isContinuousLiveboardPDFEnabled !== undefined) {
22417
+ params[Param.IsWYSIWYGLiveboardPDFEnabled] = isContinuousLiveboardPDFEnabled;
22418
+ }
22189
22419
  params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
22190
22420
  params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
22191
22421
  params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;
@@ -22933,14 +23163,24 @@ let SpotterEmbed$1 = class SpotterEmbed extends TsEmbed {
22933
23163
  super(container, viewConfig);
22934
23164
  this.viewConfig = viewConfig;
22935
23165
  }
23166
+ /**
23167
+ * Extends the default APP_INIT payload with `embedParams.spotterSidebarConfig`
23168
+ * so the conv-assist app can read sidebar configuration on initialisation.
23169
+ *
23170
+ * Precedence for `enablePastConversationsSidebar`:
23171
+ * `spotterSidebarConfig.enablePastConversationsSidebar` wins over the
23172
+ * deprecated top-level `enablePastConversationsSidebar` flag; if the former
23173
+ * is absent the latter is used as a fallback.
23174
+ *
23175
+ * An invalid `spotterDocumentationUrl` triggers a validation error and is
23176
+ * excluded from the payload rather than forwarded to the app.
23177
+ */
23178
+ async getAppInitData() {
23179
+ const defaultAppInitData = await super.getAppInitData();
23180
+ return buildSpotterSidebarAppInitData(defaultAppInitData, this.viewConfig, this.handleError.bind(this));
23181
+ }
22936
23182
  getEmbedParamsObject() {
22937
- const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, updatedSpotterChatPrompt, spotterSidebarConfig, spotterChatConfig, } = this.viewConfig;
22938
- // Extract sidebar config properties
22939
- const { enablePastConversationsSidebar: sidebarEnablePastConversationsSidebar, spotterSidebarTitle, spotterSidebarDefaultExpanded, spotterChatRenameLabel, spotterChatDeleteLabel, spotterDeleteConversationModalTitle, spotterPastConversationAlertMessage, spotterDocumentationUrl, spotterBestPracticesLabel, spotterConversationsBatchSize, spotterNewChatButtonTitle, } = spotterSidebarConfig || {};
22940
- const resolvedEnablePastConversationsSidebar = resolveEnablePastConversationsSidebar({
22941
- spotterSidebarConfigValue: sidebarEnablePastConversationsSidebar,
22942
- standaloneValue: this.viewConfig.enablePastConversationsSidebar,
22943
- });
23183
+ const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, updatedSpotterChatPrompt, spotterChatConfig, } = this.viewConfig;
22944
23184
  if (!worksheetId) {
22945
23185
  this.handleError({
22946
23186
  errorType: ErrorDetailsTypes.VALIDATION_ERROR,
@@ -22958,32 +23198,6 @@ let SpotterEmbed$1 = class SpotterEmbed extends TsEmbed {
22958
23198
  setParamIfDefined(queryParams, Param.ShowSpotterLimitations, showSpotterLimitations, true);
22959
23199
  setParamIfDefined(queryParams, Param.HideSampleQuestions, hideSampleQuestions, true);
22960
23200
  setParamIfDefined(queryParams, Param.UpdatedSpotterChatPrompt, updatedSpotterChatPrompt, true);
22961
- setParamIfDefined(queryParams, Param.EnablePastConversationsSidebar, resolvedEnablePastConversationsSidebar, true);
22962
- setParamIfDefined(queryParams, Param.SpotterSidebarDefaultExpanded, spotterSidebarDefaultExpanded, true);
22963
- // String params
22964
- setParamIfDefined(queryParams, Param.SpotterSidebarTitle, spotterSidebarTitle);
22965
- setParamIfDefined(queryParams, Param.SpotterChatRenameLabel, spotterChatRenameLabel);
22966
- setParamIfDefined(queryParams, Param.SpotterChatDeleteLabel, spotterChatDeleteLabel);
22967
- setParamIfDefined(queryParams, Param.SpotterDeleteConversationModalTitle, spotterDeleteConversationModalTitle);
22968
- setParamIfDefined(queryParams, Param.SpotterPastConversationAlertMessage, spotterPastConversationAlertMessage);
22969
- setParamIfDefined(queryParams, Param.SpotterBestPracticesLabel, spotterBestPracticesLabel);
22970
- setParamIfDefined(queryParams, Param.SpotterConversationsBatchSize, spotterConversationsBatchSize);
22971
- setParamIfDefined(queryParams, Param.SpotterNewChatButtonTitle, spotterNewChatButtonTitle);
22972
- // URL param with validation
22973
- if (spotterDocumentationUrl !== undefined) {
22974
- const [isValid, validationError] = validateHttpUrl(spotterDocumentationUrl);
22975
- if (isValid) {
22976
- queryParams[Param.SpotterDocumentationUrl] = spotterDocumentationUrl;
22977
- }
22978
- else {
22979
- this.handleError({
22980
- errorType: ErrorDetailsTypes.VALIDATION_ERROR,
22981
- message: ERROR_MESSAGE.INVALID_SPOTTER_DOCUMENTATION_URL,
22982
- code: EmbedErrorCodes.INVALID_URL,
22983
- error: (validationError === null || validationError === void 0 ? void 0 : validationError.message) || ERROR_MESSAGE.INVALID_SPOTTER_DOCUMENTATION_URL,
22984
- });
22985
- }
22986
- }
22987
23201
  // Handle spotterChatConfig params
22988
23202
  if (spotterChatConfig) {
22989
23203
  const { hideToolResponseCardBranding, toolResponseCardBrandingLabel, } = spotterChatConfig;