@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/cjs/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/cjs/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,E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|
3
|
-
exports.reset = exports.exportTML = exports.executeTML = exports.renderInQueue = exports.logout = exports.disableAutoLogin = exports.init = exports.prefetch = exports.handleAuth = exports.notifyLogout = exports.notifyAuthSuccess = exports.notifyAuthSDKSuccess = exports.notifyAuthFailure = exports.getAuthPromise = exports.getEmbedConfig = void 0;
|
|
3
|
+
exports.reset = exports.exportTML = exports.executeTML = exports.renderInQueue = exports.logout = exports.disableAutoLogin = exports.init = exports.prefetch = exports.handleAuth = exports.notifyLogout = exports.notifyAuthSuccess = exports.notifyAuthSDKSuccess = exports.notifyAuthFailure = exports.getAuthPromise = exports.getEmbedConfig = exports.authPromise = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
/* eslint-disable camelcase */
|
|
6
6
|
/* eslint-disable import/no-mutable-exports */
|
|
@@ -22,7 +22,7 @@ Object.defineProperty(exports, "notifyAuthSDKSuccess", { enumerable: true, get:
|
|
|
22
22
|
Object.defineProperty(exports, "notifyAuthSuccess", { enumerable: true, get: function () { return auth_1.notifyAuthSuccess; } });
|
|
23
23
|
Object.defineProperty(exports, "notifyLogout", { enumerable: true, get: function () { return auth_1.notifyLogout; } });
|
|
24
24
|
const mixpanel_service_1 = require("../mixpanel-service");
|
|
25
|
-
|
|
25
|
+
let config = {};
|
|
26
26
|
const CONFIG_DEFAULTS = {
|
|
27
27
|
loginFailedMessage: 'Not logged in',
|
|
28
28
|
authTriggerText: 'Authorize',
|
|
@@ -35,16 +35,16 @@ const CONFIG_DEFAULTS = {
|
|
|
35
35
|
* @version SDK: 1.19.0 | ThoughtSpot: *
|
|
36
36
|
* @group Global methods
|
|
37
37
|
*/
|
|
38
|
-
const getEmbedConfig = () =>
|
|
38
|
+
const getEmbedConfig = () => config;
|
|
39
39
|
exports.getEmbedConfig = getEmbedConfig;
|
|
40
|
-
const getAuthPromise = () =>
|
|
40
|
+
const getAuthPromise = () => exports.authPromise;
|
|
41
41
|
exports.getAuthPromise = getAuthPromise;
|
|
42
42
|
/**
|
|
43
43
|
* Perform authentication on the ThoughtSpot app as applicable.
|
|
44
44
|
*/
|
|
45
45
|
const handleAuth = () => {
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
exports.authPromise = (0, auth_1.authenticate)(config);
|
|
47
|
+
exports.authPromise.then((isLoggedIn) => {
|
|
48
48
|
if (!isLoggedIn) {
|
|
49
49
|
(0, auth_1.notifyAuthFailure)(auth_1.AuthFailureType.SDK);
|
|
50
50
|
}
|
|
@@ -54,7 +54,7 @@ const handleAuth = () => {
|
|
|
54
54
|
}, () => {
|
|
55
55
|
(0, auth_1.notifyAuthFailure)(auth_1.AuthFailureType.SDK);
|
|
56
56
|
});
|
|
57
|
-
return
|
|
57
|
+
return exports.authPromise;
|
|
58
58
|
};
|
|
59
59
|
exports.handleAuth = handleAuth;
|
|
60
60
|
const hostUrlToFeatureUrl = {
|
|
@@ -80,7 +80,7 @@ const prefetch = (url, prefetchFeatures) => {
|
|
|
80
80
|
}
|
|
81
81
|
else {
|
|
82
82
|
const features = prefetchFeatures || [types_1.PrefetchFeatures.FullApp];
|
|
83
|
-
let hostUrl = url ||
|
|
83
|
+
let hostUrl = url || config.thoughtSpotHost;
|
|
84
84
|
hostUrl = hostUrl[hostUrl.length - 1] === '/' ? hostUrl : `${hostUrl}/`;
|
|
85
85
|
(0, uniq_1.default)(features.map((feature) => hostUrlToFeatureUrl[feature](hostUrl))).forEach((prefetchUrl, index) => {
|
|
86
86
|
const iFrame = document.createElement('iframe');
|
|
@@ -147,26 +147,26 @@ function backwardCompat(embedConfig) {
|
|
|
147
147
|
const init = (embedConfig) => {
|
|
148
148
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
149
149
|
sanity(embedConfig);
|
|
150
|
-
|
|
150
|
+
config = {
|
|
151
151
|
...CONFIG_DEFAULTS,
|
|
152
152
|
...embedConfig,
|
|
153
153
|
thoughtSpotHost: (0, config_1.getThoughtSpotHost)(embedConfig),
|
|
154
154
|
};
|
|
155
|
-
|
|
155
|
+
config = backwardCompat(config);
|
|
156
156
|
const authEE = new eventemitter3_1.default();
|
|
157
157
|
(0, auth_1.setAuthEE)(authEE);
|
|
158
158
|
(0, exports.handleAuth)();
|
|
159
159
|
(0, mixpanel_service_1.uploadMixpanelEvent)(mixpanel_service_1.MIXPANEL_EVENT.VISUAL_SDK_CALLED_INIT, {
|
|
160
|
-
authType:
|
|
161
|
-
host:
|
|
160
|
+
authType: config.authType,
|
|
161
|
+
host: config.thoughtSpotHost,
|
|
162
162
|
usedCustomizationSheet: ((_b = (_a = embedConfig.customizations) === null || _a === void 0 ? void 0 : _a.style) === null || _b === void 0 ? void 0 : _b.customCSSUrl) != null,
|
|
163
163
|
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,
|
|
164
164
|
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,
|
|
165
165
|
usedCustomizationStrings: !!((_k = (_j = embedConfig.customizations) === null || _j === void 0 ? void 0 : _j.content) === null || _k === void 0 ? void 0 : _k.strings),
|
|
166
166
|
usedCustomizationIconSprite: !!((_l = embedConfig.customizations) === null || _l === void 0 ? void 0 : _l.iconSpriteUrl),
|
|
167
167
|
});
|
|
168
|
-
if (
|
|
169
|
-
(0, exports.prefetch)(
|
|
168
|
+
if (config.callPrefetch) {
|
|
169
|
+
(0, exports.prefetch)(config.thoughtSpotHost);
|
|
170
170
|
}
|
|
171
171
|
return authEE;
|
|
172
172
|
};
|
|
@@ -175,7 +175,7 @@ exports.init = init;
|
|
|
175
175
|
*
|
|
176
176
|
*/
|
|
177
177
|
function disableAutoLogin() {
|
|
178
|
-
|
|
178
|
+
config.autoLogin = false;
|
|
179
179
|
}
|
|
180
180
|
exports.disableAutoLogin = disableAutoLogin;
|
|
181
181
|
/**
|
|
@@ -194,7 +194,7 @@ const logout = (doNotDisableAutoLogin = false) => {
|
|
|
194
194
|
if (!doNotDisableAutoLogin) {
|
|
195
195
|
disableAutoLogin();
|
|
196
196
|
}
|
|
197
|
-
return (0, auth_1.logout)(
|
|
197
|
+
return (0, auth_1.logout)(config).then((isLoggedIn) => {
|
|
198
198
|
(0, auth_1.notifyLogout)();
|
|
199
199
|
return isLoggedIn;
|
|
200
200
|
});
|
|
@@ -208,7 +208,7 @@ let renderQueue = Promise.resolve();
|
|
|
208
208
|
* @param fn The function being registered
|
|
209
209
|
*/
|
|
210
210
|
const renderInQueue = (fn) => {
|
|
211
|
-
const { queueMultiRenders = false } =
|
|
211
|
+
const { queueMultiRenders = false } = config;
|
|
212
212
|
if (queueMultiRenders) {
|
|
213
213
|
renderQueue = renderQueue.then(() => new Promise((res) => fn(res)));
|
|
214
214
|
return renderQueue;
|
|
@@ -218,16 +218,16 @@ const renderInQueue = (fn) => {
|
|
|
218
218
|
};
|
|
219
219
|
exports.renderInQueue = renderInQueue;
|
|
220
220
|
const executeTML = async (data) => {
|
|
221
|
-
const { thoughtSpotHost, authType } =
|
|
221
|
+
const { thoughtSpotHost, authType } = config;
|
|
222
222
|
try {
|
|
223
|
-
sanity(
|
|
223
|
+
sanity(config);
|
|
224
224
|
}
|
|
225
225
|
catch (err) {
|
|
226
226
|
return Promise.reject(err);
|
|
227
227
|
}
|
|
228
228
|
let authToken = '';
|
|
229
229
|
if (authType === types_1.AuthType.TrustedAuthTokenCookieless) {
|
|
230
|
-
authToken = await (0, auth_1.getAuthenticaionToken)(
|
|
230
|
+
authToken = await (0, auth_1.getAuthenticaionToken)(config);
|
|
231
231
|
}
|
|
232
232
|
const headers = {
|
|
233
233
|
'Content-Type': 'application/json',
|
|
@@ -259,9 +259,9 @@ const executeTML = async (data) => {
|
|
|
259
259
|
};
|
|
260
260
|
exports.executeTML = executeTML;
|
|
261
261
|
const exportTML = async (data) => {
|
|
262
|
-
const { thoughtSpotHost, authType } =
|
|
262
|
+
const { thoughtSpotHost, authType } = config;
|
|
263
263
|
try {
|
|
264
|
-
sanity(
|
|
264
|
+
sanity(config);
|
|
265
265
|
}
|
|
266
266
|
catch (err) {
|
|
267
267
|
return Promise.reject(err);
|
|
@@ -274,7 +274,7 @@ const exportTML = async (data) => {
|
|
|
274
274
|
};
|
|
275
275
|
let authToken = '';
|
|
276
276
|
if (authType === types_1.AuthType.TrustedAuthTokenCookieless) {
|
|
277
|
-
authToken = await (0, auth_1.getAuthenticaionToken)(
|
|
277
|
+
authToken = await (0, auth_1.getAuthenticaionToken)(config);
|
|
278
278
|
}
|
|
279
279
|
const headers = {
|
|
280
280
|
'Content-Type': 'application/json',
|
|
@@ -305,9 +305,9 @@ exports.exportTML = exportTML;
|
|
|
305
305
|
*
|
|
306
306
|
*/
|
|
307
307
|
function reset() {
|
|
308
|
-
|
|
308
|
+
config = {};
|
|
309
309
|
(0, auth_1.setAuthEE)(null);
|
|
310
|
-
|
|
310
|
+
exports.authPromise = null;
|
|
311
311
|
}
|
|
312
312
|
exports.reset = reset;
|
|
313
313
|
//# sourceMappingURL=base.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.js","sourceRoot":"","sources":["../../../src/embed/base.ts"],"names":[],"mappings":";;;;AAAA,8BAA8B;AAC9B,8CAA8C;AAC9C;;;;;;;GAOG;AACH,0EAAyC;AACzC,+DAA+B;AAC/B,sCAA+C;AAC/C,oCAAmE;AACnE,kCAciB;AAuCb,kGA/CA,wBAAiB,OA+CA;AAAE,qGA9CnB,2BAAoB,OA8CmB;AAAE,kGA7CzC,wBAAiB,OA6CyC;AAAE,6FA5C5D,mBAAY,OA4C4D;AAtC5E,0DAA0E;
|
|
1
|
+
{"version":3,"file":"base.js","sourceRoot":"","sources":["../../../src/embed/base.ts"],"names":[],"mappings":";;;;AAAA,8BAA8B;AAC9B,8CAA8C;AAC9C;;;;;;;GAO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"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS;;CAErB,CAAC;AAEF,eAAO,MAAM,cAAc;;;;;;;;CAQ1B,CAAC;AAKF;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,KAAK,GAAG,IAAI,CAM1E;AAeD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,WAAW,EAAE,GAAG,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"mixpanel-service.d.ts","sourceRoot":"","sources":["../../src/mixpanel-service.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS;;CAErB,CAAC;AAEF,eAAO,MAAM,cAAc;;;;;;;;CAQ1B,CAAC;AAKF;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,KAAK,GAAG,IAAI,CAM1E;AAeD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,WAAW,EAAE,GAAG,GAAG,IAAI,CA8BnD;AAED;;GAEG;AACH,wBAAgB,iBAAiB,SAGhC"}
|
|
@@ -60,8 +60,16 @@ function initMixpanel(sessionInfo) {
|
|
|
60
60
|
mixpanel.init(token);
|
|
61
61
|
if (!isPublicCluster) {
|
|
62
62
|
// Needed to avoid error in CJS builds on some bundlers.
|
|
63
|
-
const mixpanelIdentify = mixpanel.identify
|
|
64
|
-
|
|
63
|
+
const { mixpanelLib, mixpanelIdentify } = (mixpanel.identify)
|
|
64
|
+
? {
|
|
65
|
+
mixpanelLib: mixpanel,
|
|
66
|
+
mixpanelIdentify: mixpanel.identify
|
|
67
|
+
}
|
|
68
|
+
: {
|
|
69
|
+
mixpanelLib: mixpanel.default,
|
|
70
|
+
mixpanelIdentify: mixpanel.default.identify
|
|
71
|
+
};
|
|
72
|
+
mixpanelIdentify.call(mixpanelLib, sessionInfo.userGUID);
|
|
65
73
|
}
|
|
66
74
|
isMixpanelInitialized = true;
|
|
67
75
|
emptyQueue();
|
|
@@ -1 +1 @@
|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React.ForwardRefExoticComponent<SearchProps & React.RefAttributes<
|
|
23
|
+
export declare const SearchEmbed: React.ForwardRefExoticComponent<SearchProps & React.RefAttributes<_SearchEmbed>>;
|
|
24
24
|
interface AppProps extends EmbedProps, AppViewConfig {
|
|
25
25
|
}
|
|
26
26
|
/**
|
|
@@ -37,7 +37,7 @@ interface AppProps extends EmbedProps, AppViewConfig {
|
|
|
37
37
|
* }
|
|
38
38
|
* ```
|
|
39
39
|
*/
|
|
40
|
-
export declare const AppEmbed: React.ForwardRefExoticComponent<AppProps & React.RefAttributes<
|
|
40
|
+
export declare const AppEmbed: React.ForwardRefExoticComponent<AppProps & React.RefAttributes<_AppEmbed>>;
|
|
41
41
|
interface LiveboardProps extends EmbedProps, LiveboardViewConfig {
|
|
42
42
|
}
|
|
43
43
|
/**
|
|
@@ -55,8 +55,8 @@ interface LiveboardProps extends EmbedProps, LiveboardViewConfig {
|
|
|
55
55
|
* }
|
|
56
56
|
* ```
|
|
57
57
|
*/
|
|
58
|
-
export declare const LiveboardEmbed: React.ForwardRefExoticComponent<LiveboardProps & React.RefAttributes<
|
|
59
|
-
export declare const PinboardEmbed: React.ForwardRefExoticComponent<LiveboardProps & React.RefAttributes<
|
|
58
|
+
export declare const LiveboardEmbed: React.ForwardRefExoticComponent<LiveboardProps & React.RefAttributes<_LiveboardEmbed>>;
|
|
59
|
+
export declare const PinboardEmbed: React.ForwardRefExoticComponent<LiveboardProps & React.RefAttributes<_LiveboardEmbed>>;
|
|
60
60
|
interface SearchBarEmbedProps extends EmbedProps, SearchBarViewConfig {
|
|
61
61
|
}
|
|
62
62
|
/**
|
|
@@ -72,7 +72,7 @@ interface SearchBarEmbedProps extends EmbedProps, SearchBarViewConfig {
|
|
|
72
72
|
* }
|
|
73
73
|
* ```
|
|
74
74
|
*/
|
|
75
|
-
export declare const SearchBarEmbed: React.ForwardRefExoticComponent<SearchBarEmbedProps & React.RefAttributes<
|
|
75
|
+
export declare const SearchBarEmbed: React.ForwardRefExoticComponent<SearchBarEmbedProps & React.RefAttributes<_SearchBarEmbed>>;
|
|
76
76
|
/**
|
|
77
77
|
* Get a reference to the embed component to trigger events on the component.
|
|
78
78
|
*
|
|
@@ -90,6 +90,6 @@ export declare const SearchBarEmbed: React.ForwardRefExoticComponent<SearchBarEm
|
|
|
90
90
|
* ```
|
|
91
91
|
* @returns {React.MutableRefObject<TsEmbed>} ref
|
|
92
92
|
*/
|
|
93
|
-
export declare const useEmbedRef: () => React.MutableRefObject<
|
|
93
|
+
export declare const useEmbedRef: <T extends TsEmbed>() => React.MutableRefObject<T>;
|
|
94
94
|
export { LiveboardViewConfig, SearchViewConfig, AppViewConfig, Page, RuntimeFilter, RuntimeFilterOp, EmbedEvent, HostEvent, Action, FrameParams, } from '../index';
|
|
95
95
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,cAAc,IAAI,eAAe,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC7F,OAAO,EAAE,WAAW,IAAI,YAAY,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAChF,OAAO,EAAE,QAAQ,IAAI,SAAS,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AACpE,OAAO,EAAE,cAAc,IAAI,eAAe,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC5F,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAG5C,OAAO,EAAE,UAAU,EAA4B,MAAM,QAAQ,CAAC;AA2D9D,UAAU,WAAY,SAAQ,UAAU,EAAE,gBAAgB;CAAG;AAE7D;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/index.tsx"],"names":[],"m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","sourceRoot":"","sources":["../../../src/react/index.tsx"],"names":[],"mappings":";;;;AAAA,0DAA0B;AAC1B,8FAA2D;AAC3D,oCAAqC;AACrC,oDAA6F;AAC7F,4CAAgF;AAChF,sCAAoE;AACpE,kDAA4F;AAI5F,iCAA8D;AAE9D,MAAM,gBAAgB,GAAG,CACrB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/react/index.tsx"],"names":[],"mappings":";;;;AAAA,0DAA0B;AAC1B,8FAA2D;AAC3D,oCAAqC;AACrC,oDAA6F;AAC7F,4CAAgF;AAChF,sCAAoE;AACpE,kDAA4F;AAI5F,iCAA8D;AAE9D,MAAM,gBAAgB,GAAG,CACrB,gBAA4C,EAC9C,EAAE,CAAC,eAAK,CAAC,UAAU,CACjB,CAAC,KAAQ,EAAE,YAAuC,EAAE,EAAE;IAClD,MAAM,GAAG,GAAG,eAAK,CAAC,MAAM,CAAiB,IAAI,CAAC,CAAC;IAC/C,MAAM,EAAE,SAAS,EAAE,GAAG,UAAU,EAAE,GAAG,KAAK,CAAC;IAC3C,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,GAAG,IAAA,+BAAwB,EAGpD,UAAU,CAAC,CAAC;IAClB,IAAA,iCAAoB,EAAC,GAAG,EAAE;QACtB,MAAM,OAAO,GAAY,IAAI,gBAAgB,CACrC,GAAI,CAAC,OAAO,EACZ,IAAA,iBAAS,EACL;YACI,eAAe,EAAE,UAAU,CAAC,eAAe;YAC3C,WAAW,EAAE;gBACT,KAAK,EAAE,UAAU,CAAC,eAAe;oBAC7B,CAAC,CAAC,SAAS,IAAI,EAAE;oBACjB,CAAC,CAAC,EAAE;aACX;SACJ,EACD,UAAU,CACb,CACR,CAAC;QACF,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,CAAC,SAAS,EAAE,EAAE;YACzC,OAAO,CAAC,EAAE,CACF,SAAuB,EACvB,SAAS,CAAC,SAAuB,CAAC,CACzC,CAAC;Q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CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["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":["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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mixpanel-service.d.ts","sourceRoot":"","sources":["mixpanel-service.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS;;CAErB,CAAC;AAEF,eAAO,MAAM,cAAc;;;;;;;;CAQ1B,CAAC;AAKF;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,KAAK,GAAG,IAAI,CAM1E;AAeD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,WAAW,EAAE,GAAG,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"mixpanel-service.d.ts","sourceRoot":"","sources":["mixpanel-service.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS;;CAErB,CAAC;AAEF,eAAO,MAAM,cAAc;;;;;;;;CAQ1B,CAAC;AAKF;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,KAAK,GAAG,IAAI,CAM1E;AAeD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,WAAW,EAAE,GAAG,GAAG,IAAI,CA8BnD;AAED;;GAEG;AACH,wBAAgB,iBAAiB,SAGhC"}
|
|
@@ -20,7 +20,7 @@ interface SearchProps extends EmbedProps, SearchViewConfig {
|
|
|
20
20
|
* }
|
|
21
21
|
* ```
|
|
22
22
|
*/
|
|
23
|
-
export declare const SearchEmbed: React.ForwardRefExoticComponent<SearchProps & React.RefAttributes<
|
|
23
|
+
export declare const SearchEmbed: React.ForwardRefExoticComponent<SearchProps & React.RefAttributes<_SearchEmbed>>;
|
|
24
24
|
interface AppProps extends EmbedProps, AppViewConfig {
|
|
25
25
|
}
|
|
26
26
|
/**
|
|
@@ -37,7 +37,7 @@ interface AppProps extends EmbedProps, AppViewConfig {
|
|
|
37
37
|
* }
|
|
38
38
|
* ```
|
|
39
39
|
*/
|
|
40
|
-
export declare const AppEmbed: React.ForwardRefExoticComponent<AppProps & React.RefAttributes<
|
|
40
|
+
export declare const AppEmbed: React.ForwardRefExoticComponent<AppProps & React.RefAttributes<_AppEmbed>>;
|
|
41
41
|
interface LiveboardProps extends EmbedProps, LiveboardViewConfig {
|
|
42
42
|
}
|
|
43
43
|
/**
|
|
@@ -55,8 +55,8 @@ interface LiveboardProps extends EmbedProps, LiveboardViewConfig {
|
|
|
55
55
|
* }
|
|
56
56
|
* ```
|
|
57
57
|
*/
|
|
58
|
-
export declare const LiveboardEmbed: React.ForwardRefExoticComponent<LiveboardProps & React.RefAttributes<
|
|
59
|
-
export declare const PinboardEmbed: React.ForwardRefExoticComponent<LiveboardProps & React.RefAttributes<
|
|
58
|
+
export declare const LiveboardEmbed: React.ForwardRefExoticComponent<LiveboardProps & React.RefAttributes<_LiveboardEmbed>>;
|
|
59
|
+
export declare const PinboardEmbed: React.ForwardRefExoticComponent<LiveboardProps & React.RefAttributes<_LiveboardEmbed>>;
|
|
60
60
|
interface SearchBarEmbedProps extends EmbedProps, SearchBarViewConfig {
|
|
61
61
|
}
|
|
62
62
|
/**
|
|
@@ -72,7 +72,7 @@ interface SearchBarEmbedProps extends EmbedProps, SearchBarViewConfig {
|
|
|
72
72
|
* }
|
|
73
73
|
* ```
|
|
74
74
|
*/
|
|
75
|
-
export declare const SearchBarEmbed: React.ForwardRefExoticComponent<SearchBarEmbedProps & React.RefAttributes<
|
|
75
|
+
export declare const SearchBarEmbed: React.ForwardRefExoticComponent<SearchBarEmbedProps & React.RefAttributes<_SearchBarEmbed>>;
|
|
76
76
|
/**
|
|
77
77
|
* Get a reference to the embed component to trigger events on the component.
|
|
78
78
|
*
|
|
@@ -90,6 +90,6 @@ export declare const SearchBarEmbed: React.ForwardRefExoticComponent<SearchBarEm
|
|
|
90
90
|
* ```
|
|
91
91
|
* @returns {React.MutableRefObject<TsEmbed>} ref
|
|
92
92
|
*/
|
|
93
|
-
export declare const useEmbedRef: () => React.MutableRefObject<
|
|
93
|
+
export declare const useEmbedRef: <T extends TsEmbed>() => React.MutableRefObject<T>;
|
|
94
94
|
export { LiveboardViewConfig, SearchViewConfig, AppViewConfig, Page, RuntimeFilter, RuntimeFilterOp, EmbedEvent, HostEvent, Action, FrameParams, } from '../index';
|
|
95
95
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,cAAc,IAAI,eAAe,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC7F,OAAO,EAAE,WAAW,IAAI,YAAY,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAChF,OAAO,EAAE,QAAQ,IAAI,SAAS,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AACpE,O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;CAAG;AAExE;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,cAAc,6FAIT,CAAC;AAEnB;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,WAAW,oDAA6E,CAAC;AAEtG,OAAO,EACH,mBAAmB,EACnB,gBAAgB,EAChB,aAAa,EACb,IAAI,EACJ,aAAa,EACb,eAAe,EACf,UAAU,EACV,SAAS,EACT,MAAM,EACN,WAAW,GACd,MAAM,UAAU,CAAC"}
|
package/dist/tsembed-react.es.js
CHANGED
|
@@ -7997,8 +7997,16 @@ function initMixpanel(sessionInfo) {
|
|
|
7997
7997
|
mixpanel_cjs.init(token);
|
|
7998
7998
|
if (!isPublicCluster) {
|
|
7999
7999
|
// Needed to avoid error in CJS builds on some bundlers.
|
|
8000
|
-
const mixpanelIdentify = mixpanel_cjs.identify
|
|
8001
|
-
|
|
8000
|
+
const { mixpanelLib, mixpanelIdentify } = (mixpanel_cjs.identify)
|
|
8001
|
+
? {
|
|
8002
|
+
mixpanelLib: mixpanel$1,
|
|
8003
|
+
mixpanelIdentify: mixpanel_cjs.identify
|
|
8004
|
+
}
|
|
8005
|
+
: {
|
|
8006
|
+
mixpanelLib: mixpanel_cjs,
|
|
8007
|
+
mixpanelIdentify: mixpanel_cjs.identify
|
|
8008
|
+
};
|
|
8009
|
+
mixpanelIdentify.call(mixpanelLib, sessionInfo.userGUID);
|
|
8002
8010
|
}
|
|
8003
8011
|
isMixpanelInitialized = true;
|
|
8004
8012
|
emptyQueue();
|
|
@@ -26392,12 +26400,13 @@ const authenticate = async (embedConfig) => {
|
|
|
26392
26400
|
};
|
|
26393
26401
|
|
|
26394
26402
|
/* eslint-disable camelcase */
|
|
26395
|
-
|
|
26403
|
+
let config = {};
|
|
26396
26404
|
const CONFIG_DEFAULTS = {
|
|
26397
26405
|
loginFailedMessage: 'Not logged in',
|
|
26398
26406
|
authTriggerText: 'Authorize',
|
|
26399
26407
|
authType: AuthType.None,
|
|
26400
26408
|
};
|
|
26409
|
+
let authPromise;
|
|
26401
26410
|
/**
|
|
26402
26411
|
* Gets the configuration embed was initialized with.
|
|
26403
26412
|
*
|
|
@@ -26405,14 +26414,14 @@ const CONFIG_DEFAULTS = {
|
|
|
26405
26414
|
* @version SDK: 1.19.0 | ThoughtSpot: *
|
|
26406
26415
|
* @group Global methods
|
|
26407
26416
|
*/
|
|
26408
|
-
const getEmbedConfig = () =>
|
|
26409
|
-
const getAuthPromise = () =>
|
|
26417
|
+
const getEmbedConfig = () => config;
|
|
26418
|
+
const getAuthPromise = () => authPromise;
|
|
26410
26419
|
/**
|
|
26411
26420
|
* Perform authentication on the ThoughtSpot app as applicable.
|
|
26412
26421
|
*/
|
|
26413
26422
|
const handleAuth = () => {
|
|
26414
|
-
|
|
26415
|
-
|
|
26423
|
+
authPromise = authenticate(config);
|
|
26424
|
+
authPromise.then((isLoggedIn) => {
|
|
26416
26425
|
if (!isLoggedIn) {
|
|
26417
26426
|
notifyAuthFailure(AuthFailureType.SDK);
|
|
26418
26427
|
}
|
|
@@ -26422,7 +26431,7 @@ const handleAuth = () => {
|
|
|
26422
26431
|
}, () => {
|
|
26423
26432
|
notifyAuthFailure(AuthFailureType.SDK);
|
|
26424
26433
|
});
|
|
26425
|
-
return
|
|
26434
|
+
return authPromise;
|
|
26426
26435
|
};
|
|
26427
26436
|
const hostUrlToFeatureUrl = {
|
|
26428
26437
|
[PrefetchFeatures.SearchEmbed]: (url) => `${url}v2/#/embed/answer`,
|
|
@@ -26434,7 +26443,7 @@ const hostUrlToFeatureUrl = {
|
|
|
26434
26443
|
*
|
|
26435
26444
|
*/
|
|
26436
26445
|
function disableAutoLogin() {
|
|
26437
|
-
|
|
26446
|
+
config.autoLogin = false;
|
|
26438
26447
|
}
|
|
26439
26448
|
let renderQueue = Promise.resolve();
|
|
26440
26449
|
/**
|
|
@@ -26444,7 +26453,7 @@ let renderQueue = Promise.resolve();
|
|
|
26444
26453
|
* @param fn The function being registered
|
|
26445
26454
|
*/
|
|
26446
26455
|
const renderInQueue = (fn) => {
|
|
26447
|
-
const { queueMultiRenders = false } =
|
|
26456
|
+
const { queueMultiRenders = false } = config;
|
|
26448
26457
|
if (queueMultiRenders) {
|
|
26449
26458
|
renderQueue = renderQueue.then(() => new Promise((res) => fn(res)));
|
|
26450
26459
|
return renderQueue;
|
|
@@ -26667,7 +26676,7 @@ function processTrigger(iFrame, messageType, thoughtSpotHost, data) {
|
|
|
26667
26676
|
});
|
|
26668
26677
|
}
|
|
26669
26678
|
|
|
26670
|
-
var name="@thoughtspot/visual-embed-sdk";var version="1.21.0-react.
|
|
26679
|
+
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};
|
|
26671
26680
|
|
|
26672
26681
|
/**
|
|
26673
26682
|
* Copyright (c) 2022
|