@thoughtspot/visual-embed-sdk 1.40.1-alpha.2 → 1.41.0-pre-render-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 +5 -4
- 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.map +1 -1
- package/cjs/src/embed/app.js +8 -0
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/app.spec.js +12 -2
- package/cjs/src/embed/app.spec.js.map +1 -1
- package/cjs/src/embed/bodyless-conversation.d.ts.map +1 -1
- package/cjs/src/embed/bodyless-conversation.js.map +1 -1
- package/cjs/src/embed/conversation.d.ts +63 -2
- package/cjs/src/embed/conversation.d.ts.map +1 -1
- package/cjs/src/embed/conversation.js +10 -2
- 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 -2
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +21 -7
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/liveboard.spec.js +185 -4
- package/cjs/src/embed/liveboard.spec.js.map +1 -1
- package/cjs/src/embed/sage.js.map +1 -1
- package/cjs/src/embed/ts-embed.d.ts +22 -7
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +75 -46
- 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 +152 -44
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +139 -42
- 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-BDlM0f0T.js +7371 -0
- 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.map +1 -1
- package/dist/src/embed/bodyless-conversation.d.ts.map +1 -1
- package/dist/src/embed/conversation.d.ts +63 -2
- package/dist/src/embed/conversation.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts +11 -2
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.d.ts +22 -7
- package/dist/src/embed/ts-embed.d.ts.map +1 -1
- package/dist/src/types.d.ts +152 -44
- 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 +256 -100
- package/dist/tsembed-react.js +255 -99
- package/dist/tsembed.es.js +277 -106
- package/dist/tsembed.js +276 -105
- package/dist/visual-embed-sdk-react-full.d.ts +575 -57
- package/dist/visual-embed-sdk-react.d.ts +575 -57
- package/dist/visual-embed-sdk.d.ts +575 -57
- package/lib/package.json +5 -4
- 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.map +1 -1
- package/lib/src/embed/app.js +8 -0
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/app.spec.js +12 -2
- package/lib/src/embed/app.spec.js.map +1 -1
- package/lib/src/embed/bodyless-conversation.d.ts.map +1 -1
- package/lib/src/embed/bodyless-conversation.js.map +1 -1
- package/lib/src/embed/conversation.d.ts +63 -2
- package/lib/src/embed/conversation.d.ts.map +1 -1
- package/lib/src/embed/conversation.js +11 -3
- 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 -2
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +21 -7
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +185 -4
- package/lib/src/embed/liveboard.spec.js.map +1 -1
- package/lib/src/embed/sage.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts +22 -7
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +75 -46
- 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 +152 -44
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +139 -42
- 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 +576 -58
- package/package.json +5 -4
- package/src/css-variables.ts +396 -1
- package/src/embed/app.spec.ts +17 -2
- package/src/embed/app.ts +8 -0
- package/src/embed/bodyless-conversation.ts +0 -1
- package/src/embed/conversation.spec.ts +131 -5
- package/src/embed/conversation.ts +89 -10
- package/src/embed/liveboard.spec.ts +236 -5
- package/src/embed/liveboard.ts +22 -7
- package/src/embed/sage.ts +1 -1
- package/src/embed/ts-embed.spec.ts +345 -113
- package/src/embed/ts-embed.ts +83 -56
- package/src/types.ts +199 -91
- package/src/utils/liveboardService/liveboardService.ts +21 -6
package/dist/tsembed-react.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @thoughtspot/visual-embed-sdk version 1.
|
|
1
|
+
/* @thoughtspot/visual-embed-sdk version 1.41.0-pre-render-1 */
|
|
2
2
|
'use client';
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) :
|
|
@@ -1245,7 +1245,7 @@
|
|
|
1245
1245
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
1246
1246
|
* @example
|
|
1247
1247
|
*```js
|
|
1248
|
-
* liveboardEmbed.on(EmbedEvent.
|
|
1248
|
+
* liveboardEmbed.on(EmbedEvent.LiveboardInfo, payload => {
|
|
1249
1249
|
* console.log('Liveboard details', payload);
|
|
1250
1250
|
* })
|
|
1251
1251
|
*```
|
|
@@ -1620,58 +1620,58 @@
|
|
|
1620
1620
|
*/
|
|
1621
1621
|
EmbedEvent["RequestVisibleEmbedCoordinates"] = "requestVisibleEmbedCoordinates";
|
|
1622
1622
|
/**
|
|
1623
|
-
* Emitted when
|
|
1623
|
+
* Emitted when Spotter response is text data
|
|
1624
1624
|
* @example
|
|
1625
1625
|
* ```js
|
|
1626
1626
|
* spotterEmbed.on(EmbedEvent.SpotterData, (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["SpotterData"] = "SpotterData";
|
|
1633
1633
|
/**
|
|
1634
|
-
* Emitted when user opens up the worksheet preview modal in
|
|
1634
|
+
* Emitted when user opens up the worksheet preview modal in Spotter embed.
|
|
1635
1635
|
* @example
|
|
1636
1636
|
* ```js
|
|
1637
1637
|
* spotterEmbed.on(EmbedEvent.PreviewSpotterData, (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["PreviewSpotterData"] = "PreviewSpotterData";
|
|
1644
1644
|
/**
|
|
1645
|
-
* Emitted when the
|
|
1645
|
+
* Emitted when the Spotter query is triggered in Spotter embed.
|
|
1646
1646
|
* @example
|
|
1647
1647
|
* ```js
|
|
1648
1648
|
* spotterEmbed.on(EmbedEvent.SpotterQueryTriggered, (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["SpotterQueryTriggered"] = "SpotterQueryTriggered";
|
|
1655
1655
|
/**
|
|
1656
|
-
* Emitted when the last
|
|
1656
|
+
* Emitted when the last Spotter query is edited in Spotter embed.
|
|
1657
1657
|
* @example
|
|
1658
1658
|
* ```js
|
|
1659
1659
|
* spotterEmbed.on(EmbedEvent.LastPromptEdited, (payload) => {
|
|
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["LastPromptEdited"] = "LastPromptEdited";
|
|
1666
1666
|
/**
|
|
1667
|
-
* Emitted when the last
|
|
1667
|
+
* Emitted when the last Spotter query is deleted in Spotter embed.
|
|
1668
1668
|
* @example
|
|
1669
1669
|
* ```js
|
|
1670
1670
|
* spotterEmbed.on(EmbedEvent.LastPromptDeleted, (payload) => {
|
|
1671
1671
|
* console.log('payload', payload);
|
|
1672
1672
|
* })
|
|
1673
1673
|
*```
|
|
1674
|
-
* @version SDK: 1.
|
|
1674
|
+
* @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
|
|
1675
1675
|
*/
|
|
1676
1676
|
EmbedEvent["LastPromptDeleted"] = "LastPromptDeleted";
|
|
1677
1677
|
/**
|
|
@@ -1682,7 +1682,7 @@
|
|
|
1682
1682
|
* console.log('payload', payload);
|
|
1683
1683
|
* })
|
|
1684
1684
|
*```
|
|
1685
|
-
* @version SDK: 1.
|
|
1685
|
+
* @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
|
|
1686
1686
|
*/
|
|
1687
1687
|
EmbedEvent["ResetSpotterConversation"] = "ResetSpotterConversation";
|
|
1688
1688
|
/**
|
|
@@ -1695,7 +1695,19 @@
|
|
|
1695
1695
|
*```
|
|
1696
1696
|
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
1697
1697
|
*/
|
|
1698
|
-
EmbedEvent["SpotterInit"] = "
|
|
1698
|
+
EmbedEvent["SpotterInit"] = "spotterInit";
|
|
1699
|
+
/**
|
|
1700
|
+
* @hidden
|
|
1701
|
+
* Triggers when the embed listener is ready to receive events.
|
|
1702
|
+
* This is used to trigger events after the embed container is loaded.
|
|
1703
|
+
* @example
|
|
1704
|
+
* ```js
|
|
1705
|
+
* liveboardEmbed.on(EmbedEvent.EmbedListenerReady, () => {
|
|
1706
|
+
* console.log('EmbedListenerReady');
|
|
1707
|
+
* })
|
|
1708
|
+
* ```
|
|
1709
|
+
*/
|
|
1710
|
+
EmbedEvent["EmbedListenerReady"] = "EmbedListenerReady";
|
|
1699
1711
|
})(exports.EmbedEvent || (exports.EmbedEvent = {}));
|
|
1700
1712
|
/**
|
|
1701
1713
|
* Event types that can be triggered by the host application
|
|
@@ -1785,6 +1797,7 @@
|
|
|
1785
1797
|
* done automatically on the most popular column.
|
|
1786
1798
|
* @param - vizId [TS >= 9.8.0] - Optional. The GUID of the visualization to drill
|
|
1787
1799
|
* in case of a Liveboard.
|
|
1800
|
+
* @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
|
|
1788
1801
|
* @example
|
|
1789
1802
|
* ```js
|
|
1790
1803
|
* searchEmbed.on(EmbedEvent.VizPointDoubleClick, (payload) => {
|
|
@@ -2104,12 +2117,21 @@
|
|
|
2104
2117
|
* Trigger the **Download PDF** action on an embedded Liveboard,
|
|
2105
2118
|
* visualization or Answer.
|
|
2106
2119
|
*
|
|
2120
|
+
* @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
|
|
2121
|
+
*
|
|
2107
2122
|
* **NOTE**: The **Download** > **PDF** action is available on
|
|
2108
2123
|
* visualizations and Answers if the data is in tabular format.
|
|
2109
2124
|
* @example
|
|
2110
2125
|
* ```js
|
|
2111
2126
|
* liveboardEmbed.trigger(HostEvent.DownloadAsPdf)
|
|
2112
2127
|
* ```
|
|
2128
|
+
* @example
|
|
2129
|
+
* ```js
|
|
2130
|
+
* spotterEmbed.trigger(HostEvent.DownloadAsPdf, {
|
|
2131
|
+
* vizId:'730496d6-6903-4601-937e-2c691821af3c'
|
|
2132
|
+
* });
|
|
2133
|
+
* ```
|
|
2134
|
+
*
|
|
2113
2135
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2114
2136
|
*/
|
|
2115
2137
|
HostEvent["DownloadAsPdf"] = "downloadAsPdf";
|
|
@@ -2211,7 +2233,8 @@
|
|
|
2211
2233
|
* This event is not supported in visualization embed and search embed.
|
|
2212
2234
|
* @param - object - To trigger the action for a specific visualization
|
|
2213
2235
|
* in Liveboard embed, pass in `vizId` as a key.
|
|
2214
|
-
*
|
|
2236
|
+
* @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
|
|
2237
|
+
*
|
|
2215
2238
|
* @example
|
|
2216
2239
|
* ```js
|
|
2217
2240
|
* liveboardEmbed.trigger(HostEvent.Edit)
|
|
@@ -2226,6 +2249,12 @@
|
|
|
2226
2249
|
* vizId:'730496d6-6903-4601-937e-2c691821af3c'
|
|
2227
2250
|
* });
|
|
2228
2251
|
* ```
|
|
2252
|
+
* @example
|
|
2253
|
+
* ```js
|
|
2254
|
+
* const editResponse = await spotterEmbed.trigger(HostEvent.Edit, {
|
|
2255
|
+
* vizId:'730496d6-6903-4601-937e-2c691821af3c'
|
|
2256
|
+
* });
|
|
2257
|
+
* ```
|
|
2229
2258
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2230
2259
|
*/
|
|
2231
2260
|
HostEvent["Edit"] = "edit";
|
|
@@ -2346,6 +2375,7 @@
|
|
|
2346
2375
|
/**
|
|
2347
2376
|
* Trigger the **Download** action on charts in
|
|
2348
2377
|
* the embedded view.
|
|
2378
|
+
* @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
|
|
2349
2379
|
* @example
|
|
2350
2380
|
* ```js
|
|
2351
2381
|
* liveboardEmbed.trigger(HostEvent.Download, {vizId:
|
|
@@ -2354,6 +2384,11 @@
|
|
|
2354
2384
|
* ```js
|
|
2355
2385
|
* embed.trigger(HostEvent.Download)
|
|
2356
2386
|
* ```
|
|
2387
|
+
* ```js
|
|
2388
|
+
* spotterEmbed.trigger(HostEvent.Download, {
|
|
2389
|
+
* vizId:'730496d6-6903-4601-937e-2c691821af3c'
|
|
2390
|
+
* });
|
|
2391
|
+
* ```
|
|
2357
2392
|
* @deprecated from SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl ,9.4.1.sw
|
|
2358
2393
|
* Use {@link DownloadAsPng}
|
|
2359
2394
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
@@ -2382,6 +2417,7 @@
|
|
|
2382
2417
|
/**
|
|
2383
2418
|
* Trigger the **Download** > **CSV** action on tables in
|
|
2384
2419
|
* the embedded view.
|
|
2420
|
+
* @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
|
|
2385
2421
|
* @example
|
|
2386
2422
|
* ```js
|
|
2387
2423
|
* liveboardEmbed.trigger(HostEvent.DownloadAsCsv, {vizId:
|
|
@@ -2404,6 +2440,7 @@
|
|
|
2404
2440
|
/**
|
|
2405
2441
|
* Trigger the **Download** > **XLSX** action on tables
|
|
2406
2442
|
* in the embedded view.
|
|
2443
|
+
* @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
|
|
2407
2444
|
* @example
|
|
2408
2445
|
* ```js
|
|
2409
2446
|
* liveboardEmbed.trigger(HostEvent.DownloadAsXlsx, {vizId:
|
|
@@ -2439,7 +2476,7 @@
|
|
|
2439
2476
|
/**
|
|
2440
2477
|
* Trigger the **Save** action on a Liveboard or Answer.
|
|
2441
2478
|
* Saves the changes.
|
|
2442
|
-
* @param - `vizId` is required in Spotter
|
|
2479
|
+
* @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
|
|
2443
2480
|
* @example
|
|
2444
2481
|
* ```js
|
|
2445
2482
|
* liveboardEmbed.trigger(HostEvent.Save)
|
|
@@ -2749,6 +2786,7 @@
|
|
|
2749
2786
|
HostEvent["UpdateParameters"] = "UpdateParameters";
|
|
2750
2787
|
/**
|
|
2751
2788
|
* Triggers GetParameters to fetch the runtime Parameters.
|
|
2789
|
+
* @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
|
|
2752
2790
|
* ```js
|
|
2753
2791
|
* liveboardEmbed.trigger(HostEvent.GetParameters).then((parameter) => {
|
|
2754
2792
|
* console.log('parameters', parameter);
|
|
@@ -2792,7 +2830,7 @@
|
|
|
2792
2830
|
* @param - optional attributes to set Answer properties.
|
|
2793
2831
|
* `name` - Name string for the Answer.
|
|
2794
2832
|
* `description` - Description text for the Answer.
|
|
2795
|
-
*
|
|
2833
|
+
* @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
|
|
2796
2834
|
* @example
|
|
2797
2835
|
* ```js
|
|
2798
2836
|
* const saveAnswerResponse = await searchEmbed.trigger(HostEvent.SaveAnswer, {
|
|
@@ -2800,6 +2838,14 @@
|
|
|
2800
2838
|
* description: "Total sales by states in MidWest"
|
|
2801
2839
|
* });
|
|
2802
2840
|
* ```
|
|
2841
|
+
* @example
|
|
2842
|
+
* ```js
|
|
2843
|
+
* const saveAnswerResponse = await spotterEmbed.trigger(HostEvent.SaveAnswer, {
|
|
2844
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c',
|
|
2845
|
+
* name: "Sales by states",
|
|
2846
|
+
* description: "Total sales by states in MidWest"
|
|
2847
|
+
* });
|
|
2848
|
+
* ```
|
|
2803
2849
|
* @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
|
|
2804
2850
|
*/
|
|
2805
2851
|
HostEvent["SaveAnswer"] = "saveAnswer";
|
|
@@ -2831,7 +2877,7 @@
|
|
|
2831
2877
|
/**
|
|
2832
2878
|
* Triggers a search operation with the search tokens specified in
|
|
2833
2879
|
* the search query string in spotter embed.
|
|
2834
|
-
* @param - `
|
|
2880
|
+
* @param - `query`: Text string in Natural Language format
|
|
2835
2881
|
* @param - `executeSearch`: Boolean to execute search and update search query
|
|
2836
2882
|
* @example
|
|
2837
2883
|
* ```js
|
|
@@ -2840,6 +2886,7 @@
|
|
|
2840
2886
|
* executeSearch: true,
|
|
2841
2887
|
* })
|
|
2842
2888
|
* ```
|
|
2889
|
+
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
2843
2890
|
*/
|
|
2844
2891
|
HostEvent["SpotterSearch"] = "SpotterSearch";
|
|
2845
2892
|
/**
|
|
@@ -2849,6 +2896,7 @@
|
|
|
2849
2896
|
* ```js
|
|
2850
2897
|
* spotterEmbed.trigger(HostEvent.EditLastPrompt, "revenue per year");
|
|
2851
2898
|
* ```
|
|
2899
|
+
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
2852
2900
|
*/
|
|
2853
2901
|
HostEvent["EditLastPrompt"] = "EditLastPrompt";
|
|
2854
2902
|
/**
|
|
@@ -2857,6 +2905,7 @@
|
|
|
2857
2905
|
* ```js
|
|
2858
2906
|
* spotterEmbed.trigger(HostEvent.PreviewSpotterData);
|
|
2859
2907
|
* ```
|
|
2908
|
+
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
2860
2909
|
*/
|
|
2861
2910
|
HostEvent["PreviewSpotterData"] = "PreviewSpotterData";
|
|
2862
2911
|
/**
|
|
@@ -2865,6 +2914,7 @@
|
|
|
2865
2914
|
* ```js
|
|
2866
2915
|
* spotterEmbed.trigger(HostEvent.ResetSpotterConversation);
|
|
2867
2916
|
* ```
|
|
2917
|
+
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
2868
2918
|
*/
|
|
2869
2919
|
HostEvent["ResetSpotterConversation"] = "ResetSpotterConversation";
|
|
2870
2920
|
/**
|
|
@@ -2873,17 +2923,19 @@
|
|
|
2873
2923
|
* ```js
|
|
2874
2924
|
* spotterEmbed.trigger(HostEvent.DeleteLastPrompt);
|
|
2875
2925
|
* ```
|
|
2926
|
+
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
2876
2927
|
*/
|
|
2877
2928
|
HostEvent["DeleteLastPrompt"] = "DeleteLastPrompt";
|
|
2878
2929
|
/**
|
|
2879
2930
|
* Toggle the visualization to chart or table view.
|
|
2880
|
-
* @param - `vizId `
|
|
2931
|
+
* @param - `vizId ` refers to the answer id in spotter Embed, it is required in spotter Embed.
|
|
2881
2932
|
* @example
|
|
2882
2933
|
* ```js
|
|
2883
2934
|
* spotterEmbed.trigger(HostEvent.AnswerChartSwitcher, {
|
|
2884
|
-
* vizId:
|
|
2935
|
+
* vizId:'b535c760-8bbe-4e6f-bb26-af56b4129a1e'
|
|
2885
2936
|
* });
|
|
2886
2937
|
*```
|
|
2938
|
+
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
2887
2939
|
*/
|
|
2888
2940
|
HostEvent["AnswerChartSwitcher"] = "answerChartSwitcher";
|
|
2889
2941
|
/**
|
|
@@ -2910,15 +2962,16 @@
|
|
|
2910
2962
|
*/
|
|
2911
2963
|
HostEvent["VisibleEmbedCoordinates"] = "visibleEmbedCoordinates";
|
|
2912
2964
|
/**
|
|
2913
|
-
* Trigger the *Ask
|
|
2965
|
+
* Trigger the *Ask Spotter* action for visualizations
|
|
2966
|
+
* @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
|
|
2914
2967
|
* @example
|
|
2915
2968
|
* ```js
|
|
2916
|
-
*
|
|
2917
|
-
* {
|
|
2969
|
+
* spotterEmbed.trigger(HostEvent.AskSpotter,
|
|
2970
|
+
* {vizId:'730496d6-6903-4601-937e-2c691821af3c'})
|
|
2918
2971
|
* ```
|
|
2919
2972
|
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
2920
2973
|
*/
|
|
2921
|
-
HostEvent["AskSpotter"] = "
|
|
2974
|
+
HostEvent["AskSpotter"] = "AskSpotter";
|
|
2922
2975
|
/**
|
|
2923
2976
|
* @hidden
|
|
2924
2977
|
* Triggers the update of the embed params.
|
|
@@ -3228,27 +3281,27 @@
|
|
|
3228
3281
|
*/
|
|
3229
3282
|
Action["ConfigureFilter"] = "configureFilter";
|
|
3230
3283
|
/**
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
|
|
3284
|
+
* The **Collapse data sources** icon on the Search page.
|
|
3285
|
+
* Collapses the panel showing data sources.
|
|
3286
|
+
*
|
|
3287
|
+
* @example
|
|
3288
|
+
* ```js
|
|
3289
|
+
* disabledActions: [Action.CollapseDataPanel]
|
|
3290
|
+
* ```
|
|
3291
|
+
* @version: SDK: 1.1.0 | ThoughtSpot Cloud: ts7.may.cl, 8.4.1.sw
|
|
3292
|
+
*/
|
|
3240
3293
|
Action["CollapseDataSources"] = "collapseDataSources";
|
|
3241
3294
|
/**
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3295
|
+
* The **Collapse data panel** icon on the Search page.
|
|
3296
|
+
* Collapses the data panel view.
|
|
3297
|
+
*
|
|
3298
|
+
* @version: SDK: 1.34.0 | ThoughtSpot Cloud: 10.3.0.cl
|
|
3299
|
+
*
|
|
3300
|
+
* @example
|
|
3301
|
+
* ```js
|
|
3302
|
+
* disabledActions: [Action.CollapseDataPanel]
|
|
3303
|
+
* ```
|
|
3304
|
+
*/
|
|
3252
3305
|
Action["CollapseDataPanel"] = "collapseDataPanel";
|
|
3253
3306
|
/**
|
|
3254
3307
|
* The **Choose sources** button on Search page.
|
|
@@ -3944,6 +3997,17 @@
|
|
|
3944
3997
|
* @version SDK: 1.25.0 | ThoughtSpot Cloud: 9.6.0.cl
|
|
3945
3998
|
*/
|
|
3946
3999
|
Action["EnableContextualChangeAnalysis"] = "enableContextualChangeAnalysis";
|
|
4000
|
+
/**
|
|
4001
|
+
* Action ID to hide or disable Iterative Change Analysis option
|
|
4002
|
+
* on contextual change analysis Inisght charts context menu
|
|
4003
|
+
*
|
|
4004
|
+
* @example
|
|
4005
|
+
* ```js
|
|
4006
|
+
* disabledActions: [Action.EnableIterativeChangeAnalysis]
|
|
4007
|
+
* ```
|
|
4008
|
+
* @version SDK: 1.41.0 | ThoughtSpot Cloud: 9.12.0.cl
|
|
4009
|
+
*/
|
|
4010
|
+
Action["EnableIterativeChangeAnalysis"] = "enableIterativeChangeAnalysis";
|
|
3947
4011
|
/**
|
|
3948
4012
|
* Action ID to hide or disable Natural Language Search query.
|
|
3949
4013
|
*
|
|
@@ -4313,6 +4377,39 @@
|
|
|
4313
4377
|
* @version SDK: 1.39.0 | ThoughtSpot Cloud: 10.10.0.cl
|
|
4314
4378
|
*/
|
|
4315
4379
|
Action["InConversationTraining"] = "InConversationTraining";
|
|
4380
|
+
/**
|
|
4381
|
+
* Action ID to hide the warnings banner in
|
|
4382
|
+
* Spotter results. It's an EA feature and
|
|
4383
|
+
* handled by LD.
|
|
4384
|
+
* @example
|
|
4385
|
+
* ```js
|
|
4386
|
+
* hiddenAction: [Action.SpotterWarningsBanner]
|
|
4387
|
+
* ```
|
|
4388
|
+
* @version SDK: 1.41.0 | ThoughtSpot Cloud: 10.13.0.cl
|
|
4389
|
+
*/
|
|
4390
|
+
Action["SpotterWarningsBanner"] = "SpotterWarningsBanner";
|
|
4391
|
+
/**
|
|
4392
|
+
* Action ID to hide the warnings border on the knowledge
|
|
4393
|
+
* card in Spotter results. It's an EA feature and
|
|
4394
|
+
* handled by LD.
|
|
4395
|
+
* @example
|
|
4396
|
+
* ```js
|
|
4397
|
+
* hiddenAction: [Action.SpotterWarningsOnTokens]
|
|
4398
|
+
* ```
|
|
4399
|
+
* @version SDK: 1.41.0 | ThoughtSpot Cloud: 10.13.0.cl
|
|
4400
|
+
*/
|
|
4401
|
+
Action["SpotterWarningsOnTokens"] = "SpotterWarningsOnTokens";
|
|
4402
|
+
/**
|
|
4403
|
+
* Action ID to disable the click event handler on knowledge
|
|
4404
|
+
* card in Spotter results. It's an EA feature and
|
|
4405
|
+
* handled by LD.
|
|
4406
|
+
* @example
|
|
4407
|
+
* ```js
|
|
4408
|
+
* hiddenAction: [Action.SpotterTokenQuickEdit]
|
|
4409
|
+
* ```
|
|
4410
|
+
* @version SDK: 1.41.0 | ThoughtSpot Cloud: 10.13.0.cl
|
|
4411
|
+
*/
|
|
4412
|
+
Action["SpotterTokenQuickEdit"] = "SpotterTokenQuickEdit";
|
|
4316
4413
|
})(exports.Action || (exports.Action = {}));
|
|
4317
4414
|
var PrefetchFeatures;
|
|
4318
4415
|
(function (PrefetchFeatures) {
|
|
@@ -15792,7 +15889,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
15792
15889
|
return e;
|
|
15793
15890
|
}
|
|
15794
15891
|
|
|
15795
|
-
var name="@thoughtspot/visual-embed-sdk";var version$1="1.
|
|
15892
|
+
var name="@thoughtspot/visual-embed-sdk";var version$1="1.41.0-pre-render-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$1={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p . --incremental false; tsc -p . --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts","bundle-dts":"dts-bundle --name ../../dist/visual-embed-sdk --main lib/src/index.d.ts --outputAsModuleFolder=true","bundle-dts-react":"dts-bundle --name ../../../dist/visual-embed-sdk-react --main lib/src/react/index.d.ts --outputAsModuleFolder=true","bundle-dts-react-full":"dts-bundle --name ../../../dist/visual-embed-sdk-react-full --main lib/src/react/all-types-export.d.ts --outputAsModuleFolder=true",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.json --theme typedoc-theme --json static/typedoc/typedoc.json --disableOutputCheck","test-sdk":"jest -c jest.config.sdk.js --runInBand",test:"npm run test-sdk",posttest:"cat ./coverage/sdk/lcov.info | coveralls","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest",dev:"vite -c vite.local.config.ts"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={classnames:"^2.3.1",eventemitter3:"^4.0.7",lodash:"^4.17.21","mixpanel-browser":"2.47.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1",yaml:"^2.5.1"};var devDependencies={"@mdx-js/mdx":"^1.6.22","@mdx-js/react":"^1.6.22","@react-icons/all-files":"^4.1.0","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^5.0.2","@size-limit/preset-big-lib":"^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:"^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":"^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$1,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};
|
|
15796
15893
|
|
|
15797
15894
|
/**
|
|
15798
15895
|
* Reloads the ThoughtSpot iframe.
|
|
@@ -16018,7 +16115,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
16018
16115
|
*/
|
|
16019
16116
|
this.fullscreenChangeHandler = null;
|
|
16020
16117
|
this.subscribedListeners = {};
|
|
16021
|
-
this.isEmbedContainerLoaded = false;
|
|
16022
16118
|
/**
|
|
16023
16119
|
* Send Custom style as part of payload of APP_INIT
|
|
16024
16120
|
* @param _
|
|
@@ -16090,20 +16186,49 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
16090
16186
|
});
|
|
16091
16187
|
notifyAuthFailure(AuthFailureType.IDLE_SESSION_TIMEOUT);
|
|
16092
16188
|
};
|
|
16093
|
-
this.pendingEvents = [];
|
|
16094
16189
|
/**
|
|
16095
16190
|
* Register APP_INIT event and sendback init payload
|
|
16096
16191
|
*/
|
|
16097
16192
|
this.registerAppInit = () => {
|
|
16098
16193
|
this.on(exports.EmbedEvent.APP_INIT, this.appInitCb, { start: false }, true);
|
|
16099
|
-
this.on(exports.EmbedEvent.AuthInit, () => {
|
|
16100
|
-
this.isEmbedContainerLoaded = true;
|
|
16101
|
-
this.executePendingEvents();
|
|
16102
|
-
}, { start: false }, true);
|
|
16103
16194
|
this.on(exports.EmbedEvent.AuthExpire, this.updateAuthToken, { start: false }, true);
|
|
16104
16195
|
this.on(exports.EmbedEvent.IdleSessionTimeout, this.idleSessionTimeout, { start: false }, true);
|
|
16196
|
+
const embedListenerReadyHandler = this.createEmbedContainerHandler(exports.EmbedEvent.EmbedListenerReady);
|
|
16197
|
+
this.on(exports.EmbedEvent.EmbedListenerReady, embedListenerReadyHandler, { start: false }, true);
|
|
16198
|
+
const authInitHandler = this.createEmbedContainerHandler(exports.EmbedEvent.AuthInit);
|
|
16199
|
+
this.on(exports.EmbedEvent.AuthInit, authInitHandler, { start: false }, true);
|
|
16105
16200
|
};
|
|
16106
16201
|
this.showPreRenderByDefault = false;
|
|
16202
|
+
/**
|
|
16203
|
+
* @hidden
|
|
16204
|
+
* Internal state to track if the embed container is loaded.
|
|
16205
|
+
* This is used to trigger events after the embed container is loaded.
|
|
16206
|
+
*/
|
|
16207
|
+
this.isEmbedContainerLoaded = false;
|
|
16208
|
+
/**
|
|
16209
|
+
* @hidden
|
|
16210
|
+
* Internal state to track the callbacks to be executed after the embed container
|
|
16211
|
+
* is loaded.
|
|
16212
|
+
* This is used to trigger events after the embed container is loaded.
|
|
16213
|
+
*/
|
|
16214
|
+
this.embedContainerReadyCallbacks = [];
|
|
16215
|
+
this.createEmbedContainerHandler = (source) => () => {
|
|
16216
|
+
const processEmbedContainerReady = () => {
|
|
16217
|
+
logger$3.debug('processEmbedContainerReady');
|
|
16218
|
+
this.isEmbedContainerLoaded = true;
|
|
16219
|
+
this.executeEmbedContainerReadyCallbacks();
|
|
16220
|
+
};
|
|
16221
|
+
if (source === exports.EmbedEvent.AuthInit) {
|
|
16222
|
+
const AUTH_INIT_FALLBACK_DELAY = 1000;
|
|
16223
|
+
// Wait for 1 second to ensure the embed container is loaded
|
|
16224
|
+
// This is a workaround to ensure the embed container is loaded
|
|
16225
|
+
// this is needed until all clusters have EmbedListenerReady event
|
|
16226
|
+
setTimeout(processEmbedContainerReady, AUTH_INIT_FALLBACK_DELAY);
|
|
16227
|
+
}
|
|
16228
|
+
else if (source === exports.EmbedEvent.EmbedListenerReady) {
|
|
16229
|
+
processEmbedContainerReady();
|
|
16230
|
+
}
|
|
16231
|
+
};
|
|
16107
16232
|
this.validatePreRenderViewConfig = (viewConfig) => {
|
|
16108
16233
|
var _a;
|
|
16109
16234
|
const preRenderAllowedKeys = ['preRenderId', 'vizId', 'liveboardId'];
|
|
@@ -16125,7 +16250,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
16125
16250
|
});
|
|
16126
16251
|
}
|
|
16127
16252
|
};
|
|
16128
|
-
this.id = Date.now().toString();
|
|
16129
16253
|
this.el = getDOMNode(domSelector);
|
|
16130
16254
|
this.eventHandlerMap = new Map();
|
|
16131
16255
|
this.isError = false;
|
|
@@ -16138,9 +16262,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
16138
16262
|
uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_EMBED_CREATE, {
|
|
16139
16263
|
...viewConfig,
|
|
16140
16264
|
});
|
|
16141
|
-
this.hostEventClient = new HostEventClient(this.iFrame);
|
|
16142
16265
|
const embedConfig = getEmbedConfig();
|
|
16143
16266
|
this.embedConfig = embedConfig;
|
|
16267
|
+
this.hostEventClient = new HostEventClient(this.iFrame);
|
|
16144
16268
|
this.isReadyForRenderPromise = getInitPromise().then(async () => {
|
|
16145
16269
|
if (!embedConfig.authTriggerContainer && !embedConfig.useEventForSAMLPopup) {
|
|
16146
16270
|
this.embedConfig.authTriggerContainer = domSelector;
|
|
@@ -16312,43 +16436,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
16312
16436
|
async getAppInitData() {
|
|
16313
16437
|
return this.getDefaultAppInitData();
|
|
16314
16438
|
}
|
|
16315
|
-
getPreRenderObj() {
|
|
16316
|
-
var _a;
|
|
16317
|
-
const embedObj = (_a = this.insertedDomEl) === null || _a === void 0 ? void 0 : _a[this.embedNodeKey];
|
|
16318
|
-
if (embedObj === this) {
|
|
16319
|
-
logger$3.info('embedObj is same as this');
|
|
16320
|
-
}
|
|
16321
|
-
return embedObj;
|
|
16322
|
-
}
|
|
16323
|
-
checkEmbedContainerLoaded() {
|
|
16324
|
-
if (this.isEmbedContainerLoaded)
|
|
16325
|
-
return true;
|
|
16326
|
-
const preRenderObj = this.getPreRenderObj();
|
|
16327
|
-
if (preRenderObj && preRenderObj.isEmbedContainerLoaded) {
|
|
16328
|
-
this.isEmbedContainerLoaded = true;
|
|
16329
|
-
}
|
|
16330
|
-
return this.isEmbedContainerLoaded;
|
|
16331
|
-
}
|
|
16332
|
-
executePendingEvents() {
|
|
16333
|
-
logger$3.debug('executePendingEvents', this.pendingEvents);
|
|
16334
|
-
setTimeout(() => {
|
|
16335
|
-
this.pendingEvents.forEach((event) => {
|
|
16336
|
-
var _a;
|
|
16337
|
-
this.trigger(event.eventType, event.data);
|
|
16338
|
-
(_a = event.onEventTriggered) === null || _a === void 0 ? void 0 : _a.call(event);
|
|
16339
|
-
});
|
|
16340
|
-
this.pendingEvents = [];
|
|
16341
|
-
}, 1000);
|
|
16342
|
-
}
|
|
16343
|
-
triggerAfterLoad(eventType, data, onEventTriggered) {
|
|
16344
|
-
if (this.checkEmbedContainerLoaded()) {
|
|
16345
|
-
this.trigger(eventType, data);
|
|
16346
|
-
onEventTriggered === null || onEventTriggered === void 0 ? void 0 : onEventTriggered();
|
|
16347
|
-
}
|
|
16348
|
-
else {
|
|
16349
|
-
this.pendingEvents.push({ eventType, data, onEventTriggered });
|
|
16350
|
-
}
|
|
16351
|
-
}
|
|
16352
16439
|
/**
|
|
16353
16440
|
* Constructs the base URL string to load the ThoughtSpot app.
|
|
16354
16441
|
* @param query
|
|
@@ -16903,6 +16990,43 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
16903
16990
|
logger$3.log('Event Port is not defined');
|
|
16904
16991
|
}
|
|
16905
16992
|
}
|
|
16993
|
+
getPreRenderObj() {
|
|
16994
|
+
var _a;
|
|
16995
|
+
const embedObj = (_a = this.insertedDomEl) === null || _a === void 0 ? void 0 : _a[this.embedNodeKey];
|
|
16996
|
+
if (embedObj === this) {
|
|
16997
|
+
logger$3.info('embedObj is same as this');
|
|
16998
|
+
}
|
|
16999
|
+
return embedObj;
|
|
17000
|
+
}
|
|
17001
|
+
checkEmbedContainerLoaded() {
|
|
17002
|
+
if (this.isEmbedContainerLoaded)
|
|
17003
|
+
return true;
|
|
17004
|
+
const preRenderObj = this.getPreRenderObj();
|
|
17005
|
+
if (preRenderObj && preRenderObj.isEmbedContainerLoaded) {
|
|
17006
|
+
this.isEmbedContainerLoaded = true;
|
|
17007
|
+
}
|
|
17008
|
+
return this.isEmbedContainerLoaded;
|
|
17009
|
+
}
|
|
17010
|
+
executeEmbedContainerReadyCallbacks() {
|
|
17011
|
+
logger$3.debug('executePendingEvents', this.embedContainerReadyCallbacks);
|
|
17012
|
+
this.embedContainerReadyCallbacks.forEach((callback) => {
|
|
17013
|
+
callback === null || callback === void 0 ? void 0 : callback();
|
|
17014
|
+
});
|
|
17015
|
+
this.embedContainerReadyCallbacks = [];
|
|
17016
|
+
}
|
|
17017
|
+
/**
|
|
17018
|
+
* Executes a callback after the embed container is loaded.
|
|
17019
|
+
* @param callback The callback to execute
|
|
17020
|
+
*/
|
|
17021
|
+
executeAfterEmbedContainerLoaded(callback) {
|
|
17022
|
+
if (this.checkEmbedContainerLoaded()) {
|
|
17023
|
+
callback === null || callback === void 0 ? void 0 : callback();
|
|
17024
|
+
}
|
|
17025
|
+
else {
|
|
17026
|
+
logger$3.debug('pushing callback to embedContainerReadyCallbacks', callback);
|
|
17027
|
+
this.embedContainerReadyCallbacks.push(callback);
|
|
17028
|
+
}
|
|
17029
|
+
}
|
|
16906
17030
|
/**
|
|
16907
17031
|
* Triggers an event to the embedded app
|
|
16908
17032
|
* @param {HostEvent} messageType The event type
|
|
@@ -17048,7 +17172,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
17048
17172
|
}
|
|
17049
17173
|
this.validatePreRenderViewConfig(this.viewConfig);
|
|
17050
17174
|
logger$3.debug('triggering UpdateEmbedParams', this.viewConfig);
|
|
17051
|
-
this.
|
|
17175
|
+
this.executeAfterEmbedContainerLoaded(() => {
|
|
17176
|
+
this.trigger(exports.HostEvent.UpdateEmbedParams, this.getUpdateEmbedParamsObject());
|
|
17177
|
+
});
|
|
17052
17178
|
}
|
|
17053
17179
|
this.beforePrerenderVisible();
|
|
17054
17180
|
if (this.el) {
|
|
@@ -17840,10 +17966,18 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
17840
17966
|
else {
|
|
17841
17967
|
params[Param.DataPanelCustomGroupsAccordionInitialState] = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL;
|
|
17842
17968
|
}
|
|
17969
|
+
// Set navigation to v2 by default to avoid problems like the app
|
|
17970
|
+
// switcher (9-dot menu) not showing when v3 navigation is turned on
|
|
17971
|
+
// at the cluster level.
|
|
17972
|
+
// To use v3 navigation, we must manually set the discoveryExperience
|
|
17973
|
+
// settings.
|
|
17974
|
+
params[Param.NavigationVersion] = 'v2';
|
|
17843
17975
|
if (discoveryExperience) {
|
|
17844
17976
|
// primaryNavbarVersion v3 will enabled the new left navigation
|
|
17845
17977
|
if (discoveryExperience.primaryNavbarVersion === PrimaryNavbarVersion.Sliding) {
|
|
17846
17978
|
params[Param.NavigationVersion] = discoveryExperience.primaryNavbarVersion;
|
|
17979
|
+
// Enable the modularHomeExperience when Sliding is enabled.
|
|
17980
|
+
params[Param.ModularHomeExperienceEnabled] = true;
|
|
17847
17981
|
}
|
|
17848
17982
|
// homePage v2 will enable the modular home page
|
|
17849
17983
|
// and it will override the modularHomeExperience value
|
|
@@ -18127,7 +18261,16 @@ query GetEurekaVizSnapshots(
|
|
|
18127
18261
|
}
|
|
18128
18262
|
this.setIFrameHeight(frameHeight || this.defaultHeight);
|
|
18129
18263
|
};
|
|
18130
|
-
|
|
18264
|
+
/**
|
|
18265
|
+
* @hidden
|
|
18266
|
+
* Internal state to track the current liveboard id.
|
|
18267
|
+
* This is used to navigate to the correct liveboard when the prerender is visible.
|
|
18268
|
+
*/
|
|
18269
|
+
this.currentLiveboardState = {
|
|
18270
|
+
liveboardId: this.viewConfig.liveboardId,
|
|
18271
|
+
vizId: this.viewConfig.vizId,
|
|
18272
|
+
activeTabId: this.viewConfig.activeTabId,
|
|
18273
|
+
};
|
|
18131
18274
|
if (this.viewConfig.fullHeight === true) {
|
|
18132
18275
|
if (this.viewConfig.vizId) {
|
|
18133
18276
|
logger$3.warn('Full height is currently only supported for Liveboard embeds.' +
|
|
@@ -18301,10 +18444,15 @@ query GetEurekaVizSnapshots(
|
|
|
18301
18444
|
}
|
|
18302
18445
|
beforePrerenderVisible() {
|
|
18303
18446
|
const embedObj = this.getPreRenderObj();
|
|
18304
|
-
|
|
18305
|
-
|
|
18306
|
-
if (embedObj)
|
|
18307
|
-
embedObj.
|
|
18447
|
+
this.executeAfterEmbedContainerLoaded(() => {
|
|
18448
|
+
this.navigateToLiveboard(this.viewConfig.liveboardId, this.viewConfig.vizId, this.viewConfig.activeTabId);
|
|
18449
|
+
if (embedObj) {
|
|
18450
|
+
embedObj.currentLiveboardState = {
|
|
18451
|
+
liveboardId: this.viewConfig.liveboardId,
|
|
18452
|
+
vizId: this.viewConfig.vizId,
|
|
18453
|
+
activeTabId: this.viewConfig.activeTabId,
|
|
18454
|
+
};
|
|
18455
|
+
}
|
|
18308
18456
|
});
|
|
18309
18457
|
}
|
|
18310
18458
|
async handleRenderForPrerender() {
|
|
@@ -18367,13 +18515,13 @@ query GetEurekaVizSnapshots(
|
|
|
18367
18515
|
this.postRender();
|
|
18368
18516
|
return this;
|
|
18369
18517
|
}
|
|
18370
|
-
navigateToLiveboard(liveboardId, vizId, activeTabId
|
|
18518
|
+
navigateToLiveboard(liveboardId, vizId, activeTabId) {
|
|
18371
18519
|
const path = this.getIframeSuffixSrc(liveboardId, vizId, activeTabId);
|
|
18372
18520
|
this.viewConfig.liveboardId = liveboardId;
|
|
18373
18521
|
this.viewConfig.activeTabId = activeTabId;
|
|
18374
18522
|
this.viewConfig.vizId = vizId;
|
|
18375
18523
|
if (this.isRendered) {
|
|
18376
|
-
this.
|
|
18524
|
+
this.trigger(exports.HostEvent.Navigate, path.substring(1));
|
|
18377
18525
|
}
|
|
18378
18526
|
else if (this.viewConfig.preRenderId) {
|
|
18379
18527
|
this.preRender(true);
|
|
@@ -18958,7 +19106,7 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
18958
19106
|
this.viewConfig = viewConfig;
|
|
18959
19107
|
}
|
|
18960
19108
|
getEmbedParamsObject() {
|
|
18961
|
-
const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, } = this.viewConfig;
|
|
19109
|
+
const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, } = this.viewConfig;
|
|
18962
19110
|
if (!worksheetId) {
|
|
18963
19111
|
this.handleError(ERROR_MESSAGE.SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND);
|
|
18964
19112
|
}
|
|
@@ -18982,7 +19130,7 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
18982
19130
|
return queryParams;
|
|
18983
19131
|
}
|
|
18984
19132
|
getIframeSrc() {
|
|
18985
|
-
const { worksheetId, searchOptions, } = this.viewConfig;
|
|
19133
|
+
const { worksheetId, searchOptions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, } = this.viewConfig;
|
|
18986
19134
|
const path = 'insights/conv-assist';
|
|
18987
19135
|
const queryParams = this.getEmbedParamsObject();
|
|
18988
19136
|
let query = '';
|
|
@@ -18990,6 +19138,14 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
18990
19138
|
if (queryParamsString) {
|
|
18991
19139
|
query = `?${queryParamsString}`;
|
|
18992
19140
|
}
|
|
19141
|
+
const filterQuery = getFilterQuery(runtimeFilters || []);
|
|
19142
|
+
if (filterQuery && !excludeRuntimeFiltersfromURL) {
|
|
19143
|
+
query += `&${filterQuery}`;
|
|
19144
|
+
}
|
|
19145
|
+
const parameterQuery = getRuntimeParameters(runtimeParameters || []);
|
|
19146
|
+
if (parameterQuery && !excludeRuntimeParametersfromURL) {
|
|
19147
|
+
query += `&${parameterQuery}`;
|
|
19148
|
+
}
|
|
18993
19149
|
const tsPostHashParams = this.getThoughtSpotPostUrlParams({
|
|
18994
19150
|
worksheet: worksheetId,
|
|
18995
19151
|
query: (searchOptions === null || searchOptions === void 0 ? void 0 : searchOptions.searchQuery) || '',
|