@thoughtspot/visual-embed-sdk 1.40.0 → 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 +3 -1
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +35 -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 +9 -0
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +65 -10
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/types.d.ts +33 -64
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +33 -64
- package/cjs/src/types.js.map +1 -1
- package/dist/{index-CAEHQGLc.js → index-CmEQfuE3.js} +1 -1
- package/dist/index-D1pyb7RG.js +7371 -0
- package/dist/index-DeFzsyFF.js +7371 -0
- package/dist/index-Dpf0rd6w.js +7371 -0
- package/dist/index-UuEbsISo.js +7447 -0
- package/dist/index-e3Uw3YFO.js +7371 -0
- package/dist/index-k7pkZMhx.js +7371 -0
- package/dist/src/embed/bodyless-conversation.d.ts +1 -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/types.d.ts +33 -64
- package/dist/src/types.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +178 -117
- package/dist/tsembed-react.js +177 -116
- package/dist/tsembed.es.js +178 -117
- package/dist/tsembed.js +177 -116
- package/dist/visual-embed-sdk-react-full.d.ts +47 -65
- package/dist/visual-embed-sdk-react.d.ts +47 -65
- package/dist/visual-embed-sdk.d.ts +47 -65
- 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 +3 -1
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +35 -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 +9 -0
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +65 -10
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/types.d.ts +33 -64
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +33 -64
- package/lib/src/types.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +47 -65
- package/package.json +1 -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 +41 -14
- 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 +90 -24
- package/src/types.ts +34 -64
package/dist/tsembed.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @thoughtspot/visual-embed-sdk version 1.40.
|
|
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) :
|
|
@@ -1502,7 +1502,7 @@
|
|
|
1502
1502
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
1503
1503
|
* @example
|
|
1504
1504
|
*```js
|
|
1505
|
-
* liveboardEmbed.on(EmbedEvent.
|
|
1505
|
+
* liveboardEmbed.on(EmbedEvent.AnswerChartSwitcher, payload => {
|
|
1506
1506
|
* console.log('Liveboard details', payload);
|
|
1507
1507
|
* })
|
|
1508
1508
|
*```
|
|
@@ -1877,58 +1877,58 @@
|
|
|
1877
1877
|
*/
|
|
1878
1878
|
EmbedEvent["RequestVisibleEmbedCoordinates"] = "requestVisibleEmbedCoordinates";
|
|
1879
1879
|
/**
|
|
1880
|
-
* Emitted when
|
|
1880
|
+
* Emitted when spotter response is text data
|
|
1881
1881
|
* @example
|
|
1882
1882
|
* ```js
|
|
1883
1883
|
* spotterEmbed.on(EmbedEvent.SpotterData, (payload) => {
|
|
1884
1884
|
* console.log('payload', payload);
|
|
1885
1885
|
* })
|
|
1886
1886
|
*```
|
|
1887
|
-
* @version SDK: 1.
|
|
1887
|
+
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
1888
1888
|
*/
|
|
1889
1889
|
EmbedEvent["SpotterData"] = "SpotterData";
|
|
1890
1890
|
/**
|
|
1891
|
-
* Emitted when user opens up the worksheet preview modal in
|
|
1891
|
+
* Emitted when user opens up the worksheet preview modal in spotter embed.
|
|
1892
1892
|
* @example
|
|
1893
1893
|
* ```js
|
|
1894
1894
|
* spotterEmbed.on(EmbedEvent.PreviewSpotterData, (payload) => {
|
|
1895
1895
|
* console.log('payload', payload);
|
|
1896
1896
|
* })
|
|
1897
1897
|
*```
|
|
1898
|
-
* @version SDK: 1.
|
|
1898
|
+
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
1899
1899
|
*/
|
|
1900
1900
|
EmbedEvent["PreviewSpotterData"] = "PreviewSpotterData";
|
|
1901
1901
|
/**
|
|
1902
|
-
* Emitted when the
|
|
1902
|
+
* Emitted when the spotter query is triggered in spotter embed.
|
|
1903
1903
|
* @example
|
|
1904
1904
|
* ```js
|
|
1905
1905
|
* spotterEmbed.on(EmbedEvent.SpotterQueryTriggered, (payload) => {
|
|
1906
1906
|
* console.log('payload', payload);
|
|
1907
1907
|
* })
|
|
1908
1908
|
*```
|
|
1909
|
-
* @version SDK: 1.
|
|
1909
|
+
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
1910
1910
|
*/
|
|
1911
1911
|
EmbedEvent["SpotterQueryTriggered"] = "SpotterQueryTriggered";
|
|
1912
1912
|
/**
|
|
1913
|
-
* Emitted when the last
|
|
1913
|
+
* Emitted when the last spotter query is edited in spotter embed.
|
|
1914
1914
|
* @example
|
|
1915
1915
|
* ```js
|
|
1916
1916
|
* spotterEmbed.on(EmbedEvent.LastPromptEdited, (payload) => {
|
|
1917
1917
|
* console.log('payload', payload);
|
|
1918
1918
|
* })
|
|
1919
1919
|
*```
|
|
1920
|
-
* @version SDK: 1.
|
|
1920
|
+
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
1921
1921
|
*/
|
|
1922
1922
|
EmbedEvent["LastPromptEdited"] = "LastPromptEdited";
|
|
1923
1923
|
/**
|
|
1924
|
-
* Emitted when the last
|
|
1924
|
+
* Emitted when the last spotter query is deleted in spotter embed.
|
|
1925
1925
|
* @example
|
|
1926
1926
|
* ```js
|
|
1927
1927
|
* spotterEmbed.on(EmbedEvent.LastPromptDeleted, (payload) => {
|
|
1928
1928
|
* console.log('payload', payload);
|
|
1929
1929
|
* })
|
|
1930
1930
|
*```
|
|
1931
|
-
* @version SDK: 1.
|
|
1931
|
+
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
1932
1932
|
*/
|
|
1933
1933
|
EmbedEvent["LastPromptDeleted"] = "LastPromptDeleted";
|
|
1934
1934
|
/**
|
|
@@ -1939,7 +1939,7 @@
|
|
|
1939
1939
|
* console.log('payload', payload);
|
|
1940
1940
|
* })
|
|
1941
1941
|
*```
|
|
1942
|
-
* @version SDK: 1.
|
|
1942
|
+
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
1943
1943
|
*/
|
|
1944
1944
|
EmbedEvent["ResetSpotterConversation"] = "ResetSpotterConversation";
|
|
1945
1945
|
/**
|
|
@@ -1952,7 +1952,7 @@
|
|
|
1952
1952
|
*```
|
|
1953
1953
|
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
1954
1954
|
*/
|
|
1955
|
-
EmbedEvent["SpotterInit"] = "
|
|
1955
|
+
EmbedEvent["SpotterInit"] = "SpotterInit";
|
|
1956
1956
|
})(exports.EmbedEvent || (exports.EmbedEvent = {}));
|
|
1957
1957
|
/**
|
|
1958
1958
|
* Event types that can be triggered by the host application
|
|
@@ -2042,7 +2042,6 @@
|
|
|
2042
2042
|
* done automatically on the most popular column.
|
|
2043
2043
|
* @param - vizId [TS >= 9.8.0] - Optional. The GUID of the visualization to drill
|
|
2044
2044
|
* in case of a Liveboard.
|
|
2045
|
-
* @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
|
|
2046
2045
|
* @example
|
|
2047
2046
|
* ```js
|
|
2048
2047
|
* searchEmbed.on(EmbedEvent.VizPointDoubleClick, (payload) => {
|
|
@@ -2362,21 +2361,12 @@
|
|
|
2362
2361
|
* Trigger the **Download PDF** action on an embedded Liveboard,
|
|
2363
2362
|
* visualization or Answer.
|
|
2364
2363
|
*
|
|
2365
|
-
* @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
|
|
2366
|
-
*
|
|
2367
2364
|
* **NOTE**: The **Download** > **PDF** action is available on
|
|
2368
2365
|
* visualizations and Answers if the data is in tabular format.
|
|
2369
2366
|
* @example
|
|
2370
2367
|
* ```js
|
|
2371
2368
|
* liveboardEmbed.trigger(HostEvent.DownloadAsPdf)
|
|
2372
2369
|
* ```
|
|
2373
|
-
* @example
|
|
2374
|
-
* ```js
|
|
2375
|
-
* spotterEmbed.trigger(HostEvent.DownloadAsPdf, {
|
|
2376
|
-
* vizId:'730496d6-6903-4601-937e-2c691821af3c'
|
|
2377
|
-
* });
|
|
2378
|
-
* ```
|
|
2379
|
-
*
|
|
2380
2370
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2381
2371
|
*/
|
|
2382
2372
|
HostEvent["DownloadAsPdf"] = "downloadAsPdf";
|
|
@@ -2478,8 +2468,7 @@
|
|
|
2478
2468
|
* This event is not supported in visualization embed and search embed.
|
|
2479
2469
|
* @param - object - To trigger the action for a specific visualization
|
|
2480
2470
|
* in Liveboard embed, pass in `vizId` as a key.
|
|
2481
|
-
*
|
|
2482
|
-
*
|
|
2471
|
+
* **Required** in Spotter embed.
|
|
2483
2472
|
* @example
|
|
2484
2473
|
* ```js
|
|
2485
2474
|
* liveboardEmbed.trigger(HostEvent.Edit)
|
|
@@ -2494,12 +2483,6 @@
|
|
|
2494
2483
|
* vizId:'730496d6-6903-4601-937e-2c691821af3c'
|
|
2495
2484
|
* });
|
|
2496
2485
|
* ```
|
|
2497
|
-
* @example
|
|
2498
|
-
* ```js
|
|
2499
|
-
* const editResponse = await spotterEmbed.trigger(HostEvent.Edit, {
|
|
2500
|
-
* vizId:'730496d6-6903-4601-937e-2c691821af3c'
|
|
2501
|
-
* });
|
|
2502
|
-
* ```
|
|
2503
2486
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2504
2487
|
*/
|
|
2505
2488
|
HostEvent["Edit"] = "edit";
|
|
@@ -2620,7 +2603,6 @@
|
|
|
2620
2603
|
/**
|
|
2621
2604
|
* Trigger the **Download** action on charts in
|
|
2622
2605
|
* the embedded view.
|
|
2623
|
-
* @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
|
|
2624
2606
|
* @example
|
|
2625
2607
|
* ```js
|
|
2626
2608
|
* liveboardEmbed.trigger(HostEvent.Download, {vizId:
|
|
@@ -2629,11 +2611,6 @@
|
|
|
2629
2611
|
* ```js
|
|
2630
2612
|
* embed.trigger(HostEvent.Download)
|
|
2631
2613
|
* ```
|
|
2632
|
-
* ```js
|
|
2633
|
-
* spotterEmbed.trigger(HostEvent.Download, {
|
|
2634
|
-
* vizId:'730496d6-6903-4601-937e-2c691821af3c'
|
|
2635
|
-
* });
|
|
2636
|
-
* ```
|
|
2637
2614
|
* @deprecated from SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl ,9.4.1.sw
|
|
2638
2615
|
* Use {@link DownloadAsPng}
|
|
2639
2616
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
@@ -2662,7 +2639,6 @@
|
|
|
2662
2639
|
/**
|
|
2663
2640
|
* Trigger the **Download** > **CSV** action on tables in
|
|
2664
2641
|
* the embedded view.
|
|
2665
|
-
* @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
|
|
2666
2642
|
* @example
|
|
2667
2643
|
* ```js
|
|
2668
2644
|
* liveboardEmbed.trigger(HostEvent.DownloadAsCsv, {vizId:
|
|
@@ -2685,7 +2661,6 @@
|
|
|
2685
2661
|
/**
|
|
2686
2662
|
* Trigger the **Download** > **XLSX** action on tables
|
|
2687
2663
|
* in the embedded view.
|
|
2688
|
-
* @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
|
|
2689
2664
|
* @example
|
|
2690
2665
|
* ```js
|
|
2691
2666
|
* liveboardEmbed.trigger(HostEvent.DownloadAsXlsx, {vizId:
|
|
@@ -2721,7 +2696,7 @@
|
|
|
2721
2696
|
/**
|
|
2722
2697
|
* Trigger the **Save** action on a Liveboard or Answer.
|
|
2723
2698
|
* Saves the changes.
|
|
2724
|
-
* @param - `vizId`
|
|
2699
|
+
* @param - `vizId` is required in Spotter Embed.
|
|
2725
2700
|
* @example
|
|
2726
2701
|
* ```js
|
|
2727
2702
|
* liveboardEmbed.trigger(HostEvent.Save)
|
|
@@ -3031,7 +3006,6 @@
|
|
|
3031
3006
|
HostEvent["UpdateParameters"] = "UpdateParameters";
|
|
3032
3007
|
/**
|
|
3033
3008
|
* Triggers GetParameters to fetch the runtime Parameters.
|
|
3034
|
-
* @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
|
|
3035
3009
|
* ```js
|
|
3036
3010
|
* liveboardEmbed.trigger(HostEvent.GetParameters).then((parameter) => {
|
|
3037
3011
|
* console.log('parameters', parameter);
|
|
@@ -3075,7 +3049,7 @@
|
|
|
3075
3049
|
* @param - optional attributes to set Answer properties.
|
|
3076
3050
|
* `name` - Name string for the Answer.
|
|
3077
3051
|
* `description` - Description text for the Answer.
|
|
3078
|
-
*
|
|
3052
|
+
*
|
|
3079
3053
|
* @example
|
|
3080
3054
|
* ```js
|
|
3081
3055
|
* const saveAnswerResponse = await searchEmbed.trigger(HostEvent.SaveAnswer, {
|
|
@@ -3083,14 +3057,6 @@
|
|
|
3083
3057
|
* description: "Total sales by states in MidWest"
|
|
3084
3058
|
* });
|
|
3085
3059
|
* ```
|
|
3086
|
-
* @example
|
|
3087
|
-
* ```js
|
|
3088
|
-
* const saveAnswerResponse = await spotterEmbed.trigger(HostEvent.SaveAnswer, {
|
|
3089
|
-
* vizId: '730496d6-6903-4601-937e-2c691821af3c',
|
|
3090
|
-
* name: "Sales by states",
|
|
3091
|
-
* description: "Total sales by states in MidWest"
|
|
3092
|
-
* });
|
|
3093
|
-
* ```
|
|
3094
3060
|
* @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
|
|
3095
3061
|
*/
|
|
3096
3062
|
HostEvent["SaveAnswer"] = "saveAnswer";
|
|
@@ -3122,7 +3088,7 @@
|
|
|
3122
3088
|
/**
|
|
3123
3089
|
* Triggers a search operation with the search tokens specified in
|
|
3124
3090
|
* the search query string in spotter embed.
|
|
3125
|
-
* @param - `
|
|
3091
|
+
* @param - `queryString`: Text string in Natural Language format
|
|
3126
3092
|
* @param - `executeSearch`: Boolean to execute search and update search query
|
|
3127
3093
|
* @example
|
|
3128
3094
|
* ```js
|
|
@@ -3131,7 +3097,6 @@
|
|
|
3131
3097
|
* executeSearch: true,
|
|
3132
3098
|
* })
|
|
3133
3099
|
* ```
|
|
3134
|
-
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
3135
3100
|
*/
|
|
3136
3101
|
HostEvent["SpotterSearch"] = "SpotterSearch";
|
|
3137
3102
|
/**
|
|
@@ -3141,7 +3106,6 @@
|
|
|
3141
3106
|
* ```js
|
|
3142
3107
|
* spotterEmbed.trigger(HostEvent.EditLastPrompt, "revenue per year");
|
|
3143
3108
|
* ```
|
|
3144
|
-
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
3145
3109
|
*/
|
|
3146
3110
|
HostEvent["EditLastPrompt"] = "EditLastPrompt";
|
|
3147
3111
|
/**
|
|
@@ -3150,7 +3114,6 @@
|
|
|
3150
3114
|
* ```js
|
|
3151
3115
|
* spotterEmbed.trigger(HostEvent.PreviewSpotterData);
|
|
3152
3116
|
* ```
|
|
3153
|
-
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
3154
3117
|
*/
|
|
3155
3118
|
HostEvent["PreviewSpotterData"] = "PreviewSpotterData";
|
|
3156
3119
|
/**
|
|
@@ -3159,7 +3122,6 @@
|
|
|
3159
3122
|
* ```js
|
|
3160
3123
|
* spotterEmbed.trigger(HostEvent.ResetSpotterConversation);
|
|
3161
3124
|
* ```
|
|
3162
|
-
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
3163
3125
|
*/
|
|
3164
3126
|
HostEvent["ResetSpotterConversation"] = "ResetSpotterConversation";
|
|
3165
3127
|
/**
|
|
@@ -3168,19 +3130,17 @@
|
|
|
3168
3130
|
* ```js
|
|
3169
3131
|
* spotterEmbed.trigger(HostEvent.DeleteLastPrompt);
|
|
3170
3132
|
* ```
|
|
3171
|
-
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
3172
3133
|
*/
|
|
3173
3134
|
HostEvent["DeleteLastPrompt"] = "DeleteLastPrompt";
|
|
3174
3135
|
/**
|
|
3175
3136
|
* Toggle the visualization to chart or table view.
|
|
3176
|
-
* @param - `vizId `
|
|
3137
|
+
* @param - `vizId ` In Spotter Embed, vizId is required.
|
|
3177
3138
|
* @example
|
|
3178
3139
|
* ```js
|
|
3179
3140
|
* spotterEmbed.trigger(HostEvent.AnswerChartSwitcher, {
|
|
3180
|
-
* vizId:'b535c760-8bbe-4e6f-bb26-af56b4129a1e'
|
|
3141
|
+
* vizId:"'b535c760-8bbe-4e6f-bb26-af56b4129a1e'"
|
|
3181
3142
|
* });
|
|
3182
3143
|
*```
|
|
3183
|
-
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
3184
3144
|
*/
|
|
3185
3145
|
HostEvent["AnswerChartSwitcher"] = "answerChartSwitcher";
|
|
3186
3146
|
/**
|
|
@@ -3207,16 +3167,25 @@
|
|
|
3207
3167
|
*/
|
|
3208
3168
|
HostEvent["VisibleEmbedCoordinates"] = "visibleEmbedCoordinates";
|
|
3209
3169
|
/**
|
|
3210
|
-
* Trigger the *Ask
|
|
3211
|
-
* @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
|
|
3170
|
+
* Trigger the *Ask Sage* action for visualizations
|
|
3212
3171
|
* @example
|
|
3213
3172
|
* ```js
|
|
3214
|
-
*
|
|
3215
|
-
* {
|
|
3173
|
+
* liveboardEmbed.trigger(HostEvent.AskSpotter,
|
|
3174
|
+
* {containerId:'730496d6-6903-4601-937e-2c691821af3c'})
|
|
3216
3175
|
* ```
|
|
3217
3176
|
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
3218
3177
|
*/
|
|
3219
|
-
HostEvent["AskSpotter"] = "
|
|
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";
|
|
3220
3189
|
})(exports.HostEvent || (exports.HostEvent = {}));
|
|
3221
3190
|
/**
|
|
3222
3191
|
* The different visual modes that the data sources panel within
|
|
@@ -15858,7 +15827,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
15858
15827
|
return e;
|
|
15859
15828
|
}
|
|
15860
15829
|
|
|
15861
|
-
var name="@thoughtspot/visual-embed-sdk";var version$1="1.40.
|
|
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};
|
|
15862
15831
|
|
|
15863
15832
|
/**
|
|
15864
15833
|
* Reloads the ThoughtSpot iframe.
|
|
@@ -16084,6 +16053,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
16084
16053
|
*/
|
|
16085
16054
|
this.fullscreenChangeHandler = null;
|
|
16086
16055
|
this.subscribedListeners = {};
|
|
16056
|
+
this.isEmbedContainerLoaded = false;
|
|
16087
16057
|
/**
|
|
16088
16058
|
* Send Custom style as part of payload of APP_INIT
|
|
16089
16059
|
* @param _
|
|
@@ -16110,7 +16080,8 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
16110
16080
|
this.updateAuthToken = async (_, responder) => {
|
|
16111
16081
|
const { authType } = this.embedConfig;
|
|
16112
16082
|
let { autoLogin } = this.embedConfig;
|
|
16113
|
-
// Default autoLogin: true for cookieless if undefined/null, otherwise
|
|
16083
|
+
// Default autoLogin: true for cookieless if undefined/null, otherwise
|
|
16084
|
+
// false
|
|
16114
16085
|
autoLogin = autoLogin !== null && autoLogin !== void 0 ? autoLogin : (authType === exports.AuthType.TrustedAuthTokenCookieless);
|
|
16115
16086
|
if (autoLogin && authType === exports.AuthType.TrustedAuthTokenCookieless) {
|
|
16116
16087
|
try {
|
|
@@ -16154,11 +16125,16 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
16154
16125
|
});
|
|
16155
16126
|
notifyAuthFailure(exports.AuthFailureType.IDLE_SESSION_TIMEOUT);
|
|
16156
16127
|
};
|
|
16128
|
+
this.pendingEvents = [];
|
|
16157
16129
|
/**
|
|
16158
16130
|
* Register APP_INIT event and sendback init payload
|
|
16159
16131
|
*/
|
|
16160
16132
|
this.registerAppInit = () => {
|
|
16161
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);
|
|
16162
16138
|
this.on(exports.EmbedEvent.AuthExpire, this.updateAuthToken, { start: false }, true);
|
|
16163
16139
|
this.on(exports.EmbedEvent.IdleSessionTimeout, this.idleSessionTimeout, { start: false }, true);
|
|
16164
16140
|
};
|
|
@@ -16184,6 +16160,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
16184
16160
|
});
|
|
16185
16161
|
}
|
|
16186
16162
|
};
|
|
16163
|
+
this.id = Date.now().toString();
|
|
16187
16164
|
this.el = getDOMNode(domSelector);
|
|
16188
16165
|
this.eventHandlerMap = new Map();
|
|
16189
16166
|
this.isError = false;
|
|
@@ -16197,9 +16174,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
16197
16174
|
...viewConfig,
|
|
16198
16175
|
});
|
|
16199
16176
|
this.hostEventClient = new HostEventClient(this.iFrame);
|
|
16177
|
+
const embedConfig = getEmbedConfig();
|
|
16178
|
+
this.embedConfig = embedConfig;
|
|
16200
16179
|
this.isReadyForRenderPromise = getInitPromise().then(async () => {
|
|
16201
|
-
const embedConfig = getEmbedConfig();
|
|
16202
|
-
this.embedConfig = embedConfig;
|
|
16203
16180
|
if (!embedConfig.authTriggerContainer && !embedConfig.useEventForSAMLPopup) {
|
|
16204
16181
|
this.embedConfig.authTriggerContainer = domSelector;
|
|
16205
16182
|
}
|
|
@@ -16232,7 +16209,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
16232
16209
|
*/
|
|
16233
16210
|
getEventType(event) {
|
|
16234
16211
|
var _a, _b;
|
|
16235
|
-
// eslint-disable-next-line no-underscore-dangle
|
|
16236
16212
|
return ((_a = event.data) === null || _a === void 0 ? void 0 : _a.type) || ((_b = event.data) === null || _b === void 0 ? void 0 : _b.__type);
|
|
16237
16213
|
}
|
|
16238
16214
|
/**
|
|
@@ -16371,6 +16347,43 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
16371
16347
|
async getAppInitData() {
|
|
16372
16348
|
return this.getDefaultAppInitData();
|
|
16373
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
|
+
}
|
|
16374
16387
|
/**
|
|
16375
16388
|
* Constructs the base URL string to load the ThoughtSpot app.
|
|
16376
16389
|
* @param query
|
|
@@ -16385,6 +16398,11 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
16385
16398
|
.join('/');
|
|
16386
16399
|
return `${basePath}#`;
|
|
16387
16400
|
}
|
|
16401
|
+
getUpdateEmbedParamsObject() {
|
|
16402
|
+
let queryParams = this.getEmbedParamsObject();
|
|
16403
|
+
queryParams = { ...this.viewConfig, ...queryParams };
|
|
16404
|
+
return queryParams;
|
|
16405
|
+
}
|
|
16388
16406
|
/**
|
|
16389
16407
|
* Common query params set for all the embed modes.
|
|
16390
16408
|
* @param queryParams
|
|
@@ -16534,9 +16552,13 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
16534
16552
|
return path;
|
|
16535
16553
|
}
|
|
16536
16554
|
getEmbedParams() {
|
|
16537
|
-
const queryParams = this.
|
|
16555
|
+
const queryParams = this.getEmbedParamsObject();
|
|
16538
16556
|
return getQueryParamString(queryParams);
|
|
16539
16557
|
}
|
|
16558
|
+
getEmbedParamsObject() {
|
|
16559
|
+
const params = this.getBaseQueryParams();
|
|
16560
|
+
return params;
|
|
16561
|
+
}
|
|
16540
16562
|
getRootIframeSrc() {
|
|
16541
16563
|
const query = this.getEmbedParams();
|
|
16542
16564
|
return this.getEmbedBasePath(query);
|
|
@@ -16635,7 +16657,8 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
16635
16657
|
}
|
|
16636
16658
|
});
|
|
16637
16659
|
}
|
|
16638
|
-
// Setup fullscreen change handler after iframe is
|
|
16660
|
+
// Setup fullscreen change handler after iframe is
|
|
16661
|
+
// loaded and ready
|
|
16639
16662
|
this.setupFullscreenChangeHandler();
|
|
16640
16663
|
});
|
|
16641
16664
|
this.iFrame.addEventListener('error', () => {
|
|
@@ -16737,7 +16760,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
16737
16760
|
const div = document.createElement('div');
|
|
16738
16761
|
div.innerHTML = child;
|
|
16739
16762
|
div.id = TS_EMBED_ID;
|
|
16740
|
-
// eslint-disable-next-line no-param-reassign
|
|
16741
16763
|
child = div;
|
|
16742
16764
|
}
|
|
16743
16765
|
if (((_a = this.el.nextElementSibling) === null || _a === void 0 ? void 0 : _a.id) === TS_EMBED_ID) {
|
|
@@ -17060,7 +17082,10 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
17060
17082
|
return this.preRender(true);
|
|
17061
17083
|
}
|
|
17062
17084
|
this.validatePreRenderViewConfig(this.viewConfig);
|
|
17085
|
+
logger$3.debug('triggering UpdateEmbedParams', this.viewConfig);
|
|
17086
|
+
this.triggerAfterLoad(exports.HostEvent.UpdateEmbedParams, this.getUpdateEmbedParamsObject());
|
|
17063
17087
|
}
|
|
17088
|
+
this.beforePrerenderVisible();
|
|
17064
17089
|
if (this.el) {
|
|
17065
17090
|
this.syncPreRenderStyle();
|
|
17066
17091
|
if (!this.viewConfig.doNotTrackPreRenderSize) {
|
|
@@ -17077,7 +17102,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
17077
17102
|
this.resizeObserver.observe(this.el);
|
|
17078
17103
|
}
|
|
17079
17104
|
}
|
|
17080
|
-
this.beforePrerenderVisible();
|
|
17081
17105
|
removeStyleProperties(this.preRenderWrapper, ['z-index', 'opacity', 'pointer-events']);
|
|
17082
17106
|
this.subscribeToEvents();
|
|
17083
17107
|
// Setup fullscreen change handler for prerendered components
|
|
@@ -17170,7 +17194,8 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
17170
17194
|
const isFullscreen = !!document.fullscreenElement;
|
|
17171
17195
|
if (!isFullscreen) {
|
|
17172
17196
|
logger$3.info('Exited fullscreen mode - triggering ExitPresentMode');
|
|
17173
|
-
// Only trigger if iframe is available and contentWindow is
|
|
17197
|
+
// Only trigger if iframe is available and contentWindow is
|
|
17198
|
+
// accessible
|
|
17174
17199
|
if (this.iFrame && this.iFrame.contentWindow) {
|
|
17175
17200
|
this.trigger(exports.HostEvent.ExitPresentMode);
|
|
17176
17201
|
}
|
|
@@ -17204,7 +17229,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
17204
17229
|
* Only for testing purposes.
|
|
17205
17230
|
* @hidden
|
|
17206
17231
|
*/
|
|
17207
|
-
// eslint-disable-next-line camelcase
|
|
17208
17232
|
this.test__executeCallbacks = this.executeCallbacks;
|
|
17209
17233
|
this.viewConfig = { excludeRuntimeFiltersfromURL: false, ...viewConfig };
|
|
17210
17234
|
}
|
|
@@ -17803,6 +17827,7 @@ query GetEurekaVizSnapshots(
|
|
|
17803
17827
|
}
|
|
17804
17828
|
this.setIFrameHeight(frameHeight || this.defaultHeight);
|
|
17805
17829
|
};
|
|
17830
|
+
this.currentLiveboardId = this.viewConfig.liveboardId;
|
|
17806
17831
|
if (this.viewConfig.fullHeight === true) {
|
|
17807
17832
|
if (this.viewConfig.vizId) {
|
|
17808
17833
|
logger$3.warn('Full height is currently only supported for Liveboard embeds.' +
|
|
@@ -17819,6 +17844,11 @@ query GetEurekaVizSnapshots(
|
|
|
17819
17844
|
* embedded Liveboard or visualization.
|
|
17820
17845
|
*/
|
|
17821
17846
|
getEmbedParams() {
|
|
17847
|
+
const params = this.getEmbedParamsObject();
|
|
17848
|
+
const queryParams = getQueryParamString(params, true);
|
|
17849
|
+
return queryParams;
|
|
17850
|
+
}
|
|
17851
|
+
getEmbedParamsObject() {
|
|
17822
17852
|
let params = {};
|
|
17823
17853
|
params = this.getBaseQueryParams(params);
|
|
17824
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;
|
|
@@ -17888,8 +17918,27 @@ query GetEurekaVizSnapshots(
|
|
|
17888
17918
|
params[Param.DataPanelV2Enabled] = dataPanelV2;
|
|
17889
17919
|
params[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
|
|
17890
17920
|
params[Param.CoverAndFilterOptionInPDF] = coverAndFilterOptionInPDF;
|
|
17891
|
-
|
|
17892
|
-
|
|
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;
|
|
17893
17942
|
}
|
|
17894
17943
|
getIframeSuffixSrc(liveboardId, vizId, activeTabId) {
|
|
17895
17944
|
let suffix = `/embed/viz/${liveboardId}`;
|
|
@@ -17951,16 +18000,12 @@ query GetEurekaVizSnapshots(
|
|
|
17951
18000
|
}
|
|
17952
18001
|
}
|
|
17953
18002
|
beforePrerenderVisible() {
|
|
17954
|
-
|
|
17955
|
-
const
|
|
17956
|
-
|
|
17957
|
-
|
|
17958
|
-
|
|
17959
|
-
|
|
17960
|
-
if (showDifferentLib) {
|
|
17961
|
-
const libId = this.viewConfig.liveboardId;
|
|
17962
|
-
this.navigateToLiveboard(libId);
|
|
17963
|
-
}
|
|
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
|
+
});
|
|
17964
18009
|
}
|
|
17965
18010
|
async handleRenderForPrerender() {
|
|
17966
18011
|
if (isUndefined$1(this.viewConfig.liveboardId)) {
|
|
@@ -18022,13 +18067,13 @@ query GetEurekaVizSnapshots(
|
|
|
18022
18067
|
this.postRender();
|
|
18023
18068
|
return this;
|
|
18024
18069
|
}
|
|
18025
|
-
navigateToLiveboard(liveboardId, vizId, activeTabId) {
|
|
18070
|
+
navigateToLiveboard(liveboardId, vizId, activeTabId, onNavigateCalled) {
|
|
18026
18071
|
const path = this.getIframeSuffixSrc(liveboardId, vizId, activeTabId);
|
|
18027
18072
|
this.viewConfig.liveboardId = liveboardId;
|
|
18028
18073
|
this.viewConfig.activeTabId = activeTabId;
|
|
18029
18074
|
this.viewConfig.vizId = vizId;
|
|
18030
18075
|
if (this.isRendered) {
|
|
18031
|
-
this.
|
|
18076
|
+
this.triggerAfterLoad(exports.HostEvent.Navigate, path.substring(1), onNavigateCalled);
|
|
18032
18077
|
}
|
|
18033
18078
|
else if (this.viewConfig.preRenderId) {
|
|
18034
18079
|
this.preRender(true);
|
|
@@ -18130,11 +18175,9 @@ query GetEurekaVizSnapshots(
|
|
|
18130
18175
|
const defaultAppInitData = await super.getAppInitData();
|
|
18131
18176
|
return { ...defaultAppInitData, ...this.getSearchInitData() };
|
|
18132
18177
|
}
|
|
18133
|
-
|
|
18178
|
+
getEmbedParamsObject() {
|
|
18134
18179
|
var _a;
|
|
18135
|
-
const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, hideSearchBar, dataPanelV2 = false, useLastSelectedSources = false, runtimeParameters, collapseSearchBarInitially = false, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false,
|
|
18136
|
-
/* eslint-disable-next-line max-len */
|
|
18137
|
-
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;
|
|
18138
18181
|
const queryParams = this.getBaseQueryParams();
|
|
18139
18182
|
queryParams[Param.HideActions] = [
|
|
18140
18183
|
...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : []),
|
|
@@ -18167,7 +18210,6 @@ query GetEurekaVizSnapshots(
|
|
|
18167
18210
|
queryParams[Param.HideSearchBar] = true;
|
|
18168
18211
|
}
|
|
18169
18212
|
if (isOnBeforeGetVizDataInterceptEnabled) {
|
|
18170
|
-
/* eslint-disable-next-line max-len */
|
|
18171
18213
|
queryParams[Param.IsOnBeforeGetVizDataInterceptEnabled] = isOnBeforeGetVizDataInterceptEnabled;
|
|
18172
18214
|
}
|
|
18173
18215
|
if (!focusSearchBarOnRender) {
|
|
@@ -18180,20 +18222,22 @@ query GetEurekaVizSnapshots(
|
|
|
18180
18222
|
queryParams[Param.UseLastSelectedDataSource] = false;
|
|
18181
18223
|
}
|
|
18182
18224
|
queryParams[Param.searchEmbed] = true;
|
|
18183
|
-
/* eslint-disable-next-line max-len */
|
|
18184
18225
|
queryParams[Param.CollapseSearchBarInitially] = collapseSearchBarInitially || collapseSearchBar;
|
|
18185
18226
|
queryParams[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
|
|
18186
18227
|
if (dataPanelCustomGroupsAccordionInitialState
|
|
18187
18228
|
=== DataPanelCustomColumnGroupsAccordionState.COLLAPSE_ALL
|
|
18188
18229
|
|| dataPanelCustomGroupsAccordionInitialState
|
|
18189
18230
|
=== DataPanelCustomColumnGroupsAccordionState.EXPAND_FIRST) {
|
|
18190
|
-
/* eslint-disable-next-line max-len */
|
|
18191
18231
|
queryParams[Param.DataPanelCustomGroupsAccordionInitialState] = dataPanelCustomGroupsAccordionInitialState;
|
|
18192
18232
|
}
|
|
18193
18233
|
else {
|
|
18194
|
-
/* eslint-disable-next-line max-len */
|
|
18195
18234
|
queryParams[Param.DataPanelCustomGroupsAccordionInitialState] = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL;
|
|
18196
18235
|
}
|
|
18236
|
+
return queryParams;
|
|
18237
|
+
}
|
|
18238
|
+
getEmbedParams() {
|
|
18239
|
+
const { runtimeParameters, runtimeFilters, excludeRuntimeParametersfromURL, excludeRuntimeFiltersfromURL, } = this.viewConfig;
|
|
18240
|
+
const queryParams = this.getEmbedParamsObject();
|
|
18197
18241
|
let query = '';
|
|
18198
18242
|
const queryParamsString = getQueryParamString(queryParams, true);
|
|
18199
18243
|
if (queryParamsString) {
|
|
@@ -18249,15 +18293,9 @@ query GetEurekaVizSnapshots(
|
|
|
18249
18293
|
this.embedComponentType = 'SearchBarEmbed';
|
|
18250
18294
|
this.viewConfig = viewConfig;
|
|
18251
18295
|
}
|
|
18252
|
-
|
|
18253
|
-
* Construct the URL of the embedded ThoughtSpot search to be
|
|
18254
|
-
* loaded in the iframe
|
|
18255
|
-
* @param dataSources A list of data source GUIDs
|
|
18256
|
-
*/
|
|
18257
|
-
getIFrameSrc() {
|
|
18296
|
+
getEmbedParamsObject() {
|
|
18258
18297
|
var _a;
|
|
18259
18298
|
const { searchOptions, dataSource, dataSources, useLastSelectedSources = false, excludeSearchTokenStringFromURL, } = this.viewConfig;
|
|
18260
|
-
const path = 'search-bar-embed';
|
|
18261
18299
|
const queryParams = this.getBaseQueryParams();
|
|
18262
18300
|
queryParams[Param.HideActions] = [...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : [])];
|
|
18263
18301
|
if (dataSources && dataSources.length) {
|
|
@@ -18279,6 +18317,16 @@ query GetEurekaVizSnapshots(
|
|
|
18279
18317
|
queryParams[Param.UseLastSelectedDataSource] = false;
|
|
18280
18318
|
}
|
|
18281
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';
|
|
18282
18330
|
let query = '';
|
|
18283
18331
|
const queryParamsString = getQueryParamString(queryParams, true);
|
|
18284
18332
|
if (queryParamsString) {
|
|
@@ -18701,13 +18749,17 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
18701
18749
|
super(container, viewConfig);
|
|
18702
18750
|
this.viewConfig = viewConfig;
|
|
18703
18751
|
}
|
|
18704
|
-
|
|
18752
|
+
getEmbedParamsObject() {
|
|
18705
18753
|
var _a;
|
|
18706
|
-
const { sessionId, genNo, acSessionId, acGenNo, convId, messageId, } = this.viewConfig;
|
|
18707
|
-
const path = 'conv-assist-answer';
|
|
18708
18754
|
const queryParams = this.getBaseQueryParams();
|
|
18709
18755
|
queryParams[Param.HideActions] = [...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : [])];
|
|
18710
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();
|
|
18711
18763
|
let query = '';
|
|
18712
18764
|
const queryParamsString = getQueryParamString(queryParams, true);
|
|
18713
18765
|
if (queryParamsString) {
|
|
@@ -18868,9 +18920,8 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
18868
18920
|
super(container, viewConfig);
|
|
18869
18921
|
this.viewConfig = viewConfig;
|
|
18870
18922
|
}
|
|
18871
|
-
|
|
18923
|
+
getEmbedParamsObject() {
|
|
18872
18924
|
const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, } = this.viewConfig;
|
|
18873
|
-
const path = 'insights/conv-assist';
|
|
18874
18925
|
if (!worksheetId) {
|
|
18875
18926
|
this.handleError(ERROR_MESSAGE.SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND);
|
|
18876
18927
|
}
|
|
@@ -18891,6 +18942,12 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
18891
18942
|
if (!isUndefined_1(hideSampleQuestions)) {
|
|
18892
18943
|
queryParams[Param.HideSampleQuestions] = !!hideSampleQuestions;
|
|
18893
18944
|
}
|
|
18945
|
+
return queryParams;
|
|
18946
|
+
}
|
|
18947
|
+
getIframeSrc() {
|
|
18948
|
+
const { worksheetId, searchOptions, } = this.viewConfig;
|
|
18949
|
+
const path = 'insights/conv-assist';
|
|
18950
|
+
const queryParams = this.getEmbedParamsObject();
|
|
18894
18951
|
let query = '';
|
|
18895
18952
|
const queryParamsString = getQueryParamString(queryParams, true);
|
|
18896
18953
|
if (queryParamsString) {
|
|
@@ -18954,12 +19011,7 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
18954
19011
|
viewConfig.embedComponentType = 'SageEmbed';
|
|
18955
19012
|
super(domSelector, viewConfig);
|
|
18956
19013
|
}
|
|
18957
|
-
|
|
18958
|
-
* Constructs a map of parameters to be passed on to the
|
|
18959
|
-
* embedded Eureka or Sage search page.
|
|
18960
|
-
* @returns {string} query string
|
|
18961
|
-
*/
|
|
18962
|
-
getEmbedParams() {
|
|
19014
|
+
getEmbedParamsObject() {
|
|
18963
19015
|
const { disableWorksheetChange, hideWorksheetSelector, showObjectSuggestions, dataPanelV2, hideSampleQuestions, isProductTour, hideSageAnswerHeader, hideAutocompleteSuggestions, } = this.viewConfig;
|
|
18964
19016
|
const params = this.getBaseQueryParams();
|
|
18965
19017
|
params[Param.DataPanelV2Enabled] = !!dataPanelV2;
|
|
@@ -18974,6 +19026,15 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
18974
19026
|
params[Param.HideSampleQuestions] = !!hideSampleQuestions;
|
|
18975
19027
|
params[Param.IsProductTour] = !!isProductTour;
|
|
18976
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();
|
|
18977
19038
|
return getQueryParamString(params, true);
|
|
18978
19039
|
}
|
|
18979
19040
|
/**
|