@thoughtspot/visual-embed-sdk 1.36.2 → 1.36.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 +1 -1
- package/cjs/src/authToken.d.ts.map +1 -1
- package/cjs/src/authToken.js +10 -3
- package/cjs/src/authToken.js.map +1 -1
- package/cjs/src/embed/app.d.ts +14 -0
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +4 -1
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/app.spec.js +17 -0
- package/cjs/src/embed/app.spec.js.map +1 -1
- package/cjs/src/embed/embedConfig.d.ts +1 -1
- package/cjs/src/embed/embedConfig.d.ts.map +1 -1
- package/cjs/src/embed/embedConfig.js +5 -4
- package/cjs/src/embed/embedConfig.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts +4 -1
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/types.d.ts +85 -66
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +78 -59
- package/cjs/src/types.js.map +1 -1
- package/cjs/src/utils.d.ts +12 -0
- package/cjs/src/utils.d.ts.map +1 -1
- package/cjs/src/utils.js +21 -1
- package/cjs/src/utils.js.map +1 -1
- package/cjs/src/utils.spec.js +15 -0
- package/cjs/src/utils.spec.js.map +1 -1
- package/dist/{index-B3hd6DTM.js → index-BJx3m5_V.js} +1 -1
- package/dist/src/authToken.d.ts.map +1 -1
- package/dist/src/embed/app.d.ts +14 -0
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/embedConfig.d.ts +1 -1
- package/dist/src/embed/embedConfig.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts +4 -1
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/types.d.ts +85 -66
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils.d.ts +12 -0
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +115 -69
- package/dist/tsembed-react.js +114 -68
- package/dist/tsembed.es.js +117 -71
- package/dist/tsembed.js +116 -70
- package/dist/visual-embed-sdk-react-full.d.ts +104 -68
- package/dist/visual-embed-sdk-react.d.ts +104 -68
- package/dist/visual-embed-sdk.d.ts +104 -68
- package/lib/package.json +1 -1
- package/lib/src/authToken.d.ts.map +1 -1
- package/lib/src/authToken.js +10 -3
- package/lib/src/authToken.js.map +1 -1
- package/lib/src/embed/app.d.ts +14 -0
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +4 -1
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/app.spec.js +17 -0
- package/lib/src/embed/app.spec.js.map +1 -1
- package/lib/src/embed/embedConfig.d.ts +1 -1
- package/lib/src/embed/embedConfig.d.ts.map +1 -1
- package/lib/src/embed/embedConfig.js +5 -4
- package/lib/src/embed/embedConfig.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts +4 -1
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/types.d.ts +85 -66
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +78 -59
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils.d.ts +12 -0
- package/lib/src/utils.d.ts.map +1 -1
- package/lib/src/utils.js +18 -0
- package/lib/src/utils.js.map +1 -1
- package/lib/src/utils.spec.js +16 -1
- package/lib/src/utils.spec.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +104 -68
- package/package.json +1 -1
- package/src/authToken.ts +11 -3
- package/src/embed/app.spec.ts +27 -0
- package/src/embed/app.ts +19 -0
- package/src/embed/embedConfig.ts +5 -4
- package/src/embed/liveboard.ts +4 -1
- package/src/types.ts +89 -70
- package/src/utils.spec.ts +21 -0
- package/src/utils.ts +21 -0
- package/cjs/src/embed/searchEmbed-basic-auth.spec.d.ts +0 -2
- package/cjs/src/embed/searchEmbed-basic-auth.spec.d.ts.map +0 -1
- package/cjs/src/embed/searchEmbed-basic-auth.spec.js +0 -104
- package/cjs/src/embed/searchEmbed-basic-auth.spec.js.map +0 -1
- package/cjs/src/hostEventsTypeMapping.d.ts +0 -2
- package/cjs/src/hostEventsTypeMapping.d.ts.map +0 -1
- package/cjs/src/hostEventsTypeMapping.js +0 -4
- package/cjs/src/hostEventsTypeMapping.js.map +0 -1
- package/cjs/src/utils/embedApi/contracts.d.ts +0 -101
- package/cjs/src/utils/embedApi/contracts.d.ts.map +0 -1
- package/cjs/src/utils/embedApi/contracts.js +0 -17
- package/cjs/src/utils/embedApi/contracts.js.map +0 -1
- package/cjs/src/utils/embedApi/embedApiClient.d.ts +0 -12
- package/cjs/src/utils/embedApi/embedApiClient.d.ts.map +0 -1
- package/cjs/src/utils/embedApi/embedApiClient.js +0 -46
- package/cjs/src/utils/embedApi/embedApiClient.js.map +0 -1
- package/cjs/src/utils/embedApi/processEmbedApi.d.ts +0 -9
- package/cjs/src/utils/embedApi/processEmbedApi.d.ts.map +0 -1
- package/cjs/src/utils/embedApi/processEmbedApi.js +0 -18
- package/cjs/src/utils/embedApi/processEmbedApi.js.map +0 -1
- package/dist/index-BBBimG1x.js +0 -7370
- package/dist/index-BGnxP5NY.js +0 -7370
- package/dist/index-CENLvayL.js +0 -7370
- package/dist/index-CR5u7BMC.js +0 -7370
- package/dist/index-CbltIawo.js +0 -7370
- package/dist/index-CoQfqaHj.js +0 -7370
- package/dist/index-CzwzS0P4.js +0 -7370
- package/dist/index-D-9WUCUl.js +0 -7370
- package/dist/index-DFwi_pV_.js +0 -7370
- package/dist/index-DOIjN0N_.js +0 -7370
- package/dist/index-DYBx8SuE.js +0 -7370
- package/dist/index-DaLHJaLd.js +0 -7370
- package/dist/index-DnJX-gN2.js +0 -7370
- package/dist/index-DpuhnTj2.js +0 -7370
- package/dist/index-IDmSUe93.js +0 -7370
- package/dist/index-nWevLycs.js +0 -7370
- package/dist/index-vxW97_xb.js +0 -7370
- package/dist/src/embed/searchEmbed-basic-auth.spec.d.ts +0 -2
- package/dist/src/embed/searchEmbed-basic-auth.spec.d.ts.map +0 -1
- package/dist/src/hostEventsTypeMapping.d.ts +0 -2
- package/dist/src/hostEventsTypeMapping.d.ts.map +0 -1
- package/dist/src/utils/embedApi/contracts.d.ts +0 -101
- package/dist/src/utils/embedApi/contracts.d.ts.map +0 -1
- package/dist/src/utils/embedApi/embedApiClient.d.ts +0 -12
- package/dist/src/utils/embedApi/embedApiClient.d.ts.map +0 -1
- package/dist/src/utils/embedApi/processEmbedApi.d.ts +0 -9
- package/dist/src/utils/embedApi/processEmbedApi.d.ts.map +0 -1
- package/lib/src/embed/searchEmbed-basic-auth.spec.d.ts +0 -2
- package/lib/src/embed/searchEmbed-basic-auth.spec.d.ts.map +0 -1
- package/lib/src/embed/searchEmbed-basic-auth.spec.js +0 -101
- package/lib/src/embed/searchEmbed-basic-auth.spec.js.map +0 -1
- package/lib/src/hostEventsTypeMapping.d.ts +0 -2
- package/lib/src/hostEventsTypeMapping.d.ts.map +0 -1
- package/lib/src/hostEventsTypeMapping.js +0 -2
- package/lib/src/hostEventsTypeMapping.js.map +0 -1
- package/lib/src/utils/embedApi/contracts.d.ts +0 -101
- package/lib/src/utils/embedApi/contracts.d.ts.map +0 -1
- package/lib/src/utils/embedApi/contracts.js +0 -14
- package/lib/src/utils/embedApi/contracts.js.map +0 -1
- package/lib/src/utils/embedApi/embedApiClient.d.ts +0 -12
- package/lib/src/utils/embedApi/embedApiClient.d.ts.map +0 -1
- package/lib/src/utils/embedApi/embedApiClient.js +0 -42
- package/lib/src/utils/embedApi/embedApiClient.js.map +0 -1
- package/lib/src/utils/embedApi/processEmbedApi.d.ts +0 -9
- package/lib/src/utils/embedApi/processEmbedApi.d.ts.map +0 -1
- package/lib/src/utils/embedApi/processEmbedApi.js +0 -14
- package/lib/src/utils/embedApi/processEmbedApi.js.map +0 -1
|
@@ -160,6 +160,20 @@ declare module '@thoughtspot/visual-embed-sdk/embed/app' {
|
|
|
160
160
|
* ```
|
|
161
161
|
*/
|
|
162
162
|
disableProfileAndHelp?: boolean;
|
|
163
|
+
/**
|
|
164
|
+
* @version SDK: 1.36.3 | ThoughtSpot: 10.1.0.cl
|
|
165
|
+
* @default true
|
|
166
|
+
* Whether the help menu in the top nav bar should be served
|
|
167
|
+
* from Pendo or ThoughtSpot's internal help items.
|
|
168
|
+
* @example
|
|
169
|
+
* ```js
|
|
170
|
+
* const embed = new AppEmbed('#tsEmbed', {
|
|
171
|
+
* ... // other options
|
|
172
|
+
* enablePendoHelp: false,
|
|
173
|
+
* });
|
|
174
|
+
* ```
|
|
175
|
+
*/
|
|
176
|
+
enablePendoHelp?: boolean;
|
|
163
177
|
/**
|
|
164
178
|
* Control the visibility of the application switcher button on the nav-bar.
|
|
165
179
|
* By default, the application switcher is shown.
|
|
@@ -947,7 +961,10 @@ declare module '@thoughtspot/visual-embed-sdk/embed/liveboard' {
|
|
|
947
961
|
*/
|
|
948
962
|
showPreviewLoader?: boolean;
|
|
949
963
|
/**
|
|
950
|
-
*
|
|
964
|
+
* Enables or disables the compact header feature on a Liveboard.
|
|
965
|
+
* Compact Liveboard header is turned off by default on Liveboards in
|
|
966
|
+
* ThoughtSpot Embedded apps.
|
|
967
|
+
*
|
|
951
968
|
* @type {boolean}
|
|
952
969
|
* @default false
|
|
953
970
|
* @version SDK: 1.35.0 | ThoughtSpot:10.3.0.cl
|
|
@@ -2164,9 +2181,9 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
2164
2181
|
export interface customCssInterface {
|
|
2165
2182
|
/**
|
|
2166
2183
|
* The custom css variables, which can be set.
|
|
2167
|
-
* The
|
|
2184
|
+
* The variables are available in the {@link CustomCssVariables}
|
|
2168
2185
|
* interface. For more information, see
|
|
2169
|
-
* link:https://developers.thoughtspot.com/docs/css-variables-reference
|
|
2186
|
+
* link:https://developers.thoughtspot.com/docs/css-variables-reference[CSS variable reference].
|
|
2170
2187
|
*/
|
|
2171
2188
|
variables?: CustomCssVariables;
|
|
2172
2189
|
/**
|
|
@@ -2693,7 +2710,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
2693
2710
|
*/
|
|
2694
2711
|
showAlerts?: boolean;
|
|
2695
2712
|
/**
|
|
2696
|
-
* The list of runtime filters to apply to a search
|
|
2713
|
+
* The list of runtime filters to apply to a search Answer,
|
|
2697
2714
|
* visualization, or Liveboard.
|
|
2698
2715
|
* @version SDK: 1.9.4 | ThoughtSpot 8.1.0.cl, 8.4.1.sw
|
|
2699
2716
|
* @example
|
|
@@ -2712,7 +2729,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
2712
2729
|
*/
|
|
2713
2730
|
runtimeFilters?: RuntimeFilter[];
|
|
2714
2731
|
/**
|
|
2715
|
-
* The list of parameter override to apply to a search
|
|
2732
|
+
* The list of parameter override to apply to a search Answer,
|
|
2716
2733
|
* visualization, or Liveboard.
|
|
2717
2734
|
* @version SDK : 1.25.0 | ThoughtSpot: 9.2.0.cl, 9.5.0.sw
|
|
2718
2735
|
* @example
|
|
@@ -2730,7 +2747,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
2730
2747
|
*/
|
|
2731
2748
|
runtimeParameters?: RuntimeParameter[];
|
|
2732
2749
|
/**
|
|
2733
|
-
* The locale
|
|
2750
|
+
* The locale settings to apply to the embedded view.
|
|
2734
2751
|
* @version SDK: 1.9.4 | ThoughtSpot 8.1.0.cl, 8.4.1.sw
|
|
2735
2752
|
* @example
|
|
2736
2753
|
* ```js
|
|
@@ -2797,7 +2814,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
2797
2814
|
*/
|
|
2798
2815
|
contextMenuTrigger?: ContextMenuTriggerOptions;
|
|
2799
2816
|
/**
|
|
2800
|
-
* Flag to override
|
|
2817
|
+
* Flag to override the *Open Link in New Tab* context menu option.
|
|
2801
2818
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
|
|
2802
2819
|
* @example
|
|
2803
2820
|
* ```js
|
|
@@ -2936,7 +2953,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
2936
2953
|
*/
|
|
2937
2954
|
preRenderId?: string;
|
|
2938
2955
|
/**
|
|
2939
|
-
* Determines
|
|
2956
|
+
* Determines if the PreRender component should dynamically track the size
|
|
2940
2957
|
* of its embedding element and adjust its own size accordingly.
|
|
2941
2958
|
* Enabling this option allows the PreRender component to automatically adapt
|
|
2942
2959
|
* its dimensions based on changes to the size of the embedding element.
|
|
@@ -3308,8 +3325,8 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
3308
3325
|
*/
|
|
3309
3326
|
Load = "load",
|
|
3310
3327
|
/**
|
|
3311
|
-
* Data pertaining to
|
|
3312
|
-
* @return data - The
|
|
3328
|
+
* Data pertaining to an Answer or Liveboard is received
|
|
3329
|
+
* @return data - The Answer or Liveboard data
|
|
3313
3330
|
* @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
|
|
3314
3331
|
* @example
|
|
3315
3332
|
*```js
|
|
@@ -3483,7 +3500,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
3483
3500
|
*/
|
|
3484
3501
|
Alert = "alert",
|
|
3485
3502
|
/**
|
|
3486
|
-
* The ThoughtSpot
|
|
3503
|
+
* The ThoughtSpot authentication session has expired.
|
|
3487
3504
|
* @version SDK: 1.4.0 | ThoughtSpot: ts7.sep.cl, 8.4.1.sw
|
|
3488
3505
|
* @example
|
|
3489
3506
|
*```js
|
|
@@ -3553,7 +3570,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
3553
3570
|
/**
|
|
3554
3571
|
* Emitted when the embed does not have cookie access. This happens
|
|
3555
3572
|
* when Safari and other Web browsers block third-party cookies
|
|
3556
|
-
* are blocked by default. `NoCookieAccess` can trigger
|
|
3573
|
+
* are blocked by default. `NoCookieAccess` can trigger.
|
|
3557
3574
|
* @example
|
|
3558
3575
|
*```js
|
|
3559
3576
|
* appEmbed.on(EmbedEvent.NoCookieAccess)
|
|
@@ -3641,7 +3658,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
3641
3658
|
*/
|
|
3642
3659
|
Save = "save",
|
|
3643
3660
|
/**
|
|
3644
|
-
* Emitted when the download action is triggered on an
|
|
3661
|
+
* Emitted when the download action is triggered on an Answer.
|
|
3645
3662
|
*
|
|
3646
3663
|
* **Note**: This event is deprecated in v1.21.0.
|
|
3647
3664
|
* To fire an event when a download action is initiated on a chart or table,
|
|
@@ -3657,7 +3674,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
3657
3674
|
*/
|
|
3658
3675
|
Download = "download",
|
|
3659
3676
|
/**
|
|
3660
|
-
* Emitted when the download action is triggered on an
|
|
3677
|
+
* Emitted when the download action is triggered on an Answer.
|
|
3661
3678
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.0.sw
|
|
3662
3679
|
* @example
|
|
3663
3680
|
*```js
|
|
@@ -3671,7 +3688,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
3671
3688
|
*/
|
|
3672
3689
|
DownloadAsPng = "downloadAsPng",
|
|
3673
3690
|
/**
|
|
3674
|
-
* Emitted when the Download as PDF action is triggered on an
|
|
3691
|
+
* Emitted when the Download as PDF action is triggered on an Answer
|
|
3675
3692
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
3676
3693
|
* @example
|
|
3677
3694
|
*```js
|
|
@@ -3685,7 +3702,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
3685
3702
|
*/
|
|
3686
3703
|
DownloadAsPdf = "downloadAsPdf",
|
|
3687
3704
|
/**
|
|
3688
|
-
* Emitted when the Download as CSV action is triggered on an
|
|
3705
|
+
* Emitted when the Download as CSV action is triggered on an Answer.
|
|
3689
3706
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
3690
3707
|
* @example
|
|
3691
3708
|
*```js
|
|
@@ -3699,7 +3716,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
3699
3716
|
*/
|
|
3700
3717
|
DownloadAsCsv = "downloadAsCsv",
|
|
3701
3718
|
/**
|
|
3702
|
-
* Emitted when the Download as XLSX action is triggered on an
|
|
3719
|
+
* Emitted when the Download as XLSX action is triggered on an Answer.
|
|
3703
3720
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
3704
3721
|
* @example
|
|
3705
3722
|
*```js
|
|
@@ -3727,7 +3744,8 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
3727
3744
|
*/
|
|
3728
3745
|
AnswerDelete = "answerDelete",
|
|
3729
3746
|
/**
|
|
3730
|
-
* Emitted when
|
|
3747
|
+
* Emitted when a user initiates the Pin action to
|
|
3748
|
+
* add an Answer to a Liveboard.
|
|
3731
3749
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
3732
3750
|
* @example
|
|
3733
3751
|
*```js
|
|
@@ -3865,7 +3883,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
3865
3883
|
*/
|
|
3866
3884
|
SaveAsView = "saveAsView",
|
|
3867
3885
|
/**
|
|
3868
|
-
* Emitted when the user creates a copy of an Answer
|
|
3886
|
+
* Emitted when the user creates a copy of an Answer.
|
|
3869
3887
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
3870
3888
|
* @example
|
|
3871
3889
|
*```js
|
|
@@ -3879,7 +3897,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
3879
3897
|
*/
|
|
3880
3898
|
CopyAEdit = "copyAEdit",
|
|
3881
3899
|
/**
|
|
3882
|
-
* Emitted when a user clicks Show underlying data on an Answer
|
|
3900
|
+
* Emitted when a user clicks *Show underlying data* on an Answer.
|
|
3883
3901
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
3884
3902
|
* @example
|
|
3885
3903
|
*```js
|
|
@@ -3890,7 +3908,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
3890
3908
|
*/
|
|
3891
3909
|
ShowUnderlyingData = "showUnderlyingData",
|
|
3892
3910
|
/**
|
|
3893
|
-
* Emitted when an
|
|
3911
|
+
* Emitted when an Answer is switched to a chart or table view.
|
|
3894
3912
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
3895
3913
|
* @example
|
|
3896
3914
|
*```js
|
|
@@ -4024,11 +4042,12 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
4024
4042
|
*/
|
|
4025
4043
|
CopyLink = "embedDocument",
|
|
4026
4044
|
/**
|
|
4027
|
-
* Emitted when a user interacts with cross filters on a
|
|
4045
|
+
* Emitted when a user interacts with cross filters on a
|
|
4046
|
+
* visualization or Liveboard.
|
|
4028
4047
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.5.0.sw
|
|
4029
4048
|
* @example
|
|
4030
4049
|
*```js
|
|
4031
|
-
* liveboardEmbed.
|
|
4050
|
+
* liveboardEmbed.on(EmbedEvent.CrossFilterChanged, {
|
|
4032
4051
|
* vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
4033
4052
|
*```
|
|
4034
4053
|
*/
|
|
@@ -4122,8 +4141,8 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
4122
4141
|
*/
|
|
4123
4142
|
DeletePersonalisedView = "deletePersonalisedView",
|
|
4124
4143
|
/**
|
|
4125
|
-
* Emitted when a user creates a
|
|
4126
|
-
* @version SDK : 1.27.0 | ThoughtSpot
|
|
4144
|
+
* Emitted when a user creates a Worksheet.
|
|
4145
|
+
* @version SDK : 1.27.0 | ThoughtSpot: 9.8.0.cl, 9.8.0.sw
|
|
4127
4146
|
*/
|
|
4128
4147
|
CreateWorksheet = "createWorksheet",
|
|
4129
4148
|
/**
|
|
@@ -4136,8 +4155,8 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
4136
4155
|
*/
|
|
4137
4156
|
AskSageInit = "AskSageInit",
|
|
4138
4157
|
/**
|
|
4139
|
-
* Emitted when a
|
|
4140
|
-
* @version SDK : 1.28.0 | ThoughtSpot: 9.10.5.cl
|
|
4158
|
+
* Emitted when a Liveboard or visualization is renamed.
|
|
4159
|
+
* @version SDK : 1.28.0 | ThoughtSpot: 9.10.5.cl, 10.1.0.sw
|
|
4141
4160
|
*/
|
|
4142
4161
|
Rename = "rename",
|
|
4143
4162
|
/**
|
|
@@ -4201,8 +4220,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
4201
4220
|
OnBeforeGetVizDataIntercept = "onBeforeGetVizDataIntercept",
|
|
4202
4221
|
/**
|
|
4203
4222
|
* Emitted when parameter changes in an Answer
|
|
4204
|
-
* or Liveboard
|
|
4205
|
-
*
|
|
4223
|
+
* or Liveboard.
|
|
4206
4224
|
* ```js
|
|
4207
4225
|
* liveboardEmbed.on(EmbedEvent.ParameterChanged, (payload) => {
|
|
4208
4226
|
* console.log('payload', payload);
|
|
@@ -4229,7 +4247,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
4229
4247
|
*/
|
|
4230
4248
|
TableVizRendered = "TableVizRendered",
|
|
4231
4249
|
/**
|
|
4232
|
-
* Emitted when the liveboard is created from pin modal or
|
|
4250
|
+
* Emitted when the liveboard is created from pin modal or Liveboard list page.
|
|
4233
4251
|
* You can use this event as a hook to trigger
|
|
4234
4252
|
* other events on liveboard creation.
|
|
4235
4253
|
*
|
|
@@ -4372,7 +4390,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
4372
4390
|
*/
|
|
4373
4391
|
Filter = "filter",
|
|
4374
4392
|
/**
|
|
4375
|
-
* Reload the
|
|
4393
|
+
* Reload the Answer or visualization
|
|
4376
4394
|
* @hidden
|
|
4377
4395
|
*/
|
|
4378
4396
|
Reload = "reload",
|
|
@@ -4422,12 +4440,10 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
4422
4440
|
* and `AppEmbed` only. In full application embedding, this event updates
|
|
4423
4441
|
* the runtime filters applied on the Liveboard and saved Answer objects.
|
|
4424
4442
|
*
|
|
4425
|
-
*
|
|
4426
|
-
* Pass an array of runtime filters with the following attributes:
|
|
4427
|
-
*
|
|
4443
|
+
* @param - Pass an array of {@link RuntimeFilter} with the following attributes:
|
|
4428
4444
|
* `columnName` - _String_. The name of the column to filter on.
|
|
4429
4445
|
*
|
|
4430
|
-
* `operator` -
|
|
4446
|
+
* `operator` - {@link RuntimeFilterOp} to apply. For more information,
|
|
4431
4447
|
* see link:https://developers.thoughtspot.com/docs/?pageid=runtime-filters#rtOperator[Developer Documentation].
|
|
4432
4448
|
*
|
|
4433
4449
|
* `values` - List of operands. Some operators such as EQ and LE allow a
|
|
@@ -4439,7 +4455,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
4439
4455
|
* will be cleared, restoring the original visualization
|
|
4440
4456
|
* with the updated filters.
|
|
4441
4457
|
*
|
|
4442
|
-
|
|
4458
|
+
|
|
4443
4459
|
* @example
|
|
4444
4460
|
* ```js
|
|
4445
4461
|
* liveboardEmbed.trigger(HostEvent.UpdateRuntimeFilters, [
|
|
@@ -4678,6 +4694,11 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
4678
4694
|
* appEmbed.trigger(HostEvent.Remove)
|
|
4679
4695
|
* ```
|
|
4680
4696
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
4697
|
+
* * @example
|
|
4698
|
+
* ```js
|
|
4699
|
+
* liveboardEmbed.trigger(HostEvent.Remove)
|
|
4700
|
+
* ```
|
|
4701
|
+
* @version SDK: 1.37.0 | ThoughtSpot: 10.8.0.cl, 10.10.0.sw
|
|
4681
4702
|
*/
|
|
4682
4703
|
Remove = "delete",
|
|
4683
4704
|
/**
|
|
@@ -5088,7 +5109,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
5088
5109
|
* ```js
|
|
5089
5110
|
* liveboardEmbed.trigger(HostEvent.GetTabs).then((tabDetails) => {
|
|
5090
5111
|
* console.log(
|
|
5091
|
-
* tabDetails // TabDetails of current
|
|
5112
|
+
* tabDetails // TabDetails of current Liveboard
|
|
5092
5113
|
* );
|
|
5093
5114
|
* })
|
|
5094
5115
|
* ```
|
|
@@ -5136,7 +5157,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
5136
5157
|
*/
|
|
5137
5158
|
UpdateSageQuery = "updateSageQuery",
|
|
5138
5159
|
/**
|
|
5139
|
-
* Get the
|
|
5160
|
+
* Get the Answer session for a Search or
|
|
5140
5161
|
* Liveboard visualization.
|
|
5141
5162
|
* @example
|
|
5142
5163
|
* ```js
|
|
@@ -5311,6 +5332,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
5311
5332
|
HostAppUrl = "hostAppUrl",
|
|
5312
5333
|
EnableVizTransformations = "enableVizTransform",
|
|
5313
5334
|
EnableSearchAssist = "enableSearchAssist",
|
|
5335
|
+
EnablePendoHelp = "enablePendoHelp",
|
|
5314
5336
|
HideResult = "hideResult",
|
|
5315
5337
|
UseLastSelectedDataSource = "useLastSelectedSources",
|
|
5316
5338
|
Tag = "tag",
|
|
@@ -5535,9 +5557,10 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
5535
5557
|
*/
|
|
5536
5558
|
AddDataPanelObjects = "addDataPanelObjects",
|
|
5537
5559
|
/**
|
|
5538
|
-
*
|
|
5539
|
-
*
|
|
5540
|
-
* Liveboard.
|
|
5560
|
+
* The filter configuration options for a Liveboard.
|
|
5561
|
+
* The configuration options are available when adding
|
|
5562
|
+
* filters on a Liveboard.
|
|
5563
|
+
*
|
|
5541
5564
|
* @example
|
|
5542
5565
|
* ```js
|
|
5543
5566
|
* disabledActions: [Action.ConfigureFilter]
|
|
@@ -5635,14 +5658,17 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
5635
5658
|
* @hidden
|
|
5636
5659
|
*/
|
|
5637
5660
|
SpotIQFollow = "spotIQFollow",
|
|
5661
|
+
/**
|
|
5662
|
+
* The Share action for a Liveboard visualization.
|
|
5663
|
+
*/
|
|
5638
5664
|
ShareViz = "shareViz",
|
|
5639
5665
|
/**
|
|
5640
5666
|
* @hidden
|
|
5641
5667
|
*/
|
|
5642
5668
|
ReplaySearch = "replaySearch",
|
|
5643
5669
|
/**
|
|
5644
|
-
* The **Show underlying data** menu action on a
|
|
5645
|
-
* Answer page.
|
|
5670
|
+
* The **Show underlying data** menu action on a
|
|
5671
|
+
* visualization or Answer page.
|
|
5646
5672
|
* Displays detailed information and raw data
|
|
5647
5673
|
* for a given visualization.
|
|
5648
5674
|
* @example
|
|
@@ -5652,8 +5678,8 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
5652
5678
|
*/
|
|
5653
5679
|
ShowUnderlyingData = "showUnderlyingData",
|
|
5654
5680
|
/**
|
|
5655
|
-
* The **Download** menu action on Liveboard
|
|
5656
|
-
* and Answers.
|
|
5681
|
+
* The **Download** menu action on Liveboard
|
|
5682
|
+
* visualizations and Answers.
|
|
5657
5683
|
* Allows downloading a visualization or Answer.
|
|
5658
5684
|
* @example
|
|
5659
5685
|
* ```js
|
|
@@ -5674,11 +5700,10 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
5674
5700
|
/**
|
|
5675
5701
|
*
|
|
5676
5702
|
*The **Download PDF** action that downloads a Liveboard,
|
|
5677
|
-
*visualization, or Answer as a PDF file.
|
|
5678
|
-
*
|
|
5703
|
+
* visualization, or Answer as a PDF file.
|
|
5679
5704
|
*
|
|
5680
|
-
|
|
5681
|
-
*visualizations and Answers
|
|
5705
|
+
* **NOTE**: The **Download** > **PDF** option is available for
|
|
5706
|
+
* tables in visualizations and Answers.
|
|
5682
5707
|
* @example
|
|
5683
5708
|
* ```js
|
|
5684
5709
|
* disabledActions: [Action.DownloadAsPdf]
|
|
@@ -5710,9 +5735,11 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
5710
5735
|
*/
|
|
5711
5736
|
DownloadTrace = "downloadTrace",
|
|
5712
5737
|
/**
|
|
5713
|
-
* The **Export TML** menu action on Liveboard,
|
|
5714
|
-
*
|
|
5715
|
-
*
|
|
5738
|
+
* The **Export TML** menu action on a Liveboard, Answer, and
|
|
5739
|
+
* the Data Workspace pages for data objects and connections.
|
|
5740
|
+
*
|
|
5741
|
+
* Allows exporting an object as a TML file.
|
|
5742
|
+
*
|
|
5716
5743
|
* @example
|
|
5717
5744
|
* ```js
|
|
5718
5745
|
* disabledActions: [Action.ExportTML]
|
|
@@ -5720,7 +5747,8 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
5720
5747
|
*/
|
|
5721
5748
|
ExportTML = "exportTSL",
|
|
5722
5749
|
/**
|
|
5723
|
-
* The **Import TML** menu action
|
|
5750
|
+
* The **Import TML** menu action on the
|
|
5751
|
+
* *Data Workspace* > *Utilities* page.
|
|
5724
5752
|
* Imports TML representation of ThoughtSpot objects.
|
|
5725
5753
|
* @example
|
|
5726
5754
|
* ```js
|
|
@@ -5730,7 +5758,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
5730
5758
|
ImportTML = "importTSL",
|
|
5731
5759
|
/**
|
|
5732
5760
|
* The **Update TML** menu action for Liveboards and Answers.
|
|
5733
|
-
*
|
|
5761
|
+
* Updates TML representation of ThoughtSpot objects.
|
|
5734
5762
|
* @example
|
|
5735
5763
|
* ```js
|
|
5736
5764
|
* disabledActions: [Action.UpdateTML]
|
|
@@ -5757,8 +5785,11 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
5757
5785
|
*/
|
|
5758
5786
|
Present = "present",
|
|
5759
5787
|
/**
|
|
5760
|
-
* The tile resize
|
|
5761
|
-
*
|
|
5788
|
+
* The visualization tile resize option.
|
|
5789
|
+
* Also available via More `...` options menu on a visualization.
|
|
5790
|
+
* Allows resizing visualization tiles and switching
|
|
5791
|
+
* between different preset layout option.
|
|
5792
|
+
*
|
|
5762
5793
|
* @example
|
|
5763
5794
|
* ```js
|
|
5764
5795
|
* disabledActions: [Action.ToggleSize]
|
|
@@ -5784,8 +5815,9 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
5784
5815
|
*/
|
|
5785
5816
|
EditTitle = "editTitle",
|
|
5786
5817
|
/**
|
|
5787
|
-
* The **Delete**
|
|
5788
|
-
*
|
|
5818
|
+
* The **Delete** action on a Liveboard, *Liveboards* and
|
|
5819
|
+
* *Answers* list pages in full application embedding.
|
|
5820
|
+
*
|
|
5789
5821
|
* @example
|
|
5790
5822
|
* ```js
|
|
5791
5823
|
* disabledActions: [Action.Remove]
|
|
@@ -5862,8 +5894,9 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
5862
5894
|
*/
|
|
5863
5895
|
Explore = "explore",
|
|
5864
5896
|
/**
|
|
5865
|
-
* The action to include
|
|
5866
|
-
* or
|
|
5897
|
+
* The contextual menu action to include a specific data point
|
|
5898
|
+
* when drilling down a table or chart on an Answer.
|
|
5899
|
+
*
|
|
5867
5900
|
* @example
|
|
5868
5901
|
* ```js
|
|
5869
5902
|
* disabledActions: [Action.DrillInclude]
|
|
@@ -5871,8 +5904,8 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
5871
5904
|
*/
|
|
5872
5905
|
DrillInclude = "context-menu-item-include",
|
|
5873
5906
|
/**
|
|
5874
|
-
* The action to exclude
|
|
5875
|
-
* or
|
|
5907
|
+
* The contextual menu action to exclude a specific data point
|
|
5908
|
+
* when drilling down a table or chart on an Answer.
|
|
5876
5909
|
* @example
|
|
5877
5910
|
* ```js
|
|
5878
5911
|
* disabledActions: [Action.DrillInclude]
|
|
@@ -6019,7 +6052,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
6019
6052
|
* Allows users to manage data sync pipelines to third-party apps.
|
|
6020
6053
|
* @example
|
|
6021
6054
|
* ```js
|
|
6022
|
-
* disabledActions: [Action.
|
|
6055
|
+
* disabledActions: [Action.ManagePipelines]
|
|
6023
6056
|
* ```
|
|
6024
6057
|
* @version SDK: 1.18.0| ThoughtSpot: 8.10.0.cl, 9.0.1.sw
|
|
6025
6058
|
*/
|
|
@@ -6338,7 +6371,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
6338
6371
|
/**
|
|
6339
6372
|
* Action ID for the Parent TML action
|
|
6340
6373
|
* The parent action **TML** must be included to access TML-related options
|
|
6341
|
-
* within the cascading menu (specific to the
|
|
6374
|
+
* within the cascading menu (specific to the Answer page)
|
|
6342
6375
|
* @example
|
|
6343
6376
|
* ```js
|
|
6344
6377
|
* // to include specific TML actions
|
|
@@ -6377,8 +6410,10 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
6377
6410
|
*/
|
|
6378
6411
|
VerifiedLiveboard = "verifiedLiveboard",
|
|
6379
6412
|
/**
|
|
6380
|
-
*
|
|
6381
|
-
*
|
|
6413
|
+
* Action ID for the *Ask Sage* In Natural Language Search embed,
|
|
6414
|
+
* *Spotter* in Liveboard, full app, and Spotter embed.
|
|
6415
|
+
*
|
|
6416
|
+
* Allows initiating a conversation with ThoughtSpot AI analyst.
|
|
6382
6417
|
*
|
|
6383
6418
|
* @example
|
|
6384
6419
|
* ```js
|
|
@@ -6574,7 +6609,8 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
6574
6609
|
*/
|
|
6575
6610
|
DeletePreviousPrompt = "deletePreviousPrompt",
|
|
6576
6611
|
/**
|
|
6577
|
-
* Action ID for hide
|
|
6612
|
+
* Action ID for hide or disable editing tokens generated from
|
|
6613
|
+
* Spotter results.
|
|
6578
6614
|
* @example
|
|
6579
6615
|
* ```js
|
|
6580
6616
|
* hiddenAction: [Action.EditTokens]
|
|
@@ -7475,7 +7511,7 @@ declare module '@thoughtspot/visual-embed-sdk/embed/embedConfig' {
|
|
|
7475
7511
|
* @version SDK: 1.27.0 | ThoughtSpot: *
|
|
7476
7512
|
* @group Global methods
|
|
7477
7513
|
*/
|
|
7478
|
-
export const setEmbedConfig: (newConfig: EmbedConfig) =>
|
|
7514
|
+
export const setEmbedConfig: (newConfig: EmbedConfig) => any;
|
|
7479
7515
|
}
|
|
7480
7516
|
|
|
7481
7517
|
declare module '@thoughtspot/visual-embed-sdk/mixpanel-service' {
|
package/package.json
CHANGED
package/src/authToken.ts
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
import { ERROR_MESSAGE } from './errors';
|
|
2
2
|
import { EmbedConfig } from './types';
|
|
3
|
+
import { getValueFromWindow, storeValueInWindow } from './utils';
|
|
3
4
|
import { fetchAuthTokenService, verifyTokenService } from './utils/authService/authService';
|
|
4
5
|
import { logger } from './utils/logger';
|
|
5
6
|
|
|
6
|
-
|
|
7
|
+
const cacheAuthTokenKey = 'cachedAuthToken';
|
|
8
|
+
|
|
9
|
+
const getCacheAuthToken = (): string | null => getValueFromWindow(cacheAuthTokenKey);
|
|
10
|
+
const storeAuthTokenInCache = (token: string): void => {
|
|
11
|
+
storeValueInWindow(cacheAuthTokenKey, token);
|
|
12
|
+
};
|
|
7
13
|
|
|
8
14
|
// This method can be used to get the authToken using the embedConfig
|
|
9
15
|
/**
|
|
@@ -11,6 +17,7 @@ let cachedAuthToken: string | null = null;
|
|
|
11
17
|
* @param embedConfig
|
|
12
18
|
*/
|
|
13
19
|
export async function getAuthenticationToken(embedConfig: EmbedConfig): Promise<string> {
|
|
20
|
+
const cachedAuthToken = getCacheAuthToken();
|
|
14
21
|
// Since we don't have token validation enabled , we cannot tell if the
|
|
15
22
|
// cached token is valid or not. So we will always fetch a new token.
|
|
16
23
|
if (cachedAuthToken && !embedConfig.disableTokenVerification) {
|
|
@@ -42,7 +49,7 @@ export async function getAuthenticationToken(embedConfig: EmbedConfig): Promise<
|
|
|
42
49
|
throw e;
|
|
43
50
|
}
|
|
44
51
|
|
|
45
|
-
|
|
52
|
+
storeAuthTokenInCache(authToken);
|
|
46
53
|
return authToken;
|
|
47
54
|
}
|
|
48
55
|
|
|
@@ -51,6 +58,7 @@ const validateAuthToken = async (
|
|
|
51
58
|
authToken: string,
|
|
52
59
|
suppressAlert?: boolean,
|
|
53
60
|
): Promise<boolean> => {
|
|
61
|
+
const cachedAuthToken = getCacheAuthToken();
|
|
54
62
|
if (embedConfig.disableTokenVerification) {
|
|
55
63
|
logger.info('Token verification is disabled. Assuming token is valid.');
|
|
56
64
|
return true;
|
|
@@ -83,5 +91,5 @@ const validateAuthToken = async (
|
|
|
83
91
|
* @group Authentication / Init
|
|
84
92
|
*/
|
|
85
93
|
export const resetCachedAuthToken = (): void => {
|
|
86
|
-
|
|
94
|
+
storeAuthTokenInCache(null);
|
|
87
95
|
};
|
package/src/embed/app.spec.ts
CHANGED
|
@@ -509,6 +509,33 @@ describe('App embed tests', () => {
|
|
|
509
509
|
});
|
|
510
510
|
});
|
|
511
511
|
|
|
512
|
+
test('Should add enablePendoHelp flag to the iframe src conditional on navbar', async () => {
|
|
513
|
+
const appEmbed = new AppEmbed(getRootEl(), {
|
|
514
|
+
...defaultViewConfig,
|
|
515
|
+
} as AppViewConfig);
|
|
516
|
+
|
|
517
|
+
appEmbed.render();
|
|
518
|
+
await executeAfterWait(() => {
|
|
519
|
+
expectUrlMatchesWithParams(
|
|
520
|
+
getIFrameSrc(),
|
|
521
|
+
`http://${thoughtSpotHost}/?enablePendoHelp=true&embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=false${defaultParams}${defaultParamsPost}#/home`,
|
|
522
|
+
);
|
|
523
|
+
});
|
|
524
|
+
|
|
525
|
+
const noNavEmbed = new AppEmbed(getRootEl(), {
|
|
526
|
+
...defaultViewConfig,
|
|
527
|
+
enablePendoHelp: false,
|
|
528
|
+
} as AppViewConfig);
|
|
529
|
+
|
|
530
|
+
noNavEmbed.render();
|
|
531
|
+
await executeAfterWait(() => {
|
|
532
|
+
expectUrlMatchesWithParams(
|
|
533
|
+
getIFrameSrc(),
|
|
534
|
+
`http://${thoughtSpotHost}/?enablePendoHelp=false&embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=false${defaultParams}${defaultParamsPost}#/home`,
|
|
535
|
+
);
|
|
536
|
+
});
|
|
537
|
+
});
|
|
538
|
+
|
|
512
539
|
test('Should add HomePageSearchBarMode flag with object search to the iframe src', async () => {
|
|
513
540
|
const appEmbed = new AppEmbed(getRootEl(), {
|
|
514
541
|
...defaultViewConfig,
|
package/src/embed/app.ts
CHANGED
|
@@ -137,6 +137,20 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
|
|
|
137
137
|
* ```
|
|
138
138
|
*/
|
|
139
139
|
disableProfileAndHelp?: boolean;
|
|
140
|
+
/**
|
|
141
|
+
* @version SDK: 1.36.3 | ThoughtSpot: 10.1.0.cl
|
|
142
|
+
* @default true
|
|
143
|
+
* Whether the help menu in the top nav bar should be served
|
|
144
|
+
* from Pendo or ThoughtSpot's internal help items.
|
|
145
|
+
* @example
|
|
146
|
+
* ```js
|
|
147
|
+
* const embed = new AppEmbed('#tsEmbed', {
|
|
148
|
+
* ... // other options
|
|
149
|
+
* enablePendoHelp: false,
|
|
150
|
+
* });
|
|
151
|
+
* ```
|
|
152
|
+
*/
|
|
153
|
+
enablePendoHelp?: boolean
|
|
140
154
|
/**
|
|
141
155
|
* Control the visibility of the application switcher button on the nav-bar.
|
|
142
156
|
* By default, the application switcher is shown.
|
|
@@ -526,6 +540,7 @@ export class AppEmbed extends V1Embed {
|
|
|
526
540
|
hideIrrelevantChipsInLiveboardTabs = false,
|
|
527
541
|
homePageSearchBarMode,
|
|
528
542
|
isUnifiedSearchExperienceEnabled = true,
|
|
543
|
+
enablePendoHelp = true,
|
|
529
544
|
} = this.viewConfig;
|
|
530
545
|
|
|
531
546
|
let params = {};
|
|
@@ -583,6 +598,10 @@ export class AppEmbed extends V1Embed {
|
|
|
583
598
|
params[Param.HomePageSearchBarMode] = homePageSearchBarMode;
|
|
584
599
|
}
|
|
585
600
|
|
|
601
|
+
if (enablePendoHelp !== undefined) {
|
|
602
|
+
params[Param.EnablePendoHelp] = enablePendoHelp;
|
|
603
|
+
}
|
|
604
|
+
|
|
586
605
|
params[Param.DataPanelV2Enabled] = dataPanelV2;
|
|
587
606
|
params[Param.HideHomepageLeftNav] = hideHomepageLeftNav;
|
|
588
607
|
params[Param.ModularHomeExperienceEnabled] = modularHomeExperience;
|
package/src/embed/embedConfig.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { getValueFromWindow, storeValueInWindow } from '../utils';
|
|
1
2
|
import { EmbedConfig } from '../types';
|
|
2
3
|
|
|
3
|
-
|
|
4
|
+
const configKey = 'embedConfig';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* Gets the configuration embed was initialized with.
|
|
@@ -8,7 +9,7 @@ let config = {} as EmbedConfig;
|
|
|
8
9
|
* @version SDK: 1.19.0 | ThoughtSpot: *
|
|
9
10
|
* @group Global methods
|
|
10
11
|
*/
|
|
11
|
-
export const getEmbedConfig = (): EmbedConfig =>
|
|
12
|
+
export const getEmbedConfig = (): EmbedConfig => getValueFromWindow(configKey) || {};
|
|
12
13
|
|
|
13
14
|
/**
|
|
14
15
|
* Sets the configuration embed was initialized with.
|
|
@@ -18,6 +19,6 @@ export const getEmbedConfig = (): EmbedConfig => config;
|
|
|
18
19
|
* @group Global methods
|
|
19
20
|
*/
|
|
20
21
|
export const setEmbedConfig = (newConfig: EmbedConfig) => {
|
|
21
|
-
|
|
22
|
-
return
|
|
22
|
+
storeValueInWindow(configKey, newConfig);
|
|
23
|
+
return getValueFromWindow(configKey);
|
|
23
24
|
};
|