@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
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) :
@@ -1867,6 +1867,42 @@
1867
1867
  * @version SDK: 1.43.0 | ThoughtSpot: 10.15.0.cl
1868
1868
  */
1869
1869
  EmbedEvent["ApiIntercept"] = "ApiIntercept";
1870
+ /**
1871
+ * Emitted when a Spotter conversation is renamed.
1872
+ * @example
1873
+ * ```js
1874
+ * spotterEmbed.on(EmbedEvent.SpotterConversationRenamed, (payload) => {
1875
+ * console.log('Conversation renamed', payload);
1876
+ * // payload: { convId: string, oldTitle: string, newTitle: string }
1877
+ * })
1878
+ * ```
1879
+ * @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl
1880
+ */
1881
+ EmbedEvent["SpotterConversationRenamed"] = "spotterConversationRenamed";
1882
+ /**
1883
+ * Emitted when a Spotter conversation is deleted.
1884
+ * @example
1885
+ * ```js
1886
+ * spotterEmbed.on(EmbedEvent.SpotterConversationDeleted, (payload) => {
1887
+ * console.log('Conversation deleted', payload);
1888
+ * // payload: { convId: string, title: string }
1889
+ * })
1890
+ * ```
1891
+ * @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl
1892
+ */
1893
+ EmbedEvent["SpotterConversationDeleted"] = "spotterConversationDeleted";
1894
+ /**
1895
+ * Emitted when a Spotter conversation is selected/clicked.
1896
+ * @example
1897
+ * ```js
1898
+ * spotterEmbed.on(EmbedEvent.SpotterConversationSelected, (payload) => {
1899
+ * console.log('Conversation selected', payload);
1900
+ * // payload: { convId: string, title: string, worksheetId: string }
1901
+ * })
1902
+ * ```
1903
+ * @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl
1904
+ */
1905
+ EmbedEvent["SpotterConversationSelected"] = "spotterConversationSelected";
1870
1906
  /**
1871
1907
  * @hidden
1872
1908
  * Emitted when the auth token is about to get expired and needs to be refreshed.
@@ -3429,7 +3465,19 @@
3429
3465
  Param["isLinkParametersEnabled"] = "isLinkParametersEnabled";
3430
3466
  Param["EnablePastConversationsSidebar"] = "enablePastConversationsSidebar";
3431
3467
  Param["UpdatedSpotterChatPrompt"] = "updatedSpotterChatPrompt";
3468
+ Param["SpotterSidebarTitle"] = "spotterSidebarTitle";
3469
+ Param["SpotterSidebarDefaultExpanded"] = "spotterSidebarDefaultExpanded";
3470
+ Param["SpotterChatRenameLabel"] = "spotterChatRenameLabel";
3471
+ Param["SpotterChatDeleteLabel"] = "spotterChatDeleteLabel";
3472
+ Param["SpotterDeleteConversationModalTitle"] = "spotterDeleteConversationModalTitle";
3473
+ Param["SpotterPastConversationAlertMessage"] = "spotterPastConversationAlertMessage";
3474
+ Param["SpotterDocumentationUrl"] = "spotterDocumentationUrl";
3475
+ Param["SpotterBestPracticesLabel"] = "spotterBestPracticesLabel";
3476
+ Param["SpotterConversationsBatchSize"] = "spotterConversationsBatchSize";
3477
+ Param["SpotterNewChatButtonTitle"] = "spotterNewChatButtonTitle";
3432
3478
  Param["IsThisPeriodInDateFiltersEnabled"] = "isThisPeriodInDateFiltersEnabled";
3479
+ Param["HideToolResponseCardBranding"] = "hideToolResponseCardBranding";
3480
+ Param["ToolResponseCardBrandingLabel"] = "toolResponseCardBrandingLabel";
3433
3481
  })(Param || (Param = {}));
3434
3482
  /**
3435
3483
  * ThoughtSpot application pages include actions and menu commands
@@ -4855,6 +4903,96 @@
4855
4903
  * @version SDK: 1.44.0 | ThoughtSpot Cloud: 26.2.0.cl
4856
4904
  */
4857
4905
  Action["UngroupLiveboardGroup"] = "ungroupLiveboardGroup";
4906
+ /**
4907
+ * Controls visibility of the sidebar header (title and toggle button)
4908
+ * in the Spotter past conversations sidebar.
4909
+ * @example
4910
+ * ```js
4911
+ * hiddenActions: [Action.SpotterSidebarHeader]
4912
+ * ```
4913
+ * @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
4914
+ */
4915
+ Action["SpotterSidebarHeader"] = "spotterSidebarHeader";
4916
+ /**
4917
+ * Controls visibility of the sidebar footer (documentation link)
4918
+ * in the Spotter past conversations sidebar.
4919
+ * @example
4920
+ * ```js
4921
+ * hiddenActions: [Action.SpotterSidebarFooter]
4922
+ * ```
4923
+ * @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
4924
+ */
4925
+ Action["SpotterSidebarFooter"] = "spotterSidebarFooter";
4926
+ /**
4927
+ * Controls visibility and disable state of the sidebar toggle/expand button
4928
+ * in the Spotter past conversations sidebar.
4929
+ * @example
4930
+ * ```js
4931
+ * disabledActions: [Action.SpotterSidebarToggle]
4932
+ * ```
4933
+ * @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
4934
+ */
4935
+ Action["SpotterSidebarToggle"] = "spotterSidebarToggle";
4936
+ /**
4937
+ * Controls visibility and disable state of the "New Chat" button
4938
+ * in the Spotter past conversations sidebar.
4939
+ * @example
4940
+ * ```js
4941
+ * disabledActions: [Action.SpotterNewChat]
4942
+ * ```
4943
+ * @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
4944
+ */
4945
+ Action["SpotterNewChat"] = "spotterNewChat";
4946
+ /**
4947
+ * Controls visibility of the past conversation banner alert
4948
+ * in the Spotter interface.
4949
+ * @example
4950
+ * ```js
4951
+ * hiddenActions: [Action.SpotterPastChatBanner]
4952
+ * ```
4953
+ * @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
4954
+ */
4955
+ Action["SpotterPastChatBanner"] = "spotterPastChatBanner";
4956
+ /**
4957
+ * Controls visibility and disable state of the conversation edit menu
4958
+ * (three-dot menu) in the Spotter past conversations sidebar.
4959
+ * @example
4960
+ * ```js
4961
+ * disabledActions: [Action.SpotterChatMenu]
4962
+ * ```
4963
+ * @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
4964
+ */
4965
+ Action["SpotterChatMenu"] = "spotterChatMenu";
4966
+ /**
4967
+ * Controls visibility and disable state of the rename action
4968
+ * in the Spotter conversation edit menu.
4969
+ * @example
4970
+ * ```js
4971
+ * disabledActions: [Action.SpotterChatRename]
4972
+ * ```
4973
+ * @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
4974
+ */
4975
+ Action["SpotterChatRename"] = "spotterChatRename";
4976
+ /**
4977
+ * Controls visibility and disable state of the delete action
4978
+ * in the Spotter conversation edit menu.
4979
+ * @example
4980
+ * ```js
4981
+ * disabledActions: [Action.SpotterChatDelete]
4982
+ * ```
4983
+ * @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
4984
+ */
4985
+ Action["SpotterChatDelete"] = "spotterChatDelete";
4986
+ /**
4987
+ * Controls visibility and disable state of the documentation/best practices
4988
+ * link in the Spotter sidebar footer.
4989
+ * @example
4990
+ * ```js
4991
+ * disabledActions: [Action.SpotterDocs]
4992
+ * ```
4993
+ * @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
4994
+ */
4995
+ Action["SpotterDocs"] = "spotterDocs";
4858
4996
  /**
4859
4997
  * The **Include current period** checkbox for date filters.
4860
4998
  * Controls the visibility and availability of the option to include
@@ -4993,13 +5131,30 @@
4993
5131
  * Error types emitted by embedded components.
4994
5132
  *
4995
5133
  * These enum values categorize different types of errors that can occur during
4996
- * the lifecycle of an embedded ThoughtSpot component. Use these values to implement
4997
- * specific error handling logic based on the error category.
4998
- *
4999
- * @see {@link EmbedErrorDetailsEvent} - The error event object structure
5000
- * @see {@link EmbedEvent.Error} - The event that emits these errors
5134
+ * the lifecycle of an embedded ThoughtSpot component.
5135
+ * Use {@link EmbedErrorDetailsEvent} and {@link EmbedErrorCodes} to handle specific errors.
5001
5136
  * @version SDK: 1.44.2 | ThoughtSpot: 26.2.0.cl
5002
5137
  * @group Error Handling
5138
+ *
5139
+ * @example
5140
+ * Handle specific error types
5141
+ * ```js
5142
+ * embed.on(EmbedEvent.Error, (error) => {
5143
+ * switch (error.errorType) {
5144
+ * case ErrorDetailsTypes.API:
5145
+ * console.error('API error:', error.message);
5146
+ * break;
5147
+ * case ErrorDetailsTypes.VALIDATION_ERROR:
5148
+ * console.error('Validation error:', error.message);
5149
+ * break;
5150
+ * case ErrorDetailsTypes.NETWORK:
5151
+ * console.error('Network error:', error.message);
5152
+ * break;
5153
+ * default:
5154
+ * console.error('Unknown error:', error);
5155
+ * }
5156
+ * });
5157
+ * ```
5003
5158
  */
5004
5159
  var ErrorDetailsTypes;
5005
5160
  (function (ErrorDetailsTypes) {
@@ -5011,35 +5166,43 @@
5011
5166
  ErrorDetailsTypes["NETWORK"] = "NETWORK";
5012
5167
  })(ErrorDetailsTypes || (ErrorDetailsTypes = {}));
5013
5168
  /**
5014
- * Error codes for identifying specific issues in embedded ThoughtSpot components.
5015
- *
5016
- * Use these codes for precise error handling and debugging. Each code maps to a
5017
- * distinct failure scenario, enabling targeted recovery strategies.
5169
+ * Error codes for identifying specific issues in embedded ThoughtSpot components. Use {@link EmbedErrorDetailsEvent} and {@link ErrorDetailsTypes} codes for precise error handling and debugging.
5018
5170
  *
5019
5171
  * @version SDK: 1.44.2 | ThoughtSpot: 26.2.0.cl
5020
5172
  * @group Error Handling
5021
- *
5022
- * @see {@link EmbedErrorDetailsEvent} - The error event object that includes these codes
5023
- * @see {@link ErrorDetailsTypes} - General error type categories
5024
- *
5173
+
5025
5174
  * @example
5026
5175
  * Handle specific error codes in the error event handler
5027
- *
5176
+ * ```js
5028
5177
  * embed.on(EmbedEvent.Error, (error) => {
5029
- * if (error.code === EmbedErrorCodes.WORKSHEET_ID_NOT_FOUND) {
5030
- * console.error('Worksheet ID not found:', error.message);
5178
+ * switch (error.code) {
5179
+ * case EmbedErrorCodes.WORKSHEET_ID_NOT_FOUND:
5180
+ * console.error('Worksheet ID not found:', error.message);
5181
+ * break;
5182
+ * case EmbedErrorCodes.LIVEBOARD_ID_MISSING:
5183
+ * console.error('Liveboard ID is missing:', error.message);
5184
+ * break;
5185
+ * case EmbedErrorCodes.CONFLICTING_ACTIONS_CONFIG:
5186
+ * console.error('Conflicting actions configuration:', error.message);
5187
+ * break;
5188
+ * case EmbedErrorCodes.CONFLICTING_TABS_CONFIG:
5189
+ * console.error('Conflicting tabs configuration:', error.message);
5190
+ * break;
5191
+ * default:
5192
+ * console.error('Unknown error:', error);
5031
5193
  * }
5032
5194
  * });
5033
- * */
5195
+ * ```
5196
+ * */
5034
5197
  var EmbedErrorCodes;
5035
5198
  (function (EmbedErrorCodes) {
5036
5199
  /** Worksheet ID not found or does not exist */
5037
5200
  EmbedErrorCodes["WORKSHEET_ID_NOT_FOUND"] = "WORKSHEET_ID_NOT_FOUND";
5038
5201
  /** Required Liveboard ID is missing from configuration */
5039
5202
  EmbedErrorCodes["LIVEBOARD_ID_MISSING"] = "LIVEBOARD_ID_MISSING";
5040
- /** Conflicting action configuration detected (e.g., both hiddenActions and visibleActions specified) */
5203
+ /** Conflicting action configuration detected */
5041
5204
  EmbedErrorCodes["CONFLICTING_ACTIONS_CONFIG"] = "CONFLICTING_ACTIONS_CONFIG";
5042
- /** Conflicting tab configuration detected (e.g., both hiddenTabs and visibleTabs specified) */
5205
+ /** Conflicting tab configuration detected */
5043
5206
  EmbedErrorCodes["CONFLICTING_TABS_CONFIG"] = "CONFLICTING_TABS_CONFIG";
5044
5207
  /** Error during component initialization */
5045
5208
  EmbedErrorCodes["INIT_ERROR"] = "INIT_ERROR";
@@ -5057,6 +5220,8 @@
5057
5220
  EmbedErrorCodes["PARSING_API_INTERCEPT_BODY_ERROR"] = "PARSING_API_INTERCEPT_BODY_ERROR";
5058
5221
  /** Failed to update embed parameters during pre-render */
5059
5222
  EmbedErrorCodes["UPDATE_PARAMS_FAILED"] = "UPDATE_PARAMS_FAILED";
5223
+ /** Invalid URL provided in configuration */
5224
+ EmbedErrorCodes["INVALID_URL"] = "INVALID_URL";
5060
5225
  })(EmbedErrorCodes || (EmbedErrorCodes = {}));
5061
5226
  var ContextType;
5062
5227
  (function (ContextType) {
@@ -5197,6 +5362,7 @@
5197
5362
  ERROR_PARSING_API_INTERCEPT_BODY: 'Error parsing api intercept body',
5198
5363
  SSR_ENVIRONMENT_ERROR: 'SSR environment detected. This function cannot be called in SSR environment.',
5199
5364
  UPDATE_PARAMS_FAILED: 'Failed to update embed parameters',
5365
+ INVALID_SPOTTER_DOCUMENTATION_URL: 'Invalid spotterDocumentationUrl. Please provide a valid http or https URL.',
5200
5366
  };
5201
5367
  const CUSTOM_ACTIONS_ERROR_MESSAGE = {
5202
5368
  INVALID_ACTION_OBJECT: 'Custom Action Validation Error: Invalid action object provided',
@@ -5681,6 +5847,36 @@
5681
5847
  return true;
5682
5848
  }
5683
5849
  return false;
5850
+ };
5851
+ /**
5852
+ * Validates that a URL uses only http: or https: protocols.
5853
+ * Returns a tuple of [isValid, error] so the caller can handle validation errors.
5854
+ * @param url - The URL string to validate
5855
+ * @returns [true, null] if valid, [false, Error] if invalid
5856
+ */
5857
+ const validateHttpUrl = (url) => {
5858
+ try {
5859
+ const parsedUrl = new URL(url);
5860
+ if (parsedUrl.protocol !== 'http:' && parsedUrl.protocol !== 'https:') {
5861
+ return [false, new Error(`Invalid protocol: ${parsedUrl.protocol}. Only http: and https: are allowed.`)];
5862
+ }
5863
+ return [true, null];
5864
+ }
5865
+ catch (error) {
5866
+ return [false, error instanceof Error ? error : new Error(String(error))];
5867
+ }
5868
+ };
5869
+ /**
5870
+ * Sets a query parameter if the value is defined.
5871
+ * @param queryParams - The query params object to modify
5872
+ * @param param - The parameter key
5873
+ * @param value - The value to set
5874
+ * @param asBoolean - If true, coerces value to boolean
5875
+ */
5876
+ const setParamIfDefined = (queryParams, param, value, asBoolean = false) => {
5877
+ if (value !== undefined) {
5878
+ queryParams[param] = asBoolean ? !!value : value;
5879
+ }
5684
5880
  };
5685
5881
 
5686
5882
  /**
@@ -8540,6 +8736,28 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
8540
8736
  sql
8541
8737
  }
8542
8738
  }
8739
+ `;
8740
+ const updateDisplayMode = `
8741
+ mutation UpdateDisplayMode(
8742
+ $session: BachSessionIdInput!
8743
+ $displayMode: DisplayMode
8744
+ ) {
8745
+ Answer__updateProperties(session: $session, displayMode: $displayMode) {
8746
+ id {
8747
+ sessionId
8748
+ genNo
8749
+ acSession {
8750
+ sessionId
8751
+ genNo
8752
+ }
8753
+ }
8754
+ answer {
8755
+ id
8756
+ displayMode
8757
+ suggestedDisplayMode
8758
+ }
8759
+ }
8760
+ }
8543
8761
  `;
8544
8762
  const getAnswerTML = `
8545
8763
  mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies: Boolean, $formatType: EDocFormatType, $exportPermissions: Boolean, $exportFqn: Boolean) {
@@ -8708,7 +8926,15 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
8708
8926
  },
8709
8927
  });
8710
8928
  }
8711
- async getSQLQuery() {
8929
+ async updateDisplayMode(displayMode = "TABLE_MODE") {
8930
+ return this.executeQuery(updateDisplayMode, {
8931
+ displayMode,
8932
+ });
8933
+ }
8934
+ async getSQLQuery(fetchSQLWithAllColumns = false) {
8935
+ if (fetchSQLWithAllColumns) {
8936
+ await this.updateDisplayMode("TABLE_MODE");
8937
+ }
8712
8938
  const { sql } = await this.executeQuery(getSQLQuery, {});
8713
8939
  return sql;
8714
8940
  }
@@ -18123,7 +18349,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
18123
18349
  return eventData;
18124
18350
  }
18125
18351
 
18126
- 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};
18352
+ 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};
18127
18353
 
18128
18354
  class HostEventClient {
18129
18355
  constructor(iFrame) {
@@ -20429,7 +20655,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
20429
20655
  * embedded Liveboard or visualization.
20430
20656
  */
20431
20657
  getEmbedParams() {
20432
- 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;
20658
+ 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;
20433
20659
  let params = {};
20434
20660
  params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
20435
20661
  params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
@@ -20453,6 +20679,41 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
20453
20679
  if (!isUndefined$1(updatedSpotterChatPrompt)) {
20454
20680
  params[Param.UpdatedSpotterChatPrompt] = !!updatedSpotterChatPrompt;
20455
20681
  }
20682
+ // Handle spotterSidebarConfig params
20683
+ if (spotterSidebarConfig) {
20684
+ const { enablePastConversationsSidebar, spotterSidebarTitle, spotterSidebarDefaultExpanded, spotterChatRenameLabel, spotterChatDeleteLabel, spotterDeleteConversationModalTitle, spotterPastConversationAlertMessage, spotterDocumentationUrl, spotterBestPracticesLabel, spotterConversationsBatchSize, spotterNewChatButtonTitle, } = spotterSidebarConfig;
20685
+ setParamIfDefined(params, Param.EnablePastConversationsSidebar, enablePastConversationsSidebar, true);
20686
+ setParamIfDefined(params, Param.SpotterSidebarDefaultExpanded, spotterSidebarDefaultExpanded, true);
20687
+ setParamIfDefined(params, Param.SpotterSidebarTitle, spotterSidebarTitle);
20688
+ setParamIfDefined(params, Param.SpotterChatRenameLabel, spotterChatRenameLabel);
20689
+ setParamIfDefined(params, Param.SpotterChatDeleteLabel, spotterChatDeleteLabel);
20690
+ setParamIfDefined(params, Param.SpotterDeleteConversationModalTitle, spotterDeleteConversationModalTitle);
20691
+ setParamIfDefined(params, Param.SpotterPastConversationAlertMessage, spotterPastConversationAlertMessage);
20692
+ setParamIfDefined(params, Param.SpotterBestPracticesLabel, spotterBestPracticesLabel);
20693
+ setParamIfDefined(params, Param.SpotterConversationsBatchSize, spotterConversationsBatchSize);
20694
+ setParamIfDefined(params, Param.SpotterNewChatButtonTitle, spotterNewChatButtonTitle);
20695
+ // URL param with validation
20696
+ if (spotterDocumentationUrl !== undefined) {
20697
+ const [isValid, validationError] = validateHttpUrl(spotterDocumentationUrl);
20698
+ if (isValid) {
20699
+ params[Param.SpotterDocumentationUrl] = spotterDocumentationUrl;
20700
+ }
20701
+ else {
20702
+ this.handleError({
20703
+ errorType: ErrorDetailsTypes.VALIDATION_ERROR,
20704
+ message: ERROR_MESSAGE.INVALID_SPOTTER_DOCUMENTATION_URL,
20705
+ code: EmbedErrorCodes.INVALID_URL,
20706
+ error: (validationError === null || validationError === void 0 ? void 0 : validationError.message) || ERROR_MESSAGE.INVALID_SPOTTER_DOCUMENTATION_URL,
20707
+ });
20708
+ }
20709
+ }
20710
+ }
20711
+ // Handle spotterChatConfig params
20712
+ if (spotterChatConfig) {
20713
+ const { hideToolResponseCardBranding, toolResponseCardBrandingLabel, } = spotterChatConfig;
20714
+ setParamIfDefined(params, Param.HideToolResponseCardBranding, hideToolResponseCardBranding, true);
20715
+ setParamIfDefined(params, Param.ToolResponseCardBrandingLabel, toolResponseCardBrandingLabel);
20716
+ }
20456
20717
  if (hideObjectSearch) {
20457
20718
  params[Param.HideObjectSearch] = !!hideObjectSearch;
20458
20719
  }
@@ -20850,6 +21111,7 @@ query GetEurekaVizSnapshots(
20850
21111
  liveboardId: this.viewConfig.liveboardId,
20851
21112
  vizId: this.viewConfig.vizId,
20852
21113
  activeTabId: this.viewConfig.activeTabId,
21114
+ personalizedViewId: this.viewConfig.personalizedViewId,
20853
21115
  };
20854
21116
  if (this.viewConfig.fullHeight === true) {
20855
21117
  if (this.viewConfig.vizId) {
@@ -20874,7 +21136,7 @@ query GetEurekaVizSnapshots(
20874
21136
  getEmbedParamsObject() {
20875
21137
  let params = {};
20876
21138
  params = this.getBaseQueryParams(params);
20877
- 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;
21139
+ 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;
20878
21140
  const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
20879
21141
  || this.viewConfig.preventPinboardFilterRemoval;
20880
21142
  if (fullHeight === true) {
@@ -20948,6 +21210,12 @@ query GetEurekaVizSnapshots(
20948
21210
  if (showSpotterLimitations !== undefined) {
20949
21211
  params[Param.ShowSpotterLimitations] = showSpotterLimitations;
20950
21212
  }
21213
+ // Handle spotterChatConfig params
21214
+ if (spotterChatConfig) {
21215
+ const { hideToolResponseCardBranding, toolResponseCardBrandingLabel, } = spotterChatConfig;
21216
+ setParamIfDefined(params, Param.HideToolResponseCardBranding, hideToolResponseCardBranding, true);
21217
+ setParamIfDefined(params, Param.ToolResponseCardBrandingLabel, toolResponseCardBrandingLabel);
21218
+ }
20951
21219
  if (isLinkParametersEnabled !== undefined) {
20952
21220
  params[Param.isLinkParametersEnabled] = isLinkParametersEnabled;
20953
21221
  }
@@ -20971,15 +21239,31 @@ query GetEurekaVizSnapshots(
20971
21239
  getQueryParamString(params, true);
20972
21240
  return params;
20973
21241
  }
20974
- getIframeSuffixSrc(liveboardId, vizId, activeTabId) {
20975
- let suffix = `/embed/viz/${liveboardId}`;
21242
+ getIframeSuffixSrc(liveboardId, vizId, activeTabId, personalizedViewId) {
21243
+ // Extract view from liveboardId if passed along with it (legacy approach)
21244
+ // View must be appended as query param at the end, not embedded in path
21245
+ let liveboardGuid = liveboardId;
21246
+ let legacyViewId;
21247
+ if (liveboardId === null || liveboardId === void 0 ? void 0 : liveboardId.includes('?')) {
21248
+ const [id, query] = liveboardId.split('?');
21249
+ liveboardGuid = id;
21250
+ const params = new URLSearchParams(query);
21251
+ legacyViewId = params.get('view') || undefined;
21252
+ }
21253
+ // personalizedViewId takes precedence over legacyViewId (when passed as part of liveboardId)
21254
+ const effectiveViewId = personalizedViewId || legacyViewId;
21255
+ let suffix = `/embed/viz/${liveboardGuid}`;
20976
21256
  if (activeTabId) {
20977
- suffix = `${suffix}/tab/${activeTabId} `;
21257
+ suffix = `${suffix}/tab/${activeTabId}`;
20978
21258
  }
20979
21259
  if (vizId) {
20980
21260
  suffix = `${suffix}/${vizId}`;
20981
21261
  }
20982
- const tsPostHashParams = this.getThoughtSpotPostUrlParams();
21262
+ const additionalParams = {};
21263
+ if (effectiveViewId) {
21264
+ additionalParams.view = effectiveViewId;
21265
+ }
21266
+ const tsPostHashParams = this.getThoughtSpotPostUrlParams(additionalParams);
20983
21267
  suffix = `${suffix}${tsPostHashParams}`;
20984
21268
  return suffix;
20985
21269
  }
@@ -20989,7 +21273,7 @@ query GetEurekaVizSnapshots(
20989
21273
  */
20990
21274
  getIFrameSrc() {
20991
21275
  var _a;
20992
- const { vizId, activeTabId } = this.viewConfig;
21276
+ const { vizId, activeTabId, personalizedViewId } = this.viewConfig;
20993
21277
  const liveboardId = (_a = this.viewConfig.liveboardId) !== null && _a !== void 0 ? _a : this.viewConfig.pinboardId;
20994
21278
  if (!liveboardId) {
20995
21279
  this.handleError({
@@ -20999,7 +21283,7 @@ query GetEurekaVizSnapshots(
20999
21283
  error: ERROR_MESSAGE.LIVEBOARD_VIZ_ID_VALIDATION,
21000
21284
  });
21001
21285
  }
21002
- return `${this.getRootIframeSrc()}${this.getIframeSuffixSrc(liveboardId, vizId, activeTabId)}`;
21286
+ return `${this.getRootIframeSrc()}${this.getIframeSuffixSrc(liveboardId, vizId, activeTabId, personalizedViewId)}`;
21003
21287
  }
21004
21288
  setActiveTab(data) {
21005
21289
  if (!this.viewConfig.vizId) {
@@ -21038,12 +21322,13 @@ query GetEurekaVizSnapshots(
21038
21322
  beforePrerenderVisible() {
21039
21323
  const embedObj = this.getPreRenderObj();
21040
21324
  this.executeAfterEmbedContainerLoaded(() => {
21041
- this.navigateToLiveboard(this.viewConfig.liveboardId, this.viewConfig.vizId, this.viewConfig.activeTabId);
21325
+ this.navigateToLiveboard(this.viewConfig.liveboardId, this.viewConfig.vizId, this.viewConfig.activeTabId, this.viewConfig.personalizedViewId);
21042
21326
  if (embedObj) {
21043
21327
  embedObj.currentLiveboardState = {
21044
21328
  liveboardId: this.viewConfig.liveboardId,
21045
21329
  vizId: this.viewConfig.vizId,
21046
21330
  activeTabId: this.viewConfig.activeTabId,
21331
+ personalizedViewId: this.viewConfig.personalizedViewId,
21047
21332
  };
21048
21333
  }
21049
21334
  });
@@ -21108,11 +21393,12 @@ query GetEurekaVizSnapshots(
21108
21393
  this.postRender();
21109
21394
  return this;
21110
21395
  }
21111
- navigateToLiveboard(liveboardId, vizId, activeTabId) {
21112
- const path = this.getIframeSuffixSrc(liveboardId, vizId, activeTabId);
21396
+ navigateToLiveboard(liveboardId, vizId, activeTabId, personalizedViewId) {
21397
+ const path = this.getIframeSuffixSrc(liveboardId, vizId, activeTabId, personalizedViewId);
21113
21398
  this.viewConfig.liveboardId = liveboardId;
21114
21399
  this.viewConfig.activeTabId = activeTabId;
21115
21400
  this.viewConfig.vizId = vizId;
21401
+ this.viewConfig.personalizedViewId = personalizedViewId;
21116
21402
  if (this.isRendered) {
21117
21403
  this.trigger(exports.HostEvent.Navigate, path.substring(1));
21118
21404
  }
@@ -21136,6 +21422,9 @@ query GetEurekaVizSnapshots(
21136
21422
  if (this.viewConfig.vizId) {
21137
21423
  url = `${url}/${this.viewConfig.vizId}`;
21138
21424
  }
21425
+ if (this.viewConfig.personalizedViewId) {
21426
+ url = `${url}?view=${this.viewConfig.personalizedViewId}`;
21427
+ }
21139
21428
  return url;
21140
21429
  }
21141
21430
  };
@@ -21704,7 +21993,9 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
21704
21993
  this.viewConfig = viewConfig;
21705
21994
  }
21706
21995
  getEmbedParamsObject() {
21707
- const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, enablePastConversationsSidebar, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, updatedSpotterChatPrompt, } = this.viewConfig;
21996
+ const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, updatedSpotterChatPrompt, spotterSidebarConfig, spotterChatConfig, } = this.viewConfig;
21997
+ // Extract sidebar config properties
21998
+ const { enablePastConversationsSidebar, spotterSidebarTitle, spotterSidebarDefaultExpanded, spotterChatRenameLabel, spotterChatDeleteLabel, spotterDeleteConversationModalTitle, spotterPastConversationAlertMessage, spotterDocumentationUrl, spotterBestPracticesLabel, spotterConversationsBatchSize, spotterNewChatButtonTitle, } = spotterSidebarConfig || {};
21708
21999
  if (!worksheetId) {
21709
22000
  this.handleError({
21710
22001
  errorType: ErrorDetailsTypes.VALIDATION_ERROR,
@@ -21715,30 +22006,51 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
21715
22006
  }
21716
22007
  const queryParams = this.getBaseQueryParams();
21717
22008
  queryParams[Param.SpotterEnabled] = true;
21718
- if (!isUndefined_1(disableSourceSelection)) {
21719
- queryParams[Param.DisableSourceSelection] = !!disableSourceSelection;
21720
- }
21721
- if (!isUndefined_1(hideSourceSelection)) {
21722
- queryParams[Param.HideSourceSelection] = !!hideSourceSelection;
21723
- }
21724
- if (!isUndefined_1(dataPanelV2)) {
21725
- queryParams[Param.DataPanelV2Enabled] = !!dataPanelV2;
21726
- }
21727
- if (!isUndefined_1(showSpotterLimitations)) {
21728
- queryParams[Param.ShowSpotterLimitations] = !!showSpotterLimitations;
21729
- }
21730
- if (!isUndefined_1(hideSampleQuestions)) {
21731
- queryParams[Param.HideSampleQuestions] = !!hideSampleQuestions;
22009
+ // Boolean params
22010
+ setParamIfDefined(queryParams, Param.DisableSourceSelection, disableSourceSelection, true);
22011
+ setParamIfDefined(queryParams, Param.HideSourceSelection, hideSourceSelection, true);
22012
+ setParamIfDefined(queryParams, Param.DataPanelV2Enabled, dataPanelV2, true);
22013
+ setParamIfDefined(queryParams, Param.ShowSpotterLimitations, showSpotterLimitations, true);
22014
+ setParamIfDefined(queryParams, Param.HideSampleQuestions, hideSampleQuestions, true);
22015
+ setParamIfDefined(queryParams, Param.UpdatedSpotterChatPrompt, updatedSpotterChatPrompt, true);
22016
+ setParamIfDefined(queryParams, Param.SpotterSidebarDefaultExpanded, spotterSidebarDefaultExpanded, true);
22017
+ // String params
22018
+ setParamIfDefined(queryParams, Param.SpotterSidebarTitle, spotterSidebarTitle);
22019
+ setParamIfDefined(queryParams, Param.SpotterChatRenameLabel, spotterChatRenameLabel);
22020
+ setParamIfDefined(queryParams, Param.SpotterChatDeleteLabel, spotterChatDeleteLabel);
22021
+ setParamIfDefined(queryParams, Param.SpotterDeleteConversationModalTitle, spotterDeleteConversationModalTitle);
22022
+ setParamIfDefined(queryParams, Param.SpotterPastConversationAlertMessage, spotterPastConversationAlertMessage);
22023
+ setParamIfDefined(queryParams, Param.SpotterBestPracticesLabel, spotterBestPracticesLabel);
22024
+ setParamIfDefined(queryParams, Param.SpotterConversationsBatchSize, spotterConversationsBatchSize);
22025
+ setParamIfDefined(queryParams, Param.SpotterNewChatButtonTitle, spotterNewChatButtonTitle);
22026
+ // URL param with validation
22027
+ if (spotterDocumentationUrl !== undefined) {
22028
+ const [isValid, validationError] = validateHttpUrl(spotterDocumentationUrl);
22029
+ if (isValid) {
22030
+ queryParams[Param.SpotterDocumentationUrl] = spotterDocumentationUrl;
22031
+ }
22032
+ else {
22033
+ this.handleError({
22034
+ errorType: ErrorDetailsTypes.VALIDATION_ERROR,
22035
+ message: ERROR_MESSAGE.INVALID_SPOTTER_DOCUMENTATION_URL,
22036
+ code: EmbedErrorCodes.INVALID_URL,
22037
+ error: (validationError === null || validationError === void 0 ? void 0 : validationError.message) || ERROR_MESSAGE.INVALID_SPOTTER_DOCUMENTATION_URL,
22038
+ });
22039
+ }
21732
22040
  }
21733
- if (!isUndefined_1(updatedSpotterChatPrompt)) {
21734
- queryParams[Param.UpdatedSpotterChatPrompt] = !!updatedSpotterChatPrompt;
22041
+ // Handle spotterChatConfig params
22042
+ if (spotterChatConfig) {
22043
+ const { hideToolResponseCardBranding, toolResponseCardBrandingLabel, } = spotterChatConfig;
22044
+ setParamIfDefined(queryParams, Param.HideToolResponseCardBranding, hideToolResponseCardBranding, true);
22045
+ setParamIfDefined(queryParams, Param.ToolResponseCardBrandingLabel, toolResponseCardBrandingLabel);
21735
22046
  }
21736
22047
  return queryParams;
21737
22048
  }
21738
22049
  getIframeSrc() {
21739
- const { worksheetId, searchOptions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, enablePastConversationsSidebar, } = this.viewConfig;
22050
+ const { worksheetId, searchOptions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, spotterSidebarConfig, } = this.viewConfig;
21740
22051
  const path = 'insights/conv-assist';
21741
22052
  const queryParams = this.getEmbedParamsObject();
22053
+ const enablePastConversationsSidebar = spotterSidebarConfig === null || spotterSidebarConfig === void 0 ? void 0 : spotterSidebarConfig.enablePastConversationsSidebar;
21742
22054
  if (!isUndefined_1(enablePastConversationsSidebar)) {
21743
22055
  queryParams[Param.EnablePastConversationsSidebar] = !!enablePastConversationsSidebar;
21744
22056
  }