@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
@@ -784,6 +784,42 @@ export interface CustomCssVariables {
784
784
  * Color for section title text (e.g., "Recent", "Older") in the saved chats sidebar.
785
785
  */
786
786
  "--ts-var-saved-chats-section-title-color"?: string;
787
+ /**
788
+ * Text color of the styling panel in the Liveboard.
789
+ */
790
+ "--ts-var-liveboard-styling-panel-text-color"?: string;
791
+ /**
792
+ * Border color of the styling panel in the Liveboard.
793
+ */
794
+ "--ts-var-liveboard-styling-panel-border-color"?: string;
795
+ /**
796
+ * Background color of the styling button in the Liveboard.
797
+ */
798
+ "--ts-var-liveboard-styling-button-background"?: string;
799
+ /**
800
+ * Text color of the styling button in the Liveboard.
801
+ */
802
+ "--ts-var-liveboard-styling-button-text-color"?: string;
803
+ /**
804
+ * Background color of the styling button in the Liveboard on hover.
805
+ */
806
+ "--ts-var-liveboard-styling-button-hover-background"?: string;
807
+ /**
808
+ * Background color of the styling button in the Liveboard when active.
809
+ */
810
+ "--ts-var-liveboard-styling-button-active-background"?: string;
811
+ /**
812
+ * Text color of the styling button in the Liveboard on hover.
813
+ */
814
+ "--ts-var-liveboard-styling-button-hover-text-color"?: string;
815
+ /**
816
+ * Box shadow of the styling button in the Liveboard.
817
+ */
818
+ "--ts-var-liveboard-styling-button-shadow"?: string;
819
+ /**
820
+ * Background color of the color palette in the Liveboard styling panel.
821
+ */
822
+ "--ts-var-liveboard-styling-color-palette-background"?: string;
787
823
  }
788
824
  export interface SessionInterface {
789
825
  sessionId: string;
@@ -3630,6 +3666,17 @@ export enum EmbedEvent {
3630
3666
  * ```
3631
3667
  */
3632
3668
  DownloadAsXlsx = "downloadAsXlsx",
3669
+ /**
3670
+ * Emitted when the Download Liveboard as Continuous PDF action is triggered
3671
+ * on a Liveboard.
3672
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
3673
+ * @example
3674
+ * ```js
3675
+ * liveboardEmbed.on(EmbedEvent.DownloadLiveboardAsContinuousPDF, payload => {
3676
+ * console.log('download liveboard as continuous PDF', payload)})
3677
+ * ```
3678
+ */
3679
+ DownloadLiveboardAsContinuousPDF = "downloadLiveboardAsContinuousPDF",
3633
3680
  /**
3634
3681
  * Emitted when an Answer is deleted in the app
3635
3682
  * Use start:true to subscribe to when delete is initiated, or end:true to subscribe
@@ -5157,6 +5204,18 @@ export enum HostEvent {
5157
5204
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
5158
5205
  */
5159
5206
  DownloadAsPdf = "downloadAsPdf",
5207
+ /**
5208
+ * Trigger the **Download Liveboard as Continuous PDF** action on an
5209
+ * embedded Liveboard.
5210
+ *
5211
+ * @example
5212
+ * ```js
5213
+ * liveboardEmbed.trigger(HostEvent.DownloadLiveboardAsContinuousPDF)
5214
+ * ```
5215
+ *
5216
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
5217
+ */
5218
+ DownloadLiveboardAsContinuousPDF = "downloadLiveboardAsContinuousPDF",
5160
5219
  /**
5161
5220
  * Trigger the **AI Highlights** action on an embedded Liveboard
5162
5221
  *
@@ -5383,6 +5442,20 @@ export enum HostEvent {
5383
5442
  * vizId: '730496d6-6903-4601-937e-2c691821af3c'
5384
5443
  * }, ContextType.Liveboard);
5385
5444
  * ```
5445
+ * @example
5446
+ * ```js
5447
+ * // Copy link from liveboard context
5448
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5449
+ * liveboardEmbed.trigger(HostEvent.CopyLink, {}, ContextType.Liveboard);
5450
+ * ```
5451
+ * @example
5452
+ * ```js
5453
+ * // Copy link from liveboard visualization context
5454
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5455
+ * liveboardEmbed.trigger(HostEvent.CopyLink, {
5456
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
5457
+ * }, ContextType.Liveboard);
5458
+ * ```
5386
5459
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
5387
5460
  */
5388
5461
  CopyLink = "embedDocument",
@@ -5414,6 +5487,20 @@ export enum HostEvent {
5414
5487
  * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5415
5488
  * liveboardEmbed.trigger(HostEvent.Present, {}, ContextType.Liveboard);
5416
5489
  * ```
5490
+ * @example
5491
+ * ```js
5492
+ * // Present from liveboard visualization context
5493
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5494
+ * liveboardEmbed.trigger(HostEvent.Present, {
5495
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
5496
+ * }, ContextType.Liveboard);
5497
+ * ```
5498
+ * @example
5499
+ * ```js
5500
+ * // Present from liveboard context
5501
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5502
+ * liveboardEmbed.trigger(HostEvent.Present, {}, ContextType.Liveboard);
5503
+ * ```
5417
5504
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
5418
5505
  */
5419
5506
  Present = "present",
@@ -6899,6 +6986,16 @@ export enum Action {
6899
6986
  * @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl
6900
6987
  */
6901
6988
  DownloadLiveboard = "downloadLiveboard",
6989
+ /**
6990
+ * The **Download Liveboard as Continuous PDF** menu action on a Liveboard.
6991
+ * Allows downloading the entire Liveboard as a continuous PDF.
6992
+ * @example
6993
+ * ```js
6994
+ * disabledActions: [Action.DownloadLiveboardAsContinuousPDF]
6995
+ * ```
6996
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
6997
+ */
6998
+ DownloadLiveboardAsContinuousPDF = "downloadLiveboardAsContinuousPDF",
6902
6999
  /**
6903
7000
  * @hidden
6904
7001
  */
@@ -8114,6 +8211,39 @@ export enum Action {
8114
8211
  * @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
8115
8212
  */
8116
8213
  SpotterDocs = "spotterDocs",
8214
+ /**
8215
+ * Controls visibility and disable state of the connector resources
8216
+ * section in the Spotter chat interface.
8217
+ * @example
8218
+ * ```js
8219
+ * hiddenActions: [Action.SpotterChatConnectorResources]
8220
+ * disabledActions: [Action.SpotterChatConnectorResources]
8221
+ * ```
8222
+ * @version SDK: 1.48.0 | ThoughtSpot Cloud: 26.5.0.cl
8223
+ */
8224
+ SpotterChatConnectorResources = "spotterChatConnectorResources",
8225
+ /**
8226
+ * Controls visibility and disable state of the connectors
8227
+ * in the Spotter chat interface.
8228
+ * @example
8229
+ * ```js
8230
+ * hiddenActions: [Action.SpotterChatConnectors]
8231
+ * disabledActions: [Action.SpotterChatConnectors]
8232
+ * ```
8233
+ * @version SDK: 1.48.0 | ThoughtSpot Cloud: 26.5.0.cl
8234
+ */
8235
+ SpotterChatConnectors = "spotterChatConnectors",
8236
+ /**
8237
+ * Controls visibility and disable state of the mode switcher
8238
+ * in the Spotter chat interface.
8239
+ * @example
8240
+ * ```js
8241
+ * hiddenActions: [Action.SpotterChatModeSwitcher]
8242
+ * disabledActions: [Action.SpotterChatModeSwitcher]
8243
+ * ```
8244
+ * @version SDK: 1.48.0 | ThoughtSpot Cloud: 26.5.0.cl
8245
+ */
8246
+ SpotterChatModeSwitcher = "spotterChatModeSwitcher",
8117
8247
  /**
8118
8248
  * The **Include current period** checkbox for date filters.
8119
8249
  * Controls the visibility and availability of the option to include
@@ -8457,7 +8587,13 @@ export enum EmbedErrorCodes {
8457
8587
  /** Failed to update embed parameters during pre-render */
8458
8588
  UPDATE_PARAMS_FAILED = "UPDATE_PARAMS_FAILED",
8459
8589
  /** Invalid URL provided in configuration */
8460
- INVALID_URL = "INVALID_URL"
8590
+ INVALID_URL = "INVALID_URL",
8591
+ /** Host event payload validation failed */
8592
+ HOST_EVENT_VALIDATION = "HOST_EVENT_VALIDATION",
8593
+ /** UpdateFilters payload is invalid - missing or malformed filter/filters */
8594
+ UPDATEFILTERS_INVALID_PAYLOAD = "UPDATEFILTERS_INVALID_PAYLOAD",
8595
+ /** DrillDown payload is invalid - missing or malformed points */
8596
+ DRILLDOWN_INVALID_PAYLOAD = "DRILLDOWN_INVALID_PAYLOAD"
8461
8597
  }
8462
8598
  /**
8463
8599
  * Error event object emitted when an error occurs in an embedded component.
@@ -8701,6 +8837,8 @@ export enum UIPassthroughEvent {
8701
8837
  GetAnswerConfig = "getAnswerPageConfig",
8702
8838
  GetLiveboardConfig = "getPinboardPageConfig",
8703
8839
  GetUnsavedAnswerTML = "getUnsavedAnswerTML",
8840
+ UpdateFilters = "updateFilters",
8841
+ Drilldown = "drillDown",
8704
8842
  GetAnswerSession = "getAnswerSession",
8705
8843
  GetFilters = "getFilters",
8706
8844
  GetIframeUrl = "getIframeUrl",
@@ -8822,6 +8960,35 @@ export type UIPassthroughContractBase = {
8822
8960
  v2Content: string;
8823
8961
  };
8824
8962
  };
8963
+ [UIPassthroughEvent.UpdateFilters]: {
8964
+ request: {
8965
+ filter?: {
8966
+ column: string;
8967
+ oper: string;
8968
+ values: string[];
8969
+ type?: string;
8970
+ };
8971
+ filters?: {
8972
+ column: string;
8973
+ oper: string;
8974
+ values: string[];
8975
+ type?: string;
8976
+ }[];
8977
+ };
8978
+ response: unknown;
8979
+ };
8980
+ [UIPassthroughEvent.Drilldown]: {
8981
+ request: {
8982
+ points: {
8983
+ selectedPoints?: string[];
8984
+ clickedPoint?: string;
8985
+ };
8986
+ columnGuid?: string;
8987
+ autoDrillDown?: boolean;
8988
+ vizId?: string;
8989
+ };
8990
+ response: unknown;
8991
+ };
8825
8992
  };
8826
8993
  export type UIPassthroughRequest<T extends keyof UIPassthroughContractBase> = UIPassthroughContractBase[T]["request"];
8827
8994
  export type UIPassthroughResponse<T extends keyof UIPassthroughContractBase> = UIPassthroughContractBase[T]["response"];
@@ -8847,6 +9014,8 @@ export type TriggerPayload<PayloadT, HostEventT extends HostEvent> = PayloadT |
8847
9014
  export type TriggerResponse<PayloadT, HostEventT extends HostEvent, ContextT extends ContextType> = PayloadT extends HostEventRequest<HostEventT> ? HostEventResponse<HostEventT, ContextT> : any;
8848
9015
  class HostEventClient {
8849
9016
  iFrame: HTMLIFrameElement;
9017
+ /** Cached list of available UI passthrough keys from the embedded app */
9018
+ private availablePassthroughKeysCache;
8850
9019
  /** Host events with custom handlers
8851
9020
  * (setters or special logic) -
8852
9021
  * bound to instance for protected method access */
@@ -8872,9 +9041,25 @@ class HostEventClient {
8872
9041
  * @param {HTMLIFrameElement} iFrame - the iframe element to set
8873
9042
  */
8874
9043
  setIframeElement(iFrame: HTMLIFrameElement): void;
9044
+ /**
9045
+ * Fetches the list of available UI passthrough keys from the embedded app.
9046
+ * Result is cached for the session. Returns empty array on failure.
9047
+ */
9048
+ private getAvailableUIPassthroughKeys;
8875
9049
  triggerUIPassthroughApi<UIPassthroughEventT extends UIPassthroughEvent>(apiName: UIPassthroughEventT, parameters: UIPassthroughRequest<UIPassthroughEventT>, context?: ContextType): Promise<UIPassthroughArrayResponse<UIPassthroughEventT>>;
8876
9050
  protected handlePinEvent(payload: HostEventRequest<HostEvent.Pin>, context?: ContextType): Promise<HostEventResponse<HostEvent.Pin, ContextType>>;
8877
9051
  protected handleSaveAnswerEvent(payload: HostEventRequest<HostEvent.SaveAnswer>, context?: ContextType): Promise<any>;
9052
+ protected handleUpdateFiltersEvent(payload: HostEventRequest<HostEvent.UpdateFilters>, context?: ContextType): Promise<any>;
9053
+ protected handleDrillDownEvent(payload: HostEventRequest<HostEvent.DrillDown>, context?: ContextType): Promise<any>;
9054
+ /**
9055
+ * Dispatches a host event using the appropriate channel:
9056
+ * 1. If the embedded app supports UI passthrough for this event, use it (custom handler or getter).
9057
+ * 2. Otherwise fall back to the legacy host event channel.
9058
+ *
9059
+ * @param hostEvent - The host event to trigger
9060
+ * @param payload - Optional payload for the event
9061
+ * @param context - Optional context (e.g. vizId) for scoped operations
9062
+ */
8878
9063
  triggerHostEvent<HostEventT extends HostEvent, PayloadT, ContextT extends ContextType>(hostEvent: HostEventT, payload?: TriggerPayload<PayloadT, HostEventT>, context?: ContextT): Promise<TriggerResponse<PayloadT, HostEventT, ContextType>>;
8879
9064
  }
8880
9065
  class TsEmbed {
@@ -9721,6 +9906,15 @@ export interface SpotterEmbedViewConfig extends Omit<BaseViewConfig, "primaryAct
9721
9906
  */
9722
9907
  export interface ConversationViewConfig extends SpotterEmbedViewConfig {
9723
9908
  }
9909
+ /**
9910
+ * APP_INIT data shape for SpotterEmbed.
9911
+ * @internal
9912
+ */
9913
+ export interface SpotterAppInitData extends DefaultAppInitData {
9914
+ embedParams?: {
9915
+ spotterSidebarConfig?: SpotterSidebarViewConfig;
9916
+ };
9917
+ }
9724
9918
  /**
9725
9919
  * Embed ThoughtSpot AI Conversation.
9726
9920
  * @version SDK: 1.37.0 | ThoughtSpot: 10.9.0.cl
@@ -9739,6 +9933,19 @@ export interface ConversationViewConfig extends SpotterEmbedViewConfig {
9739
9933
  export class SpotterEmbed extends TsEmbed {
9740
9934
  protected viewConfig: SpotterEmbedViewConfig;
9741
9935
  constructor(container: HTMLElement, viewConfig: SpotterEmbedViewConfig);
9936
+ /**
9937
+ * Extends the default APP_INIT payload with `embedParams.spotterSidebarConfig`
9938
+ * so the conv-assist app can read sidebar configuration on initialisation.
9939
+ *
9940
+ * Precedence for `enablePastConversationsSidebar`:
9941
+ * `spotterSidebarConfig.enablePastConversationsSidebar` wins over the
9942
+ * deprecated top-level `enablePastConversationsSidebar` flag; if the former
9943
+ * is absent the latter is used as a fallback.
9944
+ *
9945
+ * An invalid `spotterDocumentationUrl` triggers a validation error and is
9946
+ * excluded from the payload rather than forwarded to the app.
9947
+ */
9948
+ protected getAppInitData(): Promise<SpotterAppInitData>;
9742
9949
  protected getEmbedParamsObject(): Record<any, any>;
9743
9950
  getIframeSrc(): string;
9744
9951
  render(): Promise<SpotterEmbed>;
@@ -10316,6 +10523,24 @@ export interface AppViewConfig extends AllEmbedViewConfig {
10316
10523
  * ```
10317
10524
  */
10318
10525
  isPNGInScheduledEmailsEnabled?: boolean;
10526
+ /**
10527
+ * Enables the 'what you see is what you get' PDF export for Liveboards. Each tab is rendered on a single page
10528
+ * following the exact UI layout, instead of splitting visualizations across multiple A4 pages.
10529
+ * This feature is GA from version 26.5.0.cl and is enabled by default on embed deployments.
10530
+ *
10531
+ * Supported embed types: `AppEmbed`, `LiveboardEmbed`
10532
+ * @type {boolean}
10533
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
10534
+ * @example
10535
+ * ```js
10536
+ * // Replace <EmbedComponent> with embed component name. For example, AppEmbed or LiveboardEmbed
10537
+ * const embed = new <EmbedComponent>('#tsEmbed', {
10538
+ * ... // other embed view config
10539
+ * isContinuousLiveboardPDFEnabled: true,
10540
+ * })
10541
+ * ```
10542
+ */
10543
+ isContinuousLiveboardPDFEnabled?: boolean;
10319
10544
  /**
10320
10545
  * This flag is used to enable/disable the XLSX/CSV download option for Liveboards
10321
10546
  *
@@ -10484,6 +10709,15 @@ export interface AppViewConfig extends AllEmbedViewConfig {
10484
10709
  */
10485
10710
  enableHomepageAnnouncement?: boolean;
10486
10711
  }
10712
+ /**
10713
+ * APP_INIT data shape for AppEmbed.
10714
+ * @internal
10715
+ */
10716
+ export interface AppEmbedAppInitData extends DefaultAppInitData {
10717
+ embedParams?: {
10718
+ spotterSidebarConfig?: SpotterSidebarViewConfig;
10719
+ };
10720
+ }
10487
10721
  /**
10488
10722
  * Embeds full ThoughtSpot experience in a host application.
10489
10723
  * @group Embed components
@@ -10492,6 +10726,19 @@ export class AppEmbed extends V1Embed {
10492
10726
  protected viewConfig: AppViewConfig;
10493
10727
  private defaultHeight;
10494
10728
  constructor(domSelector: DOMSelector, viewConfig: AppViewConfig);
10729
+ /**
10730
+ * Extends the default APP_INIT payload with `embedParams.spotterSidebarConfig`
10731
+ * so the conv-assist app can read sidebar configuration on initialisation.
10732
+ *
10733
+ * Precedence for `enablePastConversationsSidebar`:
10734
+ * `spotterSidebarConfig.enablePastConversationsSidebar` wins over the
10735
+ * deprecated top-level `enablePastConversationsSidebar` flag; if the former
10736
+ * is absent the latter is used as a fallback.
10737
+ *
10738
+ * An invalid `spotterDocumentationUrl` triggers a validation error and is
10739
+ * excluded from the payload rather than forwarded to the app.
10740
+ */
10741
+ protected getAppInitData(): Promise<AppEmbedAppInitData>;
10495
10742
  /**
10496
10743
  * Constructs a map of parameters to be passed on to the
10497
10744
  * embedded Liveboard or visualization.
@@ -10510,7 +10757,6 @@ export class AppEmbed extends V1Embed {
10510
10757
  * @param pageId The ID of the page to be embedded.
10511
10758
  */
10512
10759
  getIFrameSrc(): string;
10513
- private HEIGHT_CHANAGE_THRESHOLD;
10514
10760
  /**
10515
10761
  * Set the iframe height as per the computed height received
10516
10762
  * from the ThoughtSpot app.
@@ -11193,6 +11439,24 @@ export interface LiveboardViewConfig extends BaseViewConfig, SearchLiveboardComm
11193
11439
  * ```
11194
11440
  */
11195
11441
  isPNGInScheduledEmailsEnabled?: boolean;
11442
+ /**
11443
+ * Enables the 'what you see is what you get' PDF export for Liveboards. Each tab is rendered on a single page
11444
+ * following the exact UI layout, instead of splitting visualizations across multiple A4 pages.
11445
+ * This feature is GA from version 26.5.0.cl and is enabled by default on embed deployments.
11446
+ *
11447
+ * Supported embed types: `AppEmbed`, `LiveboardEmbed`
11448
+ * @type {boolean}
11449
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
11450
+ * @example
11451
+ * ```js
11452
+ * // Replace <EmbedComponent> with embed component name. For example, AppEmbed or LiveboardEmbed
11453
+ * const embed = new <EmbedComponent>('#tsEmbed', {
11454
+ * ... // other embed view config
11455
+ * isContinuousLiveboardPDFEnabled: true,
11456
+ * })
11457
+ * ```
11458
+ */
11459
+ isContinuousLiveboardPDFEnabled?: boolean;
11196
11460
  /**
11197
11461
  * This flag is used to enable/disable the XLSX/CSV download option for Liveboards
11198
11462
  *
@@ -11353,7 +11617,6 @@ export class LiveboardEmbed extends V1Embed {
11353
11617
  * to be loaded within the iFrame.
11354
11618
  */
11355
11619
  private getIFrameSrc;
11356
- private HEIGHT_CHANAGE_THRESHOLD;
11357
11620
  /**
11358
11621
  * Set the iframe height as per the computed height received
11359
11622
  * from the ThoughtSpot app.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thoughtspot/visual-embed-sdk",
3
- "version": "1.46.5-beta.1",
3
+ "version": "1.46.5",
4
4
  "description": "ThoughtSpot Embed SDK",
5
5
  "module": "lib/src/index.js",
6
6
  "main": "dist/tsembed.js",
@@ -38,7 +38,7 @@
38
38
  "size-limit": [
39
39
  {
40
40
  "path": "dist/tsembed.es.js",
41
- "limit": "32 kB"
41
+ "limit": "34 kB"
42
42
  }
43
43
  ],
44
44
  "scripts": {
@@ -57,7 +57,7 @@
57
57
  "test": "npm run test-sdk",
58
58
  "posttest": "cat ./coverage/sdk/lcov.info | npx coveralls-next || echo 'Warning: Coveralls upload failed but not breaking the build.'",
59
59
  "is-publish-allowed": "node scripts/is-publish-allowed.js",
60
- "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",
60
+ "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",
61
61
  "check-size": "npm run build && size-limit",
62
62
  "publish-dev": "npm publish --tag dev",
63
63
  "publish-prod": "npm publish --tag latest",
@@ -133,7 +133,7 @@
133
133
  "react-resize-detector": "^6.6.0",
134
134
  "react-test-renderer": "^17.0.2",
135
135
  "react-use-flexsearch": "^0.1.1",
136
- "rollup": "4.24.0",
136
+ "rollup": "4.59.0",
137
137
  "rollup-plugin-typescript2": "0.27.3",
138
138
  "ts-jest": "^29.4.6",
139
139
  "ts-loader": "8.0.4",
@@ -946,4 +946,49 @@ export interface CustomCssVariables {
946
946
  * Color for section title text (e.g., "Recent", "Older") in the saved chats sidebar.
947
947
  */
948
948
  '--ts-var-saved-chats-section-title-color'?: string;
949
+
950
+ /**
951
+ * Text color of the styling panel in the Liveboard.
952
+ */
953
+ '--ts-var-liveboard-styling-panel-text-color'?: string;
954
+
955
+ /**
956
+ * Border color of the styling panel in the Liveboard.
957
+ */
958
+ '--ts-var-liveboard-styling-panel-border-color'?: string;
959
+
960
+ /**
961
+ * Background color of the styling button in the Liveboard.
962
+ */
963
+ '--ts-var-liveboard-styling-button-background'?: string;
964
+
965
+ /**
966
+ * Text color of the styling button in the Liveboard.
967
+ */
968
+ '--ts-var-liveboard-styling-button-text-color'?: string;
969
+
970
+ /**
971
+ * Background color of the styling button in the Liveboard on hover.
972
+ */
973
+ '--ts-var-liveboard-styling-button-hover-background'?: string;
974
+
975
+ /**
976
+ * Background color of the styling button in the Liveboard when active.
977
+ */
978
+ '--ts-var-liveboard-styling-button-active-background'?: string;
979
+
980
+ /**
981
+ * Text color of the styling button in the Liveboard on hover.
982
+ */
983
+ '--ts-var-liveboard-styling-button-hover-text-color'?: string;
984
+
985
+ /**
986
+ * Box shadow of the styling button in the Liveboard.
987
+ */
988
+ '--ts-var-liveboard-styling-button-shadow'?: string;
989
+
990
+ /**
991
+ * Background color of the color palette in the Liveboard styling panel.
992
+ */
993
+ '--ts-var-liveboard-styling-color-palette-background'?: string;
949
994
  }