@thoughtspot/visual-embed-sdk 1.13.0-alpha.4 → 1.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -5
- package/dist/src/embed/app.d.ts +4 -3
- package/dist/src/embed/base.d.ts +1 -1
- package/dist/src/embed/liveboard.d.ts +10 -7
- package/dist/src/embed/pinboard.d.ts +91 -0
- package/dist/src/embed/search.d.ts +5 -1
- package/dist/src/embed/ts-embed.d.ts +4 -4
- package/dist/src/types.d.ts +84 -77
- package/dist/src/utils/authService.d.ts +1 -0
- package/dist/src/utils/plugin.d.ts +0 -0
- package/dist/src/v1/api.d.ts +19 -0
- package/dist/tsembed.es.js +106 -78
- package/dist/tsembed.js +106 -78
- package/lib/package.json +1 -1
- package/lib/src/auth.js +8 -2
- package/lib/src/auth.js.map +1 -1
- package/lib/src/auth.spec.js +18 -0
- package/lib/src/auth.spec.js.map +1 -1
- package/lib/src/embed/app.d.ts +4 -3
- package/lib/src/embed/app.js +2 -1
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/base.d.ts +1 -1
- package/lib/src/embed/base.js +1 -1
- package/lib/src/embed/liveboard.d.ts +10 -7
- package/lib/src/embed/liveboard.js +7 -4
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +12 -0
- package/lib/src/embed/liveboard.spec.js.map +1 -1
- package/lib/src/embed/pinboard.d.ts +91 -0
- package/lib/src/embed/pinboard.js +110 -0
- package/lib/src/embed/pinboard.js.map +1 -0
- package/lib/src/embed/search.d.ts +5 -1
- package/lib/src/embed/search.js +1 -1
- package/lib/src/embed/search.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts +4 -4
- package/lib/src/types.d.ts +84 -77
- package/lib/src/types.js +74 -69
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils/authService.d.ts +1 -0
- package/lib/src/utils/authService.js +13 -0
- package/lib/src/utils/authService.js.map +1 -1
- package/lib/src/utils/authService.spec.js +15 -1
- package/lib/src/utils/authService.spec.js.map +1 -1
- package/lib/src/utils/plugin.d.ts +0 -0
- package/lib/src/utils/plugin.js +1 -0
- package/lib/src/utils/plugin.js.map +1 -0
- package/lib/src/visual-embed-sdk.d.ts +108 -93
- package/package.json +1 -1
- package/src/auth.spec.ts +39 -0
- package/src/auth.ts +11 -5
- package/src/embed/app.ts +4 -3
- package/src/embed/base.ts +1 -1
- package/src/embed/liveboard.spec.ts +15 -0
- package/src/embed/liveboard.ts +22 -9
- package/src/embed/search.ts +6 -1
- package/src/embed/ts-embed.ts +4 -4
- package/src/types.ts +85 -77
- package/src/utils/authService.spec.ts +21 -0
- package/src/utils/authService.ts +20 -0
package/CHANGELOG.md
CHANGED
|
@@ -6,10 +6,10 @@ This project follows Semantic Versioning.
|
|
|
6
6
|
## Unreleased
|
|
7
7
|
|
|
8
8
|
### New Features
|
|
9
|
-
- Event for navigating to a specific page in App embed without any reload
|
|
10
|
-
- Ability to turn on search assist in Search embed
|
|
11
9
|
- Set of new Host events to drive interactions on the embed programatically
|
|
12
|
-
|
|
10
|
+
## 1.13.0 (07-19-2022)
|
|
11
|
+
- Release to support TS version 8.5.0.cl
|
|
12
|
+
- Please check the full list of changes [here](https://developers.thoughtspot.com/docs/?pageid=embed-sdk-changelog)
|
|
13
13
|
## 1.12.1 (06-21-2022)
|
|
14
14
|
### Fixed
|
|
15
15
|
- Search embed beta warning check for TS cloud releases
|
|
@@ -21,6 +21,10 @@ This project follows Semantic Versioning.
|
|
|
21
21
|
### Fixed
|
|
22
22
|
- Typescript build that was affecting some Angular project configurations
|
|
23
23
|
|
|
24
|
+
## 1.11.2 (06-10-2022)
|
|
25
|
+
### Fixed
|
|
26
|
+
- Typescript build that was affecting some Angular project configurations
|
|
27
|
+
|
|
24
28
|
## 1.11.1 (05-30-2022)
|
|
25
29
|
### Fixed
|
|
26
30
|
- 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.
|
|
@@ -69,12 +73,12 @@ This project follows Semantic Versioning.
|
|
|
69
73
|
|
|
70
74
|
## 1.9.3 (03-22-2022)
|
|
71
75
|
|
|
72
|
-
### New Features
|
|
76
|
+
### New Features
|
|
73
77
|
- `disableLoginRedirect` option in `EmbedConfig`
|
|
74
78
|
|
|
75
79
|
## 1.9.2 (03-17-2022)
|
|
76
80
|
|
|
77
|
-
### New Features
|
|
81
|
+
### New Features
|
|
78
82
|
- Ability to trigger events on React components
|
|
79
83
|
- Added new `useEmbedRef` hook, check README for usage.
|
|
80
84
|
|
package/dist/src/embed/app.d.ts
CHANGED
|
@@ -82,13 +82,13 @@ export interface AppViewConfig extends ViewConfig {
|
|
|
82
82
|
* Render liveboards using the new v2 rendering mode
|
|
83
83
|
* This is a transient flag which is primarily meant for internal use
|
|
84
84
|
* @default false
|
|
85
|
-
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
85
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
86
86
|
* @hidden
|
|
87
87
|
*/
|
|
88
88
|
liveboardV2?: boolean;
|
|
89
89
|
/**
|
|
90
90
|
* If set to true, the Search Assist feature is enabled.
|
|
91
|
-
* @version SDK: 1.13.0 | ThoughtSpot: 8.5.0.cl
|
|
91
|
+
* @version SDK: 1.13.0 | ThoughtSpot: 8.5.0.cl, 8.8.1-sw
|
|
92
92
|
*/
|
|
93
93
|
enableSearchAssist?: boolean;
|
|
94
94
|
}
|
|
@@ -126,7 +126,8 @@ export declare class AppEmbed extends V1Embed {
|
|
|
126
126
|
* @param path string | number The string, set to iframe src and navigate to new page
|
|
127
127
|
* eg: appEmbed.navigateToPage('pinboards')
|
|
128
128
|
* When used with `noReload` this can also be a number like 1/-1 to go forward/back.
|
|
129
|
-
* @param noReload boolean Trigger the navigation without reloading the page
|
|
129
|
+
* @param noReload boolean Trigger the navigation without reloading the page
|
|
130
|
+
* @version SDK: 1.12.0 | ThoughtSpot: 8.4.0.cl, 8.4.1-sw
|
|
130
131
|
*/
|
|
131
132
|
navigateToPage(path: string | number, noReload?: boolean): void;
|
|
132
133
|
/**
|
package/dist/src/embed/base.d.ts
CHANGED
|
@@ -47,7 +47,7 @@ export declare function disableAutoLogin(): void;
|
|
|
47
47
|
*
|
|
48
48
|
* @param doNotDisableAutoLogin This flag when passed will not disable autoLogin
|
|
49
49
|
* @returns Promise which resolves when logout completes.
|
|
50
|
-
* @version SDK: 1.10.1 | ThoughtSpot:
|
|
50
|
+
* @version SDK: 1.10.1 | ThoughtSpot: 8.2.0.cl, 8.4.1-sw
|
|
51
51
|
*/
|
|
52
52
|
export declare const logout: (doNotDisableAutoLogin?: boolean) => Promise<boolean>;
|
|
53
53
|
/**
|
|
@@ -24,7 +24,7 @@ export interface LiveboardViewConfig extends ViewConfig {
|
|
|
24
24
|
* This is the minimum height(in pixels) for a full height Liveboard.
|
|
25
25
|
* Setting this height helps resolves issues with empty Liveboards and
|
|
26
26
|
* other screens navigable from a Liveboard.
|
|
27
|
-
* @version 1.5.0
|
|
27
|
+
* @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
|
|
28
28
|
* @default 500
|
|
29
29
|
*/
|
|
30
30
|
defaultHeight?: number;
|
|
@@ -38,7 +38,7 @@ export interface LiveboardViewConfig extends ViewConfig {
|
|
|
38
38
|
*/
|
|
39
39
|
liveboardId?: string;
|
|
40
40
|
/**
|
|
41
|
-
* To support backward
|
|
41
|
+
* To support backward compatibility
|
|
42
42
|
* @hidden
|
|
43
43
|
*/
|
|
44
44
|
pinboardId?: string;
|
|
@@ -55,7 +55,7 @@ export interface LiveboardViewConfig extends ViewConfig {
|
|
|
55
55
|
* Array of viz ids which should be visible when the liveboard
|
|
56
56
|
* first renders. This can be changed by triggering the "SetVisibleVizs"
|
|
57
57
|
* event.
|
|
58
|
-
* @version 1.9.1
|
|
58
|
+
* @version SDK: 1.9.1 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw
|
|
59
59
|
*/
|
|
60
60
|
visibleVizs?: string[];
|
|
61
61
|
/**
|
|
@@ -64,13 +64,16 @@ export interface LiveboardViewConfig extends ViewConfig {
|
|
|
64
64
|
*/
|
|
65
65
|
preventPinboardFilterRemoval?: boolean;
|
|
66
66
|
/**
|
|
67
|
-
* Render embedded
|
|
68
|
-
* This is a transient flag which is primarily meant for internal use
|
|
67
|
+
* Render embedded Liveboards and visualizations in the new Liveboard experience mode
|
|
69
68
|
* @default false
|
|
70
|
-
* @version SDK: 1.
|
|
71
|
-
* @hidden
|
|
69
|
+
* @version SDK: 1.14.0 | ThoughtSpot: 8.6.0.cl, 8.8.1-sw
|
|
72
70
|
*/
|
|
73
71
|
liveboardV2?: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Tab Id of the Liveboard that is supposed to be active
|
|
74
|
+
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
75
|
+
*/
|
|
76
|
+
activeTabId?: string;
|
|
74
77
|
}
|
|
75
78
|
/**
|
|
76
79
|
* Embed a ThoughtSpot Liveboard or visualization
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2021
|
|
3
|
+
*
|
|
4
|
+
* Embed a ThoughtSpot pinboard or visualization
|
|
5
|
+
* https://developers.thoughtspot.com/docs/?pageid=embed-pinboard
|
|
6
|
+
* https://developers.thoughtspot.com/docs/?pageid=embed-a-viz
|
|
7
|
+
*
|
|
8
|
+
* @summary Pinboard & visualization embed
|
|
9
|
+
* @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
|
|
10
|
+
*/
|
|
11
|
+
import { DOMSelector } from '../types';
|
|
12
|
+
import { V1Embed, ViewConfig } from './ts-embed';
|
|
13
|
+
/**
|
|
14
|
+
* The configuration for the embedded pinboard or visualization page view.
|
|
15
|
+
* @Category Pinboards and Charts
|
|
16
|
+
*/
|
|
17
|
+
export interface PinboardViewConfig extends ViewConfig {
|
|
18
|
+
/**
|
|
19
|
+
* If set to true, the embedded object container dynamically resizes
|
|
20
|
+
* according to the height of the pinboard.
|
|
21
|
+
*/
|
|
22
|
+
fullHeight?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* This is the minimum height(in pixels) for a full height pinboard.
|
|
25
|
+
* Setting this height helps resolves issues with empty pinboards and
|
|
26
|
+
* other screens navigable from a pinboard.
|
|
27
|
+
* @default 500
|
|
28
|
+
* * _since 1.5.0_
|
|
29
|
+
*/
|
|
30
|
+
defaultHeight?: number;
|
|
31
|
+
/**
|
|
32
|
+
* If set to true, the context menu in visualizations will be enabled.
|
|
33
|
+
*/
|
|
34
|
+
enableVizTransformations?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* The pinboard to display in the embedded view.
|
|
37
|
+
*/
|
|
38
|
+
pinboardId: string;
|
|
39
|
+
/**
|
|
40
|
+
* The visualization within the pinboard to display.
|
|
41
|
+
*/
|
|
42
|
+
vizId?: string;
|
|
43
|
+
/**
|
|
44
|
+
* If set to true, all filter chips from a
|
|
45
|
+
* pinboard page will be read-only (no X buttons)
|
|
46
|
+
*/
|
|
47
|
+
preventPinboardFilterRemoval?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* An array of vizids which should be visible when this pinboard loads.
|
|
50
|
+
* The ids not in this array are hidden from the pinboard.
|
|
51
|
+
* _since: 1.6.0_
|
|
52
|
+
*/
|
|
53
|
+
pinboardVisibleVizs?: string[];
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Embed a ThoughtSpot pinboard or visualization
|
|
57
|
+
* @Category Pinboards and Charts
|
|
58
|
+
*/
|
|
59
|
+
export declare class PinboardEmbed extends V1Embed {
|
|
60
|
+
protected viewConfig: PinboardViewConfig;
|
|
61
|
+
private defaultHeight;
|
|
62
|
+
constructor(domSelector: DOMSelector, viewConfig: PinboardViewConfig);
|
|
63
|
+
/**
|
|
64
|
+
* Construct a map of params to be passed on to the
|
|
65
|
+
* embedded pinboard or visualization.
|
|
66
|
+
*/
|
|
67
|
+
private getEmbedParams;
|
|
68
|
+
/**
|
|
69
|
+
* Construct the URL of the embedded ThoughtSpot pinboard or visualization
|
|
70
|
+
* to be loaded within the iframe.
|
|
71
|
+
* @param pinboardId The GUID of the pinboard.
|
|
72
|
+
* @param vizId The optional GUID of a visualization within the pinboard.
|
|
73
|
+
* @param runtimeFilters A list of runtime filters to be applied to
|
|
74
|
+
* the pinboard or visualization on load.
|
|
75
|
+
*/
|
|
76
|
+
private getIFrameSrc;
|
|
77
|
+
/**
|
|
78
|
+
* Set the iframe height as per the computed height received
|
|
79
|
+
* from the ThoughtSpot app.
|
|
80
|
+
* @param data The event payload
|
|
81
|
+
*/
|
|
82
|
+
private updateIFrameHeight;
|
|
83
|
+
private embedIframeCenter;
|
|
84
|
+
private handleRouteChangeFullHeightPinboard;
|
|
85
|
+
/**
|
|
86
|
+
* Render an embedded ThoughtSpot pinboard or visualization
|
|
87
|
+
* @param renderOptions An object specifying the pinboard ID,
|
|
88
|
+
* visualization ID and the runtime filters.
|
|
89
|
+
*/
|
|
90
|
+
render(): PinboardEmbed;
|
|
91
|
+
}
|
|
@@ -44,9 +44,13 @@ 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;
|
|
47
51
|
/**
|
|
48
52
|
* If set to true, the Search Assist feature is enabled.
|
|
49
|
-
* @version SDK: 1.13.0 | ThoughtSpot: 8.5.0.cl
|
|
53
|
+
* @version SDK: 1.13.0 | ThoughtSpot: 8.5.0.cl, 8.8.1-sw
|
|
50
54
|
*/
|
|
51
55
|
enableSearchAssist?: boolean;
|
|
52
56
|
/**
|
|
@@ -68,12 +68,12 @@ export interface ViewConfig {
|
|
|
68
68
|
/**
|
|
69
69
|
* The list of actions to display from the primary menu, more menu
|
|
70
70
|
* (...), and the contextual menu.
|
|
71
|
-
* @version 1.6.0
|
|
71
|
+
* @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1-sw
|
|
72
72
|
*/
|
|
73
73
|
visibleActions?: Action[];
|
|
74
74
|
/**
|
|
75
75
|
* Show alert messages and toast messages in the embedded view.
|
|
76
|
-
* @version 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
76
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
77
77
|
*/
|
|
78
78
|
showAlerts?: boolean;
|
|
79
79
|
/**
|
|
@@ -83,7 +83,7 @@ export interface ViewConfig {
|
|
|
83
83
|
runtimeFilters?: RuntimeFilter[];
|
|
84
84
|
/**
|
|
85
85
|
* The locale/language to use for the embedded view.
|
|
86
|
-
* @version 1.9.4
|
|
86
|
+
* @version SDK: 1.9.4 | ThoughtSpot 8.1.0.cl, 8.4.1-sw
|
|
87
87
|
*/
|
|
88
88
|
locale?: string;
|
|
89
89
|
/**
|
|
@@ -93,7 +93,7 @@ export interface ViewConfig {
|
|
|
93
93
|
* Warning: This option is for advanced use only and is used internally
|
|
94
94
|
* to control embed behavior in non-regular ways. We do not publish the
|
|
95
95
|
* list of supported keys and values associated with each.
|
|
96
|
-
* @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl
|
|
96
|
+
* @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw
|
|
97
97
|
*/
|
|
98
98
|
additionalFlags?: {
|
|
99
99
|
[key: string]: string | number | boolean;
|