@thoughtspot/visual-embed-sdk 1.42.1-alpha.7 → 1.42.3
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 +4 -3
- package/cjs/src/css-variables.d.ts +0 -48
- package/cjs/src/css-variables.d.ts.map +1 -1
- package/cjs/src/embed/app.d.ts +20 -0
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +9 -4
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/app.spec.js +62 -0
- package/cjs/src/embed/app.spec.js.map +1 -1
- package/cjs/src/embed/base.d.ts.map +1 -1
- package/cjs/src/embed/base.js +2 -0
- package/cjs/src/embed/base.js.map +1 -1
- package/cjs/src/embed/bodyless-conversation.d.ts +1 -1
- package/cjs/src/embed/conversation.d.ts +16 -0
- package/cjs/src/embed/conversation.d.ts.map +1 -1
- package/cjs/src/embed/conversation.js +5 -2
- package/cjs/src/embed/conversation.js.map +1 -1
- package/cjs/src/embed/conversation.spec.js +25 -1
- package/cjs/src/embed/conversation.spec.js.map +1 -1
- package/cjs/src/embed/hostEventClient/contracts.d.ts +1 -11
- package/cjs/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/cjs/src/embed/hostEventClient/contracts.js +0 -1
- package/cjs/src/embed/hostEventClient/contracts.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +5 -1
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/liveboard.spec.js +46 -0
- package/cjs/src/embed/liveboard.spec.js.map +1 -1
- package/cjs/src/embed/sage.d.ts +4 -4
- package/cjs/src/embed/search.d.ts.map +1 -1
- package/cjs/src/embed/search.js +1 -3
- package/cjs/src/embed/search.js.map +1 -1
- package/cjs/src/embed/ts-embed.d.ts +0 -2
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +31 -44
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/embed/ts-embed.spec.js +134 -43
- package/cjs/src/embed/ts-embed.spec.js.map +1 -1
- package/cjs/src/errors.js +1 -1
- package/cjs/src/errors.js.map +1 -1
- package/cjs/src/index.d.ts +3 -3
- package/cjs/src/index.d.ts.map +1 -1
- package/cjs/src/index.js +1 -2
- package/cjs/src/index.js.map +1 -1
- package/cjs/src/react/all-types-export.d.ts +1 -2
- package/cjs/src/react/all-types-export.d.ts.map +1 -1
- package/cjs/src/react/all-types-export.js +5 -3
- package/cjs/src/react/all-types-export.js.map +1 -1
- package/cjs/src/react/all-types-export.spec.js +0 -8
- package/cjs/src/react/all-types-export.spec.js.map +1 -1
- package/cjs/src/react/index.d.ts +1 -2
- package/cjs/src/react/index.d.ts.map +1 -1
- package/cjs/src/react/index.js +2 -1
- package/cjs/src/react/index.js.map +1 -1
- package/cjs/src/react/util.d.ts +1 -0
- package/cjs/src/react/util.d.ts.map +1 -1
- package/cjs/src/types.d.ts +80 -94
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +30 -46
- package/cjs/src/types.js.map +1 -1
- package/cjs/src/utils/custom-actions.d.ts.map +1 -1
- package/cjs/src/utils/custom-actions.js +9 -0
- package/cjs/src/utils/custom-actions.js.map +1 -1
- package/cjs/src/utils/custom-actions.spec.js +20 -0
- package/cjs/src/utils/custom-actions.spec.js.map +1 -1
- package/cjs/src/utils/processData.d.ts +1 -1
- package/cjs/src/utils/processData.d.ts.map +1 -1
- package/cjs/src/utils/processData.js +8 -8
- package/cjs/src/utils/processData.js.map +1 -1
- package/cjs/src/utils/processData.spec.js.map +1 -1
- package/dist/{index-DvNA626T.js → index-SVcLgSqi.js} +1 -1
- package/dist/src/css-variables.d.ts +0 -48
- package/dist/src/css-variables.d.ts.map +1 -1
- package/dist/src/embed/app.d.ts +20 -0
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/base.d.ts.map +1 -1
- package/dist/src/embed/bodyless-conversation.d.ts +1 -1
- package/dist/src/embed/conversation.d.ts +16 -0
- package/dist/src/embed/conversation.d.ts.map +1 -1
- package/dist/src/embed/hostEventClient/contracts.d.ts +1 -11
- package/dist/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/embed/sage.d.ts +4 -4
- package/dist/src/embed/search.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.d.ts +0 -2
- package/dist/src/embed/ts-embed.d.ts.map +1 -1
- package/dist/src/index.d.ts +3 -3
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/react/all-types-export.d.ts +1 -2
- package/dist/src/react/all-types-export.d.ts.map +1 -1
- package/dist/src/react/index.d.ts +1 -2
- package/dist/src/react/index.d.ts.map +1 -1
- package/dist/src/react/util.d.ts +1 -0
- package/dist/src/react/util.d.ts.map +1 -1
- package/dist/src/types.d.ts +80 -94
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/custom-actions.d.ts.map +1 -1
- package/dist/src/utils/processData.d.ts +1 -1
- package/dist/src/utils/processData.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +114 -224
- package/dist/tsembed-react.js +258 -444
- package/dist/tsembed.es.js +113 -224
- package/dist/tsembed.js +256 -443
- package/dist/visual-embed-sdk-react-full.d.ts +126 -161
- package/dist/visual-embed-sdk-react.d.ts +117 -156
- package/dist/visual-embed-sdk.d.ts +117 -159
- package/lib/package.json +4 -3
- package/lib/src/css-variables.d.ts +0 -48
- package/lib/src/css-variables.d.ts.map +1 -1
- package/lib/src/embed/app.d.ts +20 -0
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +9 -4
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/app.spec.js +62 -0
- package/lib/src/embed/app.spec.js.map +1 -1
- package/lib/src/embed/base.d.ts.map +1 -1
- package/lib/src/embed/base.js +2 -0
- package/lib/src/embed/base.js.map +1 -1
- package/lib/src/embed/bodyless-conversation.d.ts +1 -1
- package/lib/src/embed/conversation.d.ts +16 -0
- package/lib/src/embed/conversation.d.ts.map +1 -1
- package/lib/src/embed/conversation.js +5 -2
- package/lib/src/embed/conversation.js.map +1 -1
- package/lib/src/embed/conversation.spec.js +25 -1
- package/lib/src/embed/conversation.spec.js.map +1 -1
- package/lib/src/embed/hostEventClient/contracts.d.ts +1 -11
- package/lib/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/lib/src/embed/hostEventClient/contracts.js +0 -1
- package/lib/src/embed/hostEventClient/contracts.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +5 -1
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +47 -1
- package/lib/src/embed/liveboard.spec.js.map +1 -1
- package/lib/src/embed/sage.d.ts +4 -4
- package/lib/src/embed/search.d.ts.map +1 -1
- package/lib/src/embed/search.js +1 -3
- package/lib/src/embed/search.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts +0 -2
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +31 -44
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/embed/ts-embed.spec.js +134 -43
- package/lib/src/embed/ts-embed.spec.js.map +1 -1
- package/lib/src/errors.js +1 -1
- package/lib/src/errors.js.map +1 -1
- package/lib/src/index.d.ts +3 -3
- 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/react/all-types-export.d.ts +1 -2
- package/lib/src/react/all-types-export.d.ts.map +1 -1
- package/lib/src/react/all-types-export.js +2 -2
- package/lib/src/react/all-types-export.js.map +1 -1
- package/lib/src/react/all-types-export.spec.js +0 -8
- package/lib/src/react/all-types-export.spec.js.map +1 -1
- package/lib/src/react/index.d.ts +1 -2
- package/lib/src/react/index.d.ts.map +1 -1
- package/lib/src/react/index.js +4 -3
- package/lib/src/react/index.js.map +1 -1
- package/lib/src/react/util.d.ts +1 -0
- package/lib/src/react/util.d.ts.map +1 -1
- package/lib/src/types.d.ts +80 -94
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +29 -45
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils/custom-actions.d.ts.map +1 -1
- package/lib/src/utils/custom-actions.js +9 -0
- package/lib/src/utils/custom-actions.js.map +1 -1
- package/lib/src/utils/custom-actions.spec.js +20 -0
- package/lib/src/utils/custom-actions.spec.js.map +1 -1
- package/lib/src/utils/processData.d.ts +1 -1
- package/lib/src/utils/processData.d.ts.map +1 -1
- package/lib/src/utils/processData.js +8 -8
- package/lib/src/utils/processData.js.map +1 -1
- package/lib/src/utils/processData.spec.js.map +1 -1
- package/package.json +4 -3
- package/src/css-variables.ts +0 -58
- package/src/embed/app.spec.ts +87 -0
- package/src/embed/app.ts +35 -4
- package/src/embed/base.ts +2 -0
- package/src/embed/bodyless-conversation.ts +1 -1
- package/src/embed/conversation.spec.ts +35 -1
- package/src/embed/conversation.ts +22 -0
- package/src/embed/hostEventClient/contracts.ts +0 -10
- package/src/embed/liveboard.spec.ts +60 -0
- package/src/embed/liveboard.ts +9 -0
- package/src/embed/sage.ts +4 -4
- package/src/embed/search.ts +1 -3
- package/src/embed/ts-embed.spec.ts +175 -53
- package/src/embed/ts-embed.ts +45 -68
- package/src/errors.ts +1 -1
- package/src/index.ts +3 -4
- package/src/react/all-types-export.spec.ts +1 -9
- package/src/react/all-types-export.ts +8 -10
- package/src/react/index.tsx +130 -155
- package/src/types.ts +78 -94
- package/src/utils/custom-actions.spec.ts +22 -0
- package/src/utils/custom-actions.ts +11 -0
- package/src/utils/processData.spec.ts +1 -0
- package/src/utils/processData.ts +11 -11
- package/cjs/src/api-intercept.d.ts +0 -31
- package/cjs/src/api-intercept.d.ts.map +0 -1
- package/cjs/src/api-intercept.js +0 -119
- package/cjs/src/api-intercept.js.map +0 -1
- package/cjs/src/api-intercept.spec.d.ts +0 -2
- package/cjs/src/api-intercept.spec.d.ts.map +0 -1
- package/cjs/src/api-intercept.spec.js +0 -122
- package/cjs/src/api-intercept.spec.js.map +0 -1
- package/dist/index-BCC3Z072.js +0 -7371
- package/dist/index-BEzW4MDA.js +0 -7371
- package/dist/index-BaESA9rq.js +0 -7371
- package/dist/index-CFNZIcKr.js +0 -7447
- package/dist/index-CqKTa1Fe.js +0 -7447
- package/dist/index-DFnPKcjZ.js +0 -7447
- package/dist/index-DhFH7b7U.js +0 -7447
- package/dist/src/api-intercept.d.ts +0 -31
- package/dist/src/api-intercept.d.ts.map +0 -1
- package/dist/src/api-intercept.spec.d.ts +0 -2
- package/dist/src/api-intercept.spec.d.ts.map +0 -1
- package/lib/src/api-intercept.d.ts +0 -31
- package/lib/src/api-intercept.d.ts.map +0 -1
- package/lib/src/api-intercept.js +0 -112
- package/lib/src/api-intercept.js.map +0 -1
- package/lib/src/api-intercept.spec.d.ts +0 -2
- package/lib/src/api-intercept.spec.d.ts.map +0 -1
- package/lib/src/api-intercept.spec.js +0 -119
- package/lib/src/api-intercept.spec.js.map +0 -1
- package/src/api-intercept.ts +0 -139
package/dist/tsembed.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @thoughtspot/visual-embed-sdk version 1.42.
|
|
1
|
+
/* @thoughtspot/visual-embed-sdk version 1.42.3 */
|
|
2
2
|
'use client';
|
|
3
3
|
function _mergeNamespaces(n, m) {
|
|
4
4
|
m.forEach(function (e) {
|
|
@@ -1853,7 +1853,7 @@ var EmbedEvent;
|
|
|
1853
1853
|
* the table visualization.
|
|
1854
1854
|
*
|
|
1855
1855
|
* If the Row-Level Security (RLS) rules are applied on the
|
|
1856
|
-
*
|
|
1856
|
+
* Model, exercise caution when changing column
|
|
1857
1857
|
* or table cell values to maintain data security.
|
|
1858
1858
|
*
|
|
1859
1859
|
* @example
|
|
@@ -1911,7 +1911,7 @@ var EmbedEvent;
|
|
|
1911
1911
|
*/
|
|
1912
1912
|
EmbedEvent["SpotterData"] = "SpotterData";
|
|
1913
1913
|
/**
|
|
1914
|
-
* Emitted when user opens up the
|
|
1914
|
+
* Emitted when user opens up the data source preview modal in Spotter embed.
|
|
1915
1915
|
* @example
|
|
1916
1916
|
* ```js
|
|
1917
1917
|
* spotterEmbed.on(EmbedEvent.PreviewSpotterData, (payload) => {
|
|
@@ -1999,21 +1999,6 @@ var EmbedEvent;
|
|
|
1999
1999
|
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
2000
2000
|
*/
|
|
2001
2001
|
EmbedEvent["OrgSwitched"] = "orgSwitched";
|
|
2002
|
-
/**
|
|
2003
|
-
* Emitted when the user intercepts a URL.
|
|
2004
|
-
*
|
|
2005
|
-
* Supported on all embed types.
|
|
2006
|
-
*
|
|
2007
|
-
* @example
|
|
2008
|
-
* ```js
|
|
2009
|
-
* embed.on(EmbedEvent.ApiIntercept, (payload) => {
|
|
2010
|
-
* console.log('payload', payload);
|
|
2011
|
-
* })
|
|
2012
|
-
* ```
|
|
2013
|
-
*
|
|
2014
|
-
* @version SDK: 1.42.0 | ThoughtSpot: 10.14.0.cl
|
|
2015
|
-
*/
|
|
2016
|
-
EmbedEvent["ApiIntercept"] = "ApiIntercept";
|
|
2017
2002
|
})(EmbedEvent || (EmbedEvent = {}));
|
|
2018
2003
|
/**
|
|
2019
2004
|
* Event types that can be triggered by the host application
|
|
@@ -2152,9 +2137,7 @@ var HostEvent;
|
|
|
2152
2137
|
*/
|
|
2153
2138
|
HostEvent["Reload"] = "reload";
|
|
2154
2139
|
/**
|
|
2155
|
-
* Get iframe URL for the current embed view
|
|
2156
|
-
* Developers can use this URL to embed a ThoughtSpot object
|
|
2157
|
-
* in apps like Salesforce or Sharepoint.
|
|
2140
|
+
* Get iframe URL for the current embed view.
|
|
2158
2141
|
* @example
|
|
2159
2142
|
* ```js
|
|
2160
2143
|
* const url = embed.trigger(HostEvent.GetIframeUrl);
|
|
@@ -3226,7 +3209,7 @@ var HostEvent;
|
|
|
3226
3209
|
*/
|
|
3227
3210
|
HostEvent["EditLastPrompt"] = "EditLastPrompt";
|
|
3228
3211
|
/**
|
|
3229
|
-
* Opens the
|
|
3212
|
+
* Opens the data source preview modal in Spotter Embed.
|
|
3230
3213
|
* @example
|
|
3231
3214
|
* ```js
|
|
3232
3215
|
* spotterEmbed.trigger(HostEvent.PreviewSpotterData);
|
|
@@ -3308,6 +3291,15 @@ var HostEvent;
|
|
|
3308
3291
|
* ```
|
|
3309
3292
|
*/
|
|
3310
3293
|
HostEvent["UpdateEmbedParams"] = "updateEmbedParams";
|
|
3294
|
+
/**
|
|
3295
|
+
* Triggered when the embed is needed to be destroyed. This is used to clean up any embed related resources internally.
|
|
3296
|
+
* @example
|
|
3297
|
+
* ```js
|
|
3298
|
+
* liveboardEmbed.trigger(HostEvent.DestroyEmbed);
|
|
3299
|
+
* ```
|
|
3300
|
+
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
3301
|
+
*/
|
|
3302
|
+
HostEvent["DestroyEmbed"] = "EmbedDestroyed";
|
|
3311
3303
|
})(HostEvent || (HostEvent = {}));
|
|
3312
3304
|
/**
|
|
3313
3305
|
* The different visual modes that the data sources panel within
|
|
@@ -3351,6 +3343,7 @@ var Param;
|
|
|
3351
3343
|
Param["HideResult"] = "hideResult";
|
|
3352
3344
|
Param["UseLastSelectedDataSource"] = "useLastSelectedSources";
|
|
3353
3345
|
Param["Tag"] = "tag";
|
|
3346
|
+
Param["HideTagFilterChips"] = "hideTagFilterChips";
|
|
3354
3347
|
Param["AutoLogin"] = "autoLogin";
|
|
3355
3348
|
Param["searchTokenString"] = "searchTokenString";
|
|
3356
3349
|
Param["executeSearch"] = "executeSearch";
|
|
@@ -3439,6 +3432,7 @@ var Param;
|
|
|
3439
3432
|
Param["ShowLiveboardReverifyBanner"] = "showLiveboardReverifyBanner";
|
|
3440
3433
|
Param["LiveboardHeaderV2"] = "isLiveboardHeaderV2Enabled";
|
|
3441
3434
|
Param["HideIrrelevantFiltersInTab"] = "hideIrrelevantFiltersAtTabLevel";
|
|
3435
|
+
Param["IsEnhancedFilterInteractivityEnabled"] = "isLiveboardPermissionV2Enabled";
|
|
3442
3436
|
Param["SpotterEnabled"] = "isSpotterExperienceEnabled";
|
|
3443
3437
|
Param["IsUnifiedSearchExperienceEnabled"] = "isUnifiedSearchExperienceEnabled";
|
|
3444
3438
|
Param["OverrideOrgId"] = "orgId";
|
|
@@ -3455,7 +3449,9 @@ var Param;
|
|
|
3455
3449
|
Param["RootMarginForLazyLoad"] = "rootMarginForLazyLoad";
|
|
3456
3450
|
Param["LiveboardXLSXCSVDownload"] = "isLiveboardXLSXCSVDownloadEnabled";
|
|
3457
3451
|
Param["isPNGInScheduledEmailsEnabled"] = "isPNGInScheduledEmailsEnabled";
|
|
3452
|
+
Param["isCentralizedLiveboardFilterUXEnabled"] = "isCentralizedLiveboardFilterUXEnabled";
|
|
3458
3453
|
Param["isLinkParametersEnabled"] = "isLinkParametersEnabled";
|
|
3454
|
+
Param["EnablePastConversationsSidebar"] = "enablePastConversationsSidebar";
|
|
3459
3455
|
})(Param || (Param = {}));
|
|
3460
3456
|
/**
|
|
3461
3457
|
* ThoughtSpot application pages include actions and menu commands
|
|
@@ -3568,7 +3564,7 @@ var Action;
|
|
|
3568
3564
|
*/
|
|
3569
3565
|
Action["SchedulesList"] = "schedule-list";
|
|
3570
3566
|
/**
|
|
3571
|
-
* The **Share** action on a Liveboard, Answer, or
|
|
3567
|
+
* The **Share** action on a Liveboard, Answer, or Model.
|
|
3572
3568
|
* Allows users to share an object with other users and groups.
|
|
3573
3569
|
* @example
|
|
3574
3570
|
* ```js
|
|
@@ -4026,7 +4022,7 @@ var Action;
|
|
|
4026
4022
|
Action["AnswerChartSwitcher"] = "answerChartSwitcher";
|
|
4027
4023
|
/**
|
|
4028
4024
|
* The Favorites icon (*) for Answers,
|
|
4029
|
-
* Liveboard, and data objects like
|
|
4025
|
+
* Liveboard, and data objects like Model,
|
|
4030
4026
|
* Tables and Views.
|
|
4031
4027
|
* Allows adding an object to the user's favorites list.
|
|
4032
4028
|
* @example
|
|
@@ -4760,6 +4756,16 @@ var Action;
|
|
|
4760
4756
|
* @version SDK: 1.42.0 | ThoughtSpot Cloud: 10.14.0.cl
|
|
4761
4757
|
*/
|
|
4762
4758
|
Action["RemoveAttachment"] = "removeAttachment";
|
|
4759
|
+
/**
|
|
4760
|
+
* The **Style panel** on a Liveboard.
|
|
4761
|
+
* Controls the visibility of the Liveboard style panel.
|
|
4762
|
+
* @example
|
|
4763
|
+
* ```js
|
|
4764
|
+
* hiddenActions: [Action.LiveboardStylePanel]
|
|
4765
|
+
* ```
|
|
4766
|
+
* @version SDK: 1.43.0 | ThoughtSpot Cloud: 10.15.0.cl
|
|
4767
|
+
*/
|
|
4768
|
+
Action["LiveboardStylePanel"] = "liveboardStylePanel";
|
|
4763
4769
|
})(Action || (Action = {}));
|
|
4764
4770
|
var PrefetchFeatures;
|
|
4765
4771
|
(function (PrefetchFeatures) {
|
|
@@ -4881,29 +4887,7 @@ var LogLevel;
|
|
|
4881
4887
|
* @version SDK: 1.26.7 | ThoughtSpot Cloud: 9.10.0.cl
|
|
4882
4888
|
*/
|
|
4883
4889
|
LogLevel["TRACE"] = "TRACE";
|
|
4884
|
-
})(LogLevel || (LogLevel = {}));
|
|
4885
|
-
/**
|
|
4886
|
-
* Enum for the type of API intercepted
|
|
4887
|
-
*/
|
|
4888
|
-
var InterceptedApiType;
|
|
4889
|
-
(function (InterceptedApiType) {
|
|
4890
|
-
/**
|
|
4891
|
-
* The apis that are use to get the metadata for the embed
|
|
4892
|
-
*/
|
|
4893
|
-
InterceptedApiType["METADATA"] = "METADATA";
|
|
4894
|
-
/**
|
|
4895
|
-
* The apis that are use to get the data for the embed
|
|
4896
|
-
*/
|
|
4897
|
-
InterceptedApiType["ANSWER_DATA"] = "ANSWER_DATA";
|
|
4898
|
-
/**
|
|
4899
|
-
* This will intercept all the apis
|
|
4900
|
-
*/
|
|
4901
|
-
InterceptedApiType["ALL"] = "ALL";
|
|
4902
|
-
/**
|
|
4903
|
-
* The apis that are use to get the data for the liveboard
|
|
4904
|
-
*/
|
|
4905
|
-
InterceptedApiType["LIVEBOARD_DATA"] = "LIVEBOARD_DATA";
|
|
4906
|
-
})(InterceptedApiType || (InterceptedApiType = {}));
|
|
4890
|
+
})(LogLevel || (LogLevel = {}));
|
|
4907
4891
|
|
|
4908
4892
|
const logFunctions = {
|
|
4909
4893
|
[LogLevel.SILENT]: () => undefined,
|
|
@@ -7249,20 +7233,9 @@ function isEmpty(value) {
|
|
|
7249
7233
|
|
|
7250
7234
|
var isEmpty_1 = isEmpty;
|
|
7251
7235
|
|
|
7252
|
-
var UIPassthroughEvent;
|
|
7253
|
-
(function (UIPassthroughEvent) {
|
|
7254
|
-
UIPassthroughEvent["PinAnswerToLiveboard"] = "addVizToPinboard";
|
|
7255
|
-
UIPassthroughEvent["SaveAnswer"] = "saveAnswer";
|
|
7256
|
-
UIPassthroughEvent["GetDiscoverabilityStatus"] = "getDiscoverabilityStatus";
|
|
7257
|
-
UIPassthroughEvent["GetAvailableUIPassthroughs"] = "getAvailableUiPassthroughs";
|
|
7258
|
-
UIPassthroughEvent["GetAnswerConfig"] = "getAnswerPageConfig";
|
|
7259
|
-
UIPassthroughEvent["GetLiveboardConfig"] = "getPinboardPageConfig";
|
|
7260
|
-
UIPassthroughEvent["GetUnsavedAnswerTML"] = "getUnsavedAnswerTML";
|
|
7261
|
-
})(UIPassthroughEvent || (UIPassthroughEvent = {}));
|
|
7262
|
-
|
|
7263
7236
|
const ERROR_MESSAGE = {
|
|
7264
7237
|
INVALID_THOUGHTSPOT_HOST: 'Error parsing ThoughtSpot host. Please provide a valid URL.',
|
|
7265
|
-
SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND: 'Please select a
|
|
7238
|
+
SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND: 'Please select a Model to get started',
|
|
7266
7239
|
LIVEBOARD_VIZ_ID_VALIDATION: 'Please select a Liveboard to embed.',
|
|
7267
7240
|
TRIGGER_TIMED_OUT: 'Trigger timed-out in getting a response',
|
|
7268
7241
|
SEARCHEMBED_BETA_WRANING_MESSAGE: 'SearchEmbed is in Beta in this release.',
|
|
@@ -8191,7 +8164,7 @@ class AnswerService {
|
|
|
8191
8164
|
async getTML() {
|
|
8192
8165
|
const { object } = await this.executeQuery(getAnswerTML, {});
|
|
8193
8166
|
const edoc = object[0].edoc;
|
|
8194
|
-
const YAML = await import('./index-
|
|
8167
|
+
const YAML = await import('./index-SVcLgSqi.js');
|
|
8195
8168
|
const parsedDoc = YAML.parse(edoc);
|
|
8196
8169
|
return {
|
|
8197
8170
|
answer: {
|
|
@@ -9712,6 +9685,14 @@ const getCustomActions = (customActions) => {
|
|
|
9712
9685
|
finalValidActions.push(action);
|
|
9713
9686
|
}
|
|
9714
9687
|
});
|
|
9688
|
+
// Step 4: Collect warnings for long custom action names
|
|
9689
|
+
const MAX_ACTION_NAME_LENGTH = 30;
|
|
9690
|
+
const warnings = finalValidActions
|
|
9691
|
+
.filter(action => action.name.length > MAX_ACTION_NAME_LENGTH)
|
|
9692
|
+
.map(action => `Custom action name '${action.name}' exceeds ${MAX_ACTION_NAME_LENGTH} characters. This may cause display or truncation issues in the UI.`);
|
|
9693
|
+
if (warnings.length > 0) {
|
|
9694
|
+
logger$3.warn(warnings);
|
|
9695
|
+
}
|
|
9715
9696
|
const sortedActions = sortBy_1(finalValidActions, (a) => a.name.toLocaleLowerCase());
|
|
9716
9697
|
return {
|
|
9717
9698
|
actions: sortedActions,
|
|
@@ -17068,6 +17049,8 @@ const CONFIG_DEFAULTS = {
|
|
|
17068
17049
|
authTriggerText: 'Authorize',
|
|
17069
17050
|
authType: AuthType.None,
|
|
17070
17051
|
logLevel: LogLevel.ERROR,
|
|
17052
|
+
waitForCleanupOnDestroy: false,
|
|
17053
|
+
cleanupTimeout: 5000,
|
|
17071
17054
|
};
|
|
17072
17055
|
let authPromise;
|
|
17073
17056
|
const getAuthPromise = () => authPromise;
|
|
@@ -17510,27 +17493,27 @@ function processAuthLogout(e, containerEl) {
|
|
|
17510
17493
|
* @param thoughtSpotHost
|
|
17511
17494
|
* @param containerEl
|
|
17512
17495
|
*/
|
|
17513
|
-
function processEventData(type,
|
|
17496
|
+
function processEventData(type, e, thoughtSpotHost, containerEl) {
|
|
17514
17497
|
switch (type) {
|
|
17515
17498
|
case EmbedEvent.CustomAction:
|
|
17516
|
-
return processCustomAction(
|
|
17499
|
+
return processCustomAction(e, thoughtSpotHost);
|
|
17517
17500
|
case EmbedEvent.AuthInit:
|
|
17518
|
-
return processAuthInit(
|
|
17501
|
+
return processAuthInit(e);
|
|
17519
17502
|
case EmbedEvent.NoCookieAccess:
|
|
17520
|
-
return processNoCookieAccess(
|
|
17503
|
+
return processNoCookieAccess(e, containerEl);
|
|
17521
17504
|
case EmbedEvent.AuthFailure:
|
|
17522
|
-
return processAuthFailure(
|
|
17505
|
+
return processAuthFailure(e, containerEl);
|
|
17523
17506
|
case EmbedEvent.AuthLogout:
|
|
17524
|
-
return processAuthLogout(
|
|
17507
|
+
return processAuthLogout(e, containerEl);
|
|
17525
17508
|
case EmbedEvent.ExitPresentMode:
|
|
17526
17509
|
return processExitPresentMode();
|
|
17527
17510
|
case EmbedEvent.CLEAR_INFO_CACHE:
|
|
17528
17511
|
return processClearInfoCache();
|
|
17529
17512
|
}
|
|
17530
|
-
return
|
|
17513
|
+
return e;
|
|
17531
17514
|
}
|
|
17532
17515
|
|
|
17533
|
-
var name="@thoughtspot/visual-embed-sdk";var version$1="1.42.
|
|
17516
|
+
var name="@thoughtspot/visual-embed-sdk";var version$1="1.42.3";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 tsconfig.build.json --incremental false; tsc -p tsconfig.build.json --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle-generator --config ./dts-config/dts-bundle-file.config.js","bundle-dts":"dts-bundle-generator --config ./dts-config/dts-bundle.config.js","bundle-dts-react":"dts-bundle-generator --config ./dts-config/dts-bundle-react.config.js","bundle-dts-react-full":"dts-bundle-generator --config ./dts-config/dts-bundle-react-full.config.js",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.build.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 | npx coveralls-next","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest",dev:"vite -c vite.local.config.ts"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={classnames:"^2.3.1",eventemitter3:"^4.0.7",lodash:"^4.17.21","mixpanel-browser":"2.47.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1",yaml:"^2.5.1"};var devDependencies={"@mdx-js/mdx":"^1.6.22","@mdx-js/react":"^1.6.22","@react-icons/all-files":"^4.1.0","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^5.0.2","@size-limit/preset-big-lib":"^11.2.0","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^22.2.3","@types/lodash":"^4.17.0","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^8.28.0","@typescript-eslint/parser":"^8.28.0",ajv:"^8.17.1",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1","coveralls-next":"^5.0.0",crypto:"^1.0.1","current-git-branch":"^1.1.0","dts-bundle-generator":"^9.5.1",eslint:"^9.23.0","eslint-config-airbnb-base":"^15.0.0","eslint-config-prettier":"^10.1.1","eslint-import-resolver-typescript":"^4.2.5","eslint-plugin-comment-length":"2.2.1","eslint-plugin-import":"^2.31.0","eslint-plugin-jsdoc":"^50.6.9","eslint-plugin-prettier":"^5.2.5","eslint-plugin-react":"^7.37.5","eslint-plugin-react-hooks":"^5.2.0","fs-extra":"^10.0.0","gh-pages":"6.3.0",globals:"^16.0.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^2.0.0",jest:"^26.6.3","jest-fetch-mock":"^3.0.3",jsdom:"^17.0.0",prettier:"2.1.2",react:"^16.14.0","react-dom":"^16.14.0","react-resizable":"^1.11.0","react-resize-detector":"^6.6.0","react-test-renderer":"^17.0.2","react-use-flexsearch":"^0.1.1",rollup:"4.24.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^26.5.5","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","typescript-eslint":"^8.29.1","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^6.3.5"};var author="ThoughtSpot";var email="support@thoughtspot.com";var license="ThoughtSpot Development Tools End User License Agreement";var directories={lib:"lib"};var repository={type:"git",url:"git+https://github.com/thoughtspot/visual-embed-sdk.git"};var publishConfig={registry:"https://registry.npmjs.org"};var keywords=["thoughtspot","everywhere","embedded","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version$1,description:description,module:module,main:main,types:types,files:files,exports:exports,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.es.js",limit:"32 kB"}],scripts:scripts,peerDependencies:peerDependencies,dependencies:dependencies,devDependencies:devDependencies,author:author,email:email,license:license,directories:directories,repository:repository,publishConfig:publishConfig,keywords:keywords,bugs:bugs,homepage:homepage,globals:globals};
|
|
17534
17517
|
|
|
17535
17518
|
/**
|
|
17536
17519
|
* Reloads the ThoughtSpot iframe.
|
|
@@ -17602,6 +17585,16 @@ function processTrigger(iFrame, messageType, thoughtSpotHost, data) {
|
|
|
17602
17585
|
});
|
|
17603
17586
|
}
|
|
17604
17587
|
|
|
17588
|
+
var UIPassthroughEvent;
|
|
17589
|
+
(function (UIPassthroughEvent) {
|
|
17590
|
+
UIPassthroughEvent["PinAnswerToLiveboard"] = "addVizToPinboard";
|
|
17591
|
+
UIPassthroughEvent["SaveAnswer"] = "saveAnswer";
|
|
17592
|
+
UIPassthroughEvent["GetDiscoverabilityStatus"] = "getDiscoverabilityStatus";
|
|
17593
|
+
UIPassthroughEvent["GetAvailableUIPassthroughs"] = "getAvailableUiPassthroughs";
|
|
17594
|
+
UIPassthroughEvent["GetAnswerConfig"] = "getAnswerPageConfig";
|
|
17595
|
+
UIPassthroughEvent["GetLiveboardConfig"] = "getPinboardPageConfig";
|
|
17596
|
+
})(UIPassthroughEvent || (UIPassthroughEvent = {}));
|
|
17597
|
+
|
|
17605
17598
|
class HostEventClient {
|
|
17606
17599
|
constructor(iFrame) {
|
|
17607
17600
|
this.iFrame = iFrame;
|
|
@@ -17693,111 +17686,6 @@ class HostEventClient {
|
|
|
17693
17686
|
}
|
|
17694
17687
|
}
|
|
17695
17688
|
|
|
17696
|
-
const defaultUrls = {
|
|
17697
|
-
[InterceptedApiType.METADATA]: [
|
|
17698
|
-
'/prism/?op=CreateAnswerSession',
|
|
17699
|
-
'/prism/?op=GetV2SourceDetail',
|
|
17700
|
-
],
|
|
17701
|
-
[InterceptedApiType.ANSWER_DATA]: [
|
|
17702
|
-
'/prism/?op=GetChartWithData',
|
|
17703
|
-
'/prism/?op=GetTableWithHeadlineData',
|
|
17704
|
-
],
|
|
17705
|
-
[InterceptedApiType.LIVEBOARD_DATA]: [
|
|
17706
|
-
'/prism/?op=LoadContextBook'
|
|
17707
|
-
],
|
|
17708
|
-
};
|
|
17709
|
-
const formatInterceptUrl = (url) => {
|
|
17710
|
-
const host = getThoughtSpotHost(getEmbedConfig());
|
|
17711
|
-
if (url.startsWith('/'))
|
|
17712
|
-
return `${host}${url}`;
|
|
17713
|
-
return url;
|
|
17714
|
-
};
|
|
17715
|
-
const processInterceptUrls = (interceptUrls) => {
|
|
17716
|
-
let processedUrls = [...interceptUrls];
|
|
17717
|
-
Object.entries(defaultUrls).forEach(([apiType, apiTypeUrls]) => {
|
|
17718
|
-
if (!processedUrls.includes(apiType))
|
|
17719
|
-
return;
|
|
17720
|
-
processedUrls = processedUrls.filter(url => url !== apiType);
|
|
17721
|
-
processedUrls = [...processedUrls, ...apiTypeUrls];
|
|
17722
|
-
});
|
|
17723
|
-
return processedUrls.map(url => formatInterceptUrl(url));
|
|
17724
|
-
};
|
|
17725
|
-
const getInterceptInitData = (embedConfig, viewConfig) => {
|
|
17726
|
-
const enableApiIntercept = (embedConfig.enableApiIntercept || viewConfig.enableApiIntercept) && (viewConfig.enableApiIntercept !== false);
|
|
17727
|
-
if (!enableApiIntercept)
|
|
17728
|
-
return {
|
|
17729
|
-
enableApiIntercept: false,
|
|
17730
|
-
};
|
|
17731
|
-
const combinedUrls = [...(embedConfig.interceptUrls || []), ...(viewConfig.interceptUrls || [])];
|
|
17732
|
-
if (viewConfig.isOnBeforeGetVizDataInterceptEnabled) {
|
|
17733
|
-
combinedUrls.push(InterceptedApiType.ANSWER_DATA);
|
|
17734
|
-
}
|
|
17735
|
-
const shouldInterceptAll = combinedUrls.includes(InterceptedApiType.ALL);
|
|
17736
|
-
const interceptUrls = shouldInterceptAll ? [InterceptedApiType.ALL] : processInterceptUrls(combinedUrls);
|
|
17737
|
-
const interceptTimeout = embedConfig.interceptTimeout || viewConfig.interceptTimeout;
|
|
17738
|
-
return {
|
|
17739
|
-
interceptUrls,
|
|
17740
|
-
interceptTimeout,
|
|
17741
|
-
enableApiIntercept,
|
|
17742
|
-
};
|
|
17743
|
-
};
|
|
17744
|
-
/**
|
|
17745
|
-
*
|
|
17746
|
-
* @param fetchInit
|
|
17747
|
-
*/
|
|
17748
|
-
const parseInterceptData = (eventDataString) => {
|
|
17749
|
-
try {
|
|
17750
|
-
const { input, init } = JSON.parse(eventDataString);
|
|
17751
|
-
init.body = JSON.parse(init.body);
|
|
17752
|
-
const parsedInit = { input, init };
|
|
17753
|
-
return [parsedInit, null];
|
|
17754
|
-
}
|
|
17755
|
-
catch (error) {
|
|
17756
|
-
return [null, error];
|
|
17757
|
-
}
|
|
17758
|
-
};
|
|
17759
|
-
const handleInterceptEvent = async (params) => {
|
|
17760
|
-
var _a, _b, _c, _d, _e;
|
|
17761
|
-
const { eventData, executeEvent, viewConfig, getUnsavedAnswerTml } = params;
|
|
17762
|
-
const [interceptData, bodyParseError] = parseInterceptData(eventData.data);
|
|
17763
|
-
if (bodyParseError) {
|
|
17764
|
-
executeEvent(EmbedEvent.Error, {
|
|
17765
|
-
error: 'Error parsing api intercept body',
|
|
17766
|
-
});
|
|
17767
|
-
logger$3.error('Error parsing request body', bodyParseError);
|
|
17768
|
-
return;
|
|
17769
|
-
}
|
|
17770
|
-
const { input: requestUrl, init } = interceptData;
|
|
17771
|
-
const sessionId = (_c = (_b = (_a = init === null || init === void 0 ? void 0 : init.body) === null || _a === void 0 ? void 0 : _a.variables) === null || _b === void 0 ? void 0 : _b.session) === null || _c === void 0 ? void 0 : _c.sessionId;
|
|
17772
|
-
const vizId = (_e = (_d = init === null || init === void 0 ? void 0 : init.body) === null || _d === void 0 ? void 0 : _d.variables) === null || _e === void 0 ? void 0 : _e.contextBookId;
|
|
17773
|
-
if (defaultUrls.ANSWER_DATA.includes(requestUrl) && viewConfig.isOnBeforeGetVizDataInterceptEnabled) {
|
|
17774
|
-
const answerTml = await getUnsavedAnswerTml({ sessionId, vizId });
|
|
17775
|
-
executeEvent(EmbedEvent.OnBeforeGetVizDataIntercept, { data: { data: answerTml } });
|
|
17776
|
-
}
|
|
17777
|
-
executeEvent(EmbedEvent.ApiIntercept, interceptData);
|
|
17778
|
-
};
|
|
17779
|
-
const processLegacyInterceptResponse = (payload) => {
|
|
17780
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
17781
|
-
const errorText = ((_a = payload === null || payload === void 0 ? void 0 : payload.data) === null || _a === void 0 ? void 0 : _a.errorText) || ((_c = (_b = payload === null || payload === void 0 ? void 0 : payload.data) === null || _b === void 0 ? void 0 : _b.error) === null || _c === void 0 ? void 0 : _c.errorText);
|
|
17782
|
-
const errorDescription = ((_d = payload === null || payload === void 0 ? void 0 : payload.data) === null || _d === void 0 ? void 0 : _d.errorDescription) || ((_f = (_e = payload === null || payload === void 0 ? void 0 : payload.data) === null || _e === void 0 ? void 0 : _e.error) === null || _f === void 0 ? void 0 : _f.errorDescription);
|
|
17783
|
-
const payloadToSend = {
|
|
17784
|
-
execute: (_g = payload === null || payload === void 0 ? void 0 : payload.data) === null || _g === void 0 ? void 0 : _g.execute,
|
|
17785
|
-
response: {
|
|
17786
|
-
body: {
|
|
17787
|
-
errors: [
|
|
17788
|
-
{
|
|
17789
|
-
title: errorText,
|
|
17790
|
-
description: errorDescription,
|
|
17791
|
-
isUserError: true,
|
|
17792
|
-
},
|
|
17793
|
-
],
|
|
17794
|
-
data: {},
|
|
17795
|
-
},
|
|
17796
|
-
},
|
|
17797
|
-
};
|
|
17798
|
-
return { data: payloadToSend };
|
|
17799
|
-
};
|
|
17800
|
-
|
|
17801
17689
|
/**
|
|
17802
17690
|
* Copyright (c) 2022
|
|
17803
17691
|
*
|
|
@@ -17851,27 +17739,6 @@ class TsEmbed {
|
|
|
17851
17739
|
*/
|
|
17852
17740
|
this.fullscreenChangeHandler = null;
|
|
17853
17741
|
this.subscribedListeners = {};
|
|
17854
|
-
this.messageEventListener = async (event) => {
|
|
17855
|
-
const eventType = this.getEventType(event);
|
|
17856
|
-
const eventPort = this.getEventPort(event);
|
|
17857
|
-
const eventData = this.formatEventData(event, eventType);
|
|
17858
|
-
if (event.source === this.iFrame.contentWindow) {
|
|
17859
|
-
const processedEventData = await processEventData(eventType, eventData, this.thoughtSpotHost, this.isPreRendered ? this.preRenderWrapper : this.el);
|
|
17860
|
-
const executeEvent = (_eventType, data) => {
|
|
17861
|
-
this.executeCallbacks(_eventType, data, eventPort);
|
|
17862
|
-
};
|
|
17863
|
-
if (eventType === EmbedEvent.ApiIntercept && this.viewConfig.enableApiIntercept) {
|
|
17864
|
-
const getUnsavedAnswerTml = async (props) => {
|
|
17865
|
-
var _a;
|
|
17866
|
-
const response = await this.triggerUIPassThrough(UIPassthroughEvent.GetUnsavedAnswerTML, props);
|
|
17867
|
-
return (_a = response[0]) === null || _a === void 0 ? void 0 : _a.value;
|
|
17868
|
-
};
|
|
17869
|
-
handleInterceptEvent({ eventData: processedEventData, executeEvent, embedConfig: this.embedConfig, viewConfig: this.viewConfig, getUnsavedAnswerTml });
|
|
17870
|
-
return;
|
|
17871
|
-
}
|
|
17872
|
-
this.executeCallbacks(eventType, processedEventData, eventPort);
|
|
17873
|
-
}
|
|
17874
|
-
};
|
|
17875
17742
|
/**
|
|
17876
17743
|
* Send Custom style as part of payload of APP_INIT
|
|
17877
17744
|
* @param _
|
|
@@ -17956,18 +17823,6 @@ class TsEmbed {
|
|
|
17956
17823
|
this.on(EmbedEvent.AuthInit, authInitHandler, { start: false }, true);
|
|
17957
17824
|
};
|
|
17958
17825
|
this.showPreRenderByDefault = false;
|
|
17959
|
-
this.createEmbedEventResponder = (eventPort, eventType) => {
|
|
17960
|
-
const { enableApiIntercept } = getInterceptInitData(this.embedConfig, this.viewConfig);
|
|
17961
|
-
if (eventType === EmbedEvent.OnBeforeGetVizDataIntercept && enableApiIntercept) {
|
|
17962
|
-
return (payload) => {
|
|
17963
|
-
const payloadToSend = processLegacyInterceptResponse(payload);
|
|
17964
|
-
this.triggerEventOnPort(eventPort, payloadToSend);
|
|
17965
|
-
};
|
|
17966
|
-
}
|
|
17967
|
-
return (payload) => {
|
|
17968
|
-
this.triggerEventOnPort(eventPort, payload);
|
|
17969
|
-
};
|
|
17970
|
-
};
|
|
17971
17826
|
/**
|
|
17972
17827
|
* @hidden
|
|
17973
17828
|
* Internal state to track if the embed container is loaded.
|
|
@@ -18153,8 +18008,16 @@ class TsEmbed {
|
|
|
18153
18008
|
*/
|
|
18154
18009
|
subscribeToMessageEvents() {
|
|
18155
18010
|
this.unsubscribeToMessageEvents();
|
|
18156
|
-
|
|
18157
|
-
|
|
18011
|
+
const messageEventListener = (event) => {
|
|
18012
|
+
const eventType = this.getEventType(event);
|
|
18013
|
+
const eventPort = this.getEventPort(event);
|
|
18014
|
+
const eventData = this.formatEventData(event, eventType);
|
|
18015
|
+
if (event.source === this.iFrame.contentWindow) {
|
|
18016
|
+
this.executeCallbacks(eventType, processEventData(eventType, eventData, this.thoughtSpotHost, this.isPreRendered ? this.preRenderWrapper : this.el), eventPort);
|
|
18017
|
+
}
|
|
18018
|
+
};
|
|
18019
|
+
window.addEventListener('message', messageEventListener);
|
|
18020
|
+
this.subscribedListeners.message = messageEventListener;
|
|
18158
18021
|
}
|
|
18159
18022
|
/**
|
|
18160
18023
|
* Adds event listeners for both network and message events.
|
|
@@ -18215,7 +18078,7 @@ class TsEmbed {
|
|
|
18215
18078
|
message: customActionsResult.errors,
|
|
18216
18079
|
});
|
|
18217
18080
|
}
|
|
18218
|
-
|
|
18081
|
+
return {
|
|
18219
18082
|
customisations: getCustomisations(this.embedConfig, this.viewConfig),
|
|
18220
18083
|
authToken,
|
|
18221
18084
|
runtimeFilterParams: this.viewConfig.excludeRuntimeFiltersfromURL
|
|
@@ -18233,9 +18096,7 @@ class TsEmbed {
|
|
|
18233
18096
|
customVariablesForThirdPartyTools: this.embedConfig.customVariablesForThirdPartyTools || {},
|
|
18234
18097
|
hiddenListColumns: this.viewConfig.hiddenListColumns || [],
|
|
18235
18098
|
customActions: customActionsResult.actions,
|
|
18236
|
-
...getInterceptInitData(this.embedConfig, this.viewConfig),
|
|
18237
18099
|
};
|
|
18238
|
-
return baseInitData;
|
|
18239
18100
|
}
|
|
18240
18101
|
async getAppInitData() {
|
|
18241
18102
|
return this.getDefaultAppInitData();
|
|
@@ -18664,8 +18525,9 @@ class TsEmbed {
|
|
|
18664
18525
|
// When start status is false it trigger only end releated
|
|
18665
18526
|
// payload
|
|
18666
18527
|
|| (!callbackObj.options.start && dataStatus === embedEventStatus.END)) {
|
|
18667
|
-
|
|
18668
|
-
|
|
18528
|
+
callbackObj.callback(data, (payload) => {
|
|
18529
|
+
this.triggerEventOnPort(eventPort, payload);
|
|
18530
|
+
});
|
|
18669
18531
|
}
|
|
18670
18532
|
});
|
|
18671
18533
|
}
|
|
@@ -18938,11 +18800,26 @@ class TsEmbed {
|
|
|
18938
18800
|
* @version SDK: 1.19.1 | ThoughtSpot: *
|
|
18939
18801
|
*/
|
|
18940
18802
|
destroy() {
|
|
18941
|
-
var _a;
|
|
18803
|
+
var _a, _b;
|
|
18942
18804
|
try {
|
|
18943
18805
|
this.removeFullscreenChangeHandler();
|
|
18944
|
-
(_a = this.insertedDomEl) === null || _a === void 0 ? void 0 : _a.parentNode.removeChild(this.insertedDomEl);
|
|
18945
18806
|
this.unsubscribeToEvents();
|
|
18807
|
+
if (!getEmbedConfig().waitForCleanupOnDestroy) {
|
|
18808
|
+
this.trigger(HostEvent.DestroyEmbed);
|
|
18809
|
+
(_b = (_a = this.insertedDomEl) === null || _a === void 0 ? void 0 : _a.parentNode) === null || _b === void 0 ? void 0 : _b.removeChild(this.insertedDomEl);
|
|
18810
|
+
}
|
|
18811
|
+
else {
|
|
18812
|
+
const cleanupTimeout = getEmbedConfig().cleanupTimeout;
|
|
18813
|
+
Promise.race([
|
|
18814
|
+
this.trigger(HostEvent.DestroyEmbed),
|
|
18815
|
+
new Promise((resolve) => setTimeout(resolve, cleanupTimeout)),
|
|
18816
|
+
]).then(() => {
|
|
18817
|
+
var _a, _b;
|
|
18818
|
+
(_b = (_a = this.insertedDomEl) === null || _a === void 0 ? void 0 : _a.parentNode) === null || _b === void 0 ? void 0 : _b.removeChild(this.insertedDomEl);
|
|
18819
|
+
}).catch((e) => {
|
|
18820
|
+
logger$3.log('Error destroying TS Embed', e);
|
|
18821
|
+
});
|
|
18822
|
+
}
|
|
18946
18823
|
}
|
|
18947
18824
|
catch (e) {
|
|
18948
18825
|
logger$3.log('Error destroying TS Embed', e);
|
|
@@ -19375,7 +19252,7 @@ class AppEmbed extends V1Embed {
|
|
|
19375
19252
|
* embedded Liveboard or visualization.
|
|
19376
19253
|
*/
|
|
19377
19254
|
getEmbedParams() {
|
|
19378
|
-
const { tag, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideHamburger, hideObjectSearch, hideNotification, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 = true, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, hideHomepageLeftNav = false, modularHomeExperience = false, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, enable2ColumnLayout, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false, dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, discoveryExperience, coverAndFilterOptionInPDF = false, liveboardXLSXCSVDownload = false, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, isLinkParametersEnabled, } = this.viewConfig;
|
|
19255
|
+
const { tag, hideTagFilterChips, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideHamburger, hideObjectSearch, hideNotification, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 = true, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, hideHomepageLeftNav = false, modularHomeExperience = false, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, enable2ColumnLayout, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false, dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, isEnhancedFilterInteractivityEnabled = false, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, discoveryExperience, coverAndFilterOptionInPDF = false, liveboardXLSXCSVDownload = false, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, isCentralizedLiveboardFilterUXEnabled = false, isLinkParametersEnabled, } = this.viewConfig;
|
|
19379
19256
|
let params = {};
|
|
19380
19257
|
params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
|
|
19381
19258
|
params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
|
|
@@ -19387,6 +19264,7 @@ class AppEmbed extends V1Embed {
|
|
|
19387
19264
|
params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
|
|
19388
19265
|
params[Param.IsFullAppEmbed] = true;
|
|
19389
19266
|
params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
|
|
19267
|
+
params[Param.IsEnhancedFilterInteractivityEnabled] = isEnhancedFilterInteractivityEnabled;
|
|
19390
19268
|
params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;
|
|
19391
19269
|
params[Param.ShowLiveboardReverifyBanner] = showLiveboardReverifyBanner;
|
|
19392
19270
|
params[Param.HideIrrelevantFiltersInTab] = hideIrrelevantChipsInLiveboardTabs;
|
|
@@ -19428,8 +19306,7 @@ class AppEmbed extends V1Embed {
|
|
|
19428
19306
|
if (enableAskSage) {
|
|
19429
19307
|
params[Param.enableAskSage] = enableAskSage;
|
|
19430
19308
|
}
|
|
19431
|
-
|
|
19432
|
-
if (isOnBeforeGetVizDataInterceptEnabled && !enableApiIntercept) {
|
|
19309
|
+
if (isOnBeforeGetVizDataInterceptEnabled) {
|
|
19433
19310
|
params[Param.IsOnBeforeGetVizDataInterceptEnabled] = isOnBeforeGetVizDataInterceptEnabled;
|
|
19434
19311
|
}
|
|
19435
19312
|
if (homePageSearchBarMode) {
|
|
@@ -19444,9 +19321,15 @@ class AppEmbed extends V1Embed {
|
|
|
19444
19321
|
if (isPNGInScheduledEmailsEnabled !== undefined) {
|
|
19445
19322
|
params[Param.isPNGInScheduledEmailsEnabled] = isPNGInScheduledEmailsEnabled;
|
|
19446
19323
|
}
|
|
19324
|
+
if (hideTagFilterChips !== undefined) {
|
|
19325
|
+
params[Param.HideTagFilterChips] = hideTagFilterChips;
|
|
19326
|
+
}
|
|
19447
19327
|
if (isLinkParametersEnabled !== undefined) {
|
|
19448
19328
|
params[Param.isLinkParametersEnabled] = isLinkParametersEnabled;
|
|
19449
19329
|
}
|
|
19330
|
+
if (isCentralizedLiveboardFilterUXEnabled != undefined) {
|
|
19331
|
+
params[Param.isCentralizedLiveboardFilterUXEnabled] = isCentralizedLiveboardFilterUXEnabled;
|
|
19332
|
+
}
|
|
19450
19333
|
params[Param.DataPanelV2Enabled] = dataPanelV2;
|
|
19451
19334
|
params[Param.HideHomepageLeftNav] = hideHomepageLeftNav;
|
|
19452
19335
|
params[Param.ModularHomeExperienceEnabled] = modularHomeExperience;
|
|
@@ -19801,7 +19684,7 @@ class LiveboardEmbed extends V1Embed {
|
|
|
19801
19684
|
getEmbedParamsObject() {
|
|
19802
19685
|
let params = {};
|
|
19803
19686
|
params = this.getBaseQueryParams(params);
|
|
19804
|
-
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 = true, enableCustomColumnGroups = false, oAuthPollingInterval, isForceRedirect, dataSourceId, coverAndFilterOptionInPDF = false, liveboardXLSXCSVDownload = false, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, showSpotterLimitations, isLinkParametersEnabled, } = this.viewConfig;
|
|
19687
|
+
const { enableVizTransformations, fullHeight, defaultHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, isEnhancedFilterInteractivityEnabled = false, enableAskSage, enable2ColumnLayout, dataPanelV2 = true, enableCustomColumnGroups = false, oAuthPollingInterval, isForceRedirect, dataSourceId, coverAndFilterOptionInPDF = false, liveboardXLSXCSVDownload = false, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, showSpotterLimitations, isCentralizedLiveboardFilterUXEnabled = false, isLinkParametersEnabled, } = this.viewConfig;
|
|
19805
19688
|
const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
|
|
19806
19689
|
|| this.viewConfig.preventPinboardFilterRemoval;
|
|
19807
19690
|
if (fullHeight === true) {
|
|
@@ -19869,11 +19752,15 @@ class LiveboardEmbed extends V1Embed {
|
|
|
19869
19752
|
if (isLinkParametersEnabled !== undefined) {
|
|
19870
19753
|
params[Param.isLinkParametersEnabled] = isLinkParametersEnabled;
|
|
19871
19754
|
}
|
|
19755
|
+
if (isCentralizedLiveboardFilterUXEnabled !== undefined) {
|
|
19756
|
+
params[Param.isCentralizedLiveboardFilterUXEnabled] = isCentralizedLiveboardFilterUXEnabled;
|
|
19757
|
+
}
|
|
19872
19758
|
params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
|
|
19873
19759
|
params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
|
|
19874
19760
|
params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;
|
|
19875
19761
|
params[Param.ShowLiveboardReverifyBanner] = showLiveboardReverifyBanner;
|
|
19876
19762
|
params[Param.HideIrrelevantFiltersInTab] = hideIrrelevantChipsInLiveboardTabs;
|
|
19763
|
+
params[Param.IsEnhancedFilterInteractivityEnabled] = isEnhancedFilterInteractivityEnabled;
|
|
19877
19764
|
params[Param.DataPanelV2Enabled] = dataPanelV2;
|
|
19878
19765
|
params[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
|
|
19879
19766
|
params[Param.CoverAndFilterOptionInPDF] = coverAndFilterOptionInPDF;
|
|
@@ -20155,8 +20042,7 @@ class SearchEmbed extends TsEmbed {
|
|
|
20155
20042
|
if (hideSearchBar) {
|
|
20156
20043
|
queryParams[Param.HideSearchBar] = true;
|
|
20157
20044
|
}
|
|
20158
|
-
|
|
20159
|
-
if (isOnBeforeGetVizDataInterceptEnabled && !enableApiIntercept) {
|
|
20045
|
+
if (isOnBeforeGetVizDataInterceptEnabled) {
|
|
20160
20046
|
queryParams[Param.IsOnBeforeGetVizDataInterceptEnabled] = isOnBeforeGetVizDataInterceptEnabled;
|
|
20161
20047
|
}
|
|
20162
20048
|
if (!focusSearchBarOnRender) {
|
|
@@ -20868,7 +20754,7 @@ class SpotterEmbed extends TsEmbed {
|
|
|
20868
20754
|
this.viewConfig = viewConfig;
|
|
20869
20755
|
}
|
|
20870
20756
|
getEmbedParamsObject() {
|
|
20871
|
-
const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, } = this.viewConfig;
|
|
20757
|
+
const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, enablePastConversationsSidebar, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, } = this.viewConfig;
|
|
20872
20758
|
if (!worksheetId) {
|
|
20873
20759
|
this.handleError(ERROR_MESSAGE.SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND);
|
|
20874
20760
|
}
|
|
@@ -20892,9 +20778,12 @@ class SpotterEmbed extends TsEmbed {
|
|
|
20892
20778
|
return queryParams;
|
|
20893
20779
|
}
|
|
20894
20780
|
getIframeSrc() {
|
|
20895
|
-
const { worksheetId, searchOptions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, } = this.viewConfig;
|
|
20781
|
+
const { worksheetId, searchOptions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, enablePastConversationsSidebar } = this.viewConfig;
|
|
20896
20782
|
const path = 'insights/conv-assist';
|
|
20897
20783
|
const queryParams = this.getEmbedParamsObject();
|
|
20784
|
+
if (!isUndefined_1(enablePastConversationsSidebar)) {
|
|
20785
|
+
queryParams[Param.EnablePastConversationsSidebar] = !!enablePastConversationsSidebar;
|
|
20786
|
+
}
|
|
20898
20787
|
let query = '';
|
|
20899
20788
|
const queryParamsString = getQueryParamString(queryParams, true);
|
|
20900
20789
|
if (queryParamsString) {
|
|
@@ -21550,4 +21439,4 @@ const createLiveboardWithAnswers = async (answers, name) => {
|
|
|
21550
21439
|
return result;
|
|
21551
21440
|
};
|
|
21552
21441
|
|
|
21553
|
-
export { Action, AnswerService, AppEmbed, AuthEvent, AuthFailureType, AuthStatus, AuthType, BodylessConversation, ContextMenuTriggerOptions, ConversationEmbed, CustomActionTarget, CustomActionsPosition, DataPanelCustomColumnGroupsAccordionState$1 as DataPanelCustomColumnGroupsAccordionState, DataSourceVisualMode, EmbedEvent, HomeLeftNavItem, HomePage, HomePageSearchBarMode, HomepageModule, HostEvent,
|
|
21442
|
+
export { Action, AnswerService, AppEmbed, AuthEvent, AuthFailureType, AuthStatus, AuthType, BodylessConversation, ContextMenuTriggerOptions, ConversationEmbed, CustomActionTarget, CustomActionsPosition, DataPanelCustomColumnGroupsAccordionState$1 as DataPanelCustomColumnGroupsAccordionState, DataSourceVisualMode, EmbedEvent, HomeLeftNavItem, HomePage, HomePageSearchBarMode, HomepageModule, HostEvent, ListPage, ListPageColumns, LiveboardEmbed, LogLevel, MIXPANEL_EVENT, Page, PinboardEmbed, PrefetchFeatures, PrimaryNavbarVersion, RuntimeFilterOp, SageEmbed, SearchBarEmbed, SearchEmbed, SpotterAgentEmbed, SpotterEmbed, UIPassthroughEvent, createLiveboardWithAnswers, executeTML, exportTML, getAnswerFromQuery, getEmbedConfig as getInitConfig, getSessionInfo, init, logout, prefetch, resetCachedAuthToken, tokenizedFetch, uploadMixpanelEvent };
|