@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-react.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
|
import * as React from 'react';
|
|
4
4
|
import React__default, { useRef, useCallback } from 'react';
|
|
@@ -1223,7 +1223,7 @@ var EmbedEvent;
|
|
|
1223
1223
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
1224
1224
|
* @example
|
|
1225
1225
|
*```js
|
|
1226
|
-
* liveboardEmbed.on(EmbedEvent.
|
|
1226
|
+
* liveboardEmbed.on(EmbedEvent.AnswerChartSwitcher, payload => {
|
|
1227
1227
|
* console.log('Liveboard details', payload);
|
|
1228
1228
|
* })
|
|
1229
1229
|
*```
|
|
@@ -1597,83 +1597,6 @@ var EmbedEvent;
|
|
|
1597
1597
|
* @hidden
|
|
1598
1598
|
*/
|
|
1599
1599
|
EmbedEvent["RequestVisibleEmbedCoordinates"] = "requestVisibleEmbedCoordinates";
|
|
1600
|
-
/**
|
|
1601
|
-
* Emitted when Spotter response is text data
|
|
1602
|
-
* @example
|
|
1603
|
-
* ```js
|
|
1604
|
-
* spotterEmbed.on(EmbedEvent.SpotterData, (payload) => {
|
|
1605
|
-
* console.log('payload', payload);
|
|
1606
|
-
* })
|
|
1607
|
-
*```
|
|
1608
|
-
* @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
|
|
1609
|
-
*/
|
|
1610
|
-
EmbedEvent["SpotterData"] = "SpotterData";
|
|
1611
|
-
/**
|
|
1612
|
-
* Emitted when user opens up the worksheet preview modal in Spotter embed.
|
|
1613
|
-
* @example
|
|
1614
|
-
* ```js
|
|
1615
|
-
* spotterEmbed.on(EmbedEvent.PreviewSpotterData, (payload) => {
|
|
1616
|
-
* console.log('payload', payload);
|
|
1617
|
-
* })
|
|
1618
|
-
*```
|
|
1619
|
-
* @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
|
|
1620
|
-
*/
|
|
1621
|
-
EmbedEvent["PreviewSpotterData"] = "PreviewSpotterData";
|
|
1622
|
-
/**
|
|
1623
|
-
* Emitted when the Spotter query is triggered in Spotter embed.
|
|
1624
|
-
* @example
|
|
1625
|
-
* ```js
|
|
1626
|
-
* spotterEmbed.on(EmbedEvent.SpotterQueryTriggered, (payload) => {
|
|
1627
|
-
* console.log('payload', payload);
|
|
1628
|
-
* })
|
|
1629
|
-
*```
|
|
1630
|
-
* @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
|
|
1631
|
-
*/
|
|
1632
|
-
EmbedEvent["SpotterQueryTriggered"] = "SpotterQueryTriggered";
|
|
1633
|
-
/**
|
|
1634
|
-
* Emitted when the last Spotter query is edited in Spotter embed.
|
|
1635
|
-
* @example
|
|
1636
|
-
* ```js
|
|
1637
|
-
* spotterEmbed.on(EmbedEvent.LastPromptEdited, (payload) => {
|
|
1638
|
-
* console.log('payload', payload);
|
|
1639
|
-
* })
|
|
1640
|
-
*```
|
|
1641
|
-
* @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
|
|
1642
|
-
*/
|
|
1643
|
-
EmbedEvent["LastPromptEdited"] = "LastPromptEdited";
|
|
1644
|
-
/**
|
|
1645
|
-
* Emitted when the last Spotter query is deleted in Spotter embed.
|
|
1646
|
-
* @example
|
|
1647
|
-
* ```js
|
|
1648
|
-
* spotterEmbed.on(EmbedEvent.LastPromptDeleted, (payload) => {
|
|
1649
|
-
* console.log('payload', payload);
|
|
1650
|
-
* })
|
|
1651
|
-
*```
|
|
1652
|
-
* @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
|
|
1653
|
-
*/
|
|
1654
|
-
EmbedEvent["LastPromptDeleted"] = "LastPromptDeleted";
|
|
1655
|
-
/**
|
|
1656
|
-
* Emitted when the coversation is reset in spotter embed.
|
|
1657
|
-
* @example
|
|
1658
|
-
* ```js
|
|
1659
|
-
* spotterEmbed.on(EmbedEvent.ResetSpotterConversation, (payload) => {
|
|
1660
|
-
* console.log('payload', payload);
|
|
1661
|
-
* })
|
|
1662
|
-
*```
|
|
1663
|
-
* @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
|
|
1664
|
-
*/
|
|
1665
|
-
EmbedEvent["ResetSpotterConversation"] = "ResetSpotterConversation";
|
|
1666
|
-
/**
|
|
1667
|
-
* Emitted when the *Spotter* is initialized.
|
|
1668
|
-
* @example
|
|
1669
|
-
* ```js
|
|
1670
|
-
* spotterEmbed.on(EmbedEvent.SpotterInit, (payload) => {
|
|
1671
|
-
* console.log('payload', payload);
|
|
1672
|
-
* })
|
|
1673
|
-
*```
|
|
1674
|
-
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
1675
|
-
*/
|
|
1676
|
-
EmbedEvent["SpotterInit"] = "spotterInit";
|
|
1677
1600
|
})(EmbedEvent || (EmbedEvent = {}));
|
|
1678
1601
|
/**
|
|
1679
1602
|
* Event types that can be triggered by the host application
|
|
@@ -1691,7 +1614,7 @@ var EmbedEvent;
|
|
|
1691
1614
|
* // create the liveboard embed.
|
|
1692
1615
|
*
|
|
1693
1616
|
* liveboardEmbed.trigger(HostEvent.UpdateRuntimeFilters, [
|
|
1694
|
-
* { columnName: 'state
|
|
1617
|
+
* { columnName: 'state, operator: RuntimeFilterOp.EQ, values: ['california']}
|
|
1695
1618
|
* ]);
|
|
1696
1619
|
* ```
|
|
1697
1620
|
* @example
|
|
@@ -1763,7 +1686,6 @@ var HostEvent;
|
|
|
1763
1686
|
* done automatically on the most popular column.
|
|
1764
1687
|
* @param - vizId [TS >= 9.8.0] - Optional. The GUID of the visualization to drill
|
|
1765
1688
|
* in case of a Liveboard.
|
|
1766
|
-
* @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
|
|
1767
1689
|
* @example
|
|
1768
1690
|
* ```js
|
|
1769
1691
|
* searchEmbed.on(EmbedEvent.VizPointDoubleClick, (payload) => {
|
|
@@ -1902,12 +1824,12 @@ var HostEvent;
|
|
|
1902
1824
|
* Works with Search and Liveboard embed.
|
|
1903
1825
|
* @param - { columnId: string,
|
|
1904
1826
|
* name: string,
|
|
1905
|
-
* type:
|
|
1906
|
-
* dataType:
|
|
1827
|
+
* type: INT64/CHAR/DATE,
|
|
1828
|
+
* dataType: ATTRIBUTE/MEASURE }
|
|
1907
1829
|
* @example
|
|
1908
1830
|
* ```js
|
|
1909
1831
|
* searchEmbed.trigger(HostEvent.OpenFilter,
|
|
1910
|
-
* {column: { columnId: '<column-GUID>', name: 'column name', type: '
|
|
1832
|
+
* {column: { columnId: '<column-GUID>', name: 'column name', type: 'INT64', dataType: 'ATTRIBUTE'}})
|
|
1911
1833
|
* ```
|
|
1912
1834
|
* @example
|
|
1913
1835
|
* ```js
|
|
@@ -1965,7 +1887,6 @@ var HostEvent;
|
|
|
1965
1887
|
* @param
|
|
1966
1888
|
* `vizId`- GUID of the saved Answer or visualization to pin to a Liveboard.
|
|
1967
1889
|
* Optional when pinning a new chart or table generated from a Search query.
|
|
1968
|
-
* **Required** in Spotter Embed.
|
|
1969
1890
|
* @param
|
|
1970
1891
|
* `liveboardID` - GUID of the Liveboard to pin an Answer. If there is no Liveboard,
|
|
1971
1892
|
* specify the `newLiveboardName` parameter to create a new Liveboard.
|
|
@@ -2013,12 +1934,6 @@ var HostEvent;
|
|
|
2013
1934
|
* ```js
|
|
2014
1935
|
* appEmbed.trigger(HostEvent.Pin)
|
|
2015
1936
|
* ```
|
|
2016
|
-
* @example
|
|
2017
|
-
* ```js
|
|
2018
|
-
* const pinResponse = await spotterEmbed.trigger(HostEvent.Pin, {
|
|
2019
|
-
* vizId:'730496d6-6903-4601-937e-2c691821af3c'
|
|
2020
|
-
* });
|
|
2021
|
-
* ```
|
|
2022
1937
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2023
1938
|
*/
|
|
2024
1939
|
HostEvent["Pin"] = "pin";
|
|
@@ -2083,21 +1998,12 @@ var HostEvent;
|
|
|
2083
1998
|
* Trigger the **Download PDF** action on an embedded Liveboard,
|
|
2084
1999
|
* visualization or Answer.
|
|
2085
2000
|
*
|
|
2086
|
-
* @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
|
|
2087
|
-
*
|
|
2088
2001
|
* **NOTE**: The **Download** > **PDF** action is available on
|
|
2089
2002
|
* visualizations and Answers if the data is in tabular format.
|
|
2090
2003
|
* @example
|
|
2091
2004
|
* ```js
|
|
2092
2005
|
* liveboardEmbed.trigger(HostEvent.DownloadAsPdf)
|
|
2093
2006
|
* ```
|
|
2094
|
-
* @example
|
|
2095
|
-
* ```js
|
|
2096
|
-
* spotterEmbed.trigger(HostEvent.DownloadAsPdf, {
|
|
2097
|
-
* vizId:'730496d6-6903-4601-937e-2c691821af3c'
|
|
2098
|
-
* });
|
|
2099
|
-
* ```
|
|
2100
|
-
*
|
|
2101
2007
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2102
2008
|
*/
|
|
2103
2009
|
HostEvent["DownloadAsPdf"] = "downloadAsPdf";
|
|
@@ -2121,12 +2027,6 @@ var HostEvent;
|
|
|
2121
2027
|
* ```js
|
|
2122
2028
|
* searchEmbed.trigger(HostEvent.MakeACopy)
|
|
2123
2029
|
* ```
|
|
2124
|
-
* @example
|
|
2125
|
-
* ```js
|
|
2126
|
-
* const pinResponse = await spotterEmbed.trigger(HostEvent.MakeACopy, {
|
|
2127
|
-
* vizId:'730496d6-6903-4601-937e-2c691821af3c'
|
|
2128
|
-
* });
|
|
2129
|
-
* ```
|
|
2130
2030
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2131
2031
|
*/
|
|
2132
2032
|
HostEvent["MakeACopy"] = "makeACopy";
|
|
@@ -2199,8 +2099,6 @@ var HostEvent;
|
|
|
2199
2099
|
* This event is not supported in visualization embed and search embed.
|
|
2200
2100
|
* @param - object - To trigger the action for a specific visualization
|
|
2201
2101
|
* in Liveboard embed, pass in `vizId` as a key.
|
|
2202
|
-
* @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
|
|
2203
|
-
*
|
|
2204
2102
|
* @example
|
|
2205
2103
|
* ```js
|
|
2206
2104
|
* liveboardEmbed.trigger(HostEvent.Edit)
|
|
@@ -2209,18 +2107,6 @@ var HostEvent;
|
|
|
2209
2107
|
* liveboardEmbed.trigger(HostEvent.Edit, {vizId:
|
|
2210
2108
|
* '730496d6-6903-4601-937e-2c691821af3c'})
|
|
2211
2109
|
* ```
|
|
2212
|
-
* @example
|
|
2213
|
-
* ```js
|
|
2214
|
-
* const pinResponse = await spotterEmbed.trigger(HostEvent.Edit, {
|
|
2215
|
-
* vizId:'730496d6-6903-4601-937e-2c691821af3c'
|
|
2216
|
-
* });
|
|
2217
|
-
* ```
|
|
2218
|
-
* @example
|
|
2219
|
-
* ```js
|
|
2220
|
-
* const editResponse = await spotterEmbed.trigger(HostEvent.Edit, {
|
|
2221
|
-
* vizId:'730496d6-6903-4601-937e-2c691821af3c'
|
|
2222
|
-
* });
|
|
2223
|
-
* ```
|
|
2224
2110
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2225
2111
|
*/
|
|
2226
2112
|
HostEvent["Edit"] = "edit";
|
|
@@ -2268,16 +2154,6 @@ var HostEvent;
|
|
|
2268
2154
|
* );
|
|
2269
2155
|
* })
|
|
2270
2156
|
* ```
|
|
2271
|
-
* @example
|
|
2272
|
-
* ```js
|
|
2273
|
-
* spotterEmbed.trigger(HostEvent.GetTML, {
|
|
2274
|
-
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
2275
|
-
* }).then((tml) => {
|
|
2276
|
-
* console.log(
|
|
2277
|
-
* tml.answer.search_query // TML representation of the search query
|
|
2278
|
-
* );
|
|
2279
|
-
* })
|
|
2280
|
-
* ```
|
|
2281
2157
|
* @version SDK: 1.18.0 | ThoughtSpot: 8.10.0.cl, 9.0.1.sw
|
|
2282
2158
|
* @important
|
|
2283
2159
|
*/
|
|
@@ -2341,7 +2217,6 @@ var HostEvent;
|
|
|
2341
2217
|
/**
|
|
2342
2218
|
* Trigger the **Download** action on charts in
|
|
2343
2219
|
* the embedded view.
|
|
2344
|
-
* @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
|
|
2345
2220
|
* @example
|
|
2346
2221
|
* ```js
|
|
2347
2222
|
* liveboardEmbed.trigger(HostEvent.Download, {vizId:
|
|
@@ -2350,11 +2225,6 @@ var HostEvent;
|
|
|
2350
2225
|
* ```js
|
|
2351
2226
|
* embed.trigger(HostEvent.Download)
|
|
2352
2227
|
* ```
|
|
2353
|
-
* ```js
|
|
2354
|
-
* spotterEmbed.trigger(HostEvent.Download, {
|
|
2355
|
-
* vizId:'730496d6-6903-4601-937e-2c691821af3c'
|
|
2356
|
-
* });
|
|
2357
|
-
* ```
|
|
2358
2228
|
* @deprecated from SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl ,9.4.1.sw
|
|
2359
2229
|
* Use {@link DownloadAsPng}
|
|
2360
2230
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
@@ -2371,19 +2241,13 @@ var HostEvent;
|
|
|
2371
2241
|
* vizEmbed.trigger(HostEvent.DownloadAsPng)
|
|
2372
2242
|
*
|
|
2373
2243
|
* searchEmbed.trigger(HostEvent.DownloadAsPng)
|
|
2374
|
-
*
|
|
2375
|
-
* spotterEmbed.trigger(HostEvent.DownloadAsPng, {
|
|
2376
|
-
* vizId:"730496d6-6903-4601-937e-2c691821af3c"
|
|
2377
|
-
* })
|
|
2378
2244
|
* ```
|
|
2379
|
-
*
|
|
2380
2245
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.1.sw
|
|
2381
2246
|
*/
|
|
2382
2247
|
HostEvent["DownloadAsPng"] = "downloadAsPng";
|
|
2383
2248
|
/**
|
|
2384
2249
|
* Trigger the **Download** > **CSV** action on tables in
|
|
2385
2250
|
* the embedded view.
|
|
2386
|
-
* @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
|
|
2387
2251
|
* @example
|
|
2388
2252
|
* ```js
|
|
2389
2253
|
* liveboardEmbed.trigger(HostEvent.DownloadAsCsv, {vizId:
|
|
@@ -2395,18 +2259,12 @@ var HostEvent;
|
|
|
2395
2259
|
* ```js
|
|
2396
2260
|
* searchEmbed.trigger(HostEvent.DownloadAsCsv)
|
|
2397
2261
|
* ```
|
|
2398
|
-
* ```js
|
|
2399
|
-
* spotterEmbed.trigger(HostEvent.DownloadAsCsv, {
|
|
2400
|
-
* vizId:"730496d6-6903-4601-937e-2c691821af3c"
|
|
2401
|
-
* })
|
|
2402
|
-
* ```
|
|
2403
2262
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
2404
2263
|
*/
|
|
2405
2264
|
HostEvent["DownloadAsCsv"] = "downloadAsCSV";
|
|
2406
2265
|
/**
|
|
2407
2266
|
* Trigger the **Download** > **XLSX** action on tables
|
|
2408
2267
|
* in the embedded view.
|
|
2409
|
-
* @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
|
|
2410
2268
|
* @example
|
|
2411
2269
|
* ```js
|
|
2412
2270
|
* liveboardEmbed.trigger(HostEvent.DownloadAsXlsx, {vizId:
|
|
@@ -2418,11 +2276,6 @@ var HostEvent;
|
|
|
2418
2276
|
* ```js
|
|
2419
2277
|
* searchEmbed.trigger(HostEvent.DownloadAsXlsx)
|
|
2420
2278
|
* ```
|
|
2421
|
-
* ```js
|
|
2422
|
-
* spotterEmbed.trigger(HostEvent.downloadAsXLSX, {
|
|
2423
|
-
* vizId:"730496d6-6903-4601-937e-2c691821af3c"
|
|
2424
|
-
* })
|
|
2425
|
-
* ```
|
|
2426
2279
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
2427
2280
|
*/
|
|
2428
2281
|
HostEvent["DownloadAsXlsx"] = "downloadAsXLSX";
|
|
@@ -2442,7 +2295,6 @@ var HostEvent;
|
|
|
2442
2295
|
/**
|
|
2443
2296
|
* Trigger the **Save** action on a Liveboard or Answer.
|
|
2444
2297
|
* Saves the changes.
|
|
2445
|
-
* @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
|
|
2446
2298
|
* @example
|
|
2447
2299
|
* ```js
|
|
2448
2300
|
* liveboardEmbed.trigger(HostEvent.Save)
|
|
@@ -2450,11 +2302,6 @@ var HostEvent;
|
|
|
2450
2302
|
* ```js
|
|
2451
2303
|
* searchEmbed.trigger(HostEvent.Save)
|
|
2452
2304
|
* ```
|
|
2453
|
-
* ```js
|
|
2454
|
-
* spotterEmbed.trigger(HostEvent.Save, {
|
|
2455
|
-
* vizId:"730496d6-6903-4601-937e-2c691821af3c"
|
|
2456
|
-
* })
|
|
2457
|
-
* ```
|
|
2458
2305
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
2459
2306
|
*/
|
|
2460
2307
|
HostEvent["Save"] = "save";
|
|
@@ -2738,7 +2585,7 @@ var HostEvent;
|
|
|
2738
2585
|
HostEvent["ResetLiveboardPersonalisedView"] = "ResetLiveboardPersonalisedView";
|
|
2739
2586
|
/**
|
|
2740
2587
|
* Triggers an action to update Parameter values on embedded
|
|
2741
|
-
* Answers
|
|
2588
|
+
* Answers and Liveboard.
|
|
2742
2589
|
*
|
|
2743
2590
|
* @example
|
|
2744
2591
|
* ```js
|
|
@@ -2752,19 +2599,11 @@ var HostEvent;
|
|
|
2752
2599
|
HostEvent["UpdateParameters"] = "UpdateParameters";
|
|
2753
2600
|
/**
|
|
2754
2601
|
* Triggers GetParameters to fetch the runtime Parameters.
|
|
2755
|
-
* @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
|
|
2756
2602
|
* ```js
|
|
2757
2603
|
* liveboardEmbed.trigger(HostEvent.GetParameters).then((parameter) => {
|
|
2758
2604
|
* console.log('parameters', parameter);
|
|
2759
2605
|
* });
|
|
2760
2606
|
*```
|
|
2761
|
-
*```js
|
|
2762
|
-
* spotterEmbed.trigger(HostEvent.GetParameters, {
|
|
2763
|
-
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
2764
|
-
* }).then((parameter) => {
|
|
2765
|
-
* console.log('parameters', parameter);
|
|
2766
|
-
* });
|
|
2767
|
-
*```
|
|
2768
2607
|
* @version SDK: 1.29.0 | ThoughtSpot: 10.1.0.cl, 10.1.0.sw
|
|
2769
2608
|
*/
|
|
2770
2609
|
HostEvent["GetParameters"] = "GetParameters";
|
|
@@ -2796,7 +2635,7 @@ var HostEvent;
|
|
|
2796
2635
|
* @param - optional attributes to set Answer properties.
|
|
2797
2636
|
* `name` - Name string for the Answer.
|
|
2798
2637
|
* `description` - Description text for the Answer.
|
|
2799
|
-
*
|
|
2638
|
+
*
|
|
2800
2639
|
* @example
|
|
2801
2640
|
* ```js
|
|
2802
2641
|
* const saveAnswerResponse = await searchEmbed.trigger(HostEvent.SaveAnswer, {
|
|
@@ -2804,14 +2643,6 @@ var HostEvent;
|
|
|
2804
2643
|
* description: "Total sales by states in MidWest"
|
|
2805
2644
|
* });
|
|
2806
2645
|
* ```
|
|
2807
|
-
* @example
|
|
2808
|
-
* ```js
|
|
2809
|
-
* const saveAnswerResponse = await spotterEmbed.trigger(HostEvent.SaveAnswer, {
|
|
2810
|
-
* vizId: '730496d6-6903-4601-937e-2c691821af3c',
|
|
2811
|
-
* name: "Sales by states",
|
|
2812
|
-
* description: "Total sales by states in MidWest"
|
|
2813
|
-
* });
|
|
2814
|
-
* ```
|
|
2815
2646
|
* @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
|
|
2816
2647
|
*/
|
|
2817
2648
|
HostEvent["SaveAnswer"] = "saveAnswer";
|
|
@@ -2840,70 +2671,6 @@ var HostEvent;
|
|
|
2840
2671
|
* @version SDK: 1.37.0 | ThoughtSpot: 10.8.0.cl
|
|
2841
2672
|
*/
|
|
2842
2673
|
HostEvent["TransformTableVizData"] = "TransformTableVizData";
|
|
2843
|
-
/**
|
|
2844
|
-
* Triggers a search operation with the search tokens specified in
|
|
2845
|
-
* the search query string in spotter embed.
|
|
2846
|
-
* @param - `query`: Text string in Natural Language format
|
|
2847
|
-
* @param - `executeSearch`: Boolean to execute search and update search query
|
|
2848
|
-
* @example
|
|
2849
|
-
* ```js
|
|
2850
|
-
* spotterEmbed.trigger(HostEvent.SpotterSearch, {
|
|
2851
|
-
* query: 'revenue per year',
|
|
2852
|
-
* executeSearch: true,
|
|
2853
|
-
* })
|
|
2854
|
-
* ```
|
|
2855
|
-
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
2856
|
-
*/
|
|
2857
|
-
HostEvent["SpotterSearch"] = "SpotterSearch";
|
|
2858
|
-
/**
|
|
2859
|
-
* Edits the last prompt in spotter embed.
|
|
2860
|
-
* @param - `query`: Text string
|
|
2861
|
-
* @example
|
|
2862
|
-
* ```js
|
|
2863
|
-
* spotterEmbed.trigger(HostEvent.EditLastPrompt, "revenue per year");
|
|
2864
|
-
* ```
|
|
2865
|
-
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
2866
|
-
*/
|
|
2867
|
-
HostEvent["EditLastPrompt"] = "EditLastPrompt";
|
|
2868
|
-
/**
|
|
2869
|
-
* Opens the Worksheet preview modal in Spotter Embed.
|
|
2870
|
-
* @example
|
|
2871
|
-
* ```js
|
|
2872
|
-
* spotterEmbed.trigger(HostEvent.PreviewSpotterData);
|
|
2873
|
-
* ```
|
|
2874
|
-
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
2875
|
-
*/
|
|
2876
|
-
HostEvent["PreviewSpotterData"] = "PreviewSpotterData";
|
|
2877
|
-
/**
|
|
2878
|
-
* Resets the Spotter Embed Conversation.
|
|
2879
|
-
* @example
|
|
2880
|
-
* ```js
|
|
2881
|
-
* spotterEmbed.trigger(HostEvent.ResetSpotterConversation);
|
|
2882
|
-
* ```
|
|
2883
|
-
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
2884
|
-
*/
|
|
2885
|
-
HostEvent["ResetSpotterConversation"] = "ResetSpotterConversation";
|
|
2886
|
-
/**
|
|
2887
|
-
* Deletes the last prompt in spotter embed.
|
|
2888
|
-
* @example
|
|
2889
|
-
* ```js
|
|
2890
|
-
* spotterEmbed.trigger(HostEvent.DeleteLastPrompt);
|
|
2891
|
-
* ```
|
|
2892
|
-
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
2893
|
-
*/
|
|
2894
|
-
HostEvent["DeleteLastPrompt"] = "DeleteLastPrompt";
|
|
2895
|
-
/**
|
|
2896
|
-
* Toggle the visualization to chart or table view.
|
|
2897
|
-
* @param - `vizId ` refers to the answer id in spotter Embed, it is required in spotter Embed.
|
|
2898
|
-
* @example
|
|
2899
|
-
* ```js
|
|
2900
|
-
* spotterEmbed.trigger(HostEvent.AnswerChartSwitcher, {
|
|
2901
|
-
* vizId:'b535c760-8bbe-4e6f-bb26-af56b4129a1e'
|
|
2902
|
-
* });
|
|
2903
|
-
*```
|
|
2904
|
-
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
2905
|
-
*/
|
|
2906
|
-
HostEvent["AnswerChartSwitcher"] = "answerChartSwitcher";
|
|
2907
2674
|
/**
|
|
2908
2675
|
* @hidden
|
|
2909
2676
|
* Trigger exit from presentation mode when user exits fullscreen.
|
|
@@ -2927,17 +2694,6 @@ var HostEvent;
|
|
|
2927
2694
|
* @hidden
|
|
2928
2695
|
*/
|
|
2929
2696
|
HostEvent["VisibleEmbedCoordinates"] = "visibleEmbedCoordinates";
|
|
2930
|
-
/**
|
|
2931
|
-
* Trigger the *Ask Spotter* action for visualizations
|
|
2932
|
-
* @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
|
|
2933
|
-
* @example
|
|
2934
|
-
* ```js
|
|
2935
|
-
* spotterEmbed.trigger(HostEvent.AskSpotter,
|
|
2936
|
-
* {vizId:'730496d6-6903-4601-937e-2c691821af3c'})
|
|
2937
|
-
* ```
|
|
2938
|
-
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
2939
|
-
*/
|
|
2940
|
-
HostEvent["AskSpotter"] = "AskSpotter";
|
|
2941
2697
|
})(HostEvent || (HostEvent = {}));
|
|
2942
2698
|
/**
|
|
2943
2699
|
* The different visual modes that the data sources panel within
|
|
@@ -8067,7 +7823,7 @@ class AnswerService {
|
|
|
8067
7823
|
async getTML() {
|
|
8068
7824
|
const { object } = await this.executeQuery(getAnswerTML, {});
|
|
8069
7825
|
const edoc = object[0].edoc;
|
|
8070
|
-
const YAML = await import('./index-
|
|
7826
|
+
const YAML = await import('./index-D1pyb7RG.js');
|
|
8071
7827
|
const parsedDoc = YAML.parse(edoc);
|
|
8072
7828
|
return {
|
|
8073
7829
|
answer: {
|
|
@@ -15801,7 +15557,7 @@ function processEventData(type, e, thoughtSpotHost, containerEl) {
|
|
|
15801
15557
|
return e;
|
|
15802
15558
|
}
|
|
15803
15559
|
|
|
15804
|
-
var name="@thoughtspot/visual-embed-sdk";var version$1="1.
|
|
15560
|
+
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};
|
|
15805
15561
|
|
|
15806
15562
|
/**
|
|
15807
15563
|
* Reloads the ThoughtSpot iframe.
|
|
@@ -17963,7 +17719,7 @@ const addPreviewStylesIfNotPresent = () => {
|
|
|
17963
17719
|
return;
|
|
17964
17720
|
}
|
|
17965
17721
|
const previewStyles = `
|
|
17966
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/ag-grid-community@32.0.2/styles/ag-grid.min.css"
|
|
17722
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/ag-grid-community@32.0.2/styles/ag-grid.min.css">
|
|
17967
17723
|
<style id="ts-preview-style">
|
|
17968
17724
|
.ts-viz-preview-loader {
|
|
17969
17725
|
position: absolute;
|
|
@@ -18689,11 +18445,7 @@ class Conversation {
|
|
|
18689
18445
|
return {
|
|
18690
18446
|
convId: this.conversationId,
|
|
18691
18447
|
messageId: responses[0].msgId,
|
|
18692
|
-
data:
|
|
18693
|
-
...data.asstRespData.nlsAnsData.sageQuerySuggestions[0],
|
|
18694
|
-
convId: this.conversationId,
|
|
18695
|
-
messageId: responses[0].msgId,
|
|
18696
|
-
},
|
|
18448
|
+
data: data.asstRespData.nlsAnsData.sageQuerySuggestions[0],
|
|
18697
18449
|
error: null,
|
|
18698
18450
|
};
|
|
18699
18451
|
}
|
|
@@ -18719,7 +18471,7 @@ let ConversationMessage$1 = class ConversationMessage extends TsEmbed {
|
|
|
18719
18471
|
}
|
|
18720
18472
|
getIframeSrc() {
|
|
18721
18473
|
var _a;
|
|
18722
|
-
const { sessionId, genNo, acSessionId, acGenNo,
|
|
18474
|
+
const { sessionId, genNo, acSessionId, acGenNo, } = this.viewConfig;
|
|
18723
18475
|
const path = 'conv-assist-answer';
|
|
18724
18476
|
const queryParams = this.getBaseQueryParams();
|
|
18725
18477
|
queryParams[Param.HideActions] = [...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : [])];
|
|
@@ -18734,8 +18486,6 @@ let ConversationMessage$1 = class ConversationMessage extends TsEmbed {
|
|
|
18734
18486
|
genNo,
|
|
18735
18487
|
acSessionId,
|
|
18736
18488
|
acGenNo,
|
|
18737
|
-
convId,
|
|
18738
|
-
messageId,
|
|
18739
18489
|
});
|
|
18740
18490
|
return `${this.getEmbedBasePath(query)}/embed/${path}${tsPostHashParams}`;
|
|
18741
18491
|
}
|
|
@@ -18779,8 +18529,6 @@ class SpotterAgentEmbed {
|
|
|
18779
18529
|
const container = document.createElement('div');
|
|
18780
18530
|
const embed = new ConversationMessage$1(container, {
|
|
18781
18531
|
...this.viewConfig,
|
|
18782
|
-
convId: data.convId,
|
|
18783
|
-
messageId: data.messageId,
|
|
18784
18532
|
sessionId: data.sessionId,
|
|
18785
18533
|
genNo: data.genNo,
|
|
18786
18534
|
acSessionId: data.stateKey.transactionId,
|
|
@@ -18801,8 +18549,6 @@ class SpotterAgentEmbed {
|
|
|
18801
18549
|
return { error };
|
|
18802
18550
|
}
|
|
18803
18551
|
return { data: {
|
|
18804
|
-
convId: data.convId,
|
|
18805
|
-
messageId: data.messageId,
|
|
18806
18552
|
sessionId: data.sessionId,
|
|
18807
18553
|
genNo: data.genNo,
|
|
18808
18554
|
acSessionId: data.stateKey.transactionId,
|