@thoughtspot/visual-embed-sdk 1.45.2 → 1.45.3-mcp.2
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.
- package/cjs/package.json +2 -2
- package/cjs/src/css-variables.d.ts +48 -0
- package/cjs/src/css-variables.d.ts.map +1 -1
- package/cjs/src/embed/app.d.ts +37 -0
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +37 -1
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/app.spec.js +24 -0
- package/cjs/src/embed/app.spec.js.map +1 -1
- package/cjs/src/embed/auto-frame-renderer.d.ts +3 -0
- package/cjs/src/embed/auto-frame-renderer.d.ts.map +1 -0
- package/cjs/src/embed/auto-frame-renderer.js +70 -0
- package/cjs/src/embed/auto-frame-renderer.js.map +1 -0
- package/cjs/src/embed/base.d.ts.map +1 -1
- package/cjs/src/embed/base.js.map +1 -1
- package/cjs/src/embed/conversation.d.ts +128 -10
- package/cjs/src/embed/conversation.d.ts.map +1 -1
- package/cjs/src/embed/conversation.js +41 -18
- package/cjs/src/embed/conversation.js.map +1 -1
- package/cjs/src/embed/conversation.spec.js +96 -3
- package/cjs/src/embed/conversation.spec.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts +38 -1
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +38 -10
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/liveboard.spec.js +179 -7
- package/cjs/src/embed/liveboard.spec.js.map +1 -1
- package/cjs/src/embed/searchEmbed-basic-auth.spec.d.ts +2 -0
- package/cjs/src/embed/searchEmbed-basic-auth.spec.d.ts.map +1 -0
- package/cjs/src/embed/searchEmbed-basic-auth.spec.js +104 -0
- package/cjs/src/embed/searchEmbed-basic-auth.spec.js.map +1 -0
- package/cjs/src/errors.d.ts +1 -0
- package/cjs/src/errors.d.ts.map +1 -1
- package/cjs/src/errors.js +1 -0
- package/cjs/src/errors.js.map +1 -1
- package/cjs/src/index.d.ts +4 -3
- package/cjs/src/index.d.ts.map +1 -1
- package/cjs/src/index.js +3 -1
- package/cjs/src/index.js.map +1 -1
- package/cjs/src/types.d.ts +196 -41
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +185 -19
- package/cjs/src/types.js.map +1 -1
- package/cjs/src/utils/answerService/answerService.d.ts +34 -0
- package/cjs/src/utils/answerService/answerService.d.ts.map +1 -0
- package/cjs/src/utils/answerService/answerService.js +142 -0
- package/cjs/src/utils/answerService/answerService.js.map +1 -0
- package/cjs/src/utils/answerService/answerService.spec.d.ts +1 -0
- package/cjs/src/utils/answerService/answerService.spec.d.ts.map +1 -0
- package/cjs/src/utils/answerService/answerService.spec.js +1 -0
- package/cjs/src/utils/answerService/answerService.spec.js.map +1 -0
- package/cjs/src/utils/answerService/graphql-queries.d.ts +6 -0
- package/cjs/src/utils/answerService/graphql-queries.d.ts.map +1 -0
- package/cjs/src/utils/answerService/graphql-queries.js +123 -0
- package/cjs/src/utils/answerService/graphql-queries.js.map +1 -0
- package/cjs/src/utils/answerService.d.ts +10 -0
- package/cjs/src/utils/answerService.d.ts.map +1 -0
- package/cjs/src/utils/answerService.js +61 -0
- package/cjs/src/utils/answerService.js.map +1 -0
- package/cjs/src/utils/answerService.spec.d.ts +2 -0
- package/cjs/src/utils/answerService.spec.d.ts.map +1 -0
- package/cjs/src/utils/answerService.spec.js +31 -0
- package/cjs/src/utils/answerService.spec.js.map +1 -0
- package/cjs/src/utils/authService.d.ts +37 -0
- package/cjs/src/utils/authService.d.ts.map +1 -0
- package/cjs/src/utils/authService.js +106 -0
- package/cjs/src/utils/authService.js.map +1 -0
- package/cjs/src/utils/authService.spec.d.ts +2 -0
- package/cjs/src/utils/authService.spec.d.ts.map +1 -0
- package/cjs/src/utils/authService.spec.js +72 -0
- package/cjs/src/utils/authService.spec.js.map +1 -0
- package/cjs/src/utils/graphql/answerService/answer-queries.d.ts +1 -0
- package/cjs/src/utils/graphql/answerService/answer-queries.d.ts.map +1 -1
- package/cjs/src/utils/graphql/answerService/answer-queries.js +23 -1
- package/cjs/src/utils/graphql/answerService/answer-queries.js.map +1 -1
- package/cjs/src/utils/graphql/answerService/answerService.d.ts +2 -1
- package/cjs/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
- package/cjs/src/utils/graphql/answerService/answerService.js +9 -1
- package/cjs/src/utils/graphql/answerService/answerService.js.map +1 -1
- package/cjs/src/utils/graphql/answerService/answerService.spec.js +73 -0
- package/cjs/src/utils/graphql/answerService/answerService.spec.js.map +1 -1
- package/cjs/src/utils/graphql/answerService/graphql-queries.d.ts +5 -0
- package/cjs/src/utils/graphql/answerService/graphql-queries.d.ts.map +1 -0
- package/cjs/src/utils/graphql/answerService/graphql-queries.js +80 -0
- package/cjs/src/utils/graphql/answerService/graphql-queries.js.map +1 -0
- package/cjs/src/utils/graphql/conversationService/conversation-queries.d.ts +3 -0
- package/cjs/src/utils/graphql/conversationService/conversation-queries.d.ts.map +1 -0
- package/cjs/src/utils/graphql/conversationService/conversation-queries.js +318 -0
- package/cjs/src/utils/graphql/conversationService/conversation-queries.js.map +1 -0
- package/cjs/src/utils/graphql/conversationService/conversation-service.d.ts +12 -0
- package/cjs/src/utils/graphql/conversationService/conversation-service.d.ts.map +1 -0
- package/cjs/src/utils/graphql/conversationService/conversation-service.js +89 -0
- package/cjs/src/utils/graphql/conversationService/conversation-service.js.map +1 -0
- package/cjs/src/utils/graphql/spotterService/conversation-queries.d.ts +3 -0
- package/cjs/src/utils/graphql/spotterService/conversation-queries.d.ts.map +1 -0
- package/cjs/src/utils/graphql/spotterService/conversation-queries.js +318 -0
- package/cjs/src/utils/graphql/spotterService/conversation-queries.js.map +1 -0
- package/cjs/src/utils/graphql/spotterService/conversation-service.d.ts +12 -0
- package/cjs/src/utils/graphql/spotterService/conversation-service.d.ts.map +1 -0
- package/cjs/src/utils/graphql/spotterService/conversation-service.js +89 -0
- package/cjs/src/utils/graphql/spotterService/conversation-service.js.map +1 -0
- package/cjs/src/utils/graphql/spotterService/nls-answer-queries.d.ts +2 -0
- package/cjs/src/utils/graphql/spotterService/nls-answer-queries.d.ts.map +1 -0
- package/cjs/src/utils/graphql/spotterService/nls-answer-queries.js +403 -0
- package/cjs/src/utils/graphql/spotterService/nls-answer-queries.js.map +1 -0
- package/cjs/src/utils/graphql/spotterService/nls-answer-service.d.ts +12 -0
- package/cjs/src/utils/graphql/spotterService/nls-answer-service.d.ts.map +1 -0
- package/cjs/src/utils/graphql/spotterService/nls-answer-service.js +55 -0
- package/cjs/src/utils/graphql/spotterService/nls-answer-service.js.map +1 -0
- package/cjs/src/utils.d.ts +15 -0
- package/cjs/src/utils.d.ts.map +1 -1
- package/cjs/src/utils.js +33 -1
- package/cjs/src/utils.js.map +1 -1
- package/cjs/src/utils.spec.js +49 -0
- package/cjs/src/utils.spec.js.map +1 -1
- package/dist/{index-BdkKLLo1.js → index-0serzuii.js} +1 -1
- package/dist/index-CqrIh3Vj.js +7370 -0
- package/dist/index-aFN9fe8V.js +7371 -0
- package/dist/src/css-variables.d.ts +48 -0
- package/dist/src/css-variables.d.ts.map +1 -1
- package/dist/src/embed/app.d.ts +37 -0
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/auto-frame-renderer.d.ts +3 -0
- package/dist/src/embed/auto-frame-renderer.d.ts.map +1 -0
- package/dist/src/embed/base.d.ts.map +1 -1
- package/dist/src/embed/conversation.d.ts +128 -10
- package/dist/src/embed/conversation.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts +38 -1
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/errors.d.ts +1 -0
- package/dist/src/errors.d.ts.map +1 -1
- package/dist/src/index.d.ts +4 -3
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/types.d.ts +196 -41
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/graphql/answerService/answer-queries.d.ts +1 -0
- package/dist/src/utils/graphql/answerService/answer-queries.d.ts.map +1 -1
- package/dist/src/utils/graphql/answerService/answerService.d.ts +2 -1
- package/dist/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
- package/dist/src/utils.d.ts +15 -0
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +365 -52
- package/dist/tsembed-react.js +364 -51
- package/dist/tsembed.es.js +429 -53
- package/dist/tsembed.js +428 -51
- package/dist/visual-embed-sdk-react-full.d.ts +697 -343
- package/dist/visual-embed-sdk-react.d.ts +686 -332
- package/dist/visual-embed-sdk.d.ts +761 -380
- package/lib/package.json +2 -2
- package/lib/src/css-variables.d.ts +48 -0
- package/lib/src/css-variables.d.ts.map +1 -1
- package/lib/src/embed/app.d.ts +37 -0
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +39 -3
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/app.spec.js +24 -0
- package/lib/src/embed/app.spec.js.map +1 -1
- package/lib/src/embed/auto-frame-renderer.d.ts +3 -0
- package/lib/src/embed/auto-frame-renderer.d.ts.map +1 -0
- package/lib/src/embed/auto-frame-renderer.js +66 -0
- package/lib/src/embed/auto-frame-renderer.js.map +1 -0
- package/lib/src/embed/base.d.ts.map +1 -1
- package/lib/src/embed/base.js.map +1 -1
- package/lib/src/embed/conversation.d.ts +128 -10
- package/lib/src/embed/conversation.d.ts.map +1 -1
- package/lib/src/embed/conversation.js +42 -19
- package/lib/src/embed/conversation.js.map +1 -1
- package/lib/src/embed/conversation.spec.js +96 -3
- package/lib/src/embed/conversation.spec.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts +38 -1
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +39 -11
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +179 -7
- package/lib/src/embed/liveboard.spec.js.map +1 -1
- package/lib/src/embed/searchEmbed-basic-auth.spec.d.ts +2 -0
- package/lib/src/embed/searchEmbed-basic-auth.spec.d.ts.map +1 -0
- package/lib/src/embed/searchEmbed-basic-auth.spec.js +101 -0
- package/lib/src/embed/searchEmbed-basic-auth.spec.js.map +1 -0
- package/lib/src/errors.d.ts +1 -0
- package/lib/src/errors.d.ts.map +1 -1
- package/lib/src/errors.js +1 -0
- package/lib/src/errors.js.map +1 -1
- package/lib/src/index.d.ts +4 -3
- package/lib/src/index.d.ts.map +1 -1
- package/lib/src/index.js +1 -0
- package/lib/src/index.js.map +1 -1
- package/lib/src/types.d.ts +196 -41
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +185 -19
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils/graphql/answerService/answer-queries.d.ts +1 -0
- package/lib/src/utils/graphql/answerService/answer-queries.d.ts.map +1 -1
- package/lib/src/utils/graphql/answerService/answer-queries.js +22 -0
- package/lib/src/utils/graphql/answerService/answer-queries.js.map +1 -1
- package/lib/src/utils/graphql/answerService/answerService.d.ts +2 -1
- package/lib/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
- package/lib/src/utils/graphql/answerService/answerService.js +9 -1
- package/lib/src/utils/graphql/answerService/answerService.js.map +1 -1
- package/lib/src/utils/graphql/answerService/answerService.spec.js +73 -0
- package/lib/src/utils/graphql/answerService/answerService.spec.js.map +1 -1
- package/lib/src/utils/graphql/conversationService/conversation-queries.d.ts +3 -0
- package/lib/src/utils/graphql/conversationService/conversation-queries.d.ts.map +1 -0
- package/lib/src/utils/graphql/conversationService/conversation-queries.js +315 -0
- package/lib/src/utils/graphql/conversationService/conversation-queries.js.map +1 -0
- package/lib/src/utils/graphql/conversationService/conversation-service.d.ts +12 -0
- package/lib/src/utils/graphql/conversationService/conversation-service.d.ts.map +1 -0
- package/lib/src/utils/graphql/conversationService/conversation-service.js +84 -0
- package/lib/src/utils/graphql/conversationService/conversation-service.js.map +1 -0
- package/lib/src/utils/graphql/spotterService/conversation-queries.d.ts +3 -0
- package/lib/src/utils/graphql/spotterService/conversation-queries.d.ts.map +1 -0
- package/lib/src/utils/graphql/spotterService/conversation-queries.js +315 -0
- package/lib/src/utils/graphql/spotterService/conversation-queries.js.map +1 -0
- package/lib/src/utils/graphql/spotterService/conversation-service.d.ts +12 -0
- package/lib/src/utils/graphql/spotterService/conversation-service.d.ts.map +1 -0
- package/lib/src/utils/graphql/spotterService/conversation-service.js +84 -0
- package/lib/src/utils/graphql/spotterService/conversation-service.js.map +1 -0
- package/lib/src/utils/graphql/spotterService/nls-answer-queries.d.ts +2 -0
- package/lib/src/utils/graphql/spotterService/nls-answer-queries.d.ts.map +1 -0
- package/lib/src/utils/graphql/spotterService/nls-answer-queries.js +400 -0
- package/lib/src/utils/graphql/spotterService/nls-answer-queries.js.map +1 -0
- package/lib/src/utils/graphql/spotterService/nls-answer-service.d.ts +12 -0
- package/lib/src/utils/graphql/spotterService/nls-answer-service.d.ts.map +1 -0
- package/lib/src/utils/graphql/spotterService/nls-answer-service.js +50 -0
- package/lib/src/utils/graphql/spotterService/nls-answer-service.js.map +1 -0
- package/lib/src/utils.d.ts +15 -0
- package/lib/src/utils.d.ts.map +1 -1
- package/lib/src/utils.js +30 -0
- package/lib/src/utils.js.map +1 -1
- package/lib/src/utils.spec.js +50 -1
- package/lib/src/utils.spec.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +7186 -0
- package/package.json +3 -3
- package/src/css-variables.ts +60 -0
- package/src/embed/app.spec.ts +32 -0
- package/src/embed/app.ts +97 -1
- package/src/embed/auto-frame-renderer.ts +78 -0
- package/src/embed/base.ts +1 -0
- package/src/embed/conversation.spec.ts +117 -3
- package/src/embed/conversation.ts +189 -30
- package/src/embed/liveboard.spec.ts +264 -10
- package/src/embed/liveboard.ts +100 -11
- package/src/errors.ts +1 -0
- package/src/index.ts +8 -1
- package/src/types.ts +198 -42
- package/src/utils/graphql/answerService/answer-queries.ts +23 -0
- package/src/utils/graphql/answerService/answerService.spec.ts +87 -0
- package/src/utils/graphql/answerService/answerService.ts +13 -1
- package/src/utils.spec.ts +56 -0
- package/src/utils.ts +36 -0
package/dist/tsembed-react.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @thoughtspot/visual-embed-sdk version 1.45.2 */
|
|
1
|
+
/* @thoughtspot/visual-embed-sdk version 1.45.3-mcp.2 */
|
|
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.
|
|
@@ -3277,6 +3313,7 @@ var DataSourceVisualMode;
|
|
|
3277
3313
|
*/
|
|
3278
3314
|
var Param;
|
|
3279
3315
|
(function (Param) {
|
|
3316
|
+
Param["Tsmcp"] = "tsmcp";
|
|
3280
3317
|
Param["EmbedApp"] = "embedApp";
|
|
3281
3318
|
Param["DataSources"] = "dataSources";
|
|
3282
3319
|
Param["DataSourceMode"] = "dataSourceMode";
|
|
@@ -3407,7 +3444,19 @@ var Param;
|
|
|
3407
3444
|
Param["isLinkParametersEnabled"] = "isLinkParametersEnabled";
|
|
3408
3445
|
Param["EnablePastConversationsSidebar"] = "enablePastConversationsSidebar";
|
|
3409
3446
|
Param["UpdatedSpotterChatPrompt"] = "updatedSpotterChatPrompt";
|
|
3447
|
+
Param["SpotterSidebarTitle"] = "spotterSidebarTitle";
|
|
3448
|
+
Param["SpotterSidebarDefaultExpanded"] = "spotterSidebarDefaultExpanded";
|
|
3449
|
+
Param["SpotterChatRenameLabel"] = "spotterChatRenameLabel";
|
|
3450
|
+
Param["SpotterChatDeleteLabel"] = "spotterChatDeleteLabel";
|
|
3451
|
+
Param["SpotterDeleteConversationModalTitle"] = "spotterDeleteConversationModalTitle";
|
|
3452
|
+
Param["SpotterPastConversationAlertMessage"] = "spotterPastConversationAlertMessage";
|
|
3453
|
+
Param["SpotterDocumentationUrl"] = "spotterDocumentationUrl";
|
|
3454
|
+
Param["SpotterBestPracticesLabel"] = "spotterBestPracticesLabel";
|
|
3455
|
+
Param["SpotterConversationsBatchSize"] = "spotterConversationsBatchSize";
|
|
3456
|
+
Param["SpotterNewChatButtonTitle"] = "spotterNewChatButtonTitle";
|
|
3410
3457
|
Param["IsThisPeriodInDateFiltersEnabled"] = "isThisPeriodInDateFiltersEnabled";
|
|
3458
|
+
Param["HideToolResponseCardBranding"] = "hideToolResponseCardBranding";
|
|
3459
|
+
Param["ToolResponseCardBrandingLabel"] = "toolResponseCardBrandingLabel";
|
|
3411
3460
|
})(Param || (Param = {}));
|
|
3412
3461
|
/**
|
|
3413
3462
|
* ThoughtSpot application pages include actions and menu commands
|
|
@@ -4833,6 +4882,96 @@ var Action;
|
|
|
4833
4882
|
* @version SDK: 1.44.0 | ThoughtSpot Cloud: 26.2.0.cl
|
|
4834
4883
|
*/
|
|
4835
4884
|
Action["UngroupLiveboardGroup"] = "ungroupLiveboardGroup";
|
|
4885
|
+
/**
|
|
4886
|
+
* Controls visibility of the sidebar header (title and toggle button)
|
|
4887
|
+
* in the Spotter past conversations sidebar.
|
|
4888
|
+
* @example
|
|
4889
|
+
* ```js
|
|
4890
|
+
* hiddenActions: [Action.SpotterSidebarHeader]
|
|
4891
|
+
* ```
|
|
4892
|
+
* @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
|
|
4893
|
+
*/
|
|
4894
|
+
Action["SpotterSidebarHeader"] = "spotterSidebarHeader";
|
|
4895
|
+
/**
|
|
4896
|
+
* Controls visibility of the sidebar footer (documentation link)
|
|
4897
|
+
* in the Spotter past conversations sidebar.
|
|
4898
|
+
* @example
|
|
4899
|
+
* ```js
|
|
4900
|
+
* hiddenActions: [Action.SpotterSidebarFooter]
|
|
4901
|
+
* ```
|
|
4902
|
+
* @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
|
|
4903
|
+
*/
|
|
4904
|
+
Action["SpotterSidebarFooter"] = "spotterSidebarFooter";
|
|
4905
|
+
/**
|
|
4906
|
+
* Controls visibility and disable state of the sidebar toggle/expand button
|
|
4907
|
+
* in the Spotter past conversations sidebar.
|
|
4908
|
+
* @example
|
|
4909
|
+
* ```js
|
|
4910
|
+
* disabledActions: [Action.SpotterSidebarToggle]
|
|
4911
|
+
* ```
|
|
4912
|
+
* @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
|
|
4913
|
+
*/
|
|
4914
|
+
Action["SpotterSidebarToggle"] = "spotterSidebarToggle";
|
|
4915
|
+
/**
|
|
4916
|
+
* Controls visibility and disable state of the "New Chat" button
|
|
4917
|
+
* in the Spotter past conversations sidebar.
|
|
4918
|
+
* @example
|
|
4919
|
+
* ```js
|
|
4920
|
+
* disabledActions: [Action.SpotterNewChat]
|
|
4921
|
+
* ```
|
|
4922
|
+
* @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
|
|
4923
|
+
*/
|
|
4924
|
+
Action["SpotterNewChat"] = "spotterNewChat";
|
|
4925
|
+
/**
|
|
4926
|
+
* Controls visibility of the past conversation banner alert
|
|
4927
|
+
* in the Spotter interface.
|
|
4928
|
+
* @example
|
|
4929
|
+
* ```js
|
|
4930
|
+
* hiddenActions: [Action.SpotterPastChatBanner]
|
|
4931
|
+
* ```
|
|
4932
|
+
* @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
|
|
4933
|
+
*/
|
|
4934
|
+
Action["SpotterPastChatBanner"] = "spotterPastChatBanner";
|
|
4935
|
+
/**
|
|
4936
|
+
* Controls visibility and disable state of the conversation edit menu
|
|
4937
|
+
* (three-dot menu) in the Spotter past conversations sidebar.
|
|
4938
|
+
* @example
|
|
4939
|
+
* ```js
|
|
4940
|
+
* disabledActions: [Action.SpotterChatMenu]
|
|
4941
|
+
* ```
|
|
4942
|
+
* @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
|
|
4943
|
+
*/
|
|
4944
|
+
Action["SpotterChatMenu"] = "spotterChatMenu";
|
|
4945
|
+
/**
|
|
4946
|
+
* Controls visibility and disable state of the rename action
|
|
4947
|
+
* in the Spotter conversation edit menu.
|
|
4948
|
+
* @example
|
|
4949
|
+
* ```js
|
|
4950
|
+
* disabledActions: [Action.SpotterChatRename]
|
|
4951
|
+
* ```
|
|
4952
|
+
* @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
|
|
4953
|
+
*/
|
|
4954
|
+
Action["SpotterChatRename"] = "spotterChatRename";
|
|
4955
|
+
/**
|
|
4956
|
+
* Controls visibility and disable state of the delete action
|
|
4957
|
+
* in the Spotter conversation edit menu.
|
|
4958
|
+
* @example
|
|
4959
|
+
* ```js
|
|
4960
|
+
* disabledActions: [Action.SpotterChatDelete]
|
|
4961
|
+
* ```
|
|
4962
|
+
* @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
|
|
4963
|
+
*/
|
|
4964
|
+
Action["SpotterChatDelete"] = "spotterChatDelete";
|
|
4965
|
+
/**
|
|
4966
|
+
* Controls visibility and disable state of the documentation/best practices
|
|
4967
|
+
* link in the Spotter sidebar footer.
|
|
4968
|
+
* @example
|
|
4969
|
+
* ```js
|
|
4970
|
+
* disabledActions: [Action.SpotterDocs]
|
|
4971
|
+
* ```
|
|
4972
|
+
* @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
|
|
4973
|
+
*/
|
|
4974
|
+
Action["SpotterDocs"] = "spotterDocs";
|
|
4836
4975
|
/**
|
|
4837
4976
|
* The **Include current period** checkbox for date filters.
|
|
4838
4977
|
* Controls the visibility and availability of the option to include
|
|
@@ -4971,13 +5110,30 @@ var LogLevel;
|
|
|
4971
5110
|
* Error types emitted by embedded components.
|
|
4972
5111
|
*
|
|
4973
5112
|
* These enum values categorize different types of errors that can occur during
|
|
4974
|
-
* the lifecycle of an embedded ThoughtSpot component.
|
|
4975
|
-
*
|
|
4976
|
-
*
|
|
4977
|
-
* @see {@link EmbedErrorDetailsEvent} - The error event object structure
|
|
4978
|
-
* @see {@link EmbedEvent.Error} - The event that emits these errors
|
|
5113
|
+
* the lifecycle of an embedded ThoughtSpot component.
|
|
5114
|
+
* Use {@link EmbedErrorDetailsEvent} and {@link EmbedErrorCodes} to handle specific errors.
|
|
4979
5115
|
* @version SDK: 1.44.2 | ThoughtSpot: 26.2.0.cl
|
|
4980
5116
|
* @group Error Handling
|
|
5117
|
+
*
|
|
5118
|
+
* @example
|
|
5119
|
+
* Handle specific error types
|
|
5120
|
+
* ```js
|
|
5121
|
+
* embed.on(EmbedEvent.Error, (error) => {
|
|
5122
|
+
* switch (error.errorType) {
|
|
5123
|
+
* case ErrorDetailsTypes.API:
|
|
5124
|
+
* console.error('API error:', error.message);
|
|
5125
|
+
* break;
|
|
5126
|
+
* case ErrorDetailsTypes.VALIDATION_ERROR:
|
|
5127
|
+
* console.error('Validation error:', error.message);
|
|
5128
|
+
* break;
|
|
5129
|
+
* case ErrorDetailsTypes.NETWORK:
|
|
5130
|
+
* console.error('Network error:', error.message);
|
|
5131
|
+
* break;
|
|
5132
|
+
* default:
|
|
5133
|
+
* console.error('Unknown error:', error);
|
|
5134
|
+
* }
|
|
5135
|
+
* });
|
|
5136
|
+
* ```
|
|
4981
5137
|
*/
|
|
4982
5138
|
var ErrorDetailsTypes;
|
|
4983
5139
|
(function (ErrorDetailsTypes) {
|
|
@@ -4989,35 +5145,43 @@ var ErrorDetailsTypes;
|
|
|
4989
5145
|
ErrorDetailsTypes["NETWORK"] = "NETWORK";
|
|
4990
5146
|
})(ErrorDetailsTypes || (ErrorDetailsTypes = {}));
|
|
4991
5147
|
/**
|
|
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.
|
|
5148
|
+
* Error codes for identifying specific issues in embedded ThoughtSpot components. Use {@link EmbedErrorDetailsEvent} and {@link ErrorDetailsTypes} codes for precise error handling and debugging.
|
|
4996
5149
|
*
|
|
4997
5150
|
* @version SDK: 1.44.2 | ThoughtSpot: 26.2.0.cl
|
|
4998
5151
|
* @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
|
-
*
|
|
5152
|
+
|
|
5003
5153
|
* @example
|
|
5004
5154
|
* Handle specific error codes in the error event handler
|
|
5005
|
-
*
|
|
5155
|
+
* ```js
|
|
5006
5156
|
* embed.on(EmbedEvent.Error, (error) => {
|
|
5007
|
-
*
|
|
5008
|
-
*
|
|
5157
|
+
* switch (error.code) {
|
|
5158
|
+
* case EmbedErrorCodes.WORKSHEET_ID_NOT_FOUND:
|
|
5159
|
+
* console.error('Worksheet ID not found:', error.message);
|
|
5160
|
+
* break;
|
|
5161
|
+
* case EmbedErrorCodes.LIVEBOARD_ID_MISSING:
|
|
5162
|
+
* console.error('Liveboard ID is missing:', error.message);
|
|
5163
|
+
* break;
|
|
5164
|
+
* case EmbedErrorCodes.CONFLICTING_ACTIONS_CONFIG:
|
|
5165
|
+
* console.error('Conflicting actions configuration:', error.message);
|
|
5166
|
+
* break;
|
|
5167
|
+
* case EmbedErrorCodes.CONFLICTING_TABS_CONFIG:
|
|
5168
|
+
* console.error('Conflicting tabs configuration:', error.message);
|
|
5169
|
+
* break;
|
|
5170
|
+
* default:
|
|
5171
|
+
* console.error('Unknown error:', error);
|
|
5009
5172
|
* }
|
|
5010
5173
|
* });
|
|
5011
|
-
*
|
|
5174
|
+
* ```
|
|
5175
|
+
* */
|
|
5012
5176
|
var EmbedErrorCodes;
|
|
5013
5177
|
(function (EmbedErrorCodes) {
|
|
5014
5178
|
/** Worksheet ID not found or does not exist */
|
|
5015
5179
|
EmbedErrorCodes["WORKSHEET_ID_NOT_FOUND"] = "WORKSHEET_ID_NOT_FOUND";
|
|
5016
5180
|
/** Required Liveboard ID is missing from configuration */
|
|
5017
5181
|
EmbedErrorCodes["LIVEBOARD_ID_MISSING"] = "LIVEBOARD_ID_MISSING";
|
|
5018
|
-
/** Conflicting action configuration detected
|
|
5182
|
+
/** Conflicting action configuration detected */
|
|
5019
5183
|
EmbedErrorCodes["CONFLICTING_ACTIONS_CONFIG"] = "CONFLICTING_ACTIONS_CONFIG";
|
|
5020
|
-
/** Conflicting tab configuration detected
|
|
5184
|
+
/** Conflicting tab configuration detected */
|
|
5021
5185
|
EmbedErrorCodes["CONFLICTING_TABS_CONFIG"] = "CONFLICTING_TABS_CONFIG";
|
|
5022
5186
|
/** Error during component initialization */
|
|
5023
5187
|
EmbedErrorCodes["INIT_ERROR"] = "INIT_ERROR";
|
|
@@ -5035,6 +5199,8 @@ var EmbedErrorCodes;
|
|
|
5035
5199
|
EmbedErrorCodes["PARSING_API_INTERCEPT_BODY_ERROR"] = "PARSING_API_INTERCEPT_BODY_ERROR";
|
|
5036
5200
|
/** Failed to update embed parameters during pre-render */
|
|
5037
5201
|
EmbedErrorCodes["UPDATE_PARAMS_FAILED"] = "UPDATE_PARAMS_FAILED";
|
|
5202
|
+
/** Invalid URL provided in configuration */
|
|
5203
|
+
EmbedErrorCodes["INVALID_URL"] = "INVALID_URL";
|
|
5038
5204
|
})(EmbedErrorCodes || (EmbedErrorCodes = {}));
|
|
5039
5205
|
var ContextType;
|
|
5040
5206
|
(function (ContextType) {
|
|
@@ -5175,6 +5341,7 @@ const ERROR_MESSAGE = {
|
|
|
5175
5341
|
ERROR_PARSING_API_INTERCEPT_BODY: 'Error parsing api intercept body',
|
|
5176
5342
|
SSR_ENVIRONMENT_ERROR: 'SSR environment detected. This function cannot be called in SSR environment.',
|
|
5177
5343
|
UPDATE_PARAMS_FAILED: 'Failed to update embed parameters',
|
|
5344
|
+
INVALID_SPOTTER_DOCUMENTATION_URL: 'Invalid spotterDocumentationUrl. Please provide a valid http or https URL.',
|
|
5178
5345
|
};
|
|
5179
5346
|
const CUSTOM_ACTIONS_ERROR_MESSAGE = {
|
|
5180
5347
|
INVALID_ACTION_OBJECT: 'Custom Action Validation Error: Invalid action object provided',
|
|
@@ -5659,6 +5826,36 @@ const isWindowUndefined = () => {
|
|
|
5659
5826
|
return true;
|
|
5660
5827
|
}
|
|
5661
5828
|
return false;
|
|
5829
|
+
};
|
|
5830
|
+
/**
|
|
5831
|
+
* Validates that a URL uses only http: or https: protocols.
|
|
5832
|
+
* Returns a tuple of [isValid, error] so the caller can handle validation errors.
|
|
5833
|
+
* @param url - The URL string to validate
|
|
5834
|
+
* @returns [true, null] if valid, [false, Error] if invalid
|
|
5835
|
+
*/
|
|
5836
|
+
const validateHttpUrl = (url) => {
|
|
5837
|
+
try {
|
|
5838
|
+
const parsedUrl = new URL(url);
|
|
5839
|
+
if (parsedUrl.protocol !== 'http:' && parsedUrl.protocol !== 'https:') {
|
|
5840
|
+
return [false, new Error(`Invalid protocol: ${parsedUrl.protocol}. Only http: and https: are allowed.`)];
|
|
5841
|
+
}
|
|
5842
|
+
return [true, null];
|
|
5843
|
+
}
|
|
5844
|
+
catch (error) {
|
|
5845
|
+
return [false, error instanceof Error ? error : new Error(String(error))];
|
|
5846
|
+
}
|
|
5847
|
+
};
|
|
5848
|
+
/**
|
|
5849
|
+
* Sets a query parameter if the value is defined.
|
|
5850
|
+
* @param queryParams - The query params object to modify
|
|
5851
|
+
* @param param - The parameter key
|
|
5852
|
+
* @param value - The value to set
|
|
5853
|
+
* @param asBoolean - If true, coerces value to boolean
|
|
5854
|
+
*/
|
|
5855
|
+
const setParamIfDefined = (queryParams, param, value, asBoolean = false) => {
|
|
5856
|
+
if (value !== undefined) {
|
|
5857
|
+
queryParams[param] = asBoolean ? !!value : value;
|
|
5858
|
+
}
|
|
5662
5859
|
};
|
|
5663
5860
|
|
|
5664
5861
|
/**
|
|
@@ -8519,6 +8716,28 @@ const getSQLQuery = `
|
|
|
8519
8716
|
}
|
|
8520
8717
|
}
|
|
8521
8718
|
`;
|
|
8719
|
+
const updateDisplayMode = `
|
|
8720
|
+
mutation UpdateDisplayMode(
|
|
8721
|
+
$session: BachSessionIdInput!
|
|
8722
|
+
$displayMode: DisplayMode
|
|
8723
|
+
) {
|
|
8724
|
+
Answer__updateProperties(session: $session, displayMode: $displayMode) {
|
|
8725
|
+
id {
|
|
8726
|
+
sessionId
|
|
8727
|
+
genNo
|
|
8728
|
+
acSession {
|
|
8729
|
+
sessionId
|
|
8730
|
+
genNo
|
|
8731
|
+
}
|
|
8732
|
+
}
|
|
8733
|
+
answer {
|
|
8734
|
+
id
|
|
8735
|
+
displayMode
|
|
8736
|
+
suggestedDisplayMode
|
|
8737
|
+
}
|
|
8738
|
+
}
|
|
8739
|
+
}
|
|
8740
|
+
`;
|
|
8522
8741
|
const getAnswerTML = `
|
|
8523
8742
|
mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies: Boolean, $formatType: EDocFormatType, $exportPermissions: Boolean, $exportFqn: Boolean) {
|
|
8524
8743
|
UnsavedAnswer_getTML(
|
|
@@ -8686,7 +8905,15 @@ class AnswerService {
|
|
|
8686
8905
|
},
|
|
8687
8906
|
});
|
|
8688
8907
|
}
|
|
8689
|
-
async
|
|
8908
|
+
async updateDisplayMode(displayMode = "TABLE_MODE") {
|
|
8909
|
+
return this.executeQuery(updateDisplayMode, {
|
|
8910
|
+
displayMode,
|
|
8911
|
+
});
|
|
8912
|
+
}
|
|
8913
|
+
async getSQLQuery(fetchSQLWithAllColumns = false) {
|
|
8914
|
+
if (fetchSQLWithAllColumns) {
|
|
8915
|
+
await this.updateDisplayMode("TABLE_MODE");
|
|
8916
|
+
}
|
|
8690
8917
|
const { sql } = await this.executeQuery(getSQLQuery, {});
|
|
8691
8918
|
return sql;
|
|
8692
8919
|
}
|
|
@@ -8842,7 +9069,7 @@ class AnswerService {
|
|
|
8842
9069
|
async getTML() {
|
|
8843
9070
|
const { object } = await this.executeQuery(getAnswerTML, {});
|
|
8844
9071
|
const edoc = object[0].edoc;
|
|
8845
|
-
const YAML = await import('./index-
|
|
9072
|
+
const YAML = await import('./index-aFN9fe8V.js');
|
|
8846
9073
|
const parsedDoc = YAML.parse(edoc);
|
|
8847
9074
|
return {
|
|
8848
9075
|
answer: {
|
|
@@ -18101,7 +18328,7 @@ function processEventData(type, eventData, thoughtSpotHost, containerEl) {
|
|
|
18101
18328
|
return eventData;
|
|
18102
18329
|
}
|
|
18103
18330
|
|
|
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
|
|
18331
|
+
var name="@thoughtspot/visual-embed-sdk";var version$1="1.45.3-mcp.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 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
18332
|
|
|
18106
18333
|
class HostEventClient {
|
|
18107
18334
|
constructor(iFrame) {
|
|
@@ -20407,7 +20634,7 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
|
|
|
20407
20634
|
* embedded Liveboard or visualization.
|
|
20408
20635
|
*/
|
|
20409
20636
|
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;
|
|
20637
|
+
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
20638
|
let params = {};
|
|
20412
20639
|
params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
|
|
20413
20640
|
params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
|
|
@@ -20431,6 +20658,41 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
|
|
|
20431
20658
|
if (!isUndefined$1(updatedSpotterChatPrompt)) {
|
|
20432
20659
|
params[Param.UpdatedSpotterChatPrompt] = !!updatedSpotterChatPrompt;
|
|
20433
20660
|
}
|
|
20661
|
+
// Handle spotterSidebarConfig params
|
|
20662
|
+
if (spotterSidebarConfig) {
|
|
20663
|
+
const { enablePastConversationsSidebar, spotterSidebarTitle, spotterSidebarDefaultExpanded, spotterChatRenameLabel, spotterChatDeleteLabel, spotterDeleteConversationModalTitle, spotterPastConversationAlertMessage, spotterDocumentationUrl, spotterBestPracticesLabel, spotterConversationsBatchSize, spotterNewChatButtonTitle, } = spotterSidebarConfig;
|
|
20664
|
+
setParamIfDefined(params, Param.EnablePastConversationsSidebar, enablePastConversationsSidebar, true);
|
|
20665
|
+
setParamIfDefined(params, Param.SpotterSidebarDefaultExpanded, spotterSidebarDefaultExpanded, true);
|
|
20666
|
+
setParamIfDefined(params, Param.SpotterSidebarTitle, spotterSidebarTitle);
|
|
20667
|
+
setParamIfDefined(params, Param.SpotterChatRenameLabel, spotterChatRenameLabel);
|
|
20668
|
+
setParamIfDefined(params, Param.SpotterChatDeleteLabel, spotterChatDeleteLabel);
|
|
20669
|
+
setParamIfDefined(params, Param.SpotterDeleteConversationModalTitle, spotterDeleteConversationModalTitle);
|
|
20670
|
+
setParamIfDefined(params, Param.SpotterPastConversationAlertMessage, spotterPastConversationAlertMessage);
|
|
20671
|
+
setParamIfDefined(params, Param.SpotterBestPracticesLabel, spotterBestPracticesLabel);
|
|
20672
|
+
setParamIfDefined(params, Param.SpotterConversationsBatchSize, spotterConversationsBatchSize);
|
|
20673
|
+
setParamIfDefined(params, Param.SpotterNewChatButtonTitle, spotterNewChatButtonTitle);
|
|
20674
|
+
// URL param with validation
|
|
20675
|
+
if (spotterDocumentationUrl !== undefined) {
|
|
20676
|
+
const [isValid, validationError] = validateHttpUrl(spotterDocumentationUrl);
|
|
20677
|
+
if (isValid) {
|
|
20678
|
+
params[Param.SpotterDocumentationUrl] = spotterDocumentationUrl;
|
|
20679
|
+
}
|
|
20680
|
+
else {
|
|
20681
|
+
this.handleError({
|
|
20682
|
+
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
20683
|
+
message: ERROR_MESSAGE.INVALID_SPOTTER_DOCUMENTATION_URL,
|
|
20684
|
+
code: EmbedErrorCodes.INVALID_URL,
|
|
20685
|
+
error: (validationError === null || validationError === void 0 ? void 0 : validationError.message) || ERROR_MESSAGE.INVALID_SPOTTER_DOCUMENTATION_URL,
|
|
20686
|
+
});
|
|
20687
|
+
}
|
|
20688
|
+
}
|
|
20689
|
+
}
|
|
20690
|
+
// Handle spotterChatConfig params
|
|
20691
|
+
if (spotterChatConfig) {
|
|
20692
|
+
const { hideToolResponseCardBranding, toolResponseCardBrandingLabel, } = spotterChatConfig;
|
|
20693
|
+
setParamIfDefined(params, Param.HideToolResponseCardBranding, hideToolResponseCardBranding, true);
|
|
20694
|
+
setParamIfDefined(params, Param.ToolResponseCardBrandingLabel, toolResponseCardBrandingLabel);
|
|
20695
|
+
}
|
|
20434
20696
|
if (hideObjectSearch) {
|
|
20435
20697
|
params[Param.HideObjectSearch] = !!hideObjectSearch;
|
|
20436
20698
|
}
|
|
@@ -20828,6 +21090,7 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
|
|
|
20828
21090
|
liveboardId: this.viewConfig.liveboardId,
|
|
20829
21091
|
vizId: this.viewConfig.vizId,
|
|
20830
21092
|
activeTabId: this.viewConfig.activeTabId,
|
|
21093
|
+
personalizedViewId: this.viewConfig.personalizedViewId,
|
|
20831
21094
|
};
|
|
20832
21095
|
if (this.viewConfig.fullHeight === true) {
|
|
20833
21096
|
if (this.viewConfig.vizId) {
|
|
@@ -20852,7 +21115,7 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
|
|
|
20852
21115
|
getEmbedParamsObject() {
|
|
20853
21116
|
let params = {};
|
|
20854
21117
|
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;
|
|
21118
|
+
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
21119
|
const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
|
|
20857
21120
|
|| this.viewConfig.preventPinboardFilterRemoval;
|
|
20858
21121
|
if (fullHeight === true) {
|
|
@@ -20926,6 +21189,12 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
|
|
|
20926
21189
|
if (showSpotterLimitations !== undefined) {
|
|
20927
21190
|
params[Param.ShowSpotterLimitations] = showSpotterLimitations;
|
|
20928
21191
|
}
|
|
21192
|
+
// Handle spotterChatConfig params
|
|
21193
|
+
if (spotterChatConfig) {
|
|
21194
|
+
const { hideToolResponseCardBranding, toolResponseCardBrandingLabel, } = spotterChatConfig;
|
|
21195
|
+
setParamIfDefined(params, Param.HideToolResponseCardBranding, hideToolResponseCardBranding, true);
|
|
21196
|
+
setParamIfDefined(params, Param.ToolResponseCardBrandingLabel, toolResponseCardBrandingLabel);
|
|
21197
|
+
}
|
|
20929
21198
|
if (isLinkParametersEnabled !== undefined) {
|
|
20930
21199
|
params[Param.isLinkParametersEnabled] = isLinkParametersEnabled;
|
|
20931
21200
|
}
|
|
@@ -20949,15 +21218,31 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
|
|
|
20949
21218
|
getQueryParamString(params, true);
|
|
20950
21219
|
return params;
|
|
20951
21220
|
}
|
|
20952
|
-
getIframeSuffixSrc(liveboardId, vizId, activeTabId) {
|
|
20953
|
-
|
|
21221
|
+
getIframeSuffixSrc(liveboardId, vizId, activeTabId, personalizedViewId) {
|
|
21222
|
+
// Extract view from liveboardId if passed along with it (legacy approach)
|
|
21223
|
+
// View must be appended as query param at the end, not embedded in path
|
|
21224
|
+
let liveboardGuid = liveboardId;
|
|
21225
|
+
let legacyViewId;
|
|
21226
|
+
if (liveboardId === null || liveboardId === void 0 ? void 0 : liveboardId.includes('?')) {
|
|
21227
|
+
const [id, query] = liveboardId.split('?');
|
|
21228
|
+
liveboardGuid = id;
|
|
21229
|
+
const params = new URLSearchParams(query);
|
|
21230
|
+
legacyViewId = params.get('view') || undefined;
|
|
21231
|
+
}
|
|
21232
|
+
// personalizedViewId takes precedence over legacyViewId (when passed as part of liveboardId)
|
|
21233
|
+
const effectiveViewId = personalizedViewId || legacyViewId;
|
|
21234
|
+
let suffix = `/embed/viz/${liveboardGuid}`;
|
|
20954
21235
|
if (activeTabId) {
|
|
20955
|
-
suffix = `${suffix}/tab/${activeTabId}
|
|
21236
|
+
suffix = `${suffix}/tab/${activeTabId}`;
|
|
20956
21237
|
}
|
|
20957
21238
|
if (vizId) {
|
|
20958
21239
|
suffix = `${suffix}/${vizId}`;
|
|
20959
21240
|
}
|
|
20960
|
-
const
|
|
21241
|
+
const additionalParams = {};
|
|
21242
|
+
if (effectiveViewId) {
|
|
21243
|
+
additionalParams.view = effectiveViewId;
|
|
21244
|
+
}
|
|
21245
|
+
const tsPostHashParams = this.getThoughtSpotPostUrlParams(additionalParams);
|
|
20961
21246
|
suffix = `${suffix}${tsPostHashParams}`;
|
|
20962
21247
|
return suffix;
|
|
20963
21248
|
}
|
|
@@ -20967,7 +21252,7 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
|
|
|
20967
21252
|
*/
|
|
20968
21253
|
getIFrameSrc() {
|
|
20969
21254
|
var _a;
|
|
20970
|
-
const { vizId, activeTabId } = this.viewConfig;
|
|
21255
|
+
const { vizId, activeTabId, personalizedViewId } = this.viewConfig;
|
|
20971
21256
|
const liveboardId = (_a = this.viewConfig.liveboardId) !== null && _a !== void 0 ? _a : this.viewConfig.pinboardId;
|
|
20972
21257
|
if (!liveboardId) {
|
|
20973
21258
|
this.handleError({
|
|
@@ -20977,7 +21262,7 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
|
|
|
20977
21262
|
error: ERROR_MESSAGE.LIVEBOARD_VIZ_ID_VALIDATION,
|
|
20978
21263
|
});
|
|
20979
21264
|
}
|
|
20980
|
-
return `${this.getRootIframeSrc()}${this.getIframeSuffixSrc(liveboardId, vizId, activeTabId)}`;
|
|
21265
|
+
return `${this.getRootIframeSrc()}${this.getIframeSuffixSrc(liveboardId, vizId, activeTabId, personalizedViewId)}`;
|
|
20981
21266
|
}
|
|
20982
21267
|
setActiveTab(data) {
|
|
20983
21268
|
if (!this.viewConfig.vizId) {
|
|
@@ -21016,12 +21301,13 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
|
|
|
21016
21301
|
beforePrerenderVisible() {
|
|
21017
21302
|
const embedObj = this.getPreRenderObj();
|
|
21018
21303
|
this.executeAfterEmbedContainerLoaded(() => {
|
|
21019
|
-
this.navigateToLiveboard(this.viewConfig.liveboardId, this.viewConfig.vizId, this.viewConfig.activeTabId);
|
|
21304
|
+
this.navigateToLiveboard(this.viewConfig.liveboardId, this.viewConfig.vizId, this.viewConfig.activeTabId, this.viewConfig.personalizedViewId);
|
|
21020
21305
|
if (embedObj) {
|
|
21021
21306
|
embedObj.currentLiveboardState = {
|
|
21022
21307
|
liveboardId: this.viewConfig.liveboardId,
|
|
21023
21308
|
vizId: this.viewConfig.vizId,
|
|
21024
21309
|
activeTabId: this.viewConfig.activeTabId,
|
|
21310
|
+
personalizedViewId: this.viewConfig.personalizedViewId,
|
|
21025
21311
|
};
|
|
21026
21312
|
}
|
|
21027
21313
|
});
|
|
@@ -21086,11 +21372,12 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
|
|
|
21086
21372
|
this.postRender();
|
|
21087
21373
|
return this;
|
|
21088
21374
|
}
|
|
21089
|
-
navigateToLiveboard(liveboardId, vizId, activeTabId) {
|
|
21090
|
-
const path = this.getIframeSuffixSrc(liveboardId, vizId, activeTabId);
|
|
21375
|
+
navigateToLiveboard(liveboardId, vizId, activeTabId, personalizedViewId) {
|
|
21376
|
+
const path = this.getIframeSuffixSrc(liveboardId, vizId, activeTabId, personalizedViewId);
|
|
21091
21377
|
this.viewConfig.liveboardId = liveboardId;
|
|
21092
21378
|
this.viewConfig.activeTabId = activeTabId;
|
|
21093
21379
|
this.viewConfig.vizId = vizId;
|
|
21380
|
+
this.viewConfig.personalizedViewId = personalizedViewId;
|
|
21094
21381
|
if (this.isRendered) {
|
|
21095
21382
|
this.trigger(HostEvent.Navigate, path.substring(1));
|
|
21096
21383
|
}
|
|
@@ -21114,6 +21401,9 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
|
|
|
21114
21401
|
if (this.viewConfig.vizId) {
|
|
21115
21402
|
url = `${url}/${this.viewConfig.vizId}`;
|
|
21116
21403
|
}
|
|
21404
|
+
if (this.viewConfig.personalizedViewId) {
|
|
21405
|
+
url = `${url}?view=${this.viewConfig.personalizedViewId}`;
|
|
21406
|
+
}
|
|
21117
21407
|
return url;
|
|
21118
21408
|
}
|
|
21119
21409
|
};
|
|
@@ -21682,7 +21972,9 @@ let SpotterEmbed$1 = class SpotterEmbed extends TsEmbed {
|
|
|
21682
21972
|
this.viewConfig = viewConfig;
|
|
21683
21973
|
}
|
|
21684
21974
|
getEmbedParamsObject() {
|
|
21685
|
-
const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions,
|
|
21975
|
+
const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, updatedSpotterChatPrompt, spotterSidebarConfig, spotterChatConfig, } = this.viewConfig;
|
|
21976
|
+
// Extract sidebar config properties
|
|
21977
|
+
const { enablePastConversationsSidebar, spotterSidebarTitle, spotterSidebarDefaultExpanded, spotterChatRenameLabel, spotterChatDeleteLabel, spotterDeleteConversationModalTitle, spotterPastConversationAlertMessage, spotterDocumentationUrl, spotterBestPracticesLabel, spotterConversationsBatchSize, spotterNewChatButtonTitle, } = spotterSidebarConfig || {};
|
|
21686
21978
|
if (!worksheetId) {
|
|
21687
21979
|
this.handleError({
|
|
21688
21980
|
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
@@ -21693,30 +21985,51 @@ let SpotterEmbed$1 = class SpotterEmbed extends TsEmbed {
|
|
|
21693
21985
|
}
|
|
21694
21986
|
const queryParams = this.getBaseQueryParams();
|
|
21695
21987
|
queryParams[Param.SpotterEnabled] = true;
|
|
21696
|
-
|
|
21697
|
-
|
|
21698
|
-
|
|
21699
|
-
|
|
21700
|
-
|
|
21701
|
-
|
|
21702
|
-
|
|
21703
|
-
|
|
21704
|
-
|
|
21705
|
-
|
|
21706
|
-
|
|
21707
|
-
|
|
21708
|
-
|
|
21709
|
-
|
|
21988
|
+
// Boolean params
|
|
21989
|
+
setParamIfDefined(queryParams, Param.DisableSourceSelection, disableSourceSelection, true);
|
|
21990
|
+
setParamIfDefined(queryParams, Param.HideSourceSelection, hideSourceSelection, true);
|
|
21991
|
+
setParamIfDefined(queryParams, Param.DataPanelV2Enabled, dataPanelV2, true);
|
|
21992
|
+
setParamIfDefined(queryParams, Param.ShowSpotterLimitations, showSpotterLimitations, true);
|
|
21993
|
+
setParamIfDefined(queryParams, Param.HideSampleQuestions, hideSampleQuestions, true);
|
|
21994
|
+
setParamIfDefined(queryParams, Param.UpdatedSpotterChatPrompt, updatedSpotterChatPrompt, true);
|
|
21995
|
+
setParamIfDefined(queryParams, Param.SpotterSidebarDefaultExpanded, spotterSidebarDefaultExpanded, true);
|
|
21996
|
+
// String params
|
|
21997
|
+
setParamIfDefined(queryParams, Param.SpotterSidebarTitle, spotterSidebarTitle);
|
|
21998
|
+
setParamIfDefined(queryParams, Param.SpotterChatRenameLabel, spotterChatRenameLabel);
|
|
21999
|
+
setParamIfDefined(queryParams, Param.SpotterChatDeleteLabel, spotterChatDeleteLabel);
|
|
22000
|
+
setParamIfDefined(queryParams, Param.SpotterDeleteConversationModalTitle, spotterDeleteConversationModalTitle);
|
|
22001
|
+
setParamIfDefined(queryParams, Param.SpotterPastConversationAlertMessage, spotterPastConversationAlertMessage);
|
|
22002
|
+
setParamIfDefined(queryParams, Param.SpotterBestPracticesLabel, spotterBestPracticesLabel);
|
|
22003
|
+
setParamIfDefined(queryParams, Param.SpotterConversationsBatchSize, spotterConversationsBatchSize);
|
|
22004
|
+
setParamIfDefined(queryParams, Param.SpotterNewChatButtonTitle, spotterNewChatButtonTitle);
|
|
22005
|
+
// URL param with validation
|
|
22006
|
+
if (spotterDocumentationUrl !== undefined) {
|
|
22007
|
+
const [isValid, validationError] = validateHttpUrl(spotterDocumentationUrl);
|
|
22008
|
+
if (isValid) {
|
|
22009
|
+
queryParams[Param.SpotterDocumentationUrl] = spotterDocumentationUrl;
|
|
22010
|
+
}
|
|
22011
|
+
else {
|
|
22012
|
+
this.handleError({
|
|
22013
|
+
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
22014
|
+
message: ERROR_MESSAGE.INVALID_SPOTTER_DOCUMENTATION_URL,
|
|
22015
|
+
code: EmbedErrorCodes.INVALID_URL,
|
|
22016
|
+
error: (validationError === null || validationError === void 0 ? void 0 : validationError.message) || ERROR_MESSAGE.INVALID_SPOTTER_DOCUMENTATION_URL,
|
|
22017
|
+
});
|
|
22018
|
+
}
|
|
21710
22019
|
}
|
|
21711
|
-
|
|
21712
|
-
|
|
22020
|
+
// Handle spotterChatConfig params
|
|
22021
|
+
if (spotterChatConfig) {
|
|
22022
|
+
const { hideToolResponseCardBranding, toolResponseCardBrandingLabel, } = spotterChatConfig;
|
|
22023
|
+
setParamIfDefined(queryParams, Param.HideToolResponseCardBranding, hideToolResponseCardBranding, true);
|
|
22024
|
+
setParamIfDefined(queryParams, Param.ToolResponseCardBrandingLabel, toolResponseCardBrandingLabel);
|
|
21713
22025
|
}
|
|
21714
22026
|
return queryParams;
|
|
21715
22027
|
}
|
|
21716
22028
|
getIframeSrc() {
|
|
21717
|
-
const { worksheetId, searchOptions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL,
|
|
22029
|
+
const { worksheetId, searchOptions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, spotterSidebarConfig, } = this.viewConfig;
|
|
21718
22030
|
const path = 'insights/conv-assist';
|
|
21719
22031
|
const queryParams = this.getEmbedParamsObject();
|
|
22032
|
+
const enablePastConversationsSidebar = spotterSidebarConfig === null || spotterSidebarConfig === void 0 ? void 0 : spotterSidebarConfig.enablePastConversationsSidebar;
|
|
21720
22033
|
if (!isUndefined_1(enablePastConversationsSidebar)) {
|
|
21721
22034
|
queryParams[Param.EnablePastConversationsSidebar] = !!enablePastConversationsSidebar;
|
|
21722
22035
|
}
|