@thoughtspot/visual-embed-sdk 1.32.1 → 1.32.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/package.json +4 -22
- package/cjs/src/css-variables.d.ts +28 -0
- package/cjs/src/css-variables.d.ts.map +1 -1
- package/cjs/src/embed/app.d.ts +15 -14
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +18 -3
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/app.spec.js +32 -0
- package/cjs/src/embed/app.spec.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +2 -1
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/liveboard.spec.js +10 -0
- package/cjs/src/embed/liveboard.spec.js.map +1 -1
- package/cjs/src/embed/search.d.ts +0 -13
- package/cjs/src/embed/search.d.ts.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 +9 -9
- package/cjs/src/embed/search.spec.js.map +1 -1
- package/cjs/src/mixpanel-service.d.ts +4 -0
- package/cjs/src/mixpanel-service.d.ts.map +1 -1
- package/cjs/src/mixpanel-service.js +4 -0
- package/cjs/src/mixpanel-service.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/types.d.ts +25 -14
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +11 -13
- package/cjs/src/types.js.map +1 -1
- package/dist/src/css-variables.d.ts +28 -0
- package/dist/src/css-variables.d.ts.map +1 -1
- package/dist/src/embed/app.d.ts +15 -14
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/embed/search.d.ts +0 -13
- package/dist/src/embed/search.d.ts.map +1 -1
- package/dist/src/mixpanel-service.d.ts +4 -0
- package/dist/src/mixpanel-service.d.ts.map +1 -1
- package/dist/src/types.d.ts +25 -14
- package/dist/src/types.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +36 -18
- package/dist/tsembed-react.js +36 -18
- package/dist/tsembed.es.js +36 -18
- package/dist/tsembed.js +36 -18
- package/dist/visual-embed-sdk-react-full.d.ts +72 -41
- package/dist/visual-embed-sdk-react.d.ts +72 -41
- package/dist/visual-embed-sdk.d.ts +72 -41
- package/lib/package.json +4 -22
- package/lib/src/css-variables.d.ts +28 -0
- package/lib/src/css-variables.d.ts.map +1 -1
- package/lib/src/embed/app.d.ts +15 -14
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +17 -2
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/app.spec.js +33 -1
- package/lib/src/embed/app.spec.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +2 -1
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +10 -0
- package/lib/src/embed/liveboard.spec.js.map +1 -1
- package/lib/src/embed/search.d.ts +0 -13
- package/lib/src/embed/search.d.ts.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 +9 -9
- package/lib/src/embed/search.spec.js.map +1 -1
- package/lib/src/mixpanel-service.d.ts +4 -0
- package/lib/src/mixpanel-service.d.ts.map +1 -1
- package/lib/src/mixpanel-service.js +4 -0
- package/lib/src/mixpanel-service.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/types.d.ts +25 -14
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +11 -13
- package/lib/src/types.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +72 -41
- package/package.json +4 -22
- package/src/css-variables.ts +28 -0
- package/src/embed/app.spec.ts +48 -0
- package/src/embed/app.ts +22 -14
- package/src/embed/liveboard.spec.ts +14 -0
- package/src/embed/liveboard.ts +2 -0
- package/src/embed/search.spec.ts +9 -9
- package/src/embed/search.ts +1 -14
- package/src/mixpanel-service.ts +4 -0
- package/src/react/index.spec.tsx +1 -1
- package/src/types.ts +35 -23
package/src/embed/app.spec.ts
CHANGED
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
AppViewConfig,
|
|
4
4
|
DataPanelCustomColumnGroupsAccordionState,
|
|
5
5
|
Page,
|
|
6
|
+
HomePageSearchBarMode,
|
|
6
7
|
} from './app';
|
|
7
8
|
import { init } from '../index';
|
|
8
9
|
import {
|
|
@@ -137,6 +138,7 @@ describe('App embed tests', () => {
|
|
|
137
138
|
[Page.Data]: 'data/tables',
|
|
138
139
|
[Page.Home]: 'home',
|
|
139
140
|
[Page.SpotIQ]: 'insights/results',
|
|
141
|
+
[Page.Monitor]: 'insights/monitor-alerts',
|
|
140
142
|
};
|
|
141
143
|
|
|
142
144
|
const pageIds = Object.keys(pageRouteMap);
|
|
@@ -169,6 +171,7 @@ describe('App embed tests', () => {
|
|
|
169
171
|
[Page.Data]: 'data/tables',
|
|
170
172
|
[Page.Home]: 'home',
|
|
171
173
|
[Page.SpotIQ]: 'home/spotiq-analysis',
|
|
174
|
+
[Page.Monitor]: 'home/monitor-alerts',
|
|
172
175
|
};
|
|
173
176
|
|
|
174
177
|
const pageIdsForModularHomes = Object.keys(pageRouteMapForModularHome);
|
|
@@ -431,6 +434,51 @@ describe('App embed tests', () => {
|
|
|
431
434
|
});
|
|
432
435
|
});
|
|
433
436
|
|
|
437
|
+
test('Should add HomePageSearchBarMode flag with object search to the iframe src', async () => {
|
|
438
|
+
const appEmbed = new AppEmbed(getRootEl(), {
|
|
439
|
+
...defaultViewConfig,
|
|
440
|
+
homePageSearchBarMode: HomePageSearchBarMode.OBJECT_SEARCH,
|
|
441
|
+
} as AppViewConfig);
|
|
442
|
+
|
|
443
|
+
await appEmbed.render();
|
|
444
|
+
await executeAfterWait(() => {
|
|
445
|
+
expectUrlMatchesWithParams(
|
|
446
|
+
getIFrameSrc(),
|
|
447
|
+
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=false&homePageSearchBarMode=objectSearch${defaultParams}${defaultParamsPost}#/home`,
|
|
448
|
+
);
|
|
449
|
+
});
|
|
450
|
+
});
|
|
451
|
+
|
|
452
|
+
test('Should add HomePageSearchBarMode flag with ai answer to the iframe src', async () => {
|
|
453
|
+
const appEmbed = new AppEmbed(getRootEl(), {
|
|
454
|
+
...defaultViewConfig,
|
|
455
|
+
homePageSearchBarMode: HomePageSearchBarMode.AI_ANSWER,
|
|
456
|
+
} as AppViewConfig);
|
|
457
|
+
|
|
458
|
+
await appEmbed.render();
|
|
459
|
+
await executeAfterWait(() => {
|
|
460
|
+
expectUrlMatchesWithParams(
|
|
461
|
+
getIFrameSrc(),
|
|
462
|
+
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=false&homePageSearchBarMode=aiAnswer${defaultParams}${defaultParamsPost}#/home`,
|
|
463
|
+
);
|
|
464
|
+
});
|
|
465
|
+
});
|
|
466
|
+
|
|
467
|
+
test('Should add HomePageSearchBarMode flag with none to the iframe src', async () => {
|
|
468
|
+
const appEmbed = new AppEmbed(getRootEl(), {
|
|
469
|
+
...defaultViewConfig,
|
|
470
|
+
homePageSearchBarMode: HomePageSearchBarMode.NONE,
|
|
471
|
+
} as AppViewConfig);
|
|
472
|
+
|
|
473
|
+
await appEmbed.render();
|
|
474
|
+
await executeAfterWait(() => {
|
|
475
|
+
expectUrlMatchesWithParams(
|
|
476
|
+
getIFrameSrc(),
|
|
477
|
+
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=false&homePageSearchBarMode=none${defaultParams}${defaultParamsPost}#/home`,
|
|
478
|
+
);
|
|
479
|
+
});
|
|
480
|
+
});
|
|
481
|
+
|
|
434
482
|
test('Should add dataPanelCustomGroupsAccordionInitialState flag to the iframe src', async () => {
|
|
435
483
|
const appEmbed = new AppEmbed(getRootEl(), {
|
|
436
484
|
...defaultViewConfig,
|
package/src/embed/app.ts
CHANGED
|
@@ -53,6 +53,10 @@ export enum Page {
|
|
|
53
53
|
* SpotIQ listing page
|
|
54
54
|
*/
|
|
55
55
|
SpotIQ = 'insights',
|
|
56
|
+
/**
|
|
57
|
+
* Monitor Alerts Page
|
|
58
|
+
*/
|
|
59
|
+
Monitor = 'monitor'
|
|
56
60
|
}
|
|
57
61
|
|
|
58
62
|
/**
|
|
@@ -74,6 +78,11 @@ export enum DataPanelCustomColumnGroupsAccordionState {
|
|
|
74
78
|
EXPAND_FIRST = 'EXPAND_FIRST',
|
|
75
79
|
}
|
|
76
80
|
|
|
81
|
+
export enum HomePageSearchBarMode {
|
|
82
|
+
OBJECT_SEARCH = 'objectSearch',
|
|
83
|
+
AI_ANSWER = 'aiAnswer',
|
|
84
|
+
NONE = 'none'
|
|
85
|
+
}
|
|
77
86
|
/**
|
|
78
87
|
* The view configuration for full app embedding.
|
|
79
88
|
* @group Embed components
|
|
@@ -260,19 +269,6 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
|
|
|
260
269
|
* ```
|
|
261
270
|
*/
|
|
262
271
|
fullHeight?: boolean;
|
|
263
|
-
/**
|
|
264
|
-
* Flag to control Data panel experience
|
|
265
|
-
* @default false
|
|
266
|
-
* @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
|
|
267
|
-
* @example
|
|
268
|
-
* ```js
|
|
269
|
-
* const embed = new AppEmbed('#tsEmbed', {
|
|
270
|
-
* ... // other options
|
|
271
|
-
* dataPanelV2: true,
|
|
272
|
-
* })
|
|
273
|
-
* ```
|
|
274
|
-
*/
|
|
275
|
-
dataPanelV2?: boolean;
|
|
276
272
|
/**
|
|
277
273
|
* Show or hide Liveboard header
|
|
278
274
|
* @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
|
|
@@ -401,6 +397,11 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
|
|
|
401
397
|
* @version SDK : 1.29.0 | Thoughtspot : 10.1.0.cl
|
|
402
398
|
*/
|
|
403
399
|
isOnBeforeGetVizDataInterceptEnabled?: boolean;
|
|
400
|
+
/**
|
|
401
|
+
* Flag to use home page search bar mode
|
|
402
|
+
* @version SDK : 1.33.0 | Thoughtspot : 10.2.0.cl
|
|
403
|
+
*/
|
|
404
|
+
homePageSearchBarMode?: HomePageSearchBarMode;
|
|
404
405
|
}
|
|
405
406
|
|
|
406
407
|
/**
|
|
@@ -438,7 +439,7 @@ export class AppEmbed extends V1Embed {
|
|
|
438
439
|
hideOrgSwitcher,
|
|
439
440
|
enableSearchAssist,
|
|
440
441
|
fullHeight,
|
|
441
|
-
dataPanelV2 =
|
|
442
|
+
dataPanelV2 = true,
|
|
442
443
|
hideLiveboardHeader = false,
|
|
443
444
|
showLiveboardTitle = true,
|
|
444
445
|
showLiveboardDescription = true,
|
|
@@ -453,6 +454,7 @@ export class AppEmbed extends V1Embed {
|
|
|
453
454
|
/* eslint-disable-next-line max-len */
|
|
454
455
|
dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL,
|
|
455
456
|
collapseSearchBar = true,
|
|
457
|
+
homePageSearchBarMode,
|
|
456
458
|
} = this.viewConfig;
|
|
457
459
|
|
|
458
460
|
let params = {};
|
|
@@ -502,6 +504,10 @@ export class AppEmbed extends V1Embed {
|
|
|
502
504
|
] = isOnBeforeGetVizDataInterceptEnabled;
|
|
503
505
|
}
|
|
504
506
|
|
|
507
|
+
if (homePageSearchBarMode) {
|
|
508
|
+
params[Param.HomePageSearchBarMode] = homePageSearchBarMode;
|
|
509
|
+
}
|
|
510
|
+
|
|
505
511
|
params[Param.DataPanelV2Enabled] = dataPanelV2;
|
|
506
512
|
params[Param.HideHomepageLeftNav] = hideHomepageLeftNav;
|
|
507
513
|
params[Param.ModularHomeExperienceEnabled] = modularHomeExperience;
|
|
@@ -580,6 +586,8 @@ export class AppEmbed extends V1Embed {
|
|
|
580
586
|
return 'data/tables';
|
|
581
587
|
case Page.SpotIQ:
|
|
582
588
|
return modularHomeExperience ? 'home/spotiq-analysis' : 'insights/results';
|
|
589
|
+
case Page.Monitor:
|
|
590
|
+
return modularHomeExperience ? 'home/monitor-alerts' : 'insights/monitor-alerts';
|
|
583
591
|
case Page.Home:
|
|
584
592
|
default:
|
|
585
593
|
return 'home';
|
|
@@ -67,6 +67,20 @@ describe('Liveboard/viz embed tests', () => {
|
|
|
67
67
|
});
|
|
68
68
|
});
|
|
69
69
|
|
|
70
|
+
test('should render liveboard with data panel v2 flag set to true by default', async () => {
|
|
71
|
+
const liveboardEmbed = new LiveboardEmbed(getRootEl(), {
|
|
72
|
+
...defaultViewConfig,
|
|
73
|
+
liveboardId,
|
|
74
|
+
} as LiveboardViewConfig);
|
|
75
|
+
liveboardEmbed.render();
|
|
76
|
+
await executeAfterWait(() => {
|
|
77
|
+
expectUrlMatchesWithParams(
|
|
78
|
+
getIFrameSrc(),
|
|
79
|
+
`http://${thoughtSpotHost}/?embedApp=true${defaultParams}${prefixParams}&enableDataPanelV2=true#/embed/viz/${liveboardId}`,
|
|
80
|
+
);
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
|
|
70
84
|
test('should set disabled actions', async () => {
|
|
71
85
|
const liveboardEmbed = new LiveboardEmbed(getRootEl(), {
|
|
72
86
|
disabledActions: [Action.DownloadAsCsv, Action.DownloadAsPdf, Action.DownloadAsXlsx],
|
package/src/embed/liveboard.ts
CHANGED
|
@@ -340,6 +340,7 @@ export class LiveboardEmbed extends V1Embed {
|
|
|
340
340
|
isLiveboardHeaderSticky = true,
|
|
341
341
|
enableAskSage,
|
|
342
342
|
enable2ColumnLayout,
|
|
343
|
+
dataPanelV2 = true,
|
|
343
344
|
} = this.viewConfig;
|
|
344
345
|
|
|
345
346
|
const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
|
|
@@ -388,6 +389,7 @@ export class LiveboardEmbed extends V1Embed {
|
|
|
388
389
|
|
|
389
390
|
params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
|
|
390
391
|
|
|
392
|
+
params[Param.DataPanelV2Enabled] = dataPanelV2;
|
|
391
393
|
const queryParams = getQueryParamString(params, true);
|
|
392
394
|
|
|
393
395
|
return queryParams;
|
package/src/embed/search.spec.ts
CHANGED
|
@@ -52,7 +52,7 @@ describe('Search embed tests', () => {
|
|
|
52
52
|
await executeAfterWait(() => {
|
|
53
53
|
expectUrlMatchesWithParams(
|
|
54
54
|
getIFrameSrc(),
|
|
55
|
-
`http://${thoughtSpotHost}/v2/?${defaultParamsWithHiddenActions}&enableDataPanelV2=
|
|
55
|
+
`http://${thoughtSpotHost}/v2/?${defaultParamsWithHiddenActions}&enableDataPanelV2=true&dataSourceMode=expand&useLastSelectedSources=false${prefixParams}#/embed/answer`,
|
|
56
56
|
);
|
|
57
57
|
});
|
|
58
58
|
});
|
|
@@ -416,16 +416,16 @@ describe('Search embed tests', () => {
|
|
|
416
416
|
});
|
|
417
417
|
});
|
|
418
418
|
|
|
419
|
-
test('should set enableDataPanelV2 to
|
|
419
|
+
test('should set enableDataPanelV2 to false if data panel v2 flag is false', async () => {
|
|
420
420
|
const searchEmbed = new SearchEmbed(getRootEl(), {
|
|
421
421
|
...defaultViewConfig,
|
|
422
|
-
dataPanelV2:
|
|
422
|
+
dataPanelV2: false,
|
|
423
423
|
});
|
|
424
424
|
searchEmbed.render();
|
|
425
425
|
await executeAfterWait(() => {
|
|
426
426
|
expectUrlMatchesWithParams(
|
|
427
427
|
getIFrameSrc(),
|
|
428
|
-
`http://${thoughtSpotHost}/v2/?${defaultParamsWithHiddenActions}&dataSourceMode=expand&enableDataPanelV2=
|
|
428
|
+
`http://${thoughtSpotHost}/v2/?${defaultParamsWithHiddenActions}&dataSourceMode=expand&enableDataPanelV2=false&useLastSelectedSources=false${prefixParams}#/embed/saved-answer/${answerId}`,
|
|
429
429
|
);
|
|
430
430
|
});
|
|
431
431
|
});
|
|
@@ -438,7 +438,7 @@ describe('Search embed tests', () => {
|
|
|
438
438
|
await executeAfterWait(() => {
|
|
439
439
|
expectUrlMatchesWithParams(
|
|
440
440
|
getIFrameSrc(),
|
|
441
|
-
`http://${thoughtSpotHost}/v2/?${defaultParamsWithHiddenActions}&dataSourceMode=expand&enableDataPanelV2=
|
|
441
|
+
`http://${thoughtSpotHost}/v2/?${defaultParamsWithHiddenActions}&dataSourceMode=expand&enableDataPanelV2=true&useLastSelectedSources=true${prefixParams}#/embed/saved-answer/${answerId}`,
|
|
442
442
|
);
|
|
443
443
|
});
|
|
444
444
|
});
|
|
@@ -453,7 +453,7 @@ describe('Search embed tests', () => {
|
|
|
453
453
|
await executeAfterWait(() => {
|
|
454
454
|
expectUrlMatchesWithParams(
|
|
455
455
|
getIFrameSrc(),
|
|
456
|
-
`http://${thoughtSpotHost}/v2/?${defaultParamsWithHiddenActions}&dataSources=[%22data-source-1%22]&dataSourceMode=expand&enableDataPanelV2=
|
|
456
|
+
`http://${thoughtSpotHost}/v2/?${defaultParamsWithHiddenActions}&dataSources=[%22data-source-1%22]&dataSourceMode=expand&enableDataPanelV2=true&useLastSelectedSources=false${prefixParams}#/embed/saved-answer/${answerId}`,
|
|
457
457
|
);
|
|
458
458
|
});
|
|
459
459
|
});
|
|
@@ -468,7 +468,7 @@ describe('Search embed tests', () => {
|
|
|
468
468
|
await executeAfterWait(() => {
|
|
469
469
|
expectUrlMatchesWithParams(
|
|
470
470
|
getIFrameSrc(),
|
|
471
|
-
`http://${thoughtSpotHost}/v2/?${defaultParamsWithHiddenActions}&dataSources=[%22data-source-1%22]&dataSourceMode=expand&enableDataPanelV2=
|
|
471
|
+
`http://${thoughtSpotHost}/v2/?${defaultParamsWithHiddenActions}&dataSources=[%22data-source-1%22]&dataSourceMode=expand&enableDataPanelV2=true&useLastSelectedSources=false${prefixParams}#/embed/saved-answer/${answerId}`,
|
|
472
472
|
);
|
|
473
473
|
});
|
|
474
474
|
});
|
|
@@ -499,7 +499,7 @@ describe('Search embed tests', () => {
|
|
|
499
499
|
await executeAfterWait(() => {
|
|
500
500
|
expectUrlMatchesWithParams(
|
|
501
501
|
getIFrameSrc(),
|
|
502
|
-
`http://${thoughtSpotHost}/v2/?${defaultParamsWithHiddenActions}&dataSourceMode=expand&enableDataPanelV2=
|
|
502
|
+
`http://${thoughtSpotHost}/v2/?${defaultParamsWithHiddenActions}&dataSourceMode=expand&enableDataPanelV2=true&useLastSelectedSources=false&hideSearchBar=true${prefixParams}#/embed/saved-answer/${answerId}`,
|
|
503
503
|
);
|
|
504
504
|
});
|
|
505
505
|
});
|
|
@@ -514,7 +514,7 @@ describe('Search embed tests', () => {
|
|
|
514
514
|
await executeAfterWait(() => {
|
|
515
515
|
expectUrlMatchesWithParams(
|
|
516
516
|
getIFrameSrc(),
|
|
517
|
-
`http://${thoughtSpotHost}/v2/?${defaultParamsWithHiddenActions}&dataSourceMode=expand&enableDataPanelV2=
|
|
517
|
+
`http://${thoughtSpotHost}/v2/?${defaultParamsWithHiddenActions}&dataSourceMode=expand&enableDataPanelV2=true&useLastSelectedSources=false&dataPanelCustomGroupsAccordionInitialState=EXPAND_FIRST${prefixParams}#/embed/saved-answer/${answerId}`,
|
|
518
518
|
);
|
|
519
519
|
});
|
|
520
520
|
});
|
package/src/embed/search.ts
CHANGED
|
@@ -227,19 +227,6 @@ export interface SearchViewConfig
|
|
|
227
227
|
* ```
|
|
228
228
|
*/
|
|
229
229
|
hideSearchBar?: boolean;
|
|
230
|
-
/**
|
|
231
|
-
* Flag to control Data panel experience
|
|
232
|
-
* @default false
|
|
233
|
-
* @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
|
|
234
|
-
* @example
|
|
235
|
-
* ```js
|
|
236
|
-
* const embed = new SearchEmbed('#tsEmbed', {
|
|
237
|
-
* ... // other options
|
|
238
|
-
* dataPanelV2:false,
|
|
239
|
-
* })
|
|
240
|
-
* ```
|
|
241
|
-
*/
|
|
242
|
-
dataPanelV2?: boolean;
|
|
243
230
|
/**
|
|
244
231
|
* Flag to set if last selected dataSource should be used
|
|
245
232
|
* @version: SDK: 1.24.0
|
|
@@ -356,7 +343,7 @@ export class SearchEmbed extends TsEmbed {
|
|
|
356
343
|
dataSources,
|
|
357
344
|
excludeRuntimeFiltersfromURL,
|
|
358
345
|
hideSearchBar,
|
|
359
|
-
dataPanelV2 =
|
|
346
|
+
dataPanelV2 = true,
|
|
360
347
|
useLastSelectedSources = false,
|
|
361
348
|
runtimeParameters,
|
|
362
349
|
collapseSearchBarInitially = false,
|
package/src/mixpanel-service.ts
CHANGED
|
@@ -11,6 +11,10 @@ export const EndPoints = {
|
|
|
11
11
|
const mixpanelLib = mixpanel.default || mixpanel;
|
|
12
12
|
let mixpanelInstance: mixpanel.Mixpanel;
|
|
13
13
|
|
|
14
|
+
/**
|
|
15
|
+
* Enum of mixpanel events
|
|
16
|
+
* @hidden
|
|
17
|
+
*/
|
|
14
18
|
export const MIXPANEL_EVENT = {
|
|
15
19
|
VISUAL_SDK_RENDER_START: 'visual-sdk-render-start',
|
|
16
20
|
VISUAL_SDK_CALLED_INIT: 'visual-sdk-called-init',
|
package/src/react/index.spec.tsx
CHANGED
|
@@ -56,7 +56,7 @@ describe('React Components', () => {
|
|
|
56
56
|
),
|
|
57
57
|
).toBe(true);
|
|
58
58
|
expect(getIFrameSrc(container)).toBe(
|
|
59
|
-
`http://${thoughtSpotHost}/?hostAppUrl=local-host&viewPortHeight=768&viewPortWidth=1024&sdkVersion=${version}&authType=None&blockNonEmbedFullAppAccess=true&hideAction=[%22${Action.ReportError}%22,%22editACopy%22,%22saveAsView%22,%22updateTSL%22,%22editTSL%22,%22onDeleteAnswer%22]&overrideConsoleLogs=true&clientLogLevel=ERROR&enableDataPanelV2=
|
|
59
|
+
`http://${thoughtSpotHost}/?hostAppUrl=local-host&viewPortHeight=768&viewPortWidth=1024&sdkVersion=${version}&authType=None&blockNonEmbedFullAppAccess=true&hideAction=[%22${Action.ReportError}%22,%22editACopy%22,%22saveAsView%22,%22updateTSL%22,%22editTSL%22,%22onDeleteAnswer%22]&overrideConsoleLogs=true&clientLogLevel=ERROR&enableDataPanelV2=true&dataSourceMode=hide&useLastSelectedSources=false&isSearchEmbed=true&collapseSearchBarInitially=true&enableCustomColumnGroups=false&dataPanelCustomGroupsAccordionInitialState=EXPAND_ALL#/embed/answer`,
|
|
60
60
|
);
|
|
61
61
|
});
|
|
62
62
|
|
package/src/types.ts
CHANGED
|
@@ -592,7 +592,7 @@ export interface EmbedConfig {
|
|
|
592
592
|
}
|
|
593
593
|
|
|
594
594
|
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
595
|
-
export interface LayoutConfig {
|
|
595
|
+
export interface LayoutConfig {}
|
|
596
596
|
|
|
597
597
|
/**
|
|
598
598
|
* Embedded iframe configuration
|
|
@@ -1040,6 +1040,19 @@ export interface ViewConfig {
|
|
|
1040
1040
|
* @version SDK: 1.32.1 | ThoughtSpot: 10.3.0.cl
|
|
1041
1041
|
*/
|
|
1042
1042
|
disableRedirectionLinksInNewTab?: boolean;
|
|
1043
|
+
/**
|
|
1044
|
+
* Flag to control Data panel experience
|
|
1045
|
+
* @default true
|
|
1046
|
+
* @version SDK: 1.34.0 | Thoughtspot: 10.3.0.cl
|
|
1047
|
+
* @example
|
|
1048
|
+
* ```js
|
|
1049
|
+
* const embed = new AppEmbed('#tsEmbed', {
|
|
1050
|
+
* ... // other options
|
|
1051
|
+
* dataPanelV2: true,
|
|
1052
|
+
* })
|
|
1053
|
+
* ```
|
|
1054
|
+
*/
|
|
1055
|
+
dataPanelV2?: boolean;
|
|
1043
1056
|
}
|
|
1044
1057
|
|
|
1045
1058
|
/**
|
|
@@ -1801,7 +1814,6 @@ export enum EmbedEvent {
|
|
|
1801
1814
|
/**
|
|
1802
1815
|
* Emitted when a user clicks the **Update TML** action on
|
|
1803
1816
|
* embedded Liveboard.
|
|
1804
|
-
*
|
|
1805
1817
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1806
1818
|
* @example
|
|
1807
1819
|
*```js
|
|
@@ -1813,7 +1825,6 @@ export enum EmbedEvent {
|
|
|
1813
1825
|
/**
|
|
1814
1826
|
* Emitted when a user clicks the **Edit TML** action
|
|
1815
1827
|
* on an embedded Liveboard.
|
|
1816
|
-
*
|
|
1817
1828
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1818
1829
|
* @example
|
|
1819
1830
|
*```js
|
|
@@ -2423,20 +2434,16 @@ export enum HostEvent {
|
|
|
2423
2434
|
/**
|
|
2424
2435
|
* Trigger the **Export TML** action on an embedded Liveboard or
|
|
2425
2436
|
* Answer.
|
|
2426
|
-
*
|
|
2427
2437
|
* @example
|
|
2428
2438
|
* ```js
|
|
2429
2439
|
* liveboardEmbed.trigger(HostEvent.ExportTML)
|
|
2430
2440
|
* ```
|
|
2431
|
-
*
|
|
2432
2441
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2433
2442
|
*/
|
|
2434
2443
|
ExportTML = 'exportTSL',
|
|
2435
2444
|
/**
|
|
2436
2445
|
* Trigger the **Edit TML** action on an embedded Liveboard or
|
|
2437
2446
|
* saved Answers in the full application embedding.
|
|
2438
|
-
*
|
|
2439
|
-
*
|
|
2440
2447
|
* @example
|
|
2441
2448
|
* ```js
|
|
2442
2449
|
* liveboardEmbed.trigger(HostEvent.EditTML)
|
|
@@ -2563,7 +2570,6 @@ export enum HostEvent {
|
|
|
2563
2570
|
* This event is not supported in visualization embed and search embed.
|
|
2564
2571
|
* @param - object - To trigger the action for a specific visualization
|
|
2565
2572
|
* in Liveboard embed, pass in `vizId` as a key.
|
|
2566
|
-
*
|
|
2567
2573
|
* @example
|
|
2568
2574
|
* ```js
|
|
2569
2575
|
* liveboardEmbed.trigger(HostEvent.Edit)
|
|
@@ -2830,7 +2836,6 @@ export enum HostEvent {
|
|
|
2830
2836
|
/**
|
|
2831
2837
|
* Get details of filters applied on the Liveboard.
|
|
2832
2838
|
* Returns arrays containing Liveboard filter and runtime filter elements.
|
|
2833
|
-
*
|
|
2834
2839
|
* @example
|
|
2835
2840
|
* ```js
|
|
2836
2841
|
* const data = await liveboardEmbed.trigger(HostEvent.GetFilters);
|
|
@@ -3133,6 +3138,7 @@ export enum Param {
|
|
|
3133
3138
|
IsOnBeforeGetVizDataInterceptEnabled = 'isOnBeforeGetVizDataInterceptEnabled',
|
|
3134
3139
|
FocusSearchBarOnRender = 'focusSearchBarOnRender',
|
|
3135
3140
|
DisableRedirectionLinksInNewTab = 'disableRedirectionLinksInNewTab',
|
|
3141
|
+
HomePageSearchBarMode = 'homePageSearchBarMode',
|
|
3136
3142
|
}
|
|
3137
3143
|
|
|
3138
3144
|
/**
|
|
@@ -3184,7 +3190,6 @@ export enum Action {
|
|
|
3184
3190
|
* The **Save as View** action on the Answer
|
|
3185
3191
|
* page. Saves an Answer as a View object in the full
|
|
3186
3192
|
* application embedding mode.
|
|
3187
|
-
*
|
|
3188
3193
|
* @example
|
|
3189
3194
|
* ```js
|
|
3190
3195
|
* disabledActions: [Action.SaveAsView]
|
|
@@ -3643,7 +3648,6 @@ export enum Action {
|
|
|
3643
3648
|
/**
|
|
3644
3649
|
* The **Delete** action for Answers in the full application
|
|
3645
3650
|
* embedding mode.
|
|
3646
|
-
*
|
|
3647
3651
|
* @example
|
|
3648
3652
|
* ```js
|
|
3649
3653
|
* disabledActions: [Action.AnswerDelete]
|
|
@@ -3915,9 +3919,6 @@ export enum Action {
|
|
|
3915
3919
|
*/
|
|
3916
3920
|
RenameModalTitleDescription = 'renameModalTitleDescription',
|
|
3917
3921
|
/**
|
|
3918
|
-
*
|
|
3919
|
-
* The **Request Verification** action on the Liveboard.
|
|
3920
|
-
* Triggers a Liveboard verification request.
|
|
3921
3922
|
*
|
|
3922
3923
|
* @example
|
|
3923
3924
|
* ```js
|
|
@@ -4166,6 +4167,17 @@ export enum Action {
|
|
|
4166
4167
|
*/
|
|
4167
4168
|
UnsubscribeScheduleHomepage = 'unsubscribeScheduleHomepage',
|
|
4168
4169
|
|
|
4170
|
+
/**
|
|
4171
|
+
* The **Manage Tags** action on Homepage Favourite Module.
|
|
4172
|
+
*
|
|
4173
|
+
* @example
|
|
4174
|
+
* ```js
|
|
4175
|
+
* disabledActions: [Action.ManageTags]
|
|
4176
|
+
* ```
|
|
4177
|
+
* @version SDK : 1.34.0 | Thoughtspot: 10.3.0.cl
|
|
4178
|
+
*/
|
|
4179
|
+
ManageTags = 'manageTags',
|
|
4180
|
+
|
|
4169
4181
|
/**
|
|
4170
4182
|
* Action ID for delete schedule action on schedule on homepage
|
|
4171
4183
|
* @example
|
|
@@ -4214,15 +4226,15 @@ export interface ColumnValue {
|
|
|
4214
4226
|
[key: string]: any;
|
|
4215
4227
|
};
|
|
4216
4228
|
value:
|
|
4217
|
-
|
|
4218
|
-
|
|
4219
|
-
|
|
4220
|
-
|
|
4221
|
-
|
|
4222
|
-
|
|
4223
|
-
|
|
4224
|
-
|
|
4225
|
-
|
|
4229
|
+
| string
|
|
4230
|
+
| number
|
|
4231
|
+
| boolean
|
|
4232
|
+
| {
|
|
4233
|
+
v: {
|
|
4234
|
+
s: number;
|
|
4235
|
+
e: number;
|
|
4236
|
+
};
|
|
4237
|
+
};
|
|
4226
4238
|
}
|
|
4227
4239
|
|
|
4228
4240
|
export interface VizPoint {
|