@thoughtspot/visual-embed-sdk 1.39.2 → 1.39.3
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/config.spec.js +9 -0
- package/cjs/src/config.spec.js.map +1 -1
- package/cjs/src/embed/app.d.ts +19 -15
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +23 -2
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/app.spec.js +56 -8
- package/cjs/src/embed/app.spec.js.map +1 -1
- package/cjs/src/embed/bodyless-conversation.d.ts +23 -7
- package/cjs/src/embed/bodyless-conversation.d.ts.map +1 -1
- package/cjs/src/embed/bodyless-conversation.js +31 -5
- package/cjs/src/embed/bodyless-conversation.js.map +1 -1
- package/cjs/src/embed/bodyless-conversation.spec.js +8 -190
- package/cjs/src/embed/bodyless-conversation.spec.js.map +1 -1
- package/cjs/src/embed/conversation.spec.js +28 -0
- package/cjs/src/embed/conversation.spec.js.map +1 -1
- package/cjs/src/embed/embedConfig.d.ts +9 -7
- package/cjs/src/embed/embedConfig.d.ts.map +1 -1
- package/cjs/src/embed/embedConfig.js +9 -7
- package/cjs/src/embed/embedConfig.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts +0 -17
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +2 -4
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/liveboard.spec.js +12 -11
- package/cjs/src/embed/liveboard.spec.js.map +1 -1
- package/cjs/src/errors.d.ts +1 -0
- package/cjs/src/errors.d.ts.map +1 -1
- package/cjs/src/errors.js +1 -0
- package/cjs/src/errors.js.map +1 -1
- package/cjs/src/index.d.ts +2 -2
- package/cjs/src/index.d.ts.map +1 -1
- package/cjs/src/index.js +2 -1
- package/cjs/src/index.js.map +1 -1
- package/cjs/src/react/all-types-export.d.ts +1 -1
- package/cjs/src/react/all-types-export.d.ts.map +1 -1
- package/cjs/src/react/all-types-export.js +3 -2
- package/cjs/src/react/all-types-export.js.map +1 -1
- package/cjs/src/react/index.d.ts +73 -20
- package/cjs/src/react/index.d.ts.map +1 -1
- package/cjs/src/react/index.js +79 -42
- package/cjs/src/react/index.js.map +1 -1
- package/cjs/src/react/index.spec.js +438 -100
- package/cjs/src/react/index.spec.js.map +1 -1
- package/cjs/src/types.d.ts +262 -6
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +228 -2
- package/cjs/src/types.js.map +1 -1
- package/cjs/src/utils/global-styles.js +1 -1
- package/cjs/src/utils/graphql/nlsService/conversation-service.d.ts.map +1 -1
- package/cjs/src/utils/graphql/nlsService/conversation-service.js +7 -1
- package/cjs/src/utils/graphql/nlsService/conversation-service.js.map +1 -1
- package/cjs/src/utils.spec.js +25 -0
- package/cjs/src/utils.spec.js.map +1 -1
- package/dist/{index-CmEQfuE3.js → index-ZrE8YYq8.js} +1 -1
- package/dist/src/embed/app.d.ts +19 -15
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/bodyless-conversation.d.ts +23 -7
- package/dist/src/embed/bodyless-conversation.d.ts.map +1 -1
- package/dist/src/embed/embedConfig.d.ts +9 -7
- package/dist/src/embed/embedConfig.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts +0 -17
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/errors.d.ts +1 -0
- package/dist/src/errors.d.ts.map +1 -1
- package/dist/src/index.d.ts +2 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/react/all-types-export.d.ts +1 -1
- package/dist/src/react/all-types-export.d.ts.map +1 -1
- package/dist/src/react/index.d.ts +73 -20
- package/dist/src/react/index.d.ts.map +1 -1
- package/dist/src/types.d.ts +262 -6
- 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 +385 -71
- package/dist/tsembed-react.js +385 -69
- package/dist/tsembed.es.js +303 -24
- package/dist/tsembed.js +301 -22
- package/dist/visual-embed-sdk-react-full.d.ts +386 -72
- package/dist/visual-embed-sdk-react.d.ts +386 -72
- package/dist/visual-embed-sdk.d.ts +314 -53
- package/lib/package.json +1 -1
- package/lib/src/config.spec.js +9 -0
- package/lib/src/config.spec.js.map +1 -1
- package/lib/src/embed/app.d.ts +19 -15
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +22 -1
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/app.spec.js +58 -10
- package/lib/src/embed/app.spec.js.map +1 -1
- package/lib/src/embed/bodyless-conversation.d.ts +23 -7
- package/lib/src/embed/bodyless-conversation.d.ts.map +1 -1
- package/lib/src/embed/bodyless-conversation.js +30 -5
- package/lib/src/embed/bodyless-conversation.js.map +1 -1
- package/lib/src/embed/bodyless-conversation.spec.js +9 -191
- package/lib/src/embed/bodyless-conversation.spec.js.map +1 -1
- package/lib/src/embed/conversation.spec.js +30 -2
- package/lib/src/embed/conversation.spec.js.map +1 -1
- package/lib/src/embed/embedConfig.d.ts +9 -7
- package/lib/src/embed/embedConfig.d.ts.map +1 -1
- package/lib/src/embed/embedConfig.js +9 -7
- package/lib/src/embed/embedConfig.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts +0 -17
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +2 -4
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +12 -11
- package/lib/src/embed/liveboard.spec.js.map +1 -1
- package/lib/src/errors.d.ts +1 -0
- package/lib/src/errors.d.ts.map +1 -1
- package/lib/src/errors.js +1 -0
- package/lib/src/errors.js.map +1 -1
- package/lib/src/index.d.ts +2 -2
- package/lib/src/index.d.ts.map +1 -1
- package/lib/src/index.js +2 -2
- package/lib/src/index.js.map +1 -1
- package/lib/src/react/all-types-export.d.ts +1 -1
- package/lib/src/react/all-types-export.d.ts.map +1 -1
- package/lib/src/react/all-types-export.js +1 -1
- package/lib/src/react/all-types-export.js.map +1 -1
- package/lib/src/react/index.d.ts +73 -20
- package/lib/src/react/index.d.ts.map +1 -1
- package/lib/src/react/index.js +79 -43
- package/lib/src/react/index.js.map +1 -1
- package/lib/src/react/index.spec.js +441 -103
- package/lib/src/react/index.spec.js.map +1 -1
- package/lib/src/types.d.ts +262 -6
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +228 -2
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils/global-styles.js +1 -1
- package/lib/src/utils/graphql/nlsService/conversation-service.d.ts.map +1 -1
- package/lib/src/utils/graphql/nlsService/conversation-service.js +7 -1
- package/lib/src/utils/graphql/nlsService/conversation-service.js.map +1 -1
- package/lib/src/utils.spec.js +26 -1
- package/lib/src/utils.spec.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +315 -54
- package/package.json +1 -1
- package/src/config.spec.ts +11 -0
- package/src/embed/app.spec.ts +90 -23
- package/src/embed/app.ts +27 -15
- package/src/embed/bodyless-conversation.spec.ts +9 -203
- package/src/embed/bodyless-conversation.ts +34 -10
- package/src/embed/conversation.spec.ts +40 -2
- package/src/embed/embedConfig.ts +10 -8
- package/src/embed/liveboard.spec.ts +5 -4
- package/src/embed/liveboard.ts +2 -22
- package/src/errors.ts +1 -0
- package/src/index.ts +2 -0
- package/src/react/all-types-export.ts +2 -1
- package/src/react/index.spec.tsx +558 -157
- package/src/react/index.tsx +117 -51
- package/src/types.ts +301 -44
- package/src/utils/global-styles.ts +1 -1
- package/src/utils/graphql/nlsService/conversation-service.ts +7 -1
- package/src/utils.spec.ts +29 -0
package/dist/tsembed.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @thoughtspot/visual-embed-sdk version 1.39.
|
|
1
|
+
/* @thoughtspot/visual-embed-sdk version 1.39.3 */
|
|
2
2
|
'use client';
|
|
3
3
|
function _mergeNamespaces(n, m) {
|
|
4
4
|
m.forEach(function (e) {
|
|
@@ -653,6 +653,12 @@ var HomeLeftNavItem;
|
|
|
653
653
|
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
654
654
|
*/
|
|
655
655
|
HomeLeftNavItem["Spotter"] = "spotter";
|
|
656
|
+
/**
|
|
657
|
+
* Favorites option in the insights left navigation,
|
|
658
|
+
* available when new navigation V3 is enabled.
|
|
659
|
+
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
660
|
+
*/
|
|
661
|
+
HomeLeftNavItem["Favorites"] = "favorites";
|
|
656
662
|
})(HomeLeftNavItem || (HomeLeftNavItem = {}));
|
|
657
663
|
/**
|
|
658
664
|
* A map of the supported runtime filter operations
|
|
@@ -1839,6 +1845,83 @@ var EmbedEvent;
|
|
|
1839
1845
|
* @version SDK : 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
1840
1846
|
*/
|
|
1841
1847
|
EmbedEvent["ExitPresentMode"] = "exitPresentMode";
|
|
1848
|
+
/**
|
|
1849
|
+
* Emitted when spotter response is text data
|
|
1850
|
+
* @example
|
|
1851
|
+
* ```js
|
|
1852
|
+
* spotterEmbed.on(EmbedEvent.SpotterData, (payload) => {
|
|
1853
|
+
* console.log('payload', payload);
|
|
1854
|
+
* })
|
|
1855
|
+
*```
|
|
1856
|
+
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
1857
|
+
*/
|
|
1858
|
+
EmbedEvent["SpotterData"] = "SpotterData";
|
|
1859
|
+
/**
|
|
1860
|
+
* Emitted when user opens up the worksheet preview modal in spotter embed.
|
|
1861
|
+
* @example
|
|
1862
|
+
* ```js
|
|
1863
|
+
* spotterEmbed.on(EmbedEvent.PreviewSpotterData, (payload) => {
|
|
1864
|
+
* console.log('payload', payload);
|
|
1865
|
+
* })
|
|
1866
|
+
*```
|
|
1867
|
+
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
1868
|
+
*/
|
|
1869
|
+
EmbedEvent["PreviewSpotterData"] = "PreviewSpotterData";
|
|
1870
|
+
/**
|
|
1871
|
+
* Emitted when the spotter query is triggered in spotter embed.
|
|
1872
|
+
* @example
|
|
1873
|
+
* ```js
|
|
1874
|
+
* spotterEmbed.on(EmbedEvent.SpotterQueryTriggered, (payload) => {
|
|
1875
|
+
* console.log('payload', payload);
|
|
1876
|
+
* })
|
|
1877
|
+
*```
|
|
1878
|
+
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
1879
|
+
*/
|
|
1880
|
+
EmbedEvent["SpotterQueryTriggered"] = "SpotterQueryTriggered";
|
|
1881
|
+
/**
|
|
1882
|
+
* Emitted when the last spotter query is edited in spotter embed.
|
|
1883
|
+
* @example
|
|
1884
|
+
* ```js
|
|
1885
|
+
* spotterEmbed.on(EmbedEvent.LastPromptEdited, (payload) => {
|
|
1886
|
+
* console.log('payload', payload);
|
|
1887
|
+
* })
|
|
1888
|
+
*```
|
|
1889
|
+
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
1890
|
+
*/
|
|
1891
|
+
EmbedEvent["LastPromptEdited"] = "LastPromptEdited";
|
|
1892
|
+
/**
|
|
1893
|
+
* Emitted when the last spotter query is deleted in spotter embed.
|
|
1894
|
+
* @example
|
|
1895
|
+
* ```js
|
|
1896
|
+
* spotterEmbed.on(EmbedEvent.LastPromptDeleted, (payload) => {
|
|
1897
|
+
* console.log('payload', payload);
|
|
1898
|
+
* })
|
|
1899
|
+
*```
|
|
1900
|
+
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
1901
|
+
*/
|
|
1902
|
+
EmbedEvent["LastPromptDeleted"] = "LastPromptDeleted";
|
|
1903
|
+
/**
|
|
1904
|
+
* Emitted when the coversation is reset in spotter embed.
|
|
1905
|
+
* @example
|
|
1906
|
+
* ```js
|
|
1907
|
+
* spotterEmbed.on(EmbedEvent.ResetSpotterConversation, (payload) => {
|
|
1908
|
+
* console.log('payload', payload);
|
|
1909
|
+
* })
|
|
1910
|
+
*```
|
|
1911
|
+
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
1912
|
+
*/
|
|
1913
|
+
EmbedEvent["ResetSpotterConversation"] = "ResetSpotterConversation";
|
|
1914
|
+
/**
|
|
1915
|
+
* Emitted when the *Spotter* is initialized.
|
|
1916
|
+
* @example
|
|
1917
|
+
* ```js
|
|
1918
|
+
* spotterEmbed.on(EmbedEvent.SpotterInit, (payload) => {
|
|
1919
|
+
* console.log('payload', payload);
|
|
1920
|
+
* })
|
|
1921
|
+
*```
|
|
1922
|
+
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
1923
|
+
*/
|
|
1924
|
+
EmbedEvent["SpotterInit"] = "SpotterInit";
|
|
1842
1925
|
})(EmbedEvent || (EmbedEvent = {}));
|
|
1843
1926
|
/**
|
|
1844
1927
|
* Event types that can be triggered by the host application
|
|
@@ -2129,6 +2212,7 @@ var HostEvent;
|
|
|
2129
2212
|
* @param
|
|
2130
2213
|
* `vizId`- GUID of the saved Answer or visualization to pin to a Liveboard.
|
|
2131
2214
|
* Optional when pinning a new chart or table generated from a Search query.
|
|
2215
|
+
* **Required** in Spotter Embed.
|
|
2132
2216
|
* @param
|
|
2133
2217
|
* `liveboardID` - GUID of the Liveboard to pin an Answer. If there is no Liveboard,
|
|
2134
2218
|
* specify the `newLiveboardName` parameter to create a new Liveboard.
|
|
@@ -2176,6 +2260,12 @@ var HostEvent;
|
|
|
2176
2260
|
* ```js
|
|
2177
2261
|
* appEmbed.trigger(HostEvent.Pin)
|
|
2178
2262
|
* ```
|
|
2263
|
+
* @example
|
|
2264
|
+
* ```js
|
|
2265
|
+
* const pinResponse = await spotterEmbed.trigger(HostEvent.Pin, {
|
|
2266
|
+
* vizId:'730496d6-6903-4601-937e-2c691821af3c'
|
|
2267
|
+
* });
|
|
2268
|
+
* ```
|
|
2179
2269
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2180
2270
|
*/
|
|
2181
2271
|
HostEvent["Pin"] = "pin";
|
|
@@ -2269,6 +2359,12 @@ var HostEvent;
|
|
|
2269
2359
|
* ```js
|
|
2270
2360
|
* searchEmbed.trigger(HostEvent.MakeACopy)
|
|
2271
2361
|
* ```
|
|
2362
|
+
* @example
|
|
2363
|
+
* ```js
|
|
2364
|
+
* const pinResponse = await spotterEmbed.trigger(HostEvent.MakeACopy, {
|
|
2365
|
+
* vizId:'730496d6-6903-4601-937e-2c691821af3c'
|
|
2366
|
+
* });
|
|
2367
|
+
* ```
|
|
2272
2368
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2273
2369
|
*/
|
|
2274
2370
|
HostEvent["MakeACopy"] = "makeACopy";
|
|
@@ -2341,6 +2437,7 @@ var HostEvent;
|
|
|
2341
2437
|
* This event is not supported in visualization embed and search embed.
|
|
2342
2438
|
* @param - object - To trigger the action for a specific visualization
|
|
2343
2439
|
* in Liveboard embed, pass in `vizId` as a key.
|
|
2440
|
+
* **Required** in Spotter embed.
|
|
2344
2441
|
* @example
|
|
2345
2442
|
* ```js
|
|
2346
2443
|
* liveboardEmbed.trigger(HostEvent.Edit)
|
|
@@ -2349,6 +2446,12 @@ var HostEvent;
|
|
|
2349
2446
|
* liveboardEmbed.trigger(HostEvent.Edit, {vizId:
|
|
2350
2447
|
* '730496d6-6903-4601-937e-2c691821af3c'})
|
|
2351
2448
|
* ```
|
|
2449
|
+
* @example
|
|
2450
|
+
* ```js
|
|
2451
|
+
* const pinResponse = await spotterEmbed.trigger(HostEvent.Edit, {
|
|
2452
|
+
* vizId:'730496d6-6903-4601-937e-2c691821af3c'
|
|
2453
|
+
* });
|
|
2454
|
+
* ```
|
|
2352
2455
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2353
2456
|
*/
|
|
2354
2457
|
HostEvent["Edit"] = "edit";
|
|
@@ -2396,6 +2499,16 @@ var HostEvent;
|
|
|
2396
2499
|
* );
|
|
2397
2500
|
* })
|
|
2398
2501
|
* ```
|
|
2502
|
+
* @example
|
|
2503
|
+
* ```js
|
|
2504
|
+
* spotterEmbed.trigger(HostEvent.GetTML, {
|
|
2505
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
2506
|
+
* }).then((tml) => {
|
|
2507
|
+
* console.log(
|
|
2508
|
+
* tml.answer.search_query // TML representation of the search query
|
|
2509
|
+
* );
|
|
2510
|
+
* })
|
|
2511
|
+
* ```
|
|
2399
2512
|
* @version SDK: 1.18.0 | ThoughtSpot: 8.10.0.cl, 9.0.1.sw
|
|
2400
2513
|
* @important
|
|
2401
2514
|
*/
|
|
@@ -2483,7 +2596,12 @@ var HostEvent;
|
|
|
2483
2596
|
* vizEmbed.trigger(HostEvent.DownloadAsPng)
|
|
2484
2597
|
*
|
|
2485
2598
|
* searchEmbed.trigger(HostEvent.DownloadAsPng)
|
|
2599
|
+
*
|
|
2600
|
+
* spotterEmbed.trigger(HostEvent.DownloadAsPng, {
|
|
2601
|
+
* vizId:"730496d6-6903-4601-937e-2c691821af3c"
|
|
2602
|
+
* })
|
|
2486
2603
|
* ```
|
|
2604
|
+
*
|
|
2487
2605
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.1.sw
|
|
2488
2606
|
*/
|
|
2489
2607
|
HostEvent["DownloadAsPng"] = "downloadAsPng";
|
|
@@ -2501,6 +2619,11 @@ var HostEvent;
|
|
|
2501
2619
|
* ```js
|
|
2502
2620
|
* searchEmbed.trigger(HostEvent.DownloadAsCsv)
|
|
2503
2621
|
* ```
|
|
2622
|
+
* ```js
|
|
2623
|
+
* spotterEmbed.trigger(HostEvent.DownloadAsCsv, {
|
|
2624
|
+
* vizId:"730496d6-6903-4601-937e-2c691821af3c"
|
|
2625
|
+
* })
|
|
2626
|
+
* ```
|
|
2504
2627
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
2505
2628
|
*/
|
|
2506
2629
|
HostEvent["DownloadAsCsv"] = "downloadAsCSV";
|
|
@@ -2518,6 +2641,11 @@ var HostEvent;
|
|
|
2518
2641
|
* ```js
|
|
2519
2642
|
* searchEmbed.trigger(HostEvent.DownloadAsXlsx)
|
|
2520
2643
|
* ```
|
|
2644
|
+
* ```js
|
|
2645
|
+
* spotterEmbed.trigger(HostEvent.downloadAsXLSX, {
|
|
2646
|
+
* vizId:"730496d6-6903-4601-937e-2c691821af3c"
|
|
2647
|
+
* })
|
|
2648
|
+
* ```
|
|
2521
2649
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
2522
2650
|
*/
|
|
2523
2651
|
HostEvent["DownloadAsXlsx"] = "downloadAsXLSX";
|
|
@@ -2537,6 +2665,7 @@ var HostEvent;
|
|
|
2537
2665
|
/**
|
|
2538
2666
|
* Trigger the **Save** action on a Liveboard or Answer.
|
|
2539
2667
|
* Saves the changes.
|
|
2668
|
+
* @param - `vizId` is required in Spotter Embed.
|
|
2540
2669
|
* @example
|
|
2541
2670
|
* ```js
|
|
2542
2671
|
* liveboardEmbed.trigger(HostEvent.Save)
|
|
@@ -2544,6 +2673,11 @@ var HostEvent;
|
|
|
2544
2673
|
* ```js
|
|
2545
2674
|
* searchEmbed.trigger(HostEvent.Save)
|
|
2546
2675
|
* ```
|
|
2676
|
+
* ```js
|
|
2677
|
+
* spotterEmbed.trigger(HostEvent.Save, {
|
|
2678
|
+
* vizId:"730496d6-6903-4601-937e-2c691821af3c"
|
|
2679
|
+
* })
|
|
2680
|
+
* ```
|
|
2547
2681
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
2548
2682
|
*/
|
|
2549
2683
|
HostEvent["Save"] = "save";
|
|
@@ -2827,7 +2961,7 @@ var HostEvent;
|
|
|
2827
2961
|
HostEvent["ResetLiveboardPersonalisedView"] = "ResetLiveboardPersonalisedView";
|
|
2828
2962
|
/**
|
|
2829
2963
|
* Triggers an action to update Parameter values on embedded
|
|
2830
|
-
* Answers and
|
|
2964
|
+
* Answers, Liveboard and Spotter answer in Edit mode.
|
|
2831
2965
|
*
|
|
2832
2966
|
* @example
|
|
2833
2967
|
* ```js
|
|
@@ -2846,6 +2980,13 @@ var HostEvent;
|
|
|
2846
2980
|
* console.log('parameters', parameter);
|
|
2847
2981
|
* });
|
|
2848
2982
|
*```
|
|
2983
|
+
*```js
|
|
2984
|
+
* spotterEmbed.trigger(HostEvent.GetParameters, {
|
|
2985
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
2986
|
+
* }).then((parameter) => {
|
|
2987
|
+
* console.log('parameters', parameter);
|
|
2988
|
+
* });
|
|
2989
|
+
*```
|
|
2849
2990
|
* @version SDK: 1.29.0 | ThoughtSpot: 10.1.0.cl, 10.1.0.sw
|
|
2850
2991
|
*/
|
|
2851
2992
|
HostEvent["GetParameters"] = "GetParameters";
|
|
@@ -2913,6 +3054,64 @@ var HostEvent;
|
|
|
2913
3054
|
* @version SDK: 1.37.0 | ThoughtSpot: 10.8.0.cl
|
|
2914
3055
|
*/
|
|
2915
3056
|
HostEvent["TransformTableVizData"] = "TransformTableVizData";
|
|
3057
|
+
/**
|
|
3058
|
+
* Triggers a search operation with the search tokens specified in
|
|
3059
|
+
* the search query string in spotter embed.
|
|
3060
|
+
* @param - `queryString`: Text string in Natural Language format
|
|
3061
|
+
* @param - `executeSearch`: Boolean to execute search and update search query
|
|
3062
|
+
* @example
|
|
3063
|
+
* ```js
|
|
3064
|
+
* spotterEmbed.trigger(HostEvent.SpotterSearch, {
|
|
3065
|
+
* query: 'revenue per year',
|
|
3066
|
+
* executeSearch: true,
|
|
3067
|
+
* })
|
|
3068
|
+
* ```
|
|
3069
|
+
*/
|
|
3070
|
+
HostEvent["SpotterSearch"] = "SpotterSearch";
|
|
3071
|
+
/**
|
|
3072
|
+
* Edits the last prompt in spotter embed.
|
|
3073
|
+
* @param - `query`: Text string
|
|
3074
|
+
* @example
|
|
3075
|
+
* ```js
|
|
3076
|
+
* spotterEmbed.trigger(HostEvent.EditLastPrompt, "revenue per year");
|
|
3077
|
+
* ```
|
|
3078
|
+
*/
|
|
3079
|
+
HostEvent["EditLastPrompt"] = "EditLastPrompt";
|
|
3080
|
+
/**
|
|
3081
|
+
* Opens the Worksheet preview modal in Spotter Embed.
|
|
3082
|
+
* @example
|
|
3083
|
+
* ```js
|
|
3084
|
+
* spotterEmbed.trigger(HostEvent.PreviewSpotterData);
|
|
3085
|
+
* ```
|
|
3086
|
+
*/
|
|
3087
|
+
HostEvent["PreviewSpotterData"] = "PreviewSpotterData";
|
|
3088
|
+
/**
|
|
3089
|
+
* Resets the Spotter Embed Conversation.
|
|
3090
|
+
* @example
|
|
3091
|
+
* ```js
|
|
3092
|
+
* spotterEmbed.trigger(HostEvent.ResetSpotterConversation);
|
|
3093
|
+
* ```
|
|
3094
|
+
*/
|
|
3095
|
+
HostEvent["ResetSpotterConversation"] = "ResetSpotterConversation";
|
|
3096
|
+
/**
|
|
3097
|
+
* Deletes the last prompt in spotter embed.
|
|
3098
|
+
* @example
|
|
3099
|
+
* ```js
|
|
3100
|
+
* spotterEmbed.trigger(HostEvent.DeleteLastPrompt);
|
|
3101
|
+
* ```
|
|
3102
|
+
*/
|
|
3103
|
+
HostEvent["DeleteLastPrompt"] = "DeleteLastPrompt";
|
|
3104
|
+
/**
|
|
3105
|
+
* Toggle the visualization to chart or table view.
|
|
3106
|
+
* @param - `vizId ` In Spotter Embed, vizId is required.
|
|
3107
|
+
* @example
|
|
3108
|
+
* ```js
|
|
3109
|
+
* spotterEmbed.trigger(HostEvent.AnswerChartSwitcher, {
|
|
3110
|
+
* vizId:"'b535c760-8bbe-4e6f-bb26-af56b4129a1e'"
|
|
3111
|
+
* });
|
|
3112
|
+
*```
|
|
3113
|
+
*/
|
|
3114
|
+
HostEvent["AnswerChartSwitcher"] = "answerChartSwitcher";
|
|
2916
3115
|
/**
|
|
2917
3116
|
* @hidden
|
|
2918
3117
|
* Trigger exit from presentation mode when user exits fullscreen.
|
|
@@ -2923,6 +3122,16 @@ var HostEvent;
|
|
|
2923
3122
|
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
2924
3123
|
*/
|
|
2925
3124
|
HostEvent["ExitPresentMode"] = "exitPresentMode";
|
|
3125
|
+
/**
|
|
3126
|
+
* Trigger the *Ask Sage* action for visualizations
|
|
3127
|
+
* @example
|
|
3128
|
+
* ```js
|
|
3129
|
+
* liveboardEmbed.trigger(HostEvent.AskSpotter,
|
|
3130
|
+
* {containerId:'730496d6-6903-4601-937e-2c691821af3c'})
|
|
3131
|
+
* ```
|
|
3132
|
+
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
3133
|
+
*/
|
|
3134
|
+
HostEvent["AskSpotter"] = "askSpotter";
|
|
2926
3135
|
})(HostEvent || (HostEvent = {}));
|
|
2927
3136
|
/**
|
|
2928
3137
|
* The different visual modes that the data sources panel within
|
|
@@ -3028,6 +3237,7 @@ var Param;
|
|
|
3028
3237
|
Param["Query"] = "query";
|
|
3029
3238
|
Param["HideHomepageLeftNav"] = "hideHomepageLeftNav";
|
|
3030
3239
|
Param["ModularHomeExperienceEnabled"] = "modularHomeExperience";
|
|
3240
|
+
Param["ListPageVersion"] = "listpageVersion";
|
|
3031
3241
|
Param["PendoTrackingKey"] = "additionalPendoKey";
|
|
3032
3242
|
Param["LiveboardHeaderSticky"] = "isLiveboardHeaderSticky";
|
|
3033
3243
|
Param["IsProductTour"] = "isProductTour";
|
|
@@ -3062,7 +3272,7 @@ var Param;
|
|
|
3062
3272
|
Param["DataSourceId"] = "dataSourceId";
|
|
3063
3273
|
Param["preAuthCache"] = "preAuthCache";
|
|
3064
3274
|
Param["ShowSpotterLimitations"] = "showSpotterLimitations";
|
|
3065
|
-
Param["CoverAndFilterOptionInPDF"] = "
|
|
3275
|
+
Param["CoverAndFilterOptionInPDF"] = "arePdfCoverFilterPageCheckboxesEnabled";
|
|
3066
3276
|
Param["PrimaryAction"] = "primaryAction";
|
|
3067
3277
|
Param["isSpotterAgentEmbed"] = "isSpotterAgentEmbed";
|
|
3068
3278
|
Param["IsLiveboardStylingAndGroupingEnabled"] = "isLiveboardStylingAndGroupingEnabled";
|
|
@@ -4288,6 +4498,22 @@ var Action;
|
|
|
4288
4498
|
* @version SDK: 1.37.0 | ThoughtSpot Cloud: 10.8.0.cl
|
|
4289
4499
|
*/
|
|
4290
4500
|
Action["CoverAndFilterOptionInPDF"] = "coverAndFilterOptionInPDF";
|
|
4501
|
+
/**
|
|
4502
|
+
* Action ID for hide or disable the
|
|
4503
|
+
* Spotter in conversation training widget.
|
|
4504
|
+
* The Add to Coaching feature is currently in beta
|
|
4505
|
+
* and is disabled by default on embed deployments.
|
|
4506
|
+
* To enable this feature on your instance,
|
|
4507
|
+
* contact ThoughtSpot Support.
|
|
4508
|
+
* @example
|
|
4509
|
+
* ```js
|
|
4510
|
+
* hiddenAction: [Action.InConversationTraining]
|
|
4511
|
+
* disabledActions: [Action.InConversationTraining]
|
|
4512
|
+
*
|
|
4513
|
+
* ```
|
|
4514
|
+
* @version SDK: 1.39.0 | ThoughtSpot Cloud: 10.10.0.cl
|
|
4515
|
+
*/
|
|
4516
|
+
Action["InConversationTraining"] = "InConversationTraining";
|
|
4291
4517
|
})(Action || (Action = {}));
|
|
4292
4518
|
var PrefetchFeatures;
|
|
4293
4519
|
(function (PrefetchFeatures) {
|
|
@@ -6754,6 +6980,7 @@ const ERROR_MESSAGE = {
|
|
|
6754
6980
|
CSP_FRAME_HOST_VIOLATION_LOG_MESSAGE: 'Please set up CSP correctly for the application to start working. For more information, see https://developers.thoughtspot.com/docs/security-settings#csp-viz-embed-hosts. \n If the issue persists, refer to https://developers.thoughtspot.com/docs/security-settings#csp-viz-embed-hosts',
|
|
6755
6981
|
MISSING_REPORTING_OBSERVER: 'ReportingObserver not supported',
|
|
6756
6982
|
RENDER_CALLED_BEFORE_INIT: 'Looks like render was called before calling init, the render won\'t start until init is called.\nFor more info check\n1. https://developers.thoughtspot.com/docs/Function_init#_init\n2.https://developers.thoughtspot.com/docs/getting-started#initSdk',
|
|
6983
|
+
SPOTTER_AGENT_NOT_INITIALIZED: 'SpotterAgent not initialized',
|
|
6757
6984
|
};
|
|
6758
6985
|
|
|
6759
6986
|
const EndPoints = {
|
|
@@ -6961,13 +7188,14 @@ const configKey = 'embedConfig';
|
|
|
6961
7188
|
*
|
|
6962
7189
|
* @example
|
|
6963
7190
|
* ```js
|
|
7191
|
+
* import { getInitConfig } from '@thoughtspot/visual-embed-sdk';
|
|
7192
|
+
* // Call the getInitConfig method to retrieve the embed configuration
|
|
6964
7193
|
* const config = getInitConfig();
|
|
7194
|
+
* // Log the configuration settings
|
|
6965
7195
|
* console.log(config);
|
|
6966
7196
|
* ```
|
|
6967
|
-
*
|
|
6968
|
-
*
|
|
6969
|
-
* Returns the `EmbedConfig` object, which
|
|
6970
|
-
* contains the configuration settings used to
|
|
7197
|
+
* Returns the link:https://developers.thoughtspot.com/docs/Interface_EmbedConfig[EmbedConfig]
|
|
7198
|
+
* object, which contains the configuration settings used to
|
|
6971
7199
|
* initialize the SDK, including the following:
|
|
6972
7200
|
*
|
|
6973
7201
|
* - `thoughtSpotHost` - ThoughtSpot host URL
|
|
@@ -6976,9 +7204,10 @@ const configKey = 'embedConfig';
|
|
|
6976
7204
|
* - `customizations` - Style, text, and icon customization settings
|
|
6977
7205
|
* that were applied during the SDK initialization.
|
|
6978
7206
|
*
|
|
6979
|
-
*
|
|
6980
|
-
*
|
|
7207
|
+
* The following JSON output shows the embed configuration
|
|
7208
|
+
* settings returned from the code in the previous example:
|
|
6981
7209
|
*
|
|
7210
|
+
* @example
|
|
6982
7211
|
* ```json
|
|
6983
7212
|
* {
|
|
6984
7213
|
* "thoughtSpotHost": "https://{ThoughtSpot-Host}",
|
|
@@ -7000,7 +7229,7 @@ const configKey = 'embedConfig';
|
|
|
7000
7229
|
* "authTriggerContainer": "#your-own-div"
|
|
7001
7230
|
* }
|
|
7002
7231
|
* ```
|
|
7003
|
-
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.
|
|
7232
|
+
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw, and later
|
|
7004
7233
|
* @group Global methods
|
|
7005
7234
|
*/
|
|
7006
7235
|
const getEmbedConfig = () => getValueFromWindow(configKey) || {};
|
|
@@ -7642,7 +7871,7 @@ class AnswerService {
|
|
|
7642
7871
|
async getTML() {
|
|
7643
7872
|
const { object } = await this.executeQuery(getAnswerTML, {});
|
|
7644
7873
|
const edoc = object[0].edoc;
|
|
7645
|
-
const YAML = await import('./index-
|
|
7874
|
+
const YAML = await import('./index-ZrE8YYq8.js');
|
|
7646
7875
|
const parsedDoc = YAML.parse(edoc);
|
|
7647
7876
|
return {
|
|
7648
7877
|
answer: {
|
|
@@ -15542,7 +15771,7 @@ function processEventData(type, e, thoughtSpotHost, containerEl) {
|
|
|
15542
15771
|
return e;
|
|
15543
15772
|
}
|
|
15544
15773
|
|
|
15545
|
-
var name="@thoughtspot/visual-embed-sdk";var version$1="1.39.
|
|
15774
|
+
var name="@thoughtspot/visual-embed-sdk";var version$1="1.39.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};
|
|
15546
15775
|
|
|
15547
15776
|
/**
|
|
15548
15777
|
* Reloads the ThoughtSpot iframe.
|
|
@@ -17036,6 +17265,22 @@ var HomePage;
|
|
|
17036
17265
|
*/
|
|
17037
17266
|
HomePage["Modular"] = "v2";
|
|
17038
17267
|
})(HomePage || (HomePage = {}));
|
|
17268
|
+
/**
|
|
17269
|
+
* Define the version of the list page
|
|
17270
|
+
* @version SDK: 1.40.0 | ThoughtSpot: 10.12.0.cl
|
|
17271
|
+
*/
|
|
17272
|
+
var ListPage;
|
|
17273
|
+
(function (ListPage) {
|
|
17274
|
+
/**
|
|
17275
|
+
* List (v2) is the traditional List Experience.
|
|
17276
|
+
* It serves as the foundational version of the list page.
|
|
17277
|
+
*/
|
|
17278
|
+
ListPage["List"] = "v2";
|
|
17279
|
+
/**
|
|
17280
|
+
* ListWithUXChanges (v3) introduces the new updated list page with UX changes.
|
|
17281
|
+
*/
|
|
17282
|
+
ListPage["ListWithUXChanges"] = "v3";
|
|
17283
|
+
})(ListPage || (ListPage = {}));
|
|
17039
17284
|
/**
|
|
17040
17285
|
* Embeds full ThoughtSpot experience in a host application.
|
|
17041
17286
|
* @group Embed components
|
|
@@ -17092,7 +17337,7 @@ class AppEmbed extends V1Embed {
|
|
|
17092
17337
|
getEmbedParams() {
|
|
17093
17338
|
const { tag, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideHamburger, hideObjectSearch, hideNotification, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 = false, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, hideHomepageLeftNav = false, modularHomeExperience = false, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, enable2ColumnLayout, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false,
|
|
17094
17339
|
/* eslint-disable-next-line max-len */
|
|
17095
|
-
dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, discoveryExperience, isLiveboardStylingAndGroupingEnabled, } = this.viewConfig;
|
|
17340
|
+
dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, discoveryExperience, coverAndFilterOptionInPDF = false, isLiveboardStylingAndGroupingEnabled, } = this.viewConfig;
|
|
17096
17341
|
let params = {};
|
|
17097
17342
|
params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
|
|
17098
17343
|
params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
|
|
@@ -17108,6 +17353,7 @@ class AppEmbed extends V1Embed {
|
|
|
17108
17353
|
params[Param.ShowLiveboardReverifyBanner] = showLiveboardReverifyBanner;
|
|
17109
17354
|
params[Param.HideIrrelevantFiltersInTab] = hideIrrelevantChipsInLiveboardTabs;
|
|
17110
17355
|
params[Param.IsUnifiedSearchExperienceEnabled] = isUnifiedSearchExperienceEnabled;
|
|
17356
|
+
params[Param.CoverAndFilterOptionInPDF] = !!coverAndFilterOptionInPDF;
|
|
17111
17357
|
params = this.getBaseQueryParams(params);
|
|
17112
17358
|
if (hideObjectSearch) {
|
|
17113
17359
|
params[Param.HideObjectSearch] = !!hideObjectSearch;
|
|
@@ -17178,6 +17424,10 @@ class AppEmbed extends V1Embed {
|
|
|
17178
17424
|
if (discoveryExperience.homePage === HomePage.Modular) {
|
|
17179
17425
|
params[Param.ModularHomeExperienceEnabled] = true;
|
|
17180
17426
|
}
|
|
17427
|
+
// listPageVersion v3 will enable the new list page
|
|
17428
|
+
if (discoveryExperience.listPageVersion === ListPage.ListWithUXChanges) {
|
|
17429
|
+
params[Param.ListPageVersion] = discoveryExperience.listPageVersion;
|
|
17430
|
+
}
|
|
17181
17431
|
}
|
|
17182
17432
|
const queryParams = getQueryParamString(params, true);
|
|
17183
17433
|
return queryParams;
|
|
@@ -17315,7 +17565,7 @@ const addPreviewStylesIfNotPresent = () => {
|
|
|
17315
17565
|
return;
|
|
17316
17566
|
}
|
|
17317
17567
|
const previewStyles = `
|
|
17318
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/ag-grid-community@32.0.2/styles/ag-grid.min.css">
|
|
17568
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/ag-grid-community@32.0.2/styles/ag-grid.min.css" integrity="sha384-PvEsKa6emq5KYa9mf+Q7eYF5C2OCacYzZ+hBngp21NA4o1A9iU9smnytEmqUFbEZ" crossorigin="anonymous">
|
|
17319
17569
|
<style id="ts-preview-style">
|
|
17320
17570
|
.ts-viz-preview-loader {
|
|
17321
17571
|
position: absolute;
|
|
@@ -17427,7 +17677,7 @@ class LiveboardEmbed extends V1Embed {
|
|
|
17427
17677
|
getEmbedParams() {
|
|
17428
17678
|
let params = {};
|
|
17429
17679
|
params = this.getBaseQueryParams(params);
|
|
17430
|
-
const { enableVizTransformations, fullHeight, defaultHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, enableAskSage, enable2ColumnLayout, dataPanelV2 = false, enableCustomColumnGroups = false, oAuthPollingInterval, isForceRedirect, dataSourceId, coverAndFilterOptionInPDF, isLiveboardStylingAndGroupingEnabled, } = this.viewConfig;
|
|
17680
|
+
const { enableVizTransformations, fullHeight, defaultHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, enableAskSage, enable2ColumnLayout, dataPanelV2 = false, enableCustomColumnGroups = false, oAuthPollingInterval, isForceRedirect, dataSourceId, coverAndFilterOptionInPDF = false, isLiveboardStylingAndGroupingEnabled, } = this.viewConfig;
|
|
17431
17681
|
const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
|
|
17432
17682
|
|| this.viewConfig.preventPinboardFilterRemoval;
|
|
17433
17683
|
if (fullHeight === true) {
|
|
@@ -17479,9 +17729,6 @@ class LiveboardEmbed extends V1Embed {
|
|
|
17479
17729
|
if (dataSourceId !== undefined) {
|
|
17480
17730
|
params[Param.DataSourceId] = dataSourceId;
|
|
17481
17731
|
}
|
|
17482
|
-
if (coverAndFilterOptionInPDF !== undefined) {
|
|
17483
|
-
params[Param.CoverAndFilterOptionInPDF] = coverAndFilterOptionInPDF;
|
|
17484
|
-
}
|
|
17485
17732
|
if (isLiveboardStylingAndGroupingEnabled !== undefined) {
|
|
17486
17733
|
params[Param.IsLiveboardStylingAndGroupingEnabled] = isLiveboardStylingAndGroupingEnabled;
|
|
17487
17734
|
}
|
|
@@ -17492,6 +17739,7 @@ class LiveboardEmbed extends V1Embed {
|
|
|
17492
17739
|
params[Param.HideIrrelevantFiltersInTab] = hideIrrelevantChipsInLiveboardTabs;
|
|
17493
17740
|
params[Param.DataPanelV2Enabled] = dataPanelV2;
|
|
17494
17741
|
params[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
|
|
17742
|
+
params[Param.CoverAndFilterOptionInPDF] = coverAndFilterOptionInPDF;
|
|
17495
17743
|
const queryParams = getQueryParamString(params, true);
|
|
17496
17744
|
return queryParams;
|
|
17497
17745
|
}
|
|
@@ -18250,7 +18498,13 @@ class Conversation {
|
|
|
18250
18498
|
});
|
|
18251
18499
|
const data = responses[0].data;
|
|
18252
18500
|
return {
|
|
18253
|
-
|
|
18501
|
+
convId: this.conversationId,
|
|
18502
|
+
messageId: responses[0].msgId,
|
|
18503
|
+
data: {
|
|
18504
|
+
...data.asstRespData.nlsAnsData.sageQuerySuggestions[0],
|
|
18505
|
+
convId: this.conversationId,
|
|
18506
|
+
messageId: responses[0].msgId,
|
|
18507
|
+
},
|
|
18254
18508
|
error: null,
|
|
18255
18509
|
};
|
|
18256
18510
|
}
|
|
@@ -18276,7 +18530,7 @@ class ConversationMessage extends TsEmbed {
|
|
|
18276
18530
|
}
|
|
18277
18531
|
getIframeSrc() {
|
|
18278
18532
|
var _a;
|
|
18279
|
-
const { sessionId, genNo, acSessionId, acGenNo, } = this.viewConfig;
|
|
18533
|
+
const { sessionId, genNo, acSessionId, acGenNo, convId, messageId, } = this.viewConfig;
|
|
18280
18534
|
const path = 'conv-assist-answer';
|
|
18281
18535
|
const queryParams = this.getBaseQueryParams();
|
|
18282
18536
|
queryParams[Param.HideActions] = [...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : [])];
|
|
@@ -18291,6 +18545,8 @@ class ConversationMessage extends TsEmbed {
|
|
|
18291
18545
|
genNo,
|
|
18292
18546
|
acSessionId,
|
|
18293
18547
|
acGenNo,
|
|
18548
|
+
convId,
|
|
18549
|
+
messageId,
|
|
18294
18550
|
});
|
|
18295
18551
|
return `${this.getEmbedBasePath(query)}/embed/${path}${tsPostHashParams}`;
|
|
18296
18552
|
}
|
|
@@ -18332,11 +18588,10 @@ class SpotterAgentEmbed {
|
|
|
18332
18588
|
return { error };
|
|
18333
18589
|
}
|
|
18334
18590
|
const container = document.createElement('div');
|
|
18335
|
-
if (this.viewConfig.containerClassName) {
|
|
18336
|
-
container.className = this.viewConfig.containerClassName;
|
|
18337
|
-
}
|
|
18338
18591
|
const embed = new ConversationMessage(container, {
|
|
18339
18592
|
...this.viewConfig,
|
|
18593
|
+
convId: data.convId,
|
|
18594
|
+
messageId: data.messageId,
|
|
18340
18595
|
sessionId: data.sessionId,
|
|
18341
18596
|
genNo: data.genNo,
|
|
18342
18597
|
acSessionId: data.stateKey.transactionId,
|
|
@@ -18345,6 +18600,30 @@ class SpotterAgentEmbed {
|
|
|
18345
18600
|
await embed.render();
|
|
18346
18601
|
return { container, viz: embed };
|
|
18347
18602
|
}
|
|
18603
|
+
/**
|
|
18604
|
+
* Send a message to the conversation service and return only the data.
|
|
18605
|
+
* @param userMessage - The message to send to the conversation service.
|
|
18606
|
+
* @returns The data from the conversation service.
|
|
18607
|
+
*/
|
|
18608
|
+
async sendMessageData(userMessage) {
|
|
18609
|
+
try {
|
|
18610
|
+
const { data, error } = await this.conversationService.sendMessage(userMessage);
|
|
18611
|
+
if (error) {
|
|
18612
|
+
return { error };
|
|
18613
|
+
}
|
|
18614
|
+
return { data: {
|
|
18615
|
+
convId: data.convId,
|
|
18616
|
+
messageId: data.messageId,
|
|
18617
|
+
sessionId: data.sessionId,
|
|
18618
|
+
genNo: data.genNo,
|
|
18619
|
+
acSessionId: data.stateKey.transactionId,
|
|
18620
|
+
acGenNo: data.stateKey.generationNumber,
|
|
18621
|
+
} };
|
|
18622
|
+
}
|
|
18623
|
+
catch (error) {
|
|
18624
|
+
return { error: error };
|
|
18625
|
+
}
|
|
18626
|
+
}
|
|
18348
18627
|
}
|
|
18349
18628
|
/**
|
|
18350
18629
|
* Create a conversation embed, which can be integrated inside
|
|
@@ -19067,4 +19346,4 @@ const createLiveboardWithAnswers = async (answers, name) => {
|
|
|
19067
19346
|
return result;
|
|
19068
19347
|
};
|
|
19069
19348
|
|
|
19070
|
-
export { Action, AnswerService, AppEmbed, AuthEvent, AuthFailureType, AuthStatus, AuthType, BodylessConversation, ContextMenuTriggerOptions, ConversationEmbed, DataPanelCustomColumnGroupsAccordionState$1 as DataPanelCustomColumnGroupsAccordionState, DataSourceVisualMode, EmbedEvent, HomeLeftNavItem, HomePage, HomePageSearchBarMode, HomepageModule, HostEvent, ListPageColumns, LiveboardEmbed, LogLevel, MIXPANEL_EVENT, Page, PinboardEmbed, PrefetchFeatures, PrimaryNavbarVersion, RuntimeFilterOp, SageEmbed, SearchBarEmbed, SearchEmbed, SpotterAgentEmbed, SpotterEmbed, UIPassthroughEvent, createLiveboardWithAnswers, executeTML, exportTML, getAnswerFromQuery, getEmbedConfig as getInitConfig, getSessionInfo, init, logout, prefetch, resetCachedAuthToken, tokenizedFetch, uploadMixpanelEvent };
|
|
19349
|
+
export { Action, AnswerService, AppEmbed, AuthEvent, AuthFailureType, AuthStatus, AuthType, BodylessConversation, ContextMenuTriggerOptions, ConversationEmbed, DataPanelCustomColumnGroupsAccordionState$1 as DataPanelCustomColumnGroupsAccordionState, DataSourceVisualMode, EmbedEvent, HomeLeftNavItem, HomePage, HomePageSearchBarMode, HomepageModule, HostEvent, ListPage, ListPageColumns, LiveboardEmbed, LogLevel, MIXPANEL_EVENT, Page, PinboardEmbed, PrefetchFeatures, PrimaryNavbarVersion, RuntimeFilterOp, SageEmbed, SearchBarEmbed, SearchEmbed, SpotterAgentEmbed, SpotterEmbed, UIPassthroughEvent, createLiveboardWithAnswers, executeTML, exportTML, getAnswerFromQuery, getEmbedConfig as getInitConfig, getSessionInfo, init, logout, prefetch, resetCachedAuthToken, tokenizedFetch, uploadMixpanelEvent };
|