diff --git a/modules/ROOT/pages/typedoc/Class/AppEmbed.adoc b/modules/ROOT/pages/typedoc/Class/AppEmbed.adoc new file mode 100644 index 000000000..c86583cdd --- /dev/null +++ b/modules/ROOT/pages/typedoc/Class/AppEmbed.adoc @@ -0,0 +1,427 @@ +:toc: true +:toclevels: 2 +:page-title: AppEmbed +:page-pageid: Class/AppEmbed +:page-description: Embeds full ThoughtSpot experience in a host application. + += AppEmbed + +Embeds full ThoughtSpot experience in a host application. + + + +`group` : Embed components + + + + + +== Constructors + +=== constructor + + + +`Overrides V1Embed.constructor` + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/embed/app.ts#L124[embed/app.ts, window=_blank] + +[source, js] +---- + +new AppEmbed(domSelector: DOMSelector , viewConfig: AppViewConfig ) : AppEmbed + +---- + + + +==== Parameters + +* domSelector: xref:DOMSelector.adoc[DOMSelector] + + + +* viewConfig: xref:AppViewConfig.adoc[AppViewConfig] + + + +==== Returns + +xref:AppEmbed.adoc[AppEmbed] + +== Methods + +=== destroy + + + + + +`Inherited from V1Embed.destroy` + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/embed/ts-embed.ts#L811[embed/ts-embed.ts, window=_blank] + +[source, js] +---- + +destroy() : void + +---- + +Destroys the ThoughtSpot embed, and remove any nodes from the DOM. + + + +`version` : SDK: 1.19.1 | ThoughtSpot: * + + + + + + + + + +==== Returns + +void + +=== getThoughtSpotPostUrlParams + + + + + +`Inherited from V1Embed.getThoughtSpotPostUrlParams` + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/embed/ts-embed.ts#L783[embed/ts-embed.ts, window=_blank] + +[source, js] +---- + +getThoughtSpotPostUrlParams() : string + +---- + +Get the Post Url Params for THOUGHTSPOT from the current +host app URL. +THOUGHTSPOT URL params starts with a prefix "ts-" + + + +`version` : SDK: 1.14.0 | ThoughtSpot: 8.4.0.cl, 8.4.1-sw + + + + + + + + + +==== Returns + +string + +=== getUnderlyingFrameElement + + + + + +`Inherited from V1Embed.getUnderlyingFrameElement` + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/embed/ts-embed.ts#L819[embed/ts-embed.ts, window=_blank] + +[source, js] +---- + +getUnderlyingFrameElement() : HTMLIFrameElement + +---- + + + + + + + +==== Returns + +xref:HTMLIFrameElement.adoc[HTMLIFrameElement] + +=== navigateToPage + + + + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/embed/app.ts#L274[embed/app.ts, window=_blank] + +[source, js] +---- + +navigateToPage(path: string | number , noReload?: boolean = false) : void + +---- + +Navigate to particular page for app embed. eg:answers/pinboards/home +This is used for embedding answers, pinboards, visualizations and full application +only. + + + +`version` : SDK: 1.12.0 | ThoughtSpot: 8.4.0.cl, 8.4.1-sw + + + + + +==== Parameters + +* path: string | number + + +string | number The string, set to iframe src and navigate to new page +eg: appEmbed.navigateToPage('pinboards') +When used with `noReload` (default: true) this can also be a number +like 1/-1 to go forward/back. + + + +* noReload: boolean = false + + +boolean Trigger the navigation without reloading the page + + + +==== Returns + +void + +=== off + + + + + +`Inherited from V1Embed.off` + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/embed/ts-embed.ts#L715[embed/ts-embed.ts, window=_blank] + +[source, js] +---- + +off(messageType: EmbedEvent , callback: MessageCallback ) : TsEmbed + +---- + +Removes an event listener for a particular event type. + + + +`example` : +```js +const errorHandler = (data) => { console.error(data); }; +tsEmbed.on(EmbedEvent.Error, errorHandler); +tsEmbed.off(EmbedEvent.Error, errorHandler); +``` + + + + + +==== Parameters + +* messageType: xref:EmbedEvent.adoc[EmbedEvent] + + +The message type + + + +* callback: xref:MessageCallback.adoc[MessageCallback] + + +The callback to remove + + + +==== Returns + +xref:TsEmbed.adoc[TsEmbed] + +=== on + + + + + +`Inherited from V1Embed.on` + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/embed/ts-embed.ts#L886[embed/ts-embed.ts, window=_blank] + +[source, js] +---- + +on(messageType: EmbedEvent , callback: MessageCallback , options?: MessageOptions = ...) : TsEmbed + +---- + + + + + +`example` : +```js +tsEmbed.on(EmbedEvent.Error, (data) => { + console.error(data); +}); +``` + + + +`example` : +```js +tsEmbed.on(EmbedEvent.Save, (data) => { + console.log("Answer save clicked", data); +}, { + start: true // This will trigger the callback on start of save +}); +``` + + + + + +==== Parameters + +* messageType: xref:EmbedEvent.adoc[EmbedEvent] + + + +* callback: xref:MessageCallback.adoc[MessageCallback] + + + +* options: xref:MessageOptions.adoc[MessageOptions] = ... + + + +==== Returns + +xref:TsEmbed.adoc[TsEmbed] + +=== prerenderGeneric + + + + + +`Inherited from V1Embed.prerenderGeneric` + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/embed/ts-embed.ts#L831[embed/ts-embed.ts, window=_blank] + +[source, js] +---- + +prerenderGeneric() : Promise + +---- + +Prerenders a generic instance of the TS component. +This means without the path but with the flags already applied. +This is useful for prerendering the component in the background. + + + +`version` : SDK: 1.22.0 + + + + + + + + +==== Returns + +xref:Promise.adoc[Promise] + +=== render + + + +`Overrides V1Embed.render` + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/embed/app.ts#L302[embed/app.ts, window=_blank] + +[source, js] +---- + +render() : AppEmbed + +---- + +Renders the embedded application pages in the ThoughtSpot app. + + + + + + + + +==== Returns + +xref:AppEmbed.adoc[AppEmbed] + +=== trigger + + + + + +`Inherited from V1Embed.trigger` + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/embed/ts-embed.ts#L758[embed/ts-embed.ts, window=_blank] + +[source, js] +---- + +trigger(messageType: HostEvent , data?: any = {}) : Promise + +---- + +Triggers an event to the embedded app + + + + +==== Parameters + +* messageType: xref:HostEvent.adoc[HostEvent] + + +The event type + + + +* data: any = {} + + +The payload to send with the message + + + + +==== Returns + +xref:Promise.adoc[Promise] \ No newline at end of file diff --git a/modules/ROOT/pages/typedoc/Class/LiveboardEmbed.adoc b/modules/ROOT/pages/typedoc/Class/LiveboardEmbed.adoc new file mode 100644 index 000000000..db839ceaa --- /dev/null +++ b/modules/ROOT/pages/typedoc/Class/LiveboardEmbed.adoc @@ -0,0 +1,425 @@ +:toc: true +:toclevels: 2 +:page-title: LiveboardEmbed +:page-pageid: Class/LiveboardEmbed +:page-description: Embed a ThoughtSpot Liveboard or a Thoughtspot visualization. When rendered it already waits for the authentication to complete, so no need to wait for AuthStatus.SUCCESS. + += LiveboardEmbed + +Embed a ThoughtSpot Liveboard or a Thoughtspot visualization. When rendered it already +waits for the authentication to complete, so no need to wait for AuthStatus.SUCCESS. + + + +`example` : +```js +import { .. } from '@thoughtspot/visual-embed-sdk'; +init({ ... }); +const embed = new LiveboardEmbed("#container", { + liveboardId: , +// .. other params here. +}) +``` + + + +`group` : Embed components + + + + + +== Constructors + +=== constructor + + + +`Overrides V1Embed.constructor` + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/embed/liveboard.ts#L125[embed/liveboard.ts, window=_blank] + +[source, js] +---- + +new LiveboardEmbed(domSelector: DOMSelector , viewConfig: LiveboardViewConfig ) : LiveboardEmbed + +---- + + + +==== Parameters + +* domSelector: xref:DOMSelector.adoc[DOMSelector] + + + +* viewConfig: xref:LiveboardViewConfig.adoc[LiveboardViewConfig] + + + +==== Returns + +xref:LiveboardEmbed.adoc[LiveboardEmbed] + +== Methods + +=== destroy + + + + + +`Inherited from V1Embed.destroy` + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/embed/ts-embed.ts#L811[embed/ts-embed.ts, window=_blank] + +[source, js] +---- + +destroy() : void + +---- + +Destroys the ThoughtSpot embed, and remove any nodes from the DOM. + + + +`version` : SDK: 1.19.1 | ThoughtSpot: * + + + + + + + + + +==== Returns + +void + +=== getThoughtSpotPostUrlParams + + + + + +`Inherited from V1Embed.getThoughtSpotPostUrlParams` + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/embed/ts-embed.ts#L783[embed/ts-embed.ts, window=_blank] + +[source, js] +---- + +getThoughtSpotPostUrlParams() : string + +---- + +Get the Post Url Params for THOUGHTSPOT from the current +host app URL. +THOUGHTSPOT URL params starts with a prefix "ts-" + + + +`version` : SDK: 1.14.0 | ThoughtSpot: 8.4.0.cl, 8.4.1-sw + + + + + + + + + +==== Returns + +string + +=== getUnderlyingFrameElement + + + + + +`Inherited from V1Embed.getUnderlyingFrameElement` + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/embed/ts-embed.ts#L819[embed/ts-embed.ts, window=_blank] + +[source, js] +---- + +getUnderlyingFrameElement() : HTMLIFrameElement + +---- + + + + + + + +==== Returns + +xref:HTMLIFrameElement.adoc[HTMLIFrameElement] + +=== navigateToLiveboard + + + + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/embed/liveboard.ts#L263[embed/liveboard.ts, window=_blank] + +[source, js] +---- + +navigateToLiveboard(liveboardId: string , vizId?: string , activeTabId?: string ) : void + +---- + + + +==== Parameters + +* liveboardId: string + + + +* vizId: string + + + +* activeTabId: string + + + +==== Returns + +void + +=== off + + + + + +`Inherited from V1Embed.off` + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/embed/ts-embed.ts#L715[embed/ts-embed.ts, window=_blank] + +[source, js] +---- + +off(messageType: EmbedEvent , callback: MessageCallback ) : TsEmbed + +---- + +Removes an event listener for a particular event type. + + + +`example` : +```js +const errorHandler = (data) => { console.error(data); }; +tsEmbed.on(EmbedEvent.Error, errorHandler); +tsEmbed.off(EmbedEvent.Error, errorHandler); +``` + + + + + +==== Parameters + +* messageType: xref:EmbedEvent.adoc[EmbedEvent] + + +The message type + + + +* callback: xref:MessageCallback.adoc[MessageCallback] + + +The callback to remove + + + +==== Returns + +xref:TsEmbed.adoc[TsEmbed] + +=== on + + + + + +`Inherited from V1Embed.on` + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/embed/ts-embed.ts#L886[embed/ts-embed.ts, window=_blank] + +[source, js] +---- + +on(messageType: EmbedEvent , callback: MessageCallback , options?: MessageOptions = ...) : TsEmbed + +---- + + + + + +`example` : +```js +tsEmbed.on(EmbedEvent.Error, (data) => { + console.error(data); +}); +``` + + + +`example` : +```js +tsEmbed.on(EmbedEvent.Save, (data) => { + console.log("Answer save clicked", data); +}, { + start: true // This will trigger the callback on start of save +}); +``` + + + + + +==== Parameters + +* messageType: xref:EmbedEvent.adoc[EmbedEvent] + + + +* callback: xref:MessageCallback.adoc[MessageCallback] + + + +* options: xref:MessageOptions.adoc[MessageOptions] = ... + + + +==== Returns + +xref:TsEmbed.adoc[TsEmbed] + +=== prerenderGeneric + + + + + +`Inherited from V1Embed.prerenderGeneric` + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/embed/ts-embed.ts#L831[embed/ts-embed.ts, window=_blank] + +[source, js] +---- + +prerenderGeneric() : Promise + +---- + +Prerenders a generic instance of the TS component. +This means without the path but with the flags already applied. +This is useful for prerendering the component in the background. + + + +`version` : SDK: 1.22.0 + + + + + + + + +==== Returns + +xref:Promise.adoc[Promise] + +=== render + + + +`Overrides V1Embed.render` + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/embed/liveboard.ts#L254[embed/liveboard.ts, window=_blank] + +[source, js] +---- + +render() : LiveboardEmbed + +---- + +Render an embedded ThoughtSpot Liveboard or visualization + + + + + + + + +==== Returns + +xref:LiveboardEmbed.adoc[LiveboardEmbed] + +=== trigger + + + +`Overrides V1Embed.trigger` + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/embed/liveboard.ts#L240[embed/liveboard.ts, window=_blank] + +[source, js] +---- + +trigger(messageType: HostEvent , data?: any = {}) : Promise + +---- + +Triggers an event to the embedded app + + + + +==== Parameters + +* messageType: xref:HostEvent.adoc[HostEvent] + + +The event type + + + +* data: any = {} + + +The payload to send with the message + + + + +==== Returns + +xref:Promise.adoc[Promise] \ No newline at end of file diff --git a/modules/ROOT/pages/typedoc/Class/SearchBarEmbed.adoc b/modules/ROOT/pages/typedoc/Class/SearchBarEmbed.adoc new file mode 100644 index 000000000..31c5df003 --- /dev/null +++ b/modules/ROOT/pages/typedoc/Class/SearchBarEmbed.adoc @@ -0,0 +1,389 @@ +:toc: true +:toclevels: 2 +:page-title: SearchBarEmbed +:page-pageid: Class/SearchBarEmbed +:page-description: Embed ThoughtSpot search bar + += SearchBarEmbed + +Embed ThoughtSpot search bar + + + +`version:` : SDK: 1.18.0 | ThoughtSpot: 8.10.0.cl, 9.0.1-sw + + + +`group` : Embed components + + + + + +== Constructors + +=== constructor + + + +`Overrides TsEmbed.constructor` + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/embed/search-bar.tsx#L43[embed/search-bar.tsx, window=_blank] + +[source, js] +---- + +new SearchBarEmbed(domSelector: string , viewConfig: SearchBarViewConfig ) : SearchBarEmbed + +---- + + + +==== Parameters + +* domSelector: string + + + +* viewConfig: xref:SearchBarViewConfig.adoc[SearchBarViewConfig] + + + +==== Returns + +xref:SearchBarEmbed.adoc[SearchBarEmbed] + +== Methods + +=== destroy + + + + + +`Inherited from TsEmbed.destroy` + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/embed/ts-embed.ts#L811[embed/ts-embed.ts, window=_blank] + +[source, js] +---- + +destroy() : void + +---- + +Destroys the ThoughtSpot embed, and remove any nodes from the DOM. + + + +`version` : SDK: 1.19.1 | ThoughtSpot: * + + + + + + + + + +==== Returns + +void + +=== getThoughtSpotPostUrlParams + + + + + +`Inherited from TsEmbed.getThoughtSpotPostUrlParams` + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/embed/ts-embed.ts#L783[embed/ts-embed.ts, window=_blank] + +[source, js] +---- + +getThoughtSpotPostUrlParams() : string + +---- + +Get the Post Url Params for THOUGHTSPOT from the current +host app URL. +THOUGHTSPOT URL params starts with a prefix "ts-" + + + +`version` : SDK: 1.14.0 | ThoughtSpot: 8.4.0.cl, 8.4.1-sw + + + + + + + + + +==== Returns + +string + +=== getUnderlyingFrameElement + + + + + +`Inherited from TsEmbed.getUnderlyingFrameElement` + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/embed/ts-embed.ts#L819[embed/ts-embed.ts, window=_blank] + +[source, js] +---- + +getUnderlyingFrameElement() : HTMLIFrameElement + +---- + + + + + + + +==== Returns + +xref:HTMLIFrameElement.adoc[HTMLIFrameElement] + +=== off + + + + + +`Inherited from TsEmbed.off` + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/embed/ts-embed.ts#L715[embed/ts-embed.ts, window=_blank] + +[source, js] +---- + +off(messageType: EmbedEvent , callback: MessageCallback ) : TsEmbed + +---- + +Removes an event listener for a particular event type. + + + +`example` : +```js +const errorHandler = (data) => { console.error(data); }; +tsEmbed.on(EmbedEvent.Error, errorHandler); +tsEmbed.off(EmbedEvent.Error, errorHandler); +``` + + + + + +==== Parameters + +* messageType: xref:EmbedEvent.adoc[EmbedEvent] + + +The message type + + + +* callback: xref:MessageCallback.adoc[MessageCallback] + + +The callback to remove + + + +==== Returns + +xref:TsEmbed.adoc[TsEmbed] + +=== on + + + + + +`Inherited from TsEmbed.on` + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/embed/ts-embed.ts#L689[embed/ts-embed.ts, window=_blank] + +[source, js] +---- + +on(messageType: EmbedEvent , callback: MessageCallback , options?: MessageOptions = ...) : TsEmbed + +---- + +Registers an event listener to trigger an alert when the ThoughtSpot app +sends an event of a particular message type to the host application. + + + +`example` : +```js +tsEmbed.on(EmbedEvent.Error, (data) => { + console.error(data); +}); +``` + + + +`example` : +```js +tsEmbed.on(EmbedEvent.Save, (data) => { + console.log("Answer save clicked", data); +}, { + start: true // This will trigger the callback on start of save +}); +``` + + + + + +==== Parameters + +* messageType: xref:EmbedEvent.adoc[EmbedEvent] + + +The message type + + + +* callback: xref:MessageCallback.adoc[MessageCallback] + + +A callback as a function + + + +* options: xref:MessageOptions.adoc[MessageOptions] = ... + + +The message options + + + +==== Returns + +xref:TsEmbed.adoc[TsEmbed] + +=== prerenderGeneric + + + + + +`Inherited from TsEmbed.prerenderGeneric` + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/embed/ts-embed.ts#L831[embed/ts-embed.ts, window=_blank] + +[source, js] +---- + +prerenderGeneric() : Promise + +---- + +Prerenders a generic instance of the TS component. +This means without the path but with the flags already applied. +This is useful for prerendering the component in the background. + + + +`version` : SDK: 1.22.0 + + + + + + + + +==== Returns + +xref:Promise.adoc[Promise] + +=== render + + + +`Overrides TsEmbed.render` + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/embed/search-bar.tsx#L92[embed/search-bar.tsx, window=_blank] + +[source, js] +---- + +render() : SearchBarEmbed + +---- + +Render the embedded ThoughtSpot search + + + + + + + + +==== Returns + +xref:SearchBarEmbed.adoc[SearchBarEmbed] + +=== trigger + + + + + +`Inherited from TsEmbed.trigger` + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/embed/ts-embed.ts#L758[embed/ts-embed.ts, window=_blank] + +[source, js] +---- + +trigger(messageType: HostEvent , data?: any = {}) : Promise + +---- + +Triggers an event to the embedded app + + + + +==== Parameters + +* messageType: xref:HostEvent.adoc[HostEvent] + + +The event type + + + +* data: any = {} + + +The payload to send with the message + + + + +==== Returns + +xref:Promise.adoc[Promise] \ No newline at end of file diff --git a/modules/ROOT/pages/typedoc/Class/SearchEmbed.adoc b/modules/ROOT/pages/typedoc/Class/SearchEmbed.adoc new file mode 100644 index 000000000..b8750db04 --- /dev/null +++ b/modules/ROOT/pages/typedoc/Class/SearchEmbed.adoc @@ -0,0 +1,385 @@ +:toc: true +:toclevels: 2 +:page-title: SearchEmbed +:page-pageid: Class/SearchEmbed +:page-description: Embed ThoughtSpot search + += SearchEmbed + +Embed ThoughtSpot search + + + +`group` : Embed components + + + + + +== Constructors + +=== constructor + + + +`Overrides TsEmbed.constructor` + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/embed/search.ts#L129[embed/search.ts, window=_blank] + +[source, js] +---- + +new SearchEmbed(domSelector: DOMSelector , viewConfig: SearchViewConfig ) : SearchEmbed + +---- + + + +==== Parameters + +* domSelector: xref:DOMSelector.adoc[DOMSelector] + + + +* viewConfig: xref:SearchViewConfig.adoc[SearchViewConfig] + + + +==== Returns + +xref:SearchEmbed.adoc[SearchEmbed] + +== Methods + +=== destroy + + + + + +`Inherited from TsEmbed.destroy` + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/embed/ts-embed.ts#L811[embed/ts-embed.ts, window=_blank] + +[source, js] +---- + +destroy() : void + +---- + +Destroys the ThoughtSpot embed, and remove any nodes from the DOM. + + + +`version` : SDK: 1.19.1 | ThoughtSpot: * + + + + + + + + + +==== Returns + +void + +=== getThoughtSpotPostUrlParams + + + + + +`Inherited from TsEmbed.getThoughtSpotPostUrlParams` + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/embed/ts-embed.ts#L783[embed/ts-embed.ts, window=_blank] + +[source, js] +---- + +getThoughtSpotPostUrlParams() : string + +---- + +Get the Post Url Params for THOUGHTSPOT from the current +host app URL. +THOUGHTSPOT URL params starts with a prefix "ts-" + + + +`version` : SDK: 1.14.0 | ThoughtSpot: 8.4.0.cl, 8.4.1-sw + + + + + + + + + +==== Returns + +string + +=== getUnderlyingFrameElement + + + + + +`Inherited from TsEmbed.getUnderlyingFrameElement` + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/embed/ts-embed.ts#L819[embed/ts-embed.ts, window=_blank] + +[source, js] +---- + +getUnderlyingFrameElement() : HTMLIFrameElement + +---- + + + + + + + +==== Returns + +xref:HTMLIFrameElement.adoc[HTMLIFrameElement] + +=== off + + + + + +`Inherited from TsEmbed.off` + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/embed/ts-embed.ts#L715[embed/ts-embed.ts, window=_blank] + +[source, js] +---- + +off(messageType: EmbedEvent , callback: MessageCallback ) : TsEmbed + +---- + +Removes an event listener for a particular event type. + + + +`example` : +```js +const errorHandler = (data) => { console.error(data); }; +tsEmbed.on(EmbedEvent.Error, errorHandler); +tsEmbed.off(EmbedEvent.Error, errorHandler); +``` + + + + + +==== Parameters + +* messageType: xref:EmbedEvent.adoc[EmbedEvent] + + +The message type + + + +* callback: xref:MessageCallback.adoc[MessageCallback] + + +The callback to remove + + + +==== Returns + +xref:TsEmbed.adoc[TsEmbed] + +=== on + + + + + +`Inherited from TsEmbed.on` + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/embed/ts-embed.ts#L689[embed/ts-embed.ts, window=_blank] + +[source, js] +---- + +on(messageType: EmbedEvent , callback: MessageCallback , options?: MessageOptions = ...) : TsEmbed + +---- + +Registers an event listener to trigger an alert when the ThoughtSpot app +sends an event of a particular message type to the host application. + + + +`example` : +```js +tsEmbed.on(EmbedEvent.Error, (data) => { + console.error(data); +}); +``` + + + +`example` : +```js +tsEmbed.on(EmbedEvent.Save, (data) => { + console.log("Answer save clicked", data); +}, { + start: true // This will trigger the callback on start of save +}); +``` + + + + + +==== Parameters + +* messageType: xref:EmbedEvent.adoc[EmbedEvent] + + +The message type + + + +* callback: xref:MessageCallback.adoc[MessageCallback] + + +A callback as a function + + + +* options: xref:MessageOptions.adoc[MessageOptions] = ... + + +The message options + + + +==== Returns + +xref:TsEmbed.adoc[TsEmbed] + +=== prerenderGeneric + + + + + +`Inherited from TsEmbed.prerenderGeneric` + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/embed/ts-embed.ts#L831[embed/ts-embed.ts, window=_blank] + +[source, js] +---- + +prerenderGeneric() : Promise + +---- + +Prerenders a generic instance of the TS component. +This means without the path but with the flags already applied. +This is useful for prerendering the component in the background. + + + +`version` : SDK: 1.22.0 + + + + + + + + +==== Returns + +xref:Promise.adoc[Promise] + +=== render + + + +`Overrides TsEmbed.render` + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/embed/search.ts#L224[embed/search.ts, window=_blank] + +[source, js] +---- + +render() : SearchEmbed + +---- + +Render the embedded ThoughtSpot search + + + + + + + + +==== Returns + +xref:SearchEmbed.adoc[SearchEmbed] + +=== trigger + + + + + +`Inherited from TsEmbed.trigger` + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/embed/ts-embed.ts#L758[embed/ts-embed.ts, window=_blank] + +[source, js] +---- + +trigger(messageType: HostEvent , data?: any = {}) : Promise + +---- + +Triggers an event to the embedded app + + + + +==== Parameters + +* messageType: xref:HostEvent.adoc[HostEvent] + + +The event type + + + +* data: any = {} + + +The payload to send with the message + + + + +==== Returns + +xref:Promise.adoc[Promise] \ No newline at end of file diff --git a/modules/ROOT/pages/typedoc/Enumeration/Action.adoc b/modules/ROOT/pages/typedoc/Enumeration/Action.adoc new file mode 100644 index 000000000..2b97b6645 --- /dev/null +++ b/modules/ROOT/pages/typedoc/Enumeration/Action.adoc @@ -0,0 +1,606 @@ +:toc: true +:toclevels: 2 +:page-title: Action +:page-pageid: Enumeration/Action +:page-description: The list of actions that can be performed on visual ThoughtSpot entities, such as answers and Liveboards. + += Action + +The list of actions that can be performed on visual ThoughtSpot +entities, such as answers and Liveboards. +This enum is used to specify the actions that could be disabled, +hidden or made visible. + + + +`example` : +```js +const embed = new LiveboardEmbed('#embed-container', { + ... // other options + visibleActions: [Action.Save, Action.Explore], + disableActions: [Action.Save], + hiddenActions: [Action.Download], // Set either this or visibleActions +}) +``` + + + + + +== Enumeration members + +=== AddFilter +`AddFilter:= "addFilter"` + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1859[types.ts, window=_blank] + +=== AddFormula +`AddFormula:= "addFormula"` + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1863[types.ts, window=_blank] + +=== AddParameter +`AddParameter:= "addParameter"` + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1864[types.ts, window=_blank] + +=== AddToFavorites +`AddToFavorites:= "addToFavorites"` + + + + + +`version` : SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1971[types.ts, window=_blank] + +=== AnswerChartSwitcher +`AnswerChartSwitcher:= "answerChartSwitcher"` + + + + + +`version` : SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1967[types.ts, window=_blank] + +=== AnswerDelete +`AnswerDelete:= "onDeleteAnswer"` + + + + + +`version` : SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1963[types.ts, window=_blank] + +=== AxisMenuAggregate +`AxisMenuAggregate:= "axisMenuAggregate"` + + + + + +`version` : SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1998[types.ts, window=_blank] + +=== AxisMenuConditionalFormat +`AxisMenuConditionalFormat:= "axisMenuConditionalFormat"` + + + + + +`version` : SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L2010[types.ts, window=_blank] + +=== AxisMenuEdit +`AxisMenuEdit:= "axisMenuEdit"` + + + + + +`version` : SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L2030[types.ts, window=_blank] + +=== AxisMenuFilter +`AxisMenuFilter:= "axisMenuFilter"` + + + + + +`version` : SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L2006[types.ts, window=_blank] + +=== AxisMenuGroup +`AxisMenuGroup:= "axisMenuGroup"` + + + + + +`version` : SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L2018[types.ts, window=_blank] + +=== AxisMenuNumberFormat +`AxisMenuNumberFormat:= "axisMenuNumberFormat"` + + + + + +`version` : SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L2034[types.ts, window=_blank] + +=== AxisMenuPosition +`AxisMenuPosition:= "axisMenuPosition"` + + + + + +`version` : SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L2022[types.ts, window=_blank] + +=== AxisMenuRemove +`AxisMenuRemove:= "axisMenuRemove"` + + + + + +`version` : SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L2042[types.ts, window=_blank] + +=== AxisMenuRename +`AxisMenuRename:= "axisMenuRename"` + + + + + +`version` : SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L2026[types.ts, window=_blank] + +=== AxisMenuSort +`AxisMenuSort:= "axisMenuSort"` + + + + + +`version` : SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L2014[types.ts, window=_blank] + +=== AxisMenuTextWrapping +`AxisMenuTextWrapping:= "axisMenuTextWrapping"` + + + + + +`version` : SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L2038[types.ts, window=_blank] + +=== AxisMenuTimeBucket +`AxisMenuTimeBucket:= "axisMenuTimeBucket"` + + + + + +`version` : SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L2002[types.ts, window=_blank] + +=== ChooseDataSources +`ChooseDataSources:= "chooseDataSources"` + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1862[types.ts, window=_blank] + +=== CollapseDataSources +`CollapseDataSources:= "collapseDataSources"` + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1861[types.ts, window=_blank] + +=== ConfigureFilter +`ConfigureFilter:= "configureFilter"` + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1860[types.ts, window=_blank] + +=== CopyAndEdit +`CopyAndEdit:= "context-menu-item-copy-and-edit"` + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1947[types.ts, window=_blank] + +=== CopyLink +`CopyLink:= "embedDocument"` + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1851[types.ts, window=_blank] + +=== CopyToClipboard +`CopyToClipboard:= "context-menu-item-copy-to-clipboard"` + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1946[types.ts, window=_blank] + +=== CreateMonitor +`CreateMonitor:= "createMonitor"` + + + + + +`version` : SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1979[types.ts, window=_blank] + +=== CrossFilter +`CrossFilter:= "context-menu-item-cross-filter"` + + + + + +`version` : SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1990[types.ts, window=_blank] + +=== Download +`Download:= "download"` + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1884[types.ts, window=_blank] + +=== DownloadAsCsv +`DownloadAsCsv:= "downloadAsCSV"` + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1887[types.ts, window=_blank] + +=== DownloadAsPdf +`DownloadAsPdf:= "downloadAsPdf"` + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1886[types.ts, window=_blank] + +=== DownloadAsPng +`DownloadAsPng:= "downloadAsPng"` + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1885[types.ts, window=_blank] + +=== DownloadAsXlsx +`DownloadAsXlsx:= "downloadAsXLSX"` + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1888[types.ts, window=_blank] + +=== DrillExclude +`DrillExclude:= "context-menu-item-exclude"` + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1945[types.ts, window=_blank] + +=== DrillInclude +`DrillInclude:= "context-menu-item-include"` + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1944[types.ts, window=_blank] + +=== Edit +`Edit:= "edit"` + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1899[types.ts, window=_blank] + +=== EditACopy +`EditACopy:= "editACopy"` + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1850[types.ts, window=_blank] + +=== EditDetails +`EditDetails:= "editDetails"` + + + + + +`version` : SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1975[types.ts, window=_blank] + +=== EditMeasure +`EditMeasure:= "context-menu-item-edit-measure"` + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1952[types.ts, window=_blank] + +=== EditTML +`EditTML:= "editTSL"` + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1896[types.ts, window=_blank] + +=== EditTitle +`EditTitle:= "editTitle"` + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1900[types.ts, window=_blank] + +=== Explore +`Explore:= "explore"` + +Explore action. + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1943[types.ts, window=_blank] + +=== ExportTML +`ExportTML:= "exportTSL"` + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1893[types.ts, window=_blank] + +=== ImportTML +`ImportTML:= "importTSL"` + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1894[types.ts, window=_blank] + +=== LiveboardInfo +`LiveboardInfo:= "pinboardInfo"` + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1922[types.ts, window=_blank] + +=== MakeACopy +`MakeACopy:= "makeACopy"` + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1849[types.ts, window=_blank] + +=== ManagePipelines +`ManagePipelines:= "manage-pipeline"` + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1986[types.ts, window=_blank] + +=== Pin +`Pin:= "pin"` + +Pin action. + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1934[types.ts, window=_blank] + +=== Present +`Present:= "present"` + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1897[types.ts, window=_blank] + +=== QueryDetailsButtons +`QueryDetailsButtons:= "queryDetailsButtons"` + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1959[types.ts, window=_blank] + +=== Remove +`Remove:= "delete"` + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1901[types.ts, window=_blank] + +=== RemoveCrossFilter +`RemoveCrossFilter:= "context-menu-item-remove-cross-filter"` + + + + + +`version` : SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1994[types.ts, window=_blank] + +=== RenameModalTitleDescription +`RenameModalTitleDescription:= "renameModalTitleDescription"` + + + + + +`version` : SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L2051[types.ts, window=_blank] + +=== ReportError +`ReportError:= "reportError"` + + + + + +`version` : SDK: 1.11.1 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1983[types.ts, window=_blank] + +=== RequestAccess +`RequestAccess:= "requestAccess"` + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1958[types.ts, window=_blank] + +=== Save +`Save:= "save"` + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1839[types.ts, window=_blank] + +=== SaveAsView +`SaveAsView:= "saveAsView"` + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1848[types.ts, window=_blank] + +=== Schedule +`Schedule:= "subscription"` + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1856[types.ts, window=_blank] + +=== SchedulesList +`SchedulesList:= "schedule-list"` + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1857[types.ts, window=_blank] + +=== Separator +`Separator:= "context-menu-item-separator"` + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1953[types.ts, window=_blank] + +=== Share +`Share:= "share"` + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1858[types.ts, window=_blank] + +=== ShareViz +`ShareViz:= "shareViz"` + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1878[types.ts, window=_blank] + +=== ShowUnderlyingData +`ShowUnderlyingData:= "showUnderlyingData"` + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1883[types.ts, window=_blank] + +=== SpotIQAnalyze +`SpotIQAnalyze:= "spotIQAnalyze"` + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1869[types.ts, window=_blank] + +=== Subscription +`Subscription:= "subscription"` + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1939[types.ts, window=_blank] + +=== SyncToOtherApps +`SyncToOtherApps:= "sync-to-other-apps"` + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1985[types.ts, window=_blank] + +=== SyncToSheets +`SyncToSheets:= "sync-to-sheets"` + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1984[types.ts, window=_blank] + +=== ToggleSize +`ToggleSize:= "toggleSize"` + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1898[types.ts, window=_blank] + +=== UpdateTML +`UpdateTML:= "updateTSL"` + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1895[types.ts, window=_blank] \ No newline at end of file diff --git a/modules/ROOT/pages/typedoc/Enumeration/AuthEvent.adoc b/modules/ROOT/pages/typedoc/Enumeration/AuthEvent.adoc new file mode 100644 index 000000000..616970be6 --- /dev/null +++ b/modules/ROOT/pages/typedoc/Enumeration/AuthEvent.adoc @@ -0,0 +1,29 @@ +:toc: true +:toclevels: 2 +:page-title: AuthEvent +:page-pageid: Enumeration/AuthEvent +:page-description: Events which can be triggered on the emitter returned from {@link init}. + += AuthEvent + +Events which can be triggered on the emitter returned from xref:init.adoc[init]. + + + +`group` : Authentication / Init + + + + + +== Enumeration members + +=== TRIGGER_SSO_POPUP +`TRIGGER_SSO_POPUP:= "TRIGGER_SSO_POPUP"` + +Manually trigger the SSO popup. This is useful with +authStatus: SAMLRedirect/OIDCRedicre and inPopup: true + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/auth.ts#L142[auth.ts, window=_blank] \ No newline at end of file diff --git a/modules/ROOT/pages/typedoc/Enumeration/AuthFailureType.adoc b/modules/ROOT/pages/typedoc/Enumeration/AuthFailureType.adoc new file mode 100644 index 000000000..9505310b1 --- /dev/null +++ b/modules/ROOT/pages/typedoc/Enumeration/AuthFailureType.adoc @@ -0,0 +1,44 @@ +:toc: true +:toclevels: 2 +:page-title: AuthFailureType +:page-pageid: Enumeration/AuthFailureType +:page-description: Enum for auth failure types. This is the parameter passed to the listner of {@link AuthStatus.FAILURE}. + += AuthFailureType + +Enum for auth failure types. This is the parameter passed to the listner +of xref:AuthStatus.adoc#FAILURE[AuthStatus]. + + + +`group` : Authentication / Init + + + + + +== Enumeration members + +=== EXPIRY +`EXPIRY:= "EXPIRY"` + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/auth.ts#L58[auth.ts, window=_blank] + +=== NO_COOKIE_ACCESS +`NO_COOKIE_ACCESS:= "NO_COOKIE_ACCESS"` + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/auth.ts#L57[auth.ts, window=_blank] + +=== OTHER +`OTHER:= "OTHER"` + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/auth.ts#L59[auth.ts, window=_blank] + +=== SDK +`SDK:= "SDK"` + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/auth.ts#L56[auth.ts, window=_blank] \ No newline at end of file diff --git a/modules/ROOT/pages/typedoc/Enumeration/AuthStatus.adoc b/modules/ROOT/pages/typedoc/Enumeration/AuthStatus.adoc new file mode 100644 index 000000000..41e3e2013 --- /dev/null +++ b/modules/ROOT/pages/typedoc/Enumeration/AuthStatus.adoc @@ -0,0 +1,71 @@ +:toc: true +:toclevels: 2 +:page-title: AuthStatus +:page-pageid: Enumeration/AuthStatus +:page-description: Enum for auth status emitted by the emitter returned from {@link init}. + += AuthStatus + +Enum for auth status emitted by the emitter returned from xref:init.adoc[init]. + + + +`group` : Authentication / Init + + + + + +== Enumeration members + +=== FAILURE +`FAILURE:= "FAILURE"` + +Emits when the SDK fails to authenticate + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/auth.ts#L71[auth.ts, window=_blank] + +=== LOGOUT +`LOGOUT:= "LOGOUT"` + +Emits when a user logs out + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/auth.ts#L83[auth.ts, window=_blank] + +=== SDK_SUCCESS +`SDK_SUCCESS:= "SDK_SUCCESS"` + +Emits when the SDK authenticates successfully + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/auth.ts#L75[auth.ts, window=_blank] + +=== SUCCESS +`SUCCESS:= "SUCCESS"` + +Emits when the app sends an authentication success message + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/auth.ts#L79[auth.ts, window=_blank] + +=== WAITING_FOR_POPUP +`WAITING_FOR_POPUP:= "WAITING_FOR_POPUP"` + +Emitted when inPopup: true in the SAMLRedirect flow. +And, we are waiting for popup to be triggered either programatically +or by the trigger button. + + + +`version` : SDK: 1.19.0 + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/auth.ts#L91[auth.ts, window=_blank] \ No newline at end of file diff --git a/modules/ROOT/pages/typedoc/Enumeration/AuthType.adoc b/modules/ROOT/pages/typedoc/Enumeration/AuthType.adoc new file mode 100644 index 000000000..5b61fecbc --- /dev/null +++ b/modules/ROOT/pages/typedoc/Enumeration/AuthType.adoc @@ -0,0 +1,211 @@ +:toc: true +:toclevels: 2 +:page-title: AuthType +:page-pageid: Enumeration/AuthType +:page-description: The authentication mechanism for allowing access to the the embedded app + += AuthType + +The authentication mechanism for allowing access to the +the embedded app + + + +`group` : Authentication / Init + + + + + +== Enumeration members + +=== Basic +`Basic:= "Basic"` + +Use the ThoughtSpot login API to authenticate to the cluster directly. +Warning: This feature is primarily intended for developer testing. It is +strongly advised not to use this authentication method in production. + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L176[types.ts, window=_blank] + +=== EmbeddedSSO +`EmbeddedSSO:= "EmbeddedSSO"` + +Passthrough SSO to the embedded App within the iframe. Requires least +configuration, but may not be supported by all IDPs. This will behave like `None` +if SSO is not configured on ThoughtSpot. + + + +`example` : +```js +init({ + // ... + authType: AuthType.EmbeddedSSO, + }); +``` +Set authentication type as Embedded SSO. + +To use this: +Your SAML or OpenID provider must allow iframe redirects. +eg. If you are using okta as IdP, you can enable iFrame embedding. + + + +`version:` : SDK: 1.15.0 | ThouhgtSpot: 8.8.0.cl + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L50[types.ts, window=_blank] + +=== None +`None:= "None"` + +No authentication on the SDK. Passthrough to the embedded App. Alias for +`Passthrough`. + + + +`example` : +```js +init({ + // ... + authType: AuthType.None, + }); +``` + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L30[types.ts, window=_blank] + +=== OIDCRedirect +`OIDCRedirect:= "SSO_OIDC"` + +SSO using OIDC +Will make the host application redirect to the OIDC Idp. +See code samples in xref:SAMLRedirect.adoc[SAMLRedirect]. + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L123[types.ts, window=_blank] + +=== SAMLRedirect +`SAMLRedirect:= "SSO_SAML"` + +SSO using SAML +Will make the host application redirect to the SAML Idp. Use this +when the idp does not allow itself to be embedded. +This redirects the host application to the SAML Idp. The host application +will be redirected back to the ThoughtSpot app after authentication. + + + +`example` : +```js +init({ + // ... + authType: AuthType.SAMLRedirect, + }); +``` + +This opens the SAML Idp in a popup window. The popup is triggered +when the user clicks the trigger button. The popup window will be +closed automatically after authentication. + + + +`example` : +```js +init({ + // ... + authType: AuthType.SAMLRedirect, + authTriggerText: 'Login with SAML', + authTriggerContainer: '#embed-container', + inPopup: true, +}); +``` + +Can also use event to trigger the popup flow. Works the same +as above example. + + + +`example` : +```js +const authEE = init({ + // ... + authType: AuthType.SAMLRedirect, + inPopup: true, +}); + +someButtonOnYourPage.addEventListener('click', () => { + authEE.emit(AuthEvent.TRIGGER_SSO_POPUP); +}); +``` + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L110[types.ts, window=_blank] + +=== TrustedAuthToken +`TrustedAuthToken:= "AuthServer"` + +Trusted authentication server, Use your own authentication server +which returns a bearer token, generated using the secret_key obtained +from ThoughtSpot. + + + +`example` : +```js +init({ + // ... + authType: AuthType.TrustedAuthToken, + getAuthToken: () => { + return fetch('https://my-backend.app/ts-token') + .then((response) => response.json()) + .then((data) => data.token); + } +``` + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L148[types.ts, window=_blank] + +=== TrustedAuthTokenCookieless +`TrustedAuthTokenCookieless:= "AuthServerCookieless"` + +Trusted authentication server Cookieless, Use you own authentication +server which returns a bearer token, generated using the secret_key +obtained from ThoughtSpot. This uses a cookieless authentication +approach, recommended to by pass third-party cookie-blocking restriction +implemented by some browsers + + + +`example` : +```js +init({ + // ... + authType: AuthType.TrustedAuthTokenCookieless, + getAuthToken: () => { + return fetch('https://my-backend.app/ts-token') + .then((response) => response.json()) + .then((data) => data.token); + } +``` + + + +`version` : SDK: 1.22.0| ThouhgtSpot: 9.3.0.cl, 9.5.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L169[types.ts, window=_blank] \ No newline at end of file diff --git a/modules/ROOT/pages/typedoc/Enumeration/ContextMenuTriggerOptions.adoc b/modules/ROOT/pages/typedoc/Enumeration/ContextMenuTriggerOptions.adoc new file mode 100644 index 000000000..31faa11eb --- /dev/null +++ b/modules/ROOT/pages/typedoc/Enumeration/ContextMenuTriggerOptions.adoc @@ -0,0 +1,26 @@ +:toc: true +:toclevels: 2 +:page-title: ContextMenuTriggerOptions +:page-pageid: Enumeration/ContextMenuTriggerOptions +:page-description: Enum for options to change context trigger + += ContextMenuTriggerOptions + +Enum for options to change context trigger + + + + +== Enumeration members + +=== LEFT_CLICK +`LEFT_CLICK:= "left-click"` + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L2081[types.ts, window=_blank] + +=== RIGHT_CLICK +`RIGHT_CLICK:= "right-click"` + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L2082[types.ts, window=_blank] \ No newline at end of file diff --git a/modules/ROOT/pages/typedoc/Enumeration/DataSourceVisualMode.adoc b/modules/ROOT/pages/typedoc/Enumeration/DataSourceVisualMode.adoc new file mode 100644 index 000000000..b7732aa4f --- /dev/null +++ b/modules/ROOT/pages/typedoc/Enumeration/DataSourceVisualMode.adoc @@ -0,0 +1,42 @@ +:toc: true +:toclevels: 2 +:page-title: DataSourceVisualMode +:page-pageid: Enumeration/DataSourceVisualMode +:page-description: The different visual modes that the data sources panel within search could appear in, i.e., hidden, collapsed, or expanded. + += DataSourceVisualMode + +The different visual modes that the data sources panel within +search could appear in, i.e., hidden, collapsed, or expanded. + + + + +== Enumeration members + +=== Collapsed +`Collapsed:= "collapse"` + +Data source panel is collapsed, but the user can manually expand it. + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1762[types.ts, window=_blank] + +=== Expanded +`Expanded:= "expand"` + +Data source panel is expanded, but the user can manually collapse it. + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1766[types.ts, window=_blank] + +=== Hidden +`Hidden:= "hide"` + +Data source panel is hidden. + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1758[types.ts, window=_blank] \ No newline at end of file diff --git a/modules/ROOT/pages/typedoc/Enumeration/EmbedEvent.adoc b/modules/ROOT/pages/typedoc/Enumeration/EmbedEvent.adoc new file mode 100644 index 000000000..cc5569e41 --- /dev/null +++ b/modules/ROOT/pages/typedoc/Enumeration/EmbedEvent.adoc @@ -0,0 +1,831 @@ +:toc: true +:toclevels: 2 +:page-title: EmbedEvent +:page-pageid: Enumeration/EmbedEvent +:page-description: Event types emitted by the embedded ThoughtSpot application. + += EmbedEvent + +Event types emitted by the embedded ThoughtSpot application. +To add an event listener use the corresponding +xref:LiveboardEmbed.adoc#on[LiveboardEmbed] or xref:AppEmbed.adoc#on[AppEmbed] or xref:SearchEmbed.adoc#on[SearchEmbed] method. + + + +`example` : +```js +import { EmbedEvent } from '@thoughtspot/visual-embed-sdk'; +// Or +// const { EmbedEvent } = window.tsembed; + +// create the liveboard embed. + +liveboardEmbed.on(EmbedEvent.Drilldown, (drilldown) => { + console.log('Drilldown event', drilldown); +})); +``` + + + +`group` : Events + + + + + +== Enumeration members + +=== ALL +`ALL:= "*"` + +This can be used to register an event listener which +is triggered on all events. + + + +`version` : SDK: 1.10.0 | ThoughtSpot: 8.2.0.cl, 8.4.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L971[types.ts, window=_blank] + +=== AddRemoveColumns +`AddRemoveColumns:= "addRemoveColumns"` + +One or more data columns have been selected. + + + +`returns` : columnIds - the list of columns + + + +`version` : SDK: 1.10.0 | ThoughtSpot: 8.2.0.cl, 8.4.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L837[types.ts, window=_blank] + +=== AddToFavorites +`AddToFavorites:= "addToFavorites"` + +Emitted when a user clicks on the Favorite icon on a Liveboard + + + +`version` : SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1111[types.ts, window=_blank] + +=== Alert +`Alert:= "alert"` + +The embedded object has sent an alert + + + +`returns` : alert - An alert object + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L883[types.ts, window=_blank] + +=== AnswerChartSwitcher +`AnswerChartSwitcher:= "answerChartSwitcher"` + +Emitted when an answer is switched to a chart or table view + + + +`version` : SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1093[types.ts, window=_blank] + +=== AnswerDelete +`AnswerDelete:= "answerDelete"` + +Emitted when an answer is deleted in the app + + + +`version` : SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1013[types.ts, window=_blank] + +=== AuthExpire +`AuthExpire:= "ThoughtspotAuthExpired"` + +The ThoughtSpot auth session has expired. + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L887[types.ts, window=_blank] + +=== AuthInit +`AuthInit:= "authInit"` + +Authentication has either succeeded or failed. + + + +`returns` : isLoggedIn - A Boolean specifying whether authentication was successful. + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L793[types.ts, window=_blank] + +=== Cancel +`Cancel:= "cancel"` + +Emitted when a user clicks Cancel in edit mode on a Liveboard + + + +`version` : SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1153[types.ts, window=_blank] + +=== CopyAEdit +`CopyAEdit:= "copyAEdit"` + +Emitted when copy of existing answer on the app + + + +`version` : SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1081[types.ts, window=_blank] + +=== CopyLink +`CopyLink:= "embedDocument"` + +Emitted when a user clicks Copy link action on a visualization + + + +`version` : SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1165[types.ts, window=_blank] + +=== CopyToClipboard +`CopyToClipboard:= "context-menu-item-copy-to-clipboard"` + +Emitted when copied column value on the app + + + +`version` : SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1051[types.ts, window=_blank] + +=== CrossFilterChanged +`CrossFilterChanged:= "cross-filter-changed"` + +Emitted when a user interacts with cross filters on a visualization or liveboard + + + +`version` : SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1171[types.ts, window=_blank] + +=== CustomAction +`CustomAction:= "customAction"` + +A custom action has been triggered + + + +`returns` : actionId - The id of the custom action + + + +`returns` : data - The answer or Liveboard data + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L844[types.ts, window=_blank] + +=== Data +`Data:= "data"` + +Data pertaining to answer or Liveboard is received + + + +`returns` : data - The answer or Liveboard data + + + +`important` : + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L806[types.ts, window=_blank] + +=== DataSourceSelected +`DataSourceSelected:= "dataSourceSelected"` + +One or more data sources have been selected. + + + +`returns` : dataSourceIds - the list of data sources + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L830[types.ts, window=_blank] + +=== Delete +`Delete:= "delete"` + +Emitted when a user clicks Delete on a Liveboard + + + +`version` : SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1141[types.ts, window=_blank] + +=== DialogClose +`DialogClose:= "dialog-close"` + +Emitted when any modal is closed in the app + + + +`version` : SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L956[types.ts, window=_blank] + +=== DialogOpen +`DialogOpen:= "dialog-open"` + +Emitted when any modal is opened in the app + + + +`version` : SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L950[types.ts, window=_blank] + +=== Download +`Download:= "download"` + +Emitted when the download action is triggered on an answer + + + +`version` : SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L983[types.ts, window=_blank] + +=== DownloadAsCsv +`DownloadAsCsv:= "downloadAsCsv"` + +Emitted when the Download as CSV action is triggered on an answer + + + +`version` : SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1001[types.ts, window=_blank] + +=== DownloadAsPdf +`DownloadAsPdf:= "downloadAsPdf"` + +Emitted when the Download as PDF action is triggered on an answer + + + +`version` : SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L995[types.ts, window=_blank] + +=== DownloadAsPng +`DownloadAsPng:= "downloadAsPng"` + +Emitted when the download action is triggered on an answer + + + +`version` : SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.0-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L989[types.ts, window=_blank] + +=== DownloadAsXlsx +`DownloadAsXlsx:= "downloadAsXlsx"` + +Emitted when the Download as XLSX action is triggered on an answer + + + +`version` : SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1007[types.ts, window=_blank] + +=== DrillExclude +`DrillExclude:= "context-menu-item-exclude"` + +Emitted when a user clicks the Exclude action to exclude a specific value or data +on a chart or table + + + +`version` : SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1045[types.ts, window=_blank] + +=== DrillInclude +`DrillInclude:= "context-menu-item-include"` + +Emitted when a user clicks the Include action to include a specific value or data +on a chart or table + + + +`version` : SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1038[types.ts, window=_blank] + +=== Drilldown +`Drilldown:= "drillDown"` + +A drill down operation has been performed. + + + +`returns` : additionalFilters - Any additional filters applied + + + +`returns` : drillDownColumns - The columns on which drill down was performed + + + +`returns` : nonFilteredColumns - The columns that were not filtered + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L824[types.ts, window=_blank] + +=== Edit +`Edit:= "edit"` + +Emitted when a user clicks Edit on a Liveboard or visualization + + + +`version` : SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1123[types.ts, window=_blank] + +=== EditTML +`EditTML:= "editTSL"` + +Emitted when a user clicks the Edit TML action + + + +`version` : SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1063[types.ts, window=_blank] + +=== Error +`Error:= "Error"` + +An error has occurred. + + + +`returns` : error - An error object or message + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L877[types.ts, window=_blank] + +=== Explore +`Explore:= "explore"` + +Emitted when a user clicks Explore on a visualization + + + +`version` : SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1159[types.ts, window=_blank] + +=== ExportTML +`ExportTML:= "exportTSL"` + +Emitted when ExportTML trigger in answer on the app + + + +`version` : SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1069[types.ts, window=_blank] + +=== GetDataClick +`GetDataClick:= "getDataClick"` + +Emitted when the "Get Data" button in Search Bar embed +is clicked. + + + +`version` : SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.0-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L920[types.ts, window=_blank] + +=== Init +`Init:= "init"` + +Rendering has initialized. + + + +`returns` : timestamp - The timestamp when the event was generated. + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L787[types.ts, window=_blank] + +=== LiveboardInfo +`LiveboardInfo:= "pinboardInfo"` + +Emitted when a user clicks Show Liveboard details on a Liveboard + + + +`version` : SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1105[types.ts, window=_blank] + +=== LiveboardRendered +`LiveboardRendered:= "PinboardRendered"` + +Emitted when the Liveboard shell loads. +You can use this event as a hook to trigger +other events on the rendered Liveboard. + + + +`version` : SDK: 1.9.1 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L964[types.ts, window=_blank] + +=== Load +`Load:= "load"` + +The embed object container has loaded. + + + +`returns` : timestamp - The timestamp when the event was generated. + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L799[types.ts, window=_blank] + +=== MakeACopy +`MakeACopy:= "makeACopy"` + +Emitted when a user clicks Make a copy on a Liveboard + + + +`version` : SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1129[types.ts, window=_blank] + +=== NoCookieAccess +`NoCookieAccess:= "noCookieAccess"` + +Emitted when the embed does not have cookie access. This +happens on Safari where third-party cookies are blocked by default. + + + +`version` : SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 7.2.1 + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L937[types.ts, window=_blank] + +=== Pin +`Pin:= "pin"` + +Emitted when an answer is pinned to a Liveboard + + + +`version` : SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1019[types.ts, window=_blank] + +=== Present +`Present:= "present"` + +Emitted when a user clicks Present on a Liveboard or visualization + + + +`version` : SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1135[types.ts, window=_blank] + +=== QueryChanged +`QueryChanged:= "queryChanged"` + +Search query has been updated by the user. + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L816[types.ts, window=_blank] + +=== RouteChange +`RouteChange:= "ROUTE_CHANGE"` + +Detects the route change. + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L924[types.ts, window=_blank] + +=== Save +`Save:= "save"` + +Emitted when answer is saved in the app + + + +`version` : SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L977[types.ts, window=_blank] + +=== SaveAsView +`SaveAsView:= "saveAsView"` + +Emitted when an answer is saved as a view + + + +`version` : SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1075[types.ts, window=_blank] + +=== Schedule +`Schedule:= "subscription"` + +Emitted when a user clicks Schedule on a Liveboard + + + +`version` : SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1117[types.ts, window=_blank] + +=== SchedulesList +`SchedulesList:= "schedule-list"` + +Emitted when a user clicks Manage schedules on a Liveboard + + + +`version` : SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1147[types.ts, window=_blank] + +=== Share +`Share:= "share"` + +Emitted when a user shares an object with another user or group + + + +`version` : SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1031[types.ts, window=_blank] + +=== ShowUnderlyingData +`ShowUnderlyingData:= "showUnderlyingData"` + +Emitted when a user clicks Show underlying data on an answe + + + +`version` : SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1087[types.ts, window=_blank] + +=== SpotIQAnalyze +`SpotIQAnalyze:= "spotIQAnalyze"` + +Emitted when SpotIQ analysis is triggered + + + +`version` : SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1025[types.ts, window=_blank] + +=== UpdateTML +`UpdateTML:= "updateTSL"` + +Emitted when a user clicks the Update TML action + + + +`version` : SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1057[types.ts, window=_blank] + +=== VizPointClick +`VizPointClick:= "vizPointClick"` + +Listen to clicks on a visualization in a liveboard or Search result. + + + +`example` : +```js +embed.on(ThoughtSpotEmbed.Event.VizPointClick, ({data}) => { + console.log( + data.vizId, // viz id + data.clickedPoint.selectedAttributes[0].value, + data.clickedPoint.selectedAttributes[0].column.name, + data.clickedPoint.selectedMeasures[0].value, + data.clickedPoint.selectedMeasures[0].column.name, + ) +}); +``` + + + +`returns` : viz, clickedPoint - metadata about point that is clicked + + + +`version` : SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw + + + +`important` : + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L871[types.ts, window=_blank] + +=== VizPointDoubleClick +`VizPointDoubleClick:= "vizPointDoubleClick"` + +Listen to double clicks on a visualization + + + +`returns` : ContextMenuInputPoints - data point that is double clicked + + + +`version` : SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1 + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L851[types.ts, window=_blank] + +=== VizPointRightClick +`VizPointRightClick:= "vizPointRightClick"` + +Emitted when a user right clicks on a visualization (chart or table) + + + +`version` : SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1177[types.ts, window=_blank] \ No newline at end of file diff --git a/modules/ROOT/pages/typedoc/Enumeration/HostEvent.adoc b/modules/ROOT/pages/typedoc/Enumeration/HostEvent.adoc new file mode 100644 index 000000000..154de040d --- /dev/null +++ b/modules/ROOT/pages/typedoc/Enumeration/HostEvent.adoc @@ -0,0 +1,1062 @@ +:toc: true +:toclevels: 2 +:page-title: HostEvent +:page-pageid: Enumeration/HostEvent +:page-description: Event types that can be triggered by the host application to the embedded ThoughtSpot app + += HostEvent + +Event types that can be triggered by the host application +to the embedded ThoughtSpot app +To trigger an event use the corresponding +xref:LiveboardEmbed.adoc#trigger[LiveboardEmbed] or xref:AppEmbed.adoc#trigger[AppEmbed] or {@link +SearchEmbed.trigger} method. + + + +`example` : +```js +import { HostEvent } from '@thoughtspot/visual-embed-sdk'; +// Or +// const { HostEvent } = window.tsembed; + +// create the liveboard embed. + +liveboardEmbed.trigger(HostEvent.UpdateRuntimeFilters, [ + { columnName: 'state, operator: RuntimeFilterOp.EQ, values: ['california']} +]); +``` + + + +`group` : Events + + + + + +== Enumeration members + +=== AddColumns +`AddColumns:= "addColumns"` + +Adds the columns to the current Search. + + + +`example` : +```js +searchEmbed.trigger(HostEvent.AddColumns, { columnIds: ['123', '456'] }) +``` + + + +`version` : SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1335[types.ts, window=_blank] + +=== CopyLink +`CopyLink:= "embedDocument"` + +Triggers the Copy link action on a Liveboard or visualization + + + +`param` : object - to trigger the action for a s + pecfic visualization in Liveboard embed, pass in vizId as a key + + + +`example` : +```js +liveboardEmbed.trigger(HostEvent.CopyLink) +liveboardEmbed.trigger(HostEvent.CopyLink, {vizId: '730496d6-6903-4601-937e-2c691821af3c'}) +vizEmbed.trigger((HostEvent.CopyLink) +``` + + + +`version` : SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1530[types.ts, window=_blank] + +=== CreateMonitor +`CreateMonitor:= "createMonitor"` + +Triggers the Create alert action on a visualization + + + +`param` : an object with vizId as a key + + + +`example` : +```js +liveboardEmbed.trigger(HostEvent.CreateMonitor { + vizId: '730496d6-6903-4601-937e-2c691821af3c' +}) +``` + + + +`version` : SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1486[types.ts, window=_blank] + +=== Delete +`Delete:= "onDeleteAnswer"` + +Triggers the Delete action on visualization or search + + + +`param` : incase of Liveboard embed, takes in an object with vizId as a key +can be left empty for search and visualization embeds + + + +`example` : +```js +liveboardEmbed.trigger(HostEvent.Delete, {vizId: +'730496d6-6903-4601-937e-2c691821af3c'}) + +vizEmbed.trigger(HostEvent.Delete) + +searchEmbed.trigger(HostEvent.Delete) +``` + + + +`version` : SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1592[types.ts, window=_blank] + +=== Download +`Download:= "downloadAsPng"` + +Triggers the Download action on visualization or search when Displaymode is Chart + + + +`example` : +```js +liveboardEmbed.trigger(HostEvent.Download, {vizId: +'730496d6-6903-4601-937e-2c691821af3c'}) + +vizEmbed.trigger(HostEvent.Download) + +searchEmbed.trigger(HostEvent.Download) +``` + + + +`deprecated` : from SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl ,9.4.1-sw ,Use {@link DownloadAsPng} + + + +`version` : SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1625[types.ts, window=_blank] + +=== DownloadAsCsv +`DownloadAsCsv:= "downloadAsCSV"` + +Triggers the downloadAsCSV action on visualization or search + + + +`example` : +```js +liveboardEmbed.trigger(HostEvent.DownloadAsCsv, {vizId: +'730496d6-6903-4601-937e-2c691821af3c'}) + +vizEmbed.trigger(HostEvent.DownloadAsCsv) + +searchEmbed.trigger(HostEvent.DownloadAsCsv) +``` + + + +`version` : SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1655[types.ts, window=_blank] + +=== DownloadAsPdf +`DownloadAsPdf:= "downloadAsPdf"` + +Triggers the Download PDF action on a Liveboard + + + +`example` : +```js +liveboardEmbed.trigger(HostEvent.DownloadAsPdf) +``` + + + +`version` : SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1440[types.ts, window=_blank] + +=== DownloadAsPng +`DownloadAsPng:= "downloadAsPng"` + +Triggers the Download action on visualization or search when Displaymode is Chart + + + +`example` : +```js +liveboardEmbed.trigger(HostEvent.DownloadAsPng, +{vizId:'730496d6-6903-4601-937e-2c691821af3c'}) + +vizEmbed.trigger(HostEvent.DownloadAsPng) + +searchEmbed.trigger(HostEvent.DownloadAsPng) +``` + + + +`version` : SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1640[types.ts, window=_blank] + +=== DownloadAsXlsx +`DownloadAsXlsx:= "downloadAsXLSX"` + +Triggers the downloadAsXLSX action on visualization or search + + + +`example` : +```js +liveboardEmbed.trigger(HostEvent.DownloadAsXlsx, {vizId: +'730496d6-6903-4601-937e-2c691821af3c'}) + +vizEmbed.trigger(HostEvent.DownloadAsXlsx) + +searchEmbed.trigger(HostEvent.DownloadAsXlsx) +``` + + + +`version` : SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1670[types.ts, window=_blank] + +=== DrillDown +`DrillDown:= "triggerDrillDown"` + +Trigger a drill on certain points by certain column + + + +`param` : points - an object containing selectedPoints/clickedPoints + eg. { selectedPoints: []} + + + +`param` : columnGuid - a string guid of the column to drill by. This is optional, + if not provided it will auto drill by the configured + column. + + + +`example` : +```js +searchEmbed.on(EmbedEvent.VizPointDoubleClick, (payload) => { + console.log(payload); + const clickedPoint = payload.data.clickedPoint; + const selectedPoint = payload.data.selectedPoints; + console.log('>>> called', clickedPoint); + searchEmbed.trigger(HostEvent.DrillDown, { + points: { + clickedPoint, + selectedPoints: selectedPoint + }, + autoDrillDown: true, + }); +}) +``` + + + +`version` : SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1 + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1254[types.ts, window=_blank] + +=== Edit +`Edit:= "edit"` + +Triggers the Edit action on a Liveboard or visualization + + + +`param` : object - to trigger the action for a specfic visualization + in Liveboard embed, pass in vizId as a key + + + +`example` : +```js +liveboardEmbed.trigger(HostEvent.Edit) + +liveboardEmbed.trigger(HostEvent.Edit, {vizId: +'730496d6-6903-4601-937e-2c691821af3c'}) + +vizEmbed.trigger((HostEvent.Edit) +``` + + + +`version` : SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1516[types.ts, window=_blank] + +=== EditTML +`EditTML:= "editTSL"` + +Triggers the Edit TML action on a Liveboard + + + +`example` : +```js +liveboardEmbed.trigger(HostEvent.EditTML) +``` + + + +`version` : SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1420[types.ts, window=_blank] + +=== Explore +`Explore:= "explore"` + +Triggers the Explore action on a visualization + + + +`param` : an object with vizId as a key + + + +`example` : +```js +liveboardEmbed.trigger(HostEvent.Explore, {vizId: '730496d6-6903-4601-937e-2c691821af3c'}) +``` + + + +`version` : SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1473[types.ts, window=_blank] + +=== ExportTML +`ExportTML:= "exportTSL"` + +Triggers the Export TML action on a Liveboard + + + +`example` : +```js +liveboardEmbed.trigger(HostEvent.ExportTML) +``` + + + +`version` : SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1410[types.ts, window=_blank] + +=== GetTML +`GetTML:= "getTML"` + +Get TML for the current search. + + + +`example` : +```js +searchEmbed.trigger(HostEvent.GetTML).then((tml) => { + console.log( + tml.search_query // TML representation of the search query + ); +}) +``` + + + +`version` : SDK: 1.18.0 | ThoughtSpot: 8.10.0.cl, 9.0.1-sw + + + +`important` : + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1559[types.ts, window=_blank] + +=== LiveboardInfo +`LiveboardInfo:= "pinboardInfo"` + +Triggers the Show Liveboard details action on a Liveboard + + + +`example` : +```js + liveboardEmbed.trigger(HostEvent.LiveboardInfo) +``` + + + +`version` : SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1380[types.ts, window=_blank] + +=== MakeACopy +`MakeACopy:= "makeACopy"` + +Triggers the Make a copy action on a Liveboard, search or visualization + + + +`example` : +```js +liveboardEmbed.trigger(HostEvent.MakeACopy, {vizId: '730496d6-6903-4601-937e-2c691821af3c'}) +vizEmbed.trigger(HostEvent.MakeACopy) +searchEmbed.trigger(HostEvent.MakeACopy) +``` + + + +`version` : SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1452[types.ts, window=_blank] + +=== ManageMonitor +`ManageMonitor:= "manageMonitor"` + +Triggers the Manage alert action on a visualization + + + +`param` : an object with vizId as a key + + + +`example` : +```js +liveboardEmbed.trigger(HostEvent.ManageMonitor, { + vizId: '730496d6-6903-4601-937e-2c691821af3c' +}) +``` + + + +`version` : SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1499[types.ts, window=_blank] + +=== ManagePipelines +`ManagePipelines:= "manage-pipeline"` + +Triggers the ManagePipelines action on visualization + + + +`param` : an object with vizId as a key + + + +`example` : +```js +liveboardEmbed.trigger(HostEvent.ManagePipelines, {vizId: +'730496d6-6903-4601-937e-2c691821af3c'}) + +vizEmbed.trigger(HostEvent.ManagePipelines) +``` + + + +`version` : SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1736[types.ts, window=_blank] + +=== Navigate +`Navigate:= "Navigate"` + +Navigate to a specific page in App embed without any reload. +This is the same as calling `appEmbed.navigateToPage(path, true)` + + + +`param` : path - the path to navigate to (can be a number[1/-1] to go forward/back) + + + +`example` : +```js +appEmbed.navigateToPage(-1) +``` + + + +`version` : SDK: 1.12.0 | ThoughtSpot 8.4.0.cl, 8.4.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1308[types.ts, window=_blank] + +=== OpenFilter +`OpenFilter:= "openFilter"` + +Opens the filter panel for a particular column. +Works with Search embed. + + + +`param` : { columnId: string, + name: string, + type: INT64/CHAR/DATE, + dataType: ATTRIBUTE/MEASURE } + + + +`example` : +```js +searchEmbed.trigger(HostEvent.OpenFilter, + { columnId: '123', name: 'column name', type: 'INT64', dataType: 'ATTRIBUTE' }) +``` + + + +`version` : SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1324[types.ts, window=_blank] + +=== Pin +`Pin:= "pin"` + +Triggers the Pin action on an embedded object + + + +`param` : incase of Liveboard embed, takes in an object with vizId as a key +can be left empty for search and visualization embeds + + + +`example` : +```js +liveboardEmbed.trigger(HostEvent.Pin, {vizId: '730496d6-6903-4601-937e-2c691821af3c'}) +vizEmbed.trigger(HostEvent.Pin) +searchEmbed.trigger(HostEvent.Pin) +``` + + + +`version` : SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1370[types.ts, window=_blank] + +=== Present +`Present:= "present"` + +Triggers the Present action on a Liveboard or visualization + + + +`param` : object - to trigger the action for a specfic visualization + in Liveboard embed, pass in vizId as a key + + + +`example` : +```js +liveboardEmbed.trigger(HostEvent.Present) +liveboardEmbed.trigger(HostEvent.Present, {vizId: '730496d6-6903-4601-937e-2c691821af3c'}) +vizEmbed.trigger((HostEvent.Present) +``` + + + +`version` : SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1544[types.ts, window=_blank] + +=== Remove +`Remove:= "delete"` + +Triggers the Delete action on a Liveboard + + + +`example` : +```js +appEmbed.trigger(HostEvent.Remove) +``` + + + +`version` : SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1462[types.ts, window=_blank] + +=== RemoveColumn +`RemoveColumn:= "removeColumn"` + +Removes a column from the current Search. + + + +`example` : +```js +searchEmbed.trigger(HostEvent.RemoveColumn, { columnId: '123' }) +``` + + + +`version` : SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1346[types.ts, window=_blank] + +=== ResetSearch +`ResetSearch:= "resetSearch"` + +Triggers the Reset search in answer + + + +`example` : +```js +searchEmbed.trigger(HostEvent.ResetSearch) +``` + + + +`version` : SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.0.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1746[types.ts, window=_blank] + +=== Save +`Save:= "save"` + +Trigger the Save action on a liveboard or answer + + + +`example` : +```js +liveboardEmbed.trigger(HostEvent.Save) + +searchEmbed.trigger(HostEvent.Save) +``` + + + +`version` : SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1694[types.ts, window=_blank] + +=== Schedule +`Schedule:= "subscription"` + +Triggers the Schedule action on a Liveboard + + + +`example` : +```js + liveboardEmbed.trigger(HostEvent.Schedule) +``` + + + +`version` : SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1390[types.ts, window=_blank] + +=== SchedulesList +`SchedulesList:= "schedule-list"` + +Triggers the Manage schedule action on a Liveboard + + + +`example` : +```js + liveboardEmbed.trigger(HostEvent.ScheduleList) +``` + + + +`version` : SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1400[types.ts, window=_blank] + +=== Search +`Search:= "search"` + +Trigger a search + + + +`param` : dataSourceIds - The data source GUID to Search on + - Although an array, only a single source + is supported at this time. + + + +`param` : searchQuery - The search query + + + +`param` : execute - execute the existing / updated query + + + +`example` : +```js +searchEmbed.trigger(HostEvent.Search, { + searchQuery: "[sales] by [item type], + dataSources: ["cd252e5c-b552-49a8-821d-3eadaa049cca"] + execute: true +}) +``` + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1227[types.ts, window=_blank] + +=== SetVisibleVizs +`SetVisibleVizs:= "SetPinboardVisibleVizs"` + +Set the visible visualizations on a Liveboard. + + + +`param` : an array of ids of visualizations to show, the ids not passed + will be hidden. + + + +`example` : +```js +liveboardEmbed.trigger(HostEvent.SetVisibleVizs, [ + '730496d6-6903-4601-937e-2c691821af3c', + 'd547ec54-2a37-4516-a222-2b06719af726']) +``` + + + +`version` : SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1280[types.ts, window=_blank] + +=== Share +`Share:= "share"` + +Triggers the Share action on a liveboard or answer + + + +`example` : +```js +liveboardEmbed.trigger(HostEvent.Share) + +searchEmbed.trigger(HostEvent.Share) +``` + + + +`version` : SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1682[types.ts, window=_blank] + +=== ShowUnderlyingData +`ShowUnderlyingData:= "showUnderlyingData"` + +Triggers the ShowUnderlyingData action on visualization or search + + + +`param` : an object with vizId as a key + + + +`example` : +```js +liveboardEmbed.trigger(HostEvent.ShowUnderlyingData, {vizId: +'730496d6-6903-4601-937e-2c691821af3c'}) + +vizEmbed.trigger(HostEvent.ShowUnderlyingData) + +searchEmbed.trigger(HostEvent.ShowUnderlyingData) +``` + + + +`version` : SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1575[types.ts, window=_blank] + +=== SpotIQAnalyze +`SpotIQAnalyze:= "spotIQAnalyze"` + +Triggers the SpotIQAnalyze action on visualization or search + + + +`param` : incase of Liveboard embed, takes in an object with vizId as a key +can be left empty for search and visualization embeds + + + +`example` : +```js +liveboardEmbed.trigger(HostEvent.SpotIQAnalyze, {vizId: +'730496d6-6903-4601-937e-2c691821af3c'}) + +vizEmbed.trigger(HostEvent.SpotIQAnalyze) + +searchEmbed.trigger(HostEvent.SpotIQAnalyze) +``` + + + +`version` : SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1609[types.ts, window=_blank] + +=== SyncToOtherApps +`SyncToOtherApps:= "sync-to-other-apps"` + +Triggers the SyncToOtherApps action on visualization + + + +`param` : an object with vizId as a key + + + +`example` : +```js +liveboardEmbed.trigger(HostEvent.SyncToOtherApps, {vizId: +'730496d6-6903-4601-937e-2c691821af3c'}) + +vizEmbed.trigger(HostEvent.SyncToOtherApps) +``` + + + +`version` : SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1722[types.ts, window=_blank] + +=== SyncToSheets +`SyncToSheets:= "sync-to-sheets"` + +Triggers the SyncToSheets action on visualization + + + +`param` : an object with vizId as a key + + + +`example` : +```js +liveboardEmbed.trigger(HostEvent.SyncToSheets, {vizId: +'730496d6-6903-4601-937e-2c691821af3c'}) + +vizEmbed.trigger(HostEvent.SyncToSheets) +``` + + + +`version` : SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1708[types.ts, window=_blank] + +=== UpdateRuntimeFilters +`UpdateRuntimeFilters:= "UpdateRuntimeFilters"` + +Update the runtime filters. The runtime filters passed here are extended +on to the existing runtime filters if they exist. + + + +`param` : {@link RuntimeFilter}[] an array of {@link RuntimeFilter} Types. + + + +`example` : +```js +liveboardEmbed.trigger(HostEvent.UpdateRuntimeFilters, [ + {columnName: "state",operator: RuntimeFilterOp.EQ,values: ["michigan"]}, + {columnName: "item type",operator: RuntimeFilterOp.EQ,values: ["Jackets"]} +]) +``` + + + +`version` : SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw + + + +`important` : + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1296[types.ts, window=_blank] + +=== UpdateTML +`UpdateTML:= "updateTSL"` + +Triggers the Update TML action on a Liveboard + + + +`example` : +```js +liveboardEmbed.trigger(HostEvent.UpdateTML) +``` + + + +`version` : SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1430[types.ts, window=_blank] + +=== getExportRequestForCurrentPinboard +`getExportRequestForCurrentPinboard:= "getExportRequestForCurrentPinboard"` + +Gets the current pinboard content. + + + +`example` : +```js +liveboardEmbed.trigger(HostEvent.getExportRequestForCurrentPinboard) +``` + + + +`version` : SDK: 1.13.0 | ThoughtSpot: 8.5.0.cl, 8.8.1-sw + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L1356[types.ts, window=_blank] \ No newline at end of file diff --git a/modules/ROOT/pages/typedoc/Enumeration/Page.adoc b/modules/ROOT/pages/typedoc/Enumeration/Page.adoc new file mode 100644 index 000000000..614115240 --- /dev/null +++ b/modules/ROOT/pages/typedoc/Enumeration/Page.adoc @@ -0,0 +1,68 @@ +:toc: true +:toclevels: 2 +:page-title: Page +:page-pageid: Enumeration/Page +:page-description: Pages within the ThoughtSpot app that can be embedded. + += Page + +Pages within the ThoughtSpot app that can be embedded. + + + + +== Enumeration members + +=== Answers +`Answers:= "answers"` + +Saved answers listing page + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/embed/app.ts#L34[embed/app.ts, window=_blank] + +=== Data +`Data:= "data"` + +Data management page + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/embed/app.ts#L46[embed/app.ts, window=_blank] + +=== Home +`Home:= "home"` + +Home page + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/embed/app.ts#L26[embed/app.ts, window=_blank] + +=== Liveboards +`Liveboards:= "liveboards"` + +Liveboards listing page + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/embed/app.ts#L38[embed/app.ts, window=_blank] + +=== Search +`Search:= "search"` + +Search page + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/embed/app.ts#L30[embed/app.ts, window=_blank] + +=== SpotIQ +`SpotIQ:= "spotiq"` + +SpotIQ listing page + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/embed/app.ts#L50[embed/app.ts, window=_blank] \ No newline at end of file diff --git a/modules/ROOT/pages/typedoc/Enumeration/PrefetchFeatures.adoc b/modules/ROOT/pages/typedoc/Enumeration/PrefetchFeatures.adoc new file mode 100644 index 000000000..6fd23e3de --- /dev/null +++ b/modules/ROOT/pages/typedoc/Enumeration/PrefetchFeatures.adoc @@ -0,0 +1,35 @@ +:toc: true +:toclevels: 2 +:page-title: PrefetchFeatures +:page-pageid: Enumeration/PrefetchFeatures +:page-description: + += PrefetchFeatures + + + +== Enumeration members + +=== FullApp +`FullApp:= "FullApp"` + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L2071[types.ts, window=_blank] + +=== LiveboardEmbed +`LiveboardEmbed:= "LiveboardEmbed"` + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L2073[types.ts, window=_blank] + +=== SearchEmbed +`SearchEmbed:= "SearchEmbed"` + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L2072[types.ts, window=_blank] + +=== VizEmbed +`VizEmbed:= "VizEmbed"` + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L2074[types.ts, window=_blank] \ No newline at end of file diff --git a/modules/ROOT/pages/typedoc/Enumeration/RuntimeFilterOp.adoc b/modules/ROOT/pages/typedoc/Enumeration/RuntimeFilterOp.adoc new file mode 100644 index 000000000..ef2a1c25d --- /dev/null +++ b/modules/ROOT/pages/typedoc/Enumeration/RuntimeFilterOp.adoc @@ -0,0 +1,140 @@ +:toc: true +:toclevels: 2 +:page-title: RuntimeFilterOp +:page-pageid: Enumeration/RuntimeFilterOp +:page-description: A map of the supported runtime filter operations + += RuntimeFilterOp + +A map of the supported runtime filter operations + + + + +== Enumeration members + +=== BEGINS_WITH +`BEGINS_WITH:= "BEGINS_WITH"` + +Begins with + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L712[types.ts, window=_blank] + +=== BW +`BW:= "BW"` + +Between, non-inclusive + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L732[types.ts, window=_blank] + +=== BW_INC +`BW_INC:= "BW_INC"` + +Between, inclusive of both higher and lower value + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L728[types.ts, window=_blank] + +=== BW_INC_MAX +`BW_INC_MAX:= "BW_INC_MAX"` + +Between, inclusive of higher value + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L720[types.ts, window=_blank] + +=== BW_INC_MIN +`BW_INC_MIN:= "BW_INC_MIN"` + +Between, inclusive of lower value + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L724[types.ts, window=_blank] + +=== CONTAINS +`CONTAINS:= "CONTAINS"` + +Contains + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L708[types.ts, window=_blank] + +=== ENDS_WITH +`ENDS_WITH:= "ENDS_WITH"` + +Ends with + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L716[types.ts, window=_blank] + +=== EQ +`EQ:= "EQ"` + +Equals + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L684[types.ts, window=_blank] + +=== GE +`GE:= "GE"` + +Greater than or equal to + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L704[types.ts, window=_blank] + +=== GT +`GT:= "GT"` + +Greater than + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L700[types.ts, window=_blank] + +=== IN +`IN:= "IN"` + +Is included in this list of values + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L736[types.ts, window=_blank] + +=== LE +`LE:= "LE"` + +Less than or equal to + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L696[types.ts, window=_blank] + +=== LT +`LT:= "LT"` + +Less than + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L692[types.ts, window=_blank] + +=== NE +`NE:= "NE"` + +Does not equal + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L688[types.ts, window=_blank] \ No newline at end of file diff --git a/modules/ROOT/pages/typedoc/Function/getInitConfig.adoc b/modules/ROOT/pages/typedoc/Function/getInitConfig.adoc new file mode 100644 index 000000000..a49656b8c --- /dev/null +++ b/modules/ROOT/pages/typedoc/Function/getInitConfig.adoc @@ -0,0 +1,44 @@ +:toc: true +:toclevels: 2 +:page-title: getInitConfig +:page-pageid: Function/getInitConfig +:page-description: + +=== getInitConfig + + + + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/embed/base.ts#L44[embed/base.ts, window=_blank] + +[source, js] +---- + +getInitConfig() : EmbedConfig + +---- + +Gets the configuration embed was initialized with. + + + +`version` : SDK: 1.19.0 | ThoughtSpot: * + + + +`group` : Global methods + + + + + + + + + +==== Returns + +xref:EmbedConfig.adoc[EmbedConfig] \ No newline at end of file diff --git a/modules/ROOT/pages/typedoc/Function/getSessionInfo.adoc b/modules/ROOT/pages/typedoc/Function/getSessionInfo.adoc new file mode 100644 index 000000000..06f586915 --- /dev/null +++ b/modules/ROOT/pages/typedoc/Function/getSessionInfo.adoc @@ -0,0 +1,41 @@ +:toc: true +:toclevels: 2 +:page-title: getSessionInfo +:page-pageid: Function/getSessionInfo +:page-description: + +=== getSessionInfo + + + + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/auth.ts#L263[auth.ts, window=_blank] + +[source, js] +---- + +getSessionInfo() : Promise + +---- + +Return a promise that resolves with the session information when +authentication is successful. And info is available. + + + +`group` : Global methods + + + + + + + + + +==== Returns + +xref:Promise.adoc[Promise] \ No newline at end of file diff --git a/modules/ROOT/pages/typedoc/Function/init.adoc b/modules/ROOT/pages/typedoc/Function/init.adoc new file mode 100644 index 000000000..e1be55060 --- /dev/null +++ b/modules/ROOT/pages/typedoc/Function/init.adoc @@ -0,0 +1,64 @@ +:toc: true +:toclevels: 2 +:page-title: init +:page-pageid: Function/init +:page-description: + +=== init + + + + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/embed/base.ts#L164[embed/base.ts, window=_blank] + +[source, js] +---- + +init(embedConfig: EmbedConfig ) : AuthEventEmitter + +---- + +Initializes the Visual Embed SDK globally and perform +authentication if applicable. This function needs to be called before any ThoughtSpot +component like liveboard etc can be embedded. But need not wait for AuthEvent.SUCCESS +to actually embed. That is handled internally. + + + +`example` : +```js + const authStatus = init({ + thoughtSpotHost: 'https://my.thoughtspot.cloud', + authType: AuthType.None, + }); + authStatus.on(AuthStatus.FAILURE, (reason) => { // do something here }); +``` + + + +`version` : SDK: 1.0.0 | ThoughtSpot ts7.april.cl, 7.2.1 + + + +`group` : Authentication / Init + + + + + +==== Parameters + +* embedConfig: xref:EmbedConfig.adoc[EmbedConfig] + + +The configuration object containing ThoughtSpot host, +authentication mechanism and so on. + + + +==== Returns + +xref:AuthEventEmitter.adoc[AuthEventEmitter] \ No newline at end of file diff --git a/modules/ROOT/pages/typedoc/Function/logout.adoc b/modules/ROOT/pages/typedoc/Function/logout.adoc new file mode 100644 index 000000000..cafd43707 --- /dev/null +++ b/modules/ROOT/pages/typedoc/Function/logout.adoc @@ -0,0 +1,52 @@ +:toc: true +:toclevels: 2 +:page-title: logout +:page-pageid: Function/logout +:page-description: + +=== logout + + + + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/embed/base.ts#L212[embed/base.ts, window=_blank] + +[source, js] +---- + +logout(doNotDisableAutoLogin?: boolean = false) : Promise + +---- + +Logs out from ThoughtSpot. This also sets the autoLogin flag to false, to +prevent the SDK from automatically logging in again. +You can call the `init` method again to re login, if autoLogin is set to +true in this second call it will be honored. + + + +`version` : SDK: 1.10.1 | ThoughtSpot: 8.2.0.cl, 8.4.1-sw + + + +`group` : Global methods + + + + + +==== Parameters + +* doNotDisableAutoLogin: boolean = false + + +This flag when passed will not disable autoLogin + + + +==== Returns + +xref:Promise.adoc[Promise] \ No newline at end of file diff --git a/modules/ROOT/pages/typedoc/Function/prefetch.adoc b/modules/ROOT/pages/typedoc/Function/prefetch.adoc new file mode 100644 index 000000000..e4f34667a --- /dev/null +++ b/modules/ROOT/pages/typedoc/Function/prefetch.adoc @@ -0,0 +1,58 @@ +:toc: true +:toclevels: 2 +:page-title: prefetch +:page-pageid: Function/prefetch +:page-description: + +=== prefetch + + + + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/embed/base.ts#L89[embed/base.ts, window=_blank] + +[source, js] +---- + +prefetch(url?: string , prefetchFeatures?: PrefetchFeatures[] ) : void + +---- + +Prefetches static resources from the specified URL. Web browsers can then cache the +prefetched resources and serve them from the user's local disk to provide faster access +to your app. + + + +`version` : SDK: 1.4.0 | ThoughtSpot: ts7.sep.cl, 7.2.1 + + + +`group` : Global methods + + + + + +==== Parameters + +* url: string + + +The URL provided for prefetch + + + +* prefetchFeatures: PrefetchFeatures[] + + +Specify features which needs to be prefetched. + + + +==== Returns + +void \ No newline at end of file diff --git a/modules/ROOT/pages/typedoc/Interface/AppViewConfig.adoc b/modules/ROOT/pages/typedoc/Interface/AppViewConfig.adoc new file mode 100644 index 000000000..54ef9de74 --- /dev/null +++ b/modules/ROOT/pages/typedoc/Interface/AppViewConfig.adoc @@ -0,0 +1,285 @@ +:toc: true +:toclevels: 2 +:page-title: AppViewConfig +:page-pageid: Interface/AppViewConfig +:page-description: The view configuration for full app embedding. + += AppViewConfig + +The view configuration for full app embedding. + + + +`group` : Embed components + + + + + +== Properties + +* additionalFlags: [key: string ] : string | number | boolean + +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. + + + +`version` : SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw + + + + + +* contextMenuTrigger: xref:ContextMenuTriggerOptions.adoc[ContextMenuTriggerOptions] + +flag to set ContextMenu Trigger to either left or right click. + + + +`version` : SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl + + + + + +* customizations: xref:CustomisationsInterface.adoc[CustomisationsInterface] + +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` : '' + + + + + +* disableProfileAndHelp: boolean + +If true, help and profile buttons will hide on NavBar. By default, +they are shown. + + + + +* disabledActionReason: string + +The tooltip to display for disabled actions. + + + + +* disabledActions: Action[] + +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. + + + +`example` : +```js +const embed = new LiveboardEmbed('#embed', { + ... // other liveboard view config + disabledActions: [Action.Download, Action.Save] +}); +``` + + + + + +* enableSearchAssist: boolean + +If set to true, the Search Assist feature is enabled. + + + +`version` : SDK: 1.13.0 | ThoughtSpot: 8.5.0.cl, 8.8.1-sw + + + + + +* frameParams: xref:FrameParams.adoc[FrameParams] + +The width and height dimensions to render an embedded +object inside your app. Specify the values in pixels or percentage. + + + + +* fullHeight: boolean + +If set to true, the embedded object container dynamically resizes +according to the height of the pages which support fullHeight mode. + + + +`version` : SDK: 1.21.0 | ThoughtSpot: 9.4.0.cl, 9.4.0-sw + + + + + +* hiddenActions: Action[] + +The list of actions to hide from the embedded. +This actions will be hidden from the user. +Use this to hide an action. + + + +`example` : +```js +const embed = new LiveboardEmbed('#embed', { + ... // other liveboard view config + hiddenActions: [Action.Download, Action.Export] +}); +``` + + + +`important` : + + + + + +* hideObjects: string[] + +The array of GUIDs to be hidden + + + + +* insertAsSibling: boolean + +Insert as a sibling of the target container, instead of appending to a +child inside it. + + + + +* linkOverride: boolean + +flag to override openNew tab context menu link + + + +`version` : SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl + + + + + +* locale: string + +The locale/language to use for the embedded view. + + + +`version` : SDK: 1.9.4 | ThoughtSpot 8.1.0.cl, 8.4.1-sw + + + + + +* pageId: xref:Page.adoc[Page] + +The application page to set as the start page +in the embedded view. + + + + +* path: string + +A URL path within the app that is to be embedded. +If both path and pageId attributes are defined, the path definition +takes precedence. + + + + +* runtimeFilters: RuntimeFilter[] + +The list of runtime filters to apply to a search answer, +visualization, or Liveboard. + + + + +* showAlerts: boolean + +Show alert messages and toast messages in the embedded view. + + + +`version` : SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw + + + + + +* showPrimaryNavbar: boolean + +If true, the main navigation bar within the ThoughtSpot app +is displayed. By default, the navigation bar is hidden. + + + + +* tag: string + +This puts a filter tag on the application. All metadata lists in the +application, such as Liveboards and answers, would be filtered by this +tag. + + + + +* usePrerenderedIfAvailable: boolean + +Use a pre-rendered iframe from a pool of pre-rendered iframes +if available and matches the configuration. + + + +`version` : SDK: 1.22.0 + +See [docs]() on how to create a prerender pool. + + + + + +* visibleActions: Action[] + +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 + + + +`important` : + + + diff --git a/modules/ROOT/pages/typedoc/Interface/AuthEventEmitter.adoc b/modules/ROOT/pages/typedoc/Interface/AuthEventEmitter.adoc new file mode 100644 index 000000000..f6a2b164f --- /dev/null +++ b/modules/ROOT/pages/typedoc/Interface/AuthEventEmitter.adoc @@ -0,0 +1,221 @@ +:toc: true +:toclevels: 2 +:page-title: AuthEventEmitter +:page-pageid: Interface/AuthEventEmitter +:page-description: Event emitter returned from {@link init}. + += AuthEventEmitter + +Event emitter returned from xref:init.adoc[init]. + + + +`group` : Authentication / Init + + + + + +== Methods + +=== emit + + + + + + + + + +[source, js] +---- + +emit(event: TRIGGER_SSO_POPUP ) : void + +---- + +Trigger an event on the emitter returned from init. + + + + +==== Parameters + +* event: xref:TRIGGER_SSO_POPUP.adoc[TRIGGER_SSO_POPUP] + + + +==== Returns + +void + +=== on + + + + + + + + + +[source, js] +---- + +on(event: FAILURE , listener: (failureType: AuthFailureType ) : void ) : AuthEventEmitter + +---- + +Register a listener on Auth failure. + + + + +==== Parameters + +* event: xref:FAILURE.adoc[FAILURE] + + + + + + +* listener: (failureType: AuthFailureType ) : void + + + + + + + +==== Returns + +xref:AuthEventEmitter.adoc[AuthEventEmitter],[source, js] +---- + +on(event: SDK_SUCCESS | LOGOUT | WAITING_FOR_POPUP , listener: () : void ) : AuthEventEmitter + +---- + +Register a listener on Auth SDK success. + + + + +==== Parameters + +* event: SDK_SUCCESS | LOGOUT | WAITING_FOR_POPUP + + + + + + +* listener: () : void + + + + + + + +==== Returns + +xref:AuthEventEmitter.adoc[AuthEventEmitter],[source, js] +---- + +on(event: SUCCESS , listener: (sessionInfo: any ) : void ) : AuthEventEmitter + +---- + + + +==== Parameters + +* event: xref:SUCCESS.adoc[SUCCESS] + + + +* listener: (sessionInfo: any ) : void + + + +==== Returns + +xref:AuthEventEmitter.adoc[AuthEventEmitter] + +=== once + + + + + + + + + +[source, js] +---- + +once(event: FAILURE , listener: (failureType: AuthFailureType ) : void ) : AuthEventEmitter + +---- + + + +==== Parameters + +* event: xref:FAILURE.adoc[FAILURE] + + + +* listener: (failureType: AuthFailureType ) : void + + + +==== Returns + +xref:AuthEventEmitter.adoc[AuthEventEmitter],[source, js] +---- + +once(event: SDK_SUCCESS | LOGOUT | WAITING_FOR_POPUP , listener: () : void ) : AuthEventEmitter + +---- + + + +==== Parameters + +* event: SDK_SUCCESS | LOGOUT | WAITING_FOR_POPUP + + + +* listener: () : void + + + +==== Returns + +xref:AuthEventEmitter.adoc[AuthEventEmitter],[source, js] +---- + +once(event: SUCCESS , listener: (sessionInfo: any ) : void ) : AuthEventEmitter + +---- + + + +==== Parameters + +* event: xref:SUCCESS.adoc[SUCCESS] + + + +* listener: (sessionInfo: any ) : void + + + +==== Returns + +xref:AuthEventEmitter.adoc[AuthEventEmitter] \ No newline at end of file diff --git a/modules/ROOT/pages/typedoc/Interface/CustomStyles.adoc b/modules/ROOT/pages/typedoc/Interface/CustomStyles.adoc new file mode 100644 index 000000000..5f009fe29 --- /dev/null +++ b/modules/ROOT/pages/typedoc/Interface/CustomStyles.adoc @@ -0,0 +1,21 @@ +:toc: true +:toclevels: 2 +:page-title: CustomStyles +:page-pageid: Interface/CustomStyles +:page-description: Styles within the {@link CustomisationsInterface}. + += CustomStyles + +Styles within the xref:CustomisationsInterface.adoc[CustomisationsInterface]. + + + + +== Properties + +* customCSS: xref:customCssInterface.adoc[customCssInterface] + + + +* customCSSUrl: string + diff --git a/modules/ROOT/pages/typedoc/Interface/CustomisationsInterface.adoc b/modules/ROOT/pages/typedoc/Interface/CustomisationsInterface.adoc new file mode 100644 index 000000000..c5481ee04 --- /dev/null +++ b/modules/ROOT/pages/typedoc/Interface/CustomisationsInterface.adoc @@ -0,0 +1,50 @@ +:toc: true +:toclevels: 2 +:page-title: CustomisationsInterface +:page-pageid: Interface/CustomisationsInterface +:page-description: Configuration to define the customization on the Embedded Thoughtspot components. + += CustomisationsInterface + +Configuration to define the customization on the Embedded +Thoughtspot components. + + + +`example` : +```js + init({ + // ... + customizations: { + style: { + customCSS: { + variables: {}, + rules_UNSTABLE: {} + } + }, + content: { + strings: { + 'LIVEBOARDS': 'Dashboards' + } + }, + iconSpriteUrl: 'https://my-custom-icon-sprite.svg' + } + }) +``` + + + + + +== Properties + +* content: [key: string ] : any + + + +* iconSpriteUrl: string + + + +* style: xref:CustomStyles.adoc[CustomStyles] + diff --git a/modules/ROOT/pages/typedoc/Interface/EmbedConfig.adoc b/modules/ROOT/pages/typedoc/Interface/EmbedConfig.adoc new file mode 100644 index 000000000..0bbb20bad --- /dev/null +++ b/modules/ROOT/pages/typedoc/Interface/EmbedConfig.adoc @@ -0,0 +1,361 @@ +:toc: true +:toclevels: 2 +:page-title: EmbedConfig +:page-pageid: Interface/EmbedConfig +:page-description: The configuration object for embedding ThoughtSpot content. It includes the ThoughtSpot hostname or IP address, the type of authentication, and the authentication endpoint if a trusted authentication server is used. + += EmbedConfig + +The configuration object for embedding ThoughtSpot content. +It includes the ThoughtSpot hostname or IP address, +the type of authentication, and the authentication endpoint +if a trusted authentication server is used. + + + +`group` : Authentication / Init + + + + + +== Properties + +* authEndpoint: string + +[AuthServer] The trusted authentication endpoint to use to get the +authentication token. A GET request is made to the +authentication API endpoint, which returns the token +as a plaintext response. For trusted authentication, +the `authEndpoint` or `getAuthToken` attribute is required. + + + + +* authTriggerContainer: string | HTMLElement + +For inPopup SAMLRedirect or OIDCRedirect Auth, we need a button which the user +click to trigger the flow. This is the containing element +for that button. + + + +`example` : +```js +init({ + authType: AuthType.SAMLRedirect, + inPopup: true, + authTriggerContainer: '#auth-trigger-container' +}) +``` + + + +`version` : SDK: 1.17.0 | ThoughtSpot: * + + + + + +* authTriggerText: string + +Text to show in the button which triggers the popup auth flow. +Default: "Authorize". + + + +`version` : SDK: 1.17.0 | ThoughtSpot: * + + + + + +* authType: xref:AuthType.adoc[AuthType] + +The authentication mechanism to use. + + + + +* autoLogin: boolean + +Re-login when session expires with the previous login options + + + +`default` : false + + + + + +* callPrefetch: boolean + +Calls the prefetch method internally when set to true + + + +`default` : false + + + + + +* customCssUrl: string + +Dynamic CSS Url to be injected in the loaded application. +You would also need to set `style-src` in the CSP settings. + + + +`version` : SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1-sw + + + +`default` : '' + + + + + +* customizations: xref:CustomisationsInterface.adoc[CustomisationsInterface] + +Custom style params for embed Config. + + + +`version` : SDK: 1.17.0 | ThoughtSpot: 8.9.0.cl + + + + + +* detectCookieAccessSlow: boolean + +[AuthServer|Basic] Detect if 3rd party cookies are enabled by doing an +additional call. This is slower and should be avoided. Listen to the +NO_COOKIE_ACCESS event to handle the situation. +This is slightly slower than letting the browser handle the cookie check, as it +involves an extra network call. + + + +`version` : SDK: 1.10.4 | ThoughtSpot: 8.2.0.cl, 8.4.1-sw + + + + + +* disableLoginRedirect: boolean + +Disable redirection to the login page when the embedded session expires +This flag is typically used alongside the combination of auth modes such as {@link +AuthType.AuthServer} and auto login behavior xref:EmbedConfig.adoc#autoLogin[EmbedConfig] + + + +`version` : SDK: 1.9.3 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw + + + +`default` : false + + + + + +* inPopup: boolean + +[SSO] For SSO Authentication, if `inPopup` is set to true, it will open +the SAML auth flow in a popup, instead of redirecting browser in place. +Need to use this with authTriggerContainer. Or manually trigger +the AuthEvent.TRIGGER_SSO_POPUP event on a user interaction. + + + +`default` : false + + + +`version` : SDK: 1.18.0 + + + + + +* loginFailedMessage: string + +This message is displayed on the embed view when the login fails. + + + +`version` : SDK: 1.10.1 | ThoughtSpot: 8.2.0.cl, 8.4.1-sw + + + + + +* noRedirect: boolean + +[SSO] For SSO Authentication, if `noRedirect` is set to true, it will +open the SAML auth flow in a popup, instead of redirecting browser in +place. + + + +`default` : false + + + +`deprecated` : + + + + + +* password: string + +[Basic] The ThoughtSpot login password corresponding to the user name +Warning: This feature is primarily intended for developer testing. It is +strongly advised not to use this authentication method in production. + + + + +* queueMultiRenders: boolean + +When there are multiple embeds, queue the render of embed to start + after the previous embed's render is complete. This helps in the load + performance by decreasing the load on the browser. + + + +`version` : SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1 + + + +`default` : false + + + + + +* redirectPath: string + +[SSO] For SSO Authentication, one can supply an optional path param, +this will be the path on the host origin where the SAML flow will be +terminated. +Eg: "/dashboard", "#/foo" [Do not include the host] + + + +`version` : SDK: 1.10.2 | 8.2.0.cl, 8.4.1-sw + + + + + +* shouldEncodeUrlQueryParams: boolean + +Should we encode URL Query Params using base64 encoding which thoughtspot +will generate for embedding. This provides additional security to +thoughtspot clusters against Cross site scripting attacks. + + + +`default` : false + + + + + +* suppressNoCookieAccessAlert: boolean + +Suppress cookie access alert when third party cookies are blocked by the +user's browser. Third party cookie blocking is the default behaviour on +Safari and opt-in for Firefox/Chrome. If you set this to `true`, you are +encouraged to handle `noCookieAccess` event, to show your own treatment +in this case. + + + +`default` : false + + + + + +* suppressSearchEmbedBetaWarning: boolean + +Hide beta alert warning message for SearchEmbed. + + + +`version` : SDK: 1.12.0 | ThoughtSpot: 8.4.0.cl, 8.4.1-sw* + + + + + +* thoughtSpotHost: string + +The ThoughtSpot cluster hostname or IP address. + + + + +* useEventForSAMLPopup: boolean + +Specify that we want to use the AuthEvent.TRIGGER_SSO_POPUP event to trigger +SAML popup. This is useful when you want to trigger the popup on a custom user +action. + + + + +* username: string + +[AuthServer / Basic] The user name of the ThoughtSpot user. This +attribute is required for trusted authentication. + + + + +== Methods + +=== getAuthToken + + + + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L273[types.ts, window=_blank] + +[source, js] +---- + +getAuthToken() : Promise + +---- + +[AuthServer] A function that invokes the trusted authentication endpoint +and returns a Promise that resolves to the `auth token` string. +For trusted authentication, the `authEndpoint` or `getAuthToken` +attribute is required. +It is advisable to fetch a new token inside this method and not +reuse and older issued token, as because when auth expires this is +called again and if it is called with an older token the authentication +will not succeed. + + + + + + + + +==== Returns + +xref:Promise.adoc[Promise] \ No newline at end of file diff --git a/modules/ROOT/pages/typedoc/Interface/FrameParams.adoc b/modules/ROOT/pages/typedoc/Interface/FrameParams.adoc new file mode 100644 index 000000000..42e42a173 --- /dev/null +++ b/modules/ROOT/pages/typedoc/Interface/FrameParams.adoc @@ -0,0 +1,41 @@ +:toc: true +:toclevels: 2 +:page-title: FrameParams +:page-pageid: Interface/FrameParams +:page-description: Embedded iFrame configuration + += FrameParams + +Embedded iFrame configuration + + + +`group` : Embed components + + + + + +== Properties + +* height: string | number + +The height of the iFrame (unit is pixels if numeric). + + + + +* loading: "lazy" | "eager" | "auto" + +Set to 'lazy' to enable lazy loading of the embedded TS frame. +This will defer loading of the frame until it comes into the +viewport. This is useful for performance optimization. + + + + +* width: string | number + +The width of the iFrame (unit is pixels if numeric). + + diff --git a/modules/ROOT/pages/typedoc/Interface/LiveboardViewConfig.adoc b/modules/ROOT/pages/typedoc/Interface/LiveboardViewConfig.adoc new file mode 100644 index 000000000..3b428c5c7 --- /dev/null +++ b/modules/ROOT/pages/typedoc/Interface/LiveboardViewConfig.adoc @@ -0,0 +1,325 @@ +:toc: true +:toclevels: 2 +:page-title: LiveboardViewConfig +:page-pageid: Interface/LiveboardViewConfig +:page-description: The configuration for the embedded Liveboard or visualization page view. + += LiveboardViewConfig + +The configuration for the embedded Liveboard or visualization page view. + + + +`group` : Embed components + + + + + +== Properties + +* activeTabId: string + +Tab Id of the Liveboard that is supposed to be active + + + +`version` : SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw + + + + + +* additionalFlags: [key: string ] : string | number | boolean + +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. + + + +`version` : SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw + + + + + +* contextMenuTrigger: xref:ContextMenuTriggerOptions.adoc[ContextMenuTriggerOptions] + +flag to set ContextMenu Trigger to either left or right click. + + + +`version` : SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl + + + + + +* customizations: xref:CustomisationsInterface.adoc[CustomisationsInterface] + +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` : '' + + + + + +* defaultHeight: number + +This is the minimum height(in pixels) for a full height Liveboard. +Setting this height helps resolves issues with empty Liveboards and +other screens navigable from a Liveboard. + + + +`version` : SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1 + + + +`default` : 500 + + + + + +* disabledActionReason: string + +The tooltip to display for disabled actions. + + + + +* disabledActions: Action[] + +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. + + + +`example` : +```js +const embed = new LiveboardEmbed('#embed', { + ... // other liveboard view config + disabledActions: [Action.Download, Action.Save] +}); +``` + + + + + +* enableVizTransformations: boolean + + + + + +`deprecated` : If set to true, the context menu in visualizations will be enabled. + + + + + +* frameParams: xref:FrameParams.adoc[FrameParams] + +The width and height dimensions to render an embedded +object inside your app. Specify the values in pixels or percentage. + + + + +* fullHeight: boolean + +If set to true, the embedded object container dynamically resizes +according to the height of the Liveboard. + + + +`version` : SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 7.2.1 + + + + + +* hiddenActions: Action[] + +The list of actions to hide from the embedded. +This actions will be hidden from the user. +Use this to hide an action. + + + +`example` : +```js +const embed = new LiveboardEmbed('#embed', { + ... // other liveboard view config + hiddenActions: [Action.Download, Action.Export] +}); +``` + + + +`important` : + + + + + +* insertAsSibling: boolean + +Insert as a sibling of the target container, instead of appending to a +child inside it. + + + + +* linkOverride: boolean + +flag to override openNew tab context menu link + + + +`version` : SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl + + + + + +* liveboardId: string + +The Liveboard to display in the embedded view. +Use either of liveboardId or pinboardId to reference the Liveboard to embed. + + + +`version` : SDK: 1.3.0 | ThoughtSpot ts7.aug.cl, 7.2.1 + + + + + +* liveboardV2: boolean + +Render embedded Liveboards and visualizations in the new Liveboard experience mode + + + +`version` : SDK: 1.14.0 | ThoughtSpot: 8.6.0.cl, 8.8.1-sw + + + + + +* locale: string + +The locale/language to use for the embedded view. + + + +`version` : SDK: 1.9.4 | ThoughtSpot 8.1.0.cl, 8.4.1-sw + + + + + +* preventLiveboardFilterRemoval: boolean + +If set to true, all filter chips from a +Liveboard page will be read-only (no X buttons) + + + +`version` : SDK: 1.3.0 | ThoughtSpot ts7.aug.cl, 7.2.1 + + + + + +* runtimeFilters: RuntimeFilter[] + +The list of runtime filters to apply to a search answer, +visualization, or Liveboard. + + + + +* showAlerts: boolean + +Show alert messages and toast messages in the embedded view. + + + +`version` : SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw + + + + + +* usePrerenderedIfAvailable: boolean + +Use a pre-rendered iframe from a pool of pre-rendered iframes +if available and matches the configuration. + + + +`version` : SDK: 1.22.0 + +See [docs]() on how to create a prerender pool. + + + + + +* visibleActions: Action[] + +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 + + + +`important` : + + + + + +* visibleVizs: string[] + +Array of viz ids which should be visible when the liveboard +first renders. This can be changed by triggering the "SetVisibleVizs" +event. + + + +`version` : SDK: 1.9.1 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw + + + + + +* vizId: string + +The visualization within the Liveboard to display. + + diff --git a/modules/ROOT/pages/typedoc/Interface/RuntimeFilter.adoc b/modules/ROOT/pages/typedoc/Interface/RuntimeFilter.adoc new file mode 100644 index 000000000..e02fcbfda --- /dev/null +++ b/modules/ROOT/pages/typedoc/Interface/RuntimeFilter.adoc @@ -0,0 +1,37 @@ +:toc: true +:toclevels: 2 +:page-title: RuntimeFilter +:page-pageid: Interface/RuntimeFilter +:page-description: A filter that can be applied to ThoughtSpot answers, Liveboards, or visualizations at runtime. + += RuntimeFilter + +A filter that can be applied to ThoughtSpot answers, Liveboards, or +visualizations at runtime. + + + + +== Properties + +* columnName: string + +The name of the column to filter on (case-sensitive) + + + + +* operator: xref:RuntimeFilterOp.adoc[RuntimeFilterOp] + +The operator to apply + + + + +* values: string | number | boolean[] + +The list of operands. Some operators like EQ, LE accept +a single operand, whereas other operators like BW and IN accept multiple +operands. + + diff --git a/modules/ROOT/pages/typedoc/Interface/SearchBarViewConfig.adoc b/modules/ROOT/pages/typedoc/Interface/SearchBarViewConfig.adoc new file mode 100644 index 000000000..382c0ce53 --- /dev/null +++ b/modules/ROOT/pages/typedoc/Interface/SearchBarViewConfig.adoc @@ -0,0 +1,223 @@ +:toc: true +:toclevels: 2 +:page-title: SearchBarViewConfig +:page-pageid: Interface/SearchBarViewConfig +:page-description: + += SearchBarViewConfig + + + + + +`group` : Embed components + + + + + +== Properties + +* additionalFlags: [key: string ] : string | number | boolean + +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. + + + +`version` : SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw + + + + + +* contextMenuTrigger: xref:ContextMenuTriggerOptions.adoc[ContextMenuTriggerOptions] + +flag to set ContextMenu Trigger to either left or right click. + + + +`version` : SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl + + + + + +* customizations: xref:CustomisationsInterface.adoc[CustomisationsInterface] + +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: string + +The array of data source GUIDs to set on load. + + + +`version:` : SDK: 1.19.0 + + + + + +* dataSources: string[] + +The array of data source GUIDs to set on load. +Only a single dataSource supported currently. + + + +`deprecated` : Use dataSource instead + + + + + +* disabledActionReason: string + +The tooltip to display for disabled actions. + + + + +* disabledActions: Action[] + +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. + + + +`example` : +```js +const embed = new LiveboardEmbed('#embed', { + ... // other liveboard view config + disabledActions: [Action.Download, Action.Save] +}); +``` + + + + + +* frameParams: xref:FrameParams.adoc[FrameParams] + +The width and height dimensions to render an embedded +object inside your app. Specify the values in pixels or percentage. + + + + +* hiddenActions: Action[] + +The list of actions to hide from the embedded. +This actions will be hidden from the user. +Use this to hide an action. + + + +`example` : +```js +const embed = new LiveboardEmbed('#embed', { + ... // other liveboard view config + hiddenActions: [Action.Download, Action.Export] +}); +``` + + + +`important` : + + + + + +* insertAsSibling: boolean + +Insert as a sibling of the target container, instead of appending to a +child inside it. + + + + +* linkOverride: boolean + +flag to override openNew tab context menu link + + + +`version` : SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl + + + + + +* locale: string + +The locale/language to use for the embedded view. + + + +`version` : SDK: 1.9.4 | ThoughtSpot 8.1.0.cl, 8.4.1-sw + + + + + +* searchOptions: xref:SearchOptions.adoc[SearchOptions] + +Configuration for search options + + + + +* usePrerenderedIfAvailable: boolean + +Use a pre-rendered iframe from a pool of pre-rendered iframes +if available and matches the configuration. + + + +`version` : SDK: 1.22.0 + +See [docs]() on how to create a prerender pool. + + + + + +* visibleActions: Action[] + +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 + + + +`important` : + + + diff --git a/modules/ROOT/pages/typedoc/Interface/SearchViewConfig.adoc b/modules/ROOT/pages/typedoc/Interface/SearchViewConfig.adoc new file mode 100644 index 000000000..c56c2e213 --- /dev/null +++ b/modules/ROOT/pages/typedoc/Interface/SearchViewConfig.adoc @@ -0,0 +1,319 @@ +:toc: true +:toclevels: 2 +:page-title: SearchViewConfig +:page-pageid: Interface/SearchViewConfig +:page-description: The configuration attributes for the embedded search view. + += SearchViewConfig + +The configuration attributes for the embedded search view. + + + +`group` : Embed components + + + + + +== Properties + +* additionalFlags: [key: string ] : string | number | boolean + +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. + + + +`version` : SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw + + + + + +* answerId: string + +The GUID of a saved answer to load initially. + + + + +* collapseDataSources: boolean + +If set to true, the data sources panel is collapsed on load, +but can be expanded manually. + + + + +* contextMenuTrigger: xref:ContextMenuTriggerOptions.adoc[ContextMenuTriggerOptions] + +flag to set ContextMenu Trigger to either left or right click. + + + +`version` : SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl + + + + + +* customizations: xref:CustomisationsInterface.adoc[CustomisationsInterface] + +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: string + +The array of data source GUIDs to set on load. + + + +`version:` : SDK: 1.19.0 + + + + + +* dataSources: string[] + +The array of data source GUIDs to set on load. +Only a single dataSource supported currently. + + + +`deprecated` : Use dataSource instead + + + + + +* disabledActionReason: string + +The tooltip to display for disabled actions. + + + + +* disabledActions: Action[] + +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. + + + +`example` : +```js +const embed = new LiveboardEmbed('#embed', { + ... // other liveboard view config + disabledActions: [Action.Download, Action.Save] +}); +``` + + + + + +* enableSearchAssist: boolean + +If set to true, the Search Assist feature is enabled. + + + +`version` : SDK: 1.13.0 | ThoughtSpot: 8.5.0.cl, 8.8.1-sw + + + + + +* forceTable: boolean + +If set to true, the tabular view is set as the default +format for presenting search data. + + + + +* frameParams: xref:FrameParams.adoc[FrameParams] + +The width and height dimensions to render an embedded +object inside your app. Specify the values in pixels or percentage. + + + + +* hiddenActions: Action[] + +The list of actions to hide from the embedded. +This actions will be hidden from the user. +Use this to hide an action. + + + +`example` : +```js +const embed = new LiveboardEmbed('#embed', { + ... // other liveboard view config + hiddenActions: [Action.Download, Action.Export] +}); +``` + + + +`important` : + + + + + +* hideDataSources: boolean + +If set to true, hides the data sources panel. + + + + +* hideResults: boolean + +If set to true, hides the charts and tables in search answers. +This attribute can be used to create a custom visualization +using raw answer data. + + + + +* hideSearchBar: boolean + +If set to true, search page will render without the Search Bar +The chart/table should still be visible. + + + +`version` : SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl + + + + + +* insertAsSibling: boolean + +Insert as a sibling of the target container, instead of appending to a +child inside it. + + + + +* linkOverride: boolean + +flag to override openNew tab context menu link + + + +`version` : SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl + + + + + +* locale: string + +The locale/language to use for the embedded view. + + + +`version` : SDK: 1.9.4 | ThoughtSpot 8.1.0.cl, 8.4.1-sw + + + + + +* runtimeFilters: RuntimeFilter[] + +The list of runtime filters to apply to a search answer, +visualization, or Liveboard. + + + + +* searchOptions: xref:SearchOptions.adoc[SearchOptions] + +Configuration for search options + + + + +* searchQuery: string + +The initial search query to load the answer with. + + + +`deprecated` : Use {@link searchOptions} instead + + + + + +* showAlerts: boolean + +Show alert messages and toast messages in the embedded view. + + + +`version` : SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw + + + + + +* usePrerenderedIfAvailable: boolean + +Use a pre-rendered iframe from a pool of pre-rendered iframes +if available and matches the configuration. + + + +`version` : SDK: 1.22.0 + +See [docs]() on how to create a prerender pool. + + + + + +* visibleActions: Action[] + +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 + + + +`important` : + + + diff --git a/modules/ROOT/pages/typedoc/Interface/customCssInterface.adoc b/modules/ROOT/pages/typedoc/Interface/customCssInterface.adoc new file mode 100644 index 000000000..36f18cf71 --- /dev/null +++ b/modules/ROOT/pages/typedoc/Interface/customCssInterface.adoc @@ -0,0 +1,21 @@ +:toc: true +:toclevels: 2 +:page-title: customCssInterface +:page-pageid: Interface/customCssInterface +:page-description: inline customCSS within the {@link CustomisationsInterface}. + += customCssInterface + +inline customCSS within the xref:CustomisationsInterface.adoc[CustomisationsInterface]. + + + + +== Properties + +* rules_UNSTABLE: [selector: string ] : [declaration: string ] : string + + + +* variables: [variableName: string ] : string + diff --git a/modules/ROOT/pages/typedoc/Type alias/DOMSelector.adoc b/modules/ROOT/pages/typedoc/Type alias/DOMSelector.adoc new file mode 100644 index 000000000..cf9091719 --- /dev/null +++ b/modules/ROOT/pages/typedoc/Type alias/DOMSelector.adoc @@ -0,0 +1,18 @@ +:toc: true +:toclevels: 2 +:page-title: DOMSelector +:page-pageid: Type alias/DOMSelector +:page-description: + += DOMSelector + +[source, js] +---- +DOMSelector : string | HTMLElement +---- + + + + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L179[types.ts, window=_blank] + diff --git a/modules/ROOT/pages/typedoc/Type alias/MessageCallback.adoc b/modules/ROOT/pages/typedoc/Type alias/MessageCallback.adoc new file mode 100644 index 000000000..1e451f2e3 --- /dev/null +++ b/modules/ROOT/pages/typedoc/Type alias/MessageCallback.adoc @@ -0,0 +1,15 @@ +:toc: true +:toclevels: 2 +:page-title: MessageCallback +:page-pageid: Type alias/MessageCallback +:page-description: + += MessageCallback + +[source, js] +---- +MessageCallback : (payload: MessagePayload , responder?: (data: any ) : void ) : void +---- + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L648[types.ts, window=_blank] + diff --git a/modules/ROOT/pages/typedoc/Type alias/MessageOptions.adoc b/modules/ROOT/pages/typedoc/Type alias/MessageOptions.adoc new file mode 100644 index 000000000..a58562f54 --- /dev/null +++ b/modules/ROOT/pages/typedoc/Type alias/MessageOptions.adoc @@ -0,0 +1,24 @@ +:toc: true +:toclevels: 2 +:page-title: MessageOptions +:page-pageid: Type alias/MessageOptions +:page-description: MessageOptions: By Providing options, getting specific event start / end based on option + += MessageOptions + +[source, js] +---- +MessageOptions : {start?: boolean } +---- + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L636[types.ts, window=_blank] + +MessageOptions: By Providing options, getting specific event start / end based on +option + + + +`group` : Events + + + diff --git a/modules/ROOT/pages/typedoc/Type alias/MessagePayload.adoc b/modules/ROOT/pages/typedoc/Type alias/MessagePayload.adoc new file mode 100644 index 000000000..83bebbee2 --- /dev/null +++ b/modules/ROOT/pages/typedoc/Type alias/MessagePayload.adoc @@ -0,0 +1,23 @@ +:toc: true +:toclevels: 2 +:page-title: MessagePayload +:page-pageid: Type alias/MessagePayload +:page-description: MessagePayload: Embed event payload: message type, data and status (start/end) + += MessagePayload + +[source, js] +---- +MessagePayload : {data: any , status?: string , type: string } +---- + +Defined in : link:https://github.com/thoughtspot/visual-embed-sdk/blob/main/src/types.ts#L622[types.ts, window=_blank] + +MessagePayload: Embed event payload: message type, data and status (start/end) + + + +`group` : Events + + + diff --git a/modules/ROOT/pages/typedoc/VisualEmbedSdk.adoc b/modules/ROOT/pages/typedoc/VisualEmbedSdk.adoc new file mode 100644 index 000000000..214735b70 --- /dev/null +++ b/modules/ROOT/pages/typedoc/VisualEmbedSdk.adoc @@ -0,0 +1,89 @@ +:toc: true +:toclevels: 2 +:page-title: VisualEmbedSdk +:page-pageid: VisualEmbedSdk +:page-description: + += Visual Embed SDK + +== Enumerations + +[div boxDiv boxFullWidth] +-- +[cols="1,1,1"] +|=== +| xref:Action.adoc[Action] +| xref:AuthEvent.adoc[AuthEvent] +| xref:AuthFailureType.adoc[AuthFailureType] +| xref:AuthStatus.adoc[AuthStatus] +| xref:AuthType.adoc[AuthType] +| xref:ContextMenuTriggerOptions.adoc[ContextMenuTriggerOptions] +| xref:DataSourceVisualMode.adoc[DataSourceVisualMode] +| xref:EmbedEvent.adoc[EmbedEvent] +| xref:HostEvent.adoc[HostEvent] +| xref:Page.adoc[Page] +| xref:PrefetchFeatures.adoc[PrefetchFeatures] +| xref:RuntimeFilterOp.adoc[RuntimeFilterOp] +|=== +-- + +== Classes + +[div boxDiv boxFullWidth] +-- +[cols="1,1,1"] +|=== +| xref:AppEmbed.adoc[AppEmbed] +| xref:LiveboardEmbed.adoc[LiveboardEmbed] +| xref:SearchBarEmbed.adoc[SearchBarEmbed] +| xref:SearchEmbed.adoc[SearchEmbed] +|=== +-- + +== Interfaces + +[div boxDiv boxFullWidth] +-- +[cols="1,1,1"] +|=== +| xref:AppViewConfig.adoc[AppViewConfig] +| xref:AuthEventEmitter.adoc[AuthEventEmitter] +| xref:CustomStyles.adoc[CustomStyles] +| xref:CustomisationsInterface.adoc[CustomisationsInterface] +| xref:EmbedConfig.adoc[EmbedConfig] +| xref:FrameParams.adoc[FrameParams] +| xref:LiveboardViewConfig.adoc[LiveboardViewConfig] +| xref:RuntimeFilter.adoc[RuntimeFilter] +| xref:SearchBarViewConfig.adoc[SearchBarViewConfig] +| xref:SearchViewConfig.adoc[SearchViewConfig] +| xref:customCssInterface.adoc[customCssInterface] +|=== +-- + +== Type aliases + +[div boxDiv boxFullWidth] +-- +[cols="1,1,1"] +|=== +| xref:DOMSelector.adoc[DOMSelector] +| xref:MessageCallback.adoc[MessageCallback] +| xref:MessageOptions.adoc[MessageOptions] +| xref:MessagePayload.adoc[MessagePayload] +|=== +-- + +== Functions + +[div boxDiv boxFullWidth] +-- +[cols="1,1,1"] +|=== +| xref:getInitConfig.adoc[getInitConfig] +| xref:getSessionInfo.adoc[getSessionInfo] +| xref:init.adoc[init] +| xref:logout.adoc[logout] +| xref:prefetch.adoc[prefetch] +|=== +-- + diff --git a/package.json b/package.json index 01f6f7eb5..0ce47cb6a 100644 --- a/package.json +++ b/package.json @@ -69,6 +69,7 @@ "jest": "^26.6.3", "jest-puppeteer": "^4.4.0", "jsdom": "^17.0.0", + "loadash": "^1.0.0", "node-sass": "^4.0.0", "prettier": "2.1.2", "puppeteer": "^7.0.1", diff --git a/src/assets/styles/index.scss b/src/assets/styles/index.scss index 0035843d1..de49f530f 100644 --- a/src/assets/styles/index.scss +++ b/src/assets/styles/index.scss @@ -56,7 +56,6 @@ a { padding: 10px 25px; } - .d-inline-block { display: inline-block; } @@ -91,6 +90,14 @@ a { margin-top: $document-margin-top; } +.restApiWrapper { + height: 100%; +} + +.restApiWrapper iframe { + min-height: 100vh; +} + button { cursor: pointer; } @@ -104,7 +111,7 @@ button { } .bordered img { - border: 1px solid var(--border-color); + border: 1px solid var(--border-color); } .displayNone { @@ -118,8 +125,8 @@ button { /*Tags style start*/ .video { - width: 800px; - height: 600px; + width: 800px; + height: 600px; } .tag { @@ -151,7 +158,6 @@ button { border-color: $tip-color; } - .beta { border-radius: $beta-border-radius; display: inline-block; @@ -183,11 +189,11 @@ button { } .greyBackground { - background-color: #EAEDF2; + background-color: #eaedf2; } .greyDarkBackground { - background-color: #A5ACB9; + background-color: #a5acb9; } .orangeBackground { @@ -207,7 +213,7 @@ button { } .betaBackground { - background-color: #06BF7F; + background-color: #06bf7f; } /*Tags style end*/ @@ -222,7 +228,7 @@ button { width: 100%; padding: $padding-sm $padding-sm $padding-sm $padding-md; background-color: var(--announcement-block-color); - } +} .boxDiv { padding: 15px; @@ -237,10 +243,9 @@ button { } .container { - margin:0 0 30px 0; + margin: 0 0 30px 0; padding: 5px; width: auto; - } .homeHeader { @@ -252,12 +257,12 @@ button { } .homeHeaderText { - display: inline-block; - padding: 5px 5px 5px 20px; - width: 600px; - max-width: 33%; - margin: 0; - vertical-align: top; + display: inline-block; + padding: 5px 5px 5px 20px; + width: 600px; + max-width: 33%; + margin: 0; + vertical-align: top; } .homeBullet { @@ -273,14 +278,13 @@ button { color: $darkblue; } -.blockHome{ +.blockHome { border-top: 0.5px solid var(--border-color); border-bottom: 0.5px solid var(--border-color); margin: 20px 10px 5px 10px; - } -.blockHomeContent{ +.blockHomeContent { padding: 15px; display: inline-block; margin: 10px; @@ -316,7 +320,6 @@ button { margin: 5px auto; } - .boxBody { font-size: 13px; font-weight: $font-weight-normal; @@ -336,9 +339,9 @@ button { .boxAuto { border: 0.5px solid $disabledcolor; - height: auto; - width: 100%; - padding: 0 0 0 2px; + height: auto; + width: 100%; + padding: 0 0 0 2px; } .tableContainer { @@ -357,14 +360,13 @@ button { padding: 15px; } -summary.title { +summary.title { font-size: $font-size-summ-title; margin-top: $margin-sm; margin-left: 3px; font-weight: $font-weight-normal; line-height: $line-height-doc; color: var(--primary-color); - } .introTile { @@ -389,39 +391,36 @@ summary.title { margin: auto; padding: 10px; font-weight: $font-weight-bold; - } .cardBlockHeading { - margin-top: $margin-lg; - padding-bottom: $padding-sm; - border-bottom: 1px solid var(--border-color); - font-size: 26px; - font-weight: $font-weight-bold; - text-align: center; + margin-top: $margin-lg; + padding-bottom: $padding-sm; + border-bottom: 1px solid var(--border-color); + font-size: 26px; + font-weight: $font-weight-bold; + text-align: center; } - a.anchor { position: absolute; text-decoration: none; width: 1.75ex; margin-left: -1.5ex; visibility: hidden; - font-size: .8em; + font-size: 0.8em; font-weight: 400; padding-top: 0.05em; } - -.introCard { +.introCard { padding: 15px; display: inline-block; position: relative; height: 225px; max-height: 500px; width: 300px; - max-width:400px; + max-width: 400px; margin: 10px; box-shadow: var(--box-shadow); border-radius: 10px; @@ -430,8 +429,6 @@ a.anchor { } } - - /* Div box style end */ /*Scrollbar styling start*/ @@ -465,23 +462,23 @@ a.anchor { } .homeHeader { - width: 100%; - max-width: 100%; - } + width: 100%; + max-width: 100%; + } .documentWrapper { width: 100%; } .homeHeaderText { - width: 100%; - max-width: 100%; + width: 100%; + max-width: 100%; } .homeHeader { - width: 100%; + width: 100%; } .introTile { - height: 100%; - margin: 10px; + height: 100%; + margin: 10px; } .boxBody { font-size: 12px; @@ -495,23 +492,23 @@ a.anchor { } .homeBanner { - display: none; + display: none; } .homeHeader { - width: 100%; - max-width: 100%; + width: 100%; + max-width: 100%; } - .blockHome { - border: 0; - } + .blockHome { + border: 0; + } - .documentWrapper { - documentView { - padding-left: 5px; - } - } + .documentWrapper { + documentView { + padding-left: 5px; + } + } .containerWrapper { padding: 10px 10px 10px 12px; @@ -529,10 +526,10 @@ a.anchor { } .blockHome { - border: 0; + border: 0; } - .introCard { + .introCard { width: 100%; } @@ -549,8 +546,8 @@ a.anchor { margin: 5px; } .tableContainer { - overflow: scroll; -} + overflow: scroll; + } } @media screen and (max-width: $mobile-resolution-max) { diff --git a/src/components/BackButton/index.tsx b/src/components/BackButton/index.tsx index bc36b5fda..178685487 100644 --- a/src/components/BackButton/index.tsx +++ b/src/components/BackButton/index.tsx @@ -3,8 +3,16 @@ import { IconContext } from '@react-icons/all-files'; import { BsArrowLeft } from '@react-icons/all-files/bs/BsArrowLeft'; import './index.scss'; -const BackButton = (props: { title: string; backLink: string }) => ( -
+const BackButton = (props: { + title: string; + backLink: string; + customStyles: object; +}) => ( +