@thoughtspot/visual-embed-sdk 1.37.1-spotter-embed → 1.38.0-alpha.1

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 (161) hide show
  1. package/README.md +1 -1
  2. package/cjs/package.json +2 -2
  3. package/cjs/src/embed/app.d.ts +43 -3
  4. package/cjs/src/embed/app.d.ts.map +1 -1
  5. package/cjs/src/embed/app.js +40 -7
  6. package/cjs/src/embed/app.js.map +1 -1
  7. package/cjs/src/embed/app.spec.js +23 -6
  8. package/cjs/src/embed/app.spec.js.map +1 -1
  9. package/cjs/src/embed/base.d.ts.map +1 -1
  10. package/cjs/src/embed/base.js +7 -0
  11. package/cjs/src/embed/base.js.map +1 -1
  12. package/cjs/src/embed/bodyless-conversation.d.ts +8 -3
  13. package/cjs/src/embed/bodyless-conversation.d.ts.map +1 -1
  14. package/cjs/src/embed/bodyless-conversation.js +5 -2
  15. package/cjs/src/embed/bodyless-conversation.js.map +1 -1
  16. package/cjs/src/embed/bodyless-conversation.spec.js +286 -1
  17. package/cjs/src/embed/bodyless-conversation.spec.js.map +1 -1
  18. package/cjs/src/embed/conversation.d.ts +5 -3
  19. package/cjs/src/embed/conversation.d.ts.map +1 -1
  20. package/cjs/src/embed/conversation.js +3 -2
  21. package/cjs/src/embed/conversation.js.map +1 -1
  22. package/cjs/src/embed/liveboard.d.ts.map +1 -1
  23. package/cjs/src/embed/liveboard.js +21 -10
  24. package/cjs/src/embed/liveboard.js.map +1 -1
  25. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  26. package/cjs/src/embed/ts-embed.js +6 -4
  27. package/cjs/src/embed/ts-embed.js.map +1 -1
  28. package/cjs/src/embed/ts-embed.spec.d.ts.map +1 -1
  29. package/cjs/src/embed/ts-embed.spec.js +105 -0
  30. package/cjs/src/embed/ts-embed.spec.js.map +1 -1
  31. package/cjs/src/index.d.ts +4 -4
  32. package/cjs/src/index.d.ts.map +1 -1
  33. package/cjs/src/index.js +5 -3
  34. package/cjs/src/index.js.map +1 -1
  35. package/cjs/src/react/all-types-export.d.ts +1 -1
  36. package/cjs/src/react/all-types-export.d.ts.map +1 -1
  37. package/cjs/src/react/all-types-export.js +2 -1
  38. package/cjs/src/react/all-types-export.js.map +1 -1
  39. package/cjs/src/react/index.d.ts +32 -3
  40. package/cjs/src/react/index.d.ts.map +1 -1
  41. package/cjs/src/react/index.js +54 -2
  42. package/cjs/src/react/index.js.map +1 -1
  43. package/cjs/src/react/index.spec.js +94 -0
  44. package/cjs/src/react/index.spec.js.map +1 -1
  45. package/cjs/src/types.d.ts +25 -51
  46. package/cjs/src/types.d.ts.map +1 -1
  47. package/cjs/src/types.js +24 -50
  48. package/cjs/src/types.js.map +1 -1
  49. package/dist/{index-Cj4BVGHL.js → index-DeFzsyFF.js} +1 -1
  50. package/dist/{index-DnIvX1FR.js → index-NZYq1Tu3.js} +1 -2
  51. package/dist/src/embed/app.d.ts +43 -3
  52. package/dist/src/embed/app.d.ts.map +1 -1
  53. package/dist/src/embed/base.d.ts.map +1 -1
  54. package/dist/src/embed/bodyless-conversation.d.ts +8 -3
  55. package/dist/src/embed/bodyless-conversation.d.ts.map +1 -1
  56. package/dist/src/embed/conversation.d.ts +5 -3
  57. package/dist/src/embed/conversation.d.ts.map +1 -1
  58. package/dist/src/embed/liveboard.d.ts.map +1 -1
  59. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  60. package/dist/src/embed/ts-embed.spec.d.ts.map +1 -1
  61. package/dist/src/index.d.ts +4 -4
  62. package/dist/src/index.d.ts.map +1 -1
  63. package/dist/src/react/all-types-export.d.ts +1 -1
  64. package/dist/src/react/all-types-export.d.ts.map +1 -1
  65. package/dist/src/react/index.d.ts +32 -3
  66. package/dist/src/react/index.d.ts.map +1 -1
  67. package/dist/src/types.d.ts +25 -51
  68. package/dist/src/types.d.ts.map +1 -1
  69. package/dist/tsembed-react.es.js +614 -77
  70. package/dist/tsembed-react.js +758 -296
  71. package/dist/tsembed.es.js +153 -75
  72. package/dist/tsembed.js +297 -295
  73. package/dist/visual-embed-sdk-react-full.d.ts +194 -145
  74. package/dist/visual-embed-sdk-react.d.ts +194 -145
  75. package/dist/visual-embed-sdk.d.ts +82 -61
  76. package/lib/package.json +2 -2
  77. package/lib/src/embed/app.d.ts +43 -3
  78. package/lib/src/embed/app.d.ts.map +1 -1
  79. package/lib/src/embed/app.js +39 -6
  80. package/lib/src/embed/app.js.map +1 -1
  81. package/lib/src/embed/app.spec.js +24 -7
  82. package/lib/src/embed/app.spec.js.map +1 -1
  83. package/lib/src/embed/base.d.ts.map +1 -1
  84. package/lib/src/embed/base.js +7 -0
  85. package/lib/src/embed/base.js.map +1 -1
  86. package/lib/src/embed/bodyless-conversation.d.ts +8 -3
  87. package/lib/src/embed/bodyless-conversation.d.ts.map +1 -1
  88. package/lib/src/embed/bodyless-conversation.js +5 -2
  89. package/lib/src/embed/bodyless-conversation.js.map +1 -1
  90. package/lib/src/embed/bodyless-conversation.spec.js +287 -2
  91. package/lib/src/embed/bodyless-conversation.spec.js.map +1 -1
  92. package/lib/src/embed/conversation.d.ts +5 -3
  93. package/lib/src/embed/conversation.d.ts.map +1 -1
  94. package/lib/src/embed/conversation.js +3 -2
  95. package/lib/src/embed/conversation.js.map +1 -1
  96. package/lib/src/embed/liveboard.d.ts.map +1 -1
  97. package/lib/src/embed/liveboard.js +21 -10
  98. package/lib/src/embed/liveboard.js.map +1 -1
  99. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  100. package/lib/src/embed/ts-embed.js +6 -4
  101. package/lib/src/embed/ts-embed.js.map +1 -1
  102. package/lib/src/embed/ts-embed.spec.d.ts.map +1 -1
  103. package/lib/src/embed/ts-embed.spec.js +105 -0
  104. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  105. package/lib/src/index.d.ts +4 -4
  106. package/lib/src/index.d.ts.map +1 -1
  107. package/lib/src/index.js +4 -4
  108. package/lib/src/index.js.map +1 -1
  109. package/lib/src/react/all-types-export.d.ts +1 -1
  110. package/lib/src/react/all-types-export.d.ts.map +1 -1
  111. package/lib/src/react/all-types-export.js +1 -1
  112. package/lib/src/react/all-types-export.js.map +1 -1
  113. package/lib/src/react/index.d.ts +32 -3
  114. package/lib/src/react/index.d.ts.map +1 -1
  115. package/lib/src/react/index.js +53 -1
  116. package/lib/src/react/index.js.map +1 -1
  117. package/lib/src/react/index.spec.js +96 -2
  118. package/lib/src/react/index.spec.js.map +1 -1
  119. package/lib/src/types.d.ts +25 -51
  120. package/lib/src/types.d.ts.map +1 -1
  121. package/lib/src/types.js +24 -50
  122. package/lib/src/types.js.map +1 -1
  123. package/lib/src/visual-embed-sdk.d.ts +85 -64
  124. package/package.json +2 -2
  125. package/src/embed/app.spec.ts +30 -6
  126. package/src/embed/app.ts +62 -9
  127. package/src/embed/base.ts +9 -0
  128. package/src/embed/bodyless-conversation.spec.ts +308 -1
  129. package/src/embed/bodyless-conversation.ts +13 -3
  130. package/src/embed/conversation.ts +5 -3
  131. package/src/embed/liveboard.ts +25 -10
  132. package/src/embed/ts-embed.spec.ts +130 -0
  133. package/src/embed/ts-embed.ts +6 -4
  134. package/src/index.ts +10 -3
  135. package/src/react/all-types-export.ts +1 -0
  136. package/src/react/index.spec.tsx +157 -1
  137. package/src/react/index.tsx +64 -3
  138. package/src/types.ts +24 -56
  139. package/cjs/src/pages/embed-test.page.d.ts +0 -8
  140. package/cjs/src/pages/embed-test.page.d.ts.map +0 -1
  141. package/cjs/src/pages/embed-test.page.js +0 -20
  142. package/cjs/src/pages/embed-test.page.js.map +0 -1
  143. package/cjs/src/pages/home.page.d.ts +0 -6
  144. package/cjs/src/pages/home.page.d.ts.map +0 -1
  145. package/cjs/src/pages/home.page.js +0 -12
  146. package/cjs/src/pages/home.page.js.map +0 -1
  147. package/cjs/src/pages/login.page.d.ts +0 -15
  148. package/cjs/src/pages/login.page.d.ts.map +0 -1
  149. package/cjs/src/pages/login.page.js +0 -22
  150. package/cjs/src/pages/login.page.js.map +0 -1
  151. package/cjs/src/tests/auth.test.d.ts +0 -1
  152. package/cjs/src/tests/auth.test.d.ts.map +0 -1
  153. package/cjs/src/tests/auth.test.js +0 -1
  154. package/cjs/src/tests/auth.test.js.map +0 -1
  155. package/cjs/src/tests/e2e/auth.spec.d.ts +0 -2
  156. package/cjs/src/tests/e2e/auth.spec.d.ts.map +0 -1
  157. package/cjs/src/tests/e2e/auth.spec.js +0 -54
  158. package/cjs/src/tests/e2e/auth.spec.js.map +0 -1
  159. package/dist/index-DUaG1OG2.js +0 -7447
  160. package/dist/index-Fhk1V_Gw.js +0 -7371
  161. package/dist/index-OuiZF3zE.js +0 -7371
@@ -1,4 +1,4 @@
1
- /* @thoughtspot/visual-embed-sdk version 1.37.1-spotter-embed */
1
+ /* @thoughtspot/visual-embed-sdk version 1.38.0-alpha.1 */
2
2
  'use client';
3
3
  function _mergeNamespaces(n, m) {
4
4
  m.forEach(function (e) {
@@ -1999,9 +1999,12 @@ var HostEvent;
1999
1999
  * @example
2000
2000
  * ```js
2001
2001
  * searchEmbed.trigger(HostEvent.OpenFilter,
2002
- * { columnId: '<column-GUID>', name: 'column name', type: 'INT64', dataType: 'ATTRIBUTE'})
2002
+ * {column: { columnId: '<column-GUID>', name: 'column name', type: 'INT64', dataType: 'ATTRIBUTE'}})
2003
+ * ```
2004
+ * @example
2005
+ * ```js
2003
2006
  * LiveboardEmbed.trigger(HostEvent.OpenFilter,
2004
- * { columnId: '<column-GUID>'})
2007
+ * { column: {columnId: '<column-GUID>'}})
2005
2008
  * ```
2006
2009
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
2007
2010
  */
@@ -2610,6 +2613,25 @@ var HostEvent;
2610
2613
  * }]
2611
2614
  * });
2612
2615
  * ```
2616
+ * If there are multiple columns with the same name, consider
2617
+ * using `WORKSHEET_NAME::COLUMN_NAME` format.
2618
+ *
2619
+ * @example
2620
+ *
2621
+ * ```js
2622
+ * liveboardEmbed.trigger(HostEvent.UpdateFilters, {
2623
+ * filters: [{
2624
+ * column: "(Sample) Retail - Apparel::city",
2625
+ * oper: 'IN',
2626
+ * values: ["atlanta"]
2627
+ * },
2628
+ * {
2629
+ * column: "(Sample) Retail - Apparel::Region",
2630
+ * oper: 'IN',
2631
+ * values: ["West","Midwest"]
2632
+ * }]
2633
+ * });
2634
+ * ```
2613
2635
  * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
2614
2636
  */
2615
2637
  HostEvent["UpdateFilters"] = "updateFilters";
@@ -2819,54 +2841,6 @@ var HostEvent;
2819
2841
  * @version SDK: 1.37.0 | ThoughtSpot: 10.8.0.cl
2820
2842
  */
2821
2843
  HostEvent["TransformTableVizData"] = "TransformTableVizData";
2822
- /**
2823
- * Triggers the table visualization re-render with the updated data.
2824
- * Includes the following properties:
2825
- * @param - `columnDataLite` - an array of object containing the
2826
- * data value modifications retrieved from the `EmbedEvent.TableVizRendered`
2827
- * payload.For example, { columnDataLite: []}`.
2828
- */
2829
- HostEvent["SpotterSearch"] = "SpotterSearch";
2830
- /**
2831
- * Triggers the table visualization re-render with the updated data.
2832
- * Includes the following properties:
2833
- * @param - `columnDataLite` - an array of object containing the
2834
- * data value modifications retrieved from the `EmbedEvent.TableVizRendered`
2835
- * payload.For example, { columnDataLite: []}`.
2836
- */
2837
- HostEvent["EditLastPrompt"] = "EditLastPrompt";
2838
- /**
2839
- * Triggers the table visualization re-render with the updated data.
2840
- * Includes the following properties:
2841
- * @param - `columnDataLite` - an array of object containing the
2842
- * data value modifications retrieved from the `EmbedEvent.TableVizRendered`
2843
- * payload.For example, { columnDataLite: []}`.
2844
- */
2845
- HostEvent["PreviewSpotterData"] = "PreviewSpotterData";
2846
- /**
2847
- * Triggers the table visualization re-render with the updated data.
2848
- * Includes the following properties:
2849
- * @param - `columnDataLite` - an array of object containing the
2850
- * data value modifications retrieved from the `EmbedEvent.TableVizRendered`
2851
- * payload.For example, { columnDataLite: []}`.
2852
- */
2853
- HostEvent["ResetSpotterConversation"] = "ResetSpotterConversation";
2854
- /**
2855
- * Triggers the table visualization re-render with the updated data.
2856
- * Includes the following properties:
2857
- * @param - `columnDataLite` - an array of object containing the
2858
- * data value modifications retrieved from the `EmbedEvent.TableVizRendered`
2859
- * payload.For example, { columnDataLite: []}`.
2860
- */
2861
- HostEvent["DeleteLastPrompt"] = "DeleteLastPrompt";
2862
- /**
2863
- * Triggers the table visualization re-render with the updated data.
2864
- * Includes the following properties:
2865
- * @param - `columnDataLite` - an array of object containing the
2866
- * data value modifications retrieved from the `EmbedEvent.TableVizRendered`
2867
- * payload.For example, { columnDataLite: []}`.
2868
- */
2869
- HostEvent["AnswerChartSwitcher"] = "answerChartSwitcher";
2870
2844
  })(HostEvent || (HostEvent = {}));
2871
2845
  /**
2872
2846
  * The different visual modes that the data sources panel within
@@ -7540,7 +7514,7 @@ class AnswerService {
7540
7514
  async getTML() {
7541
7515
  const { object } = await this.executeQuery(getAnswerTML, {});
7542
7516
  const edoc = object[0].edoc;
7543
- const YAML = await import('./index-DUaG1OG2.js');
7517
+ const YAML = await import('./index-DeFzsyFF.js');
7544
7518
  const parsedDoc = YAML.parse(edoc);
7545
7519
  return {
7546
7520
  answer: {
@@ -15048,6 +15022,13 @@ const prefetch = (url, prefetchFeatures, additionalFlags) => {
15048
15022
  iFrame.style.width = '0';
15049
15023
  iFrame.style.height = '0';
15050
15024
  iFrame.style.border = '0';
15025
+ // Make it 'fixed' to keep it in a different stacking context.
15026
+ // This should solve the focus behaviours inside the iframe from
15027
+ // interfering with main body.
15028
+ iFrame.style.position = 'fixed';
15029
+ // Push it out of viewport.
15030
+ iFrame.style.top = '100vh';
15031
+ iFrame.style.left = '100vw';
15051
15032
  iFrame.classList.add('prefetchIframe');
15052
15033
  iFrame.classList.add(`prefetchIframeNum-${index}`);
15053
15034
  document.body.appendChild(iFrame);
@@ -15419,7 +15400,7 @@ function processEventData(type, e, thoughtSpotHost, containerEl) {
15419
15400
  return e;
15420
15401
  }
15421
15402
 
15422
- var name="@thoughtspot/visual-embed-sdk";var version$1="1.37.1-spotter-embed";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p . --incremental false; tsc -p . --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts","bundle-dts":"dts-bundle --name ../../dist/visual-embed-sdk --main lib/src/index.d.ts --outputAsModuleFolder=true","bundle-dts-react":"dts-bundle --name ../../../dist/visual-embed-sdk-react --main lib/src/react/index.d.ts --outputAsModuleFolder=true","bundle-dts-react-full":"dts-bundle --name ../../../dist/visual-embed-sdk-react-full --main lib/src/react/all-types-export.d.ts --outputAsModuleFolder=true",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.json --theme typedoc-theme --json static/typedoc/typedoc.json --disableOutputCheck","test-sdk":"jest -c jest.config.sdk.js --runInBand",test:"npm run test-sdk",posttest:"cat ./coverage/sdk/lcov.info | coveralls","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest",dev:"vite -c vite.local.config.ts"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={classnames:"^2.3.1",eventemitter3:"^4.0.7",lodash:"^4.17.21","mixpanel-browser":"2.47.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1",yaml:"^2.5.1"};var devDependencies={"@mdx-js/mdx":"^1.6.22","@mdx-js/react":"^1.6.22","@react-icons/all-files":"^4.1.0","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^5.0.2","@size-limit/preset-big-lib":"^8.2.6","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^22.2.3","@types/lodash":"^4.17.0","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^8.28.0","@typescript-eslint/parser":"^8.28.0",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1",coveralls:"^3.1.0",crypto:"^1.0.1","current-git-branch":"^1.1.0","dts-bundle":"^0.7.3",eslint:"^9.23.0","eslint-config-airbnb-base":"^15.0.0","eslint-config-prettier":"^10.1.1","eslint-import-resolver-typescript":"^4.2.5","eslint-plugin-comment-length":"2.2.1","eslint-plugin-import":"^2.31.0","eslint-plugin-jsdoc":"^50.6.9","eslint-plugin-prettier":"^5.2.5","eslint-plugin-react":"^7.37.5","eslint-plugin-react-hooks":"^5.2.0","fs-extra":"^10.0.0","gh-pages":"6.3.0",globals:"^16.0.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^1.1.1",jest:"^26.6.3","jest-fetch-mock":"^3.0.3",jsdom:"^17.0.0",prettier:"2.1.2",react:"^16.14.0","react-dom":"^16.14.0","react-resizable":"^1.11.0","react-resize-detector":"^6.6.0","react-test-renderer":"^17.0.2","react-use-flexsearch":"^0.1.1",rollup:"4.24.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^26.5.5","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","typescript-eslint":"^8.29.1","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^6.3.5"};var author="ThoughtSpot";var email="support@thoughtspot.com";var license="ThoughtSpot Development Tools End User License Agreement";var directories={lib:"lib"};var repository={type:"git",url:"git+https://github.com/thoughtspot/visual-embed-sdk.git"};var publishConfig={registry:"https://registry.npmjs.org"};var keywords=["thoughtspot","everywhere","embedded","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version$1,description:description,module:module,main:main,types:types,files:files,exports:exports,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.es.js",limit:"31 kB"}],scripts:scripts,peerDependencies:peerDependencies,dependencies:dependencies,devDependencies:devDependencies,author:author,email:email,license:license,directories:directories,repository:repository,publishConfig:publishConfig,keywords:keywords,bugs:bugs,homepage:homepage,globals:globals};
15403
+ var name="@thoughtspot/visual-embed-sdk";var version$1="1.38.0-alpha.1";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p . --incremental false; tsc -p . --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts","bundle-dts":"dts-bundle --name ../../dist/visual-embed-sdk --main lib/src/index.d.ts --outputAsModuleFolder=true","bundle-dts-react":"dts-bundle --name ../../../dist/visual-embed-sdk-react --main lib/src/react/index.d.ts --outputAsModuleFolder=true","bundle-dts-react-full":"dts-bundle --name ../../../dist/visual-embed-sdk-react-full --main lib/src/react/all-types-export.d.ts --outputAsModuleFolder=true",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.json --theme typedoc-theme --json static/typedoc/typedoc.json --disableOutputCheck","test-sdk":"jest -c jest.config.sdk.js --runInBand",test:"npm run test-sdk",posttest:"cat ./coverage/sdk/lcov.info | coveralls","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest",dev:"vite -c vite.local.config.ts"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={classnames:"^2.3.1",eventemitter3:"^4.0.7",lodash:"^4.17.21","mixpanel-browser":"2.47.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1",yaml:"^2.5.1"};var devDependencies={"@mdx-js/mdx":"^1.6.22","@mdx-js/react":"^1.6.22","@react-icons/all-files":"^4.1.0","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^5.0.2","@size-limit/preset-big-lib":"^8.2.6","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^22.2.3","@types/lodash":"^4.17.0","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^8.28.0","@typescript-eslint/parser":"^8.28.0",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1",coveralls:"^3.1.0",crypto:"^1.0.1","current-git-branch":"^1.1.0","dts-bundle":"^0.7.3",eslint:"^9.23.0","eslint-config-airbnb-base":"^15.0.0","eslint-config-prettier":"^10.1.1","eslint-import-resolver-typescript":"^4.2.5","eslint-plugin-comment-length":"2.2.1","eslint-plugin-import":"^2.31.0","eslint-plugin-jsdoc":"^50.6.9","eslint-plugin-prettier":"^5.2.5","eslint-plugin-react":"^7.37.5","eslint-plugin-react-hooks":"^5.2.0","fs-extra":"^10.0.0","gh-pages":"6.3.0",globals:"^16.0.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^1.1.1",jest:"^26.6.3","jest-fetch-mock":"^3.0.3",jsdom:"^17.0.0",prettier:"2.1.2",react:"^16.14.0","react-dom":"^16.14.0","react-resizable":"^1.11.0","react-resize-detector":"^6.6.0","react-test-renderer":"^17.0.2","react-use-flexsearch":"^0.1.1",rollup:"4.24.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^26.5.5","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","typescript-eslint":"^8.29.1","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^6.3.5"};var author="ThoughtSpot";var email="support@thoughtspot.com";var license="ThoughtSpot Development Tools End User License Agreement";var directories={lib:"lib"};var repository={type:"git",url:"git+https://github.com/thoughtspot/visual-embed-sdk.git"};var publishConfig={registry:"https://registry.npmjs.org"};var keywords=["thoughtspot","everywhere","embedded","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version$1,description:description,module:module,main:main,types:types,files:files,exports:exports,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.es.js",limit:"31 kB"}],scripts:scripts,peerDependencies:peerDependencies,dependencies:dependencies,devDependencies:devDependencies,author:author,email:email,license:license,directories:directories,repository:repository,publishConfig:publishConfig,keywords:keywords,bugs:bugs,homepage:homepage,globals:globals};
15423
15404
 
15424
15405
  /**
15425
15406
  * Reloads the ThoughtSpot iframe.
@@ -15653,11 +15634,13 @@ class TsEmbed {
15653
15634
  * @param responder
15654
15635
  */
15655
15636
  this.updateAuthToken = async (_, responder) => {
15656
- const { autoLogin = false, authType } = this.embedConfig; // Set autoLogin default to false
15657
- if (authType === AuthType.TrustedAuthTokenCookieless) {
15658
- let authToken = '';
15637
+ const { authType } = this.embedConfig;
15638
+ let { autoLogin } = this.embedConfig;
15639
+ // Default autoLogin: true for cookieless if undefined/null, otherwise false
15640
+ autoLogin = autoLogin !== null && autoLogin !== void 0 ? autoLogin : (authType === AuthType.TrustedAuthTokenCookieless);
15641
+ if (autoLogin && authType === AuthType.TrustedAuthTokenCookieless) {
15659
15642
  try {
15660
- authToken = await getAuthenticationToken(this.embedConfig);
15643
+ const authToken = await getAuthenticationToken(this.embedConfig);
15661
15644
  responder({
15662
15645
  type: EmbedEvent.AuthExpire,
15663
15646
  data: { authToken },
@@ -16811,6 +16794,31 @@ var HomePageSearchBarMode;
16811
16794
  HomePageSearchBarMode["AI_ANSWER"] = "aiAnswer";
16812
16795
  HomePageSearchBarMode["NONE"] = "none";
16813
16796
  })(HomePageSearchBarMode || (HomePageSearchBarMode = {}));
16797
+ /**
16798
+ * Define the version of the primary navbar
16799
+ * @version SDK: 1.39.0 | Thoughtspot: 10.10.0.cl
16800
+ */
16801
+ var PrimaryNavbarVersion;
16802
+ (function (PrimaryNavbarVersion) {
16803
+ /**
16804
+ * Sliding (v3) introduces a new left-side navigation hub featuring a tab switcher,
16805
+ * along with updates to the top navigation bar.
16806
+ * It serves as the foundational version of the PrimaryNavBar.
16807
+ */
16808
+ PrimaryNavbarVersion["Sliding"] = "v3";
16809
+ })(PrimaryNavbarVersion || (PrimaryNavbarVersion = {}));
16810
+ /**
16811
+ * Define the version of the home page
16812
+ * @version SDK: 1.39.0 | Thoughtspot: 10.10.0.cl
16813
+ */
16814
+ var HomePage;
16815
+ (function (HomePage) {
16816
+ /**
16817
+ * Modular (v2) introduces the updated Modular Home Experience.
16818
+ * It serves as the foundational version of the home page.
16819
+ */
16820
+ HomePage["Modular"] = "v2";
16821
+ })(HomePage || (HomePage = {}));
16814
16822
  /**
16815
16823
  * Embeds full ThoughtSpot experience in a host application.
16816
16824
  * @group Embed components
@@ -16835,7 +16843,7 @@ class AppEmbed extends V1Embed {
16835
16843
  responder({ type: EmbedEvent.EmbedIframeCenter, data: obj });
16836
16844
  };
16837
16845
  this.setIframeHeightForNonEmbedLiveboard = (data) => {
16838
- const { height: frameHeight, ...restParams } = this.viewConfig.frameParams || {};
16846
+ const { height: frameHeight } = this.viewConfig.frameParams || {};
16839
16847
  const liveboardRelatedRoutes = [
16840
16848
  '/pinboard/',
16841
16849
  '/insights/pinboard/',
@@ -16865,9 +16873,9 @@ class AppEmbed extends V1Embed {
16865
16873
  * embedded Liveboard or visualization.
16866
16874
  */
16867
16875
  getEmbedParams() {
16868
- const { tag, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideHamburger, hideObjectSearch, hideNotification, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 = false, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, hideHomepageLeftNav = false, modularHomeExperience = false, modularHomeExperienceV3 = false, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, enable2ColumnLayout, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false,
16876
+ const { tag, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideHamburger, hideObjectSearch, hideNotification, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 = false, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, hideHomepageLeftNav = false, modularHomeExperience = false, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, enable2ColumnLayout, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false,
16869
16877
  /* eslint-disable-next-line max-len */
16870
- dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, } = this.viewConfig;
16878
+ dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, discoveryExperience, } = this.viewConfig;
16871
16879
  let params = {};
16872
16880
  params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
16873
16881
  params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
@@ -16884,9 +16892,6 @@ class AppEmbed extends V1Embed {
16884
16892
  params[Param.HideIrrelevantFiltersInTab] = hideIrrelevantChipsInLiveboardTabs;
16885
16893
  params[Param.IsUnifiedSearchExperienceEnabled] = isUnifiedSearchExperienceEnabled;
16886
16894
  params = this.getBaseQueryParams(params);
16887
- if (modularHomeExperienceV3) {
16888
- params[Param.NavigationVersion] = 'v3';
16889
- }
16890
16895
  if (hideObjectSearch) {
16891
16896
  params[Param.HideObjectSearch] = !!hideObjectSearch;
16892
16897
  }
@@ -16943,6 +16948,17 @@ class AppEmbed extends V1Embed {
16943
16948
  /* eslint-disable-next-line max-len */
16944
16949
  params[Param.DataPanelCustomGroupsAccordionInitialState] = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL;
16945
16950
  }
16951
+ if (discoveryExperience) {
16952
+ // primaryNavbarVersion v3 will enabled the new left navigation
16953
+ if (discoveryExperience.primaryNavbarVersion === PrimaryNavbarVersion.Sliding) {
16954
+ params[Param.NavigationVersion] = discoveryExperience.primaryNavbarVersion;
16955
+ }
16956
+ // homePage v2 will enable the modular home page
16957
+ // and it will override the modularHomeExperience value
16958
+ if (discoveryExperience.homePage === HomePage.Modular) {
16959
+ params[Param.ModularHomeExperienceEnabled] = true;
16960
+ }
16961
+ }
16946
16962
  const queryParams = getQueryParamString(params, true);
16947
16963
  return queryParams;
16948
16964
  }
@@ -17122,12 +17138,6 @@ const addPreviewStylesIfNotPresent = () => {
17122
17138
  * @summary Liveboard & visualization embed
17123
17139
  * @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
17124
17140
  */
17125
- const liveboardHeightWhitelistedRoutes = [
17126
- '/embed/viz/',
17127
- '/embed/insights/viz/',
17128
- '/tsl-editor/PINBOARD_ANSWER_BOOK/',
17129
- '/import-tsl/PINBOARD_ANSWER_BOOK/',
17130
- ];
17131
17141
  /**
17132
17142
  * Embed a ThoughtSpot Liveboard or visualization. When rendered it already
17133
17143
  * waits for the authentication to complete, so you need not wait for
@@ -17144,7 +17154,6 @@ const liveboardHeightWhitelistedRoutes = [
17144
17154
  * @group Embed components
17145
17155
  */
17146
17156
  class LiveboardEmbed extends V1Embed {
17147
- // eslint-disable-next-line no-useless-constructor
17148
17157
  constructor(domSelector, viewConfig) {
17149
17158
  viewConfig.embedComponentType = 'LiveboardEmbed';
17150
17159
  super(domSelector, viewConfig);
@@ -17162,13 +17171,30 @@ class LiveboardEmbed extends V1Embed {
17162
17171
  responder({ type: EmbedEvent.EmbedIframeCenter, data: obj });
17163
17172
  };
17164
17173
  this.setIframeHeightForNonEmbedLiveboard = (data) => {
17165
- const routePath = data.data.currentPath;
17166
- if (liveboardHeightWhitelistedRoutes.some((path) => routePath.startsWith(path))) {
17174
+ const { height: frameHeight } = this.viewConfig.frameParams || {};
17175
+ const liveboardRelatedRoutes = [
17176
+ '/pinboard/',
17177
+ '/insights/pinboard/',
17178
+ '/schedules/',
17179
+ '/embed/viz/',
17180
+ '/embed/insights/viz/',
17181
+ '/liveboard/',
17182
+ '/insights/liveboard/',
17183
+ '/tsl-editor/PINBOARD_ANSWER_BOOK/',
17184
+ '/import-tsl/PINBOARD_ANSWER_BOOK/',
17185
+ ];
17186
+ if (liveboardRelatedRoutes.some((path) => data.data.currentPath.startsWith(path))) {
17187
+ // Ignore the height reset of the frame, if the navigation is
17188
+ // only within the liveboard page.
17167
17189
  return;
17168
17190
  }
17169
- this.setIFrameHeight(this.defaultHeight);
17191
+ this.setIFrameHeight(frameHeight || this.defaultHeight);
17170
17192
  };
17171
17193
  if (this.viewConfig.fullHeight === true) {
17194
+ if (this.viewConfig.vizId) {
17195
+ logger$3.warn('Full height is currently only supported for Liveboard embeds.' +
17196
+ 'Using full height with vizId might lead to unexpected behavior.');
17197
+ }
17172
17198
  this.on(EmbedEvent.RouteChange, this.setIframeHeightForNonEmbedLiveboard);
17173
17199
  this.on(EmbedEvent.EmbedHeight, this.updateIFrameHeight);
17174
17200
  this.on(EmbedEvent.EmbedIframeCenter, this.embedIframeCenter);
@@ -18083,6 +18109,9 @@ class SpotterAgentEmbed {
18083
18109
  return { error };
18084
18110
  }
18085
18111
  const container = document.createElement('div');
18112
+ if (this.viewConfig.containerClassName) {
18113
+ container.className = this.viewConfig.containerClassName;
18114
+ }
18086
18115
  const embed = new ConversationMessage(container, {
18087
18116
  ...this.viewConfig,
18088
18117
  sessionId: data.sessionId,
@@ -18093,6 +18122,31 @@ class SpotterAgentEmbed {
18093
18122
  await embed.render();
18094
18123
  return { container, viz: embed };
18095
18124
  }
18125
+ }
18126
+ /**
18127
+ * Create a conversation embed, which can be integrated inside
18128
+ * chatbots or other conversational interfaces.
18129
+ * @deprecated from SDK: 1.38.0 | ThoughtSpot: 10.10.0.cl
18130
+ * Use {@link SpotterAgentEmbed} instead
18131
+ * @example
18132
+ * ```js
18133
+ * import { SpotterAgentEmbed } from '@thoughtspot/visual-embed-sdk';
18134
+ *
18135
+ * const conversation = new SpotterAgentEmbed({
18136
+ * worksheetId: 'worksheetId',
18137
+ * });
18138
+ *
18139
+ * const { container, error } = await conversation.sendMessage('show me sales by region');
18140
+ *
18141
+ * // append the container to the DOM
18142
+ * document.body.appendChild(container); // or to any other element
18143
+ * ```
18144
+ * @group Embed components
18145
+ */
18146
+ class BodylessConversation extends SpotterAgentEmbed {
18147
+ constructor(viewConfig) {
18148
+ super(viewConfig);
18149
+ }
18096
18150
  }
18097
18151
 
18098
18152
  /**
@@ -18131,7 +18185,7 @@ var isUndefined_1 = isUndefined;
18131
18185
  * });
18132
18186
  * conversation.render();
18133
18187
  * ```
18134
- * @version SDK: 1.38.0 | ThoughtSpot: 10.10.0.cl
18188
+ * @version SDK: 1.37.0 | ThoughtSpot: 10.9.0.cl
18135
18189
  */
18136
18190
  class SpotterEmbed extends TsEmbed {
18137
18191
  constructor(container, viewConfig) {
@@ -18179,6 +18233,30 @@ class SpotterEmbed extends TsEmbed {
18179
18233
  await this.renderIFrame(src);
18180
18234
  return this;
18181
18235
  }
18236
+ }
18237
+ /**
18238
+ * Embed ThoughtSpot AI Conversation.
18239
+ * @deprecated from SDK: 1.38.0 | ThoughtSpot: 10.10.0.cl
18240
+ * Use {@link SpotterEmbed} instead
18241
+ * @group Embed components
18242
+ * @example
18243
+ * ```js
18244
+ * const conversation = new SpotterEmbed('#tsEmbed', {
18245
+ * worksheetId: 'worksheetId',
18246
+ * searchOptions: {
18247
+ * searchQuery: 'searchQuery',
18248
+ * },
18249
+ * });
18250
+ * conversation.render();
18251
+ * ```
18252
+ * @version SDK: 1.37.0 | ThoughtSpot: 10.9.0.cl
18253
+ */
18254
+ class ConversationEmbed extends SpotterEmbed {
18255
+ constructor(container, viewConfig) {
18256
+ viewConfig.embedComponentType = 'conversation';
18257
+ super(container, viewConfig);
18258
+ this.viewConfig = viewConfig;
18259
+ }
18182
18260
  }
18183
18261
 
18184
18262
  /**
@@ -18764,4 +18842,4 @@ const createLiveboardWithAnswers = async (answers, name) => {
18764
18842
  return result;
18765
18843
  };
18766
18844
 
18767
- export { Action, AnswerService, AppEmbed, AuthEvent, AuthFailureType, AuthStatus, AuthType, SpotterAgentEmbed as BodylessConversation, ContextMenuTriggerOptions, SpotterEmbed as ConversationEmbed, DataSourceVisualMode, EmbedEvent, HomeLeftNavItem, HomePageSearchBarMode, HomepageModule, HostEvent, ListPageColumns, LiveboardEmbed, LogLevel, MIXPANEL_EVENT, Page, PinboardEmbed, PrefetchFeatures, RuntimeFilterOp, SageEmbed, SearchBarEmbed, SearchEmbed, SpotterAgentEmbed, SpotterEmbed, UIPassthroughEvent, createLiveboardWithAnswers, executeTML, exportTML, getAnswerFromQuery, getEmbedConfig as getInitConfig, getSessionInfo, init, logout, prefetch, resetCachedAuthToken, tokenizedFetch, uploadMixpanelEvent };
18845
+ export { Action, AnswerService, AppEmbed, AuthEvent, AuthFailureType, AuthStatus, AuthType, BodylessConversation, ContextMenuTriggerOptions, ConversationEmbed, DataSourceVisualMode, EmbedEvent, HomeLeftNavItem, HomePage, HomePageSearchBarMode, HomepageModule, HostEvent, ListPageColumns, LiveboardEmbed, LogLevel, MIXPANEL_EVENT, Page, PinboardEmbed, PrefetchFeatures, PrimaryNavbarVersion, RuntimeFilterOp, SageEmbed, SearchBarEmbed, SearchEmbed, SpotterAgentEmbed, SpotterEmbed, UIPassthroughEvent, createLiveboardWithAnswers, executeTML, exportTML, getAnswerFromQuery, getEmbedConfig as getInitConfig, getSessionInfo, init, logout, prefetch, resetCachedAuthToken, tokenizedFetch, uploadMixpanelEvent };