@thoughtspot/visual-embed-sdk 1.32.3-alpha-1 → 1.32.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. package/cjs/package.json +1 -1
  2. package/cjs/src/embed/base.d.ts.map +1 -1
  3. package/cjs/src/embed/base.js +5 -6
  4. package/cjs/src/embed/base.js.map +1 -1
  5. package/cjs/src/embed/embed.spec.js +0 -19
  6. package/cjs/src/embed/embed.spec.js.map +1 -1
  7. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  8. package/cjs/src/embed/ts-embed.js +2 -7
  9. package/cjs/src/embed/ts-embed.js.map +1 -1
  10. package/cjs/src/embed/ts-embed.spec.js +0 -9
  11. package/cjs/src/embed/ts-embed.spec.js.map +1 -1
  12. package/cjs/src/types.d.ts +0 -15
  13. package/cjs/src/types.d.ts.map +1 -1
  14. package/cjs/src/types.js +0 -1
  15. package/cjs/src/types.js.map +1 -1
  16. package/cjs/src/utils/graphql/answerService/answer-queries.d.ts +1 -0
  17. package/cjs/src/utils/graphql/answerService/answer-queries.d.ts.map +1 -1
  18. package/cjs/src/utils/graphql/answerService/answer-queries.js +9 -2
  19. package/cjs/src/utils/graphql/answerService/answer-queries.js.map +1 -1
  20. package/cjs/src/utils/graphql/answerService/answerService.d.ts +1 -0
  21. package/cjs/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
  22. package/cjs/src/utils/graphql/answerService/answerService.js +4 -0
  23. package/cjs/src/utils/graphql/answerService/answerService.js.map +1 -1
  24. package/cjs/src/utils/graphql/answerService/answerService.spec.js +35 -0
  25. package/cjs/src/utils/graphql/answerService/answerService.spec.js.map +1 -1
  26. package/cjs/src/utils/graphql/graphql-request.spec.d.ts +2 -0
  27. package/cjs/src/utils/graphql/graphql-request.spec.d.ts.map +1 -0
  28. package/cjs/src/utils/graphql/graphql-request.spec.js +36 -0
  29. package/cjs/src/utils/graphql/graphql-request.spec.js.map +1 -0
  30. package/cjs/src/utils/processData.js +2 -2
  31. package/cjs/src/utils/processData.js.map +1 -1
  32. package/cjs/src/utils/processTrigger.d.ts +1 -0
  33. package/cjs/src/utils/processTrigger.d.ts.map +1 -1
  34. package/cjs/src/utils/processTrigger.js +3 -3
  35. package/cjs/src/utils/processTrigger.js.map +1 -1
  36. package/cjs/src/utils/processTrigger.spec.js +10 -0
  37. package/cjs/src/utils/processTrigger.spec.js.map +1 -1
  38. package/cjs/src/utils.d.ts.map +1 -1
  39. package/cjs/src/utils.js +1 -5
  40. package/cjs/src/utils.js.map +1 -1
  41. package/dist/src/embed/base.d.ts.map +1 -1
  42. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  43. package/dist/src/types.d.ts +0 -15
  44. package/dist/src/types.d.ts.map +1 -1
  45. package/dist/src/utils/graphql/answerService/answer-queries.d.ts +1 -0
  46. package/dist/src/utils/graphql/answerService/answer-queries.d.ts.map +1 -1
  47. package/dist/src/utils/graphql/answerService/answerService.d.ts +1 -0
  48. package/dist/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
  49. package/dist/src/utils/graphql/graphql-request.spec.d.ts +2 -0
  50. package/dist/src/utils/graphql/graphql-request.spec.d.ts.map +1 -0
  51. package/dist/src/utils/processTrigger.d.ts +1 -0
  52. package/dist/src/utils/processTrigger.d.ts.map +1 -1
  53. package/dist/src/utils.d.ts.map +1 -1
  54. package/dist/tsembed-react.es.js +18 -17
  55. package/dist/tsembed-react.js +18 -17
  56. package/dist/tsembed.es.js +23 -23
  57. package/dist/tsembed.js +23 -23
  58. package/dist/visual-embed-sdk-react-full.d.ts +1 -15
  59. package/dist/visual-embed-sdk-react.d.ts +1 -15
  60. package/dist/visual-embed-sdk.d.ts +1 -15
  61. package/lib/package.json +1 -1
  62. package/lib/src/embed/base.d.ts.map +1 -1
  63. package/lib/src/embed/base.js +5 -6
  64. package/lib/src/embed/base.js.map +1 -1
  65. package/lib/src/embed/embed.spec.js +0 -19
  66. package/lib/src/embed/embed.spec.js.map +1 -1
  67. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  68. package/lib/src/embed/ts-embed.js +2 -7
  69. package/lib/src/embed/ts-embed.js.map +1 -1
  70. package/lib/src/embed/ts-embed.spec.js +0 -9
  71. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  72. package/lib/src/types.d.ts +0 -15
  73. package/lib/src/types.d.ts.map +1 -1
  74. package/lib/src/types.js +0 -1
  75. package/lib/src/types.js.map +1 -1
  76. package/lib/src/utils/graphql/answerService/answer-queries.d.ts +1 -0
  77. package/lib/src/utils/graphql/answerService/answer-queries.d.ts.map +1 -1
  78. package/lib/src/utils/graphql/answerService/answer-queries.js +8 -1
  79. package/lib/src/utils/graphql/answerService/answer-queries.js.map +1 -1
  80. package/lib/src/utils/graphql/answerService/answerService.d.ts +1 -0
  81. package/lib/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
  82. package/lib/src/utils/graphql/answerService/answerService.js +4 -0
  83. package/lib/src/utils/graphql/answerService/answerService.js.map +1 -1
  84. package/lib/src/utils/graphql/answerService/answerService.spec.js +36 -1
  85. package/lib/src/utils/graphql/answerService/answerService.spec.js.map +1 -1
  86. package/lib/src/utils/graphql/graphql-request.spec.d.ts +2 -0
  87. package/lib/src/utils/graphql/graphql-request.spec.d.ts.map +1 -0
  88. package/lib/src/utils/graphql/graphql-request.spec.js +33 -0
  89. package/lib/src/utils/graphql/graphql-request.spec.js.map +1 -0
  90. package/lib/src/utils/processData.js +2 -2
  91. package/lib/src/utils/processData.js.map +1 -1
  92. package/lib/src/utils/processTrigger.d.ts +1 -0
  93. package/lib/src/utils/processTrigger.d.ts.map +1 -1
  94. package/lib/src/utils/processTrigger.js +1 -1
  95. package/lib/src/utils/processTrigger.js.map +1 -1
  96. package/lib/src/utils/processTrigger.spec.js +10 -0
  97. package/lib/src/utils/processTrigger.spec.js.map +1 -1
  98. package/lib/src/utils.d.ts.map +1 -1
  99. package/lib/src/utils.js +1 -5
  100. package/lib/src/utils.js.map +1 -1
  101. package/lib/src/visual-embed-sdk.d.ts +1 -15
  102. package/package.json +1 -1
  103. package/src/embed/base.ts +0 -1
  104. package/src/embed/embed.spec.ts +0 -22
  105. package/src/embed/ts-embed.spec.ts +0 -11
  106. package/src/embed/ts-embed.ts +0 -7
  107. package/src/types.ts +0 -16
  108. package/src/utils/graphql/answerService/answer-queries.ts +9 -1
  109. package/src/utils/graphql/answerService/answerService.spec.ts +45 -0
  110. package/src/utils/graphql/answerService/answerService.ts +8 -0
  111. package/src/utils/graphql/graphql-request.spec.ts +38 -0
  112. package/src/utils/processData.ts +2 -2
  113. package/src/utils/processTrigger.spec.ts +19 -0
  114. package/src/utils/processTrigger.ts +1 -1
  115. package/src/utils.ts +0 -5
  116. package/cjs/src/hostEventsTypeMapping.d.ts +0 -2
  117. package/cjs/src/hostEventsTypeMapping.d.ts.map +0 -1
  118. package/cjs/src/hostEventsTypeMapping.js +0 -4
  119. package/cjs/src/hostEventsTypeMapping.js.map +0 -1
  120. package/dist/src/hostEventsTypeMapping.d.ts +0 -2
  121. package/dist/src/hostEventsTypeMapping.d.ts.map +0 -1
  122. package/lib/src/hostEventsTypeMapping.d.ts +0 -2
  123. package/lib/src/hostEventsTypeMapping.d.ts.map +0 -1
  124. package/lib/src/hostEventsTypeMapping.js +0 -2
  125. package/lib/src/hostEventsTypeMapping.js.map +0 -1
  126. package/src/hostEventsTypeMapping.ts +0 -23
@@ -313,8 +313,7 @@ const checkReleaseVersionInBeta = (releaseVersion, suppressBetaWarning) => {
313
313
  return false;
314
314
  };
315
315
  const getCustomisations = (embedConfig, viewConfig) => {
316
- var _a, _b, _c, _d;
317
- const customCssUrlFromEmbedConfig = embedConfig.customCssUrl;
316
+ var _a, _b;
318
317
  const customizationsFromViewConfig = viewConfig.customizations;
319
318
  const customizationsFromEmbedConfig = embedConfig.customizations
320
319
  || embedConfig.customisations;
@@ -326,9 +325,6 @@ const getCustomisations = (embedConfig, viewConfig) => {
326
325
  ...(_a = customizationsFromEmbedConfig === null || customizationsFromEmbedConfig === void 0 ? void 0 : customizationsFromEmbedConfig.style) === null || _a === void 0 ? void 0 : _a.customCSS,
327
326
  ...(_b = customizationsFromViewConfig === null || customizationsFromViewConfig === void 0 ? void 0 : customizationsFromViewConfig.style) === null || _b === void 0 ? void 0 : _b.customCSS,
328
327
  },
329
- customCSSUrl: ((_c = customizationsFromViewConfig === null || customizationsFromViewConfig === void 0 ? void 0 : customizationsFromViewConfig.style) === null || _c === void 0 ? void 0 : _c.customCSSUrl)
330
- || ((_d = customizationsFromEmbedConfig === null || customizationsFromEmbedConfig === void 0 ? void 0 : customizationsFromEmbedConfig.style) === null || _d === void 0 ? void 0 : _d.customCSSUrl)
331
- || customCssUrlFromEmbedConfig,
332
328
  },
333
329
  content: {
334
330
  ...customizationsFromEmbedConfig === null || customizationsFromEmbedConfig === void 0 ? void 0 : customizationsFromEmbedConfig.content,
@@ -2564,7 +2560,6 @@ var Param;
2564
2560
  Param["ViewPortHeight"] = "viewPortHeight";
2565
2561
  Param["ViewPortWidth"] = "viewPortWidth";
2566
2562
  Param["VisibleActions"] = "visibleAction";
2567
- Param["CustomCSSUrl"] = "customCssUrl";
2568
2563
  Param["DisableLoginRedirect"] = "disableLoginRedirect";
2569
2564
  Param["visibleVizs"] = "pinboardVisibleVizs";
2570
2565
  Param["LiveboardV2Enabled"] = "isPinboardV2Enabled";
@@ -6471,7 +6466,6 @@ const getAnswer = `
6471
6466
  isDiscoverable
6472
6467
  isHidden
6473
6468
  modifiedAt
6474
- tags
6475
6469
  }
6476
6470
  visualizations {
6477
6471
  ... on TableViz {
@@ -6516,6 +6510,14 @@ const getAnswerData = `
6516
6510
  }
6517
6511
  }
6518
6512
  }
6513
+ `;
6514
+ const getSQLQuery = `
6515
+ mutation GetSQLQuery($session: BachSessionIdInput!) {
6516
+ Answer__getQuery(session: $session) {
6517
+ ${bachSessionId}
6518
+ sql
6519
+ }
6520
+ }
6519
6521
  `;
6520
6522
 
6521
6523
  // eslint-disable-next-line no-shadow
@@ -6647,6 +6649,10 @@ class AnswerService {
6647
6649
  },
6648
6650
  });
6649
6651
  }
6652
+ async getSQLQuery() {
6653
+ const { sql } = await this.executeQuery(getSQLQuery, {});
6654
+ return sql;
6655
+ }
6650
6656
  /**
6651
6657
  * Fetch data from the answer.
6652
6658
  * @param offset
@@ -13867,8 +13873,8 @@ function processNoCookieAccess(e, containerEl) {
13867
13873
  * @param containerEl
13868
13874
  */
13869
13875
  function processAuthFailure(e, containerEl) {
13870
- const { loginFailedMessage, authType, disableLoginFailurePage } = getEmbedConfig();
13871
- if (authType !== AuthType.None && !disableLoginFailurePage) {
13876
+ const { loginFailedMessage, authType } = getEmbedConfig();
13877
+ if (authType !== AuthType.None) {
13872
13878
  // eslint-disable-next-line no-param-reassign
13873
13879
  containerEl.innerHTML = loginFailedMessage;
13874
13880
  notifyAuthFailure(AuthFailureType.OTHER);
@@ -13969,7 +13975,7 @@ function processTrigger(iFrame, messageType, thoughtSpotHost, data) {
13969
13975
  });
13970
13976
  }
13971
13977
 
13972
- var name="@thoughtspot/visual-embed-sdk";var version="1.32.3-alpha-1";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p . --incremental false; tsc -p . --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts","bundle-dts":"dts-bundle --name ../../dist/visual-embed-sdk --main lib/src/index.d.ts --outputAsModuleFolder=true","bundle-dts-react":"dts-bundle --name ../../../dist/visual-embed-sdk-react --main lib/src/react/index.d.ts --outputAsModuleFolder=true","bundle-dts-react-full":"dts-bundle --name ../../../dist/visual-embed-sdk-react-full --main lib/src/react/all-types-export.d.ts --outputAsModuleFolder=true",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.json --theme typedoc-theme --json static/typedoc/typedoc.json --disableOutputCheck","test-sdk":"jest -c jest.config.sdk.js --runInBand",test:"npm run test-sdk",posttest:"cat ./coverage/sdk/lcov.info | coveralls","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest",dev:"vite -c vite.local.config.ts"};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":"^46.9.0",eventemitter3:"^4.0.7","gatsby-plugin-vercel":"^1.0.3","html-react-parser":"^1.4.12",lodash:"^4.17.21","mixpanel-browser":"^2.45.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1"};var devDependencies={"@mdx-js/mdx":"^1.6.22","@mdx-js/react":"^1.6.22","@react-icons/all-files":"^4.1.0","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^5.0.2","@size-limit/preset-big-lib":"^8.2.6","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^22.2.3","@types/mixpanel-browser":"^2.35.6","@types/lodash":"^4.17.0","@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","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-fetch-mock":"^3.0.3",jsdom:"^17.0.0","node-sass":"^8.0.0",prettier:"2.1.2",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",vite:"^5.3.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","embedded","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version,description:description,module:module,main:main,types:types,files:files,exports:exports,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.js",limit:"48 kB"}],scripts:scripts,peerDependencies:peerDependencies,dependencies:dependencies,devDependencies:devDependencies,author:author,email:email,license:license,directories:directories,repository:repository,publishConfig:publishConfig,keywords:keywords,bugs:bugs,homepage:homepage,globals:globals};
13978
+ var name="@thoughtspot/visual-embed-sdk";var version="1.32.4";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p . --incremental false; tsc -p . --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts","bundle-dts":"dts-bundle --name ../../dist/visual-embed-sdk --main lib/src/index.d.ts --outputAsModuleFolder=true","bundle-dts-react":"dts-bundle --name ../../../dist/visual-embed-sdk-react --main lib/src/react/index.d.ts --outputAsModuleFolder=true","bundle-dts-react-full":"dts-bundle --name ../../../dist/visual-embed-sdk-react-full --main lib/src/react/all-types-export.d.ts --outputAsModuleFolder=true",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.json --theme typedoc-theme --json static/typedoc/typedoc.json --disableOutputCheck","test-sdk":"jest -c jest.config.sdk.js --runInBand",test:"npm run test-sdk",posttest:"cat ./coverage/sdk/lcov.info | coveralls","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest",dev:"vite -c vite.local.config.ts"};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":"^46.9.0",eventemitter3:"^4.0.7","gatsby-plugin-vercel":"^1.0.3","html-react-parser":"^1.4.12",lodash:"^4.17.21","mixpanel-browser":"^2.45.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1"};var devDependencies={"@mdx-js/mdx":"^1.6.22","@mdx-js/react":"^1.6.22","@react-icons/all-files":"^4.1.0","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^5.0.2","@size-limit/preset-big-lib":"^8.2.6","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^22.2.3","@types/mixpanel-browser":"^2.35.6","@types/lodash":"^4.17.0","@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","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-fetch-mock":"^3.0.3",jsdom:"^17.0.0","node-sass":"^8.0.0",prettier:"2.1.2",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",vite:"^5.3.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","embedded","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version,description:description,module:module,main:main,types:types,files:files,exports:exports,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.js",limit:"48 kB"}],scripts:scripts,peerDependencies:peerDependencies,dependencies:dependencies,devDependencies:devDependencies,author:author,email:email,license:license,directories:directories,repository:repository,publishConfig:publishConfig,keywords:keywords,bugs:bugs,homepage:homepage,globals:globals};
13973
13979
 
13974
13980
  /**
13975
13981
  * Copyright (c) 2022
@@ -14241,7 +14247,7 @@ class TsEmbed {
14241
14247
  * @returns queryParams
14242
14248
  */
14243
14249
  getBaseQueryParams(queryParams = {}) {
14244
- var _a, _b, _c, _d;
14250
+ var _a, _b, _c;
14245
14251
  let hostAppUrl = ((_a = window === null || window === void 0 ? void 0 : window.location) === null || _a === void 0 ? void 0 : _a.host) || '';
14246
14252
  // The below check is needed because TS Cloud firewall, blocks
14247
14253
  // localhost/127.0.0.1 in any url param.
@@ -14284,11 +14290,6 @@ class TsEmbed {
14284
14290
  this.handleError('You cannot have both hidden Tabs and visible Tabs');
14285
14291
  return queryParams;
14286
14292
  }
14287
- // TODO remove embedConfig.customCssUrl
14288
- const cssUrlParam = ((_c = customizations === null || customizations === void 0 ? void 0 : customizations.style) === null || _c === void 0 ? void 0 : _c.customCSSUrl) || this.embedConfig.customCssUrl;
14289
- if (cssUrlParam) {
14290
- queryParams[Param.CustomCSSUrl] = cssUrlParam;
14291
- }
14292
14293
  if (disabledActions === null || disabledActions === void 0 ? void 0 : disabledActions.length) {
14293
14294
  queryParams[Param.DisableActions] = disabledActions;
14294
14295
  }
@@ -14317,7 +14318,7 @@ class TsEmbed {
14317
14318
  queryParams[Param.ContextMenuTrigger] = false;
14318
14319
  }
14319
14320
  const spriteUrl = (customizations === null || customizations === void 0 ? void 0 : customizations.iconSpriteUrl)
14320
- || ((_d = this.embedConfig.customizations) === null || _d === void 0 ? void 0 : _d.iconSpriteUrl);
14321
+ || ((_c = this.embedConfig.customizations) === null || _c === void 0 ? void 0 : _c.iconSpriteUrl);
14321
14322
  if (spriteUrl) {
14322
14323
  queryParams[Param.IconSpriteUrl] = spriteUrl.replace('https://', '');
14323
14324
  }
@@ -321,8 +321,7 @@
321
321
  return false;
322
322
  };
323
323
  const getCustomisations = (embedConfig, viewConfig) => {
324
- var _a, _b, _c, _d;
325
- const customCssUrlFromEmbedConfig = embedConfig.customCssUrl;
324
+ var _a, _b;
326
325
  const customizationsFromViewConfig = viewConfig.customizations;
327
326
  const customizationsFromEmbedConfig = embedConfig.customizations
328
327
  || embedConfig.customisations;
@@ -334,9 +333,6 @@
334
333
  ...(_a = customizationsFromEmbedConfig === null || customizationsFromEmbedConfig === void 0 ? void 0 : customizationsFromEmbedConfig.style) === null || _a === void 0 ? void 0 : _a.customCSS,
335
334
  ...(_b = customizationsFromViewConfig === null || customizationsFromViewConfig === void 0 ? void 0 : customizationsFromViewConfig.style) === null || _b === void 0 ? void 0 : _b.customCSS,
336
335
  },
337
- customCSSUrl: ((_c = customizationsFromViewConfig === null || customizationsFromViewConfig === void 0 ? void 0 : customizationsFromViewConfig.style) === null || _c === void 0 ? void 0 : _c.customCSSUrl)
338
- || ((_d = customizationsFromEmbedConfig === null || customizationsFromEmbedConfig === void 0 ? void 0 : customizationsFromEmbedConfig.style) === null || _d === void 0 ? void 0 : _d.customCSSUrl)
339
- || customCssUrlFromEmbedConfig,
340
336
  },
341
337
  content: {
342
338
  ...customizationsFromEmbedConfig === null || customizationsFromEmbedConfig === void 0 ? void 0 : customizationsFromEmbedConfig.content,
@@ -2505,7 +2501,6 @@
2505
2501
  Param["ViewPortHeight"] = "viewPortHeight";
2506
2502
  Param["ViewPortWidth"] = "viewPortWidth";
2507
2503
  Param["VisibleActions"] = "visibleAction";
2508
- Param["CustomCSSUrl"] = "customCssUrl";
2509
2504
  Param["DisableLoginRedirect"] = "disableLoginRedirect";
2510
2505
  Param["visibleVizs"] = "pinboardVisibleVizs";
2511
2506
  Param["LiveboardV2Enabled"] = "isPinboardV2Enabled";
@@ -6383,7 +6378,6 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
6383
6378
  isDiscoverable
6384
6379
  isHidden
6385
6380
  modifiedAt
6386
- tags
6387
6381
  }
6388
6382
  visualizations {
6389
6383
  ... on TableViz {
@@ -6428,6 +6422,14 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
6428
6422
  }
6429
6423
  }
6430
6424
  }
6425
+ `;
6426
+ const getSQLQuery = `
6427
+ mutation GetSQLQuery($session: BachSessionIdInput!) {
6428
+ Answer__getQuery(session: $session) {
6429
+ ${bachSessionId}
6430
+ sql
6431
+ }
6432
+ }
6431
6433
  `;
6432
6434
 
6433
6435
  // eslint-disable-next-line no-shadow
@@ -6559,6 +6561,10 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
6559
6561
  },
6560
6562
  });
6561
6563
  }
6564
+ async getSQLQuery() {
6565
+ const { sql } = await this.executeQuery(getSQLQuery, {});
6566
+ return sql;
6567
+ }
6562
6568
  /**
6563
6569
  * Fetch data from the answer.
6564
6570
  * @param offset
@@ -13779,8 +13785,8 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
13779
13785
  * @param containerEl
13780
13786
  */
13781
13787
  function processAuthFailure(e, containerEl) {
13782
- const { loginFailedMessage, authType, disableLoginFailurePage } = getEmbedConfig();
13783
- if (authType !== AuthType.None && !disableLoginFailurePage) {
13788
+ const { loginFailedMessage, authType } = getEmbedConfig();
13789
+ if (authType !== AuthType.None) {
13784
13790
  // eslint-disable-next-line no-param-reassign
13785
13791
  containerEl.innerHTML = loginFailedMessage;
13786
13792
  notifyAuthFailure(AuthFailureType.OTHER);
@@ -13881,7 +13887,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
13881
13887
  });
13882
13888
  }
13883
13889
 
13884
- var name="@thoughtspot/visual-embed-sdk";var version="1.32.3-alpha-1";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports$1={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p . --incremental false; tsc -p . --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts","bundle-dts":"dts-bundle --name ../../dist/visual-embed-sdk --main lib/src/index.d.ts --outputAsModuleFolder=true","bundle-dts-react":"dts-bundle --name ../../../dist/visual-embed-sdk-react --main lib/src/react/index.d.ts --outputAsModuleFolder=true","bundle-dts-react-full":"dts-bundle --name ../../../dist/visual-embed-sdk-react-full --main lib/src/react/all-types-export.d.ts --outputAsModuleFolder=true",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.json --theme typedoc-theme --json static/typedoc/typedoc.json --disableOutputCheck","test-sdk":"jest -c jest.config.sdk.js --runInBand",test:"npm run test-sdk",posttest:"cat ./coverage/sdk/lcov.info | coveralls","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest",dev:"vite -c vite.local.config.ts"};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":"^46.9.0",eventemitter3:"^4.0.7","gatsby-plugin-vercel":"^1.0.3","html-react-parser":"^1.4.12",lodash:"^4.17.21","mixpanel-browser":"^2.45.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1"};var devDependencies={"@mdx-js/mdx":"^1.6.22","@mdx-js/react":"^1.6.22","@react-icons/all-files":"^4.1.0","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^5.0.2","@size-limit/preset-big-lib":"^8.2.6","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^22.2.3","@types/mixpanel-browser":"^2.35.6","@types/lodash":"^4.17.0","@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","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-fetch-mock":"^3.0.3",jsdom:"^17.0.0","node-sass":"^8.0.0",prettier:"2.1.2",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",vite:"^5.3.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","embedded","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version,description:description,module:module,main:main,types:types,files:files,exports:exports$1,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.js",limit:"48 kB"}],scripts:scripts,peerDependencies:peerDependencies,dependencies:dependencies,devDependencies:devDependencies,author:author,email:email,license:license,directories:directories,repository:repository,publishConfig:publishConfig,keywords:keywords,bugs:bugs,homepage:homepage,globals:globals};
13890
+ var name="@thoughtspot/visual-embed-sdk";var version="1.32.4";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports$1={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p . --incremental false; tsc -p . --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts","bundle-dts":"dts-bundle --name ../../dist/visual-embed-sdk --main lib/src/index.d.ts --outputAsModuleFolder=true","bundle-dts-react":"dts-bundle --name ../../../dist/visual-embed-sdk-react --main lib/src/react/index.d.ts --outputAsModuleFolder=true","bundle-dts-react-full":"dts-bundle --name ../../../dist/visual-embed-sdk-react-full --main lib/src/react/all-types-export.d.ts --outputAsModuleFolder=true",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.json --theme typedoc-theme --json static/typedoc/typedoc.json --disableOutputCheck","test-sdk":"jest -c jest.config.sdk.js --runInBand",test:"npm run test-sdk",posttest:"cat ./coverage/sdk/lcov.info | coveralls","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest",dev:"vite -c vite.local.config.ts"};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":"^46.9.0",eventemitter3:"^4.0.7","gatsby-plugin-vercel":"^1.0.3","html-react-parser":"^1.4.12",lodash:"^4.17.21","mixpanel-browser":"^2.45.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1"};var devDependencies={"@mdx-js/mdx":"^1.6.22","@mdx-js/react":"^1.6.22","@react-icons/all-files":"^4.1.0","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^5.0.2","@size-limit/preset-big-lib":"^8.2.6","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^22.2.3","@types/mixpanel-browser":"^2.35.6","@types/lodash":"^4.17.0","@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","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-fetch-mock":"^3.0.3",jsdom:"^17.0.0","node-sass":"^8.0.0",prettier:"2.1.2",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",vite:"^5.3.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","embedded","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version,description:description,module:module,main:main,types:types,files:files,exports:exports$1,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.js",limit:"48 kB"}],scripts:scripts,peerDependencies:peerDependencies,dependencies:dependencies,devDependencies:devDependencies,author:author,email:email,license:license,directories:directories,repository:repository,publishConfig:publishConfig,keywords:keywords,bugs:bugs,homepage:homepage,globals:globals};
13885
13891
 
13886
13892
  /**
13887
13893
  * Copyright (c) 2022
@@ -14153,7 +14159,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
14153
14159
  * @returns queryParams
14154
14160
  */
14155
14161
  getBaseQueryParams(queryParams = {}) {
14156
- var _a, _b, _c, _d;
14162
+ var _a, _b, _c;
14157
14163
  let hostAppUrl = ((_a = window === null || window === void 0 ? void 0 : window.location) === null || _a === void 0 ? void 0 : _a.host) || '';
14158
14164
  // The below check is needed because TS Cloud firewall, blocks
14159
14165
  // localhost/127.0.0.1 in any url param.
@@ -14196,11 +14202,6 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
14196
14202
  this.handleError('You cannot have both hidden Tabs and visible Tabs');
14197
14203
  return queryParams;
14198
14204
  }
14199
- // TODO remove embedConfig.customCssUrl
14200
- const cssUrlParam = ((_c = customizations === null || customizations === void 0 ? void 0 : customizations.style) === null || _c === void 0 ? void 0 : _c.customCSSUrl) || this.embedConfig.customCssUrl;
14201
- if (cssUrlParam) {
14202
- queryParams[Param.CustomCSSUrl] = cssUrlParam;
14203
- }
14204
14205
  if (disabledActions === null || disabledActions === void 0 ? void 0 : disabledActions.length) {
14205
14206
  queryParams[Param.DisableActions] = disabledActions;
14206
14207
  }
@@ -14229,7 +14230,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
14229
14230
  queryParams[Param.ContextMenuTrigger] = false;
14230
14231
  }
14231
14232
  const spriteUrl = (customizations === null || customizations === void 0 ? void 0 : customizations.iconSpriteUrl)
14232
- || ((_d = this.embedConfig.customizations) === null || _d === void 0 ? void 0 : _d.iconSpriteUrl);
14233
+ || ((_c = this.embedConfig.customizations) === null || _c === void 0 ? void 0 : _c.iconSpriteUrl);
14233
14234
  if (spriteUrl) {
14234
14235
  queryParams[Param.IconSpriteUrl] = spriteUrl.replace('https://', '');
14235
14236
  }
@@ -199,8 +199,7 @@ const checkReleaseVersionInBeta = (releaseVersion, suppressBetaWarning) => {
199
199
  return false;
200
200
  };
201
201
  const getCustomisations = (embedConfig, viewConfig) => {
202
- var _a, _b, _c, _d;
203
- const customCssUrlFromEmbedConfig = embedConfig.customCssUrl;
202
+ var _a, _b;
204
203
  const customizationsFromViewConfig = viewConfig.customizations;
205
204
  const customizationsFromEmbedConfig = embedConfig.customizations
206
205
  || embedConfig.customisations;
@@ -212,9 +211,6 @@ const getCustomisations = (embedConfig, viewConfig) => {
212
211
  ...(_a = customizationsFromEmbedConfig === null || customizationsFromEmbedConfig === void 0 ? void 0 : customizationsFromEmbedConfig.style) === null || _a === void 0 ? void 0 : _a.customCSS,
213
212
  ...(_b = customizationsFromViewConfig === null || customizationsFromViewConfig === void 0 ? void 0 : customizationsFromViewConfig.style) === null || _b === void 0 ? void 0 : _b.customCSS,
214
213
  },
215
- customCSSUrl: ((_c = customizationsFromViewConfig === null || customizationsFromViewConfig === void 0 ? void 0 : customizationsFromViewConfig.style) === null || _c === void 0 ? void 0 : _c.customCSSUrl)
216
- || ((_d = customizationsFromEmbedConfig === null || customizationsFromEmbedConfig === void 0 ? void 0 : customizationsFromEmbedConfig.style) === null || _d === void 0 ? void 0 : _d.customCSSUrl)
217
- || customCssUrlFromEmbedConfig,
218
214
  },
219
215
  content: {
220
216
  ...customizationsFromEmbedConfig === null || customizationsFromEmbedConfig === void 0 ? void 0 : customizationsFromEmbedConfig.content,
@@ -2450,7 +2446,6 @@ var Param;
2450
2446
  Param["ViewPortHeight"] = "viewPortHeight";
2451
2447
  Param["ViewPortWidth"] = "viewPortWidth";
2452
2448
  Param["VisibleActions"] = "visibleAction";
2453
- Param["CustomCSSUrl"] = "customCssUrl";
2454
2449
  Param["DisableLoginRedirect"] = "disableLoginRedirect";
2455
2450
  Param["visibleVizs"] = "pinboardVisibleVizs";
2456
2451
  Param["LiveboardV2Enabled"] = "isPinboardV2Enabled";
@@ -6371,7 +6366,6 @@ const getAnswer = `
6371
6366
  isDiscoverable
6372
6367
  isHidden
6373
6368
  modifiedAt
6374
- tags
6375
6369
  }
6376
6370
  visualizations {
6377
6371
  ... on TableViz {
@@ -6416,6 +6410,14 @@ const getAnswerData = `
6416
6410
  }
6417
6411
  }
6418
6412
  }
6413
+ `;
6414
+ const getSQLQuery = `
6415
+ mutation GetSQLQuery($session: BachSessionIdInput!) {
6416
+ Answer__getQuery(session: $session) {
6417
+ ${bachSessionId}
6418
+ sql
6419
+ }
6420
+ }
6419
6421
  `;
6420
6422
 
6421
6423
  // eslint-disable-next-line no-shadow
@@ -6547,6 +6549,10 @@ class AnswerService {
6547
6549
  },
6548
6550
  });
6549
6551
  }
6552
+ async getSQLQuery() {
6553
+ const { sql } = await this.executeQuery(getSQLQuery, {});
6554
+ return sql;
6555
+ }
6550
6556
  /**
6551
6557
  * Fetch data from the answer.
6552
6558
  * @param offset
@@ -13860,7 +13866,7 @@ function backwardCompat(embedConfig) {
13860
13866
  * @group Authentication / Init
13861
13867
  */
13862
13868
  const init = (embedConfig) => {
13863
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
13869
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
13864
13870
  sanity(embedConfig);
13865
13871
  resetCachedAuthToken();
13866
13872
  embedConfig = setEmbedConfig(backwardCompat({
@@ -13876,11 +13882,10 @@ const init = (embedConfig) => {
13876
13882
  const { password, ...configToTrack } = getEmbedConfig();
13877
13883
  uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_CALLED_INIT, {
13878
13884
  ...configToTrack,
13879
- usedCustomizationSheet: ((_b = (_a = embedConfig.customizations) === null || _a === void 0 ? void 0 : _a.style) === null || _b === void 0 ? void 0 : _b.customCSSUrl) != null,
13880
- usedCustomizationVariables: ((_e = (_d = (_c = embedConfig.customizations) === null || _c === void 0 ? void 0 : _c.style) === null || _d === void 0 ? void 0 : _d.customCSS) === null || _e === void 0 ? void 0 : _e.variables) != null,
13881
- usedCustomizationRules: ((_h = (_g = (_f = embedConfig.customizations) === null || _f === void 0 ? void 0 : _f.style) === null || _g === void 0 ? void 0 : _g.customCSS) === null || _h === void 0 ? void 0 : _h.rules_UNSTABLE) != null,
13882
- usedCustomizationStrings: !!((_k = (_j = embedConfig.customizations) === null || _j === void 0 ? void 0 : _j.content) === null || _k === void 0 ? void 0 : _k.strings),
13883
- usedCustomizationIconSprite: !!((_l = embedConfig.customizations) === null || _l === void 0 ? void 0 : _l.iconSpriteUrl),
13885
+ usedCustomizationVariables: ((_c = (_b = (_a = embedConfig.customizations) === null || _a === void 0 ? void 0 : _a.style) === null || _b === void 0 ? void 0 : _b.customCSS) === null || _c === void 0 ? void 0 : _c.variables) != null,
13886
+ usedCustomizationRules: ((_f = (_e = (_d = embedConfig.customizations) === null || _d === void 0 ? void 0 : _d.style) === null || _e === void 0 ? void 0 : _e.customCSS) === null || _f === void 0 ? void 0 : _f.rules_UNSTABLE) != null,
13887
+ usedCustomizationStrings: !!((_h = (_g = embedConfig.customizations) === null || _g === void 0 ? void 0 : _g.content) === null || _h === void 0 ? void 0 : _h.strings),
13888
+ usedCustomizationIconSprite: !!((_j = embedConfig.customizations) === null || _j === void 0 ? void 0 : _j.iconSpriteUrl),
13884
13889
  });
13885
13890
  if (getEmbedConfig().callPrefetch) {
13886
13891
  prefetch(getEmbedConfig().thoughtSpotHost);
@@ -14101,8 +14106,8 @@ function processNoCookieAccess(e, containerEl) {
14101
14106
  * @param containerEl
14102
14107
  */
14103
14108
  function processAuthFailure(e, containerEl) {
14104
- const { loginFailedMessage, authType, disableLoginFailurePage } = getEmbedConfig();
14105
- if (authType !== AuthType.None && !disableLoginFailurePage) {
14109
+ const { loginFailedMessage, authType } = getEmbedConfig();
14110
+ if (authType !== AuthType.None) {
14106
14111
  // eslint-disable-next-line no-param-reassign
14107
14112
  containerEl.innerHTML = loginFailedMessage;
14108
14113
  notifyAuthFailure(AuthFailureType.OTHER);
@@ -14203,7 +14208,7 @@ function processTrigger(iFrame, messageType, thoughtSpotHost, data) {
14203
14208
  });
14204
14209
  }
14205
14210
 
14206
- var name="@thoughtspot/visual-embed-sdk";var version="1.32.3-alpha-1";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p . --incremental false; tsc -p . --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts","bundle-dts":"dts-bundle --name ../../dist/visual-embed-sdk --main lib/src/index.d.ts --outputAsModuleFolder=true","bundle-dts-react":"dts-bundle --name ../../../dist/visual-embed-sdk-react --main lib/src/react/index.d.ts --outputAsModuleFolder=true","bundle-dts-react-full":"dts-bundle --name ../../../dist/visual-embed-sdk-react-full --main lib/src/react/all-types-export.d.ts --outputAsModuleFolder=true",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.json --theme typedoc-theme --json static/typedoc/typedoc.json --disableOutputCheck","test-sdk":"jest -c jest.config.sdk.js --runInBand",test:"npm run test-sdk",posttest:"cat ./coverage/sdk/lcov.info | coveralls","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest",dev:"vite -c vite.local.config.ts"};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":"^46.9.0",eventemitter3:"^4.0.7","gatsby-plugin-vercel":"^1.0.3","html-react-parser":"^1.4.12",lodash:"^4.17.21","mixpanel-browser":"^2.45.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1"};var devDependencies={"@mdx-js/mdx":"^1.6.22","@mdx-js/react":"^1.6.22","@react-icons/all-files":"^4.1.0","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^5.0.2","@size-limit/preset-big-lib":"^8.2.6","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^22.2.3","@types/mixpanel-browser":"^2.35.6","@types/lodash":"^4.17.0","@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","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-fetch-mock":"^3.0.3",jsdom:"^17.0.0","node-sass":"^8.0.0",prettier:"2.1.2",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",vite:"^5.3.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","embedded","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version,description:description,module:module,main:main,types:types,files:files,exports:exports,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.js",limit:"48 kB"}],scripts:scripts,peerDependencies:peerDependencies,dependencies:dependencies,devDependencies:devDependencies,author:author,email:email,license:license,directories:directories,repository:repository,publishConfig:publishConfig,keywords:keywords,bugs:bugs,homepage:homepage,globals:globals};
14211
+ var name="@thoughtspot/visual-embed-sdk";var version="1.32.4";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p . --incremental false; tsc -p . --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts","bundle-dts":"dts-bundle --name ../../dist/visual-embed-sdk --main lib/src/index.d.ts --outputAsModuleFolder=true","bundle-dts-react":"dts-bundle --name ../../../dist/visual-embed-sdk-react --main lib/src/react/index.d.ts --outputAsModuleFolder=true","bundle-dts-react-full":"dts-bundle --name ../../../dist/visual-embed-sdk-react-full --main lib/src/react/all-types-export.d.ts --outputAsModuleFolder=true",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.json --theme typedoc-theme --json static/typedoc/typedoc.json --disableOutputCheck","test-sdk":"jest -c jest.config.sdk.js --runInBand",test:"npm run test-sdk",posttest:"cat ./coverage/sdk/lcov.info | coveralls","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest",dev:"vite -c vite.local.config.ts"};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":"^46.9.0",eventemitter3:"^4.0.7","gatsby-plugin-vercel":"^1.0.3","html-react-parser":"^1.4.12",lodash:"^4.17.21","mixpanel-browser":"^2.45.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1"};var devDependencies={"@mdx-js/mdx":"^1.6.22","@mdx-js/react":"^1.6.22","@react-icons/all-files":"^4.1.0","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^5.0.2","@size-limit/preset-big-lib":"^8.2.6","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^22.2.3","@types/mixpanel-browser":"^2.35.6","@types/lodash":"^4.17.0","@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","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-fetch-mock":"^3.0.3",jsdom:"^17.0.0","node-sass":"^8.0.0",prettier:"2.1.2",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",vite:"^5.3.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","embedded","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version,description:description,module:module,main:main,types:types,files:files,exports:exports,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.js",limit:"48 kB"}],scripts:scripts,peerDependencies:peerDependencies,dependencies:dependencies,devDependencies:devDependencies,author:author,email:email,license:license,directories:directories,repository:repository,publishConfig:publishConfig,keywords:keywords,bugs:bugs,homepage:homepage,globals:globals};
14207
14212
 
14208
14213
  /**
14209
14214
  * Copyright (c) 2022
@@ -14475,7 +14480,7 @@ class TsEmbed {
14475
14480
  * @returns queryParams
14476
14481
  */
14477
14482
  getBaseQueryParams(queryParams = {}) {
14478
- var _a, _b, _c, _d;
14483
+ var _a, _b, _c;
14479
14484
  let hostAppUrl = ((_a = window === null || window === void 0 ? void 0 : window.location) === null || _a === void 0 ? void 0 : _a.host) || '';
14480
14485
  // The below check is needed because TS Cloud firewall, blocks
14481
14486
  // localhost/127.0.0.1 in any url param.
@@ -14518,11 +14523,6 @@ class TsEmbed {
14518
14523
  this.handleError('You cannot have both hidden Tabs and visible Tabs');
14519
14524
  return queryParams;
14520
14525
  }
14521
- // TODO remove embedConfig.customCssUrl
14522
- const cssUrlParam = ((_c = customizations === null || customizations === void 0 ? void 0 : customizations.style) === null || _c === void 0 ? void 0 : _c.customCSSUrl) || this.embedConfig.customCssUrl;
14523
- if (cssUrlParam) {
14524
- queryParams[Param.CustomCSSUrl] = cssUrlParam;
14525
- }
14526
14526
  if (disabledActions === null || disabledActions === void 0 ? void 0 : disabledActions.length) {
14527
14527
  queryParams[Param.DisableActions] = disabledActions;
14528
14528
  }
@@ -14551,7 +14551,7 @@ class TsEmbed {
14551
14551
  queryParams[Param.ContextMenuTrigger] = false;
14552
14552
  }
14553
14553
  const spriteUrl = (customizations === null || customizations === void 0 ? void 0 : customizations.iconSpriteUrl)
14554
- || ((_d = this.embedConfig.customizations) === null || _d === void 0 ? void 0 : _d.iconSpriteUrl);
14554
+ || ((_c = this.embedConfig.customizations) === null || _c === void 0 ? void 0 : _c.iconSpriteUrl);
14555
14555
  if (spriteUrl) {
14556
14556
  queryParams[Param.IconSpriteUrl] = spriteUrl.replace('https://', '');
14557
14557
  }
package/dist/tsembed.js CHANGED
@@ -205,8 +205,7 @@
205
205
  return false;
206
206
  };
207
207
  const getCustomisations = (embedConfig, viewConfig) => {
208
- var _a, _b, _c, _d;
209
- const customCssUrlFromEmbedConfig = embedConfig.customCssUrl;
208
+ var _a, _b;
210
209
  const customizationsFromViewConfig = viewConfig.customizations;
211
210
  const customizationsFromEmbedConfig = embedConfig.customizations
212
211
  || embedConfig.customisations;
@@ -218,9 +217,6 @@
218
217
  ...(_a = customizationsFromEmbedConfig === null || customizationsFromEmbedConfig === void 0 ? void 0 : customizationsFromEmbedConfig.style) === null || _a === void 0 ? void 0 : _a.customCSS,
219
218
  ...(_b = customizationsFromViewConfig === null || customizationsFromViewConfig === void 0 ? void 0 : customizationsFromViewConfig.style) === null || _b === void 0 ? void 0 : _b.customCSS,
220
219
  },
221
- customCSSUrl: ((_c = customizationsFromViewConfig === null || customizationsFromViewConfig === void 0 ? void 0 : customizationsFromViewConfig.style) === null || _c === void 0 ? void 0 : _c.customCSSUrl)
222
- || ((_d = customizationsFromEmbedConfig === null || customizationsFromEmbedConfig === void 0 ? void 0 : customizationsFromEmbedConfig.style) === null || _d === void 0 ? void 0 : _d.customCSSUrl)
223
- || customCssUrlFromEmbedConfig,
224
220
  },
225
221
  content: {
226
222
  ...customizationsFromEmbedConfig === null || customizationsFromEmbedConfig === void 0 ? void 0 : customizationsFromEmbedConfig.content,
@@ -2376,7 +2372,6 @@
2376
2372
  Param["ViewPortHeight"] = "viewPortHeight";
2377
2373
  Param["ViewPortWidth"] = "viewPortWidth";
2378
2374
  Param["VisibleActions"] = "visibleAction";
2379
- Param["CustomCSSUrl"] = "customCssUrl";
2380
2375
  Param["DisableLoginRedirect"] = "disableLoginRedirect";
2381
2376
  Param["visibleVizs"] = "pinboardVisibleVizs";
2382
2377
  Param["LiveboardV2Enabled"] = "isPinboardV2Enabled";
@@ -6263,7 +6258,6 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
6263
6258
  isDiscoverable
6264
6259
  isHidden
6265
6260
  modifiedAt
6266
- tags
6267
6261
  }
6268
6262
  visualizations {
6269
6263
  ... on TableViz {
@@ -6308,6 +6302,14 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
6308
6302
  }
6309
6303
  }
6310
6304
  }
6305
+ `;
6306
+ const getSQLQuery = `
6307
+ mutation GetSQLQuery($session: BachSessionIdInput!) {
6308
+ Answer__getQuery(session: $session) {
6309
+ ${bachSessionId}
6310
+ sql
6311
+ }
6312
+ }
6311
6313
  `;
6312
6314
 
6313
6315
  // eslint-disable-next-line no-shadow
@@ -6439,6 +6441,10 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
6439
6441
  },
6440
6442
  });
6441
6443
  }
6444
+ async getSQLQuery() {
6445
+ const { sql } = await this.executeQuery(getSQLQuery, {});
6446
+ return sql;
6447
+ }
6442
6448
  /**
6443
6449
  * Fetch data from the answer.
6444
6450
  * @param offset
@@ -13736,7 +13742,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
13736
13742
  * @group Authentication / Init
13737
13743
  */
13738
13744
  const init = (embedConfig) => {
13739
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
13745
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
13740
13746
  sanity(embedConfig);
13741
13747
  resetCachedAuthToken();
13742
13748
  embedConfig = setEmbedConfig(backwardCompat({
@@ -13752,11 +13758,10 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
13752
13758
  const { password, ...configToTrack } = getEmbedConfig();
13753
13759
  uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_CALLED_INIT, {
13754
13760
  ...configToTrack,
13755
- usedCustomizationSheet: ((_b = (_a = embedConfig.customizations) === null || _a === void 0 ? void 0 : _a.style) === null || _b === void 0 ? void 0 : _b.customCSSUrl) != null,
13756
- usedCustomizationVariables: ((_e = (_d = (_c = embedConfig.customizations) === null || _c === void 0 ? void 0 : _c.style) === null || _d === void 0 ? void 0 : _d.customCSS) === null || _e === void 0 ? void 0 : _e.variables) != null,
13757
- usedCustomizationRules: ((_h = (_g = (_f = embedConfig.customizations) === null || _f === void 0 ? void 0 : _f.style) === null || _g === void 0 ? void 0 : _g.customCSS) === null || _h === void 0 ? void 0 : _h.rules_UNSTABLE) != null,
13758
- usedCustomizationStrings: !!((_k = (_j = embedConfig.customizations) === null || _j === void 0 ? void 0 : _j.content) === null || _k === void 0 ? void 0 : _k.strings),
13759
- usedCustomizationIconSprite: !!((_l = embedConfig.customizations) === null || _l === void 0 ? void 0 : _l.iconSpriteUrl),
13761
+ usedCustomizationVariables: ((_c = (_b = (_a = embedConfig.customizations) === null || _a === void 0 ? void 0 : _a.style) === null || _b === void 0 ? void 0 : _b.customCSS) === null || _c === void 0 ? void 0 : _c.variables) != null,
13762
+ usedCustomizationRules: ((_f = (_e = (_d = embedConfig.customizations) === null || _d === void 0 ? void 0 : _d.style) === null || _e === void 0 ? void 0 : _e.customCSS) === null || _f === void 0 ? void 0 : _f.rules_UNSTABLE) != null,
13763
+ usedCustomizationStrings: !!((_h = (_g = embedConfig.customizations) === null || _g === void 0 ? void 0 : _g.content) === null || _h === void 0 ? void 0 : _h.strings),
13764
+ usedCustomizationIconSprite: !!((_j = embedConfig.customizations) === null || _j === void 0 ? void 0 : _j.iconSpriteUrl),
13760
13765
  });
13761
13766
  if (getEmbedConfig().callPrefetch) {
13762
13767
  prefetch(getEmbedConfig().thoughtSpotHost);
@@ -13977,8 +13982,8 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
13977
13982
  * @param containerEl
13978
13983
  */
13979
13984
  function processAuthFailure(e, containerEl) {
13980
- const { loginFailedMessage, authType, disableLoginFailurePage } = getEmbedConfig();
13981
- if (authType !== exports.AuthType.None && !disableLoginFailurePage) {
13985
+ const { loginFailedMessage, authType } = getEmbedConfig();
13986
+ if (authType !== exports.AuthType.None) {
13982
13987
  // eslint-disable-next-line no-param-reassign
13983
13988
  containerEl.innerHTML = loginFailedMessage;
13984
13989
  notifyAuthFailure(exports.AuthFailureType.OTHER);
@@ -14079,7 +14084,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
14079
14084
  });
14080
14085
  }
14081
14086
 
14082
- var name="@thoughtspot/visual-embed-sdk";var version="1.32.3-alpha-1";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports$1={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p . --incremental false; tsc -p . --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts","bundle-dts":"dts-bundle --name ../../dist/visual-embed-sdk --main lib/src/index.d.ts --outputAsModuleFolder=true","bundle-dts-react":"dts-bundle --name ../../../dist/visual-embed-sdk-react --main lib/src/react/index.d.ts --outputAsModuleFolder=true","bundle-dts-react-full":"dts-bundle --name ../../../dist/visual-embed-sdk-react-full --main lib/src/react/all-types-export.d.ts --outputAsModuleFolder=true",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.json --theme typedoc-theme --json static/typedoc/typedoc.json --disableOutputCheck","test-sdk":"jest -c jest.config.sdk.js --runInBand",test:"npm run test-sdk",posttest:"cat ./coverage/sdk/lcov.info | coveralls","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest",dev:"vite -c vite.local.config.ts"};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":"^46.9.0",eventemitter3:"^4.0.7","gatsby-plugin-vercel":"^1.0.3","html-react-parser":"^1.4.12",lodash:"^4.17.21","mixpanel-browser":"^2.45.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1"};var devDependencies={"@mdx-js/mdx":"^1.6.22","@mdx-js/react":"^1.6.22","@react-icons/all-files":"^4.1.0","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^5.0.2","@size-limit/preset-big-lib":"^8.2.6","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^22.2.3","@types/mixpanel-browser":"^2.35.6","@types/lodash":"^4.17.0","@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","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-fetch-mock":"^3.0.3",jsdom:"^17.0.0","node-sass":"^8.0.0",prettier:"2.1.2",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",vite:"^5.3.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","embedded","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version,description:description,module:module,main:main,types:types,files:files,exports:exports$1,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.js",limit:"48 kB"}],scripts:scripts,peerDependencies:peerDependencies,dependencies:dependencies,devDependencies:devDependencies,author:author,email:email,license:license,directories:directories,repository:repository,publishConfig:publishConfig,keywords:keywords,bugs:bugs,homepage:homepage,globals:globals};
14087
+ var name="@thoughtspot/visual-embed-sdk";var version="1.32.4";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports$1={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p . --incremental false; tsc -p . --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts","bundle-dts":"dts-bundle --name ../../dist/visual-embed-sdk --main lib/src/index.d.ts --outputAsModuleFolder=true","bundle-dts-react":"dts-bundle --name ../../../dist/visual-embed-sdk-react --main lib/src/react/index.d.ts --outputAsModuleFolder=true","bundle-dts-react-full":"dts-bundle --name ../../../dist/visual-embed-sdk-react-full --main lib/src/react/all-types-export.d.ts --outputAsModuleFolder=true",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.json --theme typedoc-theme --json static/typedoc/typedoc.json --disableOutputCheck","test-sdk":"jest -c jest.config.sdk.js --runInBand",test:"npm run test-sdk",posttest:"cat ./coverage/sdk/lcov.info | coveralls","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest",dev:"vite -c vite.local.config.ts"};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":"^46.9.0",eventemitter3:"^4.0.7","gatsby-plugin-vercel":"^1.0.3","html-react-parser":"^1.4.12",lodash:"^4.17.21","mixpanel-browser":"^2.45.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1"};var devDependencies={"@mdx-js/mdx":"^1.6.22","@mdx-js/react":"^1.6.22","@react-icons/all-files":"^4.1.0","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^5.0.2","@size-limit/preset-big-lib":"^8.2.6","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^22.2.3","@types/mixpanel-browser":"^2.35.6","@types/lodash":"^4.17.0","@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","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-fetch-mock":"^3.0.3",jsdom:"^17.0.0","node-sass":"^8.0.0",prettier:"2.1.2",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",vite:"^5.3.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","embedded","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version,description:description,module:module,main:main,types:types,files:files,exports:exports$1,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.js",limit:"48 kB"}],scripts:scripts,peerDependencies:peerDependencies,dependencies:dependencies,devDependencies:devDependencies,author:author,email:email,license:license,directories:directories,repository:repository,publishConfig:publishConfig,keywords:keywords,bugs:bugs,homepage:homepage,globals:globals};
14083
14088
 
14084
14089
  /**
14085
14090
  * Copyright (c) 2022
@@ -14351,7 +14356,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
14351
14356
  * @returns queryParams
14352
14357
  */
14353
14358
  getBaseQueryParams(queryParams = {}) {
14354
- var _a, _b, _c, _d;
14359
+ var _a, _b, _c;
14355
14360
  let hostAppUrl = ((_a = window === null || window === void 0 ? void 0 : window.location) === null || _a === void 0 ? void 0 : _a.host) || '';
14356
14361
  // The below check is needed because TS Cloud firewall, blocks
14357
14362
  // localhost/127.0.0.1 in any url param.
@@ -14394,11 +14399,6 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
14394
14399
  this.handleError('You cannot have both hidden Tabs and visible Tabs');
14395
14400
  return queryParams;
14396
14401
  }
14397
- // TODO remove embedConfig.customCssUrl
14398
- const cssUrlParam = ((_c = customizations === null || customizations === void 0 ? void 0 : customizations.style) === null || _c === void 0 ? void 0 : _c.customCSSUrl) || this.embedConfig.customCssUrl;
14399
- if (cssUrlParam) {
14400
- queryParams[Param.CustomCSSUrl] = cssUrlParam;
14401
- }
14402
14402
  if (disabledActions === null || disabledActions === void 0 ? void 0 : disabledActions.length) {
14403
14403
  queryParams[Param.DisableActions] = disabledActions;
14404
14404
  }
@@ -14427,7 +14427,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
14427
14427
  queryParams[Param.ContextMenuTrigger] = false;
14428
14428
  }
14429
14429
  const spriteUrl = (customizations === null || customizations === void 0 ? void 0 : customizations.iconSpriteUrl)
14430
- || ((_d = this.embedConfig.customizations) === null || _d === void 0 ? void 0 : _d.iconSpriteUrl);
14430
+ || ((_c = this.embedConfig.customizations) === null || _c === void 0 ? void 0 : _c.iconSpriteUrl);
14431
14431
  if (spriteUrl) {
14432
14432
  queryParams[Param.IconSpriteUrl] = spriteUrl.replace('https://', '');
14433
14433
  }