@thoughtspot/visual-embed-sdk 1.21.0-react.2 → 1.21.0-react.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/package.json +1 -1
- package/cjs/src/embed/base.d.ts +0 -1
- package/cjs/src/embed/base.d.ts.map +1 -1
- package/cjs/src/embed/base.js +25 -25
- package/cjs/src/embed/base.js.map +1 -1
- package/cjs/src/embed/ts-embed.js +2 -1
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/mixpanel-service.d.ts.map +1 -1
- package/cjs/src/mixpanel-service.js +3 -1
- package/cjs/src/mixpanel-service.js.map +1 -1
- package/dist/src/embed/base.d.ts +0 -1
- package/dist/src/embed/base.d.ts.map +1 -1
- package/dist/src/mixpanel-service.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +18 -12
- package/dist/tsembed-react.js +18 -12
- package/dist/tsembed.es.js +32 -26
- package/dist/tsembed.js +32 -26
- package/dist/visual-embed-sdk-react-full.d.ts +0 -1
- package/dist/visual-embed-sdk.d.ts +0 -1
- package/lib/package.json +1 -1
- package/lib/src/embed/base.d.ts +0 -1
- package/lib/src/embed/base.d.ts.map +1 -1
- package/lib/src/embed/base.js +24 -25
- package/lib/src/embed/base.js.map +1 -1
- package/lib/src/embed/ts-embed.js +2 -1
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/mixpanel-service.d.ts.map +1 -1
- package/lib/src/mixpanel-service.js +3 -1
- package/lib/src/mixpanel-service.js.map +1 -1
- package/package.json +1 -1
- package/src/embed/base.ts +26 -26
- package/src/embed/ts-embed.ts +1 -1
- package/src/mixpanel-service.ts +3 -1
package/dist/tsembed-react.js
CHANGED
|
@@ -7878,6 +7878,10 @@
|
|
|
7878
7878
|
|
|
7879
7879
|
var mixpanel_cjs = mixpanel;
|
|
7880
7880
|
|
|
7881
|
+
var mixpanel$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.assign(/*#__PURE__*/Object.create(null), mixpanel_cjs, {
|
|
7882
|
+
'default': mixpanel_cjs
|
|
7883
|
+
}));
|
|
7884
|
+
|
|
7881
7885
|
const MIXPANEL_EVENT = {
|
|
7882
7886
|
VISUAL_SDK_RENDER_START: 'visual-sdk-render-start',
|
|
7883
7887
|
VISUAL_SDK_CALLED_INIT: 'visual-sdk-called-init',
|
|
@@ -7930,7 +7934,9 @@
|
|
|
7930
7934
|
if (token) {
|
|
7931
7935
|
mixpanel_cjs.init(token);
|
|
7932
7936
|
if (!isPublicCluster) {
|
|
7933
|
-
|
|
7937
|
+
// Needed to avoid error in CJS builds on some bundlers.
|
|
7938
|
+
const mixpanelIdentify = mixpanel_cjs.identify || mixpanel_cjs.identify;
|
|
7939
|
+
mixpanelIdentify.call(mixpanel$1, sessionInfo.userGUID);
|
|
7934
7940
|
}
|
|
7935
7941
|
isMixpanelInitialized = true;
|
|
7936
7942
|
emptyQueue();
|
|
@@ -26324,13 +26330,12 @@
|
|
|
26324
26330
|
};
|
|
26325
26331
|
|
|
26326
26332
|
/* eslint-disable camelcase */
|
|
26327
|
-
|
|
26333
|
+
window.thoughtSpotConfig = window.thoughtSpotConfig || {};
|
|
26328
26334
|
const CONFIG_DEFAULTS = {
|
|
26329
26335
|
loginFailedMessage: 'Not logged in',
|
|
26330
26336
|
authTriggerText: 'Authorize',
|
|
26331
26337
|
authType: AuthType.None,
|
|
26332
26338
|
};
|
|
26333
|
-
let authPromise;
|
|
26334
26339
|
/**
|
|
26335
26340
|
* Gets the configuration embed was initialized with.
|
|
26336
26341
|
*
|
|
@@ -26338,14 +26343,14 @@
|
|
|
26338
26343
|
* @version SDK: 1.19.0 | ThoughtSpot: *
|
|
26339
26344
|
* @group Global methods
|
|
26340
26345
|
*/
|
|
26341
|
-
const getEmbedConfig = () =>
|
|
26342
|
-
const getAuthPromise = () =>
|
|
26346
|
+
const getEmbedConfig = () => window.thoughtSpotConfig;
|
|
26347
|
+
const getAuthPromise = () => window.thoughtSpotAuthPromise;
|
|
26343
26348
|
/**
|
|
26344
26349
|
* Perform authentication on the ThoughtSpot app as applicable.
|
|
26345
26350
|
*/
|
|
26346
26351
|
const handleAuth = () => {
|
|
26347
|
-
|
|
26348
|
-
|
|
26352
|
+
window.thoughtSpotAuthPromise = authenticate(window.thoughtSpotConfig);
|
|
26353
|
+
window.thoughtSpotAuthPromise.then((isLoggedIn) => {
|
|
26349
26354
|
if (!isLoggedIn) {
|
|
26350
26355
|
notifyAuthFailure(AuthFailureType.SDK);
|
|
26351
26356
|
}
|
|
@@ -26355,7 +26360,7 @@
|
|
|
26355
26360
|
}, () => {
|
|
26356
26361
|
notifyAuthFailure(AuthFailureType.SDK);
|
|
26357
26362
|
});
|
|
26358
|
-
return
|
|
26363
|
+
return window.thoughtSpotAuthPromise;
|
|
26359
26364
|
};
|
|
26360
26365
|
const hostUrlToFeatureUrl = {
|
|
26361
26366
|
[PrefetchFeatures.SearchEmbed]: (url) => `${url}v2/#/embed/answer`,
|
|
@@ -26367,7 +26372,7 @@
|
|
|
26367
26372
|
*
|
|
26368
26373
|
*/
|
|
26369
26374
|
function disableAutoLogin() {
|
|
26370
|
-
|
|
26375
|
+
window.thoughtSpotConfig.autoLogin = false;
|
|
26371
26376
|
}
|
|
26372
26377
|
let renderQueue = Promise.resolve();
|
|
26373
26378
|
/**
|
|
@@ -26377,7 +26382,7 @@
|
|
|
26377
26382
|
* @param fn The function being registered
|
|
26378
26383
|
*/
|
|
26379
26384
|
const renderInQueue = (fn) => {
|
|
26380
|
-
const { queueMultiRenders = false } =
|
|
26385
|
+
const { queueMultiRenders = false } = window.thoughtSpotConfig;
|
|
26381
26386
|
if (queueMultiRenders) {
|
|
26382
26387
|
renderQueue = renderQueue.then(() => new Promise((res) => fn(res)));
|
|
26383
26388
|
return renderQueue;
|
|
@@ -26600,7 +26605,7 @@
|
|
|
26600
26605
|
});
|
|
26601
26606
|
}
|
|
26602
26607
|
|
|
26603
|
-
var name="@thoughtspot/visual-embed-sdk";var version="1.21.0-react.
|
|
26608
|
+
var name="@thoughtspot/visual-embed-sdk";var version="1.21.0-react.4";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports$1={".":{"import":"./lib/src/index.js",require:"./dist/tsembed.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p . --incremental false; tsc -p . --incremental false --module commonjs --outDir cjs",start:"gatsby develop","build:gatsby":"npm run clean:gatsby && gatsby build --prefix-paths","build:gatsby:noprefix":"npm run clean:gatsby && gatsby build","serve:gatsby":"gatsby serve","clean:gatsby":"gatsby clean","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts":"dts-bundle --name ../../dist/visual-embed-sdk --main lib/src/index.d.ts --outputAsModuleFolder=true","bundle-dts-react":"dts-bundle --name ../../../dist/visual-embed-sdk-react --main lib/src/react/index.d.ts --outputAsModuleFolder=true","bundle-dts-react-full":"dts-bundle --name ../../../dist/visual-embed-sdk-react-full --main lib/src/react/all-types-export.d.ts --outputAsModuleFolder=true",build:"rollup -c",watch:"rollup -cw","docs-cmd":"node scripts/gatsby-commands.js",docgen:"typedoc --tsconfig tsconfig.json --theme typedoc-theme","test-sdk":"jest -c jest.config.sdk.js --runInBand","test-docs":"jest -c jest.config.docs.js",test:"npm run test-sdk && npm run test-docs",posttest:"cat ./coverage/sdk/lcov.info | coveralls",prepublishOnly:"npm run test; npm run tsc; npm run bundle-dts; npm run bundle-dts-react-full; npm run build","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={algoliasearch:"^4.10.5",classnames:"^2.3.1",dompurify:"^2.3.4","eslint-plugin-comment-length":"^0.9.2","eslint-plugin-jsdoc":"^40.1.0",eventemitter3:"^4.0.7","gatsby-plugin-vercel":"^1.0.3","html-react-parser":"^1.4.12",lodash:"^4.17.21","mixpanel-browser":"^2.45.0","ts-deepmerge":"^6.0.2","use-deep-compare-effect":"^1.8.1"};var devDependencies={"@mdx-js/mdx":"^1.6.22","@mdx-js/react":"^1.6.22","@react-icons/all-files":"^4.1.0","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^5.0.2","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^22.2.3","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^4.6.0","@typescript-eslint/parser":"^4.6.0",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1",coveralls:"^3.1.0","dts-bundle":"^0.7.3",eslint:"^7.12.1","eslint-config-airbnb-base":"^14.2.0","eslint-config-prettier":"^6.15.0","eslint-import-resolver-typescript":"^2.3.0","eslint-plugin-import":"^2.22.1","eslint-plugin-prettier":"^3.1.4","eslint-plugin-react-hooks":"^4.2.0","fs-extra":"^10.0.0",gatsby:"3.13.1","gatsby-plugin-algolia":"^0.22.2","gatsby-plugin-catch-links":"^3.1.0","gatsby-plugin-env-variables":"^2.1.0","gatsby-plugin-intl":"^0.3.3","gatsby-plugin-manifest":"^3.2.0","gatsby-plugin-output":"^0.1.3","gatsby-plugin-sass":"6.7.0","gatsby-plugin-sitemap":"^4.10.0","gatsby-source-filesystem":"3.1.0","gatsby-transformer-asciidoc":"2.1.0","gatsby-transformer-rehype":"2.0.0","gh-pages":"^3.1.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^1.1.1",jest:"^26.6.3","jest-puppeteer":"^4.4.0",jsdom:"^17.0.0","node-sass":"^8.0.0",prettier:"2.1.2",puppeteer:"^7.0.1",react:"^16.14.0","react-dom":"^16.14.0","react-resizable":"^1.11.0","react-resize-detector":"^6.6.0","react-test-renderer":"^17.0.2","react-use-flexsearch":"^0.1.1",rollup:"2.30.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^26.5.5","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","url-search-params-polyfill":"^8.1.0",util:"^0.12.4"};var author="ThoughtSpot";var email="support@thoughtspot.com";var license="ThoughtSpot Development Tools End User License Agreement";var directories={lib:"lib"};var repository={type:"git",url:"git+https://github.com/thoughtspot/visual-embed-sdk.git"};var publishConfig={registry:"https://registry.npmjs.org"};var keywords=["thoughtspot","everywhere","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version,description:description,module:module,main:main,types:types,files:files,exports:exports$1,typesVersions:typesVersions,scripts:scripts,peerDependencies:peerDependencies,dependencies:dependencies,devDependencies:devDependencies,author:author,email:email,license:license,directories:directories,repository:repository,publishConfig:publishConfig,keywords:keywords,bugs:bugs,homepage:homepage,globals:globals};
|
|
26604
26609
|
|
|
26605
26610
|
/**
|
|
26606
26611
|
* Copyright (c) 2022
|
|
@@ -27243,8 +27248,9 @@
|
|
|
27243
27248
|
* @version SDK: 1.19.1 | ThoughtSpot: *
|
|
27244
27249
|
*/
|
|
27245
27250
|
destroy() {
|
|
27251
|
+
var _a;
|
|
27246
27252
|
try {
|
|
27247
|
-
this.insertedDomEl.parentNode.removeChild(this.insertedDomEl);
|
|
27253
|
+
(_a = this.insertedDomEl) === null || _a === void 0 ? void 0 : _a.parentNode.removeChild(this.insertedDomEl);
|
|
27248
27254
|
}
|
|
27249
27255
|
catch (e) {
|
|
27250
27256
|
console.log('Error destroying TS Embed', e);
|
package/dist/tsembed.es.js
CHANGED
|
@@ -7781,6 +7781,10 @@ var mixpanel = init_as_module();
|
|
|
7781
7781
|
|
|
7782
7782
|
var mixpanel_cjs = mixpanel;
|
|
7783
7783
|
|
|
7784
|
+
var mixpanel$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.assign(/*#__PURE__*/Object.create(null), mixpanel_cjs, {
|
|
7785
|
+
'default': mixpanel_cjs
|
|
7786
|
+
}));
|
|
7787
|
+
|
|
7784
7788
|
const MIXPANEL_EVENT = {
|
|
7785
7789
|
VISUAL_SDK_RENDER_START: 'visual-sdk-render-start',
|
|
7786
7790
|
VISUAL_SDK_CALLED_INIT: 'visual-sdk-called-init',
|
|
@@ -7833,7 +7837,9 @@ function initMixpanel(sessionInfo) {
|
|
|
7833
7837
|
if (token) {
|
|
7834
7838
|
mixpanel_cjs.init(token);
|
|
7835
7839
|
if (!isPublicCluster) {
|
|
7836
|
-
|
|
7840
|
+
// Needed to avoid error in CJS builds on some bundlers.
|
|
7841
|
+
const mixpanelIdentify = mixpanel_cjs.identify || mixpanel_cjs.identify;
|
|
7842
|
+
mixpanelIdentify.call(mixpanel$1, sessionInfo.userGUID);
|
|
7837
7843
|
}
|
|
7838
7844
|
isMixpanelInitialized = true;
|
|
7839
7845
|
emptyQueue();
|
|
@@ -27025,13 +27031,12 @@ const authenticate = async (embedConfig) => {
|
|
|
27025
27031
|
};
|
|
27026
27032
|
|
|
27027
27033
|
/* eslint-disable camelcase */
|
|
27028
|
-
|
|
27034
|
+
window.thoughtSpotConfig = window.thoughtSpotConfig || {};
|
|
27029
27035
|
const CONFIG_DEFAULTS = {
|
|
27030
27036
|
loginFailedMessage: 'Not logged in',
|
|
27031
27037
|
authTriggerText: 'Authorize',
|
|
27032
27038
|
authType: AuthType.None,
|
|
27033
27039
|
};
|
|
27034
|
-
let authPromise;
|
|
27035
27040
|
/**
|
|
27036
27041
|
* Gets the configuration embed was initialized with.
|
|
27037
27042
|
*
|
|
@@ -27039,14 +27044,14 @@ let authPromise;
|
|
|
27039
27044
|
* @version SDK: 1.19.0 | ThoughtSpot: *
|
|
27040
27045
|
* @group Global methods
|
|
27041
27046
|
*/
|
|
27042
|
-
const getEmbedConfig = () =>
|
|
27043
|
-
const getAuthPromise = () =>
|
|
27047
|
+
const getEmbedConfig = () => window.thoughtSpotConfig;
|
|
27048
|
+
const getAuthPromise = () => window.thoughtSpotAuthPromise;
|
|
27044
27049
|
/**
|
|
27045
27050
|
* Perform authentication on the ThoughtSpot app as applicable.
|
|
27046
27051
|
*/
|
|
27047
27052
|
const handleAuth = () => {
|
|
27048
|
-
|
|
27049
|
-
|
|
27053
|
+
window.thoughtSpotAuthPromise = authenticate(window.thoughtSpotConfig);
|
|
27054
|
+
window.thoughtSpotAuthPromise.then((isLoggedIn) => {
|
|
27050
27055
|
if (!isLoggedIn) {
|
|
27051
27056
|
notifyAuthFailure(AuthFailureType.SDK);
|
|
27052
27057
|
}
|
|
@@ -27056,7 +27061,7 @@ const handleAuth = () => {
|
|
|
27056
27061
|
}, () => {
|
|
27057
27062
|
notifyAuthFailure(AuthFailureType.SDK);
|
|
27058
27063
|
});
|
|
27059
|
-
return
|
|
27064
|
+
return window.thoughtSpotAuthPromise;
|
|
27060
27065
|
};
|
|
27061
27066
|
const hostUrlToFeatureUrl = {
|
|
27062
27067
|
[PrefetchFeatures.SearchEmbed]: (url) => `${url}v2/#/embed/answer`,
|
|
@@ -27081,7 +27086,7 @@ const prefetch = (url, prefetchFeatures) => {
|
|
|
27081
27086
|
}
|
|
27082
27087
|
else {
|
|
27083
27088
|
const features = prefetchFeatures || [PrefetchFeatures.FullApp];
|
|
27084
|
-
let hostUrl = url ||
|
|
27089
|
+
let hostUrl = url || window.thoughtSpotConfig.thoughtSpotHost;
|
|
27085
27090
|
hostUrl = hostUrl[hostUrl.length - 1] === '/' ? hostUrl : `${hostUrl}/`;
|
|
27086
27091
|
uniq_1(features.map((feature) => hostUrlToFeatureUrl[feature](hostUrl))).forEach((prefetchUrl, index) => {
|
|
27087
27092
|
const iFrame = document.createElement('iframe');
|
|
@@ -27147,26 +27152,26 @@ function backwardCompat(embedConfig) {
|
|
|
27147
27152
|
const init = (embedConfig) => {
|
|
27148
27153
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
27149
27154
|
sanity(embedConfig);
|
|
27150
|
-
|
|
27155
|
+
window.thoughtSpotConfig = {
|
|
27151
27156
|
...CONFIG_DEFAULTS,
|
|
27152
27157
|
...embedConfig,
|
|
27153
27158
|
thoughtSpotHost: getThoughtSpotHost(embedConfig),
|
|
27154
27159
|
};
|
|
27155
|
-
|
|
27160
|
+
window.thoughtSpotConfig = backwardCompat(window.thoughtSpotConfig);
|
|
27156
27161
|
const authEE = new eventemitter3();
|
|
27157
27162
|
setAuthEE(authEE);
|
|
27158
27163
|
handleAuth();
|
|
27159
27164
|
uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_CALLED_INIT, {
|
|
27160
|
-
authType:
|
|
27161
|
-
host:
|
|
27165
|
+
authType: window.thoughtSpotConfig.authType,
|
|
27166
|
+
host: window.thoughtSpotConfig.thoughtSpotHost,
|
|
27162
27167
|
usedCustomizationSheet: ((_b = (_a = embedConfig.customizations) === null || _a === void 0 ? void 0 : _a.style) === null || _b === void 0 ? void 0 : _b.customCSSUrl) != null,
|
|
27163
27168
|
usedCustomizationVariables: ((_e = (_d = (_c = embedConfig.customizations) === null || _c === void 0 ? void 0 : _c.style) === null || _d === void 0 ? void 0 : _d.customCSS) === null || _e === void 0 ? void 0 : _e.variables) != null,
|
|
27164
27169
|
usedCustomizationRules: ((_h = (_g = (_f = embedConfig.customizations) === null || _f === void 0 ? void 0 : _f.style) === null || _g === void 0 ? void 0 : _g.customCSS) === null || _h === void 0 ? void 0 : _h.rules_UNSTABLE) != null,
|
|
27165
27170
|
usedCustomizationStrings: !!((_k = (_j = embedConfig.customizations) === null || _j === void 0 ? void 0 : _j.content) === null || _k === void 0 ? void 0 : _k.strings),
|
|
27166
27171
|
usedCustomizationIconSprite: !!((_l = embedConfig.customizations) === null || _l === void 0 ? void 0 : _l.iconSpriteUrl),
|
|
27167
27172
|
});
|
|
27168
|
-
if (
|
|
27169
|
-
prefetch(
|
|
27173
|
+
if (window.thoughtSpotConfig.callPrefetch) {
|
|
27174
|
+
prefetch(window.thoughtSpotConfig.thoughtSpotHost);
|
|
27170
27175
|
}
|
|
27171
27176
|
return authEE;
|
|
27172
27177
|
};
|
|
@@ -27174,7 +27179,7 @@ const init = (embedConfig) => {
|
|
|
27174
27179
|
*
|
|
27175
27180
|
*/
|
|
27176
27181
|
function disableAutoLogin() {
|
|
27177
|
-
|
|
27182
|
+
window.thoughtSpotConfig.autoLogin = false;
|
|
27178
27183
|
}
|
|
27179
27184
|
/**
|
|
27180
27185
|
* Logs out from ThoughtSpot. This also sets the autoLogin flag to false, to
|
|
@@ -27192,7 +27197,7 @@ const logout$1 = (doNotDisableAutoLogin = false) => {
|
|
|
27192
27197
|
if (!doNotDisableAutoLogin) {
|
|
27193
27198
|
disableAutoLogin();
|
|
27194
27199
|
}
|
|
27195
|
-
return logout(
|
|
27200
|
+
return logout(window.thoughtSpotConfig).then((isLoggedIn) => {
|
|
27196
27201
|
notifyLogout();
|
|
27197
27202
|
return isLoggedIn;
|
|
27198
27203
|
});
|
|
@@ -27205,7 +27210,7 @@ let renderQueue = Promise.resolve();
|
|
|
27205
27210
|
* @param fn The function being registered
|
|
27206
27211
|
*/
|
|
27207
27212
|
const renderInQueue = (fn) => {
|
|
27208
|
-
const { queueMultiRenders = false } =
|
|
27213
|
+
const { queueMultiRenders = false } = window.thoughtSpotConfig;
|
|
27209
27214
|
if (queueMultiRenders) {
|
|
27210
27215
|
renderQueue = renderQueue.then(() => new Promise((res) => fn(res)));
|
|
27211
27216
|
return renderQueue;
|
|
@@ -27214,16 +27219,16 @@ const renderInQueue = (fn) => {
|
|
|
27214
27219
|
return fn(() => { }); // eslint-disable-line @typescript-eslint/no-empty-function
|
|
27215
27220
|
};
|
|
27216
27221
|
const executeTML = async (data) => {
|
|
27217
|
-
const { thoughtSpotHost, authType } =
|
|
27222
|
+
const { thoughtSpotHost, authType } = window.thoughtSpotConfig;
|
|
27218
27223
|
try {
|
|
27219
|
-
sanity(
|
|
27224
|
+
sanity(window.thoughtSpotConfig);
|
|
27220
27225
|
}
|
|
27221
27226
|
catch (err) {
|
|
27222
27227
|
return Promise.reject(err);
|
|
27223
27228
|
}
|
|
27224
27229
|
let authToken = '';
|
|
27225
27230
|
if (authType === AuthType.TrustedAuthTokenCookieless) {
|
|
27226
|
-
authToken = await getAuthenticaionToken(
|
|
27231
|
+
authToken = await getAuthenticaionToken(window.thoughtSpotConfig);
|
|
27227
27232
|
}
|
|
27228
27233
|
const headers = {
|
|
27229
27234
|
'Content-Type': 'application/json',
|
|
@@ -27254,9 +27259,9 @@ const executeTML = async (data) => {
|
|
|
27254
27259
|
});
|
|
27255
27260
|
};
|
|
27256
27261
|
const exportTML = async (data) => {
|
|
27257
|
-
const { thoughtSpotHost, authType } =
|
|
27262
|
+
const { thoughtSpotHost, authType } = window.thoughtSpotConfig;
|
|
27258
27263
|
try {
|
|
27259
|
-
sanity(
|
|
27264
|
+
sanity(window.thoughtSpotConfig);
|
|
27260
27265
|
}
|
|
27261
27266
|
catch (err) {
|
|
27262
27267
|
return Promise.reject(err);
|
|
@@ -27269,7 +27274,7 @@ const exportTML = async (data) => {
|
|
|
27269
27274
|
};
|
|
27270
27275
|
let authToken = '';
|
|
27271
27276
|
if (authType === AuthType.TrustedAuthTokenCookieless) {
|
|
27272
|
-
authToken = await getAuthenticaionToken(
|
|
27277
|
+
authToken = await getAuthenticaionToken(window.thoughtSpotConfig);
|
|
27273
27278
|
}
|
|
27274
27279
|
const headers = {
|
|
27275
27280
|
'Content-Type': 'application/json',
|
|
@@ -27509,7 +27514,7 @@ function processTrigger(iFrame, messageType, thoughtSpotHost, data) {
|
|
|
27509
27514
|
});
|
|
27510
27515
|
}
|
|
27511
27516
|
|
|
27512
|
-
var name="@thoughtspot/visual-embed-sdk";var version="1.21.0-react.
|
|
27517
|
+
var name="@thoughtspot/visual-embed-sdk";var version="1.21.0-react.4";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports={".":{"import":"./lib/src/index.js",require:"./dist/tsembed.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p . --incremental false; tsc -p . --incremental false --module commonjs --outDir cjs",start:"gatsby develop","build:gatsby":"npm run clean:gatsby && gatsby build --prefix-paths","build:gatsby:noprefix":"npm run clean:gatsby && gatsby build","serve:gatsby":"gatsby serve","clean:gatsby":"gatsby clean","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts":"dts-bundle --name ../../dist/visual-embed-sdk --main lib/src/index.d.ts --outputAsModuleFolder=true","bundle-dts-react":"dts-bundle --name ../../../dist/visual-embed-sdk-react --main lib/src/react/index.d.ts --outputAsModuleFolder=true","bundle-dts-react-full":"dts-bundle --name ../../../dist/visual-embed-sdk-react-full --main lib/src/react/all-types-export.d.ts --outputAsModuleFolder=true",build:"rollup -c",watch:"rollup -cw","docs-cmd":"node scripts/gatsby-commands.js",docgen:"typedoc --tsconfig tsconfig.json --theme typedoc-theme","test-sdk":"jest -c jest.config.sdk.js --runInBand","test-docs":"jest -c jest.config.docs.js",test:"npm run test-sdk && npm run test-docs",posttest:"cat ./coverage/sdk/lcov.info | coveralls",prepublishOnly:"npm run test; npm run tsc; npm run bundle-dts; npm run bundle-dts-react-full; npm run build","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={algoliasearch:"^4.10.5",classnames:"^2.3.1",dompurify:"^2.3.4","eslint-plugin-comment-length":"^0.9.2","eslint-plugin-jsdoc":"^40.1.0",eventemitter3:"^4.0.7","gatsby-plugin-vercel":"^1.0.3","html-react-parser":"^1.4.12",lodash:"^4.17.21","mixpanel-browser":"^2.45.0","ts-deepmerge":"^6.0.2","use-deep-compare-effect":"^1.8.1"};var devDependencies={"@mdx-js/mdx":"^1.6.22","@mdx-js/react":"^1.6.22","@react-icons/all-files":"^4.1.0","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^5.0.2","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^22.2.3","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^4.6.0","@typescript-eslint/parser":"^4.6.0",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1",coveralls:"^3.1.0","dts-bundle":"^0.7.3",eslint:"^7.12.1","eslint-config-airbnb-base":"^14.2.0","eslint-config-prettier":"^6.15.0","eslint-import-resolver-typescript":"^2.3.0","eslint-plugin-import":"^2.22.1","eslint-plugin-prettier":"^3.1.4","eslint-plugin-react-hooks":"^4.2.0","fs-extra":"^10.0.0",gatsby:"3.13.1","gatsby-plugin-algolia":"^0.22.2","gatsby-plugin-catch-links":"^3.1.0","gatsby-plugin-env-variables":"^2.1.0","gatsby-plugin-intl":"^0.3.3","gatsby-plugin-manifest":"^3.2.0","gatsby-plugin-output":"^0.1.3","gatsby-plugin-sass":"6.7.0","gatsby-plugin-sitemap":"^4.10.0","gatsby-source-filesystem":"3.1.0","gatsby-transformer-asciidoc":"2.1.0","gatsby-transformer-rehype":"2.0.0","gh-pages":"^3.1.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^1.1.1",jest:"^26.6.3","jest-puppeteer":"^4.4.0",jsdom:"^17.0.0","node-sass":"^8.0.0",prettier:"2.1.2",puppeteer:"^7.0.1",react:"^16.14.0","react-dom":"^16.14.0","react-resizable":"^1.11.0","react-resize-detector":"^6.6.0","react-test-renderer":"^17.0.2","react-use-flexsearch":"^0.1.1",rollup:"2.30.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^26.5.5","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","url-search-params-polyfill":"^8.1.0",util:"^0.12.4"};var author="ThoughtSpot";var email="support@thoughtspot.com";var license="ThoughtSpot Development Tools End User License Agreement";var directories={lib:"lib"};var repository={type:"git",url:"git+https://github.com/thoughtspot/visual-embed-sdk.git"};var publishConfig={registry:"https://registry.npmjs.org"};var keywords=["thoughtspot","everywhere","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version,description:description,module:module,main:main,types:types,files:files,exports:exports,typesVersions:typesVersions,scripts:scripts,peerDependencies:peerDependencies,dependencies:dependencies,devDependencies:devDependencies,author:author,email:email,license:license,directories:directories,repository:repository,publishConfig:publishConfig,keywords:keywords,bugs:bugs,homepage:homepage,globals:globals};
|
|
27513
27518
|
|
|
27514
27519
|
/**
|
|
27515
27520
|
* Copyright (c) 2022
|
|
@@ -28152,8 +28157,9 @@ class TsEmbed {
|
|
|
28152
28157
|
* @version SDK: 1.19.1 | ThoughtSpot: *
|
|
28153
28158
|
*/
|
|
28154
28159
|
destroy() {
|
|
28160
|
+
var _a;
|
|
28155
28161
|
try {
|
|
28156
|
-
this.insertedDomEl.parentNode.removeChild(this.insertedDomEl);
|
|
28162
|
+
(_a = this.insertedDomEl) === null || _a === void 0 ? void 0 : _a.parentNode.removeChild(this.insertedDomEl);
|
|
28157
28163
|
}
|
|
28158
28164
|
catch (e) {
|
|
28159
28165
|
console.log('Error destroying TS Embed', e);
|
package/dist/tsembed.js
CHANGED
|
@@ -7698,6 +7698,10 @@
|
|
|
7698
7698
|
|
|
7699
7699
|
var mixpanel_cjs = mixpanel;
|
|
7700
7700
|
|
|
7701
|
+
var mixpanel$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.assign(/*#__PURE__*/Object.create(null), mixpanel_cjs, {
|
|
7702
|
+
'default': mixpanel_cjs
|
|
7703
|
+
}));
|
|
7704
|
+
|
|
7701
7705
|
const MIXPANEL_EVENT = {
|
|
7702
7706
|
VISUAL_SDK_RENDER_START: 'visual-sdk-render-start',
|
|
7703
7707
|
VISUAL_SDK_CALLED_INIT: 'visual-sdk-called-init',
|
|
@@ -7750,7 +7754,9 @@
|
|
|
7750
7754
|
if (token) {
|
|
7751
7755
|
mixpanel_cjs.init(token);
|
|
7752
7756
|
if (!isPublicCluster) {
|
|
7753
|
-
|
|
7757
|
+
// Needed to avoid error in CJS builds on some bundlers.
|
|
7758
|
+
const mixpanelIdentify = mixpanel_cjs.identify || mixpanel_cjs.identify;
|
|
7759
|
+
mixpanelIdentify.call(mixpanel$1, sessionInfo.userGUID);
|
|
7754
7760
|
}
|
|
7755
7761
|
isMixpanelInitialized = true;
|
|
7756
7762
|
emptyQueue();
|
|
@@ -26923,13 +26929,12 @@
|
|
|
26923
26929
|
};
|
|
26924
26930
|
|
|
26925
26931
|
/* eslint-disable camelcase */
|
|
26926
|
-
|
|
26932
|
+
window.thoughtSpotConfig = window.thoughtSpotConfig || {};
|
|
26927
26933
|
const CONFIG_DEFAULTS = {
|
|
26928
26934
|
loginFailedMessage: 'Not logged in',
|
|
26929
26935
|
authTriggerText: 'Authorize',
|
|
26930
26936
|
authType: exports.AuthType.None,
|
|
26931
26937
|
};
|
|
26932
|
-
let authPromise;
|
|
26933
26938
|
/**
|
|
26934
26939
|
* Gets the configuration embed was initialized with.
|
|
26935
26940
|
*
|
|
@@ -26937,14 +26942,14 @@
|
|
|
26937
26942
|
* @version SDK: 1.19.0 | ThoughtSpot: *
|
|
26938
26943
|
* @group Global methods
|
|
26939
26944
|
*/
|
|
26940
|
-
const getEmbedConfig = () =>
|
|
26941
|
-
const getAuthPromise = () =>
|
|
26945
|
+
const getEmbedConfig = () => window.thoughtSpotConfig;
|
|
26946
|
+
const getAuthPromise = () => window.thoughtSpotAuthPromise;
|
|
26942
26947
|
/**
|
|
26943
26948
|
* Perform authentication on the ThoughtSpot app as applicable.
|
|
26944
26949
|
*/
|
|
26945
26950
|
const handleAuth = () => {
|
|
26946
|
-
|
|
26947
|
-
|
|
26951
|
+
window.thoughtSpotAuthPromise = authenticate(window.thoughtSpotConfig);
|
|
26952
|
+
window.thoughtSpotAuthPromise.then((isLoggedIn) => {
|
|
26948
26953
|
if (!isLoggedIn) {
|
|
26949
26954
|
notifyAuthFailure(exports.AuthFailureType.SDK);
|
|
26950
26955
|
}
|
|
@@ -26954,7 +26959,7 @@
|
|
|
26954
26959
|
}, () => {
|
|
26955
26960
|
notifyAuthFailure(exports.AuthFailureType.SDK);
|
|
26956
26961
|
});
|
|
26957
|
-
return
|
|
26962
|
+
return window.thoughtSpotAuthPromise;
|
|
26958
26963
|
};
|
|
26959
26964
|
const hostUrlToFeatureUrl = {
|
|
26960
26965
|
[exports.PrefetchFeatures.SearchEmbed]: (url) => `${url}v2/#/embed/answer`,
|
|
@@ -26979,7 +26984,7 @@
|
|
|
26979
26984
|
}
|
|
26980
26985
|
else {
|
|
26981
26986
|
const features = prefetchFeatures || [exports.PrefetchFeatures.FullApp];
|
|
26982
|
-
let hostUrl = url ||
|
|
26987
|
+
let hostUrl = url || window.thoughtSpotConfig.thoughtSpotHost;
|
|
26983
26988
|
hostUrl = hostUrl[hostUrl.length - 1] === '/' ? hostUrl : `${hostUrl}/`;
|
|
26984
26989
|
uniq_1(features.map((feature) => hostUrlToFeatureUrl[feature](hostUrl))).forEach((prefetchUrl, index) => {
|
|
26985
26990
|
const iFrame = document.createElement('iframe');
|
|
@@ -27045,26 +27050,26 @@
|
|
|
27045
27050
|
const init = (embedConfig) => {
|
|
27046
27051
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
27047
27052
|
sanity(embedConfig);
|
|
27048
|
-
|
|
27053
|
+
window.thoughtSpotConfig = {
|
|
27049
27054
|
...CONFIG_DEFAULTS,
|
|
27050
27055
|
...embedConfig,
|
|
27051
27056
|
thoughtSpotHost: getThoughtSpotHost(embedConfig),
|
|
27052
27057
|
};
|
|
27053
|
-
|
|
27058
|
+
window.thoughtSpotConfig = backwardCompat(window.thoughtSpotConfig);
|
|
27054
27059
|
const authEE = new eventemitter3();
|
|
27055
27060
|
setAuthEE(authEE);
|
|
27056
27061
|
handleAuth();
|
|
27057
27062
|
uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_CALLED_INIT, {
|
|
27058
|
-
authType:
|
|
27059
|
-
host:
|
|
27063
|
+
authType: window.thoughtSpotConfig.authType,
|
|
27064
|
+
host: window.thoughtSpotConfig.thoughtSpotHost,
|
|
27060
27065
|
usedCustomizationSheet: ((_b = (_a = embedConfig.customizations) === null || _a === void 0 ? void 0 : _a.style) === null || _b === void 0 ? void 0 : _b.customCSSUrl) != null,
|
|
27061
27066
|
usedCustomizationVariables: ((_e = (_d = (_c = embedConfig.customizations) === null || _c === void 0 ? void 0 : _c.style) === null || _d === void 0 ? void 0 : _d.customCSS) === null || _e === void 0 ? void 0 : _e.variables) != null,
|
|
27062
27067
|
usedCustomizationRules: ((_h = (_g = (_f = embedConfig.customizations) === null || _f === void 0 ? void 0 : _f.style) === null || _g === void 0 ? void 0 : _g.customCSS) === null || _h === void 0 ? void 0 : _h.rules_UNSTABLE) != null,
|
|
27063
27068
|
usedCustomizationStrings: !!((_k = (_j = embedConfig.customizations) === null || _j === void 0 ? void 0 : _j.content) === null || _k === void 0 ? void 0 : _k.strings),
|
|
27064
27069
|
usedCustomizationIconSprite: !!((_l = embedConfig.customizations) === null || _l === void 0 ? void 0 : _l.iconSpriteUrl),
|
|
27065
27070
|
});
|
|
27066
|
-
if (
|
|
27067
|
-
prefetch(
|
|
27071
|
+
if (window.thoughtSpotConfig.callPrefetch) {
|
|
27072
|
+
prefetch(window.thoughtSpotConfig.thoughtSpotHost);
|
|
27068
27073
|
}
|
|
27069
27074
|
return authEE;
|
|
27070
27075
|
};
|
|
@@ -27072,7 +27077,7 @@
|
|
|
27072
27077
|
*
|
|
27073
27078
|
*/
|
|
27074
27079
|
function disableAutoLogin() {
|
|
27075
|
-
|
|
27080
|
+
window.thoughtSpotConfig.autoLogin = false;
|
|
27076
27081
|
}
|
|
27077
27082
|
/**
|
|
27078
27083
|
* Logs out from ThoughtSpot. This also sets the autoLogin flag to false, to
|
|
@@ -27090,7 +27095,7 @@
|
|
|
27090
27095
|
if (!doNotDisableAutoLogin) {
|
|
27091
27096
|
disableAutoLogin();
|
|
27092
27097
|
}
|
|
27093
|
-
return logout(
|
|
27098
|
+
return logout(window.thoughtSpotConfig).then((isLoggedIn) => {
|
|
27094
27099
|
notifyLogout();
|
|
27095
27100
|
return isLoggedIn;
|
|
27096
27101
|
});
|
|
@@ -27103,7 +27108,7 @@
|
|
|
27103
27108
|
* @param fn The function being registered
|
|
27104
27109
|
*/
|
|
27105
27110
|
const renderInQueue = (fn) => {
|
|
27106
|
-
const { queueMultiRenders = false } =
|
|
27111
|
+
const { queueMultiRenders = false } = window.thoughtSpotConfig;
|
|
27107
27112
|
if (queueMultiRenders) {
|
|
27108
27113
|
renderQueue = renderQueue.then(() => new Promise((res) => fn(res)));
|
|
27109
27114
|
return renderQueue;
|
|
@@ -27112,16 +27117,16 @@
|
|
|
27112
27117
|
return fn(() => { }); // eslint-disable-line @typescript-eslint/no-empty-function
|
|
27113
27118
|
};
|
|
27114
27119
|
const executeTML = async (data) => {
|
|
27115
|
-
const { thoughtSpotHost, authType } =
|
|
27120
|
+
const { thoughtSpotHost, authType } = window.thoughtSpotConfig;
|
|
27116
27121
|
try {
|
|
27117
|
-
sanity(
|
|
27122
|
+
sanity(window.thoughtSpotConfig);
|
|
27118
27123
|
}
|
|
27119
27124
|
catch (err) {
|
|
27120
27125
|
return Promise.reject(err);
|
|
27121
27126
|
}
|
|
27122
27127
|
let authToken = '';
|
|
27123
27128
|
if (authType === exports.AuthType.TrustedAuthTokenCookieless) {
|
|
27124
|
-
authToken = await getAuthenticaionToken(
|
|
27129
|
+
authToken = await getAuthenticaionToken(window.thoughtSpotConfig);
|
|
27125
27130
|
}
|
|
27126
27131
|
const headers = {
|
|
27127
27132
|
'Content-Type': 'application/json',
|
|
@@ -27152,9 +27157,9 @@
|
|
|
27152
27157
|
});
|
|
27153
27158
|
};
|
|
27154
27159
|
const exportTML = async (data) => {
|
|
27155
|
-
const { thoughtSpotHost, authType } =
|
|
27160
|
+
const { thoughtSpotHost, authType } = window.thoughtSpotConfig;
|
|
27156
27161
|
try {
|
|
27157
|
-
sanity(
|
|
27162
|
+
sanity(window.thoughtSpotConfig);
|
|
27158
27163
|
}
|
|
27159
27164
|
catch (err) {
|
|
27160
27165
|
return Promise.reject(err);
|
|
@@ -27167,7 +27172,7 @@
|
|
|
27167
27172
|
};
|
|
27168
27173
|
let authToken = '';
|
|
27169
27174
|
if (authType === exports.AuthType.TrustedAuthTokenCookieless) {
|
|
27170
|
-
authToken = await getAuthenticaionToken(
|
|
27175
|
+
authToken = await getAuthenticaionToken(window.thoughtSpotConfig);
|
|
27171
27176
|
}
|
|
27172
27177
|
const headers = {
|
|
27173
27178
|
'Content-Type': 'application/json',
|
|
@@ -27407,7 +27412,7 @@
|
|
|
27407
27412
|
});
|
|
27408
27413
|
}
|
|
27409
27414
|
|
|
27410
|
-
var name="@thoughtspot/visual-embed-sdk";var version="1.21.0-react.
|
|
27415
|
+
var name="@thoughtspot/visual-embed-sdk";var version="1.21.0-react.4";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports$1={".":{"import":"./lib/src/index.js",require:"./dist/tsembed.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p . --incremental false; tsc -p . --incremental false --module commonjs --outDir cjs",start:"gatsby develop","build:gatsby":"npm run clean:gatsby && gatsby build --prefix-paths","build:gatsby:noprefix":"npm run clean:gatsby && gatsby build","serve:gatsby":"gatsby serve","clean:gatsby":"gatsby clean","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts":"dts-bundle --name ../../dist/visual-embed-sdk --main lib/src/index.d.ts --outputAsModuleFolder=true","bundle-dts-react":"dts-bundle --name ../../../dist/visual-embed-sdk-react --main lib/src/react/index.d.ts --outputAsModuleFolder=true","bundle-dts-react-full":"dts-bundle --name ../../../dist/visual-embed-sdk-react-full --main lib/src/react/all-types-export.d.ts --outputAsModuleFolder=true",build:"rollup -c",watch:"rollup -cw","docs-cmd":"node scripts/gatsby-commands.js",docgen:"typedoc --tsconfig tsconfig.json --theme typedoc-theme","test-sdk":"jest -c jest.config.sdk.js --runInBand","test-docs":"jest -c jest.config.docs.js",test:"npm run test-sdk && npm run test-docs",posttest:"cat ./coverage/sdk/lcov.info | coveralls",prepublishOnly:"npm run test; npm run tsc; npm run bundle-dts; npm run bundle-dts-react-full; npm run build","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={algoliasearch:"^4.10.5",classnames:"^2.3.1",dompurify:"^2.3.4","eslint-plugin-comment-length":"^0.9.2","eslint-plugin-jsdoc":"^40.1.0",eventemitter3:"^4.0.7","gatsby-plugin-vercel":"^1.0.3","html-react-parser":"^1.4.12",lodash:"^4.17.21","mixpanel-browser":"^2.45.0","ts-deepmerge":"^6.0.2","use-deep-compare-effect":"^1.8.1"};var devDependencies={"@mdx-js/mdx":"^1.6.22","@mdx-js/react":"^1.6.22","@react-icons/all-files":"^4.1.0","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^5.0.2","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^22.2.3","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^4.6.0","@typescript-eslint/parser":"^4.6.0",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1",coveralls:"^3.1.0","dts-bundle":"^0.7.3",eslint:"^7.12.1","eslint-config-airbnb-base":"^14.2.0","eslint-config-prettier":"^6.15.0","eslint-import-resolver-typescript":"^2.3.0","eslint-plugin-import":"^2.22.1","eslint-plugin-prettier":"^3.1.4","eslint-plugin-react-hooks":"^4.2.0","fs-extra":"^10.0.0",gatsby:"3.13.1","gatsby-plugin-algolia":"^0.22.2","gatsby-plugin-catch-links":"^3.1.0","gatsby-plugin-env-variables":"^2.1.0","gatsby-plugin-intl":"^0.3.3","gatsby-plugin-manifest":"^3.2.0","gatsby-plugin-output":"^0.1.3","gatsby-plugin-sass":"6.7.0","gatsby-plugin-sitemap":"^4.10.0","gatsby-source-filesystem":"3.1.0","gatsby-transformer-asciidoc":"2.1.0","gatsby-transformer-rehype":"2.0.0","gh-pages":"^3.1.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^1.1.1",jest:"^26.6.3","jest-puppeteer":"^4.4.0",jsdom:"^17.0.0","node-sass":"^8.0.0",prettier:"2.1.2",puppeteer:"^7.0.1",react:"^16.14.0","react-dom":"^16.14.0","react-resizable":"^1.11.0","react-resize-detector":"^6.6.0","react-test-renderer":"^17.0.2","react-use-flexsearch":"^0.1.1",rollup:"2.30.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^26.5.5","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","url-search-params-polyfill":"^8.1.0",util:"^0.12.4"};var author="ThoughtSpot";var email="support@thoughtspot.com";var license="ThoughtSpot Development Tools End User License Agreement";var directories={lib:"lib"};var repository={type:"git",url:"git+https://github.com/thoughtspot/visual-embed-sdk.git"};var publishConfig={registry:"https://registry.npmjs.org"};var keywords=["thoughtspot","everywhere","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version,description:description,module:module,main:main,types:types,files:files,exports:exports$1,typesVersions:typesVersions,scripts:scripts,peerDependencies:peerDependencies,dependencies:dependencies,devDependencies:devDependencies,author:author,email:email,license:license,directories:directories,repository:repository,publishConfig:publishConfig,keywords:keywords,bugs:bugs,homepage:homepage,globals:globals};
|
|
27411
27416
|
|
|
27412
27417
|
/**
|
|
27413
27418
|
* Copyright (c) 2022
|
|
@@ -28050,8 +28055,9 @@
|
|
|
28050
28055
|
* @version SDK: 1.19.1 | ThoughtSpot: *
|
|
28051
28056
|
*/
|
|
28052
28057
|
destroy() {
|
|
28058
|
+
var _a;
|
|
28053
28059
|
try {
|
|
28054
|
-
this.insertedDomEl.parentNode.removeChild(this.insertedDomEl);
|
|
28060
|
+
(_a = this.insertedDomEl) === null || _a === void 0 ? void 0 : _a.parentNode.removeChild(this.insertedDomEl);
|
|
28055
28061
|
}
|
|
28056
28062
|
catch (e) {
|
|
28057
28063
|
console.log('Error destroying TS Embed', e);
|
package/lib/package.json
CHANGED
package/lib/src/embed/base.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../src/embed/base.ts"],"names":[],"mappings":"AAaA,OAAO,EAAY,WAAW,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACnE,OAAO,EAMH,iBAAiB,EACjB,oBAAoB,EACpB,iBAAiB,EACjB,YAAY,EAEZ,gBAAgB,EAGnB,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../src/embed/base.ts"],"names":[],"mappings":"AAaA,OAAO,EAAY,WAAW,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACnE,OAAO,EAMH,iBAAiB,EACjB,oBAAoB,EACpB,iBAAiB,EACjB,YAAY,EAEZ,gBAAgB,EAGnB,MAAM,SAAS,CAAC;AAWjB,MAAM,WAAW,eAAe;IAC5B,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,aAAa,CAAC,EAAE,SAAS,GAAG,aAAa,GAAG,eAAe,CAAC;IAC5D,UAAU,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,cAAc;IAC3B,QAAQ,EAAE;QACR,UAAU,EAAE,MAAM,CAAC;QACnB,IAAI,CAAC,EAAE,WAAW,GAAG,QAAQ,GAAG,eAAe,GAAG,YAAY,CAAC;KAChE,EAAE,CAAC;IACJ,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC/B;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,QAAO,WAAgD,CAAC;AAEnF,eAAO,MAAM,cAAc,QAAO,QAAQ,OAAO,CAAkC,CAAC;AAEpF,OAAO,EACH,iBAAiB,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,YAAY,GAC3E,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU,QAAO,QAAQ,OAAO,CAe5C,CAAC;AASF;;;;;;;;;GASG;AACH,eAAO,MAAM,QAAQ,SAAU,MAAM,qBAAqB,gBAAgB,EAAE,KAAG,IAqB9E,CAAC;AAiCF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,IAAI,gBAAiB,WAAW,KAAG,gBA2B/C,CAAC;AAEF;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAEvC;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,MAAM,uCAAoC,QAAQ,OAAO,CAQrE,CAAC;AAIF;;;;;GAKG;AACH,eAAO,MAAM,aAAa,sBAAuB,GAAG,KAAK,IAAI,KAAK,QAAQ,GAAG,CAAC,KAAG,QAAQ,GAAG,CAQ3F,CAAC;AAEF,eAAO,MAAM,UAAU,SAAgB,eAAe,KAAG,QAAQ,GAAG,CAyCnE,CAAC;AAEF,eAAO,MAAM,SAAS,SAAgB,cAAc,KAAG,QAAQ,GAAG,CA2CjE,CAAC;AAGF;;GAEG;AACH,wBAAgB,KAAK,IAAI,IAAI,CAI5B"}
|