0.0.1-alpha.23 • Published 4 years ago

@thoughtspot/embed-sdk v0.0.1-alpha.23

Weekly downloads
76
License
MIT
Repository
github
Last release
4 years ago

embed-sdk

Coverage Status

ThoughtSpot Embed SDK

Usage

Via NPM:

npm i @thoughtspot/embed-sdk

The SDK is written in TypeScript and is also provided both as ESM and UMD module, allowing you to use it in a variety of environments, e.g.,

// CommonJS
var TsEmbedSDK = require('tsembed');

// RequireJS (AMD)
define(['tsembed'], function (TsEmbedSDK) {
    // ...
});

// Global
var TsEmbedSDK = window.tsembed;

// ESM
import * as TsEmbedSDK from 'tsembed.es';

Embed Flavours

The ThoughtSpot Embed SDK allows you to embed the ThoughtSpot search experience, pinboards, visualizations or the even full app version.

Embedded Search

import { SearchEmbed, AuthType, init } from '@thoughtspot/embed-sdk';

init({
    thoughtSpotHost: '<%=tshost%>',
    authType: AuthType.None,
});

const searchEmbed = new SearchEmbed(
    document.getElementById('ts-embed'),
    {
        frameParams: {
            width: '100%',
            height: '100%',
        },
    });

searchEmbed.render({});

Embedded Pinboard & Visualization

import { PinboardVizEmbed, AuthType, init } from '@thoughtspot/embed-sdk';

init({
    thoughtSpotHost: '<%=tshost%>',
    authType: AuthType.None,
});

const pinboardEmbed = new PinboardVizEmbed(
    document.getElementById('ts-embed'),
    {
        frameParams: {
            width: '100%',
            height: '100%',
        },
    });

pinboardEmbed.render({
    pinboardId: '<%=pinboardGUID%>',
    vizId: '<%=vizGUID%>'
});

Embedded Full App

import { AppEmbed, Page, AuthType, init } from '@thoughtspot/embed-sdk';

init({
    thoughtSpotHost: '<%=tshost%>',
    authType: AuthType.None,
});

const appEmbed = new AppEmbed(
    document.getElementById('ts-embed'),
    {
        frameParams: {
            width: '100%',
            height: '100%',
        },
    });

appEmbed.render({
    Page.Data
});
0.0.1-alpha.23

4 years ago

0.0.1-alpha.22

4 years ago

0.0.1-alpha.21

4 years ago

0.0.1-alpha.20

4 years ago

0.0.1-alpha.18

4 years ago

0.0.1-alpha.19

4 years ago

0.0.1-alpha.16

4 years ago

0.0.1-alpha.15

4 years ago

0.0.1-alpha.17

4 years ago

0.0.1-alpha.13

4 years ago

0.0.1-alpha.12

4 years ago

0.0.1-alpha.11

4 years ago