@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.es.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 _mergeNamespaces(n, m) {
|
|
4
4
|
m.forEach(function (e) {
|
|
@@ -1496,7 +1496,7 @@ var EmbedEvent;
|
|
|
1496
1496
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
1497
1497
|
* @example
|
|
1498
1498
|
*```js
|
|
1499
|
-
* liveboardEmbed.on(EmbedEvent.
|
|
1499
|
+
* liveboardEmbed.on(EmbedEvent.AnswerChartSwitcher, payload => {
|
|
1500
1500
|
* console.log('Liveboard details', payload);
|
|
1501
1501
|
* })
|
|
1502
1502
|
*```
|
|
@@ -1870,83 +1870,6 @@ var EmbedEvent;
|
|
|
1870
1870
|
* @hidden
|
|
1871
1871
|
*/
|
|
1872
1872
|
EmbedEvent["RequestVisibleEmbedCoordinates"] = "requestVisibleEmbedCoordinates";
|
|
1873
|
-
/**
|
|
1874
|
-
* Emitted when Spotter response is text data
|
|
1875
|
-
* @example
|
|
1876
|
-
* ```js
|
|
1877
|
-
* spotterEmbed.on(EmbedEvent.SpotterData, (payload) => {
|
|
1878
|
-
* console.log('payload', payload);
|
|
1879
|
-
* })
|
|
1880
|
-
*```
|
|
1881
|
-
* @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
|
|
1882
|
-
*/
|
|
1883
|
-
EmbedEvent["SpotterData"] = "SpotterData";
|
|
1884
|
-
/**
|
|
1885
|
-
* Emitted when user opens up the worksheet preview modal in Spotter embed.
|
|
1886
|
-
* @example
|
|
1887
|
-
* ```js
|
|
1888
|
-
* spotterEmbed.on(EmbedEvent.PreviewSpotterData, (payload) => {
|
|
1889
|
-
* console.log('payload', payload);
|
|
1890
|
-
* })
|
|
1891
|
-
*```
|
|
1892
|
-
* @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
|
|
1893
|
-
*/
|
|
1894
|
-
EmbedEvent["PreviewSpotterData"] = "PreviewSpotterData";
|
|
1895
|
-
/**
|
|
1896
|
-
* Emitted when the Spotter query is triggered in Spotter embed.
|
|
1897
|
-
* @example
|
|
1898
|
-
* ```js
|
|
1899
|
-
* spotterEmbed.on(EmbedEvent.SpotterQueryTriggered, (payload) => {
|
|
1900
|
-
* console.log('payload', payload);
|
|
1901
|
-
* })
|
|
1902
|
-
*```
|
|
1903
|
-
* @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
|
|
1904
|
-
*/
|
|
1905
|
-
EmbedEvent["SpotterQueryTriggered"] = "SpotterQueryTriggered";
|
|
1906
|
-
/**
|
|
1907
|
-
* Emitted when the last Spotter query is edited in Spotter embed.
|
|
1908
|
-
* @example
|
|
1909
|
-
* ```js
|
|
1910
|
-
* spotterEmbed.on(EmbedEvent.LastPromptEdited, (payload) => {
|
|
1911
|
-
* console.log('payload', payload);
|
|
1912
|
-
* })
|
|
1913
|
-
*```
|
|
1914
|
-
* @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
|
|
1915
|
-
*/
|
|
1916
|
-
EmbedEvent["LastPromptEdited"] = "LastPromptEdited";
|
|
1917
|
-
/**
|
|
1918
|
-
* Emitted when the last Spotter query is deleted in Spotter embed.
|
|
1919
|
-
* @example
|
|
1920
|
-
* ```js
|
|
1921
|
-
* spotterEmbed.on(EmbedEvent.LastPromptDeleted, (payload) => {
|
|
1922
|
-
* console.log('payload', payload);
|
|
1923
|
-
* })
|
|
1924
|
-
*```
|
|
1925
|
-
* @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
|
|
1926
|
-
*/
|
|
1927
|
-
EmbedEvent["LastPromptDeleted"] = "LastPromptDeleted";
|
|
1928
|
-
/**
|
|
1929
|
-
* Emitted when the coversation is reset in spotter embed.
|
|
1930
|
-
* @example
|
|
1931
|
-
* ```js
|
|
1932
|
-
* spotterEmbed.on(EmbedEvent.ResetSpotterConversation, (payload) => {
|
|
1933
|
-
* console.log('payload', payload);
|
|
1934
|
-
* })
|
|
1935
|
-
*```
|
|
1936
|
-
* @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
|
|
1937
|
-
*/
|
|
1938
|
-
EmbedEvent["ResetSpotterConversation"] = "ResetSpotterConversation";
|
|
1939
|
-
/**
|
|
1940
|
-
* Emitted when the *Spotter* is initialized.
|
|
1941
|
-
* @example
|
|
1942
|
-
* ```js
|
|
1943
|
-
* spotterEmbed.on(EmbedEvent.SpotterInit, (payload) => {
|
|
1944
|
-
* console.log('payload', payload);
|
|
1945
|
-
* })
|
|
1946
|
-
*```
|
|
1947
|
-
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
1948
|
-
*/
|
|
1949
|
-
EmbedEvent["SpotterInit"] = "spotterInit";
|
|
1950
1873
|
})(EmbedEvent || (EmbedEvent = {}));
|
|
1951
1874
|
/**
|
|
1952
1875
|
* Event types that can be triggered by the host application
|
|
@@ -1964,7 +1887,7 @@ var EmbedEvent;
|
|
|
1964
1887
|
* // create the liveboard embed.
|
|
1965
1888
|
*
|
|
1966
1889
|
* liveboardEmbed.trigger(HostEvent.UpdateRuntimeFilters, [
|
|
1967
|
-
* { columnName: 'state
|
|
1890
|
+
* { columnName: 'state, operator: RuntimeFilterOp.EQ, values: ['california']}
|
|
1968
1891
|
* ]);
|
|
1969
1892
|
* ```
|
|
1970
1893
|
* @example
|
|
@@ -2036,7 +1959,6 @@ var HostEvent;
|
|
|
2036
1959
|
* done automatically on the most popular column.
|
|
2037
1960
|
* @param - vizId [TS >= 9.8.0] - Optional. The GUID of the visualization to drill
|
|
2038
1961
|
* in case of a Liveboard.
|
|
2039
|
-
* @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
|
|
2040
1962
|
* @example
|
|
2041
1963
|
* ```js
|
|
2042
1964
|
* searchEmbed.on(EmbedEvent.VizPointDoubleClick, (payload) => {
|
|
@@ -2175,12 +2097,12 @@ var HostEvent;
|
|
|
2175
2097
|
* Works with Search and Liveboard embed.
|
|
2176
2098
|
* @param - { columnId: string,
|
|
2177
2099
|
* name: string,
|
|
2178
|
-
* type:
|
|
2179
|
-
* dataType:
|
|
2100
|
+
* type: INT64/CHAR/DATE,
|
|
2101
|
+
* dataType: ATTRIBUTE/MEASURE }
|
|
2180
2102
|
* @example
|
|
2181
2103
|
* ```js
|
|
2182
2104
|
* searchEmbed.trigger(HostEvent.OpenFilter,
|
|
2183
|
-
* {column: { columnId: '<column-GUID>', name: 'column name', type: '
|
|
2105
|
+
* {column: { columnId: '<column-GUID>', name: 'column name', type: 'INT64', dataType: 'ATTRIBUTE'}})
|
|
2184
2106
|
* ```
|
|
2185
2107
|
* @example
|
|
2186
2108
|
* ```js
|
|
@@ -2238,7 +2160,6 @@ var HostEvent;
|
|
|
2238
2160
|
* @param
|
|
2239
2161
|
* `vizId`- GUID of the saved Answer or visualization to pin to a Liveboard.
|
|
2240
2162
|
* Optional when pinning a new chart or table generated from a Search query.
|
|
2241
|
-
* **Required** in Spotter Embed.
|
|
2242
2163
|
* @param
|
|
2243
2164
|
* `liveboardID` - GUID of the Liveboard to pin an Answer. If there is no Liveboard,
|
|
2244
2165
|
* specify the `newLiveboardName` parameter to create a new Liveboard.
|
|
@@ -2286,12 +2207,6 @@ var HostEvent;
|
|
|
2286
2207
|
* ```js
|
|
2287
2208
|
* appEmbed.trigger(HostEvent.Pin)
|
|
2288
2209
|
* ```
|
|
2289
|
-
* @example
|
|
2290
|
-
* ```js
|
|
2291
|
-
* const pinResponse = await spotterEmbed.trigger(HostEvent.Pin, {
|
|
2292
|
-
* vizId:'730496d6-6903-4601-937e-2c691821af3c'
|
|
2293
|
-
* });
|
|
2294
|
-
* ```
|
|
2295
2210
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2296
2211
|
*/
|
|
2297
2212
|
HostEvent["Pin"] = "pin";
|
|
@@ -2356,21 +2271,12 @@ var HostEvent;
|
|
|
2356
2271
|
* Trigger the **Download PDF** action on an embedded Liveboard,
|
|
2357
2272
|
* visualization or Answer.
|
|
2358
2273
|
*
|
|
2359
|
-
* @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
|
|
2360
|
-
*
|
|
2361
2274
|
* **NOTE**: The **Download** > **PDF** action is available on
|
|
2362
2275
|
* visualizations and Answers if the data is in tabular format.
|
|
2363
2276
|
* @example
|
|
2364
2277
|
* ```js
|
|
2365
2278
|
* liveboardEmbed.trigger(HostEvent.DownloadAsPdf)
|
|
2366
2279
|
* ```
|
|
2367
|
-
* @example
|
|
2368
|
-
* ```js
|
|
2369
|
-
* spotterEmbed.trigger(HostEvent.DownloadAsPdf, {
|
|
2370
|
-
* vizId:'730496d6-6903-4601-937e-2c691821af3c'
|
|
2371
|
-
* });
|
|
2372
|
-
* ```
|
|
2373
|
-
*
|
|
2374
2280
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2375
2281
|
*/
|
|
2376
2282
|
HostEvent["DownloadAsPdf"] = "downloadAsPdf";
|
|
@@ -2394,12 +2300,6 @@ var HostEvent;
|
|
|
2394
2300
|
* ```js
|
|
2395
2301
|
* searchEmbed.trigger(HostEvent.MakeACopy)
|
|
2396
2302
|
* ```
|
|
2397
|
-
* @example
|
|
2398
|
-
* ```js
|
|
2399
|
-
* const pinResponse = await spotterEmbed.trigger(HostEvent.MakeACopy, {
|
|
2400
|
-
* vizId:'730496d6-6903-4601-937e-2c691821af3c'
|
|
2401
|
-
* });
|
|
2402
|
-
* ```
|
|
2403
2303
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2404
2304
|
*/
|
|
2405
2305
|
HostEvent["MakeACopy"] = "makeACopy";
|
|
@@ -2472,8 +2372,6 @@ var HostEvent;
|
|
|
2472
2372
|
* This event is not supported in visualization embed and search embed.
|
|
2473
2373
|
* @param - object - To trigger the action for a specific visualization
|
|
2474
2374
|
* in Liveboard embed, pass in `vizId` as a key.
|
|
2475
|
-
* @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
|
|
2476
|
-
*
|
|
2477
2375
|
* @example
|
|
2478
2376
|
* ```js
|
|
2479
2377
|
* liveboardEmbed.trigger(HostEvent.Edit)
|
|
@@ -2482,18 +2380,6 @@ var HostEvent;
|
|
|
2482
2380
|
* liveboardEmbed.trigger(HostEvent.Edit, {vizId:
|
|
2483
2381
|
* '730496d6-6903-4601-937e-2c691821af3c'})
|
|
2484
2382
|
* ```
|
|
2485
|
-
* @example
|
|
2486
|
-
* ```js
|
|
2487
|
-
* const pinResponse = await spotterEmbed.trigger(HostEvent.Edit, {
|
|
2488
|
-
* vizId:'730496d6-6903-4601-937e-2c691821af3c'
|
|
2489
|
-
* });
|
|
2490
|
-
* ```
|
|
2491
|
-
* @example
|
|
2492
|
-
* ```js
|
|
2493
|
-
* const editResponse = await spotterEmbed.trigger(HostEvent.Edit, {
|
|
2494
|
-
* vizId:'730496d6-6903-4601-937e-2c691821af3c'
|
|
2495
|
-
* });
|
|
2496
|
-
* ```
|
|
2497
2383
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2498
2384
|
*/
|
|
2499
2385
|
HostEvent["Edit"] = "edit";
|
|
@@ -2541,16 +2427,6 @@ var HostEvent;
|
|
|
2541
2427
|
* );
|
|
2542
2428
|
* })
|
|
2543
2429
|
* ```
|
|
2544
|
-
* @example
|
|
2545
|
-
* ```js
|
|
2546
|
-
* spotterEmbed.trigger(HostEvent.GetTML, {
|
|
2547
|
-
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
2548
|
-
* }).then((tml) => {
|
|
2549
|
-
* console.log(
|
|
2550
|
-
* tml.answer.search_query // TML representation of the search query
|
|
2551
|
-
* );
|
|
2552
|
-
* })
|
|
2553
|
-
* ```
|
|
2554
2430
|
* @version SDK: 1.18.0 | ThoughtSpot: 8.10.0.cl, 9.0.1.sw
|
|
2555
2431
|
* @important
|
|
2556
2432
|
*/
|
|
@@ -2614,7 +2490,6 @@ var HostEvent;
|
|
|
2614
2490
|
/**
|
|
2615
2491
|
* Trigger the **Download** action on charts in
|
|
2616
2492
|
* the embedded view.
|
|
2617
|
-
* @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
|
|
2618
2493
|
* @example
|
|
2619
2494
|
* ```js
|
|
2620
2495
|
* liveboardEmbed.trigger(HostEvent.Download, {vizId:
|
|
@@ -2623,11 +2498,6 @@ var HostEvent;
|
|
|
2623
2498
|
* ```js
|
|
2624
2499
|
* embed.trigger(HostEvent.Download)
|
|
2625
2500
|
* ```
|
|
2626
|
-
* ```js
|
|
2627
|
-
* spotterEmbed.trigger(HostEvent.Download, {
|
|
2628
|
-
* vizId:'730496d6-6903-4601-937e-2c691821af3c'
|
|
2629
|
-
* });
|
|
2630
|
-
* ```
|
|
2631
2501
|
* @deprecated from SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl ,9.4.1.sw
|
|
2632
2502
|
* Use {@link DownloadAsPng}
|
|
2633
2503
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
@@ -2644,19 +2514,13 @@ var HostEvent;
|
|
|
2644
2514
|
* vizEmbed.trigger(HostEvent.DownloadAsPng)
|
|
2645
2515
|
*
|
|
2646
2516
|
* searchEmbed.trigger(HostEvent.DownloadAsPng)
|
|
2647
|
-
*
|
|
2648
|
-
* spotterEmbed.trigger(HostEvent.DownloadAsPng, {
|
|
2649
|
-
* vizId:"730496d6-6903-4601-937e-2c691821af3c"
|
|
2650
|
-
* })
|
|
2651
2517
|
* ```
|
|
2652
|
-
*
|
|
2653
2518
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.1.sw
|
|
2654
2519
|
*/
|
|
2655
2520
|
HostEvent["DownloadAsPng"] = "downloadAsPng";
|
|
2656
2521
|
/**
|
|
2657
2522
|
* Trigger the **Download** > **CSV** action on tables in
|
|
2658
2523
|
* the embedded view.
|
|
2659
|
-
* @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
|
|
2660
2524
|
* @example
|
|
2661
2525
|
* ```js
|
|
2662
2526
|
* liveboardEmbed.trigger(HostEvent.DownloadAsCsv, {vizId:
|
|
@@ -2668,18 +2532,12 @@ var HostEvent;
|
|
|
2668
2532
|
* ```js
|
|
2669
2533
|
* searchEmbed.trigger(HostEvent.DownloadAsCsv)
|
|
2670
2534
|
* ```
|
|
2671
|
-
* ```js
|
|
2672
|
-
* spotterEmbed.trigger(HostEvent.DownloadAsCsv, {
|
|
2673
|
-
* vizId:"730496d6-6903-4601-937e-2c691821af3c"
|
|
2674
|
-
* })
|
|
2675
|
-
* ```
|
|
2676
2535
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
2677
2536
|
*/
|
|
2678
2537
|
HostEvent["DownloadAsCsv"] = "downloadAsCSV";
|
|
2679
2538
|
/**
|
|
2680
2539
|
* Trigger the **Download** > **XLSX** action on tables
|
|
2681
2540
|
* in the embedded view.
|
|
2682
|
-
* @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
|
|
2683
2541
|
* @example
|
|
2684
2542
|
* ```js
|
|
2685
2543
|
* liveboardEmbed.trigger(HostEvent.DownloadAsXlsx, {vizId:
|
|
@@ -2691,11 +2549,6 @@ var HostEvent;
|
|
|
2691
2549
|
* ```js
|
|
2692
2550
|
* searchEmbed.trigger(HostEvent.DownloadAsXlsx)
|
|
2693
2551
|
* ```
|
|
2694
|
-
* ```js
|
|
2695
|
-
* spotterEmbed.trigger(HostEvent.downloadAsXLSX, {
|
|
2696
|
-
* vizId:"730496d6-6903-4601-937e-2c691821af3c"
|
|
2697
|
-
* })
|
|
2698
|
-
* ```
|
|
2699
2552
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
2700
2553
|
*/
|
|
2701
2554
|
HostEvent["DownloadAsXlsx"] = "downloadAsXLSX";
|
|
@@ -2715,7 +2568,6 @@ var HostEvent;
|
|
|
2715
2568
|
/**
|
|
2716
2569
|
* Trigger the **Save** action on a Liveboard or Answer.
|
|
2717
2570
|
* Saves the changes.
|
|
2718
|
-
* @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
|
|
2719
2571
|
* @example
|
|
2720
2572
|
* ```js
|
|
2721
2573
|
* liveboardEmbed.trigger(HostEvent.Save)
|
|
@@ -2723,11 +2575,6 @@ var HostEvent;
|
|
|
2723
2575
|
* ```js
|
|
2724
2576
|
* searchEmbed.trigger(HostEvent.Save)
|
|
2725
2577
|
* ```
|
|
2726
|
-
* ```js
|
|
2727
|
-
* spotterEmbed.trigger(HostEvent.Save, {
|
|
2728
|
-
* vizId:"730496d6-6903-4601-937e-2c691821af3c"
|
|
2729
|
-
* })
|
|
2730
|
-
* ```
|
|
2731
2578
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
2732
2579
|
*/
|
|
2733
2580
|
HostEvent["Save"] = "save";
|
|
@@ -3011,7 +2858,7 @@ var HostEvent;
|
|
|
3011
2858
|
HostEvent["ResetLiveboardPersonalisedView"] = "ResetLiveboardPersonalisedView";
|
|
3012
2859
|
/**
|
|
3013
2860
|
* Triggers an action to update Parameter values on embedded
|
|
3014
|
-
* Answers
|
|
2861
|
+
* Answers and Liveboard.
|
|
3015
2862
|
*
|
|
3016
2863
|
* @example
|
|
3017
2864
|
* ```js
|
|
@@ -3025,19 +2872,11 @@ var HostEvent;
|
|
|
3025
2872
|
HostEvent["UpdateParameters"] = "UpdateParameters";
|
|
3026
2873
|
/**
|
|
3027
2874
|
* Triggers GetParameters to fetch the runtime Parameters.
|
|
3028
|
-
* @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
|
|
3029
2875
|
* ```js
|
|
3030
2876
|
* liveboardEmbed.trigger(HostEvent.GetParameters).then((parameter) => {
|
|
3031
2877
|
* console.log('parameters', parameter);
|
|
3032
2878
|
* });
|
|
3033
2879
|
*```
|
|
3034
|
-
*```js
|
|
3035
|
-
* spotterEmbed.trigger(HostEvent.GetParameters, {
|
|
3036
|
-
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
3037
|
-
* }).then((parameter) => {
|
|
3038
|
-
* console.log('parameters', parameter);
|
|
3039
|
-
* });
|
|
3040
|
-
*```
|
|
3041
2880
|
* @version SDK: 1.29.0 | ThoughtSpot: 10.1.0.cl, 10.1.0.sw
|
|
3042
2881
|
*/
|
|
3043
2882
|
HostEvent["GetParameters"] = "GetParameters";
|
|
@@ -3069,7 +2908,7 @@ var HostEvent;
|
|
|
3069
2908
|
* @param - optional attributes to set Answer properties.
|
|
3070
2909
|
* `name` - Name string for the Answer.
|
|
3071
2910
|
* `description` - Description text for the Answer.
|
|
3072
|
-
*
|
|
2911
|
+
*
|
|
3073
2912
|
* @example
|
|
3074
2913
|
* ```js
|
|
3075
2914
|
* const saveAnswerResponse = await searchEmbed.trigger(HostEvent.SaveAnswer, {
|
|
@@ -3077,14 +2916,6 @@ var HostEvent;
|
|
|
3077
2916
|
* description: "Total sales by states in MidWest"
|
|
3078
2917
|
* });
|
|
3079
2918
|
* ```
|
|
3080
|
-
* @example
|
|
3081
|
-
* ```js
|
|
3082
|
-
* const saveAnswerResponse = await spotterEmbed.trigger(HostEvent.SaveAnswer, {
|
|
3083
|
-
* vizId: '730496d6-6903-4601-937e-2c691821af3c',
|
|
3084
|
-
* name: "Sales by states",
|
|
3085
|
-
* description: "Total sales by states in MidWest"
|
|
3086
|
-
* });
|
|
3087
|
-
* ```
|
|
3088
2919
|
* @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
|
|
3089
2920
|
*/
|
|
3090
2921
|
HostEvent["SaveAnswer"] = "saveAnswer";
|
|
@@ -3113,70 +2944,6 @@ var HostEvent;
|
|
|
3113
2944
|
* @version SDK: 1.37.0 | ThoughtSpot: 10.8.0.cl
|
|
3114
2945
|
*/
|
|
3115
2946
|
HostEvent["TransformTableVizData"] = "TransformTableVizData";
|
|
3116
|
-
/**
|
|
3117
|
-
* Triggers a search operation with the search tokens specified in
|
|
3118
|
-
* the search query string in spotter embed.
|
|
3119
|
-
* @param - `query`: Text string in Natural Language format
|
|
3120
|
-
* @param - `executeSearch`: Boolean to execute search and update search query
|
|
3121
|
-
* @example
|
|
3122
|
-
* ```js
|
|
3123
|
-
* spotterEmbed.trigger(HostEvent.SpotterSearch, {
|
|
3124
|
-
* query: 'revenue per year',
|
|
3125
|
-
* executeSearch: true,
|
|
3126
|
-
* })
|
|
3127
|
-
* ```
|
|
3128
|
-
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
3129
|
-
*/
|
|
3130
|
-
HostEvent["SpotterSearch"] = "SpotterSearch";
|
|
3131
|
-
/**
|
|
3132
|
-
* Edits the last prompt in spotter embed.
|
|
3133
|
-
* @param - `query`: Text string
|
|
3134
|
-
* @example
|
|
3135
|
-
* ```js
|
|
3136
|
-
* spotterEmbed.trigger(HostEvent.EditLastPrompt, "revenue per year");
|
|
3137
|
-
* ```
|
|
3138
|
-
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
3139
|
-
*/
|
|
3140
|
-
HostEvent["EditLastPrompt"] = "EditLastPrompt";
|
|
3141
|
-
/**
|
|
3142
|
-
* Opens the Worksheet preview modal in Spotter Embed.
|
|
3143
|
-
* @example
|
|
3144
|
-
* ```js
|
|
3145
|
-
* spotterEmbed.trigger(HostEvent.PreviewSpotterData);
|
|
3146
|
-
* ```
|
|
3147
|
-
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
3148
|
-
*/
|
|
3149
|
-
HostEvent["PreviewSpotterData"] = "PreviewSpotterData";
|
|
3150
|
-
/**
|
|
3151
|
-
* Resets the Spotter Embed Conversation.
|
|
3152
|
-
* @example
|
|
3153
|
-
* ```js
|
|
3154
|
-
* spotterEmbed.trigger(HostEvent.ResetSpotterConversation);
|
|
3155
|
-
* ```
|
|
3156
|
-
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
3157
|
-
*/
|
|
3158
|
-
HostEvent["ResetSpotterConversation"] = "ResetSpotterConversation";
|
|
3159
|
-
/**
|
|
3160
|
-
* Deletes the last prompt in spotter embed.
|
|
3161
|
-
* @example
|
|
3162
|
-
* ```js
|
|
3163
|
-
* spotterEmbed.trigger(HostEvent.DeleteLastPrompt);
|
|
3164
|
-
* ```
|
|
3165
|
-
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
3166
|
-
*/
|
|
3167
|
-
HostEvent["DeleteLastPrompt"] = "DeleteLastPrompt";
|
|
3168
|
-
/**
|
|
3169
|
-
* Toggle the visualization to chart or table view.
|
|
3170
|
-
* @param - `vizId ` refers to the answer id in spotter Embed, it is required in spotter Embed.
|
|
3171
|
-
* @example
|
|
3172
|
-
* ```js
|
|
3173
|
-
* spotterEmbed.trigger(HostEvent.AnswerChartSwitcher, {
|
|
3174
|
-
* vizId:'b535c760-8bbe-4e6f-bb26-af56b4129a1e'
|
|
3175
|
-
* });
|
|
3176
|
-
*```
|
|
3177
|
-
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
3178
|
-
*/
|
|
3179
|
-
HostEvent["AnswerChartSwitcher"] = "answerChartSwitcher";
|
|
3180
2947
|
/**
|
|
3181
2948
|
* @hidden
|
|
3182
2949
|
* Trigger exit from presentation mode when user exits fullscreen.
|
|
@@ -3200,17 +2967,6 @@ var HostEvent;
|
|
|
3200
2967
|
* @hidden
|
|
3201
2968
|
*/
|
|
3202
2969
|
HostEvent["VisibleEmbedCoordinates"] = "visibleEmbedCoordinates";
|
|
3203
|
-
/**
|
|
3204
|
-
* Trigger the *Ask Spotter* action for visualizations
|
|
3205
|
-
* @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
|
|
3206
|
-
* @example
|
|
3207
|
-
* ```js
|
|
3208
|
-
* spotterEmbed.trigger(HostEvent.AskSpotter,
|
|
3209
|
-
* {vizId:'730496d6-6903-4601-937e-2c691821af3c'})
|
|
3210
|
-
* ```
|
|
3211
|
-
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
3212
|
-
*/
|
|
3213
|
-
HostEvent["AskSpotter"] = "AskSpotter";
|
|
3214
2970
|
})(HostEvent || (HostEvent = {}));
|
|
3215
2971
|
/**
|
|
3216
2972
|
* The different visual modes that the data sources panel within
|
|
@@ -7952,7 +7708,7 @@ class AnswerService {
|
|
|
7952
7708
|
async getTML() {
|
|
7953
7709
|
const { object } = await this.executeQuery(getAnswerTML, {});
|
|
7954
7710
|
const edoc = object[0].edoc;
|
|
7955
|
-
const YAML = await import('./index-
|
|
7711
|
+
const YAML = await import('./index-D1pyb7RG.js');
|
|
7956
7712
|
const parsedDoc = YAML.parse(edoc);
|
|
7957
7713
|
return {
|
|
7958
7714
|
answer: {
|
|
@@ -15852,7 +15608,7 @@ function processEventData(type, e, thoughtSpotHost, containerEl) {
|
|
|
15852
15608
|
return e;
|
|
15853
15609
|
}
|
|
15854
15610
|
|
|
15855
|
-
var name="@thoughtspot/visual-embed-sdk";var version$1="1.
|
|
15611
|
+
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={".":{"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,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};
|
|
15856
15612
|
|
|
15857
15613
|
/**
|
|
15858
15614
|
* Reloads the ThoughtSpot iframe.
|
|
@@ -17686,7 +17442,7 @@ const addPreviewStylesIfNotPresent = () => {
|
|
|
17686
17442
|
return;
|
|
17687
17443
|
}
|
|
17688
17444
|
const previewStyles = `
|
|
17689
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/ag-grid-community@32.0.2/styles/ag-grid.min.css"
|
|
17445
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/ag-grid-community@32.0.2/styles/ag-grid.min.css">
|
|
17690
17446
|
<style id="ts-preview-style">
|
|
17691
17447
|
.ts-viz-preview-loader {
|
|
17692
17448
|
position: absolute;
|
|
@@ -18667,11 +18423,7 @@ class Conversation {
|
|
|
18667
18423
|
return {
|
|
18668
18424
|
convId: this.conversationId,
|
|
18669
18425
|
messageId: responses[0].msgId,
|
|
18670
|
-
data:
|
|
18671
|
-
...data.asstRespData.nlsAnsData.sageQuerySuggestions[0],
|
|
18672
|
-
convId: this.conversationId,
|
|
18673
|
-
messageId: responses[0].msgId,
|
|
18674
|
-
},
|
|
18426
|
+
data: data.asstRespData.nlsAnsData.sageQuerySuggestions[0],
|
|
18675
18427
|
error: null,
|
|
18676
18428
|
};
|
|
18677
18429
|
}
|
|
@@ -18697,7 +18449,7 @@ class ConversationMessage extends TsEmbed {
|
|
|
18697
18449
|
}
|
|
18698
18450
|
getIframeSrc() {
|
|
18699
18451
|
var _a;
|
|
18700
|
-
const { sessionId, genNo, acSessionId, acGenNo,
|
|
18452
|
+
const { sessionId, genNo, acSessionId, acGenNo, } = this.viewConfig;
|
|
18701
18453
|
const path = 'conv-assist-answer';
|
|
18702
18454
|
const queryParams = this.getBaseQueryParams();
|
|
18703
18455
|
queryParams[Param.HideActions] = [...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : [])];
|
|
@@ -18712,8 +18464,6 @@ class ConversationMessage extends TsEmbed {
|
|
|
18712
18464
|
genNo,
|
|
18713
18465
|
acSessionId,
|
|
18714
18466
|
acGenNo,
|
|
18715
|
-
convId,
|
|
18716
|
-
messageId,
|
|
18717
18467
|
});
|
|
18718
18468
|
return `${this.getEmbedBasePath(query)}/embed/${path}${tsPostHashParams}`;
|
|
18719
18469
|
}
|
|
@@ -18757,8 +18507,6 @@ class SpotterAgentEmbed {
|
|
|
18757
18507
|
const container = document.createElement('div');
|
|
18758
18508
|
const embed = new ConversationMessage(container, {
|
|
18759
18509
|
...this.viewConfig,
|
|
18760
|
-
convId: data.convId,
|
|
18761
|
-
messageId: data.messageId,
|
|
18762
18510
|
sessionId: data.sessionId,
|
|
18763
18511
|
genNo: data.genNo,
|
|
18764
18512
|
acSessionId: data.stateKey.transactionId,
|
|
@@ -18779,8 +18527,6 @@ class SpotterAgentEmbed {
|
|
|
18779
18527
|
return { error };
|
|
18780
18528
|
}
|
|
18781
18529
|
return { data: {
|
|
18782
|
-
convId: data.convId,
|
|
18783
|
-
messageId: data.messageId,
|
|
18784
18530
|
sessionId: data.sessionId,
|
|
18785
18531
|
genNo: data.genNo,
|
|
18786
18532
|
acSessionId: data.stateKey.transactionId,
|