@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.
- package/cjs/package.json +1 -1
- package/cjs/src/auth.d.ts.map +1 -1
- package/cjs/src/auth.js +2 -1
- package/cjs/src/auth.js.map +1 -1
- package/cjs/src/css-variables.d.ts +8 -0
- package/cjs/src/css-variables.d.ts.map +1 -1
- package/cjs/src/embed/base.d.ts.map +1 -1
- package/cjs/src/embed/base.js +2 -2
- package/cjs/src/embed/base.js.map +1 -1
- package/cjs/src/embed/base.spec.js +24 -0
- package/cjs/src/embed/base.spec.js.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.js +8 -3
- package/cjs/src/embed/hostEventClient/host-event-client.js.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.spec.js +54 -0
- package/cjs/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
- package/cjs/src/embed/searchEmbed-basic-auth.spec.d.ts +2 -0
- package/cjs/src/embed/searchEmbed-basic-auth.spec.d.ts.map +1 -0
- package/cjs/src/embed/searchEmbed-basic-auth.spec.js +104 -0
- package/cjs/src/embed/searchEmbed-basic-auth.spec.js.map +1 -0
- package/cjs/src/hostEventsTypeMapping.d.ts +2 -0
- package/cjs/src/hostEventsTypeMapping.d.ts.map +1 -0
- package/cjs/src/hostEventsTypeMapping.js +4 -0
- package/cjs/src/hostEventsTypeMapping.js.map +1 -0
- package/cjs/src/types.d.ts +72 -8
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +72 -8
- package/cjs/src/types.js.map +1 -1
- package/cjs/src/utils/embedApi/contracts.d.ts +101 -0
- package/cjs/src/utils/embedApi/contracts.d.ts.map +1 -0
- package/cjs/src/utils/embedApi/contracts.js +17 -0
- package/cjs/src/utils/embedApi/contracts.js.map +1 -0
- package/cjs/src/utils/embedApi/embedApiClient.d.ts +12 -0
- package/cjs/src/utils/embedApi/embedApiClient.d.ts.map +1 -0
- package/cjs/src/utils/embedApi/embedApiClient.js +46 -0
- package/cjs/src/utils/embedApi/embedApiClient.js.map +1 -0
- package/cjs/src/utils/embedApi/processEmbedApi.d.ts +9 -0
- package/cjs/src/utils/embedApi/processEmbedApi.d.ts.map +1 -0
- package/cjs/src/utils/embedApi/processEmbedApi.js +18 -0
- package/cjs/src/utils/embedApi/processEmbedApi.js.map +1 -0
- package/cjs/src/utils/resetServices.d.ts +8 -0
- package/cjs/src/utils/resetServices.d.ts.map +1 -0
- package/cjs/src/utils/resetServices.js +18 -0
- package/cjs/src/utils/resetServices.js.map +1 -0
- package/cjs/src/utils/resetServices.spec.d.ts +2 -0
- package/cjs/src/utils/resetServices.spec.d.ts.map +1 -0
- package/cjs/src/utils/resetServices.spec.js +18 -0
- package/cjs/src/utils/resetServices.spec.js.map +1 -0
- package/cjs/src/utils/sessionInfoService.d.ts +14 -2
- package/cjs/src/utils/sessionInfoService.d.ts.map +1 -1
- package/cjs/src/utils/sessionInfoService.js +18 -3
- package/cjs/src/utils/sessionInfoService.js.map +1 -1
- package/dist/{index-V2oBuwy6.js → index-B3hd6DTM.js} +1 -1
- package/dist/index-BBBimG1x.js +7370 -0
- package/dist/index-BGnxP5NY.js +7370 -0
- package/dist/index-CENLvayL.js +7370 -0
- package/dist/index-CR5u7BMC.js +7370 -0
- package/dist/index-CbltIawo.js +7370 -0
- package/dist/index-CoQfqaHj.js +7370 -0
- package/dist/index-CzwzS0P4.js +7370 -0
- package/dist/index-D-9WUCUl.js +7370 -0
- package/dist/index-DFwi_pV_.js +7370 -0
- package/dist/index-DOIjN0N_.js +7370 -0
- package/dist/index-DYBx8SuE.js +7370 -0
- package/dist/index-DaLHJaLd.js +7370 -0
- package/dist/index-DnJX-gN2.js +7370 -0
- package/dist/index-DpuhnTj2.js +7370 -0
- package/dist/index-IDmSUe93.js +7370 -0
- package/dist/index-nWevLycs.js +7370 -0
- package/dist/index-vxW97_xb.js +7370 -0
- package/dist/src/auth.d.ts.map +1 -1
- package/dist/src/css-variables.d.ts +8 -0
- package/dist/src/css-variables.d.ts.map +1 -1
- package/dist/src/embed/base.d.ts.map +1 -1
- package/dist/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/dist/src/embed/searchEmbed-basic-auth.spec.d.ts +2 -0
- package/dist/src/embed/searchEmbed-basic-auth.spec.d.ts.map +1 -0
- package/dist/src/hostEventsTypeMapping.d.ts +2 -0
- package/dist/src/hostEventsTypeMapping.d.ts.map +1 -0
- package/dist/src/types.d.ts +72 -8
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/embedApi/contracts.d.ts +101 -0
- package/dist/src/utils/embedApi/contracts.d.ts.map +1 -0
- package/dist/src/utils/embedApi/embedApiClient.d.ts +12 -0
- package/dist/src/utils/embedApi/embedApiClient.d.ts.map +1 -0
- package/dist/src/utils/embedApi/processEmbedApi.d.ts +9 -0
- package/dist/src/utils/embedApi/processEmbedApi.d.ts.map +1 -0
- package/dist/src/utils/resetServices.d.ts +8 -0
- package/dist/src/utils/resetServices.d.ts.map +1 -0
- package/dist/src/utils/resetServices.spec.d.ts +2 -0
- package/dist/src/utils/resetServices.spec.d.ts.map +1 -0
- package/dist/src/utils/sessionInfoService.d.ts +14 -2
- package/dist/src/utils/sessionInfoService.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +85 -15
- package/dist/tsembed-react.js +84 -14
- package/dist/tsembed.es.js +126 -18
- package/dist/tsembed.js +125 -17
- package/dist/visual-embed-sdk-react-full.d.ts +94 -10
- package/dist/visual-embed-sdk-react.d.ts +94 -10
- package/dist/visual-embed-sdk.d.ts +94 -10
- package/lib/package.json +1 -1
- package/lib/src/auth.d.ts.map +1 -1
- package/lib/src/auth.js +3 -2
- package/lib/src/auth.js.map +1 -1
- package/lib/src/css-variables.d.ts +8 -0
- package/lib/src/css-variables.d.ts.map +1 -1
- package/lib/src/embed/base.d.ts.map +1 -1
- package/lib/src/embed/base.js +2 -2
- package/lib/src/embed/base.js.map +1 -1
- package/lib/src/embed/base.spec.js +24 -0
- package/lib/src/embed/base.spec.js.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.js +8 -3
- package/lib/src/embed/hostEventClient/host-event-client.js.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.spec.js +54 -0
- package/lib/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
- package/lib/src/embed/searchEmbed-basic-auth.spec.d.ts +2 -0
- package/lib/src/embed/searchEmbed-basic-auth.spec.d.ts.map +1 -0
- package/lib/src/embed/searchEmbed-basic-auth.spec.js +101 -0
- package/lib/src/embed/searchEmbed-basic-auth.spec.js.map +1 -0
- package/lib/src/hostEventsTypeMapping.d.ts +2 -0
- package/lib/src/hostEventsTypeMapping.d.ts.map +1 -0
- package/lib/src/hostEventsTypeMapping.js +2 -0
- package/lib/src/hostEventsTypeMapping.js.map +1 -0
- package/lib/src/types.d.ts +72 -8
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +72 -8
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils/embedApi/contracts.d.ts +101 -0
- package/lib/src/utils/embedApi/contracts.d.ts.map +1 -0
- package/lib/src/utils/embedApi/contracts.js +14 -0
- package/lib/src/utils/embedApi/contracts.js.map +1 -0
- package/lib/src/utils/embedApi/embedApiClient.d.ts +12 -0
- package/lib/src/utils/embedApi/embedApiClient.d.ts.map +1 -0
- package/lib/src/utils/embedApi/embedApiClient.js +42 -0
- package/lib/src/utils/embedApi/embedApiClient.js.map +1 -0
- package/lib/src/utils/embedApi/processEmbedApi.d.ts +9 -0
- package/lib/src/utils/embedApi/processEmbedApi.d.ts.map +1 -0
- package/lib/src/utils/embedApi/processEmbedApi.js +14 -0
- package/lib/src/utils/embedApi/processEmbedApi.js.map +1 -0
- package/lib/src/utils/resetServices.d.ts +8 -0
- package/lib/src/utils/resetServices.d.ts.map +1 -0
- package/lib/src/utils/resetServices.js +14 -0
- package/lib/src/utils/resetServices.js.map +1 -0
- package/lib/src/utils/resetServices.spec.d.ts +2 -0
- package/lib/src/utils/resetServices.spec.d.ts.map +1 -0
- package/lib/src/utils/resetServices.spec.js +15 -0
- package/lib/src/utils/resetServices.spec.js.map +1 -0
- package/lib/src/utils/sessionInfoService.d.ts +14 -2
- package/lib/src/utils/sessionInfoService.d.ts.map +1 -1
- package/lib/src/utils/sessionInfoService.js +16 -2
- package/lib/src/utils/sessionInfoService.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +94 -10
- package/package.json +1 -1
- package/src/auth.ts +3 -2
- package/src/css-variables.ts +10 -0
- package/src/embed/base.spec.ts +26 -0
- package/src/embed/base.ts +2 -2
- package/src/embed/hostEventClient/host-event-client.spec.ts +61 -0
- package/src/embed/hostEventClient/host-event-client.ts +8 -3
- package/src/types.ts +72 -8
- package/src/utils/resetServices.spec.ts +15 -0
- package/src/utils/resetServices.ts +14 -0
- package/src/utils/sessionInfoService.ts +17 -2
package/dist/tsembed-react.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @thoughtspot/visual-embed-sdk version 1.36.
|
|
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
|
|
2061
|
-
*
|
|
2062
|
-
*
|
|
2063
|
-
* a
|
|
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
|
-
*
|
|
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
|
-
*
|
|
2726
|
-
*
|
|
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-
|
|
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.
|
|
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;
|
package/dist/tsembed-react.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @thoughtspot/visual-embed-sdk version 1.36.
|
|
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
|
|
2083
|
-
*
|
|
2084
|
-
*
|
|
2085
|
-
* a
|
|
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
|
-
*
|
|
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
|
-
*
|
|
2748
|
-
*
|
|
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.
|
|
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;
|
package/dist/tsembed.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @thoughtspot/visual-embed-sdk version 1.36.
|
|
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
|
|
1946
|
-
*
|
|
1947
|
-
*
|
|
1948
|
-
* a
|
|
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
|
-
*
|
|
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
|
-
*
|
|
2611
|
-
*
|
|
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-
|
|
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
|
-
|
|
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
|
-
|
|
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.
|
|
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;
|