@thoughtspot/visual-embed-sdk 1.40.0 → 1.40.1-alpha.1
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/liveboard.d.ts +2 -1
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +13 -8
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/ts-embed.d.ts +7 -0
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +61 -7
- 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/src/embed/bodyless-conversation.d.ts +0 -4
- package/dist/src/embed/bodyless-conversation.d.ts.map +1 -1
- package/dist/src/react/index.d.ts +0 -2
- package/dist/src/react/index.d.ts.map +1 -1
- package/dist/src/types.d.ts +9 -253
- 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 +13 -267
- package/dist/tsembed-react.js +12 -266
- package/dist/tsembed.es.js +13 -267
- package/dist/tsembed.js +12 -266
- package/dist/visual-embed-sdk-react-full.d.ts +9 -259
- package/dist/visual-embed-sdk-react.d.ts +9 -259
- package/dist/visual-embed-sdk.d.ts +9 -257
- package/lib/package.json +1 -1
- package/lib/src/embed/liveboard.d.ts +2 -1
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +13 -8
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts +7 -0
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +61 -7
- 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 +9 -257
- package/package.json +1 -2
- package/src/embed/liveboard.ts +14 -7
- package/src/embed/ts-embed.ts +84 -21
- package/src/types.ts +34 -64
package/dist/tsembed.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @thoughtspot/visual-embed-sdk version 1.
|
|
1
|
+
/* @thoughtspot/visual-embed-sdk version 1.39.2-alpha.3 */
|
|
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
|
*```
|
|
@@ -1876,83 +1876,6 @@
|
|
|
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.39.0 | ThoughtSpot: 10.10.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.39.0 | ThoughtSpot: 10.10.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.39.0 | ThoughtSpot: 10.10.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.39.0 | ThoughtSpot: 10.10.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.39.0 | ThoughtSpot: 10.10.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.39.0 | ThoughtSpot: 10.10.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";
|
|
1956
1879
|
})(exports.EmbedEvent || (exports.EmbedEvent = {}));
|
|
1957
1880
|
/**
|
|
1958
1881
|
* Event types that can be triggered by the host application
|
|
@@ -1970,7 +1893,7 @@
|
|
|
1970
1893
|
* // create the liveboard embed.
|
|
1971
1894
|
*
|
|
1972
1895
|
* liveboardEmbed.trigger(HostEvent.UpdateRuntimeFilters, [
|
|
1973
|
-
* { columnName: 'state
|
|
1896
|
+
* { columnName: 'state, operator: RuntimeFilterOp.EQ, values: ['california']}
|
|
1974
1897
|
* ]);
|
|
1975
1898
|
* ```
|
|
1976
1899
|
* @example
|
|
@@ -2042,7 +1965,6 @@
|
|
|
2042
1965
|
* done automatically on the most popular column.
|
|
2043
1966
|
* @param - vizId [TS >= 9.8.0] - Optional. The GUID of the visualization to drill
|
|
2044
1967
|
* in case of a Liveboard.
|
|
2045
|
-
* @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
|
|
2046
1968
|
* @example
|
|
2047
1969
|
* ```js
|
|
2048
1970
|
* searchEmbed.on(EmbedEvent.VizPointDoubleClick, (payload) => {
|
|
@@ -2181,12 +2103,12 @@
|
|
|
2181
2103
|
* Works with Search and Liveboard embed.
|
|
2182
2104
|
* @param - { columnId: string,
|
|
2183
2105
|
* name: string,
|
|
2184
|
-
* type:
|
|
2185
|
-
* dataType:
|
|
2106
|
+
* type: INT64/CHAR/DATE,
|
|
2107
|
+
* dataType: ATTRIBUTE/MEASURE }
|
|
2186
2108
|
* @example
|
|
2187
2109
|
* ```js
|
|
2188
2110
|
* searchEmbed.trigger(HostEvent.OpenFilter,
|
|
2189
|
-
* {column: { columnId: '<column-GUID>', name: 'column name', type: '
|
|
2111
|
+
* {column: { columnId: '<column-GUID>', name: 'column name', type: 'INT64', dataType: 'ATTRIBUTE'}})
|
|
2190
2112
|
* ```
|
|
2191
2113
|
* @example
|
|
2192
2114
|
* ```js
|
|
@@ -2244,7 +2166,6 @@
|
|
|
2244
2166
|
* @param
|
|
2245
2167
|
* `vizId`- GUID of the saved Answer or visualization to pin to a Liveboard.
|
|
2246
2168
|
* Optional when pinning a new chart or table generated from a Search query.
|
|
2247
|
-
* **Required** in Spotter Embed.
|
|
2248
2169
|
* @param
|
|
2249
2170
|
* `liveboardID` - GUID of the Liveboard to pin an Answer. If there is no Liveboard,
|
|
2250
2171
|
* specify the `newLiveboardName` parameter to create a new Liveboard.
|
|
@@ -2292,12 +2213,6 @@
|
|
|
2292
2213
|
* ```js
|
|
2293
2214
|
* appEmbed.trigger(HostEvent.Pin)
|
|
2294
2215
|
* ```
|
|
2295
|
-
* @example
|
|
2296
|
-
* ```js
|
|
2297
|
-
* const pinResponse = await spotterEmbed.trigger(HostEvent.Pin, {
|
|
2298
|
-
* vizId:'730496d6-6903-4601-937e-2c691821af3c'
|
|
2299
|
-
* });
|
|
2300
|
-
* ```
|
|
2301
2216
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2302
2217
|
*/
|
|
2303
2218
|
HostEvent["Pin"] = "pin";
|
|
@@ -2362,21 +2277,12 @@
|
|
|
2362
2277
|
* Trigger the **Download PDF** action on an embedded Liveboard,
|
|
2363
2278
|
* visualization or Answer.
|
|
2364
2279
|
*
|
|
2365
|
-
* @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
|
|
2366
|
-
*
|
|
2367
2280
|
* **NOTE**: The **Download** > **PDF** action is available on
|
|
2368
2281
|
* visualizations and Answers if the data is in tabular format.
|
|
2369
2282
|
* @example
|
|
2370
2283
|
* ```js
|
|
2371
2284
|
* liveboardEmbed.trigger(HostEvent.DownloadAsPdf)
|
|
2372
2285
|
* ```
|
|
2373
|
-
* @example
|
|
2374
|
-
* ```js
|
|
2375
|
-
* spotterEmbed.trigger(HostEvent.DownloadAsPdf, {
|
|
2376
|
-
* vizId:'730496d6-6903-4601-937e-2c691821af3c'
|
|
2377
|
-
* });
|
|
2378
|
-
* ```
|
|
2379
|
-
*
|
|
2380
2286
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2381
2287
|
*/
|
|
2382
2288
|
HostEvent["DownloadAsPdf"] = "downloadAsPdf";
|
|
@@ -2400,12 +2306,6 @@
|
|
|
2400
2306
|
* ```js
|
|
2401
2307
|
* searchEmbed.trigger(HostEvent.MakeACopy)
|
|
2402
2308
|
* ```
|
|
2403
|
-
* @example
|
|
2404
|
-
* ```js
|
|
2405
|
-
* const pinResponse = await spotterEmbed.trigger(HostEvent.MakeACopy, {
|
|
2406
|
-
* vizId:'730496d6-6903-4601-937e-2c691821af3c'
|
|
2407
|
-
* });
|
|
2408
|
-
* ```
|
|
2409
2309
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2410
2310
|
*/
|
|
2411
2311
|
HostEvent["MakeACopy"] = "makeACopy";
|
|
@@ -2478,8 +2378,6 @@
|
|
|
2478
2378
|
* This event is not supported in visualization embed and search embed.
|
|
2479
2379
|
* @param - object - To trigger the action for a specific visualization
|
|
2480
2380
|
* in Liveboard embed, pass in `vizId` as a key.
|
|
2481
|
-
* @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
|
|
2482
|
-
*
|
|
2483
2381
|
* @example
|
|
2484
2382
|
* ```js
|
|
2485
2383
|
* liveboardEmbed.trigger(HostEvent.Edit)
|
|
@@ -2488,18 +2386,6 @@
|
|
|
2488
2386
|
* liveboardEmbed.trigger(HostEvent.Edit, {vizId:
|
|
2489
2387
|
* '730496d6-6903-4601-937e-2c691821af3c'})
|
|
2490
2388
|
* ```
|
|
2491
|
-
* @example
|
|
2492
|
-
* ```js
|
|
2493
|
-
* const pinResponse = await spotterEmbed.trigger(HostEvent.Edit, {
|
|
2494
|
-
* vizId:'730496d6-6903-4601-937e-2c691821af3c'
|
|
2495
|
-
* });
|
|
2496
|
-
* ```
|
|
2497
|
-
* @example
|
|
2498
|
-
* ```js
|
|
2499
|
-
* const editResponse = await spotterEmbed.trigger(HostEvent.Edit, {
|
|
2500
|
-
* vizId:'730496d6-6903-4601-937e-2c691821af3c'
|
|
2501
|
-
* });
|
|
2502
|
-
* ```
|
|
2503
2389
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2504
2390
|
*/
|
|
2505
2391
|
HostEvent["Edit"] = "edit";
|
|
@@ -2547,16 +2433,6 @@
|
|
|
2547
2433
|
* );
|
|
2548
2434
|
* })
|
|
2549
2435
|
* ```
|
|
2550
|
-
* @example
|
|
2551
|
-
* ```js
|
|
2552
|
-
* spotterEmbed.trigger(HostEvent.GetTML, {
|
|
2553
|
-
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
2554
|
-
* }).then((tml) => {
|
|
2555
|
-
* console.log(
|
|
2556
|
-
* tml.answer.search_query // TML representation of the search query
|
|
2557
|
-
* );
|
|
2558
|
-
* })
|
|
2559
|
-
* ```
|
|
2560
2436
|
* @version SDK: 1.18.0 | ThoughtSpot: 8.10.0.cl, 9.0.1.sw
|
|
2561
2437
|
* @important
|
|
2562
2438
|
*/
|
|
@@ -2620,7 +2496,6 @@
|
|
|
2620
2496
|
/**
|
|
2621
2497
|
* Trigger the **Download** action on charts in
|
|
2622
2498
|
* the embedded view.
|
|
2623
|
-
* @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
|
|
2624
2499
|
* @example
|
|
2625
2500
|
* ```js
|
|
2626
2501
|
* liveboardEmbed.trigger(HostEvent.Download, {vizId:
|
|
@@ -2629,11 +2504,6 @@
|
|
|
2629
2504
|
* ```js
|
|
2630
2505
|
* embed.trigger(HostEvent.Download)
|
|
2631
2506
|
* ```
|
|
2632
|
-
* ```js
|
|
2633
|
-
* spotterEmbed.trigger(HostEvent.Download, {
|
|
2634
|
-
* vizId:'730496d6-6903-4601-937e-2c691821af3c'
|
|
2635
|
-
* });
|
|
2636
|
-
* ```
|
|
2637
2507
|
* @deprecated from SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl ,9.4.1.sw
|
|
2638
2508
|
* Use {@link DownloadAsPng}
|
|
2639
2509
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
@@ -2650,19 +2520,13 @@
|
|
|
2650
2520
|
* vizEmbed.trigger(HostEvent.DownloadAsPng)
|
|
2651
2521
|
*
|
|
2652
2522
|
* searchEmbed.trigger(HostEvent.DownloadAsPng)
|
|
2653
|
-
*
|
|
2654
|
-
* spotterEmbed.trigger(HostEvent.DownloadAsPng, {
|
|
2655
|
-
* vizId:"730496d6-6903-4601-937e-2c691821af3c"
|
|
2656
|
-
* })
|
|
2657
2523
|
* ```
|
|
2658
|
-
*
|
|
2659
2524
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.1.sw
|
|
2660
2525
|
*/
|
|
2661
2526
|
HostEvent["DownloadAsPng"] = "downloadAsPng";
|
|
2662
2527
|
/**
|
|
2663
2528
|
* Trigger the **Download** > **CSV** action on tables in
|
|
2664
2529
|
* the embedded view.
|
|
2665
|
-
* @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
|
|
2666
2530
|
* @example
|
|
2667
2531
|
* ```js
|
|
2668
2532
|
* liveboardEmbed.trigger(HostEvent.DownloadAsCsv, {vizId:
|
|
@@ -2674,18 +2538,12 @@
|
|
|
2674
2538
|
* ```js
|
|
2675
2539
|
* searchEmbed.trigger(HostEvent.DownloadAsCsv)
|
|
2676
2540
|
* ```
|
|
2677
|
-
* ```js
|
|
2678
|
-
* spotterEmbed.trigger(HostEvent.DownloadAsCsv, {
|
|
2679
|
-
* vizId:"730496d6-6903-4601-937e-2c691821af3c"
|
|
2680
|
-
* })
|
|
2681
|
-
* ```
|
|
2682
2541
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
2683
2542
|
*/
|
|
2684
2543
|
HostEvent["DownloadAsCsv"] = "downloadAsCSV";
|
|
2685
2544
|
/**
|
|
2686
2545
|
* Trigger the **Download** > **XLSX** action on tables
|
|
2687
2546
|
* in the embedded view.
|
|
2688
|
-
* @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
|
|
2689
2547
|
* @example
|
|
2690
2548
|
* ```js
|
|
2691
2549
|
* liveboardEmbed.trigger(HostEvent.DownloadAsXlsx, {vizId:
|
|
@@ -2697,11 +2555,6 @@
|
|
|
2697
2555
|
* ```js
|
|
2698
2556
|
* searchEmbed.trigger(HostEvent.DownloadAsXlsx)
|
|
2699
2557
|
* ```
|
|
2700
|
-
* ```js
|
|
2701
|
-
* spotterEmbed.trigger(HostEvent.downloadAsXLSX, {
|
|
2702
|
-
* vizId:"730496d6-6903-4601-937e-2c691821af3c"
|
|
2703
|
-
* })
|
|
2704
|
-
* ```
|
|
2705
2558
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
2706
2559
|
*/
|
|
2707
2560
|
HostEvent["DownloadAsXlsx"] = "downloadAsXLSX";
|
|
@@ -2721,7 +2574,6 @@
|
|
|
2721
2574
|
/**
|
|
2722
2575
|
* Trigger the **Save** action on a Liveboard or Answer.
|
|
2723
2576
|
* Saves the changes.
|
|
2724
|
-
* @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
|
|
2725
2577
|
* @example
|
|
2726
2578
|
* ```js
|
|
2727
2579
|
* liveboardEmbed.trigger(HostEvent.Save)
|
|
@@ -2729,11 +2581,6 @@
|
|
|
2729
2581
|
* ```js
|
|
2730
2582
|
* searchEmbed.trigger(HostEvent.Save)
|
|
2731
2583
|
* ```
|
|
2732
|
-
* ```js
|
|
2733
|
-
* spotterEmbed.trigger(HostEvent.Save, {
|
|
2734
|
-
* vizId:"730496d6-6903-4601-937e-2c691821af3c"
|
|
2735
|
-
* })
|
|
2736
|
-
* ```
|
|
2737
2584
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
2738
2585
|
*/
|
|
2739
2586
|
HostEvent["Save"] = "save";
|
|
@@ -3017,7 +2864,7 @@
|
|
|
3017
2864
|
HostEvent["ResetLiveboardPersonalisedView"] = "ResetLiveboardPersonalisedView";
|
|
3018
2865
|
/**
|
|
3019
2866
|
* Triggers an action to update Parameter values on embedded
|
|
3020
|
-
* Answers
|
|
2867
|
+
* Answers and Liveboard.
|
|
3021
2868
|
*
|
|
3022
2869
|
* @example
|
|
3023
2870
|
* ```js
|
|
@@ -3031,19 +2878,11 @@
|
|
|
3031
2878
|
HostEvent["UpdateParameters"] = "UpdateParameters";
|
|
3032
2879
|
/**
|
|
3033
2880
|
* 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
2881
|
* ```js
|
|
3036
2882
|
* liveboardEmbed.trigger(HostEvent.GetParameters).then((parameter) => {
|
|
3037
2883
|
* console.log('parameters', parameter);
|
|
3038
2884
|
* });
|
|
3039
2885
|
*```
|
|
3040
|
-
*```js
|
|
3041
|
-
* spotterEmbed.trigger(HostEvent.GetParameters, {
|
|
3042
|
-
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
3043
|
-
* }).then((parameter) => {
|
|
3044
|
-
* console.log('parameters', parameter);
|
|
3045
|
-
* });
|
|
3046
|
-
*```
|
|
3047
2886
|
* @version SDK: 1.29.0 | ThoughtSpot: 10.1.0.cl, 10.1.0.sw
|
|
3048
2887
|
*/
|
|
3049
2888
|
HostEvent["GetParameters"] = "GetParameters";
|
|
@@ -3075,7 +2914,7 @@
|
|
|
3075
2914
|
* @param - optional attributes to set Answer properties.
|
|
3076
2915
|
* `name` - Name string for the Answer.
|
|
3077
2916
|
* `description` - Description text for the Answer.
|
|
3078
|
-
*
|
|
2917
|
+
*
|
|
3079
2918
|
* @example
|
|
3080
2919
|
* ```js
|
|
3081
2920
|
* const saveAnswerResponse = await searchEmbed.trigger(HostEvent.SaveAnswer, {
|
|
@@ -3083,14 +2922,6 @@
|
|
|
3083
2922
|
* description: "Total sales by states in MidWest"
|
|
3084
2923
|
* });
|
|
3085
2924
|
* ```
|
|
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
2925
|
* @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
|
|
3095
2926
|
*/
|
|
3096
2927
|
HostEvent["SaveAnswer"] = "saveAnswer";
|
|
@@ -3119,70 +2950,6 @@
|
|
|
3119
2950
|
* @version SDK: 1.37.0 | ThoughtSpot: 10.8.0.cl
|
|
3120
2951
|
*/
|
|
3121
2952
|
HostEvent["TransformTableVizData"] = "TransformTableVizData";
|
|
3122
|
-
/**
|
|
3123
|
-
* Triggers a search operation with the search tokens specified in
|
|
3124
|
-
* the search query string in spotter embed.
|
|
3125
|
-
* @param - `query`: Text string in Natural Language format
|
|
3126
|
-
* @param - `executeSearch`: Boolean to execute search and update search query
|
|
3127
|
-
* @example
|
|
3128
|
-
* ```js
|
|
3129
|
-
* spotterEmbed.trigger(HostEvent.SpotterSearch, {
|
|
3130
|
-
* query: 'revenue per year',
|
|
3131
|
-
* executeSearch: true,
|
|
3132
|
-
* })
|
|
3133
|
-
* ```
|
|
3134
|
-
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
3135
|
-
*/
|
|
3136
|
-
HostEvent["SpotterSearch"] = "SpotterSearch";
|
|
3137
|
-
/**
|
|
3138
|
-
* Edits the last prompt in spotter embed.
|
|
3139
|
-
* @param - `query`: Text string
|
|
3140
|
-
* @example
|
|
3141
|
-
* ```js
|
|
3142
|
-
* spotterEmbed.trigger(HostEvent.EditLastPrompt, "revenue per year");
|
|
3143
|
-
* ```
|
|
3144
|
-
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
3145
|
-
*/
|
|
3146
|
-
HostEvent["EditLastPrompt"] = "EditLastPrompt";
|
|
3147
|
-
/**
|
|
3148
|
-
* Opens the Worksheet preview modal in Spotter Embed.
|
|
3149
|
-
* @example
|
|
3150
|
-
* ```js
|
|
3151
|
-
* spotterEmbed.trigger(HostEvent.PreviewSpotterData);
|
|
3152
|
-
* ```
|
|
3153
|
-
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
3154
|
-
*/
|
|
3155
|
-
HostEvent["PreviewSpotterData"] = "PreviewSpotterData";
|
|
3156
|
-
/**
|
|
3157
|
-
* Resets the Spotter Embed Conversation.
|
|
3158
|
-
* @example
|
|
3159
|
-
* ```js
|
|
3160
|
-
* spotterEmbed.trigger(HostEvent.ResetSpotterConversation);
|
|
3161
|
-
* ```
|
|
3162
|
-
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
3163
|
-
*/
|
|
3164
|
-
HostEvent["ResetSpotterConversation"] = "ResetSpotterConversation";
|
|
3165
|
-
/**
|
|
3166
|
-
* Deletes the last prompt in spotter embed.
|
|
3167
|
-
* @example
|
|
3168
|
-
* ```js
|
|
3169
|
-
* spotterEmbed.trigger(HostEvent.DeleteLastPrompt);
|
|
3170
|
-
* ```
|
|
3171
|
-
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
3172
|
-
*/
|
|
3173
|
-
HostEvent["DeleteLastPrompt"] = "DeleteLastPrompt";
|
|
3174
|
-
/**
|
|
3175
|
-
* Toggle the visualization to chart or table view.
|
|
3176
|
-
* @param - `vizId ` refers to the answer id in spotter Embed, it is required in spotter Embed.
|
|
3177
|
-
* @example
|
|
3178
|
-
* ```js
|
|
3179
|
-
* spotterEmbed.trigger(HostEvent.AnswerChartSwitcher, {
|
|
3180
|
-
* vizId:'b535c760-8bbe-4e6f-bb26-af56b4129a1e'
|
|
3181
|
-
* });
|
|
3182
|
-
*```
|
|
3183
|
-
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
3184
|
-
*/
|
|
3185
|
-
HostEvent["AnswerChartSwitcher"] = "answerChartSwitcher";
|
|
3186
2953
|
/**
|
|
3187
2954
|
* @hidden
|
|
3188
2955
|
* Trigger exit from presentation mode when user exits fullscreen.
|
|
@@ -3206,17 +2973,6 @@
|
|
|
3206
2973
|
* @hidden
|
|
3207
2974
|
*/
|
|
3208
2975
|
HostEvent["VisibleEmbedCoordinates"] = "visibleEmbedCoordinates";
|
|
3209
|
-
/**
|
|
3210
|
-
* Trigger the *Ask Spotter* action for visualizations
|
|
3211
|
-
* @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
|
|
3212
|
-
* @example
|
|
3213
|
-
* ```js
|
|
3214
|
-
* spotterEmbed.trigger(HostEvent.AskSpotter,
|
|
3215
|
-
* {vizId:'730496d6-6903-4601-937e-2c691821af3c'})
|
|
3216
|
-
* ```
|
|
3217
|
-
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
3218
|
-
*/
|
|
3219
|
-
HostEvent["AskSpotter"] = "AskSpotter";
|
|
3220
2976
|
})(exports.HostEvent || (exports.HostEvent = {}));
|
|
3221
2977
|
/**
|
|
3222
2978
|
* The different visual modes that the data sources panel within
|
|
@@ -15858,7 +15614,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
15858
15614
|
return e;
|
|
15859
15615
|
}
|
|
15860
15616
|
|
|
15861
|
-
var name="@thoughtspot/visual-embed-sdk";var version$1="1.
|
|
15617
|
+
var name="@thoughtspot/visual-embed-sdk";var version$1="1.39.2-alpha.3";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports$1={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p . --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
15618
|
|
|
15863
15619
|
/**
|
|
15864
15620
|
* Reloads the ThoughtSpot iframe.
|
|
@@ -17692,7 +17448,7 @@ query GetEurekaVizSnapshots(
|
|
|
17692
17448
|
return;
|
|
17693
17449
|
}
|
|
17694
17450
|
const previewStyles = `
|
|
17695
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/ag-grid-community@32.0.2/styles/ag-grid.min.css"
|
|
17451
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/ag-grid-community@32.0.2/styles/ag-grid.min.css">
|
|
17696
17452
|
<style id="ts-preview-style">
|
|
17697
17453
|
.ts-viz-preview-loader {
|
|
17698
17454
|
position: absolute;
|
|
@@ -18673,11 +18429,7 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
18673
18429
|
return {
|
|
18674
18430
|
convId: this.conversationId,
|
|
18675
18431
|
messageId: responses[0].msgId,
|
|
18676
|
-
data:
|
|
18677
|
-
...data.asstRespData.nlsAnsData.sageQuerySuggestions[0],
|
|
18678
|
-
convId: this.conversationId,
|
|
18679
|
-
messageId: responses[0].msgId,
|
|
18680
|
-
},
|
|
18432
|
+
data: data.asstRespData.nlsAnsData.sageQuerySuggestions[0],
|
|
18681
18433
|
error: null,
|
|
18682
18434
|
};
|
|
18683
18435
|
}
|
|
@@ -18703,7 +18455,7 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
18703
18455
|
}
|
|
18704
18456
|
getIframeSrc() {
|
|
18705
18457
|
var _a;
|
|
18706
|
-
const { sessionId, genNo, acSessionId, acGenNo,
|
|
18458
|
+
const { sessionId, genNo, acSessionId, acGenNo, } = this.viewConfig;
|
|
18707
18459
|
const path = 'conv-assist-answer';
|
|
18708
18460
|
const queryParams = this.getBaseQueryParams();
|
|
18709
18461
|
queryParams[Param.HideActions] = [...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : [])];
|
|
@@ -18718,8 +18470,6 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
18718
18470
|
genNo,
|
|
18719
18471
|
acSessionId,
|
|
18720
18472
|
acGenNo,
|
|
18721
|
-
convId,
|
|
18722
|
-
messageId,
|
|
18723
18473
|
});
|
|
18724
18474
|
return `${this.getEmbedBasePath(query)}/embed/${path}${tsPostHashParams}`;
|
|
18725
18475
|
}
|
|
@@ -18763,8 +18513,6 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
18763
18513
|
const container = document.createElement('div');
|
|
18764
18514
|
const embed = new ConversationMessage(container, {
|
|
18765
18515
|
...this.viewConfig,
|
|
18766
|
-
convId: data.convId,
|
|
18767
|
-
messageId: data.messageId,
|
|
18768
18516
|
sessionId: data.sessionId,
|
|
18769
18517
|
genNo: data.genNo,
|
|
18770
18518
|
acSessionId: data.stateKey.transactionId,
|
|
@@ -18785,8 +18533,6 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
18785
18533
|
return { error };
|
|
18786
18534
|
}
|
|
18787
18535
|
return { data: {
|
|
18788
|
-
convId: data.convId,
|
|
18789
|
-
messageId: data.messageId,
|
|
18790
18536
|
sessionId: data.sessionId,
|
|
18791
18537
|
genNo: data.genNo,
|
|
18792
18538
|
acSessionId: data.stateKey.transactionId,
|