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