@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/lib/src/types.js
CHANGED
|
@@ -9,28 +9,35 @@
|
|
|
9
9
|
/**
|
|
10
10
|
* The authentication mechanism for allowing access to the
|
|
11
11
|
* the embedded app
|
|
12
|
+
*
|
|
13
|
+
* @group Authentication / Init
|
|
12
14
|
*/
|
|
13
15
|
// eslint-disable-next-line no-shadow
|
|
14
16
|
export var AuthType;
|
|
15
17
|
(function (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
|
AuthType["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
|
AuthType["EmbeddedSSO"] = "EmbeddedSSO";
|
|
26
31
|
/**
|
|
27
32
|
* SSO using SAML
|
|
33
|
+
*
|
|
28
34
|
* @deprecated Use {@link SAMLRedirect} instead
|
|
29
35
|
* @hidden
|
|
30
36
|
*/
|
|
31
37
|
AuthType["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 var 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
|
AuthType["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 var AuthType;
|
|
|
53
71
|
AuthType["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
|
AuthType["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
|
AuthType["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
|
AuthType["TrustedAuthTokenCookieless"] = "AuthServerCookieless";
|
|
73
105
|
/**
|
|
@@ -143,32 +175,42 @@ export var RuntimeFilterOp;
|
|
|
143
175
|
})(RuntimeFilterOp || (RuntimeFilterOp = {}));
|
|
144
176
|
/**
|
|
145
177
|
* Event types emitted by the embedded ThoughtSpot application.
|
|
178
|
+
*
|
|
179
|
+
* To add an event listener use the corresponding
|
|
180
|
+
* {@link LiveboardEmbed.on} or {@link AppEmbed.on} or {@link SearchEmbed.on} method.
|
|
181
|
+
*
|
|
182
|
+
* @group Events
|
|
146
183
|
*/
|
|
147
184
|
// eslint-disable-next-line no-shadow
|
|
148
185
|
export var EmbedEvent;
|
|
149
186
|
(function (EmbedEvent) {
|
|
150
187
|
/**
|
|
151
188
|
* Rendering has initialized.
|
|
152
|
-
*
|
|
189
|
+
*
|
|
190
|
+
* @returns timestamp - The timestamp when the event was generated.
|
|
153
191
|
*/
|
|
154
192
|
EmbedEvent["Init"] = "init";
|
|
155
193
|
/**
|
|
156
194
|
* Authentication has either succeeded or failed.
|
|
157
|
-
*
|
|
195
|
+
*
|
|
196
|
+
* @returns isLoggedIn - A Boolean specifying whether authentication was successful.
|
|
158
197
|
*/
|
|
159
198
|
EmbedEvent["AuthInit"] = "authInit";
|
|
160
199
|
/**
|
|
161
200
|
* The embed object container has loaded.
|
|
162
|
-
*
|
|
201
|
+
*
|
|
202
|
+
* @returns timestamp - The timestamp when the event was generated.
|
|
163
203
|
*/
|
|
164
204
|
EmbedEvent["Load"] = "load";
|
|
165
205
|
/**
|
|
166
206
|
* Data pertaining to answer or Liveboard is received
|
|
167
|
-
*
|
|
207
|
+
*
|
|
208
|
+
* @returns data - The answer or Liveboard data
|
|
168
209
|
*/
|
|
169
210
|
EmbedEvent["Data"] = "data";
|
|
170
211
|
/**
|
|
171
212
|
* Search/answer/Liveboard filters have been applied/updated
|
|
213
|
+
*
|
|
172
214
|
* @hidden
|
|
173
215
|
*/
|
|
174
216
|
EmbedEvent["FiltersChanged"] = "filtersChanged";
|
|
@@ -178,48 +220,56 @@ export var EmbedEvent;
|
|
|
178
220
|
EmbedEvent["QueryChanged"] = "queryChanged";
|
|
179
221
|
/**
|
|
180
222
|
* A drill down operation has been performed.
|
|
181
|
-
*
|
|
182
|
-
* @
|
|
183
|
-
* @
|
|
223
|
+
*
|
|
224
|
+
* @returns additionalFilters - Any additional filters applied
|
|
225
|
+
* @returns drillDownColumns - The columns on which drill down was performed
|
|
226
|
+
* @returns nonFilteredColumns - The columns that were not filtered
|
|
184
227
|
*/
|
|
185
228
|
EmbedEvent["Drilldown"] = "drillDown";
|
|
186
229
|
/**
|
|
187
230
|
* One or more data sources have been selected.
|
|
188
|
-
*
|
|
231
|
+
*
|
|
232
|
+
* @returns dataSourceIds - the list of data sources
|
|
189
233
|
*/
|
|
190
234
|
EmbedEvent["DataSourceSelected"] = "dataSourceSelected";
|
|
191
235
|
/**
|
|
192
236
|
* One or more data columns have been selected.
|
|
193
|
-
*
|
|
237
|
+
*
|
|
238
|
+
* @returns columnIds - the list of columns
|
|
194
239
|
* @version SDK: 1.10.0 | ThoughtSpot: 8.2.0.cl, 8.4.1-sw
|
|
195
240
|
*/
|
|
196
241
|
EmbedEvent["AddRemoveColumns"] = "addRemoveColumns";
|
|
197
242
|
/**
|
|
198
243
|
* A custom action has been triggered
|
|
199
|
-
*
|
|
200
|
-
* @
|
|
244
|
+
*
|
|
245
|
+
* @returns actionId - The id of the custom action
|
|
246
|
+
* @returns data - The answer or Liveboard data
|
|
201
247
|
*/
|
|
202
248
|
EmbedEvent["CustomAction"] = "customAction";
|
|
203
249
|
/**
|
|
204
250
|
* A double click has been triggered on table/chart
|
|
205
|
-
*
|
|
251
|
+
*
|
|
252
|
+
* @returns ContextMenuInputPoints - data point that is double clicked
|
|
206
253
|
* @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
|
|
207
254
|
*/
|
|
208
255
|
EmbedEvent["VizPointDoubleClick"] = "vizPointDoubleClick";
|
|
209
256
|
/**
|
|
210
257
|
* A click has been triggered on table/chart
|
|
211
|
-
*
|
|
258
|
+
*
|
|
259
|
+
* @returns ContextMenuInputPoints - data point that is clicked
|
|
212
260
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
213
261
|
*/
|
|
214
262
|
EmbedEvent["VizPointClick"] = "vizPointClick";
|
|
215
263
|
/**
|
|
216
264
|
* An error has occurred.
|
|
217
|
-
*
|
|
265
|
+
*
|
|
266
|
+
* @returns error - An error object or message
|
|
218
267
|
*/
|
|
219
268
|
EmbedEvent["Error"] = "Error";
|
|
220
269
|
/**
|
|
221
270
|
* The embedded object has sent an alert
|
|
222
|
-
*
|
|
271
|
+
*
|
|
272
|
+
* @returns alert - An alert object
|
|
223
273
|
*/
|
|
224
274
|
EmbedEvent["Alert"] = "alert";
|
|
225
275
|
/**
|
|
@@ -228,29 +278,34 @@ export var EmbedEvent;
|
|
|
228
278
|
EmbedEvent["AuthExpire"] = "ThoughtspotAuthExpired";
|
|
229
279
|
/**
|
|
230
280
|
* ThoughtSpot failed to validate the auth session.
|
|
281
|
+
*
|
|
231
282
|
* @hidden
|
|
232
283
|
*/
|
|
233
284
|
EmbedEvent["AuthFailure"] = "ThoughtspotAuthFailure";
|
|
234
285
|
/**
|
|
235
286
|
* ThoughtSpot failed to validate the auth session.
|
|
287
|
+
*
|
|
236
288
|
* @hidden
|
|
237
289
|
*/
|
|
238
290
|
EmbedEvent["AuthLogout"] = "ThoughtspotAuthLogout";
|
|
239
291
|
/**
|
|
240
292
|
* The height of the embedded Liveboard or visualization has been computed.
|
|
241
|
-
*
|
|
293
|
+
*
|
|
294
|
+
* @returns data - The height of the embedded Liveboard or visualization
|
|
242
295
|
* @hidden
|
|
243
296
|
*/
|
|
244
297
|
EmbedEvent["EmbedHeight"] = "EMBED_HEIGHT";
|
|
245
298
|
/**
|
|
246
299
|
* The center of visible iframe viewport is calculated.
|
|
247
|
-
*
|
|
300
|
+
*
|
|
301
|
+
* @returns data - The center of the visible Iframe viewport.
|
|
248
302
|
* @hidden
|
|
249
303
|
*/
|
|
250
304
|
EmbedEvent["EmbedIframeCenter"] = "EmbedIframeCenter";
|
|
251
305
|
/**
|
|
252
306
|
* Emitted when the "Get Data" button in Search Bar embed
|
|
253
307
|
* is clicked.
|
|
308
|
+
*
|
|
254
309
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.0-sw
|
|
255
310
|
*/
|
|
256
311
|
EmbedEvent["GetDataClick"] = "getDataClick";
|
|
@@ -260,6 +315,7 @@ export var EmbedEvent;
|
|
|
260
315
|
EmbedEvent["RouteChange"] = "ROUTE_CHANGE";
|
|
261
316
|
/**
|
|
262
317
|
* The v1 event type for Data
|
|
318
|
+
*
|
|
263
319
|
* @hidden
|
|
264
320
|
*/
|
|
265
321
|
EmbedEvent["V1Data"] = "exportVizDataToParent";
|
|
@@ -272,17 +328,20 @@ export var EmbedEvent;
|
|
|
272
328
|
EmbedEvent["NoCookieAccess"] = "noCookieAccess";
|
|
273
329
|
/**
|
|
274
330
|
* Emitted when SAML is complete
|
|
331
|
+
*
|
|
275
332
|
* @private
|
|
276
333
|
* @hidden
|
|
277
334
|
*/
|
|
278
335
|
EmbedEvent["SAMLComplete"] = "samlComplete";
|
|
279
336
|
/**
|
|
280
337
|
* Emitted when any modal is opened in the app
|
|
338
|
+
*
|
|
281
339
|
* @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1-sw
|
|
282
340
|
*/
|
|
283
341
|
EmbedEvent["DialogOpen"] = "dialog-open";
|
|
284
342
|
/**
|
|
285
343
|
* Emitted when any modal is closed in the app
|
|
344
|
+
*
|
|
286
345
|
* @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1-sw
|
|
287
346
|
*/
|
|
288
347
|
EmbedEvent["DialogClose"] = "dialog-close";
|
|
@@ -290,416 +349,571 @@ export var EmbedEvent;
|
|
|
290
349
|
* Emitted when the Liveboard shell loads.
|
|
291
350
|
* You can use this event as a hook to trigger
|
|
292
351
|
* other events on the rendered Liveboard.
|
|
352
|
+
*
|
|
293
353
|
* @version SDK: 1.9.1 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw
|
|
294
354
|
*/
|
|
295
355
|
EmbedEvent["LiveboardRendered"] = "PinboardRendered";
|
|
296
356
|
/**
|
|
297
357
|
* This can be used to register an event listener which
|
|
298
358
|
* is triggered on all events.
|
|
359
|
+
*
|
|
299
360
|
* @Version SDK: 1.10.0 | ThoughtSpot: 8.2.0.cl, 8.4.1-sw
|
|
300
361
|
*/
|
|
301
362
|
EmbedEvent["ALL"] = "*";
|
|
302
363
|
/**
|
|
303
364
|
* Emitted when answer is saved in the app
|
|
365
|
+
*
|
|
304
366
|
* @Version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
305
367
|
*/
|
|
306
368
|
EmbedEvent["Save"] = "save";
|
|
307
369
|
/**
|
|
308
370
|
* Emitted when the download action is triggered on an answer
|
|
371
|
+
*
|
|
309
372
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
310
373
|
*/
|
|
311
374
|
EmbedEvent["Download"] = "download";
|
|
312
375
|
/**
|
|
313
376
|
* Emitted when the Download as PDF action is triggered on an answer
|
|
377
|
+
*
|
|
314
378
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
315
379
|
*/
|
|
316
380
|
EmbedEvent["DownloadAsPdf"] = "downloadAsPdf";
|
|
317
381
|
/**
|
|
318
382
|
* Emitted when the Download as CSV action is triggered on an answer
|
|
383
|
+
*
|
|
319
384
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
320
385
|
*/
|
|
321
386
|
EmbedEvent["DownloadAsCsv"] = "downloadAsCsv";
|
|
322
387
|
/**
|
|
323
388
|
* Emitted when the Download as XLSX action is triggered on an answer
|
|
389
|
+
*
|
|
324
390
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
325
391
|
*/
|
|
326
392
|
EmbedEvent["DownloadAsXlsx"] = "downloadAsXlsx";
|
|
327
393
|
/**
|
|
328
394
|
* Emitted when an answer is deleted in the app
|
|
395
|
+
*
|
|
329
396
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
330
397
|
*/
|
|
331
398
|
EmbedEvent["AnswerDelete"] = "answerDelete";
|
|
332
399
|
/**
|
|
333
400
|
* Emitted when an answer is pinned to a Liveboard
|
|
401
|
+
*
|
|
334
402
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
335
403
|
*/
|
|
336
404
|
EmbedEvent["Pin"] = "pin";
|
|
337
405
|
/**
|
|
338
406
|
* Emitted when SpotIQ analysis is triggered
|
|
407
|
+
*
|
|
339
408
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
340
409
|
*/
|
|
341
410
|
EmbedEvent["SpotIQAnalyze"] = "spotIQAnalyze";
|
|
342
411
|
/**
|
|
343
412
|
* Emitted when a user shares an object with another user or group
|
|
413
|
+
*
|
|
344
414
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
345
415
|
*/
|
|
346
416
|
EmbedEvent["Share"] = "share";
|
|
347
417
|
/**
|
|
348
|
-
* Emitted when a user clicks the Include action to include a specific value or data
|
|
418
|
+
* Emitted when a user clicks the Include action to include a specific value or data
|
|
419
|
+
* on a chart or table
|
|
420
|
+
*
|
|
349
421
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
350
422
|
*/
|
|
351
423
|
EmbedEvent["DrillInclude"] = "context-menu-item-include";
|
|
352
424
|
/**
|
|
353
|
-
* Emitted when a user clicks the Exclude action to exclude a specific value or data
|
|
425
|
+
* Emitted when a user clicks the Exclude action to exclude a specific value or data
|
|
426
|
+
* on a chart or table
|
|
427
|
+
*
|
|
354
428
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
355
429
|
*/
|
|
356
430
|
EmbedEvent["DrillExclude"] = "context-menu-item-exclude";
|
|
357
431
|
/**
|
|
358
432
|
* Emitted when copied column value on the app
|
|
433
|
+
*
|
|
359
434
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
360
435
|
*/
|
|
361
436
|
EmbedEvent["CopyToClipboard"] = "context-menu-item-copy-to-clipboard";
|
|
362
437
|
/**
|
|
363
438
|
* Emitted when a user clicks the Update TML action
|
|
439
|
+
*
|
|
364
440
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
365
441
|
*/
|
|
366
442
|
EmbedEvent["UpdateTML"] = "updateTSL";
|
|
367
443
|
/**
|
|
368
444
|
* Emitted when a user clicks the Edit TML action
|
|
445
|
+
*
|
|
369
446
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
370
447
|
*/
|
|
371
448
|
EmbedEvent["EditTML"] = "editTSL";
|
|
372
449
|
/**
|
|
373
450
|
* Emitted when ExportTML trigger in answer on the app
|
|
451
|
+
*
|
|
374
452
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
375
453
|
*/
|
|
376
454
|
EmbedEvent["ExportTML"] = "exportTSL";
|
|
377
455
|
/**
|
|
378
456
|
* Emitted when an answer is saved as a view
|
|
457
|
+
*
|
|
379
458
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
380
459
|
*/
|
|
381
460
|
EmbedEvent["SaveAsView"] = "saveAsView";
|
|
382
461
|
/**
|
|
383
462
|
* Emitted when copy of existing answer on the app
|
|
463
|
+
*
|
|
384
464
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
385
465
|
*/
|
|
386
466
|
EmbedEvent["CopyAEdit"] = "copyAEdit";
|
|
387
467
|
/**
|
|
388
468
|
* Emitted when a user clicks Show underlying data on an answe
|
|
469
|
+
*
|
|
389
470
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
390
471
|
*/
|
|
391
472
|
EmbedEvent["ShowUnderlyingData"] = "showUnderlyingData";
|
|
392
473
|
/**
|
|
393
474
|
* Emitted when an answer is switched to a chart or table view
|
|
475
|
+
*
|
|
394
476
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
395
477
|
*/
|
|
396
478
|
EmbedEvent["AnswerChartSwitcher"] = "answerChartSwitcher";
|
|
397
479
|
/**
|
|
398
480
|
* Internal event to communicate the initial settings back to the TS APP
|
|
481
|
+
*
|
|
399
482
|
* @hidden
|
|
400
483
|
*/
|
|
401
484
|
EmbedEvent["APP_INIT"] = "appInit";
|
|
402
485
|
/**
|
|
403
486
|
* Emitted when a user clicks Show Liveboard details on a Liveboard
|
|
487
|
+
*
|
|
404
488
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
405
489
|
*/
|
|
406
490
|
EmbedEvent["LiveboardInfo"] = "pinboardInfo";
|
|
407
491
|
/**
|
|
408
492
|
* Emitted when a user clicks on the Favorite icon on a Liveboard
|
|
493
|
+
*
|
|
409
494
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
410
495
|
*/
|
|
411
496
|
EmbedEvent["AddToFavorites"] = "addToFavorites";
|
|
412
497
|
/**
|
|
413
498
|
* Emitted when a user clicks Schedule on a Liveboard
|
|
499
|
+
*
|
|
414
500
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
415
501
|
*/
|
|
416
502
|
EmbedEvent["Schedule"] = "subscription";
|
|
417
503
|
/**
|
|
418
504
|
* Emitted when a user clicks Edit on a Liveboard or visualization
|
|
505
|
+
*
|
|
419
506
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
420
507
|
*/
|
|
421
508
|
EmbedEvent["Edit"] = "edit";
|
|
422
509
|
/**
|
|
423
510
|
* Emitted when a user clicks Make a copy on a Liveboard
|
|
511
|
+
*
|
|
424
512
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
425
513
|
*/
|
|
426
514
|
EmbedEvent["MakeACopy"] = "makeACopy";
|
|
427
515
|
/**
|
|
428
516
|
* Emitted when a user clicks Present on a Liveboard or visualization
|
|
517
|
+
*
|
|
429
518
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
430
519
|
*/
|
|
431
520
|
EmbedEvent["Present"] = "present";
|
|
432
521
|
/**
|
|
433
522
|
* Emitted when a user clicks Delete on a Liveboard
|
|
523
|
+
*
|
|
434
524
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
435
525
|
*/
|
|
436
526
|
EmbedEvent["Delete"] = "delete";
|
|
437
527
|
/**
|
|
438
528
|
* Emitted when a user clicks Manage schedules on a Liveboard
|
|
529
|
+
*
|
|
439
530
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
440
531
|
*/
|
|
441
532
|
EmbedEvent["SchedulesList"] = "schedule-list";
|
|
442
533
|
/**
|
|
443
534
|
* Emitted when a user clicks Cancel in edit mode on a Liveboard
|
|
535
|
+
*
|
|
444
536
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
445
537
|
*/
|
|
446
538
|
EmbedEvent["Cancel"] = "cancel";
|
|
447
539
|
/**
|
|
448
540
|
* Emitted when a user clicks Explore on a visualization
|
|
541
|
+
*
|
|
449
542
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
450
543
|
*/
|
|
451
544
|
EmbedEvent["Explore"] = "explore";
|
|
452
545
|
/**
|
|
453
546
|
* Emitted when a user clicks Copy link action on a visualization
|
|
547
|
+
*
|
|
454
548
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
455
549
|
*/
|
|
456
550
|
EmbedEvent["CopyLink"] = "embedDocument";
|
|
457
551
|
/**
|
|
458
552
|
* Emitted when a user interacts with cross filters on a visualization or liveboard
|
|
553
|
+
*
|
|
459
554
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
|
|
460
555
|
*/
|
|
461
556
|
EmbedEvent["CrossFilterChanged"] = "cross-filter-changed";
|
|
462
557
|
/**
|
|
463
558
|
* Emitted when a user right clicks on chart or table
|
|
559
|
+
*
|
|
464
560
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
|
|
465
561
|
*/
|
|
466
562
|
EmbedEvent["VizPointRightClick"] = "vizPointRightClick";
|
|
563
|
+
/**
|
|
564
|
+
* Emitted when a user clicks on Insert to slide on a visualization
|
|
565
|
+
*
|
|
566
|
+
* @hidden
|
|
567
|
+
*/
|
|
568
|
+
EmbedEvent["InsertIntoSlide"] = "insertInToSlide";
|
|
467
569
|
})(EmbedEvent || (EmbedEvent = {}));
|
|
468
570
|
/**
|
|
469
571
|
* Event types that can be triggered by the host application
|
|
470
572
|
* to the embedded ThoughtSpot app
|
|
471
573
|
*
|
|
472
574
|
* To trigger an event use the corresponding
|
|
473
|
-
* {@link LiveboardEmbed.trigger} or {@link AppEmbed.trigger} or {@link
|
|
575
|
+
* {@link LiveboardEmbed.trigger} or {@link AppEmbed.trigger} or {@link
|
|
576
|
+
* SearchEmbed.trigger} method.
|
|
577
|
+
*
|
|
578
|
+
* @group Events
|
|
474
579
|
*/
|
|
475
580
|
// eslint-disable-next-line no-shadow
|
|
476
581
|
export var HostEvent;
|
|
477
582
|
(function (HostEvent) {
|
|
478
583
|
/**
|
|
479
584
|
* Trigger a search
|
|
585
|
+
*
|
|
480
586
|
* @param - dataSourceIds - The data source GUID to Search on
|
|
481
587
|
* - Although an array, only a single source
|
|
482
588
|
* is supported at this time.
|
|
483
589
|
* @param - searchQuery - The search query
|
|
484
590
|
* @param - execute - execute the existing / updated query
|
|
485
591
|
* @example
|
|
592
|
+
* ```js
|
|
486
593
|
* searchEmbed.trigger(HostEvent.Search, {
|
|
487
|
-
*
|
|
488
|
-
*
|
|
489
|
-
*
|
|
594
|
+
* searchQuery: "[sales] by [item type],
|
|
595
|
+
* dataSourceIds: ["cd252e5c-b552-49a8-821d-3eadaa049cca"]
|
|
596
|
+
* execute: true
|
|
490
597
|
* })
|
|
598
|
+
* ```
|
|
491
599
|
*/
|
|
492
600
|
HostEvent["Search"] = "search";
|
|
493
601
|
/**
|
|
494
602
|
* Trigger a drill on certain points by certain column
|
|
603
|
+
*
|
|
495
604
|
* @param - points - an object containing selectedPoints/clickedPoints
|
|
496
605
|
* eg. { selectedPoints: []}
|
|
497
606
|
* @param - columnGuid - a string guid of the column to drill by. This is optional,
|
|
498
|
-
* if not provided it will auto drill by the configured
|
|
499
|
-
*
|
|
500
|
-
*
|
|
501
|
-
*
|
|
607
|
+
* if not provided it will auto drill by the configured
|
|
608
|
+
* column.
|
|
609
|
+
* @example
|
|
610
|
+
* ```js
|
|
611
|
+
* searchEmbed.trigger(HostEvent.DrillDown, {
|
|
612
|
+
* points: clickedPointData,
|
|
613
|
+
* autoDrillDown: true,
|
|
502
614
|
* })
|
|
615
|
+
* ```
|
|
503
616
|
* @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
|
|
504
617
|
*/
|
|
505
618
|
HostEvent["DrillDown"] = "triggerDrillDown";
|
|
506
619
|
/**
|
|
507
620
|
* Apply filters
|
|
621
|
+
*
|
|
508
622
|
* @hidden
|
|
509
623
|
*/
|
|
510
624
|
HostEvent["Filter"] = "filter";
|
|
511
625
|
/**
|
|
512
626
|
* Reload the answer or visualization
|
|
627
|
+
*
|
|
513
628
|
* @hidden
|
|
514
629
|
*/
|
|
515
630
|
HostEvent["Reload"] = "reload";
|
|
516
631
|
/**
|
|
517
632
|
* Set the visible visualizations on a Liveboard.
|
|
633
|
+
*
|
|
518
634
|
* @param - an array of ids of visualizations to show, the ids not passed
|
|
519
635
|
* will be hidden.
|
|
520
636
|
* @example
|
|
521
|
-
* liveboardEmbed.trigger(HostEvent.SetVisibleVizs, [
|
|
637
|
+
* liveboardEmbed.trigger(HostEvent.SetVisibleVizs, [
|
|
638
|
+
* '730496d6-6903-4601-937e-2c691821af3c',
|
|
639
|
+
* 'd547ec54-2a37-4516-a222-2b06719af726'])
|
|
522
640
|
* @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1-sw
|
|
523
641
|
*/
|
|
524
642
|
HostEvent["SetVisibleVizs"] = "SetPinboardVisibleVizs";
|
|
525
643
|
/**
|
|
526
644
|
* Update the runtime filters. The runtime filters passed here are extended
|
|
527
645
|
* on to the existing runtime filters if they exist.
|
|
646
|
+
*
|
|
528
647
|
* @param - {@link RuntimeFilter}[] an array of {@link RuntimeFilter} Types.
|
|
529
648
|
* @example
|
|
530
649
|
* liveboardEmbed.trigger(HostEvent.UpdateRuntimeFilters, [
|
|
531
650
|
* {columnName: "state",operator: RuntimeFilterOp.EQ,values: ["michigan"]},
|
|
532
|
-
* {columnName: "item type",operator: RuntimeFilterOp.EQ,values:
|
|
533
|
-
* ])
|
|
651
|
+
* {columnName: "item type",operator: RuntimeFilterOp.EQ,values:
|
|
652
|
+
* ["Jackets"]} ])
|
|
534
653
|
* @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw
|
|
535
654
|
*/
|
|
536
655
|
HostEvent["UpdateRuntimeFilters"] = "UpdateRuntimeFilters";
|
|
537
656
|
/**
|
|
538
657
|
* Navigate to a specific page in App embed without any reload.
|
|
539
658
|
* This is the same as calling `appEmbed.navigateToPage(path, true)`
|
|
659
|
+
*
|
|
540
660
|
* @param - path - the path to navigate to (can be a number[1/-1] to go forward/back)
|
|
541
|
-
* @example
|
|
661
|
+
* @example
|
|
662
|
+
* ```js
|
|
663
|
+
* appEmbed.navigateToPage(-1)
|
|
664
|
+
* ```
|
|
542
665
|
* @version SDK: 1.12.0 | ThoughtSpot 8.4.0.cl, 8.4.1-sw
|
|
543
666
|
*/
|
|
544
667
|
HostEvent["Navigate"] = "Navigate";
|
|
545
668
|
/**
|
|
546
669
|
* Opens the filter panel for a particular column.
|
|
547
670
|
* Works with Search embed.
|
|
548
|
-
*
|
|
549
|
-
* @
|
|
671
|
+
*
|
|
672
|
+
* @param - { columnId: string,
|
|
673
|
+
* name: string,
|
|
674
|
+
* type: INT64/CHAR/DATE,
|
|
675
|
+
* dataType: ATTRIBUTE/MEASURE }
|
|
676
|
+
* @example
|
|
677
|
+
* ```js
|
|
678
|
+
* searchEmbed.trigger(HostEvent.OpenFilter,
|
|
679
|
+
* { columnId: '123', name: 'column name', type: 'INT64', dataType: 'ATTRIBUTE' })
|
|
680
|
+
* ```
|
|
550
681
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
|
|
551
682
|
*/
|
|
552
683
|
HostEvent["OpenFilter"] = "openFilter";
|
|
553
684
|
/**
|
|
554
685
|
* Adds the columns to the current Search.
|
|
686
|
+
*
|
|
555
687
|
* @param - { columnIds: string[] }
|
|
556
|
-
* @example
|
|
688
|
+
* @example
|
|
689
|
+
* ```js
|
|
690
|
+
* searchEmbed.trigger(HostEvent.AddColumns, { columnIds: ['123', '456'] })
|
|
691
|
+
* ```
|
|
557
692
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
|
|
558
693
|
*/
|
|
559
694
|
HostEvent["AddColumns"] = "addColumns";
|
|
560
695
|
/**
|
|
561
696
|
* Removes a column from the current Search.
|
|
697
|
+
*
|
|
562
698
|
* @param - { columnId: string }
|
|
563
|
-
* @example
|
|
699
|
+
* @example
|
|
700
|
+
* ```js
|
|
701
|
+
* searchEmbed.trigger(HostEvent.RemoveColumn, { columnId: '123' })
|
|
702
|
+
* ```
|
|
564
703
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
|
|
565
704
|
*/
|
|
566
705
|
HostEvent["RemoveColumn"] = "removeColumn";
|
|
567
706
|
/**
|
|
568
707
|
* Gets the current pinboard content.
|
|
569
|
-
*
|
|
708
|
+
*
|
|
709
|
+
* @example
|
|
710
|
+
* ```js
|
|
711
|
+
* liveboardEmbed.trigger(HostEvent.getExportRequestForCurrentPinboard)
|
|
712
|
+
* ```
|
|
570
713
|
* @version SDK: 1.13.0 | ThoughtSpot: 8.5.0.cl, 8.8.1-sw
|
|
571
714
|
*/
|
|
572
715
|
HostEvent["getExportRequestForCurrentPinboard"] = "getExportRequestForCurrentPinboard";
|
|
573
716
|
/**
|
|
574
717
|
* Triggers the Pin action on an embedded object
|
|
718
|
+
*
|
|
575
719
|
* @param - incase of Liveboard embed, takes in an object with vizId as a key
|
|
576
720
|
* can be left empty for search and visualization embeds
|
|
577
721
|
* @example
|
|
722
|
+
* ```js
|
|
578
723
|
* liveboardEmbed.trigger(HostEvent.Pin, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
579
724
|
* vizEmbed.trigger(HostEvent.Pin)
|
|
580
725
|
* searchEmbed.trigger(HostEvent.Pin)
|
|
726
|
+
* ```
|
|
581
727
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
582
728
|
*/
|
|
583
729
|
HostEvent["Pin"] = "pin";
|
|
584
730
|
/**
|
|
585
731
|
* Triggers the Show Liveboard details action on a Liveboard
|
|
586
|
-
*
|
|
732
|
+
*
|
|
733
|
+
* @example
|
|
734
|
+
* ```js
|
|
735
|
+
* liveboardEmbed.trigger(HostEvent.LiveboardInfo)
|
|
736
|
+
* ```
|
|
587
737
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
588
738
|
*/
|
|
589
739
|
HostEvent["LiveboardInfo"] = "pinboardInfo";
|
|
590
740
|
/**
|
|
591
741
|
* Triggers the Schedule action on a Liveboard
|
|
592
|
-
*
|
|
742
|
+
*
|
|
743
|
+
* @example
|
|
744
|
+
* ```js
|
|
745
|
+
* liveboardEmbed.trigger(HostEvent.Schedule)
|
|
746
|
+
* ```
|
|
593
747
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
594
748
|
*/
|
|
595
749
|
HostEvent["Schedule"] = "subscription";
|
|
596
750
|
/**
|
|
597
751
|
* Triggers the Manage schedule action on a Liveboard
|
|
598
|
-
*
|
|
752
|
+
*
|
|
753
|
+
* @example
|
|
754
|
+
* ```js
|
|
755
|
+
* liveboardEmbed.trigger(HostEvent.ScheduleList)
|
|
756
|
+
* ```
|
|
599
757
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
600
758
|
*/
|
|
601
759
|
HostEvent["SchedulesList"] = "schedule-list";
|
|
602
760
|
/**
|
|
603
761
|
* Triggers the Export TML action on a Liveboard
|
|
604
|
-
*
|
|
762
|
+
*
|
|
763
|
+
* @example
|
|
764
|
+
* ```js
|
|
765
|
+
* liveboardEmbed.trigger(HostEvent.ExportTML)
|
|
766
|
+
* ```
|
|
605
767
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
606
768
|
*/
|
|
607
769
|
HostEvent["ExportTML"] = "exportTSL";
|
|
608
770
|
/**
|
|
609
771
|
* Triggers the Edit TML action on a Liveboard
|
|
610
|
-
*
|
|
772
|
+
*
|
|
773
|
+
* @example
|
|
774
|
+
* ```js
|
|
775
|
+
* liveboardEmbed.trigger(HostEvent.EditTML)
|
|
776
|
+
* ```
|
|
611
777
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
612
778
|
*/
|
|
613
779
|
HostEvent["EditTML"] = "editTSL";
|
|
614
780
|
/**
|
|
615
781
|
* Triggers the Update TML action on a Liveboard
|
|
616
|
-
*
|
|
782
|
+
*
|
|
783
|
+
* @example
|
|
784
|
+
* ```js
|
|
785
|
+
* liveboardEmbed.trigger(HostEvent.UpdateTML)
|
|
786
|
+
* ```
|
|
617
787
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
618
788
|
*/
|
|
619
789
|
HostEvent["UpdateTML"] = "updateTSL";
|
|
620
790
|
/**
|
|
621
791
|
* Triggers the Download PDF action on a Liveboard
|
|
622
|
-
*
|
|
792
|
+
*
|
|
793
|
+
* @example
|
|
794
|
+
* ```js
|
|
795
|
+
* liveboardEmbed.trigger(HostEvent.DownloadAsPDF)
|
|
796
|
+
* ```
|
|
623
797
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
624
798
|
*/
|
|
625
799
|
HostEvent["DownloadAsPdf"] = "downloadAsPdf";
|
|
626
800
|
/**
|
|
627
801
|
* Triggers the Make a copy action on a Liveboard, search or visualization
|
|
802
|
+
*
|
|
628
803
|
* @example
|
|
804
|
+
* ```js
|
|
629
805
|
* liveboardEmbed.trigger(HostEvent.MakeACopy, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
630
806
|
* vizEmbed.trigger(HostEvent.MakeACopy)
|
|
631
807
|
* searchEmbed.trigger(HostEvent.MakeACopy)
|
|
808
|
+
* ```
|
|
632
809
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
633
810
|
*/
|
|
634
811
|
HostEvent["MakeACopy"] = "makeACopy";
|
|
635
812
|
/**
|
|
636
813
|
* Triggers the Delete action on a Liveboard
|
|
637
|
-
*
|
|
814
|
+
*
|
|
815
|
+
* @example
|
|
816
|
+
* ```js
|
|
817
|
+
* appEmbed.trigger(HostEvent.Remove)
|
|
818
|
+
* ```
|
|
638
819
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
639
820
|
*/
|
|
640
821
|
HostEvent["Remove"] = "delete";
|
|
641
822
|
/**
|
|
642
823
|
* Triggers the Explore action on a visualization
|
|
824
|
+
*
|
|
643
825
|
* @param - an object with vizId as a key
|
|
644
|
-
* @example
|
|
826
|
+
* @example
|
|
827
|
+
* ```js
|
|
828
|
+
* liveboardEmbed.trigger(HostEvent.Explore, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
829
|
+
* ```
|
|
645
830
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
646
831
|
*/
|
|
647
832
|
HostEvent["Explore"] = "explore";
|
|
648
833
|
/**
|
|
649
834
|
* Triggers the Create alert action on a visualization
|
|
835
|
+
*
|
|
650
836
|
* @param - an object with vizId as a key
|
|
651
|
-
* @example
|
|
837
|
+
* @example
|
|
838
|
+
* ```js
|
|
839
|
+
* liveboardEmbed.trigger(HostEvent.CreateMonitor {
|
|
840
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
841
|
+
* })
|
|
842
|
+
* ```
|
|
652
843
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
653
844
|
*/
|
|
654
845
|
HostEvent["CreateMonitor"] = "createMonitor";
|
|
655
846
|
/**
|
|
656
847
|
* Triggers the Manage alert action on a visualization
|
|
848
|
+
*
|
|
657
849
|
* @param - an object with vizId as a key
|
|
658
|
-
* @example
|
|
850
|
+
* @example
|
|
851
|
+
* ```js
|
|
852
|
+
* liveboardEmbed.trigger(HostEvent.ManageMonitor, {
|
|
853
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
854
|
+
* })
|
|
855
|
+
* ```
|
|
659
856
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
660
857
|
*/
|
|
661
858
|
HostEvent["ManageMonitor"] = "manageMonitor";
|
|
662
859
|
/**
|
|
663
860
|
* Triggers the Edit action on a Liveboard or visualization
|
|
664
|
-
*
|
|
861
|
+
*
|
|
862
|
+
* @param - object - to trigger the action for a specfic visualization
|
|
863
|
+
* in Liveboard embed, pass in vizId as a key
|
|
665
864
|
* @example
|
|
666
865
|
* liveboardEmbed.trigger(HostEvent.Edit)
|
|
667
|
-
* liveboardEmbed.trigger(HostEvent.Edit, {vizId:
|
|
866
|
+
* liveboardEmbed.trigger(HostEvent.Edit, {vizId:
|
|
867
|
+
* '730496d6-6903-4601-937e-2c691821af3c'})
|
|
668
868
|
* vizEmbed.trigger((HostEvent.Edit)
|
|
669
869
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
670
870
|
*/
|
|
671
871
|
HostEvent["Edit"] = "edit";
|
|
672
872
|
/**
|
|
673
873
|
* Triggers the Copy link action on a Liveboard or visualization
|
|
674
|
-
*
|
|
874
|
+
*
|
|
875
|
+
* @param - object - to trigger the action for a s
|
|
876
|
+
* pecfic visualization in Liveboard embed, pass in vizId as a key
|
|
675
877
|
* @example
|
|
878
|
+
* ```js
|
|
676
879
|
* liveboardEmbed.trigger(HostEvent.CopyLink)
|
|
677
880
|
* liveboardEmbed.trigger(HostEvent.CopyLink, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
678
881
|
* vizEmbed.trigger((HostEvent.CopyLink)
|
|
882
|
+
* ```
|
|
679
883
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
680
884
|
*/
|
|
681
885
|
HostEvent["CopyLink"] = "embedDocument";
|
|
682
886
|
/**
|
|
683
887
|
* Triggers the Present action on a Liveboard or visualization
|
|
684
|
-
*
|
|
888
|
+
*
|
|
889
|
+
* @param - object - to trigger the action for a specfic visualization
|
|
890
|
+
* in Liveboard embed, pass in vizId as a key
|
|
685
891
|
* @example
|
|
892
|
+
* ```js
|
|
686
893
|
* liveboardEmbed.trigger(HostEvent.Present)
|
|
687
894
|
* liveboardEmbed.trigger(HostEvent.Present, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
688
895
|
* vizEmbed.trigger((HostEvent.Present)
|
|
896
|
+
* ```
|
|
689
897
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
690
898
|
*/
|
|
691
899
|
HostEvent["Present"] = "present";
|
|
692
900
|
/**
|
|
693
901
|
* Get TML for the current search.
|
|
694
|
-
*
|
|
902
|
+
*
|
|
903
|
+
* @example
|
|
904
|
+
* ```js
|
|
905
|
+
* searchEmbed.trigger(HostEvent.GetTML)
|
|
906
|
+
* ```
|
|
695
907
|
* @version SDK: 1.18.0 | ThoughtSpot: 8.10.0.cl
|
|
696
908
|
*/
|
|
697
909
|
HostEvent["GetTML"] = "getTML";
|
|
698
910
|
/**
|
|
699
911
|
* Triggers the ShowUnderlyingData action on visualization or search
|
|
912
|
+
*
|
|
700
913
|
* @param - an object with vizId as a key
|
|
701
914
|
* @example
|
|
702
|
-
* liveboardEmbed.trigger(HostEvent.ShowUnderlyingData, {vizId:
|
|
915
|
+
* liveboardEmbed.trigger(HostEvent.ShowUnderlyingData, {vizId:
|
|
916
|
+
* '730496d6-6903-4601-937e-2c691821af3c'})
|
|
703
917
|
* vizEmbed.trigger(HostEvent.ShowUnderlyingData)
|
|
704
918
|
* searchEmbed.trigger(HostEvent.ShowUnderlyingData)
|
|
705
919
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
@@ -707,10 +921,12 @@ export var HostEvent;
|
|
|
707
921
|
HostEvent["ShowUnderlyingData"] = "showUnderlyingData";
|
|
708
922
|
/**
|
|
709
923
|
* Triggers the Delete action on visualization or search
|
|
924
|
+
*
|
|
710
925
|
* @param - incase of Liveboard embed, takes in an object with vizId as a key
|
|
711
926
|
* can be left empty for search and visualization embeds
|
|
712
927
|
* @example
|
|
713
|
-
* liveboardEmbed.trigger(HostEvent.Delete, {vizId:
|
|
928
|
+
* liveboardEmbed.trigger(HostEvent.Delete, {vizId:
|
|
929
|
+
* '730496d6-6903-4601-937e-2c691821af3c'})
|
|
714
930
|
* vizEmbed.trigger(HostEvent.Delete)
|
|
715
931
|
* searchEmbed.trigger(HostEvent.Delete)
|
|
716
932
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
@@ -718,10 +934,12 @@ export var HostEvent;
|
|
|
718
934
|
HostEvent["Delete"] = "delete";
|
|
719
935
|
/**
|
|
720
936
|
* Triggers the SpotIQAnalyze action on visualization or search
|
|
937
|
+
*
|
|
721
938
|
* @param - incase of Liveboard embed, takes in an object with vizId as a key
|
|
722
939
|
* can be left empty for search and visualization embeds
|
|
723
940
|
* @example
|
|
724
|
-
* liveboardEmbed.trigger(HostEvent.SpotIQAnalyze, {vizId:
|
|
941
|
+
* liveboardEmbed.trigger(HostEvent.SpotIQAnalyze, {vizId:
|
|
942
|
+
* '730496d6-6903-4601-937e-2c691821af3c'})
|
|
725
943
|
* vizEmbed.trigger(HostEvent.SpotIQAnalyze)
|
|
726
944
|
* searchEmbed.trigger(HostEvent.SpotIQAnalyze)
|
|
727
945
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
@@ -729,26 +947,34 @@ export var HostEvent;
|
|
|
729
947
|
HostEvent["SpotIQAnalyze"] = "spotIQAnalyze";
|
|
730
948
|
/**
|
|
731
949
|
* Triggers the Download action on visualization or search when Displaymode is Chart
|
|
950
|
+
*
|
|
732
951
|
* @example
|
|
733
|
-
* liveboardEmbed.trigger(HostEvent.Download, {vizId:
|
|
952
|
+
* liveboardEmbed.trigger(HostEvent.Download, {vizId:
|
|
953
|
+
* '730496d6-6903-4601-937e-2c691821af3c'})
|
|
734
954
|
* vizEmbed.trigger(HostEvent.Download)
|
|
735
955
|
* searchEmbed.trigger(HostEvent.Download)
|
|
736
956
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
737
957
|
*/
|
|
738
958
|
HostEvent["Download"] = "download";
|
|
739
959
|
/**
|
|
740
|
-
* Triggers the downloadAsCSV action on visualization or search when Displaymode is
|
|
960
|
+
* Triggers the downloadAsCSV action on visualization or search when Displaymode is
|
|
961
|
+
* Table
|
|
962
|
+
*
|
|
741
963
|
* @example
|
|
742
|
-
* liveboardEmbed.trigger(HostEvent.DownloadAsCsv, {vizId:
|
|
964
|
+
* liveboardEmbed.trigger(HostEvent.DownloadAsCsv, {vizId:
|
|
965
|
+
* '730496d6-6903-4601-937e-2c691821af3c'})
|
|
743
966
|
* vizEmbed.trigger(HostEvent.DownloadAsCsv)
|
|
744
967
|
* searchEmbed.trigger(HostEvent.DownloadAsCsv)
|
|
745
968
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
746
969
|
*/
|
|
747
970
|
HostEvent["DownloadAsCsv"] = "downloadAsCSV";
|
|
748
971
|
/**
|
|
749
|
-
* Triggers the downloadAsXLSX action on visualization or search when Displaymode is
|
|
972
|
+
* Triggers the downloadAsXLSX action on visualization or search when Displaymode is
|
|
973
|
+
* Table
|
|
974
|
+
*
|
|
750
975
|
* @example
|
|
751
|
-
* liveboardEmbed.trigger(HostEvent.DownloadAsXlsx, {vizId:
|
|
976
|
+
* liveboardEmbed.trigger(HostEvent.DownloadAsXlsx, {vizId:
|
|
977
|
+
* '730496d6-6903-4601-937e-2c691821af3c'})
|
|
752
978
|
* vizEmbed.trigger(HostEvent.DownloadAsXlsx)
|
|
753
979
|
* searchEmbed.trigger(HostEvent.DownloadAsXlsx)
|
|
754
980
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
@@ -756,6 +982,7 @@ export var HostEvent;
|
|
|
756
982
|
HostEvent["DownloadAsXlsx"] = "downloadAsXLSX";
|
|
757
983
|
/**
|
|
758
984
|
* Triggers the Share action on a liveboard or answer
|
|
985
|
+
*
|
|
759
986
|
* @example
|
|
760
987
|
* liveboardEmbed.trigger(HostEvent.Share)
|
|
761
988
|
* searchEmbed.trigger(HostEvent.Share)
|
|
@@ -764,6 +991,7 @@ export var HostEvent;
|
|
|
764
991
|
HostEvent["Share"] = "share";
|
|
765
992
|
/**
|
|
766
993
|
* Trigger the Save action on a liveboard or answer
|
|
994
|
+
*
|
|
767
995
|
* @example
|
|
768
996
|
* liveboardEmbed.trigger(HostEvent.Save)
|
|
769
997
|
* searchEmbed.trigger(HostEvent.Save)
|
|
@@ -772,33 +1000,40 @@ export var HostEvent;
|
|
|
772
1000
|
HostEvent["Save"] = "save";
|
|
773
1001
|
/**
|
|
774
1002
|
* Triggers the SyncToSheets action on visualization
|
|
1003
|
+
*
|
|
775
1004
|
* @param - an object with vizId as a key
|
|
776
1005
|
* @example
|
|
777
|
-
* liveboardEmbed.trigger(HostEvent.SyncToSheets, {vizId:
|
|
1006
|
+
* liveboardEmbed.trigger(HostEvent.SyncToSheets, {vizId:
|
|
1007
|
+
* '730496d6-6903-4601-937e-2c691821af3c'})
|
|
778
1008
|
* vizEmbed.trigger(HostEvent.SyncToSheets)
|
|
779
1009
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
780
1010
|
*/
|
|
781
1011
|
HostEvent["SyncToSheets"] = "sync-to-sheets";
|
|
782
1012
|
/**
|
|
783
1013
|
* Triggers the SyncToOtherApps action on visualization
|
|
1014
|
+
*
|
|
784
1015
|
* @param - an object with vizId as a key
|
|
785
1016
|
* @example
|
|
786
|
-
* liveboardEmbed.trigger(HostEvent.SyncToOtherApps, {vizId:
|
|
1017
|
+
* liveboardEmbed.trigger(HostEvent.SyncToOtherApps, {vizId:
|
|
1018
|
+
* '730496d6-6903-4601-937e-2c691821af3c'})
|
|
787
1019
|
* vizEmbed.trigger(HostEvent.SyncToOtherApps)
|
|
788
1020
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
789
1021
|
*/
|
|
790
1022
|
HostEvent["SyncToOtherApps"] = "sync-to-other-apps";
|
|
791
1023
|
/**
|
|
792
1024
|
* Triggers the ManagePipelines action on visualization
|
|
1025
|
+
*
|
|
793
1026
|
* @param - an object with vizId as a key
|
|
794
1027
|
* @example
|
|
795
|
-
* liveboardEmbed.trigger(HostEvent.ManagePipelines, {vizId:
|
|
1028
|
+
* liveboardEmbed.trigger(HostEvent.ManagePipelines, {vizId:
|
|
1029
|
+
* '730496d6-6903-4601-937e-2c691821af3c'})
|
|
796
1030
|
* vizEmbed.trigger(HostEvent.ManagePipelines)
|
|
797
1031
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
798
1032
|
*/
|
|
799
1033
|
HostEvent["ManagePipelines"] = "manage-pipeline";
|
|
800
1034
|
/**
|
|
801
1035
|
* Triggers the Reset search in answer
|
|
1036
|
+
*
|
|
802
1037
|
* @example
|
|
803
1038
|
* searchEmbed.trigger(HostEvent.SearchReset
|
|
804
1039
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.0.1-sw
|
|
@@ -832,6 +1067,7 @@ export var DataSourceVisualMode;
|
|
|
832
1067
|
// eslint-disable-next-line no-shadow
|
|
833
1068
|
export var Param;
|
|
834
1069
|
(function (Param) {
|
|
1070
|
+
Param["EmbedApp"] = "embedApp";
|
|
835
1071
|
Param["DataSources"] = "dataSources";
|
|
836
1072
|
Param["DataSourceMode"] = "dataSourceMode";
|
|
837
1073
|
Param["DisableActions"] = "disableAction";
|
|
@@ -872,6 +1108,8 @@ export var Param;
|
|
|
872
1108
|
Param["ContextMenuTrigger"] = "isContextMenuEnabledOnLeftClick";
|
|
873
1109
|
Param["LinkOverride"] = "linkOverride";
|
|
874
1110
|
Param["ShowInsertToSlide"] = "insertInToSlide";
|
|
1111
|
+
Param["PrimaryNavHidden"] = "primaryNavHidden";
|
|
1112
|
+
Param["HideProfleAndHelp"] = "profileAndHelpInNavBarHidden";
|
|
875
1113
|
})(Param || (Param = {}));
|
|
876
1114
|
/**
|
|
877
1115
|
* The list of actions that can be performed on visual ThoughtSpot
|