SearchBarViewConfig

SearchBarViewConfig

PropertiesπŸ”—

additionalFlagsπŸ”—

additionalFlags: {[key: string ] : string | number | boolean}

Optional

This is an object (key/val) of override flags which will be applied to the internal embedded object. This can be used to add any URL flag. Warning: This option is for advanced use only and is used internally to control embed behavior in non-regular ways. We do not publish the list of supported keys and values associated with each.

Index Signature Parameters

Version : SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl, 8.4.1.sw

const embed = new LiveboardEmbed('#embed', {
  ... // other liveboard view config
  additionalFlags: {
       flag1: 'value1',
       flag2: 'value2'
    }
});

collapseSearchBarπŸ”—

collapseSearchBar: boolean

Optional

To set the initial state of the search bar in case of saved-answers.

Version : SDK: 1.34.0 | Thoughtspot: 10.3.0.cl

default : true

const embed = new LiveboardEmbed('#embed', {
  liveboardId: '123',
  collapseSearchBar: true
});

contextMenuTriggerπŸ”—

contextMenuTrigger: ContextMenuTriggerOptions

Optional

flag to set ContextMenu Trigger to either left or right click.

Version : SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl

const embed = new LiveboardEmbed('#tsEmbed', {
   ... // other options
   contextMenuTrigger:ContextMenuTriggerOptions.LEFT_CLICK || RIGHT_CLICK,
})

customizationsπŸ”—

customizations: CustomisationsInterface

Optional

Dynamic CSSUrl and customCSS to be injected in the loaded application. You would also need to set style-src in the CSP settings.

Version : SDK: 1.17.2 | ThoughtSpot: 8.4.1.sw, 8.4.0.cl

default : ''

dataSourceπŸ”—

dataSource: string

Optional

Pass the ID of the source to be selected.

version: : SDK: 1.19.0, ThoughtSpot 9.0.0.cl, 9.0.1.sw

const embed = new SearchBarEmbed('#tsEmbed', {
   ... // other options
   dataSource:'id-2345',
})

dataSourcesπŸ”—

dataSources: string[]

Optional

The array of data source GUIDs to set on load. Only a single data source is supported currently.

Deprecated : Use dataSource instead

version: : SDK: 1.1.0 | ThoughtSpot: 8.1.1-sw

const embed = new SearchBarEmbed('#tsEmbed', {
   ... // other options
   dataSources:['id-2345','id-2345'],
})

disableRedirectionLinksInNewTabπŸ”—

disableRedirectionLinksInNewTab: boolean

Optional

This flag can be used to disable links inside the embedded app, and disables redirection of links in a new tab.

Version : SDK: 1.32.1 | ThoughtSpot: 10.3.0.cl

const embed = new LiveboardEmbed('#embed', {
  disableRedirectionLinksInNewTab: true
});

disabledActionReasonπŸ”—

disabledActionReason: string

Optional

The tooltip to display for disabled actions.

Version : SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw

const embed = new LiveboardEmbed('#embed', {
  ... // other liveboard view config
  disabledActions: [Action.Download, Action.Save]
  disabledActionReason: "Reason for disabling",
});

disabledActionsπŸ”—

disabledActions: Action[]

Optional

The list of actions to disable from the primary menu, more menu (…​), and the contextual menu. These actions will be disabled for the user. Use this to disable actions.

Version : SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw

const embed = new LiveboardEmbed('#embed', {
  ... // other liveboard view config
  disabledActions: [Action.Download, Action.Save]
});

doNotTrackPreRenderSizeπŸ”—

doNotTrackPreRenderSize: boolean

Optional

Determines whether the PreRender component should not dynamically track the size of its embedding element and adjust its own size accordingly. Enabling this option allows the PreRender component to automatically adapt its dimensions based on changes to the size of the embedding element.

Version : SDK: 1.24.0 | ThoughtSpot:9.4.0.cl, 9.4.0.sw

default : false

// Disable tracking PreRender size in the configuration
const config = {
  doNotTrackPreRenderSize: true,
};

// Instantiate an object with the configuration
const myComponent = new MyComponent(config);

enableV2Shell_experimentalπŸ”—

enableV2Shell_experimental: boolean

Optional

Enable the V2 shell. This can provide performance benefits due to a lighterweight shell.

Version : SDK: 1.31.2 | ThoughtSpot: 10.0.0.cl

const embed = new LiveboardEmbed('#embed', {
  liveboardId: '123',
  enableV2Shell_experimental: true
});

excludeRuntimeFiltersfromURLπŸ”—

excludeRuntimeFiltersfromURL: boolean

Optional

Boolean to exclude runtimeFilters in the URL By default it is true, this flag removes runtime filters from the URL when set to false, runtime filters will be included in the URL.

Irrespective of this flag, runtime filters ( if passed ) will be applied to the embedded view.

Version : SDK: 1.24.0 | ThoughtSpot: 9.5.0.cl

default : false

excludeRuntimeParametersfromURLπŸ”—

excludeRuntimeParametersfromURL: boolean

Optional

Boolean to exclude runtimeParameters from the URL when set to true, this flag removes runtime parameters from the URL.

Irrespective of this flag, runtime filters ( if passed ) will be applied to the embedded view.

Version : SDK: 1.29.0 | ThoughtSpot: 10.1.0.cl

default : false

frameParamsπŸ”—

frameParams: FrameParams

Optional

The width and height dimensions to render an embedded object inside your app. Specify the values in pixels or percentage.

Version : SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 7.2.1

const embed = new LiveboardEmbed('#embed', {
  ... // other liveboard view config
  frameParams: {
    width: '500px' | '50%',
     height: '400px' | '60%',
  },
});

hiddenActionsπŸ”—

hiddenActions: Action[]

Optional

The list of actions to hide from the embedded. This actions will be hidden from the user. Use this to hide an action.

Version : SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw

const embed = new LiveboardEmbed('#embed', {
  ... // other liveboard view config
  hiddenActions: [Action.Download, Action.Export]
});

insertAsSiblingπŸ”—

insertAsSibling: boolean

Optional

Insert as a sibling of the target container, instead of appending to a child inside it.

Version : SDK: 1.2.0 | Thoughtspot: 9.0.0.cl, 9.0.0.sw

const embed = new LiveboardEmbed('#embed-container', {
   ... // other options
   insertAsSibling:true,
})

linkOverrideπŸ”—

linkOverride: boolean

Optional

Flag to override openNew tab context menu link

Version : SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl

const embed = new LiveboardEmbed('#embed-container', {
   ... // other options
   linkOverride:false,
})

localeπŸ”—

locale: string

Optional

The locale/language to use for the embedded view.

Version : SDK: 1.9.4 | ThoughtSpot 8.1.0.cl, 8.4.1.sw

const embed = new LiveboardEmbed('#embed-container', {
   ... // other options
   locale:'en',
})

preRenderIdπŸ”—

preRenderId: string

Optional

PreRender id to be used for PreRendering the embed. Use PreRender to render the embed in the background and then show or hide the rendered embed using showPreRender or hidePreRender respectively.

Version : SDK: 1.25.0 | Thoughtspot: 9.6.0.cl, 9.8.0.sw

const embed = new LiveboardEmbed('#embed', {
  ... // other liveboard view config
  preRenderId: "preRenderId-123"
});
embed.showPreRender();

runtimeParametersπŸ”—

runtimeParameters: RuntimeParameter[]

Optional

The list of parameter override to apply to a search answer, visualization, or Liveboard.

Version : SDK : 1.25.0 | Thoughtspot: 9.2.0.cl, 9.5.0.sw

const embed = new LiveboardEmbed('#embed-container', {
   ... // other options
   runtimeParameters: [
    {
      name: 'value',
      value: 'string' | 123 | true,
    },
  ],
})

searchOptionsπŸ”—

searchOptions: SearchOptions

Optional

Configuration for search options. Includes the following properties:

searchTokenString: Search tokens to pass in the query.

executeSearch: Boolean to define if the search should be executed or not. If it is executed, the focus is placed on the results. If it’s not executed, the focus is placed at the end of the token string in the search bar.

version: : SDK: 1.2.0 | ThoughtSpot: 9.4.0.sw

const embed = new SearchBarEmbed('#tsEmbed', {
   ... // other options
   searchOptions: {
       searchTokenString: '[quantity purchased] [region]',
       executeSearch: true,
   }
})

useLastSelectedSourcesπŸ”—

useLastSelectedSources: boolean

Optional

Boolean to define if the last selected data source should be used

version: : SDK: 1.24.0, ThoughtSpot 9.5.0.cl, 9.5.0.sw

const embed = new SearchBarEmbed('#tsEmbed', {
   ... // other options
   useLastSelectedSources:false,
})

visibleActionsπŸ”—

visibleActions: Action[]

Optional

The list of actions to display from the primary menu, more menu (…​), and the contextual menu. These will be only actions that are visible to the user. Use this to hide all actions except the ones you want to show.

Use either this or hiddenActions.

Version : SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw

const embed = new LiveboardEmbed('#embed', {
  ... // other liveboard view config
  visibleActions: [Action.Download, Action.Export]
});