@thoughtspot/visual-embed-sdk 1.22.0-alpha.4 → 1.22.0-alpha.6

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 (87) hide show
  1. package/cjs/package.json +1 -1
  2. package/cjs/src/embed/sage.d.ts +73 -0
  3. package/cjs/src/embed/sage.d.ts.map +1 -0
  4. package/cjs/src/embed/sage.js +81 -0
  5. package/cjs/src/embed/sage.js.map +1 -0
  6. package/cjs/src/embed/sage.spec.d.ts +2 -0
  7. package/cjs/src/embed/sage.spec.d.ts.map +1 -0
  8. package/cjs/src/embed/sage.spec.js +34 -0
  9. package/cjs/src/embed/sage.spec.js.map +1 -0
  10. package/cjs/src/errors.d.ts +1 -0
  11. package/cjs/src/errors.d.ts.map +1 -1
  12. package/cjs/src/errors.js +1 -0
  13. package/cjs/src/errors.js.map +1 -1
  14. package/cjs/src/index.d.ts +2 -1
  15. package/cjs/src/index.d.ts.map +1 -1
  16. package/cjs/src/index.js +3 -1
  17. package/cjs/src/index.js.map +1 -1
  18. package/cjs/src/react/index.d.ts +4 -0
  19. package/cjs/src/react/index.d.ts.map +1 -1
  20. package/cjs/src/react/index.js +3 -1
  21. package/cjs/src/react/index.js.map +1 -1
  22. package/cjs/src/test/test-utils.d.ts +1 -0
  23. package/cjs/src/test/test-utils.d.ts.map +1 -1
  24. package/cjs/src/test/test-utils.js +8 -1
  25. package/cjs/src/test/test-utils.js.map +1 -1
  26. package/cjs/src/types.d.ts +12 -1
  27. package/cjs/src/types.d.ts.map +1 -1
  28. package/cjs/src/types.js +5 -0
  29. package/cjs/src/types.js.map +1 -1
  30. package/dist/src/embed/sage.d.ts +73 -0
  31. package/dist/src/embed/sage.d.ts.map +1 -0
  32. package/dist/src/embed/sage.spec.d.ts +2 -0
  33. package/dist/src/embed/sage.spec.d.ts.map +1 -0
  34. package/dist/src/errors.d.ts +1 -0
  35. package/dist/src/errors.d.ts.map +1 -1
  36. package/dist/src/index.d.ts +2 -1
  37. package/dist/src/index.d.ts.map +1 -1
  38. package/dist/src/react/index.d.ts +4 -0
  39. package/dist/src/react/index.d.ts.map +1 -1
  40. package/dist/src/test/test-utils.d.ts +1 -0
  41. package/dist/src/test/test-utils.d.ts.map +1 -1
  42. package/dist/src/types.d.ts +12 -1
  43. package/dist/src/types.d.ts.map +1 -1
  44. package/dist/tsembed-react.es.js +83 -2
  45. package/dist/tsembed-react.js +83 -1
  46. package/dist/tsembed.es.js +82 -2
  47. package/dist/tsembed.js +82 -1
  48. package/dist/visual-embed-sdk-react-full.d.ts +80 -2
  49. package/dist/visual-embed-sdk-react.d.ts +80 -2
  50. package/dist/visual-embed-sdk.d.ts +77 -2
  51. package/lib/package.json +1 -1
  52. package/lib/src/embed/sage.d.ts +73 -0
  53. package/lib/src/embed/sage.d.ts.map +1 -0
  54. package/lib/src/embed/sage.js +77 -0
  55. package/lib/src/embed/sage.js.map +1 -0
  56. package/lib/src/embed/sage.spec.d.ts +2 -0
  57. package/lib/src/embed/sage.spec.d.ts.map +1 -0
  58. package/lib/src/embed/sage.spec.js +32 -0
  59. package/lib/src/embed/sage.spec.js.map +1 -0
  60. package/lib/src/errors.d.ts +1 -0
  61. package/lib/src/errors.d.ts.map +1 -1
  62. package/lib/src/errors.js +1 -0
  63. package/lib/src/errors.js.map +1 -1
  64. package/lib/src/index.d.ts +2 -1
  65. package/lib/src/index.d.ts.map +1 -1
  66. package/lib/src/index.js +2 -1
  67. package/lib/src/index.js.map +1 -1
  68. package/lib/src/react/index.d.ts +4 -0
  69. package/lib/src/react/index.d.ts.map +1 -1
  70. package/lib/src/react/index.js +2 -0
  71. package/lib/src/react/index.js.map +1 -1
  72. package/lib/src/test/test-utils.d.ts +1 -0
  73. package/lib/src/test/test-utils.d.ts.map +1 -1
  74. package/lib/src/test/test-utils.js +6 -0
  75. package/lib/src/test/test-utils.js.map +1 -1
  76. package/lib/src/types.d.ts +12 -1
  77. package/lib/src/types.d.ts.map +1 -1
  78. package/lib/src/types.js +5 -0
  79. package/lib/src/types.js.map +1 -1
  80. package/package.json +1 -1
  81. package/src/embed/sage.spec.ts +45 -0
  82. package/src/embed/sage.ts +127 -0
  83. package/src/errors.ts +1 -0
  84. package/src/index.ts +2 -0
  85. package/src/react/index.tsx +9 -0
  86. package/src/test/test-utils.ts +7 -0
  87. package/src/types.ts +13 -2
@@ -1479,6 +1479,11 @@ var Param;
1479
1479
  Param["HideProfleAndHelp"] = "profileAndHelpInNavBarHidden";
1480
1480
  Param["HideApplicationSwitcher"] = "applicationSwitcherHidden";
1481
1481
  Param["HideOrgSwitcher"] = "orgSwitcherHidden";
1482
+ Param["IsSageEmbed"] = "isSageEmbed";
1483
+ Param["HideWorksheetSelector"] = "hideWorksheetSelector";
1484
+ Param["DisableWorksheetChange"] = "disableWorksheetChange";
1485
+ Param["HideEurekaResults"] = "hideEurekaResults";
1486
+ Param["HideEurekaSuggestions"] = "hideEurekaSuggestions";
1482
1487
  })(Param || (Param = {}));
1483
1488
  /**
1484
1489
  * The list of actions that can be performed on visual ThoughtSpot
@@ -1737,6 +1742,7 @@ const ERROR_MESSAGE = {
1737
1742
  LIVEBOARD_VIZ_ID_VALIDATION: 'Please provide either liveboardId or pinboardId',
1738
1743
  TRIGGER_TIMED_OUT: 'Trigger timedout in getting response',
1739
1744
  SEARCHEMBED_BETA_WRANING_MESSAGE: 'Search Embed is in Beta in this release.',
1745
+ SAGE_EMBED_BETA_WARNING_MESSAGE: 'Sage Embed is in Beta in this release.',
1740
1746
  };
1741
1747
 
1742
1748
  /**
@@ -27517,7 +27523,7 @@ function processTrigger(iFrame, messageType, thoughtSpotHost, data) {
27517
27523
  });
27518
27524
  }
27519
27525
 
27520
- var name="@thoughtspot/visual-embed-sdk";var version="1.22.0-alpha.4";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p . --incremental false; tsc -p . --incremental false --module commonjs --outDir cjs",start:"gatsby develop","build:gatsby":"npm run clean:gatsby && gatsby build --prefix-paths","build:gatsby:noprefix":"npm run clean:gatsby && gatsby build","serve:gatsby":"gatsby serve","clean:gatsby":"gatsby clean","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts":"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",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1"};var devDependencies={"@mdx-js/mdx":"^1.6.22","@mdx-js/react":"^1.6.22","@react-icons/all-files":"^4.1.0","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^5.0.2","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^22.2.3","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^4.6.0","@typescript-eslint/parser":"^4.6.0",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1",coveralls:"^3.1.0","current-git-branch":"^1.1.0","dts-bundle":"^0.7.3",eslint:"^7.12.1","eslint-config-airbnb-base":"^14.2.0","eslint-config-prettier":"^6.15.0","eslint-import-resolver-typescript":"^2.3.0","eslint-plugin-import":"^2.22.1","eslint-plugin-prettier":"^3.1.4","eslint-plugin-react-hooks":"^4.2.0","fs-extra":"^10.0.0",gatsby:"3.13.1","gatsby-plugin-algolia":"^0.22.2","gatsby-plugin-catch-links":"^3.1.0","gatsby-plugin-env-variables":"^2.1.0","gatsby-plugin-intl":"^0.3.3","gatsby-plugin-manifest":"^3.2.0","gatsby-plugin-output":"^0.1.3","gatsby-plugin-sass":"6.7.0","gatsby-plugin-sitemap":"^4.10.0","gatsby-source-filesystem":"3.1.0","gatsby-transformer-asciidoc":"2.1.0","gatsby-transformer-rehype":"2.0.0","gh-pages":"^3.1.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^1.1.1",jest:"^26.6.3","jest-puppeteer":"^4.4.0",jsdom:"^17.0.0","node-sass":"^8.0.0",prettier:"2.1.2",puppeteer:"^7.0.1",react:"^16.14.0","react-dom":"^16.14.0","react-resizable":"^1.11.0","react-resize-detector":"^6.6.0","react-test-renderer":"^17.0.2","react-use-flexsearch":"^0.1.1",rollup:"2.30.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^26.5.5","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","url-search-params-polyfill":"^8.1.0",util:"^0.12.4"};var author="ThoughtSpot";var email="support@thoughtspot.com";var license="ThoughtSpot Development Tools End User License Agreement";var directories={lib:"lib"};var repository={type:"git",url:"git+https://github.com/thoughtspot/visual-embed-sdk.git"};var publishConfig={registry:"https://registry.npmjs.org"};var keywords=["thoughtspot","everywhere","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version,description:description,module:module,main:main,types:types,files:files,exports:exports,typesVersions:typesVersions,scripts:scripts,peerDependencies:peerDependencies,dependencies:dependencies,devDependencies:devDependencies,author:author,email:email,license:license,directories:directories,repository:repository,publishConfig:publishConfig,keywords:keywords,bugs:bugs,homepage:homepage,globals:globals};
27526
+ var name="@thoughtspot/visual-embed-sdk";var version="1.22.0-alpha.6";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p . --incremental false; tsc -p . --incremental false --module commonjs --outDir cjs",start:"gatsby develop","build:gatsby":"npm run clean:gatsby && gatsby build --prefix-paths","build:gatsby:noprefix":"npm run clean:gatsby && gatsby build","serve:gatsby":"gatsby serve","clean:gatsby":"gatsby clean","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts":"dts-bundle --name ../../dist/visual-embed-sdk --main lib/src/index.d.ts --outputAsModuleFolder=true","bundle-dts-react":"dts-bundle --name ../../../dist/visual-embed-sdk-react --main lib/src/react/index.d.ts --outputAsModuleFolder=true","bundle-dts-react-full":"dts-bundle --name ../../../dist/visual-embed-sdk-react-full --main lib/src/react/all-types-export.d.ts --outputAsModuleFolder=true",build:"rollup -c",watch:"rollup -cw","docs-cmd":"node scripts/gatsby-commands.js",docgen:"typedoc --tsconfig tsconfig.json --theme typedoc-theme","test-sdk":"jest -c jest.config.sdk.js --runInBand","test-docs":"jest -c jest.config.docs.js",test:"npm run test-sdk && npm run test-docs",posttest:"cat ./coverage/sdk/lcov.info | coveralls","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",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1"};var devDependencies={"@mdx-js/mdx":"^1.6.22","@mdx-js/react":"^1.6.22","@react-icons/all-files":"^4.1.0","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^5.0.2","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^22.2.3","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^4.6.0","@typescript-eslint/parser":"^4.6.0",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1",coveralls:"^3.1.0","current-git-branch":"^1.1.0","dts-bundle":"^0.7.3",eslint:"^7.12.1","eslint-config-airbnb-base":"^14.2.0","eslint-config-prettier":"^6.15.0","eslint-import-resolver-typescript":"^2.3.0","eslint-plugin-import":"^2.22.1","eslint-plugin-prettier":"^3.1.4","eslint-plugin-react-hooks":"^4.2.0","fs-extra":"^10.0.0",gatsby:"3.13.1","gatsby-plugin-algolia":"^0.22.2","gatsby-plugin-catch-links":"^3.1.0","gatsby-plugin-env-variables":"^2.1.0","gatsby-plugin-intl":"^0.3.3","gatsby-plugin-manifest":"^3.2.0","gatsby-plugin-output":"^0.1.3","gatsby-plugin-sass":"6.7.0","gatsby-plugin-sitemap":"^4.10.0","gatsby-source-filesystem":"3.1.0","gatsby-transformer-asciidoc":"2.1.0","gatsby-transformer-rehype":"2.0.0","gh-pages":"^3.1.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^1.1.1",jest:"^26.6.3","jest-puppeteer":"^4.4.0",jsdom:"^17.0.0","node-sass":"^8.0.0",prettier:"2.1.2",puppeteer:"^7.0.1",react:"^16.14.0","react-dom":"^16.14.0","react-resizable":"^1.11.0","react-resize-detector":"^6.6.0","react-test-renderer":"^17.0.2","react-use-flexsearch":"^0.1.1",rollup:"2.30.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^26.5.5","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","url-search-params-polyfill":"^8.1.0",util:"^0.12.4"};var author="ThoughtSpot";var email="support@thoughtspot.com";var license="ThoughtSpot Development Tools End User License Agreement";var directories={lib:"lib"};var repository={type:"git",url:"git+https://github.com/thoughtspot/visual-embed-sdk.git"};var publishConfig={registry:"https://registry.npmjs.org"};var keywords=["thoughtspot","everywhere","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version,description:description,module:module,main:main,types:types,files:files,exports:exports,typesVersions:typesVersions,scripts:scripts,peerDependencies:peerDependencies,dependencies:dependencies,devDependencies:devDependencies,author:author,email:email,license:license,directories:directories,repository:repository,publishConfig:publishConfig,keywords:keywords,bugs:bugs,homepage:homepage,globals:globals};
27521
27527
 
27522
27528
  /**
27523
27529
  * Copyright (c) 2022
@@ -28774,4 +28780,78 @@ class SearchBarEmbed extends TsEmbed {
28774
28780
  }
28775
28781
  }
28776
28782
 
28777
- export { Action, AppEmbed, AuthEvent, AuthFailureType, AuthStatus, AuthType, ContextMenuTriggerOptions, DataSourceVisualMode, EmbedEvent, HostEvent, LiveboardEmbed, Page, PinboardEmbed, PrefetchFeatures, RuntimeFilterOp, SearchBarEmbed, SearchEmbed, executeTML, exportTML, getEmbedConfig as getInitConfig, getSessionInfo, init, logout$1 as logout, prefetch };
28783
+ /**
28784
+ * Copyright (c) 2023
28785
+ *
28786
+ * Embed ThoughtSpot Sage
28787
+ *
28788
+ * @summary TS Sage embed
28789
+ * @author Mourya Balabhadra <mourya.balabhadra@thoughtspot.com>
28790
+ */
28791
+ const HiddenActionItemByDefaultForSageEmbed = [
28792
+ Action.Save,
28793
+ Action.Pin,
28794
+ Action.EditACopy,
28795
+ Action.SaveAsView,
28796
+ Action.UpdateTML,
28797
+ Action.EditTML,
28798
+ Action.AnswerDelete,
28799
+ Action.Share,
28800
+ ];
28801
+ /**
28802
+ * Embed ThoughtSpot search
28803
+ *
28804
+ * @group Embed components
28805
+ */
28806
+ class SageEmbed extends V1Embed {
28807
+ // eslint-disable-next-line no-useless-constructor
28808
+ constructor(domSelector, viewConfig) {
28809
+ super(domSelector, viewConfig);
28810
+ }
28811
+ /**
28812
+ * Constructs a map of parameters to be passed on to the
28813
+ * embedded Eureka or Sage search page.
28814
+ *
28815
+ * @returns {string} query string
28816
+ */
28817
+ getEmbedParams() {
28818
+ var _a;
28819
+ const { hideEurekaResults, isSageEmbed, disableWorksheetChange, hideWorksheetSelector, hideEurekaSuggestions, } = this.viewConfig;
28820
+ const params = {};
28821
+ params[Param.EmbedApp] = true;
28822
+ params[Param.HideEurekaResults] = !!hideEurekaResults;
28823
+ params[Param.IsSageEmbed] = !!isSageEmbed;
28824
+ params[Param.DisableWorksheetChange] = !!disableWorksheetChange;
28825
+ params[Param.HideWorksheetSelector] = !!hideWorksheetSelector;
28826
+ params[Param.HideEurekaSuggestions] = !!hideEurekaSuggestions;
28827
+ params[Param.HideActions] = [
28828
+ ...((_a = params[Param.HideActions]) !== null && _a !== void 0 ? _a : []),
28829
+ ...HiddenActionItemByDefaultForSageEmbed,
28830
+ ];
28831
+ return getQueryParamString(params, true);
28832
+ }
28833
+ /**
28834
+ * Construct the URL of the embedded ThoughtSpot sage to be
28835
+ * loaded in the iframe
28836
+ *
28837
+ * @returns {string} iframe url
28838
+ */
28839
+ getIFrameSrc() {
28840
+ const path = 'eureka';
28841
+ const tsPostHashParams = this.getThoughtSpotPostUrlParams();
28842
+ return `${this.getRootIframeSrc()}/embed/${path}${tsPostHashParams}`;
28843
+ }
28844
+ /**
28845
+ * Render the embedded ThoughtSpot Sage
28846
+ *
28847
+ * @returns {SageEmbed} Eureka/Sage embed
28848
+ */
28849
+ render() {
28850
+ super.render();
28851
+ const src = this.getIFrameSrc();
28852
+ this.renderV1Embed(src);
28853
+ return this;
28854
+ }
28855
+ }
28856
+
28857
+ export { Action, AppEmbed, AuthEvent, AuthFailureType, AuthStatus, AuthType, ContextMenuTriggerOptions, DataSourceVisualMode, EmbedEvent, HostEvent, LiveboardEmbed, Page, PinboardEmbed, PrefetchFeatures, RuntimeFilterOp, SageEmbed, SearchBarEmbed, SearchEmbed, executeTML, exportTML, getEmbedConfig as getInitConfig, getSessionInfo, init, logout$1 as logout, prefetch };
package/dist/tsembed.js CHANGED
@@ -1420,6 +1420,11 @@
1420
1420
  Param["HideProfleAndHelp"] = "profileAndHelpInNavBarHidden";
1421
1421
  Param["HideApplicationSwitcher"] = "applicationSwitcherHidden";
1422
1422
  Param["HideOrgSwitcher"] = "orgSwitcherHidden";
1423
+ Param["IsSageEmbed"] = "isSageEmbed";
1424
+ Param["HideWorksheetSelector"] = "hideWorksheetSelector";
1425
+ Param["DisableWorksheetChange"] = "disableWorksheetChange";
1426
+ Param["HideEurekaResults"] = "hideEurekaResults";
1427
+ Param["HideEurekaSuggestions"] = "hideEurekaSuggestions";
1423
1428
  })(Param || (Param = {}));
1424
1429
  (function (Action) {
1425
1430
  Action["Save"] = "save";
@@ -1654,6 +1659,7 @@
1654
1659
  LIVEBOARD_VIZ_ID_VALIDATION: 'Please provide either liveboardId or pinboardId',
1655
1660
  TRIGGER_TIMED_OUT: 'Trigger timedout in getting response',
1656
1661
  SEARCHEMBED_BETA_WRANING_MESSAGE: 'Search Embed is in Beta in this release.',
1662
+ SAGE_EMBED_BETA_WARNING_MESSAGE: 'Sage Embed is in Beta in this release.',
1657
1663
  };
1658
1664
 
1659
1665
  /**
@@ -27415,7 +27421,7 @@
27415
27421
  });
27416
27422
  }
27417
27423
 
27418
- var name="@thoughtspot/visual-embed-sdk";var version="1.22.0-alpha.4";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports$1={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p . --incremental false; tsc -p . --incremental false --module commonjs --outDir cjs",start:"gatsby develop","build:gatsby":"npm run clean:gatsby && gatsby build --prefix-paths","build:gatsby:noprefix":"npm run clean:gatsby && gatsby build","serve:gatsby":"gatsby serve","clean:gatsby":"gatsby clean","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts":"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",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1"};var devDependencies={"@mdx-js/mdx":"^1.6.22","@mdx-js/react":"^1.6.22","@react-icons/all-files":"^4.1.0","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^5.0.2","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^22.2.3","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^4.6.0","@typescript-eslint/parser":"^4.6.0",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1",coveralls:"^3.1.0","current-git-branch":"^1.1.0","dts-bundle":"^0.7.3",eslint:"^7.12.1","eslint-config-airbnb-base":"^14.2.0","eslint-config-prettier":"^6.15.0","eslint-import-resolver-typescript":"^2.3.0","eslint-plugin-import":"^2.22.1","eslint-plugin-prettier":"^3.1.4","eslint-plugin-react-hooks":"^4.2.0","fs-extra":"^10.0.0",gatsby:"3.13.1","gatsby-plugin-algolia":"^0.22.2","gatsby-plugin-catch-links":"^3.1.0","gatsby-plugin-env-variables":"^2.1.0","gatsby-plugin-intl":"^0.3.3","gatsby-plugin-manifest":"^3.2.0","gatsby-plugin-output":"^0.1.3","gatsby-plugin-sass":"6.7.0","gatsby-plugin-sitemap":"^4.10.0","gatsby-source-filesystem":"3.1.0","gatsby-transformer-asciidoc":"2.1.0","gatsby-transformer-rehype":"2.0.0","gh-pages":"^3.1.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^1.1.1",jest:"^26.6.3","jest-puppeteer":"^4.4.0",jsdom:"^17.0.0","node-sass":"^8.0.0",prettier:"2.1.2",puppeteer:"^7.0.1",react:"^16.14.0","react-dom":"^16.14.0","react-resizable":"^1.11.0","react-resize-detector":"^6.6.0","react-test-renderer":"^17.0.2","react-use-flexsearch":"^0.1.1",rollup:"2.30.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^26.5.5","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","url-search-params-polyfill":"^8.1.0",util:"^0.12.4"};var author="ThoughtSpot";var email="support@thoughtspot.com";var license="ThoughtSpot Development Tools End User License Agreement";var directories={lib:"lib"};var repository={type:"git",url:"git+https://github.com/thoughtspot/visual-embed-sdk.git"};var publishConfig={registry:"https://registry.npmjs.org"};var keywords=["thoughtspot","everywhere","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version,description:description,module:module,main:main,types:types,files:files,exports:exports$1,typesVersions:typesVersions,scripts:scripts,peerDependencies:peerDependencies,dependencies:dependencies,devDependencies:devDependencies,author:author,email:email,license:license,directories:directories,repository:repository,publishConfig:publishConfig,keywords:keywords,bugs:bugs,homepage:homepage,globals:globals};
27424
+ var name="@thoughtspot/visual-embed-sdk";var version="1.22.0-alpha.6";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports$1={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p . --incremental false; tsc -p . --incremental false --module commonjs --outDir cjs",start:"gatsby develop","build:gatsby":"npm run clean:gatsby && gatsby build --prefix-paths","build:gatsby:noprefix":"npm run clean:gatsby && gatsby build","serve:gatsby":"gatsby serve","clean:gatsby":"gatsby clean","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts":"dts-bundle --name ../../dist/visual-embed-sdk --main lib/src/index.d.ts --outputAsModuleFolder=true","bundle-dts-react":"dts-bundle --name ../../../dist/visual-embed-sdk-react --main lib/src/react/index.d.ts --outputAsModuleFolder=true","bundle-dts-react-full":"dts-bundle --name ../../../dist/visual-embed-sdk-react-full --main lib/src/react/all-types-export.d.ts --outputAsModuleFolder=true",build:"rollup -c",watch:"rollup -cw","docs-cmd":"node scripts/gatsby-commands.js",docgen:"typedoc --tsconfig tsconfig.json --theme typedoc-theme","test-sdk":"jest -c jest.config.sdk.js --runInBand","test-docs":"jest -c jest.config.docs.js",test:"npm run test-sdk && npm run test-docs",posttest:"cat ./coverage/sdk/lcov.info | coveralls","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",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1"};var devDependencies={"@mdx-js/mdx":"^1.6.22","@mdx-js/react":"^1.6.22","@react-icons/all-files":"^4.1.0","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^5.0.2","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^22.2.3","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^4.6.0","@typescript-eslint/parser":"^4.6.0",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1",coveralls:"^3.1.0","current-git-branch":"^1.1.0","dts-bundle":"^0.7.3",eslint:"^7.12.1","eslint-config-airbnb-base":"^14.2.0","eslint-config-prettier":"^6.15.0","eslint-import-resolver-typescript":"^2.3.0","eslint-plugin-import":"^2.22.1","eslint-plugin-prettier":"^3.1.4","eslint-plugin-react-hooks":"^4.2.0","fs-extra":"^10.0.0",gatsby:"3.13.1","gatsby-plugin-algolia":"^0.22.2","gatsby-plugin-catch-links":"^3.1.0","gatsby-plugin-env-variables":"^2.1.0","gatsby-plugin-intl":"^0.3.3","gatsby-plugin-manifest":"^3.2.0","gatsby-plugin-output":"^0.1.3","gatsby-plugin-sass":"6.7.0","gatsby-plugin-sitemap":"^4.10.0","gatsby-source-filesystem":"3.1.0","gatsby-transformer-asciidoc":"2.1.0","gatsby-transformer-rehype":"2.0.0","gh-pages":"^3.1.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^1.1.1",jest:"^26.6.3","jest-puppeteer":"^4.4.0",jsdom:"^17.0.0","node-sass":"^8.0.0",prettier:"2.1.2",puppeteer:"^7.0.1",react:"^16.14.0","react-dom":"^16.14.0","react-resizable":"^1.11.0","react-resize-detector":"^6.6.0","react-test-renderer":"^17.0.2","react-use-flexsearch":"^0.1.1",rollup:"2.30.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^26.5.5","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","url-search-params-polyfill":"^8.1.0",util:"^0.12.4"};var author="ThoughtSpot";var email="support@thoughtspot.com";var license="ThoughtSpot Development Tools End User License Agreement";var directories={lib:"lib"};var repository={type:"git",url:"git+https://github.com/thoughtspot/visual-embed-sdk.git"};var publishConfig={registry:"https://registry.npmjs.org"};var keywords=["thoughtspot","everywhere","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version,description:description,module:module,main:main,types:types,files:files,exports:exports$1,typesVersions:typesVersions,scripts:scripts,peerDependencies:peerDependencies,dependencies:dependencies,devDependencies:devDependencies,author:author,email:email,license:license,directories:directories,repository:repository,publishConfig:publishConfig,keywords:keywords,bugs:bugs,homepage:homepage,globals:globals};
27419
27425
 
27420
27426
  /**
27421
27427
  * Copyright (c) 2022
@@ -28667,9 +28673,84 @@
28667
28673
  }
28668
28674
  }
28669
28675
 
28676
+ /**
28677
+ * Copyright (c) 2023
28678
+ *
28679
+ * Embed ThoughtSpot Sage
28680
+ *
28681
+ * @summary TS Sage embed
28682
+ * @author Mourya Balabhadra <mourya.balabhadra@thoughtspot.com>
28683
+ */
28684
+ const HiddenActionItemByDefaultForSageEmbed = [
28685
+ exports.Action.Save,
28686
+ exports.Action.Pin,
28687
+ exports.Action.EditACopy,
28688
+ exports.Action.SaveAsView,
28689
+ exports.Action.UpdateTML,
28690
+ exports.Action.EditTML,
28691
+ exports.Action.AnswerDelete,
28692
+ exports.Action.Share,
28693
+ ];
28694
+ /**
28695
+ * Embed ThoughtSpot search
28696
+ *
28697
+ * @group Embed components
28698
+ */
28699
+ class SageEmbed extends V1Embed {
28700
+ // eslint-disable-next-line no-useless-constructor
28701
+ constructor(domSelector, viewConfig) {
28702
+ super(domSelector, viewConfig);
28703
+ }
28704
+ /**
28705
+ * Constructs a map of parameters to be passed on to the
28706
+ * embedded Eureka or Sage search page.
28707
+ *
28708
+ * @returns {string} query string
28709
+ */
28710
+ getEmbedParams() {
28711
+ var _a;
28712
+ const { hideEurekaResults, isSageEmbed, disableWorksheetChange, hideWorksheetSelector, hideEurekaSuggestions, } = this.viewConfig;
28713
+ const params = {};
28714
+ params[Param.EmbedApp] = true;
28715
+ params[Param.HideEurekaResults] = !!hideEurekaResults;
28716
+ params[Param.IsSageEmbed] = !!isSageEmbed;
28717
+ params[Param.DisableWorksheetChange] = !!disableWorksheetChange;
28718
+ params[Param.HideWorksheetSelector] = !!hideWorksheetSelector;
28719
+ params[Param.HideEurekaSuggestions] = !!hideEurekaSuggestions;
28720
+ params[Param.HideActions] = [
28721
+ ...((_a = params[Param.HideActions]) !== null && _a !== void 0 ? _a : []),
28722
+ ...HiddenActionItemByDefaultForSageEmbed,
28723
+ ];
28724
+ return getQueryParamString(params, true);
28725
+ }
28726
+ /**
28727
+ * Construct the URL of the embedded ThoughtSpot sage to be
28728
+ * loaded in the iframe
28729
+ *
28730
+ * @returns {string} iframe url
28731
+ */
28732
+ getIFrameSrc() {
28733
+ const path = 'eureka';
28734
+ const tsPostHashParams = this.getThoughtSpotPostUrlParams();
28735
+ return `${this.getRootIframeSrc()}/embed/${path}${tsPostHashParams}`;
28736
+ }
28737
+ /**
28738
+ * Render the embedded ThoughtSpot Sage
28739
+ *
28740
+ * @returns {SageEmbed} Eureka/Sage embed
28741
+ */
28742
+ render() {
28743
+ super.render();
28744
+ const src = this.getIFrameSrc();
28745
+ this.renderV1Embed(src);
28746
+ return this;
28747
+ }
28748
+ }
28749
+
28670
28750
  exports.AppEmbed = AppEmbed;
28671
28751
  exports.LiveboardEmbed = LiveboardEmbed;
28672
28752
  exports.PinboardEmbed = PinboardEmbed;
28753
+ exports.SageEmbed = SageEmbed;
28673
28754
  exports.SearchBarEmbed = SearchBarEmbed;
28674
28755
  exports.SearchEmbed = SearchEmbed;
28675
28756
  exports.executeTML = executeTML;
@@ -74,6 +74,9 @@ interface SearchBarEmbedProps extends EmbedProps, SearchBarViewConfig {
74
74
  * ```
75
75
  */
76
76
  export const SearchBarEmbed: React.ForwardRefExoticComponent<SearchBarEmbedProps & React.RefAttributes<TsEmbed>>;
77
+ interface SageEmbedProps extends EmbedProps, SageViewConfig {
78
+ }
79
+ export const SageEmbed: React.ForwardRefExoticComponent<SageEmbedProps & React.RefAttributes<TsEmbed>>;
77
80
  /**
78
81
  * Get a reference to the embed component to trigger events on the component.
79
82
  *
@@ -102,7 +105,7 @@ export const useEmbedRef: () => React.MutableRefObject<TsEmbed>;
102
105
  * @summary ThoughtSpot Visual Embed SDK
103
106
  * @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
104
107
  */
105
- export { init, logout, prefetch, executeTML, exportTML, getEmbedConfig as getInitConfig, getSessionInfo, SearchEmbed, SearchBarEmbed, PinboardEmbed, LiveboardEmbed, AppEmbed, AuthFailureType, AuthStatus, AuthEvent, AuthEventEmitter, Page, AuthType, RuntimeFilter, RuntimeFilterOp, EmbedEvent, HostEvent, DataSourceVisualMode, Action, ContextMenuTriggerOptions, EmbedConfig, SearchViewConfig, SearchBarViewConfig, LiveboardViewConfig, AppViewConfig, PrefetchFeatures, FrameParams, DOMSelector, MessageOptions, MessageCallback, MessagePayload, CustomisationsInterface, CustomStyles, customCssInterface, CustomCssVariables, };
108
+ export { init, logout, prefetch, executeTML, exportTML, getEmbedConfig as getInitConfig, getSessionInfo, SearchEmbed, SearchBarEmbed, PinboardEmbed, LiveboardEmbed, SageEmbed, AppEmbed, AuthFailureType, AuthStatus, AuthEvent, AuthEventEmitter, Page, AuthType, RuntimeFilter, RuntimeFilterOp, EmbedEvent, HostEvent, DataSourceVisualMode, Action, ContextMenuTriggerOptions, EmbedConfig, SearchViewConfig, SearchBarViewConfig, LiveboardViewConfig, AppViewConfig, PrefetchFeatures, FrameParams, DOMSelector, MessageOptions, MessageCallback, MessagePayload, CustomisationsInterface, CustomStyles, customCssInterface, CustomCssVariables, };
106
109
 
107
110
  /**
108
111
  * @group Embed components
@@ -144,6 +147,70 @@ export declare class SearchBarEmbed extends TsEmbed {
144
147
  render(): SearchBarEmbed;
145
148
  }
146
149
 
150
+ /**
151
+ * Copyright (c) 2023
152
+ *
153
+ * Embed ThoughtSpot Sage
154
+ *
155
+ * @summary TS Sage embed
156
+ * @author Mourya Balabhadra <mourya.balabhadra@thoughtspot.com>
157
+ */
158
+ /**
159
+ * The configuration attributes for the embedded search view.
160
+ *
161
+ * @group Embed components
162
+ */
163
+ export interface SageViewConfig extends ViewConfig {
164
+ /**
165
+ * If set to false, eureka results are hidden
166
+ */
167
+ hideEurekaResults?: boolean;
168
+ /**
169
+ * primary flag to enable eureka(/sage) page embedding.
170
+ */
171
+ isSageEmbed?: boolean;
172
+ /**
173
+ * flag to disable changing worksheet. default false.
174
+ */
175
+ disableWorksheetChange?: boolean;
176
+ /**
177
+ * flag to hide worksheet selector. default false.
178
+ */
179
+ hideWorksheetSelector?: boolean;
180
+ /**
181
+ * If set to true, the eureka search suggestions are not shown
182
+ *
183
+ */
184
+ hideEurekaSuggestions?: boolean;
185
+ }
186
+ export declare const HiddenActionItemByDefaultForSageEmbed: Action[];
187
+ /**
188
+ * Embed ThoughtSpot search
189
+ *
190
+ * @group Embed components
191
+ */
192
+ export declare class SageEmbed extends V1Embed {
193
+ /**
194
+ * The view configuration for the embedded ThoughtSpot sage.
195
+ *
196
+ */
197
+ protected viewConfig: SageViewConfig;
198
+ constructor(domSelector: DOMSelector, viewConfig: SageViewConfig);
199
+ /**
200
+ * Constructs a map of parameters to be passed on to the
201
+ * embedded Eureka or Sage search page.
202
+ *
203
+ * @returns {string} query string
204
+ */
205
+ protected getEmbedParams(): string;
206
+ /**
207
+ * Render the embedded ThoughtSpot Sage
208
+ *
209
+ * @returns {SageEmbed} Eureka/Sage embed
210
+ */
211
+ render(): SageEmbed;
212
+ }
213
+
147
214
  /**
148
215
  * Copyright (c) 2022
149
216
  *
@@ -1252,6 +1319,7 @@ export interface customCssInterface {
1252
1319
  /**
1253
1320
  * Can be used to define a custom font face
1254
1321
  * like:
1322
+ *
1255
1323
  * @example
1256
1324
  * ```js
1257
1325
  * rules_UNSTABLE?: {
@@ -1487,6 +1555,11 @@ export interface EmbedConfig {
1487
1555
  * @version SDK: 1.12.0 | ThoughtSpot: 8.4.0.cl, 8.4.1-sw*
1488
1556
  */
1489
1557
  suppressSearchEmbedBetaWarning?: boolean;
1558
+ /**
1559
+ * Hide beta alert warning message for SageEmbed.
1560
+ *
1561
+ */
1562
+ suppressSageEmbedBetaWarning?: boolean;
1490
1563
  /**
1491
1564
  * Custom style params for embed Config.
1492
1565
  *
@@ -2896,7 +2969,12 @@ export declare enum Param {
2896
2969
  PrimaryNavHidden = "primaryNavHidden",
2897
2970
  HideProfleAndHelp = "profileAndHelpInNavBarHidden",
2898
2971
  HideApplicationSwitcher = "applicationSwitcherHidden",
2899
- HideOrgSwitcher = "orgSwitcherHidden"
2972
+ HideOrgSwitcher = "orgSwitcherHidden",
2973
+ IsSageEmbed = "isSageEmbed",
2974
+ HideWorksheetSelector = "hideWorksheetSelector",
2975
+ DisableWorksheetChange = "disableWorksheetChange",
2976
+ HideEurekaResults = "hideEurekaResults",
2977
+ HideEurekaSuggestions = "hideEurekaSuggestions"
2900
2978
  }
2901
2979
  /**
2902
2980
  * The list of actions that can be performed on visual ThoughtSpot
@@ -74,6 +74,9 @@ interface SearchBarEmbedProps extends EmbedProps, SearchBarViewConfig {
74
74
  * ```
75
75
  */
76
76
  export const SearchBarEmbed: React.ForwardRefExoticComponent<SearchBarEmbedProps & React.RefAttributes<TsEmbed>>;
77
+ interface SageEmbedProps extends EmbedProps, SageViewConfig {
78
+ }
79
+ export const SageEmbed: React.ForwardRefExoticComponent<SageEmbedProps & React.RefAttributes<TsEmbed>>;
77
80
  /**
78
81
  * Get a reference to the embed component to trigger events on the component.
79
82
  *
@@ -133,6 +136,70 @@ export declare class SearchBarEmbed extends TsEmbed {
133
136
  render(): SearchBarEmbed;
134
137
  }
135
138
 
139
+ /**
140
+ * Copyright (c) 2023
141
+ *
142
+ * Embed ThoughtSpot Sage
143
+ *
144
+ * @summary TS Sage embed
145
+ * @author Mourya Balabhadra <mourya.balabhadra@thoughtspot.com>
146
+ */
147
+ /**
148
+ * The configuration attributes for the embedded search view.
149
+ *
150
+ * @group Embed components
151
+ */
152
+ export interface SageViewConfig extends ViewConfig {
153
+ /**
154
+ * If set to false, eureka results are hidden
155
+ */
156
+ hideEurekaResults?: boolean;
157
+ /**
158
+ * primary flag to enable eureka(/sage) page embedding.
159
+ */
160
+ isSageEmbed?: boolean;
161
+ /**
162
+ * flag to disable changing worksheet. default false.
163
+ */
164
+ disableWorksheetChange?: boolean;
165
+ /**
166
+ * flag to hide worksheet selector. default false.
167
+ */
168
+ hideWorksheetSelector?: boolean;
169
+ /**
170
+ * If set to true, the eureka search suggestions are not shown
171
+ *
172
+ */
173
+ hideEurekaSuggestions?: boolean;
174
+ }
175
+ export declare const HiddenActionItemByDefaultForSageEmbed: Action[];
176
+ /**
177
+ * Embed ThoughtSpot search
178
+ *
179
+ * @group Embed components
180
+ */
181
+ export declare class SageEmbed extends V1Embed {
182
+ /**
183
+ * The view configuration for the embedded ThoughtSpot sage.
184
+ *
185
+ */
186
+ protected viewConfig: SageViewConfig;
187
+ constructor(domSelector: DOMSelector, viewConfig: SageViewConfig);
188
+ /**
189
+ * Constructs a map of parameters to be passed on to the
190
+ * embedded Eureka or Sage search page.
191
+ *
192
+ * @returns {string} query string
193
+ */
194
+ protected getEmbedParams(): string;
195
+ /**
196
+ * Render the embedded ThoughtSpot Sage
197
+ *
198
+ * @returns {SageEmbed} Eureka/Sage embed
199
+ */
200
+ render(): SageEmbed;
201
+ }
202
+
136
203
  /**
137
204
  * Copyright (c) 2022
138
205
  *
@@ -783,7 +850,7 @@ export function getViewPropsAndListeners<T extends EmbedProps, U extends ViewCon
783
850
  * @summary ThoughtSpot Visual Embed SDK
784
851
  * @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
785
852
  */
786
- export { init, logout, prefetch, executeTML, exportTML, getEmbedConfig as getInitConfig, getSessionInfo, SearchEmbed, SearchBarEmbed, PinboardEmbed, LiveboardEmbed, AppEmbed, AuthFailureType, AuthStatus, AuthEvent, AuthEventEmitter, Page, AuthType, RuntimeFilter, RuntimeFilterOp, EmbedEvent, HostEvent, DataSourceVisualMode, Action, ContextMenuTriggerOptions, EmbedConfig, SearchViewConfig, SearchBarViewConfig, LiveboardViewConfig, AppViewConfig, PrefetchFeatures, FrameParams, DOMSelector, MessageOptions, MessageCallback, MessagePayload, CustomisationsInterface, CustomStyles, customCssInterface, CustomCssVariables, };
853
+ export { init, logout, prefetch, executeTML, exportTML, getEmbedConfig as getInitConfig, getSessionInfo, SearchEmbed, SearchBarEmbed, PinboardEmbed, LiveboardEmbed, SageEmbed, AppEmbed, AuthFailureType, AuthStatus, AuthEvent, AuthEventEmitter, Page, AuthType, RuntimeFilter, RuntimeFilterOp, EmbedEvent, HostEvent, DataSourceVisualMode, Action, ContextMenuTriggerOptions, EmbedConfig, SearchViewConfig, SearchBarViewConfig, LiveboardViewConfig, AppViewConfig, PrefetchFeatures, FrameParams, DOMSelector, MessageOptions, MessageCallback, MessagePayload, CustomisationsInterface, CustomStyles, customCssInterface, CustomCssVariables, };
787
854
 
788
855
  /**
789
856
  * Copyright (c) 2023
@@ -976,6 +1043,7 @@ export interface customCssInterface {
976
1043
  /**
977
1044
  * Can be used to define a custom font face
978
1045
  * like:
1046
+ *
979
1047
  * @example
980
1048
  * ```js
981
1049
  * rules_UNSTABLE?: {
@@ -1211,6 +1279,11 @@ export interface EmbedConfig {
1211
1279
  * @version SDK: 1.12.0 | ThoughtSpot: 8.4.0.cl, 8.4.1-sw*
1212
1280
  */
1213
1281
  suppressSearchEmbedBetaWarning?: boolean;
1282
+ /**
1283
+ * Hide beta alert warning message for SageEmbed.
1284
+ *
1285
+ */
1286
+ suppressSageEmbedBetaWarning?: boolean;
1214
1287
  /**
1215
1288
  * Custom style params for embed Config.
1216
1289
  *
@@ -2620,7 +2693,12 @@ export declare enum Param {
2620
2693
  PrimaryNavHidden = "primaryNavHidden",
2621
2694
  HideProfleAndHelp = "profileAndHelpInNavBarHidden",
2622
2695
  HideApplicationSwitcher = "applicationSwitcherHidden",
2623
- HideOrgSwitcher = "orgSwitcherHidden"
2696
+ HideOrgSwitcher = "orgSwitcherHidden",
2697
+ IsSageEmbed = "isSageEmbed",
2698
+ HideWorksheetSelector = "hideWorksheetSelector",
2699
+ DisableWorksheetChange = "disableWorksheetChange",
2700
+ HideEurekaResults = "hideEurekaResults",
2701
+ HideEurekaSuggestions = "hideEurekaSuggestions"
2624
2702
  }
2625
2703
  /**
2626
2704
  * The list of actions that can be performed on visual ThoughtSpot
@@ -13,7 +13,7 @@ import EventEmitter from 'eventemitter3';
13
13
  * @summary ThoughtSpot Visual Embed SDK
14
14
  * @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
15
15
  */
16
- export { init, logout, prefetch, executeTML, exportTML, getEmbedConfig as getInitConfig, getSessionInfo, SearchEmbed, SearchBarEmbed, PinboardEmbed, LiveboardEmbed, AppEmbed, AuthFailureType, AuthStatus, AuthEvent, AuthEventEmitter, Page, AuthType, RuntimeFilter, RuntimeFilterOp, EmbedEvent, HostEvent, DataSourceVisualMode, Action, ContextMenuTriggerOptions, EmbedConfig, SearchViewConfig, SearchBarViewConfig, LiveboardViewConfig, AppViewConfig, PrefetchFeatures, FrameParams, DOMSelector, MessageOptions, MessageCallback, MessagePayload, CustomisationsInterface, CustomStyles, customCssInterface, CustomCssVariables, };
16
+ export { init, logout, prefetch, executeTML, exportTML, getEmbedConfig as getInitConfig, getSessionInfo, SearchEmbed, SearchBarEmbed, PinboardEmbed, LiveboardEmbed, SageEmbed, AppEmbed, AuthFailureType, AuthStatus, AuthEvent, AuthEventEmitter, Page, AuthType, RuntimeFilter, RuntimeFilterOp, EmbedEvent, HostEvent, DataSourceVisualMode, Action, ContextMenuTriggerOptions, EmbedConfig, SearchViewConfig, SearchBarViewConfig, LiveboardViewConfig, AppViewConfig, PrefetchFeatures, FrameParams, DOMSelector, MessageOptions, MessageCallback, MessagePayload, CustomisationsInterface, CustomStyles, customCssInterface, CustomCssVariables, };
17
17
 
18
18
  /**
19
19
  * Copyright (c) 2022
@@ -918,6 +918,7 @@ export interface customCssInterface {
918
918
  /**
919
919
  * Can be used to define a custom font face
920
920
  * like:
921
+ *
921
922
  * @example
922
923
  * ```js
923
924
  * rules_UNSTABLE?: {
@@ -1153,6 +1154,11 @@ export interface EmbedConfig {
1153
1154
  * @version SDK: 1.12.0 | ThoughtSpot: 8.4.0.cl, 8.4.1-sw*
1154
1155
  */
1155
1156
  suppressSearchEmbedBetaWarning?: boolean;
1157
+ /**
1158
+ * Hide beta alert warning message for SageEmbed.
1159
+ *
1160
+ */
1161
+ suppressSageEmbedBetaWarning?: boolean;
1156
1162
  /**
1157
1163
  * Custom style params for embed Config.
1158
1164
  *
@@ -2562,7 +2568,12 @@ export enum Param {
2562
2568
  PrimaryNavHidden = "primaryNavHidden",
2563
2569
  HideProfleAndHelp = "profileAndHelpInNavBarHidden",
2564
2570
  HideApplicationSwitcher = "applicationSwitcherHidden",
2565
- HideOrgSwitcher = "orgSwitcherHidden"
2571
+ HideOrgSwitcher = "orgSwitcherHidden",
2572
+ IsSageEmbed = "isSageEmbed",
2573
+ HideWorksheetSelector = "hideWorksheetSelector",
2574
+ DisableWorksheetChange = "disableWorksheetChange",
2575
+ HideEurekaResults = "hideEurekaResults",
2576
+ HideEurekaSuggestions = "hideEurekaSuggestions"
2566
2577
  }
2567
2578
  /**
2568
2579
  * The list of actions that can be performed on visual ThoughtSpot
@@ -3124,6 +3135,70 @@ export interface CustomCssVariables {
3124
3135
  '--ts-var-dialog-footer-background'?: string;
3125
3136
  }
3126
3137
 
3138
+ /**
3139
+ * Copyright (c) 2023
3140
+ *
3141
+ * Embed ThoughtSpot Sage
3142
+ *
3143
+ * @summary TS Sage embed
3144
+ * @author Mourya Balabhadra <mourya.balabhadra@thoughtspot.com>
3145
+ */
3146
+ /**
3147
+ * The configuration attributes for the embedded search view.
3148
+ *
3149
+ * @group Embed components
3150
+ */
3151
+ export interface SageViewConfig extends ViewConfig {
3152
+ /**
3153
+ * If set to false, eureka results are hidden
3154
+ */
3155
+ hideEurekaResults?: boolean;
3156
+ /**
3157
+ * primary flag to enable eureka(/sage) page embedding.
3158
+ */
3159
+ isSageEmbed?: boolean;
3160
+ /**
3161
+ * flag to disable changing worksheet. default false.
3162
+ */
3163
+ disableWorksheetChange?: boolean;
3164
+ /**
3165
+ * flag to hide worksheet selector. default false.
3166
+ */
3167
+ hideWorksheetSelector?: boolean;
3168
+ /**
3169
+ * If set to true, the eureka search suggestions are not shown
3170
+ *
3171
+ */
3172
+ hideEurekaSuggestions?: boolean;
3173
+ }
3174
+ export const HiddenActionItemByDefaultForSageEmbed: Action[];
3175
+ /**
3176
+ * Embed ThoughtSpot search
3177
+ *
3178
+ * @group Embed components
3179
+ */
3180
+ export class SageEmbed extends V1Embed {
3181
+ /**
3182
+ * The view configuration for the embedded ThoughtSpot sage.
3183
+ *
3184
+ */
3185
+ protected viewConfig: SageViewConfig;
3186
+ constructor(domSelector: DOMSelector, viewConfig: SageViewConfig);
3187
+ /**
3188
+ * Constructs a map of parameters to be passed on to the
3189
+ * embedded Eureka or Sage search page.
3190
+ *
3191
+ * @returns {string} query string
3192
+ */
3193
+ protected getEmbedParams(): string;
3194
+ /**
3195
+ * Render the embedded ThoughtSpot Sage
3196
+ *
3197
+ * @returns {SageEmbed} Eureka/Sage embed
3198
+ */
3199
+ render(): SageEmbed;
3200
+ }
3201
+
3127
3202
  /**
3128
3203
  * Copyright (c) 2022
3129
3204
  *
package/lib/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thoughtspot/visual-embed-sdk",
3
- "version": "1.22.0-alpha.4",
3
+ "version": "1.22.0-alpha.6",
4
4
  "description": "ThoughtSpot Embed SDK",
5
5
  "module": "lib/src/index.js",
6
6
  "main": "dist/tsembed.js",