@thoughtspot/visual-embed-sdk 1.23.2 → 1.23.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/cjs/package.json +8 -7
  2. package/cjs/src/auth.d.ts.map +1 -1
  3. package/cjs/src/auth.js +3 -0
  4. package/cjs/src/auth.js.map +1 -1
  5. package/cjs/src/embed/base.d.ts +2 -0
  6. package/cjs/src/embed/base.d.ts.map +1 -1
  7. package/cjs/src/embed/base.js +4 -2
  8. package/cjs/src/embed/base.js.map +1 -1
  9. package/cjs/src/embed/ts-embed.d.ts +3 -1
  10. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  11. package/cjs/src/embed/ts-embed.js +14 -6
  12. package/cjs/src/embed/ts-embed.js.map +1 -1
  13. package/cjs/src/embed/ts-embed.spec.js +4 -1
  14. package/cjs/src/embed/ts-embed.spec.js.map +1 -1
  15. package/cjs/src/mixpanel-service.d.ts +1 -0
  16. package/cjs/src/mixpanel-service.d.ts.map +1 -1
  17. package/cjs/src/mixpanel-service.js +10 -3
  18. package/cjs/src/mixpanel-service.js.map +1 -1
  19. package/cjs/src/mixpanel-service.spec.js +12 -3
  20. package/cjs/src/mixpanel-service.spec.js.map +1 -1
  21. package/cjs/src/react/index.d.ts +14 -14
  22. package/cjs/src/react/index.d.ts.map +1 -1
  23. package/cjs/src/react/index.js +4 -2
  24. package/cjs/src/react/index.js.map +1 -1
  25. package/cjs/src/react/index.spec.js.map +1 -1
  26. package/dist/src/auth.d.ts.map +1 -1
  27. package/dist/src/embed/base.d.ts +2 -0
  28. package/dist/src/embed/base.d.ts.map +1 -1
  29. package/dist/src/embed/ts-embed.d.ts +3 -1
  30. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  31. package/dist/src/mixpanel-service.d.ts +1 -0
  32. package/dist/src/mixpanel-service.d.ts.map +1 -1
  33. package/dist/src/react/index.d.ts +14 -14
  34. package/dist/src/react/index.d.ts.map +1 -1
  35. package/dist/tsembed-react.es.js +32 -12
  36. package/dist/tsembed-react.js +32 -12
  37. package/dist/tsembed.es.js +32 -12
  38. package/dist/tsembed.js +32 -12
  39. package/dist/visual-embed-sdk-react-full.d.ts +240 -235
  40. package/dist/visual-embed-sdk-react.d.ts +240 -235
  41. package/dist/visual-embed-sdk.d.ts +5 -1
  42. package/lib/package.json +8 -7
  43. package/lib/src/.index.d.ts.swp +0 -0
  44. package/lib/src/auth.d.ts.map +1 -1
  45. package/lib/src/auth.js +3 -0
  46. package/lib/src/auth.js.map +1 -1
  47. package/lib/src/embed/base.d.ts +2 -0
  48. package/lib/src/embed/base.d.ts.map +1 -1
  49. package/lib/src/embed/base.js +4 -2
  50. package/lib/src/embed/base.js.map +1 -1
  51. package/lib/src/embed/ts-embed.d.ts +3 -1
  52. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  53. package/lib/src/embed/ts-embed.js +14 -6
  54. package/lib/src/embed/ts-embed.js.map +1 -1
  55. package/lib/src/embed/ts-embed.spec.js +4 -1
  56. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  57. package/lib/src/mixpanel-service.d.ts +1 -0
  58. package/lib/src/mixpanel-service.d.ts.map +1 -1
  59. package/lib/src/mixpanel-service.js +10 -3
  60. package/lib/src/mixpanel-service.js.map +1 -1
  61. package/lib/src/mixpanel-service.spec.js +12 -3
  62. package/lib/src/mixpanel-service.spec.js.map +1 -1
  63. package/lib/src/react/index.d.ts +14 -14
  64. package/lib/src/react/index.d.ts.map +1 -1
  65. package/lib/src/react/index.js +4 -2
  66. package/lib/src/react/index.js.map +1 -1
  67. package/lib/src/react/index.spec.js +1 -1
  68. package/lib/src/react/index.spec.js.map +1 -1
  69. package/lib/src/visual-embed-sdk.d.ts +5 -1
  70. package/package.json +8 -7
  71. package/src/auth.ts +6 -3
  72. package/src/embed/base.ts +7 -5
  73. package/src/embed/ts-embed.spec.ts +11 -5
  74. package/src/embed/ts-embed.ts +18 -5
  75. package/src/mixpanel-service.spec.ts +12 -3
  76. package/src/mixpanel-service.ts +10 -3
  77. package/src/react/index.spec.tsx +4 -2
  78. package/src/react/index.tsx +35 -26
@@ -8645,6 +8645,7 @@
8645
8645
 
8646
8646
  // Needed to avoid error in CJS builds on some bundlers.
8647
8647
  const mixpanelLib = mixpanel_cjs || mixpanel$1;
8648
+ let mixpanelInstance;
8648
8649
  const MIXPANEL_EVENT = {
8649
8650
  VISUAL_SDK_RENDER_START: 'visual-sdk-render-start',
8650
8651
  VISUAL_SDK_CALLED_INIT: 'visual-sdk-called-init',
@@ -8653,6 +8654,7 @@
8653
8654
  VISUAL_SDK_TRIGGER: 'visual-sdk-trigger',
8654
8655
  VISUAL_SDK_ON: 'visual-sdk-on',
8655
8656
  VISUAL_SDK_IFRAME_LOAD_PERFORMANCE: 'visual-sdk-iframe-load-performance',
8657
+ VISUAL_SDK_EMBED_CREATE: 'visual-sdk-embed-create',
8656
8658
  };
8657
8659
  let isMixpanelInitialized = false;
8658
8660
  let eventQueue = [];
@@ -8667,7 +8669,7 @@
8667
8669
  eventQueue.push({ eventId, eventProps });
8668
8670
  return;
8669
8671
  }
8670
- mixpanelLib.track(eventId, eventProps);
8672
+ mixpanelInstance.track(eventId, eventProps);
8671
8673
  }
8672
8674
  /**
8673
8675
  *
@@ -8695,10 +8697,15 @@
8695
8697
  const token = sessionInfo.mixpanelToken;
8696
8698
  try {
8697
8699
  if (token) {
8698
- mixpanelLib.init(token);
8700
+ mixpanelInstance = mixpanelLib.init(token, undefined, 'tsEmbed');
8699
8701
  if (!isPublicCluster) {
8700
- mixpanelLib.identify(sessionInfo.userGUID);
8702
+ mixpanelInstance.identify(sessionInfo.userGUID);
8701
8703
  }
8704
+ mixpanelInstance.register_once({
8705
+ clusterId: sessionInfo.clusterId,
8706
+ clusterName: sessionInfo.clusterName,
8707
+ releaseVersion: sessionInfo.releaseVersion,
8708
+ });
8702
8709
  isMixpanelInitialized = true;
8703
8710
  emptyQueue();
8704
8711
  }
@@ -9635,6 +9642,9 @@
9635
9642
  userGUID: sessionInfoResp.userGUID,
9636
9643
  mixpanelToken,
9637
9644
  isPublicUser: sessionInfoResp.configInfo.isPublicUser,
9645
+ releaseVersion: sessionInfoResp.releaseVersion,
9646
+ clusterId: sessionInfoResp.configInfo.selfClusterId,
9647
+ clusterName: sessionInfoResp.configInfo.selfClusterName,
9638
9648
  ...sessionInfoResp,
9639
9649
  };
9640
9650
  };
@@ -10170,7 +10180,7 @@
10170
10180
  });
10171
10181
  }
10172
10182
 
10173
- var name="@thoughtspot/visual-embed-sdk";var version="1.23.2";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/index.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-file":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts","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","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && 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",tslib:"^2.5.3","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","current-git-branch":"^1.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};
10183
+ var name="@thoughtspot/visual-embed-sdk";var version="1.23.4";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports$1={".":{"import":"./lib/src/index.js",require:"./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-file":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts","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","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","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",tslib:"^2.5.3","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","@size-limit/preset-big-lib":"^8.2.6","@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","current-git-branch":"^1.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,"size-limit":[{path:"dist/tsembed.js",limit:"40 kB"}],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};
10174
10184
 
10175
10185
  /**
10176
10186
  * Copyright (c) 2022
@@ -10257,8 +10267,8 @@
10257
10267
  * Register APP_INIT event and sendback init payload
10258
10268
  */
10259
10269
  this.registerAppInit = () => {
10260
- this.on(exports.EmbedEvent.APP_INIT, this.appInitCb);
10261
- this.on(exports.EmbedEvent.AuthExpire, this.updateAuthToken);
10270
+ this.on(exports.EmbedEvent.APP_INIT, this.appInitCb, { start: false }, true);
10271
+ this.on(exports.EmbedEvent.AuthExpire, this.updateAuthToken, { start: false }, true);
10262
10272
  };
10263
10273
  this.el = getDOMNode(domSelector);
10264
10274
  // TODO: handle error
@@ -10273,6 +10283,9 @@
10273
10283
  this.viewConfig = viewConfig;
10274
10284
  this.shouldEncodeUrlQueryParams = this.embedConfig.shouldEncodeUrlQueryParams;
10275
10285
  this.registerAppInit();
10286
+ uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_EMBED_CREATE, {
10287
+ ...viewConfig,
10288
+ });
10276
10289
  }
10277
10290
  /**
10278
10291
  * Throws error encountered during initialization.
@@ -10555,7 +10568,6 @@
10555
10568
  this.insertIntoDOM(this.embedConfig.loginFailedMessage);
10556
10569
  return;
10557
10570
  }
10558
- uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_RENDER_COMPLETE);
10559
10571
  this.iFrame = this.iFrame || this.createIframeEl(url);
10560
10572
  this.iFrame.addEventListener('load', () => {
10561
10573
  nextInQueue();
@@ -10566,7 +10578,9 @@
10566
10578
  },
10567
10579
  type: exports.EmbedEvent.Load,
10568
10580
  });
10569
- uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_IFRAME_LOAD_PERFORMANCE, {
10581
+ uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_RENDER_COMPLETE, {
10582
+ elWidth: this.iFrame.clientWidth,
10583
+ elHeight: this.iFrame.clientHeight,
10570
10584
  timeTookToLoad: loadTimestamp - initTimestamp,
10571
10585
  });
10572
10586
  });
@@ -10709,6 +10723,8 @@
10709
10723
  * @param messageType The message type
10710
10724
  * @param callback A callback as a function
10711
10725
  * @param options The message options
10726
+ * @param isSelf
10727
+ * @param isRegisteredBySDK
10712
10728
  * @example
10713
10729
  * ```js
10714
10730
  * tsEmbed.on(EmbedEvent.Error, (data) => {
@@ -10724,7 +10740,10 @@
10724
10740
  * });
10725
10741
  * ```
10726
10742
  */
10727
- on(messageType, callback, options = { start: false }) {
10743
+ on(messageType, callback, options = { start: false }, isRegisteredBySDK = false) {
10744
+ uploadMixpanelEvent(`${MIXPANEL_EVENT.VISUAL_SDK_ON}-${messageType}`, {
10745
+ isRegisteredBySDK,
10746
+ });
10728
10747
  if (this.isRendered) {
10729
10748
  this.handleError('Please register event handlers before calling render');
10730
10749
  }
@@ -10905,7 +10924,6 @@
10905
10924
  */
10906
10925
  on(messageType, callback, options = { start: false }) {
10907
10926
  const eventType = this.getCompatibleEventType(messageType);
10908
- uploadMixpanelEvent(`${MIXPANEL_EVENT.VISUAL_SDK_ON}-${messageType}`);
10909
10927
  return super.on(eventType, callback, options);
10910
10928
  }
10911
10929
  }
@@ -11679,9 +11697,11 @@
11679
11697
  * return <LiveboardEmbed ref={ref} liveboardId={<id>} />
11680
11698
  * }
11681
11699
  * ```
11682
- * @returns {React.MutableRefObject<TsEmbed>} ref
11700
+ * @returns {React.MutableRefObject<T extends TsEmbed>} ref
11683
11701
  */
11684
- const useEmbedRef = () => React__default['default'].useRef(null);
11702
+ function useEmbedRef() {
11703
+ return React__default['default'].useRef(null);
11704
+ }
11685
11705
 
11686
11706
  exports.AppEmbed = AppEmbed$1;
11687
11707
  exports.LiveboardEmbed = LiveboardEmbed$1;
@@ -8558,6 +8558,7 @@ var mixpanel$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.assign(/*#__PURE
8558
8558
 
8559
8559
  // Needed to avoid error in CJS builds on some bundlers.
8560
8560
  const mixpanelLib = mixpanel_cjs || mixpanel$1;
8561
+ let mixpanelInstance;
8561
8562
  const MIXPANEL_EVENT = {
8562
8563
  VISUAL_SDK_RENDER_START: 'visual-sdk-render-start',
8563
8564
  VISUAL_SDK_CALLED_INIT: 'visual-sdk-called-init',
@@ -8566,6 +8567,7 @@ const MIXPANEL_EVENT = {
8566
8567
  VISUAL_SDK_TRIGGER: 'visual-sdk-trigger',
8567
8568
  VISUAL_SDK_ON: 'visual-sdk-on',
8568
8569
  VISUAL_SDK_IFRAME_LOAD_PERFORMANCE: 'visual-sdk-iframe-load-performance',
8570
+ VISUAL_SDK_EMBED_CREATE: 'visual-sdk-embed-create',
8569
8571
  };
8570
8572
  let isMixpanelInitialized = false;
8571
8573
  let eventQueue = [];
@@ -8580,7 +8582,7 @@ function uploadMixpanelEvent(eventId, eventProps = {}) {
8580
8582
  eventQueue.push({ eventId, eventProps });
8581
8583
  return;
8582
8584
  }
8583
- mixpanelLib.track(eventId, eventProps);
8585
+ mixpanelInstance.track(eventId, eventProps);
8584
8586
  }
8585
8587
  /**
8586
8588
  *
@@ -8608,10 +8610,15 @@ function initMixpanel(sessionInfo) {
8608
8610
  const token = sessionInfo.mixpanelToken;
8609
8611
  try {
8610
8612
  if (token) {
8611
- mixpanelLib.init(token);
8613
+ mixpanelInstance = mixpanelLib.init(token, undefined, 'tsEmbed');
8612
8614
  if (!isPublicCluster) {
8613
- mixpanelLib.identify(sessionInfo.userGUID);
8615
+ mixpanelInstance.identify(sessionInfo.userGUID);
8614
8616
  }
8617
+ mixpanelInstance.register_once({
8618
+ clusterId: sessionInfo.clusterId,
8619
+ clusterName: sessionInfo.clusterName,
8620
+ releaseVersion: sessionInfo.releaseVersion,
8621
+ });
8615
8622
  isMixpanelInitialized = true;
8616
8623
  emptyQueue();
8617
8624
  }
@@ -10329,6 +10336,9 @@ const getSessionDetails = (sessionInfoResp) => {
10329
10336
  userGUID: sessionInfoResp.userGUID,
10330
10337
  mixpanelToken,
10331
10338
  isPublicUser: sessionInfoResp.configInfo.isPublicUser,
10339
+ releaseVersion: sessionInfoResp.releaseVersion,
10340
+ clusterId: sessionInfoResp.configInfo.selfClusterId,
10341
+ clusterName: sessionInfoResp.configInfo.selfClusterName,
10332
10342
  ...sessionInfoResp,
10333
10343
  };
10334
10344
  };
@@ -10734,9 +10744,9 @@ const init = (embedConfig) => {
10734
10744
  const authEE = new eventemitter3();
10735
10745
  setAuthEE(authEE);
10736
10746
  handleAuth();
10747
+ const { password, ...configToTrack } = config;
10737
10748
  uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_CALLED_INIT, {
10738
- authType: config.authType,
10739
- host: config.thoughtSpotHost,
10749
+ ...configToTrack,
10740
10750
  usedCustomizationSheet: ((_b = (_a = embedConfig.customizations) === null || _a === void 0 ? void 0 : _a.style) === null || _b === void 0 ? void 0 : _b.customCSSUrl) != null,
10741
10751
  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,
10742
10752
  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,
@@ -10792,6 +10802,7 @@ const renderInQueue = (fn) => {
10792
10802
  return fn(() => { }); // eslint-disable-line @typescript-eslint/no-empty-function
10793
10803
  };
10794
10804
  /**
10805
+ * Imports TML representation of the metadata objects into ThoughtSpot.
10795
10806
  * @param data
10796
10807
  * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
10797
10808
  */
@@ -10836,6 +10847,7 @@ const executeTML = async (data) => {
10836
10847
  });
10837
10848
  };
10838
10849
  /**
10850
+ * Exports TML representation of the metadata objects from ThoughtSpot in JSON or YAML format.
10839
10851
  * @param data
10840
10852
  * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
10841
10853
  */
@@ -11097,7 +11109,7 @@ function processTrigger(iFrame, messageType, thoughtSpotHost, data) {
11097
11109
  });
11098
11110
  }
11099
11111
 
11100
- var name="@thoughtspot/visual-embed-sdk";var version="1.23.2";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/index.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-file":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts","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","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && 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",tslib:"^2.5.3","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","current-git-branch":"^1.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};
11112
+ var name="@thoughtspot/visual-embed-sdk";var version="1.23.4";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports={".":{"import":"./lib/src/index.js",require:"./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-file":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts","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","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","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",tslib:"^2.5.3","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","@size-limit/preset-big-lib":"^8.2.6","@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","current-git-branch":"^1.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,"size-limit":[{path:"dist/tsembed.js",limit:"40 kB"}],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};
11101
11113
 
11102
11114
  /**
11103
11115
  * Copyright (c) 2022
@@ -11184,8 +11196,8 @@ class TsEmbed {
11184
11196
  * Register APP_INIT event and sendback init payload
11185
11197
  */
11186
11198
  this.registerAppInit = () => {
11187
- this.on(EmbedEvent.APP_INIT, this.appInitCb);
11188
- this.on(EmbedEvent.AuthExpire, this.updateAuthToken);
11199
+ this.on(EmbedEvent.APP_INIT, this.appInitCb, { start: false }, true);
11200
+ this.on(EmbedEvent.AuthExpire, this.updateAuthToken, { start: false }, true);
11189
11201
  };
11190
11202
  this.el = getDOMNode(domSelector);
11191
11203
  // TODO: handle error
@@ -11200,6 +11212,9 @@ class TsEmbed {
11200
11212
  this.viewConfig = viewConfig;
11201
11213
  this.shouldEncodeUrlQueryParams = this.embedConfig.shouldEncodeUrlQueryParams;
11202
11214
  this.registerAppInit();
11215
+ uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_EMBED_CREATE, {
11216
+ ...viewConfig,
11217
+ });
11203
11218
  }
11204
11219
  /**
11205
11220
  * Throws error encountered during initialization.
@@ -11482,7 +11497,6 @@ class TsEmbed {
11482
11497
  this.insertIntoDOM(this.embedConfig.loginFailedMessage);
11483
11498
  return;
11484
11499
  }
11485
- uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_RENDER_COMPLETE);
11486
11500
  this.iFrame = this.iFrame || this.createIframeEl(url);
11487
11501
  this.iFrame.addEventListener('load', () => {
11488
11502
  nextInQueue();
@@ -11493,7 +11507,9 @@ class TsEmbed {
11493
11507
  },
11494
11508
  type: EmbedEvent.Load,
11495
11509
  });
11496
- uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_IFRAME_LOAD_PERFORMANCE, {
11510
+ uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_RENDER_COMPLETE, {
11511
+ elWidth: this.iFrame.clientWidth,
11512
+ elHeight: this.iFrame.clientHeight,
11497
11513
  timeTookToLoad: loadTimestamp - initTimestamp,
11498
11514
  });
11499
11515
  });
@@ -11636,6 +11652,8 @@ class TsEmbed {
11636
11652
  * @param messageType The message type
11637
11653
  * @param callback A callback as a function
11638
11654
  * @param options The message options
11655
+ * @param isSelf
11656
+ * @param isRegisteredBySDK
11639
11657
  * @example
11640
11658
  * ```js
11641
11659
  * tsEmbed.on(EmbedEvent.Error, (data) => {
@@ -11651,7 +11669,10 @@ class TsEmbed {
11651
11669
  * });
11652
11670
  * ```
11653
11671
  */
11654
- on(messageType, callback, options = { start: false }) {
11672
+ on(messageType, callback, options = { start: false }, isRegisteredBySDK = false) {
11673
+ uploadMixpanelEvent(`${MIXPANEL_EVENT.VISUAL_SDK_ON}-${messageType}`, {
11674
+ isRegisteredBySDK,
11675
+ });
11655
11676
  if (this.isRendered) {
11656
11677
  this.handleError('Please register event handlers before calling render');
11657
11678
  }
@@ -11832,7 +11853,6 @@ class V1Embed extends TsEmbed {
11832
11853
  */
11833
11854
  on(messageType, callback, options = { start: false }) {
11834
11855
  const eventType = this.getCompatibleEventType(messageType);
11835
- uploadMixpanelEvent(`${MIXPANEL_EVENT.VISUAL_SDK_ON}-${messageType}`);
11836
11856
  return super.on(eventType, callback, options);
11837
11857
  }
11838
11858
  }
package/dist/tsembed.js CHANGED
@@ -8465,6 +8465,7 @@
8465
8465
 
8466
8466
  // Needed to avoid error in CJS builds on some bundlers.
8467
8467
  const mixpanelLib = mixpanel_cjs || mixpanel$1;
8468
+ let mixpanelInstance;
8468
8469
  const MIXPANEL_EVENT = {
8469
8470
  VISUAL_SDK_RENDER_START: 'visual-sdk-render-start',
8470
8471
  VISUAL_SDK_CALLED_INIT: 'visual-sdk-called-init',
@@ -8473,6 +8474,7 @@
8473
8474
  VISUAL_SDK_TRIGGER: 'visual-sdk-trigger',
8474
8475
  VISUAL_SDK_ON: 'visual-sdk-on',
8475
8476
  VISUAL_SDK_IFRAME_LOAD_PERFORMANCE: 'visual-sdk-iframe-load-performance',
8477
+ VISUAL_SDK_EMBED_CREATE: 'visual-sdk-embed-create',
8476
8478
  };
8477
8479
  let isMixpanelInitialized = false;
8478
8480
  let eventQueue = [];
@@ -8487,7 +8489,7 @@
8487
8489
  eventQueue.push({ eventId, eventProps });
8488
8490
  return;
8489
8491
  }
8490
- mixpanelLib.track(eventId, eventProps);
8492
+ mixpanelInstance.track(eventId, eventProps);
8491
8493
  }
8492
8494
  /**
8493
8495
  *
@@ -8515,10 +8517,15 @@
8515
8517
  const token = sessionInfo.mixpanelToken;
8516
8518
  try {
8517
8519
  if (token) {
8518
- mixpanelLib.init(token);
8520
+ mixpanelInstance = mixpanelLib.init(token, undefined, 'tsEmbed');
8519
8521
  if (!isPublicCluster) {
8520
- mixpanelLib.identify(sessionInfo.userGUID);
8522
+ mixpanelInstance.identify(sessionInfo.userGUID);
8521
8523
  }
8524
+ mixpanelInstance.register_once({
8525
+ clusterId: sessionInfo.clusterId,
8526
+ clusterName: sessionInfo.clusterName,
8527
+ releaseVersion: sessionInfo.releaseVersion,
8528
+ });
8522
8529
  isMixpanelInitialized = true;
8523
8530
  emptyQueue();
8524
8531
  }
@@ -10217,6 +10224,9 @@
10217
10224
  userGUID: sessionInfoResp.userGUID,
10218
10225
  mixpanelToken,
10219
10226
  isPublicUser: sessionInfoResp.configInfo.isPublicUser,
10227
+ releaseVersion: sessionInfoResp.releaseVersion,
10228
+ clusterId: sessionInfoResp.configInfo.selfClusterId,
10229
+ clusterName: sessionInfoResp.configInfo.selfClusterName,
10220
10230
  ...sessionInfoResp,
10221
10231
  };
10222
10232
  };
@@ -10622,9 +10632,9 @@
10622
10632
  const authEE = new eventemitter3();
10623
10633
  setAuthEE(authEE);
10624
10634
  handleAuth();
10635
+ const { password, ...configToTrack } = config;
10625
10636
  uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_CALLED_INIT, {
10626
- authType: config.authType,
10627
- host: config.thoughtSpotHost,
10637
+ ...configToTrack,
10628
10638
  usedCustomizationSheet: ((_b = (_a = embedConfig.customizations) === null || _a === void 0 ? void 0 : _a.style) === null || _b === void 0 ? void 0 : _b.customCSSUrl) != null,
10629
10639
  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,
10630
10640
  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,
@@ -10680,6 +10690,7 @@
10680
10690
  return fn(() => { }); // eslint-disable-line @typescript-eslint/no-empty-function
10681
10691
  };
10682
10692
  /**
10693
+ * Imports TML representation of the metadata objects into ThoughtSpot.
10683
10694
  * @param data
10684
10695
  * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
10685
10696
  */
@@ -10724,6 +10735,7 @@
10724
10735
  });
10725
10736
  };
10726
10737
  /**
10738
+ * Exports TML representation of the metadata objects from ThoughtSpot in JSON or YAML format.
10727
10739
  * @param data
10728
10740
  * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
10729
10741
  */
@@ -10985,7 +10997,7 @@
10985
10997
  });
10986
10998
  }
10987
10999
 
10988
- var name="@thoughtspot/visual-embed-sdk";var version="1.23.2";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/index.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-file":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts","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","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && 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",tslib:"^2.5.3","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","current-git-branch":"^1.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};
11000
+ var name="@thoughtspot/visual-embed-sdk";var version="1.23.4";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports$1={".":{"import":"./lib/src/index.js",require:"./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-file":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts","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","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","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",tslib:"^2.5.3","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","@size-limit/preset-big-lib":"^8.2.6","@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","current-git-branch":"^1.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,"size-limit":[{path:"dist/tsembed.js",limit:"40 kB"}],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};
10989
11001
 
10990
11002
  /**
10991
11003
  * Copyright (c) 2022
@@ -11072,8 +11084,8 @@
11072
11084
  * Register APP_INIT event and sendback init payload
11073
11085
  */
11074
11086
  this.registerAppInit = () => {
11075
- this.on(exports.EmbedEvent.APP_INIT, this.appInitCb);
11076
- this.on(exports.EmbedEvent.AuthExpire, this.updateAuthToken);
11087
+ this.on(exports.EmbedEvent.APP_INIT, this.appInitCb, { start: false }, true);
11088
+ this.on(exports.EmbedEvent.AuthExpire, this.updateAuthToken, { start: false }, true);
11077
11089
  };
11078
11090
  this.el = getDOMNode(domSelector);
11079
11091
  // TODO: handle error
@@ -11088,6 +11100,9 @@
11088
11100
  this.viewConfig = viewConfig;
11089
11101
  this.shouldEncodeUrlQueryParams = this.embedConfig.shouldEncodeUrlQueryParams;
11090
11102
  this.registerAppInit();
11103
+ uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_EMBED_CREATE, {
11104
+ ...viewConfig,
11105
+ });
11091
11106
  }
11092
11107
  /**
11093
11108
  * Throws error encountered during initialization.
@@ -11370,7 +11385,6 @@
11370
11385
  this.insertIntoDOM(this.embedConfig.loginFailedMessage);
11371
11386
  return;
11372
11387
  }
11373
- uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_RENDER_COMPLETE);
11374
11388
  this.iFrame = this.iFrame || this.createIframeEl(url);
11375
11389
  this.iFrame.addEventListener('load', () => {
11376
11390
  nextInQueue();
@@ -11381,7 +11395,9 @@
11381
11395
  },
11382
11396
  type: exports.EmbedEvent.Load,
11383
11397
  });
11384
- uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_IFRAME_LOAD_PERFORMANCE, {
11398
+ uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_RENDER_COMPLETE, {
11399
+ elWidth: this.iFrame.clientWidth,
11400
+ elHeight: this.iFrame.clientHeight,
11385
11401
  timeTookToLoad: loadTimestamp - initTimestamp,
11386
11402
  });
11387
11403
  });
@@ -11524,6 +11540,8 @@
11524
11540
  * @param messageType The message type
11525
11541
  * @param callback A callback as a function
11526
11542
  * @param options The message options
11543
+ * @param isSelf
11544
+ * @param isRegisteredBySDK
11527
11545
  * @example
11528
11546
  * ```js
11529
11547
  * tsEmbed.on(EmbedEvent.Error, (data) => {
@@ -11539,7 +11557,10 @@
11539
11557
  * });
11540
11558
  * ```
11541
11559
  */
11542
- on(messageType, callback, options = { start: false }) {
11560
+ on(messageType, callback, options = { start: false }, isRegisteredBySDK = false) {
11561
+ uploadMixpanelEvent(`${MIXPANEL_EVENT.VISUAL_SDK_ON}-${messageType}`, {
11562
+ isRegisteredBySDK,
11563
+ });
11543
11564
  if (this.isRendered) {
11544
11565
  this.handleError('Please register event handlers before calling render');
11545
11566
  }
@@ -11720,7 +11741,6 @@
11720
11741
  */
11721
11742
  on(messageType, callback, options = { start: false }) {
11722
11743
  const eventType = this.getCompatibleEventType(messageType);
11723
- uploadMixpanelEvent(`${MIXPANEL_EVENT.VISUAL_SDK_ON}-${messageType}`);
11724
11744
  return super.on(eventType, callback, options);
11725
11745
  }
11726
11746
  }