@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.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
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
@@ -1683,6 +1683,42 @@
|
|
|
1683
1683
|
* @version SDK: 1.43.0 | ThoughtSpot: 10.15.0.cl
|
|
1684
1684
|
*/
|
|
1685
1685
|
EmbedEvent["ApiIntercept"] = "ApiIntercept";
|
|
1686
|
+
/**
|
|
1687
|
+
* Emitted when a Spotter conversation is renamed.
|
|
1688
|
+
* @example
|
|
1689
|
+
* ```js
|
|
1690
|
+
* spotterEmbed.on(EmbedEvent.SpotterConversationRenamed, (payload) => {
|
|
1691
|
+
* console.log('Conversation renamed', payload);
|
|
1692
|
+
* // payload: { convId: string, oldTitle: string, newTitle: string }
|
|
1693
|
+
* })
|
|
1694
|
+
* ```
|
|
1695
|
+
* @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl
|
|
1696
|
+
*/
|
|
1697
|
+
EmbedEvent["SpotterConversationRenamed"] = "spotterConversationRenamed";
|
|
1698
|
+
/**
|
|
1699
|
+
* Emitted when a Spotter conversation is deleted.
|
|
1700
|
+
* @example
|
|
1701
|
+
* ```js
|
|
1702
|
+
* spotterEmbed.on(EmbedEvent.SpotterConversationDeleted, (payload) => {
|
|
1703
|
+
* console.log('Conversation deleted', payload);
|
|
1704
|
+
* // payload: { convId: string, title: string }
|
|
1705
|
+
* })
|
|
1706
|
+
* ```
|
|
1707
|
+
* @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl
|
|
1708
|
+
*/
|
|
1709
|
+
EmbedEvent["SpotterConversationDeleted"] = "spotterConversationDeleted";
|
|
1710
|
+
/**
|
|
1711
|
+
* Emitted when a Spotter conversation is selected/clicked.
|
|
1712
|
+
* @example
|
|
1713
|
+
* ```js
|
|
1714
|
+
* spotterEmbed.on(EmbedEvent.SpotterConversationSelected, (payload) => {
|
|
1715
|
+
* console.log('Conversation selected', payload);
|
|
1716
|
+
* // payload: { convId: string, title: string, worksheetId: string }
|
|
1717
|
+
* })
|
|
1718
|
+
* ```
|
|
1719
|
+
* @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl
|
|
1720
|
+
*/
|
|
1721
|
+
EmbedEvent["SpotterConversationSelected"] = "spotterConversationSelected";
|
|
1686
1722
|
/**
|
|
1687
1723
|
* @hidden
|
|
1688
1724
|
* Emitted when the auth token is about to get expired and needs to be refreshed.
|
|
@@ -3115,6 +3151,7 @@
|
|
|
3115
3151
|
*/
|
|
3116
3152
|
var Param;
|
|
3117
3153
|
(function (Param) {
|
|
3154
|
+
Param["Tsmcp"] = "tsmcp";
|
|
3118
3155
|
Param["EmbedApp"] = "embedApp";
|
|
3119
3156
|
Param["DataSources"] = "dataSources";
|
|
3120
3157
|
Param["DataSourceMode"] = "dataSourceMode";
|
|
@@ -3245,7 +3282,19 @@
|
|
|
3245
3282
|
Param["isLinkParametersEnabled"] = "isLinkParametersEnabled";
|
|
3246
3283
|
Param["EnablePastConversationsSidebar"] = "enablePastConversationsSidebar";
|
|
3247
3284
|
Param["UpdatedSpotterChatPrompt"] = "updatedSpotterChatPrompt";
|
|
3285
|
+
Param["SpotterSidebarTitle"] = "spotterSidebarTitle";
|
|
3286
|
+
Param["SpotterSidebarDefaultExpanded"] = "spotterSidebarDefaultExpanded";
|
|
3287
|
+
Param["SpotterChatRenameLabel"] = "spotterChatRenameLabel";
|
|
3288
|
+
Param["SpotterChatDeleteLabel"] = "spotterChatDeleteLabel";
|
|
3289
|
+
Param["SpotterDeleteConversationModalTitle"] = "spotterDeleteConversationModalTitle";
|
|
3290
|
+
Param["SpotterPastConversationAlertMessage"] = "spotterPastConversationAlertMessage";
|
|
3291
|
+
Param["SpotterDocumentationUrl"] = "spotterDocumentationUrl";
|
|
3292
|
+
Param["SpotterBestPracticesLabel"] = "spotterBestPracticesLabel";
|
|
3293
|
+
Param["SpotterConversationsBatchSize"] = "spotterConversationsBatchSize";
|
|
3294
|
+
Param["SpotterNewChatButtonTitle"] = "spotterNewChatButtonTitle";
|
|
3248
3295
|
Param["IsThisPeriodInDateFiltersEnabled"] = "isThisPeriodInDateFiltersEnabled";
|
|
3296
|
+
Param["HideToolResponseCardBranding"] = "hideToolResponseCardBranding";
|
|
3297
|
+
Param["ToolResponseCardBrandingLabel"] = "toolResponseCardBrandingLabel";
|
|
3249
3298
|
})(Param || (Param = {}));
|
|
3250
3299
|
/**
|
|
3251
3300
|
* ThoughtSpot application pages include actions and menu commands
|
|
@@ -4671,6 +4720,96 @@
|
|
|
4671
4720
|
* @version SDK: 1.44.0 | ThoughtSpot Cloud: 26.2.0.cl
|
|
4672
4721
|
*/
|
|
4673
4722
|
Action["UngroupLiveboardGroup"] = "ungroupLiveboardGroup";
|
|
4723
|
+
/**
|
|
4724
|
+
* Controls visibility of the sidebar header (title and toggle button)
|
|
4725
|
+
* in the Spotter past conversations sidebar.
|
|
4726
|
+
* @example
|
|
4727
|
+
* ```js
|
|
4728
|
+
* hiddenActions: [Action.SpotterSidebarHeader]
|
|
4729
|
+
* ```
|
|
4730
|
+
* @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
|
|
4731
|
+
*/
|
|
4732
|
+
Action["SpotterSidebarHeader"] = "spotterSidebarHeader";
|
|
4733
|
+
/**
|
|
4734
|
+
* Controls visibility of the sidebar footer (documentation link)
|
|
4735
|
+
* in the Spotter past conversations sidebar.
|
|
4736
|
+
* @example
|
|
4737
|
+
* ```js
|
|
4738
|
+
* hiddenActions: [Action.SpotterSidebarFooter]
|
|
4739
|
+
* ```
|
|
4740
|
+
* @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
|
|
4741
|
+
*/
|
|
4742
|
+
Action["SpotterSidebarFooter"] = "spotterSidebarFooter";
|
|
4743
|
+
/**
|
|
4744
|
+
* Controls visibility and disable state of the sidebar toggle/expand button
|
|
4745
|
+
* in the Spotter past conversations sidebar.
|
|
4746
|
+
* @example
|
|
4747
|
+
* ```js
|
|
4748
|
+
* disabledActions: [Action.SpotterSidebarToggle]
|
|
4749
|
+
* ```
|
|
4750
|
+
* @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
|
|
4751
|
+
*/
|
|
4752
|
+
Action["SpotterSidebarToggle"] = "spotterSidebarToggle";
|
|
4753
|
+
/**
|
|
4754
|
+
* Controls visibility and disable state of the "New Chat" button
|
|
4755
|
+
* in the Spotter past conversations sidebar.
|
|
4756
|
+
* @example
|
|
4757
|
+
* ```js
|
|
4758
|
+
* disabledActions: [Action.SpotterNewChat]
|
|
4759
|
+
* ```
|
|
4760
|
+
* @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
|
|
4761
|
+
*/
|
|
4762
|
+
Action["SpotterNewChat"] = "spotterNewChat";
|
|
4763
|
+
/**
|
|
4764
|
+
* Controls visibility of the past conversation banner alert
|
|
4765
|
+
* in the Spotter interface.
|
|
4766
|
+
* @example
|
|
4767
|
+
* ```js
|
|
4768
|
+
* hiddenActions: [Action.SpotterPastChatBanner]
|
|
4769
|
+
* ```
|
|
4770
|
+
* @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
|
|
4771
|
+
*/
|
|
4772
|
+
Action["SpotterPastChatBanner"] = "spotterPastChatBanner";
|
|
4773
|
+
/**
|
|
4774
|
+
* Controls visibility and disable state of the conversation edit menu
|
|
4775
|
+
* (three-dot menu) in the Spotter past conversations sidebar.
|
|
4776
|
+
* @example
|
|
4777
|
+
* ```js
|
|
4778
|
+
* disabledActions: [Action.SpotterChatMenu]
|
|
4779
|
+
* ```
|
|
4780
|
+
* @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
|
|
4781
|
+
*/
|
|
4782
|
+
Action["SpotterChatMenu"] = "spotterChatMenu";
|
|
4783
|
+
/**
|
|
4784
|
+
* Controls visibility and disable state of the rename action
|
|
4785
|
+
* in the Spotter conversation edit menu.
|
|
4786
|
+
* @example
|
|
4787
|
+
* ```js
|
|
4788
|
+
* disabledActions: [Action.SpotterChatRename]
|
|
4789
|
+
* ```
|
|
4790
|
+
* @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
|
|
4791
|
+
*/
|
|
4792
|
+
Action["SpotterChatRename"] = "spotterChatRename";
|
|
4793
|
+
/**
|
|
4794
|
+
* Controls visibility and disable state of the delete action
|
|
4795
|
+
* in the Spotter conversation edit menu.
|
|
4796
|
+
* @example
|
|
4797
|
+
* ```js
|
|
4798
|
+
* disabledActions: [Action.SpotterChatDelete]
|
|
4799
|
+
* ```
|
|
4800
|
+
* @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
|
|
4801
|
+
*/
|
|
4802
|
+
Action["SpotterChatDelete"] = "spotterChatDelete";
|
|
4803
|
+
/**
|
|
4804
|
+
* Controls visibility and disable state of the documentation/best practices
|
|
4805
|
+
* link in the Spotter sidebar footer.
|
|
4806
|
+
* @example
|
|
4807
|
+
* ```js
|
|
4808
|
+
* disabledActions: [Action.SpotterDocs]
|
|
4809
|
+
* ```
|
|
4810
|
+
* @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
|
|
4811
|
+
*/
|
|
4812
|
+
Action["SpotterDocs"] = "spotterDocs";
|
|
4674
4813
|
/**
|
|
4675
4814
|
* The **Include current period** checkbox for date filters.
|
|
4676
4815
|
* Controls the visibility and availability of the option to include
|
|
@@ -4809,13 +4948,30 @@
|
|
|
4809
4948
|
* Error types emitted by embedded components.
|
|
4810
4949
|
*
|
|
4811
4950
|
* These enum values categorize different types of errors that can occur during
|
|
4812
|
-
* the lifecycle of an embedded ThoughtSpot component.
|
|
4813
|
-
*
|
|
4814
|
-
*
|
|
4815
|
-
* @see {@link EmbedErrorDetailsEvent} - The error event object structure
|
|
4816
|
-
* @see {@link EmbedEvent.Error} - The event that emits these errors
|
|
4951
|
+
* the lifecycle of an embedded ThoughtSpot component.
|
|
4952
|
+
* Use {@link EmbedErrorDetailsEvent} and {@link EmbedErrorCodes} to handle specific errors.
|
|
4817
4953
|
* @version SDK: 1.44.2 | ThoughtSpot: 26.2.0.cl
|
|
4818
4954
|
* @group Error Handling
|
|
4955
|
+
*
|
|
4956
|
+
* @example
|
|
4957
|
+
* Handle specific error types
|
|
4958
|
+
* ```js
|
|
4959
|
+
* embed.on(EmbedEvent.Error, (error) => {
|
|
4960
|
+
* switch (error.errorType) {
|
|
4961
|
+
* case ErrorDetailsTypes.API:
|
|
4962
|
+
* console.error('API error:', error.message);
|
|
4963
|
+
* break;
|
|
4964
|
+
* case ErrorDetailsTypes.VALIDATION_ERROR:
|
|
4965
|
+
* console.error('Validation error:', error.message);
|
|
4966
|
+
* break;
|
|
4967
|
+
* case ErrorDetailsTypes.NETWORK:
|
|
4968
|
+
* console.error('Network error:', error.message);
|
|
4969
|
+
* break;
|
|
4970
|
+
* default:
|
|
4971
|
+
* console.error('Unknown error:', error);
|
|
4972
|
+
* }
|
|
4973
|
+
* });
|
|
4974
|
+
* ```
|
|
4819
4975
|
*/
|
|
4820
4976
|
exports.ErrorDetailsTypes = void 0;
|
|
4821
4977
|
(function (ErrorDetailsTypes) {
|
|
@@ -4827,35 +4983,43 @@
|
|
|
4827
4983
|
ErrorDetailsTypes["NETWORK"] = "NETWORK";
|
|
4828
4984
|
})(exports.ErrorDetailsTypes || (exports.ErrorDetailsTypes = {}));
|
|
4829
4985
|
/**
|
|
4830
|
-
* Error codes for identifying specific issues in embedded ThoughtSpot components.
|
|
4831
|
-
*
|
|
4832
|
-
* Use these codes for precise error handling and debugging. Each code maps to a
|
|
4833
|
-
* distinct failure scenario, enabling targeted recovery strategies.
|
|
4986
|
+
* Error codes for identifying specific issues in embedded ThoughtSpot components. Use {@link EmbedErrorDetailsEvent} and {@link ErrorDetailsTypes} codes for precise error handling and debugging.
|
|
4834
4987
|
*
|
|
4835
4988
|
* @version SDK: 1.44.2 | ThoughtSpot: 26.2.0.cl
|
|
4836
4989
|
* @group Error Handling
|
|
4837
|
-
|
|
4838
|
-
* @see {@link EmbedErrorDetailsEvent} - The error event object that includes these codes
|
|
4839
|
-
* @see {@link ErrorDetailsTypes} - General error type categories
|
|
4840
|
-
*
|
|
4990
|
+
|
|
4841
4991
|
* @example
|
|
4842
4992
|
* Handle specific error codes in the error event handler
|
|
4843
|
-
*
|
|
4993
|
+
* ```js
|
|
4844
4994
|
* embed.on(EmbedEvent.Error, (error) => {
|
|
4845
|
-
*
|
|
4846
|
-
*
|
|
4995
|
+
* switch (error.code) {
|
|
4996
|
+
* case EmbedErrorCodes.WORKSHEET_ID_NOT_FOUND:
|
|
4997
|
+
* console.error('Worksheet ID not found:', error.message);
|
|
4998
|
+
* break;
|
|
4999
|
+
* case EmbedErrorCodes.LIVEBOARD_ID_MISSING:
|
|
5000
|
+
* console.error('Liveboard ID is missing:', error.message);
|
|
5001
|
+
* break;
|
|
5002
|
+
* case EmbedErrorCodes.CONFLICTING_ACTIONS_CONFIG:
|
|
5003
|
+
* console.error('Conflicting actions configuration:', error.message);
|
|
5004
|
+
* break;
|
|
5005
|
+
* case EmbedErrorCodes.CONFLICTING_TABS_CONFIG:
|
|
5006
|
+
* console.error('Conflicting tabs configuration:', error.message);
|
|
5007
|
+
* break;
|
|
5008
|
+
* default:
|
|
5009
|
+
* console.error('Unknown error:', error);
|
|
4847
5010
|
* }
|
|
4848
5011
|
* });
|
|
4849
|
-
*
|
|
5012
|
+
* ```
|
|
5013
|
+
* */
|
|
4850
5014
|
exports.EmbedErrorCodes = void 0;
|
|
4851
5015
|
(function (EmbedErrorCodes) {
|
|
4852
5016
|
/** Worksheet ID not found or does not exist */
|
|
4853
5017
|
EmbedErrorCodes["WORKSHEET_ID_NOT_FOUND"] = "WORKSHEET_ID_NOT_FOUND";
|
|
4854
5018
|
/** Required Liveboard ID is missing from configuration */
|
|
4855
5019
|
EmbedErrorCodes["LIVEBOARD_ID_MISSING"] = "LIVEBOARD_ID_MISSING";
|
|
4856
|
-
/** Conflicting action configuration detected
|
|
5020
|
+
/** Conflicting action configuration detected */
|
|
4857
5021
|
EmbedErrorCodes["CONFLICTING_ACTIONS_CONFIG"] = "CONFLICTING_ACTIONS_CONFIG";
|
|
4858
|
-
/** Conflicting tab configuration detected
|
|
5022
|
+
/** Conflicting tab configuration detected */
|
|
4859
5023
|
EmbedErrorCodes["CONFLICTING_TABS_CONFIG"] = "CONFLICTING_TABS_CONFIG";
|
|
4860
5024
|
/** Error during component initialization */
|
|
4861
5025
|
EmbedErrorCodes["INIT_ERROR"] = "INIT_ERROR";
|
|
@@ -4873,6 +5037,8 @@
|
|
|
4873
5037
|
EmbedErrorCodes["PARSING_API_INTERCEPT_BODY_ERROR"] = "PARSING_API_INTERCEPT_BODY_ERROR";
|
|
4874
5038
|
/** Failed to update embed parameters during pre-render */
|
|
4875
5039
|
EmbedErrorCodes["UPDATE_PARAMS_FAILED"] = "UPDATE_PARAMS_FAILED";
|
|
5040
|
+
/** Invalid URL provided in configuration */
|
|
5041
|
+
EmbedErrorCodes["INVALID_URL"] = "INVALID_URL";
|
|
4876
5042
|
})(exports.EmbedErrorCodes || (exports.EmbedErrorCodes = {}));
|
|
4877
5043
|
exports.ContextType = void 0;
|
|
4878
5044
|
(function (ContextType) {
|
|
@@ -5066,6 +5232,7 @@
|
|
|
5066
5232
|
ERROR_PARSING_API_INTERCEPT_BODY: 'Error parsing api intercept body',
|
|
5067
5233
|
SSR_ENVIRONMENT_ERROR: 'SSR environment detected. This function cannot be called in SSR environment.',
|
|
5068
5234
|
UPDATE_PARAMS_FAILED: 'Failed to update embed parameters',
|
|
5235
|
+
INVALID_SPOTTER_DOCUMENTATION_URL: 'Invalid spotterDocumentationUrl. Please provide a valid http or https URL.',
|
|
5069
5236
|
};
|
|
5070
5237
|
const CUSTOM_ACTIONS_ERROR_MESSAGE = {
|
|
5071
5238
|
INVALID_ACTION_OBJECT: 'Custom Action Validation Error: Invalid action object provided',
|
|
@@ -5550,6 +5717,36 @@
|
|
|
5550
5717
|
return true;
|
|
5551
5718
|
}
|
|
5552
5719
|
return false;
|
|
5720
|
+
};
|
|
5721
|
+
/**
|
|
5722
|
+
* Validates that a URL uses only http: or https: protocols.
|
|
5723
|
+
* Returns a tuple of [isValid, error] so the caller can handle validation errors.
|
|
5724
|
+
* @param url - The URL string to validate
|
|
5725
|
+
* @returns [true, null] if valid, [false, Error] if invalid
|
|
5726
|
+
*/
|
|
5727
|
+
const validateHttpUrl = (url) => {
|
|
5728
|
+
try {
|
|
5729
|
+
const parsedUrl = new URL(url);
|
|
5730
|
+
if (parsedUrl.protocol !== 'http:' && parsedUrl.protocol !== 'https:') {
|
|
5731
|
+
return [false, new Error(`Invalid protocol: ${parsedUrl.protocol}. Only http: and https: are allowed.`)];
|
|
5732
|
+
}
|
|
5733
|
+
return [true, null];
|
|
5734
|
+
}
|
|
5735
|
+
catch (error) {
|
|
5736
|
+
return [false, error instanceof Error ? error : new Error(String(error))];
|
|
5737
|
+
}
|
|
5738
|
+
};
|
|
5739
|
+
/**
|
|
5740
|
+
* Sets a query parameter if the value is defined.
|
|
5741
|
+
* @param queryParams - The query params object to modify
|
|
5742
|
+
* @param param - The parameter key
|
|
5743
|
+
* @param value - The value to set
|
|
5744
|
+
* @param asBoolean - If true, coerces value to boolean
|
|
5745
|
+
*/
|
|
5746
|
+
const setParamIfDefined = (queryParams, param, value, asBoolean = false) => {
|
|
5747
|
+
if (value !== undefined) {
|
|
5748
|
+
queryParams[param] = asBoolean ? !!value : value;
|
|
5749
|
+
}
|
|
5553
5750
|
};
|
|
5554
5751
|
|
|
5555
5752
|
/**
|
|
@@ -8409,6 +8606,28 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
|
|
|
8409
8606
|
sql
|
|
8410
8607
|
}
|
|
8411
8608
|
}
|
|
8609
|
+
`;
|
|
8610
|
+
const updateDisplayMode = `
|
|
8611
|
+
mutation UpdateDisplayMode(
|
|
8612
|
+
$session: BachSessionIdInput!
|
|
8613
|
+
$displayMode: DisplayMode
|
|
8614
|
+
) {
|
|
8615
|
+
Answer__updateProperties(session: $session, displayMode: $displayMode) {
|
|
8616
|
+
id {
|
|
8617
|
+
sessionId
|
|
8618
|
+
genNo
|
|
8619
|
+
acSession {
|
|
8620
|
+
sessionId
|
|
8621
|
+
genNo
|
|
8622
|
+
}
|
|
8623
|
+
}
|
|
8624
|
+
answer {
|
|
8625
|
+
id
|
|
8626
|
+
displayMode
|
|
8627
|
+
suggestedDisplayMode
|
|
8628
|
+
}
|
|
8629
|
+
}
|
|
8630
|
+
}
|
|
8412
8631
|
`;
|
|
8413
8632
|
const getAnswerTML = `
|
|
8414
8633
|
mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies: Boolean, $formatType: EDocFormatType, $exportPermissions: Boolean, $exportFqn: Boolean) {
|
|
@@ -8577,7 +8796,15 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
8577
8796
|
},
|
|
8578
8797
|
});
|
|
8579
8798
|
}
|
|
8580
|
-
async
|
|
8799
|
+
async updateDisplayMode(displayMode = "TABLE_MODE") {
|
|
8800
|
+
return this.executeQuery(updateDisplayMode, {
|
|
8801
|
+
displayMode,
|
|
8802
|
+
});
|
|
8803
|
+
}
|
|
8804
|
+
async getSQLQuery(fetchSQLWithAllColumns = false) {
|
|
8805
|
+
if (fetchSQLWithAllColumns) {
|
|
8806
|
+
await this.updateDisplayMode("TABLE_MODE");
|
|
8807
|
+
}
|
|
8581
8808
|
const { sql } = await this.executeQuery(getSQLQuery, {});
|
|
8582
8809
|
return sql;
|
|
8583
8810
|
}
|
|
@@ -18171,7 +18398,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18171
18398
|
return eventData;
|
|
18172
18399
|
}
|
|
18173
18400
|
|
|
18174
|
-
var name="@thoughtspot/visual-embed-sdk";var version$1="1.45.2";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports$1={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p tsconfig.build.json --incremental false; tsc -p tsconfig.build.json --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle-generator --config ./dts-config/dts-bundle-file.config.js","bundle-dts":"dts-bundle-generator --config ./dts-config/dts-bundle.config.js","bundle-dts-react":"dts-bundle-generator --config ./dts-config/dts-bundle-react.config.js","bundle-dts-react-full":"dts-bundle-generator --config ./dts-config/dts-bundle-react-full.config.js",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.build.json --theme typedoc-theme --json static/typedoc/typedoc.json --disableOutputCheck","test-sdk":"jest -c jest.config.sdk.js --runInBand",test:"npm run test-sdk",posttest:"cat ./coverage/sdk/lcov.info | npx coveralls-next","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run
|
|
18401
|
+
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$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 tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest",dev:"vite -c vite.local.config.ts"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={classnames:"^2.3.1",eventemitter3:"^4.0.7",lodash:"^4.17.23","mixpanel-browser":"2.47.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1",yaml:"^2.5.1"};var devDependencies={"@mdx-js/mdx":"^1.6.22","@mdx-js/react":"^1.6.22","@react-icons/all-files":"^4.1.0","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^5.0.2","@size-limit/preset-big-lib":"^11.2.0","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^30.0.0","@types/lodash":"^4.17.0","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^8.28.0","@typescript-eslint/parser":"^8.28.0",ajv:"^8.17.1",asciidoctor:"^2.2.1","babel-jest":"^30.2.0","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1","coveralls-next":"^5.0.0",crypto:"^1.0.1","current-git-branch":"^1.1.0","dts-bundle-generator":"^9.5.1",eslint:"^9.23.0","eslint-config-airbnb-base":"^15.0.0","eslint-config-prettier":"^10.1.1","eslint-import-resolver-typescript":"^4.2.5","eslint-plugin-comment-length":"2.2.1","eslint-plugin-import":"^2.31.0","eslint-plugin-jsdoc":"^50.6.9","eslint-plugin-prettier":"^5.2.5","eslint-plugin-react":"^7.37.5","eslint-plugin-react-hooks":"^5.2.0","fs-extra":"^10.0.0","gh-pages":"6.3.0",globals:"^16.0.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^2.0.0",jest:"^30.2.0","jest-environment-jsdom":"^29.7.0","jest-fetch-mock":"^3.0.3",jsdom:"^17.0.0",prettier:"2.1.2",react:"^16.14.0","react-dom":"^16.14.0","react-resizable":"^1.11.0","react-resize-detector":"^6.6.0","react-test-renderer":"^17.0.2","react-use-flexsearch":"^0.1.1",rollup:"4.24.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^29.4.6","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","typescript-eslint":"^8.29.1","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^6.3.5"};var author="ThoughtSpot";var email="support@thoughtspot.com";var license="ThoughtSpot Development Tools End User License Agreement";var directories={lib:"lib"};var repository={type:"git",url:"git+https://github.com/thoughtspot/visual-embed-sdk.git"};var publishConfig={registry:"https://registry.npmjs.org"};var keywords=["thoughtspot","everywhere","embedded","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version$1,description:description,module:module,main:main,types:types,files:files,exports:exports$1,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.es.js",limit:"32 kB"}],scripts:scripts,peerDependencies:peerDependencies,dependencies:dependencies,devDependencies:devDependencies,author:author,email:email,license:license,directories:directories,repository:repository,publishConfig:publishConfig,keywords:keywords,bugs:bugs,homepage:homepage,globals:globals};
|
|
18175
18402
|
|
|
18176
18403
|
class HostEventClient {
|
|
18177
18404
|
constructor(iFrame) {
|
|
@@ -20137,7 +20364,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
20137
20364
|
* embedded Liveboard or visualization.
|
|
20138
20365
|
*/
|
|
20139
20366
|
getEmbedParams() {
|
|
20140
|
-
const { tag, hideTagFilterChips, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideHamburger, hideObjectSearch, hideNotification, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 = true, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, showMaskedFilterChip = false, isLiveboardMasterpiecesEnabled = false, hideHomepageLeftNav = false, modularHomeExperience = false, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, enable2ColumnLayout, enableCustomColumnGroups = false, dataPanelCustomGroupsAccordionInitialState = exports.DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, isEnhancedFilterInteractivityEnabled = false, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, discoveryExperience, coverAndFilterOptionInPDF = false, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, isLiveboardXLSXCSVDownloadEnabled = false, isGranularXLSXCSVSchedulesEnabled = false, isCentralizedLiveboardFilterUXEnabled = false, isLinkParametersEnabled, updatedSpotterChatPrompt, minimumHeight, isThisPeriodInDateFiltersEnabled, } = this.viewConfig;
|
|
20367
|
+
const { tag, hideTagFilterChips, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideHamburger, hideObjectSearch, hideNotification, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 = true, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, showMaskedFilterChip = false, isLiveboardMasterpiecesEnabled = false, hideHomepageLeftNav = false, modularHomeExperience = false, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, enable2ColumnLayout, enableCustomColumnGroups = false, dataPanelCustomGroupsAccordionInitialState = exports.DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, isEnhancedFilterInteractivityEnabled = false, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, discoveryExperience, coverAndFilterOptionInPDF = false, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, isLiveboardXLSXCSVDownloadEnabled = false, isGranularXLSXCSVSchedulesEnabled = false, isCentralizedLiveboardFilterUXEnabled = false, isLinkParametersEnabled, updatedSpotterChatPrompt, spotterSidebarConfig, spotterChatConfig, minimumHeight, isThisPeriodInDateFiltersEnabled, } = this.viewConfig;
|
|
20141
20368
|
let params = {};
|
|
20142
20369
|
params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
|
|
20143
20370
|
params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
|
|
@@ -20161,6 +20388,41 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
20161
20388
|
if (!isUndefined$1(updatedSpotterChatPrompt)) {
|
|
20162
20389
|
params[Param.UpdatedSpotterChatPrompt] = !!updatedSpotterChatPrompt;
|
|
20163
20390
|
}
|
|
20391
|
+
// Handle spotterSidebarConfig params
|
|
20392
|
+
if (spotterSidebarConfig) {
|
|
20393
|
+
const { enablePastConversationsSidebar, spotterSidebarTitle, spotterSidebarDefaultExpanded, spotterChatRenameLabel, spotterChatDeleteLabel, spotterDeleteConversationModalTitle, spotterPastConversationAlertMessage, spotterDocumentationUrl, spotterBestPracticesLabel, spotterConversationsBatchSize, spotterNewChatButtonTitle, } = spotterSidebarConfig;
|
|
20394
|
+
setParamIfDefined(params, Param.EnablePastConversationsSidebar, enablePastConversationsSidebar, true);
|
|
20395
|
+
setParamIfDefined(params, Param.SpotterSidebarDefaultExpanded, spotterSidebarDefaultExpanded, true);
|
|
20396
|
+
setParamIfDefined(params, Param.SpotterSidebarTitle, spotterSidebarTitle);
|
|
20397
|
+
setParamIfDefined(params, Param.SpotterChatRenameLabel, spotterChatRenameLabel);
|
|
20398
|
+
setParamIfDefined(params, Param.SpotterChatDeleteLabel, spotterChatDeleteLabel);
|
|
20399
|
+
setParamIfDefined(params, Param.SpotterDeleteConversationModalTitle, spotterDeleteConversationModalTitle);
|
|
20400
|
+
setParamIfDefined(params, Param.SpotterPastConversationAlertMessage, spotterPastConversationAlertMessage);
|
|
20401
|
+
setParamIfDefined(params, Param.SpotterBestPracticesLabel, spotterBestPracticesLabel);
|
|
20402
|
+
setParamIfDefined(params, Param.SpotterConversationsBatchSize, spotterConversationsBatchSize);
|
|
20403
|
+
setParamIfDefined(params, Param.SpotterNewChatButtonTitle, spotterNewChatButtonTitle);
|
|
20404
|
+
// URL param with validation
|
|
20405
|
+
if (spotterDocumentationUrl !== undefined) {
|
|
20406
|
+
const [isValid, validationError] = validateHttpUrl(spotterDocumentationUrl);
|
|
20407
|
+
if (isValid) {
|
|
20408
|
+
params[Param.SpotterDocumentationUrl] = spotterDocumentationUrl;
|
|
20409
|
+
}
|
|
20410
|
+
else {
|
|
20411
|
+
this.handleError({
|
|
20412
|
+
errorType: exports.ErrorDetailsTypes.VALIDATION_ERROR,
|
|
20413
|
+
message: ERROR_MESSAGE.INVALID_SPOTTER_DOCUMENTATION_URL,
|
|
20414
|
+
code: exports.EmbedErrorCodes.INVALID_URL,
|
|
20415
|
+
error: (validationError === null || validationError === void 0 ? void 0 : validationError.message) || ERROR_MESSAGE.INVALID_SPOTTER_DOCUMENTATION_URL,
|
|
20416
|
+
});
|
|
20417
|
+
}
|
|
20418
|
+
}
|
|
20419
|
+
}
|
|
20420
|
+
// Handle spotterChatConfig params
|
|
20421
|
+
if (spotterChatConfig) {
|
|
20422
|
+
const { hideToolResponseCardBranding, toolResponseCardBrandingLabel, } = spotterChatConfig;
|
|
20423
|
+
setParamIfDefined(params, Param.HideToolResponseCardBranding, hideToolResponseCardBranding, true);
|
|
20424
|
+
setParamIfDefined(params, Param.ToolResponseCardBrandingLabel, toolResponseCardBrandingLabel);
|
|
20425
|
+
}
|
|
20164
20426
|
if (hideObjectSearch) {
|
|
20165
20427
|
params[Param.HideObjectSearch] = !!hideObjectSearch;
|
|
20166
20428
|
}
|
|
@@ -20558,6 +20820,7 @@ query GetEurekaVizSnapshots(
|
|
|
20558
20820
|
liveboardId: this.viewConfig.liveboardId,
|
|
20559
20821
|
vizId: this.viewConfig.vizId,
|
|
20560
20822
|
activeTabId: this.viewConfig.activeTabId,
|
|
20823
|
+
personalizedViewId: this.viewConfig.personalizedViewId,
|
|
20561
20824
|
};
|
|
20562
20825
|
if (this.viewConfig.fullHeight === true) {
|
|
20563
20826
|
if (this.viewConfig.vizId) {
|
|
@@ -20582,7 +20845,7 @@ query GetEurekaVizSnapshots(
|
|
|
20582
20845
|
getEmbedParamsObject() {
|
|
20583
20846
|
let params = {};
|
|
20584
20847
|
params = this.getBaseQueryParams(params);
|
|
20585
|
-
const { enableVizTransformations, fullHeight, defaultHeight, minimumHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, showMaskedFilterChip = false, isLiveboardMasterpiecesEnabled = false, isEnhancedFilterInteractivityEnabled = false, enableAskSage, enable2ColumnLayout, dataPanelV2 = true, enableCustomColumnGroups = false, oAuthPollingInterval, isForceRedirect, dataSourceId, coverAndFilterOptionInPDF = false, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, isLiveboardXLSXCSVDownloadEnabled = false, isGranularXLSXCSVSchedulesEnabled = false, showSpotterLimitations, isCentralizedLiveboardFilterUXEnabled = false, isLinkParametersEnabled, updatedSpotterChatPrompt, isThisPeriodInDateFiltersEnabled, } = this.viewConfig;
|
|
20848
|
+
const { enableVizTransformations, fullHeight, defaultHeight, minimumHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, showMaskedFilterChip = false, isLiveboardMasterpiecesEnabled = false, isEnhancedFilterInteractivityEnabled = false, enableAskSage, enable2ColumnLayout, dataPanelV2 = true, enableCustomColumnGroups = false, oAuthPollingInterval, isForceRedirect, dataSourceId, coverAndFilterOptionInPDF = false, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, isLiveboardXLSXCSVDownloadEnabled = false, isGranularXLSXCSVSchedulesEnabled = false, showSpotterLimitations, isCentralizedLiveboardFilterUXEnabled = false, isLinkParametersEnabled, updatedSpotterChatPrompt, spotterChatConfig, isThisPeriodInDateFiltersEnabled, } = this.viewConfig;
|
|
20586
20849
|
const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
|
|
20587
20850
|
|| this.viewConfig.preventPinboardFilterRemoval;
|
|
20588
20851
|
if (fullHeight === true) {
|
|
@@ -20656,6 +20919,12 @@ query GetEurekaVizSnapshots(
|
|
|
20656
20919
|
if (showSpotterLimitations !== undefined) {
|
|
20657
20920
|
params[Param.ShowSpotterLimitations] = showSpotterLimitations;
|
|
20658
20921
|
}
|
|
20922
|
+
// Handle spotterChatConfig params
|
|
20923
|
+
if (spotterChatConfig) {
|
|
20924
|
+
const { hideToolResponseCardBranding, toolResponseCardBrandingLabel, } = spotterChatConfig;
|
|
20925
|
+
setParamIfDefined(params, Param.HideToolResponseCardBranding, hideToolResponseCardBranding, true);
|
|
20926
|
+
setParamIfDefined(params, Param.ToolResponseCardBrandingLabel, toolResponseCardBrandingLabel);
|
|
20927
|
+
}
|
|
20659
20928
|
if (isLinkParametersEnabled !== undefined) {
|
|
20660
20929
|
params[Param.isLinkParametersEnabled] = isLinkParametersEnabled;
|
|
20661
20930
|
}
|
|
@@ -20679,15 +20948,31 @@ query GetEurekaVizSnapshots(
|
|
|
20679
20948
|
getQueryParamString(params, true);
|
|
20680
20949
|
return params;
|
|
20681
20950
|
}
|
|
20682
|
-
getIframeSuffixSrc(liveboardId, vizId, activeTabId) {
|
|
20683
|
-
|
|
20951
|
+
getIframeSuffixSrc(liveboardId, vizId, activeTabId, personalizedViewId) {
|
|
20952
|
+
// Extract view from liveboardId if passed along with it (legacy approach)
|
|
20953
|
+
// View must be appended as query param at the end, not embedded in path
|
|
20954
|
+
let liveboardGuid = liveboardId;
|
|
20955
|
+
let legacyViewId;
|
|
20956
|
+
if (liveboardId === null || liveboardId === void 0 ? void 0 : liveboardId.includes('?')) {
|
|
20957
|
+
const [id, query] = liveboardId.split('?');
|
|
20958
|
+
liveboardGuid = id;
|
|
20959
|
+
const params = new URLSearchParams(query);
|
|
20960
|
+
legacyViewId = params.get('view') || undefined;
|
|
20961
|
+
}
|
|
20962
|
+
// personalizedViewId takes precedence over legacyViewId (when passed as part of liveboardId)
|
|
20963
|
+
const effectiveViewId = personalizedViewId || legacyViewId;
|
|
20964
|
+
let suffix = `/embed/viz/${liveboardGuid}`;
|
|
20684
20965
|
if (activeTabId) {
|
|
20685
|
-
suffix = `${suffix}/tab/${activeTabId}
|
|
20966
|
+
suffix = `${suffix}/tab/${activeTabId}`;
|
|
20686
20967
|
}
|
|
20687
20968
|
if (vizId) {
|
|
20688
20969
|
suffix = `${suffix}/${vizId}`;
|
|
20689
20970
|
}
|
|
20690
|
-
const
|
|
20971
|
+
const additionalParams = {};
|
|
20972
|
+
if (effectiveViewId) {
|
|
20973
|
+
additionalParams.view = effectiveViewId;
|
|
20974
|
+
}
|
|
20975
|
+
const tsPostHashParams = this.getThoughtSpotPostUrlParams(additionalParams);
|
|
20691
20976
|
suffix = `${suffix}${tsPostHashParams}`;
|
|
20692
20977
|
return suffix;
|
|
20693
20978
|
}
|
|
@@ -20697,7 +20982,7 @@ query GetEurekaVizSnapshots(
|
|
|
20697
20982
|
*/
|
|
20698
20983
|
getIFrameSrc() {
|
|
20699
20984
|
var _a;
|
|
20700
|
-
const { vizId, activeTabId } = this.viewConfig;
|
|
20985
|
+
const { vizId, activeTabId, personalizedViewId } = this.viewConfig;
|
|
20701
20986
|
const liveboardId = (_a = this.viewConfig.liveboardId) !== null && _a !== void 0 ? _a : this.viewConfig.pinboardId;
|
|
20702
20987
|
if (!liveboardId) {
|
|
20703
20988
|
this.handleError({
|
|
@@ -20707,7 +20992,7 @@ query GetEurekaVizSnapshots(
|
|
|
20707
20992
|
error: ERROR_MESSAGE.LIVEBOARD_VIZ_ID_VALIDATION,
|
|
20708
20993
|
});
|
|
20709
20994
|
}
|
|
20710
|
-
return `${this.getRootIframeSrc()}${this.getIframeSuffixSrc(liveboardId, vizId, activeTabId)}`;
|
|
20995
|
+
return `${this.getRootIframeSrc()}${this.getIframeSuffixSrc(liveboardId, vizId, activeTabId, personalizedViewId)}`;
|
|
20711
20996
|
}
|
|
20712
20997
|
setActiveTab(data) {
|
|
20713
20998
|
if (!this.viewConfig.vizId) {
|
|
@@ -20746,12 +21031,13 @@ query GetEurekaVizSnapshots(
|
|
|
20746
21031
|
beforePrerenderVisible() {
|
|
20747
21032
|
const embedObj = this.getPreRenderObj();
|
|
20748
21033
|
this.executeAfterEmbedContainerLoaded(() => {
|
|
20749
|
-
this.navigateToLiveboard(this.viewConfig.liveboardId, this.viewConfig.vizId, this.viewConfig.activeTabId);
|
|
21034
|
+
this.navigateToLiveboard(this.viewConfig.liveboardId, this.viewConfig.vizId, this.viewConfig.activeTabId, this.viewConfig.personalizedViewId);
|
|
20750
21035
|
if (embedObj) {
|
|
20751
21036
|
embedObj.currentLiveboardState = {
|
|
20752
21037
|
liveboardId: this.viewConfig.liveboardId,
|
|
20753
21038
|
vizId: this.viewConfig.vizId,
|
|
20754
21039
|
activeTabId: this.viewConfig.activeTabId,
|
|
21040
|
+
personalizedViewId: this.viewConfig.personalizedViewId,
|
|
20755
21041
|
};
|
|
20756
21042
|
}
|
|
20757
21043
|
});
|
|
@@ -20816,11 +21102,12 @@ query GetEurekaVizSnapshots(
|
|
|
20816
21102
|
this.postRender();
|
|
20817
21103
|
return this;
|
|
20818
21104
|
}
|
|
20819
|
-
navigateToLiveboard(liveboardId, vizId, activeTabId) {
|
|
20820
|
-
const path = this.getIframeSuffixSrc(liveboardId, vizId, activeTabId);
|
|
21105
|
+
navigateToLiveboard(liveboardId, vizId, activeTabId, personalizedViewId) {
|
|
21106
|
+
const path = this.getIframeSuffixSrc(liveboardId, vizId, activeTabId, personalizedViewId);
|
|
20821
21107
|
this.viewConfig.liveboardId = liveboardId;
|
|
20822
21108
|
this.viewConfig.activeTabId = activeTabId;
|
|
20823
21109
|
this.viewConfig.vizId = vizId;
|
|
21110
|
+
this.viewConfig.personalizedViewId = personalizedViewId;
|
|
20824
21111
|
if (this.isRendered) {
|
|
20825
21112
|
this.trigger(exports.HostEvent.Navigate, path.substring(1));
|
|
20826
21113
|
}
|
|
@@ -20844,6 +21131,9 @@ query GetEurekaVizSnapshots(
|
|
|
20844
21131
|
if (this.viewConfig.vizId) {
|
|
20845
21132
|
url = `${url}/${this.viewConfig.vizId}`;
|
|
20846
21133
|
}
|
|
21134
|
+
if (this.viewConfig.personalizedViewId) {
|
|
21135
|
+
url = `${url}?view=${this.viewConfig.personalizedViewId}`;
|
|
21136
|
+
}
|
|
20847
21137
|
return url;
|
|
20848
21138
|
}
|
|
20849
21139
|
}
|
|
@@ -21680,7 +21970,9 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
21680
21970
|
this.viewConfig = viewConfig;
|
|
21681
21971
|
}
|
|
21682
21972
|
getEmbedParamsObject() {
|
|
21683
|
-
const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions,
|
|
21973
|
+
const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, updatedSpotterChatPrompt, spotterSidebarConfig, spotterChatConfig, } = this.viewConfig;
|
|
21974
|
+
// Extract sidebar config properties
|
|
21975
|
+
const { enablePastConversationsSidebar, spotterSidebarTitle, spotterSidebarDefaultExpanded, spotterChatRenameLabel, spotterChatDeleteLabel, spotterDeleteConversationModalTitle, spotterPastConversationAlertMessage, spotterDocumentationUrl, spotterBestPracticesLabel, spotterConversationsBatchSize, spotterNewChatButtonTitle, } = spotterSidebarConfig || {};
|
|
21684
21976
|
if (!worksheetId) {
|
|
21685
21977
|
this.handleError({
|
|
21686
21978
|
errorType: exports.ErrorDetailsTypes.VALIDATION_ERROR,
|
|
@@ -21691,30 +21983,51 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
21691
21983
|
}
|
|
21692
21984
|
const queryParams = this.getBaseQueryParams();
|
|
21693
21985
|
queryParams[Param.SpotterEnabled] = true;
|
|
21694
|
-
|
|
21695
|
-
|
|
21696
|
-
|
|
21697
|
-
|
|
21698
|
-
|
|
21699
|
-
|
|
21700
|
-
|
|
21701
|
-
|
|
21702
|
-
|
|
21703
|
-
|
|
21704
|
-
|
|
21705
|
-
|
|
21706
|
-
|
|
21707
|
-
|
|
21986
|
+
// Boolean params
|
|
21987
|
+
setParamIfDefined(queryParams, Param.DisableSourceSelection, disableSourceSelection, true);
|
|
21988
|
+
setParamIfDefined(queryParams, Param.HideSourceSelection, hideSourceSelection, true);
|
|
21989
|
+
setParamIfDefined(queryParams, Param.DataPanelV2Enabled, dataPanelV2, true);
|
|
21990
|
+
setParamIfDefined(queryParams, Param.ShowSpotterLimitations, showSpotterLimitations, true);
|
|
21991
|
+
setParamIfDefined(queryParams, Param.HideSampleQuestions, hideSampleQuestions, true);
|
|
21992
|
+
setParamIfDefined(queryParams, Param.UpdatedSpotterChatPrompt, updatedSpotterChatPrompt, true);
|
|
21993
|
+
setParamIfDefined(queryParams, Param.SpotterSidebarDefaultExpanded, spotterSidebarDefaultExpanded, true);
|
|
21994
|
+
// String params
|
|
21995
|
+
setParamIfDefined(queryParams, Param.SpotterSidebarTitle, spotterSidebarTitle);
|
|
21996
|
+
setParamIfDefined(queryParams, Param.SpotterChatRenameLabel, spotterChatRenameLabel);
|
|
21997
|
+
setParamIfDefined(queryParams, Param.SpotterChatDeleteLabel, spotterChatDeleteLabel);
|
|
21998
|
+
setParamIfDefined(queryParams, Param.SpotterDeleteConversationModalTitle, spotterDeleteConversationModalTitle);
|
|
21999
|
+
setParamIfDefined(queryParams, Param.SpotterPastConversationAlertMessage, spotterPastConversationAlertMessage);
|
|
22000
|
+
setParamIfDefined(queryParams, Param.SpotterBestPracticesLabel, spotterBestPracticesLabel);
|
|
22001
|
+
setParamIfDefined(queryParams, Param.SpotterConversationsBatchSize, spotterConversationsBatchSize);
|
|
22002
|
+
setParamIfDefined(queryParams, Param.SpotterNewChatButtonTitle, spotterNewChatButtonTitle);
|
|
22003
|
+
// URL param with validation
|
|
22004
|
+
if (spotterDocumentationUrl !== undefined) {
|
|
22005
|
+
const [isValid, validationError] = validateHttpUrl(spotterDocumentationUrl);
|
|
22006
|
+
if (isValid) {
|
|
22007
|
+
queryParams[Param.SpotterDocumentationUrl] = spotterDocumentationUrl;
|
|
22008
|
+
}
|
|
22009
|
+
else {
|
|
22010
|
+
this.handleError({
|
|
22011
|
+
errorType: exports.ErrorDetailsTypes.VALIDATION_ERROR,
|
|
22012
|
+
message: ERROR_MESSAGE.INVALID_SPOTTER_DOCUMENTATION_URL,
|
|
22013
|
+
code: exports.EmbedErrorCodes.INVALID_URL,
|
|
22014
|
+
error: (validationError === null || validationError === void 0 ? void 0 : validationError.message) || ERROR_MESSAGE.INVALID_SPOTTER_DOCUMENTATION_URL,
|
|
22015
|
+
});
|
|
22016
|
+
}
|
|
21708
22017
|
}
|
|
21709
|
-
|
|
21710
|
-
|
|
22018
|
+
// Handle spotterChatConfig params
|
|
22019
|
+
if (spotterChatConfig) {
|
|
22020
|
+
const { hideToolResponseCardBranding, toolResponseCardBrandingLabel, } = spotterChatConfig;
|
|
22021
|
+
setParamIfDefined(queryParams, Param.HideToolResponseCardBranding, hideToolResponseCardBranding, true);
|
|
22022
|
+
setParamIfDefined(queryParams, Param.ToolResponseCardBrandingLabel, toolResponseCardBrandingLabel);
|
|
21711
22023
|
}
|
|
21712
22024
|
return queryParams;
|
|
21713
22025
|
}
|
|
21714
22026
|
getIframeSrc() {
|
|
21715
|
-
const { worksheetId, searchOptions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL,
|
|
22027
|
+
const { worksheetId, searchOptions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, spotterSidebarConfig, } = this.viewConfig;
|
|
21716
22028
|
const path = 'insights/conv-assist';
|
|
21717
22029
|
const queryParams = this.getEmbedParamsObject();
|
|
22030
|
+
const enablePastConversationsSidebar = spotterSidebarConfig === null || spotterSidebarConfig === void 0 ? void 0 : spotterSidebarConfig.enablePastConversationsSidebar;
|
|
21718
22031
|
if (!isUndefined_1(enablePastConversationsSidebar)) {
|
|
21719
22032
|
queryParams[Param.EnablePastConversationsSidebar] = !!enablePastConversationsSidebar;
|
|
21720
22033
|
}
|
|
@@ -22378,6 +22691,69 @@ query GetEurekaResults($params: Input_eureka_SearchRequest) {
|
|
|
22378
22691
|
return result;
|
|
22379
22692
|
};
|
|
22380
22693
|
|
|
22694
|
+
function startAutoMCPFrameRenderer(viewConfig = {}) {
|
|
22695
|
+
const replaceWithMCPIframe = (iframe) => {
|
|
22696
|
+
const autoMCPFrameRenderer = new AutoFrameRenderer(viewConfig);
|
|
22697
|
+
autoMCPFrameRenderer.replaceIframe(iframe);
|
|
22698
|
+
};
|
|
22699
|
+
const observer = new MutationObserver((mutations) => {
|
|
22700
|
+
for (const mutation of mutations) {
|
|
22701
|
+
for (const node of Array.from(mutation.addedNodes)) {
|
|
22702
|
+
if (node instanceof HTMLIFrameElement && isTSMCPIframe(node)) {
|
|
22703
|
+
replaceWithMCPIframe(node);
|
|
22704
|
+
}
|
|
22705
|
+
if (node instanceof HTMLElement) {
|
|
22706
|
+
node.querySelectorAll('iframe').forEach((iframe) => {
|
|
22707
|
+
if (isTSMCPIframe(iframe)) {
|
|
22708
|
+
replaceWithMCPIframe(iframe);
|
|
22709
|
+
}
|
|
22710
|
+
});
|
|
22711
|
+
}
|
|
22712
|
+
}
|
|
22713
|
+
}
|
|
22714
|
+
});
|
|
22715
|
+
observer.observe(document.body, { childList: true, subtree: true });
|
|
22716
|
+
return observer;
|
|
22717
|
+
}
|
|
22718
|
+
function isTSMCPIframe(iframe) {
|
|
22719
|
+
const src = iframe.src;
|
|
22720
|
+
return src.includes(`${Param.Tsmcp}=true`);
|
|
22721
|
+
}
|
|
22722
|
+
class AutoFrameRenderer extends TsEmbed {
|
|
22723
|
+
constructor(viewConfig) {
|
|
22724
|
+
viewConfig.embedComponentType = 'auto-frame-renderer';
|
|
22725
|
+
const container = document.createElement('div');
|
|
22726
|
+
super(container, viewConfig);
|
|
22727
|
+
this.viewConfig = viewConfig;
|
|
22728
|
+
}
|
|
22729
|
+
getMCPIframeSrc(sourceSrc) {
|
|
22730
|
+
const queryParams = this.getEmbedParamsObject();
|
|
22731
|
+
const sourceURL = new URL(sourceSrc);
|
|
22732
|
+
const existingQueryParams = sourceURL.searchParams;
|
|
22733
|
+
// convert existing query params to an object
|
|
22734
|
+
const existingQueryParamsObject = Object.fromEntries(existingQueryParams);
|
|
22735
|
+
delete existingQueryParamsObject[Param.Tsmcp];
|
|
22736
|
+
// merge the existing query params with the new query params
|
|
22737
|
+
const mergedQueryParams = { ...queryParams, ...existingQueryParamsObject };
|
|
22738
|
+
const mergedQueryParamsString = getQueryParamString(mergedQueryParams);
|
|
22739
|
+
const frameSrc = `${sourceURL.origin}${sourceURL.pathname}?${mergedQueryParamsString}/${sourceURL.hash}`;
|
|
22740
|
+
return frameSrc;
|
|
22741
|
+
}
|
|
22742
|
+
handleInsertionIntoDOM(child) {
|
|
22743
|
+
if (this.frameToReplace) {
|
|
22744
|
+
this.frameToReplace.replaceWith(child);
|
|
22745
|
+
}
|
|
22746
|
+
else {
|
|
22747
|
+
super.handleInsertionIntoDOM(child);
|
|
22748
|
+
}
|
|
22749
|
+
}
|
|
22750
|
+
async replaceIframe(iframe) {
|
|
22751
|
+
this.frameToReplace = iframe;
|
|
22752
|
+
const src = this.getMCPIframeSrc(iframe.src);
|
|
22753
|
+
await this.renderIFrame(src);
|
|
22754
|
+
}
|
|
22755
|
+
}
|
|
22756
|
+
|
|
22381
22757
|
const ALIAS = Symbol.for('yaml.alias');
|
|
22382
22758
|
const DOC = Symbol.for('yaml.document');
|
|
22383
22759
|
const MAP = Symbol.for('yaml.map');
|
|
@@ -29803,6 +30179,7 @@ query GetEurekaResults($params: Input_eureka_SearchRequest) {
|
|
|
29803
30179
|
exports.prefetch = prefetch;
|
|
29804
30180
|
exports.reloadIframe = reloadIframe;
|
|
29805
30181
|
exports.resetCachedAuthToken = resetCachedAuthToken;
|
|
30182
|
+
exports.startAutoMCPFrameRenderer = startAutoMCPFrameRenderer;
|
|
29806
30183
|
exports.tokenizedFetch = tokenizedFetch;
|
|
29807
30184
|
exports.uploadMixpanelEvent = uploadMixpanelEvent;
|
|
29808
30185
|
|