@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
package/dist/tsembed.js CHANGED
@@ -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
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
@@ -899,6 +899,17 @@
899
899
  * ```
900
900
  */
901
901
  EmbedEvent["DownloadAsXlsx"] = "downloadAsXlsx";
902
+ /**
903
+ * Emitted when the Download Liveboard as Continuous PDF action is triggered
904
+ * on a Liveboard.
905
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
906
+ * @example
907
+ * ```js
908
+ * liveboardEmbed.on(EmbedEvent.DownloadLiveboardAsContinuousPDF, payload => {
909
+ * console.log('download liveboard as continuous PDF', payload)})
910
+ * ```
911
+ */
912
+ EmbedEvent["DownloadLiveboardAsContinuousPDF"] = "downloadLiveboardAsContinuousPDF";
902
913
  /**
903
914
  * Emitted when an Answer is deleted in the app
904
915
  * Use start:true to subscribe to when delete is initiated, or end:true to subscribe
@@ -2427,6 +2438,18 @@
2427
2438
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2428
2439
  */
2429
2440
  HostEvent["DownloadAsPdf"] = "downloadAsPdf";
2441
+ /**
2442
+ * Trigger the **Download Liveboard as Continuous PDF** action on an
2443
+ * embedded Liveboard.
2444
+ *
2445
+ * @example
2446
+ * ```js
2447
+ * liveboardEmbed.trigger(HostEvent.DownloadLiveboardAsContinuousPDF)
2448
+ * ```
2449
+ *
2450
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
2451
+ */
2452
+ HostEvent["DownloadLiveboardAsContinuousPDF"] = "downloadLiveboardAsContinuousPDF";
2430
2453
  /**
2431
2454
  * Trigger the **AI Highlights** action on an embedded Liveboard
2432
2455
  *
@@ -2653,6 +2676,20 @@
2653
2676
  * vizId: '730496d6-6903-4601-937e-2c691821af3c'
2654
2677
  * }, ContextType.Liveboard);
2655
2678
  * ```
2679
+ * @example
2680
+ * ```js
2681
+ * // Copy link from liveboard context
2682
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2683
+ * liveboardEmbed.trigger(HostEvent.CopyLink, {}, ContextType.Liveboard);
2684
+ * ```
2685
+ * @example
2686
+ * ```js
2687
+ * // Copy link from liveboard visualization context
2688
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2689
+ * liveboardEmbed.trigger(HostEvent.CopyLink, {
2690
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
2691
+ * }, ContextType.Liveboard);
2692
+ * ```
2656
2693
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2657
2694
  */
2658
2695
  HostEvent["CopyLink"] = "embedDocument";
@@ -2684,6 +2721,20 @@
2684
2721
  * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2685
2722
  * liveboardEmbed.trigger(HostEvent.Present, {}, ContextType.Liveboard);
2686
2723
  * ```
2724
+ * @example
2725
+ * ```js
2726
+ * // Present from liveboard visualization context
2727
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2728
+ * liveboardEmbed.trigger(HostEvent.Present, {
2729
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
2730
+ * }, ContextType.Liveboard);
2731
+ * ```
2732
+ * @example
2733
+ * ```js
2734
+ * // Present from liveboard context
2735
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2736
+ * liveboardEmbed.trigger(HostEvent.Present, {}, ContextType.Liveboard);
2737
+ * ```
2687
2738
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2688
2739
  */
2689
2740
  HostEvent["Present"] = "present";
@@ -3981,6 +4032,7 @@
3981
4032
  Param["IsLazyLoadingForEmbedEnabled"] = "isLazyLoadingForEmbedEnabled";
3982
4033
  Param["RootMarginForLazyLoad"] = "rootMarginForLazyLoad";
3983
4034
  Param["isPNGInScheduledEmailsEnabled"] = "isPNGInScheduledEmailsEnabled";
4035
+ Param["IsWYSIWYGLiveboardPDFEnabled"] = "isWYSIWYGLiveboardPDFEnabled";
3984
4036
  Param["isLiveboardXLSXCSVDownloadEnabled"] = "isLiveboardXLSXCSVDownloadEnabled";
3985
4037
  Param["isGranularXLSXCSVSchedulesEnabled"] = "isGranularXLSXCSVSchedulesEnabled";
3986
4038
  Param["isCentralizedLiveboardFilterUXEnabled"] = "isCentralizedLiveboardFilterUXEnabled";
@@ -4325,6 +4377,16 @@
4325
4377
  * @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl
4326
4378
  */
4327
4379
  Action["DownloadLiveboard"] = "downloadLiveboard";
4380
+ /**
4381
+ * The **Download Liveboard as Continuous PDF** menu action on a Liveboard.
4382
+ * Allows downloading the entire Liveboard as a continuous PDF.
4383
+ * @example
4384
+ * ```js
4385
+ * disabledActions: [Action.DownloadLiveboardAsContinuousPDF]
4386
+ * ```
4387
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
4388
+ */
4389
+ Action["DownloadLiveboardAsContinuousPDF"] = "downloadLiveboardAsContinuousPDF";
4328
4390
  /**
4329
4391
  * @hidden
4330
4392
  */
@@ -5542,6 +5604,39 @@
5542
5604
  * @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
5543
5605
  */
5544
5606
  Action["SpotterDocs"] = "spotterDocs";
5607
+ /**
5608
+ * Controls visibility and disable state of the connector resources
5609
+ * section in the Spotter chat interface.
5610
+ * @example
5611
+ * ```js
5612
+ * hiddenActions: [Action.SpotterChatConnectorResources]
5613
+ * disabledActions: [Action.SpotterChatConnectorResources]
5614
+ * ```
5615
+ * @version SDK: 1.48.0 | ThoughtSpot Cloud: 26.5.0.cl
5616
+ */
5617
+ Action["SpotterChatConnectorResources"] = "spotterChatConnectorResources";
5618
+ /**
5619
+ * Controls visibility and disable state of the connectors
5620
+ * in the Spotter chat interface.
5621
+ * @example
5622
+ * ```js
5623
+ * hiddenActions: [Action.SpotterChatConnectors]
5624
+ * disabledActions: [Action.SpotterChatConnectors]
5625
+ * ```
5626
+ * @version SDK: 1.48.0 | ThoughtSpot Cloud: 26.5.0.cl
5627
+ */
5628
+ Action["SpotterChatConnectors"] = "spotterChatConnectors";
5629
+ /**
5630
+ * Controls visibility and disable state of the mode switcher
5631
+ * in the Spotter chat interface.
5632
+ * @example
5633
+ * ```js
5634
+ * hiddenActions: [Action.SpotterChatModeSwitcher]
5635
+ * disabledActions: [Action.SpotterChatModeSwitcher]
5636
+ * ```
5637
+ * @version SDK: 1.48.0 | ThoughtSpot Cloud: 26.5.0.cl
5638
+ */
5639
+ Action["SpotterChatModeSwitcher"] = "spotterChatModeSwitcher";
5545
5640
  /**
5546
5641
  * The **Include current period** checkbox for date filters.
5547
5642
  * Controls the visibility and availability of the option to include
@@ -5835,6 +5930,12 @@
5835
5930
  EmbedErrorCodes["UPDATE_PARAMS_FAILED"] = "UPDATE_PARAMS_FAILED";
5836
5931
  /** Invalid URL provided in configuration */
5837
5932
  EmbedErrorCodes["INVALID_URL"] = "INVALID_URL";
5933
+ /** Host event payload validation failed */
5934
+ EmbedErrorCodes["HOST_EVENT_VALIDATION"] = "HOST_EVENT_VALIDATION";
5935
+ /** UpdateFilters payload is invalid - missing or malformed filter/filters */
5936
+ EmbedErrorCodes["UPDATEFILTERS_INVALID_PAYLOAD"] = "UPDATEFILTERS_INVALID_PAYLOAD";
5937
+ /** DrillDown payload is invalid - missing or malformed points */
5938
+ EmbedErrorCodes["DRILLDOWN_INVALID_PAYLOAD"] = "DRILLDOWN_INVALID_PAYLOAD";
5838
5939
  })(exports.EmbedErrorCodes || (exports.EmbedErrorCodes = {}));
5839
5940
  /**
5840
5941
  * Context types for specifying the page context when triggering host events.
@@ -6049,6 +6150,8 @@
6049
6150
  SSR_ENVIRONMENT_ERROR: 'SSR environment detected. This function cannot be called in SSR environment.',
6050
6151
  UPDATE_PARAMS_FAILED: 'Failed to update embed parameters',
6051
6152
  INVALID_SPOTTER_DOCUMENTATION_URL: 'Invalid spotterDocumentationUrl. Please provide a valid http or https URL.',
6153
+ UPDATEFILTERS_INVALID_PAYLOAD: 'UpdateFilters requires a valid filter or filters array. Expected: { filter: { column, oper, values } } or { filters: [{ column, oper, values }, ...] }',
6154
+ DRILLDOWN_INVALID_PAYLOAD: 'DrillDown requires a valid points object. Expected: { points: { clickedPoint?, selectedPoints? }, autoDrillDown?, vizId? }',
6052
6155
  };
6053
6156
  const CUSTOM_ACTIONS_ERROR_MESSAGE = {
6054
6157
  INVALID_ACTION_OBJECT: 'Custom Action Validation Error: Invalid action object provided',
@@ -6552,14 +6655,6 @@
6552
6655
  return [false, error instanceof Error ? error : new Error(String(error))];
6553
6656
  }
6554
6657
  };
6555
- /**
6556
- * Resolves enablePastConversationsSidebar with
6557
- * spotterSidebarConfig taking precedence over the
6558
- * standalone flag.
6559
- */
6560
- const resolveEnablePastConversationsSidebar = (params) => (params.spotterSidebarConfigValue !== undefined
6561
- ? params.spotterSidebarConfigValue
6562
- : params.standaloneValue);
6563
6658
  /**
6564
6659
  * Sets a query parameter if the value is defined.
6565
6660
  * @param queryParams - The query params object to modify
@@ -8856,6 +8951,8 @@
8856
8951
  UIPassthroughEvent["GetAnswerConfig"] = "getAnswerPageConfig";
8857
8952
  UIPassthroughEvent["GetLiveboardConfig"] = "getPinboardPageConfig";
8858
8953
  UIPassthroughEvent["GetUnsavedAnswerTML"] = "getUnsavedAnswerTML";
8954
+ UIPassthroughEvent["UpdateFilters"] = "updateFilters";
8955
+ UIPassthroughEvent["Drilldown"] = "drillDown";
8859
8956
  UIPassthroughEvent["GetAnswerSession"] = "getAnswerSession";
8860
8957
  UIPassthroughEvent["GetFilters"] = "getFilters";
8861
8958
  UIPassthroughEvent["GetIframeUrl"] = "getIframeUrl";
@@ -19276,10 +19373,60 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
19276
19373
  return eventData;
19277
19374
  }
19278
19375
 
19279
- 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$1={".":{"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$1,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};
19376
+ 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$1={".":{"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$1,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};
19280
19377
 
19281
- /** Host events that use getDataWithPassthroughFallback (getter-style APIs) */
19282
- const HOST_EVENT_PASSTHROUGH_MAP = {
19378
+ function isValidUpdateFiltersPayload(payload) {
19379
+ if (!payload)
19380
+ return false;
19381
+ const isValidFilter = (f) => !!f && typeof f.column === 'string' && typeof f.oper === 'string' && Array.isArray(f.values);
19382
+ const hasValidFilter = payload.filter && isValidFilter(payload.filter);
19383
+ const hasValidFilters = Array.isArray(payload.filters) && payload.filters.length > 0 && payload.filters.every(isValidFilter);
19384
+ return !!(hasValidFilter || hasValidFilters);
19385
+ }
19386
+ function isValidDrillDownPayload(payload) {
19387
+ if (!payload)
19388
+ return false;
19389
+ const points = payload.points;
19390
+ if (!points || typeof points !== 'object')
19391
+ return false;
19392
+ const hasClickedPoint = 'clickedPoint' in points && points.clickedPoint != null;
19393
+ const hasSelectedPoints = Array.isArray(points.selectedPoints) && points.selectedPoints.length > 0;
19394
+ return hasClickedPoint || hasSelectedPoints;
19395
+ }
19396
+ function createValidationError(message) {
19397
+ const err = new Error(message);
19398
+ err.isValidationError = true;
19399
+ err.embedErrorDetails = {
19400
+ type: exports.EmbedEvent.Error,
19401
+ data: {
19402
+ errorType: exports.ErrorDetailsTypes.VALIDATION_ERROR,
19403
+ message,
19404
+ code: exports.EmbedErrorCodes.HOST_EVENT_VALIDATION,
19405
+ error: message
19406
+ },
19407
+ status: embedEventStatus.END
19408
+ };
19409
+ throw err;
19410
+ }
19411
+ function throwUpdateFiltersValidationError() {
19412
+ createValidationError(ERROR_MESSAGE.UPDATEFILTERS_INVALID_PAYLOAD);
19413
+ }
19414
+ function throwDrillDownValidationError() {
19415
+ createValidationError(ERROR_MESSAGE.DRILLDOWN_INVALID_PAYLOAD);
19416
+ }
19417
+
19418
+ /**
19419
+ * Maps HostEvent to its corresponding UIPassthroughEvent.
19420
+ * Includes both custom-handler events (Pin, SaveAnswer, UpdateFilters, DrillDown)
19421
+ * and getter events (GetAnswerSession, GetFilters, etc.) that use getDataWithPassthroughFallback.
19422
+ */
19423
+ const PASSTHROUGH_MAP = {
19424
+ // Custom handlers (setters with special logic)
19425
+ [exports.HostEvent.Pin]: exports.UIPassthroughEvent.PinAnswerToLiveboard,
19426
+ [exports.HostEvent.SaveAnswer]: exports.UIPassthroughEvent.SaveAnswer,
19427
+ [exports.HostEvent.UpdateFilters]: exports.UIPassthroughEvent.UpdateFilters,
19428
+ [exports.HostEvent.DrillDown]: exports.UIPassthroughEvent.Drilldown,
19429
+ // Getters (use getDataWithPassthroughFallback)
19283
19430
  [exports.HostEvent.GetAnswerSession]: exports.UIPassthroughEvent.GetAnswerSession,
19284
19431
  [exports.HostEvent.GetFilters]: exports.UIPassthroughEvent.GetFilters,
19285
19432
  [exports.HostEvent.GetIframeUrl]: exports.UIPassthroughEvent.GetIframeUrl,
@@ -19290,10 +19437,14 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
19290
19437
  };
19291
19438
  class HostEventClient {
19292
19439
  constructor(iFrame) {
19440
+ /** Cached list of available UI passthrough keys from the embedded app */
19441
+ this.availablePassthroughKeysCache = null;
19293
19442
  this.iFrame = iFrame;
19294
19443
  this.customHandlers = {
19295
19444
  [exports.HostEvent.Pin]: (p, c) => this.handlePinEvent(p, c),
19296
19445
  [exports.HostEvent.SaveAnswer]: (p, c) => this.handleSaveAnswerEvent(p, c),
19446
+ [exports.HostEvent.UpdateFilters]: (p, c) => this.handleUpdateFiltersEvent(p, c),
19447
+ [exports.HostEvent.DrillDown]: (p, c) => this.handleDrillDownEvent(p, c),
19297
19448
  };
19298
19449
  }
19299
19450
  /**
@@ -19356,6 +19507,26 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
19356
19507
  setIframeElement(iFrame) {
19357
19508
  this.iFrame = iFrame;
19358
19509
  }
19510
+ /**
19511
+ * Fetches the list of available UI passthrough keys from the embedded app.
19512
+ * Result is cached for the session. Returns empty array on failure.
19513
+ */
19514
+ async getAvailableUIPassthroughKeys(context) {
19515
+ var _a, _b;
19516
+ if (this.availablePassthroughKeysCache !== null) {
19517
+ return this.availablePassthroughKeysCache;
19518
+ }
19519
+ try {
19520
+ const response = await this.triggerUIPassthroughApi(exports.UIPassthroughEvent.GetAvailableUIPassthroughs, {}, context);
19521
+ 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);
19522
+ const keys = (_b = matched === null || matched === void 0 ? void 0 : matched.value) === null || _b === void 0 ? void 0 : _b.keys;
19523
+ this.availablePassthroughKeysCache = Array.isArray(keys) ? keys : [];
19524
+ return this.availablePassthroughKeysCache;
19525
+ }
19526
+ catch {
19527
+ return [];
19528
+ }
19529
+ }
19359
19530
  async triggerUIPassthroughApi(apiName, parameters, context) {
19360
19531
  const res = await this.processTrigger(exports.HostEvent.UIPassthrough, {
19361
19532
  type: apiName,
@@ -19391,16 +19562,41 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
19391
19562
  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,
19392
19563
  };
19393
19564
  }
19565
+ handleUpdateFiltersEvent(payload, context) {
19566
+ if (!isValidUpdateFiltersPayload(payload)) {
19567
+ throwUpdateFiltersValidationError();
19568
+ }
19569
+ return this.handleHostEventWithParam(exports.UIPassthroughEvent.UpdateFilters, payload, context);
19570
+ }
19571
+ handleDrillDownEvent(payload, context) {
19572
+ if (!isValidDrillDownPayload(payload)) {
19573
+ throwDrillDownValidationError();
19574
+ }
19575
+ return this.handleHostEventWithParam(exports.UIPassthroughEvent.Drilldown, payload, context);
19576
+ }
19577
+ /**
19578
+ * Dispatches a host event using the appropriate channel:
19579
+ * 1. If the embedded app supports UI passthrough for this event, use it (custom handler or getter).
19580
+ * 2. Otherwise fall back to the legacy host event channel.
19581
+ *
19582
+ * @param hostEvent - The host event to trigger
19583
+ * @param payload - Optional payload for the event
19584
+ * @param context - Optional context (e.g. vizId) for scoped operations
19585
+ */
19394
19586
  async triggerHostEvent(hostEvent, payload, context) {
19395
19587
  const customHandler = this.customHandlers[hostEvent];
19396
- if (customHandler) {
19397
- return customHandler(payload, context);
19398
- }
19399
- const passthroughEvent = HOST_EVENT_PASSTHROUGH_MAP[hostEvent];
19400
- if (passthroughEvent) {
19401
- return this.getDataWithPassthroughFallback(passthroughEvent, hostEvent, payload, context);
19588
+ const passthroughEvent = PASSTHROUGH_MAP[hostEvent];
19589
+ // If embedded app supports passthrough but not this event, use legacy channel
19590
+ const keys = passthroughEvent ? await this.getAvailableUIPassthroughKeys(context) : [];
19591
+ if (passthroughEvent && keys.length > 0 && !keys.includes(passthroughEvent)) {
19592
+ return this.hostEventFallback(hostEvent, payload, context);
19402
19593
  }
19403
- return this.hostEventFallback(hostEvent, payload, context);
19594
+ // Custom handler (setters) > getter passthrough > legacy fallback
19595
+ return (customHandler
19596
+ ? customHandler(payload, context)
19597
+ : passthroughEvent
19598
+ ? this.getDataWithPassthroughFallback(passthroughEvent, hostEvent, payload, context)
19599
+ : this.hostEventFallback(hostEvent, payload, context));
19404
19600
  }
19405
19601
  }
19406
19602
 
@@ -20734,7 +20930,19 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
20734
20930
  return null;
20735
20931
  }
20736
20932
  // send an empty object, this is needed for liveboard default handlers
20737
- return this.hostEventClient.triggerHostEvent(messageType, data, context);
20933
+ return this.hostEventClient.triggerHostEvent(messageType, data, context).catch((err) => {
20934
+ var _a;
20935
+ if (err === null || err === void 0 ? void 0 : err.isValidationError) {
20936
+ const errorDetails = (_a = err.embedErrorDetails) !== null && _a !== void 0 ? _a : {
20937
+ errorType: exports.ErrorDetailsTypes.VALIDATION_ERROR,
20938
+ message: err.message || ERROR_MESSAGE.UPDATEFILTERS_INVALID_PAYLOAD,
20939
+ code: exports.EmbedErrorCodes.UPDATEFILTERS_INVALID_PAYLOAD,
20940
+ error: err.message,
20941
+ };
20942
+ this.handleError(errorDetails);
20943
+ }
20944
+ throw err;
20945
+ });
20738
20946
  }
20739
20947
  /**
20740
20948
  * Triggers an event to the embedded app, skipping the UI flow.
@@ -21136,6 +21344,50 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
21136
21344
  }
21137
21345
  }
21138
21346
 
21347
+ /**
21348
+ * Resolves enablePastConversationsSidebar with
21349
+ * spotterSidebarConfig taking precedence over the
21350
+ * standalone flag.
21351
+ */
21352
+ const resolveEnablePastConversationsSidebar = (params) => (params.spotterSidebarConfigValue !== undefined
21353
+ ? params.spotterSidebarConfigValue
21354
+ : params.standaloneValue);
21355
+ function buildSpotterSidebarAppInitData(defaultAppInitData, viewConfig, handleError) {
21356
+ const { spotterSidebarConfig, enablePastConversationsSidebar } = viewConfig;
21357
+ const resolvedEnablePastConversations = resolveEnablePastConversationsSidebar({
21358
+ spotterSidebarConfigValue: spotterSidebarConfig === null || spotterSidebarConfig === void 0 ? void 0 : spotterSidebarConfig.enablePastConversationsSidebar,
21359
+ standaloneValue: enablePastConversationsSidebar,
21360
+ });
21361
+ const hasConfig = spotterSidebarConfig || resolvedEnablePastConversations !== undefined;
21362
+ if (!hasConfig)
21363
+ return defaultAppInitData;
21364
+ const resolvedSidebarConfig = {
21365
+ ...spotterSidebarConfig,
21366
+ ...(resolvedEnablePastConversations !== undefined && {
21367
+ enablePastConversationsSidebar: resolvedEnablePastConversations,
21368
+ }),
21369
+ };
21370
+ if (resolvedSidebarConfig.spotterDocumentationUrl !== undefined) {
21371
+ const [isValid, validationError] = validateHttpUrl(resolvedSidebarConfig.spotterDocumentationUrl);
21372
+ if (!isValid) {
21373
+ handleError({
21374
+ errorType: exports.ErrorDetailsTypes.VALIDATION_ERROR,
21375
+ message: ERROR_MESSAGE.INVALID_SPOTTER_DOCUMENTATION_URL,
21376
+ code: exports.EmbedErrorCodes.INVALID_URL,
21377
+ error: (validationError === null || validationError === void 0 ? void 0 : validationError.message) || ERROR_MESSAGE.INVALID_SPOTTER_DOCUMENTATION_URL,
21378
+ });
21379
+ delete resolvedSidebarConfig.spotterDocumentationUrl;
21380
+ }
21381
+ }
21382
+ return {
21383
+ ...defaultAppInitData,
21384
+ embedParams: {
21385
+ ...(defaultAppInitData.embedParams || {}),
21386
+ spotterSidebarConfig: resolvedSidebarConfig,
21387
+ },
21388
+ };
21389
+ }
21390
+
21139
21391
  /**
21140
21392
  * Copyright (c) 2022
21141
21393
  *
@@ -21265,7 +21517,10 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
21265
21517
  this.defaultHeight = 500;
21266
21518
  this.sendFullHeightLazyLoadData = () => {
21267
21519
  const data = calculateVisibleElementData(this.iFrame);
21268
- this.trigger(exports.HostEvent.VisibleEmbedCoordinates, data);
21520
+ // this should be fired only if the lazyLoadingForFullHeight and fullHeight are true
21521
+ if (this.viewConfig.lazyLoadingForFullHeight && this.viewConfig.fullHeight) {
21522
+ this.trigger(exports.HostEvent.VisibleEmbedCoordinates, data);
21523
+ }
21269
21524
  };
21270
21525
  /**
21271
21526
  * This is a handler for the RequestVisibleEmbedCoordinates event.
@@ -21278,22 +21533,13 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
21278
21533
  const visibleCoordinatesData = calculateVisibleElementData(this.iFrame);
21279
21534
  responder({ type: exports.EmbedEvent.RequestVisibleEmbedCoordinates, data: visibleCoordinatesData });
21280
21535
  };
21281
- this.HEIGHT_CHANAGE_THRESHOLD = 30;
21282
21536
  /**
21283
21537
  * Set the iframe height as per the computed height received
21284
21538
  * from the ThoughtSpot app.
21285
21539
  * @param data The event payload
21286
21540
  */
21287
21541
  this.updateIFrameHeight = (data) => {
21288
- logger$3.error('Updating iframe height', data);
21289
- const currentHeight = this.iFrame.getBoundingClientRect().height;
21290
- const heightToSet = Math.max(data.data, this.defaultHeight);
21291
- const heightChange = Math.abs(heightToSet - currentHeight);
21292
- if (heightChange < this.HEIGHT_CHANAGE_THRESHOLD) {
21293
- logger$3.info('Height change is less than the threshold, skipping height update', { heightChange, heightToSet, currentHeight });
21294
- return;
21295
- }
21296
- this.setIFrameHeight(heightToSet);
21542
+ this.setIFrameHeight(Math.max(data.data, this.defaultHeight));
21297
21543
  this.sendFullHeightLazyLoadData();
21298
21544
  };
21299
21545
  this.embedIframeCenter = (data, responder) => {
@@ -21327,12 +21573,28 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
21327
21573
  this.on(exports.EmbedEvent.RequestVisibleEmbedCoordinates, this.requestVisibleEmbedCoordinatesHandler);
21328
21574
  }
21329
21575
  }
21576
+ /**
21577
+ * Extends the default APP_INIT payload with `embedParams.spotterSidebarConfig`
21578
+ * so the conv-assist app can read sidebar configuration on initialisation.
21579
+ *
21580
+ * Precedence for `enablePastConversationsSidebar`:
21581
+ * `spotterSidebarConfig.enablePastConversationsSidebar` wins over the
21582
+ * deprecated top-level `enablePastConversationsSidebar` flag; if the former
21583
+ * is absent the latter is used as a fallback.
21584
+ *
21585
+ * An invalid `spotterDocumentationUrl` triggers a validation error and is
21586
+ * excluded from the payload rather than forwarded to the app.
21587
+ */
21588
+ async getAppInitData() {
21589
+ const defaultAppInitData = await super.getAppInitData();
21590
+ return buildSpotterSidebarAppInitData(defaultAppInitData, this.viewConfig, this.handleError.bind(this));
21591
+ }
21330
21592
  /**
21331
21593
  * Constructs a map of parameters to be passed on to the
21332
21594
  * embedded Liveboard or visualization.
21333
21595
  */
21334
21596
  getEmbedParams() {
21335
- 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 = exports.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;
21597
+ 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 = exports.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;
21336
21598
  let params = {};
21337
21599
  params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
21338
21600
  params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
@@ -21356,39 +21618,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
21356
21618
  if (!isUndefined(updatedSpotterChatPrompt)) {
21357
21619
  params[Param.UpdatedSpotterChatPrompt] = !!updatedSpotterChatPrompt;
21358
21620
  }
21359
- const resolvedEnablePastConversationsSidebar = resolveEnablePastConversationsSidebar({
21360
- spotterSidebarConfigValue: spotterSidebarConfig === null || spotterSidebarConfig === void 0 ? void 0 : spotterSidebarConfig.enablePastConversationsSidebar,
21361
- standaloneValue: this.viewConfig.enablePastConversationsSidebar,
21362
- });
21363
- setParamIfDefined(params, Param.EnablePastConversationsSidebar, resolvedEnablePastConversationsSidebar, true);
21364
- // Handle spotterSidebarConfig params
21365
- if (spotterSidebarConfig) {
21366
- const { spotterSidebarTitle, spotterSidebarDefaultExpanded, spotterChatRenameLabel, spotterChatDeleteLabel, spotterDeleteConversationModalTitle, spotterPastConversationAlertMessage, spotterDocumentationUrl, spotterBestPracticesLabel, spotterConversationsBatchSize, spotterNewChatButtonTitle, } = spotterSidebarConfig;
21367
- setParamIfDefined(params, Param.SpotterSidebarDefaultExpanded, spotterSidebarDefaultExpanded, true);
21368
- setParamIfDefined(params, Param.SpotterSidebarTitle, spotterSidebarTitle);
21369
- setParamIfDefined(params, Param.SpotterChatRenameLabel, spotterChatRenameLabel);
21370
- setParamIfDefined(params, Param.SpotterChatDeleteLabel, spotterChatDeleteLabel);
21371
- setParamIfDefined(params, Param.SpotterDeleteConversationModalTitle, spotterDeleteConversationModalTitle);
21372
- setParamIfDefined(params, Param.SpotterPastConversationAlertMessage, spotterPastConversationAlertMessage);
21373
- setParamIfDefined(params, Param.SpotterBestPracticesLabel, spotterBestPracticesLabel);
21374
- setParamIfDefined(params, Param.SpotterConversationsBatchSize, spotterConversationsBatchSize);
21375
- setParamIfDefined(params, Param.SpotterNewChatButtonTitle, spotterNewChatButtonTitle);
21376
- // URL param with validation
21377
- if (spotterDocumentationUrl !== undefined) {
21378
- const [isValid, validationError] = validateHttpUrl(spotterDocumentationUrl);
21379
- if (isValid) {
21380
- params[Param.SpotterDocumentationUrl] = spotterDocumentationUrl;
21381
- }
21382
- else {
21383
- this.handleError({
21384
- errorType: exports.ErrorDetailsTypes.VALIDATION_ERROR,
21385
- message: ERROR_MESSAGE.INVALID_SPOTTER_DOCUMENTATION_URL,
21386
- code: exports.EmbedErrorCodes.INVALID_URL,
21387
- error: (validationError === null || validationError === void 0 ? void 0 : validationError.message) || ERROR_MESSAGE.INVALID_SPOTTER_DOCUMENTATION_URL,
21388
- });
21389
- }
21390
- }
21391
- }
21392
21621
  // Handle spotterChatConfig params
21393
21622
  if (spotterChatConfig) {
21394
21623
  const { hideToolResponseCardBranding, toolResponseCardBrandingLabel, } = spotterChatConfig;
@@ -21464,6 +21693,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
21464
21693
  if (enableHomepageAnnouncement !== undefined) {
21465
21694
  params[Param.EnableHomepageAnnouncement] = enableHomepageAnnouncement;
21466
21695
  }
21696
+ if (isContinuousLiveboardPDFEnabled !== undefined) {
21697
+ params[Param.IsWYSIWYGLiveboardPDFEnabled] = isContinuousLiveboardPDFEnabled;
21698
+ }
21467
21699
  this.defaultHeight = minimumHeight || this.defaultHeight;
21468
21700
  params[Param.DataPanelV2Enabled] = dataPanelV2;
21469
21701
  params[Param.HideHomepageLeftNav] = hideHomepageLeftNav;
@@ -21739,7 +21971,10 @@ query GetEurekaVizSnapshots(
21739
21971
  this.defaultHeight = 500;
21740
21972
  this.sendFullHeightLazyLoadData = () => {
21741
21973
  const data = calculateVisibleElementData(this.iFrame);
21742
- this.trigger(exports.HostEvent.VisibleEmbedCoordinates, data);
21974
+ // this should be fired only if the lazyLoadingForFullHeight and fullHeight are true
21975
+ if (this.viewConfig.lazyLoadingForFullHeight && this.viewConfig.fullHeight) {
21976
+ this.trigger(exports.HostEvent.VisibleEmbedCoordinates, data);
21977
+ }
21743
21978
  };
21744
21979
  /**
21745
21980
  * This is a handler for the RequestVisibleEmbedCoordinates event.
@@ -21752,21 +21987,13 @@ query GetEurekaVizSnapshots(
21752
21987
  const visibleCoordinatesData = calculateVisibleElementData(this.iFrame);
21753
21988
  responder({ type: exports.EmbedEvent.RequestVisibleEmbedCoordinates, data: visibleCoordinatesData });
21754
21989
  };
21755
- this.HEIGHT_CHANAGE_THRESHOLD = 30;
21756
21990
  /**
21757
21991
  * Set the iframe height as per the computed height received
21758
21992
  * from the ThoughtSpot app.
21759
21993
  * @param data The event payload
21760
21994
  */
21761
21995
  this.updateIFrameHeight = (data) => {
21762
- const currentHeight = this.iFrame.getBoundingClientRect().height;
21763
- const heightToSet = Math.max(data.data, this.defaultHeight);
21764
- const heightChange = Math.abs(heightToSet - currentHeight);
21765
- if (heightChange < this.HEIGHT_CHANAGE_THRESHOLD) {
21766
- logger$3.info('Height change is less than the threshold, skipping height update', { heightChange, heightToSet, currentHeight });
21767
- return;
21768
- }
21769
- this.setIFrameHeight(heightToSet);
21996
+ this.setIFrameHeight(Math.max(data.data, this.defaultHeight));
21770
21997
  this.sendFullHeightLazyLoadData();
21771
21998
  };
21772
21999
  this.embedIframeCenter = (data, responder) => {
@@ -21827,7 +22054,7 @@ query GetEurekaVizSnapshots(
21827
22054
  getEmbedParamsObject() {
21828
22055
  let params = {};
21829
22056
  params = this.getBaseQueryParams(params);
21830
- 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;
22057
+ 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;
21831
22058
  const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
21832
22059
  || this.viewConfig.preventPinboardFilterRemoval;
21833
22060
  if (fullHeight === true) {
@@ -21916,6 +22143,9 @@ query GetEurekaVizSnapshots(
21916
22143
  if (isThisPeriodInDateFiltersEnabled !== undefined) {
21917
22144
  params[Param.IsThisPeriodInDateFiltersEnabled] = isThisPeriodInDateFiltersEnabled;
21918
22145
  }
22146
+ if (isContinuousLiveboardPDFEnabled !== undefined) {
22147
+ params[Param.IsWYSIWYGLiveboardPDFEnabled] = isContinuousLiveboardPDFEnabled;
22148
+ }
21919
22149
  params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
21920
22150
  params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
21921
22151
  params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;
@@ -22932,14 +23162,24 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
22932
23162
  super(container, viewConfig);
22933
23163
  this.viewConfig = viewConfig;
22934
23164
  }
23165
+ /**
23166
+ * Extends the default APP_INIT payload with `embedParams.spotterSidebarConfig`
23167
+ * so the conv-assist app can read sidebar configuration on initialisation.
23168
+ *
23169
+ * Precedence for `enablePastConversationsSidebar`:
23170
+ * `spotterSidebarConfig.enablePastConversationsSidebar` wins over the
23171
+ * deprecated top-level `enablePastConversationsSidebar` flag; if the former
23172
+ * is absent the latter is used as a fallback.
23173
+ *
23174
+ * An invalid `spotterDocumentationUrl` triggers a validation error and is
23175
+ * excluded from the payload rather than forwarded to the app.
23176
+ */
23177
+ async getAppInitData() {
23178
+ const defaultAppInitData = await super.getAppInitData();
23179
+ return buildSpotterSidebarAppInitData(defaultAppInitData, this.viewConfig, this.handleError.bind(this));
23180
+ }
22935
23181
  getEmbedParamsObject() {
22936
- const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, updatedSpotterChatPrompt, spotterSidebarConfig, spotterChatConfig, } = this.viewConfig;
22937
- // Extract sidebar config properties
22938
- const { enablePastConversationsSidebar: sidebarEnablePastConversationsSidebar, spotterSidebarTitle, spotterSidebarDefaultExpanded, spotterChatRenameLabel, spotterChatDeleteLabel, spotterDeleteConversationModalTitle, spotterPastConversationAlertMessage, spotterDocumentationUrl, spotterBestPracticesLabel, spotterConversationsBatchSize, spotterNewChatButtonTitle, } = spotterSidebarConfig || {};
22939
- const resolvedEnablePastConversationsSidebar = resolveEnablePastConversationsSidebar({
22940
- spotterSidebarConfigValue: sidebarEnablePastConversationsSidebar,
22941
- standaloneValue: this.viewConfig.enablePastConversationsSidebar,
22942
- });
23182
+ const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, updatedSpotterChatPrompt, spotterChatConfig, } = this.viewConfig;
22943
23183
  if (!worksheetId) {
22944
23184
  this.handleError({
22945
23185
  errorType: exports.ErrorDetailsTypes.VALIDATION_ERROR,
@@ -22957,32 +23197,6 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
22957
23197
  setParamIfDefined(queryParams, Param.ShowSpotterLimitations, showSpotterLimitations, true);
22958
23198
  setParamIfDefined(queryParams, Param.HideSampleQuestions, hideSampleQuestions, true);
22959
23199
  setParamIfDefined(queryParams, Param.UpdatedSpotterChatPrompt, updatedSpotterChatPrompt, true);
22960
- setParamIfDefined(queryParams, Param.EnablePastConversationsSidebar, resolvedEnablePastConversationsSidebar, true);
22961
- setParamIfDefined(queryParams, Param.SpotterSidebarDefaultExpanded, spotterSidebarDefaultExpanded, true);
22962
- // String params
22963
- setParamIfDefined(queryParams, Param.SpotterSidebarTitle, spotterSidebarTitle);
22964
- setParamIfDefined(queryParams, Param.SpotterChatRenameLabel, spotterChatRenameLabel);
22965
- setParamIfDefined(queryParams, Param.SpotterChatDeleteLabel, spotterChatDeleteLabel);
22966
- setParamIfDefined(queryParams, Param.SpotterDeleteConversationModalTitle, spotterDeleteConversationModalTitle);
22967
- setParamIfDefined(queryParams, Param.SpotterPastConversationAlertMessage, spotterPastConversationAlertMessage);
22968
- setParamIfDefined(queryParams, Param.SpotterBestPracticesLabel, spotterBestPracticesLabel);
22969
- setParamIfDefined(queryParams, Param.SpotterConversationsBatchSize, spotterConversationsBatchSize);
22970
- setParamIfDefined(queryParams, Param.SpotterNewChatButtonTitle, spotterNewChatButtonTitle);
22971
- // URL param with validation
22972
- if (spotterDocumentationUrl !== undefined) {
22973
- const [isValid, validationError] = validateHttpUrl(spotterDocumentationUrl);
22974
- if (isValid) {
22975
- queryParams[Param.SpotterDocumentationUrl] = spotterDocumentationUrl;
22976
- }
22977
- else {
22978
- this.handleError({
22979
- errorType: exports.ErrorDetailsTypes.VALIDATION_ERROR,
22980
- message: ERROR_MESSAGE.INVALID_SPOTTER_DOCUMENTATION_URL,
22981
- code: exports.EmbedErrorCodes.INVALID_URL,
22982
- error: (validationError === null || validationError === void 0 ? void 0 : validationError.message) || ERROR_MESSAGE.INVALID_SPOTTER_DOCUMENTATION_URL,
22983
- });
22984
- }
22985
- }
22986
23200
  // Handle spotterChatConfig params
22987
23201
  if (spotterChatConfig) {
22988
23202
  const { hideToolResponseCardBranding, toolResponseCardBrandingLabel, } = spotterChatConfig;