@thoughtspot/visual-embed-sdk 1.21.0-react.4 → 1.21.0-react.6
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 +2 -2
- package/cjs/src/embed/base.d.ts +1 -0
- 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/mixpanel-service.d.ts.map +1 -1
- package/cjs/src/mixpanel-service.js +10 -2
- package/cjs/src/mixpanel-service.js.map +1 -1
- package/cjs/src/react/index.d.ts +6 -6
- package/cjs/src/react/index.d.ts.map +1 -1
- package/cjs/src/react/index.js.map +1 -1
- package/dist/src/embed/base.d.ts +1 -0
- package/dist/src/embed/base.d.ts.map +1 -1
- package/dist/src/mixpanel-service.d.ts.map +1 -1
- package/dist/src/react/index.d.ts +6 -6
- package/dist/src/react/index.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +20 -11
- package/dist/tsembed-react.js +20 -11
- package/dist/tsembed.es.js +34 -25
- package/dist/tsembed.js +34 -25
- package/dist/visual-embed-sdk-react-full.d.ts +7 -6
- package/dist/visual-embed-sdk.d.ts +1 -0
- package/lib/package.json +2 -2
- package/lib/src/embed/base.d.ts +1 -0
- package/lib/src/embed/base.d.ts.map +1 -1
- package/lib/src/embed/base.js +25 -24
- package/lib/src/embed/base.js.map +1 -1
- package/lib/src/mixpanel-service.d.ts.map +1 -1
- package/lib/src/mixpanel-service.js +10 -2
- package/lib/src/mixpanel-service.js.map +1 -1
- package/lib/src/react/index.d.ts +6 -6
- package/lib/src/react/index.d.ts.map +1 -1
- package/lib/src/react/index.js.map +1 -1
- package/package.json +2 -2
- package/src/embed/base.ts +26 -26
- package/src/mixpanel-service.ts +10 -2
- package/src/react/index.tsx +11 -11
package/dist/tsembed-react.js
CHANGED
|
@@ -7935,8 +7935,16 @@
|
|
|
7935
7935
|
mixpanel_cjs.init(token);
|
|
7936
7936
|
if (!isPublicCluster) {
|
|
7937
7937
|
// Needed to avoid error in CJS builds on some bundlers.
|
|
7938
|
-
const mixpanelIdentify = mixpanel_cjs.identify
|
|
7939
|
-
|
|
7938
|
+
const { mixpanelLib, mixpanelIdentify } = (mixpanel_cjs.identify)
|
|
7939
|
+
? {
|
|
7940
|
+
mixpanelLib: mixpanel$1,
|
|
7941
|
+
mixpanelIdentify: mixpanel_cjs.identify
|
|
7942
|
+
}
|
|
7943
|
+
: {
|
|
7944
|
+
mixpanelLib: mixpanel_cjs,
|
|
7945
|
+
mixpanelIdentify: mixpanel_cjs.identify
|
|
7946
|
+
};
|
|
7947
|
+
mixpanelIdentify.call(mixpanelLib, sessionInfo.userGUID);
|
|
7940
7948
|
}
|
|
7941
7949
|
isMixpanelInitialized = true;
|
|
7942
7950
|
emptyQueue();
|
|
@@ -26330,12 +26338,13 @@
|
|
|
26330
26338
|
};
|
|
26331
26339
|
|
|
26332
26340
|
/* eslint-disable camelcase */
|
|
26333
|
-
|
|
26341
|
+
let config = {};
|
|
26334
26342
|
const CONFIG_DEFAULTS = {
|
|
26335
26343
|
loginFailedMessage: 'Not logged in',
|
|
26336
26344
|
authTriggerText: 'Authorize',
|
|
26337
26345
|
authType: AuthType.None,
|
|
26338
26346
|
};
|
|
26347
|
+
let authPromise;
|
|
26339
26348
|
/**
|
|
26340
26349
|
* Gets the configuration embed was initialized with.
|
|
26341
26350
|
*
|
|
@@ -26343,14 +26352,14 @@
|
|
|
26343
26352
|
* @version SDK: 1.19.0 | ThoughtSpot: *
|
|
26344
26353
|
* @group Global methods
|
|
26345
26354
|
*/
|
|
26346
|
-
const getEmbedConfig = () =>
|
|
26347
|
-
const getAuthPromise = () =>
|
|
26355
|
+
const getEmbedConfig = () => config;
|
|
26356
|
+
const getAuthPromise = () => authPromise;
|
|
26348
26357
|
/**
|
|
26349
26358
|
* Perform authentication on the ThoughtSpot app as applicable.
|
|
26350
26359
|
*/
|
|
26351
26360
|
const handleAuth = () => {
|
|
26352
|
-
|
|
26353
|
-
|
|
26361
|
+
authPromise = authenticate(config);
|
|
26362
|
+
authPromise.then((isLoggedIn) => {
|
|
26354
26363
|
if (!isLoggedIn) {
|
|
26355
26364
|
notifyAuthFailure(AuthFailureType.SDK);
|
|
26356
26365
|
}
|
|
@@ -26360,7 +26369,7 @@
|
|
|
26360
26369
|
}, () => {
|
|
26361
26370
|
notifyAuthFailure(AuthFailureType.SDK);
|
|
26362
26371
|
});
|
|
26363
|
-
return
|
|
26372
|
+
return authPromise;
|
|
26364
26373
|
};
|
|
26365
26374
|
const hostUrlToFeatureUrl = {
|
|
26366
26375
|
[PrefetchFeatures.SearchEmbed]: (url) => `${url}v2/#/embed/answer`,
|
|
@@ -26372,7 +26381,7 @@
|
|
|
26372
26381
|
*
|
|
26373
26382
|
*/
|
|
26374
26383
|
function disableAutoLogin() {
|
|
26375
|
-
|
|
26384
|
+
config.autoLogin = false;
|
|
26376
26385
|
}
|
|
26377
26386
|
let renderQueue = Promise.resolve();
|
|
26378
26387
|
/**
|
|
@@ -26382,7 +26391,7 @@
|
|
|
26382
26391
|
* @param fn The function being registered
|
|
26383
26392
|
*/
|
|
26384
26393
|
const renderInQueue = (fn) => {
|
|
26385
|
-
const { queueMultiRenders = false } =
|
|
26394
|
+
const { queueMultiRenders = false } = config;
|
|
26386
26395
|
if (queueMultiRenders) {
|
|
26387
26396
|
renderQueue = renderQueue.then(() => new Promise((res) => fn(res)));
|
|
26388
26397
|
return renderQueue;
|
|
@@ -26605,7 +26614,7 @@
|
|
|
26605
26614
|
});
|
|
26606
26615
|
}
|
|
26607
26616
|
|
|
26608
|
-
var name="@thoughtspot/visual-embed-sdk";var version="1.21.0-react.
|
|
26617
|
+
var name="@thoughtspot/visual-embed-sdk";var version="1.21.0-react.6";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:"./cjs/src/index.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};
|
|
26609
26618
|
|
|
26610
26619
|
/**
|
|
26611
26620
|
* Copyright (c) 2022
|
package/dist/tsembed.es.js
CHANGED
|
@@ -7838,8 +7838,16 @@ function initMixpanel(sessionInfo) {
|
|
|
7838
7838
|
mixpanel_cjs.init(token);
|
|
7839
7839
|
if (!isPublicCluster) {
|
|
7840
7840
|
// Needed to avoid error in CJS builds on some bundlers.
|
|
7841
|
-
const mixpanelIdentify = mixpanel_cjs.identify
|
|
7842
|
-
|
|
7841
|
+
const { mixpanelLib, mixpanelIdentify } = (mixpanel_cjs.identify)
|
|
7842
|
+
? {
|
|
7843
|
+
mixpanelLib: mixpanel$1,
|
|
7844
|
+
mixpanelIdentify: mixpanel_cjs.identify
|
|
7845
|
+
}
|
|
7846
|
+
: {
|
|
7847
|
+
mixpanelLib: mixpanel_cjs,
|
|
7848
|
+
mixpanelIdentify: mixpanel_cjs.identify
|
|
7849
|
+
};
|
|
7850
|
+
mixpanelIdentify.call(mixpanelLib, sessionInfo.userGUID);
|
|
7843
7851
|
}
|
|
7844
7852
|
isMixpanelInitialized = true;
|
|
7845
7853
|
emptyQueue();
|
|
@@ -27031,12 +27039,13 @@ const authenticate = async (embedConfig) => {
|
|
|
27031
27039
|
};
|
|
27032
27040
|
|
|
27033
27041
|
/* eslint-disable camelcase */
|
|
27034
|
-
|
|
27042
|
+
let config = {};
|
|
27035
27043
|
const CONFIG_DEFAULTS = {
|
|
27036
27044
|
loginFailedMessage: 'Not logged in',
|
|
27037
27045
|
authTriggerText: 'Authorize',
|
|
27038
27046
|
authType: AuthType.None,
|
|
27039
27047
|
};
|
|
27048
|
+
let authPromise;
|
|
27040
27049
|
/**
|
|
27041
27050
|
* Gets the configuration embed was initialized with.
|
|
27042
27051
|
*
|
|
@@ -27044,14 +27053,14 @@ const CONFIG_DEFAULTS = {
|
|
|
27044
27053
|
* @version SDK: 1.19.0 | ThoughtSpot: *
|
|
27045
27054
|
* @group Global methods
|
|
27046
27055
|
*/
|
|
27047
|
-
const getEmbedConfig = () =>
|
|
27048
|
-
const getAuthPromise = () =>
|
|
27056
|
+
const getEmbedConfig = () => config;
|
|
27057
|
+
const getAuthPromise = () => authPromise;
|
|
27049
27058
|
/**
|
|
27050
27059
|
* Perform authentication on the ThoughtSpot app as applicable.
|
|
27051
27060
|
*/
|
|
27052
27061
|
const handleAuth = () => {
|
|
27053
|
-
|
|
27054
|
-
|
|
27062
|
+
authPromise = authenticate(config);
|
|
27063
|
+
authPromise.then((isLoggedIn) => {
|
|
27055
27064
|
if (!isLoggedIn) {
|
|
27056
27065
|
notifyAuthFailure(AuthFailureType.SDK);
|
|
27057
27066
|
}
|
|
@@ -27061,7 +27070,7 @@ const handleAuth = () => {
|
|
|
27061
27070
|
}, () => {
|
|
27062
27071
|
notifyAuthFailure(AuthFailureType.SDK);
|
|
27063
27072
|
});
|
|
27064
|
-
return
|
|
27073
|
+
return authPromise;
|
|
27065
27074
|
};
|
|
27066
27075
|
const hostUrlToFeatureUrl = {
|
|
27067
27076
|
[PrefetchFeatures.SearchEmbed]: (url) => `${url}v2/#/embed/answer`,
|
|
@@ -27086,7 +27095,7 @@ const prefetch = (url, prefetchFeatures) => {
|
|
|
27086
27095
|
}
|
|
27087
27096
|
else {
|
|
27088
27097
|
const features = prefetchFeatures || [PrefetchFeatures.FullApp];
|
|
27089
|
-
let hostUrl = url ||
|
|
27098
|
+
let hostUrl = url || config.thoughtSpotHost;
|
|
27090
27099
|
hostUrl = hostUrl[hostUrl.length - 1] === '/' ? hostUrl : `${hostUrl}/`;
|
|
27091
27100
|
uniq_1(features.map((feature) => hostUrlToFeatureUrl[feature](hostUrl))).forEach((prefetchUrl, index) => {
|
|
27092
27101
|
const iFrame = document.createElement('iframe');
|
|
@@ -27152,26 +27161,26 @@ function backwardCompat(embedConfig) {
|
|
|
27152
27161
|
const init = (embedConfig) => {
|
|
27153
27162
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
27154
27163
|
sanity(embedConfig);
|
|
27155
|
-
|
|
27164
|
+
config = {
|
|
27156
27165
|
...CONFIG_DEFAULTS,
|
|
27157
27166
|
...embedConfig,
|
|
27158
27167
|
thoughtSpotHost: getThoughtSpotHost(embedConfig),
|
|
27159
27168
|
};
|
|
27160
|
-
|
|
27169
|
+
config = backwardCompat(config);
|
|
27161
27170
|
const authEE = new eventemitter3();
|
|
27162
27171
|
setAuthEE(authEE);
|
|
27163
27172
|
handleAuth();
|
|
27164
27173
|
uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_CALLED_INIT, {
|
|
27165
|
-
authType:
|
|
27166
|
-
host:
|
|
27174
|
+
authType: config.authType,
|
|
27175
|
+
host: config.thoughtSpotHost,
|
|
27167
27176
|
usedCustomizationSheet: ((_b = (_a = embedConfig.customizations) === null || _a === void 0 ? void 0 : _a.style) === null || _b === void 0 ? void 0 : _b.customCSSUrl) != null,
|
|
27168
27177
|
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,
|
|
27169
27178
|
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,
|
|
27170
27179
|
usedCustomizationStrings: !!((_k = (_j = embedConfig.customizations) === null || _j === void 0 ? void 0 : _j.content) === null || _k === void 0 ? void 0 : _k.strings),
|
|
27171
27180
|
usedCustomizationIconSprite: !!((_l = embedConfig.customizations) === null || _l === void 0 ? void 0 : _l.iconSpriteUrl),
|
|
27172
27181
|
});
|
|
27173
|
-
if (
|
|
27174
|
-
prefetch(
|
|
27182
|
+
if (config.callPrefetch) {
|
|
27183
|
+
prefetch(config.thoughtSpotHost);
|
|
27175
27184
|
}
|
|
27176
27185
|
return authEE;
|
|
27177
27186
|
};
|
|
@@ -27179,7 +27188,7 @@ const init = (embedConfig) => {
|
|
|
27179
27188
|
*
|
|
27180
27189
|
*/
|
|
27181
27190
|
function disableAutoLogin() {
|
|
27182
|
-
|
|
27191
|
+
config.autoLogin = false;
|
|
27183
27192
|
}
|
|
27184
27193
|
/**
|
|
27185
27194
|
* Logs out from ThoughtSpot. This also sets the autoLogin flag to false, to
|
|
@@ -27197,7 +27206,7 @@ const logout$1 = (doNotDisableAutoLogin = false) => {
|
|
|
27197
27206
|
if (!doNotDisableAutoLogin) {
|
|
27198
27207
|
disableAutoLogin();
|
|
27199
27208
|
}
|
|
27200
|
-
return logout(
|
|
27209
|
+
return logout(config).then((isLoggedIn) => {
|
|
27201
27210
|
notifyLogout();
|
|
27202
27211
|
return isLoggedIn;
|
|
27203
27212
|
});
|
|
@@ -27210,7 +27219,7 @@ let renderQueue = Promise.resolve();
|
|
|
27210
27219
|
* @param fn The function being registered
|
|
27211
27220
|
*/
|
|
27212
27221
|
const renderInQueue = (fn) => {
|
|
27213
|
-
const { queueMultiRenders = false } =
|
|
27222
|
+
const { queueMultiRenders = false } = config;
|
|
27214
27223
|
if (queueMultiRenders) {
|
|
27215
27224
|
renderQueue = renderQueue.then(() => new Promise((res) => fn(res)));
|
|
27216
27225
|
return renderQueue;
|
|
@@ -27219,16 +27228,16 @@ const renderInQueue = (fn) => {
|
|
|
27219
27228
|
return fn(() => { }); // eslint-disable-line @typescript-eslint/no-empty-function
|
|
27220
27229
|
};
|
|
27221
27230
|
const executeTML = async (data) => {
|
|
27222
|
-
const { thoughtSpotHost, authType } =
|
|
27231
|
+
const { thoughtSpotHost, authType } = config;
|
|
27223
27232
|
try {
|
|
27224
|
-
sanity(
|
|
27233
|
+
sanity(config);
|
|
27225
27234
|
}
|
|
27226
27235
|
catch (err) {
|
|
27227
27236
|
return Promise.reject(err);
|
|
27228
27237
|
}
|
|
27229
27238
|
let authToken = '';
|
|
27230
27239
|
if (authType === AuthType.TrustedAuthTokenCookieless) {
|
|
27231
|
-
authToken = await getAuthenticaionToken(
|
|
27240
|
+
authToken = await getAuthenticaionToken(config);
|
|
27232
27241
|
}
|
|
27233
27242
|
const headers = {
|
|
27234
27243
|
'Content-Type': 'application/json',
|
|
@@ -27259,9 +27268,9 @@ const executeTML = async (data) => {
|
|
|
27259
27268
|
});
|
|
27260
27269
|
};
|
|
27261
27270
|
const exportTML = async (data) => {
|
|
27262
|
-
const { thoughtSpotHost, authType } =
|
|
27271
|
+
const { thoughtSpotHost, authType } = config;
|
|
27263
27272
|
try {
|
|
27264
|
-
sanity(
|
|
27273
|
+
sanity(config);
|
|
27265
27274
|
}
|
|
27266
27275
|
catch (err) {
|
|
27267
27276
|
return Promise.reject(err);
|
|
@@ -27274,7 +27283,7 @@ const exportTML = async (data) => {
|
|
|
27274
27283
|
};
|
|
27275
27284
|
let authToken = '';
|
|
27276
27285
|
if (authType === AuthType.TrustedAuthTokenCookieless) {
|
|
27277
|
-
authToken = await getAuthenticaionToken(
|
|
27286
|
+
authToken = await getAuthenticaionToken(config);
|
|
27278
27287
|
}
|
|
27279
27288
|
const headers = {
|
|
27280
27289
|
'Content-Type': 'application/json',
|
|
@@ -27514,7 +27523,7 @@ function processTrigger(iFrame, messageType, thoughtSpotHost, data) {
|
|
|
27514
27523
|
});
|
|
27515
27524
|
}
|
|
27516
27525
|
|
|
27517
|
-
var name="@thoughtspot/visual-embed-sdk";var version="1.21.0-react.
|
|
27526
|
+
var name="@thoughtspot/visual-embed-sdk";var version="1.21.0-react.6";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:"./cjs/src/index.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};
|
|
27518
27527
|
|
|
27519
27528
|
/**
|
|
27520
27529
|
* Copyright (c) 2022
|
package/dist/tsembed.js
CHANGED
|
@@ -7755,8 +7755,16 @@
|
|
|
7755
7755
|
mixpanel_cjs.init(token);
|
|
7756
7756
|
if (!isPublicCluster) {
|
|
7757
7757
|
// Needed to avoid error in CJS builds on some bundlers.
|
|
7758
|
-
const mixpanelIdentify = mixpanel_cjs.identify
|
|
7759
|
-
|
|
7758
|
+
const { mixpanelLib, mixpanelIdentify } = (mixpanel_cjs.identify)
|
|
7759
|
+
? {
|
|
7760
|
+
mixpanelLib: mixpanel$1,
|
|
7761
|
+
mixpanelIdentify: mixpanel_cjs.identify
|
|
7762
|
+
}
|
|
7763
|
+
: {
|
|
7764
|
+
mixpanelLib: mixpanel_cjs,
|
|
7765
|
+
mixpanelIdentify: mixpanel_cjs.identify
|
|
7766
|
+
};
|
|
7767
|
+
mixpanelIdentify.call(mixpanelLib, sessionInfo.userGUID);
|
|
7760
7768
|
}
|
|
7761
7769
|
isMixpanelInitialized = true;
|
|
7762
7770
|
emptyQueue();
|
|
@@ -26929,12 +26937,13 @@
|
|
|
26929
26937
|
};
|
|
26930
26938
|
|
|
26931
26939
|
/* eslint-disable camelcase */
|
|
26932
|
-
|
|
26940
|
+
let config = {};
|
|
26933
26941
|
const CONFIG_DEFAULTS = {
|
|
26934
26942
|
loginFailedMessage: 'Not logged in',
|
|
26935
26943
|
authTriggerText: 'Authorize',
|
|
26936
26944
|
authType: exports.AuthType.None,
|
|
26937
26945
|
};
|
|
26946
|
+
let authPromise;
|
|
26938
26947
|
/**
|
|
26939
26948
|
* Gets the configuration embed was initialized with.
|
|
26940
26949
|
*
|
|
@@ -26942,14 +26951,14 @@
|
|
|
26942
26951
|
* @version SDK: 1.19.0 | ThoughtSpot: *
|
|
26943
26952
|
* @group Global methods
|
|
26944
26953
|
*/
|
|
26945
|
-
const getEmbedConfig = () =>
|
|
26946
|
-
const getAuthPromise = () =>
|
|
26954
|
+
const getEmbedConfig = () => config;
|
|
26955
|
+
const getAuthPromise = () => authPromise;
|
|
26947
26956
|
/**
|
|
26948
26957
|
* Perform authentication on the ThoughtSpot app as applicable.
|
|
26949
26958
|
*/
|
|
26950
26959
|
const handleAuth = () => {
|
|
26951
|
-
|
|
26952
|
-
|
|
26960
|
+
authPromise = authenticate(config);
|
|
26961
|
+
authPromise.then((isLoggedIn) => {
|
|
26953
26962
|
if (!isLoggedIn) {
|
|
26954
26963
|
notifyAuthFailure(exports.AuthFailureType.SDK);
|
|
26955
26964
|
}
|
|
@@ -26959,7 +26968,7 @@
|
|
|
26959
26968
|
}, () => {
|
|
26960
26969
|
notifyAuthFailure(exports.AuthFailureType.SDK);
|
|
26961
26970
|
});
|
|
26962
|
-
return
|
|
26971
|
+
return authPromise;
|
|
26963
26972
|
};
|
|
26964
26973
|
const hostUrlToFeatureUrl = {
|
|
26965
26974
|
[exports.PrefetchFeatures.SearchEmbed]: (url) => `${url}v2/#/embed/answer`,
|
|
@@ -26984,7 +26993,7 @@
|
|
|
26984
26993
|
}
|
|
26985
26994
|
else {
|
|
26986
26995
|
const features = prefetchFeatures || [exports.PrefetchFeatures.FullApp];
|
|
26987
|
-
let hostUrl = url ||
|
|
26996
|
+
let hostUrl = url || config.thoughtSpotHost;
|
|
26988
26997
|
hostUrl = hostUrl[hostUrl.length - 1] === '/' ? hostUrl : `${hostUrl}/`;
|
|
26989
26998
|
uniq_1(features.map((feature) => hostUrlToFeatureUrl[feature](hostUrl))).forEach((prefetchUrl, index) => {
|
|
26990
26999
|
const iFrame = document.createElement('iframe');
|
|
@@ -27050,26 +27059,26 @@
|
|
|
27050
27059
|
const init = (embedConfig) => {
|
|
27051
27060
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
27052
27061
|
sanity(embedConfig);
|
|
27053
|
-
|
|
27062
|
+
config = {
|
|
27054
27063
|
...CONFIG_DEFAULTS,
|
|
27055
27064
|
...embedConfig,
|
|
27056
27065
|
thoughtSpotHost: getThoughtSpotHost(embedConfig),
|
|
27057
27066
|
};
|
|
27058
|
-
|
|
27067
|
+
config = backwardCompat(config);
|
|
27059
27068
|
const authEE = new eventemitter3();
|
|
27060
27069
|
setAuthEE(authEE);
|
|
27061
27070
|
handleAuth();
|
|
27062
27071
|
uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_CALLED_INIT, {
|
|
27063
|
-
authType:
|
|
27064
|
-
host:
|
|
27072
|
+
authType: config.authType,
|
|
27073
|
+
host: config.thoughtSpotHost,
|
|
27065
27074
|
usedCustomizationSheet: ((_b = (_a = embedConfig.customizations) === null || _a === void 0 ? void 0 : _a.style) === null || _b === void 0 ? void 0 : _b.customCSSUrl) != null,
|
|
27066
27075
|
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,
|
|
27067
27076
|
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,
|
|
27068
27077
|
usedCustomizationStrings: !!((_k = (_j = embedConfig.customizations) === null || _j === void 0 ? void 0 : _j.content) === null || _k === void 0 ? void 0 : _k.strings),
|
|
27069
27078
|
usedCustomizationIconSprite: !!((_l = embedConfig.customizations) === null || _l === void 0 ? void 0 : _l.iconSpriteUrl),
|
|
27070
27079
|
});
|
|
27071
|
-
if (
|
|
27072
|
-
prefetch(
|
|
27080
|
+
if (config.callPrefetch) {
|
|
27081
|
+
prefetch(config.thoughtSpotHost);
|
|
27073
27082
|
}
|
|
27074
27083
|
return authEE;
|
|
27075
27084
|
};
|
|
@@ -27077,7 +27086,7 @@
|
|
|
27077
27086
|
*
|
|
27078
27087
|
*/
|
|
27079
27088
|
function disableAutoLogin() {
|
|
27080
|
-
|
|
27089
|
+
config.autoLogin = false;
|
|
27081
27090
|
}
|
|
27082
27091
|
/**
|
|
27083
27092
|
* Logs out from ThoughtSpot. This also sets the autoLogin flag to false, to
|
|
@@ -27095,7 +27104,7 @@
|
|
|
27095
27104
|
if (!doNotDisableAutoLogin) {
|
|
27096
27105
|
disableAutoLogin();
|
|
27097
27106
|
}
|
|
27098
|
-
return logout(
|
|
27107
|
+
return logout(config).then((isLoggedIn) => {
|
|
27099
27108
|
notifyLogout();
|
|
27100
27109
|
return isLoggedIn;
|
|
27101
27110
|
});
|
|
@@ -27108,7 +27117,7 @@
|
|
|
27108
27117
|
* @param fn The function being registered
|
|
27109
27118
|
*/
|
|
27110
27119
|
const renderInQueue = (fn) => {
|
|
27111
|
-
const { queueMultiRenders = false } =
|
|
27120
|
+
const { queueMultiRenders = false } = config;
|
|
27112
27121
|
if (queueMultiRenders) {
|
|
27113
27122
|
renderQueue = renderQueue.then(() => new Promise((res) => fn(res)));
|
|
27114
27123
|
return renderQueue;
|
|
@@ -27117,16 +27126,16 @@
|
|
|
27117
27126
|
return fn(() => { }); // eslint-disable-line @typescript-eslint/no-empty-function
|
|
27118
27127
|
};
|
|
27119
27128
|
const executeTML = async (data) => {
|
|
27120
|
-
const { thoughtSpotHost, authType } =
|
|
27129
|
+
const { thoughtSpotHost, authType } = config;
|
|
27121
27130
|
try {
|
|
27122
|
-
sanity(
|
|
27131
|
+
sanity(config);
|
|
27123
27132
|
}
|
|
27124
27133
|
catch (err) {
|
|
27125
27134
|
return Promise.reject(err);
|
|
27126
27135
|
}
|
|
27127
27136
|
let authToken = '';
|
|
27128
27137
|
if (authType === exports.AuthType.TrustedAuthTokenCookieless) {
|
|
27129
|
-
authToken = await getAuthenticaionToken(
|
|
27138
|
+
authToken = await getAuthenticaionToken(config);
|
|
27130
27139
|
}
|
|
27131
27140
|
const headers = {
|
|
27132
27141
|
'Content-Type': 'application/json',
|
|
@@ -27157,9 +27166,9 @@
|
|
|
27157
27166
|
});
|
|
27158
27167
|
};
|
|
27159
27168
|
const exportTML = async (data) => {
|
|
27160
|
-
const { thoughtSpotHost, authType } =
|
|
27169
|
+
const { thoughtSpotHost, authType } = config;
|
|
27161
27170
|
try {
|
|
27162
|
-
sanity(
|
|
27171
|
+
sanity(config);
|
|
27163
27172
|
}
|
|
27164
27173
|
catch (err) {
|
|
27165
27174
|
return Promise.reject(err);
|
|
@@ -27172,7 +27181,7 @@
|
|
|
27172
27181
|
};
|
|
27173
27182
|
let authToken = '';
|
|
27174
27183
|
if (authType === exports.AuthType.TrustedAuthTokenCookieless) {
|
|
27175
|
-
authToken = await getAuthenticaionToken(
|
|
27184
|
+
authToken = await getAuthenticaionToken(config);
|
|
27176
27185
|
}
|
|
27177
27186
|
const headers = {
|
|
27178
27187
|
'Content-Type': 'application/json',
|
|
@@ -27412,7 +27421,7 @@
|
|
|
27412
27421
|
});
|
|
27413
27422
|
}
|
|
27414
27423
|
|
|
27415
|
-
var name="@thoughtspot/visual-embed-sdk";var version="1.21.0-react.
|
|
27424
|
+
var name="@thoughtspot/visual-embed-sdk";var version="1.21.0-react.6";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:"./cjs/src/index.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};
|
|
27416
27425
|
|
|
27417
27426
|
/**
|
|
27418
27427
|
* Copyright (c) 2022
|
|
@@ -21,7 +21,7 @@ interface SearchProps extends EmbedProps, SearchViewConfig {
|
|
|
21
21
|
* }
|
|
22
22
|
* ```
|
|
23
23
|
*/
|
|
24
|
-
export const SearchEmbed: React.ForwardRefExoticComponent<SearchProps & React.RefAttributes<
|
|
24
|
+
export const SearchEmbed: React.ForwardRefExoticComponent<SearchProps & React.RefAttributes<_SearchEmbed>>;
|
|
25
25
|
interface AppProps extends EmbedProps, AppViewConfig {
|
|
26
26
|
}
|
|
27
27
|
/**
|
|
@@ -38,7 +38,7 @@ interface AppProps extends EmbedProps, AppViewConfig {
|
|
|
38
38
|
* }
|
|
39
39
|
* ```
|
|
40
40
|
*/
|
|
41
|
-
export const AppEmbed: React.ForwardRefExoticComponent<AppProps & React.RefAttributes<
|
|
41
|
+
export const AppEmbed: React.ForwardRefExoticComponent<AppProps & React.RefAttributes<_AppEmbed>>;
|
|
42
42
|
interface LiveboardProps extends EmbedProps, LiveboardViewConfig {
|
|
43
43
|
}
|
|
44
44
|
/**
|
|
@@ -56,8 +56,8 @@ interface LiveboardProps extends EmbedProps, LiveboardViewConfig {
|
|
|
56
56
|
* }
|
|
57
57
|
* ```
|
|
58
58
|
*/
|
|
59
|
-
export const LiveboardEmbed: React.ForwardRefExoticComponent<LiveboardProps & React.RefAttributes<
|
|
60
|
-
export const PinboardEmbed: React.ForwardRefExoticComponent<LiveboardProps & React.RefAttributes<
|
|
59
|
+
export const LiveboardEmbed: React.ForwardRefExoticComponent<LiveboardProps & React.RefAttributes<_LiveboardEmbed>>;
|
|
60
|
+
export const PinboardEmbed: React.ForwardRefExoticComponent<LiveboardProps & React.RefAttributes<_LiveboardEmbed>>;
|
|
61
61
|
interface SearchBarEmbedProps extends EmbedProps, SearchBarViewConfig {
|
|
62
62
|
}
|
|
63
63
|
/**
|
|
@@ -73,7 +73,7 @@ interface SearchBarEmbedProps extends EmbedProps, SearchBarViewConfig {
|
|
|
73
73
|
* }
|
|
74
74
|
* ```
|
|
75
75
|
*/
|
|
76
|
-
export const SearchBarEmbed: React.ForwardRefExoticComponent<SearchBarEmbedProps & React.RefAttributes<
|
|
76
|
+
export const SearchBarEmbed: React.ForwardRefExoticComponent<SearchBarEmbedProps & React.RefAttributes<_SearchBarEmbed>>;
|
|
77
77
|
/**
|
|
78
78
|
* Get a reference to the embed component to trigger events on the component.
|
|
79
79
|
*
|
|
@@ -91,7 +91,7 @@ export const SearchBarEmbed: React.ForwardRefExoticComponent<SearchBarEmbedProps
|
|
|
91
91
|
* ```
|
|
92
92
|
* @returns {React.MutableRefObject<TsEmbed>} ref
|
|
93
93
|
*/
|
|
94
|
-
export const useEmbedRef: () => React.MutableRefObject<
|
|
94
|
+
export const useEmbedRef: <T extends TsEmbed>() => React.MutableRefObject<T>;
|
|
95
95
|
|
|
96
96
|
/**
|
|
97
97
|
* Copyright (c) 2023
|
|
@@ -799,6 +799,7 @@ export interface exportTMLInput {
|
|
|
799
799
|
export_fqn?: boolean;
|
|
800
800
|
edoc_format?: 'YAML' | 'JSON';
|
|
801
801
|
}
|
|
802
|
+
export declare let authPromise: Promise<boolean>;
|
|
802
803
|
/**
|
|
803
804
|
* Gets the configuration embed was initialized with.
|
|
804
805
|
*
|
package/lib/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thoughtspot/visual-embed-sdk",
|
|
3
|
-
"version": "1.21.0-react.
|
|
3
|
+
"version": "1.21.0-react.6",
|
|
4
4
|
"description": "ThoughtSpot Embed SDK",
|
|
5
5
|
"module": "lib/src/index.js",
|
|
6
6
|
"main": "dist/tsembed.js",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"exports": {
|
|
15
15
|
".": {
|
|
16
16
|
"import": "./lib/src/index.js",
|
|
17
|
-
"require": "./
|
|
17
|
+
"require": "./cjs/src/index.js",
|
|
18
18
|
"types": "./lib/src/index.d.ts"
|
|
19
19
|
},
|
|
20
20
|
"./react": {
|
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;AAUjB,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,eAAO,IAAI,WAAW,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;AACzC;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,QAAO,WAAqB,CAAC;AAExD,eAAO,MAAM,cAAc,QAAO,QAAQ,OAAO,CAAgB,CAAC;AAElE,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"}
|