@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 (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) :
@@ -2484,21 +2484,42 @@
2484
2484
  */
2485
2485
  HostEvent["Share"] = "share";
2486
2486
  /**
2487
- * Trigger the **Save** action on a Liveboard or Answer.
2487
+ * Trigger the **Save** action on a Liveboard, Answer, or Spotter.
2488
2488
  * Saves the changes.
2489
- * @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
2489
+ *
2490
+ * @param - `vizId` refers to the Spotter Visualization Id used in Spotter embed.
2491
+ * It is required and can be retrieved from the data embed event.
2492
+ *
2490
2493
  * @example
2491
2494
  * ```js
2495
+ * // Save changes in a Liveboard
2492
2496
  * liveboardEmbed.trigger(HostEvent.Save)
2493
2497
  * ```
2498
+ *
2494
2499
  * ```js
2500
+ * // Save the current Answer in Search embed
2495
2501
  * searchEmbed.trigger(HostEvent.Save)
2496
2502
  * ```
2503
+ *
2497
2504
  * ```js
2505
+ * // Save an Answer in Spotter (requires vizId)
2498
2506
  * spotterEmbed.trigger(HostEvent.Save, {
2499
- * vizId:"730496d6-6903-4601-937e-2c691821af3c"
2507
+ * vizId: "730496d6-6903-4601-937e-2c691821af3c"
2500
2508
  * })
2501
2509
  * ```
2510
+ *
2511
+ * ```js
2512
+ * // How to get the vizId in Spotter?
2513
+ *
2514
+ * // You can use the Data event dispatched on each answer creation to get the vizId.
2515
+ * let latestSpotterVizId = '';
2516
+ * spotterEmbed.on(EmbedEvent.Data, (payload) => {
2517
+ * latestSpotterVizId = payload.data.id;
2518
+ * });
2519
+ *
2520
+ * spotterEmbed.trigger(HostEvent.Save, { vizId: latestSpotterVizId });
2521
+ * ```
2522
+ *
2502
2523
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
2503
2524
  */
2504
2525
  HostEvent["Save"] = "save";
@@ -2982,6 +3003,16 @@
2982
3003
  * @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
2983
3004
  */
2984
3005
  HostEvent["AskSpotter"] = "AskSpotter";
3006
+ /**
3007
+ * @hidden
3008
+ * Triggers the update of the embed params.
3009
+ *
3010
+ * @example
3011
+ * ```js
3012
+ * liveboardEmbed.trigger(HostEvent.UpdateEmbedParams, viewConfig);
3013
+ * ```
3014
+ */
3015
+ HostEvent["UpdateEmbedParams"] = "updateEmbedParams";
2985
3016
  })(exports.HostEvent || (exports.HostEvent = {}));
2986
3017
  /**
2987
3018
  * The different visual modes that the data sources panel within
@@ -17420,7 +17451,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
17420
17451
  return e;
17421
17452
  }
17422
17453
 
17423
- 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};
17454
+ 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};
17424
17455
 
17425
17456
  /**
17426
17457
  * Reloads the ThoughtSpot iframe.
@@ -17731,10 +17762,10 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
17731
17762
  };
17732
17763
  this.showPreRenderByDefault = false;
17733
17764
  /**
17734
- * @hidden
17735
- * Internal state to track if the embed container is loaded.
17736
- * This is used to trigger events after the embed container is loaded.
17737
- */
17765
+ * @hidden
17766
+ * Internal state to track if the embed container is loaded.
17767
+ * This is used to trigger events after the embed container is loaded.
17768
+ */
17738
17769
  this.isEmbedContainerLoaded = false;
17739
17770
  /**
17740
17771
  * @hidden
@@ -17793,10 +17824,10 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
17793
17824
  uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_EMBED_CREATE, {
17794
17825
  ...viewConfig,
17795
17826
  });
17827
+ const embedConfig = getEmbedConfig();
17828
+ this.embedConfig = embedConfig;
17796
17829
  this.hostEventClient = new HostEventClient(this.iFrame);
17797
17830
  this.isReadyForRenderPromise = getInitPromise().then(async () => {
17798
- const embedConfig = getEmbedConfig();
17799
- this.embedConfig = embedConfig;
17800
17831
  if (!embedConfig.authTriggerContainer && !embedConfig.useEventForSAMLPopup) {
17801
17832
  this.embedConfig.authTriggerContainer = domSelector;
17802
17833
  }
@@ -17992,6 +18023,11 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
17992
18023
  .join('/');
17993
18024
  return `${basePath}#`;
17994
18025
  }
18026
+ getUpdateEmbedParamsObject() {
18027
+ let queryParams = this.getEmbedParamsObject();
18028
+ queryParams = { ...this.viewConfig, ...queryParams };
18029
+ return queryParams;
18030
+ }
17995
18031
  /**
17996
18032
  * Common query params set for all the embed modes.
17997
18033
  * @param queryParams
@@ -18141,9 +18177,13 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
18141
18177
  return path;
18142
18178
  }
18143
18179
  getEmbedParams() {
18144
- const queryParams = this.getBaseQueryParams();
18180
+ const queryParams = this.getEmbedParamsObject();
18145
18181
  return getQueryParamString(queryParams);
18146
18182
  }
18183
+ getEmbedParamsObject() {
18184
+ const params = this.getBaseQueryParams();
18185
+ return params;
18186
+ }
18147
18187
  getRootIframeSrc() {
18148
18188
  const query = this.getEmbedParams();
18149
18189
  return this.getEmbedBasePath(query);
@@ -18708,7 +18748,12 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
18708
18748
  return this.preRender(true);
18709
18749
  }
18710
18750
  this.validatePreRenderViewConfig(this.viewConfig);
18751
+ logger$3.debug('triggering UpdateEmbedParams', this.viewConfig);
18752
+ this.executeAfterEmbedContainerLoaded(() => {
18753
+ this.trigger(exports.HostEvent.UpdateEmbedParams, this.getUpdateEmbedParamsObject());
18754
+ });
18711
18755
  }
18756
+ this.beforePrerenderVisible();
18712
18757
  if (this.el) {
18713
18758
  this.syncPreRenderStyle();
18714
18759
  if (!this.viewConfig.doNotTrackPreRenderSize) {
@@ -18725,7 +18770,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
18725
18770
  this.resizeObserver.observe(this.el);
18726
18771
  }
18727
18772
  }
18728
- this.beforePrerenderVisible();
18729
18773
  removeStyleProperties(this.preRenderWrapper, ['z-index', 'opacity', 'pointer-events']);
18730
18774
  this.subscribeToEvents();
18731
18775
  // Setup fullscreen change handler for prerendered components
@@ -18914,15 +18958,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
18914
18958
  this.embedComponentType = 'SearchBarEmbed';
18915
18959
  this.viewConfig = viewConfig;
18916
18960
  }
18917
- /**
18918
- * Construct the URL of the embedded ThoughtSpot search to be
18919
- * loaded in the iframe
18920
- * @param dataSources A list of data source GUIDs
18921
- */
18922
- getIFrameSrc() {
18961
+ getEmbedParamsObject() {
18923
18962
  var _a;
18924
18963
  const { searchOptions, dataSource, dataSources, useLastSelectedSources = false, excludeSearchTokenStringFromURL, } = this.viewConfig;
18925
- const path = 'search-bar-embed';
18926
18964
  const queryParams = this.getBaseQueryParams();
18927
18965
  queryParams[Param.HideActions] = [...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : [])];
18928
18966
  if (dataSources && dataSources.length) {
@@ -18944,6 +18982,16 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
18944
18982
  queryParams[Param.UseLastSelectedDataSource] = false;
18945
18983
  }
18946
18984
  queryParams[Param.searchEmbed] = true;
18985
+ return queryParams;
18986
+ }
18987
+ /**
18988
+ * Construct the URL of the embedded ThoughtSpot search to be
18989
+ * loaded in the iframe
18990
+ * @param dataSources A list of data source GUIDs
18991
+ */
18992
+ getIFrameSrc() {
18993
+ const queryParams = this.getEmbedParamsObject();
18994
+ const path = 'search-bar-embed';
18947
18995
  let query = '';
18948
18996
  const queryParamsString = getQueryParamString(queryParams, true);
18949
18997
  if (queryParamsString) {
@@ -18994,12 +19042,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
18994
19042
  viewConfig.embedComponentType = 'SageEmbed';
18995
19043
  super(domSelector, viewConfig);
18996
19044
  }
18997
- /**
18998
- * Constructs a map of parameters to be passed on to the
18999
- * embedded Eureka or Sage search page.
19000
- * @returns {string} query string
19001
- */
19002
- getEmbedParams() {
19045
+ getEmbedParamsObject() {
19003
19046
  const { disableWorksheetChange, hideWorksheetSelector, showObjectSuggestions, dataPanelV2, hideSampleQuestions, isProductTour, hideSageAnswerHeader, hideAutocompleteSuggestions, } = this.viewConfig;
19004
19047
  const params = this.getBaseQueryParams();
19005
19048
  params[Param.DataPanelV2Enabled] = !!dataPanelV2;
@@ -19014,6 +19057,15 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
19014
19057
  params[Param.HideSampleQuestions] = !!hideSampleQuestions;
19015
19058
  params[Param.IsProductTour] = !!isProductTour;
19016
19059
  params[Param.HideSageAnswerHeader] = !!hideSageAnswerHeader;
19060
+ return params;
19061
+ }
19062
+ /**
19063
+ * Constructs a map of parameters to be passed on to the
19064
+ * embedded Eureka or Sage search page.
19065
+ * @returns {string} query string
19066
+ */
19067
+ getEmbedParams() {
19068
+ const params = this.getEmbedParamsObject();
19017
19069
  return getQueryParamString(params, true);
19018
19070
  }
19019
19071
  /**
@@ -19123,11 +19175,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
19123
19175
  const defaultAppInitData = await super.getAppInitData();
19124
19176
  return { ...defaultAppInitData, ...this.getSearchInitData() };
19125
19177
  }
19126
- getEmbedParams() {
19178
+ getEmbedParamsObject() {
19127
19179
  var _a;
19128
- const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, hideSearchBar, dataPanelV2 = true, useLastSelectedSources = false, runtimeParameters, collapseSearchBarInitially = false, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false,
19129
- /* eslint-disable-next-line max-len */
19130
- dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL, focusSearchBarOnRender = true, excludeRuntimeParametersfromURL, excludeSearchTokenStringFromURL, collapseSearchBar = true, } = this.viewConfig;
19180
+ const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, hideSearchBar, dataPanelV2 = true, useLastSelectedSources = false, runtimeParameters, collapseSearchBarInitially = false, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false, dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL, focusSearchBarOnRender = true, excludeRuntimeParametersfromURL, excludeSearchTokenStringFromURL, collapseSearchBar = true, } = this.viewConfig;
19131
19181
  const queryParams = this.getBaseQueryParams();
19132
19182
  queryParams[Param.HideActions] = [
19133
19183
  ...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : []),
@@ -19160,7 +19210,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
19160
19210
  queryParams[Param.HideSearchBar] = true;
19161
19211
  }
19162
19212
  if (isOnBeforeGetVizDataInterceptEnabled) {
19163
- /* eslint-disable-next-line max-len */
19164
19213
  queryParams[Param.IsOnBeforeGetVizDataInterceptEnabled] = isOnBeforeGetVizDataInterceptEnabled;
19165
19214
  }
19166
19215
  if (!focusSearchBarOnRender) {
@@ -19173,20 +19222,22 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
19173
19222
  queryParams[Param.UseLastSelectedDataSource] = false;
19174
19223
  }
19175
19224
  queryParams[Param.searchEmbed] = true;
19176
- /* eslint-disable-next-line max-len */
19177
19225
  queryParams[Param.CollapseSearchBarInitially] = collapseSearchBarInitially || collapseSearchBar;
19178
19226
  queryParams[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
19179
19227
  if (dataPanelCustomGroupsAccordionInitialState
19180
19228
  === DataPanelCustomColumnGroupsAccordionState$1.COLLAPSE_ALL
19181
19229
  || dataPanelCustomGroupsAccordionInitialState
19182
19230
  === DataPanelCustomColumnGroupsAccordionState$1.EXPAND_FIRST) {
19183
- /* eslint-disable-next-line max-len */
19184
19231
  queryParams[Param.DataPanelCustomGroupsAccordionInitialState] = dataPanelCustomGroupsAccordionInitialState;
19185
19232
  }
19186
19233
  else {
19187
- /* eslint-disable-next-line max-len */
19188
19234
  queryParams[Param.DataPanelCustomGroupsAccordionInitialState] = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL;
19189
19235
  }
19236
+ return queryParams;
19237
+ }
19238
+ getEmbedParams() {
19239
+ const { runtimeParameters, runtimeFilters, excludeRuntimeParametersfromURL, excludeRuntimeFiltersfromURL, } = this.viewConfig;
19240
+ const queryParams = this.getEmbedParamsObject();
19190
19241
  let query = '';
19191
19242
  const queryParamsString = getQueryParamString(queryParams, true);
19192
19243
  if (queryParamsString) {
@@ -19834,6 +19885,11 @@ query GetEurekaVizSnapshots(
19834
19885
  * embedded Liveboard or visualization.
19835
19886
  */
19836
19887
  getEmbedParams() {
19888
+ const params = this.getEmbedParamsObject();
19889
+ const queryParams = getQueryParamString(params, true);
19890
+ return queryParams;
19891
+ }
19892
+ getEmbedParamsObject() {
19837
19893
  let params = {};
19838
19894
  params = this.getBaseQueryParams(params);
19839
19895
  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;
@@ -19910,8 +19966,8 @@ query GetEurekaVizSnapshots(
19910
19966
  params[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
19911
19967
  params[Param.CoverAndFilterOptionInPDF] = coverAndFilterOptionInPDF;
19912
19968
  params[Param.LiveboardXLSXCSVDownload] = !!liveboardXLSXCSVDownload;
19913
- const queryParams = getQueryParamString(params, true);
19914
- return queryParams;
19969
+ getQueryParamString(params, true);
19970
+ return params;
19915
19971
  }
19916
19972
  getIframeSuffixSrc(liveboardId, vizId, activeTabId) {
19917
19973
  let suffix = `/embed/viz/${liveboardId}`;
@@ -20469,13 +20525,17 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
20469
20525
  super(container, viewConfig);
20470
20526
  this.viewConfig = viewConfig;
20471
20527
  }
20472
- getIframeSrc() {
20528
+ getEmbedParamsObject() {
20473
20529
  var _a;
20474
- const { sessionId, genNo, acSessionId, acGenNo, convId, messageId, } = this.viewConfig;
20475
- const path = 'conv-assist-answer';
20476
20530
  const queryParams = this.getBaseQueryParams();
20477
20531
  queryParams[Param.HideActions] = [...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : [])];
20478
20532
  queryParams[Param.isSpotterAgentEmbed] = true;
20533
+ return queryParams;
20534
+ }
20535
+ getIframeSrc() {
20536
+ const { sessionId, genNo, acSessionId, acGenNo, convId, messageId, } = this.viewConfig;
20537
+ const path = 'conv-assist-answer';
20538
+ const queryParams = this.getEmbedParamsObject();
20479
20539
  let query = '';
20480
20540
  const queryParamsString = getQueryParamString(queryParams, true);
20481
20541
  if (queryParamsString) {
@@ -20631,9 +20691,8 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
20631
20691
  super(container, viewConfig);
20632
20692
  this.viewConfig = viewConfig;
20633
20693
  }
20634
- getIframeSrc() {
20694
+ getEmbedParamsObject() {
20635
20695
  const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, } = this.viewConfig;
20636
- const path = 'insights/conv-assist';
20637
20696
  if (!worksheetId) {
20638
20697
  this.handleError(ERROR_MESSAGE.SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND);
20639
20698
  }
@@ -20654,6 +20713,12 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
20654
20713
  if (!isUndefined_1(hideSampleQuestions)) {
20655
20714
  queryParams[Param.HideSampleQuestions] = !!hideSampleQuestions;
20656
20715
  }
20716
+ return queryParams;
20717
+ }
20718
+ getIframeSrc() {
20719
+ const { worksheetId, searchOptions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, } = this.viewConfig;
20720
+ const path = 'insights/conv-assist';
20721
+ const queryParams = this.getEmbedParamsObject();
20657
20722
  let query = '';
20658
20723
  const queryParamsString = getQueryParamString(queryParams, true);
20659
20724
  if (queryParamsString) {