@thoughtspot/visual-embed-sdk 1.41.1 → 1.42.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 (134) hide show
  1. package/cjs/package.json +8 -8
  2. package/cjs/src/css-variables.d.ts +52 -14
  3. package/cjs/src/css-variables.d.ts.map +1 -1
  4. package/cjs/src/embed/bodyless-conversation.d.ts +1 -0
  5. package/cjs/src/embed/bodyless-conversation.d.ts.map +1 -1
  6. package/cjs/src/embed/bodyless-conversation.js +7 -3
  7. package/cjs/src/embed/bodyless-conversation.js.map +1 -1
  8. package/cjs/src/embed/conversation.d.ts +1 -0
  9. package/cjs/src/embed/conversation.d.ts.map +1 -1
  10. package/cjs/src/embed/conversation.js +7 -2
  11. package/cjs/src/embed/conversation.js.map +1 -1
  12. package/cjs/src/embed/liveboard.d.ts +1 -0
  13. package/cjs/src/embed/liveboard.d.ts.map +1 -1
  14. package/cjs/src/embed/liveboard.js +6 -1
  15. package/cjs/src/embed/liveboard.js.map +1 -1
  16. package/cjs/src/embed/liveboard.spec.js +13 -0
  17. package/cjs/src/embed/liveboard.spec.js.map +1 -1
  18. package/cjs/src/embed/sage.d.ts +1 -0
  19. package/cjs/src/embed/sage.d.ts.map +1 -1
  20. package/cjs/src/embed/sage.js +10 -6
  21. package/cjs/src/embed/sage.js.map +1 -1
  22. package/cjs/src/embed/search-bar.d.ts +1 -0
  23. package/cjs/src/embed/search-bar.d.ts.map +1 -1
  24. package/cjs/src/embed/search-bar.js +11 -7
  25. package/cjs/src/embed/search-bar.js.map +1 -1
  26. package/cjs/src/embed/search.d.ts +1 -0
  27. package/cjs/src/embed/search.d.ts.map +1 -1
  28. package/cjs/src/embed/search.js +7 -8
  29. package/cjs/src/embed/search.js.map +1 -1
  30. package/cjs/src/embed/ts-embed.d.ts +6 -4
  31. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  32. package/cjs/src/embed/ts-embed.js +21 -8
  33. package/cjs/src/embed/ts-embed.js.map +1 -1
  34. package/cjs/src/embed/ts-embed.spec.js.map +1 -1
  35. package/cjs/src/react/all-types-export.spec.js +1 -1
  36. package/cjs/src/react/all-types-export.spec.js.map +1 -1
  37. package/cjs/src/react/util.js.map +1 -1
  38. package/cjs/src/react/util.spec.d.ts +2 -0
  39. package/cjs/src/react/util.spec.d.ts.map +1 -0
  40. package/cjs/src/react/util.spec.js +78 -0
  41. package/cjs/src/react/util.spec.js.map +1 -0
  42. package/cjs/src/types.d.ts +35 -4
  43. package/cjs/src/types.d.ts.map +1 -1
  44. package/cjs/src/types.js +34 -3
  45. package/cjs/src/types.js.map +1 -1
  46. package/dist/{index-DQueHwfQ.js → index-BpSohedu.js} +1 -1
  47. package/dist/src/css-variables.d.ts +52 -14
  48. package/dist/src/css-variables.d.ts.map +1 -1
  49. package/dist/src/embed/bodyless-conversation.d.ts +1 -0
  50. package/dist/src/embed/bodyless-conversation.d.ts.map +1 -1
  51. package/dist/src/embed/conversation.d.ts +1 -0
  52. package/dist/src/embed/conversation.d.ts.map +1 -1
  53. package/dist/src/embed/liveboard.d.ts +1 -0
  54. package/dist/src/embed/liveboard.d.ts.map +1 -1
  55. package/dist/src/embed/sage.d.ts +1 -0
  56. package/dist/src/embed/sage.d.ts.map +1 -1
  57. package/dist/src/embed/search-bar.d.ts +1 -0
  58. package/dist/src/embed/search-bar.d.ts.map +1 -1
  59. package/dist/src/embed/search.d.ts +1 -0
  60. package/dist/src/embed/search.d.ts.map +1 -1
  61. package/dist/src/embed/ts-embed.d.ts +6 -4
  62. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  63. package/dist/src/react/util.spec.d.ts +2 -0
  64. package/dist/src/react/util.spec.d.ts.map +1 -0
  65. package/dist/src/types.d.ts +35 -4
  66. package/dist/src/types.d.ts.map +1 -1
  67. package/dist/tsembed-react.es.js +107 -42
  68. package/dist/tsembed-react.js +106 -41
  69. package/dist/tsembed.es.js +107 -42
  70. package/dist/tsembed.js +106 -41
  71. package/dist/visual-embed-sdk-react-full.d.ts +9312 -9916
  72. package/dist/visual-embed-sdk-react.d.ts +9184 -9922
  73. package/dist/visual-embed-sdk.d.ts +9351 -9533
  74. package/lib/package.json +8 -8
  75. package/lib/src/css-variables.d.ts +52 -14
  76. package/lib/src/css-variables.d.ts.map +1 -1
  77. package/lib/src/embed/bodyless-conversation.d.ts +1 -0
  78. package/lib/src/embed/bodyless-conversation.d.ts.map +1 -1
  79. package/lib/src/embed/bodyless-conversation.js +7 -3
  80. package/lib/src/embed/bodyless-conversation.js.map +1 -1
  81. package/lib/src/embed/conversation.d.ts +1 -0
  82. package/lib/src/embed/conversation.d.ts.map +1 -1
  83. package/lib/src/embed/conversation.js +7 -2
  84. package/lib/src/embed/conversation.js.map +1 -1
  85. package/lib/src/embed/liveboard.d.ts +1 -0
  86. package/lib/src/embed/liveboard.d.ts.map +1 -1
  87. package/lib/src/embed/liveboard.js +6 -1
  88. package/lib/src/embed/liveboard.js.map +1 -1
  89. package/lib/src/embed/liveboard.spec.js +13 -0
  90. package/lib/src/embed/liveboard.spec.js.map +1 -1
  91. package/lib/src/embed/sage.d.ts +1 -0
  92. package/lib/src/embed/sage.d.ts.map +1 -1
  93. package/lib/src/embed/sage.js +10 -6
  94. package/lib/src/embed/sage.js.map +1 -1
  95. package/lib/src/embed/search-bar.d.ts +1 -0
  96. package/lib/src/embed/search-bar.d.ts.map +1 -1
  97. package/lib/src/embed/search-bar.js +11 -7
  98. package/lib/src/embed/search-bar.js.map +1 -1
  99. package/lib/src/embed/search.d.ts +1 -0
  100. package/lib/src/embed/search.d.ts.map +1 -1
  101. package/lib/src/embed/search.js +7 -8
  102. package/lib/src/embed/search.js.map +1 -1
  103. package/lib/src/embed/ts-embed.d.ts +6 -4
  104. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  105. package/lib/src/embed/ts-embed.js +21 -8
  106. package/lib/src/embed/ts-embed.js.map +1 -1
  107. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  108. package/lib/src/react/all-types-export.spec.js +1 -1
  109. package/lib/src/react/all-types-export.spec.js.map +1 -1
  110. package/lib/src/react/util.js.map +1 -1
  111. package/lib/src/react/util.spec.d.ts +2 -0
  112. package/lib/src/react/util.spec.d.ts.map +1 -0
  113. package/lib/src/react/util.spec.js +76 -0
  114. package/lib/src/react/util.spec.js.map +1 -0
  115. package/lib/src/types.d.ts +35 -4
  116. package/lib/src/types.d.ts.map +1 -1
  117. package/lib/src/types.js +34 -3
  118. package/lib/src/types.js.map +1 -1
  119. package/package.json +8 -8
  120. package/src/css-variables.ts +53 -16
  121. package/src/embed/bodyless-conversation.ts +8 -3
  122. package/src/embed/conversation.ts +17 -2
  123. package/src/embed/liveboard.spec.ts +14 -0
  124. package/src/embed/liveboard.ts +7 -1
  125. package/src/embed/sage.ts +14 -9
  126. package/src/embed/search-bar.tsx +14 -7
  127. package/src/embed/search.ts +18 -7
  128. package/src/embed/ts-embed.spec.ts +1 -1
  129. package/src/embed/ts-embed.ts +28 -12
  130. package/src/react/all-types-export.spec.ts +1 -1
  131. package/src/react/util.spec.tsx +88 -0
  132. package/src/react/util.ts +3 -3
  133. package/src/types.ts +98 -66
  134. package/lib/src/visual-embed-sdk.d.ts +0 -9779
@@ -1,4 +1,4 @@
1
- /* @thoughtspot/visual-embed-sdk version 1.41.1 */
1
+ /* @thoughtspot/visual-embed-sdk version 1.42.0 */
2
2
  'use client';
3
3
  function _mergeNamespaces(n, m) {
4
4
  m.forEach(function (e) {
@@ -2764,21 +2764,42 @@ var HostEvent;
2764
2764
  */
2765
2765
  HostEvent["Share"] = "share";
2766
2766
  /**
2767
- * Trigger the **Save** action on a Liveboard or Answer.
2767
+ * Trigger the **Save** action on a Liveboard, Answer, or Spotter.
2768
2768
  * Saves the changes.
2769
- * @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
2769
+ *
2770
+ * @param - `vizId` refers to the Spotter Visualization Id used in Spotter embed.
2771
+ * It is required and can be retrieved from the data embed event.
2772
+ *
2770
2773
  * @example
2771
2774
  * ```js
2775
+ * // Save changes in a Liveboard
2772
2776
  * liveboardEmbed.trigger(HostEvent.Save)
2773
2777
  * ```
2778
+ *
2774
2779
  * ```js
2780
+ * // Save the current Answer in Search embed
2775
2781
  * searchEmbed.trigger(HostEvent.Save)
2776
2782
  * ```
2783
+ *
2777
2784
  * ```js
2785
+ * // Save an Answer in Spotter (requires vizId)
2778
2786
  * spotterEmbed.trigger(HostEvent.Save, {
2779
- * vizId:"730496d6-6903-4601-937e-2c691821af3c"
2787
+ * vizId: "730496d6-6903-4601-937e-2c691821af3c"
2780
2788
  * })
2781
2789
  * ```
2790
+ *
2791
+ * ```js
2792
+ * // How to get the vizId in Spotter?
2793
+ *
2794
+ * // You can use the Data event dispatched on each answer creation to get the vizId.
2795
+ * let latestSpotterVizId = '';
2796
+ * spotterEmbed.on(EmbedEvent.Data, (payload) => {
2797
+ * latestSpotterVizId = payload.data.id;
2798
+ * });
2799
+ *
2800
+ * spotterEmbed.trigger(HostEvent.Save, { vizId: latestSpotterVizId });
2801
+ * ```
2802
+ *
2782
2803
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
2783
2804
  */
2784
2805
  HostEvent["Save"] = "save";
@@ -3262,6 +3283,16 @@ var HostEvent;
3262
3283
  * @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
3263
3284
  */
3264
3285
  HostEvent["AskSpotter"] = "AskSpotter";
3286
+ /**
3287
+ * @hidden
3288
+ * Triggers the update of the embed params.
3289
+ *
3290
+ * @example
3291
+ * ```js
3292
+ * liveboardEmbed.trigger(HostEvent.UpdateEmbedParams, viewConfig);
3293
+ * ```
3294
+ */
3295
+ HostEvent["UpdateEmbedParams"] = "updateEmbedParams";
3265
3296
  })(HostEvent || (HostEvent = {}));
3266
3297
  /**
3267
3298
  * The different visual modes that the data sources panel within
@@ -8110,7 +8141,7 @@ class AnswerService {
8110
8141
  async getTML() {
8111
8142
  const { object } = await this.executeQuery(getAnswerTML, {});
8112
8143
  const edoc = object[0].edoc;
8113
- const YAML = await import('./index-DQueHwfQ.js');
8144
+ const YAML = await import('./index-BpSohedu.js');
8114
8145
  const parsedDoc = YAML.parse(edoc);
8115
8146
  return {
8116
8147
  answer: {
@@ -17449,7 +17480,7 @@ function processEventData(type, e, thoughtSpotHost, containerEl) {
17449
17480
  return e;
17450
17481
  }
17451
17482
 
17452
- var name="@thoughtspot/visual-embed-sdk";var version$1="1.41.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 | npx coveralls-next","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":"^11.2.0","@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",ajv:"^8.17.1",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1","coveralls-next":"^5.0.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":"^2.0.0",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:"32 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};
17483
+ var name="@thoughtspot/visual-embed-sdk";var version$1="1.42.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 tsconfig.build.json --incremental false; tsc -p tsconfig.build.json --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle-generator --config ./dts-config/dts-bundle-file.config.js","bundle-dts":"dts-bundle-generator --config ./dts-config/dts-bundle.config.js","bundle-dts-react":"dts-bundle-generator --config ./dts-config/dts-bundle-react.config.js","bundle-dts-react-full":"dts-bundle-generator --config ./dts-config/dts-bundle-react-full.config.js",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.build.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 | npx coveralls-next","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":"^11.2.0","@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",ajv:"^8.17.1",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1","coveralls-next":"^5.0.0",crypto:"^1.0.1","current-git-branch":"^1.1.0","dts-bundle-generator":"^9.5.1",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":"^2.0.0",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:"32 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};
17453
17484
 
17454
17485
  /**
17455
17486
  * Reloads the ThoughtSpot iframe.
@@ -17760,10 +17791,10 @@ class TsEmbed {
17760
17791
  };
17761
17792
  this.showPreRenderByDefault = false;
17762
17793
  /**
17763
- * @hidden
17764
- * Internal state to track if the embed container is loaded.
17765
- * This is used to trigger events after the embed container is loaded.
17766
- */
17794
+ * @hidden
17795
+ * Internal state to track if the embed container is loaded.
17796
+ * This is used to trigger events after the embed container is loaded.
17797
+ */
17767
17798
  this.isEmbedContainerLoaded = false;
17768
17799
  /**
17769
17800
  * @hidden
@@ -17822,10 +17853,10 @@ class TsEmbed {
17822
17853
  uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_EMBED_CREATE, {
17823
17854
  ...viewConfig,
17824
17855
  });
17856
+ const embedConfig = getEmbedConfig();
17857
+ this.embedConfig = embedConfig;
17825
17858
  this.hostEventClient = new HostEventClient(this.iFrame);
17826
17859
  this.isReadyForRenderPromise = getInitPromise().then(async () => {
17827
- const embedConfig = getEmbedConfig();
17828
- this.embedConfig = embedConfig;
17829
17860
  if (!embedConfig.authTriggerContainer && !embedConfig.useEventForSAMLPopup) {
17830
17861
  this.embedConfig.authTriggerContainer = domSelector;
17831
17862
  }
@@ -18021,6 +18052,11 @@ class TsEmbed {
18021
18052
  .join('/');
18022
18053
  return `${basePath}#`;
18023
18054
  }
18055
+ getUpdateEmbedParamsObject() {
18056
+ let queryParams = this.getEmbedParamsObject();
18057
+ queryParams = { ...this.viewConfig, ...queryParams };
18058
+ return queryParams;
18059
+ }
18024
18060
  /**
18025
18061
  * Common query params set for all the embed modes.
18026
18062
  * @param queryParams
@@ -18170,9 +18206,13 @@ class TsEmbed {
18170
18206
  return path;
18171
18207
  }
18172
18208
  getEmbedParams() {
18173
- const queryParams = this.getBaseQueryParams();
18209
+ const queryParams = this.getEmbedParamsObject();
18174
18210
  return getQueryParamString(queryParams);
18175
18211
  }
18212
+ getEmbedParamsObject() {
18213
+ const params = this.getBaseQueryParams();
18214
+ return params;
18215
+ }
18176
18216
  getRootIframeSrc() {
18177
18217
  const query = this.getEmbedParams();
18178
18218
  return this.getEmbedBasePath(query);
@@ -18737,7 +18777,12 @@ class TsEmbed {
18737
18777
  return this.preRender(true);
18738
18778
  }
18739
18779
  this.validatePreRenderViewConfig(this.viewConfig);
18780
+ logger$3.debug('triggering UpdateEmbedParams', this.viewConfig);
18781
+ this.executeAfterEmbedContainerLoaded(() => {
18782
+ this.trigger(HostEvent.UpdateEmbedParams, this.getUpdateEmbedParamsObject());
18783
+ });
18740
18784
  }
18785
+ this.beforePrerenderVisible();
18741
18786
  if (this.el) {
18742
18787
  this.syncPreRenderStyle();
18743
18788
  if (!this.viewConfig.doNotTrackPreRenderSize) {
@@ -18754,7 +18799,6 @@ class TsEmbed {
18754
18799
  this.resizeObserver.observe(this.el);
18755
18800
  }
18756
18801
  }
18757
- this.beforePrerenderVisible();
18758
18802
  removeStyleProperties(this.preRenderWrapper, ['z-index', 'opacity', 'pointer-events']);
18759
18803
  this.subscribeToEvents();
18760
18804
  // Setup fullscreen change handler for prerendered components
@@ -19535,6 +19579,11 @@ class LiveboardEmbed extends V1Embed {
19535
19579
  * embedded Liveboard or visualization.
19536
19580
  */
19537
19581
  getEmbedParams() {
19582
+ const params = this.getEmbedParamsObject();
19583
+ const queryParams = getQueryParamString(params, true);
19584
+ return queryParams;
19585
+ }
19586
+ getEmbedParamsObject() {
19538
19587
  let params = {};
19539
19588
  params = this.getBaseQueryParams(params);
19540
19589
  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 = true, enableCustomColumnGroups = false, oAuthPollingInterval, isForceRedirect, dataSourceId, coverAndFilterOptionInPDF = false, liveboardXLSXCSVDownload = false, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, showSpotterLimitations, } = this.viewConfig;
@@ -19611,8 +19660,8 @@ class LiveboardEmbed extends V1Embed {
19611
19660
  params[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
19612
19661
  params[Param.CoverAndFilterOptionInPDF] = coverAndFilterOptionInPDF;
19613
19662
  params[Param.LiveboardXLSXCSVDownload] = !!liveboardXLSXCSVDownload;
19614
- const queryParams = getQueryParamString(params, true);
19615
- return queryParams;
19663
+ getQueryParamString(params, true);
19664
+ return params;
19616
19665
  }
19617
19666
  getIframeSuffixSrc(liveboardId, vizId, activeTabId) {
19618
19667
  let suffix = `/embed/viz/${liveboardId}`;
@@ -19854,11 +19903,9 @@ class SearchEmbed extends TsEmbed {
19854
19903
  const defaultAppInitData = await super.getAppInitData();
19855
19904
  return { ...defaultAppInitData, ...this.getSearchInitData() };
19856
19905
  }
19857
- getEmbedParams() {
19906
+ getEmbedParamsObject() {
19858
19907
  var _a;
19859
- const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, hideSearchBar, dataPanelV2 = true, useLastSelectedSources = false, runtimeParameters, collapseSearchBarInitially = false, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false,
19860
- /* eslint-disable-next-line max-len */
19861
- dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, focusSearchBarOnRender = true, excludeRuntimeParametersfromURL, excludeSearchTokenStringFromURL, collapseSearchBar = true, } = this.viewConfig;
19908
+ const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, hideSearchBar, dataPanelV2 = true, useLastSelectedSources = false, runtimeParameters, collapseSearchBarInitially = false, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false, dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, focusSearchBarOnRender = true, excludeRuntimeParametersfromURL, excludeSearchTokenStringFromURL, collapseSearchBar = true, } = this.viewConfig;
19862
19909
  const queryParams = this.getBaseQueryParams();
19863
19910
  queryParams[Param.HideActions] = [
19864
19911
  ...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : []),
@@ -19891,7 +19938,6 @@ class SearchEmbed extends TsEmbed {
19891
19938
  queryParams[Param.HideSearchBar] = true;
19892
19939
  }
19893
19940
  if (isOnBeforeGetVizDataInterceptEnabled) {
19894
- /* eslint-disable-next-line max-len */
19895
19941
  queryParams[Param.IsOnBeforeGetVizDataInterceptEnabled] = isOnBeforeGetVizDataInterceptEnabled;
19896
19942
  }
19897
19943
  if (!focusSearchBarOnRender) {
@@ -19904,20 +19950,22 @@ class SearchEmbed extends TsEmbed {
19904
19950
  queryParams[Param.UseLastSelectedDataSource] = false;
19905
19951
  }
19906
19952
  queryParams[Param.searchEmbed] = true;
19907
- /* eslint-disable-next-line max-len */
19908
19953
  queryParams[Param.CollapseSearchBarInitially] = collapseSearchBarInitially || collapseSearchBar;
19909
19954
  queryParams[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
19910
19955
  if (dataPanelCustomGroupsAccordionInitialState
19911
19956
  === DataPanelCustomColumnGroupsAccordionState.COLLAPSE_ALL
19912
19957
  || dataPanelCustomGroupsAccordionInitialState
19913
19958
  === DataPanelCustomColumnGroupsAccordionState.EXPAND_FIRST) {
19914
- /* eslint-disable-next-line max-len */
19915
19959
  queryParams[Param.DataPanelCustomGroupsAccordionInitialState] = dataPanelCustomGroupsAccordionInitialState;
19916
19960
  }
19917
19961
  else {
19918
- /* eslint-disable-next-line max-len */
19919
19962
  queryParams[Param.DataPanelCustomGroupsAccordionInitialState] = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL;
19920
19963
  }
19964
+ return queryParams;
19965
+ }
19966
+ getEmbedParams() {
19967
+ const { runtimeParameters, runtimeFilters, excludeRuntimeParametersfromURL, excludeRuntimeFiltersfromURL, } = this.viewConfig;
19968
+ const queryParams = this.getEmbedParamsObject();
19921
19969
  let query = '';
19922
19970
  const queryParamsString = getQueryParamString(queryParams, true);
19923
19971
  if (queryParamsString) {
@@ -19973,15 +20021,9 @@ class SearchBarEmbed extends TsEmbed {
19973
20021
  this.embedComponentType = 'SearchBarEmbed';
19974
20022
  this.viewConfig = viewConfig;
19975
20023
  }
19976
- /**
19977
- * Construct the URL of the embedded ThoughtSpot search to be
19978
- * loaded in the iframe
19979
- * @param dataSources A list of data source GUIDs
19980
- */
19981
- getIFrameSrc() {
20024
+ getEmbedParamsObject() {
19982
20025
  var _a;
19983
20026
  const { searchOptions, dataSource, dataSources, useLastSelectedSources = false, excludeSearchTokenStringFromURL, } = this.viewConfig;
19984
- const path = 'search-bar-embed';
19985
20027
  const queryParams = this.getBaseQueryParams();
19986
20028
  queryParams[Param.HideActions] = [...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : [])];
19987
20029
  if (dataSources && dataSources.length) {
@@ -20003,6 +20045,16 @@ class SearchBarEmbed extends TsEmbed {
20003
20045
  queryParams[Param.UseLastSelectedDataSource] = false;
20004
20046
  }
20005
20047
  queryParams[Param.searchEmbed] = true;
20048
+ return queryParams;
20049
+ }
20050
+ /**
20051
+ * Construct the URL of the embedded ThoughtSpot search to be
20052
+ * loaded in the iframe
20053
+ * @param dataSources A list of data source GUIDs
20054
+ */
20055
+ getIFrameSrc() {
20056
+ const queryParams = this.getEmbedParamsObject();
20057
+ const path = 'search-bar-embed';
20006
20058
  let query = '';
20007
20059
  const queryParamsString = getQueryParamString(queryParams, true);
20008
20060
  if (queryParamsString) {
@@ -20425,13 +20477,17 @@ class ConversationMessage extends TsEmbed {
20425
20477
  super(container, viewConfig);
20426
20478
  this.viewConfig = viewConfig;
20427
20479
  }
20428
- getIframeSrc() {
20480
+ getEmbedParamsObject() {
20429
20481
  var _a;
20430
- const { sessionId, genNo, acSessionId, acGenNo, convId, messageId, } = this.viewConfig;
20431
- const path = 'conv-assist-answer';
20432
20482
  const queryParams = this.getBaseQueryParams();
20433
20483
  queryParams[Param.HideActions] = [...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : [])];
20434
20484
  queryParams[Param.isSpotterAgentEmbed] = true;
20485
+ return queryParams;
20486
+ }
20487
+ getIframeSrc() {
20488
+ const { sessionId, genNo, acSessionId, acGenNo, convId, messageId, } = this.viewConfig;
20489
+ const path = 'conv-assist-answer';
20490
+ const queryParams = this.getEmbedParamsObject();
20435
20491
  let query = '';
20436
20492
  const queryParamsString = getQueryParamString(queryParams, true);
20437
20493
  if (queryParamsString) {
@@ -20592,9 +20648,8 @@ class SpotterEmbed extends TsEmbed {
20592
20648
  super(container, viewConfig);
20593
20649
  this.viewConfig = viewConfig;
20594
20650
  }
20595
- getIframeSrc() {
20651
+ getEmbedParamsObject() {
20596
20652
  const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, } = this.viewConfig;
20597
- const path = 'insights/conv-assist';
20598
20653
  if (!worksheetId) {
20599
20654
  this.handleError(ERROR_MESSAGE.SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND);
20600
20655
  }
@@ -20615,6 +20670,12 @@ class SpotterEmbed extends TsEmbed {
20615
20670
  if (!isUndefined_1(hideSampleQuestions)) {
20616
20671
  queryParams[Param.HideSampleQuestions] = !!hideSampleQuestions;
20617
20672
  }
20673
+ return queryParams;
20674
+ }
20675
+ getIframeSrc() {
20676
+ const { worksheetId, searchOptions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, } = this.viewConfig;
20677
+ const path = 'insights/conv-assist';
20678
+ const queryParams = this.getEmbedParamsObject();
20618
20679
  let query = '';
20619
20680
  const queryParamsString = getQueryParamString(queryParams, true);
20620
20681
  if (queryParamsString) {
@@ -20686,12 +20747,7 @@ class SageEmbed extends V1Embed {
20686
20747
  viewConfig.embedComponentType = 'SageEmbed';
20687
20748
  super(domSelector, viewConfig);
20688
20749
  }
20689
- /**
20690
- * Constructs a map of parameters to be passed on to the
20691
- * embedded Eureka or Sage search page.
20692
- * @returns {string} query string
20693
- */
20694
- getEmbedParams() {
20750
+ getEmbedParamsObject() {
20695
20751
  const { disableWorksheetChange, hideWorksheetSelector, showObjectSuggestions, dataPanelV2, hideSampleQuestions, isProductTour, hideSageAnswerHeader, hideAutocompleteSuggestions, } = this.viewConfig;
20696
20752
  const params = this.getBaseQueryParams();
20697
20753
  params[Param.DataPanelV2Enabled] = !!dataPanelV2;
@@ -20706,6 +20762,15 @@ class SageEmbed extends V1Embed {
20706
20762
  params[Param.HideSampleQuestions] = !!hideSampleQuestions;
20707
20763
  params[Param.IsProductTour] = !!isProductTour;
20708
20764
  params[Param.HideSageAnswerHeader] = !!hideSageAnswerHeader;
20765
+ return params;
20766
+ }
20767
+ /**
20768
+ * Constructs a map of parameters to be passed on to the
20769
+ * embedded Eureka or Sage search page.
20770
+ * @returns {string} query string
20771
+ */
20772
+ getEmbedParams() {
20773
+ const params = this.getEmbedParamsObject();
20709
20774
  return getQueryParamString(params, true);
20710
20775
  }
20711
20776
  /**