@thoughtspot/visual-embed-sdk 1.20.0-alpha.2 → 1.20.0-prerender.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/auth.d.ts +75 -5
- package/dist/src/auth.d.ts.map +1 -1
- package/dist/src/config.d.ts +1 -0
- package/dist/src/config.d.ts.map +1 -1
- package/dist/src/embed/app.d.ts +19 -7
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/base.d.ts +39 -19
- package/dist/src/embed/base.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts +19 -7
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/embed/search-bar.d.ts +7 -1
- package/dist/src/embed/search-bar.d.ts.map +1 -1
- package/dist/src/embed/search.d.ts +11 -3
- package/dist/src/embed/search.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.d.ts +76 -5
- package/dist/src/embed/ts-embed.d.ts.map +1 -1
- package/dist/src/errors.d.ts.map +1 -1
- package/dist/src/index.d.ts +3 -3
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/mixpanel-service.d.ts +8 -0
- package/dist/src/mixpanel-service.d.ts.map +1 -1
- package/dist/src/react/index.d.ts.map +1 -1
- package/dist/src/react/util.d.ts +4 -0
- package/dist/src/react/util.d.ts.map +1 -1
- package/dist/src/test/test-utils.d.ts +11 -2
- package/dist/src/test/test-utils.d.ts.map +1 -1
- package/dist/src/types.d.ts +429 -97
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/answerService.d.ts +7 -0
- package/dist/src/utils/answerService.d.ts.map +1 -1
- package/dist/src/utils/authService.d.ts +30 -0
- package/dist/src/utils/authService.d.ts.map +1 -1
- package/dist/src/utils/processData.d.ts +12 -0
- package/dist/src/utils/processData.d.ts.map +1 -1
- package/dist/src/utils/processTrigger.d.ts +7 -0
- package/dist/src/utils/processTrigger.d.ts.map +1 -1
- package/dist/src/utils.d.ts +12 -0
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/tsembed.es.js +818 -285
- package/dist/tsembed.js +791 -284
- package/lib/package.json +4 -3
- package/lib/src/auth.d.ts +75 -5
- package/lib/src/auth.d.ts.map +1 -1
- package/lib/src/auth.js +86 -26
- package/lib/src/auth.js.map +1 -1
- package/lib/src/auth.spec.js +14 -5
- package/lib/src/auth.spec.js.map +1 -1
- package/lib/src/config.d.ts +1 -0
- package/lib/src/config.d.ts.map +1 -1
- package/lib/src/config.js +5 -3
- package/lib/src/config.js.map +1 -1
- package/lib/src/config.spec.js.map +1 -1
- package/lib/src/embed/app.d.ts +19 -7
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +26 -16
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/app.spec.js +12 -12
- package/lib/src/embed/app.spec.js.map +1 -1
- package/lib/src/embed/base.d.ts +39 -19
- package/lib/src/embed/base.d.ts.map +1 -1
- package/lib/src/embed/base.js +49 -15
- package/lib/src/embed/base.js.map +1 -1
- package/lib/src/embed/base.spec.js +2 -2
- package/lib/src/embed/base.spec.js.map +1 -1
- package/lib/src/embed/embed.spec.js +1 -1
- package/lib/src/embed/embed.spec.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts +19 -7
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +50 -38
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +37 -30
- package/lib/src/embed/liveboard.spec.js.map +1 -1
- package/lib/src/embed/pinboard.spec.js +14 -26
- package/lib/src/embed/pinboard.spec.js.map +1 -1
- package/lib/src/embed/search-bar.d.ts +7 -1
- package/lib/src/embed/search-bar.d.ts.map +1 -1
- package/lib/src/embed/search-bar.js +6 -7
- package/lib/src/embed/search-bar.js.map +1 -1
- package/lib/src/embed/search.d.ts +11 -3
- package/lib/src/embed/search.d.ts.map +1 -1
- package/lib/src/embed/search.js +19 -15
- package/lib/src/embed/search.js.map +1 -1
- package/lib/src/embed/search.spec.js +16 -19
- package/lib/src/embed/search.spec.js.map +1 -1
- package/lib/src/embed/searchEmbed-basic-auth.spec.js +4 -0
- package/lib/src/embed/searchEmbed-basic-auth.spec.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts +76 -5
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +150 -72
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/embed/ts-embed.spec.js +23 -24
- package/lib/src/embed/ts-embed.spec.js.map +1 -1
- package/lib/src/errors.d.ts.map +1 -1
- package/lib/src/errors.js.map +1 -1
- package/lib/src/index.d.ts +3 -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/mixpanel-service.d.ts +8 -0
- package/lib/src/mixpanel-service.d.ts.map +1 -1
- package/lib/src/mixpanel-service.js +13 -1
- package/lib/src/mixpanel-service.js.map +1 -1
- package/lib/src/mixpanel-service.spec.js.map +1 -1
- package/lib/src/react/index.d.ts.map +1 -1
- package/lib/src/react/index.js +4 -6
- package/lib/src/react/index.js.map +1 -1
- package/lib/src/react/index.spec.js +3 -6
- package/lib/src/react/index.spec.js.map +1 -1
- package/lib/src/react/util.d.ts +4 -0
- package/lib/src/react/util.d.ts.map +1 -1
- package/lib/src/react/util.js +4 -0
- package/lib/src/react/util.js.map +1 -1
- package/lib/src/test/test-utils.d.ts +11 -2
- package/lib/src/test/test-utils.d.ts.map +1 -1
- package/lib/src/test/test-utils.js +36 -25
- package/lib/src/test/test-utils.js.map +1 -1
- package/lib/src/types.d.ts +429 -97
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +310 -72
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils/answerService.d.ts +7 -0
- package/lib/src/utils/answerService.d.ts.map +1 -1
- package/lib/src/utils/answerService.js +7 -0
- package/lib/src/utils/answerService.js.map +1 -1
- package/lib/src/utils/answerService.spec.js.map +1 -1
- package/lib/src/utils/authService.d.ts +30 -0
- package/lib/src/utils/authService.d.ts.map +1 -1
- package/lib/src/utils/authService.js +39 -2
- package/lib/src/utils/authService.js.map +1 -1
- package/lib/src/utils/authService.spec.js.map +1 -1
- package/lib/src/utils/processData.d.ts +12 -0
- package/lib/src/utils/processData.d.ts.map +1 -1
- package/lib/src/utils/processData.js +33 -5
- package/lib/src/utils/processData.js.map +1 -1
- package/lib/src/utils/processData.spec.js.map +1 -1
- package/lib/src/utils/processTrigger.d.ts +7 -0
- package/lib/src/utils/processTrigger.d.ts.map +1 -1
- package/lib/src/utils/processTrigger.js +17 -3
- package/lib/src/utils/processTrigger.js.map +1 -1
- package/lib/src/utils/processTrigger.spec.js.map +1 -1
- package/lib/src/utils.d.ts +12 -0
- package/lib/src/utils.d.ts.map +1 -1
- package/lib/src/utils.js +24 -19
- package/lib/src/utils.js.map +1 -1
- package/lib/src/utils.spec.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +664 -141
- package/package.json +4 -3
- package/src/auth.spec.ts +68 -150
- package/src/auth.ts +141 -101
- package/src/config.spec.ts +2 -4
- package/src/config.ts +5 -3
- package/src/embed/app.spec.ts +25 -14
- package/src/embed/app.ts +49 -37
- package/src/embed/base.spec.ts +6 -12
- package/src/embed/base.ts +74 -57
- package/src/embed/embed.spec.ts +5 -6
- package/src/embed/liveboard.spec.ts +56 -37
- package/src/embed/liveboard.ts +67 -65
- package/src/embed/pinboard.spec.ts +26 -29
- package/src/embed/search-bar.tsx +14 -9
- package/src/embed/search.spec.ts +31 -21
- package/src/embed/search.ts +28 -22
- package/src/embed/searchEmbed-basic-auth.spec.ts +22 -28
- package/src/embed/ts-embed.spec.ts +70 -148
- package/src/embed/ts-embed.ts +180 -157
- package/src/errors.ts +3 -6
- package/src/index.ts +23 -7
- package/src/mixpanel-service.spec.ts +1 -3
- package/src/mixpanel-service.ts +13 -1
- package/src/react/index.spec.tsx +11 -20
- package/src/react/index.tsx +40 -71
- package/src/react/util.ts +8 -4
- package/src/test/test-utils.ts +43 -39
- package/src/types.ts +427 -97
- package/src/utils/answerService.spec.ts +3 -5
- package/src/utils/answerService.ts +21 -17
- package/src/utils/authService.spec.ts +26 -41
- package/src/utils/authService.ts +47 -21
- package/src/utils/processData.spec.ts +26 -59
- package/src/utils/processData.ts +36 -14
- package/src/utils/processTrigger.spec.ts +1 -6
- package/src/utils/processTrigger.ts +18 -9
- package/src/utils.spec.ts +8 -12
- package/src/utils.ts +25 -26
|
@@ -17,9 +17,9 @@ declare module '@thoughtspot/visual-embed-sdk' {
|
|
|
17
17
|
import { PinboardEmbed, LiveboardViewConfig, LiveboardEmbed } from '@thoughtspot/visual-embed-sdk/embed/liveboard';
|
|
18
18
|
import { SearchEmbed, SearchViewConfig } from '@thoughtspot/visual-embed-sdk/embed/search';
|
|
19
19
|
import { SearchBarEmbed, SearchBarViewConfig } from '@thoughtspot/visual-embed-sdk/embed/search-bar';
|
|
20
|
-
import { AuthFailureType, AuthStatus, AuthEvent, getSessionInfo } from '@thoughtspot/visual-embed-sdk/auth';
|
|
21
|
-
import { AuthType, RuntimeFilter, RuntimeFilterOp, EmbedEvent, HostEvent, DataSourceVisualMode, Action, EmbedConfig, PrefetchFeatures } from '@thoughtspot/visual-embed-sdk/types';
|
|
22
|
-
export { init, logout, prefetch, getEmbedConfig as getInitConfig, getSessionInfo, SearchEmbed, SearchBarEmbed, PinboardEmbed, LiveboardEmbed, AppEmbed, AuthFailureType, AuthStatus, AuthEvent, Page, AuthType, RuntimeFilter, RuntimeFilterOp, EmbedEvent, HostEvent, DataSourceVisualMode, Action, EmbedConfig, SearchViewConfig, SearchBarViewConfig, LiveboardViewConfig, AppViewConfig, PrefetchFeatures, };
|
|
20
|
+
import { AuthFailureType, AuthStatus, AuthEvent, AuthEventEmitter, getSessionInfo } from '@thoughtspot/visual-embed-sdk/auth';
|
|
21
|
+
import { AuthType, RuntimeFilter, RuntimeFilterOp, EmbedEvent, HostEvent, DataSourceVisualMode, Action, EmbedConfig, PrefetchFeatures, FrameParams, DOMSelector, MessageOptions, MessageCallback, MessagePayload, CustomisationsInterface, CustomStyles, customCssInterface } from '@thoughtspot/visual-embed-sdk/types';
|
|
22
|
+
export { init, logout, prefetch, getEmbedConfig as getInitConfig, getSessionInfo, SearchEmbed, SearchBarEmbed, PinboardEmbed, LiveboardEmbed, AppEmbed, AuthFailureType, AuthStatus, AuthEvent, AuthEventEmitter, Page, AuthType, RuntimeFilter, RuntimeFilterOp, EmbedEvent, HostEvent, DataSourceVisualMode, Action, EmbedConfig, SearchViewConfig, SearchBarViewConfig, LiveboardViewConfig, AppViewConfig, PrefetchFeatures, FrameParams, DOMSelector, MessageOptions, MessageCallback, MessagePayload, CustomisationsInterface, CustomStyles, customCssInterface, };
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
declare module '@thoughtspot/visual-embed-sdk/embed/app' {
|
|
@@ -70,7 +70,8 @@ declare module '@thoughtspot/visual-embed-sdk/embed/app' {
|
|
|
70
70
|
}
|
|
71
71
|
/**
|
|
72
72
|
* The view configuration for full app embedding.
|
|
73
|
-
*
|
|
73
|
+
*
|
|
74
|
+
* @group Embed components
|
|
74
75
|
*/
|
|
75
76
|
export interface AppViewConfig extends ViewConfig {
|
|
76
77
|
/**
|
|
@@ -95,8 +96,9 @@ declare module '@thoughtspot/visual-embed-sdk/embed/app' {
|
|
|
95
96
|
*/
|
|
96
97
|
pageId?: Page;
|
|
97
98
|
/**
|
|
98
|
-
* This puts a filter tag on the application. All metadata lists in the
|
|
99
|
-
* Liveboards and answers, would be filtered by this
|
|
99
|
+
* This puts a filter tag on the application. All metadata lists in the
|
|
100
|
+
* application, such as Liveboards and answers, would be filtered by this
|
|
101
|
+
* tag.
|
|
100
102
|
*/
|
|
101
103
|
tag?: string;
|
|
102
104
|
/**
|
|
@@ -106,35 +108,47 @@ declare module '@thoughtspot/visual-embed-sdk/embed/app' {
|
|
|
106
108
|
/**
|
|
107
109
|
* Render liveboards using the new v2 rendering mode
|
|
108
110
|
* This is a transient flag which is primarily meant for internal use
|
|
111
|
+
*
|
|
109
112
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
110
113
|
* @hidden
|
|
111
114
|
*/
|
|
112
115
|
liveboardV2?: boolean;
|
|
113
116
|
/**
|
|
114
117
|
* If set to true, the Search Assist feature is enabled.
|
|
118
|
+
*
|
|
115
119
|
* @version SDK: 1.13.0 | ThoughtSpot: 8.5.0.cl, 8.8.1-sw
|
|
116
120
|
*/
|
|
117
121
|
enableSearchAssist?: boolean;
|
|
118
122
|
}
|
|
119
123
|
/**
|
|
120
124
|
* Embeds full ThoughtSpot experience in a host application.
|
|
121
|
-
*
|
|
125
|
+
*
|
|
126
|
+
* @group Embed components
|
|
122
127
|
*/
|
|
123
128
|
export class AppEmbed extends V1Embed {
|
|
124
129
|
protected viewConfig: AppViewConfig;
|
|
125
130
|
constructor(domSelector: DOMSelector, viewConfig: AppViewConfig);
|
|
131
|
+
/**
|
|
132
|
+
* Constructs a map of parameters to be passed on to the
|
|
133
|
+
* embedded Liveboard or visualization.
|
|
134
|
+
*/
|
|
135
|
+
protected getEmbedParams(): string;
|
|
126
136
|
/**
|
|
127
137
|
* Navigate to particular page for app embed. eg:answers/pinboards/home
|
|
128
|
-
* This is used for embedding answers, pinboards, visualizations and full application
|
|
138
|
+
* This is used for embedding answers, pinboards, visualizations and full application
|
|
139
|
+
* only.
|
|
140
|
+
*
|
|
129
141
|
* @param path string | number The string, set to iframe src and navigate to new page
|
|
130
142
|
* eg: appEmbed.navigateToPage('pinboards')
|
|
131
|
-
* When used with `noReload` this can also be a number
|
|
143
|
+
* When used with `noReload` (default: true) this can also be a number
|
|
144
|
+
* like 1/-1 to go forward/back.
|
|
132
145
|
* @param noReload boolean Trigger the navigation without reloading the page
|
|
133
146
|
* @version SDK: 1.12.0 | ThoughtSpot: 8.4.0.cl, 8.4.1-sw
|
|
134
147
|
*/
|
|
135
148
|
navigateToPage(path: string | number, noReload?: boolean): void;
|
|
136
149
|
/**
|
|
137
150
|
* Renders the embedded application pages in the ThoughtSpot app.
|
|
151
|
+
*
|
|
138
152
|
* @param renderOptions An object containing the page ID
|
|
139
153
|
* to be embedded.
|
|
140
154
|
*/
|
|
@@ -143,18 +157,16 @@ declare module '@thoughtspot/visual-embed-sdk/embed/app' {
|
|
|
143
157
|
}
|
|
144
158
|
|
|
145
159
|
declare module '@thoughtspot/visual-embed-sdk/embed/base' {
|
|
160
|
+
import { EmbedConfig, PrefetchFeatures } from '@thoughtspot/visual-embed-sdk/types';
|
|
161
|
+
import { notifyAuthFailure, notifyAuthSDKSuccess, notifyAuthSuccess, notifyLogout, AuthEventEmitter } from '@thoughtspot/visual-embed-sdk/auth';
|
|
162
|
+
export let authPromise: Promise<boolean>;
|
|
146
163
|
/**
|
|
147
|
-
*
|
|
148
|
-
*
|
|
149
|
-
* Base classes
|
|
164
|
+
* Gets the configuration embed was initialized with.
|
|
150
165
|
*
|
|
151
|
-
* @
|
|
152
|
-
* @
|
|
166
|
+
* @returns {@link EmbedConfig} The configuration embed was initialized with.
|
|
167
|
+
* @version SDK: 1.19.0 | ThoughtSpot: *
|
|
168
|
+
* @group Global methods
|
|
153
169
|
*/
|
|
154
|
-
import EventEmitter from 'eventemitter3';
|
|
155
|
-
import { EmbedConfig, PrefetchFeatures } from '@thoughtspot/visual-embed-sdk/types';
|
|
156
|
-
import { notifyAuthFailure, notifyAuthSDKSuccess, notifyAuthSuccess, notifyLogout } from '@thoughtspot/visual-embed-sdk/auth';
|
|
157
|
-
export let authPromise: Promise<boolean>;
|
|
158
170
|
export const getEmbedConfig: () => EmbedConfig;
|
|
159
171
|
export const getAuthPromise: () => Promise<boolean>;
|
|
160
172
|
export { notifyAuthFailure, notifyAuthSDKSuccess, notifyAuthSuccess, notifyLogout, };
|
|
@@ -163,41 +175,63 @@ declare module '@thoughtspot/visual-embed-sdk/embed/base' {
|
|
|
163
175
|
*/
|
|
164
176
|
export const handleAuth: () => Promise<boolean>;
|
|
165
177
|
/**
|
|
166
|
-
* Prefetches static resources from the specified URL. Web browsers can then cache the
|
|
178
|
+
* Prefetches static resources from the specified URL. Web browsers can then cache the
|
|
179
|
+
* prefetched resources and serve them from the user's local disk to provide faster access
|
|
180
|
+
* to your app.
|
|
181
|
+
*
|
|
167
182
|
* @param url The URL provided for prefetch
|
|
168
183
|
* @param prefetchFeatures Specify features which needs to be prefetched.
|
|
169
184
|
* @version SDK: 1.4.0 | ThoughtSpot: ts7.sep.cl, 7.2.1
|
|
185
|
+
* @group Global methods
|
|
170
186
|
*/
|
|
171
187
|
export const prefetch: (url?: string, prefetchFeatures?: PrefetchFeatures[]) => void;
|
|
172
188
|
/**
|
|
173
189
|
* Initializes the Visual Embed SDK globally and perform
|
|
174
190
|
* authentication if applicable.
|
|
191
|
+
*
|
|
175
192
|
* @param embedConfig The configuration object containing ThoughtSpot host,
|
|
176
193
|
* authentication mechanism and so on.
|
|
177
|
-
* example
|
|
178
|
-
*
|
|
179
|
-
*
|
|
194
|
+
* @example
|
|
195
|
+
* ```js
|
|
196
|
+
* const authStatus = init({
|
|
197
|
+
* thoughtSpotHost: 'https://my.thoughtspot.cloud',
|
|
198
|
+
* authType: AuthType.None,
|
|
199
|
+
* });
|
|
200
|
+
* authStatus.on(AuthStatus.FAILURE, (reason) => { // do something here });
|
|
201
|
+
* ```
|
|
202
|
+
* @returns {@link AuthEventEmitter} event emitter which emits events on authentication success,
|
|
203
|
+
* failure and logout. See {@link AuthStatus}
|
|
180
204
|
* @version SDK: 1.0.0 | ThoughtSpot ts7.april.cl, 7.2.1
|
|
205
|
+
* @group Authentication / Init
|
|
206
|
+
*/
|
|
207
|
+
export const init: (embedConfig: EmbedConfig) => AuthEventEmitter;
|
|
208
|
+
/**
|
|
209
|
+
*
|
|
181
210
|
*/
|
|
182
|
-
export const init: (embedConfig: EmbedConfig) => EventEmitter;
|
|
183
211
|
export function disableAutoLogin(): void;
|
|
184
212
|
/**
|
|
185
|
-
* Logs out from ThoughtSpot. This also sets the autoLogin flag to false, to
|
|
186
|
-
* the SDK from automatically logging in again.
|
|
213
|
+
* Logs out from ThoughtSpot. This also sets the autoLogin flag to false, to
|
|
214
|
+
* prevent the SDK from automatically logging in again.
|
|
187
215
|
*
|
|
188
|
-
* You can call the `init` method again to re login, if autoLogin is set to
|
|
189
|
-
* second call it will be honored.
|
|
216
|
+
* You can call the `init` method again to re login, if autoLogin is set to
|
|
217
|
+
* true in this second call it will be honored.
|
|
190
218
|
*
|
|
191
219
|
* @param doNotDisableAutoLogin This flag when passed will not disable autoLogin
|
|
192
220
|
* @returns Promise which resolves when logout completes.
|
|
193
221
|
* @version SDK: 1.10.1 | ThoughtSpot: 8.2.0.cl, 8.4.1-sw
|
|
222
|
+
* @group Global methods
|
|
194
223
|
*/
|
|
195
224
|
export const logout: (doNotDisableAutoLogin?: boolean) => Promise<boolean>;
|
|
196
225
|
/**
|
|
197
|
-
* Renders functions in a queue, resolves to next function only after the callback next
|
|
226
|
+
* Renders functions in a queue, resolves to next function only after the callback next
|
|
227
|
+
* is called
|
|
228
|
+
*
|
|
198
229
|
* @param fn The function being registered
|
|
199
230
|
*/
|
|
200
231
|
export const renderInQueue: (fn: (next?: (val?: any) => void) => Promise<any>) => Promise<any>;
|
|
232
|
+
/**
|
|
233
|
+
*
|
|
234
|
+
*/
|
|
201
235
|
export function reset(): void;
|
|
202
236
|
}
|
|
203
237
|
|
|
@@ -216,12 +250,14 @@ declare module '@thoughtspot/visual-embed-sdk/embed/liveboard' {
|
|
|
216
250
|
import { V1Embed } from '@thoughtspot/visual-embed-sdk/embed/ts-embed';
|
|
217
251
|
/**
|
|
218
252
|
* The configuration for the embedded Liveboard or visualization page view.
|
|
219
|
-
*
|
|
253
|
+
*
|
|
254
|
+
* @group Embed components
|
|
220
255
|
*/
|
|
221
256
|
export interface LiveboardViewConfig extends ViewConfig {
|
|
222
257
|
/**
|
|
223
258
|
* If set to true, the embedded object container dynamically resizes
|
|
224
259
|
* according to the height of the Liveboard.
|
|
260
|
+
*
|
|
225
261
|
* @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 7.2.1
|
|
226
262
|
*/
|
|
227
263
|
fullHeight?: boolean;
|
|
@@ -229,6 +265,7 @@ declare module '@thoughtspot/visual-embed-sdk/embed/liveboard' {
|
|
|
229
265
|
* This is the minimum height(in pixels) for a full height Liveboard.
|
|
230
266
|
* Setting this height helps resolves issues with empty Liveboards and
|
|
231
267
|
* other screens navigable from a Liveboard.
|
|
268
|
+
*
|
|
232
269
|
* @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
|
|
233
270
|
* @default 500
|
|
234
271
|
*/
|
|
@@ -240,11 +277,13 @@ declare module '@thoughtspot/visual-embed-sdk/embed/liveboard' {
|
|
|
240
277
|
/**
|
|
241
278
|
* The Liveboard to display in the embedded view.
|
|
242
279
|
* Use either of liveboardId or pinboardId to reference the Liveboard to embed.
|
|
280
|
+
*
|
|
243
281
|
* @version SDK: 1.3.0 | ThoughtSpot ts7.aug.cl, 7.2.1
|
|
244
282
|
*/
|
|
245
283
|
liveboardId?: string;
|
|
246
284
|
/**
|
|
247
285
|
* To support backward compatibility
|
|
286
|
+
*
|
|
248
287
|
* @hidden
|
|
249
288
|
*/
|
|
250
289
|
pinboardId?: string;
|
|
@@ -255,6 +294,7 @@ declare module '@thoughtspot/visual-embed-sdk/embed/liveboard' {
|
|
|
255
294
|
/**
|
|
256
295
|
* If set to true, all filter chips from a
|
|
257
296
|
* Liveboard page will be read-only (no X buttons)
|
|
297
|
+
*
|
|
258
298
|
* @version SDK: 1.3.0 | ThoughtSpot ts7.aug.cl, 7.2.1
|
|
259
299
|
*/
|
|
260
300
|
preventLiveboardFilterRemoval?: boolean;
|
|
@@ -262,44 +302,57 @@ declare module '@thoughtspot/visual-embed-sdk/embed/liveboard' {
|
|
|
262
302
|
* Array of viz ids which should be visible when the liveboard
|
|
263
303
|
* first renders. This can be changed by triggering the "SetVisibleVizs"
|
|
264
304
|
* event.
|
|
305
|
+
*
|
|
265
306
|
* @version SDK: 1.9.1 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw
|
|
266
307
|
*/
|
|
267
308
|
visibleVizs?: string[];
|
|
268
309
|
/**
|
|
269
310
|
* To support backward compatibilty
|
|
311
|
+
*
|
|
270
312
|
* @hidden
|
|
271
313
|
*/
|
|
272
314
|
preventPinboardFilterRemoval?: boolean;
|
|
273
315
|
/**
|
|
274
316
|
* Render embedded Liveboards and visualizations in the new Liveboard experience mode
|
|
317
|
+
*
|
|
275
318
|
* @version SDK: 1.14.0 | ThoughtSpot: 8.6.0.cl, 8.8.1-sw
|
|
276
319
|
*/
|
|
277
320
|
liveboardV2?: boolean;
|
|
278
321
|
/**
|
|
279
322
|
* Tab Id of the Liveboard that is supposed to be active
|
|
323
|
+
*
|
|
280
324
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
281
325
|
*/
|
|
282
326
|
activeTabId?: string;
|
|
283
327
|
}
|
|
284
328
|
/**
|
|
285
329
|
* Embed a ThoughtSpot Liveboard or visualization
|
|
286
|
-
*
|
|
330
|
+
*
|
|
331
|
+
* @group Embed components
|
|
287
332
|
*/
|
|
288
333
|
export class LiveboardEmbed extends V1Embed {
|
|
289
334
|
protected viewConfig: LiveboardViewConfig;
|
|
290
335
|
constructor(domSelector: DOMSelector, viewConfig: LiveboardViewConfig);
|
|
336
|
+
/**
|
|
337
|
+
* Construct a map of params to be passed on to the
|
|
338
|
+
* embedded Liveboard or visualization.
|
|
339
|
+
*/
|
|
340
|
+
protected getEmbedParams(): string;
|
|
291
341
|
/**
|
|
292
342
|
* Triggers an event to the embedded app
|
|
343
|
+
*
|
|
293
344
|
* @param messageType The event type
|
|
294
345
|
* @param data The payload to send with the message
|
|
295
346
|
*/
|
|
296
347
|
trigger(messageType: HostEvent, data?: any): Promise<any>;
|
|
297
348
|
/**
|
|
298
349
|
* Render an embedded ThoughtSpot Liveboard or visualization
|
|
350
|
+
*
|
|
299
351
|
* @param renderOptions An object specifying the Liveboard ID,
|
|
300
352
|
* visualization ID and the runtime filters.
|
|
301
353
|
*/
|
|
302
354
|
render(): LiveboardEmbed;
|
|
355
|
+
navigateToLiveboard(liveboardId: string, vizId?: string, activeTabId?: string): void;
|
|
303
356
|
}
|
|
304
357
|
/**
|
|
305
358
|
* @hidden
|
|
@@ -330,14 +383,15 @@ declare module '@thoughtspot/visual-embed-sdk/embed/search' {
|
|
|
330
383
|
/**
|
|
331
384
|
* Boolean to determine if the search should be executed or not.
|
|
332
385
|
* if it is executed, put the focus on the results.
|
|
333
|
-
* if it’s not executed, put the focus in the search bar - at the end of
|
|
386
|
+
* if it’s not executed, put the focus in the search bar - at the end of
|
|
387
|
+
* the tokens
|
|
334
388
|
*/
|
|
335
389
|
executeSearch?: boolean;
|
|
336
390
|
}
|
|
337
391
|
/**
|
|
338
392
|
* The configuration attributes for the embedded search view.
|
|
339
393
|
*
|
|
340
|
-
* @
|
|
394
|
+
* @group Embed components
|
|
341
395
|
*/
|
|
342
396
|
export interface SearchViewConfig extends ViewConfig {
|
|
343
397
|
/**
|
|
@@ -357,6 +411,7 @@ declare module '@thoughtspot/visual-embed-sdk/embed/search' {
|
|
|
357
411
|
hideResults?: boolean;
|
|
358
412
|
/**
|
|
359
413
|
* If set to true, the Search Assist feature is enabled.
|
|
414
|
+
*
|
|
360
415
|
* @version SDK: 1.13.0 | ThoughtSpot: 8.5.0.cl, 8.8.1-sw
|
|
361
416
|
*/
|
|
362
417
|
enableSearchAssist?: boolean;
|
|
@@ -368,16 +423,19 @@ declare module '@thoughtspot/visual-embed-sdk/embed/search' {
|
|
|
368
423
|
/**
|
|
369
424
|
* The array of data source GUIDs to set on load.
|
|
370
425
|
* Only a single dataSource supported currently.
|
|
426
|
+
*
|
|
371
427
|
* @deprecated Use dataSource instead
|
|
372
428
|
*/
|
|
373
429
|
dataSources?: string[];
|
|
374
430
|
/**
|
|
375
431
|
* The array of data source GUIDs to set on load.
|
|
432
|
+
*
|
|
376
433
|
* @version: SDK: 1.19.0
|
|
377
434
|
*/
|
|
378
435
|
dataSource?: string;
|
|
379
436
|
/**
|
|
380
437
|
* The initial search query to load the answer with.
|
|
438
|
+
*
|
|
381
439
|
* @deprecated Use {@link searchOptions} instead
|
|
382
440
|
*/
|
|
383
441
|
searchQuery?: string;
|
|
@@ -392,6 +450,7 @@ declare module '@thoughtspot/visual-embed-sdk/embed/search' {
|
|
|
392
450
|
/**
|
|
393
451
|
* If set to true, search page will render without the Search Bar
|
|
394
452
|
* The chart/table should still be visible.
|
|
453
|
+
*
|
|
395
454
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
|
|
396
455
|
*/
|
|
397
456
|
hideSearchBar?: boolean;
|
|
@@ -400,7 +459,7 @@ declare module '@thoughtspot/visual-embed-sdk/embed/search' {
|
|
|
400
459
|
/**
|
|
401
460
|
* Embed ThoughtSpot search
|
|
402
461
|
*
|
|
403
|
-
* @
|
|
462
|
+
* @group Embed components
|
|
404
463
|
*/
|
|
405
464
|
export class SearchEmbed extends TsEmbed {
|
|
406
465
|
/**
|
|
@@ -408,6 +467,7 @@ declare module '@thoughtspot/visual-embed-sdk/embed/search' {
|
|
|
408
467
|
*/
|
|
409
468
|
protected viewConfig: SearchViewConfig;
|
|
410
469
|
constructor(domSelector: DOMSelector, viewConfig: SearchViewConfig);
|
|
470
|
+
protected getEmbedParams(): string;
|
|
411
471
|
/**
|
|
412
472
|
* Render the embedded ThoughtSpot search
|
|
413
473
|
*/
|
|
@@ -419,15 +479,20 @@ declare module '@thoughtspot/visual-embed-sdk/embed/search-bar' {
|
|
|
419
479
|
import { ViewConfig } from '@thoughtspot/visual-embed-sdk/types';
|
|
420
480
|
import { TsEmbed } from '@thoughtspot/visual-embed-sdk/embed/ts-embed';
|
|
421
481
|
import { SearchOptions } from '@thoughtspot/visual-embed-sdk/embed/search';
|
|
482
|
+
/**
|
|
483
|
+
* @group Embed components
|
|
484
|
+
*/
|
|
422
485
|
export interface SearchBarViewConfig extends Omit<ViewConfig, 'runtimeFilters' | 'showAlerts'> {
|
|
423
486
|
/**
|
|
424
487
|
* The array of data source GUIDs to set on load.
|
|
425
488
|
* Only a single dataSource supported currently.
|
|
489
|
+
*
|
|
426
490
|
* @deprecated Use dataSource instead
|
|
427
491
|
*/
|
|
428
492
|
dataSources?: string[];
|
|
429
493
|
/**
|
|
430
494
|
* The array of data source GUIDs to set on load.
|
|
495
|
+
*
|
|
431
496
|
* @version: SDK: 1.19.0
|
|
432
497
|
*/
|
|
433
498
|
dataSource?: string;
|
|
@@ -439,8 +504,8 @@ declare module '@thoughtspot/visual-embed-sdk/embed/search-bar' {
|
|
|
439
504
|
/**
|
|
440
505
|
* Embed ThoughtSpot search bar
|
|
441
506
|
*
|
|
442
|
-
* @Category Search Embed
|
|
443
507
|
* @version: SDK: 1.18.0 | ThoughtSpot: 8.10.0.cl, 9.0.1-sw
|
|
508
|
+
* @group Embed components
|
|
444
509
|
*/
|
|
445
510
|
export class SearchBarEmbed extends TsEmbed {
|
|
446
511
|
/**
|
|
@@ -470,12 +535,23 @@ declare module '@thoughtspot/visual-embed-sdk/auth' {
|
|
|
470
535
|
BASIC_LOGIN: string;
|
|
471
536
|
LOGOUT: string;
|
|
472
537
|
};
|
|
538
|
+
/**
|
|
539
|
+
* Enum for auth failure types. This is the parameter passed to the listner
|
|
540
|
+
* of {@link AuthStatus.FAILURE}.
|
|
541
|
+
*
|
|
542
|
+
* @group Authentication / Init
|
|
543
|
+
*/
|
|
473
544
|
export enum AuthFailureType {
|
|
474
545
|
SDK = "SDK",
|
|
475
546
|
NO_COOKIE_ACCESS = "NO_COOKIE_ACCESS",
|
|
476
547
|
EXPIRY = "EXPIRY",
|
|
477
548
|
OTHER = "OTHER"
|
|
478
549
|
}
|
|
550
|
+
/**
|
|
551
|
+
* Enum for auth status emitted by the emitter returned from {@link init}.
|
|
552
|
+
*
|
|
553
|
+
* @group Authentication / Init
|
|
554
|
+
*/
|
|
479
555
|
export enum AuthStatus {
|
|
480
556
|
/**
|
|
481
557
|
* Emits when the SDK fails to authenticate
|
|
@@ -497,40 +573,97 @@ declare module '@thoughtspot/visual-embed-sdk/auth' {
|
|
|
497
573
|
* Emitted when inPopup: true in the SAMLRedirect flow.
|
|
498
574
|
* And, we are waiting for popup to be triggered either programatically
|
|
499
575
|
* or by the trigger button.
|
|
576
|
+
*
|
|
500
577
|
* @version SDK: 1.19.0
|
|
501
578
|
*/
|
|
502
579
|
WAITING_FOR_POPUP = "WAITING_FOR_POPUP"
|
|
503
580
|
}
|
|
581
|
+
/**
|
|
582
|
+
* Event emitter returned from {@link init}.
|
|
583
|
+
*
|
|
584
|
+
* @group Authentication / Init
|
|
585
|
+
*/
|
|
586
|
+
export interface AuthEventEmitter {
|
|
587
|
+
/**
|
|
588
|
+
* Registed a listener on Auth failure.
|
|
589
|
+
*
|
|
590
|
+
* @param event
|
|
591
|
+
* @param listener
|
|
592
|
+
*/
|
|
593
|
+
on(event: AuthStatus.FAILURE, listener: (failureType: AuthFailureType) => void): this;
|
|
594
|
+
on(event: AuthStatus.SDK_SUCCESS | AuthStatus.LOGOUT | AuthStatus.WAITING_FOR_POPUP, listener: () => void): this;
|
|
595
|
+
on(event: AuthStatus.SUCCESS, listener: (sessionInfo: any) => void): this;
|
|
596
|
+
/**
|
|
597
|
+
* Trigger an event on the emitter returned from init.
|
|
598
|
+
*
|
|
599
|
+
* @param {@link AuthEvent}
|
|
600
|
+
*/
|
|
601
|
+
emit(event: AuthEvent): void;
|
|
602
|
+
}
|
|
603
|
+
/**
|
|
604
|
+
* Events which can be triggered on the emitter returned from {@link init}.
|
|
605
|
+
*
|
|
606
|
+
* @group Authentication / Init
|
|
607
|
+
*/
|
|
504
608
|
export enum AuthEvent {
|
|
505
609
|
/**
|
|
506
|
-
* Manually trigger the SSO popup.
|
|
610
|
+
* Manually trigger the SSO popup. This is useful with
|
|
611
|
+
* authStatus: SAMLRedirect/OIDCRedicre and inPopup: true
|
|
507
612
|
*/
|
|
508
613
|
TRIGGER_SSO_POPUP = "TRIGGER_SSO_POPUP"
|
|
509
614
|
}
|
|
510
|
-
|
|
511
|
-
|
|
615
|
+
/**
|
|
616
|
+
*
|
|
617
|
+
*/
|
|
618
|
+
export function getAuthEE(): EventEmitter<AuthStatus | AuthEvent>;
|
|
619
|
+
/**
|
|
620
|
+
*
|
|
621
|
+
* @param eventEmitter
|
|
622
|
+
*/
|
|
623
|
+
export function setAuthEE(eventEmitter: EventEmitter<AuthStatus | AuthEvent>): void;
|
|
624
|
+
/**
|
|
625
|
+
*
|
|
626
|
+
*/
|
|
512
627
|
export function notifyAuthSDKSuccess(): void;
|
|
628
|
+
/**
|
|
629
|
+
*
|
|
630
|
+
*/
|
|
513
631
|
export function notifyAuthSuccess(): void;
|
|
632
|
+
/**
|
|
633
|
+
*
|
|
634
|
+
* @param failureType
|
|
635
|
+
*/
|
|
514
636
|
export function notifyAuthFailure(failureType: AuthFailureType): void;
|
|
637
|
+
/**
|
|
638
|
+
*
|
|
639
|
+
*/
|
|
515
640
|
export function notifyLogout(): void;
|
|
516
641
|
/**
|
|
517
642
|
* Return releaseVersion if available
|
|
518
643
|
*/
|
|
519
644
|
export function getReleaseVersion(): string;
|
|
520
645
|
/**
|
|
521
|
-
* Return a promise that resolves with the session
|
|
522
|
-
* successful. And info is available.
|
|
646
|
+
* Return a promise that resolves with the session information when
|
|
647
|
+
* authentication is successful. And info is available.
|
|
648
|
+
*
|
|
649
|
+
* @group Global methods
|
|
523
650
|
*/
|
|
524
651
|
export function getSessionInfo(): Promise<any>;
|
|
652
|
+
/**
|
|
653
|
+
*
|
|
654
|
+
* @param sessionDetails
|
|
655
|
+
*/
|
|
525
656
|
export function initSession(sessionDetails: any): void;
|
|
526
657
|
export const getAuthenticaionToken: (embedConfig: EmbedConfig) => Promise<any>;
|
|
527
658
|
/**
|
|
528
659
|
* Perform token based authentication
|
|
660
|
+
*
|
|
529
661
|
* @param embedConfig The embed configuration
|
|
530
662
|
*/
|
|
531
663
|
export const doTokenAuth: (embedConfig: EmbedConfig) => Promise<boolean>;
|
|
532
664
|
/**
|
|
533
665
|
* Validate embedConfig parameters required for cookielessTokenAuth
|
|
666
|
+
*
|
|
534
667
|
* @param embedConfig The embed configuration
|
|
535
668
|
*/
|
|
536
669
|
export const doCookielessTokenAuth: (embedConfig: EmbedConfig) => Promise<boolean>;
|
|
@@ -540,6 +673,7 @@ declare module '@thoughtspot/visual-embed-sdk/auth' {
|
|
|
540
673
|
*
|
|
541
674
|
* Warning: This feature is primarily intended for developer testing. It is
|
|
542
675
|
* strongly advised not to use this authentication method in production.
|
|
676
|
+
*
|
|
543
677
|
* @param embedConfig The embed configuration
|
|
544
678
|
*/
|
|
545
679
|
export const doBasicAuth: (embedConfig: EmbedConfig) => Promise<boolean>;
|
|
@@ -548,6 +682,7 @@ declare module '@thoughtspot/visual-embed-sdk/auth' {
|
|
|
548
682
|
export const logout: (embedConfig: EmbedConfig) => Promise<boolean>;
|
|
549
683
|
/**
|
|
550
684
|
* Perform authentication on the ThoughtSpot cluster
|
|
685
|
+
*
|
|
551
686
|
* @param embedConfig The embed configuration
|
|
552
687
|
*/
|
|
553
688
|
export const authenticate: (embedConfig: EmbedConfig) => Promise<boolean>;
|
|
@@ -561,26 +696,33 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
561
696
|
/**
|
|
562
697
|
* The authentication mechanism for allowing access to the
|
|
563
698
|
* the embedded app
|
|
699
|
+
*
|
|
700
|
+
* @group Authentication / Init
|
|
564
701
|
*/
|
|
565
702
|
export enum AuthType {
|
|
566
703
|
/**
|
|
567
|
-
* No authentication on the SDK. Passthrough to the embedded App. Alias for
|
|
704
|
+
* No authentication on the SDK. Passthrough to the embedded App. Alias for
|
|
705
|
+
* `Passthrough`.
|
|
568
706
|
*/
|
|
569
707
|
None = "None",
|
|
570
708
|
/**
|
|
571
|
-
* Passthrough SSO to the embedded App within the iframe. Requires least
|
|
572
|
-
* be supported by all IDPs. This will behave like `None`
|
|
709
|
+
* Passthrough SSO to the embedded App within the iframe. Requires least
|
|
710
|
+
* configuration, but may not be supported by all IDPs. This will behave like `None`
|
|
711
|
+
* if SSO is not configured on ThoughtSpot.
|
|
712
|
+
*
|
|
573
713
|
* @version: SDK: 1.15.0 | ThouhgtSpot: 8.8.0.cl
|
|
574
714
|
*/
|
|
575
715
|
EmbeddedSSO = "EmbeddedSSO",
|
|
576
716
|
/**
|
|
577
717
|
* SSO using SAML
|
|
718
|
+
*
|
|
578
719
|
* @deprecated Use {@link SAMLRedirect} instead
|
|
579
720
|
* @hidden
|
|
580
721
|
*/
|
|
581
722
|
SSO = "SSO_SAML",
|
|
582
723
|
/**
|
|
583
724
|
* SSO using SAML
|
|
725
|
+
*
|
|
584
726
|
* @deprecated Use {@link SAMLRedirect} instead
|
|
585
727
|
* @hidden
|
|
586
728
|
*/
|
|
@@ -588,10 +730,21 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
588
730
|
/**
|
|
589
731
|
* SSO using SAML
|
|
590
732
|
* Will make the host application redirect to the SAML Idp.
|
|
733
|
+
*
|
|
734
|
+
* @example
|
|
735
|
+
* ```js
|
|
736
|
+
* init({
|
|
737
|
+
* // ...
|
|
738
|
+
* authType: AuthType.SAMLRedirect,
|
|
739
|
+
* authTriggerText: 'Login with SAML',
|
|
740
|
+
* authTriggerContainer: '#embed-container',
|
|
741
|
+
* });
|
|
742
|
+
* ```
|
|
591
743
|
*/
|
|
592
744
|
SAMLRedirect = "SSO_SAML",
|
|
593
745
|
/**
|
|
594
746
|
* SSO using OIDC
|
|
747
|
+
*
|
|
595
748
|
* @hidden
|
|
596
749
|
* @deprecated Use {@link OIDCRedirect} instead
|
|
597
750
|
*/
|
|
@@ -603,21 +756,35 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
603
756
|
OIDCRedirect = "SSO_OIDC",
|
|
604
757
|
/**
|
|
605
758
|
* Trusted authentication server
|
|
759
|
+
*
|
|
606
760
|
* @hidden
|
|
607
761
|
* @deprecated Use {@link TrustedAuth} instead
|
|
608
762
|
*/
|
|
609
763
|
AuthServer = "AuthServer",
|
|
610
764
|
/**
|
|
611
765
|
* Trusted authentication server, Use your own authentication server
|
|
612
|
-
* which returns a bearer token, generated using the secret_key obtained
|
|
613
|
-
* ThoughtSpot.
|
|
766
|
+
* which returns a bearer token, generated using the secret_key obtained
|
|
767
|
+
* from ThoughtSpot.
|
|
768
|
+
*
|
|
769
|
+
* @example
|
|
770
|
+
* ```js
|
|
771
|
+
* init({
|
|
772
|
+
* // ...
|
|
773
|
+
* authType: AuthType.TrustedAuthToken,
|
|
774
|
+
* getAuthToken: () => {
|
|
775
|
+
* return fetch('https://my-backend.app/ts-token')
|
|
776
|
+
* .then((response) => response.json())
|
|
777
|
+
* .then((data) => data.token);
|
|
778
|
+
* }
|
|
779
|
+
* ```
|
|
614
780
|
*/
|
|
615
781
|
TrustedAuthToken = "AuthServer",
|
|
616
782
|
/**
|
|
617
|
-
* Trusted authentication server Cookieless, Use you own authentication
|
|
618
|
-
* which returns a bearer token, generated using the secret_key
|
|
619
|
-
* ThoughtSpot. This uses a cookieless authentication
|
|
620
|
-
* to by pass third-party cookie-blocking restriction
|
|
783
|
+
* Trusted authentication server Cookieless, Use you own authentication
|
|
784
|
+
* server which returns a bearer token, generated using the secret_key
|
|
785
|
+
* obtained from ThoughtSpot. This uses a cookieless authentication
|
|
786
|
+
* approach, recommended to by pass third-party cookie-blocking restriction
|
|
787
|
+
* implemented by some browsers
|
|
621
788
|
*/
|
|
622
789
|
TrustedAuthTokenCookieless = "AuthServerCookieless",
|
|
623
790
|
/**
|
|
@@ -629,7 +796,10 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
629
796
|
Basic = "Basic"
|
|
630
797
|
}
|
|
631
798
|
export type DOMSelector = string | HTMLElement;
|
|
632
|
-
|
|
799
|
+
/**
|
|
800
|
+
* inline customCSS within the {@link CustomisationsInterface}.
|
|
801
|
+
*/
|
|
802
|
+
export interface customCssInterface {
|
|
633
803
|
variables?: {
|
|
634
804
|
[variableName: string]: string;
|
|
635
805
|
};
|
|
@@ -639,10 +809,38 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
639
809
|
};
|
|
640
810
|
};
|
|
641
811
|
}
|
|
642
|
-
|
|
812
|
+
/**
|
|
813
|
+
* Styles within the {@link CustomisationsInterface}.
|
|
814
|
+
*/
|
|
815
|
+
export interface CustomStyles {
|
|
643
816
|
customCSSUrl?: string;
|
|
644
817
|
customCSS?: customCssInterface;
|
|
645
818
|
}
|
|
819
|
+
/**
|
|
820
|
+
* Configuration to define the customization on the Embedded
|
|
821
|
+
* Thoughtspot components.
|
|
822
|
+
*
|
|
823
|
+
* @example
|
|
824
|
+
* ```js
|
|
825
|
+
* init({
|
|
826
|
+
* // ...
|
|
827
|
+
* customizations: {
|
|
828
|
+
* style: {
|
|
829
|
+
* customCSS: {
|
|
830
|
+
* variables: {},
|
|
831
|
+
* rules_UNSTABLE: {}
|
|
832
|
+
* }
|
|
833
|
+
* },
|
|
834
|
+
* content: {
|
|
835
|
+
* strings: {
|
|
836
|
+
* 'LIVEBOARDS': 'Dashboards'
|
|
837
|
+
* }
|
|
838
|
+
* },
|
|
839
|
+
* iconSpriteUrl: 'https://my-custom-icon-sprite.svg'
|
|
840
|
+
* }
|
|
841
|
+
* })
|
|
842
|
+
* ```
|
|
843
|
+
*/
|
|
646
844
|
export interface CustomisationsInterface {
|
|
647
845
|
style?: CustomStyles;
|
|
648
846
|
content?: {
|
|
@@ -656,6 +854,8 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
656
854
|
* It includes the ThoughtSpot hostname or IP address,
|
|
657
855
|
* the type of authentication, and the authentication endpoint
|
|
658
856
|
* if a trusted authentication server is used.
|
|
857
|
+
*
|
|
858
|
+
* @group Authentication / Init
|
|
659
859
|
*/
|
|
660
860
|
export interface EmbedConfig {
|
|
661
861
|
/**
|
|
@@ -687,8 +887,8 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
687
887
|
*/
|
|
688
888
|
getAuthToken?: () => Promise<string>;
|
|
689
889
|
/**
|
|
690
|
-
* [AuthServer / Basic] The user name of the ThoughtSpot user. This
|
|
691
|
-
* required for trusted authentication.
|
|
890
|
+
* [AuthServer / Basic] The user name of the ThoughtSpot user. This
|
|
891
|
+
* attribute is required for trusted authentication.
|
|
692
892
|
*/
|
|
693
893
|
username?: string;
|
|
694
894
|
/**
|
|
@@ -699,16 +899,17 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
699
899
|
*/
|
|
700
900
|
password?: string;
|
|
701
901
|
/**
|
|
702
|
-
* [SSO] For SSO Authentication, if `noRedirect` is set to true, it will
|
|
703
|
-
* flow in a popup, instead of redirecting browser in
|
|
902
|
+
* [SSO] For SSO Authentication, if `noRedirect` is set to true, it will
|
|
903
|
+
* open the SAML auth flow in a popup, instead of redirecting browser in
|
|
904
|
+
* place.
|
|
704
905
|
*
|
|
705
906
|
* @default false
|
|
706
907
|
* @deprecated
|
|
707
908
|
*/
|
|
708
909
|
noRedirect?: boolean;
|
|
709
910
|
/**
|
|
710
|
-
* [SSO] For SSO Authentication, if `inPopup` is set to true, it will open
|
|
711
|
-
* flow in a popup, instead of redirecting browser in place.
|
|
911
|
+
* [SSO] For SSO Authentication, if `inPopup` is set to true, it will open
|
|
912
|
+
* the SAML auth flow in a popup, instead of redirecting browser in place.
|
|
712
913
|
*
|
|
713
914
|
* @default false
|
|
714
915
|
* @version SDK: 1.18.0
|
|
@@ -720,6 +921,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
720
921
|
* terminated.
|
|
721
922
|
*
|
|
722
923
|
* Eg: "/dashboard", "#/foo" [Do not include the host]
|
|
924
|
+
*
|
|
723
925
|
* @version SDK: 1.10.2 | 8.2.0.cl, 8.4.1-sw
|
|
724
926
|
*/
|
|
725
927
|
redirectPath?: string;
|
|
@@ -729,43 +931,52 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
729
931
|
* Should we encode URL Query Params using base64 encoding which thoughtspot
|
|
730
932
|
* will generate for embedding. This provides additional security to
|
|
731
933
|
* thoughtspot clusters against Cross site scripting attacks.
|
|
934
|
+
*
|
|
732
935
|
* @default false
|
|
733
936
|
*/
|
|
734
937
|
shouldEncodeUrlQueryParams?: boolean;
|
|
735
938
|
/**
|
|
736
|
-
* Suppress cookie access alert when third party cookies are blocked by the
|
|
737
|
-
* Third party cookie blocking is the default behaviour on
|
|
738
|
-
* If you set this to `true`, you are
|
|
939
|
+
* Suppress cookie access alert when third party cookies are blocked by the
|
|
940
|
+
* user's browser. Third party cookie blocking is the default behaviour on
|
|
941
|
+
* Safari and opt-in for Firefox/Chrome. If you set this to `true`, you are
|
|
942
|
+
* encouraged to handle `noCookieAccess` event, to show your own treatment
|
|
739
943
|
* in this case.
|
|
944
|
+
*
|
|
740
945
|
* @default false
|
|
741
946
|
*/
|
|
742
947
|
suppressNoCookieAccessAlert?: boolean;
|
|
743
948
|
/**
|
|
744
949
|
* Re-login when session expires with the previous login options
|
|
950
|
+
*
|
|
745
951
|
* @default false
|
|
746
952
|
*/
|
|
747
953
|
autoLogin?: boolean;
|
|
748
954
|
/**
|
|
749
955
|
* Disable redirection to the login page when the embedded session expires
|
|
750
|
-
* This flag is typically used alongside the combination of auth modes such as {@link
|
|
956
|
+
* This flag is typically used alongside the combination of auth modes such as {@link
|
|
957
|
+
* AuthType.AuthServer} and auto login behavior {@link EmbedConfig.autoLogin}
|
|
958
|
+
*
|
|
751
959
|
* @version SDK: 1.9.3 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw
|
|
752
960
|
* @default false
|
|
753
961
|
*/
|
|
754
962
|
disableLoginRedirect?: boolean;
|
|
755
963
|
/**
|
|
756
964
|
* This message is displayed on the embed view when the login fails.
|
|
965
|
+
*
|
|
757
966
|
* @version SDK: 1.10.1 | ThoughtSpot: 8.2.0.cl, 8.4.1-sw
|
|
758
967
|
*/
|
|
759
968
|
loginFailedMessage?: string;
|
|
760
969
|
/**
|
|
761
970
|
* Calls the prefetch method internally when set to true
|
|
971
|
+
*
|
|
762
972
|
* @default false
|
|
763
973
|
*/
|
|
764
974
|
callPrefetch?: boolean;
|
|
765
975
|
/**
|
|
766
976
|
* When there are multiple embeds, queue the render of embed to start
|
|
767
|
-
* after the previous embed's render is complete. This helps in the load
|
|
768
|
-
* by decreasing the load on the browser.
|
|
977
|
+
* after the previous embed's render is complete. This helps in the load
|
|
978
|
+
* performance by decreasing the load on the browser.
|
|
979
|
+
*
|
|
769
980
|
* @Version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
|
|
770
981
|
* @default false
|
|
771
982
|
*/
|
|
@@ -773,15 +984,19 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
773
984
|
/**
|
|
774
985
|
* Dynamic CSS Url to be injected in the loaded application.
|
|
775
986
|
* You would also need to set `style-src` in the CSP settings.
|
|
987
|
+
*
|
|
776
988
|
* @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1-sw
|
|
777
989
|
* @default ''
|
|
778
990
|
*/
|
|
779
991
|
customCssUrl?: string;
|
|
780
992
|
/**
|
|
781
|
-
* [AuthServer|Basic] Detect if 3rd party cookies are enabled by doing an
|
|
782
|
-
* and should be avoided. Listen to the
|
|
993
|
+
* [AuthServer|Basic] Detect if 3rd party cookies are enabled by doing an
|
|
994
|
+
* additional call. This is slower and should be avoided. Listen to the
|
|
995
|
+
* NO_COOKIE_ACCESS event to handle the situation.
|
|
996
|
+
*
|
|
997
|
+
* This is slightly slower than letting the browser handle the cookie check, as it
|
|
998
|
+
* involves an extra network call.
|
|
783
999
|
*
|
|
784
|
-
* This is slightly slower than letting the browser handle the cookie check, as it involves an extra network call.
|
|
785
1000
|
* @version SDK: 1.10.4 | ThoughtSpot: 8.2.0.cl, 8.4.1-sw
|
|
786
1001
|
*/
|
|
787
1002
|
detectCookieAccessSlow?: boolean;
|
|
@@ -808,6 +1023,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
808
1023
|
/**
|
|
809
1024
|
* Text to show in the button which triggers the popup auth flow.
|
|
810
1025
|
* Default: "Authorize".
|
|
1026
|
+
*
|
|
811
1027
|
* @version SDK: 1.17.0 | ThoughtSpot: *
|
|
812
1028
|
*/
|
|
813
1029
|
authTriggerText?: string;
|
|
@@ -816,6 +1032,8 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
816
1032
|
}
|
|
817
1033
|
/**
|
|
818
1034
|
* Embedded iFrame configuration
|
|
1035
|
+
*
|
|
1036
|
+
* @group Embed components
|
|
819
1037
|
*/
|
|
820
1038
|
export interface FrameParams {
|
|
821
1039
|
/**
|
|
@@ -826,6 +1044,12 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
826
1044
|
* The height of the iFrame (unit is pixels if numeric).
|
|
827
1045
|
*/
|
|
828
1046
|
height?: number | string;
|
|
1047
|
+
/**
|
|
1048
|
+
* Set to 'lazy' to enable lazy loading of the embedded TS frame.
|
|
1049
|
+
* This will defer loading of the frame until it comes into the
|
|
1050
|
+
* viewport. This is useful for performance optimization.
|
|
1051
|
+
*/
|
|
1052
|
+
loading?: 'lazy' | 'eager' | 'auto';
|
|
829
1053
|
/**
|
|
830
1054
|
* This parameters will be passed on the iframe
|
|
831
1055
|
* as is.
|
|
@@ -841,7 +1065,8 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
841
1065
|
*/
|
|
842
1066
|
layoutConfig?: LayoutConfig;
|
|
843
1067
|
/**
|
|
844
|
-
* The <b>width</b> and <b>height</b> dimensions to render an embedded
|
|
1068
|
+
* The <b>width</b> and <b>height</b> dimensions to render an embedded
|
|
1069
|
+
* object inside your app. Specify the values in pixels or percentage.
|
|
845
1070
|
*/
|
|
846
1071
|
frameParams?: FrameParams;
|
|
847
1072
|
/**
|
|
@@ -869,11 +1094,13 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
869
1094
|
/**
|
|
870
1095
|
* The list of actions to display from the primary menu, more menu
|
|
871
1096
|
* (...), and the contextual menu.
|
|
1097
|
+
*
|
|
872
1098
|
* @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1-sw
|
|
873
1099
|
*/
|
|
874
1100
|
visibleActions?: Action[];
|
|
875
1101
|
/**
|
|
876
1102
|
* Show alert messages and toast messages in the embedded view.
|
|
1103
|
+
*
|
|
877
1104
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
878
1105
|
*/
|
|
879
1106
|
showAlerts?: boolean;
|
|
@@ -884,6 +1111,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
884
1111
|
runtimeFilters?: RuntimeFilter[];
|
|
885
1112
|
/**
|
|
886
1113
|
* The locale/language to use for the embedded view.
|
|
1114
|
+
*
|
|
887
1115
|
* @version SDK: 1.9.4 | ThoughtSpot 8.1.0.cl, 8.4.1-sw
|
|
888
1116
|
*/
|
|
889
1117
|
locale?: string;
|
|
@@ -894,6 +1122,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
894
1122
|
* Warning: This option is for advanced use only and is used internally
|
|
895
1123
|
* to control embed behavior in non-regular ways. We do not publish the
|
|
896
1124
|
* list of supported keys and values associated with each.
|
|
1125
|
+
*
|
|
897
1126
|
* @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw
|
|
898
1127
|
*/
|
|
899
1128
|
additionalFlags?: {
|
|
@@ -902,33 +1131,47 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
902
1131
|
/**
|
|
903
1132
|
* Dynamic CSSUrl and customCSS to be injected in the loaded application.
|
|
904
1133
|
* You would also need to set `style-src` in the CSP settings.
|
|
1134
|
+
*
|
|
905
1135
|
* @version SDK: 1.17.2 | ThoughtSpot: 8.4.1-sw, 8.4.0.cl
|
|
906
1136
|
* @default ''
|
|
907
1137
|
*/
|
|
908
1138
|
customizations?: CustomisationsInterface;
|
|
909
1139
|
/**
|
|
910
|
-
* Insert as a sibling of the target container, instead of appending to a
|
|
1140
|
+
* Insert as a sibling of the target container, instead of appending to a
|
|
1141
|
+
* child inside it.
|
|
911
1142
|
*/
|
|
912
1143
|
insertAsSibling?: boolean;
|
|
913
1144
|
/**
|
|
914
1145
|
* flag to set ContextMenu Trigger to either left or right click.
|
|
1146
|
+
*
|
|
915
1147
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
|
|
916
1148
|
*/
|
|
917
1149
|
contextMenuTrigger?: ContextMenuTriggerOptions;
|
|
918
1150
|
/**
|
|
919
1151
|
* flag to override openNew tab context menu link
|
|
1152
|
+
*
|
|
920
1153
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
|
|
921
1154
|
*/
|
|
922
1155
|
linkOverride?: boolean;
|
|
923
1156
|
/**
|
|
924
1157
|
* flag to enable insert into slides action
|
|
1158
|
+
*
|
|
925
1159
|
* @hidden
|
|
926
1160
|
* @private
|
|
927
1161
|
*/
|
|
928
1162
|
insertInToSlide?: boolean;
|
|
1163
|
+
/**
|
|
1164
|
+
* Use a pre-rendered iframe from a pool of pre-rendered iframes
|
|
1165
|
+
* if available and matches the configuration.
|
|
1166
|
+
*
|
|
1167
|
+
* See [docs]() on how to create a prerender pool.
|
|
1168
|
+
*/
|
|
1169
|
+
usePrerenderedIfAvailable?: boolean;
|
|
929
1170
|
}
|
|
930
1171
|
/**
|
|
931
1172
|
* MessagePayload: Embed event payload: message type, data and status (start/end)
|
|
1173
|
+
*
|
|
1174
|
+
* @group Events
|
|
932
1175
|
*/
|
|
933
1176
|
export type MessagePayload = {
|
|
934
1177
|
type: string;
|
|
@@ -936,19 +1179,37 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
936
1179
|
status?: string;
|
|
937
1180
|
};
|
|
938
1181
|
/**
|
|
939
|
-
* MessageOptions: By Providing options, getting specific event start / end based on
|
|
1182
|
+
* MessageOptions: By Providing options, getting specific event start / end based on
|
|
1183
|
+
* option
|
|
1184
|
+
*
|
|
1185
|
+
* @group Events
|
|
940
1186
|
*/
|
|
941
1187
|
export type MessageOptions = {
|
|
1188
|
+
/**
|
|
1189
|
+
* A boolean value indicating that start status events of this type
|
|
1190
|
+
* will be dispatched
|
|
1191
|
+
*/
|
|
942
1192
|
start?: boolean;
|
|
943
1193
|
};
|
|
944
1194
|
/**
|
|
945
1195
|
* MessageCallback: Embed event message callback
|
|
1196
|
+
*
|
|
1197
|
+
* @group Events
|
|
1198
|
+
*/
|
|
1199
|
+
export type MessageCallback = (payload: MessagePayload,
|
|
1200
|
+
/**
|
|
1201
|
+
* responder: Message callback function triggered when embed event
|
|
1202
|
+
* initiated
|
|
946
1203
|
*/
|
|
947
|
-
|
|
1204
|
+
responder?: (data: any) => void) => void;
|
|
948
1205
|
/**
|
|
949
1206
|
* MessageCallbackObj: contains message options & callback function
|
|
950
1207
|
*/
|
|
951
1208
|
export type MessageCallbackObj = {
|
|
1209
|
+
/**
|
|
1210
|
+
* options: It contains start, A boolean value indicating that start
|
|
1211
|
+
* status events of this type will be dispatched
|
|
1212
|
+
*/
|
|
952
1213
|
options: MessageOptions;
|
|
953
1214
|
callback: MessageCallback;
|
|
954
1215
|
};
|
|
@@ -1032,36 +1293,47 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
1032
1293
|
operator: RuntimeFilterOp;
|
|
1033
1294
|
/**
|
|
1034
1295
|
* The list of operands. Some operators like EQ, LE accept
|
|
1035
|
-
* a single operand, whereas other operators like BW and IN accept multiple
|
|
1296
|
+
* a single operand, whereas other operators like BW and IN accept multiple
|
|
1297
|
+
* operands.
|
|
1036
1298
|
*/
|
|
1037
1299
|
values: (number | boolean | string)[];
|
|
1038
1300
|
}
|
|
1039
1301
|
/**
|
|
1040
1302
|
* Event types emitted by the embedded ThoughtSpot application.
|
|
1303
|
+
*
|
|
1304
|
+
* To add an event listener use the corresponding
|
|
1305
|
+
* {@link LiveboardEmbed.on} or {@link AppEmbed.on} or {@link SearchEmbed.on} method.
|
|
1306
|
+
*
|
|
1307
|
+
* @group Events
|
|
1041
1308
|
*/
|
|
1042
1309
|
export enum EmbedEvent {
|
|
1043
1310
|
/**
|
|
1044
1311
|
* Rendering has initialized.
|
|
1045
|
-
*
|
|
1312
|
+
*
|
|
1313
|
+
* @returns timestamp - The timestamp when the event was generated.
|
|
1046
1314
|
*/
|
|
1047
1315
|
Init = "init",
|
|
1048
1316
|
/**
|
|
1049
1317
|
* Authentication has either succeeded or failed.
|
|
1050
|
-
*
|
|
1318
|
+
*
|
|
1319
|
+
* @returns isLoggedIn - A Boolean specifying whether authentication was successful.
|
|
1051
1320
|
*/
|
|
1052
1321
|
AuthInit = "authInit",
|
|
1053
1322
|
/**
|
|
1054
1323
|
* The embed object container has loaded.
|
|
1055
|
-
*
|
|
1324
|
+
*
|
|
1325
|
+
* @returns timestamp - The timestamp when the event was generated.
|
|
1056
1326
|
*/
|
|
1057
1327
|
Load = "load",
|
|
1058
1328
|
/**
|
|
1059
1329
|
* Data pertaining to answer or Liveboard is received
|
|
1060
|
-
*
|
|
1330
|
+
*
|
|
1331
|
+
* @returns data - The answer or Liveboard data
|
|
1061
1332
|
*/
|
|
1062
1333
|
Data = "data",
|
|
1063
1334
|
/**
|
|
1064
1335
|
* Search/answer/Liveboard filters have been applied/updated
|
|
1336
|
+
*
|
|
1065
1337
|
* @hidden
|
|
1066
1338
|
*/
|
|
1067
1339
|
FiltersChanged = "filtersChanged",
|
|
@@ -1071,48 +1343,56 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
1071
1343
|
QueryChanged = "queryChanged",
|
|
1072
1344
|
/**
|
|
1073
1345
|
* A drill down operation has been performed.
|
|
1074
|
-
*
|
|
1075
|
-
* @
|
|
1076
|
-
* @
|
|
1346
|
+
*
|
|
1347
|
+
* @returns additionalFilters - Any additional filters applied
|
|
1348
|
+
* @returns drillDownColumns - The columns on which drill down was performed
|
|
1349
|
+
* @returns nonFilteredColumns - The columns that were not filtered
|
|
1077
1350
|
*/
|
|
1078
1351
|
Drilldown = "drillDown",
|
|
1079
1352
|
/**
|
|
1080
1353
|
* One or more data sources have been selected.
|
|
1081
|
-
*
|
|
1354
|
+
*
|
|
1355
|
+
* @returns dataSourceIds - the list of data sources
|
|
1082
1356
|
*/
|
|
1083
1357
|
DataSourceSelected = "dataSourceSelected",
|
|
1084
1358
|
/**
|
|
1085
1359
|
* One or more data columns have been selected.
|
|
1086
|
-
*
|
|
1360
|
+
*
|
|
1361
|
+
* @returns columnIds - the list of columns
|
|
1087
1362
|
* @version SDK: 1.10.0 | ThoughtSpot: 8.2.0.cl, 8.4.1-sw
|
|
1088
1363
|
*/
|
|
1089
1364
|
AddRemoveColumns = "addRemoveColumns",
|
|
1090
1365
|
/**
|
|
1091
1366
|
* A custom action has been triggered
|
|
1092
|
-
*
|
|
1093
|
-
* @
|
|
1367
|
+
*
|
|
1368
|
+
* @returns actionId - The id of the custom action
|
|
1369
|
+
* @returns data - The answer or Liveboard data
|
|
1094
1370
|
*/
|
|
1095
1371
|
CustomAction = "customAction",
|
|
1096
1372
|
/**
|
|
1097
1373
|
* A double click has been triggered on table/chart
|
|
1098
|
-
*
|
|
1374
|
+
*
|
|
1375
|
+
* @returns ContextMenuInputPoints - data point that is double clicked
|
|
1099
1376
|
* @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
|
|
1100
1377
|
*/
|
|
1101
1378
|
VizPointDoubleClick = "vizPointDoubleClick",
|
|
1102
1379
|
/**
|
|
1103
1380
|
* A click has been triggered on table/chart
|
|
1104
|
-
*
|
|
1381
|
+
*
|
|
1382
|
+
* @returns ContextMenuInputPoints - data point that is clicked
|
|
1105
1383
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
1106
1384
|
*/
|
|
1107
1385
|
VizPointClick = "vizPointClick",
|
|
1108
1386
|
/**
|
|
1109
1387
|
* An error has occurred.
|
|
1110
|
-
*
|
|
1388
|
+
*
|
|
1389
|
+
* @returns error - An error object or message
|
|
1111
1390
|
*/
|
|
1112
1391
|
Error = "Error",
|
|
1113
1392
|
/**
|
|
1114
1393
|
* The embedded object has sent an alert
|
|
1115
|
-
*
|
|
1394
|
+
*
|
|
1395
|
+
* @returns alert - An alert object
|
|
1116
1396
|
*/
|
|
1117
1397
|
Alert = "alert",
|
|
1118
1398
|
/**
|
|
@@ -1121,29 +1401,34 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
1121
1401
|
AuthExpire = "ThoughtspotAuthExpired",
|
|
1122
1402
|
/**
|
|
1123
1403
|
* ThoughtSpot failed to validate the auth session.
|
|
1404
|
+
*
|
|
1124
1405
|
* @hidden
|
|
1125
1406
|
*/
|
|
1126
1407
|
AuthFailure = "ThoughtspotAuthFailure",
|
|
1127
1408
|
/**
|
|
1128
1409
|
* ThoughtSpot failed to validate the auth session.
|
|
1410
|
+
*
|
|
1129
1411
|
* @hidden
|
|
1130
1412
|
*/
|
|
1131
1413
|
AuthLogout = "ThoughtspotAuthLogout",
|
|
1132
1414
|
/**
|
|
1133
1415
|
* The height of the embedded Liveboard or visualization has been computed.
|
|
1134
|
-
*
|
|
1416
|
+
*
|
|
1417
|
+
* @returns data - The height of the embedded Liveboard or visualization
|
|
1135
1418
|
* @hidden
|
|
1136
1419
|
*/
|
|
1137
1420
|
EmbedHeight = "EMBED_HEIGHT",
|
|
1138
1421
|
/**
|
|
1139
1422
|
* The center of visible iframe viewport is calculated.
|
|
1140
|
-
*
|
|
1423
|
+
*
|
|
1424
|
+
* @returns data - The center of the visible Iframe viewport.
|
|
1141
1425
|
* @hidden
|
|
1142
1426
|
*/
|
|
1143
1427
|
EmbedIframeCenter = "EmbedIframeCenter",
|
|
1144
1428
|
/**
|
|
1145
1429
|
* Emitted when the "Get Data" button in Search Bar embed
|
|
1146
1430
|
* is clicked.
|
|
1431
|
+
*
|
|
1147
1432
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.0-sw
|
|
1148
1433
|
*/
|
|
1149
1434
|
GetDataClick = "getDataClick",
|
|
@@ -1153,6 +1438,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
1153
1438
|
RouteChange = "ROUTE_CHANGE",
|
|
1154
1439
|
/**
|
|
1155
1440
|
* The v1 event type for Data
|
|
1441
|
+
*
|
|
1156
1442
|
* @hidden
|
|
1157
1443
|
*/
|
|
1158
1444
|
V1Data = "exportVizDataToParent",
|
|
@@ -1165,17 +1451,20 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
1165
1451
|
NoCookieAccess = "noCookieAccess",
|
|
1166
1452
|
/**
|
|
1167
1453
|
* Emitted when SAML is complete
|
|
1454
|
+
*
|
|
1168
1455
|
* @private
|
|
1169
1456
|
* @hidden
|
|
1170
1457
|
*/
|
|
1171
1458
|
SAMLComplete = "samlComplete",
|
|
1172
1459
|
/**
|
|
1173
1460
|
* Emitted when any modal is opened in the app
|
|
1461
|
+
*
|
|
1174
1462
|
* @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1-sw
|
|
1175
1463
|
*/
|
|
1176
1464
|
DialogOpen = "dialog-open",
|
|
1177
1465
|
/**
|
|
1178
1466
|
* Emitted when any modal is closed in the app
|
|
1467
|
+
*
|
|
1179
1468
|
* @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1-sw
|
|
1180
1469
|
*/
|
|
1181
1470
|
DialogClose = "dialog-close",
|
|
@@ -1183,414 +1472,569 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
1183
1472
|
* Emitted when the Liveboard shell loads.
|
|
1184
1473
|
* You can use this event as a hook to trigger
|
|
1185
1474
|
* other events on the rendered Liveboard.
|
|
1475
|
+
*
|
|
1186
1476
|
* @version SDK: 1.9.1 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw
|
|
1187
1477
|
*/
|
|
1188
1478
|
LiveboardRendered = "PinboardRendered",
|
|
1189
1479
|
/**
|
|
1190
1480
|
* This can be used to register an event listener which
|
|
1191
1481
|
* is triggered on all events.
|
|
1482
|
+
*
|
|
1192
1483
|
* @Version SDK: 1.10.0 | ThoughtSpot: 8.2.0.cl, 8.4.1-sw
|
|
1193
1484
|
*/
|
|
1194
1485
|
ALL = "*",
|
|
1195
1486
|
/**
|
|
1196
1487
|
* Emitted when answer is saved in the app
|
|
1488
|
+
*
|
|
1197
1489
|
* @Version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
1198
1490
|
*/
|
|
1199
1491
|
Save = "save",
|
|
1200
1492
|
/**
|
|
1201
1493
|
* Emitted when the download action is triggered on an answer
|
|
1494
|
+
*
|
|
1202
1495
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
1203
1496
|
*/
|
|
1204
1497
|
Download = "download",
|
|
1205
1498
|
/**
|
|
1206
1499
|
* Emitted when the Download as PDF action is triggered on an answer
|
|
1500
|
+
*
|
|
1207
1501
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
1208
1502
|
*/
|
|
1209
1503
|
DownloadAsPdf = "downloadAsPdf",
|
|
1210
1504
|
/**
|
|
1211
1505
|
* Emitted when the Download as CSV action is triggered on an answer
|
|
1506
|
+
*
|
|
1212
1507
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
1213
1508
|
*/
|
|
1214
1509
|
DownloadAsCsv = "downloadAsCsv",
|
|
1215
1510
|
/**
|
|
1216
1511
|
* Emitted when the Download as XLSX action is triggered on an answer
|
|
1512
|
+
*
|
|
1217
1513
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
1218
1514
|
*/
|
|
1219
1515
|
DownloadAsXlsx = "downloadAsXlsx",
|
|
1220
1516
|
/**
|
|
1221
1517
|
* Emitted when an answer is deleted in the app
|
|
1518
|
+
*
|
|
1222
1519
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
1223
1520
|
*/
|
|
1224
1521
|
AnswerDelete = "answerDelete",
|
|
1225
1522
|
/**
|
|
1226
1523
|
* Emitted when an answer is pinned to a Liveboard
|
|
1524
|
+
*
|
|
1227
1525
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
1228
1526
|
*/
|
|
1229
1527
|
Pin = "pin",
|
|
1230
1528
|
/**
|
|
1231
1529
|
* Emitted when SpotIQ analysis is triggered
|
|
1530
|
+
*
|
|
1232
1531
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
1233
1532
|
*/
|
|
1234
1533
|
SpotIQAnalyze = "spotIQAnalyze",
|
|
1235
1534
|
/**
|
|
1236
1535
|
* Emitted when a user shares an object with another user or group
|
|
1536
|
+
*
|
|
1237
1537
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
1238
1538
|
*/
|
|
1239
1539
|
Share = "share",
|
|
1240
1540
|
/**
|
|
1241
|
-
* Emitted when a user clicks the Include action to include a specific value or data
|
|
1541
|
+
* Emitted when a user clicks the Include action to include a specific value or data
|
|
1542
|
+
* on a chart or table
|
|
1543
|
+
*
|
|
1242
1544
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
1243
1545
|
*/
|
|
1244
1546
|
DrillInclude = "context-menu-item-include",
|
|
1245
1547
|
/**
|
|
1246
|
-
* Emitted when a user clicks the Exclude action to exclude a specific value or data
|
|
1548
|
+
* Emitted when a user clicks the Exclude action to exclude a specific value or data
|
|
1549
|
+
* on a chart or table
|
|
1550
|
+
*
|
|
1247
1551
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
1248
1552
|
*/
|
|
1249
1553
|
DrillExclude = "context-menu-item-exclude",
|
|
1250
1554
|
/**
|
|
1251
1555
|
* Emitted when copied column value on the app
|
|
1556
|
+
*
|
|
1252
1557
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
1253
1558
|
*/
|
|
1254
1559
|
CopyToClipboard = "context-menu-item-copy-to-clipboard",
|
|
1255
1560
|
/**
|
|
1256
1561
|
* Emitted when a user clicks the Update TML action
|
|
1562
|
+
*
|
|
1257
1563
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
1258
1564
|
*/
|
|
1259
1565
|
UpdateTML = "updateTSL",
|
|
1260
1566
|
/**
|
|
1261
1567
|
* Emitted when a user clicks the Edit TML action
|
|
1568
|
+
*
|
|
1262
1569
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
1263
1570
|
*/
|
|
1264
1571
|
EditTML = "editTSL",
|
|
1265
1572
|
/**
|
|
1266
1573
|
* Emitted when ExportTML trigger in answer on the app
|
|
1574
|
+
*
|
|
1267
1575
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
1268
1576
|
*/
|
|
1269
1577
|
ExportTML = "exportTSL",
|
|
1270
1578
|
/**
|
|
1271
1579
|
* Emitted when an answer is saved as a view
|
|
1580
|
+
*
|
|
1272
1581
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
1273
1582
|
*/
|
|
1274
1583
|
SaveAsView = "saveAsView",
|
|
1275
1584
|
/**
|
|
1276
1585
|
* Emitted when copy of existing answer on the app
|
|
1586
|
+
*
|
|
1277
1587
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
1278
1588
|
*/
|
|
1279
1589
|
CopyAEdit = "copyAEdit",
|
|
1280
1590
|
/**
|
|
1281
1591
|
* Emitted when a user clicks Show underlying data on an answe
|
|
1592
|
+
*
|
|
1282
1593
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
1283
1594
|
*/
|
|
1284
1595
|
ShowUnderlyingData = "showUnderlyingData",
|
|
1285
1596
|
/**
|
|
1286
1597
|
* Emitted when an answer is switched to a chart or table view
|
|
1598
|
+
*
|
|
1287
1599
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
1288
1600
|
*/
|
|
1289
1601
|
AnswerChartSwitcher = "answerChartSwitcher",
|
|
1290
1602
|
/**
|
|
1291
1603
|
* Internal event to communicate the initial settings back to the TS APP
|
|
1604
|
+
*
|
|
1292
1605
|
* @hidden
|
|
1293
1606
|
*/
|
|
1294
1607
|
APP_INIT = "appInit",
|
|
1295
1608
|
/**
|
|
1296
1609
|
* Emitted when a user clicks Show Liveboard details on a Liveboard
|
|
1610
|
+
*
|
|
1297
1611
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
1298
1612
|
*/
|
|
1299
1613
|
LiveboardInfo = "pinboardInfo",
|
|
1300
1614
|
/**
|
|
1301
1615
|
* Emitted when a user clicks on the Favorite icon on a Liveboard
|
|
1616
|
+
*
|
|
1302
1617
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
1303
1618
|
*/
|
|
1304
1619
|
AddToFavorites = "addToFavorites",
|
|
1305
1620
|
/**
|
|
1306
1621
|
* Emitted when a user clicks Schedule on a Liveboard
|
|
1622
|
+
*
|
|
1307
1623
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
1308
1624
|
*/
|
|
1309
1625
|
Schedule = "subscription",
|
|
1310
1626
|
/**
|
|
1311
1627
|
* Emitted when a user clicks Edit on a Liveboard or visualization
|
|
1628
|
+
*
|
|
1312
1629
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
1313
1630
|
*/
|
|
1314
1631
|
Edit = "edit",
|
|
1315
1632
|
/**
|
|
1316
1633
|
* Emitted when a user clicks Make a copy on a Liveboard
|
|
1634
|
+
*
|
|
1317
1635
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
1318
1636
|
*/
|
|
1319
1637
|
MakeACopy = "makeACopy",
|
|
1320
1638
|
/**
|
|
1321
1639
|
* Emitted when a user clicks Present on a Liveboard or visualization
|
|
1640
|
+
*
|
|
1322
1641
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
1323
1642
|
*/
|
|
1324
1643
|
Present = "present",
|
|
1325
1644
|
/**
|
|
1326
1645
|
* Emitted when a user clicks Delete on a Liveboard
|
|
1646
|
+
*
|
|
1327
1647
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
1328
1648
|
*/
|
|
1329
1649
|
Delete = "delete",
|
|
1330
1650
|
/**
|
|
1331
1651
|
* Emitted when a user clicks Manage schedules on a Liveboard
|
|
1652
|
+
*
|
|
1332
1653
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
1333
1654
|
*/
|
|
1334
1655
|
SchedulesList = "schedule-list",
|
|
1335
1656
|
/**
|
|
1336
1657
|
* Emitted when a user clicks Cancel in edit mode on a Liveboard
|
|
1658
|
+
*
|
|
1337
1659
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
1338
1660
|
*/
|
|
1339
1661
|
Cancel = "cancel",
|
|
1340
1662
|
/**
|
|
1341
1663
|
* Emitted when a user clicks Explore on a visualization
|
|
1664
|
+
*
|
|
1342
1665
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
1343
1666
|
*/
|
|
1344
1667
|
Explore = "explore",
|
|
1345
1668
|
/**
|
|
1346
1669
|
* Emitted when a user clicks Copy link action on a visualization
|
|
1670
|
+
*
|
|
1347
1671
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
1348
1672
|
*/
|
|
1349
1673
|
CopyLink = "embedDocument",
|
|
1350
1674
|
/**
|
|
1351
1675
|
* Emitted when a user interacts with cross filters on a visualization or liveboard
|
|
1676
|
+
*
|
|
1352
1677
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
|
|
1353
1678
|
*/
|
|
1354
1679
|
CrossFilterChanged = "cross-filter-changed",
|
|
1355
1680
|
/**
|
|
1356
1681
|
* Emitted when a user right clicks on chart or table
|
|
1682
|
+
*
|
|
1357
1683
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
|
|
1358
1684
|
*/
|
|
1359
|
-
VizPointRightClick = "vizPointRightClick"
|
|
1685
|
+
VizPointRightClick = "vizPointRightClick",
|
|
1686
|
+
/**
|
|
1687
|
+
* Emitted when a user clicks on Insert to slide on a visualization
|
|
1688
|
+
*
|
|
1689
|
+
* @hidden
|
|
1690
|
+
*/
|
|
1691
|
+
InsertIntoSlide = "insertInToSlide"
|
|
1360
1692
|
}
|
|
1361
1693
|
/**
|
|
1362
1694
|
* Event types that can be triggered by the host application
|
|
1363
1695
|
* to the embedded ThoughtSpot app
|
|
1364
1696
|
*
|
|
1365
1697
|
* To trigger an event use the corresponding
|
|
1366
|
-
* {@link LiveboardEmbed.trigger} or {@link AppEmbed.trigger} or {@link
|
|
1698
|
+
* {@link LiveboardEmbed.trigger} or {@link AppEmbed.trigger} or {@link
|
|
1699
|
+
* SearchEmbed.trigger} method.
|
|
1700
|
+
*
|
|
1701
|
+
* @group Events
|
|
1367
1702
|
*/
|
|
1368
1703
|
export enum HostEvent {
|
|
1369
1704
|
/**
|
|
1370
1705
|
* Trigger a search
|
|
1706
|
+
*
|
|
1371
1707
|
* @param - dataSourceIds - The data source GUID to Search on
|
|
1372
1708
|
* - Although an array, only a single source
|
|
1373
1709
|
* is supported at this time.
|
|
1374
1710
|
* @param - searchQuery - The search query
|
|
1375
1711
|
* @param - execute - execute the existing / updated query
|
|
1376
1712
|
* @example
|
|
1713
|
+
* ```js
|
|
1377
1714
|
* searchEmbed.trigger(HostEvent.Search, {
|
|
1378
|
-
*
|
|
1379
|
-
*
|
|
1380
|
-
*
|
|
1715
|
+
* searchQuery: "[sales] by [item type],
|
|
1716
|
+
* dataSourceIds: ["cd252e5c-b552-49a8-821d-3eadaa049cca"]
|
|
1717
|
+
* execute: true
|
|
1381
1718
|
* })
|
|
1719
|
+
* ```
|
|
1382
1720
|
*/
|
|
1383
1721
|
Search = "search",
|
|
1384
1722
|
/**
|
|
1385
1723
|
* Trigger a drill on certain points by certain column
|
|
1724
|
+
*
|
|
1386
1725
|
* @param - points - an object containing selectedPoints/clickedPoints
|
|
1387
1726
|
* eg. { selectedPoints: []}
|
|
1388
1727
|
* @param - columnGuid - a string guid of the column to drill by. This is optional,
|
|
1389
|
-
* if not provided it will auto drill by the configured
|
|
1390
|
-
*
|
|
1391
|
-
*
|
|
1392
|
-
*
|
|
1728
|
+
* if not provided it will auto drill by the configured
|
|
1729
|
+
* column.
|
|
1730
|
+
* @example
|
|
1731
|
+
* ```js
|
|
1732
|
+
* searchEmbed.trigger(HostEvent.DrillDown, {
|
|
1733
|
+
* points: clickedPointData,
|
|
1734
|
+
* autoDrillDown: true,
|
|
1393
1735
|
* })
|
|
1736
|
+
* ```
|
|
1394
1737
|
* @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
|
|
1395
1738
|
*/
|
|
1396
1739
|
DrillDown = "triggerDrillDown",
|
|
1397
1740
|
/**
|
|
1398
1741
|
* Apply filters
|
|
1742
|
+
*
|
|
1399
1743
|
* @hidden
|
|
1400
1744
|
*/
|
|
1401
1745
|
Filter = "filter",
|
|
1402
1746
|
/**
|
|
1403
1747
|
* Reload the answer or visualization
|
|
1748
|
+
*
|
|
1404
1749
|
* @hidden
|
|
1405
1750
|
*/
|
|
1406
1751
|
Reload = "reload",
|
|
1407
1752
|
/**
|
|
1408
1753
|
* Set the visible visualizations on a Liveboard.
|
|
1754
|
+
*
|
|
1409
1755
|
* @param - an array of ids of visualizations to show, the ids not passed
|
|
1410
1756
|
* will be hidden.
|
|
1411
1757
|
* @example
|
|
1412
|
-
* liveboardEmbed.trigger(HostEvent.SetVisibleVizs, [
|
|
1758
|
+
* liveboardEmbed.trigger(HostEvent.SetVisibleVizs, [
|
|
1759
|
+
* '730496d6-6903-4601-937e-2c691821af3c',
|
|
1760
|
+
* 'd547ec54-2a37-4516-a222-2b06719af726'])
|
|
1413
1761
|
* @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1-sw
|
|
1414
1762
|
*/
|
|
1415
1763
|
SetVisibleVizs = "SetPinboardVisibleVizs",
|
|
1416
1764
|
/**
|
|
1417
1765
|
* Update the runtime filters. The runtime filters passed here are extended
|
|
1418
1766
|
* on to the existing runtime filters if they exist.
|
|
1767
|
+
*
|
|
1419
1768
|
* @param - {@link RuntimeFilter}[] an array of {@link RuntimeFilter} Types.
|
|
1420
1769
|
* @example
|
|
1421
1770
|
* liveboardEmbed.trigger(HostEvent.UpdateRuntimeFilters, [
|
|
1422
1771
|
* {columnName: "state",operator: RuntimeFilterOp.EQ,values: ["michigan"]},
|
|
1423
|
-
* {columnName: "item type",operator: RuntimeFilterOp.EQ,values:
|
|
1424
|
-
* ])
|
|
1772
|
+
* {columnName: "item type",operator: RuntimeFilterOp.EQ,values:
|
|
1773
|
+
* ["Jackets"]} ])
|
|
1425
1774
|
* @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw
|
|
1426
1775
|
*/
|
|
1427
1776
|
UpdateRuntimeFilters = "UpdateRuntimeFilters",
|
|
1428
1777
|
/**
|
|
1429
1778
|
* Navigate to a specific page in App embed without any reload.
|
|
1430
1779
|
* This is the same as calling `appEmbed.navigateToPage(path, true)`
|
|
1780
|
+
*
|
|
1431
1781
|
* @param - path - the path to navigate to (can be a number[1/-1] to go forward/back)
|
|
1432
|
-
* @example
|
|
1782
|
+
* @example
|
|
1783
|
+
* ```js
|
|
1784
|
+
* appEmbed.navigateToPage(-1)
|
|
1785
|
+
* ```
|
|
1433
1786
|
* @version SDK: 1.12.0 | ThoughtSpot 8.4.0.cl, 8.4.1-sw
|
|
1434
1787
|
*/
|
|
1435
1788
|
Navigate = "Navigate",
|
|
1436
1789
|
/**
|
|
1437
1790
|
* Opens the filter panel for a particular column.
|
|
1438
1791
|
* Works with Search embed.
|
|
1439
|
-
*
|
|
1440
|
-
* @
|
|
1792
|
+
*
|
|
1793
|
+
* @param - { columnId: string,
|
|
1794
|
+
* name: string,
|
|
1795
|
+
* type: INT64/CHAR/DATE,
|
|
1796
|
+
* dataType: ATTRIBUTE/MEASURE }
|
|
1797
|
+
* @example
|
|
1798
|
+
* ```js
|
|
1799
|
+
* searchEmbed.trigger(HostEvent.OpenFilter,
|
|
1800
|
+
* { columnId: '123', name: 'column name', type: 'INT64', dataType: 'ATTRIBUTE' })
|
|
1801
|
+
* ```
|
|
1441
1802
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
|
|
1442
1803
|
*/
|
|
1443
1804
|
OpenFilter = "openFilter",
|
|
1444
1805
|
/**
|
|
1445
1806
|
* Adds the columns to the current Search.
|
|
1807
|
+
*
|
|
1446
1808
|
* @param - { columnIds: string[] }
|
|
1447
|
-
* @example
|
|
1809
|
+
* @example
|
|
1810
|
+
* ```js
|
|
1811
|
+
* searchEmbed.trigger(HostEvent.AddColumns, { columnIds: ['123', '456'] })
|
|
1812
|
+
* ```
|
|
1448
1813
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
|
|
1449
1814
|
*/
|
|
1450
1815
|
AddColumns = "addColumns",
|
|
1451
1816
|
/**
|
|
1452
1817
|
* Removes a column from the current Search.
|
|
1818
|
+
*
|
|
1453
1819
|
* @param - { columnId: string }
|
|
1454
|
-
* @example
|
|
1820
|
+
* @example
|
|
1821
|
+
* ```js
|
|
1822
|
+
* searchEmbed.trigger(HostEvent.RemoveColumn, { columnId: '123' })
|
|
1823
|
+
* ```
|
|
1455
1824
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
|
|
1456
1825
|
*/
|
|
1457
1826
|
RemoveColumn = "removeColumn",
|
|
1458
1827
|
/**
|
|
1459
1828
|
* Gets the current pinboard content.
|
|
1460
|
-
*
|
|
1829
|
+
*
|
|
1830
|
+
* @example
|
|
1831
|
+
* ```js
|
|
1832
|
+
* liveboardEmbed.trigger(HostEvent.getExportRequestForCurrentPinboard)
|
|
1833
|
+
* ```
|
|
1461
1834
|
* @version SDK: 1.13.0 | ThoughtSpot: 8.5.0.cl, 8.8.1-sw
|
|
1462
1835
|
*/
|
|
1463
1836
|
getExportRequestForCurrentPinboard = "getExportRequestForCurrentPinboard",
|
|
1464
1837
|
/**
|
|
1465
1838
|
* Triggers the Pin action on an embedded object
|
|
1839
|
+
*
|
|
1466
1840
|
* @param - incase of Liveboard embed, takes in an object with vizId as a key
|
|
1467
1841
|
* can be left empty for search and visualization embeds
|
|
1468
1842
|
* @example
|
|
1843
|
+
* ```js
|
|
1469
1844
|
* liveboardEmbed.trigger(HostEvent.Pin, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1470
1845
|
* vizEmbed.trigger(HostEvent.Pin)
|
|
1471
1846
|
* searchEmbed.trigger(HostEvent.Pin)
|
|
1847
|
+
* ```
|
|
1472
1848
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
1473
1849
|
*/
|
|
1474
1850
|
Pin = "pin",
|
|
1475
1851
|
/**
|
|
1476
1852
|
* Triggers the Show Liveboard details action on a Liveboard
|
|
1477
|
-
*
|
|
1853
|
+
*
|
|
1854
|
+
* @example
|
|
1855
|
+
* ```js
|
|
1856
|
+
* liveboardEmbed.trigger(HostEvent.LiveboardInfo)
|
|
1857
|
+
* ```
|
|
1478
1858
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
1479
1859
|
*/
|
|
1480
1860
|
LiveboardInfo = "pinboardInfo",
|
|
1481
1861
|
/**
|
|
1482
1862
|
* Triggers the Schedule action on a Liveboard
|
|
1483
|
-
*
|
|
1863
|
+
*
|
|
1864
|
+
* @example
|
|
1865
|
+
* ```js
|
|
1866
|
+
* liveboardEmbed.trigger(HostEvent.Schedule)
|
|
1867
|
+
* ```
|
|
1484
1868
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
1485
1869
|
*/
|
|
1486
1870
|
Schedule = "subscription",
|
|
1487
1871
|
/**
|
|
1488
1872
|
* Triggers the Manage schedule action on a Liveboard
|
|
1489
|
-
*
|
|
1873
|
+
*
|
|
1874
|
+
* @example
|
|
1875
|
+
* ```js
|
|
1876
|
+
* liveboardEmbed.trigger(HostEvent.ScheduleList)
|
|
1877
|
+
* ```
|
|
1490
1878
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
1491
1879
|
*/
|
|
1492
1880
|
SchedulesList = "schedule-list",
|
|
1493
1881
|
/**
|
|
1494
1882
|
* Triggers the Export TML action on a Liveboard
|
|
1495
|
-
*
|
|
1883
|
+
*
|
|
1884
|
+
* @example
|
|
1885
|
+
* ```js
|
|
1886
|
+
* liveboardEmbed.trigger(HostEvent.ExportTML)
|
|
1887
|
+
* ```
|
|
1496
1888
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
1497
1889
|
*/
|
|
1498
1890
|
ExportTML = "exportTSL",
|
|
1499
1891
|
/**
|
|
1500
1892
|
* Triggers the Edit TML action on a Liveboard
|
|
1501
|
-
*
|
|
1893
|
+
*
|
|
1894
|
+
* @example
|
|
1895
|
+
* ```js
|
|
1896
|
+
* liveboardEmbed.trigger(HostEvent.EditTML)
|
|
1897
|
+
* ```
|
|
1502
1898
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
1503
1899
|
*/
|
|
1504
1900
|
EditTML = "editTSL",
|
|
1505
1901
|
/**
|
|
1506
1902
|
* Triggers the Update TML action on a Liveboard
|
|
1507
|
-
*
|
|
1903
|
+
*
|
|
1904
|
+
* @example
|
|
1905
|
+
* ```js
|
|
1906
|
+
* liveboardEmbed.trigger(HostEvent.UpdateTML)
|
|
1907
|
+
* ```
|
|
1508
1908
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
1509
1909
|
*/
|
|
1510
1910
|
UpdateTML = "updateTSL",
|
|
1511
1911
|
/**
|
|
1512
1912
|
* Triggers the Download PDF action on a Liveboard
|
|
1513
|
-
*
|
|
1913
|
+
*
|
|
1914
|
+
* @example
|
|
1915
|
+
* ```js
|
|
1916
|
+
* liveboardEmbed.trigger(HostEvent.DownloadAsPDF)
|
|
1917
|
+
* ```
|
|
1514
1918
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
1515
1919
|
*/
|
|
1516
1920
|
DownloadAsPdf = "downloadAsPdf",
|
|
1517
1921
|
/**
|
|
1518
1922
|
* Triggers the Make a copy action on a Liveboard, search or visualization
|
|
1923
|
+
*
|
|
1519
1924
|
* @example
|
|
1925
|
+
* ```js
|
|
1520
1926
|
* liveboardEmbed.trigger(HostEvent.MakeACopy, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1521
1927
|
* vizEmbed.trigger(HostEvent.MakeACopy)
|
|
1522
1928
|
* searchEmbed.trigger(HostEvent.MakeACopy)
|
|
1929
|
+
* ```
|
|
1523
1930
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
1524
1931
|
*/
|
|
1525
1932
|
MakeACopy = "makeACopy",
|
|
1526
1933
|
/**
|
|
1527
1934
|
* Triggers the Delete action on a Liveboard
|
|
1528
|
-
*
|
|
1935
|
+
*
|
|
1936
|
+
* @example
|
|
1937
|
+
* ```js
|
|
1938
|
+
* appEmbed.trigger(HostEvent.Remove)
|
|
1939
|
+
* ```
|
|
1529
1940
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
1530
1941
|
*/
|
|
1531
1942
|
Remove = "delete",
|
|
1532
1943
|
/**
|
|
1533
1944
|
* Triggers the Explore action on a visualization
|
|
1945
|
+
*
|
|
1534
1946
|
* @param - an object with vizId as a key
|
|
1535
|
-
* @example
|
|
1947
|
+
* @example
|
|
1948
|
+
* ```js
|
|
1949
|
+
* liveboardEmbed.trigger(HostEvent.Explore, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1950
|
+
* ```
|
|
1536
1951
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
1537
1952
|
*/
|
|
1538
1953
|
Explore = "explore",
|
|
1539
1954
|
/**
|
|
1540
1955
|
* Triggers the Create alert action on a visualization
|
|
1956
|
+
*
|
|
1541
1957
|
* @param - an object with vizId as a key
|
|
1542
|
-
* @example
|
|
1958
|
+
* @example
|
|
1959
|
+
* ```js
|
|
1960
|
+
* liveboardEmbed.trigger(HostEvent.CreateMonitor {
|
|
1961
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
1962
|
+
* })
|
|
1963
|
+
* ```
|
|
1543
1964
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
1544
1965
|
*/
|
|
1545
1966
|
CreateMonitor = "createMonitor",
|
|
1546
1967
|
/**
|
|
1547
1968
|
* Triggers the Manage alert action on a visualization
|
|
1969
|
+
*
|
|
1548
1970
|
* @param - an object with vizId as a key
|
|
1549
|
-
* @example
|
|
1971
|
+
* @example
|
|
1972
|
+
* ```js
|
|
1973
|
+
* liveboardEmbed.trigger(HostEvent.ManageMonitor, {
|
|
1974
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
1975
|
+
* })
|
|
1976
|
+
* ```
|
|
1550
1977
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
1551
1978
|
*/
|
|
1552
1979
|
ManageMonitor = "manageMonitor",
|
|
1553
1980
|
/**
|
|
1554
1981
|
* Triggers the Edit action on a Liveboard or visualization
|
|
1555
|
-
*
|
|
1982
|
+
*
|
|
1983
|
+
* @param - object - to trigger the action for a specfic visualization
|
|
1984
|
+
* in Liveboard embed, pass in vizId as a key
|
|
1556
1985
|
* @example
|
|
1557
1986
|
* liveboardEmbed.trigger(HostEvent.Edit)
|
|
1558
|
-
* liveboardEmbed.trigger(HostEvent.Edit, {vizId:
|
|
1987
|
+
* liveboardEmbed.trigger(HostEvent.Edit, {vizId:
|
|
1988
|
+
* '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1559
1989
|
* vizEmbed.trigger((HostEvent.Edit)
|
|
1560
1990
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
1561
1991
|
*/
|
|
1562
1992
|
Edit = "edit",
|
|
1563
1993
|
/**
|
|
1564
1994
|
* Triggers the Copy link action on a Liveboard or visualization
|
|
1565
|
-
*
|
|
1995
|
+
*
|
|
1996
|
+
* @param - object - to trigger the action for a s
|
|
1997
|
+
* pecfic visualization in Liveboard embed, pass in vizId as a key
|
|
1566
1998
|
* @example
|
|
1999
|
+
* ```js
|
|
1567
2000
|
* liveboardEmbed.trigger(HostEvent.CopyLink)
|
|
1568
2001
|
* liveboardEmbed.trigger(HostEvent.CopyLink, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1569
2002
|
* vizEmbed.trigger((HostEvent.CopyLink)
|
|
2003
|
+
* ```
|
|
1570
2004
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
1571
2005
|
*/
|
|
1572
2006
|
CopyLink = "embedDocument",
|
|
1573
2007
|
/**
|
|
1574
2008
|
* Triggers the Present action on a Liveboard or visualization
|
|
1575
|
-
*
|
|
2009
|
+
*
|
|
2010
|
+
* @param - object - to trigger the action for a specfic visualization
|
|
2011
|
+
* in Liveboard embed, pass in vizId as a key
|
|
1576
2012
|
* @example
|
|
2013
|
+
* ```js
|
|
1577
2014
|
* liveboardEmbed.trigger(HostEvent.Present)
|
|
1578
2015
|
* liveboardEmbed.trigger(HostEvent.Present, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1579
2016
|
* vizEmbed.trigger((HostEvent.Present)
|
|
2017
|
+
* ```
|
|
1580
2018
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
1581
2019
|
*/
|
|
1582
2020
|
Present = "present",
|
|
1583
2021
|
/**
|
|
1584
2022
|
* Get TML for the current search.
|
|
1585
|
-
*
|
|
2023
|
+
*
|
|
2024
|
+
* @example
|
|
2025
|
+
* ```js
|
|
2026
|
+
* searchEmbed.trigger(HostEvent.GetTML)
|
|
2027
|
+
* ```
|
|
1586
2028
|
* @version SDK: 1.18.0 | ThoughtSpot: 8.10.0.cl
|
|
1587
2029
|
*/
|
|
1588
2030
|
GetTML = "getTML",
|
|
1589
2031
|
/**
|
|
1590
2032
|
* Triggers the ShowUnderlyingData action on visualization or search
|
|
2033
|
+
*
|
|
1591
2034
|
* @param - an object with vizId as a key
|
|
1592
2035
|
* @example
|
|
1593
|
-
* liveboardEmbed.trigger(HostEvent.ShowUnderlyingData, {vizId:
|
|
2036
|
+
* liveboardEmbed.trigger(HostEvent.ShowUnderlyingData, {vizId:
|
|
2037
|
+
* '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1594
2038
|
* vizEmbed.trigger(HostEvent.ShowUnderlyingData)
|
|
1595
2039
|
* searchEmbed.trigger(HostEvent.ShowUnderlyingData)
|
|
1596
2040
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
@@ -1598,10 +2042,12 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
1598
2042
|
ShowUnderlyingData = "showUnderlyingData",
|
|
1599
2043
|
/**
|
|
1600
2044
|
* Triggers the Delete action on visualization or search
|
|
2045
|
+
*
|
|
1601
2046
|
* @param - incase of Liveboard embed, takes in an object with vizId as a key
|
|
1602
2047
|
* can be left empty for search and visualization embeds
|
|
1603
2048
|
* @example
|
|
1604
|
-
* liveboardEmbed.trigger(HostEvent.Delete, {vizId:
|
|
2049
|
+
* liveboardEmbed.trigger(HostEvent.Delete, {vizId:
|
|
2050
|
+
* '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1605
2051
|
* vizEmbed.trigger(HostEvent.Delete)
|
|
1606
2052
|
* searchEmbed.trigger(HostEvent.Delete)
|
|
1607
2053
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
@@ -1609,10 +2055,12 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
1609
2055
|
Delete = "delete",
|
|
1610
2056
|
/**
|
|
1611
2057
|
* Triggers the SpotIQAnalyze action on visualization or search
|
|
2058
|
+
*
|
|
1612
2059
|
* @param - incase of Liveboard embed, takes in an object with vizId as a key
|
|
1613
2060
|
* can be left empty for search and visualization embeds
|
|
1614
2061
|
* @example
|
|
1615
|
-
* liveboardEmbed.trigger(HostEvent.SpotIQAnalyze, {vizId:
|
|
2062
|
+
* liveboardEmbed.trigger(HostEvent.SpotIQAnalyze, {vizId:
|
|
2063
|
+
* '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1616
2064
|
* vizEmbed.trigger(HostEvent.SpotIQAnalyze)
|
|
1617
2065
|
* searchEmbed.trigger(HostEvent.SpotIQAnalyze)
|
|
1618
2066
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
@@ -1620,26 +2068,34 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
1620
2068
|
SpotIQAnalyze = "spotIQAnalyze",
|
|
1621
2069
|
/**
|
|
1622
2070
|
* Triggers the Download action on visualization or search when Displaymode is Chart
|
|
2071
|
+
*
|
|
1623
2072
|
* @example
|
|
1624
|
-
* liveboardEmbed.trigger(HostEvent.Download, {vizId:
|
|
2073
|
+
* liveboardEmbed.trigger(HostEvent.Download, {vizId:
|
|
2074
|
+
* '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1625
2075
|
* vizEmbed.trigger(HostEvent.Download)
|
|
1626
2076
|
* searchEmbed.trigger(HostEvent.Download)
|
|
1627
2077
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
1628
2078
|
*/
|
|
1629
2079
|
Download = "download",
|
|
1630
2080
|
/**
|
|
1631
|
-
* Triggers the downloadAsCSV action on visualization or search when Displaymode is
|
|
2081
|
+
* Triggers the downloadAsCSV action on visualization or search when Displaymode is
|
|
2082
|
+
* Table
|
|
2083
|
+
*
|
|
1632
2084
|
* @example
|
|
1633
|
-
* liveboardEmbed.trigger(HostEvent.DownloadAsCsv, {vizId:
|
|
2085
|
+
* liveboardEmbed.trigger(HostEvent.DownloadAsCsv, {vizId:
|
|
2086
|
+
* '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1634
2087
|
* vizEmbed.trigger(HostEvent.DownloadAsCsv)
|
|
1635
2088
|
* searchEmbed.trigger(HostEvent.DownloadAsCsv)
|
|
1636
2089
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
1637
2090
|
*/
|
|
1638
2091
|
DownloadAsCsv = "downloadAsCSV",
|
|
1639
2092
|
/**
|
|
1640
|
-
* Triggers the downloadAsXLSX action on visualization or search when Displaymode is
|
|
2093
|
+
* Triggers the downloadAsXLSX action on visualization or search when Displaymode is
|
|
2094
|
+
* Table
|
|
2095
|
+
*
|
|
1641
2096
|
* @example
|
|
1642
|
-
* liveboardEmbed.trigger(HostEvent.DownloadAsXlsx, {vizId:
|
|
2097
|
+
* liveboardEmbed.trigger(HostEvent.DownloadAsXlsx, {vizId:
|
|
2098
|
+
* '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1643
2099
|
* vizEmbed.trigger(HostEvent.DownloadAsXlsx)
|
|
1644
2100
|
* searchEmbed.trigger(HostEvent.DownloadAsXlsx)
|
|
1645
2101
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
@@ -1647,6 +2103,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
1647
2103
|
DownloadAsXlsx = "downloadAsXLSX",
|
|
1648
2104
|
/**
|
|
1649
2105
|
* Triggers the Share action on a liveboard or answer
|
|
2106
|
+
*
|
|
1650
2107
|
* @example
|
|
1651
2108
|
* liveboardEmbed.trigger(HostEvent.Share)
|
|
1652
2109
|
* searchEmbed.trigger(HostEvent.Share)
|
|
@@ -1655,6 +2112,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
1655
2112
|
Share = "share",
|
|
1656
2113
|
/**
|
|
1657
2114
|
* Trigger the Save action on a liveboard or answer
|
|
2115
|
+
*
|
|
1658
2116
|
* @example
|
|
1659
2117
|
* liveboardEmbed.trigger(HostEvent.Save)
|
|
1660
2118
|
* searchEmbed.trigger(HostEvent.Save)
|
|
@@ -1663,33 +2121,40 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
1663
2121
|
Save = "save",
|
|
1664
2122
|
/**
|
|
1665
2123
|
* Triggers the SyncToSheets action on visualization
|
|
2124
|
+
*
|
|
1666
2125
|
* @param - an object with vizId as a key
|
|
1667
2126
|
* @example
|
|
1668
|
-
* liveboardEmbed.trigger(HostEvent.SyncToSheets, {vizId:
|
|
2127
|
+
* liveboardEmbed.trigger(HostEvent.SyncToSheets, {vizId:
|
|
2128
|
+
* '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1669
2129
|
* vizEmbed.trigger(HostEvent.SyncToSheets)
|
|
1670
2130
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
1671
2131
|
*/
|
|
1672
2132
|
SyncToSheets = "sync-to-sheets",
|
|
1673
2133
|
/**
|
|
1674
2134
|
* Triggers the SyncToOtherApps action on visualization
|
|
2135
|
+
*
|
|
1675
2136
|
* @param - an object with vizId as a key
|
|
1676
2137
|
* @example
|
|
1677
|
-
* liveboardEmbed.trigger(HostEvent.SyncToOtherApps, {vizId:
|
|
2138
|
+
* liveboardEmbed.trigger(HostEvent.SyncToOtherApps, {vizId:
|
|
2139
|
+
* '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1678
2140
|
* vizEmbed.trigger(HostEvent.SyncToOtherApps)
|
|
1679
2141
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
1680
2142
|
*/
|
|
1681
2143
|
SyncToOtherApps = "sync-to-other-apps",
|
|
1682
2144
|
/**
|
|
1683
2145
|
* Triggers the ManagePipelines action on visualization
|
|
2146
|
+
*
|
|
1684
2147
|
* @param - an object with vizId as a key
|
|
1685
2148
|
* @example
|
|
1686
|
-
* liveboardEmbed.trigger(HostEvent.ManagePipelines, {vizId:
|
|
2149
|
+
* liveboardEmbed.trigger(HostEvent.ManagePipelines, {vizId:
|
|
2150
|
+
* '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1687
2151
|
* vizEmbed.trigger(HostEvent.ManagePipelines)
|
|
1688
2152
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
1689
2153
|
*/
|
|
1690
2154
|
ManagePipelines = "manage-pipeline",
|
|
1691
2155
|
/**
|
|
1692
2156
|
* Triggers the Reset search in answer
|
|
2157
|
+
*
|
|
1693
2158
|
* @example
|
|
1694
2159
|
* searchEmbed.trigger(HostEvent.SearchReset
|
|
1695
2160
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.0.1-sw
|
|
@@ -1719,6 +2184,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
1719
2184
|
* containing configuration and/or visual information.
|
|
1720
2185
|
*/
|
|
1721
2186
|
export enum Param {
|
|
2187
|
+
EmbedApp = "embedApp",
|
|
1722
2188
|
DataSources = "dataSources",
|
|
1723
2189
|
DataSourceMode = "dataSourceMode",
|
|
1724
2190
|
DisableActions = "disableAction",
|
|
@@ -1757,7 +2223,9 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
1757
2223
|
cookieless = "cookieless",
|
|
1758
2224
|
ContextMenuTrigger = "isContextMenuEnabledOnLeftClick",
|
|
1759
2225
|
LinkOverride = "linkOverride",
|
|
1760
|
-
ShowInsertToSlide = "insertInToSlide"
|
|
2226
|
+
ShowInsertToSlide = "insertInToSlide",
|
|
2227
|
+
PrimaryNavHidden = "primaryNavHidden",
|
|
2228
|
+
HideProfleAndHelp = "profileAndHelpInNavBarHidden"
|
|
1761
2229
|
}
|
|
1762
2230
|
/**
|
|
1763
2231
|
* The list of actions that can be performed on visual ThoughtSpot
|
|
@@ -1991,7 +2459,6 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
1991
2459
|
LEFT_CLICK = "left-click",
|
|
1992
2460
|
RIGHT_CLICK = "right-click"
|
|
1993
2461
|
}
|
|
1994
|
-
export {};
|
|
1995
2462
|
}
|
|
1996
2463
|
|
|
1997
2464
|
declare module '@thoughtspot/visual-embed-sdk/embed/ts-embed' {
|
|
@@ -2003,7 +2470,7 @@ declare module '@thoughtspot/visual-embed-sdk/embed/ts-embed' {
|
|
|
2003
2470
|
* @summary Base classes
|
|
2004
2471
|
* @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
|
|
2005
2472
|
*/
|
|
2006
|
-
import { DOMSelector, HostEvent, EmbedEvent, MessageCallback, EmbedConfig, MessageOptions, ViewConfig
|
|
2473
|
+
import { DOMSelector, HostEvent, EmbedEvent, MessageCallback, EmbedConfig, MessageOptions, ViewConfig } from '@thoughtspot/visual-embed-sdk/types';
|
|
2007
2474
|
/**
|
|
2008
2475
|
* Global prefix for all Thoughtspot postHash Params.
|
|
2009
2476
|
*/
|
|
@@ -2014,6 +2481,7 @@ declare module '@thoughtspot/visual-embed-sdk/embed/ts-embed' {
|
|
|
2014
2481
|
* React+GraphQL
|
|
2015
2482
|
*/
|
|
2016
2483
|
export class TsEmbed {
|
|
2484
|
+
protected isAppInitialized: boolean;
|
|
2017
2485
|
/**
|
|
2018
2486
|
* A reference to the iframe within which the ThoughtSpot app
|
|
2019
2487
|
* will be rendered.
|
|
@@ -2029,41 +2497,53 @@ declare module '@thoughtspot/visual-embed-sdk/embed/ts-embed' {
|
|
|
2029
2497
|
constructor(domSelector: DOMSelector, viewConfig?: ViewConfig);
|
|
2030
2498
|
/**
|
|
2031
2499
|
* Handles errors within the SDK
|
|
2500
|
+
*
|
|
2032
2501
|
* @param error The error message or object
|
|
2033
2502
|
*/
|
|
2034
2503
|
protected handleError(error: string | Record<string, unknown>): void;
|
|
2035
2504
|
/**
|
|
2036
2505
|
* Constructs the base URL string to load the ThoughtSpot app.
|
|
2506
|
+
*
|
|
2507
|
+
* @param query
|
|
2037
2508
|
*/
|
|
2038
2509
|
protected getEmbedBasePath(query: string): string;
|
|
2039
2510
|
/**
|
|
2040
2511
|
* Common query params set for all the embed modes.
|
|
2512
|
+
*
|
|
2513
|
+
* @param queryParams
|
|
2041
2514
|
* @returns queryParams
|
|
2042
2515
|
*/
|
|
2043
|
-
protected getBaseQueryParams(): {};
|
|
2516
|
+
protected getBaseQueryParams(queryParams?: {}): {};
|
|
2044
2517
|
/**
|
|
2045
2518
|
* Constructs the base URL string to load v1 of the ThoughtSpot app.
|
|
2046
2519
|
* This is used for embedding Liveboards, visualizations, and full application.
|
|
2520
|
+
*
|
|
2047
2521
|
* @param queryString The query string to append to the URL.
|
|
2048
2522
|
* @param isAppEmbed A Boolean parameter to specify if you are embedding
|
|
2049
2523
|
* the full application.
|
|
2050
2524
|
*/
|
|
2051
|
-
protected getV1EmbedBasePath(queryString: string
|
|
2525
|
+
protected getV1EmbedBasePath(queryString: string): string;
|
|
2526
|
+
protected getEmbedParams(): string;
|
|
2527
|
+
protected getRootIframeSrc(): string;
|
|
2528
|
+
protected createIframeEl(frameSrc: string): HTMLIFrameElement;
|
|
2052
2529
|
/**
|
|
2053
2530
|
* Renders the embedded ThoughtSpot app in an iframe and sets up
|
|
2054
2531
|
* event listeners.
|
|
2532
|
+
*
|
|
2055
2533
|
* @param url
|
|
2056
2534
|
* @param frameOptions
|
|
2057
2535
|
*/
|
|
2058
|
-
protected renderIFrame(url: string
|
|
2536
|
+
protected renderIFrame(url: string): Promise<any>;
|
|
2059
2537
|
protected insertIntoDOM(child: string | Node): void;
|
|
2060
2538
|
/**
|
|
2061
2539
|
* Sets the height of the iframe
|
|
2540
|
+
*
|
|
2062
2541
|
* @param height The height in pixels
|
|
2063
2542
|
*/
|
|
2064
2543
|
protected setIFrameHeight(height: number): void;
|
|
2065
2544
|
/**
|
|
2066
2545
|
* Executes all registered event handlers for a particular event type
|
|
2546
|
+
*
|
|
2067
2547
|
* @param eventType The event type
|
|
2068
2548
|
* @param data The payload invoked with the event handler
|
|
2069
2549
|
* @param eventPort The event Port for a specific MessageChannel
|
|
@@ -2075,6 +2555,7 @@ declare module '@thoughtspot/visual-embed-sdk/embed/ts-embed' {
|
|
|
2075
2555
|
protected getThoughtSpotHost(): string;
|
|
2076
2556
|
/**
|
|
2077
2557
|
* Gets the v1 event type (if applicable) for the EmbedEvent type
|
|
2558
|
+
*
|
|
2078
2559
|
* @param eventType The v2 event type
|
|
2079
2560
|
* @returns The corresponding v1 event type if one exists
|
|
2080
2561
|
* or else the v2 event type itself
|
|
@@ -2084,6 +2565,7 @@ declare module '@thoughtspot/visual-embed-sdk/embed/ts-embed' {
|
|
|
2084
2565
|
* Calculates the iframe center for the current visible viewPort
|
|
2085
2566
|
* of iframe using Scroll position of Host App, offsetTop for iframe
|
|
2086
2567
|
* in Host app. ViewPort height of the tab.
|
|
2568
|
+
*
|
|
2087
2569
|
* @returns iframe Center in visible viewport,
|
|
2088
2570
|
* Iframe height,
|
|
2089
2571
|
* View port height.
|
|
@@ -2102,10 +2584,25 @@ declare module '@thoughtspot/visual-embed-sdk/embed/ts-embed' {
|
|
|
2102
2584
|
* @param messageType The message type
|
|
2103
2585
|
* @param callback A callback as a function
|
|
2104
2586
|
* @param options The message options
|
|
2587
|
+
* @example
|
|
2588
|
+
* ```js
|
|
2589
|
+
* tsEmbed.on(EmbedEvent.Error, (data) => {
|
|
2590
|
+
* console.error(data);
|
|
2591
|
+
* });
|
|
2592
|
+
* ```
|
|
2593
|
+
* @example
|
|
2594
|
+
* ```js
|
|
2595
|
+
* tsEmbed.on(EmbedEvent.Save, (data) => {
|
|
2596
|
+
* console.log("Answer save clicked", data);
|
|
2597
|
+
* }, {
|
|
2598
|
+
* start: true // This will trigger the callback on start of save
|
|
2599
|
+
* });
|
|
2600
|
+
* ```
|
|
2105
2601
|
*/
|
|
2106
2602
|
on(messageType: EmbedEvent, callback: MessageCallback, options?: MessageOptions): typeof TsEmbed.prototype;
|
|
2107
2603
|
/**
|
|
2108
2604
|
* Triggers an event to the embedded app
|
|
2605
|
+
*
|
|
2109
2606
|
* @param messageType The event type
|
|
2110
2607
|
* @param data The payload to send with the message
|
|
2111
2608
|
*/
|
|
@@ -2114,6 +2611,7 @@ declare module '@thoughtspot/visual-embed-sdk/embed/ts-embed' {
|
|
|
2114
2611
|
* Marks the ThoughtSpot object to have been rendered
|
|
2115
2612
|
* Needs to be overridden by subclasses to do the actual
|
|
2116
2613
|
* rendering of the iframe.
|
|
2614
|
+
*
|
|
2117
2615
|
* @param args
|
|
2118
2616
|
*/
|
|
2119
2617
|
render(): TsEmbed;
|
|
@@ -2121,28 +2619,53 @@ declare module '@thoughtspot/visual-embed-sdk/embed/ts-embed' {
|
|
|
2121
2619
|
* Get the Post Url Params for THOUGHTSPOT from the current
|
|
2122
2620
|
* host app URL.
|
|
2123
2621
|
* THOUGHTSPOT URL params starts with a prefix "ts-"
|
|
2622
|
+
*
|
|
2124
2623
|
* @version SDK: 1.14.0 | ThoughtSpot: 8.4.0.cl, 8.4.1-sw
|
|
2125
2624
|
*/
|
|
2126
2625
|
getThoughtSpotPostUrlParams(): string;
|
|
2127
2626
|
/**
|
|
2128
2627
|
* Destroys the ThoughtSpot embed, and remove any nodes from the DOM.
|
|
2628
|
+
*
|
|
2129
2629
|
* @version SDK: 1.19.1 | ThoughtSpot: *
|
|
2130
2630
|
*/
|
|
2131
2631
|
destroy(): void;
|
|
2632
|
+
getUnderlyingFrameElement(): HTMLIFrameElement;
|
|
2633
|
+
prerenderGeneric(): Promise<any>;
|
|
2132
2634
|
}
|
|
2133
2635
|
/**
|
|
2134
2636
|
* Base class for embedding v1 experience
|
|
2135
2637
|
* Note: The v1 version of ThoughtSpot Blink works on the AngularJS stack
|
|
2136
2638
|
* which is currently under migration to v2
|
|
2639
|
+
*
|
|
2640
|
+
* @inheritdoc
|
|
2137
2641
|
*/
|
|
2138
2642
|
export class V1Embed extends TsEmbed {
|
|
2139
2643
|
protected viewConfig: ViewConfig;
|
|
2140
2644
|
constructor(domSelector: DOMSelector, viewConfig: ViewConfig);
|
|
2141
2645
|
/**
|
|
2142
|
-
* Render the
|
|
2646
|
+
* Render the ap p in an iframe and set up event handlers
|
|
2647
|
+
*
|
|
2143
2648
|
* @param iframeSrc
|
|
2144
2649
|
*/
|
|
2145
2650
|
protected renderV1Embed(iframeSrc: string): any;
|
|
2651
|
+
protected getRootIframeSrc(): string;
|
|
2652
|
+
/**
|
|
2653
|
+
* @inheritdoc
|
|
2654
|
+
* @example
|
|
2655
|
+
* ```js
|
|
2656
|
+
* tsEmbed.on(EmbedEvent.Error, (data) => {
|
|
2657
|
+
* console.error(data);
|
|
2658
|
+
* });
|
|
2659
|
+
* ```
|
|
2660
|
+
* @example
|
|
2661
|
+
* ```js
|
|
2662
|
+
* tsEmbed.on(EmbedEvent.Save, (data) => {
|
|
2663
|
+
* console.log("Answer save clicked", data);
|
|
2664
|
+
* }, {
|
|
2665
|
+
* start: true // This will trigger the callback on start of save
|
|
2666
|
+
* });
|
|
2667
|
+
* ```
|
|
2668
|
+
*/
|
|
2146
2669
|
on(messageType: EmbedEvent, callback: MessageCallback, options?: MessageOptions): typeof TsEmbed.prototype;
|
|
2147
2670
|
}
|
|
2148
2671
|
}
|