diff --git a/src/embed/app.spec.ts b/src/embed/app.spec.ts index a20327d0..af2594be 100644 --- a/src/embed/app.spec.ts +++ b/src/embed/app.spec.ts @@ -405,6 +405,21 @@ describe('App embed tests', () => { }); }); + test('Should add isUnifiedSearchExperienceEnabled flag to the iframe src', async () => { + const appEmbed = new AppEmbed(getRootEl(), { + ...defaultViewConfig, + isUnifiedSearchExperienceEnabled: false, + } as AppViewConfig); + + appEmbed.render(); + await executeAfterWait(() => { + expectUrlMatchesWithParams( + getIFrameSrc(), + `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isUnifiedSearchExperienceEnabled=false${defaultParams}${defaultParamsPost}#/home`, + ); + }); + }); + test('Should add showLiveboardVerifiedBadge flag to the iframe src', async () => { const appEmbed = new AppEmbed(getRootEl(), { ...defaultViewConfig, diff --git a/src/embed/app.ts b/src/embed/app.ts index ad3ae1a7..1eaa13d6 100644 --- a/src/embed/app.ts +++ b/src/embed/app.ts @@ -431,6 +431,20 @@ export interface AppViewConfig extends Omit { * ``` */ showLiveboardReverifyBanner?: boolean; + /** + * This flag is used to enable unified search experience for full app embed. + * @type {boolean} + * @default true + * @version SDK: 1.34.0 | ThoughtSpot:10.5.0.cl + * @example + * ```js + * const embed = new AppEmbed('#embed-container', { + * ... // other options + * isUnifiedSearchExperienceEnabled: true, + * }) + * ``` + */ + isUnifiedSearchExperienceEnabled?: boolean; } /** @@ -487,6 +501,7 @@ export class AppEmbed extends V1Embed { showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, homePageSearchBarMode, + isUnifiedSearchExperienceEnabled = true, } = this.viewConfig; let params = {}; @@ -503,6 +518,7 @@ export class AppEmbed extends V1Embed { params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled; params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge; params[Param.ShowLiveboardReverifyBanner] = showLiveboardReverifyBanner; + params[Param.IsUnifiedSearchExperienceEnabled] = isUnifiedSearchExperienceEnabled; params = this.getBaseQueryParams(params); diff --git a/src/types.ts b/src/types.ts index 3bb209ac..d7ef194a 100644 --- a/src/types.ts +++ b/src/types.ts @@ -3256,6 +3256,7 @@ export enum Param { ShowLiveboardReverifyBanner = 'showLiveboardReverifyBanner', LiveboardHeaderV2 = 'isLiveboardHeaderV2Enabled', SpotterEnabled = 'isSpotterExperienceEnabled', + IsUnifiedSearchExperienceEnabled = 'isUnifiedSearchExperienceEnabled', } /**