@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.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
|
(function (global, factory) {
|
|
3
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) :
|
|
4
5
|
typeof define === 'function' && define.amd ? define(['exports', 'react'], factory) :
|
|
@@ -711,6 +712,18 @@
|
|
|
711
712
|
* @version SDK: 1.34.0| ThoughtSpot: 10.3.0.cl
|
|
712
713
|
*/
|
|
713
714
|
HomeLeftNavItem["LiveboardSchedules"] = "liveboard-schedules";
|
|
715
|
+
/**
|
|
716
|
+
* Create new options in the insights left navigation,
|
|
717
|
+
* available when new navigation V3 is enabled.
|
|
718
|
+
* @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
|
|
719
|
+
*/
|
|
720
|
+
HomeLeftNavItem["Create"] = "create";
|
|
721
|
+
/**
|
|
722
|
+
* Spotter option in the insights left navigation,
|
|
723
|
+
* available when new navigation V3 is enabled.
|
|
724
|
+
* @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
|
|
725
|
+
*/
|
|
726
|
+
HomeLeftNavItem["Spotter"] = "spotter";
|
|
714
727
|
})(exports.HomeLeftNavItem || (exports.HomeLeftNavItem = {}));
|
|
715
728
|
/**
|
|
716
729
|
* A map of the supported runtime filter operations
|
|
@@ -816,8 +829,8 @@
|
|
|
816
829
|
})(exports.HomepageModule || (exports.HomepageModule = {}));
|
|
817
830
|
/**
|
|
818
831
|
* List page columns that can be hidden.
|
|
819
|
-
* **Note**: This option is applicable
|
|
820
|
-
* @version SDK: 1.38.0 | ThoughtSpot:
|
|
832
|
+
* **Note**: This option is applicable to full app embedding only.
|
|
833
|
+
* @version SDK: 1.38.0 | ThoughtSpot: 10.9.0.cl
|
|
821
834
|
*/
|
|
822
835
|
// eslint-disable-next-line no-shadow
|
|
823
836
|
exports.ListPageColumns = void 0;
|
|
@@ -1870,7 +1883,7 @@
|
|
|
1870
1883
|
* searchEmbed.trigger(HostEvent.TransformTableVizData, columnDataLite);
|
|
1871
1884
|
* })
|
|
1872
1885
|
* ```
|
|
1873
|
-
* @version SDK: 1.
|
|
1886
|
+
* @version SDK: 1.37.0 | ThoughtSpot: 10.8.0.cl
|
|
1874
1887
|
*/
|
|
1875
1888
|
EmbedEvent["TableVizRendered"] = "TableVizRendered";
|
|
1876
1889
|
/**
|
|
@@ -1883,12 +1896,12 @@
|
|
|
1883
1896
|
* console.log('payload', payload);
|
|
1884
1897
|
* })
|
|
1885
1898
|
*```
|
|
1886
|
-
* @version SDK : 1.
|
|
1899
|
+
* @version SDK : 1.37.0 | ThoughtSpot : 10.8.0.cl
|
|
1887
1900
|
*/
|
|
1888
1901
|
EmbedEvent["CreateLiveboard"] = "createLiveboard";
|
|
1889
1902
|
/**
|
|
1890
1903
|
* Emitted when a user creates a Model.
|
|
1891
|
-
* @version SDK : 1.
|
|
1904
|
+
* @version SDK : 1.37.0 | ThoughtSpot : 10.8.0.cl
|
|
1892
1905
|
*/
|
|
1893
1906
|
EmbedEvent["CreateModel"] = "createModel";
|
|
1894
1907
|
})(exports.EmbedEvent || (exports.EmbedEvent = {}));
|
|
@@ -2332,7 +2345,7 @@
|
|
|
2332
2345
|
* ```js
|
|
2333
2346
|
* liveboardEmbed.trigger(HostEvent.Remove)
|
|
2334
2347
|
* ```
|
|
2335
|
-
* @version SDK: 1.
|
|
2348
|
+
* @version SDK: 1.37.0 | ThoughtSpot: 10.8.0.cl, 10.10.0.sw
|
|
2336
2349
|
*/
|
|
2337
2350
|
HostEvent["Remove"] = "delete";
|
|
2338
2351
|
/**
|
|
@@ -2793,8 +2806,17 @@
|
|
|
2793
2806
|
/**
|
|
2794
2807
|
* Get the Answer session for a Search or
|
|
2795
2808
|
* Liveboard visualization.
|
|
2809
|
+
*
|
|
2810
|
+
* Note: This event is not typically used directly. Instead, use the
|
|
2811
|
+
* `getAnswerService()` method on the embed instance to get an AnswerService
|
|
2812
|
+
* object that provides a more convenient interface for working with answers.
|
|
2813
|
+
*
|
|
2796
2814
|
* @example
|
|
2797
2815
|
* ```js
|
|
2816
|
+
* // Preferred way to get an AnswerService
|
|
2817
|
+
* const service = await embed.getAnswerService();
|
|
2818
|
+
*
|
|
2819
|
+
* // Alternative direct usage (not recommended)
|
|
2798
2820
|
* const {session} = await embed.trigger(
|
|
2799
2821
|
* HostEvent.GetAnswerSession, {
|
|
2800
2822
|
* vizId: '123', // For Liveboard Visualization.
|
|
@@ -2802,6 +2824,10 @@
|
|
|
2802
2824
|
* ```
|
|
2803
2825
|
* @example
|
|
2804
2826
|
* ```js
|
|
2827
|
+
* // Preferred way to get an AnswerService
|
|
2828
|
+
* const service = await embed.getAnswerService();
|
|
2829
|
+
*
|
|
2830
|
+
* // Alternative direct usage (not recommended)
|
|
2805
2831
|
* const {session} = await embed.trigger( HostEvent.GetAnswerSession )
|
|
2806
2832
|
* ```
|
|
2807
2833
|
* @version SDK: 1.26.0 | ThoughtSpot: 9.10.0.cl, 10.1.0.sw
|
|
@@ -2927,7 +2953,7 @@
|
|
|
2927
2953
|
* searchEmbed.trigger(HostEvent.TransformTableVizData, columnDataLite);
|
|
2928
2954
|
* })
|
|
2929
2955
|
* ```
|
|
2930
|
-
* @version SDK: 1.
|
|
2956
|
+
* @version SDK: 1.37.0 | ThoughtSpot: 10.8.0.cl
|
|
2931
2957
|
*/
|
|
2932
2958
|
HostEvent["TransformTableVizData"] = "TransformTableVizData";
|
|
2933
2959
|
})(exports.HostEvent || (exports.HostEvent = {}));
|
|
@@ -3010,6 +3036,10 @@
|
|
|
3010
3036
|
Param["ShowInsertToSlide"] = "insertInToSlide";
|
|
3011
3037
|
Param["PrimaryNavHidden"] = "primaryNavHidden";
|
|
3012
3038
|
Param["HideProfleAndHelp"] = "profileAndHelpInNavBarHidden";
|
|
3039
|
+
Param["NavigationVersion"] = "navigationVersion";
|
|
3040
|
+
Param["HideHamburger"] = "hideHamburger";
|
|
3041
|
+
Param["HideObjectSearch"] = "hideObjectSearch";
|
|
3042
|
+
Param["HideNotification"] = "hideNotification";
|
|
3013
3043
|
Param["HideApplicationSwitcher"] = "applicationSwitcherHidden";
|
|
3014
3044
|
Param["HideOrgSwitcher"] = "orgSwitcherHidden";
|
|
3015
3045
|
Param["IsSageEmbed"] = "isSageEmbed";
|
|
@@ -3066,6 +3096,7 @@
|
|
|
3066
3096
|
Param["preAuthCache"] = "preAuthCache";
|
|
3067
3097
|
Param["ShowSpotterLimitations"] = "showSpotterLimitations";
|
|
3068
3098
|
Param["CoverAndFilterOptionInPDF"] = "coverAndFilterOptionInPDF";
|
|
3099
|
+
Param["PrimaryAction"] = "primaryAction";
|
|
3069
3100
|
})(Param || (Param = {}));
|
|
3070
3101
|
/**
|
|
3071
3102
|
* ThoughtSpot application pages include actions and menu commands
|
|
@@ -4274,7 +4305,7 @@
|
|
|
4274
4305
|
* ```js
|
|
4275
4306
|
* hiddenAction: [Action.ColumnRename]
|
|
4276
4307
|
* ```
|
|
4277
|
-
* @version SDK: 1.
|
|
4308
|
+
* @version SDK: 1.37.0 | ThoughtSpot Cloud: 10.8.0.cl
|
|
4278
4309
|
*/
|
|
4279
4310
|
Action["ColumnRename"] = "columnRename";
|
|
4280
4311
|
/**
|
|
@@ -4284,7 +4315,7 @@
|
|
|
4284
4315
|
* ```js
|
|
4285
4316
|
* hiddenAction: [Action.CoverAndFilterOptionInPDF]
|
|
4286
4317
|
* ```
|
|
4287
|
-
* @version SDK: 1.
|
|
4318
|
+
* @version SDK: 1.37.0 | ThoughtSpot Cloud: 10.8.0.cl
|
|
4288
4319
|
*/
|
|
4289
4320
|
Action["CoverAndFilterOptionInPDF"] = "coverAndFilterOptionInPDF";
|
|
4290
4321
|
})(exports.Action || (exports.Action = {}));
|
|
@@ -7303,29 +7334,49 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
7303
7334
|
OperationType["GetTableWithHeadlineData"] = "GetTableWithHeadlineData";
|
|
7304
7335
|
})(OperationType || (OperationType = {}));
|
|
7305
7336
|
/**
|
|
7306
|
-
*
|
|
7307
|
-
*
|
|
7308
|
-
*
|
|
7309
|
-
*
|
|
7337
|
+
* AnswerService provides a simple way to work with ThoughtSpot Answers.
|
|
7338
|
+
*
|
|
7339
|
+
* This service allows you to interact with ThoughtSpot Answers programmatically,
|
|
7340
|
+
* making it easy to customize visualizations, filter data, and extract insights
|
|
7341
|
+
* directly from your application.
|
|
7342
|
+
*
|
|
7343
|
+
* You can use this service to:
|
|
7344
|
+
* - Add or remove columns from Answers (`addColumns`, `removeColumns`, `addColumnsByName`)
|
|
7345
|
+
* - Apply filters to Answers (`addFilter`)
|
|
7346
|
+
* - Get data from Answers in different formats (JSON, CSV, PNG) (`fetchData`, `fetchCSVBlob`, `fetchPNGBlob`)
|
|
7347
|
+
* - Get data for specific points in visualizations (`getUnderlyingDataForPoint`)
|
|
7348
|
+
* - Run custom queries (`executeQuery`)
|
|
7349
|
+
* - Add visualizations to liveboards (`addDisplayedVizToLiveboard`)
|
|
7350
|
+
*
|
|
7310
7351
|
* @example
|
|
7311
7352
|
* ```js
|
|
7312
|
-
*
|
|
7313
|
-
*
|
|
7314
|
-
*
|
|
7315
|
-
*
|
|
7316
|
-
*
|
|
7317
|
-
*
|
|
7353
|
+
* // Get the answer service
|
|
7354
|
+
* embed.on(EmbedEvent.Data, async (e) => {
|
|
7355
|
+
* const service = await embed.getAnswerService();
|
|
7356
|
+
*
|
|
7357
|
+
* // Add columns to the answer
|
|
7358
|
+
* await service.addColumnsByName(["Sales", "Region"]);
|
|
7359
|
+
*
|
|
7360
|
+
* // Get the data
|
|
7361
|
+
* const data = await service.fetchData();
|
|
7362
|
+
* console.log(data);
|
|
7363
|
+
* });
|
|
7318
7364
|
* ```
|
|
7365
|
+
*
|
|
7319
7366
|
* @example
|
|
7320
7367
|
* ```js
|
|
7321
|
-
*
|
|
7322
|
-
*
|
|
7323
|
-
* await
|
|
7324
|
-
*
|
|
7368
|
+
* // Get data for a point in a visualization
|
|
7369
|
+
* embed.on(EmbedEvent.CustomAction, async (e) => {
|
|
7370
|
+
* const underlying = await e.answerService.getUnderlyingDataForPoint([
|
|
7371
|
+
* 'Product Name',
|
|
7372
|
+
* 'Sales Amount'
|
|
7325
7373
|
* ]);
|
|
7326
|
-
*
|
|
7374
|
+
*
|
|
7375
|
+
* const data = await underlying.fetchData(0, 100);
|
|
7376
|
+
* console.log(data);
|
|
7327
7377
|
* });
|
|
7328
7378
|
* ```
|
|
7379
|
+
*
|
|
7329
7380
|
* @version SDK: 1.25.0| ThoughtSpot: 9.10.0.cl
|
|
7330
7381
|
* @group Events
|
|
7331
7382
|
*/
|
|
@@ -14588,6 +14639,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
14588
14639
|
AuthFailureType["EXPIRY"] = "EXPIRY";
|
|
14589
14640
|
AuthFailureType["OTHER"] = "OTHER";
|
|
14590
14641
|
AuthFailureType["IDLE_SESSION_TIMEOUT"] = "IDLE_SESSION_TIMEOUT";
|
|
14642
|
+
AuthFailureType["UNAUTHENTICATED_FAILURE"] = "UNAUTHENTICATED_FAILURE";
|
|
14591
14643
|
})(AuthFailureType || (AuthFailureType = {}));
|
|
14592
14644
|
/**
|
|
14593
14645
|
* Enum for auth status emitted by the emitter returned from {@link init}.
|
|
@@ -15214,15 +15266,17 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
15214
15266
|
* @param containerEl
|
|
15215
15267
|
*/
|
|
15216
15268
|
function processAuthFailure(e, containerEl) {
|
|
15269
|
+
var _a;
|
|
15217
15270
|
const { loginFailedMessage, authType, disableLoginFailurePage, autoLogin, } = getEmbedConfig();
|
|
15218
|
-
|
|
15219
|
-
|
|
15220
|
-
|
|
15271
|
+
const isEmbeddedSSO = authType === AuthType.EmbeddedSSO;
|
|
15272
|
+
const isTrustedAuth = authType === AuthType.TrustedAuthToken || authType === AuthType.TrustedAuthTokenCookieless;
|
|
15273
|
+
const isEmbeddedSSOInfoFailure = isEmbeddedSSO && ((_a = e === null || e === void 0 ? void 0 : e.data) === null || _a === void 0 ? void 0 : _a.type) === AuthFailureType.UNAUTHENTICATED_FAILURE;
|
|
15274
|
+
if (autoLogin && isTrustedAuth) {
|
|
15221
15275
|
// eslint-disable-next-line no-param-reassign
|
|
15222
15276
|
containerEl.innerHTML = loginFailedMessage;
|
|
15223
15277
|
notifyAuthFailure(AuthFailureType.IDLE_SESSION_TIMEOUT);
|
|
15224
15278
|
}
|
|
15225
|
-
else if (authType !== AuthType.None && !disableLoginFailurePage) {
|
|
15279
|
+
else if (authType !== AuthType.None && !disableLoginFailurePage && !isEmbeddedSSOInfoFailure) {
|
|
15226
15280
|
// eslint-disable-next-line no-param-reassign
|
|
15227
15281
|
containerEl.innerHTML = loginFailedMessage;
|
|
15228
15282
|
notifyAuthFailure(AuthFailureType.OTHER);
|
|
@@ -15267,7 +15321,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
15267
15321
|
return e;
|
|
15268
15322
|
}
|
|
15269
15323
|
|
|
15270
|
-
var name="@thoughtspot/visual-embed-sdk";var version$1="1.
|
|
15324
|
+
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$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};
|
|
15271
15325
|
|
|
15272
15326
|
/**
|
|
15273
15327
|
* Reloads the ThoughtSpot iframe.
|
|
@@ -15804,7 +15858,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
15804
15858
|
if (this.embedConfig.currencyFormat) {
|
|
15805
15859
|
queryParams[Param.CurrencyFormat] = this.embedConfig.currencyFormat;
|
|
15806
15860
|
}
|
|
15807
|
-
const { disabledActions, disabledActionReason, hiddenActions, visibleActions, hiddenTabs, visibleTabs, showAlerts, additionalFlags: additionalFlagsFromView, locale, customizations, contextMenuTrigger, linkOverride, insertInToSlide, disableRedirectionLinksInNewTab, overrideOrgId, exposeTranslationIDs, } = this.viewConfig;
|
|
15861
|
+
const { disabledActions, disabledActionReason, hiddenActions, visibleActions, hiddenTabs, visibleTabs, showAlerts, additionalFlags: additionalFlagsFromView, locale, customizations, contextMenuTrigger, linkOverride, insertInToSlide, disableRedirectionLinksInNewTab, overrideOrgId, exposeTranslationIDs, primaryAction, } = this.viewConfig;
|
|
15808
15862
|
const { additionalFlags: additionalFlagsFromInit } = this.embedConfig;
|
|
15809
15863
|
const additionalFlags = {
|
|
15810
15864
|
...additionalFlagsFromInit,
|
|
@@ -15818,6 +15872,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
15818
15872
|
this.handleError('You cannot have both hidden Tabs and visible Tabs');
|
|
15819
15873
|
return queryParams;
|
|
15820
15874
|
}
|
|
15875
|
+
if (primaryAction) {
|
|
15876
|
+
queryParams[Param.PrimaryAction] = primaryAction;
|
|
15877
|
+
}
|
|
15821
15878
|
if (disabledActions === null || disabledActions === void 0 ? void 0 : disabledActions.length) {
|
|
15822
15879
|
queryParams[Param.DisableActions] = disabledActions;
|
|
15823
15880
|
}
|
|
@@ -17036,7 +17093,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
17036
17093
|
* embedded Liveboard or visualization.
|
|
17037
17094
|
*/
|
|
17038
17095
|
getEmbedParams() {
|
|
17039
|
-
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,
|
|
17096
|
+
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,
|
|
17040
17097
|
/* eslint-disable-next-line max-len */
|
|
17041
17098
|
dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, } = this.viewConfig;
|
|
17042
17099
|
let params = {};
|
|
@@ -17055,6 +17112,15 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
17055
17112
|
params[Param.HideIrrelevantFiltersInTab] = hideIrrelevantChipsInLiveboardTabs;
|
|
17056
17113
|
params[Param.IsUnifiedSearchExperienceEnabled] = isUnifiedSearchExperienceEnabled;
|
|
17057
17114
|
params = this.getBaseQueryParams(params);
|
|
17115
|
+
if (hideObjectSearch) {
|
|
17116
|
+
params[Param.HideObjectSearch] = !!hideObjectSearch;
|
|
17117
|
+
}
|
|
17118
|
+
if (hideHamburger) {
|
|
17119
|
+
params[Param.HideHamburger] = !!hideHamburger;
|
|
17120
|
+
}
|
|
17121
|
+
if (hideNotification) {
|
|
17122
|
+
params[Param.HideNotification] = !!hideNotification;
|
|
17123
|
+
}
|
|
17058
17124
|
if (fullHeight === true) {
|
|
17059
17125
|
params[Param.fullHeight] = true;
|
|
17060
17126
|
}
|
|
@@ -17102,6 +17168,14 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
17102
17168
|
/* eslint-disable-next-line max-len */
|
|
17103
17169
|
params[Param.DataPanelCustomGroupsAccordionInitialState] = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL;
|
|
17104
17170
|
}
|
|
17171
|
+
if (modularHomeExperienceV3) {
|
|
17172
|
+
if (modularHomeExperienceV3.enabled) {
|
|
17173
|
+
params[Param.NavigationVersion] = 'v3';
|
|
17174
|
+
}
|
|
17175
|
+
if (modularHomeExperienceV3.homePage === 'v2') {
|
|
17176
|
+
params[Param.ModularHomeExperienceEnabled] = true;
|
|
17177
|
+
}
|
|
17178
|
+
}
|
|
17105
17179
|
const queryParams = getQueryParamString(params, true);
|
|
17106
17180
|
return queryParams;
|
|
17107
17181
|
}
|