@thoughtspot/visual-embed-sdk 1.42.1-HE2.0 → 1.42.1-HE2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/package.json +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 +12 -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/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 +66 -21
- package/dist/tsembed-react.js +65 -20
- package/dist/tsembed.es.js +66 -21
- package/dist/tsembed.js +65 -20
- 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 +12 -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 +14 -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.1 */
|
|
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
|
|
@@ -7391,6 +7400,29 @@
|
|
|
7391
7400
|
|
|
7392
7401
|
var isEmpty_1 = isEmpty$1;
|
|
7393
7402
|
|
|
7403
|
+
var UIPassthroughEvent;
|
|
7404
|
+
(function (UIPassthroughEvent) {
|
|
7405
|
+
UIPassthroughEvent["PinAnswerToLiveboard"] = "addVizToPinboard";
|
|
7406
|
+
UIPassthroughEvent["SaveAnswer"] = "saveAnswer";
|
|
7407
|
+
UIPassthroughEvent["GetDiscoverabilityStatus"] = "getDiscoverabilityStatus";
|
|
7408
|
+
UIPassthroughEvent["GetAvailableUIPassthroughs"] = "getAvailableUiPassthroughs";
|
|
7409
|
+
UIPassthroughEvent["GetAnswerConfig"] = "getAnswerPageConfig";
|
|
7410
|
+
UIPassthroughEvent["GetLiveboardConfig"] = "getPinboardPageConfig";
|
|
7411
|
+
})(UIPassthroughEvent || (UIPassthroughEvent = {}));
|
|
7412
|
+
var ContextType;
|
|
7413
|
+
(function (ContextType) {
|
|
7414
|
+
ContextType["Search"] = "search";
|
|
7415
|
+
ContextType["Liveboard"] = "liveboard";
|
|
7416
|
+
ContextType["Answer"] = "answer";
|
|
7417
|
+
ContextType["Spotter"] = "spotter";
|
|
7418
|
+
ContextType["Default"] = "default";
|
|
7419
|
+
})(ContextType || (ContextType = {}));
|
|
7420
|
+
var PageType;
|
|
7421
|
+
(function (PageType) {
|
|
7422
|
+
PageType["PAGE"] = "page";
|
|
7423
|
+
PageType["DIALOG"] = "dialog";
|
|
7424
|
+
})(PageType || (PageType = {}));
|
|
7425
|
+
|
|
7394
7426
|
const ERROR_MESSAGE = {
|
|
7395
7427
|
INVALID_THOUGHTSPOT_HOST: 'Error parsing ThoughtSpot host. Please provide a valid URL.',
|
|
7396
7428
|
SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND: 'Please select a worksheet to get started',
|
|
@@ -17495,7 +17527,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
17495
17527
|
return e;
|
|
17496
17528
|
}
|
|
17497
17529
|
|
|
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
|
|
17530
|
+
var name="@thoughtspot/visual-embed-sdk";var version$1="1.42.1-HE2.0.1";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports$1={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p 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
17531
|
|
|
17500
17532
|
/**
|
|
17501
17533
|
* Reloads the ThoughtSpot iframe.
|
|
@@ -17569,24 +17601,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
17569
17601
|
});
|
|
17570
17602
|
}
|
|
17571
17603
|
|
|
17572
|
-
var UIPassthroughEvent;
|
|
17573
|
-
(function (UIPassthroughEvent) {
|
|
17574
|
-
UIPassthroughEvent["PinAnswerToLiveboard"] = "addVizToPinboard";
|
|
17575
|
-
UIPassthroughEvent["SaveAnswer"] = "saveAnswer";
|
|
17576
|
-
UIPassthroughEvent["GetDiscoverabilityStatus"] = "getDiscoverabilityStatus";
|
|
17577
|
-
UIPassthroughEvent["GetAvailableUIPassthroughs"] = "getAvailableUiPassthroughs";
|
|
17578
|
-
UIPassthroughEvent["GetAnswerConfig"] = "getAnswerPageConfig";
|
|
17579
|
-
UIPassthroughEvent["GetLiveboardConfig"] = "getPinboardPageConfig";
|
|
17580
|
-
})(UIPassthroughEvent || (UIPassthroughEvent = {}));
|
|
17581
|
-
var ContextType;
|
|
17582
|
-
(function (ContextType) {
|
|
17583
|
-
ContextType["Search"] = "search";
|
|
17584
|
-
ContextType["Liveboard"] = "liveboard";
|
|
17585
|
-
ContextType["Answer"] = "answer";
|
|
17586
|
-
ContextType["Spotter"] = "spotter";
|
|
17587
|
-
ContextType["None"] = "";
|
|
17588
|
-
})(ContextType || (ContextType = {}));
|
|
17589
|
-
|
|
17590
17604
|
class HostEventClient {
|
|
17591
17605
|
constructor(iFrame) {
|
|
17592
17606
|
this.iFrame = iFrame;
|
|
@@ -18744,6 +18758,17 @@ 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
|
+
return {
|
|
18767
|
+
page: ContextType.Default,
|
|
18768
|
+
pageType: PageType.PAGE,
|
|
18769
|
+
objectIds: {},
|
|
18770
|
+
};
|
|
18771
|
+
}
|
|
18747
18772
|
/**
|
|
18748
18773
|
* Creates the preRender shell
|
|
18749
18774
|
* @param showPreRenderByDefault - Show the preRender after render, hidden by default
|
|
@@ -19114,6 +19139,10 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
19114
19139
|
const defaultAppInitData = await super.getAppInitData();
|
|
19115
19140
|
return { ...defaultAppInitData, ...this.getSearchInitData() };
|
|
19116
19141
|
}
|
|
19142
|
+
async getCurrentContext() {
|
|
19143
|
+
const context = await super.getCurrentContext();
|
|
19144
|
+
return context;
|
|
19145
|
+
}
|
|
19117
19146
|
};
|
|
19118
19147
|
|
|
19119
19148
|
/**
|
|
@@ -19196,6 +19225,10 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
19196
19225
|
await this.renderV1Embed(src);
|
|
19197
19226
|
return this;
|
|
19198
19227
|
}
|
|
19228
|
+
async getCurrentContext() {
|
|
19229
|
+
const context = await super.getCurrentContext();
|
|
19230
|
+
return context;
|
|
19231
|
+
}
|
|
19199
19232
|
};
|
|
19200
19233
|
|
|
19201
19234
|
/**
|
|
@@ -19374,6 +19407,10 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
19374
19407
|
});
|
|
19375
19408
|
return this;
|
|
19376
19409
|
}
|
|
19410
|
+
async getCurrentContext() {
|
|
19411
|
+
const context = await super.getCurrentContext();
|
|
19412
|
+
return context;
|
|
19413
|
+
}
|
|
19377
19414
|
};
|
|
19378
19415
|
|
|
19379
19416
|
/**
|
|
@@ -20234,6 +20271,10 @@ query GetEurekaVizSnapshots(
|
|
|
20234
20271
|
}
|
|
20235
20272
|
return url;
|
|
20236
20273
|
}
|
|
20274
|
+
async getCurrentContext() {
|
|
20275
|
+
const context = await super.getCurrentContext();
|
|
20276
|
+
return context;
|
|
20277
|
+
}
|
|
20237
20278
|
};
|
|
20238
20279
|
|
|
20239
20280
|
const createConversation = `
|
|
@@ -20847,6 +20888,10 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
20847
20888
|
await this.renderIFrame(src);
|
|
20848
20889
|
return this;
|
|
20849
20890
|
}
|
|
20891
|
+
async getCurrentContext() {
|
|
20892
|
+
const context = await super.getCurrentContext();
|
|
20893
|
+
return context;
|
|
20894
|
+
}
|
|
20850
20895
|
};
|
|
20851
20896
|
/**
|
|
20852
20897
|
* 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.1 */
|
|
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
|
|
@@ -7254,6 +7263,29 @@ function isEmpty(value) {
|
|
|
7254
7263
|
|
|
7255
7264
|
var isEmpty_1 = isEmpty;
|
|
7256
7265
|
|
|
7266
|
+
var UIPassthroughEvent;
|
|
7267
|
+
(function (UIPassthroughEvent) {
|
|
7268
|
+
UIPassthroughEvent["PinAnswerToLiveboard"] = "addVizToPinboard";
|
|
7269
|
+
UIPassthroughEvent["SaveAnswer"] = "saveAnswer";
|
|
7270
|
+
UIPassthroughEvent["GetDiscoverabilityStatus"] = "getDiscoverabilityStatus";
|
|
7271
|
+
UIPassthroughEvent["GetAvailableUIPassthroughs"] = "getAvailableUiPassthroughs";
|
|
7272
|
+
UIPassthroughEvent["GetAnswerConfig"] = "getAnswerPageConfig";
|
|
7273
|
+
UIPassthroughEvent["GetLiveboardConfig"] = "getPinboardPageConfig";
|
|
7274
|
+
})(UIPassthroughEvent || (UIPassthroughEvent = {}));
|
|
7275
|
+
var ContextType;
|
|
7276
|
+
(function (ContextType) {
|
|
7277
|
+
ContextType["Search"] = "search";
|
|
7278
|
+
ContextType["Liveboard"] = "liveboard";
|
|
7279
|
+
ContextType["Answer"] = "answer";
|
|
7280
|
+
ContextType["Spotter"] = "spotter";
|
|
7281
|
+
ContextType["Default"] = "default";
|
|
7282
|
+
})(ContextType || (ContextType = {}));
|
|
7283
|
+
var PageType;
|
|
7284
|
+
(function (PageType) {
|
|
7285
|
+
PageType["PAGE"] = "page";
|
|
7286
|
+
PageType["DIALOG"] = "dialog";
|
|
7287
|
+
})(PageType || (PageType = {}));
|
|
7288
|
+
|
|
7257
7289
|
const ERROR_MESSAGE = {
|
|
7258
7290
|
INVALID_THOUGHTSPOT_HOST: 'Error parsing ThoughtSpot host. Please provide a valid URL.',
|
|
7259
7291
|
SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND: 'Please select a worksheet to get started',
|
|
@@ -8185,7 +8217,7 @@ class AnswerService {
|
|
|
8185
8217
|
async getTML() {
|
|
8186
8218
|
const { object } = await this.executeQuery(getAnswerTML, {});
|
|
8187
8219
|
const edoc = object[0].edoc;
|
|
8188
|
-
const YAML = await import('./index-
|
|
8220
|
+
const YAML = await import('./index-BFdRRz03.js');
|
|
8189
8221
|
const parsedDoc = YAML.parse(edoc);
|
|
8190
8222
|
return {
|
|
8191
8223
|
answer: {
|
|
@@ -17524,7 +17556,7 @@ function processEventData(type, e, thoughtSpotHost, containerEl) {
|
|
|
17524
17556
|
return e;
|
|
17525
17557
|
}
|
|
17526
17558
|
|
|
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
|
|
17559
|
+
var name="@thoughtspot/visual-embed-sdk";var version$1="1.42.1-HE2.0.1";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p 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
17560
|
|
|
17529
17561
|
/**
|
|
17530
17562
|
* Reloads the ThoughtSpot iframe.
|
|
@@ -17598,24 +17630,6 @@ function processTrigger(iFrame, messageType, thoughtSpotHost, data, context) {
|
|
|
17598
17630
|
});
|
|
17599
17631
|
}
|
|
17600
17632
|
|
|
17601
|
-
var UIPassthroughEvent;
|
|
17602
|
-
(function (UIPassthroughEvent) {
|
|
17603
|
-
UIPassthroughEvent["PinAnswerToLiveboard"] = "addVizToPinboard";
|
|
17604
|
-
UIPassthroughEvent["SaveAnswer"] = "saveAnswer";
|
|
17605
|
-
UIPassthroughEvent["GetDiscoverabilityStatus"] = "getDiscoverabilityStatus";
|
|
17606
|
-
UIPassthroughEvent["GetAvailableUIPassthroughs"] = "getAvailableUiPassthroughs";
|
|
17607
|
-
UIPassthroughEvent["GetAnswerConfig"] = "getAnswerPageConfig";
|
|
17608
|
-
UIPassthroughEvent["GetLiveboardConfig"] = "getPinboardPageConfig";
|
|
17609
|
-
})(UIPassthroughEvent || (UIPassthroughEvent = {}));
|
|
17610
|
-
var ContextType;
|
|
17611
|
-
(function (ContextType) {
|
|
17612
|
-
ContextType["Search"] = "search";
|
|
17613
|
-
ContextType["Liveboard"] = "liveboard";
|
|
17614
|
-
ContextType["Answer"] = "answer";
|
|
17615
|
-
ContextType["Spotter"] = "spotter";
|
|
17616
|
-
ContextType["None"] = "";
|
|
17617
|
-
})(ContextType || (ContextType = {}));
|
|
17618
|
-
|
|
17619
17633
|
class HostEventClient {
|
|
17620
17634
|
constructor(iFrame) {
|
|
17621
17635
|
this.iFrame = iFrame;
|
|
@@ -18773,6 +18787,17 @@ 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
|
+
return {
|
|
18796
|
+
page: ContextType.Default,
|
|
18797
|
+
pageType: PageType.PAGE,
|
|
18798
|
+
objectIds: {},
|
|
18799
|
+
};
|
|
18800
|
+
}
|
|
18776
18801
|
/**
|
|
18777
18802
|
* Creates the preRender shell
|
|
18778
18803
|
* @param showPreRenderByDefault - Show the preRender after render, hidden by default
|
|
@@ -19928,6 +19953,10 @@ class LiveboardEmbed extends V1Embed {
|
|
|
19928
19953
|
}
|
|
19929
19954
|
return url;
|
|
19930
19955
|
}
|
|
19956
|
+
async getCurrentContext() {
|
|
19957
|
+
const context = await super.getCurrentContext();
|
|
19958
|
+
return context;
|
|
19959
|
+
}
|
|
19931
19960
|
}
|
|
19932
19961
|
/**
|
|
19933
19962
|
* @hidden
|
|
@@ -20111,6 +20140,10 @@ class SearchEmbed extends TsEmbed {
|
|
|
20111
20140
|
});
|
|
20112
20141
|
return this;
|
|
20113
20142
|
}
|
|
20143
|
+
async getCurrentContext() {
|
|
20144
|
+
const context = await super.getCurrentContext();
|
|
20145
|
+
return context;
|
|
20146
|
+
}
|
|
20114
20147
|
}
|
|
20115
20148
|
|
|
20116
20149
|
/**
|
|
@@ -20186,6 +20219,10 @@ class SearchBarEmbed extends TsEmbed {
|
|
|
20186
20219
|
const defaultAppInitData = await super.getAppInitData();
|
|
20187
20220
|
return { ...defaultAppInitData, ...this.getSearchInitData() };
|
|
20188
20221
|
}
|
|
20222
|
+
async getCurrentContext() {
|
|
20223
|
+
const context = await super.getCurrentContext();
|
|
20224
|
+
return context;
|
|
20225
|
+
}
|
|
20189
20226
|
}
|
|
20190
20227
|
|
|
20191
20228
|
const createConversation = `
|
|
@@ -20804,6 +20841,10 @@ class SpotterEmbed extends TsEmbed {
|
|
|
20804
20841
|
await this.renderIFrame(src);
|
|
20805
20842
|
return this;
|
|
20806
20843
|
}
|
|
20844
|
+
async getCurrentContext() {
|
|
20845
|
+
const context = await super.getCurrentContext();
|
|
20846
|
+
return context;
|
|
20847
|
+
}
|
|
20807
20848
|
}
|
|
20808
20849
|
/**
|
|
20809
20850
|
* Embed ThoughtSpot AI Conversation.
|
|
@@ -20910,6 +20951,10 @@ class SageEmbed extends V1Embed {
|
|
|
20910
20951
|
await this.renderV1Embed(src);
|
|
20911
20952
|
return this;
|
|
20912
20953
|
}
|
|
20954
|
+
async getCurrentContext() {
|
|
20955
|
+
const context = await super.getCurrentContext();
|
|
20956
|
+
return context;
|
|
20957
|
+
}
|
|
20913
20958
|
}
|
|
20914
20959
|
|
|
20915
20960
|
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.1 */
|
|
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
|
|
@@ -7260,6 +7269,29 @@
|
|
|
7260
7269
|
|
|
7261
7270
|
var isEmpty_1 = isEmpty$1;
|
|
7262
7271
|
|
|
7272
|
+
exports.UIPassthroughEvent = void 0;
|
|
7273
|
+
(function (UIPassthroughEvent) {
|
|
7274
|
+
UIPassthroughEvent["PinAnswerToLiveboard"] = "addVizToPinboard";
|
|
7275
|
+
UIPassthroughEvent["SaveAnswer"] = "saveAnswer";
|
|
7276
|
+
UIPassthroughEvent["GetDiscoverabilityStatus"] = "getDiscoverabilityStatus";
|
|
7277
|
+
UIPassthroughEvent["GetAvailableUIPassthroughs"] = "getAvailableUiPassthroughs";
|
|
7278
|
+
UIPassthroughEvent["GetAnswerConfig"] = "getAnswerPageConfig";
|
|
7279
|
+
UIPassthroughEvent["GetLiveboardConfig"] = "getPinboardPageConfig";
|
|
7280
|
+
})(exports.UIPassthroughEvent || (exports.UIPassthroughEvent = {}));
|
|
7281
|
+
var ContextType;
|
|
7282
|
+
(function (ContextType) {
|
|
7283
|
+
ContextType["Search"] = "search";
|
|
7284
|
+
ContextType["Liveboard"] = "liveboard";
|
|
7285
|
+
ContextType["Answer"] = "answer";
|
|
7286
|
+
ContextType["Spotter"] = "spotter";
|
|
7287
|
+
ContextType["Default"] = "default";
|
|
7288
|
+
})(ContextType || (ContextType = {}));
|
|
7289
|
+
var PageType;
|
|
7290
|
+
(function (PageType) {
|
|
7291
|
+
PageType["PAGE"] = "page";
|
|
7292
|
+
PageType["DIALOG"] = "dialog";
|
|
7293
|
+
})(PageType || (PageType = {}));
|
|
7294
|
+
|
|
7263
7295
|
const ERROR_MESSAGE = {
|
|
7264
7296
|
INVALID_THOUGHTSPOT_HOST: 'Error parsing ThoughtSpot host. Please provide a valid URL.',
|
|
7265
7297
|
SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND: 'Please select a worksheet to get started',
|
|
@@ -17530,7 +17562,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
17530
17562
|
return e;
|
|
17531
17563
|
}
|
|
17532
17564
|
|
|
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
|
|
17565
|
+
var name="@thoughtspot/visual-embed-sdk";var version$1="1.42.1-HE2.0.1";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports$1={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p 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
17566
|
|
|
17535
17567
|
/**
|
|
17536
17568
|
* Reloads the ThoughtSpot iframe.
|
|
@@ -17604,24 +17636,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
17604
17636
|
});
|
|
17605
17637
|
}
|
|
17606
17638
|
|
|
17607
|
-
exports.UIPassthroughEvent = void 0;
|
|
17608
|
-
(function (UIPassthroughEvent) {
|
|
17609
|
-
UIPassthroughEvent["PinAnswerToLiveboard"] = "addVizToPinboard";
|
|
17610
|
-
UIPassthroughEvent["SaveAnswer"] = "saveAnswer";
|
|
17611
|
-
UIPassthroughEvent["GetDiscoverabilityStatus"] = "getDiscoverabilityStatus";
|
|
17612
|
-
UIPassthroughEvent["GetAvailableUIPassthroughs"] = "getAvailableUiPassthroughs";
|
|
17613
|
-
UIPassthroughEvent["GetAnswerConfig"] = "getAnswerPageConfig";
|
|
17614
|
-
UIPassthroughEvent["GetLiveboardConfig"] = "getPinboardPageConfig";
|
|
17615
|
-
})(exports.UIPassthroughEvent || (exports.UIPassthroughEvent = {}));
|
|
17616
|
-
var ContextType;
|
|
17617
|
-
(function (ContextType) {
|
|
17618
|
-
ContextType["Search"] = "search";
|
|
17619
|
-
ContextType["Liveboard"] = "liveboard";
|
|
17620
|
-
ContextType["Answer"] = "answer";
|
|
17621
|
-
ContextType["Spotter"] = "spotter";
|
|
17622
|
-
ContextType["None"] = "";
|
|
17623
|
-
})(ContextType || (ContextType = {}));
|
|
17624
|
-
|
|
17625
17639
|
class HostEventClient {
|
|
17626
17640
|
constructor(iFrame) {
|
|
17627
17641
|
this.iFrame = iFrame;
|
|
@@ -18779,6 +18793,17 @@ 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
|
+
return {
|
|
18802
|
+
page: ContextType.Default,
|
|
18803
|
+
pageType: PageType.PAGE,
|
|
18804
|
+
objectIds: {},
|
|
18805
|
+
};
|
|
18806
|
+
}
|
|
18782
18807
|
/**
|
|
18783
18808
|
* Creates the preRender shell
|
|
18784
18809
|
* @param showPreRenderByDefault - Show the preRender after render, hidden by default
|
|
@@ -19934,6 +19959,10 @@ query GetEurekaVizSnapshots(
|
|
|
19934
19959
|
}
|
|
19935
19960
|
return url;
|
|
19936
19961
|
}
|
|
19962
|
+
async getCurrentContext() {
|
|
19963
|
+
const context = await super.getCurrentContext();
|
|
19964
|
+
return context;
|
|
19965
|
+
}
|
|
19937
19966
|
}
|
|
19938
19967
|
/**
|
|
19939
19968
|
* @hidden
|
|
@@ -20117,6 +20146,10 @@ query GetEurekaVizSnapshots(
|
|
|
20117
20146
|
});
|
|
20118
20147
|
return this;
|
|
20119
20148
|
}
|
|
20149
|
+
async getCurrentContext() {
|
|
20150
|
+
const context = await super.getCurrentContext();
|
|
20151
|
+
return context;
|
|
20152
|
+
}
|
|
20120
20153
|
}
|
|
20121
20154
|
|
|
20122
20155
|
/**
|
|
@@ -20192,6 +20225,10 @@ query GetEurekaVizSnapshots(
|
|
|
20192
20225
|
const defaultAppInitData = await super.getAppInitData();
|
|
20193
20226
|
return { ...defaultAppInitData, ...this.getSearchInitData() };
|
|
20194
20227
|
}
|
|
20228
|
+
async getCurrentContext() {
|
|
20229
|
+
const context = await super.getCurrentContext();
|
|
20230
|
+
return context;
|
|
20231
|
+
}
|
|
20195
20232
|
}
|
|
20196
20233
|
|
|
20197
20234
|
const createConversation = `
|
|
@@ -20810,6 +20847,10 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
20810
20847
|
await this.renderIFrame(src);
|
|
20811
20848
|
return this;
|
|
20812
20849
|
}
|
|
20850
|
+
async getCurrentContext() {
|
|
20851
|
+
const context = await super.getCurrentContext();
|
|
20852
|
+
return context;
|
|
20853
|
+
}
|
|
20813
20854
|
}
|
|
20814
20855
|
/**
|
|
20815
20856
|
* Embed ThoughtSpot AI Conversation.
|
|
@@ -20916,6 +20957,10 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
20916
20957
|
await this.renderV1Embed(src);
|
|
20917
20958
|
return this;
|
|
20918
20959
|
}
|
|
20960
|
+
async getCurrentContext() {
|
|
20961
|
+
const context = await super.getCurrentContext();
|
|
20962
|
+
return context;
|
|
20963
|
+
}
|
|
20919
20964
|
}
|
|
20920
20965
|
|
|
20921
20966
|
const getAnswerSessionFromQuery = `
|