@thoughtspot/visual-embed-sdk 1.45.2 → 1.45.3

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 (140) hide show
  1. package/cjs/package.json +1 -1
  2. package/cjs/src/css-variables.d.ts +48 -0
  3. package/cjs/src/css-variables.d.ts.map +1 -1
  4. package/cjs/src/embed/app.d.ts +37 -0
  5. package/cjs/src/embed/app.d.ts.map +1 -1
  6. package/cjs/src/embed/app.js +37 -1
  7. package/cjs/src/embed/app.js.map +1 -1
  8. package/cjs/src/embed/app.spec.js +24 -0
  9. package/cjs/src/embed/app.spec.js.map +1 -1
  10. package/cjs/src/embed/conversation.d.ts +127 -9
  11. package/cjs/src/embed/conversation.d.ts.map +1 -1
  12. package/cjs/src/embed/conversation.js +41 -18
  13. package/cjs/src/embed/conversation.js.map +1 -1
  14. package/cjs/src/embed/conversation.spec.js +96 -3
  15. package/cjs/src/embed/conversation.spec.js.map +1 -1
  16. package/cjs/src/embed/liveboard.d.ts +38 -1
  17. package/cjs/src/embed/liveboard.d.ts.map +1 -1
  18. package/cjs/src/embed/liveboard.js +38 -10
  19. package/cjs/src/embed/liveboard.js.map +1 -1
  20. package/cjs/src/embed/liveboard.spec.js +179 -7
  21. package/cjs/src/embed/liveboard.spec.js.map +1 -1
  22. package/cjs/src/errors.d.ts +1 -0
  23. package/cjs/src/errors.d.ts.map +1 -1
  24. package/cjs/src/errors.js +1 -0
  25. package/cjs/src/errors.js.map +1 -1
  26. package/cjs/src/index.d.ts +3 -3
  27. package/cjs/src/index.d.ts.map +1 -1
  28. package/cjs/src/index.js.map +1 -1
  29. package/cjs/src/types.d.ts +192 -40
  30. package/cjs/src/types.d.ts.map +1 -1
  31. package/cjs/src/types.js +184 -19
  32. package/cjs/src/types.js.map +1 -1
  33. package/cjs/src/utils/graphql/answerService/answer-queries.d.ts +1 -0
  34. package/cjs/src/utils/graphql/answerService/answer-queries.d.ts.map +1 -1
  35. package/cjs/src/utils/graphql/answerService/answer-queries.js +23 -1
  36. package/cjs/src/utils/graphql/answerService/answer-queries.js.map +1 -1
  37. package/cjs/src/utils/graphql/answerService/answerService.d.ts +2 -1
  38. package/cjs/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
  39. package/cjs/src/utils/graphql/answerService/answerService.js +9 -1
  40. package/cjs/src/utils/graphql/answerService/answerService.js.map +1 -1
  41. package/cjs/src/utils/graphql/answerService/answerService.spec.js +73 -0
  42. package/cjs/src/utils/graphql/answerService/answerService.spec.js.map +1 -1
  43. package/cjs/src/utils.d.ts +15 -0
  44. package/cjs/src/utils.d.ts.map +1 -1
  45. package/cjs/src/utils.js +33 -1
  46. package/cjs/src/utils.js.map +1 -1
  47. package/cjs/src/utils.spec.js +49 -0
  48. package/cjs/src/utils.spec.js.map +1 -1
  49. package/dist/{index-BdkKLLo1.js → index-BuwECGdm.js} +1 -1
  50. package/dist/src/css-variables.d.ts +48 -0
  51. package/dist/src/css-variables.d.ts.map +1 -1
  52. package/dist/src/embed/app.d.ts +37 -0
  53. package/dist/src/embed/app.d.ts.map +1 -1
  54. package/dist/src/embed/conversation.d.ts +127 -9
  55. package/dist/src/embed/conversation.d.ts.map +1 -1
  56. package/dist/src/embed/liveboard.d.ts +38 -1
  57. package/dist/src/embed/liveboard.d.ts.map +1 -1
  58. package/dist/src/errors.d.ts +1 -0
  59. package/dist/src/errors.d.ts.map +1 -1
  60. package/dist/src/index.d.ts +3 -3
  61. package/dist/src/index.d.ts.map +1 -1
  62. package/dist/src/types.d.ts +192 -40
  63. package/dist/src/types.d.ts.map +1 -1
  64. package/dist/src/utils/graphql/answerService/answer-queries.d.ts +1 -0
  65. package/dist/src/utils/graphql/answerService/answer-queries.d.ts.map +1 -1
  66. package/dist/src/utils/graphql/answerService/answerService.d.ts +2 -1
  67. package/dist/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
  68. package/dist/src/utils.d.ts +15 -0
  69. package/dist/src/utils.d.ts.map +1 -1
  70. package/dist/tsembed-react.es.js +364 -52
  71. package/dist/tsembed-react.js +363 -51
  72. package/dist/tsembed.es.js +364 -52
  73. package/dist/tsembed.js +363 -51
  74. package/dist/visual-embed-sdk-react-full.d.ts +696 -342
  75. package/dist/visual-embed-sdk-react.d.ts +685 -331
  76. package/dist/visual-embed-sdk.d.ts +757 -379
  77. package/lib/package.json +1 -1
  78. package/lib/src/css-variables.d.ts +48 -0
  79. package/lib/src/css-variables.d.ts.map +1 -1
  80. package/lib/src/embed/app.d.ts +37 -0
  81. package/lib/src/embed/app.d.ts.map +1 -1
  82. package/lib/src/embed/app.js +39 -3
  83. package/lib/src/embed/app.js.map +1 -1
  84. package/lib/src/embed/app.spec.js +24 -0
  85. package/lib/src/embed/app.spec.js.map +1 -1
  86. package/lib/src/embed/conversation.d.ts +127 -9
  87. package/lib/src/embed/conversation.d.ts.map +1 -1
  88. package/lib/src/embed/conversation.js +42 -19
  89. package/lib/src/embed/conversation.js.map +1 -1
  90. package/lib/src/embed/conversation.spec.js +96 -3
  91. package/lib/src/embed/conversation.spec.js.map +1 -1
  92. package/lib/src/embed/liveboard.d.ts +38 -1
  93. package/lib/src/embed/liveboard.d.ts.map +1 -1
  94. package/lib/src/embed/liveboard.js +39 -11
  95. package/lib/src/embed/liveboard.js.map +1 -1
  96. package/lib/src/embed/liveboard.spec.js +179 -7
  97. package/lib/src/embed/liveboard.spec.js.map +1 -1
  98. package/lib/src/errors.d.ts +1 -0
  99. package/lib/src/errors.d.ts.map +1 -1
  100. package/lib/src/errors.js +1 -0
  101. package/lib/src/errors.js.map +1 -1
  102. package/lib/src/index.d.ts +3 -3
  103. package/lib/src/index.d.ts.map +1 -1
  104. package/lib/src/index.js.map +1 -1
  105. package/lib/src/types.d.ts +192 -40
  106. package/lib/src/types.d.ts.map +1 -1
  107. package/lib/src/types.js +184 -19
  108. package/lib/src/types.js.map +1 -1
  109. package/lib/src/utils/graphql/answerService/answer-queries.d.ts +1 -0
  110. package/lib/src/utils/graphql/answerService/answer-queries.d.ts.map +1 -1
  111. package/lib/src/utils/graphql/answerService/answer-queries.js +22 -0
  112. package/lib/src/utils/graphql/answerService/answer-queries.js.map +1 -1
  113. package/lib/src/utils/graphql/answerService/answerService.d.ts +2 -1
  114. package/lib/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
  115. package/lib/src/utils/graphql/answerService/answerService.js +9 -1
  116. package/lib/src/utils/graphql/answerService/answerService.js.map +1 -1
  117. package/lib/src/utils/graphql/answerService/answerService.spec.js +73 -0
  118. package/lib/src/utils/graphql/answerService/answerService.spec.js.map +1 -1
  119. package/lib/src/utils.d.ts +15 -0
  120. package/lib/src/utils.d.ts.map +1 -1
  121. package/lib/src/utils.js +30 -0
  122. package/lib/src/utils.js.map +1 -1
  123. package/lib/src/utils.spec.js +50 -1
  124. package/lib/src/utils.spec.js.map +1 -1
  125. package/package.json +1 -1
  126. package/src/css-variables.ts +60 -0
  127. package/src/embed/app.spec.ts +32 -0
  128. package/src/embed/app.ts +97 -1
  129. package/src/embed/conversation.spec.ts +117 -3
  130. package/src/embed/conversation.ts +188 -29
  131. package/src/embed/liveboard.spec.ts +264 -10
  132. package/src/embed/liveboard.ts +100 -11
  133. package/src/errors.ts +1 -0
  134. package/src/index.ts +5 -1
  135. package/src/types.ts +193 -40
  136. package/src/utils/graphql/answerService/answer-queries.ts +23 -0
  137. package/src/utils/graphql/answerService/answerService.spec.ts +87 -0
  138. package/src/utils/graphql/answerService/answerService.ts +13 -1
  139. package/src/utils.spec.ts +56 -0
  140. package/src/utils.ts +36 -0
package/dist/tsembed.js CHANGED
@@ -1,4 +1,4 @@
1
- /* @thoughtspot/visual-embed-sdk version 1.45.2 */
1
+ /* @thoughtspot/visual-embed-sdk version 1.45.3 */
2
2
  'use client';
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
@@ -1683,6 +1683,42 @@
1683
1683
  * @version SDK: 1.43.0 | ThoughtSpot: 10.15.0.cl
1684
1684
  */
1685
1685
  EmbedEvent["ApiIntercept"] = "ApiIntercept";
1686
+ /**
1687
+ * Emitted when a Spotter conversation is renamed.
1688
+ * @example
1689
+ * ```js
1690
+ * spotterEmbed.on(EmbedEvent.SpotterConversationRenamed, (payload) => {
1691
+ * console.log('Conversation renamed', payload);
1692
+ * // payload: { convId: string, oldTitle: string, newTitle: string }
1693
+ * })
1694
+ * ```
1695
+ * @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl
1696
+ */
1697
+ EmbedEvent["SpotterConversationRenamed"] = "spotterConversationRenamed";
1698
+ /**
1699
+ * Emitted when a Spotter conversation is deleted.
1700
+ * @example
1701
+ * ```js
1702
+ * spotterEmbed.on(EmbedEvent.SpotterConversationDeleted, (payload) => {
1703
+ * console.log('Conversation deleted', payload);
1704
+ * // payload: { convId: string, title: string }
1705
+ * })
1706
+ * ```
1707
+ * @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl
1708
+ */
1709
+ EmbedEvent["SpotterConversationDeleted"] = "spotterConversationDeleted";
1710
+ /**
1711
+ * Emitted when a Spotter conversation is selected/clicked.
1712
+ * @example
1713
+ * ```js
1714
+ * spotterEmbed.on(EmbedEvent.SpotterConversationSelected, (payload) => {
1715
+ * console.log('Conversation selected', payload);
1716
+ * // payload: { convId: string, title: string, worksheetId: string }
1717
+ * })
1718
+ * ```
1719
+ * @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl
1720
+ */
1721
+ EmbedEvent["SpotterConversationSelected"] = "spotterConversationSelected";
1686
1722
  /**
1687
1723
  * @hidden
1688
1724
  * Emitted when the auth token is about to get expired and needs to be refreshed.
@@ -3245,7 +3281,19 @@
3245
3281
  Param["isLinkParametersEnabled"] = "isLinkParametersEnabled";
3246
3282
  Param["EnablePastConversationsSidebar"] = "enablePastConversationsSidebar";
3247
3283
  Param["UpdatedSpotterChatPrompt"] = "updatedSpotterChatPrompt";
3284
+ Param["SpotterSidebarTitle"] = "spotterSidebarTitle";
3285
+ Param["SpotterSidebarDefaultExpanded"] = "spotterSidebarDefaultExpanded";
3286
+ Param["SpotterChatRenameLabel"] = "spotterChatRenameLabel";
3287
+ Param["SpotterChatDeleteLabel"] = "spotterChatDeleteLabel";
3288
+ Param["SpotterDeleteConversationModalTitle"] = "spotterDeleteConversationModalTitle";
3289
+ Param["SpotterPastConversationAlertMessage"] = "spotterPastConversationAlertMessage";
3290
+ Param["SpotterDocumentationUrl"] = "spotterDocumentationUrl";
3291
+ Param["SpotterBestPracticesLabel"] = "spotterBestPracticesLabel";
3292
+ Param["SpotterConversationsBatchSize"] = "spotterConversationsBatchSize";
3293
+ Param["SpotterNewChatButtonTitle"] = "spotterNewChatButtonTitle";
3248
3294
  Param["IsThisPeriodInDateFiltersEnabled"] = "isThisPeriodInDateFiltersEnabled";
3295
+ Param["HideToolResponseCardBranding"] = "hideToolResponseCardBranding";
3296
+ Param["ToolResponseCardBrandingLabel"] = "toolResponseCardBrandingLabel";
3249
3297
  })(Param || (Param = {}));
3250
3298
  /**
3251
3299
  * ThoughtSpot application pages include actions and menu commands
@@ -4671,6 +4719,96 @@
4671
4719
  * @version SDK: 1.44.0 | ThoughtSpot Cloud: 26.2.0.cl
4672
4720
  */
4673
4721
  Action["UngroupLiveboardGroup"] = "ungroupLiveboardGroup";
4722
+ /**
4723
+ * Controls visibility of the sidebar header (title and toggle button)
4724
+ * in the Spotter past conversations sidebar.
4725
+ * @example
4726
+ * ```js
4727
+ * hiddenActions: [Action.SpotterSidebarHeader]
4728
+ * ```
4729
+ * @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
4730
+ */
4731
+ Action["SpotterSidebarHeader"] = "spotterSidebarHeader";
4732
+ /**
4733
+ * Controls visibility of the sidebar footer (documentation link)
4734
+ * in the Spotter past conversations sidebar.
4735
+ * @example
4736
+ * ```js
4737
+ * hiddenActions: [Action.SpotterSidebarFooter]
4738
+ * ```
4739
+ * @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
4740
+ */
4741
+ Action["SpotterSidebarFooter"] = "spotterSidebarFooter";
4742
+ /**
4743
+ * Controls visibility and disable state of the sidebar toggle/expand button
4744
+ * in the Spotter past conversations sidebar.
4745
+ * @example
4746
+ * ```js
4747
+ * disabledActions: [Action.SpotterSidebarToggle]
4748
+ * ```
4749
+ * @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
4750
+ */
4751
+ Action["SpotterSidebarToggle"] = "spotterSidebarToggle";
4752
+ /**
4753
+ * Controls visibility and disable state of the "New Chat" button
4754
+ * in the Spotter past conversations sidebar.
4755
+ * @example
4756
+ * ```js
4757
+ * disabledActions: [Action.SpotterNewChat]
4758
+ * ```
4759
+ * @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
4760
+ */
4761
+ Action["SpotterNewChat"] = "spotterNewChat";
4762
+ /**
4763
+ * Controls visibility of the past conversation banner alert
4764
+ * in the Spotter interface.
4765
+ * @example
4766
+ * ```js
4767
+ * hiddenActions: [Action.SpotterPastChatBanner]
4768
+ * ```
4769
+ * @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
4770
+ */
4771
+ Action["SpotterPastChatBanner"] = "spotterPastChatBanner";
4772
+ /**
4773
+ * Controls visibility and disable state of the conversation edit menu
4774
+ * (three-dot menu) in the Spotter past conversations sidebar.
4775
+ * @example
4776
+ * ```js
4777
+ * disabledActions: [Action.SpotterChatMenu]
4778
+ * ```
4779
+ * @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
4780
+ */
4781
+ Action["SpotterChatMenu"] = "spotterChatMenu";
4782
+ /**
4783
+ * Controls visibility and disable state of the rename action
4784
+ * in the Spotter conversation edit menu.
4785
+ * @example
4786
+ * ```js
4787
+ * disabledActions: [Action.SpotterChatRename]
4788
+ * ```
4789
+ * @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
4790
+ */
4791
+ Action["SpotterChatRename"] = "spotterChatRename";
4792
+ /**
4793
+ * Controls visibility and disable state of the delete action
4794
+ * in the Spotter conversation edit menu.
4795
+ * @example
4796
+ * ```js
4797
+ * disabledActions: [Action.SpotterChatDelete]
4798
+ * ```
4799
+ * @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
4800
+ */
4801
+ Action["SpotterChatDelete"] = "spotterChatDelete";
4802
+ /**
4803
+ * Controls visibility and disable state of the documentation/best practices
4804
+ * link in the Spotter sidebar footer.
4805
+ * @example
4806
+ * ```js
4807
+ * disabledActions: [Action.SpotterDocs]
4808
+ * ```
4809
+ * @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
4810
+ */
4811
+ Action["SpotterDocs"] = "spotterDocs";
4674
4812
  /**
4675
4813
  * The **Include current period** checkbox for date filters.
4676
4814
  * Controls the visibility and availability of the option to include
@@ -4809,13 +4947,30 @@
4809
4947
  * Error types emitted by embedded components.
4810
4948
  *
4811
4949
  * These enum values categorize different types of errors that can occur during
4812
- * the lifecycle of an embedded ThoughtSpot component. Use these values to implement
4813
- * specific error handling logic based on the error category.
4814
- *
4815
- * @see {@link EmbedErrorDetailsEvent} - The error event object structure
4816
- * @see {@link EmbedEvent.Error} - The event that emits these errors
4950
+ * the lifecycle of an embedded ThoughtSpot component.
4951
+ * Use {@link EmbedErrorDetailsEvent} and {@link EmbedErrorCodes} to handle specific errors.
4817
4952
  * @version SDK: 1.44.2 | ThoughtSpot: 26.2.0.cl
4818
4953
  * @group Error Handling
4954
+ *
4955
+ * @example
4956
+ * Handle specific error types
4957
+ * ```js
4958
+ * embed.on(EmbedEvent.Error, (error) => {
4959
+ * switch (error.errorType) {
4960
+ * case ErrorDetailsTypes.API:
4961
+ * console.error('API error:', error.message);
4962
+ * break;
4963
+ * case ErrorDetailsTypes.VALIDATION_ERROR:
4964
+ * console.error('Validation error:', error.message);
4965
+ * break;
4966
+ * case ErrorDetailsTypes.NETWORK:
4967
+ * console.error('Network error:', error.message);
4968
+ * break;
4969
+ * default:
4970
+ * console.error('Unknown error:', error);
4971
+ * }
4972
+ * });
4973
+ * ```
4819
4974
  */
4820
4975
  exports.ErrorDetailsTypes = void 0;
4821
4976
  (function (ErrorDetailsTypes) {
@@ -4827,35 +4982,43 @@
4827
4982
  ErrorDetailsTypes["NETWORK"] = "NETWORK";
4828
4983
  })(exports.ErrorDetailsTypes || (exports.ErrorDetailsTypes = {}));
4829
4984
  /**
4830
- * Error codes for identifying specific issues in embedded ThoughtSpot components.
4831
- *
4832
- * Use these codes for precise error handling and debugging. Each code maps to a
4833
- * distinct failure scenario, enabling targeted recovery strategies.
4985
+ * Error codes for identifying specific issues in embedded ThoughtSpot components. Use {@link EmbedErrorDetailsEvent} and {@link ErrorDetailsTypes} codes for precise error handling and debugging.
4834
4986
  *
4835
4987
  * @version SDK: 1.44.2 | ThoughtSpot: 26.2.0.cl
4836
4988
  * @group Error Handling
4837
- *
4838
- * @see {@link EmbedErrorDetailsEvent} - The error event object that includes these codes
4839
- * @see {@link ErrorDetailsTypes} - General error type categories
4840
- *
4989
+
4841
4990
  * @example
4842
4991
  * Handle specific error codes in the error event handler
4843
- *
4992
+ * ```js
4844
4993
  * embed.on(EmbedEvent.Error, (error) => {
4845
- * if (error.code === EmbedErrorCodes.WORKSHEET_ID_NOT_FOUND) {
4846
- * console.error('Worksheet ID not found:', error.message);
4994
+ * switch (error.code) {
4995
+ * case EmbedErrorCodes.WORKSHEET_ID_NOT_FOUND:
4996
+ * console.error('Worksheet ID not found:', error.message);
4997
+ * break;
4998
+ * case EmbedErrorCodes.LIVEBOARD_ID_MISSING:
4999
+ * console.error('Liveboard ID is missing:', error.message);
5000
+ * break;
5001
+ * case EmbedErrorCodes.CONFLICTING_ACTIONS_CONFIG:
5002
+ * console.error('Conflicting actions configuration:', error.message);
5003
+ * break;
5004
+ * case EmbedErrorCodes.CONFLICTING_TABS_CONFIG:
5005
+ * console.error('Conflicting tabs configuration:', error.message);
5006
+ * break;
5007
+ * default:
5008
+ * console.error('Unknown error:', error);
4847
5009
  * }
4848
5010
  * });
4849
- * */
5011
+ * ```
5012
+ * */
4850
5013
  exports.EmbedErrorCodes = void 0;
4851
5014
  (function (EmbedErrorCodes) {
4852
5015
  /** Worksheet ID not found or does not exist */
4853
5016
  EmbedErrorCodes["WORKSHEET_ID_NOT_FOUND"] = "WORKSHEET_ID_NOT_FOUND";
4854
5017
  /** Required Liveboard ID is missing from configuration */
4855
5018
  EmbedErrorCodes["LIVEBOARD_ID_MISSING"] = "LIVEBOARD_ID_MISSING";
4856
- /** Conflicting action configuration detected (e.g., both hiddenActions and visibleActions specified) */
5019
+ /** Conflicting action configuration detected */
4857
5020
  EmbedErrorCodes["CONFLICTING_ACTIONS_CONFIG"] = "CONFLICTING_ACTIONS_CONFIG";
4858
- /** Conflicting tab configuration detected (e.g., both hiddenTabs and visibleTabs specified) */
5021
+ /** Conflicting tab configuration detected */
4859
5022
  EmbedErrorCodes["CONFLICTING_TABS_CONFIG"] = "CONFLICTING_TABS_CONFIG";
4860
5023
  /** Error during component initialization */
4861
5024
  EmbedErrorCodes["INIT_ERROR"] = "INIT_ERROR";
@@ -4873,6 +5036,8 @@
4873
5036
  EmbedErrorCodes["PARSING_API_INTERCEPT_BODY_ERROR"] = "PARSING_API_INTERCEPT_BODY_ERROR";
4874
5037
  /** Failed to update embed parameters during pre-render */
4875
5038
  EmbedErrorCodes["UPDATE_PARAMS_FAILED"] = "UPDATE_PARAMS_FAILED";
5039
+ /** Invalid URL provided in configuration */
5040
+ EmbedErrorCodes["INVALID_URL"] = "INVALID_URL";
4876
5041
  })(exports.EmbedErrorCodes || (exports.EmbedErrorCodes = {}));
4877
5042
  exports.ContextType = void 0;
4878
5043
  (function (ContextType) {
@@ -5066,6 +5231,7 @@
5066
5231
  ERROR_PARSING_API_INTERCEPT_BODY: 'Error parsing api intercept body',
5067
5232
  SSR_ENVIRONMENT_ERROR: 'SSR environment detected. This function cannot be called in SSR environment.',
5068
5233
  UPDATE_PARAMS_FAILED: 'Failed to update embed parameters',
5234
+ INVALID_SPOTTER_DOCUMENTATION_URL: 'Invalid spotterDocumentationUrl. Please provide a valid http or https URL.',
5069
5235
  };
5070
5236
  const CUSTOM_ACTIONS_ERROR_MESSAGE = {
5071
5237
  INVALID_ACTION_OBJECT: 'Custom Action Validation Error: Invalid action object provided',
@@ -5550,6 +5716,36 @@
5550
5716
  return true;
5551
5717
  }
5552
5718
  return false;
5719
+ };
5720
+ /**
5721
+ * Validates that a URL uses only http: or https: protocols.
5722
+ * Returns a tuple of [isValid, error] so the caller can handle validation errors.
5723
+ * @param url - The URL string to validate
5724
+ * @returns [true, null] if valid, [false, Error] if invalid
5725
+ */
5726
+ const validateHttpUrl = (url) => {
5727
+ try {
5728
+ const parsedUrl = new URL(url);
5729
+ if (parsedUrl.protocol !== 'http:' && parsedUrl.protocol !== 'https:') {
5730
+ return [false, new Error(`Invalid protocol: ${parsedUrl.protocol}. Only http: and https: are allowed.`)];
5731
+ }
5732
+ return [true, null];
5733
+ }
5734
+ catch (error) {
5735
+ return [false, error instanceof Error ? error : new Error(String(error))];
5736
+ }
5737
+ };
5738
+ /**
5739
+ * Sets a query parameter if the value is defined.
5740
+ * @param queryParams - The query params object to modify
5741
+ * @param param - The parameter key
5742
+ * @param value - The value to set
5743
+ * @param asBoolean - If true, coerces value to boolean
5744
+ */
5745
+ const setParamIfDefined = (queryParams, param, value, asBoolean = false) => {
5746
+ if (value !== undefined) {
5747
+ queryParams[param] = asBoolean ? !!value : value;
5748
+ }
5553
5749
  };
5554
5750
 
5555
5751
  /**
@@ -8409,6 +8605,28 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
8409
8605
  sql
8410
8606
  }
8411
8607
  }
8608
+ `;
8609
+ const updateDisplayMode = `
8610
+ mutation UpdateDisplayMode(
8611
+ $session: BachSessionIdInput!
8612
+ $displayMode: DisplayMode
8613
+ ) {
8614
+ Answer__updateProperties(session: $session, displayMode: $displayMode) {
8615
+ id {
8616
+ sessionId
8617
+ genNo
8618
+ acSession {
8619
+ sessionId
8620
+ genNo
8621
+ }
8622
+ }
8623
+ answer {
8624
+ id
8625
+ displayMode
8626
+ suggestedDisplayMode
8627
+ }
8628
+ }
8629
+ }
8412
8630
  `;
8413
8631
  const getAnswerTML = `
8414
8632
  mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies: Boolean, $formatType: EDocFormatType, $exportPermissions: Boolean, $exportFqn: Boolean) {
@@ -8577,7 +8795,15 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
8577
8795
  },
8578
8796
  });
8579
8797
  }
8580
- async getSQLQuery() {
8798
+ async updateDisplayMode(displayMode = "TABLE_MODE") {
8799
+ return this.executeQuery(updateDisplayMode, {
8800
+ displayMode,
8801
+ });
8802
+ }
8803
+ async getSQLQuery(fetchSQLWithAllColumns = false) {
8804
+ if (fetchSQLWithAllColumns) {
8805
+ await this.updateDisplayMode("TABLE_MODE");
8806
+ }
8581
8807
  const { sql } = await this.executeQuery(getSQLQuery, {});
8582
8808
  return sql;
8583
8809
  }
@@ -18171,7 +18397,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
18171
18397
  return eventData;
18172
18398
  }
18173
18399
 
18174
- var name="@thoughtspot/visual-embed-sdk";var version$1="1.45.2";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports$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","bundle-dts":"dts-bundle-generator --config ./dts-config/dts-bundle.config.js","bundle-dts-react":"dts-bundle-generator --config ./dts-config/dts-bundle-react.config.js","bundle-dts-react-full":"dts-bundle-generator --config ./dts-config/dts-bundle-react-full.config.js",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.build.json --theme typedoc-theme --json static/typedoc/typedoc.json --disableOutputCheck","test-sdk":"jest -c jest.config.sdk.js --runInBand",test:"npm run test-sdk",posttest:"cat ./coverage/sdk/lcov.info | npx coveralls-next","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest",dev:"vite -c vite.local.config.ts"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={classnames:"^2.3.1",eventemitter3:"^4.0.7",lodash:"^4.17.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};
18400
+ var name="@thoughtspot/visual-embed-sdk";var version$1="1.45.3";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","bundle-dts":"dts-bundle-generator --config ./dts-config/dts-bundle.config.js","bundle-dts-react":"dts-bundle-generator --config ./dts-config/dts-bundle-react.config.js","bundle-dts-react-full":"dts-bundle-generator --config ./dts-config/dts-bundle-react-full.config.js",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.build.json --theme typedoc-theme --json static/typedoc/typedoc.json --disableOutputCheck","test-sdk":"jest -c jest.config.sdk.js --runInBand",test:"npm run test-sdk",posttest:"cat ./coverage/sdk/lcov.info | npx coveralls-next","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest",dev:"vite -c vite.local.config.ts"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={classnames:"^2.3.1",eventemitter3:"^4.0.7",lodash:"^4.17.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};
18175
18401
 
18176
18402
  class HostEventClient {
18177
18403
  constructor(iFrame) {
@@ -20137,7 +20363,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
20137
20363
  * embedded Liveboard or visualization.
20138
20364
  */
20139
20365
  getEmbedParams() {
20140
- 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, minimumHeight, isThisPeriodInDateFiltersEnabled, } = this.viewConfig;
20366
+ 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, } = this.viewConfig;
20141
20367
  let params = {};
20142
20368
  params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
20143
20369
  params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
@@ -20161,6 +20387,41 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
20161
20387
  if (!isUndefined$1(updatedSpotterChatPrompt)) {
20162
20388
  params[Param.UpdatedSpotterChatPrompt] = !!updatedSpotterChatPrompt;
20163
20389
  }
20390
+ // Handle spotterSidebarConfig params
20391
+ if (spotterSidebarConfig) {
20392
+ const { enablePastConversationsSidebar, spotterSidebarTitle, spotterSidebarDefaultExpanded, spotterChatRenameLabel, spotterChatDeleteLabel, spotterDeleteConversationModalTitle, spotterPastConversationAlertMessage, spotterDocumentationUrl, spotterBestPracticesLabel, spotterConversationsBatchSize, spotterNewChatButtonTitle, } = spotterSidebarConfig;
20393
+ setParamIfDefined(params, Param.EnablePastConversationsSidebar, enablePastConversationsSidebar, true);
20394
+ setParamIfDefined(params, Param.SpotterSidebarDefaultExpanded, spotterSidebarDefaultExpanded, true);
20395
+ setParamIfDefined(params, Param.SpotterSidebarTitle, spotterSidebarTitle);
20396
+ setParamIfDefined(params, Param.SpotterChatRenameLabel, spotterChatRenameLabel);
20397
+ setParamIfDefined(params, Param.SpotterChatDeleteLabel, spotterChatDeleteLabel);
20398
+ setParamIfDefined(params, Param.SpotterDeleteConversationModalTitle, spotterDeleteConversationModalTitle);
20399
+ setParamIfDefined(params, Param.SpotterPastConversationAlertMessage, spotterPastConversationAlertMessage);
20400
+ setParamIfDefined(params, Param.SpotterBestPracticesLabel, spotterBestPracticesLabel);
20401
+ setParamIfDefined(params, Param.SpotterConversationsBatchSize, spotterConversationsBatchSize);
20402
+ setParamIfDefined(params, Param.SpotterNewChatButtonTitle, spotterNewChatButtonTitle);
20403
+ // URL param with validation
20404
+ if (spotterDocumentationUrl !== undefined) {
20405
+ const [isValid, validationError] = validateHttpUrl(spotterDocumentationUrl);
20406
+ if (isValid) {
20407
+ params[Param.SpotterDocumentationUrl] = spotterDocumentationUrl;
20408
+ }
20409
+ else {
20410
+ this.handleError({
20411
+ errorType: exports.ErrorDetailsTypes.VALIDATION_ERROR,
20412
+ message: ERROR_MESSAGE.INVALID_SPOTTER_DOCUMENTATION_URL,
20413
+ code: exports.EmbedErrorCodes.INVALID_URL,
20414
+ error: (validationError === null || validationError === void 0 ? void 0 : validationError.message) || ERROR_MESSAGE.INVALID_SPOTTER_DOCUMENTATION_URL,
20415
+ });
20416
+ }
20417
+ }
20418
+ }
20419
+ // Handle spotterChatConfig params
20420
+ if (spotterChatConfig) {
20421
+ const { hideToolResponseCardBranding, toolResponseCardBrandingLabel, } = spotterChatConfig;
20422
+ setParamIfDefined(params, Param.HideToolResponseCardBranding, hideToolResponseCardBranding, true);
20423
+ setParamIfDefined(params, Param.ToolResponseCardBrandingLabel, toolResponseCardBrandingLabel);
20424
+ }
20164
20425
  if (hideObjectSearch) {
20165
20426
  params[Param.HideObjectSearch] = !!hideObjectSearch;
20166
20427
  }
@@ -20558,6 +20819,7 @@ query GetEurekaVizSnapshots(
20558
20819
  liveboardId: this.viewConfig.liveboardId,
20559
20820
  vizId: this.viewConfig.vizId,
20560
20821
  activeTabId: this.viewConfig.activeTabId,
20822
+ personalizedViewId: this.viewConfig.personalizedViewId,
20561
20823
  };
20562
20824
  if (this.viewConfig.fullHeight === true) {
20563
20825
  if (this.viewConfig.vizId) {
@@ -20582,7 +20844,7 @@ query GetEurekaVizSnapshots(
20582
20844
  getEmbedParamsObject() {
20583
20845
  let params = {};
20584
20846
  params = this.getBaseQueryParams(params);
20585
- 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, isThisPeriodInDateFiltersEnabled, } = this.viewConfig;
20847
+ 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;
20586
20848
  const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
20587
20849
  || this.viewConfig.preventPinboardFilterRemoval;
20588
20850
  if (fullHeight === true) {
@@ -20656,6 +20918,12 @@ query GetEurekaVizSnapshots(
20656
20918
  if (showSpotterLimitations !== undefined) {
20657
20919
  params[Param.ShowSpotterLimitations] = showSpotterLimitations;
20658
20920
  }
20921
+ // Handle spotterChatConfig params
20922
+ if (spotterChatConfig) {
20923
+ const { hideToolResponseCardBranding, toolResponseCardBrandingLabel, } = spotterChatConfig;
20924
+ setParamIfDefined(params, Param.HideToolResponseCardBranding, hideToolResponseCardBranding, true);
20925
+ setParamIfDefined(params, Param.ToolResponseCardBrandingLabel, toolResponseCardBrandingLabel);
20926
+ }
20659
20927
  if (isLinkParametersEnabled !== undefined) {
20660
20928
  params[Param.isLinkParametersEnabled] = isLinkParametersEnabled;
20661
20929
  }
@@ -20679,15 +20947,31 @@ query GetEurekaVizSnapshots(
20679
20947
  getQueryParamString(params, true);
20680
20948
  return params;
20681
20949
  }
20682
- getIframeSuffixSrc(liveboardId, vizId, activeTabId) {
20683
- let suffix = `/embed/viz/${liveboardId}`;
20950
+ getIframeSuffixSrc(liveboardId, vizId, activeTabId, personalizedViewId) {
20951
+ // Extract view from liveboardId if passed along with it (legacy approach)
20952
+ // View must be appended as query param at the end, not embedded in path
20953
+ let liveboardGuid = liveboardId;
20954
+ let legacyViewId;
20955
+ if (liveboardId === null || liveboardId === void 0 ? void 0 : liveboardId.includes('?')) {
20956
+ const [id, query] = liveboardId.split('?');
20957
+ liveboardGuid = id;
20958
+ const params = new URLSearchParams(query);
20959
+ legacyViewId = params.get('view') || undefined;
20960
+ }
20961
+ // personalizedViewId takes precedence over legacyViewId (when passed as part of liveboardId)
20962
+ const effectiveViewId = personalizedViewId || legacyViewId;
20963
+ let suffix = `/embed/viz/${liveboardGuid}`;
20684
20964
  if (activeTabId) {
20685
- suffix = `${suffix}/tab/${activeTabId} `;
20965
+ suffix = `${suffix}/tab/${activeTabId}`;
20686
20966
  }
20687
20967
  if (vizId) {
20688
20968
  suffix = `${suffix}/${vizId}`;
20689
20969
  }
20690
- const tsPostHashParams = this.getThoughtSpotPostUrlParams();
20970
+ const additionalParams = {};
20971
+ if (effectiveViewId) {
20972
+ additionalParams.view = effectiveViewId;
20973
+ }
20974
+ const tsPostHashParams = this.getThoughtSpotPostUrlParams(additionalParams);
20691
20975
  suffix = `${suffix}${tsPostHashParams}`;
20692
20976
  return suffix;
20693
20977
  }
@@ -20697,7 +20981,7 @@ query GetEurekaVizSnapshots(
20697
20981
  */
20698
20982
  getIFrameSrc() {
20699
20983
  var _a;
20700
- const { vizId, activeTabId } = this.viewConfig;
20984
+ const { vizId, activeTabId, personalizedViewId } = this.viewConfig;
20701
20985
  const liveboardId = (_a = this.viewConfig.liveboardId) !== null && _a !== void 0 ? _a : this.viewConfig.pinboardId;
20702
20986
  if (!liveboardId) {
20703
20987
  this.handleError({
@@ -20707,7 +20991,7 @@ query GetEurekaVizSnapshots(
20707
20991
  error: ERROR_MESSAGE.LIVEBOARD_VIZ_ID_VALIDATION,
20708
20992
  });
20709
20993
  }
20710
- return `${this.getRootIframeSrc()}${this.getIframeSuffixSrc(liveboardId, vizId, activeTabId)}`;
20994
+ return `${this.getRootIframeSrc()}${this.getIframeSuffixSrc(liveboardId, vizId, activeTabId, personalizedViewId)}`;
20711
20995
  }
20712
20996
  setActiveTab(data) {
20713
20997
  if (!this.viewConfig.vizId) {
@@ -20746,12 +21030,13 @@ query GetEurekaVizSnapshots(
20746
21030
  beforePrerenderVisible() {
20747
21031
  const embedObj = this.getPreRenderObj();
20748
21032
  this.executeAfterEmbedContainerLoaded(() => {
20749
- this.navigateToLiveboard(this.viewConfig.liveboardId, this.viewConfig.vizId, this.viewConfig.activeTabId);
21033
+ this.navigateToLiveboard(this.viewConfig.liveboardId, this.viewConfig.vizId, this.viewConfig.activeTabId, this.viewConfig.personalizedViewId);
20750
21034
  if (embedObj) {
20751
21035
  embedObj.currentLiveboardState = {
20752
21036
  liveboardId: this.viewConfig.liveboardId,
20753
21037
  vizId: this.viewConfig.vizId,
20754
21038
  activeTabId: this.viewConfig.activeTabId,
21039
+ personalizedViewId: this.viewConfig.personalizedViewId,
20755
21040
  };
20756
21041
  }
20757
21042
  });
@@ -20816,11 +21101,12 @@ query GetEurekaVizSnapshots(
20816
21101
  this.postRender();
20817
21102
  return this;
20818
21103
  }
20819
- navigateToLiveboard(liveboardId, vizId, activeTabId) {
20820
- const path = this.getIframeSuffixSrc(liveboardId, vizId, activeTabId);
21104
+ navigateToLiveboard(liveboardId, vizId, activeTabId, personalizedViewId) {
21105
+ const path = this.getIframeSuffixSrc(liveboardId, vizId, activeTabId, personalizedViewId);
20821
21106
  this.viewConfig.liveboardId = liveboardId;
20822
21107
  this.viewConfig.activeTabId = activeTabId;
20823
21108
  this.viewConfig.vizId = vizId;
21109
+ this.viewConfig.personalizedViewId = personalizedViewId;
20824
21110
  if (this.isRendered) {
20825
21111
  this.trigger(exports.HostEvent.Navigate, path.substring(1));
20826
21112
  }
@@ -20844,6 +21130,9 @@ query GetEurekaVizSnapshots(
20844
21130
  if (this.viewConfig.vizId) {
20845
21131
  url = `${url}/${this.viewConfig.vizId}`;
20846
21132
  }
21133
+ if (this.viewConfig.personalizedViewId) {
21134
+ url = `${url}?view=${this.viewConfig.personalizedViewId}`;
21135
+ }
20847
21136
  return url;
20848
21137
  }
20849
21138
  }
@@ -21680,7 +21969,9 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
21680
21969
  this.viewConfig = viewConfig;
21681
21970
  }
21682
21971
  getEmbedParamsObject() {
21683
- const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, enablePastConversationsSidebar, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, updatedSpotterChatPrompt, } = this.viewConfig;
21972
+ const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, updatedSpotterChatPrompt, spotterSidebarConfig, spotterChatConfig, } = this.viewConfig;
21973
+ // Extract sidebar config properties
21974
+ const { enablePastConversationsSidebar, spotterSidebarTitle, spotterSidebarDefaultExpanded, spotterChatRenameLabel, spotterChatDeleteLabel, spotterDeleteConversationModalTitle, spotterPastConversationAlertMessage, spotterDocumentationUrl, spotterBestPracticesLabel, spotterConversationsBatchSize, spotterNewChatButtonTitle, } = spotterSidebarConfig || {};
21684
21975
  if (!worksheetId) {
21685
21976
  this.handleError({
21686
21977
  errorType: exports.ErrorDetailsTypes.VALIDATION_ERROR,
@@ -21691,30 +21982,51 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
21691
21982
  }
21692
21983
  const queryParams = this.getBaseQueryParams();
21693
21984
  queryParams[Param.SpotterEnabled] = true;
21694
- if (!isUndefined_1(disableSourceSelection)) {
21695
- queryParams[Param.DisableSourceSelection] = !!disableSourceSelection;
21696
- }
21697
- if (!isUndefined_1(hideSourceSelection)) {
21698
- queryParams[Param.HideSourceSelection] = !!hideSourceSelection;
21699
- }
21700
- if (!isUndefined_1(dataPanelV2)) {
21701
- queryParams[Param.DataPanelV2Enabled] = !!dataPanelV2;
21702
- }
21703
- if (!isUndefined_1(showSpotterLimitations)) {
21704
- queryParams[Param.ShowSpotterLimitations] = !!showSpotterLimitations;
21705
- }
21706
- if (!isUndefined_1(hideSampleQuestions)) {
21707
- queryParams[Param.HideSampleQuestions] = !!hideSampleQuestions;
21985
+ // Boolean params
21986
+ setParamIfDefined(queryParams, Param.DisableSourceSelection, disableSourceSelection, true);
21987
+ setParamIfDefined(queryParams, Param.HideSourceSelection, hideSourceSelection, true);
21988
+ setParamIfDefined(queryParams, Param.DataPanelV2Enabled, dataPanelV2, true);
21989
+ setParamIfDefined(queryParams, Param.ShowSpotterLimitations, showSpotterLimitations, true);
21990
+ setParamIfDefined(queryParams, Param.HideSampleQuestions, hideSampleQuestions, true);
21991
+ setParamIfDefined(queryParams, Param.UpdatedSpotterChatPrompt, updatedSpotterChatPrompt, true);
21992
+ setParamIfDefined(queryParams, Param.SpotterSidebarDefaultExpanded, spotterSidebarDefaultExpanded, true);
21993
+ // String params
21994
+ setParamIfDefined(queryParams, Param.SpotterSidebarTitle, spotterSidebarTitle);
21995
+ setParamIfDefined(queryParams, Param.SpotterChatRenameLabel, spotterChatRenameLabel);
21996
+ setParamIfDefined(queryParams, Param.SpotterChatDeleteLabel, spotterChatDeleteLabel);
21997
+ setParamIfDefined(queryParams, Param.SpotterDeleteConversationModalTitle, spotterDeleteConversationModalTitle);
21998
+ setParamIfDefined(queryParams, Param.SpotterPastConversationAlertMessage, spotterPastConversationAlertMessage);
21999
+ setParamIfDefined(queryParams, Param.SpotterBestPracticesLabel, spotterBestPracticesLabel);
22000
+ setParamIfDefined(queryParams, Param.SpotterConversationsBatchSize, spotterConversationsBatchSize);
22001
+ setParamIfDefined(queryParams, Param.SpotterNewChatButtonTitle, spotterNewChatButtonTitle);
22002
+ // URL param with validation
22003
+ if (spotterDocumentationUrl !== undefined) {
22004
+ const [isValid, validationError] = validateHttpUrl(spotterDocumentationUrl);
22005
+ if (isValid) {
22006
+ queryParams[Param.SpotterDocumentationUrl] = spotterDocumentationUrl;
22007
+ }
22008
+ else {
22009
+ this.handleError({
22010
+ errorType: exports.ErrorDetailsTypes.VALIDATION_ERROR,
22011
+ message: ERROR_MESSAGE.INVALID_SPOTTER_DOCUMENTATION_URL,
22012
+ code: exports.EmbedErrorCodes.INVALID_URL,
22013
+ error: (validationError === null || validationError === void 0 ? void 0 : validationError.message) || ERROR_MESSAGE.INVALID_SPOTTER_DOCUMENTATION_URL,
22014
+ });
22015
+ }
21708
22016
  }
21709
- if (!isUndefined_1(updatedSpotterChatPrompt)) {
21710
- queryParams[Param.UpdatedSpotterChatPrompt] = !!updatedSpotterChatPrompt;
22017
+ // Handle spotterChatConfig params
22018
+ if (spotterChatConfig) {
22019
+ const { hideToolResponseCardBranding, toolResponseCardBrandingLabel, } = spotterChatConfig;
22020
+ setParamIfDefined(queryParams, Param.HideToolResponseCardBranding, hideToolResponseCardBranding, true);
22021
+ setParamIfDefined(queryParams, Param.ToolResponseCardBrandingLabel, toolResponseCardBrandingLabel);
21711
22022
  }
21712
22023
  return queryParams;
21713
22024
  }
21714
22025
  getIframeSrc() {
21715
- const { worksheetId, searchOptions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, enablePastConversationsSidebar, } = this.viewConfig;
22026
+ const { worksheetId, searchOptions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, spotterSidebarConfig, } = this.viewConfig;
21716
22027
  const path = 'insights/conv-assist';
21717
22028
  const queryParams = this.getEmbedParamsObject();
22029
+ const enablePastConversationsSidebar = spotterSidebarConfig === null || spotterSidebarConfig === void 0 ? void 0 : spotterSidebarConfig.enablePastConversationsSidebar;
21718
22030
  if (!isUndefined_1(enablePastConversationsSidebar)) {
21719
22031
  queryParams[Param.EnablePastConversationsSidebar] = !!enablePastConversationsSidebar;
21720
22032
  }