@thoughtspot/visual-embed-sdk 1.44.4-HE-beta.1 → 1.44.4
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/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/conversation.d.ts +0 -7
- package/cjs/src/embed/conversation.d.ts.map +1 -1
- package/cjs/src/embed/conversation.js +0 -9
- package/cjs/src/embed/conversation.js.map +1 -1
- package/cjs/src/embed/hostEventClient/contracts.d.ts +3 -20
- package/cjs/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/cjs/src/embed/hostEventClient/contracts.js +1 -6
- package/cjs/src/embed/hostEventClient/contracts.js.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.d.ts +8 -8
- package/cjs/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.js +18 -18
- package/cjs/src/embed/hostEventClient/host-event-client.js.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.spec.js +7 -7
- package/cjs/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts +3 -9
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +2 -12
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/liveboard.spec.js +1 -1
- package/cjs/src/embed/liveboard.spec.js.map +1 -1
- package/cjs/src/embed/sage.d.ts +0 -7
- package/cjs/src/embed/sage.d.ts.map +1 -1
- package/cjs/src/embed/sage.js +0 -9
- package/cjs/src/embed/sage.js.map +1 -1
- package/cjs/src/embed/search-bar.d.ts +0 -7
- package/cjs/src/embed/search-bar.d.ts.map +1 -1
- package/cjs/src/embed/search-bar.js +0 -9
- package/cjs/src/embed/search-bar.js.map +1 -1
- package/cjs/src/embed/search.d.ts +0 -7
- package/cjs/src/embed/search.d.ts.map +1 -1
- package/cjs/src/embed/search.js +0 -9
- package/cjs/src/embed/search.js.map +1 -1
- package/cjs/src/embed/ts-embed.d.ts +2 -8
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +2 -17
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/embed/ts-embed.spec.js +16 -16
- package/cjs/src/embed/ts-embed.spec.js.map +1 -1
- package/cjs/src/index.d.ts +2 -2
- package/cjs/src/index.d.ts.map +1 -1
- package/cjs/src/index.js +2 -3
- package/cjs/src/index.js.map +1 -1
- package/cjs/src/types.d.ts +1 -42
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +1 -17
- package/cjs/src/types.js.map +1 -1
- package/cjs/src/utils/logger.spec.d.ts +5 -20
- package/cjs/src/utils/logger.spec.d.ts.map +1 -1
- package/cjs/src/utils/processTrigger.d.ts +2 -3
- package/cjs/src/utils/processTrigger.d.ts.map +1 -1
- package/cjs/src/utils/processTrigger.js +2 -4
- package/cjs/src/utils/processTrigger.js.map +1 -1
- package/cjs/src/utils.d.ts +1 -5
- package/cjs/src/utils.d.ts.map +1 -1
- package/cjs/src/utils.js +1 -8
- package/cjs/src/utils.js.map +1 -1
- package/dist/{index-CWQnMX2L.js → index-C5FAW929.js} +1 -1
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/conversation.d.ts +0 -7
- package/dist/src/embed/conversation.d.ts.map +1 -1
- package/dist/src/embed/hostEventClient/contracts.d.ts +3 -20
- package/dist/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/dist/src/embed/hostEventClient/host-event-client.d.ts +8 -8
- package/dist/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts +3 -9
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/embed/sage.d.ts +0 -7
- package/dist/src/embed/sage.d.ts.map +1 -1
- package/dist/src/embed/search-bar.d.ts +0 -7
- package/dist/src/embed/search-bar.d.ts.map +1 -1
- package/dist/src/embed/search.d.ts +0 -7
- package/dist/src/embed/search.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.d.ts +2 -8
- package/dist/src/embed/ts-embed.d.ts.map +1 -1
- package/dist/src/index.d.ts +2 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/types.d.ts +1 -42
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/logger.spec.d.ts +5 -20
- package/dist/src/utils/logger.spec.d.ts.map +1 -1
- package/dist/src/utils/processTrigger.d.ts +2 -3
- package/dist/src/utils/processTrigger.d.ts.map +1 -1
- package/dist/src/utils.d.ts +1 -5
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +28 -117
- package/dist/tsembed-react.js +27 -116
- package/dist/tsembed.es.js +29 -118
- package/dist/tsembed.js +27 -116
- package/dist/visual-embed-sdk-react-full.d.ts +12 -105
- package/dist/visual-embed-sdk-react.d.ts +12 -105
- package/dist/visual-embed-sdk.d.ts +12 -105
- package/lib/package.json +1 -1
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/conversation.d.ts +0 -7
- package/lib/src/embed/conversation.d.ts.map +1 -1
- package/lib/src/embed/conversation.js +0 -9
- package/lib/src/embed/conversation.js.map +1 -1
- package/lib/src/embed/hostEventClient/contracts.d.ts +3 -20
- package/lib/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/lib/src/embed/hostEventClient/contracts.js +0 -5
- package/lib/src/embed/hostEventClient/contracts.js.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.d.ts +8 -8
- package/lib/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.js +18 -18
- package/lib/src/embed/hostEventClient/host-event-client.js.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.spec.js +7 -7
- package/lib/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts +3 -9
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +2 -12
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +1 -1
- package/lib/src/embed/liveboard.spec.js.map +1 -1
- package/lib/src/embed/sage.d.ts +0 -7
- package/lib/src/embed/sage.d.ts.map +1 -1
- package/lib/src/embed/sage.js +0 -9
- package/lib/src/embed/sage.js.map +1 -1
- package/lib/src/embed/search-bar.d.ts +0 -7
- package/lib/src/embed/search-bar.d.ts.map +1 -1
- package/lib/src/embed/search-bar.js +0 -9
- package/lib/src/embed/search-bar.js.map +1 -1
- package/lib/src/embed/search.d.ts +0 -7
- package/lib/src/embed/search.d.ts.map +1 -1
- package/lib/src/embed/search.js +0 -9
- package/lib/src/embed/search.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts +2 -8
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +2 -17
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/embed/ts-embed.spec.js +16 -16
- package/lib/src/embed/ts-embed.spec.js.map +1 -1
- package/lib/src/index.d.ts +2 -2
- package/lib/src/index.d.ts.map +1 -1
- package/lib/src/index.js +2 -2
- package/lib/src/index.js.map +1 -1
- package/lib/src/types.d.ts +1 -42
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +0 -16
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils/logger.spec.d.ts +5 -20
- package/lib/src/utils/logger.spec.d.ts.map +1 -1
- package/lib/src/utils/processTrigger.d.ts +2 -3
- package/lib/src/utils/processTrigger.d.ts.map +1 -1
- package/lib/src/utils/processTrigger.js +2 -4
- package/lib/src/utils/processTrigger.js.map +1 -1
- package/lib/src/utils.d.ts +1 -5
- package/lib/src/utils.d.ts.map +1 -1
- package/lib/src/utils.js +0 -6
- package/lib/src/utils.js.map +1 -1
- package/package.json +1 -1
- package/src/embed/app.ts +0 -1
- package/src/embed/conversation.ts +0 -11
- package/src/embed/hostEventClient/contracts.ts +4 -23
- package/src/embed/hostEventClient/host-event-client.spec.ts +1 -7
- package/src/embed/hostEventClient/host-event-client.ts +11 -22
- package/src/embed/liveboard.spec.ts +1 -1
- package/src/embed/liveboard.ts +4 -17
- package/src/embed/sage.ts +0 -11
- package/src/embed/search-bar.tsx +0 -11
- package/src/embed/search.ts +0 -11
- package/src/embed/ts-embed.spec.ts +5 -17
- package/src/embed/ts-embed.ts +3 -21
- package/src/index.ts +0 -2
- package/src/types.ts +0 -46
- package/src/utils/processTrigger.ts +3 -6
- package/src/utils.ts +0 -8
- package/dist/index-BFdRRz03.js +0 -7371
- package/dist/index-BUfrYJ3w.js +0 -7371
- package/dist/index-CI6s4VMY.js +0 -7371
- package/dist/index-CaW-1mu5.js +0 -7371
- package/dist/index-CcSgNJVi.js +0 -7371
- package/dist/index-Djtv-y7A.js +0 -7371
- package/dist/index-UY-4yjBN.js +0 -7371
package/dist/tsembed.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @thoughtspot/visual-embed-sdk version 1.44.4
|
|
1
|
+
/* @thoughtspot/visual-embed-sdk version 1.44.4 */
|
|
2
2
|
'use client';
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
@@ -3066,15 +3066,6 @@
|
|
|
3066
3066
|
* @version SDK: 1.45.0 | ThoughtSpot: 26.2.0.cl
|
|
3067
3067
|
*/
|
|
3068
3068
|
HostEvent["StartNewSpotterConversation"] = "StartNewSpotterConversation";
|
|
3069
|
-
/**
|
|
3070
|
-
* Get the current context of the embedded page.
|
|
3071
|
-
* @example
|
|
3072
|
-
* ```js
|
|
3073
|
-
* const context = await liveboardEmbed.trigger(HostEvent.GetPageContext);
|
|
3074
|
-
* ```
|
|
3075
|
-
* @version SDK: 1.45.0 | ThoughtSpot: 26.2.0.cl
|
|
3076
|
-
*/
|
|
3077
|
-
HostEvent["GetPageContext"] = "GetPageContext";
|
|
3078
3069
|
})(exports.HostEvent || (exports.HostEvent = {}));
|
|
3079
3070
|
/**
|
|
3080
3071
|
* The different visual modes that the data sources panel within
|
|
@@ -4787,13 +4778,6 @@
|
|
|
4787
4778
|
/** Failed to update embed parameters during pre-render */
|
|
4788
4779
|
EmbedErrorCodes["UPDATE_PARAMS_FAILED"] = "UPDATE_PARAMS_FAILED";
|
|
4789
4780
|
})(exports.EmbedErrorCodes || (exports.EmbedErrorCodes = {}));
|
|
4790
|
-
exports.ContextType = void 0;
|
|
4791
|
-
(function (ContextType) {
|
|
4792
|
-
ContextType["Search"] = "search-answer";
|
|
4793
|
-
ContextType["Liveboard"] = "liveboard";
|
|
4794
|
-
ContextType["Answer"] = "answer";
|
|
4795
|
-
ContextType["Spotter"] = "spotter";
|
|
4796
|
-
})(exports.ContextType || (exports.ContextType = {}));
|
|
4797
4781
|
/**
|
|
4798
4782
|
* Enum for the type of API intercepted
|
|
4799
4783
|
*/
|
|
@@ -5433,12 +5417,6 @@
|
|
|
5433
5417
|
return values[key] !== undefined ? String(values[key]) : match;
|
|
5434
5418
|
});
|
|
5435
5419
|
};
|
|
5436
|
-
const getHostEventsConfig = (viewConfig) => {
|
|
5437
|
-
return {
|
|
5438
|
-
shouldBypassPayloadValidation: viewConfig.shouldBypassPayloadValidation,
|
|
5439
|
-
useHostEventsV2: viewConfig.useHostEventsV2,
|
|
5440
|
-
};
|
|
5441
|
-
};
|
|
5442
5420
|
/**
|
|
5443
5421
|
* Check if the window is undefined
|
|
5444
5422
|
* If the window is undefined, it means the code is running in a SSR environment.
|
|
@@ -7736,12 +7714,7 @@
|
|
|
7736
7714
|
UIPassthroughEvent["GetAnswerConfig"] = "getAnswerPageConfig";
|
|
7737
7715
|
UIPassthroughEvent["GetLiveboardConfig"] = "getPinboardPageConfig";
|
|
7738
7716
|
UIPassthroughEvent["GetUnsavedAnswerTML"] = "getUnsavedAnswerTML";
|
|
7739
|
-
})(exports.UIPassthroughEvent || (exports.UIPassthroughEvent = {}));
|
|
7740
|
-
var PageType;
|
|
7741
|
-
(function (PageType) {
|
|
7742
|
-
PageType["PAGE"] = "page";
|
|
7743
|
-
PageType["DIALOG"] = "dialog";
|
|
7744
|
-
})(PageType || (PageType = {}));
|
|
7717
|
+
})(exports.UIPassthroughEvent || (exports.UIPassthroughEvent = {}));
|
|
7745
7718
|
|
|
7746
7719
|
const EndPoints = {
|
|
7747
7720
|
AUTH_VERIFICATION: '/callosum/v1/session/info',
|
|
@@ -17528,7 +17501,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
17528
17501
|
* @param message
|
|
17529
17502
|
* @param message.type
|
|
17530
17503
|
* @param message.data
|
|
17531
|
-
* @param message.context
|
|
17532
17504
|
* @param thoughtSpotHost
|
|
17533
17505
|
* @param channel
|
|
17534
17506
|
*/
|
|
@@ -17543,9 +17515,8 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
17543
17515
|
* @param messageType
|
|
17544
17516
|
* @param thoughtSpotHost
|
|
17545
17517
|
* @param data
|
|
17546
|
-
* @param context
|
|
17547
17518
|
*/
|
|
17548
|
-
function processTrigger(iFrame, messageType, thoughtSpotHost, data
|
|
17519
|
+
function processTrigger(iFrame, messageType, thoughtSpotHost, data) {
|
|
17549
17520
|
return new Promise((res, rej) => {
|
|
17550
17521
|
var _a;
|
|
17551
17522
|
if (messageType === exports.HostEvent.Reload) {
|
|
@@ -17579,7 +17550,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
17579
17550
|
channel.port1.close();
|
|
17580
17551
|
res(new Error(ERROR_MESSAGE.TRIGGER_TIMED_OUT));
|
|
17581
17552
|
}, TRIGGER_TIMEOUT);
|
|
17582
|
-
return postIframeMessage(iFrame, { type: messageType, data
|
|
17553
|
+
return postIframeMessage(iFrame, { type: messageType, data }, thoughtSpotHost, channel);
|
|
17583
17554
|
});
|
|
17584
17555
|
}
|
|
17585
17556
|
|
|
@@ -18078,7 +18049,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18078
18049
|
return eventData;
|
|
18079
18050
|
}
|
|
18080
18051
|
|
|
18081
|
-
var name="@thoughtspot/visual-embed-sdk";var version$1="1.44.4
|
|
18052
|
+
var name="@thoughtspot/visual-embed-sdk";var version$1="1.44.4";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 tsconfig.build.json --incremental false; tsc -p tsconfig.build.json --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle-generator --config ./dts-config/dts-bundle-file.config.js","bundle-dts":"dts-bundle-generator --config ./dts-config/dts-bundle.config.js","bundle-dts-react":"dts-bundle-generator --config ./dts-config/dts-bundle-react.config.js","bundle-dts-react-full":"dts-bundle-generator --config ./dts-config/dts-bundle-react-full.config.js",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.build.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 | npx coveralls-next","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest",dev:"vite -c vite.local.config.ts"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={classnames:"^2.3.1",eventemitter3:"^4.0.7",lodash:"^4.17.21","mixpanel-browser":"2.47.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1",yaml:"^2.5.1"};var devDependencies={"@mdx-js/mdx":"^1.6.22","@mdx-js/react":"^1.6.22","@react-icons/all-files":"^4.1.0","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^5.0.2","@size-limit/preset-big-lib":"^11.2.0","@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":"^30.0.0","@types/lodash":"^4.17.0","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^8.28.0","@typescript-eslint/parser":"^8.28.0",ajv:"^8.17.1",asciidoctor:"^2.2.1","babel-jest":"^30.2.0","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1","coveralls-next":"^5.0.0",crypto:"^1.0.1","current-git-branch":"^1.1.0","dts-bundle-generator":"^9.5.1",eslint:"^9.23.0","eslint-config-airbnb-base":"^15.0.0","eslint-config-prettier":"^10.1.1","eslint-import-resolver-typescript":"^4.2.5","eslint-plugin-comment-length":"2.2.1","eslint-plugin-import":"^2.31.0","eslint-plugin-jsdoc":"^50.6.9","eslint-plugin-prettier":"^5.2.5","eslint-plugin-react":"^7.37.5","eslint-plugin-react-hooks":"^5.2.0","fs-extra":"^10.0.0","gh-pages":"6.3.0",globals:"^16.0.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^2.0.0",jest:"^30.2.0","jest-environment-jsdom":"^29.7.0","jest-fetch-mock":"^3.0.3",jsdom:"^17.0.0",prettier:"2.1.2",react:"^16.14.0","react-dom":"^16.14.0","react-resizable":"^1.11.0","react-resize-detector":"^6.6.0","react-test-renderer":"^17.0.2","react-use-flexsearch":"^0.1.1",rollup:"4.24.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^29.4.6","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","typescript-eslint":"^8.29.1","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^6.3.5"};var author="ThoughtSpot";var email="support@thoughtspot.com";var license="ThoughtSpot Development Tools End User License Agreement";var directories={lib:"lib"};var repository={type:"git",url:"git+https://github.com/thoughtspot/visual-embed-sdk.git"};var publishConfig={registry:"https://registry.npmjs.org"};var keywords=["thoughtspot","everywhere","embedded","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version$1,description:description,module:module,main:main,types:types,files:files,exports:exports$1,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.es.js",limit:"32 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};
|
|
18082
18053
|
|
|
18083
18054
|
class HostEventClient {
|
|
18084
18055
|
constructor(iFrame) {
|
|
@@ -18090,16 +18061,16 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18090
18061
|
* @param {any} data Data to send with the host event
|
|
18091
18062
|
* @returns {Promise<any>} - the response from the process trigger
|
|
18092
18063
|
*/
|
|
18093
|
-
async processTrigger(message, data
|
|
18064
|
+
async processTrigger(message, data) {
|
|
18094
18065
|
if (!this.iFrame) {
|
|
18095
18066
|
throw new Error('Iframe element is not set');
|
|
18096
18067
|
}
|
|
18097
18068
|
const thoughtspotHost = getEmbedConfig().thoughtSpotHost;
|
|
18098
|
-
return processTrigger(this.iFrame, message, thoughtspotHost, data
|
|
18069
|
+
return processTrigger(this.iFrame, message, thoughtspotHost, data);
|
|
18099
18070
|
}
|
|
18100
|
-
async handleHostEventWithParam(apiName, parameters
|
|
18071
|
+
async handleHostEventWithParam(apiName, parameters) {
|
|
18101
18072
|
var _a, _b, _c, _d;
|
|
18102
|
-
const response = (_b = (_a = (await this.triggerUIPassthroughApi(apiName, parameters
|
|
18073
|
+
const response = (_b = (_a = (await this.triggerUIPassthroughApi(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];
|
|
18103
18074
|
if (!response) {
|
|
18104
18075
|
const error = `No answer found${parameters.vizId ? ` for vizId: ${parameters.vizId}` : ''}.`;
|
|
18105
18076
|
// eslint-disable-next-line no-throw-literal
|
|
@@ -18114,8 +18085,8 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18114
18085
|
}
|
|
18115
18086
|
return { ...response.value };
|
|
18116
18087
|
}
|
|
18117
|
-
async hostEventFallback(hostEvent, data
|
|
18118
|
-
return this.processTrigger(hostEvent, data
|
|
18088
|
+
async hostEventFallback(hostEvent, data) {
|
|
18089
|
+
return this.processTrigger(hostEvent, data);
|
|
18119
18090
|
}
|
|
18120
18091
|
/**
|
|
18121
18092
|
* Setter for the iframe element used for host events
|
|
@@ -18124,49 +18095,49 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18124
18095
|
setIframeElement(iFrame) {
|
|
18125
18096
|
this.iFrame = iFrame;
|
|
18126
18097
|
}
|
|
18127
|
-
async triggerUIPassthroughApi(apiName, parameters
|
|
18098
|
+
async triggerUIPassthroughApi(apiName, parameters) {
|
|
18128
18099
|
const res = await this.processTrigger(exports.HostEvent.UIPassthrough, {
|
|
18129
18100
|
type: apiName,
|
|
18130
18101
|
parameters,
|
|
18131
|
-
}
|
|
18102
|
+
});
|
|
18132
18103
|
return res;
|
|
18133
18104
|
}
|
|
18134
|
-
async handlePinEvent(payload
|
|
18105
|
+
async handlePinEvent(payload) {
|
|
18135
18106
|
var _a, _b;
|
|
18136
18107
|
if (!payload || !('newVizName' in payload)) {
|
|
18137
|
-
return this.hostEventFallback(exports.HostEvent.Pin, payload
|
|
18108
|
+
return this.hostEventFallback(exports.HostEvent.Pin, payload);
|
|
18138
18109
|
}
|
|
18139
18110
|
const formattedPayload = {
|
|
18140
18111
|
...payload,
|
|
18141
18112
|
pinboardId: (_a = payload.liveboardId) !== null && _a !== void 0 ? _a : payload.pinboardId,
|
|
18142
18113
|
newPinboardName: (_b = payload.newLiveboardName) !== null && _b !== void 0 ? _b : payload.newPinboardName,
|
|
18143
18114
|
};
|
|
18144
|
-
const data = await this.handleHostEventWithParam(exports.UIPassthroughEvent.PinAnswerToLiveboard, formattedPayload
|
|
18115
|
+
const data = await this.handleHostEventWithParam(exports.UIPassthroughEvent.PinAnswerToLiveboard, formattedPayload);
|
|
18145
18116
|
return {
|
|
18146
18117
|
...data,
|
|
18147
18118
|
liveboardId: data.pinboardId,
|
|
18148
18119
|
};
|
|
18149
18120
|
}
|
|
18150
|
-
async handleSaveAnswerEvent(payload
|
|
18121
|
+
async handleSaveAnswerEvent(payload) {
|
|
18151
18122
|
var _a, _b, _c, _d;
|
|
18152
18123
|
if (!payload || !('name' in payload) || !('description' in payload)) {
|
|
18153
18124
|
// Save is the fallback for SaveAnswer
|
|
18154
|
-
return this.hostEventFallback(exports.HostEvent.Save, payload
|
|
18125
|
+
return this.hostEventFallback(exports.HostEvent.Save, payload);
|
|
18155
18126
|
}
|
|
18156
|
-
const data = await this.handleHostEventWithParam(exports.UIPassthroughEvent.SaveAnswer, payload
|
|
18127
|
+
const data = await this.handleHostEventWithParam(exports.UIPassthroughEvent.SaveAnswer, payload);
|
|
18157
18128
|
return {
|
|
18158
18129
|
...data,
|
|
18159
18130
|
answerId: (_d = (_c = (_b = (_a = data === null || data === void 0 ? void 0 : data.saveResponse) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.Answer__save) === null || _c === void 0 ? void 0 : _c.answer) === null || _d === void 0 ? void 0 : _d.id,
|
|
18160
18131
|
};
|
|
18161
18132
|
}
|
|
18162
|
-
async triggerHostEvent(hostEvent, payload
|
|
18133
|
+
async triggerHostEvent(hostEvent, payload) {
|
|
18163
18134
|
switch (hostEvent) {
|
|
18164
18135
|
case exports.HostEvent.Pin:
|
|
18165
|
-
return this.handlePinEvent(payload
|
|
18136
|
+
return this.handlePinEvent(payload);
|
|
18166
18137
|
case exports.HostEvent.SaveAnswer:
|
|
18167
|
-
return this.handleSaveAnswerEvent(payload
|
|
18138
|
+
return this.handleSaveAnswerEvent(payload);
|
|
18168
18139
|
default:
|
|
18169
|
-
return this.hostEventFallback(hostEvent, payload
|
|
18140
|
+
return this.hostEventFallback(hostEvent, payload);
|
|
18170
18141
|
}
|
|
18171
18142
|
}
|
|
18172
18143
|
}
|
|
@@ -18801,7 +18772,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18801
18772
|
hiddenListColumns: this.viewConfig.hiddenListColumns || [],
|
|
18802
18773
|
customActions: customActionsResult.actions,
|
|
18803
18774
|
...getInterceptInitData(this.viewConfig),
|
|
18804
|
-
...getHostEventsConfig(this.viewConfig),
|
|
18805
18775
|
};
|
|
18806
18776
|
return baseInitData;
|
|
18807
18777
|
}
|
|
@@ -19426,7 +19396,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
19426
19396
|
* @param {any} data The payload to send with the message
|
|
19427
19397
|
* @returns A promise that resolves with the response from the embedded app
|
|
19428
19398
|
*/
|
|
19429
|
-
async trigger(messageType, data = {}
|
|
19399
|
+
async trigger(messageType, data = {}) {
|
|
19430
19400
|
uploadMixpanelEvent(`${MIXPANEL_EVENT.VISUAL_SDK_TRIGGER}-${messageType}`);
|
|
19431
19401
|
if (!this.isRendered) {
|
|
19432
19402
|
this.handleError({
|
|
@@ -19453,7 +19423,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
19453
19423
|
return null;
|
|
19454
19424
|
}
|
|
19455
19425
|
// send an empty object, this is needed for liveboard default handlers
|
|
19456
|
-
return this.hostEventClient.triggerHostEvent(messageType, data
|
|
19426
|
+
return this.hostEventClient.triggerHostEvent(messageType, data);
|
|
19457
19427
|
}
|
|
19458
19428
|
/**
|
|
19459
19429
|
* Triggers an event to the embedded app, skipping the UI flow.
|
|
@@ -19486,19 +19456,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
19486
19456
|
handleRenderForPrerender() {
|
|
19487
19457
|
return this.render();
|
|
19488
19458
|
}
|
|
19489
|
-
/**
|
|
19490
|
-
* Get the current context of the embedded TS component.
|
|
19491
|
-
* @returns The current context object containing the page type and object ids.
|
|
19492
|
-
* @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl
|
|
19493
|
-
*/
|
|
19494
|
-
async getCurrentContext() {
|
|
19495
|
-
return new Promise((resolve) => {
|
|
19496
|
-
this.executeAfterEmbedContainerLoaded(async () => {
|
|
19497
|
-
const context = await this.trigger(exports.HostEvent.GetPageContext, {});
|
|
19498
|
-
resolve(context);
|
|
19499
|
-
});
|
|
19500
|
-
});
|
|
19501
|
-
}
|
|
19502
19459
|
/**
|
|
19503
19460
|
* Creates the preRender shell
|
|
19504
19461
|
* @param showPreRenderByDefault - Show the preRender after render, hidden by default
|
|
@@ -20372,7 +20329,6 @@ query GetEurekaVizSnapshots(
|
|
|
20372
20329
|
super(domSelector, viewConfig);
|
|
20373
20330
|
this.defaultHeight = 500;
|
|
20374
20331
|
this.sendFullHeightLazyLoadData = () => {
|
|
20375
|
-
console.log('sendFullHeightLazyLoadData', this.iFrame);
|
|
20376
20332
|
const data = calculateVisibleElementData(this.iFrame);
|
|
20377
20333
|
this.trigger(exports.HostEvent.VisibleEmbedCoordinates, data);
|
|
20378
20334
|
};
|
|
@@ -20633,7 +20589,7 @@ query GetEurekaVizSnapshots(
|
|
|
20633
20589
|
* @param {any} data The payload to send with the message
|
|
20634
20590
|
* @returns A promise that resolves with the response from the embedded app
|
|
20635
20591
|
*/
|
|
20636
|
-
trigger(messageType, data = {}
|
|
20592
|
+
trigger(messageType, data = {}) {
|
|
20637
20593
|
const dataWithVizId = data;
|
|
20638
20594
|
if (messageType === exports.HostEvent.SetActiveTab) {
|
|
20639
20595
|
this.setActiveTab(data);
|
|
@@ -20642,7 +20598,7 @@ query GetEurekaVizSnapshots(
|
|
|
20642
20598
|
if (typeof dataWithVizId === 'object' && this.viewConfig.vizId) {
|
|
20643
20599
|
dataWithVizId.vizId = this.viewConfig.vizId;
|
|
20644
20600
|
}
|
|
20645
|
-
return super.trigger(messageType, dataWithVizId
|
|
20601
|
+
return super.trigger(messageType, dataWithVizId);
|
|
20646
20602
|
}
|
|
20647
20603
|
/**
|
|
20648
20604
|
* Destroys the ThoughtSpot embed, and remove any nodes from the DOM.
|
|
@@ -20711,15 +20667,6 @@ query GetEurekaVizSnapshots(
|
|
|
20711
20667
|
}
|
|
20712
20668
|
return url;
|
|
20713
20669
|
}
|
|
20714
|
-
/**
|
|
20715
|
-
* Get the current context of the embedded liveboard.
|
|
20716
|
-
* @returns The current context object containing the page type and object ids.
|
|
20717
|
-
* @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl
|
|
20718
|
-
*/
|
|
20719
|
-
async getCurrentContext() {
|
|
20720
|
-
const context = await super.getCurrentContext();
|
|
20721
|
-
return context;
|
|
20722
|
-
}
|
|
20723
20670
|
}
|
|
20724
20671
|
/**
|
|
20725
20672
|
* @hidden
|
|
@@ -20900,15 +20847,6 @@ query GetEurekaVizSnapshots(
|
|
|
20900
20847
|
});
|
|
20901
20848
|
return this;
|
|
20902
20849
|
}
|
|
20903
|
-
/**
|
|
20904
|
-
* Get the current context of the embedded search.
|
|
20905
|
-
* @returns The current context object containing the page type and object ids.
|
|
20906
|
-
* @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl
|
|
20907
|
-
*/
|
|
20908
|
-
async getCurrentContext() {
|
|
20909
|
-
const context = await super.getCurrentContext();
|
|
20910
|
-
return context;
|
|
20911
|
-
}
|
|
20912
20850
|
}
|
|
20913
20851
|
|
|
20914
20852
|
/**
|
|
@@ -20984,15 +20922,6 @@ query GetEurekaVizSnapshots(
|
|
|
20984
20922
|
const defaultAppInitData = await super.getAppInitData();
|
|
20985
20923
|
return { ...defaultAppInitData, ...this.getSearchInitData() };
|
|
20986
20924
|
}
|
|
20987
|
-
/**
|
|
20988
|
-
* Get the current context of the embedded search bar.
|
|
20989
|
-
* @returns The current context object containing the page type and object ids.
|
|
20990
|
-
* @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl
|
|
20991
|
-
*/
|
|
20992
|
-
async getCurrentContext() {
|
|
20993
|
-
const context = await super.getCurrentContext();
|
|
20994
|
-
return context;
|
|
20995
|
-
}
|
|
20996
20925
|
}
|
|
20997
20926
|
|
|
20998
20927
|
const createConversation = `
|
|
@@ -21622,15 +21551,6 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
21622
21551
|
await this.renderIFrame(src);
|
|
21623
21552
|
return this;
|
|
21624
21553
|
}
|
|
21625
|
-
/**
|
|
21626
|
-
* Get the current context of the embedded SpotterEmbed.
|
|
21627
|
-
* @returns The current context object containing the page type and object ids.
|
|
21628
|
-
* @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl
|
|
21629
|
-
*/
|
|
21630
|
-
async getCurrentContext() {
|
|
21631
|
-
const context = await super.getCurrentContext();
|
|
21632
|
-
return context;
|
|
21633
|
-
}
|
|
21634
21554
|
}
|
|
21635
21555
|
/**
|
|
21636
21556
|
* Embed ThoughtSpot AI Conversation.
|
|
@@ -21737,15 +21657,6 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
21737
21657
|
await this.renderV1Embed(src);
|
|
21738
21658
|
return this;
|
|
21739
21659
|
}
|
|
21740
|
-
/**
|
|
21741
|
-
* Get the current context of the embedded SageEmbed.
|
|
21742
|
-
* @returns The current context object containing the page type and object ids.
|
|
21743
|
-
* @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl
|
|
21744
|
-
*/
|
|
21745
|
-
async getCurrentContext() {
|
|
21746
|
-
const context = await super.getCurrentContext();
|
|
21747
|
-
return context;
|
|
21748
|
-
}
|
|
21749
21660
|
}
|
|
21750
21661
|
|
|
21751
21662
|
const getAnswerSessionFromQuery = `
|
|
@@ -1925,32 +1925,6 @@ export interface BaseViewConfig extends ApiInterceptFlags {
|
|
|
1925
1925
|
* ```
|
|
1926
1926
|
*/
|
|
1927
1927
|
customActions?: CustomAction[];
|
|
1928
|
-
/**
|
|
1929
|
-
* Flag to bypass host events payload validation
|
|
1930
|
-
* @default false
|
|
1931
|
-
* @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl
|
|
1932
|
-
* @example
|
|
1933
|
-
* ```js
|
|
1934
|
-
* const embed = new AppEmbed('#tsEmbed', {
|
|
1935
|
-
* ... // other embed view config
|
|
1936
|
-
* shouldBypassPayloadValidation:true,
|
|
1937
|
-
* })
|
|
1938
|
-
* ```
|
|
1939
|
-
*/
|
|
1940
|
-
shouldBypassPayloadValidation?: boolean;
|
|
1941
|
-
/**
|
|
1942
|
-
* Flag to use host events v2. This is used to enable the new host events v2 API.
|
|
1943
|
-
* @default false
|
|
1944
|
-
* @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl
|
|
1945
|
-
* @example
|
|
1946
|
-
* ```js
|
|
1947
|
-
* const embed = new AppEmbed('#tsEmbed', {
|
|
1948
|
-
* ... // other embed view config
|
|
1949
|
-
* useHostEventsV2:true,
|
|
1950
|
-
* })
|
|
1951
|
-
* ```
|
|
1952
|
-
*/
|
|
1953
|
-
useHostEventsV2?: boolean;
|
|
1954
1928
|
}
|
|
1955
1929
|
/**
|
|
1956
1930
|
* The configuration object for Home page embeds configs.
|
|
@@ -5312,16 +5286,7 @@ export declare enum HostEvent {
|
|
|
5312
5286
|
* ```
|
|
5313
5287
|
* @version SDK: 1.45.0 | ThoughtSpot: 26.2.0.cl
|
|
5314
5288
|
*/
|
|
5315
|
-
StartNewSpotterConversation = "StartNewSpotterConversation"
|
|
5316
|
-
/**
|
|
5317
|
-
* Get the current context of the embedded page.
|
|
5318
|
-
* @example
|
|
5319
|
-
* ```js
|
|
5320
|
-
* const context = await liveboardEmbed.trigger(HostEvent.GetPageContext);
|
|
5321
|
-
* ```
|
|
5322
|
-
* @version SDK: 1.45.0 | ThoughtSpot: 26.2.0.cl
|
|
5323
|
-
*/
|
|
5324
|
-
GetPageContext = "GetPageContext"
|
|
5289
|
+
StartNewSpotterConversation = "StartNewSpotterConversation"
|
|
5325
5290
|
}
|
|
5326
5291
|
/**
|
|
5327
5292
|
* The different visual modes that the data sources panel within
|
|
@@ -6940,12 +6905,6 @@ export interface EmbedErrorDetailsEvent {
|
|
|
6940
6905
|
/** Additional context-specific for backward compatibility */
|
|
6941
6906
|
[key: string]: any;
|
|
6942
6907
|
}
|
|
6943
|
-
declare enum ContextType {
|
|
6944
|
-
Search = "search-answer",
|
|
6945
|
-
Liveboard = "liveboard",
|
|
6946
|
-
Answer = "answer",
|
|
6947
|
-
Spotter = "spotter"
|
|
6948
|
-
}
|
|
6949
6908
|
export interface DefaultAppInitData {
|
|
6950
6909
|
customisations: CustomisationsInterface;
|
|
6951
6910
|
authToken: string;
|
|
@@ -7207,25 +7166,9 @@ export type EmbedApiHostEventMapping = {
|
|
|
7207
7166
|
[HostEvent.SaveAnswer]: UIPassthroughEvent.SaveAnswer;
|
|
7208
7167
|
};
|
|
7209
7168
|
export type HostEventRequest<HostEventT extends HostEvent> = HostEventT extends keyof EmbedApiHostEventMapping ? UIPassthroughRequest<EmbedApiHostEventMapping[HostEventT]> : any;
|
|
7210
|
-
export type HostEventResponse<HostEventT extends HostEvent
|
|
7169
|
+
export type HostEventResponse<HostEventT extends HostEvent> = HostEventT extends keyof EmbedApiHostEventMapping ? UIPassthroughResponse<EmbedApiHostEventMapping[HostEventT]> : any;
|
|
7211
7170
|
export type TriggerPayload<PayloadT, HostEventT extends HostEvent> = PayloadT | HostEventRequest<HostEventT>;
|
|
7212
|
-
export type TriggerResponse<PayloadT, HostEventT extends HostEvent
|
|
7213
|
-
declare enum PageType {
|
|
7214
|
-
PAGE = "page",
|
|
7215
|
-
DIALOG = "dialog"
|
|
7216
|
-
}
|
|
7217
|
-
export interface Objects {
|
|
7218
|
-
answerId?: string;
|
|
7219
|
-
liveboardId?: string;
|
|
7220
|
-
vizIds?: string[];
|
|
7221
|
-
dataModelIds?: string[];
|
|
7222
|
-
modalTitle?: string;
|
|
7223
|
-
}
|
|
7224
|
-
export interface PageContextOptions {
|
|
7225
|
-
page: ContextType;
|
|
7226
|
-
pageType: PageType;
|
|
7227
|
-
objects: Objects;
|
|
7228
|
-
}
|
|
7171
|
+
export type TriggerResponse<PayloadT, HostEventT extends HostEvent> = PayloadT extends HostEventRequest<HostEventT> ? HostEventResponse<HostEventT> : any;
|
|
7229
7172
|
declare class HostEventClient {
|
|
7230
7173
|
iFrame: HTMLIFrameElement;
|
|
7231
7174
|
constructor(iFrame?: HTMLIFrameElement);
|
|
@@ -7235,18 +7178,18 @@ declare class HostEventClient {
|
|
|
7235
7178
|
* @param {any} data Data to send with the host event
|
|
7236
7179
|
* @returns {Promise<any>} - the response from the process trigger
|
|
7237
7180
|
*/
|
|
7238
|
-
protected processTrigger(message: HostEvent, data: any
|
|
7239
|
-
handleHostEventWithParam<UIPassthroughEventT extends UIPassthroughEvent>(apiName: UIPassthroughEventT, parameters: UIPassthroughRequest<UIPassthroughEventT
|
|
7240
|
-
hostEventFallback(hostEvent: HostEvent, data: any
|
|
7181
|
+
protected processTrigger(message: HostEvent, data: any): Promise<any>;
|
|
7182
|
+
handleHostEventWithParam<UIPassthroughEventT extends UIPassthroughEvent>(apiName: UIPassthroughEventT, parameters: UIPassthroughRequest<UIPassthroughEventT>): Promise<UIPassthroughResponse<UIPassthroughEventT>>;
|
|
7183
|
+
hostEventFallback(hostEvent: HostEvent, data: any): Promise<any>;
|
|
7241
7184
|
/**
|
|
7242
7185
|
* Setter for the iframe element used for host events
|
|
7243
7186
|
* @param {HTMLIFrameElement} iFrame - the iframe element to set
|
|
7244
7187
|
*/
|
|
7245
7188
|
setIframeElement(iFrame: HTMLIFrameElement): void;
|
|
7246
|
-
triggerUIPassthroughApi<UIPassthroughEventT extends UIPassthroughEvent>(apiName: UIPassthroughEventT, parameters: UIPassthroughRequest<UIPassthroughEventT
|
|
7247
|
-
protected handlePinEvent(payload: HostEventRequest<HostEvent.Pin
|
|
7248
|
-
protected handleSaveAnswerEvent(payload: HostEventRequest<HostEvent.SaveAnswer
|
|
7249
|
-
triggerHostEvent<HostEventT extends HostEvent, PayloadT
|
|
7189
|
+
triggerUIPassthroughApi<UIPassthroughEventT extends UIPassthroughEvent>(apiName: UIPassthroughEventT, parameters: UIPassthroughRequest<UIPassthroughEventT>): Promise<UIPassthroughArrayResponse<UIPassthroughEventT>>;
|
|
7190
|
+
protected handlePinEvent(payload: HostEventRequest<HostEvent.Pin>): Promise<HostEventResponse<HostEvent.Pin>>;
|
|
7191
|
+
protected handleSaveAnswerEvent(payload: HostEventRequest<HostEvent.SaveAnswer>): Promise<any>;
|
|
7192
|
+
triggerHostEvent<HostEventT extends HostEvent, PayloadT>(hostEvent: HostEventT, payload?: TriggerPayload<PayloadT, HostEventT>): Promise<TriggerResponse<PayloadT, HostEventT>>;
|
|
7250
7193
|
}
|
|
7251
7194
|
declare class TsEmbed {
|
|
7252
7195
|
/**
|
|
@@ -7568,7 +7511,7 @@ declare class TsEmbed {
|
|
|
7568
7511
|
* @param {any} data The payload to send with the message
|
|
7569
7512
|
* @returns A promise that resolves with the response from the embedded app
|
|
7570
7513
|
*/
|
|
7571
|
-
trigger<HostEventT extends HostEvent, PayloadT
|
|
7514
|
+
trigger<HostEventT extends HostEvent, PayloadT>(messageType: HostEventT, data?: TriggerPayload<PayloadT, HostEventT>): Promise<TriggerResponse<PayloadT, HostEventT>>;
|
|
7572
7515
|
/**
|
|
7573
7516
|
* Triggers an event to the embedded app, skipping the UI flow.
|
|
7574
7517
|
* @param {UIPassthroughEvent} apiName - The name of the API to be triggered.
|
|
@@ -7586,12 +7529,6 @@ declare class TsEmbed {
|
|
|
7586
7529
|
render(): Promise<TsEmbed>;
|
|
7587
7530
|
getIframeSrc(): string;
|
|
7588
7531
|
protected handleRenderForPrerender(): Promise<TsEmbed>;
|
|
7589
|
-
/**
|
|
7590
|
-
* Get the current context of the embedded TS component.
|
|
7591
|
-
* @returns The current context object containing the page type and object ids.
|
|
7592
|
-
* @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl
|
|
7593
|
-
*/
|
|
7594
|
-
getCurrentContext(): Promise<any>;
|
|
7595
7532
|
/**
|
|
7596
7533
|
* Creates the preRender shell
|
|
7597
7534
|
* @param showPreRenderByDefault - Show the preRender after render, hidden by default
|
|
@@ -8017,12 +7954,6 @@ declare class SearchEmbed extends TsEmbed {
|
|
|
8017
7954
|
* Render the embedded ThoughtSpot search
|
|
8018
7955
|
*/
|
|
8019
7956
|
render(): Promise<SearchEmbed>;
|
|
8020
|
-
/**
|
|
8021
|
-
* Get the current context of the embedded search.
|
|
8022
|
-
* @returns The current context object containing the page type and object ids.
|
|
8023
|
-
* @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl
|
|
8024
|
-
*/
|
|
8025
|
-
getCurrentContext(): Promise<PageContextOptions>;
|
|
8026
7957
|
}
|
|
8027
7958
|
/**
|
|
8028
7959
|
* @group Embed components
|
|
@@ -8141,12 +8072,6 @@ declare class SearchBarEmbed extends TsEmbed {
|
|
|
8141
8072
|
searchOptions: SearchOptions;
|
|
8142
8073
|
};
|
|
8143
8074
|
protected getAppInitData(): Promise<SearchAppInitData$1>;
|
|
8144
|
-
/**
|
|
8145
|
-
* Get the current context of the embedded search bar.
|
|
8146
|
-
* @returns The current context object containing the page type and object ids.
|
|
8147
|
-
* @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl
|
|
8148
|
-
*/
|
|
8149
|
-
getCurrentContext(): Promise<PageContextOptions>;
|
|
8150
8075
|
}
|
|
8151
8076
|
interface SearchOptions$1 {
|
|
8152
8077
|
/**
|
|
@@ -8291,12 +8216,6 @@ declare class SageEmbed extends V1Embed {
|
|
|
8291
8216
|
* @returns {SageEmbed} Eureka/Sage embed
|
|
8292
8217
|
*/
|
|
8293
8218
|
render(): Promise<SageEmbed>;
|
|
8294
|
-
/**
|
|
8295
|
-
* Get the current context of the embedded SageEmbed.
|
|
8296
|
-
* @returns The current context object containing the page type and object ids.
|
|
8297
|
-
* @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl
|
|
8298
|
-
*/
|
|
8299
|
-
getCurrentContext(): Promise<PageContextOptions>;
|
|
8300
8219
|
}
|
|
8301
8220
|
/**
|
|
8302
8221
|
* Pages within the ThoughtSpot app that can be embedded.
|
|
@@ -9429,7 +9348,7 @@ declare class LiveboardEmbed extends V1Embed {
|
|
|
9429
9348
|
* @param {any} data The payload to send with the message
|
|
9430
9349
|
* @returns A promise that resolves with the response from the embedded app
|
|
9431
9350
|
*/
|
|
9432
|
-
trigger<HostEventT extends HostEvent, PayloadT
|
|
9351
|
+
trigger<HostEventT extends HostEvent, PayloadT>(messageType: HostEventT, data?: TriggerPayload<PayloadT, HostEventT>): Promise<TriggerResponse<PayloadT, HostEventT>>;
|
|
9433
9352
|
/**
|
|
9434
9353
|
* Destroys the ThoughtSpot embed, and remove any nodes from the DOM.
|
|
9435
9354
|
* @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
|
|
@@ -9451,12 +9370,6 @@ declare class LiveboardEmbed extends V1Embed {
|
|
|
9451
9370
|
* @returns url string
|
|
9452
9371
|
*/
|
|
9453
9372
|
getLiveboardUrl(): string;
|
|
9454
|
-
/**
|
|
9455
|
-
* Get the current context of the embedded liveboard.
|
|
9456
|
-
* @returns The current context object containing the page type and object ids.
|
|
9457
|
-
* @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl
|
|
9458
|
-
*/
|
|
9459
|
-
getCurrentContext(): Promise<PageContextOptions>;
|
|
9460
9373
|
}
|
|
9461
9374
|
/**
|
|
9462
9375
|
* @hidden
|
|
@@ -9699,12 +9612,6 @@ declare class SpotterEmbed extends TsEmbed {
|
|
|
9699
9612
|
protected getEmbedParamsObject(): Record<any, any>;
|
|
9700
9613
|
getIframeSrc(): string;
|
|
9701
9614
|
render(): Promise<SpotterEmbed>;
|
|
9702
|
-
/**
|
|
9703
|
-
* Get the current context of the embedded SpotterEmbed.
|
|
9704
|
-
* @returns The current context object containing the page type and object ids.
|
|
9705
|
-
* @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl
|
|
9706
|
-
*/
|
|
9707
|
-
getCurrentContext(): Promise<PageContextOptions>;
|
|
9708
9615
|
}
|
|
9709
9616
|
declare class ConversationEmbed extends SpotterEmbed {
|
|
9710
9617
|
protected viewConfig: ConversationViewConfig;
|