@thoughtspot/visual-embed-sdk 1.38.0 → 1.39.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 +1 -1
- package/cjs/src/embed/app.d.ts +96 -156
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +7 -4
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/app.spec.js +10 -0
- package/cjs/src/embed/app.spec.js.map +1 -1
- package/cjs/src/embed/bodyless-conversation.d.ts +4 -4
- package/cjs/src/embed/bodyless-conversation.d.ts.map +1 -1
- package/cjs/src/embed/bodyless-conversation.js +1 -1
- package/cjs/src/embed/bodyless-conversation.js.map +1 -1
- package/cjs/src/embed/conversation.d.ts +22 -11
- package/cjs/src/embed/conversation.d.ts.map +1 -1
- package/cjs/src/embed/conversation.js +1 -1
- package/cjs/src/embed/conversation.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts +110 -167
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +25 -11
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/liveboard.spec.js +11 -0
- package/cjs/src/embed/liveboard.spec.js.map +1 -1
- package/cjs/src/embed/sage.d.ts +17 -2
- package/cjs/src/embed/sage.d.ts.map +1 -1
- package/cjs/src/embed/sage.js +2 -0
- package/cjs/src/embed/sage.js.map +1 -1
- package/cjs/src/embed/search-bar.d.ts +16 -6
- package/cjs/src/embed/search-bar.d.ts.map +1 -1
- package/cjs/src/embed/search-bar.js.map +1 -1
- package/cjs/src/embed/search.d.ts +46 -14
- package/cjs/src/embed/search.d.ts.map +1 -1
- package/cjs/src/embed/search.js.map +1 -1
- package/cjs/src/embed/ts-embed.d.ts +19 -2
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +49 -0
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/embed/ts-embed.spec.js +45 -4
- package/cjs/src/embed/ts-embed.spec.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/react/index.d.ts +1 -1
- package/cjs/src/react/index.d.ts.map +1 -1
- package/cjs/src/react/index.js +1 -1
- package/cjs/src/react/util.d.ts +7 -4
- package/cjs/src/react/util.d.ts.map +1 -1
- package/cjs/src/react/util.js.map +1 -1
- package/cjs/src/types.d.ts +482 -251
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +31 -14
- package/cjs/src/types.js.map +1 -1
- package/cjs/src/utils/graphql/answerService/answerService.d.ts +2 -1
- package/cjs/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
- package/cjs/src/utils/graphql/answerService/answerService.js +2 -1
- package/cjs/src/utils/graphql/answerService/answerService.js.map +1 -1
- package/cjs/src/utils/processData.d.ts.map +1 -1
- package/cjs/src/utils/processData.js +15 -0
- package/cjs/src/utils/processData.js.map +1 -1
- package/cjs/src/utils/processData.spec.js +15 -0
- package/cjs/src/utils/processData.spec.js.map +1 -1
- package/cjs/src/utils/processTrigger.d.ts.map +1 -1
- package/cjs/src/utils/processTrigger.js +14 -0
- package/cjs/src/utils/processTrigger.js.map +1 -1
- package/cjs/src/utils/processTrigger.spec.js +54 -0
- package/cjs/src/utils/processTrigger.spec.js.map +1 -1
- package/cjs/src/utils.d.ts +11 -2
- package/cjs/src/utils.d.ts.map +1 -1
- package/cjs/src/utils.js +70 -1
- package/cjs/src/utils.js.map +1 -1
- package/cjs/src/utils.spec.js +85 -0
- package/cjs/src/utils.spec.js.map +1 -1
- package/dist/{index-BIcnpmMY.js → index-sSREbWM-.js} +1 -1
- package/dist/src/embed/app.d.ts +96 -156
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/bodyless-conversation.d.ts +4 -4
- package/dist/src/embed/bodyless-conversation.d.ts.map +1 -1
- package/dist/src/embed/conversation.d.ts +22 -11
- package/dist/src/embed/conversation.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts +110 -167
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/embed/sage.d.ts +17 -2
- package/dist/src/embed/sage.d.ts.map +1 -1
- package/dist/src/embed/search-bar.d.ts +16 -6
- package/dist/src/embed/search-bar.d.ts.map +1 -1
- package/dist/src/embed/search.d.ts +46 -14
- package/dist/src/embed/search.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.d.ts +19 -2
- package/dist/src/embed/ts-embed.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 +1 -1
- package/dist/src/react/index.d.ts.map +1 -1
- package/dist/src/react/util.d.ts +7 -4
- package/dist/src/react/util.d.ts.map +1 -1
- package/dist/src/types.d.ts +482 -251
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/graphql/answerService/answerService.d.ts +2 -1
- package/dist/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
- package/dist/src/utils/processData.d.ts.map +1 -1
- package/dist/src/utils/processTrigger.d.ts.map +1 -1
- package/dist/src/utils.d.ts +11 -2
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +3498 -3322
- package/dist/tsembed-react.js +3497 -3321
- package/dist/tsembed.es.js +213 -37
- package/dist/tsembed.js +216 -40
- package/dist/visual-embed-sdk-react-full.d.ts +845 -655
- package/dist/visual-embed-sdk-react.d.ts +845 -655
- package/dist/visual-embed-sdk.d.ts +827 -640
- package/lib/package.json +1 -1
- package/lib/src/embed/app.d.ts +96 -156
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +7 -4
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/app.spec.js +10 -0
- package/lib/src/embed/app.spec.js.map +1 -1
- package/lib/src/embed/bodyless-conversation.d.ts +4 -4
- package/lib/src/embed/bodyless-conversation.d.ts.map +1 -1
- package/lib/src/embed/bodyless-conversation.js +1 -1
- package/lib/src/embed/bodyless-conversation.js.map +1 -1
- package/lib/src/embed/conversation.d.ts +22 -11
- package/lib/src/embed/conversation.d.ts.map +1 -1
- package/lib/src/embed/conversation.js +1 -1
- package/lib/src/embed/conversation.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts +110 -167
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +25 -11
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +11 -0
- package/lib/src/embed/liveboard.spec.js.map +1 -1
- package/lib/src/embed/sage.d.ts +17 -2
- package/lib/src/embed/sage.d.ts.map +1 -1
- package/lib/src/embed/sage.js +2 -0
- package/lib/src/embed/sage.js.map +1 -1
- package/lib/src/embed/search-bar.d.ts +16 -6
- package/lib/src/embed/search-bar.d.ts.map +1 -1
- package/lib/src/embed/search-bar.js.map +1 -1
- package/lib/src/embed/search.d.ts +46 -14
- package/lib/src/embed/search.d.ts.map +1 -1
- package/lib/src/embed/search.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts +19 -2
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +49 -0
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/embed/ts-embed.spec.js +45 -4
- package/lib/src/embed/ts-embed.spec.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 +1 -1
- package/lib/src/react/index.d.ts.map +1 -1
- package/lib/src/react/index.js +1 -1
- package/lib/src/react/util.d.ts +7 -4
- package/lib/src/react/util.d.ts.map +1 -1
- package/lib/src/react/util.js.map +1 -1
- package/lib/src/types.d.ts +482 -251
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +31 -14
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils/graphql/answerService/answerService.d.ts +2 -1
- package/lib/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
- package/lib/src/utils/graphql/answerService/answerService.js +2 -1
- package/lib/src/utils/graphql/answerService/answerService.js.map +1 -1
- package/lib/src/utils/processData.d.ts.map +1 -1
- package/lib/src/utils/processData.js +15 -0
- package/lib/src/utils/processData.js.map +1 -1
- package/lib/src/utils/processData.spec.js +15 -0
- package/lib/src/utils/processData.spec.js.map +1 -1
- package/lib/src/utils/processTrigger.d.ts.map +1 -1
- package/lib/src/utils/processTrigger.js +14 -0
- package/lib/src/utils/processTrigger.js.map +1 -1
- package/lib/src/utils/processTrigger.spec.js +54 -0
- package/lib/src/utils/processTrigger.spec.js.map +1 -1
- package/lib/src/utils.d.ts +11 -2
- package/lib/src/utils.d.ts.map +1 -1
- package/lib/src/utils.js +67 -0
- package/lib/src/utils.js.map +1 -1
- package/lib/src/utils.spec.js +86 -1
- package/lib/src/utils.spec.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +836 -649
- package/package.json +1 -1
- package/src/embed/app.spec.ts +14 -0
- package/src/embed/app.ts +98 -153
- package/src/embed/bodyless-conversation.ts +4 -4
- package/src/embed/conversation.ts +23 -12
- package/src/embed/liveboard.spec.ts +15 -0
- package/src/embed/liveboard.ts +142 -182
- package/src/embed/sage.ts +17 -5
- package/src/embed/search-bar.tsx +16 -17
- package/src/embed/search.ts +47 -21
- package/src/embed/ts-embed.spec.ts +52 -4
- package/src/embed/ts-embed.ts +61 -6
- package/src/index.ts +2 -0
- package/src/react/all-types-export.ts +1 -0
- package/src/react/index.tsx +3 -3
- package/src/react/util.ts +6 -4
- package/src/types.ts +488 -253
- package/src/utils/graphql/answerService/answerService.ts +5 -4
- package/src/utils/processData.spec.ts +28 -0
- package/src/utils/processData.ts +17 -0
- package/src/utils/processTrigger.spec.ts +90 -0
- package/src/utils/processTrigger.ts +16 -1
- package/src/utils.spec.ts +113 -0
- package/src/utils.ts +78 -2
package/dist/tsembed.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @thoughtspot/visual-embed-sdk version 1.
|
|
1
|
+
/* @thoughtspot/visual-embed-sdk version 1.39.0 */
|
|
2
2
|
'use client';
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
@@ -375,7 +375,73 @@
|
|
|
375
375
|
* @param key - The key whose value needs to be retrieved.
|
|
376
376
|
* @returns The stored value or `undefined` if the key is not found.
|
|
377
377
|
*/
|
|
378
|
-
const getValueFromWindow = (key) => { var _a; return (_a = window === null || window === void 0 ? void 0 : window[sdkWindowKey]) === null || _a === void 0 ? void 0 : _a[key]; };
|
|
378
|
+
const getValueFromWindow = (key) => { var _a; return (_a = window === null || window === void 0 ? void 0 : window[sdkWindowKey]) === null || _a === void 0 ? void 0 : _a[key]; };
|
|
379
|
+
/**
|
|
380
|
+
* Check if the document is currently in fullscreen mode
|
|
381
|
+
*/
|
|
382
|
+
const isInFullscreen = () => {
|
|
383
|
+
return !!(document.fullscreenElement ||
|
|
384
|
+
document.webkitFullscreenElement ||
|
|
385
|
+
document.mozFullScreenElement ||
|
|
386
|
+
document.msFullscreenElement);
|
|
387
|
+
};
|
|
388
|
+
/**
|
|
389
|
+
* Handle Present HostEvent by entering fullscreen mode
|
|
390
|
+
* @param iframe The iframe element to make fullscreen
|
|
391
|
+
*/
|
|
392
|
+
const handlePresentEvent = async (iframe) => {
|
|
393
|
+
if (isInFullscreen()) {
|
|
394
|
+
return; // Already in fullscreen
|
|
395
|
+
}
|
|
396
|
+
// Browser-specific methods to enter fullscreen mode
|
|
397
|
+
const fullscreenMethods = [
|
|
398
|
+
'requestFullscreen',
|
|
399
|
+
'webkitRequestFullscreen',
|
|
400
|
+
'mozRequestFullScreen',
|
|
401
|
+
'msRequestFullscreen' // IE/Edge
|
|
402
|
+
];
|
|
403
|
+
for (const method of fullscreenMethods) {
|
|
404
|
+
if (typeof iframe[method] === 'function') {
|
|
405
|
+
try {
|
|
406
|
+
const result = iframe[method]();
|
|
407
|
+
await Promise.resolve(result);
|
|
408
|
+
return;
|
|
409
|
+
}
|
|
410
|
+
catch (error) {
|
|
411
|
+
logger$3.warn(`Failed to enter fullscreen using ${method}:`, error);
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
logger$3.error('Fullscreen API is not supported by this browser.');
|
|
416
|
+
};
|
|
417
|
+
/**
|
|
418
|
+
* Handle ExitPresentMode EmbedEvent by exiting fullscreen mode
|
|
419
|
+
*/
|
|
420
|
+
const handleExitPresentMode = async () => {
|
|
421
|
+
if (!isInFullscreen()) {
|
|
422
|
+
return; // Not in fullscreen
|
|
423
|
+
}
|
|
424
|
+
const exitFullscreenMethods = [
|
|
425
|
+
'exitFullscreen',
|
|
426
|
+
'webkitExitFullscreen',
|
|
427
|
+
'mozCancelFullScreen',
|
|
428
|
+
'msExitFullscreen' // IE/Edge
|
|
429
|
+
];
|
|
430
|
+
// Try each method until one works
|
|
431
|
+
for (const method of exitFullscreenMethods) {
|
|
432
|
+
if (typeof document[method] === 'function') {
|
|
433
|
+
try {
|
|
434
|
+
const result = document[method]();
|
|
435
|
+
await Promise.resolve(result);
|
|
436
|
+
return;
|
|
437
|
+
}
|
|
438
|
+
catch (error) {
|
|
439
|
+
logger$3.warn(`Failed to exit fullscreen using ${method}:`, error);
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
logger$3.warn('Exit fullscreen API is not supported by this browser.');
|
|
444
|
+
};
|
|
379
445
|
|
|
380
446
|
/**
|
|
381
447
|
* Copyright (c) 2023
|
|
@@ -458,7 +524,7 @@
|
|
|
458
524
|
* // ...
|
|
459
525
|
* authType: AuthType.SAMLRedirect,
|
|
460
526
|
* authTriggerText: 'Login with SAML',
|
|
461
|
-
* authTriggerContainer: '#
|
|
527
|
+
* authTriggerContainer: '#tsEmbed',
|
|
462
528
|
* inPopup: true,
|
|
463
529
|
* });
|
|
464
530
|
* ```
|
|
@@ -584,13 +650,13 @@
|
|
|
584
650
|
/**
|
|
585
651
|
* Create new options in the insights left navigation,
|
|
586
652
|
* available when new navigation V3 is enabled.
|
|
587
|
-
* @version SDK: 1.
|
|
653
|
+
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
588
654
|
*/
|
|
589
655
|
HomeLeftNavItem["Create"] = "create";
|
|
590
656
|
/**
|
|
591
657
|
* Spotter option in the insights left navigation,
|
|
592
658
|
* available when new navigation V3 is enabled.
|
|
593
|
-
* @version SDK: 1.
|
|
659
|
+
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
594
660
|
*/
|
|
595
661
|
HomeLeftNavItem["Spotter"] = "spotter";
|
|
596
662
|
})(exports.HomeLeftNavItem || (exports.HomeLeftNavItem = {}));
|
|
@@ -913,7 +979,7 @@
|
|
|
913
979
|
* @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
|
|
914
980
|
* @example
|
|
915
981
|
* ```js
|
|
916
|
-
*
|
|
982
|
+
* LiveboardEmbed.on(EmbedEvent.VizPointDoubleClick, payload => {
|
|
917
983
|
* console.log('VizPointDoubleClick', payload);
|
|
918
984
|
* })
|
|
919
985
|
* ```
|
|
@@ -1773,6 +1839,12 @@
|
|
|
1773
1839
|
* @version SDK : 1.37.0 | ThoughtSpot : 10.8.0.cl
|
|
1774
1840
|
*/
|
|
1775
1841
|
EmbedEvent["CreateModel"] = "createModel";
|
|
1842
|
+
/**
|
|
1843
|
+
* @hidden
|
|
1844
|
+
* Emitted when a user exits present mode.
|
|
1845
|
+
* @version SDK : 1.40.0 | ThoughtSpot : 10.11.0.cl
|
|
1846
|
+
*/
|
|
1847
|
+
EmbedEvent["ExitPresentMode"] = "exitPresentMode";
|
|
1776
1848
|
})(exports.EmbedEvent || (exports.EmbedEvent = {}));
|
|
1777
1849
|
/**
|
|
1778
1850
|
* Event types that can be triggered by the host application
|
|
@@ -2847,6 +2919,16 @@
|
|
|
2847
2919
|
* @version SDK: 1.37.0 | ThoughtSpot: 10.8.0.cl
|
|
2848
2920
|
*/
|
|
2849
2921
|
HostEvent["TransformTableVizData"] = "TransformTableVizData";
|
|
2922
|
+
/**
|
|
2923
|
+
* @hidden
|
|
2924
|
+
* Trigger exit from presentation mode when user exits fullscreen.
|
|
2925
|
+
* This is automatically triggered by the SDK when fullscreen mode is exited.
|
|
2926
|
+
* ```js
|
|
2927
|
+
* liveboardEmbed.trigger(HostEvent.ExitPresentMode);
|
|
2928
|
+
*```
|
|
2929
|
+
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
2930
|
+
*/
|
|
2931
|
+
HostEvent["ExitPresentMode"] = "exitPresentMode";
|
|
2850
2932
|
})(exports.HostEvent || (exports.HostEvent = {}));
|
|
2851
2933
|
/**
|
|
2852
2934
|
* The different visual modes that the data sources panel within
|
|
@@ -2989,6 +3071,7 @@
|
|
|
2989
3071
|
Param["CoverAndFilterOptionInPDF"] = "coverAndFilterOptionInPDF";
|
|
2990
3072
|
Param["PrimaryAction"] = "primaryAction";
|
|
2991
3073
|
Param["isSpotterAgentEmbed"] = "isSpotterAgentEmbed";
|
|
3074
|
+
Param["IsLiveboardStylingAndGroupingEnabled"] = "isLiveboardStylingAndGroupingEnabled";
|
|
2992
3075
|
})(Param || (Param = {}));
|
|
2993
3076
|
/**
|
|
2994
3077
|
* ThoughtSpot application pages include actions and menu commands
|
|
@@ -2999,8 +3082,8 @@
|
|
|
2999
3082
|
* or `hiddenActions` array.
|
|
3000
3083
|
* @example
|
|
3001
3084
|
* ```js
|
|
3002
|
-
* const embed = new LiveboardEmbed('#
|
|
3003
|
-
* ... //
|
|
3085
|
+
* const embed = new LiveboardEmbed('#tsEmbed', {
|
|
3086
|
+
* ... //other embed view config
|
|
3004
3087
|
* visibleActions: [Action.Save, Action.Edit, Action.Present, ActionAction.Explore],
|
|
3005
3088
|
* disabledActions: [Action.Download],
|
|
3006
3089
|
* //hiddenActions: [], // Set either this or visibleActions
|
|
@@ -3008,8 +3091,8 @@
|
|
|
3008
3091
|
* ```
|
|
3009
3092
|
* @example
|
|
3010
3093
|
* ```js
|
|
3011
|
-
* const embed = new LiveboardEmbed('#
|
|
3012
|
-
* ... //
|
|
3094
|
+
* const embed = new LiveboardEmbed('#tsEmbed', {
|
|
3095
|
+
* ... //other embed view config
|
|
3013
3096
|
* //visibleActions: [],
|
|
3014
3097
|
* disabledActions: [Action.Download],
|
|
3015
3098
|
* hiddenActions: [Action.Edit, ActionAction.Explore],
|
|
@@ -4242,7 +4325,7 @@
|
|
|
4242
4325
|
* @example
|
|
4243
4326
|
* ```js
|
|
4244
4327
|
* init({
|
|
4245
|
-
* ... //
|
|
4328
|
+
* ... //other embed view config,
|
|
4246
4329
|
* logLevel: LogLevel.SILENT,
|
|
4247
4330
|
* })
|
|
4248
4331
|
* ```
|
|
@@ -4254,7 +4337,7 @@
|
|
|
4254
4337
|
* @example
|
|
4255
4338
|
* ```js
|
|
4256
4339
|
* init({
|
|
4257
|
-
* ... //
|
|
4340
|
+
* ... //other embed view config,
|
|
4258
4341
|
* logLevel: LogLevel.ERROR,
|
|
4259
4342
|
* })
|
|
4260
4343
|
* ```
|
|
@@ -4266,7 +4349,7 @@
|
|
|
4266
4349
|
* @example
|
|
4267
4350
|
* ```js
|
|
4268
4351
|
* init({
|
|
4269
|
-
* ... //
|
|
4352
|
+
* ... //other embed view config,
|
|
4270
4353
|
* logLevel: LogLevel.WARN,
|
|
4271
4354
|
* })
|
|
4272
4355
|
* ```
|
|
@@ -4279,7 +4362,7 @@
|
|
|
4279
4362
|
* @example
|
|
4280
4363
|
* ```js
|
|
4281
4364
|
* init({
|
|
4282
|
-
* ... //
|
|
4365
|
+
* ... //other embed view config,
|
|
4283
4366
|
* logLevel: LogLevel.INFO,
|
|
4284
4367
|
* })
|
|
4285
4368
|
* ```
|
|
@@ -4292,7 +4375,7 @@
|
|
|
4292
4375
|
* @example
|
|
4293
4376
|
* ```js
|
|
4294
4377
|
* init({
|
|
4295
|
-
* ... //
|
|
4378
|
+
* ... //other embed view config,
|
|
4296
4379
|
* logLevel: LogLevel.DEBUG,
|
|
4297
4380
|
* })
|
|
4298
4381
|
* ```
|
|
@@ -4304,7 +4387,7 @@
|
|
|
4304
4387
|
* @example
|
|
4305
4388
|
* ```js
|
|
4306
4389
|
* init({
|
|
4307
|
-
* ... //
|
|
4390
|
+
* ... //other embed view config,
|
|
4308
4391
|
* logLevel: LogLevel.TRACE,
|
|
4309
4392
|
* })
|
|
4310
4393
|
* ```
|
|
@@ -7233,12 +7316,13 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
7233
7316
|
* directly from your application.
|
|
7234
7317
|
*
|
|
7235
7318
|
* You can use this service to:
|
|
7319
|
+
*
|
|
7236
7320
|
* - Add or remove columns from Answers (`addColumns`, `removeColumns`, `addColumnsByName`)
|
|
7237
7321
|
* - Apply filters to Answers (`addFilter`)
|
|
7238
7322
|
* - Get data from Answers in different formats (JSON, CSV, PNG) (`fetchData`, `fetchCSVBlob`, `fetchPNGBlob`)
|
|
7239
7323
|
* - Get data for specific points in visualizations (`getUnderlyingDataForPoint`)
|
|
7240
7324
|
* - Run custom queries (`executeQuery`)
|
|
7241
|
-
* - Add visualizations to
|
|
7325
|
+
* - Add visualizations to Liveboards (`addDisplayedVizToLiveboard`)
|
|
7242
7326
|
*
|
|
7243
7327
|
* @example
|
|
7244
7328
|
* ```js
|
|
@@ -15298,6 +15382,18 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
15298
15382
|
});
|
|
15299
15383
|
};
|
|
15300
15384
|
|
|
15385
|
+
/**
|
|
15386
|
+
* Process the ExitPresentMode event and handle default fullscreen exit
|
|
15387
|
+
* @param e - The event data
|
|
15388
|
+
*/
|
|
15389
|
+
function processExitPresentMode(e) {
|
|
15390
|
+
var _a;
|
|
15391
|
+
const embedConfig = getEmbedConfig();
|
|
15392
|
+
const disableFullscreenPresentation = (_a = embedConfig === null || embedConfig === void 0 ? void 0 : embedConfig.disableFullscreenPresentation) !== null && _a !== void 0 ? _a : true;
|
|
15393
|
+
if (!disableFullscreenPresentation) {
|
|
15394
|
+
handleExitPresentMode();
|
|
15395
|
+
}
|
|
15396
|
+
}
|
|
15301
15397
|
/**
|
|
15302
15398
|
*
|
|
15303
15399
|
* @param e
|
|
@@ -15402,11 +15498,13 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
15402
15498
|
return processAuthFailure(e, containerEl);
|
|
15403
15499
|
case exports.EmbedEvent.AuthLogout:
|
|
15404
15500
|
return processAuthLogout(e, containerEl);
|
|
15501
|
+
case exports.EmbedEvent.ExitPresentMode:
|
|
15502
|
+
return processExitPresentMode();
|
|
15405
15503
|
}
|
|
15406
15504
|
return e;
|
|
15407
15505
|
}
|
|
15408
15506
|
|
|
15409
|
-
var name="@thoughtspot/visual-embed-sdk";var version$1="1.
|
|
15507
|
+
var name="@thoughtspot/visual-embed-sdk";var version$1="1.39.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/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};
|
|
15410
15508
|
|
|
15411
15509
|
/**
|
|
15412
15510
|
* Reloads the ThoughtSpot iframe.
|
|
@@ -15441,10 +15539,21 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
15441
15539
|
*/
|
|
15442
15540
|
function processTrigger(iFrame, messageType, thoughtSpotHost, data) {
|
|
15443
15541
|
return new Promise((res, rej) => {
|
|
15542
|
+
var _a;
|
|
15444
15543
|
if (messageType === exports.HostEvent.Reload) {
|
|
15445
15544
|
reload(iFrame);
|
|
15446
15545
|
return res(null);
|
|
15447
15546
|
}
|
|
15547
|
+
if (messageType === exports.HostEvent.Present) {
|
|
15548
|
+
const embedConfig = getEmbedConfig();
|
|
15549
|
+
const disableFullscreenPresentation = (_a = embedConfig === null || embedConfig === void 0 ? void 0 : embedConfig.disableFullscreenPresentation) !== null && _a !== void 0 ? _a : true;
|
|
15550
|
+
if (!disableFullscreenPresentation) {
|
|
15551
|
+
handlePresentEvent(iFrame);
|
|
15552
|
+
}
|
|
15553
|
+
else {
|
|
15554
|
+
logger$3.warn('Fullscreen presentation mode is disabled. Set disableFullscreenPresentation: false to enable this feature.');
|
|
15555
|
+
}
|
|
15556
|
+
}
|
|
15448
15557
|
const channel = new MessageChannel();
|
|
15449
15558
|
channel.port1.onmessage = ({ data: responseData }) => {
|
|
15450
15559
|
var _a;
|
|
@@ -15615,6 +15724,10 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
15615
15724
|
*/
|
|
15616
15725
|
this.shouldEncodeUrlQueryParams = false;
|
|
15617
15726
|
this.defaultHiddenActions = [exports.Action.ReportError];
|
|
15727
|
+
/**
|
|
15728
|
+
* Handler for fullscreen change events
|
|
15729
|
+
*/
|
|
15730
|
+
this.fullscreenChangeHandler = null;
|
|
15618
15731
|
this.subscribedListeners = {};
|
|
15619
15732
|
/**
|
|
15620
15733
|
* Send Custom style as part of payload of APP_INIT
|
|
@@ -16152,6 +16265,8 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
16152
16265
|
}
|
|
16153
16266
|
});
|
|
16154
16267
|
}
|
|
16268
|
+
// Setup fullscreen change handler after iframe is loaded and ready
|
|
16269
|
+
this.setupFullscreenChangeHandler();
|
|
16155
16270
|
});
|
|
16156
16271
|
this.iFrame.addEventListener('error', () => {
|
|
16157
16272
|
nextInQueue();
|
|
@@ -16527,6 +16642,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
16527
16642
|
destroy() {
|
|
16528
16643
|
var _a;
|
|
16529
16644
|
try {
|
|
16645
|
+
this.removeFullscreenChangeHandler();
|
|
16530
16646
|
(_a = this.insertedDomEl) === null || _a === void 0 ? void 0 : _a.parentNode.removeChild(this.insertedDomEl);
|
|
16531
16647
|
this.unsubscribeToEvents();
|
|
16532
16648
|
}
|
|
@@ -16594,6 +16710,10 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
16594
16710
|
this.beforePrerenderVisible();
|
|
16595
16711
|
removeStyleProperties(this.preRenderWrapper, ['z-index', 'opacity', 'pointer-events']);
|
|
16596
16712
|
this.subscribeToEvents();
|
|
16713
|
+
// Setup fullscreen change handler for prerendered components
|
|
16714
|
+
if (this.iFrame) {
|
|
16715
|
+
this.setupFullscreenChangeHandler();
|
|
16716
|
+
}
|
|
16597
16717
|
return this;
|
|
16598
16718
|
}
|
|
16599
16719
|
/**
|
|
@@ -16662,6 +16782,44 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
16662
16782
|
const { session } = await this.trigger(exports.HostEvent.GetAnswerSession, vizId ? { vizId } : {});
|
|
16663
16783
|
return new AnswerService(session, null, this.embedConfig.thoughtSpotHost);
|
|
16664
16784
|
}
|
|
16785
|
+
/**
|
|
16786
|
+
* Set up fullscreen change detection to automatically trigger ExitPresentMode
|
|
16787
|
+
* when user exits fullscreen mode
|
|
16788
|
+
*/
|
|
16789
|
+
setupFullscreenChangeHandler() {
|
|
16790
|
+
var _a;
|
|
16791
|
+
const embedConfig = getEmbedConfig();
|
|
16792
|
+
const disableFullscreenPresentation = (_a = embedConfig === null || embedConfig === void 0 ? void 0 : embedConfig.disableFullscreenPresentation) !== null && _a !== void 0 ? _a : true;
|
|
16793
|
+
if (disableFullscreenPresentation) {
|
|
16794
|
+
return;
|
|
16795
|
+
}
|
|
16796
|
+
if (this.fullscreenChangeHandler) {
|
|
16797
|
+
document.removeEventListener('fullscreenchange', this.fullscreenChangeHandler);
|
|
16798
|
+
}
|
|
16799
|
+
this.fullscreenChangeHandler = () => {
|
|
16800
|
+
const isFullscreen = !!document.fullscreenElement;
|
|
16801
|
+
if (!isFullscreen) {
|
|
16802
|
+
logger$3.info('Exited fullscreen mode - triggering ExitPresentMode');
|
|
16803
|
+
// Only trigger if iframe is available and contentWindow is accessible
|
|
16804
|
+
if (this.iFrame && this.iFrame.contentWindow) {
|
|
16805
|
+
this.trigger(exports.HostEvent.ExitPresentMode);
|
|
16806
|
+
}
|
|
16807
|
+
else {
|
|
16808
|
+
logger$3.debug('Skipping ExitPresentMode - iframe contentWindow not available');
|
|
16809
|
+
}
|
|
16810
|
+
}
|
|
16811
|
+
};
|
|
16812
|
+
document.addEventListener('fullscreenchange', this.fullscreenChangeHandler);
|
|
16813
|
+
}
|
|
16814
|
+
/**
|
|
16815
|
+
* Remove fullscreen change handler
|
|
16816
|
+
*/
|
|
16817
|
+
removeFullscreenChangeHandler() {
|
|
16818
|
+
if (this.fullscreenChangeHandler) {
|
|
16819
|
+
document.removeEventListener('fullscreenchange', this.fullscreenChangeHandler);
|
|
16820
|
+
this.fullscreenChangeHandler = null;
|
|
16821
|
+
}
|
|
16822
|
+
}
|
|
16665
16823
|
}
|
|
16666
16824
|
/**
|
|
16667
16825
|
* Base class for embedding v1 experience
|
|
@@ -16779,7 +16937,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
16779
16937
|
* Define the initial state os column custom group accordions
|
|
16780
16938
|
* in data panel v2.
|
|
16781
16939
|
*/
|
|
16782
|
-
|
|
16940
|
+
exports.DataPanelCustomColumnGroupsAccordionState = void 0;
|
|
16783
16941
|
(function (DataPanelCustomColumnGroupsAccordionState) {
|
|
16784
16942
|
/**
|
|
16785
16943
|
* Expand all the accordion initially in data panel v2.
|
|
@@ -16793,7 +16951,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
16793
16951
|
* Expand the first accordion and collapse the rest.
|
|
16794
16952
|
*/
|
|
16795
16953
|
DataPanelCustomColumnGroupsAccordionState["EXPAND_FIRST"] = "EXPAND_FIRST";
|
|
16796
|
-
})(DataPanelCustomColumnGroupsAccordionState
|
|
16954
|
+
})(exports.DataPanelCustomColumnGroupsAccordionState || (exports.DataPanelCustomColumnGroupsAccordionState = {}));
|
|
16797
16955
|
exports.HomePageSearchBarMode = void 0;
|
|
16798
16956
|
(function (HomePageSearchBarMode) {
|
|
16799
16957
|
HomePageSearchBarMode["OBJECT_SEARCH"] = "objectSearch";
|
|
@@ -16802,7 +16960,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
16802
16960
|
})(exports.HomePageSearchBarMode || (exports.HomePageSearchBarMode = {}));
|
|
16803
16961
|
/**
|
|
16804
16962
|
* Define the version of the primary navbar
|
|
16805
|
-
* @version SDK: 1.
|
|
16963
|
+
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
16806
16964
|
*/
|
|
16807
16965
|
exports.PrimaryNavbarVersion = void 0;
|
|
16808
16966
|
(function (PrimaryNavbarVersion) {
|
|
@@ -16815,7 +16973,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
16815
16973
|
})(exports.PrimaryNavbarVersion || (exports.PrimaryNavbarVersion = {}));
|
|
16816
16974
|
/**
|
|
16817
16975
|
* Define the version of the home page
|
|
16818
|
-
* @version SDK: 1.
|
|
16976
|
+
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
16819
16977
|
*/
|
|
16820
16978
|
exports.HomePage = void 0;
|
|
16821
16979
|
(function (HomePage) {
|
|
@@ -16849,7 +17007,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
16849
17007
|
responder({ type: exports.EmbedEvent.EmbedIframeCenter, data: obj });
|
|
16850
17008
|
};
|
|
16851
17009
|
this.setIframeHeightForNonEmbedLiveboard = (data) => {
|
|
16852
|
-
const { height: frameHeight
|
|
17010
|
+
const { height: frameHeight } = this.viewConfig.frameParams || {};
|
|
16853
17011
|
const liveboardRelatedRoutes = [
|
|
16854
17012
|
'/pinboard/',
|
|
16855
17013
|
'/insights/pinboard/',
|
|
@@ -16881,7 +17039,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
16881
17039
|
getEmbedParams() {
|
|
16882
17040
|
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,
|
|
16883
17041
|
/* eslint-disable-next-line max-len */
|
|
16884
|
-
dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState
|
|
17042
|
+
dataPanelCustomGroupsAccordionInitialState = exports.DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, discoveryExperience, isLiveboardStylingAndGroupingEnabled, } = this.viewConfig;
|
|
16885
17043
|
let params = {};
|
|
16886
17044
|
params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
|
|
16887
17045
|
params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
|
|
@@ -16938,21 +17096,24 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
16938
17096
|
if (enablePendoHelp !== undefined) {
|
|
16939
17097
|
params[Param.EnablePendoHelp] = enablePendoHelp;
|
|
16940
17098
|
}
|
|
17099
|
+
if (isLiveboardStylingAndGroupingEnabled !== undefined) {
|
|
17100
|
+
params[Param.IsLiveboardStylingAndGroupingEnabled] = isLiveboardStylingAndGroupingEnabled;
|
|
17101
|
+
}
|
|
16941
17102
|
params[Param.DataPanelV2Enabled] = dataPanelV2;
|
|
16942
17103
|
params[Param.HideHomepageLeftNav] = hideHomepageLeftNav;
|
|
16943
17104
|
params[Param.ModularHomeExperienceEnabled] = modularHomeExperience;
|
|
16944
17105
|
params[Param.CollapseSearchBarInitially] = collapseSearchBarInitially || collapseSearchBar;
|
|
16945
17106
|
params[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
|
|
16946
17107
|
if (dataPanelCustomGroupsAccordionInitialState
|
|
16947
|
-
=== DataPanelCustomColumnGroupsAccordionState
|
|
17108
|
+
=== exports.DataPanelCustomColumnGroupsAccordionState.COLLAPSE_ALL
|
|
16948
17109
|
|| dataPanelCustomGroupsAccordionInitialState
|
|
16949
|
-
=== DataPanelCustomColumnGroupsAccordionState
|
|
17110
|
+
=== exports.DataPanelCustomColumnGroupsAccordionState.EXPAND_FIRST) {
|
|
16950
17111
|
/* eslint-disable-next-line max-len */
|
|
16951
17112
|
params[Param.DataPanelCustomGroupsAccordionInitialState] = dataPanelCustomGroupsAccordionInitialState;
|
|
16952
17113
|
}
|
|
16953
17114
|
else {
|
|
16954
17115
|
/* eslint-disable-next-line max-len */
|
|
16955
|
-
params[Param.DataPanelCustomGroupsAccordionInitialState] = DataPanelCustomColumnGroupsAccordionState
|
|
17116
|
+
params[Param.DataPanelCustomGroupsAccordionInitialState] = exports.DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL;
|
|
16956
17117
|
}
|
|
16957
17118
|
if (discoveryExperience) {
|
|
16958
17119
|
// primaryNavbarVersion v3 will enabled the new left navigation
|
|
@@ -17144,12 +17305,6 @@ query GetEurekaVizSnapshots(
|
|
|
17144
17305
|
* @summary Liveboard & visualization embed
|
|
17145
17306
|
* @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
|
|
17146
17307
|
*/
|
|
17147
|
-
const liveboardHeightWhitelistedRoutes = [
|
|
17148
|
-
'/embed/viz/',
|
|
17149
|
-
'/embed/insights/viz/',
|
|
17150
|
-
'/tsl-editor/PINBOARD_ANSWER_BOOK/',
|
|
17151
|
-
'/import-tsl/PINBOARD_ANSWER_BOOK/',
|
|
17152
|
-
];
|
|
17153
17308
|
/**
|
|
17154
17309
|
* Embed a ThoughtSpot Liveboard or visualization. When rendered it already
|
|
17155
17310
|
* waits for the authentication to complete, so you need not wait for
|
|
@@ -17166,7 +17321,6 @@ query GetEurekaVizSnapshots(
|
|
|
17166
17321
|
* @group Embed components
|
|
17167
17322
|
*/
|
|
17168
17323
|
class LiveboardEmbed extends V1Embed {
|
|
17169
|
-
// eslint-disable-next-line no-useless-constructor
|
|
17170
17324
|
constructor(domSelector, viewConfig) {
|
|
17171
17325
|
viewConfig.embedComponentType = 'LiveboardEmbed';
|
|
17172
17326
|
super(domSelector, viewConfig);
|
|
@@ -17184,13 +17338,30 @@ query GetEurekaVizSnapshots(
|
|
|
17184
17338
|
responder({ type: exports.EmbedEvent.EmbedIframeCenter, data: obj });
|
|
17185
17339
|
};
|
|
17186
17340
|
this.setIframeHeightForNonEmbedLiveboard = (data) => {
|
|
17187
|
-
const
|
|
17188
|
-
|
|
17341
|
+
const { height: frameHeight } = this.viewConfig.frameParams || {};
|
|
17342
|
+
const liveboardRelatedRoutes = [
|
|
17343
|
+
'/pinboard/',
|
|
17344
|
+
'/insights/pinboard/',
|
|
17345
|
+
'/schedules/',
|
|
17346
|
+
'/embed/viz/',
|
|
17347
|
+
'/embed/insights/viz/',
|
|
17348
|
+
'/liveboard/',
|
|
17349
|
+
'/insights/liveboard/',
|
|
17350
|
+
'/tsl-editor/PINBOARD_ANSWER_BOOK/',
|
|
17351
|
+
'/import-tsl/PINBOARD_ANSWER_BOOK/',
|
|
17352
|
+
];
|
|
17353
|
+
if (liveboardRelatedRoutes.some((path) => data.data.currentPath.startsWith(path))) {
|
|
17354
|
+
// Ignore the height reset of the frame, if the navigation is
|
|
17355
|
+
// only within the liveboard page.
|
|
17189
17356
|
return;
|
|
17190
17357
|
}
|
|
17191
|
-
this.setIFrameHeight(this.defaultHeight);
|
|
17358
|
+
this.setIFrameHeight(frameHeight || this.defaultHeight);
|
|
17192
17359
|
};
|
|
17193
17360
|
if (this.viewConfig.fullHeight === true) {
|
|
17361
|
+
if (this.viewConfig.vizId) {
|
|
17362
|
+
logger$3.warn('Full height is currently only supported for Liveboard embeds.' +
|
|
17363
|
+
'Using full height with vizId might lead to unexpected behavior.');
|
|
17364
|
+
}
|
|
17194
17365
|
this.on(exports.EmbedEvent.RouteChange, this.setIframeHeightForNonEmbedLiveboard);
|
|
17195
17366
|
this.on(exports.EmbedEvent.EmbedHeight, this.updateIFrameHeight);
|
|
17196
17367
|
this.on(exports.EmbedEvent.EmbedIframeCenter, this.embedIframeCenter);
|
|
@@ -17203,7 +17374,7 @@ query GetEurekaVizSnapshots(
|
|
|
17203
17374
|
getEmbedParams() {
|
|
17204
17375
|
let params = {};
|
|
17205
17376
|
params = this.getBaseQueryParams(params);
|
|
17206
|
-
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 = false, enableCustomColumnGroups = false, oAuthPollingInterval, isForceRedirect, dataSourceId, coverAndFilterOptionInPDF, } = this.viewConfig;
|
|
17377
|
+
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 = false, enableCustomColumnGroups = false, oAuthPollingInterval, isForceRedirect, dataSourceId, coverAndFilterOptionInPDF, isLiveboardStylingAndGroupingEnabled, } = this.viewConfig;
|
|
17207
17378
|
const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
|
|
17208
17379
|
|| this.viewConfig.preventPinboardFilterRemoval;
|
|
17209
17380
|
if (fullHeight === true) {
|
|
@@ -17258,6 +17429,9 @@ query GetEurekaVizSnapshots(
|
|
|
17258
17429
|
if (coverAndFilterOptionInPDF !== undefined) {
|
|
17259
17430
|
params[Param.CoverAndFilterOptionInPDF] = coverAndFilterOptionInPDF;
|
|
17260
17431
|
}
|
|
17432
|
+
if (isLiveboardStylingAndGroupingEnabled !== undefined) {
|
|
17433
|
+
params[Param.IsLiveboardStylingAndGroupingEnabled] = isLiveboardStylingAndGroupingEnabled;
|
|
17434
|
+
}
|
|
17261
17435
|
params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
|
|
17262
17436
|
params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
|
|
17263
17437
|
params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;
|
|
@@ -18122,7 +18296,7 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
18122
18296
|
/**
|
|
18123
18297
|
* Create a conversation embed, which can be integrated inside
|
|
18124
18298
|
* chatbots or other conversational interfaces.
|
|
18125
|
-
* @deprecated from SDK: 1.
|
|
18299
|
+
* @deprecated from SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
|
|
18126
18300
|
* Use {@link SpotterAgentEmbed} instead
|
|
18127
18301
|
* @example
|
|
18128
18302
|
* ```js
|
|
@@ -18232,7 +18406,7 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
18232
18406
|
}
|
|
18233
18407
|
/**
|
|
18234
18408
|
* Embed ThoughtSpot AI Conversation.
|
|
18235
|
-
* @deprecated from SDK: 1.
|
|
18409
|
+
* @deprecated from SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
|
|
18236
18410
|
* Use {@link SpotterEmbed} instead
|
|
18237
18411
|
* @group Embed components
|
|
18238
18412
|
* @example
|
|
@@ -18265,6 +18439,8 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
18265
18439
|
/**
|
|
18266
18440
|
* Embed ThoughtSpot LLM and GPT-based Natural Language Search component.
|
|
18267
18441
|
* @version: SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl, 9.5.1-sw
|
|
18442
|
+
*
|
|
18443
|
+
* Note: This embed will be deprecated from SDK: 1.40.0 | ThoughtSpot: 10.13.0.cl
|
|
18268
18444
|
* @group Embed components
|
|
18269
18445
|
*/
|
|
18270
18446
|
class SageEmbed extends V1Embed {
|