@thoughtspot/visual-embed-sdk 1.35.6 → 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 -32
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/embed/ts-embed.spec.js +164 -131
- 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 +11 -0
- package/cjs/src/types.d.ts.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-Bp8mFlZ-.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 +11 -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 -39
- package/dist/tsembed-react.js +80 -38
- package/dist/tsembed.es.js +81 -39
- package/dist/tsembed.js +80 -38
- package/dist/visual-embed-sdk-react-full.d.ts +62 -0
- package/dist/visual-embed-sdk-react.d.ts +62 -0
- package/dist/visual-embed-sdk.d.ts +62 -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 -32
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/embed/ts-embed.spec.js +164 -131
- 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 +11 -0
- package/lib/src/types.d.ts.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 +65 -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 +177 -137
- package/src/embed/ts-embed.ts +52 -32
- package/src/types.ts +12 -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,38 +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
|
-
customVariablesForThirdPartyTools: this.embedConfig.customVariablesForThirdPartyTools || {},
|
|
14983
|
-
},
|
|
14984
|
-
});
|
|
14985
14964
|
};
|
|
14986
14965
|
/**
|
|
14987
14966
|
* Sends updated auth token to the iFrame to avoid user logout
|
|
@@ -15155,6 +15134,43 @@ class TsEmbed {
|
|
|
15155
15134
|
window.removeEventListener(key, this.subscribedListeners[key]);
|
|
15156
15135
|
});
|
|
15157
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
|
+
}
|
|
15158
15174
|
/**
|
|
15159
15175
|
* Constructs the base URL string to load the ThoughtSpot app.
|
|
15160
15176
|
* @param query
|
|
@@ -15689,7 +15705,8 @@ class TsEmbed {
|
|
|
15689
15705
|
this.handleError('Host event type is undefined');
|
|
15690
15706
|
return null;
|
|
15691
15707
|
}
|
|
15692
|
-
|
|
15708
|
+
// send an empty object, this is needed for liveboard default handlers
|
|
15709
|
+
return this.hostEventClient.triggerHostEvent(messageType, data || {});
|
|
15693
15710
|
}
|
|
15694
15711
|
/**
|
|
15695
15712
|
* Triggers an event to the embedded app, skipping the UI flow.
|
|
@@ -16643,11 +16660,25 @@ class SearchEmbed extends TsEmbed {
|
|
|
16643
16660
|
}
|
|
16644
16661
|
return dataSourceMode;
|
|
16645
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
|
+
}
|
|
16646
16677
|
getEmbedParams() {
|
|
16647
16678
|
var _a;
|
|
16648
16679
|
const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, hideSearchBar, dataPanelV2 = false, useLastSelectedSources = false, runtimeParameters, collapseSearchBarInitially = false, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false,
|
|
16649
16680
|
/* eslint-disable-next-line max-len */
|
|
16650
|
-
dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, focusSearchBarOnRender = true, excludeRuntimeParametersfromURL, collapseSearchBar = true, } = this.viewConfig;
|
|
16681
|
+
dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, focusSearchBarOnRender = true, excludeRuntimeParametersfromURL, excludeSearchTokenStringFromURL, collapseSearchBar = true, } = this.viewConfig;
|
|
16651
16682
|
const queryParams = this.getBaseQueryParams();
|
|
16652
16683
|
queryParams[Param.HideActions] = [
|
|
16653
16684
|
...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : []),
|
|
@@ -16659,7 +16690,7 @@ class SearchEmbed extends TsEmbed {
|
|
|
16659
16690
|
if (dataSource) {
|
|
16660
16691
|
queryParams[Param.DataSources] = `["${dataSource}"]`;
|
|
16661
16692
|
}
|
|
16662
|
-
if (searchOptions === null || searchOptions === void 0 ? void 0 : searchOptions.searchTokenString) {
|
|
16693
|
+
if ((searchOptions === null || searchOptions === void 0 ? void 0 : searchOptions.searchTokenString) && !excludeSearchTokenStringFromURL) {
|
|
16663
16694
|
queryParams[Param.searchTokenString] = encodeURIComponent(searchOptions.searchTokenString);
|
|
16664
16695
|
if (searchOptions.executeSearch) {
|
|
16665
16696
|
queryParams[Param.executeSearch] = true;
|
|
@@ -16767,7 +16798,7 @@ class SearchBarEmbed extends TsEmbed {
|
|
|
16767
16798
|
*/
|
|
16768
16799
|
getIFrameSrc() {
|
|
16769
16800
|
var _a;
|
|
16770
|
-
const { searchOptions, dataSource, dataSources, useLastSelectedSources = false, } = this.viewConfig;
|
|
16801
|
+
const { searchOptions, dataSource, dataSources, useLastSelectedSources = false, excludeSearchTokenStringFromURL, } = this.viewConfig;
|
|
16771
16802
|
const path = 'search-bar-embed';
|
|
16772
16803
|
const queryParams = this.getBaseQueryParams();
|
|
16773
16804
|
queryParams[Param.HideActions] = [...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : [])];
|
|
@@ -16777,7 +16808,7 @@ class SearchBarEmbed extends TsEmbed {
|
|
|
16777
16808
|
if (dataSource) {
|
|
16778
16809
|
queryParams[Param.DataSources] = `["${dataSource}"]`;
|
|
16779
16810
|
}
|
|
16780
|
-
if (searchOptions === null || searchOptions === void 0 ? void 0 : searchOptions.searchTokenString) {
|
|
16811
|
+
if ((searchOptions === null || searchOptions === void 0 ? void 0 : searchOptions.searchTokenString) && !excludeSearchTokenStringFromURL) {
|
|
16781
16812
|
queryParams[Param.searchTokenString] = encodeURIComponent(searchOptions.searchTokenString);
|
|
16782
16813
|
if (searchOptions.executeSearch) {
|
|
16783
16814
|
queryParams[Param.executeSearch] = true;
|
|
@@ -16805,6 +16836,17 @@ class SearchBarEmbed extends TsEmbed {
|
|
|
16805
16836
|
await this.renderIFrame(src);
|
|
16806
16837
|
return this;
|
|
16807
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
|
+
}
|
|
16808
16850
|
}
|
|
16809
16851
|
|
|
16810
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,38 +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
|
-
customVariablesForThirdPartyTools: this.embedConfig.customVariablesForThirdPartyTools || {},
|
|
14989
|
-
},
|
|
14990
|
-
});
|
|
14991
14970
|
};
|
|
14992
14971
|
/**
|
|
14993
14972
|
* Sends updated auth token to the iFrame to avoid user logout
|
|
@@ -15161,6 +15140,43 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
15161
15140
|
window.removeEventListener(key, this.subscribedListeners[key]);
|
|
15162
15141
|
});
|
|
15163
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
|
+
}
|
|
15164
15180
|
/**
|
|
15165
15181
|
* Constructs the base URL string to load the ThoughtSpot app.
|
|
15166
15182
|
* @param query
|
|
@@ -15695,7 +15711,8 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
15695
15711
|
this.handleError('Host event type is undefined');
|
|
15696
15712
|
return null;
|
|
15697
15713
|
}
|
|
15698
|
-
|
|
15714
|
+
// send an empty object, this is needed for liveboard default handlers
|
|
15715
|
+
return this.hostEventClient.triggerHostEvent(messageType, data || {});
|
|
15699
15716
|
}
|
|
15700
15717
|
/**
|
|
15701
15718
|
* Triggers an event to the embedded app, skipping the UI flow.
|
|
@@ -16649,11 +16666,25 @@ query GetEurekaVizSnapshots(
|
|
|
16649
16666
|
}
|
|
16650
16667
|
return dataSourceMode;
|
|
16651
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
|
+
}
|
|
16652
16683
|
getEmbedParams() {
|
|
16653
16684
|
var _a;
|
|
16654
16685
|
const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, hideSearchBar, dataPanelV2 = false, useLastSelectedSources = false, runtimeParameters, collapseSearchBarInitially = false, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false,
|
|
16655
16686
|
/* eslint-disable-next-line max-len */
|
|
16656
|
-
dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, focusSearchBarOnRender = true, excludeRuntimeParametersfromURL, collapseSearchBar = true, } = this.viewConfig;
|
|
16687
|
+
dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, focusSearchBarOnRender = true, excludeRuntimeParametersfromURL, excludeSearchTokenStringFromURL, collapseSearchBar = true, } = this.viewConfig;
|
|
16657
16688
|
const queryParams = this.getBaseQueryParams();
|
|
16658
16689
|
queryParams[Param.HideActions] = [
|
|
16659
16690
|
...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : []),
|
|
@@ -16665,7 +16696,7 @@ query GetEurekaVizSnapshots(
|
|
|
16665
16696
|
if (dataSource) {
|
|
16666
16697
|
queryParams[Param.DataSources] = `["${dataSource}"]`;
|
|
16667
16698
|
}
|
|
16668
|
-
if (searchOptions === null || searchOptions === void 0 ? void 0 : searchOptions.searchTokenString) {
|
|
16699
|
+
if ((searchOptions === null || searchOptions === void 0 ? void 0 : searchOptions.searchTokenString) && !excludeSearchTokenStringFromURL) {
|
|
16669
16700
|
queryParams[Param.searchTokenString] = encodeURIComponent(searchOptions.searchTokenString);
|
|
16670
16701
|
if (searchOptions.executeSearch) {
|
|
16671
16702
|
queryParams[Param.executeSearch] = true;
|
|
@@ -16773,7 +16804,7 @@ query GetEurekaVizSnapshots(
|
|
|
16773
16804
|
*/
|
|
16774
16805
|
getIFrameSrc() {
|
|
16775
16806
|
var _a;
|
|
16776
|
-
const { searchOptions, dataSource, dataSources, useLastSelectedSources = false, } = this.viewConfig;
|
|
16807
|
+
const { searchOptions, dataSource, dataSources, useLastSelectedSources = false, excludeSearchTokenStringFromURL, } = this.viewConfig;
|
|
16777
16808
|
const path = 'search-bar-embed';
|
|
16778
16809
|
const queryParams = this.getBaseQueryParams();
|
|
16779
16810
|
queryParams[Param.HideActions] = [...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : [])];
|
|
@@ -16783,7 +16814,7 @@ query GetEurekaVizSnapshots(
|
|
|
16783
16814
|
if (dataSource) {
|
|
16784
16815
|
queryParams[Param.DataSources] = `["${dataSource}"]`;
|
|
16785
16816
|
}
|
|
16786
|
-
if (searchOptions === null || searchOptions === void 0 ? void 0 : searchOptions.searchTokenString) {
|
|
16817
|
+
if ((searchOptions === null || searchOptions === void 0 ? void 0 : searchOptions.searchTokenString) && !excludeSearchTokenStringFromURL) {
|
|
16787
16818
|
queryParams[Param.searchTokenString] = encodeURIComponent(searchOptions.searchTokenString);
|
|
16788
16819
|
if (searchOptions.executeSearch) {
|
|
16789
16820
|
queryParams[Param.executeSearch] = true;
|
|
@@ -16811,6 +16842,17 @@ query GetEurekaVizSnapshots(
|
|
|
16811
16842
|
await this.renderIFrame(src);
|
|
16812
16843
|
return this;
|
|
16813
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
|
+
}
|
|
16814
16856
|
}
|
|
16815
16857
|
|
|
16816
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
|
|
@@ -6688,6 +6736,17 @@ export declare enum LogLevel {
|
|
|
6688
6736
|
*/
|
|
6689
6737
|
TRACE = "TRACE"
|
|
6690
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
|
+
}
|
|
6691
6750
|
|
|
6692
6751
|
/**
|
|
6693
6752
|
* The list of customization css variables. These
|
|
@@ -7500,6 +7559,9 @@ export declare class TsEmbed {
|
|
|
7500
7559
|
* @param error The error message or object
|
|
7501
7560
|
*/
|
|
7502
7561
|
protected handleError(error: string | Record<string, unknown>): void;
|
|
7562
|
+
protected getAuthTokenForCookielessInit(): Promise<string>;
|
|
7563
|
+
protected getDefaultAppInitData(): Promise<DefaultAppInitData>;
|
|
7564
|
+
protected getAppInitData(): Promise<DefaultAppInitData>;
|
|
7503
7565
|
/**
|
|
7504
7566
|
* Constructs the base URL string to load the ThoughtSpot app.
|
|
7505
7567
|
* @param query
|