@thoughtspot/visual-embed-sdk 1.35.5-hostEvent.1 → 1.35.5-hostEvent.3
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/embed/hostEventClient/contracts.d.ts +6 -22
- package/cjs/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/cjs/src/embed/hostEventClient/contracts.js +0 -2
- package/cjs/src/embed/hostEventClient/contracts.js.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.d.ts +3 -6
- package/cjs/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.js +22 -22
- package/cjs/src/embed/hostEventClient/host-event-client.js.map +1 -1
- package/cjs/src/embed/ts-embed.d.ts +3 -3
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +11 -11
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/types.d.ts +1 -1
- package/cjs/src/types.js +1 -1
- package/dist/index-CENLvayL.js +7370 -0
- package/dist/index-DFwi_pV_.js +7370 -0
- package/dist/src/embed/hostEventClient/contracts.d.ts +6 -22
- package/dist/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/dist/src/embed/hostEventClient/host-event-client.d.ts +3 -6
- package/dist/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.d.ts +3 -3
- package/dist/src/embed/ts-embed.d.ts.map +1 -1
- package/dist/src/types.d.ts +1 -1
- package/dist/tsembed-react.es.js +37 -39
- package/dist/tsembed-react.js +36 -38
- package/dist/tsembed.es.js +37 -39
- package/dist/tsembed.js +36 -38
- package/dist/visual-embed-sdk-react-full.d.ts +10 -29
- package/dist/visual-embed-sdk-react.d.ts +10 -29
- package/dist/visual-embed-sdk.d.ts +10 -29
- package/lib/package.json +1 -1
- package/lib/src/embed/hostEventClient/contracts.d.ts +6 -22
- package/lib/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/lib/src/embed/hostEventClient/contracts.js +0 -2
- package/lib/src/embed/hostEventClient/contracts.js.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.d.ts +3 -6
- package/lib/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.js +22 -22
- package/lib/src/embed/hostEventClient/host-event-client.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts +3 -3
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +11 -11
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/types.d.ts +1 -1
- package/lib/src/types.js +1 -1
- package/lib/src/visual-embed-sdk.d.ts +13 -32
- package/package.json +1 -1
- package/src/embed/hostEventClient/contracts.ts +4 -20
- package/src/embed/hostEventClient/host-event-client.ts +31 -34
- package/src/embed/ts-embed.ts +13 -4
- package/src/types.ts +1 -1
package/dist/tsembed.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @thoughtspot/visual-embed-sdk version 1.35.5-hostEvent.
|
|
1
|
+
/* @thoughtspot/visual-embed-sdk version 1.35.5-hostEvent.3 */
|
|
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) {
|
|
@@ -2550,7 +2550,7 @@ var HostEvent;
|
|
|
2550
2550
|
HostEvent["UpdatePersonalisedView"] = "UpdatePersonalisedView";
|
|
2551
2551
|
/**
|
|
2552
2552
|
* Triggers the action to get the current view of the liveboard
|
|
2553
|
-
* @version SDK: 1.
|
|
2553
|
+
* @version SDK: 1.36.0 | Thoughtspot: 10.6.0.cl
|
|
2554
2554
|
*/
|
|
2555
2555
|
HostEvent["SaveAnswer"] = "saveAnswer";
|
|
2556
2556
|
/**
|
|
@@ -7059,7 +7059,7 @@ class AnswerService {
|
|
|
7059
7059
|
async getTML() {
|
|
7060
7060
|
const { object } = await this.executeQuery(getAnswerTML, {});
|
|
7061
7061
|
const edoc = object[0].edoc;
|
|
7062
|
-
const YAML = await import('./index-
|
|
7062
|
+
const YAML = await import('./index-CENLvayL.js');
|
|
7063
7063
|
const parsedDoc = YAML.parse(edoc);
|
|
7064
7064
|
return {
|
|
7065
7065
|
answer: {
|
|
@@ -14745,7 +14745,7 @@ function processEventData(type, e, thoughtSpotHost, containerEl) {
|
|
|
14745
14745
|
return e;
|
|
14746
14746
|
}
|
|
14747
14747
|
|
|
14748
|
-
var name="@thoughtspot/visual-embed-sdk";var version$1="1.35.5-hostEvent.
|
|
14748
|
+
var name="@thoughtspot/visual-embed-sdk";var version$1="1.35.5-hostEvent.3";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",dompurify:"^2.3.4",eventemitter3:"^4.0.7","gatsby-plugin-vercel":"^1.0.3","html-react-parser":"^1.4.12",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":"^3.1.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};
|
|
14749
14749
|
|
|
14750
14750
|
/**
|
|
14751
14751
|
* Reloads the ThoughtSpot iframe.
|
|
@@ -14809,40 +14809,38 @@ var UiPassthroughEvent;
|
|
|
14809
14809
|
(function (UiPassthroughEvent) {
|
|
14810
14810
|
UiPassthroughEvent["addVizToPinboard"] = "addVizToPinboard";
|
|
14811
14811
|
UiPassthroughEvent["saveAnswer"] = "saveAnswer";
|
|
14812
|
-
UiPassthroughEvent["getA3AnalysisColumns"] = "getA3AnalysisColumns";
|
|
14813
14812
|
UiPassthroughEvent["getDiscoverabilityStatus"] = "getDiscoverabilityStatus";
|
|
14814
14813
|
UiPassthroughEvent["getAvailableUiPassthroughs"] = "getAvailableUiPassthroughs";
|
|
14815
14814
|
UiPassthroughEvent["getAnswerPageConfig"] = "getAnswerPageConfig";
|
|
14816
14815
|
UiPassthroughEvent["getPinboardPageConfig"] = "getPinboardPageConfig";
|
|
14817
|
-
UiPassthroughEvent["UiPassthroughEventNotFound"] = "UiPassthroughEventNotFound";
|
|
14818
14816
|
})(UiPassthroughEvent || (UiPassthroughEvent = {}));
|
|
14819
14817
|
|
|
14820
14818
|
class HostEventClient {
|
|
14821
14819
|
constructor(thoughtSpotHost) {
|
|
14822
|
-
this.executeUiPassthroughApi = async (iFrame, apiName, parameters) => {
|
|
14823
|
-
const res = await processTrigger(iFrame, HostEvent.UiPassthrough, this.thoughtSpotHost, {
|
|
14824
|
-
type: apiName,
|
|
14825
|
-
parameters,
|
|
14826
|
-
});
|
|
14827
|
-
return res;
|
|
14828
|
-
};
|
|
14829
|
-
this.handleUiPassthroughForHostEvent = async (iFrame, apiName, parameters) => {
|
|
14830
|
-
var _a, _b, _c;
|
|
14831
|
-
const response = (_b = (_a = (await this.executeUiPassthroughApi(iFrame, apiName, parameters))) === null || _a === void 0 ? void 0 : _a.filter) === null || _b === void 0 ? void 0 : _b.call(_a, (r) => r.error || r.value)[0];
|
|
14832
|
-
if (!response) {
|
|
14833
|
-
const error = `No answer found${parameters.vizId ? ` for vizId: ${parameters.vizId}` : ''}.`;
|
|
14834
|
-
// eslint-disable-next-line no-throw-literal
|
|
14835
|
-
throw { error };
|
|
14836
|
-
}
|
|
14837
|
-
const errors = response.error || ((_c = response.value) === null || _c === void 0 ? void 0 : _c.errors);
|
|
14838
|
-
if (errors) {
|
|
14839
|
-
// eslint-disable-next-line no-throw-literal
|
|
14840
|
-
throw { error: response.error };
|
|
14841
|
-
}
|
|
14842
|
-
return { ...response.value };
|
|
14843
|
-
};
|
|
14844
14820
|
this.thoughtSpotHost = thoughtSpotHost;
|
|
14845
14821
|
}
|
|
14822
|
+
async executeUiPassthroughApi(iFrame, apiName, parameters) {
|
|
14823
|
+
const res = await processTrigger(iFrame, HostEvent.UiPassthrough, this.thoughtSpotHost, {
|
|
14824
|
+
type: apiName,
|
|
14825
|
+
parameters,
|
|
14826
|
+
});
|
|
14827
|
+
return res;
|
|
14828
|
+
}
|
|
14829
|
+
async handleUiPassthroughForHostEvent(iFrame, apiName, parameters) {
|
|
14830
|
+
var _a, _b, _c;
|
|
14831
|
+
const response = (_b = (_a = (await this.executeUiPassthroughApi(iFrame, apiName, parameters))) === null || _a === void 0 ? void 0 : _a.filter) === null || _b === void 0 ? void 0 : _b.call(_a, (r) => r.error || r.value)[0];
|
|
14832
|
+
if (!response) {
|
|
14833
|
+
const error = `No answer found${parameters.vizId ? ` for vizId: ${parameters.vizId}` : ''}.`;
|
|
14834
|
+
// eslint-disable-next-line no-throw-literal
|
|
14835
|
+
throw { error };
|
|
14836
|
+
}
|
|
14837
|
+
const errors = response.error || ((_c = response.value) === null || _c === void 0 ? void 0 : _c.errors);
|
|
14838
|
+
if (errors) {
|
|
14839
|
+
// eslint-disable-next-line no-throw-literal
|
|
14840
|
+
throw { error: response.error };
|
|
14841
|
+
}
|
|
14842
|
+
return { ...response.value };
|
|
14843
|
+
}
|
|
14846
14844
|
async hostEventFallback(iFrame, hostEvent, data) {
|
|
14847
14845
|
return processTrigger(iFrame, hostEvent, this.thoughtSpotHost, data);
|
|
14848
14846
|
}
|
|
@@ -14973,17 +14971,6 @@ class TsEmbed {
|
|
|
14973
14971
|
this.on(EmbedEvent.AuthExpire, this.updateAuthToken, { start: false }, true);
|
|
14974
14972
|
};
|
|
14975
14973
|
this.showPreRenderByDefault = false;
|
|
14976
|
-
/**
|
|
14977
|
-
* Triggers an event to the embedded app, skipping the UI flow.
|
|
14978
|
-
* @param {UiPassthroughEvent} apiName - The name of the API to be triggered.
|
|
14979
|
-
* @param {UiPassthroughRequest} parameters - The parameters to be passed to the API.
|
|
14980
|
-
* @returns {Promise<UiPassthroughRequest>} - A promise that resolves with the response
|
|
14981
|
-
* from the embedded app.
|
|
14982
|
-
*/
|
|
14983
|
-
// eslint-disable-next-line arrow-body-style
|
|
14984
|
-
this.triggerUiPassThrough = (apiName, parameters) => {
|
|
14985
|
-
return this.hostEventClient.executeUiPassthroughApi(this.iFrame, apiName, parameters);
|
|
14986
|
-
};
|
|
14987
14974
|
this.validatePreRenderViewConfig = (viewConfig) => {
|
|
14988
14975
|
var _a;
|
|
14989
14976
|
const preRenderAllowedKeys = ['preRenderId', 'vizId', 'liveboardId'];
|
|
@@ -15658,6 +15645,17 @@ class TsEmbed {
|
|
|
15658
15645
|
}
|
|
15659
15646
|
return this.hostEventClient.executeHostEvent(this.iFrame, messageType, data);
|
|
15660
15647
|
}
|
|
15648
|
+
/**
|
|
15649
|
+
* Triggers an event to the embedded app, skipping the UI flow.
|
|
15650
|
+
* @param {UiPassthroughEvent} apiName - The name of the API to be triggered.
|
|
15651
|
+
* @param {UiPassthroughRequest} parameters - The parameters to be passed to the API.
|
|
15652
|
+
* @returns {Promise<UiPassthroughRequest>} - A promise that resolves with the response
|
|
15653
|
+
* from the embedded app.
|
|
15654
|
+
*/
|
|
15655
|
+
// eslint-disable-next-line arrow-body-style
|
|
15656
|
+
triggerUiPassThrough(apiName, parameters) {
|
|
15657
|
+
return this.hostEventClient.executeUiPassthroughApi(this.iFrame, apiName, parameters);
|
|
15658
|
+
}
|
|
15661
15659
|
/**
|
|
15662
15660
|
* Marks the ThoughtSpot object to have been rendered
|
|
15663
15661
|
* Needs to be overridden by subclasses to do the actual
|
package/dist/tsembed.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @thoughtspot/visual-embed-sdk version 1.35.5-hostEvent.
|
|
1
|
+
/* @thoughtspot/visual-embed-sdk version 1.35.5-hostEvent.3 */
|
|
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) :
|
|
@@ -2556,7 +2556,7 @@
|
|
|
2556
2556
|
HostEvent["UpdatePersonalisedView"] = "UpdatePersonalisedView";
|
|
2557
2557
|
/**
|
|
2558
2558
|
* Triggers the action to get the current view of the liveboard
|
|
2559
|
-
* @version SDK: 1.
|
|
2559
|
+
* @version SDK: 1.36.0 | Thoughtspot: 10.6.0.cl
|
|
2560
2560
|
*/
|
|
2561
2561
|
HostEvent["SaveAnswer"] = "saveAnswer";
|
|
2562
2562
|
/**
|
|
@@ -14751,7 +14751,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
14751
14751
|
return e;
|
|
14752
14752
|
}
|
|
14753
14753
|
|
|
14754
|
-
var name="@thoughtspot/visual-embed-sdk";var version$1="1.35.5-hostEvent.
|
|
14754
|
+
var name="@thoughtspot/visual-embed-sdk";var version$1="1.35.5-hostEvent.3";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",dompurify:"^2.3.4",eventemitter3:"^4.0.7","gatsby-plugin-vercel":"^1.0.3","html-react-parser":"^1.4.12",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":"^3.1.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};
|
|
14755
14755
|
|
|
14756
14756
|
/**
|
|
14757
14757
|
* Reloads the ThoughtSpot iframe.
|
|
@@ -14815,40 +14815,38 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
14815
14815
|
(function (UiPassthroughEvent) {
|
|
14816
14816
|
UiPassthroughEvent["addVizToPinboard"] = "addVizToPinboard";
|
|
14817
14817
|
UiPassthroughEvent["saveAnswer"] = "saveAnswer";
|
|
14818
|
-
UiPassthroughEvent["getA3AnalysisColumns"] = "getA3AnalysisColumns";
|
|
14819
14818
|
UiPassthroughEvent["getDiscoverabilityStatus"] = "getDiscoverabilityStatus";
|
|
14820
14819
|
UiPassthroughEvent["getAvailableUiPassthroughs"] = "getAvailableUiPassthroughs";
|
|
14821
14820
|
UiPassthroughEvent["getAnswerPageConfig"] = "getAnswerPageConfig";
|
|
14822
14821
|
UiPassthroughEvent["getPinboardPageConfig"] = "getPinboardPageConfig";
|
|
14823
|
-
UiPassthroughEvent["UiPassthroughEventNotFound"] = "UiPassthroughEventNotFound";
|
|
14824
14822
|
})(exports.UiPassthroughEvent || (exports.UiPassthroughEvent = {}));
|
|
14825
14823
|
|
|
14826
14824
|
class HostEventClient {
|
|
14827
14825
|
constructor(thoughtSpotHost) {
|
|
14828
|
-
this.executeUiPassthroughApi = async (iFrame, apiName, parameters) => {
|
|
14829
|
-
const res = await processTrigger(iFrame, exports.HostEvent.UiPassthrough, this.thoughtSpotHost, {
|
|
14830
|
-
type: apiName,
|
|
14831
|
-
parameters,
|
|
14832
|
-
});
|
|
14833
|
-
return res;
|
|
14834
|
-
};
|
|
14835
|
-
this.handleUiPassthroughForHostEvent = async (iFrame, apiName, parameters) => {
|
|
14836
|
-
var _a, _b, _c;
|
|
14837
|
-
const response = (_b = (_a = (await this.executeUiPassthroughApi(iFrame, apiName, parameters))) === null || _a === void 0 ? void 0 : _a.filter) === null || _b === void 0 ? void 0 : _b.call(_a, (r) => r.error || r.value)[0];
|
|
14838
|
-
if (!response) {
|
|
14839
|
-
const error = `No answer found${parameters.vizId ? ` for vizId: ${parameters.vizId}` : ''}.`;
|
|
14840
|
-
// eslint-disable-next-line no-throw-literal
|
|
14841
|
-
throw { error };
|
|
14842
|
-
}
|
|
14843
|
-
const errors = response.error || ((_c = response.value) === null || _c === void 0 ? void 0 : _c.errors);
|
|
14844
|
-
if (errors) {
|
|
14845
|
-
// eslint-disable-next-line no-throw-literal
|
|
14846
|
-
throw { error: response.error };
|
|
14847
|
-
}
|
|
14848
|
-
return { ...response.value };
|
|
14849
|
-
};
|
|
14850
14826
|
this.thoughtSpotHost = thoughtSpotHost;
|
|
14851
14827
|
}
|
|
14828
|
+
async executeUiPassthroughApi(iFrame, apiName, parameters) {
|
|
14829
|
+
const res = await processTrigger(iFrame, exports.HostEvent.UiPassthrough, this.thoughtSpotHost, {
|
|
14830
|
+
type: apiName,
|
|
14831
|
+
parameters,
|
|
14832
|
+
});
|
|
14833
|
+
return res;
|
|
14834
|
+
}
|
|
14835
|
+
async handleUiPassthroughForHostEvent(iFrame, apiName, parameters) {
|
|
14836
|
+
var _a, _b, _c;
|
|
14837
|
+
const response = (_b = (_a = (await this.executeUiPassthroughApi(iFrame, apiName, parameters))) === null || _a === void 0 ? void 0 : _a.filter) === null || _b === void 0 ? void 0 : _b.call(_a, (r) => r.error || r.value)[0];
|
|
14838
|
+
if (!response) {
|
|
14839
|
+
const error = `No answer found${parameters.vizId ? ` for vizId: ${parameters.vizId}` : ''}.`;
|
|
14840
|
+
// eslint-disable-next-line no-throw-literal
|
|
14841
|
+
throw { error };
|
|
14842
|
+
}
|
|
14843
|
+
const errors = response.error || ((_c = response.value) === null || _c === void 0 ? void 0 : _c.errors);
|
|
14844
|
+
if (errors) {
|
|
14845
|
+
// eslint-disable-next-line no-throw-literal
|
|
14846
|
+
throw { error: response.error };
|
|
14847
|
+
}
|
|
14848
|
+
return { ...response.value };
|
|
14849
|
+
}
|
|
14852
14850
|
async hostEventFallback(iFrame, hostEvent, data) {
|
|
14853
14851
|
return processTrigger(iFrame, hostEvent, this.thoughtSpotHost, data);
|
|
14854
14852
|
}
|
|
@@ -14979,17 +14977,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
14979
14977
|
this.on(exports.EmbedEvent.AuthExpire, this.updateAuthToken, { start: false }, true);
|
|
14980
14978
|
};
|
|
14981
14979
|
this.showPreRenderByDefault = false;
|
|
14982
|
-
/**
|
|
14983
|
-
* Triggers an event to the embedded app, skipping the UI flow.
|
|
14984
|
-
* @param {UiPassthroughEvent} apiName - The name of the API to be triggered.
|
|
14985
|
-
* @param {UiPassthroughRequest} parameters - The parameters to be passed to the API.
|
|
14986
|
-
* @returns {Promise<UiPassthroughRequest>} - A promise that resolves with the response
|
|
14987
|
-
* from the embedded app.
|
|
14988
|
-
*/
|
|
14989
|
-
// eslint-disable-next-line arrow-body-style
|
|
14990
|
-
this.triggerUiPassThrough = (apiName, parameters) => {
|
|
14991
|
-
return this.hostEventClient.executeUiPassthroughApi(this.iFrame, apiName, parameters);
|
|
14992
|
-
};
|
|
14993
14980
|
this.validatePreRenderViewConfig = (viewConfig) => {
|
|
14994
14981
|
var _a;
|
|
14995
14982
|
const preRenderAllowedKeys = ['preRenderId', 'vizId', 'liveboardId'];
|
|
@@ -15664,6 +15651,17 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
15664
15651
|
}
|
|
15665
15652
|
return this.hostEventClient.executeHostEvent(this.iFrame, messageType, data);
|
|
15666
15653
|
}
|
|
15654
|
+
/**
|
|
15655
|
+
* Triggers an event to the embedded app, skipping the UI flow.
|
|
15656
|
+
* @param {UiPassthroughEvent} apiName - The name of the API to be triggered.
|
|
15657
|
+
* @param {UiPassthroughRequest} parameters - The parameters to be passed to the API.
|
|
15658
|
+
* @returns {Promise<UiPassthroughRequest>} - A promise that resolves with the response
|
|
15659
|
+
* from the embedded app.
|
|
15660
|
+
*/
|
|
15661
|
+
// eslint-disable-next-line arrow-body-style
|
|
15662
|
+
triggerUiPassThrough(apiName, parameters) {
|
|
15663
|
+
return this.hostEventClient.executeUiPassthroughApi(this.iFrame, apiName, parameters);
|
|
15664
|
+
}
|
|
15667
15665
|
/**
|
|
15668
15666
|
* Marks the ThoughtSpot object to have been rendered
|
|
15669
15667
|
* Needs to be overridden by subclasses to do the actual
|
|
@@ -5306,7 +5306,7 @@ export declare enum HostEvent {
|
|
|
5306
5306
|
UpdatePersonalisedView = "UpdatePersonalisedView",
|
|
5307
5307
|
/**
|
|
5308
5308
|
* Triggers the action to get the current view of the liveboard
|
|
5309
|
-
* @version SDK: 1.
|
|
5309
|
+
* @version SDK: 1.36.0 | Thoughtspot: 10.6.0.cl
|
|
5310
5310
|
*/
|
|
5311
5311
|
SaveAnswer = "saveAnswer",
|
|
5312
5312
|
/**
|
|
@@ -7329,12 +7329,10 @@ export declare const createLiveboardWithAnswers: (answers: AnswerService[], name
|
|
|
7329
7329
|
export declare enum UiPassthroughEvent {
|
|
7330
7330
|
addVizToPinboard = "addVizToPinboard",
|
|
7331
7331
|
saveAnswer = "saveAnswer",
|
|
7332
|
-
getA3AnalysisColumns = "getA3AnalysisColumns",
|
|
7333
7332
|
getDiscoverabilityStatus = "getDiscoverabilityStatus",
|
|
7334
7333
|
getAvailableUiPassthroughs = "getAvailableUiPassthroughs",
|
|
7335
7334
|
getAnswerPageConfig = "getAnswerPageConfig",
|
|
7336
|
-
getPinboardPageConfig = "getPinboardPageConfig"
|
|
7337
|
-
UiPassthroughEventNotFound = "UiPassthroughEventNotFound"
|
|
7335
|
+
getPinboardPageConfig = "getPinboardPageConfig"
|
|
7338
7336
|
}
|
|
7339
7337
|
export type UiPassthroughContractBase = {
|
|
7340
7338
|
[UiPassthroughEvent.addVizToPinboard]: {
|
|
@@ -7365,15 +7363,6 @@ export type UiPassthroughContractBase = {
|
|
|
7365
7363
|
errors?: any;
|
|
7366
7364
|
};
|
|
7367
7365
|
};
|
|
7368
|
-
[UiPassthroughEvent.getA3AnalysisColumns]: {
|
|
7369
|
-
request: {
|
|
7370
|
-
vizId?: string;
|
|
7371
|
-
};
|
|
7372
|
-
response: {
|
|
7373
|
-
data?: any;
|
|
7374
|
-
errors?: any;
|
|
7375
|
-
};
|
|
7376
|
-
};
|
|
7377
7366
|
[UiPassthroughEvent.getDiscoverabilityStatus]: {
|
|
7378
7367
|
request: any;
|
|
7379
7368
|
response: {
|
|
@@ -7397,13 +7386,12 @@ export type UiPassthroughContractBase = {
|
|
|
7397
7386
|
request: any;
|
|
7398
7387
|
response: any;
|
|
7399
7388
|
};
|
|
7400
|
-
[UiPassthroughEvent.UiPassthroughEventNotFound]: {
|
|
7401
|
-
request: any;
|
|
7402
|
-
response: any;
|
|
7403
|
-
};
|
|
7404
7389
|
};
|
|
7405
|
-
export type
|
|
7406
|
-
|
|
7390
|
+
export type FlattenType<T> = T extends infer R ? {
|
|
7391
|
+
[K in keyof R]: R[K];
|
|
7392
|
+
} : never;
|
|
7393
|
+
export type UiPassthroughRequest<T extends keyof UiPassthroughContractBase> = FlattenType<UiPassthroughContractBase[T]['request']>;
|
|
7394
|
+
export type UiPassthroughResponse<T extends keyof UiPassthroughContractBase> = FlattenType<UiPassthroughContractBase[T]['response']>;
|
|
7407
7395
|
export type UiPassthroughArrayResponse<ApiName extends keyof UiPassthroughContractBase> = Promise<Array<{
|
|
7408
7396
|
redId?: string;
|
|
7409
7397
|
value?: UiPassthroughResponse<ApiName>;
|
|
@@ -7412,11 +7400,7 @@ export type UiPassthroughArrayResponse<ApiName extends keyof UiPassthroughContra
|
|
|
7412
7400
|
export type EmbedApiHostEventMapping = {
|
|
7413
7401
|
[HostEvent.Pin]: UiPassthroughEvent.addVizToPinboard;
|
|
7414
7402
|
[HostEvent.SaveAnswer]: UiPassthroughEvent.saveAnswer;
|
|
7415
|
-
'hostEventNotMapped': UiPassthroughEvent.UiPassthroughEventNotFound;
|
|
7416
7403
|
};
|
|
7417
|
-
export type FlattenType<T> = T extends infer R ? {
|
|
7418
|
-
[K in keyof R]: R[K];
|
|
7419
|
-
} : never;
|
|
7420
7404
|
export type HostEventRequest<HostEventT extends HostEvent> = HostEventT extends keyof EmbedApiHostEventMapping ? FlattenType<UiPassthroughRequest<EmbedApiHostEventMapping[HostEventT]>> : any;
|
|
7421
7405
|
export type HostEventResponse<HostEventT extends HostEvent> = HostEventT extends keyof EmbedApiHostEventMapping ? {
|
|
7422
7406
|
value?: UiPassthroughResponse<EmbedApiHostEventMapping[HostEventT]>;
|
|
@@ -7619,7 +7603,7 @@ export declare class TsEmbed {
|
|
|
7619
7603
|
* @returns {Promise<UiPassthroughRequest>} - A promise that resolves with the response
|
|
7620
7604
|
* from the embedded app.
|
|
7621
7605
|
*/
|
|
7622
|
-
triggerUiPassThrough:
|
|
7606
|
+
triggerUiPassThrough<UiPassthroughEventT extends UiPassthroughEvent>(apiName: UiPassthroughEventT, parameters: UiPassthroughRequest<UiPassthroughEventT>): UiPassthroughArrayResponse<UiPassthroughEventT>;
|
|
7623
7607
|
/**
|
|
7624
7608
|
* Marks the ThoughtSpot object to have been rendered
|
|
7625
7609
|
* Needs to be overridden by subclasses to do the actual
|
|
@@ -7738,15 +7722,12 @@ export declare class V1Embed extends TsEmbed {
|
|
|
7738
7722
|
test__executeCallbacks: (eventType: EmbedEvent, data: any, eventPort?: void | MessagePort) => void;
|
|
7739
7723
|
}
|
|
7740
7724
|
|
|
7741
|
-
type UiPassthroughHandlerWithIframe = <UiPassthroughEventT extends UiPassthroughEvent>(iFrame: HTMLIFrameElement, apiName: UiPassthroughEventT, parameters: FlattenType<UiPassthroughRequest<UiPassthroughEventT>>) => UiPassthroughArrayResponse<UiPassthroughEventT>;
|
|
7742
|
-
export type UiPassthroughHandler = <UiPassthroughEventT extends UiPassthroughEvent>(apiName: UiPassthroughEventT, parameters: FlattenType<UiPassthroughRequest<UiPassthroughEventT>>) => UiPassthroughArrayResponse<UiPassthroughEventT>;
|
|
7743
7725
|
export declare class HostEventClient {
|
|
7744
7726
|
thoughtSpotHost: string;
|
|
7745
7727
|
constructor(thoughtSpotHost: string);
|
|
7746
|
-
executeUiPassthroughApi:
|
|
7747
|
-
handleUiPassthroughForHostEvent:
|
|
7728
|
+
executeUiPassthroughApi<UiPassthroughEventT extends UiPassthroughEvent>(iFrame: HTMLIFrameElement, apiName: UiPassthroughEventT, parameters: UiPassthroughRequest<UiPassthroughEventT>): UiPassthroughArrayResponse<UiPassthroughEventT>;
|
|
7729
|
+
handleUiPassthroughForHostEvent<UiPassthroughEventT extends UiPassthroughEvent>(iFrame: HTMLIFrameElement, apiName: UiPassthroughEventT, parameters: UiPassthroughRequest<UiPassthroughEventT>): Promise<UiPassthroughResponse<UiPassthroughEventT>>;
|
|
7748
7730
|
hostEventFallback(iFrame: HTMLIFrameElement, hostEvent: HostEvent, data: any): Promise<any>;
|
|
7749
7731
|
executeHostEvent<T extends HostEvent>(iFrame: HTMLIFrameElement, hostEvent: HostEvent, payload?: HostEventRequest<T>): Promise<HostEventResponse<HostEvent>>;
|
|
7750
7732
|
}
|
|
7751
|
-
export {};
|
|
7752
7733
|
|
|
@@ -4898,7 +4898,7 @@ export declare enum HostEvent {
|
|
|
4898
4898
|
UpdatePersonalisedView = "UpdatePersonalisedView",
|
|
4899
4899
|
/**
|
|
4900
4900
|
* Triggers the action to get the current view of the liveboard
|
|
4901
|
-
* @version SDK: 1.
|
|
4901
|
+
* @version SDK: 1.36.0 | Thoughtspot: 10.6.0.cl
|
|
4902
4902
|
*/
|
|
4903
4903
|
SaveAnswer = "saveAnswer",
|
|
4904
4904
|
/**
|
|
@@ -6443,7 +6443,7 @@ export declare class TsEmbed {
|
|
|
6443
6443
|
* @returns {Promise<UiPassthroughRequest>} - A promise that resolves with the response
|
|
6444
6444
|
* from the embedded app.
|
|
6445
6445
|
*/
|
|
6446
|
-
triggerUiPassThrough:
|
|
6446
|
+
triggerUiPassThrough<UiPassthroughEventT extends UiPassthroughEvent>(apiName: UiPassthroughEventT, parameters: UiPassthroughRequest<UiPassthroughEventT>): UiPassthroughArrayResponse<UiPassthroughEventT>;
|
|
6447
6447
|
/**
|
|
6448
6448
|
* Marks the ThoughtSpot object to have been rendered
|
|
6449
6449
|
* Needs to be overridden by subclasses to do the actual
|
|
@@ -6565,12 +6565,10 @@ export declare class V1Embed extends TsEmbed {
|
|
|
6565
6565
|
export declare enum UiPassthroughEvent {
|
|
6566
6566
|
addVizToPinboard = "addVizToPinboard",
|
|
6567
6567
|
saveAnswer = "saveAnswer",
|
|
6568
|
-
getA3AnalysisColumns = "getA3AnalysisColumns",
|
|
6569
6568
|
getDiscoverabilityStatus = "getDiscoverabilityStatus",
|
|
6570
6569
|
getAvailableUiPassthroughs = "getAvailableUiPassthroughs",
|
|
6571
6570
|
getAnswerPageConfig = "getAnswerPageConfig",
|
|
6572
|
-
getPinboardPageConfig = "getPinboardPageConfig"
|
|
6573
|
-
UiPassthroughEventNotFound = "UiPassthroughEventNotFound"
|
|
6571
|
+
getPinboardPageConfig = "getPinboardPageConfig"
|
|
6574
6572
|
}
|
|
6575
6573
|
export type UiPassthroughContractBase = {
|
|
6576
6574
|
[UiPassthroughEvent.addVizToPinboard]: {
|
|
@@ -6601,15 +6599,6 @@ export type UiPassthroughContractBase = {
|
|
|
6601
6599
|
errors?: any;
|
|
6602
6600
|
};
|
|
6603
6601
|
};
|
|
6604
|
-
[UiPassthroughEvent.getA3AnalysisColumns]: {
|
|
6605
|
-
request: {
|
|
6606
|
-
vizId?: string;
|
|
6607
|
-
};
|
|
6608
|
-
response: {
|
|
6609
|
-
data?: any;
|
|
6610
|
-
errors?: any;
|
|
6611
|
-
};
|
|
6612
|
-
};
|
|
6613
6602
|
[UiPassthroughEvent.getDiscoverabilityStatus]: {
|
|
6614
6603
|
request: any;
|
|
6615
6604
|
response: {
|
|
@@ -6633,13 +6622,12 @@ export type UiPassthroughContractBase = {
|
|
|
6633
6622
|
request: any;
|
|
6634
6623
|
response: any;
|
|
6635
6624
|
};
|
|
6636
|
-
[UiPassthroughEvent.UiPassthroughEventNotFound]: {
|
|
6637
|
-
request: any;
|
|
6638
|
-
response: any;
|
|
6639
|
-
};
|
|
6640
6625
|
};
|
|
6641
|
-
export type
|
|
6642
|
-
|
|
6626
|
+
export type FlattenType<T> = T extends infer R ? {
|
|
6627
|
+
[K in keyof R]: R[K];
|
|
6628
|
+
} : never;
|
|
6629
|
+
export type UiPassthroughRequest<T extends keyof UiPassthroughContractBase> = FlattenType<UiPassthroughContractBase[T]['request']>;
|
|
6630
|
+
export type UiPassthroughResponse<T extends keyof UiPassthroughContractBase> = FlattenType<UiPassthroughContractBase[T]['response']>;
|
|
6643
6631
|
export type UiPassthroughArrayResponse<ApiName extends keyof UiPassthroughContractBase> = Promise<Array<{
|
|
6644
6632
|
redId?: string;
|
|
6645
6633
|
value?: UiPassthroughResponse<ApiName>;
|
|
@@ -6648,11 +6636,7 @@ export type UiPassthroughArrayResponse<ApiName extends keyof UiPassthroughContra
|
|
|
6648
6636
|
export type EmbedApiHostEventMapping = {
|
|
6649
6637
|
[HostEvent.Pin]: UiPassthroughEvent.addVizToPinboard;
|
|
6650
6638
|
[HostEvent.SaveAnswer]: UiPassthroughEvent.saveAnswer;
|
|
6651
|
-
'hostEventNotMapped': UiPassthroughEvent.UiPassthroughEventNotFound;
|
|
6652
6639
|
};
|
|
6653
|
-
export type FlattenType<T> = T extends infer R ? {
|
|
6654
|
-
[K in keyof R]: R[K];
|
|
6655
|
-
} : never;
|
|
6656
6640
|
export type HostEventRequest<HostEventT extends HostEvent> = HostEventT extends keyof EmbedApiHostEventMapping ? FlattenType<UiPassthroughRequest<EmbedApiHostEventMapping[HostEventT]>> : any;
|
|
6657
6641
|
export type HostEventResponse<HostEventT extends HostEvent> = HostEventT extends keyof EmbedApiHostEventMapping ? {
|
|
6658
6642
|
value?: UiPassthroughResponse<EmbedApiHostEventMapping[HostEventT]>;
|
|
@@ -7738,15 +7722,12 @@ export declare function getAuthenticationToken(embedConfig: EmbedConfig): Promis
|
|
|
7738
7722
|
*/
|
|
7739
7723
|
export declare const resetCachedAuthToken: () => void;
|
|
7740
7724
|
|
|
7741
|
-
type UiPassthroughHandlerWithIframe = <UiPassthroughEventT extends UiPassthroughEvent>(iFrame: HTMLIFrameElement, apiName: UiPassthroughEventT, parameters: FlattenType<UiPassthroughRequest<UiPassthroughEventT>>) => UiPassthroughArrayResponse<UiPassthroughEventT>;
|
|
7742
|
-
export type UiPassthroughHandler = <UiPassthroughEventT extends UiPassthroughEvent>(apiName: UiPassthroughEventT, parameters: FlattenType<UiPassthroughRequest<UiPassthroughEventT>>) => UiPassthroughArrayResponse<UiPassthroughEventT>;
|
|
7743
7725
|
export declare class HostEventClient {
|
|
7744
7726
|
thoughtSpotHost: string;
|
|
7745
7727
|
constructor(thoughtSpotHost: string);
|
|
7746
|
-
executeUiPassthroughApi:
|
|
7747
|
-
handleUiPassthroughForHostEvent:
|
|
7728
|
+
executeUiPassthroughApi<UiPassthroughEventT extends UiPassthroughEvent>(iFrame: HTMLIFrameElement, apiName: UiPassthroughEventT, parameters: UiPassthroughRequest<UiPassthroughEventT>): UiPassthroughArrayResponse<UiPassthroughEventT>;
|
|
7729
|
+
handleUiPassthroughForHostEvent<UiPassthroughEventT extends UiPassthroughEvent>(iFrame: HTMLIFrameElement, apiName: UiPassthroughEventT, parameters: UiPassthroughRequest<UiPassthroughEventT>): Promise<UiPassthroughResponse<UiPassthroughEventT>>;
|
|
7748
7730
|
hostEventFallback(iFrame: HTMLIFrameElement, hostEvent: HostEvent, data: any): Promise<any>;
|
|
7749
7731
|
executeHostEvent<T extends HostEvent>(iFrame: HTMLIFrameElement, hostEvent: HostEvent, payload?: HostEventRequest<T>): Promise<HostEventResponse<HostEvent>>;
|
|
7750
7732
|
}
|
|
7751
|
-
export {};
|
|
7752
7733
|
|
|
@@ -4895,7 +4895,7 @@ export enum HostEvent {
|
|
|
4895
4895
|
UpdatePersonalisedView = "UpdatePersonalisedView",
|
|
4896
4896
|
/**
|
|
4897
4897
|
* Triggers the action to get the current view of the liveboard
|
|
4898
|
-
* @version SDK: 1.
|
|
4898
|
+
* @version SDK: 1.36.0 | Thoughtspot: 10.6.0.cl
|
|
4899
4899
|
*/
|
|
4900
4900
|
SaveAnswer = "saveAnswer",
|
|
4901
4901
|
/**
|
|
@@ -7064,12 +7064,10 @@ export const createLiveboardWithAnswers: (answers: AnswerService[], name: string
|
|
|
7064
7064
|
export enum UiPassthroughEvent {
|
|
7065
7065
|
addVizToPinboard = "addVizToPinboard",
|
|
7066
7066
|
saveAnswer = "saveAnswer",
|
|
7067
|
-
getA3AnalysisColumns = "getA3AnalysisColumns",
|
|
7068
7067
|
getDiscoverabilityStatus = "getDiscoverabilityStatus",
|
|
7069
7068
|
getAvailableUiPassthroughs = "getAvailableUiPassthroughs",
|
|
7070
7069
|
getAnswerPageConfig = "getAnswerPageConfig",
|
|
7071
|
-
getPinboardPageConfig = "getPinboardPageConfig"
|
|
7072
|
-
UiPassthroughEventNotFound = "UiPassthroughEventNotFound"
|
|
7070
|
+
getPinboardPageConfig = "getPinboardPageConfig"
|
|
7073
7071
|
}
|
|
7074
7072
|
export type UiPassthroughContractBase = {
|
|
7075
7073
|
[UiPassthroughEvent.addVizToPinboard]: {
|
|
@@ -7100,15 +7098,6 @@ export type UiPassthroughContractBase = {
|
|
|
7100
7098
|
errors?: any;
|
|
7101
7099
|
};
|
|
7102
7100
|
};
|
|
7103
|
-
[UiPassthroughEvent.getA3AnalysisColumns]: {
|
|
7104
|
-
request: {
|
|
7105
|
-
vizId?: string;
|
|
7106
|
-
};
|
|
7107
|
-
response: {
|
|
7108
|
-
data?: any;
|
|
7109
|
-
errors?: any;
|
|
7110
|
-
};
|
|
7111
|
-
};
|
|
7112
7101
|
[UiPassthroughEvent.getDiscoverabilityStatus]: {
|
|
7113
7102
|
request: any;
|
|
7114
7103
|
response: {
|
|
@@ -7132,13 +7121,12 @@ export type UiPassthroughContractBase = {
|
|
|
7132
7121
|
request: any;
|
|
7133
7122
|
response: any;
|
|
7134
7123
|
};
|
|
7135
|
-
[UiPassthroughEvent.UiPassthroughEventNotFound]: {
|
|
7136
|
-
request: any;
|
|
7137
|
-
response: any;
|
|
7138
|
-
};
|
|
7139
7124
|
};
|
|
7140
|
-
export type
|
|
7141
|
-
|
|
7125
|
+
export type FlattenType<T> = T extends infer R ? {
|
|
7126
|
+
[K in keyof R]: R[K];
|
|
7127
|
+
} : never;
|
|
7128
|
+
export type UiPassthroughRequest<T extends keyof UiPassthroughContractBase> = FlattenType<UiPassthroughContractBase[T]['request']>;
|
|
7129
|
+
export type UiPassthroughResponse<T extends keyof UiPassthroughContractBase> = FlattenType<UiPassthroughContractBase[T]['response']>;
|
|
7142
7130
|
export type UiPassthroughArrayResponse<ApiName extends keyof UiPassthroughContractBase> = Promise<Array<{
|
|
7143
7131
|
redId?: string;
|
|
7144
7132
|
value?: UiPassthroughResponse<ApiName>;
|
|
@@ -7147,11 +7135,7 @@ export type UiPassthroughArrayResponse<ApiName extends keyof UiPassthroughContra
|
|
|
7147
7135
|
export type EmbedApiHostEventMapping = {
|
|
7148
7136
|
[HostEvent.Pin]: UiPassthroughEvent.addVizToPinboard;
|
|
7149
7137
|
[HostEvent.SaveAnswer]: UiPassthroughEvent.saveAnswer;
|
|
7150
|
-
'hostEventNotMapped': UiPassthroughEvent.UiPassthroughEventNotFound;
|
|
7151
7138
|
};
|
|
7152
|
-
export type FlattenType<T> = T extends infer R ? {
|
|
7153
|
-
[K in keyof R]: R[K];
|
|
7154
|
-
} : never;
|
|
7155
7139
|
export type HostEventRequest<HostEventT extends HostEvent> = HostEventT extends keyof EmbedApiHostEventMapping ? FlattenType<UiPassthroughRequest<EmbedApiHostEventMapping[HostEventT]>> : any;
|
|
7156
7140
|
export type HostEventResponse<HostEventT extends HostEvent> = HostEventT extends keyof EmbedApiHostEventMapping ? {
|
|
7157
7141
|
value?: UiPassthroughResponse<EmbedApiHostEventMapping[HostEventT]>;
|
|
@@ -7354,7 +7338,7 @@ export class TsEmbed {
|
|
|
7354
7338
|
* @returns {Promise<UiPassthroughRequest>} - A promise that resolves with the response
|
|
7355
7339
|
* from the embedded app.
|
|
7356
7340
|
*/
|
|
7357
|
-
triggerUiPassThrough:
|
|
7341
|
+
triggerUiPassThrough<UiPassthroughEventT extends UiPassthroughEvent>(apiName: UiPassthroughEventT, parameters: UiPassthroughRequest<UiPassthroughEventT>): UiPassthroughArrayResponse<UiPassthroughEventT>;
|
|
7358
7342
|
/**
|
|
7359
7343
|
* Marks the ThoughtSpot object to have been rendered
|
|
7360
7344
|
* Needs to be overridden by subclasses to do the actual
|
|
@@ -7473,15 +7457,12 @@ export class V1Embed extends TsEmbed {
|
|
|
7473
7457
|
test__executeCallbacks: (eventType: EmbedEvent, data: any, eventPort?: void | MessagePort) => void;
|
|
7474
7458
|
}
|
|
7475
7459
|
|
|
7476
|
-
type UiPassthroughHandlerWithIframe = <UiPassthroughEventT extends UiPassthroughEvent>(iFrame: HTMLIFrameElement, apiName: UiPassthroughEventT, parameters: FlattenType<UiPassthroughRequest<UiPassthroughEventT>>) => UiPassthroughArrayResponse<UiPassthroughEventT>;
|
|
7477
|
-
export type UiPassthroughHandler = <UiPassthroughEventT extends UiPassthroughEvent>(apiName: UiPassthroughEventT, parameters: FlattenType<UiPassthroughRequest<UiPassthroughEventT>>) => UiPassthroughArrayResponse<UiPassthroughEventT>;
|
|
7478
7460
|
export class HostEventClient {
|
|
7479
7461
|
thoughtSpotHost: string;
|
|
7480
7462
|
constructor(thoughtSpotHost: string);
|
|
7481
|
-
executeUiPassthroughApi:
|
|
7482
|
-
handleUiPassthroughForHostEvent:
|
|
7463
|
+
executeUiPassthroughApi<UiPassthroughEventT extends UiPassthroughEvent>(iFrame: HTMLIFrameElement, apiName: UiPassthroughEventT, parameters: UiPassthroughRequest<UiPassthroughEventT>): UiPassthroughArrayResponse<UiPassthroughEventT>;
|
|
7464
|
+
handleUiPassthroughForHostEvent<UiPassthroughEventT extends UiPassthroughEvent>(iFrame: HTMLIFrameElement, apiName: UiPassthroughEventT, parameters: UiPassthroughRequest<UiPassthroughEventT>): Promise<UiPassthroughResponse<UiPassthroughEventT>>;
|
|
7483
7465
|
hostEventFallback(iFrame: HTMLIFrameElement, hostEvent: HostEvent, data: any): Promise<any>;
|
|
7484
7466
|
executeHostEvent<T extends HostEvent>(iFrame: HTMLIFrameElement, hostEvent: HostEvent, payload?: HostEventRequest<T>): Promise<HostEventResponse<HostEvent>>;
|
|
7485
7467
|
}
|
|
7486
|
-
export {};
|
|
7487
7468
|
|