@thoughtspot/visual-embed-sdk 1.21.0-sage.2 → 1.21.0

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 (142) hide show
  1. package/README.md +1 -1
  2. package/cjs/package.json +20 -6
  3. package/cjs/src/css-variables.d.ts +300 -0
  4. package/cjs/src/css-variables.d.ts.map +1 -0
  5. package/cjs/src/css-variables.js +3 -0
  6. package/cjs/src/css-variables.js.map +1 -0
  7. package/cjs/src/embed/base.spec.js +29 -0
  8. package/cjs/src/embed/base.spec.js.map +1 -1
  9. package/cjs/src/embed/search.d.ts +4 -0
  10. package/cjs/src/embed/search.d.ts.map +1 -1
  11. package/cjs/src/embed/search.js +1 -1
  12. package/cjs/src/embed/search.js.map +1 -1
  13. package/cjs/src/embed/ts-embed.js +2 -1
  14. package/cjs/src/embed/ts-embed.js.map +1 -1
  15. package/cjs/src/errors.d.ts +0 -1
  16. package/cjs/src/errors.d.ts.map +1 -1
  17. package/cjs/src/errors.js +0 -1
  18. package/cjs/src/errors.js.map +1 -1
  19. package/cjs/src/index.d.ts +1 -2
  20. package/cjs/src/index.d.ts.map +1 -1
  21. package/cjs/src/index.js +1 -3
  22. package/cjs/src/index.js.map +1 -1
  23. package/cjs/src/mixpanel-service.d.ts.map +1 -1
  24. package/cjs/src/mixpanel-service.js +14 -7
  25. package/cjs/src/mixpanel-service.js.map +1 -1
  26. package/cjs/src/react/index.d.ts +0 -4
  27. package/cjs/src/react/index.d.ts.map +1 -1
  28. package/cjs/src/react/index.js +1 -3
  29. package/cjs/src/react/index.js.map +1 -1
  30. package/cjs/src/react/index.spec.js +12 -0
  31. package/cjs/src/react/index.spec.js.map +1 -1
  32. package/cjs/src/types.d.ts +11 -12
  33. package/cjs/src/types.d.ts.map +1 -1
  34. package/cjs/src/types.js +0 -4
  35. package/cjs/src/types.js.map +1 -1
  36. package/cjs/src/utils/processData.d.ts.map +1 -1
  37. package/cjs/src/utils/processData.js +8 -6
  38. package/cjs/src/utils/processData.js.map +1 -1
  39. package/cjs/src/utils/processData.spec.js +17 -0
  40. package/cjs/src/utils/processData.spec.js.map +1 -1
  41. package/dist/src/css-variables.d.ts +300 -0
  42. package/dist/src/css-variables.d.ts.map +1 -0
  43. package/dist/src/embed/search.d.ts +4 -0
  44. package/dist/src/embed/search.d.ts.map +1 -1
  45. package/dist/src/errors.d.ts +0 -1
  46. package/dist/src/errors.d.ts.map +1 -1
  47. package/dist/src/index.d.ts +1 -2
  48. package/dist/src/index.d.ts.map +1 -1
  49. package/dist/src/mixpanel-service.d.ts.map +1 -1
  50. package/dist/src/react/index.d.ts +0 -4
  51. package/dist/src/react/index.d.ts.map +1 -1
  52. package/dist/src/types.d.ts +11 -12
  53. package/dist/src/types.d.ts.map +1 -1
  54. package/dist/src/utils/processData.d.ts.map +1 -1
  55. package/dist/tsembed-react.es.js +31 -136
  56. package/dist/tsembed-react.js +30 -136
  57. package/dist/tsembed.es.js +31 -135
  58. package/dist/tsembed.js +30 -135
  59. package/dist/visual-embed-sdk-react-full.d.ts +323 -101
  60. package/dist/visual-embed-sdk-react.d.ts +3430 -0
  61. package/dist/visual-embed-sdk.d.ts +323 -98
  62. package/lib/package.json +20 -6
  63. package/lib/src/css-variables.d.ts +300 -0
  64. package/lib/src/css-variables.d.ts.map +1 -0
  65. package/lib/src/css-variables.js +2 -0
  66. package/lib/src/css-variables.js.map +1 -0
  67. package/lib/src/embed/base.spec.js +29 -0
  68. package/lib/src/embed/base.spec.js.map +1 -1
  69. package/lib/src/embed/search.d.ts +4 -0
  70. package/lib/src/embed/search.d.ts.map +1 -1
  71. package/lib/src/embed/search.js +1 -1
  72. package/lib/src/embed/search.js.map +1 -1
  73. package/lib/src/embed/ts-embed.js +2 -1
  74. package/lib/src/embed/ts-embed.js.map +1 -1
  75. package/lib/src/errors.d.ts +0 -1
  76. package/lib/src/errors.d.ts.map +1 -1
  77. package/lib/src/errors.js +0 -1
  78. package/lib/src/errors.js.map +1 -1
  79. package/lib/src/index.d.ts +1 -2
  80. package/lib/src/index.d.ts.map +1 -1
  81. package/lib/src/index.js +1 -2
  82. package/lib/src/index.js.map +1 -1
  83. package/lib/src/mixpanel-service.d.ts.map +1 -1
  84. package/lib/src/mixpanel-service.js +14 -7
  85. package/lib/src/mixpanel-service.js.map +1 -1
  86. package/lib/src/react/index.d.ts +0 -4
  87. package/lib/src/react/index.d.ts.map +1 -1
  88. package/lib/src/react/index.js +0 -2
  89. package/lib/src/react/index.js.map +1 -1
  90. package/lib/src/react/index.spec.js +12 -0
  91. package/lib/src/react/index.spec.js.map +1 -1
  92. package/lib/src/types.d.ts +11 -12
  93. package/lib/src/types.d.ts.map +1 -1
  94. package/lib/src/types.js +0 -4
  95. package/lib/src/types.js.map +1 -1
  96. package/lib/src/utils/processData.d.ts.map +1 -1
  97. package/lib/src/utils/processData.js +8 -6
  98. package/lib/src/utils/processData.js.map +1 -1
  99. package/lib/src/utils/processData.spec.js +17 -0
  100. package/lib/src/utils/processData.spec.js.map +1 -1
  101. package/package.json +20 -6
  102. package/src/css-variables.ts +370 -0
  103. package/src/embed/base.spec.ts +35 -0
  104. package/src/embed/search.ts +5 -0
  105. package/src/embed/ts-embed.ts +1 -1
  106. package/src/errors.ts +0 -1
  107. package/src/index.ts +0 -2
  108. package/src/mixpanel-service.ts +14 -7
  109. package/src/react/index.spec.tsx +29 -0
  110. package/src/react/index.tsx +0 -9
  111. package/src/types.ts +13 -11
  112. package/src/utils/processData.spec.ts +18 -0
  113. package/src/utils/processData.ts +14 -8
  114. package/cjs/src/embed/nls.spec.d.ts +0 -1
  115. package/cjs/src/embed/nls.spec.d.ts.map +0 -1
  116. package/cjs/src/embed/nls.spec.js +0 -1
  117. package/cjs/src/embed/nls.spec.js.map +0 -1
  118. package/cjs/src/embed/sage-fullscreen.d.ts +0 -87
  119. package/cjs/src/embed/sage-fullscreen.d.ts.map +0 -1
  120. package/cjs/src/embed/sage-fullscreen.js +0 -114
  121. package/cjs/src/embed/sage-fullscreen.js.map +0 -1
  122. package/cjs/src/embed/sage.d.ts +0 -104
  123. package/cjs/src/embed/sage.d.ts.map +0 -1
  124. package/cjs/src/embed/sage.js +0 -120
  125. package/cjs/src/embed/sage.js.map +0 -1
  126. package/dist/src/embed/sage-fullscreen.d.ts +0 -87
  127. package/dist/src/embed/sage-fullscreen.d.ts.map +0 -1
  128. package/dist/src/embed/sage.d.ts +0 -104
  129. package/dist/src/embed/sage.d.ts.map +0 -1
  130. package/lib/src/embed/nls.spec.d.ts +0 -1
  131. package/lib/src/embed/nls.spec.d.ts.map +0 -1
  132. package/lib/src/embed/nls.spec.js +0 -1
  133. package/lib/src/embed/nls.spec.js.map +0 -1
  134. package/lib/src/embed/sage-fullscreen.d.ts +0 -87
  135. package/lib/src/embed/sage-fullscreen.d.ts.map +0 -1
  136. package/lib/src/embed/sage-fullscreen.js +0 -110
  137. package/lib/src/embed/sage-fullscreen.js.map +0 -1
  138. package/lib/src/embed/sage.d.ts +0 -104
  139. package/lib/src/embed/sage.d.ts.map +0 -1
  140. package/lib/src/embed/sage.js +0 -116
  141. package/lib/src/embed/sage.js.map +0 -1
  142. package/src/embed/sage.ts +0 -195
@@ -1479,10 +1479,6 @@ var Param;
1479
1479
  Param["HideProfleAndHelp"] = "profileAndHelpInNavBarHidden";
1480
1480
  Param["HideApplicationSwitcher"] = "applicationSwitcherHidden";
1481
1481
  Param["HideOrgSwitcher"] = "orgSwitcherHidden";
1482
- Param["IsSageEmbed"] = "isSageEmbed";
1483
- Param["HideWorksheetSelector"] = "hideWorksheetSelector";
1484
- Param["DisableWorksheetChange"] = "disableWorksheetChange";
1485
- Param["HideEurekaResults"] = "hideEurekaResults";
1486
1482
  })(Param || (Param = {}));
1487
1483
  /**
1488
1484
  * The list of actions that can be performed on visual ThoughtSpot
@@ -1741,7 +1737,6 @@ const ERROR_MESSAGE = {
1741
1737
  LIVEBOARD_VIZ_ID_VALIDATION: 'Please provide either liveboardId or pinboardId',
1742
1738
  TRIGGER_TIMED_OUT: 'Trigger timedout in getting response',
1743
1739
  SEARCHEMBED_BETA_WRANING_MESSAGE: 'Search Embed is in Beta in this release.',
1744
- SAGE_EMBED_BETA_WARNING_MESSAGE: 'Sage Embed is in Beta in this release.',
1745
1740
  };
1746
1741
 
1747
1742
  /**
@@ -7786,6 +7781,12 @@ var mixpanel = init_as_module();
7786
7781
 
7787
7782
  var mixpanel_cjs = mixpanel;
7788
7783
 
7784
+ var mixpanel$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.assign(/*#__PURE__*/Object.create(null), mixpanel_cjs, {
7785
+ 'default': mixpanel_cjs
7786
+ }));
7787
+
7788
+ // Needed to avoid error in CJS builds on some bundlers.
7789
+ const mixpanelLib = mixpanel_cjs || mixpanel$1;
7789
7790
  const MIXPANEL_EVENT = {
7790
7791
  VISUAL_SDK_RENDER_START: 'visual-sdk-render-start',
7791
7792
  VISUAL_SDK_CALLED_INIT: 'visual-sdk-called-init',
@@ -7808,7 +7809,7 @@ function uploadMixpanelEvent(eventId, eventProps = {}) {
7808
7809
  eventQueue.push({ eventId, eventProps });
7809
7810
  return;
7810
7811
  }
7811
- mixpanel_cjs.track(eventId, eventProps);
7812
+ mixpanelLib.track(eventId, eventProps);
7812
7813
  }
7813
7814
  /**
7814
7815
  *
@@ -7834,13 +7835,18 @@ function initMixpanel(sessionInfo) {
7834
7835
  // userGUID
7835
7836
  const isPublicCluster = !!sessionInfo.isPublicUser;
7836
7837
  const token = sessionInfo.mixpanelToken;
7837
- if (token) {
7838
- mixpanel_cjs.init(token);
7839
- if (!isPublicCluster) {
7840
- mixpanel_cjs.identify(sessionInfo.userGUID);
7838
+ try {
7839
+ if (token) {
7840
+ mixpanelLib.init(token);
7841
+ if (!isPublicCluster) {
7842
+ mixpanelLib.identify(sessionInfo.userGUID);
7843
+ }
7844
+ isMixpanelInitialized = true;
7845
+ emptyQueue();
7841
7846
  }
7842
- isMixpanelInitialized = true;
7843
- emptyQueue();
7847
+ }
7848
+ catch (e) {
7849
+ console.error('Error initializing mixpanel', e);
7844
7850
  }
7845
7851
  }
7846
7852
 
@@ -27391,13 +27397,15 @@ function processAuthInit(e) {
27391
27397
  * @param containerEl
27392
27398
  */
27393
27399
  function processNoCookieAccess(e, containerEl) {
27394
- const { loginFailedMessage, suppressNoCookieAccessAlert } = getEmbedConfig();
27395
- if (!suppressNoCookieAccessAlert) {
27396
- // eslint-disable-next-line no-alert
27397
- alert('Third party cookie access is blocked on this browser, please allow third party cookies for this to work properly. \nYou can use `suppressNoCookieAccessAlert` to suppress this message.');
27400
+ const { loginFailedMessage, suppressNoCookieAccessAlert, ignoreNoCookieAccess, } = getEmbedConfig();
27401
+ if (!ignoreNoCookieAccess) {
27402
+ if (!suppressNoCookieAccessAlert) {
27403
+ // eslint-disable-next-line no-alert
27404
+ alert('Third party cookie access is blocked on this browser, please allow third party cookies for this to work properly. \nYou can use `suppressNoCookieAccessAlert` to suppress this message.');
27405
+ }
27406
+ // eslint-disable-next-line no-param-reassign
27407
+ containerEl.innerHTML = loginFailedMessage;
27398
27408
  }
27399
- // eslint-disable-next-line no-param-reassign
27400
- containerEl.innerHTML = loginFailedMessage;
27401
27409
  notifyAuthFailure(AuthFailureType.NO_COOKIE_ACCESS);
27402
27410
  return e;
27403
27411
  }
@@ -27509,7 +27517,7 @@ function processTrigger(iFrame, messageType, thoughtSpotHost, data) {
27509
27517
  });
27510
27518
  }
27511
27519
 
27512
- var name="@thoughtspot/visual-embed-sdk";var version="1.21.0-sage.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:"./dist/tsembed.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/index.js",require:"./cjs/src/react.index.js",types:"./lib/src/react/index.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":"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};
27520
+ var name="@thoughtspot/visual-embed-sdk";var version="1.21.0";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":"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 && 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","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};
27513
27521
 
27514
27522
  /**
27515
27523
  * Copyright (c) 2022
@@ -28152,8 +28160,9 @@ class TsEmbed {
28152
28160
  * @version SDK: 1.19.1 | ThoughtSpot: *
28153
28161
  */
28154
28162
  destroy() {
28163
+ var _a;
28155
28164
  try {
28156
- this.insertedDomEl.parentNode.removeChild(this.insertedDomEl);
28165
+ (_a = this.insertedDomEl) === null || _a === void 0 ? void 0 : _a.parentNode.removeChild(this.insertedDomEl);
28157
28166
  }
28158
28167
  catch (e) {
28159
28168
  console.log('Error destroying TS Embed', e);
@@ -28639,7 +28648,7 @@ class SearchEmbed extends TsEmbed {
28639
28648
  }
28640
28649
  getEmbedParams() {
28641
28650
  var _a;
28642
- const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, } = this.viewConfig;
28651
+ const { hideResults, expandAllDataSource, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, } = this.viewConfig;
28643
28652
  const queryParams = this.getBaseQueryParams();
28644
28653
  queryParams[Param.HideActions] = [
28645
28654
  ...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : []),
@@ -28765,117 +28774,4 @@ class SearchBarEmbed extends TsEmbed {
28765
28774
  }
28766
28775
  }
28767
28776
 
28768
- /**
28769
- * Copyright (c) 2022
28770
- *
28771
- * Embed ThoughtSpot Sage
28772
- *
28773
- * @summary TS Sage embed
28774
- * @author Mourya Balabhadra <mourya.balabhadra@thoughtspot.com>
28775
- */
28776
- const HiddenActionItemByDefaultForSageEmbed = [
28777
- Action.Save,
28778
- Action.Pin,
28779
- Action.EditACopy,
28780
- Action.SaveAsView,
28781
- Action.UpdateTML,
28782
- Action.EditTML,
28783
- Action.AnswerDelete,
28784
- Action.Share,
28785
- ];
28786
- /**
28787
- * Embed ThoughtSpot search
28788
- *
28789
- * @group Embed components
28790
- */
28791
- class SageEmbed extends V1Embed {
28792
- // eslint-disable-next-line no-useless-constructor
28793
- constructor(domSelector, viewConfig) {
28794
- super(domSelector, viewConfig);
28795
- this.defaultHeight = 500;
28796
- /**
28797
- * Set the iframe height as per the computed height received
28798
- * from the ThoughtSpot app.
28799
- *
28800
- * @param {MessagePayload} data The event payload
28801
- */
28802
- this.updateIFrameHeight = (data) => {
28803
- this.setIFrameHeight(Math.max(data.data, this.defaultHeight));
28804
- };
28805
- this.embedIframeCenter = (data, responder) => {
28806
- const obj = this.getIframeCenter();
28807
- responder({ type: EmbedEvent.EmbedIframeCenter, data: obj });
28808
- };
28809
- this.setIframeHeightForNonEmbedLiveboard = (data) => {
28810
- if (!data.data.currentPath.startsWith('/embed/viz/')) {
28811
- this.setIFrameHeight(this.defaultHeight);
28812
- }
28813
- };
28814
- if (this.viewConfig.fullHeight === true) {
28815
- this.on(EmbedEvent.RouteChange, this.setIframeHeightForNonEmbedLiveboard);
28816
- this.on(EmbedEvent.EmbedHeight, this.updateIFrameHeight);
28817
- this.on(EmbedEvent.EmbedIframeCenter, this.embedIframeCenter);
28818
- }
28819
- }
28820
- /**
28821
- * Constructs a map of parameters to be passed on to the
28822
- * embedded Eureka or Sage search page.
28823
- *
28824
- * @returns {string} query string
28825
- */
28826
- getEmbedParams() {
28827
- var _a, _b;
28828
- const { hideEurekaResults, isSageEmbed, disableWorksheetChange, hideWorksheetSelector, showPrimaryNavbar, disableProfileAndHelp, hideApplicationSwitcher, hideOrgSwitcher, fullHeight, } = this.viewConfig;
28829
- const params = {};
28830
- params[Param.EmbedApp] = true;
28831
- if (fullHeight) {
28832
- params[Param.fullHeight] = true;
28833
- }
28834
- if (hideEurekaResults) {
28835
- params[Param.HideEurekaResults] = true;
28836
- }
28837
- if (isSageEmbed) {
28838
- params[Param.IsSageEmbed] = true;
28839
- }
28840
- if (disableWorksheetChange) {
28841
- params[Param.DisableWorksheetChange] = true;
28842
- }
28843
- if (hideWorksheetSelector) {
28844
- params[Param.HideWorksheetSelector] = true;
28845
- }
28846
- params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
28847
- params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
28848
- params[Param.HideApplicationSwitcher] = !!hideApplicationSwitcher;
28849
- params[Param.HideOrgSwitcher] = !!hideOrgSwitcher;
28850
- params[Param.HideActions] = [...((_a = params[Param.HideActions]) !== null && _a !== void 0 ? _a : [])];
28851
- params[Param.HideActions] = [
28852
- ...((_b = params[Param.HideActions]) !== null && _b !== void 0 ? _b : []),
28853
- ...HiddenActionItemByDefaultForSageEmbed,
28854
- ];
28855
- return getQueryParamString(params, true);
28856
- }
28857
- /**
28858
- * Construct the URL of the embedded ThoughtSpot sage to be
28859
- * loaded in the iframe
28860
- *
28861
- * @returns {string} iframe url
28862
- */
28863
- getIFrameSrc() {
28864
- const path = 'eureka';
28865
- const tsPostHashParams = this.getThoughtSpotPostUrlParams();
28866
- return `${this.getRootIframeSrc()}/embed/${path}${tsPostHashParams}`;
28867
- }
28868
- /**
28869
- * Render the embedded ThoughtSpot Sage
28870
- *
28871
- * @returns {SageEmbed} Eureka/Sage embed
28872
- */
28873
- render() {
28874
- super.render();
28875
- const src = this.getIFrameSrc();
28876
- this.renderV1Embed(src);
28877
- return this;
28878
- }
28879
- }
28880
-
28881
- export { Action, AppEmbed, AuthEvent, AuthFailureType, AuthStatus, AuthType, ContextMenuTriggerOptions, DataSourceVisualMode, EmbedEvent, HostEvent, LiveboardEmbed, Page, PinboardEmbed, PrefetchFeatures, RuntimeFilterOp, SageEmbed, SearchBarEmbed, SearchEmbed, executeTML, exportTML, getEmbedConfig as getInitConfig, getSessionInfo, init, logout$1 as logout, prefetch };
28777
+ export { Action, AppEmbed, AuthEvent, AuthFailureType, AuthStatus, AuthType, ContextMenuTriggerOptions, DataSourceVisualMode, EmbedEvent, HostEvent, LiveboardEmbed, Page, PinboardEmbed, PrefetchFeatures, RuntimeFilterOp, SearchBarEmbed, SearchEmbed, executeTML, exportTML, getEmbedConfig as getInitConfig, getSessionInfo, init, logout$1 as logout, prefetch };
package/dist/tsembed.js CHANGED
@@ -1420,10 +1420,6 @@
1420
1420
  Param["HideProfleAndHelp"] = "profileAndHelpInNavBarHidden";
1421
1421
  Param["HideApplicationSwitcher"] = "applicationSwitcherHidden";
1422
1422
  Param["HideOrgSwitcher"] = "orgSwitcherHidden";
1423
- Param["IsSageEmbed"] = "isSageEmbed";
1424
- Param["HideWorksheetSelector"] = "hideWorksheetSelector";
1425
- Param["DisableWorksheetChange"] = "disableWorksheetChange";
1426
- Param["HideEurekaResults"] = "hideEurekaResults";
1427
1423
  })(Param || (Param = {}));
1428
1424
  (function (Action) {
1429
1425
  Action["Save"] = "save";
@@ -1658,7 +1654,6 @@
1658
1654
  LIVEBOARD_VIZ_ID_VALIDATION: 'Please provide either liveboardId or pinboardId',
1659
1655
  TRIGGER_TIMED_OUT: 'Trigger timedout in getting response',
1660
1656
  SEARCHEMBED_BETA_WRANING_MESSAGE: 'Search Embed is in Beta in this release.',
1661
- SAGE_EMBED_BETA_WARNING_MESSAGE: 'Sage Embed is in Beta in this release.',
1662
1657
  };
1663
1658
 
1664
1659
  /**
@@ -7703,6 +7698,12 @@
7703
7698
 
7704
7699
  var mixpanel_cjs = mixpanel;
7705
7700
 
7701
+ var mixpanel$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.assign(/*#__PURE__*/Object.create(null), mixpanel_cjs, {
7702
+ 'default': mixpanel_cjs
7703
+ }));
7704
+
7705
+ // Needed to avoid error in CJS builds on some bundlers.
7706
+ const mixpanelLib = mixpanel_cjs || mixpanel$1;
7706
7707
  const MIXPANEL_EVENT = {
7707
7708
  VISUAL_SDK_RENDER_START: 'visual-sdk-render-start',
7708
7709
  VISUAL_SDK_CALLED_INIT: 'visual-sdk-called-init',
@@ -7725,7 +7726,7 @@
7725
7726
  eventQueue.push({ eventId, eventProps });
7726
7727
  return;
7727
7728
  }
7728
- mixpanel_cjs.track(eventId, eventProps);
7729
+ mixpanelLib.track(eventId, eventProps);
7729
7730
  }
7730
7731
  /**
7731
7732
  *
@@ -7751,13 +7752,18 @@
7751
7752
  // userGUID
7752
7753
  const isPublicCluster = !!sessionInfo.isPublicUser;
7753
7754
  const token = sessionInfo.mixpanelToken;
7754
- if (token) {
7755
- mixpanel_cjs.init(token);
7756
- if (!isPublicCluster) {
7757
- mixpanel_cjs.identify(sessionInfo.userGUID);
7755
+ try {
7756
+ if (token) {
7757
+ mixpanelLib.init(token);
7758
+ if (!isPublicCluster) {
7759
+ mixpanelLib.identify(sessionInfo.userGUID);
7760
+ }
7761
+ isMixpanelInitialized = true;
7762
+ emptyQueue();
7758
7763
  }
7759
- isMixpanelInitialized = true;
7760
- emptyQueue();
7764
+ }
7765
+ catch (e) {
7766
+ console.error('Error initializing mixpanel', e);
7761
7767
  }
7762
7768
  }
7763
7769
 
@@ -27289,13 +27295,15 @@
27289
27295
  * @param containerEl
27290
27296
  */
27291
27297
  function processNoCookieAccess(e, containerEl) {
27292
- const { loginFailedMessage, suppressNoCookieAccessAlert } = getEmbedConfig();
27293
- if (!suppressNoCookieAccessAlert) {
27294
- // eslint-disable-next-line no-alert
27295
- alert('Third party cookie access is blocked on this browser, please allow third party cookies for this to work properly. \nYou can use `suppressNoCookieAccessAlert` to suppress this message.');
27298
+ const { loginFailedMessage, suppressNoCookieAccessAlert, ignoreNoCookieAccess, } = getEmbedConfig();
27299
+ if (!ignoreNoCookieAccess) {
27300
+ if (!suppressNoCookieAccessAlert) {
27301
+ // eslint-disable-next-line no-alert
27302
+ alert('Third party cookie access is blocked on this browser, please allow third party cookies for this to work properly. \nYou can use `suppressNoCookieAccessAlert` to suppress this message.');
27303
+ }
27304
+ // eslint-disable-next-line no-param-reassign
27305
+ containerEl.innerHTML = loginFailedMessage;
27296
27306
  }
27297
- // eslint-disable-next-line no-param-reassign
27298
- containerEl.innerHTML = loginFailedMessage;
27299
27307
  notifyAuthFailure(exports.AuthFailureType.NO_COOKIE_ACCESS);
27300
27308
  return e;
27301
27309
  }
@@ -27407,7 +27415,7 @@
27407
27415
  });
27408
27416
  }
27409
27417
 
27410
- var name="@thoughtspot/visual-embed-sdk";var version="1.21.0-sage.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:"./dist/tsembed.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/index.js",require:"./cjs/src/react.index.js",types:"./lib/src/react/index.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":"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};
27418
+ var name="@thoughtspot/visual-embed-sdk";var version="1.21.0";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":"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 && 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","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};
27411
27419
 
27412
27420
  /**
27413
27421
  * Copyright (c) 2022
@@ -28050,8 +28058,9 @@
28050
28058
  * @version SDK: 1.19.1 | ThoughtSpot: *
28051
28059
  */
28052
28060
  destroy() {
28061
+ var _a;
28053
28062
  try {
28054
- this.insertedDomEl.parentNode.removeChild(this.insertedDomEl);
28063
+ (_a = this.insertedDomEl) === null || _a === void 0 ? void 0 : _a.parentNode.removeChild(this.insertedDomEl);
28055
28064
  }
28056
28065
  catch (e) {
28057
28066
  console.log('Error destroying TS Embed', e);
@@ -28532,7 +28541,7 @@
28532
28541
  }
28533
28542
  getEmbedParams() {
28534
28543
  var _a;
28535
- const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, } = this.viewConfig;
28544
+ const { hideResults, expandAllDataSource, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, } = this.viewConfig;
28536
28545
  const queryParams = this.getBaseQueryParams();
28537
28546
  queryParams[Param.HideActions] = [
28538
28547
  ...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : []),
@@ -28658,123 +28667,9 @@
28658
28667
  }
28659
28668
  }
28660
28669
 
28661
- /**
28662
- * Copyright (c) 2022
28663
- *
28664
- * Embed ThoughtSpot Sage
28665
- *
28666
- * @summary TS Sage embed
28667
- * @author Mourya Balabhadra <mourya.balabhadra@thoughtspot.com>
28668
- */
28669
- const HiddenActionItemByDefaultForSageEmbed = [
28670
- exports.Action.Save,
28671
- exports.Action.Pin,
28672
- exports.Action.EditACopy,
28673
- exports.Action.SaveAsView,
28674
- exports.Action.UpdateTML,
28675
- exports.Action.EditTML,
28676
- exports.Action.AnswerDelete,
28677
- exports.Action.Share,
28678
- ];
28679
- /**
28680
- * Embed ThoughtSpot search
28681
- *
28682
- * @group Embed components
28683
- */
28684
- class SageEmbed extends V1Embed {
28685
- // eslint-disable-next-line no-useless-constructor
28686
- constructor(domSelector, viewConfig) {
28687
- super(domSelector, viewConfig);
28688
- this.defaultHeight = 500;
28689
- /**
28690
- * Set the iframe height as per the computed height received
28691
- * from the ThoughtSpot app.
28692
- *
28693
- * @param {MessagePayload} data The event payload
28694
- */
28695
- this.updateIFrameHeight = (data) => {
28696
- this.setIFrameHeight(Math.max(data.data, this.defaultHeight));
28697
- };
28698
- this.embedIframeCenter = (data, responder) => {
28699
- const obj = this.getIframeCenter();
28700
- responder({ type: exports.EmbedEvent.EmbedIframeCenter, data: obj });
28701
- };
28702
- this.setIframeHeightForNonEmbedLiveboard = (data) => {
28703
- if (!data.data.currentPath.startsWith('/embed/viz/')) {
28704
- this.setIFrameHeight(this.defaultHeight);
28705
- }
28706
- };
28707
- if (this.viewConfig.fullHeight === true) {
28708
- this.on(exports.EmbedEvent.RouteChange, this.setIframeHeightForNonEmbedLiveboard);
28709
- this.on(exports.EmbedEvent.EmbedHeight, this.updateIFrameHeight);
28710
- this.on(exports.EmbedEvent.EmbedIframeCenter, this.embedIframeCenter);
28711
- }
28712
- }
28713
- /**
28714
- * Constructs a map of parameters to be passed on to the
28715
- * embedded Eureka or Sage search page.
28716
- *
28717
- * @returns {string} query string
28718
- */
28719
- getEmbedParams() {
28720
- var _a, _b;
28721
- const { hideEurekaResults, isSageEmbed, disableWorksheetChange, hideWorksheetSelector, showPrimaryNavbar, disableProfileAndHelp, hideApplicationSwitcher, hideOrgSwitcher, fullHeight, } = this.viewConfig;
28722
- const params = {};
28723
- params[Param.EmbedApp] = true;
28724
- if (fullHeight) {
28725
- params[Param.fullHeight] = true;
28726
- }
28727
- if (hideEurekaResults) {
28728
- params[Param.HideEurekaResults] = true;
28729
- }
28730
- if (isSageEmbed) {
28731
- params[Param.IsSageEmbed] = true;
28732
- }
28733
- if (disableWorksheetChange) {
28734
- params[Param.DisableWorksheetChange] = true;
28735
- }
28736
- if (hideWorksheetSelector) {
28737
- params[Param.HideWorksheetSelector] = true;
28738
- }
28739
- params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
28740
- params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
28741
- params[Param.HideApplicationSwitcher] = !!hideApplicationSwitcher;
28742
- params[Param.HideOrgSwitcher] = !!hideOrgSwitcher;
28743
- params[Param.HideActions] = [...((_a = params[Param.HideActions]) !== null && _a !== void 0 ? _a : [])];
28744
- params[Param.HideActions] = [
28745
- ...((_b = params[Param.HideActions]) !== null && _b !== void 0 ? _b : []),
28746
- ...HiddenActionItemByDefaultForSageEmbed,
28747
- ];
28748
- return getQueryParamString(params, true);
28749
- }
28750
- /**
28751
- * Construct the URL of the embedded ThoughtSpot sage to be
28752
- * loaded in the iframe
28753
- *
28754
- * @returns {string} iframe url
28755
- */
28756
- getIFrameSrc() {
28757
- const path = 'eureka';
28758
- const tsPostHashParams = this.getThoughtSpotPostUrlParams();
28759
- return `${this.getRootIframeSrc()}/embed/${path}${tsPostHashParams}`;
28760
- }
28761
- /**
28762
- * Render the embedded ThoughtSpot Sage
28763
- *
28764
- * @returns {SageEmbed} Eureka/Sage embed
28765
- */
28766
- render() {
28767
- super.render();
28768
- const src = this.getIFrameSrc();
28769
- this.renderV1Embed(src);
28770
- return this;
28771
- }
28772
- }
28773
-
28774
28670
  exports.AppEmbed = AppEmbed;
28775
28671
  exports.LiveboardEmbed = LiveboardEmbed;
28776
28672
  exports.PinboardEmbed = PinboardEmbed;
28777
- exports.SageEmbed = SageEmbed;
28778
28673
  exports.SearchBarEmbed = SearchBarEmbed;
28779
28674
  exports.SearchEmbed = SearchEmbed;
28780
28675
  exports.executeTML = executeTML;