@thoughtspot/visual-embed-sdk 1.39.2-alpha.1 → 1.39.2-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 +1 -1
- package/cjs/src/config.spec.js +9 -0
- package/cjs/src/config.spec.js.map +1 -1
- package/cjs/src/embed/app.d.ts +75 -15
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +68 -9
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/app.spec.js +356 -4
- package/cjs/src/embed/app.spec.js.map +1 -1
- package/cjs/src/embed/bodyless-conversation.d.ts +19 -7
- package/cjs/src/embed/bodyless-conversation.d.ts.map +1 -1
- package/cjs/src/embed/bodyless-conversation.js +24 -4
- package/cjs/src/embed/bodyless-conversation.js.map +1 -1
- package/cjs/src/embed/bodyless-conversation.spec.js +8 -190
- package/cjs/src/embed/bodyless-conversation.spec.js.map +1 -1
- package/cjs/src/embed/conversation.d.ts +2 -60
- package/cjs/src/embed/conversation.d.ts.map +1 -1
- package/cjs/src/embed/conversation.js +1 -9
- package/cjs/src/embed/conversation.js.map +1 -1
- package/cjs/src/embed/conversation.spec.js +0 -102
- package/cjs/src/embed/conversation.spec.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts +56 -0
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +46 -0
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/liveboard.spec.js +203 -0
- package/cjs/src/embed/liveboard.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 +3 -2
- package/cjs/src/react/all-types-export.js.map +1 -1
- package/cjs/src/react/index.d.ts +71 -20
- package/cjs/src/react/index.d.ts.map +1 -1
- package/cjs/src/react/index.js +79 -42
- package/cjs/src/react/index.js.map +1 -1
- package/cjs/src/react/index.spec.js +436 -100
- package/cjs/src/react/index.spec.js.map +1 -1
- package/cjs/src/types.d.ts +46 -4
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +28 -0
- package/cjs/src/types.js.map +1 -1
- package/cjs/src/utils/graphql/nlsService/conversation-service.d.ts.map +1 -1
- package/cjs/src/utils/graphql/nlsService/conversation-service.js +2 -0
- package/cjs/src/utils/graphql/nlsService/conversation-service.js.map +1 -1
- package/cjs/src/utils/processTrigger.js +2 -1
- package/cjs/src/utils/processTrigger.js.map +1 -1
- package/cjs/src/utils.d.ts +6 -0
- package/cjs/src/utils.d.ts.map +1 -1
- package/cjs/src/utils.js +23 -3
- package/cjs/src/utils.js.map +1 -1
- package/cjs/src/utils.spec.js +237 -1
- package/cjs/src/utils.spec.js.map +1 -1
- package/dist/index-e3Uw3YFO.js +7371 -0
- package/dist/src/embed/app.d.ts +75 -15
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/bodyless-conversation.d.ts +19 -7
- package/dist/src/embed/bodyless-conversation.d.ts.map +1 -1
- package/dist/src/embed/conversation.d.ts +2 -60
- package/dist/src/embed/conversation.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts +56 -0
- package/dist/src/embed/liveboard.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/react/index.d.ts +71 -20
- package/dist/src/react/index.d.ts.map +1 -1
- package/dist/src/types.d.ts +46 -4
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/graphql/nlsService/conversation-service.d.ts.map +1 -1
- package/dist/src/utils.d.ts +6 -0
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +276 -74
- package/dist/tsembed-react.js +276 -72
- package/dist/tsembed.es.js +194 -27
- package/dist/tsembed.js +192 -25
- package/dist/visual-embed-sdk-react-full.d.ts +246 -105
- package/dist/visual-embed-sdk-react.d.ts +246 -105
- package/dist/visual-embed-sdk.d.ts +176 -86
- package/lib/package.json +1 -1
- package/lib/src/config.spec.js +9 -0
- package/lib/src/config.spec.js.map +1 -1
- package/lib/src/embed/app.d.ts +75 -15
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +68 -9
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/app.spec.js +357 -5
- package/lib/src/embed/app.spec.js.map +1 -1
- package/lib/src/embed/bodyless-conversation.d.ts +19 -7
- package/lib/src/embed/bodyless-conversation.d.ts.map +1 -1
- package/lib/src/embed/bodyless-conversation.js +23 -4
- package/lib/src/embed/bodyless-conversation.js.map +1 -1
- package/lib/src/embed/bodyless-conversation.spec.js +9 -191
- package/lib/src/embed/bodyless-conversation.spec.js.map +1 -1
- package/lib/src/embed/conversation.d.ts +2 -60
- package/lib/src/embed/conversation.d.ts.map +1 -1
- package/lib/src/embed/conversation.js +2 -10
- package/lib/src/embed/conversation.js.map +1 -1
- package/lib/src/embed/conversation.spec.js +2 -104
- package/lib/src/embed/conversation.spec.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts +56 -0
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +47 -1
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +203 -0
- package/lib/src/embed/liveboard.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/react/index.d.ts +71 -20
- package/lib/src/react/index.d.ts.map +1 -1
- package/lib/src/react/index.js +79 -43
- package/lib/src/react/index.js.map +1 -1
- package/lib/src/react/index.spec.js +439 -103
- package/lib/src/react/index.spec.js.map +1 -1
- package/lib/src/types.d.ts +46 -4
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +28 -0
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils/graphql/nlsService/conversation-service.d.ts.map +1 -1
- package/lib/src/utils/graphql/nlsService/conversation-service.js +2 -0
- package/lib/src/utils/graphql/nlsService/conversation-service.js.map +1 -1
- package/lib/src/utils/processTrigger.js +2 -1
- package/lib/src/utils/processTrigger.js.map +1 -1
- package/lib/src/utils.d.ts +6 -0
- package/lib/src/utils.d.ts.map +1 -1
- package/lib/src/utils.js +21 -2
- package/lib/src/utils.js.map +1 -1
- package/lib/src/utils.spec.js +238 -2
- package/lib/src/utils.spec.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +178 -88
- package/package.json +1 -1
- package/src/config.spec.ts +11 -0
- package/src/embed/app.spec.ts +444 -4
- package/src/embed/app.ts +131 -27
- package/src/embed/bodyless-conversation.spec.ts +9 -203
- package/src/embed/bodyless-conversation.ts +24 -10
- package/src/embed/conversation.spec.ts +5 -131
- package/src/embed/conversation.ts +10 -82
- package/src/embed/liveboard.spec.ts +251 -1
- package/src/embed/liveboard.ts +97 -5
- package/src/errors.ts +1 -0
- package/src/index.ts +2 -0
- package/src/react/all-types-export.ts +2 -1
- package/src/react/index.spec.tsx +556 -157
- package/src/react/index.tsx +117 -51
- package/src/types.ts +42 -0
- package/src/utils/graphql/nlsService/conversation-service.ts +2 -0
- package/src/utils/processTrigger.ts +1 -1
- package/src/utils.spec.ts +279 -2
- package/src/utils.ts +28 -2
package/dist/tsembed.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @thoughtspot/visual-embed-sdk version 1.39.2-alpha.
|
|
1
|
+
/* @thoughtspot/visual-embed-sdk version 1.39.2-alpha.2 */
|
|
2
2
|
'use client';
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
@@ -284,7 +284,6 @@
|
|
|
284
284
|
function removeTypename(obj) {
|
|
285
285
|
if (!obj || typeof obj !== 'object')
|
|
286
286
|
return obj;
|
|
287
|
-
// eslint-disable-next-line no-restricted-syntax
|
|
288
287
|
for (const key in obj) {
|
|
289
288
|
if (key === '__typename') {
|
|
290
289
|
delete obj[key];
|
|
@@ -313,7 +312,11 @@
|
|
|
313
312
|
if (!(element === null || element === void 0 ? void 0 : element.style))
|
|
314
313
|
return;
|
|
315
314
|
Object.keys(styleProperties).forEach((styleProperty) => {
|
|
316
|
-
|
|
315
|
+
const styleKey = styleProperty;
|
|
316
|
+
const value = styleProperties[styleKey];
|
|
317
|
+
if (value !== undefined) {
|
|
318
|
+
element.style[styleKey] = value.toString();
|
|
319
|
+
}
|
|
317
320
|
});
|
|
318
321
|
};
|
|
319
322
|
/**
|
|
@@ -441,6 +444,22 @@
|
|
|
441
444
|
}
|
|
442
445
|
}
|
|
443
446
|
logger$3.warn('Exit fullscreen API is not supported by this browser.');
|
|
447
|
+
};
|
|
448
|
+
const calculateVisibleElementData = (element) => {
|
|
449
|
+
const rect = element.getBoundingClientRect();
|
|
450
|
+
const windowHeight = window.innerHeight;
|
|
451
|
+
const windowWidth = window.innerWidth;
|
|
452
|
+
const frameRelativeTop = Math.max(rect.top, 0);
|
|
453
|
+
const frameRelativeLeft = Math.max(rect.left, 0);
|
|
454
|
+
const frameRelativeBottom = Math.min(windowHeight, rect.bottom);
|
|
455
|
+
const frameRelativeRight = Math.min(windowWidth, rect.right);
|
|
456
|
+
const data = {
|
|
457
|
+
top: Math.max(0, rect.top * -1),
|
|
458
|
+
height: Math.max(0, frameRelativeBottom - frameRelativeTop),
|
|
459
|
+
left: Math.max(0, rect.left * -1),
|
|
460
|
+
width: Math.max(0, frameRelativeRight - frameRelativeLeft),
|
|
461
|
+
};
|
|
462
|
+
return data;
|
|
444
463
|
};
|
|
445
464
|
|
|
446
465
|
/**
|
|
@@ -659,6 +678,12 @@
|
|
|
659
678
|
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
660
679
|
*/
|
|
661
680
|
HomeLeftNavItem["Spotter"] = "spotter";
|
|
681
|
+
/**
|
|
682
|
+
* Favorites option in the insights left navigation,
|
|
683
|
+
* available when new navigation V3 is enabled.
|
|
684
|
+
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
685
|
+
*/
|
|
686
|
+
HomeLeftNavItem["Favorites"] = "favorites";
|
|
662
687
|
})(exports.HomeLeftNavItem || (exports.HomeLeftNavItem = {}));
|
|
663
688
|
/**
|
|
664
689
|
* A map of the supported runtime filter operations
|
|
@@ -1845,6 +1870,12 @@
|
|
|
1845
1870
|
* @version SDK : 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
1846
1871
|
*/
|
|
1847
1872
|
EmbedEvent["ExitPresentMode"] = "exitPresentMode";
|
|
1873
|
+
/**
|
|
1874
|
+
* Emitted when a user requests the full height lazy load data.
|
|
1875
|
+
* @version SDK : 1.39.0 | ThoughtSpot : 10.10.0.cl
|
|
1876
|
+
* @hidden
|
|
1877
|
+
*/
|
|
1878
|
+
EmbedEvent["RequestVisibleEmbedCoordinates"] = "requestVisibleEmbedCoordinates";
|
|
1848
1879
|
})(exports.EmbedEvent || (exports.EmbedEvent = {}));
|
|
1849
1880
|
/**
|
|
1850
1881
|
* Event types that can be triggered by the host application
|
|
@@ -2929,6 +2960,19 @@
|
|
|
2929
2960
|
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
2930
2961
|
*/
|
|
2931
2962
|
HostEvent["ExitPresentMode"] = "exitPresentMode";
|
|
2963
|
+
/**
|
|
2964
|
+
* Triggers the full height lazy load data.
|
|
2965
|
+
* @example
|
|
2966
|
+
* ```js
|
|
2967
|
+
* liveboardEmbed.on(EmbedEvent.RequestVisibleEmbedCoordinates, (payload) => {
|
|
2968
|
+
* console.log(payload);
|
|
2969
|
+
* });
|
|
2970
|
+
* ```
|
|
2971
|
+
* @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
|
|
2972
|
+
*
|
|
2973
|
+
* @hidden
|
|
2974
|
+
*/
|
|
2975
|
+
HostEvent["VisibleEmbedCoordinates"] = "visibleEmbedCoordinates";
|
|
2932
2976
|
})(exports.HostEvent || (exports.HostEvent = {}));
|
|
2933
2977
|
/**
|
|
2934
2978
|
* The different visual modes that the data sources panel within
|
|
@@ -3034,6 +3078,7 @@
|
|
|
3034
3078
|
Param["Query"] = "query";
|
|
3035
3079
|
Param["HideHomepageLeftNav"] = "hideHomepageLeftNav";
|
|
3036
3080
|
Param["ModularHomeExperienceEnabled"] = "modularHomeExperience";
|
|
3081
|
+
Param["ListPageVersion"] = "listpageVersion";
|
|
3037
3082
|
Param["PendoTrackingKey"] = "additionalPendoKey";
|
|
3038
3083
|
Param["LiveboardHeaderSticky"] = "isLiveboardHeaderSticky";
|
|
3039
3084
|
Param["IsProductTour"] = "isProductTour";
|
|
@@ -3072,6 +3117,8 @@
|
|
|
3072
3117
|
Param["PrimaryAction"] = "primaryAction";
|
|
3073
3118
|
Param["isSpotterAgentEmbed"] = "isSpotterAgentEmbed";
|
|
3074
3119
|
Param["IsLiveboardStylingAndGroupingEnabled"] = "isLiveboardStylingAndGroupingEnabled";
|
|
3120
|
+
Param["IsLazyLoadingForEmbedEnabled"] = "isLazyLoadingForEmbedEnabled";
|
|
3121
|
+
Param["RootMarginForLazyLoad"] = "rootMarginForLazyLoad";
|
|
3075
3122
|
})(Param || (Param = {}));
|
|
3076
3123
|
/**
|
|
3077
3124
|
* ThoughtSpot application pages include actions and menu commands
|
|
@@ -6776,6 +6823,7 @@
|
|
|
6776
6823
|
CSP_FRAME_HOST_VIOLATION_LOG_MESSAGE: 'Please set up CSP correctly for the application to start working. For more information, see https://developers.thoughtspot.com/docs/security-settings#csp-viz-embed-hosts. \n If the issue persists, refer to https://developers.thoughtspot.com/docs/security-settings#csp-viz-embed-hosts',
|
|
6777
6824
|
MISSING_REPORTING_OBSERVER: 'ReportingObserver not supported',
|
|
6778
6825
|
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',
|
|
6826
|
+
SPOTTER_AGENT_NOT_INITIALIZED: 'SpotterAgent not initialized',
|
|
6779
6827
|
};
|
|
6780
6828
|
|
|
6781
6829
|
const EndPoints = {
|
|
@@ -15566,7 +15614,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
15566
15614
|
return e;
|
|
15567
15615
|
}
|
|
15568
15616
|
|
|
15569
|
-
var name="@thoughtspot/visual-embed-sdk";var version$1="1.39.2-alpha.
|
|
15617
|
+
var name="@thoughtspot/visual-embed-sdk";var version$1="1.39.2-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$1={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p . --incremental false; tsc -p . --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts","bundle-dts":"dts-bundle --name ../../dist/visual-embed-sdk --main lib/src/index.d.ts --outputAsModuleFolder=true","bundle-dts-react":"dts-bundle --name ../../../dist/visual-embed-sdk-react --main lib/src/react/index.d.ts --outputAsModuleFolder=true","bundle-dts-react-full":"dts-bundle --name ../../../dist/visual-embed-sdk-react-full --main lib/src/react/all-types-export.d.ts --outputAsModuleFolder=true",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.json --theme typedoc-theme --json static/typedoc/typedoc.json --disableOutputCheck","test-sdk":"jest -c jest.config.sdk.js --runInBand",test:"npm run test-sdk",posttest:"cat ./coverage/sdk/lcov.info | coveralls","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest",dev:"vite -c vite.local.config.ts"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={classnames:"^2.3.1",eventemitter3:"^4.0.7",lodash:"^4.17.21","mixpanel-browser":"2.47.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1",yaml:"^2.5.1"};var devDependencies={"@mdx-js/mdx":"^1.6.22","@mdx-js/react":"^1.6.22","@react-icons/all-files":"^4.1.0","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^5.0.2","@size-limit/preset-big-lib":"^8.2.6","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^22.2.3","@types/lodash":"^4.17.0","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^8.28.0","@typescript-eslint/parser":"^8.28.0",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1",coveralls:"^3.1.0",crypto:"^1.0.1","current-git-branch":"^1.1.0","dts-bundle":"^0.7.3",eslint:"^9.23.0","eslint-config-airbnb-base":"^15.0.0","eslint-config-prettier":"^10.1.1","eslint-import-resolver-typescript":"^4.2.5","eslint-plugin-comment-length":"2.2.1","eslint-plugin-import":"^2.31.0","eslint-plugin-jsdoc":"^50.6.9","eslint-plugin-prettier":"^5.2.5","eslint-plugin-react":"^7.37.5","eslint-plugin-react-hooks":"^5.2.0","fs-extra":"^10.0.0","gh-pages":"6.3.0",globals:"^16.0.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^1.1.1",jest:"^26.6.3","jest-fetch-mock":"^3.0.3",jsdom:"^17.0.0",prettier:"2.1.2",react:"^16.14.0","react-dom":"^16.14.0","react-resizable":"^1.11.0","react-resize-detector":"^6.6.0","react-test-renderer":"^17.0.2","react-use-flexsearch":"^0.1.1",rollup:"4.24.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^26.5.5","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","typescript-eslint":"^8.29.1","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^6.3.5"};var author="ThoughtSpot";var email="support@thoughtspot.com";var license="ThoughtSpot Development Tools End User License Agreement";var directories={lib:"lib"};var repository={type:"git",url:"git+https://github.com/thoughtspot/visual-embed-sdk.git"};var publishConfig={registry:"https://registry.npmjs.org"};var keywords=["thoughtspot","everywhere","embedded","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version$1,description:description,module:module,main:main,types:types,files:files,exports:exports$1,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.es.js",limit:"31 kB"}],scripts:scripts,peerDependencies:peerDependencies,dependencies:dependencies,devDependencies:devDependencies,author:author,email:email,license:license,directories:directories,repository:repository,publishConfig:publishConfig,keywords:keywords,bugs:bugs,homepage:homepage,globals:globals};
|
|
15570
15618
|
|
|
15571
15619
|
/**
|
|
15572
15620
|
* Reloads the ThoughtSpot iframe.
|
|
@@ -15589,7 +15637,8 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
15589
15637
|
* @param channel
|
|
15590
15638
|
*/
|
|
15591
15639
|
function postIframeMessage(iFrame, message, thoughtSpotHost, channel) {
|
|
15592
|
-
|
|
15640
|
+
var _a;
|
|
15641
|
+
return (_a = iFrame.contentWindow) === null || _a === void 0 ? void 0 : _a.postMessage(message, thoughtSpotHost, [channel === null || channel === void 0 ? void 0 : channel.port2]);
|
|
15593
15642
|
}
|
|
15594
15643
|
const TRIGGER_TIMEOUT = 30000;
|
|
15595
15644
|
/**
|
|
@@ -16974,7 +17023,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
16974
17023
|
/**
|
|
16975
17024
|
* Pages within the ThoughtSpot app that can be embedded.
|
|
16976
17025
|
*/
|
|
16977
|
-
// eslint-disable-next-line no-shadow
|
|
16978
17026
|
exports.Page = void 0;
|
|
16979
17027
|
(function (Page) {
|
|
16980
17028
|
/**
|
|
@@ -17060,16 +17108,46 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
17060
17108
|
*/
|
|
17061
17109
|
HomePage["Modular"] = "v2";
|
|
17062
17110
|
})(exports.HomePage || (exports.HomePage = {}));
|
|
17111
|
+
/**
|
|
17112
|
+
* Define the version of the list page
|
|
17113
|
+
* @version SDK: 1.40.0 | ThoughtSpot: 10.12.0.cl
|
|
17114
|
+
*/
|
|
17115
|
+
exports.ListPage = void 0;
|
|
17116
|
+
(function (ListPage) {
|
|
17117
|
+
/**
|
|
17118
|
+
* List (v2) is the traditional List Experience.
|
|
17119
|
+
* It serves as the foundational version of the list page.
|
|
17120
|
+
*/
|
|
17121
|
+
ListPage["List"] = "v2";
|
|
17122
|
+
/**
|
|
17123
|
+
* ListWithUXChanges (v3) introduces the new updated list page with UX changes.
|
|
17124
|
+
*/
|
|
17125
|
+
ListPage["ListWithUXChanges"] = "v3";
|
|
17126
|
+
})(exports.ListPage || (exports.ListPage = {}));
|
|
17063
17127
|
/**
|
|
17064
17128
|
* Embeds full ThoughtSpot experience in a host application.
|
|
17065
17129
|
* @group Embed components
|
|
17066
17130
|
*/
|
|
17067
17131
|
class AppEmbed extends V1Embed {
|
|
17068
|
-
// eslint-disable-next-line no-useless-constructor
|
|
17069
17132
|
constructor(domSelector, viewConfig) {
|
|
17070
17133
|
viewConfig.embedComponentType = 'AppEmbed';
|
|
17071
17134
|
super(domSelector, viewConfig);
|
|
17072
17135
|
this.defaultHeight = '100%';
|
|
17136
|
+
this.sendFullHeightLazyLoadData = () => {
|
|
17137
|
+
const data = calculateVisibleElementData(this.iFrame);
|
|
17138
|
+
this.trigger(exports.HostEvent.VisibleEmbedCoordinates, data);
|
|
17139
|
+
};
|
|
17140
|
+
/**
|
|
17141
|
+
* This is a handler for the RequestVisibleEmbedCoordinates event.
|
|
17142
|
+
* It is used to send the visible coordinates data to the host application.
|
|
17143
|
+
* @param data The event payload
|
|
17144
|
+
* @param responder The responder function
|
|
17145
|
+
*/
|
|
17146
|
+
this.requestVisibleEmbedCoordinatesHandler = (data, responder) => {
|
|
17147
|
+
logger$3.info('Sending RequestVisibleEmbedCoordinates', data);
|
|
17148
|
+
const visibleCoordinatesData = calculateVisibleElementData(this.iFrame);
|
|
17149
|
+
responder({ type: exports.EmbedEvent.RequestVisibleEmbedCoordinates, data: visibleCoordinatesData });
|
|
17150
|
+
};
|
|
17073
17151
|
/**
|
|
17074
17152
|
* Set the iframe height as per the computed height received
|
|
17075
17153
|
* from the ThoughtSpot app.
|
|
@@ -17078,6 +17156,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
17078
17156
|
this.updateIFrameHeight = (data) => {
|
|
17079
17157
|
var _a;
|
|
17080
17158
|
this.setIFrameHeight(Math.max(data.data, (_a = this.iFrame) === null || _a === void 0 ? void 0 : _a.scrollHeight));
|
|
17159
|
+
this.sendFullHeightLazyLoadData();
|
|
17081
17160
|
};
|
|
17082
17161
|
this.embedIframeCenter = (data, responder) => {
|
|
17083
17162
|
const obj = this.getIframeCenter();
|
|
@@ -17107,6 +17186,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
17107
17186
|
this.on(exports.EmbedEvent.RouteChange, this.setIframeHeightForNonEmbedLiveboard);
|
|
17108
17187
|
this.on(exports.EmbedEvent.EmbedHeight, this.updateIFrameHeight);
|
|
17109
17188
|
this.on(exports.EmbedEvent.EmbedIframeCenter, this.embedIframeCenter);
|
|
17189
|
+
this.on(exports.EmbedEvent.RequestVisibleEmbedCoordinates, this.requestVisibleEmbedCoordinatesHandler);
|
|
17110
17190
|
}
|
|
17111
17191
|
}
|
|
17112
17192
|
/**
|
|
@@ -17114,9 +17194,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
17114
17194
|
* embedded Liveboard or visualization.
|
|
17115
17195
|
*/
|
|
17116
17196
|
getEmbedParams() {
|
|
17117
|
-
const { tag, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideHamburger, hideObjectSearch, hideNotification, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 = false, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, hideHomepageLeftNav = false, modularHomeExperience = false, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, enable2ColumnLayout, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false,
|
|
17118
|
-
/* eslint-disable-next-line max-len */
|
|
17119
|
-
dataPanelCustomGroupsAccordionInitialState = exports.DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, discoveryExperience, coverAndFilterOptionInPDF = false, isLiveboardStylingAndGroupingEnabled, } = this.viewConfig;
|
|
17197
|
+
const { tag, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideHamburger, hideObjectSearch, hideNotification, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 = false, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, hideHomepageLeftNav = false, modularHomeExperience = false, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, enable2ColumnLayout, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false, dataPanelCustomGroupsAccordionInitialState = exports.DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, discoveryExperience, coverAndFilterOptionInPDF = false, isLiveboardStylingAndGroupingEnabled, } = this.viewConfig;
|
|
17120
17198
|
let params = {};
|
|
17121
17199
|
params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
|
|
17122
17200
|
params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
|
|
@@ -17145,6 +17223,10 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
17145
17223
|
}
|
|
17146
17224
|
if (fullHeight === true) {
|
|
17147
17225
|
params[Param.fullHeight] = true;
|
|
17226
|
+
if (this.viewConfig.lazyLoadingForFullHeight) {
|
|
17227
|
+
params[Param.IsLazyLoadingForEmbedEnabled] = true;
|
|
17228
|
+
params[Param.RootMarginForLazyLoad] = this.viewConfig.lazyLoadingMargin;
|
|
17229
|
+
}
|
|
17148
17230
|
}
|
|
17149
17231
|
if (tag) {
|
|
17150
17232
|
params[Param.Tag] = tag;
|
|
@@ -17165,7 +17247,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
17165
17247
|
params[Param.enableAskSage] = enableAskSage;
|
|
17166
17248
|
}
|
|
17167
17249
|
if (isOnBeforeGetVizDataInterceptEnabled) {
|
|
17168
|
-
/* eslint-disable-next-line max-len */
|
|
17169
17250
|
params[Param.IsOnBeforeGetVizDataInterceptEnabled] = isOnBeforeGetVizDataInterceptEnabled;
|
|
17170
17251
|
}
|
|
17171
17252
|
if (homePageSearchBarMode) {
|
|
@@ -17186,11 +17267,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
17186
17267
|
=== exports.DataPanelCustomColumnGroupsAccordionState.COLLAPSE_ALL
|
|
17187
17268
|
|| dataPanelCustomGroupsAccordionInitialState
|
|
17188
17269
|
=== exports.DataPanelCustomColumnGroupsAccordionState.EXPAND_FIRST) {
|
|
17189
|
-
/* eslint-disable-next-line max-len */
|
|
17190
17270
|
params[Param.DataPanelCustomGroupsAccordionInitialState] = dataPanelCustomGroupsAccordionInitialState;
|
|
17191
17271
|
}
|
|
17192
17272
|
else {
|
|
17193
|
-
/* eslint-disable-next-line max-len */
|
|
17194
17273
|
params[Param.DataPanelCustomGroupsAccordionInitialState] = exports.DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL;
|
|
17195
17274
|
}
|
|
17196
17275
|
if (discoveryExperience) {
|
|
@@ -17203,6 +17282,10 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
17203
17282
|
if (discoveryExperience.homePage === exports.HomePage.Modular) {
|
|
17204
17283
|
params[Param.ModularHomeExperienceEnabled] = true;
|
|
17205
17284
|
}
|
|
17285
|
+
// listPageVersion v3 will enable the new list page
|
|
17286
|
+
if (discoveryExperience.listPageVersion === exports.ListPage.ListWithUXChanges) {
|
|
17287
|
+
params[Param.ListPageVersion] = discoveryExperience.listPageVersion;
|
|
17288
|
+
}
|
|
17206
17289
|
}
|
|
17207
17290
|
const queryParams = getQueryParamString(params, true);
|
|
17208
17291
|
return queryParams;
|
|
@@ -17290,6 +17373,30 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
17290
17373
|
this.iFrame.src = `${iframeSrc.split(currentPath)[0]}${currentPath}/${path.replace(/^\/?#?\//, '')}`;
|
|
17291
17374
|
}
|
|
17292
17375
|
}
|
|
17376
|
+
/**
|
|
17377
|
+
* Destroys the ThoughtSpot embed, and remove any nodes from the DOM.
|
|
17378
|
+
* @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
|
|
17379
|
+
*/
|
|
17380
|
+
destroy() {
|
|
17381
|
+
super.destroy();
|
|
17382
|
+
this.unregisterLazyLoadEvents();
|
|
17383
|
+
}
|
|
17384
|
+
postRender() {
|
|
17385
|
+
this.registerLazyLoadEvents();
|
|
17386
|
+
}
|
|
17387
|
+
registerLazyLoadEvents() {
|
|
17388
|
+
if (this.viewConfig.fullHeight && this.viewConfig.lazyLoadingForFullHeight) {
|
|
17389
|
+
// TODO: Use passive: true, install modernizr to check for passive
|
|
17390
|
+
window.addEventListener('resize', this.sendFullHeightLazyLoadData);
|
|
17391
|
+
window.addEventListener('scroll', this.sendFullHeightLazyLoadData);
|
|
17392
|
+
}
|
|
17393
|
+
}
|
|
17394
|
+
unregisterLazyLoadEvents() {
|
|
17395
|
+
if (this.viewConfig.fullHeight && this.viewConfig.lazyLoadingForFullHeight) {
|
|
17396
|
+
window.removeEventListener('resize', this.sendFullHeightLazyLoadData);
|
|
17397
|
+
window.removeEventListener('scroll', this.sendFullHeightLazyLoadData);
|
|
17398
|
+
}
|
|
17399
|
+
}
|
|
17293
17400
|
/**
|
|
17294
17401
|
* Renders the embedded application pages in the ThoughtSpot app.
|
|
17295
17402
|
* @param renderOptions An object containing the page ID
|
|
@@ -17299,6 +17406,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
17299
17406
|
await super.render();
|
|
17300
17407
|
const src = this.getIFrameSrc();
|
|
17301
17408
|
await this.renderV1Embed(src);
|
|
17409
|
+
this.postRender();
|
|
17302
17410
|
return this;
|
|
17303
17411
|
}
|
|
17304
17412
|
}
|
|
@@ -17403,6 +17511,21 @@ query GetEurekaVizSnapshots(
|
|
|
17403
17511
|
viewConfig.embedComponentType = 'LiveboardEmbed';
|
|
17404
17512
|
super(domSelector, viewConfig);
|
|
17405
17513
|
this.defaultHeight = 500;
|
|
17514
|
+
this.sendFullHeightLazyLoadData = () => {
|
|
17515
|
+
const data = calculateVisibleElementData(this.iFrame);
|
|
17516
|
+
this.trigger(exports.HostEvent.VisibleEmbedCoordinates, data);
|
|
17517
|
+
};
|
|
17518
|
+
/**
|
|
17519
|
+
* This is a handler for the RequestVisibleEmbedCoordinates event.
|
|
17520
|
+
* It is used to send the visible coordinates data to the host application.
|
|
17521
|
+
* @param data The event payload
|
|
17522
|
+
* @param responder The responder function
|
|
17523
|
+
*/
|
|
17524
|
+
this.requestVisibleEmbedCoordinatesHandler = (data, responder) => {
|
|
17525
|
+
logger$3.info('Sending RequestVisibleEmbedCoordinates', data);
|
|
17526
|
+
const visibleCoordinatesData = calculateVisibleElementData(this.iFrame);
|
|
17527
|
+
responder({ type: exports.EmbedEvent.RequestVisibleEmbedCoordinates, data: visibleCoordinatesData });
|
|
17528
|
+
};
|
|
17406
17529
|
/**
|
|
17407
17530
|
* Set the iframe height as per the computed height received
|
|
17408
17531
|
* from the ThoughtSpot app.
|
|
@@ -17410,6 +17533,7 @@ query GetEurekaVizSnapshots(
|
|
|
17410
17533
|
*/
|
|
17411
17534
|
this.updateIFrameHeight = (data) => {
|
|
17412
17535
|
this.setIFrameHeight(Math.max(data.data, this.defaultHeight));
|
|
17536
|
+
this.sendFullHeightLazyLoadData();
|
|
17413
17537
|
};
|
|
17414
17538
|
this.embedIframeCenter = (data, responder) => {
|
|
17415
17539
|
const obj = this.getIframeCenter();
|
|
@@ -17443,6 +17567,7 @@ query GetEurekaVizSnapshots(
|
|
|
17443
17567
|
this.on(exports.EmbedEvent.RouteChange, this.setIframeHeightForNonEmbedLiveboard);
|
|
17444
17568
|
this.on(exports.EmbedEvent.EmbedHeight, this.updateIFrameHeight);
|
|
17445
17569
|
this.on(exports.EmbedEvent.EmbedIframeCenter, this.embedIframeCenter);
|
|
17570
|
+
this.on(exports.EmbedEvent.RequestVisibleEmbedCoordinates, this.requestVisibleEmbedCoordinatesHandler);
|
|
17446
17571
|
}
|
|
17447
17572
|
}
|
|
17448
17573
|
/**
|
|
@@ -17457,6 +17582,10 @@ query GetEurekaVizSnapshots(
|
|
|
17457
17582
|
|| this.viewConfig.preventPinboardFilterRemoval;
|
|
17458
17583
|
if (fullHeight === true) {
|
|
17459
17584
|
params[Param.fullHeight] = true;
|
|
17585
|
+
if (this.viewConfig.lazyLoadingForFullHeight) {
|
|
17586
|
+
params[Param.IsLazyLoadingForEmbedEnabled] = true;
|
|
17587
|
+
params[Param.RootMarginForLazyLoad] = this.viewConfig.lazyLoadingMargin;
|
|
17588
|
+
}
|
|
17460
17589
|
}
|
|
17461
17590
|
if (defaultHeight) {
|
|
17462
17591
|
this.defaultHeight = defaultHeight;
|
|
@@ -17612,6 +17741,30 @@ query GetEurekaVizSnapshots(
|
|
|
17612
17741
|
}
|
|
17613
17742
|
return super.trigger(messageType, dataWithVizId);
|
|
17614
17743
|
}
|
|
17744
|
+
/**
|
|
17745
|
+
* Destroys the ThoughtSpot embed, and remove any nodes from the DOM.
|
|
17746
|
+
* @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
|
|
17747
|
+
*/
|
|
17748
|
+
destroy() {
|
|
17749
|
+
super.destroy();
|
|
17750
|
+
this.unregisterLazyLoadEvents();
|
|
17751
|
+
}
|
|
17752
|
+
postRender() {
|
|
17753
|
+
this.registerLazyLoadEvents();
|
|
17754
|
+
}
|
|
17755
|
+
registerLazyLoadEvents() {
|
|
17756
|
+
if (this.viewConfig.fullHeight && this.viewConfig.lazyLoadingForFullHeight) {
|
|
17757
|
+
// TODO: Use passive: true, install modernizr to check for passive
|
|
17758
|
+
window.addEventListener('resize', this.sendFullHeightLazyLoadData);
|
|
17759
|
+
window.addEventListener('scroll', this.sendFullHeightLazyLoadData);
|
|
17760
|
+
}
|
|
17761
|
+
}
|
|
17762
|
+
unregisterLazyLoadEvents() {
|
|
17763
|
+
if (this.viewConfig.fullHeight && this.viewConfig.lazyLoadingForFullHeight) {
|
|
17764
|
+
window.removeEventListener('resize', this.sendFullHeightLazyLoadData);
|
|
17765
|
+
window.removeEventListener('scroll', this.sendFullHeightLazyLoadData);
|
|
17766
|
+
}
|
|
17767
|
+
}
|
|
17615
17768
|
/**
|
|
17616
17769
|
* Render an embedded ThoughtSpot Liveboard or visualization
|
|
17617
17770
|
* @param renderOptions An object specifying the Liveboard ID,
|
|
@@ -17622,6 +17775,7 @@ query GetEurekaVizSnapshots(
|
|
|
17622
17775
|
const src = this.getIFrameSrc();
|
|
17623
17776
|
await this.renderV1Embed(src);
|
|
17624
17777
|
this.showPreviewLoader();
|
|
17778
|
+
this.postRender();
|
|
17625
17779
|
return this;
|
|
17626
17780
|
}
|
|
17627
17781
|
navigateToLiveboard(liveboardId, vizId, activeTabId) {
|
|
@@ -18273,6 +18427,8 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
18273
18427
|
});
|
|
18274
18428
|
const data = responses[0].data;
|
|
18275
18429
|
return {
|
|
18430
|
+
convId: this.conversationId,
|
|
18431
|
+
messageId: responses[0].msgId,
|
|
18276
18432
|
data: data.asstRespData.nlsAnsData.sageQuerySuggestions[0],
|
|
18277
18433
|
error: null,
|
|
18278
18434
|
};
|
|
@@ -18355,9 +18511,6 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
18355
18511
|
return { error };
|
|
18356
18512
|
}
|
|
18357
18513
|
const container = document.createElement('div');
|
|
18358
|
-
if (this.viewConfig.containerClassName) {
|
|
18359
|
-
container.className = this.viewConfig.containerClassName;
|
|
18360
|
-
}
|
|
18361
18514
|
const embed = new ConversationMessage(container, {
|
|
18362
18515
|
...this.viewConfig,
|
|
18363
18516
|
sessionId: data.sessionId,
|
|
@@ -18368,6 +18521,28 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
18368
18521
|
await embed.render();
|
|
18369
18522
|
return { container, viz: embed };
|
|
18370
18523
|
}
|
|
18524
|
+
/**
|
|
18525
|
+
* Send a message to the conversation service and return only the data.
|
|
18526
|
+
* @param userMessage - The message to send to the conversation service.
|
|
18527
|
+
* @returns The data from the conversation service.
|
|
18528
|
+
*/
|
|
18529
|
+
async sendMessageData(userMessage) {
|
|
18530
|
+
try {
|
|
18531
|
+
const { data, error } = await this.conversationService.sendMessage(userMessage);
|
|
18532
|
+
if (error) {
|
|
18533
|
+
return { error };
|
|
18534
|
+
}
|
|
18535
|
+
return { data: {
|
|
18536
|
+
sessionId: data.sessionId,
|
|
18537
|
+
genNo: data.genNo,
|
|
18538
|
+
acSessionId: data.stateKey.transactionId,
|
|
18539
|
+
acGenNo: data.stateKey.generationNumber,
|
|
18540
|
+
} };
|
|
18541
|
+
}
|
|
18542
|
+
catch (error) {
|
|
18543
|
+
return { error: error };
|
|
18544
|
+
}
|
|
18545
|
+
}
|
|
18371
18546
|
}
|
|
18372
18547
|
/**
|
|
18373
18548
|
* Create a conversation embed, which can be integrated inside
|
|
@@ -18440,7 +18615,7 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
18440
18615
|
this.viewConfig = viewConfig;
|
|
18441
18616
|
}
|
|
18442
18617
|
getIframeSrc() {
|
|
18443
|
-
const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions,
|
|
18618
|
+
const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, } = this.viewConfig;
|
|
18444
18619
|
const path = 'insights/conv-assist';
|
|
18445
18620
|
if (!worksheetId) {
|
|
18446
18621
|
this.handleError(ERROR_MESSAGE.SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND);
|
|
@@ -18467,14 +18642,6 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
18467
18642
|
if (queryParamsString) {
|
|
18468
18643
|
query = `?${queryParamsString}`;
|
|
18469
18644
|
}
|
|
18470
|
-
const filterQuery = getFilterQuery(runtimeFilters || []);
|
|
18471
|
-
if (filterQuery && !excludeRuntimeFiltersfromURL) {
|
|
18472
|
-
query += `&${filterQuery}`;
|
|
18473
|
-
}
|
|
18474
|
-
const parameterQuery = getRuntimeParameters(runtimeParameters || []);
|
|
18475
|
-
if (parameterQuery && !excludeRuntimeParametersfromURL) {
|
|
18476
|
-
query += `&${parameterQuery}`;
|
|
18477
|
-
}
|
|
18478
18645
|
const tsPostHashParams = this.getThoughtSpotPostUrlParams({
|
|
18479
18646
|
worksheet: worksheetId,
|
|
18480
18647
|
query: (searchOptions === null || searchOptions === void 0 ? void 0 : searchOptions.searchQuery) || '',
|