@thoughtspot/visual-embed-sdk 1.39.1 → 1.39.2-spotter-agent

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 (181) hide show
  1. package/cjs/package.json +1 -1
  2. package/cjs/src/config.spec.js +9 -0
  3. package/cjs/src/config.spec.js.map +1 -1
  4. package/cjs/src/embed/app.d.ts.map +1 -1
  5. package/cjs/src/embed/app.js +2 -1
  6. package/cjs/src/embed/app.js.map +1 -1
  7. package/cjs/src/embed/app.spec.js +18 -8
  8. package/cjs/src/embed/app.spec.js.map +1 -1
  9. package/cjs/src/embed/bodyless-conversation.d.ts +19 -7
  10. package/cjs/src/embed/bodyless-conversation.d.ts.map +1 -1
  11. package/cjs/src/embed/bodyless-conversation.js +24 -4
  12. package/cjs/src/embed/bodyless-conversation.js.map +1 -1
  13. package/cjs/src/embed/bodyless-conversation.spec.js +8 -190
  14. package/cjs/src/embed/bodyless-conversation.spec.js.map +1 -1
  15. package/cjs/src/embed/conversation.spec.js +28 -0
  16. package/cjs/src/embed/conversation.spec.js.map +1 -1
  17. package/cjs/src/embed/embedConfig.d.ts +9 -7
  18. package/cjs/src/embed/embedConfig.d.ts.map +1 -1
  19. package/cjs/src/embed/embedConfig.js +9 -7
  20. package/cjs/src/embed/embedConfig.js.map +1 -1
  21. package/cjs/src/embed/liveboard.d.ts +0 -17
  22. package/cjs/src/embed/liveboard.d.ts.map +1 -1
  23. package/cjs/src/embed/liveboard.js +2 -4
  24. package/cjs/src/embed/liveboard.js.map +1 -1
  25. package/cjs/src/embed/liveboard.spec.js +12 -11
  26. package/cjs/src/embed/liveboard.spec.js.map +1 -1
  27. package/cjs/src/embed/ts-embed.d.ts +5 -0
  28. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  29. package/cjs/src/embed/ts-embed.js +16 -1
  30. package/cjs/src/embed/ts-embed.js.map +1 -1
  31. package/cjs/src/embed/ts-embed.spec.js +164 -0
  32. package/cjs/src/embed/ts-embed.spec.js.map +1 -1
  33. package/cjs/src/errors.d.ts +1 -0
  34. package/cjs/src/errors.d.ts.map +1 -1
  35. package/cjs/src/errors.js +1 -0
  36. package/cjs/src/errors.js.map +1 -1
  37. package/cjs/src/pages/embed-test.page.d.ts +8 -0
  38. package/cjs/src/pages/embed-test.page.d.ts.map +1 -0
  39. package/cjs/src/pages/embed-test.page.js +20 -0
  40. package/cjs/src/pages/embed-test.page.js.map +1 -0
  41. package/cjs/src/pages/home.page.d.ts +6 -0
  42. package/cjs/src/pages/home.page.d.ts.map +1 -0
  43. package/cjs/src/pages/home.page.js +12 -0
  44. package/cjs/src/pages/home.page.js.map +1 -0
  45. package/cjs/src/pages/login.page.d.ts +15 -0
  46. package/cjs/src/pages/login.page.d.ts.map +1 -0
  47. package/cjs/src/pages/login.page.js +22 -0
  48. package/cjs/src/pages/login.page.js.map +1 -0
  49. package/cjs/src/react/all-types-export.d.ts +1 -1
  50. package/cjs/src/react/all-types-export.d.ts.map +1 -1
  51. package/cjs/src/react/all-types-export.js +3 -2
  52. package/cjs/src/react/all-types-export.js.map +1 -1
  53. package/cjs/src/react/index.d.ts +71 -20
  54. package/cjs/src/react/index.d.ts.map +1 -1
  55. package/cjs/src/react/index.js +79 -42
  56. package/cjs/src/react/index.js.map +1 -1
  57. package/cjs/src/react/index.spec.js +436 -100
  58. package/cjs/src/react/index.spec.js.map +1 -1
  59. package/cjs/src/tests/auth.test.d.ts +1 -0
  60. package/cjs/src/tests/auth.test.d.ts.map +1 -0
  61. package/cjs/src/tests/auth.test.js +1 -0
  62. package/cjs/src/tests/auth.test.js.map +1 -0
  63. package/cjs/src/tests/e2e/auth.spec.d.ts +2 -0
  64. package/cjs/src/tests/e2e/auth.spec.d.ts.map +1 -0
  65. package/cjs/src/tests/e2e/auth.spec.js +54 -0
  66. package/cjs/src/tests/e2e/auth.spec.js.map +1 -0
  67. package/cjs/src/types.d.ts +34 -2
  68. package/cjs/src/types.d.ts.map +1 -1
  69. package/cjs/src/types.js +17 -1
  70. package/cjs/src/types.js.map +1 -1
  71. package/cjs/src/utils/graphql/nlsService/conversation-service.d.ts.map +1 -1
  72. package/cjs/src/utils/graphql/nlsService/conversation-service.js +2 -0
  73. package/cjs/src/utils/graphql/nlsService/conversation-service.js.map +1 -1
  74. package/cjs/src/utils.spec.js +25 -0
  75. package/cjs/src/utils.spec.js.map +1 -1
  76. package/dist/index-2QHwuA-G.js +7371 -0
  77. package/dist/index-Cj4BVGHL.js +7371 -0
  78. package/dist/index-DUaG1OG2.js +7447 -0
  79. package/dist/{index-JaFaxrvQ.js → index-DnIvX1FR.js} +1 -1
  80. package/dist/index-Fhk1V_Gw.js +7371 -0
  81. package/dist/index-OuiZF3zE.js +7371 -0
  82. package/dist/src/embed/app.d.ts.map +1 -1
  83. package/dist/src/embed/bodyless-conversation.d.ts +19 -7
  84. package/dist/src/embed/bodyless-conversation.d.ts.map +1 -1
  85. package/dist/src/embed/embedConfig.d.ts +9 -7
  86. package/dist/src/embed/embedConfig.d.ts.map +1 -1
  87. package/dist/src/embed/liveboard.d.ts +0 -17
  88. package/dist/src/embed/liveboard.d.ts.map +1 -1
  89. package/dist/src/embed/ts-embed.d.ts +5 -0
  90. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  91. package/dist/src/errors.d.ts +1 -0
  92. package/dist/src/errors.d.ts.map +1 -1
  93. package/dist/src/react/all-types-export.d.ts +1 -1
  94. package/dist/src/react/all-types-export.d.ts.map +1 -1
  95. package/dist/src/react/index.d.ts +71 -20
  96. package/dist/src/react/index.d.ts.map +1 -1
  97. package/dist/src/types.d.ts +34 -2
  98. package/dist/src/types.d.ts.map +1 -1
  99. package/dist/src/utils/graphql/nlsService/conversation-service.d.ts.map +1 -1
  100. package/dist/tsembed-react.es.js +157 -68
  101. package/dist/tsembed-react.js +157 -66
  102. package/dist/tsembed.es.js +74 -20
  103. package/dist/tsembed.js +73 -19
  104. package/dist/visual-embed-sdk-react-full.d.ts +132 -52
  105. package/dist/visual-embed-sdk-react.d.ts +132 -52
  106. package/dist/visual-embed-sdk.d.ts +62 -33
  107. package/lib/package.json +1 -1
  108. package/lib/src/config.spec.js +9 -0
  109. package/lib/src/config.spec.js.map +1 -1
  110. package/lib/src/embed/app.d.ts.map +1 -1
  111. package/lib/src/embed/app.js +2 -1
  112. package/lib/src/embed/app.js.map +1 -1
  113. package/lib/src/embed/app.spec.js +19 -9
  114. package/lib/src/embed/app.spec.js.map +1 -1
  115. package/lib/src/embed/bodyless-conversation.d.ts +19 -7
  116. package/lib/src/embed/bodyless-conversation.d.ts.map +1 -1
  117. package/lib/src/embed/bodyless-conversation.js +23 -4
  118. package/lib/src/embed/bodyless-conversation.js.map +1 -1
  119. package/lib/src/embed/bodyless-conversation.spec.js +9 -191
  120. package/lib/src/embed/bodyless-conversation.spec.js.map +1 -1
  121. package/lib/src/embed/conversation.spec.js +30 -2
  122. package/lib/src/embed/conversation.spec.js.map +1 -1
  123. package/lib/src/embed/embedConfig.d.ts +9 -7
  124. package/lib/src/embed/embedConfig.d.ts.map +1 -1
  125. package/lib/src/embed/embedConfig.js +9 -7
  126. package/lib/src/embed/embedConfig.js.map +1 -1
  127. package/lib/src/embed/liveboard.d.ts +0 -17
  128. package/lib/src/embed/liveboard.d.ts.map +1 -1
  129. package/lib/src/embed/liveboard.js +2 -4
  130. package/lib/src/embed/liveboard.js.map +1 -1
  131. package/lib/src/embed/liveboard.spec.js +12 -11
  132. package/lib/src/embed/liveboard.spec.js.map +1 -1
  133. package/lib/src/embed/ts-embed.d.ts +5 -0
  134. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  135. package/lib/src/embed/ts-embed.js +16 -1
  136. package/lib/src/embed/ts-embed.js.map +1 -1
  137. package/lib/src/embed/ts-embed.spec.js +164 -0
  138. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  139. package/lib/src/errors.d.ts +1 -0
  140. package/lib/src/errors.d.ts.map +1 -1
  141. package/lib/src/errors.js +1 -0
  142. package/lib/src/errors.js.map +1 -1
  143. package/lib/src/react/all-types-export.d.ts +1 -1
  144. package/lib/src/react/all-types-export.d.ts.map +1 -1
  145. package/lib/src/react/all-types-export.js +1 -1
  146. package/lib/src/react/all-types-export.js.map +1 -1
  147. package/lib/src/react/index.d.ts +71 -20
  148. package/lib/src/react/index.d.ts.map +1 -1
  149. package/lib/src/react/index.js +79 -43
  150. package/lib/src/react/index.js.map +1 -1
  151. package/lib/src/react/index.spec.js +439 -103
  152. package/lib/src/react/index.spec.js.map +1 -1
  153. package/lib/src/types.d.ts +34 -2
  154. package/lib/src/types.d.ts.map +1 -1
  155. package/lib/src/types.js +17 -1
  156. package/lib/src/types.js.map +1 -1
  157. package/lib/src/utils/graphql/nlsService/conversation-service.d.ts.map +1 -1
  158. package/lib/src/utils/graphql/nlsService/conversation-service.js +2 -0
  159. package/lib/src/utils/graphql/nlsService/conversation-service.js.map +1 -1
  160. package/lib/src/utils.spec.js +26 -1
  161. package/lib/src/utils.spec.js.map +1 -1
  162. package/lib/src/visual-embed-sdk.d.ts +62 -33
  163. package/package.json +1 -1
  164. package/src/config.spec.ts +11 -0
  165. package/src/embed/app.spec.ts +36 -23
  166. package/src/embed/app.ts +2 -0
  167. package/src/embed/bodyless-conversation.spec.ts +9 -203
  168. package/src/embed/bodyless-conversation.ts +24 -10
  169. package/src/embed/conversation.spec.ts +40 -2
  170. package/src/embed/embedConfig.ts +10 -8
  171. package/src/embed/liveboard.spec.ts +5 -4
  172. package/src/embed/liveboard.ts +2 -22
  173. package/src/embed/ts-embed.spec.ts +225 -0
  174. package/src/embed/ts-embed.ts +19 -0
  175. package/src/errors.ts +1 -0
  176. package/src/react/all-types-export.ts +2 -1
  177. package/src/react/index.spec.tsx +556 -157
  178. package/src/react/index.tsx +117 -51
  179. package/src/types.ts +75 -43
  180. package/src/utils/graphql/nlsService/conversation-service.ts +2 -0
  181. package/src/utils.spec.ts +29 -0
@@ -1,4 +1,4 @@
1
- /* @thoughtspot/visual-embed-sdk version 1.39.1 */
1
+ /* @thoughtspot/visual-embed-sdk version 1.39.2-spotter-agent */
2
2
  'use client';
3
3
  function _mergeNamespaces(n, m) {
4
4
  m.forEach(function (e) {
@@ -3062,7 +3062,7 @@ var Param;
3062
3062
  Param["DataSourceId"] = "dataSourceId";
3063
3063
  Param["preAuthCache"] = "preAuthCache";
3064
3064
  Param["ShowSpotterLimitations"] = "showSpotterLimitations";
3065
- Param["CoverAndFilterOptionInPDF"] = "coverAndFilterOptionInPDF";
3065
+ Param["CoverAndFilterOptionInPDF"] = "arePdfCoverFilterPageCheckboxesEnabled";
3066
3066
  Param["PrimaryAction"] = "primaryAction";
3067
3067
  Param["isSpotterAgentEmbed"] = "isSpotterAgentEmbed";
3068
3068
  Param["IsLiveboardStylingAndGroupingEnabled"] = "isLiveboardStylingAndGroupingEnabled";
@@ -4288,6 +4288,22 @@ var Action;
4288
4288
  * @version SDK: 1.37.0 | ThoughtSpot Cloud: 10.8.0.cl
4289
4289
  */
4290
4290
  Action["CoverAndFilterOptionInPDF"] = "coverAndFilterOptionInPDF";
4291
+ /**
4292
+ * Action ID for hide or disable the
4293
+ * Spotter in conversation training widget.
4294
+ * The Add to Coaching feature is currently in beta
4295
+ * and is disabled by default on embed deployments.
4296
+ * To enable this feature on your instance,
4297
+ * contact ThoughtSpot Support.
4298
+ * @example
4299
+ * ```js
4300
+ * hiddenAction: [Action.InConversationTraining]
4301
+ * disabledActions: [Action.InConversationTraining]
4302
+ *
4303
+ * ```
4304
+ * @version SDK: 1.39.0 | ThoughtSpot Cloud: 10.10.0.cl
4305
+ */
4306
+ Action["InConversationTraining"] = "InConversationTraining";
4291
4307
  })(Action || (Action = {}));
4292
4308
  var PrefetchFeatures;
4293
4309
  (function (PrefetchFeatures) {
@@ -6754,6 +6770,7 @@ const ERROR_MESSAGE = {
6754
6770
  CSP_FRAME_HOST_VIOLATION_LOG_MESSAGE: 'Please set up CSP correctly for the application to start working. For more information, see https://developers.thoughtspot.com/docs/security-settings#csp-viz-embed-hosts. \n If the issue persists, refer to https://developers.thoughtspot.com/docs/security-settings#csp-viz-embed-hosts',
6755
6771
  MISSING_REPORTING_OBSERVER: 'ReportingObserver not supported',
6756
6772
  RENDER_CALLED_BEFORE_INIT: 'Looks like render was called before calling init, the render won\'t start until init is called.\nFor more info check\n1. https://developers.thoughtspot.com/docs/Function_init#_init\n2.https://developers.thoughtspot.com/docs/getting-started#initSdk',
6773
+ SPOTTER_AGENT_NOT_INITIALIZED: 'SpotterAgent not initialized',
6757
6774
  };
6758
6775
 
6759
6776
  const EndPoints = {
@@ -6961,13 +6978,14 @@ const configKey = 'embedConfig';
6961
6978
  *
6962
6979
  * @example
6963
6980
  * ```js
6981
+ * import { getInitConfig } from '@thoughtspot/visual-embed-sdk';
6982
+ * // Call the getInitConfig method to retrieve the embed configuration
6964
6983
  * const config = getInitConfig();
6984
+ * // Log the configuration settings
6965
6985
  * console.log(config);
6966
6986
  * ```
6967
- * @example
6968
- *
6969
- * Returns the `EmbedConfig` object, which
6970
- * contains the configuration settings used to
6987
+ * Returns the link:https://developers.thoughtspot.com/docs/Interface_EmbedConfig[EmbedConfig]
6988
+ * object, which contains the configuration settings used to
6971
6989
  * initialize the SDK, including the following:
6972
6990
  *
6973
6991
  * - `thoughtSpotHost` - ThoughtSpot host URL
@@ -6976,9 +6994,10 @@ const configKey = 'embedConfig';
6976
6994
  * - `customizations` - Style, text, and icon customization settings
6977
6995
  * that were applied during the SDK initialization.
6978
6996
  *
6979
- * For a comprehensive list of embed configuration settings,
6980
- * see link:https://developers.thoughtspot.com/docs/Interface_EmbedConfig[Developer Documentation].
6997
+ * The following JSON output shows the embed configuration
6998
+ * settings returned from the code in the previous example:
6981
6999
  *
7000
+ * @example
6982
7001
  * ```json
6983
7002
  * {
6984
7003
  * "thoughtSpotHost": "https://{ThoughtSpot-Host}",
@@ -7000,7 +7019,7 @@ const configKey = 'embedConfig';
7000
7019
  * "authTriggerContainer": "#your-own-div"
7001
7020
  * }
7002
7021
  * ```
7003
- * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.cl, and later
7022
+ * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw, and later
7004
7023
  * @group Global methods
7005
7024
  */
7006
7025
  const getEmbedConfig = () => getValueFromWindow(configKey) || {};
@@ -7642,7 +7661,7 @@ class AnswerService {
7642
7661
  async getTML() {
7643
7662
  const { object } = await this.executeQuery(getAnswerTML, {});
7644
7663
  const edoc = object[0].edoc;
7645
- const YAML = await import('./index-JaFaxrvQ.js');
7664
+ const YAML = await import('./index-2QHwuA-G.js');
7646
7665
  const parsedDoc = YAML.parse(edoc);
7647
7666
  return {
7648
7667
  answer: {
@@ -15542,7 +15561,7 @@ function processEventData(type, e, thoughtSpotHost, containerEl) {
15542
15561
  return e;
15543
15562
  }
15544
15563
 
15545
- var name="@thoughtspot/visual-embed-sdk";var version$1="1.39.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};
15564
+ var name="@thoughtspot/visual-embed-sdk";var version$1="1.39.2-spotter-agent";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};
15546
15565
 
15547
15566
  /**
15548
15567
  * Reloads the ThoughtSpot iframe.
@@ -15940,10 +15959,25 @@ class TsEmbed {
15940
15959
  // - cached auth info would be for wrong org
15941
15960
  // - info call response changes for each different overrideOrgId
15942
15961
  // 2. disablePreauthCache is explicitly set to true
15962
+ // 3. FullAppEmbed has primary navbar visible since:
15963
+ // - primary navbar requires fresh auth state for navigation
15964
+ // - cached auth may not reflect current user permissions
15943
15965
  const isDisabled = (this.viewConfig.overrideOrgId !== undefined
15944
- || this.embedConfig.disablePreauthCache === true);
15966
+ || this.embedConfig.disablePreauthCache === true
15967
+ || this.isFullAppEmbedWithVisiblePrimaryNavbar());
15945
15968
  return !isDisabled;
15946
15969
  }
15970
+ /**
15971
+ * Checks if current embed is FullAppEmbed with visible primary navbar
15972
+ * @returns boolean
15973
+ */
15974
+ isFullAppEmbedWithVisiblePrimaryNavbar() {
15975
+ const appViewConfig = this.viewConfig;
15976
+ // Check if this is a FullAppEmbed (AppEmbed)
15977
+ // showPrimaryNavbar defaults to true if not explicitly set to false
15978
+ return (appViewConfig.embedComponentType === 'AppEmbed'
15979
+ && appViewConfig.showPrimaryNavbar === true);
15980
+ }
15947
15981
  /**
15948
15982
  * fix for ts7.sep.cl
15949
15983
  * will be removed for ts7.oct.cl
@@ -17077,7 +17111,7 @@ class AppEmbed extends V1Embed {
17077
17111
  getEmbedParams() {
17078
17112
  const { tag, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideHamburger, hideObjectSearch, hideNotification, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 = false, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, hideHomepageLeftNav = false, modularHomeExperience = false, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, enable2ColumnLayout, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false,
17079
17113
  /* eslint-disable-next-line max-len */
17080
- dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, discoveryExperience, isLiveboardStylingAndGroupingEnabled, } = this.viewConfig;
17114
+ dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, discoveryExperience, coverAndFilterOptionInPDF = false, isLiveboardStylingAndGroupingEnabled, } = this.viewConfig;
17081
17115
  let params = {};
17082
17116
  params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
17083
17117
  params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
@@ -17093,6 +17127,7 @@ class AppEmbed extends V1Embed {
17093
17127
  params[Param.ShowLiveboardReverifyBanner] = showLiveboardReverifyBanner;
17094
17128
  params[Param.HideIrrelevantFiltersInTab] = hideIrrelevantChipsInLiveboardTabs;
17095
17129
  params[Param.IsUnifiedSearchExperienceEnabled] = isUnifiedSearchExperienceEnabled;
17130
+ params[Param.CoverAndFilterOptionInPDF] = !!coverAndFilterOptionInPDF;
17096
17131
  params = this.getBaseQueryParams(params);
17097
17132
  if (hideObjectSearch) {
17098
17133
  params[Param.HideObjectSearch] = !!hideObjectSearch;
@@ -17412,7 +17447,7 @@ class LiveboardEmbed extends V1Embed {
17412
17447
  getEmbedParams() {
17413
17448
  let params = {};
17414
17449
  params = this.getBaseQueryParams(params);
17415
- const { enableVizTransformations, fullHeight, defaultHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, enableAskSage, enable2ColumnLayout, dataPanelV2 = false, enableCustomColumnGroups = false, oAuthPollingInterval, isForceRedirect, dataSourceId, coverAndFilterOptionInPDF, isLiveboardStylingAndGroupingEnabled, } = this.viewConfig;
17450
+ const { enableVizTransformations, fullHeight, defaultHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, enableAskSage, enable2ColumnLayout, dataPanelV2 = false, enableCustomColumnGroups = false, oAuthPollingInterval, isForceRedirect, dataSourceId, coverAndFilterOptionInPDF = false, isLiveboardStylingAndGroupingEnabled, } = this.viewConfig;
17416
17451
  const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
17417
17452
  || this.viewConfig.preventPinboardFilterRemoval;
17418
17453
  if (fullHeight === true) {
@@ -17464,9 +17499,6 @@ class LiveboardEmbed extends V1Embed {
17464
17499
  if (dataSourceId !== undefined) {
17465
17500
  params[Param.DataSourceId] = dataSourceId;
17466
17501
  }
17467
- if (coverAndFilterOptionInPDF !== undefined) {
17468
- params[Param.CoverAndFilterOptionInPDF] = coverAndFilterOptionInPDF;
17469
- }
17470
17502
  if (isLiveboardStylingAndGroupingEnabled !== undefined) {
17471
17503
  params[Param.IsLiveboardStylingAndGroupingEnabled] = isLiveboardStylingAndGroupingEnabled;
17472
17504
  }
@@ -17477,6 +17509,7 @@ class LiveboardEmbed extends V1Embed {
17477
17509
  params[Param.HideIrrelevantFiltersInTab] = hideIrrelevantChipsInLiveboardTabs;
17478
17510
  params[Param.DataPanelV2Enabled] = dataPanelV2;
17479
17511
  params[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
17512
+ params[Param.CoverAndFilterOptionInPDF] = coverAndFilterOptionInPDF;
17480
17513
  const queryParams = getQueryParamString(params, true);
17481
17514
  return queryParams;
17482
17515
  }
@@ -18235,6 +18268,8 @@ class Conversation {
18235
18268
  });
18236
18269
  const data = responses[0].data;
18237
18270
  return {
18271
+ convId: this.conversationId,
18272
+ messageId: responses[0].msgId,
18238
18273
  data: data.asstRespData.nlsAnsData.sageQuerySuggestions[0],
18239
18274
  error: null,
18240
18275
  };
@@ -18317,9 +18352,6 @@ class SpotterAgentEmbed {
18317
18352
  return { error };
18318
18353
  }
18319
18354
  const container = document.createElement('div');
18320
- if (this.viewConfig.containerClassName) {
18321
- container.className = this.viewConfig.containerClassName;
18322
- }
18323
18355
  const embed = new ConversationMessage(container, {
18324
18356
  ...this.viewConfig,
18325
18357
  sessionId: data.sessionId,
@@ -18330,6 +18362,28 @@ class SpotterAgentEmbed {
18330
18362
  await embed.render();
18331
18363
  return { container, viz: embed };
18332
18364
  }
18365
+ /**
18366
+ * Send a message to the conversation service and return only the data.
18367
+ * @param userMessage - The message to send to the conversation service.
18368
+ * @returns The data from the conversation service.
18369
+ */
18370
+ async sendMessageData(userMessage) {
18371
+ try {
18372
+ const { data, error } = await this.conversationService.sendMessage(userMessage);
18373
+ if (error) {
18374
+ return { error };
18375
+ }
18376
+ return { data: {
18377
+ sessionId: data.sessionId,
18378
+ genNo: data.genNo,
18379
+ acSessionId: data.stateKey.transactionId,
18380
+ acGenNo: data.stateKey.generationNumber,
18381
+ } };
18382
+ }
18383
+ catch (error) {
18384
+ return { error: error };
18385
+ }
18386
+ }
18333
18387
  }
18334
18388
  /**
18335
18389
  * Create a conversation embed, which can be integrated inside
package/dist/tsembed.js CHANGED
@@ -1,4 +1,4 @@
1
- /* @thoughtspot/visual-embed-sdk version 1.39.1 */
1
+ /* @thoughtspot/visual-embed-sdk version 1.39.2-spotter-agent */
2
2
  'use client';
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
@@ -3068,7 +3068,7 @@
3068
3068
  Param["DataSourceId"] = "dataSourceId";
3069
3069
  Param["preAuthCache"] = "preAuthCache";
3070
3070
  Param["ShowSpotterLimitations"] = "showSpotterLimitations";
3071
- Param["CoverAndFilterOptionInPDF"] = "coverAndFilterOptionInPDF";
3071
+ Param["CoverAndFilterOptionInPDF"] = "arePdfCoverFilterPageCheckboxesEnabled";
3072
3072
  Param["PrimaryAction"] = "primaryAction";
3073
3073
  Param["isSpotterAgentEmbed"] = "isSpotterAgentEmbed";
3074
3074
  Param["IsLiveboardStylingAndGroupingEnabled"] = "isLiveboardStylingAndGroupingEnabled";
@@ -4294,6 +4294,22 @@
4294
4294
  * @version SDK: 1.37.0 | ThoughtSpot Cloud: 10.8.0.cl
4295
4295
  */
4296
4296
  Action["CoverAndFilterOptionInPDF"] = "coverAndFilterOptionInPDF";
4297
+ /**
4298
+ * Action ID for hide or disable the
4299
+ * Spotter in conversation training widget.
4300
+ * The Add to Coaching feature is currently in beta
4301
+ * and is disabled by default on embed deployments.
4302
+ * To enable this feature on your instance,
4303
+ * contact ThoughtSpot Support.
4304
+ * @example
4305
+ * ```js
4306
+ * hiddenAction: [Action.InConversationTraining]
4307
+ * disabledActions: [Action.InConversationTraining]
4308
+ *
4309
+ * ```
4310
+ * @version SDK: 1.39.0 | ThoughtSpot Cloud: 10.10.0.cl
4311
+ */
4312
+ Action["InConversationTraining"] = "InConversationTraining";
4297
4313
  })(exports.Action || (exports.Action = {}));
4298
4314
  exports.PrefetchFeatures = void 0;
4299
4315
  (function (PrefetchFeatures) {
@@ -6760,6 +6776,7 @@
6760
6776
  CSP_FRAME_HOST_VIOLATION_LOG_MESSAGE: 'Please set up CSP correctly for the application to start working. For more information, see https://developers.thoughtspot.com/docs/security-settings#csp-viz-embed-hosts. \n If the issue persists, refer to https://developers.thoughtspot.com/docs/security-settings#csp-viz-embed-hosts',
6761
6777
  MISSING_REPORTING_OBSERVER: 'ReportingObserver not supported',
6762
6778
  RENDER_CALLED_BEFORE_INIT: 'Looks like render was called before calling init, the render won\'t start until init is called.\nFor more info check\n1. https://developers.thoughtspot.com/docs/Function_init#_init\n2.https://developers.thoughtspot.com/docs/getting-started#initSdk',
6779
+ SPOTTER_AGENT_NOT_INITIALIZED: 'SpotterAgent not initialized',
6763
6780
  };
6764
6781
 
6765
6782
  const EndPoints = {
@@ -6967,13 +6984,14 @@
6967
6984
  *
6968
6985
  * @example
6969
6986
  * ```js
6987
+ * import { getInitConfig } from '@thoughtspot/visual-embed-sdk';
6988
+ * // Call the getInitConfig method to retrieve the embed configuration
6970
6989
  * const config = getInitConfig();
6990
+ * // Log the configuration settings
6971
6991
  * console.log(config);
6972
6992
  * ```
6973
- * @example
6974
- *
6975
- * Returns the `EmbedConfig` object, which
6976
- * contains the configuration settings used to
6993
+ * Returns the link:https://developers.thoughtspot.com/docs/Interface_EmbedConfig[EmbedConfig]
6994
+ * object, which contains the configuration settings used to
6977
6995
  * initialize the SDK, including the following:
6978
6996
  *
6979
6997
  * - `thoughtSpotHost` - ThoughtSpot host URL
@@ -6982,9 +7000,10 @@
6982
7000
  * - `customizations` - Style, text, and icon customization settings
6983
7001
  * that were applied during the SDK initialization.
6984
7002
  *
6985
- * For a comprehensive list of embed configuration settings,
6986
- * see link:https://developers.thoughtspot.com/docs/Interface_EmbedConfig[Developer Documentation].
7003
+ * The following JSON output shows the embed configuration
7004
+ * settings returned from the code in the previous example:
6987
7005
  *
7006
+ * @example
6988
7007
  * ```json
6989
7008
  * {
6990
7009
  * "thoughtSpotHost": "https://{ThoughtSpot-Host}",
@@ -7006,7 +7025,7 @@
7006
7025
  * "authTriggerContainer": "#your-own-div"
7007
7026
  * }
7008
7027
  * ```
7009
- * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.cl, and later
7028
+ * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw, and later
7010
7029
  * @group Global methods
7011
7030
  */
7012
7031
  const getEmbedConfig = () => getValueFromWindow(configKey) || {};
@@ -15548,7 +15567,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
15548
15567
  return e;
15549
15568
  }
15550
15569
 
15551
- var name="@thoughtspot/visual-embed-sdk";var version$1="1.39.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};
15570
+ var name="@thoughtspot/visual-embed-sdk";var version$1="1.39.2-spotter-agent";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};
15552
15571
 
15553
15572
  /**
15554
15573
  * Reloads the ThoughtSpot iframe.
@@ -15946,10 +15965,25 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
15946
15965
  // - cached auth info would be for wrong org
15947
15966
  // - info call response changes for each different overrideOrgId
15948
15967
  // 2. disablePreauthCache is explicitly set to true
15968
+ // 3. FullAppEmbed has primary navbar visible since:
15969
+ // - primary navbar requires fresh auth state for navigation
15970
+ // - cached auth may not reflect current user permissions
15949
15971
  const isDisabled = (this.viewConfig.overrideOrgId !== undefined
15950
- || this.embedConfig.disablePreauthCache === true);
15972
+ || this.embedConfig.disablePreauthCache === true
15973
+ || this.isFullAppEmbedWithVisiblePrimaryNavbar());
15951
15974
  return !isDisabled;
15952
15975
  }
15976
+ /**
15977
+ * Checks if current embed is FullAppEmbed with visible primary navbar
15978
+ * @returns boolean
15979
+ */
15980
+ isFullAppEmbedWithVisiblePrimaryNavbar() {
15981
+ const appViewConfig = this.viewConfig;
15982
+ // Check if this is a FullAppEmbed (AppEmbed)
15983
+ // showPrimaryNavbar defaults to true if not explicitly set to false
15984
+ return (appViewConfig.embedComponentType === 'AppEmbed'
15985
+ && appViewConfig.showPrimaryNavbar === true);
15986
+ }
15953
15987
  /**
15954
15988
  * fix for ts7.sep.cl
15955
15989
  * will be removed for ts7.oct.cl
@@ -17083,7 +17117,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
17083
17117
  getEmbedParams() {
17084
17118
  const { tag, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideHamburger, hideObjectSearch, hideNotification, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 = false, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, hideHomepageLeftNav = false, modularHomeExperience = false, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, enable2ColumnLayout, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false,
17085
17119
  /* eslint-disable-next-line max-len */
17086
- dataPanelCustomGroupsAccordionInitialState = exports.DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, discoveryExperience, isLiveboardStylingAndGroupingEnabled, } = this.viewConfig;
17120
+ dataPanelCustomGroupsAccordionInitialState = exports.DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, discoveryExperience, coverAndFilterOptionInPDF = false, isLiveboardStylingAndGroupingEnabled, } = this.viewConfig;
17087
17121
  let params = {};
17088
17122
  params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
17089
17123
  params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
@@ -17099,6 +17133,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
17099
17133
  params[Param.ShowLiveboardReverifyBanner] = showLiveboardReverifyBanner;
17100
17134
  params[Param.HideIrrelevantFiltersInTab] = hideIrrelevantChipsInLiveboardTabs;
17101
17135
  params[Param.IsUnifiedSearchExperienceEnabled] = isUnifiedSearchExperienceEnabled;
17136
+ params[Param.CoverAndFilterOptionInPDF] = !!coverAndFilterOptionInPDF;
17102
17137
  params = this.getBaseQueryParams(params);
17103
17138
  if (hideObjectSearch) {
17104
17139
  params[Param.HideObjectSearch] = !!hideObjectSearch;
@@ -17418,7 +17453,7 @@ query GetEurekaVizSnapshots(
17418
17453
  getEmbedParams() {
17419
17454
  let params = {};
17420
17455
  params = this.getBaseQueryParams(params);
17421
- const { enableVizTransformations, fullHeight, defaultHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, enableAskSage, enable2ColumnLayout, dataPanelV2 = false, enableCustomColumnGroups = false, oAuthPollingInterval, isForceRedirect, dataSourceId, coverAndFilterOptionInPDF, isLiveboardStylingAndGroupingEnabled, } = this.viewConfig;
17456
+ const { enableVizTransformations, fullHeight, defaultHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, enableAskSage, enable2ColumnLayout, dataPanelV2 = false, enableCustomColumnGroups = false, oAuthPollingInterval, isForceRedirect, dataSourceId, coverAndFilterOptionInPDF = false, isLiveboardStylingAndGroupingEnabled, } = this.viewConfig;
17422
17457
  const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
17423
17458
  || this.viewConfig.preventPinboardFilterRemoval;
17424
17459
  if (fullHeight === true) {
@@ -17470,9 +17505,6 @@ query GetEurekaVizSnapshots(
17470
17505
  if (dataSourceId !== undefined) {
17471
17506
  params[Param.DataSourceId] = dataSourceId;
17472
17507
  }
17473
- if (coverAndFilterOptionInPDF !== undefined) {
17474
- params[Param.CoverAndFilterOptionInPDF] = coverAndFilterOptionInPDF;
17475
- }
17476
17508
  if (isLiveboardStylingAndGroupingEnabled !== undefined) {
17477
17509
  params[Param.IsLiveboardStylingAndGroupingEnabled] = isLiveboardStylingAndGroupingEnabled;
17478
17510
  }
@@ -17483,6 +17515,7 @@ query GetEurekaVizSnapshots(
17483
17515
  params[Param.HideIrrelevantFiltersInTab] = hideIrrelevantChipsInLiveboardTabs;
17484
17516
  params[Param.DataPanelV2Enabled] = dataPanelV2;
17485
17517
  params[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
17518
+ params[Param.CoverAndFilterOptionInPDF] = coverAndFilterOptionInPDF;
17486
17519
  const queryParams = getQueryParamString(params, true);
17487
17520
  return queryParams;
17488
17521
  }
@@ -18241,6 +18274,8 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
18241
18274
  });
18242
18275
  const data = responses[0].data;
18243
18276
  return {
18277
+ convId: this.conversationId,
18278
+ messageId: responses[0].msgId,
18244
18279
  data: data.asstRespData.nlsAnsData.sageQuerySuggestions[0],
18245
18280
  error: null,
18246
18281
  };
@@ -18323,9 +18358,6 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
18323
18358
  return { error };
18324
18359
  }
18325
18360
  const container = document.createElement('div');
18326
- if (this.viewConfig.containerClassName) {
18327
- container.className = this.viewConfig.containerClassName;
18328
- }
18329
18361
  const embed = new ConversationMessage(container, {
18330
18362
  ...this.viewConfig,
18331
18363
  sessionId: data.sessionId,
@@ -18336,6 +18368,28 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
18336
18368
  await embed.render();
18337
18369
  return { container, viz: embed };
18338
18370
  }
18371
+ /**
18372
+ * Send a message to the conversation service and return only the data.
18373
+ * @param userMessage - The message to send to the conversation service.
18374
+ * @returns The data from the conversation service.
18375
+ */
18376
+ async sendMessageData(userMessage) {
18377
+ try {
18378
+ const { data, error } = await this.conversationService.sendMessage(userMessage);
18379
+ if (error) {
18380
+ return { error };
18381
+ }
18382
+ return { data: {
18383
+ sessionId: data.sessionId,
18384
+ genNo: data.genNo,
18385
+ acSessionId: data.stateKey.transactionId,
18386
+ acGenNo: data.stateKey.generationNumber,
18387
+ } };
18388
+ }
18389
+ catch (error) {
18390
+ return { error: error };
18391
+ }
18392
+ }
18339
18393
  }
18340
18394
  /**
18341
18395
  * Create a conversation embed, which can be integrated inside