@thoughtspot/visual-embed-sdk 1.21.0-react.6 → 1.21.0-react.8
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 +6 -1
- package/cjs/src/mixpanel-service.d.ts.map +1 -1
- package/cjs/src/mixpanel-service.js +14 -12
- package/cjs/src/mixpanel-service.js.map +1 -1
- package/dist/src/mixpanel-service.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +15 -13
- package/dist/tsembed-react.js +15 -13
- package/dist/tsembed.es.js +15 -13
- package/dist/tsembed.js +15 -13
- package/lib/package.json +6 -1
- package/lib/src/mixpanel-service.d.ts.map +1 -1
- package/lib/src/mixpanel-service.js +14 -12
- package/lib/src/mixpanel-service.js.map +1 -1
- package/package.json +6 -1
- package/src/mixpanel-service.ts +15 -12
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.8",
|
|
4
4
|
"description": "ThoughtSpot Embed SDK",
|
|
5
5
|
"module": "lib/src/index.js",
|
|
6
6
|
"main": "dist/tsembed.js",
|
|
@@ -21,6 +21,11 @@
|
|
|
21
21
|
"import": "./lib/src/react/all-types-export.js",
|
|
22
22
|
"require": "./cjs/src/react/all-types-export.js",
|
|
23
23
|
"types": "./lib/src/react/all-types-export.d.ts"
|
|
24
|
+
},
|
|
25
|
+
"./lib/src/react": {
|
|
26
|
+
"import": "./lib/src/react/all-types-export.js",
|
|
27
|
+
"require": "./cjs/src/react/all-types-export.js",
|
|
28
|
+
"types": "./lib/src/react/all-types-export.d.ts"
|
|
24
29
|
}
|
|
25
30
|
},
|
|
26
31
|
"typesVersions": {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mixpanel-service.d.ts","sourceRoot":"","sources":["../../src/mixpanel-service.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS;;CAErB,CAAC;
|
|
1
|
+
{"version":3,"file":"mixpanel-service.d.ts","sourceRoot":"","sources":["../../src/mixpanel-service.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS;;CAErB,CAAC;AAIF,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,CA+BnD;AAED;;GAEG;AACH,wBAAgB,iBAAiB,SAGhC"}
|
|
@@ -6,6 +6,7 @@ const mixpanel = tslib_1.__importStar(require("mixpanel-browser"));
|
|
|
6
6
|
exports.EndPoints = {
|
|
7
7
|
CONFIG: '/callosum/v1/system/config',
|
|
8
8
|
};
|
|
9
|
+
const mixpanelLib = mixpanel.default || mixpanel;
|
|
9
10
|
exports.MIXPANEL_EVENT = {
|
|
10
11
|
VISUAL_SDK_RENDER_START: 'visual-sdk-render-start',
|
|
11
12
|
VISUAL_SDK_CALLED_INIT: 'visual-sdk-called-init',
|
|
@@ -28,7 +29,7 @@ function uploadMixpanelEvent(eventId, eventProps = {}) {
|
|
|
28
29
|
eventQueue.push({ eventId, eventProps });
|
|
29
30
|
return;
|
|
30
31
|
}
|
|
31
|
-
|
|
32
|
+
mixpanelLib.track(eventId, eventProps);
|
|
32
33
|
}
|
|
33
34
|
exports.uploadMixpanelEvent = uploadMixpanelEvent;
|
|
34
35
|
/**
|
|
@@ -57,19 +58,20 @@ function initMixpanel(sessionInfo) {
|
|
|
57
58
|
const token = sessionInfo.mixpanelToken;
|
|
58
59
|
try {
|
|
59
60
|
if (token) {
|
|
60
|
-
|
|
61
|
+
mixpanelLib.init(token);
|
|
61
62
|
if (!isPublicCluster) {
|
|
62
63
|
// Needed to avoid error in CJS builds on some bundlers.
|
|
63
|
-
const
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
mixpanelIdentify.call(mixpanelLib, sessionInfo.userGUID);
|
|
64
|
+
// const { mixpanelLib, mixpanelIdentify } = (mixpanel.identify)
|
|
65
|
+
// ? {
|
|
66
|
+
// mixpanelLib: mixpanel,
|
|
67
|
+
// mixpanelIdentify: mixpanel.identify
|
|
68
|
+
// }
|
|
69
|
+
// : {
|
|
70
|
+
// mixpanelLib: mixpanel.default,
|
|
71
|
+
// mixpanelIdentify: mixpanel.default.identify
|
|
72
|
+
// };
|
|
73
|
+
// mixpanelIdentify.call(mixpanelLib, sessionInfo.userGUID);
|
|
74
|
+
mixpanelLib.identify(sessionInfo.userGUID);
|
|
73
75
|
}
|
|
74
76
|
isMixpanelInitialized = true;
|
|
75
77
|
emptyQueue();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mixpanel-service.js","sourceRoot":"","sources":["../../src/mixpanel-service.ts"],"names":[],"mappings":";;;;AAAA,mEAA6C;AAEhC,QAAA,SAAS,GAAG;IACrB,MAAM,EAAE,4BAA4B;CACvC,CAAC;
|
|
1
|
+
{"version":3,"file":"mixpanel-service.js","sourceRoot":"","sources":["../../src/mixpanel-service.ts"],"names":[],"mappings":";;;;AAAA,mEAA6C;AAEhC,QAAA,SAAS,GAAG;IACrB,MAAM,EAAE,4BAA4B;CACvC,CAAC;AAEF,MAAM,WAAW,GAAG,QAAQ,CAAC,OAAO,IAAI,QAAQ,CAAC;AAEpC,QAAA,cAAc,GAAG;IAC1B,uBAAuB,EAAE,yBAAyB;IAClD,sBAAsB,EAAE,wBAAwB;IAChD,0BAA0B,EAAE,4BAA4B;IACxD,wBAAwB,EAAE,0BAA0B;IACpD,kBAAkB,EAAE,oBAAoB;IACxC,aAAa,EAAE,eAAe;IAC9B,kCAAkC,EAAE,oCAAoC;CAC3E,CAAC;AAEF,IAAI,qBAAqB,GAAG,KAAK,CAAC;AAClC,IAAI,UAAU,GAA2C,EAAE,CAAC;AAE5D;;;;;GAKG;AACH,SAAgB,mBAAmB,CAAC,OAAe,EAAE,UAAU,GAAG,EAAE;IAChE,IAAI,CAAC,qBAAqB,EAAE;QACxB,UAAU,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC,CAAC;QACzC,OAAO;KACV;IACD,WAAW,CAAC,KAAK,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;AAC3C,CAAC;AAND,kDAMC;AAED;;GAEG;AACH,SAAS,UAAU;IACf,IAAI,CAAC,qBAAqB,EAAE;QACxB,OAAO;KACV;IACD,UAAU,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;QACzB,mBAAmB,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;IACzD,CAAC,CAAC,CAAC;IACH,UAAU,GAAG,EAAE,CAAC;AACpB,CAAC;AAED;;;GAGG;AACH,SAAgB,YAAY,CAAC,WAAgB;IACzC,IAAI,CAAC,WAAW,IAAI,CAAC,WAAW,CAAC,aAAa,EAAE;QAC5C,OAAO;KACV;IACD,0EAA0E;IAC1E,WAAW;IACX,MAAM,eAAe,GAAG,CAAC,CAAC,WAAW,CAAC,YAAY,CAAC;IACnD,MAAM,KAAK,GAAG,WAAW,CAAC,aAAa,CAAC;IACxC,IAAI;QACA,IAAI,KAAK,EAAE;YACP,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACxB,IAAI,CAAC,eAAe,EAAE;gBAClB,wDAAwD;gBACxD,kEAAkE;gBAClE,WAAW;gBACX,kCAAkC;gBAClC,+CAA+C;gBAC/C,QAAQ;gBACR,WAAW;gBACX,0CAA0C;gBAC1C,uDAAuD;gBACvD,SAAS;gBACT,4DAA4D;gBAC5D,WAAW,CAAC,QAAQ,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;aAC9C;YACD,qBAAqB,GAAG,IAAI,CAAC;YAC7B,UAAU,EAAE,CAAC;SAChB;KACJ;IAAC,OAAO,CAAC,EAAE;QACR,OAAO,CAAC,KAAK,CAAC,6BAA6B,EAAE,CAAC,CAAC,CAAC;KACnD;AACL,CAAC;AA/BD,oCA+BC;AAED;;GAEG;AACH,SAAgB,iBAAiB;IAC7B,qBAAqB,GAAG,KAAK,CAAC;IAC9B,UAAU,GAAG,EAAE,CAAC;AACpB,CAAC;AAHD,8CAGC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mixpanel-service.d.ts","sourceRoot":"","sources":["mixpanel-service.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS;;CAErB,CAAC;
|
|
1
|
+
{"version":3,"file":"mixpanel-service.d.ts","sourceRoot":"","sources":["mixpanel-service.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS;;CAErB,CAAC;AAIF,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,CA+BnD;AAED;;GAEG;AACH,wBAAgB,iBAAiB,SAGhC"}
|
package/dist/tsembed-react.es.js
CHANGED
|
@@ -7944,6 +7944,7 @@ var mixpanel$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.assign(/*#__PURE
|
|
|
7944
7944
|
'default': mixpanel_cjs
|
|
7945
7945
|
}));
|
|
7946
7946
|
|
|
7947
|
+
const mixpanelLib = mixpanel_cjs || mixpanel$1;
|
|
7947
7948
|
const MIXPANEL_EVENT = {
|
|
7948
7949
|
VISUAL_SDK_RENDER_START: 'visual-sdk-render-start',
|
|
7949
7950
|
VISUAL_SDK_CALLED_INIT: 'visual-sdk-called-init',
|
|
@@ -7966,7 +7967,7 @@ function uploadMixpanelEvent(eventId, eventProps = {}) {
|
|
|
7966
7967
|
eventQueue.push({ eventId, eventProps });
|
|
7967
7968
|
return;
|
|
7968
7969
|
}
|
|
7969
|
-
|
|
7970
|
+
mixpanelLib.track(eventId, eventProps);
|
|
7970
7971
|
}
|
|
7971
7972
|
/**
|
|
7972
7973
|
*
|
|
@@ -7994,19 +7995,20 @@ function initMixpanel(sessionInfo) {
|
|
|
7994
7995
|
const token = sessionInfo.mixpanelToken;
|
|
7995
7996
|
try {
|
|
7996
7997
|
if (token) {
|
|
7997
|
-
|
|
7998
|
+
mixpanelLib.init(token);
|
|
7998
7999
|
if (!isPublicCluster) {
|
|
7999
8000
|
// Needed to avoid error in CJS builds on some bundlers.
|
|
8000
|
-
const
|
|
8001
|
-
|
|
8002
|
-
|
|
8003
|
-
|
|
8004
|
-
|
|
8005
|
-
|
|
8006
|
-
|
|
8007
|
-
|
|
8008
|
-
|
|
8009
|
-
mixpanelIdentify.call(mixpanelLib, sessionInfo.userGUID);
|
|
8001
|
+
// const { mixpanelLib, mixpanelIdentify } = (mixpanel.identify)
|
|
8002
|
+
// ? {
|
|
8003
|
+
// mixpanelLib: mixpanel,
|
|
8004
|
+
// mixpanelIdentify: mixpanel.identify
|
|
8005
|
+
// }
|
|
8006
|
+
// : {
|
|
8007
|
+
// mixpanelLib: mixpanel.default,
|
|
8008
|
+
// mixpanelIdentify: mixpanel.default.identify
|
|
8009
|
+
// };
|
|
8010
|
+
// mixpanelIdentify.call(mixpanelLib, sessionInfo.userGUID);
|
|
8011
|
+
mixpanelLib.identify(sessionInfo.userGUID);
|
|
8010
8012
|
}
|
|
8011
8013
|
isMixpanelInitialized = true;
|
|
8012
8014
|
emptyQueue();
|
|
@@ -26676,7 +26678,7 @@ function processTrigger(iFrame, messageType, thoughtSpotHost, data) {
|
|
|
26676
26678
|
});
|
|
26677
26679
|
}
|
|
26678
26680
|
|
|
26679
|
-
var name="@thoughtspot/visual-embed-sdk";var version="1.21.0-react.
|
|
26681
|
+
var name="@thoughtspot/visual-embed-sdk";var version="1.21.0-react.8";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"},"./lib/src/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};
|
|
26680
26682
|
|
|
26681
26683
|
/**
|
|
26682
26684
|
* Copyright (c) 2022
|
package/dist/tsembed-react.js
CHANGED
|
@@ -7882,6 +7882,7 @@
|
|
|
7882
7882
|
'default': mixpanel_cjs
|
|
7883
7883
|
}));
|
|
7884
7884
|
|
|
7885
|
+
const mixpanelLib = mixpanel_cjs || mixpanel$1;
|
|
7885
7886
|
const MIXPANEL_EVENT = {
|
|
7886
7887
|
VISUAL_SDK_RENDER_START: 'visual-sdk-render-start',
|
|
7887
7888
|
VISUAL_SDK_CALLED_INIT: 'visual-sdk-called-init',
|
|
@@ -7904,7 +7905,7 @@
|
|
|
7904
7905
|
eventQueue.push({ eventId, eventProps });
|
|
7905
7906
|
return;
|
|
7906
7907
|
}
|
|
7907
|
-
|
|
7908
|
+
mixpanelLib.track(eventId, eventProps);
|
|
7908
7909
|
}
|
|
7909
7910
|
/**
|
|
7910
7911
|
*
|
|
@@ -7932,19 +7933,20 @@
|
|
|
7932
7933
|
const token = sessionInfo.mixpanelToken;
|
|
7933
7934
|
try {
|
|
7934
7935
|
if (token) {
|
|
7935
|
-
|
|
7936
|
+
mixpanelLib.init(token);
|
|
7936
7937
|
if (!isPublicCluster) {
|
|
7937
7938
|
// Needed to avoid error in CJS builds on some bundlers.
|
|
7938
|
-
const
|
|
7939
|
-
|
|
7940
|
-
|
|
7941
|
-
|
|
7942
|
-
|
|
7943
|
-
|
|
7944
|
-
|
|
7945
|
-
|
|
7946
|
-
|
|
7947
|
-
mixpanelIdentify.call(mixpanelLib, sessionInfo.userGUID);
|
|
7939
|
+
// const { mixpanelLib, mixpanelIdentify } = (mixpanel.identify)
|
|
7940
|
+
// ? {
|
|
7941
|
+
// mixpanelLib: mixpanel,
|
|
7942
|
+
// mixpanelIdentify: mixpanel.identify
|
|
7943
|
+
// }
|
|
7944
|
+
// : {
|
|
7945
|
+
// mixpanelLib: mixpanel.default,
|
|
7946
|
+
// mixpanelIdentify: mixpanel.default.identify
|
|
7947
|
+
// };
|
|
7948
|
+
// mixpanelIdentify.call(mixpanelLib, sessionInfo.userGUID);
|
|
7949
|
+
mixpanelLib.identify(sessionInfo.userGUID);
|
|
7948
7950
|
}
|
|
7949
7951
|
isMixpanelInitialized = true;
|
|
7950
7952
|
emptyQueue();
|
|
@@ -26614,7 +26616,7 @@
|
|
|
26614
26616
|
});
|
|
26615
26617
|
}
|
|
26616
26618
|
|
|
26617
|
-
var name="@thoughtspot/visual-embed-sdk";var version="1.21.0-react.
|
|
26619
|
+
var name="@thoughtspot/visual-embed-sdk";var version="1.21.0-react.8";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"},"./lib/src/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};
|
|
26618
26620
|
|
|
26619
26621
|
/**
|
|
26620
26622
|
* Copyright (c) 2022
|
package/dist/tsembed.es.js
CHANGED
|
@@ -7785,6 +7785,7 @@ var mixpanel$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.assign(/*#__PURE
|
|
|
7785
7785
|
'default': mixpanel_cjs
|
|
7786
7786
|
}));
|
|
7787
7787
|
|
|
7788
|
+
const mixpanelLib = mixpanel_cjs || mixpanel$1;
|
|
7788
7789
|
const MIXPANEL_EVENT = {
|
|
7789
7790
|
VISUAL_SDK_RENDER_START: 'visual-sdk-render-start',
|
|
7790
7791
|
VISUAL_SDK_CALLED_INIT: 'visual-sdk-called-init',
|
|
@@ -7807,7 +7808,7 @@ function uploadMixpanelEvent(eventId, eventProps = {}) {
|
|
|
7807
7808
|
eventQueue.push({ eventId, eventProps });
|
|
7808
7809
|
return;
|
|
7809
7810
|
}
|
|
7810
|
-
|
|
7811
|
+
mixpanelLib.track(eventId, eventProps);
|
|
7811
7812
|
}
|
|
7812
7813
|
/**
|
|
7813
7814
|
*
|
|
@@ -7835,19 +7836,20 @@ function initMixpanel(sessionInfo) {
|
|
|
7835
7836
|
const token = sessionInfo.mixpanelToken;
|
|
7836
7837
|
try {
|
|
7837
7838
|
if (token) {
|
|
7838
|
-
|
|
7839
|
+
mixpanelLib.init(token);
|
|
7839
7840
|
if (!isPublicCluster) {
|
|
7840
7841
|
// Needed to avoid error in CJS builds on some bundlers.
|
|
7841
|
-
const
|
|
7842
|
-
|
|
7843
|
-
|
|
7844
|
-
|
|
7845
|
-
|
|
7846
|
-
|
|
7847
|
-
|
|
7848
|
-
|
|
7849
|
-
|
|
7850
|
-
mixpanelIdentify.call(mixpanelLib, sessionInfo.userGUID);
|
|
7842
|
+
// const { mixpanelLib, mixpanelIdentify } = (mixpanel.identify)
|
|
7843
|
+
// ? {
|
|
7844
|
+
// mixpanelLib: mixpanel,
|
|
7845
|
+
// mixpanelIdentify: mixpanel.identify
|
|
7846
|
+
// }
|
|
7847
|
+
// : {
|
|
7848
|
+
// mixpanelLib: mixpanel.default,
|
|
7849
|
+
// mixpanelIdentify: mixpanel.default.identify
|
|
7850
|
+
// };
|
|
7851
|
+
// mixpanelIdentify.call(mixpanelLib, sessionInfo.userGUID);
|
|
7852
|
+
mixpanelLib.identify(sessionInfo.userGUID);
|
|
7851
7853
|
}
|
|
7852
7854
|
isMixpanelInitialized = true;
|
|
7853
7855
|
emptyQueue();
|
|
@@ -27523,7 +27525,7 @@ function processTrigger(iFrame, messageType, thoughtSpotHost, data) {
|
|
|
27523
27525
|
});
|
|
27524
27526
|
}
|
|
27525
27527
|
|
|
27526
|
-
var name="@thoughtspot/visual-embed-sdk";var version="1.21.0-react.
|
|
27528
|
+
var name="@thoughtspot/visual-embed-sdk";var version="1.21.0-react.8";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"},"./lib/src/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};
|
|
27527
27529
|
|
|
27528
27530
|
/**
|
|
27529
27531
|
* Copyright (c) 2022
|
package/dist/tsembed.js
CHANGED
|
@@ -7702,6 +7702,7 @@
|
|
|
7702
7702
|
'default': mixpanel_cjs
|
|
7703
7703
|
}));
|
|
7704
7704
|
|
|
7705
|
+
const mixpanelLib = mixpanel_cjs || mixpanel$1;
|
|
7705
7706
|
const MIXPANEL_EVENT = {
|
|
7706
7707
|
VISUAL_SDK_RENDER_START: 'visual-sdk-render-start',
|
|
7707
7708
|
VISUAL_SDK_CALLED_INIT: 'visual-sdk-called-init',
|
|
@@ -7724,7 +7725,7 @@
|
|
|
7724
7725
|
eventQueue.push({ eventId, eventProps });
|
|
7725
7726
|
return;
|
|
7726
7727
|
}
|
|
7727
|
-
|
|
7728
|
+
mixpanelLib.track(eventId, eventProps);
|
|
7728
7729
|
}
|
|
7729
7730
|
/**
|
|
7730
7731
|
*
|
|
@@ -7752,19 +7753,20 @@
|
|
|
7752
7753
|
const token = sessionInfo.mixpanelToken;
|
|
7753
7754
|
try {
|
|
7754
7755
|
if (token) {
|
|
7755
|
-
|
|
7756
|
+
mixpanelLib.init(token);
|
|
7756
7757
|
if (!isPublicCluster) {
|
|
7757
7758
|
// Needed to avoid error in CJS builds on some bundlers.
|
|
7758
|
-
const
|
|
7759
|
-
|
|
7760
|
-
|
|
7761
|
-
|
|
7762
|
-
|
|
7763
|
-
|
|
7764
|
-
|
|
7765
|
-
|
|
7766
|
-
|
|
7767
|
-
mixpanelIdentify.call(mixpanelLib, sessionInfo.userGUID);
|
|
7759
|
+
// const { mixpanelLib, mixpanelIdentify } = (mixpanel.identify)
|
|
7760
|
+
// ? {
|
|
7761
|
+
// mixpanelLib: mixpanel,
|
|
7762
|
+
// mixpanelIdentify: mixpanel.identify
|
|
7763
|
+
// }
|
|
7764
|
+
// : {
|
|
7765
|
+
// mixpanelLib: mixpanel.default,
|
|
7766
|
+
// mixpanelIdentify: mixpanel.default.identify
|
|
7767
|
+
// };
|
|
7768
|
+
// mixpanelIdentify.call(mixpanelLib, sessionInfo.userGUID);
|
|
7769
|
+
mixpanelLib.identify(sessionInfo.userGUID);
|
|
7768
7770
|
}
|
|
7769
7771
|
isMixpanelInitialized = true;
|
|
7770
7772
|
emptyQueue();
|
|
@@ -27421,7 +27423,7 @@
|
|
|
27421
27423
|
});
|
|
27422
27424
|
}
|
|
27423
27425
|
|
|
27424
|
-
var name="@thoughtspot/visual-embed-sdk";var version="1.21.0-react.
|
|
27426
|
+
var name="@thoughtspot/visual-embed-sdk";var version="1.21.0-react.8";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"},"./lib/src/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};
|
|
27425
27427
|
|
|
27426
27428
|
/**
|
|
27427
27429
|
* Copyright (c) 2022
|
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.8",
|
|
4
4
|
"description": "ThoughtSpot Embed SDK",
|
|
5
5
|
"module": "lib/src/index.js",
|
|
6
6
|
"main": "dist/tsembed.js",
|
|
@@ -21,6 +21,11 @@
|
|
|
21
21
|
"import": "./lib/src/react/all-types-export.js",
|
|
22
22
|
"require": "./cjs/src/react/all-types-export.js",
|
|
23
23
|
"types": "./lib/src/react/all-types-export.d.ts"
|
|
24
|
+
},
|
|
25
|
+
"./lib/src/react": {
|
|
26
|
+
"import": "./lib/src/react/all-types-export.js",
|
|
27
|
+
"require": "./cjs/src/react/all-types-export.js",
|
|
28
|
+
"types": "./lib/src/react/all-types-export.d.ts"
|
|
24
29
|
}
|
|
25
30
|
},
|
|
26
31
|
"typesVersions": {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mixpanel-service.d.ts","sourceRoot":"","sources":["../../src/mixpanel-service.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS;;CAErB,CAAC;
|
|
1
|
+
{"version":3,"file":"mixpanel-service.d.ts","sourceRoot":"","sources":["../../src/mixpanel-service.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS;;CAErB,CAAC;AAIF,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,CA+BnD;AAED;;GAEG;AACH,wBAAgB,iBAAiB,SAGhC"}
|
|
@@ -2,6 +2,7 @@ import * as mixpanel from 'mixpanel-browser';
|
|
|
2
2
|
export const EndPoints = {
|
|
3
3
|
CONFIG: '/callosum/v1/system/config',
|
|
4
4
|
};
|
|
5
|
+
const mixpanelLib = mixpanel.default || mixpanel;
|
|
5
6
|
export const MIXPANEL_EVENT = {
|
|
6
7
|
VISUAL_SDK_RENDER_START: 'visual-sdk-render-start',
|
|
7
8
|
VISUAL_SDK_CALLED_INIT: 'visual-sdk-called-init',
|
|
@@ -24,7 +25,7 @@ export function uploadMixpanelEvent(eventId, eventProps = {}) {
|
|
|
24
25
|
eventQueue.push({ eventId, eventProps });
|
|
25
26
|
return;
|
|
26
27
|
}
|
|
27
|
-
|
|
28
|
+
mixpanelLib.track(eventId, eventProps);
|
|
28
29
|
}
|
|
29
30
|
/**
|
|
30
31
|
*
|
|
@@ -52,19 +53,20 @@ export function initMixpanel(sessionInfo) {
|
|
|
52
53
|
const token = sessionInfo.mixpanelToken;
|
|
53
54
|
try {
|
|
54
55
|
if (token) {
|
|
55
|
-
|
|
56
|
+
mixpanelLib.init(token);
|
|
56
57
|
if (!isPublicCluster) {
|
|
57
58
|
// Needed to avoid error in CJS builds on some bundlers.
|
|
58
|
-
const
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
mixpanelIdentify.call(mixpanelLib, sessionInfo.userGUID);
|
|
59
|
+
// const { mixpanelLib, mixpanelIdentify } = (mixpanel.identify)
|
|
60
|
+
// ? {
|
|
61
|
+
// mixpanelLib: mixpanel,
|
|
62
|
+
// mixpanelIdentify: mixpanel.identify
|
|
63
|
+
// }
|
|
64
|
+
// : {
|
|
65
|
+
// mixpanelLib: mixpanel.default,
|
|
66
|
+
// mixpanelIdentify: mixpanel.default.identify
|
|
67
|
+
// };
|
|
68
|
+
// mixpanelIdentify.call(mixpanelLib, sessionInfo.userGUID);
|
|
69
|
+
mixpanelLib.identify(sessionInfo.userGUID);
|
|
68
70
|
}
|
|
69
71
|
isMixpanelInitialized = true;
|
|
70
72
|
emptyQueue();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mixpanel-service.js","sourceRoot":"","sources":["../../src/mixpanel-service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAE7C,MAAM,CAAC,MAAM,SAAS,GAAG;IACrB,MAAM,EAAE,4BAA4B;CACvC,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG;IAC1B,uBAAuB,EAAE,yBAAyB;IAClD,sBAAsB,EAAE,wBAAwB;IAChD,0BAA0B,EAAE,4BAA4B;IACxD,wBAAwB,EAAE,0BAA0B;IACpD,kBAAkB,EAAE,oBAAoB;IACxC,aAAa,EAAE,eAAe;IAC9B,kCAAkC,EAAE,oCAAoC;CAC3E,CAAC;AAEF,IAAI,qBAAqB,GAAG,KAAK,CAAC;AAClC,IAAI,UAAU,GAA2C,EAAE,CAAC;AAE5D;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB,CAAC,OAAe,EAAE,UAAU,GAAG,EAAE;IAChE,IAAI,CAAC,qBAAqB,EAAE;QACxB,UAAU,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC,CAAC;QACzC,OAAO;KACV;IACD,
|
|
1
|
+
{"version":3,"file":"mixpanel-service.js","sourceRoot":"","sources":["../../src/mixpanel-service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAE7C,MAAM,CAAC,MAAM,SAAS,GAAG;IACrB,MAAM,EAAE,4BAA4B;CACvC,CAAC;AAEF,MAAM,WAAW,GAAG,QAAQ,CAAC,OAAO,IAAI,QAAQ,CAAC;AAEjD,MAAM,CAAC,MAAM,cAAc,GAAG;IAC1B,uBAAuB,EAAE,yBAAyB;IAClD,sBAAsB,EAAE,wBAAwB;IAChD,0BAA0B,EAAE,4BAA4B;IACxD,wBAAwB,EAAE,0BAA0B;IACpD,kBAAkB,EAAE,oBAAoB;IACxC,aAAa,EAAE,eAAe;IAC9B,kCAAkC,EAAE,oCAAoC;CAC3E,CAAC;AAEF,IAAI,qBAAqB,GAAG,KAAK,CAAC;AAClC,IAAI,UAAU,GAA2C,EAAE,CAAC;AAE5D;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB,CAAC,OAAe,EAAE,UAAU,GAAG,EAAE;IAChE,IAAI,CAAC,qBAAqB,EAAE;QACxB,UAAU,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC,CAAC;QACzC,OAAO;KACV;IACD,WAAW,CAAC,KAAK,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;AAC3C,CAAC;AAED;;GAEG;AACH,SAAS,UAAU;IACf,IAAI,CAAC,qBAAqB,EAAE;QACxB,OAAO;KACV;IACD,UAAU,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;QACzB,mBAAmB,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;IACzD,CAAC,CAAC,CAAC;IACH,UAAU,GAAG,EAAE,CAAC;AACpB,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,WAAgB;IACzC,IAAI,CAAC,WAAW,IAAI,CAAC,WAAW,CAAC,aAAa,EAAE;QAC5C,OAAO;KACV;IACD,0EAA0E;IAC1E,WAAW;IACX,MAAM,eAAe,GAAG,CAAC,CAAC,WAAW,CAAC,YAAY,CAAC;IACnD,MAAM,KAAK,GAAG,WAAW,CAAC,aAAa,CAAC;IACxC,IAAI;QACA,IAAI,KAAK,EAAE;YACP,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACxB,IAAI,CAAC,eAAe,EAAE;gBAClB,wDAAwD;gBACxD,kEAAkE;gBAClE,WAAW;gBACX,kCAAkC;gBAClC,+CAA+C;gBAC/C,QAAQ;gBACR,WAAW;gBACX,0CAA0C;gBAC1C,uDAAuD;gBACvD,SAAS;gBACT,4DAA4D;gBAC5D,WAAW,CAAC,QAAQ,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;aAC9C;YACD,qBAAqB,GAAG,IAAI,CAAC;YAC7B,UAAU,EAAE,CAAC;SAChB;KACJ;IAAC,OAAO,CAAC,EAAE;QACR,OAAO,CAAC,KAAK,CAAC,6BAA6B,EAAE,CAAC,CAAC,CAAC;KACnD;AACL,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,iBAAiB;IAC7B,qBAAqB,GAAG,KAAK,CAAC;IAC9B,UAAU,GAAG,EAAE,CAAC;AACpB,CAAC"}
|
package/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.8",
|
|
4
4
|
"description": "ThoughtSpot Embed SDK",
|
|
5
5
|
"module": "lib/src/index.js",
|
|
6
6
|
"main": "dist/tsembed.js",
|
|
@@ -21,6 +21,11 @@
|
|
|
21
21
|
"import": "./lib/src/react/all-types-export.js",
|
|
22
22
|
"require": "./cjs/src/react/all-types-export.js",
|
|
23
23
|
"types": "./lib/src/react/all-types-export.d.ts"
|
|
24
|
+
},
|
|
25
|
+
"./lib/src/react": {
|
|
26
|
+
"import": "./lib/src/react/all-types-export.js",
|
|
27
|
+
"require": "./cjs/src/react/all-types-export.js",
|
|
28
|
+
"types": "./lib/src/react/all-types-export.d.ts"
|
|
24
29
|
}
|
|
25
30
|
},
|
|
26
31
|
"typesVersions": {
|
package/src/mixpanel-service.ts
CHANGED
|
@@ -4,6 +4,8 @@ export const EndPoints = {
|
|
|
4
4
|
CONFIG: '/callosum/v1/system/config',
|
|
5
5
|
};
|
|
6
6
|
|
|
7
|
+
const mixpanelLib = mixpanel.default || mixpanel;
|
|
8
|
+
|
|
7
9
|
export const MIXPANEL_EVENT = {
|
|
8
10
|
VISUAL_SDK_RENDER_START: 'visual-sdk-render-start',
|
|
9
11
|
VISUAL_SDK_CALLED_INIT: 'visual-sdk-called-init',
|
|
@@ -28,7 +30,7 @@ export function uploadMixpanelEvent(eventId: string, eventProps = {}): void {
|
|
|
28
30
|
eventQueue.push({ eventId, eventProps });
|
|
29
31
|
return;
|
|
30
32
|
}
|
|
31
|
-
|
|
33
|
+
mixpanelLib.track(eventId, eventProps);
|
|
32
34
|
}
|
|
33
35
|
|
|
34
36
|
/**
|
|
@@ -58,19 +60,20 @@ export function initMixpanel(sessionInfo: any): void {
|
|
|
58
60
|
const token = sessionInfo.mixpanelToken;
|
|
59
61
|
try {
|
|
60
62
|
if (token) {
|
|
61
|
-
|
|
63
|
+
mixpanelLib.init(token);
|
|
62
64
|
if (!isPublicCluster) {
|
|
63
65
|
// Needed to avoid error in CJS builds on some bundlers.
|
|
64
|
-
const { mixpanelLib, mixpanelIdentify } = (mixpanel.identify)
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
mixpanelIdentify.call(mixpanelLib, sessionInfo.userGUID);
|
|
66
|
+
// const { mixpanelLib, mixpanelIdentify } = (mixpanel.identify)
|
|
67
|
+
// ? {
|
|
68
|
+
// mixpanelLib: mixpanel,
|
|
69
|
+
// mixpanelIdentify: mixpanel.identify
|
|
70
|
+
// }
|
|
71
|
+
// : {
|
|
72
|
+
// mixpanelLib: mixpanel.default,
|
|
73
|
+
// mixpanelIdentify: mixpanel.default.identify
|
|
74
|
+
// };
|
|
75
|
+
// mixpanelIdentify.call(mixpanelLib, sessionInfo.userGUID);
|
|
76
|
+
mixpanelLib.identify(sessionInfo.userGUID);
|
|
74
77
|
}
|
|
75
78
|
isMixpanelInitialized = true;
|
|
76
79
|
emptyQueue();
|