@thoughtspot/visual-embed-sdk 1.21.0-sage.2 → 1.21.0
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/README.md +1 -1
- package/cjs/package.json +20 -6
- package/cjs/src/css-variables.d.ts +300 -0
- package/cjs/src/css-variables.d.ts.map +1 -0
- package/cjs/src/css-variables.js +3 -0
- package/cjs/src/css-variables.js.map +1 -0
- package/cjs/src/embed/base.spec.js +29 -0
- package/cjs/src/embed/base.spec.js.map +1 -1
- package/cjs/src/embed/search.d.ts +4 -0
- package/cjs/src/embed/search.d.ts.map +1 -1
- package/cjs/src/embed/search.js +1 -1
- package/cjs/src/embed/search.js.map +1 -1
- package/cjs/src/embed/ts-embed.js +2 -1
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/errors.d.ts +0 -1
- package/cjs/src/errors.d.ts.map +1 -1
- package/cjs/src/errors.js +0 -1
- package/cjs/src/errors.js.map +1 -1
- package/cjs/src/index.d.ts +1 -2
- package/cjs/src/index.d.ts.map +1 -1
- package/cjs/src/index.js +1 -3
- package/cjs/src/index.js.map +1 -1
- package/cjs/src/mixpanel-service.d.ts.map +1 -1
- package/cjs/src/mixpanel-service.js +14 -7
- package/cjs/src/mixpanel-service.js.map +1 -1
- package/cjs/src/react/index.d.ts +0 -4
- package/cjs/src/react/index.d.ts.map +1 -1
- package/cjs/src/react/index.js +1 -3
- package/cjs/src/react/index.js.map +1 -1
- package/cjs/src/react/index.spec.js +12 -0
- package/cjs/src/react/index.spec.js.map +1 -1
- package/cjs/src/types.d.ts +11 -12
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +0 -4
- package/cjs/src/types.js.map +1 -1
- package/cjs/src/utils/processData.d.ts.map +1 -1
- package/cjs/src/utils/processData.js +8 -6
- package/cjs/src/utils/processData.js.map +1 -1
- package/cjs/src/utils/processData.spec.js +17 -0
- package/cjs/src/utils/processData.spec.js.map +1 -1
- package/dist/src/css-variables.d.ts +300 -0
- package/dist/src/css-variables.d.ts.map +1 -0
- package/dist/src/embed/search.d.ts +4 -0
- package/dist/src/embed/search.d.ts.map +1 -1
- package/dist/src/errors.d.ts +0 -1
- package/dist/src/errors.d.ts.map +1 -1
- package/dist/src/index.d.ts +1 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/mixpanel-service.d.ts.map +1 -1
- package/dist/src/react/index.d.ts +0 -4
- package/dist/src/react/index.d.ts.map +1 -1
- package/dist/src/types.d.ts +11 -12
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/processData.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +31 -136
- package/dist/tsembed-react.js +30 -136
- package/dist/tsembed.es.js +31 -135
- package/dist/tsembed.js +30 -135
- package/dist/visual-embed-sdk-react-full.d.ts +323 -101
- package/dist/visual-embed-sdk-react.d.ts +3430 -0
- package/dist/visual-embed-sdk.d.ts +323 -98
- package/lib/package.json +20 -6
- package/lib/src/css-variables.d.ts +300 -0
- package/lib/src/css-variables.d.ts.map +1 -0
- package/lib/src/css-variables.js +2 -0
- package/lib/src/css-variables.js.map +1 -0
- package/lib/src/embed/base.spec.js +29 -0
- package/lib/src/embed/base.spec.js.map +1 -1
- package/lib/src/embed/search.d.ts +4 -0
- package/lib/src/embed/search.d.ts.map +1 -1
- package/lib/src/embed/search.js +1 -1
- package/lib/src/embed/search.js.map +1 -1
- package/lib/src/embed/ts-embed.js +2 -1
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/errors.d.ts +0 -1
- package/lib/src/errors.d.ts.map +1 -1
- package/lib/src/errors.js +0 -1
- package/lib/src/errors.js.map +1 -1
- package/lib/src/index.d.ts +1 -2
- package/lib/src/index.d.ts.map +1 -1
- package/lib/src/index.js +1 -2
- package/lib/src/index.js.map +1 -1
- package/lib/src/mixpanel-service.d.ts.map +1 -1
- package/lib/src/mixpanel-service.js +14 -7
- package/lib/src/mixpanel-service.js.map +1 -1
- package/lib/src/react/index.d.ts +0 -4
- package/lib/src/react/index.d.ts.map +1 -1
- package/lib/src/react/index.js +0 -2
- package/lib/src/react/index.js.map +1 -1
- package/lib/src/react/index.spec.js +12 -0
- package/lib/src/react/index.spec.js.map +1 -1
- package/lib/src/types.d.ts +11 -12
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +0 -4
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils/processData.d.ts.map +1 -1
- package/lib/src/utils/processData.js +8 -6
- package/lib/src/utils/processData.js.map +1 -1
- package/lib/src/utils/processData.spec.js +17 -0
- package/lib/src/utils/processData.spec.js.map +1 -1
- package/package.json +20 -6
- package/src/css-variables.ts +370 -0
- package/src/embed/base.spec.ts +35 -0
- package/src/embed/search.ts +5 -0
- package/src/embed/ts-embed.ts +1 -1
- package/src/errors.ts +0 -1
- package/src/index.ts +0 -2
- package/src/mixpanel-service.ts +14 -7
- package/src/react/index.spec.tsx +29 -0
- package/src/react/index.tsx +0 -9
- package/src/types.ts +13 -11
- package/src/utils/processData.spec.ts +18 -0
- package/src/utils/processData.ts +14 -8
- package/cjs/src/embed/nls.spec.d.ts +0 -1
- package/cjs/src/embed/nls.spec.d.ts.map +0 -1
- package/cjs/src/embed/nls.spec.js +0 -1
- package/cjs/src/embed/nls.spec.js.map +0 -1
- package/cjs/src/embed/sage-fullscreen.d.ts +0 -87
- package/cjs/src/embed/sage-fullscreen.d.ts.map +0 -1
- package/cjs/src/embed/sage-fullscreen.js +0 -114
- package/cjs/src/embed/sage-fullscreen.js.map +0 -1
- package/cjs/src/embed/sage.d.ts +0 -104
- package/cjs/src/embed/sage.d.ts.map +0 -1
- package/cjs/src/embed/sage.js +0 -120
- package/cjs/src/embed/sage.js.map +0 -1
- package/dist/src/embed/sage-fullscreen.d.ts +0 -87
- package/dist/src/embed/sage-fullscreen.d.ts.map +0 -1
- package/dist/src/embed/sage.d.ts +0 -104
- package/dist/src/embed/sage.d.ts.map +0 -1
- package/lib/src/embed/nls.spec.d.ts +0 -1
- package/lib/src/embed/nls.spec.d.ts.map +0 -1
- package/lib/src/embed/nls.spec.js +0 -1
- package/lib/src/embed/nls.spec.js.map +0 -1
- package/lib/src/embed/sage-fullscreen.d.ts +0 -87
- package/lib/src/embed/sage-fullscreen.d.ts.map +0 -1
- package/lib/src/embed/sage-fullscreen.js +0 -110
- package/lib/src/embed/sage-fullscreen.js.map +0 -1
- package/lib/src/embed/sage.d.ts +0 -104
- package/lib/src/embed/sage.d.ts.map +0 -1
- package/lib/src/embed/sage.js +0 -116
- package/lib/src/embed/sage.js.map +0 -1
- package/src/embed/sage.ts +0 -195
package/dist/tsembed.es.js
CHANGED
|
@@ -1479,10 +1479,6 @@ var Param;
|
|
|
1479
1479
|
Param["HideProfleAndHelp"] = "profileAndHelpInNavBarHidden";
|
|
1480
1480
|
Param["HideApplicationSwitcher"] = "applicationSwitcherHidden";
|
|
1481
1481
|
Param["HideOrgSwitcher"] = "orgSwitcherHidden";
|
|
1482
|
-
Param["IsSageEmbed"] = "isSageEmbed";
|
|
1483
|
-
Param["HideWorksheetSelector"] = "hideWorksheetSelector";
|
|
1484
|
-
Param["DisableWorksheetChange"] = "disableWorksheetChange";
|
|
1485
|
-
Param["HideEurekaResults"] = "hideEurekaResults";
|
|
1486
1482
|
})(Param || (Param = {}));
|
|
1487
1483
|
/**
|
|
1488
1484
|
* The list of actions that can be performed on visual ThoughtSpot
|
|
@@ -1741,7 +1737,6 @@ const ERROR_MESSAGE = {
|
|
|
1741
1737
|
LIVEBOARD_VIZ_ID_VALIDATION: 'Please provide either liveboardId or pinboardId',
|
|
1742
1738
|
TRIGGER_TIMED_OUT: 'Trigger timedout in getting response',
|
|
1743
1739
|
SEARCHEMBED_BETA_WRANING_MESSAGE: 'Search Embed is in Beta in this release.',
|
|
1744
|
-
SAGE_EMBED_BETA_WARNING_MESSAGE: 'Sage Embed is in Beta in this release.',
|
|
1745
1740
|
};
|
|
1746
1741
|
|
|
1747
1742
|
/**
|
|
@@ -7786,6 +7781,12 @@ var mixpanel = init_as_module();
|
|
|
7786
7781
|
|
|
7787
7782
|
var mixpanel_cjs = mixpanel;
|
|
7788
7783
|
|
|
7784
|
+
var mixpanel$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.assign(/*#__PURE__*/Object.create(null), mixpanel_cjs, {
|
|
7785
|
+
'default': mixpanel_cjs
|
|
7786
|
+
}));
|
|
7787
|
+
|
|
7788
|
+
// Needed to avoid error in CJS builds on some bundlers.
|
|
7789
|
+
const mixpanelLib = mixpanel_cjs || mixpanel$1;
|
|
7789
7790
|
const MIXPANEL_EVENT = {
|
|
7790
7791
|
VISUAL_SDK_RENDER_START: 'visual-sdk-render-start',
|
|
7791
7792
|
VISUAL_SDK_CALLED_INIT: 'visual-sdk-called-init',
|
|
@@ -7808,7 +7809,7 @@ function uploadMixpanelEvent(eventId, eventProps = {}) {
|
|
|
7808
7809
|
eventQueue.push({ eventId, eventProps });
|
|
7809
7810
|
return;
|
|
7810
7811
|
}
|
|
7811
|
-
|
|
7812
|
+
mixpanelLib.track(eventId, eventProps);
|
|
7812
7813
|
}
|
|
7813
7814
|
/**
|
|
7814
7815
|
*
|
|
@@ -7834,13 +7835,18 @@ function initMixpanel(sessionInfo) {
|
|
|
7834
7835
|
// userGUID
|
|
7835
7836
|
const isPublicCluster = !!sessionInfo.isPublicUser;
|
|
7836
7837
|
const token = sessionInfo.mixpanelToken;
|
|
7837
|
-
|
|
7838
|
-
|
|
7839
|
-
|
|
7840
|
-
|
|
7838
|
+
try {
|
|
7839
|
+
if (token) {
|
|
7840
|
+
mixpanelLib.init(token);
|
|
7841
|
+
if (!isPublicCluster) {
|
|
7842
|
+
mixpanelLib.identify(sessionInfo.userGUID);
|
|
7843
|
+
}
|
|
7844
|
+
isMixpanelInitialized = true;
|
|
7845
|
+
emptyQueue();
|
|
7841
7846
|
}
|
|
7842
|
-
|
|
7843
|
-
|
|
7847
|
+
}
|
|
7848
|
+
catch (e) {
|
|
7849
|
+
console.error('Error initializing mixpanel', e);
|
|
7844
7850
|
}
|
|
7845
7851
|
}
|
|
7846
7852
|
|
|
@@ -27391,13 +27397,15 @@ function processAuthInit(e) {
|
|
|
27391
27397
|
* @param containerEl
|
|
27392
27398
|
*/
|
|
27393
27399
|
function processNoCookieAccess(e, containerEl) {
|
|
27394
|
-
const { loginFailedMessage, suppressNoCookieAccessAlert } = getEmbedConfig();
|
|
27395
|
-
if (!
|
|
27396
|
-
|
|
27397
|
-
|
|
27400
|
+
const { loginFailedMessage, suppressNoCookieAccessAlert, ignoreNoCookieAccess, } = getEmbedConfig();
|
|
27401
|
+
if (!ignoreNoCookieAccess) {
|
|
27402
|
+
if (!suppressNoCookieAccessAlert) {
|
|
27403
|
+
// eslint-disable-next-line no-alert
|
|
27404
|
+
alert('Third party cookie access is blocked on this browser, please allow third party cookies for this to work properly. \nYou can use `suppressNoCookieAccessAlert` to suppress this message.');
|
|
27405
|
+
}
|
|
27406
|
+
// eslint-disable-next-line no-param-reassign
|
|
27407
|
+
containerEl.innerHTML = loginFailedMessage;
|
|
27398
27408
|
}
|
|
27399
|
-
// eslint-disable-next-line no-param-reassign
|
|
27400
|
-
containerEl.innerHTML = loginFailedMessage;
|
|
27401
27409
|
notifyAuthFailure(AuthFailureType.NO_COOKIE_ACCESS);
|
|
27402
27410
|
return e;
|
|
27403
27411
|
}
|
|
@@ -27509,7 +27517,7 @@ function processTrigger(iFrame, messageType, thoughtSpotHost, data) {
|
|
|
27509
27517
|
});
|
|
27510
27518
|
}
|
|
27511
27519
|
|
|
27512
|
-
var name="@thoughtspot/visual-embed-sdk";var version="1.21.0
|
|
27520
|
+
var name="@thoughtspot/visual-embed-sdk";var version="1.21.0";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/index.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",start:"gatsby develop","build:gatsby":"npm run clean:gatsby && gatsby build --prefix-paths","build:gatsby:noprefix":"npm run clean:gatsby && gatsby build","serve:gatsby":"gatsby serve","clean:gatsby":"gatsby clean","build-and-publish":"npm run build:gatsby && npm run publish","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","docs-cmd":"node scripts/gatsby-commands.js",docgen:"typedoc --tsconfig tsconfig.json --theme typedoc-theme","test-sdk":"jest -c jest.config.sdk.js --runInBand","test-docs":"jest -c jest.config.docs.js",test:"npm run test-sdk && npm run test-docs",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 && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest"};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","eslint-plugin-comment-length":"^0.9.2","eslint-plugin-jsdoc":"^40.1.0",eventemitter3:"^4.0.7","gatsby-plugin-vercel":"^1.0.3","html-react-parser":"^1.4.12",lodash:"^4.17.21","mixpanel-browser":"^2.45.0","ts-deepmerge":"^6.0.2","use-deep-compare-effect":"^1.8.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","@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/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","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","fs-extra":"^10.0.0",gatsby:"3.13.1","gatsby-plugin-algolia":"^0.22.2","gatsby-plugin-catch-links":"^3.1.0","gatsby-plugin-env-variables":"^2.1.0","gatsby-plugin-intl":"^0.3.3","gatsby-plugin-manifest":"^3.2.0","gatsby-plugin-output":"^0.1.3","gatsby-plugin-sass":"6.7.0","gatsby-plugin-sitemap":"^4.10.0","gatsby-source-filesystem":"3.1.0","gatsby-transformer-asciidoc":"2.1.0","gatsby-transformer-rehype":"2.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-puppeteer":"^4.4.0",jsdom:"^17.0.0","node-sass":"^8.0.0",prettier:"2.1.2",puppeteer:"^7.0.1",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:"2.30.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"};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","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,description:description,module:module,main:main,types:types,files:files,exports:exports,typesVersions:typesVersions,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};
|
|
27513
27521
|
|
|
27514
27522
|
/**
|
|
27515
27523
|
* Copyright (c) 2022
|
|
@@ -28152,8 +28160,9 @@ class TsEmbed {
|
|
|
28152
28160
|
* @version SDK: 1.19.1 | ThoughtSpot: *
|
|
28153
28161
|
*/
|
|
28154
28162
|
destroy() {
|
|
28163
|
+
var _a;
|
|
28155
28164
|
try {
|
|
28156
|
-
this.insertedDomEl.parentNode.removeChild(this.insertedDomEl);
|
|
28165
|
+
(_a = this.insertedDomEl) === null || _a === void 0 ? void 0 : _a.parentNode.removeChild(this.insertedDomEl);
|
|
28157
28166
|
}
|
|
28158
28167
|
catch (e) {
|
|
28159
28168
|
console.log('Error destroying TS Embed', e);
|
|
@@ -28639,7 +28648,7 @@ class SearchEmbed extends TsEmbed {
|
|
|
28639
28648
|
}
|
|
28640
28649
|
getEmbedParams() {
|
|
28641
28650
|
var _a;
|
|
28642
|
-
const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, } = this.viewConfig;
|
|
28651
|
+
const { hideResults, expandAllDataSource, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, } = this.viewConfig;
|
|
28643
28652
|
const queryParams = this.getBaseQueryParams();
|
|
28644
28653
|
queryParams[Param.HideActions] = [
|
|
28645
28654
|
...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : []),
|
|
@@ -28765,117 +28774,4 @@ class SearchBarEmbed extends TsEmbed {
|
|
|
28765
28774
|
}
|
|
28766
28775
|
}
|
|
28767
28776
|
|
|
28768
|
-
|
|
28769
|
-
* Copyright (c) 2022
|
|
28770
|
-
*
|
|
28771
|
-
* Embed ThoughtSpot Sage
|
|
28772
|
-
*
|
|
28773
|
-
* @summary TS Sage embed
|
|
28774
|
-
* @author Mourya Balabhadra <mourya.balabhadra@thoughtspot.com>
|
|
28775
|
-
*/
|
|
28776
|
-
const HiddenActionItemByDefaultForSageEmbed = [
|
|
28777
|
-
Action.Save,
|
|
28778
|
-
Action.Pin,
|
|
28779
|
-
Action.EditACopy,
|
|
28780
|
-
Action.SaveAsView,
|
|
28781
|
-
Action.UpdateTML,
|
|
28782
|
-
Action.EditTML,
|
|
28783
|
-
Action.AnswerDelete,
|
|
28784
|
-
Action.Share,
|
|
28785
|
-
];
|
|
28786
|
-
/**
|
|
28787
|
-
* Embed ThoughtSpot search
|
|
28788
|
-
*
|
|
28789
|
-
* @group Embed components
|
|
28790
|
-
*/
|
|
28791
|
-
class SageEmbed extends V1Embed {
|
|
28792
|
-
// eslint-disable-next-line no-useless-constructor
|
|
28793
|
-
constructor(domSelector, viewConfig) {
|
|
28794
|
-
super(domSelector, viewConfig);
|
|
28795
|
-
this.defaultHeight = 500;
|
|
28796
|
-
/**
|
|
28797
|
-
* Set the iframe height as per the computed height received
|
|
28798
|
-
* from the ThoughtSpot app.
|
|
28799
|
-
*
|
|
28800
|
-
* @param {MessagePayload} data The event payload
|
|
28801
|
-
*/
|
|
28802
|
-
this.updateIFrameHeight = (data) => {
|
|
28803
|
-
this.setIFrameHeight(Math.max(data.data, this.defaultHeight));
|
|
28804
|
-
};
|
|
28805
|
-
this.embedIframeCenter = (data, responder) => {
|
|
28806
|
-
const obj = this.getIframeCenter();
|
|
28807
|
-
responder({ type: EmbedEvent.EmbedIframeCenter, data: obj });
|
|
28808
|
-
};
|
|
28809
|
-
this.setIframeHeightForNonEmbedLiveboard = (data) => {
|
|
28810
|
-
if (!data.data.currentPath.startsWith('/embed/viz/')) {
|
|
28811
|
-
this.setIFrameHeight(this.defaultHeight);
|
|
28812
|
-
}
|
|
28813
|
-
};
|
|
28814
|
-
if (this.viewConfig.fullHeight === true) {
|
|
28815
|
-
this.on(EmbedEvent.RouteChange, this.setIframeHeightForNonEmbedLiveboard);
|
|
28816
|
-
this.on(EmbedEvent.EmbedHeight, this.updateIFrameHeight);
|
|
28817
|
-
this.on(EmbedEvent.EmbedIframeCenter, this.embedIframeCenter);
|
|
28818
|
-
}
|
|
28819
|
-
}
|
|
28820
|
-
/**
|
|
28821
|
-
* Constructs a map of parameters to be passed on to the
|
|
28822
|
-
* embedded Eureka or Sage search page.
|
|
28823
|
-
*
|
|
28824
|
-
* @returns {string} query string
|
|
28825
|
-
*/
|
|
28826
|
-
getEmbedParams() {
|
|
28827
|
-
var _a, _b;
|
|
28828
|
-
const { hideEurekaResults, isSageEmbed, disableWorksheetChange, hideWorksheetSelector, showPrimaryNavbar, disableProfileAndHelp, hideApplicationSwitcher, hideOrgSwitcher, fullHeight, } = this.viewConfig;
|
|
28829
|
-
const params = {};
|
|
28830
|
-
params[Param.EmbedApp] = true;
|
|
28831
|
-
if (fullHeight) {
|
|
28832
|
-
params[Param.fullHeight] = true;
|
|
28833
|
-
}
|
|
28834
|
-
if (hideEurekaResults) {
|
|
28835
|
-
params[Param.HideEurekaResults] = true;
|
|
28836
|
-
}
|
|
28837
|
-
if (isSageEmbed) {
|
|
28838
|
-
params[Param.IsSageEmbed] = true;
|
|
28839
|
-
}
|
|
28840
|
-
if (disableWorksheetChange) {
|
|
28841
|
-
params[Param.DisableWorksheetChange] = true;
|
|
28842
|
-
}
|
|
28843
|
-
if (hideWorksheetSelector) {
|
|
28844
|
-
params[Param.HideWorksheetSelector] = true;
|
|
28845
|
-
}
|
|
28846
|
-
params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
|
|
28847
|
-
params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
|
|
28848
|
-
params[Param.HideApplicationSwitcher] = !!hideApplicationSwitcher;
|
|
28849
|
-
params[Param.HideOrgSwitcher] = !!hideOrgSwitcher;
|
|
28850
|
-
params[Param.HideActions] = [...((_a = params[Param.HideActions]) !== null && _a !== void 0 ? _a : [])];
|
|
28851
|
-
params[Param.HideActions] = [
|
|
28852
|
-
...((_b = params[Param.HideActions]) !== null && _b !== void 0 ? _b : []),
|
|
28853
|
-
...HiddenActionItemByDefaultForSageEmbed,
|
|
28854
|
-
];
|
|
28855
|
-
return getQueryParamString(params, true);
|
|
28856
|
-
}
|
|
28857
|
-
/**
|
|
28858
|
-
* Construct the URL of the embedded ThoughtSpot sage to be
|
|
28859
|
-
* loaded in the iframe
|
|
28860
|
-
*
|
|
28861
|
-
* @returns {string} iframe url
|
|
28862
|
-
*/
|
|
28863
|
-
getIFrameSrc() {
|
|
28864
|
-
const path = 'eureka';
|
|
28865
|
-
const tsPostHashParams = this.getThoughtSpotPostUrlParams();
|
|
28866
|
-
return `${this.getRootIframeSrc()}/embed/${path}${tsPostHashParams}`;
|
|
28867
|
-
}
|
|
28868
|
-
/**
|
|
28869
|
-
* Render the embedded ThoughtSpot Sage
|
|
28870
|
-
*
|
|
28871
|
-
* @returns {SageEmbed} Eureka/Sage embed
|
|
28872
|
-
*/
|
|
28873
|
-
render() {
|
|
28874
|
-
super.render();
|
|
28875
|
-
const src = this.getIFrameSrc();
|
|
28876
|
-
this.renderV1Embed(src);
|
|
28877
|
-
return this;
|
|
28878
|
-
}
|
|
28879
|
-
}
|
|
28880
|
-
|
|
28881
|
-
export { Action, AppEmbed, AuthEvent, AuthFailureType, AuthStatus, AuthType, ContextMenuTriggerOptions, DataSourceVisualMode, EmbedEvent, HostEvent, LiveboardEmbed, Page, PinboardEmbed, PrefetchFeatures, RuntimeFilterOp, SageEmbed, SearchBarEmbed, SearchEmbed, executeTML, exportTML, getEmbedConfig as getInitConfig, getSessionInfo, init, logout$1 as logout, prefetch };
|
|
28777
|
+
export { Action, AppEmbed, AuthEvent, AuthFailureType, AuthStatus, AuthType, ContextMenuTriggerOptions, DataSourceVisualMode, EmbedEvent, HostEvent, LiveboardEmbed, Page, PinboardEmbed, PrefetchFeatures, RuntimeFilterOp, SearchBarEmbed, SearchEmbed, executeTML, exportTML, getEmbedConfig as getInitConfig, getSessionInfo, init, logout$1 as logout, prefetch };
|
package/dist/tsembed.js
CHANGED
|
@@ -1420,10 +1420,6 @@
|
|
|
1420
1420
|
Param["HideProfleAndHelp"] = "profileAndHelpInNavBarHidden";
|
|
1421
1421
|
Param["HideApplicationSwitcher"] = "applicationSwitcherHidden";
|
|
1422
1422
|
Param["HideOrgSwitcher"] = "orgSwitcherHidden";
|
|
1423
|
-
Param["IsSageEmbed"] = "isSageEmbed";
|
|
1424
|
-
Param["HideWorksheetSelector"] = "hideWorksheetSelector";
|
|
1425
|
-
Param["DisableWorksheetChange"] = "disableWorksheetChange";
|
|
1426
|
-
Param["HideEurekaResults"] = "hideEurekaResults";
|
|
1427
1423
|
})(Param || (Param = {}));
|
|
1428
1424
|
(function (Action) {
|
|
1429
1425
|
Action["Save"] = "save";
|
|
@@ -1658,7 +1654,6 @@
|
|
|
1658
1654
|
LIVEBOARD_VIZ_ID_VALIDATION: 'Please provide either liveboardId or pinboardId',
|
|
1659
1655
|
TRIGGER_TIMED_OUT: 'Trigger timedout in getting response',
|
|
1660
1656
|
SEARCHEMBED_BETA_WRANING_MESSAGE: 'Search Embed is in Beta in this release.',
|
|
1661
|
-
SAGE_EMBED_BETA_WARNING_MESSAGE: 'Sage Embed is in Beta in this release.',
|
|
1662
1657
|
};
|
|
1663
1658
|
|
|
1664
1659
|
/**
|
|
@@ -7703,6 +7698,12 @@
|
|
|
7703
7698
|
|
|
7704
7699
|
var mixpanel_cjs = mixpanel;
|
|
7705
7700
|
|
|
7701
|
+
var mixpanel$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.assign(/*#__PURE__*/Object.create(null), mixpanel_cjs, {
|
|
7702
|
+
'default': mixpanel_cjs
|
|
7703
|
+
}));
|
|
7704
|
+
|
|
7705
|
+
// Needed to avoid error in CJS builds on some bundlers.
|
|
7706
|
+
const mixpanelLib = mixpanel_cjs || mixpanel$1;
|
|
7706
7707
|
const MIXPANEL_EVENT = {
|
|
7707
7708
|
VISUAL_SDK_RENDER_START: 'visual-sdk-render-start',
|
|
7708
7709
|
VISUAL_SDK_CALLED_INIT: 'visual-sdk-called-init',
|
|
@@ -7725,7 +7726,7 @@
|
|
|
7725
7726
|
eventQueue.push({ eventId, eventProps });
|
|
7726
7727
|
return;
|
|
7727
7728
|
}
|
|
7728
|
-
|
|
7729
|
+
mixpanelLib.track(eventId, eventProps);
|
|
7729
7730
|
}
|
|
7730
7731
|
/**
|
|
7731
7732
|
*
|
|
@@ -7751,13 +7752,18 @@
|
|
|
7751
7752
|
// userGUID
|
|
7752
7753
|
const isPublicCluster = !!sessionInfo.isPublicUser;
|
|
7753
7754
|
const token = sessionInfo.mixpanelToken;
|
|
7754
|
-
|
|
7755
|
-
|
|
7756
|
-
|
|
7757
|
-
|
|
7755
|
+
try {
|
|
7756
|
+
if (token) {
|
|
7757
|
+
mixpanelLib.init(token);
|
|
7758
|
+
if (!isPublicCluster) {
|
|
7759
|
+
mixpanelLib.identify(sessionInfo.userGUID);
|
|
7760
|
+
}
|
|
7761
|
+
isMixpanelInitialized = true;
|
|
7762
|
+
emptyQueue();
|
|
7758
7763
|
}
|
|
7759
|
-
|
|
7760
|
-
|
|
7764
|
+
}
|
|
7765
|
+
catch (e) {
|
|
7766
|
+
console.error('Error initializing mixpanel', e);
|
|
7761
7767
|
}
|
|
7762
7768
|
}
|
|
7763
7769
|
|
|
@@ -27289,13 +27295,15 @@
|
|
|
27289
27295
|
* @param containerEl
|
|
27290
27296
|
*/
|
|
27291
27297
|
function processNoCookieAccess(e, containerEl) {
|
|
27292
|
-
const { loginFailedMessage, suppressNoCookieAccessAlert } = getEmbedConfig();
|
|
27293
|
-
if (!
|
|
27294
|
-
|
|
27295
|
-
|
|
27298
|
+
const { loginFailedMessage, suppressNoCookieAccessAlert, ignoreNoCookieAccess, } = getEmbedConfig();
|
|
27299
|
+
if (!ignoreNoCookieAccess) {
|
|
27300
|
+
if (!suppressNoCookieAccessAlert) {
|
|
27301
|
+
// eslint-disable-next-line no-alert
|
|
27302
|
+
alert('Third party cookie access is blocked on this browser, please allow third party cookies for this to work properly. \nYou can use `suppressNoCookieAccessAlert` to suppress this message.');
|
|
27303
|
+
}
|
|
27304
|
+
// eslint-disable-next-line no-param-reassign
|
|
27305
|
+
containerEl.innerHTML = loginFailedMessage;
|
|
27296
27306
|
}
|
|
27297
|
-
// eslint-disable-next-line no-param-reassign
|
|
27298
|
-
containerEl.innerHTML = loginFailedMessage;
|
|
27299
27307
|
notifyAuthFailure(exports.AuthFailureType.NO_COOKIE_ACCESS);
|
|
27300
27308
|
return e;
|
|
27301
27309
|
}
|
|
@@ -27407,7 +27415,7 @@
|
|
|
27407
27415
|
});
|
|
27408
27416
|
}
|
|
27409
27417
|
|
|
27410
|
-
var name="@thoughtspot/visual-embed-sdk";var version="1.21.0
|
|
27418
|
+
var name="@thoughtspot/visual-embed-sdk";var version="1.21.0";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports$1={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/index.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",start:"gatsby develop","build:gatsby":"npm run clean:gatsby && gatsby build --prefix-paths","build:gatsby:noprefix":"npm run clean:gatsby && gatsby build","serve:gatsby":"gatsby serve","clean:gatsby":"gatsby clean","build-and-publish":"npm run build:gatsby && npm run publish","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","docs-cmd":"node scripts/gatsby-commands.js",docgen:"typedoc --tsconfig tsconfig.json --theme typedoc-theme","test-sdk":"jest -c jest.config.sdk.js --runInBand","test-docs":"jest -c jest.config.docs.js",test:"npm run test-sdk && npm run test-docs",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 && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest"};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","eslint-plugin-comment-length":"^0.9.2","eslint-plugin-jsdoc":"^40.1.0",eventemitter3:"^4.0.7","gatsby-plugin-vercel":"^1.0.3","html-react-parser":"^1.4.12",lodash:"^4.17.21","mixpanel-browser":"^2.45.0","ts-deepmerge":"^6.0.2","use-deep-compare-effect":"^1.8.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","@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/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","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","fs-extra":"^10.0.0",gatsby:"3.13.1","gatsby-plugin-algolia":"^0.22.2","gatsby-plugin-catch-links":"^3.1.0","gatsby-plugin-env-variables":"^2.1.0","gatsby-plugin-intl":"^0.3.3","gatsby-plugin-manifest":"^3.2.0","gatsby-plugin-output":"^0.1.3","gatsby-plugin-sass":"6.7.0","gatsby-plugin-sitemap":"^4.10.0","gatsby-source-filesystem":"3.1.0","gatsby-transformer-asciidoc":"2.1.0","gatsby-transformer-rehype":"2.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-puppeteer":"^4.4.0",jsdom:"^17.0.0","node-sass":"^8.0.0",prettier:"2.1.2",puppeteer:"^7.0.1",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:"2.30.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"};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","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,description:description,module:module,main:main,types:types,files:files,exports:exports$1,typesVersions:typesVersions,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};
|
|
27411
27419
|
|
|
27412
27420
|
/**
|
|
27413
27421
|
* Copyright (c) 2022
|
|
@@ -28050,8 +28058,9 @@
|
|
|
28050
28058
|
* @version SDK: 1.19.1 | ThoughtSpot: *
|
|
28051
28059
|
*/
|
|
28052
28060
|
destroy() {
|
|
28061
|
+
var _a;
|
|
28053
28062
|
try {
|
|
28054
|
-
this.insertedDomEl.parentNode.removeChild(this.insertedDomEl);
|
|
28063
|
+
(_a = this.insertedDomEl) === null || _a === void 0 ? void 0 : _a.parentNode.removeChild(this.insertedDomEl);
|
|
28055
28064
|
}
|
|
28056
28065
|
catch (e) {
|
|
28057
28066
|
console.log('Error destroying TS Embed', e);
|
|
@@ -28532,7 +28541,7 @@
|
|
|
28532
28541
|
}
|
|
28533
28542
|
getEmbedParams() {
|
|
28534
28543
|
var _a;
|
|
28535
|
-
const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, } = this.viewConfig;
|
|
28544
|
+
const { hideResults, expandAllDataSource, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, } = this.viewConfig;
|
|
28536
28545
|
const queryParams = this.getBaseQueryParams();
|
|
28537
28546
|
queryParams[Param.HideActions] = [
|
|
28538
28547
|
...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : []),
|
|
@@ -28658,123 +28667,9 @@
|
|
|
28658
28667
|
}
|
|
28659
28668
|
}
|
|
28660
28669
|
|
|
28661
|
-
/**
|
|
28662
|
-
* Copyright (c) 2022
|
|
28663
|
-
*
|
|
28664
|
-
* Embed ThoughtSpot Sage
|
|
28665
|
-
*
|
|
28666
|
-
* @summary TS Sage embed
|
|
28667
|
-
* @author Mourya Balabhadra <mourya.balabhadra@thoughtspot.com>
|
|
28668
|
-
*/
|
|
28669
|
-
const HiddenActionItemByDefaultForSageEmbed = [
|
|
28670
|
-
exports.Action.Save,
|
|
28671
|
-
exports.Action.Pin,
|
|
28672
|
-
exports.Action.EditACopy,
|
|
28673
|
-
exports.Action.SaveAsView,
|
|
28674
|
-
exports.Action.UpdateTML,
|
|
28675
|
-
exports.Action.EditTML,
|
|
28676
|
-
exports.Action.AnswerDelete,
|
|
28677
|
-
exports.Action.Share,
|
|
28678
|
-
];
|
|
28679
|
-
/**
|
|
28680
|
-
* Embed ThoughtSpot search
|
|
28681
|
-
*
|
|
28682
|
-
* @group Embed components
|
|
28683
|
-
*/
|
|
28684
|
-
class SageEmbed extends V1Embed {
|
|
28685
|
-
// eslint-disable-next-line no-useless-constructor
|
|
28686
|
-
constructor(domSelector, viewConfig) {
|
|
28687
|
-
super(domSelector, viewConfig);
|
|
28688
|
-
this.defaultHeight = 500;
|
|
28689
|
-
/**
|
|
28690
|
-
* Set the iframe height as per the computed height received
|
|
28691
|
-
* from the ThoughtSpot app.
|
|
28692
|
-
*
|
|
28693
|
-
* @param {MessagePayload} data The event payload
|
|
28694
|
-
*/
|
|
28695
|
-
this.updateIFrameHeight = (data) => {
|
|
28696
|
-
this.setIFrameHeight(Math.max(data.data, this.defaultHeight));
|
|
28697
|
-
};
|
|
28698
|
-
this.embedIframeCenter = (data, responder) => {
|
|
28699
|
-
const obj = this.getIframeCenter();
|
|
28700
|
-
responder({ type: exports.EmbedEvent.EmbedIframeCenter, data: obj });
|
|
28701
|
-
};
|
|
28702
|
-
this.setIframeHeightForNonEmbedLiveboard = (data) => {
|
|
28703
|
-
if (!data.data.currentPath.startsWith('/embed/viz/')) {
|
|
28704
|
-
this.setIFrameHeight(this.defaultHeight);
|
|
28705
|
-
}
|
|
28706
|
-
};
|
|
28707
|
-
if (this.viewConfig.fullHeight === true) {
|
|
28708
|
-
this.on(exports.EmbedEvent.RouteChange, this.setIframeHeightForNonEmbedLiveboard);
|
|
28709
|
-
this.on(exports.EmbedEvent.EmbedHeight, this.updateIFrameHeight);
|
|
28710
|
-
this.on(exports.EmbedEvent.EmbedIframeCenter, this.embedIframeCenter);
|
|
28711
|
-
}
|
|
28712
|
-
}
|
|
28713
|
-
/**
|
|
28714
|
-
* Constructs a map of parameters to be passed on to the
|
|
28715
|
-
* embedded Eureka or Sage search page.
|
|
28716
|
-
*
|
|
28717
|
-
* @returns {string} query string
|
|
28718
|
-
*/
|
|
28719
|
-
getEmbedParams() {
|
|
28720
|
-
var _a, _b;
|
|
28721
|
-
const { hideEurekaResults, isSageEmbed, disableWorksheetChange, hideWorksheetSelector, showPrimaryNavbar, disableProfileAndHelp, hideApplicationSwitcher, hideOrgSwitcher, fullHeight, } = this.viewConfig;
|
|
28722
|
-
const params = {};
|
|
28723
|
-
params[Param.EmbedApp] = true;
|
|
28724
|
-
if (fullHeight) {
|
|
28725
|
-
params[Param.fullHeight] = true;
|
|
28726
|
-
}
|
|
28727
|
-
if (hideEurekaResults) {
|
|
28728
|
-
params[Param.HideEurekaResults] = true;
|
|
28729
|
-
}
|
|
28730
|
-
if (isSageEmbed) {
|
|
28731
|
-
params[Param.IsSageEmbed] = true;
|
|
28732
|
-
}
|
|
28733
|
-
if (disableWorksheetChange) {
|
|
28734
|
-
params[Param.DisableWorksheetChange] = true;
|
|
28735
|
-
}
|
|
28736
|
-
if (hideWorksheetSelector) {
|
|
28737
|
-
params[Param.HideWorksheetSelector] = true;
|
|
28738
|
-
}
|
|
28739
|
-
params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
|
|
28740
|
-
params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
|
|
28741
|
-
params[Param.HideApplicationSwitcher] = !!hideApplicationSwitcher;
|
|
28742
|
-
params[Param.HideOrgSwitcher] = !!hideOrgSwitcher;
|
|
28743
|
-
params[Param.HideActions] = [...((_a = params[Param.HideActions]) !== null && _a !== void 0 ? _a : [])];
|
|
28744
|
-
params[Param.HideActions] = [
|
|
28745
|
-
...((_b = params[Param.HideActions]) !== null && _b !== void 0 ? _b : []),
|
|
28746
|
-
...HiddenActionItemByDefaultForSageEmbed,
|
|
28747
|
-
];
|
|
28748
|
-
return getQueryParamString(params, true);
|
|
28749
|
-
}
|
|
28750
|
-
/**
|
|
28751
|
-
* Construct the URL of the embedded ThoughtSpot sage to be
|
|
28752
|
-
* loaded in the iframe
|
|
28753
|
-
*
|
|
28754
|
-
* @returns {string} iframe url
|
|
28755
|
-
*/
|
|
28756
|
-
getIFrameSrc() {
|
|
28757
|
-
const path = 'eureka';
|
|
28758
|
-
const tsPostHashParams = this.getThoughtSpotPostUrlParams();
|
|
28759
|
-
return `${this.getRootIframeSrc()}/embed/${path}${tsPostHashParams}`;
|
|
28760
|
-
}
|
|
28761
|
-
/**
|
|
28762
|
-
* Render the embedded ThoughtSpot Sage
|
|
28763
|
-
*
|
|
28764
|
-
* @returns {SageEmbed} Eureka/Sage embed
|
|
28765
|
-
*/
|
|
28766
|
-
render() {
|
|
28767
|
-
super.render();
|
|
28768
|
-
const src = this.getIFrameSrc();
|
|
28769
|
-
this.renderV1Embed(src);
|
|
28770
|
-
return this;
|
|
28771
|
-
}
|
|
28772
|
-
}
|
|
28773
|
-
|
|
28774
28670
|
exports.AppEmbed = AppEmbed;
|
|
28775
28671
|
exports.LiveboardEmbed = LiveboardEmbed;
|
|
28776
28672
|
exports.PinboardEmbed = PinboardEmbed;
|
|
28777
|
-
exports.SageEmbed = SageEmbed;
|
|
28778
28673
|
exports.SearchBarEmbed = SearchBarEmbed;
|
|
28779
28674
|
exports.SearchEmbed = SearchEmbed;
|
|
28780
28675
|
exports.executeTML = executeTML;
|