@thoughtspot/visual-embed-sdk 1.36.0 → 1.36.2

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 (164) hide show
  1. package/cjs/package.json +1 -1
  2. package/cjs/src/auth.d.ts.map +1 -1
  3. package/cjs/src/auth.js +2 -1
  4. package/cjs/src/auth.js.map +1 -1
  5. package/cjs/src/css-variables.d.ts +8 -0
  6. package/cjs/src/css-variables.d.ts.map +1 -1
  7. package/cjs/src/embed/base.d.ts.map +1 -1
  8. package/cjs/src/embed/base.js +2 -2
  9. package/cjs/src/embed/base.js.map +1 -1
  10. package/cjs/src/embed/base.spec.js +24 -0
  11. package/cjs/src/embed/base.spec.js.map +1 -1
  12. package/cjs/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
  13. package/cjs/src/embed/hostEventClient/host-event-client.js +8 -3
  14. package/cjs/src/embed/hostEventClient/host-event-client.js.map +1 -1
  15. package/cjs/src/embed/hostEventClient/host-event-client.spec.js +54 -0
  16. package/cjs/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
  17. package/cjs/src/embed/searchEmbed-basic-auth.spec.d.ts +2 -0
  18. package/cjs/src/embed/searchEmbed-basic-auth.spec.d.ts.map +1 -0
  19. package/cjs/src/embed/searchEmbed-basic-auth.spec.js +104 -0
  20. package/cjs/src/embed/searchEmbed-basic-auth.spec.js.map +1 -0
  21. package/cjs/src/hostEventsTypeMapping.d.ts +2 -0
  22. package/cjs/src/hostEventsTypeMapping.d.ts.map +1 -0
  23. package/cjs/src/hostEventsTypeMapping.js +4 -0
  24. package/cjs/src/hostEventsTypeMapping.js.map +1 -0
  25. package/cjs/src/types.d.ts +72 -8
  26. package/cjs/src/types.d.ts.map +1 -1
  27. package/cjs/src/types.js +72 -8
  28. package/cjs/src/types.js.map +1 -1
  29. package/cjs/src/utils/embedApi/contracts.d.ts +101 -0
  30. package/cjs/src/utils/embedApi/contracts.d.ts.map +1 -0
  31. package/cjs/src/utils/embedApi/contracts.js +17 -0
  32. package/cjs/src/utils/embedApi/contracts.js.map +1 -0
  33. package/cjs/src/utils/embedApi/embedApiClient.d.ts +12 -0
  34. package/cjs/src/utils/embedApi/embedApiClient.d.ts.map +1 -0
  35. package/cjs/src/utils/embedApi/embedApiClient.js +46 -0
  36. package/cjs/src/utils/embedApi/embedApiClient.js.map +1 -0
  37. package/cjs/src/utils/embedApi/processEmbedApi.d.ts +9 -0
  38. package/cjs/src/utils/embedApi/processEmbedApi.d.ts.map +1 -0
  39. package/cjs/src/utils/embedApi/processEmbedApi.js +18 -0
  40. package/cjs/src/utils/embedApi/processEmbedApi.js.map +1 -0
  41. package/cjs/src/utils/resetServices.d.ts +8 -0
  42. package/cjs/src/utils/resetServices.d.ts.map +1 -0
  43. package/cjs/src/utils/resetServices.js +18 -0
  44. package/cjs/src/utils/resetServices.js.map +1 -0
  45. package/cjs/src/utils/resetServices.spec.d.ts +2 -0
  46. package/cjs/src/utils/resetServices.spec.d.ts.map +1 -0
  47. package/cjs/src/utils/resetServices.spec.js +18 -0
  48. package/cjs/src/utils/resetServices.spec.js.map +1 -0
  49. package/cjs/src/utils/sessionInfoService.d.ts +14 -2
  50. package/cjs/src/utils/sessionInfoService.d.ts.map +1 -1
  51. package/cjs/src/utils/sessionInfoService.js +18 -3
  52. package/cjs/src/utils/sessionInfoService.js.map +1 -1
  53. package/dist/{index-V2oBuwy6.js → index-B3hd6DTM.js} +1 -1
  54. package/dist/index-BBBimG1x.js +7370 -0
  55. package/dist/index-BGnxP5NY.js +7370 -0
  56. package/dist/index-CENLvayL.js +7370 -0
  57. package/dist/index-CR5u7BMC.js +7370 -0
  58. package/dist/index-CbltIawo.js +7370 -0
  59. package/dist/index-CoQfqaHj.js +7370 -0
  60. package/dist/index-CzwzS0P4.js +7370 -0
  61. package/dist/index-D-9WUCUl.js +7370 -0
  62. package/dist/index-DFwi_pV_.js +7370 -0
  63. package/dist/index-DOIjN0N_.js +7370 -0
  64. package/dist/index-DYBx8SuE.js +7370 -0
  65. package/dist/index-DaLHJaLd.js +7370 -0
  66. package/dist/index-DnJX-gN2.js +7370 -0
  67. package/dist/index-DpuhnTj2.js +7370 -0
  68. package/dist/index-IDmSUe93.js +7370 -0
  69. package/dist/index-nWevLycs.js +7370 -0
  70. package/dist/index-vxW97_xb.js +7370 -0
  71. package/dist/src/auth.d.ts.map +1 -1
  72. package/dist/src/css-variables.d.ts +8 -0
  73. package/dist/src/css-variables.d.ts.map +1 -1
  74. package/dist/src/embed/base.d.ts.map +1 -1
  75. package/dist/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
  76. package/dist/src/embed/searchEmbed-basic-auth.spec.d.ts +2 -0
  77. package/dist/src/embed/searchEmbed-basic-auth.spec.d.ts.map +1 -0
  78. package/dist/src/hostEventsTypeMapping.d.ts +2 -0
  79. package/dist/src/hostEventsTypeMapping.d.ts.map +1 -0
  80. package/dist/src/types.d.ts +72 -8
  81. package/dist/src/types.d.ts.map +1 -1
  82. package/dist/src/utils/embedApi/contracts.d.ts +101 -0
  83. package/dist/src/utils/embedApi/contracts.d.ts.map +1 -0
  84. package/dist/src/utils/embedApi/embedApiClient.d.ts +12 -0
  85. package/dist/src/utils/embedApi/embedApiClient.d.ts.map +1 -0
  86. package/dist/src/utils/embedApi/processEmbedApi.d.ts +9 -0
  87. package/dist/src/utils/embedApi/processEmbedApi.d.ts.map +1 -0
  88. package/dist/src/utils/resetServices.d.ts +8 -0
  89. package/dist/src/utils/resetServices.d.ts.map +1 -0
  90. package/dist/src/utils/resetServices.spec.d.ts +2 -0
  91. package/dist/src/utils/resetServices.spec.d.ts.map +1 -0
  92. package/dist/src/utils/sessionInfoService.d.ts +14 -2
  93. package/dist/src/utils/sessionInfoService.d.ts.map +1 -1
  94. package/dist/tsembed-react.es.js +85 -15
  95. package/dist/tsembed-react.js +84 -14
  96. package/dist/tsembed.es.js +126 -18
  97. package/dist/tsembed.js +125 -17
  98. package/dist/visual-embed-sdk-react-full.d.ts +94 -10
  99. package/dist/visual-embed-sdk-react.d.ts +94 -10
  100. package/dist/visual-embed-sdk.d.ts +94 -10
  101. package/lib/package.json +1 -1
  102. package/lib/src/auth.d.ts.map +1 -1
  103. package/lib/src/auth.js +3 -2
  104. package/lib/src/auth.js.map +1 -1
  105. package/lib/src/css-variables.d.ts +8 -0
  106. package/lib/src/css-variables.d.ts.map +1 -1
  107. package/lib/src/embed/base.d.ts.map +1 -1
  108. package/lib/src/embed/base.js +2 -2
  109. package/lib/src/embed/base.js.map +1 -1
  110. package/lib/src/embed/base.spec.js +24 -0
  111. package/lib/src/embed/base.spec.js.map +1 -1
  112. package/lib/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
  113. package/lib/src/embed/hostEventClient/host-event-client.js +8 -3
  114. package/lib/src/embed/hostEventClient/host-event-client.js.map +1 -1
  115. package/lib/src/embed/hostEventClient/host-event-client.spec.js +54 -0
  116. package/lib/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
  117. package/lib/src/embed/searchEmbed-basic-auth.spec.d.ts +2 -0
  118. package/lib/src/embed/searchEmbed-basic-auth.spec.d.ts.map +1 -0
  119. package/lib/src/embed/searchEmbed-basic-auth.spec.js +101 -0
  120. package/lib/src/embed/searchEmbed-basic-auth.spec.js.map +1 -0
  121. package/lib/src/hostEventsTypeMapping.d.ts +2 -0
  122. package/lib/src/hostEventsTypeMapping.d.ts.map +1 -0
  123. package/lib/src/hostEventsTypeMapping.js +2 -0
  124. package/lib/src/hostEventsTypeMapping.js.map +1 -0
  125. package/lib/src/types.d.ts +72 -8
  126. package/lib/src/types.d.ts.map +1 -1
  127. package/lib/src/types.js +72 -8
  128. package/lib/src/types.js.map +1 -1
  129. package/lib/src/utils/embedApi/contracts.d.ts +101 -0
  130. package/lib/src/utils/embedApi/contracts.d.ts.map +1 -0
  131. package/lib/src/utils/embedApi/contracts.js +14 -0
  132. package/lib/src/utils/embedApi/contracts.js.map +1 -0
  133. package/lib/src/utils/embedApi/embedApiClient.d.ts +12 -0
  134. package/lib/src/utils/embedApi/embedApiClient.d.ts.map +1 -0
  135. package/lib/src/utils/embedApi/embedApiClient.js +42 -0
  136. package/lib/src/utils/embedApi/embedApiClient.js.map +1 -0
  137. package/lib/src/utils/embedApi/processEmbedApi.d.ts +9 -0
  138. package/lib/src/utils/embedApi/processEmbedApi.d.ts.map +1 -0
  139. package/lib/src/utils/embedApi/processEmbedApi.js +14 -0
  140. package/lib/src/utils/embedApi/processEmbedApi.js.map +1 -0
  141. package/lib/src/utils/resetServices.d.ts +8 -0
  142. package/lib/src/utils/resetServices.d.ts.map +1 -0
  143. package/lib/src/utils/resetServices.js +14 -0
  144. package/lib/src/utils/resetServices.js.map +1 -0
  145. package/lib/src/utils/resetServices.spec.d.ts +2 -0
  146. package/lib/src/utils/resetServices.spec.d.ts.map +1 -0
  147. package/lib/src/utils/resetServices.spec.js +15 -0
  148. package/lib/src/utils/resetServices.spec.js.map +1 -0
  149. package/lib/src/utils/sessionInfoService.d.ts +14 -2
  150. package/lib/src/utils/sessionInfoService.d.ts.map +1 -1
  151. package/lib/src/utils/sessionInfoService.js +16 -2
  152. package/lib/src/utils/sessionInfoService.js.map +1 -1
  153. package/lib/src/visual-embed-sdk.d.ts +94 -10
  154. package/package.json +1 -1
  155. package/src/auth.ts +3 -2
  156. package/src/css-variables.ts +10 -0
  157. package/src/embed/base.spec.ts +26 -0
  158. package/src/embed/base.ts +2 -2
  159. package/src/embed/hostEventClient/host-event-client.spec.ts +61 -0
  160. package/src/embed/hostEventClient/host-event-client.ts +8 -3
  161. package/src/types.ts +72 -8
  162. package/src/utils/resetServices.spec.ts +15 -0
  163. package/src/utils/resetServices.ts +14 -0
  164. package/src/utils/sessionInfoService.ts +17 -2
@@ -1,4 +1,4 @@
1
- /* @thoughtspot/visual-embed-sdk version 1.36.0 */
1
+ /* @thoughtspot/visual-embed-sdk version 1.36.2 */
2
2
  import * as React from 'react';
3
3
  import React__default from 'react';
4
4
 
@@ -2057,16 +2057,63 @@ var HostEvent;
2057
2057
  */
2058
2058
  HostEvent["getExportRequestForCurrentPinboard"] = "getExportRequestForCurrentPinboard";
2059
2059
  /**
2060
- * Trigger the **Pin** action on an embedded object
2061
- * @param - Liveboard embed takes the `vizId` as a
2062
- * key. Can be left undefined when embedding Search, full app, or
2063
- * a visualization.
2060
+ * Trigger **Pin** action on an embedded object.
2061
+ * If no parameters are defined, the pin action is triggered
2062
+ * for the Answer that the user is currently on
2063
+ * and a modal opens for Liveboard selection.
2064
+ * To add an Answer or visualization to a Liveboard programmatically without
2065
+ * showing requiring additional user input via *Pin to Liveboard* modal, define
2066
+ * the following parameters:
2067
+ *
2068
+ * @param
2069
+ * `vizId`- GUID of the saved Answer or visualization to pin to a Liveboard.
2070
+ * Optional when pinning a new chart or table generated from a Search query.
2071
+ * @param
2072
+ * `liveboardID` - GUID of the Liveboard to pin an Answer. If there is no Liveboard,
2073
+ * specify the `newLiveboardName` parameter to create a new Liveboard.
2074
+ * @param
2075
+ * `tabId` - GUID of the Liveboard tab. Adds the Answer to the Liveboard tab
2076
+ * specified in the code.
2077
+ * @param
2078
+ * `newVizName` - Name string for the Answer or visualization. If defined,
2079
+ * this parameter adds a new visualization object or creates a copy of the
2080
+ * Answer or visualization specified in `vizId`.
2081
+ * Required attribute.
2082
+ * @param
2083
+ * `newLiveboardName` - Name string for the Liveboard.
2084
+ * Creates a new Liveboard object with the specified name.
2085
+ * @param
2086
+ * `newTabName` - Name of the tab. Adds a new tab Liveboard specified
2087
+ * in the code.
2088
+ *
2064
2089
  * @example
2065
2090
  * ```js
2066
- * appEmbed.trigger(HostEvent.Pin)
2091
+ * const pinResponse = await appEmbed.trigger(HostEvent.Pin, {
2092
+ * vizId: "123",
2093
+ * newVizName: "Sales by region",
2094
+ * liveboardId: "123",
2095
+ * tabId: "123"
2096
+ * });
2097
+ * ```
2098
+ * @example
2099
+ * ```js
2100
+ * const pinResponse = await appEmbed.trigger(HostEvent.Pin, {
2101
+ * newVizName: "Total sales of Jackets",
2102
+ * liveboardId: "123"
2103
+ * });
2104
+ * ```
2105
+ *
2106
+ * @example
2107
+ * ```js
2108
+ * const pinResponse = await searchEmbed.trigger(HostEvent.Pin, {
2109
+ * newVizName: "Sales by state",
2110
+ * newLiveboardName: "Sales",
2111
+ * newTabName: "Products"
2112
+ * });
2067
2113
  * ```
2114
+ * @example
2068
2115
  * ```js
2069
- * searchEmbed.trigger(HostEvent.Pin)
2116
+ * appEmbed.trigger(HostEvent.Pin)
2070
2117
  * ```
2071
2118
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2072
2119
  */
@@ -2722,8 +2769,25 @@ var HostEvent;
2722
2769
  */
2723
2770
  HostEvent["InfoSuccess"] = "InfoSuccess";
2724
2771
  /**
2725
- * Triggers the action to get the current view of the liveboard
2726
- * @version SDK: 1.36.0 | Thoughtspot: 10.6.0.cl
2772
+ * Trigger the save action for an Answer.
2773
+ * To programmatically save an answer without opening the
2774
+ * *Describe your Answer* modal, define the `name` and `description`
2775
+ * properties.
2776
+ * If no parameters are specified, the save action is
2777
+ * triggered with a modal to prompt users to
2778
+ * add a name and description for the Answer.
2779
+ * @param - optional attributes to set Answer properties.
2780
+ * `name` - Name string for the Answer.
2781
+ * `description` - Description text for the Answer.
2782
+ *
2783
+ * @example
2784
+ * ```js
2785
+ * const saveAnswerResponse = await searchEmbed.trigger(HostEvent.SaveAnswer, {
2786
+ * name: "Sales by states",
2787
+ * description: "Total sales by states in MidWest"
2788
+ * });
2789
+ * ```
2790
+ * @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
2727
2791
  */
2728
2792
  HostEvent["SaveAnswer"] = "saveAnswer";
2729
2793
  /**
@@ -7339,7 +7403,7 @@ class AnswerService {
7339
7403
  async getTML() {
7340
7404
  const { object } = await this.executeQuery(getAnswerTML, {});
7341
7405
  const edoc = object[0].edoc;
7342
- const YAML = await import('./index-V2oBuwy6.js');
7406
+ const YAML = await import('./index-DpuhnTj2.js');
7343
7407
  const parsedDoc = YAML.parse(edoc);
7344
7408
  return {
7345
7409
  answer: {
@@ -14199,9 +14263,10 @@ async function getPreauthInfo(allowCache = true) {
14199
14263
  return preauthInfo;
14200
14264
  }
14201
14265
  /**
14202
- * Returns the session info object and caches it for future use.
14266
+ * Returns the cached session info object and caches it for future use.
14203
14267
  * Once fetched the session info object is cached and returned from the cache on
14204
14268
  * subsequent calls.
14269
+ * This cache is cleared when inti is called OR resetCachedSessionInfo is called.
14205
14270
  * @example ```js
14206
14271
  * const sessionInfo = await getSessionInfo();
14207
14272
  * console.log(sessionInfo);
@@ -14778,7 +14843,7 @@ function processEventData(type, e, thoughtSpotHost, containerEl) {
14778
14843
  return e;
14779
14844
  }
14780
14845
 
14781
- var name="@thoughtspot/visual-embed-sdk";var version$1="1.36.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 . --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={algoliasearch:"^4.10.5",classnames:"^2.3.1",eventemitter3:"^4.0.7","gatsby-plugin-vercel":"^1.0.3",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":"^4.6.0","@typescript-eslint/parser":"^4.6.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:"^7.12.1","eslint-config-airbnb-base":"^14.2.0","eslint-config-prettier":"^6.15.0","eslint-import-resolver-typescript":"^2.3.0","eslint-plugin-import":"^2.22.1","eslint-plugin-prettier":"^3.1.4","eslint-plugin-react-hooks":"^4.2.0","eslint-plugin-comment-length":"1.7.3","eslint-plugin-jsdoc":"^46.9.0","fs-extra":"^10.0.0","gh-pages":"6.3.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","node-sass":"^8.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","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^5.3.4"};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};
14846
+ var name="@thoughtspot/visual-embed-sdk";var version$1="1.36.2";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={algoliasearch:"^4.10.5",classnames:"^2.3.1",eventemitter3:"^4.0.7","gatsby-plugin-vercel":"^1.0.3",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":"^4.6.0","@typescript-eslint/parser":"^4.6.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:"^7.12.1","eslint-config-airbnb-base":"^14.2.0","eslint-config-prettier":"^6.15.0","eslint-import-resolver-typescript":"^2.3.0","eslint-plugin-import":"^2.22.1","eslint-plugin-prettier":"^3.1.4","eslint-plugin-react-hooks":"^4.2.0","eslint-plugin-comment-length":"1.7.3","eslint-plugin-jsdoc":"^46.9.0","fs-extra":"^10.0.0","gh-pages":"6.3.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","node-sass":"^8.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","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^5.3.4"};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};
14782
14847
 
14783
14848
  /**
14784
14849
  * Reloads the ThoughtSpot iframe.
@@ -14900,15 +14965,20 @@ class HostEventClient {
14900
14965
  return res;
14901
14966
  }
14902
14967
  async handlePinEvent(payload) {
14968
+ var _a, _b;
14903
14969
  if (!payload || !('newVizName' in payload)) {
14904
14970
  return this.hostEventFallback(HostEvent.Pin, payload);
14905
14971
  }
14906
14972
  const formattedPayload = {
14907
14973
  ...payload,
14908
- pinboardId: payload.liveboardId,
14909
- newPinboardName: payload.newLiveboardName,
14974
+ pinboardId: (_a = payload.liveboardId) !== null && _a !== void 0 ? _a : payload.pinboardId,
14975
+ newPinboardName: (_b = payload.newLiveboardName) !== null && _b !== void 0 ? _b : payload.newPinboardName,
14976
+ };
14977
+ const data = await this.handleHostEventWithParam(UIPassthroughEvent.PinAnswerToLiveboard, formattedPayload);
14978
+ return {
14979
+ ...data,
14980
+ liveboardId: data.pinboardId,
14910
14981
  };
14911
- return this.handleHostEventWithParam(UIPassthroughEvent.PinAnswerToLiveboard, formattedPayload);
14912
14982
  }
14913
14983
  async handleSaveAnswerEvent(payload) {
14914
14984
  var _a, _b, _c, _d;
@@ -1,4 +1,4 @@
1
- /* @thoughtspot/visual-embed-sdk version 1.36.0 */
1
+ /* @thoughtspot/visual-embed-sdk version 1.36.2 */
2
2
  (function (global, factory) {
3
3
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) :
4
4
  typeof define === 'function' && define.amd ? define(['exports', 'react'], factory) :
@@ -2079,16 +2079,63 @@
2079
2079
  */
2080
2080
  HostEvent["getExportRequestForCurrentPinboard"] = "getExportRequestForCurrentPinboard";
2081
2081
  /**
2082
- * Trigger the **Pin** action on an embedded object
2083
- * @param - Liveboard embed takes the `vizId` as a
2084
- * key. Can be left undefined when embedding Search, full app, or
2085
- * a visualization.
2082
+ * Trigger **Pin** action on an embedded object.
2083
+ * If no parameters are defined, the pin action is triggered
2084
+ * for the Answer that the user is currently on
2085
+ * and a modal opens for Liveboard selection.
2086
+ * To add an Answer or visualization to a Liveboard programmatically without
2087
+ * showing requiring additional user input via *Pin to Liveboard* modal, define
2088
+ * the following parameters:
2089
+ *
2090
+ * @param
2091
+ * `vizId`- GUID of the saved Answer or visualization to pin to a Liveboard.
2092
+ * Optional when pinning a new chart or table generated from a Search query.
2093
+ * @param
2094
+ * `liveboardID` - GUID of the Liveboard to pin an Answer. If there is no Liveboard,
2095
+ * specify the `newLiveboardName` parameter to create a new Liveboard.
2096
+ * @param
2097
+ * `tabId` - GUID of the Liveboard tab. Adds the Answer to the Liveboard tab
2098
+ * specified in the code.
2099
+ * @param
2100
+ * `newVizName` - Name string for the Answer or visualization. If defined,
2101
+ * this parameter adds a new visualization object or creates a copy of the
2102
+ * Answer or visualization specified in `vizId`.
2103
+ * Required attribute.
2104
+ * @param
2105
+ * `newLiveboardName` - Name string for the Liveboard.
2106
+ * Creates a new Liveboard object with the specified name.
2107
+ * @param
2108
+ * `newTabName` - Name of the tab. Adds a new tab Liveboard specified
2109
+ * in the code.
2110
+ *
2086
2111
  * @example
2087
2112
  * ```js
2088
- * appEmbed.trigger(HostEvent.Pin)
2113
+ * const pinResponse = await appEmbed.trigger(HostEvent.Pin, {
2114
+ * vizId: "123",
2115
+ * newVizName: "Sales by region",
2116
+ * liveboardId: "123",
2117
+ * tabId: "123"
2118
+ * });
2119
+ * ```
2120
+ * @example
2121
+ * ```js
2122
+ * const pinResponse = await appEmbed.trigger(HostEvent.Pin, {
2123
+ * newVizName: "Total sales of Jackets",
2124
+ * liveboardId: "123"
2125
+ * });
2126
+ * ```
2127
+ *
2128
+ * @example
2129
+ * ```js
2130
+ * const pinResponse = await searchEmbed.trigger(HostEvent.Pin, {
2131
+ * newVizName: "Sales by state",
2132
+ * newLiveboardName: "Sales",
2133
+ * newTabName: "Products"
2134
+ * });
2089
2135
  * ```
2136
+ * @example
2090
2137
  * ```js
2091
- * searchEmbed.trigger(HostEvent.Pin)
2138
+ * appEmbed.trigger(HostEvent.Pin)
2092
2139
  * ```
2093
2140
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2094
2141
  */
@@ -2744,8 +2791,25 @@
2744
2791
  */
2745
2792
  HostEvent["InfoSuccess"] = "InfoSuccess";
2746
2793
  /**
2747
- * Triggers the action to get the current view of the liveboard
2748
- * @version SDK: 1.36.0 | Thoughtspot: 10.6.0.cl
2794
+ * Trigger the save action for an Answer.
2795
+ * To programmatically save an answer without opening the
2796
+ * *Describe your Answer* modal, define the `name` and `description`
2797
+ * properties.
2798
+ * If no parameters are specified, the save action is
2799
+ * triggered with a modal to prompt users to
2800
+ * add a name and description for the Answer.
2801
+ * @param - optional attributes to set Answer properties.
2802
+ * `name` - Name string for the Answer.
2803
+ * `description` - Description text for the Answer.
2804
+ *
2805
+ * @example
2806
+ * ```js
2807
+ * const saveAnswerResponse = await searchEmbed.trigger(HostEvent.SaveAnswer, {
2808
+ * name: "Sales by states",
2809
+ * description: "Total sales by states in MidWest"
2810
+ * });
2811
+ * ```
2812
+ * @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
2749
2813
  */
2750
2814
  HostEvent["SaveAnswer"] = "saveAnswer";
2751
2815
  /**
@@ -14221,9 +14285,10 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
14221
14285
  return preauthInfo;
14222
14286
  }
14223
14287
  /**
14224
- * Returns the session info object and caches it for future use.
14288
+ * Returns the cached session info object and caches it for future use.
14225
14289
  * Once fetched the session info object is cached and returned from the cache on
14226
14290
  * subsequent calls.
14291
+ * This cache is cleared when inti is called OR resetCachedSessionInfo is called.
14227
14292
  * @example ```js
14228
14293
  * const sessionInfo = await getSessionInfo();
14229
14294
  * console.log(sessionInfo);
@@ -14800,7 +14865,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
14800
14865
  return e;
14801
14866
  }
14802
14867
 
14803
- var name="@thoughtspot/visual-embed-sdk";var version$1="1.36.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 . --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={algoliasearch:"^4.10.5",classnames:"^2.3.1",eventemitter3:"^4.0.7","gatsby-plugin-vercel":"^1.0.3",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":"^4.6.0","@typescript-eslint/parser":"^4.6.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:"^7.12.1","eslint-config-airbnb-base":"^14.2.0","eslint-config-prettier":"^6.15.0","eslint-import-resolver-typescript":"^2.3.0","eslint-plugin-import":"^2.22.1","eslint-plugin-prettier":"^3.1.4","eslint-plugin-react-hooks":"^4.2.0","eslint-plugin-comment-length":"1.7.3","eslint-plugin-jsdoc":"^46.9.0","fs-extra":"^10.0.0","gh-pages":"6.3.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","node-sass":"^8.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","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^5.3.4"};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:"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};
14868
+ var name="@thoughtspot/visual-embed-sdk";var version$1="1.36.2";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 | 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={algoliasearch:"^4.10.5",classnames:"^2.3.1",eventemitter3:"^4.0.7","gatsby-plugin-vercel":"^1.0.3",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":"^4.6.0","@typescript-eslint/parser":"^4.6.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:"^7.12.1","eslint-config-airbnb-base":"^14.2.0","eslint-config-prettier":"^6.15.0","eslint-import-resolver-typescript":"^2.3.0","eslint-plugin-import":"^2.22.1","eslint-plugin-prettier":"^3.1.4","eslint-plugin-react-hooks":"^4.2.0","eslint-plugin-comment-length":"1.7.3","eslint-plugin-jsdoc":"^46.9.0","fs-extra":"^10.0.0","gh-pages":"6.3.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","node-sass":"^8.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","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^5.3.4"};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:"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};
14804
14869
 
14805
14870
  /**
14806
14871
  * Reloads the ThoughtSpot iframe.
@@ -14922,15 +14987,20 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
14922
14987
  return res;
14923
14988
  }
14924
14989
  async handlePinEvent(payload) {
14990
+ var _a, _b;
14925
14991
  if (!payload || !('newVizName' in payload)) {
14926
14992
  return this.hostEventFallback(exports.HostEvent.Pin, payload);
14927
14993
  }
14928
14994
  const formattedPayload = {
14929
14995
  ...payload,
14930
- pinboardId: payload.liveboardId,
14931
- newPinboardName: payload.newLiveboardName,
14996
+ pinboardId: (_a = payload.liveboardId) !== null && _a !== void 0 ? _a : payload.pinboardId,
14997
+ newPinboardName: (_b = payload.newLiveboardName) !== null && _b !== void 0 ? _b : payload.newPinboardName,
14998
+ };
14999
+ const data = await this.handleHostEventWithParam(UIPassthroughEvent.PinAnswerToLiveboard, formattedPayload);
15000
+ return {
15001
+ ...data,
15002
+ liveboardId: data.pinboardId,
14932
15003
  };
14933
- return this.handleHostEventWithParam(UIPassthroughEvent.PinAnswerToLiveboard, formattedPayload);
14934
15004
  }
14935
15005
  async handleSaveAnswerEvent(payload) {
14936
15006
  var _a, _b, _c, _d;
@@ -1,4 +1,4 @@
1
- /* @thoughtspot/visual-embed-sdk version 1.36.0 */
1
+ /* @thoughtspot/visual-embed-sdk version 1.36.2 */
2
2
  function _mergeNamespaces(n, m) {
3
3
  m.forEach(function (e) {
4
4
  e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) {
@@ -1942,16 +1942,63 @@ var HostEvent;
1942
1942
  */
1943
1943
  HostEvent["getExportRequestForCurrentPinboard"] = "getExportRequestForCurrentPinboard";
1944
1944
  /**
1945
- * Trigger the **Pin** action on an embedded object
1946
- * @param - Liveboard embed takes the `vizId` as a
1947
- * key. Can be left undefined when embedding Search, full app, or
1948
- * a visualization.
1945
+ * Trigger **Pin** action on an embedded object.
1946
+ * If no parameters are defined, the pin action is triggered
1947
+ * for the Answer that the user is currently on
1948
+ * and a modal opens for Liveboard selection.
1949
+ * To add an Answer or visualization to a Liveboard programmatically without
1950
+ * showing requiring additional user input via *Pin to Liveboard* modal, define
1951
+ * the following parameters:
1952
+ *
1953
+ * @param
1954
+ * `vizId`- GUID of the saved Answer or visualization to pin to a Liveboard.
1955
+ * Optional when pinning a new chart or table generated from a Search query.
1956
+ * @param
1957
+ * `liveboardID` - GUID of the Liveboard to pin an Answer. If there is no Liveboard,
1958
+ * specify the `newLiveboardName` parameter to create a new Liveboard.
1959
+ * @param
1960
+ * `tabId` - GUID of the Liveboard tab. Adds the Answer to the Liveboard tab
1961
+ * specified in the code.
1962
+ * @param
1963
+ * `newVizName` - Name string for the Answer or visualization. If defined,
1964
+ * this parameter adds a new visualization object or creates a copy of the
1965
+ * Answer or visualization specified in `vizId`.
1966
+ * Required attribute.
1967
+ * @param
1968
+ * `newLiveboardName` - Name string for the Liveboard.
1969
+ * Creates a new Liveboard object with the specified name.
1970
+ * @param
1971
+ * `newTabName` - Name of the tab. Adds a new tab Liveboard specified
1972
+ * in the code.
1973
+ *
1949
1974
  * @example
1950
1975
  * ```js
1951
- * appEmbed.trigger(HostEvent.Pin)
1976
+ * const pinResponse = await appEmbed.trigger(HostEvent.Pin, {
1977
+ * vizId: "123",
1978
+ * newVizName: "Sales by region",
1979
+ * liveboardId: "123",
1980
+ * tabId: "123"
1981
+ * });
1982
+ * ```
1983
+ * @example
1984
+ * ```js
1985
+ * const pinResponse = await appEmbed.trigger(HostEvent.Pin, {
1986
+ * newVizName: "Total sales of Jackets",
1987
+ * liveboardId: "123"
1988
+ * });
1989
+ * ```
1990
+ *
1991
+ * @example
1992
+ * ```js
1993
+ * const pinResponse = await searchEmbed.trigger(HostEvent.Pin, {
1994
+ * newVizName: "Sales by state",
1995
+ * newLiveboardName: "Sales",
1996
+ * newTabName: "Products"
1997
+ * });
1952
1998
  * ```
1999
+ * @example
1953
2000
  * ```js
1954
- * searchEmbed.trigger(HostEvent.Pin)
2001
+ * appEmbed.trigger(HostEvent.Pin)
1955
2002
  * ```
1956
2003
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1957
2004
  */
@@ -2607,8 +2654,25 @@ var HostEvent;
2607
2654
  */
2608
2655
  HostEvent["InfoSuccess"] = "InfoSuccess";
2609
2656
  /**
2610
- * Triggers the action to get the current view of the liveboard
2611
- * @version SDK: 1.36.0 | Thoughtspot: 10.6.0.cl
2657
+ * Trigger the save action for an Answer.
2658
+ * To programmatically save an answer without opening the
2659
+ * *Describe your Answer* modal, define the `name` and `description`
2660
+ * properties.
2661
+ * If no parameters are specified, the save action is
2662
+ * triggered with a modal to prompt users to
2663
+ * add a name and description for the Answer.
2664
+ * @param - optional attributes to set Answer properties.
2665
+ * `name` - Name string for the Answer.
2666
+ * `description` - Description text for the Answer.
2667
+ *
2668
+ * @example
2669
+ * ```js
2670
+ * const saveAnswerResponse = await searchEmbed.trigger(HostEvent.SaveAnswer, {
2671
+ * name: "Sales by states",
2672
+ * description: "Total sales by states in MidWest"
2673
+ * });
2674
+ * ```
2675
+ * @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
2612
2676
  */
2613
2677
  HostEvent["SaveAnswer"] = "saveAnswer";
2614
2678
  /**
@@ -7238,7 +7302,7 @@ class AnswerService {
7238
7302
  async getTML() {
7239
7303
  const { object } = await this.executeQuery(getAnswerTML, {});
7240
7304
  const edoc = object[0].edoc;
7241
- const YAML = await import('./index-V2oBuwy6.js');
7305
+ const YAML = await import('./index-DpuhnTj2.js');
7242
7306
  const parsedDoc = YAML.parse(edoc);
7243
7307
  return {
7244
7308
  answer: {
@@ -14156,9 +14220,10 @@ async function getPreauthInfo(allowCache = true) {
14156
14220
  return preauthInfo;
14157
14221
  }
14158
14222
  /**
14159
- * Returns the session info object and caches it for future use.
14223
+ * Returns the cached session info object and caches it for future use.
14160
14224
  * Once fetched the session info object is cached and returned from the cache on
14161
14225
  * subsequent calls.
14226
+ * This cache is cleared when inti is called OR resetCachedSessionInfo is called.
14162
14227
  * @example ```js
14163
14228
  * const sessionInfo = await getSessionInfo();
14164
14229
  * console.log(sessionInfo);
@@ -14201,7 +14266,45 @@ const getSessionDetails = (sessionInfoResp) => {
14201
14266
  clusterName: sessionInfoResp.configInfo.selfClusterName,
14202
14267
  ...sessionInfoResp,
14203
14268
  };
14204
- };
14269
+ };
14270
+ /**
14271
+ * Resets the cached session info object and forces a new fetch on the next call.
14272
+ * @example ```js
14273
+ * resetCachedSessionInfo();
14274
+ * const sessionInfo = await getSessionInfo();
14275
+ * console.log(sessionInfo);
14276
+ * ```
14277
+ * @version SDK: 1.28.3 | ThoughtSpot: *
14278
+ * @returns {void}
14279
+ */
14280
+ function resetCachedSessionInfo() {
14281
+ sessionInfo = null;
14282
+ }
14283
+ /**
14284
+ * Resets the cached preauth info object and forces a new fetch on the next call.
14285
+ * @example ```js
14286
+ * resetCachedPreauthInfo();
14287
+ * const preauthInfo = await getPreauthInfo();
14288
+ * console.log(preauthInfo);
14289
+ * ```
14290
+ * @version SDK: 1.28.3 | ThoughtSpot: *
14291
+ * @returns {void}
14292
+ */
14293
+ function resetCachedPreauthInfo() {
14294
+ preauthInfo = null;
14295
+ }
14296
+
14297
+ /**
14298
+ * This function resets all the services that are cached in the SDK.
14299
+ * This is to be called when the user logs out of the application and also
14300
+ * when init is called again.
14301
+ * @version SDK: 1.30.2 | ThoughtSpot: *
14302
+ */
14303
+ function resetAllCachedServices() {
14304
+ resetCachedAuthToken();
14305
+ resetCachedSessionInfo();
14306
+ resetCachedPreauthInfo();
14307
+ }
14205
14308
 
14206
14309
  // eslint-disable-next-line import/no-mutable-exports
14207
14310
  let loggedInStatus = false;
@@ -14563,7 +14666,7 @@ const doOIDCAuth = async (embedConfig) => {
14563
14666
  const logout$1 = async (embedConfig) => {
14564
14667
  const { thoughtSpotHost } = embedConfig;
14565
14668
  await fetchLogoutService(thoughtSpotHost);
14566
- resetCachedAuthToken();
14669
+ resetAllCachedServices();
14567
14670
  const thoughtspotIframes = document.querySelectorAll("[data-ts-iframe='true']");
14568
14671
  if (thoughtspotIframes === null || thoughtspotIframes === void 0 ? void 0 : thoughtspotIframes.length) {
14569
14672
  thoughtspotIframes.forEach((el) => {
@@ -14728,7 +14831,7 @@ function backwardCompat(embedConfig) {
14728
14831
  const init = (embedConfig) => {
14729
14832
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
14730
14833
  sanity(embedConfig);
14731
- resetCachedAuthToken();
14834
+ resetAllCachedServices();
14732
14835
  embedConfig = setEmbedConfig(backwardCompat({
14733
14836
  ...CONFIG_DEFAULTS,
14734
14837
  ...embedConfig,
@@ -15021,7 +15124,7 @@ function processEventData(type, e, thoughtSpotHost, containerEl) {
15021
15124
  return e;
15022
15125
  }
15023
15126
 
15024
- var name="@thoughtspot/visual-embed-sdk";var version$1="1.36.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 . --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={algoliasearch:"^4.10.5",classnames:"^2.3.1",eventemitter3:"^4.0.7","gatsby-plugin-vercel":"^1.0.3",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":"^4.6.0","@typescript-eslint/parser":"^4.6.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:"^7.12.1","eslint-config-airbnb-base":"^14.2.0","eslint-config-prettier":"^6.15.0","eslint-import-resolver-typescript":"^2.3.0","eslint-plugin-import":"^2.22.1","eslint-plugin-prettier":"^3.1.4","eslint-plugin-react-hooks":"^4.2.0","eslint-plugin-comment-length":"1.7.3","eslint-plugin-jsdoc":"^46.9.0","fs-extra":"^10.0.0","gh-pages":"6.3.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","node-sass":"^8.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","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^5.3.4"};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};
15127
+ var name="@thoughtspot/visual-embed-sdk";var version$1="1.36.2";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={algoliasearch:"^4.10.5",classnames:"^2.3.1",eventemitter3:"^4.0.7","gatsby-plugin-vercel":"^1.0.3",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":"^4.6.0","@typescript-eslint/parser":"^4.6.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:"^7.12.1","eslint-config-airbnb-base":"^14.2.0","eslint-config-prettier":"^6.15.0","eslint-import-resolver-typescript":"^2.3.0","eslint-plugin-import":"^2.22.1","eslint-plugin-prettier":"^3.1.4","eslint-plugin-react-hooks":"^4.2.0","eslint-plugin-comment-length":"1.7.3","eslint-plugin-jsdoc":"^46.9.0","fs-extra":"^10.0.0","gh-pages":"6.3.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","node-sass":"^8.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","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^5.3.4"};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};
15025
15128
 
15026
15129
  /**
15027
15130
  * Reloads the ThoughtSpot iframe.
@@ -15143,15 +15246,20 @@ class HostEventClient {
15143
15246
  return res;
15144
15247
  }
15145
15248
  async handlePinEvent(payload) {
15249
+ var _a, _b;
15146
15250
  if (!payload || !('newVizName' in payload)) {
15147
15251
  return this.hostEventFallback(HostEvent.Pin, payload);
15148
15252
  }
15149
15253
  const formattedPayload = {
15150
15254
  ...payload,
15151
- pinboardId: payload.liveboardId,
15152
- newPinboardName: payload.newLiveboardName,
15255
+ pinboardId: (_a = payload.liveboardId) !== null && _a !== void 0 ? _a : payload.pinboardId,
15256
+ newPinboardName: (_b = payload.newLiveboardName) !== null && _b !== void 0 ? _b : payload.newPinboardName,
15257
+ };
15258
+ const data = await this.handleHostEventWithParam(UIPassthroughEvent.PinAnswerToLiveboard, formattedPayload);
15259
+ return {
15260
+ ...data,
15261
+ liveboardId: data.pinboardId,
15153
15262
  };
15154
- return this.handleHostEventWithParam(UIPassthroughEvent.PinAnswerToLiveboard, formattedPayload);
15155
15263
  }
15156
15264
  async handleSaveAnswerEvent(payload) {
15157
15265
  var _a, _b, _c, _d;