@thoughtspot/visual-embed-sdk 1.37.0-temp-nav → 1.37.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/auth.d.ts +7 -3
- package/cjs/src/auth.d.ts.map +1 -1
- package/cjs/src/auth.js +20 -0
- package/cjs/src/auth.js.map +1 -1
- package/cjs/src/auth.spec.js +48 -0
- package/cjs/src/auth.spec.js.map +1 -1
- package/cjs/src/embed/app.d.ts +37 -14
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +35 -7
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/app.spec.js +19 -8
- package/cjs/src/embed/app.spec.js.map +1 -1
- package/cjs/src/embed/base.d.ts.map +1 -1
- package/cjs/src/embed/base.js +7 -0
- package/cjs/src/embed/base.js.map +1 -1
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +6 -4
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/embed/ts-embed.spec.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.spec.js +105 -0
- package/cjs/src/embed/ts-embed.spec.js.map +1 -1
- package/cjs/src/types.d.ts +24 -2
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +24 -2
- package/cjs/src/types.js.map +1 -1
- package/dist/{index-Fhk1V_Gw.js → index-m9UtENc9.js} +1 -1
- package/dist/src/auth.d.ts +7 -3
- package/dist/src/auth.d.ts.map +1 -1
- package/dist/src/embed/app.d.ts +37 -14
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/base.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.spec.d.ts.map +1 -1
- package/dist/src/types.d.ts +24 -2
- package/dist/src/types.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +94 -15
- package/dist/tsembed-react.js +93 -14
- package/dist/tsembed.es.js +94 -15
- package/dist/tsembed.js +93 -14
- package/dist/visual-embed-sdk-react-full.d.ts +68 -19
- package/dist/visual-embed-sdk-react.d.ts +68 -19
- package/dist/visual-embed-sdk.d.ts +68 -19
- package/lib/package.json +2 -2
- package/lib/src/auth.d.ts +7 -3
- package/lib/src/auth.d.ts.map +1 -1
- package/lib/src/auth.js +20 -0
- package/lib/src/auth.js.map +1 -1
- package/lib/src/auth.spec.js +48 -0
- package/lib/src/auth.spec.js.map +1 -1
- package/lib/src/embed/app.d.ts +37 -14
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +34 -6
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/app.spec.js +20 -9
- package/lib/src/embed/app.spec.js.map +1 -1
- package/lib/src/embed/base.d.ts.map +1 -1
- package/lib/src/embed/base.js +7 -0
- package/lib/src/embed/base.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +6 -4
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/embed/ts-embed.spec.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.spec.js +105 -0
- package/lib/src/embed/ts-embed.spec.js.map +1 -1
- package/lib/src/types.d.ts +24 -2
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +24 -2
- package/lib/src/types.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +68 -19
- package/package.json +2 -2
- package/src/auth.spec.ts +52 -0
- package/src/auth.ts +23 -2
- package/src/embed/app.spec.ts +26 -8
- package/src/embed/app.ts +48 -19
- package/src/embed/base.ts +9 -0
- package/src/embed/ts-embed.spec.ts +130 -0
- package/src/embed/ts-embed.ts +6 -4
- package/src/types.ts +24 -2
- package/cjs/src/pages/embed-test.page.d.ts +0 -8
- package/cjs/src/pages/embed-test.page.d.ts.map +0 -1
- package/cjs/src/pages/embed-test.page.js +0 -20
- package/cjs/src/pages/embed-test.page.js.map +0 -1
- package/cjs/src/pages/home.page.d.ts +0 -6
- package/cjs/src/pages/home.page.d.ts.map +0 -1
- package/cjs/src/pages/home.page.js +0 -12
- package/cjs/src/pages/home.page.js.map +0 -1
- package/cjs/src/pages/login.page.d.ts +0 -15
- package/cjs/src/pages/login.page.d.ts.map +0 -1
- package/cjs/src/pages/login.page.js +0 -22
- package/cjs/src/pages/login.page.js.map +0 -1
- package/cjs/src/tests/auth.test.d.ts +0 -1
- package/cjs/src/tests/auth.test.d.ts.map +0 -1
- package/cjs/src/tests/auth.test.js +0 -1
- package/cjs/src/tests/auth.test.js.map +0 -1
- package/cjs/src/tests/e2e/auth.spec.d.ts +0 -2
- package/cjs/src/tests/e2e/auth.spec.d.ts.map +0 -1
- package/cjs/src/tests/e2e/auth.spec.js +0 -54
- package/cjs/src/tests/e2e/auth.spec.js.map +0 -1
- package/dist/index-Cj4BVGHL.js +0 -7371
package/dist/tsembed.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @thoughtspot/visual-embed-sdk version 1.37.
|
|
1
|
+
/* @thoughtspot/visual-embed-sdk version 1.37.1 */
|
|
2
2
|
'use client';
|
|
3
3
|
function _mergeNamespaces(n, m) {
|
|
4
4
|
m.forEach(function (e) {
|
|
@@ -1999,9 +1999,12 @@ var HostEvent;
|
|
|
1999
1999
|
* @example
|
|
2000
2000
|
* ```js
|
|
2001
2001
|
* searchEmbed.trigger(HostEvent.OpenFilter,
|
|
2002
|
-
* { columnId: '<column-GUID>', name: 'column name', type: 'INT64', dataType: 'ATTRIBUTE'})
|
|
2002
|
+
* {column: { columnId: '<column-GUID>', name: 'column name', type: 'INT64', dataType: 'ATTRIBUTE'}})
|
|
2003
|
+
* ```
|
|
2004
|
+
* @example
|
|
2005
|
+
* ```js
|
|
2003
2006
|
* LiveboardEmbed.trigger(HostEvent.OpenFilter,
|
|
2004
|
-
*
|
|
2007
|
+
* { column: {columnId: '<column-GUID>'}})
|
|
2005
2008
|
* ```
|
|
2006
2009
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
|
|
2007
2010
|
*/
|
|
@@ -2610,6 +2613,25 @@ var HostEvent;
|
|
|
2610
2613
|
* }]
|
|
2611
2614
|
* });
|
|
2612
2615
|
* ```
|
|
2616
|
+
* If there are multiple columns with the same name, consider
|
|
2617
|
+
* using `WORKSHEET_NAME::COLUMN_NAME` format.
|
|
2618
|
+
*
|
|
2619
|
+
* @example
|
|
2620
|
+
*
|
|
2621
|
+
* ```js
|
|
2622
|
+
* liveboardEmbed.trigger(HostEvent.UpdateFilters, {
|
|
2623
|
+
* filters: [{
|
|
2624
|
+
* column: "(Sample) Retail - Apparel::city",
|
|
2625
|
+
* oper: 'IN',
|
|
2626
|
+
* values: ["atlanta"]
|
|
2627
|
+
* },
|
|
2628
|
+
* {
|
|
2629
|
+
* column: "(Sample) Retail - Apparel::Region",
|
|
2630
|
+
* oper: 'IN',
|
|
2631
|
+
* values: ["West","Midwest"]
|
|
2632
|
+
* }]
|
|
2633
|
+
* });
|
|
2634
|
+
* ```
|
|
2613
2635
|
* @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
|
|
2614
2636
|
*/
|
|
2615
2637
|
HostEvent["UpdateFilters"] = "updateFilters";
|
|
@@ -7491,7 +7513,7 @@ class AnswerService {
|
|
|
7491
7513
|
async getTML() {
|
|
7492
7514
|
const { object } = await this.executeQuery(getAnswerTML, {});
|
|
7493
7515
|
const edoc = object[0].edoc;
|
|
7494
|
-
const YAML = await import('./index-
|
|
7516
|
+
const YAML = await import('./index-m9UtENc9.js');
|
|
7495
7517
|
const parsedDoc = YAML.parse(edoc);
|
|
7496
7518
|
return {
|
|
7497
7519
|
answer: {
|
|
@@ -14551,6 +14573,10 @@ var AuthStatus;
|
|
|
14551
14573
|
* @version SDK: 1.19.0
|
|
14552
14574
|
*/
|
|
14553
14575
|
AuthStatus["WAITING_FOR_POPUP"] = "WAITING_FOR_POPUP";
|
|
14576
|
+
/**
|
|
14577
|
+
* Emitted when the SAML popup is closed without authentication
|
|
14578
|
+
*/
|
|
14579
|
+
AuthStatus["SAML_POPUP_CLOSED_NO_AUTH"] = "SAML_POPUP_CLOSED_NO_AUTH";
|
|
14554
14580
|
})(AuthStatus || (AuthStatus = {}));
|
|
14555
14581
|
/**
|
|
14556
14582
|
* Events which can be triggered on the emitter returned from {@link init}.
|
|
@@ -14771,14 +14797,26 @@ const doBasicAuth = async (embedConfig) => {
|
|
|
14771
14797
|
* @param triggerText
|
|
14772
14798
|
*/
|
|
14773
14799
|
async function samlPopupFlow(ssoURL, triggerContainer, triggerText) {
|
|
14800
|
+
let popupClosedCheck;
|
|
14774
14801
|
const openPopup = () => {
|
|
14775
14802
|
if (samlAuthWindow === null || samlAuthWindow.closed) {
|
|
14776
14803
|
samlAuthWindow = window.open(ssoURL, '_blank', 'location=no,height=570,width=520,scrollbars=yes,status=yes');
|
|
14804
|
+
if (samlAuthWindow) {
|
|
14805
|
+
popupClosedCheck = setInterval(() => {
|
|
14806
|
+
if (samlAuthWindow.closed) {
|
|
14807
|
+
clearInterval(popupClosedCheck);
|
|
14808
|
+
if (samlCompletionPromise && !samlCompletionResolved) {
|
|
14809
|
+
authEE === null || authEE === void 0 ? void 0 : authEE.emit(AuthStatus.SAML_POPUP_CLOSED_NO_AUTH);
|
|
14810
|
+
}
|
|
14811
|
+
}
|
|
14812
|
+
}, 500);
|
|
14813
|
+
}
|
|
14777
14814
|
}
|
|
14778
14815
|
else {
|
|
14779
14816
|
samlAuthWindow.focus();
|
|
14780
14817
|
}
|
|
14781
14818
|
};
|
|
14819
|
+
let samlCompletionResolved = false;
|
|
14782
14820
|
authEE === null || authEE === void 0 ? void 0 : authEE.emit(AuthStatus.WAITING_FOR_POPUP);
|
|
14783
14821
|
const containerEl = getDOMNode(triggerContainer);
|
|
14784
14822
|
if (containerEl) {
|
|
@@ -14790,6 +14828,10 @@ async function samlPopupFlow(ssoURL, triggerContainer, triggerText) {
|
|
|
14790
14828
|
samlCompletionPromise = samlCompletionPromise || new Promise((resolve, reject) => {
|
|
14791
14829
|
window.addEventListener('message', (e) => {
|
|
14792
14830
|
if (e.data.type === EmbedEvent.SAMLComplete) {
|
|
14831
|
+
samlCompletionResolved = true;
|
|
14832
|
+
if (popupClosedCheck) {
|
|
14833
|
+
clearInterval(popupClosedCheck);
|
|
14834
|
+
}
|
|
14793
14835
|
e.source.close();
|
|
14794
14836
|
resolve();
|
|
14795
14837
|
}
|
|
@@ -14979,6 +15021,13 @@ const prefetch = (url, prefetchFeatures, additionalFlags) => {
|
|
|
14979
15021
|
iFrame.style.width = '0';
|
|
14980
15022
|
iFrame.style.height = '0';
|
|
14981
15023
|
iFrame.style.border = '0';
|
|
15024
|
+
// Make it 'fixed' to keep it in a different stacking context.
|
|
15025
|
+
// This should solve the focus behaviours inside the iframe from
|
|
15026
|
+
// interfering with main body.
|
|
15027
|
+
iFrame.style.position = 'fixed';
|
|
15028
|
+
// Push it out of viewport.
|
|
15029
|
+
iFrame.style.top = '100vh';
|
|
15030
|
+
iFrame.style.left = '100vw';
|
|
14982
15031
|
iFrame.classList.add('prefetchIframe');
|
|
14983
15032
|
iFrame.classList.add(`prefetchIframeNum-${index}`);
|
|
14984
15033
|
document.body.appendChild(iFrame);
|
|
@@ -15350,7 +15399,7 @@ function processEventData(type, e, thoughtSpotHost, containerEl) {
|
|
|
15350
15399
|
return e;
|
|
15351
15400
|
}
|
|
15352
15401
|
|
|
15353
|
-
var name="@thoughtspot/visual-embed-sdk";var version$1="1.37.
|
|
15402
|
+
var name="@thoughtspot/visual-embed-sdk";var version$1="1.37.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 . --incremental false; tsc -p . --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts","bundle-dts":"dts-bundle --name ../../dist/visual-embed-sdk --main lib/src/index.d.ts --outputAsModuleFolder=true","bundle-dts-react":"dts-bundle --name ../../../dist/visual-embed-sdk-react --main lib/src/react/index.d.ts --outputAsModuleFolder=true","bundle-dts-react-full":"dts-bundle --name ../../../dist/visual-embed-sdk-react-full --main lib/src/react/all-types-export.d.ts --outputAsModuleFolder=true",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.json --theme typedoc-theme --json static/typedoc/typedoc.json --disableOutputCheck","test-sdk":"jest -c jest.config.sdk.js --runInBand",test:"npm run test-sdk",posttest:"cat ./coverage/sdk/lcov.info | coveralls","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest",dev:"vite -c vite.local.config.ts"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={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":"^8.2.6","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^22.2.3","@types/lodash":"^4.17.0","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^8.28.0","@typescript-eslint/parser":"^8.28.0",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1",coveralls:"^3.1.0",crypto:"^1.0.1","current-git-branch":"^1.1.0","dts-bundle":"^0.7.3",eslint:"^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":"^1.1.1",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:"31 kB"}],scripts:scripts,peerDependencies:peerDependencies,dependencies:dependencies,devDependencies:devDependencies,author:author,email:email,license:license,directories:directories,repository:repository,publishConfig:publishConfig,keywords:keywords,bugs:bugs,homepage:homepage,globals:globals};
|
|
15354
15403
|
|
|
15355
15404
|
/**
|
|
15356
15405
|
* Reloads the ThoughtSpot iframe.
|
|
@@ -15584,11 +15633,13 @@ class TsEmbed {
|
|
|
15584
15633
|
* @param responder
|
|
15585
15634
|
*/
|
|
15586
15635
|
this.updateAuthToken = async (_, responder) => {
|
|
15587
|
-
const {
|
|
15588
|
-
|
|
15589
|
-
|
|
15636
|
+
const { authType } = this.embedConfig;
|
|
15637
|
+
let { autoLogin } = this.embedConfig;
|
|
15638
|
+
// Default autoLogin: true for cookieless if undefined/null, otherwise false
|
|
15639
|
+
autoLogin = autoLogin !== null && autoLogin !== void 0 ? autoLogin : (authType === AuthType.TrustedAuthTokenCookieless);
|
|
15640
|
+
if (autoLogin && authType === AuthType.TrustedAuthTokenCookieless) {
|
|
15590
15641
|
try {
|
|
15591
|
-
authToken = await getAuthenticationToken(this.embedConfig);
|
|
15642
|
+
const authToken = await getAuthenticationToken(this.embedConfig);
|
|
15592
15643
|
responder({
|
|
15593
15644
|
type: EmbedEvent.AuthExpire,
|
|
15594
15645
|
data: { authToken },
|
|
@@ -16742,6 +16793,31 @@ var HomePageSearchBarMode;
|
|
|
16742
16793
|
HomePageSearchBarMode["AI_ANSWER"] = "aiAnswer";
|
|
16743
16794
|
HomePageSearchBarMode["NONE"] = "none";
|
|
16744
16795
|
})(HomePageSearchBarMode || (HomePageSearchBarMode = {}));
|
|
16796
|
+
/**
|
|
16797
|
+
* Define the version of the primary navbar
|
|
16798
|
+
* @version SDK: 1.39.0 | Thoughtspot: 10.10.0.cl
|
|
16799
|
+
*/
|
|
16800
|
+
var PrimaryNavbarVersion;
|
|
16801
|
+
(function (PrimaryNavbarVersion) {
|
|
16802
|
+
/**
|
|
16803
|
+
* Sliding (v3) introduces a new left-side navigation hub featuring a tab switcher,
|
|
16804
|
+
* along with updates to the top navigation bar.
|
|
16805
|
+
* It serves as the foundational version of the PrimaryNavBar.
|
|
16806
|
+
*/
|
|
16807
|
+
PrimaryNavbarVersion["Sliding"] = "v3";
|
|
16808
|
+
})(PrimaryNavbarVersion || (PrimaryNavbarVersion = {}));
|
|
16809
|
+
/**
|
|
16810
|
+
* Define the version of the home page
|
|
16811
|
+
* @version SDK: 1.39.0 | Thoughtspot: 10.10.0.cl
|
|
16812
|
+
*/
|
|
16813
|
+
var HomePage;
|
|
16814
|
+
(function (HomePage) {
|
|
16815
|
+
/**
|
|
16816
|
+
* Modular (v2) introduces the updated Modular Home Experience.
|
|
16817
|
+
* It serves as the foundational version of the home page.
|
|
16818
|
+
*/
|
|
16819
|
+
HomePage["Modular"] = "v2";
|
|
16820
|
+
})(HomePage || (HomePage = {}));
|
|
16745
16821
|
/**
|
|
16746
16822
|
* Embeds full ThoughtSpot experience in a host application.
|
|
16747
16823
|
* @group Embed components
|
|
@@ -16796,9 +16872,9 @@ class AppEmbed extends V1Embed {
|
|
|
16796
16872
|
* embedded Liveboard or visualization.
|
|
16797
16873
|
*/
|
|
16798
16874
|
getEmbedParams() {
|
|
16799
|
-
const { tag, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideHamburger, hideObjectSearch, hideNotification, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 = false, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, hideHomepageLeftNav = false, modularHomeExperience = false,
|
|
16875
|
+
const { tag, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideHamburger, hideObjectSearch, hideNotification, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 = false, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, hideHomepageLeftNav = false, modularHomeExperience = false, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, enable2ColumnLayout, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false,
|
|
16800
16876
|
/* eslint-disable-next-line max-len */
|
|
16801
|
-
dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, } = this.viewConfig;
|
|
16877
|
+
dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, discoveryExperience, } = this.viewConfig;
|
|
16802
16878
|
let params = {};
|
|
16803
16879
|
params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
|
|
16804
16880
|
params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
|
|
@@ -16871,11 +16947,14 @@ class AppEmbed extends V1Embed {
|
|
|
16871
16947
|
/* eslint-disable-next-line max-len */
|
|
16872
16948
|
params[Param.DataPanelCustomGroupsAccordionInitialState] = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL;
|
|
16873
16949
|
}
|
|
16874
|
-
if (
|
|
16875
|
-
|
|
16876
|
-
|
|
16950
|
+
if (discoveryExperience) {
|
|
16951
|
+
// primaryNavbarVersion v3 will enabled the new left navigation
|
|
16952
|
+
if (discoveryExperience.primaryNavbarVersion === PrimaryNavbarVersion.Sliding) {
|
|
16953
|
+
params[Param.NavigationVersion] = discoveryExperience.primaryNavbarVersion;
|
|
16877
16954
|
}
|
|
16878
|
-
|
|
16955
|
+
// homePage v2 will enable the modular home page
|
|
16956
|
+
// and it will override the modularHomeExperience value
|
|
16957
|
+
if (discoveryExperience.homePage === HomePage.Modular) {
|
|
16879
16958
|
params[Param.ModularHomeExperienceEnabled] = true;
|
|
16880
16959
|
}
|
|
16881
16960
|
}
|
package/dist/tsembed.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @thoughtspot/visual-embed-sdk version 1.37.
|
|
1
|
+
/* @thoughtspot/visual-embed-sdk version 1.37.1 */
|
|
2
2
|
'use client';
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
@@ -2005,9 +2005,12 @@
|
|
|
2005
2005
|
* @example
|
|
2006
2006
|
* ```js
|
|
2007
2007
|
* searchEmbed.trigger(HostEvent.OpenFilter,
|
|
2008
|
-
* { columnId: '<column-GUID>', name: 'column name', type: 'INT64', dataType: 'ATTRIBUTE'})
|
|
2008
|
+
* {column: { columnId: '<column-GUID>', name: 'column name', type: 'INT64', dataType: 'ATTRIBUTE'}})
|
|
2009
|
+
* ```
|
|
2010
|
+
* @example
|
|
2011
|
+
* ```js
|
|
2009
2012
|
* LiveboardEmbed.trigger(HostEvent.OpenFilter,
|
|
2010
|
-
*
|
|
2013
|
+
* { column: {columnId: '<column-GUID>'}})
|
|
2011
2014
|
* ```
|
|
2012
2015
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
|
|
2013
2016
|
*/
|
|
@@ -2616,6 +2619,25 @@
|
|
|
2616
2619
|
* }]
|
|
2617
2620
|
* });
|
|
2618
2621
|
* ```
|
|
2622
|
+
* If there are multiple columns with the same name, consider
|
|
2623
|
+
* using `WORKSHEET_NAME::COLUMN_NAME` format.
|
|
2624
|
+
*
|
|
2625
|
+
* @example
|
|
2626
|
+
*
|
|
2627
|
+
* ```js
|
|
2628
|
+
* liveboardEmbed.trigger(HostEvent.UpdateFilters, {
|
|
2629
|
+
* filters: [{
|
|
2630
|
+
* column: "(Sample) Retail - Apparel::city",
|
|
2631
|
+
* oper: 'IN',
|
|
2632
|
+
* values: ["atlanta"]
|
|
2633
|
+
* },
|
|
2634
|
+
* {
|
|
2635
|
+
* column: "(Sample) Retail - Apparel::Region",
|
|
2636
|
+
* oper: 'IN',
|
|
2637
|
+
* values: ["West","Midwest"]
|
|
2638
|
+
* }]
|
|
2639
|
+
* });
|
|
2640
|
+
* ```
|
|
2619
2641
|
* @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
|
|
2620
2642
|
*/
|
|
2621
2643
|
HostEvent["UpdateFilters"] = "updateFilters";
|
|
@@ -14557,6 +14579,10 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
14557
14579
|
* @version SDK: 1.19.0
|
|
14558
14580
|
*/
|
|
14559
14581
|
AuthStatus["WAITING_FOR_POPUP"] = "WAITING_FOR_POPUP";
|
|
14582
|
+
/**
|
|
14583
|
+
* Emitted when the SAML popup is closed without authentication
|
|
14584
|
+
*/
|
|
14585
|
+
AuthStatus["SAML_POPUP_CLOSED_NO_AUTH"] = "SAML_POPUP_CLOSED_NO_AUTH";
|
|
14560
14586
|
})(exports.AuthStatus || (exports.AuthStatus = {}));
|
|
14561
14587
|
/**
|
|
14562
14588
|
* Events which can be triggered on the emitter returned from {@link init}.
|
|
@@ -14777,14 +14803,26 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
14777
14803
|
* @param triggerText
|
|
14778
14804
|
*/
|
|
14779
14805
|
async function samlPopupFlow(ssoURL, triggerContainer, triggerText) {
|
|
14806
|
+
let popupClosedCheck;
|
|
14780
14807
|
const openPopup = () => {
|
|
14781
14808
|
if (samlAuthWindow === null || samlAuthWindow.closed) {
|
|
14782
14809
|
samlAuthWindow = window.open(ssoURL, '_blank', 'location=no,height=570,width=520,scrollbars=yes,status=yes');
|
|
14810
|
+
if (samlAuthWindow) {
|
|
14811
|
+
popupClosedCheck = setInterval(() => {
|
|
14812
|
+
if (samlAuthWindow.closed) {
|
|
14813
|
+
clearInterval(popupClosedCheck);
|
|
14814
|
+
if (samlCompletionPromise && !samlCompletionResolved) {
|
|
14815
|
+
authEE === null || authEE === void 0 ? void 0 : authEE.emit(exports.AuthStatus.SAML_POPUP_CLOSED_NO_AUTH);
|
|
14816
|
+
}
|
|
14817
|
+
}
|
|
14818
|
+
}, 500);
|
|
14819
|
+
}
|
|
14783
14820
|
}
|
|
14784
14821
|
else {
|
|
14785
14822
|
samlAuthWindow.focus();
|
|
14786
14823
|
}
|
|
14787
14824
|
};
|
|
14825
|
+
let samlCompletionResolved = false;
|
|
14788
14826
|
authEE === null || authEE === void 0 ? void 0 : authEE.emit(exports.AuthStatus.WAITING_FOR_POPUP);
|
|
14789
14827
|
const containerEl = getDOMNode(triggerContainer);
|
|
14790
14828
|
if (containerEl) {
|
|
@@ -14796,6 +14834,10 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
14796
14834
|
samlCompletionPromise = samlCompletionPromise || new Promise((resolve, reject) => {
|
|
14797
14835
|
window.addEventListener('message', (e) => {
|
|
14798
14836
|
if (e.data.type === exports.EmbedEvent.SAMLComplete) {
|
|
14837
|
+
samlCompletionResolved = true;
|
|
14838
|
+
if (popupClosedCheck) {
|
|
14839
|
+
clearInterval(popupClosedCheck);
|
|
14840
|
+
}
|
|
14799
14841
|
e.source.close();
|
|
14800
14842
|
resolve();
|
|
14801
14843
|
}
|
|
@@ -14985,6 +15027,13 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
14985
15027
|
iFrame.style.width = '0';
|
|
14986
15028
|
iFrame.style.height = '0';
|
|
14987
15029
|
iFrame.style.border = '0';
|
|
15030
|
+
// Make it 'fixed' to keep it in a different stacking context.
|
|
15031
|
+
// This should solve the focus behaviours inside the iframe from
|
|
15032
|
+
// interfering with main body.
|
|
15033
|
+
iFrame.style.position = 'fixed';
|
|
15034
|
+
// Push it out of viewport.
|
|
15035
|
+
iFrame.style.top = '100vh';
|
|
15036
|
+
iFrame.style.left = '100vw';
|
|
14988
15037
|
iFrame.classList.add('prefetchIframe');
|
|
14989
15038
|
iFrame.classList.add(`prefetchIframeNum-${index}`);
|
|
14990
15039
|
document.body.appendChild(iFrame);
|
|
@@ -15356,7 +15405,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
15356
15405
|
return e;
|
|
15357
15406
|
}
|
|
15358
15407
|
|
|
15359
|
-
var name="@thoughtspot/visual-embed-sdk";var version$1="1.37.
|
|
15408
|
+
var name="@thoughtspot/visual-embed-sdk";var version$1="1.37.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 . --incremental false; tsc -p . --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts","bundle-dts":"dts-bundle --name ../../dist/visual-embed-sdk --main lib/src/index.d.ts --outputAsModuleFolder=true","bundle-dts-react":"dts-bundle --name ../../../dist/visual-embed-sdk-react --main lib/src/react/index.d.ts --outputAsModuleFolder=true","bundle-dts-react-full":"dts-bundle --name ../../../dist/visual-embed-sdk-react-full --main lib/src/react/all-types-export.d.ts --outputAsModuleFolder=true",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.json --theme typedoc-theme --json static/typedoc/typedoc.json --disableOutputCheck","test-sdk":"jest -c jest.config.sdk.js --runInBand",test:"npm run test-sdk",posttest:"cat ./coverage/sdk/lcov.info | coveralls","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest",dev:"vite -c vite.local.config.ts"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={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":"^8.2.6","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^22.2.3","@types/lodash":"^4.17.0","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^8.28.0","@typescript-eslint/parser":"^8.28.0",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1",coveralls:"^3.1.0",crypto:"^1.0.1","current-git-branch":"^1.1.0","dts-bundle":"^0.7.3",eslint:"^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":"^1.1.1",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:"31 kB"}],scripts:scripts,peerDependencies:peerDependencies,dependencies:dependencies,devDependencies:devDependencies,author:author,email:email,license:license,directories:directories,repository:repository,publishConfig:publishConfig,keywords:keywords,bugs:bugs,homepage:homepage,globals:globals};
|
|
15360
15409
|
|
|
15361
15410
|
/**
|
|
15362
15411
|
* Reloads the ThoughtSpot iframe.
|
|
@@ -15590,11 +15639,13 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
15590
15639
|
* @param responder
|
|
15591
15640
|
*/
|
|
15592
15641
|
this.updateAuthToken = async (_, responder) => {
|
|
15593
|
-
const {
|
|
15594
|
-
|
|
15595
|
-
|
|
15642
|
+
const { authType } = this.embedConfig;
|
|
15643
|
+
let { autoLogin } = this.embedConfig;
|
|
15644
|
+
// Default autoLogin: true for cookieless if undefined/null, otherwise false
|
|
15645
|
+
autoLogin = autoLogin !== null && autoLogin !== void 0 ? autoLogin : (authType === exports.AuthType.TrustedAuthTokenCookieless);
|
|
15646
|
+
if (autoLogin && authType === exports.AuthType.TrustedAuthTokenCookieless) {
|
|
15596
15647
|
try {
|
|
15597
|
-
authToken = await getAuthenticationToken(this.embedConfig);
|
|
15648
|
+
const authToken = await getAuthenticationToken(this.embedConfig);
|
|
15598
15649
|
responder({
|
|
15599
15650
|
type: exports.EmbedEvent.AuthExpire,
|
|
15600
15651
|
data: { authToken },
|
|
@@ -16748,6 +16799,31 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
16748
16799
|
HomePageSearchBarMode["AI_ANSWER"] = "aiAnswer";
|
|
16749
16800
|
HomePageSearchBarMode["NONE"] = "none";
|
|
16750
16801
|
})(exports.HomePageSearchBarMode || (exports.HomePageSearchBarMode = {}));
|
|
16802
|
+
/**
|
|
16803
|
+
* Define the version of the primary navbar
|
|
16804
|
+
* @version SDK: 1.39.0 | Thoughtspot: 10.10.0.cl
|
|
16805
|
+
*/
|
|
16806
|
+
var PrimaryNavbarVersion;
|
|
16807
|
+
(function (PrimaryNavbarVersion) {
|
|
16808
|
+
/**
|
|
16809
|
+
* Sliding (v3) introduces a new left-side navigation hub featuring a tab switcher,
|
|
16810
|
+
* along with updates to the top navigation bar.
|
|
16811
|
+
* It serves as the foundational version of the PrimaryNavBar.
|
|
16812
|
+
*/
|
|
16813
|
+
PrimaryNavbarVersion["Sliding"] = "v3";
|
|
16814
|
+
})(PrimaryNavbarVersion || (PrimaryNavbarVersion = {}));
|
|
16815
|
+
/**
|
|
16816
|
+
* Define the version of the home page
|
|
16817
|
+
* @version SDK: 1.39.0 | Thoughtspot: 10.10.0.cl
|
|
16818
|
+
*/
|
|
16819
|
+
var HomePage;
|
|
16820
|
+
(function (HomePage) {
|
|
16821
|
+
/**
|
|
16822
|
+
* Modular (v2) introduces the updated Modular Home Experience.
|
|
16823
|
+
* It serves as the foundational version of the home page.
|
|
16824
|
+
*/
|
|
16825
|
+
HomePage["Modular"] = "v2";
|
|
16826
|
+
})(HomePage || (HomePage = {}));
|
|
16751
16827
|
/**
|
|
16752
16828
|
* Embeds full ThoughtSpot experience in a host application.
|
|
16753
16829
|
* @group Embed components
|
|
@@ -16802,9 +16878,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
16802
16878
|
* embedded Liveboard or visualization.
|
|
16803
16879
|
*/
|
|
16804
16880
|
getEmbedParams() {
|
|
16805
|
-
const { tag, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideHamburger, hideObjectSearch, hideNotification, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 = false, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, hideHomepageLeftNav = false, modularHomeExperience = false,
|
|
16881
|
+
const { tag, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideHamburger, hideObjectSearch, hideNotification, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 = false, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, hideHomepageLeftNav = false, modularHomeExperience = false, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, enable2ColumnLayout, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false,
|
|
16806
16882
|
/* eslint-disable-next-line max-len */
|
|
16807
|
-
dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, } = this.viewConfig;
|
|
16883
|
+
dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, discoveryExperience, } = this.viewConfig;
|
|
16808
16884
|
let params = {};
|
|
16809
16885
|
params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
|
|
16810
16886
|
params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
|
|
@@ -16877,11 +16953,14 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
16877
16953
|
/* eslint-disable-next-line max-len */
|
|
16878
16954
|
params[Param.DataPanelCustomGroupsAccordionInitialState] = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL;
|
|
16879
16955
|
}
|
|
16880
|
-
if (
|
|
16881
|
-
|
|
16882
|
-
|
|
16956
|
+
if (discoveryExperience) {
|
|
16957
|
+
// primaryNavbarVersion v3 will enabled the new left navigation
|
|
16958
|
+
if (discoveryExperience.primaryNavbarVersion === PrimaryNavbarVersion.Sliding) {
|
|
16959
|
+
params[Param.NavigationVersion] = discoveryExperience.primaryNavbarVersion;
|
|
16883
16960
|
}
|
|
16884
|
-
|
|
16961
|
+
// homePage v2 will enable the modular home page
|
|
16962
|
+
// and it will override the modularHomeExperience value
|
|
16963
|
+
if (discoveryExperience.homePage === HomePage.Modular) {
|
|
16885
16964
|
params[Param.ModularHomeExperienceEnabled] = true;
|
|
16886
16965
|
}
|
|
16887
16966
|
}
|
|
@@ -324,7 +324,11 @@ export declare enum AuthStatus {
|
|
|
324
324
|
* or by the trigger button.
|
|
325
325
|
* @version SDK: 1.19.0
|
|
326
326
|
*/
|
|
327
|
-
WAITING_FOR_POPUP = "WAITING_FOR_POPUP"
|
|
327
|
+
WAITING_FOR_POPUP = "WAITING_FOR_POPUP",
|
|
328
|
+
/**
|
|
329
|
+
* Emitted when the SAML popup is closed without authentication
|
|
330
|
+
*/
|
|
331
|
+
SAML_POPUP_CLOSED_NO_AUTH = "SAML_POPUP_CLOSED_NO_AUTH"
|
|
328
332
|
}
|
|
329
333
|
/**
|
|
330
334
|
* Event emitter returned from {@link init}.
|
|
@@ -342,10 +346,10 @@ export interface AuthEventEmitter {
|
|
|
342
346
|
* @param event
|
|
343
347
|
* @param listener
|
|
344
348
|
*/
|
|
345
|
-
on(event: AuthStatus.SDK_SUCCESS | AuthStatus.LOGOUT | AuthStatus.WAITING_FOR_POPUP, listener: () => void): this;
|
|
349
|
+
on(event: AuthStatus.SDK_SUCCESS | AuthStatus.LOGOUT | AuthStatus.WAITING_FOR_POPUP | AuthStatus.SAML_POPUP_CLOSED_NO_AUTH, listener: () => void): this;
|
|
346
350
|
on(event: AuthStatus.SUCCESS, listener: (sessionInfo: any) => void): this;
|
|
347
351
|
once(event: AuthStatus.FAILURE, listener: (failureType: AuthFailureType) => void): this;
|
|
348
|
-
once(event: AuthStatus.SDK_SUCCESS | AuthStatus.LOGOUT | AuthStatus.WAITING_FOR_POPUP, listener: () => void): this;
|
|
352
|
+
once(event: AuthStatus.SDK_SUCCESS | AuthStatus.LOGOUT | AuthStatus.WAITING_FOR_POPUP | AuthStatus.SAML_POPUP_CLOSED_NO_AUTH, listener: () => void): this;
|
|
349
353
|
once(event: AuthStatus.SUCCESS, listener: (sessionInfo: any) => void): this;
|
|
350
354
|
/**
|
|
351
355
|
* Trigger an event on the emitter returned from init.
|
|
@@ -1073,19 +1077,42 @@ export declare enum HomePageSearchBarMode {
|
|
|
1073
1077
|
AI_ANSWER = "aiAnswer",
|
|
1074
1078
|
NONE = "none"
|
|
1075
1079
|
}
|
|
1076
|
-
|
|
1080
|
+
/**
|
|
1081
|
+
* Define the version of the primary navbar
|
|
1082
|
+
* @version SDK: 1.39.0 | Thoughtspot: 10.10.0.cl
|
|
1083
|
+
*/
|
|
1084
|
+
export declare enum PrimaryNavbarVersion {
|
|
1077
1085
|
/**
|
|
1078
|
-
*
|
|
1086
|
+
* Sliding (v3) introduces a new left-side navigation hub featuring a tab switcher,
|
|
1087
|
+
* along with updates to the top navigation bar.
|
|
1088
|
+
* It serves as the foundational version of the PrimaryNavBar.
|
|
1079
1089
|
*/
|
|
1080
|
-
|
|
1090
|
+
Sliding = "v3"
|
|
1091
|
+
}
|
|
1092
|
+
/**
|
|
1093
|
+
* Define the version of the home page
|
|
1094
|
+
* @version SDK: 1.39.0 | Thoughtspot: 10.10.0.cl
|
|
1095
|
+
*/
|
|
1096
|
+
export declare enum HomePage {
|
|
1081
1097
|
/**
|
|
1082
|
-
*
|
|
1083
|
-
*
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1098
|
+
* Modular (v2) introduces the updated Modular Home Experience.
|
|
1099
|
+
* It serves as the foundational version of the home page.
|
|
1100
|
+
*/
|
|
1101
|
+
Modular = "v2"
|
|
1102
|
+
}
|
|
1103
|
+
/**
|
|
1104
|
+
* Define the discovery experience
|
|
1105
|
+
* @version SDK: 1.39.0 | Thoughtspot: 10.10.0.cl
|
|
1106
|
+
*/
|
|
1107
|
+
export interface DiscoveryExperience {
|
|
1108
|
+
/**
|
|
1109
|
+
* primaryNavbarVersion determines the version of the navigation version.
|
|
1110
|
+
*/
|
|
1111
|
+
primaryNavbarVersion?: PrimaryNavbarVersion;
|
|
1112
|
+
/**
|
|
1113
|
+
* homePage determines the version of the home page.
|
|
1087
1114
|
*/
|
|
1088
|
-
homePage?:
|
|
1115
|
+
homePage?: HomePage;
|
|
1089
1116
|
}
|
|
1090
1117
|
/**
|
|
1091
1118
|
* The view configuration for full app embedding.
|
|
@@ -1394,7 +1421,7 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
|
|
|
1394
1421
|
*/
|
|
1395
1422
|
modularHomeExperience?: boolean;
|
|
1396
1423
|
/**
|
|
1397
|
-
*
|
|
1424
|
+
* To configure the top-left navigation and home page experience
|
|
1398
1425
|
*
|
|
1399
1426
|
* @default false
|
|
1400
1427
|
* @version SDK: 1.39.0 | Thoughtspot: 10.10.0.cl
|
|
@@ -1402,14 +1429,14 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
|
|
|
1402
1429
|
* ```js
|
|
1403
1430
|
* const embed = new AppEmbed('#tsEmbed', {
|
|
1404
1431
|
* ... // other options
|
|
1405
|
-
*
|
|
1406
|
-
*
|
|
1407
|
-
* homePage:
|
|
1432
|
+
* discoveryExperience : {
|
|
1433
|
+
* primaryNavbarVersion: PrimaryNavbarVersion.Sliding,
|
|
1434
|
+
* homePage: HompePage.Modular,
|
|
1408
1435
|
* },
|
|
1409
1436
|
* })
|
|
1410
1437
|
* ```
|
|
1411
1438
|
*/
|
|
1412
|
-
|
|
1439
|
+
discoveryExperience?: DiscoveryExperience;
|
|
1413
1440
|
/**
|
|
1414
1441
|
* Boolean to control if Liveboard header is sticky or not.
|
|
1415
1442
|
* @example
|
|
@@ -4646,9 +4673,12 @@ export declare enum HostEvent {
|
|
|
4646
4673
|
* @example
|
|
4647
4674
|
* ```js
|
|
4648
4675
|
* searchEmbed.trigger(HostEvent.OpenFilter,
|
|
4649
|
-
* { columnId: '<column-GUID>', name: 'column name', type: 'INT64', dataType: 'ATTRIBUTE'})
|
|
4676
|
+
* {column: { columnId: '<column-GUID>', name: 'column name', type: 'INT64', dataType: 'ATTRIBUTE'}})
|
|
4677
|
+
* ```
|
|
4678
|
+
* @example
|
|
4679
|
+
* ```js
|
|
4650
4680
|
* LiveboardEmbed.trigger(HostEvent.OpenFilter,
|
|
4651
|
-
*
|
|
4681
|
+
* { column: {columnId: '<column-GUID>'}})
|
|
4652
4682
|
* ```
|
|
4653
4683
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
|
|
4654
4684
|
*/
|
|
@@ -5257,6 +5287,25 @@ export declare enum HostEvent {
|
|
|
5257
5287
|
* }]
|
|
5258
5288
|
* });
|
|
5259
5289
|
* ```
|
|
5290
|
+
* If there are multiple columns with the same name, consider
|
|
5291
|
+
* using `WORKSHEET_NAME::COLUMN_NAME` format.
|
|
5292
|
+
*
|
|
5293
|
+
* @example
|
|
5294
|
+
*
|
|
5295
|
+
* ```js
|
|
5296
|
+
* liveboardEmbed.trigger(HostEvent.UpdateFilters, {
|
|
5297
|
+
* filters: [{
|
|
5298
|
+
* column: "(Sample) Retail - Apparel::city",
|
|
5299
|
+
* oper: 'IN',
|
|
5300
|
+
* values: ["atlanta"]
|
|
5301
|
+
* },
|
|
5302
|
+
* {
|
|
5303
|
+
* column: "(Sample) Retail - Apparel::Region",
|
|
5304
|
+
* oper: 'IN',
|
|
5305
|
+
* values: ["West","Midwest"]
|
|
5306
|
+
* }]
|
|
5307
|
+
* });
|
|
5308
|
+
* ```
|
|
5260
5309
|
* @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
|
|
5261
5310
|
*/
|
|
5262
5311
|
UpdateFilters = "updateFilters",
|