@thoughtspot/visual-embed-sdk 1.20.0-alpha.2 → 1.20.0-prerender.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/auth.d.ts +75 -5
- package/dist/src/auth.d.ts.map +1 -1
- package/dist/src/config.d.ts +1 -0
- package/dist/src/config.d.ts.map +1 -1
- package/dist/src/embed/app.d.ts +19 -7
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/base.d.ts +39 -19
- package/dist/src/embed/base.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts +19 -7
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/embed/search-bar.d.ts +7 -1
- package/dist/src/embed/search-bar.d.ts.map +1 -1
- package/dist/src/embed/search.d.ts +11 -3
- package/dist/src/embed/search.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.d.ts +76 -5
- package/dist/src/embed/ts-embed.d.ts.map +1 -1
- package/dist/src/errors.d.ts.map +1 -1
- package/dist/src/index.d.ts +3 -3
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/mixpanel-service.d.ts +8 -0
- package/dist/src/mixpanel-service.d.ts.map +1 -1
- package/dist/src/react/index.d.ts.map +1 -1
- package/dist/src/react/util.d.ts +4 -0
- package/dist/src/react/util.d.ts.map +1 -1
- package/dist/src/test/test-utils.d.ts +11 -2
- package/dist/src/test/test-utils.d.ts.map +1 -1
- package/dist/src/types.d.ts +429 -97
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/answerService.d.ts +7 -0
- package/dist/src/utils/answerService.d.ts.map +1 -1
- package/dist/src/utils/authService.d.ts +30 -0
- package/dist/src/utils/authService.d.ts.map +1 -1
- package/dist/src/utils/processData.d.ts +12 -0
- package/dist/src/utils/processData.d.ts.map +1 -1
- package/dist/src/utils/processTrigger.d.ts +7 -0
- package/dist/src/utils/processTrigger.d.ts.map +1 -1
- package/dist/src/utils.d.ts +12 -0
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/tsembed.es.js +818 -285
- package/dist/tsembed.js +791 -284
- package/lib/package.json +4 -3
- package/lib/src/auth.d.ts +75 -5
- package/lib/src/auth.d.ts.map +1 -1
- package/lib/src/auth.js +86 -26
- package/lib/src/auth.js.map +1 -1
- package/lib/src/auth.spec.js +14 -5
- package/lib/src/auth.spec.js.map +1 -1
- package/lib/src/config.d.ts +1 -0
- package/lib/src/config.d.ts.map +1 -1
- package/lib/src/config.js +5 -3
- package/lib/src/config.js.map +1 -1
- package/lib/src/config.spec.js.map +1 -1
- package/lib/src/embed/app.d.ts +19 -7
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +26 -16
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/app.spec.js +12 -12
- package/lib/src/embed/app.spec.js.map +1 -1
- package/lib/src/embed/base.d.ts +39 -19
- package/lib/src/embed/base.d.ts.map +1 -1
- package/lib/src/embed/base.js +49 -15
- package/lib/src/embed/base.js.map +1 -1
- package/lib/src/embed/base.spec.js +2 -2
- package/lib/src/embed/base.spec.js.map +1 -1
- package/lib/src/embed/embed.spec.js +1 -1
- package/lib/src/embed/embed.spec.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts +19 -7
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +50 -38
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +37 -30
- package/lib/src/embed/liveboard.spec.js.map +1 -1
- package/lib/src/embed/pinboard.spec.js +14 -26
- package/lib/src/embed/pinboard.spec.js.map +1 -1
- package/lib/src/embed/search-bar.d.ts +7 -1
- package/lib/src/embed/search-bar.d.ts.map +1 -1
- package/lib/src/embed/search-bar.js +6 -7
- package/lib/src/embed/search-bar.js.map +1 -1
- package/lib/src/embed/search.d.ts +11 -3
- package/lib/src/embed/search.d.ts.map +1 -1
- package/lib/src/embed/search.js +19 -15
- package/lib/src/embed/search.js.map +1 -1
- package/lib/src/embed/search.spec.js +16 -19
- package/lib/src/embed/search.spec.js.map +1 -1
- package/lib/src/embed/searchEmbed-basic-auth.spec.js +4 -0
- package/lib/src/embed/searchEmbed-basic-auth.spec.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts +76 -5
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +150 -72
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/embed/ts-embed.spec.js +23 -24
- package/lib/src/embed/ts-embed.spec.js.map +1 -1
- package/lib/src/errors.d.ts.map +1 -1
- package/lib/src/errors.js.map +1 -1
- package/lib/src/index.d.ts +3 -3
- package/lib/src/index.d.ts.map +1 -1
- package/lib/src/index.js +3 -3
- package/lib/src/index.js.map +1 -1
- package/lib/src/mixpanel-service.d.ts +8 -0
- package/lib/src/mixpanel-service.d.ts.map +1 -1
- package/lib/src/mixpanel-service.js +13 -1
- package/lib/src/mixpanel-service.js.map +1 -1
- package/lib/src/mixpanel-service.spec.js.map +1 -1
- package/lib/src/react/index.d.ts.map +1 -1
- package/lib/src/react/index.js +4 -6
- package/lib/src/react/index.js.map +1 -1
- package/lib/src/react/index.spec.js +3 -6
- package/lib/src/react/index.spec.js.map +1 -1
- package/lib/src/react/util.d.ts +4 -0
- package/lib/src/react/util.d.ts.map +1 -1
- package/lib/src/react/util.js +4 -0
- package/lib/src/react/util.js.map +1 -1
- package/lib/src/test/test-utils.d.ts +11 -2
- package/lib/src/test/test-utils.d.ts.map +1 -1
- package/lib/src/test/test-utils.js +36 -25
- package/lib/src/test/test-utils.js.map +1 -1
- package/lib/src/types.d.ts +429 -97
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +310 -72
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils/answerService.d.ts +7 -0
- package/lib/src/utils/answerService.d.ts.map +1 -1
- package/lib/src/utils/answerService.js +7 -0
- package/lib/src/utils/answerService.js.map +1 -1
- package/lib/src/utils/answerService.spec.js.map +1 -1
- package/lib/src/utils/authService.d.ts +30 -0
- package/lib/src/utils/authService.d.ts.map +1 -1
- package/lib/src/utils/authService.js +39 -2
- package/lib/src/utils/authService.js.map +1 -1
- package/lib/src/utils/authService.spec.js.map +1 -1
- package/lib/src/utils/processData.d.ts +12 -0
- package/lib/src/utils/processData.d.ts.map +1 -1
- package/lib/src/utils/processData.js +33 -5
- package/lib/src/utils/processData.js.map +1 -1
- package/lib/src/utils/processData.spec.js.map +1 -1
- package/lib/src/utils/processTrigger.d.ts +7 -0
- package/lib/src/utils/processTrigger.d.ts.map +1 -1
- package/lib/src/utils/processTrigger.js +17 -3
- package/lib/src/utils/processTrigger.js.map +1 -1
- package/lib/src/utils/processTrigger.spec.js.map +1 -1
- package/lib/src/utils.d.ts +12 -0
- package/lib/src/utils.d.ts.map +1 -1
- package/lib/src/utils.js +24 -19
- package/lib/src/utils.js.map +1 -1
- package/lib/src/utils.spec.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +664 -141
- package/package.json +4 -3
- package/src/auth.spec.ts +68 -150
- package/src/auth.ts +141 -101
- package/src/config.spec.ts +2 -4
- package/src/config.ts +5 -3
- package/src/embed/app.spec.ts +25 -14
- package/src/embed/app.ts +49 -37
- package/src/embed/base.spec.ts +6 -12
- package/src/embed/base.ts +74 -57
- package/src/embed/embed.spec.ts +5 -6
- package/src/embed/liveboard.spec.ts +56 -37
- package/src/embed/liveboard.ts +67 -65
- package/src/embed/pinboard.spec.ts +26 -29
- package/src/embed/search-bar.tsx +14 -9
- package/src/embed/search.spec.ts +31 -21
- package/src/embed/search.ts +28 -22
- package/src/embed/searchEmbed-basic-auth.spec.ts +22 -28
- package/src/embed/ts-embed.spec.ts +70 -148
- package/src/embed/ts-embed.ts +180 -157
- package/src/errors.ts +3 -6
- package/src/index.ts +23 -7
- package/src/mixpanel-service.spec.ts +1 -3
- package/src/mixpanel-service.ts +13 -1
- package/src/react/index.spec.tsx +11 -20
- package/src/react/index.tsx +40 -71
- package/src/react/util.ts +8 -4
- package/src/test/test-utils.ts +43 -39
- package/src/types.ts +427 -97
- package/src/utils/answerService.spec.ts +3 -5
- package/src/utils/answerService.ts +21 -17
- package/src/utils/authService.spec.ts +26 -41
- package/src/utils/authService.ts +47 -21
- package/src/utils/processData.spec.ts +26 -59
- package/src/utils/processData.ts +36 -14
- package/src/utils/processTrigger.spec.ts +1 -6
- package/src/utils/processTrigger.ts +18 -9
- package/src/utils.spec.ts +8 -12
- package/src/utils.ts +25 -26
package/src/types.ts
CHANGED
|
@@ -10,27 +10,34 @@
|
|
|
10
10
|
/**
|
|
11
11
|
* The authentication mechanism for allowing access to the
|
|
12
12
|
* the embedded app
|
|
13
|
+
*
|
|
14
|
+
* @group Authentication / Init
|
|
13
15
|
*/
|
|
14
16
|
// eslint-disable-next-line no-shadow
|
|
15
17
|
export enum AuthType {
|
|
16
18
|
/**
|
|
17
|
-
* No authentication on the SDK. Passthrough to the embedded App. Alias for
|
|
19
|
+
* No authentication on the SDK. Passthrough to the embedded App. Alias for
|
|
20
|
+
* `Passthrough`.
|
|
18
21
|
*/
|
|
19
22
|
None = 'None',
|
|
20
23
|
/**
|
|
21
|
-
* Passthrough SSO to the embedded App within the iframe. Requires least
|
|
22
|
-
* be supported by all IDPs. This will behave like `None`
|
|
24
|
+
* Passthrough SSO to the embedded App within the iframe. Requires least
|
|
25
|
+
* configuration, but may not be supported by all IDPs. This will behave like `None`
|
|
26
|
+
* if SSO is not configured on ThoughtSpot.
|
|
27
|
+
*
|
|
23
28
|
* @version: SDK: 1.15.0 | ThouhgtSpot: 8.8.0.cl
|
|
24
29
|
*/
|
|
25
30
|
EmbeddedSSO = 'EmbeddedSSO',
|
|
26
31
|
/**
|
|
27
32
|
* SSO using SAML
|
|
33
|
+
*
|
|
28
34
|
* @deprecated Use {@link SAMLRedirect} instead
|
|
29
35
|
* @hidden
|
|
30
36
|
*/
|
|
31
37
|
SSO = 'SSO_SAML',
|
|
32
38
|
/**
|
|
33
39
|
* SSO using SAML
|
|
40
|
+
*
|
|
34
41
|
* @deprecated Use {@link SAMLRedirect} instead
|
|
35
42
|
* @hidden
|
|
36
43
|
*/
|
|
@@ -38,10 +45,21 @@ export enum AuthType {
|
|
|
38
45
|
/**
|
|
39
46
|
* SSO using SAML
|
|
40
47
|
* Will make the host application redirect to the SAML Idp.
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* ```js
|
|
51
|
+
* init({
|
|
52
|
+
* // ...
|
|
53
|
+
* authType: AuthType.SAMLRedirect,
|
|
54
|
+
* authTriggerText: 'Login with SAML',
|
|
55
|
+
* authTriggerContainer: '#embed-container',
|
|
56
|
+
* });
|
|
57
|
+
* ```
|
|
41
58
|
*/
|
|
42
59
|
SAMLRedirect = 'SSO_SAML',
|
|
43
60
|
/**
|
|
44
61
|
* SSO using OIDC
|
|
62
|
+
*
|
|
45
63
|
* @hidden
|
|
46
64
|
* @deprecated Use {@link OIDCRedirect} instead
|
|
47
65
|
*/
|
|
@@ -53,21 +71,35 @@ export enum AuthType {
|
|
|
53
71
|
OIDCRedirect = 'SSO_OIDC',
|
|
54
72
|
/**
|
|
55
73
|
* Trusted authentication server
|
|
74
|
+
*
|
|
56
75
|
* @hidden
|
|
57
76
|
* @deprecated Use {@link TrustedAuth} instead
|
|
58
77
|
*/
|
|
59
78
|
AuthServer = 'AuthServer',
|
|
60
79
|
/**
|
|
61
80
|
* Trusted authentication server, Use your own authentication server
|
|
62
|
-
* which returns a bearer token, generated using the secret_key obtained
|
|
63
|
-
* ThoughtSpot.
|
|
81
|
+
* which returns a bearer token, generated using the secret_key obtained
|
|
82
|
+
* from ThoughtSpot.
|
|
83
|
+
*
|
|
84
|
+
* @example
|
|
85
|
+
* ```js
|
|
86
|
+
* init({
|
|
87
|
+
* // ...
|
|
88
|
+
* authType: AuthType.TrustedAuthToken,
|
|
89
|
+
* getAuthToken: () => {
|
|
90
|
+
* return fetch('https://my-backend.app/ts-token')
|
|
91
|
+
* .then((response) => response.json())
|
|
92
|
+
* .then((data) => data.token);
|
|
93
|
+
* }
|
|
94
|
+
* ```
|
|
64
95
|
*/
|
|
65
96
|
TrustedAuthToken = 'AuthServer',
|
|
66
97
|
/**
|
|
67
|
-
* Trusted authentication server Cookieless, Use you own authentication
|
|
68
|
-
* which returns a bearer token, generated using the secret_key
|
|
69
|
-
* ThoughtSpot. This uses a cookieless authentication
|
|
70
|
-
* to by pass third-party cookie-blocking restriction
|
|
98
|
+
* Trusted authentication server Cookieless, Use you own authentication
|
|
99
|
+
* server which returns a bearer token, generated using the secret_key
|
|
100
|
+
* obtained from ThoughtSpot. This uses a cookieless authentication
|
|
101
|
+
* approach, recommended to by pass third-party cookie-blocking restriction
|
|
102
|
+
* implemented by some browsers
|
|
71
103
|
*/
|
|
72
104
|
TrustedAuthTokenCookieless = 'AuthServerCookieless',
|
|
73
105
|
/**
|
|
@@ -81,7 +113,10 @@ export enum AuthType {
|
|
|
81
113
|
|
|
82
114
|
export type DOMSelector = string | HTMLElement;
|
|
83
115
|
|
|
84
|
-
|
|
116
|
+
/**
|
|
117
|
+
* inline customCSS within the {@link CustomisationsInterface}.
|
|
118
|
+
*/
|
|
119
|
+
export interface customCssInterface {
|
|
85
120
|
variables?: {
|
|
86
121
|
[variableName: string]: string;
|
|
87
122
|
};
|
|
@@ -92,10 +127,39 @@ interface customCssInterface {
|
|
|
92
127
|
};
|
|
93
128
|
};
|
|
94
129
|
}
|
|
95
|
-
|
|
130
|
+
/**
|
|
131
|
+
* Styles within the {@link CustomisationsInterface}.
|
|
132
|
+
*/
|
|
133
|
+
export interface CustomStyles {
|
|
96
134
|
customCSSUrl?: string;
|
|
97
135
|
customCSS?: customCssInterface;
|
|
98
136
|
}
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Configuration to define the customization on the Embedded
|
|
140
|
+
* Thoughtspot components.
|
|
141
|
+
*
|
|
142
|
+
* @example
|
|
143
|
+
* ```js
|
|
144
|
+
* init({
|
|
145
|
+
* // ...
|
|
146
|
+
* customizations: {
|
|
147
|
+
* style: {
|
|
148
|
+
* customCSS: {
|
|
149
|
+
* variables: {},
|
|
150
|
+
* rules_UNSTABLE: {}
|
|
151
|
+
* }
|
|
152
|
+
* },
|
|
153
|
+
* content: {
|
|
154
|
+
* strings: {
|
|
155
|
+
* 'LIVEBOARDS': 'Dashboards'
|
|
156
|
+
* }
|
|
157
|
+
* },
|
|
158
|
+
* iconSpriteUrl: 'https://my-custom-icon-sprite.svg'
|
|
159
|
+
* }
|
|
160
|
+
* })
|
|
161
|
+
* ```
|
|
162
|
+
*/
|
|
99
163
|
export interface CustomisationsInterface {
|
|
100
164
|
style?: CustomStyles;
|
|
101
165
|
content?: {
|
|
@@ -110,6 +174,8 @@ export interface CustomisationsInterface {
|
|
|
110
174
|
* It includes the ThoughtSpot hostname or IP address,
|
|
111
175
|
* the type of authentication, and the authentication endpoint
|
|
112
176
|
* if a trusted authentication server is used.
|
|
177
|
+
*
|
|
178
|
+
* @group Authentication / Init
|
|
113
179
|
*/
|
|
114
180
|
export interface EmbedConfig {
|
|
115
181
|
/**
|
|
@@ -141,8 +207,8 @@ export interface EmbedConfig {
|
|
|
141
207
|
*/
|
|
142
208
|
getAuthToken?: () => Promise<string>;
|
|
143
209
|
/**
|
|
144
|
-
* [AuthServer / Basic] The user name of the ThoughtSpot user. This
|
|
145
|
-
* required for trusted authentication.
|
|
210
|
+
* [AuthServer / Basic] The user name of the ThoughtSpot user. This
|
|
211
|
+
* attribute is required for trusted authentication.
|
|
146
212
|
*/
|
|
147
213
|
username?: string;
|
|
148
214
|
|
|
@@ -155,8 +221,9 @@ export interface EmbedConfig {
|
|
|
155
221
|
password?: string;
|
|
156
222
|
|
|
157
223
|
/**
|
|
158
|
-
* [SSO] For SSO Authentication, if `noRedirect` is set to true, it will
|
|
159
|
-
* flow in a popup, instead of redirecting browser in
|
|
224
|
+
* [SSO] For SSO Authentication, if `noRedirect` is set to true, it will
|
|
225
|
+
* open the SAML auth flow in a popup, instead of redirecting browser in
|
|
226
|
+
* place.
|
|
160
227
|
*
|
|
161
228
|
* @default false
|
|
162
229
|
* @deprecated
|
|
@@ -164,8 +231,8 @@ export interface EmbedConfig {
|
|
|
164
231
|
noRedirect?: boolean;
|
|
165
232
|
|
|
166
233
|
/**
|
|
167
|
-
* [SSO] For SSO Authentication, if `inPopup` is set to true, it will open
|
|
168
|
-
* flow in a popup, instead of redirecting browser in place.
|
|
234
|
+
* [SSO] For SSO Authentication, if `inPopup` is set to true, it will open
|
|
235
|
+
* the SAML auth flow in a popup, instead of redirecting browser in place.
|
|
169
236
|
*
|
|
170
237
|
* @default false
|
|
171
238
|
* @version SDK: 1.18.0
|
|
@@ -178,6 +245,7 @@ export interface EmbedConfig {
|
|
|
178
245
|
* terminated.
|
|
179
246
|
*
|
|
180
247
|
* Eg: "/dashboard", "#/foo" [Do not include the host]
|
|
248
|
+
*
|
|
181
249
|
* @version SDK: 1.10.2 | 8.2.0.cl, 8.4.1-sw
|
|
182
250
|
*/
|
|
183
251
|
redirectPath?: string;
|
|
@@ -189,28 +257,34 @@ export interface EmbedConfig {
|
|
|
189
257
|
* Should we encode URL Query Params using base64 encoding which thoughtspot
|
|
190
258
|
* will generate for embedding. This provides additional security to
|
|
191
259
|
* thoughtspot clusters against Cross site scripting attacks.
|
|
260
|
+
*
|
|
192
261
|
* @default false
|
|
193
262
|
*/
|
|
194
263
|
shouldEncodeUrlQueryParams?: boolean;
|
|
195
264
|
|
|
196
265
|
/**
|
|
197
|
-
* Suppress cookie access alert when third party cookies are blocked by the
|
|
198
|
-
* Third party cookie blocking is the default behaviour on
|
|
199
|
-
* If you set this to `true`, you are
|
|
266
|
+
* Suppress cookie access alert when third party cookies are blocked by the
|
|
267
|
+
* user's browser. Third party cookie blocking is the default behaviour on
|
|
268
|
+
* Safari and opt-in for Firefox/Chrome. If you set this to `true`, you are
|
|
269
|
+
* encouraged to handle `noCookieAccess` event, to show your own treatment
|
|
200
270
|
* in this case.
|
|
271
|
+
*
|
|
201
272
|
* @default false
|
|
202
273
|
*/
|
|
203
274
|
suppressNoCookieAccessAlert?: boolean;
|
|
204
275
|
|
|
205
276
|
/**
|
|
206
277
|
* Re-login when session expires with the previous login options
|
|
278
|
+
*
|
|
207
279
|
* @default false
|
|
208
280
|
*/
|
|
209
281
|
autoLogin?: boolean;
|
|
210
282
|
|
|
211
283
|
/**
|
|
212
284
|
* Disable redirection to the login page when the embedded session expires
|
|
213
|
-
* This flag is typically used alongside the combination of auth modes such as {@link
|
|
285
|
+
* This flag is typically used alongside the combination of auth modes such as {@link
|
|
286
|
+
* AuthType.AuthServer} and auto login behavior {@link EmbedConfig.autoLogin}
|
|
287
|
+
*
|
|
214
288
|
* @version SDK: 1.9.3 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw
|
|
215
289
|
* @default false
|
|
216
290
|
*/
|
|
@@ -218,20 +292,23 @@ export interface EmbedConfig {
|
|
|
218
292
|
|
|
219
293
|
/**
|
|
220
294
|
* This message is displayed on the embed view when the login fails.
|
|
295
|
+
*
|
|
221
296
|
* @version SDK: 1.10.1 | ThoughtSpot: 8.2.0.cl, 8.4.1-sw
|
|
222
297
|
*/
|
|
223
298
|
loginFailedMessage?: string;
|
|
224
299
|
|
|
225
300
|
/**
|
|
226
301
|
* Calls the prefetch method internally when set to true
|
|
302
|
+
*
|
|
227
303
|
* @default false
|
|
228
304
|
*/
|
|
229
305
|
callPrefetch?: boolean;
|
|
230
306
|
|
|
231
307
|
/**
|
|
232
308
|
* When there are multiple embeds, queue the render of embed to start
|
|
233
|
-
* after the previous embed's render is complete. This helps in the load
|
|
234
|
-
* by decreasing the load on the browser.
|
|
309
|
+
* after the previous embed's render is complete. This helps in the load
|
|
310
|
+
* performance by decreasing the load on the browser.
|
|
311
|
+
*
|
|
235
312
|
* @Version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
|
|
236
313
|
* @default false
|
|
237
314
|
*/
|
|
@@ -240,15 +317,19 @@ export interface EmbedConfig {
|
|
|
240
317
|
/**
|
|
241
318
|
* Dynamic CSS Url to be injected in the loaded application.
|
|
242
319
|
* You would also need to set `style-src` in the CSP settings.
|
|
320
|
+
*
|
|
243
321
|
* @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1-sw
|
|
244
322
|
* @default ''
|
|
245
323
|
*/
|
|
246
324
|
customCssUrl?: string;
|
|
247
325
|
/**
|
|
248
|
-
* [AuthServer|Basic] Detect if 3rd party cookies are enabled by doing an
|
|
249
|
-
* and should be avoided. Listen to the
|
|
326
|
+
* [AuthServer|Basic] Detect if 3rd party cookies are enabled by doing an
|
|
327
|
+
* additional call. This is slower and should be avoided. Listen to the
|
|
328
|
+
* NO_COOKIE_ACCESS event to handle the situation.
|
|
329
|
+
*
|
|
330
|
+
* This is slightly slower than letting the browser handle the cookie check, as it
|
|
331
|
+
* involves an extra network call.
|
|
250
332
|
*
|
|
251
|
-
* This is slightly slower than letting the browser handle the cookie check, as it involves an extra network call.
|
|
252
333
|
* @version SDK: 1.10.4 | ThoughtSpot: 8.2.0.cl, 8.4.1-sw
|
|
253
334
|
*/
|
|
254
335
|
detectCookieAccessSlow?: boolean;
|
|
@@ -275,16 +356,19 @@ export interface EmbedConfig {
|
|
|
275
356
|
/**
|
|
276
357
|
* Text to show in the button which triggers the popup auth flow.
|
|
277
358
|
* Default: "Authorize".
|
|
359
|
+
*
|
|
278
360
|
* @version SDK: 1.17.0 | ThoughtSpot: *
|
|
279
361
|
*/
|
|
280
362
|
authTriggerText?: string;
|
|
281
363
|
}
|
|
282
364
|
|
|
283
365
|
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
284
|
-
export interface LayoutConfig {}
|
|
366
|
+
export interface LayoutConfig { }
|
|
285
367
|
|
|
286
368
|
/**
|
|
287
369
|
* Embedded iFrame configuration
|
|
370
|
+
*
|
|
371
|
+
* @group Embed components
|
|
288
372
|
*/
|
|
289
373
|
export interface FrameParams {
|
|
290
374
|
/**
|
|
@@ -295,6 +379,12 @@ export interface FrameParams {
|
|
|
295
379
|
* The height of the iFrame (unit is pixels if numeric).
|
|
296
380
|
*/
|
|
297
381
|
height?: number | string;
|
|
382
|
+
/**
|
|
383
|
+
* Set to 'lazy' to enable lazy loading of the embedded TS frame.
|
|
384
|
+
* This will defer loading of the frame until it comes into the
|
|
385
|
+
* viewport. This is useful for performance optimization.
|
|
386
|
+
*/
|
|
387
|
+
loading?: 'lazy' | 'eager' | 'auto';
|
|
298
388
|
/**
|
|
299
389
|
* This parameters will be passed on the iframe
|
|
300
390
|
* as is.
|
|
@@ -311,7 +401,8 @@ export interface ViewConfig {
|
|
|
311
401
|
*/
|
|
312
402
|
layoutConfig?: LayoutConfig;
|
|
313
403
|
/**
|
|
314
|
-
* The <b>width</b> and <b>height</b> dimensions to render an embedded
|
|
404
|
+
* The <b>width</b> and <b>height</b> dimensions to render an embedded
|
|
405
|
+
* object inside your app. Specify the values in pixels or percentage.
|
|
315
406
|
*/
|
|
316
407
|
frameParams?: FrameParams;
|
|
317
408
|
/**
|
|
@@ -340,11 +431,13 @@ export interface ViewConfig {
|
|
|
340
431
|
/**
|
|
341
432
|
* The list of actions to display from the primary menu, more menu
|
|
342
433
|
* (...), and the contextual menu.
|
|
434
|
+
*
|
|
343
435
|
* @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1-sw
|
|
344
436
|
*/
|
|
345
437
|
visibleActions?: Action[];
|
|
346
438
|
/**
|
|
347
439
|
* Show alert messages and toast messages in the embedded view.
|
|
440
|
+
*
|
|
348
441
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
349
442
|
*/
|
|
350
443
|
showAlerts?: boolean;
|
|
@@ -355,6 +448,7 @@ export interface ViewConfig {
|
|
|
355
448
|
runtimeFilters?: RuntimeFilter[];
|
|
356
449
|
/**
|
|
357
450
|
* The locale/language to use for the embedded view.
|
|
451
|
+
*
|
|
358
452
|
* @version SDK: 1.9.4 | ThoughtSpot 8.1.0.cl, 8.4.1-sw
|
|
359
453
|
*/
|
|
360
454
|
locale?: string;
|
|
@@ -365,40 +459,55 @@ export interface ViewConfig {
|
|
|
365
459
|
* Warning: This option is for advanced use only and is used internally
|
|
366
460
|
* to control embed behavior in non-regular ways. We do not publish the
|
|
367
461
|
* list of supported keys and values associated with each.
|
|
462
|
+
*
|
|
368
463
|
* @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw
|
|
369
464
|
*/
|
|
370
465
|
additionalFlags?: { [key: string]: string | number | boolean };
|
|
371
466
|
/**
|
|
372
467
|
* Dynamic CSSUrl and customCSS to be injected in the loaded application.
|
|
373
468
|
* You would also need to set `style-src` in the CSP settings.
|
|
469
|
+
*
|
|
374
470
|
* @version SDK: 1.17.2 | ThoughtSpot: 8.4.1-sw, 8.4.0.cl
|
|
375
471
|
* @default ''
|
|
376
472
|
*/
|
|
377
473
|
customizations?: CustomisationsInterface;
|
|
378
474
|
/**
|
|
379
|
-
* Insert as a sibling of the target container, instead of appending to a
|
|
475
|
+
* Insert as a sibling of the target container, instead of appending to a
|
|
476
|
+
* child inside it.
|
|
380
477
|
*/
|
|
381
478
|
insertAsSibling?: boolean;
|
|
382
479
|
/**
|
|
383
480
|
* flag to set ContextMenu Trigger to either left or right click.
|
|
481
|
+
*
|
|
384
482
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
|
|
385
483
|
*/
|
|
386
484
|
contextMenuTrigger?: ContextMenuTriggerOptions;
|
|
387
485
|
/**
|
|
388
486
|
* flag to override openNew tab context menu link
|
|
487
|
+
*
|
|
389
488
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
|
|
390
489
|
*/
|
|
391
490
|
linkOverride?: boolean;
|
|
392
491
|
/**
|
|
393
492
|
* flag to enable insert into slides action
|
|
493
|
+
*
|
|
394
494
|
* @hidden
|
|
395
495
|
* @private
|
|
396
496
|
*/
|
|
397
497
|
insertInToSlide?: boolean;
|
|
498
|
+
/**
|
|
499
|
+
* Use a pre-rendered iframe from a pool of pre-rendered iframes
|
|
500
|
+
* if available and matches the configuration.
|
|
501
|
+
*
|
|
502
|
+
* See [docs]() on how to create a prerender pool.
|
|
503
|
+
*/
|
|
504
|
+
usePrerenderedIfAvailable?: boolean;
|
|
398
505
|
}
|
|
399
506
|
|
|
400
507
|
/**
|
|
401
508
|
* MessagePayload: Embed event payload: message type, data and status (start/end)
|
|
509
|
+
*
|
|
510
|
+
* @group Events
|
|
402
511
|
*/
|
|
403
512
|
export type MessagePayload = {
|
|
404
513
|
/* type: message type eg: 'save' */
|
|
@@ -409,26 +518,40 @@ export type MessagePayload = {
|
|
|
409
518
|
status?: string;
|
|
410
519
|
};
|
|
411
520
|
/**
|
|
412
|
-
* MessageOptions: By Providing options, getting specific event start / end based on
|
|
521
|
+
* MessageOptions: By Providing options, getting specific event start / end based on
|
|
522
|
+
* option
|
|
523
|
+
*
|
|
524
|
+
* @group Events
|
|
413
525
|
*/
|
|
414
526
|
export type MessageOptions = {
|
|
415
|
-
|
|
527
|
+
/**
|
|
528
|
+
* A boolean value indicating that start status events of this type
|
|
529
|
+
* will be dispatched
|
|
530
|
+
*/
|
|
416
531
|
start?: boolean;
|
|
417
532
|
};
|
|
418
533
|
/**
|
|
419
534
|
* MessageCallback: Embed event message callback
|
|
535
|
+
*
|
|
536
|
+
* @group Events
|
|
420
537
|
*/
|
|
421
538
|
export type MessageCallback = (
|
|
422
539
|
/* payload: Message payload contain type, data and status */
|
|
423
540
|
payload: MessagePayload,
|
|
424
|
-
|
|
541
|
+
/**
|
|
542
|
+
* responder: Message callback function triggered when embed event
|
|
543
|
+
* initiated
|
|
544
|
+
*/
|
|
425
545
|
responder?: (data: any) => void,
|
|
426
546
|
) => void;
|
|
427
547
|
/**
|
|
428
548
|
* MessageCallbackObj: contains message options & callback function
|
|
429
549
|
*/
|
|
430
550
|
export type MessageCallbackObj = {
|
|
431
|
-
|
|
551
|
+
/**
|
|
552
|
+
* options: It contains start, A boolean value indicating that start
|
|
553
|
+
* status events of this type will be dispatched
|
|
554
|
+
*/
|
|
432
555
|
/* callback: Embed event message callback */
|
|
433
556
|
options: MessageOptions;
|
|
434
557
|
callback: MessageCallback;
|
|
@@ -518,38 +641,49 @@ export interface RuntimeFilter {
|
|
|
518
641
|
operator: RuntimeFilterOp;
|
|
519
642
|
/**
|
|
520
643
|
* The list of operands. Some operators like EQ, LE accept
|
|
521
|
-
* a single operand, whereas other operators like BW and IN accept multiple
|
|
644
|
+
* a single operand, whereas other operators like BW and IN accept multiple
|
|
645
|
+
* operands.
|
|
522
646
|
*/
|
|
523
647
|
values: (number | boolean | string)[];
|
|
524
648
|
}
|
|
525
649
|
|
|
526
650
|
/**
|
|
527
651
|
* Event types emitted by the embedded ThoughtSpot application.
|
|
652
|
+
*
|
|
653
|
+
* To add an event listener use the corresponding
|
|
654
|
+
* {@link LiveboardEmbed.on} or {@link AppEmbed.on} or {@link SearchEmbed.on} method.
|
|
655
|
+
*
|
|
656
|
+
* @group Events
|
|
528
657
|
*/
|
|
529
658
|
// eslint-disable-next-line no-shadow
|
|
530
659
|
export enum EmbedEvent {
|
|
531
660
|
/**
|
|
532
661
|
* Rendering has initialized.
|
|
533
|
-
*
|
|
662
|
+
*
|
|
663
|
+
* @returns timestamp - The timestamp when the event was generated.
|
|
534
664
|
*/
|
|
535
665
|
Init = 'init',
|
|
536
666
|
/**
|
|
537
667
|
* Authentication has either succeeded or failed.
|
|
538
|
-
*
|
|
668
|
+
*
|
|
669
|
+
* @returns isLoggedIn - A Boolean specifying whether authentication was successful.
|
|
539
670
|
*/
|
|
540
671
|
AuthInit = 'authInit',
|
|
541
672
|
/**
|
|
542
673
|
* The embed object container has loaded.
|
|
543
|
-
*
|
|
674
|
+
*
|
|
675
|
+
* @returns timestamp - The timestamp when the event was generated.
|
|
544
676
|
*/
|
|
545
677
|
Load = 'load',
|
|
546
678
|
/**
|
|
547
679
|
* Data pertaining to answer or Liveboard is received
|
|
548
|
-
*
|
|
680
|
+
*
|
|
681
|
+
* @returns data - The answer or Liveboard data
|
|
549
682
|
*/
|
|
550
683
|
Data = 'data',
|
|
551
684
|
/**
|
|
552
685
|
* Search/answer/Liveboard filters have been applied/updated
|
|
686
|
+
*
|
|
553
687
|
* @hidden
|
|
554
688
|
*/
|
|
555
689
|
FiltersChanged = 'filtersChanged',
|
|
@@ -559,48 +693,56 @@ export enum EmbedEvent {
|
|
|
559
693
|
QueryChanged = 'queryChanged',
|
|
560
694
|
/**
|
|
561
695
|
* A drill down operation has been performed.
|
|
562
|
-
*
|
|
563
|
-
* @
|
|
564
|
-
* @
|
|
696
|
+
*
|
|
697
|
+
* @returns additionalFilters - Any additional filters applied
|
|
698
|
+
* @returns drillDownColumns - The columns on which drill down was performed
|
|
699
|
+
* @returns nonFilteredColumns - The columns that were not filtered
|
|
565
700
|
*/
|
|
566
701
|
Drilldown = 'drillDown',
|
|
567
702
|
/**
|
|
568
703
|
* One or more data sources have been selected.
|
|
569
|
-
*
|
|
704
|
+
*
|
|
705
|
+
* @returns dataSourceIds - the list of data sources
|
|
570
706
|
*/
|
|
571
707
|
DataSourceSelected = 'dataSourceSelected',
|
|
572
708
|
/**
|
|
573
709
|
* One or more data columns have been selected.
|
|
574
|
-
*
|
|
710
|
+
*
|
|
711
|
+
* @returns columnIds - the list of columns
|
|
575
712
|
* @version SDK: 1.10.0 | ThoughtSpot: 8.2.0.cl, 8.4.1-sw
|
|
576
713
|
*/
|
|
577
714
|
AddRemoveColumns = 'addRemoveColumns',
|
|
578
715
|
/**
|
|
579
716
|
* A custom action has been triggered
|
|
580
|
-
*
|
|
581
|
-
* @
|
|
717
|
+
*
|
|
718
|
+
* @returns actionId - The id of the custom action
|
|
719
|
+
* @returns data - The answer or Liveboard data
|
|
582
720
|
*/
|
|
583
721
|
CustomAction = 'customAction',
|
|
584
722
|
/**
|
|
585
723
|
* A double click has been triggered on table/chart
|
|
586
|
-
*
|
|
724
|
+
*
|
|
725
|
+
* @returns ContextMenuInputPoints - data point that is double clicked
|
|
587
726
|
* @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
|
|
588
727
|
*/
|
|
589
728
|
VizPointDoubleClick = 'vizPointDoubleClick',
|
|
590
729
|
/**
|
|
591
730
|
* A click has been triggered on table/chart
|
|
592
|
-
*
|
|
731
|
+
*
|
|
732
|
+
* @returns ContextMenuInputPoints - data point that is clicked
|
|
593
733
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
594
734
|
*/
|
|
595
735
|
VizPointClick = 'vizPointClick',
|
|
596
736
|
/**
|
|
597
737
|
* An error has occurred.
|
|
598
|
-
*
|
|
738
|
+
*
|
|
739
|
+
* @returns error - An error object or message
|
|
599
740
|
*/
|
|
600
741
|
Error = 'Error',
|
|
601
742
|
/**
|
|
602
743
|
* The embedded object has sent an alert
|
|
603
|
-
*
|
|
744
|
+
*
|
|
745
|
+
* @returns alert - An alert object
|
|
604
746
|
*/
|
|
605
747
|
Alert = 'alert',
|
|
606
748
|
/**
|
|
@@ -609,29 +751,34 @@ export enum EmbedEvent {
|
|
|
609
751
|
AuthExpire = 'ThoughtspotAuthExpired',
|
|
610
752
|
/**
|
|
611
753
|
* ThoughtSpot failed to validate the auth session.
|
|
754
|
+
*
|
|
612
755
|
* @hidden
|
|
613
756
|
*/
|
|
614
757
|
AuthFailure = 'ThoughtspotAuthFailure',
|
|
615
758
|
/**
|
|
616
759
|
* ThoughtSpot failed to validate the auth session.
|
|
760
|
+
*
|
|
617
761
|
* @hidden
|
|
618
762
|
*/
|
|
619
763
|
AuthLogout = 'ThoughtspotAuthLogout',
|
|
620
764
|
/**
|
|
621
765
|
* The height of the embedded Liveboard or visualization has been computed.
|
|
622
|
-
*
|
|
766
|
+
*
|
|
767
|
+
* @returns data - The height of the embedded Liveboard or visualization
|
|
623
768
|
* @hidden
|
|
624
769
|
*/
|
|
625
770
|
EmbedHeight = 'EMBED_HEIGHT',
|
|
626
771
|
/**
|
|
627
772
|
* The center of visible iframe viewport is calculated.
|
|
628
|
-
*
|
|
773
|
+
*
|
|
774
|
+
* @returns data - The center of the visible Iframe viewport.
|
|
629
775
|
* @hidden
|
|
630
776
|
*/
|
|
631
777
|
EmbedIframeCenter = 'EmbedIframeCenter',
|
|
632
778
|
/**
|
|
633
779
|
* Emitted when the "Get Data" button in Search Bar embed
|
|
634
780
|
* is clicked.
|
|
781
|
+
*
|
|
635
782
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.0-sw
|
|
636
783
|
*/
|
|
637
784
|
GetDataClick = 'getDataClick',
|
|
@@ -641,6 +788,7 @@ export enum EmbedEvent {
|
|
|
641
788
|
RouteChange = 'ROUTE_CHANGE',
|
|
642
789
|
/**
|
|
643
790
|
* The v1 event type for Data
|
|
791
|
+
*
|
|
644
792
|
* @hidden
|
|
645
793
|
*/
|
|
646
794
|
V1Data = 'exportVizDataToParent',
|
|
@@ -653,17 +801,20 @@ export enum EmbedEvent {
|
|
|
653
801
|
NoCookieAccess = 'noCookieAccess',
|
|
654
802
|
/**
|
|
655
803
|
* Emitted when SAML is complete
|
|
804
|
+
*
|
|
656
805
|
* @private
|
|
657
806
|
* @hidden
|
|
658
807
|
*/
|
|
659
808
|
SAMLComplete = 'samlComplete',
|
|
660
809
|
/**
|
|
661
810
|
* Emitted when any modal is opened in the app
|
|
811
|
+
*
|
|
662
812
|
* @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1-sw
|
|
663
813
|
*/
|
|
664
814
|
DialogOpen = 'dialog-open',
|
|
665
815
|
/**
|
|
666
816
|
* Emitted when any modal is closed in the app
|
|
817
|
+
*
|
|
667
818
|
* @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1-sw
|
|
668
819
|
*/
|
|
669
820
|
DialogClose = 'dialog-close',
|
|
@@ -671,180 +822,223 @@ export enum EmbedEvent {
|
|
|
671
822
|
* Emitted when the Liveboard shell loads.
|
|
672
823
|
* You can use this event as a hook to trigger
|
|
673
824
|
* other events on the rendered Liveboard.
|
|
825
|
+
*
|
|
674
826
|
* @version SDK: 1.9.1 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw
|
|
675
827
|
*/
|
|
676
828
|
LiveboardRendered = 'PinboardRendered',
|
|
677
829
|
/**
|
|
678
830
|
* This can be used to register an event listener which
|
|
679
831
|
* is triggered on all events.
|
|
832
|
+
*
|
|
680
833
|
* @Version SDK: 1.10.0 | ThoughtSpot: 8.2.0.cl, 8.4.1-sw
|
|
681
834
|
*/
|
|
682
835
|
ALL = '*',
|
|
683
836
|
/**
|
|
684
837
|
* Emitted when answer is saved in the app
|
|
838
|
+
*
|
|
685
839
|
* @Version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
686
840
|
*/
|
|
687
841
|
Save = 'save',
|
|
688
842
|
/**
|
|
689
843
|
* Emitted when the download action is triggered on an answer
|
|
844
|
+
*
|
|
690
845
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
691
846
|
*/
|
|
692
847
|
Download = 'download',
|
|
693
848
|
/**
|
|
694
849
|
* Emitted when the Download as PDF action is triggered on an answer
|
|
850
|
+
*
|
|
695
851
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
696
852
|
*/
|
|
697
853
|
DownloadAsPdf = 'downloadAsPdf',
|
|
698
854
|
/**
|
|
699
855
|
* Emitted when the Download as CSV action is triggered on an answer
|
|
856
|
+
*
|
|
700
857
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
701
858
|
*/
|
|
702
859
|
DownloadAsCsv = 'downloadAsCsv',
|
|
703
860
|
/**
|
|
704
861
|
* Emitted when the Download as XLSX action is triggered on an answer
|
|
862
|
+
*
|
|
705
863
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
706
864
|
*/
|
|
707
865
|
DownloadAsXlsx = 'downloadAsXlsx',
|
|
708
866
|
/**
|
|
709
867
|
* Emitted when an answer is deleted in the app
|
|
868
|
+
*
|
|
710
869
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
711
870
|
*/
|
|
712
871
|
AnswerDelete = 'answerDelete',
|
|
713
872
|
/**
|
|
714
873
|
* Emitted when an answer is pinned to a Liveboard
|
|
874
|
+
*
|
|
715
875
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
716
876
|
*/
|
|
717
877
|
Pin = 'pin',
|
|
718
878
|
/**
|
|
719
879
|
* Emitted when SpotIQ analysis is triggered
|
|
880
|
+
*
|
|
720
881
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
721
882
|
*/
|
|
722
883
|
SpotIQAnalyze = 'spotIQAnalyze',
|
|
723
884
|
/**
|
|
724
885
|
* Emitted when a user shares an object with another user or group
|
|
886
|
+
*
|
|
725
887
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
726
888
|
*/
|
|
727
889
|
Share = 'share',
|
|
728
890
|
/**
|
|
729
|
-
* Emitted when a user clicks the Include action to include a specific value or data
|
|
891
|
+
* Emitted when a user clicks the Include action to include a specific value or data
|
|
892
|
+
* on a chart or table
|
|
893
|
+
*
|
|
730
894
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
731
895
|
*/
|
|
732
896
|
DrillInclude = 'context-menu-item-include',
|
|
733
897
|
/**
|
|
734
|
-
* Emitted when a user clicks the Exclude action to exclude a specific value or data
|
|
898
|
+
* Emitted when a user clicks the Exclude action to exclude a specific value or data
|
|
899
|
+
* on a chart or table
|
|
900
|
+
*
|
|
735
901
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
736
902
|
*/
|
|
737
903
|
DrillExclude = 'context-menu-item-exclude',
|
|
738
904
|
/**
|
|
739
905
|
* Emitted when copied column value on the app
|
|
906
|
+
*
|
|
740
907
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
741
908
|
*/
|
|
742
909
|
CopyToClipboard = 'context-menu-item-copy-to-clipboard',
|
|
743
910
|
/**
|
|
744
911
|
* Emitted when a user clicks the Update TML action
|
|
912
|
+
*
|
|
745
913
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
746
914
|
*/
|
|
747
915
|
UpdateTML = 'updateTSL',
|
|
748
916
|
/**
|
|
749
917
|
* Emitted when a user clicks the Edit TML action
|
|
918
|
+
*
|
|
750
919
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
751
920
|
*/
|
|
752
921
|
EditTML = 'editTSL',
|
|
753
922
|
/**
|
|
754
923
|
* Emitted when ExportTML trigger in answer on the app
|
|
924
|
+
*
|
|
755
925
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
756
926
|
*/
|
|
757
927
|
ExportTML = 'exportTSL',
|
|
758
928
|
/**
|
|
759
929
|
* Emitted when an answer is saved as a view
|
|
930
|
+
*
|
|
760
931
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
761
932
|
*/
|
|
762
933
|
SaveAsView = 'saveAsView',
|
|
763
934
|
/**
|
|
764
935
|
* Emitted when copy of existing answer on the app
|
|
936
|
+
*
|
|
765
937
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
766
938
|
*/
|
|
767
939
|
CopyAEdit = 'copyAEdit',
|
|
768
940
|
/**
|
|
769
941
|
* Emitted when a user clicks Show underlying data on an answe
|
|
942
|
+
*
|
|
770
943
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
771
944
|
*/
|
|
772
945
|
ShowUnderlyingData = 'showUnderlyingData',
|
|
773
946
|
/**
|
|
774
947
|
* Emitted when an answer is switched to a chart or table view
|
|
948
|
+
*
|
|
775
949
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
776
950
|
*/
|
|
777
951
|
AnswerChartSwitcher = 'answerChartSwitcher',
|
|
778
952
|
/**
|
|
779
953
|
* Internal event to communicate the initial settings back to the TS APP
|
|
954
|
+
*
|
|
780
955
|
* @hidden
|
|
781
956
|
*/
|
|
782
957
|
APP_INIT = 'appInit',
|
|
783
958
|
/**
|
|
784
959
|
* Emitted when a user clicks Show Liveboard details on a Liveboard
|
|
960
|
+
*
|
|
785
961
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
786
962
|
*/
|
|
787
963
|
LiveboardInfo = 'pinboardInfo',
|
|
788
964
|
/**
|
|
789
965
|
* Emitted when a user clicks on the Favorite icon on a Liveboard
|
|
966
|
+
*
|
|
790
967
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
791
968
|
*/
|
|
792
969
|
AddToFavorites = 'addToFavorites',
|
|
793
970
|
/**
|
|
794
971
|
* Emitted when a user clicks Schedule on a Liveboard
|
|
972
|
+
*
|
|
795
973
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
796
974
|
*/
|
|
797
975
|
Schedule = 'subscription',
|
|
798
976
|
/**
|
|
799
977
|
* Emitted when a user clicks Edit on a Liveboard or visualization
|
|
978
|
+
*
|
|
800
979
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
801
980
|
*/
|
|
802
981
|
Edit = 'edit',
|
|
803
982
|
/**
|
|
804
983
|
* Emitted when a user clicks Make a copy on a Liveboard
|
|
984
|
+
*
|
|
805
985
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
806
986
|
*/
|
|
807
987
|
MakeACopy = 'makeACopy',
|
|
808
988
|
/**
|
|
809
989
|
* Emitted when a user clicks Present on a Liveboard or visualization
|
|
990
|
+
*
|
|
810
991
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
811
992
|
*/
|
|
812
993
|
Present = 'present',
|
|
813
994
|
/**
|
|
814
995
|
* Emitted when a user clicks Delete on a Liveboard
|
|
996
|
+
*
|
|
815
997
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
816
998
|
*/
|
|
817
999
|
Delete = 'delete',
|
|
818
1000
|
/**
|
|
819
1001
|
* Emitted when a user clicks Manage schedules on a Liveboard
|
|
1002
|
+
*
|
|
820
1003
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
821
1004
|
*/
|
|
822
1005
|
SchedulesList = 'schedule-list',
|
|
823
1006
|
/**
|
|
824
1007
|
* Emitted when a user clicks Cancel in edit mode on a Liveboard
|
|
1008
|
+
*
|
|
825
1009
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
826
1010
|
*/
|
|
827
1011
|
Cancel = 'cancel',
|
|
828
1012
|
/**
|
|
829
1013
|
* Emitted when a user clicks Explore on a visualization
|
|
1014
|
+
*
|
|
830
1015
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
831
1016
|
*/
|
|
832
1017
|
Explore = 'explore',
|
|
833
1018
|
/**
|
|
834
1019
|
* Emitted when a user clicks Copy link action on a visualization
|
|
1020
|
+
*
|
|
835
1021
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
836
1022
|
*/
|
|
837
1023
|
CopyLink = 'embedDocument',
|
|
838
1024
|
/**
|
|
839
1025
|
* Emitted when a user interacts with cross filters on a visualization or liveboard
|
|
1026
|
+
*
|
|
840
1027
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
|
|
841
1028
|
*/
|
|
842
1029
|
CrossFilterChanged = 'cross-filter-changed',
|
|
843
1030
|
/**
|
|
844
1031
|
* Emitted when a user right clicks on chart or table
|
|
1032
|
+
*
|
|
845
1033
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
|
|
846
1034
|
*/
|
|
847
1035
|
VizPointRightClick = 'vizPointRightClick',
|
|
1036
|
+
/**
|
|
1037
|
+
* Emitted when a user clicks on Insert to slide on a visualization
|
|
1038
|
+
*
|
|
1039
|
+
* @hidden
|
|
1040
|
+
*/
|
|
1041
|
+
InsertIntoSlide = 'insertInToSlide',
|
|
848
1042
|
}
|
|
849
1043
|
|
|
850
1044
|
/**
|
|
@@ -852,235 +1046,347 @@ export enum EmbedEvent {
|
|
|
852
1046
|
* to the embedded ThoughtSpot app
|
|
853
1047
|
*
|
|
854
1048
|
* To trigger an event use the corresponding
|
|
855
|
-
* {@link LiveboardEmbed.trigger} or {@link AppEmbed.trigger} or {@link
|
|
1049
|
+
* {@link LiveboardEmbed.trigger} or {@link AppEmbed.trigger} or {@link
|
|
1050
|
+
* SearchEmbed.trigger} method.
|
|
1051
|
+
*
|
|
1052
|
+
* @group Events
|
|
856
1053
|
*/
|
|
857
1054
|
// eslint-disable-next-line no-shadow
|
|
858
1055
|
export enum HostEvent {
|
|
859
1056
|
/**
|
|
860
1057
|
* Trigger a search
|
|
1058
|
+
*
|
|
861
1059
|
* @param - dataSourceIds - The data source GUID to Search on
|
|
862
1060
|
* - Although an array, only a single source
|
|
863
1061
|
* is supported at this time.
|
|
864
1062
|
* @param - searchQuery - The search query
|
|
865
1063
|
* @param - execute - execute the existing / updated query
|
|
866
1064
|
* @example
|
|
1065
|
+
* ```js
|
|
867
1066
|
* searchEmbed.trigger(HostEvent.Search, {
|
|
868
|
-
*
|
|
869
|
-
*
|
|
870
|
-
*
|
|
1067
|
+
* searchQuery: "[sales] by [item type],
|
|
1068
|
+
* dataSourceIds: ["cd252e5c-b552-49a8-821d-3eadaa049cca"]
|
|
1069
|
+
* execute: true
|
|
871
1070
|
* })
|
|
1071
|
+
* ```
|
|
872
1072
|
*/
|
|
873
1073
|
Search = 'search',
|
|
874
1074
|
/**
|
|
875
1075
|
* Trigger a drill on certain points by certain column
|
|
1076
|
+
*
|
|
876
1077
|
* @param - points - an object containing selectedPoints/clickedPoints
|
|
877
1078
|
* eg. { selectedPoints: []}
|
|
878
1079
|
* @param - columnGuid - a string guid of the column to drill by. This is optional,
|
|
879
|
-
* if not provided it will auto drill by the configured
|
|
880
|
-
*
|
|
881
|
-
*
|
|
882
|
-
*
|
|
1080
|
+
* if not provided it will auto drill by the configured
|
|
1081
|
+
* column.
|
|
1082
|
+
* @example
|
|
1083
|
+
* ```js
|
|
1084
|
+
* searchEmbed.trigger(HostEvent.DrillDown, {
|
|
1085
|
+
* points: clickedPointData,
|
|
1086
|
+
* autoDrillDown: true,
|
|
883
1087
|
* })
|
|
1088
|
+
* ```
|
|
884
1089
|
* @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
|
|
885
1090
|
*/
|
|
886
1091
|
DrillDown = 'triggerDrillDown',
|
|
887
1092
|
/**
|
|
888
1093
|
* Apply filters
|
|
1094
|
+
*
|
|
889
1095
|
* @hidden
|
|
890
1096
|
*/
|
|
891
1097
|
Filter = 'filter',
|
|
892
1098
|
/**
|
|
893
1099
|
* Reload the answer or visualization
|
|
1100
|
+
*
|
|
894
1101
|
* @hidden
|
|
895
1102
|
*/
|
|
896
1103
|
Reload = 'reload',
|
|
897
1104
|
/**
|
|
898
1105
|
* Set the visible visualizations on a Liveboard.
|
|
1106
|
+
*
|
|
899
1107
|
* @param - an array of ids of visualizations to show, the ids not passed
|
|
900
1108
|
* will be hidden.
|
|
901
1109
|
* @example
|
|
902
|
-
* liveboardEmbed.trigger(HostEvent.SetVisibleVizs, [
|
|
1110
|
+
* liveboardEmbed.trigger(HostEvent.SetVisibleVizs, [
|
|
1111
|
+
* '730496d6-6903-4601-937e-2c691821af3c',
|
|
1112
|
+
* 'd547ec54-2a37-4516-a222-2b06719af726'])
|
|
903
1113
|
* @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1-sw
|
|
904
1114
|
*/
|
|
905
1115
|
SetVisibleVizs = 'SetPinboardVisibleVizs',
|
|
906
1116
|
/**
|
|
907
1117
|
* Update the runtime filters. The runtime filters passed here are extended
|
|
908
1118
|
* on to the existing runtime filters if they exist.
|
|
1119
|
+
*
|
|
909
1120
|
* @param - {@link RuntimeFilter}[] an array of {@link RuntimeFilter} Types.
|
|
910
1121
|
* @example
|
|
911
1122
|
* liveboardEmbed.trigger(HostEvent.UpdateRuntimeFilters, [
|
|
912
1123
|
* {columnName: "state",operator: RuntimeFilterOp.EQ,values: ["michigan"]},
|
|
913
|
-
* {columnName: "item type",operator: RuntimeFilterOp.EQ,values:
|
|
914
|
-
* ])
|
|
1124
|
+
* {columnName: "item type",operator: RuntimeFilterOp.EQ,values:
|
|
1125
|
+
* ["Jackets"]} ])
|
|
915
1126
|
* @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw
|
|
916
1127
|
*/
|
|
917
1128
|
UpdateRuntimeFilters = 'UpdateRuntimeFilters',
|
|
918
1129
|
/**
|
|
919
1130
|
* Navigate to a specific page in App embed without any reload.
|
|
920
1131
|
* This is the same as calling `appEmbed.navigateToPage(path, true)`
|
|
1132
|
+
*
|
|
921
1133
|
* @param - path - the path to navigate to (can be a number[1/-1] to go forward/back)
|
|
922
|
-
* @example
|
|
1134
|
+
* @example
|
|
1135
|
+
* ```js
|
|
1136
|
+
* appEmbed.navigateToPage(-1)
|
|
1137
|
+
* ```
|
|
923
1138
|
* @version SDK: 1.12.0 | ThoughtSpot 8.4.0.cl, 8.4.1-sw
|
|
924
1139
|
*/
|
|
925
1140
|
Navigate = 'Navigate',
|
|
926
1141
|
/**
|
|
927
1142
|
* Opens the filter panel for a particular column.
|
|
928
1143
|
* Works with Search embed.
|
|
929
|
-
*
|
|
930
|
-
* @
|
|
1144
|
+
*
|
|
1145
|
+
* @param - { columnId: string,
|
|
1146
|
+
* name: string,
|
|
1147
|
+
* type: INT64/CHAR/DATE,
|
|
1148
|
+
* dataType: ATTRIBUTE/MEASURE }
|
|
1149
|
+
* @example
|
|
1150
|
+
* ```js
|
|
1151
|
+
* searchEmbed.trigger(HostEvent.OpenFilter,
|
|
1152
|
+
* { columnId: '123', name: 'column name', type: 'INT64', dataType: 'ATTRIBUTE' })
|
|
1153
|
+
* ```
|
|
931
1154
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
|
|
932
1155
|
*/
|
|
933
1156
|
OpenFilter = 'openFilter',
|
|
934
1157
|
/**
|
|
935
1158
|
* Adds the columns to the current Search.
|
|
1159
|
+
*
|
|
936
1160
|
* @param - { columnIds: string[] }
|
|
937
|
-
* @example
|
|
1161
|
+
* @example
|
|
1162
|
+
* ```js
|
|
1163
|
+
* searchEmbed.trigger(HostEvent.AddColumns, { columnIds: ['123', '456'] })
|
|
1164
|
+
* ```
|
|
938
1165
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
|
|
939
1166
|
*/
|
|
940
1167
|
AddColumns = 'addColumns',
|
|
941
1168
|
/**
|
|
942
1169
|
* Removes a column from the current Search.
|
|
1170
|
+
*
|
|
943
1171
|
* @param - { columnId: string }
|
|
944
|
-
* @example
|
|
1172
|
+
* @example
|
|
1173
|
+
* ```js
|
|
1174
|
+
* searchEmbed.trigger(HostEvent.RemoveColumn, { columnId: '123' })
|
|
1175
|
+
* ```
|
|
945
1176
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
|
|
946
1177
|
*/
|
|
947
1178
|
RemoveColumn = 'removeColumn',
|
|
948
1179
|
/**
|
|
949
1180
|
* Gets the current pinboard content.
|
|
950
|
-
*
|
|
1181
|
+
*
|
|
1182
|
+
* @example
|
|
1183
|
+
* ```js
|
|
1184
|
+
* liveboardEmbed.trigger(HostEvent.getExportRequestForCurrentPinboard)
|
|
1185
|
+
* ```
|
|
951
1186
|
* @version SDK: 1.13.0 | ThoughtSpot: 8.5.0.cl, 8.8.1-sw
|
|
952
1187
|
*/
|
|
953
1188
|
getExportRequestForCurrentPinboard = 'getExportRequestForCurrentPinboard',
|
|
954
1189
|
/**
|
|
955
1190
|
* Triggers the Pin action on an embedded object
|
|
1191
|
+
*
|
|
956
1192
|
* @param - incase of Liveboard embed, takes in an object with vizId as a key
|
|
957
1193
|
* can be left empty for search and visualization embeds
|
|
958
1194
|
* @example
|
|
1195
|
+
* ```js
|
|
959
1196
|
* liveboardEmbed.trigger(HostEvent.Pin, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
960
1197
|
* vizEmbed.trigger(HostEvent.Pin)
|
|
961
1198
|
* searchEmbed.trigger(HostEvent.Pin)
|
|
1199
|
+
* ```
|
|
962
1200
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
963
1201
|
*/
|
|
964
1202
|
Pin = 'pin',
|
|
965
1203
|
/**
|
|
966
1204
|
* Triggers the Show Liveboard details action on a Liveboard
|
|
967
|
-
*
|
|
1205
|
+
*
|
|
1206
|
+
* @example
|
|
1207
|
+
* ```js
|
|
1208
|
+
* liveboardEmbed.trigger(HostEvent.LiveboardInfo)
|
|
1209
|
+
* ```
|
|
968
1210
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
969
1211
|
*/
|
|
970
1212
|
LiveboardInfo = 'pinboardInfo',
|
|
971
1213
|
/**
|
|
972
1214
|
* Triggers the Schedule action on a Liveboard
|
|
973
|
-
*
|
|
1215
|
+
*
|
|
1216
|
+
* @example
|
|
1217
|
+
* ```js
|
|
1218
|
+
* liveboardEmbed.trigger(HostEvent.Schedule)
|
|
1219
|
+
* ```
|
|
974
1220
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
975
1221
|
*/
|
|
976
1222
|
Schedule = 'subscription',
|
|
977
1223
|
/**
|
|
978
1224
|
* Triggers the Manage schedule action on a Liveboard
|
|
979
|
-
*
|
|
1225
|
+
*
|
|
1226
|
+
* @example
|
|
1227
|
+
* ```js
|
|
1228
|
+
* liveboardEmbed.trigger(HostEvent.ScheduleList)
|
|
1229
|
+
* ```
|
|
980
1230
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
981
1231
|
*/
|
|
982
1232
|
SchedulesList = 'schedule-list',
|
|
983
1233
|
/**
|
|
984
1234
|
* Triggers the Export TML action on a Liveboard
|
|
985
|
-
*
|
|
1235
|
+
*
|
|
1236
|
+
* @example
|
|
1237
|
+
* ```js
|
|
1238
|
+
* liveboardEmbed.trigger(HostEvent.ExportTML)
|
|
1239
|
+
* ```
|
|
986
1240
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
987
1241
|
*/
|
|
988
1242
|
ExportTML = 'exportTSL',
|
|
989
1243
|
/**
|
|
990
1244
|
* Triggers the Edit TML action on a Liveboard
|
|
991
|
-
*
|
|
1245
|
+
*
|
|
1246
|
+
* @example
|
|
1247
|
+
* ```js
|
|
1248
|
+
* liveboardEmbed.trigger(HostEvent.EditTML)
|
|
1249
|
+
* ```
|
|
992
1250
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
993
1251
|
*/
|
|
994
1252
|
EditTML = 'editTSL',
|
|
995
1253
|
/**
|
|
996
1254
|
* Triggers the Update TML action on a Liveboard
|
|
997
|
-
*
|
|
1255
|
+
*
|
|
1256
|
+
* @example
|
|
1257
|
+
* ```js
|
|
1258
|
+
* liveboardEmbed.trigger(HostEvent.UpdateTML)
|
|
1259
|
+
* ```
|
|
998
1260
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
999
1261
|
*/
|
|
1000
1262
|
UpdateTML = 'updateTSL',
|
|
1001
1263
|
/**
|
|
1002
1264
|
* Triggers the Download PDF action on a Liveboard
|
|
1003
|
-
*
|
|
1265
|
+
*
|
|
1266
|
+
* @example
|
|
1267
|
+
* ```js
|
|
1268
|
+
* liveboardEmbed.trigger(HostEvent.DownloadAsPDF)
|
|
1269
|
+
* ```
|
|
1004
1270
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
1005
1271
|
*/
|
|
1006
1272
|
DownloadAsPdf = 'downloadAsPdf',
|
|
1007
1273
|
/**
|
|
1008
1274
|
* Triggers the Make a copy action on a Liveboard, search or visualization
|
|
1275
|
+
*
|
|
1009
1276
|
* @example
|
|
1277
|
+
* ```js
|
|
1010
1278
|
* liveboardEmbed.trigger(HostEvent.MakeACopy, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1011
1279
|
* vizEmbed.trigger(HostEvent.MakeACopy)
|
|
1012
1280
|
* searchEmbed.trigger(HostEvent.MakeACopy)
|
|
1281
|
+
* ```
|
|
1013
1282
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
1014
1283
|
*/
|
|
1015
1284
|
MakeACopy = 'makeACopy',
|
|
1016
1285
|
/**
|
|
1017
1286
|
* Triggers the Delete action on a Liveboard
|
|
1018
|
-
*
|
|
1287
|
+
*
|
|
1288
|
+
* @example
|
|
1289
|
+
* ```js
|
|
1290
|
+
* appEmbed.trigger(HostEvent.Remove)
|
|
1291
|
+
* ```
|
|
1019
1292
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
1020
1293
|
*/
|
|
1021
1294
|
Remove = 'delete',
|
|
1022
1295
|
/**
|
|
1023
1296
|
* Triggers the Explore action on a visualization
|
|
1297
|
+
*
|
|
1024
1298
|
* @param - an object with vizId as a key
|
|
1025
|
-
* @example
|
|
1299
|
+
* @example
|
|
1300
|
+
* ```js
|
|
1301
|
+
* liveboardEmbed.trigger(HostEvent.Explore, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1302
|
+
* ```
|
|
1026
1303
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
1027
1304
|
*/
|
|
1028
1305
|
Explore = 'explore',
|
|
1029
1306
|
/**
|
|
1030
1307
|
* Triggers the Create alert action on a visualization
|
|
1308
|
+
*
|
|
1031
1309
|
* @param - an object with vizId as a key
|
|
1032
|
-
* @example
|
|
1310
|
+
* @example
|
|
1311
|
+
* ```js
|
|
1312
|
+
* liveboardEmbed.trigger(HostEvent.CreateMonitor {
|
|
1313
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
1314
|
+
* })
|
|
1315
|
+
* ```
|
|
1033
1316
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
1034
1317
|
*/
|
|
1035
1318
|
CreateMonitor = 'createMonitor',
|
|
1036
1319
|
/**
|
|
1037
1320
|
* Triggers the Manage alert action on a visualization
|
|
1321
|
+
*
|
|
1038
1322
|
* @param - an object with vizId as a key
|
|
1039
|
-
* @example
|
|
1323
|
+
* @example
|
|
1324
|
+
* ```js
|
|
1325
|
+
* liveboardEmbed.trigger(HostEvent.ManageMonitor, {
|
|
1326
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
1327
|
+
* })
|
|
1328
|
+
* ```
|
|
1040
1329
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
1041
1330
|
*/
|
|
1042
1331
|
ManageMonitor = 'manageMonitor',
|
|
1043
1332
|
/**
|
|
1044
1333
|
* Triggers the Edit action on a Liveboard or visualization
|
|
1045
|
-
*
|
|
1334
|
+
*
|
|
1335
|
+
* @param - object - to trigger the action for a specfic visualization
|
|
1336
|
+
* in Liveboard embed, pass in vizId as a key
|
|
1046
1337
|
* @example
|
|
1047
1338
|
* liveboardEmbed.trigger(HostEvent.Edit)
|
|
1048
|
-
* liveboardEmbed.trigger(HostEvent.Edit, {vizId:
|
|
1339
|
+
* liveboardEmbed.trigger(HostEvent.Edit, {vizId:
|
|
1340
|
+
* '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1049
1341
|
* vizEmbed.trigger((HostEvent.Edit)
|
|
1050
1342
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
1051
1343
|
*/
|
|
1052
1344
|
Edit = 'edit',
|
|
1053
1345
|
/**
|
|
1054
1346
|
* Triggers the Copy link action on a Liveboard or visualization
|
|
1055
|
-
*
|
|
1347
|
+
*
|
|
1348
|
+
* @param - object - to trigger the action for a s
|
|
1349
|
+
* pecfic visualization in Liveboard embed, pass in vizId as a key
|
|
1056
1350
|
* @example
|
|
1351
|
+
* ```js
|
|
1057
1352
|
* liveboardEmbed.trigger(HostEvent.CopyLink)
|
|
1058
1353
|
* liveboardEmbed.trigger(HostEvent.CopyLink, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1059
1354
|
* vizEmbed.trigger((HostEvent.CopyLink)
|
|
1355
|
+
* ```
|
|
1060
1356
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
1061
1357
|
*/
|
|
1062
1358
|
CopyLink = 'embedDocument',
|
|
1063
1359
|
/**
|
|
1064
1360
|
* Triggers the Present action on a Liveboard or visualization
|
|
1065
|
-
*
|
|
1361
|
+
*
|
|
1362
|
+
* @param - object - to trigger the action for a specfic visualization
|
|
1363
|
+
* in Liveboard embed, pass in vizId as a key
|
|
1066
1364
|
* @example
|
|
1365
|
+
* ```js
|
|
1067
1366
|
* liveboardEmbed.trigger(HostEvent.Present)
|
|
1068
1367
|
* liveboardEmbed.trigger(HostEvent.Present, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1069
1368
|
* vizEmbed.trigger((HostEvent.Present)
|
|
1369
|
+
* ```
|
|
1070
1370
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
1071
1371
|
*/
|
|
1072
1372
|
Present = 'present',
|
|
1073
1373
|
/**
|
|
1074
1374
|
* Get TML for the current search.
|
|
1075
|
-
*
|
|
1375
|
+
*
|
|
1376
|
+
* @example
|
|
1377
|
+
* ```js
|
|
1378
|
+
* searchEmbed.trigger(HostEvent.GetTML)
|
|
1379
|
+
* ```
|
|
1076
1380
|
* @version SDK: 1.18.0 | ThoughtSpot: 8.10.0.cl
|
|
1077
1381
|
*/
|
|
1078
1382
|
GetTML = 'getTML',
|
|
1079
1383
|
/**
|
|
1080
1384
|
* Triggers the ShowUnderlyingData action on visualization or search
|
|
1385
|
+
*
|
|
1081
1386
|
* @param - an object with vizId as a key
|
|
1082
1387
|
* @example
|
|
1083
|
-
* liveboardEmbed.trigger(HostEvent.ShowUnderlyingData, {vizId:
|
|
1388
|
+
* liveboardEmbed.trigger(HostEvent.ShowUnderlyingData, {vizId:
|
|
1389
|
+
* '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1084
1390
|
* vizEmbed.trigger(HostEvent.ShowUnderlyingData)
|
|
1085
1391
|
* searchEmbed.trigger(HostEvent.ShowUnderlyingData)
|
|
1086
1392
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
@@ -1088,10 +1394,12 @@ export enum HostEvent {
|
|
|
1088
1394
|
ShowUnderlyingData = 'showUnderlyingData',
|
|
1089
1395
|
/**
|
|
1090
1396
|
* Triggers the Delete action on visualization or search
|
|
1397
|
+
*
|
|
1091
1398
|
* @param - incase of Liveboard embed, takes in an object with vizId as a key
|
|
1092
1399
|
* can be left empty for search and visualization embeds
|
|
1093
1400
|
* @example
|
|
1094
|
-
* liveboardEmbed.trigger(HostEvent.Delete, {vizId:
|
|
1401
|
+
* liveboardEmbed.trigger(HostEvent.Delete, {vizId:
|
|
1402
|
+
* '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1095
1403
|
* vizEmbed.trigger(HostEvent.Delete)
|
|
1096
1404
|
* searchEmbed.trigger(HostEvent.Delete)
|
|
1097
1405
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
@@ -1099,10 +1407,12 @@ export enum HostEvent {
|
|
|
1099
1407
|
Delete = 'delete',
|
|
1100
1408
|
/**
|
|
1101
1409
|
* Triggers the SpotIQAnalyze action on visualization or search
|
|
1410
|
+
*
|
|
1102
1411
|
* @param - incase of Liveboard embed, takes in an object with vizId as a key
|
|
1103
1412
|
* can be left empty for search and visualization embeds
|
|
1104
1413
|
* @example
|
|
1105
|
-
* liveboardEmbed.trigger(HostEvent.SpotIQAnalyze, {vizId:
|
|
1414
|
+
* liveboardEmbed.trigger(HostEvent.SpotIQAnalyze, {vizId:
|
|
1415
|
+
* '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1106
1416
|
* vizEmbed.trigger(HostEvent.SpotIQAnalyze)
|
|
1107
1417
|
* searchEmbed.trigger(HostEvent.SpotIQAnalyze)
|
|
1108
1418
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
@@ -1110,26 +1420,34 @@ export enum HostEvent {
|
|
|
1110
1420
|
SpotIQAnalyze = 'spotIQAnalyze',
|
|
1111
1421
|
/**
|
|
1112
1422
|
* Triggers the Download action on visualization or search when Displaymode is Chart
|
|
1423
|
+
*
|
|
1113
1424
|
* @example
|
|
1114
|
-
* liveboardEmbed.trigger(HostEvent.Download, {vizId:
|
|
1425
|
+
* liveboardEmbed.trigger(HostEvent.Download, {vizId:
|
|
1426
|
+
* '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1115
1427
|
* vizEmbed.trigger(HostEvent.Download)
|
|
1116
1428
|
* searchEmbed.trigger(HostEvent.Download)
|
|
1117
1429
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
1118
1430
|
*/
|
|
1119
1431
|
Download = 'download',
|
|
1120
1432
|
/**
|
|
1121
|
-
* Triggers the downloadAsCSV action on visualization or search when Displaymode is
|
|
1433
|
+
* Triggers the downloadAsCSV action on visualization or search when Displaymode is
|
|
1434
|
+
* Table
|
|
1435
|
+
*
|
|
1122
1436
|
* @example
|
|
1123
|
-
* liveboardEmbed.trigger(HostEvent.DownloadAsCsv, {vizId:
|
|
1437
|
+
* liveboardEmbed.trigger(HostEvent.DownloadAsCsv, {vizId:
|
|
1438
|
+
* '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1124
1439
|
* vizEmbed.trigger(HostEvent.DownloadAsCsv)
|
|
1125
1440
|
* searchEmbed.trigger(HostEvent.DownloadAsCsv)
|
|
1126
1441
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
1127
1442
|
*/
|
|
1128
1443
|
DownloadAsCsv = 'downloadAsCSV',
|
|
1129
1444
|
/**
|
|
1130
|
-
* Triggers the downloadAsXLSX action on visualization or search when Displaymode is
|
|
1445
|
+
* Triggers the downloadAsXLSX action on visualization or search when Displaymode is
|
|
1446
|
+
* Table
|
|
1447
|
+
*
|
|
1131
1448
|
* @example
|
|
1132
|
-
* liveboardEmbed.trigger(HostEvent.DownloadAsXlsx, {vizId:
|
|
1449
|
+
* liveboardEmbed.trigger(HostEvent.DownloadAsXlsx, {vizId:
|
|
1450
|
+
* '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1133
1451
|
* vizEmbed.trigger(HostEvent.DownloadAsXlsx)
|
|
1134
1452
|
* searchEmbed.trigger(HostEvent.DownloadAsXlsx)
|
|
1135
1453
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
@@ -1137,6 +1455,7 @@ export enum HostEvent {
|
|
|
1137
1455
|
DownloadAsXlsx = 'downloadAsXLSX',
|
|
1138
1456
|
/**
|
|
1139
1457
|
* Triggers the Share action on a liveboard or answer
|
|
1458
|
+
*
|
|
1140
1459
|
* @example
|
|
1141
1460
|
* liveboardEmbed.trigger(HostEvent.Share)
|
|
1142
1461
|
* searchEmbed.trigger(HostEvent.Share)
|
|
@@ -1145,6 +1464,7 @@ export enum HostEvent {
|
|
|
1145
1464
|
Share = 'share',
|
|
1146
1465
|
/**
|
|
1147
1466
|
* Trigger the Save action on a liveboard or answer
|
|
1467
|
+
*
|
|
1148
1468
|
* @example
|
|
1149
1469
|
* liveboardEmbed.trigger(HostEvent.Save)
|
|
1150
1470
|
* searchEmbed.trigger(HostEvent.Save)
|
|
@@ -1153,33 +1473,40 @@ export enum HostEvent {
|
|
|
1153
1473
|
Save = 'save',
|
|
1154
1474
|
/**
|
|
1155
1475
|
* Triggers the SyncToSheets action on visualization
|
|
1476
|
+
*
|
|
1156
1477
|
* @param - an object with vizId as a key
|
|
1157
1478
|
* @example
|
|
1158
|
-
* liveboardEmbed.trigger(HostEvent.SyncToSheets, {vizId:
|
|
1479
|
+
* liveboardEmbed.trigger(HostEvent.SyncToSheets, {vizId:
|
|
1480
|
+
* '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1159
1481
|
* vizEmbed.trigger(HostEvent.SyncToSheets)
|
|
1160
1482
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
1161
1483
|
*/
|
|
1162
1484
|
SyncToSheets = 'sync-to-sheets',
|
|
1163
1485
|
/**
|
|
1164
1486
|
* Triggers the SyncToOtherApps action on visualization
|
|
1487
|
+
*
|
|
1165
1488
|
* @param - an object with vizId as a key
|
|
1166
1489
|
* @example
|
|
1167
|
-
* liveboardEmbed.trigger(HostEvent.SyncToOtherApps, {vizId:
|
|
1490
|
+
* liveboardEmbed.trigger(HostEvent.SyncToOtherApps, {vizId:
|
|
1491
|
+
* '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1168
1492
|
* vizEmbed.trigger(HostEvent.SyncToOtherApps)
|
|
1169
1493
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
1170
1494
|
*/
|
|
1171
1495
|
SyncToOtherApps = 'sync-to-other-apps',
|
|
1172
1496
|
/**
|
|
1173
1497
|
* Triggers the ManagePipelines action on visualization
|
|
1498
|
+
*
|
|
1174
1499
|
* @param - an object with vizId as a key
|
|
1175
1500
|
* @example
|
|
1176
|
-
* liveboardEmbed.trigger(HostEvent.ManagePipelines, {vizId:
|
|
1501
|
+
* liveboardEmbed.trigger(HostEvent.ManagePipelines, {vizId:
|
|
1502
|
+
* '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1177
1503
|
* vizEmbed.trigger(HostEvent.ManagePipelines)
|
|
1178
1504
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
1179
1505
|
*/
|
|
1180
1506
|
ManagePipelines = 'manage-pipeline',
|
|
1181
1507
|
/**
|
|
1182
1508
|
* Triggers the Reset search in answer
|
|
1509
|
+
*
|
|
1183
1510
|
* @example
|
|
1184
1511
|
* searchEmbed.trigger(HostEvent.SearchReset
|
|
1185
1512
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.0.1-sw
|
|
@@ -1213,6 +1540,7 @@ export enum DataSourceVisualMode {
|
|
|
1213
1540
|
*/
|
|
1214
1541
|
// eslint-disable-next-line no-shadow
|
|
1215
1542
|
export enum Param {
|
|
1543
|
+
EmbedApp = 'embedApp',
|
|
1216
1544
|
DataSources = 'dataSources',
|
|
1217
1545
|
DataSourceMode = 'dataSourceMode',
|
|
1218
1546
|
DisableActions = 'disableAction',
|
|
@@ -1253,6 +1581,8 @@ export enum Param {
|
|
|
1253
1581
|
ContextMenuTrigger = 'isContextMenuEnabledOnLeftClick',
|
|
1254
1582
|
LinkOverride = 'linkOverride',
|
|
1255
1583
|
ShowInsertToSlide = 'insertInToSlide',
|
|
1584
|
+
PrimaryNavHidden = 'primaryNavHidden',
|
|
1585
|
+
HideProfleAndHelp = 'profileAndHelpInNavBarHidden',
|
|
1256
1586
|
}
|
|
1257
1587
|
|
|
1258
1588
|
/**
|