@thoughtspot/visual-embed-sdk 1.42.1-HE2.0 → 1.42.1-HE2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/package.json +2 -2
- package/cjs/src/embed/conversation.d.ts +2 -0
- package/cjs/src/embed/conversation.d.ts.map +1 -1
- package/cjs/src/embed/conversation.js +4 -0
- package/cjs/src/embed/conversation.js.map +1 -1
- package/cjs/src/embed/hostEventClient/contracts.d.ts +5 -1
- package/cjs/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/cjs/src/embed/hostEventClient/contracts.js +7 -2
- package/cjs/src/embed/hostEventClient/contracts.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts +2 -0
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +4 -0
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/sage.d.ts +2 -0
- package/cjs/src/embed/sage.d.ts.map +1 -1
- package/cjs/src/embed/sage.js +4 -0
- package/cjs/src/embed/sage.js.map +1 -1
- package/cjs/src/embed/search-bar.d.ts +2 -0
- package/cjs/src/embed/search-bar.d.ts.map +1 -1
- package/cjs/src/embed/search-bar.js +4 -0
- package/cjs/src/embed/search-bar.js.map +1 -1
- package/cjs/src/embed/search.d.ts +2 -0
- package/cjs/src/embed/search.d.ts.map +1 -1
- package/cjs/src/embed/search.js +4 -0
- package/cjs/src/embed/search.js.map +1 -1
- package/cjs/src/embed/ts-embed.d.ts +1 -0
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +6 -0
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/types.d.ts +10 -1
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +9 -0
- package/cjs/src/types.js.map +1 -1
- package/dist/index-BFdRRz03.js +7371 -0
- package/dist/index-CaW-1mu5.js +7371 -0
- package/dist/src/embed/conversation.d.ts +2 -0
- package/dist/src/embed/conversation.d.ts.map +1 -1
- package/dist/src/embed/hostEventClient/contracts.d.ts +5 -1
- package/dist/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts +2 -0
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/embed/sage.d.ts +2 -0
- package/dist/src/embed/sage.d.ts.map +1 -1
- package/dist/src/embed/search-bar.d.ts +2 -0
- package/dist/src/embed/search-bar.d.ts.map +1 -1
- package/dist/src/embed/search.d.ts +2 -0
- package/dist/src/embed/search.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.d.ts +1 -0
- package/dist/src/embed/ts-embed.d.ts.map +1 -1
- package/dist/src/types.d.ts +10 -1
- package/dist/src/types.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +45 -5
- package/dist/tsembed-react.js +44 -4
- package/dist/tsembed.es.js +45 -5
- package/dist/tsembed.js +44 -4
- package/dist/visual-embed-sdk-react-full.d.ts +39 -2
- package/dist/visual-embed-sdk-react.d.ts +39 -2
- package/dist/visual-embed-sdk.d.ts +39 -2
- package/lib/package.json +2 -2
- package/lib/src/embed/conversation.d.ts +2 -0
- package/lib/src/embed/conversation.d.ts.map +1 -1
- package/lib/src/embed/conversation.js +4 -0
- package/lib/src/embed/conversation.js.map +1 -1
- package/lib/src/embed/hostEventClient/contracts.d.ts +5 -1
- package/lib/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/lib/src/embed/hostEventClient/contracts.js +6 -1
- package/lib/src/embed/hostEventClient/contracts.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts +2 -0
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +4 -0
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/sage.d.ts +2 -0
- package/lib/src/embed/sage.d.ts.map +1 -1
- package/lib/src/embed/sage.js +4 -0
- package/lib/src/embed/sage.js.map +1 -1
- package/lib/src/embed/search-bar.d.ts +2 -0
- package/lib/src/embed/search-bar.d.ts.map +1 -1
- package/lib/src/embed/search-bar.js +4 -0
- package/lib/src/embed/search-bar.js.map +1 -1
- package/lib/src/embed/search.d.ts +2 -0
- package/lib/src/embed/search.d.ts.map +1 -1
- package/lib/src/embed/search.js +4 -0
- package/lib/src/embed/search.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts +1 -0
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +6 -0
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/types.d.ts +10 -1
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +9 -0
- package/lib/src/types.js.map +1 -1
- package/package.json +2 -2
- package/src/embed/conversation.ts +7 -0
- package/src/embed/hostEventClient/contracts.ts +6 -1
- package/src/embed/liveboard.ts +6 -0
- package/src/embed/sage.ts +6 -0
- package/src/embed/search-bar.tsx +6 -0
- package/src/embed/search.ts +7 -0
- package/src/embed/ts-embed.ts +9 -0
- package/src/types.ts +10 -0
package/dist/tsembed-react.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @thoughtspot/visual-embed-sdk version 1.42.1-HE2.0 */
|
|
1
|
+
/* @thoughtspot/visual-embed-sdk version 1.42.1-HE2.0.2 */
|
|
2
2
|
'use client';
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) :
|
|
@@ -3054,6 +3054,15 @@
|
|
|
3054
3054
|
* ```
|
|
3055
3055
|
*/
|
|
3056
3056
|
HostEvent["UpdateEmbedParams"] = "updateEmbedParams";
|
|
3057
|
+
/**
|
|
3058
|
+
* @hidden
|
|
3059
|
+
* Triggers the get of the page context.
|
|
3060
|
+
* @example
|
|
3061
|
+
* ```js
|
|
3062
|
+
* liveboardEmbed.trigger(HostEvent.GetPageContext);
|
|
3063
|
+
* ```
|
|
3064
|
+
*/
|
|
3065
|
+
HostEvent["GetPageContext"] = "GetPageContext";
|
|
3057
3066
|
})(exports.HostEvent || (exports.HostEvent = {}));
|
|
3058
3067
|
/**
|
|
3059
3068
|
* The different visual modes that the data sources panel within
|
|
@@ -17495,7 +17504,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
17495
17504
|
return e;
|
|
17496
17505
|
}
|
|
17497
17506
|
|
|
17498
|
-
var name="@thoughtspot/visual-embed-sdk";var version$1="1.42.1-HE2.0";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
|
|
17507
|
+
var name="@thoughtspot/visual-embed-sdk";var version$1="1.42.1-HE2.0.2";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports$1={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p 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 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":"^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":"^8.28.0","@typescript-eslint/parser":"^8.28.0",ajv:"^8.17.1",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","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:"^26.6.3","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":"^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","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};
|
|
17499
17508
|
|
|
17500
17509
|
/**
|
|
17501
17510
|
* Reloads the ThoughtSpot iframe.
|
|
@@ -17584,8 +17593,13 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
17584
17593
|
ContextType["Liveboard"] = "liveboard";
|
|
17585
17594
|
ContextType["Answer"] = "answer";
|
|
17586
17595
|
ContextType["Spotter"] = "spotter";
|
|
17587
|
-
ContextType["
|
|
17588
|
-
})(ContextType || (ContextType = {}));
|
|
17596
|
+
ContextType["Default"] = "default";
|
|
17597
|
+
})(ContextType || (ContextType = {}));
|
|
17598
|
+
var PageType;
|
|
17599
|
+
(function (PageType) {
|
|
17600
|
+
PageType["PAGE"] = "page";
|
|
17601
|
+
PageType["DIALOG"] = "dialog";
|
|
17602
|
+
})(PageType || (PageType = {}));
|
|
17589
17603
|
|
|
17590
17604
|
class HostEventClient {
|
|
17591
17605
|
constructor(iFrame) {
|
|
@@ -18744,6 +18758,12 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18744
18758
|
handleRenderForPrerender() {
|
|
18745
18759
|
return this.render();
|
|
18746
18760
|
}
|
|
18761
|
+
async getCurrentContext() {
|
|
18762
|
+
this.executeAfterEmbedContainerLoaded(async () => {
|
|
18763
|
+
const context = await this.trigger(exports.HostEvent.GetPageContext, {});
|
|
18764
|
+
return context;
|
|
18765
|
+
});
|
|
18766
|
+
}
|
|
18747
18767
|
/**
|
|
18748
18768
|
* Creates the preRender shell
|
|
18749
18769
|
* @param showPreRenderByDefault - Show the preRender after render, hidden by default
|
|
@@ -19114,6 +19134,10 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
19114
19134
|
const defaultAppInitData = await super.getAppInitData();
|
|
19115
19135
|
return { ...defaultAppInitData, ...this.getSearchInitData() };
|
|
19116
19136
|
}
|
|
19137
|
+
async getCurrentContext() {
|
|
19138
|
+
const context = await super.getCurrentContext();
|
|
19139
|
+
return context;
|
|
19140
|
+
}
|
|
19117
19141
|
};
|
|
19118
19142
|
|
|
19119
19143
|
/**
|
|
@@ -19196,6 +19220,10 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
19196
19220
|
await this.renderV1Embed(src);
|
|
19197
19221
|
return this;
|
|
19198
19222
|
}
|
|
19223
|
+
async getCurrentContext() {
|
|
19224
|
+
const context = await super.getCurrentContext();
|
|
19225
|
+
return context;
|
|
19226
|
+
}
|
|
19199
19227
|
};
|
|
19200
19228
|
|
|
19201
19229
|
/**
|
|
@@ -19374,6 +19402,10 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
19374
19402
|
});
|
|
19375
19403
|
return this;
|
|
19376
19404
|
}
|
|
19405
|
+
async getCurrentContext() {
|
|
19406
|
+
const context = await super.getCurrentContext();
|
|
19407
|
+
return context;
|
|
19408
|
+
}
|
|
19377
19409
|
};
|
|
19378
19410
|
|
|
19379
19411
|
/**
|
|
@@ -20234,6 +20266,10 @@ query GetEurekaVizSnapshots(
|
|
|
20234
20266
|
}
|
|
20235
20267
|
return url;
|
|
20236
20268
|
}
|
|
20269
|
+
async getCurrentContext() {
|
|
20270
|
+
const context = await super.getCurrentContext();
|
|
20271
|
+
return context;
|
|
20272
|
+
}
|
|
20237
20273
|
};
|
|
20238
20274
|
|
|
20239
20275
|
const createConversation = `
|
|
@@ -20847,6 +20883,10 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
20847
20883
|
await this.renderIFrame(src);
|
|
20848
20884
|
return this;
|
|
20849
20885
|
}
|
|
20886
|
+
async getCurrentContext() {
|
|
20887
|
+
const context = await super.getCurrentContext();
|
|
20888
|
+
return context;
|
|
20889
|
+
}
|
|
20850
20890
|
};
|
|
20851
20891
|
/**
|
|
20852
20892
|
* Embed ThoughtSpot AI Conversation.
|
package/dist/tsembed.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @thoughtspot/visual-embed-sdk version 1.42.1-HE2.0 */
|
|
1
|
+
/* @thoughtspot/visual-embed-sdk version 1.42.1-HE2.0.2 */
|
|
2
2
|
'use client';
|
|
3
3
|
function _mergeNamespaces(n, m) {
|
|
4
4
|
m.forEach(function (e) {
|
|
@@ -3334,6 +3334,15 @@ var HostEvent;
|
|
|
3334
3334
|
* ```
|
|
3335
3335
|
*/
|
|
3336
3336
|
HostEvent["UpdateEmbedParams"] = "updateEmbedParams";
|
|
3337
|
+
/**
|
|
3338
|
+
* @hidden
|
|
3339
|
+
* Triggers the get of the page context.
|
|
3340
|
+
* @example
|
|
3341
|
+
* ```js
|
|
3342
|
+
* liveboardEmbed.trigger(HostEvent.GetPageContext);
|
|
3343
|
+
* ```
|
|
3344
|
+
*/
|
|
3345
|
+
HostEvent["GetPageContext"] = "GetPageContext";
|
|
3337
3346
|
})(HostEvent || (HostEvent = {}));
|
|
3338
3347
|
/**
|
|
3339
3348
|
* The different visual modes that the data sources panel within
|
|
@@ -8185,7 +8194,7 @@ class AnswerService {
|
|
|
8185
8194
|
async getTML() {
|
|
8186
8195
|
const { object } = await this.executeQuery(getAnswerTML, {});
|
|
8187
8196
|
const edoc = object[0].edoc;
|
|
8188
|
-
const YAML = await import('./index-
|
|
8197
|
+
const YAML = await import('./index-CaW-1mu5.js');
|
|
8189
8198
|
const parsedDoc = YAML.parse(edoc);
|
|
8190
8199
|
return {
|
|
8191
8200
|
answer: {
|
|
@@ -17524,7 +17533,7 @@ function processEventData(type, e, thoughtSpotHost, containerEl) {
|
|
|
17524
17533
|
return e;
|
|
17525
17534
|
}
|
|
17526
17535
|
|
|
17527
|
-
var name="@thoughtspot/visual-embed-sdk";var version$1="1.42.1-HE2.0";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
|
|
17536
|
+
var name="@thoughtspot/visual-embed-sdk";var version$1="1.42.1-HE2.0.2";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p 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 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":"^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":"^8.28.0","@typescript-eslint/parser":"^8.28.0",ajv:"^8.17.1",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","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:"^26.6.3","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":"^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","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};
|
|
17528
17537
|
|
|
17529
17538
|
/**
|
|
17530
17539
|
* Reloads the ThoughtSpot iframe.
|
|
@@ -17613,8 +17622,13 @@ var ContextType;
|
|
|
17613
17622
|
ContextType["Liveboard"] = "liveboard";
|
|
17614
17623
|
ContextType["Answer"] = "answer";
|
|
17615
17624
|
ContextType["Spotter"] = "spotter";
|
|
17616
|
-
ContextType["
|
|
17617
|
-
})(ContextType || (ContextType = {}));
|
|
17625
|
+
ContextType["Default"] = "default";
|
|
17626
|
+
})(ContextType || (ContextType = {}));
|
|
17627
|
+
var PageType;
|
|
17628
|
+
(function (PageType) {
|
|
17629
|
+
PageType["PAGE"] = "page";
|
|
17630
|
+
PageType["DIALOG"] = "dialog";
|
|
17631
|
+
})(PageType || (PageType = {}));
|
|
17618
17632
|
|
|
17619
17633
|
class HostEventClient {
|
|
17620
17634
|
constructor(iFrame) {
|
|
@@ -18773,6 +18787,12 @@ class TsEmbed {
|
|
|
18773
18787
|
handleRenderForPrerender() {
|
|
18774
18788
|
return this.render();
|
|
18775
18789
|
}
|
|
18790
|
+
async getCurrentContext() {
|
|
18791
|
+
this.executeAfterEmbedContainerLoaded(async () => {
|
|
18792
|
+
const context = await this.trigger(HostEvent.GetPageContext, {});
|
|
18793
|
+
return context;
|
|
18794
|
+
});
|
|
18795
|
+
}
|
|
18776
18796
|
/**
|
|
18777
18797
|
* Creates the preRender shell
|
|
18778
18798
|
* @param showPreRenderByDefault - Show the preRender after render, hidden by default
|
|
@@ -19928,6 +19948,10 @@ class LiveboardEmbed extends V1Embed {
|
|
|
19928
19948
|
}
|
|
19929
19949
|
return url;
|
|
19930
19950
|
}
|
|
19951
|
+
async getCurrentContext() {
|
|
19952
|
+
const context = await super.getCurrentContext();
|
|
19953
|
+
return context;
|
|
19954
|
+
}
|
|
19931
19955
|
}
|
|
19932
19956
|
/**
|
|
19933
19957
|
* @hidden
|
|
@@ -20111,6 +20135,10 @@ class SearchEmbed extends TsEmbed {
|
|
|
20111
20135
|
});
|
|
20112
20136
|
return this;
|
|
20113
20137
|
}
|
|
20138
|
+
async getCurrentContext() {
|
|
20139
|
+
const context = await super.getCurrentContext();
|
|
20140
|
+
return context;
|
|
20141
|
+
}
|
|
20114
20142
|
}
|
|
20115
20143
|
|
|
20116
20144
|
/**
|
|
@@ -20186,6 +20214,10 @@ class SearchBarEmbed extends TsEmbed {
|
|
|
20186
20214
|
const defaultAppInitData = await super.getAppInitData();
|
|
20187
20215
|
return { ...defaultAppInitData, ...this.getSearchInitData() };
|
|
20188
20216
|
}
|
|
20217
|
+
async getCurrentContext() {
|
|
20218
|
+
const context = await super.getCurrentContext();
|
|
20219
|
+
return context;
|
|
20220
|
+
}
|
|
20189
20221
|
}
|
|
20190
20222
|
|
|
20191
20223
|
const createConversation = `
|
|
@@ -20804,6 +20836,10 @@ class SpotterEmbed extends TsEmbed {
|
|
|
20804
20836
|
await this.renderIFrame(src);
|
|
20805
20837
|
return this;
|
|
20806
20838
|
}
|
|
20839
|
+
async getCurrentContext() {
|
|
20840
|
+
const context = await super.getCurrentContext();
|
|
20841
|
+
return context;
|
|
20842
|
+
}
|
|
20807
20843
|
}
|
|
20808
20844
|
/**
|
|
20809
20845
|
* Embed ThoughtSpot AI Conversation.
|
|
@@ -20910,6 +20946,10 @@ class SageEmbed extends V1Embed {
|
|
|
20910
20946
|
await this.renderV1Embed(src);
|
|
20911
20947
|
return this;
|
|
20912
20948
|
}
|
|
20949
|
+
async getCurrentContext() {
|
|
20950
|
+
const context = await super.getCurrentContext();
|
|
20951
|
+
return context;
|
|
20952
|
+
}
|
|
20913
20953
|
}
|
|
20914
20954
|
|
|
20915
20955
|
const getAnswerSessionFromQuery = `
|
package/dist/tsembed.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @thoughtspot/visual-embed-sdk version 1.42.1-HE2.0 */
|
|
1
|
+
/* @thoughtspot/visual-embed-sdk version 1.42.1-HE2.0.2 */
|
|
2
2
|
'use client';
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
@@ -3340,6 +3340,15 @@
|
|
|
3340
3340
|
* ```
|
|
3341
3341
|
*/
|
|
3342
3342
|
HostEvent["UpdateEmbedParams"] = "updateEmbedParams";
|
|
3343
|
+
/**
|
|
3344
|
+
* @hidden
|
|
3345
|
+
* Triggers the get of the page context.
|
|
3346
|
+
* @example
|
|
3347
|
+
* ```js
|
|
3348
|
+
* liveboardEmbed.trigger(HostEvent.GetPageContext);
|
|
3349
|
+
* ```
|
|
3350
|
+
*/
|
|
3351
|
+
HostEvent["GetPageContext"] = "GetPageContext";
|
|
3343
3352
|
})(exports.HostEvent || (exports.HostEvent = {}));
|
|
3344
3353
|
/**
|
|
3345
3354
|
* The different visual modes that the data sources panel within
|
|
@@ -17530,7 +17539,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
17530
17539
|
return e;
|
|
17531
17540
|
}
|
|
17532
17541
|
|
|
17533
|
-
var name="@thoughtspot/visual-embed-sdk";var version$1="1.42.1-HE2.0";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
|
|
17542
|
+
var name="@thoughtspot/visual-embed-sdk";var version$1="1.42.1-HE2.0.2";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports$1={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p 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 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":"^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":"^8.28.0","@typescript-eslint/parser":"^8.28.0",ajv:"^8.17.1",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","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:"^26.6.3","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":"^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","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};
|
|
17534
17543
|
|
|
17535
17544
|
/**
|
|
17536
17545
|
* Reloads the ThoughtSpot iframe.
|
|
@@ -17619,8 +17628,13 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
17619
17628
|
ContextType["Liveboard"] = "liveboard";
|
|
17620
17629
|
ContextType["Answer"] = "answer";
|
|
17621
17630
|
ContextType["Spotter"] = "spotter";
|
|
17622
|
-
ContextType["
|
|
17623
|
-
})(ContextType || (ContextType = {}));
|
|
17631
|
+
ContextType["Default"] = "default";
|
|
17632
|
+
})(ContextType || (ContextType = {}));
|
|
17633
|
+
var PageType;
|
|
17634
|
+
(function (PageType) {
|
|
17635
|
+
PageType["PAGE"] = "page";
|
|
17636
|
+
PageType["DIALOG"] = "dialog";
|
|
17637
|
+
})(PageType || (PageType = {}));
|
|
17624
17638
|
|
|
17625
17639
|
class HostEventClient {
|
|
17626
17640
|
constructor(iFrame) {
|
|
@@ -18779,6 +18793,12 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18779
18793
|
handleRenderForPrerender() {
|
|
18780
18794
|
return this.render();
|
|
18781
18795
|
}
|
|
18796
|
+
async getCurrentContext() {
|
|
18797
|
+
this.executeAfterEmbedContainerLoaded(async () => {
|
|
18798
|
+
const context = await this.trigger(exports.HostEvent.GetPageContext, {});
|
|
18799
|
+
return context;
|
|
18800
|
+
});
|
|
18801
|
+
}
|
|
18782
18802
|
/**
|
|
18783
18803
|
* Creates the preRender shell
|
|
18784
18804
|
* @param showPreRenderByDefault - Show the preRender after render, hidden by default
|
|
@@ -19934,6 +19954,10 @@ query GetEurekaVizSnapshots(
|
|
|
19934
19954
|
}
|
|
19935
19955
|
return url;
|
|
19936
19956
|
}
|
|
19957
|
+
async getCurrentContext() {
|
|
19958
|
+
const context = await super.getCurrentContext();
|
|
19959
|
+
return context;
|
|
19960
|
+
}
|
|
19937
19961
|
}
|
|
19938
19962
|
/**
|
|
19939
19963
|
* @hidden
|
|
@@ -20117,6 +20141,10 @@ query GetEurekaVizSnapshots(
|
|
|
20117
20141
|
});
|
|
20118
20142
|
return this;
|
|
20119
20143
|
}
|
|
20144
|
+
async getCurrentContext() {
|
|
20145
|
+
const context = await super.getCurrentContext();
|
|
20146
|
+
return context;
|
|
20147
|
+
}
|
|
20120
20148
|
}
|
|
20121
20149
|
|
|
20122
20150
|
/**
|
|
@@ -20192,6 +20220,10 @@ query GetEurekaVizSnapshots(
|
|
|
20192
20220
|
const defaultAppInitData = await super.getAppInitData();
|
|
20193
20221
|
return { ...defaultAppInitData, ...this.getSearchInitData() };
|
|
20194
20222
|
}
|
|
20223
|
+
async getCurrentContext() {
|
|
20224
|
+
const context = await super.getCurrentContext();
|
|
20225
|
+
return context;
|
|
20226
|
+
}
|
|
20195
20227
|
}
|
|
20196
20228
|
|
|
20197
20229
|
const createConversation = `
|
|
@@ -20810,6 +20842,10 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
20810
20842
|
await this.renderIFrame(src);
|
|
20811
20843
|
return this;
|
|
20812
20844
|
}
|
|
20845
|
+
async getCurrentContext() {
|
|
20846
|
+
const context = await super.getCurrentContext();
|
|
20847
|
+
return context;
|
|
20848
|
+
}
|
|
20813
20849
|
}
|
|
20814
20850
|
/**
|
|
20815
20851
|
* Embed ThoughtSpot AI Conversation.
|
|
@@ -20916,6 +20952,10 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
20916
20952
|
await this.renderV1Embed(src);
|
|
20917
20953
|
return this;
|
|
20918
20954
|
}
|
|
20955
|
+
async getCurrentContext() {
|
|
20956
|
+
const context = await super.getCurrentContext();
|
|
20957
|
+
return context;
|
|
20958
|
+
}
|
|
20919
20959
|
}
|
|
20920
20960
|
|
|
20921
20961
|
const getAnswerSessionFromQuery = `
|
|
@@ -5048,7 +5048,16 @@ export declare enum HostEvent {
|
|
|
5048
5048
|
* liveboardEmbed.trigger(HostEvent.UpdateEmbedParams, viewConfig);
|
|
5049
5049
|
* ```
|
|
5050
5050
|
*/
|
|
5051
|
-
UpdateEmbedParams = "updateEmbedParams"
|
|
5051
|
+
UpdateEmbedParams = "updateEmbedParams",
|
|
5052
|
+
/**
|
|
5053
|
+
* @hidden
|
|
5054
|
+
* Triggers the get of the page context.
|
|
5055
|
+
* @example
|
|
5056
|
+
* ```js
|
|
5057
|
+
* liveboardEmbed.trigger(HostEvent.GetPageContext);
|
|
5058
|
+
* ```
|
|
5059
|
+
*/
|
|
5060
|
+
GetPageContext = "GetPageContext"
|
|
5052
5061
|
}
|
|
5053
5062
|
/**
|
|
5054
5063
|
* The different visual modes that the data sources panel within
|
|
@@ -6702,7 +6711,7 @@ declare enum ContextType {
|
|
|
6702
6711
|
Liveboard = "liveboard",
|
|
6703
6712
|
Answer = "answer",
|
|
6704
6713
|
Spotter = "spotter",
|
|
6705
|
-
|
|
6714
|
+
Default = "default"
|
|
6706
6715
|
}
|
|
6707
6716
|
declare class HostEventClient {
|
|
6708
6717
|
iFrame: HTMLIFrameElement;
|
|
@@ -7053,6 +7062,7 @@ declare class TsEmbed {
|
|
|
7053
7062
|
render(): Promise<TsEmbed>;
|
|
7054
7063
|
getIframeSrc(): string;
|
|
7055
7064
|
protected handleRenderForPrerender(): Promise<TsEmbed>;
|
|
7065
|
+
getCurrentContext(): Promise<any>;
|
|
7056
7066
|
/**
|
|
7057
7067
|
* Creates the preRender shell
|
|
7058
7068
|
* @param showPreRenderByDefault - Show the preRender after render, hidden by default
|
|
@@ -7165,6 +7175,28 @@ declare class V1Embed extends TsEmbed {
|
|
|
7165
7175
|
*/
|
|
7166
7176
|
test__executeCallbacks: (eventType: EmbedEvent, data: any, eventPort?: void | MessagePort) => void;
|
|
7167
7177
|
}
|
|
7178
|
+
declare enum ContextType$1 {
|
|
7179
|
+
Search = "search",
|
|
7180
|
+
Liveboard = "liveboard",
|
|
7181
|
+
Answer = "answer",
|
|
7182
|
+
Spotter = "spotter",
|
|
7183
|
+
Default = "default"
|
|
7184
|
+
}
|
|
7185
|
+
declare enum PageType {
|
|
7186
|
+
PAGE = "page",
|
|
7187
|
+
DIALOG = "dialog"
|
|
7188
|
+
}
|
|
7189
|
+
export interface ObjectIds {
|
|
7190
|
+
answerId?: string;
|
|
7191
|
+
liveboardId?: string;
|
|
7192
|
+
vizIds?: string[];
|
|
7193
|
+
dataModelIds?: string[];
|
|
7194
|
+
}
|
|
7195
|
+
export type PageContextOptions = {
|
|
7196
|
+
page: ContextType$1;
|
|
7197
|
+
pageType: PageType;
|
|
7198
|
+
objectIds: ObjectIds;
|
|
7199
|
+
};
|
|
7168
7200
|
/**
|
|
7169
7201
|
* Configuration for search options.
|
|
7170
7202
|
*
|
|
@@ -7485,6 +7517,7 @@ declare class SearchEmbed extends TsEmbed {
|
|
|
7485
7517
|
* Render the embedded ThoughtSpot search
|
|
7486
7518
|
*/
|
|
7487
7519
|
render(): Promise<SearchEmbed>;
|
|
7520
|
+
getCurrentContext(): Promise<PageContextOptions>;
|
|
7488
7521
|
}
|
|
7489
7522
|
/**
|
|
7490
7523
|
* @group Embed components
|
|
@@ -7603,6 +7636,7 @@ declare class SearchBarEmbed extends TsEmbed {
|
|
|
7603
7636
|
searchOptions: SearchOptions;
|
|
7604
7637
|
};
|
|
7605
7638
|
protected getAppInitData(): Promise<SearchAppInitData$1>;
|
|
7639
|
+
getCurrentContext(): Promise<PageContextOptions>;
|
|
7606
7640
|
}
|
|
7607
7641
|
interface SearchOptions$1 {
|
|
7608
7642
|
/**
|
|
@@ -7747,6 +7781,7 @@ declare class SageEmbed extends V1Embed {
|
|
|
7747
7781
|
* @returns {SageEmbed} Eureka/Sage embed
|
|
7748
7782
|
*/
|
|
7749
7783
|
render(): Promise<SageEmbed>;
|
|
7784
|
+
getCurrentContext(): Promise<PageContextOptions>;
|
|
7750
7785
|
}
|
|
7751
7786
|
/**
|
|
7752
7787
|
* Pages within the ThoughtSpot app that can be embedded.
|
|
@@ -8829,6 +8864,7 @@ declare class LiveboardEmbed extends V1Embed {
|
|
|
8829
8864
|
* @returns url string
|
|
8830
8865
|
*/
|
|
8831
8866
|
getLiveboardUrl(): string;
|
|
8867
|
+
getCurrentContext(): Promise<PageContextOptions>;
|
|
8832
8868
|
}
|
|
8833
8869
|
/**
|
|
8834
8870
|
* @hidden
|
|
@@ -9040,6 +9076,7 @@ declare class SpotterEmbed extends TsEmbed {
|
|
|
9040
9076
|
protected getEmbedParamsObject(): Record<any, any>;
|
|
9041
9077
|
getIframeSrc(): string;
|
|
9042
9078
|
render(): Promise<SpotterEmbed>;
|
|
9079
|
+
getCurrentContext(): Promise<PageContextOptions>;
|
|
9043
9080
|
}
|
|
9044
9081
|
declare class ConversationEmbed extends SpotterEmbed {
|
|
9045
9082
|
protected viewConfig: ConversationViewConfig;
|
|
@@ -5063,7 +5063,16 @@ export declare enum HostEvent {
|
|
|
5063
5063
|
* liveboardEmbed.trigger(HostEvent.UpdateEmbedParams, viewConfig);
|
|
5064
5064
|
* ```
|
|
5065
5065
|
*/
|
|
5066
|
-
UpdateEmbedParams = "updateEmbedParams"
|
|
5066
|
+
UpdateEmbedParams = "updateEmbedParams",
|
|
5067
|
+
/**
|
|
5068
|
+
* @hidden
|
|
5069
|
+
* Triggers the get of the page context.
|
|
5070
|
+
* @example
|
|
5071
|
+
* ```js
|
|
5072
|
+
* liveboardEmbed.trigger(HostEvent.GetPageContext);
|
|
5073
|
+
* ```
|
|
5074
|
+
*/
|
|
5075
|
+
GetPageContext = "GetPageContext"
|
|
5067
5076
|
}
|
|
5068
5077
|
/**
|
|
5069
5078
|
* ThoughtSpot application pages include actions and menu commands
|
|
@@ -6690,7 +6699,7 @@ declare enum ContextType {
|
|
|
6690
6699
|
Liveboard = "liveboard",
|
|
6691
6700
|
Answer = "answer",
|
|
6692
6701
|
Spotter = "spotter",
|
|
6693
|
-
|
|
6702
|
+
Default = "default"
|
|
6694
6703
|
}
|
|
6695
6704
|
declare class HostEventClient {
|
|
6696
6705
|
iFrame: HTMLIFrameElement;
|
|
@@ -7041,6 +7050,7 @@ declare class TsEmbed {
|
|
|
7041
7050
|
render(): Promise<TsEmbed>;
|
|
7042
7051
|
getIframeSrc(): string;
|
|
7043
7052
|
protected handleRenderForPrerender(): Promise<TsEmbed>;
|
|
7053
|
+
getCurrentContext(): Promise<any>;
|
|
7044
7054
|
/**
|
|
7045
7055
|
* Creates the preRender shell
|
|
7046
7056
|
* @param showPreRenderByDefault - Show the preRender after render, hidden by default
|
|
@@ -7153,6 +7163,28 @@ declare class V1Embed extends TsEmbed {
|
|
|
7153
7163
|
*/
|
|
7154
7164
|
test__executeCallbacks: (eventType: EmbedEvent, data: any, eventPort?: void | MessagePort) => void;
|
|
7155
7165
|
}
|
|
7166
|
+
declare enum ContextType$1 {
|
|
7167
|
+
Search = "search",
|
|
7168
|
+
Liveboard = "liveboard",
|
|
7169
|
+
Answer = "answer",
|
|
7170
|
+
Spotter = "spotter",
|
|
7171
|
+
Default = "default"
|
|
7172
|
+
}
|
|
7173
|
+
declare enum PageType {
|
|
7174
|
+
PAGE = "page",
|
|
7175
|
+
DIALOG = "dialog"
|
|
7176
|
+
}
|
|
7177
|
+
export interface ObjectIds {
|
|
7178
|
+
answerId?: string;
|
|
7179
|
+
liveboardId?: string;
|
|
7180
|
+
vizIds?: string[];
|
|
7181
|
+
dataModelIds?: string[];
|
|
7182
|
+
}
|
|
7183
|
+
export type PageContextOptions = {
|
|
7184
|
+
page: ContextType$1;
|
|
7185
|
+
pageType: PageType;
|
|
7186
|
+
objectIds: ObjectIds;
|
|
7187
|
+
};
|
|
7156
7188
|
/**
|
|
7157
7189
|
* Configuration for search options.
|
|
7158
7190
|
*
|
|
@@ -7473,6 +7505,7 @@ declare class SearchEmbed extends TsEmbed {
|
|
|
7473
7505
|
* Render the embedded ThoughtSpot search
|
|
7474
7506
|
*/
|
|
7475
7507
|
render(): Promise<SearchEmbed>;
|
|
7508
|
+
getCurrentContext(): Promise<PageContextOptions>;
|
|
7476
7509
|
}
|
|
7477
7510
|
/**
|
|
7478
7511
|
* @group Embed components
|
|
@@ -7591,6 +7624,7 @@ declare class SearchBarEmbed extends TsEmbed {
|
|
|
7591
7624
|
searchOptions: SearchOptions;
|
|
7592
7625
|
};
|
|
7593
7626
|
protected getAppInitData(): Promise<SearchAppInitData$1>;
|
|
7627
|
+
getCurrentContext(): Promise<PageContextOptions>;
|
|
7594
7628
|
}
|
|
7595
7629
|
interface SearchOptions$1 {
|
|
7596
7630
|
/**
|
|
@@ -7735,6 +7769,7 @@ declare class SageEmbed extends V1Embed {
|
|
|
7735
7769
|
* @returns {SageEmbed} Eureka/Sage embed
|
|
7736
7770
|
*/
|
|
7737
7771
|
render(): Promise<SageEmbed>;
|
|
7772
|
+
getCurrentContext(): Promise<PageContextOptions>;
|
|
7738
7773
|
}
|
|
7739
7774
|
/**
|
|
7740
7775
|
* Pages within the ThoughtSpot app that can be embedded.
|
|
@@ -8813,6 +8848,7 @@ declare class LiveboardEmbed extends V1Embed {
|
|
|
8813
8848
|
* @returns url string
|
|
8814
8849
|
*/
|
|
8815
8850
|
getLiveboardUrl(): string;
|
|
8851
|
+
getCurrentContext(): Promise<PageContextOptions>;
|
|
8816
8852
|
}
|
|
8817
8853
|
/**
|
|
8818
8854
|
* Configuration for bodyless conversation options.
|
|
@@ -9019,6 +9055,7 @@ declare class SpotterEmbed extends TsEmbed {
|
|
|
9019
9055
|
protected getEmbedParamsObject(): Record<any, any>;
|
|
9020
9056
|
getIframeSrc(): string;
|
|
9021
9057
|
render(): Promise<SpotterEmbed>;
|
|
9058
|
+
getCurrentContext(): Promise<PageContextOptions>;
|
|
9022
9059
|
}
|
|
9023
9060
|
declare class ConversationEmbed extends SpotterEmbed {
|
|
9024
9061
|
protected viewConfig: ConversationViewConfig;
|