@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
package/dist/tsembed.js CHANGED
@@ -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 (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
@@ -2770,21 +2770,42 @@
2770
2770
  */
2771
2771
  HostEvent["Share"] = "share";
2772
2772
  /**
2773
- * Trigger the **Save** action on a Liveboard or Answer.
2773
+ * Trigger the **Save** action on a Liveboard, Answer, or Spotter.
2774
2774
  * Saves the changes.
2775
- * @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
2775
+ *
2776
+ * @param - `vizId` refers to the Spotter Visualization Id used in Spotter embed.
2777
+ * It is required and can be retrieved from the data embed event.
2778
+ *
2776
2779
  * @example
2777
2780
  * ```js
2781
+ * // Save changes in a Liveboard
2778
2782
  * liveboardEmbed.trigger(HostEvent.Save)
2779
2783
  * ```
2784
+ *
2780
2785
  * ```js
2786
+ * // Save the current Answer in Search embed
2781
2787
  * searchEmbed.trigger(HostEvent.Save)
2782
2788
  * ```
2789
+ *
2783
2790
  * ```js
2791
+ * // Save an Answer in Spotter (requires vizId)
2784
2792
  * spotterEmbed.trigger(HostEvent.Save, {
2785
- * vizId:"730496d6-6903-4601-937e-2c691821af3c"
2793
+ * vizId: "730496d6-6903-4601-937e-2c691821af3c"
2786
2794
  * })
2787
2795
  * ```
2796
+ *
2797
+ * ```js
2798
+ * // How to get the vizId in Spotter?
2799
+ *
2800
+ * // You can use the Data event dispatched on each answer creation to get the vizId.
2801
+ * let latestSpotterVizId = '';
2802
+ * spotterEmbed.on(EmbedEvent.Data, (payload) => {
2803
+ * latestSpotterVizId = payload.data.id;
2804
+ * });
2805
+ *
2806
+ * spotterEmbed.trigger(HostEvent.Save, { vizId: latestSpotterVizId });
2807
+ * ```
2808
+ *
2788
2809
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
2789
2810
  */
2790
2811
  HostEvent["Save"] = "save";
@@ -3268,6 +3289,16 @@
3268
3289
  * @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
3269
3290
  */
3270
3291
  HostEvent["AskSpotter"] = "AskSpotter";
3292
+ /**
3293
+ * @hidden
3294
+ * Triggers the update of the embed params.
3295
+ *
3296
+ * @example
3297
+ * ```js
3298
+ * liveboardEmbed.trigger(HostEvent.UpdateEmbedParams, viewConfig);
3299
+ * ```
3300
+ */
3301
+ HostEvent["UpdateEmbedParams"] = "updateEmbedParams";
3271
3302
  })(exports.HostEvent || (exports.HostEvent = {}));
3272
3303
  /**
3273
3304
  * The different visual modes that the data sources panel within
@@ -17455,7 +17486,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
17455
17486
  return e;
17456
17487
  }
17457
17488
 
17458
- 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$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 | 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$1,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};
17489
+ 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$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 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$1,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};
17459
17490
 
17460
17491
  /**
17461
17492
  * Reloads the ThoughtSpot iframe.
@@ -17766,10 +17797,10 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
17766
17797
  };
17767
17798
  this.showPreRenderByDefault = false;
17768
17799
  /**
17769
- * @hidden
17770
- * Internal state to track if the embed container is loaded.
17771
- * This is used to trigger events after the embed container is loaded.
17772
- */
17800
+ * @hidden
17801
+ * Internal state to track if the embed container is loaded.
17802
+ * This is used to trigger events after the embed container is loaded.
17803
+ */
17773
17804
  this.isEmbedContainerLoaded = false;
17774
17805
  /**
17775
17806
  * @hidden
@@ -17828,10 +17859,10 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
17828
17859
  uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_EMBED_CREATE, {
17829
17860
  ...viewConfig,
17830
17861
  });
17862
+ const embedConfig = getEmbedConfig();
17863
+ this.embedConfig = embedConfig;
17831
17864
  this.hostEventClient = new HostEventClient(this.iFrame);
17832
17865
  this.isReadyForRenderPromise = getInitPromise().then(async () => {
17833
- const embedConfig = getEmbedConfig();
17834
- this.embedConfig = embedConfig;
17835
17866
  if (!embedConfig.authTriggerContainer && !embedConfig.useEventForSAMLPopup) {
17836
17867
  this.embedConfig.authTriggerContainer = domSelector;
17837
17868
  }
@@ -18027,6 +18058,11 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
18027
18058
  .join('/');
18028
18059
  return `${basePath}#`;
18029
18060
  }
18061
+ getUpdateEmbedParamsObject() {
18062
+ let queryParams = this.getEmbedParamsObject();
18063
+ queryParams = { ...this.viewConfig, ...queryParams };
18064
+ return queryParams;
18065
+ }
18030
18066
  /**
18031
18067
  * Common query params set for all the embed modes.
18032
18068
  * @param queryParams
@@ -18176,9 +18212,13 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
18176
18212
  return path;
18177
18213
  }
18178
18214
  getEmbedParams() {
18179
- const queryParams = this.getBaseQueryParams();
18215
+ const queryParams = this.getEmbedParamsObject();
18180
18216
  return getQueryParamString(queryParams);
18181
18217
  }
18218
+ getEmbedParamsObject() {
18219
+ const params = this.getBaseQueryParams();
18220
+ return params;
18221
+ }
18182
18222
  getRootIframeSrc() {
18183
18223
  const query = this.getEmbedParams();
18184
18224
  return this.getEmbedBasePath(query);
@@ -18743,7 +18783,12 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
18743
18783
  return this.preRender(true);
18744
18784
  }
18745
18785
  this.validatePreRenderViewConfig(this.viewConfig);
18786
+ logger$3.debug('triggering UpdateEmbedParams', this.viewConfig);
18787
+ this.executeAfterEmbedContainerLoaded(() => {
18788
+ this.trigger(exports.HostEvent.UpdateEmbedParams, this.getUpdateEmbedParamsObject());
18789
+ });
18746
18790
  }
18791
+ this.beforePrerenderVisible();
18747
18792
  if (this.el) {
18748
18793
  this.syncPreRenderStyle();
18749
18794
  if (!this.viewConfig.doNotTrackPreRenderSize) {
@@ -18760,7 +18805,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
18760
18805
  this.resizeObserver.observe(this.el);
18761
18806
  }
18762
18807
  }
18763
- this.beforePrerenderVisible();
18764
18808
  removeStyleProperties(this.preRenderWrapper, ['z-index', 'opacity', 'pointer-events']);
18765
18809
  this.subscribeToEvents();
18766
18810
  // Setup fullscreen change handler for prerendered components
@@ -19541,6 +19585,11 @@ query GetEurekaVizSnapshots(
19541
19585
  * embedded Liveboard or visualization.
19542
19586
  */
19543
19587
  getEmbedParams() {
19588
+ const params = this.getEmbedParamsObject();
19589
+ const queryParams = getQueryParamString(params, true);
19590
+ return queryParams;
19591
+ }
19592
+ getEmbedParamsObject() {
19544
19593
  let params = {};
19545
19594
  params = this.getBaseQueryParams(params);
19546
19595
  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;
@@ -19617,8 +19666,8 @@ query GetEurekaVizSnapshots(
19617
19666
  params[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
19618
19667
  params[Param.CoverAndFilterOptionInPDF] = coverAndFilterOptionInPDF;
19619
19668
  params[Param.LiveboardXLSXCSVDownload] = !!liveboardXLSXCSVDownload;
19620
- const queryParams = getQueryParamString(params, true);
19621
- return queryParams;
19669
+ getQueryParamString(params, true);
19670
+ return params;
19622
19671
  }
19623
19672
  getIframeSuffixSrc(liveboardId, vizId, activeTabId) {
19624
19673
  let suffix = `/embed/viz/${liveboardId}`;
@@ -19860,11 +19909,9 @@ query GetEurekaVizSnapshots(
19860
19909
  const defaultAppInitData = await super.getAppInitData();
19861
19910
  return { ...defaultAppInitData, ...this.getSearchInitData() };
19862
19911
  }
19863
- getEmbedParams() {
19912
+ getEmbedParamsObject() {
19864
19913
  var _a;
19865
- const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, hideSearchBar, dataPanelV2 = true, useLastSelectedSources = false, runtimeParameters, collapseSearchBarInitially = false, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false,
19866
- /* eslint-disable-next-line max-len */
19867
- dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, focusSearchBarOnRender = true, excludeRuntimeParametersfromURL, excludeSearchTokenStringFromURL, collapseSearchBar = true, } = this.viewConfig;
19914
+ 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;
19868
19915
  const queryParams = this.getBaseQueryParams();
19869
19916
  queryParams[Param.HideActions] = [
19870
19917
  ...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : []),
@@ -19897,7 +19944,6 @@ query GetEurekaVizSnapshots(
19897
19944
  queryParams[Param.HideSearchBar] = true;
19898
19945
  }
19899
19946
  if (isOnBeforeGetVizDataInterceptEnabled) {
19900
- /* eslint-disable-next-line max-len */
19901
19947
  queryParams[Param.IsOnBeforeGetVizDataInterceptEnabled] = isOnBeforeGetVizDataInterceptEnabled;
19902
19948
  }
19903
19949
  if (!focusSearchBarOnRender) {
@@ -19910,20 +19956,22 @@ query GetEurekaVizSnapshots(
19910
19956
  queryParams[Param.UseLastSelectedDataSource] = false;
19911
19957
  }
19912
19958
  queryParams[Param.searchEmbed] = true;
19913
- /* eslint-disable-next-line max-len */
19914
19959
  queryParams[Param.CollapseSearchBarInitially] = collapseSearchBarInitially || collapseSearchBar;
19915
19960
  queryParams[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
19916
19961
  if (dataPanelCustomGroupsAccordionInitialState
19917
19962
  === DataPanelCustomColumnGroupsAccordionState.COLLAPSE_ALL
19918
19963
  || dataPanelCustomGroupsAccordionInitialState
19919
19964
  === DataPanelCustomColumnGroupsAccordionState.EXPAND_FIRST) {
19920
- /* eslint-disable-next-line max-len */
19921
19965
  queryParams[Param.DataPanelCustomGroupsAccordionInitialState] = dataPanelCustomGroupsAccordionInitialState;
19922
19966
  }
19923
19967
  else {
19924
- /* eslint-disable-next-line max-len */
19925
19968
  queryParams[Param.DataPanelCustomGroupsAccordionInitialState] = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL;
19926
19969
  }
19970
+ return queryParams;
19971
+ }
19972
+ getEmbedParams() {
19973
+ const { runtimeParameters, runtimeFilters, excludeRuntimeParametersfromURL, excludeRuntimeFiltersfromURL, } = this.viewConfig;
19974
+ const queryParams = this.getEmbedParamsObject();
19927
19975
  let query = '';
19928
19976
  const queryParamsString = getQueryParamString(queryParams, true);
19929
19977
  if (queryParamsString) {
@@ -19979,15 +20027,9 @@ query GetEurekaVizSnapshots(
19979
20027
  this.embedComponentType = 'SearchBarEmbed';
19980
20028
  this.viewConfig = viewConfig;
19981
20029
  }
19982
- /**
19983
- * Construct the URL of the embedded ThoughtSpot search to be
19984
- * loaded in the iframe
19985
- * @param dataSources A list of data source GUIDs
19986
- */
19987
- getIFrameSrc() {
20030
+ getEmbedParamsObject() {
19988
20031
  var _a;
19989
20032
  const { searchOptions, dataSource, dataSources, useLastSelectedSources = false, excludeSearchTokenStringFromURL, } = this.viewConfig;
19990
- const path = 'search-bar-embed';
19991
20033
  const queryParams = this.getBaseQueryParams();
19992
20034
  queryParams[Param.HideActions] = [...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : [])];
19993
20035
  if (dataSources && dataSources.length) {
@@ -20009,6 +20051,16 @@ query GetEurekaVizSnapshots(
20009
20051
  queryParams[Param.UseLastSelectedDataSource] = false;
20010
20052
  }
20011
20053
  queryParams[Param.searchEmbed] = true;
20054
+ return queryParams;
20055
+ }
20056
+ /**
20057
+ * Construct the URL of the embedded ThoughtSpot search to be
20058
+ * loaded in the iframe
20059
+ * @param dataSources A list of data source GUIDs
20060
+ */
20061
+ getIFrameSrc() {
20062
+ const queryParams = this.getEmbedParamsObject();
20063
+ const path = 'search-bar-embed';
20012
20064
  let query = '';
20013
20065
  const queryParamsString = getQueryParamString(queryParams, true);
20014
20066
  if (queryParamsString) {
@@ -20431,13 +20483,17 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
20431
20483
  super(container, viewConfig);
20432
20484
  this.viewConfig = viewConfig;
20433
20485
  }
20434
- getIframeSrc() {
20486
+ getEmbedParamsObject() {
20435
20487
  var _a;
20436
- const { sessionId, genNo, acSessionId, acGenNo, convId, messageId, } = this.viewConfig;
20437
- const path = 'conv-assist-answer';
20438
20488
  const queryParams = this.getBaseQueryParams();
20439
20489
  queryParams[Param.HideActions] = [...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : [])];
20440
20490
  queryParams[Param.isSpotterAgentEmbed] = true;
20491
+ return queryParams;
20492
+ }
20493
+ getIframeSrc() {
20494
+ const { sessionId, genNo, acSessionId, acGenNo, convId, messageId, } = this.viewConfig;
20495
+ const path = 'conv-assist-answer';
20496
+ const queryParams = this.getEmbedParamsObject();
20441
20497
  let query = '';
20442
20498
  const queryParamsString = getQueryParamString(queryParams, true);
20443
20499
  if (queryParamsString) {
@@ -20598,9 +20654,8 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
20598
20654
  super(container, viewConfig);
20599
20655
  this.viewConfig = viewConfig;
20600
20656
  }
20601
- getIframeSrc() {
20657
+ getEmbedParamsObject() {
20602
20658
  const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, } = this.viewConfig;
20603
- const path = 'insights/conv-assist';
20604
20659
  if (!worksheetId) {
20605
20660
  this.handleError(ERROR_MESSAGE.SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND);
20606
20661
  }
@@ -20621,6 +20676,12 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
20621
20676
  if (!isUndefined_1(hideSampleQuestions)) {
20622
20677
  queryParams[Param.HideSampleQuestions] = !!hideSampleQuestions;
20623
20678
  }
20679
+ return queryParams;
20680
+ }
20681
+ getIframeSrc() {
20682
+ const { worksheetId, searchOptions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, } = this.viewConfig;
20683
+ const path = 'insights/conv-assist';
20684
+ const queryParams = this.getEmbedParamsObject();
20624
20685
  let query = '';
20625
20686
  const queryParamsString = getQueryParamString(queryParams, true);
20626
20687
  if (queryParamsString) {
@@ -20692,12 +20753,7 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
20692
20753
  viewConfig.embedComponentType = 'SageEmbed';
20693
20754
  super(domSelector, viewConfig);
20694
20755
  }
20695
- /**
20696
- * Constructs a map of parameters to be passed on to the
20697
- * embedded Eureka or Sage search page.
20698
- * @returns {string} query string
20699
- */
20700
- getEmbedParams() {
20756
+ getEmbedParamsObject() {
20701
20757
  const { disableWorksheetChange, hideWorksheetSelector, showObjectSuggestions, dataPanelV2, hideSampleQuestions, isProductTour, hideSageAnswerHeader, hideAutocompleteSuggestions, } = this.viewConfig;
20702
20758
  const params = this.getBaseQueryParams();
20703
20759
  params[Param.DataPanelV2Enabled] = !!dataPanelV2;
@@ -20712,6 +20768,15 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
20712
20768
  params[Param.HideSampleQuestions] = !!hideSampleQuestions;
20713
20769
  params[Param.IsProductTour] = !!isProductTour;
20714
20770
  params[Param.HideSageAnswerHeader] = !!hideSageAnswerHeader;
20771
+ return params;
20772
+ }
20773
+ /**
20774
+ * Constructs a map of parameters to be passed on to the
20775
+ * embedded Eureka or Sage search page.
20776
+ * @returns {string} query string
20777
+ */
20778
+ getEmbedParams() {
20779
+ const params = this.getEmbedParamsObject();
20715
20780
  return getQueryParamString(params, true);
20716
20781
  }
20717
20782
  /**