@thoughtspot/visual-embed-sdk 1.46.5-beta.1 → 1.47.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 +4 -4
- package/cjs/src/css-variables.d.ts +36 -0
- package/cjs/src/css-variables.d.ts.map +1 -1
- package/cjs/src/embed/app.d.ts +41 -17
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +26 -47
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/app.spec.js +36 -79
- package/cjs/src/embed/app.spec.js.map +1 -1
- package/cjs/src/embed/conversation.d.ts +24 -2
- package/cjs/src/embed/conversation.d.ts.map +1 -1
- package/cjs/src/embed/conversation.js +18 -33
- package/cjs/src/embed/conversation.js.map +1 -1
- package/cjs/src/embed/conversation.spec.js +129 -97
- package/cjs/src/embed/conversation.spec.js.map +1 -1
- package/cjs/src/embed/hostEventClient/contracts.d.ts +31 -0
- package/cjs/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/cjs/src/embed/hostEventClient/contracts.js +2 -0
- package/cjs/src/embed/hostEventClient/contracts.js.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.d.ts +18 -0
- package/cjs/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.js +69 -9
- package/cjs/src/embed/hostEventClient/host-event-client.js.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.spec.js +185 -19
- package/cjs/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
- package/cjs/src/embed/hostEventClient/utils.d.ts +22 -0
- package/cjs/src/embed/hostEventClient/utils.d.ts.map +1 -0
- package/cjs/src/embed/hostEventClient/utils.js +57 -0
- package/cjs/src/embed/hostEventClient/utils.js.map +1 -0
- package/cjs/src/embed/hostEventClient/utils.spec.d.ts +2 -0
- package/cjs/src/embed/hostEventClient/utils.spec.d.ts.map +1 -0
- package/cjs/src/embed/hostEventClient/utils.spec.js +190 -0
- package/cjs/src/embed/hostEventClient/utils.spec.js.map +1 -0
- package/cjs/src/embed/liveboard.d.ts +18 -1
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +9 -11
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/liveboard.spec.js +29 -71
- package/cjs/src/embed/liveboard.spec.js.map +1 -1
- package/cjs/src/embed/spotter-utils.d.ts +20 -0
- package/cjs/src/embed/spotter-utils.d.ts.map +1 -0
- package/cjs/src/embed/spotter-utils.js +52 -0
- package/cjs/src/embed/spotter-utils.js.map +1 -0
- package/cjs/src/embed/spotter-utils.spec.d.ts +2 -0
- package/cjs/src/embed/spotter-utils.spec.d.ts.map +1 -0
- package/cjs/src/embed/spotter-utils.spec.js +54 -0
- package/cjs/src/embed/spotter-utils.spec.js.map +1 -0
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +25 -5
- 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 +28 -67
- package/cjs/src/embed/ts-embed.spec.js.map +1 -1
- package/cjs/src/errors.d.ts +2 -1
- package/cjs/src/errors.d.ts.map +1 -1
- package/cjs/src/errors.js +2 -1
- package/cjs/src/errors.js.map +1 -1
- package/cjs/src/index.d.ts +1 -2
- package/cjs/src/index.d.ts.map +1 -1
- package/cjs/src/index.js +2 -4
- package/cjs/src/index.js.map +1 -1
- package/cjs/src/react/all-types-export.d.ts +2 -2
- package/cjs/src/react/all-types-export.d.ts.map +1 -1
- package/cjs/src/react/all-types-export.js +1 -3
- package/cjs/src/react/all-types-export.js.map +1 -1
- package/cjs/src/react/index.d.ts +1 -36
- package/cjs/src/react/index.d.ts.map +1 -1
- package/cjs/src/react/index.js +1 -34
- package/cjs/src/react/index.js.map +1 -1
- package/cjs/src/types.d.ts +143 -76
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +118 -47
- package/cjs/src/types.js.map +1 -1
- package/cjs/src/utils.d.ts +0 -9
- package/cjs/src/utils.d.ts.map +1 -1
- package/cjs/src/utils.js +1 -10
- package/cjs/src/utils.js.map +1 -1
- package/dist/{index-DW2wEHqy.js → index-Bm2Hck8q.js} +1 -1
- package/dist/src/css-variables.d.ts +36 -0
- package/dist/src/css-variables.d.ts.map +1 -1
- package/dist/src/embed/app.d.ts +41 -17
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/conversation.d.ts +24 -2
- package/dist/src/embed/conversation.d.ts.map +1 -1
- package/dist/src/embed/hostEventClient/contracts.d.ts +31 -0
- package/dist/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/dist/src/embed/hostEventClient/host-event-client.d.ts +18 -0
- package/dist/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/dist/src/embed/hostEventClient/utils.d.ts +22 -0
- package/dist/src/embed/hostEventClient/utils.d.ts.map +1 -0
- package/dist/src/embed/hostEventClient/utils.spec.d.ts +2 -0
- package/dist/src/embed/hostEventClient/utils.spec.d.ts.map +1 -0
- package/dist/src/embed/liveboard.d.ts +18 -1
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/embed/spotter-utils.d.ts +20 -0
- package/dist/src/embed/spotter-utils.d.ts.map +1 -0
- package/dist/src/embed/spotter-utils.spec.d.ts +2 -0
- package/dist/src/embed/spotter-utils.spec.d.ts.map +1 -0
- 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/errors.d.ts +2 -1
- package/dist/src/errors.d.ts.map +1 -1
- package/dist/src/index.d.ts +1 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/react/all-types-export.d.ts +2 -2
- package/dist/src/react/all-types-export.d.ts.map +1 -1
- package/dist/src/react/index.d.ts +1 -36
- package/dist/src/react/index.d.ts.map +1 -1
- package/dist/src/types.d.ts +143 -76
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils.d.ts +0 -9
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +378 -304
- package/dist/tsembed-react.js +366 -294
- package/dist/tsembed.es.js +393 -285
- package/dist/tsembed.js +30798 -30691
- package/dist/visual-embed-sdk-react-full.d.ts +310 -273
- package/dist/visual-embed-sdk-react.d.ts +310 -273
- package/dist/visual-embed-sdk.d.ts +308 -243
- package/lib/package.json +4 -4
- package/lib/src/css-variables.d.ts +36 -0
- package/lib/src/css-variables.d.ts.map +1 -1
- package/lib/src/embed/app.d.ts +41 -17
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +28 -49
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/app.spec.js +36 -79
- package/lib/src/embed/app.spec.js.map +1 -1
- package/lib/src/embed/conversation.d.ts +24 -2
- package/lib/src/embed/conversation.d.ts.map +1 -1
- package/lib/src/embed/conversation.js +19 -34
- package/lib/src/embed/conversation.js.map +1 -1
- package/lib/src/embed/conversation.spec.js +131 -99
- package/lib/src/embed/conversation.spec.js.map +1 -1
- package/lib/src/embed/hostEventClient/contracts.d.ts +31 -0
- package/lib/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/lib/src/embed/hostEventClient/contracts.js +2 -0
- package/lib/src/embed/hostEventClient/contracts.js.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.d.ts +18 -0
- package/lib/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.js +69 -9
- package/lib/src/embed/hostEventClient/host-event-client.js.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.spec.js +185 -19
- package/lib/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
- package/lib/src/embed/hostEventClient/utils.d.ts +22 -0
- package/lib/src/embed/hostEventClient/utils.d.ts.map +1 -0
- package/lib/src/embed/hostEventClient/utils.js +49 -0
- package/lib/src/embed/hostEventClient/utils.js.map +1 -0
- package/lib/src/embed/hostEventClient/utils.spec.d.ts +2 -0
- package/lib/src/embed/hostEventClient/utils.spec.d.ts.map +1 -0
- package/lib/src/embed/hostEventClient/utils.spec.js +188 -0
- package/lib/src/embed/hostEventClient/utils.spec.js.map +1 -0
- package/lib/src/embed/liveboard.d.ts +18 -1
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +9 -11
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +29 -71
- package/lib/src/embed/liveboard.spec.js.map +1 -1
- package/lib/src/embed/spotter-utils.d.ts +20 -0
- package/lib/src/embed/spotter-utils.d.ts.map +1 -0
- package/lib/src/embed/spotter-utils.js +47 -0
- package/lib/src/embed/spotter-utils.js.map +1 -0
- package/lib/src/embed/spotter-utils.spec.d.ts +2 -0
- package/lib/src/embed/spotter-utils.spec.d.ts.map +1 -0
- package/lib/src/embed/spotter-utils.spec.js +52 -0
- package/lib/src/embed/spotter-utils.spec.js.map +1 -0
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +25 -5
- 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 +30 -69
- package/lib/src/embed/ts-embed.spec.js.map +1 -1
- package/lib/src/errors.d.ts +2 -1
- package/lib/src/errors.d.ts.map +1 -1
- package/lib/src/errors.js +2 -1
- package/lib/src/errors.js.map +1 -1
- package/lib/src/index.d.ts +1 -2
- package/lib/src/index.d.ts.map +1 -1
- package/lib/src/index.js +1 -2
- package/lib/src/index.js.map +1 -1
- package/lib/src/react/all-types-export.d.ts +2 -2
- 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/react/index.d.ts +1 -36
- package/lib/src/react/index.d.ts.map +1 -1
- package/lib/src/react/index.js +0 -33
- package/lib/src/react/index.js.map +1 -1
- package/lib/src/types.d.ts +143 -76
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +118 -47
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils.d.ts +0 -9
- package/lib/src/utils.d.ts.map +1 -1
- package/lib/src/utils.js +0 -8
- package/lib/src/utils.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +308 -243
- package/package.json +4 -4
- package/src/css-variables.ts +45 -0
- package/src/embed/app.spec.ts +51 -107
- package/src/embed/app.ts +60 -82
- package/src/embed/conversation.spec.ts +150 -119
- package/src/embed/conversation.ts +34 -58
- package/src/embed/hostEventClient/contracts.ts +31 -0
- package/src/embed/hostEventClient/host-event-client.spec.ts +260 -19
- package/src/embed/hostEventClient/host-event-client.ts +87 -11
- package/src/embed/hostEventClient/utils.spec.ts +225 -0
- package/src/embed/hostEventClient/utils.ts +74 -0
- package/src/embed/liveboard.spec.ts +38 -93
- package/src/embed/liveboard.ts +28 -10
- package/src/embed/spotter-utils.spec.ts +56 -0
- package/src/embed/spotter-utils.ts +65 -0
- package/src/embed/ts-embed.spec.ts +56 -108
- package/src/embed/ts-embed.ts +25 -4
- package/src/errors.ts +2 -1
- package/src/index.ts +2 -5
- package/src/react/all-types-export.ts +0 -3
- package/src/react/index.tsx +15 -59
- package/src/types.ts +206 -138
- package/src/utils.ts +0 -14
- package/cjs/src/embed/sage.d.ts +0 -164
- package/cjs/src/embed/sage.d.ts.map +0 -1
- package/cjs/src/embed/sage.js +0 -88
- package/cjs/src/embed/sage.js.map +0 -1
- package/cjs/src/embed/sage.spec.d.ts +0 -2
- package/cjs/src/embed/sage.spec.d.ts.map +0 -1
- package/cjs/src/embed/sage.spec.js +0 -151
- package/cjs/src/embed/sage.spec.js.map +0 -1
- package/dist/src/embed/sage.d.ts +0 -164
- package/dist/src/embed/sage.d.ts.map +0 -1
- package/dist/src/embed/sage.spec.d.ts +0 -2
- package/dist/src/embed/sage.spec.d.ts.map +0 -1
- package/lib/src/embed/sage.d.ts +0 -164
- package/lib/src/embed/sage.d.ts.map +0 -1
- package/lib/src/embed/sage.js +0 -84
- package/lib/src/embed/sage.js.map +0 -1
- package/lib/src/embed/sage.spec.d.ts +0 -2
- package/lib/src/embed/sage.spec.d.ts.map +0 -1
- package/lib/src/embed/sage.spec.js +0 -148
- package/lib/src/embed/sage.spec.js.map +0 -1
- package/src/embed/sage.spec.ts +0 -206
- package/src/embed/sage.ts +0 -231
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.47.0 */
|
|
2
2
|
'use client';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import React__default, { useRef, useCallback } from 'react';
|
|
@@ -1061,6 +1061,17 @@ var EmbedEvent;
|
|
|
1061
1061
|
* ```
|
|
1062
1062
|
*/
|
|
1063
1063
|
EmbedEvent["DownloadAsXlsx"] = "downloadAsXlsx";
|
|
1064
|
+
/**
|
|
1065
|
+
* Emitted when the Download Liveboard as Continuous PDF action is triggered
|
|
1066
|
+
* on a Liveboard.
|
|
1067
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
1068
|
+
* @example
|
|
1069
|
+
* ```js
|
|
1070
|
+
* liveboardEmbed.on(EmbedEvent.DownloadLiveboardAsContinuousPDF, payload => {
|
|
1071
|
+
* console.log('download liveboard as continuous PDF', payload)})
|
|
1072
|
+
* ```
|
|
1073
|
+
*/
|
|
1074
|
+
EmbedEvent["DownloadLiveboardAsContinuousPDF"] = "downloadLiveboardAsContinuousPDF";
|
|
1064
1075
|
/**
|
|
1065
1076
|
* Emitted when an Answer is deleted in the app
|
|
1066
1077
|
* Use start:true to subscribe to when delete is initiated, or end:true to subscribe
|
|
@@ -1438,19 +1449,6 @@ var EmbedEvent;
|
|
|
1438
1449
|
* @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl, 9.5.0.sw
|
|
1439
1450
|
*/
|
|
1440
1451
|
EmbedEvent["FilterChanged"] = "filterChanged";
|
|
1441
|
-
/**
|
|
1442
|
-
* Emitted when a user clicks the **Go** button to initiate
|
|
1443
|
-
* a Natural Language Search query
|
|
1444
|
-
* @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
|
|
1445
|
-
*/
|
|
1446
|
-
EmbedEvent["SageEmbedQuery"] = "sageEmbedQuery";
|
|
1447
|
-
/**
|
|
1448
|
-
* Emitted when a user selects a data source on the embedded
|
|
1449
|
-
* Natural Language Search interface.
|
|
1450
|
-
*
|
|
1451
|
-
* @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
|
|
1452
|
-
*/
|
|
1453
|
-
EmbedEvent["SageWorksheetUpdated"] = "sageWorksheetUpdated";
|
|
1454
1452
|
/**
|
|
1455
1453
|
* Emitted when a user updates a connection on the **Data** page
|
|
1456
1454
|
* @version SDK: 1.27.0 | ThoughtSpot: 9.8.0.cl, 9.8.0.sw
|
|
@@ -2589,6 +2587,18 @@ var HostEvent;
|
|
|
2589
2587
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2590
2588
|
*/
|
|
2591
2589
|
HostEvent["DownloadAsPdf"] = "downloadAsPdf";
|
|
2590
|
+
/**
|
|
2591
|
+
* Trigger the **Download Liveboard as Continuous PDF** action on an
|
|
2592
|
+
* embedded Liveboard.
|
|
2593
|
+
*
|
|
2594
|
+
* @example
|
|
2595
|
+
* ```js
|
|
2596
|
+
* liveboardEmbed.trigger(HostEvent.DownloadLiveboardAsContinuousPDF)
|
|
2597
|
+
* ```
|
|
2598
|
+
*
|
|
2599
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
2600
|
+
*/
|
|
2601
|
+
HostEvent["DownloadLiveboardAsContinuousPDF"] = "downloadLiveboardAsContinuousPDF";
|
|
2592
2602
|
/**
|
|
2593
2603
|
* Trigger the **AI Highlights** action on an embedded Liveboard
|
|
2594
2604
|
*
|
|
@@ -2815,6 +2825,20 @@ var HostEvent;
|
|
|
2815
2825
|
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
2816
2826
|
* }, ContextType.Liveboard);
|
|
2817
2827
|
* ```
|
|
2828
|
+
* @example
|
|
2829
|
+
* ```js
|
|
2830
|
+
* // Copy link from liveboard context
|
|
2831
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2832
|
+
* liveboardEmbed.trigger(HostEvent.CopyLink, {}, ContextType.Liveboard);
|
|
2833
|
+
* ```
|
|
2834
|
+
* @example
|
|
2835
|
+
* ```js
|
|
2836
|
+
* // Copy link from liveboard visualization context
|
|
2837
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2838
|
+
* liveboardEmbed.trigger(HostEvent.CopyLink, {
|
|
2839
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
2840
|
+
* }, ContextType.Liveboard);
|
|
2841
|
+
* ```
|
|
2818
2842
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2819
2843
|
*/
|
|
2820
2844
|
HostEvent["CopyLink"] = "embedDocument";
|
|
@@ -2846,6 +2870,20 @@ var HostEvent;
|
|
|
2846
2870
|
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2847
2871
|
* liveboardEmbed.trigger(HostEvent.Present, {}, ContextType.Liveboard);
|
|
2848
2872
|
* ```
|
|
2873
|
+
* @example
|
|
2874
|
+
* ```js
|
|
2875
|
+
* // Present from liveboard visualization context
|
|
2876
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2877
|
+
* liveboardEmbed.trigger(HostEvent.Present, {
|
|
2878
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
2879
|
+
* }, ContextType.Liveboard);
|
|
2880
|
+
* ```
|
|
2881
|
+
* @example
|
|
2882
|
+
* ```js
|
|
2883
|
+
* // Present from liveboard context
|
|
2884
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2885
|
+
* liveboardEmbed.trigger(HostEvent.Present, {}, ContextType.Liveboard);
|
|
2886
|
+
* ```
|
|
2849
2887
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2850
2888
|
*/
|
|
2851
2889
|
HostEvent["Present"] = "present";
|
|
@@ -2874,7 +2912,7 @@ var HostEvent;
|
|
|
2874
2912
|
* tml.answer.search_query // TML representation of the search query
|
|
2875
2913
|
* );
|
|
2876
2914
|
* })
|
|
2877
|
-
|
|
2915
|
+
* ```
|
|
2878
2916
|
* @example
|
|
2879
2917
|
* ```js
|
|
2880
2918
|
* // Get TML from search context
|
|
@@ -3498,21 +3536,6 @@ var HostEvent;
|
|
|
3498
3536
|
* @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
|
|
3499
3537
|
*/
|
|
3500
3538
|
HostEvent["SetHiddenTabs"] = "SetPinboardHiddenTabs";
|
|
3501
|
-
/**
|
|
3502
|
-
* Updates the search query string for Natural Language Search operations.
|
|
3503
|
-
* @param - Includes the following keys:
|
|
3504
|
-
* - `queryString`: Text string in Natural Language format.
|
|
3505
|
-
* - `executeSearch`: Boolean to execute search and update search query.
|
|
3506
|
-
* @example
|
|
3507
|
-
* ```js
|
|
3508
|
-
* sageEmbed.trigger(HostEvent.UpdateSageQuery, {
|
|
3509
|
-
* queryString: 'revenue per year',
|
|
3510
|
-
* executeSearch: true,
|
|
3511
|
-
* })
|
|
3512
|
-
* ```
|
|
3513
|
-
* @version SDK: 1.26.0 | ThoughtSpot: 9.8.0.cl, 9.8.0.sw
|
|
3514
|
-
*/
|
|
3515
|
-
HostEvent["UpdateSageQuery"] = "updateSageQuery";
|
|
3516
3539
|
/**
|
|
3517
3540
|
* Get the Answer session for a Search or
|
|
3518
3541
|
* Liveboard visualization.
|
|
@@ -4078,7 +4101,6 @@ var Param;
|
|
|
4078
4101
|
Param["HideNotification"] = "hideNotification";
|
|
4079
4102
|
Param["HideApplicationSwitcher"] = "applicationSwitcherHidden";
|
|
4080
4103
|
Param["HideOrgSwitcher"] = "orgSwitcherHidden";
|
|
4081
|
-
Param["IsSageEmbed"] = "isSageEmbed";
|
|
4082
4104
|
Param["HideWorksheetSelector"] = "hideWorksheetSelector";
|
|
4083
4105
|
Param["DisableWorksheetChange"] = "disableWorksheetChange";
|
|
4084
4106
|
Param["HideSourceSelection"] = "hideSourceSelection";
|
|
@@ -4129,7 +4151,6 @@ var Param;
|
|
|
4129
4151
|
Param["HideIrrelevantFiltersInTab"] = "hideIrrelevantFiltersAtTabLevel";
|
|
4130
4152
|
Param["IsEnhancedFilterInteractivityEnabled"] = "isLiveboardPermissionV2Enabled";
|
|
4131
4153
|
Param["SpotterEnabled"] = "isSpotterExperienceEnabled";
|
|
4132
|
-
Param["IsUnifiedSearchExperienceEnabled"] = "isUnifiedSearchExperienceEnabled";
|
|
4133
4154
|
Param["OverrideOrgId"] = "orgId";
|
|
4134
4155
|
Param["OauthPollingInterval"] = "oAuthPollingInterval";
|
|
4135
4156
|
Param["IsForceRedirect"] = "isForceRedirect";
|
|
@@ -4143,6 +4164,7 @@ var Param;
|
|
|
4143
4164
|
Param["IsLazyLoadingForEmbedEnabled"] = "isLazyLoadingForEmbedEnabled";
|
|
4144
4165
|
Param["RootMarginForLazyLoad"] = "rootMarginForLazyLoad";
|
|
4145
4166
|
Param["isPNGInScheduledEmailsEnabled"] = "isPNGInScheduledEmailsEnabled";
|
|
4167
|
+
Param["IsWYSIWYGLiveboardPDFEnabled"] = "isWYSIWYGLiveboardPDFEnabled";
|
|
4146
4168
|
Param["isLiveboardXLSXCSVDownloadEnabled"] = "isLiveboardXLSXCSVDownloadEnabled";
|
|
4147
4169
|
Param["isGranularXLSXCSVSchedulesEnabled"] = "isGranularXLSXCSVSchedulesEnabled";
|
|
4148
4170
|
Param["isCentralizedLiveboardFilterUXEnabled"] = "isCentralizedLiveboardFilterUXEnabled";
|
|
@@ -4487,6 +4509,16 @@ var Action;
|
|
|
4487
4509
|
* @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl
|
|
4488
4510
|
*/
|
|
4489
4511
|
Action["DownloadLiveboard"] = "downloadLiveboard";
|
|
4512
|
+
/**
|
|
4513
|
+
* The **Download Liveboard as Continuous PDF** menu action on a Liveboard.
|
|
4514
|
+
* Allows downloading the entire Liveboard as a continuous PDF.
|
|
4515
|
+
* @example
|
|
4516
|
+
* ```js
|
|
4517
|
+
* disabledActions: [Action.DownloadLiveboardAsContinuousPDF]
|
|
4518
|
+
* ```
|
|
4519
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
4520
|
+
*/
|
|
4521
|
+
Action["DownloadLiveboardAsContinuousPDF"] = "downloadLiveboardAsContinuousPDF";
|
|
4490
4522
|
/**
|
|
4491
4523
|
* @hidden
|
|
4492
4524
|
*/
|
|
@@ -5445,11 +5477,11 @@ var Action;
|
|
|
5445
5477
|
*/
|
|
5446
5478
|
Action["CoverAndFilterOptionInPDF"] = "coverAndFilterOptionInPDF";
|
|
5447
5479
|
/**
|
|
5448
|
-
|
|
5449
|
-
|
|
5450
|
-
|
|
5451
|
-
|
|
5452
|
-
|
|
5480
|
+
* Action ID to hide or disable the Coaching workflow in Spotter conversations.
|
|
5481
|
+
* When disabled, users cannot access **Add to Coaching** workflow in conversation.
|
|
5482
|
+
* The **Add to Coaching** feature allows adding reference questions and
|
|
5483
|
+
* business terms to improve Spotter’s responses. This feature is generally available
|
|
5484
|
+
* (GA) from version 26.2.0.cl and enabled by default on embed deployments.
|
|
5453
5485
|
* @example
|
|
5454
5486
|
* ```js
|
|
5455
5487
|
* hiddenAction: [Action.InConversationTraining]
|
|
@@ -5526,17 +5558,17 @@ var Action;
|
|
|
5526
5558
|
*/
|
|
5527
5559
|
Action["LiveboardStylePanel"] = "liveboardStylePanel";
|
|
5528
5560
|
/**
|
|
5529
|
-
|
|
5530
|
-
|
|
5531
|
-
|
|
5532
|
-
|
|
5533
|
-
|
|
5534
|
-
|
|
5535
|
-
|
|
5536
|
-
|
|
5537
|
-
|
|
5538
|
-
|
|
5539
|
-
|
|
5561
|
+
* The **Publish** action for Liveboards, Answers and Models.
|
|
5562
|
+
* Opens the publishing modal. It's a parent action for the
|
|
5563
|
+
* **Manage Publishing** and **Unpublish** actions if the object
|
|
5564
|
+
* is already published, otherwise appears standalone.
|
|
5565
|
+
* @example
|
|
5566
|
+
* ```js
|
|
5567
|
+
* hiddenActions: [Action.Publish]
|
|
5568
|
+
* disabledActions: [Action.Publish]
|
|
5569
|
+
* ```
|
|
5570
|
+
* @version SDK: 1.45.0 | ThoughtSpot Cloud: 26.2.0.cl
|
|
5571
|
+
*/
|
|
5540
5572
|
Action["Publish"] = "publish";
|
|
5541
5573
|
/**
|
|
5542
5574
|
* The **Manage Publishing** action for Liveboards, Answers and Models.
|
|
@@ -5704,6 +5736,39 @@ var Action;
|
|
|
5704
5736
|
* @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
|
|
5705
5737
|
*/
|
|
5706
5738
|
Action["SpotterDocs"] = "spotterDocs";
|
|
5739
|
+
/**
|
|
5740
|
+
* Controls visibility and disable state of the connector resources
|
|
5741
|
+
* section in the Spotter chat interface.
|
|
5742
|
+
* @example
|
|
5743
|
+
* ```js
|
|
5744
|
+
* hiddenActions: [Action.SpotterChatConnectorResources]
|
|
5745
|
+
* disabledActions: [Action.SpotterChatConnectorResources]
|
|
5746
|
+
* ```
|
|
5747
|
+
* @version SDK: 1.48.0 | ThoughtSpot Cloud: 26.5.0.cl
|
|
5748
|
+
*/
|
|
5749
|
+
Action["SpotterChatConnectorResources"] = "spotterChatConnectorResources";
|
|
5750
|
+
/**
|
|
5751
|
+
* Controls visibility and disable state of the connectors
|
|
5752
|
+
* in the Spotter chat interface.
|
|
5753
|
+
* @example
|
|
5754
|
+
* ```js
|
|
5755
|
+
* hiddenActions: [Action.SpotterChatConnectors]
|
|
5756
|
+
* disabledActions: [Action.SpotterChatConnectors]
|
|
5757
|
+
* ```
|
|
5758
|
+
* @version SDK: 1.48.0 | ThoughtSpot Cloud: 26.5.0.cl
|
|
5759
|
+
*/
|
|
5760
|
+
Action["SpotterChatConnectors"] = "spotterChatConnectors";
|
|
5761
|
+
/**
|
|
5762
|
+
* Controls visibility and disable state of the mode switcher
|
|
5763
|
+
* in the Spotter chat interface.
|
|
5764
|
+
* @example
|
|
5765
|
+
* ```js
|
|
5766
|
+
* hiddenActions: [Action.SpotterChatModeSwitcher]
|
|
5767
|
+
* disabledActions: [Action.SpotterChatModeSwitcher]
|
|
5768
|
+
* ```
|
|
5769
|
+
* @version SDK: 1.48.0 | ThoughtSpot Cloud: 26.5.0.cl
|
|
5770
|
+
*/
|
|
5771
|
+
Action["SpotterChatModeSwitcher"] = "spotterChatModeSwitcher";
|
|
5707
5772
|
/**
|
|
5708
5773
|
* The **Include current period** checkbox for date filters.
|
|
5709
5774
|
* Controls the visibility and availability of the option to include
|
|
@@ -5997,6 +6062,12 @@ var EmbedErrorCodes;
|
|
|
5997
6062
|
EmbedErrorCodes["UPDATE_PARAMS_FAILED"] = "UPDATE_PARAMS_FAILED";
|
|
5998
6063
|
/** Invalid URL provided in configuration */
|
|
5999
6064
|
EmbedErrorCodes["INVALID_URL"] = "INVALID_URL";
|
|
6065
|
+
/** Host event payload validation failed */
|
|
6066
|
+
EmbedErrorCodes["HOST_EVENT_VALIDATION"] = "HOST_EVENT_VALIDATION";
|
|
6067
|
+
/** UpdateFilters payload is invalid - missing or malformed filter/filters */
|
|
6068
|
+
EmbedErrorCodes["UPDATEFILTERS_INVALID_PAYLOAD"] = "UPDATEFILTERS_INVALID_PAYLOAD";
|
|
6069
|
+
/** DrillDown payload is invalid - missing or malformed points */
|
|
6070
|
+
EmbedErrorCodes["DRILLDOWN_INVALID_PAYLOAD"] = "DRILLDOWN_INVALID_PAYLOAD";
|
|
6000
6071
|
})(EmbedErrorCodes || (EmbedErrorCodes = {}));
|
|
6001
6072
|
/**
|
|
6002
6073
|
* Context types for specifying the page context when triggering host events.
|
|
@@ -6132,7 +6203,6 @@ const ERROR_MESSAGE = {
|
|
|
6132
6203
|
LIVEBOARD_VIZ_ID_VALIDATION: 'Please select a Liveboard to embed.',
|
|
6133
6204
|
TRIGGER_TIMED_OUT: 'Trigger timed-out in getting a response',
|
|
6134
6205
|
SEARCHEMBED_BETA_WRANING_MESSAGE: 'SearchEmbed is in Beta in this release.',
|
|
6135
|
-
SAGE_EMBED_BETA_WARNING_MESSAGE: 'SageEmbed is in Beta in this release.',
|
|
6136
6206
|
THIRD_PARTY_COOKIE_BLOCKED_ALERT: 'Third-party cookie access is blocked on this browser. Please allow third-party cookies for this to work properly. \nYou can use `suppressNoCookieAccessAlert` to suppress this message.',
|
|
6137
6207
|
DUPLICATE_TOKEN_ERR: 'Duplicate token. Please issue a new token every time getAuthToken callback is called. See https://developers.thoughtspot.com/docs/?pageid=embed-auth#trusted-auth-embed for more details.',
|
|
6138
6208
|
SDK_NOT_INITIALIZED: 'SDK not initialized',
|
|
@@ -6158,6 +6228,8 @@ const ERROR_MESSAGE = {
|
|
|
6158
6228
|
SSR_ENVIRONMENT_ERROR: 'SSR environment detected. This function cannot be called in SSR environment.',
|
|
6159
6229
|
UPDATE_PARAMS_FAILED: 'Failed to update embed parameters',
|
|
6160
6230
|
INVALID_SPOTTER_DOCUMENTATION_URL: 'Invalid spotterDocumentationUrl. Please provide a valid http or https URL.',
|
|
6231
|
+
UPDATEFILTERS_INVALID_PAYLOAD: 'UpdateFilters requires a valid filter or filters array. Expected: { filter: { column, oper, values } } or { filters: [{ column, oper, values }, ...] }',
|
|
6232
|
+
DRILLDOWN_INVALID_PAYLOAD: 'DrillDown requires a valid points object. Expected: { points: { clickedPoint?, selectedPoints? }, autoDrillDown?, vizId? }',
|
|
6161
6233
|
};
|
|
6162
6234
|
const CUSTOM_ACTIONS_ERROR_MESSAGE = {
|
|
6163
6235
|
INVALID_ACTION_OBJECT: 'Custom Action Validation Error: Invalid action object provided',
|
|
@@ -6661,14 +6733,6 @@ const validateHttpUrl = (url) => {
|
|
|
6661
6733
|
return [false, error instanceof Error ? error : new Error(String(error))];
|
|
6662
6734
|
}
|
|
6663
6735
|
};
|
|
6664
|
-
/**
|
|
6665
|
-
* Resolves enablePastConversationsSidebar with
|
|
6666
|
-
* spotterSidebarConfig taking precedence over the
|
|
6667
|
-
* standalone flag.
|
|
6668
|
-
*/
|
|
6669
|
-
const resolveEnablePastConversationsSidebar = (params) => (params.spotterSidebarConfigValue !== undefined
|
|
6670
|
-
? params.spotterSidebarConfigValue
|
|
6671
|
-
: params.standaloneValue);
|
|
6672
6736
|
/**
|
|
6673
6737
|
* Sets a query parameter if the value is defined.
|
|
6674
6738
|
* @param queryParams - The query params object to modify
|
|
@@ -6958,9 +7022,9 @@ var root = _freeGlobal || freeSelf || Function('return this')();
|
|
|
6958
7022
|
var _root = root;
|
|
6959
7023
|
|
|
6960
7024
|
/** Built-in value references. */
|
|
6961
|
-
var Symbol = _root.Symbol;
|
|
7025
|
+
var Symbol$1 = _root.Symbol;
|
|
6962
7026
|
|
|
6963
|
-
var _Symbol = Symbol;
|
|
7027
|
+
var _Symbol = Symbol$1;
|
|
6964
7028
|
|
|
6965
7029
|
/** Used for built-in method references. */
|
|
6966
7030
|
var objectProto$c = Object.prototype;
|
|
@@ -7031,7 +7095,7 @@ function objectToString(value) {
|
|
|
7031
7095
|
var _objectToString = objectToString;
|
|
7032
7096
|
|
|
7033
7097
|
/** `Object#toString` result references. */
|
|
7034
|
-
var nullTag = '[object Null]',
|
|
7098
|
+
var nullTag$1 = '[object Null]',
|
|
7035
7099
|
undefinedTag = '[object Undefined]';
|
|
7036
7100
|
|
|
7037
7101
|
/** Built-in value references. */
|
|
@@ -7046,7 +7110,7 @@ var symToStringTag = _Symbol ? _Symbol.toStringTag : undefined;
|
|
|
7046
7110
|
*/
|
|
7047
7111
|
function baseGetTag(value) {
|
|
7048
7112
|
if (value == null) {
|
|
7049
|
-
return value === undefined ? undefinedTag : nullTag;
|
|
7113
|
+
return value === undefined ? undefinedTag : nullTag$1;
|
|
7050
7114
|
}
|
|
7051
7115
|
return (symToStringTag && symToStringTag in Object(value))
|
|
7052
7116
|
? _getRawTag(value)
|
|
@@ -7811,7 +7875,7 @@ var COMPARE_PARTIAL_FLAG$4 = 1,
|
|
|
7811
7875
|
COMPARE_UNORDERED_FLAG$2 = 2;
|
|
7812
7876
|
|
|
7813
7877
|
/** `Object#toString` result references. */
|
|
7814
|
-
var boolTag$
|
|
7878
|
+
var boolTag$2 = '[object Boolean]',
|
|
7815
7879
|
dateTag$1 = '[object Date]',
|
|
7816
7880
|
errorTag$1 = '[object Error]',
|
|
7817
7881
|
mapTag$3 = '[object Map]',
|
|
@@ -7862,7 +7926,7 @@ function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
|
|
|
7862
7926
|
}
|
|
7863
7927
|
return true;
|
|
7864
7928
|
|
|
7865
|
-
case boolTag$
|
|
7929
|
+
case boolTag$2:
|
|
7866
7930
|
case dateTag$1:
|
|
7867
7931
|
case numberTag$1:
|
|
7868
7932
|
// Coerce booleans to `1` or `0` and dates to milliseconds.
|
|
@@ -8176,9 +8240,9 @@ function stubFalse() {
|
|
|
8176
8240
|
|
|
8177
8241
|
var stubFalse_1 = stubFalse;
|
|
8178
8242
|
|
|
8179
|
-
var isBuffer_1 = createCommonjsModule(function (module, exports) {
|
|
8243
|
+
var isBuffer_1 = createCommonjsModule(function (module, exports$1) {
|
|
8180
8244
|
/** Detect free variable `exports`. */
|
|
8181
|
-
var freeExports = exports && !exports.nodeType && exports;
|
|
8245
|
+
var freeExports = exports$1 && !exports$1.nodeType && exports$1;
|
|
8182
8246
|
|
|
8183
8247
|
/** Detect free variable `module`. */
|
|
8184
8248
|
var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
|
|
@@ -8279,7 +8343,7 @@ var isLength_1 = isLength;
|
|
|
8279
8343
|
/** `Object#toString` result references. */
|
|
8280
8344
|
var argsTag$1 = '[object Arguments]',
|
|
8281
8345
|
arrayTag$1 = '[object Array]',
|
|
8282
|
-
boolTag = '[object Boolean]',
|
|
8346
|
+
boolTag$1 = '[object Boolean]',
|
|
8283
8347
|
dateTag = '[object Date]',
|
|
8284
8348
|
errorTag = '[object Error]',
|
|
8285
8349
|
funcTag = '[object Function]',
|
|
@@ -8311,7 +8375,7 @@ typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
|
|
|
8311
8375
|
typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
|
|
8312
8376
|
typedArrayTags[uint32Tag] = true;
|
|
8313
8377
|
typedArrayTags[argsTag$1] = typedArrayTags[arrayTag$1] =
|
|
8314
|
-
typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
|
|
8378
|
+
typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag$1] =
|
|
8315
8379
|
typedArrayTags[dataViewTag$1] = typedArrayTags[dateTag] =
|
|
8316
8380
|
typedArrayTags[errorTag] = typedArrayTags[funcTag] =
|
|
8317
8381
|
typedArrayTags[mapTag$2] = typedArrayTags[numberTag] =
|
|
@@ -8348,9 +8412,9 @@ function baseUnary(func) {
|
|
|
8348
8412
|
|
|
8349
8413
|
var _baseUnary = baseUnary;
|
|
8350
8414
|
|
|
8351
|
-
var _nodeUtil = createCommonjsModule(function (module, exports) {
|
|
8415
|
+
var _nodeUtil = createCommonjsModule(function (module, exports$1) {
|
|
8352
8416
|
/** Detect free variable `exports`. */
|
|
8353
|
-
var freeExports = exports && !exports.nodeType && exports;
|
|
8417
|
+
var freeExports = exports$1 && !exports$1.nodeType && exports$1;
|
|
8354
8418
|
|
|
8355
8419
|
/** Detect free variable `module`. */
|
|
8356
8420
|
var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
|
|
@@ -8930,7 +8994,7 @@ var hasOwnProperty$1 = objectProto.hasOwnProperty;
|
|
|
8930
8994
|
* _.isEmpty({ 'a': 1 });
|
|
8931
8995
|
* // => false
|
|
8932
8996
|
*/
|
|
8933
|
-
function isEmpty(value) {
|
|
8997
|
+
function isEmpty$1(value) {
|
|
8934
8998
|
if (value == null) {
|
|
8935
8999
|
return true;
|
|
8936
9000
|
}
|
|
@@ -8954,7 +9018,7 @@ function isEmpty(value) {
|
|
|
8954
9018
|
return true;
|
|
8955
9019
|
}
|
|
8956
9020
|
|
|
8957
|
-
var isEmpty_1 = isEmpty;
|
|
9021
|
+
var isEmpty_1 = isEmpty$1;
|
|
8958
9022
|
|
|
8959
9023
|
var UIPassthroughEvent;
|
|
8960
9024
|
(function (UIPassthroughEvent) {
|
|
@@ -8965,6 +9029,8 @@ var UIPassthroughEvent;
|
|
|
8965
9029
|
UIPassthroughEvent["GetAnswerConfig"] = "getAnswerPageConfig";
|
|
8966
9030
|
UIPassthroughEvent["GetLiveboardConfig"] = "getPinboardPageConfig";
|
|
8967
9031
|
UIPassthroughEvent["GetUnsavedAnswerTML"] = "getUnsavedAnswerTML";
|
|
9032
|
+
UIPassthroughEvent["UpdateFilters"] = "updateFilters";
|
|
9033
|
+
UIPassthroughEvent["Drilldown"] = "drillDown";
|
|
8968
9034
|
UIPassthroughEvent["GetAnswerSession"] = "getAnswerSession";
|
|
8969
9035
|
UIPassthroughEvent["GetFilters"] = "getFilters";
|
|
8970
9036
|
UIPassthroughEvent["GetIframeUrl"] = "getIframeUrl";
|
|
@@ -9903,7 +9969,7 @@ class AnswerService {
|
|
|
9903
9969
|
async getTML() {
|
|
9904
9970
|
const { object } = await this.executeQuery(getAnswerTML, {});
|
|
9905
9971
|
const edoc = object[0].edoc;
|
|
9906
|
-
const YAML = await import('./index-
|
|
9972
|
+
const YAML = await import('./index-Bm2Hck8q.js');
|
|
9907
9973
|
const parsedDoc = YAML.parse(edoc);
|
|
9908
9974
|
return {
|
|
9909
9975
|
answer: {
|
|
@@ -10249,9 +10315,6 @@ var stringToPath = _memoizeCapped(function(string) {
|
|
|
10249
10315
|
|
|
10250
10316
|
var _stringToPath = stringToPath;
|
|
10251
10317
|
|
|
10252
|
-
/** Used as references for various `Number` constants. */
|
|
10253
|
-
var INFINITY$1 = 1 / 0;
|
|
10254
|
-
|
|
10255
10318
|
/** Used to convert symbols to primitives and strings. */
|
|
10256
10319
|
var symbolProto = _Symbol ? _Symbol.prototype : undefined,
|
|
10257
10320
|
symbolToString = symbolProto ? symbolProto.toString : undefined;
|
|
@@ -10277,7 +10340,7 @@ function baseToString(value) {
|
|
|
10277
10340
|
return symbolToString ? symbolToString.call(value) : '';
|
|
10278
10341
|
}
|
|
10279
10342
|
var result = (value + '');
|
|
10280
|
-
return (result == '0' && (1 / value) == -
|
|
10343
|
+
return (result == '0' && (1 / value) == -Infinity) ? '-0' : result;
|
|
10281
10344
|
}
|
|
10282
10345
|
|
|
10283
10346
|
var _baseToString = baseToString;
|
|
@@ -10326,9 +10389,6 @@ function castPath(value, object) {
|
|
|
10326
10389
|
|
|
10327
10390
|
var _castPath = castPath;
|
|
10328
10391
|
|
|
10329
|
-
/** Used as references for various `Number` constants. */
|
|
10330
|
-
var INFINITY = 1 / 0;
|
|
10331
|
-
|
|
10332
10392
|
/**
|
|
10333
10393
|
* Converts `value` to a string key if it's not a string or symbol.
|
|
10334
10394
|
*
|
|
@@ -10341,7 +10401,7 @@ function toKey(value) {
|
|
|
10341
10401
|
return value;
|
|
10342
10402
|
}
|
|
10343
10403
|
var result = (value + '');
|
|
10344
|
-
return (result == '0' && (1 / value) == -
|
|
10404
|
+
return (result == '0' && (1 / value) == -Infinity) ? '-0' : result;
|
|
10345
10405
|
}
|
|
10346
10406
|
|
|
10347
10407
|
var _toKey = toKey;
|
|
@@ -17653,10 +17713,7 @@ const MIXPANEL_EVENT = {
|
|
|
17653
17713
|
VISUAL_SDK_RENDER_FAILED: 'visual-sdk-render-failed',
|
|
17654
17714
|
VISUAL_SDK_TRIGGER: 'visual-sdk-trigger',
|
|
17655
17715
|
VISUAL_SDK_ON: 'visual-sdk-on',
|
|
17656
|
-
|
|
17657
|
-
VISUAL_SDK_EMBED_CREATE: 'visual-sdk-embed-create',
|
|
17658
|
-
VERCEL_INTEGRATION_COMPLETED: 'vercel-integration-completed',
|
|
17659
|
-
};
|
|
17716
|
+
VISUAL_SDK_EMBED_CREATE: 'visual-sdk-embed-create'};
|
|
17660
17717
|
let isMixpanelInitialized = false;
|
|
17661
17718
|
let eventQueue = [];
|
|
17662
17719
|
/**
|
|
@@ -19206,10 +19263,66 @@ function processEventData(type, eventData, thoughtSpotHost, containerEl) {
|
|
|
19206
19263
|
return eventData;
|
|
19207
19264
|
}
|
|
19208
19265
|
|
|
19209
|
-
var
|
|
19266
|
+
var version$1="1.47.0";var pkgInfo = {version:version$1};
|
|
19267
|
+
|
|
19268
|
+
function isValidUpdateFiltersPayload(payload) {
|
|
19269
|
+
if (!payload)
|
|
19270
|
+
return false;
|
|
19271
|
+
const isValidFilter = (f) => {
|
|
19272
|
+
const hasColumn = typeof f.column === 'string' || typeof f.columnName === 'string';
|
|
19273
|
+
const hasOperator = typeof f.oper === 'string' || typeof f.operator === 'string';
|
|
19274
|
+
const hasValues = Array.isArray(f.values);
|
|
19275
|
+
const validType = !f.type || typeof f.type === 'string';
|
|
19276
|
+
return hasColumn && hasOperator && hasValues && validType;
|
|
19277
|
+
};
|
|
19278
|
+
const hasValidFilter = payload.filter && isValidFilter(payload.filter);
|
|
19279
|
+
const hasValidFilters = Array.isArray(payload.filters) && payload.filters.length > 0 && payload.filters.every(isValidFilter);
|
|
19280
|
+
return !!(hasValidFilter || hasValidFilters);
|
|
19281
|
+
}
|
|
19282
|
+
function isValidDrillDownPayload(payload) {
|
|
19283
|
+
if (!payload)
|
|
19284
|
+
return false;
|
|
19285
|
+
const points = payload.points;
|
|
19286
|
+
if (!points || typeof points !== 'object')
|
|
19287
|
+
return false;
|
|
19288
|
+
const hasClickedPoint = 'clickedPoint' in points && points.clickedPoint != null;
|
|
19289
|
+
const hasSelectedPoints = Array.isArray(points.selectedPoints) && points.selectedPoints.length > 0;
|
|
19290
|
+
return hasClickedPoint || hasSelectedPoints;
|
|
19291
|
+
}
|
|
19292
|
+
function createValidationError(message) {
|
|
19293
|
+
const err = new Error(message);
|
|
19294
|
+
err.isValidationError = true;
|
|
19295
|
+
err.embedErrorDetails = {
|
|
19296
|
+
type: EmbedEvent.Error,
|
|
19297
|
+
data: {
|
|
19298
|
+
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
19299
|
+
message,
|
|
19300
|
+
code: EmbedErrorCodes.HOST_EVENT_VALIDATION,
|
|
19301
|
+
error: message
|
|
19302
|
+
},
|
|
19303
|
+
status: embedEventStatus.END
|
|
19304
|
+
};
|
|
19305
|
+
throw err;
|
|
19306
|
+
}
|
|
19307
|
+
function throwUpdateFiltersValidationError() {
|
|
19308
|
+
createValidationError(ERROR_MESSAGE.UPDATEFILTERS_INVALID_PAYLOAD);
|
|
19309
|
+
}
|
|
19310
|
+
function throwDrillDownValidationError() {
|
|
19311
|
+
createValidationError(ERROR_MESSAGE.DRILLDOWN_INVALID_PAYLOAD);
|
|
19312
|
+
}
|
|
19210
19313
|
|
|
19211
|
-
/**
|
|
19212
|
-
|
|
19314
|
+
/**
|
|
19315
|
+
* Maps HostEvent to its corresponding UIPassthroughEvent.
|
|
19316
|
+
* Includes both custom-handler events (Pin, SaveAnswer, UpdateFilters, DrillDown)
|
|
19317
|
+
* and getter events (GetAnswerSession, GetFilters, etc.) that use getDataWithPassthroughFallback.
|
|
19318
|
+
*/
|
|
19319
|
+
const PASSTHROUGH_MAP = {
|
|
19320
|
+
// Custom handlers (setters with special logic)
|
|
19321
|
+
[HostEvent.Pin]: UIPassthroughEvent.PinAnswerToLiveboard,
|
|
19322
|
+
[HostEvent.SaveAnswer]: UIPassthroughEvent.SaveAnswer,
|
|
19323
|
+
[HostEvent.UpdateFilters]: UIPassthroughEvent.UpdateFilters,
|
|
19324
|
+
[HostEvent.DrillDown]: UIPassthroughEvent.Drilldown,
|
|
19325
|
+
// Getters (use getDataWithPassthroughFallback)
|
|
19213
19326
|
[HostEvent.GetAnswerSession]: UIPassthroughEvent.GetAnswerSession,
|
|
19214
19327
|
[HostEvent.GetFilters]: UIPassthroughEvent.GetFilters,
|
|
19215
19328
|
[HostEvent.GetIframeUrl]: UIPassthroughEvent.GetIframeUrl,
|
|
@@ -19220,10 +19333,14 @@ const HOST_EVENT_PASSTHROUGH_MAP = {
|
|
|
19220
19333
|
};
|
|
19221
19334
|
class HostEventClient {
|
|
19222
19335
|
constructor(iFrame) {
|
|
19336
|
+
/** Cached list of available UI passthrough keys from the embedded app */
|
|
19337
|
+
this.availablePassthroughKeysCache = null;
|
|
19223
19338
|
this.iFrame = iFrame;
|
|
19224
19339
|
this.customHandlers = {
|
|
19225
19340
|
[HostEvent.Pin]: (p, c) => this.handlePinEvent(p, c),
|
|
19226
19341
|
[HostEvent.SaveAnswer]: (p, c) => this.handleSaveAnswerEvent(p, c),
|
|
19342
|
+
[HostEvent.UpdateFilters]: (p, c) => this.handleUpdateFiltersEvent(p, c),
|
|
19343
|
+
[HostEvent.DrillDown]: (p, c) => this.handleDrillDownEvent(p, c),
|
|
19227
19344
|
};
|
|
19228
19345
|
}
|
|
19229
19346
|
/**
|
|
@@ -19286,6 +19403,26 @@ class HostEventClient {
|
|
|
19286
19403
|
setIframeElement(iFrame) {
|
|
19287
19404
|
this.iFrame = iFrame;
|
|
19288
19405
|
}
|
|
19406
|
+
/**
|
|
19407
|
+
* Fetches the list of available UI passthrough keys from the embedded app.
|
|
19408
|
+
* Result is cached for the session. Returns empty array on failure.
|
|
19409
|
+
*/
|
|
19410
|
+
async getAvailableUIPassthroughKeys(context) {
|
|
19411
|
+
var _a, _b;
|
|
19412
|
+
if (this.availablePassthroughKeysCache !== null) {
|
|
19413
|
+
return this.availablePassthroughKeysCache;
|
|
19414
|
+
}
|
|
19415
|
+
try {
|
|
19416
|
+
const response = await this.triggerUIPassthroughApi(UIPassthroughEvent.GetAvailableUIPassthroughs, {}, context);
|
|
19417
|
+
const matched = (_a = response === null || response === void 0 ? void 0 : response.find) === null || _a === void 0 ? void 0 : _a.call(response, (r) => r.value && !r.error);
|
|
19418
|
+
const keys = (_b = matched === null || matched === void 0 ? void 0 : matched.value) === null || _b === void 0 ? void 0 : _b.keys;
|
|
19419
|
+
this.availablePassthroughKeysCache = Array.isArray(keys) ? keys : [];
|
|
19420
|
+
return this.availablePassthroughKeysCache;
|
|
19421
|
+
}
|
|
19422
|
+
catch {
|
|
19423
|
+
return [];
|
|
19424
|
+
}
|
|
19425
|
+
}
|
|
19289
19426
|
async triggerUIPassthroughApi(apiName, parameters, context) {
|
|
19290
19427
|
const res = await this.processTrigger(HostEvent.UIPassthrough, {
|
|
19291
19428
|
type: apiName,
|
|
@@ -19321,16 +19458,41 @@ class HostEventClient {
|
|
|
19321
19458
|
answerId: (_d = (_c = (_b = (_a = data === null || data === void 0 ? void 0 : data.saveResponse) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.Answer__save) === null || _c === void 0 ? void 0 : _c.answer) === null || _d === void 0 ? void 0 : _d.id,
|
|
19322
19459
|
};
|
|
19323
19460
|
}
|
|
19461
|
+
handleUpdateFiltersEvent(payload, context) {
|
|
19462
|
+
if (!isValidUpdateFiltersPayload(payload)) {
|
|
19463
|
+
throwUpdateFiltersValidationError();
|
|
19464
|
+
}
|
|
19465
|
+
return this.handleHostEventWithParam(UIPassthroughEvent.UpdateFilters, payload, context);
|
|
19466
|
+
}
|
|
19467
|
+
handleDrillDownEvent(payload, context) {
|
|
19468
|
+
if (!isValidDrillDownPayload(payload)) {
|
|
19469
|
+
throwDrillDownValidationError();
|
|
19470
|
+
}
|
|
19471
|
+
return this.handleHostEventWithParam(UIPassthroughEvent.Drilldown, payload, context);
|
|
19472
|
+
}
|
|
19473
|
+
/**
|
|
19474
|
+
* Dispatches a host event using the appropriate channel:
|
|
19475
|
+
* 1. If the embedded app supports UI passthrough for this event, use it (custom handler or getter).
|
|
19476
|
+
* 2. Otherwise fall back to the legacy host event channel.
|
|
19477
|
+
*
|
|
19478
|
+
* @param hostEvent - The host event to trigger
|
|
19479
|
+
* @param payload - Optional payload for the event
|
|
19480
|
+
* @param context - Optional context (e.g. vizId) for scoped operations
|
|
19481
|
+
*/
|
|
19324
19482
|
async triggerHostEvent(hostEvent, payload, context) {
|
|
19325
19483
|
const customHandler = this.customHandlers[hostEvent];
|
|
19326
|
-
|
|
19327
|
-
|
|
19328
|
-
|
|
19329
|
-
|
|
19330
|
-
|
|
19331
|
-
return this.getDataWithPassthroughFallback(passthroughEvent, hostEvent, payload, context);
|
|
19484
|
+
const passthroughEvent = PASSTHROUGH_MAP[hostEvent];
|
|
19485
|
+
// If embedded app supports passthrough but not this event, use legacy channel
|
|
19486
|
+
const keys = passthroughEvent ? await this.getAvailableUIPassthroughKeys(context) : [];
|
|
19487
|
+
if (passthroughEvent && keys.length > 0 && !keys.includes(passthroughEvent)) {
|
|
19488
|
+
return this.hostEventFallback(hostEvent, payload, context);
|
|
19332
19489
|
}
|
|
19333
|
-
|
|
19490
|
+
// Custom handler (setters) > getter passthrough > legacy fallback
|
|
19491
|
+
return (customHandler
|
|
19492
|
+
? customHandler(payload, context)
|
|
19493
|
+
: passthroughEvent
|
|
19494
|
+
? this.getDataWithPassthroughFallback(passthroughEvent, hostEvent, payload, context)
|
|
19495
|
+
: this.hostEventFallback(hostEvent, payload, context));
|
|
19334
19496
|
}
|
|
19335
19497
|
}
|
|
19336
19498
|
|
|
@@ -20664,7 +20826,19 @@ class TsEmbed {
|
|
|
20664
20826
|
return null;
|
|
20665
20827
|
}
|
|
20666
20828
|
// send an empty object, this is needed for liveboard default handlers
|
|
20667
|
-
return this.hostEventClient.triggerHostEvent(messageType, data, context)
|
|
20829
|
+
return this.hostEventClient.triggerHostEvent(messageType, data, context).catch((err) => {
|
|
20830
|
+
var _a;
|
|
20831
|
+
if (err === null || err === void 0 ? void 0 : err.isValidationError) {
|
|
20832
|
+
const errorDetails = (_a = err.embedErrorDetails) !== null && _a !== void 0 ? _a : {
|
|
20833
|
+
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
20834
|
+
message: err.message || ERROR_MESSAGE.UPDATEFILTERS_INVALID_PAYLOAD,
|
|
20835
|
+
code: EmbedErrorCodes.UPDATEFILTERS_INVALID_PAYLOAD,
|
|
20836
|
+
error: err.message,
|
|
20837
|
+
};
|
|
20838
|
+
this.handleError(errorDetails);
|
|
20839
|
+
}
|
|
20840
|
+
throw err;
|
|
20841
|
+
});
|
|
20668
20842
|
}
|
|
20669
20843
|
/**
|
|
20670
20844
|
* Triggers an event to the embedded app, skipping the UI flow.
|
|
@@ -20787,6 +20961,9 @@ class TsEmbed {
|
|
|
20787
20961
|
try {
|
|
20788
20962
|
this.removeFullscreenChangeHandler();
|
|
20789
20963
|
this.unsubscribeToEvents();
|
|
20964
|
+
if (!this.isRendered) {
|
|
20965
|
+
return;
|
|
20966
|
+
}
|
|
20790
20967
|
if (!getEmbedConfig().waitForCleanupOnDestroy) {
|
|
20791
20968
|
this.trigger(HostEvent.DestroyEmbed);
|
|
20792
20969
|
(_b = (_a = this.insertedDomEl) === null || _a === void 0 ? void 0 : _a.parentNode) === null || _b === void 0 ? void 0 : _b.removeChild(this.insertedDomEl);
|
|
@@ -20796,11 +20973,16 @@ class TsEmbed {
|
|
|
20796
20973
|
Promise.race([
|
|
20797
20974
|
this.trigger(HostEvent.DestroyEmbed),
|
|
20798
20975
|
new Promise((resolve) => setTimeout(resolve, cleanupTimeout)),
|
|
20799
|
-
]).
|
|
20800
|
-
var _a, _b;
|
|
20801
|
-
(_b = (_a = this.insertedDomEl) === null || _a === void 0 ? void 0 : _a.parentNode) === null || _b === void 0 ? void 0 : _b.removeChild(this.insertedDomEl);
|
|
20802
|
-
}).catch((e) => {
|
|
20976
|
+
]).catch((e) => {
|
|
20803
20977
|
logger$3.log('Error destroying TS Embed', e);
|
|
20978
|
+
}).finally(() => {
|
|
20979
|
+
var _a, _b;
|
|
20980
|
+
try {
|
|
20981
|
+
(_b = (_a = this.insertedDomEl) === null || _a === void 0 ? void 0 : _a.parentNode) === null || _b === void 0 ? void 0 : _b.removeChild(this.insertedDomEl);
|
|
20982
|
+
}
|
|
20983
|
+
catch (e) {
|
|
20984
|
+
logger$3.log('Error removing DOM element on destroy', e);
|
|
20985
|
+
}
|
|
20804
20986
|
});
|
|
20805
20987
|
}
|
|
20806
20988
|
}
|
|
@@ -21141,87 +21323,6 @@ let SearchBarEmbed$1 = class SearchBarEmbed extends TsEmbed {
|
|
|
21141
21323
|
}
|
|
21142
21324
|
};
|
|
21143
21325
|
|
|
21144
|
-
/**
|
|
21145
|
-
* Copyright (c) 2023
|
|
21146
|
-
*
|
|
21147
|
-
* Embed ThoughtSpot Sage
|
|
21148
|
-
* @summary TS Sage embed
|
|
21149
|
-
* @author Mourya Balabhadra <mourya.balabhadra@thoughtspot.com>
|
|
21150
|
-
*/
|
|
21151
|
-
/**
|
|
21152
|
-
* Embed ThoughtSpot LLM and GPT-based Natural Language Search component.
|
|
21153
|
-
* @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl, 9.5.1-sw
|
|
21154
|
-
*
|
|
21155
|
-
* Note: This embed will be deprecated from SDK: 1.40.0 | ThoughtSpot: 10.13.0.cl
|
|
21156
|
-
* @group Embed components
|
|
21157
|
-
*/
|
|
21158
|
-
let SageEmbed$1 = class SageEmbed extends V1Embed {
|
|
21159
|
-
constructor(domSelector, viewConfig) {
|
|
21160
|
-
viewConfig.embedComponentType = 'SageEmbed';
|
|
21161
|
-
super(domSelector, viewConfig);
|
|
21162
|
-
}
|
|
21163
|
-
getEmbedParamsObject() {
|
|
21164
|
-
const { disableWorksheetChange, hideWorksheetSelector, showObjectSuggestions, dataPanelV2, hideSampleQuestions, isProductTour, hideSageAnswerHeader, hideAutocompleteSuggestions, } = this.viewConfig;
|
|
21165
|
-
const params = this.getBaseQueryParams();
|
|
21166
|
-
params[Param.DataPanelV2Enabled] = !!dataPanelV2;
|
|
21167
|
-
params[Param.IsSageEmbed] = true;
|
|
21168
|
-
params[Param.DisableWorksheetChange] = !!disableWorksheetChange;
|
|
21169
|
-
params[Param.HideWorksheetSelector] = !!hideWorksheetSelector;
|
|
21170
|
-
params[Param.HideEurekaSuggestions] = !!hideAutocompleteSuggestions;
|
|
21171
|
-
if (showObjectSuggestions) {
|
|
21172
|
-
params[Param.HideEurekaSuggestions] = !showObjectSuggestions;
|
|
21173
|
-
// support backwards compatibility
|
|
21174
|
-
}
|
|
21175
|
-
params[Param.HideSampleQuestions] = !!hideSampleQuestions;
|
|
21176
|
-
params[Param.IsProductTour] = !!isProductTour;
|
|
21177
|
-
params[Param.HideSageAnswerHeader] = !!hideSageAnswerHeader;
|
|
21178
|
-
return params;
|
|
21179
|
-
}
|
|
21180
|
-
/**
|
|
21181
|
-
* Constructs a map of parameters to be passed on to the
|
|
21182
|
-
* embedded Eureka or Sage search page.
|
|
21183
|
-
* @returns {string} query string
|
|
21184
|
-
*/
|
|
21185
|
-
getEmbedParams() {
|
|
21186
|
-
const params = this.getEmbedParamsObject();
|
|
21187
|
-
return getQueryParamString(params, true);
|
|
21188
|
-
}
|
|
21189
|
-
/**
|
|
21190
|
-
* Construct the URL of the embedded ThoughtSpot sage to be
|
|
21191
|
-
* loaded in the iframe
|
|
21192
|
-
* @returns {string} iframe url
|
|
21193
|
-
*/
|
|
21194
|
-
getIFrameSrc() {
|
|
21195
|
-
const path = 'eureka';
|
|
21196
|
-
const postHashObj = {};
|
|
21197
|
-
const tsPostHashParams = this.getThoughtSpotPostUrlParams();
|
|
21198
|
-
const { dataSource, searchOptions, } = this.viewConfig;
|
|
21199
|
-
if (dataSource)
|
|
21200
|
-
postHashObj[Param.WorksheetId] = dataSource;
|
|
21201
|
-
if ((searchOptions === null || searchOptions === void 0 ? void 0 : searchOptions.searchQuery) && searchOptions.executeSearch) {
|
|
21202
|
-
postHashObj[Param.executeSearch] = true;
|
|
21203
|
-
}
|
|
21204
|
-
let sagePostHashParams = new URLSearchParams(postHashObj).toString();
|
|
21205
|
-
if (sagePostHashParams)
|
|
21206
|
-
sagePostHashParams = `${tsPostHashParams ? '&' : '?'}${sagePostHashParams}`;
|
|
21207
|
-
if (searchOptions === null || searchOptions === void 0 ? void 0 : searchOptions.searchQuery)
|
|
21208
|
-
sagePostHashParams += `${sagePostHashParams ? '&' : '?'}${[Param.Query]}=${encodeURIComponent(searchOptions.searchQuery)}`;
|
|
21209
|
-
// use encodeURIComponent for query instead of URLSearchParams
|
|
21210
|
-
// as it adds + instead of %20 for spaces
|
|
21211
|
-
return `${this.getRootIframeSrc()}/embed/${path}${tsPostHashParams}${sagePostHashParams}`;
|
|
21212
|
-
}
|
|
21213
|
-
/**
|
|
21214
|
-
* Render the embedded ThoughtSpot Sage
|
|
21215
|
-
* @returns {SageEmbed} Eureka/Sage embed
|
|
21216
|
-
*/
|
|
21217
|
-
async render() {
|
|
21218
|
-
await super.render();
|
|
21219
|
-
const src = this.getIFrameSrc();
|
|
21220
|
-
await this.renderV1Embed(src);
|
|
21221
|
-
return this;
|
|
21222
|
-
}
|
|
21223
|
-
};
|
|
21224
|
-
|
|
21225
21326
|
/**
|
|
21226
21327
|
* Copyright (c) 2022
|
|
21227
21328
|
*
|
|
@@ -21393,7 +21494,7 @@ let SearchEmbed$1 = class SearchEmbed extends TsEmbed {
|
|
|
21393
21494
|
*/
|
|
21394
21495
|
async render() {
|
|
21395
21496
|
await super.render();
|
|
21396
|
-
this.viewConfig;
|
|
21497
|
+
const { answerId } = this.viewConfig;
|
|
21397
21498
|
const src = this.getIFrameSrc();
|
|
21398
21499
|
await this.renderIFrame(src);
|
|
21399
21500
|
getAuthPromise().then(() => {
|
|
@@ -21406,6 +21507,50 @@ let SearchEmbed$1 = class SearchEmbed extends TsEmbed {
|
|
|
21406
21507
|
}
|
|
21407
21508
|
};
|
|
21408
21509
|
|
|
21510
|
+
/**
|
|
21511
|
+
* Resolves enablePastConversationsSidebar with
|
|
21512
|
+
* spotterSidebarConfig taking precedence over the
|
|
21513
|
+
* standalone flag.
|
|
21514
|
+
*/
|
|
21515
|
+
const resolveEnablePastConversationsSidebar = (params) => (params.spotterSidebarConfigValue !== undefined
|
|
21516
|
+
? params.spotterSidebarConfigValue
|
|
21517
|
+
: params.standaloneValue);
|
|
21518
|
+
function buildSpotterSidebarAppInitData(defaultAppInitData, viewConfig, handleError) {
|
|
21519
|
+
const { spotterSidebarConfig, enablePastConversationsSidebar } = viewConfig;
|
|
21520
|
+
const resolvedEnablePastConversations = resolveEnablePastConversationsSidebar({
|
|
21521
|
+
spotterSidebarConfigValue: spotterSidebarConfig === null || spotterSidebarConfig === void 0 ? void 0 : spotterSidebarConfig.enablePastConversationsSidebar,
|
|
21522
|
+
standaloneValue: enablePastConversationsSidebar,
|
|
21523
|
+
});
|
|
21524
|
+
const hasConfig = spotterSidebarConfig || resolvedEnablePastConversations !== undefined;
|
|
21525
|
+
if (!hasConfig)
|
|
21526
|
+
return defaultAppInitData;
|
|
21527
|
+
const resolvedSidebarConfig = {
|
|
21528
|
+
...spotterSidebarConfig,
|
|
21529
|
+
...(resolvedEnablePastConversations !== undefined && {
|
|
21530
|
+
enablePastConversationsSidebar: resolvedEnablePastConversations,
|
|
21531
|
+
}),
|
|
21532
|
+
};
|
|
21533
|
+
if (resolvedSidebarConfig.spotterDocumentationUrl !== undefined) {
|
|
21534
|
+
const [isValid, validationError] = validateHttpUrl(resolvedSidebarConfig.spotterDocumentationUrl);
|
|
21535
|
+
if (!isValid) {
|
|
21536
|
+
handleError({
|
|
21537
|
+
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
21538
|
+
message: ERROR_MESSAGE.INVALID_SPOTTER_DOCUMENTATION_URL,
|
|
21539
|
+
code: EmbedErrorCodes.INVALID_URL,
|
|
21540
|
+
error: (validationError === null || validationError === void 0 ? void 0 : validationError.message) || ERROR_MESSAGE.INVALID_SPOTTER_DOCUMENTATION_URL,
|
|
21541
|
+
});
|
|
21542
|
+
delete resolvedSidebarConfig.spotterDocumentationUrl;
|
|
21543
|
+
}
|
|
21544
|
+
}
|
|
21545
|
+
return {
|
|
21546
|
+
...defaultAppInitData,
|
|
21547
|
+
embedParams: {
|
|
21548
|
+
...(defaultAppInitData.embedParams || {}),
|
|
21549
|
+
spotterSidebarConfig: resolvedSidebarConfig,
|
|
21550
|
+
},
|
|
21551
|
+
};
|
|
21552
|
+
}
|
|
21553
|
+
|
|
21409
21554
|
/**
|
|
21410
21555
|
* Copyright (c) 2022
|
|
21411
21556
|
*
|
|
@@ -21535,7 +21680,10 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
|
|
|
21535
21680
|
this.defaultHeight = 500;
|
|
21536
21681
|
this.sendFullHeightLazyLoadData = () => {
|
|
21537
21682
|
const data = calculateVisibleElementData(this.iFrame);
|
|
21538
|
-
this
|
|
21683
|
+
// this should be fired only if the lazyLoadingForFullHeight and fullHeight are true
|
|
21684
|
+
if (this.viewConfig.lazyLoadingForFullHeight && this.viewConfig.fullHeight) {
|
|
21685
|
+
this.trigger(HostEvent.VisibleEmbedCoordinates, data);
|
|
21686
|
+
}
|
|
21539
21687
|
};
|
|
21540
21688
|
/**
|
|
21541
21689
|
* This is a handler for the RequestVisibleEmbedCoordinates event.
|
|
@@ -21548,22 +21696,13 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
|
|
|
21548
21696
|
const visibleCoordinatesData = calculateVisibleElementData(this.iFrame);
|
|
21549
21697
|
responder({ type: EmbedEvent.RequestVisibleEmbedCoordinates, data: visibleCoordinatesData });
|
|
21550
21698
|
};
|
|
21551
|
-
this.HEIGHT_CHANAGE_THRESHOLD = 30;
|
|
21552
21699
|
/**
|
|
21553
21700
|
* Set the iframe height as per the computed height received
|
|
21554
21701
|
* from the ThoughtSpot app.
|
|
21555
21702
|
* @param data The event payload
|
|
21556
21703
|
*/
|
|
21557
21704
|
this.updateIFrameHeight = (data) => {
|
|
21558
|
-
|
|
21559
|
-
const currentHeight = this.iFrame.getBoundingClientRect().height;
|
|
21560
|
-
const heightToSet = Math.max(data.data, this.defaultHeight);
|
|
21561
|
-
const heightChange = Math.abs(heightToSet - currentHeight);
|
|
21562
|
-
if (heightChange < this.HEIGHT_CHANAGE_THRESHOLD) {
|
|
21563
|
-
logger$3.info('Height change is less than the threshold, skipping height update', { heightChange, heightToSet, currentHeight });
|
|
21564
|
-
return;
|
|
21565
|
-
}
|
|
21566
|
-
this.setIFrameHeight(heightToSet);
|
|
21705
|
+
this.setIFrameHeight(Math.max(data.data, this.defaultHeight));
|
|
21567
21706
|
this.sendFullHeightLazyLoadData();
|
|
21568
21707
|
};
|
|
21569
21708
|
this.embedIframeCenter = (data, responder) => {
|
|
@@ -21597,12 +21736,28 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
|
|
|
21597
21736
|
this.on(EmbedEvent.RequestVisibleEmbedCoordinates, this.requestVisibleEmbedCoordinatesHandler);
|
|
21598
21737
|
}
|
|
21599
21738
|
}
|
|
21739
|
+
/**
|
|
21740
|
+
* Extends the default APP_INIT payload with `embedParams.spotterSidebarConfig`
|
|
21741
|
+
* so the conv-assist app can read sidebar configuration on initialisation.
|
|
21742
|
+
*
|
|
21743
|
+
* Precedence for `enablePastConversationsSidebar`:
|
|
21744
|
+
* `spotterSidebarConfig.enablePastConversationsSidebar` wins over the
|
|
21745
|
+
* deprecated top-level `enablePastConversationsSidebar` flag; if the former
|
|
21746
|
+
* is absent the latter is used as a fallback.
|
|
21747
|
+
*
|
|
21748
|
+
* An invalid `spotterDocumentationUrl` triggers a validation error and is
|
|
21749
|
+
* excluded from the payload rather than forwarded to the app.
|
|
21750
|
+
*/
|
|
21751
|
+
async getAppInitData() {
|
|
21752
|
+
const defaultAppInitData = await super.getAppInitData();
|
|
21753
|
+
return buildSpotterSidebarAppInitData(defaultAppInitData, this.viewConfig, this.handleError.bind(this));
|
|
21754
|
+
}
|
|
21600
21755
|
/**
|
|
21601
21756
|
* Constructs a map of parameters to be passed on to the
|
|
21602
21757
|
* embedded Liveboard or visualization.
|
|
21603
21758
|
*/
|
|
21604
21759
|
getEmbedParams() {
|
|
21605
|
-
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 = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, isEnhancedFilterInteractivityEnabled = false, homePageSearchBarMode,
|
|
21760
|
+
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 = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, isEnhancedFilterInteractivityEnabled = false, homePageSearchBarMode, enablePendoHelp = true, discoveryExperience, coverAndFilterOptionInPDF = false, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, isLiveboardXLSXCSVDownloadEnabled = false, isGranularXLSXCSVSchedulesEnabled = false, isCentralizedLiveboardFilterUXEnabled = false, isLinkParametersEnabled, updatedSpotterChatPrompt, spotterChatConfig, minimumHeight, isThisPeriodInDateFiltersEnabled, enableHomepageAnnouncement = false, isContinuousLiveboardPDFEnabled, } = this.viewConfig;
|
|
21606
21761
|
let params = {};
|
|
21607
21762
|
params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
|
|
21608
21763
|
params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
|
|
@@ -21620,45 +21775,11 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
|
|
|
21620
21775
|
params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;
|
|
21621
21776
|
params[Param.ShowLiveboardReverifyBanner] = showLiveboardReverifyBanner;
|
|
21622
21777
|
params[Param.HideIrrelevantFiltersInTab] = hideIrrelevantChipsInLiveboardTabs;
|
|
21623
|
-
params[Param.IsUnifiedSearchExperienceEnabled] = isUnifiedSearchExperienceEnabled;
|
|
21624
21778
|
params[Param.CoverAndFilterOptionInPDF] = !!coverAndFilterOptionInPDF;
|
|
21625
21779
|
params = this.getBaseQueryParams(params);
|
|
21626
21780
|
if (!isUndefined(updatedSpotterChatPrompt)) {
|
|
21627
21781
|
params[Param.UpdatedSpotterChatPrompt] = !!updatedSpotterChatPrompt;
|
|
21628
21782
|
}
|
|
21629
|
-
const resolvedEnablePastConversationsSidebar = resolveEnablePastConversationsSidebar({
|
|
21630
|
-
spotterSidebarConfigValue: spotterSidebarConfig === null || spotterSidebarConfig === void 0 ? void 0 : spotterSidebarConfig.enablePastConversationsSidebar,
|
|
21631
|
-
standaloneValue: this.viewConfig.enablePastConversationsSidebar,
|
|
21632
|
-
});
|
|
21633
|
-
setParamIfDefined(params, Param.EnablePastConversationsSidebar, resolvedEnablePastConversationsSidebar, true);
|
|
21634
|
-
// Handle spotterSidebarConfig params
|
|
21635
|
-
if (spotterSidebarConfig) {
|
|
21636
|
-
const { spotterSidebarTitle, spotterSidebarDefaultExpanded, spotterChatRenameLabel, spotterChatDeleteLabel, spotterDeleteConversationModalTitle, spotterPastConversationAlertMessage, spotterDocumentationUrl, spotterBestPracticesLabel, spotterConversationsBatchSize, spotterNewChatButtonTitle, } = spotterSidebarConfig;
|
|
21637
|
-
setParamIfDefined(params, Param.SpotterSidebarDefaultExpanded, spotterSidebarDefaultExpanded, true);
|
|
21638
|
-
setParamIfDefined(params, Param.SpotterSidebarTitle, spotterSidebarTitle);
|
|
21639
|
-
setParamIfDefined(params, Param.SpotterChatRenameLabel, spotterChatRenameLabel);
|
|
21640
|
-
setParamIfDefined(params, Param.SpotterChatDeleteLabel, spotterChatDeleteLabel);
|
|
21641
|
-
setParamIfDefined(params, Param.SpotterDeleteConversationModalTitle, spotterDeleteConversationModalTitle);
|
|
21642
|
-
setParamIfDefined(params, Param.SpotterPastConversationAlertMessage, spotterPastConversationAlertMessage);
|
|
21643
|
-
setParamIfDefined(params, Param.SpotterBestPracticesLabel, spotterBestPracticesLabel);
|
|
21644
|
-
setParamIfDefined(params, Param.SpotterConversationsBatchSize, spotterConversationsBatchSize);
|
|
21645
|
-
setParamIfDefined(params, Param.SpotterNewChatButtonTitle, spotterNewChatButtonTitle);
|
|
21646
|
-
// URL param with validation
|
|
21647
|
-
if (spotterDocumentationUrl !== undefined) {
|
|
21648
|
-
const [isValid, validationError] = validateHttpUrl(spotterDocumentationUrl);
|
|
21649
|
-
if (isValid) {
|
|
21650
|
-
params[Param.SpotterDocumentationUrl] = spotterDocumentationUrl;
|
|
21651
|
-
}
|
|
21652
|
-
else {
|
|
21653
|
-
this.handleError({
|
|
21654
|
-
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
21655
|
-
message: ERROR_MESSAGE.INVALID_SPOTTER_DOCUMENTATION_URL,
|
|
21656
|
-
code: EmbedErrorCodes.INVALID_URL,
|
|
21657
|
-
error: (validationError === null || validationError === void 0 ? void 0 : validationError.message) || ERROR_MESSAGE.INVALID_SPOTTER_DOCUMENTATION_URL,
|
|
21658
|
-
});
|
|
21659
|
-
}
|
|
21660
|
-
}
|
|
21661
|
-
}
|
|
21662
21783
|
// Handle spotterChatConfig params
|
|
21663
21784
|
if (spotterChatConfig) {
|
|
21664
21785
|
const { hideToolResponseCardBranding, toolResponseCardBrandingLabel, } = spotterChatConfig;
|
|
@@ -21734,6 +21855,9 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
|
|
|
21734
21855
|
if (enableHomepageAnnouncement !== undefined) {
|
|
21735
21856
|
params[Param.EnableHomepageAnnouncement] = enableHomepageAnnouncement;
|
|
21736
21857
|
}
|
|
21858
|
+
if (isContinuousLiveboardPDFEnabled !== undefined) {
|
|
21859
|
+
params[Param.IsWYSIWYGLiveboardPDFEnabled] = isContinuousLiveboardPDFEnabled;
|
|
21860
|
+
}
|
|
21737
21861
|
this.defaultHeight = minimumHeight || this.defaultHeight;
|
|
21738
21862
|
params[Param.DataPanelV2Enabled] = dataPanelV2;
|
|
21739
21863
|
params[Param.HideHomepageLeftNav] = hideHomepageLeftNav;
|
|
@@ -22009,7 +22133,10 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
|
|
|
22009
22133
|
this.defaultHeight = 500;
|
|
22010
22134
|
this.sendFullHeightLazyLoadData = () => {
|
|
22011
22135
|
const data = calculateVisibleElementData(this.iFrame);
|
|
22012
|
-
this
|
|
22136
|
+
// this should be fired only if the lazyLoadingForFullHeight and fullHeight are true
|
|
22137
|
+
if (this.viewConfig.lazyLoadingForFullHeight && this.viewConfig.fullHeight) {
|
|
22138
|
+
this.trigger(HostEvent.VisibleEmbedCoordinates, data);
|
|
22139
|
+
}
|
|
22013
22140
|
};
|
|
22014
22141
|
/**
|
|
22015
22142
|
* This is a handler for the RequestVisibleEmbedCoordinates event.
|
|
@@ -22022,21 +22149,13 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
|
|
|
22022
22149
|
const visibleCoordinatesData = calculateVisibleElementData(this.iFrame);
|
|
22023
22150
|
responder({ type: EmbedEvent.RequestVisibleEmbedCoordinates, data: visibleCoordinatesData });
|
|
22024
22151
|
};
|
|
22025
|
-
this.HEIGHT_CHANAGE_THRESHOLD = 30;
|
|
22026
22152
|
/**
|
|
22027
22153
|
* Set the iframe height as per the computed height received
|
|
22028
22154
|
* from the ThoughtSpot app.
|
|
22029
22155
|
* @param data The event payload
|
|
22030
22156
|
*/
|
|
22031
22157
|
this.updateIFrameHeight = (data) => {
|
|
22032
|
-
|
|
22033
|
-
const heightToSet = Math.max(data.data, this.defaultHeight);
|
|
22034
|
-
const heightChange = Math.abs(heightToSet - currentHeight);
|
|
22035
|
-
if (heightChange < this.HEIGHT_CHANAGE_THRESHOLD) {
|
|
22036
|
-
logger$3.info('Height change is less than the threshold, skipping height update', { heightChange, heightToSet, currentHeight });
|
|
22037
|
-
return;
|
|
22038
|
-
}
|
|
22039
|
-
this.setIFrameHeight(heightToSet);
|
|
22158
|
+
this.setIFrameHeight(Math.max(data.data, this.defaultHeight));
|
|
22040
22159
|
this.sendFullHeightLazyLoadData();
|
|
22041
22160
|
};
|
|
22042
22161
|
this.embedIframeCenter = (data, responder) => {
|
|
@@ -22097,7 +22216,7 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
|
|
|
22097
22216
|
getEmbedParamsObject() {
|
|
22098
22217
|
let params = {};
|
|
22099
22218
|
params = this.getBaseQueryParams(params);
|
|
22100
|
-
const { enableVizTransformations, fullHeight, defaultHeight, minimumHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, showMaskedFilterChip = false, isLiveboardMasterpiecesEnabled = false, isEnhancedFilterInteractivityEnabled = false, enableAskSage, enable2ColumnLayout, dataPanelV2 = true, enableCustomColumnGroups = false, oAuthPollingInterval, isForceRedirect, dataSourceId, coverAndFilterOptionInPDF = false, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, isLiveboardXLSXCSVDownloadEnabled = false, isGranularXLSXCSVSchedulesEnabled = false, showSpotterLimitations, isCentralizedLiveboardFilterUXEnabled = false, isLinkParametersEnabled, updatedSpotterChatPrompt, spotterChatConfig, isThisPeriodInDateFiltersEnabled, } = this.viewConfig;
|
|
22219
|
+
const { enableVizTransformations, fullHeight, defaultHeight, minimumHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, showMaskedFilterChip = false, isLiveboardMasterpiecesEnabled = false, isEnhancedFilterInteractivityEnabled = false, enableAskSage, enable2ColumnLayout, dataPanelV2 = true, enableCustomColumnGroups = false, oAuthPollingInterval, isForceRedirect, dataSourceId, coverAndFilterOptionInPDF = false, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, isLiveboardXLSXCSVDownloadEnabled = false, isGranularXLSXCSVSchedulesEnabled = false, showSpotterLimitations, isCentralizedLiveboardFilterUXEnabled = false, isLinkParametersEnabled, updatedSpotterChatPrompt, spotterChatConfig, isThisPeriodInDateFiltersEnabled, isContinuousLiveboardPDFEnabled, } = this.viewConfig;
|
|
22101
22220
|
const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
|
|
22102
22221
|
|| this.viewConfig.preventPinboardFilterRemoval;
|
|
22103
22222
|
if (fullHeight === true) {
|
|
@@ -22186,6 +22305,9 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
|
|
|
22186
22305
|
if (isThisPeriodInDateFiltersEnabled !== undefined) {
|
|
22187
22306
|
params[Param.IsThisPeriodInDateFiltersEnabled] = isThisPeriodInDateFiltersEnabled;
|
|
22188
22307
|
}
|
|
22308
|
+
if (isContinuousLiveboardPDFEnabled !== undefined) {
|
|
22309
|
+
params[Param.IsWYSIWYGLiveboardPDFEnabled] = isContinuousLiveboardPDFEnabled;
|
|
22310
|
+
}
|
|
22189
22311
|
params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
|
|
22190
22312
|
params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
|
|
22191
22313
|
params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;
|
|
@@ -22933,14 +23055,24 @@ let SpotterEmbed$1 = class SpotterEmbed extends TsEmbed {
|
|
|
22933
23055
|
super(container, viewConfig);
|
|
22934
23056
|
this.viewConfig = viewConfig;
|
|
22935
23057
|
}
|
|
23058
|
+
/**
|
|
23059
|
+
* Extends the default APP_INIT payload with `embedParams.spotterSidebarConfig`
|
|
23060
|
+
* so the conv-assist app can read sidebar configuration on initialisation.
|
|
23061
|
+
*
|
|
23062
|
+
* Precedence for `enablePastConversationsSidebar`:
|
|
23063
|
+
* `spotterSidebarConfig.enablePastConversationsSidebar` wins over the
|
|
23064
|
+
* deprecated top-level `enablePastConversationsSidebar` flag; if the former
|
|
23065
|
+
* is absent the latter is used as a fallback.
|
|
23066
|
+
*
|
|
23067
|
+
* An invalid `spotterDocumentationUrl` triggers a validation error and is
|
|
23068
|
+
* excluded from the payload rather than forwarded to the app.
|
|
23069
|
+
*/
|
|
23070
|
+
async getAppInitData() {
|
|
23071
|
+
const defaultAppInitData = await super.getAppInitData();
|
|
23072
|
+
return buildSpotterSidebarAppInitData(defaultAppInitData, this.viewConfig, this.handleError.bind(this));
|
|
23073
|
+
}
|
|
22936
23074
|
getEmbedParamsObject() {
|
|
22937
|
-
const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, updatedSpotterChatPrompt,
|
|
22938
|
-
// Extract sidebar config properties
|
|
22939
|
-
const { enablePastConversationsSidebar: sidebarEnablePastConversationsSidebar, spotterSidebarTitle, spotterSidebarDefaultExpanded, spotterChatRenameLabel, spotterChatDeleteLabel, spotterDeleteConversationModalTitle, spotterPastConversationAlertMessage, spotterDocumentationUrl, spotterBestPracticesLabel, spotterConversationsBatchSize, spotterNewChatButtonTitle, } = spotterSidebarConfig || {};
|
|
22940
|
-
const resolvedEnablePastConversationsSidebar = resolveEnablePastConversationsSidebar({
|
|
22941
|
-
spotterSidebarConfigValue: sidebarEnablePastConversationsSidebar,
|
|
22942
|
-
standaloneValue: this.viewConfig.enablePastConversationsSidebar,
|
|
22943
|
-
});
|
|
23075
|
+
const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, updatedSpotterChatPrompt, spotterChatConfig, } = this.viewConfig;
|
|
22944
23076
|
if (!worksheetId) {
|
|
22945
23077
|
this.handleError({
|
|
22946
23078
|
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
@@ -22958,32 +23090,6 @@ let SpotterEmbed$1 = class SpotterEmbed extends TsEmbed {
|
|
|
22958
23090
|
setParamIfDefined(queryParams, Param.ShowSpotterLimitations, showSpotterLimitations, true);
|
|
22959
23091
|
setParamIfDefined(queryParams, Param.HideSampleQuestions, hideSampleQuestions, true);
|
|
22960
23092
|
setParamIfDefined(queryParams, Param.UpdatedSpotterChatPrompt, updatedSpotterChatPrompt, true);
|
|
22961
|
-
setParamIfDefined(queryParams, Param.EnablePastConversationsSidebar, resolvedEnablePastConversationsSidebar, true);
|
|
22962
|
-
setParamIfDefined(queryParams, Param.SpotterSidebarDefaultExpanded, spotterSidebarDefaultExpanded, true);
|
|
22963
|
-
// String params
|
|
22964
|
-
setParamIfDefined(queryParams, Param.SpotterSidebarTitle, spotterSidebarTitle);
|
|
22965
|
-
setParamIfDefined(queryParams, Param.SpotterChatRenameLabel, spotterChatRenameLabel);
|
|
22966
|
-
setParamIfDefined(queryParams, Param.SpotterChatDeleteLabel, spotterChatDeleteLabel);
|
|
22967
|
-
setParamIfDefined(queryParams, Param.SpotterDeleteConversationModalTitle, spotterDeleteConversationModalTitle);
|
|
22968
|
-
setParamIfDefined(queryParams, Param.SpotterPastConversationAlertMessage, spotterPastConversationAlertMessage);
|
|
22969
|
-
setParamIfDefined(queryParams, Param.SpotterBestPracticesLabel, spotterBestPracticesLabel);
|
|
22970
|
-
setParamIfDefined(queryParams, Param.SpotterConversationsBatchSize, spotterConversationsBatchSize);
|
|
22971
|
-
setParamIfDefined(queryParams, Param.SpotterNewChatButtonTitle, spotterNewChatButtonTitle);
|
|
22972
|
-
// URL param with validation
|
|
22973
|
-
if (spotterDocumentationUrl !== undefined) {
|
|
22974
|
-
const [isValid, validationError] = validateHttpUrl(spotterDocumentationUrl);
|
|
22975
|
-
if (isValid) {
|
|
22976
|
-
queryParams[Param.SpotterDocumentationUrl] = spotterDocumentationUrl;
|
|
22977
|
-
}
|
|
22978
|
-
else {
|
|
22979
|
-
this.handleError({
|
|
22980
|
-
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
22981
|
-
message: ERROR_MESSAGE.INVALID_SPOTTER_DOCUMENTATION_URL,
|
|
22982
|
-
code: EmbedErrorCodes.INVALID_URL,
|
|
22983
|
-
error: (validationError === null || validationError === void 0 ? void 0 : validationError.message) || ERROR_MESSAGE.INVALID_SPOTTER_DOCUMENTATION_URL,
|
|
22984
|
-
});
|
|
22985
|
-
}
|
|
22986
|
-
}
|
|
22987
23093
|
// Handle spotterChatConfig params
|
|
22988
23094
|
if (spotterChatConfig) {
|
|
22989
23095
|
const { hideToolResponseCardBranding, toolResponseCardBrandingLabel, } = spotterChatConfig;
|
|
@@ -23233,38 +23339,6 @@ const SearchBarEmbed = componentFactory(SearchBarEmbed$1);
|
|
|
23233
23339
|
* ```
|
|
23234
23340
|
*/
|
|
23235
23341
|
const PreRenderedSearchBarEmbed = componentFactory(SearchBarEmbed$1, true);
|
|
23236
|
-
/**
|
|
23237
|
-
* React component for LLM based search Sage embed.
|
|
23238
|
-
* @example
|
|
23239
|
-
* ```tsx
|
|
23240
|
-
* function Sage() {
|
|
23241
|
-
* return <SageEmbed
|
|
23242
|
-
* showObjectResults={true}
|
|
23243
|
-
* ... other view config props or event listeners.
|
|
23244
|
-
* />
|
|
23245
|
-
* }
|
|
23246
|
-
* ```
|
|
23247
|
-
*/
|
|
23248
|
-
const SageEmbed = componentFactory(SageEmbed$1);
|
|
23249
|
-
/**
|
|
23250
|
-
* React component for PreRendered Sage embed.
|
|
23251
|
-
*
|
|
23252
|
-
* PreRenderedSageEmbed will preRender the SageEmbed and will be hidden by
|
|
23253
|
-
* default.
|
|
23254
|
-
*
|
|
23255
|
-
* SageEmbed with preRenderId passed will call showPreRender on the embed.
|
|
23256
|
-
* @example
|
|
23257
|
-
* ```tsx
|
|
23258
|
-
* function LandingPageComponent() {
|
|
23259
|
-
* return <PreRenderedSageEmbed preRenderId="someId" showObjectResults={true} />
|
|
23260
|
-
* }
|
|
23261
|
-
* ```
|
|
23262
|
-
* function MyComponent() {
|
|
23263
|
-
* return <SageEmbed preRenderId="someId" showObjectResults={true} />
|
|
23264
|
-
* }
|
|
23265
|
-
* ```
|
|
23266
|
-
*/
|
|
23267
|
-
const PreRenderedSageEmbed = componentFactory(SageEmbed$1, true);
|
|
23268
23342
|
/**
|
|
23269
23343
|
* React component for LLM based conversation BI.
|
|
23270
23344
|
* @example
|
|
@@ -23445,4 +23519,4 @@ function useSpotterAgent(config) {
|
|
|
23445
23519
|
};
|
|
23446
23520
|
}
|
|
23447
23521
|
|
|
23448
|
-
export { Action, AppEmbed, ConversationEmbed, ConversationMessage, CustomActionsPosition, EmbedEvent, HomeLeftNavItem, HomepageModule, HostEvent, ListPageColumns, LiveboardEmbed, LogLevel, Page, PinboardEmbed, PreRenderedAppEmbed, PreRenderedConversationEmbed, PreRenderedLiveboardEmbed, PreRenderedPinboardEmbed,
|
|
23522
|
+
export { Action, AppEmbed, ConversationEmbed, ConversationMessage, CustomActionsPosition, EmbedEvent, HomeLeftNavItem, HomepageModule, HostEvent, ListPageColumns, LiveboardEmbed, LogLevel, Page, PinboardEmbed, PreRenderedAppEmbed, PreRenderedConversationEmbed, PreRenderedLiveboardEmbed, PreRenderedPinboardEmbed, PreRenderedSearchBarEmbed, PreRenderedSearchEmbed, RuntimeFilterOp, SearchBarEmbed, SearchEmbed, SpotterEmbed, SpotterMessage, getSessionInfo, useEmbedRef, useInit, useSpotterAgent };
|