@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
@@ -1638,10 +1638,6 @@ var Param;
1638
1638
  Param["HideProfleAndHelp"] = "profileAndHelpInNavBarHidden";
1639
1639
  Param["HideApplicationSwitcher"] = "applicationSwitcherHidden";
1640
1640
  Param["HideOrgSwitcher"] = "orgSwitcherHidden";
1641
- Param["IsSageEmbed"] = "isSageEmbed";
1642
- Param["HideWorksheetSelector"] = "hideWorksheetSelector";
1643
- Param["DisableWorksheetChange"] = "disableWorksheetChange";
1644
- Param["HideEurekaResults"] = "hideEurekaResults";
1645
1641
  })(Param || (Param = {}));
1646
1642
  /**
1647
1643
  * The list of actions that can be performed on visual ThoughtSpot
@@ -1900,7 +1896,6 @@ const ERROR_MESSAGE = {
1900
1896
  LIVEBOARD_VIZ_ID_VALIDATION: 'Please provide either liveboardId or pinboardId',
1901
1897
  TRIGGER_TIMED_OUT: 'Trigger timedout in getting response',
1902
1898
  SEARCHEMBED_BETA_WRANING_MESSAGE: 'Search Embed is in Beta in this release.',
1903
- SAGE_EMBED_BETA_WARNING_MESSAGE: 'Sage Embed is in Beta in this release.',
1904
1899
  };
1905
1900
 
1906
1901
  /**
@@ -7945,6 +7940,12 @@ var mixpanel = init_as_module();
7945
7940
 
7946
7941
  var mixpanel_cjs = mixpanel;
7947
7942
 
7943
+ var mixpanel$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.assign(/*#__PURE__*/Object.create(null), mixpanel_cjs, {
7944
+ 'default': mixpanel_cjs
7945
+ }));
7946
+
7947
+ // Needed to avoid error in CJS builds on some bundlers.
7948
+ const mixpanelLib = mixpanel_cjs || mixpanel$1;
7948
7949
  const MIXPANEL_EVENT = {
7949
7950
  VISUAL_SDK_RENDER_START: 'visual-sdk-render-start',
7950
7951
  VISUAL_SDK_CALLED_INIT: 'visual-sdk-called-init',
@@ -7967,7 +7968,7 @@ function uploadMixpanelEvent(eventId, eventProps = {}) {
7967
7968
  eventQueue.push({ eventId, eventProps });
7968
7969
  return;
7969
7970
  }
7970
- mixpanel_cjs.track(eventId, eventProps);
7971
+ mixpanelLib.track(eventId, eventProps);
7971
7972
  }
7972
7973
  /**
7973
7974
  *
@@ -7993,13 +7994,18 @@ function initMixpanel(sessionInfo) {
7993
7994
  // userGUID
7994
7995
  const isPublicCluster = !!sessionInfo.isPublicUser;
7995
7996
  const token = sessionInfo.mixpanelToken;
7996
- if (token) {
7997
- mixpanel_cjs.init(token);
7998
- if (!isPublicCluster) {
7999
- mixpanel_cjs.identify(sessionInfo.userGUID);
7997
+ try {
7998
+ if (token) {
7999
+ mixpanelLib.init(token);
8000
+ if (!isPublicCluster) {
8001
+ mixpanelLib.identify(sessionInfo.userGUID);
8002
+ }
8003
+ isMixpanelInitialized = true;
8004
+ emptyQueue();
8000
8005
  }
8001
- isMixpanelInitialized = true;
8002
- emptyQueue();
8006
+ }
8007
+ catch (e) {
8008
+ console.error('Error initializing mixpanel', e);
8003
8009
  }
8004
8010
  }
8005
8011
 
@@ -26544,13 +26550,15 @@ function processAuthInit(e) {
26544
26550
  * @param containerEl
26545
26551
  */
26546
26552
  function processNoCookieAccess(e, containerEl) {
26547
- const { loginFailedMessage, suppressNoCookieAccessAlert } = getEmbedConfig();
26548
- if (!suppressNoCookieAccessAlert) {
26549
- // eslint-disable-next-line no-alert
26550
- 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.');
26553
+ const { loginFailedMessage, suppressNoCookieAccessAlert, ignoreNoCookieAccess, } = getEmbedConfig();
26554
+ if (!ignoreNoCookieAccess) {
26555
+ if (!suppressNoCookieAccessAlert) {
26556
+ // eslint-disable-next-line no-alert
26557
+ 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.');
26558
+ }
26559
+ // eslint-disable-next-line no-param-reassign
26560
+ containerEl.innerHTML = loginFailedMessage;
26551
26561
  }
26552
- // eslint-disable-next-line no-param-reassign
26553
- containerEl.innerHTML = loginFailedMessage;
26554
26562
  notifyAuthFailure(AuthFailureType.NO_COOKIE_ACCESS);
26555
26563
  return e;
26556
26564
  }
@@ -26662,7 +26670,7 @@ function processTrigger(iFrame, messageType, thoughtSpotHost, data) {
26662
26670
  });
26663
26671
  }
26664
26672
 
26665
- 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};
26673
+ 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};
26666
26674
 
26667
26675
  /**
26668
26676
  * Copyright (c) 2022
@@ -27305,8 +27313,9 @@ class TsEmbed {
27305
27313
  * @version SDK: 1.19.1 | ThoughtSpot: *
27306
27314
  */
27307
27315
  destroy() {
27316
+ var _a;
27308
27317
  try {
27309
- this.insertedDomEl.parentNode.removeChild(this.insertedDomEl);
27318
+ (_a = this.insertedDomEl) === null || _a === void 0 ? void 0 : _a.parentNode.removeChild(this.insertedDomEl);
27310
27319
  }
27311
27320
  catch (e) {
27312
27321
  console.log('Error destroying TS Embed', e);
@@ -27438,119 +27447,6 @@ class SearchBarEmbed extends TsEmbed {
27438
27447
  }
27439
27448
  }
27440
27449
 
27441
- /**
27442
- * Copyright (c) 2022
27443
- *
27444
- * Embed ThoughtSpot Sage
27445
- *
27446
- * @summary TS Sage embed
27447
- * @author Mourya Balabhadra <mourya.balabhadra@thoughtspot.com>
27448
- */
27449
- const HiddenActionItemByDefaultForSageEmbed = [
27450
- Action.Save,
27451
- Action.Pin,
27452
- Action.EditACopy,
27453
- Action.SaveAsView,
27454
- Action.UpdateTML,
27455
- Action.EditTML,
27456
- Action.AnswerDelete,
27457
- Action.Share,
27458
- ];
27459
- /**
27460
- * Embed ThoughtSpot search
27461
- *
27462
- * @group Embed components
27463
- */
27464
- class SageEmbed extends V1Embed {
27465
- // eslint-disable-next-line no-useless-constructor
27466
- constructor(domSelector, viewConfig) {
27467
- super(domSelector, viewConfig);
27468
- this.defaultHeight = 500;
27469
- /**
27470
- * Set the iframe height as per the computed height received
27471
- * from the ThoughtSpot app.
27472
- *
27473
- * @param {MessagePayload} data The event payload
27474
- */
27475
- this.updateIFrameHeight = (data) => {
27476
- this.setIFrameHeight(Math.max(data.data, this.defaultHeight));
27477
- };
27478
- this.embedIframeCenter = (data, responder) => {
27479
- const obj = this.getIframeCenter();
27480
- responder({ type: EmbedEvent.EmbedIframeCenter, data: obj });
27481
- };
27482
- this.setIframeHeightForNonEmbedLiveboard = (data) => {
27483
- if (!data.data.currentPath.startsWith('/embed/viz/')) {
27484
- this.setIFrameHeight(this.defaultHeight);
27485
- }
27486
- };
27487
- if (this.viewConfig.fullHeight === true) {
27488
- this.on(EmbedEvent.RouteChange, this.setIframeHeightForNonEmbedLiveboard);
27489
- this.on(EmbedEvent.EmbedHeight, this.updateIFrameHeight);
27490
- this.on(EmbedEvent.EmbedIframeCenter, this.embedIframeCenter);
27491
- }
27492
- }
27493
- /**
27494
- * Constructs a map of parameters to be passed on to the
27495
- * embedded Eureka or Sage search page.
27496
- *
27497
- * @returns {string} query string
27498
- */
27499
- getEmbedParams() {
27500
- var _a, _b;
27501
- const { hideEurekaResults, isSageEmbed, disableWorksheetChange, hideWorksheetSelector, showPrimaryNavbar, disableProfileAndHelp, hideApplicationSwitcher, hideOrgSwitcher, fullHeight, } = this.viewConfig;
27502
- const params = {};
27503
- params[Param.EmbedApp] = true;
27504
- if (fullHeight) {
27505
- params[Param.fullHeight] = true;
27506
- }
27507
- if (hideEurekaResults) {
27508
- params[Param.HideEurekaResults] = true;
27509
- }
27510
- if (isSageEmbed) {
27511
- params[Param.IsSageEmbed] = true;
27512
- }
27513
- if (disableWorksheetChange) {
27514
- params[Param.DisableWorksheetChange] = true;
27515
- }
27516
- if (hideWorksheetSelector) {
27517
- params[Param.HideWorksheetSelector] = true;
27518
- }
27519
- params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
27520
- params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
27521
- params[Param.HideApplicationSwitcher] = !!hideApplicationSwitcher;
27522
- params[Param.HideOrgSwitcher] = !!hideOrgSwitcher;
27523
- params[Param.HideActions] = [...((_a = params[Param.HideActions]) !== null && _a !== void 0 ? _a : [])];
27524
- params[Param.HideActions] = [
27525
- ...((_b = params[Param.HideActions]) !== null && _b !== void 0 ? _b : []),
27526
- ...HiddenActionItemByDefaultForSageEmbed,
27527
- ];
27528
- return getQueryParamString(params, true);
27529
- }
27530
- /**
27531
- * Construct the URL of the embedded ThoughtSpot sage to be
27532
- * loaded in the iframe
27533
- *
27534
- * @returns {string} iframe url
27535
- */
27536
- getIFrameSrc() {
27537
- const path = 'eureka';
27538
- const tsPostHashParams = this.getThoughtSpotPostUrlParams();
27539
- return `${this.getRootIframeSrc()}/embed/${path}${tsPostHashParams}`;
27540
- }
27541
- /**
27542
- * Render the embedded ThoughtSpot Sage
27543
- *
27544
- * @returns {SageEmbed} Eureka/Sage embed
27545
- */
27546
- render() {
27547
- super.render();
27548
- const src = this.getIFrameSrc();
27549
- this.renderV1Embed(src);
27550
- return this;
27551
- }
27552
- }
27553
-
27554
27450
  /**
27555
27451
  * Copyright (c) 2022
27556
27452
  *
@@ -27592,7 +27488,7 @@ class SearchEmbed extends TsEmbed {
27592
27488
  }
27593
27489
  getEmbedParams() {
27594
27490
  var _a;
27595
- const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, } = this.viewConfig;
27491
+ const { hideResults, expandAllDataSource, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, } = this.viewConfig;
27596
27492
  const queryParams = this.getBaseQueryParams();
27597
27493
  queryParams[Param.HideActions] = [
27598
27494
  ...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : []),
@@ -28135,7 +28031,6 @@ const PinboardEmbed = LiveboardEmbed$1;
28135
28031
  * ```
28136
28032
  */
28137
28033
  const SearchBarEmbed$1 = componentFactory(SearchBarEmbed);
28138
- const SageEmbed$1 = componentFactory(SageEmbed);
28139
28034
  /**
28140
28035
  * Get a reference to the embed component to trigger events on the component.
28141
28036
  *
@@ -28155,4 +28050,4 @@ const SageEmbed$1 = componentFactory(SageEmbed);
28155
28050
  */
28156
28051
  const useEmbedRef = () => React.useRef(null);
28157
28052
 
28158
- export { Action, AppEmbed$1 as AppEmbed, EmbedEvent, HostEvent, LiveboardEmbed$1 as LiveboardEmbed, Page, PinboardEmbed, RuntimeFilterOp, SageEmbed$1 as SageEmbed, SearchBarEmbed$1 as SearchBarEmbed, SearchEmbed$1 as SearchEmbed, useEmbedRef };
28053
+ export { Action, AppEmbed$1 as AppEmbed, EmbedEvent, HostEvent, LiveboardEmbed$1 as LiveboardEmbed, Page, PinboardEmbed, RuntimeFilterOp, SearchBarEmbed$1 as SearchBarEmbed, SearchEmbed$1 as SearchEmbed, useEmbedRef };
@@ -1595,10 +1595,6 @@
1595
1595
  Param["HideProfleAndHelp"] = "profileAndHelpInNavBarHidden";
1596
1596
  Param["HideApplicationSwitcher"] = "applicationSwitcherHidden";
1597
1597
  Param["HideOrgSwitcher"] = "orgSwitcherHidden";
1598
- Param["IsSageEmbed"] = "isSageEmbed";
1599
- Param["HideWorksheetSelector"] = "hideWorksheetSelector";
1600
- Param["DisableWorksheetChange"] = "disableWorksheetChange";
1601
- Param["HideEurekaResults"] = "hideEurekaResults";
1602
1598
  })(Param || (Param = {}));
1603
1599
  (function (Action) {
1604
1600
  Action["Save"] = "save";
@@ -1838,7 +1834,6 @@
1838
1834
  LIVEBOARD_VIZ_ID_VALIDATION: 'Please provide either liveboardId or pinboardId',
1839
1835
  TRIGGER_TIMED_OUT: 'Trigger timedout in getting response',
1840
1836
  SEARCHEMBED_BETA_WRANING_MESSAGE: 'Search Embed is in Beta in this release.',
1841
- SAGE_EMBED_BETA_WARNING_MESSAGE: 'Sage Embed is in Beta in this release.',
1842
1837
  };
1843
1838
 
1844
1839
  /**
@@ -7883,6 +7878,12 @@
7883
7878
 
7884
7879
  var mixpanel_cjs = mixpanel;
7885
7880
 
7881
+ var mixpanel$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.assign(/*#__PURE__*/Object.create(null), mixpanel_cjs, {
7882
+ 'default': mixpanel_cjs
7883
+ }));
7884
+
7885
+ // Needed to avoid error in CJS builds on some bundlers.
7886
+ const mixpanelLib = mixpanel_cjs || mixpanel$1;
7886
7887
  const MIXPANEL_EVENT = {
7887
7888
  VISUAL_SDK_RENDER_START: 'visual-sdk-render-start',
7888
7889
  VISUAL_SDK_CALLED_INIT: 'visual-sdk-called-init',
@@ -7905,7 +7906,7 @@
7905
7906
  eventQueue.push({ eventId, eventProps });
7906
7907
  return;
7907
7908
  }
7908
- mixpanel_cjs.track(eventId, eventProps);
7909
+ mixpanelLib.track(eventId, eventProps);
7909
7910
  }
7910
7911
  /**
7911
7912
  *
@@ -7931,13 +7932,18 @@
7931
7932
  // userGUID
7932
7933
  const isPublicCluster = !!sessionInfo.isPublicUser;
7933
7934
  const token = sessionInfo.mixpanelToken;
7934
- if (token) {
7935
- mixpanel_cjs.init(token);
7936
- if (!isPublicCluster) {
7937
- mixpanel_cjs.identify(sessionInfo.userGUID);
7935
+ try {
7936
+ if (token) {
7937
+ mixpanelLib.init(token);
7938
+ if (!isPublicCluster) {
7939
+ mixpanelLib.identify(sessionInfo.userGUID);
7940
+ }
7941
+ isMixpanelInitialized = true;
7942
+ emptyQueue();
7938
7943
  }
7939
- isMixpanelInitialized = true;
7940
- emptyQueue();
7944
+ }
7945
+ catch (e) {
7946
+ console.error('Error initializing mixpanel', e);
7941
7947
  }
7942
7948
  }
7943
7949
 
@@ -26482,13 +26488,15 @@
26482
26488
  * @param containerEl
26483
26489
  */
26484
26490
  function processNoCookieAccess(e, containerEl) {
26485
- const { loginFailedMessage, suppressNoCookieAccessAlert } = getEmbedConfig();
26486
- if (!suppressNoCookieAccessAlert) {
26487
- // eslint-disable-next-line no-alert
26488
- 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.');
26491
+ const { loginFailedMessage, suppressNoCookieAccessAlert, ignoreNoCookieAccess, } = getEmbedConfig();
26492
+ if (!ignoreNoCookieAccess) {
26493
+ if (!suppressNoCookieAccessAlert) {
26494
+ // eslint-disable-next-line no-alert
26495
+ 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.');
26496
+ }
26497
+ // eslint-disable-next-line no-param-reassign
26498
+ containerEl.innerHTML = loginFailedMessage;
26489
26499
  }
26490
- // eslint-disable-next-line no-param-reassign
26491
- containerEl.innerHTML = loginFailedMessage;
26492
26500
  notifyAuthFailure(AuthFailureType.NO_COOKIE_ACCESS);
26493
26501
  return e;
26494
26502
  }
@@ -26600,7 +26608,7 @@
26600
26608
  });
26601
26609
  }
26602
26610
 
26603
- 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};
26611
+ 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};
26604
26612
 
26605
26613
  /**
26606
26614
  * Copyright (c) 2022
@@ -27243,8 +27251,9 @@
27243
27251
  * @version SDK: 1.19.1 | ThoughtSpot: *
27244
27252
  */
27245
27253
  destroy() {
27254
+ var _a;
27246
27255
  try {
27247
- this.insertedDomEl.parentNode.removeChild(this.insertedDomEl);
27256
+ (_a = this.insertedDomEl) === null || _a === void 0 ? void 0 : _a.parentNode.removeChild(this.insertedDomEl);
27248
27257
  }
27249
27258
  catch (e) {
27250
27259
  console.log('Error destroying TS Embed', e);
@@ -27376,119 +27385,6 @@
27376
27385
  }
27377
27386
  }
27378
27387
 
27379
- /**
27380
- * Copyright (c) 2022
27381
- *
27382
- * Embed ThoughtSpot Sage
27383
- *
27384
- * @summary TS Sage embed
27385
- * @author Mourya Balabhadra <mourya.balabhadra@thoughtspot.com>
27386
- */
27387
- const HiddenActionItemByDefaultForSageEmbed = [
27388
- exports.Action.Save,
27389
- exports.Action.Pin,
27390
- exports.Action.EditACopy,
27391
- exports.Action.SaveAsView,
27392
- exports.Action.UpdateTML,
27393
- exports.Action.EditTML,
27394
- exports.Action.AnswerDelete,
27395
- exports.Action.Share,
27396
- ];
27397
- /**
27398
- * Embed ThoughtSpot search
27399
- *
27400
- * @group Embed components
27401
- */
27402
- class SageEmbed extends V1Embed {
27403
- // eslint-disable-next-line no-useless-constructor
27404
- constructor(domSelector, viewConfig) {
27405
- super(domSelector, viewConfig);
27406
- this.defaultHeight = 500;
27407
- /**
27408
- * Set the iframe height as per the computed height received
27409
- * from the ThoughtSpot app.
27410
- *
27411
- * @param {MessagePayload} data The event payload
27412
- */
27413
- this.updateIFrameHeight = (data) => {
27414
- this.setIFrameHeight(Math.max(data.data, this.defaultHeight));
27415
- };
27416
- this.embedIframeCenter = (data, responder) => {
27417
- const obj = this.getIframeCenter();
27418
- responder({ type: exports.EmbedEvent.EmbedIframeCenter, data: obj });
27419
- };
27420
- this.setIframeHeightForNonEmbedLiveboard = (data) => {
27421
- if (!data.data.currentPath.startsWith('/embed/viz/')) {
27422
- this.setIFrameHeight(this.defaultHeight);
27423
- }
27424
- };
27425
- if (this.viewConfig.fullHeight === true) {
27426
- this.on(exports.EmbedEvent.RouteChange, this.setIframeHeightForNonEmbedLiveboard);
27427
- this.on(exports.EmbedEvent.EmbedHeight, this.updateIFrameHeight);
27428
- this.on(exports.EmbedEvent.EmbedIframeCenter, this.embedIframeCenter);
27429
- }
27430
- }
27431
- /**
27432
- * Constructs a map of parameters to be passed on to the
27433
- * embedded Eureka or Sage search page.
27434
- *
27435
- * @returns {string} query string
27436
- */
27437
- getEmbedParams() {
27438
- var _a, _b;
27439
- const { hideEurekaResults, isSageEmbed, disableWorksheetChange, hideWorksheetSelector, showPrimaryNavbar, disableProfileAndHelp, hideApplicationSwitcher, hideOrgSwitcher, fullHeight, } = this.viewConfig;
27440
- const params = {};
27441
- params[Param.EmbedApp] = true;
27442
- if (fullHeight) {
27443
- params[Param.fullHeight] = true;
27444
- }
27445
- if (hideEurekaResults) {
27446
- params[Param.HideEurekaResults] = true;
27447
- }
27448
- if (isSageEmbed) {
27449
- params[Param.IsSageEmbed] = true;
27450
- }
27451
- if (disableWorksheetChange) {
27452
- params[Param.DisableWorksheetChange] = true;
27453
- }
27454
- if (hideWorksheetSelector) {
27455
- params[Param.HideWorksheetSelector] = true;
27456
- }
27457
- params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
27458
- params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
27459
- params[Param.HideApplicationSwitcher] = !!hideApplicationSwitcher;
27460
- params[Param.HideOrgSwitcher] = !!hideOrgSwitcher;
27461
- params[Param.HideActions] = [...((_a = params[Param.HideActions]) !== null && _a !== void 0 ? _a : [])];
27462
- params[Param.HideActions] = [
27463
- ...((_b = params[Param.HideActions]) !== null && _b !== void 0 ? _b : []),
27464
- ...HiddenActionItemByDefaultForSageEmbed,
27465
- ];
27466
- return getQueryParamString(params, true);
27467
- }
27468
- /**
27469
- * Construct the URL of the embedded ThoughtSpot sage to be
27470
- * loaded in the iframe
27471
- *
27472
- * @returns {string} iframe url
27473
- */
27474
- getIFrameSrc() {
27475
- const path = 'eureka';
27476
- const tsPostHashParams = this.getThoughtSpotPostUrlParams();
27477
- return `${this.getRootIframeSrc()}/embed/${path}${tsPostHashParams}`;
27478
- }
27479
- /**
27480
- * Render the embedded ThoughtSpot Sage
27481
- *
27482
- * @returns {SageEmbed} Eureka/Sage embed
27483
- */
27484
- render() {
27485
- super.render();
27486
- const src = this.getIFrameSrc();
27487
- this.renderV1Embed(src);
27488
- return this;
27489
- }
27490
- }
27491
-
27492
27388
  /**
27493
27389
  * Copyright (c) 2022
27494
27390
  *
@@ -27530,7 +27426,7 @@
27530
27426
  }
27531
27427
  getEmbedParams() {
27532
27428
  var _a;
27533
- const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, } = this.viewConfig;
27429
+ const { hideResults, expandAllDataSource, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, } = this.viewConfig;
27534
27430
  const queryParams = this.getBaseQueryParams();
27535
27431
  queryParams[Param.HideActions] = [
27536
27432
  ...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : []),
@@ -28068,7 +27964,6 @@
28068
27964
  * ```
28069
27965
  */
28070
27966
  const SearchBarEmbed$1 = componentFactory(SearchBarEmbed);
28071
- const SageEmbed$1 = componentFactory(SageEmbed);
28072
27967
  /**
28073
27968
  * Get a reference to the embed component to trigger events on the component.
28074
27969
  *
@@ -28091,7 +27986,6 @@
28091
27986
  exports.AppEmbed = AppEmbed$1;
28092
27987
  exports.LiveboardEmbed = LiveboardEmbed$1;
28093
27988
  exports.PinboardEmbed = PinboardEmbed;
28094
- exports.SageEmbed = SageEmbed$1;
28095
27989
  exports.SearchBarEmbed = SearchBarEmbed$1;
28096
27990
  exports.SearchEmbed = SearchEmbed$1;
28097
27991
  exports.useEmbedRef = useEmbedRef;