@thoughtspot/visual-embed-sdk 1.52.2-beta.2 → 1.53.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/package.json +1 -1
- package/cjs/src/css-variables.d.ts +373 -5
- package/cjs/src/css-variables.d.ts.map +1 -1
- package/cjs/src/embed/app.d.ts +14 -0
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +6 -3
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/app.spec.js +28 -0
- package/cjs/src/embed/app.spec.js.map +1 -1
- package/cjs/src/embed/auto-frame-renderer.d.ts.map +1 -1
- package/cjs/src/embed/auto-frame-renderer.js +244 -4
- package/cjs/src/embed/auto-frame-renderer.js.map +1 -1
- package/cjs/src/embed/auto-frame-renderer.spec.js +389 -0
- package/cjs/src/embed/auto-frame-renderer.spec.js.map +1 -1
- package/cjs/src/embed/bodyless-conversation.js +1 -1
- package/cjs/src/embed/bodyless-conversation.js.map +1 -1
- package/cjs/src/embed/conversation.d.ts +15 -0
- package/cjs/src/embed/conversation.d.ts.map +1 -1
- package/cjs/src/embed/conversation.js +7 -3
- package/cjs/src/embed/conversation.js.map +1 -1
- package/cjs/src/embed/conversation.spec.js +66 -0
- package/cjs/src/embed/conversation.spec.js.map +1 -1
- package/cjs/src/embed/liveboard-override-utils.d.ts +59 -0
- package/cjs/src/embed/liveboard-override-utils.d.ts.map +1 -0
- package/cjs/src/embed/liveboard-override-utils.js +19 -0
- package/cjs/src/embed/liveboard-override-utils.js.map +1 -0
- package/cjs/src/embed/liveboard-override-utils.spec.d.ts +2 -0
- package/cjs/src/embed/liveboard-override-utils.spec.d.ts.map +1 -0
- package/cjs/src/embed/liveboard-override-utils.spec.js +34 -0
- package/cjs/src/embed/liveboard-override-utils.spec.js.map +1 -0
- package/cjs/src/embed/liveboard.d.ts +58 -13
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +11 -34
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/liveboard.spec.js +104 -79
- package/cjs/src/embed/liveboard.spec.js.map +1 -1
- package/cjs/src/embed/search-bar.js +1 -1
- package/cjs/src/embed/search-bar.js.map +1 -1
- package/cjs/src/embed/search.js +1 -1
- package/cjs/src/embed/search.js.map +1 -1
- package/cjs/src/embed/search.spec.js +20 -0
- package/cjs/src/embed/search.spec.js.map +1 -1
- package/cjs/src/embed/spotter-utils.d.ts +11 -0
- package/cjs/src/embed/spotter-utils.d.ts.map +1 -1
- package/cjs/src/embed/spotter-utils.js +13 -1
- package/cjs/src/embed/spotter-utils.js.map +1 -1
- package/cjs/src/embed/spotter-viz-utils.d.ts +15 -0
- package/cjs/src/embed/spotter-viz-utils.d.ts.map +1 -1
- package/cjs/src/embed/spotter-viz-utils.js.map +1 -1
- package/cjs/src/embed/spotter-viz-utils.spec.js +11 -0
- package/cjs/src/embed/spotter-viz-utils.spec.js.map +1 -1
- package/cjs/src/embed/ts-embed.d.ts +27 -34
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +224 -102
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/embed/ts-embed.spec.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.spec.js +543 -166
- package/cjs/src/embed/ts-embed.spec.js.map +1 -1
- package/cjs/src/index.d.ts +4 -2
- package/cjs/src/index.d.ts.map +1 -1
- package/cjs/src/index.js +4 -2
- package/cjs/src/index.js.map +1 -1
- package/cjs/src/mixpanel-service.d.ts +1 -0
- package/cjs/src/mixpanel-service.d.ts.map +1 -1
- package/cjs/src/mixpanel-service.js +1 -0
- package/cjs/src/mixpanel-service.js.map +1 -1
- package/cjs/src/react/all-types-export.d.ts +1 -1
- package/cjs/src/react/all-types-export.d.ts.map +1 -1
- package/cjs/src/react/all-types-export.js +2 -1
- package/cjs/src/react/all-types-export.js.map +1 -1
- package/cjs/src/types.d.ts +182 -2
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +109 -0
- package/cjs/src/types.js.map +1 -1
- package/cjs/src/utils/graphql/answerService/answer-queries.d.ts +1 -0
- package/cjs/src/utils/graphql/answerService/answer-queries.d.ts.map +1 -1
- package/cjs/src/utils/graphql/answerService/answer-queries.js +8 -1
- package/cjs/src/utils/graphql/answerService/answer-queries.js.map +1 -1
- package/cjs/src/utils/graphql/answerService/answerService.d.ts +28 -4
- package/cjs/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
- package/cjs/src/utils/graphql/answerService/answerService.js +39 -4
- package/cjs/src/utils/graphql/answerService/answerService.js.map +1 -1
- package/cjs/src/utils/graphql/answerService/answerService.spec.js +124 -0
- package/cjs/src/utils/graphql/answerService/answerService.spec.js.map +1 -1
- package/dist/{index-CnHREfvN.js → index-CyDR8j_0.js} +1 -1
- package/dist/src/css-variables.d.ts +373 -5
- package/dist/src/css-variables.d.ts.map +1 -1
- package/dist/src/embed/app.d.ts +14 -0
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/auto-frame-renderer.d.ts.map +1 -1
- package/dist/src/embed/conversation.d.ts +15 -0
- package/dist/src/embed/conversation.d.ts.map +1 -1
- package/dist/src/embed/liveboard-override-utils.d.ts +59 -0
- package/dist/src/embed/liveboard-override-utils.d.ts.map +1 -0
- package/dist/src/embed/liveboard-override-utils.spec.d.ts +2 -0
- package/dist/src/embed/liveboard-override-utils.spec.d.ts.map +1 -0
- package/dist/src/embed/liveboard.d.ts +58 -13
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/embed/spotter-utils.d.ts +11 -0
- package/dist/src/embed/spotter-utils.d.ts.map +1 -1
- package/dist/src/embed/spotter-viz-utils.d.ts +15 -0
- package/dist/src/embed/spotter-viz-utils.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.d.ts +27 -34
- package/dist/src/embed/ts-embed.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.spec.d.ts.map +1 -1
- package/dist/src/index.d.ts +4 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/mixpanel-service.d.ts +1 -0
- package/dist/src/mixpanel-service.d.ts.map +1 -1
- package/dist/src/react/all-types-export.d.ts +1 -1
- package/dist/src/react/all-types-export.d.ts.map +1 -1
- package/dist/src/types.d.ts +182 -2
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/graphql/answerService/answer-queries.d.ts +1 -0
- package/dist/src/utils/graphql/answerService/answer-queries.d.ts.map +1 -1
- package/dist/src/utils/graphql/answerService/answerService.d.ts +28 -4
- package/dist/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +437 -191
- package/dist/tsembed-react.js +436 -190
- package/dist/tsembed.es.js +680 -196
- package/dist/tsembed.js +678 -194
- package/dist/visual-embed-sdk-react-full.d.ts +702 -56
- package/dist/visual-embed-sdk-react.d.ts +697 -56
- package/dist/visual-embed-sdk.d.ts +744 -57
- package/lib/package.json +1 -1
- package/lib/src/css-variables.d.ts +373 -5
- package/lib/src/css-variables.d.ts.map +1 -1
- package/lib/src/embed/app.d.ts +14 -0
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +7 -4
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/app.spec.js +28 -0
- package/lib/src/embed/app.spec.js.map +1 -1
- package/lib/src/embed/auto-frame-renderer.d.ts.map +1 -1
- package/lib/src/embed/auto-frame-renderer.js +244 -4
- package/lib/src/embed/auto-frame-renderer.js.map +1 -1
- package/lib/src/embed/auto-frame-renderer.spec.js +389 -0
- package/lib/src/embed/auto-frame-renderer.spec.js.map +1 -1
- package/lib/src/embed/bodyless-conversation.js +1 -1
- package/lib/src/embed/bodyless-conversation.js.map +1 -1
- package/lib/src/embed/conversation.d.ts +15 -0
- package/lib/src/embed/conversation.d.ts.map +1 -1
- package/lib/src/embed/conversation.js +8 -4
- package/lib/src/embed/conversation.js.map +1 -1
- package/lib/src/embed/conversation.spec.js +67 -1
- package/lib/src/embed/conversation.spec.js.map +1 -1
- package/lib/src/embed/liveboard-override-utils.d.ts +59 -0
- package/lib/src/embed/liveboard-override-utils.d.ts.map +1 -0
- package/lib/src/embed/liveboard-override-utils.js +15 -0
- package/lib/src/embed/liveboard-override-utils.js.map +1 -0
- package/lib/src/embed/liveboard-override-utils.spec.d.ts +2 -0
- package/lib/src/embed/liveboard-override-utils.spec.d.ts.map +1 -0
- package/lib/src/embed/liveboard-override-utils.spec.js +32 -0
- package/lib/src/embed/liveboard-override-utils.spec.js.map +1 -0
- package/lib/src/embed/liveboard.d.ts +58 -13
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +11 -33
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +104 -79
- package/lib/src/embed/liveboard.spec.js.map +1 -1
- package/lib/src/embed/search-bar.js +1 -1
- package/lib/src/embed/search-bar.js.map +1 -1
- package/lib/src/embed/search.js +1 -1
- package/lib/src/embed/search.js.map +1 -1
- package/lib/src/embed/search.spec.js +20 -0
- package/lib/src/embed/search.spec.js.map +1 -1
- package/lib/src/embed/spotter-utils.d.ts +11 -0
- package/lib/src/embed/spotter-utils.d.ts.map +1 -1
- package/lib/src/embed/spotter-utils.js +12 -0
- package/lib/src/embed/spotter-utils.js.map +1 -1
- package/lib/src/embed/spotter-viz-utils.d.ts +15 -0
- package/lib/src/embed/spotter-viz-utils.d.ts.map +1 -1
- package/lib/src/embed/spotter-viz-utils.js.map +1 -1
- package/lib/src/embed/spotter-viz-utils.spec.js +11 -0
- package/lib/src/embed/spotter-viz-utils.spec.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts +27 -34
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +224 -102
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/embed/ts-embed.spec.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.spec.js +544 -167
- package/lib/src/embed/ts-embed.spec.js.map +1 -1
- package/lib/src/index.d.ts +4 -2
- package/lib/src/index.d.ts.map +1 -1
- package/lib/src/index.js +3 -2
- package/lib/src/index.js.map +1 -1
- package/lib/src/mixpanel-service.d.ts +1 -0
- package/lib/src/mixpanel-service.d.ts.map +1 -1
- package/lib/src/mixpanel-service.js +1 -0
- package/lib/src/mixpanel-service.js.map +1 -1
- package/lib/src/react/all-types-export.d.ts +1 -1
- package/lib/src/react/all-types-export.d.ts.map +1 -1
- package/lib/src/react/all-types-export.js +1 -1
- package/lib/src/react/all-types-export.js.map +1 -1
- package/lib/src/types.d.ts +182 -2
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +109 -0
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils/graphql/answerService/answer-queries.d.ts +1 -0
- package/lib/src/utils/graphql/answerService/answer-queries.d.ts.map +1 -1
- package/lib/src/utils/graphql/answerService/answer-queries.js +7 -0
- package/lib/src/utils/graphql/answerService/answer-queries.js.map +1 -1
- package/lib/src/utils/graphql/answerService/answerService.d.ts +28 -4
- package/lib/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
- package/lib/src/utils/graphql/answerService/answerService.js +39 -4
- package/lib/src/utils/graphql/answerService/answerService.js.map +1 -1
- package/lib/src/utils/graphql/answerService/answerService.spec.js +125 -1
- package/lib/src/utils/graphql/answerService/answerService.spec.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +744 -57
- package/package.json +1 -1
- package/src/css-variables.ts +475 -26
- package/src/embed/app.spec.ts +32 -0
- package/src/embed/app.ts +28 -4
- package/src/embed/auto-frame-renderer.spec.ts +464 -0
- package/src/embed/auto-frame-renderer.ts +305 -6
- package/src/embed/bodyless-conversation.ts +1 -1
- package/src/embed/conversation.spec.ts +94 -1
- package/src/embed/conversation.ts +28 -3
- package/src/embed/liveboard-override-utils.spec.ts +38 -0
- package/src/embed/liveboard-override-utils.ts +71 -0
- package/src/embed/liveboard.spec.ts +119 -92
- package/src/embed/liveboard.ts +56 -40
- package/src/embed/search-bar.tsx +1 -1
- package/src/embed/search.spec.ts +23 -0
- package/src/embed/search.ts +1 -1
- package/src/embed/spotter-utils.ts +12 -0
- package/src/embed/spotter-viz-utils.spec.ts +11 -0
- package/src/embed/spotter-viz-utils.ts +15 -0
- package/src/embed/ts-embed.spec.ts +685 -207
- package/src/embed/ts-embed.ts +227 -97
- package/src/index.ts +16 -1
- package/src/mixpanel-service.ts +1 -0
- package/src/react/all-types-export.ts +6 -0
- package/src/types.ts +186 -5
- package/src/utils/graphql/answerService/answer-queries.ts +8 -0
- package/src/utils/graphql/answerService/answerService.spec.ts +145 -1
- package/src/utils/graphql/answerService/answerService.ts +65 -3
package/dist/tsembed-react.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @thoughtspot/visual-embed-sdk version 1.
|
|
1
|
+
/* @thoughtspot/visual-embed-sdk version 1.53.0 */
|
|
2
2
|
'use client';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import React__default, { useRef, useCallback } from 'react';
|
|
@@ -1393,6 +1393,36 @@ var EmbedEvent;
|
|
|
1393
1393
|
* ```
|
|
1394
1394
|
*/
|
|
1395
1395
|
EmbedEvent["Edit"] = "edit";
|
|
1396
|
+
/**
|
|
1397
|
+
* Emitted when a user clicks **Edit** on a Liveboard.
|
|
1398
|
+
*
|
|
1399
|
+
* Fired alongside {@link EmbedEvent.Edit} for backward compatibility;
|
|
1400
|
+
* listen to this instead of `Edit` to target the Liveboard surface only.
|
|
1401
|
+
* @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
|
|
1402
|
+
* @example
|
|
1403
|
+
* ```js
|
|
1404
|
+
* liveboardEmbed.on(EmbedEvent.EditLiveboard, payload => {
|
|
1405
|
+
* console.log('Liveboard edit', payload);
|
|
1406
|
+
* })
|
|
1407
|
+
* ```
|
|
1408
|
+
*/
|
|
1409
|
+
EmbedEvent["EditLiveboard"] = "editLiveboard";
|
|
1410
|
+
/**
|
|
1411
|
+
* Emitted when a user clicks **Edit** on a visualization inside a
|
|
1412
|
+
* Liveboard.
|
|
1413
|
+
*
|
|
1414
|
+
* Fired alongside {@link EmbedEvent.Edit} for backward compatibility;
|
|
1415
|
+
* listen to this instead of `Edit` to target the visualization surface
|
|
1416
|
+
* only.
|
|
1417
|
+
* @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
|
|
1418
|
+
* @example
|
|
1419
|
+
* ```js
|
|
1420
|
+
* liveboardEmbed.on(EmbedEvent.EditVisualization, payload => {
|
|
1421
|
+
* console.log('visualization edit', payload);
|
|
1422
|
+
* })
|
|
1423
|
+
* ```
|
|
1424
|
+
*/
|
|
1425
|
+
EmbedEvent["EditVisualization"] = "editVisualization";
|
|
1396
1426
|
/**
|
|
1397
1427
|
* Emitted when a user clicks *Make a copy* on a Liveboard
|
|
1398
1428
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
@@ -3364,6 +3394,35 @@ var HostEvent;
|
|
|
3364
3394
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
3365
3395
|
*/
|
|
3366
3396
|
HostEvent["Edit"] = "edit";
|
|
3397
|
+
/**
|
|
3398
|
+
* Trigger the **Edit** action on a Liveboard only — does not affect a
|
|
3399
|
+
* visualization's edit surface.
|
|
3400
|
+
*
|
|
3401
|
+
* Behaves like {@link HostEvent.Edit} restricted to the Liveboard
|
|
3402
|
+
* surface. Use {@link HostEvent.EditVisualization} to target a
|
|
3403
|
+
* visualization instead, or `HostEvent.Edit` to control whichever
|
|
3404
|
+
* surface applies contextually (unchanged, existing behavior).
|
|
3405
|
+
* @example
|
|
3406
|
+
* ```js
|
|
3407
|
+
* liveboardEmbed.trigger(HostEvent.EditLiveboard)
|
|
3408
|
+
* ```
|
|
3409
|
+
* @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
|
|
3410
|
+
*/
|
|
3411
|
+
HostEvent["EditLiveboard"] = "editLiveboard";
|
|
3412
|
+
/**
|
|
3413
|
+
* Trigger the **Edit** action on a specific visualization inside a
|
|
3414
|
+
* Liveboard only — does not affect the Liveboard-level edit surface.
|
|
3415
|
+
* @param - Object parameter. Includes the following keys:
|
|
3416
|
+
* - `vizId`: **Required.** The visualization to edit.
|
|
3417
|
+
*
|
|
3418
|
+
* @example
|
|
3419
|
+
* ```js
|
|
3420
|
+
* liveboardEmbed.trigger(HostEvent.EditVisualization, {vizId:
|
|
3421
|
+
* '730496d6-6903-4601-937e-2c691821af3c'})
|
|
3422
|
+
* ```
|
|
3423
|
+
* @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
|
|
3424
|
+
*/
|
|
3425
|
+
HostEvent["EditVisualization"] = "editVisualization";
|
|
3367
3426
|
/**
|
|
3368
3427
|
* Trigger the **Copy link** action on a Liveboard or visualization
|
|
3369
3428
|
* Payload: {@link VizScopedRequest}.
|
|
@@ -4926,6 +4985,22 @@ var DataSourceVisualMode;
|
|
|
4926
4985
|
var Param;
|
|
4927
4986
|
(function (Param) {
|
|
4928
4987
|
Param["Tsmcp"] = "tsmcp";
|
|
4988
|
+
/**
|
|
4989
|
+
* Marker added by a host app replaying a stored conversation. Carries the
|
|
4990
|
+
* analytical session (conversation) identifier, from which the renderer
|
|
4991
|
+
* resolves the answer's current session parameters. Stripped before the
|
|
4992
|
+
* URL reaches the ThoughtSpot application.
|
|
4993
|
+
* @version SDK: 1.52.2 | ThoughtSpot Cloud: 26.9.0.cl
|
|
4994
|
+
*/
|
|
4995
|
+
Param["TsmcpConversationId"] = "tsmcpConversationId";
|
|
4996
|
+
/**
|
|
4997
|
+
* Zero-based position of the answer within the conversation, counting only
|
|
4998
|
+
* non-thinking answer items in message order. Accompanies
|
|
4999
|
+
* {@link TsmcpConversationId}; defaults to 0 when absent. Stripped before
|
|
5000
|
+
* the URL reaches the ThoughtSpot application.
|
|
5001
|
+
* @version SDK: 1.52.2 | ThoughtSpot Cloud: 26.9.0.cl
|
|
5002
|
+
*/
|
|
5003
|
+
Param["TsmcpAnswerIndex"] = "tsmcpAnswerIndex";
|
|
4929
5004
|
Param["EmbedApp"] = "embedApp";
|
|
4930
5005
|
Param["DataSources"] = "dataSources";
|
|
4931
5006
|
Param["DataSourceMode"] = "dataSourceMode";
|
|
@@ -5089,6 +5164,9 @@ var Param;
|
|
|
5089
5164
|
Param["SpotterDataSources"] = "spotterDataSources";
|
|
5090
5165
|
Param["OpenSpotterOnLiveboardByDefault"] = "openSpotterOnLiveboardByDefault";
|
|
5091
5166
|
Param["ShowAnswerEditPanel"] = "showAnswerEditPanel";
|
|
5167
|
+
Param["IsDarkMode"] = "isDarkMode";
|
|
5168
|
+
Param["RadiantThemeEnabled"] = "radiantThemeEnabled";
|
|
5169
|
+
Param["SpotterExperienceVersion"] = "spotterExperienceVersion";
|
|
5092
5170
|
})(Param || (Param = {}));
|
|
5093
5171
|
/**
|
|
5094
5172
|
* ThoughtSpot application pages include actions and menu commands
|
|
@@ -5543,12 +5621,43 @@ var Action;
|
|
|
5543
5621
|
* The *Edit* action on the Liveboard page and in the
|
|
5544
5622
|
* visualization menu.
|
|
5545
5623
|
* Opens a Liveboard or visualization in edit mode.
|
|
5624
|
+
*
|
|
5625
|
+
* Controls both surfaces together. To target one surface only, use
|
|
5626
|
+
* {@link Action.EditLiveboard} or {@link Action.EditVisualization}.
|
|
5546
5627
|
* @example
|
|
5547
5628
|
* ```js
|
|
5548
5629
|
* disabledActions: [Action.Edit]
|
|
5549
5630
|
* ```
|
|
5550
5631
|
*/
|
|
5551
5632
|
Action["Edit"] = "edit";
|
|
5633
|
+
/**
|
|
5634
|
+
* The *Edit* action on the Liveboard page only.
|
|
5635
|
+
* Opens a Liveboard in edit mode.
|
|
5636
|
+
*
|
|
5637
|
+
* Does not affect the *Edit* action in the visualization menu; use
|
|
5638
|
+
* {@link Action.EditVisualization} for that, or {@link Action.Edit} to
|
|
5639
|
+
* control both surfaces together.
|
|
5640
|
+
* @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
|
|
5641
|
+
* @example
|
|
5642
|
+
* ```js
|
|
5643
|
+
* disabledActions: [Action.EditLiveboard]
|
|
5644
|
+
* ```
|
|
5645
|
+
*/
|
|
5646
|
+
Action["EditLiveboard"] = "editLiveboard";
|
|
5647
|
+
/**
|
|
5648
|
+
* The *Edit* action in the visualization `...` menu only.
|
|
5649
|
+
* Opens a visualization in the editor.
|
|
5650
|
+
*
|
|
5651
|
+
* Does not affect the *Edit* action on the Liveboard page; use
|
|
5652
|
+
* {@link Action.EditLiveboard} for that, or {@link Action.Edit} to
|
|
5653
|
+
* control both surfaces together.
|
|
5654
|
+
* @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
|
|
5655
|
+
* @example
|
|
5656
|
+
* ```js
|
|
5657
|
+
* disabledActions: [Action.EditVisualization]
|
|
5658
|
+
* ```
|
|
5659
|
+
*/
|
|
5660
|
+
Action["EditVisualization"] = "editVisualization";
|
|
5552
5661
|
/**
|
|
5553
5662
|
* The text edit option for Liveboard and visualization titles.
|
|
5554
5663
|
* @example
|
|
@@ -7828,7 +7937,7 @@ var TableContentDensity;
|
|
|
7828
7937
|
TableContentDensity["Compact"] = "COMPACT";
|
|
7829
7938
|
})(TableContentDensity || (TableContentDensity = {}));
|
|
7830
7939
|
|
|
7831
|
-
var version$1="1.
|
|
7940
|
+
var version$1="1.53.0";var pkg = {version:version$1};
|
|
7832
7941
|
|
|
7833
7942
|
const { version } = pkg;
|
|
7834
7943
|
|
|
@@ -10097,6 +10206,13 @@ const addFilter = `
|
|
|
10097
10206
|
}
|
|
10098
10207
|
}
|
|
10099
10208
|
`;
|
|
10209
|
+
const updateSort = `
|
|
10210
|
+
mutation UpdateSort($session: BachSessionIdInput!, $sortOrder: [AnswerColumnSortInput!]!) {
|
|
10211
|
+
Answer__updateSort(session: $session, sortOrder: $sortOrder) {
|
|
10212
|
+
${bachSessionId}
|
|
10213
|
+
}
|
|
10214
|
+
}
|
|
10215
|
+
`;
|
|
10100
10216
|
const getAnswer = `
|
|
10101
10217
|
query GetAnswer($session: BachSessionIdInput!) {
|
|
10102
10218
|
getAnswer(session: $session) {
|
|
@@ -10401,6 +10517,26 @@ class AnswerService {
|
|
|
10401
10517
|
},
|
|
10402
10518
|
});
|
|
10403
10519
|
}
|
|
10520
|
+
/**
|
|
10521
|
+
* Adapt the sort options into the `updateSort` payload and send it.
|
|
10522
|
+
* @param sortOptions Columns to sort by, each with a direction.
|
|
10523
|
+
* @param sourceDetail
|
|
10524
|
+
*/
|
|
10525
|
+
async adaptSorting(sortOptions, sourceDetail) {
|
|
10526
|
+
const { answer } = await this.executeQuery(getAnswer, {});
|
|
10527
|
+
const guidToColumnId = getGuidToColumnIdMap(answer);
|
|
10528
|
+
const sortOrder = sortOptions.map((sort) => {
|
|
10529
|
+
const guid = getGuidsFromColumnNames(sourceDetail, [sort.columnName])
|
|
10530
|
+
.values().next().value;
|
|
10531
|
+
return {
|
|
10532
|
+
columnId: guidToColumnId.get(guid),
|
|
10533
|
+
sortType: sort.ascending ? 'ASCENDING' : 'DESCENDING',
|
|
10534
|
+
};
|
|
10535
|
+
});
|
|
10536
|
+
return this.executeQuery(updateSort, {
|
|
10537
|
+
sortOrder,
|
|
10538
|
+
});
|
|
10539
|
+
}
|
|
10404
10540
|
async updateDisplayMode(displayMode = "TABLE_MODE") {
|
|
10405
10541
|
return this.executeQuery(updateDisplayMode, {
|
|
10406
10542
|
displayMode,
|
|
@@ -10488,18 +10624,21 @@ class AnswerService {
|
|
|
10488
10624
|
* automatically passed.
|
|
10489
10625
|
* @param outputColumnNames
|
|
10490
10626
|
* @param selectedPoints
|
|
10627
|
+
* @param sortOptions Optional columns to sort the underlying data by.
|
|
10491
10628
|
* @example
|
|
10492
10629
|
* ```js
|
|
10493
10630
|
* embed.on(EmbedEvent.CustomAction, e => {
|
|
10494
|
-
* const underlying = await e.answerService.getUnderlyingDataForPoint(
|
|
10495
|
-
* 'col name 1' // The column should exist in the data source.
|
|
10496
|
-
*
|
|
10631
|
+
* const underlying = await e.answerService.getUnderlyingDataForPoint(
|
|
10632
|
+
* ['col name 1'], // The column should exist in the data source.
|
|
10633
|
+
* undefined,
|
|
10634
|
+
* [{ columnName: 'col name 1', ascending: true }],
|
|
10635
|
+
* );
|
|
10497
10636
|
* const data = await underlying.fetchData(0, 100);
|
|
10498
10637
|
* })
|
|
10499
10638
|
* ```
|
|
10500
10639
|
* @version SDK: 1.25.0 | ThoughtSpot: 9.10.0.cl
|
|
10501
10640
|
*/
|
|
10502
|
-
async getUnderlyingDataForPoint(outputColumnNames, selectedPoints) {
|
|
10641
|
+
async getUnderlyingDataForPoint(outputColumnNames, selectedPoints, sortOptions) {
|
|
10503
10642
|
if (!selectedPoints && !this.selectedPoints) {
|
|
10504
10643
|
throw new Error('Needs to be triggered in context of a point');
|
|
10505
10644
|
}
|
|
@@ -10527,6 +10666,9 @@ class AnswerService {
|
|
|
10527
10666
|
if (columnsToRemove.length) {
|
|
10528
10667
|
await unaggAnswerSession.removeColumns(columnsToRemove);
|
|
10529
10668
|
}
|
|
10669
|
+
if (sortOptions === null || sortOptions === void 0 ? void 0 : sortOptions.length) {
|
|
10670
|
+
await unaggAnswerSession.adaptSorting(sortOptions, sourceDetail);
|
|
10671
|
+
}
|
|
10530
10672
|
return unaggAnswerSession;
|
|
10531
10673
|
}
|
|
10532
10674
|
/**
|
|
@@ -10565,7 +10707,7 @@ class AnswerService {
|
|
|
10565
10707
|
async getTML() {
|
|
10566
10708
|
const { object } = await this.executeQuery(getAnswerTML, {});
|
|
10567
10709
|
const edoc = object[0].edoc;
|
|
10568
|
-
const YAML = await import('./index-
|
|
10710
|
+
const YAML = await import('./index-CyDR8j_0.js');
|
|
10569
10711
|
const parsedDoc = YAML.parse(edoc);
|
|
10570
10712
|
return {
|
|
10571
10713
|
answer: {
|
|
@@ -10586,6 +10728,15 @@ class AnswerService {
|
|
|
10586
10728
|
this.tmlOverride = override;
|
|
10587
10729
|
}
|
|
10588
10730
|
}
|
|
10731
|
+
/**
|
|
10732
|
+
* Build a map from a source column guid to the answer's viz column id, using
|
|
10733
|
+
* the `referencedColumns` link on each viz column.
|
|
10734
|
+
* @param answer
|
|
10735
|
+
*/
|
|
10736
|
+
function getGuidToColumnIdMap(answer) {
|
|
10737
|
+
const tableViz = answer.visualizations.find((viz) => viz.columns);
|
|
10738
|
+
return new Map(tableViz.columns.map((col) => [col.column.referencedColumns[0].guid, col.column.id]));
|
|
10739
|
+
}
|
|
10589
10740
|
/**
|
|
10590
10741
|
*
|
|
10591
10742
|
* @param sourceDetail
|
|
@@ -19666,6 +19817,7 @@ let mixpanelInstance;
|
|
|
19666
19817
|
const MIXPANEL_EVENT = {
|
|
19667
19818
|
VISUAL_SDK_RENDER_START: 'visual-sdk-render-start',
|
|
19668
19819
|
VISUAL_SDK_CALLED_INIT: 'visual-sdk-called-init',
|
|
19820
|
+
VISUAL_SDK_INIT_ACTIONS: 'visual-sdk-init-actions',
|
|
19669
19821
|
VISUAL_SDK_RENDER_COMPLETE: 'visual-sdk-render-complete',
|
|
19670
19822
|
VISUAL_SDK_RENDER_FAILED: 'visual-sdk-render-failed',
|
|
19671
19823
|
VISUAL_SDK_TRIGGER: 'visual-sdk-trigger',
|
|
@@ -21867,9 +22019,6 @@ const TS_EMBED_ID = '_thoughtspot-embed';
|
|
|
21867
22019
|
*/
|
|
21868
22020
|
const PRERENDER_CONTAINER_ORIGINAL_POSITION_KEY = 'tsEmbedOriginalPosition';
|
|
21869
22021
|
const PRERENDER_WRAPPER_ID_PREFIX = 'tsEmbed-pre-render-wrapper-';
|
|
21870
|
-
const PRERENDER_PARKED_TRANSFORM = 'translateY(-100%)';
|
|
21871
|
-
/** The height createPreRenderWrapper() seeds before anything is measured. */
|
|
21872
|
-
const UNMEASURED_WRAPPER_HEIGHT = '100vh';
|
|
21873
22022
|
// The container applies UpdateEmbedParams through React state, so a delivered
|
|
21874
22023
|
// post is not the same as the params being in effect.
|
|
21875
22024
|
const UPDATE_EMBED_PARAMS_SETTLE_MS = 200;
|
|
@@ -21877,6 +22026,97 @@ const UPDATE_EMBED_PARAMS_SETTLE_MS = 200;
|
|
|
21877
22026
|
// truthy, so null or '' leaves the previous embed's values in place. '&' is
|
|
21878
22027
|
// truthy and parses to {}.
|
|
21879
22028
|
const NO_RUNTIME_PARAMS = '&';
|
|
22029
|
+
/**
|
|
22030
|
+
* Params kept on the iframe `src` when `excludeConfigFromURL` is set. The rest
|
|
22031
|
+
* are sent in the APP_INIT payload.
|
|
22032
|
+
* @internal
|
|
22033
|
+
*/
|
|
22034
|
+
const BOOTSTRAP_URL_PARAMS = new Set([
|
|
22035
|
+
// Marks the app as embedded.
|
|
22036
|
+
Param.EmbedApp,
|
|
22037
|
+
// The host page URL, used to validate the postMessage origin.
|
|
22038
|
+
Param.HostAppUrl,
|
|
22039
|
+
// The SDK version.
|
|
22040
|
+
Param.Version,
|
|
22041
|
+
// The authentication type set in init.
|
|
22042
|
+
Param.AuthType,
|
|
22043
|
+
// Whether the app signs the user in automatically.
|
|
22044
|
+
Param.AutoLogin,
|
|
22045
|
+
// Stops the app from redirecting to its login page.
|
|
22046
|
+
Param.DisableLoginRedirect,
|
|
22047
|
+
// Forces the SAML redirect for EmbeddedSSO.
|
|
22048
|
+
Param.ForceSAMLAutoRedirect,
|
|
22049
|
+
// Set for cookieless trusted authentication.
|
|
22050
|
+
Param.cookieless,
|
|
22051
|
+
// Lets the app use the pre-fetched auth info.
|
|
22052
|
+
Param.preAuthCache,
|
|
22053
|
+
// Blocks access to the full app outside the embed.
|
|
22054
|
+
Param.blockNonEmbedFullAppAccess,
|
|
22055
|
+
// The org to load, which the auth info depends on.
|
|
22056
|
+
Param.OverrideOrgId,
|
|
22057
|
+
// The host window height when the iframe loads.
|
|
22058
|
+
Param.ViewPortHeight,
|
|
22059
|
+
// The host window width when the iframe loads.
|
|
22060
|
+
Param.ViewPortWidth,
|
|
22061
|
+
// The app's client log level.
|
|
22062
|
+
Param.ClientLogLevel,
|
|
22063
|
+
// Lets the app override the native console.
|
|
22064
|
+
Param.OverrideNativeConsole,
|
|
22065
|
+
// An extra Pendo tracking key.
|
|
22066
|
+
Param.PendoTrackingKey,
|
|
22067
|
+
// The locale for number formatting.
|
|
22068
|
+
Param.NumberFormatLocale,
|
|
22069
|
+
// The locale for date formatting.
|
|
22070
|
+
Param.DateFormatLocale,
|
|
22071
|
+
// The currency format.
|
|
22072
|
+
Param.CurrencyFormat,
|
|
22073
|
+
// The UI language.
|
|
22074
|
+
Param.Locale,
|
|
22075
|
+
// Turns on dark mode.
|
|
22076
|
+
Param.IsDarkMode,
|
|
22077
|
+
// Turns on the radiant theme that dark mode needs.
|
|
22078
|
+
Param.RadiantThemeEnabled,
|
|
22079
|
+
// Marks a SearchEmbed or SearchBarEmbed.
|
|
22080
|
+
Param.searchEmbed,
|
|
22081
|
+
// Marks a LiveboardEmbed.
|
|
22082
|
+
Param.livedBoardEmbed,
|
|
22083
|
+
// Marks a SpotterAgentEmbed.
|
|
22084
|
+
Param.isSpotterAgentEmbed,
|
|
22085
|
+
// Marks a SpotterEmbed.
|
|
22086
|
+
Param.SpotterEnabled,
|
|
22087
|
+
// Marks an AppEmbed.
|
|
22088
|
+
Param.IsFullAppEmbed,
|
|
22089
|
+
// Legacy flag for the onBeforeGetVizData API intercept.
|
|
22090
|
+
Param.IsOnBeforeGetVizDataInterceptEnabled,
|
|
22091
|
+
// Lets the host override links in the app.
|
|
22092
|
+
Param.LinkOverride,
|
|
22093
|
+
// Turns on version 2 of the link overrides.
|
|
22094
|
+
Param.EnableLinkOverridesV2,
|
|
22095
|
+
// Stops links from opening in a new tab.
|
|
22096
|
+
Param.DisableRedirectionLinksInNewTab,
|
|
22097
|
+
// Uses replaceState instead of pushState for app navigation.
|
|
22098
|
+
Param.OverrideHistoryState,
|
|
22099
|
+
// Shows search results as a table.
|
|
22100
|
+
Param.ForceTable,
|
|
22101
|
+
// The URL of the custom string IDs file.
|
|
22102
|
+
Param.StringIDsUrl,
|
|
22103
|
+
// The data sources that search opens with.
|
|
22104
|
+
Param.DataSources,
|
|
22105
|
+
// Exposes translation IDs in the app.
|
|
22106
|
+
Param.ExposeTranslationIDs,
|
|
22107
|
+
// The URL of the custom icon sprite.
|
|
22108
|
+
Param.IconSpriteUrl,
|
|
22109
|
+
// The tag that filters the metadata lists in an AppEmbed.
|
|
22110
|
+
Param.Tag,
|
|
22111
|
+
// Set when a Liveboard embed shows a single visualization (vizId).
|
|
22112
|
+
Param.vizEmbed,
|
|
22113
|
+
// Whether search opens with the last-selected data sources.
|
|
22114
|
+
Param.UseLastSelectedDataSource,
|
|
22115
|
+
// The query mode Spotter opens in.
|
|
22116
|
+
Param.DefaultQueryMode,
|
|
22117
|
+
// The initial search query. Omitted with excludeSearchTokenStringFromURL.
|
|
22118
|
+
Param.searchTokenString,
|
|
22119
|
+
]);
|
|
21880
22120
|
/**
|
|
21881
22121
|
* The event id map from v2 event names to v1 event id
|
|
21882
22122
|
* v1 events are the classic embed events implemented in Blink v1
|
|
@@ -21905,6 +22145,7 @@ class TsEmbed {
|
|
|
21905
22145
|
this.embedNodeKey = '__tsEmbed';
|
|
21906
22146
|
this.embedContainerLoadedKey = '__tsEmbedContainerLoaded';
|
|
21907
22147
|
this.isAppInitialized = false;
|
|
22148
|
+
this.initDataParams = {};
|
|
21908
22149
|
/**
|
|
21909
22150
|
* Should we encode URL Query Params using base64 encoding which ThoughtSpot
|
|
21910
22151
|
* will generate for embedding. This provides additional security to
|
|
@@ -21914,6 +22155,7 @@ class TsEmbed {
|
|
|
21914
22155
|
this.shouldEncodeUrlQueryParams = false;
|
|
21915
22156
|
this.defaultHiddenActions = [Action.ReportError];
|
|
21916
22157
|
this.preRenderContainerEl = document.body;
|
|
22158
|
+
this.containerScrollListener = null;
|
|
21917
22159
|
/**
|
|
21918
22160
|
* Handler for fullscreen change events
|
|
21919
22161
|
*/
|
|
@@ -21939,7 +22181,7 @@ class TsEmbed {
|
|
|
21939
22181
|
*/
|
|
21940
22182
|
this.appInitCb = async (_, responder) => {
|
|
21941
22183
|
try {
|
|
21942
|
-
const appInitData = await this.getAppInitData();
|
|
22184
|
+
const appInitData = this.withInitDataParams(await this.getAppInitData());
|
|
21943
22185
|
this.isAppInitialized = true;
|
|
21944
22186
|
responder({
|
|
21945
22187
|
type: EmbedEvent.APP_INIT,
|
|
@@ -22367,6 +22609,18 @@ class TsEmbed {
|
|
|
22367
22609
|
async getAppInitData() {
|
|
22368
22610
|
return this.getDefaultAppInitData();
|
|
22369
22611
|
}
|
|
22612
|
+
withInitDataParams(appInitData) {
|
|
22613
|
+
if (isEmpty_1(this.initDataParams)) {
|
|
22614
|
+
return appInitData;
|
|
22615
|
+
}
|
|
22616
|
+
return {
|
|
22617
|
+
...appInitData,
|
|
22618
|
+
embedParams: {
|
|
22619
|
+
...this.initDataParams,
|
|
22620
|
+
...(appInitData.embedParams || {}),
|
|
22621
|
+
},
|
|
22622
|
+
};
|
|
22623
|
+
}
|
|
22370
22624
|
/**
|
|
22371
22625
|
* Helper method to refresh/update auth token for TrustedAuthTokenCookieless auth type
|
|
22372
22626
|
* @param responder - Function to send response back
|
|
@@ -22426,7 +22680,7 @@ class TsEmbed {
|
|
|
22426
22680
|
* @returns queryParams
|
|
22427
22681
|
*/
|
|
22428
22682
|
getBaseQueryParams(queryParams = {}) {
|
|
22429
|
-
var _a, _b, _c, _d;
|
|
22683
|
+
var _a, _b, _c, _d, _e;
|
|
22430
22684
|
let hostAppUrl = ((_a = window === null || window === void 0 ? void 0 : window.location) === null || _a === void 0 ? void 0 : _a.host) || '';
|
|
22431
22685
|
// The below check is needed because TS Cloud firewall, blocks
|
|
22432
22686
|
// localhost/127.0.0.1 in any url param.
|
|
@@ -22463,6 +22717,15 @@ class TsEmbed {
|
|
|
22463
22717
|
if (this.embedConfig.currencyFormat) {
|
|
22464
22718
|
queryParams[Param.CurrencyFormat] = this.embedConfig.currencyFormat;
|
|
22465
22719
|
}
|
|
22720
|
+
// The view config wins over init, so an embed can opt out of a dark
|
|
22721
|
+
// mode set in `init`. `??` and not `||`, so that an explicit `false`
|
|
22722
|
+
// overrides an init-level `true`.
|
|
22723
|
+
const isDarkMode = (_c = this.viewConfig.isDarkMode) !== null && _c !== void 0 ? _c : this.embedConfig.isDarkMode;
|
|
22724
|
+
setParamIfDefined(queryParams, Param.IsDarkMode, isDarkMode, true);
|
|
22725
|
+
// The app's dark mode lives in its radiant theme, so turn that on too.
|
|
22726
|
+
if (isDarkMode) {
|
|
22727
|
+
queryParams[Param.RadiantThemeEnabled] = true;
|
|
22728
|
+
}
|
|
22466
22729
|
const { disabledActions, disabledActionReason, hiddenActions, visibleActions, hiddenTabs, visibleTabs, showAlerts, additionalFlags: additionalFlagsFromView, locale, customizations, contextMenuTrigger, linkOverride, enableLinkOverridesV2, insertInToSlide, disableRedirectionLinksInNewTab, overrideOrgId, overrideHistoryState, exposeTranslationIDs, primaryAction, } = this.viewConfig;
|
|
22467
22730
|
const { additionalFlags: additionalFlagsFromInit } = this.embedConfig;
|
|
22468
22731
|
const additionalFlags = {
|
|
@@ -22528,7 +22791,7 @@ class TsEmbed {
|
|
|
22528
22791
|
if (spriteUrl) {
|
|
22529
22792
|
queryParams[Param.IconSpriteUrl] = spriteUrl.replace('https://', '');
|
|
22530
22793
|
}
|
|
22531
|
-
const stringIDsUrl = ((
|
|
22794
|
+
const stringIDsUrl = ((_d = customizations === null || customizations === void 0 ? void 0 : customizations.content) === null || _d === void 0 ? void 0 : _d.stringIDsUrl) || ((_e = embedCustomizations === null || embedCustomizations === void 0 ? void 0 : embedCustomizations.content) === null || _e === void 0 ? void 0 : _e.stringIDsUrl);
|
|
22532
22795
|
if (stringIDsUrl) {
|
|
22533
22796
|
queryParams[Param.StringIDsUrl] = stringIDsUrl;
|
|
22534
22797
|
}
|
|
@@ -22582,13 +22845,32 @@ class TsEmbed {
|
|
|
22582
22845
|
return path;
|
|
22583
22846
|
}
|
|
22584
22847
|
getEmbedParams() {
|
|
22585
|
-
const queryParams = this.
|
|
22848
|
+
const queryParams = this.getUrlQueryParamsObject();
|
|
22586
22849
|
return getQueryParamString(queryParams);
|
|
22587
22850
|
}
|
|
22588
22851
|
getEmbedParamsObject() {
|
|
22589
22852
|
const params = this.getBaseQueryParams();
|
|
22590
22853
|
return params;
|
|
22591
22854
|
}
|
|
22855
|
+
getUrlQueryParamsObject() {
|
|
22856
|
+
const queryParams = this.getEmbedParamsObject();
|
|
22857
|
+
if (!this.isConfigExcludedFromUrl()) {
|
|
22858
|
+
this.initDataParams = {};
|
|
22859
|
+
return queryParams;
|
|
22860
|
+
}
|
|
22861
|
+
const urlParams = {};
|
|
22862
|
+
const excludedParams = {};
|
|
22863
|
+
Object.entries(queryParams).forEach(([key, value]) => {
|
|
22864
|
+
if (BOOTSTRAP_URL_PARAMS.has(key)) {
|
|
22865
|
+
urlParams[key] = value;
|
|
22866
|
+
}
|
|
22867
|
+
else {
|
|
22868
|
+
excludedParams[key] = deserializeParam(value);
|
|
22869
|
+
}
|
|
22870
|
+
});
|
|
22871
|
+
this.initDataParams = excludedParams;
|
|
22872
|
+
return urlParams;
|
|
22873
|
+
}
|
|
22592
22874
|
getRootIframeSrc() {
|
|
22593
22875
|
const query = this.getEmbedParams();
|
|
22594
22876
|
return this.getEmbedBasePath(query);
|
|
@@ -22759,7 +23041,7 @@ class TsEmbed {
|
|
|
22759
23041
|
top: '0',
|
|
22760
23042
|
left: '0',
|
|
22761
23043
|
width: '100vw',
|
|
22762
|
-
height:
|
|
23044
|
+
height: '100vh',
|
|
22763
23045
|
};
|
|
22764
23046
|
setStyleProperties(preRenderWrapper, initialPreRenderWrapperStyle);
|
|
22765
23047
|
return preRenderWrapper;
|
|
@@ -22827,26 +23109,10 @@ class TsEmbed {
|
|
|
22827
23109
|
return placeholder;
|
|
22828
23110
|
}
|
|
22829
23111
|
/**
|
|
22830
|
-
* Resolves the configured preRenderContainer to a live element
|
|
22831
|
-
* selector is re-queried on every call so
|
|
22832
|
-
* replacing the node) resolves to the
|
|
22833
|
-
* directly cannot be re-resolved.
|
|
22834
|
-
*
|
|
22835
|
-
* With nothing configured the frame goes into the host element's nearest
|
|
22836
|
-
* scrolling ancestor, falling back to `document.body`.
|
|
22837
|
-
*
|
|
22838
|
-
* The wrapper is absolutely positioned, so it follows the page for free —
|
|
22839
|
-
* but only while it sits inside whatever scrolls. `document.body` is right
|
|
22840
|
-
* only when the document itself is the scroller; an app that scrolls an
|
|
22841
|
-
* inner element instead left the frame pinned to the viewport while the page
|
|
22842
|
-
* moved under it (SCAL-338563). Being inside the scroller also lets wheel
|
|
22843
|
-
* events chain out of the frame into it, which they cannot do from
|
|
22844
|
-
* `document.body`.
|
|
22845
|
-
*
|
|
22846
|
-
* A scrolling ancestor is layout chrome rather than route content, so it
|
|
22847
|
-
* outlives the embed in practice; and if it does go, the host element goes
|
|
22848
|
-
* with it and this instance is remounting anyway.
|
|
22849
|
-
* `reconcilePreRenderContainer` re-runs this on a detached container.
|
|
23112
|
+
* Resolves the configured preRenderContainer to a live element, falling
|
|
23113
|
+
* back to `document.body`. A string selector is re-queried on every call so
|
|
23114
|
+
* a remounted container (E.g.: React replacing the node) resolves to the
|
|
23115
|
+
* fresh element; an element passed directly cannot be re-resolved.
|
|
22850
23116
|
*/
|
|
22851
23117
|
resolvePreRenderContainerTarget() {
|
|
22852
23118
|
var _a;
|
|
@@ -22866,13 +23132,7 @@ class TsEmbed {
|
|
|
22866
23132
|
else if (containerConfig) {
|
|
22867
23133
|
container = containerConfig;
|
|
22868
23134
|
}
|
|
22869
|
-
|
|
22870
|
-
return container;
|
|
22871
|
-
}
|
|
22872
|
-
if (!this.hostElement) {
|
|
22873
|
-
return document.body;
|
|
22874
|
-
}
|
|
22875
|
-
return (_a = getScrollableAncestors(this.hostElement)[0]) !== null && _a !== void 0 ? _a : document.body;
|
|
23135
|
+
return (_a = container) !== null && _a !== void 0 ? _a : document.body;
|
|
22876
23136
|
}
|
|
22877
23137
|
inheritPreRenderContainer() {
|
|
22878
23138
|
var _a;
|
|
@@ -22917,9 +23177,8 @@ class TsEmbed {
|
|
|
22917
23177
|
* Re-attaches the wrapper to a live container when the previously resolved
|
|
22918
23178
|
* one has been detached or no longer holds the wrapper — e.g. the host app
|
|
22919
23179
|
* remounted a custom preRenderContainer, which would otherwise leave a stale
|
|
22920
|
-
* reference and collapse the wrapper.
|
|
22921
|
-
*
|
|
22922
|
-
* is left untouched, as there is nothing to re-query.
|
|
23180
|
+
* reference and collapse the wrapper. Only string selectors can be
|
|
23181
|
+
* re-resolved; a container passed as an element is left untouched.
|
|
22923
23182
|
*/
|
|
22924
23183
|
reconcilePreRenderContainer() {
|
|
22925
23184
|
const wrapper = this.preRenderWrapper;
|
|
@@ -22938,6 +23197,14 @@ class TsEmbed {
|
|
|
22938
23197
|
if (resolved === stored && stored.contains(wrapper)) {
|
|
22939
23198
|
return;
|
|
22940
23199
|
}
|
|
23200
|
+
if (this.containerScrollListener && stored !== resolved) {
|
|
23201
|
+
if (stored !== document.body) {
|
|
23202
|
+
stored.removeEventListener('scroll', this.containerScrollListener);
|
|
23203
|
+
}
|
|
23204
|
+
if (resolved !== document.body) {
|
|
23205
|
+
resolved.addEventListener('scroll', this.containerScrollListener);
|
|
23206
|
+
}
|
|
23207
|
+
}
|
|
22941
23208
|
this.preRenderContainerEl = resolved;
|
|
22942
23209
|
this.applyPreRenderContainerPositioning();
|
|
22943
23210
|
if (wrapper.parentNode !== resolved) {
|
|
@@ -22999,12 +23266,11 @@ class TsEmbed {
|
|
|
22999
23266
|
*/
|
|
23000
23267
|
setIFrameHeight(height) {
|
|
23001
23268
|
if (this.isPreRendered) {
|
|
23002
|
-
const next = getCssDimension(height);
|
|
23003
23269
|
if (this.insertedDomEl) {
|
|
23004
|
-
this.insertedDomEl.style.height =
|
|
23270
|
+
this.insertedDomEl.style.height = getCssDimension(height);
|
|
23005
23271
|
}
|
|
23006
23272
|
else if (this.preRenderWrapper) {
|
|
23007
|
-
this.preRenderWrapper.style.height =
|
|
23273
|
+
this.preRenderWrapper.style.height = getCssDimension(height);
|
|
23008
23274
|
}
|
|
23009
23275
|
}
|
|
23010
23276
|
else {
|
|
@@ -23288,9 +23554,16 @@ class TsEmbed {
|
|
|
23288
23554
|
* @param args
|
|
23289
23555
|
*/
|
|
23290
23556
|
async render() {
|
|
23557
|
+
var _a, _b, _c;
|
|
23291
23558
|
uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_RENDER_CALLED, {
|
|
23292
23559
|
embedComponentType: this.viewConfig.embedComponentType,
|
|
23293
23560
|
});
|
|
23561
|
+
uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_INIT_ACTIONS, {
|
|
23562
|
+
embedComponentType: this.viewConfig.embedComponentType,
|
|
23563
|
+
hiddenActions: (_a = this.viewConfig.hiddenActions) !== null && _a !== void 0 ? _a : [],
|
|
23564
|
+
visibleActions: (_b = this.viewConfig.visibleActions) !== null && _b !== void 0 ? _b : [],
|
|
23565
|
+
disabledActions: (_c = this.viewConfig.disabledActions) !== null && _c !== void 0 ? _c : [],
|
|
23566
|
+
});
|
|
23294
23567
|
if (!getIsInitCalled()) {
|
|
23295
23568
|
logger$3.error(ERROR_MESSAGE.RENDER_CALLED_BEFORE_INIT);
|
|
23296
23569
|
}
|
|
@@ -23439,47 +23712,34 @@ class TsEmbed {
|
|
|
23439
23712
|
delete container.dataset[PRERENDER_CONTAINER_ORIGINAL_POSITION_KEY];
|
|
23440
23713
|
}
|
|
23441
23714
|
/**
|
|
23442
|
-
*
|
|
23443
|
-
|
|
23444
|
-
|
|
23445
|
-
|
|
23446
|
-
* browser's job and costs nothing; repositioning it on scroll would mean a
|
|
23447
|
-
* layout read and a style write per frame to compensate for placing it in
|
|
23448
|
-
* the wrong box. Size is the one thing the browser will not do for us: the
|
|
23449
|
-
* placeholder grows when the embedded app reports a new height, and the
|
|
23450
|
-
* wrapper has to be told.
|
|
23451
|
-
*/
|
|
23452
|
-
observePreRenderSize() {
|
|
23453
|
-
var _a;
|
|
23454
|
-
if (this.getPreRenderConfig().doNotTrackSize || typeof ResizeObserver === 'undefined') {
|
|
23455
|
-
return;
|
|
23456
|
-
}
|
|
23457
|
-
const placeholder = this.getPreRenderPlaceHolderElement();
|
|
23458
|
-
if (!placeholder) {
|
|
23715
|
+
* Detaches and clears the container scroll listener, if one is attached.
|
|
23716
|
+
*/
|
|
23717
|
+
removeContainerScrollListener() {
|
|
23718
|
+
if (!this.containerScrollListener) {
|
|
23459
23719
|
return;
|
|
23460
23720
|
}
|
|
23461
|
-
|
|
23462
|
-
|
|
23463
|
-
this.
|
|
23721
|
+
const customContainer = this.getCustomPreRenderContainer();
|
|
23722
|
+
customContainer === null || customContainer === void 0 ? void 0 : customContainer.removeEventListener('scroll', this.containerScrollListener);
|
|
23723
|
+
this.containerScrollListener = null;
|
|
23464
23724
|
}
|
|
23465
23725
|
/**
|
|
23466
23726
|
* Destroys the ThoughtSpot embed, and remove any nodes from the DOM.
|
|
23467
23727
|
* @version SDK: 1.19.1 | ThoughtSpot: *
|
|
23468
23728
|
*/
|
|
23469
23729
|
destroy() {
|
|
23470
|
-
var _a, _b, _c
|
|
23730
|
+
var _a, _b, _c;
|
|
23471
23731
|
try {
|
|
23472
23732
|
this.removeFullscreenChangeHandler();
|
|
23473
|
-
|
|
23733
|
+
this.removeContainerScrollListener();
|
|
23474
23734
|
this.unsubscribeToEvents();
|
|
23475
|
-
(
|
|
23735
|
+
(_a = this.preRenderWrapper) === null || _a === void 0 ? void 0 : _a.remove();
|
|
23476
23736
|
this.restorePreRenderContainerPosition();
|
|
23477
23737
|
if (!this.isRendered) {
|
|
23478
23738
|
return;
|
|
23479
23739
|
}
|
|
23480
23740
|
if (!getEmbedConfig().waitForCleanupOnDestroy) {
|
|
23481
23741
|
this.trigger(HostEvent.DestroyEmbed);
|
|
23482
|
-
(
|
|
23742
|
+
(_c = (_b = this.insertedDomEl) === null || _b === void 0 ? void 0 : _b.parentNode) === null || _c === void 0 ? void 0 : _c.removeChild(this.insertedDomEl);
|
|
23483
23743
|
}
|
|
23484
23744
|
else {
|
|
23485
23745
|
const cleanupTimeout = getEmbedConfig().cleanupTimeout;
|
|
@@ -23525,6 +23785,26 @@ class TsEmbed {
|
|
|
23525
23785
|
this.isRendered = true;
|
|
23526
23786
|
return this.renderIFrame(prerenderFrameSrc);
|
|
23527
23787
|
}
|
|
23788
|
+
isConfigExcludedFromUrl() {
|
|
23789
|
+
var _a, _b, _c;
|
|
23790
|
+
const flag = (_b = (_a = this.viewConfig.additionalFlags) === null || _a === void 0 ? void 0 : _a.excludeConfigFromURL) !== null && _b !== void 0 ? _b : (_c = this.embedConfig.additionalFlags) === null || _c === void 0 ? void 0 : _c.excludeConfigFromURL;
|
|
23791
|
+
return flag === true || flag === 'true';
|
|
23792
|
+
}
|
|
23793
|
+
async triggerUpdateEmbedParams() {
|
|
23794
|
+
try {
|
|
23795
|
+
const params = await this.getUpdateEmbedParamsObject();
|
|
23796
|
+
this.trigger(HostEvent.UpdateEmbedParams, params);
|
|
23797
|
+
}
|
|
23798
|
+
catch (error) {
|
|
23799
|
+
logger$3.error(ERROR_MESSAGE.UPDATE_PARAMS_FAILED, error);
|
|
23800
|
+
this.handleError({
|
|
23801
|
+
errorType: ErrorDetailsTypes.API,
|
|
23802
|
+
message: (error === null || error === void 0 ? void 0 : error.message) || ERROR_MESSAGE.UPDATE_PARAMS_FAILED,
|
|
23803
|
+
code: EmbedErrorCodes.UPDATE_PARAMS_FAILED,
|
|
23804
|
+
error: (error === null || error === void 0 ? void 0 : error.message) || error,
|
|
23805
|
+
});
|
|
23806
|
+
}
|
|
23807
|
+
}
|
|
23528
23808
|
beforePrerenderVisible() {
|
|
23529
23809
|
// We can ignore this as its a bit expensive and the newer customers
|
|
23530
23810
|
// have moved on to UpdateEmbedParams supported clusters
|
|
@@ -23535,17 +23815,7 @@ class TsEmbed {
|
|
|
23535
23815
|
this.preRenderParamsApplied = new Promise((resolve) => {
|
|
23536
23816
|
this.executeAfterEmbedContainerLoaded(async () => {
|
|
23537
23817
|
try {
|
|
23538
|
-
|
|
23539
|
-
this.trigger(HostEvent.UpdateEmbedParams, params);
|
|
23540
|
-
}
|
|
23541
|
-
catch (error) {
|
|
23542
|
-
logger$3.error(ERROR_MESSAGE.UPDATE_PARAMS_FAILED, error);
|
|
23543
|
-
this.handleError({
|
|
23544
|
-
errorType: ErrorDetailsTypes.API,
|
|
23545
|
-
message: (error === null || error === void 0 ? void 0 : error.message) || ERROR_MESSAGE.UPDATE_PARAMS_FAILED,
|
|
23546
|
-
code: EmbedErrorCodes.UPDATE_PARAMS_FAILED,
|
|
23547
|
-
error: (error === null || error === void 0 ? void 0 : error.message) || error,
|
|
23548
|
-
});
|
|
23818
|
+
await this.triggerUpdateEmbedParams();
|
|
23549
23819
|
}
|
|
23550
23820
|
finally {
|
|
23551
23821
|
setTimeout(resolve, UPDATE_EMBED_PARAMS_SETTLE_MS);
|
|
@@ -23560,7 +23830,7 @@ class TsEmbed {
|
|
|
23560
23830
|
* wrapper to overlay it.
|
|
23561
23831
|
*/
|
|
23562
23832
|
async showPreRender() {
|
|
23563
|
-
var _a;
|
|
23833
|
+
var _a, _b;
|
|
23564
23834
|
uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_SHOW_PRE_RENDER, {
|
|
23565
23835
|
preRenderId: this.getPreRenderConfig().id,
|
|
23566
23836
|
embedComponentType: this.viewConfig.embedComponentType,
|
|
@@ -23579,16 +23849,14 @@ class TsEmbed {
|
|
|
23579
23849
|
this.beforePrerenderVisible();
|
|
23580
23850
|
if (this.hostElement) {
|
|
23581
23851
|
this.insertedDomEl = this.createPreRenderPlaceholder();
|
|
23582
|
-
|
|
23583
|
-
|
|
23584
|
-
|
|
23585
|
-
|
|
23586
|
-
|
|
23587
|
-
|
|
23588
|
-
|
|
23589
|
-
|
|
23590
|
-
&& wrapperHeight !== UNMEASURED_WRAPPER_HEIGHT) {
|
|
23591
|
-
this.insertedDomEl.style.height = wrapperHeight;
|
|
23852
|
+
if (this.viewConfig.fullHeight) {
|
|
23853
|
+
// If fullHeight has already sized the wrapper, seed the
|
|
23854
|
+
// placeholder with the same height so syncPreRenderStyle gets
|
|
23855
|
+
// an accurate rect.
|
|
23856
|
+
const existingHeight = this.preRenderWrapper.style.height;
|
|
23857
|
+
if (existingHeight) {
|
|
23858
|
+
this.insertedDomEl.style.height = existingHeight;
|
|
23859
|
+
}
|
|
23592
23860
|
}
|
|
23593
23861
|
const placeHolderId = this.getPreRenderIds().placeHolder;
|
|
23594
23862
|
// Remove any stale placeholder from a previous cycle. It is located
|
|
@@ -23602,19 +23870,29 @@ class TsEmbed {
|
|
|
23602
23870
|
(_a = this.hostElement.querySelector(`#${placeHolderId}`)) === null || _a === void 0 ? void 0 : _a.remove();
|
|
23603
23871
|
this.hostElement.appendChild(this.insertedDomEl);
|
|
23604
23872
|
this.syncPreRenderStyle();
|
|
23605
|
-
this.
|
|
23873
|
+
const customContainer = this.getCustomPreRenderContainer();
|
|
23874
|
+
if (customContainer && !this.containerScrollListener) {
|
|
23875
|
+
this.containerScrollListener = () => this.syncPreRenderStyle();
|
|
23876
|
+
customContainer.addEventListener('scroll', this.containerScrollListener);
|
|
23877
|
+
}
|
|
23878
|
+
if (!this.getPreRenderConfig().doNotTrackSize) {
|
|
23879
|
+
const observeTarget = (_b = this.insertedDomEl) !== null && _b !== void 0 ? _b : this.hostElement;
|
|
23880
|
+
this.resizeObserver = new ResizeObserver((entries) => {
|
|
23881
|
+
entries.forEach((entry) => {
|
|
23882
|
+
if (entry.target === observeTarget) {
|
|
23883
|
+
this.syncPreRenderStyle();
|
|
23884
|
+
}
|
|
23885
|
+
});
|
|
23886
|
+
});
|
|
23887
|
+
this.resizeObserver.observe(observeTarget);
|
|
23888
|
+
}
|
|
23606
23889
|
}
|
|
23607
23890
|
removeStyleProperties(this.preRenderWrapper, [
|
|
23608
23891
|
'z-index',
|
|
23609
23892
|
'opacity',
|
|
23893
|
+
'pointer-events',
|
|
23610
23894
|
'overflow',
|
|
23611
|
-
'transform',
|
|
23612
23895
|
]);
|
|
23613
|
-
// Set rather than removed: a container that carries `pointer-events:
|
|
23614
|
-
// none` — the usual styling for a parking root that must not swallow
|
|
23615
|
-
// clicks — passes it down, and dropping the property here would leave
|
|
23616
|
-
// the inherited `none` in force and the frame dead to input.
|
|
23617
|
-
setStyleProperties(this.preRenderWrapper, { pointerEvents: 'auto' });
|
|
23618
23896
|
this.subscribeToEvents();
|
|
23619
23897
|
// Setup fullscreen change handler for prerendered components
|
|
23620
23898
|
if (this.iFrame) {
|
|
@@ -23667,7 +23945,6 @@ class TsEmbed {
|
|
|
23667
23945
|
* If the component is not preRendered, it issues a warning.
|
|
23668
23946
|
*/
|
|
23669
23947
|
hidePreRender() {
|
|
23670
|
-
var _a;
|
|
23671
23948
|
uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_HIDE_PRE_RENDER, {
|
|
23672
23949
|
preRenderId: this.getPreRenderConfig().id,
|
|
23673
23950
|
embedComponentType: this.viewConfig.embedComponentType,
|
|
@@ -23687,15 +23964,12 @@ class TsEmbed {
|
|
|
23687
23964
|
top: '0',
|
|
23688
23965
|
left: '0',
|
|
23689
23966
|
overflow: 'hidden',
|
|
23690
|
-
// Keeps the measured size — so the next show needs no resize, which
|
|
23691
|
-
// is the point of pre-rendering — while lifting the box out of
|
|
23692
|
-
// the container's scrollable area. Overflow only extends
|
|
23693
|
-
// downwards, so a hidden frame parked above the top edge adds
|
|
23694
|
-
// none, where one left at full height shows as blank scroll space.
|
|
23695
|
-
transform: PRERENDER_PARKED_TRANSFORM,
|
|
23696
23967
|
};
|
|
23697
23968
|
setStyleProperties(this.preRenderWrapper, preRenderHideStyles);
|
|
23698
|
-
|
|
23969
|
+
this.removeContainerScrollListener();
|
|
23970
|
+
if (this.resizeObserver) {
|
|
23971
|
+
this.resizeObserver.disconnect();
|
|
23972
|
+
}
|
|
23699
23973
|
const placeHolderEle = this.getPreRenderPlaceHolderElement();
|
|
23700
23974
|
if (placeHolderEle) {
|
|
23701
23975
|
placeHolderEle.parentElement.removeChild(placeHolderEle);
|
|
@@ -23880,7 +24154,7 @@ let SearchBarEmbed$1 = class SearchBarEmbed extends TsEmbed {
|
|
|
23880
24154
|
* @param dataSources A list of data source GUIDs
|
|
23881
24155
|
*/
|
|
23882
24156
|
getIFrameSrc() {
|
|
23883
|
-
const queryParams = this.
|
|
24157
|
+
const queryParams = this.getUrlQueryParamsObject();
|
|
23884
24158
|
const path = 'search-bar-embed';
|
|
23885
24159
|
let query = '';
|
|
23886
24160
|
const queryParamsString = getQueryParamString(queryParams, true);
|
|
@@ -24067,7 +24341,7 @@ let SearchEmbed$1 = class SearchEmbed extends TsEmbed {
|
|
|
24067
24341
|
}
|
|
24068
24342
|
getEmbedParams() {
|
|
24069
24343
|
const { runtimeParameters, runtimeFilters, excludeRuntimeParametersfromURL, excludeRuntimeFiltersfromURL, } = this.viewConfig;
|
|
24070
|
-
const queryParams = this.
|
|
24344
|
+
const queryParams = this.getUrlQueryParamsObject();
|
|
24071
24345
|
let query = '';
|
|
24072
24346
|
const queryParamsString = getQueryParamString(queryParams, true);
|
|
24073
24347
|
if (queryParamsString) {
|
|
@@ -24463,7 +24737,19 @@ function buildSpotterAnalystAppInitData(initData, viewConfig) {
|
|
|
24463
24737
|
spotterAnalystConfig,
|
|
24464
24738
|
},
|
|
24465
24739
|
};
|
|
24466
|
-
}
|
|
24740
|
+
}
|
|
24741
|
+
/**
|
|
24742
|
+
* The Spotter experience version to load in the embedded view.
|
|
24743
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.11.0.cl
|
|
24744
|
+
* @group Embed components
|
|
24745
|
+
*/
|
|
24746
|
+
var SpotterExperienceVersion;
|
|
24747
|
+
(function (SpotterExperienceVersion) {
|
|
24748
|
+
/**
|
|
24749
|
+
* The Spotter experience version introduced in ThoughtSpot 26.11.
|
|
24750
|
+
*/
|
|
24751
|
+
SpotterExperienceVersion["SPOTTER_2026_11"] = "spotter_2026_11";
|
|
24752
|
+
})(SpotterExperienceVersion || (SpotterExperienceVersion = {}));
|
|
24467
24753
|
|
|
24468
24754
|
function buildSpotterVizAppInitData(initData, viewConfig) {
|
|
24469
24755
|
const { spotterViz } = viewConfig;
|
|
@@ -24660,12 +24946,12 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
|
|
|
24660
24946
|
* embedded Liveboard or visualization.
|
|
24661
24947
|
*/
|
|
24662
24948
|
getEmbedParams() {
|
|
24663
|
-
const params = this.
|
|
24949
|
+
const params = this.getUrlQueryParamsObject();
|
|
24664
24950
|
return getQueryParamString(params, true);
|
|
24665
24951
|
}
|
|
24666
24952
|
getEmbedParamsObject() {
|
|
24667
24953
|
var _a;
|
|
24668
|
-
const { tag, hideTagFilterChips, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideHamburger, hideObjectSearch, hideNotification, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, newConnectionsExperience, dataPanelV2 = true, updatedSpotterExperience, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, showMaskedFilterChip = false, isLiveboardMasterpiecesEnabled, newChartsLibrary, hideHomepageLeftNav = false, modularHomeExperience, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, enable2ColumnLayout, isLiveboardAlwaysOn12ColLayout, enableCustomColumnGroups = false, dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs, isEnhancedFilterInteractivityEnabled, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, discoveryExperience, coverAndFilterOptionInPDF, isLiveboardStylingAndGroupingEnabled, liveboardGutter, isPNGInScheduledEmailsEnabled = false, isLiveboardXLSXCSVDownloadEnabled, isGranularXLSXCSVSchedulesEnabled, isCentralizedLiveboardFilterUXEnabled = false, isScopedLiveboardFilteringEnabled, isLinkParametersEnabled, updatedSpotterChatPrompt, showSpotterRadiance, defaultQueryMode, enableStopAnswerGenerationEmbed, spotterChatConfig, spotterDataSources, isThisPeriodInDateFiltersEnabled, enableHomepageAnnouncement = false, isContinuousLiveboardPDFEnabled, enableLiveboardDataCache, hideAnswerEditPanel, } = this.viewConfig;
|
|
24954
|
+
const { tag, hideTagFilterChips, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideHamburger, hideObjectSearch, hideNotification, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, newConnectionsExperience, dataPanelV2 = true, updatedSpotterExperience, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, showMaskedFilterChip = false, isLiveboardMasterpiecesEnabled, newChartsLibrary, hideHomepageLeftNav = false, modularHomeExperience, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, enable2ColumnLayout, isLiveboardAlwaysOn12ColLayout, enableCustomColumnGroups = false, dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs, isEnhancedFilterInteractivityEnabled, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, discoveryExperience, coverAndFilterOptionInPDF, isLiveboardStylingAndGroupingEnabled, liveboardGutter, isPNGInScheduledEmailsEnabled = false, isLiveboardXLSXCSVDownloadEnabled, isGranularXLSXCSVSchedulesEnabled, isCentralizedLiveboardFilterUXEnabled = false, isScopedLiveboardFilteringEnabled, isLinkParametersEnabled, updatedSpotterChatPrompt, showSpotterRadiance, defaultQueryMode, enableStopAnswerGenerationEmbed, spotterChatConfig, spotterDataSources, isThisPeriodInDateFiltersEnabled, enableHomepageAnnouncement = false, isContinuousLiveboardPDFEnabled, enableLiveboardDataCache, hideAnswerEditPanel, spotterExperienceVersion, } = this.viewConfig;
|
|
24669
24955
|
let params = {};
|
|
24670
24956
|
params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
|
|
24671
24957
|
params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
|
|
@@ -24720,6 +25006,9 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
|
|
|
24720
25006
|
if (spotterDataSources && spotterDataSources.length) {
|
|
24721
25007
|
params[Param.SpotterDataSources] = JSON.stringify(spotterDataSources);
|
|
24722
25008
|
}
|
|
25009
|
+
if (spotterExperienceVersion !== undefined) {
|
|
25010
|
+
params[Param.SpotterExperienceVersion] = spotterExperienceVersion;
|
|
25011
|
+
}
|
|
24723
25012
|
// Handle spotterChatConfig params
|
|
24724
25013
|
if (spotterChatConfig) {
|
|
24725
25014
|
const { hideToolResponseCardBranding, toolResponseCardBrandingLabel, spotterFileUploadEnabled, spotterFileUploadFileTypes, enableStarterPrompts, openSpotterOnLiveboardByDefault, } = spotterChatConfig;
|
|
@@ -24838,7 +25127,7 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
|
|
|
24838
25127
|
}
|
|
24839
25128
|
// Navigation V1/V2 and home page V1/V2 are deprecated. V3 is now the
|
|
24840
25129
|
// default experience, Need to send navigationVersion=v3 and
|
|
24841
|
-
// homepageVersion=v3 even when the no discoveryExperience /
|
|
25130
|
+
// homepageVersion=v3 even when the no discoveryExperience /
|
|
24842
25131
|
// modularHomeExperience config is set. Without these
|
|
24843
25132
|
// params, older TSA versions (< 26.7) fall back to V2 for nav and
|
|
24844
25133
|
// home page, so the defaults must be sent explicitly from the SDK.
|
|
@@ -24977,46 +25266,6 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
|
|
|
24977
25266
|
}
|
|
24978
25267
|
};
|
|
24979
25268
|
|
|
24980
|
-
/**
|
|
24981
|
-
* This method is like `_.isEqual` except that it accepts `customizer` which
|
|
24982
|
-
* is invoked to compare values. If `customizer` returns `undefined`, comparisons
|
|
24983
|
-
* are handled by the method instead. The `customizer` is invoked with up to
|
|
24984
|
-
* six arguments: (objValue, othValue [, index|key, object, other, stack]).
|
|
24985
|
-
*
|
|
24986
|
-
* @static
|
|
24987
|
-
* @memberOf _
|
|
24988
|
-
* @since 4.0.0
|
|
24989
|
-
* @category Lang
|
|
24990
|
-
* @param {*} value The value to compare.
|
|
24991
|
-
* @param {*} other The other value to compare.
|
|
24992
|
-
* @param {Function} [customizer] The function to customize comparisons.
|
|
24993
|
-
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
|
24994
|
-
* @example
|
|
24995
|
-
*
|
|
24996
|
-
* function isGreeting(value) {
|
|
24997
|
-
* return /^h(?:i|ello)$/.test(value);
|
|
24998
|
-
* }
|
|
24999
|
-
*
|
|
25000
|
-
* function customizer(objValue, othValue) {
|
|
25001
|
-
* if (isGreeting(objValue) && isGreeting(othValue)) {
|
|
25002
|
-
* return true;
|
|
25003
|
-
* }
|
|
25004
|
-
* }
|
|
25005
|
-
*
|
|
25006
|
-
* var array = ['hello', 'goodbye'];
|
|
25007
|
-
* var other = ['hi', 'goodbye'];
|
|
25008
|
-
*
|
|
25009
|
-
* _.isEqualWith(array, other, customizer);
|
|
25010
|
-
* // => true
|
|
25011
|
-
*/
|
|
25012
|
-
function isEqualWith(value, other, customizer) {
|
|
25013
|
-
customizer = typeof customizer == 'function' ? customizer : undefined;
|
|
25014
|
-
var result = customizer ? customizer(value, other) : undefined;
|
|
25015
|
-
return result === undefined ? _baseIsEqual(value, other, undefined, customizer) : !!result;
|
|
25016
|
-
}
|
|
25017
|
-
|
|
25018
|
-
var isEqualWith_1 = isEqualWith;
|
|
25019
|
-
|
|
25020
25269
|
const getPreviewQuery = `
|
|
25021
25270
|
query GetEurekaVizSnapshots(
|
|
25022
25271
|
$vizId: String!, $liveboardId: String!) {
|
|
@@ -25087,6 +25336,21 @@ const addPreviewStylesIfNotPresent = () => {
|
|
|
25087
25336
|
document.head.insertAdjacentHTML('beforeend', previewStyles);
|
|
25088
25337
|
};
|
|
25089
25338
|
|
|
25339
|
+
function buildLiveboardOverrideAppInitData(initData, viewConfig) {
|
|
25340
|
+
var _a;
|
|
25341
|
+
const { liveboardOverride } = viewConfig;
|
|
25342
|
+
// ThoughtSpot ignores an override with no data source entries; skip it.
|
|
25343
|
+
if (!((_a = liveboardOverride === null || liveboardOverride === void 0 ? void 0 : liveboardOverride.dataSourceOverride) === null || _a === void 0 ? void 0 : _a.length))
|
|
25344
|
+
return initData;
|
|
25345
|
+
return {
|
|
25346
|
+
...initData,
|
|
25347
|
+
embedParams: {
|
|
25348
|
+
...(initData.embedParams || {}),
|
|
25349
|
+
liveboardOverride,
|
|
25350
|
+
},
|
|
25351
|
+
};
|
|
25352
|
+
}
|
|
25353
|
+
|
|
25090
25354
|
/**
|
|
25091
25355
|
* Copyright (c) 2022
|
|
25092
25356
|
*
|
|
@@ -25116,11 +25380,6 @@ const HOME_SETTLE_MS = 200;
|
|
|
25116
25380
|
* })
|
|
25117
25381
|
* ```
|
|
25118
25382
|
*/
|
|
25119
|
-
/**
|
|
25120
|
-
* A shallow copy without the keys whose value is `undefined`, so a key that was
|
|
25121
|
-
* assigned `undefined` compares equal to one that was never set.
|
|
25122
|
-
*/
|
|
25123
|
-
const definedEntries = (config = {}) => Object.fromEntries(Object.entries(config).filter(([, value]) => value !== undefined));
|
|
25124
25383
|
let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
|
|
25125
25384
|
constructor(domSelector, viewConfig) {
|
|
25126
25385
|
viewConfig.embedComponentType = 'LiveboardEmbed';
|
|
@@ -25156,14 +25415,15 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
|
|
|
25156
25415
|
async getAppInitData() {
|
|
25157
25416
|
const defaultAppInitData = await super.getAppInitData();
|
|
25158
25417
|
const vizInitData = buildSpotterVizAppInitData(defaultAppInitData, this.viewConfig);
|
|
25159
|
-
|
|
25418
|
+
const starterPromptsInitData = buildStarterPromptsAppInitData(vizInitData, this.viewConfig);
|
|
25419
|
+
return buildLiveboardOverrideAppInitData(starterPromptsInitData, this.viewConfig);
|
|
25160
25420
|
}
|
|
25161
25421
|
/**
|
|
25162
25422
|
* Construct a map of params to be passed on to the
|
|
25163
25423
|
* embedded Liveboard or visualization.
|
|
25164
25424
|
*/
|
|
25165
25425
|
getEmbedParams() {
|
|
25166
|
-
const params = this.
|
|
25426
|
+
const params = this.getUrlQueryParamsObject();
|
|
25167
25427
|
const queryParams = getQueryParamString(params, true);
|
|
25168
25428
|
return queryParams;
|
|
25169
25429
|
}
|
|
@@ -25171,7 +25431,7 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
|
|
|
25171
25431
|
var _a;
|
|
25172
25432
|
let params = {};
|
|
25173
25433
|
params = this.getBaseQueryParams(params);
|
|
25174
|
-
const { enableVizTransformations, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, isLiveboardCompactHeaderEnabled, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs, showMaskedFilterChip = false, isLiveboardMasterpiecesEnabled, newChartsLibrary, isEnhancedFilterInteractivityEnabled, enableAskSage, enable2ColumnLayout, isLiveboardAlwaysOn12ColLayout, dataPanelV2 = true, updatedSpotterExperience, enableCustomColumnGroups = false, oAuthPollingInterval, isForceRedirect, dataSourceId, coverAndFilterOptionInPDF, isLiveboardStylingAndGroupingEnabled, liveboardGutter, isPNGInScheduledEmailsEnabled = false, isLiveboardXLSXCSVDownloadEnabled, isGranularXLSXCSVSchedulesEnabled, showSpotterLimitations, isCentralizedLiveboardFilterUXEnabled = false, isScopedLiveboardFilteringEnabled, isLinkParametersEnabled, updatedSpotterChatPrompt, showSpotterRadiance, enableStopAnswerGenerationEmbed, spotterChatConfig, isThisPeriodInDateFiltersEnabled, isContinuousLiveboardPDFEnabled, enableLiveboardDataCache, } = this.viewConfig;
|
|
25434
|
+
const { enableVizTransformations, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, isLiveboardCompactHeaderEnabled, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs, showMaskedFilterChip = false, isLiveboardMasterpiecesEnabled, newChartsLibrary, isEnhancedFilterInteractivityEnabled, enableAskSage, enable2ColumnLayout, isLiveboardAlwaysOn12ColLayout, dataPanelV2 = true, updatedSpotterExperience, enableCustomColumnGroups = false, oAuthPollingInterval, isForceRedirect, dataSourceId, coverAndFilterOptionInPDF, isLiveboardStylingAndGroupingEnabled, liveboardGutter, isPNGInScheduledEmailsEnabled = false, isLiveboardXLSXCSVDownloadEnabled, isGranularXLSXCSVSchedulesEnabled, showSpotterLimitations, isCentralizedLiveboardFilterUXEnabled = false, isScopedLiveboardFilteringEnabled, isLinkParametersEnabled, updatedSpotterChatPrompt, showSpotterRadiance, enableStopAnswerGenerationEmbed, spotterChatConfig, isThisPeriodInDateFiltersEnabled, isContinuousLiveboardPDFEnabled, enableLiveboardDataCache, spotterExperienceVersion, } = this.viewConfig;
|
|
25175
25435
|
const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
|
|
25176
25436
|
|| this.viewConfig.preventPinboardFilterRemoval;
|
|
25177
25437
|
(_a = this.fullHeightController) === null || _a === void 0 ? void 0 : _a.addQueryParams(params);
|
|
@@ -25233,6 +25493,9 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
|
|
|
25233
25493
|
if (isLiveboardStylingAndGroupingEnabled !== undefined) {
|
|
25234
25494
|
params[Param.IsLiveboardStylingAndGroupingEnabled] = isLiveboardStylingAndGroupingEnabled;
|
|
25235
25495
|
}
|
|
25496
|
+
if (spotterExperienceVersion !== undefined) {
|
|
25497
|
+
params[Param.SpotterExperienceVersion] = spotterExperienceVersion;
|
|
25498
|
+
}
|
|
25236
25499
|
if (liveboardGutter !== undefined) {
|
|
25237
25500
|
params[Param.LiveboardGutter] = liveboardGutter;
|
|
25238
25501
|
}
|
|
@@ -25402,12 +25665,10 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
|
|
|
25402
25665
|
beforePrerenderVisible() {
|
|
25403
25666
|
super.beforePrerenderVisible();
|
|
25404
25667
|
// Captured before showPreRender() hands the wrapper over to this
|
|
25405
|
-
// instance.
|
|
25406
|
-
//
|
|
25668
|
+
// instance. Itself means a hide/show, not a hand-over, so there is
|
|
25669
|
+
// nothing stale to clear.
|
|
25407
25670
|
const previous = this.getPreRenderObj();
|
|
25408
|
-
const showing = this.
|
|
25409
|
-
? undefined
|
|
25410
|
-
: previous === null || previous === void 0 ? void 0 : previous.currentLiveboardState;
|
|
25671
|
+
const showing = previous === this ? undefined : previous === null || previous === void 0 ? void 0 : previous.currentLiveboardState;
|
|
25411
25672
|
this.executeAfterEmbedContainerLoaded(async () => {
|
|
25412
25673
|
// Without this the params callback suspends on its await and
|
|
25413
25674
|
// Navigate goes out first, so the container loads with the previous
|
|
@@ -25434,25 +25695,6 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
|
|
|
25434
25695
|
};
|
|
25435
25696
|
});
|
|
25436
25697
|
}
|
|
25437
|
-
/**
|
|
25438
|
-
* Whether `previous` was showing what this instance is about to show.
|
|
25439
|
-
*
|
|
25440
|
-
* Undefined-valued keys are dropped before comparing. `navigateToLiveboard`
|
|
25441
|
-
* assigns `vizId`, `activeTabId` and `personalizedViewId` unconditionally,
|
|
25442
|
-
* so an instance that has been shown once carries those keys as `undefined`
|
|
25443
|
-
* while a freshly constructed one does not have them at all. `isEqual`
|
|
25444
|
-
* counts own keys, so without this the comparison can never be true after
|
|
25445
|
-
* the first show — which is the whole case this exists for.
|
|
25446
|
-
*
|
|
25447
|
-
* Callbacks compare as equal: React passes a fresh closure per render.
|
|
25448
|
-
*/
|
|
25449
|
-
isSameEmbedConfig(previous) {
|
|
25450
|
-
if (!previous)
|
|
25451
|
-
return false;
|
|
25452
|
-
if (previous === this)
|
|
25453
|
-
return true;
|
|
25454
|
-
return isEqualWith_1(definedEntries(previous.viewConfig), definedEntries(this.viewConfig), (a, b) => (typeof a === 'function' && typeof b === 'function' ? true : undefined));
|
|
25455
|
-
}
|
|
25456
25698
|
// The whole route, not just the liveboard id: the path is built from the
|
|
25457
25699
|
// viz, tab and view too, so a same-liveboard show onto another tab is a
|
|
25458
25700
|
// real navigation.
|
|
@@ -25957,7 +26199,7 @@ let ConversationMessage$1 = class ConversationMessage extends TsEmbed {
|
|
|
25957
26199
|
getIframeSrc() {
|
|
25958
26200
|
const { sessionId, genNo, acSessionId, acGenNo, convId, messageId, } = this.viewConfig;
|
|
25959
26201
|
const path = 'conv-assist-answer';
|
|
25960
|
-
const queryParams = this.
|
|
26202
|
+
const queryParams = this.getUrlQueryParamsObject();
|
|
25961
26203
|
let query = '';
|
|
25962
26204
|
const queryParamsString = getQueryParamString(queryParams, true);
|
|
25963
26205
|
if (queryParamsString) {
|
|
@@ -26149,18 +26391,22 @@ let SpotterEmbed$1 = class SpotterEmbed extends TsEmbed {
|
|
|
26149
26391
|
}
|
|
26150
26392
|
}
|
|
26151
26393
|
setParamIfDefined(queryParams, Param.UpdatedSpotterExperience, updatedSpotterExperience, true);
|
|
26394
|
+
setParamIfDefined(queryParams, Param.SpotterExperienceVersion, this.viewConfig.spotterExperienceVersion);
|
|
26152
26395
|
return queryParams;
|
|
26153
26396
|
}
|
|
26154
26397
|
getIframeSrc() {
|
|
26155
|
-
const { worksheetId, searchOptions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, sharedConversationId, dataSources, } = this.viewConfig;
|
|
26398
|
+
const { worksheetId, searchOptions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, sharedConversationId, dataSources, spotterExperienceVersion, } = this.viewConfig;
|
|
26156
26399
|
// Deep-link into the read-only shared-conversation reader view when a
|
|
26157
26400
|
// shared conversation id is supplied (e.g. a recipient landing from a
|
|
26158
26401
|
// host-configured CONVERSATION_URL share link); otherwise the normal
|
|
26159
26402
|
// Spotter conversation surface.
|
|
26160
|
-
|
|
26403
|
+
let path = sharedConversationId
|
|
26161
26404
|
? `insights/conv-assist/s/${encodeURIComponent(sharedConversationId)}`
|
|
26162
26405
|
: 'insights/conv-assist';
|
|
26163
|
-
|
|
26406
|
+
if (spotterExperienceVersion === SpotterExperienceVersion.SPOTTER_2026_11) {
|
|
26407
|
+
path = path.replace('insights/conv-assist', 'insights/spotter');
|
|
26408
|
+
}
|
|
26409
|
+
const queryParams = this.getUrlQueryParamsObject();
|
|
26164
26410
|
let query = '';
|
|
26165
26411
|
const queryParamsString = getQueryParamString(queryParams, true);
|
|
26166
26412
|
if (queryParamsString) {
|