@thoughtspot/visual-embed-sdk 1.42.0 → 1.42.1-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/package.json +2 -2
- package/cjs/src/api-intercept.d.ts +27 -0
- package/cjs/src/api-intercept.d.ts.map +1 -0
- package/cjs/src/api-intercept.js +115 -0
- package/cjs/src/api-intercept.js.map +1 -0
- package/cjs/src/api-intercept.spec.d.ts +2 -0
- package/cjs/src/api-intercept.spec.d.ts.map +1 -0
- package/cjs/src/api-intercept.spec.js +122 -0
- package/cjs/src/api-intercept.spec.js.map +1 -0
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +7 -2
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/app.spec.js +20 -0
- package/cjs/src/embed/app.spec.js.map +1 -1
- package/cjs/src/embed/hostEventClient/contracts.d.ts +11 -1
- package/cjs/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/cjs/src/embed/hostEventClient/contracts.js +1 -0
- package/cjs/src/embed/hostEventClient/contracts.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +4 -1
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/liveboard.spec.js +22 -0
- package/cjs/src/embed/liveboard.spec.js.map +1 -1
- package/cjs/src/embed/search.d.ts.map +1 -1
- package/cjs/src/embed/search.js +3 -1
- package/cjs/src/embed/search.js.map +1 -1
- package/cjs/src/embed/ts-embed.d.ts +15 -0
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +94 -26
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/embed/ts-embed.spec.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.spec.js +168 -0
- package/cjs/src/embed/ts-embed.spec.js.map +1 -1
- package/cjs/src/errors.d.ts +1 -0
- package/cjs/src/errors.d.ts.map +1 -1
- package/cjs/src/errors.js +1 -0
- package/cjs/src/errors.js.map +1 -1
- package/cjs/src/index.d.ts +2 -2
- package/cjs/src/index.d.ts.map +1 -1
- package/cjs/src/index.js +2 -1
- package/cjs/src/index.js.map +1 -1
- package/cjs/src/react/all-types-export.d.ts +1 -1
- package/cjs/src/react/all-types-export.d.ts.map +1 -1
- package/cjs/src/react/all-types-export.js +2 -1
- package/cjs/src/react/all-types-export.js.map +1 -1
- package/cjs/src/types.d.ts +100 -4
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +39 -1
- package/cjs/src/types.js.map +1 -1
- package/cjs/src/utils/processData.d.ts +1 -1
- package/cjs/src/utils/processData.d.ts.map +1 -1
- package/cjs/src/utils/processData.js +8 -8
- package/cjs/src/utils/processData.js.map +1 -1
- package/dist/index-BCC3Z072.js +7371 -0
- package/dist/index-BEzW4MDA.js +7371 -0
- package/dist/{index-BpSohedu.js → index-DvNA626T.js} +1 -1
- package/dist/src/api-intercept.d.ts +27 -0
- package/dist/src/api-intercept.d.ts.map +1 -0
- package/dist/src/api-intercept.spec.d.ts +2 -0
- package/dist/src/api-intercept.spec.d.ts.map +1 -0
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/hostEventClient/contracts.d.ts +11 -1
- package/dist/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/embed/search.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.d.ts +15 -0
- package/dist/src/embed/ts-embed.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.spec.d.ts.map +1 -1
- package/dist/src/errors.d.ts +1 -0
- package/dist/src/errors.d.ts.map +1 -1
- package/dist/src/index.d.ts +2 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/react/all-types-export.d.ts +1 -1
- package/dist/src/react/all-types-export.d.ts.map +1 -1
- package/dist/src/types.d.ts +100 -4
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/processData.d.ts +1 -1
- package/dist/src/utils/processData.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +266 -51
- package/dist/tsembed-react.js +265 -50
- package/dist/tsembed.es.js +267 -52
- package/dist/tsembed.js +265 -50
- package/dist/visual-embed-sdk-react-full.d.ts +124 -4
- package/dist/visual-embed-sdk-react.d.ts +121 -4
- package/dist/visual-embed-sdk.d.ts +124 -4
- package/lib/package.json +2 -2
- package/lib/src/api-intercept.d.ts +27 -0
- package/lib/src/api-intercept.d.ts.map +1 -0
- package/lib/src/api-intercept.js +108 -0
- package/lib/src/api-intercept.js.map +1 -0
- package/lib/src/api-intercept.spec.d.ts +2 -0
- package/lib/src/api-intercept.spec.d.ts.map +1 -0
- package/lib/src/api-intercept.spec.js +119 -0
- package/lib/src/api-intercept.spec.js.map +1 -0
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +7 -2
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/app.spec.js +20 -0
- package/lib/src/embed/app.spec.js.map +1 -1
- package/lib/src/embed/hostEventClient/contracts.d.ts +11 -1
- package/lib/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/lib/src/embed/hostEventClient/contracts.js +1 -0
- package/lib/src/embed/hostEventClient/contracts.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +4 -1
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +22 -0
- package/lib/src/embed/liveboard.spec.js.map +1 -1
- package/lib/src/embed/search.d.ts.map +1 -1
- package/lib/src/embed/search.js +3 -1
- package/lib/src/embed/search.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts +15 -0
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +94 -26
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/embed/ts-embed.spec.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.spec.js +168 -0
- package/lib/src/embed/ts-embed.spec.js.map +1 -1
- package/lib/src/errors.d.ts +1 -0
- package/lib/src/errors.d.ts.map +1 -1
- package/lib/src/errors.js +1 -0
- package/lib/src/errors.js.map +1 -1
- package/lib/src/index.d.ts +2 -2
- package/lib/src/index.d.ts.map +1 -1
- package/lib/src/index.js +2 -2
- package/lib/src/index.js.map +1 -1
- package/lib/src/react/all-types-export.d.ts +1 -1
- package/lib/src/react/all-types-export.d.ts.map +1 -1
- package/lib/src/react/all-types-export.js +1 -1
- package/lib/src/react/all-types-export.js.map +1 -1
- package/lib/src/types.d.ts +100 -4
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +38 -0
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils/processData.d.ts +1 -1
- package/lib/src/utils/processData.d.ts.map +1 -1
- package/lib/src/utils/processData.js +8 -8
- package/lib/src/utils/processData.js.map +1 -1
- package/package.json +2 -2
- package/src/api-intercept.spec.ts +147 -0
- package/src/api-intercept.ts +134 -0
- package/src/embed/app.spec.ts +28 -0
- package/src/embed/app.ts +9 -1
- package/src/embed/hostEventClient/contracts.ts +10 -0
- package/src/embed/liveboard.spec.ts +30 -0
- package/src/embed/liveboard.ts +5 -0
- package/src/embed/search.ts +3 -1
- package/src/embed/ts-embed.spec.ts +221 -5
- package/src/embed/ts-embed.ts +129 -43
- package/src/errors.ts +1 -0
- package/src/index.ts +2 -0
- package/src/react/all-types-export.ts +1 -0
- package/src/types.ts +102 -3
- package/src/utils/processData.ts +11 -11
package/dist/tsembed.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @thoughtspot/visual-embed-sdk version 1.42.
|
|
1
|
+
/* @thoughtspot/visual-embed-sdk version 1.42.1-alpha.2 */
|
|
2
2
|
'use client';
|
|
3
3
|
function _mergeNamespaces(n, m) {
|
|
4
4
|
m.forEach(function (e) {
|
|
@@ -1999,6 +1999,21 @@ var EmbedEvent;
|
|
|
1999
1999
|
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
2000
2000
|
*/
|
|
2001
2001
|
EmbedEvent["OrgSwitched"] = "orgSwitched";
|
|
2002
|
+
/**
|
|
2003
|
+
* Emitted when the user intercepts a URL.
|
|
2004
|
+
*
|
|
2005
|
+
* Supported on all embed types.
|
|
2006
|
+
*
|
|
2007
|
+
* @example
|
|
2008
|
+
* ```js
|
|
2009
|
+
* embed.on(EmbedEvent.ApiIntercept, (payload) => {
|
|
2010
|
+
* console.log('payload', payload);
|
|
2011
|
+
* })
|
|
2012
|
+
* ```
|
|
2013
|
+
*
|
|
2014
|
+
* @version SDK: 1.42.0 | ThoughtSpot: 10.14.0.cl
|
|
2015
|
+
*/
|
|
2016
|
+
EmbedEvent["ApiIntercept"] = "ApiIntercept";
|
|
2002
2017
|
})(EmbedEvent || (EmbedEvent = {}));
|
|
2003
2018
|
/**
|
|
2004
2019
|
* Event types that can be triggered by the host application
|
|
@@ -3440,6 +3455,7 @@ var Param;
|
|
|
3440
3455
|
Param["RootMarginForLazyLoad"] = "rootMarginForLazyLoad";
|
|
3441
3456
|
Param["LiveboardXLSXCSVDownload"] = "isLiveboardXLSXCSVDownloadEnabled";
|
|
3442
3457
|
Param["isPNGInScheduledEmailsEnabled"] = "isPNGInScheduledEmailsEnabled";
|
|
3458
|
+
Param["isLinkParametersEnabled"] = "isLinkParametersEnabled";
|
|
3443
3459
|
})(Param || (Param = {}));
|
|
3444
3460
|
/**
|
|
3445
3461
|
* ThoughtSpot application pages include actions and menu commands
|
|
@@ -4865,7 +4881,29 @@ var LogLevel;
|
|
|
4865
4881
|
* @version SDK: 1.26.7 | ThoughtSpot Cloud: 9.10.0.cl
|
|
4866
4882
|
*/
|
|
4867
4883
|
LogLevel["TRACE"] = "TRACE";
|
|
4868
|
-
})(LogLevel || (LogLevel = {}));
|
|
4884
|
+
})(LogLevel || (LogLevel = {}));
|
|
4885
|
+
/**
|
|
4886
|
+
* Enum for the type of API intercepted
|
|
4887
|
+
*/
|
|
4888
|
+
var InterceptedApiType;
|
|
4889
|
+
(function (InterceptedApiType) {
|
|
4890
|
+
/**
|
|
4891
|
+
* The apis that are use to get the metadata for the embed
|
|
4892
|
+
*/
|
|
4893
|
+
InterceptedApiType["METADATA"] = "METADATA";
|
|
4894
|
+
/**
|
|
4895
|
+
* The apis that are use to get the data for the embed
|
|
4896
|
+
*/
|
|
4897
|
+
InterceptedApiType["ANSWER_DATA"] = "ANSWER_DATA";
|
|
4898
|
+
/**
|
|
4899
|
+
* This will intercept all the apis
|
|
4900
|
+
*/
|
|
4901
|
+
InterceptedApiType["ALL"] = "ALL";
|
|
4902
|
+
/**
|
|
4903
|
+
* The apis that are use to get the data for the liveboard
|
|
4904
|
+
*/
|
|
4905
|
+
InterceptedApiType["LIVEBOARD_DATA"] = "LIVEBOARD_DATA";
|
|
4906
|
+
})(InterceptedApiType || (InterceptedApiType = {}));
|
|
4869
4907
|
|
|
4870
4908
|
const logFunctions = {
|
|
4871
4909
|
[LogLevel.SILENT]: () => undefined,
|
|
@@ -7211,6 +7249,17 @@ function isEmpty(value) {
|
|
|
7211
7249
|
|
|
7212
7250
|
var isEmpty_1 = isEmpty;
|
|
7213
7251
|
|
|
7252
|
+
var UIPassthroughEvent;
|
|
7253
|
+
(function (UIPassthroughEvent) {
|
|
7254
|
+
UIPassthroughEvent["PinAnswerToLiveboard"] = "addVizToPinboard";
|
|
7255
|
+
UIPassthroughEvent["SaveAnswer"] = "saveAnswer";
|
|
7256
|
+
UIPassthroughEvent["GetDiscoverabilityStatus"] = "getDiscoverabilityStatus";
|
|
7257
|
+
UIPassthroughEvent["GetAvailableUIPassthroughs"] = "getAvailableUiPassthroughs";
|
|
7258
|
+
UIPassthroughEvent["GetAnswerConfig"] = "getAnswerPageConfig";
|
|
7259
|
+
UIPassthroughEvent["GetLiveboardConfig"] = "getPinboardPageConfig";
|
|
7260
|
+
UIPassthroughEvent["GetUnsavedAnswerTML"] = "getUnsavedAnswerTML";
|
|
7261
|
+
})(UIPassthroughEvent || (UIPassthroughEvent = {}));
|
|
7262
|
+
|
|
7214
7263
|
const ERROR_MESSAGE = {
|
|
7215
7264
|
INVALID_THOUGHTSPOT_HOST: 'Error parsing ThoughtSpot host. Please provide a valid URL.',
|
|
7216
7265
|
SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND: 'Please select a worksheet to get started',
|
|
@@ -7232,6 +7281,7 @@ const ERROR_MESSAGE = {
|
|
|
7232
7281
|
MISSING_REPORTING_OBSERVER: 'ReportingObserver not supported',
|
|
7233
7282
|
RENDER_CALLED_BEFORE_INIT: 'Looks like render was called before calling init, the render won\'t start until init is called.\nFor more info check\n1. https://developers.thoughtspot.com/docs/Function_init#_init\n2.https://developers.thoughtspot.com/docs/getting-started#initSdk',
|
|
7234
7283
|
SPOTTER_AGENT_NOT_INITIALIZED: 'SpotterAgent not initialized',
|
|
7284
|
+
OFFLINE_WARNING: 'Network not Detected. Embed is offline. Please reconnect and refresh',
|
|
7235
7285
|
};
|
|
7236
7286
|
const CUSTOM_ACTIONS_ERROR_MESSAGE = {
|
|
7237
7287
|
INVALID_ACTION_OBJECT: 'Custom Action Validation Error: Invalid action object provided',
|
|
@@ -8141,7 +8191,7 @@ class AnswerService {
|
|
|
8141
8191
|
async getTML() {
|
|
8142
8192
|
const { object } = await this.executeQuery(getAnswerTML, {});
|
|
8143
8193
|
const edoc = object[0].edoc;
|
|
8144
|
-
const YAML = await import('./index-
|
|
8194
|
+
const YAML = await import('./index-BCC3Z072.js');
|
|
8145
8195
|
const parsedDoc = YAML.parse(edoc);
|
|
8146
8196
|
return {
|
|
8147
8197
|
answer: {
|
|
@@ -17460,27 +17510,27 @@ function processAuthLogout(e, containerEl) {
|
|
|
17460
17510
|
* @param thoughtSpotHost
|
|
17461
17511
|
* @param containerEl
|
|
17462
17512
|
*/
|
|
17463
|
-
function processEventData(type,
|
|
17513
|
+
function processEventData(type, eventData, thoughtSpotHost, containerEl) {
|
|
17464
17514
|
switch (type) {
|
|
17465
17515
|
case EmbedEvent.CustomAction:
|
|
17466
|
-
return processCustomAction(
|
|
17516
|
+
return processCustomAction(eventData, thoughtSpotHost);
|
|
17467
17517
|
case EmbedEvent.AuthInit:
|
|
17468
|
-
return processAuthInit(
|
|
17518
|
+
return processAuthInit(eventData);
|
|
17469
17519
|
case EmbedEvent.NoCookieAccess:
|
|
17470
|
-
return processNoCookieAccess(
|
|
17520
|
+
return processNoCookieAccess(eventData, containerEl);
|
|
17471
17521
|
case EmbedEvent.AuthFailure:
|
|
17472
|
-
return processAuthFailure(
|
|
17522
|
+
return processAuthFailure(eventData, containerEl);
|
|
17473
17523
|
case EmbedEvent.AuthLogout:
|
|
17474
|
-
return processAuthLogout(
|
|
17524
|
+
return processAuthLogout(eventData, containerEl);
|
|
17475
17525
|
case EmbedEvent.ExitPresentMode:
|
|
17476
17526
|
return processExitPresentMode();
|
|
17477
17527
|
case EmbedEvent.CLEAR_INFO_CACHE:
|
|
17478
17528
|
return processClearInfoCache();
|
|
17479
17529
|
}
|
|
17480
|
-
return
|
|
17530
|
+
return eventData;
|
|
17481
17531
|
}
|
|
17482
17532
|
|
|
17483
|
-
var name="@thoughtspot/visual-embed-sdk";var version$1="1.42.
|
|
17533
|
+
var name="@thoughtspot/visual-embed-sdk";var version$1="1.42.1-alpha.2";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p tsconfig.build.json --incremental false; tsc -p tsconfig.build.json --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle-generator --config ./dts-config/dts-bundle-file.config.js","bundle-dts":"dts-bundle-generator --config ./dts-config/dts-bundle.config.js","bundle-dts-react":"dts-bundle-generator --config ./dts-config/dts-bundle-react.config.js","bundle-dts-react-full":"dts-bundle-generator --config ./dts-config/dts-bundle-react-full.config.js",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.build.json --theme typedoc-theme --json static/typedoc/typedoc.json --disableOutputCheck","test-sdk":"jest -c jest.config.sdk.js --runInBand",test:"npm run test-sdk",posttest:"cat ./coverage/sdk/lcov.info | npx coveralls-next","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest",dev:"vite -c vite.local.config.ts"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={classnames:"^2.3.1",eventemitter3:"^4.0.7",lodash:"^4.17.21","mixpanel-browser":"2.47.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1",yaml:"^2.5.1"};var devDependencies={"@mdx-js/mdx":"^1.6.22","@mdx-js/react":"^1.6.22","@react-icons/all-files":"^4.1.0","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^5.0.2","@size-limit/preset-big-lib":"^11.2.0","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^22.2.3","@types/lodash":"^4.17.0","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^8.28.0","@typescript-eslint/parser":"^8.28.0",ajv:"^8.17.1",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1","coveralls-next":"^5.0.0",crypto:"^1.0.1","current-git-branch":"^1.1.0","dts-bundle-generator":"^9.5.1",eslint:"^9.23.0","eslint-config-airbnb-base":"^15.0.0","eslint-config-prettier":"^10.1.1","eslint-import-resolver-typescript":"^4.2.5","eslint-plugin-comment-length":"2.2.1","eslint-plugin-import":"^2.31.0","eslint-plugin-jsdoc":"^50.6.9","eslint-plugin-prettier":"^5.2.5","eslint-plugin-react":"^7.37.5","eslint-plugin-react-hooks":"^5.2.0","fs-extra":"^10.0.0","gh-pages":"6.3.0",globals:"^16.0.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^2.0.0",jest:"^26.6.3","jest-fetch-mock":"^3.0.3",jsdom:"^17.0.0",prettier:"2.1.2",react:"^16.14.0","react-dom":"^16.14.0","react-resizable":"^1.11.0","react-resize-detector":"^6.6.0","react-test-renderer":"^17.0.2","react-use-flexsearch":"^0.1.1",rollup:"4.24.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^26.5.5","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","typescript-eslint":"^8.29.1","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^6.3.5"};var author="ThoughtSpot";var email="support@thoughtspot.com";var license="ThoughtSpot Development Tools End User License Agreement";var directories={lib:"lib"};var repository={type:"git",url:"git+https://github.com/thoughtspot/visual-embed-sdk.git"};var publishConfig={registry:"https://registry.npmjs.org"};var keywords=["thoughtspot","everywhere","embedded","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version$1,description:description,module:module,main:main,types:types,files:files,exports:exports,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.es.js",limit:"32 kB"}],scripts:scripts,peerDependencies:peerDependencies,dependencies:dependencies,devDependencies:devDependencies,author:author,email:email,license:license,directories:directories,repository:repository,publishConfig:publishConfig,keywords:keywords,bugs:bugs,homepage:homepage,globals:globals};
|
|
17484
17534
|
|
|
17485
17535
|
/**
|
|
17486
17536
|
* Reloads the ThoughtSpot iframe.
|
|
@@ -17552,16 +17602,6 @@ function processTrigger(iFrame, messageType, thoughtSpotHost, data) {
|
|
|
17552
17602
|
});
|
|
17553
17603
|
}
|
|
17554
17604
|
|
|
17555
|
-
var UIPassthroughEvent;
|
|
17556
|
-
(function (UIPassthroughEvent) {
|
|
17557
|
-
UIPassthroughEvent["PinAnswerToLiveboard"] = "addVizToPinboard";
|
|
17558
|
-
UIPassthroughEvent["SaveAnswer"] = "saveAnswer";
|
|
17559
|
-
UIPassthroughEvent["GetDiscoverabilityStatus"] = "getDiscoverabilityStatus";
|
|
17560
|
-
UIPassthroughEvent["GetAvailableUIPassthroughs"] = "getAvailableUiPassthroughs";
|
|
17561
|
-
UIPassthroughEvent["GetAnswerConfig"] = "getAnswerPageConfig";
|
|
17562
|
-
UIPassthroughEvent["GetLiveboardConfig"] = "getPinboardPageConfig";
|
|
17563
|
-
})(UIPassthroughEvent || (UIPassthroughEvent = {}));
|
|
17564
|
-
|
|
17565
17605
|
class HostEventClient {
|
|
17566
17606
|
constructor(iFrame) {
|
|
17567
17607
|
this.iFrame = iFrame;
|
|
@@ -17653,6 +17693,107 @@ class HostEventClient {
|
|
|
17653
17693
|
}
|
|
17654
17694
|
}
|
|
17655
17695
|
|
|
17696
|
+
const defaultUrls = {
|
|
17697
|
+
[InterceptedApiType.METADATA]: [
|
|
17698
|
+
'/prism/?op=CreateAnswerSession',
|
|
17699
|
+
'/prism/?op=GetV2SourceDetail',
|
|
17700
|
+
],
|
|
17701
|
+
[InterceptedApiType.ANSWER_DATA]: [
|
|
17702
|
+
'/prism/?op=GetChartWithData',
|
|
17703
|
+
'/prism/?op=GetTableWithHeadlineData',
|
|
17704
|
+
],
|
|
17705
|
+
[InterceptedApiType.LIVEBOARD_DATA]: [
|
|
17706
|
+
'/prism/?op=LoadContextBook'
|
|
17707
|
+
],
|
|
17708
|
+
};
|
|
17709
|
+
const formatInterceptUrl = (url) => {
|
|
17710
|
+
const host = getThoughtSpotHost(getEmbedConfig());
|
|
17711
|
+
if (url.startsWith('/'))
|
|
17712
|
+
return `${host}${url}`;
|
|
17713
|
+
return url;
|
|
17714
|
+
};
|
|
17715
|
+
const processInterceptUrls = (interceptUrls) => {
|
|
17716
|
+
let processedUrls = [...interceptUrls];
|
|
17717
|
+
Object.entries(defaultUrls).forEach(([apiType, apiTypeUrls]) => {
|
|
17718
|
+
if (!processedUrls.includes(apiType))
|
|
17719
|
+
return;
|
|
17720
|
+
processedUrls = processedUrls.filter(url => url !== apiType);
|
|
17721
|
+
processedUrls = [...processedUrls, ...apiTypeUrls];
|
|
17722
|
+
});
|
|
17723
|
+
return processedUrls.map(url => formatInterceptUrl(url));
|
|
17724
|
+
};
|
|
17725
|
+
const getInterceptInitData = (embedConfig, viewConfig) => {
|
|
17726
|
+
const enableApiIntercept = (embedConfig.enableApiIntercept || viewConfig.enableApiIntercept) && (viewConfig.enableApiIntercept !== false);
|
|
17727
|
+
if (!enableApiIntercept)
|
|
17728
|
+
return {
|
|
17729
|
+
enableApiIntercept: false,
|
|
17730
|
+
};
|
|
17731
|
+
const combinedUrls = [...(embedConfig.interceptUrls || []), ...(viewConfig.interceptUrls || [])];
|
|
17732
|
+
if (viewConfig.isOnBeforeGetVizDataInterceptEnabled) {
|
|
17733
|
+
combinedUrls.push(InterceptedApiType.ANSWER_DATA);
|
|
17734
|
+
}
|
|
17735
|
+
const shouldInterceptAll = combinedUrls.includes(InterceptedApiType.ALL);
|
|
17736
|
+
const interceptUrls = shouldInterceptAll ? [InterceptedApiType.ALL] : processInterceptUrls(combinedUrls);
|
|
17737
|
+
const interceptTimeout = embedConfig.interceptTimeout || viewConfig.interceptTimeout;
|
|
17738
|
+
return {
|
|
17739
|
+
interceptUrls,
|
|
17740
|
+
interceptTimeout,
|
|
17741
|
+
enableApiIntercept,
|
|
17742
|
+
};
|
|
17743
|
+
};
|
|
17744
|
+
/**
|
|
17745
|
+
*
|
|
17746
|
+
* @param fetchInit
|
|
17747
|
+
*/
|
|
17748
|
+
const parseInterceptData = (eventDataString) => {
|
|
17749
|
+
try {
|
|
17750
|
+
const { input, init } = JSON.parse(eventDataString);
|
|
17751
|
+
init.body = JSON.parse(init.body);
|
|
17752
|
+
const parsedInit = { input, init };
|
|
17753
|
+
return [parsedInit, null];
|
|
17754
|
+
}
|
|
17755
|
+
catch (error) {
|
|
17756
|
+
return [null, error];
|
|
17757
|
+
}
|
|
17758
|
+
};
|
|
17759
|
+
const handleInterceptEvent = async (params) => {
|
|
17760
|
+
var _a, _b, _c, _d, _e;
|
|
17761
|
+
const { eventData, executeEvent, viewConfig, getUnsavedAnswerTml } = params;
|
|
17762
|
+
const [interceptData, bodyParseError] = parseInterceptData(eventData.data);
|
|
17763
|
+
if (bodyParseError) {
|
|
17764
|
+
executeEvent(EmbedEvent.Error, {
|
|
17765
|
+
error: 'Error parsing api intercept body',
|
|
17766
|
+
});
|
|
17767
|
+
logger$3.error('Error parsing request body', bodyParseError);
|
|
17768
|
+
return;
|
|
17769
|
+
}
|
|
17770
|
+
const { input: requestUrl, init } = interceptData;
|
|
17771
|
+
const sessionId = (_c = (_b = (_a = init === null || init === void 0 ? void 0 : init.body) === null || _a === void 0 ? void 0 : _a.variables) === null || _b === void 0 ? void 0 : _b.session) === null || _c === void 0 ? void 0 : _c.sessionId;
|
|
17772
|
+
const vizId = (_e = (_d = init === null || init === void 0 ? void 0 : init.body) === null || _d === void 0 ? void 0 : _d.variables) === null || _e === void 0 ? void 0 : _e.contextBookId;
|
|
17773
|
+
if (defaultUrls.ANSWER_DATA.includes(requestUrl) && viewConfig.isOnBeforeGetVizDataInterceptEnabled) {
|
|
17774
|
+
const answerTml = await getUnsavedAnswerTml({ sessionId, vizId });
|
|
17775
|
+
executeEvent(EmbedEvent.OnBeforeGetVizDataIntercept, { data: { data: answerTml } });
|
|
17776
|
+
}
|
|
17777
|
+
executeEvent(EmbedEvent.ApiIntercept, interceptData);
|
|
17778
|
+
};
|
|
17779
|
+
const processLegacyInterceptResponse = (payload) => {
|
|
17780
|
+
var _a, _b, _c;
|
|
17781
|
+
const title = (_a = payload === null || payload === void 0 ? void 0 : payload.data) === null || _a === void 0 ? void 0 : _a.errorText;
|
|
17782
|
+
const desc = (_b = payload === null || payload === void 0 ? void 0 : payload.data) === null || _b === void 0 ? void 0 : _b.errorDescription;
|
|
17783
|
+
const payloadToSend = {
|
|
17784
|
+
execute: (_c = payload === null || payload === void 0 ? void 0 : payload.data) === null || _c === void 0 ? void 0 : _c.execute,
|
|
17785
|
+
errors: [
|
|
17786
|
+
{
|
|
17787
|
+
errorObj: {
|
|
17788
|
+
title,
|
|
17789
|
+
desc
|
|
17790
|
+
}
|
|
17791
|
+
}
|
|
17792
|
+
],
|
|
17793
|
+
};
|
|
17794
|
+
return { data: payloadToSend };
|
|
17795
|
+
};
|
|
17796
|
+
|
|
17656
17797
|
/**
|
|
17657
17798
|
* Copyright (c) 2022
|
|
17658
17799
|
*
|
|
@@ -17706,6 +17847,27 @@ class TsEmbed {
|
|
|
17706
17847
|
*/
|
|
17707
17848
|
this.fullscreenChangeHandler = null;
|
|
17708
17849
|
this.subscribedListeners = {};
|
|
17850
|
+
this.messageEventListener = async (event) => {
|
|
17851
|
+
const eventType = this.getEventType(event);
|
|
17852
|
+
const eventPort = this.getEventPort(event);
|
|
17853
|
+
const eventData = this.formatEventData(event, eventType);
|
|
17854
|
+
if (event.source === this.iFrame.contentWindow) {
|
|
17855
|
+
const processedEventData = await processEventData(eventType, eventData, this.thoughtSpotHost, this.isPreRendered ? this.preRenderWrapper : this.el);
|
|
17856
|
+
const executeEvent = (_eventType, data) => {
|
|
17857
|
+
this.executeCallbacks(_eventType, data, eventPort);
|
|
17858
|
+
};
|
|
17859
|
+
if (eventType === EmbedEvent.ApiIntercept && this.viewConfig.enableApiIntercept) {
|
|
17860
|
+
const getUnsavedAnswerTml = async (props) => {
|
|
17861
|
+
var _a;
|
|
17862
|
+
const response = await this.triggerUIPassThrough(UIPassthroughEvent.GetUnsavedAnswerTML, props);
|
|
17863
|
+
return (_a = response[0]) === null || _a === void 0 ? void 0 : _a.value;
|
|
17864
|
+
};
|
|
17865
|
+
handleInterceptEvent({ eventData: processedEventData, executeEvent, embedConfig: this.embedConfig, viewConfig: this.viewConfig, getUnsavedAnswerTml });
|
|
17866
|
+
return;
|
|
17867
|
+
}
|
|
17868
|
+
this.executeCallbacks(eventType, processedEventData, eventPort);
|
|
17869
|
+
}
|
|
17870
|
+
};
|
|
17709
17871
|
/**
|
|
17710
17872
|
* Send Custom style as part of payload of APP_INIT
|
|
17711
17873
|
* @param _
|
|
@@ -17790,6 +17952,18 @@ class TsEmbed {
|
|
|
17790
17952
|
this.on(EmbedEvent.AuthInit, authInitHandler, { start: false }, true);
|
|
17791
17953
|
};
|
|
17792
17954
|
this.showPreRenderByDefault = false;
|
|
17955
|
+
this.createEmbedEventResponder = (eventPort, eventType) => {
|
|
17956
|
+
const { enableApiIntercept } = getInterceptInitData(this.embedConfig, this.viewConfig);
|
|
17957
|
+
if (eventType === EmbedEvent.OnBeforeGetVizDataIntercept && enableApiIntercept) {
|
|
17958
|
+
return (payload) => {
|
|
17959
|
+
const payloadToSend = processLegacyInterceptResponse(payload);
|
|
17960
|
+
this.triggerEventOnPort(eventPort, payloadToSend);
|
|
17961
|
+
};
|
|
17962
|
+
}
|
|
17963
|
+
return (payload) => {
|
|
17964
|
+
this.triggerEventOnPort(eventPort, payload);
|
|
17965
|
+
};
|
|
17966
|
+
};
|
|
17793
17967
|
/**
|
|
17794
17968
|
* @hidden
|
|
17795
17969
|
* Internal state to track if the embed container is loaded.
|
|
@@ -17950,39 +18124,61 @@ class TsEmbed {
|
|
|
17950
18124
|
return eventData;
|
|
17951
18125
|
}
|
|
17952
18126
|
/**
|
|
17953
|
-
*
|
|
17954
|
-
*
|
|
17955
|
-
* embed instance through an identifier contained in the payload,
|
|
17956
|
-
* and executes the registered callbacks accordingly.
|
|
18127
|
+
* Subscribe to network events (online/offline) that should
|
|
18128
|
+
* work regardless of auth status
|
|
17957
18129
|
*/
|
|
17958
|
-
|
|
17959
|
-
this.
|
|
17960
|
-
const messageEventListener = (event) => {
|
|
17961
|
-
const eventType = this.getEventType(event);
|
|
17962
|
-
const eventPort = this.getEventPort(event);
|
|
17963
|
-
const eventData = this.formatEventData(event, eventType);
|
|
17964
|
-
if (event.source === this.iFrame.contentWindow) {
|
|
17965
|
-
this.executeCallbacks(eventType, processEventData(eventType, eventData, this.thoughtSpotHost, this.isPreRendered ? this.preRenderWrapper : this.el), eventPort);
|
|
17966
|
-
}
|
|
17967
|
-
};
|
|
17968
|
-
window.addEventListener('message', messageEventListener);
|
|
18130
|
+
subscribeToNetworkEvents() {
|
|
18131
|
+
this.unsubscribeToNetworkEvents();
|
|
17969
18132
|
const onlineEventListener = (e) => {
|
|
17970
18133
|
this.trigger(HostEvent.Reload);
|
|
17971
18134
|
};
|
|
17972
18135
|
window.addEventListener('online', onlineEventListener);
|
|
17973
18136
|
const offlineEventListener = (e) => {
|
|
17974
|
-
const offlineWarning =
|
|
18137
|
+
const offlineWarning = ERROR_MESSAGE.OFFLINE_WARNING;
|
|
17975
18138
|
this.executeCallbacks(EmbedEvent.Error, {
|
|
17976
18139
|
offlineWarning,
|
|
17977
18140
|
});
|
|
17978
18141
|
logger$3.warn(offlineWarning);
|
|
17979
18142
|
};
|
|
17980
18143
|
window.addEventListener('offline', offlineEventListener);
|
|
17981
|
-
this.subscribedListeners =
|
|
17982
|
-
|
|
17983
|
-
|
|
17984
|
-
|
|
17985
|
-
|
|
18144
|
+
this.subscribedListeners.online = onlineEventListener;
|
|
18145
|
+
this.subscribedListeners.offline = offlineEventListener;
|
|
18146
|
+
}
|
|
18147
|
+
/**
|
|
18148
|
+
* Subscribe to message events that depend on successful iframe setup
|
|
18149
|
+
*/
|
|
18150
|
+
subscribeToMessageEvents() {
|
|
18151
|
+
this.unsubscribeToMessageEvents();
|
|
18152
|
+
window.addEventListener('message', this.messageEventListener);
|
|
18153
|
+
this.subscribedListeners.message = this.messageEventListener;
|
|
18154
|
+
}
|
|
18155
|
+
/**
|
|
18156
|
+
* Adds event listeners for both network and message events.
|
|
18157
|
+
* This maintains backward compatibility with the existing method.
|
|
18158
|
+
* Adds a global event listener to window for "message" events.
|
|
18159
|
+
* ThoughtSpot detects if a particular event is targeted to this
|
|
18160
|
+
* embed instance through an identifier contained in the payload,
|
|
18161
|
+
* and executes the registered callbacks accordingly.
|
|
18162
|
+
*/
|
|
18163
|
+
subscribeToEvents() {
|
|
18164
|
+
this.subscribeToNetworkEvents();
|
|
18165
|
+
this.subscribeToMessageEvents();
|
|
18166
|
+
}
|
|
18167
|
+
unsubscribeToNetworkEvents() {
|
|
18168
|
+
if (this.subscribedListeners.online) {
|
|
18169
|
+
window.removeEventListener('online', this.subscribedListeners.online);
|
|
18170
|
+
delete this.subscribedListeners.online;
|
|
18171
|
+
}
|
|
18172
|
+
if (this.subscribedListeners.offline) {
|
|
18173
|
+
window.removeEventListener('offline', this.subscribedListeners.offline);
|
|
18174
|
+
delete this.subscribedListeners.offline;
|
|
18175
|
+
}
|
|
18176
|
+
}
|
|
18177
|
+
unsubscribeToMessageEvents() {
|
|
18178
|
+
if (this.subscribedListeners.message) {
|
|
18179
|
+
window.removeEventListener('message', this.subscribedListeners.message);
|
|
18180
|
+
delete this.subscribedListeners.message;
|
|
18181
|
+
}
|
|
17986
18182
|
}
|
|
17987
18183
|
unsubscribeToEvents() {
|
|
17988
18184
|
Object.keys(this.subscribedListeners).forEach((key) => {
|
|
@@ -18015,7 +18211,7 @@ class TsEmbed {
|
|
|
18015
18211
|
message: customActionsResult.errors,
|
|
18016
18212
|
});
|
|
18017
18213
|
}
|
|
18018
|
-
|
|
18214
|
+
const baseInitData = {
|
|
18019
18215
|
customisations: getCustomisations(this.embedConfig, this.viewConfig),
|
|
18020
18216
|
authToken,
|
|
18021
18217
|
runtimeFilterParams: this.viewConfig.excludeRuntimeFiltersfromURL
|
|
@@ -18033,7 +18229,9 @@ class TsEmbed {
|
|
|
18033
18229
|
customVariablesForThirdPartyTools: this.embedConfig.customVariablesForThirdPartyTools || {},
|
|
18034
18230
|
hiddenListColumns: this.viewConfig.hiddenListColumns || [],
|
|
18035
18231
|
customActions: customActionsResult.actions,
|
|
18232
|
+
...getInterceptInitData(this.embedConfig, this.viewConfig),
|
|
18036
18233
|
};
|
|
18234
|
+
return baseInitData;
|
|
18037
18235
|
}
|
|
18038
18236
|
async getAppInitData() {
|
|
18039
18237
|
return this.getDefaultAppInitData();
|
|
@@ -18283,6 +18481,8 @@ class TsEmbed {
|
|
|
18283
18481
|
type: EmbedEvent.Init,
|
|
18284
18482
|
});
|
|
18285
18483
|
uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_RENDER_START);
|
|
18484
|
+
// Always subscribe to network events, regardless of auth status
|
|
18485
|
+
this.subscribeToNetworkEvents();
|
|
18286
18486
|
return (_a = getAuthPromise()) === null || _a === void 0 ? void 0 : _a.then((isLoggedIn) => {
|
|
18287
18487
|
if (!isLoggedIn) {
|
|
18288
18488
|
this.handleInsertionIntoDOM(this.embedConfig.loginFailedMessage);
|
|
@@ -18325,7 +18525,9 @@ class TsEmbed {
|
|
|
18325
18525
|
el.remove();
|
|
18326
18526
|
});
|
|
18327
18527
|
}
|
|
18328
|
-
|
|
18528
|
+
// Subscribe to message events only after successful
|
|
18529
|
+
// auth and iframe setup
|
|
18530
|
+
this.subscribeToMessageEvents();
|
|
18329
18531
|
}).catch((error) => {
|
|
18330
18532
|
nextInQueue();
|
|
18331
18533
|
uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_RENDER_FAILED, {
|
|
@@ -18458,9 +18660,8 @@ class TsEmbed {
|
|
|
18458
18660
|
// When start status is false it trigger only end releated
|
|
18459
18661
|
// payload
|
|
18460
18662
|
|| (!callbackObj.options.start && dataStatus === embedEventStatus.END)) {
|
|
18461
|
-
|
|
18462
|
-
|
|
18463
|
-
});
|
|
18663
|
+
const responder = this.createEmbedEventResponder(eventPort, eventType);
|
|
18664
|
+
callbackObj.callback(data, responder);
|
|
18464
18665
|
}
|
|
18465
18666
|
});
|
|
18466
18667
|
}
|
|
@@ -18645,6 +18846,12 @@ class TsEmbed {
|
|
|
18645
18846
|
this.handleError('Host event type is undefined');
|
|
18646
18847
|
return null;
|
|
18647
18848
|
}
|
|
18849
|
+
// Check if iframe exists before triggering -
|
|
18850
|
+
// this prevents the error when auth fails
|
|
18851
|
+
if (!this.iFrame) {
|
|
18852
|
+
logger$3.debug(`Cannot trigger ${messageType} - iframe not available (likely due to auth failure)`);
|
|
18853
|
+
return null;
|
|
18854
|
+
}
|
|
18648
18855
|
// send an empty object, this is needed for liveboard default handlers
|
|
18649
18856
|
return this.hostEventClient.triggerHostEvent(messageType, data);
|
|
18650
18857
|
}
|
|
@@ -19164,7 +19371,7 @@ class AppEmbed extends V1Embed {
|
|
|
19164
19371
|
* embedded Liveboard or visualization.
|
|
19165
19372
|
*/
|
|
19166
19373
|
getEmbedParams() {
|
|
19167
|
-
const { tag, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideHamburger, hideObjectSearch, hideNotification, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 = true, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, hideHomepageLeftNav = false, modularHomeExperience = false, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, enable2ColumnLayout, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false, dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, discoveryExperience, coverAndFilterOptionInPDF = false, liveboardXLSXCSVDownload = false, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, } = this.viewConfig;
|
|
19374
|
+
const { tag, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideHamburger, hideObjectSearch, hideNotification, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 = true, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, hideHomepageLeftNav = false, modularHomeExperience = false, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, enable2ColumnLayout, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false, dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, discoveryExperience, coverAndFilterOptionInPDF = false, liveboardXLSXCSVDownload = false, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, isLinkParametersEnabled, } = this.viewConfig;
|
|
19168
19375
|
let params = {};
|
|
19169
19376
|
params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
|
|
19170
19377
|
params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
|
|
@@ -19217,7 +19424,8 @@ class AppEmbed extends V1Embed {
|
|
|
19217
19424
|
if (enableAskSage) {
|
|
19218
19425
|
params[Param.enableAskSage] = enableAskSage;
|
|
19219
19426
|
}
|
|
19220
|
-
|
|
19427
|
+
const { enableApiIntercept } = getInterceptInitData(this.embedConfig, this.viewConfig);
|
|
19428
|
+
if (isOnBeforeGetVizDataInterceptEnabled && !enableApiIntercept) {
|
|
19221
19429
|
params[Param.IsOnBeforeGetVizDataInterceptEnabled] = isOnBeforeGetVizDataInterceptEnabled;
|
|
19222
19430
|
}
|
|
19223
19431
|
if (homePageSearchBarMode) {
|
|
@@ -19232,6 +19440,9 @@ class AppEmbed extends V1Embed {
|
|
|
19232
19440
|
if (isPNGInScheduledEmailsEnabled !== undefined) {
|
|
19233
19441
|
params[Param.isPNGInScheduledEmailsEnabled] = isPNGInScheduledEmailsEnabled;
|
|
19234
19442
|
}
|
|
19443
|
+
if (isLinkParametersEnabled !== undefined) {
|
|
19444
|
+
params[Param.isLinkParametersEnabled] = isLinkParametersEnabled;
|
|
19445
|
+
}
|
|
19235
19446
|
params[Param.DataPanelV2Enabled] = dataPanelV2;
|
|
19236
19447
|
params[Param.HideHomepageLeftNav] = hideHomepageLeftNav;
|
|
19237
19448
|
params[Param.ModularHomeExperienceEnabled] = modularHomeExperience;
|
|
@@ -19586,7 +19797,7 @@ class LiveboardEmbed extends V1Embed {
|
|
|
19586
19797
|
getEmbedParamsObject() {
|
|
19587
19798
|
let params = {};
|
|
19588
19799
|
params = this.getBaseQueryParams(params);
|
|
19589
|
-
const { enableVizTransformations, fullHeight, defaultHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, enableAskSage, enable2ColumnLayout, dataPanelV2 = true, enableCustomColumnGroups = false, oAuthPollingInterval, isForceRedirect, dataSourceId, coverAndFilterOptionInPDF = false, liveboardXLSXCSVDownload = false, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, showSpotterLimitations, } = this.viewConfig;
|
|
19800
|
+
const { enableVizTransformations, fullHeight, defaultHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, enableAskSage, enable2ColumnLayout, dataPanelV2 = true, enableCustomColumnGroups = false, oAuthPollingInterval, isForceRedirect, dataSourceId, coverAndFilterOptionInPDF = false, liveboardXLSXCSVDownload = false, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, showSpotterLimitations, isLinkParametersEnabled, } = this.viewConfig;
|
|
19590
19801
|
const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
|
|
19591
19802
|
|| this.viewConfig.preventPinboardFilterRemoval;
|
|
19592
19803
|
if (fullHeight === true) {
|
|
@@ -19651,6 +19862,9 @@ class LiveboardEmbed extends V1Embed {
|
|
|
19651
19862
|
if (showSpotterLimitations !== undefined) {
|
|
19652
19863
|
params[Param.ShowSpotterLimitations] = showSpotterLimitations;
|
|
19653
19864
|
}
|
|
19865
|
+
if (isLinkParametersEnabled !== undefined) {
|
|
19866
|
+
params[Param.isLinkParametersEnabled] = isLinkParametersEnabled;
|
|
19867
|
+
}
|
|
19654
19868
|
params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
|
|
19655
19869
|
params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
|
|
19656
19870
|
params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;
|
|
@@ -19937,7 +20151,8 @@ class SearchEmbed extends TsEmbed {
|
|
|
19937
20151
|
if (hideSearchBar) {
|
|
19938
20152
|
queryParams[Param.HideSearchBar] = true;
|
|
19939
20153
|
}
|
|
19940
|
-
|
|
20154
|
+
const { enableApiIntercept } = getInterceptInitData(this.embedConfig, this.viewConfig);
|
|
20155
|
+
if (isOnBeforeGetVizDataInterceptEnabled && !enableApiIntercept) {
|
|
19941
20156
|
queryParams[Param.IsOnBeforeGetVizDataInterceptEnabled] = isOnBeforeGetVizDataInterceptEnabled;
|
|
19942
20157
|
}
|
|
19943
20158
|
if (!focusSearchBarOnRender) {
|
|
@@ -21331,4 +21546,4 @@ const createLiveboardWithAnswers = async (answers, name) => {
|
|
|
21331
21546
|
return result;
|
|
21332
21547
|
};
|
|
21333
21548
|
|
|
21334
|
-
export { Action, AnswerService, AppEmbed, AuthEvent, AuthFailureType, AuthStatus, AuthType, BodylessConversation, ContextMenuTriggerOptions, ConversationEmbed, CustomActionTarget, CustomActionsPosition, DataPanelCustomColumnGroupsAccordionState$1 as DataPanelCustomColumnGroupsAccordionState, DataSourceVisualMode, EmbedEvent, HomeLeftNavItem, HomePage, HomePageSearchBarMode, HomepageModule, HostEvent, ListPage, ListPageColumns, LiveboardEmbed, LogLevel, MIXPANEL_EVENT, Page, PinboardEmbed, PrefetchFeatures, PrimaryNavbarVersion, RuntimeFilterOp, SageEmbed, SearchBarEmbed, SearchEmbed, SpotterAgentEmbed, SpotterEmbed, UIPassthroughEvent, createLiveboardWithAnswers, executeTML, exportTML, getAnswerFromQuery, getEmbedConfig as getInitConfig, getSessionInfo, init, logout, prefetch, resetCachedAuthToken, tokenizedFetch, uploadMixpanelEvent };
|
|
21549
|
+
export { Action, AnswerService, AppEmbed, AuthEvent, AuthFailureType, AuthStatus, AuthType, BodylessConversation, ContextMenuTriggerOptions, ConversationEmbed, CustomActionTarget, CustomActionsPosition, DataPanelCustomColumnGroupsAccordionState$1 as DataPanelCustomColumnGroupsAccordionState, DataSourceVisualMode, EmbedEvent, HomeLeftNavItem, HomePage, HomePageSearchBarMode, HomepageModule, HostEvent, InterceptedApiType, ListPage, ListPageColumns, LiveboardEmbed, LogLevel, MIXPANEL_EVENT, Page, PinboardEmbed, PrefetchFeatures, PrimaryNavbarVersion, RuntimeFilterOp, SageEmbed, SearchBarEmbed, SearchEmbed, SpotterAgentEmbed, SpotterEmbed, UIPassthroughEvent, createLiveboardWithAnswers, executeTML, exportTML, getAnswerFromQuery, getEmbedConfig as getInitConfig, getSessionInfo, init, logout, prefetch, resetCachedAuthToken, tokenizedFetch, uploadMixpanelEvent };
|