@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
@@ -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
  import * as React from 'react';
4
4
  import React__default, { useRef, useCallback } from 'react';
@@ -1845,6 +1845,42 @@ var EmbedEvent;
1845
1845
  * @version SDK: 1.43.0 | ThoughtSpot: 10.15.0.cl
1846
1846
  */
1847
1847
  EmbedEvent["ApiIntercept"] = "ApiIntercept";
1848
+ /**
1849
+ * Emitted when a Spotter conversation is renamed.
1850
+ * @example
1851
+ * ```js
1852
+ * spotterEmbed.on(EmbedEvent.SpotterConversationRenamed, (payload) => {
1853
+ * console.log('Conversation renamed', payload);
1854
+ * // payload: { convId: string, oldTitle: string, newTitle: string }
1855
+ * })
1856
+ * ```
1857
+ * @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl
1858
+ */
1859
+ EmbedEvent["SpotterConversationRenamed"] = "spotterConversationRenamed";
1860
+ /**
1861
+ * Emitted when a Spotter conversation is deleted.
1862
+ * @example
1863
+ * ```js
1864
+ * spotterEmbed.on(EmbedEvent.SpotterConversationDeleted, (payload) => {
1865
+ * console.log('Conversation deleted', payload);
1866
+ * // payload: { convId: string, title: string }
1867
+ * })
1868
+ * ```
1869
+ * @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl
1870
+ */
1871
+ EmbedEvent["SpotterConversationDeleted"] = "spotterConversationDeleted";
1872
+ /**
1873
+ * Emitted when a Spotter conversation is selected/clicked.
1874
+ * @example
1875
+ * ```js
1876
+ * spotterEmbed.on(EmbedEvent.SpotterConversationSelected, (payload) => {
1877
+ * console.log('Conversation selected', payload);
1878
+ * // payload: { convId: string, title: string, worksheetId: string }
1879
+ * })
1880
+ * ```
1881
+ * @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl
1882
+ */
1883
+ EmbedEvent["SpotterConversationSelected"] = "spotterConversationSelected";
1848
1884
  /**
1849
1885
  * @hidden
1850
1886
  * Emitted when the auth token is about to get expired and needs to be refreshed.
@@ -3407,7 +3443,19 @@ var Param;
3407
3443
  Param["isLinkParametersEnabled"] = "isLinkParametersEnabled";
3408
3444
  Param["EnablePastConversationsSidebar"] = "enablePastConversationsSidebar";
3409
3445
  Param["UpdatedSpotterChatPrompt"] = "updatedSpotterChatPrompt";
3446
+ Param["SpotterSidebarTitle"] = "spotterSidebarTitle";
3447
+ Param["SpotterSidebarDefaultExpanded"] = "spotterSidebarDefaultExpanded";
3448
+ Param["SpotterChatRenameLabel"] = "spotterChatRenameLabel";
3449
+ Param["SpotterChatDeleteLabel"] = "spotterChatDeleteLabel";
3450
+ Param["SpotterDeleteConversationModalTitle"] = "spotterDeleteConversationModalTitle";
3451
+ Param["SpotterPastConversationAlertMessage"] = "spotterPastConversationAlertMessage";
3452
+ Param["SpotterDocumentationUrl"] = "spotterDocumentationUrl";
3453
+ Param["SpotterBestPracticesLabel"] = "spotterBestPracticesLabel";
3454
+ Param["SpotterConversationsBatchSize"] = "spotterConversationsBatchSize";
3455
+ Param["SpotterNewChatButtonTitle"] = "spotterNewChatButtonTitle";
3410
3456
  Param["IsThisPeriodInDateFiltersEnabled"] = "isThisPeriodInDateFiltersEnabled";
3457
+ Param["HideToolResponseCardBranding"] = "hideToolResponseCardBranding";
3458
+ Param["ToolResponseCardBrandingLabel"] = "toolResponseCardBrandingLabel";
3411
3459
  })(Param || (Param = {}));
3412
3460
  /**
3413
3461
  * ThoughtSpot application pages include actions and menu commands
@@ -4833,6 +4881,96 @@ var Action;
4833
4881
  * @version SDK: 1.44.0 | ThoughtSpot Cloud: 26.2.0.cl
4834
4882
  */
4835
4883
  Action["UngroupLiveboardGroup"] = "ungroupLiveboardGroup";
4884
+ /**
4885
+ * Controls visibility of the sidebar header (title and toggle button)
4886
+ * in the Spotter past conversations sidebar.
4887
+ * @example
4888
+ * ```js
4889
+ * hiddenActions: [Action.SpotterSidebarHeader]
4890
+ * ```
4891
+ * @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
4892
+ */
4893
+ Action["SpotterSidebarHeader"] = "spotterSidebarHeader";
4894
+ /**
4895
+ * Controls visibility of the sidebar footer (documentation link)
4896
+ * in the Spotter past conversations sidebar.
4897
+ * @example
4898
+ * ```js
4899
+ * hiddenActions: [Action.SpotterSidebarFooter]
4900
+ * ```
4901
+ * @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
4902
+ */
4903
+ Action["SpotterSidebarFooter"] = "spotterSidebarFooter";
4904
+ /**
4905
+ * Controls visibility and disable state of the sidebar toggle/expand button
4906
+ * in the Spotter past conversations sidebar.
4907
+ * @example
4908
+ * ```js
4909
+ * disabledActions: [Action.SpotterSidebarToggle]
4910
+ * ```
4911
+ * @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
4912
+ */
4913
+ Action["SpotterSidebarToggle"] = "spotterSidebarToggle";
4914
+ /**
4915
+ * Controls visibility and disable state of the "New Chat" button
4916
+ * in the Spotter past conversations sidebar.
4917
+ * @example
4918
+ * ```js
4919
+ * disabledActions: [Action.SpotterNewChat]
4920
+ * ```
4921
+ * @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
4922
+ */
4923
+ Action["SpotterNewChat"] = "spotterNewChat";
4924
+ /**
4925
+ * Controls visibility of the past conversation banner alert
4926
+ * in the Spotter interface.
4927
+ * @example
4928
+ * ```js
4929
+ * hiddenActions: [Action.SpotterPastChatBanner]
4930
+ * ```
4931
+ * @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
4932
+ */
4933
+ Action["SpotterPastChatBanner"] = "spotterPastChatBanner";
4934
+ /**
4935
+ * Controls visibility and disable state of the conversation edit menu
4936
+ * (three-dot menu) in the Spotter past conversations sidebar.
4937
+ * @example
4938
+ * ```js
4939
+ * disabledActions: [Action.SpotterChatMenu]
4940
+ * ```
4941
+ * @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
4942
+ */
4943
+ Action["SpotterChatMenu"] = "spotterChatMenu";
4944
+ /**
4945
+ * Controls visibility and disable state of the rename action
4946
+ * in the Spotter conversation edit menu.
4947
+ * @example
4948
+ * ```js
4949
+ * disabledActions: [Action.SpotterChatRename]
4950
+ * ```
4951
+ * @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
4952
+ */
4953
+ Action["SpotterChatRename"] = "spotterChatRename";
4954
+ /**
4955
+ * Controls visibility and disable state of the delete action
4956
+ * in the Spotter conversation edit menu.
4957
+ * @example
4958
+ * ```js
4959
+ * disabledActions: [Action.SpotterChatDelete]
4960
+ * ```
4961
+ * @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
4962
+ */
4963
+ Action["SpotterChatDelete"] = "spotterChatDelete";
4964
+ /**
4965
+ * Controls visibility and disable state of the documentation/best practices
4966
+ * link in the Spotter sidebar footer.
4967
+ * @example
4968
+ * ```js
4969
+ * disabledActions: [Action.SpotterDocs]
4970
+ * ```
4971
+ * @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
4972
+ */
4973
+ Action["SpotterDocs"] = "spotterDocs";
4836
4974
  /**
4837
4975
  * The **Include current period** checkbox for date filters.
4838
4976
  * Controls the visibility and availability of the option to include
@@ -4971,13 +5109,30 @@ var LogLevel;
4971
5109
  * Error types emitted by embedded components.
4972
5110
  *
4973
5111
  * These enum values categorize different types of errors that can occur during
4974
- * the lifecycle of an embedded ThoughtSpot component. Use these values to implement
4975
- * specific error handling logic based on the error category.
4976
- *
4977
- * @see {@link EmbedErrorDetailsEvent} - The error event object structure
4978
- * @see {@link EmbedEvent.Error} - The event that emits these errors
5112
+ * the lifecycle of an embedded ThoughtSpot component.
5113
+ * Use {@link EmbedErrorDetailsEvent} and {@link EmbedErrorCodes} to handle specific errors.
4979
5114
  * @version SDK: 1.44.2 | ThoughtSpot: 26.2.0.cl
4980
5115
  * @group Error Handling
5116
+ *
5117
+ * @example
5118
+ * Handle specific error types
5119
+ * ```js
5120
+ * embed.on(EmbedEvent.Error, (error) => {
5121
+ * switch (error.errorType) {
5122
+ * case ErrorDetailsTypes.API:
5123
+ * console.error('API error:', error.message);
5124
+ * break;
5125
+ * case ErrorDetailsTypes.VALIDATION_ERROR:
5126
+ * console.error('Validation error:', error.message);
5127
+ * break;
5128
+ * case ErrorDetailsTypes.NETWORK:
5129
+ * console.error('Network error:', error.message);
5130
+ * break;
5131
+ * default:
5132
+ * console.error('Unknown error:', error);
5133
+ * }
5134
+ * });
5135
+ * ```
4981
5136
  */
4982
5137
  var ErrorDetailsTypes;
4983
5138
  (function (ErrorDetailsTypes) {
@@ -4989,35 +5144,43 @@ var ErrorDetailsTypes;
4989
5144
  ErrorDetailsTypes["NETWORK"] = "NETWORK";
4990
5145
  })(ErrorDetailsTypes || (ErrorDetailsTypes = {}));
4991
5146
  /**
4992
- * Error codes for identifying specific issues in embedded ThoughtSpot components.
4993
- *
4994
- * Use these codes for precise error handling and debugging. Each code maps to a
4995
- * distinct failure scenario, enabling targeted recovery strategies.
5147
+ * Error codes for identifying specific issues in embedded ThoughtSpot components. Use {@link EmbedErrorDetailsEvent} and {@link ErrorDetailsTypes} codes for precise error handling and debugging.
4996
5148
  *
4997
5149
  * @version SDK: 1.44.2 | ThoughtSpot: 26.2.0.cl
4998
5150
  * @group Error Handling
4999
- *
5000
- * @see {@link EmbedErrorDetailsEvent} - The error event object that includes these codes
5001
- * @see {@link ErrorDetailsTypes} - General error type categories
5002
- *
5151
+
5003
5152
  * @example
5004
5153
  * Handle specific error codes in the error event handler
5005
- *
5154
+ * ```js
5006
5155
  * embed.on(EmbedEvent.Error, (error) => {
5007
- * if (error.code === EmbedErrorCodes.WORKSHEET_ID_NOT_FOUND) {
5008
- * console.error('Worksheet ID not found:', error.message);
5156
+ * switch (error.code) {
5157
+ * case EmbedErrorCodes.WORKSHEET_ID_NOT_FOUND:
5158
+ * console.error('Worksheet ID not found:', error.message);
5159
+ * break;
5160
+ * case EmbedErrorCodes.LIVEBOARD_ID_MISSING:
5161
+ * console.error('Liveboard ID is missing:', error.message);
5162
+ * break;
5163
+ * case EmbedErrorCodes.CONFLICTING_ACTIONS_CONFIG:
5164
+ * console.error('Conflicting actions configuration:', error.message);
5165
+ * break;
5166
+ * case EmbedErrorCodes.CONFLICTING_TABS_CONFIG:
5167
+ * console.error('Conflicting tabs configuration:', error.message);
5168
+ * break;
5169
+ * default:
5170
+ * console.error('Unknown error:', error);
5009
5171
  * }
5010
5172
  * });
5011
- * */
5173
+ * ```
5174
+ * */
5012
5175
  var EmbedErrorCodes;
5013
5176
  (function (EmbedErrorCodes) {
5014
5177
  /** Worksheet ID not found or does not exist */
5015
5178
  EmbedErrorCodes["WORKSHEET_ID_NOT_FOUND"] = "WORKSHEET_ID_NOT_FOUND";
5016
5179
  /** Required Liveboard ID is missing from configuration */
5017
5180
  EmbedErrorCodes["LIVEBOARD_ID_MISSING"] = "LIVEBOARD_ID_MISSING";
5018
- /** Conflicting action configuration detected (e.g., both hiddenActions and visibleActions specified) */
5181
+ /** Conflicting action configuration detected */
5019
5182
  EmbedErrorCodes["CONFLICTING_ACTIONS_CONFIG"] = "CONFLICTING_ACTIONS_CONFIG";
5020
- /** Conflicting tab configuration detected (e.g., both hiddenTabs and visibleTabs specified) */
5183
+ /** Conflicting tab configuration detected */
5021
5184
  EmbedErrorCodes["CONFLICTING_TABS_CONFIG"] = "CONFLICTING_TABS_CONFIG";
5022
5185
  /** Error during component initialization */
5023
5186
  EmbedErrorCodes["INIT_ERROR"] = "INIT_ERROR";
@@ -5035,6 +5198,8 @@ var EmbedErrorCodes;
5035
5198
  EmbedErrorCodes["PARSING_API_INTERCEPT_BODY_ERROR"] = "PARSING_API_INTERCEPT_BODY_ERROR";
5036
5199
  /** Failed to update embed parameters during pre-render */
5037
5200
  EmbedErrorCodes["UPDATE_PARAMS_FAILED"] = "UPDATE_PARAMS_FAILED";
5201
+ /** Invalid URL provided in configuration */
5202
+ EmbedErrorCodes["INVALID_URL"] = "INVALID_URL";
5038
5203
  })(EmbedErrorCodes || (EmbedErrorCodes = {}));
5039
5204
  var ContextType;
5040
5205
  (function (ContextType) {
@@ -5175,6 +5340,7 @@ const ERROR_MESSAGE = {
5175
5340
  ERROR_PARSING_API_INTERCEPT_BODY: 'Error parsing api intercept body',
5176
5341
  SSR_ENVIRONMENT_ERROR: 'SSR environment detected. This function cannot be called in SSR environment.',
5177
5342
  UPDATE_PARAMS_FAILED: 'Failed to update embed parameters',
5343
+ INVALID_SPOTTER_DOCUMENTATION_URL: 'Invalid spotterDocumentationUrl. Please provide a valid http or https URL.',
5178
5344
  };
5179
5345
  const CUSTOM_ACTIONS_ERROR_MESSAGE = {
5180
5346
  INVALID_ACTION_OBJECT: 'Custom Action Validation Error: Invalid action object provided',
@@ -5659,6 +5825,36 @@ const isWindowUndefined = () => {
5659
5825
  return true;
5660
5826
  }
5661
5827
  return false;
5828
+ };
5829
+ /**
5830
+ * Validates that a URL uses only http: or https: protocols.
5831
+ * Returns a tuple of [isValid, error] so the caller can handle validation errors.
5832
+ * @param url - The URL string to validate
5833
+ * @returns [true, null] if valid, [false, Error] if invalid
5834
+ */
5835
+ const validateHttpUrl = (url) => {
5836
+ try {
5837
+ const parsedUrl = new URL(url);
5838
+ if (parsedUrl.protocol !== 'http:' && parsedUrl.protocol !== 'https:') {
5839
+ return [false, new Error(`Invalid protocol: ${parsedUrl.protocol}. Only http: and https: are allowed.`)];
5840
+ }
5841
+ return [true, null];
5842
+ }
5843
+ catch (error) {
5844
+ return [false, error instanceof Error ? error : new Error(String(error))];
5845
+ }
5846
+ };
5847
+ /**
5848
+ * Sets a query parameter if the value is defined.
5849
+ * @param queryParams - The query params object to modify
5850
+ * @param param - The parameter key
5851
+ * @param value - The value to set
5852
+ * @param asBoolean - If true, coerces value to boolean
5853
+ */
5854
+ const setParamIfDefined = (queryParams, param, value, asBoolean = false) => {
5855
+ if (value !== undefined) {
5856
+ queryParams[param] = asBoolean ? !!value : value;
5857
+ }
5662
5858
  };
5663
5859
 
5664
5860
  /**
@@ -8519,6 +8715,28 @@ const getSQLQuery = `
8519
8715
  }
8520
8716
  }
8521
8717
  `;
8718
+ const updateDisplayMode = `
8719
+ mutation UpdateDisplayMode(
8720
+ $session: BachSessionIdInput!
8721
+ $displayMode: DisplayMode
8722
+ ) {
8723
+ Answer__updateProperties(session: $session, displayMode: $displayMode) {
8724
+ id {
8725
+ sessionId
8726
+ genNo
8727
+ acSession {
8728
+ sessionId
8729
+ genNo
8730
+ }
8731
+ }
8732
+ answer {
8733
+ id
8734
+ displayMode
8735
+ suggestedDisplayMode
8736
+ }
8737
+ }
8738
+ }
8739
+ `;
8522
8740
  const getAnswerTML = `
8523
8741
  mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies: Boolean, $formatType: EDocFormatType, $exportPermissions: Boolean, $exportFqn: Boolean) {
8524
8742
  UnsavedAnswer_getTML(
@@ -8686,7 +8904,15 @@ class AnswerService {
8686
8904
  },
8687
8905
  });
8688
8906
  }
8689
- async getSQLQuery() {
8907
+ async updateDisplayMode(displayMode = "TABLE_MODE") {
8908
+ return this.executeQuery(updateDisplayMode, {
8909
+ displayMode,
8910
+ });
8911
+ }
8912
+ async getSQLQuery(fetchSQLWithAllColumns = false) {
8913
+ if (fetchSQLWithAllColumns) {
8914
+ await this.updateDisplayMode("TABLE_MODE");
8915
+ }
8690
8916
  const { sql } = await this.executeQuery(getSQLQuery, {});
8691
8917
  return sql;
8692
8918
  }
@@ -8842,7 +9068,7 @@ class AnswerService {
8842
9068
  async getTML() {
8843
9069
  const { object } = await this.executeQuery(getAnswerTML, {});
8844
9070
  const edoc = object[0].edoc;
8845
- const YAML = await import('./index-BdkKLLo1.js');
9071
+ const YAML = await import('./index-BuwECGdm.js');
8846
9072
  const parsedDoc = YAML.parse(edoc);
8847
9073
  return {
8848
9074
  answer: {
@@ -18101,7 +18327,7 @@ function processEventData(type, eventData, thoughtSpotHost, containerEl) {
18101
18327
  return eventData;
18102
18328
  }
18103
18329
 
18104
- 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={".":{"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,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};
18330
+ 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={".":{"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,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};
18105
18331
 
18106
18332
  class HostEventClient {
18107
18333
  constructor(iFrame) {
@@ -20407,7 +20633,7 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
20407
20633
  * embedded Liveboard or visualization.
20408
20634
  */
20409
20635
  getEmbedParams() {
20410
- const { tag, hideTagFilterChips, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideHamburger, hideObjectSearch, hideNotification, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 = true, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, showMaskedFilterChip = false, isLiveboardMasterpiecesEnabled = false, hideHomepageLeftNav = false, modularHomeExperience = false, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, enable2ColumnLayout, enableCustomColumnGroups = false, dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, isEnhancedFilterInteractivityEnabled = false, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, discoveryExperience, coverAndFilterOptionInPDF = false, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, isLiveboardXLSXCSVDownloadEnabled = false, isGranularXLSXCSVSchedulesEnabled = false, isCentralizedLiveboardFilterUXEnabled = false, isLinkParametersEnabled, updatedSpotterChatPrompt, minimumHeight, isThisPeriodInDateFiltersEnabled, } = this.viewConfig;
20636
+ const { tag, hideTagFilterChips, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideHamburger, hideObjectSearch, hideNotification, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 = true, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, showMaskedFilterChip = false, isLiveboardMasterpiecesEnabled = false, hideHomepageLeftNav = false, modularHomeExperience = false, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, enable2ColumnLayout, enableCustomColumnGroups = false, dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, isEnhancedFilterInteractivityEnabled = false, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, discoveryExperience, coverAndFilterOptionInPDF = false, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, isLiveboardXLSXCSVDownloadEnabled = false, isGranularXLSXCSVSchedulesEnabled = false, isCentralizedLiveboardFilterUXEnabled = false, isLinkParametersEnabled, updatedSpotterChatPrompt, spotterSidebarConfig, spotterChatConfig, minimumHeight, isThisPeriodInDateFiltersEnabled, } = this.viewConfig;
20411
20637
  let params = {};
20412
20638
  params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
20413
20639
  params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
@@ -20431,6 +20657,41 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
20431
20657
  if (!isUndefined$1(updatedSpotterChatPrompt)) {
20432
20658
  params[Param.UpdatedSpotterChatPrompt] = !!updatedSpotterChatPrompt;
20433
20659
  }
20660
+ // Handle spotterSidebarConfig params
20661
+ if (spotterSidebarConfig) {
20662
+ const { enablePastConversationsSidebar, spotterSidebarTitle, spotterSidebarDefaultExpanded, spotterChatRenameLabel, spotterChatDeleteLabel, spotterDeleteConversationModalTitle, spotterPastConversationAlertMessage, spotterDocumentationUrl, spotterBestPracticesLabel, spotterConversationsBatchSize, spotterNewChatButtonTitle, } = spotterSidebarConfig;
20663
+ setParamIfDefined(params, Param.EnablePastConversationsSidebar, enablePastConversationsSidebar, true);
20664
+ setParamIfDefined(params, Param.SpotterSidebarDefaultExpanded, spotterSidebarDefaultExpanded, true);
20665
+ setParamIfDefined(params, Param.SpotterSidebarTitle, spotterSidebarTitle);
20666
+ setParamIfDefined(params, Param.SpotterChatRenameLabel, spotterChatRenameLabel);
20667
+ setParamIfDefined(params, Param.SpotterChatDeleteLabel, spotterChatDeleteLabel);
20668
+ setParamIfDefined(params, Param.SpotterDeleteConversationModalTitle, spotterDeleteConversationModalTitle);
20669
+ setParamIfDefined(params, Param.SpotterPastConversationAlertMessage, spotterPastConversationAlertMessage);
20670
+ setParamIfDefined(params, Param.SpotterBestPracticesLabel, spotterBestPracticesLabel);
20671
+ setParamIfDefined(params, Param.SpotterConversationsBatchSize, spotterConversationsBatchSize);
20672
+ setParamIfDefined(params, Param.SpotterNewChatButtonTitle, spotterNewChatButtonTitle);
20673
+ // URL param with validation
20674
+ if (spotterDocumentationUrl !== undefined) {
20675
+ const [isValid, validationError] = validateHttpUrl(spotterDocumentationUrl);
20676
+ if (isValid) {
20677
+ params[Param.SpotterDocumentationUrl] = spotterDocumentationUrl;
20678
+ }
20679
+ else {
20680
+ this.handleError({
20681
+ errorType: ErrorDetailsTypes.VALIDATION_ERROR,
20682
+ message: ERROR_MESSAGE.INVALID_SPOTTER_DOCUMENTATION_URL,
20683
+ code: EmbedErrorCodes.INVALID_URL,
20684
+ error: (validationError === null || validationError === void 0 ? void 0 : validationError.message) || ERROR_MESSAGE.INVALID_SPOTTER_DOCUMENTATION_URL,
20685
+ });
20686
+ }
20687
+ }
20688
+ }
20689
+ // Handle spotterChatConfig params
20690
+ if (spotterChatConfig) {
20691
+ const { hideToolResponseCardBranding, toolResponseCardBrandingLabel, } = spotterChatConfig;
20692
+ setParamIfDefined(params, Param.HideToolResponseCardBranding, hideToolResponseCardBranding, true);
20693
+ setParamIfDefined(params, Param.ToolResponseCardBrandingLabel, toolResponseCardBrandingLabel);
20694
+ }
20434
20695
  if (hideObjectSearch) {
20435
20696
  params[Param.HideObjectSearch] = !!hideObjectSearch;
20436
20697
  }
@@ -20828,6 +21089,7 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
20828
21089
  liveboardId: this.viewConfig.liveboardId,
20829
21090
  vizId: this.viewConfig.vizId,
20830
21091
  activeTabId: this.viewConfig.activeTabId,
21092
+ personalizedViewId: this.viewConfig.personalizedViewId,
20831
21093
  };
20832
21094
  if (this.viewConfig.fullHeight === true) {
20833
21095
  if (this.viewConfig.vizId) {
@@ -20852,7 +21114,7 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
20852
21114
  getEmbedParamsObject() {
20853
21115
  let params = {};
20854
21116
  params = this.getBaseQueryParams(params);
20855
- 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;
21117
+ 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;
20856
21118
  const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
20857
21119
  || this.viewConfig.preventPinboardFilterRemoval;
20858
21120
  if (fullHeight === true) {
@@ -20926,6 +21188,12 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
20926
21188
  if (showSpotterLimitations !== undefined) {
20927
21189
  params[Param.ShowSpotterLimitations] = showSpotterLimitations;
20928
21190
  }
21191
+ // Handle spotterChatConfig params
21192
+ if (spotterChatConfig) {
21193
+ const { hideToolResponseCardBranding, toolResponseCardBrandingLabel, } = spotterChatConfig;
21194
+ setParamIfDefined(params, Param.HideToolResponseCardBranding, hideToolResponseCardBranding, true);
21195
+ setParamIfDefined(params, Param.ToolResponseCardBrandingLabel, toolResponseCardBrandingLabel);
21196
+ }
20929
21197
  if (isLinkParametersEnabled !== undefined) {
20930
21198
  params[Param.isLinkParametersEnabled] = isLinkParametersEnabled;
20931
21199
  }
@@ -20949,15 +21217,31 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
20949
21217
  getQueryParamString(params, true);
20950
21218
  return params;
20951
21219
  }
20952
- getIframeSuffixSrc(liveboardId, vizId, activeTabId) {
20953
- let suffix = `/embed/viz/${liveboardId}`;
21220
+ getIframeSuffixSrc(liveboardId, vizId, activeTabId, personalizedViewId) {
21221
+ // Extract view from liveboardId if passed along with it (legacy approach)
21222
+ // View must be appended as query param at the end, not embedded in path
21223
+ let liveboardGuid = liveboardId;
21224
+ let legacyViewId;
21225
+ if (liveboardId === null || liveboardId === void 0 ? void 0 : liveboardId.includes('?')) {
21226
+ const [id, query] = liveboardId.split('?');
21227
+ liveboardGuid = id;
21228
+ const params = new URLSearchParams(query);
21229
+ legacyViewId = params.get('view') || undefined;
21230
+ }
21231
+ // personalizedViewId takes precedence over legacyViewId (when passed as part of liveboardId)
21232
+ const effectiveViewId = personalizedViewId || legacyViewId;
21233
+ let suffix = `/embed/viz/${liveboardGuid}`;
20954
21234
  if (activeTabId) {
20955
- suffix = `${suffix}/tab/${activeTabId} `;
21235
+ suffix = `${suffix}/tab/${activeTabId}`;
20956
21236
  }
20957
21237
  if (vizId) {
20958
21238
  suffix = `${suffix}/${vizId}`;
20959
21239
  }
20960
- const tsPostHashParams = this.getThoughtSpotPostUrlParams();
21240
+ const additionalParams = {};
21241
+ if (effectiveViewId) {
21242
+ additionalParams.view = effectiveViewId;
21243
+ }
21244
+ const tsPostHashParams = this.getThoughtSpotPostUrlParams(additionalParams);
20961
21245
  suffix = `${suffix}${tsPostHashParams}`;
20962
21246
  return suffix;
20963
21247
  }
@@ -20967,7 +21251,7 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
20967
21251
  */
20968
21252
  getIFrameSrc() {
20969
21253
  var _a;
20970
- const { vizId, activeTabId } = this.viewConfig;
21254
+ const { vizId, activeTabId, personalizedViewId } = this.viewConfig;
20971
21255
  const liveboardId = (_a = this.viewConfig.liveboardId) !== null && _a !== void 0 ? _a : this.viewConfig.pinboardId;
20972
21256
  if (!liveboardId) {
20973
21257
  this.handleError({
@@ -20977,7 +21261,7 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
20977
21261
  error: ERROR_MESSAGE.LIVEBOARD_VIZ_ID_VALIDATION,
20978
21262
  });
20979
21263
  }
20980
- return `${this.getRootIframeSrc()}${this.getIframeSuffixSrc(liveboardId, vizId, activeTabId)}`;
21264
+ return `${this.getRootIframeSrc()}${this.getIframeSuffixSrc(liveboardId, vizId, activeTabId, personalizedViewId)}`;
20981
21265
  }
20982
21266
  setActiveTab(data) {
20983
21267
  if (!this.viewConfig.vizId) {
@@ -21016,12 +21300,13 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
21016
21300
  beforePrerenderVisible() {
21017
21301
  const embedObj = this.getPreRenderObj();
21018
21302
  this.executeAfterEmbedContainerLoaded(() => {
21019
- this.navigateToLiveboard(this.viewConfig.liveboardId, this.viewConfig.vizId, this.viewConfig.activeTabId);
21303
+ this.navigateToLiveboard(this.viewConfig.liveboardId, this.viewConfig.vizId, this.viewConfig.activeTabId, this.viewConfig.personalizedViewId);
21020
21304
  if (embedObj) {
21021
21305
  embedObj.currentLiveboardState = {
21022
21306
  liveboardId: this.viewConfig.liveboardId,
21023
21307
  vizId: this.viewConfig.vizId,
21024
21308
  activeTabId: this.viewConfig.activeTabId,
21309
+ personalizedViewId: this.viewConfig.personalizedViewId,
21025
21310
  };
21026
21311
  }
21027
21312
  });
@@ -21086,11 +21371,12 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
21086
21371
  this.postRender();
21087
21372
  return this;
21088
21373
  }
21089
- navigateToLiveboard(liveboardId, vizId, activeTabId) {
21090
- const path = this.getIframeSuffixSrc(liveboardId, vizId, activeTabId);
21374
+ navigateToLiveboard(liveboardId, vizId, activeTabId, personalizedViewId) {
21375
+ const path = this.getIframeSuffixSrc(liveboardId, vizId, activeTabId, personalizedViewId);
21091
21376
  this.viewConfig.liveboardId = liveboardId;
21092
21377
  this.viewConfig.activeTabId = activeTabId;
21093
21378
  this.viewConfig.vizId = vizId;
21379
+ this.viewConfig.personalizedViewId = personalizedViewId;
21094
21380
  if (this.isRendered) {
21095
21381
  this.trigger(HostEvent.Navigate, path.substring(1));
21096
21382
  }
@@ -21114,6 +21400,9 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
21114
21400
  if (this.viewConfig.vizId) {
21115
21401
  url = `${url}/${this.viewConfig.vizId}`;
21116
21402
  }
21403
+ if (this.viewConfig.personalizedViewId) {
21404
+ url = `${url}?view=${this.viewConfig.personalizedViewId}`;
21405
+ }
21117
21406
  return url;
21118
21407
  }
21119
21408
  };
@@ -21682,7 +21971,9 @@ let SpotterEmbed$1 = class SpotterEmbed extends TsEmbed {
21682
21971
  this.viewConfig = viewConfig;
21683
21972
  }
21684
21973
  getEmbedParamsObject() {
21685
- const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, enablePastConversationsSidebar, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, updatedSpotterChatPrompt, } = this.viewConfig;
21974
+ const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, updatedSpotterChatPrompt, spotterSidebarConfig, spotterChatConfig, } = this.viewConfig;
21975
+ // Extract sidebar config properties
21976
+ const { enablePastConversationsSidebar, spotterSidebarTitle, spotterSidebarDefaultExpanded, spotterChatRenameLabel, spotterChatDeleteLabel, spotterDeleteConversationModalTitle, spotterPastConversationAlertMessage, spotterDocumentationUrl, spotterBestPracticesLabel, spotterConversationsBatchSize, spotterNewChatButtonTitle, } = spotterSidebarConfig || {};
21686
21977
  if (!worksheetId) {
21687
21978
  this.handleError({
21688
21979
  errorType: ErrorDetailsTypes.VALIDATION_ERROR,
@@ -21693,30 +21984,51 @@ let SpotterEmbed$1 = class SpotterEmbed extends TsEmbed {
21693
21984
  }
21694
21985
  const queryParams = this.getBaseQueryParams();
21695
21986
  queryParams[Param.SpotterEnabled] = true;
21696
- if (!isUndefined_1(disableSourceSelection)) {
21697
- queryParams[Param.DisableSourceSelection] = !!disableSourceSelection;
21698
- }
21699
- if (!isUndefined_1(hideSourceSelection)) {
21700
- queryParams[Param.HideSourceSelection] = !!hideSourceSelection;
21701
- }
21702
- if (!isUndefined_1(dataPanelV2)) {
21703
- queryParams[Param.DataPanelV2Enabled] = !!dataPanelV2;
21704
- }
21705
- if (!isUndefined_1(showSpotterLimitations)) {
21706
- queryParams[Param.ShowSpotterLimitations] = !!showSpotterLimitations;
21707
- }
21708
- if (!isUndefined_1(hideSampleQuestions)) {
21709
- queryParams[Param.HideSampleQuestions] = !!hideSampleQuestions;
21987
+ // Boolean params
21988
+ setParamIfDefined(queryParams, Param.DisableSourceSelection, disableSourceSelection, true);
21989
+ setParamIfDefined(queryParams, Param.HideSourceSelection, hideSourceSelection, true);
21990
+ setParamIfDefined(queryParams, Param.DataPanelV2Enabled, dataPanelV2, true);
21991
+ setParamIfDefined(queryParams, Param.ShowSpotterLimitations, showSpotterLimitations, true);
21992
+ setParamIfDefined(queryParams, Param.HideSampleQuestions, hideSampleQuestions, true);
21993
+ setParamIfDefined(queryParams, Param.UpdatedSpotterChatPrompt, updatedSpotterChatPrompt, true);
21994
+ setParamIfDefined(queryParams, Param.SpotterSidebarDefaultExpanded, spotterSidebarDefaultExpanded, true);
21995
+ // String params
21996
+ setParamIfDefined(queryParams, Param.SpotterSidebarTitle, spotterSidebarTitle);
21997
+ setParamIfDefined(queryParams, Param.SpotterChatRenameLabel, spotterChatRenameLabel);
21998
+ setParamIfDefined(queryParams, Param.SpotterChatDeleteLabel, spotterChatDeleteLabel);
21999
+ setParamIfDefined(queryParams, Param.SpotterDeleteConversationModalTitle, spotterDeleteConversationModalTitle);
22000
+ setParamIfDefined(queryParams, Param.SpotterPastConversationAlertMessage, spotterPastConversationAlertMessage);
22001
+ setParamIfDefined(queryParams, Param.SpotterBestPracticesLabel, spotterBestPracticesLabel);
22002
+ setParamIfDefined(queryParams, Param.SpotterConversationsBatchSize, spotterConversationsBatchSize);
22003
+ setParamIfDefined(queryParams, Param.SpotterNewChatButtonTitle, spotterNewChatButtonTitle);
22004
+ // URL param with validation
22005
+ if (spotterDocumentationUrl !== undefined) {
22006
+ const [isValid, validationError] = validateHttpUrl(spotterDocumentationUrl);
22007
+ if (isValid) {
22008
+ queryParams[Param.SpotterDocumentationUrl] = spotterDocumentationUrl;
22009
+ }
22010
+ else {
22011
+ this.handleError({
22012
+ errorType: ErrorDetailsTypes.VALIDATION_ERROR,
22013
+ message: ERROR_MESSAGE.INVALID_SPOTTER_DOCUMENTATION_URL,
22014
+ code: EmbedErrorCodes.INVALID_URL,
22015
+ error: (validationError === null || validationError === void 0 ? void 0 : validationError.message) || ERROR_MESSAGE.INVALID_SPOTTER_DOCUMENTATION_URL,
22016
+ });
22017
+ }
21710
22018
  }
21711
- if (!isUndefined_1(updatedSpotterChatPrompt)) {
21712
- queryParams[Param.UpdatedSpotterChatPrompt] = !!updatedSpotterChatPrompt;
22019
+ // Handle spotterChatConfig params
22020
+ if (spotterChatConfig) {
22021
+ const { hideToolResponseCardBranding, toolResponseCardBrandingLabel, } = spotterChatConfig;
22022
+ setParamIfDefined(queryParams, Param.HideToolResponseCardBranding, hideToolResponseCardBranding, true);
22023
+ setParamIfDefined(queryParams, Param.ToolResponseCardBrandingLabel, toolResponseCardBrandingLabel);
21713
22024
  }
21714
22025
  return queryParams;
21715
22026
  }
21716
22027
  getIframeSrc() {
21717
- const { worksheetId, searchOptions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, enablePastConversationsSidebar, } = this.viewConfig;
22028
+ const { worksheetId, searchOptions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, spotterSidebarConfig, } = this.viewConfig;
21718
22029
  const path = 'insights/conv-assist';
21719
22030
  const queryParams = this.getEmbedParamsObject();
22031
+ const enablePastConversationsSidebar = spotterSidebarConfig === null || spotterSidebarConfig === void 0 ? void 0 : spotterSidebarConfig.enablePastConversationsSidebar;
21720
22032
  if (!isUndefined_1(enablePastConversationsSidebar)) {
21721
22033
  queryParams[Param.EnablePastConversationsSidebar] = !!enablePastConversationsSidebar;
21722
22034
  }