@thoughtspot/visual-embed-sdk 1.46.1 → 1.46.3
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/cjs/package.json +1 -1
- package/cjs/src/auth.d.ts +29 -4
- package/cjs/src/auth.d.ts.map +1 -1
- package/cjs/src/auth.js +29 -7
- package/cjs/src/auth.js.map +1 -1
- package/cjs/src/auth.spec.js +1 -3
- package/cjs/src/auth.spec.js.map +1 -1
- package/cjs/src/authToken.js +0 -1
- package/cjs/src/authToken.js.map +1 -1
- package/cjs/src/authToken.spec.js +2 -1
- package/cjs/src/authToken.spec.js.map +1 -1
- package/cjs/src/css-variables.d.ts +17 -17
- package/cjs/src/embed/app.d.ts +62 -33
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +10 -3
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/app.spec.js +34 -1
- package/cjs/src/embed/app.spec.js.map +1 -1
- package/cjs/src/embed/auto-frame-renderer.d.ts +41 -0
- package/cjs/src/embed/auto-frame-renderer.d.ts.map +1 -0
- package/cjs/src/embed/auto-frame-renderer.js +145 -0
- package/cjs/src/embed/auto-frame-renderer.js.map +1 -0
- package/cjs/src/embed/auto-frame-renderer.spec.d.ts +2 -0
- package/cjs/src/embed/auto-frame-renderer.spec.d.ts.map +1 -0
- package/cjs/src/embed/auto-frame-renderer.spec.js +195 -0
- package/cjs/src/embed/auto-frame-renderer.spec.js.map +1 -0
- package/cjs/src/embed/base.d.ts +2 -2
- package/cjs/src/embed/base.d.ts.map +1 -1
- package/cjs/src/embed/base.js +6 -9
- package/cjs/src/embed/base.js.map +1 -1
- package/cjs/src/embed/bodyless-conversation.d.ts +5 -5
- package/cjs/src/embed/bodyless-conversation.js +4 -4
- package/cjs/src/embed/conversation.d.ts +43 -30
- package/cjs/src/embed/conversation.d.ts.map +1 -1
- package/cjs/src/embed/conversation.js +10 -11
- package/cjs/src/embed/conversation.js.map +1 -1
- package/cjs/src/embed/conversation.spec.js +27 -0
- package/cjs/src/embed/conversation.spec.js.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.js +0 -2
- package/cjs/src/embed/hostEventClient/host-event-client.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts +42 -35
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +6 -4
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/liveboard.spec.js +5 -3
- package/cjs/src/embed/liveboard.spec.js.map +1 -1
- package/cjs/src/embed/sage.d.ts +5 -5
- package/cjs/src/embed/sage.js +1 -2
- package/cjs/src/embed/sage.js.map +1 -1
- package/cjs/src/embed/search-bar.d.ts +7 -7
- package/cjs/src/embed/search-bar.js +1 -1
- package/cjs/src/embed/search.d.ts +13 -12
- package/cjs/src/embed/search.d.ts.map +1 -1
- package/cjs/src/embed/search.js.map +1 -1
- package/cjs/src/embed/search.spec.js +0 -2
- package/cjs/src/embed/search.spec.js.map +1 -1
- package/cjs/src/embed/ts-embed.d.ts +3 -3
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +15 -9
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/embed/ts-embed.spec.js +37 -1
- package/cjs/src/embed/ts-embed.spec.js.map +1 -1
- package/cjs/src/index.d.ts +3 -2
- package/cjs/src/index.d.ts.map +1 -1
- package/cjs/src/index.js +3 -1
- package/cjs/src/index.js.map +1 -1
- package/cjs/src/react/index.d.ts +15 -15
- package/cjs/src/react/index.js +12 -13
- package/cjs/src/react/index.js.map +1 -1
- package/cjs/src/react/index.spec.js +6 -3
- package/cjs/src/react/index.spec.js.map +1 -1
- package/cjs/src/tokenizedFetch.d.ts +1 -1
- package/cjs/src/tokenizedFetch.js +1 -1
- package/cjs/src/types.d.ts +350 -287
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +240 -218
- package/cjs/src/types.js.map +1 -1
- package/cjs/src/utils/graphql/answerService/answerService.d.ts +9 -6
- package/cjs/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
- package/cjs/src/utils/graphql/answerService/answerService.js +13 -15
- package/cjs/src/utils/graphql/answerService/answerService.js.map +1 -1
- package/cjs/src/utils/graphql/answerService/answerService.spec.js +55 -0
- package/cjs/src/utils/graphql/answerService/answerService.spec.js.map +1 -1
- package/cjs/src/utils/graphql/preview-service.js +0 -1
- package/cjs/src/utils/graphql/preview-service.js.map +1 -1
- package/cjs/src/utils/processData.js +0 -5
- package/cjs/src/utils/processData.js.map +1 -1
- package/cjs/src/utils.d.ts +9 -0
- package/cjs/src/utils.d.ts.map +1 -1
- package/cjs/src/utils.js +10 -1
- package/cjs/src/utils.js.map +1 -1
- package/dist/{index-Vyh6Ha5f.js → index-DyX-x6uN.js} +1 -1
- package/dist/src/auth.d.ts +29 -4
- package/dist/src/auth.d.ts.map +1 -1
- package/dist/src/css-variables.d.ts +17 -17
- package/dist/src/embed/app.d.ts +62 -33
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/auto-frame-renderer.d.ts +41 -0
- package/dist/src/embed/auto-frame-renderer.d.ts.map +1 -0
- package/dist/src/embed/auto-frame-renderer.spec.d.ts +2 -0
- package/dist/src/embed/auto-frame-renderer.spec.d.ts.map +1 -0
- package/dist/src/embed/base.d.ts +2 -2
- package/dist/src/embed/base.d.ts.map +1 -1
- package/dist/src/embed/bodyless-conversation.d.ts +5 -5
- package/dist/src/embed/conversation.d.ts +43 -30
- package/dist/src/embed/conversation.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts +42 -35
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/embed/sage.d.ts +5 -5
- package/dist/src/embed/search-bar.d.ts +7 -7
- package/dist/src/embed/search.d.ts +13 -12
- package/dist/src/embed/search.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.d.ts +3 -3
- package/dist/src/embed/ts-embed.d.ts.map +1 -1
- package/dist/src/index.d.ts +3 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/react/index.d.ts +15 -15
- package/dist/src/tokenizedFetch.d.ts +1 -1
- package/dist/src/types.d.ts +350 -287
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/graphql/answerService/answerService.d.ts +9 -6
- package/dist/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
- package/dist/src/utils.d.ts +9 -0
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +359 -329
- package/dist/tsembed-react.js +358 -328
- package/dist/tsembed.es.js +490 -321
- package/dist/tsembed.js +489 -319
- package/dist/visual-embed-sdk-react-full.d.ts +574 -442
- package/dist/visual-embed-sdk-react.d.ts +572 -440
- package/dist/visual-embed-sdk.d.ts +622 -446
- package/lib/package.json +1 -1
- package/lib/src/auth.d.ts +29 -4
- package/lib/src/auth.d.ts.map +1 -1
- package/lib/src/auth.js +29 -7
- package/lib/src/auth.js.map +1 -1
- package/lib/src/auth.spec.js +1 -3
- package/lib/src/auth.spec.js.map +1 -1
- package/lib/src/authToken.js +0 -1
- package/lib/src/authToken.js.map +1 -1
- package/lib/src/authToken.spec.js +2 -1
- package/lib/src/authToken.spec.js.map +1 -1
- package/lib/src/css-variables.d.ts +17 -17
- package/lib/src/embed/app.d.ts +62 -33
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +11 -4
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/app.spec.js +34 -1
- package/lib/src/embed/app.spec.js.map +1 -1
- package/lib/src/embed/auto-frame-renderer.d.ts +41 -0
- package/lib/src/embed/auto-frame-renderer.d.ts.map +1 -0
- package/lib/src/embed/auto-frame-renderer.js +141 -0
- package/lib/src/embed/auto-frame-renderer.js.map +1 -0
- package/lib/src/embed/auto-frame-renderer.spec.d.ts +2 -0
- package/lib/src/embed/auto-frame-renderer.spec.d.ts.map +1 -0
- package/lib/src/embed/auto-frame-renderer.spec.js +192 -0
- package/lib/src/embed/auto-frame-renderer.spec.js.map +1 -0
- package/lib/src/embed/base.d.ts +2 -2
- package/lib/src/embed/base.d.ts.map +1 -1
- package/lib/src/embed/base.js +6 -9
- package/lib/src/embed/base.js.map +1 -1
- package/lib/src/embed/bodyless-conversation.d.ts +5 -5
- package/lib/src/embed/bodyless-conversation.js +4 -4
- package/lib/src/embed/conversation.d.ts +43 -30
- package/lib/src/embed/conversation.d.ts.map +1 -1
- package/lib/src/embed/conversation.js +11 -11
- package/lib/src/embed/conversation.js.map +1 -1
- package/lib/src/embed/conversation.spec.js +27 -0
- package/lib/src/embed/conversation.spec.js.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.js +0 -2
- package/lib/src/embed/hostEventClient/host-event-client.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts +42 -35
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +6 -4
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +5 -3
- package/lib/src/embed/liveboard.spec.js.map +1 -1
- package/lib/src/embed/sage.d.ts +5 -5
- package/lib/src/embed/sage.js +1 -2
- package/lib/src/embed/sage.js.map +1 -1
- package/lib/src/embed/search-bar.d.ts +7 -7
- package/lib/src/embed/search-bar.js +1 -1
- package/lib/src/embed/search.d.ts +13 -12
- package/lib/src/embed/search.d.ts.map +1 -1
- package/lib/src/embed/search.js.map +1 -1
- package/lib/src/embed/search.spec.js +0 -2
- package/lib/src/embed/search.spec.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts +3 -3
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +15 -9
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/embed/ts-embed.spec.js +37 -1
- package/lib/src/embed/ts-embed.spec.js.map +1 -1
- package/lib/src/index.d.ts +3 -2
- package/lib/src/index.d.ts.map +1 -1
- package/lib/src/index.js +1 -0
- package/lib/src/index.js.map +1 -1
- package/lib/src/react/index.d.ts +15 -15
- package/lib/src/react/index.js +12 -13
- package/lib/src/react/index.js.map +1 -1
- package/lib/src/react/index.spec.js +6 -3
- package/lib/src/react/index.spec.js.map +1 -1
- package/lib/src/tokenizedFetch.d.ts +1 -1
- package/lib/src/tokenizedFetch.js +1 -1
- package/lib/src/types.d.ts +350 -287
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +240 -218
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils/graphql/answerService/answerService.d.ts +9 -6
- package/lib/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
- package/lib/src/utils/graphql/answerService/answerService.js +12 -14
- package/lib/src/utils/graphql/answerService/answerService.js.map +1 -1
- package/lib/src/utils/graphql/answerService/answerService.spec.js +55 -0
- package/lib/src/utils/graphql/answerService/answerService.spec.js.map +1 -1
- package/lib/src/utils/graphql/preview-service.js +0 -1
- package/lib/src/utils/graphql/preview-service.js.map +1 -1
- package/lib/src/utils/processData.js +0 -5
- package/lib/src/utils/processData.js.map +1 -1
- package/lib/src/utils.d.ts +9 -0
- package/lib/src/utils.d.ts.map +1 -1
- package/lib/src/utils.js +8 -0
- package/lib/src/utils.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +11466 -0
- package/package.json +1 -1
- package/src/auth.spec.ts +1 -1
- package/src/auth.ts +32 -7
- package/src/authToken.spec.ts +2 -1
- package/src/authToken.ts +1 -1
- package/src/css-variables.ts +17 -17
- package/src/embed/app.spec.ts +46 -1
- package/src/embed/app.ts +74 -36
- package/src/embed/auto-frame-renderer.spec.ts +266 -0
- package/src/embed/auto-frame-renderer.ts +152 -0
- package/src/embed/base.spec.ts +1 -1
- package/src/embed/base.ts +9 -10
- package/src/embed/bodyless-conversation.ts +5 -5
- package/src/embed/conversation.spec.ts +37 -0
- package/src/embed/conversation.ts +55 -38
- package/src/embed/hostEventClient/host-event-client.ts +2 -2
- package/src/embed/liveboard.spec.ts +5 -3
- package/src/embed/liveboard.ts +47 -38
- package/src/embed/sage.ts +6 -6
- package/src/embed/search-bar.tsx +7 -7
- package/src/embed/search.spec.ts +2 -2
- package/src/embed/search.ts +13 -12
- package/src/embed/ts-embed.spec.ts +44 -1
- package/src/embed/ts-embed.ts +14 -9
- package/src/index.ts +3 -0
- package/src/react/index.spec.tsx +6 -3
- package/src/react/index.tsx +16 -16
- package/src/tokenizedFetch.ts +1 -1
- package/src/types.ts +350 -286
- package/src/utils/graphql/answerService/answerService.spec.ts +62 -0
- package/src/utils/graphql/answerService/answerService.ts +14 -10
- package/src/utils/graphql/preview-service.ts +1 -1
- package/src/utils/processData.ts +5 -5
- package/src/utils.ts +14 -0
package/dist/tsembed.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @thoughtspot/visual-embed-sdk version 1.46.
|
|
1
|
+
/* @thoughtspot/visual-embed-sdk version 1.46.3 */
|
|
2
2
|
'use client';
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
* @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
|
|
30
30
|
*/
|
|
31
31
|
/**
|
|
32
|
-
* The authentication mechanism for allowing access to
|
|
32
|
+
* The authentication mechanism for allowing access to
|
|
33
33
|
* the embedded app
|
|
34
34
|
* @group Authentication / Init
|
|
35
35
|
*/
|
|
@@ -55,6 +55,7 @@
|
|
|
55
55
|
* To use this:
|
|
56
56
|
* Your SAML or OpenID provider must allow iframe redirects.
|
|
57
57
|
* For example, if you are using Okta as IdP, you can enable iframe embedding.
|
|
58
|
+
* @version SDK: 1.15.0 | ThoughtSpot: 8.8.0.cl
|
|
58
59
|
* @example
|
|
59
60
|
* ```js
|
|
60
61
|
* init({
|
|
@@ -62,18 +63,17 @@
|
|
|
62
63
|
* authType: AuthType.EmbeddedSSO,
|
|
63
64
|
* });
|
|
64
65
|
* ```
|
|
65
|
-
* @version: SDK: 1.15.0 | ThoughtSpot: 8.8.0.cl
|
|
66
66
|
*/
|
|
67
67
|
AuthType["EmbeddedSSO"] = "EmbeddedSSO";
|
|
68
68
|
/**
|
|
69
|
-
* SSO using SAML
|
|
70
|
-
* @deprecated
|
|
69
|
+
* SSO using SAML, Use {@link SAMLRedirect} instead
|
|
70
|
+
* @deprecated This option is deprecated.
|
|
71
71
|
* @hidden
|
|
72
72
|
*/
|
|
73
73
|
AuthType["SSO"] = "SSO_SAML";
|
|
74
74
|
/**
|
|
75
|
-
* SSO using SAML
|
|
76
|
-
* @deprecated
|
|
75
|
+
* SSO using SAML, Use {@link SAMLRedirect} instead
|
|
76
|
+
* @deprecated This option is deprecated.
|
|
77
77
|
* @hidden
|
|
78
78
|
*/
|
|
79
79
|
AuthType["SAML"] = "SSO_SAML";
|
|
@@ -124,8 +124,9 @@
|
|
|
124
124
|
AuthType["SAMLRedirect"] = "SSO_SAML";
|
|
125
125
|
/**
|
|
126
126
|
* SSO using OIDC
|
|
127
|
+
* SSO using OIDC, Use {@link OIDCRedirect} instead
|
|
128
|
+
* @deprecated This option is deprecated.
|
|
127
129
|
* @hidden
|
|
128
|
-
* @deprecated Use {@link OIDCRedirect} instead
|
|
129
130
|
*/
|
|
130
131
|
AuthType["OIDC"] = "SSO_OIDC";
|
|
131
132
|
/**
|
|
@@ -136,8 +137,9 @@
|
|
|
136
137
|
AuthType["OIDCRedirect"] = "SSO_OIDC";
|
|
137
138
|
/**
|
|
138
139
|
* Trusted authentication server
|
|
140
|
+
* Use {@link TrustedAuth} instead
|
|
141
|
+
* @deprecated This option is deprecated.
|
|
139
142
|
* @hidden
|
|
140
|
-
* @deprecated Use {@link TrustedAuth} instead
|
|
141
143
|
*/
|
|
142
144
|
AuthType["AuthServer"] = "AuthServer";
|
|
143
145
|
/**
|
|
@@ -164,6 +166,7 @@
|
|
|
164
166
|
* obtained from ThoughtSpot. This uses a cookieless authentication
|
|
165
167
|
* approach, recommended to bypass the third-party cookie-blocking restriction
|
|
166
168
|
* implemented by some browsers.
|
|
169
|
+
* @version SDK: 1.22.0 | ThoughtSpot: 9.3.0.cl, 9.5.1.sw
|
|
167
170
|
* @example
|
|
168
171
|
* ```js
|
|
169
172
|
* init({
|
|
@@ -174,8 +177,8 @@
|
|
|
174
177
|
* .then((response) => response.json())
|
|
175
178
|
* .then((data) => data.token);
|
|
176
179
|
* }
|
|
180
|
+
* });
|
|
177
181
|
* ```
|
|
178
|
-
* @version SDK: 1.22.0| ThoughtSpot: 9.3.0.cl, 9.5.1.sw
|
|
179
182
|
*/
|
|
180
183
|
AuthType["TrustedAuthTokenCookieless"] = "AuthServerCookieless";
|
|
181
184
|
/**
|
|
@@ -196,43 +199,43 @@
|
|
|
196
199
|
/**
|
|
197
200
|
* The *Search data* option in
|
|
198
201
|
* the *Insights* left navigation panel.
|
|
199
|
-
* @version SDK: 1.28.0| ThoughtSpot: 9.12.5.cl
|
|
202
|
+
* @version SDK: 1.28.0 | ThoughtSpot: 9.12.5.cl
|
|
200
203
|
*/
|
|
201
204
|
HomeLeftNavItem["SearchData"] = "search-data";
|
|
202
205
|
/**
|
|
203
206
|
* The *Home* menu option in
|
|
204
207
|
* the *Insights* left navigation panel.
|
|
205
|
-
* @version SDK: 1.28.0| ThoughtSpot: 9.12.5.cl
|
|
208
|
+
* @version SDK: 1.28.0 | ThoughtSpot: 9.12.5.cl
|
|
206
209
|
*/
|
|
207
210
|
HomeLeftNavItem["Home"] = "insights-home";
|
|
208
211
|
/**
|
|
209
212
|
* The *Liveboards* menu option in
|
|
210
213
|
* the *Insights* left navigation panel.
|
|
211
|
-
* @version SDK: 1.28.0| ThoughtSpot: 9.12.5.cl
|
|
214
|
+
* @version SDK: 1.28.0 | ThoughtSpot: 9.12.5.cl
|
|
212
215
|
*/
|
|
213
216
|
HomeLeftNavItem["Liveboards"] = "liveboards";
|
|
214
217
|
/**
|
|
215
218
|
* The *Answers* menu option in
|
|
216
219
|
* the *Insights* left navigation panel.
|
|
217
|
-
* @version SDK: 1.28.0| ThoughtSpot: 9.12.5.cl
|
|
220
|
+
* @version SDK: 1.28.0 | ThoughtSpot: 9.12.5.cl
|
|
218
221
|
*/
|
|
219
222
|
HomeLeftNavItem["Answers"] = "answers";
|
|
220
223
|
/**
|
|
221
224
|
* The *Monitor subscriptions* menu option in
|
|
222
225
|
* the *Insights* left navigation panel.
|
|
223
|
-
* @version SDK: 1.28.0| ThoughtSpot: 9.12.5.cl
|
|
226
|
+
* @version SDK: 1.28.0 | ThoughtSpot: 9.12.5.cl
|
|
224
227
|
*/
|
|
225
228
|
HomeLeftNavItem["MonitorSubscription"] = "monitor-alerts";
|
|
226
229
|
/**
|
|
227
230
|
* The *SpotIQ analysis* menu option in
|
|
228
231
|
* the *Insights* left navigation panel.
|
|
229
|
-
* @version SDK: 1.28.0| ThoughtSpot: 9.12.5.cl
|
|
232
|
+
* @version SDK: 1.28.0 | ThoughtSpot: 9.12.5.cl
|
|
230
233
|
*/
|
|
231
234
|
HomeLeftNavItem["SpotIQAnalysis"] = "spotiq-analysis";
|
|
232
235
|
/**
|
|
233
236
|
* The *Liveboard schedules* menu option in
|
|
234
237
|
* the *Insights* left navigation panel.
|
|
235
|
-
* @version SDK: 1.34.0| ThoughtSpot: 10.3.0.cl
|
|
238
|
+
* @version SDK: 1.34.0 | ThoughtSpot: 10.3.0.cl
|
|
236
239
|
*/
|
|
237
240
|
HomeLeftNavItem["LiveboardSchedules"] = "liveboard-schedules";
|
|
238
241
|
/**
|
|
@@ -338,7 +341,7 @@
|
|
|
338
341
|
*/
|
|
339
342
|
HomepageModule["Search"] = "SEARCH";
|
|
340
343
|
/**
|
|
341
|
-
*
|
|
344
|
+
* KPI watchlist module
|
|
342
345
|
*/
|
|
343
346
|
HomepageModule["Watchlist"] = "WATCHLIST";
|
|
344
347
|
/**
|
|
@@ -370,7 +373,8 @@
|
|
|
370
373
|
*/
|
|
371
374
|
ListPageColumns["Favorites"] = "FAVOURITE";
|
|
372
375
|
/**
|
|
373
|
-
*
|
|
376
|
+
* Favourite Use {@link ListPageColumns.Favorites} instead.
|
|
377
|
+
* @deprecated This option is deprecated.
|
|
374
378
|
*/
|
|
375
379
|
ListPageColumns["Favourite"] = "FAVOURITE";
|
|
376
380
|
/**
|
|
@@ -438,13 +442,13 @@
|
|
|
438
442
|
/**
|
|
439
443
|
* Rendering has initialized.
|
|
440
444
|
* @example
|
|
441
|
-
|
|
445
|
+
* ```js
|
|
442
446
|
* liveboardEmbed.on(EmbedEvent.Init, showLoader)
|
|
443
447
|
* //show a loader
|
|
444
448
|
* function showLoader() {
|
|
445
449
|
* document.getElementById("loader");
|
|
446
450
|
* }
|
|
447
|
-
|
|
451
|
+
* ```
|
|
448
452
|
* @returns timestamp - The timestamp when the event was generated.
|
|
449
453
|
*/
|
|
450
454
|
EmbedEvent["Init"] = "init";
|
|
@@ -452,11 +456,11 @@
|
|
|
452
456
|
* Authentication has either succeeded or failed.
|
|
453
457
|
* @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
|
|
454
458
|
* @example
|
|
455
|
-
|
|
459
|
+
* ```js
|
|
456
460
|
* appEmbed.on(EmbedEvent.AuthInit, payload => {
|
|
457
461
|
* console.log('AuthInit', payload);
|
|
458
462
|
* })
|
|
459
|
-
|
|
463
|
+
* ```
|
|
460
464
|
* @returns isLoggedIn - A Boolean specifying whether authentication was successful.
|
|
461
465
|
*/
|
|
462
466
|
EmbedEvent["AuthInit"] = "authInit";
|
|
@@ -465,13 +469,13 @@
|
|
|
465
469
|
* @returns timestamp - The timestamp when the event was generated.
|
|
466
470
|
* @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
|
|
467
471
|
* @example
|
|
468
|
-
|
|
472
|
+
* ```js
|
|
469
473
|
* liveboardEmbed.on(EmbedEvent.Load, hideLoader)
|
|
470
474
|
* //hide loader
|
|
471
475
|
* function hideLoader() {
|
|
472
476
|
* document.getElementById("loader");
|
|
473
477
|
* }
|
|
474
|
-
|
|
478
|
+
* ```
|
|
475
479
|
*/
|
|
476
480
|
EmbedEvent["Load"] = "load";
|
|
477
481
|
/**
|
|
@@ -480,11 +484,11 @@
|
|
|
480
484
|
* @return data - Answer of Liveboard data
|
|
481
485
|
* @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
|
|
482
486
|
* @example
|
|
483
|
-
|
|
487
|
+
* ```js
|
|
484
488
|
* liveboardEmbed.on(EmbedEvent.Data, payload => {
|
|
485
489
|
* console.log('data', payload);
|
|
486
490
|
* })
|
|
487
|
-
|
|
491
|
+
* ```
|
|
488
492
|
* @important
|
|
489
493
|
*/
|
|
490
494
|
EmbedEvent["Data"] = "data";
|
|
@@ -492,9 +496,9 @@
|
|
|
492
496
|
* Search query has been updated by the user.
|
|
493
497
|
* @version SDK: 1.4.0 | ThoughtSpot: ts7.sep.cl, 8.4.1.sw
|
|
494
498
|
* @example
|
|
495
|
-
|
|
499
|
+
* ```js
|
|
496
500
|
* searchEmbed.on(EmbedEvent.QueryChanged, payload => console.log('data', payload))
|
|
497
|
-
|
|
501
|
+
* ```
|
|
498
502
|
*/
|
|
499
503
|
EmbedEvent["QueryChanged"] = "queryChanged";
|
|
500
504
|
/**
|
|
@@ -504,7 +508,7 @@
|
|
|
504
508
|
* @returns drillDownColumns - The columns on which drill down was performed
|
|
505
509
|
* @returns nonFilteredColumns - The columns that were not filtered
|
|
506
510
|
* @example
|
|
507
|
-
|
|
511
|
+
* ```js
|
|
508
512
|
* searchEmbed.on(EmbedEvent.DrillDown, {
|
|
509
513
|
* points: {
|
|
510
514
|
* clickedPoint,
|
|
@@ -512,12 +516,12 @@
|
|
|
512
516
|
* },
|
|
513
517
|
* autoDrillDown: true,
|
|
514
518
|
* })
|
|
515
|
-
|
|
519
|
+
* ```
|
|
516
520
|
* In this example, `VizPointDoubleClick` event is used for
|
|
517
521
|
* triggering the `DrillDown` event when an area or specific
|
|
518
522
|
* data point on a table or chart is double-clicked.
|
|
519
523
|
* @example
|
|
520
|
-
|
|
524
|
+
* ```js
|
|
521
525
|
* searchEmbed.on(EmbedEvent.VizPointDoubleClick, (payload) => {
|
|
522
526
|
* console.log(payload);
|
|
523
527
|
* const clickedPoint = payload.data.clickedPoint;
|
|
@@ -531,7 +535,7 @@
|
|
|
531
535
|
* autoDrillDown: true,
|
|
532
536
|
* })
|
|
533
537
|
* })
|
|
534
|
-
|
|
538
|
+
* ```
|
|
535
539
|
*/
|
|
536
540
|
EmbedEvent["Drilldown"] = "drillDown";
|
|
537
541
|
/**
|
|
@@ -656,13 +660,13 @@
|
|
|
656
660
|
* The ThoughtSpot authentication session has expired.
|
|
657
661
|
* @version SDK: 1.4.0 | ThoughtSpot: ts7.sep.cl, 8.4.1.sw
|
|
658
662
|
* @example
|
|
659
|
-
|
|
663
|
+
* ```js
|
|
660
664
|
* appEmbed.on(EmbedEvent.AuthExpire, showAuthExpired)
|
|
661
665
|
* //show auth expired banner
|
|
662
666
|
* function showAuthExpired() {
|
|
663
667
|
* document.getElementById("authExpiredBanner");
|
|
664
668
|
* }
|
|
665
|
-
|
|
669
|
+
* ```
|
|
666
670
|
*/
|
|
667
671
|
EmbedEvent["AuthExpire"] = "ThoughtspotAuthExpired";
|
|
668
672
|
/**
|
|
@@ -697,22 +701,22 @@
|
|
|
697
701
|
* Applicable to `SearchBarEmbed` only.
|
|
698
702
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
699
703
|
* @example
|
|
700
|
-
|
|
704
|
+
* ```js
|
|
701
705
|
* searchbarEmbed.on(EmbedEvent.GetDataClick)
|
|
702
706
|
* .then(data => {
|
|
703
707
|
* console.log('Answer Data:', data);
|
|
704
708
|
* })
|
|
705
|
-
|
|
709
|
+
* ```
|
|
706
710
|
*/
|
|
707
711
|
EmbedEvent["GetDataClick"] = "getDataClick";
|
|
708
712
|
/**
|
|
709
713
|
* Detects the route change.
|
|
710
714
|
* @version SDK: 1.7.0 | ThoughtSpot: 8.0.0.cl, 8.4.1.sw
|
|
711
715
|
* @example
|
|
712
|
-
|
|
716
|
+
* ```js
|
|
713
717
|
* searchEmbed.on(EmbedEvent.RouteChange, payload =>
|
|
714
718
|
* console.log('data', payload))
|
|
715
|
-
|
|
719
|
+
* ```
|
|
716
720
|
*/
|
|
717
721
|
EmbedEvent["RouteChange"] = "ROUTE_CHANGE";
|
|
718
722
|
/**
|
|
@@ -722,12 +726,12 @@
|
|
|
722
726
|
EmbedEvent["V1Data"] = "exportVizDataToParent";
|
|
723
727
|
/**
|
|
724
728
|
* Emitted when the embed does not have cookie access. This happens
|
|
725
|
-
* when
|
|
726
|
-
*
|
|
729
|
+
* when third-party cookies are blocked by Safari or other
|
|
730
|
+
* web browsers. `NoCookieAccess` can trigger.
|
|
727
731
|
* @example
|
|
728
|
-
|
|
732
|
+
* ```js
|
|
729
733
|
* appEmbed.on(EmbedEvent.NoCookieAccess)
|
|
730
|
-
|
|
734
|
+
* ```
|
|
731
735
|
* @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 7.2.1.sw
|
|
732
736
|
*/
|
|
733
737
|
EmbedEvent["NoCookieAccess"] = "noCookieAccess";
|
|
@@ -741,22 +745,22 @@
|
|
|
741
745
|
* Emitted when any modal is opened in the app
|
|
742
746
|
* @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
|
|
743
747
|
* @example
|
|
744
|
-
|
|
748
|
+
* ```js
|
|
745
749
|
* appEmbed.on(EmbedEvent.DialogOpen, payload => {
|
|
746
750
|
* console.log('dialog open', payload);
|
|
747
751
|
* })
|
|
748
|
-
|
|
752
|
+
* ```
|
|
749
753
|
*/
|
|
750
754
|
EmbedEvent["DialogOpen"] = "dialog-open";
|
|
751
755
|
/**
|
|
752
756
|
* Emitted when any modal is closed in the app
|
|
753
757
|
* @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
|
|
754
758
|
* @example
|
|
755
|
-
|
|
759
|
+
* ```js
|
|
756
760
|
* appEmbed.on(EmbedEvent.DialogClose, payload => {
|
|
757
761
|
* console.log('dialog close', payload);
|
|
758
762
|
* })
|
|
759
|
-
|
|
763
|
+
* ```
|
|
760
764
|
*/
|
|
761
765
|
EmbedEvent["DialogClose"] = "dialog-close";
|
|
762
766
|
/**
|
|
@@ -765,39 +769,39 @@
|
|
|
765
769
|
* other events on the rendered Liveboard.
|
|
766
770
|
* @version SDK: 1.9.1 | ThoughtSpot: 8.1.0.cl, 8.4.1.sw
|
|
767
771
|
* @example
|
|
768
|
-
|
|
772
|
+
* ```js
|
|
769
773
|
* liveboardEmbed.on(EmbedEvent.LiveboardRendered, payload => {
|
|
770
774
|
console.log('Liveboard is rendered', payload);
|
|
771
775
|
})
|
|
772
|
-
|
|
776
|
+
* ```
|
|
773
777
|
* The following example shows how to trigger
|
|
774
778
|
* `SetVisibleVizs` event using LiveboardRendered embed event:
|
|
775
779
|
* @example
|
|
776
|
-
|
|
780
|
+
* ```js
|
|
777
781
|
* const embedRef = useEmbedRef();
|
|
778
782
|
* const onLiveboardRendered = () => {
|
|
779
783
|
* embed.trigger(HostEvent.SetVisibleVizs, ['viz1', 'viz2']);
|
|
780
784
|
* };
|
|
781
|
-
|
|
785
|
+
* ```
|
|
782
786
|
*/
|
|
783
787
|
EmbedEvent["LiveboardRendered"] = "PinboardRendered";
|
|
784
788
|
/**
|
|
785
789
|
* Emits all events.
|
|
786
|
-
* @
|
|
790
|
+
* @version SDK: 1.10.0 | ThoughtSpot: 8.2.0.cl, 8.4.1.sw
|
|
787
791
|
* @example
|
|
788
|
-
|
|
792
|
+
* ```js
|
|
789
793
|
* appEmbed.on(EmbedEvent.ALL, payload => {
|
|
790
794
|
* console.log('Embed Events', payload)
|
|
791
795
|
* })
|
|
792
|
-
|
|
796
|
+
* ```
|
|
793
797
|
*/
|
|
794
798
|
EmbedEvent["ALL"] = "*";
|
|
795
799
|
/**
|
|
796
800
|
* Emitted when an Answer is saved in the app.
|
|
797
801
|
* Use start:true to subscribe to when save is initiated, or end:true to subscribe to when save is completed. Default is end:true.
|
|
798
|
-
* @
|
|
802
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
799
803
|
* @example
|
|
800
|
-
|
|
804
|
+
* ```js
|
|
801
805
|
* //Emit when action starts
|
|
802
806
|
* searchEmbed.on(EmbedEvent.Save, payload => {
|
|
803
807
|
* console.log('Save', payload)
|
|
@@ -808,7 +812,7 @@
|
|
|
808
812
|
* searchEmbed.on(EmbedEvent.Save, payload => {
|
|
809
813
|
* console.log('Save', payload)
|
|
810
814
|
* })
|
|
811
|
-
|
|
815
|
+
* ```
|
|
812
816
|
*/
|
|
813
817
|
EmbedEvent["Save"] = "save";
|
|
814
818
|
/**
|
|
@@ -820,106 +824,112 @@
|
|
|
820
824
|
* `EmbedEvent.DownloadAsCSV`, or `EmbedEvent.DownloadAsXLSX`
|
|
821
825
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
822
826
|
* @example
|
|
823
|
-
|
|
827
|
+
* ```js
|
|
824
828
|
* liveboardEmbed.on(EmbedEvent.Download, {
|
|
825
829
|
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
826
830
|
* })
|
|
827
|
-
|
|
831
|
+
* ```
|
|
828
832
|
*/
|
|
829
833
|
EmbedEvent["Download"] = "download";
|
|
830
834
|
/**
|
|
831
835
|
* Emitted when the download action is triggered on an Answer.
|
|
832
|
-
* Use start:true to subscribe to when download is initiated, or end:true to
|
|
836
|
+
* Use start:true to subscribe to when download is initiated, or end:true to
|
|
837
|
+
* subscribe to when download is completed. Default is end:true.
|
|
833
838
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.0.sw
|
|
834
839
|
* @example
|
|
835
|
-
|
|
840
|
+
* ```js
|
|
836
841
|
* //emit when action starts
|
|
837
842
|
* searchEmbed.on(EmbedEvent.DownloadAsPng, payload => {
|
|
838
843
|
* console.log('download PNG', payload)}, {start: true })
|
|
839
844
|
* //emit when action ends
|
|
840
845
|
* searchEmbed.on(EmbedEvent.DownloadAsPng, payload => {
|
|
841
846
|
* console.log('download PNG', payload)})
|
|
842
|
-
|
|
847
|
+
* ```
|
|
843
848
|
*/
|
|
844
849
|
EmbedEvent["DownloadAsPng"] = "downloadAsPng";
|
|
845
850
|
/**
|
|
846
851
|
* Emitted when the Download as PDF action is triggered on an Answer
|
|
847
|
-
* Use start:true to subscribe to when download as PDF is initiated, or end:true to
|
|
852
|
+
* Use start:true to subscribe to when download as PDF is initiated, or end:true to
|
|
853
|
+
* subscribe to when download as PDF is completed. Default is end:true.
|
|
848
854
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
849
855
|
* @example
|
|
850
|
-
|
|
856
|
+
* ```js
|
|
851
857
|
* //emit when action starts
|
|
852
858
|
* searchEmbed.on(EmbedEvent.DownloadAsPdf, payload => {
|
|
853
859
|
* console.log('download PDF', payload)}, {start: true })
|
|
854
860
|
* //emit when action ends
|
|
855
861
|
* searchEmbed.on(EmbedEvent.DownloadAsPdf, payload => {
|
|
856
862
|
* console.log('download PDF', payload)})
|
|
857
|
-
|
|
863
|
+
* ```
|
|
858
864
|
*/
|
|
859
865
|
EmbedEvent["DownloadAsPdf"] = "downloadAsPdf";
|
|
860
866
|
/**
|
|
861
867
|
* Emitted when the Download as CSV action is triggered on an Answer.
|
|
862
|
-
* Use start:true to subscribe to when download as CSV is initiated, or end:true to
|
|
868
|
+
* Use start:true to subscribe to when download as CSV is initiated, or end:true to
|
|
869
|
+
* subscribe to when download as CSV is completed. Default is end:true.
|
|
863
870
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
864
871
|
* @example
|
|
865
|
-
|
|
872
|
+
* ```js
|
|
866
873
|
* //emit when action starts
|
|
867
874
|
* searchEmbed.on(EmbedEvent.DownloadAsCSV, payload => {
|
|
868
875
|
* console.log('download CSV', payload)}, {start: true })
|
|
869
876
|
* //emit when action ends
|
|
870
877
|
* searchEmbed.on(EmbedEvent.DownloadAsCSV, payload => {
|
|
871
878
|
* console.log('download CSV', payload)})
|
|
872
|
-
|
|
879
|
+
* ```
|
|
873
880
|
*/
|
|
874
881
|
EmbedEvent["DownloadAsCsv"] = "downloadAsCsv";
|
|
875
882
|
/**
|
|
876
883
|
* Emitted when the Download as XLSX action is triggered on an Answer.
|
|
877
|
-
* Use start:true to subscribe to when download as XLSX is initiated, or end:true to
|
|
884
|
+
* Use start:true to subscribe to when download as XLSX is initiated, or end:true to
|
|
885
|
+
* subscribe to when download as XLSX is completed. Default is end:true.
|
|
878
886
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
879
887
|
* @example
|
|
880
|
-
|
|
888
|
+
* ```js
|
|
881
889
|
* //emit when action starts
|
|
882
890
|
* searchEmbed.on(EmbedEvent.DownloadAsXlsx, payload => {
|
|
883
891
|
* console.log('download Xlsx', payload)}, { start: true })
|
|
884
892
|
* //emit when action ends
|
|
885
893
|
* searchEmbed.on(EmbedEvent.DownloadAsXlsx, payload => {
|
|
886
894
|
* console.log('download Xlsx', payload)})
|
|
887
|
-
|
|
895
|
+
* ```
|
|
888
896
|
*/
|
|
889
897
|
EmbedEvent["DownloadAsXlsx"] = "downloadAsXlsx";
|
|
890
898
|
/**
|
|
891
899
|
* Emitted when an Answer is deleted in the app
|
|
892
|
-
* Use start:true to subscribe to when delete is initiated, or end:true to subscribe
|
|
900
|
+
* Use start:true to subscribe to when delete is initiated, or end:true to subscribe
|
|
901
|
+
* to when delete is completed. Default is end:true.
|
|
893
902
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
894
903
|
* @example
|
|
895
|
-
|
|
904
|
+
* ```js
|
|
896
905
|
* //emit when action starts
|
|
897
906
|
* appEmbed.on(EmbedEvent.AnswerDelete, payload => {
|
|
898
907
|
* console.log('delete answer', payload)}, {start: true })
|
|
899
908
|
* //trigger when action is completed
|
|
900
909
|
* appEmbed.on(EmbedEvent.AnswerDelete, payload => {
|
|
901
910
|
* console.log('delete answer', payload)})
|
|
902
|
-
|
|
911
|
+
* ```
|
|
903
912
|
*/
|
|
904
913
|
EmbedEvent["AnswerDelete"] = "answerDelete";
|
|
905
914
|
/**
|
|
906
915
|
* Emitted when the AI Highlights action is triggered on a Liveboard
|
|
907
916
|
* @version SDK: 1.44.0 | ThoughtSpot: 10.15.0.cl
|
|
908
917
|
* @example
|
|
909
|
-
|
|
918
|
+
* ```js
|
|
910
919
|
* liveboardEmbed.on(EmbedEvent.AIHighlights, (payload) => {
|
|
911
920
|
* console.log('AI Highlights', payload);
|
|
912
921
|
* })
|
|
913
|
-
|
|
922
|
+
* ```
|
|
914
923
|
*/
|
|
915
924
|
EmbedEvent["AIHighlights"] = "AIHighlights";
|
|
916
925
|
/**
|
|
917
926
|
* Emitted when a user initiates the Pin action to
|
|
918
927
|
* add an Answer to a Liveboard.
|
|
919
|
-
* Use start:true to subscribe to when pin is initiated, or end:true to subscribe to
|
|
928
|
+
* Use start:true to subscribe to when pin is initiated, or end:true to subscribe to
|
|
929
|
+
* when pin is completed. Default is end:true.
|
|
920
930
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
921
931
|
* @example
|
|
922
|
-
|
|
932
|
+
* ```js
|
|
923
933
|
* //emit when action starts
|
|
924
934
|
* searchEmbed.on(EmbedEvent.Pin, payload => {
|
|
925
935
|
* console.log('pin', payload)
|
|
@@ -930,14 +940,14 @@
|
|
|
930
940
|
* searchEmbed.on(EmbedEvent.Pin, payload => {
|
|
931
941
|
* console.log('pin', payload)
|
|
932
942
|
* })
|
|
933
|
-
|
|
943
|
+
* ```
|
|
934
944
|
*/
|
|
935
945
|
EmbedEvent["Pin"] = "pin";
|
|
936
946
|
/**
|
|
937
947
|
* Emitted when SpotIQ analysis is triggered
|
|
938
948
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
939
949
|
* @example
|
|
940
|
-
|
|
950
|
+
* ```js
|
|
941
951
|
* //emit when action starts
|
|
942
952
|
* searchEmbed.on(EmbedEvent.SpotIQAnalyze, payload => {
|
|
943
953
|
* console.log('SpotIQAnalyze', payload)
|
|
@@ -948,14 +958,14 @@
|
|
|
948
958
|
* searchEmbed.on(EmbedEvent.SpotIQAnalyze, payload => {
|
|
949
959
|
* console.log('SpotIQ analyze', payload)
|
|
950
960
|
* })
|
|
951
|
-
|
|
961
|
+
* ```
|
|
952
962
|
*/
|
|
953
963
|
EmbedEvent["SpotIQAnalyze"] = "spotIQAnalyze";
|
|
954
964
|
/**
|
|
955
965
|
* Emitted when a user shares an object with another user or group
|
|
956
966
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
957
967
|
* @example
|
|
958
|
-
|
|
968
|
+
* ```js
|
|
959
969
|
* //emit when action starts
|
|
960
970
|
* searchEmbed.on(EmbedEvent.Share, payload => {
|
|
961
971
|
* console.log('Share', payload)
|
|
@@ -966,7 +976,7 @@
|
|
|
966
976
|
* searchEmbed.on(EmbedEvent.Share, payload => {
|
|
967
977
|
* console.log('Share', payload)
|
|
968
978
|
* })
|
|
969
|
-
|
|
979
|
+
* ```
|
|
970
980
|
*/
|
|
971
981
|
EmbedEvent["Share"] = "share";
|
|
972
982
|
/**
|
|
@@ -974,11 +984,11 @@
|
|
|
974
984
|
* data on a chart or table.
|
|
975
985
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
976
986
|
* @example
|
|
977
|
-
|
|
987
|
+
* ```js
|
|
978
988
|
* appEmbed.on(EmbedEvent.DrillInclude, payload => {
|
|
979
989
|
* console.log('Drill include', payload);
|
|
980
990
|
* })
|
|
981
|
-
|
|
991
|
+
* ```
|
|
982
992
|
*/
|
|
983
993
|
EmbedEvent["DrillInclude"] = "context-menu-item-include";
|
|
984
994
|
/**
|
|
@@ -986,22 +996,22 @@
|
|
|
986
996
|
* data on a chart or table
|
|
987
997
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
988
998
|
* @example
|
|
989
|
-
|
|
999
|
+
* ```js
|
|
990
1000
|
* appEmbed.on(EmbedEvent.DrillExclude, payload => {
|
|
991
1001
|
* console.log('Drill exclude', payload);
|
|
992
1002
|
* })
|
|
993
|
-
|
|
1003
|
+
* ```
|
|
994
1004
|
*/
|
|
995
1005
|
EmbedEvent["DrillExclude"] = "context-menu-item-exclude";
|
|
996
1006
|
/**
|
|
997
1007
|
* Emitted when a column value is copied in the embedded app.
|
|
998
1008
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
999
1009
|
* @example
|
|
1000
|
-
|
|
1001
|
-
*
|
|
1010
|
+
* ```js
|
|
1011
|
+
* searchEmbed.on(EmbedEvent.CopyToClipboard, payload => {
|
|
1002
1012
|
* console.log('copy to clipboard', payload);
|
|
1003
1013
|
* })
|
|
1004
|
-
|
|
1014
|
+
* ```
|
|
1005
1015
|
*/
|
|
1006
1016
|
EmbedEvent["CopyToClipboard"] = "context-menu-item-copy-to-clipboard";
|
|
1007
1017
|
/**
|
|
@@ -1009,10 +1019,10 @@
|
|
|
1009
1019
|
* embedded Liveboard.
|
|
1010
1020
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1011
1021
|
* @example
|
|
1012
|
-
|
|
1022
|
+
* ```js
|
|
1013
1023
|
* liveboardEmbed.on(EmbedEvent.UpdateTML)
|
|
1014
1024
|
* })
|
|
1015
|
-
|
|
1025
|
+
* ```
|
|
1016
1026
|
*/
|
|
1017
1027
|
EmbedEvent["UpdateTML"] = "updateTSL";
|
|
1018
1028
|
/**
|
|
@@ -1020,75 +1030,77 @@
|
|
|
1020
1030
|
* on an embedded Liveboard.
|
|
1021
1031
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1022
1032
|
* @example
|
|
1023
|
-
|
|
1033
|
+
* ```js
|
|
1024
1034
|
* appEmbed.on(EmbedEvent.EditTML, payload => {
|
|
1025
1035
|
* console.log('Edit TML', payload);
|
|
1026
1036
|
* })
|
|
1027
|
-
|
|
1037
|
+
* ```
|
|
1028
1038
|
*/
|
|
1029
1039
|
EmbedEvent["EditTML"] = "editTSL";
|
|
1030
1040
|
/**
|
|
1031
1041
|
* Emitted when the **Export TML** action is triggered on an
|
|
1032
1042
|
* an embedded object in the app
|
|
1033
|
-
* Use start:true to subscribe to when export is initiated, or end:true to subscribe
|
|
1043
|
+
* Use start:true to subscribe to when export is initiated, or end:true to subscribe
|
|
1044
|
+
* to when export is completed. Default is end:true.
|
|
1034
1045
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1035
1046
|
* @example
|
|
1036
|
-
|
|
1047
|
+
* ```js
|
|
1037
1048
|
* //emit when action starts
|
|
1038
1049
|
* searchEmbed.on(EmbedEvent.ExportTML, payload => {
|
|
1039
1050
|
* console.log('Export TML', payload)}, { start: true })
|
|
1040
1051
|
* //emit when action ends
|
|
1041
1052
|
* searchEmbed.on(EmbedEvent.ExportTML, payload => {
|
|
1042
1053
|
* console.log('Export TML', payload)})
|
|
1043
|
-
|
|
1054
|
+
* ```
|
|
1044
1055
|
*/
|
|
1045
1056
|
EmbedEvent["ExportTML"] = "exportTSL";
|
|
1046
1057
|
/**
|
|
1047
1058
|
* Emitted when an Answer is saved as a View.
|
|
1048
1059
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1049
1060
|
* @example
|
|
1050
|
-
|
|
1061
|
+
* ```js
|
|
1051
1062
|
* appEmbed.on(EmbedEvent.SaveAsView, payload => {
|
|
1052
1063
|
* console.log('View', payload);
|
|
1053
1064
|
* })
|
|
1054
|
-
|
|
1065
|
+
* ```
|
|
1055
1066
|
*/
|
|
1056
1067
|
EmbedEvent["SaveAsView"] = "saveAsView";
|
|
1057
1068
|
/**
|
|
1058
1069
|
* Emitted when the user creates a copy of an Answer.
|
|
1059
|
-
* Use start:true to subscribe to when copy and edit is initiated, or end:true to
|
|
1070
|
+
* Use start:true to subscribe to when copy and edit is initiated, or end:true to
|
|
1071
|
+
* subscribe to when copy and edit is completed. Default is end:true.
|
|
1060
1072
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1061
1073
|
* @example
|
|
1062
|
-
|
|
1074
|
+
* ```js
|
|
1063
1075
|
* //emit when action starts
|
|
1064
1076
|
* appEmbed.on(EmbedEvent.CopyAEdit, payload => {
|
|
1065
1077
|
* console.log('Copy and edit', payload)}, {start: true })
|
|
1066
1078
|
* //emit when action ends
|
|
1067
1079
|
* appEmbed.on(EmbedEvent.CopyAEdit, payload => {
|
|
1068
1080
|
* console.log('Copy and edit', payload)})
|
|
1069
|
-
|
|
1081
|
+
* ```
|
|
1070
1082
|
*/
|
|
1071
1083
|
EmbedEvent["CopyAEdit"] = "copyAEdit";
|
|
1072
1084
|
/**
|
|
1073
1085
|
* Emitted when a user clicks *Show underlying data* on an Answer.
|
|
1074
1086
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1075
1087
|
* @example
|
|
1076
|
-
|
|
1088
|
+
* ```js
|
|
1077
1089
|
* liveboardEmbed.on(EmbedEvent.ShowUnderlyingData, payload => {
|
|
1078
1090
|
* console.log('show data', payload);
|
|
1079
1091
|
* })
|
|
1080
|
-
|
|
1092
|
+
* ```
|
|
1081
1093
|
*/
|
|
1082
1094
|
EmbedEvent["ShowUnderlyingData"] = "showUnderlyingData";
|
|
1083
1095
|
/**
|
|
1084
1096
|
* Emitted when an Answer is switched to a chart or table view.
|
|
1085
1097
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1086
1098
|
* @example
|
|
1087
|
-
|
|
1099
|
+
* ```js
|
|
1088
1100
|
* searchEmbed.on(EmbedEvent.AnswerChartSwitcher, payload => {
|
|
1089
1101
|
* console.log('switch view', payload);
|
|
1090
1102
|
* })
|
|
1091
|
-
|
|
1103
|
+
* ```
|
|
1092
1104
|
*/
|
|
1093
1105
|
EmbedEvent["AnswerChartSwitcher"] = "answerChartSwitcher";
|
|
1094
1106
|
/**
|
|
@@ -1105,118 +1117,118 @@
|
|
|
1105
1117
|
* Emitted when a user clicks **Show Liveboard details** on a Liveboard
|
|
1106
1118
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
1107
1119
|
* @example
|
|
1108
|
-
|
|
1120
|
+
* ```js
|
|
1109
1121
|
* liveboardEmbed.on(EmbedEvent.LiveboardInfo, payload => {
|
|
1110
1122
|
* console.log('Liveboard details', payload);
|
|
1111
1123
|
* })
|
|
1112
|
-
|
|
1124
|
+
* ```
|
|
1113
1125
|
*/
|
|
1114
1126
|
EmbedEvent["LiveboardInfo"] = "pinboardInfo";
|
|
1115
1127
|
/**
|
|
1116
1128
|
* Emitted when a user clicks on the Favorite icon on a Liveboard
|
|
1117
1129
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
1118
1130
|
* @example
|
|
1119
|
-
|
|
1131
|
+
* ```js
|
|
1120
1132
|
* liveboardEmbed.on(EmbedEvent.AddToFavorites, payload => {
|
|
1121
1133
|
* console.log('favorites', payload);
|
|
1122
1134
|
* })
|
|
1123
|
-
|
|
1135
|
+
* ```
|
|
1124
1136
|
*/
|
|
1125
1137
|
EmbedEvent["AddToFavorites"] = "addToFavorites";
|
|
1126
1138
|
/**
|
|
1127
1139
|
* Emitted when a user clicks **Schedule** on a Liveboard
|
|
1128
1140
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
1129
1141
|
* @example
|
|
1130
|
-
|
|
1142
|
+
* ```js
|
|
1131
1143
|
* liveboardEmbed.on(EmbedEvent.Schedule, payload => {
|
|
1132
|
-
* console.log(
|
|
1144
|
+
* console.log('Liveboard schedule', payload);
|
|
1133
1145
|
* })
|
|
1134
|
-
|
|
1146
|
+
* ```
|
|
1135
1147
|
*/
|
|
1136
1148
|
EmbedEvent["Schedule"] = "subscription";
|
|
1137
1149
|
/**
|
|
1138
1150
|
* Emitted when a user clicks **Edit** on a Liveboard or visualization
|
|
1139
1151
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
1140
1152
|
* @example
|
|
1141
|
-
|
|
1153
|
+
* ```js
|
|
1142
1154
|
* liveboardEmbed.on(EmbedEvent.Edit, payload => {
|
|
1143
|
-
* console.log(
|
|
1155
|
+
* console.log('Liveboard edit', payload);
|
|
1144
1156
|
* })
|
|
1145
|
-
|
|
1157
|
+
* ```
|
|
1146
1158
|
*/
|
|
1147
1159
|
EmbedEvent["Edit"] = "edit";
|
|
1148
1160
|
/**
|
|
1149
1161
|
* Emitted when a user clicks *Make a copy* on a Liveboard
|
|
1150
1162
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
1151
1163
|
* @example
|
|
1152
|
-
|
|
1164
|
+
* ```js
|
|
1153
1165
|
* liveboardEmbed.on(EmbedEvent.MakeACopy, payload => {
|
|
1154
|
-
* console.log(
|
|
1166
|
+
* console.log('Copy', payload);
|
|
1155
1167
|
* })
|
|
1156
|
-
|
|
1168
|
+
* ```
|
|
1157
1169
|
*/
|
|
1158
1170
|
EmbedEvent["MakeACopy"] = "makeACopy";
|
|
1159
1171
|
/**
|
|
1160
1172
|
* Emitted when a user clicks **Present** on a Liveboard or visualization
|
|
1161
1173
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
1162
1174
|
* @example
|
|
1163
|
-
|
|
1175
|
+
* ```js
|
|
1164
1176
|
* liveboardEmbed.on(EmbedEvent.Present)
|
|
1165
|
-
|
|
1177
|
+
* ```
|
|
1166
1178
|
* @example
|
|
1167
|
-
|
|
1179
|
+
* ```js
|
|
1168
1180
|
* liveboardEmbed.on(EmbedEvent.Present, {
|
|
1169
1181
|
* vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1170
1182
|
* })
|
|
1171
|
-
|
|
1183
|
+
* ```
|
|
1172
1184
|
*/
|
|
1173
1185
|
EmbedEvent["Present"] = "present";
|
|
1174
1186
|
/**
|
|
1175
1187
|
* Emitted when a user clicks **Delete** on a visualization
|
|
1176
1188
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
1177
1189
|
* @example
|
|
1178
|
-
|
|
1190
|
+
* ```js
|
|
1179
1191
|
* liveboardEmbed.on(EmbedEvent.Delete,
|
|
1180
1192
|
* {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1181
|
-
|
|
1193
|
+
* ```
|
|
1182
1194
|
*/
|
|
1183
1195
|
EmbedEvent["Delete"] = "delete";
|
|
1184
1196
|
/**
|
|
1185
1197
|
* Emitted when a user clicks Manage schedules on a Liveboard
|
|
1186
1198
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
1187
1199
|
* @example
|
|
1188
|
-
|
|
1200
|
+
* ```js
|
|
1189
1201
|
* liveboardEmbed.on(EmbedEvent.SchedulesList)
|
|
1190
|
-
|
|
1202
|
+
* ```
|
|
1191
1203
|
*/
|
|
1192
1204
|
EmbedEvent["SchedulesList"] = "schedule-list";
|
|
1193
1205
|
/**
|
|
1194
1206
|
* Emitted when a user clicks **Cancel** in edit mode on a Liveboard
|
|
1195
1207
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
1196
1208
|
* @example
|
|
1197
|
-
|
|
1209
|
+
* ```js
|
|
1198
1210
|
* liveboardEmbed.on(EmbedEvent.Cancel)
|
|
1199
|
-
|
|
1211
|
+
* ```
|
|
1200
1212
|
*/
|
|
1201
1213
|
EmbedEvent["Cancel"] = "cancel";
|
|
1202
1214
|
/**
|
|
1203
1215
|
* Emitted when a user clicks **Explore** on a visualization
|
|
1204
1216
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
1205
1217
|
* @example
|
|
1206
|
-
|
|
1218
|
+
* ```js
|
|
1207
1219
|
* liveboardEmbed.on(EmbedEvent.Explore, {
|
|
1208
1220
|
* vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1209
|
-
|
|
1221
|
+
* ```
|
|
1210
1222
|
*/
|
|
1211
1223
|
EmbedEvent["Explore"] = "explore";
|
|
1212
1224
|
/**
|
|
1213
1225
|
* Emitted when a user clicks **Copy link** action on a visualization.
|
|
1214
1226
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
1215
1227
|
* @example
|
|
1216
|
-
|
|
1228
|
+
* ```js
|
|
1217
1229
|
* liveboardEmbed.on(EmbedEvent.CopyLink, {
|
|
1218
1230
|
* vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1219
|
-
|
|
1231
|
+
* ```
|
|
1220
1232
|
*/
|
|
1221
1233
|
EmbedEvent["CopyLink"] = "embedDocument";
|
|
1222
1234
|
/**
|
|
@@ -1224,21 +1236,21 @@
|
|
|
1224
1236
|
* visualization or Liveboard.
|
|
1225
1237
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.5.0.sw
|
|
1226
1238
|
* @example
|
|
1227
|
-
|
|
1239
|
+
* ```js
|
|
1228
1240
|
* liveboardEmbed.on(EmbedEvent.CrossFilterChanged, {
|
|
1229
1241
|
* vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1230
|
-
|
|
1242
|
+
* ```
|
|
1231
1243
|
*/
|
|
1232
1244
|
EmbedEvent["CrossFilterChanged"] = "cross-filter-changed";
|
|
1233
1245
|
/**
|
|
1234
1246
|
* Emitted when a user right clicks on a visualization (chart or table)
|
|
1235
1247
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.5.0.sw
|
|
1236
1248
|
* @example
|
|
1237
|
-
|
|
1249
|
+
* ```js
|
|
1238
1250
|
* LiveboardEmbed.on(EmbedEvent.VizPointRightClick, payload => {
|
|
1239
1251
|
* console.log('VizPointClick', payload)
|
|
1240
1252
|
* })
|
|
1241
|
-
|
|
1253
|
+
* ```
|
|
1242
1254
|
*/
|
|
1243
1255
|
EmbedEvent["VizPointRightClick"] = "vizPointRightClick";
|
|
1244
1256
|
/**
|
|
@@ -1252,35 +1264,35 @@
|
|
|
1252
1264
|
* filter details.
|
|
1253
1265
|
* @example
|
|
1254
1266
|
*
|
|
1255
|
-
|
|
1267
|
+
* ```js
|
|
1256
1268
|
* LiveboardEmbed.on(EmbedEvent.FilterChanged, (payload) => {
|
|
1257
1269
|
* console.log('payload', payload);
|
|
1258
1270
|
* })
|
|
1259
|
-
*
|
|
1271
|
+
* ```
|
|
1260
1272
|
* @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl, 9.5.0.sw
|
|
1261
1273
|
*/
|
|
1262
1274
|
EmbedEvent["FilterChanged"] = "filterChanged";
|
|
1263
1275
|
/**
|
|
1264
1276
|
* Emitted when a user clicks the **Go** button to initiate
|
|
1265
1277
|
* a Natural Language Search query
|
|
1266
|
-
* @version SDK
|
|
1278
|
+
* @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
|
|
1267
1279
|
*/
|
|
1268
1280
|
EmbedEvent["SageEmbedQuery"] = "sageEmbedQuery";
|
|
1269
1281
|
/**
|
|
1270
1282
|
* Emitted when a user selects a data source on the embedded
|
|
1271
1283
|
* Natural Language Search interface.
|
|
1272
1284
|
*
|
|
1273
|
-
* @version SDK
|
|
1285
|
+
* @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
|
|
1274
1286
|
*/
|
|
1275
1287
|
EmbedEvent["SageWorksheetUpdated"] = "sageWorksheetUpdated";
|
|
1276
1288
|
/**
|
|
1277
1289
|
* Emitted when a user updates a connection on the **Data** page
|
|
1278
|
-
* @version SDK
|
|
1290
|
+
* @version SDK: 1.27.0 | ThoughtSpot: 9.8.0.cl, 9.8.0.sw
|
|
1279
1291
|
*/
|
|
1280
1292
|
EmbedEvent["UpdateConnection"] = "updateConnection";
|
|
1281
1293
|
/**
|
|
1282
1294
|
* Emitted when a user updates a connection on the **Data** page
|
|
1283
|
-
* @version SDK
|
|
1295
|
+
* @version SDK: 1.27.0 | ThoughtSpot: 9.8.0.cl, 9.8.0.sw
|
|
1284
1296
|
*/
|
|
1285
1297
|
EmbedEvent["CreateConnection"] = "createConnection";
|
|
1286
1298
|
/**
|
|
@@ -1290,7 +1302,7 @@
|
|
|
1290
1302
|
* @returns viewId: string
|
|
1291
1303
|
* @returns liveboardId: string
|
|
1292
1304
|
* @returns isPublic: boolean
|
|
1293
|
-
* @version SDK
|
|
1305
|
+
* @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
|
|
1294
1306
|
*/
|
|
1295
1307
|
EmbedEvent["UpdatePersonalisedView"] = "updatePersonalisedView";
|
|
1296
1308
|
/**
|
|
@@ -1299,7 +1311,7 @@
|
|
|
1299
1311
|
* @returns viewId: string
|
|
1300
1312
|
* @returns liveboardId: string
|
|
1301
1313
|
* @returns isPublic: boolean
|
|
1302
|
-
* @version SDK
|
|
1314
|
+
* @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
|
|
1303
1315
|
*/
|
|
1304
1316
|
EmbedEvent["SavePersonalisedView"] = "savePersonalisedView";
|
|
1305
1317
|
/**
|
|
@@ -1308,19 +1320,19 @@
|
|
|
1308
1320
|
* @returns viewId: string
|
|
1309
1321
|
* @returns liveboardId: string
|
|
1310
1322
|
* @returns isPublic: boolean
|
|
1311
|
-
* @version SDK
|
|
1323
|
+
* @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
|
|
1312
1324
|
*/
|
|
1313
1325
|
EmbedEvent["ResetLiveboard"] = "resetLiveboard";
|
|
1314
1326
|
/**
|
|
1315
1327
|
* Emitted when a PersonalisedView is deleted.
|
|
1316
1328
|
* @returns views: string[]
|
|
1317
1329
|
* @returns liveboardId: string
|
|
1318
|
-
* @version SDK
|
|
1330
|
+
* @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
|
|
1319
1331
|
*/
|
|
1320
1332
|
EmbedEvent["DeletePersonalisedView"] = "deletePersonalisedView";
|
|
1321
1333
|
/**
|
|
1322
1334
|
* Emitted when a user creates a Worksheet.
|
|
1323
|
-
* @version SDK
|
|
1335
|
+
* @version SDK: 1.27.0 | ThoughtSpot: 9.8.0.cl, 9.8.0.sw
|
|
1324
1336
|
*/
|
|
1325
1337
|
EmbedEvent["CreateWorksheet"] = "createWorksheet";
|
|
1326
1338
|
/**
|
|
@@ -1329,12 +1341,12 @@
|
|
|
1329
1341
|
* @returns viewId: string
|
|
1330
1342
|
* @returns liveboardId: string
|
|
1331
1343
|
* @returns isPublic: boolean
|
|
1332
|
-
* @version SDK
|
|
1344
|
+
* @version SDK: 1.29.0 | ThoughtSpot Cloud: 9.12.0.cl
|
|
1333
1345
|
*/
|
|
1334
1346
|
EmbedEvent["AskSageInit"] = "AskSageInit";
|
|
1335
1347
|
/**
|
|
1336
1348
|
* Emitted when a Liveboard or visualization is renamed.
|
|
1337
|
-
* @version SDK
|
|
1349
|
+
* @version SDK: 1.28.0 | ThoughtSpot: 9.10.5.cl, 10.1.0.sw
|
|
1338
1350
|
*/
|
|
1339
1351
|
EmbedEvent["Rename"] = "rename";
|
|
1340
1352
|
/**
|
|
@@ -1357,7 +1369,7 @@
|
|
|
1357
1369
|
* - `error` - Developers can customize the user-facing error message when `execute`
|
|
1358
1370
|
* is `false` by using the `error` parameters in `responder`.
|
|
1359
1371
|
* - `errorText` - The error message text shown to the user.
|
|
1360
|
-
* @version SDK
|
|
1372
|
+
* @version SDK: 1.29.0 | ThoughtSpot: 10.3.0.cl
|
|
1361
1373
|
* @example
|
|
1362
1374
|
*
|
|
1363
1375
|
* This example blocks search operation and returns a custom error message:
|
|
@@ -1409,8 +1421,8 @@
|
|
|
1409
1421
|
* liveboardEmbed.on(EmbedEvent.ParameterChanged, (payload) => {
|
|
1410
1422
|
* console.log('payload', payload);
|
|
1411
1423
|
* })
|
|
1412
|
-
|
|
1413
|
-
* @version SDK
|
|
1424
|
+
* ```
|
|
1425
|
+
* @version SDK: 1.29.0 | ThoughtSpot: 10.3.0.cl
|
|
1414
1426
|
*/
|
|
1415
1427
|
EmbedEvent["ParameterChanged"] = "parameterChanged";
|
|
1416
1428
|
/**
|
|
@@ -1465,24 +1477,24 @@
|
|
|
1465
1477
|
* liveboardEmbed.on(EmbedEvent.CreateLiveboard, (payload) => {
|
|
1466
1478
|
* console.log('payload', payload);
|
|
1467
1479
|
* })
|
|
1468
|
-
|
|
1469
|
-
* @version SDK
|
|
1480
|
+
* ```
|
|
1481
|
+
* @version SDK: 1.37.0 | ThoughtSpot: 10.8.0.cl
|
|
1470
1482
|
*/
|
|
1471
1483
|
EmbedEvent["CreateLiveboard"] = "createLiveboard";
|
|
1472
1484
|
/**
|
|
1473
1485
|
* Emitted when a user creates a Model.
|
|
1474
|
-
* @version SDK
|
|
1486
|
+
* @version SDK: 1.37.0 | ThoughtSpot: 10.8.0.cl
|
|
1475
1487
|
*/
|
|
1476
1488
|
EmbedEvent["CreateModel"] = "createModel";
|
|
1477
1489
|
/**
|
|
1478
1490
|
* @hidden
|
|
1479
1491
|
* Emitted when a user exits present mode.
|
|
1480
|
-
* @version SDK
|
|
1492
|
+
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
1481
1493
|
*/
|
|
1482
1494
|
EmbedEvent["ExitPresentMode"] = "exitPresentMode";
|
|
1483
1495
|
/**
|
|
1484
1496
|
* Emitted when a user requests the full height lazy load data.
|
|
1485
|
-
* @version SDK
|
|
1497
|
+
* @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
|
|
1486
1498
|
* @hidden
|
|
1487
1499
|
*/
|
|
1488
1500
|
EmbedEvent["RequestVisibleEmbedCoordinates"] = "requestVisibleEmbedCoordinates";
|
|
@@ -1493,7 +1505,7 @@
|
|
|
1493
1505
|
* spotterEmbed.on(EmbedEvent.SpotterData, (payload) => {
|
|
1494
1506
|
* console.log('payload', payload);
|
|
1495
1507
|
* })
|
|
1496
|
-
|
|
1508
|
+
* ```
|
|
1497
1509
|
* @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
|
|
1498
1510
|
*/
|
|
1499
1511
|
EmbedEvent["SpotterData"] = "SpotterData";
|
|
@@ -1504,7 +1516,7 @@
|
|
|
1504
1516
|
* spotterEmbed.on(EmbedEvent.PreviewSpotterData, (payload) => {
|
|
1505
1517
|
* console.log('payload', payload);
|
|
1506
1518
|
* })
|
|
1507
|
-
|
|
1519
|
+
* ```
|
|
1508
1520
|
* @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
|
|
1509
1521
|
*/
|
|
1510
1522
|
EmbedEvent["PreviewSpotterData"] = "PreviewSpotterData";
|
|
@@ -1515,7 +1527,7 @@
|
|
|
1515
1527
|
* spotterEmbed.on(EmbedEvent.AddToCoaching, (payload) => {
|
|
1516
1528
|
* console.log('payload', payload);
|
|
1517
1529
|
* })
|
|
1518
|
-
|
|
1530
|
+
* ```
|
|
1519
1531
|
* @version SDK: 1.45.0 | ThoughtSpot: 26.2.0.cl
|
|
1520
1532
|
*/
|
|
1521
1533
|
EmbedEvent["AddToCoaching"] = "addToCoaching";
|
|
@@ -1537,7 +1549,7 @@
|
|
|
1537
1549
|
* spotterEmbed.on(EmbedEvent.SpotterQueryTriggered, (payload) => {
|
|
1538
1550
|
* console.log('payload', payload);
|
|
1539
1551
|
* })
|
|
1540
|
-
|
|
1552
|
+
* ```
|
|
1541
1553
|
* @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
|
|
1542
1554
|
*/
|
|
1543
1555
|
EmbedEvent["SpotterQueryTriggered"] = "SpotterQueryTriggered";
|
|
@@ -1548,7 +1560,7 @@
|
|
|
1548
1560
|
* spotterEmbed.on(EmbedEvent.LastPromptEdited, (payload) => {
|
|
1549
1561
|
* console.log('payload', payload);
|
|
1550
1562
|
* })
|
|
1551
|
-
|
|
1563
|
+
* ```
|
|
1552
1564
|
* @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
|
|
1553
1565
|
*/
|
|
1554
1566
|
EmbedEvent["LastPromptEdited"] = "LastPromptEdited";
|
|
@@ -1559,18 +1571,18 @@
|
|
|
1559
1571
|
* spotterEmbed.on(EmbedEvent.LastPromptDeleted, (payload) => {
|
|
1560
1572
|
* console.log('payload', payload);
|
|
1561
1573
|
* })
|
|
1562
|
-
|
|
1574
|
+
* ```
|
|
1563
1575
|
* @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
|
|
1564
1576
|
*/
|
|
1565
1577
|
EmbedEvent["LastPromptDeleted"] = "LastPromptDeleted";
|
|
1566
1578
|
/**
|
|
1567
|
-
* Emitted when the
|
|
1579
|
+
* Emitted when the conversation is reset in Spotter embed.
|
|
1568
1580
|
* @example
|
|
1569
1581
|
* ```js
|
|
1570
1582
|
* spotterEmbed.on(EmbedEvent.ResetSpotterConversation, (payload) => {
|
|
1571
1583
|
* console.log('payload', payload);
|
|
1572
1584
|
* })
|
|
1573
|
-
|
|
1585
|
+
* ```
|
|
1574
1586
|
* @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
|
|
1575
1587
|
*/
|
|
1576
1588
|
EmbedEvent["ResetSpotterConversation"] = "ResetSpotterConversation";
|
|
@@ -1581,7 +1593,7 @@
|
|
|
1581
1593
|
* spotterEmbed.on(EmbedEvent.SpotterInit, (payload) => {
|
|
1582
1594
|
* console.log('payload', payload);
|
|
1583
1595
|
* })
|
|
1584
|
-
|
|
1596
|
+
* ```
|
|
1585
1597
|
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
1586
1598
|
*/
|
|
1587
1599
|
EmbedEvent["SpotterInit"] = "spotterInit";
|
|
@@ -1592,7 +1604,7 @@
|
|
|
1592
1604
|
* spotterEmbed.on(EmbedEvent.SpotterLoadComplete, (payload) => {
|
|
1593
1605
|
* console.log('payload', payload);
|
|
1594
1606
|
* })
|
|
1595
|
-
|
|
1607
|
+
* ```
|
|
1596
1608
|
* @version SDK: 1.44.0 | ThoughtSpot: 26.2.0.cl
|
|
1597
1609
|
*/
|
|
1598
1610
|
EmbedEvent["SpotterLoadComplete"] = "spotterLoadComplete";
|
|
@@ -1820,7 +1832,8 @@
|
|
|
1820
1832
|
* - `autoDrillDown`: Optional. If `true`, the drill down will be done automatically
|
|
1821
1833
|
* on the most popular column.
|
|
1822
1834
|
* - `vizId` (TS >= 9.8.0): Optional. The GUID of the visualization to drill in case
|
|
1823
|
-
* of a Liveboard. In Spotter embed, `vizId` refers to the Answer ID and is
|
|
1835
|
+
* of a Liveboard. In Spotter embed, `vizId` refers to the Answer ID and is
|
|
1836
|
+
* **required**.
|
|
1824
1837
|
* @example
|
|
1825
1838
|
* ```js
|
|
1826
1839
|
* searchEmbed.on(EmbedEvent.VizPointDoubleClick, (payload) => {
|
|
@@ -1947,7 +1960,7 @@
|
|
|
1947
1960
|
* ```js
|
|
1948
1961
|
* appEmbed.navigateToPage(-1)
|
|
1949
1962
|
* ```
|
|
1950
|
-
* @version SDK: 1.12.0 | ThoughtSpot 8.4.0.cl, 8.4.1.sw
|
|
1963
|
+
* @version SDK: 1.12.0 | ThoughtSpot: 8.4.0.cl, 8.4.1.sw
|
|
1951
1964
|
*/
|
|
1952
1965
|
HostEvent["Navigate"] = "Navigate";
|
|
1953
1966
|
/**
|
|
@@ -2016,7 +2029,8 @@
|
|
|
2016
2029
|
* the following parameters:
|
|
2017
2030
|
*
|
|
2018
2031
|
* @param - Includes the following keys:
|
|
2019
|
-
* - `vizId`: GUID of the saved Answer or Spotter visualization ID to pin to a
|
|
2032
|
+
* - `vizId`: GUID of the saved Answer or Spotter visualization ID to pin to a
|
|
2033
|
+
* Liveboard.
|
|
2020
2034
|
* Optional when pinning a new chart or table generated from a Search query.
|
|
2021
2035
|
* **Required** in Spotter Embed.
|
|
2022
2036
|
* - `liveboardId`: GUID of the Liveboard to pin an Answer. If there is no Liveboard,
|
|
@@ -2080,9 +2094,9 @@
|
|
|
2080
2094
|
* Trigger the **Show Liveboard details** action
|
|
2081
2095
|
* on an embedded Liveboard.
|
|
2082
2096
|
* @example
|
|
2083
|
-
|
|
2097
|
+
* ```js
|
|
2084
2098
|
* liveboardEmbed.trigger(HostEvent.LiveboardInfo)
|
|
2085
|
-
|
|
2099
|
+
* ```
|
|
2086
2100
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2087
2101
|
*/
|
|
2088
2102
|
HostEvent["LiveboardInfo"] = "pinboardInfo";
|
|
@@ -2210,7 +2224,7 @@
|
|
|
2210
2224
|
* appEmbed.trigger(HostEvent.Remove)
|
|
2211
2225
|
* ```
|
|
2212
2226
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2213
|
-
*
|
|
2227
|
+
* @example
|
|
2214
2228
|
* ```js
|
|
2215
2229
|
* liveboardEmbed.trigger(HostEvent.Remove)
|
|
2216
2230
|
* ```
|
|
@@ -2272,7 +2286,8 @@
|
|
|
2272
2286
|
* This event is not supported in visualization embed and search embed.
|
|
2273
2287
|
* @param - Object parameter. Includes the following keys:
|
|
2274
2288
|
* - `vizId`: To trigger the action for a specific visualization in Liveboard embed,
|
|
2275
|
-
* pass in `vizId` as a key. In Spotter embed, `vizId` refers to the Answer ID and
|
|
2289
|
+
* pass in `vizId` as a key. In Spotter embed, `vizId` refers to the Answer ID and
|
|
2290
|
+
* is **required**.
|
|
2276
2291
|
*
|
|
2277
2292
|
* @example
|
|
2278
2293
|
* ```js
|
|
@@ -2301,7 +2316,7 @@
|
|
|
2301
2316
|
* liveboardEmbed.trigger(HostEvent.CopyLink, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
2302
2317
|
* ```
|
|
2303
2318
|
* ```js
|
|
2304
|
-
* vizEmbed.trigger(
|
|
2319
|
+
* vizEmbed.trigger(HostEvent.CopyLink)
|
|
2305
2320
|
* ```
|
|
2306
2321
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2307
2322
|
*/
|
|
@@ -2318,7 +2333,7 @@
|
|
|
2318
2333
|
* liveboardEmbed.trigger(HostEvent.Present, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
2319
2334
|
* ```
|
|
2320
2335
|
* ```js
|
|
2321
|
-
* vizEmbed.trigger(
|
|
2336
|
+
* vizEmbed.trigger(HostEvent.Present)
|
|
2322
2337
|
* ```
|
|
2323
2338
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2324
2339
|
*/
|
|
@@ -2333,23 +2348,22 @@
|
|
|
2333
2348
|
* );
|
|
2334
2349
|
* })
|
|
2335
2350
|
* ```
|
|
2336
|
-
*
|
|
2351
|
+
* @example
|
|
2337
2352
|
* ```js
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
* spotterEmbed.trigger(HostEvent.GetTML, {
|
|
2353
|
+
* // You can use the Data event dispatched on each answer creation to get the vizId and use in GetTML host event.
|
|
2354
|
+
* let latestSpotterVizId = '';
|
|
2355
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
2356
|
+
* latestSpotterVizId = payload.data.id;
|
|
2357
|
+
* });
|
|
2358
|
+
*
|
|
2359
|
+
* spotterEmbed.trigger(HostEvent.GetTML, {
|
|
2346
2360
|
* vizId: latestSpotterVizId
|
|
2347
2361
|
* }).then((tml) => {
|
|
2348
2362
|
* console.log(
|
|
2349
2363
|
* tml.answer.search_query // TML representation of the search query
|
|
2350
2364
|
* );
|
|
2351
2365
|
* })
|
|
2352
|
-
|
|
2366
|
+
* ```
|
|
2353
2367
|
* @version SDK: 1.18.0 | ThoughtSpot: 8.10.0.cl, 9.0.1.sw
|
|
2354
2368
|
* @important
|
|
2355
2369
|
*/
|
|
@@ -2413,6 +2427,11 @@
|
|
|
2413
2427
|
/**
|
|
2414
2428
|
* Trigger the **Download** action on charts in
|
|
2415
2429
|
* the embedded view.
|
|
2430
|
+
* Use {@link HostEvent.DownloadAsPng} instead.
|
|
2431
|
+
*
|
|
2432
|
+
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
2433
|
+
*
|
|
2434
|
+
* @deprecated from SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl ,9.4.1.sw
|
|
2416
2435
|
* @param - `vizId` refers to the Visualization ID in Spotter embed and is required in Spotter embed.
|
|
2417
2436
|
* @example
|
|
2418
2437
|
* ```js
|
|
@@ -2431,9 +2450,6 @@
|
|
|
2431
2450
|
*
|
|
2432
2451
|
* spotterEmbed.trigger(HostEvent.Download, { vizId: latestSpotterVizId });
|
|
2433
2452
|
* ```
|
|
2434
|
-
* @deprecated from SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl ,9.4.1.sw
|
|
2435
|
-
* Use {@link DownloadAsPng}
|
|
2436
|
-
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
2437
2453
|
*/
|
|
2438
2454
|
HostEvent["Download"] = "downloadAsPng";
|
|
2439
2455
|
/**
|
|
@@ -2640,8 +2656,9 @@
|
|
|
2640
2656
|
/**
|
|
2641
2657
|
* Update one or several filters applied on a Liveboard.
|
|
2642
2658
|
* @param - Includes the following keys:
|
|
2643
|
-
* - `filter`: A single filter object containing column name, filter operator, and
|
|
2644
|
-
* - `filters`: Multiple filter objects with column name, filter operator,
|
|
2659
|
+
* - `filter`: A single filter object containing column name, filter operator, and
|
|
2660
|
+
* values. - `filters`: Multiple filter objects with column name, filter operator,
|
|
2661
|
+
* and values for each.
|
|
2645
2662
|
*
|
|
2646
2663
|
* Each filter object must include the following attributes:
|
|
2647
2664
|
*
|
|
@@ -2871,8 +2888,8 @@
|
|
|
2871
2888
|
* liveboardEmbed.trigger(HostEvent.GetParameters).then((parameter) => {
|
|
2872
2889
|
* console.log('parameters', parameter);
|
|
2873
2890
|
* });
|
|
2874
|
-
|
|
2875
|
-
|
|
2891
|
+
* ```
|
|
2892
|
+
* ```js
|
|
2876
2893
|
* // You can use the Data event dispatched on each answer creation to get the vizId and use in GetParameters host event.
|
|
2877
2894
|
* let latestSpotterVizId = '';
|
|
2878
2895
|
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
@@ -2880,7 +2897,7 @@
|
|
|
2880
2897
|
* });
|
|
2881
2898
|
*
|
|
2882
2899
|
* spotterEmbed.trigger(HostEvent.GetParameters, { vizId: latestSpotterVizId });
|
|
2883
|
-
|
|
2900
|
+
* ```
|
|
2884
2901
|
* @version SDK: 1.29.0 | ThoughtSpot: 10.1.0.cl, 10.1.0.sw
|
|
2885
2902
|
*/
|
|
2886
2903
|
HostEvent["GetParameters"] = "GetParameters";
|
|
@@ -2897,7 +2914,7 @@
|
|
|
2897
2914
|
* Notify when info call is completed successfully
|
|
2898
2915
|
* ```js
|
|
2899
2916
|
* liveboardEmbed.trigger(HostEvent.InfoSuccess, data);
|
|
2900
|
-
|
|
2917
|
+
* ```
|
|
2901
2918
|
* @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
|
|
2902
2919
|
*/
|
|
2903
2920
|
HostEvent["InfoSuccess"] = "InfoSuccess";
|
|
@@ -2910,8 +2927,8 @@
|
|
|
2910
2927
|
* triggered with a modal to prompt users to
|
|
2911
2928
|
* add a name and description for the Answer.
|
|
2912
2929
|
* @param - Includes the following keys:
|
|
2913
|
-
* - `vizId`: Refers to the Answer ID in Spotter embed and is **required** in Spotter
|
|
2914
|
-
* - `name`: Optional. Name string for the Answer.
|
|
2930
|
+
* - `vizId`: Refers to the Answer ID in Spotter embed and is **required** in Spotter
|
|
2931
|
+
* embed. - `name`: Optional. Name string for the Answer.
|
|
2915
2932
|
* - `description`: Optional. Description text for the Answer.
|
|
2916
2933
|
* @example
|
|
2917
2934
|
* ```js
|
|
@@ -3000,7 +3017,7 @@
|
|
|
3000
3017
|
* ```js
|
|
3001
3018
|
* spotterEmbed.trigger(HostEvent.AddToCoaching, { vizId: '730496d6-6903-4601-937e-2c691821af3c' });
|
|
3002
3019
|
*
|
|
3003
|
-
|
|
3020
|
+
* ```
|
|
3004
3021
|
* @version SDK: 1.45.0 | ThoughtSpot: 26.2.0.cl
|
|
3005
3022
|
*/
|
|
3006
3023
|
HostEvent["AddToCoaching"] = "addToCoaching";
|
|
@@ -3042,7 +3059,7 @@
|
|
|
3042
3059
|
* });
|
|
3043
3060
|
*
|
|
3044
3061
|
* spotterEmbed.trigger(HostEvent.AnswerChartSwitcher, { vizId: latestSpotterVizId });
|
|
3045
|
-
|
|
3062
|
+
* ```
|
|
3046
3063
|
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
3047
3064
|
*/
|
|
3048
3065
|
HostEvent["AnswerChartSwitcher"] = "answerChartSwitcher";
|
|
@@ -3052,7 +3069,7 @@
|
|
|
3052
3069
|
* This is automatically triggered by the SDK when fullscreen mode is exited.
|
|
3053
3070
|
* ```js
|
|
3054
3071
|
* liveboardEmbed.trigger(HostEvent.ExitPresentMode);
|
|
3055
|
-
|
|
3072
|
+
* ```
|
|
3056
3073
|
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
3057
3074
|
*/
|
|
3058
3075
|
HostEvent["ExitPresentMode"] = "exitPresentMode";
|
|
@@ -3106,8 +3123,9 @@
|
|
|
3106
3123
|
/**
|
|
3107
3124
|
* Triggers a new conversation in Spotter embed.
|
|
3108
3125
|
*
|
|
3109
|
-
* This feature is available only when chat history is enabled on your ThoughtSpot
|
|
3110
|
-
* Contact your admin or ThoughtSpot Support to enable chat history on your
|
|
3126
|
+
* This feature is available only when chat history is enabled on your ThoughtSpot
|
|
3127
|
+
* instance. Contact your admin or ThoughtSpot Support to enable chat history on your
|
|
3128
|
+
* instance.
|
|
3111
3129
|
*
|
|
3112
3130
|
* @example
|
|
3113
3131
|
* ```js
|
|
@@ -3153,6 +3171,7 @@
|
|
|
3153
3171
|
*/
|
|
3154
3172
|
var Param;
|
|
3155
3173
|
(function (Param) {
|
|
3174
|
+
Param["Tsmcp"] = "tsmcp";
|
|
3156
3175
|
Param["EmbedApp"] = "embedApp";
|
|
3157
3176
|
Param["DataSources"] = "dataSources";
|
|
3158
3177
|
Param["DataSourceMode"] = "dataSourceMode";
|
|
@@ -3202,6 +3221,7 @@
|
|
|
3202
3221
|
// 'both' clicks in `contextMenuTrigger` configuration.
|
|
3203
3222
|
Param["ContextMenuTrigger"] = "contextMenuEnabledOnWhichClick";
|
|
3204
3223
|
Param["LinkOverride"] = "linkOverride";
|
|
3224
|
+
Param["EnableLinkOverridesV2"] = "enableLinkOverridesV2";
|
|
3205
3225
|
Param["blockNonEmbedFullAppAccess"] = "blockNonEmbedFullAppAccess";
|
|
3206
3226
|
Param["ShowInsertToSlide"] = "insertInToSlide";
|
|
3207
3227
|
Param["PrimaryNavHidden"] = "primaryNavHidden";
|
|
@@ -3296,6 +3316,7 @@
|
|
|
3296
3316
|
Param["IsThisPeriodInDateFiltersEnabled"] = "isThisPeriodInDateFiltersEnabled";
|
|
3297
3317
|
Param["HideToolResponseCardBranding"] = "hideToolResponseCardBranding";
|
|
3298
3318
|
Param["ToolResponseCardBrandingLabel"] = "toolResponseCardBrandingLabel";
|
|
3319
|
+
Param["EnableHomepageAnnouncement"] = "enableHomepageAnnouncement";
|
|
3299
3320
|
})(Param || (Param = {}));
|
|
3300
3321
|
/**
|
|
3301
3322
|
* ThoughtSpot application pages include actions and menu commands
|
|
@@ -3455,14 +3476,14 @@
|
|
|
3455
3476
|
* ```js
|
|
3456
3477
|
* disabledActions: [Action.CollapseDataPanel]
|
|
3457
3478
|
* ```
|
|
3458
|
-
* @version
|
|
3479
|
+
* @version SDK: 1.1.0 | ThoughtSpot Cloud: ts7.may.cl, 8.4.1.sw
|
|
3459
3480
|
*/
|
|
3460
3481
|
Action["CollapseDataSources"] = "collapseDataSources";
|
|
3461
3482
|
/**
|
|
3462
3483
|
* The **Collapse data panel** icon on the Search page.
|
|
3463
3484
|
* Collapses the data panel view.
|
|
3464
3485
|
*
|
|
3465
|
-
* @version
|
|
3486
|
+
* @version SDK: 1.34.0 | ThoughtSpot Cloud: 10.3.0.cl
|
|
3466
3487
|
*
|
|
3467
3488
|
* @example
|
|
3468
3489
|
* ```js
|
|
@@ -3909,13 +3930,12 @@
|
|
|
3909
3930
|
*/
|
|
3910
3931
|
Action["CreateMonitor"] = "createMonitor";
|
|
3911
3932
|
/**
|
|
3912
|
-
* @
|
|
3913
|
-
*
|
|
3933
|
+
* @version SDK: 1.11.1 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
3934
|
+
* @deprecated This action is deprecated. It was used for reporting errors.
|
|
3914
3935
|
* @example
|
|
3915
3936
|
* ```js
|
|
3916
3937
|
* disabledActions: [Action.ReportError]
|
|
3917
3938
|
* ```
|
|
3918
|
-
* @version SDK: 1.11.1 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
3919
3939
|
*/
|
|
3920
3940
|
Action["ReportError"] = "reportError";
|
|
3921
3941
|
/**
|
|
@@ -3925,7 +3945,7 @@
|
|
|
3925
3945
|
* ```js
|
|
3926
3946
|
* disabledActions: [Action.SyncToSheets]
|
|
3927
3947
|
* ```
|
|
3928
|
-
* @version SDK: 1.18.0| ThoughtSpot: 8.10.0.cl, 9.0.1.sw
|
|
3948
|
+
* @version SDK: 1.18.0 | ThoughtSpot: 8.10.0.cl, 9.0.1.sw
|
|
3929
3949
|
*/
|
|
3930
3950
|
Action["SyncToSheets"] = "sync-to-sheets";
|
|
3931
3951
|
/**
|
|
@@ -3936,7 +3956,7 @@
|
|
|
3936
3956
|
* ```js
|
|
3937
3957
|
* disabledActions: [Action.SyncToOtherApps]
|
|
3938
3958
|
* ```
|
|
3939
|
-
* @version SDK: 1.18.0| ThoughtSpot: 8.10.0.cl, 9.0.1.sw
|
|
3959
|
+
* @version SDK: 1.18.0 | ThoughtSpot: 8.10.0.cl, 9.0.1.sw
|
|
3940
3960
|
*/
|
|
3941
3961
|
Action["SyncToOtherApps"] = "sync-to-other-apps";
|
|
3942
3962
|
/**
|
|
@@ -3946,7 +3966,7 @@
|
|
|
3946
3966
|
* ```js
|
|
3947
3967
|
* disabledActions: [Action.ManagePipelines]
|
|
3948
3968
|
* ```
|
|
3949
|
-
* @version SDK: 1.18.0| ThoughtSpot: 8.10.0.cl, 9.0.1.sw
|
|
3969
|
+
* @version SDK: 1.18.0 | ThoughtSpot: 8.10.0.cl, 9.0.1.sw
|
|
3950
3970
|
*/
|
|
3951
3971
|
Action["ManagePipelines"] = "manage-pipeline";
|
|
3952
3972
|
/**
|
|
@@ -4258,7 +4278,7 @@
|
|
|
4258
4278
|
* ```js
|
|
4259
4279
|
* disabledActions: [Action.PersonalisedViewsDropdown]
|
|
4260
4280
|
* ```
|
|
4261
|
-
* @version SDK
|
|
4281
|
+
* @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 10.1.0.sw
|
|
4262
4282
|
*/
|
|
4263
4283
|
Action["PersonalisedViewsDropdown"] = "personalisedViewsDropdown";
|
|
4264
4284
|
/**
|
|
@@ -4268,7 +4288,7 @@
|
|
|
4268
4288
|
* ```js
|
|
4269
4289
|
* disabledActions: [Action.LiveboardUsers]
|
|
4270
4290
|
* ```
|
|
4271
|
-
* @version SDK
|
|
4291
|
+
* @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 10.1.0.sw
|
|
4272
4292
|
*/
|
|
4273
4293
|
Action["LiveboardUsers"] = "liveboardUsers";
|
|
4274
4294
|
/**
|
|
@@ -4286,7 +4306,7 @@
|
|
|
4286
4306
|
* hiddenAction: [Action.TML] // hide all TML actions
|
|
4287
4307
|
* disabledActions: [Action.TML] // to disable all TML actions
|
|
4288
4308
|
* ```
|
|
4289
|
-
* @version SDK
|
|
4309
|
+
* @version SDK: 1.28.3 | ThoughtSpot: 9.12.0.cl, 10.1.0.sw
|
|
4290
4310
|
*/
|
|
4291
4311
|
Action["TML"] = "tml";
|
|
4292
4312
|
/**
|
|
@@ -4332,7 +4352,7 @@
|
|
|
4332
4352
|
* ```js
|
|
4333
4353
|
* disabledActions: [Action.AddToWatchlist]
|
|
4334
4354
|
* ```
|
|
4335
|
-
* @version SDK
|
|
4355
|
+
* @version SDK: 1.27.9 | ThoughtSpot Cloud: 9.12.5.cl
|
|
4336
4356
|
*/
|
|
4337
4357
|
Action["AddToWatchlist"] = "addToWatchlist";
|
|
4338
4358
|
/**
|
|
@@ -4342,7 +4362,7 @@
|
|
|
4342
4362
|
* ```js
|
|
4343
4363
|
* disabledActions: [Action.RemoveFromWatchlist]
|
|
4344
4364
|
* ```
|
|
4345
|
-
* @version SDK
|
|
4365
|
+
* @version SDK: 1.27.9 | ThoughtSpot: 9.12.5.cl
|
|
4346
4366
|
*/
|
|
4347
4367
|
Action["RemoveFromWatchlist"] = "removeFromWatchlist";
|
|
4348
4368
|
/**
|
|
@@ -4353,7 +4373,7 @@
|
|
|
4353
4373
|
* ```js
|
|
4354
4374
|
* disabledActions: [Action.OrganiseFavourites]
|
|
4355
4375
|
* ```
|
|
4356
|
-
* @version SDK
|
|
4376
|
+
* @version SDK: 1.32.0 | ThoughtSpot: 10.0.0.cl
|
|
4357
4377
|
*/
|
|
4358
4378
|
Action["OrganiseFavourites"] = "organiseFavourites";
|
|
4359
4379
|
/**
|
|
@@ -4414,7 +4434,7 @@
|
|
|
4414
4434
|
* ```js
|
|
4415
4435
|
* disabledActions: [Action.ManageTags]
|
|
4416
4436
|
* ```
|
|
4417
|
-
* @version SDK
|
|
4437
|
+
* @version SDK: 1.34.0 | ThoughtSpot Cloud: 10.3.0.cl
|
|
4418
4438
|
*/
|
|
4419
4439
|
Action["ManageTags"] = "manageTags";
|
|
4420
4440
|
/**
|
|
@@ -5046,7 +5066,9 @@
|
|
|
5046
5066
|
ErrorDetailsTypes["NETWORK"] = "NETWORK";
|
|
5047
5067
|
})(exports.ErrorDetailsTypes || (exports.ErrorDetailsTypes = {}));
|
|
5048
5068
|
/**
|
|
5049
|
-
* Error codes for identifying specific issues in embedded ThoughtSpot components. Use
|
|
5069
|
+
* Error codes for identifying specific issues in embedded ThoughtSpot components. Use
|
|
5070
|
+
* {@link EmbedErrorDetailsEvent} and {@link ErrorDetailsTypes} codes for precise error
|
|
5071
|
+
* handling and debugging.
|
|
5050
5072
|
*
|
|
5051
5073
|
* @version SDK: 1.44.2 | ThoughtSpot: 26.2.0.cl
|
|
5052
5074
|
* @group Error Handling
|
|
@@ -5414,7 +5436,7 @@
|
|
|
5414
5436
|
* @returns true if the value is a valid CSS margin value, false otherwise
|
|
5415
5437
|
*/
|
|
5416
5438
|
const isValidCssMargin = (value) => {
|
|
5417
|
-
if (isUndefined
|
|
5439
|
+
if (isUndefined(value)) {
|
|
5418
5440
|
return false;
|
|
5419
5441
|
}
|
|
5420
5442
|
if (typeof value !== 'string') {
|
|
@@ -5602,7 +5624,7 @@
|
|
|
5602
5624
|
element.style.removeProperty(styleProperty);
|
|
5603
5625
|
});
|
|
5604
5626
|
};
|
|
5605
|
-
const isUndefined
|
|
5627
|
+
const isUndefined = (value) => value === undefined;
|
|
5606
5628
|
// Return if the value is a string, double or boolean.
|
|
5607
5629
|
const getTypeFromValue = (value) => {
|
|
5608
5630
|
if (typeof value === 'string') {
|
|
@@ -5799,6 +5821,14 @@
|
|
|
5799
5821
|
return [false, error instanceof Error ? error : new Error(String(error))];
|
|
5800
5822
|
}
|
|
5801
5823
|
};
|
|
5824
|
+
/**
|
|
5825
|
+
* Resolves enablePastConversationsSidebar with
|
|
5826
|
+
* spotterSidebarConfig taking precedence over the
|
|
5827
|
+
* standalone flag.
|
|
5828
|
+
*/
|
|
5829
|
+
const resolveEnablePastConversationsSidebar = (params) => (params.spotterSidebarConfigValue !== undefined
|
|
5830
|
+
? params.spotterSidebarConfigValue
|
|
5831
|
+
: params.standaloneValue);
|
|
5802
5832
|
/**
|
|
5803
5833
|
* Sets a query parameter if the value is defined.
|
|
5804
5834
|
* @param queryParams - The query params object to modify
|
|
@@ -8281,7 +8311,6 @@
|
|
|
8281
8311
|
}
|
|
8282
8312
|
if (cachedAuthToken && cachedAuthToken === authToken) {
|
|
8283
8313
|
if (!embedConfig.suppressErrorAlerts && !suppressAlert) {
|
|
8284
|
-
// eslint-disable-next-line no-alert
|
|
8285
8314
|
alert(ERROR_MESSAGE.DUPLICATE_TOKEN_ERR);
|
|
8286
8315
|
}
|
|
8287
8316
|
throw new Error(ERROR_MESSAGE.DUPLICATE_TOKEN_ERR);
|
|
@@ -8379,7 +8408,7 @@
|
|
|
8379
8408
|
* tokenizedFetch("<TS_ORIGIN>/api/rest/2.0/auth/session/user", {
|
|
8380
8409
|
* // .. fetch options ..
|
|
8381
8410
|
* });
|
|
8382
|
-
|
|
8411
|
+
* ```
|
|
8383
8412
|
* @version SDK: 1.28.0
|
|
8384
8413
|
* @group Global methods
|
|
8385
8414
|
*/
|
|
@@ -8713,12 +8742,12 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
8713
8742
|
}`;
|
|
8714
8743
|
|
|
8715
8744
|
// import YAML from 'yaml';
|
|
8716
|
-
// eslint-disable-next-line no-shadow
|
|
8717
8745
|
var OperationType;
|
|
8718
8746
|
(function (OperationType) {
|
|
8719
8747
|
OperationType["GetChartWithData"] = "GetChartWithData";
|
|
8720
8748
|
OperationType["GetTableWithHeadlineData"] = "GetTableWithHeadlineData";
|
|
8721
8749
|
})(OperationType || (OperationType = {}));
|
|
8750
|
+
const DATA_TYPES = ['DATE', 'DATE_TIME', 'TIME'];
|
|
8722
8751
|
/**
|
|
8723
8752
|
* AnswerService provides a simple way to work with ThoughtSpot Answers.
|
|
8724
8753
|
*
|
|
@@ -8728,10 +8757,11 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
8728
8757
|
*
|
|
8729
8758
|
* You can use this service to:
|
|
8730
8759
|
*
|
|
8731
|
-
* - Add or remove columns from Answers (`addColumns`, `removeColumns`,
|
|
8732
|
-
* - Apply filters to Answers (`addFilter`)
|
|
8733
|
-
* - Get data from Answers in different formats (JSON, CSV, PNG) (`fetchData`,
|
|
8734
|
-
* - Get data for specific points in visualizations
|
|
8760
|
+
* - Add or remove columns from Answers (`addColumns`, `removeColumns`,
|
|
8761
|
+
* `addColumnsByName`) - Apply filters to Answers (`addFilter`)
|
|
8762
|
+
* - Get data from Answers in different formats (JSON, CSV, PNG) (`fetchData`,
|
|
8763
|
+
* `fetchCSVBlob`, `fetchPNGBlob`) - Get data for specific points in visualizations
|
|
8764
|
+
* (`getUnderlyingDataForPoint`)
|
|
8735
8765
|
* - Run custom queries (`executeQuery`)
|
|
8736
8766
|
* - Add visualizations to Liveboards (`addDisplayedVizToLiveboard`)
|
|
8737
8767
|
*
|
|
@@ -8764,7 +8794,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
8764
8794
|
* });
|
|
8765
8795
|
* ```
|
|
8766
8796
|
*
|
|
8767
|
-
* @version SDK: 1.25.0| ThoughtSpot: 9.10.0.cl
|
|
8797
|
+
* @version SDK: 1.25.0 | ThoughtSpot: 9.10.0.cl
|
|
8768
8798
|
* @group Events
|
|
8769
8799
|
*/
|
|
8770
8800
|
class AnswerService {
|
|
@@ -8825,6 +8855,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
8825
8855
|
* ]);
|
|
8826
8856
|
* console.log(await service.fetchData());
|
|
8827
8857
|
* });
|
|
8858
|
+
* ```
|
|
8828
8859
|
*/
|
|
8829
8860
|
async addColumnsByName(columnNames) {
|
|
8830
8861
|
const sourceDetail = await this.getSourceDetail();
|
|
@@ -8955,7 +8986,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
8955
8986
|
* const data = await underlying.fetchData(0, 100);
|
|
8956
8987
|
* })
|
|
8957
8988
|
* ```
|
|
8958
|
-
* @version SDK: 1.25.0| ThoughtSpot: 9.10.0.cl
|
|
8989
|
+
* @version SDK: 1.25.0 | ThoughtSpot: 9.10.0.cl
|
|
8959
8990
|
*/
|
|
8960
8991
|
async getUnderlyingDataForPoint(outputColumnNames, selectedPoints) {
|
|
8961
8992
|
if (!selectedPoints && !this.selectedPoints) {
|
|
@@ -9074,7 +9105,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
9074
9105
|
const dataType = colVal.column.dataType;
|
|
9075
9106
|
colVal.column.id;
|
|
9076
9107
|
let dataValue;
|
|
9077
|
-
if (dataType
|
|
9108
|
+
if (DATA_TYPES.includes(dataType)) {
|
|
9078
9109
|
if (Number.isFinite(colVal.value)) {
|
|
9079
9110
|
dataValue = [{
|
|
9080
9111
|
epochRange: {
|
|
@@ -9112,13 +9143,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
9112
9143
|
*/
|
|
9113
9144
|
function getDisplayedViz(visualizations, displayMode) {
|
|
9114
9145
|
if (displayMode === 'CHART_MODE') {
|
|
9115
|
-
return visualizations.find(
|
|
9116
|
-
// eslint-disable-next-line no-underscore-dangle
|
|
9117
|
-
(viz) => viz.__typename === 'ChartViz');
|
|
9146
|
+
return visualizations.find((viz) => viz.__typename === 'ChartViz');
|
|
9118
9147
|
}
|
|
9119
|
-
return visualizations.find(
|
|
9120
|
-
// eslint-disable-next-line no-underscore-dangle
|
|
9121
|
-
(viz) => viz.__typename === 'TableViz');
|
|
9148
|
+
return visualizations.find((viz) => viz.__typename === 'TableViz');
|
|
9122
9149
|
}
|
|
9123
9150
|
|
|
9124
9151
|
/** Built-in value references. */
|
|
@@ -17465,11 +17492,8 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
17465
17492
|
resetCachedPreauthInfo();
|
|
17466
17493
|
}
|
|
17467
17494
|
|
|
17468
|
-
// eslint-disable-next-line import/no-mutable-exports
|
|
17469
17495
|
let loggedInStatus = false;
|
|
17470
|
-
// eslint-disable-next-line import/no-mutable-exports
|
|
17471
17496
|
let samlAuthWindow = null;
|
|
17472
|
-
// eslint-disable-next-line import/no-mutable-exports
|
|
17473
17497
|
let samlCompletionPromise = null;
|
|
17474
17498
|
let releaseVersion = '';
|
|
17475
17499
|
const SSO_REDIRECTION_MARKER_GUID = '5e16222e-ef02-43e9-9fbd-24226bf3ce5b';
|
|
@@ -17527,20 +17551,45 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
17527
17551
|
exports.AuthStatus = void 0;
|
|
17528
17552
|
(function (AuthStatus) {
|
|
17529
17553
|
/**
|
|
17530
|
-
* Emits when the SDK fails to authenticate
|
|
17554
|
+
* Emits when the SDK fails to authenticate.
|
|
17531
17555
|
*/
|
|
17532
17556
|
AuthStatus["FAILURE"] = "FAILURE";
|
|
17533
17557
|
/**
|
|
17534
|
-
* Emits when the SDK
|
|
17558
|
+
* Emits when the SDK authentication step completes
|
|
17559
|
+
* successfully (e.g., token exchange, cookie set).
|
|
17560
|
+
* This fires before any iframe is rendered. Use
|
|
17561
|
+
* this to know that auth passed and it is safe to
|
|
17562
|
+
* proceed with rendering. The callback receives no
|
|
17563
|
+
* arguments.
|
|
17564
|
+
* @example
|
|
17565
|
+
* ```js
|
|
17566
|
+
* const authEE = init({ ... });
|
|
17567
|
+
* authEE.on(AuthStatus.SDK_SUCCESS, () => {
|
|
17568
|
+
* // Auth done, iframe not loaded yet
|
|
17569
|
+
* });
|
|
17570
|
+
* ```
|
|
17535
17571
|
*/
|
|
17536
17572
|
AuthStatus["SDK_SUCCESS"] = "SDK_SUCCESS";
|
|
17537
17573
|
/**
|
|
17538
17574
|
* @hidden
|
|
17539
|
-
* Emits when iframe is loaded and session
|
|
17575
|
+
* Emits when iframe is loaded and session
|
|
17576
|
+
* information is available.
|
|
17540
17577
|
*/
|
|
17541
17578
|
AuthStatus["SESSION_INFO_SUCCESS"] = "SESSION_INFO_SUCCESS";
|
|
17542
17579
|
/**
|
|
17543
|
-
* Emits when the app
|
|
17580
|
+
* Emits when the ThoughtSpot app inside the
|
|
17581
|
+
* embedded iframe confirms its session is active.
|
|
17582
|
+
* This fires after the iframe loads and sends back an `AuthInit` event.
|
|
17583
|
+
* @param sessionInfo Information about the user session, with details like `userGUID`.
|
|
17584
|
+
* @see EmbedEvent.AuthInit
|
|
17585
|
+
* @example
|
|
17586
|
+
* ```js
|
|
17587
|
+
* const authEE = init({ ... });
|
|
17588
|
+
* authEE.on(AuthStatus.SUCCESS, (sessionInfo) => {
|
|
17589
|
+
* // App is loaded and authenticated
|
|
17590
|
+
* console.log(sessionInfo.userGUID);
|
|
17591
|
+
* });
|
|
17592
|
+
* ```
|
|
17544
17593
|
*/
|
|
17545
17594
|
AuthStatus["SUCCESS"] = "SUCCESS";
|
|
17546
17595
|
/**
|
|
@@ -17999,8 +18048,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
17999
18048
|
});
|
|
18000
18049
|
}
|
|
18001
18050
|
|
|
18002
|
-
/* eslint-disable camelcase */
|
|
18003
|
-
/* eslint-disable import/no-mutable-exports */
|
|
18004
18051
|
/**
|
|
18005
18052
|
* Copyright (c) 2022
|
|
18006
18053
|
*
|
|
@@ -18056,7 +18103,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18056
18103
|
const prefetch = (url, prefetchFeatures, additionalFlags) => {
|
|
18057
18104
|
var _a;
|
|
18058
18105
|
if (url === '') {
|
|
18059
|
-
// eslint-disable-next-line no-console
|
|
18060
18106
|
logger$3.warn('The prefetch method does not have a valid URL');
|
|
18061
18107
|
}
|
|
18062
18108
|
else {
|
|
@@ -18076,9 +18122,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18076
18122
|
iFrame.style.width = '0';
|
|
18077
18123
|
iFrame.style.height = '0';
|
|
18078
18124
|
iFrame.style.border = '0';
|
|
18079
|
-
// Make it 'fixed' to keep it in a different stacking
|
|
18080
|
-
//
|
|
18081
|
-
//
|
|
18125
|
+
// Make it 'fixed' to keep it in a different stacking
|
|
18126
|
+
// context. This should solve the focus behaviours inside
|
|
18127
|
+
// the iframe from interfering with main body.
|
|
18082
18128
|
iFrame.style.position = 'fixed';
|
|
18083
18129
|
// Push it out of viewport.
|
|
18084
18130
|
iFrame.style.top = '100vh';
|
|
@@ -18227,7 +18273,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18227
18273
|
return renderQueue;
|
|
18228
18274
|
}
|
|
18229
18275
|
// Sending an empty function to keep it consistent with the above usage.
|
|
18230
|
-
return fn(() => { });
|
|
18276
|
+
return fn(() => { });
|
|
18231
18277
|
};
|
|
18232
18278
|
/**
|
|
18233
18279
|
* Imports TML representation of the metadata objects into ThoughtSpot.
|
|
@@ -18248,7 +18294,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18248
18294
|
* }).catch(error => {
|
|
18249
18295
|
* console.error(error);
|
|
18250
18296
|
* });
|
|
18251
|
-
|
|
18297
|
+
* ```
|
|
18252
18298
|
* @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
|
|
18253
18299
|
* @group Global methods
|
|
18254
18300
|
*/
|
|
@@ -18351,9 +18397,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18351
18397
|
};
|
|
18352
18398
|
/**
|
|
18353
18399
|
* Reloads the ThoughtSpot iframe.
|
|
18400
|
+
* @version SDK: 1.43.1
|
|
18354
18401
|
* @param iFrame
|
|
18355
18402
|
* @group Global methods
|
|
18356
|
-
* @version SDK: 1.43.1
|
|
18357
18403
|
*/
|
|
18358
18404
|
const reloadIframe = (iFrame) => {
|
|
18359
18405
|
if (!iFrame) {
|
|
@@ -18420,10 +18466,8 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18420
18466
|
const { loginFailedMessage, suppressNoCookieAccessAlert, ignoreNoCookieAccess, suppressErrorAlerts, } = getEmbedConfig();
|
|
18421
18467
|
if (!ignoreNoCookieAccess) {
|
|
18422
18468
|
if (!suppressNoCookieAccessAlert && !suppressErrorAlerts) {
|
|
18423
|
-
// eslint-disable-next-line no-alert
|
|
18424
18469
|
alert(ERROR_MESSAGE.THIRD_PARTY_COOKIE_BLOCKED_ALERT);
|
|
18425
18470
|
}
|
|
18426
|
-
// eslint-disable-next-line no-param-reassign
|
|
18427
18471
|
containerEl.innerHTML = loginFailedMessage;
|
|
18428
18472
|
}
|
|
18429
18473
|
notifyAuthFailure(exports.AuthFailureType.NO_COOKIE_ACCESS);
|
|
@@ -18441,12 +18485,10 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18441
18485
|
const isTrustedAuth = authType === exports.AuthType.TrustedAuthToken || authType === exports.AuthType.TrustedAuthTokenCookieless;
|
|
18442
18486
|
const isEmbeddedSSOInfoFailure = isEmbeddedSSO && ((_a = e === null || e === void 0 ? void 0 : e.data) === null || _a === void 0 ? void 0 : _a.type) === exports.AuthFailureType.UNAUTHENTICATED_FAILURE;
|
|
18443
18487
|
if (autoLogin && isTrustedAuth) {
|
|
18444
|
-
// eslint-disable-next-line no-param-reassign
|
|
18445
18488
|
containerEl.innerHTML = loginFailedMessage;
|
|
18446
18489
|
notifyAuthFailure(exports.AuthFailureType.IDLE_SESSION_TIMEOUT);
|
|
18447
18490
|
}
|
|
18448
18491
|
else if (authType !== exports.AuthType.None && !disableLoginFailurePage && !isEmbeddedSSOInfoFailure) {
|
|
18449
|
-
// eslint-disable-next-line no-param-reassign
|
|
18450
18492
|
containerEl.innerHTML = loginFailedMessage;
|
|
18451
18493
|
notifyAuthFailure(exports.AuthFailureType.OTHER);
|
|
18452
18494
|
}
|
|
@@ -18460,7 +18502,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18460
18502
|
*/
|
|
18461
18503
|
function processAuthLogout(e, containerEl) {
|
|
18462
18504
|
const { loginFailedMessage } = getEmbedConfig();
|
|
18463
|
-
// eslint-disable-next-line no-param-reassign
|
|
18464
18505
|
containerEl.innerHTML = loginFailedMessage;
|
|
18465
18506
|
resetCachedAuthToken();
|
|
18466
18507
|
disableAutoLogin();
|
|
@@ -18494,7 +18535,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18494
18535
|
return eventData;
|
|
18495
18536
|
}
|
|
18496
18537
|
|
|
18497
|
-
var name="@thoughtspot/visual-embed-sdk";var version$1="1.46.
|
|
18538
|
+
var name="@thoughtspot/visual-embed-sdk";var version$1="1.46.3";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports$1={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p tsconfig.build.json --incremental false; tsc -p tsconfig.build.json --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle-generator --config ./dts-config/dts-bundle-file.config.js","bundle-dts":"dts-bundle-generator --config ./dts-config/dts-bundle.config.js","bundle-dts-react":"dts-bundle-generator --config ./dts-config/dts-bundle-react.config.js","bundle-dts-react-full":"dts-bundle-generator --config ./dts-config/dts-bundle-react-full.config.js",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.build.json --theme typedoc-theme --json static/typedoc/typedoc.json --disableOutputCheck","test-sdk":"jest -c jest.config.sdk.js --runInBand",test:"npm run test-sdk",posttest:"cat ./coverage/sdk/lcov.info | npx coveralls-next || echo 'Warning: Coveralls upload failed but not breaking the build.'","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest",dev:"vite -c vite.local.config.ts"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={classnames:"^2.3.1",eventemitter3:"^4.0.7",lodash:"^4.17.23","mixpanel-browser":"2.47.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1",yaml:"^2.5.1"};var devDependencies={"@mdx-js/mdx":"^1.6.22","@mdx-js/react":"^1.6.22","@react-icons/all-files":"^4.1.0","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^5.0.2","@size-limit/preset-big-lib":"^11.2.0","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^30.0.0","@types/lodash":"^4.17.0","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^8.28.0","@typescript-eslint/parser":"^8.28.0",ajv:"^8.17.1",asciidoctor:"^2.2.1","babel-jest":"^30.2.0","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1","coveralls-next":"^5.0.0",crypto:"^1.0.1","current-git-branch":"^1.1.0","dts-bundle-generator":"^9.5.1",eslint:"^9.23.0","eslint-config-airbnb-base":"^15.0.0","eslint-config-prettier":"^10.1.1","eslint-import-resolver-typescript":"^4.2.5","eslint-plugin-comment-length":"2.2.1","eslint-plugin-import":"^2.31.0","eslint-plugin-jsdoc":"^50.6.9","eslint-plugin-prettier":"^5.2.5","eslint-plugin-react":"^7.37.5","eslint-plugin-react-hooks":"^5.2.0","fs-extra":"^10.0.0","gh-pages":"6.3.0",globals:"^16.0.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^2.0.0",jest:"^30.2.0","jest-environment-jsdom":"^29.7.0","jest-fetch-mock":"^3.0.3",jsdom:"^17.0.0",prettier:"2.1.2",react:"^16.14.0","react-dom":"^16.14.0","react-resizable":"^1.11.0","react-resize-detector":"^6.6.0","react-test-renderer":"^17.0.2","react-use-flexsearch":"^0.1.1",rollup:"4.24.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^29.4.6","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","typescript-eslint":"^8.29.1","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^6.3.5"};var author="ThoughtSpot";var email="support@thoughtspot.com";var license="ThoughtSpot Development Tools End User License Agreement";var directories={lib:"lib"};var repository={type:"git",url:"git+https://github.com/thoughtspot/visual-embed-sdk.git"};var publishConfig={registry:"https://registry.npmjs.org"};var keywords=["thoughtspot","everywhere","embedded","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version$1,description:description,module:module,main:main,types:types,files:files,exports:exports$1,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.es.js",limit:"32 kB"}],scripts:scripts,peerDependencies:peerDependencies,dependencies:dependencies,devDependencies:devDependencies,author:author,email:email,license:license,directories:directories,repository:repository,publishConfig:publishConfig,keywords:keywords,bugs:bugs,homepage:homepage,globals:globals};
|
|
18498
18539
|
|
|
18499
18540
|
class HostEventClient {
|
|
18500
18541
|
constructor(iFrame) {
|
|
@@ -18518,14 +18559,12 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18518
18559
|
const response = (_b = (_a = (await this.triggerUIPassthroughApi(apiName, parameters, context))) === null || _a === void 0 ? void 0 : _a.filter) === null || _b === void 0 ? void 0 : _b.call(_a, (r) => r.error || r.value)[0];
|
|
18519
18560
|
if (!response) {
|
|
18520
18561
|
const error = `No answer found${parameters.vizId ? ` for vizId: ${parameters.vizId}` : ''}.`;
|
|
18521
|
-
// eslint-disable-next-line no-throw-literal
|
|
18522
18562
|
throw { error };
|
|
18523
18563
|
}
|
|
18524
18564
|
const errors = response.error
|
|
18525
18565
|
|| ((_c = response.value) === null || _c === void 0 ? void 0 : _c.errors)
|
|
18526
18566
|
|| ((_d = response.value) === null || _d === void 0 ? void 0 : _d.error);
|
|
18527
18567
|
if (errors) {
|
|
18528
|
-
// eslint-disable-next-line no-throw-literal
|
|
18529
18568
|
throw { error: response.error };
|
|
18530
18569
|
}
|
|
18531
18570
|
return { ...response.value };
|
|
@@ -18800,9 +18839,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18800
18839
|
this.embedNodeKey = '__tsEmbed';
|
|
18801
18840
|
this.isAppInitialized = false;
|
|
18802
18841
|
/**
|
|
18803
|
-
* Should we encode URL Query Params using base64 encoding which
|
|
18842
|
+
* Should we encode URL Query Params using base64 encoding which ThoughtSpot
|
|
18804
18843
|
* will generate for embedding. This provides additional security to
|
|
18805
|
-
*
|
|
18844
|
+
* ThoughtSpot clusters against Cross site scripting attacks.
|
|
18806
18845
|
* @default false
|
|
18807
18846
|
*/
|
|
18808
18847
|
this.shouldEncodeUrlQueryParams = false;
|
|
@@ -18867,7 +18906,8 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18867
18906
|
*/
|
|
18868
18907
|
this.updateAuthToken = async (_, responder) => {
|
|
18869
18908
|
const { authType, autoLogin: autoLoginConfig } = this.embedConfig;
|
|
18870
|
-
// Default autoLogin: true for cookieless if undefined/null, otherwise
|
|
18909
|
+
// Default autoLogin: true for cookieless if undefined/null, otherwise
|
|
18910
|
+
// false
|
|
18871
18911
|
const autoLogin = autoLoginConfig !== null && autoLoginConfig !== void 0 ? autoLoginConfig : (authType === exports.AuthType.TrustedAuthTokenCookieless);
|
|
18872
18912
|
try {
|
|
18873
18913
|
await this.refreshAuthTokenForCookieless(responder, exports.EmbedEvent.AuthExpire, false);
|
|
@@ -18978,7 +19018,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18978
19018
|
if (viewConfig.preRenderId) {
|
|
18979
19019
|
const allOtherKeys = Object.keys(viewConfig).filter((key) => !preRenderAllowedKeys.includes(key) && !key.startsWith('on'));
|
|
18980
19020
|
allOtherKeys.forEach((key) => {
|
|
18981
|
-
if (!isUndefined
|
|
19021
|
+
if (!isUndefined(viewConfig[key])
|
|
18982
19022
|
&& !isEqual_1(viewConfig[key], preRenderedObject.viewConfig[key])) {
|
|
18983
19023
|
logger$3.warn(`${viewConfig.embedComponentType || 'Component'} was pre-rendered with `
|
|
18984
19024
|
+ `"${key}" as "${JSON.stringify(preRenderedObject.viewConfig[key])}" `
|
|
@@ -19314,7 +19354,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
19314
19354
|
if (this.embedConfig.currencyFormat) {
|
|
19315
19355
|
queryParams[Param.CurrencyFormat] = this.embedConfig.currencyFormat;
|
|
19316
19356
|
}
|
|
19317
|
-
const { disabledActions, disabledActionReason, hiddenActions, visibleActions, hiddenTabs, visibleTabs, showAlerts, additionalFlags: additionalFlagsFromView, locale, customizations, contextMenuTrigger, linkOverride, insertInToSlide, disableRedirectionLinksInNewTab, overrideOrgId, exposeTranslationIDs, primaryAction, } = this.viewConfig;
|
|
19357
|
+
const { disabledActions, disabledActionReason, hiddenActions, visibleActions, hiddenTabs, visibleTabs, showAlerts, additionalFlags: additionalFlagsFromView, locale, customizations, contextMenuTrigger, linkOverride, enableLinkOverridesV2, insertInToSlide, disableRedirectionLinksInNewTab, overrideOrgId, exposeTranslationIDs, primaryAction, } = this.viewConfig;
|
|
19318
19358
|
const { additionalFlags: additionalFlagsFromInit } = this.embedConfig;
|
|
19319
19359
|
const additionalFlags = {
|
|
19320
19360
|
...additionalFlagsFromInit,
|
|
@@ -19390,7 +19430,13 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
19390
19430
|
if (locale !== undefined) {
|
|
19391
19431
|
queryParams[Param.Locale] = locale;
|
|
19392
19432
|
}
|
|
19393
|
-
|
|
19433
|
+
// TODO: Once V2 is stable, send both flags when
|
|
19434
|
+
// linkOverride is true (remove the else-if).
|
|
19435
|
+
if (enableLinkOverridesV2) {
|
|
19436
|
+
queryParams[Param.EnableLinkOverridesV2] = true;
|
|
19437
|
+
queryParams[Param.LinkOverride] = true;
|
|
19438
|
+
}
|
|
19439
|
+
else if (linkOverride) {
|
|
19394
19440
|
queryParams[Param.LinkOverride] = linkOverride;
|
|
19395
19441
|
}
|
|
19396
19442
|
if (insertInToSlide) {
|
|
@@ -19458,7 +19504,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
19458
19504
|
iFrame.mozallowfullscreen = true;
|
|
19459
19505
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
19460
19506
|
// @ts-ignore
|
|
19461
|
-
iFrame.allow = 'clipboard-read; clipboard-write; fullscreen;';
|
|
19507
|
+
iFrame.allow = 'clipboard-read; clipboard-write; fullscreen; local-network-access;';
|
|
19462
19508
|
const frameParams = this.viewConfig.frameParams;
|
|
19463
19509
|
const { height: frameHeight, width: frameWidth, ...restParams } = frameParams || {};
|
|
19464
19510
|
const width = getCssDimension(frameWidth || DEFAULT_EMBED_WIDTH);
|
|
@@ -20160,7 +20206,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
20160
20206
|
* Returns the answerService which can be used to make arbitrary graphql calls on top
|
|
20161
20207
|
* session.
|
|
20162
20208
|
* @param vizId [Optional] to get for a specific viz in case of a Liveboard.
|
|
20163
|
-
* @version SDK: 1.25.0
|
|
20209
|
+
* @version SDK: 1.25.0 | ThoughtSpot: 9.10.0
|
|
20164
20210
|
*/
|
|
20165
20211
|
async getAnswerService(vizId) {
|
|
20166
20212
|
const { session } = await this.trigger(exports.HostEvent.GetAnswerSession, vizId ? { vizId } : {});
|
|
@@ -20460,7 +20506,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
20460
20506
|
* embedded Liveboard or visualization.
|
|
20461
20507
|
*/
|
|
20462
20508
|
getEmbedParams() {
|
|
20463
|
-
const { tag, hideTagFilterChips, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideHamburger, hideObjectSearch, hideNotification, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 = true, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, showMaskedFilterChip = false, isLiveboardMasterpiecesEnabled = false, hideHomepageLeftNav = false, modularHomeExperience = false, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, enable2ColumnLayout, enableCustomColumnGroups = false, dataPanelCustomGroupsAccordionInitialState = exports.DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, isEnhancedFilterInteractivityEnabled = false, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, discoveryExperience, coverAndFilterOptionInPDF = false, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, isLiveboardXLSXCSVDownloadEnabled = false, isGranularXLSXCSVSchedulesEnabled = false, isCentralizedLiveboardFilterUXEnabled = false, isLinkParametersEnabled, updatedSpotterChatPrompt, spotterSidebarConfig, spotterChatConfig, minimumHeight, isThisPeriodInDateFiltersEnabled, } = this.viewConfig;
|
|
20509
|
+
const { tag, hideTagFilterChips, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideHamburger, hideObjectSearch, hideNotification, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 = true, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, showMaskedFilterChip = false, isLiveboardMasterpiecesEnabled = false, hideHomepageLeftNav = false, modularHomeExperience = false, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, enable2ColumnLayout, enableCustomColumnGroups = false, dataPanelCustomGroupsAccordionInitialState = exports.DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, isEnhancedFilterInteractivityEnabled = false, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, discoveryExperience, coverAndFilterOptionInPDF = false, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, isLiveboardXLSXCSVDownloadEnabled = false, isGranularXLSXCSVSchedulesEnabled = false, isCentralizedLiveboardFilterUXEnabled = false, isLinkParametersEnabled, updatedSpotterChatPrompt, spotterSidebarConfig, spotterChatConfig, minimumHeight, isThisPeriodInDateFiltersEnabled, enableHomepageAnnouncement, } = this.viewConfig;
|
|
20464
20510
|
let params = {};
|
|
20465
20511
|
params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
|
|
20466
20512
|
params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
|
|
@@ -20481,13 +20527,17 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
20481
20527
|
params[Param.IsUnifiedSearchExperienceEnabled] = isUnifiedSearchExperienceEnabled;
|
|
20482
20528
|
params[Param.CoverAndFilterOptionInPDF] = !!coverAndFilterOptionInPDF;
|
|
20483
20529
|
params = this.getBaseQueryParams(params);
|
|
20484
|
-
if (!isUndefined
|
|
20530
|
+
if (!isUndefined(updatedSpotterChatPrompt)) {
|
|
20485
20531
|
params[Param.UpdatedSpotterChatPrompt] = !!updatedSpotterChatPrompt;
|
|
20486
20532
|
}
|
|
20533
|
+
const resolvedEnablePastConversationsSidebar = resolveEnablePastConversationsSidebar({
|
|
20534
|
+
spotterSidebarConfigValue: spotterSidebarConfig === null || spotterSidebarConfig === void 0 ? void 0 : spotterSidebarConfig.enablePastConversationsSidebar,
|
|
20535
|
+
standaloneValue: this.viewConfig.enablePastConversationsSidebar,
|
|
20536
|
+
});
|
|
20537
|
+
setParamIfDefined(params, Param.EnablePastConversationsSidebar, resolvedEnablePastConversationsSidebar, true);
|
|
20487
20538
|
// Handle spotterSidebarConfig params
|
|
20488
20539
|
if (spotterSidebarConfig) {
|
|
20489
|
-
const {
|
|
20490
|
-
setParamIfDefined(params, Param.EnablePastConversationsSidebar, enablePastConversationsSidebar, true);
|
|
20540
|
+
const { spotterSidebarTitle, spotterSidebarDefaultExpanded, spotterChatRenameLabel, spotterChatDeleteLabel, spotterDeleteConversationModalTitle, spotterPastConversationAlertMessage, spotterDocumentationUrl, spotterBestPracticesLabel, spotterConversationsBatchSize, spotterNewChatButtonTitle, } = spotterSidebarConfig;
|
|
20491
20541
|
setParamIfDefined(params, Param.SpotterSidebarDefaultExpanded, spotterSidebarDefaultExpanded, true);
|
|
20492
20542
|
setParamIfDefined(params, Param.SpotterSidebarTitle, spotterSidebarTitle);
|
|
20493
20543
|
setParamIfDefined(params, Param.SpotterChatRenameLabel, spotterChatRenameLabel);
|
|
@@ -20585,6 +20635,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
20585
20635
|
if (isThisPeriodInDateFiltersEnabled !== undefined) {
|
|
20586
20636
|
params[Param.IsThisPeriodInDateFiltersEnabled] = isThisPeriodInDateFiltersEnabled;
|
|
20587
20637
|
}
|
|
20638
|
+
if (enableHomepageAnnouncement !== undefined) {
|
|
20639
|
+
params[Param.EnableHomepageAnnouncement] = enableHomepageAnnouncement;
|
|
20640
|
+
}
|
|
20588
20641
|
this.defaultHeight = minimumHeight || this.defaultHeight;
|
|
20589
20642
|
params[Param.DataPanelV2Enabled] = dataPanelV2;
|
|
20590
20643
|
params[Param.HideHomepageLeftNav] = hideHomepageLeftNav;
|
|
@@ -20759,7 +20812,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
20759
20812
|
}
|
|
20760
20813
|
}
|
|
20761
20814
|
|
|
20762
|
-
/* eslint-disable quotes */
|
|
20763
20815
|
const getPreviewQuery = `
|
|
20764
20816
|
query GetEurekaVizSnapshots(
|
|
20765
20817
|
$vizId: String!, $liveboardId: String!) {
|
|
@@ -20843,6 +20895,7 @@ query GetEurekaVizSnapshots(
|
|
|
20843
20895
|
* Embed a ThoughtSpot Liveboard or visualization. When rendered it already
|
|
20844
20896
|
* waits for the authentication to complete, so you need not wait for
|
|
20845
20897
|
* `AuthStatus.SUCCESS`.
|
|
20898
|
+
* @group Embed components
|
|
20846
20899
|
* @example
|
|
20847
20900
|
* ```js
|
|
20848
20901
|
* import { .. } from '@thoughtspot/visual-embed-sdk';
|
|
@@ -20852,7 +20905,6 @@ query GetEurekaVizSnapshots(
|
|
|
20852
20905
|
* // .. other params here.
|
|
20853
20906
|
* })
|
|
20854
20907
|
* ```
|
|
20855
|
-
* @group Embed components
|
|
20856
20908
|
*/
|
|
20857
20909
|
class LiveboardEmbed extends V1Embed {
|
|
20858
20910
|
constructor(domSelector, viewConfig) {
|
|
@@ -20960,7 +21012,7 @@ query GetEurekaVizSnapshots(
|
|
|
20960
21012
|
if (preventLiveboardFilterRemoval) {
|
|
20961
21013
|
params[Param.preventLiveboardFilterRemoval] = true;
|
|
20962
21014
|
}
|
|
20963
|
-
if (!isUndefined
|
|
21015
|
+
if (!isUndefined(updatedSpotterChatPrompt)) {
|
|
20964
21016
|
params[Param.UpdatedSpotterChatPrompt] = !!updatedSpotterChatPrompt;
|
|
20965
21017
|
}
|
|
20966
21018
|
if (visibleVizs) {
|
|
@@ -21045,8 +21097,9 @@ query GetEurekaVizSnapshots(
|
|
|
21045
21097
|
return params;
|
|
21046
21098
|
}
|
|
21047
21099
|
getIframeSuffixSrc(liveboardId, vizId, activeTabId, personalizedViewId) {
|
|
21048
|
-
// Extract view from liveboardId if passed along with it (legacy
|
|
21049
|
-
// View must be appended as query param at the end, not
|
|
21100
|
+
// Extract view from liveboardId if passed along with it (legacy
|
|
21101
|
+
// approach) View must be appended as query param at the end, not
|
|
21102
|
+
// embedded in path
|
|
21050
21103
|
let liveboardGuid = liveboardId;
|
|
21051
21104
|
let legacyViewId;
|
|
21052
21105
|
if (liveboardId === null || liveboardId === void 0 ? void 0 : liveboardId.includes('?')) {
|
|
@@ -21055,7 +21108,8 @@ query GetEurekaVizSnapshots(
|
|
|
21055
21108
|
const params = new URLSearchParams(query);
|
|
21056
21109
|
legacyViewId = params.get('view') || undefined;
|
|
21057
21110
|
}
|
|
21058
|
-
// personalizedViewId takes precedence over legacyViewId (when passed
|
|
21111
|
+
// personalizedViewId takes precedence over legacyViewId (when passed
|
|
21112
|
+
// as part of liveboardId)
|
|
21059
21113
|
const effectiveViewId = personalizedViewId || legacyViewId;
|
|
21060
21114
|
let suffix = `/embed/viz/${liveboardGuid}`;
|
|
21061
21115
|
if (activeTabId) {
|
|
@@ -21139,7 +21193,7 @@ query GetEurekaVizSnapshots(
|
|
|
21139
21193
|
});
|
|
21140
21194
|
}
|
|
21141
21195
|
async handleRenderForPrerender() {
|
|
21142
|
-
if (isUndefined
|
|
21196
|
+
if (isUndefined(this.viewConfig.liveboardId)) {
|
|
21143
21197
|
return this.prerenderGeneric();
|
|
21144
21198
|
}
|
|
21145
21199
|
return super.handleRenderForPrerender();
|
|
@@ -21425,7 +21479,7 @@ query GetEurekaVizSnapshots(
|
|
|
21425
21479
|
|
|
21426
21480
|
/**
|
|
21427
21481
|
* Embed ThoughtSpot search bar
|
|
21428
|
-
* @version
|
|
21482
|
+
* @version SDK: 1.18.0 | ThoughtSpot: 8.10.0.cl, 9.0.1-sw
|
|
21429
21483
|
* @group Embed components
|
|
21430
21484
|
*/
|
|
21431
21485
|
class SearchBarEmbed extends TsEmbed {
|
|
@@ -21926,6 +21980,8 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
21926
21980
|
/**
|
|
21927
21981
|
* Create a conversation embed, which can be integrated inside
|
|
21928
21982
|
* chatbots or other conversational interfaces.
|
|
21983
|
+
* @version SDK: 1.37.0 | ThoughtSpot: 10.9.0.cl
|
|
21984
|
+
* @group Embed components
|
|
21929
21985
|
* @example
|
|
21930
21986
|
* ```js
|
|
21931
21987
|
* import { SpotterAgentEmbed } from '@thoughtspot/visual-embed-sdk';
|
|
@@ -21939,8 +21995,6 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
21939
21995
|
* // append the container to the DOM
|
|
21940
21996
|
* document.body.appendChild(container); // or to any other element
|
|
21941
21997
|
* ```
|
|
21942
|
-
* @group Embed components
|
|
21943
|
-
* @version SDK: 1.37.0 | ThoughtSpot: 10.9.0.cl
|
|
21944
21998
|
*/
|
|
21945
21999
|
class SpotterAgentEmbed {
|
|
21946
22000
|
constructor(viewConfig) {
|
|
@@ -21994,8 +22048,9 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
21994
22048
|
/**
|
|
21995
22049
|
* Create a conversation embed, which can be integrated inside
|
|
21996
22050
|
* chatbots or other conversational interfaces.
|
|
21997
|
-
* @deprecated from SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
|
|
21998
22051
|
* Use {@link SpotterAgentEmbed} instead
|
|
22052
|
+
* @deprecated from SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
|
|
22053
|
+
* @group Embed components
|
|
21999
22054
|
* @example
|
|
22000
22055
|
* ```js
|
|
22001
22056
|
* import { SpotterAgentEmbed } from '@thoughtspot/visual-embed-sdk';
|
|
@@ -22009,7 +22064,6 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
22009
22064
|
* // append the container to the DOM
|
|
22010
22065
|
* document.body.appendChild(container); // or to any other element
|
|
22011
22066
|
* ```
|
|
22012
|
-
* @group Embed components
|
|
22013
22067
|
*/
|
|
22014
22068
|
class BodylessConversation extends SpotterAgentEmbed {
|
|
22015
22069
|
constructor(viewConfig) {
|
|
@@ -22017,31 +22071,9 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
22017
22071
|
}
|
|
22018
22072
|
}
|
|
22019
22073
|
|
|
22020
|
-
/**
|
|
22021
|
-
* Checks if `value` is `undefined`.
|
|
22022
|
-
*
|
|
22023
|
-
* @static
|
|
22024
|
-
* @since 0.1.0
|
|
22025
|
-
* @memberOf _
|
|
22026
|
-
* @category Lang
|
|
22027
|
-
* @param {*} value The value to check.
|
|
22028
|
-
* @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
|
|
22029
|
-
* @example
|
|
22030
|
-
*
|
|
22031
|
-
* _.isUndefined(void 0);
|
|
22032
|
-
* // => true
|
|
22033
|
-
*
|
|
22034
|
-
* _.isUndefined(null);
|
|
22035
|
-
* // => false
|
|
22036
|
-
*/
|
|
22037
|
-
function isUndefined(value) {
|
|
22038
|
-
return value === undefined;
|
|
22039
|
-
}
|
|
22040
|
-
|
|
22041
|
-
var isUndefined_1 = isUndefined;
|
|
22042
|
-
|
|
22043
22074
|
/**
|
|
22044
22075
|
* Embed ThoughtSpot AI Conversation.
|
|
22076
|
+
* @version SDK: 1.37.0 | ThoughtSpot: 10.9.0.cl
|
|
22045
22077
|
* @group Embed components
|
|
22046
22078
|
* @example
|
|
22047
22079
|
* ```js
|
|
@@ -22053,7 +22085,6 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
22053
22085
|
* });
|
|
22054
22086
|
* conversation.render();
|
|
22055
22087
|
* ```
|
|
22056
|
-
* @version SDK: 1.37.0 | ThoughtSpot: 10.9.0.cl
|
|
22057
22088
|
*/
|
|
22058
22089
|
class SpotterEmbed extends TsEmbed {
|
|
22059
22090
|
constructor(container, viewConfig) {
|
|
@@ -22069,7 +22100,11 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
22069
22100
|
getEmbedParamsObject() {
|
|
22070
22101
|
const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, updatedSpotterChatPrompt, spotterSidebarConfig, spotterChatConfig, } = this.viewConfig;
|
|
22071
22102
|
// Extract sidebar config properties
|
|
22072
|
-
const { enablePastConversationsSidebar, spotterSidebarTitle, spotterSidebarDefaultExpanded, spotterChatRenameLabel, spotterChatDeleteLabel, spotterDeleteConversationModalTitle, spotterPastConversationAlertMessage, spotterDocumentationUrl, spotterBestPracticesLabel, spotterConversationsBatchSize, spotterNewChatButtonTitle, } = spotterSidebarConfig || {};
|
|
22103
|
+
const { enablePastConversationsSidebar: sidebarEnablePastConversationsSidebar, spotterSidebarTitle, spotterSidebarDefaultExpanded, spotterChatRenameLabel, spotterChatDeleteLabel, spotterDeleteConversationModalTitle, spotterPastConversationAlertMessage, spotterDocumentationUrl, spotterBestPracticesLabel, spotterConversationsBatchSize, spotterNewChatButtonTitle, } = spotterSidebarConfig || {};
|
|
22104
|
+
const resolvedEnablePastConversationsSidebar = resolveEnablePastConversationsSidebar({
|
|
22105
|
+
spotterSidebarConfigValue: sidebarEnablePastConversationsSidebar,
|
|
22106
|
+
standaloneValue: this.viewConfig.enablePastConversationsSidebar,
|
|
22107
|
+
});
|
|
22073
22108
|
if (!worksheetId) {
|
|
22074
22109
|
this.handleError({
|
|
22075
22110
|
errorType: exports.ErrorDetailsTypes.VALIDATION_ERROR,
|
|
@@ -22087,6 +22122,7 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
22087
22122
|
setParamIfDefined(queryParams, Param.ShowSpotterLimitations, showSpotterLimitations, true);
|
|
22088
22123
|
setParamIfDefined(queryParams, Param.HideSampleQuestions, hideSampleQuestions, true);
|
|
22089
22124
|
setParamIfDefined(queryParams, Param.UpdatedSpotterChatPrompt, updatedSpotterChatPrompt, true);
|
|
22125
|
+
setParamIfDefined(queryParams, Param.EnablePastConversationsSidebar, resolvedEnablePastConversationsSidebar, true);
|
|
22090
22126
|
setParamIfDefined(queryParams, Param.SpotterSidebarDefaultExpanded, spotterSidebarDefaultExpanded, true);
|
|
22091
22127
|
// String params
|
|
22092
22128
|
setParamIfDefined(queryParams, Param.SpotterSidebarTitle, spotterSidebarTitle);
|
|
@@ -22121,13 +22157,9 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
22121
22157
|
return queryParams;
|
|
22122
22158
|
}
|
|
22123
22159
|
getIframeSrc() {
|
|
22124
|
-
const { worksheetId, searchOptions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL,
|
|
22160
|
+
const { worksheetId, searchOptions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, } = this.viewConfig;
|
|
22125
22161
|
const path = 'insights/conv-assist';
|
|
22126
22162
|
const queryParams = this.getEmbedParamsObject();
|
|
22127
|
-
const enablePastConversationsSidebar = spotterSidebarConfig === null || spotterSidebarConfig === void 0 ? void 0 : spotterSidebarConfig.enablePastConversationsSidebar;
|
|
22128
|
-
if (!isUndefined_1(enablePastConversationsSidebar)) {
|
|
22129
|
-
queryParams[Param.EnablePastConversationsSidebar] = !!enablePastConversationsSidebar;
|
|
22130
|
-
}
|
|
22131
22163
|
let query = '';
|
|
22132
22164
|
const queryParamsString = getQueryParamString(queryParams, true);
|
|
22133
22165
|
if (queryParamsString) {
|
|
@@ -22156,8 +22188,9 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
22156
22188
|
}
|
|
22157
22189
|
/**
|
|
22158
22190
|
* Embed ThoughtSpot AI Conversation.
|
|
22159
|
-
* @deprecated from SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
|
|
22160
22191
|
* Use {@link SpotterEmbed} instead
|
|
22192
|
+
* @version SDK: 1.37.0 | ThoughtSpot: 10.9.0.cl
|
|
22193
|
+
* @deprecated from SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
|
|
22161
22194
|
* @group Embed components
|
|
22162
22195
|
* @example
|
|
22163
22196
|
* ```js
|
|
@@ -22169,7 +22202,6 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
22169
22202
|
* });
|
|
22170
22203
|
* conversation.render();
|
|
22171
22204
|
* ```
|
|
22172
|
-
* @version SDK: 1.37.0 | ThoughtSpot: 10.9.0.cl
|
|
22173
22205
|
*/
|
|
22174
22206
|
class ConversationEmbed extends SpotterEmbed {
|
|
22175
22207
|
constructor(container, viewConfig) {
|
|
@@ -22193,13 +22225,12 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
22193
22225
|
*/
|
|
22194
22226
|
/**
|
|
22195
22227
|
* Embed ThoughtSpot LLM and GPT-based Natural Language Search component.
|
|
22196
|
-
* @version
|
|
22228
|
+
* @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl, 9.5.1-sw
|
|
22197
22229
|
*
|
|
22198
22230
|
* Note: This embed will be deprecated from SDK: 1.40.0 | ThoughtSpot: 10.13.0.cl
|
|
22199
22231
|
* @group Embed components
|
|
22200
22232
|
*/
|
|
22201
22233
|
class SageEmbed extends V1Embed {
|
|
22202
|
-
// eslint-disable-next-line no-useless-constructor
|
|
22203
22234
|
constructor(domSelector, viewConfig) {
|
|
22204
22235
|
viewConfig.embedComponentType = 'SageEmbed';
|
|
22205
22236
|
super(domSelector, viewConfig);
|
|
@@ -22788,6 +22819,144 @@ query GetEurekaResults($params: Input_eureka_SearchRequest) {
|
|
|
22788
22819
|
return result;
|
|
22789
22820
|
};
|
|
22790
22821
|
|
|
22822
|
+
/**
|
|
22823
|
+
* Starts an automatic renderer that watches the DOM for iframes containing
|
|
22824
|
+
* the `tsmcp=true` query parameter and replaces them with fully configured
|
|
22825
|
+
* ThoughtSpot embed iframes. The query parameter is automatically added by
|
|
22826
|
+
* the ThoughtSpot MCP server.
|
|
22827
|
+
*
|
|
22828
|
+
* A {@link MutationObserver} is set up on `document.body` to detect both
|
|
22829
|
+
* directly added iframes and iframes nested within added container elements.
|
|
22830
|
+
* Each matching iframe is replaced in-place with a new ThoughtSpot embed
|
|
22831
|
+
* iframe that merges the original iframe's query parameters with the SDK
|
|
22832
|
+
* embed parameters.
|
|
22833
|
+
*
|
|
22834
|
+
* Call {@link MutationObserver.disconnect | observer.disconnect()} on the
|
|
22835
|
+
* returned observer to stop monitoring the DOM.
|
|
22836
|
+
*
|
|
22837
|
+
* @param viewConfig - Optional configuration for the auto-rendered embeds.
|
|
22838
|
+
* Accepts all properties from {@link AutoMCPFrameRendererViewConfig}.
|
|
22839
|
+
* Defaults to an empty config.
|
|
22840
|
+
* @returns A {@link MutationObserver} instance that is actively observing
|
|
22841
|
+
* `document.body`. Disconnect it when monitoring is no longer needed.
|
|
22842
|
+
*
|
|
22843
|
+
* @example
|
|
22844
|
+
* ```js
|
|
22845
|
+
* import { startAutoMCPFrameRenderer } from '@thoughtspot/visual-embed-sdk';
|
|
22846
|
+
*
|
|
22847
|
+
* // Start watching the DOM for tsmcp iframes
|
|
22848
|
+
* const observer = startAutoMCPFrameRenderer({
|
|
22849
|
+
* // optional view config overrides
|
|
22850
|
+
* });
|
|
22851
|
+
*
|
|
22852
|
+
* // Later, stop watching
|
|
22853
|
+
* observer.disconnect();
|
|
22854
|
+
* ```
|
|
22855
|
+
*
|
|
22856
|
+
* @example
|
|
22857
|
+
* Detailed example of how to use the auto-frame renderer:
|
|
22858
|
+
* [Python React Agent Simple UI](https://github.com/thoughtspot/developer-examples/tree/main/mcp/python-react-agent-simple-ui)
|
|
22859
|
+
*/
|
|
22860
|
+
function startAutoMCPFrameRenderer(viewConfig = {}) {
|
|
22861
|
+
const replaceWithMCPIframe = (iframe) => {
|
|
22862
|
+
const autoMCPFrameRenderer = new AutoFrameRenderer(viewConfig);
|
|
22863
|
+
autoMCPFrameRenderer.replaceIframe(iframe);
|
|
22864
|
+
};
|
|
22865
|
+
const observer = new MutationObserver((mutations) => {
|
|
22866
|
+
for (const mutation of mutations) {
|
|
22867
|
+
for (const node of Array.from(mutation.addedNodes)) {
|
|
22868
|
+
if (node instanceof HTMLIFrameElement && isTSMCPIframe(node)) {
|
|
22869
|
+
replaceWithMCPIframe(node);
|
|
22870
|
+
}
|
|
22871
|
+
if (node instanceof HTMLElement) {
|
|
22872
|
+
node.querySelectorAll('iframe').forEach((iframe) => {
|
|
22873
|
+
if (isTSMCPIframe(iframe)) {
|
|
22874
|
+
replaceWithMCPIframe(iframe);
|
|
22875
|
+
}
|
|
22876
|
+
});
|
|
22877
|
+
}
|
|
22878
|
+
}
|
|
22879
|
+
}
|
|
22880
|
+
});
|
|
22881
|
+
observer.observe(document.body, { childList: true, subtree: true });
|
|
22882
|
+
return observer;
|
|
22883
|
+
}
|
|
22884
|
+
function isTSMCPIframe(iframe) {
|
|
22885
|
+
try {
|
|
22886
|
+
const url = new URL(iframe.src);
|
|
22887
|
+
return url.searchParams.get(Param.Tsmcp) === 'true';
|
|
22888
|
+
}
|
|
22889
|
+
catch (e) {
|
|
22890
|
+
// The iframe src might not be a valid URL (e.g., 'about:blank').
|
|
22891
|
+
return false;
|
|
22892
|
+
}
|
|
22893
|
+
}
|
|
22894
|
+
/**
|
|
22895
|
+
* Embed component that automatically replaces a plain iframe with a
|
|
22896
|
+
* ThoughtSpot embed iframe. It merges the SDK's embed parameters with
|
|
22897
|
+
* the original iframe's query parameters (stripping the `tsmcp` marker)
|
|
22898
|
+
* and swaps the original iframe element in the DOM.
|
|
22899
|
+
*
|
|
22900
|
+
* This class is used internally by {@link startAutoMCPFrameRenderer} and
|
|
22901
|
+
* is not intended to be instantiated directly.
|
|
22902
|
+
*/
|
|
22903
|
+
class AutoFrameRenderer extends TsEmbed {
|
|
22904
|
+
constructor(viewConfig) {
|
|
22905
|
+
viewConfig.embedComponentType = 'auto-frame-renderer';
|
|
22906
|
+
const container = document.createElement('div');
|
|
22907
|
+
super(container, viewConfig);
|
|
22908
|
+
this.viewConfig = viewConfig;
|
|
22909
|
+
}
|
|
22910
|
+
/**
|
|
22911
|
+
* Builds the final iframe `src` by merging the SDK embed parameters
|
|
22912
|
+
* with the query parameters already present on the source iframe URL.
|
|
22913
|
+
* The `tsmcp` marker param is removed so it does not propagate to the
|
|
22914
|
+
* ThoughtSpot application.
|
|
22915
|
+
*
|
|
22916
|
+
* @param sourceSrc - The original iframe's `src` URL string.
|
|
22917
|
+
* @returns The constructed URL to use for the ThoughtSpot embed iframe.
|
|
22918
|
+
*/
|
|
22919
|
+
getMCPIframeSrc(sourceSrc) {
|
|
22920
|
+
const queryParams = this.getEmbedParamsObject();
|
|
22921
|
+
const sourceURL = new URL(sourceSrc);
|
|
22922
|
+
const existingQueryParams = sourceURL.searchParams;
|
|
22923
|
+
const existingQueryParamsObject = Object.fromEntries(existingQueryParams);
|
|
22924
|
+
delete existingQueryParamsObject[Param.Tsmcp];
|
|
22925
|
+
const mergedQueryParams = { ...queryParams, ...existingQueryParamsObject };
|
|
22926
|
+
const mergedQueryParamsString = getQueryParamString(mergedQueryParams);
|
|
22927
|
+
const frameSrc = `${this.getEmbedBasePath(mergedQueryParamsString)}${sourceURL.hash.replace('#', '')}`;
|
|
22928
|
+
return frameSrc;
|
|
22929
|
+
}
|
|
22930
|
+
/**
|
|
22931
|
+
* Overrides the base insertion behavior so the new embed iframe
|
|
22932
|
+
* replaces the original iframe in-place rather than being appended
|
|
22933
|
+
* to a container element. Falls back to the default behavior when
|
|
22934
|
+
* no iframe has been set for replacement.
|
|
22935
|
+
*/
|
|
22936
|
+
handleInsertionIntoDOM(child) {
|
|
22937
|
+
if (this.frameToReplace) {
|
|
22938
|
+
this.frameToReplace.replaceWith(child);
|
|
22939
|
+
}
|
|
22940
|
+
else {
|
|
22941
|
+
super.handleInsertionIntoDOM(child);
|
|
22942
|
+
}
|
|
22943
|
+
}
|
|
22944
|
+
/**
|
|
22945
|
+
* Replaces the given iframe with a new ThoughtSpot embed iframe.
|
|
22946
|
+
*
|
|
22947
|
+
* The original iframe's `src` is used to derive the embed URL, and
|
|
22948
|
+
* once the new iframe is rendered it takes the original's place in
|
|
22949
|
+
* the DOM tree.
|
|
22950
|
+
*
|
|
22951
|
+
* @param iframe - The existing `<iframe>` element to replace.
|
|
22952
|
+
*/
|
|
22953
|
+
async replaceIframe(iframe) {
|
|
22954
|
+
this.frameToReplace = iframe;
|
|
22955
|
+
const src = this.getMCPIframeSrc(iframe.src);
|
|
22956
|
+
await this.renderIFrame(src);
|
|
22957
|
+
}
|
|
22958
|
+
}
|
|
22959
|
+
|
|
22791
22960
|
const ALIAS = Symbol.for('yaml.alias');
|
|
22792
22961
|
const DOC = Symbol.for('yaml.document');
|
|
22793
22962
|
const MAP = Symbol.for('yaml.map');
|
|
@@ -30213,6 +30382,7 @@ query GetEurekaResults($params: Input_eureka_SearchRequest) {
|
|
|
30213
30382
|
exports.prefetch = prefetch;
|
|
30214
30383
|
exports.reloadIframe = reloadIframe;
|
|
30215
30384
|
exports.resetCachedAuthToken = resetCachedAuthToken;
|
|
30385
|
+
exports.startAutoMCPFrameRenderer = startAutoMCPFrameRenderer;
|
|
30216
30386
|
exports.tokenizedFetch = tokenizedFetch;
|
|
30217
30387
|
exports.uploadMixpanelEvent = uploadMixpanelEvent;
|
|
30218
30388
|
|