@thoughtspot/visual-embed-sdk 1.37.1 → 1.38.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. package/cjs/package.json +1 -1
  2. package/cjs/src/embed/bodyless-conversation.d.ts +44 -9
  3. package/cjs/src/embed/bodyless-conversation.d.ts.map +1 -1
  4. package/cjs/src/embed/bodyless-conversation.js +35 -5
  5. package/cjs/src/embed/bodyless-conversation.js.map +1 -1
  6. package/cjs/src/embed/bodyless-conversation.spec.js +290 -5
  7. package/cjs/src/embed/bodyless-conversation.spec.js.map +1 -1
  8. package/cjs/src/embed/conversation.d.ts +40 -11
  9. package/cjs/src/embed/conversation.d.ts.map +1 -1
  10. package/cjs/src/embed/conversation.js +29 -4
  11. package/cjs/src/embed/conversation.js.map +1 -1
  12. package/cjs/src/embed/conversation.spec.js +7 -7
  13. package/cjs/src/embed/conversation.spec.js.map +1 -1
  14. package/cjs/src/embed/ts-embed.spec.d.ts.map +1 -1
  15. package/cjs/src/embed/ts-embed.spec.js.map +1 -1
  16. package/cjs/src/index.d.ts +4 -4
  17. package/cjs/src/index.d.ts.map +1 -1
  18. package/cjs/src/index.js +5 -1
  19. package/cjs/src/index.js.map +1 -1
  20. package/cjs/src/react/all-types-export.d.ts +1 -1
  21. package/cjs/src/react/all-types-export.d.ts.map +1 -1
  22. package/cjs/src/react/all-types-export.js +3 -1
  23. package/cjs/src/react/all-types-export.js.map +1 -1
  24. package/cjs/src/react/index.d.ts +53 -5
  25. package/cjs/src/react/index.d.ts.map +1 -1
  26. package/cjs/src/react/index.js +73 -4
  27. package/cjs/src/react/index.js.map +1 -1
  28. package/cjs/src/react/index.spec.js +94 -0
  29. package/cjs/src/react/index.spec.js.map +1 -1
  30. package/cjs/src/types.d.ts +2 -1
  31. package/cjs/src/types.d.ts.map +1 -1
  32. package/cjs/src/types.js +1 -0
  33. package/cjs/src/types.js.map +1 -1
  34. package/dist/{index-m9UtENc9.js → index-BIcnpmMY.js} +1 -1
  35. package/dist/src/embed/bodyless-conversation.d.ts +44 -9
  36. package/dist/src/embed/bodyless-conversation.d.ts.map +1 -1
  37. package/dist/src/embed/conversation.d.ts +40 -11
  38. package/dist/src/embed/conversation.d.ts.map +1 -1
  39. package/dist/src/embed/ts-embed.spec.d.ts.map +1 -1
  40. package/dist/src/index.d.ts +4 -4
  41. package/dist/src/index.d.ts.map +1 -1
  42. package/dist/src/react/all-types-export.d.ts +1 -1
  43. package/dist/src/react/all-types-export.d.ts.map +1 -1
  44. package/dist/src/react/index.d.ts +53 -5
  45. package/dist/src/react/index.d.ts.map +1 -1
  46. package/dist/src/types.d.ts +2 -1
  47. package/dist/src/types.d.ts.map +1 -1
  48. package/dist/tsembed-react.es.js +562 -10
  49. package/dist/tsembed-react.js +562 -8
  50. package/dist/tsembed.es.js +65 -11
  51. package/dist/tsembed.js +71 -15
  52. package/dist/visual-embed-sdk-react-full.d.ts +184 -72
  53. package/dist/visual-embed-sdk-react.d.ts +184 -72
  54. package/dist/visual-embed-sdk.d.ts +87 -22
  55. package/lib/package.json +1 -1
  56. package/lib/src/embed/bodyless-conversation.d.ts +44 -9
  57. package/lib/src/embed/bodyless-conversation.d.ts.map +1 -1
  58. package/lib/src/embed/bodyless-conversation.js +33 -4
  59. package/lib/src/embed/bodyless-conversation.js.map +1 -1
  60. package/lib/src/embed/bodyless-conversation.spec.js +292 -7
  61. package/lib/src/embed/bodyless-conversation.spec.js.map +1 -1
  62. package/lib/src/embed/conversation.d.ts +40 -11
  63. package/lib/src/embed/conversation.d.ts.map +1 -1
  64. package/lib/src/embed/conversation.js +27 -3
  65. package/lib/src/embed/conversation.js.map +1 -1
  66. package/lib/src/embed/conversation.spec.js +8 -8
  67. package/lib/src/embed/conversation.spec.js.map +1 -1
  68. package/lib/src/embed/ts-embed.spec.d.ts.map +1 -1
  69. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  70. package/lib/src/index.d.ts +4 -4
  71. package/lib/src/index.d.ts.map +1 -1
  72. package/lib/src/index.js +4 -4
  73. package/lib/src/index.js.map +1 -1
  74. package/lib/src/react/all-types-export.d.ts +1 -1
  75. package/lib/src/react/all-types-export.d.ts.map +1 -1
  76. package/lib/src/react/all-types-export.js +1 -1
  77. package/lib/src/react/all-types-export.js.map +1 -1
  78. package/lib/src/react/index.d.ts +53 -5
  79. package/lib/src/react/index.d.ts.map +1 -1
  80. package/lib/src/react/index.js +73 -4
  81. package/lib/src/react/index.js.map +1 -1
  82. package/lib/src/react/index.spec.js +96 -2
  83. package/lib/src/react/index.spec.js.map +1 -1
  84. package/lib/src/types.d.ts +2 -1
  85. package/lib/src/types.d.ts.map +1 -1
  86. package/lib/src/types.js +1 -0
  87. package/lib/src/types.js.map +1 -1
  88. package/lib/src/visual-embed-sdk.d.ts +90 -25
  89. package/package.json +1 -1
  90. package/src/embed/bodyless-conversation.spec.ts +314 -7
  91. package/src/embed/bodyless-conversation.ts +53 -8
  92. package/src/embed/conversation.spec.ts +16 -16
  93. package/src/embed/conversation.ts +44 -11
  94. package/src/embed/ts-embed.spec.ts +0 -2
  95. package/src/index.ts +16 -5
  96. package/src/react/all-types-export.ts +2 -0
  97. package/src/react/index.spec.tsx +157 -1
  98. package/src/react/index.tsx +98 -11
  99. package/src/types.ts +1 -0
@@ -1,4 +1,4 @@
1
- /* @thoughtspot/visual-embed-sdk version 1.37.1 */
1
+ /* @thoughtspot/visual-embed-sdk version 1.38.0 */
2
2
  'use client';
3
3
  function _mergeNamespaces(n, m) {
4
4
  m.forEach(function (e) {
@@ -2982,6 +2982,7 @@ var Param;
2982
2982
  Param["ShowSpotterLimitations"] = "showSpotterLimitations";
2983
2983
  Param["CoverAndFilterOptionInPDF"] = "coverAndFilterOptionInPDF";
2984
2984
  Param["PrimaryAction"] = "primaryAction";
2985
+ Param["isSpotterAgentEmbed"] = "isSpotterAgentEmbed";
2985
2986
  })(Param || (Param = {}));
2986
2987
  /**
2987
2988
  * ThoughtSpot application pages include actions and menu commands
@@ -7513,7 +7514,7 @@ class AnswerService {
7513
7514
  async getTML() {
7514
7515
  const { object } = await this.executeQuery(getAnswerTML, {});
7515
7516
  const edoc = object[0].edoc;
7516
- const YAML = await import('./index-m9UtENc9.js');
7517
+ const YAML = await import('./index-BIcnpmMY.js');
7517
7518
  const parsedDoc = YAML.parse(edoc);
7518
7519
  return {
7519
7520
  answer: {
@@ -15399,7 +15400,7 @@ function processEventData(type, e, thoughtSpotHost, containerEl) {
15399
15400
  return e;
15400
15401
  }
15401
15402
 
15402
- var name="@thoughtspot/visual-embed-sdk";var version$1="1.37.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={classnames:"^2.3.1",eventemitter3:"^4.0.7",lodash:"^4.17.21","mixpanel-browser":"2.47.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1",yaml:"^2.5.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/lodash":"^4.17.0","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^8.28.0","@typescript-eslint/parser":"^8.28.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",crypto:"^1.0.1","current-git-branch":"^1.1.0","dts-bundle":"^0.7.3",eslint:"^9.23.0","eslint-config-airbnb-base":"^15.0.0","eslint-config-prettier":"^10.1.1","eslint-import-resolver-typescript":"^4.2.5","eslint-plugin-comment-length":"2.2.1","eslint-plugin-import":"^2.31.0","eslint-plugin-jsdoc":"^50.6.9","eslint-plugin-prettier":"^5.2.5","eslint-plugin-react":"^7.37.5","eslint-plugin-react-hooks":"^5.2.0","fs-extra":"^10.0.0","gh-pages":"6.3.0",globals:"^16.0.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",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:"4.24.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","typescript-eslint":"^8.29.1","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^6.3.5"};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$1,description:description,module:module,main:main,types:types,files:files,exports:exports,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.es.js",limit:"31 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};
15403
+ var name="@thoughtspot/visual-embed-sdk";var version$1="1.38.0";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/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={classnames:"^2.3.1",eventemitter3:"^4.0.7",lodash:"^4.17.21","mixpanel-browser":"2.47.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1",yaml:"^2.5.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/lodash":"^4.17.0","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^8.28.0","@typescript-eslint/parser":"^8.28.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",crypto:"^1.0.1","current-git-branch":"^1.1.0","dts-bundle":"^0.7.3",eslint:"^9.23.0","eslint-config-airbnb-base":"^15.0.0","eslint-config-prettier":"^10.1.1","eslint-import-resolver-typescript":"^4.2.5","eslint-plugin-comment-length":"2.2.1","eslint-plugin-import":"^2.31.0","eslint-plugin-jsdoc":"^50.6.9","eslint-plugin-prettier":"^5.2.5","eslint-plugin-react":"^7.37.5","eslint-plugin-react-hooks":"^5.2.0","fs-extra":"^10.0.0","gh-pages":"6.3.0",globals:"^16.0.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",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:"4.24.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","typescript-eslint":"^8.29.1","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^6.3.5"};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$1,description:description,module:module,main:main,types:types,files:files,exports:exports,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.es.js",limit:"31 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};
15403
15404
 
15404
15405
  /**
15405
15406
  * Reloads the ThoughtSpot iframe.
@@ -18046,6 +18047,7 @@ class ConversationMessage extends TsEmbed {
18046
18047
  const path = 'conv-assist-answer';
18047
18048
  const queryParams = this.getBaseQueryParams();
18048
18049
  queryParams[Param.HideActions] = [...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : [])];
18050
+ queryParams[Param.isSpotterAgentEmbed] = true;
18049
18051
  let query = '';
18050
18052
  const queryParamsString = getQueryParamString(queryParams, true);
18051
18053
  if (queryParamsString) {
@@ -18071,9 +18073,9 @@ class ConversationMessage extends TsEmbed {
18071
18073
  * chatbots or other conversational interfaces.
18072
18074
  * @example
18073
18075
  * ```js
18074
- * import { BodylessConversation } from '@thoughtspot/visual-embed-sdk';
18076
+ * import { SpotterAgentEmbed } from '@thoughtspot/visual-embed-sdk';
18075
18077
  *
18076
- * const conversation = new BodylessConversation({
18078
+ * const conversation = new SpotterAgentEmbed({
18077
18079
  * worksheetId: 'worksheetId',
18078
18080
  * });
18079
18081
  *
@@ -18083,9 +18085,9 @@ class ConversationMessage extends TsEmbed {
18083
18085
  * document.body.appendChild(container); // or to any other element
18084
18086
  * ```
18085
18087
  * @group Embed components
18086
- * @version SDK: 1.33.1 | ThoughtSpot: 10.5.0.cl
18088
+ * @version SDK: 1.37.0 | ThoughtSpot: 10.9.0.cl
18087
18089
  */
18088
- class BodylessConversation {
18090
+ class SpotterAgentEmbed {
18089
18091
  constructor(viewConfig) {
18090
18092
  this.viewConfig = viewConfig;
18091
18093
  const embedConfig = getEmbedConfig();
@@ -18097,6 +18099,9 @@ class BodylessConversation {
18097
18099
  return { error };
18098
18100
  }
18099
18101
  const container = document.createElement('div');
18102
+ if (this.viewConfig.containerClassName) {
18103
+ container.className = this.viewConfig.containerClassName;
18104
+ }
18100
18105
  const embed = new ConversationMessage(container, {
18101
18106
  ...this.viewConfig,
18102
18107
  sessionId: data.sessionId,
@@ -18107,6 +18112,31 @@ class BodylessConversation {
18107
18112
  await embed.render();
18108
18113
  return { container, viz: embed };
18109
18114
  }
18115
+ }
18116
+ /**
18117
+ * Create a conversation embed, which can be integrated inside
18118
+ * chatbots or other conversational interfaces.
18119
+ * @deprecated from SDK: 1.38.0 | ThoughtSpot: 10.10.0.cl
18120
+ * Use {@link SpotterAgentEmbed} instead
18121
+ * @example
18122
+ * ```js
18123
+ * import { SpotterAgentEmbed } from '@thoughtspot/visual-embed-sdk';
18124
+ *
18125
+ * const conversation = new SpotterAgentEmbed({
18126
+ * worksheetId: 'worksheetId',
18127
+ * });
18128
+ *
18129
+ * const { container, error } = await conversation.sendMessage('show me sales by region');
18130
+ *
18131
+ * // append the container to the DOM
18132
+ * document.body.appendChild(container); // or to any other element
18133
+ * ```
18134
+ * @group Embed components
18135
+ */
18136
+ class BodylessConversation extends SpotterAgentEmbed {
18137
+ constructor(viewConfig) {
18138
+ super(viewConfig);
18139
+ }
18110
18140
  }
18111
18141
 
18112
18142
  /**
@@ -18137,7 +18167,7 @@ var isUndefined_1 = isUndefined;
18137
18167
  * @group Embed components
18138
18168
  * @example
18139
18169
  * ```js
18140
- * const conversation = new ConversationEmbed('#tsEmbed', {
18170
+ * const conversation = new SpotterEmbed('#tsEmbed', {
18141
18171
  * worksheetId: 'worksheetId',
18142
18172
  * searchOptions: {
18143
18173
  * searchQuery: 'searchQuery',
@@ -18145,9 +18175,9 @@ var isUndefined_1 = isUndefined;
18145
18175
  * });
18146
18176
  * conversation.render();
18147
18177
  * ```
18148
- * @version SDK: 1.33.1 | ThoughtSpot: 10.5.0.cl
18178
+ * @version SDK: 1.37.0 | ThoughtSpot: 10.9.0.cl
18149
18179
  */
18150
- class ConversationEmbed extends TsEmbed {
18180
+ class SpotterEmbed extends TsEmbed {
18151
18181
  constructor(container, viewConfig) {
18152
18182
  viewConfig.embedComponentType = 'conversation';
18153
18183
  super(container, viewConfig);
@@ -18193,6 +18223,30 @@ class ConversationEmbed extends TsEmbed {
18193
18223
  await this.renderIFrame(src);
18194
18224
  return this;
18195
18225
  }
18226
+ }
18227
+ /**
18228
+ * Embed ThoughtSpot AI Conversation.
18229
+ * @deprecated from SDK: 1.38.0 | ThoughtSpot: 10.10.0.cl
18230
+ * Use {@link SpotterEmbed} instead
18231
+ * @group Embed components
18232
+ * @example
18233
+ * ```js
18234
+ * const conversation = new SpotterEmbed('#tsEmbed', {
18235
+ * worksheetId: 'worksheetId',
18236
+ * searchOptions: {
18237
+ * searchQuery: 'searchQuery',
18238
+ * },
18239
+ * });
18240
+ * conversation.render();
18241
+ * ```
18242
+ * @version SDK: 1.37.0 | ThoughtSpot: 10.9.0.cl
18243
+ */
18244
+ class ConversationEmbed extends SpotterEmbed {
18245
+ constructor(container, viewConfig) {
18246
+ viewConfig.embedComponentType = 'conversation';
18247
+ super(container, viewConfig);
18248
+ this.viewConfig = viewConfig;
18249
+ }
18196
18250
  }
18197
18251
 
18198
18252
  /**
@@ -18778,4 +18832,4 @@ const createLiveboardWithAnswers = async (answers, name) => {
18778
18832
  return result;
18779
18833
  };
18780
18834
 
18781
- export { Action, AnswerService, AppEmbed, AuthEvent, AuthFailureType, AuthStatus, AuthType, BodylessConversation, ContextMenuTriggerOptions, ConversationEmbed, DataSourceVisualMode, EmbedEvent, HomeLeftNavItem, HomePageSearchBarMode, HomepageModule, HostEvent, ListPageColumns, LiveboardEmbed, LogLevel, MIXPANEL_EVENT, Page, PinboardEmbed, PrefetchFeatures, RuntimeFilterOp, SageEmbed, SearchBarEmbed, SearchEmbed, UIPassthroughEvent, createLiveboardWithAnswers, executeTML, exportTML, getAnswerFromQuery, getEmbedConfig as getInitConfig, getSessionInfo, init, logout, prefetch, resetCachedAuthToken, tokenizedFetch, uploadMixpanelEvent };
18835
+ export { Action, AnswerService, AppEmbed, AuthEvent, AuthFailureType, AuthStatus, AuthType, BodylessConversation, ContextMenuTriggerOptions, ConversationEmbed, DataSourceVisualMode, EmbedEvent, HomeLeftNavItem, HomePage, HomePageSearchBarMode, HomepageModule, HostEvent, ListPageColumns, LiveboardEmbed, LogLevel, MIXPANEL_EVENT, Page, PinboardEmbed, PrefetchFeatures, PrimaryNavbarVersion, RuntimeFilterOp, SageEmbed, SearchBarEmbed, SearchEmbed, SpotterAgentEmbed, SpotterEmbed, UIPassthroughEvent, createLiveboardWithAnswers, executeTML, exportTML, getAnswerFromQuery, getEmbedConfig as getInitConfig, getSessionInfo, init, logout, prefetch, resetCachedAuthToken, tokenizedFetch, uploadMixpanelEvent };
package/dist/tsembed.js CHANGED
@@ -1,4 +1,4 @@
1
- /* @thoughtspot/visual-embed-sdk version 1.37.1 */
1
+ /* @thoughtspot/visual-embed-sdk version 1.38.0 */
2
2
  'use client';
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
@@ -2988,6 +2988,7 @@
2988
2988
  Param["ShowSpotterLimitations"] = "showSpotterLimitations";
2989
2989
  Param["CoverAndFilterOptionInPDF"] = "coverAndFilterOptionInPDF";
2990
2990
  Param["PrimaryAction"] = "primaryAction";
2991
+ Param["isSpotterAgentEmbed"] = "isSpotterAgentEmbed";
2991
2992
  })(Param || (Param = {}));
2992
2993
  /**
2993
2994
  * ThoughtSpot application pages include actions and menu commands
@@ -15405,7 +15406,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
15405
15406
  return e;
15406
15407
  }
15407
15408
 
15408
- var name="@thoughtspot/visual-embed-sdk";var version$1="1.37.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={classnames:"^2.3.1",eventemitter3:"^4.0.7",lodash:"^4.17.21","mixpanel-browser":"2.47.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1",yaml:"^2.5.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/lodash":"^4.17.0","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^8.28.0","@typescript-eslint/parser":"^8.28.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",crypto:"^1.0.1","current-git-branch":"^1.1.0","dts-bundle":"^0.7.3",eslint:"^9.23.0","eslint-config-airbnb-base":"^15.0.0","eslint-config-prettier":"^10.1.1","eslint-import-resolver-typescript":"^4.2.5","eslint-plugin-comment-length":"2.2.1","eslint-plugin-import":"^2.31.0","eslint-plugin-jsdoc":"^50.6.9","eslint-plugin-prettier":"^5.2.5","eslint-plugin-react":"^7.37.5","eslint-plugin-react-hooks":"^5.2.0","fs-extra":"^10.0.0","gh-pages":"6.3.0",globals:"^16.0.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",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:"4.24.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","typescript-eslint":"^8.29.1","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^6.3.5"};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$1,description:description,module:module,main:main,types:types,files:files,exports:exports$1,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.es.js",limit:"31 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};
15409
+ var name="@thoughtspot/visual-embed-sdk";var version$1="1.38.0";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports$1={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/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={classnames:"^2.3.1",eventemitter3:"^4.0.7",lodash:"^4.17.21","mixpanel-browser":"2.47.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1",yaml:"^2.5.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/lodash":"^4.17.0","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^8.28.0","@typescript-eslint/parser":"^8.28.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",crypto:"^1.0.1","current-git-branch":"^1.1.0","dts-bundle":"^0.7.3",eslint:"^9.23.0","eslint-config-airbnb-base":"^15.0.0","eslint-config-prettier":"^10.1.1","eslint-import-resolver-typescript":"^4.2.5","eslint-plugin-comment-length":"2.2.1","eslint-plugin-import":"^2.31.0","eslint-plugin-jsdoc":"^50.6.9","eslint-plugin-prettier":"^5.2.5","eslint-plugin-react":"^7.37.5","eslint-plugin-react-hooks":"^5.2.0","fs-extra":"^10.0.0","gh-pages":"6.3.0",globals:"^16.0.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",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:"4.24.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","typescript-eslint":"^8.29.1","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^6.3.5"};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$1,description:description,module:module,main:main,types:types,files:files,exports:exports$1,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.es.js",limit:"31 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};
15409
15410
 
15410
15411
  /**
15411
15412
  * Reloads the ThoughtSpot iframe.
@@ -16803,7 +16804,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
16803
16804
  * Define the version of the primary navbar
16804
16805
  * @version SDK: 1.39.0 | Thoughtspot: 10.10.0.cl
16805
16806
  */
16806
- var PrimaryNavbarVersion;
16807
+ exports.PrimaryNavbarVersion = void 0;
16807
16808
  (function (PrimaryNavbarVersion) {
16808
16809
  /**
16809
16810
  * Sliding (v3) introduces a new left-side navigation hub featuring a tab switcher,
@@ -16811,19 +16812,19 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
16811
16812
  * It serves as the foundational version of the PrimaryNavBar.
16812
16813
  */
16813
16814
  PrimaryNavbarVersion["Sliding"] = "v3";
16814
- })(PrimaryNavbarVersion || (PrimaryNavbarVersion = {}));
16815
+ })(exports.PrimaryNavbarVersion || (exports.PrimaryNavbarVersion = {}));
16815
16816
  /**
16816
16817
  * Define the version of the home page
16817
16818
  * @version SDK: 1.39.0 | Thoughtspot: 10.10.0.cl
16818
16819
  */
16819
- var HomePage;
16820
+ exports.HomePage = void 0;
16820
16821
  (function (HomePage) {
16821
16822
  /**
16822
16823
  * Modular (v2) introduces the updated Modular Home Experience.
16823
16824
  * It serves as the foundational version of the home page.
16824
16825
  */
16825
16826
  HomePage["Modular"] = "v2";
16826
- })(HomePage || (HomePage = {}));
16827
+ })(exports.HomePage || (exports.HomePage = {}));
16827
16828
  /**
16828
16829
  * Embeds full ThoughtSpot experience in a host application.
16829
16830
  * @group Embed components
@@ -16955,12 +16956,12 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
16955
16956
  }
16956
16957
  if (discoveryExperience) {
16957
16958
  // primaryNavbarVersion v3 will enabled the new left navigation
16958
- if (discoveryExperience.primaryNavbarVersion === PrimaryNavbarVersion.Sliding) {
16959
+ if (discoveryExperience.primaryNavbarVersion === exports.PrimaryNavbarVersion.Sliding) {
16959
16960
  params[Param.NavigationVersion] = discoveryExperience.primaryNavbarVersion;
16960
16961
  }
16961
16962
  // homePage v2 will enable the modular home page
16962
16963
  // and it will override the modularHomeExperience value
16963
- if (discoveryExperience.homePage === HomePage.Modular) {
16964
+ if (discoveryExperience.homePage === exports.HomePage.Modular) {
16964
16965
  params[Param.ModularHomeExperienceEnabled] = true;
16965
16966
  }
16966
16967
  }
@@ -18052,6 +18053,7 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
18052
18053
  const path = 'conv-assist-answer';
18053
18054
  const queryParams = this.getBaseQueryParams();
18054
18055
  queryParams[Param.HideActions] = [...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : [])];
18056
+ queryParams[Param.isSpotterAgentEmbed] = true;
18055
18057
  let query = '';
18056
18058
  const queryParamsString = getQueryParamString(queryParams, true);
18057
18059
  if (queryParamsString) {
@@ -18077,9 +18079,9 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
18077
18079
  * chatbots or other conversational interfaces.
18078
18080
  * @example
18079
18081
  * ```js
18080
- * import { BodylessConversation } from '@thoughtspot/visual-embed-sdk';
18082
+ * import { SpotterAgentEmbed } from '@thoughtspot/visual-embed-sdk';
18081
18083
  *
18082
- * const conversation = new BodylessConversation({
18084
+ * const conversation = new SpotterAgentEmbed({
18083
18085
  * worksheetId: 'worksheetId',
18084
18086
  * });
18085
18087
  *
@@ -18089,9 +18091,9 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
18089
18091
  * document.body.appendChild(container); // or to any other element
18090
18092
  * ```
18091
18093
  * @group Embed components
18092
- * @version SDK: 1.33.1 | ThoughtSpot: 10.5.0.cl
18094
+ * @version SDK: 1.37.0 | ThoughtSpot: 10.9.0.cl
18093
18095
  */
18094
- class BodylessConversation {
18096
+ class SpotterAgentEmbed {
18095
18097
  constructor(viewConfig) {
18096
18098
  this.viewConfig = viewConfig;
18097
18099
  const embedConfig = getEmbedConfig();
@@ -18103,6 +18105,9 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
18103
18105
  return { error };
18104
18106
  }
18105
18107
  const container = document.createElement('div');
18108
+ if (this.viewConfig.containerClassName) {
18109
+ container.className = this.viewConfig.containerClassName;
18110
+ }
18106
18111
  const embed = new ConversationMessage(container, {
18107
18112
  ...this.viewConfig,
18108
18113
  sessionId: data.sessionId,
@@ -18113,6 +18118,31 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
18113
18118
  await embed.render();
18114
18119
  return { container, viz: embed };
18115
18120
  }
18121
+ }
18122
+ /**
18123
+ * Create a conversation embed, which can be integrated inside
18124
+ * chatbots or other conversational interfaces.
18125
+ * @deprecated from SDK: 1.38.0 | ThoughtSpot: 10.10.0.cl
18126
+ * Use {@link SpotterAgentEmbed} instead
18127
+ * @example
18128
+ * ```js
18129
+ * import { SpotterAgentEmbed } from '@thoughtspot/visual-embed-sdk';
18130
+ *
18131
+ * const conversation = new SpotterAgentEmbed({
18132
+ * worksheetId: 'worksheetId',
18133
+ * });
18134
+ *
18135
+ * const { container, error } = await conversation.sendMessage('show me sales by region');
18136
+ *
18137
+ * // append the container to the DOM
18138
+ * document.body.appendChild(container); // or to any other element
18139
+ * ```
18140
+ * @group Embed components
18141
+ */
18142
+ class BodylessConversation extends SpotterAgentEmbed {
18143
+ constructor(viewConfig) {
18144
+ super(viewConfig);
18145
+ }
18116
18146
  }
18117
18147
 
18118
18148
  /**
@@ -18143,7 +18173,7 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
18143
18173
  * @group Embed components
18144
18174
  * @example
18145
18175
  * ```js
18146
- * const conversation = new ConversationEmbed('#tsEmbed', {
18176
+ * const conversation = new SpotterEmbed('#tsEmbed', {
18147
18177
  * worksheetId: 'worksheetId',
18148
18178
  * searchOptions: {
18149
18179
  * searchQuery: 'searchQuery',
@@ -18151,9 +18181,9 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
18151
18181
  * });
18152
18182
  * conversation.render();
18153
18183
  * ```
18154
- * @version SDK: 1.33.1 | ThoughtSpot: 10.5.0.cl
18184
+ * @version SDK: 1.37.0 | ThoughtSpot: 10.9.0.cl
18155
18185
  */
18156
- class ConversationEmbed extends TsEmbed {
18186
+ class SpotterEmbed extends TsEmbed {
18157
18187
  constructor(container, viewConfig) {
18158
18188
  viewConfig.embedComponentType = 'conversation';
18159
18189
  super(container, viewConfig);
@@ -18199,6 +18229,30 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
18199
18229
  await this.renderIFrame(src);
18200
18230
  return this;
18201
18231
  }
18232
+ }
18233
+ /**
18234
+ * Embed ThoughtSpot AI Conversation.
18235
+ * @deprecated from SDK: 1.38.0 | ThoughtSpot: 10.10.0.cl
18236
+ * Use {@link SpotterEmbed} instead
18237
+ * @group Embed components
18238
+ * @example
18239
+ * ```js
18240
+ * const conversation = new SpotterEmbed('#tsEmbed', {
18241
+ * worksheetId: 'worksheetId',
18242
+ * searchOptions: {
18243
+ * searchQuery: 'searchQuery',
18244
+ * },
18245
+ * });
18246
+ * conversation.render();
18247
+ * ```
18248
+ * @version SDK: 1.37.0 | ThoughtSpot: 10.9.0.cl
18249
+ */
18250
+ class ConversationEmbed extends SpotterEmbed {
18251
+ constructor(container, viewConfig) {
18252
+ viewConfig.embedComponentType = 'conversation';
18253
+ super(container, viewConfig);
18254
+ this.viewConfig = viewConfig;
18255
+ }
18202
18256
  }
18203
18257
 
18204
18258
  /**
@@ -26196,6 +26250,8 @@ query GetEurekaResults($params: Input_eureka_SearchRequest) {
26196
26250
  exports.SageEmbed = SageEmbed;
26197
26251
  exports.SearchBarEmbed = SearchBarEmbed;
26198
26252
  exports.SearchEmbed = SearchEmbed;
26253
+ exports.SpotterAgentEmbed = SpotterAgentEmbed;
26254
+ exports.SpotterEmbed = SpotterEmbed;
26199
26255
  exports.createLiveboardWithAnswers = createLiveboardWithAnswers;
26200
26256
  exports.executeTML = executeTML;
26201
26257
  exports.exportTML = exportTML;