@thoughtspot/visual-embed-sdk 1.35.5-hostEvent.7 → 1.35.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/package.json +1 -1
- package/cjs/src/embed/app.d.ts +1 -1
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +14 -2
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/base.d.ts +1 -1
- package/cjs/src/embed/base.js +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts +8 -7
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +2 -2
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/ts-embed.d.ts +1 -1
- package/cjs/src/embed/ts-embed.js +1 -1
- package/cjs/src/types.d.ts +22 -20
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +17 -18
- package/cjs/src/types.js.map +1 -1
- package/dist/{index-CbltIawo.js → index-FKywZXHG.js} +1 -1
- package/dist/src/embed/app.d.ts +1 -1
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/base.d.ts +1 -1
- package/dist/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts +8 -7
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.d.ts +1 -1
- package/dist/src/types.d.ts +22 -20
- package/dist/src/types.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +37 -26
- package/dist/tsembed-react.js +36 -25
- package/dist/tsembed.es.js +38 -27
- package/dist/tsembed.js +37 -26
- package/dist/visual-embed-sdk-react-full.d.ts +33 -30
- package/dist/visual-embed-sdk-react.d.ts +33 -30
- package/dist/visual-embed-sdk.d.ts +33 -30
- package/lib/package.json +1 -1
- package/lib/src/embed/app.d.ts +1 -1
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +14 -2
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/base.d.ts +1 -1
- package/lib/src/embed/base.js +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts +8 -7
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +2 -2
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts +1 -1
- package/lib/src/embed/ts-embed.js +1 -1
- package/lib/src/types.d.ts +22 -20
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +17 -18
- package/lib/src/types.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +33 -30
- package/package.json +1 -1
- package/src/embed/app.ts +17 -3
- package/src/embed/base.ts +1 -1
- package/src/embed/hostEventClient/host-event-client.ts +0 -5
- package/src/embed/liveboard.ts +8 -7
- package/src/embed/ts-embed.ts +1 -1
- package/src/types.ts +22 -20
- package/cjs/src/embed/searchEmbed-basic-auth.spec.d.ts +0 -2
- package/cjs/src/embed/searchEmbed-basic-auth.spec.d.ts.map +0 -1
- package/cjs/src/embed/searchEmbed-basic-auth.spec.js +0 -104
- package/cjs/src/embed/searchEmbed-basic-auth.spec.js.map +0 -1
- package/cjs/src/hostEventsTypeMapping.d.ts +0 -2
- package/cjs/src/hostEventsTypeMapping.d.ts.map +0 -1
- package/cjs/src/hostEventsTypeMapping.js +0 -4
- package/cjs/src/hostEventsTypeMapping.js.map +0 -1
- package/cjs/src/utils/embedApi/contracts.d.ts +0 -101
- package/cjs/src/utils/embedApi/contracts.d.ts.map +0 -1
- package/cjs/src/utils/embedApi/contracts.js +0 -17
- package/cjs/src/utils/embedApi/contracts.js.map +0 -1
- package/cjs/src/utils/embedApi/embedApiClient.d.ts +0 -12
- package/cjs/src/utils/embedApi/embedApiClient.d.ts.map +0 -1
- package/cjs/src/utils/embedApi/embedApiClient.js +0 -46
- package/cjs/src/utils/embedApi/embedApiClient.js.map +0 -1
- package/cjs/src/utils/embedApi/processEmbedApi.d.ts +0 -9
- package/cjs/src/utils/embedApi/processEmbedApi.d.ts.map +0 -1
- package/cjs/src/utils/embedApi/processEmbedApi.js +0 -18
- package/cjs/src/utils/embedApi/processEmbedApi.js.map +0 -1
- package/dist/index-CENLvayL.js +0 -7370
- package/dist/index-CoQfqaHj.js +0 -7370
- package/dist/index-CzwzS0P4.js +0 -7370
- package/dist/index-DFwi_pV_.js +0 -7370
- package/dist/index-DOIjN0N_.js +0 -7370
- package/dist/index-DYBx8SuE.js +0 -7370
- package/dist/index-DaLHJaLd.js +0 -7370
- package/dist/src/embed/searchEmbed-basic-auth.spec.d.ts +0 -2
- package/dist/src/embed/searchEmbed-basic-auth.spec.d.ts.map +0 -1
- package/dist/src/hostEventsTypeMapping.d.ts +0 -2
- package/dist/src/hostEventsTypeMapping.d.ts.map +0 -1
- package/dist/src/utils/embedApi/contracts.d.ts +0 -101
- package/dist/src/utils/embedApi/contracts.d.ts.map +0 -1
- package/dist/src/utils/embedApi/embedApiClient.d.ts +0 -12
- package/dist/src/utils/embedApi/embedApiClient.d.ts.map +0 -1
- package/dist/src/utils/embedApi/processEmbedApi.d.ts +0 -9
- package/dist/src/utils/embedApi/processEmbedApi.d.ts.map +0 -1
- package/lib/src/embed/searchEmbed-basic-auth.spec.d.ts +0 -2
- package/lib/src/embed/searchEmbed-basic-auth.spec.d.ts.map +0 -1
- package/lib/src/embed/searchEmbed-basic-auth.spec.js +0 -101
- package/lib/src/embed/searchEmbed-basic-auth.spec.js.map +0 -1
- package/lib/src/hostEventsTypeMapping.d.ts +0 -2
- package/lib/src/hostEventsTypeMapping.d.ts.map +0 -1
- package/lib/src/hostEventsTypeMapping.js +0 -2
- package/lib/src/hostEventsTypeMapping.js.map +0 -1
- package/lib/src/utils/embedApi/contracts.d.ts +0 -101
- package/lib/src/utils/embedApi/contracts.d.ts.map +0 -1
- package/lib/src/utils/embedApi/contracts.js +0 -14
- package/lib/src/utils/embedApi/contracts.js.map +0 -1
- package/lib/src/utils/embedApi/embedApiClient.d.ts +0 -12
- package/lib/src/utils/embedApi/embedApiClient.d.ts.map +0 -1
- package/lib/src/utils/embedApi/embedApiClient.js +0 -42
- package/lib/src/utils/embedApi/embedApiClient.js.map +0 -1
- package/lib/src/utils/embedApi/processEmbedApi.d.ts +0 -9
- package/lib/src/utils/embedApi/processEmbedApi.d.ts.map +0 -1
- package/lib/src/utils/embedApi/processEmbedApi.js +0 -14
- package/lib/src/utils/embedApi/processEmbedApi.js.map +0 -1
|
@@ -441,7 +441,7 @@ declare module '@thoughtspot/visual-embed-sdk/embed/app' {
|
|
|
441
441
|
*/
|
|
442
442
|
showLiveboardVerifiedBadge?: boolean;
|
|
443
443
|
/**
|
|
444
|
-
* This flag is used to enable/disable hide irrelevant filters in
|
|
444
|
+
* This flag is used to enable/disable hide irrelevant filters in Liveboard tab
|
|
445
445
|
* @type {boolean}
|
|
446
446
|
* @default false
|
|
447
447
|
* @version SDK: 1.36.0 | ThoughtSpot:10.6.0.cl
|
|
@@ -567,7 +567,7 @@ declare module '@thoughtspot/visual-embed-sdk/embed/base' {
|
|
|
567
567
|
/**
|
|
568
568
|
* Initializes the Visual Embed SDK globally and perform
|
|
569
569
|
* authentication if applicable. This function needs to be called before any ThoughtSpot
|
|
570
|
-
* component like
|
|
570
|
+
* component like Liveboard etc can be embedded. But need not wait for AuthEvent.SUCCESS
|
|
571
571
|
* to actually embed. That is handled internally.
|
|
572
572
|
* @param embedConfig The configuration object containing ThoughtSpot host,
|
|
573
573
|
* authentication mechanism and so on.
|
|
@@ -901,7 +901,7 @@ declare module '@thoughtspot/visual-embed-sdk/embed/liveboard' {
|
|
|
901
901
|
*/
|
|
902
902
|
enableAskSage?: boolean;
|
|
903
903
|
/**
|
|
904
|
-
* This flag is used to enable the 2 column layout
|
|
904
|
+
* This flag is used to enable the 2 column layout on a Liveboard
|
|
905
905
|
* @type {boolean}
|
|
906
906
|
* @default false
|
|
907
907
|
* @version SDK: 1.32.0 | ThoughtSpot:10.1.0.cl
|
|
@@ -936,7 +936,7 @@ declare module '@thoughtspot/visual-embed-sdk/embed/liveboard' {
|
|
|
936
936
|
*/
|
|
937
937
|
showPreviewLoader?: boolean;
|
|
938
938
|
/**
|
|
939
|
-
* This flag is used to enable the compact header
|
|
939
|
+
* This flag is used to enable the compact header on a Liveboard
|
|
940
940
|
* @type {boolean}
|
|
941
941
|
* @default false
|
|
942
942
|
* @version SDK: 1.35.0 | ThoughtSpot:10.3.0.cl
|
|
@@ -950,7 +950,7 @@ declare module '@thoughtspot/visual-embed-sdk/embed/liveboard' {
|
|
|
950
950
|
*/
|
|
951
951
|
isLiveboardCompactHeaderEnabled?: boolean;
|
|
952
952
|
/**
|
|
953
|
-
* This flag is used to show/hide verified
|
|
953
|
+
* This flag is used to show/hide verified icon in the Liveboard compact header
|
|
954
954
|
* @type {boolean}
|
|
955
955
|
* @default true
|
|
956
956
|
* @version SDK: 1.35.0 | ThoughtSpot:10.4.0.cl
|
|
@@ -964,7 +964,8 @@ declare module '@thoughtspot/visual-embed-sdk/embed/liveboard' {
|
|
|
964
964
|
*/
|
|
965
965
|
showLiveboardVerifiedBadge?: boolean;
|
|
966
966
|
/**
|
|
967
|
-
* This flag is used to show/hide re-verify banner
|
|
967
|
+
* This flag is used to show/hide the re-verify banner
|
|
968
|
+
* in Liveboard compact header
|
|
968
969
|
* @type {boolean}
|
|
969
970
|
* @default true
|
|
970
971
|
* @version SDK: 1.35.0 | ThoughtSpot:10.4.0.cl
|
|
@@ -978,7 +979,7 @@ declare module '@thoughtspot/visual-embed-sdk/embed/liveboard' {
|
|
|
978
979
|
*/
|
|
979
980
|
showLiveboardReverifyBanner?: boolean;
|
|
980
981
|
/**
|
|
981
|
-
* This flag is used to enable/disable hide irrelevant filters in
|
|
982
|
+
* This flag is used to enable/disable hide irrelevant filters in a Liveboard tab
|
|
982
983
|
* @type {boolean}
|
|
983
984
|
* @default false
|
|
984
985
|
* @version SDK: 1.36.0 | ThoughtSpot:10.6.0.cl
|
|
@@ -1067,8 +1068,8 @@ declare module '@thoughtspot/visual-embed-sdk/embed/liveboard' {
|
|
|
1067
1068
|
render(): Promise<LiveboardEmbed>;
|
|
1068
1069
|
navigateToLiveboard(liveboardId: string, vizId?: string, activeTabId?: string): void;
|
|
1069
1070
|
/**
|
|
1070
|
-
* Returns the full url of the
|
|
1071
|
-
* this
|
|
1071
|
+
* Returns the full url of the Liveboard/visualization which can be used to open
|
|
1072
|
+
* this Liveboard inside the full Thoughtspot application in a new tab.
|
|
1072
1073
|
* @returns url string
|
|
1073
1074
|
*/
|
|
1074
1075
|
getLiveboardUrl(): string;
|
|
@@ -2859,8 +2860,11 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
2859
2860
|
*/
|
|
2860
2861
|
enableCustomColumnGroups?: boolean;
|
|
2861
2862
|
/**
|
|
2862
|
-
*
|
|
2863
|
-
* This
|
|
2863
|
+
* Overrides an Org context for embedding application users.
|
|
2864
|
+
* This parameter allows a user authenticated to one Org to view the
|
|
2865
|
+
* objects from another Org.
|
|
2866
|
+
* The `overrideOrgId` setting is honoured only if the
|
|
2867
|
+
* Per Org URL feature is enabled on your ThoughtSpot instance.
|
|
2864
2868
|
* @example
|
|
2865
2869
|
* ```js
|
|
2866
2870
|
* const embed = new LiveboardEmbed('#embed', {
|
|
@@ -4117,7 +4121,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
4117
4121
|
* @param - autoDrillDown - Optional. If true, the drill down will be
|
|
4118
4122
|
* done automatically on the most popular column.
|
|
4119
4123
|
* @param - vizId [TS >= 9.8.0] - Optional. The GUID of the visualization to drill
|
|
4120
|
-
* in case of a
|
|
4124
|
+
* in case of a Liveboard.
|
|
4121
4125
|
* @example
|
|
4122
4126
|
* ```js
|
|
4123
4127
|
* searchEmbed.on(EmbedEvent.VizPointDoubleClick, (payload) => {
|
|
@@ -4204,25 +4208,23 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
4204
4208
|
*/
|
|
4205
4209
|
SetActiveTab = "SetActiveTab",
|
|
4206
4210
|
/**
|
|
4207
|
-
*
|
|
4208
|
-
*
|
|
4209
|
-
* filters.
|
|
4211
|
+
* Updates the runtime filters applied on a Liveboard. The filter
|
|
4212
|
+
* attributes passed with this event are appended to the existing runtime
|
|
4213
|
+
* filters applied on a Liveboard.
|
|
4214
|
+
*
|
|
4210
4215
|
* Pass an array of runtime filters with the following attributes:
|
|
4211
4216
|
*
|
|
4212
|
-
* `columnName`
|
|
4213
|
-
* _String_. The name of the column to filter on.
|
|
4217
|
+
* `columnName` - _String_. The name of the column to filter on.
|
|
4214
4218
|
*
|
|
4215
|
-
* `operator`
|
|
4216
|
-
* Runtime filter operator to apply. For information,
|
|
4219
|
+
* `operator` - Runtime filter operator to apply. For more information,
|
|
4217
4220
|
* see link:https://developers.thoughtspot.com/docs/?pageid=runtime-filters#rtOperator[Developer Documentation].
|
|
4218
4221
|
*
|
|
4219
|
-
* `values`
|
|
4220
|
-
*
|
|
4221
|
-
* operators such as BW and IN accept multiple operands.
|
|
4222
|
+
* `values` - List of operands. Some operators such as EQ and LE allow a
|
|
4223
|
+
* single value, whereas BW and IN accept multiple values.
|
|
4222
4224
|
*
|
|
4223
|
-
* **Note**: `HostEvent.UpdateRuntimeFilters` is
|
|
4224
|
-
*
|
|
4225
|
-
*
|
|
4225
|
+
* **Note**: `HostEvent.UpdateRuntimeFilters` is supported in `LiveboardEmbed`
|
|
4226
|
+
* and `AppEmbed` only. In full application embedding, this event updates
|
|
4227
|
+
* the runtime filters applied on the Liveboard and saved Answer objects.
|
|
4226
4228
|
* @param - {@link RuntimeFilter}[] an array of {@link RuntimeFilter} Types.
|
|
4227
4229
|
* @example
|
|
4228
4230
|
* ```js
|
|
@@ -4922,7 +4924,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
4922
4924
|
*/
|
|
4923
4925
|
ResetLiveboardPersonalisedView = "ResetLiveboardPersonalisedView",
|
|
4924
4926
|
/**
|
|
4925
|
-
* Triggers Update
|
|
4927
|
+
* Triggers an event to Update Parameter values for Answers and Liveboard
|
|
4926
4928
|
* @example
|
|
4927
4929
|
* ```js
|
|
4928
4930
|
* liveboardEmbed.trigger(HostEvent.UpdateParameters, [{
|
|
@@ -4944,7 +4946,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
4944
4946
|
*/
|
|
4945
4947
|
GetParameters = "GetParameters",
|
|
4946
4948
|
/**
|
|
4947
|
-
* Triggers update
|
|
4949
|
+
* Triggers an event to update a persoanlised view of a Liveboard
|
|
4948
4950
|
* ```js
|
|
4949
4951
|
* liveboardEmbed.trigger(HostEvent.UpdatePersonalisedView, {viewId: '1234'})
|
|
4950
4952
|
* ```
|
|
@@ -5933,7 +5935,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
5933
5935
|
*/
|
|
5934
5936
|
ModifySageAnswer = "modifySageAnswer",
|
|
5935
5937
|
/**
|
|
5936
|
-
* The **Move to Tab** menu action on visualizations in
|
|
5938
|
+
* The **Move to Tab** menu action on visualizations in Liveboard edit mode.
|
|
5937
5939
|
* Allows moving a visualization to a different tab.
|
|
5938
5940
|
* @example
|
|
5939
5941
|
* ```js
|
|
@@ -5986,7 +5988,8 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
5986
5988
|
*/
|
|
5987
5989
|
TML = "tml",
|
|
5988
5990
|
/**
|
|
5989
|
-
* Action
|
|
5991
|
+
* Action ID for the create Liveboard option on the Liveboard list page
|
|
5992
|
+
* and Pin modal
|
|
5990
5993
|
* @example
|
|
5991
5994
|
* ```js
|
|
5992
5995
|
* hiddenAction: [Action.CreateLiveboard]
|
|
@@ -7508,7 +7511,7 @@ declare module '@thoughtspot/visual-embed-sdk/embed/ts-embed' {
|
|
|
7508
7511
|
/**
|
|
7509
7512
|
* Returns the answerService which can be used to make arbitrary graphql calls on top
|
|
7510
7513
|
* session.
|
|
7511
|
-
* @param vizId [Optional] to get for a specific viz in case of a
|
|
7514
|
+
* @param vizId [Optional] to get for a specific viz in case of a Liveboard.
|
|
7512
7515
|
* @version SDK: 1.25.0 / ThoughtSpot 9.10.0
|
|
7513
7516
|
*/
|
|
7514
7517
|
getAnswerService(vizId?: string): Promise<AnswerService>;
|
package/package.json
CHANGED
package/src/embed/app.ts
CHANGED
|
@@ -418,7 +418,7 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
|
|
|
418
418
|
*/
|
|
419
419
|
showLiveboardVerifiedBadge?: boolean;
|
|
420
420
|
/**
|
|
421
|
-
* This flag is used to enable/disable hide irrelevant filters in
|
|
421
|
+
* This flag is used to enable/disable hide irrelevant filters in Liveboard tab
|
|
422
422
|
* @type {boolean}
|
|
423
423
|
* @default false
|
|
424
424
|
* @version SDK: 1.36.0 | ThoughtSpot:10.6.0.cl
|
|
@@ -628,9 +628,23 @@ export class AppEmbed extends V1Embed {
|
|
|
628
628
|
|
|
629
629
|
private setIframeHeightForNonEmbedLiveboard = (data: MessagePayload) => {
|
|
630
630
|
const { height: frameHeight, ...restParams } = this.viewConfig.frameParams || {};
|
|
631
|
-
|
|
632
|
-
|
|
631
|
+
|
|
632
|
+
const liveboardRelatedRoutes = [
|
|
633
|
+
'/pinboard/',
|
|
634
|
+
'/insights/pinboard/',
|
|
635
|
+
'/schedules/',
|
|
636
|
+
'/embed/viz/',
|
|
637
|
+
'/embed/insights/viz/',
|
|
638
|
+
'/liveboard/',
|
|
639
|
+
'/insights/liveboard/',
|
|
640
|
+
];
|
|
641
|
+
|
|
642
|
+
if (liveboardRelatedRoutes.some((path) => data.data.currentPath.startsWith(path))) {
|
|
643
|
+
// Ignore the height reset of the frame, if the navigation is
|
|
644
|
+
// only within the liveboard page.
|
|
645
|
+
return;
|
|
633
646
|
}
|
|
647
|
+
this.setIFrameHeight(frameHeight || this.defaultHeight);
|
|
634
648
|
};
|
|
635
649
|
|
|
636
650
|
/**
|
package/src/embed/base.ts
CHANGED
|
@@ -174,7 +174,7 @@ function backwardCompat(embedConfig: EmbedConfig): EmbedConfig {
|
|
|
174
174
|
/**
|
|
175
175
|
* Initializes the Visual Embed SDK globally and perform
|
|
176
176
|
* authentication if applicable. This function needs to be called before any ThoughtSpot
|
|
177
|
-
* component like
|
|
177
|
+
* component like Liveboard etc can be embedded. But need not wait for AuthEvent.SUCCESS
|
|
178
178
|
* to actually embed. That is handled internally.
|
|
179
179
|
* @param embedConfig The configuration object containing ThoughtSpot host,
|
|
180
180
|
* authentication mechanism and so on.
|
package/src/embed/liveboard.ts
CHANGED
|
@@ -249,7 +249,7 @@ export interface LiveboardViewConfig
|
|
|
249
249
|
*/
|
|
250
250
|
enableAskSage?: boolean;
|
|
251
251
|
/**
|
|
252
|
-
* This flag is used to enable the 2 column layout
|
|
252
|
+
* This flag is used to enable the 2 column layout on a Liveboard
|
|
253
253
|
* @type {boolean}
|
|
254
254
|
* @default false
|
|
255
255
|
* @version SDK: 1.32.0 | ThoughtSpot:10.1.0.cl
|
|
@@ -284,7 +284,7 @@ export interface LiveboardViewConfig
|
|
|
284
284
|
*/
|
|
285
285
|
showPreviewLoader?: boolean;
|
|
286
286
|
/**
|
|
287
|
-
* This flag is used to enable the compact header
|
|
287
|
+
* This flag is used to enable the compact header on a Liveboard
|
|
288
288
|
* @type {boolean}
|
|
289
289
|
* @default false
|
|
290
290
|
* @version SDK: 1.35.0 | ThoughtSpot:10.3.0.cl
|
|
@@ -298,7 +298,7 @@ export interface LiveboardViewConfig
|
|
|
298
298
|
*/
|
|
299
299
|
isLiveboardCompactHeaderEnabled?: boolean;
|
|
300
300
|
/**
|
|
301
|
-
* This flag is used to show/hide verified
|
|
301
|
+
* This flag is used to show/hide verified icon in the Liveboard compact header
|
|
302
302
|
* @type {boolean}
|
|
303
303
|
* @default true
|
|
304
304
|
* @version SDK: 1.35.0 | ThoughtSpot:10.4.0.cl
|
|
@@ -312,7 +312,8 @@ export interface LiveboardViewConfig
|
|
|
312
312
|
*/
|
|
313
313
|
showLiveboardVerifiedBadge?: boolean;
|
|
314
314
|
/**
|
|
315
|
-
* This flag is used to show/hide re-verify banner
|
|
315
|
+
* This flag is used to show/hide the re-verify banner
|
|
316
|
+
* in Liveboard compact header
|
|
316
317
|
* @type {boolean}
|
|
317
318
|
* @default true
|
|
318
319
|
* @version SDK: 1.35.0 | ThoughtSpot:10.4.0.cl
|
|
@@ -326,7 +327,7 @@ export interface LiveboardViewConfig
|
|
|
326
327
|
*/
|
|
327
328
|
showLiveboardReverifyBanner?: boolean;
|
|
328
329
|
/**
|
|
329
|
-
* This flag is used to enable/disable hide irrelevant filters in
|
|
330
|
+
* This flag is used to enable/disable hide irrelevant filters in a Liveboard tab
|
|
330
331
|
* @type {boolean}
|
|
331
332
|
* @default false
|
|
332
333
|
* @version SDK: 1.36.0 | ThoughtSpot:10.6.0.cl
|
|
@@ -682,8 +683,8 @@ export class LiveboardEmbed extends V1Embed {
|
|
|
682
683
|
}
|
|
683
684
|
|
|
684
685
|
/**
|
|
685
|
-
* Returns the full url of the
|
|
686
|
-
* this
|
|
686
|
+
* Returns the full url of the Liveboard/visualization which can be used to open
|
|
687
|
+
* this Liveboard inside the full Thoughtspot application in a new tab.
|
|
687
688
|
* @returns url string
|
|
688
689
|
*/
|
|
689
690
|
public getLiveboardUrl(): string {
|
package/src/embed/ts-embed.ts
CHANGED
|
@@ -1282,7 +1282,7 @@ export class TsEmbed {
|
|
|
1282
1282
|
/**
|
|
1283
1283
|
* Returns the answerService which can be used to make arbitrary graphql calls on top
|
|
1284
1284
|
* session.
|
|
1285
|
-
* @param vizId [Optional] to get for a specific viz in case of a
|
|
1285
|
+
* @param vizId [Optional] to get for a specific viz in case of a Liveboard.
|
|
1286
1286
|
* @version SDK: 1.25.0 / ThoughtSpot 9.10.0
|
|
1287
1287
|
*/
|
|
1288
1288
|
public async getAnswerService(vizId?: string): Promise<AnswerService> {
|
package/src/types.ts
CHANGED
|
@@ -1088,8 +1088,11 @@ export interface ViewConfig {
|
|
|
1088
1088
|
*/
|
|
1089
1089
|
enableCustomColumnGroups?: boolean;
|
|
1090
1090
|
/**
|
|
1091
|
-
*
|
|
1092
|
-
* This
|
|
1091
|
+
* Overrides an Org context for embedding application users.
|
|
1092
|
+
* This parameter allows a user authenticated to one Org to view the
|
|
1093
|
+
* objects from another Org.
|
|
1094
|
+
* The `overrideOrgId` setting is honoured only if the
|
|
1095
|
+
* Per Org URL feature is enabled on your ThoughtSpot instance.
|
|
1093
1096
|
* @example
|
|
1094
1097
|
* ```js
|
|
1095
1098
|
* const embed = new LiveboardEmbed('#embed', {
|
|
@@ -2365,7 +2368,7 @@ export enum HostEvent {
|
|
|
2365
2368
|
* @param - autoDrillDown - Optional. If true, the drill down will be
|
|
2366
2369
|
* done automatically on the most popular column.
|
|
2367
2370
|
* @param - vizId [TS >= 9.8.0] - Optional. The GUID of the visualization to drill
|
|
2368
|
-
* in case of a
|
|
2371
|
+
* in case of a Liveboard.
|
|
2369
2372
|
* @example
|
|
2370
2373
|
* ```js
|
|
2371
2374
|
* searchEmbed.on(EmbedEvent.VizPointDoubleClick, (payload) => {
|
|
@@ -2452,25 +2455,23 @@ export enum HostEvent {
|
|
|
2452
2455
|
*/
|
|
2453
2456
|
SetActiveTab = 'SetActiveTab',
|
|
2454
2457
|
/**
|
|
2455
|
-
*
|
|
2456
|
-
*
|
|
2457
|
-
* filters.
|
|
2458
|
+
* Updates the runtime filters applied on a Liveboard. The filter
|
|
2459
|
+
* attributes passed with this event are appended to the existing runtime
|
|
2460
|
+
* filters applied on a Liveboard.
|
|
2461
|
+
*
|
|
2458
2462
|
* Pass an array of runtime filters with the following attributes:
|
|
2459
2463
|
*
|
|
2460
|
-
* `columnName`
|
|
2461
|
-
* _String_. The name of the column to filter on.
|
|
2464
|
+
* `columnName` - _String_. The name of the column to filter on.
|
|
2462
2465
|
*
|
|
2463
|
-
* `operator`
|
|
2464
|
-
* Runtime filter operator to apply. For information,
|
|
2466
|
+
* `operator` - Runtime filter operator to apply. For more information,
|
|
2465
2467
|
* see link:https://developers.thoughtspot.com/docs/?pageid=runtime-filters#rtOperator[Developer Documentation].
|
|
2466
2468
|
*
|
|
2467
|
-
* `values`
|
|
2468
|
-
*
|
|
2469
|
-
* operators such as BW and IN accept multiple operands.
|
|
2469
|
+
* `values` - List of operands. Some operators such as EQ and LE allow a
|
|
2470
|
+
* single value, whereas BW and IN accept multiple values.
|
|
2470
2471
|
*
|
|
2471
|
-
* **Note**: `HostEvent.UpdateRuntimeFilters` is
|
|
2472
|
-
*
|
|
2473
|
-
*
|
|
2472
|
+
* **Note**: `HostEvent.UpdateRuntimeFilters` is supported in `LiveboardEmbed`
|
|
2473
|
+
* and `AppEmbed` only. In full application embedding, this event updates
|
|
2474
|
+
* the runtime filters applied on the Liveboard and saved Answer objects.
|
|
2474
2475
|
* @param - {@link RuntimeFilter}[] an array of {@link RuntimeFilter} Types.
|
|
2475
2476
|
* @example
|
|
2476
2477
|
* ```js
|
|
@@ -3170,7 +3171,7 @@ export enum HostEvent {
|
|
|
3170
3171
|
*/
|
|
3171
3172
|
ResetLiveboardPersonalisedView = 'ResetLiveboardPersonalisedView',
|
|
3172
3173
|
/**
|
|
3173
|
-
* Triggers Update
|
|
3174
|
+
* Triggers an event to Update Parameter values for Answers and Liveboard
|
|
3174
3175
|
* @example
|
|
3175
3176
|
* ```js
|
|
3176
3177
|
* liveboardEmbed.trigger(HostEvent.UpdateParameters, [{
|
|
@@ -3192,7 +3193,7 @@ export enum HostEvent {
|
|
|
3192
3193
|
*/
|
|
3193
3194
|
GetParameters = 'GetParameters',
|
|
3194
3195
|
/**
|
|
3195
|
-
* Triggers update
|
|
3196
|
+
* Triggers an event to update a persoanlised view of a Liveboard
|
|
3196
3197
|
* ```js
|
|
3197
3198
|
* liveboardEmbed.trigger(HostEvent.UpdatePersonalisedView, {viewId: '1234'})
|
|
3198
3199
|
* ```
|
|
@@ -4189,7 +4190,7 @@ export enum Action {
|
|
|
4189
4190
|
*/
|
|
4190
4191
|
ModifySageAnswer = 'modifySageAnswer',
|
|
4191
4192
|
/**
|
|
4192
|
-
* The **Move to Tab** menu action on visualizations in
|
|
4193
|
+
* The **Move to Tab** menu action on visualizations in Liveboard edit mode.
|
|
4193
4194
|
* Allows moving a visualization to a different tab.
|
|
4194
4195
|
* @example
|
|
4195
4196
|
* ```js
|
|
@@ -4244,7 +4245,8 @@ export enum Action {
|
|
|
4244
4245
|
TML = 'tml',
|
|
4245
4246
|
|
|
4246
4247
|
/**
|
|
4247
|
-
* Action
|
|
4248
|
+
* Action ID for the create Liveboard option on the Liveboard list page
|
|
4249
|
+
* and Pin modal
|
|
4248
4250
|
* @example
|
|
4249
4251
|
* ```js
|
|
4250
4252
|
* hiddenAction: [Action.CreateLiveboard]
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"searchEmbed-basic-auth.spec.d.ts","sourceRoot":"","sources":["../../../src/embed/searchEmbed-basic-auth.spec.ts"],"names":[],"mappings":""}
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
const search_1 = require("./search");
|
|
5
|
-
const baseInstance = tslib_1.__importStar(require("./base"));
|
|
6
|
-
const authService = tslib_1.__importStar(require("../utils/authService"));
|
|
7
|
-
const authInstance = tslib_1.__importStar(require("../auth"));
|
|
8
|
-
const config = tslib_1.__importStar(require("../config"));
|
|
9
|
-
const embedConfigInstance = tslib_1.__importStar(require("./embedConfig"));
|
|
10
|
-
const index_1 = require("../index");
|
|
11
|
-
const types_1 = require("../types");
|
|
12
|
-
const test_utils_1 = require("../test/test-utils");
|
|
13
|
-
const auth_spec_1 = require("../auth.spec");
|
|
14
|
-
const thoughtSpotHost = 'tshost';
|
|
15
|
-
(0, index_1.init)({
|
|
16
|
-
thoughtSpotHost,
|
|
17
|
-
authType: types_1.AuthType.Basic,
|
|
18
|
-
username: 'tsadmin',
|
|
19
|
-
password: 'admin',
|
|
20
|
-
});
|
|
21
|
-
describe('Search embed tests when authType is Basic', () => {
|
|
22
|
-
/**
|
|
23
|
-
*
|
|
24
|
-
* @param version
|
|
25
|
-
*/
|
|
26
|
-
function setupVersion(version) {
|
|
27
|
-
jest.spyOn(window, 'addEventListener').mockImplementation((event, handler, options) => {
|
|
28
|
-
handler({
|
|
29
|
-
data: {
|
|
30
|
-
type: 'xyz',
|
|
31
|
-
},
|
|
32
|
-
ports: [3000],
|
|
33
|
-
source: null,
|
|
34
|
-
});
|
|
35
|
-
});
|
|
36
|
-
jest.spyOn(authService, 'fetchSessionInfoService').mockImplementation(async () => ({
|
|
37
|
-
json: () => ({
|
|
38
|
-
...auth_spec_1.mockSessionInfo,
|
|
39
|
-
releaseVersion: version,
|
|
40
|
-
}),
|
|
41
|
-
status: 200,
|
|
42
|
-
}));
|
|
43
|
-
jest.spyOn(authInstance, 'getReleaseVersion').mockReturnValue(version);
|
|
44
|
-
}
|
|
45
|
-
beforeEach(() => {
|
|
46
|
-
document.body.innerHTML = (0, test_utils_1.getDocumentBody)();
|
|
47
|
-
jest.spyOn(baseInstance, 'getAuthPromise').mockResolvedValue(true);
|
|
48
|
-
});
|
|
49
|
-
afterEach(() => {
|
|
50
|
-
jest.clearAllMocks();
|
|
51
|
-
});
|
|
52
|
-
test('when releaseVersion is empty', async () => {
|
|
53
|
-
setupVersion('');
|
|
54
|
-
const mockAlert = spyOn(window, 'alert');
|
|
55
|
-
const searchEmbed = new search_1.SearchEmbed((0, test_utils_1.getRootEl)(), {});
|
|
56
|
-
await searchEmbed.render();
|
|
57
|
-
expect(mockAlert).not.toBeCalled();
|
|
58
|
-
});
|
|
59
|
-
test("when releaseVersion is '7.0.1.cl' ", async () => {
|
|
60
|
-
setupVersion('7.0.1.cl');
|
|
61
|
-
const mockAlert = jest.spyOn(window, 'alert');
|
|
62
|
-
const searchEmbed = new search_1.SearchEmbed((0, test_utils_1.getRootEl)(), {});
|
|
63
|
-
await searchEmbed.render();
|
|
64
|
-
expect(mockAlert).not.toBeCalled();
|
|
65
|
-
});
|
|
66
|
-
test('when releaseVersion is above 8.4.0.sw', async () => {
|
|
67
|
-
setupVersion('8.4.0.sw');
|
|
68
|
-
const mockAlert = jest.spyOn(window, 'alert');
|
|
69
|
-
const searchEmbed = new search_1.SearchEmbed((0, test_utils_1.getRootEl)(), {});
|
|
70
|
-
await searchEmbed.render();
|
|
71
|
-
expect(mockAlert).not.toBeCalled();
|
|
72
|
-
});
|
|
73
|
-
test('releaseVersion is above 8.4.0.sw', async () => {
|
|
74
|
-
setupVersion('8.8.0.sw');
|
|
75
|
-
jest.spyOn(config, 'getThoughtSpotHost').mockImplementation(() => 'http://tshost');
|
|
76
|
-
const mockAlert = jest.spyOn(window, 'alert');
|
|
77
|
-
const searchEmbed = new search_1.SearchEmbed((0, test_utils_1.getRootEl)(), {});
|
|
78
|
-
await searchEmbed.render();
|
|
79
|
-
expect(mockAlert).not.toBeCalled();
|
|
80
|
-
});
|
|
81
|
-
test('Alert should not appear when suppressSearchEmbedBetaWarning is true and releaseVersion is ts7.dec.cl', async () => {
|
|
82
|
-
setupVersion('ts7.dec.cl');
|
|
83
|
-
jest.spyOn(config, 'getThoughtSpotHost').mockImplementation(() => 'http://tshost');
|
|
84
|
-
jest.spyOn(embedConfigInstance, 'getEmbedConfig').mockReturnValue({
|
|
85
|
-
suppressSearchEmbedBetaWarning: true,
|
|
86
|
-
});
|
|
87
|
-
const mockAlert = jest.spyOn(window, 'alert');
|
|
88
|
-
const searchEmbed = new search_1.SearchEmbed((0, test_utils_1.getRootEl)(), {});
|
|
89
|
-
await searchEmbed.render();
|
|
90
|
-
expect(mockAlert).not.toBeCalled();
|
|
91
|
-
});
|
|
92
|
-
test('Alert should not appear when suppressSearchEmbedBetaWarning is true and releaseVersion is 8.4.0.sw', async () => {
|
|
93
|
-
setupVersion('8.4.0.sw');
|
|
94
|
-
jest.spyOn(config, 'getThoughtSpotHost').mockImplementation(() => 'http://tshost');
|
|
95
|
-
jest.spyOn(embedConfigInstance, 'getEmbedConfig').mockReturnValue({
|
|
96
|
-
suppressSearchEmbedBetaWarning: true,
|
|
97
|
-
});
|
|
98
|
-
const mockAlert = jest.spyOn(window, 'alert');
|
|
99
|
-
const searchEmbed = new search_1.SearchEmbed((0, test_utils_1.getRootEl)(), {});
|
|
100
|
-
await searchEmbed.render();
|
|
101
|
-
expect(mockAlert).not.toBeCalled();
|
|
102
|
-
});
|
|
103
|
-
});
|
|
104
|
-
//# sourceMappingURL=searchEmbed-basic-auth.spec.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"searchEmbed-basic-auth.spec.js","sourceRoot":"","sources":["../../../src/embed/searchEmbed-basic-auth.spec.ts"],"names":[],"mappings":";;;AAAA,qCAAuC;AACvC,6DAAuC;AACvC,0EAAoD;AACpD,8DAAwC;AACxC,0DAAoC;AACpC,2EAAqD;AAErD,oCAAgC;AAChC,oCAAoC;AACpC,mDAAgE;AAChE,4CAA+C;AAG/C,MAAM,eAAe,GAAG,QAAQ,CAAC;AACjC,IAAA,YAAI,EAAC;IACD,eAAe;IACf,QAAQ,EAAE,gBAAQ,CAAC,KAAK;IACxB,QAAQ,EAAE,SAAS;IACnB,QAAQ,EAAE,OAAO;CACpB,CAAC,CAAC;AAEH,QAAQ,CAAC,2CAA2C,EAAE,GAAG,EAAE;IACvD;;;OAGG;IACH,SAAS,YAAY,CAAC,OAAe;QACjC,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC,kBAAkB,CAAC,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE;YAClF,OAAO,CAAC;gBACJ,IAAI,EAAE;oBACF,IAAI,EAAE,KAAK;iBACd;gBACD,KAAK,EAAE,CAAC,IAAI,CAAC;gB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eMapping.d.ts","sourceRoot":"","sources":["../../src/hostEventsTypeMapping.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hostEventsTypeMapping.js","sourceRoot":"","sources":["../../src/hostEventsTypeMapping.ts"],"names":[],"mappings":";;AAAA,mCAAoC"}
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import { HostEvent } from '../../types';
|
|
2
|
-
export declare enum EmbedApiEvent {
|
|
3
|
-
addVizToPinboard = "addVizToPinboard",
|
|
4
|
-
saveAnswer = "saveAnswer",
|
|
5
|
-
getA3AnalysisColumns = "getA3AnalysisColumns",
|
|
6
|
-
getPinboardTabInfo = "getPinboardTabInfo",
|
|
7
|
-
getDiscoverabilityStatus = "getDiscoverabilityStatus",
|
|
8
|
-
getAvailableEmbedApis = "getAvailableEmbedApis",
|
|
9
|
-
getAnswerPageConfig = "getAnswerPageConfig",
|
|
10
|
-
getPinboardPageConfig = "getPinboardPageConfig",
|
|
11
|
-
embedApiEventNotFound = "embedApiEventNotFound"
|
|
12
|
-
}
|
|
13
|
-
export type EmbedApiContractBase = {
|
|
14
|
-
[EmbedApiEvent.addVizToPinboard]: {
|
|
15
|
-
request: {
|
|
16
|
-
vizId?: string;
|
|
17
|
-
newVizName: string;
|
|
18
|
-
newVizDescription?: string;
|
|
19
|
-
pinboardId?: string;
|
|
20
|
-
tabId?: string;
|
|
21
|
-
newPinboardName?: string;
|
|
22
|
-
newTabName?: string;
|
|
23
|
-
pinFromStore?: boolean;
|
|
24
|
-
};
|
|
25
|
-
response: {
|
|
26
|
-
pinboardId: string extends string ? null : string;
|
|
27
|
-
tabId: string;
|
|
28
|
-
vizId: string;
|
|
29
|
-
errors?: any;
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
[EmbedApiEvent.saveAnswer]: {
|
|
33
|
-
request: {
|
|
34
|
-
name: string;
|
|
35
|
-
description: string;
|
|
36
|
-
vizId: string;
|
|
37
|
-
isDiscoverable?: boolean;
|
|
38
|
-
};
|
|
39
|
-
response: any;
|
|
40
|
-
};
|
|
41
|
-
[EmbedApiEvent.getA3AnalysisColumns]: {
|
|
42
|
-
request: {
|
|
43
|
-
vizId: string;
|
|
44
|
-
};
|
|
45
|
-
response: {
|
|
46
|
-
data?: any;
|
|
47
|
-
errors?: any;
|
|
48
|
-
};
|
|
49
|
-
};
|
|
50
|
-
[EmbedApiEvent.getPinboardTabInfo]: {
|
|
51
|
-
request: any;
|
|
52
|
-
response: any;
|
|
53
|
-
};
|
|
54
|
-
[EmbedApiEvent.getDiscoverabilityStatus]: {
|
|
55
|
-
request: any;
|
|
56
|
-
response: {
|
|
57
|
-
shouldShowDiscoverability: boolean;
|
|
58
|
-
isDiscoverabilityCheckboxUnselectedPerOrg: boolean;
|
|
59
|
-
};
|
|
60
|
-
};
|
|
61
|
-
[EmbedApiEvent.getAvailableEmbedApis]: {
|
|
62
|
-
request: any;
|
|
63
|
-
response: {
|
|
64
|
-
keys: string[];
|
|
65
|
-
};
|
|
66
|
-
};
|
|
67
|
-
[EmbedApiEvent.getAnswerPageConfig]: {
|
|
68
|
-
request: {
|
|
69
|
-
vizId: string;
|
|
70
|
-
};
|
|
71
|
-
response: any;
|
|
72
|
-
};
|
|
73
|
-
[EmbedApiEvent.getPinboardPageConfig]: {
|
|
74
|
-
request: any;
|
|
75
|
-
response: any;
|
|
76
|
-
};
|
|
77
|
-
[EmbedApiEvent.embedApiEventNotFound]: {
|
|
78
|
-
request: any;
|
|
79
|
-
response: any;
|
|
80
|
-
};
|
|
81
|
-
};
|
|
82
|
-
export type EmbedApiRequest<T extends keyof EmbedApiContractBase> = EmbedApiContractBase[T]['request'];
|
|
83
|
-
export type EmbedApiResponse<T extends keyof EmbedApiContractBase> = EmbedApiContractBase[T]['response'];
|
|
84
|
-
export type EmbedApiArrayResponse<ApiName extends keyof EmbedApiContractBase> = Promise<Array<{
|
|
85
|
-
redId?: string;
|
|
86
|
-
value?: EmbedApiResponse<ApiName>;
|
|
87
|
-
error?: any;
|
|
88
|
-
}>>;
|
|
89
|
-
export type EmbedApiHostEventMapping = {
|
|
90
|
-
[HostEvent.Pin]: EmbedApiEvent.addVizToPinboard;
|
|
91
|
-
'hostEventNotMapped': EmbedApiEvent.embedApiEventNotFound;
|
|
92
|
-
};
|
|
93
|
-
export type FlattenType<T> = T extends infer R ? {
|
|
94
|
-
[K in keyof R]: R[K];
|
|
95
|
-
} : never;
|
|
96
|
-
export type HostEventRequest<HostEventT extends HostEvent> = HostEventT extends keyof EmbedApiHostEventMapping ? FlattenType<EmbedApiRequest<EmbedApiHostEventMapping[HostEventT]>> : any;
|
|
97
|
-
export type HostEventResponse<HostEventT extends HostEvent> = HostEventT extends keyof EmbedApiHostEventMapping ? {
|
|
98
|
-
value?: EmbedApiResponse<EmbedApiHostEventMapping[HostEventT]>;
|
|
99
|
-
error?: any;
|
|
100
|
-
} : any;
|
|
101
|
-
//# sourceMappingURL=contracts.d.ts.map
|