@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.es.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 _mergeNamespaces(n, m) {
|
|
4
4
|
m.forEach(function (e) {
|
|
@@ -3060,15 +3060,6 @@ var HostEvent;
|
|
|
3060
3060
|
* @version SDK: 1.45.0 | ThoughtSpot: 26.2.0.cl
|
|
3061
3061
|
*/
|
|
3062
3062
|
HostEvent["StartNewSpotterConversation"] = "StartNewSpotterConversation";
|
|
3063
|
-
/**
|
|
3064
|
-
* Get the current context of the embedded page.
|
|
3065
|
-
* @example
|
|
3066
|
-
* ```js
|
|
3067
|
-
* const context = await liveboardEmbed.trigger(HostEvent.GetPageContext);
|
|
3068
|
-
* ```
|
|
3069
|
-
* @version SDK: 1.45.0 | ThoughtSpot: 26.2.0.cl
|
|
3070
|
-
*/
|
|
3071
|
-
HostEvent["GetPageContext"] = "GetPageContext";
|
|
3072
3063
|
})(HostEvent || (HostEvent = {}));
|
|
3073
3064
|
/**
|
|
3074
3065
|
* The different visual modes that the data sources panel within
|
|
@@ -4781,13 +4772,6 @@ var EmbedErrorCodes;
|
|
|
4781
4772
|
/** Failed to update embed parameters during pre-render */
|
|
4782
4773
|
EmbedErrorCodes["UPDATE_PARAMS_FAILED"] = "UPDATE_PARAMS_FAILED";
|
|
4783
4774
|
})(EmbedErrorCodes || (EmbedErrorCodes = {}));
|
|
4784
|
-
var ContextType;
|
|
4785
|
-
(function (ContextType) {
|
|
4786
|
-
ContextType["Search"] = "search-answer";
|
|
4787
|
-
ContextType["Liveboard"] = "liveboard";
|
|
4788
|
-
ContextType["Answer"] = "answer";
|
|
4789
|
-
ContextType["Spotter"] = "spotter";
|
|
4790
|
-
})(ContextType || (ContextType = {}));
|
|
4791
4775
|
/**
|
|
4792
4776
|
* Enum for the type of API intercepted
|
|
4793
4777
|
*/
|
|
@@ -5427,12 +5411,6 @@ const formatTemplate = (template, values) => {
|
|
|
5427
5411
|
return values[key] !== undefined ? String(values[key]) : match;
|
|
5428
5412
|
});
|
|
5429
5413
|
};
|
|
5430
|
-
const getHostEventsConfig = (viewConfig) => {
|
|
5431
|
-
return {
|
|
5432
|
-
shouldBypassPayloadValidation: viewConfig.shouldBypassPayloadValidation,
|
|
5433
|
-
useHostEventsV2: viewConfig.useHostEventsV2,
|
|
5434
|
-
};
|
|
5435
|
-
};
|
|
5436
5414
|
/**
|
|
5437
5415
|
* Check if the window is undefined
|
|
5438
5416
|
* If the window is undefined, it means the code is running in a SSR environment.
|
|
@@ -7730,12 +7708,7 @@ var UIPassthroughEvent;
|
|
|
7730
7708
|
UIPassthroughEvent["GetAnswerConfig"] = "getAnswerPageConfig";
|
|
7731
7709
|
UIPassthroughEvent["GetLiveboardConfig"] = "getPinboardPageConfig";
|
|
7732
7710
|
UIPassthroughEvent["GetUnsavedAnswerTML"] = "getUnsavedAnswerTML";
|
|
7733
|
-
})(UIPassthroughEvent || (UIPassthroughEvent = {}));
|
|
7734
|
-
var PageType;
|
|
7735
|
-
(function (PageType) {
|
|
7736
|
-
PageType["PAGE"] = "page";
|
|
7737
|
-
PageType["DIALOG"] = "dialog";
|
|
7738
|
-
})(PageType || (PageType = {}));
|
|
7711
|
+
})(UIPassthroughEvent || (UIPassthroughEvent = {}));
|
|
7739
7712
|
|
|
7740
7713
|
const EndPoints = {
|
|
7741
7714
|
AUTH_VERIFICATION: '/callosum/v1/session/info',
|
|
@@ -8634,7 +8607,7 @@ class AnswerService {
|
|
|
8634
8607
|
async getTML() {
|
|
8635
8608
|
const { object } = await this.executeQuery(getAnswerTML, {});
|
|
8636
8609
|
const edoc = object[0].edoc;
|
|
8637
|
-
const YAML = await import('./index-
|
|
8610
|
+
const YAML = await import('./index-C5FAW929.js');
|
|
8638
8611
|
const parsedDoc = YAML.parse(edoc);
|
|
8639
8612
|
return {
|
|
8640
8613
|
answer: {
|
|
@@ -17522,7 +17495,6 @@ const reload = (iFrame) => {
|
|
|
17522
17495
|
* @param message
|
|
17523
17496
|
* @param message.type
|
|
17524
17497
|
* @param message.data
|
|
17525
|
-
* @param message.context
|
|
17526
17498
|
* @param thoughtSpotHost
|
|
17527
17499
|
* @param channel
|
|
17528
17500
|
*/
|
|
@@ -17537,9 +17509,8 @@ const TRIGGER_TIMEOUT = 30000;
|
|
|
17537
17509
|
* @param messageType
|
|
17538
17510
|
* @param thoughtSpotHost
|
|
17539
17511
|
* @param data
|
|
17540
|
-
* @param context
|
|
17541
17512
|
*/
|
|
17542
|
-
function processTrigger(iFrame, messageType, thoughtSpotHost, data
|
|
17513
|
+
function processTrigger(iFrame, messageType, thoughtSpotHost, data) {
|
|
17543
17514
|
return new Promise((res, rej) => {
|
|
17544
17515
|
var _a;
|
|
17545
17516
|
if (messageType === HostEvent.Reload) {
|
|
@@ -17573,7 +17544,7 @@ function processTrigger(iFrame, messageType, thoughtSpotHost, data, context) {
|
|
|
17573
17544
|
channel.port1.close();
|
|
17574
17545
|
res(new Error(ERROR_MESSAGE.TRIGGER_TIMED_OUT));
|
|
17575
17546
|
}, TRIGGER_TIMEOUT);
|
|
17576
|
-
return postIframeMessage(iFrame, { type: messageType, data
|
|
17547
|
+
return postIframeMessage(iFrame, { type: messageType, data }, thoughtSpotHost, channel);
|
|
17577
17548
|
});
|
|
17578
17549
|
}
|
|
17579
17550
|
|
|
@@ -18072,7 +18043,7 @@ function processEventData(type, eventData, thoughtSpotHost, containerEl) {
|
|
|
18072
18043
|
return eventData;
|
|
18073
18044
|
}
|
|
18074
18045
|
|
|
18075
|
-
var name="@thoughtspot/visual-embed-sdk";var version$1="1.44.4
|
|
18046
|
+
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={".":{"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,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};
|
|
18076
18047
|
|
|
18077
18048
|
class HostEventClient {
|
|
18078
18049
|
constructor(iFrame) {
|
|
@@ -18084,16 +18055,16 @@ class HostEventClient {
|
|
|
18084
18055
|
* @param {any} data Data to send with the host event
|
|
18085
18056
|
* @returns {Promise<any>} - the response from the process trigger
|
|
18086
18057
|
*/
|
|
18087
|
-
async processTrigger(message, data
|
|
18058
|
+
async processTrigger(message, data) {
|
|
18088
18059
|
if (!this.iFrame) {
|
|
18089
18060
|
throw new Error('Iframe element is not set');
|
|
18090
18061
|
}
|
|
18091
18062
|
const thoughtspotHost = getEmbedConfig().thoughtSpotHost;
|
|
18092
|
-
return processTrigger(this.iFrame, message, thoughtspotHost, data
|
|
18063
|
+
return processTrigger(this.iFrame, message, thoughtspotHost, data);
|
|
18093
18064
|
}
|
|
18094
|
-
async handleHostEventWithParam(apiName, parameters
|
|
18065
|
+
async handleHostEventWithParam(apiName, parameters) {
|
|
18095
18066
|
var _a, _b, _c, _d;
|
|
18096
|
-
const response = (_b = (_a = (await this.triggerUIPassthroughApi(apiName, parameters
|
|
18067
|
+
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];
|
|
18097
18068
|
if (!response) {
|
|
18098
18069
|
const error = `No answer found${parameters.vizId ? ` for vizId: ${parameters.vizId}` : ''}.`;
|
|
18099
18070
|
// eslint-disable-next-line no-throw-literal
|
|
@@ -18108,8 +18079,8 @@ class HostEventClient {
|
|
|
18108
18079
|
}
|
|
18109
18080
|
return { ...response.value };
|
|
18110
18081
|
}
|
|
18111
|
-
async hostEventFallback(hostEvent, data
|
|
18112
|
-
return this.processTrigger(hostEvent, data
|
|
18082
|
+
async hostEventFallback(hostEvent, data) {
|
|
18083
|
+
return this.processTrigger(hostEvent, data);
|
|
18113
18084
|
}
|
|
18114
18085
|
/**
|
|
18115
18086
|
* Setter for the iframe element used for host events
|
|
@@ -18118,49 +18089,49 @@ class HostEventClient {
|
|
|
18118
18089
|
setIframeElement(iFrame) {
|
|
18119
18090
|
this.iFrame = iFrame;
|
|
18120
18091
|
}
|
|
18121
|
-
async triggerUIPassthroughApi(apiName, parameters
|
|
18092
|
+
async triggerUIPassthroughApi(apiName, parameters) {
|
|
18122
18093
|
const res = await this.processTrigger(HostEvent.UIPassthrough, {
|
|
18123
18094
|
type: apiName,
|
|
18124
18095
|
parameters,
|
|
18125
|
-
}
|
|
18096
|
+
});
|
|
18126
18097
|
return res;
|
|
18127
18098
|
}
|
|
18128
|
-
async handlePinEvent(payload
|
|
18099
|
+
async handlePinEvent(payload) {
|
|
18129
18100
|
var _a, _b;
|
|
18130
18101
|
if (!payload || !('newVizName' in payload)) {
|
|
18131
|
-
return this.hostEventFallback(HostEvent.Pin, payload
|
|
18102
|
+
return this.hostEventFallback(HostEvent.Pin, payload);
|
|
18132
18103
|
}
|
|
18133
18104
|
const formattedPayload = {
|
|
18134
18105
|
...payload,
|
|
18135
18106
|
pinboardId: (_a = payload.liveboardId) !== null && _a !== void 0 ? _a : payload.pinboardId,
|
|
18136
18107
|
newPinboardName: (_b = payload.newLiveboardName) !== null && _b !== void 0 ? _b : payload.newPinboardName,
|
|
18137
18108
|
};
|
|
18138
|
-
const data = await this.handleHostEventWithParam(UIPassthroughEvent.PinAnswerToLiveboard, formattedPayload
|
|
18109
|
+
const data = await this.handleHostEventWithParam(UIPassthroughEvent.PinAnswerToLiveboard, formattedPayload);
|
|
18139
18110
|
return {
|
|
18140
18111
|
...data,
|
|
18141
18112
|
liveboardId: data.pinboardId,
|
|
18142
18113
|
};
|
|
18143
18114
|
}
|
|
18144
|
-
async handleSaveAnswerEvent(payload
|
|
18115
|
+
async handleSaveAnswerEvent(payload) {
|
|
18145
18116
|
var _a, _b, _c, _d;
|
|
18146
18117
|
if (!payload || !('name' in payload) || !('description' in payload)) {
|
|
18147
18118
|
// Save is the fallback for SaveAnswer
|
|
18148
|
-
return this.hostEventFallback(HostEvent.Save, payload
|
|
18119
|
+
return this.hostEventFallback(HostEvent.Save, payload);
|
|
18149
18120
|
}
|
|
18150
|
-
const data = await this.handleHostEventWithParam(UIPassthroughEvent.SaveAnswer, payload
|
|
18121
|
+
const data = await this.handleHostEventWithParam(UIPassthroughEvent.SaveAnswer, payload);
|
|
18151
18122
|
return {
|
|
18152
18123
|
...data,
|
|
18153
18124
|
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,
|
|
18154
18125
|
};
|
|
18155
18126
|
}
|
|
18156
|
-
async triggerHostEvent(hostEvent, payload
|
|
18127
|
+
async triggerHostEvent(hostEvent, payload) {
|
|
18157
18128
|
switch (hostEvent) {
|
|
18158
18129
|
case HostEvent.Pin:
|
|
18159
|
-
return this.handlePinEvent(payload
|
|
18130
|
+
return this.handlePinEvent(payload);
|
|
18160
18131
|
case HostEvent.SaveAnswer:
|
|
18161
|
-
return this.handleSaveAnswerEvent(payload
|
|
18132
|
+
return this.handleSaveAnswerEvent(payload);
|
|
18162
18133
|
default:
|
|
18163
|
-
return this.hostEventFallback(hostEvent, payload
|
|
18134
|
+
return this.hostEventFallback(hostEvent, payload);
|
|
18164
18135
|
}
|
|
18165
18136
|
}
|
|
18166
18137
|
}
|
|
@@ -18795,7 +18766,6 @@ class TsEmbed {
|
|
|
18795
18766
|
hiddenListColumns: this.viewConfig.hiddenListColumns || [],
|
|
18796
18767
|
customActions: customActionsResult.actions,
|
|
18797
18768
|
...getInterceptInitData(this.viewConfig),
|
|
18798
|
-
...getHostEventsConfig(this.viewConfig),
|
|
18799
18769
|
};
|
|
18800
18770
|
return baseInitData;
|
|
18801
18771
|
}
|
|
@@ -19420,7 +19390,7 @@ class TsEmbed {
|
|
|
19420
19390
|
* @param {any} data The payload to send with the message
|
|
19421
19391
|
* @returns A promise that resolves with the response from the embedded app
|
|
19422
19392
|
*/
|
|
19423
|
-
async trigger(messageType, data = {}
|
|
19393
|
+
async trigger(messageType, data = {}) {
|
|
19424
19394
|
uploadMixpanelEvent(`${MIXPANEL_EVENT.VISUAL_SDK_TRIGGER}-${messageType}`);
|
|
19425
19395
|
if (!this.isRendered) {
|
|
19426
19396
|
this.handleError({
|
|
@@ -19447,7 +19417,7 @@ class TsEmbed {
|
|
|
19447
19417
|
return null;
|
|
19448
19418
|
}
|
|
19449
19419
|
// send an empty object, this is needed for liveboard default handlers
|
|
19450
|
-
return this.hostEventClient.triggerHostEvent(messageType, data
|
|
19420
|
+
return this.hostEventClient.triggerHostEvent(messageType, data);
|
|
19451
19421
|
}
|
|
19452
19422
|
/**
|
|
19453
19423
|
* Triggers an event to the embedded app, skipping the UI flow.
|
|
@@ -19480,19 +19450,6 @@ class TsEmbed {
|
|
|
19480
19450
|
handleRenderForPrerender() {
|
|
19481
19451
|
return this.render();
|
|
19482
19452
|
}
|
|
19483
|
-
/**
|
|
19484
|
-
* Get the current context of the embedded TS component.
|
|
19485
|
-
* @returns The current context object containing the page type and object ids.
|
|
19486
|
-
* @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl
|
|
19487
|
-
*/
|
|
19488
|
-
async getCurrentContext() {
|
|
19489
|
-
return new Promise((resolve) => {
|
|
19490
|
-
this.executeAfterEmbedContainerLoaded(async () => {
|
|
19491
|
-
const context = await this.trigger(HostEvent.GetPageContext, {});
|
|
19492
|
-
resolve(context);
|
|
19493
|
-
});
|
|
19494
|
-
});
|
|
19495
|
-
}
|
|
19496
19453
|
/**
|
|
19497
19454
|
* Creates the preRender shell
|
|
19498
19455
|
* @param showPreRenderByDefault - Show the preRender after render, hidden by default
|
|
@@ -20366,7 +20323,6 @@ class LiveboardEmbed extends V1Embed {
|
|
|
20366
20323
|
super(domSelector, viewConfig);
|
|
20367
20324
|
this.defaultHeight = 500;
|
|
20368
20325
|
this.sendFullHeightLazyLoadData = () => {
|
|
20369
|
-
console.log('sendFullHeightLazyLoadData', this.iFrame);
|
|
20370
20326
|
const data = calculateVisibleElementData(this.iFrame);
|
|
20371
20327
|
this.trigger(HostEvent.VisibleEmbedCoordinates, data);
|
|
20372
20328
|
};
|
|
@@ -20627,7 +20583,7 @@ class LiveboardEmbed extends V1Embed {
|
|
|
20627
20583
|
* @param {any} data The payload to send with the message
|
|
20628
20584
|
* @returns A promise that resolves with the response from the embedded app
|
|
20629
20585
|
*/
|
|
20630
|
-
trigger(messageType, data = {}
|
|
20586
|
+
trigger(messageType, data = {}) {
|
|
20631
20587
|
const dataWithVizId = data;
|
|
20632
20588
|
if (messageType === HostEvent.SetActiveTab) {
|
|
20633
20589
|
this.setActiveTab(data);
|
|
@@ -20636,7 +20592,7 @@ class LiveboardEmbed extends V1Embed {
|
|
|
20636
20592
|
if (typeof dataWithVizId === 'object' && this.viewConfig.vizId) {
|
|
20637
20593
|
dataWithVizId.vizId = this.viewConfig.vizId;
|
|
20638
20594
|
}
|
|
20639
|
-
return super.trigger(messageType, dataWithVizId
|
|
20595
|
+
return super.trigger(messageType, dataWithVizId);
|
|
20640
20596
|
}
|
|
20641
20597
|
/**
|
|
20642
20598
|
* Destroys the ThoughtSpot embed, and remove any nodes from the DOM.
|
|
@@ -20705,15 +20661,6 @@ class LiveboardEmbed extends V1Embed {
|
|
|
20705
20661
|
}
|
|
20706
20662
|
return url;
|
|
20707
20663
|
}
|
|
20708
|
-
/**
|
|
20709
|
-
* Get the current context of the embedded liveboard.
|
|
20710
|
-
* @returns The current context object containing the page type and object ids.
|
|
20711
|
-
* @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl
|
|
20712
|
-
*/
|
|
20713
|
-
async getCurrentContext() {
|
|
20714
|
-
const context = await super.getCurrentContext();
|
|
20715
|
-
return context;
|
|
20716
|
-
}
|
|
20717
20664
|
}
|
|
20718
20665
|
/**
|
|
20719
20666
|
* @hidden
|
|
@@ -20894,15 +20841,6 @@ class SearchEmbed extends TsEmbed {
|
|
|
20894
20841
|
});
|
|
20895
20842
|
return this;
|
|
20896
20843
|
}
|
|
20897
|
-
/**
|
|
20898
|
-
* Get the current context of the embedded search.
|
|
20899
|
-
* @returns The current context object containing the page type and object ids.
|
|
20900
|
-
* @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl
|
|
20901
|
-
*/
|
|
20902
|
-
async getCurrentContext() {
|
|
20903
|
-
const context = await super.getCurrentContext();
|
|
20904
|
-
return context;
|
|
20905
|
-
}
|
|
20906
20844
|
}
|
|
20907
20845
|
|
|
20908
20846
|
/**
|
|
@@ -20978,15 +20916,6 @@ class SearchBarEmbed extends TsEmbed {
|
|
|
20978
20916
|
const defaultAppInitData = await super.getAppInitData();
|
|
20979
20917
|
return { ...defaultAppInitData, ...this.getSearchInitData() };
|
|
20980
20918
|
}
|
|
20981
|
-
/**
|
|
20982
|
-
* Get the current context of the embedded search bar.
|
|
20983
|
-
* @returns The current context object containing the page type and object ids.
|
|
20984
|
-
* @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl
|
|
20985
|
-
*/
|
|
20986
|
-
async getCurrentContext() {
|
|
20987
|
-
const context = await super.getCurrentContext();
|
|
20988
|
-
return context;
|
|
20989
|
-
}
|
|
20990
20919
|
}
|
|
20991
20920
|
|
|
20992
20921
|
const createConversation = `
|
|
@@ -21616,15 +21545,6 @@ class SpotterEmbed extends TsEmbed {
|
|
|
21616
21545
|
await this.renderIFrame(src);
|
|
21617
21546
|
return this;
|
|
21618
21547
|
}
|
|
21619
|
-
/**
|
|
21620
|
-
* Get the current context of the embedded SpotterEmbed.
|
|
21621
|
-
* @returns The current context object containing the page type and object ids.
|
|
21622
|
-
* @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl
|
|
21623
|
-
*/
|
|
21624
|
-
async getCurrentContext() {
|
|
21625
|
-
const context = await super.getCurrentContext();
|
|
21626
|
-
return context;
|
|
21627
|
-
}
|
|
21628
21548
|
}
|
|
21629
21549
|
/**
|
|
21630
21550
|
* Embed ThoughtSpot AI Conversation.
|
|
@@ -21731,15 +21651,6 @@ class SageEmbed extends V1Embed {
|
|
|
21731
21651
|
await this.renderV1Embed(src);
|
|
21732
21652
|
return this;
|
|
21733
21653
|
}
|
|
21734
|
-
/**
|
|
21735
|
-
* Get the current context of the embedded SageEmbed.
|
|
21736
|
-
* @returns The current context object containing the page type and object ids.
|
|
21737
|
-
* @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl
|
|
21738
|
-
*/
|
|
21739
|
-
async getCurrentContext() {
|
|
21740
|
-
const context = await super.getCurrentContext();
|
|
21741
|
-
return context;
|
|
21742
|
-
}
|
|
21743
21654
|
}
|
|
21744
21655
|
|
|
21745
21656
|
const getAnswerSessionFromQuery = `
|
|
@@ -22264,4 +22175,4 @@ const createLiveboardWithAnswers = async (answers, name) => {
|
|
|
22264
22175
|
return result;
|
|
22265
22176
|
};
|
|
22266
22177
|
|
|
22267
|
-
export { Action, AnswerService, AppEmbed, AuthEvent, AuthFailureType, AuthStatus, AuthType, BodylessConversation, ContextMenuTriggerOptions,
|
|
22178
|
+
export { Action, AnswerService, AppEmbed, AuthEvent, AuthFailureType, AuthStatus, AuthType, BodylessConversation, ContextMenuTriggerOptions, ConversationEmbed, CustomActionTarget, CustomActionsPosition, DataPanelCustomColumnGroupsAccordionState$1 as DataPanelCustomColumnGroupsAccordionState, DataSourceVisualMode, EmbedErrorCodes, EmbedEvent, ErrorDetailsTypes, HomeLeftNavItem, HomePage, HomePageSearchBarMode, HomepageModule, HostEvent, InterceptedApiType, ListPage, ListPageColumns, LiveboardEmbed, LogLevel, MIXPANEL_EVENT, Page, PinboardEmbed, PrefetchFeatures, PrimaryNavbarVersion, RuntimeFilterOp, SageEmbed, SearchBarEmbed, SearchEmbed, SpotterAgentEmbed, SpotterEmbed, UIPassthroughEvent, createLiveboardWithAnswers, executeTML, exportTML, getAnswerFromQuery, getEmbedConfig as getInitConfig, getSessionInfo, init, logout, prefetch, reloadIframe, resetCachedAuthToken, tokenizedFetch, uploadMixpanelEvent };
|