@thoughtspot/visual-embed-sdk 1.46.2 → 1.46.3
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/auth.js +0 -3
- package/cjs/src/auth.js.map +1 -1
- package/cjs/src/auth.spec.js +1 -3
- package/cjs/src/auth.spec.js.map +1 -1
- package/cjs/src/authToken.js +0 -1
- package/cjs/src/authToken.js.map +1 -1
- package/cjs/src/authToken.spec.js +2 -1
- package/cjs/src/authToken.spec.js.map +1 -1
- package/cjs/src/embed/app.d.ts +2 -1
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/auto-frame-renderer.d.ts +41 -0
- package/cjs/src/embed/auto-frame-renderer.d.ts.map +1 -0
- package/cjs/src/embed/auto-frame-renderer.js +145 -0
- package/cjs/src/embed/auto-frame-renderer.js.map +1 -0
- package/cjs/src/embed/auto-frame-renderer.spec.d.ts +2 -0
- package/cjs/src/embed/auto-frame-renderer.spec.d.ts.map +1 -0
- package/cjs/src/embed/auto-frame-renderer.spec.js +195 -0
- package/cjs/src/embed/auto-frame-renderer.spec.js.map +1 -0
- package/cjs/src/embed/base.d.ts.map +1 -1
- package/cjs/src/embed/base.js +4 -7
- package/cjs/src/embed/base.js.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.js +0 -2
- package/cjs/src/embed/hostEventClient/host-event-client.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts +2 -1
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +5 -3
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/liveboard.spec.js +4 -2
- package/cjs/src/embed/liveboard.spec.js.map +1 -1
- package/cjs/src/embed/sage.js +0 -1
- package/cjs/src/embed/sage.js.map +1 -1
- package/cjs/src/embed/search.spec.js +0 -2
- package/cjs/src/embed/search.spec.js.map +1 -1
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +3 -3
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/embed/ts-embed.spec.js +2 -1
- package/cjs/src/embed/ts-embed.spec.js.map +1 -1
- package/cjs/src/index.d.ts +3 -2
- package/cjs/src/index.d.ts.map +1 -1
- package/cjs/src/index.js +3 -1
- package/cjs/src/index.js.map +1 -1
- package/cjs/src/react/index.js +0 -1
- package/cjs/src/react/index.js.map +1 -1
- package/cjs/src/react/index.spec.js +6 -3
- package/cjs/src/react/index.spec.js.map +1 -1
- package/cjs/src/types.d.ts +56 -32
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +34 -18
- package/cjs/src/types.js.map +1 -1
- package/cjs/src/utils/graphql/answerService/answerService.d.ts +5 -4
- package/cjs/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
- package/cjs/src/utils/graphql/answerService/answerService.js +7 -11
- package/cjs/src/utils/graphql/answerService/answerService.js.map +1 -1
- package/cjs/src/utils/graphql/preview-service.js +0 -1
- package/cjs/src/utils/graphql/preview-service.js.map +1 -1
- package/cjs/src/utils/processData.js +0 -5
- package/cjs/src/utils/processData.js.map +1 -1
- package/dist/{index-DkizS4xM.js → index-DyX-x6uN.js} +1 -1
- package/dist/src/embed/app.d.ts +2 -1
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/auto-frame-renderer.d.ts +41 -0
- package/dist/src/embed/auto-frame-renderer.d.ts.map +1 -0
- package/dist/src/embed/auto-frame-renderer.spec.d.ts +2 -0
- package/dist/src/embed/auto-frame-renderer.spec.d.ts.map +1 -0
- package/dist/src/embed/base.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts +2 -1
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.d.ts.map +1 -1
- package/dist/src/index.d.ts +3 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/types.d.ts +56 -32
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/graphql/answerService/answerService.d.ts +5 -4
- package/dist/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +55 -57
- package/dist/tsembed-react.js +54 -56
- package/dist/tsembed.es.js +194 -57
- package/dist/tsembed.js +193 -55
- package/dist/visual-embed-sdk-react-full.d.ts +54 -33
- package/dist/visual-embed-sdk-react.d.ts +54 -33
- package/dist/visual-embed-sdk.d.ts +103 -38
- package/lib/package.json +1 -1
- package/lib/src/auth.js +0 -3
- package/lib/src/auth.js.map +1 -1
- package/lib/src/auth.spec.js +1 -3
- package/lib/src/auth.spec.js.map +1 -1
- package/lib/src/authToken.js +0 -1
- package/lib/src/authToken.js.map +1 -1
- package/lib/src/authToken.spec.js +2 -1
- package/lib/src/authToken.spec.js.map +1 -1
- package/lib/src/embed/app.d.ts +2 -1
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/auto-frame-renderer.d.ts +41 -0
- package/lib/src/embed/auto-frame-renderer.d.ts.map +1 -0
- package/lib/src/embed/auto-frame-renderer.js +141 -0
- package/lib/src/embed/auto-frame-renderer.js.map +1 -0
- package/lib/src/embed/auto-frame-renderer.spec.d.ts +2 -0
- package/lib/src/embed/auto-frame-renderer.spec.d.ts.map +1 -0
- package/lib/src/embed/auto-frame-renderer.spec.js +192 -0
- package/lib/src/embed/auto-frame-renderer.spec.js.map +1 -0
- package/lib/src/embed/base.d.ts.map +1 -1
- package/lib/src/embed/base.js +4 -7
- package/lib/src/embed/base.js.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.js +0 -2
- package/lib/src/embed/hostEventClient/host-event-client.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts +2 -1
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +5 -3
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +4 -2
- package/lib/src/embed/liveboard.spec.js.map +1 -1
- package/lib/src/embed/sage.js +0 -1
- package/lib/src/embed/sage.js.map +1 -1
- package/lib/src/embed/search.spec.js +0 -2
- package/lib/src/embed/search.spec.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +3 -3
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/embed/ts-embed.spec.js +2 -1
- package/lib/src/embed/ts-embed.spec.js.map +1 -1
- package/lib/src/index.d.ts +3 -2
- package/lib/src/index.d.ts.map +1 -1
- package/lib/src/index.js +1 -0
- package/lib/src/index.js.map +1 -1
- package/lib/src/react/index.js +0 -1
- package/lib/src/react/index.js.map +1 -1
- package/lib/src/react/index.spec.js +6 -3
- package/lib/src/react/index.spec.js.map +1 -1
- package/lib/src/types.d.ts +56 -32
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +34 -18
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils/graphql/answerService/answerService.d.ts +5 -4
- package/lib/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
- package/lib/src/utils/graphql/answerService/answerService.js +7 -11
- package/lib/src/utils/graphql/answerService/answerService.js.map +1 -1
- package/lib/src/utils/graphql/preview-service.js +0 -1
- package/lib/src/utils/graphql/preview-service.js.map +1 -1
- package/lib/src/utils/processData.js +0 -5
- package/lib/src/utils/processData.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +11466 -0
- package/package.json +1 -1
- package/src/auth.spec.ts +1 -1
- package/src/auth.ts +3 -3
- package/src/authToken.spec.ts +2 -1
- package/src/authToken.ts +1 -1
- package/src/embed/app.ts +2 -1
- package/src/embed/auto-frame-renderer.spec.ts +266 -0
- package/src/embed/auto-frame-renderer.ts +152 -0
- package/src/embed/base.spec.ts +1 -1
- package/src/embed/base.ts +7 -8
- package/src/embed/hostEventClient/host-event-client.ts +2 -2
- package/src/embed/liveboard.spec.ts +4 -2
- package/src/embed/liveboard.ts +7 -4
- package/src/embed/sage.ts +1 -1
- package/src/embed/search.spec.ts +2 -2
- package/src/embed/ts-embed.spec.ts +2 -1
- package/src/embed/ts-embed.ts +3 -3
- package/src/index.ts +3 -0
- package/src/react/index.spec.tsx +6 -3
- package/src/react/index.tsx +1 -1
- package/src/types.ts +57 -32
- package/src/utils/graphql/answerService/answerService.ts +8 -7
- package/src/utils/graphql/preview-service.ts +1 -1
- package/src/utils/processData.ts +5 -5
package/src/embed/ts-embed.ts
CHANGED
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
setStyleProperties,
|
|
35
35
|
removeStyleProperties,
|
|
36
36
|
isUndefined,
|
|
37
|
-
} from '../utils';
|
|
37
|
+
getHostEventsConfig } from '../utils';
|
|
38
38
|
import { getCustomActions } from '../utils/custom-actions';
|
|
39
39
|
import {
|
|
40
40
|
getThoughtSpotHost,
|
|
@@ -78,7 +78,6 @@ import { ERROR_MESSAGE } from '../errors';
|
|
|
78
78
|
import { getPreauthInfo } from '../utils/sessionInfoService';
|
|
79
79
|
import { HostEventClient } from './hostEventClient/host-event-client';
|
|
80
80
|
import { getInterceptInitData, handleInterceptEvent, processApiInterceptResponse, processLegacyInterceptResponse } from '../api-intercept';
|
|
81
|
-
import { getHostEventsConfig } from '../utils';
|
|
82
81
|
|
|
83
82
|
const { version } = pkgInfo;
|
|
84
83
|
|
|
@@ -562,7 +561,8 @@ export class TsEmbed {
|
|
|
562
561
|
*/
|
|
563
562
|
private updateAuthToken = async (_: MessagePayload, responder: any) => {
|
|
564
563
|
const { authType, autoLogin: autoLoginConfig } = this.embedConfig;
|
|
565
|
-
// Default autoLogin: true for cookieless if undefined/null, otherwise
|
|
564
|
+
// Default autoLogin: true for cookieless if undefined/null, otherwise
|
|
565
|
+
// false
|
|
566
566
|
const autoLogin = autoLoginConfig ?? (authType === AuthType.TrustedAuthTokenCookieless);
|
|
567
567
|
|
|
568
568
|
try {
|
package/src/index.ts
CHANGED
|
@@ -70,6 +70,7 @@ import {
|
|
|
70
70
|
EmbedErrorDetailsEvent,
|
|
71
71
|
ErrorDetailsTypes,
|
|
72
72
|
ContextType,
|
|
73
|
+
AutoMCPFrameRendererViewConfig,
|
|
73
74
|
} from './types';
|
|
74
75
|
import { CustomCssVariables } from './css-variables';
|
|
75
76
|
import { SageEmbed, SageViewConfig } from './embed/sage';
|
|
@@ -166,6 +167,8 @@ export {
|
|
|
166
167
|
EmbedErrorCodes,
|
|
167
168
|
EmbedErrorDetailsEvent,
|
|
168
169
|
ErrorDetailsTypes,
|
|
170
|
+
AutoMCPFrameRendererViewConfig,
|
|
169
171
|
};
|
|
170
172
|
|
|
171
173
|
export { resetCachedAuthToken } from './authToken';
|
|
174
|
+
export { startAutoMCPFrameRenderer } from './embed/auto-frame-renderer';
|
package/src/react/index.spec.tsx
CHANGED
|
@@ -288,7 +288,8 @@ describe('React Components', () => {
|
|
|
288
288
|
).toBe(true);
|
|
289
289
|
});
|
|
290
290
|
|
|
291
|
-
// Note: insertAsSibling is not supported for SpotterMessage as it's
|
|
291
|
+
// Note: insertAsSibling is not supported for SpotterMessage as it's
|
|
292
|
+
// not part of the allowed props
|
|
292
293
|
});
|
|
293
294
|
|
|
294
295
|
describe('Component Factory Coverage', () => {
|
|
@@ -416,7 +417,8 @@ describe('React Components', () => {
|
|
|
416
417
|
const TestComponent = () => {
|
|
417
418
|
const { sendMessage } = useSpotterAgent({ worksheetId: 'test-worksheet' });
|
|
418
419
|
|
|
419
|
-
// Call sendMessage immediately before service has time to
|
|
420
|
+
// Call sendMessage immediately before service has time to
|
|
421
|
+
// initialize
|
|
420
422
|
sendMessageResult = sendMessage('test query');
|
|
421
423
|
|
|
422
424
|
return <div>Test</div>;
|
|
@@ -727,7 +729,8 @@ describe('React Components', () => {
|
|
|
727
729
|
|
|
728
730
|
const { rerender } = render(<TestComponent worksheetId="worksheet1" />);
|
|
729
731
|
|
|
730
|
-
// This should trigger the "if (serviceRef.current)" branch in
|
|
732
|
+
// This should trigger the "if (serviceRef.current)" branch in
|
|
733
|
+
// useEffect
|
|
731
734
|
rerender(<TestComponent worksheetId="worksheet1" />);
|
|
732
735
|
rerender(<TestComponent worksheetId="worksheet2" />);
|
|
733
736
|
rerender(<TestComponent worksheetId="worksheet3" />);
|
package/src/react/index.tsx
CHANGED
package/src/types.ts
CHANGED
|
@@ -1476,6 +1476,9 @@ export interface BaseViewConfig extends ApiInterceptFlags {
|
|
|
1476
1476
|
useHostEventsV2?: boolean;
|
|
1477
1477
|
}
|
|
1478
1478
|
|
|
1479
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
1480
|
+
export interface AutoMCPFrameRendererViewConfig extends BaseViewConfig {}
|
|
1481
|
+
|
|
1479
1482
|
/**
|
|
1480
1483
|
* The configuration object for Home page embeds configs.
|
|
1481
1484
|
*/
|
|
@@ -1485,8 +1488,9 @@ export interface HomePageConfig {
|
|
|
1485
1488
|
* *Liveboards* and *Answers*.
|
|
1486
1489
|
* For example: `hiddenListColumns = [ListPageColumns.Author]`
|
|
1487
1490
|
*
|
|
1488
|
-
* **Note**: This option is available only in full app embedding and requires
|
|
1489
|
-
* Starting with version 10.14.0.cl, you can
|
|
1491
|
+
* **Note**: This option is available only in full app embedding and requires
|
|
1492
|
+
* importing the `ListPageColumns` enum. Starting with version 10.14.0.cl, you can
|
|
1493
|
+
* use this attribute to
|
|
1490
1494
|
* hide the columns on all list pages in the *Insights* section.
|
|
1491
1495
|
*
|
|
1492
1496
|
* Supported embed types: `AppEmbed`
|
|
@@ -1526,8 +1530,9 @@ export interface HomePageConfig {
|
|
|
1526
1530
|
/**
|
|
1527
1531
|
* Reorder home page modules.
|
|
1528
1532
|
* To specify the modules, import the `HomepageModule` enum.
|
|
1529
|
-
* For example: `reorderedHomepageModules = [HomepageModule.MyLibrary,
|
|
1530
|
-
* **Note**: This attribute is not supported in the
|
|
1533
|
+
* For example: `reorderedHomepageModules = [HomepageModule.MyLibrary,
|
|
1534
|
+
* HomepageModule.Watchlist]` **Note**: This attribute is not supported in the
|
|
1535
|
+
* classic (v1) homepage.
|
|
1531
1536
|
*
|
|
1532
1537
|
* Supported embed types: `AppEmbed`
|
|
1533
1538
|
* @version SDK: 1.28.0 | ThoughtSpot: 9.12.5.cl, 10.1.0.sw
|
|
@@ -1841,7 +1846,9 @@ export interface LiveboardAppEmbedViewConfig {
|
|
|
1841
1846
|
/**
|
|
1842
1847
|
* This flag is used to enable/disable hide irrelevant filters in Liveboard tab
|
|
1843
1848
|
*
|
|
1844
|
-
* **Note**: This feature is supported only if compact header is enabled on your
|
|
1849
|
+
* **Note**: This feature is supported only if compact header is enabled on your
|
|
1850
|
+
* Liveboard. To enable compact header, use the `isLiveboardCompactHeaderEnabled`
|
|
1851
|
+
* attribute.
|
|
1845
1852
|
*
|
|
1846
1853
|
* Supported embed types: `AppEmbed`, `LiveboardEmbed`
|
|
1847
1854
|
* @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
|
|
@@ -1907,9 +1914,9 @@ export interface LiveboardAppEmbedViewConfig {
|
|
|
1907
1914
|
*/
|
|
1908
1915
|
coverAndFilterOptionInPDF?: boolean;
|
|
1909
1916
|
/**
|
|
1910
|
-
* This flag is used to enable or disable the new centralized Liveboard filter UX
|
|
1911
|
-
* When enabled, a unified modal is used to manage and update multiple filters
|
|
1912
|
-
* replacing the older individual filter interactions.
|
|
1917
|
+
* This flag is used to enable or disable the new centralized Liveboard filter UX
|
|
1918
|
+
* (v2). When enabled, a unified modal is used to manage and update multiple filters
|
|
1919
|
+
* at once, replacing the older individual filter interactions.
|
|
1913
1920
|
* To enable this feature on your instance, contact ThoughtSpot Support.
|
|
1914
1921
|
*
|
|
1915
1922
|
* Supported embed types: `AppEmbed`, `LiveboardEmbed`
|
|
@@ -1941,7 +1948,8 @@ export interface LiveboardAppEmbedViewConfig {
|
|
|
1941
1948
|
isLinkParametersEnabled?: boolean;
|
|
1942
1949
|
|
|
1943
1950
|
/**
|
|
1944
|
-
* This flag is used to enable or disable the enhanced filter interactivity in
|
|
1951
|
+
* This flag is used to enable or disable the enhanced filter interactivity in
|
|
1952
|
+
* liveboard.
|
|
1945
1953
|
*
|
|
1946
1954
|
* Supported embed types: `AppEmbed`, `LiveboardEmbed`
|
|
1947
1955
|
* @version SDK: 1.42.0 | ThoughtSpot: 10.15.0.cl
|
|
@@ -2664,7 +2672,8 @@ export enum EmbedEvent {
|
|
|
2664
2672
|
Download = 'download',
|
|
2665
2673
|
/**
|
|
2666
2674
|
* Emitted when the download action is triggered on an Answer.
|
|
2667
|
-
* Use start:true to subscribe to when download is initiated, or end:true to
|
|
2675
|
+
* Use start:true to subscribe to when download is initiated, or end:true to
|
|
2676
|
+
* subscribe to when download is completed. Default is end:true.
|
|
2668
2677
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.0.sw
|
|
2669
2678
|
* @example
|
|
2670
2679
|
* ```js
|
|
@@ -2679,7 +2688,8 @@ export enum EmbedEvent {
|
|
|
2679
2688
|
DownloadAsPng = 'downloadAsPng',
|
|
2680
2689
|
/**
|
|
2681
2690
|
* Emitted when the Download as PDF action is triggered on an Answer
|
|
2682
|
-
* Use start:true to subscribe to when download as PDF is initiated, or end:true to
|
|
2691
|
+
* Use start:true to subscribe to when download as PDF is initiated, or end:true to
|
|
2692
|
+
* subscribe to when download as PDF is completed. Default is end:true.
|
|
2683
2693
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
2684
2694
|
* @example
|
|
2685
2695
|
* ```js
|
|
@@ -2694,7 +2704,8 @@ export enum EmbedEvent {
|
|
|
2694
2704
|
DownloadAsPdf = 'downloadAsPdf',
|
|
2695
2705
|
/**
|
|
2696
2706
|
* Emitted when the Download as CSV action is triggered on an Answer.
|
|
2697
|
-
* Use start:true to subscribe to when download as CSV is initiated, or end:true to
|
|
2707
|
+
* Use start:true to subscribe to when download as CSV is initiated, or end:true to
|
|
2708
|
+
* subscribe to when download as CSV is completed. Default is end:true.
|
|
2698
2709
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
2699
2710
|
* @example
|
|
2700
2711
|
* ```js
|
|
@@ -2709,7 +2720,8 @@ export enum EmbedEvent {
|
|
|
2709
2720
|
DownloadAsCsv = 'downloadAsCsv',
|
|
2710
2721
|
/**
|
|
2711
2722
|
* Emitted when the Download as XLSX action is triggered on an Answer.
|
|
2712
|
-
* Use start:true to subscribe to when download as XLSX is initiated, or end:true to
|
|
2723
|
+
* Use start:true to subscribe to when download as XLSX is initiated, or end:true to
|
|
2724
|
+
* subscribe to when download as XLSX is completed. Default is end:true.
|
|
2713
2725
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
2714
2726
|
* @example
|
|
2715
2727
|
* ```js
|
|
@@ -2724,7 +2736,8 @@ export enum EmbedEvent {
|
|
|
2724
2736
|
DownloadAsXlsx = 'downloadAsXlsx',
|
|
2725
2737
|
/**
|
|
2726
2738
|
* Emitted when an Answer is deleted in the app
|
|
2727
|
-
* Use start:true to subscribe to when delete is initiated, or end:true to subscribe
|
|
2739
|
+
* Use start:true to subscribe to when delete is initiated, or end:true to subscribe
|
|
2740
|
+
* to when delete is completed. Default is end:true.
|
|
2728
2741
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
2729
2742
|
* @example
|
|
2730
2743
|
* ```js
|
|
@@ -2751,7 +2764,8 @@ export enum EmbedEvent {
|
|
|
2751
2764
|
/**
|
|
2752
2765
|
* Emitted when a user initiates the Pin action to
|
|
2753
2766
|
* add an Answer to a Liveboard.
|
|
2754
|
-
* Use start:true to subscribe to when pin is initiated, or end:true to subscribe to
|
|
2767
|
+
* Use start:true to subscribe to when pin is initiated, or end:true to subscribe to
|
|
2768
|
+
* when pin is completed. Default is end:true.
|
|
2755
2769
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
2756
2770
|
* @example
|
|
2757
2771
|
* ```js
|
|
@@ -2865,7 +2879,8 @@ export enum EmbedEvent {
|
|
|
2865
2879
|
/**
|
|
2866
2880
|
* Emitted when the **Export TML** action is triggered on an
|
|
2867
2881
|
* an embedded object in the app
|
|
2868
|
-
* Use start:true to subscribe to when export is initiated, or end:true to subscribe
|
|
2882
|
+
* Use start:true to subscribe to when export is initiated, or end:true to subscribe
|
|
2883
|
+
* to when export is completed. Default is end:true.
|
|
2869
2884
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
2870
2885
|
* @example
|
|
2871
2886
|
* ```js
|
|
@@ -2891,7 +2906,8 @@ export enum EmbedEvent {
|
|
|
2891
2906
|
SaveAsView = 'saveAsView',
|
|
2892
2907
|
/**
|
|
2893
2908
|
* Emitted when the user creates a copy of an Answer.
|
|
2894
|
-
* Use start:true to subscribe to when copy and edit is initiated, or end:true to
|
|
2909
|
+
* Use start:true to subscribe to when copy and edit is initiated, or end:true to
|
|
2910
|
+
* subscribe to when copy and edit is completed. Default is end:true.
|
|
2895
2911
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
2896
2912
|
* @example
|
|
2897
2913
|
* ```js
|
|
@@ -3657,7 +3673,8 @@ export enum HostEvent {
|
|
|
3657
3673
|
* - `autoDrillDown`: Optional. If `true`, the drill down will be done automatically
|
|
3658
3674
|
* on the most popular column.
|
|
3659
3675
|
* - `vizId` (TS >= 9.8.0): Optional. The GUID of the visualization to drill in case
|
|
3660
|
-
* of a Liveboard. In Spotter embed, `vizId` refers to the Answer ID and is
|
|
3676
|
+
* of a Liveboard. In Spotter embed, `vizId` refers to the Answer ID and is
|
|
3677
|
+
* **required**.
|
|
3661
3678
|
* @example
|
|
3662
3679
|
* ```js
|
|
3663
3680
|
* searchEmbed.on(EmbedEvent.VizPointDoubleClick, (payload) => {
|
|
@@ -3853,7 +3870,8 @@ export enum HostEvent {
|
|
|
3853
3870
|
* the following parameters:
|
|
3854
3871
|
*
|
|
3855
3872
|
* @param - Includes the following keys:
|
|
3856
|
-
* - `vizId`: GUID of the saved Answer or Spotter visualization ID to pin to a
|
|
3873
|
+
* - `vizId`: GUID of the saved Answer or Spotter visualization ID to pin to a
|
|
3874
|
+
* Liveboard.
|
|
3857
3875
|
* Optional when pinning a new chart or table generated from a Search query.
|
|
3858
3876
|
* **Required** in Spotter Embed.
|
|
3859
3877
|
* - `liveboardId`: GUID of the Liveboard to pin an Answer. If there is no Liveboard,
|
|
@@ -4109,7 +4127,8 @@ export enum HostEvent {
|
|
|
4109
4127
|
* This event is not supported in visualization embed and search embed.
|
|
4110
4128
|
* @param - Object parameter. Includes the following keys:
|
|
4111
4129
|
* - `vizId`: To trigger the action for a specific visualization in Liveboard embed,
|
|
4112
|
-
* pass in `vizId` as a key. In Spotter embed, `vizId` refers to the Answer ID and
|
|
4130
|
+
* pass in `vizId` as a key. In Spotter embed, `vizId` refers to the Answer ID and
|
|
4131
|
+
* is **required**.
|
|
4113
4132
|
*
|
|
4114
4133
|
* @example
|
|
4115
4134
|
* ```js
|
|
@@ -4478,8 +4497,9 @@ export enum HostEvent {
|
|
|
4478
4497
|
/**
|
|
4479
4498
|
* Update one or several filters applied on a Liveboard.
|
|
4480
4499
|
* @param - Includes the following keys:
|
|
4481
|
-
* - `filter`: A single filter object containing column name, filter operator, and
|
|
4482
|
-
* - `filters`: Multiple filter objects with column name, filter operator,
|
|
4500
|
+
* - `filter`: A single filter object containing column name, filter operator, and
|
|
4501
|
+
* values. - `filters`: Multiple filter objects with column name, filter operator,
|
|
4502
|
+
* and values for each.
|
|
4483
4503
|
*
|
|
4484
4504
|
* Each filter object must include the following attributes:
|
|
4485
4505
|
*
|
|
@@ -4748,8 +4768,8 @@ export enum HostEvent {
|
|
|
4748
4768
|
* triggered with a modal to prompt users to
|
|
4749
4769
|
* add a name and description for the Answer.
|
|
4750
4770
|
* @param - Includes the following keys:
|
|
4751
|
-
* - `vizId`: Refers to the Answer ID in Spotter embed and is **required** in Spotter
|
|
4752
|
-
* - `name`: Optional. Name string for the Answer.
|
|
4771
|
+
* - `vizId`: Refers to the Answer ID in Spotter embed and is **required** in Spotter
|
|
4772
|
+
* embed. - `name`: Optional. Name string for the Answer.
|
|
4753
4773
|
* - `description`: Optional. Description text for the Answer.
|
|
4754
4774
|
* @example
|
|
4755
4775
|
* ```js
|
|
@@ -4945,8 +4965,9 @@ export enum HostEvent {
|
|
|
4945
4965
|
/**
|
|
4946
4966
|
* Triggers a new conversation in Spotter embed.
|
|
4947
4967
|
*
|
|
4948
|
-
* This feature is available only when chat history is enabled on your ThoughtSpot
|
|
4949
|
-
* Contact your admin or ThoughtSpot Support to enable chat history on your
|
|
4968
|
+
* This feature is available only when chat history is enabled on your ThoughtSpot
|
|
4969
|
+
* instance. Contact your admin or ThoughtSpot Support to enable chat history on your
|
|
4970
|
+
* instance.
|
|
4950
4971
|
*
|
|
4951
4972
|
* @example
|
|
4952
4973
|
* ```js
|
|
@@ -4995,6 +5016,7 @@ export enum DataSourceVisualMode {
|
|
|
4995
5016
|
*/
|
|
4996
5017
|
|
|
4997
5018
|
export enum Param {
|
|
5019
|
+
Tsmcp = 'tsmcp',
|
|
4998
5020
|
EmbedApp = 'embedApp',
|
|
4999
5021
|
DataSources = 'dataSources',
|
|
5000
5022
|
DataSourceMode = 'dataSourceMode',
|
|
@@ -6980,7 +7002,9 @@ export enum ErrorDetailsTypes {
|
|
|
6980
7002
|
}
|
|
6981
7003
|
|
|
6982
7004
|
/**
|
|
6983
|
-
* Error codes for identifying specific issues in embedded ThoughtSpot components. Use
|
|
7005
|
+
* Error codes for identifying specific issues in embedded ThoughtSpot components. Use
|
|
7006
|
+
* {@link EmbedErrorDetailsEvent} and {@link ErrorDetailsTypes} codes for precise error
|
|
7007
|
+
* handling and debugging.
|
|
6984
7008
|
*
|
|
6985
7009
|
* @version SDK: 1.44.2 | ThoughtSpot: 26.2.0.cl
|
|
6986
7010
|
* @group Error Handling
|
|
@@ -7052,15 +7076,16 @@ export enum EmbedErrorCodes {
|
|
|
7052
7076
|
/**
|
|
7053
7077
|
* Error event object emitted when an error occurs in an embedded component.
|
|
7054
7078
|
*
|
|
7055
|
-
* This interface defines the structure of error objects returned by the {@link
|
|
7056
|
-
* event. It provides detailed information about what went wrong,
|
|
7057
|
-
* a human-readable message, and a machine-readable error code.
|
|
7079
|
+
* This interface defines the structure of error objects returned by the {@link
|
|
7080
|
+
* EmbedEvent.Error} event. It provides detailed information about what went wrong,
|
|
7081
|
+
* including the error type, a human-readable message, and a machine-readable error code.
|
|
7058
7082
|
*
|
|
7059
7083
|
* ## Properties
|
|
7060
7084
|
*
|
|
7061
7085
|
* - **errorType**: One of the predefined {@link ErrorDetailsTypes} values
|
|
7062
|
-
* - **message**: Human-readable error description (string or array of strings for
|
|
7063
|
-
* - **code**: Machine-readable error identifier {@link EmbedErrorCodes}
|
|
7086
|
+
* - **message**: Human-readable error description (string or array of strings for
|
|
7087
|
+
* multiple errors) - **code**: Machine-readable error identifier {@link EmbedErrorCodes}
|
|
7088
|
+
* values
|
|
7064
7089
|
* - **[key: string]**: Additional context-specific for backward compatibility
|
|
7065
7090
|
*
|
|
7066
7091
|
* ## Usage
|
|
@@ -14,7 +14,7 @@ export interface SessionInterface {
|
|
|
14
14
|
acSession: { sessionId: string; genNo: number };
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
|
|
18
18
|
export enum OperationType {
|
|
19
19
|
GetChartWithData = 'GetChartWithData',
|
|
20
20
|
GetTableWithHeadlineData = 'GetTableWithHeadlineData',
|
|
@@ -36,10 +36,11 @@ export const DATA_TYPES = ['DATE', 'DATE_TIME', 'TIME'];
|
|
|
36
36
|
*
|
|
37
37
|
* You can use this service to:
|
|
38
38
|
*
|
|
39
|
-
* - Add or remove columns from Answers (`addColumns`, `removeColumns`,
|
|
40
|
-
* - Apply filters to Answers (`addFilter`)
|
|
41
|
-
* - Get data from Answers in different formats (JSON, CSV, PNG) (`fetchData`,
|
|
42
|
-
* - Get data for specific points in visualizations
|
|
39
|
+
* - Add or remove columns from Answers (`addColumns`, `removeColumns`,
|
|
40
|
+
* `addColumnsByName`) - Apply filters to Answers (`addFilter`)
|
|
41
|
+
* - Get data from Answers in different formats (JSON, CSV, PNG) (`fetchData`,
|
|
42
|
+
* `fetchCSVBlob`, `fetchPNGBlob`) - Get data for specific points in visualizations
|
|
43
|
+
* (`getUnderlyingDataForPoint`)
|
|
43
44
|
* - Run custom queries (`executeQuery`)
|
|
44
45
|
* - Add visualizations to Liveboards (`addDisplayedVizToLiveboard`)
|
|
45
46
|
*
|
|
@@ -507,12 +508,12 @@ function getSelectedPointsForUnderlyingDataQuery(
|
|
|
507
508
|
function getDisplayedViz(visualizations: any[], displayMode: string) {
|
|
508
509
|
if (displayMode === 'CHART_MODE') {
|
|
509
510
|
return visualizations.find(
|
|
510
|
-
|
|
511
|
+
|
|
511
512
|
(viz: any) => viz.__typename === 'ChartViz',
|
|
512
513
|
);
|
|
513
514
|
}
|
|
514
515
|
return visualizations.find(
|
|
515
|
-
|
|
516
|
+
|
|
516
517
|
(viz: any) => viz.__typename === 'TableViz',
|
|
517
518
|
);
|
|
518
519
|
}
|
package/src/utils/processData.ts
CHANGED
|
@@ -83,10 +83,10 @@ function processNoCookieAccess(e: any, containerEl: Element) {
|
|
|
83
83
|
} = getEmbedConfig();
|
|
84
84
|
if (!ignoreNoCookieAccess) {
|
|
85
85
|
if (!suppressNoCookieAccessAlert && !suppressErrorAlerts) {
|
|
86
|
-
|
|
86
|
+
|
|
87
87
|
alert(ERROR_MESSAGE.THIRD_PARTY_COOKIE_BLOCKED_ALERT);
|
|
88
88
|
}
|
|
89
|
-
|
|
89
|
+
|
|
90
90
|
containerEl.innerHTML = loginFailedMessage;
|
|
91
91
|
}
|
|
92
92
|
notifyAuthFailure(AuthFailureType.NO_COOKIE_ACCESS);
|
|
@@ -107,11 +107,11 @@ export function processAuthFailure(e: any, containerEl: Element) {
|
|
|
107
107
|
const isTrustedAuth = authType === AuthType.TrustedAuthToken || authType === AuthType.TrustedAuthTokenCookieless;
|
|
108
108
|
const isEmbeddedSSOInfoFailure = isEmbeddedSSO && e?.data?.type === AuthFailureType.UNAUTHENTICATED_FAILURE;
|
|
109
109
|
if (autoLogin && isTrustedAuth) {
|
|
110
|
-
|
|
110
|
+
|
|
111
111
|
containerEl.innerHTML = loginFailedMessage;
|
|
112
112
|
notifyAuthFailure(AuthFailureType.IDLE_SESSION_TIMEOUT);
|
|
113
113
|
} else if (authType !== AuthType.None && !disableLoginFailurePage && !isEmbeddedSSOInfoFailure) {
|
|
114
|
-
|
|
114
|
+
|
|
115
115
|
containerEl.innerHTML = loginFailedMessage;
|
|
116
116
|
notifyAuthFailure(AuthFailureType.OTHER);
|
|
117
117
|
}
|
|
@@ -126,7 +126,7 @@ export function processAuthFailure(e: any, containerEl: Element) {
|
|
|
126
126
|
*/
|
|
127
127
|
function processAuthLogout(e: any, containerEl: Element) {
|
|
128
128
|
const { loginFailedMessage } = getEmbedConfig();
|
|
129
|
-
|
|
129
|
+
|
|
130
130
|
containerEl.innerHTML = loginFailedMessage;
|
|
131
131
|
resetCachedAuthToken();
|
|
132
132
|
disableAutoLogin();
|