@thoughtspot/visual-embed-sdk 1.40.1-alpha.2 → 1.40.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 +7 -6
- package/cjs/src/css-variables.d.ts +316 -0
- package/cjs/src/css-variables.d.ts.map +1 -1
- package/cjs/src/embed/app.d.ts +6 -1
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +22 -0
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/app.spec.js +39 -2
- package/cjs/src/embed/app.spec.js.map +1 -1
- package/cjs/src/embed/bodyless-conversation.d.ts +0 -1
- package/cjs/src/embed/bodyless-conversation.d.ts.map +1 -1
- package/cjs/src/embed/bodyless-conversation.js +3 -7
- package/cjs/src/embed/bodyless-conversation.js.map +1 -1
- package/cjs/src/embed/conversation.d.ts +63 -3
- package/cjs/src/embed/conversation.d.ts.map +1 -1
- package/cjs/src/embed/conversation.js +11 -8
- package/cjs/src/embed/conversation.js.map +1 -1
- package/cjs/src/embed/conversation.spec.js +102 -0
- package/cjs/src/embed/conversation.spec.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts +11 -3
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +23 -33
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/liveboard.spec.js +182 -29
- package/cjs/src/embed/liveboard.spec.js.map +1 -1
- package/cjs/src/embed/sage.d.ts +0 -1
- package/cjs/src/embed/sage.d.ts.map +1 -1
- package/cjs/src/embed/sage.js +6 -10
- package/cjs/src/embed/sage.js.map +1 -1
- package/cjs/src/embed/search-bar.d.ts +0 -1
- package/cjs/src/embed/search-bar.d.ts.map +1 -1
- package/cjs/src/embed/search-bar.js +7 -11
- package/cjs/src/embed/search-bar.js.map +1 -1
- package/cjs/src/embed/search.d.ts +0 -1
- package/cjs/src/embed/search.d.ts.map +1 -1
- package/cjs/src/embed/search.js +8 -7
- package/cjs/src/embed/search.js.map +1 -1
- package/cjs/src/embed/ts-embed.d.ts +22 -9
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +75 -59
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/embed/ts-embed.spec.js +173 -1
- package/cjs/src/embed/ts-embed.spec.js.map +1 -1
- package/cjs/src/types.d.ts +154 -54
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +140 -52
- package/cjs/src/types.js.map +1 -1
- package/cjs/src/utils/liveboardService/liveboardService.d.ts +21 -6
- package/cjs/src/utils/liveboardService/liveboardService.d.ts.map +1 -1
- package/cjs/src/utils/liveboardService/liveboardService.js +21 -6
- package/cjs/src/utils/liveboardService/liveboardService.js.map +1 -1
- package/dist/{index-CmEQfuE3.js → index-P5YjBOuJ.js} +1 -1
- package/dist/src/css-variables.d.ts +316 -0
- package/dist/src/css-variables.d.ts.map +1 -1
- package/dist/src/embed/app.d.ts +6 -1
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/bodyless-conversation.d.ts +0 -1
- package/dist/src/embed/bodyless-conversation.d.ts.map +1 -1
- package/dist/src/embed/conversation.d.ts +63 -3
- package/dist/src/embed/conversation.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts +11 -3
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/embed/sage.d.ts +0 -1
- package/dist/src/embed/sage.d.ts.map +1 -1
- package/dist/src/embed/search-bar.d.ts +0 -1
- package/dist/src/embed/search-bar.d.ts.map +1 -1
- package/dist/src/embed/search.d.ts +0 -1
- package/dist/src/embed/search.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.d.ts +22 -9
- package/dist/src/embed/ts-embed.d.ts.map +1 -1
- package/dist/src/types.d.ts +154 -54
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/liveboardService/liveboardService.d.ts +21 -6
- package/dist/src/utils/liveboardService/liveboardService.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +298 -190
- package/dist/tsembed-react.js +297 -189
- package/dist/tsembed.es.js +319 -196
- package/dist/tsembed.js +318 -195
- package/dist/visual-embed-sdk-react-full.d.ts +583 -76
- package/dist/visual-embed-sdk-react.d.ts +583 -76
- package/dist/visual-embed-sdk.d.ts +583 -76
- package/lib/package.json +7 -6
- package/lib/src/css-variables.d.ts +316 -0
- package/lib/src/css-variables.d.ts.map +1 -1
- package/lib/src/embed/app.d.ts +6 -1
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +22 -0
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/app.spec.js +39 -2
- package/lib/src/embed/app.spec.js.map +1 -1
- package/lib/src/embed/bodyless-conversation.d.ts +0 -1
- package/lib/src/embed/bodyless-conversation.d.ts.map +1 -1
- package/lib/src/embed/bodyless-conversation.js +3 -7
- package/lib/src/embed/bodyless-conversation.js.map +1 -1
- package/lib/src/embed/conversation.d.ts +63 -3
- package/lib/src/embed/conversation.d.ts.map +1 -1
- package/lib/src/embed/conversation.js +12 -9
- package/lib/src/embed/conversation.js.map +1 -1
- package/lib/src/embed/conversation.spec.js +104 -2
- package/lib/src/embed/conversation.spec.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts +11 -3
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +23 -33
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +182 -29
- package/lib/src/embed/liveboard.spec.js.map +1 -1
- package/lib/src/embed/sage.d.ts +0 -1
- package/lib/src/embed/sage.d.ts.map +1 -1
- package/lib/src/embed/sage.js +6 -10
- package/lib/src/embed/sage.js.map +1 -1
- package/lib/src/embed/search-bar.d.ts +0 -1
- package/lib/src/embed/search-bar.d.ts.map +1 -1
- package/lib/src/embed/search-bar.js +7 -11
- package/lib/src/embed/search-bar.js.map +1 -1
- package/lib/src/embed/search.d.ts +0 -1
- package/lib/src/embed/search.d.ts.map +1 -1
- package/lib/src/embed/search.js +8 -7
- package/lib/src/embed/search.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts +22 -9
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +75 -59
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/embed/ts-embed.spec.js +173 -1
- package/lib/src/embed/ts-embed.spec.js.map +1 -1
- package/lib/src/types.d.ts +154 -54
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +140 -52
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils/liveboardService/liveboardService.d.ts +21 -6
- package/lib/src/utils/liveboardService/liveboardService.d.ts.map +1 -1
- package/lib/src/utils/liveboardService/liveboardService.js +21 -6
- package/lib/src/utils/liveboardService/liveboardService.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +584 -77
- package/package.json +7 -6
- package/src/css-variables.ts +396 -1
- package/src/embed/app.spec.ts +54 -2
- package/src/embed/app.ts +24 -0
- package/src/embed/bodyless-conversation.ts +3 -9
- package/src/embed/conversation.spec.ts +131 -5
- package/src/embed/conversation.ts +87 -23
- package/src/embed/liveboard.spec.ts +233 -32
- package/src/embed/liveboard.ts +24 -39
- package/src/embed/sage.ts +6 -11
- package/src/embed/search-bar.tsx +7 -14
- package/src/embed/search.ts +7 -18
- package/src/embed/ts-embed.spec.ts +344 -112
- package/src/embed/ts-embed.ts +82 -70
- package/src/types.ts +153 -54
- package/src/utils/liveboardService/liveboardService.ts +21 -6
- package/dist/index-D1pyb7RG.js +0 -7371
- package/dist/index-DeFzsyFF.js +0 -7371
- package/dist/index-Dpf0rd6w.js +0 -7371
- package/dist/index-UuEbsISo.js +0 -7447
- package/dist/index-e3Uw3YFO.js +0 -7371
- package/dist/index-k7pkZMhx.js +0 -7371
package/dist/tsembed-react.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @thoughtspot/visual-embed-sdk version 1.40.1
|
|
1
|
+
/* @thoughtspot/visual-embed-sdk version 1.40.1 */
|
|
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.LiveboardInfo, payload => {
|
|
1227
1227
|
* console.log('Liveboard details', payload);
|
|
1228
1228
|
* })
|
|
1229
1229
|
*```
|
|
@@ -1598,58 +1598,58 @@ var EmbedEvent;
|
|
|
1598
1598
|
*/
|
|
1599
1599
|
EmbedEvent["RequestVisibleEmbedCoordinates"] = "requestVisibleEmbedCoordinates";
|
|
1600
1600
|
/**
|
|
1601
|
-
* Emitted when
|
|
1601
|
+
* Emitted when Spotter response is text data
|
|
1602
1602
|
* @example
|
|
1603
1603
|
* ```js
|
|
1604
1604
|
* spotterEmbed.on(EmbedEvent.SpotterData, (payload) => {
|
|
1605
1605
|
* console.log('payload', payload);
|
|
1606
1606
|
* })
|
|
1607
1607
|
*```
|
|
1608
|
-
* @version SDK: 1.
|
|
1608
|
+
* @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
|
|
1609
1609
|
*/
|
|
1610
1610
|
EmbedEvent["SpotterData"] = "SpotterData";
|
|
1611
1611
|
/**
|
|
1612
|
-
* Emitted when user opens up the worksheet preview modal in
|
|
1612
|
+
* Emitted when user opens up the worksheet preview modal in Spotter embed.
|
|
1613
1613
|
* @example
|
|
1614
1614
|
* ```js
|
|
1615
1615
|
* spotterEmbed.on(EmbedEvent.PreviewSpotterData, (payload) => {
|
|
1616
1616
|
* console.log('payload', payload);
|
|
1617
1617
|
* })
|
|
1618
1618
|
*```
|
|
1619
|
-
* @version SDK: 1.
|
|
1619
|
+
* @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
|
|
1620
1620
|
*/
|
|
1621
1621
|
EmbedEvent["PreviewSpotterData"] = "PreviewSpotterData";
|
|
1622
1622
|
/**
|
|
1623
|
-
* Emitted when the
|
|
1623
|
+
* Emitted when the Spotter query is triggered in Spotter embed.
|
|
1624
1624
|
* @example
|
|
1625
1625
|
* ```js
|
|
1626
1626
|
* spotterEmbed.on(EmbedEvent.SpotterQueryTriggered, (payload) => {
|
|
1627
1627
|
* console.log('payload', payload);
|
|
1628
1628
|
* })
|
|
1629
1629
|
*```
|
|
1630
|
-
* @version SDK: 1.
|
|
1630
|
+
* @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
|
|
1631
1631
|
*/
|
|
1632
1632
|
EmbedEvent["SpotterQueryTriggered"] = "SpotterQueryTriggered";
|
|
1633
1633
|
/**
|
|
1634
|
-
* Emitted when the last
|
|
1634
|
+
* Emitted when the last Spotter query is edited in Spotter embed.
|
|
1635
1635
|
* @example
|
|
1636
1636
|
* ```js
|
|
1637
1637
|
* spotterEmbed.on(EmbedEvent.LastPromptEdited, (payload) => {
|
|
1638
1638
|
* console.log('payload', payload);
|
|
1639
1639
|
* })
|
|
1640
1640
|
*```
|
|
1641
|
-
* @version SDK: 1.
|
|
1641
|
+
* @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
|
|
1642
1642
|
*/
|
|
1643
1643
|
EmbedEvent["LastPromptEdited"] = "LastPromptEdited";
|
|
1644
1644
|
/**
|
|
1645
|
-
* Emitted when the last
|
|
1645
|
+
* Emitted when the last Spotter query is deleted in Spotter embed.
|
|
1646
1646
|
* @example
|
|
1647
1647
|
* ```js
|
|
1648
1648
|
* spotterEmbed.on(EmbedEvent.LastPromptDeleted, (payload) => {
|
|
1649
1649
|
* console.log('payload', payload);
|
|
1650
1650
|
* })
|
|
1651
1651
|
*```
|
|
1652
|
-
* @version SDK: 1.
|
|
1652
|
+
* @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
|
|
1653
1653
|
*/
|
|
1654
1654
|
EmbedEvent["LastPromptDeleted"] = "LastPromptDeleted";
|
|
1655
1655
|
/**
|
|
@@ -1660,7 +1660,7 @@ var EmbedEvent;
|
|
|
1660
1660
|
* console.log('payload', payload);
|
|
1661
1661
|
* })
|
|
1662
1662
|
*```
|
|
1663
|
-
* @version SDK: 1.
|
|
1663
|
+
* @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
|
|
1664
1664
|
*/
|
|
1665
1665
|
EmbedEvent["ResetSpotterConversation"] = "ResetSpotterConversation";
|
|
1666
1666
|
/**
|
|
@@ -1673,7 +1673,19 @@ var EmbedEvent;
|
|
|
1673
1673
|
*```
|
|
1674
1674
|
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
1675
1675
|
*/
|
|
1676
|
-
EmbedEvent["SpotterInit"] = "
|
|
1676
|
+
EmbedEvent["SpotterInit"] = "spotterInit";
|
|
1677
|
+
/**
|
|
1678
|
+
* @hidden
|
|
1679
|
+
* Triggers when the embed listener is ready to receive events.
|
|
1680
|
+
* This is used to trigger events after the embed container is loaded.
|
|
1681
|
+
* @example
|
|
1682
|
+
* ```js
|
|
1683
|
+
* liveboardEmbed.on(EmbedEvent.EmbedListenerReady, () => {
|
|
1684
|
+
* console.log('EmbedListenerReady');
|
|
1685
|
+
* })
|
|
1686
|
+
* ```
|
|
1687
|
+
*/
|
|
1688
|
+
EmbedEvent["EmbedListenerReady"] = "EmbedListenerReady";
|
|
1677
1689
|
})(EmbedEvent || (EmbedEvent = {}));
|
|
1678
1690
|
/**
|
|
1679
1691
|
* Event types that can be triggered by the host application
|
|
@@ -1763,6 +1775,7 @@ var HostEvent;
|
|
|
1763
1775
|
* done automatically on the most popular column.
|
|
1764
1776
|
* @param - vizId [TS >= 9.8.0] - Optional. The GUID of the visualization to drill
|
|
1765
1777
|
* in case of a Liveboard.
|
|
1778
|
+
* @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
|
|
1766
1779
|
* @example
|
|
1767
1780
|
* ```js
|
|
1768
1781
|
* searchEmbed.on(EmbedEvent.VizPointDoubleClick, (payload) => {
|
|
@@ -2082,12 +2095,21 @@ var HostEvent;
|
|
|
2082
2095
|
* Trigger the **Download PDF** action on an embedded Liveboard,
|
|
2083
2096
|
* visualization or Answer.
|
|
2084
2097
|
*
|
|
2098
|
+
* @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
|
|
2099
|
+
*
|
|
2085
2100
|
* **NOTE**: The **Download** > **PDF** action is available on
|
|
2086
2101
|
* visualizations and Answers if the data is in tabular format.
|
|
2087
2102
|
* @example
|
|
2088
2103
|
* ```js
|
|
2089
2104
|
* liveboardEmbed.trigger(HostEvent.DownloadAsPdf)
|
|
2090
2105
|
* ```
|
|
2106
|
+
* @example
|
|
2107
|
+
* ```js
|
|
2108
|
+
* spotterEmbed.trigger(HostEvent.DownloadAsPdf, {
|
|
2109
|
+
* vizId:'730496d6-6903-4601-937e-2c691821af3c'
|
|
2110
|
+
* });
|
|
2111
|
+
* ```
|
|
2112
|
+
*
|
|
2091
2113
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2092
2114
|
*/
|
|
2093
2115
|
HostEvent["DownloadAsPdf"] = "downloadAsPdf";
|
|
@@ -2189,7 +2211,8 @@ var HostEvent;
|
|
|
2189
2211
|
* This event is not supported in visualization embed and search embed.
|
|
2190
2212
|
* @param - object - To trigger the action for a specific visualization
|
|
2191
2213
|
* in Liveboard embed, pass in `vizId` as a key.
|
|
2192
|
-
*
|
|
2214
|
+
* @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
|
|
2215
|
+
*
|
|
2193
2216
|
* @example
|
|
2194
2217
|
* ```js
|
|
2195
2218
|
* liveboardEmbed.trigger(HostEvent.Edit)
|
|
@@ -2204,6 +2227,12 @@ var HostEvent;
|
|
|
2204
2227
|
* vizId:'730496d6-6903-4601-937e-2c691821af3c'
|
|
2205
2228
|
* });
|
|
2206
2229
|
* ```
|
|
2230
|
+
* @example
|
|
2231
|
+
* ```js
|
|
2232
|
+
* const editResponse = await spotterEmbed.trigger(HostEvent.Edit, {
|
|
2233
|
+
* vizId:'730496d6-6903-4601-937e-2c691821af3c'
|
|
2234
|
+
* });
|
|
2235
|
+
* ```
|
|
2207
2236
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2208
2237
|
*/
|
|
2209
2238
|
HostEvent["Edit"] = "edit";
|
|
@@ -2324,6 +2353,7 @@ var HostEvent;
|
|
|
2324
2353
|
/**
|
|
2325
2354
|
* Trigger the **Download** action on charts in
|
|
2326
2355
|
* the embedded view.
|
|
2356
|
+
* @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
|
|
2327
2357
|
* @example
|
|
2328
2358
|
* ```js
|
|
2329
2359
|
* liveboardEmbed.trigger(HostEvent.Download, {vizId:
|
|
@@ -2332,6 +2362,11 @@ var HostEvent;
|
|
|
2332
2362
|
* ```js
|
|
2333
2363
|
* embed.trigger(HostEvent.Download)
|
|
2334
2364
|
* ```
|
|
2365
|
+
* ```js
|
|
2366
|
+
* spotterEmbed.trigger(HostEvent.Download, {
|
|
2367
|
+
* vizId:'730496d6-6903-4601-937e-2c691821af3c'
|
|
2368
|
+
* });
|
|
2369
|
+
* ```
|
|
2335
2370
|
* @deprecated from SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl ,9.4.1.sw
|
|
2336
2371
|
* Use {@link DownloadAsPng}
|
|
2337
2372
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
@@ -2360,6 +2395,7 @@ var HostEvent;
|
|
|
2360
2395
|
/**
|
|
2361
2396
|
* Trigger the **Download** > **CSV** action on tables in
|
|
2362
2397
|
* the embedded view.
|
|
2398
|
+
* @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
|
|
2363
2399
|
* @example
|
|
2364
2400
|
* ```js
|
|
2365
2401
|
* liveboardEmbed.trigger(HostEvent.DownloadAsCsv, {vizId:
|
|
@@ -2382,6 +2418,7 @@ var HostEvent;
|
|
|
2382
2418
|
/**
|
|
2383
2419
|
* Trigger the **Download** > **XLSX** action on tables
|
|
2384
2420
|
* in the embedded view.
|
|
2421
|
+
* @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
|
|
2385
2422
|
* @example
|
|
2386
2423
|
* ```js
|
|
2387
2424
|
* liveboardEmbed.trigger(HostEvent.DownloadAsXlsx, {vizId:
|
|
@@ -2417,7 +2454,7 @@ var HostEvent;
|
|
|
2417
2454
|
/**
|
|
2418
2455
|
* Trigger the **Save** action on a Liveboard or Answer.
|
|
2419
2456
|
* Saves the changes.
|
|
2420
|
-
* @param - `vizId` is required in Spotter
|
|
2457
|
+
* @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
|
|
2421
2458
|
* @example
|
|
2422
2459
|
* ```js
|
|
2423
2460
|
* liveboardEmbed.trigger(HostEvent.Save)
|
|
@@ -2727,6 +2764,7 @@ var HostEvent;
|
|
|
2727
2764
|
HostEvent["UpdateParameters"] = "UpdateParameters";
|
|
2728
2765
|
/**
|
|
2729
2766
|
* Triggers GetParameters to fetch the runtime Parameters.
|
|
2767
|
+
* @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
|
|
2730
2768
|
* ```js
|
|
2731
2769
|
* liveboardEmbed.trigger(HostEvent.GetParameters).then((parameter) => {
|
|
2732
2770
|
* console.log('parameters', parameter);
|
|
@@ -2770,7 +2808,7 @@ var HostEvent;
|
|
|
2770
2808
|
* @param - optional attributes to set Answer properties.
|
|
2771
2809
|
* `name` - Name string for the Answer.
|
|
2772
2810
|
* `description` - Description text for the Answer.
|
|
2773
|
-
*
|
|
2811
|
+
* @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
|
|
2774
2812
|
* @example
|
|
2775
2813
|
* ```js
|
|
2776
2814
|
* const saveAnswerResponse = await searchEmbed.trigger(HostEvent.SaveAnswer, {
|
|
@@ -2778,6 +2816,14 @@ var HostEvent;
|
|
|
2778
2816
|
* description: "Total sales by states in MidWest"
|
|
2779
2817
|
* });
|
|
2780
2818
|
* ```
|
|
2819
|
+
* @example
|
|
2820
|
+
* ```js
|
|
2821
|
+
* const saveAnswerResponse = await spotterEmbed.trigger(HostEvent.SaveAnswer, {
|
|
2822
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c',
|
|
2823
|
+
* name: "Sales by states",
|
|
2824
|
+
* description: "Total sales by states in MidWest"
|
|
2825
|
+
* });
|
|
2826
|
+
* ```
|
|
2781
2827
|
* @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
|
|
2782
2828
|
*/
|
|
2783
2829
|
HostEvent["SaveAnswer"] = "saveAnswer";
|
|
@@ -2809,7 +2855,7 @@ var HostEvent;
|
|
|
2809
2855
|
/**
|
|
2810
2856
|
* Triggers a search operation with the search tokens specified in
|
|
2811
2857
|
* the search query string in spotter embed.
|
|
2812
|
-
* @param - `
|
|
2858
|
+
* @param - `query`: Text string in Natural Language format
|
|
2813
2859
|
* @param - `executeSearch`: Boolean to execute search and update search query
|
|
2814
2860
|
* @example
|
|
2815
2861
|
* ```js
|
|
@@ -2818,6 +2864,7 @@ var HostEvent;
|
|
|
2818
2864
|
* executeSearch: true,
|
|
2819
2865
|
* })
|
|
2820
2866
|
* ```
|
|
2867
|
+
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
2821
2868
|
*/
|
|
2822
2869
|
HostEvent["SpotterSearch"] = "SpotterSearch";
|
|
2823
2870
|
/**
|
|
@@ -2827,6 +2874,7 @@ var HostEvent;
|
|
|
2827
2874
|
* ```js
|
|
2828
2875
|
* spotterEmbed.trigger(HostEvent.EditLastPrompt, "revenue per year");
|
|
2829
2876
|
* ```
|
|
2877
|
+
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
2830
2878
|
*/
|
|
2831
2879
|
HostEvent["EditLastPrompt"] = "EditLastPrompt";
|
|
2832
2880
|
/**
|
|
@@ -2835,6 +2883,7 @@ var HostEvent;
|
|
|
2835
2883
|
* ```js
|
|
2836
2884
|
* spotterEmbed.trigger(HostEvent.PreviewSpotterData);
|
|
2837
2885
|
* ```
|
|
2886
|
+
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
2838
2887
|
*/
|
|
2839
2888
|
HostEvent["PreviewSpotterData"] = "PreviewSpotterData";
|
|
2840
2889
|
/**
|
|
@@ -2843,6 +2892,7 @@ var HostEvent;
|
|
|
2843
2892
|
* ```js
|
|
2844
2893
|
* spotterEmbed.trigger(HostEvent.ResetSpotterConversation);
|
|
2845
2894
|
* ```
|
|
2895
|
+
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
2846
2896
|
*/
|
|
2847
2897
|
HostEvent["ResetSpotterConversation"] = "ResetSpotterConversation";
|
|
2848
2898
|
/**
|
|
@@ -2851,17 +2901,19 @@ var HostEvent;
|
|
|
2851
2901
|
* ```js
|
|
2852
2902
|
* spotterEmbed.trigger(HostEvent.DeleteLastPrompt);
|
|
2853
2903
|
* ```
|
|
2904
|
+
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
2854
2905
|
*/
|
|
2855
2906
|
HostEvent["DeleteLastPrompt"] = "DeleteLastPrompt";
|
|
2856
2907
|
/**
|
|
2857
2908
|
* Toggle the visualization to chart or table view.
|
|
2858
|
-
* @param - `vizId `
|
|
2909
|
+
* @param - `vizId ` refers to the answer id in spotter Embed, it is required in spotter Embed.
|
|
2859
2910
|
* @example
|
|
2860
2911
|
* ```js
|
|
2861
2912
|
* spotterEmbed.trigger(HostEvent.AnswerChartSwitcher, {
|
|
2862
|
-
* vizId:
|
|
2913
|
+
* vizId:'b535c760-8bbe-4e6f-bb26-af56b4129a1e'
|
|
2863
2914
|
* });
|
|
2864
2915
|
*```
|
|
2916
|
+
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
2865
2917
|
*/
|
|
2866
2918
|
HostEvent["AnswerChartSwitcher"] = "answerChartSwitcher";
|
|
2867
2919
|
/**
|
|
@@ -2888,25 +2940,16 @@ var HostEvent;
|
|
|
2888
2940
|
*/
|
|
2889
2941
|
HostEvent["VisibleEmbedCoordinates"] = "visibleEmbedCoordinates";
|
|
2890
2942
|
/**
|
|
2891
|
-
* Trigger the *Ask
|
|
2943
|
+
* Trigger the *Ask Spotter* action for visualizations
|
|
2944
|
+
* @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
|
|
2892
2945
|
* @example
|
|
2893
2946
|
* ```js
|
|
2894
|
-
*
|
|
2895
|
-
* {
|
|
2947
|
+
* spotterEmbed.trigger(HostEvent.AskSpotter,
|
|
2948
|
+
* {vizId:'730496d6-6903-4601-937e-2c691821af3c'})
|
|
2896
2949
|
* ```
|
|
2897
2950
|
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
2898
2951
|
*/
|
|
2899
|
-
HostEvent["AskSpotter"] = "
|
|
2900
|
-
/**
|
|
2901
|
-
* @hidden
|
|
2902
|
-
* Triggers the update of the embed params.
|
|
2903
|
-
*
|
|
2904
|
-
* @example
|
|
2905
|
-
* ```js
|
|
2906
|
-
* liveboardEmbed.trigger(HostEvent.UpdateEmbedParams, viewConfig);
|
|
2907
|
-
* ```
|
|
2908
|
-
*/
|
|
2909
|
-
HostEvent["UpdateEmbedParams"] = "updateEmbedParams";
|
|
2952
|
+
HostEvent["AskSpotter"] = "AskSpotter";
|
|
2910
2953
|
})(HostEvent || (HostEvent = {}));
|
|
2911
2954
|
/**
|
|
2912
2955
|
* The different visual modes that the data sources panel within
|
|
@@ -3012,6 +3055,7 @@ var Param;
|
|
|
3012
3055
|
Param["Query"] = "query";
|
|
3013
3056
|
Param["HideHomepageLeftNav"] = "hideHomepageLeftNav";
|
|
3014
3057
|
Param["ModularHomeExperienceEnabled"] = "modularHomeExperience";
|
|
3058
|
+
Param["HomepageVersion"] = "homepageVersion";
|
|
3015
3059
|
Param["ListPageVersion"] = "listpageVersion";
|
|
3016
3060
|
Param["PendoTrackingKey"] = "additionalPendoKey";
|
|
3017
3061
|
Param["LiveboardHeaderSticky"] = "isLiveboardHeaderSticky";
|
|
@@ -3206,27 +3250,27 @@ var Action;
|
|
|
3206
3250
|
*/
|
|
3207
3251
|
Action["ConfigureFilter"] = "configureFilter";
|
|
3208
3252
|
/**
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3253
|
+
* The **Collapse data sources** icon on the Search page.
|
|
3254
|
+
* Collapses the panel showing data sources.
|
|
3255
|
+
*
|
|
3256
|
+
* @example
|
|
3257
|
+
* ```js
|
|
3258
|
+
* disabledActions: [Action.CollapseDataPanel]
|
|
3259
|
+
* ```
|
|
3260
|
+
* @version: SDK: 1.1.0 | ThoughtSpot Cloud: ts7.may.cl, 8.4.1.sw
|
|
3261
|
+
*/
|
|
3218
3262
|
Action["CollapseDataSources"] = "collapseDataSources";
|
|
3219
3263
|
/**
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3264
|
+
* The **Collapse data panel** icon on the Search page.
|
|
3265
|
+
* Collapses the data panel view.
|
|
3266
|
+
*
|
|
3267
|
+
* @version: SDK: 1.34.0 | ThoughtSpot Cloud: 10.3.0.cl
|
|
3268
|
+
*
|
|
3269
|
+
* @example
|
|
3270
|
+
* ```js
|
|
3271
|
+
* disabledActions: [Action.CollapseDataPanel]
|
|
3272
|
+
* ```
|
|
3273
|
+
*/
|
|
3230
3274
|
Action["CollapseDataPanel"] = "collapseDataPanel";
|
|
3231
3275
|
/**
|
|
3232
3276
|
* The **Choose sources** button on Search page.
|
|
@@ -3922,6 +3966,17 @@ var Action;
|
|
|
3922
3966
|
* @version SDK: 1.25.0 | ThoughtSpot Cloud: 9.6.0.cl
|
|
3923
3967
|
*/
|
|
3924
3968
|
Action["EnableContextualChangeAnalysis"] = "enableContextualChangeAnalysis";
|
|
3969
|
+
/**
|
|
3970
|
+
* Action ID to hide or disable Iterative Change Analysis option
|
|
3971
|
+
* on contextual change analysis Inisght charts context menu
|
|
3972
|
+
*
|
|
3973
|
+
* @example
|
|
3974
|
+
* ```js
|
|
3975
|
+
* disabledActions: [Action.EnableIterativeChangeAnalysis]
|
|
3976
|
+
* ```
|
|
3977
|
+
* @version SDK: 1.41.0 | ThoughtSpot Cloud: 9.12.0.cl
|
|
3978
|
+
*/
|
|
3979
|
+
Action["EnableIterativeChangeAnalysis"] = "enableIterativeChangeAnalysis";
|
|
3925
3980
|
/**
|
|
3926
3981
|
* Action ID to hide or disable Natural Language Search query.
|
|
3927
3982
|
*
|
|
@@ -4291,6 +4346,39 @@ var Action;
|
|
|
4291
4346
|
* @version SDK: 1.39.0 | ThoughtSpot Cloud: 10.10.0.cl
|
|
4292
4347
|
*/
|
|
4293
4348
|
Action["InConversationTraining"] = "InConversationTraining";
|
|
4349
|
+
/**
|
|
4350
|
+
* Action ID to hide the warnings banner in
|
|
4351
|
+
* Spotter results. It's an EA feature and
|
|
4352
|
+
* handled by LD.
|
|
4353
|
+
* @example
|
|
4354
|
+
* ```js
|
|
4355
|
+
* hiddenAction: [Action.SpotterWarningsBanner]
|
|
4356
|
+
* ```
|
|
4357
|
+
* @version SDK: 1.41.0 | ThoughtSpot Cloud: 10.13.0.cl
|
|
4358
|
+
*/
|
|
4359
|
+
Action["SpotterWarningsBanner"] = "SpotterWarningsBanner";
|
|
4360
|
+
/**
|
|
4361
|
+
* Action ID to hide the warnings border on the knowledge
|
|
4362
|
+
* card in Spotter results. It's an EA feature and
|
|
4363
|
+
* handled by LD.
|
|
4364
|
+
* @example
|
|
4365
|
+
* ```js
|
|
4366
|
+
* hiddenAction: [Action.SpotterWarningsOnTokens]
|
|
4367
|
+
* ```
|
|
4368
|
+
* @version SDK: 1.41.0 | ThoughtSpot Cloud: 10.13.0.cl
|
|
4369
|
+
*/
|
|
4370
|
+
Action["SpotterWarningsOnTokens"] = "SpotterWarningsOnTokens";
|
|
4371
|
+
/**
|
|
4372
|
+
* Action ID to disable the click event handler on knowledge
|
|
4373
|
+
* card in Spotter results. It's an EA feature and
|
|
4374
|
+
* handled by LD.
|
|
4375
|
+
* @example
|
|
4376
|
+
* ```js
|
|
4377
|
+
* hiddenAction: [Action.SpotterTokenQuickEdit]
|
|
4378
|
+
* ```
|
|
4379
|
+
* @version SDK: 1.41.0 | ThoughtSpot Cloud: 10.13.0.cl
|
|
4380
|
+
*/
|
|
4381
|
+
Action["SpotterTokenQuickEdit"] = "SpotterTokenQuickEdit";
|
|
4294
4382
|
})(Action || (Action = {}));
|
|
4295
4383
|
var PrefetchFeatures;
|
|
4296
4384
|
(function (PrefetchFeatures) {
|
|
@@ -8036,7 +8124,7 @@ class AnswerService {
|
|
|
8036
8124
|
async getTML() {
|
|
8037
8125
|
const { object } = await this.executeQuery(getAnswerTML, {});
|
|
8038
8126
|
const edoc = object[0].edoc;
|
|
8039
|
-
const YAML = await import('./index-
|
|
8127
|
+
const YAML = await import('./index-P5YjBOuJ.js');
|
|
8040
8128
|
const parsedDoc = YAML.parse(edoc);
|
|
8041
8129
|
return {
|
|
8042
8130
|
answer: {
|
|
@@ -15770,7 +15858,7 @@ function processEventData(type, e, thoughtSpotHost, containerEl) {
|
|
|
15770
15858
|
return e;
|
|
15771
15859
|
}
|
|
15772
15860
|
|
|
15773
|
-
var name="@thoughtspot/visual-embed-sdk";var version$1="1.40.1
|
|
15861
|
+
var name="@thoughtspot/visual-embed-sdk";var version$1="1.40.1";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 | npx coveralls-next","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":"^11.2.0","@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",ajv:"^8.17.1",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1","coveralls-next":"^5.0.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":"^2.0.0",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:"32 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};
|
|
15774
15862
|
|
|
15775
15863
|
/**
|
|
15776
15864
|
* Reloads the ThoughtSpot iframe.
|
|
@@ -15996,7 +16084,6 @@ class TsEmbed {
|
|
|
15996
16084
|
*/
|
|
15997
16085
|
this.fullscreenChangeHandler = null;
|
|
15998
16086
|
this.subscribedListeners = {};
|
|
15999
|
-
this.isEmbedContainerLoaded = false;
|
|
16000
16087
|
/**
|
|
16001
16088
|
* Send Custom style as part of payload of APP_INIT
|
|
16002
16089
|
* @param _
|
|
@@ -16068,20 +16155,49 @@ class TsEmbed {
|
|
|
16068
16155
|
});
|
|
16069
16156
|
notifyAuthFailure(AuthFailureType.IDLE_SESSION_TIMEOUT);
|
|
16070
16157
|
};
|
|
16071
|
-
this.pendingEvents = [];
|
|
16072
16158
|
/**
|
|
16073
16159
|
* Register APP_INIT event and sendback init payload
|
|
16074
16160
|
*/
|
|
16075
16161
|
this.registerAppInit = () => {
|
|
16076
16162
|
this.on(EmbedEvent.APP_INIT, this.appInitCb, { start: false }, true);
|
|
16077
|
-
this.on(EmbedEvent.AuthInit, () => {
|
|
16078
|
-
this.isEmbedContainerLoaded = true;
|
|
16079
|
-
this.executePendingEvents();
|
|
16080
|
-
}, { start: false }, true);
|
|
16081
16163
|
this.on(EmbedEvent.AuthExpire, this.updateAuthToken, { start: false }, true);
|
|
16082
16164
|
this.on(EmbedEvent.IdleSessionTimeout, this.idleSessionTimeout, { start: false }, true);
|
|
16165
|
+
const embedListenerReadyHandler = this.createEmbedContainerHandler(EmbedEvent.EmbedListenerReady);
|
|
16166
|
+
this.on(EmbedEvent.EmbedListenerReady, embedListenerReadyHandler, { start: false }, true);
|
|
16167
|
+
const authInitHandler = this.createEmbedContainerHandler(EmbedEvent.AuthInit);
|
|
16168
|
+
this.on(EmbedEvent.AuthInit, authInitHandler, { start: false }, true);
|
|
16083
16169
|
};
|
|
16084
16170
|
this.showPreRenderByDefault = false;
|
|
16171
|
+
/**
|
|
16172
|
+
* @hidden
|
|
16173
|
+
* Internal state to track if the embed container is loaded.
|
|
16174
|
+
* This is used to trigger events after the embed container is loaded.
|
|
16175
|
+
*/
|
|
16176
|
+
this.isEmbedContainerLoaded = false;
|
|
16177
|
+
/**
|
|
16178
|
+
* @hidden
|
|
16179
|
+
* Internal state to track the callbacks to be executed after the embed container
|
|
16180
|
+
* is loaded.
|
|
16181
|
+
* This is used to trigger events after the embed container is loaded.
|
|
16182
|
+
*/
|
|
16183
|
+
this.embedContainerReadyCallbacks = [];
|
|
16184
|
+
this.createEmbedContainerHandler = (source) => () => {
|
|
16185
|
+
const processEmbedContainerReady = () => {
|
|
16186
|
+
logger$3.debug('processEmbedContainerReady');
|
|
16187
|
+
this.isEmbedContainerLoaded = true;
|
|
16188
|
+
this.executeEmbedContainerReadyCallbacks();
|
|
16189
|
+
};
|
|
16190
|
+
if (source === EmbedEvent.AuthInit) {
|
|
16191
|
+
const AUTH_INIT_FALLBACK_DELAY = 1000;
|
|
16192
|
+
// Wait for 1 second to ensure the embed container is loaded
|
|
16193
|
+
// This is a workaround to ensure the embed container is loaded
|
|
16194
|
+
// this is needed until all clusters have EmbedListenerReady event
|
|
16195
|
+
setTimeout(processEmbedContainerReady, AUTH_INIT_FALLBACK_DELAY);
|
|
16196
|
+
}
|
|
16197
|
+
else if (source === EmbedEvent.EmbedListenerReady) {
|
|
16198
|
+
processEmbedContainerReady();
|
|
16199
|
+
}
|
|
16200
|
+
};
|
|
16085
16201
|
this.validatePreRenderViewConfig = (viewConfig) => {
|
|
16086
16202
|
var _a;
|
|
16087
16203
|
const preRenderAllowedKeys = ['preRenderId', 'vizId', 'liveboardId'];
|
|
@@ -16103,7 +16219,6 @@ class TsEmbed {
|
|
|
16103
16219
|
});
|
|
16104
16220
|
}
|
|
16105
16221
|
};
|
|
16106
|
-
this.id = Date.now().toString();
|
|
16107
16222
|
this.el = getDOMNode(domSelector);
|
|
16108
16223
|
this.eventHandlerMap = new Map();
|
|
16109
16224
|
this.isError = false;
|
|
@@ -16117,9 +16232,9 @@ class TsEmbed {
|
|
|
16117
16232
|
...viewConfig,
|
|
16118
16233
|
});
|
|
16119
16234
|
this.hostEventClient = new HostEventClient(this.iFrame);
|
|
16120
|
-
const embedConfig = getEmbedConfig();
|
|
16121
|
-
this.embedConfig = embedConfig;
|
|
16122
16235
|
this.isReadyForRenderPromise = getInitPromise().then(async () => {
|
|
16236
|
+
const embedConfig = getEmbedConfig();
|
|
16237
|
+
this.embedConfig = embedConfig;
|
|
16123
16238
|
if (!embedConfig.authTriggerContainer && !embedConfig.useEventForSAMLPopup) {
|
|
16124
16239
|
this.embedConfig.authTriggerContainer = domSelector;
|
|
16125
16240
|
}
|
|
@@ -16290,43 +16405,6 @@ class TsEmbed {
|
|
|
16290
16405
|
async getAppInitData() {
|
|
16291
16406
|
return this.getDefaultAppInitData();
|
|
16292
16407
|
}
|
|
16293
|
-
getPreRenderObj() {
|
|
16294
|
-
var _a;
|
|
16295
|
-
const embedObj = (_a = this.insertedDomEl) === null || _a === void 0 ? void 0 : _a[this.embedNodeKey];
|
|
16296
|
-
if (embedObj === this) {
|
|
16297
|
-
logger$3.info('embedObj is same as this');
|
|
16298
|
-
}
|
|
16299
|
-
return embedObj;
|
|
16300
|
-
}
|
|
16301
|
-
checkEmbedContainerLoaded() {
|
|
16302
|
-
if (this.isEmbedContainerLoaded)
|
|
16303
|
-
return true;
|
|
16304
|
-
const preRenderObj = this.getPreRenderObj();
|
|
16305
|
-
if (preRenderObj && preRenderObj.isEmbedContainerLoaded) {
|
|
16306
|
-
this.isEmbedContainerLoaded = true;
|
|
16307
|
-
}
|
|
16308
|
-
return this.isEmbedContainerLoaded;
|
|
16309
|
-
}
|
|
16310
|
-
executePendingEvents() {
|
|
16311
|
-
logger$3.debug('executePendingEvents', this.pendingEvents);
|
|
16312
|
-
setTimeout(() => {
|
|
16313
|
-
this.pendingEvents.forEach((event) => {
|
|
16314
|
-
var _a;
|
|
16315
|
-
this.trigger(event.eventType, event.data);
|
|
16316
|
-
(_a = event.onEventTriggered) === null || _a === void 0 ? void 0 : _a.call(event);
|
|
16317
|
-
});
|
|
16318
|
-
this.pendingEvents = [];
|
|
16319
|
-
}, 1000);
|
|
16320
|
-
}
|
|
16321
|
-
triggerAfterLoad(eventType, data, onEventTriggered) {
|
|
16322
|
-
if (this.checkEmbedContainerLoaded()) {
|
|
16323
|
-
this.trigger(eventType, data);
|
|
16324
|
-
onEventTriggered === null || onEventTriggered === void 0 ? void 0 : onEventTriggered();
|
|
16325
|
-
}
|
|
16326
|
-
else {
|
|
16327
|
-
this.pendingEvents.push({ eventType, data, onEventTriggered });
|
|
16328
|
-
}
|
|
16329
|
-
}
|
|
16330
16408
|
/**
|
|
16331
16409
|
* Constructs the base URL string to load the ThoughtSpot app.
|
|
16332
16410
|
* @param query
|
|
@@ -16341,11 +16419,6 @@ class TsEmbed {
|
|
|
16341
16419
|
.join('/');
|
|
16342
16420
|
return `${basePath}#`;
|
|
16343
16421
|
}
|
|
16344
|
-
getUpdateEmbedParamsObject() {
|
|
16345
|
-
let queryParams = this.getEmbedParamsObject();
|
|
16346
|
-
queryParams = { ...this.viewConfig, ...queryParams };
|
|
16347
|
-
return queryParams;
|
|
16348
|
-
}
|
|
16349
16422
|
/**
|
|
16350
16423
|
* Common query params set for all the embed modes.
|
|
16351
16424
|
* @param queryParams
|
|
@@ -16495,13 +16568,9 @@ class TsEmbed {
|
|
|
16495
16568
|
return path;
|
|
16496
16569
|
}
|
|
16497
16570
|
getEmbedParams() {
|
|
16498
|
-
const queryParams = this.
|
|
16571
|
+
const queryParams = this.getBaseQueryParams();
|
|
16499
16572
|
return getQueryParamString(queryParams);
|
|
16500
16573
|
}
|
|
16501
|
-
getEmbedParamsObject() {
|
|
16502
|
-
const params = this.getBaseQueryParams();
|
|
16503
|
-
return params;
|
|
16504
|
-
}
|
|
16505
16574
|
getRootIframeSrc() {
|
|
16506
16575
|
const query = this.getEmbedParams();
|
|
16507
16576
|
return this.getEmbedBasePath(query);
|
|
@@ -16881,6 +16950,43 @@ class TsEmbed {
|
|
|
16881
16950
|
logger$3.log('Event Port is not defined');
|
|
16882
16951
|
}
|
|
16883
16952
|
}
|
|
16953
|
+
getPreRenderObj() {
|
|
16954
|
+
var _a;
|
|
16955
|
+
const embedObj = (_a = this.insertedDomEl) === null || _a === void 0 ? void 0 : _a[this.embedNodeKey];
|
|
16956
|
+
if (embedObj === this) {
|
|
16957
|
+
logger$3.info('embedObj is same as this');
|
|
16958
|
+
}
|
|
16959
|
+
return embedObj;
|
|
16960
|
+
}
|
|
16961
|
+
checkEmbedContainerLoaded() {
|
|
16962
|
+
if (this.isEmbedContainerLoaded)
|
|
16963
|
+
return true;
|
|
16964
|
+
const preRenderObj = this.getPreRenderObj();
|
|
16965
|
+
if (preRenderObj && preRenderObj.isEmbedContainerLoaded) {
|
|
16966
|
+
this.isEmbedContainerLoaded = true;
|
|
16967
|
+
}
|
|
16968
|
+
return this.isEmbedContainerLoaded;
|
|
16969
|
+
}
|
|
16970
|
+
executeEmbedContainerReadyCallbacks() {
|
|
16971
|
+
logger$3.debug('executePendingEvents', this.embedContainerReadyCallbacks);
|
|
16972
|
+
this.embedContainerReadyCallbacks.forEach((callback) => {
|
|
16973
|
+
callback === null || callback === void 0 ? void 0 : callback();
|
|
16974
|
+
});
|
|
16975
|
+
this.embedContainerReadyCallbacks = [];
|
|
16976
|
+
}
|
|
16977
|
+
/**
|
|
16978
|
+
* Executes a callback after the embed container is loaded.
|
|
16979
|
+
* @param callback The callback to execute
|
|
16980
|
+
*/
|
|
16981
|
+
executeAfterEmbedContainerLoaded(callback) {
|
|
16982
|
+
if (this.checkEmbedContainerLoaded()) {
|
|
16983
|
+
callback === null || callback === void 0 ? void 0 : callback();
|
|
16984
|
+
}
|
|
16985
|
+
else {
|
|
16986
|
+
logger$3.debug('pushing callback to embedContainerReadyCallbacks', callback);
|
|
16987
|
+
this.embedContainerReadyCallbacks.push(callback);
|
|
16988
|
+
}
|
|
16989
|
+
}
|
|
16884
16990
|
/**
|
|
16885
16991
|
* Triggers an event to the embedded app
|
|
16886
16992
|
* @param {HostEvent} messageType The event type
|
|
@@ -17025,10 +17131,7 @@ class TsEmbed {
|
|
|
17025
17131
|
return this.preRender(true);
|
|
17026
17132
|
}
|
|
17027
17133
|
this.validatePreRenderViewConfig(this.viewConfig);
|
|
17028
|
-
logger$3.debug('triggering UpdateEmbedParams', this.viewConfig);
|
|
17029
|
-
this.triggerAfterLoad(HostEvent.UpdateEmbedParams, this.getUpdateEmbedParamsObject());
|
|
17030
17134
|
}
|
|
17031
|
-
this.beforePrerenderVisible();
|
|
17032
17135
|
if (this.el) {
|
|
17033
17136
|
this.syncPreRenderStyle();
|
|
17034
17137
|
if (!this.viewConfig.doNotTrackPreRenderSize) {
|
|
@@ -17045,6 +17148,7 @@ class TsEmbed {
|
|
|
17045
17148
|
this.resizeObserver.observe(this.el);
|
|
17046
17149
|
}
|
|
17047
17150
|
}
|
|
17151
|
+
this.beforePrerenderVisible();
|
|
17048
17152
|
removeStyleProperties(this.preRenderWrapper, ['z-index', 'opacity', 'pointer-events']);
|
|
17049
17153
|
this.subscribeToEvents();
|
|
17050
17154
|
// Setup fullscreen change handler for prerendered components
|
|
@@ -17233,9 +17337,15 @@ let SearchBarEmbed$1 = class SearchBarEmbed extends TsEmbed {
|
|
|
17233
17337
|
this.embedComponentType = 'SearchBarEmbed';
|
|
17234
17338
|
this.viewConfig = viewConfig;
|
|
17235
17339
|
}
|
|
17236
|
-
|
|
17340
|
+
/**
|
|
17341
|
+
* Construct the URL of the embedded ThoughtSpot search to be
|
|
17342
|
+
* loaded in the iframe
|
|
17343
|
+
* @param dataSources A list of data source GUIDs
|
|
17344
|
+
*/
|
|
17345
|
+
getIFrameSrc() {
|
|
17237
17346
|
var _a;
|
|
17238
17347
|
const { searchOptions, dataSource, dataSources, useLastSelectedSources = false, excludeSearchTokenStringFromURL, } = this.viewConfig;
|
|
17348
|
+
const path = 'search-bar-embed';
|
|
17239
17349
|
const queryParams = this.getBaseQueryParams();
|
|
17240
17350
|
queryParams[Param.HideActions] = [...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : [])];
|
|
17241
17351
|
if (dataSources && dataSources.length) {
|
|
@@ -17257,16 +17367,6 @@ let SearchBarEmbed$1 = class SearchBarEmbed extends TsEmbed {
|
|
|
17257
17367
|
queryParams[Param.UseLastSelectedDataSource] = false;
|
|
17258
17368
|
}
|
|
17259
17369
|
queryParams[Param.searchEmbed] = true;
|
|
17260
|
-
return queryParams;
|
|
17261
|
-
}
|
|
17262
|
-
/**
|
|
17263
|
-
* Construct the URL of the embedded ThoughtSpot search to be
|
|
17264
|
-
* loaded in the iframe
|
|
17265
|
-
* @param dataSources A list of data source GUIDs
|
|
17266
|
-
*/
|
|
17267
|
-
getIFrameSrc() {
|
|
17268
|
-
const queryParams = this.getEmbedParamsObject();
|
|
17269
|
-
const path = 'search-bar-embed';
|
|
17270
17370
|
let query = '';
|
|
17271
17371
|
const queryParamsString = getQueryParamString(queryParams, true);
|
|
17272
17372
|
if (queryParamsString) {
|
|
@@ -17317,7 +17417,12 @@ let SageEmbed$1 = class SageEmbed extends V1Embed {
|
|
|
17317
17417
|
viewConfig.embedComponentType = 'SageEmbed';
|
|
17318
17418
|
super(domSelector, viewConfig);
|
|
17319
17419
|
}
|
|
17320
|
-
|
|
17420
|
+
/**
|
|
17421
|
+
* Constructs a map of parameters to be passed on to the
|
|
17422
|
+
* embedded Eureka or Sage search page.
|
|
17423
|
+
* @returns {string} query string
|
|
17424
|
+
*/
|
|
17425
|
+
getEmbedParams() {
|
|
17321
17426
|
const { disableWorksheetChange, hideWorksheetSelector, showObjectSuggestions, dataPanelV2, hideSampleQuestions, isProductTour, hideSageAnswerHeader, hideAutocompleteSuggestions, } = this.viewConfig;
|
|
17322
17427
|
const params = this.getBaseQueryParams();
|
|
17323
17428
|
params[Param.DataPanelV2Enabled] = !!dataPanelV2;
|
|
@@ -17332,15 +17437,6 @@ let SageEmbed$1 = class SageEmbed extends V1Embed {
|
|
|
17332
17437
|
params[Param.HideSampleQuestions] = !!hideSampleQuestions;
|
|
17333
17438
|
params[Param.IsProductTour] = !!isProductTour;
|
|
17334
17439
|
params[Param.HideSageAnswerHeader] = !!hideSageAnswerHeader;
|
|
17335
|
-
return params;
|
|
17336
|
-
}
|
|
17337
|
-
/**
|
|
17338
|
-
* Constructs a map of parameters to be passed on to the
|
|
17339
|
-
* embedded Eureka or Sage search page.
|
|
17340
|
-
* @returns {string} query string
|
|
17341
|
-
*/
|
|
17342
|
-
getEmbedParams() {
|
|
17343
|
-
const params = this.getEmbedParamsObject();
|
|
17344
17440
|
return getQueryParamString(params, true);
|
|
17345
17441
|
}
|
|
17346
17442
|
/**
|
|
@@ -17450,9 +17546,11 @@ let SearchEmbed$1 = class SearchEmbed extends TsEmbed {
|
|
|
17450
17546
|
const defaultAppInitData = await super.getAppInitData();
|
|
17451
17547
|
return { ...defaultAppInitData, ...this.getSearchInitData() };
|
|
17452
17548
|
}
|
|
17453
|
-
|
|
17549
|
+
getEmbedParams() {
|
|
17454
17550
|
var _a;
|
|
17455
|
-
const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, hideSearchBar, dataPanelV2 = false, useLastSelectedSources = false, runtimeParameters, collapseSearchBarInitially = false, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false,
|
|
17551
|
+
const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, hideSearchBar, dataPanelV2 = false, useLastSelectedSources = false, runtimeParameters, collapseSearchBarInitially = false, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false,
|
|
17552
|
+
/* eslint-disable-next-line max-len */
|
|
17553
|
+
dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL, focusSearchBarOnRender = true, excludeRuntimeParametersfromURL, excludeSearchTokenStringFromURL, collapseSearchBar = true, } = this.viewConfig;
|
|
17456
17554
|
const queryParams = this.getBaseQueryParams();
|
|
17457
17555
|
queryParams[Param.HideActions] = [
|
|
17458
17556
|
...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : []),
|
|
@@ -17485,6 +17583,7 @@ let SearchEmbed$1 = class SearchEmbed extends TsEmbed {
|
|
|
17485
17583
|
queryParams[Param.HideSearchBar] = true;
|
|
17486
17584
|
}
|
|
17487
17585
|
if (isOnBeforeGetVizDataInterceptEnabled) {
|
|
17586
|
+
/* eslint-disable-next-line max-len */
|
|
17488
17587
|
queryParams[Param.IsOnBeforeGetVizDataInterceptEnabled] = isOnBeforeGetVizDataInterceptEnabled;
|
|
17489
17588
|
}
|
|
17490
17589
|
if (!focusSearchBarOnRender) {
|
|
@@ -17497,22 +17596,20 @@ let SearchEmbed$1 = class SearchEmbed extends TsEmbed {
|
|
|
17497
17596
|
queryParams[Param.UseLastSelectedDataSource] = false;
|
|
17498
17597
|
}
|
|
17499
17598
|
queryParams[Param.searchEmbed] = true;
|
|
17599
|
+
/* eslint-disable-next-line max-len */
|
|
17500
17600
|
queryParams[Param.CollapseSearchBarInitially] = collapseSearchBarInitially || collapseSearchBar;
|
|
17501
17601
|
queryParams[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
|
|
17502
17602
|
if (dataPanelCustomGroupsAccordionInitialState
|
|
17503
17603
|
=== DataPanelCustomColumnGroupsAccordionState$1.COLLAPSE_ALL
|
|
17504
17604
|
|| dataPanelCustomGroupsAccordionInitialState
|
|
17505
17605
|
=== DataPanelCustomColumnGroupsAccordionState$1.EXPAND_FIRST) {
|
|
17606
|
+
/* eslint-disable-next-line max-len */
|
|
17506
17607
|
queryParams[Param.DataPanelCustomGroupsAccordionInitialState] = dataPanelCustomGroupsAccordionInitialState;
|
|
17507
17608
|
}
|
|
17508
17609
|
else {
|
|
17610
|
+
/* eslint-disable-next-line max-len */
|
|
17509
17611
|
queryParams[Param.DataPanelCustomGroupsAccordionInitialState] = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL;
|
|
17510
17612
|
}
|
|
17511
|
-
return queryParams;
|
|
17512
|
-
}
|
|
17513
|
-
getEmbedParams() {
|
|
17514
|
-
const { runtimeParameters, runtimeFilters, excludeRuntimeParametersfromURL, excludeRuntimeFiltersfromURL, } = this.viewConfig;
|
|
17515
|
-
const queryParams = this.getEmbedParamsObject();
|
|
17516
17613
|
let query = '';
|
|
17517
17614
|
const queryParamsString = getQueryParamString(queryParams, true);
|
|
17518
17615
|
if (queryParamsString) {
|
|
@@ -17653,6 +17750,11 @@ var HomePage;
|
|
|
17653
17750
|
* It serves as the foundational version of the home page.
|
|
17654
17751
|
*/
|
|
17655
17752
|
HomePage["Modular"] = "v2";
|
|
17753
|
+
/**
|
|
17754
|
+
* ModularWithStylingChanges (v3) introduces Modular Home Experience
|
|
17755
|
+
* with styling changes.
|
|
17756
|
+
*/
|
|
17757
|
+
HomePage["ModularWithStylingChanges"] = "v3";
|
|
17656
17758
|
})(HomePage || (HomePage = {}));
|
|
17657
17759
|
/**
|
|
17658
17760
|
* Define the version of the list page
|
|
@@ -17818,16 +17920,33 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
|
|
|
17818
17920
|
else {
|
|
17819
17921
|
params[Param.DataPanelCustomGroupsAccordionInitialState] = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL;
|
|
17820
17922
|
}
|
|
17923
|
+
// Set navigation to v2 by default to avoid problems like the app
|
|
17924
|
+
// switcher (9-dot menu) not showing when v3 navigation is turned on
|
|
17925
|
+
// at the cluster level.
|
|
17926
|
+
// To use v3 navigation, we must manually set the discoveryExperience
|
|
17927
|
+
// settings.
|
|
17928
|
+
params[Param.NavigationVersion] = 'v2';
|
|
17929
|
+
// Set homePageVersion to v2 by default to reset the LD flag value
|
|
17930
|
+
// for the homepageVersion.
|
|
17931
|
+
params[Param.HomepageVersion] = 'v2';
|
|
17821
17932
|
if (discoveryExperience) {
|
|
17822
17933
|
// primaryNavbarVersion v3 will enabled the new left navigation
|
|
17823
17934
|
if (discoveryExperience.primaryNavbarVersion === PrimaryNavbarVersion.Sliding) {
|
|
17824
17935
|
params[Param.NavigationVersion] = discoveryExperience.primaryNavbarVersion;
|
|
17936
|
+
// Enable the modularHomeExperience when Sliding is enabled.
|
|
17937
|
+
params[Param.ModularHomeExperienceEnabled] = true;
|
|
17825
17938
|
}
|
|
17826
17939
|
// homePage v2 will enable the modular home page
|
|
17827
17940
|
// and it will override the modularHomeExperience value
|
|
17828
17941
|
if (discoveryExperience.homePage === HomePage.Modular) {
|
|
17829
17942
|
params[Param.ModularHomeExperienceEnabled] = true;
|
|
17830
17943
|
}
|
|
17944
|
+
// ModularWithStylingChanges (v3) introduces the styling changes
|
|
17945
|
+
// to the Modular Homepage.
|
|
17946
|
+
// v3 will be the base version of homePageVersion.
|
|
17947
|
+
if (discoveryExperience.homePage === HomePage.ModularWithStylingChanges) {
|
|
17948
|
+
params[Param.HomepageVersion] = HomePage.ModularWithStylingChanges;
|
|
17949
|
+
}
|
|
17831
17950
|
// listPageVersion v3 will enable the new list page
|
|
17832
17951
|
if (discoveryExperience.listPageVersion === ListPage.ListWithUXChanges) {
|
|
17833
17952
|
params[Param.ListPageVersion] = discoveryExperience.listPageVersion;
|
|
@@ -18105,7 +18224,16 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
|
|
|
18105
18224
|
}
|
|
18106
18225
|
this.setIFrameHeight(frameHeight || this.defaultHeight);
|
|
18107
18226
|
};
|
|
18108
|
-
|
|
18227
|
+
/**
|
|
18228
|
+
* @hidden
|
|
18229
|
+
* Internal state to track the current liveboard id.
|
|
18230
|
+
* This is used to navigate to the correct liveboard when the prerender is visible.
|
|
18231
|
+
*/
|
|
18232
|
+
this.currentLiveboardState = {
|
|
18233
|
+
liveboardId: this.viewConfig.liveboardId,
|
|
18234
|
+
vizId: this.viewConfig.vizId,
|
|
18235
|
+
activeTabId: this.viewConfig.activeTabId,
|
|
18236
|
+
};
|
|
18109
18237
|
if (this.viewConfig.fullHeight === true) {
|
|
18110
18238
|
if (this.viewConfig.vizId) {
|
|
18111
18239
|
logger$3.warn('Full height is currently only supported for Liveboard embeds.' +
|
|
@@ -18122,11 +18250,6 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
|
|
|
18122
18250
|
* embedded Liveboard or visualization.
|
|
18123
18251
|
*/
|
|
18124
18252
|
getEmbedParams() {
|
|
18125
|
-
const params = this.getEmbedParamsObject();
|
|
18126
|
-
const queryParams = getQueryParamString(params, true);
|
|
18127
|
-
return queryParams;
|
|
18128
|
-
}
|
|
18129
|
-
getEmbedParamsObject() {
|
|
18130
18253
|
let params = {};
|
|
18131
18254
|
params = this.getBaseQueryParams(params);
|
|
18132
18255
|
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;
|
|
@@ -18196,27 +18319,8 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
|
|
|
18196
18319
|
params[Param.DataPanelV2Enabled] = dataPanelV2;
|
|
18197
18320
|
params[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
|
|
18198
18321
|
params[Param.CoverAndFilterOptionInPDF] = coverAndFilterOptionInPDF;
|
|
18199
|
-
|
|
18200
|
-
|
|
18201
|
-
}
|
|
18202
|
-
if (isForceRedirect) {
|
|
18203
|
-
params[Param.IsForceRedirect] = isForceRedirect;
|
|
18204
|
-
}
|
|
18205
|
-
if (dataSourceId !== undefined) {
|
|
18206
|
-
params[Param.DataSourceId] = dataSourceId;
|
|
18207
|
-
}
|
|
18208
|
-
if (isLiveboardStylingAndGroupingEnabled !== undefined) {
|
|
18209
|
-
params[Param.IsLiveboardStylingAndGroupingEnabled] = isLiveboardStylingAndGroupingEnabled;
|
|
18210
|
-
}
|
|
18211
|
-
params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
|
|
18212
|
-
params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
|
|
18213
|
-
params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;
|
|
18214
|
-
params[Param.ShowLiveboardReverifyBanner] = showLiveboardReverifyBanner;
|
|
18215
|
-
params[Param.HideIrrelevantFiltersInTab] = hideIrrelevantChipsInLiveboardTabs;
|
|
18216
|
-
params[Param.DataPanelV2Enabled] = dataPanelV2;
|
|
18217
|
-
params[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
|
|
18218
|
-
params[Param.CoverAndFilterOptionInPDF] = coverAndFilterOptionInPDF;
|
|
18219
|
-
return params;
|
|
18322
|
+
const queryParams = getQueryParamString(params, true);
|
|
18323
|
+
return queryParams;
|
|
18220
18324
|
}
|
|
18221
18325
|
getIframeSuffixSrc(liveboardId, vizId, activeTabId) {
|
|
18222
18326
|
let suffix = `/embed/viz/${liveboardId}`;
|
|
@@ -18279,10 +18383,15 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
|
|
|
18279
18383
|
}
|
|
18280
18384
|
beforePrerenderVisible() {
|
|
18281
18385
|
const embedObj = this.getPreRenderObj();
|
|
18282
|
-
|
|
18283
|
-
|
|
18284
|
-
if (embedObj)
|
|
18285
|
-
embedObj.
|
|
18386
|
+
this.executeAfterEmbedContainerLoaded(() => {
|
|
18387
|
+
this.navigateToLiveboard(this.viewConfig.liveboardId, this.viewConfig.vizId, this.viewConfig.activeTabId);
|
|
18388
|
+
if (embedObj) {
|
|
18389
|
+
embedObj.currentLiveboardState = {
|
|
18390
|
+
liveboardId: this.viewConfig.liveboardId,
|
|
18391
|
+
vizId: this.viewConfig.vizId,
|
|
18392
|
+
activeTabId: this.viewConfig.activeTabId,
|
|
18393
|
+
};
|
|
18394
|
+
}
|
|
18286
18395
|
});
|
|
18287
18396
|
}
|
|
18288
18397
|
async handleRenderForPrerender() {
|
|
@@ -18345,13 +18454,13 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
|
|
|
18345
18454
|
this.postRender();
|
|
18346
18455
|
return this;
|
|
18347
18456
|
}
|
|
18348
|
-
navigateToLiveboard(liveboardId, vizId, activeTabId
|
|
18457
|
+
navigateToLiveboard(liveboardId, vizId, activeTabId) {
|
|
18349
18458
|
const path = this.getIframeSuffixSrc(liveboardId, vizId, activeTabId);
|
|
18350
18459
|
this.viewConfig.liveboardId = liveboardId;
|
|
18351
18460
|
this.viewConfig.activeTabId = activeTabId;
|
|
18352
18461
|
this.viewConfig.vizId = vizId;
|
|
18353
18462
|
if (this.isRendered) {
|
|
18354
|
-
this.
|
|
18463
|
+
this.trigger(HostEvent.Navigate, path.substring(1));
|
|
18355
18464
|
}
|
|
18356
18465
|
else if (this.viewConfig.preRenderId) {
|
|
18357
18466
|
this.preRender(true);
|
|
@@ -18769,17 +18878,13 @@ let ConversationMessage$1 = class ConversationMessage extends TsEmbed {
|
|
|
18769
18878
|
super(container, viewConfig);
|
|
18770
18879
|
this.viewConfig = viewConfig;
|
|
18771
18880
|
}
|
|
18772
|
-
|
|
18881
|
+
getIframeSrc() {
|
|
18773
18882
|
var _a;
|
|
18883
|
+
const { sessionId, genNo, acSessionId, acGenNo, convId, messageId, } = this.viewConfig;
|
|
18884
|
+
const path = 'conv-assist-answer';
|
|
18774
18885
|
const queryParams = this.getBaseQueryParams();
|
|
18775
18886
|
queryParams[Param.HideActions] = [...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : [])];
|
|
18776
18887
|
queryParams[Param.isSpotterAgentEmbed] = true;
|
|
18777
|
-
return queryParams;
|
|
18778
|
-
}
|
|
18779
|
-
getIframeSrc() {
|
|
18780
|
-
const { sessionId, genNo, acSessionId, acGenNo, convId, messageId, } = this.viewConfig;
|
|
18781
|
-
const path = 'conv-assist-answer';
|
|
18782
|
-
const queryParams = this.getEmbedParamsObject();
|
|
18783
18888
|
let query = '';
|
|
18784
18889
|
const queryParamsString = getQueryParamString(queryParams, true);
|
|
18785
18890
|
if (queryParamsString) {
|
|
@@ -18935,8 +19040,9 @@ let SpotterEmbed$1 = class SpotterEmbed extends TsEmbed {
|
|
|
18935
19040
|
super(container, viewConfig);
|
|
18936
19041
|
this.viewConfig = viewConfig;
|
|
18937
19042
|
}
|
|
18938
|
-
|
|
18939
|
-
const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, } = this.viewConfig;
|
|
19043
|
+
getIframeSrc() {
|
|
19044
|
+
const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, } = this.viewConfig;
|
|
19045
|
+
const path = 'insights/conv-assist';
|
|
18940
19046
|
if (!worksheetId) {
|
|
18941
19047
|
this.handleError(ERROR_MESSAGE.SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND);
|
|
18942
19048
|
}
|
|
@@ -18957,17 +19063,19 @@ let SpotterEmbed$1 = class SpotterEmbed extends TsEmbed {
|
|
|
18957
19063
|
if (!isUndefined_1(hideSampleQuestions)) {
|
|
18958
19064
|
queryParams[Param.HideSampleQuestions] = !!hideSampleQuestions;
|
|
18959
19065
|
}
|
|
18960
|
-
return queryParams;
|
|
18961
|
-
}
|
|
18962
|
-
getIframeSrc() {
|
|
18963
|
-
const { worksheetId, searchOptions, } = this.viewConfig;
|
|
18964
|
-
const path = 'insights/conv-assist';
|
|
18965
|
-
const queryParams = this.getEmbedParamsObject();
|
|
18966
19066
|
let query = '';
|
|
18967
19067
|
const queryParamsString = getQueryParamString(queryParams, true);
|
|
18968
19068
|
if (queryParamsString) {
|
|
18969
19069
|
query = `?${queryParamsString}`;
|
|
18970
19070
|
}
|
|
19071
|
+
const filterQuery = getFilterQuery(runtimeFilters || []);
|
|
19072
|
+
if (filterQuery && !excludeRuntimeFiltersfromURL) {
|
|
19073
|
+
query += `&${filterQuery}`;
|
|
19074
|
+
}
|
|
19075
|
+
const parameterQuery = getRuntimeParameters(runtimeParameters || []);
|
|
19076
|
+
if (parameterQuery && !excludeRuntimeParametersfromURL) {
|
|
19077
|
+
query += `&${parameterQuery}`;
|
|
19078
|
+
}
|
|
18971
19079
|
const tsPostHashParams = this.getThoughtSpotPostUrlParams({
|
|
18972
19080
|
worksheet: worksheetId,
|
|
18973
19081
|
query: (searchOptions === null || searchOptions === void 0 ? void 0 : searchOptions.searchQuery) || '',
|