@thoughtspot/visual-embed-sdk 1.33.2 → 1.33.4
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.map +1 -1
- package/cjs/src/auth.js +5 -2
- package/cjs/src/auth.js.map +1 -1
- package/cjs/src/auth.spec.js +15 -3
- package/cjs/src/auth.spec.js.map +1 -1
- package/cjs/src/css-variables.d.ts +2 -2
- package/cjs/src/embed/app.d.ts +20 -6
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +3 -2
- 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/base.spec.js +13 -1
- package/cjs/src/embed/base.spec.js.map +1 -1
- package/cjs/src/embed/conversation.d.ts.map +1 -1
- package/cjs/src/embed/conversation.js +4 -0
- package/cjs/src/embed/conversation.js.map +1 -1
- package/cjs/src/embed/conversation.spec.js +13 -0
- package/cjs/src/embed/conversation.spec.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts +0 -3
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +1 -2
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/liveboard.spec.js +2 -2
- package/cjs/src/embed/liveboard.spec.js.map +1 -1
- package/cjs/src/embed/search.js +1 -1
- package/cjs/src/embed/search.js.map +1 -1
- package/cjs/src/embed/search.spec.js +6 -6
- package/cjs/src/embed/search.spec.js.map +1 -1
- package/cjs/src/embed/ts-embed.spec.js +1 -1
- package/cjs/src/errors.d.ts +1 -0
- package/cjs/src/errors.d.ts.map +1 -1
- package/cjs/src/errors.js +10 -9
- package/cjs/src/errors.js.map +1 -1
- package/cjs/src/react/index.spec.js +1 -1
- package/cjs/src/react/index.spec.js.map +1 -1
- package/cjs/src/tokenizedFetch.d.ts +0 -1
- package/cjs/src/tokenizedFetch.d.ts.map +1 -1
- package/cjs/src/tokenizedFetch.js +0 -1
- package/cjs/src/tokenizedFetch.js.map +1 -1
- package/cjs/src/types.d.ts +40 -22
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +35 -17
- package/cjs/src/types.js.map +1 -1
- package/cjs/src/utils/processData.d.ts.map +1 -1
- package/cjs/src/utils/processData.js +0 -1
- package/cjs/src/utils/processData.js.map +1 -1
- package/cjs/src/utils/sessionInfoService.d.ts +0 -4
- package/cjs/src/utils/sessionInfoService.d.ts.map +1 -1
- package/cjs/src/utils/sessionInfoService.js +0 -4
- package/cjs/src/utils/sessionInfoService.js.map +1 -1
- package/cjs/src/utils.d.ts +1 -0
- package/cjs/src/utils.d.ts.map +1 -1
- package/cjs/src/utils.js +13 -3
- package/cjs/src/utils.js.map +1 -1
- package/cjs/src/utils.spec.js +6 -6
- package/cjs/src/utils.spec.js.map +1 -1
- package/dist/{index-CqrIh3Vj.js → index-Cl8Rsh6W.js} +1 -1
- package/dist/src/auth.d.ts.map +1 -1
- package/dist/src/css-variables.d.ts +2 -2
- package/dist/src/embed/app.d.ts +20 -6
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/conversation.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts +0 -3
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/errors.d.ts +1 -0
- package/dist/src/errors.d.ts.map +1 -1
- package/dist/src/tokenizedFetch.d.ts +0 -1
- package/dist/src/tokenizedFetch.d.ts.map +1 -1
- package/dist/src/types.d.ts +40 -22
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/processData.d.ts.map +1 -1
- package/dist/src/utils/sessionInfoService.d.ts +0 -4
- package/dist/src/utils/sessionInfoService.d.ts.map +1 -1
- package/dist/src/utils.d.ts +1 -0
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +72 -42
- package/dist/tsembed-react.js +71 -41
- package/dist/tsembed.es.js +72 -42
- package/dist/tsembed.js +71 -41
- package/dist/visual-embed-sdk-react-full.d.ts +62 -38
- package/dist/visual-embed-sdk-react.d.ts +62 -38
- package/dist/visual-embed-sdk.d.ts +62 -38
- package/lib/package.json +1 -1
- package/lib/src/auth.d.ts.map +1 -1
- package/lib/src/auth.js +6 -3
- package/lib/src/auth.js.map +1 -1
- package/lib/src/auth.spec.js +15 -3
- package/lib/src/auth.spec.js.map +1 -1
- package/lib/src/css-variables.d.ts +2 -2
- package/lib/src/embed/app.d.ts +20 -6
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +3 -2
- 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/base.spec.js +13 -1
- package/lib/src/embed/base.spec.js.map +1 -1
- package/lib/src/embed/conversation.d.ts.map +1 -1
- package/lib/src/embed/conversation.js +4 -0
- package/lib/src/embed/conversation.js.map +1 -1
- package/lib/src/embed/conversation.spec.js +13 -0
- package/lib/src/embed/conversation.spec.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts +0 -3
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +1 -2
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +2 -2
- package/lib/src/embed/liveboard.spec.js.map +1 -1
- package/lib/src/embed/search.js +1 -1
- package/lib/src/embed/search.js.map +1 -1
- package/lib/src/embed/search.spec.js +6 -6
- package/lib/src/embed/search.spec.js.map +1 -1
- package/lib/src/embed/ts-embed.spec.js +1 -1
- package/lib/src/errors.d.ts +1 -0
- package/lib/src/errors.d.ts.map +1 -1
- package/lib/src/errors.js +10 -9
- package/lib/src/errors.js.map +1 -1
- package/lib/src/react/index.spec.js +1 -1
- package/lib/src/react/index.spec.js.map +1 -1
- package/lib/src/tokenizedFetch.d.ts +0 -1
- package/lib/src/tokenizedFetch.d.ts.map +1 -1
- package/lib/src/tokenizedFetch.js +0 -1
- package/lib/src/tokenizedFetch.js.map +1 -1
- package/lib/src/types.d.ts +40 -22
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +35 -17
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils/processData.d.ts.map +1 -1
- package/lib/src/utils/processData.js +0 -1
- package/lib/src/utils/processData.js.map +1 -1
- package/lib/src/utils/sessionInfoService.d.ts +0 -4
- package/lib/src/utils/sessionInfoService.d.ts.map +1 -1
- package/lib/src/utils/sessionInfoService.js +0 -4
- package/lib/src/utils/sessionInfoService.js.map +1 -1
- package/lib/src/utils.d.ts +1 -0
- package/lib/src/utils.d.ts.map +1 -1
- package/lib/src/utils.js +11 -2
- package/lib/src/utils.js.map +1 -1
- package/lib/src/utils.spec.js +6 -6
- package/lib/src/utils.spec.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +62 -38
- package/package.json +1 -1
- package/src/auth.spec.ts +15 -3
- package/src/auth.ts +7 -3
- package/src/css-variables.ts +2 -2
- package/src/embed/app.spec.ts +15 -0
- package/src/embed/app.ts +23 -7
- package/src/embed/base.spec.ts +13 -1
- package/src/embed/conversation.spec.ts +16 -0
- package/src/embed/conversation.ts +4 -0
- package/src/embed/liveboard.spec.ts +2 -2
- package/src/embed/liveboard.ts +1 -4
- package/src/embed/search.spec.ts +6 -6
- package/src/embed/search.ts +1 -1
- package/src/embed/ts-embed.spec.ts +1 -1
- package/src/errors.ts +10 -9
- package/src/react/index.spec.tsx +1 -1
- package/src/tokenizedFetch.ts +0 -1
- package/src/types.ts +38 -20
- package/src/utils/processData.ts +0 -1
- package/src/utils/sessionInfoService.ts +0 -4
- package/src/utils.spec.ts +6 -6
- package/src/utils.ts +14 -2
package/lib/src/utils.spec.js
CHANGED
|
@@ -82,8 +82,8 @@ describe('unit test for utils', () => {
|
|
|
82
82
|
expect(getCssDimension(null)).toBe(null);
|
|
83
83
|
});
|
|
84
84
|
test('appendToUrlHash', () => {
|
|
85
|
-
expect(appendToUrlHash('http://myhost:3000', 'hashFrag')).toBe('http://myhost:3000
|
|
86
|
-
expect(appendToUrlHash('http://xyz.com/#foo', 'bar')).toBe('http://xyz.com/#
|
|
85
|
+
expect(appendToUrlHash('http://myhost:3000', 'hashFrag')).toBe('http://myhost:3000#?tsSSOMarker=hashFrag');
|
|
86
|
+
expect(appendToUrlHash('http://xyz.com/#foo', 'bar')).toBe('http://xyz.com/#foo?tsSSOMarker=bar');
|
|
87
87
|
});
|
|
88
88
|
describe('getRedirectURL', () => {
|
|
89
89
|
let windowSpy;
|
|
@@ -94,8 +94,8 @@ describe('unit test for utils', () => {
|
|
|
94
94
|
windowSpy.mockRestore();
|
|
95
95
|
});
|
|
96
96
|
test('Should return correct value when path is undefined', () => {
|
|
97
|
-
expect(getRedirectUrl('http://myhost:3000', 'hashFrag')).toBe('http://myhost:3000
|
|
98
|
-
expect(getRedirectUrl('http://xyz.com/#foo', 'bar')).toBe('http://xyz.com/#
|
|
97
|
+
expect(getRedirectUrl('http://myhost:3000', 'hashFrag')).toBe('http://myhost:3000#?tsSSOMarker=hashFrag');
|
|
98
|
+
expect(getRedirectUrl('http://xyz.com/#foo', 'bar')).toBe('http://xyz.com/#foo?tsSSOMarker=bar');
|
|
99
99
|
});
|
|
100
100
|
test('Should return correct value when path is set', () => {
|
|
101
101
|
windowSpy.mockImplementation(() => ({
|
|
@@ -103,8 +103,8 @@ describe('unit test for utils', () => {
|
|
|
103
103
|
origin: 'http://myhost:3000',
|
|
104
104
|
},
|
|
105
105
|
}));
|
|
106
|
-
expect(getRedirectUrl('http://myhost:3000/', 'hashFrag', '/bar')).toBe('http://myhost:3000/bar
|
|
107
|
-
expect(getRedirectUrl('http://myhost:3000/#/foo', 'hashFrag', '#/bar')).toBe('http://myhost:3000/#/
|
|
106
|
+
expect(getRedirectUrl('http://myhost:3000/', 'hashFrag', '/bar')).toBe('http://myhost:3000/bar#?tsSSOMarker=hashFrag');
|
|
107
|
+
expect(getRedirectUrl('http://myhost:3000/#/foo', 'hashFrag', '#/bar')).toBe('http://myhost:3000/#/bar?tsSSOMarker=hashFrag');
|
|
108
108
|
});
|
|
109
109
|
});
|
|
110
110
|
test('getEncodedQueryParamsString', () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.spec.js","sourceRoot":"","sources":["../../src/utils.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,mBAAmB,EACnB,cAAc,EACd,eAAe,EACf,2BAA2B,EAC3B,eAAe,EACf,cAAc,EACd,yBAAyB,EACzB,oBAAoB,EACpB,cAAc,EACd,qBAAqB,EACrB,kBAAkB,EAClB,WAAW,GACd,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C,QAAQ,CAAC,qBAAqB,EAAE,GAAG,EAAE;IACjC,IAAI,CAAC,qBAAqB,EAAE,GAAG,EAAE;QAC7B,MAAM,CACF,mBAAmB,CAAC;YAChB,GAAG,EAAE,KAAK;YACV,GAAG,EAAE,IAAI;SACZ,CAAC,CACL,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;QACzB,MAAM,CAAC,mBAAmB,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC3C,kCAAkC;QAClC,MAAM,CACF,mBAAmB,CAAC;YAChB,GAAG,EAAE,SAAS;YACd,GAAG,EAAE,KAAK;SACb,CAAC,CACL,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACtB,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,yCAAyC,EAAE,GAAG,EAAE;QACjD,MAAM,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAEtC,MAAM,CACF,cAAc,CAAC;YACX;gBACI,UAAU,EAAE,SAAS;gBACrB,QAAQ,EAAE,eAAe,CAAC,EAAE;gBAC5B,MAAM,EAAE,CAAC,MAAM,C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M,CAAC,CAAC;YAEpC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAClD,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAChD,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,+BAA+B,EAAE,GAAG,EAAE;YACrC,4BAA4B;YAC5B,MAAM,CAAC,GAAG,EAAE;gBACR,kBAAkB,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;YACtC,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC;QACrB,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,aAAa,EAAE,GAAG,EAAE;QACrB,MAAM,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC1C,MAAM,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACxC,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
|
@@ -388,7 +388,7 @@ declare module '@thoughtspot/visual-embed-sdk/embed/app' {
|
|
|
388
388
|
*/
|
|
389
389
|
dataPanelCustomGroupsAccordionInitialState?: DataPanelCustomColumnGroupsAccordionState;
|
|
390
390
|
/**
|
|
391
|
-
* This
|
|
391
|
+
* This attribute can be used to enable the two-column layout on an embedded Liveboard
|
|
392
392
|
* @type {boolean}
|
|
393
393
|
* @default false
|
|
394
394
|
* @version SDK: 1.32.0 | ThoughtSpot:10.1.0.cl
|
|
@@ -402,17 +402,17 @@ declare module '@thoughtspot/visual-embed-sdk/embed/app' {
|
|
|
402
402
|
*/
|
|
403
403
|
enable2ColumnLayout?: boolean;
|
|
404
404
|
/**
|
|
405
|
-
* Flag
|
|
405
|
+
* Flag that allows using `EmbedEvent.OnBeforeGetVizDataIntercept`.
|
|
406
406
|
* @version SDK : 1.29.0 | Thoughtspot : 10.1.0.cl
|
|
407
407
|
*/
|
|
408
408
|
isOnBeforeGetVizDataInterceptEnabled?: boolean;
|
|
409
409
|
/**
|
|
410
410
|
* Flag to use home page search bar mode
|
|
411
|
-
* @version SDK : 1.33.0 | Thoughtspot : 10.
|
|
411
|
+
* @version SDK : 1.33.0 | Thoughtspot : 10.3.0.cl
|
|
412
412
|
*/
|
|
413
413
|
homePageSearchBarMode?: HomePageSearchBarMode;
|
|
414
414
|
/**
|
|
415
|
-
* This flag
|
|
415
|
+
* This flag can be used to enable the compact header in Liveboard
|
|
416
416
|
* @type {boolean}
|
|
417
417
|
* @default false
|
|
418
418
|
* @version SDK: 1.35.0 | ThoughtSpot:10.3.0.cl
|
|
@@ -426,7 +426,7 @@ declare module '@thoughtspot/visual-embed-sdk/embed/app' {
|
|
|
426
426
|
*/
|
|
427
427
|
isLiveboardCompactHeaderEnabled?: boolean;
|
|
428
428
|
/**
|
|
429
|
-
* This flag
|
|
429
|
+
* This flag can be used to show or hide the Liveboard verified icon in the compact header.
|
|
430
430
|
* @type {boolean}
|
|
431
431
|
* @default true
|
|
432
432
|
* @version SDK: 1.35.0 | ThoughtSpot:10.4.0.cl
|
|
@@ -440,7 +440,7 @@ declare module '@thoughtspot/visual-embed-sdk/embed/app' {
|
|
|
440
440
|
*/
|
|
441
441
|
showLiveboardVerifiedBadge?: boolean;
|
|
442
442
|
/**
|
|
443
|
-
* This flag
|
|
443
|
+
* This flag can be used to show or hide the re-verify banner on the Liveboard compact header
|
|
444
444
|
* @type {boolean}
|
|
445
445
|
* @default true
|
|
446
446
|
* @version SDK: 1.35.0 | ThoughtSpot:10.4.0.cl
|
|
@@ -453,6 +453,20 @@ declare module '@thoughtspot/visual-embed-sdk/embed/app' {
|
|
|
453
453
|
* ```
|
|
454
454
|
*/
|
|
455
455
|
showLiveboardReverifyBanner?: boolean;
|
|
456
|
+
/**
|
|
457
|
+
* This flag is used to enable unified search experience for full app embed.
|
|
458
|
+
* @type {boolean}
|
|
459
|
+
* @default true
|
|
460
|
+
* @version SDK: 1.34.0 | ThoughtSpot:10.5.0.cl
|
|
461
|
+
* @example
|
|
462
|
+
* ```js
|
|
463
|
+
* const embed = new AppEmbed('#embed-container', {
|
|
464
|
+
* ... // other options
|
|
465
|
+
* isUnifiedSearchExperienceEnabled: true,
|
|
466
|
+
* })
|
|
467
|
+
* ```
|
|
468
|
+
*/
|
|
469
|
+
isUnifiedSearchExperienceEnabled?: boolean;
|
|
456
470
|
}
|
|
457
471
|
/**
|
|
458
472
|
* Embeds full ThoughtSpot experience in a host application.
|
|
@@ -890,7 +904,6 @@ declare module '@thoughtspot/visual-embed-sdk/embed/liveboard' {
|
|
|
890
904
|
*
|
|
891
905
|
* Since, this will show preview images, be careful that it may show
|
|
892
906
|
* undesired data to the user when using row level security.
|
|
893
|
-
*
|
|
894
907
|
* @example
|
|
895
908
|
* ```js
|
|
896
909
|
* const embed = new LiveboardEmbed('#embed-container', {
|
|
@@ -900,7 +913,6 @@ declare module '@thoughtspot/visual-embed-sdk/embed/liveboard' {
|
|
|
900
913
|
* });
|
|
901
914
|
* embed.render();
|
|
902
915
|
* ```
|
|
903
|
-
*
|
|
904
916
|
* @version SDK: 1.32.0 | ThoughtSpot: 10.0.0.cl
|
|
905
917
|
*/
|
|
906
918
|
showPreviewLoader?: boolean;
|
|
@@ -988,7 +1000,6 @@ declare module '@thoughtspot/visual-embed-sdk/embed/liveboard' {
|
|
|
988
1000
|
/**
|
|
989
1001
|
* Returns the full url of the liveboard/viz which can be used to open
|
|
990
1002
|
* this liveboard inside the full Thoughtspot application in a new tab.
|
|
991
|
-
*
|
|
992
1003
|
* @returns url string
|
|
993
1004
|
*/
|
|
994
1005
|
getLiveboardUrl(): string;
|
|
@@ -1628,7 +1639,6 @@ declare module '@thoughtspot/visual-embed-sdk/utils/sessionInfoService' {
|
|
|
1628
1639
|
* Returns the session info object and caches it for future use.
|
|
1629
1640
|
* Once fetched the session info object is cached and returned from the cache on
|
|
1630
1641
|
* subsequent calls.
|
|
1631
|
-
*
|
|
1632
1642
|
* @example ```js
|
|
1633
1643
|
* const sessionInfo = await getSessionInfo();
|
|
1634
1644
|
* console.log(sessionInfo);
|
|
@@ -1640,7 +1650,6 @@ declare module '@thoughtspot/visual-embed-sdk/utils/sessionInfoService' {
|
|
|
1640
1650
|
/**
|
|
1641
1651
|
* Returns the cached session info object. If the client is not authenticated the
|
|
1642
1652
|
* function will return null.
|
|
1643
|
-
*
|
|
1644
1653
|
* @example ```js
|
|
1645
1654
|
* const sessionInfo = getCachedSessionInfo();
|
|
1646
1655
|
* if (sessionInfo) {
|
|
@@ -1655,7 +1664,6 @@ declare module '@thoughtspot/visual-embed-sdk/utils/sessionInfoService' {
|
|
|
1655
1664
|
export function getCachedSessionInfo(): SessionInfo | null;
|
|
1656
1665
|
/**
|
|
1657
1666
|
* Processes the session info response and returns the session info object.
|
|
1658
|
-
*
|
|
1659
1667
|
* @param sessionInfoResp {any} Response from the session info API.
|
|
1660
1668
|
* @returns {SessionInfo} The session info object.
|
|
1661
1669
|
* @example ```js
|
|
@@ -1668,7 +1676,6 @@ declare module '@thoughtspot/visual-embed-sdk/utils/sessionInfoService' {
|
|
|
1668
1676
|
export const getSessionDetails: (sessionInfoResp: any) => SessionInfo;
|
|
1669
1677
|
/**
|
|
1670
1678
|
* Resets the cached session info object and forces a new fetch on the next call.
|
|
1671
|
-
*
|
|
1672
1679
|
* @example ```js
|
|
1673
1680
|
* resetCachedSessionInfo();
|
|
1674
1681
|
* const sessionInfo = await getSessionInfo();
|
|
@@ -2668,7 +2675,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
2668
2675
|
*/
|
|
2669
2676
|
enableV2Shell_experimental?: boolean;
|
|
2670
2677
|
/**
|
|
2671
|
-
* To set the initial state of the search bar in case of saved
|
|
2678
|
+
* To set the initial state of the search bar in case of saved Answers.
|
|
2672
2679
|
* @default true
|
|
2673
2680
|
* @version SDK: 1.34.0 | Thoughtspot: 10.3.0.cl
|
|
2674
2681
|
* @example
|
|
@@ -2681,7 +2688,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
2681
2688
|
collapseSearchBar?: boolean;
|
|
2682
2689
|
/**
|
|
2683
2690
|
* This flag can be used to disable links inside the embedded app,
|
|
2684
|
-
* and
|
|
2691
|
+
* and disable redirection of links in a new tab.
|
|
2685
2692
|
* @example
|
|
2686
2693
|
* ```js
|
|
2687
2694
|
* const embed = new LiveboardEmbed('#embed', {
|
|
@@ -2693,7 +2700,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
2693
2700
|
disableRedirectionLinksInNewTab?: boolean;
|
|
2694
2701
|
/**
|
|
2695
2702
|
* Flag to control Data panel experience
|
|
2696
|
-
* @default
|
|
2703
|
+
* @default false
|
|
2697
2704
|
* @version SDK: 1.34.0 | Thoughtspot: 10.3.0.cl
|
|
2698
2705
|
* @example
|
|
2699
2706
|
* ```js
|
|
@@ -3801,22 +3808,26 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
3801
3808
|
*/
|
|
3802
3809
|
Rename = "rename",
|
|
3803
3810
|
/**
|
|
3804
|
-
* Emitted if the user wants to intercept the search execution
|
|
3805
|
-
* and implement logic to decide whether to run the search or not
|
|
3806
3811
|
*
|
|
3807
|
-
*
|
|
3812
|
+
* This event can be emitted to intercept search execution initiated by
|
|
3813
|
+
* the users and implement the logic to allow or restrict search execution.
|
|
3814
|
+
* You can can also show custom error text if the search query must be
|
|
3815
|
+
* restricted due to your application or business requirements.
|
|
3816
|
+
|
|
3817
|
+
* Prerequisite: Set `isOnBeforeGetVizDataInterceptEnabled` to `true`
|
|
3808
3818
|
* for this embed event to get emitted.
|
|
3809
3819
|
* @param: payload
|
|
3810
3820
|
* @param: responder
|
|
3811
3821
|
* Contains elements that lets developers define whether ThoughtSpot
|
|
3812
|
-
*
|
|
3822
|
+
* should run the search, and if not, what error message
|
|
3823
|
+
* should be shown to the user.
|
|
3813
3824
|
*
|
|
3814
|
-
* execute: When execute returns true
|
|
3815
|
-
* When execute returns false
|
|
3825
|
+
* execute: When execute returns `true`, the search will be run.
|
|
3826
|
+
* When execute returns `false`, the search will not be executed.
|
|
3816
3827
|
*
|
|
3817
|
-
* error: Developers can customize the
|
|
3818
|
-
*
|
|
3819
|
-
* @version SDK : 1.29.0 | Thoughtspot : 10.
|
|
3828
|
+
* error: Developers can customize the error message text when `execute`
|
|
3829
|
+
* returns `false` using the error parameter in responder.
|
|
3830
|
+
* @version SDK : 1.29.0 | Thoughtspot : 10.3.0.cl
|
|
3820
3831
|
* @example
|
|
3821
3832
|
*```js
|
|
3822
3833
|
* .on(EmbedEvent.OnBeforeGetVizDataIntercept,
|
|
@@ -3856,15 +3867,15 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
3856
3867
|
*/
|
|
3857
3868
|
OnBeforeGetVizDataIntercept = "onBeforeGetVizDataIntercept",
|
|
3858
3869
|
/**
|
|
3859
|
-
* Emitted when parameter changes in an
|
|
3860
|
-
* or
|
|
3870
|
+
* Emitted when parameter changes in an Answer
|
|
3871
|
+
* or Liveboard
|
|
3861
3872
|
*
|
|
3862
3873
|
* ```js
|
|
3863
3874
|
* liveboardEmbed.on(EmbedEvent.ParameterChanged, (payload) => {
|
|
3864
3875
|
* console.log('payload', payload);
|
|
3865
3876
|
* })
|
|
3866
3877
|
*```
|
|
3867
|
-
* @version SDK : 1.29.0 | Thoughtspot : 10.
|
|
3878
|
+
* @version SDK : 1.29.0 | Thoughtspot : 10.3.0.cl
|
|
3868
3879
|
*/
|
|
3869
3880
|
ParameterChanged = "parameterChanged"
|
|
3870
3881
|
}
|
|
@@ -4593,8 +4604,12 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
4593
4604
|
* see link:https://developers.thoughtspot.com/docs/runtime-filters#rtOperator[Developer Documentation].
|
|
4594
4605
|
*
|
|
4595
4606
|
* `values` - An array of one or several values. The value definition on the
|
|
4596
|
-
* data type you choose to filter on. For a complete list of supported data types,
|
|
4597
|
-
*
|
|
4607
|
+
* data type you choose to filter on. For a complete list of supported data types, see
|
|
4608
|
+
* link:https://developers.thoughtspot.com/docs/runtime-filters#_supported_data_types[Supported data types].
|
|
4609
|
+
*
|
|
4610
|
+
* `type` - To update filters for date time, specify the date format type.
|
|
4611
|
+
* For more information and examples, see link:https://developers.thoughtspot.com/docs/embed-liveboard#_date_filters[Date filters].
|
|
4612
|
+
*
|
|
4598
4613
|
* @example
|
|
4599
4614
|
* ```js
|
|
4600
4615
|
*
|
|
@@ -4724,7 +4739,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
4724
4739
|
*/
|
|
4725
4740
|
AskSage = "AskSage",
|
|
4726
4741
|
/**
|
|
4727
|
-
* Trigger
|
|
4742
|
+
* Trigger cross filter update action on a Liveboard
|
|
4728
4743
|
* @example
|
|
4729
4744
|
* ```js
|
|
4730
4745
|
* liveboardEmbed.trigger(HostEvent.UpdateCrossFilter, {
|
|
@@ -4739,7 +4754,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
4739
4754
|
*/
|
|
4740
4755
|
UpdateCrossFilter = "UpdateCrossFilter",
|
|
4741
4756
|
/**
|
|
4742
|
-
* Trigger
|
|
4757
|
+
* Trigger reset action for a personalized Liveboard view.
|
|
4743
4758
|
* @example
|
|
4744
4759
|
* ```js
|
|
4745
4760
|
* liveboardEmbed.trigger(HostEvent.ResetLiveboardPersonalisedView);
|
|
@@ -4879,7 +4894,8 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
4879
4894
|
ShowLiveboardVerifiedBadge = "showLiveboardVerifiedBadge",
|
|
4880
4895
|
ShowLiveboardReverifyBanner = "showLiveboardReverifyBanner",
|
|
4881
4896
|
LiveboardHeaderV2 = "isLiveboardHeaderV2Enabled",
|
|
4882
|
-
SpotterEnabled = "isSpotterExperienceEnabled"
|
|
4897
|
+
SpotterEnabled = "isSpotterExperienceEnabled",
|
|
4898
|
+
IsUnifiedSearchExperienceEnabled = "isUnifiedSearchExperienceEnabled"
|
|
4883
4899
|
}
|
|
4884
4900
|
/**
|
|
4885
4901
|
* ThoughtSpot application pages include actions and menu commands
|
|
@@ -5849,7 +5865,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
5849
5865
|
*/
|
|
5850
5866
|
AIHighlights = "AIHighlights",
|
|
5851
5867
|
/**
|
|
5852
|
-
* Action ID for edit schedule action on schedule on homepage
|
|
5868
|
+
* Action ID for edit the schedule action on schedule on homepage
|
|
5853
5869
|
* @example
|
|
5854
5870
|
* ```js
|
|
5855
5871
|
* disabledActions: [Action.EditScheduleHomepage]
|
|
@@ -5910,7 +5926,16 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
5910
5926
|
* ```
|
|
5911
5927
|
* @version SDK: 1.34.0 | Thoughtspot: 10.3.0.cl
|
|
5912
5928
|
*/
|
|
5913
|
-
KPIAnalysisCTA = "kpiAnalysisCTA"
|
|
5929
|
+
KPIAnalysisCTA = "kpiAnalysisCTA",
|
|
5930
|
+
/**
|
|
5931
|
+
* Action ID for disabling chip reorder in Answer and Liveboard
|
|
5932
|
+
* @example
|
|
5933
|
+
* ```js
|
|
5934
|
+
* const disabledActions = [Action.DisableChipReorder]
|
|
5935
|
+
* ```
|
|
5936
|
+
* @version SDK: 1.35.0 | Thoughtspot: 10.5.0.cl
|
|
5937
|
+
*/
|
|
5938
|
+
DisableChipReorder = "disableChipReorder"
|
|
5914
5939
|
}
|
|
5915
5940
|
export interface AnswerServiceType {
|
|
5916
5941
|
getAnswer?: (offset: number, batchSize: number) => any;
|
|
@@ -6070,8 +6095,8 @@ declare module '@thoughtspot/visual-embed-sdk/css-variables' {
|
|
|
6070
6095
|
/**
|
|
6071
6096
|
* Font color of the text on toggle buttons such as
|
|
6072
6097
|
* **All**, **Answers**, and **Liveboards** on the Home page (Classic experience),
|
|
6073
|
-
* the text color of the chart and table tiles on Home page (New modular Homepage
|
|
6074
|
-
* and title text on the AI-generated charts and tables.
|
|
6098
|
+
* the text color of the chart and table tiles on Home page (New modular Homepage
|
|
6099
|
+
* experience), and title text on the AI-generated charts and tables.
|
|
6075
6100
|
* The default color code is #2770EF.
|
|
6076
6101
|
*
|
|
6077
6102
|
*/
|
|
@@ -6819,7 +6844,6 @@ declare module '@thoughtspot/visual-embed-sdk/tokenizedFetch' {
|
|
|
6819
6844
|
* Fetch wrapper that adds the authentication token to the request.
|
|
6820
6845
|
* Use this to call the ThoughtSpot APIs when using the visual embed sdk.
|
|
6821
6846
|
* The interface for this method is the same as Web `Fetch`.
|
|
6822
|
-
*
|
|
6823
6847
|
* @param input
|
|
6824
6848
|
* @param init
|
|
6825
6849
|
* @example
|
package/package.json
CHANGED
package/src/auth.spec.ts
CHANGED
|
@@ -14,7 +14,7 @@ import * as SessionService from './utils/sessionInfoService';
|
|
|
14
14
|
const thoughtSpotHost = 'http://localhost:3000';
|
|
15
15
|
const username = 'tsuser';
|
|
16
16
|
const password = '12345678';
|
|
17
|
-
const samalLoginUrl = `${thoughtSpotHost}/callosum/v1/saml/login?targetURLPath=%
|
|
17
|
+
const samalLoginUrl = `${thoughtSpotHost}/callosum/v1/saml/login?targetURLPath=%23%3FtsSSOMarker%3D5e16222e-ef02-43e9-9fbd-24226bf3ce5b`;
|
|
18
18
|
|
|
19
19
|
export const embedConfig: any = {
|
|
20
20
|
doTokenAuthSuccess: (token: string) => ({
|
|
@@ -331,8 +331,8 @@ describe('Unit test for auth', () => {
|
|
|
331
331
|
spyOn(checkReleaseVersionInBetaInstance, 'checkReleaseVersionInBeta');
|
|
332
332
|
Object.defineProperty(window, 'location', {
|
|
333
333
|
value: {
|
|
334
|
-
href: authInstance.SSO_REDIRECTION_MARKER_GUID
|
|
335
|
-
hash:
|
|
334
|
+
href: `asd.com#?tsSSOMarker=${authInstance.SSO_REDIRECTION_MARKER_GUID}`,
|
|
335
|
+
hash: `?tsSSOMarker=${authInstance.SSO_REDIRECTION_MARKER_GUID}`,
|
|
336
336
|
},
|
|
337
337
|
});
|
|
338
338
|
jest.spyOn(tokenAuthService, 'fetchSessionInfoService').mockImplementation(
|
|
@@ -348,6 +348,12 @@ describe('Unit test for auth', () => {
|
|
|
348
348
|
});
|
|
349
349
|
|
|
350
350
|
it('when user is not loggedIn & isAtSSORedirectUrl is true', async () => {
|
|
351
|
+
Object.defineProperty(window, 'location', {
|
|
352
|
+
value: {
|
|
353
|
+
href: `asd.com#?tsSSOMarker=${authInstance.SSO_REDIRECTION_MARKER_GUID}`,
|
|
354
|
+
hash: `?tsSSOMarker=${authInstance.SSO_REDIRECTION_MARKER_GUID}`,
|
|
355
|
+
},
|
|
356
|
+
});
|
|
351
357
|
jest.spyOn(tokenAuthService, 'fetchSessionInfoService').mockImplementation(() => Promise.reject());
|
|
352
358
|
await authInstance.doSamlAuth(embedConfig.doSamlAuth);
|
|
353
359
|
expect(window.location.hash).toBe('');
|
|
@@ -401,6 +407,12 @@ describe('Unit test for auth', () => {
|
|
|
401
407
|
});
|
|
402
408
|
|
|
403
409
|
it('when user is not loggedIn & isAtSSORedirectUrl is true', async () => {
|
|
410
|
+
Object.defineProperty(window, 'location', {
|
|
411
|
+
value: {
|
|
412
|
+
href: `asd.com#?tsSSOMarker=${authInstance.SSO_REDIRECTION_MARKER_GUID}`,
|
|
413
|
+
hash: `?tsSSOMarker=${authInstance.SSO_REDIRECTION_MARKER_GUID}`,
|
|
414
|
+
},
|
|
415
|
+
});
|
|
404
416
|
jest.spyOn(tokenAuthService, 'fetchSessionInfoService').mockImplementation(() => Promise.reject());
|
|
405
417
|
await authInstance.doOIDCAuth(embedConfig.doOidcAuth);
|
|
406
418
|
expect(window.location.hash).toBe('');
|
package/src/auth.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { initMixpanel } from './mixpanel-service';
|
|
|
5
5
|
import {
|
|
6
6
|
AuthType, DOMSelector, EmbedConfig, EmbedEvent,
|
|
7
7
|
} from './types';
|
|
8
|
-
import { getDOMNode, getRedirectUrl } from './utils';
|
|
8
|
+
import { getDOMNode, getRedirectUrl, getSSOMarker } from './utils';
|
|
9
9
|
import {
|
|
10
10
|
EndPoints,
|
|
11
11
|
fetchAuthPostService,
|
|
@@ -245,7 +245,7 @@ export function getReleaseVersion() {
|
|
|
245
245
|
* Check if we are stuck at the SSO redirect URL
|
|
246
246
|
*/
|
|
247
247
|
function isAtSSORedirectUrl(): boolean {
|
|
248
|
-
return window.location.href.indexOf(SSO_REDIRECTION_MARKER_GUID) >= 0;
|
|
248
|
+
return window.location.href.indexOf(getSSOMarker(SSO_REDIRECTION_MARKER_GUID)) >= 0;
|
|
249
249
|
}
|
|
250
250
|
|
|
251
251
|
/**
|
|
@@ -257,7 +257,11 @@ function removeSSORedirectUrlMarker(): void {
|
|
|
257
257
|
// reload the page which we don't want. We'll live with adding an
|
|
258
258
|
// unnecessary hash to the parent page URL until we find any use case where
|
|
259
259
|
// that creates an issue.
|
|
260
|
-
|
|
260
|
+
|
|
261
|
+
// Replace any occurences of ?ssoMarker=guid or &ssoMarker=guid.
|
|
262
|
+
let updatedHash = window.location.hash.replace(`?${getSSOMarker(SSO_REDIRECTION_MARKER_GUID)}`, '');
|
|
263
|
+
updatedHash = updatedHash.replace(`&${getSSOMarker(SSO_REDIRECTION_MARKER_GUID)}`, '');
|
|
264
|
+
window.location.hash = updatedHash;
|
|
261
265
|
}
|
|
262
266
|
|
|
263
267
|
/**
|
package/src/css-variables.ts
CHANGED
|
@@ -26,8 +26,8 @@ export interface CustomCssVariables {
|
|
|
26
26
|
/**
|
|
27
27
|
* Font color of the text on toggle buttons such as
|
|
28
28
|
* **All**, **Answers**, and **Liveboards** on the Home page (Classic experience),
|
|
29
|
-
* the text color of the chart and table tiles on Home page (New modular Homepage
|
|
30
|
-
* and title text on the AI-generated charts and tables.
|
|
29
|
+
* the text color of the chart and table tiles on Home page (New modular Homepage
|
|
30
|
+
* experience), and title text on the AI-generated charts and tables.
|
|
31
31
|
* The default color code is #2770EF.
|
|
32
32
|
*
|
|
33
33
|
*/
|
package/src/embed/app.spec.ts
CHANGED
|
@@ -405,6 +405,21 @@ describe('App embed tests', () => {
|
|
|
405
405
|
});
|
|
406
406
|
});
|
|
407
407
|
|
|
408
|
+
test('Should add isUnifiedSearchExperienceEnabled flag to the iframe src', async () => {
|
|
409
|
+
const appEmbed = new AppEmbed(getRootEl(), {
|
|
410
|
+
...defaultViewConfig,
|
|
411
|
+
isUnifiedSearchExperienceEnabled: false,
|
|
412
|
+
} as AppViewConfig);
|
|
413
|
+
|
|
414
|
+
appEmbed.render();
|
|
415
|
+
await executeAfterWait(() => {
|
|
416
|
+
expectUrlMatchesWithParams(
|
|
417
|
+
getIFrameSrc(),
|
|
418
|
+
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isUnifiedSearchExperienceEnabled=false${defaultParams}${defaultParamsPost}#/home`,
|
|
419
|
+
);
|
|
420
|
+
});
|
|
421
|
+
});
|
|
422
|
+
|
|
408
423
|
test('Should add showLiveboardVerifiedBadge flag to the iframe src', async () => {
|
|
409
424
|
const appEmbed = new AppEmbed(getRootEl(), {
|
|
410
425
|
...defaultViewConfig,
|
package/src/embed/app.ts
CHANGED
|
@@ -366,7 +366,7 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
|
|
|
366
366
|
*/
|
|
367
367
|
dataPanelCustomGroupsAccordionInitialState?: DataPanelCustomColumnGroupsAccordionState;
|
|
368
368
|
/**
|
|
369
|
-
* This
|
|
369
|
+
* This attribute can be used to enable the two-column layout on an embedded Liveboard
|
|
370
370
|
* @type {boolean}
|
|
371
371
|
* @default false
|
|
372
372
|
* @version SDK: 1.32.0 | ThoughtSpot:10.1.0.cl
|
|
@@ -380,17 +380,17 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
|
|
|
380
380
|
*/
|
|
381
381
|
enable2ColumnLayout?: boolean;
|
|
382
382
|
/**
|
|
383
|
-
* Flag
|
|
383
|
+
* Flag that allows using `EmbedEvent.OnBeforeGetVizDataIntercept`.
|
|
384
384
|
* @version SDK : 1.29.0 | Thoughtspot : 10.1.0.cl
|
|
385
385
|
*/
|
|
386
386
|
isOnBeforeGetVizDataInterceptEnabled?: boolean;
|
|
387
387
|
/**
|
|
388
388
|
* Flag to use home page search bar mode
|
|
389
|
-
* @version SDK : 1.33.0 | Thoughtspot : 10.
|
|
389
|
+
* @version SDK : 1.33.0 | Thoughtspot : 10.3.0.cl
|
|
390
390
|
*/
|
|
391
391
|
homePageSearchBarMode?: HomePageSearchBarMode;
|
|
392
392
|
/**
|
|
393
|
-
* This flag
|
|
393
|
+
* This flag can be used to enable the compact header in Liveboard
|
|
394
394
|
* @type {boolean}
|
|
395
395
|
* @default false
|
|
396
396
|
* @version SDK: 1.35.0 | ThoughtSpot:10.3.0.cl
|
|
@@ -404,7 +404,7 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
|
|
|
404
404
|
*/
|
|
405
405
|
isLiveboardCompactHeaderEnabled?: boolean;
|
|
406
406
|
/**
|
|
407
|
-
* This flag
|
|
407
|
+
* This flag can be used to show or hide the Liveboard verified icon in the compact header.
|
|
408
408
|
* @type {boolean}
|
|
409
409
|
* @default true
|
|
410
410
|
* @version SDK: 1.35.0 | ThoughtSpot:10.4.0.cl
|
|
@@ -418,7 +418,7 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
|
|
|
418
418
|
*/
|
|
419
419
|
showLiveboardVerifiedBadge?: boolean;
|
|
420
420
|
/**
|
|
421
|
-
* This flag
|
|
421
|
+
* This flag can be used to show or hide the re-verify banner on the Liveboard compact header
|
|
422
422
|
* @type {boolean}
|
|
423
423
|
* @default true
|
|
424
424
|
* @version SDK: 1.35.0 | ThoughtSpot:10.4.0.cl
|
|
@@ -431,6 +431,20 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
|
|
|
431
431
|
* ```
|
|
432
432
|
*/
|
|
433
433
|
showLiveboardReverifyBanner?: boolean;
|
|
434
|
+
/**
|
|
435
|
+
* This flag is used to enable unified search experience for full app embed.
|
|
436
|
+
* @type {boolean}
|
|
437
|
+
* @default true
|
|
438
|
+
* @version SDK: 1.34.0 | ThoughtSpot:10.5.0.cl
|
|
439
|
+
* @example
|
|
440
|
+
* ```js
|
|
441
|
+
* const embed = new AppEmbed('#embed-container', {
|
|
442
|
+
* ... // other options
|
|
443
|
+
* isUnifiedSearchExperienceEnabled: true,
|
|
444
|
+
* })
|
|
445
|
+
* ```
|
|
446
|
+
*/
|
|
447
|
+
isUnifiedSearchExperienceEnabled?: boolean;
|
|
434
448
|
}
|
|
435
449
|
|
|
436
450
|
/**
|
|
@@ -468,7 +482,7 @@ export class AppEmbed extends V1Embed {
|
|
|
468
482
|
hideOrgSwitcher,
|
|
469
483
|
enableSearchAssist,
|
|
470
484
|
fullHeight,
|
|
471
|
-
dataPanelV2 =
|
|
485
|
+
dataPanelV2 = false,
|
|
472
486
|
hideLiveboardHeader = false,
|
|
473
487
|
showLiveboardTitle = true,
|
|
474
488
|
showLiveboardDescription = true,
|
|
@@ -487,6 +501,7 @@ export class AppEmbed extends V1Embed {
|
|
|
487
501
|
showLiveboardVerifiedBadge = true,
|
|
488
502
|
showLiveboardReverifyBanner = true,
|
|
489
503
|
homePageSearchBarMode,
|
|
504
|
+
isUnifiedSearchExperienceEnabled = true,
|
|
490
505
|
} = this.viewConfig;
|
|
491
506
|
|
|
492
507
|
let params = {};
|
|
@@ -503,6 +518,7 @@ export class AppEmbed extends V1Embed {
|
|
|
503
518
|
params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
|
|
504
519
|
params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;
|
|
505
520
|
params[Param.ShowLiveboardReverifyBanner] = showLiveboardReverifyBanner;
|
|
521
|
+
params[Param.IsUnifiedSearchExperienceEnabled] = isUnifiedSearchExperienceEnabled;
|
|
506
522
|
|
|
507
523
|
params = this.getBaseQueryParams(params);
|
|
508
524
|
|
package/src/embed/base.spec.ts
CHANGED
|
@@ -56,7 +56,7 @@ describe('Base TS Embed', () => {
|
|
|
56
56
|
authEE.on(auth.AuthStatus.FAILURE, (reason) => {
|
|
57
57
|
expect(reason).toEqual(auth.AuthFailureType.NO_COOKIE_ACCESS);
|
|
58
58
|
expect(window.alert).toBeCalledWith(
|
|
59
|
-
'Third
|
|
59
|
+
'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.',
|
|
60
60
|
);
|
|
61
61
|
done();
|
|
62
62
|
});
|
|
@@ -411,6 +411,18 @@ describe('Base TS Embed', () => {
|
|
|
411
411
|
});
|
|
412
412
|
expect(embedConfigInstance.getEmbedConfig().inPopup).toBe(false);
|
|
413
413
|
});
|
|
414
|
+
test('@P0 @SCAL-226935 embedConfig should contain correct value of customCSSUrl when added in init ', async () => {
|
|
415
|
+
index.init({
|
|
416
|
+
thoughtSpotHost,
|
|
417
|
+
authType: index.AuthType.None,
|
|
418
|
+
customizations: {
|
|
419
|
+
style: {
|
|
420
|
+
customCSSUrl: 'test.com',
|
|
421
|
+
},
|
|
422
|
+
},
|
|
423
|
+
});
|
|
424
|
+
expect(embedConfigInstance.getEmbedConfig().customizations.style.customCSSUrl).toEqual('test.com');
|
|
425
|
+
});
|
|
414
426
|
});
|
|
415
427
|
|
|
416
428
|
describe('Base without init', () => {
|
|
@@ -14,6 +14,7 @@ import {
|
|
|
14
14
|
defaultParamsWithoutHiddenActions as defaultParams,
|
|
15
15
|
expectUrlMatchesWithParams,
|
|
16
16
|
} from '../test/test-utils';
|
|
17
|
+
import { ERROR_MESSAGE } from '../errors';
|
|
17
18
|
|
|
18
19
|
const thoughtSpotHost = 'tshost';
|
|
19
20
|
|
|
@@ -43,4 +44,19 @@ describe('ConversationEmbed', () => {
|
|
|
43
44
|
`http://${thoughtSpotHost}/v2/?${defaultParams}&isSpotterExperienceEnabled=true#/embed/insights/conv-assist?worksheet=worksheetId&query=searchQuery`,
|
|
44
45
|
);
|
|
45
46
|
});
|
|
47
|
+
|
|
48
|
+
it('should handle error when worksheetId is not provided', async () => {
|
|
49
|
+
const viewConfig: ConversationViewConfig = {
|
|
50
|
+
worksheetId: '',
|
|
51
|
+
searchOptions: {
|
|
52
|
+
searchQuery: 'searchQuery',
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
const conversationEmbed = new ConversationEmbed(getRootEl(), viewConfig);
|
|
56
|
+
(conversationEmbed as any).handleError = jest.fn();
|
|
57
|
+
await conversationEmbed.render();
|
|
58
|
+
expect((conversationEmbed as any).handleError).toHaveBeenCalledWith(
|
|
59
|
+
ERROR_MESSAGE.SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND,
|
|
60
|
+
);
|
|
61
|
+
});
|
|
46
62
|
});
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ERROR_MESSAGE } from '../errors';
|
|
1
2
|
import { ViewConfig, Param } from '../types';
|
|
2
3
|
import { TsEmbed } from './ts-embed';
|
|
3
4
|
import { getQueryParamString } from '../utils';
|
|
@@ -49,6 +50,9 @@ export class ConversationEmbed extends TsEmbed {
|
|
|
49
50
|
searchOptions,
|
|
50
51
|
} = this.viewConfig;
|
|
51
52
|
const path = 'insights/conv-assist';
|
|
53
|
+
if (!worksheetId) {
|
|
54
|
+
this.handleError(ERROR_MESSAGE.SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND);
|
|
55
|
+
}
|
|
52
56
|
const queryParams = this.getBaseQueryParams();
|
|
53
57
|
queryParams[Param.SpotterEnabled] = true;
|
|
54
58
|
|