@thoughtspot/visual-embed-sdk 1.35.5 → 1.35.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/package.json +1 -1
- package/cjs/src/embed/search-bar.d.ts +24 -1
- package/cjs/src/embed/search-bar.d.ts.map +1 -1
- package/cjs/src/embed/search-bar.js +13 -2
- package/cjs/src/embed/search-bar.js.map +1 -1
- package/cjs/src/embed/search.d.ts +26 -1
- package/cjs/src/embed/search.d.ts.map +1 -1
- package/cjs/src/embed/search.js +16 -2
- package/cjs/src/embed/search.js.map +1 -1
- package/cjs/src/embed/search.spec.js +49 -0
- package/cjs/src/embed/search.spec.js.map +1 -1
- package/cjs/src/embed/searchEmbed-basic-auth.spec.d.ts +2 -0
- package/cjs/src/embed/searchEmbed-basic-auth.spec.d.ts.map +1 -0
- package/cjs/src/embed/searchEmbed-basic-auth.spec.js +104 -0
- package/cjs/src/embed/searchEmbed-basic-auth.spec.js.map +1 -0
- package/cjs/src/embed/ts-embed.d.ts +4 -1
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +49 -31
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/embed/ts-embed.spec.js +187 -108
- package/cjs/src/embed/ts-embed.spec.js.map +1 -1
- package/cjs/src/hostEventsTypeMapping.d.ts +2 -0
- package/cjs/src/hostEventsTypeMapping.d.ts.map +1 -0
- package/cjs/src/hostEventsTypeMapping.js +4 -0
- package/cjs/src/hostEventsTypeMapping.js.map +1 -0
- package/cjs/src/types.d.ts +27 -0
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js.map +1 -1
- package/cjs/src/utils/embedApi/contracts.d.ts +101 -0
- package/cjs/src/utils/embedApi/contracts.d.ts.map +1 -0
- package/cjs/src/utils/embedApi/contracts.js +17 -0
- package/cjs/src/utils/embedApi/contracts.js.map +1 -0
- package/cjs/src/utils/embedApi/embedApiClient.d.ts +12 -0
- package/cjs/src/utils/embedApi/embedApiClient.d.ts.map +1 -0
- package/cjs/src/utils/embedApi/embedApiClient.js +46 -0
- package/cjs/src/utils/embedApi/embedApiClient.js.map +1 -0
- package/cjs/src/utils/embedApi/processEmbedApi.d.ts +9 -0
- package/cjs/src/utils/embedApi/processEmbedApi.d.ts.map +1 -0
- package/cjs/src/utils/embedApi/processEmbedApi.js +18 -0
- package/cjs/src/utils/embedApi/processEmbedApi.js.map +1 -0
- package/dist/{index-FKywZXHG.js → index-BBBimG1x.js} +1 -1
- package/dist/index-CENLvayL.js +7370 -0
- package/dist/index-CbltIawo.js +7370 -0
- package/dist/index-CoQfqaHj.js +7370 -0
- package/dist/index-CzwzS0P4.js +7370 -0
- package/dist/index-DFwi_pV_.js +7370 -0
- package/dist/index-DOIjN0N_.js +7370 -0
- package/dist/index-DYBx8SuE.js +7370 -0
- package/dist/index-DaLHJaLd.js +7370 -0
- package/dist/index-DnJX-gN2.js +7370 -0
- package/dist/index-nWevLycs.js +7370 -0
- package/dist/src/embed/search-bar.d.ts +24 -1
- package/dist/src/embed/search-bar.d.ts.map +1 -1
- package/dist/src/embed/search.d.ts +26 -1
- package/dist/src/embed/search.d.ts.map +1 -1
- package/dist/src/embed/searchEmbed-basic-auth.spec.d.ts +2 -0
- package/dist/src/embed/searchEmbed-basic-auth.spec.d.ts.map +1 -0
- package/dist/src/embed/ts-embed.d.ts +4 -1
- package/dist/src/embed/ts-embed.d.ts.map +1 -1
- package/dist/src/hostEventsTypeMapping.d.ts +2 -0
- package/dist/src/hostEventsTypeMapping.d.ts.map +1 -0
- package/dist/src/types.d.ts +27 -0
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/embedApi/contracts.d.ts +101 -0
- package/dist/src/utils/embedApi/contracts.d.ts.map +1 -0
- package/dist/src/utils/embedApi/embedApiClient.d.ts +12 -0
- package/dist/src/utils/embedApi/embedApiClient.d.ts.map +1 -0
- package/dist/src/utils/embedApi/processEmbedApi.d.ts +9 -0
- package/dist/src/utils/embedApi/processEmbedApi.d.ts.map +1 -0
- package/dist/tsembed-react.es.js +81 -38
- package/dist/tsembed-react.js +80 -37
- package/dist/tsembed.es.js +81 -38
- package/dist/tsembed.js +80 -37
- package/dist/visual-embed-sdk-react-full.d.ts +78 -0
- package/dist/visual-embed-sdk-react.d.ts +78 -0
- package/dist/visual-embed-sdk.d.ts +78 -0
- package/lib/package.json +1 -1
- package/lib/src/embed/search-bar.d.ts +24 -1
- package/lib/src/embed/search-bar.d.ts.map +1 -1
- package/lib/src/embed/search-bar.js +13 -2
- package/lib/src/embed/search-bar.js.map +1 -1
- package/lib/src/embed/search.d.ts +26 -1
- package/lib/src/embed/search.d.ts.map +1 -1
- package/lib/src/embed/search.js +16 -2
- package/lib/src/embed/search.js.map +1 -1
- package/lib/src/embed/search.spec.js +51 -2
- package/lib/src/embed/search.spec.js.map +1 -1
- package/lib/src/embed/searchEmbed-basic-auth.spec.d.ts +2 -0
- package/lib/src/embed/searchEmbed-basic-auth.spec.d.ts.map +1 -0
- package/lib/src/embed/searchEmbed-basic-auth.spec.js +101 -0
- package/lib/src/embed/searchEmbed-basic-auth.spec.js.map +1 -0
- package/lib/src/embed/ts-embed.d.ts +4 -1
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +49 -31
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/embed/ts-embed.spec.js +187 -108
- package/lib/src/embed/ts-embed.spec.js.map +1 -1
- package/lib/src/hostEventsTypeMapping.d.ts +2 -0
- package/lib/src/hostEventsTypeMapping.d.ts.map +1 -0
- package/lib/src/hostEventsTypeMapping.js +2 -0
- package/lib/src/hostEventsTypeMapping.js.map +1 -0
- package/lib/src/types.d.ts +27 -0
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils/embedApi/contracts.d.ts +101 -0
- package/lib/src/utils/embedApi/contracts.d.ts.map +1 -0
- package/lib/src/utils/embedApi/contracts.js +14 -0
- package/lib/src/utils/embedApi/contracts.js.map +1 -0
- package/lib/src/utils/embedApi/embedApiClient.d.ts +12 -0
- package/lib/src/utils/embedApi/embedApiClient.d.ts.map +1 -0
- package/lib/src/utils/embedApi/embedApiClient.js +42 -0
- package/lib/src/utils/embedApi/embedApiClient.js.map +1 -0
- package/lib/src/utils/embedApi/processEmbedApi.d.ts +9 -0
- package/lib/src/utils/embedApi/processEmbedApi.d.ts.map +1 -0
- package/lib/src/utils/embedApi/processEmbedApi.js +14 -0
- package/lib/src/utils/embedApi/processEmbedApi.js.map +1 -0
- package/lib/src/visual-embed-sdk.d.ts +81 -3
- package/package.json +1 -1
- package/src/embed/search-bar.tsx +36 -2
- package/src/embed/search.spec.ts +66 -1
- package/src/embed/search.ts +38 -1
- package/src/embed/ts-embed.spec.ts +205 -113
- package/src/embed/ts-embed.ts +52 -30
- package/src/types.ts +28 -0
package/dist/tsembed.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @thoughtspot/visual-embed-sdk version 1.35.
|
|
1
|
+
/* @thoughtspot/visual-embed-sdk version 1.35.7 */
|
|
2
2
|
function _mergeNamespaces(n, m) {
|
|
3
3
|
m.forEach(function (e) {
|
|
4
4
|
e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) {
|
|
@@ -7058,7 +7058,7 @@ class AnswerService {
|
|
|
7058
7058
|
async getTML() {
|
|
7059
7059
|
const { object } = await this.executeQuery(getAnswerTML, {});
|
|
7060
7060
|
const edoc = object[0].edoc;
|
|
7061
|
-
const YAML = await import('./index-
|
|
7061
|
+
const YAML = await import('./index-DnJX-gN2.js');
|
|
7062
7062
|
const parsedDoc = YAML.parse(edoc);
|
|
7063
7063
|
return {
|
|
7064
7064
|
answer: {
|
|
@@ -14744,7 +14744,7 @@ function processEventData(type, e, thoughtSpotHost, containerEl) {
|
|
|
14744
14744
|
return e;
|
|
14745
14745
|
}
|
|
14746
14746
|
|
|
14747
|
-
var name="@thoughtspot/visual-embed-sdk";var version$1="1.35.
|
|
14747
|
+
var name="@thoughtspot/visual-embed-sdk";var version$1="1.35.7";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={algoliasearch:"^4.10.5",classnames:"^2.3.1",dompurify:"^2.3.4",eventemitter3:"^4.0.7","gatsby-plugin-vercel":"^1.0.3","html-react-parser":"^1.4.12",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":"^4.6.0","@typescript-eslint/parser":"^4.6.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:"^7.12.1","eslint-config-airbnb-base":"^14.2.0","eslint-config-prettier":"^6.15.0","eslint-import-resolver-typescript":"^2.3.0","eslint-plugin-import":"^2.22.1","eslint-plugin-prettier":"^3.1.4","eslint-plugin-react-hooks":"^4.2.0","eslint-plugin-comment-length":"1.7.3","eslint-plugin-jsdoc":"^46.9.0","fs-extra":"^10.0.0","gh-pages":"^3.1.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","node-sass":"^8.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","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^5.3.4"};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};
|
|
14748
14748
|
|
|
14749
14749
|
/**
|
|
14750
14750
|
* Reloads the ThoughtSpot iframe.
|
|
@@ -14950,37 +14950,17 @@ class TsEmbed {
|
|
|
14950
14950
|
* @param responder
|
|
14951
14951
|
*/
|
|
14952
14952
|
this.appInitCb = async (_, responder) => {
|
|
14953
|
-
|
|
14954
|
-
|
|
14955
|
-
|
|
14956
|
-
|
|
14957
|
-
|
|
14958
|
-
|
|
14959
|
-
|
|
14960
|
-
|
|
14961
|
-
|
|
14962
|
-
}
|
|
14953
|
+
try {
|
|
14954
|
+
const appInitData = await this.getAppInitData();
|
|
14955
|
+
this.isAppInitialized = true;
|
|
14956
|
+
responder({
|
|
14957
|
+
type: EmbedEvent.APP_INIT,
|
|
14958
|
+
data: appInitData,
|
|
14959
|
+
});
|
|
14960
|
+
}
|
|
14961
|
+
catch (e) {
|
|
14962
|
+
logger$3.error(`AppInit failed, Error : ${e === null || e === void 0 ? void 0 : e.message}`);
|
|
14963
14963
|
}
|
|
14964
|
-
this.isAppInitialized = true;
|
|
14965
|
-
responder({
|
|
14966
|
-
type: EmbedEvent.APP_INIT,
|
|
14967
|
-
data: {
|
|
14968
|
-
customisations: getCustomisations(this.embedConfig, this.viewConfig),
|
|
14969
|
-
authToken,
|
|
14970
|
-
runtimeFilterParams: this.viewConfig.excludeRuntimeFiltersfromURL
|
|
14971
|
-
? getRuntimeFilters(this.viewConfig.runtimeFilters)
|
|
14972
|
-
: null,
|
|
14973
|
-
runtimeParameterParams: this.viewConfig.excludeRuntimeParametersfromURL
|
|
14974
|
-
? getRuntimeParameters(this.viewConfig.runtimeParameters || [])
|
|
14975
|
-
: null,
|
|
14976
|
-
hiddenHomepageModules: this.viewConfig.hiddenHomepageModules || [],
|
|
14977
|
-
reorderedHomepageModules: this.viewConfig.reorderedHomepageModules || [],
|
|
14978
|
-
hostConfig: this.embedConfig.hostConfig,
|
|
14979
|
-
hiddenHomeLeftNavItems: ((_a = this.viewConfig) === null || _a === void 0 ? void 0 : _a.hiddenHomeLeftNavItems)
|
|
14980
|
-
? (_b = this.viewConfig) === null || _b === void 0 ? void 0 : _b.hiddenHomeLeftNavItems
|
|
14981
|
-
: [],
|
|
14982
|
-
},
|
|
14983
|
-
});
|
|
14984
14964
|
};
|
|
14985
14965
|
/**
|
|
14986
14966
|
* Sends updated auth token to the iFrame to avoid user logout
|
|
@@ -15154,6 +15134,43 @@ class TsEmbed {
|
|
|
15154
15134
|
window.removeEventListener(key, this.subscribedListeners[key]);
|
|
15155
15135
|
});
|
|
15156
15136
|
}
|
|
15137
|
+
async getAuthTokenForCookielessInit() {
|
|
15138
|
+
let authToken = '';
|
|
15139
|
+
if (this.embedConfig.authType !== AuthType.TrustedAuthTokenCookieless)
|
|
15140
|
+
return authToken;
|
|
15141
|
+
try {
|
|
15142
|
+
authToken = await getAuthenticationToken(this.embedConfig);
|
|
15143
|
+
}
|
|
15144
|
+
catch (e) {
|
|
15145
|
+
processAuthFailure(e, this.isPreRendered ? this.preRenderWrapper : this.el);
|
|
15146
|
+
throw e;
|
|
15147
|
+
}
|
|
15148
|
+
return authToken;
|
|
15149
|
+
}
|
|
15150
|
+
async getDefaultAppInitData() {
|
|
15151
|
+
var _a, _b;
|
|
15152
|
+
const authToken = await this.getAuthTokenForCookielessInit();
|
|
15153
|
+
return {
|
|
15154
|
+
customisations: getCustomisations(this.embedConfig, this.viewConfig),
|
|
15155
|
+
authToken,
|
|
15156
|
+
runtimeFilterParams: this.viewConfig.excludeRuntimeFiltersfromURL
|
|
15157
|
+
? getRuntimeFilters(this.viewConfig.runtimeFilters)
|
|
15158
|
+
: null,
|
|
15159
|
+
runtimeParameterParams: this.viewConfig.excludeRuntimeParametersfromURL
|
|
15160
|
+
? getRuntimeParameters(this.viewConfig.runtimeParameters || [])
|
|
15161
|
+
: null,
|
|
15162
|
+
hiddenHomepageModules: this.viewConfig.hiddenHomepageModules || [],
|
|
15163
|
+
reorderedHomepageModules: this.viewConfig.reorderedHomepageModules || [],
|
|
15164
|
+
hostConfig: this.embedConfig.hostConfig,
|
|
15165
|
+
hiddenHomeLeftNavItems: ((_a = this.viewConfig) === null || _a === void 0 ? void 0 : _a.hiddenHomeLeftNavItems)
|
|
15166
|
+
? (_b = this.viewConfig) === null || _b === void 0 ? void 0 : _b.hiddenHomeLeftNavItems
|
|
15167
|
+
: [],
|
|
15168
|
+
customVariablesForThirdPartyTools: this.embedConfig.customVariablesForThirdPartyTools || {},
|
|
15169
|
+
};
|
|
15170
|
+
}
|
|
15171
|
+
async getAppInitData() {
|
|
15172
|
+
return this.getDefaultAppInitData();
|
|
15173
|
+
}
|
|
15157
15174
|
/**
|
|
15158
15175
|
* Constructs the base URL string to load the ThoughtSpot app.
|
|
15159
15176
|
* @param query
|
|
@@ -15688,7 +15705,8 @@ class TsEmbed {
|
|
|
15688
15705
|
this.handleError('Host event type is undefined');
|
|
15689
15706
|
return null;
|
|
15690
15707
|
}
|
|
15691
|
-
|
|
15708
|
+
// send an empty object, this is needed for liveboard default handlers
|
|
15709
|
+
return this.hostEventClient.triggerHostEvent(messageType, data || {});
|
|
15692
15710
|
}
|
|
15693
15711
|
/**
|
|
15694
15712
|
* Triggers an event to the embedded app, skipping the UI flow.
|
|
@@ -16642,11 +16660,25 @@ class SearchEmbed extends TsEmbed {
|
|
|
16642
16660
|
}
|
|
16643
16661
|
return dataSourceMode;
|
|
16644
16662
|
}
|
|
16663
|
+
getSearchInitData() {
|
|
16664
|
+
var _a;
|
|
16665
|
+
return {
|
|
16666
|
+
...(this.viewConfig.excludeSearchTokenStringFromURL ? {
|
|
16667
|
+
searchOptions: {
|
|
16668
|
+
searchTokenString: (_a = this.viewConfig.searchOptions) === null || _a === void 0 ? void 0 : _a.searchTokenString,
|
|
16669
|
+
},
|
|
16670
|
+
} : {}),
|
|
16671
|
+
};
|
|
16672
|
+
}
|
|
16673
|
+
async getAppInitData() {
|
|
16674
|
+
const defaultAppInitData = await super.getAppInitData();
|
|
16675
|
+
return { ...defaultAppInitData, ...this.getSearchInitData() };
|
|
16676
|
+
}
|
|
16645
16677
|
getEmbedParams() {
|
|
16646
16678
|
var _a;
|
|
16647
16679
|
const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, hideSearchBar, dataPanelV2 = false, useLastSelectedSources = false, runtimeParameters, collapseSearchBarInitially = false, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false,
|
|
16648
16680
|
/* eslint-disable-next-line max-len */
|
|
16649
|
-
dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, focusSearchBarOnRender = true, excludeRuntimeParametersfromURL, collapseSearchBar = true, } = this.viewConfig;
|
|
16681
|
+
dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, focusSearchBarOnRender = true, excludeRuntimeParametersfromURL, excludeSearchTokenStringFromURL, collapseSearchBar = true, } = this.viewConfig;
|
|
16650
16682
|
const queryParams = this.getBaseQueryParams();
|
|
16651
16683
|
queryParams[Param.HideActions] = [
|
|
16652
16684
|
...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : []),
|
|
@@ -16658,7 +16690,7 @@ class SearchEmbed extends TsEmbed {
|
|
|
16658
16690
|
if (dataSource) {
|
|
16659
16691
|
queryParams[Param.DataSources] = `["${dataSource}"]`;
|
|
16660
16692
|
}
|
|
16661
|
-
if (searchOptions === null || searchOptions === void 0 ? void 0 : searchOptions.searchTokenString) {
|
|
16693
|
+
if ((searchOptions === null || searchOptions === void 0 ? void 0 : searchOptions.searchTokenString) && !excludeSearchTokenStringFromURL) {
|
|
16662
16694
|
queryParams[Param.searchTokenString] = encodeURIComponent(searchOptions.searchTokenString);
|
|
16663
16695
|
if (searchOptions.executeSearch) {
|
|
16664
16696
|
queryParams[Param.executeSearch] = true;
|
|
@@ -16766,7 +16798,7 @@ class SearchBarEmbed extends TsEmbed {
|
|
|
16766
16798
|
*/
|
|
16767
16799
|
getIFrameSrc() {
|
|
16768
16800
|
var _a;
|
|
16769
|
-
const { searchOptions, dataSource, dataSources, useLastSelectedSources = false, } = this.viewConfig;
|
|
16801
|
+
const { searchOptions, dataSource, dataSources, useLastSelectedSources = false, excludeSearchTokenStringFromURL, } = this.viewConfig;
|
|
16770
16802
|
const path = 'search-bar-embed';
|
|
16771
16803
|
const queryParams = this.getBaseQueryParams();
|
|
16772
16804
|
queryParams[Param.HideActions] = [...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : [])];
|
|
@@ -16776,7 +16808,7 @@ class SearchBarEmbed extends TsEmbed {
|
|
|
16776
16808
|
if (dataSource) {
|
|
16777
16809
|
queryParams[Param.DataSources] = `["${dataSource}"]`;
|
|
16778
16810
|
}
|
|
16779
|
-
if (searchOptions === null || searchOptions === void 0 ? void 0 : searchOptions.searchTokenString) {
|
|
16811
|
+
if ((searchOptions === null || searchOptions === void 0 ? void 0 : searchOptions.searchTokenString) && !excludeSearchTokenStringFromURL) {
|
|
16780
16812
|
queryParams[Param.searchTokenString] = encodeURIComponent(searchOptions.searchTokenString);
|
|
16781
16813
|
if (searchOptions.executeSearch) {
|
|
16782
16814
|
queryParams[Param.executeSearch] = true;
|
|
@@ -16804,6 +16836,17 @@ class SearchBarEmbed extends TsEmbed {
|
|
|
16804
16836
|
await this.renderIFrame(src);
|
|
16805
16837
|
return this;
|
|
16806
16838
|
}
|
|
16839
|
+
getSearchInitData() {
|
|
16840
|
+
return {
|
|
16841
|
+
searchOptions: this.viewConfig.excludeSearchTokenStringFromURL
|
|
16842
|
+
? this.viewConfig.searchOptions
|
|
16843
|
+
: null,
|
|
16844
|
+
};
|
|
16845
|
+
}
|
|
16846
|
+
async getAppInitData() {
|
|
16847
|
+
const defaultAppInitData = await super.getAppInitData();
|
|
16848
|
+
return { ...defaultAppInitData, ...this.getSearchInitData() };
|
|
16849
|
+
}
|
|
16807
16850
|
}
|
|
16808
16851
|
|
|
16809
16852
|
const createConversation = `
|
package/dist/tsembed.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @thoughtspot/visual-embed-sdk version 1.35.
|
|
1
|
+
/* @thoughtspot/visual-embed-sdk version 1.35.7 */
|
|
2
2
|
(function (global, factory) {
|
|
3
3
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
4
4
|
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
|
@@ -14750,7 +14750,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
14750
14750
|
return e;
|
|
14751
14751
|
}
|
|
14752
14752
|
|
|
14753
|
-
var name="@thoughtspot/visual-embed-sdk";var version$1="1.35.
|
|
14753
|
+
var name="@thoughtspot/visual-embed-sdk";var version$1="1.35.7";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={algoliasearch:"^4.10.5",classnames:"^2.3.1",dompurify:"^2.3.4",eventemitter3:"^4.0.7","gatsby-plugin-vercel":"^1.0.3","html-react-parser":"^1.4.12",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":"^4.6.0","@typescript-eslint/parser":"^4.6.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:"^7.12.1","eslint-config-airbnb-base":"^14.2.0","eslint-config-prettier":"^6.15.0","eslint-import-resolver-typescript":"^2.3.0","eslint-plugin-import":"^2.22.1","eslint-plugin-prettier":"^3.1.4","eslint-plugin-react-hooks":"^4.2.0","eslint-plugin-comment-length":"1.7.3","eslint-plugin-jsdoc":"^46.9.0","fs-extra":"^10.0.0","gh-pages":"^3.1.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","node-sass":"^8.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","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^5.3.4"};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};
|
|
14754
14754
|
|
|
14755
14755
|
/**
|
|
14756
14756
|
* Reloads the ThoughtSpot iframe.
|
|
@@ -14956,37 +14956,17 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
14956
14956
|
* @param responder
|
|
14957
14957
|
*/
|
|
14958
14958
|
this.appInitCb = async (_, responder) => {
|
|
14959
|
-
|
|
14960
|
-
|
|
14961
|
-
|
|
14962
|
-
|
|
14963
|
-
|
|
14964
|
-
|
|
14965
|
-
|
|
14966
|
-
|
|
14967
|
-
|
|
14968
|
-
}
|
|
14959
|
+
try {
|
|
14960
|
+
const appInitData = await this.getAppInitData();
|
|
14961
|
+
this.isAppInitialized = true;
|
|
14962
|
+
responder({
|
|
14963
|
+
type: exports.EmbedEvent.APP_INIT,
|
|
14964
|
+
data: appInitData,
|
|
14965
|
+
});
|
|
14966
|
+
}
|
|
14967
|
+
catch (e) {
|
|
14968
|
+
logger$3.error(`AppInit failed, Error : ${e === null || e === void 0 ? void 0 : e.message}`);
|
|
14969
14969
|
}
|
|
14970
|
-
this.isAppInitialized = true;
|
|
14971
|
-
responder({
|
|
14972
|
-
type: exports.EmbedEvent.APP_INIT,
|
|
14973
|
-
data: {
|
|
14974
|
-
customisations: getCustomisations(this.embedConfig, this.viewConfig),
|
|
14975
|
-
authToken,
|
|
14976
|
-
runtimeFilterParams: this.viewConfig.excludeRuntimeFiltersfromURL
|
|
14977
|
-
? getRuntimeFilters(this.viewConfig.runtimeFilters)
|
|
14978
|
-
: null,
|
|
14979
|
-
runtimeParameterParams: this.viewConfig.excludeRuntimeParametersfromURL
|
|
14980
|
-
? getRuntimeParameters(this.viewConfig.runtimeParameters || [])
|
|
14981
|
-
: null,
|
|
14982
|
-
hiddenHomepageModules: this.viewConfig.hiddenHomepageModules || [],
|
|
14983
|
-
reorderedHomepageModules: this.viewConfig.reorderedHomepageModules || [],
|
|
14984
|
-
hostConfig: this.embedConfig.hostConfig,
|
|
14985
|
-
hiddenHomeLeftNavItems: ((_a = this.viewConfig) === null || _a === void 0 ? void 0 : _a.hiddenHomeLeftNavItems)
|
|
14986
|
-
? (_b = this.viewConfig) === null || _b === void 0 ? void 0 : _b.hiddenHomeLeftNavItems
|
|
14987
|
-
: [],
|
|
14988
|
-
},
|
|
14989
|
-
});
|
|
14990
14970
|
};
|
|
14991
14971
|
/**
|
|
14992
14972
|
* Sends updated auth token to the iFrame to avoid user logout
|
|
@@ -15160,6 +15140,43 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
15160
15140
|
window.removeEventListener(key, this.subscribedListeners[key]);
|
|
15161
15141
|
});
|
|
15162
15142
|
}
|
|
15143
|
+
async getAuthTokenForCookielessInit() {
|
|
15144
|
+
let authToken = '';
|
|
15145
|
+
if (this.embedConfig.authType !== exports.AuthType.TrustedAuthTokenCookieless)
|
|
15146
|
+
return authToken;
|
|
15147
|
+
try {
|
|
15148
|
+
authToken = await getAuthenticationToken(this.embedConfig);
|
|
15149
|
+
}
|
|
15150
|
+
catch (e) {
|
|
15151
|
+
processAuthFailure(e, this.isPreRendered ? this.preRenderWrapper : this.el);
|
|
15152
|
+
throw e;
|
|
15153
|
+
}
|
|
15154
|
+
return authToken;
|
|
15155
|
+
}
|
|
15156
|
+
async getDefaultAppInitData() {
|
|
15157
|
+
var _a, _b;
|
|
15158
|
+
const authToken = await this.getAuthTokenForCookielessInit();
|
|
15159
|
+
return {
|
|
15160
|
+
customisations: getCustomisations(this.embedConfig, this.viewConfig),
|
|
15161
|
+
authToken,
|
|
15162
|
+
runtimeFilterParams: this.viewConfig.excludeRuntimeFiltersfromURL
|
|
15163
|
+
? getRuntimeFilters(this.viewConfig.runtimeFilters)
|
|
15164
|
+
: null,
|
|
15165
|
+
runtimeParameterParams: this.viewConfig.excludeRuntimeParametersfromURL
|
|
15166
|
+
? getRuntimeParameters(this.viewConfig.runtimeParameters || [])
|
|
15167
|
+
: null,
|
|
15168
|
+
hiddenHomepageModules: this.viewConfig.hiddenHomepageModules || [],
|
|
15169
|
+
reorderedHomepageModules: this.viewConfig.reorderedHomepageModules || [],
|
|
15170
|
+
hostConfig: this.embedConfig.hostConfig,
|
|
15171
|
+
hiddenHomeLeftNavItems: ((_a = this.viewConfig) === null || _a === void 0 ? void 0 : _a.hiddenHomeLeftNavItems)
|
|
15172
|
+
? (_b = this.viewConfig) === null || _b === void 0 ? void 0 : _b.hiddenHomeLeftNavItems
|
|
15173
|
+
: [],
|
|
15174
|
+
customVariablesForThirdPartyTools: this.embedConfig.customVariablesForThirdPartyTools || {},
|
|
15175
|
+
};
|
|
15176
|
+
}
|
|
15177
|
+
async getAppInitData() {
|
|
15178
|
+
return this.getDefaultAppInitData();
|
|
15179
|
+
}
|
|
15163
15180
|
/**
|
|
15164
15181
|
* Constructs the base URL string to load the ThoughtSpot app.
|
|
15165
15182
|
* @param query
|
|
@@ -15694,7 +15711,8 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
15694
15711
|
this.handleError('Host event type is undefined');
|
|
15695
15712
|
return null;
|
|
15696
15713
|
}
|
|
15697
|
-
|
|
15714
|
+
// send an empty object, this is needed for liveboard default handlers
|
|
15715
|
+
return this.hostEventClient.triggerHostEvent(messageType, data || {});
|
|
15698
15716
|
}
|
|
15699
15717
|
/**
|
|
15700
15718
|
* Triggers an event to the embedded app, skipping the UI flow.
|
|
@@ -16648,11 +16666,25 @@ query GetEurekaVizSnapshots(
|
|
|
16648
16666
|
}
|
|
16649
16667
|
return dataSourceMode;
|
|
16650
16668
|
}
|
|
16669
|
+
getSearchInitData() {
|
|
16670
|
+
var _a;
|
|
16671
|
+
return {
|
|
16672
|
+
...(this.viewConfig.excludeSearchTokenStringFromURL ? {
|
|
16673
|
+
searchOptions: {
|
|
16674
|
+
searchTokenString: (_a = this.viewConfig.searchOptions) === null || _a === void 0 ? void 0 : _a.searchTokenString,
|
|
16675
|
+
},
|
|
16676
|
+
} : {}),
|
|
16677
|
+
};
|
|
16678
|
+
}
|
|
16679
|
+
async getAppInitData() {
|
|
16680
|
+
const defaultAppInitData = await super.getAppInitData();
|
|
16681
|
+
return { ...defaultAppInitData, ...this.getSearchInitData() };
|
|
16682
|
+
}
|
|
16651
16683
|
getEmbedParams() {
|
|
16652
16684
|
var _a;
|
|
16653
16685
|
const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, hideSearchBar, dataPanelV2 = false, useLastSelectedSources = false, runtimeParameters, collapseSearchBarInitially = false, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false,
|
|
16654
16686
|
/* eslint-disable-next-line max-len */
|
|
16655
|
-
dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, focusSearchBarOnRender = true, excludeRuntimeParametersfromURL, collapseSearchBar = true, } = this.viewConfig;
|
|
16687
|
+
dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, focusSearchBarOnRender = true, excludeRuntimeParametersfromURL, excludeSearchTokenStringFromURL, collapseSearchBar = true, } = this.viewConfig;
|
|
16656
16688
|
const queryParams = this.getBaseQueryParams();
|
|
16657
16689
|
queryParams[Param.HideActions] = [
|
|
16658
16690
|
...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : []),
|
|
@@ -16664,7 +16696,7 @@ query GetEurekaVizSnapshots(
|
|
|
16664
16696
|
if (dataSource) {
|
|
16665
16697
|
queryParams[Param.DataSources] = `["${dataSource}"]`;
|
|
16666
16698
|
}
|
|
16667
|
-
if (searchOptions === null || searchOptions === void 0 ? void 0 : searchOptions.searchTokenString) {
|
|
16699
|
+
if ((searchOptions === null || searchOptions === void 0 ? void 0 : searchOptions.searchTokenString) && !excludeSearchTokenStringFromURL) {
|
|
16668
16700
|
queryParams[Param.searchTokenString] = encodeURIComponent(searchOptions.searchTokenString);
|
|
16669
16701
|
if (searchOptions.executeSearch) {
|
|
16670
16702
|
queryParams[Param.executeSearch] = true;
|
|
@@ -16772,7 +16804,7 @@ query GetEurekaVizSnapshots(
|
|
|
16772
16804
|
*/
|
|
16773
16805
|
getIFrameSrc() {
|
|
16774
16806
|
var _a;
|
|
16775
|
-
const { searchOptions, dataSource, dataSources, useLastSelectedSources = false, } = this.viewConfig;
|
|
16807
|
+
const { searchOptions, dataSource, dataSources, useLastSelectedSources = false, excludeSearchTokenStringFromURL, } = this.viewConfig;
|
|
16776
16808
|
const path = 'search-bar-embed';
|
|
16777
16809
|
const queryParams = this.getBaseQueryParams();
|
|
16778
16810
|
queryParams[Param.HideActions] = [...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : [])];
|
|
@@ -16782,7 +16814,7 @@ query GetEurekaVizSnapshots(
|
|
|
16782
16814
|
if (dataSource) {
|
|
16783
16815
|
queryParams[Param.DataSources] = `["${dataSource}"]`;
|
|
16784
16816
|
}
|
|
16785
|
-
if (searchOptions === null || searchOptions === void 0 ? void 0 : searchOptions.searchTokenString) {
|
|
16817
|
+
if ((searchOptions === null || searchOptions === void 0 ? void 0 : searchOptions.searchTokenString) && !excludeSearchTokenStringFromURL) {
|
|
16786
16818
|
queryParams[Param.searchTokenString] = encodeURIComponent(searchOptions.searchTokenString);
|
|
16787
16819
|
if (searchOptions.executeSearch) {
|
|
16788
16820
|
queryParams[Param.executeSearch] = true;
|
|
@@ -16810,6 +16842,17 @@ query GetEurekaVizSnapshots(
|
|
|
16810
16842
|
await this.renderIFrame(src);
|
|
16811
16843
|
return this;
|
|
16812
16844
|
}
|
|
16845
|
+
getSearchInitData() {
|
|
16846
|
+
return {
|
|
16847
|
+
searchOptions: this.viewConfig.excludeSearchTokenStringFromURL
|
|
16848
|
+
? this.viewConfig.searchOptions
|
|
16849
|
+
: null,
|
|
16850
|
+
};
|
|
16851
|
+
}
|
|
16852
|
+
async getAppInitData() {
|
|
16853
|
+
const defaultAppInitData = await super.getAppInitData();
|
|
16854
|
+
return { ...defaultAppInitData, ...this.getSearchInitData() };
|
|
16855
|
+
}
|
|
16813
16856
|
}
|
|
16814
16857
|
|
|
16815
16858
|
const createConversation = `
|
|
@@ -326,6 +326,25 @@ export interface SearchBarViewConfig extends Omit<ViewConfig, 'runtimeFilters' |
|
|
|
326
326
|
* ```
|
|
327
327
|
*/
|
|
328
328
|
searchOptions?: SearchOptions;
|
|
329
|
+
/**
|
|
330
|
+
* Exclude the search token string from the URL.
|
|
331
|
+
* If set to true, the search token string is not appended to the URL.
|
|
332
|
+
* @version: SDK: 1.35.7 | ThoughtSpot: 10.7.0.cl
|
|
333
|
+
* @example
|
|
334
|
+
* ```js
|
|
335
|
+
* const embed = new SearchEmbed('#tsEmbed', {
|
|
336
|
+
* searchOptions: {
|
|
337
|
+
* searchTokenString: '[quantity purchased] [region]',
|
|
338
|
+
* executeSearch: true,
|
|
339
|
+
* },
|
|
340
|
+
* excludeSearchTokenStringFromURL: true,
|
|
341
|
+
* });
|
|
342
|
+
* ```
|
|
343
|
+
*/
|
|
344
|
+
excludeSearchTokenStringFromURL?: boolean;
|
|
345
|
+
}
|
|
346
|
+
export interface SearchAppInitData extends DefaultAppInitData {
|
|
347
|
+
searchOptions: SearchOptions;
|
|
329
348
|
}
|
|
330
349
|
/**
|
|
331
350
|
* Embed ThoughtSpot search bar
|
|
@@ -343,6 +362,10 @@ export declare class SearchBarEmbed extends TsEmbed {
|
|
|
343
362
|
* Render the embedded ThoughtSpot search
|
|
344
363
|
*/
|
|
345
364
|
render(): Promise<SearchBarEmbed>;
|
|
365
|
+
protected getSearchInitData(): {
|
|
366
|
+
searchOptions: SearchOptions;
|
|
367
|
+
};
|
|
368
|
+
protected getAppInitData(): Promise<SearchAppInitData>;
|
|
346
369
|
}
|
|
347
370
|
|
|
348
371
|
/**
|
|
@@ -665,6 +688,22 @@ export interface SearchViewConfig extends Omit<ViewConfig, 'hiddenHomepageModule
|
|
|
665
688
|
* ```
|
|
666
689
|
*/
|
|
667
690
|
searchOptions?: SearchOptions;
|
|
691
|
+
/**
|
|
692
|
+
* Exclude the search token string from the URL.
|
|
693
|
+
* If set to true, the search token string is not appended to the URL.
|
|
694
|
+
* @version: SDK: 1.35.7 | ThoughtSpot: 10.7.0.cl
|
|
695
|
+
* @example
|
|
696
|
+
* ```js
|
|
697
|
+
* const embed = new SearchEmbed('#tsEmbed', {
|
|
698
|
+
* searchOptions: {
|
|
699
|
+
* searchTokenString: '[quantity purchased] [region]',
|
|
700
|
+
* executeSearch: true,
|
|
701
|
+
* },
|
|
702
|
+
* excludeSearchTokenStringFromURL: true,
|
|
703
|
+
* });
|
|
704
|
+
* ```
|
|
705
|
+
*/
|
|
706
|
+
excludeSearchTokenStringFromURL?: boolean;
|
|
668
707
|
/**
|
|
669
708
|
* The GUID of a saved answer to load initially.
|
|
670
709
|
* @version: SDK: 1.1.0 | ThoughtSpot: 8.1.0.sw
|
|
@@ -742,6 +781,9 @@ export interface SearchViewConfig extends Omit<ViewConfig, 'hiddenHomepageModule
|
|
|
742
781
|
focusSearchBarOnRender?: boolean;
|
|
743
782
|
}
|
|
744
783
|
export declare const HiddenActionItemByDefaultForSearchEmbed: Action[];
|
|
784
|
+
export interface SearchAppInitData extends DefaultAppInitData {
|
|
785
|
+
searchOptions?: SearchOptions;
|
|
786
|
+
}
|
|
745
787
|
/**
|
|
746
788
|
* Embed ThoughtSpot search
|
|
747
789
|
* @group Embed components
|
|
@@ -752,6 +794,12 @@ export declare class SearchEmbed extends TsEmbed {
|
|
|
752
794
|
*/
|
|
753
795
|
protected viewConfig: SearchViewConfig;
|
|
754
796
|
constructor(domSelector: DOMSelector, viewConfig: SearchViewConfig);
|
|
797
|
+
protected getSearchInitData(): {
|
|
798
|
+
searchOptions?: {
|
|
799
|
+
searchTokenString: string;
|
|
800
|
+
};
|
|
801
|
+
};
|
|
802
|
+
protected getAppInitData(): Promise<SearchAppInitData>;
|
|
755
803
|
protected getEmbedParams(): string;
|
|
756
804
|
/**
|
|
757
805
|
* Construct the URL of the embedded ThoughtSpot search to be
|
|
@@ -2737,6 +2785,22 @@ export interface EmbedConfig {
|
|
|
2737
2785
|
additionalFlags?: {
|
|
2738
2786
|
[key: string]: string | number | boolean;
|
|
2739
2787
|
};
|
|
2788
|
+
/**
|
|
2789
|
+
* This is an object (key/val) for customVariables being
|
|
2790
|
+
* used by the third party tool's script.
|
|
2791
|
+
* @example
|
|
2792
|
+
* ```js
|
|
2793
|
+
* const embed = new LiveboardEmbed('#embed', {
|
|
2794
|
+
* ... // other liveboard view config
|
|
2795
|
+
* customVariablesForThirdPartyTools: {
|
|
2796
|
+
* key1: 'value1',
|
|
2797
|
+
* key2: 'value2'
|
|
2798
|
+
* }
|
|
2799
|
+
* });
|
|
2800
|
+
* ```
|
|
2801
|
+
* @version SDK 1.37.0 | Thoughtspot: 10.7.0.cl
|
|
2802
|
+
*/
|
|
2803
|
+
customVariablesForThirdPartyTools?: Record<string, any>;
|
|
2740
2804
|
}
|
|
2741
2805
|
export interface LayoutConfig {
|
|
2742
2806
|
}
|
|
@@ -6672,6 +6736,17 @@ export declare enum LogLevel {
|
|
|
6672
6736
|
*/
|
|
6673
6737
|
TRACE = "TRACE"
|
|
6674
6738
|
}
|
|
6739
|
+
export interface DefaultAppInitData {
|
|
6740
|
+
customisations: CustomisationsInterface;
|
|
6741
|
+
authToken: string;
|
|
6742
|
+
runtimeFilterParams: string | null;
|
|
6743
|
+
runtimeParameterParams: string | null;
|
|
6744
|
+
hiddenHomepageModules: HomepageModule[];
|
|
6745
|
+
reorderedHomepageModules: string[];
|
|
6746
|
+
hostConfig: Record<string, any>;
|
|
6747
|
+
hiddenHomeLeftNavItems: string[];
|
|
6748
|
+
customVariablesForThirdPartyTools: Record<string, any>;
|
|
6749
|
+
}
|
|
6675
6750
|
|
|
6676
6751
|
/**
|
|
6677
6752
|
* The list of customization css variables. These
|
|
@@ -7484,6 +7559,9 @@ export declare class TsEmbed {
|
|
|
7484
7559
|
* @param error The error message or object
|
|
7485
7560
|
*/
|
|
7486
7561
|
protected handleError(error: string | Record<string, unknown>): void;
|
|
7562
|
+
protected getAuthTokenForCookielessInit(): Promise<string>;
|
|
7563
|
+
protected getDefaultAppInitData(): Promise<DefaultAppInitData>;
|
|
7564
|
+
protected getAppInitData(): Promise<DefaultAppInitData>;
|
|
7487
7565
|
/**
|
|
7488
7566
|
* Constructs the base URL string to load the ThoughtSpot app.
|
|
7489
7567
|
* @param query
|