@thoughtspot/visual-embed-sdk 1.51.2 → 1.52.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 +9 -1
- package/cjs/src/api-intercept.d.ts.map +1 -1
- package/cjs/src/api-intercept.js +1 -0
- package/cjs/src/api-intercept.js.map +1 -1
- package/cjs/src/contracts/contracts.spec.d.ts +2 -0
- package/cjs/src/contracts/contracts.spec.d.ts.map +1 -0
- package/cjs/src/contracts/contracts.spec.js +345 -0
- package/cjs/src/contracts/contracts.spec.js.map +1 -0
- package/cjs/src/contracts/embed-event-payloads.d.ts +73 -0
- package/cjs/src/contracts/embed-event-payloads.d.ts.map +1 -0
- package/cjs/src/contracts/embed-event-payloads.js +3 -0
- package/cjs/src/contracts/embed-event-payloads.js.map +1 -0
- package/cjs/src/contracts/host-event-contracts.d.ts +378 -0
- package/cjs/src/contracts/host-event-contracts.d.ts.map +1 -0
- package/cjs/src/contracts/host-event-contracts.js +3 -0
- package/cjs/src/contracts/host-event-contracts.js.map +1 -0
- package/cjs/src/contracts/index.d.ts +22 -0
- package/cjs/src/contracts/index.d.ts.map +1 -0
- package/cjs/src/contracts/index.js +33 -0
- package/cjs/src/contracts/index.js.map +1 -0
- package/cjs/src/contracts/ui-passthrough-contracts.d.ts +277 -0
- package/cjs/src/contracts/ui-passthrough-contracts.d.ts.map +1 -0
- package/cjs/src/{embed/hostEventClient/contracts.js → contracts/ui-passthrough-contracts.js} +6 -2
- package/cjs/src/contracts/ui-passthrough-contracts.js.map +1 -0
- package/cjs/src/css-variables.d.ts +1 -1
- package/cjs/src/embed/app.d.ts +17 -140
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +20 -120
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/app.spec.js +70 -26
- package/cjs/src/embed/app.spec.js.map +1 -1
- package/cjs/src/embed/conversation.d.ts +5 -5
- package/cjs/src/embed/events.spec.js +12 -2
- package/cjs/src/embed/events.spec.js.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.d.ts +3 -2
- package/cjs/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.js +23 -18
- package/cjs/src/embed/hostEventClient/host-event-client.js.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.spec.js +36 -36
- package/cjs/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
- package/cjs/src/embed/hostEventClient/utils.d.ts +1 -1
- package/cjs/src/embed/hostEventClient/utils.d.ts.map +1 -1
- package/cjs/src/embed/hostEventClient/utils.js +3 -3
- package/cjs/src/embed/hostEventClient/utils.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts +9 -161
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +68 -135
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/liveboard.spec.js +215 -32
- package/cjs/src/embed/liveboard.spec.js.map +1 -1
- package/cjs/src/embed/search.d.ts +14 -0
- package/cjs/src/embed/search.d.ts.map +1 -1
- package/cjs/src/embed/search.js +4 -1
- package/cjs/src/embed/search.js.map +1 -1
- package/cjs/src/embed/search.spec.js +65 -0
- package/cjs/src/embed/search.spec.js.map +1 -1
- package/cjs/src/embed/ts-embed.d.ts +21 -25
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +105 -72
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/embed/ts-embed.spec.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.spec.js +380 -33
- package/cjs/src/embed/ts-embed.spec.js.map +1 -1
- package/cjs/src/full-height.d.ts +137 -0
- package/cjs/src/full-height.d.ts.map +1 -0
- package/cjs/src/full-height.js +272 -0
- package/cjs/src/full-height.js.map +1 -0
- package/cjs/src/full-height.spec.d.ts +2 -0
- package/cjs/src/full-height.spec.d.ts.map +1 -0
- package/cjs/src/full-height.spec.js +835 -0
- package/cjs/src/full-height.spec.js.map +1 -0
- package/cjs/src/index.d.ts +4 -3
- package/cjs/src/index.d.ts.map +1 -1
- package/cjs/src/index.js +5 -4
- package/cjs/src/index.js.map +1 -1
- package/cjs/src/react/all-types-export.d.ts +1 -1
- package/cjs/src/react/all-types-export.d.ts.map +1 -1
- package/cjs/src/react/all-types-export.js +2 -1
- package/cjs/src/react/all-types-export.js.map +1 -1
- package/cjs/src/react/all-types-export.parity.spec.js +55 -3
- package/cjs/src/react/all-types-export.parity.spec.js.map +1 -1
- package/cjs/src/react/index.d.ts +8 -8
- package/cjs/src/react/index.d.ts.map +1 -1
- package/cjs/src/react/index.js +1 -1
- package/cjs/src/react/index.js.map +1 -1
- package/cjs/src/react/index.spec.js +7 -7
- package/cjs/src/react/index.spec.js.map +1 -1
- package/cjs/src/types.d.ts +664 -39
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +406 -13
- package/cjs/src/types.js.map +1 -1
- package/cjs/src/utils/processTrigger.d.ts +3 -1
- package/cjs/src/utils/processTrigger.d.ts.map +1 -1
- package/cjs/src/utils/processTrigger.js +19 -51
- package/cjs/src/utils/processTrigger.js.map +1 -1
- package/cjs/src/utils/transport/iframe-transport.d.ts +55 -0
- package/cjs/src/utils/transport/iframe-transport.d.ts.map +1 -0
- package/cjs/src/utils/transport/iframe-transport.js +108 -0
- package/cjs/src/utils/transport/iframe-transport.js.map +1 -0
- package/cjs/src/utils/transport/iframe-transport.spec.d.ts +2 -0
- package/cjs/src/utils/transport/iframe-transport.spec.d.ts.map +1 -0
- package/cjs/src/utils/transport/iframe-transport.spec.js +140 -0
- package/cjs/src/utils/transport/iframe-transport.spec.js.map +1 -0
- package/cjs/src/utils.d.ts +18 -0
- package/cjs/src/utils.d.ts.map +1 -1
- package/cjs/src/utils.js +39 -1
- package/cjs/src/utils.js.map +1 -1
- package/cjs/src/utils.spec.js +62 -0
- package/cjs/src/utils.spec.js.map +1 -1
- package/dist/{index-D8_Zs-Nr.js → index-C1pmYb5H.js} +1 -1
- package/dist/src/api-intercept.d.ts.map +1 -1
- package/dist/src/contracts/contracts.spec.d.ts +2 -0
- package/dist/src/contracts/contracts.spec.d.ts.map +1 -0
- package/dist/src/contracts/embed-event-payloads.d.ts +73 -0
- package/dist/src/contracts/embed-event-payloads.d.ts.map +1 -0
- package/dist/src/contracts/host-event-contracts.d.ts +378 -0
- package/dist/src/contracts/host-event-contracts.d.ts.map +1 -0
- package/dist/src/contracts/index.d.ts +22 -0
- package/dist/src/contracts/index.d.ts.map +1 -0
- package/dist/src/contracts/ui-passthrough-contracts.d.ts +277 -0
- package/dist/src/contracts/ui-passthrough-contracts.d.ts.map +1 -0
- package/dist/src/css-variables.d.ts +1 -1
- package/dist/src/embed/app.d.ts +17 -140
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/conversation.d.ts +5 -5
- package/dist/src/embed/hostEventClient/host-event-client.d.ts +3 -2
- package/dist/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/dist/src/embed/hostEventClient/utils.d.ts +1 -1
- package/dist/src/embed/hostEventClient/utils.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts +9 -161
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/embed/search.d.ts +14 -0
- package/dist/src/embed/search.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.d.ts +21 -25
- package/dist/src/embed/ts-embed.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.spec.d.ts.map +1 -1
- package/dist/src/full-height.d.ts +137 -0
- package/dist/src/full-height.d.ts.map +1 -0
- package/dist/src/full-height.spec.d.ts +2 -0
- package/dist/src/full-height.spec.d.ts.map +1 -0
- package/dist/src/index.d.ts +4 -3
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/react/all-types-export.d.ts +1 -1
- package/dist/src/react/all-types-export.d.ts.map +1 -1
- package/dist/src/react/index.d.ts +8 -8
- package/dist/src/react/index.d.ts.map +1 -1
- package/dist/src/types.d.ts +664 -39
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/processTrigger.d.ts +3 -1
- package/dist/src/utils/processTrigger.d.ts.map +1 -1
- package/dist/src/utils/transport/iframe-transport.d.ts +55 -0
- package/dist/src/utils/transport/iframe-transport.d.ts.map +1 -0
- package/dist/src/utils/transport/iframe-transport.spec.d.ts +2 -0
- package/dist/src/utils/transport/iframe-transport.spec.d.ts.map +1 -0
- package/dist/src/utils.d.ts +18 -0
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +1031 -392
- package/dist/tsembed-react.js +1030 -391
- package/dist/tsembed.es.js +1031 -392
- package/dist/tsembed.js +1029 -390
- package/dist/visual-embed-sdk-react-full.d.ts +1483 -693
- package/dist/visual-embed-sdk-react.d.ts +1364 -647
- package/dist/visual-embed-sdk.d.ts +1426 -659
- package/lib/package.json +9 -1
- package/lib/src/api-intercept.d.ts.map +1 -1
- package/lib/src/api-intercept.js +2 -1
- package/lib/src/api-intercept.js.map +1 -1
- package/lib/src/contracts/contracts.spec.d.ts +2 -0
- package/lib/src/contracts/contracts.spec.d.ts.map +1 -0
- package/lib/src/contracts/contracts.spec.js +342 -0
- package/lib/src/contracts/contracts.spec.js.map +1 -0
- package/lib/src/contracts/embed-event-payloads.d.ts +73 -0
- package/lib/src/contracts/embed-event-payloads.d.ts.map +1 -0
- package/lib/src/contracts/embed-event-payloads.js +2 -0
- package/lib/src/contracts/embed-event-payloads.js.map +1 -0
- package/lib/src/contracts/host-event-contracts.d.ts +378 -0
- package/lib/src/contracts/host-event-contracts.d.ts.map +1 -0
- package/lib/src/contracts/host-event-contracts.js +2 -0
- package/lib/src/contracts/host-event-contracts.js.map +1 -0
- package/lib/src/contracts/index.d.ts +22 -0
- package/lib/src/contracts/index.d.ts.map +1 -0
- package/lib/src/contracts/index.js +22 -0
- package/lib/src/contracts/index.js.map +1 -0
- package/lib/src/contracts/ui-passthrough-contracts.d.ts +277 -0
- package/lib/src/contracts/ui-passthrough-contracts.d.ts.map +1 -0
- package/lib/src/{embed/hostEventClient/contracts.js → contracts/ui-passthrough-contracts.js} +6 -2
- package/lib/src/contracts/ui-passthrough-contracts.js.map +1 -0
- package/lib/src/css-variables.d.ts +1 -1
- package/lib/src/embed/app.d.ts +17 -140
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +22 -122
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/app.spec.js +70 -26
- package/lib/src/embed/app.spec.js.map +1 -1
- package/lib/src/embed/conversation.d.ts +5 -5
- package/lib/src/embed/events.spec.js +12 -2
- package/lib/src/embed/events.spec.js.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.d.ts +3 -2
- package/lib/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.js +6 -1
- package/lib/src/embed/hostEventClient/host-event-client.js.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.spec.js +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
- package/lib/src/embed/hostEventClient/utils.d.ts +1 -1
- package/lib/src/embed/hostEventClient/utils.d.ts.map +1 -1
- package/lib/src/embed/hostEventClient/utils.js +1 -1
- package/lib/src/embed/hostEventClient/utils.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts +9 -161
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +70 -137
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +215 -32
- package/lib/src/embed/liveboard.spec.js.map +1 -1
- package/lib/src/embed/search.d.ts +14 -0
- package/lib/src/embed/search.d.ts.map +1 -1
- package/lib/src/embed/search.js +4 -1
- package/lib/src/embed/search.js.map +1 -1
- package/lib/src/embed/search.spec.js +65 -0
- package/lib/src/embed/search.spec.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts +21 -25
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +106 -73
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/embed/ts-embed.spec.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.spec.js +378 -31
- package/lib/src/embed/ts-embed.spec.js.map +1 -1
- package/lib/src/full-height.d.ts +137 -0
- package/lib/src/full-height.d.ts.map +1 -0
- package/lib/src/full-height.js +268 -0
- package/lib/src/full-height.js.map +1 -0
- package/lib/src/full-height.spec.d.ts +2 -0
- package/lib/src/full-height.spec.d.ts.map +1 -0
- package/lib/src/full-height.spec.js +833 -0
- package/lib/src/full-height.spec.js.map +1 -0
- package/lib/src/index.d.ts +4 -3
- package/lib/src/index.d.ts.map +1 -1
- package/lib/src/index.js +3 -3
- package/lib/src/index.js.map +1 -1
- package/lib/src/react/all-types-export.d.ts +1 -1
- package/lib/src/react/all-types-export.d.ts.map +1 -1
- package/lib/src/react/all-types-export.js +1 -1
- package/lib/src/react/all-types-export.js.map +1 -1
- package/lib/src/react/all-types-export.parity.spec.js +55 -3
- package/lib/src/react/all-types-export.parity.spec.js.map +1 -1
- package/lib/src/react/index.d.ts +8 -8
- package/lib/src/react/index.d.ts.map +1 -1
- package/lib/src/react/index.js +1 -1
- package/lib/src/react/index.js.map +1 -1
- package/lib/src/react/index.spec.js +7 -7
- package/lib/src/react/index.spec.js.map +1 -1
- package/lib/src/types.d.ts +664 -39
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +405 -12
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils/processTrigger.d.ts +3 -1
- package/lib/src/utils/processTrigger.d.ts.map +1 -1
- package/lib/src/utils/processTrigger.js +19 -51
- package/lib/src/utils/processTrigger.js.map +1 -1
- package/lib/src/utils/transport/iframe-transport.d.ts +55 -0
- package/lib/src/utils/transport/iframe-transport.d.ts.map +1 -0
- package/lib/src/utils/transport/iframe-transport.js +101 -0
- package/lib/src/utils/transport/iframe-transport.js.map +1 -0
- package/lib/src/utils/transport/iframe-transport.spec.d.ts +2 -0
- package/lib/src/utils/transport/iframe-transport.spec.d.ts.map +1 -0
- package/lib/src/utils/transport/iframe-transport.spec.js +138 -0
- package/lib/src/utils/transport/iframe-transport.spec.js.map +1 -0
- package/lib/src/utils.d.ts +18 -0
- package/lib/src/utils.d.ts.map +1 -1
- package/lib/src/utils.js +37 -0
- package/lib/src/utils.js.map +1 -1
- package/lib/src/utils.spec.js +63 -1
- package/lib/src/utils.spec.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +1426 -659
- package/package.json +9 -1
- package/src/api-intercept.ts +2 -1
- package/src/contracts/contracts.spec.ts +392 -0
- package/src/contracts/embed-event-payloads.ts +83 -0
- package/src/contracts/host-event-contracts.ts +456 -0
- package/src/contracts/index.ts +53 -0
- package/src/contracts/ui-passthrough-contracts.ts +301 -0
- package/src/css-variables.ts +1 -1
- package/src/embed/app.spec.ts +86 -34
- package/src/embed/app.ts +37 -264
- package/src/embed/conversation.ts +5 -5
- package/src/embed/events.spec.ts +14 -2
- package/src/embed/hostEventClient/host-event-client.spec.ts +2 -2
- package/src/embed/hostEventClient/host-event-client.ts +18 -5
- package/src/embed/hostEventClient/utils.ts +2 -1
- package/src/embed/liveboard.spec.ts +261 -42
- package/src/embed/liveboard.ts +78 -297
- package/src/embed/search.spec.ts +80 -0
- package/src/embed/search.ts +20 -0
- package/src/embed/ts-embed.spec.ts +518 -31
- package/src/embed/ts-embed.ts +133 -82
- package/src/full-height.spec.ts +1008 -0
- package/src/full-height.ts +361 -0
- package/src/index.ts +95 -5
- package/src/react/all-types-export.parity.spec.ts +63 -3
- package/src/react/all-types-export.ts +46 -0
- package/src/react/index.spec.tsx +7 -7
- package/src/react/index.tsx +9 -9
- package/src/types.ts +665 -37
- package/src/utils/processTrigger.ts +28 -58
- package/src/utils/transport/iframe-transport.spec.ts +177 -0
- package/src/utils/transport/iframe-transport.ts +122 -0
- package/src/utils.spec.ts +71 -0
- package/src/utils.ts +38 -0
- package/cjs/src/embed/hostEventClient/contracts.d.ts +0 -231
- package/cjs/src/embed/hostEventClient/contracts.d.ts.map +0 -1
- package/cjs/src/embed/hostEventClient/contracts.js.map +0 -1
- package/dist/src/embed/hostEventClient/contracts.d.ts +0 -231
- package/dist/src/embed/hostEventClient/contracts.d.ts.map +0 -1
- package/lib/src/embed/hostEventClient/contracts.d.ts +0 -231
- package/lib/src/embed/hostEventClient/contracts.d.ts.map +0 -1
- package/lib/src/embed/hostEventClient/contracts.js.map +0 -1
- package/src/embed/hostEventClient/contracts.ts +0 -262
package/src/types.ts
CHANGED
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
|
|
9
9
|
import { CustomCssVariables } from './css-variables';
|
|
10
10
|
import type { SessionInterface } from './utils/graphql/answerService/answerService';
|
|
11
|
+
// Type-only: avoids a runtime import cycle with the contracts barrel.
|
|
12
|
+
import type { Applicability } from './contracts/ui-passthrough-contracts';
|
|
11
13
|
|
|
12
14
|
/**
|
|
13
15
|
* The authentication mechanism for allowing access to
|
|
@@ -899,9 +901,11 @@ export interface FrameParams {
|
|
|
899
901
|
|
|
900
902
|
/**
|
|
901
903
|
* Configuration for the pre-render wrapper element.
|
|
902
|
-
*
|
|
903
|
-
* {@link BaseViewConfig}
|
|
904
|
-
*
|
|
904
|
+
* Each property here supersedes its deprecated top-level counterpart on
|
|
905
|
+
* {@link BaseViewConfig} — `id` over `preRenderId`, `containerSelector` over
|
|
906
|
+
* `preRenderContainer` and `doNotTrackSize` over `doNotTrackPreRenderSize` —
|
|
907
|
+
* and takes precedence when both are set, so existing top-level usage continues
|
|
908
|
+
* to work without any changes.
|
|
905
909
|
*
|
|
906
910
|
* @version SDK: 1.52.0
|
|
907
911
|
* @example
|
|
@@ -909,9 +913,9 @@ export interface FrameParams {
|
|
|
909
913
|
* init({ thoughtSpotHost: '...', authType: AuthType.None });
|
|
910
914
|
* const embed = new LiveboardEmbed('#tsEmbed', {
|
|
911
915
|
* preRenderConfig: {
|
|
912
|
-
*
|
|
913
|
-
*
|
|
914
|
-
*
|
|
916
|
+
* id: 'my-liveboard',
|
|
917
|
+
* containerSelector: '#my-scroll-container',
|
|
918
|
+
* doNotTrackSize: false,
|
|
915
919
|
* zIndex: -10,
|
|
916
920
|
* },
|
|
917
921
|
* });
|
|
@@ -932,7 +936,7 @@ export interface PreRenderConfig {
|
|
|
932
936
|
*
|
|
933
937
|
* @default undefined
|
|
934
938
|
*/
|
|
935
|
-
|
|
939
|
+
id?: string;
|
|
936
940
|
/**
|
|
937
941
|
* The DOM element or CSS selector string specifying the container into
|
|
938
942
|
* which the pre-rendered wrapper is inserted.
|
|
@@ -948,7 +952,7 @@ export interface PreRenderConfig {
|
|
|
948
952
|
*
|
|
949
953
|
* @default document.body
|
|
950
954
|
*/
|
|
951
|
-
|
|
955
|
+
containerSelector?: string | HTMLElement;
|
|
952
956
|
/**
|
|
953
957
|
* Disables the `ResizeObserver` that keeps the wrapper sized to the
|
|
954
958
|
* placeholder element.
|
|
@@ -960,7 +964,7 @@ export interface PreRenderConfig {
|
|
|
960
964
|
*
|
|
961
965
|
* @default false
|
|
962
966
|
*/
|
|
963
|
-
|
|
967
|
+
doNotTrackSize?: boolean;
|
|
964
968
|
/**
|
|
965
969
|
* CSS `z-index` value applied to the pre-render wrapper when hidden.
|
|
966
970
|
* Override this when the host page's stacking context does not reach `-1000`
|
|
@@ -1167,7 +1171,7 @@ export interface BaseViewConfig extends ApiInterceptFlags {
|
|
|
1167
1171
|
*
|
|
1168
1172
|
* Supported embed types: `AppEmbed`, `LiveboardEmbed`, `SearchEmbed`, `SpotterAgentEmbed`, `SpotterEmbed`, `SearchBarEmbed`
|
|
1169
1173
|
* @version SDK: 1.25.0 | ThoughtSpot: 9.6.0.cl, 9.8.0.sw
|
|
1170
|
-
* @deprecated Use {@link PreRenderConfig.
|
|
1174
|
+
* @deprecated Use {@link PreRenderConfig.id} via `preRenderConfig` instead.
|
|
1171
1175
|
* @example
|
|
1172
1176
|
* ```js
|
|
1173
1177
|
* // Replace <EmbedComponent> with embed component name. For example, AppEmbed, SearchEmbed, or LiveboardEmbed
|
|
@@ -1188,7 +1192,7 @@ export interface BaseViewConfig extends ApiInterceptFlags {
|
|
|
1188
1192
|
* @type {boolean}
|
|
1189
1193
|
* @default false
|
|
1190
1194
|
* @version SDK: 1.24.0 | ThoughtSpot: 9.4.0.cl, 9.4.0.sw
|
|
1191
|
-
* @deprecated Use {@link PreRenderConfig.
|
|
1195
|
+
* @deprecated Use {@link PreRenderConfig.doNotTrackSize} via `preRenderConfig` instead.
|
|
1192
1196
|
* @example
|
|
1193
1197
|
* ```js
|
|
1194
1198
|
* // Disable tracking PreRender size in the configuration
|
|
@@ -1230,7 +1234,7 @@ export interface BaseViewConfig extends ApiInterceptFlags {
|
|
|
1230
1234
|
*
|
|
1231
1235
|
* @type {string | HTMLElement}
|
|
1232
1236
|
* @version SDK: 1.49.2 | ThoughtSpot: *
|
|
1233
|
-
* @deprecated Use {@link PreRenderConfig.
|
|
1237
|
+
* @deprecated Use {@link PreRenderConfig.containerSelector} via `preRenderConfig` instead.
|
|
1234
1238
|
* @example
|
|
1235
1239
|
* ```js
|
|
1236
1240
|
* const embed = new LiveboardEmbed('#tsEmbed', {
|
|
@@ -1243,9 +1247,11 @@ export interface BaseViewConfig extends ApiInterceptFlags {
|
|
|
1243
1247
|
preRenderContainer?: string | HTMLElement;
|
|
1244
1248
|
/**
|
|
1245
1249
|
* Configuration for the pre-render wrapper element.
|
|
1246
|
-
*
|
|
1247
|
-
* `BaseViewConfig`
|
|
1248
|
-
*
|
|
1250
|
+
* Each property here supersedes its deprecated top-level counterpart on
|
|
1251
|
+
* `BaseViewConfig` — `id` over `preRenderId`, `containerSelector` over
|
|
1252
|
+
* `preRenderContainer` and `doNotTrackSize` over `doNotTrackPreRenderSize` —
|
|
1253
|
+
* and takes precedence when both are set, so existing top-level usage
|
|
1254
|
+
* continues to work without any changes.
|
|
1249
1255
|
* See {@link PreRenderConfig} for available options.
|
|
1250
1256
|
*
|
|
1251
1257
|
* @version SDK: 1.52.0
|
|
@@ -1253,7 +1259,7 @@ export interface BaseViewConfig extends ApiInterceptFlags {
|
|
|
1253
1259
|
* ```js
|
|
1254
1260
|
* const embed = new LiveboardEmbed('#tsEmbed', {
|
|
1255
1261
|
* preRenderConfig: {
|
|
1256
|
-
*
|
|
1262
|
+
* id: 'my-liveboard',
|
|
1257
1263
|
* zIndex: -10,
|
|
1258
1264
|
* },
|
|
1259
1265
|
* });
|
|
@@ -2035,7 +2041,7 @@ export interface LiveboardAppEmbedViewConfig {
|
|
|
2035
2041
|
*
|
|
2036
2042
|
* Supported embed types: `AppEmbed`, `LiveboardEmbed`
|
|
2037
2043
|
* @type {boolean}
|
|
2038
|
-
* @version SDK: 1.
|
|
2044
|
+
* @version SDK: 1.51.1 | ThoughtSpot Cloud: 26.8.0.cl
|
|
2039
2045
|
* @default false
|
|
2040
2046
|
* @example
|
|
2041
2047
|
* ```js
|
|
@@ -2160,7 +2166,7 @@ export interface LiveboardAppEmbedViewConfig {
|
|
|
2160
2166
|
*
|
|
2161
2167
|
* Supported embed types: `AppEmbed`, `LiveboardEmbed`
|
|
2162
2168
|
* @type {number}
|
|
2163
|
-
* @version SDK: 1.
|
|
2169
|
+
* @version SDK: 1.51.1 | ThoughtSpot Cloud: 26.8.0.cl
|
|
2164
2170
|
* @example
|
|
2165
2171
|
* ```js
|
|
2166
2172
|
* // Replace <EmbedComponent> with embed component name. For example, AppEmbed or LiveboardEmbed
|
|
@@ -2527,6 +2533,15 @@ export interface RuntimeParameter {
|
|
|
2527
2533
|
* Values
|
|
2528
2534
|
*/
|
|
2529
2535
|
value: number | boolean | string;
|
|
2536
|
+
/**
|
|
2537
|
+
* Whether the parameter is visible to the user (`UpdateParameters` only).
|
|
2538
|
+
*/
|
|
2539
|
+
isVisibleToUser?: boolean;
|
|
2540
|
+
/**
|
|
2541
|
+
* Scope of the update (`UpdateParameters` only). Omitting it, or `level`,
|
|
2542
|
+
* targets the Liveboard level.
|
|
2543
|
+
*/
|
|
2544
|
+
applicability?: Applicability;
|
|
2530
2545
|
}
|
|
2531
2546
|
|
|
2532
2547
|
/**
|
|
@@ -2982,6 +2997,9 @@ export enum EmbedEvent {
|
|
|
2982
2997
|
Download = 'download',
|
|
2983
2998
|
/**
|
|
2984
2999
|
* Emitted when the download action is triggered on an Answer.
|
|
3000
|
+
* Payload varies by context: {@link VizScopedRequest} (Search, Answer,
|
|
3001
|
+
* Liveboard), {@link RequiredVizRequest} (Spotter, vizId required). trigger()
|
|
3002
|
+
* accepts the union now; per-context enforced next release.
|
|
2985
3003
|
* Use start:true to subscribe to when download is initiated, or end:true to
|
|
2986
3004
|
* subscribe to when download is completed. Default is end:true.
|
|
2987
3005
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.0.sw
|
|
@@ -2998,6 +3016,9 @@ export enum EmbedEvent {
|
|
|
2998
3016
|
DownloadAsPng = 'downloadAsPng',
|
|
2999
3017
|
/**
|
|
3000
3018
|
* Emitted when the Download as PDF action is triggered on an Answer
|
|
3019
|
+
* Payload varies by context: {@link VizScopedRequest} (Search, Answer; plus
|
|
3020
|
+
* liveboardId on Liveboard), {@link RequiredVizRequest} (Spotter). trigger()
|
|
3021
|
+
* accepts the union now; per-context enforced next release.
|
|
3001
3022
|
* Use start:true to subscribe to when download as PDF is initiated, or end:true to
|
|
3002
3023
|
* subscribe to when download as PDF is completed. Default is end:true.
|
|
3003
3024
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
@@ -3014,6 +3035,9 @@ export enum EmbedEvent {
|
|
|
3014
3035
|
DownloadAsPdf = 'downloadAsPdf',
|
|
3015
3036
|
/**
|
|
3016
3037
|
* Emitted when the Download as CSV action is triggered on an Answer.
|
|
3038
|
+
* Payload varies by context: {@link VizScopedRequest} (Search, Answer,
|
|
3039
|
+
* Liveboard), {@link RequiredVizRequest} (Spotter, vizId required). trigger()
|
|
3040
|
+
* accepts the union now; per-context enforced next release.
|
|
3017
3041
|
* Use start:true to subscribe to when download as CSV is initiated, or end:true to
|
|
3018
3042
|
* subscribe to when download as CSV is completed. Default is end:true.
|
|
3019
3043
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
@@ -3030,6 +3054,9 @@ export enum EmbedEvent {
|
|
|
3030
3054
|
DownloadAsCsv = 'downloadAsCsv',
|
|
3031
3055
|
/**
|
|
3032
3056
|
* Emitted when the Download as XLSX action is triggered on an Answer.
|
|
3057
|
+
* Payload varies by context: {@link VizScopedRequest} (Search, Answer,
|
|
3058
|
+
* Liveboard), {@link RequiredVizRequest} (Spotter, vizId required). trigger()
|
|
3059
|
+
* accepts the union now; per-context enforced next release.
|
|
3033
3060
|
* Use start:true to subscribe to when download as XLSX is initiated, or end:true to
|
|
3034
3061
|
* subscribe to when download as XLSX is completed. Default is end:true.
|
|
3035
3062
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
@@ -3308,6 +3335,9 @@ export enum EmbedEvent {
|
|
|
3308
3335
|
Schedule = 'subscription',
|
|
3309
3336
|
/**
|
|
3310
3337
|
* Emitted when a user clicks **Edit** on a Liveboard or visualization
|
|
3338
|
+
* Payload varies by context: {@link VizScopedRequest} (Liveboard),
|
|
3339
|
+
* {@link RequiredVizRequest} (Spotter, vizId required). trigger() accepts the
|
|
3340
|
+
* union now; per-context enforced next release.
|
|
3311
3341
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
3312
3342
|
* @example
|
|
3313
3343
|
* ```js
|
|
@@ -3849,7 +3879,32 @@ export enum EmbedEvent {
|
|
|
3849
3879
|
*/
|
|
3850
3880
|
OrgSwitched = 'orgSwitched',
|
|
3851
3881
|
/**
|
|
3852
|
-
* Emitted
|
|
3882
|
+
* Emitted before the embedded ThoughtSpot app sends a network request whose
|
|
3883
|
+
* fully resolved URL matches one of the `interceptUrls` in the view config.
|
|
3884
|
+
* The request is held until you call `responder`, which decides whether the
|
|
3885
|
+
* real request goes out or a response you supply is used in its place.
|
|
3886
|
+
*
|
|
3887
|
+
* Setting `interceptUrls` is what enables this; there is no separate enable
|
|
3888
|
+
* flag. If `responder` is not called within `interceptTimeout` (30000 ms by
|
|
3889
|
+
* default) the request fails and `EmbedEvent.Error` is emitted.
|
|
3890
|
+
*
|
|
3891
|
+
* The payload is `{ input, init, urlType }`, where `input` is the request
|
|
3892
|
+
* URL and `init` is the `fetch` init object, with `init.body` parsed into an
|
|
3893
|
+
* object when it is valid JSON. `urlType` is the matching
|
|
3894
|
+
* `InterceptedApiType`; it is `InterceptedApiType.ALL` for any URL outside
|
|
3895
|
+
* the recognized API groups.
|
|
3896
|
+
*
|
|
3897
|
+
* Interception wraps the outermost layer of `fetch`, so `init` holds the
|
|
3898
|
+
* request as the application composed it, before ThoughtSpot attaches its
|
|
3899
|
+
* authentication headers. Those headers, and any token refresh and retry,
|
|
3900
|
+
* are applied afterwards and only when you pass `execute: true`. Only
|
|
3901
|
+
* requests made through `fetch` are intercepted.
|
|
3902
|
+
*
|
|
3903
|
+
* Pass `execute: true` to let the original request proceed untouched, in
|
|
3904
|
+
* which case any `response` you supply alongside it is ignored. With
|
|
3905
|
+
* `execute: false` the request is never sent, and your `response.body` is
|
|
3906
|
+
* returned to the app as JSON, defaulting to status 200 and a
|
|
3907
|
+
* `Content-Type: application/json` header.
|
|
3853
3908
|
*
|
|
3854
3909
|
* Supported on all embed types.
|
|
3855
3910
|
*
|
|
@@ -4375,6 +4430,7 @@ export enum HostEvent {
|
|
|
4375
4430
|
* the search query string.
|
|
4376
4431
|
* Supported in `AppEmbed` and `SearchEmbed` deployments.
|
|
4377
4432
|
* Includes the following properties:
|
|
4433
|
+
* Payload: {@link SearchRequest}.
|
|
4378
4434
|
* @param - Includes the following keys:
|
|
4379
4435
|
* - `searchQuery`: Query string with search tokens.
|
|
4380
4436
|
* - `dataSources`: Data source GUID to search on.
|
|
@@ -4402,6 +4458,9 @@ export enum HostEvent {
|
|
|
4402
4458
|
Search = 'search',
|
|
4403
4459
|
/**
|
|
4404
4460
|
* Triggers a drill on certain points of the specified column
|
|
4461
|
+
* Payload: {@link DrillDownRequest}; in Liveboard context vizId is required
|
|
4462
|
+
* ({@link RequiredVizRequest}). trigger() accepts the union now; per-context
|
|
4463
|
+
* enforced next release.
|
|
4405
4464
|
* Includes the following properties:
|
|
4406
4465
|
* @param - Includes the following keys:
|
|
4407
4466
|
* - `points`: An object containing `selectedPoints` and/or `clickedPoint`
|
|
@@ -4481,6 +4540,8 @@ export enum HostEvent {
|
|
|
4481
4540
|
Reload = 'reload',
|
|
4482
4541
|
/**
|
|
4483
4542
|
* Get iframe URL for the current embed view.
|
|
4543
|
+
* Payload: none.
|
|
4544
|
+
* Response: {@link GetIframeUrlResponse}.
|
|
4484
4545
|
* @example
|
|
4485
4546
|
* ```js
|
|
4486
4547
|
* const url = embed.trigger(HostEvent.GetIframeUrl);
|
|
@@ -4499,6 +4560,7 @@ export enum HostEvent {
|
|
|
4499
4560
|
GetIframeUrl = 'GetIframeUrl',
|
|
4500
4561
|
/**
|
|
4501
4562
|
* Display specific visualizations on a Liveboard.
|
|
4563
|
+
* Payload: `string[]`.
|
|
4502
4564
|
* @param - An array of GUIDs of the visualization to show. The visualization IDs not passed
|
|
4503
4565
|
* in this parameter will be hidden.
|
|
4504
4566
|
* @example
|
|
@@ -4521,6 +4583,7 @@ export enum HostEvent {
|
|
|
4521
4583
|
SetVisibleVizs = 'SetPinboardVisibleVizs',
|
|
4522
4584
|
/**
|
|
4523
4585
|
* Set a Liveboard tab as an active tab.
|
|
4586
|
+
* Payload: {@link SetActiveTabRequest}.
|
|
4524
4587
|
* @param - tabId - string of id of Tab to show
|
|
4525
4588
|
* @example
|
|
4526
4589
|
* ```js
|
|
@@ -4548,6 +4611,7 @@ export enum HostEvent {
|
|
|
4548
4611
|
* and `AppEmbed` only. In full application embedding, this event updates
|
|
4549
4612
|
* the runtime filters applied on the Liveboard and saved Answer objects.
|
|
4550
4613
|
*
|
|
4614
|
+
* Payload: {@link RuntimeFilter}[].
|
|
4551
4615
|
* @param - Array of {@link RuntimeFilter} objects. Each item includes:
|
|
4552
4616
|
* - `columnName`: Name of the column to filter on.
|
|
4553
4617
|
* - `operator`: {@link RuntimeFilterOp} to apply. For more information, see
|
|
@@ -4589,6 +4653,7 @@ export enum HostEvent {
|
|
|
4589
4653
|
* Accepts either a plain value or an object with `path`
|
|
4590
4654
|
* and an optional `replace` flag.
|
|
4591
4655
|
*
|
|
4656
|
+
* Payload: `string` | `number` | {@link NavigateRequest}.
|
|
4592
4657
|
* @param data - A string path, a numeric history delta, or an object
|
|
4593
4658
|
* `{ path: string | number, replace?: boolean }`.
|
|
4594
4659
|
* - `path` — the route to navigate to, or a history delta such as `1`
|
|
@@ -4616,6 +4681,9 @@ export enum HostEvent {
|
|
|
4616
4681
|
/**
|
|
4617
4682
|
* Open the filter panel for a particular column.
|
|
4618
4683
|
* Works with Search and Liveboard embed.
|
|
4684
|
+
* Payload: {@link OpenFilterRequest} (the cross-context superset). The
|
|
4685
|
+
* accepted fields vary by context: {@link OpenFilterLiveboardRequest},
|
|
4686
|
+
* {@link OpenFilterSpotterRequest}, {@link OpenFilterSearchRequest}.
|
|
4619
4687
|
* @param - { columnId: string,
|
|
4620
4688
|
* name: string,
|
|
4621
4689
|
* type: ATTRIBUTE/MEASURE,
|
|
@@ -4672,7 +4740,7 @@ export enum HostEvent {
|
|
|
4672
4740
|
*
|
|
4673
4741
|
* Unlike {@link HostEvent.OpenFilter}, which opens the panel of an
|
|
4674
4742
|
* existing filter, this event starts the creation of a new filter.
|
|
4675
|
-
* @version SDK: 1.
|
|
4743
|
+
* @version SDK: 1.51.1 | ThoughtSpot Cloud: 26.8.0.cl
|
|
4676
4744
|
* @example
|
|
4677
4745
|
* ```js
|
|
4678
4746
|
* liveboardEmbed.trigger(HostEvent.OpenAddFilterModal);
|
|
@@ -4688,7 +4756,7 @@ export enum HostEvent {
|
|
|
4688
4756
|
* Hiding the *Add parameter* button with `hiddenActions:
|
|
4689
4757
|
* [Action.AddParameter]` does not block this event, but disabling it
|
|
4690
4758
|
* with `disabledActions` does.
|
|
4691
|
-
* @version SDK: 1.
|
|
4759
|
+
* @version SDK: 1.51.1 | ThoughtSpot Cloud: 26.8.0.cl
|
|
4692
4760
|
* @example
|
|
4693
4761
|
* ```js
|
|
4694
4762
|
* liveboardEmbed.trigger(HostEvent.OpenAddParameterModal);
|
|
@@ -4698,6 +4766,7 @@ export enum HostEvent {
|
|
|
4698
4766
|
/**
|
|
4699
4767
|
* Open the parameter panel for a particular parameter on a Liveboard.
|
|
4700
4768
|
* Mirrors {@link HostEvent.OpenFilter} for parameters.
|
|
4769
|
+
* Payload: {@link OpenParameterRequest}.
|
|
4701
4770
|
* @param - Includes the following keys:
|
|
4702
4771
|
* - `parameter`: An object identifying the parameter to open, for
|
|
4703
4772
|
* example, `{ parameterId: '<parameter-GUID>' }`.
|
|
@@ -4729,6 +4798,7 @@ export enum HostEvent {
|
|
|
4729
4798
|
OpenParameter = 'openParameter',
|
|
4730
4799
|
/**
|
|
4731
4800
|
* Add columns to the current search query.
|
|
4801
|
+
* Payload: `{ columnIds: string[] }`.
|
|
4732
4802
|
* @param - { columnIds: string[] }
|
|
4733
4803
|
* @example
|
|
4734
4804
|
* ```js
|
|
@@ -4747,6 +4817,7 @@ export enum HostEvent {
|
|
|
4747
4817
|
AddColumns = 'addColumns',
|
|
4748
4818
|
/**
|
|
4749
4819
|
* Remove a column from the current search query.
|
|
4820
|
+
* Payload: `{ columnId: string }`.
|
|
4750
4821
|
* @param - { columnId: string }
|
|
4751
4822
|
* @example
|
|
4752
4823
|
* ```js
|
|
@@ -4771,6 +4842,8 @@ export enum HostEvent {
|
|
|
4771
4842
|
* sorting, toggling of legends, and data drill down.
|
|
4772
4843
|
* For more information, see
|
|
4773
4844
|
* link:https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#transient-lb-content[Liveboard data with unsaved changes].
|
|
4845
|
+
* Payload: none.
|
|
4846
|
+
* Response: {@link GetExportRequestForCurrentPinboardResponse}.
|
|
4774
4847
|
* @example
|
|
4775
4848
|
* ```js
|
|
4776
4849
|
* liveboardEmbed.trigger(HostEvent.getExportRequestForCurrentPinboard).then(
|
|
@@ -4792,6 +4865,8 @@ export enum HostEvent {
|
|
|
4792
4865
|
* requiring additional user input via the *Pin to Liveboard* modal, define
|
|
4793
4866
|
* the following parameters:
|
|
4794
4867
|
*
|
|
4868
|
+
* Payload: {@link PinAnswerToLiveboardRequest}.
|
|
4869
|
+
* Response: {@link PinAnswerToLiveboardResponse}.
|
|
4795
4870
|
* @param - Includes the following keys:
|
|
4796
4871
|
* - `vizId`: GUID of the saved Answer or Spotter visualization ID to pin to a
|
|
4797
4872
|
* Liveboard.
|
|
@@ -4906,6 +4981,7 @@ export enum HostEvent {
|
|
|
4906
4981
|
LiveboardInfo = 'pinboardInfo',
|
|
4907
4982
|
/**
|
|
4908
4983
|
* Trigger the **Schedule** action on an embedded Liveboard.
|
|
4984
|
+
* Payload: {@link VizScopedRequest}.
|
|
4909
4985
|
* @example
|
|
4910
4986
|
* ```js
|
|
4911
4987
|
* liveboardEmbed.trigger(HostEvent.Schedule)
|
|
@@ -4921,6 +4997,7 @@ export enum HostEvent {
|
|
|
4921
4997
|
Schedule = 'subscription',
|
|
4922
4998
|
/**
|
|
4923
4999
|
* Trigger the **Manage schedule** action on an embedded Liveboard
|
|
5000
|
+
* Payload: {@link VizScopedRequest}.
|
|
4924
5001
|
* @example
|
|
4925
5002
|
* ```js
|
|
4926
5003
|
* liveboardEmbed.trigger(HostEvent.SchedulesList)
|
|
@@ -4937,6 +5014,7 @@ export enum HostEvent {
|
|
|
4937
5014
|
/**
|
|
4938
5015
|
* Trigger the **Export TML** action on an embedded Liveboard or
|
|
4939
5016
|
* Answer.
|
|
5017
|
+
* Payload: {@link VizScopedRequest}.
|
|
4940
5018
|
* @example
|
|
4941
5019
|
* ```js
|
|
4942
5020
|
* liveboardEmbed.trigger(HostEvent.ExportTML)
|
|
@@ -4959,6 +5037,7 @@ export enum HostEvent {
|
|
|
4959
5037
|
/**
|
|
4960
5038
|
* Trigger the **Edit TML** action on an embedded Liveboard or
|
|
4961
5039
|
* saved Answers in the full application embedding.
|
|
5040
|
+
* Payload: {@link VizScopedRequest}.
|
|
4962
5041
|
* @example
|
|
4963
5042
|
* ```js
|
|
4964
5043
|
* liveboardEmbed.trigger(HostEvent.EditTML)
|
|
@@ -4980,6 +5059,7 @@ export enum HostEvent {
|
|
|
4980
5059
|
EditTML = 'editTSL',
|
|
4981
5060
|
/**
|
|
4982
5061
|
* Trigger the **Update TML** action on an embedded Liveboard.
|
|
5062
|
+
* Payload: {@link VizScopedRequest}.
|
|
4983
5063
|
* @example
|
|
4984
5064
|
* ```js
|
|
4985
5065
|
* liveboardEmbed.trigger(HostEvent.UpdateTML)
|
|
@@ -4997,6 +5077,7 @@ export enum HostEvent {
|
|
|
4997
5077
|
* Trigger the **Download PDF** action on an embedded Liveboard,
|
|
4998
5078
|
* visualization or Answer.
|
|
4999
5079
|
*
|
|
5080
|
+
* Payload: {@link VizScopedRequest} plus optional `liveboardId`.
|
|
5000
5081
|
* @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
|
|
5001
5082
|
*
|
|
5002
5083
|
* **NOTE**: The **Download** > **PDF** action is available on
|
|
@@ -5047,6 +5128,7 @@ export enum HostEvent {
|
|
|
5047
5128
|
/**
|
|
5048
5129
|
* Trigger the **AI Highlights** action on an embedded Liveboard
|
|
5049
5130
|
*
|
|
5131
|
+
* Payload: none.
|
|
5050
5132
|
* @example
|
|
5051
5133
|
* ```js
|
|
5052
5134
|
* liveboardEmbed.trigger(HostEvent.AIHighlights)
|
|
@@ -5101,6 +5183,9 @@ export enum HostEvent {
|
|
|
5101
5183
|
MakeACopy = 'makeACopy',
|
|
5102
5184
|
/**
|
|
5103
5185
|
* Trigger the **Delete** action for a Liveboard.
|
|
5186
|
+
* Payload varies by context: {@link RequiredVizRequest} (Liveboard, vizId
|
|
5187
|
+
* required), {@link VizScopedRequest} (Search). trigger() accepts the union
|
|
5188
|
+
* now; per-context enforced next release.
|
|
5104
5189
|
* @example
|
|
5105
5190
|
* ```js
|
|
5106
5191
|
* appEmbed.trigger(HostEvent.Remove)
|
|
@@ -5115,6 +5200,7 @@ export enum HostEvent {
|
|
|
5115
5200
|
Remove = 'delete',
|
|
5116
5201
|
/**
|
|
5117
5202
|
* Trigger the **Explore** action on a visualization.
|
|
5203
|
+
* Payload: {@link RequiredVizRequest}.
|
|
5118
5204
|
* @param - an object with `vizId` as a key
|
|
5119
5205
|
* @example
|
|
5120
5206
|
* ```js
|
|
@@ -5134,6 +5220,7 @@ export enum HostEvent {
|
|
|
5134
5220
|
/**
|
|
5135
5221
|
* Trigger the **Create alert** action on a KPI chart
|
|
5136
5222
|
* in a Liveboard or saved Answer.
|
|
5223
|
+
* Payload: {@link VizScopedRequest}.
|
|
5137
5224
|
* @param - an object with `vizId` as a key
|
|
5138
5225
|
* @example
|
|
5139
5226
|
* ```js
|
|
@@ -5165,6 +5252,7 @@ export enum HostEvent {
|
|
|
5165
5252
|
/**
|
|
5166
5253
|
* Trigger the **Manage alerts** action on a KPI chart
|
|
5167
5254
|
* in a visualization or saved Answer.
|
|
5255
|
+
* Payload: {@link VizScopedRequest}.
|
|
5168
5256
|
* @param - an object with `vizId` as a key
|
|
5169
5257
|
* @example
|
|
5170
5258
|
* ```js
|
|
@@ -5202,6 +5290,7 @@ export enum HostEvent {
|
|
|
5202
5290
|
* on a Liveboard.
|
|
5203
5291
|
*
|
|
5204
5292
|
* This event is not supported in visualization embed and search embed.
|
|
5293
|
+
* Payload: {@link VizScopedRequest}.
|
|
5205
5294
|
* @param - Object parameter. Includes the following keys:
|
|
5206
5295
|
* - `vizId`: To trigger the action for a specific visualization in Liveboard embed,
|
|
5207
5296
|
* pass in `vizId` as a key. In Spotter embed, `vizId` refers to the Answer ID and
|
|
@@ -5244,6 +5333,7 @@ export enum HostEvent {
|
|
|
5244
5333
|
Edit = 'edit',
|
|
5245
5334
|
/**
|
|
5246
5335
|
* Trigger the **Copy link** action on a Liveboard or visualization
|
|
5336
|
+
* Payload: {@link VizScopedRequest}.
|
|
5247
5337
|
* @param - object - to trigger the action for a
|
|
5248
5338
|
* specific visualization in Liveboard embed, pass in `vizId` as a key
|
|
5249
5339
|
* @example
|
|
@@ -5289,6 +5379,7 @@ export enum HostEvent {
|
|
|
5289
5379
|
CopyLink = 'embedDocument',
|
|
5290
5380
|
/**
|
|
5291
5381
|
* Trigger the **Present** action on a Liveboard or visualization
|
|
5382
|
+
* Payload: {@link VizScopedRequest}.
|
|
5292
5383
|
* @param - object - to trigger the action for a specific visualization
|
|
5293
5384
|
* in Liveboard embed, pass in `vizId` as a key
|
|
5294
5385
|
* @example
|
|
@@ -5334,6 +5425,8 @@ export enum HostEvent {
|
|
|
5334
5425
|
Present = 'present',
|
|
5335
5426
|
/**
|
|
5336
5427
|
* Get TML for the current search.
|
|
5428
|
+
* Payload: {@link GetTMLRequest}.
|
|
5429
|
+
* Response: `Record<string, any>`.
|
|
5337
5430
|
* @example
|
|
5338
5431
|
* ```js
|
|
5339
5432
|
* searchEmbed.trigger(HostEvent.GetTML).then((tml) => {
|
|
@@ -5383,6 +5476,7 @@ export enum HostEvent {
|
|
|
5383
5476
|
* Trigger the **Show underlying data** action on a
|
|
5384
5477
|
* chart or table.
|
|
5385
5478
|
*
|
|
5479
|
+
* Payload: {@link VizScopedRequest}.
|
|
5386
5480
|
* @param - an object with vizId as a key
|
|
5387
5481
|
* @example
|
|
5388
5482
|
* ```js
|
|
@@ -5416,6 +5510,7 @@ export enum HostEvent {
|
|
|
5416
5510
|
* Trigger the **Delete** action for a visualization
|
|
5417
5511
|
* in an embedded Liveboard, or a chart or table
|
|
5418
5512
|
* generated from Search.
|
|
5513
|
+
* Payload: {@link VizScopedRequest}.
|
|
5419
5514
|
* @param - Liveboard embed takes an object with `vizId` as a key.
|
|
5420
5515
|
* Can be left empty if embedding Search or visualization.
|
|
5421
5516
|
* @example
|
|
@@ -5444,6 +5539,7 @@ export enum HostEvent {
|
|
|
5444
5539
|
/**
|
|
5445
5540
|
* Trigger the **SpotIQ analyze** action on a
|
|
5446
5541
|
* chart or table.
|
|
5542
|
+
* Payload: {@link VizScopedRequest}.
|
|
5447
5543
|
* @param - Liveboard embed takes `vizId` as a
|
|
5448
5544
|
* key. Can be left undefined when embedding Search or
|
|
5449
5545
|
* visualization.
|
|
@@ -5506,6 +5602,7 @@ export enum HostEvent {
|
|
|
5506
5602
|
/**
|
|
5507
5603
|
* Trigger the **Download** > **PNG** action on
|
|
5508
5604
|
* charts in the embedded view.
|
|
5605
|
+
* Payload: {@link VizScopedRequest}.
|
|
5509
5606
|
* @example
|
|
5510
5607
|
* ```js
|
|
5511
5608
|
* liveboardEmbed.trigger(HostEvent.DownloadAsPng,
|
|
@@ -5537,6 +5634,7 @@ export enum HostEvent {
|
|
|
5537
5634
|
/**
|
|
5538
5635
|
* Trigger the **Download** > **CSV** action on tables in
|
|
5539
5636
|
* the embedded view.
|
|
5637
|
+
* Payload: {@link VizScopedRequest}.
|
|
5540
5638
|
* @param - `vizId` refers to the Visualization ID in Spotter embed and is required in Spotter embed.
|
|
5541
5639
|
* @example
|
|
5542
5640
|
* ```js
|
|
@@ -5576,6 +5674,7 @@ export enum HostEvent {
|
|
|
5576
5674
|
/**
|
|
5577
5675
|
* Trigger the **Download** > **XLSX** action on tables
|
|
5578
5676
|
* in the embedded view.
|
|
5677
|
+
* Payload: {@link VizScopedRequest}.
|
|
5579
5678
|
* @param - `vizId` refers to the Visualization ID in Spotter embed and is required in Spotter embed.
|
|
5580
5679
|
* @example
|
|
5581
5680
|
* ```js
|
|
@@ -5615,6 +5714,7 @@ export enum HostEvent {
|
|
|
5615
5714
|
/**
|
|
5616
5715
|
* Trigger the **Share** action on an embedded
|
|
5617
5716
|
* Liveboard or Answer.
|
|
5717
|
+
* Payload: {@link VizScopedRequest}.
|
|
5618
5718
|
* @example
|
|
5619
5719
|
* ```js
|
|
5620
5720
|
* liveboardEmbed.trigger(HostEvent.Share)
|
|
@@ -5641,6 +5741,7 @@ export enum HostEvent {
|
|
|
5641
5741
|
* Trigger the **Save** action on a Liveboard, Answer, or Spotter.
|
|
5642
5742
|
* Saves the changes.
|
|
5643
5743
|
*
|
|
5744
|
+
* Payload: {@link VizScopedRequest}.
|
|
5644
5745
|
* @param - `vizId` refers to the Spotter Visualization Id used in Spotter embed.
|
|
5645
5746
|
* It is required and can be retrieved from the data embed event.
|
|
5646
5747
|
*
|
|
@@ -5692,6 +5793,7 @@ export enum HostEvent {
|
|
|
5692
5793
|
/**
|
|
5693
5794
|
* Trigger the **Sync to Sheets** action on an embedded visualization or Answer
|
|
5694
5795
|
* Sends data from an Answer or Liveboard visualization to a Google sheet.
|
|
5796
|
+
* Payload: {@link VizScopedRequest}.
|
|
5695
5797
|
* @param - an object with `vizId` as a key
|
|
5696
5798
|
* @example
|
|
5697
5799
|
* ```js
|
|
@@ -5722,6 +5824,7 @@ export enum HostEvent {
|
|
|
5722
5824
|
* Trigger the **Sync to Other Apps** action on an embedded visualization or Answer
|
|
5723
5825
|
* Sends data from an Answer or Liveboard visualization to third-party apps such
|
|
5724
5826
|
* as Slack, Salesforce, Microsoft Teams, ServiceNow and so on.
|
|
5827
|
+
* Payload: {@link VizScopedRequest}.
|
|
5725
5828
|
* @param - an object with vizId as a key
|
|
5726
5829
|
* @example
|
|
5727
5830
|
* ```js
|
|
@@ -5752,6 +5855,7 @@ export enum HostEvent {
|
|
|
5752
5855
|
* Trigger the **Manage pipelines** action on an embedded
|
|
5753
5856
|
* visualization or Answer.
|
|
5754
5857
|
* Allows users to manage ThoughtSpot Sync pipelines.
|
|
5858
|
+
* Payload: {@link VizScopedRequest}.
|
|
5755
5859
|
* @param - an object with `vizId` as a key
|
|
5756
5860
|
* @example
|
|
5757
5861
|
* ```js
|
|
@@ -5780,6 +5884,7 @@ export enum HostEvent {
|
|
|
5780
5884
|
ManagePipelines = 'manage-pipeline',
|
|
5781
5885
|
/**
|
|
5782
5886
|
* Reset search operation on the Search or Answer page.
|
|
5887
|
+
* Payload: none.
|
|
5783
5888
|
* @example
|
|
5784
5889
|
* ```js
|
|
5785
5890
|
* searchEmbed.trigger(HostEvent.ResetSearch)
|
|
@@ -5807,6 +5912,8 @@ export enum HostEvent {
|
|
|
5807
5912
|
* whole Liveboard.
|
|
5808
5913
|
* The `applicability` attribute is available from SDK: 1.53.0 |
|
|
5809
5914
|
* ThoughtSpot: 26.10.0.cl.
|
|
5915
|
+
* Payload: {@link GetFiltersRequest}.
|
|
5916
|
+
* Response: {@link GetFiltersResponse}.
|
|
5810
5917
|
* @example
|
|
5811
5918
|
* ```js
|
|
5812
5919
|
* const data = await liveboardEmbed.trigger(HostEvent.GetFilters);
|
|
@@ -5826,6 +5933,7 @@ export enum HostEvent {
|
|
|
5826
5933
|
GetFilters = 'getFilters',
|
|
5827
5934
|
/**
|
|
5828
5935
|
* Update one or several filters applied on a Liveboard.
|
|
5936
|
+
* Payload: {@link UpdateFiltersRequest}.
|
|
5829
5937
|
* @param - Includes the following keys:
|
|
5830
5938
|
* - `filter`: A single filter object containing column name, filter operator, and
|
|
5831
5939
|
* values.
|
|
@@ -5954,6 +6062,8 @@ export enum HostEvent {
|
|
|
5954
6062
|
UpdateFilters = 'updateFilters',
|
|
5955
6063
|
/**
|
|
5956
6064
|
* Get tab details for the current Liveboard.
|
|
6065
|
+
* Payload: none.
|
|
6066
|
+
* Response: {@link GetTabsResponse}.
|
|
5957
6067
|
* @example
|
|
5958
6068
|
* ```js
|
|
5959
6069
|
* liveboardEmbed.trigger(HostEvent.GetTabs).then((tabDetails) => {
|
|
@@ -5979,6 +6089,8 @@ export enum HostEvent {
|
|
|
5979
6089
|
/**
|
|
5980
6090
|
* Get group details for the current Liveboard.
|
|
5981
6091
|
* Mirrors {@link HostEvent.GetTabs} for filter/parameter groups.
|
|
6092
|
+
* Payload: none.
|
|
6093
|
+
* Response: {@link GetGroupsResponse}.
|
|
5982
6094
|
* @example
|
|
5983
6095
|
* ```js
|
|
5984
6096
|
* liveboardEmbed.trigger(HostEvent.GetGroups).then((groupDetails) => {
|
|
@@ -6003,6 +6115,7 @@ export enum HostEvent {
|
|
|
6003
6115
|
GetGroups = 'getGroups',
|
|
6004
6116
|
/**
|
|
6005
6117
|
* Set the visible tabs on a Liveboard.
|
|
6118
|
+
* Payload: `string[]`.
|
|
6006
6119
|
* @param - an array of ids of tabs to show, the IDs not passed
|
|
6007
6120
|
* will be hidden.
|
|
6008
6121
|
* @example
|
|
@@ -6025,6 +6138,7 @@ export enum HostEvent {
|
|
|
6025
6138
|
SetVisibleTabs = 'SetPinboardVisibleTabs',
|
|
6026
6139
|
/**
|
|
6027
6140
|
* Set the hidden tabs on a Liveboard.
|
|
6141
|
+
* Payload: `string[]`.
|
|
6028
6142
|
* @param - an array of the IDs of the tabs to hide.
|
|
6029
6143
|
* The IDs not passed will be shown.
|
|
6030
6144
|
* @example
|
|
@@ -6053,6 +6167,8 @@ export enum HostEvent {
|
|
|
6053
6167
|
* `getAnswerService()` method on the embed instance to get an AnswerService
|
|
6054
6168
|
* object that provides a more convenient interface for working with answers.
|
|
6055
6169
|
*
|
|
6170
|
+
* Payload: {@link GetAnswerSessionRequest}.
|
|
6171
|
+
* Response: {@link GetAnswerSessionResponse}.
|
|
6056
6172
|
* @example
|
|
6057
6173
|
* ```js
|
|
6058
6174
|
* // Preferred way to get an AnswerService
|
|
@@ -6080,6 +6196,7 @@ export enum HostEvent {
|
|
|
6080
6196
|
GetAnswerSession = 'getAnswerSession',
|
|
6081
6197
|
/**
|
|
6082
6198
|
* Trigger the *Ask Sage* action for visualizations
|
|
6199
|
+
* Payload: {@link RequiredVizRequest}.
|
|
6083
6200
|
* @example
|
|
6084
6201
|
* ```js
|
|
6085
6202
|
* liveboardEmbed.trigger(HostEvent.AskSage,
|
|
@@ -6091,6 +6208,7 @@ export enum HostEvent {
|
|
|
6091
6208
|
/**
|
|
6092
6209
|
* Trigger cross filter update action on a Liveboard.
|
|
6093
6210
|
*
|
|
6211
|
+
* Payload: {@link UpdateCrossFilterRequest}.
|
|
6094
6212
|
* @example
|
|
6095
6213
|
* ```js
|
|
6096
6214
|
* liveboardEmbed.trigger(HostEvent.UpdateCrossFilter, {
|
|
@@ -6106,7 +6224,9 @@ export enum HostEvent {
|
|
|
6106
6224
|
UpdateCrossFilter = 'UpdateCrossFilter',
|
|
6107
6225
|
/**
|
|
6108
6226
|
* Trigger reset action for a personalized Liveboard view.
|
|
6109
|
-
* This event is deprecated.
|
|
6227
|
+
* This event is deprecated.
|
|
6228
|
+
* Use {@link HostEvent.ResetLiveboardPersonalizedView} instead.
|
|
6229
|
+
* Payload: none.
|
|
6110
6230
|
* @example
|
|
6111
6231
|
* ```js
|
|
6112
6232
|
* liveboardEmbed.trigger(HostEvent.ResetLiveboardPersonalisedView);
|
|
@@ -6127,6 +6247,7 @@ export enum HostEvent {
|
|
|
6127
6247
|
/**
|
|
6128
6248
|
* Triggers an action to update Parameter values on embedded
|
|
6129
6249
|
* Answers, Liveboard, and Spotter answer in Edit mode.
|
|
6250
|
+
* Payload: {@link RuntimeParameter}[].
|
|
6130
6251
|
* @param - Includes the following keys for each item:
|
|
6131
6252
|
* - `name`: Name of the parameter.
|
|
6132
6253
|
* - `value`: The value to set for the parameter.
|
|
@@ -6184,6 +6305,8 @@ export enum HostEvent {
|
|
|
6184
6305
|
* whole Liveboard.
|
|
6185
6306
|
* The `applicability` attribute is available from SDK: 1.53.0 |
|
|
6186
6307
|
* ThoughtSpot: 26.10.0.cl.
|
|
6308
|
+
* Payload: none.
|
|
6309
|
+
* Response: {@link GetParametersResponse}.
|
|
6187
6310
|
* @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
|
|
6188
6311
|
* ```js
|
|
6189
6312
|
* liveboardEmbed.trigger(HostEvent.GetParameters).then((parameter) => {
|
|
@@ -6221,6 +6344,7 @@ export enum HostEvent {
|
|
|
6221
6344
|
* ```js
|
|
6222
6345
|
* liveboardEmbed.trigger(HostEvent.UpdatePersonalisedView, {viewId: '1234'})
|
|
6223
6346
|
* ```
|
|
6347
|
+
* Payload: {@link PersonalisedViewRequest} (`viewId` only).
|
|
6224
6348
|
* @example
|
|
6225
6349
|
* ```js
|
|
6226
6350
|
* // Update personalized view from liveboard context
|
|
@@ -6253,6 +6377,7 @@ export enum HostEvent {
|
|
|
6253
6377
|
* If neither is provided, the Liveboard resets to the original/default view.
|
|
6254
6378
|
* When a `viewName` is provided and multiple views share
|
|
6255
6379
|
* the same name, the first match is selected.
|
|
6380
|
+
* Payload: {@link PersonalisedViewRequest}.
|
|
6256
6381
|
* @example
|
|
6257
6382
|
* ```js
|
|
6258
6383
|
* liveboardEmbed.trigger(
|
|
@@ -6296,6 +6421,8 @@ export enum HostEvent {
|
|
|
6296
6421
|
* If no parameters are specified, the save action is
|
|
6297
6422
|
* triggered with a modal to prompt users to
|
|
6298
6423
|
* add a name and description for the Answer.
|
|
6424
|
+
* Payload: {@link SaveAnswerRequest}.
|
|
6425
|
+
* Response: {@link SaveAnswerResponse}.
|
|
6299
6426
|
* @param - Includes the following keys:
|
|
6300
6427
|
* - `vizId`: Refers to the Answer ID in Spotter embed and is **required** in Spotter
|
|
6301
6428
|
* embed.
|
|
@@ -6381,6 +6508,7 @@ export enum HostEvent {
|
|
|
6381
6508
|
/**
|
|
6382
6509
|
* Triggers a search operation with the search tokens specified in
|
|
6383
6510
|
* the search query string in spotter embed.
|
|
6511
|
+
* Payload: {@link SpotterSearchRequest}.
|
|
6384
6512
|
* @param - Includes the following keys:
|
|
6385
6513
|
* - `query`: Text string in Natural Language format.
|
|
6386
6514
|
* - `executeSearch`: Boolean to execute search and update search query.
|
|
@@ -6405,6 +6533,7 @@ export enum HostEvent {
|
|
|
6405
6533
|
SpotterSearch = 'SpotterSearch',
|
|
6406
6534
|
/**
|
|
6407
6535
|
* Edits the last prompt in spotter embed.
|
|
6536
|
+
* Payload: `string`.
|
|
6408
6537
|
* @param - `query`: Text string
|
|
6409
6538
|
* @example
|
|
6410
6539
|
* ```js
|
|
@@ -6421,6 +6550,7 @@ export enum HostEvent {
|
|
|
6421
6550
|
EditLastPrompt = 'EditLastPrompt',
|
|
6422
6551
|
/**
|
|
6423
6552
|
* Opens the data source preview modal in Spotter Embed.
|
|
6553
|
+
* Payload: none.
|
|
6424
6554
|
* @example
|
|
6425
6555
|
* ```js
|
|
6426
6556
|
* spotterEmbed.trigger(HostEvent.PreviewSpotterData);
|
|
@@ -6456,6 +6586,7 @@ export enum HostEvent {
|
|
|
6456
6586
|
DataModelInstructions = 'DataModelInstructions',
|
|
6457
6587
|
/**
|
|
6458
6588
|
* Resets the Spotter Embed Conversation.
|
|
6589
|
+
* Payload: none.
|
|
6459
6590
|
* @example
|
|
6460
6591
|
* ```js
|
|
6461
6592
|
* spotterEmbed.trigger(HostEvent.ResetSpotterConversation);
|
|
@@ -6468,6 +6599,7 @@ export enum HostEvent {
|
|
|
6468
6599
|
* `conversationId` is **mandatory** — you must pass the id of the
|
|
6469
6600
|
* conversation to share. Also no-op when sharing is disabled
|
|
6470
6601
|
* (enableShareConversation off) or when already in the read-only shared view.
|
|
6602
|
+
* Payload: {@link ConversationScopedRequest}.
|
|
6471
6603
|
* @example
|
|
6472
6604
|
* ```js
|
|
6473
6605
|
* spotterEmbed.trigger(HostEvent.ShareSpotterConversation, { conversationId: 'abc' });
|
|
@@ -6477,6 +6609,7 @@ export enum HostEvent {
|
|
|
6477
6609
|
ShareSpotterConversation = 'ShareSpotterConversation',
|
|
6478
6610
|
/**
|
|
6479
6611
|
* Closes the Spotter share-conversation modal. No-op if none is open.
|
|
6612
|
+
* Payload: none.
|
|
6480
6613
|
* @example
|
|
6481
6614
|
* ```js
|
|
6482
6615
|
* spotterEmbed.trigger(HostEvent.CloseSpotterShareConversation);
|
|
@@ -6486,6 +6619,7 @@ export enum HostEvent {
|
|
|
6486
6619
|
CloseSpotterShareConversation = 'CloseSpotterShareConversation',
|
|
6487
6620
|
/**
|
|
6488
6621
|
* Exits the read-only shared-conversation view.
|
|
6622
|
+
* Payload: none.
|
|
6489
6623
|
* @example
|
|
6490
6624
|
* ```js
|
|
6491
6625
|
* spotterEmbed.trigger(HostEvent.ExitSpotterSharedConversation);
|
|
@@ -6495,6 +6629,7 @@ export enum HostEvent {
|
|
|
6495
6629
|
ExitSpotterSharedConversation = 'ExitSpotterSharedConversation',
|
|
6496
6630
|
/**
|
|
6497
6631
|
* Deletes the last prompt in spotter embed.
|
|
6632
|
+
* Payload: none.
|
|
6498
6633
|
* @example
|
|
6499
6634
|
* ```js
|
|
6500
6635
|
* spotterEmbed.trigger(HostEvent.DeleteLastPrompt);
|
|
@@ -6504,6 +6639,7 @@ export enum HostEvent {
|
|
|
6504
6639
|
DeleteLastPrompt = 'DeleteLastPrompt',
|
|
6505
6640
|
/**
|
|
6506
6641
|
* Toggle the visualization to chart or table view.
|
|
6642
|
+
* Payload: {@link RequiredVizRequest}.
|
|
6507
6643
|
* @param - `vizId ` refers to the Visualization ID in Spotter embed and is required.
|
|
6508
6644
|
* @example
|
|
6509
6645
|
* ```js
|
|
@@ -6542,6 +6678,7 @@ export enum HostEvent {
|
|
|
6542
6678
|
VisibleEmbedCoordinates = 'visibleEmbedCoordinates',
|
|
6543
6679
|
/**
|
|
6544
6680
|
* Trigger the *Spotter* action for visualizations present on the liveboard's vizzes.
|
|
6681
|
+
* Payload: {@link RequiredVizRequest}.
|
|
6545
6682
|
* @param - `vizId` refers to the Visualization ID in Spotter embed and is required.
|
|
6546
6683
|
* @example
|
|
6547
6684
|
* ```js
|
|
@@ -6567,7 +6704,13 @@ export enum HostEvent {
|
|
|
6567
6704
|
*/
|
|
6568
6705
|
UpdateEmbedParams = 'updateEmbedParams',
|
|
6569
6706
|
/**
|
|
6570
|
-
*
|
|
6707
|
+
* Notifies the embedded ThoughtSpot app that the embed is being torn down, so that
|
|
6708
|
+
* it can release any resources it holds before the iframe is removed from the DOM.
|
|
6709
|
+
*
|
|
6710
|
+
* This is triggered for you by `embed.destroy()`; you rarely need to trigger it
|
|
6711
|
+
* directly. If `waitForCleanupOnDestroy` is set in the embed config, `destroy()`
|
|
6712
|
+
* waits for the app to acknowledge this event (up to `cleanupTimeout`) before
|
|
6713
|
+
* removing the iframe.
|
|
6571
6714
|
* @example
|
|
6572
6715
|
* ```js
|
|
6573
6716
|
* liveboardEmbed.trigger(HostEvent.DestroyEmbed);
|
|
@@ -6599,6 +6742,7 @@ export enum HostEvent {
|
|
|
6599
6742
|
* instance. Contact your admin or ThoughtSpot Support to enable chat history on your
|
|
6600
6743
|
* instance.
|
|
6601
6744
|
*
|
|
6745
|
+
* Payload: {@link ConversationScopedRequest}.
|
|
6602
6746
|
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
6603
6747
|
* @example
|
|
6604
6748
|
* ```js
|
|
@@ -6617,6 +6761,7 @@ export enum HostEvent {
|
|
|
6617
6761
|
* instance. Contact your admin or ThoughtSpot Support to enable chat history on your
|
|
6618
6762
|
* instance.
|
|
6619
6763
|
*
|
|
6764
|
+
* Payload: {@link ConversationScopedRequest}.
|
|
6620
6765
|
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
6621
6766
|
* @example
|
|
6622
6767
|
* ```js
|
|
@@ -6642,6 +6787,7 @@ export enum HostEvent {
|
|
|
6642
6787
|
* Trigger the **Send Test Email** action in the Liveboard schedule modal.
|
|
6643
6788
|
* Sends a test schedule email to self or all recipients.
|
|
6644
6789
|
* Requires `isSendNowLiveboardSchedulingEnabled` to be enabled.
|
|
6790
|
+
* Payload: {@link ScheduleEmailRequest}.
|
|
6645
6791
|
* @example
|
|
6646
6792
|
* ```js
|
|
6647
6793
|
* liveboardEmbed.trigger(HostEvent.SendTestScheduleEmail, {
|
|
@@ -6661,6 +6807,7 @@ export enum HostEvent {
|
|
|
6661
6807
|
|
|
6662
6808
|
/**
|
|
6663
6809
|
* Sends a user message (prompt) to the SpotterViz panel programmatically.
|
|
6810
|
+
* Payload: `{ query: string }`.
|
|
6664
6811
|
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
6665
6812
|
* @param query - the prompt text to send.
|
|
6666
6813
|
* @example
|
|
@@ -6674,6 +6821,7 @@ export enum HostEvent {
|
|
|
6674
6821
|
|
|
6675
6822
|
/**
|
|
6676
6823
|
* Initializes a new SpotterViz conversation.
|
|
6824
|
+
* Payload: none.
|
|
6677
6825
|
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
6678
6826
|
* @example
|
|
6679
6827
|
* ```js
|
|
@@ -6684,6 +6832,7 @@ export enum HostEvent {
|
|
|
6684
6832
|
|
|
6685
6833
|
/**
|
|
6686
6834
|
* Opens the SpotterViz panel.
|
|
6835
|
+
* Payload: none.
|
|
6687
6836
|
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
6688
6837
|
* @example
|
|
6689
6838
|
* ```js
|
|
@@ -6694,6 +6843,7 @@ export enum HostEvent {
|
|
|
6694
6843
|
|
|
6695
6844
|
/**
|
|
6696
6845
|
* Closes the SpotterViz panel.
|
|
6846
|
+
* Payload: none.
|
|
6697
6847
|
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
6698
6848
|
* @example
|
|
6699
6849
|
* ```js
|
|
@@ -6705,6 +6855,7 @@ export enum HostEvent {
|
|
|
6705
6855
|
/**
|
|
6706
6856
|
* Clears browser cache and fetches new data for liveboard ChartViz Containers.
|
|
6707
6857
|
* Requires `enableLiveboardDataCache` to be enabled.
|
|
6858
|
+
* Payload: {@link ScheduleEmailRequest}.
|
|
6708
6859
|
* @example
|
|
6709
6860
|
* ```js
|
|
6710
6861
|
* liveboardEmbed.trigger(HostEvent.RefreshLiveboardBrowserCache);
|
|
@@ -6904,6 +7055,7 @@ export enum Param {
|
|
|
6904
7055
|
SpotterDataSources = 'spotterDataSources',
|
|
6905
7056
|
AnalystId = 'analystId',
|
|
6906
7057
|
OpenSpotterOnLiveboardByDefault = 'openSpotterOnLiveboardByDefault',
|
|
7058
|
+
ShowAnswerEditPanel = 'showAnswerEditPanel',
|
|
6907
7059
|
}
|
|
6908
7060
|
|
|
6909
7061
|
/**
|
|
@@ -8724,7 +8876,7 @@ export enum Action {
|
|
|
8724
8876
|
* ```js
|
|
8725
8877
|
* hiddenActions: [Action.QuickSearchPill]
|
|
8726
8878
|
* ```
|
|
8727
|
-
* @version SDK: 1.
|
|
8879
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
8728
8880
|
*/
|
|
8729
8881
|
QuickSearchPill = 'quickSearchPill',
|
|
8730
8882
|
/**
|
|
@@ -8739,7 +8891,7 @@ export enum Action {
|
|
|
8739
8891
|
* ```js
|
|
8740
8892
|
* hiddenActions: [Action.DeepAnalysisPill]
|
|
8741
8893
|
* ```
|
|
8742
|
-
* @version SDK: 1.
|
|
8894
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
8743
8895
|
*/
|
|
8744
8896
|
DeepAnalysisPill = 'deepAnalysisPill',
|
|
8745
8897
|
/**
|
|
@@ -8754,7 +8906,7 @@ export enum Action {
|
|
|
8754
8906
|
* ```js
|
|
8755
8907
|
* hiddenActions: [Action.DataLiteracyPill]
|
|
8756
8908
|
* ```
|
|
8757
|
-
* @version SDK: 1.
|
|
8909
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
8758
8910
|
*/
|
|
8759
8911
|
DataLiteracyPill = 'dataLiteracyPill',
|
|
8760
8912
|
/**
|
|
@@ -8940,6 +9092,225 @@ export enum Action {
|
|
|
8940
9092
|
* ```
|
|
8941
9093
|
*/
|
|
8942
9094
|
SpotterOnLiveboard = 'spotterOnLiveboard',
|
|
9095
|
+
/**
|
|
9096
|
+
* Controls the visibility and disabled state of the "Chart Type" menu item
|
|
9097
|
+
* in Chart Settings V2.
|
|
9098
|
+
* @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
|
|
9099
|
+
* @example
|
|
9100
|
+
* ```js
|
|
9101
|
+
* {
|
|
9102
|
+
* hiddenActions: [Action.ChartTypeSettings],
|
|
9103
|
+
* disabledActions: [Action.ChartTypeSettings],
|
|
9104
|
+
* }
|
|
9105
|
+
* ```
|
|
9106
|
+
*/
|
|
9107
|
+
ChartTypeSettings = 'CHART_TYPE',
|
|
9108
|
+
/**
|
|
9109
|
+
* Controls the visibility and disabled state of the "Layout" menu item
|
|
9110
|
+
* in Chart Settings V2.
|
|
9111
|
+
* @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
|
|
9112
|
+
* @example
|
|
9113
|
+
* ```js
|
|
9114
|
+
* {
|
|
9115
|
+
* hiddenActions: [Action.LayoutSettings],
|
|
9116
|
+
* disabledActions: [Action.LayoutSettings],
|
|
9117
|
+
* }
|
|
9118
|
+
* ```
|
|
9119
|
+
*/
|
|
9120
|
+
LayoutSettings = 'LAYOUT',
|
|
9121
|
+
/**
|
|
9122
|
+
* Controls the visibility and disabled state of the "Column" menu item
|
|
9123
|
+
* in Chart Settings V2.
|
|
9124
|
+
* @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
|
|
9125
|
+
* @example
|
|
9126
|
+
* ```js
|
|
9127
|
+
* {
|
|
9128
|
+
* hiddenActions: [Action.ColumnSettings],
|
|
9129
|
+
* disabledActions: [Action.ColumnSettings],
|
|
9130
|
+
* }
|
|
9131
|
+
* ```
|
|
9132
|
+
*/
|
|
9133
|
+
ColumnSettings = 'COLUMN',
|
|
9134
|
+
/**
|
|
9135
|
+
* Controls the visibility and disabled state of the "Axis" menu item
|
|
9136
|
+
* in Chart Settings V2.
|
|
9137
|
+
* @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
|
|
9138
|
+
* @example
|
|
9139
|
+
* ```js
|
|
9140
|
+
* {
|
|
9141
|
+
* hiddenActions: [Action.AxisSettings],
|
|
9142
|
+
* disabledActions: [Action.AxisSettings],
|
|
9143
|
+
* }
|
|
9144
|
+
* ```
|
|
9145
|
+
*/
|
|
9146
|
+
AxisSettings = 'AXIS',
|
|
9147
|
+
/**
|
|
9148
|
+
* Controls the visibility and disabled state of the "Data Label" menu item
|
|
9149
|
+
* in Chart Settings V2.
|
|
9150
|
+
* @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
|
|
9151
|
+
* @example
|
|
9152
|
+
* ```js
|
|
9153
|
+
* {
|
|
9154
|
+
* hiddenActions: [Action.DataLabelSettings],
|
|
9155
|
+
* disabledActions: [Action.DataLabelSettings],
|
|
9156
|
+
* }
|
|
9157
|
+
* ```
|
|
9158
|
+
*/
|
|
9159
|
+
DataLabelSettings = 'DATA_LABEL',
|
|
9160
|
+
/**
|
|
9161
|
+
* Controls the visibility and disabled state of the "Tooltip" menu item
|
|
9162
|
+
* in Chart Settings V2.
|
|
9163
|
+
* @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
|
|
9164
|
+
* @example
|
|
9165
|
+
* ```js
|
|
9166
|
+
* {
|
|
9167
|
+
* hiddenActions: [Action.TooltipSettings],
|
|
9168
|
+
* disabledActions: [Action.TooltipSettings],
|
|
9169
|
+
* }
|
|
9170
|
+
* ```
|
|
9171
|
+
*/
|
|
9172
|
+
TooltipSettings = 'TOOLTIP',
|
|
9173
|
+
/**
|
|
9174
|
+
* Controls the visibility and disabled state of the "Legend" menu item
|
|
9175
|
+
* in Chart Settings V2.
|
|
9176
|
+
* @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
|
|
9177
|
+
* @example
|
|
9178
|
+
* ```js
|
|
9179
|
+
* {
|
|
9180
|
+
* hiddenActions: [Action.LegendSettings],
|
|
9181
|
+
* disabledActions: [Action.LegendSettings],
|
|
9182
|
+
* }
|
|
9183
|
+
* ```
|
|
9184
|
+
*/
|
|
9185
|
+
LegendSettings = 'LEGEND',
|
|
9186
|
+
/**
|
|
9187
|
+
* Controls the visibility and disabled state of the "Display" menu item
|
|
9188
|
+
* in Chart Settings V2.
|
|
9189
|
+
* @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
|
|
9190
|
+
* @example
|
|
9191
|
+
* ```js
|
|
9192
|
+
* {
|
|
9193
|
+
* hiddenActions: [Action.DisplaySettings],
|
|
9194
|
+
* disabledActions: [Action.DisplaySettings],
|
|
9195
|
+
* }
|
|
9196
|
+
* ```
|
|
9197
|
+
*/
|
|
9198
|
+
DisplaySettings = 'DISPLAY',
|
|
9199
|
+
/**
|
|
9200
|
+
* Controls the visibility and disabled state of the "Query Details" menu
|
|
9201
|
+
* item in Chart Settings V2.
|
|
9202
|
+
* @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
|
|
9203
|
+
* @example
|
|
9204
|
+
* ```js
|
|
9205
|
+
* {
|
|
9206
|
+
* hiddenActions: [Action.QuerySettings],
|
|
9207
|
+
* disabledActions: [Action.QuerySettings],
|
|
9208
|
+
* }
|
|
9209
|
+
* ```
|
|
9210
|
+
*/
|
|
9211
|
+
QuerySettings = 'QUERY_DETAILS',
|
|
9212
|
+
/**
|
|
9213
|
+
* Controls the visibility and disabled state of the "Custom Action" menu
|
|
9214
|
+
* item in Chart Settings V2.
|
|
9215
|
+
* @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
|
|
9216
|
+
* @example
|
|
9217
|
+
* ```js
|
|
9218
|
+
* {
|
|
9219
|
+
* hiddenActions: [Action.CustomSettings],
|
|
9220
|
+
* disabledActions: [Action.CustomSettings],
|
|
9221
|
+
* }
|
|
9222
|
+
* ```
|
|
9223
|
+
*/
|
|
9224
|
+
CustomSettings = 'CUSTOM_ACTION',
|
|
9225
|
+
/**
|
|
9226
|
+
* Controls the visibility and disabled state of the "Muze AI" menu item
|
|
9227
|
+
* in Chart Settings V2.
|
|
9228
|
+
* @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
|
|
9229
|
+
* @example
|
|
9230
|
+
* ```js
|
|
9231
|
+
* {
|
|
9232
|
+
* hiddenActions: [Action.MuzeAiSettings],
|
|
9233
|
+
* disabledActions: [Action.MuzeAiSettings],
|
|
9234
|
+
* }
|
|
9235
|
+
* ```
|
|
9236
|
+
*/
|
|
9237
|
+
MuzeAiSettings = 'MUZE_AI',
|
|
9238
|
+
/**
|
|
9239
|
+
* Controls the visibility and disabled state of the "R Analysis" menu item
|
|
9240
|
+
* in Chart Settings V2.
|
|
9241
|
+
* @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
|
|
9242
|
+
* @example
|
|
9243
|
+
* ```js
|
|
9244
|
+
* {
|
|
9245
|
+
* hiddenActions: [Action.RAnalysisSettings],
|
|
9246
|
+
* disabledActions: [Action.RAnalysisSettings],
|
|
9247
|
+
* }
|
|
9248
|
+
* ```
|
|
9249
|
+
*/
|
|
9250
|
+
RAnalysisSettings = 'R_ANALYSIS',
|
|
9251
|
+
/**
|
|
9252
|
+
* Controls the visibility and disabled state of the "Add to Collection" menu item.
|
|
9253
|
+
* @version SDK: 1.52.1 | ThoughtSpot Cloud: 26.5.0.cl
|
|
9254
|
+
* @example
|
|
9255
|
+
* ```js
|
|
9256
|
+
* {
|
|
9257
|
+
* hiddenActions: [Action.AddToCollection],
|
|
9258
|
+
* disabledActions: [Action.AddToCollection],
|
|
9259
|
+
* }
|
|
9260
|
+
* ```
|
|
9261
|
+
*/
|
|
9262
|
+
AddToCollection = 'addToCollection',
|
|
9263
|
+
/**
|
|
9264
|
+
* Controls the visibility and disabled state of the "Create Collection" button.
|
|
9265
|
+
* @version SDK: 1.52.1 | ThoughtSpot Cloud: 26.5.0.cl
|
|
9266
|
+
* @example
|
|
9267
|
+
* ```js
|
|
9268
|
+
* {
|
|
9269
|
+
* hiddenActions: [Action.CreateCollection],
|
|
9270
|
+
* disabledActions: [Action.CreateCollection],
|
|
9271
|
+
* }
|
|
9272
|
+
* ```
|
|
9273
|
+
*/
|
|
9274
|
+
CreateCollection = 'createCollection',
|
|
9275
|
+
/**
|
|
9276
|
+
* Controls the visibility and disabled state of the "Move" menu item in a
|
|
9277
|
+
* Collection.
|
|
9278
|
+
* @version SDK: 1.52.1 | ThoughtSpot Cloud: 26.5.0.cl
|
|
9279
|
+
* @example
|
|
9280
|
+
* ```js
|
|
9281
|
+
* {
|
|
9282
|
+
* hiddenActions: [Action.MoveToCollection],
|
|
9283
|
+
* disabledActions: [Action.MoveToCollection],
|
|
9284
|
+
* }
|
|
9285
|
+
* ```
|
|
9286
|
+
*/
|
|
9287
|
+
MoveToCollection = 'moveToCollection',
|
|
9288
|
+
/**
|
|
9289
|
+
* Controls the visibility and disabled state of the "Remove" menu item in a
|
|
9290
|
+
* Collection.
|
|
9291
|
+
* @version SDK: 1.52.1 | ThoughtSpot Cloud: 26.5.0.cl
|
|
9292
|
+
* @example
|
|
9293
|
+
* ```js
|
|
9294
|
+
* {
|
|
9295
|
+
* hiddenActions: [Action.RemoveFromCollection],
|
|
9296
|
+
* disabledActions: [Action.RemoveFromCollection],
|
|
9297
|
+
* }
|
|
9298
|
+
* ```
|
|
9299
|
+
*/
|
|
9300
|
+
RemoveFromCollection = 'removeFromCollection',
|
|
9301
|
+
/**
|
|
9302
|
+
* Controls the visibility and disabled state of the "Delete" menu item for a
|
|
9303
|
+
* Collection.
|
|
9304
|
+
* @version SDK: 1.52.1 | ThoughtSpot Cloud: 26.5.0.cl
|
|
9305
|
+
* @example
|
|
9306
|
+
* ```js
|
|
9307
|
+
* {
|
|
9308
|
+
* hiddenActions: [Action.DeleteCollection],
|
|
9309
|
+
* disabledActions: [Action.DeleteCollection],
|
|
9310
|
+
* }
|
|
9311
|
+
* ```
|
|
9312
|
+
*/
|
|
9313
|
+
DeleteCollection = 'deleteCollection',
|
|
8943
9314
|
}
|
|
8944
9315
|
export interface AnswerServiceType {
|
|
8945
9316
|
getAnswer?: (offset: number, batchSize: number) => any;
|
|
@@ -8990,6 +9361,11 @@ export interface VizPoint {
|
|
|
8990
9361
|
* @group Events
|
|
8991
9362
|
*/
|
|
8992
9363
|
export interface CustomActionPayload {
|
|
9364
|
+
/**
|
|
9365
|
+
* Id of the custom action that was triggered. Matches the `id` you set on
|
|
9366
|
+
* the {@link CustomAction}. Omitted on Liveboard-level code-based actions.
|
|
9367
|
+
*/
|
|
9368
|
+
id?: string;
|
|
8993
9369
|
contextMenuPoints?: {
|
|
8994
9370
|
clickedPoint: VizPoint;
|
|
8995
9371
|
selectedPoints: VizPoint[];
|
|
@@ -9010,21 +9386,58 @@ export interface CustomActionPayload {
|
|
|
9010
9386
|
vizId?: string;
|
|
9011
9387
|
}
|
|
9012
9388
|
|
|
9389
|
+
/**
|
|
9390
|
+
* A code-based custom action to inject into the embedded ThoughtSpot UI.
|
|
9391
|
+
* Pass an array of these as `customActions` in the embed view config. When a
|
|
9392
|
+
* user invokes the action, the host emits {@link EmbedEvent.CustomAction} with
|
|
9393
|
+
* a {@link CustomActionPayload} carrying the same `id`.
|
|
9394
|
+
*/
|
|
9013
9395
|
export interface CustomAction {
|
|
9396
|
+
/**
|
|
9397
|
+
* Display label shown on the action's button or menu item.
|
|
9398
|
+
*/
|
|
9014
9399
|
name: string;
|
|
9400
|
+
/**
|
|
9401
|
+
* Unique identifier for the action. Echoed back as `id` on the
|
|
9402
|
+
* {@link CustomActionPayload} when the action is invoked.
|
|
9403
|
+
*/
|
|
9015
9404
|
id: string;
|
|
9405
|
+
/**
|
|
9406
|
+
* Where the action appears: a primary button, the "More" menu, or the
|
|
9407
|
+
* right-click context menu. See {@link CustomActionsPosition}.
|
|
9408
|
+
*/
|
|
9016
9409
|
position: CustomActionsPosition;
|
|
9410
|
+
/**
|
|
9411
|
+
* The surface the action applies to (Liveboard, visualization, Answer, or
|
|
9412
|
+
* Spotter). See {@link CustomActionTarget}. The allowed `position` values
|
|
9413
|
+
* and scoping keys depend on the target.
|
|
9414
|
+
*/
|
|
9017
9415
|
target: CustomActionTarget;
|
|
9416
|
+
/**
|
|
9417
|
+
* Scope the action to specific objects by GUID. Which keys are allowed
|
|
9418
|
+
* depends on `target` (for example, a `VIZ` action may use `answerIds`,
|
|
9419
|
+
* `liveboardIds`, and `vizIds`).
|
|
9420
|
+
*/
|
|
9018
9421
|
metadataIds?: {
|
|
9019
9422
|
answerIds?: string[];
|
|
9020
9423
|
liveboardIds?: string[];
|
|
9021
9424
|
vizIds?: string[];
|
|
9022
9425
|
};
|
|
9426
|
+
/**
|
|
9427
|
+
* Scope the action by data model, using model GUIDs or column names.
|
|
9428
|
+
* Allowed for `VIZ`, `ANSWER`, and `SPOTTER` targets.
|
|
9429
|
+
*/
|
|
9023
9430
|
dataModelIds?: {
|
|
9024
9431
|
modelIds?: string[];
|
|
9025
9432
|
modelColumnNames?: string[];
|
|
9026
9433
|
};
|
|
9434
|
+
/**
|
|
9435
|
+
* Restrict the action to specific organizations by ID.
|
|
9436
|
+
*/
|
|
9027
9437
|
orgIds?: string[];
|
|
9438
|
+
/**
|
|
9439
|
+
* Restrict the action to specific user groups by ID.
|
|
9440
|
+
*/
|
|
9028
9441
|
groupIds?: string[];
|
|
9029
9442
|
}
|
|
9030
9443
|
|
|
@@ -9375,10 +9788,42 @@ export interface EmbedErrorDetailsEvent {
|
|
|
9375
9788
|
message: string | string[];
|
|
9376
9789
|
/** Machine-readable error code for programmatic error handling */
|
|
9377
9790
|
code: EmbedErrorCodes;
|
|
9791
|
+
/** How badly the embed is affected. Defaults to {@link EmbedErrorSeverity.SEV3}. */
|
|
9792
|
+
severity?: EmbedErrorSeverity;
|
|
9378
9793
|
/** Additional context-specific for backward compatibility */
|
|
9379
9794
|
[key: string]: any;
|
|
9380
9795
|
}
|
|
9381
9796
|
|
|
9797
|
+
/**
|
|
9798
|
+
* How badly an error affects the embed, so the host can decide whether it is
|
|
9799
|
+
* worth surfacing to the end user.
|
|
9800
|
+
*
|
|
9801
|
+
* Mirrors the severity that ThoughtSpot itself stamps on errors raised inside
|
|
9802
|
+
* the embedded app, so a host can apply one rule to both sources.
|
|
9803
|
+
*
|
|
9804
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
9805
|
+
* @group Error Handling
|
|
9806
|
+
*
|
|
9807
|
+
* @example
|
|
9808
|
+
* Only surface errors that took the embed down
|
|
9809
|
+
*
|
|
9810
|
+
* ```js
|
|
9811
|
+
* embed.on(EmbedEvent.Error, (error) => {
|
|
9812
|
+
* if (error.severity === EmbedErrorSeverity.SEV1) {
|
|
9813
|
+
* showBanner(error.message);
|
|
9814
|
+
* }
|
|
9815
|
+
* });
|
|
9816
|
+
* ```
|
|
9817
|
+
*/
|
|
9818
|
+
export enum EmbedErrorSeverity {
|
|
9819
|
+
/** The embed cannot render. Nothing usable is on screen. */
|
|
9820
|
+
SEV1 = 1,
|
|
9821
|
+
/** Something is degraded but the embed still works. */
|
|
9822
|
+
SEV2 = 2,
|
|
9823
|
+
/** Everything else, including validation of the embedder's own input. */
|
|
9824
|
+
SEV3 = 3,
|
|
9825
|
+
}
|
|
9826
|
+
|
|
9382
9827
|
/**
|
|
9383
9828
|
* Context types for specifying the page context when triggering host events.
|
|
9384
9829
|
* Used as the third parameter in the `trigger` method to help ThoughtSpot
|
|
@@ -9439,26 +9884,41 @@ export interface DefaultAppInitData {
|
|
|
9439
9884
|
}
|
|
9440
9885
|
|
|
9441
9886
|
/**
|
|
9442
|
-
*
|
|
9887
|
+
* Named groups of ThoughtSpot APIs that can be intercepted, for use in
|
|
9888
|
+
* `interceptUrls`. Each group expands to the underlying request URLs, so you do
|
|
9889
|
+
* not have to list them individually.
|
|
9443
9890
|
*/
|
|
9444
9891
|
export enum InterceptedApiType {
|
|
9445
9892
|
/**
|
|
9446
|
-
* The
|
|
9893
|
+
* The APIs that fetch the data backing an Answer, including its chart,
|
|
9894
|
+
* table, and headline data.
|
|
9447
9895
|
*/
|
|
9448
9896
|
AnswerData = 'AnswerData',
|
|
9449
9897
|
/**
|
|
9450
|
-
*
|
|
9898
|
+
* Intercepts every `fetch` request the embedded application makes, not only
|
|
9899
|
+
* the data APIs. This includes authentication, session, and metadata calls,
|
|
9900
|
+
* so the handler must respond to requests it does not recognize by passing
|
|
9901
|
+
* `execute: true`. Listing this alongside other entries in `interceptUrls`
|
|
9902
|
+
* supersedes them.
|
|
9451
9903
|
*/
|
|
9452
9904
|
ALL = 'ALL',
|
|
9453
9905
|
/**
|
|
9454
|
-
* The
|
|
9906
|
+
* The APIs that fetch the data backing a Liveboard.
|
|
9455
9907
|
*/
|
|
9456
9908
|
LiveboardData = 'LiveboardData',
|
|
9457
9909
|
}
|
|
9458
9910
|
|
|
9459
9911
|
export type ApiInterceptFlags = {
|
|
9460
9912
|
/**
|
|
9461
|
-
*
|
|
9913
|
+
* Emits `EmbedEvent.OnBeforeGetVizDataIntercept` before the Answer data
|
|
9914
|
+
* APIs are called. This is the earlier, narrower form of interception, kept
|
|
9915
|
+
* for backward compatibility and implemented on top of
|
|
9916
|
+
* `EmbedEvent.ApiIntercept`. Prefer `interceptUrls` with
|
|
9917
|
+
* `InterceptedApiType.AnswerData` in new code.
|
|
9918
|
+
*
|
|
9919
|
+
* Setting this also intercepts the Answer data APIs, so both
|
|
9920
|
+
* `EmbedEvent.OnBeforeGetVizDataIntercept` and `EmbedEvent.ApiIntercept`
|
|
9921
|
+
* are emitted for those requests.
|
|
9462
9922
|
*
|
|
9463
9923
|
* Can be used for Search and App Embed from SDK 1.29.0
|
|
9464
9924
|
*
|
|
@@ -9466,14 +9926,21 @@ export type ApiInterceptFlags = {
|
|
|
9466
9926
|
*/
|
|
9467
9927
|
isOnBeforeGetVizDataInterceptEnabled?: boolean;
|
|
9468
9928
|
/**
|
|
9469
|
-
*
|
|
9470
|
-
*
|
|
9929
|
+
* The requests to intercept, given as `InterceptedApiType` groups, absolute
|
|
9930
|
+
* URLs, or paths beginning with `/` that are resolved against the
|
|
9931
|
+
* ThoughtSpot host. Setting this is what turns interception on.
|
|
9932
|
+
*
|
|
9933
|
+
* A URL matches only on exact equality with the request's fully resolved
|
|
9934
|
+
* URL, query string included, so prefer an `InterceptedApiType` group where
|
|
9935
|
+
* one covers the API you need.
|
|
9936
|
+
*
|
|
9937
|
+
* Each intercepted request pauses and emits `EmbedEvent.ApiIntercept`, then
|
|
9938
|
+
* proceeds according to the response passed to that event's responder.
|
|
9471
9939
|
*
|
|
9472
9940
|
* @example
|
|
9473
9941
|
* ```js
|
|
9474
9942
|
* const embed = new LiveboardEmbed('#embed', {
|
|
9475
9943
|
* ...viewConfig,
|
|
9476
|
-
* enableApiIntercept: true,
|
|
9477
9944
|
* interceptUrls: [InterceptedApiType.LiveboardData],
|
|
9478
9945
|
* })
|
|
9479
9946
|
* ```
|
|
@@ -9482,14 +9949,14 @@ export type ApiInterceptFlags = {
|
|
|
9482
9949
|
*/
|
|
9483
9950
|
interceptUrls?: (string | InterceptedApiType)[];
|
|
9484
9951
|
/**
|
|
9485
|
-
*
|
|
9486
|
-
*
|
|
9952
|
+
* How long, in milliseconds, an intercepted request waits for the
|
|
9953
|
+
* `EmbedEvent.ApiIntercept` responder before it is abandoned. Defaults to
|
|
9954
|
+
* 30000. On timeout the request fails and `EmbedEvent.Error` is emitted.
|
|
9487
9955
|
*
|
|
9488
9956
|
* @example
|
|
9489
9957
|
* ```js
|
|
9490
9958
|
* const embed = new LiveboardEmbed('#embed', {
|
|
9491
9959
|
* ...viewConfig,
|
|
9492
|
-
* enableApiIntercept: true,
|
|
9493
9960
|
* interceptUrls: [InterceptedApiType.ALL],
|
|
9494
9961
|
* interceptTimeout: 1000,
|
|
9495
9962
|
* })
|
|
@@ -9994,3 +10461,164 @@ export interface VisualizationOverrides {
|
|
|
9994
10461
|
/** Table visualization overrides */
|
|
9995
10462
|
table?: TableOverrides;
|
|
9996
10463
|
}
|
|
10464
|
+
|
|
10465
|
+
/**
|
|
10466
|
+
* The configuration object for the full-height behavior shared by the
|
|
10467
|
+
* Liveboard and app embeds.
|
|
10468
|
+
*
|
|
10469
|
+
* When `fullHeight` is enabled the SDK resizes the embed container to match the
|
|
10470
|
+
* height reported by the ThoughtSpot app, and — when lazy loading is also
|
|
10471
|
+
* enabled — keeps the app informed of the portion of the embed that is
|
|
10472
|
+
* currently visible so that visualizations load on demand.
|
|
10473
|
+
*/
|
|
10474
|
+
export interface FullHeightViewConfig {
|
|
10475
|
+
/**
|
|
10476
|
+
* If set to true, the embedded object container dynamically resizes
|
|
10477
|
+
* according to the height of the Liveboard.
|
|
10478
|
+
*
|
|
10479
|
+
* **Note**: Using fullHeight loads all visualizations on the
|
|
10480
|
+
* Liveboard simultaneously, which results in multiple warehouse
|
|
10481
|
+
* queries and potentially a longer wait for the topmost
|
|
10482
|
+
* visualizations to display on the screen.
|
|
10483
|
+
* Setting `fullHeight` to `false` fetches visualizations
|
|
10484
|
+
* incrementally as users scroll the page to view the charts and tables.
|
|
10485
|
+
*
|
|
10486
|
+
* From SDK 1.52.0, enabling `fullHeight` also turns on
|
|
10487
|
+
* {@link lazyLoadingForFullHeight} and
|
|
10488
|
+
* {@link enableScrollableContainerLazyLoading}, so visualizations load as
|
|
10489
|
+
* they scroll into view. Set either flag to `false` to opt out.
|
|
10490
|
+
*
|
|
10491
|
+
* Supported embed types: `LiveboardEmbed`, `AppEmbed`
|
|
10492
|
+
* @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 7.2.1
|
|
10493
|
+
* @example
|
|
10494
|
+
* ```js
|
|
10495
|
+
* // Replace <EmbedComponent> with the embed component name.
|
|
10496
|
+
* // For example, AppEmbed or LiveboardEmbed
|
|
10497
|
+
* const embed = new <EmbedComponent>('#embed', {
|
|
10498
|
+
* ... // other view config
|
|
10499
|
+
* fullHeight: true,
|
|
10500
|
+
* });
|
|
10501
|
+
* ```
|
|
10502
|
+
*/
|
|
10503
|
+
fullHeight?: boolean;
|
|
10504
|
+
/**
|
|
10505
|
+
* This is the minimum height (in pixels) for a full-height Liveboard.
|
|
10506
|
+
* Setting this height helps resolve issues with empty Liveboards and
|
|
10507
|
+
* other screens navigable from a Liveboard.
|
|
10508
|
+
*
|
|
10509
|
+
* Supported embed types: `LiveboardEmbed`, `AppEmbed`
|
|
10510
|
+
* @version SDK: 1.44.2 | ThoughtSpot: 10.15.0.cl
|
|
10511
|
+
* @default 500
|
|
10512
|
+
* @example
|
|
10513
|
+
* ```js
|
|
10514
|
+
* // Replace <EmbedComponent> with the embed component name.
|
|
10515
|
+
* // For example, AppEmbed or LiveboardEmbed
|
|
10516
|
+
* const embed = new <EmbedComponent>('#embed', {
|
|
10517
|
+
* ... // other view config
|
|
10518
|
+
* fullHeight: true,
|
|
10519
|
+
* minimumHeight: 600,
|
|
10520
|
+
* });
|
|
10521
|
+
* ```
|
|
10522
|
+
*/
|
|
10523
|
+
minimumHeight?: number;
|
|
10524
|
+
/**
|
|
10525
|
+
* This is the minimum height (in pixels) for a full-height Liveboard.
|
|
10526
|
+
* Setting this height helps resolve issues with empty Liveboards and
|
|
10527
|
+
* other screens navigable from a Liveboard.
|
|
10528
|
+
*
|
|
10529
|
+
* Supported embed types: `LiveboardEmbed`, `AppEmbed`
|
|
10530
|
+
* @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
|
|
10531
|
+
* @deprecated Use `minimumHeight` instead.
|
|
10532
|
+
* @default 500
|
|
10533
|
+
* @example
|
|
10534
|
+
* ```js
|
|
10535
|
+
* // Replace <EmbedComponent> with the embed component name.
|
|
10536
|
+
* // For example, AppEmbed or LiveboardEmbed
|
|
10537
|
+
* const embed = new <EmbedComponent>('#embed', {
|
|
10538
|
+
* ... // other view config
|
|
10539
|
+
* fullHeight: true,
|
|
10540
|
+
* defaultHeight: 600,
|
|
10541
|
+
* });
|
|
10542
|
+
* ```
|
|
10543
|
+
*/
|
|
10544
|
+
defaultHeight?: number;
|
|
10545
|
+
/**
|
|
10546
|
+
* Loads visualizations only as they scroll into the viewport, instead of
|
|
10547
|
+
* loading the whole full-height Liveboard at once.
|
|
10548
|
+
*
|
|
10549
|
+
* From SDK 1.52.0 this is enabled automatically whenever `fullHeight` is
|
|
10550
|
+
* `true`. On SDK 1.51.0 and earlier it defaulted to `false` and had to be
|
|
10551
|
+
* set explicitly. Set it to `false` to load every visualization upfront.
|
|
10552
|
+
* The flag has no effect unless `fullHeight` is enabled.
|
|
10553
|
+
*
|
|
10554
|
+
* Supported embed types: `LiveboardEmbed`, `AppEmbed`
|
|
10555
|
+
* @type {boolean}
|
|
10556
|
+
* @version SDK: 1.40.0 | ThoughtSpot: 10.12.0.cl
|
|
10557
|
+
* @default true when `fullHeight` is enabled, from SDK 1.52.0
|
|
10558
|
+
* @example
|
|
10559
|
+
* ```js
|
|
10560
|
+
* // Replace <EmbedComponent> with the embed component name.
|
|
10561
|
+
* // For example, AppEmbed or LiveboardEmbed
|
|
10562
|
+
* const embed = new <EmbedComponent>('#embed-container', {
|
|
10563
|
+
* // ...other options
|
|
10564
|
+
* fullHeight: true,
|
|
10565
|
+
* lazyLoadingForFullHeight: true,
|
|
10566
|
+
* })
|
|
10567
|
+
* ```
|
|
10568
|
+
*/
|
|
10569
|
+
lazyLoadingForFullHeight?: boolean;
|
|
10570
|
+
/**
|
|
10571
|
+
* How far outside the viewport a visualization starts loading, when
|
|
10572
|
+
* {@link lazyLoadingForFullHeight} is enabled.
|
|
10573
|
+
*
|
|
10574
|
+
* For example, if the margin is set to '10px',
|
|
10575
|
+
* the visualization will be loaded 10px before its top edge is visible in the
|
|
10576
|
+
* viewport.
|
|
10577
|
+
*
|
|
10578
|
+
* The format is similar to CSS margin, so `'500px 0px'` extends the
|
|
10579
|
+
* prefetch 500px above and below the viewport and not sideways. Accepted
|
|
10580
|
+
* units are `px`, `em`, `rem`, `%`, `vh` and `vw`, plus bare `0` and
|
|
10581
|
+
* `auto`; an invalid value is logged and ignored.
|
|
10582
|
+
*
|
|
10583
|
+
* From SDK 1.52.0 this defaults to `'500px 0px'` — roughly one
|
|
10584
|
+
* visualization ahead of the scroll position, so a chart has usually
|
|
10585
|
+
* finished loading by the time it scrolls into view. Use a smaller margin
|
|
10586
|
+
* to cut warehouse queries further, or `'0px'` to load a visualization
|
|
10587
|
+
* only once it is actually visible.
|
|
10588
|
+
*
|
|
10589
|
+
* Supported embed types: `LiveboardEmbed`, `AppEmbed`
|
|
10590
|
+
* @type {string}
|
|
10591
|
+
* @version SDK: 1.40.0 | ThoughtSpot: 10.12.0.cl
|
|
10592
|
+
* @default '500px 0px' when `fullHeight` is enabled, from SDK 1.52.0
|
|
10593
|
+
* @example
|
|
10594
|
+
* ```js
|
|
10595
|
+
* // Replace <EmbedComponent> with the embed component name.
|
|
10596
|
+
* // For example, AppEmbed or LiveboardEmbed
|
|
10597
|
+
* const embed = new <EmbedComponent>('#embed-container', {
|
|
10598
|
+
* // ...other options
|
|
10599
|
+
* fullHeight: true,
|
|
10600
|
+
* lazyLoadingForFullHeight: true,
|
|
10601
|
+
* // With 0px, the visualization only starts loading once it is
|
|
10602
|
+
* // visible in the viewport.
|
|
10603
|
+
* lazyLoadingMargin: '0px',
|
|
10604
|
+
* })
|
|
10605
|
+
* ```
|
|
10606
|
+
*/
|
|
10607
|
+
lazyLoadingMargin?: string;
|
|
10608
|
+
/**
|
|
10609
|
+
* Computes the visible region of the embed against its scrollable and
|
|
10610
|
+
* clipping ancestors, instead of treating the browser window as the only
|
|
10611
|
+
* viewport, and tracks scroll and resize on those ancestors.
|
|
10612
|
+
*
|
|
10613
|
+
* From SDK 1.52.0 this is enabled automatically whenever `fullHeight` is
|
|
10614
|
+
* `true`. On SDK 1.51.0 and earlier it defaulted to `false` and had to be
|
|
10615
|
+
* set explicitly. Set it to `false` when the page scrolls with the window
|
|
10616
|
+
* and the embed has no clipping ancestor, to skip the extra ancestor
|
|
10617
|
+
* tracking.
|
|
10618
|
+
*
|
|
10619
|
+
* Supported embed types: `LiveboardEmbed`, `AppEmbed`
|
|
10620
|
+
* @type {boolean}
|
|
10621
|
+
* @default true when `fullHeight` is enabled, from SDK 1.52.0
|
|
10622
|
+
*/
|
|
10623
|
+
enableScrollableContainerLazyLoading?: boolean;
|
|
10624
|
+
}
|