@thoughtspot/visual-embed-sdk 1.17.2-customcss → 1.18.0-alpha.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/CHANGELOG.md +4 -8
- package/README.md +1 -1
- package/dist/src/embed/app.d.ts +2 -2
- package/dist/src/embed/liveboard.d.ts +2 -2
- package/dist/src/embed/search-bar.d.ts +3 -2
- package/dist/src/embed/search.d.ts +2 -6
- package/dist/src/embed/ts-embed.d.ts +2 -97
- package/dist/src/react/util.d.ts +1 -2
- package/dist/src/types.d.ts +198 -11
- package/dist/src/utils.d.ts +2 -2
- package/dist/tsembed.es.js +131 -31
- package/dist/tsembed.js +131 -31
- package/lib/package.json +8 -4
- package/lib/src/embed/app.d.ts +2 -2
- package/lib/src/embed/app.js +1 -1
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/base.js +3 -3
- package/lib/src/embed/liveboard.d.ts +2 -2
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/search-bar.d.ts +3 -2
- package/lib/src/embed/search-bar.js +1 -1
- package/lib/src/embed/search-bar.js.map +1 -1
- package/lib/src/embed/search.d.ts +2 -6
- package/lib/src/embed/search.js +2 -2
- package/lib/src/embed/search.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts +2 -97
- package/lib/src/embed/ts-embed.js +11 -11
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/embed/ts-embed.spec.js +31 -1
- package/lib/src/embed/ts-embed.spec.js.map +1 -1
- package/lib/src/react/util.d.ts +1 -2
- package/lib/src/react/util.js.map +1 -1
- package/lib/src/types.d.ts +198 -11
- package/lib/src/types.js +98 -6
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils.d.ts +2 -2
- package/lib/src/utils.js +16 -8
- package/lib/src/utils.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +209 -120
- package/package.json +8 -4
- package/src/embed/app.ts +8 -2
- package/src/embed/base.ts +3 -3
- package/src/embed/liveboard.ts +2 -1
- package/src/embed/search-bar.tsx +3 -3
- package/src/embed/search.ts +8 -7
- package/src/embed/ts-embed.spec.ts +39 -1
- package/src/embed/ts-embed.ts +16 -108
- package/src/react/index.tsx +2 -2
- package/src/react/util.ts +1 -2
- package/src/types.ts +199 -11
- package/src/utils.ts +19 -7
package/CHANGELOG.md
CHANGED
|
@@ -6,14 +6,14 @@ This project follows Semantic Versioning.
|
|
|
6
6
|
## Unreleased
|
|
7
7
|
|
|
8
8
|
### New Features
|
|
9
|
-
- Set of new Host events to drive interactions on the embed programatically
|
|
9
|
+
- Set of new Host events to drive interactions on the embed programatically
|
|
10
10
|
|
|
11
11
|
## 1.14.1 (08-31-2022)
|
|
12
12
|
- Fixed "not logged in" message showing up on "SearchEmbed" with AuthType.None.
|
|
13
13
|
|
|
14
14
|
## 1.14.0 (08-29-2022)
|
|
15
15
|
- [AuthType.AuthServer] Now uses `POST` call to log the user in using the bearer token.
|
|
16
|
-
- `liveboardV2` flag on `LiveboardEmbed` to try out the LiveboardV2 experience.
|
|
16
|
+
- `liveboardV2` flag on `LiveboardEmbed` to try out the LiveboardV2 experience.
|
|
17
17
|
|
|
18
18
|
## 1.13.0 (07-19-2022)
|
|
19
19
|
- Release to support TS version 8.5.0.cl
|
|
@@ -29,10 +29,6 @@ This project follows Semantic Versioning.
|
|
|
29
29
|
### Fixed
|
|
30
30
|
- Typescript build that was affecting some Angular project configurations
|
|
31
31
|
|
|
32
|
-
## 1.11.2 (06-10-2022)
|
|
33
|
-
### Fixed
|
|
34
|
-
- Typescript build that was affecting some Angular project configurations
|
|
35
|
-
|
|
36
32
|
## 1.11.1 (05-30-2022)
|
|
37
33
|
### Fixed
|
|
38
34
|
- Whitelabeling - new [action](https://developers.thoughtspot.com/docs/typedoc/enums/Action.html#ReportError) for the ability to turn off TS specific error reporting by end users.
|
|
@@ -81,12 +77,12 @@ This project follows Semantic Versioning.
|
|
|
81
77
|
|
|
82
78
|
## 1.9.3 (03-22-2022)
|
|
83
79
|
|
|
84
|
-
### New Features
|
|
80
|
+
### New Features
|
|
85
81
|
- `disableLoginRedirect` option in `EmbedConfig`
|
|
86
82
|
|
|
87
83
|
## 1.9.2 (03-17-2022)
|
|
88
84
|
|
|
89
|
-
### New Features
|
|
85
|
+
### New Features
|
|
90
86
|
- Ability to trigger events on React components
|
|
91
87
|
- Added new `useEmbedRef` hook, check README for usage.
|
|
92
88
|
|
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
# ThoughtSpot Visual Embed SDK <br/> [](https://coveralls.io/github/ts-blink/embed-sdk?branch=main)  [](https://www.jsdelivr.com/package/npm/@thoughtspot/visual-embed-sdk)  [](https://openbase.com/js/@thoughtspot/visual-embed-sdk?utm_source=embedded&utm_medium=badge&utm_campaign=rate-badge) 
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
SDK to embed ThoughtSpot into your web apps. You need
|
|
10
|
+
SDK to embed ThoughtSpot into your web apps. You need a ThoughtSpot account to use the SDK, [click here](https://www.thoughtspot.com/trial?tsref=trialtse) to start a trial.
|
|
11
11
|
|
|
12
12
|
* [Installation](#installation)
|
|
13
13
|
* [Live Playground](#live-playground)
|
package/dist/src/embed/app.d.ts
CHANGED
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
* @module
|
|
9
9
|
* @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
|
|
10
10
|
*/
|
|
11
|
-
import { DOMSelector } from '../types';
|
|
12
|
-
import { V1Embed
|
|
11
|
+
import { DOMSelector, ViewConfig } from '../types';
|
|
12
|
+
import { V1Embed } from './ts-embed';
|
|
13
13
|
/**
|
|
14
14
|
* Pages within the ThoughtSpot app that can be embedded.
|
|
15
15
|
*/
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
* @summary Liveboard & visualization embed
|
|
9
9
|
* @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
|
|
10
10
|
*/
|
|
11
|
-
import { DOMSelector, HostEvent } from '../types';
|
|
12
|
-
import { V1Embed
|
|
11
|
+
import { DOMSelector, HostEvent, ViewConfig } from '../types';
|
|
12
|
+
import { V1Embed } from './ts-embed';
|
|
13
13
|
/**
|
|
14
14
|
* The configuration for the embedded Liveboard or visualization page view.
|
|
15
15
|
* @Category Liveboards and Charts
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ViewConfig } from '../types';
|
|
2
|
+
import { TsEmbed } from './ts-embed';
|
|
2
3
|
import { SearchOptions } from './search';
|
|
3
4
|
export interface SearchBarViewConfig extends ViewConfig {
|
|
4
5
|
/**
|
|
@@ -18,7 +19,7 @@ export interface SearchBarViewConfig extends ViewConfig {
|
|
|
18
19
|
* Embed ThoughtSpot search bar
|
|
19
20
|
*
|
|
20
21
|
* @Category Search Embed
|
|
21
|
-
* @version: SDK: 1.
|
|
22
|
+
* @version: SDK: 1.18.0 | ThoughtSpot: 8.10.0.cl, 9.0.1-sw
|
|
22
23
|
*/
|
|
23
24
|
export declare class SearchBarEmbed extends TsEmbed {
|
|
24
25
|
/**
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* @summary Search embed
|
|
7
7
|
* @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
|
|
8
8
|
*/
|
|
9
|
-
import { DOMSelector, Action } from '../types';
|
|
10
|
-
import {
|
|
9
|
+
import { DOMSelector, Action, ViewConfig } from '../types';
|
|
10
|
+
import { TsEmbed } from './ts-embed';
|
|
11
11
|
/**
|
|
12
12
|
* Configuration for search options
|
|
13
13
|
*/
|
|
@@ -44,10 +44,6 @@ export interface SearchViewConfig extends ViewConfig {
|
|
|
44
44
|
* using raw answer data.
|
|
45
45
|
*/
|
|
46
46
|
hideResults?: boolean;
|
|
47
|
-
/**
|
|
48
|
-
* If set to true, expands all the data sources panel.
|
|
49
|
-
*/
|
|
50
|
-
expandAllDataSource?: boolean;
|
|
51
47
|
/**
|
|
52
48
|
* If set to true, the Search Assist feature is enabled.
|
|
53
49
|
* @version SDK: 1.13.0 | ThoughtSpot: 8.5.0.cl, 8.8.1-sw
|
|
@@ -6,106 +6,11 @@
|
|
|
6
6
|
* @summary Base classes
|
|
7
7
|
* @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
|
|
8
8
|
*/
|
|
9
|
-
import { DOMSelector, HostEvent, EmbedEvent, MessageCallback,
|
|
9
|
+
import { DOMSelector, HostEvent, EmbedEvent, MessageCallback, EmbedConfig, MessageOptions, ViewConfig, FrameParams } from '../types';
|
|
10
10
|
/**
|
|
11
11
|
* Global prefix for all Thoughtspot postHash Params.
|
|
12
12
|
*/
|
|
13
13
|
export declare const THOUGHTSPOT_PARAM_PREFIX = "ts-";
|
|
14
|
-
export interface LayoutConfig {
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Embedded iFrame configuration
|
|
18
|
-
*/
|
|
19
|
-
export interface FrameParams {
|
|
20
|
-
/**
|
|
21
|
-
* The width of the iFrame (unit is pixels if numeric).
|
|
22
|
-
*/
|
|
23
|
-
width?: number | string;
|
|
24
|
-
/**
|
|
25
|
-
* The height of the iFrame (unit is pixels if numeric).
|
|
26
|
-
*/
|
|
27
|
-
height?: number | string;
|
|
28
|
-
/**
|
|
29
|
-
* This parameters will be passed on the iframe
|
|
30
|
-
* as is.
|
|
31
|
-
*/
|
|
32
|
-
[key: string]: string | number | boolean | undefined;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* The configuration object for an embedded view.
|
|
36
|
-
*/
|
|
37
|
-
export interface ViewConfig {
|
|
38
|
-
/**
|
|
39
|
-
* @hidden
|
|
40
|
-
*/
|
|
41
|
-
layoutConfig?: LayoutConfig;
|
|
42
|
-
/**
|
|
43
|
-
* The <b>width</b> and <b>height</b> dimensions to render an embedded object inside your app. Specify the values in pixels or percentage.
|
|
44
|
-
*/
|
|
45
|
-
frameParams?: FrameParams;
|
|
46
|
-
/**
|
|
47
|
-
* @hidden
|
|
48
|
-
*/
|
|
49
|
-
theme?: string;
|
|
50
|
-
/**
|
|
51
|
-
* @hidden
|
|
52
|
-
*/
|
|
53
|
-
styleSheet__unstable?: string;
|
|
54
|
-
/**
|
|
55
|
-
* The list of actions to disable from the primary menu, more menu
|
|
56
|
-
* (...), and the contextual menu.
|
|
57
|
-
*/
|
|
58
|
-
disabledActions?: Action[];
|
|
59
|
-
/**
|
|
60
|
-
* The tooltip to display for disabled actions.
|
|
61
|
-
*/
|
|
62
|
-
disabledActionReason?: string;
|
|
63
|
-
/**
|
|
64
|
-
* The list of actions to hide from the primary menu, more menu
|
|
65
|
-
* (...), and the contextual menu.
|
|
66
|
-
*/
|
|
67
|
-
hiddenActions?: Action[];
|
|
68
|
-
/**
|
|
69
|
-
* The list of actions to display from the primary menu, more menu
|
|
70
|
-
* (...), and the contextual menu.
|
|
71
|
-
* @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1-sw
|
|
72
|
-
*/
|
|
73
|
-
visibleActions?: Action[];
|
|
74
|
-
/**
|
|
75
|
-
* Show alert messages and toast messages in the embedded view.
|
|
76
|
-
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
77
|
-
*/
|
|
78
|
-
showAlerts?: boolean;
|
|
79
|
-
/**
|
|
80
|
-
* The list of runtime filters to apply to a search answer,
|
|
81
|
-
* visualization, or Liveboard.
|
|
82
|
-
*/
|
|
83
|
-
runtimeFilters?: RuntimeFilter[];
|
|
84
|
-
/**
|
|
85
|
-
* The locale/language to use for the embedded view.
|
|
86
|
-
* @version SDK: 1.9.4 | ThoughtSpot 8.1.0.cl, 8.4.1-sw
|
|
87
|
-
*/
|
|
88
|
-
locale?: string;
|
|
89
|
-
/**
|
|
90
|
-
* This is an object (key/val) of override flags which will be applied
|
|
91
|
-
* to the internal embedded object. This can be used to add any
|
|
92
|
-
* URL flag.
|
|
93
|
-
* Warning: This option is for advanced use only and is used internally
|
|
94
|
-
* to control embed behavior in non-regular ways. We do not publish the
|
|
95
|
-
* list of supported keys and values associated with each.
|
|
96
|
-
* @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw
|
|
97
|
-
*/
|
|
98
|
-
additionalFlags?: {
|
|
99
|
-
[key: string]: string | number | boolean;
|
|
100
|
-
};
|
|
101
|
-
/**
|
|
102
|
-
* Dynamic CSS Url to be injected in the loaded application.
|
|
103
|
-
* You would also need to set `style-src` in the CSP settings.
|
|
104
|
-
* @version SDK: 1.17.2 | ThoughtSpot: 8.4.1-sw, 8.4.0.cl
|
|
105
|
-
* @default ''
|
|
106
|
-
*/
|
|
107
|
-
customCssUrl?: string;
|
|
108
|
-
}
|
|
109
14
|
/**
|
|
110
15
|
* Base class for embedding v2 experience
|
|
111
16
|
* Note: the v2 version of ThoughtSpot Blink is built on the new stack:
|
|
@@ -275,7 +180,7 @@ export declare class TsEmbed {
|
|
|
275
180
|
* @param messageType The event type
|
|
276
181
|
* @param data The payload to send with the message
|
|
277
182
|
*/
|
|
278
|
-
trigger(messageType: HostEvent, data
|
|
183
|
+
trigger(messageType: HostEvent, data?: any): Promise<any>;
|
|
279
184
|
/**
|
|
280
185
|
* Marks the ThoughtSpot object to have been rendered
|
|
281
186
|
* Needs to be overridden by subclasses to do the actual
|
package/dist/src/react/util.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { EmbedEvent, MessageCallback } from '../types';
|
|
2
|
-
import { ViewConfig } from '../embed/ts-embed';
|
|
1
|
+
import { EmbedEvent, MessageCallback, ViewConfig } from '../types';
|
|
3
2
|
export declare type EmbedEventHandlers = {
|
|
4
3
|
[key in keyof typeof EmbedEvent as `on${Capitalize<key>}`]?: MessageCallback;
|
|
5
4
|
};
|
package/dist/src/types.d.ts
CHANGED
|
@@ -82,11 +82,11 @@ interface customCssInterface {
|
|
|
82
82
|
}
|
|
83
83
|
interface CustomStyles {
|
|
84
84
|
customCSSUrl?: string;
|
|
85
|
-
|
|
85
|
+
customCSS?: customCssInterface;
|
|
86
86
|
}
|
|
87
87
|
export interface CustomisationsInterface {
|
|
88
|
-
style
|
|
89
|
-
content
|
|
88
|
+
style?: CustomStyles;
|
|
89
|
+
content?: {
|
|
90
90
|
[key: string]: string;
|
|
91
91
|
};
|
|
92
92
|
}
|
|
@@ -226,7 +226,7 @@ export interface EmbedConfig {
|
|
|
226
226
|
*
|
|
227
227
|
* @version SDK: 1.17.0 | ThoughtSpot: 8.9.0.cl
|
|
228
228
|
*/
|
|
229
|
-
|
|
229
|
+
customizations?: CustomisationsInterface;
|
|
230
230
|
/**
|
|
231
231
|
* For noRedirect SSO Auth, we need a button which the user
|
|
232
232
|
* click to trigger the flow. This is the containing element
|
|
@@ -242,6 +242,101 @@ export interface EmbedConfig {
|
|
|
242
242
|
*/
|
|
243
243
|
authTriggerText?: string;
|
|
244
244
|
}
|
|
245
|
+
export interface LayoutConfig {
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* Embedded iFrame configuration
|
|
249
|
+
*/
|
|
250
|
+
export interface FrameParams {
|
|
251
|
+
/**
|
|
252
|
+
* The width of the iFrame (unit is pixels if numeric).
|
|
253
|
+
*/
|
|
254
|
+
width?: number | string;
|
|
255
|
+
/**
|
|
256
|
+
* The height of the iFrame (unit is pixels if numeric).
|
|
257
|
+
*/
|
|
258
|
+
height?: number | string;
|
|
259
|
+
/**
|
|
260
|
+
* This parameters will be passed on the iframe
|
|
261
|
+
* as is.
|
|
262
|
+
*/
|
|
263
|
+
[key: string]: string | number | boolean | undefined;
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* The configuration object for an embedded view.
|
|
267
|
+
*/
|
|
268
|
+
export interface ViewConfig {
|
|
269
|
+
/**
|
|
270
|
+
* @hidden
|
|
271
|
+
*/
|
|
272
|
+
layoutConfig?: LayoutConfig;
|
|
273
|
+
/**
|
|
274
|
+
* The <b>width</b> and <b>height</b> dimensions to render an embedded object inside your app. Specify the values in pixels or percentage.
|
|
275
|
+
*/
|
|
276
|
+
frameParams?: FrameParams;
|
|
277
|
+
/**
|
|
278
|
+
* @hidden
|
|
279
|
+
*/
|
|
280
|
+
theme?: string;
|
|
281
|
+
/**
|
|
282
|
+
* @hidden
|
|
283
|
+
*/
|
|
284
|
+
styleSheet__unstable?: string;
|
|
285
|
+
/**
|
|
286
|
+
* The list of actions to disable from the primary menu, more menu
|
|
287
|
+
* (...), and the contextual menu.
|
|
288
|
+
*/
|
|
289
|
+
disabledActions?: Action[];
|
|
290
|
+
/**
|
|
291
|
+
* The tooltip to display for disabled actions.
|
|
292
|
+
*/
|
|
293
|
+
disabledActionReason?: string;
|
|
294
|
+
/**
|
|
295
|
+
* The list of actions to hide from the primary menu, more menu
|
|
296
|
+
* (...), and the contextual menu.
|
|
297
|
+
*/
|
|
298
|
+
hiddenActions?: Action[];
|
|
299
|
+
/**
|
|
300
|
+
* The list of actions to display from the primary menu, more menu
|
|
301
|
+
* (...), and the contextual menu.
|
|
302
|
+
* @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1-sw
|
|
303
|
+
*/
|
|
304
|
+
visibleActions?: Action[];
|
|
305
|
+
/**
|
|
306
|
+
* Show alert messages and toast messages in the embedded view.
|
|
307
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
308
|
+
*/
|
|
309
|
+
showAlerts?: boolean;
|
|
310
|
+
/**
|
|
311
|
+
* The list of runtime filters to apply to a search answer,
|
|
312
|
+
* visualization, or Liveboard.
|
|
313
|
+
*/
|
|
314
|
+
runtimeFilters?: RuntimeFilter[];
|
|
315
|
+
/**
|
|
316
|
+
* The locale/language to use for the embedded view.
|
|
317
|
+
* @version SDK: 1.9.4 | ThoughtSpot 8.1.0.cl, 8.4.1-sw
|
|
318
|
+
*/
|
|
319
|
+
locale?: string;
|
|
320
|
+
/**
|
|
321
|
+
* This is an object (key/val) of override flags which will be applied
|
|
322
|
+
* to the internal embedded object. This can be used to add any
|
|
323
|
+
* URL flag.
|
|
324
|
+
* Warning: This option is for advanced use only and is used internally
|
|
325
|
+
* to control embed behavior in non-regular ways. We do not publish the
|
|
326
|
+
* list of supported keys and values associated with each.
|
|
327
|
+
* @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw
|
|
328
|
+
*/
|
|
329
|
+
additionalFlags?: {
|
|
330
|
+
[key: string]: string | number | boolean;
|
|
331
|
+
};
|
|
332
|
+
/**
|
|
333
|
+
* Dynamic CSSUrl and customCSS to be injected in the loaded application.
|
|
334
|
+
* You would also need to set `style-src` in the CSP settings.
|
|
335
|
+
* @version SDK: 1.17.2 | ThoughtSpot: 8.4.1-sw, 8.4.0.cl
|
|
336
|
+
* @default ''
|
|
337
|
+
*/
|
|
338
|
+
customizations?: CustomisationsInterface;
|
|
339
|
+
}
|
|
245
340
|
/**
|
|
246
341
|
* MessagePayload: Embed event payload: message type, data and status (start/end)
|
|
247
342
|
*/
|
|
@@ -738,7 +833,10 @@ export declare enum HostEvent {
|
|
|
738
833
|
* Triggers the Pin action on an embedded object
|
|
739
834
|
* @param - incase of Liveboard embed, takes in an object with vizId as a key
|
|
740
835
|
* can be left empty for search and visualization embeds
|
|
741
|
-
* @example
|
|
836
|
+
* @example
|
|
837
|
+
* liveboardEmbed.trigger(HostEvent.Pin, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
838
|
+
* vizEmbed.trigger(HostEvent.Pin)
|
|
839
|
+
* searchEmbed.trigger(HostEvent.Pin)
|
|
742
840
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
743
841
|
*/
|
|
744
842
|
Pin = "pin",
|
|
@@ -785,8 +883,11 @@ export declare enum HostEvent {
|
|
|
785
883
|
*/
|
|
786
884
|
DownloadAsPdf = "downloadAsPdf",
|
|
787
885
|
/**
|
|
788
|
-
* Triggers the Make a copy action on a Liveboard
|
|
789
|
-
* @example
|
|
886
|
+
* Triggers the Make a copy action on a Liveboard, search or visualization
|
|
887
|
+
* @example
|
|
888
|
+
* liveboardEmbed.trigger(HostEvent.MakeACopy, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
889
|
+
* vizEmbed.trigger(HostEvent.MakeACopy)
|
|
890
|
+
* searchEmbed.trigger(HostEvent.MakeACopy)
|
|
790
891
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
791
892
|
*/
|
|
792
893
|
MakeACopy = "makeACopy",
|
|
@@ -850,15 +951,74 @@ export declare enum HostEvent {
|
|
|
850
951
|
/**
|
|
851
952
|
* Get TML for the current search.
|
|
852
953
|
* @example searchEmbed.trigger(HostEvent.GetTML)
|
|
853
|
-
* @version SDK: 1.18.0 | ThoughtSpot: 8.10.0.cl
|
|
954
|
+
* @version SDK: 1.18.0 | ThoughtSpot: 8.10.0.cl
|
|
854
955
|
*/
|
|
855
956
|
GetTML = "getTML",
|
|
957
|
+
/**
|
|
958
|
+
* Triggers the ShowUnderlyingData action on visualization or search
|
|
959
|
+
* @param - an object with vizId as a key
|
|
960
|
+
* @example
|
|
961
|
+
* liveboardEmbed.trigger(HostEvent.ShowUnderlyingData, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
962
|
+
* vizEmbed.trigger(HostEvent.ShowUnderlyingData)
|
|
963
|
+
* searchEmbed.trigger(HostEvent.ShowUnderlyingData)
|
|
964
|
+
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
965
|
+
*/
|
|
966
|
+
ShowUnderlyingData = "showUnderlyingData",
|
|
967
|
+
/**
|
|
968
|
+
* Triggers the Delete action on visualization or search
|
|
969
|
+
* @param - incase of Liveboard embed, takes in an object with vizId as a key
|
|
970
|
+
* can be left empty for search and visualization embeds
|
|
971
|
+
* @example
|
|
972
|
+
* liveboardEmbed.trigger(HostEvent.Delete, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
973
|
+
* vizEmbed.trigger(HostEvent.Delete)
|
|
974
|
+
* searchEmbed.trigger(HostEvent.Delete)
|
|
975
|
+
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
976
|
+
*/
|
|
977
|
+
Delete = "delete",
|
|
978
|
+
/**
|
|
979
|
+
* Triggers the SpotIQAnalyze action on visualization or search
|
|
980
|
+
* @param - incase of Liveboard embed, takes in an object with vizId as a key
|
|
981
|
+
* can be left empty for search and visualization embeds
|
|
982
|
+
* @example
|
|
983
|
+
* liveboardEmbed.trigger(HostEvent.SpotIQAnalyze, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
984
|
+
* vizEmbed.trigger(HostEvent.SpotIQAnalyze)
|
|
985
|
+
* searchEmbed.trigger(HostEvent.SpotIQAnalyze)
|
|
986
|
+
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
987
|
+
*/
|
|
988
|
+
SpotIQAnalyze = "spotIQAnalyze",
|
|
989
|
+
/**
|
|
990
|
+
* Triggers the Download action on visualization or search when Displaymode is Chart
|
|
991
|
+
* @example
|
|
992
|
+
* liveboardEmbed.trigger(HostEvent.Download, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
993
|
+
* vizEmbed.trigger(HostEvent.Download)
|
|
994
|
+
* searchEmbed.trigger(HostEvent.Download)
|
|
995
|
+
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
996
|
+
*/
|
|
997
|
+
Download = "download",
|
|
998
|
+
/**
|
|
999
|
+
* Triggers the downloadAsCSV action on visualization or search when Displaymode is Table
|
|
1000
|
+
* @example
|
|
1001
|
+
* liveboardEmbed.trigger(HostEvent.DownloadAsCsv, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1002
|
+
* vizEmbed.trigger(HostEvent.DownloadAsCsv)
|
|
1003
|
+
* searchEmbed.trigger(HostEvent.DownloadAsCsv)
|
|
1004
|
+
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
1005
|
+
*/
|
|
1006
|
+
DownloadAsCsv = "downloadAsCSV",
|
|
1007
|
+
/**
|
|
1008
|
+
* Triggers the downloadAsXLSX action on visualization or search when Displaymode is Table
|
|
1009
|
+
* @example
|
|
1010
|
+
* liveboardEmbed.trigger(HostEvent.DownloadAsXlsx, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1011
|
+
* vizEmbed.trigger(HostEvent.DownloadAsXlsx)
|
|
1012
|
+
* searchEmbed.trigger(HostEvent.DownloadAsXlsx)
|
|
1013
|
+
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
1014
|
+
*/
|
|
1015
|
+
DownloadAsXlsx = "downloadAsXLSX",
|
|
856
1016
|
/**
|
|
857
1017
|
* Triggers the Share action on a liveboard or answer
|
|
858
1018
|
* @example
|
|
859
1019
|
* liveboardEmbed.trigger(HostEvent.Share)
|
|
860
1020
|
* searchEmbed.trigger(HostEvent.Share)
|
|
861
|
-
* @version SDK: 1.19.0 |
|
|
1021
|
+
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
862
1022
|
*/
|
|
863
1023
|
Share = "share",
|
|
864
1024
|
/**
|
|
@@ -866,9 +1026,36 @@ export declare enum HostEvent {
|
|
|
866
1026
|
* @example
|
|
867
1027
|
* liveboardEmbed.trigger(HostEvent.Save)
|
|
868
1028
|
* searchEmbed.trigger(HostEvent.Save)
|
|
869
|
-
* @version SDK: 1.19.0 |
|
|
1029
|
+
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
1030
|
+
*/
|
|
1031
|
+
Save = "save",
|
|
1032
|
+
/**
|
|
1033
|
+
* Triggers the SyncToSheets action on visualization
|
|
1034
|
+
* @param - an object with vizId as a key
|
|
1035
|
+
* @example
|
|
1036
|
+
* liveboardEmbed.trigger(HostEvent.SyncToSheets, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1037
|
+
* vizEmbed.trigger(HostEvent.SyncToSheets)
|
|
1038
|
+
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
870
1039
|
*/
|
|
871
|
-
|
|
1040
|
+
SyncToSheets = "sync-to-sheets",
|
|
1041
|
+
/**
|
|
1042
|
+
* Triggers the SyncToOtherApps action on visualization
|
|
1043
|
+
* @param - an object with vizId as a key
|
|
1044
|
+
* @example
|
|
1045
|
+
* liveboardEmbed.trigger(HostEvent.SyncToOtherApps, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1046
|
+
* vizEmbed.trigger(HostEvent.SyncToOtherApps)
|
|
1047
|
+
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
1048
|
+
*/
|
|
1049
|
+
SyncToOtherApps = "sync-to-other-apps",
|
|
1050
|
+
/**
|
|
1051
|
+
* Triggers the ManagePipelines action on visualization
|
|
1052
|
+
* @param - an object with vizId as a key
|
|
1053
|
+
* @example
|
|
1054
|
+
* liveboardEmbed.trigger(HostEvent.ManagePipelines, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1055
|
+
* vizEmbed.trigger(HostEvent.ManagePipelines)
|
|
1056
|
+
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
1057
|
+
*/
|
|
1058
|
+
ManagePipelines = "manage-pipeline"
|
|
872
1059
|
}
|
|
873
1060
|
/**
|
|
874
1061
|
* The different visual modes that the data sources panel within
|
package/dist/src/utils.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @summary Utils
|
|
7
7
|
* @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
|
|
8
8
|
*/
|
|
9
|
-
import { EmbedConfig, QueryParams, RuntimeFilter, CustomisationsInterface, DOMSelector } from './types';
|
|
9
|
+
import { EmbedConfig, QueryParams, RuntimeFilter, CustomisationsInterface, DOMSelector, ViewConfig } from './types';
|
|
10
10
|
/**
|
|
11
11
|
* Construct a runtime filters query string from the given filters.
|
|
12
12
|
* Refer to the following docs for more details on runtime filter syntax:
|
|
@@ -43,7 +43,7 @@ export declare const setAttributes: (element: HTMLElement, attributes: {
|
|
|
43
43
|
[key: string]: string | number | boolean;
|
|
44
44
|
}) => void;
|
|
45
45
|
export declare const checkReleaseVersionInBeta: (releaseVersion: string, suppressBetaWarning: boolean) => boolean;
|
|
46
|
-
export declare const getCustomisations: (embedConfig: EmbedConfig) => CustomisationsInterface;
|
|
46
|
+
export declare const getCustomisations: (embedConfig: EmbedConfig, viewConfig: ViewConfig) => CustomisationsInterface;
|
|
47
47
|
/**
|
|
48
48
|
* Gets a reference to the DOM node given
|
|
49
49
|
* a selector.
|