@thoughtspot/visual-embed-sdk 1.25.0 → 1.26.0-token-cache.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/auth.d.ts +0 -12
- package/cjs/src/auth.d.ts.map +1 -1
- package/cjs/src/auth.js +15 -54
- package/cjs/src/auth.js.map +1 -1
- package/cjs/src/auth.spec.d.ts.map +1 -1
- package/cjs/src/auth.spec.js +44 -5
- package/cjs/src/auth.spec.js.map +1 -1
- package/cjs/src/authToken.d.ts +4 -0
- package/cjs/src/authToken.d.ts.map +1 -0
- package/cjs/src/authToken.js +60 -0
- package/cjs/src/authToken.js.map +1 -0
- package/cjs/src/config.d.ts.map +1 -1
- package/cjs/src/config.js +3 -0
- package/cjs/src/config.js.map +1 -1
- package/cjs/src/config.spec.js +1 -1
- package/cjs/src/config.spec.js.map +1 -1
- package/cjs/src/embed/TsEmbed.d.ts +302 -0
- package/cjs/src/embed/TsEmbed.d.ts.map +1 -0
- package/cjs/src/embed/TsEmbed.js +851 -0
- package/cjs/src/embed/TsEmbed.js.map +1 -0
- package/cjs/src/embed/base.d.ts +0 -1
- package/cjs/src/embed/base.d.ts.map +1 -1
- package/cjs/src/embed/base.js +6 -5
- package/cjs/src/embed/base.js.map +1 -1
- package/cjs/src/embed/base.spec.js +7 -5
- package/cjs/src/embed/base.spec.js.map +1 -1
- package/cjs/src/embed/search.d.ts +0 -4
- package/cjs/src/embed/search.d.ts.map +1 -1
- package/cjs/src/embed/search.js +3 -2
- package/cjs/src/embed/search.js.map +1 -1
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +3 -2
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/embed/ts-embed.spec.js +48 -37
- package/cjs/src/embed/ts-embed.spec.js.map +1 -1
- package/cjs/src/react/index.spec.js +0 -12
- package/cjs/src/react/index.spec.js.map +1 -1
- package/cjs/src/tokenizedFetch.d.ts +2 -0
- package/cjs/src/tokenizedFetch.d.ts.map +1 -0
- package/cjs/src/tokenizedFetch.js +20 -0
- package/cjs/src/tokenizedFetch.js.map +1 -0
- package/cjs/src/types.d.ts +11 -1
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +7 -1
- package/cjs/src/types.js.map +1 -1
- package/cjs/src/utils/answerService.d.ts +10 -0
- package/cjs/src/utils/answerService.d.ts.map +1 -0
- package/cjs/src/utils/answerService.js +61 -0
- package/cjs/src/utils/answerService.js.map +1 -0
- package/cjs/src/utils/answerService.spec.d.ts +2 -0
- package/cjs/src/utils/answerService.spec.d.ts.map +1 -0
- package/cjs/src/utils/answerService.spec.js +31 -0
- package/cjs/src/utils/answerService.spec.js.map +1 -0
- package/cjs/src/utils/authService.d.ts +12 -1
- package/cjs/src/utils/authService.d.ts.map +1 -1
- package/cjs/src/utils/authService.js +32 -16
- package/cjs/src/utils/authService.js.map +1 -1
- package/cjs/src/utils/authService.spec.js +3 -4
- package/cjs/src/utils/authService.spec.js.map +1 -1
- package/cjs/src/utils/graphql/answerService/answerService.d.ts +1 -0
- package/cjs/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
- package/cjs/src/utils/graphql/answerService/answerService.js +6 -2
- package/cjs/src/utils/graphql/answerService/answerService.js.map +1 -1
- package/cjs/src/utils/graphql/answerService/answerService.spec.js +18 -2
- package/cjs/src/utils/graphql/answerService/answerService.spec.js.map +1 -1
- package/cjs/src/utils/graphql/graphql-request.spec.d.ts +2 -0
- package/cjs/src/utils/graphql/graphql-request.spec.d.ts.map +1 -0
- package/cjs/src/utils/graphql/graphql-request.spec.js +39 -0
- package/cjs/src/utils/graphql/graphql-request.spec.js.map +1 -0
- package/cjs/src/utils/logger.d.ts +28 -0
- package/cjs/src/utils/logger.d.ts.map +1 -0
- package/cjs/src/utils/logger.js +82 -0
- package/cjs/src/utils/logger.js.map +1 -0
- package/cjs/src/utils/processData.d.ts.map +1 -1
- package/cjs/src/utils/processData.js +2 -2
- package/cjs/src/utils/processData.js.map +1 -1
- package/cjs/src/utils/processData.spec.js +2 -2
- package/cjs/src/utils/processData.spec.js.map +1 -1
- package/dist/src/auth.d.ts +0 -12
- package/dist/src/auth.d.ts.map +1 -1
- package/dist/src/auth.spec.d.ts.map +1 -1
- package/dist/src/authToken.d.ts +4 -0
- package/dist/src/authToken.d.ts.map +1 -0
- package/dist/src/config.d.ts.map +1 -1
- package/dist/src/embed/base.d.ts +0 -1
- package/dist/src/embed/base.d.ts.map +1 -1
- package/dist/src/embed/search.d.ts +0 -4
- package/dist/src/embed/search.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.d.ts.map +1 -1
- package/dist/src/tokenizedFetch.d.ts +2 -0
- package/dist/src/tokenizedFetch.d.ts.map +1 -0
- package/dist/src/types.d.ts +11 -1
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/answerService.d.ts +10 -0
- package/dist/src/utils/answerService.d.ts.map +1 -0
- package/dist/src/utils/answerService.spec.d.ts +2 -0
- package/dist/src/utils/answerService.spec.d.ts.map +1 -0
- package/dist/src/utils/authService.d.ts +12 -1
- package/dist/src/utils/authService.d.ts.map +1 -1
- package/dist/src/utils/graphql/answerService/answerService.d.ts +1 -0
- package/dist/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
- package/dist/src/utils/graphql/graphql-request.spec.d.ts +2 -0
- package/dist/src/utils/graphql/graphql-request.spec.d.ts.map +1 -0
- package/dist/src/utils/logger.d.ts +28 -0
- package/dist/src/utils/logger.d.ts.map +1 -0
- package/dist/src/utils/processData.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +2149 -2094
- package/dist/tsembed-react.js +2152 -2097
- package/dist/tsembed.es.js +6483 -6425
- package/dist/tsembed.js +6483 -6425
- package/dist/visual-embed-sdk-react-full.d.ts +12 -18
- package/dist/visual-embed-sdk-react.d.ts +12 -18
- package/dist/visual-embed-sdk.d.ts +12 -18
- package/lib/package.json +1 -1
- package/lib/src/auth.d.ts +0 -12
- package/lib/src/auth.d.ts.map +1 -1
- package/lib/src/auth.js +10 -48
- package/lib/src/auth.js.map +1 -1
- package/lib/src/auth.spec.d.ts.map +1 -1
- package/lib/src/auth.spec.js +44 -5
- package/lib/src/auth.spec.js.map +1 -1
- package/lib/src/authToken.d.ts +4 -0
- package/lib/src/authToken.d.ts.map +1 -0
- package/lib/src/authToken.js +55 -0
- package/lib/src/authToken.js.map +1 -0
- package/lib/src/config.d.ts.map +1 -1
- package/lib/src/config.js +3 -0
- package/lib/src/config.js.map +1 -1
- package/lib/src/config.spec.js +1 -1
- package/lib/src/config.spec.js.map +1 -1
- package/lib/src/embed/TsEmbed.d.ts +302 -0
- package/lib/src/embed/TsEmbed.d.ts.map +1 -0
- package/lib/src/embed/TsEmbed.js +847 -0
- package/lib/src/embed/TsEmbed.js.map +1 -0
- package/lib/src/embed/base.d.ts +0 -1
- package/lib/src/embed/base.d.ts.map +1 -1
- package/lib/src/embed/base.js +3 -2
- package/lib/src/embed/base.js.map +1 -1
- package/lib/src/embed/base.spec.js +7 -5
- package/lib/src/embed/base.spec.js.map +1 -1
- package/lib/src/embed/search.d.ts +0 -4
- package/lib/src/embed/search.d.ts.map +1 -1
- package/lib/src/embed/search.js +3 -2
- package/lib/src/embed/search.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +2 -1
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/embed/ts-embed.spec.js +48 -37
- package/lib/src/embed/ts-embed.spec.js.map +1 -1
- package/lib/src/react/index.spec.js +0 -12
- package/lib/src/react/index.spec.js.map +1 -1
- package/lib/src/tokenizedFetch.d.ts +2 -0
- package/lib/src/tokenizedFetch.d.ts.map +1 -0
- package/lib/src/tokenizedFetch.js +16 -0
- package/lib/src/tokenizedFetch.js.map +1 -0
- package/lib/src/types.d.ts +11 -1
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +7 -1
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils/answerService.d.ts +10 -0
- package/lib/src/utils/answerService.d.ts.map +1 -0
- package/lib/src/utils/answerService.js +57 -0
- package/lib/src/utils/answerService.js.map +1 -0
- package/lib/src/utils/answerService.spec.d.ts +2 -0
- package/lib/src/utils/answerService.spec.d.ts.map +1 -0
- package/lib/src/utils/answerService.spec.js +29 -0
- package/lib/src/utils/answerService.spec.js.map +1 -0
- package/lib/src/utils/authService.d.ts +12 -1
- package/lib/src/utils/authService.d.ts.map +1 -1
- package/lib/src/utils/authService.js +26 -10
- package/lib/src/utils/authService.js.map +1 -1
- package/lib/src/utils/authService.spec.js +1 -2
- package/lib/src/utils/authService.spec.js.map +1 -1
- package/lib/src/utils/graphql/answerService/answerService.d.ts +1 -0
- package/lib/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
- package/lib/src/utils/graphql/answerService/answerService.js +6 -2
- package/lib/src/utils/graphql/answerService/answerService.js.map +1 -1
- package/lib/src/utils/graphql/answerService/answerService.spec.js +17 -2
- package/lib/src/utils/graphql/answerService/answerService.spec.js.map +1 -1
- package/lib/src/utils/graphql/graphql-request.spec.d.ts +2 -0
- package/lib/src/utils/graphql/graphql-request.spec.d.ts.map +1 -0
- package/lib/src/utils/graphql/graphql-request.spec.js +36 -0
- package/lib/src/utils/graphql/graphql-request.spec.js.map +1 -0
- package/lib/src/utils/logger.d.ts +28 -0
- package/lib/src/utils/logger.d.ts.map +1 -0
- package/lib/src/utils/logger.js +75 -0
- package/lib/src/utils/logger.js.map +1 -0
- package/lib/src/utils/processData.d.ts.map +1 -1
- package/lib/src/utils/processData.js +2 -2
- package/lib/src/utils/processData.js.map +1 -1
- package/lib/src/utils/processData.spec.js +2 -2
- package/lib/src/utils/processData.spec.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +12 -18
- package/package.json +1 -1
- package/src/auth.spec.ts +47 -7
- package/src/auth.ts +9 -50
- package/src/authToken.ts +60 -0
- package/src/config.spec.ts +1 -1
- package/src/config.ts +3 -0
- package/src/embed/base.spec.ts +7 -6
- package/src/embed/base.ts +2 -3
- package/src/embed/search.ts +2 -6
- package/src/embed/ts-embed.spec.ts +54 -40
- package/src/embed/ts-embed.ts +2 -1
- package/src/react/index.spec.tsx +0 -29
- package/src/tokenizedFetch.ts +16 -0
- package/src/types.ts +12 -2
- package/src/utils/authService.spec.ts +1 -2
- package/src/utils/authService.ts +29 -10
- package/src/utils/graphql/answerService/answerService.spec.ts +27 -3
- package/src/utils/graphql/answerService/answerService.ts +7 -2
- package/src/utils/processData.spec.ts +2 -2
- package/src/utils/processData.ts +2 -1
package/src/types.ts
CHANGED
|
@@ -463,7 +463,6 @@ export interface EmbedConfig {
|
|
|
463
463
|
* @version SDK: 1.12.0 | ThoughtSpot: 8.4.0.cl, 8.4.1.sw*
|
|
464
464
|
*/
|
|
465
465
|
suppressSearchEmbedBetaWarning?: boolean;
|
|
466
|
-
|
|
467
466
|
/**
|
|
468
467
|
* Hide beta alert warning message for SageEmbed.
|
|
469
468
|
*
|
|
@@ -531,6 +530,11 @@ export interface EmbedConfig {
|
|
|
531
530
|
* @version SDK: 1.27.0 | ThoughtSpot: 9.8.0.cl
|
|
532
531
|
*/
|
|
533
532
|
pendoTrackingKey?: string;
|
|
533
|
+
|
|
534
|
+
/**
|
|
535
|
+
* If passed as true all alerts will be suppressed in the embedded app.
|
|
536
|
+
*/
|
|
537
|
+
suppressErrorAlerts?: boolean;
|
|
534
538
|
}
|
|
535
539
|
|
|
536
540
|
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
@@ -1443,11 +1447,17 @@ export enum EmbedEvent {
|
|
|
1443
1447
|
*/
|
|
1444
1448
|
SageWorksheetUpdated = 'sageWorksheetUpdated',
|
|
1445
1449
|
/**
|
|
1446
|
-
*
|
|
1450
|
+
* Emitted when a user updates a connection in Data tab
|
|
1447
1451
|
*
|
|
1448
1452
|
* @version SDK : 1.27.0 | Thoughtspot: 9.8.0.cl
|
|
1449
1453
|
*/
|
|
1450
1454
|
UpdateConnection = 'updateConnection',
|
|
1455
|
+
/**
|
|
1456
|
+
* Emitted when a user updates a connection in Data tab
|
|
1457
|
+
*
|
|
1458
|
+
* @version SDK : 1.27.0 | Thoughtspot: 9.8.0.cl
|
|
1459
|
+
*/
|
|
1460
|
+
CreateConnection = 'createConnection',
|
|
1451
1461
|
/**
|
|
1452
1462
|
* Emitted when name, status (private or public) or filter values of a
|
|
1453
1463
|
* PersonalisedView is updated.
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { embedConfig } from 'src/auth.spec';
|
|
2
1
|
import {
|
|
3
2
|
fetchSessionInfoService,
|
|
4
3
|
fetchAuthTokenService,
|
|
@@ -6,8 +5,8 @@ import {
|
|
|
6
5
|
fetchBasicAuthService,
|
|
7
6
|
fetchAuthPostService,
|
|
8
7
|
verifyTokenService,
|
|
8
|
+
EndPoints,
|
|
9
9
|
} from './authService';
|
|
10
|
-
import { EndPoints } from '../auth';
|
|
11
10
|
|
|
12
11
|
const thoughtSpotHost = 'http://10.79.135.124:3000';
|
|
13
12
|
|
package/src/utils/authService.ts
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
export const EndPoints = {
|
|
2
|
+
AUTH_VERIFICATION: '/callosum/v1/session/info',
|
|
3
|
+
SAML_LOGIN_TEMPLATE: (targetUrl: string) => `/callosum/v1/saml/login?targetURLPath=${targetUrl}`,
|
|
4
|
+
OIDC_LOGIN_TEMPLATE: (targetUrl: string) => `/callosum/v1/oidc/login?targetURLPath=${targetUrl}`,
|
|
5
|
+
TOKEN_LOGIN: '/callosum/v1/session/login/token',
|
|
6
|
+
BASIC_LOGIN: '/callosum/v1/session/login',
|
|
7
|
+
LOGOUT: '/callosum/v1/session/logout',
|
|
8
|
+
EXECUTE_TML: '/api/rest/2.0/metadata/tml/import',
|
|
9
|
+
EXPORT_TML: '/api/rest/2.0/metadata/tml/export',
|
|
10
|
+
IS_ACTIVE: '/callosum/v1/session/isactive',
|
|
11
|
+
};
|
|
3
12
|
|
|
4
13
|
/**
|
|
5
14
|
*
|
|
@@ -31,15 +40,25 @@ export function fetchSessionInfoService(authVerificationUrl: string): Promise<an
|
|
|
31
40
|
* @param thoughtSpotHost : ThoughtSpot host to verify the token against.
|
|
32
41
|
* @param authToken : Auth token to verify.
|
|
33
42
|
*/
|
|
34
|
-
export function verifyTokenService(
|
|
43
|
+
export async function verifyTokenService(
|
|
44
|
+
thoughtSpotHost: string,
|
|
45
|
+
authToken: string,
|
|
46
|
+
): Promise<boolean> {
|
|
35
47
|
const authVerificationUrl = `${thoughtSpotHost}${EndPoints.IS_ACTIVE}`;
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
48
|
+
try {
|
|
49
|
+
const res = await fetch(authVerificationUrl, {
|
|
50
|
+
headers: {
|
|
51
|
+
Authorization: `Bearer ${authToken}`,
|
|
52
|
+
'x-requested-by': 'ThoughtSpot',
|
|
53
|
+
},
|
|
54
|
+
credentials: 'omit',
|
|
55
|
+
});
|
|
56
|
+
return res.ok;
|
|
57
|
+
} catch (e) {
|
|
58
|
+
console.error(`Token Verification Service failed : ${e.message}`);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return false;
|
|
43
62
|
}
|
|
44
63
|
|
|
45
64
|
/**
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import 'jest-fetch-mock';
|
|
2
|
-
import { VizPoint } from '
|
|
2
|
+
import { AuthType, VizPoint } from '../../../types';
|
|
3
3
|
import { AnswerService } from './answerService';
|
|
4
4
|
import { getAnswerData, removeColumns } from './answer-queries';
|
|
5
|
+
import * as baseInstance from '../../../embed/base';
|
|
6
|
+
import * as authTokenInstance from '../../../authToken';
|
|
7
|
+
import * as tokenizedFetch from '../../../tokenizedFetch';
|
|
5
8
|
|
|
6
9
|
const defaultSession = {
|
|
7
10
|
sessionId: 'id',
|
|
@@ -108,14 +111,35 @@ describe('Answer service tests', () => {
|
|
|
108
111
|
expect(data.data.foo).toBe(1);
|
|
109
112
|
});
|
|
110
113
|
|
|
111
|
-
test('fetchCSVBlob should call the right API',
|
|
114
|
+
test('fetchCSVBlob should call the right API', () => {
|
|
112
115
|
fetchMock.once('Bla');
|
|
113
116
|
const answerService = createAnswerService();
|
|
117
|
+
|
|
118
|
+
const mockEmbedConfig = {
|
|
119
|
+
thougthspotHost: '/test',
|
|
120
|
+
authType: AuthType.TrustedAuthTokenCookieless,
|
|
121
|
+
};
|
|
122
|
+
jest.spyOn(baseInstance, 'getEmbedConfig').mockReturnValueOnce(mockEmbedConfig);
|
|
123
|
+
jest.spyOn(authTokenInstance, 'getAuthenticationToken').mockReturnValueOnce(Promise.resolve('token'));
|
|
124
|
+
const mockTokenizedFetch = jest.spyOn(tokenizedFetch, 'tokenizedFetch');
|
|
114
125
|
answerService.fetchCSVBlob(undefined, true);
|
|
115
|
-
|
|
126
|
+
|
|
127
|
+
expect(mockTokenizedFetch).toHaveBeenCalledWith(
|
|
116
128
|
`https://tshost/prism/download/answer/csv?sessionId=${defaultSession.sessionId}&genNo=${defaultSession.genNo}&userLocale=en-us&exportFileName=data&hideCsvHeader=false`,
|
|
117
129
|
expect.objectContaining({}),
|
|
118
130
|
);
|
|
131
|
+
|
|
132
|
+
answerService.fetchCSVBlob('en-uk', true);
|
|
133
|
+
expect(mockTokenizedFetch).toHaveBeenCalledWith(
|
|
134
|
+
`https://tshost/prism/download/answer/csv?sessionId=${defaultSession.sessionId}&genNo=${defaultSession.genNo}&userLocale=en-uk&exportFileName=data&hideCsvHeader=false`,
|
|
135
|
+
expect.objectContaining({}),
|
|
136
|
+
);
|
|
137
|
+
|
|
138
|
+
answerService.fetchCSVBlob(undefined, false);
|
|
139
|
+
expect(mockTokenizedFetch).toHaveBeenCalledWith(
|
|
140
|
+
`https://tshost/prism/download/answer/csv?sessionId=${defaultSession.sessionId}&genNo=${defaultSession.genNo}&userLocale=en-us&exportFileName=data&hideCsvHeader=true`,
|
|
141
|
+
expect.objectContaining({}),
|
|
142
|
+
);
|
|
119
143
|
});
|
|
120
144
|
|
|
121
145
|
test('getUnderlyingDataForPoint should call the right APIs', async () => {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { tokenizedFetch } from '../../../tokenizedFetch';
|
|
1
2
|
import type { ColumnValue, VizPoint } from '../../../types';
|
|
2
3
|
import { deepMerge, removeTypename } from '../../../utils';
|
|
3
4
|
import { graphqlQuery } from '../graphql-request';
|
|
@@ -102,12 +103,16 @@ export class AnswerService {
|
|
|
102
103
|
* @returns Response
|
|
103
104
|
*/
|
|
104
105
|
public async fetchCSVBlob(userLocale = 'en-us', includeInfo = false): Promise<Response> {
|
|
105
|
-
const fetchUrl =
|
|
106
|
-
return
|
|
106
|
+
const fetchUrl = this.getFetchCSVBlobUrl(userLocale, includeInfo);
|
|
107
|
+
return tokenizedFetch(fetchUrl, {
|
|
107
108
|
credentials: 'include',
|
|
108
109
|
});
|
|
109
110
|
}
|
|
110
111
|
|
|
112
|
+
public getFetchCSVBlobUrl(userLocale = 'en-us', includeInfo = false): string {
|
|
113
|
+
return `${this.thoughtSpotHost}/prism/download/answer/csv?sessionId=${this.session.sessionId}&genNo=${this.session.genNo}&userLocale=${userLocale}&exportFileName=data&hideCsvHeader=${!includeInfo}`;
|
|
114
|
+
}
|
|
115
|
+
|
|
111
116
|
/**
|
|
112
117
|
* Get underlying data given a point and the output column names.
|
|
113
118
|
*
|
|
@@ -7,7 +7,7 @@ import { EmbedEvent, AuthType } from '../types';
|
|
|
7
7
|
describe('Unit test for process data', () => {
|
|
8
8
|
beforeAll(() => {
|
|
9
9
|
base.init({
|
|
10
|
-
thoughtSpotHost: '',
|
|
10
|
+
thoughtSpotHost: 'https://tshost',
|
|
11
11
|
authType: AuthType.None,
|
|
12
12
|
});
|
|
13
13
|
});
|
|
@@ -153,7 +153,7 @@ describe('Unit test for process data', () => {
|
|
|
153
153
|
base.init({
|
|
154
154
|
loginFailedMessage: 'Hello',
|
|
155
155
|
autoLogin: true,
|
|
156
|
-
thoughtSpotHost: '',
|
|
156
|
+
thoughtSpotHost: 'https://tshost',
|
|
157
157
|
authType: AuthType.None,
|
|
158
158
|
});
|
|
159
159
|
jest.spyOn(base, 'getEmbedConfig').mockRestore();
|
package/src/utils/processData.ts
CHANGED
|
@@ -56,9 +56,10 @@ function processNoCookieAccess(e: any, containerEl: Element) {
|
|
|
56
56
|
loginFailedMessage,
|
|
57
57
|
suppressNoCookieAccessAlert,
|
|
58
58
|
ignoreNoCookieAccess,
|
|
59
|
+
suppressErrorAlerts,
|
|
59
60
|
} = getEmbedConfig();
|
|
60
61
|
if (!ignoreNoCookieAccess) {
|
|
61
|
-
if (!suppressNoCookieAccessAlert) {
|
|
62
|
+
if (!suppressNoCookieAccessAlert && !suppressErrorAlerts) {
|
|
62
63
|
// eslint-disable-next-line no-alert
|
|
63
64
|
alert(
|
|
64
65
|
'Third party cookie access is blocked on this browser, please allow third party cookies for this to work properly. \nYou can use `suppressNoCookieAccessAlert` to suppress this message.',
|