@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
  import * as React from 'react';
4
4
  import React__default, { useRef, useCallback } from 'react';
@@ -2462,21 +2462,42 @@ var HostEvent;
2462
2462
  */
2463
2463
  HostEvent["Share"] = "share";
2464
2464
  /**
2465
- * Trigger the **Save** action on a Liveboard or Answer.
2465
+ * Trigger the **Save** action on a Liveboard, Answer, or Spotter.
2466
2466
  * Saves the changes.
2467
- * @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
2467
+ *
2468
+ * @param - `vizId` refers to the Spotter Visualization Id used in Spotter embed.
2469
+ * It is required and can be retrieved from the data embed event.
2470
+ *
2468
2471
  * @example
2469
2472
  * ```js
2473
+ * // Save changes in a Liveboard
2470
2474
  * liveboardEmbed.trigger(HostEvent.Save)
2471
2475
  * ```
2476
+ *
2472
2477
  * ```js
2478
+ * // Save the current Answer in Search embed
2473
2479
  * searchEmbed.trigger(HostEvent.Save)
2474
2480
  * ```
2481
+ *
2475
2482
  * ```js
2483
+ * // Save an Answer in Spotter (requires vizId)
2476
2484
  * spotterEmbed.trigger(HostEvent.Save, {
2477
- * vizId:"730496d6-6903-4601-937e-2c691821af3c"
2485
+ * vizId: "730496d6-6903-4601-937e-2c691821af3c"
2478
2486
  * })
2479
2487
  * ```
2488
+ *
2489
+ * ```js
2490
+ * // How to get the vizId in Spotter?
2491
+ *
2492
+ * // You can use the Data event dispatched on each answer creation to get the vizId.
2493
+ * let latestSpotterVizId = '';
2494
+ * spotterEmbed.on(EmbedEvent.Data, (payload) => {
2495
+ * latestSpotterVizId = payload.data.id;
2496
+ * });
2497
+ *
2498
+ * spotterEmbed.trigger(HostEvent.Save, { vizId: latestSpotterVizId });
2499
+ * ```
2500
+ *
2480
2501
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
2481
2502
  */
2482
2503
  HostEvent["Save"] = "save";
@@ -2960,6 +2981,16 @@ var HostEvent;
2960
2981
  * @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
2961
2982
  */
2962
2983
  HostEvent["AskSpotter"] = "AskSpotter";
2984
+ /**
2985
+ * @hidden
2986
+ * Triggers the update of the embed params.
2987
+ *
2988
+ * @example
2989
+ * ```js
2990
+ * liveboardEmbed.trigger(HostEvent.UpdateEmbedParams, viewConfig);
2991
+ * ```
2992
+ */
2993
+ HostEvent["UpdateEmbedParams"] = "updateEmbedParams";
2963
2994
  })(HostEvent || (HostEvent = {}));
2964
2995
  /**
2965
2996
  * The different visual modes that the data sources panel within
@@ -8225,7 +8256,7 @@ class AnswerService {
8225
8256
  async getTML() {
8226
8257
  const { object } = await this.executeQuery(getAnswerTML, {});
8227
8258
  const edoc = object[0].edoc;
8228
- const YAML = await import('./index-DQueHwfQ.js');
8259
+ const YAML = await import('./index-BpSohedu.js');
8229
8260
  const parsedDoc = YAML.parse(edoc);
8230
8261
  return {
8231
8262
  answer: {
@@ -17398,7 +17429,7 @@ function processEventData(type, e, thoughtSpotHost, containerEl) {
17398
17429
  return e;
17399
17430
  }
17400
17431
 
17401
- 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};
17432
+ 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};
17402
17433
 
17403
17434
  /**
17404
17435
  * Reloads the ThoughtSpot iframe.
@@ -17709,10 +17740,10 @@ class TsEmbed {
17709
17740
  };
17710
17741
  this.showPreRenderByDefault = false;
17711
17742
  /**
17712
- * @hidden
17713
- * Internal state to track if the embed container is loaded.
17714
- * This is used to trigger events after the embed container is loaded.
17715
- */
17743
+ * @hidden
17744
+ * Internal state to track if the embed container is loaded.
17745
+ * This is used to trigger events after the embed container is loaded.
17746
+ */
17716
17747
  this.isEmbedContainerLoaded = false;
17717
17748
  /**
17718
17749
  * @hidden
@@ -17771,10 +17802,10 @@ class TsEmbed {
17771
17802
  uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_EMBED_CREATE, {
17772
17803
  ...viewConfig,
17773
17804
  });
17805
+ const embedConfig = getEmbedConfig();
17806
+ this.embedConfig = embedConfig;
17774
17807
  this.hostEventClient = new HostEventClient(this.iFrame);
17775
17808
  this.isReadyForRenderPromise = getInitPromise().then(async () => {
17776
- const embedConfig = getEmbedConfig();
17777
- this.embedConfig = embedConfig;
17778
17809
  if (!embedConfig.authTriggerContainer && !embedConfig.useEventForSAMLPopup) {
17779
17810
  this.embedConfig.authTriggerContainer = domSelector;
17780
17811
  }
@@ -17970,6 +18001,11 @@ class TsEmbed {
17970
18001
  .join('/');
17971
18002
  return `${basePath}#`;
17972
18003
  }
18004
+ getUpdateEmbedParamsObject() {
18005
+ let queryParams = this.getEmbedParamsObject();
18006
+ queryParams = { ...this.viewConfig, ...queryParams };
18007
+ return queryParams;
18008
+ }
17973
18009
  /**
17974
18010
  * Common query params set for all the embed modes.
17975
18011
  * @param queryParams
@@ -18119,9 +18155,13 @@ class TsEmbed {
18119
18155
  return path;
18120
18156
  }
18121
18157
  getEmbedParams() {
18122
- const queryParams = this.getBaseQueryParams();
18158
+ const queryParams = this.getEmbedParamsObject();
18123
18159
  return getQueryParamString(queryParams);
18124
18160
  }
18161
+ getEmbedParamsObject() {
18162
+ const params = this.getBaseQueryParams();
18163
+ return params;
18164
+ }
18125
18165
  getRootIframeSrc() {
18126
18166
  const query = this.getEmbedParams();
18127
18167
  return this.getEmbedBasePath(query);
@@ -18686,7 +18726,12 @@ class TsEmbed {
18686
18726
  return this.preRender(true);
18687
18727
  }
18688
18728
  this.validatePreRenderViewConfig(this.viewConfig);
18729
+ logger$3.debug('triggering UpdateEmbedParams', this.viewConfig);
18730
+ this.executeAfterEmbedContainerLoaded(() => {
18731
+ this.trigger(HostEvent.UpdateEmbedParams, this.getUpdateEmbedParamsObject());
18732
+ });
18689
18733
  }
18734
+ this.beforePrerenderVisible();
18690
18735
  if (this.el) {
18691
18736
  this.syncPreRenderStyle();
18692
18737
  if (!this.viewConfig.doNotTrackPreRenderSize) {
@@ -18703,7 +18748,6 @@ class TsEmbed {
18703
18748
  this.resizeObserver.observe(this.el);
18704
18749
  }
18705
18750
  }
18706
- this.beforePrerenderVisible();
18707
18751
  removeStyleProperties(this.preRenderWrapper, ['z-index', 'opacity', 'pointer-events']);
18708
18752
  this.subscribeToEvents();
18709
18753
  // Setup fullscreen change handler for prerendered components
@@ -18892,15 +18936,9 @@ let SearchBarEmbed$1 = class SearchBarEmbed extends TsEmbed {
18892
18936
  this.embedComponentType = 'SearchBarEmbed';
18893
18937
  this.viewConfig = viewConfig;
18894
18938
  }
18895
- /**
18896
- * Construct the URL of the embedded ThoughtSpot search to be
18897
- * loaded in the iframe
18898
- * @param dataSources A list of data source GUIDs
18899
- */
18900
- getIFrameSrc() {
18939
+ getEmbedParamsObject() {
18901
18940
  var _a;
18902
18941
  const { searchOptions, dataSource, dataSources, useLastSelectedSources = false, excludeSearchTokenStringFromURL, } = this.viewConfig;
18903
- const path = 'search-bar-embed';
18904
18942
  const queryParams = this.getBaseQueryParams();
18905
18943
  queryParams[Param.HideActions] = [...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : [])];
18906
18944
  if (dataSources && dataSources.length) {
@@ -18922,6 +18960,16 @@ let SearchBarEmbed$1 = class SearchBarEmbed extends TsEmbed {
18922
18960
  queryParams[Param.UseLastSelectedDataSource] = false;
18923
18961
  }
18924
18962
  queryParams[Param.searchEmbed] = true;
18963
+ return queryParams;
18964
+ }
18965
+ /**
18966
+ * Construct the URL of the embedded ThoughtSpot search to be
18967
+ * loaded in the iframe
18968
+ * @param dataSources A list of data source GUIDs
18969
+ */
18970
+ getIFrameSrc() {
18971
+ const queryParams = this.getEmbedParamsObject();
18972
+ const path = 'search-bar-embed';
18925
18973
  let query = '';
18926
18974
  const queryParamsString = getQueryParamString(queryParams, true);
18927
18975
  if (queryParamsString) {
@@ -18972,12 +19020,7 @@ let SageEmbed$1 = class SageEmbed extends V1Embed {
18972
19020
  viewConfig.embedComponentType = 'SageEmbed';
18973
19021
  super(domSelector, viewConfig);
18974
19022
  }
18975
- /**
18976
- * Constructs a map of parameters to be passed on to the
18977
- * embedded Eureka or Sage search page.
18978
- * @returns {string} query string
18979
- */
18980
- getEmbedParams() {
19023
+ getEmbedParamsObject() {
18981
19024
  const { disableWorksheetChange, hideWorksheetSelector, showObjectSuggestions, dataPanelV2, hideSampleQuestions, isProductTour, hideSageAnswerHeader, hideAutocompleteSuggestions, } = this.viewConfig;
18982
19025
  const params = this.getBaseQueryParams();
18983
19026
  params[Param.DataPanelV2Enabled] = !!dataPanelV2;
@@ -18992,6 +19035,15 @@ let SageEmbed$1 = class SageEmbed extends V1Embed {
18992
19035
  params[Param.HideSampleQuestions] = !!hideSampleQuestions;
18993
19036
  params[Param.IsProductTour] = !!isProductTour;
18994
19037
  params[Param.HideSageAnswerHeader] = !!hideSageAnswerHeader;
19038
+ return params;
19039
+ }
19040
+ /**
19041
+ * Constructs a map of parameters to be passed on to the
19042
+ * embedded Eureka or Sage search page.
19043
+ * @returns {string} query string
19044
+ */
19045
+ getEmbedParams() {
19046
+ const params = this.getEmbedParamsObject();
18995
19047
  return getQueryParamString(params, true);
18996
19048
  }
18997
19049
  /**
@@ -19101,11 +19153,9 @@ let SearchEmbed$1 = class SearchEmbed extends TsEmbed {
19101
19153
  const defaultAppInitData = await super.getAppInitData();
19102
19154
  return { ...defaultAppInitData, ...this.getSearchInitData() };
19103
19155
  }
19104
- getEmbedParams() {
19156
+ getEmbedParamsObject() {
19105
19157
  var _a;
19106
- const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, hideSearchBar, dataPanelV2 = true, useLastSelectedSources = false, runtimeParameters, collapseSearchBarInitially = false, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false,
19107
- /* eslint-disable-next-line max-len */
19108
- dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL, focusSearchBarOnRender = true, excludeRuntimeParametersfromURL, excludeSearchTokenStringFromURL, collapseSearchBar = true, } = this.viewConfig;
19158
+ 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;
19109
19159
  const queryParams = this.getBaseQueryParams();
19110
19160
  queryParams[Param.HideActions] = [
19111
19161
  ...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : []),
@@ -19138,7 +19188,6 @@ let SearchEmbed$1 = class SearchEmbed extends TsEmbed {
19138
19188
  queryParams[Param.HideSearchBar] = true;
19139
19189
  }
19140
19190
  if (isOnBeforeGetVizDataInterceptEnabled) {
19141
- /* eslint-disable-next-line max-len */
19142
19191
  queryParams[Param.IsOnBeforeGetVizDataInterceptEnabled] = isOnBeforeGetVizDataInterceptEnabled;
19143
19192
  }
19144
19193
  if (!focusSearchBarOnRender) {
@@ -19151,20 +19200,22 @@ let SearchEmbed$1 = class SearchEmbed extends TsEmbed {
19151
19200
  queryParams[Param.UseLastSelectedDataSource] = false;
19152
19201
  }
19153
19202
  queryParams[Param.searchEmbed] = true;
19154
- /* eslint-disable-next-line max-len */
19155
19203
  queryParams[Param.CollapseSearchBarInitially] = collapseSearchBarInitially || collapseSearchBar;
19156
19204
  queryParams[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
19157
19205
  if (dataPanelCustomGroupsAccordionInitialState
19158
19206
  === DataPanelCustomColumnGroupsAccordionState$1.COLLAPSE_ALL
19159
19207
  || dataPanelCustomGroupsAccordionInitialState
19160
19208
  === DataPanelCustomColumnGroupsAccordionState$1.EXPAND_FIRST) {
19161
- /* eslint-disable-next-line max-len */
19162
19209
  queryParams[Param.DataPanelCustomGroupsAccordionInitialState] = dataPanelCustomGroupsAccordionInitialState;
19163
19210
  }
19164
19211
  else {
19165
- /* eslint-disable-next-line max-len */
19166
19212
  queryParams[Param.DataPanelCustomGroupsAccordionInitialState] = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL;
19167
19213
  }
19214
+ return queryParams;
19215
+ }
19216
+ getEmbedParams() {
19217
+ const { runtimeParameters, runtimeFilters, excludeRuntimeParametersfromURL, excludeRuntimeFiltersfromURL, } = this.viewConfig;
19218
+ const queryParams = this.getEmbedParamsObject();
19168
19219
  let query = '';
19169
19220
  const queryParamsString = getQueryParamString(queryParams, true);
19170
19221
  if (queryParamsString) {
@@ -19812,6 +19863,11 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
19812
19863
  * embedded Liveboard or visualization.
19813
19864
  */
19814
19865
  getEmbedParams() {
19866
+ const params = this.getEmbedParamsObject();
19867
+ const queryParams = getQueryParamString(params, true);
19868
+ return queryParams;
19869
+ }
19870
+ getEmbedParamsObject() {
19815
19871
  let params = {};
19816
19872
  params = this.getBaseQueryParams(params);
19817
19873
  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;
@@ -19888,8 +19944,8 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
19888
19944
  params[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
19889
19945
  params[Param.CoverAndFilterOptionInPDF] = coverAndFilterOptionInPDF;
19890
19946
  params[Param.LiveboardXLSXCSVDownload] = !!liveboardXLSXCSVDownload;
19891
- const queryParams = getQueryParamString(params, true);
19892
- return queryParams;
19947
+ getQueryParamString(params, true);
19948
+ return params;
19893
19949
  }
19894
19950
  getIframeSuffixSrc(liveboardId, vizId, activeTabId) {
19895
19951
  let suffix = `/embed/viz/${liveboardId}`;
@@ -20447,13 +20503,17 @@ let ConversationMessage$1 = class ConversationMessage extends TsEmbed {
20447
20503
  super(container, viewConfig);
20448
20504
  this.viewConfig = viewConfig;
20449
20505
  }
20450
- getIframeSrc() {
20506
+ getEmbedParamsObject() {
20451
20507
  var _a;
20452
- const { sessionId, genNo, acSessionId, acGenNo, convId, messageId, } = this.viewConfig;
20453
- const path = 'conv-assist-answer';
20454
20508
  const queryParams = this.getBaseQueryParams();
20455
20509
  queryParams[Param.HideActions] = [...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : [])];
20456
20510
  queryParams[Param.isSpotterAgentEmbed] = true;
20511
+ return queryParams;
20512
+ }
20513
+ getIframeSrc() {
20514
+ const { sessionId, genNo, acSessionId, acGenNo, convId, messageId, } = this.viewConfig;
20515
+ const path = 'conv-assist-answer';
20516
+ const queryParams = this.getEmbedParamsObject();
20457
20517
  let query = '';
20458
20518
  const queryParamsString = getQueryParamString(queryParams, true);
20459
20519
  if (queryParamsString) {
@@ -20609,9 +20669,8 @@ let SpotterEmbed$1 = class SpotterEmbed extends TsEmbed {
20609
20669
  super(container, viewConfig);
20610
20670
  this.viewConfig = viewConfig;
20611
20671
  }
20612
- getIframeSrc() {
20672
+ getEmbedParamsObject() {
20613
20673
  const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, } = this.viewConfig;
20614
- const path = 'insights/conv-assist';
20615
20674
  if (!worksheetId) {
20616
20675
  this.handleError(ERROR_MESSAGE.SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND);
20617
20676
  }
@@ -20632,6 +20691,12 @@ let SpotterEmbed$1 = class SpotterEmbed extends TsEmbed {
20632
20691
  if (!isUndefined_1(hideSampleQuestions)) {
20633
20692
  queryParams[Param.HideSampleQuestions] = !!hideSampleQuestions;
20634
20693
  }
20694
+ return queryParams;
20695
+ }
20696
+ getIframeSrc() {
20697
+ const { worksheetId, searchOptions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, } = this.viewConfig;
20698
+ const path = 'insights/conv-assist';
20699
+ const queryParams = this.getEmbedParamsObject();
20635
20700
  let query = '';
20636
20701
  const queryParamsString = getQueryParamString(queryParams, true);
20637
20702
  if (queryParamsString) {