@thoughtspot/visual-embed-sdk 1.48.0 → 1.49.0
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 +1 -1
- package/cjs/src/css-variables.d.ts +140 -0
- package/cjs/src/css-variables.d.ts.map +1 -1
- package/cjs/src/embed/app.d.ts +62 -1
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +57 -6
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/app.spec.js +191 -1
- package/cjs/src/embed/app.spec.js.map +1 -1
- package/cjs/src/embed/auto-frame-renderer.js +7 -2
- package/cjs/src/embed/auto-frame-renderer.js.map +1 -1
- package/cjs/src/embed/auto-frame-renderer.spec.js +385 -6
- package/cjs/src/embed/auto-frame-renderer.spec.js.map +1 -1
- package/cjs/src/embed/base.d.ts +1 -0
- package/cjs/src/embed/base.d.ts.map +1 -1
- package/cjs/src/embed/base.js +13 -1
- package/cjs/src/embed/base.js.map +1 -1
- package/cjs/src/embed/base.spec.js +21 -0
- package/cjs/src/embed/base.spec.js.map +1 -1
- package/cjs/src/embed/bodyless-conversation.spec.js +86 -0
- package/cjs/src/embed/bodyless-conversation.spec.js.map +1 -1
- package/cjs/src/embed/conversation.d.ts +16 -1
- package/cjs/src/embed/conversation.d.ts.map +1 -1
- package/cjs/src/embed/conversation.js +5 -1
- package/cjs/src/embed/conversation.js.map +1 -1
- package/cjs/src/embed/conversation.spec.js +26 -0
- package/cjs/src/embed/conversation.spec.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts +47 -1
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +47 -6
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/liveboard.spec.js +129 -1
- package/cjs/src/embed/liveboard.spec.js.map +1 -1
- package/cjs/src/embed/spotter-viz-utils.d.ts +85 -0
- package/cjs/src/embed/spotter-viz-utils.d.ts.map +1 -0
- package/cjs/src/embed/spotter-viz-utils.js +17 -0
- package/cjs/src/embed/spotter-viz-utils.js.map +1 -0
- package/cjs/src/embed/spotter-viz-utils.spec.d.ts +2 -0
- package/cjs/src/embed/spotter-viz-utils.spec.d.ts.map +1 -0
- package/cjs/src/embed/spotter-viz-utils.spec.js +31 -0
- package/cjs/src/embed/spotter-viz-utils.spec.js.map +1 -0
- package/cjs/src/embed/ts-embed.d.ts +58 -38
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +245 -149
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/embed/ts-embed.spec.js +369 -123
- package/cjs/src/embed/ts-embed.spec.js.map +1 -1
- package/cjs/src/index.d.ts +2 -1
- package/cjs/src/index.d.ts.map +1 -1
- package/cjs/src/index.js.map +1 -1
- package/cjs/src/react/index.d.ts.map +1 -1
- package/cjs/src/react/index.js +3 -0
- package/cjs/src/react/index.js.map +1 -1
- package/cjs/src/types.d.ts +267 -27
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +223 -19
- package/cjs/src/types.js.map +1 -1
- package/cjs/src/utils/authService/tokenizedAuthService.spec.js +6 -7
- package/cjs/src/utils/authService/tokenizedAuthService.spec.js.map +1 -1
- package/cjs/src/utils/logger.js +2 -1
- package/cjs/src/utils/logger.js.map +1 -1
- package/cjs/src/utils/logger.spec.d.ts +1 -0
- package/cjs/src/utils/logger.spec.d.ts.map +1 -1
- package/cjs/src/utils/logger.spec.js +10 -9
- package/cjs/src/utils/logger.spec.js.map +1 -1
- package/cjs/src/utils.d.ts +4 -1
- package/cjs/src/utils.d.ts.map +1 -1
- package/cjs/src/utils.js +107 -10
- package/cjs/src/utils.js.map +1 -1
- package/cjs/src/utils.spec.js +163 -4
- package/cjs/src/utils.spec.js.map +1 -1
- package/dist/{index-Ck-r09gt.js → index-_UGCSSDR.js} +1 -1
- package/dist/src/css-variables.d.ts +140 -0
- package/dist/src/css-variables.d.ts.map +1 -1
- package/dist/src/embed/app.d.ts +62 -1
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/base.d.ts +1 -0
- package/dist/src/embed/base.d.ts.map +1 -1
- package/dist/src/embed/conversation.d.ts +16 -1
- package/dist/src/embed/conversation.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts +47 -1
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/embed/spotter-viz-utils.d.ts +85 -0
- package/dist/src/embed/spotter-viz-utils.d.ts.map +1 -0
- package/dist/src/embed/spotter-viz-utils.spec.d.ts +2 -0
- package/dist/src/embed/spotter-viz-utils.spec.d.ts.map +1 -0
- package/dist/src/embed/ts-embed.d.ts +58 -38
- package/dist/src/embed/ts-embed.d.ts.map +1 -1
- package/dist/src/index.d.ts +2 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/react/index.d.ts.map +1 -1
- package/dist/src/types.d.ts +267 -27
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/logger.spec.d.ts +1 -0
- package/dist/src/utils/logger.spec.d.ts.map +1 -1
- package/dist/src/utils.d.ts +4 -1
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +3708 -3226
- package/dist/tsembed-react.js +3358 -2876
- package/dist/tsembed.es.js +3713 -3229
- package/dist/tsembed.js +3708 -3224
- package/dist/visual-embed-sdk-react-full.d.ts +643 -63
- package/dist/visual-embed-sdk-react.d.ts +643 -63
- package/dist/visual-embed-sdk.d.ts +658 -65
- package/lib/package.json +1 -1
- package/lib/src/css-variables.d.ts +140 -0
- package/lib/src/css-variables.d.ts.map +1 -1
- package/lib/src/embed/app.d.ts +62 -1
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +58 -7
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/app.spec.js +192 -2
- package/lib/src/embed/app.spec.js.map +1 -1
- package/lib/src/embed/auto-frame-renderer.js +7 -2
- package/lib/src/embed/auto-frame-renderer.js.map +1 -1
- package/lib/src/embed/auto-frame-renderer.spec.js +387 -8
- package/lib/src/embed/auto-frame-renderer.spec.js.map +1 -1
- package/lib/src/embed/base.d.ts +1 -0
- package/lib/src/embed/base.d.ts.map +1 -1
- package/lib/src/embed/base.js +11 -0
- package/lib/src/embed/base.js.map +1 -1
- package/lib/src/embed/base.spec.js +22 -1
- package/lib/src/embed/base.spec.js.map +1 -1
- package/lib/src/embed/bodyless-conversation.spec.js +86 -0
- package/lib/src/embed/bodyless-conversation.spec.js.map +1 -1
- package/lib/src/embed/conversation.d.ts +16 -1
- package/lib/src/embed/conversation.d.ts.map +1 -1
- package/lib/src/embed/conversation.js +5 -1
- package/lib/src/embed/conversation.js.map +1 -1
- package/lib/src/embed/conversation.spec.js +27 -1
- package/lib/src/embed/conversation.spec.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts +47 -1
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +48 -7
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +129 -1
- package/lib/src/embed/liveboard.spec.js.map +1 -1
- package/lib/src/embed/spotter-viz-utils.d.ts +85 -0
- package/lib/src/embed/spotter-viz-utils.d.ts.map +1 -0
- package/lib/src/embed/spotter-viz-utils.js +13 -0
- package/lib/src/embed/spotter-viz-utils.js.map +1 -0
- package/lib/src/embed/spotter-viz-utils.spec.d.ts +2 -0
- package/lib/src/embed/spotter-viz-utils.spec.d.ts.map +1 -0
- package/lib/src/embed/spotter-viz-utils.spec.js +29 -0
- package/lib/src/embed/spotter-viz-utils.spec.js.map +1 -0
- package/lib/src/embed/ts-embed.d.ts +58 -38
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +248 -152
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/embed/ts-embed.spec.js +369 -123
- package/lib/src/embed/ts-embed.spec.js.map +1 -1
- package/lib/src/index.d.ts +2 -1
- package/lib/src/index.d.ts.map +1 -1
- package/lib/src/index.js.map +1 -1
- package/lib/src/react/index.d.ts.map +1 -1
- package/lib/src/react/index.js +3 -0
- package/lib/src/react/index.js.map +1 -1
- package/lib/src/types.d.ts +267 -27
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +223 -19
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils/authService/tokenizedAuthService.spec.js +6 -7
- package/lib/src/utils/authService/tokenizedAuthService.spec.js.map +1 -1
- package/lib/src/utils/logger.js +2 -1
- package/lib/src/utils/logger.js.map +1 -1
- package/lib/src/utils/logger.spec.d.ts +1 -0
- package/lib/src/utils/logger.spec.d.ts.map +1 -1
- package/lib/src/utils/logger.spec.js +10 -9
- package/lib/src/utils/logger.spec.js.map +1 -1
- package/lib/src/utils.d.ts +4 -1
- package/lib/src/utils.d.ts.map +1 -1
- package/lib/src/utils.js +103 -9
- package/lib/src/utils.js.map +1 -1
- package/lib/src/utils.spec.js +164 -5
- package/lib/src/utils.spec.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +658 -65
- package/package.json +1 -1
- package/src/css-variables.ts +175 -1
- package/src/embed/app.spec.ts +247 -3
- package/src/embed/app.ts +125 -5
- package/src/embed/auto-frame-renderer.spec.ts +457 -58
- package/src/embed/auto-frame-renderer.ts +7 -2
- package/src/embed/base.spec.ts +25 -1
- package/src/embed/base.ts +19 -5
- package/src/embed/bodyless-conversation.spec.ts +93 -0
- package/src/embed/conversation.spec.ts +34 -0
- package/src/embed/conversation.ts +22 -1
- package/src/embed/liveboard.spec.ts +149 -1
- package/src/embed/liveboard.ts +102 -6
- package/src/embed/spotter-viz-utils.spec.ts +30 -0
- package/src/embed/spotter-viz-utils.ts +94 -0
- package/src/embed/ts-embed.spec.ts +532 -234
- package/src/embed/ts-embed.ts +383 -257
- package/src/index.ts +3 -0
- package/src/react/index.tsx +3 -0
- package/src/types.ts +284 -23
- package/src/utils/authService/tokenizedAuthService.spec.ts +6 -6
- package/src/utils/logger.spec.ts +11 -9
- package/src/utils/logger.ts +2 -2
- package/src/utils.spec.ts +200 -4
- package/src/utils.ts +128 -9
|
@@ -820,6 +820,146 @@ export interface CustomCssVariables {
|
|
|
820
820
|
* Background color of the color palette in the Liveboard styling panel.
|
|
821
821
|
*/
|
|
822
822
|
"--ts-var-liveboard-styling-color-palette-background"?: string;
|
|
823
|
+
/**
|
|
824
|
+
* Main panel background of the SpotterViz.
|
|
825
|
+
*/
|
|
826
|
+
"--ts-var-spotterviz-panel-background"?: string;
|
|
827
|
+
/**
|
|
828
|
+
* Background color of the chat input field in SpotterViz.
|
|
829
|
+
*/
|
|
830
|
+
"--ts-var-spotterviz-input-background"?: string;
|
|
831
|
+
/**
|
|
832
|
+
* Placeholder text color of the chat input field in SpotterViz.
|
|
833
|
+
*/
|
|
834
|
+
"--ts-var-spotterviz-input-placeholder-color"?: string;
|
|
835
|
+
/**
|
|
836
|
+
* CTA color of the chat input field in SpotterViz.
|
|
837
|
+
*/
|
|
838
|
+
"--ts-var-spotterviz-input-cta-color"?: string;
|
|
839
|
+
/**
|
|
840
|
+
* CTA hover color of the chat input field in SpotterViz.
|
|
841
|
+
*/
|
|
842
|
+
"--ts-var-spotterviz-input-cta-hover-color"?: string;
|
|
843
|
+
/**
|
|
844
|
+
* Text color for the SpotterViz label in the empty state, displayed below
|
|
845
|
+
* the SpotterViz icon.
|
|
846
|
+
*/
|
|
847
|
+
"--ts-var-spotterviz-emptystate-spotterviz-color"?: string;
|
|
848
|
+
/**
|
|
849
|
+
* Background color of the starter prompt cards in SpotterViz.
|
|
850
|
+
*/
|
|
851
|
+
"--ts-var-spotterviz-prompt-card-background"?: string;
|
|
852
|
+
/**
|
|
853
|
+
* Background hover color of the starter prompt cards in SpotterViz.
|
|
854
|
+
*/
|
|
855
|
+
"--ts-var-spotterviz-prompt-card-hover-background"?: string;
|
|
856
|
+
/**
|
|
857
|
+
* Primary text color in SpotterViz, also used for tool response text,
|
|
858
|
+
* upvote/downvote buttons, and other primary content.
|
|
859
|
+
*/
|
|
860
|
+
"--ts-var-spotterviz-text-primary"?: string;
|
|
861
|
+
/**
|
|
862
|
+
* Secondary text color in SpotterViz.
|
|
863
|
+
*/
|
|
864
|
+
"--ts-var-spotterviz-text-secondary"?: string;
|
|
865
|
+
/**
|
|
866
|
+
* Background color of the user chat message bubble in SpotterViz.
|
|
867
|
+
*/
|
|
868
|
+
"--ts-var-spotterviz-message-background"?: string;
|
|
869
|
+
/**
|
|
870
|
+
* Hover color for the user chat message expand button in SpotterViz.
|
|
871
|
+
*/
|
|
872
|
+
"--ts-var-spotterviz-usermessage-icon-hover"?: string;
|
|
873
|
+
/**
|
|
874
|
+
* Background color of the user chat message expand button in SpotterViz.
|
|
875
|
+
*/
|
|
876
|
+
"--ts-var-spotterviz-usermessage-icon-background"?: string;
|
|
877
|
+
/**
|
|
878
|
+
* Color of the thinking step header when in progress in SpotterViz.
|
|
879
|
+
*/
|
|
880
|
+
"--ts-var-spotterviz-thinking-inprogress-header-color"?: string;
|
|
881
|
+
/**
|
|
882
|
+
* Color of the thinking step header when completed in SpotterViz.
|
|
883
|
+
*/
|
|
884
|
+
"--ts-var-spotterviz-thinking-completed-header-color"?: string;
|
|
885
|
+
/**
|
|
886
|
+
* Color of the final completion indicator icon shown when all work is done.
|
|
887
|
+
* The last green dot which is shown when work is done.
|
|
888
|
+
*/
|
|
889
|
+
"--ts-var-spotterviz-thinking-work-done-icon-color"?: string;
|
|
890
|
+
/**
|
|
891
|
+
* Hover background color for the working/work done CTA in SpotterViz.
|
|
892
|
+
*/
|
|
893
|
+
"--ts-var-spotterviz-thinking-cta-hover-background"?: string;
|
|
894
|
+
/**
|
|
895
|
+
* Background color of tool call panels in SpotterViz.
|
|
896
|
+
*/
|
|
897
|
+
"--ts-var-spotterviz-tool-call-background"?: string;
|
|
898
|
+
/**
|
|
899
|
+
* Color of tool titles and icons in SpotterViz.
|
|
900
|
+
*/
|
|
901
|
+
"--ts-var-spotterviz-tool-title-color"?: string;
|
|
902
|
+
/**
|
|
903
|
+
* Border color of tool call panels in SpotterViz.
|
|
904
|
+
*/
|
|
905
|
+
"--ts-var-spotterviz-tool-border-color"?: string;
|
|
906
|
+
/**
|
|
907
|
+
* Background color of the JSON input panel inside a tool call in SpotterViz.
|
|
908
|
+
*/
|
|
909
|
+
"--ts-var-spotterviz-tool-json-input-background"?: string;
|
|
910
|
+
/**
|
|
911
|
+
* Background color of the upvote/downvote feedback buttons in SpotterViz.
|
|
912
|
+
*/
|
|
913
|
+
"--ts-var-spotterviz-tool-feedback-button-background"?: string;
|
|
914
|
+
/**
|
|
915
|
+
* Hover background color of the upvote/downvote feedback buttons in SpotterViz.
|
|
916
|
+
*/
|
|
917
|
+
"--ts-var-spotterviz-tool-feedback-button-hover"?: string;
|
|
918
|
+
/**
|
|
919
|
+
* Text color of the JSON input panel inside a tool call in SpotterViz.
|
|
920
|
+
*/
|
|
921
|
+
"--ts-var-spotterviz-tool-json-input-color"?: string;
|
|
922
|
+
/**
|
|
923
|
+
* Background color of the last checkpoint section in SpotterViz.
|
|
924
|
+
*/
|
|
925
|
+
"--ts-var-spotterviz-last-checkpoint-background"?: string;
|
|
926
|
+
/**
|
|
927
|
+
* Border color of the last checkpoint section in SpotterViz.
|
|
928
|
+
*/
|
|
929
|
+
"--ts-var-spotterviz-last-checkpoint-border"?: string;
|
|
930
|
+
/**
|
|
931
|
+
* Border color of the Liveboard edit header toolbar.
|
|
932
|
+
*/
|
|
933
|
+
"--ts-var-liveboard-edit-toolbar-border"?: string;
|
|
934
|
+
/**
|
|
935
|
+
* Background color of the selected section in the Liveboard edit header toolbar.
|
|
936
|
+
*/
|
|
937
|
+
"--ts-var-liveboard-edit-toolbar-selected-background"?: string;
|
|
938
|
+
/**
|
|
939
|
+
* Text color of the selected section in the Liveboard edit header toolbar.
|
|
940
|
+
*/
|
|
941
|
+
"--ts-var-liveboard-edit-toolbar-selected-text-color"?: string;
|
|
942
|
+
/**
|
|
943
|
+
* Text color of unselected items in the Liveboard edit header toolbar.
|
|
944
|
+
*/
|
|
945
|
+
"--ts-var-liveboard-edit-toolbar-text"?: string;
|
|
946
|
+
/**
|
|
947
|
+
* Hover background color of unselected items in the Liveboard edit header toolbar.
|
|
948
|
+
*/
|
|
949
|
+
"--ts-var-liveboard-edit-toolbar-hover-background"?: string;
|
|
950
|
+
/**
|
|
951
|
+
* Hover text color of unselected items in the Liveboard edit header toolbar.
|
|
952
|
+
*/
|
|
953
|
+
"--ts-var-liveboard-edit-toolbar-hover-text-color"?: string;
|
|
954
|
+
/**
|
|
955
|
+
* Text color of the SpotterViz footer.
|
|
956
|
+
*/
|
|
957
|
+
"--ts-var-spotterviz-footer-text-color"?: string;
|
|
958
|
+
/**
|
|
959
|
+
* Shared border color used throughout SpotterViz: input box, user message,
|
|
960
|
+
* header underline, left panel border, thinking step connector and dots.
|
|
961
|
+
*/
|
|
962
|
+
"--ts-var-spotterviz-border-color"?: string;
|
|
823
963
|
}
|
|
824
964
|
export interface SessionInterface {
|
|
825
965
|
sessionId: string;
|
|
@@ -2116,6 +2256,14 @@ export interface BaseViewConfig extends ApiInterceptFlags {
|
|
|
2116
2256
|
* This flag can be used to disable links inside the embedded app,
|
|
2117
2257
|
* and disable redirection of links in a new tab.
|
|
2118
2258
|
*
|
|
2259
|
+
* Note: When set to `true`, this flag automatically disables
|
|
2260
|
+
* {@link enableLinkOverridesV2} for the
|
|
2261
|
+
* embed session. The two features are mutually exclusive — link
|
|
2262
|
+
* overrides mutate anchors (delete `href`, attach a JS click handler),
|
|
2263
|
+
* which breaks native browser behavior (Cmd/Ctrl+Click, middle-click,
|
|
2264
|
+
* right-click "Open in new tab") when combined with the disable flag.
|
|
2265
|
+
* The disable flag preserves native anchor semantics instead.
|
|
2266
|
+
*
|
|
2119
2267
|
* Supported embed types: `AppEmbed`, `LiveboardEmbed`, `SearchEmbed`, `SpotterAgentEmbed`, `SpotterEmbed`, `SearchBarEmbed`
|
|
2120
2268
|
* @version SDK: 1.32.1 | ThoughtSpot: 10.3.0.cl
|
|
2121
2269
|
* @example
|
|
@@ -2151,8 +2299,13 @@ export interface BaseViewConfig extends ApiInterceptFlags {
|
|
|
2151
2299
|
* Flag to override the *Open Link in New Tab* context
|
|
2152
2300
|
* menu option.
|
|
2153
2301
|
*
|
|
2154
|
-
*
|
|
2155
|
-
* {@link enableLinkOverridesV2}
|
|
2302
|
+
* Note: Setting this flag implicitly enables
|
|
2303
|
+
* {@link enableLinkOverridesV2}. V1 is auto-upgraded to
|
|
2304
|
+
* V2 to ensure consistent link-override behavior; the
|
|
2305
|
+
* legacy V1-only path is no longer used in isolation.
|
|
2306
|
+
*
|
|
2307
|
+
* Note: This flag is ignored when
|
|
2308
|
+
* {@link disableRedirectionLinksInNewTab} is `true`.
|
|
2156
2309
|
*
|
|
2157
2310
|
* Supported embed types: `AppEmbed`, `LiveboardEmbed`,
|
|
2158
2311
|
* `SearchEmbed`, `SpotterAgentEmbed`,
|
|
@@ -2178,6 +2331,9 @@ export interface BaseViewConfig extends ApiInterceptFlags {
|
|
|
2178
2331
|
* alongside this flag for backward compatibility with
|
|
2179
2332
|
* older ThoughtSpot versions.
|
|
2180
2333
|
*
|
|
2334
|
+
* Note: This flag is ignored when
|
|
2335
|
+
* {@link disableRedirectionLinksInNewTab} is `true`.
|
|
2336
|
+
*
|
|
2181
2337
|
* Supported embed types: `AppEmbed`, `LiveboardEmbed`,
|
|
2182
2338
|
* `SearchEmbed`, `SpotterAgentEmbed`,
|
|
2183
2339
|
* `SpotterEmbed`, `SearchBarEmbed`
|
|
@@ -2450,8 +2606,21 @@ export interface BaseViewConfig extends ApiInterceptFlags {
|
|
|
2450
2606
|
*/
|
|
2451
2607
|
useHostEventsV2?: boolean;
|
|
2452
2608
|
}
|
|
2453
|
-
|
|
2454
|
-
}
|
|
2609
|
+
/**
|
|
2610
|
+
* Configuration for {@link startAutoMCPFrameRenderer}.
|
|
2611
|
+
*
|
|
2612
|
+
* Extends {@link BaseViewConfig} but omits params that are not applicable
|
|
2613
|
+
* to the auto-frame renderer:
|
|
2614
|
+
* - `preRenderId` / `usePrerenderedIfAvailable` / `doNotTrackPreRenderSize` —
|
|
2615
|
+
* the renderer always replaces a live iframe in-place; prerender pools are not used.
|
|
2616
|
+
* - `insertAsSibling` — insertion is always a same-position `replaceWith`; the
|
|
2617
|
+
* container-append path is never taken.
|
|
2618
|
+
* - `primaryAction` — a Liveboard/AppEmbed-specific feature; the renderer renders
|
|
2619
|
+
* whatever route the MCP server specifies.
|
|
2620
|
+
* - `enableV2Shell_experimental` — the renderer always uses the v2 URL format;
|
|
2621
|
+
* this flag has no effect.
|
|
2622
|
+
*/
|
|
2623
|
+
export type AutoMCPFrameRendererViewConfig = Omit<BaseViewConfig, "preRenderId" | "usePrerenderedIfAvailable" | "doNotTrackPreRenderSize" | "insertAsSibling" | "primaryAction" | "enableV2Shell_experimental">;
|
|
2455
2624
|
/**
|
|
2456
2625
|
* The configuration object for Home page embeds configs.
|
|
2457
2626
|
*/
|
|
@@ -3396,38 +3565,54 @@ export enum EmbedEvent {
|
|
|
3396
3565
|
*/
|
|
3397
3566
|
VizPointClick = "vizPointClick",
|
|
3398
3567
|
/**
|
|
3399
|
-
*
|
|
3568
|
+
* Fired when an error occurs in the embedded component.
|
|
3400
3569
|
*
|
|
3570
|
+
* **Important:** This event fires for many reasons — including internal
|
|
3571
|
+
* validation warnings (e.g. `HOST_EVENT_VALIDATION`), configuration issues,
|
|
3572
|
+
* and transient errors that ThoughtSpot already handles gracefully inside the
|
|
3573
|
+
* iframe. **Do not call `embed.destroy()` or unmount the embed component on
|
|
3574
|
+
* every error.** Doing so will tear down the iframe and abort all in-flight
|
|
3575
|
+
* requests, causing the embed to fail entirely.
|
|
3576
|
+
*
|
|
3577
|
+
* Only treat the following codes as unrecoverable:
|
|
3578
|
+
* - `INIT_ERROR` — SDK was not initialised before render
|
|
3579
|
+
* - `LOGIN_FAILED` — authentication could not be completed
|
|
3580
|
+
*
|
|
3581
|
+
* All other error codes should be logged and inspected, not acted upon
|
|
3582
|
+
* destructively.
|
|
3583
|
+
*
|
|
3584
|
+
* **Note:** There is currently no dedicated event for a true unrecoverable
|
|
3585
|
+
* crash. A future `EmbedEvent.FatalError` event is planned to give customers
|
|
3586
|
+
* a clean signal for when the embed cannot recover and needs to be torn down.
|
|
3587
|
+
*
|
|
3588
|
+
* Error types include:
|
|
3401
3589
|
* `API` - API call failure.
|
|
3402
|
-
* `FULLSCREEN` - Error when presenting a Liveboard
|
|
3403
|
-
*
|
|
3404
|
-
* filter. `NON_EXIST_FILTER` - Error due to a non-existent filter.
|
|
3405
|
-
* `INVALID_DATE_VALUE` - Invalid date value error.
|
|
3406
|
-
* `INVALID_OPERATOR` - Use of invalid operator during filter application.
|
|
3590
|
+
* `FULLSCREEN` - Error when presenting a Liveboard in full screen mode.
|
|
3591
|
+
* `VALIDATION_ERROR` - Internal host event or configuration validation warning.
|
|
3407
3592
|
*
|
|
3408
3593
|
* For more information, see https://developers.thoughtspot.com/docs/events-app-integration#errorType
|
|
3409
3594
|
* @returns error - An error object or message
|
|
3410
3595
|
* @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
|
|
3411
3596
|
* @example
|
|
3412
3597
|
* ```js
|
|
3413
|
-
* //
|
|
3414
|
-
*
|
|
3415
|
-
*
|
|
3416
|
-
*
|
|
3417
|
-
*
|
|
3598
|
+
* // Recommended pattern — only destroy on truly fatal errors
|
|
3599
|
+
* embed.on(EmbedEvent.Error, (error) => {
|
|
3600
|
+
* const FATAL_CODES = ['INIT_ERROR', 'LOGIN_FAILED'];
|
|
3601
|
+
* if (FATAL_CODES.includes(error.data?.code)) {
|
|
3602
|
+
* embed.destroy();
|
|
3603
|
+
* return;
|
|
3604
|
+
* }
|
|
3605
|
+
* // Log all other errors — do not destroy
|
|
3606
|
+
* console.warn('Embed error (non-fatal):', error);
|
|
3418
3607
|
* });
|
|
3419
3608
|
* ```
|
|
3420
3609
|
* @example
|
|
3421
3610
|
* ```js
|
|
3422
|
-
* //
|
|
3423
|
-
*
|
|
3611
|
+
* // API error
|
|
3612
|
+
* SearchEmbed.on(EmbedEvent.Error, (error) => {
|
|
3424
3613
|
* console.log(error);
|
|
3425
|
-
* // {
|
|
3426
|
-
*
|
|
3427
|
-
* // stack: "..."
|
|
3428
|
-
* // } }}
|
|
3429
|
-
* // { errorType: "FULLSCREEN", message: "Fullscreen API is not enabled", code: '...' } new format
|
|
3430
|
-
* })
|
|
3614
|
+
* // { errorType: "API", message: '...', code: '...' }
|
|
3615
|
+
* });
|
|
3431
3616
|
* ```
|
|
3432
3617
|
*/
|
|
3433
3618
|
Error = "Error",
|
|
@@ -4628,7 +4813,103 @@ export enum EmbedEvent {
|
|
|
4628
4813
|
* ```
|
|
4629
4814
|
* @version SDK: 1.48.0 | ThoughtSpot Cloud: 26.5.0.cl
|
|
4630
4815
|
*/
|
|
4631
|
-
SendTestScheduleEmail = "sendTestScheduleEmail"
|
|
4816
|
+
SendTestScheduleEmail = "sendTestScheduleEmail",
|
|
4817
|
+
/**
|
|
4818
|
+
* Emitted when the SpotterViz panel mounts in embed mode.
|
|
4819
|
+
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
4820
|
+
* @example
|
|
4821
|
+
* ```js
|
|
4822
|
+
* liveboardEmbed.on(EmbedEvent.SpotterVizInit, (payload) => {
|
|
4823
|
+
* console.log('SpotterViz initialized', payload);
|
|
4824
|
+
* // payload: { liveboardId: string }
|
|
4825
|
+
* })
|
|
4826
|
+
* ```
|
|
4827
|
+
*/
|
|
4828
|
+
SpotterVizInit = "SpotterVizInit",
|
|
4829
|
+
/**
|
|
4830
|
+
* Emitted when the user submits a prompt in the SpotterViz panel.
|
|
4831
|
+
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
4832
|
+
* @example
|
|
4833
|
+
* ```js
|
|
4834
|
+
* liveboardEmbed.on(EmbedEvent.SpotterVizQueryTriggered, (payload) => {
|
|
4835
|
+
* console.log('SpotterViz query triggered', payload);
|
|
4836
|
+
* // payload: { query: string, sessionId: string }
|
|
4837
|
+
* })
|
|
4838
|
+
* ```
|
|
4839
|
+
*/
|
|
4840
|
+
SpotterVizQueryTriggered = "SpotterVizQueryTriggered",
|
|
4841
|
+
/**
|
|
4842
|
+
* Emitted when the SpotterViz agent finishes responding.
|
|
4843
|
+
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
4844
|
+
* @example
|
|
4845
|
+
* ```js
|
|
4846
|
+
* liveboardEmbed.on(EmbedEvent.SpotterVizResponseComplete, (payload) => {
|
|
4847
|
+
* console.log('SpotterViz response complete', payload);
|
|
4848
|
+
* // payload: { sessionId: string, messageId: string }
|
|
4849
|
+
* })
|
|
4850
|
+
* ```
|
|
4851
|
+
*/
|
|
4852
|
+
SpotterVizResponseComplete = "SpotterVizResponseComplete",
|
|
4853
|
+
/**
|
|
4854
|
+
* Emitted when a checkpoint is created in the SpotterViz panel.
|
|
4855
|
+
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
4856
|
+
* @example
|
|
4857
|
+
* ```js
|
|
4858
|
+
* liveboardEmbed.on(EmbedEvent.SpotterVizCheckpointCreated, (payload) => {
|
|
4859
|
+
* console.log('SpotterViz checkpoint created', payload);
|
|
4860
|
+
* // payload: { checkpointId: string, source: string, label: string }
|
|
4861
|
+
* })
|
|
4862
|
+
* ```
|
|
4863
|
+
*/
|
|
4864
|
+
SpotterVizCheckpointCreated = "SpotterVizCheckpointCreated",
|
|
4865
|
+
/**
|
|
4866
|
+
* Emitted when a checkpoint is restored in the SpotterViz panel.
|
|
4867
|
+
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
4868
|
+
* @example
|
|
4869
|
+
* ```js
|
|
4870
|
+
* liveboardEmbed.on(EmbedEvent.SpotterVizCheckpointRestored, (payload) => {
|
|
4871
|
+
* console.log('SpotterViz checkpoint restored', payload);
|
|
4872
|
+
* // payload: { checkpointId: string, newGenNumber: number }
|
|
4873
|
+
* })
|
|
4874
|
+
* ```
|
|
4875
|
+
*/
|
|
4876
|
+
SpotterVizCheckpointRestored = "SpotterVizCheckpointRestored",
|
|
4877
|
+
/**
|
|
4878
|
+
* Emitted when an error occurs in the SpotterViz panel.
|
|
4879
|
+
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
4880
|
+
* @example
|
|
4881
|
+
* ```js
|
|
4882
|
+
* liveboardEmbed.on(EmbedEvent.SpotterVizError, (payload) => {
|
|
4883
|
+
* console.log('SpotterViz error', payload);
|
|
4884
|
+
* })
|
|
4885
|
+
* ```
|
|
4886
|
+
*/
|
|
4887
|
+
SpotterVizError = "SpotterVizError",
|
|
4888
|
+
/**
|
|
4889
|
+
* Emitted when the SpotterViz panel is closed.
|
|
4890
|
+
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
4891
|
+
* @example
|
|
4892
|
+
* ```js
|
|
4893
|
+
* liveboardEmbed.on(EmbedEvent.SpotterVizClosed, (payload) => {
|
|
4894
|
+
* console.log('SpotterViz panel closed', payload);
|
|
4895
|
+
* })
|
|
4896
|
+
* ```
|
|
4897
|
+
*/
|
|
4898
|
+
SpotterVizClosed = "SpotterVizClosed",
|
|
4899
|
+
/**
|
|
4900
|
+
* Emitted when a user clicks the **Refresh** button in the
|
|
4901
|
+
* Liveboard header. Requires `enableLiveboardDataCache`
|
|
4902
|
+
* to be enabled.
|
|
4903
|
+
* @example
|
|
4904
|
+
* ```js
|
|
4905
|
+
* liveboardEmbed.on(EmbedEvent.RefreshLiveboardBrowserCache, (payload) => {
|
|
4906
|
+
* console.log('Liveboard browser cache refreshed', payload);
|
|
4907
|
+
* // payload: { liveboardId: string }
|
|
4908
|
+
* })
|
|
4909
|
+
* ```
|
|
4910
|
+
* @version SDK: 1.49.0 | ThoughtSpot Cloud: 26.6.0.cl
|
|
4911
|
+
*/
|
|
4912
|
+
RefreshLiveboardBrowserCache = "refreshLiveboardBrowserCache"
|
|
4632
4913
|
}
|
|
4633
4914
|
/**
|
|
4634
4915
|
* Event types that can be triggered by the host application
|
|
@@ -6698,7 +6979,38 @@ export enum HostEvent {
|
|
|
6698
6979
|
* ```
|
|
6699
6980
|
* @version SDK: 1.48.0 | ThoughtSpot Cloud: 26.5.0.cl
|
|
6700
6981
|
*/
|
|
6701
|
-
SendTestScheduleEmail = "sendTestScheduleEmail"
|
|
6982
|
+
SendTestScheduleEmail = "sendTestScheduleEmail",
|
|
6983
|
+
/**
|
|
6984
|
+
* Sends a user message (prompt) to the SpotterViz panel programmatically.
|
|
6985
|
+
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
6986
|
+
* @param query - the prompt text to send.
|
|
6987
|
+
* @example
|
|
6988
|
+
* ```js
|
|
6989
|
+
* liveboardEmbed.trigger(HostEvent.SpotterVizSendUserMessage, {
|
|
6990
|
+
* query: 'Show me revenue by region',
|
|
6991
|
+
* });
|
|
6992
|
+
* ```
|
|
6993
|
+
*/
|
|
6994
|
+
SpotterVizSendUserMessage = "SpotterVizSendUserMessage",
|
|
6995
|
+
/**
|
|
6996
|
+
* Initializes a new SpotterViz conversation.
|
|
6997
|
+
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
6998
|
+
* @example
|
|
6999
|
+
* ```js
|
|
7000
|
+
* liveboardEmbed.trigger(HostEvent.InitSpotterVizConversation);
|
|
7001
|
+
* ```
|
|
7002
|
+
*/
|
|
7003
|
+
InitSpotterVizConversation = "InitSpotterVizConversation",
|
|
7004
|
+
/**
|
|
7005
|
+
* Clears browser cache and fetches new data for liveboard ChartViz Containers.
|
|
7006
|
+
* Requires `enableLiveboardDataCache` to be enabled.
|
|
7007
|
+
* @example
|
|
7008
|
+
* ```js
|
|
7009
|
+
* liveboardEmbed.trigger(HostEvent.RefreshLiveboardBrowserCache);
|
|
7010
|
+
* ```
|
|
7011
|
+
* @version SDK: 1.49.0 | ThoughtSpot Cloud: 26.6.0.cl
|
|
7012
|
+
*/
|
|
7013
|
+
RefreshLiveboardBrowserCache = "refreshLiveboardBrowserCache"
|
|
6702
7014
|
}
|
|
6703
7015
|
/**
|
|
6704
7016
|
* The different visual modes that the data sources panel within
|
|
@@ -6718,6 +7030,13 @@ export enum DataSourceVisualMode {
|
|
|
6718
7030
|
*/
|
|
6719
7031
|
Expanded = "expand"
|
|
6720
7032
|
}
|
|
7033
|
+
/**
|
|
7034
|
+
* Configuration for allowed file types in Spotter file upload.
|
|
7035
|
+
* @group Embed components
|
|
7036
|
+
*/
|
|
7037
|
+
export type SpotterFileUploadFileTypes = {
|
|
7038
|
+
types?: string[];
|
|
7039
|
+
};
|
|
6721
7040
|
/**
|
|
6722
7041
|
* ThoughtSpot application pages include actions and menu commands
|
|
6723
7042
|
* for various user-initiated operations. These actions are represented
|
|
@@ -7054,6 +7373,20 @@ export enum Action {
|
|
|
7054
7373
|
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
7055
7374
|
*/
|
|
7056
7375
|
DownloadLiveboardAsContinuousPDF = "downloadLiveboardAsContinuousPDF",
|
|
7376
|
+
/**
|
|
7377
|
+
* The Download Liveboard as A4 PDF menu action on a Liveboard.
|
|
7378
|
+
* Allows downloading the entire Liveboard as an A4 PDF.
|
|
7379
|
+
* Requires {@link Action.DownloadLiveboard} as a parent action when
|
|
7380
|
+
* {@link LiveboardViewConfig.isLiveboardXLSXCSVDownloadEnabled} or
|
|
7381
|
+
* {@link LiveboardViewConfig.isContinuousLiveboardPDFEnabled} flags are enabled.
|
|
7382
|
+
* Use this instead of {@link Action.DownloadAsPdf} when either flag is on.
|
|
7383
|
+
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
7384
|
+
* @example
|
|
7385
|
+
* ```js
|
|
7386
|
+
* disabledActions: [Action.DownloadLiveboardAsA4Pdf]
|
|
7387
|
+
* ```
|
|
7388
|
+
*/
|
|
7389
|
+
DownloadLiveboardAsA4Pdf = "downloadLiveboardAsA4Pdf",
|
|
7057
7390
|
/**
|
|
7058
7391
|
* The **Download Liveboard as XLSX** menu action on a Liveboard.
|
|
7059
7392
|
* Allows downloading the entire Liveboard as an XLSX file.
|
|
@@ -8365,7 +8698,51 @@ export enum Action {
|
|
|
8365
8698
|
* ```
|
|
8366
8699
|
* @version SDK: 1.48.0 | ThoughtSpot Cloud: 26.5.0.cl
|
|
8367
8700
|
*/
|
|
8368
|
-
SendTestScheduleEmail = "sendTestScheduleEmail"
|
|
8701
|
+
SendTestScheduleEmail = "sendTestScheduleEmail",
|
|
8702
|
+
/**
|
|
8703
|
+
* The thumbs up/down feedback buttons in the SpotterViz panel.
|
|
8704
|
+
* Visible by default.
|
|
8705
|
+
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
8706
|
+
* @example
|
|
8707
|
+
* ```js
|
|
8708
|
+
* hiddenActions: [Action.SpotterVizFeedback]
|
|
8709
|
+
* disabledActions: [Action.SpotterVizFeedback]
|
|
8710
|
+
* ```
|
|
8711
|
+
*/
|
|
8712
|
+
SpotterVizFeedback = "spotterVizFeedback",
|
|
8713
|
+
/**
|
|
8714
|
+
* The version restore button on checkpoint cards in the SpotterViz panel.
|
|
8715
|
+
* Visible by default.
|
|
8716
|
+
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
8717
|
+
* @example
|
|
8718
|
+
* ```js
|
|
8719
|
+
* hiddenActions: [Action.SpotterVizCheckpointRestore]
|
|
8720
|
+
* disabledActions: [Action.SpotterVizCheckpointRestore]
|
|
8721
|
+
* ```
|
|
8722
|
+
*/
|
|
8723
|
+
SpotterVizCheckpointRestore = "spotterVizCheckpointRestore",
|
|
8724
|
+
/**
|
|
8725
|
+
* The **SpotterViz** button in the top edit header.
|
|
8726
|
+
* Visible by default.
|
|
8727
|
+
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
8728
|
+
* @example
|
|
8729
|
+
* ```js
|
|
8730
|
+
* hiddenActions: [Action.SpotterViz]
|
|
8731
|
+
* disabledActions: [Action.SpotterViz]
|
|
8732
|
+
* ```
|
|
8733
|
+
*/
|
|
8734
|
+
SpotterViz = "spotterViz",
|
|
8735
|
+
/**
|
|
8736
|
+
* Clears browser cache and fetches new data for liveboard ChartViz Containers.
|
|
8737
|
+
* Requires `enableLiveboardDataCache` to be enabled.
|
|
8738
|
+
* @example
|
|
8739
|
+
* ```js
|
|
8740
|
+
* disabledActions: [Action.RefreshLiveboardBrowserCache]
|
|
8741
|
+
* hiddenActions: [Action.RefreshLiveboardBrowserCache]
|
|
8742
|
+
* ```
|
|
8743
|
+
* @version SDK: 1.49.0 | ThoughtSpot Cloud: 26.6.0.cl
|
|
8744
|
+
*/
|
|
8745
|
+
RefreshLiveboardBrowserCache = "refreshLiveboardBrowserCache"
|
|
8369
8746
|
}
|
|
8370
8747
|
export enum PrefetchFeatures {
|
|
8371
8748
|
FullApp = "FullApp",
|
|
@@ -9596,7 +9973,7 @@ class TsEmbed {
|
|
|
9596
9973
|
/**
|
|
9597
9974
|
* The DOM node where the ThoughtSpot app is to be embedded.
|
|
9598
9975
|
*/
|
|
9599
|
-
protected
|
|
9976
|
+
protected hostElement: HTMLElement;
|
|
9600
9977
|
/**
|
|
9601
9978
|
* The key to store the embed instance in the DOM node
|
|
9602
9979
|
*/
|
|
@@ -9652,6 +10029,7 @@ class TsEmbed {
|
|
|
9652
10029
|
private resizeObserver;
|
|
9653
10030
|
protected hostEventClient: HostEventClient;
|
|
9654
10031
|
protected isReadyForRenderPromise: Promise<void>;
|
|
10032
|
+
protected shouldWaitForRenderPromise: boolean;
|
|
9655
10033
|
/**
|
|
9656
10034
|
* Handler for fullscreen change events
|
|
9657
10035
|
*/
|
|
@@ -9785,6 +10163,10 @@ class TsEmbed {
|
|
|
9785
10163
|
protected getEmbedParamsObject(): Record<any, any>;
|
|
9786
10164
|
protected getRootIframeSrc(): string;
|
|
9787
10165
|
protected createIframeEl(frameSrc: string): HTMLIFrameElement;
|
|
10166
|
+
/**
|
|
10167
|
+
* Returns true if this embed instance is configured for pre-rendering.
|
|
10168
|
+
*/
|
|
10169
|
+
protected isPreRenderEmbed(): boolean;
|
|
9788
10170
|
protected handleInsertionIntoDOM(child: string | Node): void;
|
|
9789
10171
|
/**
|
|
9790
10172
|
* Renders the embedded ThoughtSpot app in an iframe and sets up
|
|
@@ -9795,9 +10177,23 @@ class TsEmbed {
|
|
|
9795
10177
|
protected createPreRenderWrapper(): HTMLDivElement;
|
|
9796
10178
|
protected preRenderWrapper: HTMLElement;
|
|
9797
10179
|
protected preRenderChild: HTMLElement;
|
|
10180
|
+
/**
|
|
10181
|
+
* Checks for an existing pre-rendered component and connects to it.
|
|
10182
|
+
*
|
|
10183
|
+
* If a matching pre-rendered component is found in the DOM, this method
|
|
10184
|
+
* sets the internal properties of the embed object to reference it.
|
|
10185
|
+
*
|
|
10186
|
+
* @returns True if a connection was successfully established, false otherwise.
|
|
10187
|
+
*/
|
|
9798
10188
|
protected connectPreRendered(): boolean;
|
|
9799
|
-
protected
|
|
10189
|
+
protected isPreRenderConnected(): boolean;
|
|
9800
10190
|
protected createPreRenderChild(child: string | Node): HTMLElement;
|
|
10191
|
+
/**
|
|
10192
|
+
* Creates the in-flow placeholder div inserted into the host element when
|
|
10193
|
+
* showPreRender() is called. The wrapper observes this element to stay
|
|
10194
|
+
* aligned with the host layout.
|
|
10195
|
+
*/
|
|
10196
|
+
private createPreRenderPlaceholder;
|
|
9801
10197
|
protected insertIntoDOMForPreRender(child: string | Node): void;
|
|
9802
10198
|
private showPreRenderByDefault;
|
|
9803
10199
|
protected insertIntoDOM(child: string | Node): void;
|
|
@@ -9894,10 +10290,10 @@ class TsEmbed {
|
|
|
9894
10290
|
*/
|
|
9895
10291
|
private triggerEventOnPort;
|
|
9896
10292
|
/**
|
|
9897
|
-
|
|
9898
|
-
|
|
9899
|
-
|
|
9900
|
-
|
|
10293
|
+
* @hidden
|
|
10294
|
+
* Internal state to track if the embed container is loaded.
|
|
10295
|
+
* This is used to trigger events after the embed container is loaded.
|
|
10296
|
+
*/
|
|
9901
10297
|
isEmbedContainerLoaded: boolean;
|
|
9902
10298
|
/**
|
|
9903
10299
|
* @hidden
|
|
@@ -9954,33 +10350,33 @@ class TsEmbed {
|
|
|
9954
10350
|
getIframeSrc(): string;
|
|
9955
10351
|
protected handleRenderForPrerender(): Promise<TsEmbed>;
|
|
9956
10352
|
/**
|
|
9957
|
-
|
|
9958
|
-
|
|
9959
|
-
|
|
9960
|
-
|
|
9961
|
-
|
|
9962
|
-
|
|
9963
|
-
|
|
9964
|
-
|
|
9965
|
-
|
|
9966
|
-
|
|
9967
|
-
|
|
9968
|
-
|
|
9969
|
-
|
|
9970
|
-
|
|
9971
|
-
|
|
9972
|
-
|
|
9973
|
-
|
|
9974
|
-
|
|
9975
|
-
|
|
9976
|
-
|
|
9977
|
-
|
|
9978
|
-
|
|
9979
|
-
|
|
9980
|
-
|
|
9981
|
-
|
|
9982
|
-
|
|
9983
|
-
|
|
10353
|
+
* Context object for the embedded component.
|
|
10354
|
+
* @returns {ContextObject} The current context object containing the page type and object ids.
|
|
10355
|
+
* @example
|
|
10356
|
+
* ```js
|
|
10357
|
+
* const context = await embed.getCurrentContext();
|
|
10358
|
+
* console.log(context);
|
|
10359
|
+
*
|
|
10360
|
+
* // Example output
|
|
10361
|
+
* {
|
|
10362
|
+
* stack: [
|
|
10363
|
+
* {
|
|
10364
|
+
* name: 'Liveboard',
|
|
10365
|
+
* type: ContextType.Liveboard,
|
|
10366
|
+
* objectIds: {
|
|
10367
|
+
* liveboardId: '123',
|
|
10368
|
+
* },
|
|
10369
|
+
* },
|
|
10370
|
+
* ],
|
|
10371
|
+
* currentContext: {
|
|
10372
|
+
* name: 'Liveboard',
|
|
10373
|
+
* type: ContextType.Liveboard,
|
|
10374
|
+
* objectIds: {
|
|
10375
|
+
* liveboardId: '123',
|
|
10376
|
+
* },
|
|
10377
|
+
* },
|
|
10378
|
+
* }
|
|
10379
|
+
* ```
|
|
9984
10380
|
* @version SDK: 1.45.2 | ThoughtSpot: 26.3.0.cl
|
|
9985
10381
|
*/
|
|
9986
10382
|
getCurrentContext(): Promise<ContextObject>;
|
|
@@ -10025,14 +10421,14 @@ class TsEmbed {
|
|
|
10025
10421
|
*/
|
|
10026
10422
|
prerenderGeneric(): Promise<any>;
|
|
10027
10423
|
protected beforePrerenderVisible(): void;
|
|
10028
|
-
private validatePreRenderViewConfig;
|
|
10029
10424
|
/**
|
|
10030
|
-
* Displays the
|
|
10031
|
-
* If the component
|
|
10032
|
-
*
|
|
10033
|
-
*
|
|
10425
|
+
* Displays the pre-rendered component inside the host element.
|
|
10426
|
+
* If the component has not been pre-rendered yet, it initiates rendering first.
|
|
10427
|
+
* Inserts a placeholder element into the host and positions the pre-render
|
|
10428
|
+
* wrapper to overlay it.
|
|
10034
10429
|
*/
|
|
10035
10430
|
showPreRender(): Promise<TsEmbed>;
|
|
10431
|
+
protected getPreRenderPlaceHolderElement(): HTMLDivElement;
|
|
10036
10432
|
/**
|
|
10037
10433
|
* Synchronizes the style properties of the PreRender component with the embedding
|
|
10038
10434
|
* element. This function adjusts the position, width, and height of the PreRender
|
|
@@ -10057,6 +10453,7 @@ class TsEmbed {
|
|
|
10057
10453
|
getPreRenderIds(): {
|
|
10058
10454
|
wrapper: string;
|
|
10059
10455
|
child: string;
|
|
10456
|
+
placeHolder: string;
|
|
10060
10457
|
};
|
|
10061
10458
|
/**
|
|
10062
10459
|
* Returns the answerService which can be used to make arbitrary graphql calls on top
|
|
@@ -10214,6 +10611,21 @@ export interface SpotterChatViewConfig {
|
|
|
10214
10611
|
* External MCP tool branding is not affected.
|
|
10215
10612
|
*/
|
|
10216
10613
|
toolResponseCardBrandingLabel?: string;
|
|
10614
|
+
/**
|
|
10615
|
+
* Enables file upload in the Spotter chat interface.
|
|
10616
|
+
*
|
|
10617
|
+
* Supported embed types: `SpotterEmbed`, `LiveboardEmbed`, `AppEmbed`
|
|
10618
|
+
* @version SDK: 1.49.0 | ThoughtSpot: 26.6.0.cl
|
|
10619
|
+
* @default false
|
|
10620
|
+
*/
|
|
10621
|
+
spotterFileUploadEnabled?: boolean;
|
|
10622
|
+
/**
|
|
10623
|
+
* Restricts the allowed file types for Spotter file upload.
|
|
10624
|
+
*
|
|
10625
|
+
* Supported embed types: `SpotterEmbed`, `LiveboardEmbed`, `AppEmbed`
|
|
10626
|
+
* @version SDK: 1.49.0 | ThoughtSpot: 26.6.0.cl
|
|
10627
|
+
*/
|
|
10628
|
+
spotterFileUploadFileTypes?: SpotterFileUploadFileTypes;
|
|
10217
10629
|
}
|
|
10218
10630
|
/**
|
|
10219
10631
|
* The configuration for the embedded spotterEmbed options.
|
|
@@ -10517,6 +10929,82 @@ export class ConversationEmbed extends SpotterEmbed {
|
|
|
10517
10929
|
protected viewConfig: ConversationViewConfig;
|
|
10518
10930
|
constructor(container: HTMLElement, viewConfig: ConversationViewConfig);
|
|
10519
10931
|
}
|
|
10932
|
+
/**
|
|
10933
|
+
* Defines starter prompts displayed in the SpotterViz interface.
|
|
10934
|
+
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
10935
|
+
* @group Embed components
|
|
10936
|
+
*/
|
|
10937
|
+
export interface SpotterVizStarterPrompt {
|
|
10938
|
+
/** Identifier for the prompt. */
|
|
10939
|
+
id: string;
|
|
10940
|
+
/** Short label shown to the user as a clickable suggestion. */
|
|
10941
|
+
displayText: string;
|
|
10942
|
+
/** Full prompt text sent to Spotter when the user clicks the suggestion. */
|
|
10943
|
+
fullPrompt: string;
|
|
10944
|
+
}
|
|
10945
|
+
/**
|
|
10946
|
+
* Configuration for the SpotterViz interface shown on the Liveboard.
|
|
10947
|
+
* Supported embed types: `AppEmbed`, `LiveboardEmbed`
|
|
10948
|
+
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
10949
|
+
* @group Embed components
|
|
10950
|
+
* @example
|
|
10951
|
+
* ```js
|
|
10952
|
+
* const embed = new AppEmbed('#embed-container', {
|
|
10953
|
+
* ... // other options,
|
|
10954
|
+
* spotterViz: {
|
|
10955
|
+
* brandName: 'MyBrand',
|
|
10956
|
+
* brandHeadline: 'Hi, there! I\'m',
|
|
10957
|
+
* description: 'Ask questions about your data',
|
|
10958
|
+
* inputChatPlaceholder: 'Ask a question...',
|
|
10959
|
+
* hideStarterPrompts: false,
|
|
10960
|
+
* customStarterPrompts: [
|
|
10961
|
+
* { id: '1', displayText: 'Top products', fullPrompt: 'What are the top products by revenue?' }
|
|
10962
|
+
* ],
|
|
10963
|
+
* },
|
|
10964
|
+
* })
|
|
10965
|
+
* ```
|
|
10966
|
+
*/
|
|
10967
|
+
export interface SpotterVizConfig {
|
|
10968
|
+
/**
|
|
10969
|
+
* Rename the default "SpotterViz" label shown in the SpotterViz interface with a custom brand name.
|
|
10970
|
+
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
10971
|
+
* @default ''
|
|
10972
|
+
*/
|
|
10973
|
+
brandName?: string;
|
|
10974
|
+
/**
|
|
10975
|
+
* Custom headline text shown before the brand name in the SpotterViz interface.
|
|
10976
|
+
* Replaces the default greeting prefix (e.g. "Hi, there! I'm").
|
|
10977
|
+
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
10978
|
+
* @default ''
|
|
10979
|
+
*/
|
|
10980
|
+
brandHeadline?: string;
|
|
10981
|
+
/**
|
|
10982
|
+
* Hides the starter prompts section entirely in the SpotterViz interface.
|
|
10983
|
+
* When set to `true`, the starter prompts are not displayed.
|
|
10984
|
+
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
10985
|
+
* @default false
|
|
10986
|
+
*/
|
|
10987
|
+
hideStarterPrompts?: boolean;
|
|
10988
|
+
/**
|
|
10989
|
+
* Overrides the starter prompts with a custom list.
|
|
10990
|
+
* Each entry must match the {@link SpotterVizStarterPrompt} shape.
|
|
10991
|
+
* Has no effect when `hideStarterPrompts` is `true`.
|
|
10992
|
+
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
10993
|
+
*/
|
|
10994
|
+
customStarterPrompts?: SpotterVizStarterPrompt[];
|
|
10995
|
+
/**
|
|
10996
|
+
* Custom description text shown in the SpotterViz interface.
|
|
10997
|
+
* Replaces the default SpotterViz description.
|
|
10998
|
+
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
10999
|
+
*/
|
|
11000
|
+
description?: string;
|
|
11001
|
+
/**
|
|
11002
|
+
* Custom placeholder text for the chat input in the SpotterViz interface.
|
|
11003
|
+
* Replaces the default chat input placeholder text.
|
|
11004
|
+
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
11005
|
+
*/
|
|
11006
|
+
inputChatPlaceholder?: string;
|
|
11007
|
+
}
|
|
10520
11008
|
/**
|
|
10521
11009
|
* Pages within the ThoughtSpot app that can be embedded.
|
|
10522
11010
|
*/
|
|
@@ -10603,7 +11091,15 @@ export enum HomePage {
|
|
|
10603
11091
|
* ModularWithStylingChanges (v3) introduces Modular Home Experience
|
|
10604
11092
|
* with styling changes.
|
|
10605
11093
|
*/
|
|
10606
|
-
ModularWithStylingChanges = "v3"
|
|
11094
|
+
ModularWithStylingChanges = "v3",
|
|
11095
|
+
/**
|
|
11096
|
+
* Focused (v4) introduces the V4 homepage experience
|
|
11097
|
+
* in which Watchlist and recents and incorporated together
|
|
11098
|
+
* to form a more focused homepage.
|
|
11099
|
+
* Pre-requisite : spotter enablement
|
|
11100
|
+
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
11101
|
+
*/
|
|
11102
|
+
Focused = "v4"
|
|
10607
11103
|
}
|
|
10608
11104
|
/**
|
|
10609
11105
|
* Define the version of the list page
|
|
@@ -11035,6 +11531,21 @@ export interface AppViewConfig extends AllEmbedViewConfig {
|
|
|
11035
11531
|
* ```
|
|
11036
11532
|
*/
|
|
11037
11533
|
isUnifiedSearchExperienceEnabled?: boolean;
|
|
11534
|
+
/**
|
|
11535
|
+
* This flag is used to enable the new connection experience for AppEmbed.
|
|
11536
|
+
*
|
|
11537
|
+
* Supported embed types: `AppEmbed`
|
|
11538
|
+
* @version SDK: 1.51.0 | ThoughtSpot Cloud: 26.8.0.cl
|
|
11539
|
+
* @default false
|
|
11540
|
+
* @example
|
|
11541
|
+
* ```js
|
|
11542
|
+
* const embed = new AppEmbed('#tsEmbed', {
|
|
11543
|
+
* ... // other embed view config
|
|
11544
|
+
* newConnectionsExperience: true,
|
|
11545
|
+
* })
|
|
11546
|
+
* ```
|
|
11547
|
+
*/
|
|
11548
|
+
newConnectionsExperience?: boolean;
|
|
11038
11549
|
/**
|
|
11039
11550
|
* This flag is used to enable/disable the styling and grouping in a Liveboard. Use {@link isLiveboardMasterpiecesEnabled} instead.
|
|
11040
11551
|
* @deprecated This flag is deprecated.
|
|
@@ -11135,6 +11646,17 @@ export interface AppViewConfig extends AllEmbedViewConfig {
|
|
|
11135
11646
|
* ```
|
|
11136
11647
|
*/
|
|
11137
11648
|
lazyLoadingForFullHeight?: boolean;
|
|
11649
|
+
/**
|
|
11650
|
+
* This flag is used to enable container-aware full height lazy loading.
|
|
11651
|
+
*
|
|
11652
|
+
* Use this when the embed is rendered inside a scrollable or clipping
|
|
11653
|
+
* container instead of relying on the browser window as the only viewport.
|
|
11654
|
+
*
|
|
11655
|
+
* @type {boolean}
|
|
11656
|
+
* @default false
|
|
11657
|
+
* @hidden
|
|
11658
|
+
*/
|
|
11659
|
+
enableScrollableContainerLazyLoading?: boolean;
|
|
11138
11660
|
/**
|
|
11139
11661
|
* The margin to be used for lazy loading.
|
|
11140
11662
|
*
|
|
@@ -11221,6 +11743,29 @@ export interface AppViewConfig extends AllEmbedViewConfig {
|
|
|
11221
11743
|
* ```
|
|
11222
11744
|
*/
|
|
11223
11745
|
spotterChatConfig?: SpotterChatViewConfig;
|
|
11746
|
+
/**
|
|
11747
|
+
* Configuration for the SpotterViz interface shown on the Liveboard.
|
|
11748
|
+
* Customize the brand name, description, chat input placeholder,
|
|
11749
|
+
* starter prompts, and visibility of starter prompts in the SpotterViz panel.
|
|
11750
|
+
*
|
|
11751
|
+
* Supported embed types: `AppEmbed`, `LiveboardEmbed`
|
|
11752
|
+
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
11753
|
+
* @example
|
|
11754
|
+
* ```js
|
|
11755
|
+
* const embed = new AppEmbed('#embed-container', {
|
|
11756
|
+
* ... // other options
|
|
11757
|
+
* spotterViz: {
|
|
11758
|
+
* brandName: 'MyBrand',
|
|
11759
|
+
* brandHeadline: 'Hi, there! I\'m',
|
|
11760
|
+
* description: 'Ask questions about your data',
|
|
11761
|
+
* inputChatPlaceholder: 'Ask a question...',
|
|
11762
|
+
* hideStarterPrompts: false,
|
|
11763
|
+
* customStarterPrompts: [{ id: '1', displayText: 'Top products', fullPrompt: 'What are the top products by revenue?' }]
|
|
11764
|
+
* },
|
|
11765
|
+
* })
|
|
11766
|
+
* ```
|
|
11767
|
+
*/
|
|
11768
|
+
spotterViz?: SpotterVizConfig;
|
|
11224
11769
|
/**
|
|
11225
11770
|
* Enables the stop answer generation button in the Spotter embed UI,
|
|
11226
11771
|
* allowing users to interrupt an ongoing answer generation.
|
|
@@ -11289,6 +11834,7 @@ export interface AppViewConfig extends AllEmbedViewConfig {
|
|
|
11289
11834
|
export interface AppEmbedAppInitData extends DefaultAppInitData {
|
|
11290
11835
|
embedParams?: {
|
|
11291
11836
|
spotterSidebarConfig?: SpotterSidebarViewConfig;
|
|
11837
|
+
spotterVizConfig?: SpotterVizConfig;
|
|
11292
11838
|
};
|
|
11293
11839
|
}
|
|
11294
11840
|
/**
|
|
@@ -11298,6 +11844,8 @@ export interface AppEmbedAppInitData extends DefaultAppInitData {
|
|
|
11298
11844
|
export class AppEmbed extends V1Embed {
|
|
11299
11845
|
protected viewConfig: AppViewConfig;
|
|
11300
11846
|
private defaultHeight;
|
|
11847
|
+
private lazyLoadScrollContainers;
|
|
11848
|
+
private lazyLoadResizeObserver;
|
|
11301
11849
|
constructor(domSelector: DOMSelector, viewConfig: AppViewConfig);
|
|
11302
11850
|
/**
|
|
11303
11851
|
* Extends the default APP_INIT payload with `embedParams.spotterSidebarConfig`
|
|
@@ -11660,6 +12208,15 @@ export const exportTML: (data: exportTMLInput) => Promise<any>;
|
|
|
11660
12208
|
* @group Global methods
|
|
11661
12209
|
*/
|
|
11662
12210
|
export const reloadIframe: (iFrame: HTMLIFrameElement) => void;
|
|
12211
|
+
/**
|
|
12212
|
+
* APP_INIT data shape for LiveboardEmbed.
|
|
12213
|
+
* @internal
|
|
12214
|
+
*/
|
|
12215
|
+
export interface LiveboardEmbedAppInitData extends DefaultAppInitData {
|
|
12216
|
+
embedParams?: {
|
|
12217
|
+
spotterVizConfig?: SpotterVizConfig;
|
|
12218
|
+
};
|
|
12219
|
+
}
|
|
11663
12220
|
/**
|
|
11664
12221
|
* The configuration for the embedded Liveboard or visualization page view.
|
|
11665
12222
|
* @group Embed components
|
|
@@ -12078,6 +12635,16 @@ export interface LiveboardViewConfig extends BaseViewConfig, SearchLiveboardComm
|
|
|
12078
12635
|
* ```
|
|
12079
12636
|
*/
|
|
12080
12637
|
lazyLoadingForFullHeight?: boolean;
|
|
12638
|
+
/**
|
|
12639
|
+
* This flag is used to enable container-aware full height lazy loading.
|
|
12640
|
+
*
|
|
12641
|
+
* Use this when the embed is rendered inside a scrollable or clipping
|
|
12642
|
+
* container instead of relying on the browser window as the only viewport.
|
|
12643
|
+
*
|
|
12644
|
+
* @type {boolean}
|
|
12645
|
+
* @default false
|
|
12646
|
+
*/
|
|
12647
|
+
enableScrollableContainerLazyLoading?: boolean;
|
|
12081
12648
|
/**
|
|
12082
12649
|
* The margin to be used for lazy loading.
|
|
12083
12650
|
*
|
|
@@ -12159,6 +12726,29 @@ export interface LiveboardViewConfig extends BaseViewConfig, SearchLiveboardComm
|
|
|
12159
12726
|
* ```
|
|
12160
12727
|
*/
|
|
12161
12728
|
spotterChatConfig?: SpotterChatViewConfig;
|
|
12729
|
+
/**
|
|
12730
|
+
* Configuration for the SpotterViz interface shown on the Liveboard.
|
|
12731
|
+
* Customize the brand name, description, chat input placeholder,
|
|
12732
|
+
* starter prompts, and visibility of starter prompts in the SpotterViz panel.
|
|
12733
|
+
*
|
|
12734
|
+
* Supported embed types: `AppEmbed`, `LiveboardEmbed`
|
|
12735
|
+
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
12736
|
+
* @example
|
|
12737
|
+
* ```js
|
|
12738
|
+
* const embed = new LiveboardEmbed('#embed-container', {
|
|
12739
|
+
* ... // other options
|
|
12740
|
+
* spotterViz: {
|
|
12741
|
+
* brandName: 'MyBrand',
|
|
12742
|
+
* brandHeadline: 'Hi, there! I\'m',
|
|
12743
|
+
* description: 'Ask questions about your data',
|
|
12744
|
+
* inputChatPlaceholder: 'Ask a question...',
|
|
12745
|
+
* hideStarterPrompts: false,
|
|
12746
|
+
* customStarterPrompts: [{ id: '1', displayText: 'Top products', fullPrompt: 'What are the top products by revenue?' }],
|
|
12747
|
+
* },
|
|
12748
|
+
* })
|
|
12749
|
+
* ```
|
|
12750
|
+
*/
|
|
12751
|
+
spotterViz?: SpotterVizConfig;
|
|
12162
12752
|
/**
|
|
12163
12753
|
* If set to true, enables visualization data caching on the Liveboard.
|
|
12164
12754
|
* @type {boolean}
|
|
@@ -12191,7 +12781,10 @@ export interface LiveboardViewConfig extends BaseViewConfig, SearchLiveboardComm
|
|
|
12191
12781
|
export class LiveboardEmbed extends V1Embed {
|
|
12192
12782
|
protected viewConfig: LiveboardViewConfig;
|
|
12193
12783
|
private defaultHeight;
|
|
12784
|
+
private lazyLoadScrollContainers;
|
|
12785
|
+
private lazyLoadResizeObserver;
|
|
12194
12786
|
constructor(domSelector: DOMSelector, viewConfig: LiveboardViewConfig);
|
|
12787
|
+
protected getAppInitData(): Promise<LiveboardEmbedAppInitData>;
|
|
12195
12788
|
/**
|
|
12196
12789
|
* Construct a map of params to be passed on to the
|
|
12197
12790
|
* embedded Liveboard or visualization.
|