@thoughtspot/visual-embed-sdk 1.36.9 → 1.37.0-temp-nav
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/package.json +1 -1
- package/cjs/src/auth.d.ts +2 -1
- package/cjs/src/auth.d.ts.map +1 -1
- package/cjs/src/auth.js +1 -0
- package/cjs/src/auth.js.map +1 -1
- package/cjs/src/embed/app.d.ts +76 -0
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +18 -1
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/app.spec.js +50 -0
- package/cjs/src/embed/app.spec.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts +2 -2
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +4 -1
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/index.d.ts.map +1 -1
- package/cjs/src/index.js +1 -0
- 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.map +1 -1
- package/cjs/src/react/index.js +1 -0
- package/cjs/src/react/index.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 +56 -13
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +39 -9
- package/cjs/src/types.js.map +1 -1
- package/cjs/src/utils/graphql/answerService/answerService.d.ts +35 -15
- package/cjs/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
- package/cjs/src/utils/graphql/answerService/answerService.js +35 -15
- package/cjs/src/utils/graphql/answerService/answerService.js.map +1 -1
- package/cjs/src/utils/processData.js +6 -4
- package/cjs/src/utils/processData.js.map +1 -1
- package/dist/index-Cj4BVGHL.js +7371 -0
- package/dist/{index-Dg18PU5Z.js → index-Fhk1V_Gw.js} +1 -0
- package/dist/src/auth.d.ts +2 -1
- package/dist/src/auth.d.ts.map +1 -1
- package/dist/src/embed/app.d.ts +76 -0
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts +2 -2
- package/dist/src/embed/ts-embed.d.ts.map +1 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/react/index.d.ts.map +1 -1
- package/dist/src/types.d.ts +56 -13
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/graphql/answerService/answerService.d.ts +35 -15
- package/dist/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +107 -33
- package/dist/tsembed-react.js +106 -32
- package/dist/tsembed.es.js +107 -33
- package/dist/tsembed.js +106 -32
- package/dist/visual-embed-sdk-react-full.d.ts +171 -31
- package/dist/visual-embed-sdk-react.d.ts +171 -31
- package/dist/visual-embed-sdk.d.ts +171 -31
- package/lib/package.json +1 -1
- package/lib/src/auth.d.ts +2 -1
- package/lib/src/auth.d.ts.map +1 -1
- package/lib/src/auth.js +1 -0
- package/lib/src/auth.js.map +1 -1
- package/lib/src/embed/app.d.ts +76 -0
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +18 -1
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/app.spec.js +50 -0
- package/lib/src/embed/app.spec.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts +2 -2
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +4 -1
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/index.d.ts.map +1 -1
- package/lib/src/index.js +1 -0
- package/lib/src/index.js.map +1 -1
- package/lib/src/react/index.d.ts.map +1 -1
- package/lib/src/react/index.js +1 -0
- package/lib/src/react/index.js.map +1 -1
- package/lib/src/types.d.ts +56 -13
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +39 -9
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils/graphql/answerService/answerService.d.ts +35 -15
- package/lib/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
- package/lib/src/utils/graphql/answerService/answerService.js +35 -15
- package/lib/src/utils/graphql/answerService/answerService.js.map +1 -1
- package/lib/src/utils/processData.js +6 -4
- package/lib/src/utils/processData.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +171 -31
- package/package.json +1 -1
- package/src/auth.ts +2 -1
- package/src/embed/app.spec.ts +70 -0
- package/src/embed/app.ts +104 -0
- package/src/embed/liveboard.ts +2 -2
- package/src/embed/ts-embed.ts +4 -0
- package/src/index.ts +2 -0
- package/src/react/index.tsx +2 -0
- package/src/types.ts +55 -12
- package/src/utils/graphql/answerService/answerService.ts +35 -15
- package/src/utils/processData.ts +6 -6
package/dist/tsembed-react.es.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
/* @thoughtspot/visual-embed-sdk version 1.
|
|
1
|
+
/* @thoughtspot/visual-embed-sdk version 1.37.0-temp-nav */
|
|
2
|
+
'use client';
|
|
2
3
|
import * as React from 'react';
|
|
3
4
|
import React__default, { useRef } from 'react';
|
|
4
5
|
|
|
@@ -689,6 +690,18 @@ var HomeLeftNavItem;
|
|
|
689
690
|
* @version SDK: 1.34.0| ThoughtSpot: 10.3.0.cl
|
|
690
691
|
*/
|
|
691
692
|
HomeLeftNavItem["LiveboardSchedules"] = "liveboard-schedules";
|
|
693
|
+
/**
|
|
694
|
+
* Create new options in the insights left navigation,
|
|
695
|
+
* available when new navigation V3 is enabled.
|
|
696
|
+
* @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
|
|
697
|
+
*/
|
|
698
|
+
HomeLeftNavItem["Create"] = "create";
|
|
699
|
+
/**
|
|
700
|
+
* Spotter option in the insights left navigation,
|
|
701
|
+
* available when new navigation V3 is enabled.
|
|
702
|
+
* @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
|
|
703
|
+
*/
|
|
704
|
+
HomeLeftNavItem["Spotter"] = "spotter";
|
|
692
705
|
})(HomeLeftNavItem || (HomeLeftNavItem = {}));
|
|
693
706
|
/**
|
|
694
707
|
* A map of the supported runtime filter operations
|
|
@@ -794,8 +807,8 @@ var HomepageModule;
|
|
|
794
807
|
})(HomepageModule || (HomepageModule = {}));
|
|
795
808
|
/**
|
|
796
809
|
* List page columns that can be hidden.
|
|
797
|
-
* **Note**: This option is applicable
|
|
798
|
-
* @version SDK: 1.38.0 | ThoughtSpot:
|
|
810
|
+
* **Note**: This option is applicable to full app embedding only.
|
|
811
|
+
* @version SDK: 1.38.0 | ThoughtSpot: 10.9.0.cl
|
|
799
812
|
*/
|
|
800
813
|
// eslint-disable-next-line no-shadow
|
|
801
814
|
var ListPageColumns;
|
|
@@ -1848,7 +1861,7 @@ var EmbedEvent;
|
|
|
1848
1861
|
* searchEmbed.trigger(HostEvent.TransformTableVizData, columnDataLite);
|
|
1849
1862
|
* })
|
|
1850
1863
|
* ```
|
|
1851
|
-
* @version SDK: 1.
|
|
1864
|
+
* @version SDK: 1.37.0 | ThoughtSpot: 10.8.0.cl
|
|
1852
1865
|
*/
|
|
1853
1866
|
EmbedEvent["TableVizRendered"] = "TableVizRendered";
|
|
1854
1867
|
/**
|
|
@@ -1861,12 +1874,12 @@ var EmbedEvent;
|
|
|
1861
1874
|
* console.log('payload', payload);
|
|
1862
1875
|
* })
|
|
1863
1876
|
*```
|
|
1864
|
-
* @version SDK : 1.
|
|
1877
|
+
* @version SDK : 1.37.0 | ThoughtSpot : 10.8.0.cl
|
|
1865
1878
|
*/
|
|
1866
1879
|
EmbedEvent["CreateLiveboard"] = "createLiveboard";
|
|
1867
1880
|
/**
|
|
1868
1881
|
* Emitted when a user creates a Model.
|
|
1869
|
-
* @version SDK : 1.
|
|
1882
|
+
* @version SDK : 1.37.0 | ThoughtSpot : 10.8.0.cl
|
|
1870
1883
|
*/
|
|
1871
1884
|
EmbedEvent["CreateModel"] = "createModel";
|
|
1872
1885
|
})(EmbedEvent || (EmbedEvent = {}));
|
|
@@ -2310,7 +2323,7 @@ var HostEvent;
|
|
|
2310
2323
|
* ```js
|
|
2311
2324
|
* liveboardEmbed.trigger(HostEvent.Remove)
|
|
2312
2325
|
* ```
|
|
2313
|
-
* @version SDK: 1.
|
|
2326
|
+
* @version SDK: 1.37.0 | ThoughtSpot: 10.8.0.cl, 10.10.0.sw
|
|
2314
2327
|
*/
|
|
2315
2328
|
HostEvent["Remove"] = "delete";
|
|
2316
2329
|
/**
|
|
@@ -2771,8 +2784,17 @@ var HostEvent;
|
|
|
2771
2784
|
/**
|
|
2772
2785
|
* Get the Answer session for a Search or
|
|
2773
2786
|
* Liveboard visualization.
|
|
2787
|
+
*
|
|
2788
|
+
* Note: This event is not typically used directly. Instead, use the
|
|
2789
|
+
* `getAnswerService()` method on the embed instance to get an AnswerService
|
|
2790
|
+
* object that provides a more convenient interface for working with answers.
|
|
2791
|
+
*
|
|
2774
2792
|
* @example
|
|
2775
2793
|
* ```js
|
|
2794
|
+
* // Preferred way to get an AnswerService
|
|
2795
|
+
* const service = await embed.getAnswerService();
|
|
2796
|
+
*
|
|
2797
|
+
* // Alternative direct usage (not recommended)
|
|
2776
2798
|
* const {session} = await embed.trigger(
|
|
2777
2799
|
* HostEvent.GetAnswerSession, {
|
|
2778
2800
|
* vizId: '123', // For Liveboard Visualization.
|
|
@@ -2780,6 +2802,10 @@ var HostEvent;
|
|
|
2780
2802
|
* ```
|
|
2781
2803
|
* @example
|
|
2782
2804
|
* ```js
|
|
2805
|
+
* // Preferred way to get an AnswerService
|
|
2806
|
+
* const service = await embed.getAnswerService();
|
|
2807
|
+
*
|
|
2808
|
+
* // Alternative direct usage (not recommended)
|
|
2783
2809
|
* const {session} = await embed.trigger( HostEvent.GetAnswerSession )
|
|
2784
2810
|
* ```
|
|
2785
2811
|
* @version SDK: 1.26.0 | ThoughtSpot: 9.10.0.cl, 10.1.0.sw
|
|
@@ -2905,7 +2931,7 @@ var HostEvent;
|
|
|
2905
2931
|
* searchEmbed.trigger(HostEvent.TransformTableVizData, columnDataLite);
|
|
2906
2932
|
* })
|
|
2907
2933
|
* ```
|
|
2908
|
-
* @version SDK: 1.
|
|
2934
|
+
* @version SDK: 1.37.0 | ThoughtSpot: 10.8.0.cl
|
|
2909
2935
|
*/
|
|
2910
2936
|
HostEvent["TransformTableVizData"] = "TransformTableVizData";
|
|
2911
2937
|
})(HostEvent || (HostEvent = {}));
|
|
@@ -2988,6 +3014,10 @@ var Param;
|
|
|
2988
3014
|
Param["ShowInsertToSlide"] = "insertInToSlide";
|
|
2989
3015
|
Param["PrimaryNavHidden"] = "primaryNavHidden";
|
|
2990
3016
|
Param["HideProfleAndHelp"] = "profileAndHelpInNavBarHidden";
|
|
3017
|
+
Param["NavigationVersion"] = "navigationVersion";
|
|
3018
|
+
Param["HideHamburger"] = "hideHamburger";
|
|
3019
|
+
Param["HideObjectSearch"] = "hideObjectSearch";
|
|
3020
|
+
Param["HideNotification"] = "hideNotification";
|
|
2991
3021
|
Param["HideApplicationSwitcher"] = "applicationSwitcherHidden";
|
|
2992
3022
|
Param["HideOrgSwitcher"] = "orgSwitcherHidden";
|
|
2993
3023
|
Param["IsSageEmbed"] = "isSageEmbed";
|
|
@@ -3044,6 +3074,7 @@ var Param;
|
|
|
3044
3074
|
Param["preAuthCache"] = "preAuthCache";
|
|
3045
3075
|
Param["ShowSpotterLimitations"] = "showSpotterLimitations";
|
|
3046
3076
|
Param["CoverAndFilterOptionInPDF"] = "coverAndFilterOptionInPDF";
|
|
3077
|
+
Param["PrimaryAction"] = "primaryAction";
|
|
3047
3078
|
})(Param || (Param = {}));
|
|
3048
3079
|
/**
|
|
3049
3080
|
* ThoughtSpot application pages include actions and menu commands
|
|
@@ -4252,7 +4283,7 @@ var Action;
|
|
|
4252
4283
|
* ```js
|
|
4253
4284
|
* hiddenAction: [Action.ColumnRename]
|
|
4254
4285
|
* ```
|
|
4255
|
-
* @version SDK: 1.
|
|
4286
|
+
* @version SDK: 1.37.0 | ThoughtSpot Cloud: 10.8.0.cl
|
|
4256
4287
|
*/
|
|
4257
4288
|
Action["ColumnRename"] = "columnRename";
|
|
4258
4289
|
/**
|
|
@@ -4262,7 +4293,7 @@ var Action;
|
|
|
4262
4293
|
* ```js
|
|
4263
4294
|
* hiddenAction: [Action.CoverAndFilterOptionInPDF]
|
|
4264
4295
|
* ```
|
|
4265
|
-
* @version SDK: 1.
|
|
4296
|
+
* @version SDK: 1.37.0 | ThoughtSpot Cloud: 10.8.0.cl
|
|
4266
4297
|
*/
|
|
4267
4298
|
Action["CoverAndFilterOptionInPDF"] = "coverAndFilterOptionInPDF";
|
|
4268
4299
|
})(Action || (Action = {}));
|
|
@@ -7281,29 +7312,49 @@ var OperationType;
|
|
|
7281
7312
|
OperationType["GetTableWithHeadlineData"] = "GetTableWithHeadlineData";
|
|
7282
7313
|
})(OperationType || (OperationType = {}));
|
|
7283
7314
|
/**
|
|
7284
|
-
*
|
|
7285
|
-
*
|
|
7286
|
-
*
|
|
7287
|
-
*
|
|
7315
|
+
* AnswerService provides a simple way to work with ThoughtSpot Answers.
|
|
7316
|
+
*
|
|
7317
|
+
* This service allows you to interact with ThoughtSpot Answers programmatically,
|
|
7318
|
+
* making it easy to customize visualizations, filter data, and extract insights
|
|
7319
|
+
* directly from your application.
|
|
7320
|
+
*
|
|
7321
|
+
* You can use this service to:
|
|
7322
|
+
* - Add or remove columns from Answers (`addColumns`, `removeColumns`, `addColumnsByName`)
|
|
7323
|
+
* - Apply filters to Answers (`addFilter`)
|
|
7324
|
+
* - Get data from Answers in different formats (JSON, CSV, PNG) (`fetchData`, `fetchCSVBlob`, `fetchPNGBlob`)
|
|
7325
|
+
* - Get data for specific points in visualizations (`getUnderlyingDataForPoint`)
|
|
7326
|
+
* - Run custom queries (`executeQuery`)
|
|
7327
|
+
* - Add visualizations to liveboards (`addDisplayedVizToLiveboard`)
|
|
7328
|
+
*
|
|
7288
7329
|
* @example
|
|
7289
7330
|
* ```js
|
|
7290
|
-
*
|
|
7291
|
-
*
|
|
7292
|
-
*
|
|
7293
|
-
*
|
|
7294
|
-
*
|
|
7295
|
-
*
|
|
7331
|
+
* // Get the answer service
|
|
7332
|
+
* embed.on(EmbedEvent.Data, async (e) => {
|
|
7333
|
+
* const service = await embed.getAnswerService();
|
|
7334
|
+
*
|
|
7335
|
+
* // Add columns to the answer
|
|
7336
|
+
* await service.addColumnsByName(["Sales", "Region"]);
|
|
7337
|
+
*
|
|
7338
|
+
* // Get the data
|
|
7339
|
+
* const data = await service.fetchData();
|
|
7340
|
+
* console.log(data);
|
|
7341
|
+
* });
|
|
7296
7342
|
* ```
|
|
7343
|
+
*
|
|
7297
7344
|
* @example
|
|
7298
7345
|
* ```js
|
|
7299
|
-
*
|
|
7300
|
-
*
|
|
7301
|
-
* await
|
|
7302
|
-
*
|
|
7346
|
+
* // Get data for a point in a visualization
|
|
7347
|
+
* embed.on(EmbedEvent.CustomAction, async (e) => {
|
|
7348
|
+
* const underlying = await e.answerService.getUnderlyingDataForPoint([
|
|
7349
|
+
* 'Product Name',
|
|
7350
|
+
* 'Sales Amount'
|
|
7303
7351
|
* ]);
|
|
7304
|
-
*
|
|
7352
|
+
*
|
|
7353
|
+
* const data = await underlying.fetchData(0, 100);
|
|
7354
|
+
* console.log(data);
|
|
7305
7355
|
* });
|
|
7306
7356
|
* ```
|
|
7357
|
+
*
|
|
7307
7358
|
* @version SDK: 1.25.0| ThoughtSpot: 9.10.0.cl
|
|
7308
7359
|
* @group Events
|
|
7309
7360
|
*/
|
|
@@ -7555,7 +7606,7 @@ class AnswerService {
|
|
|
7555
7606
|
async getTML() {
|
|
7556
7607
|
const { object } = await this.executeQuery(getAnswerTML, {});
|
|
7557
7608
|
const edoc = object[0].edoc;
|
|
7558
|
-
const YAML = await import('./index-
|
|
7609
|
+
const YAML = await import('./index-Cj4BVGHL.js');
|
|
7559
7610
|
const parsedDoc = YAML.parse(edoc);
|
|
7560
7611
|
return {
|
|
7561
7612
|
answer: {
|
|
@@ -14566,6 +14617,7 @@ var AuthFailureType;
|
|
|
14566
14617
|
AuthFailureType["EXPIRY"] = "EXPIRY";
|
|
14567
14618
|
AuthFailureType["OTHER"] = "OTHER";
|
|
14568
14619
|
AuthFailureType["IDLE_SESSION_TIMEOUT"] = "IDLE_SESSION_TIMEOUT";
|
|
14620
|
+
AuthFailureType["UNAUTHENTICATED_FAILURE"] = "UNAUTHENTICATED_FAILURE";
|
|
14569
14621
|
})(AuthFailureType || (AuthFailureType = {}));
|
|
14570
14622
|
/**
|
|
14571
14623
|
* Enum for auth status emitted by the emitter returned from {@link init}.
|
|
@@ -15192,15 +15244,17 @@ function processNoCookieAccess(e, containerEl) {
|
|
|
15192
15244
|
* @param containerEl
|
|
15193
15245
|
*/
|
|
15194
15246
|
function processAuthFailure(e, containerEl) {
|
|
15247
|
+
var _a;
|
|
15195
15248
|
const { loginFailedMessage, authType, disableLoginFailurePage, autoLogin, } = getEmbedConfig();
|
|
15196
|
-
|
|
15197
|
-
|
|
15198
|
-
|
|
15249
|
+
const isEmbeddedSSO = authType === AuthType.EmbeddedSSO;
|
|
15250
|
+
const isTrustedAuth = authType === AuthType.TrustedAuthToken || authType === AuthType.TrustedAuthTokenCookieless;
|
|
15251
|
+
const isEmbeddedSSOInfoFailure = isEmbeddedSSO && ((_a = e === null || e === void 0 ? void 0 : e.data) === null || _a === void 0 ? void 0 : _a.type) === AuthFailureType.UNAUTHENTICATED_FAILURE;
|
|
15252
|
+
if (autoLogin && isTrustedAuth) {
|
|
15199
15253
|
// eslint-disable-next-line no-param-reassign
|
|
15200
15254
|
containerEl.innerHTML = loginFailedMessage;
|
|
15201
15255
|
notifyAuthFailure(AuthFailureType.IDLE_SESSION_TIMEOUT);
|
|
15202
15256
|
}
|
|
15203
|
-
else if (authType !== AuthType.None && !disableLoginFailurePage) {
|
|
15257
|
+
else if (authType !== AuthType.None && !disableLoginFailurePage && !isEmbeddedSSOInfoFailure) {
|
|
15204
15258
|
// eslint-disable-next-line no-param-reassign
|
|
15205
15259
|
containerEl.innerHTML = loginFailedMessage;
|
|
15206
15260
|
notifyAuthFailure(AuthFailureType.OTHER);
|
|
@@ -15245,7 +15299,7 @@ function processEventData(type, e, thoughtSpotHost, containerEl) {
|
|
|
15245
15299
|
return e;
|
|
15246
15300
|
}
|
|
15247
15301
|
|
|
15248
|
-
var name="@thoughtspot/visual-embed-sdk";var version$1="1.
|
|
15302
|
+
var name="@thoughtspot/visual-embed-sdk";var version$1="1.37.0-temp-nav";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};
|
|
15249
15303
|
|
|
15250
15304
|
/**
|
|
15251
15305
|
* Reloads the ThoughtSpot iframe.
|
|
@@ -15782,7 +15836,7 @@ class TsEmbed {
|
|
|
15782
15836
|
if (this.embedConfig.currencyFormat) {
|
|
15783
15837
|
queryParams[Param.CurrencyFormat] = this.embedConfig.currencyFormat;
|
|
15784
15838
|
}
|
|
15785
|
-
const { disabledActions, disabledActionReason, hiddenActions, visibleActions, hiddenTabs, visibleTabs, showAlerts, additionalFlags: additionalFlagsFromView, locale, customizations, contextMenuTrigger, linkOverride, insertInToSlide, disableRedirectionLinksInNewTab, overrideOrgId, exposeTranslationIDs, } = this.viewConfig;
|
|
15839
|
+
const { disabledActions, disabledActionReason, hiddenActions, visibleActions, hiddenTabs, visibleTabs, showAlerts, additionalFlags: additionalFlagsFromView, locale, customizations, contextMenuTrigger, linkOverride, insertInToSlide, disableRedirectionLinksInNewTab, overrideOrgId, exposeTranslationIDs, primaryAction, } = this.viewConfig;
|
|
15786
15840
|
const { additionalFlags: additionalFlagsFromInit } = this.embedConfig;
|
|
15787
15841
|
const additionalFlags = {
|
|
15788
15842
|
...additionalFlagsFromInit,
|
|
@@ -15796,6 +15850,9 @@ class TsEmbed {
|
|
|
15796
15850
|
this.handleError('You cannot have both hidden Tabs and visible Tabs');
|
|
15797
15851
|
return queryParams;
|
|
15798
15852
|
}
|
|
15853
|
+
if (primaryAction) {
|
|
15854
|
+
queryParams[Param.PrimaryAction] = primaryAction;
|
|
15855
|
+
}
|
|
15799
15856
|
if (disabledActions === null || disabledActions === void 0 ? void 0 : disabledActions.length) {
|
|
15800
15857
|
queryParams[Param.DisableActions] = disabledActions;
|
|
15801
15858
|
}
|
|
@@ -17014,7 +17071,7 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
|
|
|
17014
17071
|
* embedded Liveboard or visualization.
|
|
17015
17072
|
*/
|
|
17016
17073
|
getEmbedParams() {
|
|
17017
|
-
const { tag, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 = false, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, hideHomepageLeftNav = false, modularHomeExperience = false, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, enable2ColumnLayout, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false,
|
|
17074
|
+
const { tag, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideHamburger, hideObjectSearch, hideNotification, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 = false, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, hideHomepageLeftNav = false, modularHomeExperience = false, modularHomeExperienceV3 = false, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, enable2ColumnLayout, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false,
|
|
17018
17075
|
/* eslint-disable-next-line max-len */
|
|
17019
17076
|
dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, } = this.viewConfig;
|
|
17020
17077
|
let params = {};
|
|
@@ -17033,6 +17090,15 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
|
|
|
17033
17090
|
params[Param.HideIrrelevantFiltersInTab] = hideIrrelevantChipsInLiveboardTabs;
|
|
17034
17091
|
params[Param.IsUnifiedSearchExperienceEnabled] = isUnifiedSearchExperienceEnabled;
|
|
17035
17092
|
params = this.getBaseQueryParams(params);
|
|
17093
|
+
if (hideObjectSearch) {
|
|
17094
|
+
params[Param.HideObjectSearch] = !!hideObjectSearch;
|
|
17095
|
+
}
|
|
17096
|
+
if (hideHamburger) {
|
|
17097
|
+
params[Param.HideHamburger] = !!hideHamburger;
|
|
17098
|
+
}
|
|
17099
|
+
if (hideNotification) {
|
|
17100
|
+
params[Param.HideNotification] = !!hideNotification;
|
|
17101
|
+
}
|
|
17036
17102
|
if (fullHeight === true) {
|
|
17037
17103
|
params[Param.fullHeight] = true;
|
|
17038
17104
|
}
|
|
@@ -17080,6 +17146,14 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
|
|
|
17080
17146
|
/* eslint-disable-next-line max-len */
|
|
17081
17147
|
params[Param.DataPanelCustomGroupsAccordionInitialState] = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL;
|
|
17082
17148
|
}
|
|
17149
|
+
if (modularHomeExperienceV3) {
|
|
17150
|
+
if (modularHomeExperienceV3.enabled) {
|
|
17151
|
+
params[Param.NavigationVersion] = 'v3';
|
|
17152
|
+
}
|
|
17153
|
+
if (modularHomeExperienceV3.homePage === 'v2') {
|
|
17154
|
+
params[Param.ModularHomeExperienceEnabled] = true;
|
|
17155
|
+
}
|
|
17156
|
+
}
|
|
17083
17157
|
const queryParams = getQueryParamString(params, true);
|
|
17084
17158
|
return queryParams;
|
|
17085
17159
|
}
|