@thoughtspot/visual-embed-sdk 1.36.7 → 1.36.9-primary-actions
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 +15 -15
- package/cjs/src/embed/bodyless-conversation.d.ts +16 -0
- package/cjs/src/embed/bodyless-conversation.d.ts.map +1 -1
- package/cjs/src/embed/bodyless-conversation.js +1 -1
- package/cjs/src/embed/bodyless-conversation.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts +15 -0
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +4 -1
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/liveboard.spec.js +25 -1
- package/cjs/src/embed/liveboard.spec.js.map +1 -1
- package/cjs/src/embed/search-bar.d.ts +1 -1
- package/cjs/src/embed/search.d.ts +1 -1
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +14 -2
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/embed/ts-embed.spec.js +111 -0
- package/cjs/src/embed/ts-embed.spec.js.map +1 -1
- package/cjs/src/index.d.ts +2 -2
- package/cjs/src/index.d.ts.map +1 -1
- package/cjs/src/index.js +2 -1
- package/cjs/src/index.js.map +1 -1
- package/cjs/src/pages/embed-test.page.d.ts +8 -0
- package/cjs/src/pages/embed-test.page.d.ts.map +1 -0
- package/cjs/src/pages/embed-test.page.js +20 -0
- package/cjs/src/pages/embed-test.page.js.map +1 -0
- package/cjs/src/pages/home.page.d.ts +6 -0
- package/cjs/src/pages/home.page.d.ts.map +1 -0
- package/cjs/src/pages/home.page.js +12 -0
- package/cjs/src/pages/home.page.js.map +1 -0
- package/cjs/src/pages/login.page.d.ts +15 -0
- package/cjs/src/pages/login.page.d.ts.map +1 -0
- package/cjs/src/pages/login.page.js +22 -0
- package/cjs/src/pages/login.page.js.map +1 -0
- package/cjs/src/react/index.d.ts +1 -1
- package/cjs/src/react/index.d.ts.map +1 -1
- package/cjs/src/react/index.js +4 -3
- package/cjs/src/react/index.js.map +1 -1
- package/cjs/src/react/util.d.ts +2 -0
- package/cjs/src/react/util.d.ts.map +1 -1
- package/cjs/src/react/util.js.map +1 -1
- package/cjs/src/tests/auth.test.d.ts +1 -0
- package/cjs/src/tests/auth.test.d.ts.map +1 -0
- package/cjs/src/tests/auth.test.js +1 -0
- package/cjs/src/tests/auth.test.js.map +1 -0
- package/cjs/src/tests/e2e/auth.spec.d.ts +2 -0
- package/cjs/src/tests/e2e/auth.spec.d.ts.map +1 -0
- package/cjs/src/tests/e2e/auth.spec.js +54 -0
- package/cjs/src/tests/e2e/auth.spec.js.map +1 -0
- package/cjs/src/types.d.ts +94 -11
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +56 -9
- package/cjs/src/types.js.map +1 -1
- package/dist/{index-BratITNz.js → index-BJx3m5_V.js} +1 -1
- package/dist/index-Do_T8J8z.js +7370 -0
- package/dist/src/embed/bodyless-conversation.d.ts +16 -0
- package/dist/src/embed/bodyless-conversation.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts +15 -0
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/embed/search-bar.d.ts +1 -1
- package/dist/src/embed/search.d.ts +1 -1
- package/dist/src/embed/ts-embed.d.ts.map +1 -1
- package/dist/src/index.d.ts +2 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/pages/embed-test.page.d.ts +8 -0
- package/dist/src/pages/embed-test.page.d.ts.map +1 -0
- package/dist/src/pages/home.page.d.ts +6 -0
- package/dist/src/pages/home.page.d.ts.map +1 -0
- package/dist/src/pages/login.page.d.ts +15 -0
- package/dist/src/pages/login.page.d.ts.map +1 -0
- package/dist/src/react/index.d.ts +1 -1
- package/dist/src/react/index.d.ts.map +1 -1
- package/dist/src/react/util.d.ts +2 -0
- package/dist/src/react/util.d.ts.map +1 -1
- package/dist/src/tests/auth.test.d.ts +1 -0
- package/dist/src/tests/auth.test.d.ts.map +1 -0
- package/dist/src/tests/e2e/auth.spec.d.ts +2 -0
- package/dist/src/tests/e2e/auth.spec.d.ts.map +1 -0
- package/dist/src/types.d.ts +94 -11
- package/dist/src/types.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +79 -17
- package/dist/tsembed-react.js +77 -15
- package/dist/tsembed.es.js +78 -16
- package/dist/tsembed.js +76 -14
- package/dist/visual-embed-sdk-react-full.d.ts +128 -14
- package/dist/visual-embed-sdk-react.d.ts +128 -14
- package/dist/visual-embed-sdk.d.ts +127 -14
- package/lib/package.json +15 -15
- package/lib/src/embed/bodyless-conversation.d.ts +16 -0
- package/lib/src/embed/bodyless-conversation.d.ts.map +1 -1
- package/lib/src/embed/bodyless-conversation.js +1 -1
- package/lib/src/embed/bodyless-conversation.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts +15 -0
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +4 -1
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +25 -1
- package/lib/src/embed/liveboard.spec.js.map +1 -1
- package/lib/src/embed/search-bar.d.ts +1 -1
- package/lib/src/embed/search.d.ts +1 -1
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +14 -2
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/embed/ts-embed.spec.js +111 -0
- package/lib/src/embed/ts-embed.spec.js.map +1 -1
- package/lib/src/index.d.ts +2 -2
- package/lib/src/index.d.ts.map +1 -1
- package/lib/src/index.js +2 -2
- package/lib/src/index.js.map +1 -1
- package/lib/src/pages/embed-test.page.d.ts +8 -0
- package/lib/src/pages/embed-test.page.d.ts.map +1 -0
- package/lib/src/pages/embed-test.page.js +16 -0
- package/lib/src/pages/embed-test.page.js.map +1 -0
- package/lib/src/pages/home.page.d.ts +6 -0
- package/lib/src/pages/home.page.d.ts.map +1 -0
- package/lib/src/pages/home.page.js +8 -0
- package/lib/src/pages/home.page.js.map +1 -0
- package/lib/src/pages/login.page.d.ts +15 -0
- package/lib/src/pages/login.page.d.ts.map +1 -0
- package/lib/src/pages/login.page.js +18 -0
- package/lib/src/pages/login.page.js.map +1 -0
- package/lib/src/react/index.d.ts +1 -1
- package/lib/src/react/index.d.ts.map +1 -1
- package/lib/src/react/index.js +3 -3
- package/lib/src/react/index.js.map +1 -1
- package/lib/src/react/util.d.ts +2 -0
- package/lib/src/react/util.d.ts.map +1 -1
- package/lib/src/react/util.js.map +1 -1
- package/lib/src/tests/auth.test.d.ts +1 -0
- package/lib/src/tests/auth.test.d.ts.map +1 -0
- package/lib/src/tests/auth.test.js +1 -0
- package/lib/src/tests/auth.test.js.map +1 -0
- package/lib/src/tests/e2e/auth.spec.d.ts +2 -0
- package/lib/src/tests/e2e/auth.spec.d.ts.map +1 -0
- package/lib/src/tests/e2e/auth.spec.js +52 -0
- package/lib/src/tests/e2e/auth.spec.js.map +1 -0
- package/lib/src/types.d.ts +94 -11
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +55 -8
- package/lib/src/types.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +129 -15
- package/package.json +15 -15
- package/src/embed/bodyless-conversation.ts +1 -1
- package/src/embed/liveboard.spec.ts +35 -7
- package/src/embed/liveboard.ts +21 -1
- package/src/embed/search-bar.tsx +1 -1
- package/src/embed/search.ts +1 -1
- package/src/embed/ts-embed.spec.ts +118 -0
- package/src/embed/ts-embed.ts +15 -0
- package/src/index.ts +2 -0
- package/src/react/index.tsx +4 -3
- package/src/react/util.ts +1 -0
- package/src/types.ts +95 -10
package/dist/tsembed-react.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @thoughtspot/visual-embed-sdk version 1.36.
|
|
1
|
+
/* @thoughtspot/visual-embed-sdk version 1.36.9-primary-actions */
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import React__default, { useRef } from 'react';
|
|
4
4
|
|
|
@@ -792,6 +792,35 @@ var HomepageModule;
|
|
|
792
792
|
*/
|
|
793
793
|
HomepageModule["Learning"] = "LEARNING";
|
|
794
794
|
})(HomepageModule || (HomepageModule = {}));
|
|
795
|
+
/**
|
|
796
|
+
* List page columns that can be hidden.
|
|
797
|
+
* **Note**: This option is applicable only in full app embedding.
|
|
798
|
+
* @version SDK: 1.38.0 | ThoughtSpot: 9.12.5.cl, 10.1.0.sw
|
|
799
|
+
*/
|
|
800
|
+
// eslint-disable-next-line no-shadow
|
|
801
|
+
var ListPageColumns;
|
|
802
|
+
(function (ListPageColumns) {
|
|
803
|
+
/**
|
|
804
|
+
* Favourite
|
|
805
|
+
*/
|
|
806
|
+
ListPageColumns["Favourite"] = "FAVOURITE";
|
|
807
|
+
/**
|
|
808
|
+
* Tags
|
|
809
|
+
*/
|
|
810
|
+
ListPageColumns["Tags"] = "TAGS";
|
|
811
|
+
/**
|
|
812
|
+
* Author
|
|
813
|
+
*/
|
|
814
|
+
ListPageColumns["Author"] = "AUTHOR";
|
|
815
|
+
/**
|
|
816
|
+
* Last viewed/Last modified
|
|
817
|
+
*/
|
|
818
|
+
ListPageColumns["DateSort"] = "DATE_SORT";
|
|
819
|
+
/**
|
|
820
|
+
* Share
|
|
821
|
+
*/
|
|
822
|
+
ListPageColumns["Share"] = "SHARE";
|
|
823
|
+
})(ListPageColumns || (ListPageColumns = {}));
|
|
795
824
|
/**
|
|
796
825
|
* Event types emitted by the embedded ThoughtSpot application.
|
|
797
826
|
*
|
|
@@ -1782,16 +1811,19 @@ var EmbedEvent;
|
|
|
1782
1811
|
/**
|
|
1783
1812
|
* Emits when a table visualization is rendered in
|
|
1784
1813
|
* the ThoughtSpot embedded app.
|
|
1814
|
+
*
|
|
1785
1815
|
* You can also use this event as a hook to trigger host events
|
|
1786
1816
|
* such as `HostEvent.TransformTableVizData` on the table visualization.
|
|
1787
1817
|
* The event payload contains the data used in the rendered table.
|
|
1788
1818
|
* You can extract the relevant data from the payload
|
|
1789
1819
|
* stored in `payload.data.data.columnDataLite`.
|
|
1820
|
+
*
|
|
1790
1821
|
* `columnDataLite` is a multidimensional array that contains
|
|
1791
1822
|
* data values for each column, which was used in the query to
|
|
1792
1823
|
* generate the table visualization. To find and modify specific cell data,
|
|
1793
1824
|
* you can either loop through the array or directly access a cell if
|
|
1794
1825
|
* you know its position and data index.
|
|
1826
|
+
*
|
|
1795
1827
|
* In the following code sample, the first cell in the first column
|
|
1796
1828
|
* (`columnDataLite[0].dataValue[0]`) is set to `new fob`.
|
|
1797
1829
|
* Note that any changes made to the data in the payload will only update the
|
|
@@ -1801,6 +1833,7 @@ var EmbedEvent;
|
|
|
1801
1833
|
* payload in the `columnDataLite` is passed on to
|
|
1802
1834
|
* `HostEvent.TransformTableVizData` and trigger an update to
|
|
1803
1835
|
* the table visualization.
|
|
1836
|
+
*
|
|
1804
1837
|
* If the Row-Level Security (RLS) rules are applied on the
|
|
1805
1838
|
* Worksheet or Model, exercise caution when changing column
|
|
1806
1839
|
* or table cell values to maintain data security.
|
|
@@ -1815,7 +1848,7 @@ var EmbedEvent;
|
|
|
1815
1848
|
* searchEmbed.trigger(HostEvent.TransformTableVizData, columnDataLite);
|
|
1816
1849
|
* })
|
|
1817
1850
|
* ```
|
|
1818
|
-
* @version SDK: 1.
|
|
1851
|
+
* @version SDK: 1.38.0 | ThoughtSpot: 10.8.0.cl
|
|
1819
1852
|
*/
|
|
1820
1853
|
EmbedEvent["TableVizRendered"] = "TableVizRendered";
|
|
1821
1854
|
/**
|
|
@@ -1828,7 +1861,7 @@ var EmbedEvent;
|
|
|
1828
1861
|
* console.log('payload', payload);
|
|
1829
1862
|
* })
|
|
1830
1863
|
*```
|
|
1831
|
-
* @version SDK : 1.
|
|
1864
|
+
* @version SDK : 1.38.0 | ThoughtSpot : 10.8.0.cl
|
|
1832
1865
|
*/
|
|
1833
1866
|
EmbedEvent["CreateLiveboard"] = "createLiveboard";
|
|
1834
1867
|
/**
|
|
@@ -2277,7 +2310,7 @@ var HostEvent;
|
|
|
2277
2310
|
* ```js
|
|
2278
2311
|
* liveboardEmbed.trigger(HostEvent.Remove)
|
|
2279
2312
|
* ```
|
|
2280
|
-
* @version SDK: 1.
|
|
2313
|
+
* @version SDK: 1.38.0 | ThoughtSpot: 10.8.0.cl, 10.10.0.sw
|
|
2281
2314
|
*/
|
|
2282
2315
|
HostEvent["Remove"] = "delete";
|
|
2283
2316
|
/**
|
|
@@ -2825,7 +2858,7 @@ var HostEvent;
|
|
|
2825
2858
|
* ```js
|
|
2826
2859
|
* liveboardEmbed.trigger(HostEvent.InfoSuccess, data);
|
|
2827
2860
|
*```
|
|
2828
|
-
* @version SDK: 1.36.0 |
|
|
2861
|
+
* @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
|
|
2829
2862
|
*/
|
|
2830
2863
|
HostEvent["InfoSuccess"] = "InfoSuccess";
|
|
2831
2864
|
/**
|
|
@@ -2872,7 +2905,7 @@ var HostEvent;
|
|
|
2872
2905
|
* searchEmbed.trigger(HostEvent.TransformTableVizData, columnDataLite);
|
|
2873
2906
|
* })
|
|
2874
2907
|
* ```
|
|
2875
|
-
* @version SDK: 1.
|
|
2908
|
+
* @version SDK: 1.38.0 | ThoughtSpot: 10.8.0.cl
|
|
2876
2909
|
*/
|
|
2877
2910
|
HostEvent["TransformTableVizData"] = "TransformTableVizData";
|
|
2878
2911
|
})(HostEvent || (HostEvent = {}));
|
|
@@ -2927,6 +2960,7 @@ var Param;
|
|
|
2927
2960
|
Param["livedBoardEmbed"] = "isLiveboardEmbed";
|
|
2928
2961
|
Param["searchEmbed"] = "isSearchEmbed";
|
|
2929
2962
|
Param["vizEmbed"] = "isVizEmbed";
|
|
2963
|
+
Param["StringIDsUrl"] = "overrideStringIDsUrl";
|
|
2930
2964
|
Param["Version"] = "sdkVersion";
|
|
2931
2965
|
Param["ViewPortHeight"] = "viewPortHeight";
|
|
2932
2966
|
Param["ViewPortWidth"] = "viewPortWidth";
|
|
@@ -2982,6 +3016,7 @@ var Param;
|
|
|
2982
3016
|
Param["HideSageAnswerHeader"] = "hideSageAnswerHeader";
|
|
2983
3017
|
Param["HideSearchBar"] = "hideSearchBar";
|
|
2984
3018
|
Param["ClientLogLevel"] = "clientLogLevel";
|
|
3019
|
+
Param["ExposeTranslationIDs"] = "exposeTranslationIDs";
|
|
2985
3020
|
Param["OverrideNativeConsole"] = "overrideConsoleLogs";
|
|
2986
3021
|
Param["enableAskSage"] = "enableAskSage";
|
|
2987
3022
|
Param["CollapseSearchBarInitially"] = "collapseSearchBarInitially";
|
|
@@ -3008,6 +3043,8 @@ var Param;
|
|
|
3008
3043
|
Param["DataSourceId"] = "dataSourceId";
|
|
3009
3044
|
Param["preAuthCache"] = "preAuthCache";
|
|
3010
3045
|
Param["ShowSpotterLimitations"] = "showSpotterLimitations";
|
|
3046
|
+
Param["CoverAndFilterOptionInPDF"] = "coverAndFilterOptionInPDF";
|
|
3047
|
+
Param["PrimaryActions"] = "primaryActions";
|
|
3011
3048
|
})(Param || (Param = {}));
|
|
3012
3049
|
/**
|
|
3013
3050
|
* ThoughtSpot application pages include actions and menu commands
|
|
@@ -3174,7 +3211,7 @@ var Action;
|
|
|
3174
3211
|
* The **Collapse data panel** icon on the Search page.
|
|
3175
3212
|
* Collapses the data panel view.
|
|
3176
3213
|
*
|
|
3177
|
-
* @version: SDK: 1.34.0 | ThoughtSpot Cloud: 10.3.0.cl
|
|
3214
|
+
* @version: SDK: 1.34.0 | ThoughtSpot Cloud: 10.3.0.cl
|
|
3178
3215
|
*
|
|
3179
3216
|
* @example
|
|
3180
3217
|
* ```js
|
|
@@ -4219,6 +4256,16 @@ var Action;
|
|
|
4219
4256
|
* @version SDK: 1.38.0 | ThoughtSpot Cloud: 10.8.0.cl
|
|
4220
4257
|
*/
|
|
4221
4258
|
Action["ColumnRename"] = "columnRename";
|
|
4259
|
+
/**
|
|
4260
|
+
* Action ID for hide checkboxes for include or exclude
|
|
4261
|
+
* cover and filter pages in the Liveboard PDF
|
|
4262
|
+
* @example
|
|
4263
|
+
* ```js
|
|
4264
|
+
* hiddenAction: [Action.CoverAndFilterOptionInPDF]
|
|
4265
|
+
* ```
|
|
4266
|
+
* @version SDK: 1.38.0 | ThoughtSpot Cloud: 10.8.0.cl
|
|
4267
|
+
*/
|
|
4268
|
+
Action["CoverAndFilterOptionInPDF"] = "coverAndFilterOptionInPDF";
|
|
4222
4269
|
})(Action || (Action = {}));
|
|
4223
4270
|
var PrefetchFeatures;
|
|
4224
4271
|
(function (PrefetchFeatures) {
|
|
@@ -4228,8 +4275,8 @@ var PrefetchFeatures;
|
|
|
4228
4275
|
PrefetchFeatures["VizEmbed"] = "VizEmbed";
|
|
4229
4276
|
})(PrefetchFeatures || (PrefetchFeatures = {}));
|
|
4230
4277
|
/**
|
|
4231
|
-
* Enum for options to change context trigger
|
|
4232
|
-
* BOTH_CLICKS option is
|
|
4278
|
+
* Enum for options to change context trigger.
|
|
4279
|
+
* The `BOTH_CLICKS` option is available from 10.8.0.cl.
|
|
4233
4280
|
*/
|
|
4234
4281
|
var ContextMenuTriggerOptions;
|
|
4235
4282
|
(function (ContextMenuTriggerOptions) {
|
|
@@ -7509,7 +7556,7 @@ class AnswerService {
|
|
|
7509
7556
|
async getTML() {
|
|
7510
7557
|
const { object } = await this.executeQuery(getAnswerTML, {});
|
|
7511
7558
|
const edoc = object[0].edoc;
|
|
7512
|
-
const YAML = await import('./index-
|
|
7559
|
+
const YAML = await import('./index-Do_T8J8z.js');
|
|
7513
7560
|
const parsedDoc = YAML.parse(edoc);
|
|
7514
7561
|
return {
|
|
7515
7562
|
answer: {
|
|
@@ -15199,7 +15246,7 @@ function processEventData(type, e, thoughtSpotHost, containerEl) {
|
|
|
15199
15246
|
return e;
|
|
15200
15247
|
}
|
|
15201
15248
|
|
|
15202
|
-
var name="@thoughtspot/visual-embed-sdk";var version$1="1.36.
|
|
15249
|
+
var name="@thoughtspot/visual-embed-sdk";var version$1="1.36.9-primary-actions";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p . --incremental false; tsc -p . --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts","bundle-dts":"dts-bundle --name ../../dist/visual-embed-sdk --main lib/src/index.d.ts --outputAsModuleFolder=true","bundle-dts-react":"dts-bundle --name ../../../dist/visual-embed-sdk-react --main lib/src/react/index.d.ts --outputAsModuleFolder=true","bundle-dts-react-full":"dts-bundle --name ../../../dist/visual-embed-sdk-react-full --main lib/src/react/all-types-export.d.ts --outputAsModuleFolder=true",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.json --theme typedoc-theme --json static/typedoc/typedoc.json --disableOutputCheck","test-sdk":"jest -c jest.config.sdk.js --runInBand",test:"npm run test-sdk",posttest:"cat ./coverage/sdk/lcov.info | coveralls","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest",dev:"vite -c vite.local.config.ts"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={classnames:"^2.3.1",eventemitter3:"^4.0.7",lodash:"^4.17.21","mixpanel-browser":"2.47.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1",yaml:"^2.5.1"};var devDependencies={"@mdx-js/mdx":"^1.6.22","@mdx-js/react":"^1.6.22","@react-icons/all-files":"^4.1.0","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^5.0.2","@size-limit/preset-big-lib":"^8.2.6","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^22.2.3","@types/lodash":"^4.17.0","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^8.28.0","@typescript-eslint/parser":"^8.28.0",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1",coveralls:"^3.1.0",crypto:"^1.0.1","current-git-branch":"^1.1.0","dts-bundle":"^0.7.3",eslint:"^9.23.0","eslint-config-airbnb-base":"^15.0.0","eslint-config-prettier":"^10.1.1","eslint-import-resolver-typescript":"^4.2.5","eslint-plugin-comment-length":"2.2.1","eslint-plugin-import":"^2.31.0","eslint-plugin-jsdoc":"^50.6.9","eslint-plugin-prettier":"^5.2.5","eslint-plugin-react":"^7.37.5","eslint-plugin-react-hooks":"^5.2.0","fs-extra":"^10.0.0","gh-pages":"6.3.0",globals:"^16.0.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^1.1.1",jest:"^26.6.3","jest-fetch-mock":"^3.0.3",jsdom:"^17.0.0",prettier:"2.1.2",react:"^16.14.0","react-dom":"^16.14.0","react-resizable":"^1.11.0","react-resize-detector":"^6.6.0","react-test-renderer":"^17.0.2","react-use-flexsearch":"^0.1.1",rollup:"4.24.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^26.5.5","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","typescript-eslint":"^8.29.1","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^5.3.4"};var author="ThoughtSpot";var email="support@thoughtspot.com";var license="ThoughtSpot Development Tools End User License Agreement";var directories={lib:"lib"};var repository={type:"git",url:"git+https://github.com/thoughtspot/visual-embed-sdk.git"};var publishConfig={registry:"https://registry.npmjs.org"};var keywords=["thoughtspot","everywhere","embedded","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version$1,description:description,module:module,main:main,types:types,files:files,exports:exports,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.es.js",limit:"31 kB"}],scripts:scripts,peerDependencies:peerDependencies,dependencies:dependencies,devDependencies:devDependencies,author:author,email:email,license:license,directories:directories,repository:repository,publishConfig:publishConfig,keywords:keywords,bugs:bugs,homepage:homepage,globals:globals};
|
|
15203
15250
|
|
|
15204
15251
|
/**
|
|
15205
15252
|
* Reloads the ThoughtSpot iframe.
|
|
@@ -15673,6 +15720,7 @@ class TsEmbed {
|
|
|
15673
15720
|
? (_b = this.viewConfig) === null || _b === void 0 ? void 0 : _b.hiddenHomeLeftNavItems
|
|
15674
15721
|
: [],
|
|
15675
15722
|
customVariablesForThirdPartyTools: this.embedConfig.customVariablesForThirdPartyTools || {},
|
|
15723
|
+
hiddenListColumns: this.viewConfig.hiddenListColumns || [],
|
|
15676
15724
|
};
|
|
15677
15725
|
}
|
|
15678
15726
|
async getAppInitData() {
|
|
@@ -15698,7 +15746,7 @@ class TsEmbed {
|
|
|
15698
15746
|
* @returns queryParams
|
|
15699
15747
|
*/
|
|
15700
15748
|
getBaseQueryParams(queryParams = {}) {
|
|
15701
|
-
var _a, _b;
|
|
15749
|
+
var _a, _b, _c, _d;
|
|
15702
15750
|
let hostAppUrl = ((_a = window === null || window === void 0 ? void 0 : window.location) === null || _a === void 0 ? void 0 : _a.host) || '';
|
|
15703
15751
|
// The below check is needed because TS Cloud firewall, blocks
|
|
15704
15752
|
// localhost/127.0.0.1 in any url param.
|
|
@@ -15735,7 +15783,7 @@ class TsEmbed {
|
|
|
15735
15783
|
if (this.embedConfig.currencyFormat) {
|
|
15736
15784
|
queryParams[Param.CurrencyFormat] = this.embedConfig.currencyFormat;
|
|
15737
15785
|
}
|
|
15738
|
-
const { disabledActions, disabledActionReason, hiddenActions, visibleActions, hiddenTabs, visibleTabs, showAlerts, additionalFlags: additionalFlagsFromView, locale, customizations, contextMenuTrigger, linkOverride, insertInToSlide, disableRedirectionLinksInNewTab, overrideOrgId, } = this.viewConfig;
|
|
15786
|
+
const { disabledActions, disabledActionReason, hiddenActions, visibleActions, hiddenTabs, visibleTabs, showAlerts, additionalFlags: additionalFlagsFromView, locale, customizations, contextMenuTrigger, linkOverride, insertInToSlide, disableRedirectionLinksInNewTab, overrideOrgId, exposeTranslationIDs, primaryActions, } = this.viewConfig;
|
|
15739
15787
|
const { additionalFlags: additionalFlagsFromInit } = this.embedConfig;
|
|
15740
15788
|
const additionalFlags = {
|
|
15741
15789
|
...additionalFlagsFromInit,
|
|
@@ -15752,9 +15800,15 @@ class TsEmbed {
|
|
|
15752
15800
|
if (disabledActions === null || disabledActions === void 0 ? void 0 : disabledActions.length) {
|
|
15753
15801
|
queryParams[Param.DisableActions] = disabledActions;
|
|
15754
15802
|
}
|
|
15803
|
+
if (primaryActions === null || primaryActions === void 0 ? void 0 : primaryActions.length) {
|
|
15804
|
+
queryParams[Param.PrimaryActions] = primaryActions;
|
|
15805
|
+
}
|
|
15755
15806
|
if (disabledActionReason) {
|
|
15756
15807
|
queryParams[Param.DisableActionReason] = disabledActionReason;
|
|
15757
15808
|
}
|
|
15809
|
+
if (exposeTranslationIDs) {
|
|
15810
|
+
queryParams[Param.ExposeTranslationIDs] = exposeTranslationIDs;
|
|
15811
|
+
}
|
|
15758
15812
|
queryParams[Param.HideActions] = [...this.defaultHiddenActions, ...(hiddenActions !== null && hiddenActions !== void 0 ? hiddenActions : [])];
|
|
15759
15813
|
if (Array.isArray(visibleActions)) {
|
|
15760
15814
|
queryParams[Param.VisibleActions] = visibleActions;
|
|
@@ -15784,6 +15838,11 @@ class TsEmbed {
|
|
|
15784
15838
|
if (spriteUrl) {
|
|
15785
15839
|
queryParams[Param.IconSpriteUrl] = spriteUrl.replace('https://', '');
|
|
15786
15840
|
}
|
|
15841
|
+
const stringIDsUrl = ((_c = customizations === null || customizations === void 0 ? void 0 : customizations.content) === null || _c === void 0 ? void 0 : _c.stringIDsUrl)
|
|
15842
|
+
|| ((_d = embedCustomizations === null || embedCustomizations === void 0 ? void 0 : embedCustomizations.content) === null || _d === void 0 ? void 0 : _d.stringIDsUrl);
|
|
15843
|
+
if (stringIDsUrl) {
|
|
15844
|
+
queryParams[Param.StringIDsUrl] = stringIDsUrl;
|
|
15845
|
+
}
|
|
15787
15846
|
if (showAlerts !== undefined) {
|
|
15788
15847
|
queryParams[Param.ShowAlerts] = showAlerts;
|
|
15789
15848
|
}
|
|
@@ -17263,7 +17322,7 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
|
|
|
17263
17322
|
getEmbedParams() {
|
|
17264
17323
|
let params = {};
|
|
17265
17324
|
params = this.getBaseQueryParams(params);
|
|
17266
|
-
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, } = this.viewConfig;
|
|
17325
|
+
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, } = this.viewConfig;
|
|
17267
17326
|
const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
|
|
17268
17327
|
|| this.viewConfig.preventPinboardFilterRemoval;
|
|
17269
17328
|
if (fullHeight === true) {
|
|
@@ -17315,6 +17374,9 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
|
|
|
17315
17374
|
if (dataSourceId !== undefined) {
|
|
17316
17375
|
params[Param.DataSourceId] = dataSourceId;
|
|
17317
17376
|
}
|
|
17377
|
+
if (coverAndFilterOptionInPDF !== undefined) {
|
|
17378
|
+
params[Param.CoverAndFilterOptionInPDF] = coverAndFilterOptionInPDF;
|
|
17379
|
+
}
|
|
17318
17380
|
params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
|
|
17319
17381
|
params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
|
|
17320
17382
|
params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;
|
|
@@ -17576,7 +17638,7 @@ const componentFactory = (EmbedConstructor,
|
|
|
17576
17638
|
// not be destroyed when the component is unmounted.
|
|
17577
17639
|
isPreRenderedComponent = false) => React__default.forwardRef((props, forwardedRef) => {
|
|
17578
17640
|
const ref = React__default.useRef(null);
|
|
17579
|
-
const { className, ...embedProps } = props;
|
|
17641
|
+
const { className, style, ...embedProps } = props;
|
|
17580
17642
|
const { viewConfig, listeners } = getViewPropsAndListeners(embedProps);
|
|
17581
17643
|
const handleDestroy = (tsEmbed) => {
|
|
17582
17644
|
// do not destroy if it is a preRender component
|
|
@@ -17626,7 +17688,7 @@ isPreRenderedComponent = false) => React__default.forwardRef((props, forwardedRe
|
|
|
17626
17688
|
handleDestroy(tsEmbed);
|
|
17627
17689
|
};
|
|
17628
17690
|
}, [viewConfig, listeners]);
|
|
17629
|
-
return viewConfig.insertAsSibling ? (React__default.createElement("span", { "data-testid": "tsEmbed", ref: ref, style: { position: 'absolute' } })) : (React__default.createElement("div", { "data-testid": "tsEmbed", ref: ref, className: className }));
|
|
17691
|
+
return viewConfig.insertAsSibling ? (React__default.createElement("span", { "data-testid": "tsEmbed", ref: ref, style: { position: 'absolute' } })) : (React__default.createElement("div", { "data-testid": "tsEmbed", ref: ref, style: style, className: `ts-embed-container ${className}` }));
|
|
17630
17692
|
});
|
|
17631
17693
|
/**
|
|
17632
17694
|
* React component for Search Embed.
|
|
@@ -17854,4 +17916,4 @@ function useInit(config) {
|
|
|
17854
17916
|
return ref;
|
|
17855
17917
|
}
|
|
17856
17918
|
|
|
17857
|
-
export { Action, AppEmbed, ConversationEmbed, EmbedEvent, HomeLeftNavItem, HomepageModule, HostEvent, LiveboardEmbed, LogLevel, Page, PinboardEmbed, PreRenderedAppEmbed, PreRenderedConversationEmbed, PreRenderedLiveboardEmbed, PreRenderedPinboardEmbed, PreRenderedSageEmbed, PreRenderedSearchBarEmbed, PreRenderedSearchEmbed, RuntimeFilterOp, SageEmbed, SearchBarEmbed, SearchEmbed, getSessionInfo, useEmbedRef, useInit };
|
|
17919
|
+
export { Action, AppEmbed, ConversationEmbed, EmbedEvent, HomeLeftNavItem, HomepageModule, HostEvent, ListPageColumns, LiveboardEmbed, LogLevel, Page, PinboardEmbed, PreRenderedAppEmbed, PreRenderedConversationEmbed, PreRenderedLiveboardEmbed, PreRenderedPinboardEmbed, PreRenderedSageEmbed, PreRenderedSearchBarEmbed, PreRenderedSearchEmbed, RuntimeFilterOp, SageEmbed, SearchBarEmbed, SearchEmbed, getSessionInfo, useEmbedRef, useInit };
|
package/dist/tsembed-react.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @thoughtspot/visual-embed-sdk version 1.36.
|
|
1
|
+
/* @thoughtspot/visual-embed-sdk version 1.36.9-primary-actions */
|
|
2
2
|
(function (global, factory) {
|
|
3
3
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) :
|
|
4
4
|
typeof define === 'function' && define.amd ? define(['exports', 'react'], factory) :
|
|
@@ -814,6 +814,35 @@
|
|
|
814
814
|
*/
|
|
815
815
|
HomepageModule["Learning"] = "LEARNING";
|
|
816
816
|
})(exports.HomepageModule || (exports.HomepageModule = {}));
|
|
817
|
+
/**
|
|
818
|
+
* List page columns that can be hidden.
|
|
819
|
+
* **Note**: This option is applicable only in full app embedding.
|
|
820
|
+
* @version SDK: 1.38.0 | ThoughtSpot: 9.12.5.cl, 10.1.0.sw
|
|
821
|
+
*/
|
|
822
|
+
// eslint-disable-next-line no-shadow
|
|
823
|
+
exports.ListPageColumns = void 0;
|
|
824
|
+
(function (ListPageColumns) {
|
|
825
|
+
/**
|
|
826
|
+
* Favourite
|
|
827
|
+
*/
|
|
828
|
+
ListPageColumns["Favourite"] = "FAVOURITE";
|
|
829
|
+
/**
|
|
830
|
+
* Tags
|
|
831
|
+
*/
|
|
832
|
+
ListPageColumns["Tags"] = "TAGS";
|
|
833
|
+
/**
|
|
834
|
+
* Author
|
|
835
|
+
*/
|
|
836
|
+
ListPageColumns["Author"] = "AUTHOR";
|
|
837
|
+
/**
|
|
838
|
+
* Last viewed/Last modified
|
|
839
|
+
*/
|
|
840
|
+
ListPageColumns["DateSort"] = "DATE_SORT";
|
|
841
|
+
/**
|
|
842
|
+
* Share
|
|
843
|
+
*/
|
|
844
|
+
ListPageColumns["Share"] = "SHARE";
|
|
845
|
+
})(exports.ListPageColumns || (exports.ListPageColumns = {}));
|
|
817
846
|
/**
|
|
818
847
|
* Event types emitted by the embedded ThoughtSpot application.
|
|
819
848
|
*
|
|
@@ -1804,16 +1833,19 @@
|
|
|
1804
1833
|
/**
|
|
1805
1834
|
* Emits when a table visualization is rendered in
|
|
1806
1835
|
* the ThoughtSpot embedded app.
|
|
1836
|
+
*
|
|
1807
1837
|
* You can also use this event as a hook to trigger host events
|
|
1808
1838
|
* such as `HostEvent.TransformTableVizData` on the table visualization.
|
|
1809
1839
|
* The event payload contains the data used in the rendered table.
|
|
1810
1840
|
* You can extract the relevant data from the payload
|
|
1811
1841
|
* stored in `payload.data.data.columnDataLite`.
|
|
1842
|
+
*
|
|
1812
1843
|
* `columnDataLite` is a multidimensional array that contains
|
|
1813
1844
|
* data values for each column, which was used in the query to
|
|
1814
1845
|
* generate the table visualization. To find and modify specific cell data,
|
|
1815
1846
|
* you can either loop through the array or directly access a cell if
|
|
1816
1847
|
* you know its position and data index.
|
|
1848
|
+
*
|
|
1817
1849
|
* In the following code sample, the first cell in the first column
|
|
1818
1850
|
* (`columnDataLite[0].dataValue[0]`) is set to `new fob`.
|
|
1819
1851
|
* Note that any changes made to the data in the payload will only update the
|
|
@@ -1823,6 +1855,7 @@
|
|
|
1823
1855
|
* payload in the `columnDataLite` is passed on to
|
|
1824
1856
|
* `HostEvent.TransformTableVizData` and trigger an update to
|
|
1825
1857
|
* the table visualization.
|
|
1858
|
+
*
|
|
1826
1859
|
* If the Row-Level Security (RLS) rules are applied on the
|
|
1827
1860
|
* Worksheet or Model, exercise caution when changing column
|
|
1828
1861
|
* or table cell values to maintain data security.
|
|
@@ -1837,7 +1870,7 @@
|
|
|
1837
1870
|
* searchEmbed.trigger(HostEvent.TransformTableVizData, columnDataLite);
|
|
1838
1871
|
* })
|
|
1839
1872
|
* ```
|
|
1840
|
-
* @version SDK: 1.
|
|
1873
|
+
* @version SDK: 1.38.0 | ThoughtSpot: 10.8.0.cl
|
|
1841
1874
|
*/
|
|
1842
1875
|
EmbedEvent["TableVizRendered"] = "TableVizRendered";
|
|
1843
1876
|
/**
|
|
@@ -1850,7 +1883,7 @@
|
|
|
1850
1883
|
* console.log('payload', payload);
|
|
1851
1884
|
* })
|
|
1852
1885
|
*```
|
|
1853
|
-
* @version SDK : 1.
|
|
1886
|
+
* @version SDK : 1.38.0 | ThoughtSpot : 10.8.0.cl
|
|
1854
1887
|
*/
|
|
1855
1888
|
EmbedEvent["CreateLiveboard"] = "createLiveboard";
|
|
1856
1889
|
/**
|
|
@@ -2299,7 +2332,7 @@
|
|
|
2299
2332
|
* ```js
|
|
2300
2333
|
* liveboardEmbed.trigger(HostEvent.Remove)
|
|
2301
2334
|
* ```
|
|
2302
|
-
* @version SDK: 1.
|
|
2335
|
+
* @version SDK: 1.38.0 | ThoughtSpot: 10.8.0.cl, 10.10.0.sw
|
|
2303
2336
|
*/
|
|
2304
2337
|
HostEvent["Remove"] = "delete";
|
|
2305
2338
|
/**
|
|
@@ -2847,7 +2880,7 @@
|
|
|
2847
2880
|
* ```js
|
|
2848
2881
|
* liveboardEmbed.trigger(HostEvent.InfoSuccess, data);
|
|
2849
2882
|
*```
|
|
2850
|
-
* @version SDK: 1.36.0 |
|
|
2883
|
+
* @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
|
|
2851
2884
|
*/
|
|
2852
2885
|
HostEvent["InfoSuccess"] = "InfoSuccess";
|
|
2853
2886
|
/**
|
|
@@ -2894,7 +2927,7 @@
|
|
|
2894
2927
|
* searchEmbed.trigger(HostEvent.TransformTableVizData, columnDataLite);
|
|
2895
2928
|
* })
|
|
2896
2929
|
* ```
|
|
2897
|
-
* @version SDK: 1.
|
|
2930
|
+
* @version SDK: 1.38.0 | ThoughtSpot: 10.8.0.cl
|
|
2898
2931
|
*/
|
|
2899
2932
|
HostEvent["TransformTableVizData"] = "TransformTableVizData";
|
|
2900
2933
|
})(exports.HostEvent || (exports.HostEvent = {}));
|
|
@@ -2949,6 +2982,7 @@
|
|
|
2949
2982
|
Param["livedBoardEmbed"] = "isLiveboardEmbed";
|
|
2950
2983
|
Param["searchEmbed"] = "isSearchEmbed";
|
|
2951
2984
|
Param["vizEmbed"] = "isVizEmbed";
|
|
2985
|
+
Param["StringIDsUrl"] = "overrideStringIDsUrl";
|
|
2952
2986
|
Param["Version"] = "sdkVersion";
|
|
2953
2987
|
Param["ViewPortHeight"] = "viewPortHeight";
|
|
2954
2988
|
Param["ViewPortWidth"] = "viewPortWidth";
|
|
@@ -3004,6 +3038,7 @@
|
|
|
3004
3038
|
Param["HideSageAnswerHeader"] = "hideSageAnswerHeader";
|
|
3005
3039
|
Param["HideSearchBar"] = "hideSearchBar";
|
|
3006
3040
|
Param["ClientLogLevel"] = "clientLogLevel";
|
|
3041
|
+
Param["ExposeTranslationIDs"] = "exposeTranslationIDs";
|
|
3007
3042
|
Param["OverrideNativeConsole"] = "overrideConsoleLogs";
|
|
3008
3043
|
Param["enableAskSage"] = "enableAskSage";
|
|
3009
3044
|
Param["CollapseSearchBarInitially"] = "collapseSearchBarInitially";
|
|
@@ -3030,6 +3065,8 @@
|
|
|
3030
3065
|
Param["DataSourceId"] = "dataSourceId";
|
|
3031
3066
|
Param["preAuthCache"] = "preAuthCache";
|
|
3032
3067
|
Param["ShowSpotterLimitations"] = "showSpotterLimitations";
|
|
3068
|
+
Param["CoverAndFilterOptionInPDF"] = "coverAndFilterOptionInPDF";
|
|
3069
|
+
Param["PrimaryActions"] = "primaryActions";
|
|
3033
3070
|
})(Param || (Param = {}));
|
|
3034
3071
|
/**
|
|
3035
3072
|
* ThoughtSpot application pages include actions and menu commands
|
|
@@ -3196,7 +3233,7 @@
|
|
|
3196
3233
|
* The **Collapse data panel** icon on the Search page.
|
|
3197
3234
|
* Collapses the data panel view.
|
|
3198
3235
|
*
|
|
3199
|
-
* @version: SDK: 1.34.0 | ThoughtSpot Cloud: 10.3.0.cl
|
|
3236
|
+
* @version: SDK: 1.34.0 | ThoughtSpot Cloud: 10.3.0.cl
|
|
3200
3237
|
*
|
|
3201
3238
|
* @example
|
|
3202
3239
|
* ```js
|
|
@@ -4241,6 +4278,16 @@
|
|
|
4241
4278
|
* @version SDK: 1.38.0 | ThoughtSpot Cloud: 10.8.0.cl
|
|
4242
4279
|
*/
|
|
4243
4280
|
Action["ColumnRename"] = "columnRename";
|
|
4281
|
+
/**
|
|
4282
|
+
* Action ID for hide checkboxes for include or exclude
|
|
4283
|
+
* cover and filter pages in the Liveboard PDF
|
|
4284
|
+
* @example
|
|
4285
|
+
* ```js
|
|
4286
|
+
* hiddenAction: [Action.CoverAndFilterOptionInPDF]
|
|
4287
|
+
* ```
|
|
4288
|
+
* @version SDK: 1.38.0 | ThoughtSpot Cloud: 10.8.0.cl
|
|
4289
|
+
*/
|
|
4290
|
+
Action["CoverAndFilterOptionInPDF"] = "coverAndFilterOptionInPDF";
|
|
4244
4291
|
})(exports.Action || (exports.Action = {}));
|
|
4245
4292
|
var PrefetchFeatures;
|
|
4246
4293
|
(function (PrefetchFeatures) {
|
|
@@ -4250,8 +4297,8 @@
|
|
|
4250
4297
|
PrefetchFeatures["VizEmbed"] = "VizEmbed";
|
|
4251
4298
|
})(PrefetchFeatures || (PrefetchFeatures = {}));
|
|
4252
4299
|
/**
|
|
4253
|
-
* Enum for options to change context trigger
|
|
4254
|
-
* BOTH_CLICKS option is
|
|
4300
|
+
* Enum for options to change context trigger.
|
|
4301
|
+
* The `BOTH_CLICKS` option is available from 10.8.0.cl.
|
|
4255
4302
|
*/
|
|
4256
4303
|
var ContextMenuTriggerOptions;
|
|
4257
4304
|
(function (ContextMenuTriggerOptions) {
|
|
@@ -15221,7 +15268,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
15221
15268
|
return e;
|
|
15222
15269
|
}
|
|
15223
15270
|
|
|
15224
|
-
var name="@thoughtspot/visual-embed-sdk";var version$1="1.36.
|
|
15271
|
+
var name="@thoughtspot/visual-embed-sdk";var version$1="1.36.9-primary-actions";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":"^8.2.6","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^22.2.3","@types/lodash":"^4.17.0","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^8.28.0","@typescript-eslint/parser":"^8.28.0",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1",coveralls:"^3.1.0",crypto:"^1.0.1","current-git-branch":"^1.1.0","dts-bundle":"^0.7.3",eslint:"^9.23.0","eslint-config-airbnb-base":"^15.0.0","eslint-config-prettier":"^10.1.1","eslint-import-resolver-typescript":"^4.2.5","eslint-plugin-comment-length":"2.2.1","eslint-plugin-import":"^2.31.0","eslint-plugin-jsdoc":"^50.6.9","eslint-plugin-prettier":"^5.2.5","eslint-plugin-react":"^7.37.5","eslint-plugin-react-hooks":"^5.2.0","fs-extra":"^10.0.0","gh-pages":"6.3.0",globals:"^16.0.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^1.1.1",jest:"^26.6.3","jest-fetch-mock":"^3.0.3",jsdom:"^17.0.0",prettier:"2.1.2",react:"^16.14.0","react-dom":"^16.14.0","react-resizable":"^1.11.0","react-resize-detector":"^6.6.0","react-test-renderer":"^17.0.2","react-use-flexsearch":"^0.1.1",rollup:"4.24.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^26.5.5","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","typescript-eslint":"^8.29.1","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^5.3.4"};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:"31 kB"}],scripts:scripts,peerDependencies:peerDependencies,dependencies:dependencies,devDependencies:devDependencies,author:author,email:email,license:license,directories:directories,repository:repository,publishConfig:publishConfig,keywords:keywords,bugs:bugs,homepage:homepage,globals:globals};
|
|
15225
15272
|
|
|
15226
15273
|
/**
|
|
15227
15274
|
* Reloads the ThoughtSpot iframe.
|
|
@@ -15695,6 +15742,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
15695
15742
|
? (_b = this.viewConfig) === null || _b === void 0 ? void 0 : _b.hiddenHomeLeftNavItems
|
|
15696
15743
|
: [],
|
|
15697
15744
|
customVariablesForThirdPartyTools: this.embedConfig.customVariablesForThirdPartyTools || {},
|
|
15745
|
+
hiddenListColumns: this.viewConfig.hiddenListColumns || [],
|
|
15698
15746
|
};
|
|
15699
15747
|
}
|
|
15700
15748
|
async getAppInitData() {
|
|
@@ -15720,7 +15768,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
15720
15768
|
* @returns queryParams
|
|
15721
15769
|
*/
|
|
15722
15770
|
getBaseQueryParams(queryParams = {}) {
|
|
15723
|
-
var _a, _b;
|
|
15771
|
+
var _a, _b, _c, _d;
|
|
15724
15772
|
let hostAppUrl = ((_a = window === null || window === void 0 ? void 0 : window.location) === null || _a === void 0 ? void 0 : _a.host) || '';
|
|
15725
15773
|
// The below check is needed because TS Cloud firewall, blocks
|
|
15726
15774
|
// localhost/127.0.0.1 in any url param.
|
|
@@ -15757,7 +15805,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
15757
15805
|
if (this.embedConfig.currencyFormat) {
|
|
15758
15806
|
queryParams[Param.CurrencyFormat] = this.embedConfig.currencyFormat;
|
|
15759
15807
|
}
|
|
15760
|
-
const { disabledActions, disabledActionReason, hiddenActions, visibleActions, hiddenTabs, visibleTabs, showAlerts, additionalFlags: additionalFlagsFromView, locale, customizations, contextMenuTrigger, linkOverride, insertInToSlide, disableRedirectionLinksInNewTab, overrideOrgId, } = this.viewConfig;
|
|
15808
|
+
const { disabledActions, disabledActionReason, hiddenActions, visibleActions, hiddenTabs, visibleTabs, showAlerts, additionalFlags: additionalFlagsFromView, locale, customizations, contextMenuTrigger, linkOverride, insertInToSlide, disableRedirectionLinksInNewTab, overrideOrgId, exposeTranslationIDs, primaryActions, } = this.viewConfig;
|
|
15761
15809
|
const { additionalFlags: additionalFlagsFromInit } = this.embedConfig;
|
|
15762
15810
|
const additionalFlags = {
|
|
15763
15811
|
...additionalFlagsFromInit,
|
|
@@ -15774,9 +15822,15 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
15774
15822
|
if (disabledActions === null || disabledActions === void 0 ? void 0 : disabledActions.length) {
|
|
15775
15823
|
queryParams[Param.DisableActions] = disabledActions;
|
|
15776
15824
|
}
|
|
15825
|
+
if (primaryActions === null || primaryActions === void 0 ? void 0 : primaryActions.length) {
|
|
15826
|
+
queryParams[Param.PrimaryActions] = primaryActions;
|
|
15827
|
+
}
|
|
15777
15828
|
if (disabledActionReason) {
|
|
15778
15829
|
queryParams[Param.DisableActionReason] = disabledActionReason;
|
|
15779
15830
|
}
|
|
15831
|
+
if (exposeTranslationIDs) {
|
|
15832
|
+
queryParams[Param.ExposeTranslationIDs] = exposeTranslationIDs;
|
|
15833
|
+
}
|
|
15780
15834
|
queryParams[Param.HideActions] = [...this.defaultHiddenActions, ...(hiddenActions !== null && hiddenActions !== void 0 ? hiddenActions : [])];
|
|
15781
15835
|
if (Array.isArray(visibleActions)) {
|
|
15782
15836
|
queryParams[Param.VisibleActions] = visibleActions;
|
|
@@ -15806,6 +15860,11 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
15806
15860
|
if (spriteUrl) {
|
|
15807
15861
|
queryParams[Param.IconSpriteUrl] = spriteUrl.replace('https://', '');
|
|
15808
15862
|
}
|
|
15863
|
+
const stringIDsUrl = ((_c = customizations === null || customizations === void 0 ? void 0 : customizations.content) === null || _c === void 0 ? void 0 : _c.stringIDsUrl)
|
|
15864
|
+
|| ((_d = embedCustomizations === null || embedCustomizations === void 0 ? void 0 : embedCustomizations.content) === null || _d === void 0 ? void 0 : _d.stringIDsUrl);
|
|
15865
|
+
if (stringIDsUrl) {
|
|
15866
|
+
queryParams[Param.StringIDsUrl] = stringIDsUrl;
|
|
15867
|
+
}
|
|
15809
15868
|
if (showAlerts !== undefined) {
|
|
15810
15869
|
queryParams[Param.ShowAlerts] = showAlerts;
|
|
15811
15870
|
}
|
|
@@ -17285,7 +17344,7 @@ query GetEurekaVizSnapshots(
|
|
|
17285
17344
|
getEmbedParams() {
|
|
17286
17345
|
let params = {};
|
|
17287
17346
|
params = this.getBaseQueryParams(params);
|
|
17288
|
-
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, } = this.viewConfig;
|
|
17347
|
+
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, } = this.viewConfig;
|
|
17289
17348
|
const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
|
|
17290
17349
|
|| this.viewConfig.preventPinboardFilterRemoval;
|
|
17291
17350
|
if (fullHeight === true) {
|
|
@@ -17337,6 +17396,9 @@ query GetEurekaVizSnapshots(
|
|
|
17337
17396
|
if (dataSourceId !== undefined) {
|
|
17338
17397
|
params[Param.DataSourceId] = dataSourceId;
|
|
17339
17398
|
}
|
|
17399
|
+
if (coverAndFilterOptionInPDF !== undefined) {
|
|
17400
|
+
params[Param.CoverAndFilterOptionInPDF] = coverAndFilterOptionInPDF;
|
|
17401
|
+
}
|
|
17340
17402
|
params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
|
|
17341
17403
|
params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
|
|
17342
17404
|
params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;
|
|
@@ -17598,7 +17660,7 @@ query GetEurekaVizSnapshots(
|
|
|
17598
17660
|
// not be destroyed when the component is unmounted.
|
|
17599
17661
|
isPreRenderedComponent = false) => React.forwardRef((props, forwardedRef) => {
|
|
17600
17662
|
const ref = React.useRef(null);
|
|
17601
|
-
const { className, ...embedProps } = props;
|
|
17663
|
+
const { className, style, ...embedProps } = props;
|
|
17602
17664
|
const { viewConfig, listeners } = getViewPropsAndListeners(embedProps);
|
|
17603
17665
|
const handleDestroy = (tsEmbed) => {
|
|
17604
17666
|
// do not destroy if it is a preRender component
|
|
@@ -17648,7 +17710,7 @@ query GetEurekaVizSnapshots(
|
|
|
17648
17710
|
handleDestroy(tsEmbed);
|
|
17649
17711
|
};
|
|
17650
17712
|
}, [viewConfig, listeners]);
|
|
17651
|
-
return viewConfig.insertAsSibling ? (React.createElement("span", { "data-testid": "tsEmbed", ref: ref, style: { position: 'absolute' } })) : (React.createElement("div", { "data-testid": "tsEmbed", ref: ref, className: className }));
|
|
17713
|
+
return viewConfig.insertAsSibling ? (React.createElement("span", { "data-testid": "tsEmbed", ref: ref, style: { position: 'absolute' } })) : (React.createElement("div", { "data-testid": "tsEmbed", ref: ref, style: style, className: `ts-embed-container ${className}` }));
|
|
17652
17714
|
});
|
|
17653
17715
|
/**
|
|
17654
17716
|
* React component for Search Embed.
|