@thoughtspot/visual-embed-sdk 1.40.1-alpha.1 → 1.40.1-alpha.2
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/embed/bodyless-conversation.d.ts +1 -0
- package/cjs/src/embed/bodyless-conversation.d.ts.map +1 -1
- package/cjs/src/embed/bodyless-conversation.js +7 -3
- package/cjs/src/embed/bodyless-conversation.js.map +1 -1
- package/cjs/src/embed/conversation.d.ts +1 -0
- package/cjs/src/embed/conversation.d.ts.map +1 -1
- package/cjs/src/embed/conversation.js +7 -2
- package/cjs/src/embed/conversation.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts +1 -0
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +30 -14
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/liveboard.spec.js +29 -4
- package/cjs/src/embed/liveboard.spec.js.map +1 -1
- package/cjs/src/embed/sage.d.ts +1 -0
- package/cjs/src/embed/sage.d.ts.map +1 -1
- package/cjs/src/embed/sage.js +10 -6
- package/cjs/src/embed/sage.js.map +1 -1
- package/cjs/src/embed/search-bar.d.ts +1 -0
- package/cjs/src/embed/search-bar.d.ts.map +1 -1
- package/cjs/src/embed/search-bar.js +11 -7
- package/cjs/src/embed/search-bar.js.map +1 -1
- package/cjs/src/embed/search.d.ts +1 -0
- package/cjs/src/embed/search.d.ts.map +1 -1
- package/cjs/src/embed/search.js +7 -8
- package/cjs/src/embed/search.js.map +1 -1
- package/cjs/src/embed/ts-embed.d.ts +2 -0
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +18 -17
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/dist/index-k7pkZMhx.js +7371 -0
- package/dist/src/embed/bodyless-conversation.d.ts +5 -0
- package/dist/src/embed/bodyless-conversation.d.ts.map +1 -1
- package/dist/src/embed/conversation.d.ts +1 -0
- package/dist/src/embed/conversation.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts +3 -1
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/embed/sage.d.ts +1 -0
- package/dist/src/embed/sage.d.ts.map +1 -1
- package/dist/src/embed/search-bar.d.ts +1 -0
- package/dist/src/embed/search-bar.d.ts.map +1 -1
- package/dist/src/embed/search.d.ts +1 -0
- package/dist/src/embed/search.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.d.ts +9 -0
- package/dist/src/embed/ts-embed.d.ts.map +1 -1
- package/dist/src/react/index.d.ts +2 -0
- package/dist/src/react/index.d.ts.map +1 -1
- package/dist/src/types.d.ts +220 -7
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/graphql/nlsService/conversation-service.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +375 -60
- package/dist/tsembed-react.js +374 -59
- package/dist/tsembed.es.js +375 -60
- package/dist/tsembed.js +374 -59
- package/dist/visual-embed-sdk-react-full.d.ts +240 -8
- package/dist/visual-embed-sdk-react.d.ts +240 -8
- package/dist/visual-embed-sdk.d.ts +238 -8
- package/lib/package.json +1 -1
- package/lib/src/embed/bodyless-conversation.d.ts +1 -0
- package/lib/src/embed/bodyless-conversation.d.ts.map +1 -1
- package/lib/src/embed/bodyless-conversation.js +7 -3
- package/lib/src/embed/bodyless-conversation.js.map +1 -1
- package/lib/src/embed/conversation.d.ts +1 -0
- package/lib/src/embed/conversation.d.ts.map +1 -1
- package/lib/src/embed/conversation.js +7 -2
- package/lib/src/embed/conversation.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts +1 -0
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +30 -14
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +29 -4
- package/lib/src/embed/liveboard.spec.js.map +1 -1
- package/lib/src/embed/sage.d.ts +1 -0
- package/lib/src/embed/sage.d.ts.map +1 -1
- package/lib/src/embed/sage.js +10 -6
- package/lib/src/embed/sage.js.map +1 -1
- package/lib/src/embed/search-bar.d.ts +1 -0
- package/lib/src/embed/search-bar.d.ts.map +1 -1
- package/lib/src/embed/search-bar.js +11 -7
- package/lib/src/embed/search-bar.js.map +1 -1
- package/lib/src/embed/search.d.ts +1 -0
- package/lib/src/embed/search.d.ts.map +1 -1
- package/lib/src/embed/search.js +7 -8
- package/lib/src/embed/search.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts +2 -0
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +18 -17
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +238 -8
- package/package.json +2 -1
- package/src/embed/bodyless-conversation.ts +9 -3
- package/src/embed/conversation.ts +13 -2
- package/src/embed/liveboard.spec.ts +32 -4
- package/src/embed/liveboard.ts +36 -16
- package/src/embed/sage.ts +11 -6
- package/src/embed/search-bar.tsx +14 -7
- package/src/embed/search.ts +18 -7
- package/src/embed/ts-embed.ts +21 -18
package/dist/tsembed.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @thoughtspot/visual-embed-sdk version 1.
|
|
1
|
+
/* @thoughtspot/visual-embed-sdk version 1.40.1-alpha.2 */
|
|
2
2
|
'use client';
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
@@ -1876,6 +1876,83 @@
|
|
|
1876
1876
|
* @hidden
|
|
1877
1877
|
*/
|
|
1878
1878
|
EmbedEvent["RequestVisibleEmbedCoordinates"] = "requestVisibleEmbedCoordinates";
|
|
1879
|
+
/**
|
|
1880
|
+
* Emitted when spotter response is text data
|
|
1881
|
+
* @example
|
|
1882
|
+
* ```js
|
|
1883
|
+
* spotterEmbed.on(EmbedEvent.SpotterData, (payload) => {
|
|
1884
|
+
* console.log('payload', payload);
|
|
1885
|
+
* })
|
|
1886
|
+
*```
|
|
1887
|
+
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
1888
|
+
*/
|
|
1889
|
+
EmbedEvent["SpotterData"] = "SpotterData";
|
|
1890
|
+
/**
|
|
1891
|
+
* Emitted when user opens up the worksheet preview modal in spotter embed.
|
|
1892
|
+
* @example
|
|
1893
|
+
* ```js
|
|
1894
|
+
* spotterEmbed.on(EmbedEvent.PreviewSpotterData, (payload) => {
|
|
1895
|
+
* console.log('payload', payload);
|
|
1896
|
+
* })
|
|
1897
|
+
*```
|
|
1898
|
+
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
1899
|
+
*/
|
|
1900
|
+
EmbedEvent["PreviewSpotterData"] = "PreviewSpotterData";
|
|
1901
|
+
/**
|
|
1902
|
+
* Emitted when the spotter query is triggered in spotter embed.
|
|
1903
|
+
* @example
|
|
1904
|
+
* ```js
|
|
1905
|
+
* spotterEmbed.on(EmbedEvent.SpotterQueryTriggered, (payload) => {
|
|
1906
|
+
* console.log('payload', payload);
|
|
1907
|
+
* })
|
|
1908
|
+
*```
|
|
1909
|
+
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
1910
|
+
*/
|
|
1911
|
+
EmbedEvent["SpotterQueryTriggered"] = "SpotterQueryTriggered";
|
|
1912
|
+
/**
|
|
1913
|
+
* Emitted when the last spotter query is edited in spotter embed.
|
|
1914
|
+
* @example
|
|
1915
|
+
* ```js
|
|
1916
|
+
* spotterEmbed.on(EmbedEvent.LastPromptEdited, (payload) => {
|
|
1917
|
+
* console.log('payload', payload);
|
|
1918
|
+
* })
|
|
1919
|
+
*```
|
|
1920
|
+
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
1921
|
+
*/
|
|
1922
|
+
EmbedEvent["LastPromptEdited"] = "LastPromptEdited";
|
|
1923
|
+
/**
|
|
1924
|
+
* Emitted when the last spotter query is deleted in spotter embed.
|
|
1925
|
+
* @example
|
|
1926
|
+
* ```js
|
|
1927
|
+
* spotterEmbed.on(EmbedEvent.LastPromptDeleted, (payload) => {
|
|
1928
|
+
* console.log('payload', payload);
|
|
1929
|
+
* })
|
|
1930
|
+
*```
|
|
1931
|
+
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
1932
|
+
*/
|
|
1933
|
+
EmbedEvent["LastPromptDeleted"] = "LastPromptDeleted";
|
|
1934
|
+
/**
|
|
1935
|
+
* Emitted when the coversation is reset in spotter embed.
|
|
1936
|
+
* @example
|
|
1937
|
+
* ```js
|
|
1938
|
+
* spotterEmbed.on(EmbedEvent.ResetSpotterConversation, (payload) => {
|
|
1939
|
+
* console.log('payload', payload);
|
|
1940
|
+
* })
|
|
1941
|
+
*```
|
|
1942
|
+
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
1943
|
+
*/
|
|
1944
|
+
EmbedEvent["ResetSpotterConversation"] = "ResetSpotterConversation";
|
|
1945
|
+
/**
|
|
1946
|
+
* Emitted when the *Spotter* is initialized.
|
|
1947
|
+
* @example
|
|
1948
|
+
* ```js
|
|
1949
|
+
* spotterEmbed.on(EmbedEvent.SpotterInit, (payload) => {
|
|
1950
|
+
* console.log('payload', payload);
|
|
1951
|
+
* })
|
|
1952
|
+
*```
|
|
1953
|
+
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
1954
|
+
*/
|
|
1955
|
+
EmbedEvent["SpotterInit"] = "SpotterInit";
|
|
1879
1956
|
})(exports.EmbedEvent || (exports.EmbedEvent = {}));
|
|
1880
1957
|
/**
|
|
1881
1958
|
* Event types that can be triggered by the host application
|
|
@@ -1893,7 +1970,7 @@
|
|
|
1893
1970
|
* // create the liveboard embed.
|
|
1894
1971
|
*
|
|
1895
1972
|
* liveboardEmbed.trigger(HostEvent.UpdateRuntimeFilters, [
|
|
1896
|
-
* { columnName: 'state, operator: RuntimeFilterOp.EQ, values: [
|
|
1973
|
+
* { columnName: 'state', operator: RuntimeFilterOp.EQ, values: ["california"]}
|
|
1897
1974
|
* ]);
|
|
1898
1975
|
* ```
|
|
1899
1976
|
* @example
|
|
@@ -2103,12 +2180,12 @@
|
|
|
2103
2180
|
* Works with Search and Liveboard embed.
|
|
2104
2181
|
* @param - { columnId: string,
|
|
2105
2182
|
* name: string,
|
|
2106
|
-
* type:
|
|
2107
|
-
* dataType:
|
|
2183
|
+
* type: ATTRIBUTE/MEASURE,
|
|
2184
|
+
* dataType: INT64/CHAR/DATE }
|
|
2108
2185
|
* @example
|
|
2109
2186
|
* ```js
|
|
2110
2187
|
* searchEmbed.trigger(HostEvent.OpenFilter,
|
|
2111
|
-
* {column: { columnId: '<column-GUID>', name: 'column name', type: '
|
|
2188
|
+
* {column: { columnId: '<column-GUID>', name: 'column name', type: 'ATTRIBUTE', dataType: 'INT64'}})
|
|
2112
2189
|
* ```
|
|
2113
2190
|
* @example
|
|
2114
2191
|
* ```js
|
|
@@ -2166,6 +2243,7 @@
|
|
|
2166
2243
|
* @param
|
|
2167
2244
|
* `vizId`- GUID of the saved Answer or visualization to pin to a Liveboard.
|
|
2168
2245
|
* Optional when pinning a new chart or table generated from a Search query.
|
|
2246
|
+
* **Required** in Spotter Embed.
|
|
2169
2247
|
* @param
|
|
2170
2248
|
* `liveboardID` - GUID of the Liveboard to pin an Answer. If there is no Liveboard,
|
|
2171
2249
|
* specify the `newLiveboardName` parameter to create a new Liveboard.
|
|
@@ -2213,6 +2291,12 @@
|
|
|
2213
2291
|
* ```js
|
|
2214
2292
|
* appEmbed.trigger(HostEvent.Pin)
|
|
2215
2293
|
* ```
|
|
2294
|
+
* @example
|
|
2295
|
+
* ```js
|
|
2296
|
+
* const pinResponse = await spotterEmbed.trigger(HostEvent.Pin, {
|
|
2297
|
+
* vizId:'730496d6-6903-4601-937e-2c691821af3c'
|
|
2298
|
+
* });
|
|
2299
|
+
* ```
|
|
2216
2300
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2217
2301
|
*/
|
|
2218
2302
|
HostEvent["Pin"] = "pin";
|
|
@@ -2306,6 +2390,12 @@
|
|
|
2306
2390
|
* ```js
|
|
2307
2391
|
* searchEmbed.trigger(HostEvent.MakeACopy)
|
|
2308
2392
|
* ```
|
|
2393
|
+
* @example
|
|
2394
|
+
* ```js
|
|
2395
|
+
* const pinResponse = await spotterEmbed.trigger(HostEvent.MakeACopy, {
|
|
2396
|
+
* vizId:'730496d6-6903-4601-937e-2c691821af3c'
|
|
2397
|
+
* });
|
|
2398
|
+
* ```
|
|
2309
2399
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2310
2400
|
*/
|
|
2311
2401
|
HostEvent["MakeACopy"] = "makeACopy";
|
|
@@ -2378,6 +2468,7 @@
|
|
|
2378
2468
|
* This event is not supported in visualization embed and search embed.
|
|
2379
2469
|
* @param - object - To trigger the action for a specific visualization
|
|
2380
2470
|
* in Liveboard embed, pass in `vizId` as a key.
|
|
2471
|
+
* **Required** in Spotter embed.
|
|
2381
2472
|
* @example
|
|
2382
2473
|
* ```js
|
|
2383
2474
|
* liveboardEmbed.trigger(HostEvent.Edit)
|
|
@@ -2386,6 +2477,12 @@
|
|
|
2386
2477
|
* liveboardEmbed.trigger(HostEvent.Edit, {vizId:
|
|
2387
2478
|
* '730496d6-6903-4601-937e-2c691821af3c'})
|
|
2388
2479
|
* ```
|
|
2480
|
+
* @example
|
|
2481
|
+
* ```js
|
|
2482
|
+
* const pinResponse = await spotterEmbed.trigger(HostEvent.Edit, {
|
|
2483
|
+
* vizId:'730496d6-6903-4601-937e-2c691821af3c'
|
|
2484
|
+
* });
|
|
2485
|
+
* ```
|
|
2389
2486
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2390
2487
|
*/
|
|
2391
2488
|
HostEvent["Edit"] = "edit";
|
|
@@ -2433,6 +2530,16 @@
|
|
|
2433
2530
|
* );
|
|
2434
2531
|
* })
|
|
2435
2532
|
* ```
|
|
2533
|
+
* @example
|
|
2534
|
+
* ```js
|
|
2535
|
+
* spotterEmbed.trigger(HostEvent.GetTML, {
|
|
2536
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
2537
|
+
* }).then((tml) => {
|
|
2538
|
+
* console.log(
|
|
2539
|
+
* tml.answer.search_query // TML representation of the search query
|
|
2540
|
+
* );
|
|
2541
|
+
* })
|
|
2542
|
+
* ```
|
|
2436
2543
|
* @version SDK: 1.18.0 | ThoughtSpot: 8.10.0.cl, 9.0.1.sw
|
|
2437
2544
|
* @important
|
|
2438
2545
|
*/
|
|
@@ -2520,7 +2627,12 @@
|
|
|
2520
2627
|
* vizEmbed.trigger(HostEvent.DownloadAsPng)
|
|
2521
2628
|
*
|
|
2522
2629
|
* searchEmbed.trigger(HostEvent.DownloadAsPng)
|
|
2630
|
+
*
|
|
2631
|
+
* spotterEmbed.trigger(HostEvent.DownloadAsPng, {
|
|
2632
|
+
* vizId:"730496d6-6903-4601-937e-2c691821af3c"
|
|
2633
|
+
* })
|
|
2523
2634
|
* ```
|
|
2635
|
+
*
|
|
2524
2636
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.1.sw
|
|
2525
2637
|
*/
|
|
2526
2638
|
HostEvent["DownloadAsPng"] = "downloadAsPng";
|
|
@@ -2538,6 +2650,11 @@
|
|
|
2538
2650
|
* ```js
|
|
2539
2651
|
* searchEmbed.trigger(HostEvent.DownloadAsCsv)
|
|
2540
2652
|
* ```
|
|
2653
|
+
* ```js
|
|
2654
|
+
* spotterEmbed.trigger(HostEvent.DownloadAsCsv, {
|
|
2655
|
+
* vizId:"730496d6-6903-4601-937e-2c691821af3c"
|
|
2656
|
+
* })
|
|
2657
|
+
* ```
|
|
2541
2658
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
2542
2659
|
*/
|
|
2543
2660
|
HostEvent["DownloadAsCsv"] = "downloadAsCSV";
|
|
@@ -2555,6 +2672,11 @@
|
|
|
2555
2672
|
* ```js
|
|
2556
2673
|
* searchEmbed.trigger(HostEvent.DownloadAsXlsx)
|
|
2557
2674
|
* ```
|
|
2675
|
+
* ```js
|
|
2676
|
+
* spotterEmbed.trigger(HostEvent.downloadAsXLSX, {
|
|
2677
|
+
* vizId:"730496d6-6903-4601-937e-2c691821af3c"
|
|
2678
|
+
* })
|
|
2679
|
+
* ```
|
|
2558
2680
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
2559
2681
|
*/
|
|
2560
2682
|
HostEvent["DownloadAsXlsx"] = "downloadAsXLSX";
|
|
@@ -2574,6 +2696,7 @@
|
|
|
2574
2696
|
/**
|
|
2575
2697
|
* Trigger the **Save** action on a Liveboard or Answer.
|
|
2576
2698
|
* Saves the changes.
|
|
2699
|
+
* @param - `vizId` is required in Spotter Embed.
|
|
2577
2700
|
* @example
|
|
2578
2701
|
* ```js
|
|
2579
2702
|
* liveboardEmbed.trigger(HostEvent.Save)
|
|
@@ -2581,6 +2704,11 @@
|
|
|
2581
2704
|
* ```js
|
|
2582
2705
|
* searchEmbed.trigger(HostEvent.Save)
|
|
2583
2706
|
* ```
|
|
2707
|
+
* ```js
|
|
2708
|
+
* spotterEmbed.trigger(HostEvent.Save, {
|
|
2709
|
+
* vizId:"730496d6-6903-4601-937e-2c691821af3c"
|
|
2710
|
+
* })
|
|
2711
|
+
* ```
|
|
2584
2712
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
2585
2713
|
*/
|
|
2586
2714
|
HostEvent["Save"] = "save";
|
|
@@ -2864,7 +2992,7 @@
|
|
|
2864
2992
|
HostEvent["ResetLiveboardPersonalisedView"] = "ResetLiveboardPersonalisedView";
|
|
2865
2993
|
/**
|
|
2866
2994
|
* Triggers an action to update Parameter values on embedded
|
|
2867
|
-
* Answers and
|
|
2995
|
+
* Answers, Liveboard and Spotter answer in Edit mode.
|
|
2868
2996
|
*
|
|
2869
2997
|
* @example
|
|
2870
2998
|
* ```js
|
|
@@ -2883,6 +3011,13 @@
|
|
|
2883
3011
|
* console.log('parameters', parameter);
|
|
2884
3012
|
* });
|
|
2885
3013
|
*```
|
|
3014
|
+
*```js
|
|
3015
|
+
* spotterEmbed.trigger(HostEvent.GetParameters, {
|
|
3016
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
3017
|
+
* }).then((parameter) => {
|
|
3018
|
+
* console.log('parameters', parameter);
|
|
3019
|
+
* });
|
|
3020
|
+
*```
|
|
2886
3021
|
* @version SDK: 1.29.0 | ThoughtSpot: 10.1.0.cl, 10.1.0.sw
|
|
2887
3022
|
*/
|
|
2888
3023
|
HostEvent["GetParameters"] = "GetParameters";
|
|
@@ -2950,6 +3085,64 @@
|
|
|
2950
3085
|
* @version SDK: 1.37.0 | ThoughtSpot: 10.8.0.cl
|
|
2951
3086
|
*/
|
|
2952
3087
|
HostEvent["TransformTableVizData"] = "TransformTableVizData";
|
|
3088
|
+
/**
|
|
3089
|
+
* Triggers a search operation with the search tokens specified in
|
|
3090
|
+
* the search query string in spotter embed.
|
|
3091
|
+
* @param - `queryString`: Text string in Natural Language format
|
|
3092
|
+
* @param - `executeSearch`: Boolean to execute search and update search query
|
|
3093
|
+
* @example
|
|
3094
|
+
* ```js
|
|
3095
|
+
* spotterEmbed.trigger(HostEvent.SpotterSearch, {
|
|
3096
|
+
* query: 'revenue per year',
|
|
3097
|
+
* executeSearch: true,
|
|
3098
|
+
* })
|
|
3099
|
+
* ```
|
|
3100
|
+
*/
|
|
3101
|
+
HostEvent["SpotterSearch"] = "SpotterSearch";
|
|
3102
|
+
/**
|
|
3103
|
+
* Edits the last prompt in spotter embed.
|
|
3104
|
+
* @param - `query`: Text string
|
|
3105
|
+
* @example
|
|
3106
|
+
* ```js
|
|
3107
|
+
* spotterEmbed.trigger(HostEvent.EditLastPrompt, "revenue per year");
|
|
3108
|
+
* ```
|
|
3109
|
+
*/
|
|
3110
|
+
HostEvent["EditLastPrompt"] = "EditLastPrompt";
|
|
3111
|
+
/**
|
|
3112
|
+
* Opens the Worksheet preview modal in Spotter Embed.
|
|
3113
|
+
* @example
|
|
3114
|
+
* ```js
|
|
3115
|
+
* spotterEmbed.trigger(HostEvent.PreviewSpotterData);
|
|
3116
|
+
* ```
|
|
3117
|
+
*/
|
|
3118
|
+
HostEvent["PreviewSpotterData"] = "PreviewSpotterData";
|
|
3119
|
+
/**
|
|
3120
|
+
* Resets the Spotter Embed Conversation.
|
|
3121
|
+
* @example
|
|
3122
|
+
* ```js
|
|
3123
|
+
* spotterEmbed.trigger(HostEvent.ResetSpotterConversation);
|
|
3124
|
+
* ```
|
|
3125
|
+
*/
|
|
3126
|
+
HostEvent["ResetSpotterConversation"] = "ResetSpotterConversation";
|
|
3127
|
+
/**
|
|
3128
|
+
* Deletes the last prompt in spotter embed.
|
|
3129
|
+
* @example
|
|
3130
|
+
* ```js
|
|
3131
|
+
* spotterEmbed.trigger(HostEvent.DeleteLastPrompt);
|
|
3132
|
+
* ```
|
|
3133
|
+
*/
|
|
3134
|
+
HostEvent["DeleteLastPrompt"] = "DeleteLastPrompt";
|
|
3135
|
+
/**
|
|
3136
|
+
* Toggle the visualization to chart or table view.
|
|
3137
|
+
* @param - `vizId ` In Spotter Embed, vizId is required.
|
|
3138
|
+
* @example
|
|
3139
|
+
* ```js
|
|
3140
|
+
* spotterEmbed.trigger(HostEvent.AnswerChartSwitcher, {
|
|
3141
|
+
* vizId:"'b535c760-8bbe-4e6f-bb26-af56b4129a1e'"
|
|
3142
|
+
* });
|
|
3143
|
+
*```
|
|
3144
|
+
*/
|
|
3145
|
+
HostEvent["AnswerChartSwitcher"] = "answerChartSwitcher";
|
|
2953
3146
|
/**
|
|
2954
3147
|
* @hidden
|
|
2955
3148
|
* Trigger exit from presentation mode when user exits fullscreen.
|
|
@@ -2973,6 +3166,26 @@
|
|
|
2973
3166
|
* @hidden
|
|
2974
3167
|
*/
|
|
2975
3168
|
HostEvent["VisibleEmbedCoordinates"] = "visibleEmbedCoordinates";
|
|
3169
|
+
/**
|
|
3170
|
+
* Trigger the *Ask Sage* action for visualizations
|
|
3171
|
+
* @example
|
|
3172
|
+
* ```js
|
|
3173
|
+
* liveboardEmbed.trigger(HostEvent.AskSpotter,
|
|
3174
|
+
* {containerId:'730496d6-6903-4601-937e-2c691821af3c'})
|
|
3175
|
+
* ```
|
|
3176
|
+
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
3177
|
+
*/
|
|
3178
|
+
HostEvent["AskSpotter"] = "askSpotter";
|
|
3179
|
+
/**
|
|
3180
|
+
* @hidden
|
|
3181
|
+
* Triggers the update of the embed params.
|
|
3182
|
+
*
|
|
3183
|
+
* @example
|
|
3184
|
+
* ```js
|
|
3185
|
+
* liveboardEmbed.trigger(HostEvent.UpdateEmbedParams, viewConfig);
|
|
3186
|
+
* ```
|
|
3187
|
+
*/
|
|
3188
|
+
HostEvent["UpdateEmbedParams"] = "updateEmbedParams";
|
|
2976
3189
|
})(exports.HostEvent || (exports.HostEvent = {}));
|
|
2977
3190
|
/**
|
|
2978
3191
|
* The different visual modes that the data sources panel within
|
|
@@ -15614,7 +15827,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
15614
15827
|
return e;
|
|
15615
15828
|
}
|
|
15616
15829
|
|
|
15617
|
-
var name="@thoughtspot/visual-embed-sdk";var version$1="1.
|
|
15830
|
+
var name="@thoughtspot/visual-embed-sdk";var version$1="1.40.1-alpha.2";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports$1={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p . --incremental false; tsc -p . --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts","bundle-dts":"dts-bundle --name ../../dist/visual-embed-sdk --main lib/src/index.d.ts --outputAsModuleFolder=true","bundle-dts-react":"dts-bundle --name ../../../dist/visual-embed-sdk-react --main lib/src/react/index.d.ts --outputAsModuleFolder=true","bundle-dts-react-full":"dts-bundle --name ../../../dist/visual-embed-sdk-react-full --main lib/src/react/all-types-export.d.ts --outputAsModuleFolder=true",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.json --theme typedoc-theme --json static/typedoc/typedoc.json --disableOutputCheck","test-sdk":"jest -c jest.config.sdk.js --runInBand",test:"npm run test-sdk",posttest:"cat ./coverage/sdk/lcov.info | coveralls","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest",dev:"vite -c vite.local.config.ts"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={classnames:"^2.3.1",eventemitter3:"^4.0.7",lodash:"^4.17.21","mixpanel-browser":"2.47.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1",yaml:"^2.5.1"};var devDependencies={"@mdx-js/mdx":"^1.6.22","@mdx-js/react":"^1.6.22","@react-icons/all-files":"^4.1.0","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^5.0.2","@size-limit/preset-big-lib":"^8.2.6","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^22.2.3","@types/lodash":"^4.17.0","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^8.28.0","@typescript-eslint/parser":"^8.28.0",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1",coveralls:"^3.1.0",crypto:"^1.0.1","current-git-branch":"^1.1.0","dts-bundle":"^0.7.3",eslint:"^9.23.0","eslint-config-airbnb-base":"^15.0.0","eslint-config-prettier":"^10.1.1","eslint-import-resolver-typescript":"^4.2.5","eslint-plugin-comment-length":"2.2.1","eslint-plugin-import":"^2.31.0","eslint-plugin-jsdoc":"^50.6.9","eslint-plugin-prettier":"^5.2.5","eslint-plugin-react":"^7.37.5","eslint-plugin-react-hooks":"^5.2.0","fs-extra":"^10.0.0","gh-pages":"6.3.0",globals:"^16.0.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^1.1.1",jest:"^26.6.3","jest-fetch-mock":"^3.0.3",jsdom:"^17.0.0",prettier:"2.1.2",react:"^16.14.0","react-dom":"^16.14.0","react-resizable":"^1.11.0","react-resize-detector":"^6.6.0","react-test-renderer":"^17.0.2","react-use-flexsearch":"^0.1.1",rollup:"4.24.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^26.5.5","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","typescript-eslint":"^8.29.1","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^6.3.5"};var author="ThoughtSpot";var email="support@thoughtspot.com";var license="ThoughtSpot Development Tools End User License Agreement";var directories={lib:"lib"};var repository={type:"git",url:"git+https://github.com/thoughtspot/visual-embed-sdk.git"};var publishConfig={registry:"https://registry.npmjs.org"};var keywords=["thoughtspot","everywhere","embedded","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version$1,description:description,module:module,main:main,types:types,files:files,exports:exports$1,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.es.js",limit:"31 kB"}],scripts:scripts,peerDependencies:peerDependencies,dependencies:dependencies,devDependencies:devDependencies,author:author,email:email,license:license,directories:directories,repository:repository,publishConfig:publishConfig,keywords:keywords,bugs:bugs,homepage:homepage,globals:globals};
|
|
15618
15831
|
|
|
15619
15832
|
/**
|
|
15620
15833
|
* Reloads the ThoughtSpot iframe.
|
|
@@ -15840,6 +16053,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
15840
16053
|
*/
|
|
15841
16054
|
this.fullscreenChangeHandler = null;
|
|
15842
16055
|
this.subscribedListeners = {};
|
|
16056
|
+
this.isEmbedContainerLoaded = false;
|
|
15843
16057
|
/**
|
|
15844
16058
|
* Send Custom style as part of payload of APP_INIT
|
|
15845
16059
|
* @param _
|
|
@@ -15866,7 +16080,8 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
15866
16080
|
this.updateAuthToken = async (_, responder) => {
|
|
15867
16081
|
const { authType } = this.embedConfig;
|
|
15868
16082
|
let { autoLogin } = this.embedConfig;
|
|
15869
|
-
// Default autoLogin: true for cookieless if undefined/null, otherwise
|
|
16083
|
+
// Default autoLogin: true for cookieless if undefined/null, otherwise
|
|
16084
|
+
// false
|
|
15870
16085
|
autoLogin = autoLogin !== null && autoLogin !== void 0 ? autoLogin : (authType === exports.AuthType.TrustedAuthTokenCookieless);
|
|
15871
16086
|
if (autoLogin && authType === exports.AuthType.TrustedAuthTokenCookieless) {
|
|
15872
16087
|
try {
|
|
@@ -15910,11 +16125,16 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
15910
16125
|
});
|
|
15911
16126
|
notifyAuthFailure(exports.AuthFailureType.IDLE_SESSION_TIMEOUT);
|
|
15912
16127
|
};
|
|
16128
|
+
this.pendingEvents = [];
|
|
15913
16129
|
/**
|
|
15914
16130
|
* Register APP_INIT event and sendback init payload
|
|
15915
16131
|
*/
|
|
15916
16132
|
this.registerAppInit = () => {
|
|
15917
16133
|
this.on(exports.EmbedEvent.APP_INIT, this.appInitCb, { start: false }, true);
|
|
16134
|
+
this.on(exports.EmbedEvent.AuthInit, () => {
|
|
16135
|
+
this.isEmbedContainerLoaded = true;
|
|
16136
|
+
this.executePendingEvents();
|
|
16137
|
+
}, { start: false }, true);
|
|
15918
16138
|
this.on(exports.EmbedEvent.AuthExpire, this.updateAuthToken, { start: false }, true);
|
|
15919
16139
|
this.on(exports.EmbedEvent.IdleSessionTimeout, this.idleSessionTimeout, { start: false }, true);
|
|
15920
16140
|
};
|
|
@@ -15940,6 +16160,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
15940
16160
|
});
|
|
15941
16161
|
}
|
|
15942
16162
|
};
|
|
16163
|
+
this.id = Date.now().toString();
|
|
15943
16164
|
this.el = getDOMNode(domSelector);
|
|
15944
16165
|
this.eventHandlerMap = new Map();
|
|
15945
16166
|
this.isError = false;
|
|
@@ -15953,9 +16174,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
15953
16174
|
...viewConfig,
|
|
15954
16175
|
});
|
|
15955
16176
|
this.hostEventClient = new HostEventClient(this.iFrame);
|
|
16177
|
+
const embedConfig = getEmbedConfig();
|
|
16178
|
+
this.embedConfig = embedConfig;
|
|
15956
16179
|
this.isReadyForRenderPromise = getInitPromise().then(async () => {
|
|
15957
|
-
const embedConfig = getEmbedConfig();
|
|
15958
|
-
this.embedConfig = embedConfig;
|
|
15959
16180
|
if (!embedConfig.authTriggerContainer && !embedConfig.useEventForSAMLPopup) {
|
|
15960
16181
|
this.embedConfig.authTriggerContainer = domSelector;
|
|
15961
16182
|
}
|
|
@@ -15988,7 +16209,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
15988
16209
|
*/
|
|
15989
16210
|
getEventType(event) {
|
|
15990
16211
|
var _a, _b;
|
|
15991
|
-
// eslint-disable-next-line no-underscore-dangle
|
|
15992
16212
|
return ((_a = event.data) === null || _a === void 0 ? void 0 : _a.type) || ((_b = event.data) === null || _b === void 0 ? void 0 : _b.__type);
|
|
15993
16213
|
}
|
|
15994
16214
|
/**
|
|
@@ -16127,6 +16347,43 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
16127
16347
|
async getAppInitData() {
|
|
16128
16348
|
return this.getDefaultAppInitData();
|
|
16129
16349
|
}
|
|
16350
|
+
getPreRenderObj() {
|
|
16351
|
+
var _a;
|
|
16352
|
+
const embedObj = (_a = this.insertedDomEl) === null || _a === void 0 ? void 0 : _a[this.embedNodeKey];
|
|
16353
|
+
if (embedObj === this) {
|
|
16354
|
+
logger$3.info('embedObj is same as this');
|
|
16355
|
+
}
|
|
16356
|
+
return embedObj;
|
|
16357
|
+
}
|
|
16358
|
+
checkEmbedContainerLoaded() {
|
|
16359
|
+
if (this.isEmbedContainerLoaded)
|
|
16360
|
+
return true;
|
|
16361
|
+
const preRenderObj = this.getPreRenderObj();
|
|
16362
|
+
if (preRenderObj && preRenderObj.isEmbedContainerLoaded) {
|
|
16363
|
+
this.isEmbedContainerLoaded = true;
|
|
16364
|
+
}
|
|
16365
|
+
return this.isEmbedContainerLoaded;
|
|
16366
|
+
}
|
|
16367
|
+
executePendingEvents() {
|
|
16368
|
+
logger$3.debug('executePendingEvents', this.pendingEvents);
|
|
16369
|
+
setTimeout(() => {
|
|
16370
|
+
this.pendingEvents.forEach((event) => {
|
|
16371
|
+
var _a;
|
|
16372
|
+
this.trigger(event.eventType, event.data);
|
|
16373
|
+
(_a = event.onEventTriggered) === null || _a === void 0 ? void 0 : _a.call(event);
|
|
16374
|
+
});
|
|
16375
|
+
this.pendingEvents = [];
|
|
16376
|
+
}, 1000);
|
|
16377
|
+
}
|
|
16378
|
+
triggerAfterLoad(eventType, data, onEventTriggered) {
|
|
16379
|
+
if (this.checkEmbedContainerLoaded()) {
|
|
16380
|
+
this.trigger(eventType, data);
|
|
16381
|
+
onEventTriggered === null || onEventTriggered === void 0 ? void 0 : onEventTriggered();
|
|
16382
|
+
}
|
|
16383
|
+
else {
|
|
16384
|
+
this.pendingEvents.push({ eventType, data, onEventTriggered });
|
|
16385
|
+
}
|
|
16386
|
+
}
|
|
16130
16387
|
/**
|
|
16131
16388
|
* Constructs the base URL string to load the ThoughtSpot app.
|
|
16132
16389
|
* @param query
|
|
@@ -16141,6 +16398,11 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
16141
16398
|
.join('/');
|
|
16142
16399
|
return `${basePath}#`;
|
|
16143
16400
|
}
|
|
16401
|
+
getUpdateEmbedParamsObject() {
|
|
16402
|
+
let queryParams = this.getEmbedParamsObject();
|
|
16403
|
+
queryParams = { ...this.viewConfig, ...queryParams };
|
|
16404
|
+
return queryParams;
|
|
16405
|
+
}
|
|
16144
16406
|
/**
|
|
16145
16407
|
* Common query params set for all the embed modes.
|
|
16146
16408
|
* @param queryParams
|
|
@@ -16290,9 +16552,13 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
16290
16552
|
return path;
|
|
16291
16553
|
}
|
|
16292
16554
|
getEmbedParams() {
|
|
16293
|
-
const queryParams = this.
|
|
16555
|
+
const queryParams = this.getEmbedParamsObject();
|
|
16294
16556
|
return getQueryParamString(queryParams);
|
|
16295
16557
|
}
|
|
16558
|
+
getEmbedParamsObject() {
|
|
16559
|
+
const params = this.getBaseQueryParams();
|
|
16560
|
+
return params;
|
|
16561
|
+
}
|
|
16296
16562
|
getRootIframeSrc() {
|
|
16297
16563
|
const query = this.getEmbedParams();
|
|
16298
16564
|
return this.getEmbedBasePath(query);
|
|
@@ -16391,7 +16657,8 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
16391
16657
|
}
|
|
16392
16658
|
});
|
|
16393
16659
|
}
|
|
16394
|
-
// Setup fullscreen change handler after iframe is
|
|
16660
|
+
// Setup fullscreen change handler after iframe is
|
|
16661
|
+
// loaded and ready
|
|
16395
16662
|
this.setupFullscreenChangeHandler();
|
|
16396
16663
|
});
|
|
16397
16664
|
this.iFrame.addEventListener('error', () => {
|
|
@@ -16493,7 +16760,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
16493
16760
|
const div = document.createElement('div');
|
|
16494
16761
|
div.innerHTML = child;
|
|
16495
16762
|
div.id = TS_EMBED_ID;
|
|
16496
|
-
// eslint-disable-next-line no-param-reassign
|
|
16497
16763
|
child = div;
|
|
16498
16764
|
}
|
|
16499
16765
|
if (((_a = this.el.nextElementSibling) === null || _a === void 0 ? void 0 : _a.id) === TS_EMBED_ID) {
|
|
@@ -16816,7 +17082,10 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
16816
17082
|
return this.preRender(true);
|
|
16817
17083
|
}
|
|
16818
17084
|
this.validatePreRenderViewConfig(this.viewConfig);
|
|
17085
|
+
logger$3.debug('triggering UpdateEmbedParams', this.viewConfig);
|
|
17086
|
+
this.triggerAfterLoad(exports.HostEvent.UpdateEmbedParams, this.getUpdateEmbedParamsObject());
|
|
16819
17087
|
}
|
|
17088
|
+
this.beforePrerenderVisible();
|
|
16820
17089
|
if (this.el) {
|
|
16821
17090
|
this.syncPreRenderStyle();
|
|
16822
17091
|
if (!this.viewConfig.doNotTrackPreRenderSize) {
|
|
@@ -16833,7 +17102,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
16833
17102
|
this.resizeObserver.observe(this.el);
|
|
16834
17103
|
}
|
|
16835
17104
|
}
|
|
16836
|
-
this.beforePrerenderVisible();
|
|
16837
17105
|
removeStyleProperties(this.preRenderWrapper, ['z-index', 'opacity', 'pointer-events']);
|
|
16838
17106
|
this.subscribeToEvents();
|
|
16839
17107
|
// Setup fullscreen change handler for prerendered components
|
|
@@ -16926,7 +17194,8 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
16926
17194
|
const isFullscreen = !!document.fullscreenElement;
|
|
16927
17195
|
if (!isFullscreen) {
|
|
16928
17196
|
logger$3.info('Exited fullscreen mode - triggering ExitPresentMode');
|
|
16929
|
-
// Only trigger if iframe is available and contentWindow is
|
|
17197
|
+
// Only trigger if iframe is available and contentWindow is
|
|
17198
|
+
// accessible
|
|
16930
17199
|
if (this.iFrame && this.iFrame.contentWindow) {
|
|
16931
17200
|
this.trigger(exports.HostEvent.ExitPresentMode);
|
|
16932
17201
|
}
|
|
@@ -16960,7 +17229,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
16960
17229
|
* Only for testing purposes.
|
|
16961
17230
|
* @hidden
|
|
16962
17231
|
*/
|
|
16963
|
-
// eslint-disable-next-line camelcase
|
|
16964
17232
|
this.test__executeCallbacks = this.executeCallbacks;
|
|
16965
17233
|
this.viewConfig = { excludeRuntimeFiltersfromURL: false, ...viewConfig };
|
|
16966
17234
|
}
|
|
@@ -17448,7 +17716,7 @@ query GetEurekaVizSnapshots(
|
|
|
17448
17716
|
return;
|
|
17449
17717
|
}
|
|
17450
17718
|
const previewStyles = `
|
|
17451
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/ag-grid-community@32.0.2/styles/ag-grid.min.css">
|
|
17719
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/ag-grid-community@32.0.2/styles/ag-grid.min.css" integrity="sha384-PvEsKa6emq5KYa9mf+Q7eYF5C2OCacYzZ+hBngp21NA4o1A9iU9smnytEmqUFbEZ" crossorigin="anonymous">
|
|
17452
17720
|
<style id="ts-preview-style">
|
|
17453
17721
|
.ts-viz-preview-loader {
|
|
17454
17722
|
position: absolute;
|
|
@@ -17559,6 +17827,7 @@ query GetEurekaVizSnapshots(
|
|
|
17559
17827
|
}
|
|
17560
17828
|
this.setIFrameHeight(frameHeight || this.defaultHeight);
|
|
17561
17829
|
};
|
|
17830
|
+
this.currentLiveboardId = this.viewConfig.liveboardId;
|
|
17562
17831
|
if (this.viewConfig.fullHeight === true) {
|
|
17563
17832
|
if (this.viewConfig.vizId) {
|
|
17564
17833
|
logger$3.warn('Full height is currently only supported for Liveboard embeds.' +
|
|
@@ -17575,6 +17844,11 @@ query GetEurekaVizSnapshots(
|
|
|
17575
17844
|
* embedded Liveboard or visualization.
|
|
17576
17845
|
*/
|
|
17577
17846
|
getEmbedParams() {
|
|
17847
|
+
const params = this.getEmbedParamsObject();
|
|
17848
|
+
const queryParams = getQueryParamString(params, true);
|
|
17849
|
+
return queryParams;
|
|
17850
|
+
}
|
|
17851
|
+
getEmbedParamsObject() {
|
|
17578
17852
|
let params = {};
|
|
17579
17853
|
params = this.getBaseQueryParams(params);
|
|
17580
17854
|
const { enableVizTransformations, fullHeight, defaultHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, enableAskSage, enable2ColumnLayout, dataPanelV2 = false, enableCustomColumnGroups = false, oAuthPollingInterval, isForceRedirect, dataSourceId, coverAndFilterOptionInPDF = false, isLiveboardStylingAndGroupingEnabled, } = this.viewConfig;
|
|
@@ -17644,8 +17918,27 @@ query GetEurekaVizSnapshots(
|
|
|
17644
17918
|
params[Param.DataPanelV2Enabled] = dataPanelV2;
|
|
17645
17919
|
params[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
|
|
17646
17920
|
params[Param.CoverAndFilterOptionInPDF] = coverAndFilterOptionInPDF;
|
|
17647
|
-
|
|
17648
|
-
|
|
17921
|
+
if (oAuthPollingInterval !== undefined) {
|
|
17922
|
+
params[Param.OauthPollingInterval] = oAuthPollingInterval;
|
|
17923
|
+
}
|
|
17924
|
+
if (isForceRedirect) {
|
|
17925
|
+
params[Param.IsForceRedirect] = isForceRedirect;
|
|
17926
|
+
}
|
|
17927
|
+
if (dataSourceId !== undefined) {
|
|
17928
|
+
params[Param.DataSourceId] = dataSourceId;
|
|
17929
|
+
}
|
|
17930
|
+
if (isLiveboardStylingAndGroupingEnabled !== undefined) {
|
|
17931
|
+
params[Param.IsLiveboardStylingAndGroupingEnabled] = isLiveboardStylingAndGroupingEnabled;
|
|
17932
|
+
}
|
|
17933
|
+
params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
|
|
17934
|
+
params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
|
|
17935
|
+
params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;
|
|
17936
|
+
params[Param.ShowLiveboardReverifyBanner] = showLiveboardReverifyBanner;
|
|
17937
|
+
params[Param.HideIrrelevantFiltersInTab] = hideIrrelevantChipsInLiveboardTabs;
|
|
17938
|
+
params[Param.DataPanelV2Enabled] = dataPanelV2;
|
|
17939
|
+
params[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
|
|
17940
|
+
params[Param.CoverAndFilterOptionInPDF] = coverAndFilterOptionInPDF;
|
|
17941
|
+
return params;
|
|
17649
17942
|
}
|
|
17650
17943
|
getIframeSuffixSrc(liveboardId, vizId, activeTabId) {
|
|
17651
17944
|
let suffix = `/embed/viz/${liveboardId}`;
|
|
@@ -17707,16 +18000,12 @@ query GetEurekaVizSnapshots(
|
|
|
17707
18000
|
}
|
|
17708
18001
|
}
|
|
17709
18002
|
beforePrerenderVisible() {
|
|
17710
|
-
|
|
17711
|
-
const
|
|
17712
|
-
|
|
17713
|
-
|
|
17714
|
-
|
|
17715
|
-
|
|
17716
|
-
if (showDifferentLib) {
|
|
17717
|
-
const libId = this.viewConfig.liveboardId;
|
|
17718
|
-
this.navigateToLiveboard(libId);
|
|
17719
|
-
}
|
|
18003
|
+
const embedObj = this.getPreRenderObj();
|
|
18004
|
+
const libId = this.currentLiveboardId;
|
|
18005
|
+
this.navigateToLiveboard(libId, this.viewConfig.vizId, this.viewConfig.activeTabId, () => {
|
|
18006
|
+
if (embedObj)
|
|
18007
|
+
embedObj.currentLiveboardId = libId;
|
|
18008
|
+
});
|
|
17720
18009
|
}
|
|
17721
18010
|
async handleRenderForPrerender() {
|
|
17722
18011
|
if (isUndefined$1(this.viewConfig.liveboardId)) {
|
|
@@ -17778,13 +18067,13 @@ query GetEurekaVizSnapshots(
|
|
|
17778
18067
|
this.postRender();
|
|
17779
18068
|
return this;
|
|
17780
18069
|
}
|
|
17781
|
-
navigateToLiveboard(liveboardId, vizId, activeTabId) {
|
|
18070
|
+
navigateToLiveboard(liveboardId, vizId, activeTabId, onNavigateCalled) {
|
|
17782
18071
|
const path = this.getIframeSuffixSrc(liveboardId, vizId, activeTabId);
|
|
17783
18072
|
this.viewConfig.liveboardId = liveboardId;
|
|
17784
18073
|
this.viewConfig.activeTabId = activeTabId;
|
|
17785
18074
|
this.viewConfig.vizId = vizId;
|
|
17786
18075
|
if (this.isRendered) {
|
|
17787
|
-
this.
|
|
18076
|
+
this.triggerAfterLoad(exports.HostEvent.Navigate, path.substring(1), onNavigateCalled);
|
|
17788
18077
|
}
|
|
17789
18078
|
else if (this.viewConfig.preRenderId) {
|
|
17790
18079
|
this.preRender(true);
|
|
@@ -17886,11 +18175,9 @@ query GetEurekaVizSnapshots(
|
|
|
17886
18175
|
const defaultAppInitData = await super.getAppInitData();
|
|
17887
18176
|
return { ...defaultAppInitData, ...this.getSearchInitData() };
|
|
17888
18177
|
}
|
|
17889
|
-
|
|
18178
|
+
getEmbedParamsObject() {
|
|
17890
18179
|
var _a;
|
|
17891
|
-
const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, hideSearchBar, dataPanelV2 = false, useLastSelectedSources = false, runtimeParameters, collapseSearchBarInitially = false, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false,
|
|
17892
|
-
/* eslint-disable-next-line max-len */
|
|
17893
|
-
dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, focusSearchBarOnRender = true, excludeRuntimeParametersfromURL, excludeSearchTokenStringFromURL, collapseSearchBar = true, } = this.viewConfig;
|
|
18180
|
+
const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, hideSearchBar, dataPanelV2 = false, useLastSelectedSources = false, runtimeParameters, collapseSearchBarInitially = false, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false, dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, focusSearchBarOnRender = true, excludeRuntimeParametersfromURL, excludeSearchTokenStringFromURL, collapseSearchBar = true, } = this.viewConfig;
|
|
17894
18181
|
const queryParams = this.getBaseQueryParams();
|
|
17895
18182
|
queryParams[Param.HideActions] = [
|
|
17896
18183
|
...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : []),
|
|
@@ -17923,7 +18210,6 @@ query GetEurekaVizSnapshots(
|
|
|
17923
18210
|
queryParams[Param.HideSearchBar] = true;
|
|
17924
18211
|
}
|
|
17925
18212
|
if (isOnBeforeGetVizDataInterceptEnabled) {
|
|
17926
|
-
/* eslint-disable-next-line max-len */
|
|
17927
18213
|
queryParams[Param.IsOnBeforeGetVizDataInterceptEnabled] = isOnBeforeGetVizDataInterceptEnabled;
|
|
17928
18214
|
}
|
|
17929
18215
|
if (!focusSearchBarOnRender) {
|
|
@@ -17936,20 +18222,22 @@ query GetEurekaVizSnapshots(
|
|
|
17936
18222
|
queryParams[Param.UseLastSelectedDataSource] = false;
|
|
17937
18223
|
}
|
|
17938
18224
|
queryParams[Param.searchEmbed] = true;
|
|
17939
|
-
/* eslint-disable-next-line max-len */
|
|
17940
18225
|
queryParams[Param.CollapseSearchBarInitially] = collapseSearchBarInitially || collapseSearchBar;
|
|
17941
18226
|
queryParams[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
|
|
17942
18227
|
if (dataPanelCustomGroupsAccordionInitialState
|
|
17943
18228
|
=== DataPanelCustomColumnGroupsAccordionState.COLLAPSE_ALL
|
|
17944
18229
|
|| dataPanelCustomGroupsAccordionInitialState
|
|
17945
18230
|
=== DataPanelCustomColumnGroupsAccordionState.EXPAND_FIRST) {
|
|
17946
|
-
/* eslint-disable-next-line max-len */
|
|
17947
18231
|
queryParams[Param.DataPanelCustomGroupsAccordionInitialState] = dataPanelCustomGroupsAccordionInitialState;
|
|
17948
18232
|
}
|
|
17949
18233
|
else {
|
|
17950
|
-
/* eslint-disable-next-line max-len */
|
|
17951
18234
|
queryParams[Param.DataPanelCustomGroupsAccordionInitialState] = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL;
|
|
17952
18235
|
}
|
|
18236
|
+
return queryParams;
|
|
18237
|
+
}
|
|
18238
|
+
getEmbedParams() {
|
|
18239
|
+
const { runtimeParameters, runtimeFilters, excludeRuntimeParametersfromURL, excludeRuntimeFiltersfromURL, } = this.viewConfig;
|
|
18240
|
+
const queryParams = this.getEmbedParamsObject();
|
|
17953
18241
|
let query = '';
|
|
17954
18242
|
const queryParamsString = getQueryParamString(queryParams, true);
|
|
17955
18243
|
if (queryParamsString) {
|
|
@@ -18005,15 +18293,9 @@ query GetEurekaVizSnapshots(
|
|
|
18005
18293
|
this.embedComponentType = 'SearchBarEmbed';
|
|
18006
18294
|
this.viewConfig = viewConfig;
|
|
18007
18295
|
}
|
|
18008
|
-
|
|
18009
|
-
* Construct the URL of the embedded ThoughtSpot search to be
|
|
18010
|
-
* loaded in the iframe
|
|
18011
|
-
* @param dataSources A list of data source GUIDs
|
|
18012
|
-
*/
|
|
18013
|
-
getIFrameSrc() {
|
|
18296
|
+
getEmbedParamsObject() {
|
|
18014
18297
|
var _a;
|
|
18015
18298
|
const { searchOptions, dataSource, dataSources, useLastSelectedSources = false, excludeSearchTokenStringFromURL, } = this.viewConfig;
|
|
18016
|
-
const path = 'search-bar-embed';
|
|
18017
18299
|
const queryParams = this.getBaseQueryParams();
|
|
18018
18300
|
queryParams[Param.HideActions] = [...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : [])];
|
|
18019
18301
|
if (dataSources && dataSources.length) {
|
|
@@ -18035,6 +18317,16 @@ query GetEurekaVizSnapshots(
|
|
|
18035
18317
|
queryParams[Param.UseLastSelectedDataSource] = false;
|
|
18036
18318
|
}
|
|
18037
18319
|
queryParams[Param.searchEmbed] = true;
|
|
18320
|
+
return queryParams;
|
|
18321
|
+
}
|
|
18322
|
+
/**
|
|
18323
|
+
* Construct the URL of the embedded ThoughtSpot search to be
|
|
18324
|
+
* loaded in the iframe
|
|
18325
|
+
* @param dataSources A list of data source GUIDs
|
|
18326
|
+
*/
|
|
18327
|
+
getIFrameSrc() {
|
|
18328
|
+
const queryParams = this.getEmbedParamsObject();
|
|
18329
|
+
const path = 'search-bar-embed';
|
|
18038
18330
|
let query = '';
|
|
18039
18331
|
const queryParamsString = getQueryParamString(queryParams, true);
|
|
18040
18332
|
if (queryParamsString) {
|
|
@@ -18429,7 +18721,11 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
18429
18721
|
return {
|
|
18430
18722
|
convId: this.conversationId,
|
|
18431
18723
|
messageId: responses[0].msgId,
|
|
18432
|
-
data:
|
|
18724
|
+
data: {
|
|
18725
|
+
...data.asstRespData.nlsAnsData.sageQuerySuggestions[0],
|
|
18726
|
+
convId: this.conversationId,
|
|
18727
|
+
messageId: responses[0].msgId,
|
|
18728
|
+
},
|
|
18433
18729
|
error: null,
|
|
18434
18730
|
};
|
|
18435
18731
|
}
|
|
@@ -18453,13 +18749,17 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
18453
18749
|
super(container, viewConfig);
|
|
18454
18750
|
this.viewConfig = viewConfig;
|
|
18455
18751
|
}
|
|
18456
|
-
|
|
18752
|
+
getEmbedParamsObject() {
|
|
18457
18753
|
var _a;
|
|
18458
|
-
const { sessionId, genNo, acSessionId, acGenNo, } = this.viewConfig;
|
|
18459
|
-
const path = 'conv-assist-answer';
|
|
18460
18754
|
const queryParams = this.getBaseQueryParams();
|
|
18461
18755
|
queryParams[Param.HideActions] = [...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : [])];
|
|
18462
18756
|
queryParams[Param.isSpotterAgentEmbed] = true;
|
|
18757
|
+
return queryParams;
|
|
18758
|
+
}
|
|
18759
|
+
getIframeSrc() {
|
|
18760
|
+
const { sessionId, genNo, acSessionId, acGenNo, convId, messageId, } = this.viewConfig;
|
|
18761
|
+
const path = 'conv-assist-answer';
|
|
18762
|
+
const queryParams = this.getEmbedParamsObject();
|
|
18463
18763
|
let query = '';
|
|
18464
18764
|
const queryParamsString = getQueryParamString(queryParams, true);
|
|
18465
18765
|
if (queryParamsString) {
|
|
@@ -18470,6 +18770,8 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
18470
18770
|
genNo,
|
|
18471
18771
|
acSessionId,
|
|
18472
18772
|
acGenNo,
|
|
18773
|
+
convId,
|
|
18774
|
+
messageId,
|
|
18473
18775
|
});
|
|
18474
18776
|
return `${this.getEmbedBasePath(query)}/embed/${path}${tsPostHashParams}`;
|
|
18475
18777
|
}
|
|
@@ -18513,6 +18815,8 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
18513
18815
|
const container = document.createElement('div');
|
|
18514
18816
|
const embed = new ConversationMessage(container, {
|
|
18515
18817
|
...this.viewConfig,
|
|
18818
|
+
convId: data.convId,
|
|
18819
|
+
messageId: data.messageId,
|
|
18516
18820
|
sessionId: data.sessionId,
|
|
18517
18821
|
genNo: data.genNo,
|
|
18518
18822
|
acSessionId: data.stateKey.transactionId,
|
|
@@ -18533,6 +18837,8 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
18533
18837
|
return { error };
|
|
18534
18838
|
}
|
|
18535
18839
|
return { data: {
|
|
18840
|
+
convId: data.convId,
|
|
18841
|
+
messageId: data.messageId,
|
|
18536
18842
|
sessionId: data.sessionId,
|
|
18537
18843
|
genNo: data.genNo,
|
|
18538
18844
|
acSessionId: data.stateKey.transactionId,
|
|
@@ -18614,9 +18920,8 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
18614
18920
|
super(container, viewConfig);
|
|
18615
18921
|
this.viewConfig = viewConfig;
|
|
18616
18922
|
}
|
|
18617
|
-
|
|
18923
|
+
getEmbedParamsObject() {
|
|
18618
18924
|
const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, } = this.viewConfig;
|
|
18619
|
-
const path = 'insights/conv-assist';
|
|
18620
18925
|
if (!worksheetId) {
|
|
18621
18926
|
this.handleError(ERROR_MESSAGE.SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND);
|
|
18622
18927
|
}
|
|
@@ -18637,6 +18942,12 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
18637
18942
|
if (!isUndefined_1(hideSampleQuestions)) {
|
|
18638
18943
|
queryParams[Param.HideSampleQuestions] = !!hideSampleQuestions;
|
|
18639
18944
|
}
|
|
18945
|
+
return queryParams;
|
|
18946
|
+
}
|
|
18947
|
+
getIframeSrc() {
|
|
18948
|
+
const { worksheetId, searchOptions, } = this.viewConfig;
|
|
18949
|
+
const path = 'insights/conv-assist';
|
|
18950
|
+
const queryParams = this.getEmbedParamsObject();
|
|
18640
18951
|
let query = '';
|
|
18641
18952
|
const queryParamsString = getQueryParamString(queryParams, true);
|
|
18642
18953
|
if (queryParamsString) {
|
|
@@ -18700,12 +19011,7 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
18700
19011
|
viewConfig.embedComponentType = 'SageEmbed';
|
|
18701
19012
|
super(domSelector, viewConfig);
|
|
18702
19013
|
}
|
|
18703
|
-
|
|
18704
|
-
* Constructs a map of parameters to be passed on to the
|
|
18705
|
-
* embedded Eureka or Sage search page.
|
|
18706
|
-
* @returns {string} query string
|
|
18707
|
-
*/
|
|
18708
|
-
getEmbedParams() {
|
|
19014
|
+
getEmbedParamsObject() {
|
|
18709
19015
|
const { disableWorksheetChange, hideWorksheetSelector, showObjectSuggestions, dataPanelV2, hideSampleQuestions, isProductTour, hideSageAnswerHeader, hideAutocompleteSuggestions, } = this.viewConfig;
|
|
18710
19016
|
const params = this.getBaseQueryParams();
|
|
18711
19017
|
params[Param.DataPanelV2Enabled] = !!dataPanelV2;
|
|
@@ -18720,6 +19026,15 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
18720
19026
|
params[Param.HideSampleQuestions] = !!hideSampleQuestions;
|
|
18721
19027
|
params[Param.IsProductTour] = !!isProductTour;
|
|
18722
19028
|
params[Param.HideSageAnswerHeader] = !!hideSageAnswerHeader;
|
|
19029
|
+
return params;
|
|
19030
|
+
}
|
|
19031
|
+
/**
|
|
19032
|
+
* Constructs a map of parameters to be passed on to the
|
|
19033
|
+
* embedded Eureka or Sage search page.
|
|
19034
|
+
* @returns {string} query string
|
|
19035
|
+
*/
|
|
19036
|
+
getEmbedParams() {
|
|
19037
|
+
const params = this.getEmbedParamsObject();
|
|
18723
19038
|
return getQueryParamString(params, true);
|
|
18724
19039
|
}
|
|
18725
19040
|
/**
|