@thoughtspot/visual-embed-sdk 1.48.0 → 1.49.1
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 +247 -151
- 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/mixpanel-service.js +2 -2
- package/cjs/src/mixpanel-service.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/sdk-version.d.ts +2 -0
- package/cjs/src/utils/sdk-version.d.ts.map +1 -0
- package/cjs/src/utils/sdk-version.js +7 -0
- package/cjs/src/utils/sdk-version.js.map +1 -0
- 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-B6Rn561t.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/sdk-version.d.ts +2 -0
- package/dist/src/utils/sdk-version.d.ts.map +1 -0
- package/dist/src/utils.d.ts +4 -1
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +3710 -3226
- package/dist/tsembed-react.js +3360 -2876
- package/dist/tsembed.es.js +3715 -3229
- package/dist/tsembed.js +3710 -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 +249 -153
- 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/mixpanel-service.js +1 -1
- package/lib/src/mixpanel-service.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/sdk-version.d.ts +2 -0
- package/lib/src/utils/sdk-version.d.ts.map +1 -0
- package/lib/src/utils/sdk-version.js +3 -0
- package/lib/src/utils/sdk-version.js.map +1 -0
- 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 +384 -258
- package/src/index.ts +3 -0
- package/src/mixpanel-service.ts +1 -1
- 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/sdk-version.ts +3 -0
- package/src/utils.spec.ts +200 -4
- package/src/utils.ts +128 -9
|
@@ -821,6 +821,146 @@ export interface CustomCssVariables {
|
|
|
821
821
|
* Background color of the color palette in the Liveboard styling panel.
|
|
822
822
|
*/
|
|
823
823
|
"--ts-var-liveboard-styling-color-palette-background"?: string;
|
|
824
|
+
/**
|
|
825
|
+
* Main panel background of the SpotterViz.
|
|
826
|
+
*/
|
|
827
|
+
"--ts-var-spotterviz-panel-background"?: string;
|
|
828
|
+
/**
|
|
829
|
+
* Background color of the chat input field in SpotterViz.
|
|
830
|
+
*/
|
|
831
|
+
"--ts-var-spotterviz-input-background"?: string;
|
|
832
|
+
/**
|
|
833
|
+
* Placeholder text color of the chat input field in SpotterViz.
|
|
834
|
+
*/
|
|
835
|
+
"--ts-var-spotterviz-input-placeholder-color"?: string;
|
|
836
|
+
/**
|
|
837
|
+
* CTA color of the chat input field in SpotterViz.
|
|
838
|
+
*/
|
|
839
|
+
"--ts-var-spotterviz-input-cta-color"?: string;
|
|
840
|
+
/**
|
|
841
|
+
* CTA hover color of the chat input field in SpotterViz.
|
|
842
|
+
*/
|
|
843
|
+
"--ts-var-spotterviz-input-cta-hover-color"?: string;
|
|
844
|
+
/**
|
|
845
|
+
* Text color for the SpotterViz label in the empty state, displayed below
|
|
846
|
+
* the SpotterViz icon.
|
|
847
|
+
*/
|
|
848
|
+
"--ts-var-spotterviz-emptystate-spotterviz-color"?: string;
|
|
849
|
+
/**
|
|
850
|
+
* Background color of the starter prompt cards in SpotterViz.
|
|
851
|
+
*/
|
|
852
|
+
"--ts-var-spotterviz-prompt-card-background"?: string;
|
|
853
|
+
/**
|
|
854
|
+
* Background hover color of the starter prompt cards in SpotterViz.
|
|
855
|
+
*/
|
|
856
|
+
"--ts-var-spotterviz-prompt-card-hover-background"?: string;
|
|
857
|
+
/**
|
|
858
|
+
* Primary text color in SpotterViz, also used for tool response text,
|
|
859
|
+
* upvote/downvote buttons, and other primary content.
|
|
860
|
+
*/
|
|
861
|
+
"--ts-var-spotterviz-text-primary"?: string;
|
|
862
|
+
/**
|
|
863
|
+
* Secondary text color in SpotterViz.
|
|
864
|
+
*/
|
|
865
|
+
"--ts-var-spotterviz-text-secondary"?: string;
|
|
866
|
+
/**
|
|
867
|
+
* Background color of the user chat message bubble in SpotterViz.
|
|
868
|
+
*/
|
|
869
|
+
"--ts-var-spotterviz-message-background"?: string;
|
|
870
|
+
/**
|
|
871
|
+
* Hover color for the user chat message expand button in SpotterViz.
|
|
872
|
+
*/
|
|
873
|
+
"--ts-var-spotterviz-usermessage-icon-hover"?: string;
|
|
874
|
+
/**
|
|
875
|
+
* Background color of the user chat message expand button in SpotterViz.
|
|
876
|
+
*/
|
|
877
|
+
"--ts-var-spotterviz-usermessage-icon-background"?: string;
|
|
878
|
+
/**
|
|
879
|
+
* Color of the thinking step header when in progress in SpotterViz.
|
|
880
|
+
*/
|
|
881
|
+
"--ts-var-spotterviz-thinking-inprogress-header-color"?: string;
|
|
882
|
+
/**
|
|
883
|
+
* Color of the thinking step header when completed in SpotterViz.
|
|
884
|
+
*/
|
|
885
|
+
"--ts-var-spotterviz-thinking-completed-header-color"?: string;
|
|
886
|
+
/**
|
|
887
|
+
* Color of the final completion indicator icon shown when all work is done.
|
|
888
|
+
* The last green dot which is shown when work is done.
|
|
889
|
+
*/
|
|
890
|
+
"--ts-var-spotterviz-thinking-work-done-icon-color"?: string;
|
|
891
|
+
/**
|
|
892
|
+
* Hover background color for the working/work done CTA in SpotterViz.
|
|
893
|
+
*/
|
|
894
|
+
"--ts-var-spotterviz-thinking-cta-hover-background"?: string;
|
|
895
|
+
/**
|
|
896
|
+
* Background color of tool call panels in SpotterViz.
|
|
897
|
+
*/
|
|
898
|
+
"--ts-var-spotterviz-tool-call-background"?: string;
|
|
899
|
+
/**
|
|
900
|
+
* Color of tool titles and icons in SpotterViz.
|
|
901
|
+
*/
|
|
902
|
+
"--ts-var-spotterviz-tool-title-color"?: string;
|
|
903
|
+
/**
|
|
904
|
+
* Border color of tool call panels in SpotterViz.
|
|
905
|
+
*/
|
|
906
|
+
"--ts-var-spotterviz-tool-border-color"?: string;
|
|
907
|
+
/**
|
|
908
|
+
* Background color of the JSON input panel inside a tool call in SpotterViz.
|
|
909
|
+
*/
|
|
910
|
+
"--ts-var-spotterviz-tool-json-input-background"?: string;
|
|
911
|
+
/**
|
|
912
|
+
* Background color of the upvote/downvote feedback buttons in SpotterViz.
|
|
913
|
+
*/
|
|
914
|
+
"--ts-var-spotterviz-tool-feedback-button-background"?: string;
|
|
915
|
+
/**
|
|
916
|
+
* Hover background color of the upvote/downvote feedback buttons in SpotterViz.
|
|
917
|
+
*/
|
|
918
|
+
"--ts-var-spotterviz-tool-feedback-button-hover"?: string;
|
|
919
|
+
/**
|
|
920
|
+
* Text color of the JSON input panel inside a tool call in SpotterViz.
|
|
921
|
+
*/
|
|
922
|
+
"--ts-var-spotterviz-tool-json-input-color"?: string;
|
|
923
|
+
/**
|
|
924
|
+
* Background color of the last checkpoint section in SpotterViz.
|
|
925
|
+
*/
|
|
926
|
+
"--ts-var-spotterviz-last-checkpoint-background"?: string;
|
|
927
|
+
/**
|
|
928
|
+
* Border color of the last checkpoint section in SpotterViz.
|
|
929
|
+
*/
|
|
930
|
+
"--ts-var-spotterviz-last-checkpoint-border"?: string;
|
|
931
|
+
/**
|
|
932
|
+
* Border color of the Liveboard edit header toolbar.
|
|
933
|
+
*/
|
|
934
|
+
"--ts-var-liveboard-edit-toolbar-border"?: string;
|
|
935
|
+
/**
|
|
936
|
+
* Background color of the selected section in the Liveboard edit header toolbar.
|
|
937
|
+
*/
|
|
938
|
+
"--ts-var-liveboard-edit-toolbar-selected-background"?: string;
|
|
939
|
+
/**
|
|
940
|
+
* Text color of the selected section in the Liveboard edit header toolbar.
|
|
941
|
+
*/
|
|
942
|
+
"--ts-var-liveboard-edit-toolbar-selected-text-color"?: string;
|
|
943
|
+
/**
|
|
944
|
+
* Text color of unselected items in the Liveboard edit header toolbar.
|
|
945
|
+
*/
|
|
946
|
+
"--ts-var-liveboard-edit-toolbar-text"?: string;
|
|
947
|
+
/**
|
|
948
|
+
* Hover background color of unselected items in the Liveboard edit header toolbar.
|
|
949
|
+
*/
|
|
950
|
+
"--ts-var-liveboard-edit-toolbar-hover-background"?: string;
|
|
951
|
+
/**
|
|
952
|
+
* Hover text color of unselected items in the Liveboard edit header toolbar.
|
|
953
|
+
*/
|
|
954
|
+
"--ts-var-liveboard-edit-toolbar-hover-text-color"?: string;
|
|
955
|
+
/**
|
|
956
|
+
* Text color of the SpotterViz footer.
|
|
957
|
+
*/
|
|
958
|
+
"--ts-var-spotterviz-footer-text-color"?: string;
|
|
959
|
+
/**
|
|
960
|
+
* Shared border color used throughout SpotterViz: input box, user message,
|
|
961
|
+
* header underline, left panel border, thinking step connector and dots.
|
|
962
|
+
*/
|
|
963
|
+
"--ts-var-spotterviz-border-color"?: string;
|
|
824
964
|
}
|
|
825
965
|
export interface SessionInterface {
|
|
826
966
|
sessionId: string;
|
|
@@ -2061,6 +2201,14 @@ export interface BaseViewConfig extends ApiInterceptFlags {
|
|
|
2061
2201
|
* This flag can be used to disable links inside the embedded app,
|
|
2062
2202
|
* and disable redirection of links in a new tab.
|
|
2063
2203
|
*
|
|
2204
|
+
* Note: When set to `true`, this flag automatically disables
|
|
2205
|
+
* {@link enableLinkOverridesV2} for the
|
|
2206
|
+
* embed session. The two features are mutually exclusive — link
|
|
2207
|
+
* overrides mutate anchors (delete `href`, attach a JS click handler),
|
|
2208
|
+
* which breaks native browser behavior (Cmd/Ctrl+Click, middle-click,
|
|
2209
|
+
* right-click "Open in new tab") when combined with the disable flag.
|
|
2210
|
+
* The disable flag preserves native anchor semantics instead.
|
|
2211
|
+
*
|
|
2064
2212
|
* Supported embed types: `AppEmbed`, `LiveboardEmbed`, `SearchEmbed`, `SpotterAgentEmbed`, `SpotterEmbed`, `SearchBarEmbed`
|
|
2065
2213
|
* @version SDK: 1.32.1 | ThoughtSpot: 10.3.0.cl
|
|
2066
2214
|
* @example
|
|
@@ -2096,8 +2244,13 @@ export interface BaseViewConfig extends ApiInterceptFlags {
|
|
|
2096
2244
|
* Flag to override the *Open Link in New Tab* context
|
|
2097
2245
|
* menu option.
|
|
2098
2246
|
*
|
|
2099
|
-
*
|
|
2100
|
-
* {@link enableLinkOverridesV2}
|
|
2247
|
+
* Note: Setting this flag implicitly enables
|
|
2248
|
+
* {@link enableLinkOverridesV2}. V1 is auto-upgraded to
|
|
2249
|
+
* V2 to ensure consistent link-override behavior; the
|
|
2250
|
+
* legacy V1-only path is no longer used in isolation.
|
|
2251
|
+
*
|
|
2252
|
+
* Note: This flag is ignored when
|
|
2253
|
+
* {@link disableRedirectionLinksInNewTab} is `true`.
|
|
2101
2254
|
*
|
|
2102
2255
|
* Supported embed types: `AppEmbed`, `LiveboardEmbed`,
|
|
2103
2256
|
* `SearchEmbed`, `SpotterAgentEmbed`,
|
|
@@ -2123,6 +2276,9 @@ export interface BaseViewConfig extends ApiInterceptFlags {
|
|
|
2123
2276
|
* alongside this flag for backward compatibility with
|
|
2124
2277
|
* older ThoughtSpot versions.
|
|
2125
2278
|
*
|
|
2279
|
+
* Note: This flag is ignored when
|
|
2280
|
+
* {@link disableRedirectionLinksInNewTab} is `true`.
|
|
2281
|
+
*
|
|
2126
2282
|
* Supported embed types: `AppEmbed`, `LiveboardEmbed`,
|
|
2127
2283
|
* `SearchEmbed`, `SpotterAgentEmbed`,
|
|
2128
2284
|
* `SpotterEmbed`, `SearchBarEmbed`
|
|
@@ -3339,38 +3495,54 @@ export declare enum EmbedEvent {
|
|
|
3339
3495
|
*/
|
|
3340
3496
|
VizPointClick = "vizPointClick",
|
|
3341
3497
|
/**
|
|
3342
|
-
*
|
|
3498
|
+
* Fired when an error occurs in the embedded component.
|
|
3499
|
+
*
|
|
3500
|
+
* **Important:** This event fires for many reasons — including internal
|
|
3501
|
+
* validation warnings (e.g. `HOST_EVENT_VALIDATION`), configuration issues,
|
|
3502
|
+
* and transient errors that ThoughtSpot already handles gracefully inside the
|
|
3503
|
+
* iframe. **Do not call `embed.destroy()` or unmount the embed component on
|
|
3504
|
+
* every error.** Doing so will tear down the iframe and abort all in-flight
|
|
3505
|
+
* requests, causing the embed to fail entirely.
|
|
3506
|
+
*
|
|
3507
|
+
* Only treat the following codes as unrecoverable:
|
|
3508
|
+
* - `INIT_ERROR` — SDK was not initialised before render
|
|
3509
|
+
* - `LOGIN_FAILED` — authentication could not be completed
|
|
3510
|
+
*
|
|
3511
|
+
* All other error codes should be logged and inspected, not acted upon
|
|
3512
|
+
* destructively.
|
|
3343
3513
|
*
|
|
3514
|
+
* **Note:** There is currently no dedicated event for a true unrecoverable
|
|
3515
|
+
* crash. A future `EmbedEvent.FatalError` event is planned to give customers
|
|
3516
|
+
* a clean signal for when the embed cannot recover and needs to be torn down.
|
|
3517
|
+
*
|
|
3518
|
+
* Error types include:
|
|
3344
3519
|
* `API` - API call failure.
|
|
3345
|
-
* `FULLSCREEN` - Error when presenting a Liveboard
|
|
3346
|
-
*
|
|
3347
|
-
* filter. `NON_EXIST_FILTER` - Error due to a non-existent filter.
|
|
3348
|
-
* `INVALID_DATE_VALUE` - Invalid date value error.
|
|
3349
|
-
* `INVALID_OPERATOR` - Use of invalid operator during filter application.
|
|
3520
|
+
* `FULLSCREEN` - Error when presenting a Liveboard in full screen mode.
|
|
3521
|
+
* `VALIDATION_ERROR` - Internal host event or configuration validation warning.
|
|
3350
3522
|
*
|
|
3351
3523
|
* For more information, see https://developers.thoughtspot.com/docs/events-app-integration#errorType
|
|
3352
3524
|
* @returns error - An error object or message
|
|
3353
3525
|
* @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
|
|
3354
3526
|
* @example
|
|
3355
3527
|
* ```js
|
|
3356
|
-
* //
|
|
3357
|
-
*
|
|
3358
|
-
*
|
|
3359
|
-
*
|
|
3360
|
-
*
|
|
3528
|
+
* // Recommended pattern — only destroy on truly fatal errors
|
|
3529
|
+
* embed.on(EmbedEvent.Error, (error) => {
|
|
3530
|
+
* const FATAL_CODES = ['INIT_ERROR', 'LOGIN_FAILED'];
|
|
3531
|
+
* if (FATAL_CODES.includes(error.data?.code)) {
|
|
3532
|
+
* embed.destroy();
|
|
3533
|
+
* return;
|
|
3534
|
+
* }
|
|
3535
|
+
* // Log all other errors — do not destroy
|
|
3536
|
+
* console.warn('Embed error (non-fatal):', error);
|
|
3361
3537
|
* });
|
|
3362
3538
|
* ```
|
|
3363
3539
|
* @example
|
|
3364
3540
|
* ```js
|
|
3365
|
-
* //
|
|
3366
|
-
*
|
|
3541
|
+
* // API error
|
|
3542
|
+
* SearchEmbed.on(EmbedEvent.Error, (error) => {
|
|
3367
3543
|
* console.log(error);
|
|
3368
|
-
* // {
|
|
3369
|
-
*
|
|
3370
|
-
* // stack: "..."
|
|
3371
|
-
* // } }}
|
|
3372
|
-
* // { errorType: "FULLSCREEN", message: "Fullscreen API is not enabled", code: '...' } new format
|
|
3373
|
-
* })
|
|
3544
|
+
* // { errorType: "API", message: '...', code: '...' }
|
|
3545
|
+
* });
|
|
3374
3546
|
* ```
|
|
3375
3547
|
*/
|
|
3376
3548
|
Error = "Error",
|
|
@@ -4571,7 +4743,103 @@ export declare enum EmbedEvent {
|
|
|
4571
4743
|
* ```
|
|
4572
4744
|
* @version SDK: 1.48.0 | ThoughtSpot Cloud: 26.5.0.cl
|
|
4573
4745
|
*/
|
|
4574
|
-
SendTestScheduleEmail = "sendTestScheduleEmail"
|
|
4746
|
+
SendTestScheduleEmail = "sendTestScheduleEmail",
|
|
4747
|
+
/**
|
|
4748
|
+
* Emitted when the SpotterViz panel mounts in embed mode.
|
|
4749
|
+
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
4750
|
+
* @example
|
|
4751
|
+
* ```js
|
|
4752
|
+
* liveboardEmbed.on(EmbedEvent.SpotterVizInit, (payload) => {
|
|
4753
|
+
* console.log('SpotterViz initialized', payload);
|
|
4754
|
+
* // payload: { liveboardId: string }
|
|
4755
|
+
* })
|
|
4756
|
+
* ```
|
|
4757
|
+
*/
|
|
4758
|
+
SpotterVizInit = "SpotterVizInit",
|
|
4759
|
+
/**
|
|
4760
|
+
* Emitted when the user submits a prompt in the SpotterViz panel.
|
|
4761
|
+
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
4762
|
+
* @example
|
|
4763
|
+
* ```js
|
|
4764
|
+
* liveboardEmbed.on(EmbedEvent.SpotterVizQueryTriggered, (payload) => {
|
|
4765
|
+
* console.log('SpotterViz query triggered', payload);
|
|
4766
|
+
* // payload: { query: string, sessionId: string }
|
|
4767
|
+
* })
|
|
4768
|
+
* ```
|
|
4769
|
+
*/
|
|
4770
|
+
SpotterVizQueryTriggered = "SpotterVizQueryTriggered",
|
|
4771
|
+
/**
|
|
4772
|
+
* Emitted when the SpotterViz agent finishes responding.
|
|
4773
|
+
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
4774
|
+
* @example
|
|
4775
|
+
* ```js
|
|
4776
|
+
* liveboardEmbed.on(EmbedEvent.SpotterVizResponseComplete, (payload) => {
|
|
4777
|
+
* console.log('SpotterViz response complete', payload);
|
|
4778
|
+
* // payload: { sessionId: string, messageId: string }
|
|
4779
|
+
* })
|
|
4780
|
+
* ```
|
|
4781
|
+
*/
|
|
4782
|
+
SpotterVizResponseComplete = "SpotterVizResponseComplete",
|
|
4783
|
+
/**
|
|
4784
|
+
* Emitted when a checkpoint is created in the SpotterViz panel.
|
|
4785
|
+
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
4786
|
+
* @example
|
|
4787
|
+
* ```js
|
|
4788
|
+
* liveboardEmbed.on(EmbedEvent.SpotterVizCheckpointCreated, (payload) => {
|
|
4789
|
+
* console.log('SpotterViz checkpoint created', payload);
|
|
4790
|
+
* // payload: { checkpointId: string, source: string, label: string }
|
|
4791
|
+
* })
|
|
4792
|
+
* ```
|
|
4793
|
+
*/
|
|
4794
|
+
SpotterVizCheckpointCreated = "SpotterVizCheckpointCreated",
|
|
4795
|
+
/**
|
|
4796
|
+
* Emitted when a checkpoint is restored in the SpotterViz panel.
|
|
4797
|
+
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
4798
|
+
* @example
|
|
4799
|
+
* ```js
|
|
4800
|
+
* liveboardEmbed.on(EmbedEvent.SpotterVizCheckpointRestored, (payload) => {
|
|
4801
|
+
* console.log('SpotterViz checkpoint restored', payload);
|
|
4802
|
+
* // payload: { checkpointId: string, newGenNumber: number }
|
|
4803
|
+
* })
|
|
4804
|
+
* ```
|
|
4805
|
+
*/
|
|
4806
|
+
SpotterVizCheckpointRestored = "SpotterVizCheckpointRestored",
|
|
4807
|
+
/**
|
|
4808
|
+
* Emitted when an error occurs in the SpotterViz panel.
|
|
4809
|
+
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
4810
|
+
* @example
|
|
4811
|
+
* ```js
|
|
4812
|
+
* liveboardEmbed.on(EmbedEvent.SpotterVizError, (payload) => {
|
|
4813
|
+
* console.log('SpotterViz error', payload);
|
|
4814
|
+
* })
|
|
4815
|
+
* ```
|
|
4816
|
+
*/
|
|
4817
|
+
SpotterVizError = "SpotterVizError",
|
|
4818
|
+
/**
|
|
4819
|
+
* Emitted when the SpotterViz panel is closed.
|
|
4820
|
+
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
4821
|
+
* @example
|
|
4822
|
+
* ```js
|
|
4823
|
+
* liveboardEmbed.on(EmbedEvent.SpotterVizClosed, (payload) => {
|
|
4824
|
+
* console.log('SpotterViz panel closed', payload);
|
|
4825
|
+
* })
|
|
4826
|
+
* ```
|
|
4827
|
+
*/
|
|
4828
|
+
SpotterVizClosed = "SpotterVizClosed",
|
|
4829
|
+
/**
|
|
4830
|
+
* Emitted when a user clicks the **Refresh** button in the
|
|
4831
|
+
* Liveboard header. Requires `enableLiveboardDataCache`
|
|
4832
|
+
* to be enabled.
|
|
4833
|
+
* @example
|
|
4834
|
+
* ```js
|
|
4835
|
+
* liveboardEmbed.on(EmbedEvent.RefreshLiveboardBrowserCache, (payload) => {
|
|
4836
|
+
* console.log('Liveboard browser cache refreshed', payload);
|
|
4837
|
+
* // payload: { liveboardId: string }
|
|
4838
|
+
* })
|
|
4839
|
+
* ```
|
|
4840
|
+
* @version SDK: 1.49.0 | ThoughtSpot Cloud: 26.6.0.cl
|
|
4841
|
+
*/
|
|
4842
|
+
RefreshLiveboardBrowserCache = "refreshLiveboardBrowserCache"
|
|
4575
4843
|
}
|
|
4576
4844
|
/**
|
|
4577
4845
|
* Event types that can be triggered by the host application
|
|
@@ -6641,8 +6909,46 @@ export declare enum HostEvent {
|
|
|
6641
6909
|
* ```
|
|
6642
6910
|
* @version SDK: 1.48.0 | ThoughtSpot Cloud: 26.5.0.cl
|
|
6643
6911
|
*/
|
|
6644
|
-
SendTestScheduleEmail = "sendTestScheduleEmail"
|
|
6912
|
+
SendTestScheduleEmail = "sendTestScheduleEmail",
|
|
6913
|
+
/**
|
|
6914
|
+
* Sends a user message (prompt) to the SpotterViz panel programmatically.
|
|
6915
|
+
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
6916
|
+
* @param query - the prompt text to send.
|
|
6917
|
+
* @example
|
|
6918
|
+
* ```js
|
|
6919
|
+
* liveboardEmbed.trigger(HostEvent.SpotterVizSendUserMessage, {
|
|
6920
|
+
* query: 'Show me revenue by region',
|
|
6921
|
+
* });
|
|
6922
|
+
* ```
|
|
6923
|
+
*/
|
|
6924
|
+
SpotterVizSendUserMessage = "SpotterVizSendUserMessage",
|
|
6925
|
+
/**
|
|
6926
|
+
* Initializes a new SpotterViz conversation.
|
|
6927
|
+
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
6928
|
+
* @example
|
|
6929
|
+
* ```js
|
|
6930
|
+
* liveboardEmbed.trigger(HostEvent.InitSpotterVizConversation);
|
|
6931
|
+
* ```
|
|
6932
|
+
*/
|
|
6933
|
+
InitSpotterVizConversation = "InitSpotterVizConversation",
|
|
6934
|
+
/**
|
|
6935
|
+
* Clears browser cache and fetches new data for liveboard ChartViz Containers.
|
|
6936
|
+
* Requires `enableLiveboardDataCache` to be enabled.
|
|
6937
|
+
* @example
|
|
6938
|
+
* ```js
|
|
6939
|
+
* liveboardEmbed.trigger(HostEvent.RefreshLiveboardBrowserCache);
|
|
6940
|
+
* ```
|
|
6941
|
+
* @version SDK: 1.49.0 | ThoughtSpot Cloud: 26.6.0.cl
|
|
6942
|
+
*/
|
|
6943
|
+
RefreshLiveboardBrowserCache = "refreshLiveboardBrowserCache"
|
|
6645
6944
|
}
|
|
6945
|
+
/**
|
|
6946
|
+
* Configuration for allowed file types in Spotter file upload.
|
|
6947
|
+
* @group Embed components
|
|
6948
|
+
*/
|
|
6949
|
+
export type SpotterFileUploadFileTypes = {
|
|
6950
|
+
types?: string[];
|
|
6951
|
+
};
|
|
6646
6952
|
/**
|
|
6647
6953
|
* ThoughtSpot application pages include actions and menu commands
|
|
6648
6954
|
* for various user-initiated operations. These actions are represented
|
|
@@ -6979,6 +7285,20 @@ export declare enum Action {
|
|
|
6979
7285
|
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
6980
7286
|
*/
|
|
6981
7287
|
DownloadLiveboardAsContinuousPDF = "downloadLiveboardAsContinuousPDF",
|
|
7288
|
+
/**
|
|
7289
|
+
* The Download Liveboard as A4 PDF menu action on a Liveboard.
|
|
7290
|
+
* Allows downloading the entire Liveboard as an A4 PDF.
|
|
7291
|
+
* Requires {@link Action.DownloadLiveboard} as a parent action when
|
|
7292
|
+
* {@link LiveboardViewConfig.isLiveboardXLSXCSVDownloadEnabled} or
|
|
7293
|
+
* {@link LiveboardViewConfig.isContinuousLiveboardPDFEnabled} flags are enabled.
|
|
7294
|
+
* Use this instead of {@link Action.DownloadAsPdf} when either flag is on.
|
|
7295
|
+
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
7296
|
+
* @example
|
|
7297
|
+
* ```js
|
|
7298
|
+
* disabledActions: [Action.DownloadLiveboardAsA4Pdf]
|
|
7299
|
+
* ```
|
|
7300
|
+
*/
|
|
7301
|
+
DownloadLiveboardAsA4Pdf = "downloadLiveboardAsA4Pdf",
|
|
6982
7302
|
/**
|
|
6983
7303
|
* The **Download Liveboard as XLSX** menu action on a Liveboard.
|
|
6984
7304
|
* Allows downloading the entire Liveboard as an XLSX file.
|
|
@@ -8290,7 +8610,51 @@ export declare enum Action {
|
|
|
8290
8610
|
* ```
|
|
8291
8611
|
* @version SDK: 1.48.0 | ThoughtSpot Cloud: 26.5.0.cl
|
|
8292
8612
|
*/
|
|
8293
|
-
SendTestScheduleEmail = "sendTestScheduleEmail"
|
|
8613
|
+
SendTestScheduleEmail = "sendTestScheduleEmail",
|
|
8614
|
+
/**
|
|
8615
|
+
* The thumbs up/down feedback buttons in the SpotterViz panel.
|
|
8616
|
+
* Visible by default.
|
|
8617
|
+
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
8618
|
+
* @example
|
|
8619
|
+
* ```js
|
|
8620
|
+
* hiddenActions: [Action.SpotterVizFeedback]
|
|
8621
|
+
* disabledActions: [Action.SpotterVizFeedback]
|
|
8622
|
+
* ```
|
|
8623
|
+
*/
|
|
8624
|
+
SpotterVizFeedback = "spotterVizFeedback",
|
|
8625
|
+
/**
|
|
8626
|
+
* The version restore button on checkpoint cards in the SpotterViz panel.
|
|
8627
|
+
* Visible by default.
|
|
8628
|
+
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
8629
|
+
* @example
|
|
8630
|
+
* ```js
|
|
8631
|
+
* hiddenActions: [Action.SpotterVizCheckpointRestore]
|
|
8632
|
+
* disabledActions: [Action.SpotterVizCheckpointRestore]
|
|
8633
|
+
* ```
|
|
8634
|
+
*/
|
|
8635
|
+
SpotterVizCheckpointRestore = "spotterVizCheckpointRestore",
|
|
8636
|
+
/**
|
|
8637
|
+
* The **SpotterViz** button in the top edit header.
|
|
8638
|
+
* Visible by default.
|
|
8639
|
+
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
8640
|
+
* @example
|
|
8641
|
+
* ```js
|
|
8642
|
+
* hiddenActions: [Action.SpotterViz]
|
|
8643
|
+
* disabledActions: [Action.SpotterViz]
|
|
8644
|
+
* ```
|
|
8645
|
+
*/
|
|
8646
|
+
SpotterViz = "spotterViz",
|
|
8647
|
+
/**
|
|
8648
|
+
* Clears browser cache and fetches new data for liveboard ChartViz Containers.
|
|
8649
|
+
* Requires `enableLiveboardDataCache` to be enabled.
|
|
8650
|
+
* @example
|
|
8651
|
+
* ```js
|
|
8652
|
+
* disabledActions: [Action.RefreshLiveboardBrowserCache]
|
|
8653
|
+
* hiddenActions: [Action.RefreshLiveboardBrowserCache]
|
|
8654
|
+
* ```
|
|
8655
|
+
* @version SDK: 1.49.0 | ThoughtSpot Cloud: 26.6.0.cl
|
|
8656
|
+
*/
|
|
8657
|
+
RefreshLiveboardBrowserCache = "refreshLiveboardBrowserCache"
|
|
8294
8658
|
}
|
|
8295
8659
|
declare enum ContextMenuTriggerOptions {
|
|
8296
8660
|
LEFT_CLICK = "left-click",
|
|
@@ -9523,7 +9887,7 @@ declare class TsEmbed {
|
|
|
9523
9887
|
/**
|
|
9524
9888
|
* The DOM node where the ThoughtSpot app is to be embedded.
|
|
9525
9889
|
*/
|
|
9526
|
-
protected
|
|
9890
|
+
protected hostElement: HTMLElement;
|
|
9527
9891
|
/**
|
|
9528
9892
|
* The key to store the embed instance in the DOM node
|
|
9529
9893
|
*/
|
|
@@ -9579,6 +9943,7 @@ declare class TsEmbed {
|
|
|
9579
9943
|
private resizeObserver;
|
|
9580
9944
|
protected hostEventClient: HostEventClient;
|
|
9581
9945
|
protected isReadyForRenderPromise: Promise<void>;
|
|
9946
|
+
protected shouldWaitForRenderPromise: boolean;
|
|
9582
9947
|
/**
|
|
9583
9948
|
* Handler for fullscreen change events
|
|
9584
9949
|
*/
|
|
@@ -9712,6 +10077,10 @@ declare class TsEmbed {
|
|
|
9712
10077
|
protected getEmbedParamsObject(): Record<any, any>;
|
|
9713
10078
|
protected getRootIframeSrc(): string;
|
|
9714
10079
|
protected createIframeEl(frameSrc: string): HTMLIFrameElement;
|
|
10080
|
+
/**
|
|
10081
|
+
* Returns true if this embed instance is configured for pre-rendering.
|
|
10082
|
+
*/
|
|
10083
|
+
protected isPreRenderEmbed(): boolean;
|
|
9715
10084
|
protected handleInsertionIntoDOM(child: string | Node): void;
|
|
9716
10085
|
/**
|
|
9717
10086
|
* Renders the embedded ThoughtSpot app in an iframe and sets up
|
|
@@ -9722,9 +10091,23 @@ declare class TsEmbed {
|
|
|
9722
10091
|
protected createPreRenderWrapper(): HTMLDivElement;
|
|
9723
10092
|
protected preRenderWrapper: HTMLElement;
|
|
9724
10093
|
protected preRenderChild: HTMLElement;
|
|
10094
|
+
/**
|
|
10095
|
+
* Checks for an existing pre-rendered component and connects to it.
|
|
10096
|
+
*
|
|
10097
|
+
* If a matching pre-rendered component is found in the DOM, this method
|
|
10098
|
+
* sets the internal properties of the embed object to reference it.
|
|
10099
|
+
*
|
|
10100
|
+
* @returns True if a connection was successfully established, false otherwise.
|
|
10101
|
+
*/
|
|
9725
10102
|
protected connectPreRendered(): boolean;
|
|
9726
|
-
protected
|
|
10103
|
+
protected isPreRenderConnected(): boolean;
|
|
9727
10104
|
protected createPreRenderChild(child: string | Node): HTMLElement;
|
|
10105
|
+
/**
|
|
10106
|
+
* Creates the in-flow placeholder div inserted into the host element when
|
|
10107
|
+
* showPreRender() is called. The wrapper observes this element to stay
|
|
10108
|
+
* aligned with the host layout.
|
|
10109
|
+
*/
|
|
10110
|
+
private createPreRenderPlaceholder;
|
|
9728
10111
|
protected insertIntoDOMForPreRender(child: string | Node): void;
|
|
9729
10112
|
private showPreRenderByDefault;
|
|
9730
10113
|
protected insertIntoDOM(child: string | Node): void;
|
|
@@ -9821,10 +10204,10 @@ declare class TsEmbed {
|
|
|
9821
10204
|
*/
|
|
9822
10205
|
private triggerEventOnPort;
|
|
9823
10206
|
/**
|
|
9824
|
-
|
|
9825
|
-
|
|
9826
|
-
|
|
9827
|
-
|
|
10207
|
+
* @hidden
|
|
10208
|
+
* Internal state to track if the embed container is loaded.
|
|
10209
|
+
* This is used to trigger events after the embed container is loaded.
|
|
10210
|
+
*/
|
|
9828
10211
|
isEmbedContainerLoaded: boolean;
|
|
9829
10212
|
/**
|
|
9830
10213
|
* @hidden
|
|
@@ -9881,33 +10264,33 @@ declare class TsEmbed {
|
|
|
9881
10264
|
getIframeSrc(): string;
|
|
9882
10265
|
protected handleRenderForPrerender(): Promise<TsEmbed>;
|
|
9883
10266
|
/**
|
|
9884
|
-
|
|
9885
|
-
|
|
9886
|
-
|
|
9887
|
-
|
|
9888
|
-
|
|
9889
|
-
|
|
9890
|
-
|
|
9891
|
-
|
|
9892
|
-
|
|
9893
|
-
|
|
9894
|
-
|
|
9895
|
-
|
|
9896
|
-
|
|
9897
|
-
|
|
9898
|
-
|
|
9899
|
-
|
|
9900
|
-
|
|
9901
|
-
|
|
9902
|
-
|
|
9903
|
-
|
|
9904
|
-
|
|
9905
|
-
|
|
9906
|
-
|
|
9907
|
-
|
|
9908
|
-
|
|
9909
|
-
|
|
9910
|
-
|
|
10267
|
+
* Context object for the embedded component.
|
|
10268
|
+
* @returns {ContextObject} The current context object containing the page type and object ids.
|
|
10269
|
+
* @example
|
|
10270
|
+
* ```js
|
|
10271
|
+
* const context = await embed.getCurrentContext();
|
|
10272
|
+
* console.log(context);
|
|
10273
|
+
*
|
|
10274
|
+
* // Example output
|
|
10275
|
+
* {
|
|
10276
|
+
* stack: [
|
|
10277
|
+
* {
|
|
10278
|
+
* name: 'Liveboard',
|
|
10279
|
+
* type: ContextType.Liveboard,
|
|
10280
|
+
* objectIds: {
|
|
10281
|
+
* liveboardId: '123',
|
|
10282
|
+
* },
|
|
10283
|
+
* },
|
|
10284
|
+
* ],
|
|
10285
|
+
* currentContext: {
|
|
10286
|
+
* name: 'Liveboard',
|
|
10287
|
+
* type: ContextType.Liveboard,
|
|
10288
|
+
* objectIds: {
|
|
10289
|
+
* liveboardId: '123',
|
|
10290
|
+
* },
|
|
10291
|
+
* },
|
|
10292
|
+
* }
|
|
10293
|
+
* ```
|
|
9911
10294
|
* @version SDK: 1.45.2 | ThoughtSpot: 26.3.0.cl
|
|
9912
10295
|
*/
|
|
9913
10296
|
getCurrentContext(): Promise<ContextObject>;
|
|
@@ -9952,14 +10335,14 @@ declare class TsEmbed {
|
|
|
9952
10335
|
*/
|
|
9953
10336
|
prerenderGeneric(): Promise<any>;
|
|
9954
10337
|
protected beforePrerenderVisible(): void;
|
|
9955
|
-
private validatePreRenderViewConfig;
|
|
9956
10338
|
/**
|
|
9957
|
-
* Displays the
|
|
9958
|
-
* If the component
|
|
9959
|
-
*
|
|
9960
|
-
*
|
|
10339
|
+
* Displays the pre-rendered component inside the host element.
|
|
10340
|
+
* If the component has not been pre-rendered yet, it initiates rendering first.
|
|
10341
|
+
* Inserts a placeholder element into the host and positions the pre-render
|
|
10342
|
+
* wrapper to overlay it.
|
|
9961
10343
|
*/
|
|
9962
10344
|
showPreRender(): Promise<TsEmbed>;
|
|
10345
|
+
protected getPreRenderPlaceHolderElement(): HTMLDivElement;
|
|
9963
10346
|
/**
|
|
9964
10347
|
* Synchronizes the style properties of the PreRender component with the embedding
|
|
9965
10348
|
* element. This function adjusts the position, width, and height of the PreRender
|
|
@@ -9984,6 +10367,7 @@ declare class TsEmbed {
|
|
|
9984
10367
|
getPreRenderIds(): {
|
|
9985
10368
|
wrapper: string;
|
|
9986
10369
|
child: string;
|
|
10370
|
+
placeHolder: string;
|
|
9987
10371
|
};
|
|
9988
10372
|
/**
|
|
9989
10373
|
* Returns the answerService which can be used to make arbitrary graphql calls on top
|
|
@@ -10595,6 +10979,21 @@ export interface SpotterChatViewConfig {
|
|
|
10595
10979
|
* External MCP tool branding is not affected.
|
|
10596
10980
|
*/
|
|
10597
10981
|
toolResponseCardBrandingLabel?: string;
|
|
10982
|
+
/**
|
|
10983
|
+
* Enables file upload in the Spotter chat interface.
|
|
10984
|
+
*
|
|
10985
|
+
* Supported embed types: `SpotterEmbed`, `LiveboardEmbed`, `AppEmbed`
|
|
10986
|
+
* @version SDK: 1.49.0 | ThoughtSpot: 26.6.0.cl
|
|
10987
|
+
* @default false
|
|
10988
|
+
*/
|
|
10989
|
+
spotterFileUploadEnabled?: boolean;
|
|
10990
|
+
/**
|
|
10991
|
+
* Restricts the allowed file types for Spotter file upload.
|
|
10992
|
+
*
|
|
10993
|
+
* Supported embed types: `SpotterEmbed`, `LiveboardEmbed`, `AppEmbed`
|
|
10994
|
+
* @version SDK: 1.49.0 | ThoughtSpot: 26.6.0.cl
|
|
10995
|
+
*/
|
|
10996
|
+
spotterFileUploadFileTypes?: SpotterFileUploadFileTypes;
|
|
10598
10997
|
}
|
|
10599
10998
|
/**
|
|
10600
10999
|
* The configuration for the embedded spotterEmbed options.
|
|
@@ -10866,6 +11265,82 @@ declare class ConversationEmbed extends SpotterEmbed {
|
|
|
10866
11265
|
protected viewConfig: ConversationViewConfig;
|
|
10867
11266
|
constructor(container: HTMLElement, viewConfig: ConversationViewConfig);
|
|
10868
11267
|
}
|
|
11268
|
+
/**
|
|
11269
|
+
* Defines starter prompts displayed in the SpotterViz interface.
|
|
11270
|
+
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
11271
|
+
* @group Embed components
|
|
11272
|
+
*/
|
|
11273
|
+
export interface SpotterVizStarterPrompt {
|
|
11274
|
+
/** Identifier for the prompt. */
|
|
11275
|
+
id: string;
|
|
11276
|
+
/** Short label shown to the user as a clickable suggestion. */
|
|
11277
|
+
displayText: string;
|
|
11278
|
+
/** Full prompt text sent to Spotter when the user clicks the suggestion. */
|
|
11279
|
+
fullPrompt: string;
|
|
11280
|
+
}
|
|
11281
|
+
/**
|
|
11282
|
+
* Configuration for the SpotterViz interface shown on the Liveboard.
|
|
11283
|
+
* Supported embed types: `AppEmbed`, `LiveboardEmbed`
|
|
11284
|
+
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
11285
|
+
* @group Embed components
|
|
11286
|
+
* @example
|
|
11287
|
+
* ```js
|
|
11288
|
+
* const embed = new AppEmbed('#embed-container', {
|
|
11289
|
+
* ... // other options,
|
|
11290
|
+
* spotterViz: {
|
|
11291
|
+
* brandName: 'MyBrand',
|
|
11292
|
+
* brandHeadline: 'Hi, there! I\'m',
|
|
11293
|
+
* description: 'Ask questions about your data',
|
|
11294
|
+
* inputChatPlaceholder: 'Ask a question...',
|
|
11295
|
+
* hideStarterPrompts: false,
|
|
11296
|
+
* customStarterPrompts: [
|
|
11297
|
+
* { id: '1', displayText: 'Top products', fullPrompt: 'What are the top products by revenue?' }
|
|
11298
|
+
* ],
|
|
11299
|
+
* },
|
|
11300
|
+
* })
|
|
11301
|
+
* ```
|
|
11302
|
+
*/
|
|
11303
|
+
export interface SpotterVizConfig {
|
|
11304
|
+
/**
|
|
11305
|
+
* Rename the default "SpotterViz" label shown in the SpotterViz interface with a custom brand name.
|
|
11306
|
+
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
11307
|
+
* @default ''
|
|
11308
|
+
*/
|
|
11309
|
+
brandName?: string;
|
|
11310
|
+
/**
|
|
11311
|
+
* Custom headline text shown before the brand name in the SpotterViz interface.
|
|
11312
|
+
* Replaces the default greeting prefix (e.g. "Hi, there! I'm").
|
|
11313
|
+
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
11314
|
+
* @default ''
|
|
11315
|
+
*/
|
|
11316
|
+
brandHeadline?: string;
|
|
11317
|
+
/**
|
|
11318
|
+
* Hides the starter prompts section entirely in the SpotterViz interface.
|
|
11319
|
+
* When set to `true`, the starter prompts are not displayed.
|
|
11320
|
+
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
11321
|
+
* @default false
|
|
11322
|
+
*/
|
|
11323
|
+
hideStarterPrompts?: boolean;
|
|
11324
|
+
/**
|
|
11325
|
+
* Overrides the starter prompts with a custom list.
|
|
11326
|
+
* Each entry must match the {@link SpotterVizStarterPrompt} shape.
|
|
11327
|
+
* Has no effect when `hideStarterPrompts` is `true`.
|
|
11328
|
+
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
11329
|
+
*/
|
|
11330
|
+
customStarterPrompts?: SpotterVizStarterPrompt[];
|
|
11331
|
+
/**
|
|
11332
|
+
* Custom description text shown in the SpotterViz interface.
|
|
11333
|
+
* Replaces the default SpotterViz description.
|
|
11334
|
+
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
11335
|
+
*/
|
|
11336
|
+
description?: string;
|
|
11337
|
+
/**
|
|
11338
|
+
* Custom placeholder text for the chat input in the SpotterViz interface.
|
|
11339
|
+
* Replaces the default chat input placeholder text.
|
|
11340
|
+
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
11341
|
+
*/
|
|
11342
|
+
inputChatPlaceholder?: string;
|
|
11343
|
+
}
|
|
10869
11344
|
/**
|
|
10870
11345
|
* Pages within the ThoughtSpot app that can be embedded.
|
|
10871
11346
|
*/
|
|
@@ -10940,7 +11415,15 @@ declare enum HomePage {
|
|
|
10940
11415
|
* ModularWithStylingChanges (v3) introduces Modular Home Experience
|
|
10941
11416
|
* with styling changes.
|
|
10942
11417
|
*/
|
|
10943
|
-
ModularWithStylingChanges = "v3"
|
|
11418
|
+
ModularWithStylingChanges = "v3",
|
|
11419
|
+
/**
|
|
11420
|
+
* Focused (v4) introduces the V4 homepage experience
|
|
11421
|
+
* in which Watchlist and recents and incorporated together
|
|
11422
|
+
* to form a more focused homepage.
|
|
11423
|
+
* Pre-requisite : spotter enablement
|
|
11424
|
+
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
11425
|
+
*/
|
|
11426
|
+
Focused = "v4"
|
|
10944
11427
|
}
|
|
10945
11428
|
declare enum ListPage {
|
|
10946
11429
|
/**
|
|
@@ -11368,6 +11851,21 @@ export interface AppViewConfig extends AllEmbedViewConfig {
|
|
|
11368
11851
|
* ```
|
|
11369
11852
|
*/
|
|
11370
11853
|
isUnifiedSearchExperienceEnabled?: boolean;
|
|
11854
|
+
/**
|
|
11855
|
+
* This flag is used to enable the new connection experience for AppEmbed.
|
|
11856
|
+
*
|
|
11857
|
+
* Supported embed types: `AppEmbed`
|
|
11858
|
+
* @version SDK: 1.51.0 | ThoughtSpot Cloud: 26.8.0.cl
|
|
11859
|
+
* @default false
|
|
11860
|
+
* @example
|
|
11861
|
+
* ```js
|
|
11862
|
+
* const embed = new AppEmbed('#tsEmbed', {
|
|
11863
|
+
* ... // other embed view config
|
|
11864
|
+
* newConnectionsExperience: true,
|
|
11865
|
+
* })
|
|
11866
|
+
* ```
|
|
11867
|
+
*/
|
|
11868
|
+
newConnectionsExperience?: boolean;
|
|
11371
11869
|
/**
|
|
11372
11870
|
* This flag is used to enable/disable the styling and grouping in a Liveboard. Use {@link isLiveboardMasterpiecesEnabled} instead.
|
|
11373
11871
|
* @deprecated This flag is deprecated.
|
|
@@ -11468,6 +11966,17 @@ export interface AppViewConfig extends AllEmbedViewConfig {
|
|
|
11468
11966
|
* ```
|
|
11469
11967
|
*/
|
|
11470
11968
|
lazyLoadingForFullHeight?: boolean;
|
|
11969
|
+
/**
|
|
11970
|
+
* This flag is used to enable container-aware full height lazy loading.
|
|
11971
|
+
*
|
|
11972
|
+
* Use this when the embed is rendered inside a scrollable or clipping
|
|
11973
|
+
* container instead of relying on the browser window as the only viewport.
|
|
11974
|
+
*
|
|
11975
|
+
* @type {boolean}
|
|
11976
|
+
* @default false
|
|
11977
|
+
* @hidden
|
|
11978
|
+
*/
|
|
11979
|
+
enableScrollableContainerLazyLoading?: boolean;
|
|
11471
11980
|
/**
|
|
11472
11981
|
* The margin to be used for lazy loading.
|
|
11473
11982
|
*
|
|
@@ -11554,6 +12063,29 @@ export interface AppViewConfig extends AllEmbedViewConfig {
|
|
|
11554
12063
|
* ```
|
|
11555
12064
|
*/
|
|
11556
12065
|
spotterChatConfig?: SpotterChatViewConfig;
|
|
12066
|
+
/**
|
|
12067
|
+
* Configuration for the SpotterViz interface shown on the Liveboard.
|
|
12068
|
+
* Customize the brand name, description, chat input placeholder,
|
|
12069
|
+
* starter prompts, and visibility of starter prompts in the SpotterViz panel.
|
|
12070
|
+
*
|
|
12071
|
+
* Supported embed types: `AppEmbed`, `LiveboardEmbed`
|
|
12072
|
+
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
12073
|
+
* @example
|
|
12074
|
+
* ```js
|
|
12075
|
+
* const embed = new AppEmbed('#embed-container', {
|
|
12076
|
+
* ... // other options
|
|
12077
|
+
* spotterViz: {
|
|
12078
|
+
* brandName: 'MyBrand',
|
|
12079
|
+
* brandHeadline: 'Hi, there! I\'m',
|
|
12080
|
+
* description: 'Ask questions about your data',
|
|
12081
|
+
* inputChatPlaceholder: 'Ask a question...',
|
|
12082
|
+
* hideStarterPrompts: false,
|
|
12083
|
+
* customStarterPrompts: [{ id: '1', displayText: 'Top products', fullPrompt: 'What are the top products by revenue?' }]
|
|
12084
|
+
* },
|
|
12085
|
+
* })
|
|
12086
|
+
* ```
|
|
12087
|
+
*/
|
|
12088
|
+
spotterViz?: SpotterVizConfig;
|
|
11557
12089
|
/**
|
|
11558
12090
|
* Enables the stop answer generation button in the Spotter embed UI,
|
|
11559
12091
|
* allowing users to interrupt an ongoing answer generation.
|
|
@@ -11622,11 +12154,14 @@ export interface AppViewConfig extends AllEmbedViewConfig {
|
|
|
11622
12154
|
export interface AppEmbedAppInitData extends DefaultAppInitData {
|
|
11623
12155
|
embedParams?: {
|
|
11624
12156
|
spotterSidebarConfig?: SpotterSidebarViewConfig;
|
|
12157
|
+
spotterVizConfig?: SpotterVizConfig;
|
|
11625
12158
|
};
|
|
11626
12159
|
}
|
|
11627
12160
|
declare class AppEmbed extends V1Embed {
|
|
11628
12161
|
protected viewConfig: AppViewConfig;
|
|
11629
12162
|
private defaultHeight;
|
|
12163
|
+
private lazyLoadScrollContainers;
|
|
12164
|
+
private lazyLoadResizeObserver;
|
|
11630
12165
|
constructor(domSelector: DOMSelector, viewConfig: AppViewConfig);
|
|
11631
12166
|
/**
|
|
11632
12167
|
* Extends the default APP_INIT payload with `embedParams.spotterSidebarConfig`
|
|
@@ -11706,6 +12241,15 @@ declare class AppEmbed extends V1Embed {
|
|
|
11706
12241
|
*/
|
|
11707
12242
|
render(): Promise<AppEmbed>;
|
|
11708
12243
|
}
|
|
12244
|
+
/**
|
|
12245
|
+
* APP_INIT data shape for LiveboardEmbed.
|
|
12246
|
+
* @internal
|
|
12247
|
+
*/
|
|
12248
|
+
export interface LiveboardEmbedAppInitData extends DefaultAppInitData {
|
|
12249
|
+
embedParams?: {
|
|
12250
|
+
spotterVizConfig?: SpotterVizConfig;
|
|
12251
|
+
};
|
|
12252
|
+
}
|
|
11709
12253
|
/**
|
|
11710
12254
|
* The configuration for the embedded Liveboard or visualization page view.
|
|
11711
12255
|
* @group Embed components
|
|
@@ -12124,6 +12668,16 @@ export interface LiveboardViewConfig extends BaseViewConfig, SearchLiveboardComm
|
|
|
12124
12668
|
* ```
|
|
12125
12669
|
*/
|
|
12126
12670
|
lazyLoadingForFullHeight?: boolean;
|
|
12671
|
+
/**
|
|
12672
|
+
* This flag is used to enable container-aware full height lazy loading.
|
|
12673
|
+
*
|
|
12674
|
+
* Use this when the embed is rendered inside a scrollable or clipping
|
|
12675
|
+
* container instead of relying on the browser window as the only viewport.
|
|
12676
|
+
*
|
|
12677
|
+
* @type {boolean}
|
|
12678
|
+
* @default false
|
|
12679
|
+
*/
|
|
12680
|
+
enableScrollableContainerLazyLoading?: boolean;
|
|
12127
12681
|
/**
|
|
12128
12682
|
* The margin to be used for lazy loading.
|
|
12129
12683
|
*
|
|
@@ -12205,6 +12759,29 @@ export interface LiveboardViewConfig extends BaseViewConfig, SearchLiveboardComm
|
|
|
12205
12759
|
* ```
|
|
12206
12760
|
*/
|
|
12207
12761
|
spotterChatConfig?: SpotterChatViewConfig;
|
|
12762
|
+
/**
|
|
12763
|
+
* Configuration for the SpotterViz interface shown on the Liveboard.
|
|
12764
|
+
* Customize the brand name, description, chat input placeholder,
|
|
12765
|
+
* starter prompts, and visibility of starter prompts in the SpotterViz panel.
|
|
12766
|
+
*
|
|
12767
|
+
* Supported embed types: `AppEmbed`, `LiveboardEmbed`
|
|
12768
|
+
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
12769
|
+
* @example
|
|
12770
|
+
* ```js
|
|
12771
|
+
* const embed = new LiveboardEmbed('#embed-container', {
|
|
12772
|
+
* ... // other options
|
|
12773
|
+
* spotterViz: {
|
|
12774
|
+
* brandName: 'MyBrand',
|
|
12775
|
+
* brandHeadline: 'Hi, there! I\'m',
|
|
12776
|
+
* description: 'Ask questions about your data',
|
|
12777
|
+
* inputChatPlaceholder: 'Ask a question...',
|
|
12778
|
+
* hideStarterPrompts: false,
|
|
12779
|
+
* customStarterPrompts: [{ id: '1', displayText: 'Top products', fullPrompt: 'What are the top products by revenue?' }],
|
|
12780
|
+
* },
|
|
12781
|
+
* })
|
|
12782
|
+
* ```
|
|
12783
|
+
*/
|
|
12784
|
+
spotterViz?: SpotterVizConfig;
|
|
12208
12785
|
/**
|
|
12209
12786
|
* If set to true, enables visualization data caching on the Liveboard.
|
|
12210
12787
|
* @type {boolean}
|
|
@@ -12222,7 +12799,10 @@ export interface LiveboardViewConfig extends BaseViewConfig, SearchLiveboardComm
|
|
|
12222
12799
|
declare class LiveboardEmbed extends V1Embed {
|
|
12223
12800
|
protected viewConfig: LiveboardViewConfig;
|
|
12224
12801
|
private defaultHeight;
|
|
12802
|
+
private lazyLoadScrollContainers;
|
|
12803
|
+
private lazyLoadResizeObserver;
|
|
12225
12804
|
constructor(domSelector: DOMSelector, viewConfig: LiveboardViewConfig);
|
|
12805
|
+
protected getAppInitData(): Promise<LiveboardEmbedAppInitData>;
|
|
12226
12806
|
/**
|
|
12227
12807
|
* Construct a map of params to be passed on to the
|
|
12228
12808
|
* embedded Liveboard or visualization.
|