@thoughtspot/visual-embed-sdk 1.36.0 → 1.36.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/package.json +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/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/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-IDmSUe93.js +7370 -0
- package/dist/index-nWevLycs.js +7370 -0
- package/dist/index-vxW97_xb.js +7370 -0
- package/dist/src/css-variables.d.ts +8 -0
- package/dist/src/css-variables.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/tsembed-react.es.js +83 -14
- package/dist/tsembed-react.js +82 -13
- package/dist/tsembed.es.js +83 -14
- package/dist/tsembed.js +82 -13
- package/dist/visual-embed-sdk-react-full.d.ts +80 -8
- package/dist/visual-embed-sdk-react.d.ts +80 -8
- package/dist/visual-embed-sdk.d.ts +80 -8
- package/lib/package.json +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/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/visual-embed-sdk.d.ts +80 -8
- package/package.json +1 -1
- package/src/css-variables.ts +10 -0
- 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/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.1 */
|
|
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
|
+
* });
|
|
2089
2119
|
* ```
|
|
2120
|
+
* @example
|
|
2090
2121
|
* ```js
|
|
2091
|
-
*
|
|
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
|
+
* });
|
|
2135
|
+
* ```
|
|
2136
|
+
* @example
|
|
2137
|
+
* ```js
|
|
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
|
/**
|
|
@@ -14800,7 +14864,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
14800
14864
|
return e;
|
|
14801
14865
|
}
|
|
14802
14866
|
|
|
14803
|
-
var name="@thoughtspot/visual-embed-sdk";var version$1="1.36.
|
|
14867
|
+
var name="@thoughtspot/visual-embed-sdk";var version$1="1.36.1";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports$1={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p . --incremental false; tsc -p . --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts","bundle-dts":"dts-bundle --name ../../dist/visual-embed-sdk --main lib/src/index.d.ts --outputAsModuleFolder=true","bundle-dts-react":"dts-bundle --name ../../../dist/visual-embed-sdk-react --main lib/src/react/index.d.ts --outputAsModuleFolder=true","bundle-dts-react-full":"dts-bundle --name ../../../dist/visual-embed-sdk-react-full --main lib/src/react/all-types-export.d.ts --outputAsModuleFolder=true",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.json --theme typedoc-theme --json static/typedoc/typedoc.json --disableOutputCheck","test-sdk":"jest -c jest.config.sdk.js --runInBand",test:"npm run test-sdk",posttest:"cat ./coverage/sdk/lcov.info | 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
14868
|
|
|
14805
14869
|
/**
|
|
14806
14870
|
* Reloads the ThoughtSpot iframe.
|
|
@@ -14922,15 +14986,20 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
14922
14986
|
return res;
|
|
14923
14987
|
}
|
|
14924
14988
|
async handlePinEvent(payload) {
|
|
14989
|
+
var _a, _b;
|
|
14925
14990
|
if (!payload || !('newVizName' in payload)) {
|
|
14926
14991
|
return this.hostEventFallback(exports.HostEvent.Pin, payload);
|
|
14927
14992
|
}
|
|
14928
14993
|
const formattedPayload = {
|
|
14929
14994
|
...payload,
|
|
14930
|
-
pinboardId: payload.liveboardId,
|
|
14931
|
-
newPinboardName: payload.newLiveboardName,
|
|
14995
|
+
pinboardId: (_a = payload.liveboardId) !== null && _a !== void 0 ? _a : payload.pinboardId,
|
|
14996
|
+
newPinboardName: (_b = payload.newLiveboardName) !== null && _b !== void 0 ? _b : payload.newPinboardName,
|
|
14997
|
+
};
|
|
14998
|
+
const data = await this.handleHostEventWithParam(UIPassthroughEvent.PinAnswerToLiveboard, formattedPayload);
|
|
14999
|
+
return {
|
|
15000
|
+
...data,
|
|
15001
|
+
liveboardId: data.pinboardId,
|
|
14932
15002
|
};
|
|
14933
|
-
return this.handleHostEventWithParam(UIPassthroughEvent.PinAnswerToLiveboard, formattedPayload);
|
|
14934
15003
|
}
|
|
14935
15004
|
async handleSaveAnswerEvent(payload) {
|
|
14936
15005
|
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.1 */
|
|
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
|
+
* });
|
|
1952
1982
|
* ```
|
|
1983
|
+
* @example
|
|
1953
1984
|
* ```js
|
|
1954
|
-
*
|
|
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
|
+
* });
|
|
1998
|
+
* ```
|
|
1999
|
+
* @example
|
|
2000
|
+
* ```js
|
|
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-CR5u7BMC.js');
|
|
7242
7306
|
const parsedDoc = YAML.parse(edoc);
|
|
7243
7307
|
return {
|
|
7244
7308
|
answer: {
|
|
@@ -15021,7 +15085,7 @@ function processEventData(type, e, thoughtSpotHost, containerEl) {
|
|
|
15021
15085
|
return e;
|
|
15022
15086
|
}
|
|
15023
15087
|
|
|
15024
|
-
var name="@thoughtspot/visual-embed-sdk";var version$1="1.36.
|
|
15088
|
+
var name="@thoughtspot/visual-embed-sdk";var version$1="1.36.1";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p . --incremental false; tsc -p . --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts","bundle-dts":"dts-bundle --name ../../dist/visual-embed-sdk --main lib/src/index.d.ts --outputAsModuleFolder=true","bundle-dts-react":"dts-bundle --name ../../../dist/visual-embed-sdk-react --main lib/src/react/index.d.ts --outputAsModuleFolder=true","bundle-dts-react-full":"dts-bundle --name ../../../dist/visual-embed-sdk-react-full --main lib/src/react/all-types-export.d.ts --outputAsModuleFolder=true",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.json --theme typedoc-theme --json static/typedoc/typedoc.json --disableOutputCheck","test-sdk":"jest -c jest.config.sdk.js --runInBand",test:"npm run test-sdk",posttest:"cat ./coverage/sdk/lcov.info | coveralls","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest",dev:"vite -c vite.local.config.ts"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={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
15089
|
|
|
15026
15090
|
/**
|
|
15027
15091
|
* Reloads the ThoughtSpot iframe.
|
|
@@ -15143,15 +15207,20 @@ class HostEventClient {
|
|
|
15143
15207
|
return res;
|
|
15144
15208
|
}
|
|
15145
15209
|
async handlePinEvent(payload) {
|
|
15210
|
+
var _a, _b;
|
|
15146
15211
|
if (!payload || !('newVizName' in payload)) {
|
|
15147
15212
|
return this.hostEventFallback(HostEvent.Pin, payload);
|
|
15148
15213
|
}
|
|
15149
15214
|
const formattedPayload = {
|
|
15150
15215
|
...payload,
|
|
15151
|
-
pinboardId: payload.liveboardId,
|
|
15152
|
-
newPinboardName: payload.newLiveboardName,
|
|
15216
|
+
pinboardId: (_a = payload.liveboardId) !== null && _a !== void 0 ? _a : payload.pinboardId,
|
|
15217
|
+
newPinboardName: (_b = payload.newLiveboardName) !== null && _b !== void 0 ? _b : payload.newPinboardName,
|
|
15218
|
+
};
|
|
15219
|
+
const data = await this.handleHostEventWithParam(UIPassthroughEvent.PinAnswerToLiveboard, formattedPayload);
|
|
15220
|
+
return {
|
|
15221
|
+
...data,
|
|
15222
|
+
liveboardId: data.pinboardId,
|
|
15153
15223
|
};
|
|
15154
|
-
return this.handleHostEventWithParam(UIPassthroughEvent.PinAnswerToLiveboard, formattedPayload);
|
|
15155
15224
|
}
|
|
15156
15225
|
async handleSaveAnswerEvent(payload) {
|
|
15157
15226
|
var _a, _b, _c, _d;
|
package/dist/tsembed.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @thoughtspot/visual-embed-sdk version 1.36.
|
|
1
|
+
/* @thoughtspot/visual-embed-sdk version 1.36.1 */
|
|
2
2
|
(function (global, factory) {
|
|
3
3
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
4
4
|
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
|
@@ -1948,16 +1948,63 @@
|
|
|
1948
1948
|
*/
|
|
1949
1949
|
HostEvent["getExportRequestForCurrentPinboard"] = "getExportRequestForCurrentPinboard";
|
|
1950
1950
|
/**
|
|
1951
|
-
* Trigger
|
|
1952
|
-
*
|
|
1953
|
-
*
|
|
1954
|
-
* a
|
|
1951
|
+
* Trigger **Pin** action on an embedded object.
|
|
1952
|
+
* If no parameters are defined, the pin action is triggered
|
|
1953
|
+
* for the Answer that the user is currently on
|
|
1954
|
+
* and a modal opens for Liveboard selection.
|
|
1955
|
+
* To add an Answer or visualization to a Liveboard programmatically without
|
|
1956
|
+
* showing requiring additional user input via *Pin to Liveboard* modal, define
|
|
1957
|
+
* the following parameters:
|
|
1958
|
+
*
|
|
1959
|
+
* @param
|
|
1960
|
+
* `vizId`- GUID of the saved Answer or visualization to pin to a Liveboard.
|
|
1961
|
+
* Optional when pinning a new chart or table generated from a Search query.
|
|
1962
|
+
* @param
|
|
1963
|
+
* `liveboardID` - GUID of the Liveboard to pin an Answer. If there is no Liveboard,
|
|
1964
|
+
* specify the `newLiveboardName` parameter to create a new Liveboard.
|
|
1965
|
+
* @param
|
|
1966
|
+
* `tabId` - GUID of the Liveboard tab. Adds the Answer to the Liveboard tab
|
|
1967
|
+
* specified in the code.
|
|
1968
|
+
* @param
|
|
1969
|
+
* `newVizName` - Name string for the Answer or visualization. If defined,
|
|
1970
|
+
* this parameter adds a new visualization object or creates a copy of the
|
|
1971
|
+
* Answer or visualization specified in `vizId`.
|
|
1972
|
+
* Required attribute.
|
|
1973
|
+
* @param
|
|
1974
|
+
* `newLiveboardName` - Name string for the Liveboard.
|
|
1975
|
+
* Creates a new Liveboard object with the specified name.
|
|
1976
|
+
* @param
|
|
1977
|
+
* `newTabName` - Name of the tab. Adds a new tab Liveboard specified
|
|
1978
|
+
* in the code.
|
|
1979
|
+
*
|
|
1955
1980
|
* @example
|
|
1956
1981
|
* ```js
|
|
1957
|
-
* appEmbed.trigger(HostEvent.Pin
|
|
1982
|
+
* const pinResponse = await appEmbed.trigger(HostEvent.Pin, {
|
|
1983
|
+
* vizId: "123",
|
|
1984
|
+
* newVizName: "Sales by region",
|
|
1985
|
+
* liveboardId: "123",
|
|
1986
|
+
* tabId: "123"
|
|
1987
|
+
* });
|
|
1958
1988
|
* ```
|
|
1989
|
+
* @example
|
|
1959
1990
|
* ```js
|
|
1960
|
-
*
|
|
1991
|
+
* const pinResponse = await appEmbed.trigger(HostEvent.Pin, {
|
|
1992
|
+
* newVizName: "Total sales of Jackets",
|
|
1993
|
+
* liveboardId: "123"
|
|
1994
|
+
* });
|
|
1995
|
+
* ```
|
|
1996
|
+
*
|
|
1997
|
+
* @example
|
|
1998
|
+
* ```js
|
|
1999
|
+
* const pinResponse = await searchEmbed.trigger(HostEvent.Pin, {
|
|
2000
|
+
* newVizName: "Sales by state",
|
|
2001
|
+
* newLiveboardName: "Sales",
|
|
2002
|
+
* newTabName: "Products"
|
|
2003
|
+
* });
|
|
2004
|
+
* ```
|
|
2005
|
+
* @example
|
|
2006
|
+
* ```js
|
|
2007
|
+
* appEmbed.trigger(HostEvent.Pin)
|
|
1961
2008
|
* ```
|
|
1962
2009
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
1963
2010
|
*/
|
|
@@ -2613,8 +2660,25 @@
|
|
|
2613
2660
|
*/
|
|
2614
2661
|
HostEvent["InfoSuccess"] = "InfoSuccess";
|
|
2615
2662
|
/**
|
|
2616
|
-
*
|
|
2617
|
-
*
|
|
2663
|
+
* Trigger the save action for an Answer.
|
|
2664
|
+
* To programmatically save an answer without opening the
|
|
2665
|
+
* *Describe your Answer* modal, define the `name` and `description`
|
|
2666
|
+
* properties.
|
|
2667
|
+
* If no parameters are specified, the save action is
|
|
2668
|
+
* triggered with a modal to prompt users to
|
|
2669
|
+
* add a name and description for the Answer.
|
|
2670
|
+
* @param - optional attributes to set Answer properties.
|
|
2671
|
+
* `name` - Name string for the Answer.
|
|
2672
|
+
* `description` - Description text for the Answer.
|
|
2673
|
+
*
|
|
2674
|
+
* @example
|
|
2675
|
+
* ```js
|
|
2676
|
+
* const saveAnswerResponse = await searchEmbed.trigger(HostEvent.SaveAnswer, {
|
|
2677
|
+
* name: "Sales by states",
|
|
2678
|
+
* description: "Total sales by states in MidWest"
|
|
2679
|
+
* });
|
|
2680
|
+
* ```
|
|
2681
|
+
* @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
|
|
2618
2682
|
*/
|
|
2619
2683
|
HostEvent["SaveAnswer"] = "saveAnswer";
|
|
2620
2684
|
/**
|
|
@@ -15027,7 +15091,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
15027
15091
|
return e;
|
|
15028
15092
|
}
|
|
15029
15093
|
|
|
15030
|
-
var name="@thoughtspot/visual-embed-sdk";var version$1="1.36.
|
|
15094
|
+
var name="@thoughtspot/visual-embed-sdk";var version$1="1.36.1";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports$1={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p . --incremental false; tsc -p . --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts","bundle-dts":"dts-bundle --name ../../dist/visual-embed-sdk --main lib/src/index.d.ts --outputAsModuleFolder=true","bundle-dts-react":"dts-bundle --name ../../../dist/visual-embed-sdk-react --main lib/src/react/index.d.ts --outputAsModuleFolder=true","bundle-dts-react-full":"dts-bundle --name ../../../dist/visual-embed-sdk-react-full --main lib/src/react/all-types-export.d.ts --outputAsModuleFolder=true",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.json --theme typedoc-theme --json static/typedoc/typedoc.json --disableOutputCheck","test-sdk":"jest -c jest.config.sdk.js --runInBand",test:"npm run test-sdk",posttest:"cat ./coverage/sdk/lcov.info | 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};
|
|
15031
15095
|
|
|
15032
15096
|
/**
|
|
15033
15097
|
* Reloads the ThoughtSpot iframe.
|
|
@@ -15149,15 +15213,20 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
15149
15213
|
return res;
|
|
15150
15214
|
}
|
|
15151
15215
|
async handlePinEvent(payload) {
|
|
15216
|
+
var _a, _b;
|
|
15152
15217
|
if (!payload || !('newVizName' in payload)) {
|
|
15153
15218
|
return this.hostEventFallback(exports.HostEvent.Pin, payload);
|
|
15154
15219
|
}
|
|
15155
15220
|
const formattedPayload = {
|
|
15156
15221
|
...payload,
|
|
15157
|
-
pinboardId: payload.liveboardId,
|
|
15158
|
-
newPinboardName: payload.newLiveboardName,
|
|
15222
|
+
pinboardId: (_a = payload.liveboardId) !== null && _a !== void 0 ? _a : payload.pinboardId,
|
|
15223
|
+
newPinboardName: (_b = payload.newLiveboardName) !== null && _b !== void 0 ? _b : payload.newPinboardName,
|
|
15224
|
+
};
|
|
15225
|
+
const data = await this.handleHostEventWithParam(exports.UIPassthroughEvent.PinAnswerToLiveboard, formattedPayload);
|
|
15226
|
+
return {
|
|
15227
|
+
...data,
|
|
15228
|
+
liveboardId: data.pinboardId,
|
|
15159
15229
|
};
|
|
15160
|
-
return this.handleHostEventWithParam(exports.UIPassthroughEvent.PinAnswerToLiveboard, formattedPayload);
|
|
15161
15230
|
}
|
|
15162
15231
|
async handleSaveAnswerEvent(payload) {
|
|
15163
15232
|
var _a, _b, _c, _d;
|
|
@@ -4858,16 +4858,63 @@ export declare enum HostEvent {
|
|
|
4858
4858
|
*/
|
|
4859
4859
|
getExportRequestForCurrentPinboard = "getExportRequestForCurrentPinboard",
|
|
4860
4860
|
/**
|
|
4861
|
-
* Trigger
|
|
4862
|
-
*
|
|
4863
|
-
*
|
|
4864
|
-
* a
|
|
4861
|
+
* Trigger **Pin** action on an embedded object.
|
|
4862
|
+
* If no parameters are defined, the pin action is triggered
|
|
4863
|
+
* for the Answer that the user is currently on
|
|
4864
|
+
* and a modal opens for Liveboard selection.
|
|
4865
|
+
* To add an Answer or visualization to a Liveboard programmatically without
|
|
4866
|
+
* showing requiring additional user input via *Pin to Liveboard* modal, define
|
|
4867
|
+
* the following parameters:
|
|
4868
|
+
*
|
|
4869
|
+
* @param
|
|
4870
|
+
* `vizId`- GUID of the saved Answer or visualization to pin to a Liveboard.
|
|
4871
|
+
* Optional when pinning a new chart or table generated from a Search query.
|
|
4872
|
+
* @param
|
|
4873
|
+
* `liveboardID` - GUID of the Liveboard to pin an Answer. If there is no Liveboard,
|
|
4874
|
+
* specify the `newLiveboardName` parameter to create a new Liveboard.
|
|
4875
|
+
* @param
|
|
4876
|
+
* `tabId` - GUID of the Liveboard tab. Adds the Answer to the Liveboard tab
|
|
4877
|
+
* specified in the code.
|
|
4878
|
+
* @param
|
|
4879
|
+
* `newVizName` - Name string for the Answer or visualization. If defined,
|
|
4880
|
+
* this parameter adds a new visualization object or creates a copy of the
|
|
4881
|
+
* Answer or visualization specified in `vizId`.
|
|
4882
|
+
* Required attribute.
|
|
4883
|
+
* @param
|
|
4884
|
+
* `newLiveboardName` - Name string for the Liveboard.
|
|
4885
|
+
* Creates a new Liveboard object with the specified name.
|
|
4886
|
+
* @param
|
|
4887
|
+
* `newTabName` - Name of the tab. Adds a new tab Liveboard specified
|
|
4888
|
+
* in the code.
|
|
4889
|
+
*
|
|
4865
4890
|
* @example
|
|
4866
4891
|
* ```js
|
|
4867
|
-
* appEmbed.trigger(HostEvent.Pin
|
|
4892
|
+
* const pinResponse = await appEmbed.trigger(HostEvent.Pin, {
|
|
4893
|
+
* vizId: "123",
|
|
4894
|
+
* newVizName: "Sales by region",
|
|
4895
|
+
* liveboardId: "123",
|
|
4896
|
+
* tabId: "123"
|
|
4897
|
+
* });
|
|
4868
4898
|
* ```
|
|
4899
|
+
* @example
|
|
4869
4900
|
* ```js
|
|
4870
|
-
*
|
|
4901
|
+
* const pinResponse = await appEmbed.trigger(HostEvent.Pin, {
|
|
4902
|
+
* newVizName: "Total sales of Jackets",
|
|
4903
|
+
* liveboardId: "123"
|
|
4904
|
+
* });
|
|
4905
|
+
* ```
|
|
4906
|
+
*
|
|
4907
|
+
* @example
|
|
4908
|
+
* ```js
|
|
4909
|
+
* const pinResponse = await searchEmbed.trigger(HostEvent.Pin, {
|
|
4910
|
+
* newVizName: "Sales by state",
|
|
4911
|
+
* newLiveboardName: "Sales",
|
|
4912
|
+
* newTabName: "Products"
|
|
4913
|
+
* });
|
|
4914
|
+
* ```
|
|
4915
|
+
* @example
|
|
4916
|
+
* ```js
|
|
4917
|
+
* appEmbed.trigger(HostEvent.Pin)
|
|
4871
4918
|
* ```
|
|
4872
4919
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
4873
4920
|
*/
|
|
@@ -5523,8 +5570,25 @@ export declare enum HostEvent {
|
|
|
5523
5570
|
*/
|
|
5524
5571
|
InfoSuccess = "InfoSuccess",
|
|
5525
5572
|
/**
|
|
5526
|
-
*
|
|
5527
|
-
*
|
|
5573
|
+
* Trigger the save action for an Answer.
|
|
5574
|
+
* To programmatically save an answer without opening the
|
|
5575
|
+
* *Describe your Answer* modal, define the `name` and `description`
|
|
5576
|
+
* properties.
|
|
5577
|
+
* If no parameters are specified, the save action is
|
|
5578
|
+
* triggered with a modal to prompt users to
|
|
5579
|
+
* add a name and description for the Answer.
|
|
5580
|
+
* @param - optional attributes to set Answer properties.
|
|
5581
|
+
* `name` - Name string for the Answer.
|
|
5582
|
+
* `description` - Description text for the Answer.
|
|
5583
|
+
*
|
|
5584
|
+
* @example
|
|
5585
|
+
* ```js
|
|
5586
|
+
* const saveAnswerResponse = await searchEmbed.trigger(HostEvent.SaveAnswer, {
|
|
5587
|
+
* name: "Sales by states",
|
|
5588
|
+
* description: "Total sales by states in MidWest"
|
|
5589
|
+
* });
|
|
5590
|
+
* ```
|
|
5591
|
+
* @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
|
|
5528
5592
|
*/
|
|
5529
5593
|
SaveAnswer = "saveAnswer",
|
|
5530
5594
|
/**
|
|
@@ -7107,6 +7171,14 @@ export interface CustomCssVariables {
|
|
|
7107
7171
|
* panel.
|
|
7108
7172
|
*/
|
|
7109
7173
|
'--ts-var-search-auto-complete-subtext-font-color'?: string;
|
|
7174
|
+
/**
|
|
7175
|
+
* Background color of the input box in the Spotter page.
|
|
7176
|
+
*/
|
|
7177
|
+
'--ts-var-spotter-input-background'?: string;
|
|
7178
|
+
/**
|
|
7179
|
+
* Background color of the previously asked prompt message in the Spotter page.
|
|
7180
|
+
*/
|
|
7181
|
+
'--ts-var-spotter-prompt-background': string;
|
|
7110
7182
|
/**
|
|
7111
7183
|
* Background color of the data panel.
|
|
7112
7184
|
*/
|