@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.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
|
function _mergeNamespaces(n, m) {
|
|
3
4
|
m.forEach(function (e) {
|
|
4
5
|
e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) {
|
|
@@ -574,6 +575,18 @@ var HomeLeftNavItem;
|
|
|
574
575
|
* @version SDK: 1.34.0| ThoughtSpot: 10.3.0.cl
|
|
575
576
|
*/
|
|
576
577
|
HomeLeftNavItem["LiveboardSchedules"] = "liveboard-schedules";
|
|
578
|
+
/**
|
|
579
|
+
* Create new options in the insights left navigation,
|
|
580
|
+
* available when new navigation V3 is enabled.
|
|
581
|
+
* @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
|
|
582
|
+
*/
|
|
583
|
+
HomeLeftNavItem["Create"] = "create";
|
|
584
|
+
/**
|
|
585
|
+
* Spotter option in the insights left navigation,
|
|
586
|
+
* available when new navigation V3 is enabled.
|
|
587
|
+
* @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
|
|
588
|
+
*/
|
|
589
|
+
HomeLeftNavItem["Spotter"] = "spotter";
|
|
577
590
|
})(HomeLeftNavItem || (HomeLeftNavItem = {}));
|
|
578
591
|
/**
|
|
579
592
|
* A map of the supported runtime filter operations
|
|
@@ -679,8 +692,8 @@ var HomepageModule;
|
|
|
679
692
|
})(HomepageModule || (HomepageModule = {}));
|
|
680
693
|
/**
|
|
681
694
|
* List page columns that can be hidden.
|
|
682
|
-
* **Note**: This option is applicable
|
|
683
|
-
* @version SDK: 1.38.0 | ThoughtSpot:
|
|
695
|
+
* **Note**: This option is applicable to full app embedding only.
|
|
696
|
+
* @version SDK: 1.38.0 | ThoughtSpot: 10.9.0.cl
|
|
684
697
|
*/
|
|
685
698
|
// eslint-disable-next-line no-shadow
|
|
686
699
|
var ListPageColumns;
|
|
@@ -1733,7 +1746,7 @@ var EmbedEvent;
|
|
|
1733
1746
|
* searchEmbed.trigger(HostEvent.TransformTableVizData, columnDataLite);
|
|
1734
1747
|
* })
|
|
1735
1748
|
* ```
|
|
1736
|
-
* @version SDK: 1.
|
|
1749
|
+
* @version SDK: 1.37.0 | ThoughtSpot: 10.8.0.cl
|
|
1737
1750
|
*/
|
|
1738
1751
|
EmbedEvent["TableVizRendered"] = "TableVizRendered";
|
|
1739
1752
|
/**
|
|
@@ -1746,12 +1759,12 @@ var EmbedEvent;
|
|
|
1746
1759
|
* console.log('payload', payload);
|
|
1747
1760
|
* })
|
|
1748
1761
|
*```
|
|
1749
|
-
* @version SDK : 1.
|
|
1762
|
+
* @version SDK : 1.37.0 | ThoughtSpot : 10.8.0.cl
|
|
1750
1763
|
*/
|
|
1751
1764
|
EmbedEvent["CreateLiveboard"] = "createLiveboard";
|
|
1752
1765
|
/**
|
|
1753
1766
|
* Emitted when a user creates a Model.
|
|
1754
|
-
* @version SDK : 1.
|
|
1767
|
+
* @version SDK : 1.37.0 | ThoughtSpot : 10.8.0.cl
|
|
1755
1768
|
*/
|
|
1756
1769
|
EmbedEvent["CreateModel"] = "createModel";
|
|
1757
1770
|
})(EmbedEvent || (EmbedEvent = {}));
|
|
@@ -2195,7 +2208,7 @@ var HostEvent;
|
|
|
2195
2208
|
* ```js
|
|
2196
2209
|
* liveboardEmbed.trigger(HostEvent.Remove)
|
|
2197
2210
|
* ```
|
|
2198
|
-
* @version SDK: 1.
|
|
2211
|
+
* @version SDK: 1.37.0 | ThoughtSpot: 10.8.0.cl, 10.10.0.sw
|
|
2199
2212
|
*/
|
|
2200
2213
|
HostEvent["Remove"] = "delete";
|
|
2201
2214
|
/**
|
|
@@ -2656,8 +2669,17 @@ var HostEvent;
|
|
|
2656
2669
|
/**
|
|
2657
2670
|
* Get the Answer session for a Search or
|
|
2658
2671
|
* Liveboard visualization.
|
|
2672
|
+
*
|
|
2673
|
+
* Note: This event is not typically used directly. Instead, use the
|
|
2674
|
+
* `getAnswerService()` method on the embed instance to get an AnswerService
|
|
2675
|
+
* object that provides a more convenient interface for working with answers.
|
|
2676
|
+
*
|
|
2659
2677
|
* @example
|
|
2660
2678
|
* ```js
|
|
2679
|
+
* // Preferred way to get an AnswerService
|
|
2680
|
+
* const service = await embed.getAnswerService();
|
|
2681
|
+
*
|
|
2682
|
+
* // Alternative direct usage (not recommended)
|
|
2661
2683
|
* const {session} = await embed.trigger(
|
|
2662
2684
|
* HostEvent.GetAnswerSession, {
|
|
2663
2685
|
* vizId: '123', // For Liveboard Visualization.
|
|
@@ -2665,6 +2687,10 @@ var HostEvent;
|
|
|
2665
2687
|
* ```
|
|
2666
2688
|
* @example
|
|
2667
2689
|
* ```js
|
|
2690
|
+
* // Preferred way to get an AnswerService
|
|
2691
|
+
* const service = await embed.getAnswerService();
|
|
2692
|
+
*
|
|
2693
|
+
* // Alternative direct usage (not recommended)
|
|
2668
2694
|
* const {session} = await embed.trigger( HostEvent.GetAnswerSession )
|
|
2669
2695
|
* ```
|
|
2670
2696
|
* @version SDK: 1.26.0 | ThoughtSpot: 9.10.0.cl, 10.1.0.sw
|
|
@@ -2790,7 +2816,7 @@ var HostEvent;
|
|
|
2790
2816
|
* searchEmbed.trigger(HostEvent.TransformTableVizData, columnDataLite);
|
|
2791
2817
|
* })
|
|
2792
2818
|
* ```
|
|
2793
|
-
* @version SDK: 1.
|
|
2819
|
+
* @version SDK: 1.37.0 | ThoughtSpot: 10.8.0.cl
|
|
2794
2820
|
*/
|
|
2795
2821
|
HostEvent["TransformTableVizData"] = "TransformTableVizData";
|
|
2796
2822
|
})(HostEvent || (HostEvent = {}));
|
|
@@ -2873,6 +2899,10 @@ var Param;
|
|
|
2873
2899
|
Param["ShowInsertToSlide"] = "insertInToSlide";
|
|
2874
2900
|
Param["PrimaryNavHidden"] = "primaryNavHidden";
|
|
2875
2901
|
Param["HideProfleAndHelp"] = "profileAndHelpInNavBarHidden";
|
|
2902
|
+
Param["NavigationVersion"] = "navigationVersion";
|
|
2903
|
+
Param["HideHamburger"] = "hideHamburger";
|
|
2904
|
+
Param["HideObjectSearch"] = "hideObjectSearch";
|
|
2905
|
+
Param["HideNotification"] = "hideNotification";
|
|
2876
2906
|
Param["HideApplicationSwitcher"] = "applicationSwitcherHidden";
|
|
2877
2907
|
Param["HideOrgSwitcher"] = "orgSwitcherHidden";
|
|
2878
2908
|
Param["IsSageEmbed"] = "isSageEmbed";
|
|
@@ -2929,6 +2959,7 @@ var Param;
|
|
|
2929
2959
|
Param["preAuthCache"] = "preAuthCache";
|
|
2930
2960
|
Param["ShowSpotterLimitations"] = "showSpotterLimitations";
|
|
2931
2961
|
Param["CoverAndFilterOptionInPDF"] = "coverAndFilterOptionInPDF";
|
|
2962
|
+
Param["PrimaryAction"] = "primaryAction";
|
|
2932
2963
|
})(Param || (Param = {}));
|
|
2933
2964
|
/**
|
|
2934
2965
|
* ThoughtSpot application pages include actions and menu commands
|
|
@@ -4137,7 +4168,7 @@ var Action;
|
|
|
4137
4168
|
* ```js
|
|
4138
4169
|
* hiddenAction: [Action.ColumnRename]
|
|
4139
4170
|
* ```
|
|
4140
|
-
* @version SDK: 1.
|
|
4171
|
+
* @version SDK: 1.37.0 | ThoughtSpot Cloud: 10.8.0.cl
|
|
4141
4172
|
*/
|
|
4142
4173
|
Action["ColumnRename"] = "columnRename";
|
|
4143
4174
|
/**
|
|
@@ -4147,7 +4178,7 @@ var Action;
|
|
|
4147
4178
|
* ```js
|
|
4148
4179
|
* hiddenAction: [Action.CoverAndFilterOptionInPDF]
|
|
4149
4180
|
* ```
|
|
4150
|
-
* @version SDK: 1.
|
|
4181
|
+
* @version SDK: 1.37.0 | ThoughtSpot Cloud: 10.8.0.cl
|
|
4151
4182
|
*/
|
|
4152
4183
|
Action["CoverAndFilterOptionInPDF"] = "coverAndFilterOptionInPDF";
|
|
4153
4184
|
})(Action || (Action = {}));
|
|
@@ -7166,29 +7197,49 @@ var OperationType;
|
|
|
7166
7197
|
OperationType["GetTableWithHeadlineData"] = "GetTableWithHeadlineData";
|
|
7167
7198
|
})(OperationType || (OperationType = {}));
|
|
7168
7199
|
/**
|
|
7169
|
-
*
|
|
7170
|
-
*
|
|
7171
|
-
*
|
|
7172
|
-
*
|
|
7200
|
+
* AnswerService provides a simple way to work with ThoughtSpot Answers.
|
|
7201
|
+
*
|
|
7202
|
+
* This service allows you to interact with ThoughtSpot Answers programmatically,
|
|
7203
|
+
* making it easy to customize visualizations, filter data, and extract insights
|
|
7204
|
+
* directly from your application.
|
|
7205
|
+
*
|
|
7206
|
+
* You can use this service to:
|
|
7207
|
+
* - Add or remove columns from Answers (`addColumns`, `removeColumns`, `addColumnsByName`)
|
|
7208
|
+
* - Apply filters to Answers (`addFilter`)
|
|
7209
|
+
* - Get data from Answers in different formats (JSON, CSV, PNG) (`fetchData`, `fetchCSVBlob`, `fetchPNGBlob`)
|
|
7210
|
+
* - Get data for specific points in visualizations (`getUnderlyingDataForPoint`)
|
|
7211
|
+
* - Run custom queries (`executeQuery`)
|
|
7212
|
+
* - Add visualizations to liveboards (`addDisplayedVizToLiveboard`)
|
|
7213
|
+
*
|
|
7173
7214
|
* @example
|
|
7174
7215
|
* ```js
|
|
7175
|
-
*
|
|
7176
|
-
*
|
|
7177
|
-
*
|
|
7178
|
-
*
|
|
7179
|
-
*
|
|
7180
|
-
*
|
|
7216
|
+
* // Get the answer service
|
|
7217
|
+
* embed.on(EmbedEvent.Data, async (e) => {
|
|
7218
|
+
* const service = await embed.getAnswerService();
|
|
7219
|
+
*
|
|
7220
|
+
* // Add columns to the answer
|
|
7221
|
+
* await service.addColumnsByName(["Sales", "Region"]);
|
|
7222
|
+
*
|
|
7223
|
+
* // Get the data
|
|
7224
|
+
* const data = await service.fetchData();
|
|
7225
|
+
* console.log(data);
|
|
7226
|
+
* });
|
|
7181
7227
|
* ```
|
|
7228
|
+
*
|
|
7182
7229
|
* @example
|
|
7183
7230
|
* ```js
|
|
7184
|
-
*
|
|
7185
|
-
*
|
|
7186
|
-
* await
|
|
7187
|
-
*
|
|
7231
|
+
* // Get data for a point in a visualization
|
|
7232
|
+
* embed.on(EmbedEvent.CustomAction, async (e) => {
|
|
7233
|
+
* const underlying = await e.answerService.getUnderlyingDataForPoint([
|
|
7234
|
+
* 'Product Name',
|
|
7235
|
+
* 'Sales Amount'
|
|
7188
7236
|
* ]);
|
|
7189
|
-
*
|
|
7237
|
+
*
|
|
7238
|
+
* const data = await underlying.fetchData(0, 100);
|
|
7239
|
+
* console.log(data);
|
|
7190
7240
|
* });
|
|
7191
7241
|
* ```
|
|
7242
|
+
*
|
|
7192
7243
|
* @version SDK: 1.25.0| ThoughtSpot: 9.10.0.cl
|
|
7193
7244
|
* @group Events
|
|
7194
7245
|
*/
|
|
@@ -7440,7 +7491,7 @@ class AnswerService {
|
|
|
7440
7491
|
async getTML() {
|
|
7441
7492
|
const { object } = await this.executeQuery(getAnswerTML, {});
|
|
7442
7493
|
const edoc = object[0].edoc;
|
|
7443
|
-
const YAML = await import('./index-
|
|
7494
|
+
const YAML = await import('./index-Cj4BVGHL.js');
|
|
7444
7495
|
const parsedDoc = YAML.parse(edoc);
|
|
7445
7496
|
return {
|
|
7446
7497
|
answer: {
|
|
@@ -14464,6 +14515,7 @@ var AuthFailureType;
|
|
|
14464
14515
|
AuthFailureType["EXPIRY"] = "EXPIRY";
|
|
14465
14516
|
AuthFailureType["OTHER"] = "OTHER";
|
|
14466
14517
|
AuthFailureType["IDLE_SESSION_TIMEOUT"] = "IDLE_SESSION_TIMEOUT";
|
|
14518
|
+
AuthFailureType["UNAUTHENTICATED_FAILURE"] = "UNAUTHENTICATED_FAILURE";
|
|
14467
14519
|
})(AuthFailureType || (AuthFailureType = {}));
|
|
14468
14520
|
/**
|
|
14469
14521
|
* Enum for auth status emitted by the emitter returned from {@link init}.
|
|
@@ -15243,15 +15295,17 @@ function processNoCookieAccess(e, containerEl) {
|
|
|
15243
15295
|
* @param containerEl
|
|
15244
15296
|
*/
|
|
15245
15297
|
function processAuthFailure(e, containerEl) {
|
|
15298
|
+
var _a;
|
|
15246
15299
|
const { loginFailedMessage, authType, disableLoginFailurePage, autoLogin, } = getEmbedConfig();
|
|
15247
|
-
|
|
15248
|
-
|
|
15249
|
-
|
|
15300
|
+
const isEmbeddedSSO = authType === AuthType.EmbeddedSSO;
|
|
15301
|
+
const isTrustedAuth = authType === AuthType.TrustedAuthToken || authType === AuthType.TrustedAuthTokenCookieless;
|
|
15302
|
+
const isEmbeddedSSOInfoFailure = isEmbeddedSSO && ((_a = e === null || e === void 0 ? void 0 : e.data) === null || _a === void 0 ? void 0 : _a.type) === AuthFailureType.UNAUTHENTICATED_FAILURE;
|
|
15303
|
+
if (autoLogin && isTrustedAuth) {
|
|
15250
15304
|
// eslint-disable-next-line no-param-reassign
|
|
15251
15305
|
containerEl.innerHTML = loginFailedMessage;
|
|
15252
15306
|
notifyAuthFailure(AuthFailureType.IDLE_SESSION_TIMEOUT);
|
|
15253
15307
|
}
|
|
15254
|
-
else if (authType !== AuthType.None && !disableLoginFailurePage) {
|
|
15308
|
+
else if (authType !== AuthType.None && !disableLoginFailurePage && !isEmbeddedSSOInfoFailure) {
|
|
15255
15309
|
// eslint-disable-next-line no-param-reassign
|
|
15256
15310
|
containerEl.innerHTML = loginFailedMessage;
|
|
15257
15311
|
notifyAuthFailure(AuthFailureType.OTHER);
|
|
@@ -15296,7 +15350,7 @@ function processEventData(type, e, thoughtSpotHost, containerEl) {
|
|
|
15296
15350
|
return e;
|
|
15297
15351
|
}
|
|
15298
15352
|
|
|
15299
|
-
var name="@thoughtspot/visual-embed-sdk";var version$1="1.
|
|
15353
|
+
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};
|
|
15300
15354
|
|
|
15301
15355
|
/**
|
|
15302
15356
|
* Reloads the ThoughtSpot iframe.
|
|
@@ -15833,7 +15887,7 @@ class TsEmbed {
|
|
|
15833
15887
|
if (this.embedConfig.currencyFormat) {
|
|
15834
15888
|
queryParams[Param.CurrencyFormat] = this.embedConfig.currencyFormat;
|
|
15835
15889
|
}
|
|
15836
|
-
const { disabledActions, disabledActionReason, hiddenActions, visibleActions, hiddenTabs, visibleTabs, showAlerts, additionalFlags: additionalFlagsFromView, locale, customizations, contextMenuTrigger, linkOverride, insertInToSlide, disableRedirectionLinksInNewTab, overrideOrgId, exposeTranslationIDs, } = this.viewConfig;
|
|
15890
|
+
const { disabledActions, disabledActionReason, hiddenActions, visibleActions, hiddenTabs, visibleTabs, showAlerts, additionalFlags: additionalFlagsFromView, locale, customizations, contextMenuTrigger, linkOverride, insertInToSlide, disableRedirectionLinksInNewTab, overrideOrgId, exposeTranslationIDs, primaryAction, } = this.viewConfig;
|
|
15837
15891
|
const { additionalFlags: additionalFlagsFromInit } = this.embedConfig;
|
|
15838
15892
|
const additionalFlags = {
|
|
15839
15893
|
...additionalFlagsFromInit,
|
|
@@ -15847,6 +15901,9 @@ class TsEmbed {
|
|
|
15847
15901
|
this.handleError('You cannot have both hidden Tabs and visible Tabs');
|
|
15848
15902
|
return queryParams;
|
|
15849
15903
|
}
|
|
15904
|
+
if (primaryAction) {
|
|
15905
|
+
queryParams[Param.PrimaryAction] = primaryAction;
|
|
15906
|
+
}
|
|
15850
15907
|
if (disabledActions === null || disabledActions === void 0 ? void 0 : disabledActions.length) {
|
|
15851
15908
|
queryParams[Param.DisableActions] = disabledActions;
|
|
15852
15909
|
}
|
|
@@ -16739,7 +16796,7 @@ class AppEmbed extends V1Embed {
|
|
|
16739
16796
|
* embedded Liveboard or visualization.
|
|
16740
16797
|
*/
|
|
16741
16798
|
getEmbedParams() {
|
|
16742
|
-
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,
|
|
16799
|
+
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,
|
|
16743
16800
|
/* eslint-disable-next-line max-len */
|
|
16744
16801
|
dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, } = this.viewConfig;
|
|
16745
16802
|
let params = {};
|
|
@@ -16758,6 +16815,15 @@ class AppEmbed extends V1Embed {
|
|
|
16758
16815
|
params[Param.HideIrrelevantFiltersInTab] = hideIrrelevantChipsInLiveboardTabs;
|
|
16759
16816
|
params[Param.IsUnifiedSearchExperienceEnabled] = isUnifiedSearchExperienceEnabled;
|
|
16760
16817
|
params = this.getBaseQueryParams(params);
|
|
16818
|
+
if (hideObjectSearch) {
|
|
16819
|
+
params[Param.HideObjectSearch] = !!hideObjectSearch;
|
|
16820
|
+
}
|
|
16821
|
+
if (hideHamburger) {
|
|
16822
|
+
params[Param.HideHamburger] = !!hideHamburger;
|
|
16823
|
+
}
|
|
16824
|
+
if (hideNotification) {
|
|
16825
|
+
params[Param.HideNotification] = !!hideNotification;
|
|
16826
|
+
}
|
|
16761
16827
|
if (fullHeight === true) {
|
|
16762
16828
|
params[Param.fullHeight] = true;
|
|
16763
16829
|
}
|
|
@@ -16805,6 +16871,14 @@ class AppEmbed extends V1Embed {
|
|
|
16805
16871
|
/* eslint-disable-next-line max-len */
|
|
16806
16872
|
params[Param.DataPanelCustomGroupsAccordionInitialState] = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL;
|
|
16807
16873
|
}
|
|
16874
|
+
if (modularHomeExperienceV3) {
|
|
16875
|
+
if (modularHomeExperienceV3.enabled) {
|
|
16876
|
+
params[Param.NavigationVersion] = 'v3';
|
|
16877
|
+
}
|
|
16878
|
+
if (modularHomeExperienceV3.homePage === 'v2') {
|
|
16879
|
+
params[Param.ModularHomeExperienceEnabled] = true;
|
|
16880
|
+
}
|
|
16881
|
+
}
|
|
16808
16882
|
const queryParams = getQueryParamString(params, true);
|
|
16809
16883
|
return queryParams;
|
|
16810
16884
|
}
|