@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`
|
|
@@ -3326,38 +3482,54 @@ export declare enum EmbedEvent {
|
|
|
3326
3482
|
*/
|
|
3327
3483
|
VizPointClick = "vizPointClick",
|
|
3328
3484
|
/**
|
|
3329
|
-
*
|
|
3485
|
+
* Fired when an error occurs in the embedded component.
|
|
3486
|
+
*
|
|
3487
|
+
* **Important:** This event fires for many reasons — including internal
|
|
3488
|
+
* validation warnings (e.g. `HOST_EVENT_VALIDATION`), configuration issues,
|
|
3489
|
+
* and transient errors that ThoughtSpot already handles gracefully inside the
|
|
3490
|
+
* iframe. **Do not call `embed.destroy()` or unmount the embed component on
|
|
3491
|
+
* every error.** Doing so will tear down the iframe and abort all in-flight
|
|
3492
|
+
* requests, causing the embed to fail entirely.
|
|
3493
|
+
*
|
|
3494
|
+
* Only treat the following codes as unrecoverable:
|
|
3495
|
+
* - `INIT_ERROR` — SDK was not initialised before render
|
|
3496
|
+
* - `LOGIN_FAILED` — authentication could not be completed
|
|
3497
|
+
*
|
|
3498
|
+
* All other error codes should be logged and inspected, not acted upon
|
|
3499
|
+
* destructively.
|
|
3330
3500
|
*
|
|
3501
|
+
* **Note:** There is currently no dedicated event for a true unrecoverable
|
|
3502
|
+
* crash. A future `EmbedEvent.FatalError` event is planned to give customers
|
|
3503
|
+
* a clean signal for when the embed cannot recover and needs to be torn down.
|
|
3504
|
+
*
|
|
3505
|
+
* Error types include:
|
|
3331
3506
|
* `API` - API call failure.
|
|
3332
|
-
* `FULLSCREEN` - Error when presenting a Liveboard
|
|
3333
|
-
*
|
|
3334
|
-
* filter. `NON_EXIST_FILTER` - Error due to a non-existent filter.
|
|
3335
|
-
* `INVALID_DATE_VALUE` - Invalid date value error.
|
|
3336
|
-
* `INVALID_OPERATOR` - Use of invalid operator during filter application.
|
|
3507
|
+
* `FULLSCREEN` - Error when presenting a Liveboard in full screen mode.
|
|
3508
|
+
* `VALIDATION_ERROR` - Internal host event or configuration validation warning.
|
|
3337
3509
|
*
|
|
3338
3510
|
* For more information, see https://developers.thoughtspot.com/docs/events-app-integration#errorType
|
|
3339
3511
|
* @returns error - An error object or message
|
|
3340
3512
|
* @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
|
|
3341
3513
|
* @example
|
|
3342
3514
|
* ```js
|
|
3343
|
-
* //
|
|
3344
|
-
*
|
|
3345
|
-
*
|
|
3346
|
-
*
|
|
3347
|
-
*
|
|
3515
|
+
* // Recommended pattern — only destroy on truly fatal errors
|
|
3516
|
+
* embed.on(EmbedEvent.Error, (error) => {
|
|
3517
|
+
* const FATAL_CODES = ['INIT_ERROR', 'LOGIN_FAILED'];
|
|
3518
|
+
* if (FATAL_CODES.includes(error.data?.code)) {
|
|
3519
|
+
* embed.destroy();
|
|
3520
|
+
* return;
|
|
3521
|
+
* }
|
|
3522
|
+
* // Log all other errors — do not destroy
|
|
3523
|
+
* console.warn('Embed error (non-fatal):', error);
|
|
3348
3524
|
* });
|
|
3349
3525
|
* ```
|
|
3350
3526
|
* @example
|
|
3351
3527
|
* ```js
|
|
3352
|
-
* //
|
|
3353
|
-
*
|
|
3528
|
+
* // API error
|
|
3529
|
+
* SearchEmbed.on(EmbedEvent.Error, (error) => {
|
|
3354
3530
|
* console.log(error);
|
|
3355
|
-
* // {
|
|
3356
|
-
*
|
|
3357
|
-
* // stack: "..."
|
|
3358
|
-
* // } }}
|
|
3359
|
-
* // { errorType: "FULLSCREEN", message: "Fullscreen API is not enabled", code: '...' } new format
|
|
3360
|
-
* })
|
|
3531
|
+
* // { errorType: "API", message: '...', code: '...' }
|
|
3532
|
+
* });
|
|
3361
3533
|
* ```
|
|
3362
3534
|
*/
|
|
3363
3535
|
Error = "Error",
|
|
@@ -4558,7 +4730,103 @@ export declare enum EmbedEvent {
|
|
|
4558
4730
|
* ```
|
|
4559
4731
|
* @version SDK: 1.48.0 | ThoughtSpot Cloud: 26.5.0.cl
|
|
4560
4732
|
*/
|
|
4561
|
-
SendTestScheduleEmail = "sendTestScheduleEmail"
|
|
4733
|
+
SendTestScheduleEmail = "sendTestScheduleEmail",
|
|
4734
|
+
/**
|
|
4735
|
+
* Emitted when the SpotterViz panel mounts in embed mode.
|
|
4736
|
+
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
4737
|
+
* @example
|
|
4738
|
+
* ```js
|
|
4739
|
+
* liveboardEmbed.on(EmbedEvent.SpotterVizInit, (payload) => {
|
|
4740
|
+
* console.log('SpotterViz initialized', payload);
|
|
4741
|
+
* // payload: { liveboardId: string }
|
|
4742
|
+
* })
|
|
4743
|
+
* ```
|
|
4744
|
+
*/
|
|
4745
|
+
SpotterVizInit = "SpotterVizInit",
|
|
4746
|
+
/**
|
|
4747
|
+
* Emitted when the user submits a prompt in the SpotterViz panel.
|
|
4748
|
+
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
4749
|
+
* @example
|
|
4750
|
+
* ```js
|
|
4751
|
+
* liveboardEmbed.on(EmbedEvent.SpotterVizQueryTriggered, (payload) => {
|
|
4752
|
+
* console.log('SpotterViz query triggered', payload);
|
|
4753
|
+
* // payload: { query: string, sessionId: string }
|
|
4754
|
+
* })
|
|
4755
|
+
* ```
|
|
4756
|
+
*/
|
|
4757
|
+
SpotterVizQueryTriggered = "SpotterVizQueryTriggered",
|
|
4758
|
+
/**
|
|
4759
|
+
* Emitted when the SpotterViz agent finishes responding.
|
|
4760
|
+
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
4761
|
+
* @example
|
|
4762
|
+
* ```js
|
|
4763
|
+
* liveboardEmbed.on(EmbedEvent.SpotterVizResponseComplete, (payload) => {
|
|
4764
|
+
* console.log('SpotterViz response complete', payload);
|
|
4765
|
+
* // payload: { sessionId: string, messageId: string }
|
|
4766
|
+
* })
|
|
4767
|
+
* ```
|
|
4768
|
+
*/
|
|
4769
|
+
SpotterVizResponseComplete = "SpotterVizResponseComplete",
|
|
4770
|
+
/**
|
|
4771
|
+
* Emitted when a checkpoint is created in the SpotterViz panel.
|
|
4772
|
+
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
4773
|
+
* @example
|
|
4774
|
+
* ```js
|
|
4775
|
+
* liveboardEmbed.on(EmbedEvent.SpotterVizCheckpointCreated, (payload) => {
|
|
4776
|
+
* console.log('SpotterViz checkpoint created', payload);
|
|
4777
|
+
* // payload: { checkpointId: string, source: string, label: string }
|
|
4778
|
+
* })
|
|
4779
|
+
* ```
|
|
4780
|
+
*/
|
|
4781
|
+
SpotterVizCheckpointCreated = "SpotterVizCheckpointCreated",
|
|
4782
|
+
/**
|
|
4783
|
+
* Emitted when a checkpoint is restored in the SpotterViz panel.
|
|
4784
|
+
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
4785
|
+
* @example
|
|
4786
|
+
* ```js
|
|
4787
|
+
* liveboardEmbed.on(EmbedEvent.SpotterVizCheckpointRestored, (payload) => {
|
|
4788
|
+
* console.log('SpotterViz checkpoint restored', payload);
|
|
4789
|
+
* // payload: { checkpointId: string, newGenNumber: number }
|
|
4790
|
+
* })
|
|
4791
|
+
* ```
|
|
4792
|
+
*/
|
|
4793
|
+
SpotterVizCheckpointRestored = "SpotterVizCheckpointRestored",
|
|
4794
|
+
/**
|
|
4795
|
+
* Emitted when an error occurs in the SpotterViz panel.
|
|
4796
|
+
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
4797
|
+
* @example
|
|
4798
|
+
* ```js
|
|
4799
|
+
* liveboardEmbed.on(EmbedEvent.SpotterVizError, (payload) => {
|
|
4800
|
+
* console.log('SpotterViz error', payload);
|
|
4801
|
+
* })
|
|
4802
|
+
* ```
|
|
4803
|
+
*/
|
|
4804
|
+
SpotterVizError = "SpotterVizError",
|
|
4805
|
+
/**
|
|
4806
|
+
* Emitted when the SpotterViz panel is closed.
|
|
4807
|
+
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
4808
|
+
* @example
|
|
4809
|
+
* ```js
|
|
4810
|
+
* liveboardEmbed.on(EmbedEvent.SpotterVizClosed, (payload) => {
|
|
4811
|
+
* console.log('SpotterViz panel closed', payload);
|
|
4812
|
+
* })
|
|
4813
|
+
* ```
|
|
4814
|
+
*/
|
|
4815
|
+
SpotterVizClosed = "SpotterVizClosed",
|
|
4816
|
+
/**
|
|
4817
|
+
* Emitted when a user clicks the **Refresh** button in the
|
|
4818
|
+
* Liveboard header. Requires `enableLiveboardDataCache`
|
|
4819
|
+
* to be enabled.
|
|
4820
|
+
* @example
|
|
4821
|
+
* ```js
|
|
4822
|
+
* liveboardEmbed.on(EmbedEvent.RefreshLiveboardBrowserCache, (payload) => {
|
|
4823
|
+
* console.log('Liveboard browser cache refreshed', payload);
|
|
4824
|
+
* // payload: { liveboardId: string }
|
|
4825
|
+
* })
|
|
4826
|
+
* ```
|
|
4827
|
+
* @version SDK: 1.49.0 | ThoughtSpot Cloud: 26.6.0.cl
|
|
4828
|
+
*/
|
|
4829
|
+
RefreshLiveboardBrowserCache = "refreshLiveboardBrowserCache"
|
|
4562
4830
|
}
|
|
4563
4831
|
/**
|
|
4564
4832
|
* Event types that can be triggered by the host application
|
|
@@ -6628,7 +6896,38 @@ export declare enum HostEvent {
|
|
|
6628
6896
|
* ```
|
|
6629
6897
|
* @version SDK: 1.48.0 | ThoughtSpot Cloud: 26.5.0.cl
|
|
6630
6898
|
*/
|
|
6631
|
-
SendTestScheduleEmail = "sendTestScheduleEmail"
|
|
6899
|
+
SendTestScheduleEmail = "sendTestScheduleEmail",
|
|
6900
|
+
/**
|
|
6901
|
+
* Sends a user message (prompt) to the SpotterViz panel programmatically.
|
|
6902
|
+
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
6903
|
+
* @param query - the prompt text to send.
|
|
6904
|
+
* @example
|
|
6905
|
+
* ```js
|
|
6906
|
+
* liveboardEmbed.trigger(HostEvent.SpotterVizSendUserMessage, {
|
|
6907
|
+
* query: 'Show me revenue by region',
|
|
6908
|
+
* });
|
|
6909
|
+
* ```
|
|
6910
|
+
*/
|
|
6911
|
+
SpotterVizSendUserMessage = "SpotterVizSendUserMessage",
|
|
6912
|
+
/**
|
|
6913
|
+
* Initializes a new SpotterViz conversation.
|
|
6914
|
+
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
6915
|
+
* @example
|
|
6916
|
+
* ```js
|
|
6917
|
+
* liveboardEmbed.trigger(HostEvent.InitSpotterVizConversation);
|
|
6918
|
+
* ```
|
|
6919
|
+
*/
|
|
6920
|
+
InitSpotterVizConversation = "InitSpotterVizConversation",
|
|
6921
|
+
/**
|
|
6922
|
+
* Clears browser cache and fetches new data for liveboard ChartViz Containers.
|
|
6923
|
+
* Requires `enableLiveboardDataCache` to be enabled.
|
|
6924
|
+
* @example
|
|
6925
|
+
* ```js
|
|
6926
|
+
* liveboardEmbed.trigger(HostEvent.RefreshLiveboardBrowserCache);
|
|
6927
|
+
* ```
|
|
6928
|
+
* @version SDK: 1.49.0 | ThoughtSpot Cloud: 26.6.0.cl
|
|
6929
|
+
*/
|
|
6930
|
+
RefreshLiveboardBrowserCache = "refreshLiveboardBrowserCache"
|
|
6632
6931
|
}
|
|
6633
6932
|
/**
|
|
6634
6933
|
* The different visual modes that the data sources panel within
|
|
@@ -6648,6 +6947,13 @@ export declare enum DataSourceVisualMode {
|
|
|
6648
6947
|
*/
|
|
6649
6948
|
Expanded = "expand"
|
|
6650
6949
|
}
|
|
6950
|
+
/**
|
|
6951
|
+
* Configuration for allowed file types in Spotter file upload.
|
|
6952
|
+
* @group Embed components
|
|
6953
|
+
*/
|
|
6954
|
+
export type SpotterFileUploadFileTypes = {
|
|
6955
|
+
types?: string[];
|
|
6956
|
+
};
|
|
6651
6957
|
/**
|
|
6652
6958
|
* ThoughtSpot application pages include actions and menu commands
|
|
6653
6959
|
* for various user-initiated operations. These actions are represented
|
|
@@ -6984,6 +7290,20 @@ export declare enum Action {
|
|
|
6984
7290
|
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
6985
7291
|
*/
|
|
6986
7292
|
DownloadLiveboardAsContinuousPDF = "downloadLiveboardAsContinuousPDF",
|
|
7293
|
+
/**
|
|
7294
|
+
* The Download Liveboard as A4 PDF menu action on a Liveboard.
|
|
7295
|
+
* Allows downloading the entire Liveboard as an A4 PDF.
|
|
7296
|
+
* Requires {@link Action.DownloadLiveboard} as a parent action when
|
|
7297
|
+
* {@link LiveboardViewConfig.isLiveboardXLSXCSVDownloadEnabled} or
|
|
7298
|
+
* {@link LiveboardViewConfig.isContinuousLiveboardPDFEnabled} flags are enabled.
|
|
7299
|
+
* Use this instead of {@link Action.DownloadAsPdf} when either flag is on.
|
|
7300
|
+
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
7301
|
+
* @example
|
|
7302
|
+
* ```js
|
|
7303
|
+
* disabledActions: [Action.DownloadLiveboardAsA4Pdf]
|
|
7304
|
+
* ```
|
|
7305
|
+
*/
|
|
7306
|
+
DownloadLiveboardAsA4Pdf = "downloadLiveboardAsA4Pdf",
|
|
6987
7307
|
/**
|
|
6988
7308
|
* The **Download Liveboard as XLSX** menu action on a Liveboard.
|
|
6989
7309
|
* Allows downloading the entire Liveboard as an XLSX file.
|
|
@@ -8295,7 +8615,51 @@ export declare enum Action {
|
|
|
8295
8615
|
* ```
|
|
8296
8616
|
* @version SDK: 1.48.0 | ThoughtSpot Cloud: 26.5.0.cl
|
|
8297
8617
|
*/
|
|
8298
|
-
SendTestScheduleEmail = "sendTestScheduleEmail"
|
|
8618
|
+
SendTestScheduleEmail = "sendTestScheduleEmail",
|
|
8619
|
+
/**
|
|
8620
|
+
* The thumbs up/down feedback buttons in the SpotterViz panel.
|
|
8621
|
+
* Visible by default.
|
|
8622
|
+
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
8623
|
+
* @example
|
|
8624
|
+
* ```js
|
|
8625
|
+
* hiddenActions: [Action.SpotterVizFeedback]
|
|
8626
|
+
* disabledActions: [Action.SpotterVizFeedback]
|
|
8627
|
+
* ```
|
|
8628
|
+
*/
|
|
8629
|
+
SpotterVizFeedback = "spotterVizFeedback",
|
|
8630
|
+
/**
|
|
8631
|
+
* The version restore button on checkpoint cards in the SpotterViz panel.
|
|
8632
|
+
* Visible by default.
|
|
8633
|
+
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
8634
|
+
* @example
|
|
8635
|
+
* ```js
|
|
8636
|
+
* hiddenActions: [Action.SpotterVizCheckpointRestore]
|
|
8637
|
+
* disabledActions: [Action.SpotterVizCheckpointRestore]
|
|
8638
|
+
* ```
|
|
8639
|
+
*/
|
|
8640
|
+
SpotterVizCheckpointRestore = "spotterVizCheckpointRestore",
|
|
8641
|
+
/**
|
|
8642
|
+
* The **SpotterViz** button in the top edit header.
|
|
8643
|
+
* Visible by default.
|
|
8644
|
+
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
8645
|
+
* @example
|
|
8646
|
+
* ```js
|
|
8647
|
+
* hiddenActions: [Action.SpotterViz]
|
|
8648
|
+
* disabledActions: [Action.SpotterViz]
|
|
8649
|
+
* ```
|
|
8650
|
+
*/
|
|
8651
|
+
SpotterViz = "spotterViz",
|
|
8652
|
+
/**
|
|
8653
|
+
* Clears browser cache and fetches new data for liveboard ChartViz Containers.
|
|
8654
|
+
* Requires `enableLiveboardDataCache` to be enabled.
|
|
8655
|
+
* @example
|
|
8656
|
+
* ```js
|
|
8657
|
+
* disabledActions: [Action.RefreshLiveboardBrowserCache]
|
|
8658
|
+
* hiddenActions: [Action.RefreshLiveboardBrowserCache]
|
|
8659
|
+
* ```
|
|
8660
|
+
* @version SDK: 1.49.0 | ThoughtSpot Cloud: 26.6.0.cl
|
|
8661
|
+
*/
|
|
8662
|
+
RefreshLiveboardBrowserCache = "refreshLiveboardBrowserCache"
|
|
8299
8663
|
}
|
|
8300
8664
|
export declare enum PrefetchFeatures {
|
|
8301
8665
|
FullApp = "FullApp",
|
|
@@ -9550,7 +9914,7 @@ declare class TsEmbed {
|
|
|
9550
9914
|
/**
|
|
9551
9915
|
* The DOM node where the ThoughtSpot app is to be embedded.
|
|
9552
9916
|
*/
|
|
9553
|
-
protected
|
|
9917
|
+
protected hostElement: HTMLElement;
|
|
9554
9918
|
/**
|
|
9555
9919
|
* The key to store the embed instance in the DOM node
|
|
9556
9920
|
*/
|
|
@@ -9606,6 +9970,7 @@ declare class TsEmbed {
|
|
|
9606
9970
|
private resizeObserver;
|
|
9607
9971
|
protected hostEventClient: HostEventClient;
|
|
9608
9972
|
protected isReadyForRenderPromise: Promise<void>;
|
|
9973
|
+
protected shouldWaitForRenderPromise: boolean;
|
|
9609
9974
|
/**
|
|
9610
9975
|
* Handler for fullscreen change events
|
|
9611
9976
|
*/
|
|
@@ -9739,6 +10104,10 @@ declare class TsEmbed {
|
|
|
9739
10104
|
protected getEmbedParamsObject(): Record<any, any>;
|
|
9740
10105
|
protected getRootIframeSrc(): string;
|
|
9741
10106
|
protected createIframeEl(frameSrc: string): HTMLIFrameElement;
|
|
10107
|
+
/**
|
|
10108
|
+
* Returns true if this embed instance is configured for pre-rendering.
|
|
10109
|
+
*/
|
|
10110
|
+
protected isPreRenderEmbed(): boolean;
|
|
9742
10111
|
protected handleInsertionIntoDOM(child: string | Node): void;
|
|
9743
10112
|
/**
|
|
9744
10113
|
* Renders the embedded ThoughtSpot app in an iframe and sets up
|
|
@@ -9749,9 +10118,23 @@ declare class TsEmbed {
|
|
|
9749
10118
|
protected createPreRenderWrapper(): HTMLDivElement;
|
|
9750
10119
|
protected preRenderWrapper: HTMLElement;
|
|
9751
10120
|
protected preRenderChild: HTMLElement;
|
|
10121
|
+
/**
|
|
10122
|
+
* Checks for an existing pre-rendered component and connects to it.
|
|
10123
|
+
*
|
|
10124
|
+
* If a matching pre-rendered component is found in the DOM, this method
|
|
10125
|
+
* sets the internal properties of the embed object to reference it.
|
|
10126
|
+
*
|
|
10127
|
+
* @returns True if a connection was successfully established, false otherwise.
|
|
10128
|
+
*/
|
|
9752
10129
|
protected connectPreRendered(): boolean;
|
|
9753
|
-
protected
|
|
10130
|
+
protected isPreRenderConnected(): boolean;
|
|
9754
10131
|
protected createPreRenderChild(child: string | Node): HTMLElement;
|
|
10132
|
+
/**
|
|
10133
|
+
* Creates the in-flow placeholder div inserted into the host element when
|
|
10134
|
+
* showPreRender() is called. The wrapper observes this element to stay
|
|
10135
|
+
* aligned with the host layout.
|
|
10136
|
+
*/
|
|
10137
|
+
private createPreRenderPlaceholder;
|
|
9755
10138
|
protected insertIntoDOMForPreRender(child: string | Node): void;
|
|
9756
10139
|
private showPreRenderByDefault;
|
|
9757
10140
|
protected insertIntoDOM(child: string | Node): void;
|
|
@@ -9848,10 +10231,10 @@ declare class TsEmbed {
|
|
|
9848
10231
|
*/
|
|
9849
10232
|
private triggerEventOnPort;
|
|
9850
10233
|
/**
|
|
9851
|
-
|
|
9852
|
-
|
|
9853
|
-
|
|
9854
|
-
|
|
10234
|
+
* @hidden
|
|
10235
|
+
* Internal state to track if the embed container is loaded.
|
|
10236
|
+
* This is used to trigger events after the embed container is loaded.
|
|
10237
|
+
*/
|
|
9855
10238
|
isEmbedContainerLoaded: boolean;
|
|
9856
10239
|
/**
|
|
9857
10240
|
* @hidden
|
|
@@ -9908,33 +10291,33 @@ declare class TsEmbed {
|
|
|
9908
10291
|
getIframeSrc(): string;
|
|
9909
10292
|
protected handleRenderForPrerender(): Promise<TsEmbed>;
|
|
9910
10293
|
/**
|
|
9911
|
-
|
|
9912
|
-
|
|
9913
|
-
|
|
9914
|
-
|
|
9915
|
-
|
|
9916
|
-
|
|
9917
|
-
|
|
9918
|
-
|
|
9919
|
-
|
|
9920
|
-
|
|
9921
|
-
|
|
9922
|
-
|
|
9923
|
-
|
|
9924
|
-
|
|
9925
|
-
|
|
9926
|
-
|
|
9927
|
-
|
|
9928
|
-
|
|
9929
|
-
|
|
9930
|
-
|
|
9931
|
-
|
|
9932
|
-
|
|
9933
|
-
|
|
9934
|
-
|
|
9935
|
-
|
|
9936
|
-
|
|
9937
|
-
|
|
10294
|
+
* Context object for the embedded component.
|
|
10295
|
+
* @returns {ContextObject} The current context object containing the page type and object ids.
|
|
10296
|
+
* @example
|
|
10297
|
+
* ```js
|
|
10298
|
+
* const context = await embed.getCurrentContext();
|
|
10299
|
+
* console.log(context);
|
|
10300
|
+
*
|
|
10301
|
+
* // Example output
|
|
10302
|
+
* {
|
|
10303
|
+
* stack: [
|
|
10304
|
+
* {
|
|
10305
|
+
* name: 'Liveboard',
|
|
10306
|
+
* type: ContextType.Liveboard,
|
|
10307
|
+
* objectIds: {
|
|
10308
|
+
* liveboardId: '123',
|
|
10309
|
+
* },
|
|
10310
|
+
* },
|
|
10311
|
+
* ],
|
|
10312
|
+
* currentContext: {
|
|
10313
|
+
* name: 'Liveboard',
|
|
10314
|
+
* type: ContextType.Liveboard,
|
|
10315
|
+
* objectIds: {
|
|
10316
|
+
* liveboardId: '123',
|
|
10317
|
+
* },
|
|
10318
|
+
* },
|
|
10319
|
+
* }
|
|
10320
|
+
* ```
|
|
9938
10321
|
* @version SDK: 1.45.2 | ThoughtSpot: 26.3.0.cl
|
|
9939
10322
|
*/
|
|
9940
10323
|
getCurrentContext(): Promise<ContextObject>;
|
|
@@ -9979,14 +10362,14 @@ declare class TsEmbed {
|
|
|
9979
10362
|
*/
|
|
9980
10363
|
prerenderGeneric(): Promise<any>;
|
|
9981
10364
|
protected beforePrerenderVisible(): void;
|
|
9982
|
-
private validatePreRenderViewConfig;
|
|
9983
10365
|
/**
|
|
9984
|
-
* Displays the
|
|
9985
|
-
* If the component
|
|
9986
|
-
*
|
|
9987
|
-
*
|
|
10366
|
+
* Displays the pre-rendered component inside the host element.
|
|
10367
|
+
* If the component has not been pre-rendered yet, it initiates rendering first.
|
|
10368
|
+
* Inserts a placeholder element into the host and positions the pre-render
|
|
10369
|
+
* wrapper to overlay it.
|
|
9988
10370
|
*/
|
|
9989
10371
|
showPreRender(): Promise<TsEmbed>;
|
|
10372
|
+
protected getPreRenderPlaceHolderElement(): HTMLDivElement;
|
|
9990
10373
|
/**
|
|
9991
10374
|
* Synchronizes the style properties of the PreRender component with the embedding
|
|
9992
10375
|
* element. This function adjusts the position, width, and height of the PreRender
|
|
@@ -10011,6 +10394,7 @@ declare class TsEmbed {
|
|
|
10011
10394
|
getPreRenderIds(): {
|
|
10012
10395
|
wrapper: string;
|
|
10013
10396
|
child: string;
|
|
10397
|
+
placeHolder: string;
|
|
10014
10398
|
};
|
|
10015
10399
|
/**
|
|
10016
10400
|
* Returns the answerService which can be used to make arbitrary graphql calls on top
|
|
@@ -10622,6 +11006,21 @@ export interface SpotterChatViewConfig {
|
|
|
10622
11006
|
* External MCP tool branding is not affected.
|
|
10623
11007
|
*/
|
|
10624
11008
|
toolResponseCardBrandingLabel?: string;
|
|
11009
|
+
/**
|
|
11010
|
+
* Enables file upload in the Spotter chat interface.
|
|
11011
|
+
*
|
|
11012
|
+
* Supported embed types: `SpotterEmbed`, `LiveboardEmbed`, `AppEmbed`
|
|
11013
|
+
* @version SDK: 1.49.0 | ThoughtSpot: 26.6.0.cl
|
|
11014
|
+
* @default false
|
|
11015
|
+
*/
|
|
11016
|
+
spotterFileUploadEnabled?: boolean;
|
|
11017
|
+
/**
|
|
11018
|
+
* Restricts the allowed file types for Spotter file upload.
|
|
11019
|
+
*
|
|
11020
|
+
* Supported embed types: `SpotterEmbed`, `LiveboardEmbed`, `AppEmbed`
|
|
11021
|
+
* @version SDK: 1.49.0 | ThoughtSpot: 26.6.0.cl
|
|
11022
|
+
*/
|
|
11023
|
+
spotterFileUploadFileTypes?: SpotterFileUploadFileTypes;
|
|
10625
11024
|
}
|
|
10626
11025
|
/**
|
|
10627
11026
|
* The configuration for the embedded spotterEmbed options.
|
|
@@ -10893,6 +11292,82 @@ declare class ConversationEmbed extends SpotterEmbed {
|
|
|
10893
11292
|
protected viewConfig: ConversationViewConfig;
|
|
10894
11293
|
constructor(container: HTMLElement, viewConfig: ConversationViewConfig);
|
|
10895
11294
|
}
|
|
11295
|
+
/**
|
|
11296
|
+
* Defines starter prompts displayed in the SpotterViz interface.
|
|
11297
|
+
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
11298
|
+
* @group Embed components
|
|
11299
|
+
*/
|
|
11300
|
+
export interface SpotterVizStarterPrompt {
|
|
11301
|
+
/** Identifier for the prompt. */
|
|
11302
|
+
id: string;
|
|
11303
|
+
/** Short label shown to the user as a clickable suggestion. */
|
|
11304
|
+
displayText: string;
|
|
11305
|
+
/** Full prompt text sent to Spotter when the user clicks the suggestion. */
|
|
11306
|
+
fullPrompt: string;
|
|
11307
|
+
}
|
|
11308
|
+
/**
|
|
11309
|
+
* Configuration for the SpotterViz interface shown on the Liveboard.
|
|
11310
|
+
* Supported embed types: `AppEmbed`, `LiveboardEmbed`
|
|
11311
|
+
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
11312
|
+
* @group Embed components
|
|
11313
|
+
* @example
|
|
11314
|
+
* ```js
|
|
11315
|
+
* const embed = new AppEmbed('#embed-container', {
|
|
11316
|
+
* ... // other options,
|
|
11317
|
+
* spotterViz: {
|
|
11318
|
+
* brandName: 'MyBrand',
|
|
11319
|
+
* brandHeadline: 'Hi, there! I\'m',
|
|
11320
|
+
* description: 'Ask questions about your data',
|
|
11321
|
+
* inputChatPlaceholder: 'Ask a question...',
|
|
11322
|
+
* hideStarterPrompts: false,
|
|
11323
|
+
* customStarterPrompts: [
|
|
11324
|
+
* { id: '1', displayText: 'Top products', fullPrompt: 'What are the top products by revenue?' }
|
|
11325
|
+
* ],
|
|
11326
|
+
* },
|
|
11327
|
+
* })
|
|
11328
|
+
* ```
|
|
11329
|
+
*/
|
|
11330
|
+
export interface SpotterVizConfig {
|
|
11331
|
+
/**
|
|
11332
|
+
* Rename the default "SpotterViz" label shown in the SpotterViz interface with a custom brand name.
|
|
11333
|
+
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
11334
|
+
* @default ''
|
|
11335
|
+
*/
|
|
11336
|
+
brandName?: string;
|
|
11337
|
+
/**
|
|
11338
|
+
* Custom headline text shown before the brand name in the SpotterViz interface.
|
|
11339
|
+
* Replaces the default greeting prefix (e.g. "Hi, there! I'm").
|
|
11340
|
+
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
11341
|
+
* @default ''
|
|
11342
|
+
*/
|
|
11343
|
+
brandHeadline?: string;
|
|
11344
|
+
/**
|
|
11345
|
+
* Hides the starter prompts section entirely in the SpotterViz interface.
|
|
11346
|
+
* When set to `true`, the starter prompts are not displayed.
|
|
11347
|
+
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
11348
|
+
* @default false
|
|
11349
|
+
*/
|
|
11350
|
+
hideStarterPrompts?: boolean;
|
|
11351
|
+
/**
|
|
11352
|
+
* Overrides the starter prompts with a custom list.
|
|
11353
|
+
* Each entry must match the {@link SpotterVizStarterPrompt} shape.
|
|
11354
|
+
* Has no effect when `hideStarterPrompts` is `true`.
|
|
11355
|
+
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
11356
|
+
*/
|
|
11357
|
+
customStarterPrompts?: SpotterVizStarterPrompt[];
|
|
11358
|
+
/**
|
|
11359
|
+
* Custom description text shown in the SpotterViz interface.
|
|
11360
|
+
* Replaces the default SpotterViz description.
|
|
11361
|
+
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
11362
|
+
*/
|
|
11363
|
+
description?: string;
|
|
11364
|
+
/**
|
|
11365
|
+
* Custom placeholder text for the chat input in the SpotterViz interface.
|
|
11366
|
+
* Replaces the default chat input placeholder text.
|
|
11367
|
+
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
11368
|
+
*/
|
|
11369
|
+
inputChatPlaceholder?: string;
|
|
11370
|
+
}
|
|
10896
11371
|
/**
|
|
10897
11372
|
* Pages within the ThoughtSpot app that can be embedded.
|
|
10898
11373
|
*/
|
|
@@ -10971,7 +11446,15 @@ declare enum HomePage {
|
|
|
10971
11446
|
* ModularWithStylingChanges (v3) introduces Modular Home Experience
|
|
10972
11447
|
* with styling changes.
|
|
10973
11448
|
*/
|
|
10974
|
-
ModularWithStylingChanges = "v3"
|
|
11449
|
+
ModularWithStylingChanges = "v3",
|
|
11450
|
+
/**
|
|
11451
|
+
* Focused (v4) introduces the V4 homepage experience
|
|
11452
|
+
* in which Watchlist and recents and incorporated together
|
|
11453
|
+
* to form a more focused homepage.
|
|
11454
|
+
* Pre-requisite : spotter enablement
|
|
11455
|
+
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
11456
|
+
*/
|
|
11457
|
+
Focused = "v4"
|
|
10975
11458
|
}
|
|
10976
11459
|
declare enum ListPage {
|
|
10977
11460
|
/**
|
|
@@ -11399,6 +11882,21 @@ export interface AppViewConfig extends AllEmbedViewConfig {
|
|
|
11399
11882
|
* ```
|
|
11400
11883
|
*/
|
|
11401
11884
|
isUnifiedSearchExperienceEnabled?: boolean;
|
|
11885
|
+
/**
|
|
11886
|
+
* This flag is used to enable the new connection experience for AppEmbed.
|
|
11887
|
+
*
|
|
11888
|
+
* Supported embed types: `AppEmbed`
|
|
11889
|
+
* @version SDK: 1.51.0 | ThoughtSpot Cloud: 26.8.0.cl
|
|
11890
|
+
* @default false
|
|
11891
|
+
* @example
|
|
11892
|
+
* ```js
|
|
11893
|
+
* const embed = new AppEmbed('#tsEmbed', {
|
|
11894
|
+
* ... // other embed view config
|
|
11895
|
+
* newConnectionsExperience: true,
|
|
11896
|
+
* })
|
|
11897
|
+
* ```
|
|
11898
|
+
*/
|
|
11899
|
+
newConnectionsExperience?: boolean;
|
|
11402
11900
|
/**
|
|
11403
11901
|
* This flag is used to enable/disable the styling and grouping in a Liveboard. Use {@link isLiveboardMasterpiecesEnabled} instead.
|
|
11404
11902
|
* @deprecated This flag is deprecated.
|
|
@@ -11499,6 +11997,17 @@ export interface AppViewConfig extends AllEmbedViewConfig {
|
|
|
11499
11997
|
* ```
|
|
11500
11998
|
*/
|
|
11501
11999
|
lazyLoadingForFullHeight?: boolean;
|
|
12000
|
+
/**
|
|
12001
|
+
* This flag is used to enable container-aware full height lazy loading.
|
|
12002
|
+
*
|
|
12003
|
+
* Use this when the embed is rendered inside a scrollable or clipping
|
|
12004
|
+
* container instead of relying on the browser window as the only viewport.
|
|
12005
|
+
*
|
|
12006
|
+
* @type {boolean}
|
|
12007
|
+
* @default false
|
|
12008
|
+
* @hidden
|
|
12009
|
+
*/
|
|
12010
|
+
enableScrollableContainerLazyLoading?: boolean;
|
|
11502
12011
|
/**
|
|
11503
12012
|
* The margin to be used for lazy loading.
|
|
11504
12013
|
*
|
|
@@ -11585,6 +12094,29 @@ export interface AppViewConfig extends AllEmbedViewConfig {
|
|
|
11585
12094
|
* ```
|
|
11586
12095
|
*/
|
|
11587
12096
|
spotterChatConfig?: SpotterChatViewConfig;
|
|
12097
|
+
/**
|
|
12098
|
+
* Configuration for the SpotterViz interface shown on the Liveboard.
|
|
12099
|
+
* Customize the brand name, description, chat input placeholder,
|
|
12100
|
+
* starter prompts, and visibility of starter prompts in the SpotterViz panel.
|
|
12101
|
+
*
|
|
12102
|
+
* Supported embed types: `AppEmbed`, `LiveboardEmbed`
|
|
12103
|
+
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
12104
|
+
* @example
|
|
12105
|
+
* ```js
|
|
12106
|
+
* const embed = new AppEmbed('#embed-container', {
|
|
12107
|
+
* ... // other options
|
|
12108
|
+
* spotterViz: {
|
|
12109
|
+
* brandName: 'MyBrand',
|
|
12110
|
+
* brandHeadline: 'Hi, there! I\'m',
|
|
12111
|
+
* description: 'Ask questions about your data',
|
|
12112
|
+
* inputChatPlaceholder: 'Ask a question...',
|
|
12113
|
+
* hideStarterPrompts: false,
|
|
12114
|
+
* customStarterPrompts: [{ id: '1', displayText: 'Top products', fullPrompt: 'What are the top products by revenue?' }]
|
|
12115
|
+
* },
|
|
12116
|
+
* })
|
|
12117
|
+
* ```
|
|
12118
|
+
*/
|
|
12119
|
+
spotterViz?: SpotterVizConfig;
|
|
11588
12120
|
/**
|
|
11589
12121
|
* Enables the stop answer generation button in the Spotter embed UI,
|
|
11590
12122
|
* allowing users to interrupt an ongoing answer generation.
|
|
@@ -11653,11 +12185,14 @@ export interface AppViewConfig extends AllEmbedViewConfig {
|
|
|
11653
12185
|
export interface AppEmbedAppInitData extends DefaultAppInitData {
|
|
11654
12186
|
embedParams?: {
|
|
11655
12187
|
spotterSidebarConfig?: SpotterSidebarViewConfig;
|
|
12188
|
+
spotterVizConfig?: SpotterVizConfig;
|
|
11656
12189
|
};
|
|
11657
12190
|
}
|
|
11658
12191
|
declare class AppEmbed extends V1Embed {
|
|
11659
12192
|
protected viewConfig: AppViewConfig;
|
|
11660
12193
|
private defaultHeight;
|
|
12194
|
+
private lazyLoadScrollContainers;
|
|
12195
|
+
private lazyLoadResizeObserver;
|
|
11661
12196
|
constructor(domSelector: DOMSelector, viewConfig: AppViewConfig);
|
|
11662
12197
|
/**
|
|
11663
12198
|
* Extends the default APP_INIT payload with `embedParams.spotterSidebarConfig`
|
|
@@ -11737,6 +12272,15 @@ declare class AppEmbed extends V1Embed {
|
|
|
11737
12272
|
*/
|
|
11738
12273
|
render(): Promise<AppEmbed>;
|
|
11739
12274
|
}
|
|
12275
|
+
/**
|
|
12276
|
+
* APP_INIT data shape for LiveboardEmbed.
|
|
12277
|
+
* @internal
|
|
12278
|
+
*/
|
|
12279
|
+
export interface LiveboardEmbedAppInitData extends DefaultAppInitData {
|
|
12280
|
+
embedParams?: {
|
|
12281
|
+
spotterVizConfig?: SpotterVizConfig;
|
|
12282
|
+
};
|
|
12283
|
+
}
|
|
11740
12284
|
/**
|
|
11741
12285
|
* The configuration for the embedded Liveboard or visualization page view.
|
|
11742
12286
|
* @group Embed components
|
|
@@ -12155,6 +12699,16 @@ export interface LiveboardViewConfig extends BaseViewConfig, SearchLiveboardComm
|
|
|
12155
12699
|
* ```
|
|
12156
12700
|
*/
|
|
12157
12701
|
lazyLoadingForFullHeight?: boolean;
|
|
12702
|
+
/**
|
|
12703
|
+
* This flag is used to enable container-aware full height lazy loading.
|
|
12704
|
+
*
|
|
12705
|
+
* Use this when the embed is rendered inside a scrollable or clipping
|
|
12706
|
+
* container instead of relying on the browser window as the only viewport.
|
|
12707
|
+
*
|
|
12708
|
+
* @type {boolean}
|
|
12709
|
+
* @default false
|
|
12710
|
+
*/
|
|
12711
|
+
enableScrollableContainerLazyLoading?: boolean;
|
|
12158
12712
|
/**
|
|
12159
12713
|
* The margin to be used for lazy loading.
|
|
12160
12714
|
*
|
|
@@ -12236,6 +12790,29 @@ export interface LiveboardViewConfig extends BaseViewConfig, SearchLiveboardComm
|
|
|
12236
12790
|
* ```
|
|
12237
12791
|
*/
|
|
12238
12792
|
spotterChatConfig?: SpotterChatViewConfig;
|
|
12793
|
+
/**
|
|
12794
|
+
* Configuration for the SpotterViz interface shown on the Liveboard.
|
|
12795
|
+
* Customize the brand name, description, chat input placeholder,
|
|
12796
|
+
* starter prompts, and visibility of starter prompts in the SpotterViz panel.
|
|
12797
|
+
*
|
|
12798
|
+
* Supported embed types: `AppEmbed`, `LiveboardEmbed`
|
|
12799
|
+
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
12800
|
+
* @example
|
|
12801
|
+
* ```js
|
|
12802
|
+
* const embed = new LiveboardEmbed('#embed-container', {
|
|
12803
|
+
* ... // other options
|
|
12804
|
+
* spotterViz: {
|
|
12805
|
+
* brandName: 'MyBrand',
|
|
12806
|
+
* brandHeadline: 'Hi, there! I\'m',
|
|
12807
|
+
* description: 'Ask questions about your data',
|
|
12808
|
+
* inputChatPlaceholder: 'Ask a question...',
|
|
12809
|
+
* hideStarterPrompts: false,
|
|
12810
|
+
* customStarterPrompts: [{ id: '1', displayText: 'Top products', fullPrompt: 'What are the top products by revenue?' }],
|
|
12811
|
+
* },
|
|
12812
|
+
* })
|
|
12813
|
+
* ```
|
|
12814
|
+
*/
|
|
12815
|
+
spotterViz?: SpotterVizConfig;
|
|
12239
12816
|
/**
|
|
12240
12817
|
* If set to true, enables visualization data caching on the Liveboard.
|
|
12241
12818
|
* @type {boolean}
|
|
@@ -12253,7 +12830,10 @@ export interface LiveboardViewConfig extends BaseViewConfig, SearchLiveboardComm
|
|
|
12253
12830
|
declare class LiveboardEmbed extends V1Embed {
|
|
12254
12831
|
protected viewConfig: LiveboardViewConfig;
|
|
12255
12832
|
private defaultHeight;
|
|
12833
|
+
private lazyLoadScrollContainers;
|
|
12834
|
+
private lazyLoadResizeObserver;
|
|
12256
12835
|
constructor(domSelector: DOMSelector, viewConfig: LiveboardViewConfig);
|
|
12836
|
+
protected getAppInitData(): Promise<LiveboardEmbedAppInitData>;
|
|
12257
12837
|
/**
|
|
12258
12838
|
* Construct a map of params to be passed on to the
|
|
12259
12839
|
* embedded Liveboard or visualization.
|