SearchViewConfig
- Index
- Properties
- additionalFlags
- answerId
- collapseDataPanel
- collapseDataSources
- collapseSearchBar
- collapseSearchBarInitially
- contextMenuTrigger
- customActions
- customizations
- dataPanelCustomGroupsAccordionInitialState
- dataPanelV2
- dataSource
- dataSources
- disableRedirectionLinksInNewTab
- disabledActionReason
- disabledActions
- doNotTrackPreRenderSize
- enableCustomColumnGroups
- enableLinkOverridesV2
- enableSearchAssist
- enableV2Shell_experimental
- excludeRuntimeFiltersfromURL
- excludeRuntimeParametersfromURL
- excludeSearchTokenStringFromURL
- exposeTranslationIDs
- focusSearchBarOnRender
- forceTable
- frameParams
- hiddenActions
- hideAnswerEditPanel
- hideDataSources
- hideResults
- hideSearchBar
- insertAsSibling
- interceptTimeout
- interceptUrls
- isDarkMode
- isOnBeforeGetVizDataInterceptEnabled
- isThisPeriodInDateFiltersEnabled
- linkOverride
- locale
- newChartsLibrary
- overrideHistoryState
- overrideOrgId
- preRenderConfig
- preRenderContainer
- preRenderId
- refreshAuthTokenOnNearExpiry
- runtimeFilters
- runtimeParameters
- searchOptions
- searchQuery
- shouldBypassPayloadValidation
- showAlerts
- useHostEventsV2
- useLastSelectedSources
- visibleActions
- visualOverrides
The configuration attributes for the embedded search view.
Indexπ
Propertiesπ
additionalFlagsπ
additionalFlags: {[key: string ] : string | number | boolean} Optional
Version : SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl, 8.4.1.sw
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. If the same flags are passed in init, they will be overridden by the values here. 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.
Supported embed types: AppEmbed, LiveboardEmbed, SearchEmbed, SpotterAgentEmbed, SpotterEmbed, SearchBarEmbed
Index Signature Parameters
// Replace <EmbedComponent> with embed component name. For example, AppEmbed, SearchEmbed, or LiveboardEmbed
const embed = new <EmbedComponent>('#tsEmbed', {
... // other embed view config
additionalFlags: {
flag1: 'value1',
flag2: 'value2'
},
});
answerIdπ
answerId: string Optional
Version : SDK: 1.1.0 | ThoughtSpot: 8.1.0.sw
The GUID of a saved answer to load initially.
Supported embed types: SearchEmbed
const embed = new SearchEmbed('#tsEmbed', {
... // other embed view config
answerId:'sed-1234',
})
collapseDataPanelπ
collapseDataPanel: boolean Optional
Version : SDK: 1.34.0 | ThoughtSpot: 10.3.0.cl
If set to true, the data panel is collapsed on load, but can be expanded manually.
Supported embed types: SearchEmbed
const embed = new SearchEmbed('#tsEmbed', {
... // other embed view config
collapseDataPanel:true,
})
collapseDataSourcesπ
collapseDataSources: boolean Optional
Version : SDK: 1.1.0 | ThoughtSpot: 8.1.0.sw
If set to true, the data sources panel is collapsed on load, but can be expanded manually.
Supported embed types: SearchEmbed
const embed = new SearchEmbed('#tsEmbed', {
... // other embed view config
collapseDataSources:true,
})
collapseSearchBarπ
collapseSearchBar: boolean Optional
Version : SDK: 1.34.0 | ThoughtSpot: 10.3.0.cl
To set the initial state of the search bar in case of saved Answers.
Supported embed types: AppEmbed, SearchBarEmbed
default : true
// Replace <EmbedComponent> with embed component name. For example, AppEmbed, or SearchBarEmbed
const embed = new <EmbedComponent>('#tsEmbed', {
... // other embed view config
collapseSearchBar: true,
});
collapseSearchBarInitiallyπ
collapseSearchBarInitially: boolean Optional
To set the initial state of the search bar in case of saved-answers.
Deprecated : Use collapseSearchBar instead
Version : SDK: 1.32.0 | ThoughtSpot: 10.0.0.cl
default : false
contextMenuTriggerπ
contextMenuTrigger: ContextMenuTriggerOptions Optional
Version : SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
flag to set ContextMenu Trigger to either left or right click.
Supported embed types: AppEmbed, SearchEmbed
// Replace <EmbedComponent> with embed component name. For example, AppEmbed, or SearchEmbed
const embed = new <EmbedComponent>('#tsEmbed', {
... // other embed view config
contextMenuTrigger:ContextMenuTriggerOptions.LEFT_CLICK || RIGHT_CLICK,
})
customActionsπ
customActions: CustomAction[] Optional
Version : SDK: 1.43.0 | ThoughtSpot: 10.14.0.cl
Custom Actions allows users to define interactive UI actions (like buttons or menu items) that appear in ThoughtSpotβs visualizations, answers, and Liveboards. These actions enable users to trigger custom workflows β such as navigating to an external app, calling an API, or opening a modal β based on the data context of what they clicked can be used to trigger custom logic when the action is clicked.
Supported embed types: AppEmbed, LiveboardEmbed, SearchEmbed, SpotterEmbed
import {
CustomActionPayload,
CustomActionsPosition,
CustomActionTarget,
} from '@thoughtspot/visual-embed-sdk';
// Use supported embed types such as AppEmbed or LiveboardEmbed
const embed = new LiveboardEmbed('#tsEmbed', {
... // other embed config options
customActions: [
{
// Unique identifier for the custom action
id: 'my-custom-action',
// Display name shown to users in the UI
name: 'My Custom Action',
// Where the action appears in the UI
// PRIMARY: Shows as a primary button (e.g., in the toolbar)
// MENU: Shows in the "More" menu (three dots menu)
// CONTEXTMENU: Shows in the right-click context menu
position: CustomActionsPosition.PRIMARY,
// What type of content this action applies to
// ANSWER: Available on answer pages
target: CustomActionTarget.ANSWER,
// Optional: Restrict where this action appears based on data models
// dataModelIds: {
// // Restrict to specific data models
// modelIds: ['model-id-1', 'model-id-2'],
// // Restrict to specific columns within models
// modelColumnNames: ['model-id::column-name']
// },
// Optional: Restrict where this action appears based on metadata
// metadataIds: {
// // Restrict to specific answers
// answerIds: ['answer-id-1', 'answer-id-2'],
// },
// // Restrict to specific groups (for group-based access control)
// groupIds: ['group-id-1', 'group-id-2'],
// // Restrict to specific organizations (for multi-org deployments)
// orgIds: ['org-id-1', 'org-id-2'],
}
],
})
// to trigger a custom flow on custom action click listen to Custom action embed event
embed.on(EmbedEvent.CustomAction, (payload: CustomActionPayload) => {
console.log('Custom Action event:', payload);
})
import {
CustomActionsPosition,
CustomActionTarget,
} from '@thoughtspot/visual-embed-sdk';
const embed = new LiveboardEmbed('#tsEmbed', {
... // other embed config options
customActions: [
{
// Unique identifier for the custom action
id: 'my-custom-action',
// Display name shown to users in the UI
name: 'My Custom Action',
// Where the action appears in the UI
// MENU: Shows in the "More" menu (three dots menu)
// CONTEXTMENU: Shows in the right-click context menu
position: CustomActionsPosition.MENU,
// What type of content this action applies to
// SPOTTER: Available in Spotter (AI-powered search)
target: CustomActionTarget.SPOTTER,
// Optional: Restrict where this action appears based on data models
// dataModelIds: {
// // Restrict to specific data models
// modelIds: ['model-id-1', 'model-id-2'],
// },
// // Restrict to specific groups (for group-based access control)
// groupIds: ['group-id-1'],
// // Restrict to specific organizations (for multi-org deployments)
// orgIds: ['org-id-1'],
}
],
})
import {
CustomActionsPosition,
CustomActionTarget,
} from '@thoughtspot/visual-embed-sdk';
const embed = new LiveboardEmbed('#tsEmbed', {
... // other embed config options
customActions: [
{
// Unique identifier for the custom action
id: 'my-liveboard-custom-action',
// Display name shown to users in the UI
name: 'My Liveboard Custom Action',
// Where the action appears in the UI
// PRIMARY: Shows as a primary button (e.g., in the toolbar)
// MENU: Shows in the "More" menu (three dots menu)
position: CustomActionsPosition.PRIMARY,
// What type of content this action applies to
// LIVEBOARD: Available on liveboard pages
target: CustomActionTarget.LIVEBOARD,
// Optional: Restrict where this action appears based on metadata
// metadataIds: {
// // Restrict to specific liveboards
// liveboardIds: ['liveboard-id-1', 'liveboard-id-2'],
// },
// // Restrict to specific groups (for group-based access control)
// groupIds: ['group-id-1', 'group-id-2'],
// // Restrict to specific organizations (for multi-org deployments)
// orgIds: ['org-id-1', 'org-id-2'],
},
{
// Unique identifier for the custom action
id: 'my-viz-custom-action',
// Display name shown to users in the UI
name: 'My Viz Custom Action',
// Where the action appears in the UI
// PRIMARY: Shows as a primary button (e.g., in the toolbar)
// MENU: Shows in the "More" menu (three dots menu)
// CONTEXTMENU: Shows in the right-click context menu
position: CustomActionsPosition.PRIMARY,
// What type of content this action applies to
// VIZ: Available on individual visualizations
target: CustomActionTarget.VIZ,
// Optional: Restrict where this action appears based on metadata
// metadataIds: {
// // Restrict to specific answers
// answerIds: ['answer-id-1', 'answer-id-2'],
// // Restrict to specific liveboard. If liveboardId is
// // passed, custom actions will appear on all vizzes of liveboard
// liveboardIds: ['liveboard-id-1'],
// // Restrict to specific vizIds
// vizIds: ['viz-id-1']
// },
// dataModelIds: {
// // Restrict to specific data models
// modelIds: ['model-id-1', 'model-id-2'],
// // Restrict to specific columns within models
// modelColumnNames: ['model-id::column-name']
// },
// // Restrict to specific groups (for group-based access control)
// groupIds: ['group-id-1', 'group-id-2'],
// // Restrict to specific organizations (for multi-org deployments)
// orgIds: ['org-id-1', 'org-id-2'],
}
],
})
customizationsπ
customizations: CustomisationsInterface Optional
Version : SDK: 1.17.2 | ThoughtSpot: 8.4.1.sw, 8.4.0.cl
Dynamic CSSUrl and customCSS to be injected in the loaded application.
You would also need to set style-src in the CSP settings.
default : ''
dataPanelCustomGroupsAccordionInitialStateπ
dataPanelCustomGroupsAccordionInitialState: DataPanelCustomColumnGroupsAccordionState Optional
Version : SDK: 1.32.0 | ThoughtSpot: 10.0.0.cl
This controls the initial behaviour of custom column groups accordion. It takes DataPanelCustomColumnGroupsAccordionState enum values as input. List of different enum values:-
-
EXPAND_ALL: Expand all the accordion initially in data panel v2.
-
COLLAPSE_ALL: Collapse all the accordions initially in data panel v2.
-
EXPAND_FIRST: Expand the first accordion and collapse the rest.
Supported embed types: SearchEmbed
default : DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL
const embed = new SearchEmbed('#tsEmbed', {
... // other embed view config
dataPanelCustomGroupsAccordionInitialState:
DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL,
});
dataPanelV2π
dataPanelV2: boolean Optional
Flag to control Data panel experience
Supported embed types: AppEmbed, SearchBarEmbed, LiveboardEmbed, SearchEmbed
Deprecated : from SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
default : true
// Replace <EmbedComponent> with embed component name. For example, AppEmbed, or SearchBarEmbed
const embed = new <EmbedComponent>('#tsEmbed', {
... // other embed view config
dataPanelV2: true,
})
dataSourceπ
dataSource: string Optional
Version : SDK: 1.19.0
The data source GUID to set on load.
Supported embed types: SearchEmbed
const embed = new SearchEmbed('#tsEmbed', {
... // other embed view config
dataSource:'id-234',
})
dataSourcesπ
dataSources: string[] Optional
The array of data source GUIDs to set on load. Only a single data source is supported currently. Use dataSource instead.
Deprecated : Use dataSource instead. Supported embed types: SearchEmbed
const embed = new SearchEmbed('#tsEmbed', {
... // other embed view config
dataSources:['id-234','id-456'],
})
disableRedirectionLinksInNewTabπ
disableRedirectionLinksInNewTab: boolean Optional
Version : SDK: 1.32.1 | ThoughtSpot: 10.3.0.cl
This flag can be used to disable links inside the embedded app, and disable redirection of links in a new tab.
Note: When set to true, this flag automatically disables
enableLinkOverridesV2 for the
embed session. The two features are mutually exclusive β link
overrides mutate anchors (delete href, attach a JS click handler),
which breaks native browser behavior (Cmd/Ctrl+Click, middle-click,
right-click "Open in new tab") when combined with the disable flag.
The disable flag preserves native anchor semantics instead.
Supported embed types: AppEmbed, LiveboardEmbed, SearchEmbed, SpotterAgentEmbed, SpotterEmbed, SearchBarEmbed
// Replace <EmbedComponent> with embed component name. For example, AppEmbed, SearchEmbed, or LiveboardEmbed
const embed = new <EmbedComponent>('#tsEmbed', {
... // other embed view config
disableRedirectionLinksInNewTab: true,
});
disabledActionReasonπ
disabledActionReason: string Optional
Version : SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
The tooltip to display for disabled actions.
Supported embed types: AppEmbed, LiveboardEmbed, SearchEmbed, SpotterAgentEmbed, SpotterEmbed, SearchBarEmbed
// Replace <EmbedComponent> with embed component name. For example, AppEmbed, SearchEmbed, or LiveboardEmbed
const embed = new <EmbedComponent>('#tsEmbed', {
... // other embed view config
disabledActions: [Action.Download, Action.Save],
disabledActionReason: "Reason for disabling",
});
disabledActionsπ
disabledActions: Action[] Optional
Version : SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
The list of actions to disable from the primary menu, more menu (β¦β), and the contextual menu. Disabled actions are grayed out and still visible to the user, but cannot be clicked. Use this when you want to disable an action (keep it visible but non-interactive). To completely remove an action from the UI, use hiddenActions instead.
Supported embed types: AppEmbed, LiveboardEmbed, SearchEmbed, SpotterAgentEmbed, SpotterEmbed, SearchBarEmbed
// Replace <EmbedComponent> with embed component name. For example, AppEmbed, SearchEmbed, or LiveboardEmbed
const embed = new <EmbedComponent>('#tsEmbed', {
... // other embed view config
disabledActions: [Action.Download, Action.Save],
});
doNotTrackPreRenderSizeπ
doNotTrackPreRenderSize: boolean Optional
Determines if the PreRender component should 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.
Deprecated : Use PreRenderConfig.doNotTrackSize via preRenderConfig instead.
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);
enableCustomColumnGroupsπ
enableCustomColumnGroups: boolean Optional
Version : SDK: 1.32.0 | ThoughtSpot: 10.0.0.cl, 10.1.0.sw
To enable custom column groups in data panel v2
Supported embed types: SearchBarEmbed, LiveboardEmbed, SearchEmbed
default : false
// Replace <EmbedComponent> with embed component name. For example, SearchBarEmbed, or LiveboardEmbed
const embed = new <EmbedComponent>('#tsEmbed', {
... // other embed view config
enableCustomColumnGroups: true,
});
enableLinkOverridesV2π
enableLinkOverridesV2: boolean Optional
Version : SDK: 1.46.0 | ThoughtSpot: 26.2.0.cl
Enables the V2 link override mechanism with improved
handling. When enabled, navigation links within the
embedded ThoughtSpot app are intercepted and routed
through the SDK via the EmbedEvent.DialogOpen
event.
The SDK automatically sends linkOverride alongside this flag for backward compatibility with older ThoughtSpot versions.
Note: This flag is ignored when
disableRedirectionLinksInNewTab is true.
Supported embed types: AppEmbed, LiveboardEmbed,
SearchEmbed, SpotterAgentEmbed,
SpotterEmbed, SearchBarEmbed
const embed = new LiveboardEmbed('#tsEmbed', {
... // other embed view config
enableLinkOverridesV2: true,
});
embed.on(EmbedEvent.DialogOpen, (payload) => {
console.log('Link clicked:', payload);
});
enableSearchAssistπ
enableSearchAssist: boolean Optional
Version : SDK: 1.13.0 | ThoughtSpot: 8.5.0.cl, 8.8.1-sw
If set to true, the Search Assist feature is enabled.
Supported embed types: SearchEmbed
const embed = new SearchEmbed('#tsEmbed', {
... // other embed view config
enableSearchAssist:true,
})
enableV2Shell_experimentalπ
enableV2Shell_experimental: boolean Optional
Version : SDK: 1.31.2 | ThoughtSpot: 10.0.0.cl
Enable the V2 shell. This can provide performance benefits due to a lighter-weight shell.
Supported embed types: AppEmbed, LiveboardEmbed, SearchEmbed, SpotterAgentEmbed, SpotterEmbed, SearchBarEmbed
// Replace <EmbedComponent> with embed component name. For example, AppEmbed, SearchEmbed, or LiveboardEmbed
const embed = new <EmbedComponent>('#tsEmbed', {
... // other embed view config
enableV2Shell_experimental: true,
});
excludeRuntimeFiltersfromURLπ
excludeRuntimeFiltersfromURL: boolean Optional
Version : SDK: 1.24.0 | ThoughtSpot: 9.5.0.cl
Boolean to exclude runtimeFilters in the URL By default it is true, this flag removes runtime filters from the URL (default behavior from SDK 1.45.0). when set to false, runtime filters will be included in the URL (default behavior before SDK 1.45.0).
Irrespective of this flag, runtime filters ( if passed ) will be applied to the embedded view.
default : true
excludeRuntimeParametersfromURLπ
excludeRuntimeParametersfromURL: boolean Optional
Version : SDK: 1.29.0 | ThoughtSpot: 10.1.0.cl
Boolean to exclude runtimeParameters from the URL when set to true, this flag removes runtime parameters from the URL (default behavior from SDK 1.45.0). when set to false, runtime parameters will be included in the URL (default behavior before SDK 1.45.0).
Irrespective of this flag, runtime parameters (if passed) will be applied to the embedded view.
default : true
excludeSearchTokenStringFromURLπ
excludeSearchTokenStringFromURL: boolean Optional
Version : SDK: 1.35.7 | ThoughtSpot: 10.8.0.cl
Exclude the search token string from the URL. If set to true, the search token string is not appended to the URL.
Supported embed types: SearchEmbed
const embed = new SearchEmbed('#tsEmbed', {
searchOptions: {
searchTokenString: '[quantity purchased] [region]',
executeSearch: true,
},
excludeSearchTokenStringFromURL: true,
});
exposeTranslationIDsπ
exposeTranslationIDs: boolean Optional
Version : SDK: 1.37.0 | ThoughtSpot: 10.9.0.cl
This flag can be used to expose translation IDs on the embedded app.
default : false
focusSearchBarOnRenderπ
focusSearchBarOnRender: boolean Optional
Version : SDK: 1.32.0 | ThoughtSpot: 10.3.0.cl
Flag to remove focus from search bar initially when user lands on search embed page.
Supported embed types: SearchEmbed
default : true
const embed = new SearchEmbed('#tsEmbed', {
... // other embed view config
focusSearchBarOnRender: false,
});
forceTableπ
forceTable: boolean Optional
Version : SDK: 1.1.0 | ThoughtSpot: 8.1.0.sw
If set to true, the tabular view is set as the default format for presenting search data.
Supported embed types: SearchEmbed
const embed = new SearchEmbed('#tsEmbed', {
... // other embed view config
forceTable:true,
})
frameParamsπ
frameParams: FrameParams Optional
Version : SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 7.2.1
The width and height dimensions to render an embedded object inside your app. Specify the values in pixels or percentage.
Supported embed types: AppEmbed, LiveboardEmbed, SearchEmbed, SpotterAgentEmbed, SpotterEmbed, SearchBarEmbed
// Replace <EmbedComponent> with embed component name. For example, AppEmbed, SearchEmbed, or LiveboardEmbed
const embed = new <EmbedComponent>('#tsEmbed', {
... // other embed view config
frameParams: {
width: '500px' | '50%',
height: '400px' | '60%',
},
})
hiddenActionsπ
hiddenActions: Action[] Optional
Version : SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
The list of actions to completely remove from the embedded view. Hidden actions are not visible to the user at all (fully removed from the UI). Use this when you want to remove an action entirely. To keep an action visible but non-interactive (grayed out), use disabledActions instead.
Supported embed types: AppEmbed, LiveboardEmbed, SearchEmbed, SpotterAgentEmbed, SpotterEmbed, SearchBarEmbed
// Replace <EmbedComponent> with embed component name. For example, AppEmbed, SearchEmbed, or LiveboardEmbed
const embed = new <EmbedComponent>('#tsEmbed', {
... // other embed view config
hiddenActions: [Action.Download, Action.ExportTML],
});
hideAnswerEditPanelπ
hideAnswerEditPanel: boolean Optional
Version : SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
If set to true, the answer edit panel is hidden.
Supported embed types: SearchEmbed
const embed = new SearchEmbed('#tsEmbed', {
... // other embed view config
hideAnswerEditPanel: true,
})
hideDataSourcesπ
hideDataSources: boolean Optional
Version : SDK: 1.2.0 | ThoughtSpot: 9.1.0.sw
Show or hide the data sources panel.
Supported embed types: SearchEmbed
const embed = new SearchEmbed('#tsEmbed', {
... // other embed view config
hideDataSources:true,
})
hideResultsπ
hideResults: boolean Optional
Version : SDK: 1.2.0 | ThoughtSpot: 9.1.0.sw
Show or hide the charts and tables in search answers. This attribute can be used to create a custom visualization using raw answer data.
Supported embed types: SearchEmbed
const embed = new SearchEmbed('#tsEmbed', {
... // other embed view config
hideResults:true,
})
hideSearchBarπ
hideSearchBar: boolean Optional
Version : SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.5.0.sw
If set to true, the search page will render without the Search Bar The chart/table should still be visible.
Supported embed types: SearchEmbed
const embed = new SearchEmbed('#tsEmbed', {
... // other embed view config
hideSearchBar:true,
})
insertAsSiblingπ
insertAsSibling: boolean Optional
Version : SDK: 1.2.0 | ThoughtSpot: 9.0.0.cl, 9.0.0.sw
Insert as a sibling of the target container, instead of appending to a child inside it.
Supported embed types: AppEmbed, LiveboardEmbed, SearchEmbed, SpotterAgentEmbed, SpotterEmbed, SearchBarEmbed
// Replace <EmbedComponent> with embed component name. For example, AppEmbed, SearchEmbed, or LiveboardEmbed
const embed = new <EmbedComponent>('#tsEmbed', {
... // other embed view config
insertAsSibling:true,
})
interceptTimeoutπ
interceptTimeout: number Optional
Version : SDK: 1.43.0 | ThoughtSpot: 10.15.0.cl
How long, in milliseconds, an intercepted request waits for the
EmbedEvent.ApiIntercept responder before it is abandoned. Defaults to
30000. On timeout the request fails and EmbedEvent.Error is emitted.
const embed = new LiveboardEmbed('#embed', {
...viewConfig,
interceptUrls: [InterceptedApiType.ALL],
interceptTimeout: 1000,
})
interceptUrlsπ
interceptUrls: string[] Optional
Version : SDK: 1.43.0 | ThoughtSpot: 10.15.0.cl
The requests to intercept, given as InterceptedApiType groups, absolute
URLs, or paths beginning with / that are resolved against the
ThoughtSpot host. Setting this is what turns interception on.
A URL matches only on exact equality with the requestβs fully resolved
URL, query string included, so prefer an InterceptedApiType group where
one covers the API you need.
Each intercepted request pauses and emits EmbedEvent.ApiIntercept, then
proceeds according to the response passed to that eventβs responder.
const embed = new LiveboardEmbed('#embed', {
...viewConfig,
interceptUrls: [InterceptedApiType.LiveboardData],
})
isDarkModeπ
isDarkMode: boolean Optional
Version : SDK: 1.55.0 | ThoughtSpot Cloud: 26.12.0.cl
Render this embed in dark appearance when true, and in its default
appearance when false, overriding the isDarkMode value passed to
init.
The host application owns the appearance of an embed, so this overrides
the appearance preference of the signed-in user and the color scheme of
their operating system. If your application has light and dark themes,
pass true while it shows the dark theme and false while it shows
the light theme. Leave it unset to inherit the init value.
Supported embed types: AppEmbed, LiveboardEmbed, SearchEmbed, SpotterAgentEmbed, SpotterEmbed, SearchBarEmbed
// Your application's current theme, 'light' or 'dark'
const appTheme = 'dark';
// Replace AppEmbed with a specific embed component like SearchEmbed or LiveboardEmbed
const embed = new AppEmbed('#tsEmbed', {
... // other embed view config
isDarkMode: appTheme === 'dark',
});
isOnBeforeGetVizDataInterceptEnabledπ
isOnBeforeGetVizDataInterceptEnabled: boolean Optional
Version : SDK: 1.43.0 | ThoughtSpot: 10.15.0.cl
Emits EmbedEvent.OnBeforeGetVizDataIntercept before the Answer data
APIs are called. This is the earlier, narrower form of interception, kept
for backward compatibility and implemented on top of
EmbedEvent.ApiIntercept. Prefer interceptUrls with
InterceptedApiType.AnswerData in new code.
Setting this also intercepts the Answer data APIs, so both
EmbedEvent.OnBeforeGetVizDataIntercept and EmbedEvent.ApiIntercept
are emitted for those requests.
Can be used for Search and App Embed from SDK 1.29.0
isThisPeriodInDateFiltersEnabledπ
isThisPeriodInDateFiltersEnabled: boolean Optional
Version : SDK: 1.45.0 | ThoughtSpot: 26.4.0.cl
To enable Include current period checkbox for date filters. Controls the visibility of the option to include the current time period in filter results.
Supported embed types: AppEmbed, SearchBarEmbed, LiveboardEmbed, SearchEmbed
const embed = new <EmbedComponent>('#tsEmbed', {
... // other embed view config
isThisPeriodInDateFiltersEnabled: true,
})
linkOverrideπ
linkOverride: boolean Optional
Version : SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
Flag to override the Open Link in New Tab context menu option.
Note: Setting this flag implicitly enables enableLinkOverridesV2. V1 is auto-upgraded to V2 to ensure consistent link-override behavior; the legacy V1-only path is no longer used in isolation.
Note: This flag is ignored when
disableRedirectionLinksInNewTab is true.
Supported embed types: AppEmbed, LiveboardEmbed,
SearchEmbed, SpotterAgentEmbed,
SpotterEmbed, SearchBarEmbed
const embed = new LiveboardEmbed('#tsEmbed', {
... // other embed view config
linkOverride: true,
})
localeπ
locale: string Optional
Version : SDK: 1.9.4 | ThoughtSpot: 8.1.0.cl, 8.4.1.sw
The locale settings to apply to the embedded view.
Supported embed types: AppEmbed, LiveboardEmbed, SearchEmbed, SpotterAgentEmbed, SpotterEmbed, SearchBarEmbed
// Replace <EmbedComponent> with embed component name. For example, AppEmbed, SearchEmbed, or LiveboardEmbed
const embed = new <EmbedComponent>('#tsEmbed', {
... // other embed view config
locale:'en',
})
newChartsLibraryπ
newChartsLibrary: boolean Optional
Version : SDK: 1.49.0 | ThoughtSpot Cloud: 26.6.0.cl
Enable or disable Muze chart phase 1 GA
Supported embed types: SearchEmbed
default : false
const embed = new SearchEmbed('#tsEmbed', {
... // other embed view config
newChartsLibrary: true,
})
overrideHistoryStateπ
overrideHistoryState: boolean Optional
Version : SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
Overrides the browser history behavior for embedding application users. This parameter changes standard history navigation (pushState) into a state replacement (replaceState), preventing users from getting trapped in back-button loops inside the embedded iframe environment. The overrideHistoryState setting is honored only if the application is running within an embedded context.
Supported embed types: AppEmbed, LiveboardEmbed, SearchEmbed, SpotterAgentEmbed, SpotterEmbed, SearchBarEmbed
// Replace <EmbedComponent> with embed component name. For example, AppEmbed, SearchEmbed, or LiveboardEmbed
const embed = new <EmbedComponent>('#tsEmbed', {
// ... other embed view config
overrideHistoryState: true,
});
overrideOrgIdπ
overrideOrgId: number Optional
Version : SDK: 1.35.0 | ThoughtSpot: 10.5.0.cl
Overrides an Org context for embedding application users.
This parameter allows a user authenticated to one Org to view the
objects from another Org.
The overrideOrgId setting is honoured only if the
Per Org URL feature is enabled on your ThoughtSpot instance.
Supported embed types: AppEmbed, LiveboardEmbed, SearchEmbed, SpotterAgentEmbed, SpotterEmbed, SearchBarEmbed
// Replace <EmbedComponent> with embed component name. For example, AppEmbed, SearchEmbed, or LiveboardEmbed
const embed = new <EmbedComponent>('#tsEmbed', {
... // other embed view config
overrideOrgId: 142536,
});
preRenderConfigπ
preRenderConfig: PreRenderConfig Optional
Version : SDK: 1.52.0
Configuration for the pre-render wrapper element.
Each property here supersedes its deprecated top-level counterpart on
BaseViewConfig β id over preRenderId, containerSelector over
preRenderContainer and doNotTrackSize over doNotTrackPreRenderSize β
and takes precedence when both are set, so existing top-level usage
continues to work without any changes.
See PreRenderConfig for available options.
const embed = new LiveboardEmbed('#tsEmbed', {
preRenderConfig: {
id: 'my-liveboard',
zIndex: -10,
},
});
embed.preRender();
embed.showPreRender();
preRenderContainerπ
preRenderContainer: string | HTMLElement Optional
The DOM element or CSS selector string specifying the container into which
the pre-rendered wrapper is inserted. Defaults to document.body when not
specified.
When to use a target container: set this when the pre-render should
live somewhere other than document.body β for example when <body> has
overflow: hidden and scrolling is handled by an inner element, or when
you need the wrapper to sit inside a specific stacking/positioning context.
The wrapper is positioned to track the embedding element within this
container, so choose the scrollable/positioned ancestor you want it
aligned to.
Pass a stable container: the wrapper is mounted into the resolved
container once, during preRender(). The container must stay mounted for
the lifetime of the pre-render β if the host app unmounts and remounts it
(for example React replacing the node), the wrapper is orphaned on the
detached node. Mount the container above the part of the tree that
re-renders so its identity is stable. Prefer a CSS selector string over a
raw element: a selector can be re-resolved to the fresh node on the next
reposition, whereas an element reference cannot be recovered once detached.
When the embed host lives inside a Shadow DOM, a selector string is
resolved against that shadow root as well (since document.querySelector
cannot pierce shadow boundaries); pass the element directly if the
container lives in a different root.
Deprecated : Use PreRenderConfig.containerSelector via preRenderConfig instead.
Version : SDK: 1.49.2 | ThoughtSpot: *
const embed = new LiveboardEmbed('#tsEmbed', {
preRenderId: 'my-liveboard',
// Prefer a selector for a stable, scrollable container.
preRenderContainer: '#my-scroll-container',
});
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.
Supported embed types: AppEmbed, LiveboardEmbed, SearchEmbed, SpotterAgentEmbed, SpotterEmbed, SearchBarEmbed
Deprecated : Use PreRenderConfig.id via preRenderConfig instead.
Version : SDK: 1.25.0 | ThoughtSpot: 9.6.0.cl, 9.8.0.sw
// Replace <EmbedComponent> with embed component name. For example, AppEmbed, SearchEmbed, or LiveboardEmbed
const embed = new <EmbedComponent>('#tsEmbed', {
... // other embed view config
preRenderId: "preRenderId-123",
});
embed.showPreRender();
refreshAuthTokenOnNearExpiryπ
refreshAuthTokenOnNearExpiry: boolean Optional
Version : SDK: 1.45.2 | ThoughtSpot: 26.3.0.cl
Refresh the auth token when the token is near expiry.
default : true
const embed = new AppEmbed('#tsEmbed', {
... // other embed view config
refreshAuthTokenOnNearExpiry: true,
})
runtimeFiltersπ
runtimeFilters: RuntimeFilter[] Optional
Version : SDK: 1.9.4 | ThoughtSpot: 8.1.0.cl, 8.4.1.sw
The list of runtime filters to apply to a search Answer, visualization, or Liveboard.
Supported embed types: AppEmbed, LiveboardEmbed, SearchEmbed
// Replace <EmbedComponent> with embed component name. For example, AppEmbed, SearchEmbed, or LiveboardEmbed
const embed = new <EmbedComponent>('#tsEmbed', {
... // other embed view config
runtimeFilters: [
{
columnName: 'value',
operator: RuntimeFilterOp.EQ,
values: ['string' | 123 | true],
},
],
})
runtimeParametersπ
runtimeParameters: RuntimeParameter[] Optional
Version : SDK: 1.25.0 | ThoughtSpot: 9.2.0.cl, 9.5.0.sw
The list of parameter overrides to apply to a search Answer, visualization, or Liveboard.
Supported embed types: AppEmbed, LiveboardEmbed, SearchEmbed
// Replace <EmbedComponent> with embed component name. For example, AppEmbed, SearchEmbed, or LiveboardEmbed
const embed = new <EmbedComponent>('#tsEmbed', {
... // other embed view config
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.
Supported embed types: SearchEmbed
searchOptions: {
searchTokenString: '[quantity purchased] [region]',
executeSearch: true,
}
searchQueryπ
searchQuery: string Optional
The initial search query to load the answer with. Use searchOptions instead.
shouldBypassPayloadValidationπ
shouldBypassPayloadValidation: boolean Optional
Version : SDK: 1.45.2 | ThoughtSpot: 26.3.0.cl
This flag skips payload validation so events can be processed even if the payload is old, incomplete, or from a trusted system.
default : false
const embed = new AppEmbed('#tsEmbed', {
... // other embed view config
shouldBypassPayloadValidation:true,
})
showAlertsπ
showAlerts: boolean Optional
Version : SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
Show alert messages and toast messages in the embed. Supported in all embed types.
const embed = new AppEmbed('#tsEmbed', {
... // other embed view config
showAlerts:true,
})
useHostEventsV2π
useHostEventsV2: boolean Optional
Version : SDK: 1.45.2 | ThoughtSpot: 26.3.0.cl
Flag to use host events v2. This is used to enable the new host events v2 API.
default : false
const embed = new AppEmbed('#tsEmbed', {
... // other embed view config
useHostEventsV2:true,
})
useLastSelectedSourcesπ
useLastSelectedSources: boolean Optional
Version : SDK: 1.24.0
Flag to set if last selected dataSource should be used
Supported embed types: SearchEmbed
visibleActionsπ
visibleActions: Action[] Optional
Version : SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
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 as an allowlist β only the actions listed here will be shown. All other actions will be hidden. Use either this or hiddenActions, not both.
Supported embed types: AppEmbed, LiveboardEmbed, SearchEmbed, SpotterAgentEmbed, SpotterEmbed, SearchBarEmbed
// Replace <EmbedComponent> with embed component name. For example, AppEmbed, SearchEmbed, or LiveboardEmbed
const embed = new <EmbedComponent>('#tsEmbed', {
... // other embed view config
visibleActions: [Action.Download, Action.ExportTML],
});
visualOverridesπ
visualOverrides: VisualizationOverrides Optional
Version : SDK: 1.49.0 | ThoughtSpot: 26.6.0.cl
Visual overrides to customize the chart or table properties.