@thoughtspot/visual-embed-sdk 1.24.0-dev → 1.24.0-preRender.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/cjs/package.json +2 -3
- package/cjs/src/embed/app.d.ts +3 -1
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +8 -2
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/base.d.ts +2 -0
- package/cjs/src/embed/base.d.ts.map +1 -1
- package/cjs/src/embed/base.js +2 -0
- package/cjs/src/embed/base.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts +3 -2
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +6 -5
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/sage.d.ts +4 -1
- package/cjs/src/embed/sage.d.ts.map +1 -1
- package/cjs/src/embed/sage.js +9 -2
- package/cjs/src/embed/sage.js.map +1 -1
- package/cjs/src/embed/search-bar.d.ts +1 -0
- package/cjs/src/embed/search-bar.d.ts.map +1 -1
- package/cjs/src/embed/search-bar.js +1 -0
- package/cjs/src/embed/search-bar.js.map +1 -1
- package/cjs/src/embed/search.d.ts +5 -1
- package/cjs/src/embed/search.d.ts.map +1 -1
- package/cjs/src/embed/search.js +10 -2
- package/cjs/src/embed/search.js.map +1 -1
- package/cjs/src/embed/ts-embed.d.ts +9 -3
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +50 -20
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/embed/ts-embed.spec.js +47 -0
- 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/mixpanel-service.d.ts.map +1 -1
- package/cjs/src/mixpanel-service.js +2 -0
- package/cjs/src/mixpanel-service.js.map +1 -1
- package/cjs/src/mixpanel-service.spec.js +1 -0
- package/cjs/src/mixpanel-service.spec.js.map +1 -1
- package/cjs/src/react/index.d.ts +5 -1
- package/cjs/src/react/index.d.ts.map +1 -1
- package/cjs/src/react/index.js +8 -8
- package/cjs/src/react/index.js.map +1 -1
- package/cjs/src/types.d.ts +46 -18
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +7 -13
- package/cjs/src/types.js.map +1 -1
- package/cjs/src/utils/graphql/answerService/answer-queries.d.ts +5 -0
- package/cjs/src/utils/graphql/answerService/answer-queries.d.ts.map +1 -0
- package/cjs/src/utils/graphql/answerService/answer-queries.js +80 -0
- package/cjs/src/utils/graphql/answerService/answer-queries.js.map +1 -0
- package/cjs/src/utils/graphql/answerService/answerService.d.ts +61 -0
- package/cjs/src/utils/graphql/answerService/answerService.d.ts.map +1 -0
- package/cjs/src/utils/graphql/answerService/answerService.js +182 -0
- package/cjs/src/utils/graphql/answerService/answerService.js.map +1 -0
- package/cjs/src/utils/graphql/answerService/answerService.spec.d.ts +2 -0
- package/cjs/src/utils/graphql/answerService/answerService.spec.d.ts.map +1 -0
- package/cjs/src/utils/graphql/answerService/answerService.spec.js +201 -0
- package/cjs/src/utils/graphql/answerService/answerService.spec.js.map +1 -0
- package/cjs/src/utils/graphql/graphql-request.d.ts +15 -0
- package/cjs/src/utils/graphql/graphql-request.d.ts.map +1 -0
- package/cjs/src/utils/graphql/graphql-request.js +40 -0
- package/cjs/src/utils/graphql/graphql-request.js.map +1 -0
- package/cjs/src/utils/graphql/sourceService.d.ts +8 -0
- package/cjs/src/utils/graphql/sourceService.d.ts.map +1 -0
- package/cjs/src/utils/graphql/sourceService.js +69 -0
- package/cjs/src/utils/graphql/sourceService.js.map +1 -0
- package/cjs/src/utils/graphql/sourceService.spec.d.ts +2 -0
- package/cjs/src/utils/graphql/sourceService.spec.d.ts.map +1 -0
- package/cjs/src/utils/graphql/sourceService.spec.js +12 -0
- package/cjs/src/utils/graphql/sourceService.spec.js.map +1 -0
- package/cjs/src/utils/processData.d.ts.map +1 -1
- package/cjs/src/utils/processData.js +7 -11
- package/cjs/src/utils/processData.js.map +1 -1
- package/cjs/src/utils/processData.spec.js +13 -17
- package/cjs/src/utils/processData.spec.js.map +1 -1
- package/cjs/src/utils.d.ts +6 -0
- package/cjs/src/utils.d.ts.map +1 -1
- package/cjs/src/utils.js +26 -1
- package/cjs/src/utils.js.map +1 -1
- package/dist/src/embed/app.d.ts +3 -1
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/base.d.ts +2 -0
- package/dist/src/embed/base.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts +3 -2
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/embed/sage.d.ts +4 -1
- package/dist/src/embed/sage.d.ts.map +1 -1
- package/dist/src/embed/search-bar.d.ts +1 -0
- package/dist/src/embed/search-bar.d.ts.map +1 -1
- package/dist/src/embed/search.d.ts +5 -1
- package/dist/src/embed/search.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.d.ts +9 -3
- 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/mixpanel-service.d.ts.map +1 -1
- package/dist/src/react/index.d.ts +5 -1
- package/dist/src/react/index.d.ts.map +1 -1
- package/dist/src/types.d.ts +46 -18
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/graphql/answerService/answer-queries.d.ts +5 -0
- package/dist/src/utils/graphql/answerService/answer-queries.d.ts.map +1 -0
- package/dist/src/utils/graphql/answerService/answerService.d.ts +61 -0
- package/dist/src/utils/graphql/answerService/answerService.d.ts.map +1 -0
- package/dist/src/utils/graphql/answerService/answerService.spec.d.ts +2 -0
- package/dist/src/utils/graphql/answerService/answerService.spec.d.ts.map +1 -0
- package/dist/src/utils/graphql/graphql-request.d.ts +15 -0
- package/dist/src/utils/graphql/graphql-request.d.ts.map +1 -0
- package/dist/src/utils/graphql/sourceService.d.ts +8 -0
- package/dist/src/utils/graphql/sourceService.d.ts.map +1 -0
- package/dist/src/utils/graphql/sourceService.spec.d.ts +2 -0
- package/dist/src/utils/graphql/sourceService.spec.d.ts.map +1 -0
- package/dist/src/utils/processData.d.ts.map +1 -1
- package/dist/src/utils.d.ts +6 -0
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +468 -107
- package/dist/tsembed-react.js +471 -106
- package/dist/tsembed.es.js +511 -103
- package/dist/tsembed.js +511 -102
- package/dist/visual-embed-sdk-react-full.d.ts +132 -28
- package/dist/visual-embed-sdk-react.d.ts +132 -28
- package/dist/visual-embed-sdk.d.ts +127 -27
- package/lib/package.json +2 -3
- package/lib/src/embed/app.d.ts +3 -1
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +8 -2
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/base.d.ts +2 -0
- package/lib/src/embed/base.d.ts.map +1 -1
- package/lib/src/embed/base.js +2 -0
- package/lib/src/embed/base.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts +3 -2
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +6 -5
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/sage.d.ts +4 -1
- package/lib/src/embed/sage.d.ts.map +1 -1
- package/lib/src/embed/sage.js +9 -2
- package/lib/src/embed/sage.js.map +1 -1
- package/lib/src/embed/search-bar.d.ts +1 -0
- package/lib/src/embed/search-bar.d.ts.map +1 -1
- package/lib/src/embed/search-bar.js +1 -0
- package/lib/src/embed/search-bar.js.map +1 -1
- package/lib/src/embed/search.d.ts +5 -1
- package/lib/src/embed/search.d.ts.map +1 -1
- package/lib/src/embed/search.js +10 -2
- package/lib/src/embed/search.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts +9 -3
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +50 -20
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/embed/ts-embed.spec.js +47 -0
- 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 +2 -1
- package/lib/src/index.js.map +1 -1
- package/lib/src/mixpanel-service.d.ts.map +1 -1
- package/lib/src/mixpanel-service.js +2 -0
- package/lib/src/mixpanel-service.js.map +1 -1
- package/lib/src/mixpanel-service.spec.js +1 -0
- package/lib/src/mixpanel-service.spec.js.map +1 -1
- package/lib/src/react/index.d.ts +5 -1
- package/lib/src/react/index.d.ts.map +1 -1
- package/lib/src/react/index.js +7 -7
- package/lib/src/react/index.js.map +1 -1
- package/lib/src/types.d.ts +46 -18
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +6 -12
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils/graphql/answerService/answer-queries.d.ts +5 -0
- package/lib/src/utils/graphql/answerService/answer-queries.d.ts.map +1 -0
- package/lib/src/utils/graphql/answerService/answer-queries.js +77 -0
- package/lib/src/utils/graphql/answerService/answer-queries.js.map +1 -0
- package/lib/src/utils/graphql/answerService/answerService.d.ts +61 -0
- package/lib/src/utils/graphql/answerService/answerService.d.ts.map +1 -0
- package/lib/src/utils/graphql/answerService/answerService.js +177 -0
- package/lib/src/utils/graphql/answerService/answerService.js.map +1 -0
- package/lib/src/utils/graphql/answerService/answerService.spec.d.ts +2 -0
- package/lib/src/utils/graphql/answerService/answerService.spec.d.ts.map +1 -0
- package/lib/src/utils/graphql/answerService/answerService.spec.js +199 -0
- package/lib/src/utils/graphql/answerService/answerService.spec.js.map +1 -0
- package/lib/src/utils/graphql/graphql-request.d.ts +15 -0
- package/lib/src/utils/graphql/graphql-request.d.ts.map +1 -0
- package/lib/src/utils/graphql/graphql-request.js +36 -0
- package/lib/src/utils/graphql/graphql-request.js.map +1 -0
- package/lib/src/utils/graphql/sourceService.d.ts +8 -0
- package/lib/src/utils/graphql/sourceService.d.ts.map +1 -0
- package/lib/src/utils/graphql/sourceService.js +65 -0
- package/lib/src/utils/graphql/sourceService.js.map +1 -0
- package/lib/src/utils/graphql/sourceService.spec.d.ts +2 -0
- package/lib/src/utils/graphql/sourceService.spec.d.ts.map +1 -0
- package/lib/src/utils/graphql/sourceService.spec.js +10 -0
- package/lib/src/utils/graphql/sourceService.spec.js.map +1 -0
- package/lib/src/utils/processData.d.ts.map +1 -1
- package/lib/src/utils/processData.js +8 -12
- package/lib/src/utils/processData.js.map +1 -1
- package/lib/src/utils/processData.spec.js +14 -18
- package/lib/src/utils/processData.spec.js.map +1 -1
- package/lib/src/utils.d.ts +6 -0
- package/lib/src/utils.d.ts.map +1 -1
- package/lib/src/utils.js +23 -0
- package/lib/src/utils.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +133 -28
- package/package.json +2 -3
- package/src/embed/app.ts +12 -2
- package/src/embed/base.ts +2 -0
- package/src/embed/liveboard.ts +7 -5
- package/src/embed/sage.ts +13 -2
- package/src/embed/search-bar.tsx +2 -0
- package/src/embed/search.ts +14 -2
- package/src/embed/ts-embed.spec.ts +49 -0
- package/src/embed/ts-embed.ts +61 -22
- package/src/index.ts +5 -0
- package/src/mixpanel-service.spec.ts +1 -0
- package/src/mixpanel-service.ts +1 -0
- package/src/react/index.tsx +40 -37
- package/src/types.ts +50 -19
- package/src/utils/graphql/answerService/answer-queries.ts +80 -0
- package/src/utils/graphql/answerService/answerService.spec.ts +231 -0
- package/src/utils/graphql/answerService/answerService.ts +234 -0
- package/src/utils/graphql/graphql-request.ts +45 -0
- package/src/utils/graphql/sourceService.spec.ts +10 -0
- package/src/utils/graphql/sourceService.ts +71 -0
- package/src/utils/processData.spec.ts +15 -25
- package/src/utils/processData.ts +13 -15
- package/src/utils.ts +25 -0
- package/src/utils/answerService.spec.ts +0 -41
- package/src/utils/answerService.ts +0 -63
|
@@ -39,6 +39,7 @@ interface AppProps extends EmbedProps, AppViewConfig {
|
|
|
39
39
|
* ```
|
|
40
40
|
*/
|
|
41
41
|
export const AppEmbed: React.ForwardRefExoticComponent<AppProps & React.RefAttributes<_AppEmbed>>;
|
|
42
|
+
export const PreRenderedAppEmbed: React.ForwardRefExoticComponent<AppProps & React.RefAttributes<_AppEmbed>>;
|
|
42
43
|
interface LiveboardProps extends EmbedProps, LiveboardViewConfig {
|
|
43
44
|
}
|
|
44
45
|
/**
|
|
@@ -58,6 +59,8 @@ interface LiveboardProps extends EmbedProps, LiveboardViewConfig {
|
|
|
58
59
|
*/
|
|
59
60
|
export const LiveboardEmbed: React.ForwardRefExoticComponent<LiveboardProps & React.RefAttributes<_LiveboardEmbed>>;
|
|
60
61
|
export const PinboardEmbed: React.ForwardRefExoticComponent<LiveboardProps & React.RefAttributes<_LiveboardEmbed>>;
|
|
62
|
+
export const PreRenderedLiveboardEmbed: React.ForwardRefExoticComponent<LiveboardProps & React.RefAttributes<_LiveboardEmbed>>;
|
|
63
|
+
export const PreRenderedPinboardEmbed: React.ForwardRefExoticComponent<LiveboardProps & React.RefAttributes<_LiveboardEmbed>>;
|
|
61
64
|
interface SearchBarEmbedProps extends EmbedProps, SearchBarViewConfig {
|
|
62
65
|
}
|
|
63
66
|
/**
|
|
@@ -74,6 +77,7 @@ interface SearchBarEmbedProps extends EmbedProps, SearchBarViewConfig {
|
|
|
74
77
|
* ```
|
|
75
78
|
*/
|
|
76
79
|
export const SearchBarEmbed: React.ForwardRefExoticComponent<SearchBarEmbedProps & React.RefAttributes<_SearchBarEmbed>>;
|
|
80
|
+
export const PreRenderedSearchBarEmbed: React.ForwardRefExoticComponent<SearchBarEmbedProps & React.RefAttributes<_SearchBarEmbed>>;
|
|
77
81
|
interface SageEmbedProps extends EmbedProps, SageViewConfig {
|
|
78
82
|
}
|
|
79
83
|
/**
|
|
@@ -90,6 +94,7 @@ interface SageEmbedProps extends EmbedProps, SageViewConfig {
|
|
|
90
94
|
* ```
|
|
91
95
|
*/
|
|
92
96
|
export const SageEmbed: React.ForwardRefExoticComponent<SageEmbedProps & React.RefAttributes<_SageEmbed>>;
|
|
97
|
+
export const PreRenderedSageEmbed: React.ForwardRefExoticComponent<SageEmbedProps & React.RefAttributes<_SageEmbed>>;
|
|
93
98
|
type EmbedComponent = typeof SearchEmbed | typeof AppEmbed | typeof LiveboardEmbed | typeof SearchBarEmbed | typeof SageEmbed;
|
|
94
99
|
/**
|
|
95
100
|
* Get a reference to the embed component to trigger events on the component.
|
|
@@ -109,7 +114,6 @@ type EmbedComponent = typeof SearchEmbed | typeof AppEmbed | typeof LiveboardEmb
|
|
|
109
114
|
* @returns {React.MutableRefObject<T extends TsEmbed>} ref
|
|
110
115
|
*/
|
|
111
116
|
export function useEmbedRef<T extends EmbedComponent>(): React.MutableRefObject<React.ComponentRef<T>>;
|
|
112
|
-
export const PreRenderedLiveboardEmbed: React.ForwardRefExoticComponent<LiveboardProps & React.RefAttributes<_LiveboardEmbed>>;
|
|
113
117
|
|
|
114
118
|
/**
|
|
115
119
|
* @group Embed components
|
|
@@ -150,6 +154,7 @@ export declare class SearchBarEmbed extends TsEmbed {
|
|
|
150
154
|
* The view configuration for the embedded ThoughtSpot search bar.
|
|
151
155
|
*/
|
|
152
156
|
protected viewConfig: SearchBarViewConfig;
|
|
157
|
+
protected embedComponentType: string;
|
|
153
158
|
constructor(domSelector: string, viewConfig: SearchBarViewConfig);
|
|
154
159
|
/**
|
|
155
160
|
* Render the embedded ThoughtSpot search
|
|
@@ -240,6 +245,7 @@ export declare class SageEmbed extends V1Embed {
|
|
|
240
245
|
*
|
|
241
246
|
*/
|
|
242
247
|
protected viewConfig: SageViewConfig;
|
|
248
|
+
protected embedComponentType: string;
|
|
243
249
|
constructor(domSelector: DOMSelector, viewConfig: SageViewConfig);
|
|
244
250
|
/**
|
|
245
251
|
* Constructs a map of parameters to be passed on to the
|
|
@@ -251,9 +257,11 @@ export declare class SageEmbed extends V1Embed {
|
|
|
251
257
|
/**
|
|
252
258
|
* Render the embedded ThoughtSpot Sage
|
|
253
259
|
*
|
|
260
|
+
* @param showPreRenderByDefault
|
|
254
261
|
* @returns {SageEmbed} Eureka/Sage embed
|
|
255
262
|
*/
|
|
256
|
-
render(): SageEmbed;
|
|
263
|
+
render(showPreRenderByDefault?: boolean): SageEmbed;
|
|
264
|
+
preRender(showPreRenderByDefault?: boolean): SageEmbed;
|
|
257
265
|
}
|
|
258
266
|
|
|
259
267
|
/**
|
|
@@ -375,12 +383,16 @@ export declare class SearchEmbed extends TsEmbed {
|
|
|
375
383
|
* The view configuration for the embedded ThoughtSpot search.
|
|
376
384
|
*/
|
|
377
385
|
protected viewConfig: SearchViewConfig;
|
|
386
|
+
protected embedComponentType: string;
|
|
378
387
|
constructor(domSelector: DOMSelector, viewConfig: SearchViewConfig);
|
|
379
388
|
protected getEmbedParams(): string;
|
|
380
389
|
/**
|
|
381
390
|
* Render the embedded ThoughtSpot search
|
|
391
|
+
*
|
|
392
|
+
* @param showPreRenderByDefault
|
|
382
393
|
*/
|
|
383
|
-
render(): SearchEmbed;
|
|
394
|
+
render(showPreRenderByDefault?: boolean): SearchEmbed;
|
|
395
|
+
preRender(showPreRenderByDefault?: boolean): SearchEmbed;
|
|
384
396
|
}
|
|
385
397
|
|
|
386
398
|
/**
|
|
@@ -540,6 +552,7 @@ export interface AppViewConfig extends ViewConfig {
|
|
|
540
552
|
*/
|
|
541
553
|
export declare class AppEmbed extends V1Embed {
|
|
542
554
|
protected viewConfig: AppViewConfig;
|
|
555
|
+
protected embedComponentType: string;
|
|
543
556
|
constructor(domSelector: DOMSelector, viewConfig: AppViewConfig);
|
|
544
557
|
/**
|
|
545
558
|
* Constructs a map of parameters to be passed on to the
|
|
@@ -572,7 +585,8 @@ export declare class AppEmbed extends V1Embed {
|
|
|
572
585
|
* @param renderOptions An object containing the page ID
|
|
573
586
|
* to be embedded.
|
|
574
587
|
*/
|
|
575
|
-
render(): AppEmbed;
|
|
588
|
+
render(showPreRenderByDefault?: boolean): AppEmbed;
|
|
589
|
+
preRender(showPreRenderByDefault?: boolean): AppEmbed;
|
|
576
590
|
}
|
|
577
591
|
|
|
578
592
|
/**
|
|
@@ -689,6 +703,7 @@ export interface LiveboardViewConfig extends ViewConfig {
|
|
|
689
703
|
*/
|
|
690
704
|
export declare class LiveboardEmbed extends V1Embed {
|
|
691
705
|
protected viewConfig: LiveboardViewConfig;
|
|
706
|
+
protected embedComponentType: string;
|
|
692
707
|
constructor(domSelector: DOMSelector, viewConfig: LiveboardViewConfig);
|
|
693
708
|
/**
|
|
694
709
|
* Construct a map of params to be passed on to the
|
|
@@ -708,8 +723,8 @@ export declare class LiveboardEmbed extends V1Embed {
|
|
|
708
723
|
* @param renderOptions An object specifying the Liveboard ID,
|
|
709
724
|
* visualization ID and the runtime filters.
|
|
710
725
|
*/
|
|
711
|
-
render(): LiveboardEmbed;
|
|
712
|
-
preRender(): LiveboardEmbed;
|
|
726
|
+
render(showPreRenderByDefault?: boolean): LiveboardEmbed;
|
|
727
|
+
preRender(showPreRenderByDefault?: boolean): LiveboardEmbed;
|
|
713
728
|
navigateToLiveboard(liveboardId: string, vizId?: string, activeTabId?: string): void;
|
|
714
729
|
}
|
|
715
730
|
/**
|
|
@@ -745,7 +760,7 @@ export function getViewPropsAndListeners<T extends EmbedProps, U extends ViewCon
|
|
|
745
760
|
* @summary ThoughtSpot Visual Embed SDK
|
|
746
761
|
* @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
|
|
747
762
|
*/
|
|
748
|
-
export { init, logout, prefetch, executeTML, exportTML, getEmbedConfig as getInitConfig, getSessionInfo, SearchEmbed, SearchBarEmbed, PinboardEmbed, LiveboardEmbed, SageEmbed, AppEmbed, AuthFailureType, AuthStatus, AuthEvent, AuthEventEmitter, Page, AuthType, RuntimeFilter, RuntimeFilterOp, EmbedEvent, HostEvent, DataSourceVisualMode, Action, ContextMenuTriggerOptions, EmbedConfig, SearchViewConfig, SearchBarViewConfig, LiveboardViewConfig, SageViewConfig, AppViewConfig, PrefetchFeatures, FrameParams, HomeLeftNavItem, HomepageModule, DOMSelector, MessageOptions, MessageCallback, MessagePayload, CustomisationsInterface, CustomStyles, customCssInterface, CustomCssVariables, };
|
|
763
|
+
export { init, logout, prefetch, executeTML, exportTML, executeTMLInput, exportTMLInput, getEmbedConfig as getInitConfig, getSessionInfo, SearchEmbed, SearchBarEmbed, PinboardEmbed, LiveboardEmbed, SageEmbed, AppEmbed, AuthFailureType, AuthStatus, AuthEvent, AuthEventEmitter, AnswerService, Page, AuthType, RuntimeFilter, RuntimeFilterOp, EmbedEvent, HostEvent, DataSourceVisualMode, Action, ContextMenuTriggerOptions, EmbedConfig, SearchViewConfig, SearchBarViewConfig, LiveboardViewConfig, SageViewConfig, AppViewConfig, PrefetchFeatures, FrameParams, HomeLeftNavItem, HomepageModule, DOMSelector, MessageOptions, MessageCallback, MessagePayload, CustomisationsInterface, CustomStyles, customCssInterface, CustomCssVariables, };
|
|
749
764
|
|
|
750
765
|
/**
|
|
751
766
|
* Copyright (c) 2023
|
|
@@ -1478,6 +1493,12 @@ export interface ViewConfig {
|
|
|
1478
1493
|
* @version SDK: 1.27.0 | Thoughtspot: 9.8.0.cl
|
|
1479
1494
|
*/
|
|
1480
1495
|
hiddenHomepageModules?: HomepageModule[];
|
|
1496
|
+
/**
|
|
1497
|
+
* reordering the home page modules
|
|
1498
|
+
* eg: reorderedHomepageModules = [HomepageModule.MyLibrary, HomepageModule.Watchlist]
|
|
1499
|
+
* @version SDK: 1.28.0 | Thoughtspot: 9.9.0.cl
|
|
1500
|
+
*/
|
|
1501
|
+
reorderedHomepageModules?: HomepageModule[];
|
|
1481
1502
|
/**
|
|
1482
1503
|
* The list of tab IDs to show in the embedded.
|
|
1483
1504
|
* Only this Tabs will be shown in their respective LBs.
|
|
@@ -1628,27 +1649,27 @@ export declare enum HomepageModule {
|
|
|
1628
1649
|
/**
|
|
1629
1650
|
* Search bar
|
|
1630
1651
|
*/
|
|
1631
|
-
Search = "
|
|
1652
|
+
Search = "SEARCH",
|
|
1632
1653
|
/**
|
|
1633
1654
|
* kPI watchlist module
|
|
1634
1655
|
*/
|
|
1635
|
-
Watchlist = "
|
|
1656
|
+
Watchlist = "WATCHLIST",
|
|
1636
1657
|
/**
|
|
1637
1658
|
* favorite objects
|
|
1638
1659
|
*/
|
|
1639
|
-
Favorite = "
|
|
1660
|
+
Favorite = "FAVORITE",
|
|
1640
1661
|
/**
|
|
1641
1662
|
* List of answers and liveboards
|
|
1642
1663
|
*/
|
|
1643
|
-
MyLibrary = "
|
|
1664
|
+
MyLibrary = "MY_LIBRARY",
|
|
1644
1665
|
/**
|
|
1645
1666
|
* Trending list
|
|
1646
1667
|
*/
|
|
1647
|
-
Trending = "
|
|
1668
|
+
Trending = "TRENDING",
|
|
1648
1669
|
/**
|
|
1649
1670
|
* Learning videos
|
|
1650
1671
|
*/
|
|
1651
|
-
Learning = "
|
|
1672
|
+
Learning = "LEARNING"
|
|
1652
1673
|
}
|
|
1653
1674
|
/**
|
|
1654
1675
|
* A filter that can be applied to ThoughtSpot answers, Liveboards, or
|
|
@@ -3819,18 +3840,6 @@ export declare enum Action {
|
|
|
3819
3840
|
*/
|
|
3820
3841
|
PersonalisedViewsDropdown = "personalisedViewsDropdown"
|
|
3821
3842
|
}
|
|
3822
|
-
export interface SessionInterface {
|
|
3823
|
-
sessionId: string;
|
|
3824
|
-
genNo: number;
|
|
3825
|
-
acSession: {
|
|
3826
|
-
sessionId: string;
|
|
3827
|
-
genNo: number;
|
|
3828
|
-
};
|
|
3829
|
-
}
|
|
3830
|
-
export declare enum OperationType {
|
|
3831
|
-
GetChartWithData = "GetChartWithData",
|
|
3832
|
-
GetTableWithHeadlineData = "GetTableWithHeadlineData"
|
|
3833
|
-
}
|
|
3834
3843
|
export interface AnswerServiceType {
|
|
3835
3844
|
getAnswer?: (offset: number, batchSize: number) => any;
|
|
3836
3845
|
}
|
|
@@ -3847,6 +3856,39 @@ export declare enum ContextMenuTriggerOptions {
|
|
|
3847
3856
|
LEFT_CLICK = "left-click",
|
|
3848
3857
|
RIGHT_CLICK = "right-click"
|
|
3849
3858
|
}
|
|
3859
|
+
export interface ColumnValue {
|
|
3860
|
+
column: {
|
|
3861
|
+
id: string;
|
|
3862
|
+
name: string;
|
|
3863
|
+
dataType: string;
|
|
3864
|
+
[key: string]: any;
|
|
3865
|
+
};
|
|
3866
|
+
value: string | number | boolean;
|
|
3867
|
+
}
|
|
3868
|
+
export interface VizPoint {
|
|
3869
|
+
selectedAttributes: ColumnValue[];
|
|
3870
|
+
selectedMeasures: ColumnValue[];
|
|
3871
|
+
}
|
|
3872
|
+
export interface CustomActionPayload {
|
|
3873
|
+
contextMenuPoints?: {
|
|
3874
|
+
clickedPoint: VizPoint;
|
|
3875
|
+
selectedPoints: VizPoint[];
|
|
3876
|
+
};
|
|
3877
|
+
embedAnswerData: {
|
|
3878
|
+
name: string;
|
|
3879
|
+
id: string;
|
|
3880
|
+
sources: {
|
|
3881
|
+
header: {
|
|
3882
|
+
guid: string;
|
|
3883
|
+
};
|
|
3884
|
+
};
|
|
3885
|
+
columns: any[];
|
|
3886
|
+
data: any[];
|
|
3887
|
+
[key: string]: any;
|
|
3888
|
+
};
|
|
3889
|
+
session: SessionInterface;
|
|
3890
|
+
vizId?: string;
|
|
3891
|
+
}
|
|
3850
3892
|
|
|
3851
3893
|
/**
|
|
3852
3894
|
* Copyright (c) 2022
|
|
@@ -3879,6 +3921,7 @@ export declare class TsEmbed {
|
|
|
3879
3921
|
*/
|
|
3880
3922
|
protected thoughtSpotHost: string;
|
|
3881
3923
|
protected thoughtSpotV2Base: string;
|
|
3924
|
+
protected embedComponentType: string;
|
|
3882
3925
|
constructor(domSelector: DOMSelector, viewConfig?: ViewConfig);
|
|
3883
3926
|
/**
|
|
3884
3927
|
* Handles errors within the SDK
|
|
@@ -3917,8 +3960,10 @@ export declare class TsEmbed {
|
|
|
3917
3960
|
*
|
|
3918
3961
|
* @param url
|
|
3919
3962
|
* @param frameOptions
|
|
3963
|
+
* @param showPreRender
|
|
3964
|
+
* @param showPreRenderByDefault
|
|
3920
3965
|
*/
|
|
3921
|
-
protected renderIFrame(url: string): Promise<any>;
|
|
3966
|
+
protected renderIFrame(url: string, showPreRenderByDefault?: boolean): Promise<any>;
|
|
3922
3967
|
getPreRenderIds(): {
|
|
3923
3968
|
wrapper: string;
|
|
3924
3969
|
shield: string;
|
|
@@ -3928,6 +3973,7 @@ export declare class TsEmbed {
|
|
|
3928
3973
|
protected preRenderWrapper: HTMLElement;
|
|
3929
3974
|
protected preRenderShield: HTMLElement;
|
|
3930
3975
|
protected preRenderChild: HTMLElement;
|
|
3976
|
+
protected connectPreRendered(): boolean;
|
|
3931
3977
|
protected isPreRenderAvailable(): boolean;
|
|
3932
3978
|
protected insertIntoDOMForPreRender(child: string | HTMLElement): void;
|
|
3933
3979
|
hidePreRender(): void;
|
|
@@ -4032,7 +4078,7 @@ export declare class TsEmbed {
|
|
|
4032
4078
|
/**
|
|
4033
4079
|
* Creates the preRender shell
|
|
4034
4080
|
*/
|
|
4035
|
-
preRender(): TsEmbed;
|
|
4081
|
+
preRender(showPreRenderByDefault?: boolean): TsEmbed;
|
|
4036
4082
|
/**
|
|
4037
4083
|
* Get the Post Url Params for THOUGHTSPOT from the current
|
|
4038
4084
|
* host app URL.
|
|
@@ -4073,7 +4119,7 @@ export declare class V1Embed extends TsEmbed {
|
|
|
4073
4119
|
*
|
|
4074
4120
|
* @param iframeSrc
|
|
4075
4121
|
*/
|
|
4076
|
-
protected renderV1Embed(iframeSrc: string): any;
|
|
4122
|
+
protected renderV1Embed(iframeSrc: string, showPreRenderByDefault?: boolean): any;
|
|
4077
4123
|
protected getRootIframeSrc(): string;
|
|
4078
4124
|
/**
|
|
4079
4125
|
* @inheritdoc
|
|
@@ -4186,6 +4232,7 @@ export declare const renderInQueue: (fn: (next?: (val?: any) => void) => Promise
|
|
|
4186
4232
|
*
|
|
4187
4233
|
* @param data
|
|
4188
4234
|
* @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
|
|
4235
|
+
* @group Global methods
|
|
4189
4236
|
*/
|
|
4190
4237
|
export declare const executeTML: (data: executeTMLInput) => Promise<any>;
|
|
4191
4238
|
/**
|
|
@@ -4194,6 +4241,7 @@ export declare const executeTML: (data: executeTMLInput) => Promise<any>;
|
|
|
4194
4241
|
*
|
|
4195
4242
|
* @param data
|
|
4196
4243
|
* @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
|
|
4244
|
+
* @group Global methods
|
|
4197
4245
|
*/
|
|
4198
4246
|
export declare const exportTML: (data: exportTMLInput) => Promise<any>;
|
|
4199
4247
|
/**
|
|
@@ -4725,3 +4773,59 @@ export interface CustomCssVariables {
|
|
|
4725
4773
|
'--ts-var-home-favorite-suggestion-card-background'?: string;
|
|
4726
4774
|
}
|
|
4727
4775
|
|
|
4776
|
+
export interface SessionInterface {
|
|
4777
|
+
sessionId: string;
|
|
4778
|
+
genNo: number;
|
|
4779
|
+
acSession: {
|
|
4780
|
+
sessionId: string;
|
|
4781
|
+
genNo: number;
|
|
4782
|
+
};
|
|
4783
|
+
}
|
|
4784
|
+
export declare enum OperationType {
|
|
4785
|
+
GetChartWithData = "GetChartWithData",
|
|
4786
|
+
GetTableWithHeadlineData = "GetTableWithHeadlineData"
|
|
4787
|
+
}
|
|
4788
|
+
interface UnderlyingDataPoint {
|
|
4789
|
+
columnId: string;
|
|
4790
|
+
dataValue: any;
|
|
4791
|
+
}
|
|
4792
|
+
/**
|
|
4793
|
+
* Class representing the answer service provided with the
|
|
4794
|
+
* custom action payload. This service could be used to run
|
|
4795
|
+
* graphql queries in the context of the answer on which the
|
|
4796
|
+
* custom action was triggered.
|
|
4797
|
+
*
|
|
4798
|
+
* @example
|
|
4799
|
+
* ```js
|
|
4800
|
+
* embed.on(EmbedEvent.CustomAction, e => {
|
|
4801
|
+
* const underlying = await e.answerService.getUnderlyingDataForPoint([
|
|
4802
|
+
* 'col name 1'
|
|
4803
|
+
* ]);
|
|
4804
|
+
* const data = await underlying.fetchData(0, 100);
|
|
4805
|
+
* })
|
|
4806
|
+
* ```
|
|
4807
|
+
* @version
|
|
4808
|
+
* ThoughtSpot: 9.9.0.cl / SDK: 1.25.0
|
|
4809
|
+
*/
|
|
4810
|
+
export declare class AnswerService {
|
|
4811
|
+
constructor(session: SessionInterface, answer: any, thoughtSpotHost: string, selectedPoints?: VizPoint[]);
|
|
4812
|
+
getSourceDetail(): Promise<any>;
|
|
4813
|
+
removeColumns(columnIds: string[]): Promise<any>;
|
|
4814
|
+
addColumns(columnIds: string[]): Promise<any>;
|
|
4815
|
+
fetchData(offset?: number, size?: number): Promise<{
|
|
4816
|
+
columns: any;
|
|
4817
|
+
data: any;
|
|
4818
|
+
}>;
|
|
4819
|
+
/**
|
|
4820
|
+
*
|
|
4821
|
+
* @param userLocale
|
|
4822
|
+
* @param omitInfo Omit the download Info on top of the CSV
|
|
4823
|
+
* @returns Response
|
|
4824
|
+
*/
|
|
4825
|
+
fetchCSVBlob(userLocale?: string, omitInfo?: boolean): Promise<Response>;
|
|
4826
|
+
getUnderlyingDataForPoint(outputColumnNames: string[], selectedPoints?: UnderlyingDataPoint[]): Promise<AnswerService>;
|
|
4827
|
+
executeQuery(query: string, variables: any): Promise<any>;
|
|
4828
|
+
getSession(): SessionInterface;
|
|
4829
|
+
}
|
|
4830
|
+
export {};
|
|
4831
|
+
|
|
@@ -13,7 +13,7 @@ import EventEmitter from 'eventemitter3';
|
|
|
13
13
|
* @summary ThoughtSpot Visual Embed SDK
|
|
14
14
|
* @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
|
|
15
15
|
*/
|
|
16
|
-
export { init, logout, prefetch, executeTML, exportTML, getEmbedConfig as getInitConfig, getSessionInfo, SearchEmbed, SearchBarEmbed, PinboardEmbed, LiveboardEmbed, SageEmbed, AppEmbed, AuthFailureType, AuthStatus, AuthEvent, AuthEventEmitter, Page, AuthType, RuntimeFilter, RuntimeFilterOp, EmbedEvent, HostEvent, DataSourceVisualMode, Action, ContextMenuTriggerOptions, EmbedConfig, SearchViewConfig, SearchBarViewConfig, LiveboardViewConfig, SageViewConfig, AppViewConfig, PrefetchFeatures, FrameParams, HomeLeftNavItem, HomepageModule, DOMSelector, MessageOptions, MessageCallback, MessagePayload, CustomisationsInterface, CustomStyles, customCssInterface, CustomCssVariables, };
|
|
16
|
+
export { init, logout, prefetch, executeTML, exportTML, executeTMLInput, exportTMLInput, getEmbedConfig as getInitConfig, getSessionInfo, SearchEmbed, SearchBarEmbed, PinboardEmbed, LiveboardEmbed, SageEmbed, AppEmbed, AuthFailureType, AuthStatus, AuthEvent, AuthEventEmitter, AnswerService, Page, AuthType, RuntimeFilter, RuntimeFilterOp, EmbedEvent, HostEvent, DataSourceVisualMode, Action, ContextMenuTriggerOptions, EmbedConfig, SearchViewConfig, SearchBarViewConfig, LiveboardViewConfig, SageViewConfig, AppViewConfig, PrefetchFeatures, FrameParams, HomeLeftNavItem, HomepageModule, DOMSelector, MessageOptions, MessageCallback, MessagePayload, CustomisationsInterface, CustomStyles, customCssInterface, CustomCssVariables, };
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* Copyright (c) 2022
|
|
@@ -172,6 +172,7 @@ export interface AppViewConfig extends ViewConfig {
|
|
|
172
172
|
*/
|
|
173
173
|
export class AppEmbed extends V1Embed {
|
|
174
174
|
protected viewConfig: AppViewConfig;
|
|
175
|
+
protected embedComponentType: string;
|
|
175
176
|
constructor(domSelector: DOMSelector, viewConfig: AppViewConfig);
|
|
176
177
|
/**
|
|
177
178
|
* Constructs a map of parameters to be passed on to the
|
|
@@ -204,7 +205,8 @@ export class AppEmbed extends V1Embed {
|
|
|
204
205
|
* @param renderOptions An object containing the page ID
|
|
205
206
|
* to be embedded.
|
|
206
207
|
*/
|
|
207
|
-
render(): AppEmbed;
|
|
208
|
+
render(showPreRenderByDefault?: boolean): AppEmbed;
|
|
209
|
+
preRender(showPreRenderByDefault?: boolean): AppEmbed;
|
|
208
210
|
}
|
|
209
211
|
|
|
210
212
|
export interface executeTMLInput {
|
|
@@ -298,6 +300,7 @@ export const renderInQueue: (fn: (next?: (val?: any) => void) => Promise<any>) =
|
|
|
298
300
|
*
|
|
299
301
|
* @param data
|
|
300
302
|
* @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
|
|
303
|
+
* @group Global methods
|
|
301
304
|
*/
|
|
302
305
|
export const executeTML: (data: executeTMLInput) => Promise<any>;
|
|
303
306
|
/**
|
|
@@ -306,6 +309,7 @@ export const executeTML: (data: executeTMLInput) => Promise<any>;
|
|
|
306
309
|
*
|
|
307
310
|
* @param data
|
|
308
311
|
* @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
|
|
312
|
+
* @group Global methods
|
|
309
313
|
*/
|
|
310
314
|
export const exportTML: (data: exportTMLInput) => Promise<any>;
|
|
311
315
|
/**
|
|
@@ -427,6 +431,7 @@ export interface LiveboardViewConfig extends ViewConfig {
|
|
|
427
431
|
*/
|
|
428
432
|
export class LiveboardEmbed extends V1Embed {
|
|
429
433
|
protected viewConfig: LiveboardViewConfig;
|
|
434
|
+
protected embedComponentType: string;
|
|
430
435
|
constructor(domSelector: DOMSelector, viewConfig: LiveboardViewConfig);
|
|
431
436
|
/**
|
|
432
437
|
* Construct a map of params to be passed on to the
|
|
@@ -446,8 +451,8 @@ export class LiveboardEmbed extends V1Embed {
|
|
|
446
451
|
* @param renderOptions An object specifying the Liveboard ID,
|
|
447
452
|
* visualization ID and the runtime filters.
|
|
448
453
|
*/
|
|
449
|
-
render(): LiveboardEmbed;
|
|
450
|
-
preRender(): LiveboardEmbed;
|
|
454
|
+
render(showPreRenderByDefault?: boolean): LiveboardEmbed;
|
|
455
|
+
preRender(showPreRenderByDefault?: boolean): LiveboardEmbed;
|
|
451
456
|
navigateToLiveboard(liveboardId: string, vizId?: string, activeTabId?: string): void;
|
|
452
457
|
}
|
|
453
458
|
/**
|
|
@@ -575,12 +580,16 @@ export class SearchEmbed extends TsEmbed {
|
|
|
575
580
|
* The view configuration for the embedded ThoughtSpot search.
|
|
576
581
|
*/
|
|
577
582
|
protected viewConfig: SearchViewConfig;
|
|
583
|
+
protected embedComponentType: string;
|
|
578
584
|
constructor(domSelector: DOMSelector, viewConfig: SearchViewConfig);
|
|
579
585
|
protected getEmbedParams(): string;
|
|
580
586
|
/**
|
|
581
587
|
* Render the embedded ThoughtSpot search
|
|
588
|
+
*
|
|
589
|
+
* @param showPreRenderByDefault
|
|
582
590
|
*/
|
|
583
|
-
render(): SearchEmbed;
|
|
591
|
+
render(showPreRenderByDefault?: boolean): SearchEmbed;
|
|
592
|
+
preRender(showPreRenderByDefault?: boolean): SearchEmbed;
|
|
584
593
|
}
|
|
585
594
|
|
|
586
595
|
/**
|
|
@@ -622,6 +631,7 @@ export class SearchBarEmbed extends TsEmbed {
|
|
|
622
631
|
* The view configuration for the embedded ThoughtSpot search bar.
|
|
623
632
|
*/
|
|
624
633
|
protected viewConfig: SearchBarViewConfig;
|
|
634
|
+
protected embedComponentType: string;
|
|
625
635
|
constructor(domSelector: string, viewConfig: SearchBarViewConfig);
|
|
626
636
|
/**
|
|
627
637
|
* Render the embedded ThoughtSpot search
|
|
@@ -1543,6 +1553,12 @@ export interface ViewConfig {
|
|
|
1543
1553
|
* @version SDK: 1.27.0 | Thoughtspot: 9.8.0.cl
|
|
1544
1554
|
*/
|
|
1545
1555
|
hiddenHomepageModules?: HomepageModule[];
|
|
1556
|
+
/**
|
|
1557
|
+
* reordering the home page modules
|
|
1558
|
+
* eg: reorderedHomepageModules = [HomepageModule.MyLibrary, HomepageModule.Watchlist]
|
|
1559
|
+
* @version SDK: 1.28.0 | Thoughtspot: 9.9.0.cl
|
|
1560
|
+
*/
|
|
1561
|
+
reorderedHomepageModules?: HomepageModule[];
|
|
1546
1562
|
/**
|
|
1547
1563
|
* The list of tab IDs to show in the embedded.
|
|
1548
1564
|
* Only this Tabs will be shown in their respective LBs.
|
|
@@ -1693,27 +1709,27 @@ export enum HomepageModule {
|
|
|
1693
1709
|
/**
|
|
1694
1710
|
* Search bar
|
|
1695
1711
|
*/
|
|
1696
|
-
Search = "
|
|
1712
|
+
Search = "SEARCH",
|
|
1697
1713
|
/**
|
|
1698
1714
|
* kPI watchlist module
|
|
1699
1715
|
*/
|
|
1700
|
-
Watchlist = "
|
|
1716
|
+
Watchlist = "WATCHLIST",
|
|
1701
1717
|
/**
|
|
1702
1718
|
* favorite objects
|
|
1703
1719
|
*/
|
|
1704
|
-
Favorite = "
|
|
1720
|
+
Favorite = "FAVORITE",
|
|
1705
1721
|
/**
|
|
1706
1722
|
* List of answers and liveboards
|
|
1707
1723
|
*/
|
|
1708
|
-
MyLibrary = "
|
|
1724
|
+
MyLibrary = "MY_LIBRARY",
|
|
1709
1725
|
/**
|
|
1710
1726
|
* Trending list
|
|
1711
1727
|
*/
|
|
1712
|
-
Trending = "
|
|
1728
|
+
Trending = "TRENDING",
|
|
1713
1729
|
/**
|
|
1714
1730
|
* Learning videos
|
|
1715
1731
|
*/
|
|
1716
|
-
Learning = "
|
|
1732
|
+
Learning = "LEARNING"
|
|
1717
1733
|
}
|
|
1718
1734
|
/**
|
|
1719
1735
|
* A filter that can be applied to ThoughtSpot answers, Liveboards, or
|
|
@@ -3884,18 +3900,6 @@ export enum Action {
|
|
|
3884
3900
|
*/
|
|
3885
3901
|
PersonalisedViewsDropdown = "personalisedViewsDropdown"
|
|
3886
3902
|
}
|
|
3887
|
-
export interface SessionInterface {
|
|
3888
|
-
sessionId: string;
|
|
3889
|
-
genNo: number;
|
|
3890
|
-
acSession: {
|
|
3891
|
-
sessionId: string;
|
|
3892
|
-
genNo: number;
|
|
3893
|
-
};
|
|
3894
|
-
}
|
|
3895
|
-
export enum OperationType {
|
|
3896
|
-
GetChartWithData = "GetChartWithData",
|
|
3897
|
-
GetTableWithHeadlineData = "GetTableWithHeadlineData"
|
|
3898
|
-
}
|
|
3899
3903
|
export interface AnswerServiceType {
|
|
3900
3904
|
getAnswer?: (offset: number, batchSize: number) => any;
|
|
3901
3905
|
}
|
|
@@ -3912,6 +3916,39 @@ export enum ContextMenuTriggerOptions {
|
|
|
3912
3916
|
LEFT_CLICK = "left-click",
|
|
3913
3917
|
RIGHT_CLICK = "right-click"
|
|
3914
3918
|
}
|
|
3919
|
+
export interface ColumnValue {
|
|
3920
|
+
column: {
|
|
3921
|
+
id: string;
|
|
3922
|
+
name: string;
|
|
3923
|
+
dataType: string;
|
|
3924
|
+
[key: string]: any;
|
|
3925
|
+
};
|
|
3926
|
+
value: string | number | boolean;
|
|
3927
|
+
}
|
|
3928
|
+
export interface VizPoint {
|
|
3929
|
+
selectedAttributes: ColumnValue[];
|
|
3930
|
+
selectedMeasures: ColumnValue[];
|
|
3931
|
+
}
|
|
3932
|
+
export interface CustomActionPayload {
|
|
3933
|
+
contextMenuPoints?: {
|
|
3934
|
+
clickedPoint: VizPoint;
|
|
3935
|
+
selectedPoints: VizPoint[];
|
|
3936
|
+
};
|
|
3937
|
+
embedAnswerData: {
|
|
3938
|
+
name: string;
|
|
3939
|
+
id: string;
|
|
3940
|
+
sources: {
|
|
3941
|
+
header: {
|
|
3942
|
+
guid: string;
|
|
3943
|
+
};
|
|
3944
|
+
};
|
|
3945
|
+
columns: any[];
|
|
3946
|
+
data: any[];
|
|
3947
|
+
[key: string]: any;
|
|
3948
|
+
};
|
|
3949
|
+
session: SessionInterface;
|
|
3950
|
+
vizId?: string;
|
|
3951
|
+
}
|
|
3915
3952
|
|
|
3916
3953
|
/**
|
|
3917
3954
|
* The list of customization css variables. These
|
|
@@ -4337,6 +4374,7 @@ export class SageEmbed extends V1Embed {
|
|
|
4337
4374
|
*
|
|
4338
4375
|
*/
|
|
4339
4376
|
protected viewConfig: SageViewConfig;
|
|
4377
|
+
protected embedComponentType: string;
|
|
4340
4378
|
constructor(domSelector: DOMSelector, viewConfig: SageViewConfig);
|
|
4341
4379
|
/**
|
|
4342
4380
|
* Constructs a map of parameters to be passed on to the
|
|
@@ -4348,11 +4386,69 @@ export class SageEmbed extends V1Embed {
|
|
|
4348
4386
|
/**
|
|
4349
4387
|
* Render the embedded ThoughtSpot Sage
|
|
4350
4388
|
*
|
|
4389
|
+
* @param showPreRenderByDefault
|
|
4351
4390
|
* @returns {SageEmbed} Eureka/Sage embed
|
|
4352
4391
|
*/
|
|
4353
|
-
render(): SageEmbed;
|
|
4392
|
+
render(showPreRenderByDefault?: boolean): SageEmbed;
|
|
4393
|
+
preRender(showPreRenderByDefault?: boolean): SageEmbed;
|
|
4354
4394
|
}
|
|
4355
4395
|
|
|
4396
|
+
export interface SessionInterface {
|
|
4397
|
+
sessionId: string;
|
|
4398
|
+
genNo: number;
|
|
4399
|
+
acSession: {
|
|
4400
|
+
sessionId: string;
|
|
4401
|
+
genNo: number;
|
|
4402
|
+
};
|
|
4403
|
+
}
|
|
4404
|
+
export enum OperationType {
|
|
4405
|
+
GetChartWithData = "GetChartWithData",
|
|
4406
|
+
GetTableWithHeadlineData = "GetTableWithHeadlineData"
|
|
4407
|
+
}
|
|
4408
|
+
interface UnderlyingDataPoint {
|
|
4409
|
+
columnId: string;
|
|
4410
|
+
dataValue: any;
|
|
4411
|
+
}
|
|
4412
|
+
/**
|
|
4413
|
+
* Class representing the answer service provided with the
|
|
4414
|
+
* custom action payload. This service could be used to run
|
|
4415
|
+
* graphql queries in the context of the answer on which the
|
|
4416
|
+
* custom action was triggered.
|
|
4417
|
+
*
|
|
4418
|
+
* @example
|
|
4419
|
+
* ```js
|
|
4420
|
+
* embed.on(EmbedEvent.CustomAction, e => {
|
|
4421
|
+
* const underlying = await e.answerService.getUnderlyingDataForPoint([
|
|
4422
|
+
* 'col name 1'
|
|
4423
|
+
* ]);
|
|
4424
|
+
* const data = await underlying.fetchData(0, 100);
|
|
4425
|
+
* })
|
|
4426
|
+
* ```
|
|
4427
|
+
* @version
|
|
4428
|
+
* ThoughtSpot: 9.9.0.cl / SDK: 1.25.0
|
|
4429
|
+
*/
|
|
4430
|
+
export class AnswerService {
|
|
4431
|
+
constructor(session: SessionInterface, answer: any, thoughtSpotHost: string, selectedPoints?: VizPoint[]);
|
|
4432
|
+
getSourceDetail(): Promise<any>;
|
|
4433
|
+
removeColumns(columnIds: string[]): Promise<any>;
|
|
4434
|
+
addColumns(columnIds: string[]): Promise<any>;
|
|
4435
|
+
fetchData(offset?: number, size?: number): Promise<{
|
|
4436
|
+
columns: any;
|
|
4437
|
+
data: any;
|
|
4438
|
+
}>;
|
|
4439
|
+
/**
|
|
4440
|
+
*
|
|
4441
|
+
* @param userLocale
|
|
4442
|
+
* @param omitInfo Omit the download Info on top of the CSV
|
|
4443
|
+
* @returns Response
|
|
4444
|
+
*/
|
|
4445
|
+
fetchCSVBlob(userLocale?: string, omitInfo?: boolean): Promise<Response>;
|
|
4446
|
+
getUnderlyingDataForPoint(outputColumnNames: string[], selectedPoints?: UnderlyingDataPoint[]): Promise<AnswerService>;
|
|
4447
|
+
executeQuery(query: string, variables: any): Promise<any>;
|
|
4448
|
+
getSession(): SessionInterface;
|
|
4449
|
+
}
|
|
4450
|
+
export {};
|
|
4451
|
+
|
|
4356
4452
|
/**
|
|
4357
4453
|
* Copyright (c) 2022
|
|
4358
4454
|
*
|
|
@@ -4384,6 +4480,7 @@ export class TsEmbed {
|
|
|
4384
4480
|
*/
|
|
4385
4481
|
protected thoughtSpotHost: string;
|
|
4386
4482
|
protected thoughtSpotV2Base: string;
|
|
4483
|
+
protected embedComponentType: string;
|
|
4387
4484
|
constructor(domSelector: DOMSelector, viewConfig?: ViewConfig);
|
|
4388
4485
|
/**
|
|
4389
4486
|
* Handles errors within the SDK
|
|
@@ -4422,8 +4519,10 @@ export class TsEmbed {
|
|
|
4422
4519
|
*
|
|
4423
4520
|
* @param url
|
|
4424
4521
|
* @param frameOptions
|
|
4522
|
+
* @param showPreRender
|
|
4523
|
+
* @param showPreRenderByDefault
|
|
4425
4524
|
*/
|
|
4426
|
-
protected renderIFrame(url: string): Promise<any>;
|
|
4525
|
+
protected renderIFrame(url: string, showPreRenderByDefault?: boolean): Promise<any>;
|
|
4427
4526
|
getPreRenderIds(): {
|
|
4428
4527
|
wrapper: string;
|
|
4429
4528
|
shield: string;
|
|
@@ -4433,6 +4532,7 @@ export class TsEmbed {
|
|
|
4433
4532
|
protected preRenderWrapper: HTMLElement;
|
|
4434
4533
|
protected preRenderShield: HTMLElement;
|
|
4435
4534
|
protected preRenderChild: HTMLElement;
|
|
4535
|
+
protected connectPreRendered(): boolean;
|
|
4436
4536
|
protected isPreRenderAvailable(): boolean;
|
|
4437
4537
|
protected insertIntoDOMForPreRender(child: string | HTMLElement): void;
|
|
4438
4538
|
hidePreRender(): void;
|
|
@@ -4537,7 +4637,7 @@ export class TsEmbed {
|
|
|
4537
4637
|
/**
|
|
4538
4638
|
* Creates the preRender shell
|
|
4539
4639
|
*/
|
|
4540
|
-
preRender(): TsEmbed;
|
|
4640
|
+
preRender(showPreRenderByDefault?: boolean): TsEmbed;
|
|
4541
4641
|
/**
|
|
4542
4642
|
* Get the Post Url Params for THOUGHTSPOT from the current
|
|
4543
4643
|
* host app URL.
|
|
@@ -4578,7 +4678,7 @@ export class V1Embed extends TsEmbed {
|
|
|
4578
4678
|
*
|
|
4579
4679
|
* @param iframeSrc
|
|
4580
4680
|
*/
|
|
4581
|
-
protected renderV1Embed(iframeSrc: string): any;
|
|
4681
|
+
protected renderV1Embed(iframeSrc: string, showPreRenderByDefault?: boolean): any;
|
|
4582
4682
|
protected getRootIframeSrc(): string;
|
|
4583
4683
|
/**
|
|
4584
4684
|
* @inheritdoc
|
package/lib/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thoughtspot/visual-embed-sdk",
|
|
3
|
-
"version": "1.24.0-
|
|
3
|
+
"version": "1.24.0-preRender.0",
|
|
4
4
|
"description": "ThoughtSpot Embed SDK",
|
|
5
5
|
"module": "lib/src/index.js",
|
|
6
6
|
"main": "dist/tsembed.js",
|
|
@@ -139,11 +139,10 @@
|
|
|
139
139
|
"identity-obj-proxy": "^3.0.0",
|
|
140
140
|
"istanbul-merge": "^1.1.1",
|
|
141
141
|
"jest": "^26.6.3",
|
|
142
|
-
"jest-
|
|
142
|
+
"jest-fetch-mock": "^3.0.3",
|
|
143
143
|
"jsdom": "^17.0.0",
|
|
144
144
|
"node-sass": "^8.0.0",
|
|
145
145
|
"prettier": "2.1.2",
|
|
146
|
-
"puppeteer": "^7.0.1",
|
|
147
146
|
"react": "^16.14.0",
|
|
148
147
|
"react-dom": "^16.14.0",
|
|
149
148
|
"react-resizable": "^1.11.0",
|