@thoughtspot/visual-embed-sdk 1.20.0 → 1.20.1
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/dist/src/auth.d.ts +38 -4
- package/dist/src/auth.d.ts.map +1 -1
- package/dist/src/embed/app.d.ts +2 -2
- package/dist/src/embed/base.d.ts +22 -13
- package/dist/src/embed/base.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts +2 -2
- package/dist/src/embed/search-bar.d.ts +4 -1
- package/dist/src/embed/search-bar.d.ts.map +1 -1
- package/dist/src/embed/search.d.ts +2 -2
- package/dist/src/embed/ts-embed.d.ts +35 -1
- package/dist/src/embed/ts-embed.d.ts.map +1 -1
- package/dist/src/index.d.ts +3 -3
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/react/index.d.ts.map +1 -1
- package/dist/src/types.d.ts +161 -26
- package/dist/src/types.d.ts.map +1 -1
- package/dist/tsembed.es.js +193 -35
- package/dist/tsembed.js +174 -35
- package/lib/package.json +2 -3
- package/lib/src/auth.d.ts +38 -4
- package/lib/src/auth.d.ts.map +1 -1
- package/lib/src/auth.js +17 -2
- package/lib/src/auth.js.map +1 -1
- package/lib/src/embed/app.d.ts +2 -2
- package/lib/src/embed/app.js +1 -1
- package/lib/src/embed/base.d.ts +22 -13
- package/lib/src/embed/base.d.ts.map +1 -1
- package/lib/src/embed/base.js +21 -3
- package/lib/src/embed/base.js.map +1 -1
- package/lib/src/embed/base.spec.js +2 -2
- package/lib/src/embed/base.spec.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts +2 -2
- package/lib/src/embed/liveboard.js +1 -1
- package/lib/src/embed/search-bar.d.ts +4 -1
- package/lib/src/embed/search-bar.d.ts.map +1 -1
- package/lib/src/embed/search-bar.js +1 -1
- package/lib/src/embed/search-bar.js.map +1 -1
- package/lib/src/embed/search.d.ts +2 -2
- package/lib/src/embed/search.js +1 -1
- package/lib/src/embed/ts-embed.d.ts +35 -1
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +35 -2
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/index.d.ts +3 -3
- package/lib/src/index.d.ts.map +1 -1
- package/lib/src/index.js +1 -1
- package/lib/src/index.js.map +1 -1
- package/lib/src/react/index.d.ts.map +1 -1
- package/lib/src/react/index.js +4 -2
- package/lib/src/react/index.js.map +1 -1
- package/lib/src/react/index.spec.js +14 -2
- package/lib/src/react/index.spec.js.map +1 -1
- package/lib/src/types.d.ts +161 -26
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +115 -23
- package/lib/src/types.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +269 -54
- package/package.json +2 -3
- package/src/auth.ts +51 -5
- package/src/embed/app.ts +2 -2
- package/src/embed/base.spec.ts +3 -3
- package/src/embed/base.ts +26 -7
- package/src/embed/liveboard.ts +2 -2
- package/src/embed/search-bar.tsx +4 -1
- package/src/embed/search.ts +2 -2
- package/src/embed/ts-embed.ts +35 -2
- package/src/index.ts +24 -2
- package/src/react/index.spec.tsx +35 -2
- package/src/react/index.tsx +10 -2
- package/src/types.ts +162 -25
package/src/types.ts
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
/**
|
|
11
11
|
* The authentication mechanism for allowing access to the
|
|
12
12
|
* the embedded app
|
|
13
|
+
* @group Authentication / Init
|
|
13
14
|
*/
|
|
14
15
|
// eslint-disable-next-line no-shadow
|
|
15
16
|
export enum AuthType {
|
|
@@ -38,6 +39,15 @@ export enum AuthType {
|
|
|
38
39
|
/**
|
|
39
40
|
* SSO using SAML
|
|
40
41
|
* Will make the host application redirect to the SAML Idp.
|
|
42
|
+
* @example
|
|
43
|
+
* ```js
|
|
44
|
+
* init({
|
|
45
|
+
* // ...
|
|
46
|
+
* authType: AuthType.SAMLRedirect,
|
|
47
|
+
* authTriggerText: 'Login with SAML',
|
|
48
|
+
* authTriggerContainer: '#embed-container',
|
|
49
|
+
* });
|
|
50
|
+
* ```
|
|
41
51
|
*/
|
|
42
52
|
SAMLRedirect = 'SSO_SAML',
|
|
43
53
|
/**
|
|
@@ -61,6 +71,18 @@ export enum AuthType {
|
|
|
61
71
|
* Trusted authentication server, Use your own authentication server
|
|
62
72
|
* which returns a bearer token, generated using the secret_key obtained from
|
|
63
73
|
* ThoughtSpot.
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* ```js
|
|
77
|
+
* init({
|
|
78
|
+
* // ...
|
|
79
|
+
* authType: AuthType.TrustedAuthToken,
|
|
80
|
+
* getAuthToken: () => {
|
|
81
|
+
* return fetch('https://my-backend.app/ts-token')
|
|
82
|
+
* .then((response) => response.json())
|
|
83
|
+
* .then((data) => data.token);
|
|
84
|
+
* }
|
|
85
|
+
* ```
|
|
64
86
|
*/
|
|
65
87
|
TrustedAuthToken = 'AuthServer',
|
|
66
88
|
/**
|
|
@@ -81,7 +103,10 @@ export enum AuthType {
|
|
|
81
103
|
|
|
82
104
|
export type DOMSelector = string | HTMLElement;
|
|
83
105
|
|
|
84
|
-
|
|
106
|
+
/**
|
|
107
|
+
* inline customCSS within the {@link CustomisationsInterface}.
|
|
108
|
+
*/
|
|
109
|
+
export interface customCssInterface {
|
|
85
110
|
variables?: {
|
|
86
111
|
[variableName: string]: string;
|
|
87
112
|
};
|
|
@@ -92,10 +117,39 @@ interface customCssInterface {
|
|
|
92
117
|
};
|
|
93
118
|
};
|
|
94
119
|
}
|
|
95
|
-
|
|
120
|
+
/**
|
|
121
|
+
* Styles within the {@link CustomisationsInterface}.
|
|
122
|
+
*/
|
|
123
|
+
export interface CustomStyles {
|
|
96
124
|
customCSSUrl?: string;
|
|
97
125
|
customCSS?: customCssInterface;
|
|
98
126
|
}
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Configuration to define the customization on the Embedded
|
|
130
|
+
* Thoughtspot components.
|
|
131
|
+
*
|
|
132
|
+
* @example
|
|
133
|
+
* ```js
|
|
134
|
+
* init({
|
|
135
|
+
* // ...
|
|
136
|
+
* customizations: {
|
|
137
|
+
* style: {
|
|
138
|
+
* customCSS: {
|
|
139
|
+
* variables: {},
|
|
140
|
+
* rules_UNSTABLE: {}
|
|
141
|
+
* }
|
|
142
|
+
* },
|
|
143
|
+
* content: {
|
|
144
|
+
* strings: {
|
|
145
|
+
* 'LIVEBOARDS': 'Dashboards'
|
|
146
|
+
* }
|
|
147
|
+
* },
|
|
148
|
+
* iconSpriteUrl: 'https://my-custom-icon-sprite.svg'
|
|
149
|
+
* }
|
|
150
|
+
* })
|
|
151
|
+
* ```
|
|
152
|
+
*/
|
|
99
153
|
export interface CustomisationsInterface {
|
|
100
154
|
style?: CustomStyles;
|
|
101
155
|
content?: {
|
|
@@ -110,6 +164,8 @@ export interface CustomisationsInterface {
|
|
|
110
164
|
* It includes the ThoughtSpot hostname or IP address,
|
|
111
165
|
* the type of authentication, and the authentication endpoint
|
|
112
166
|
* if a trusted authentication server is used.
|
|
167
|
+
*
|
|
168
|
+
* @group Authentication / Init
|
|
113
169
|
*/
|
|
114
170
|
export interface EmbedConfig {
|
|
115
171
|
/**
|
|
@@ -286,6 +342,8 @@ export interface LayoutConfig {}
|
|
|
286
342
|
|
|
287
343
|
/**
|
|
288
344
|
* Embedded iFrame configuration
|
|
345
|
+
*
|
|
346
|
+
* @group Embed components
|
|
289
347
|
*/
|
|
290
348
|
export interface FrameParams {
|
|
291
349
|
/**
|
|
@@ -296,6 +354,12 @@ export interface FrameParams {
|
|
|
296
354
|
* The height of the iFrame (unit is pixels if numeric).
|
|
297
355
|
*/
|
|
298
356
|
height?: number | string;
|
|
357
|
+
/**
|
|
358
|
+
* Set to 'lazy' to enable lazy loading of the embedded TS frame.
|
|
359
|
+
* This will defer loading of the frame until it comes into the
|
|
360
|
+
* viewport. This is useful for performance optimization.
|
|
361
|
+
*/
|
|
362
|
+
loading?: 'lazy' | 'eager' | 'auto';
|
|
299
363
|
/**
|
|
300
364
|
* This parameters will be passed on the iframe
|
|
301
365
|
* as is.
|
|
@@ -400,6 +464,7 @@ export interface ViewConfig {
|
|
|
400
464
|
|
|
401
465
|
/**
|
|
402
466
|
* MessagePayload: Embed event payload: message type, data and status (start/end)
|
|
467
|
+
* @group Events
|
|
403
468
|
*/
|
|
404
469
|
export type MessagePayload = {
|
|
405
470
|
/* type: message type eg: 'save' */
|
|
@@ -411,6 +476,7 @@ export type MessagePayload = {
|
|
|
411
476
|
};
|
|
412
477
|
/**
|
|
413
478
|
* MessageOptions: By Providing options, getting specific event start / end based on option
|
|
479
|
+
* @group Events
|
|
414
480
|
*/
|
|
415
481
|
export type MessageOptions = {
|
|
416
482
|
/* A boolean value indicating that start status events of this type will be dispatched */
|
|
@@ -418,6 +484,7 @@ export type MessageOptions = {
|
|
|
418
484
|
};
|
|
419
485
|
/**
|
|
420
486
|
* MessageCallback: Embed event message callback
|
|
487
|
+
* @group Events
|
|
421
488
|
*/
|
|
422
489
|
export type MessageCallback = (
|
|
423
490
|
/* payload: Message payload contain type, data and status */
|
|
@@ -526,6 +593,10 @@ export interface RuntimeFilter {
|
|
|
526
593
|
|
|
527
594
|
/**
|
|
528
595
|
* Event types emitted by the embedded ThoughtSpot application.
|
|
596
|
+
*
|
|
597
|
+
* To add an event listener use the corresponding
|
|
598
|
+
* {@link LiveboardEmbed.on} or {@link AppEmbed.on} or {@link SearchEmbed.on} method.
|
|
599
|
+
* @group Events
|
|
529
600
|
*/
|
|
530
601
|
// eslint-disable-next-line no-shadow
|
|
531
602
|
export enum EmbedEvent {
|
|
@@ -854,6 +925,7 @@ export enum EmbedEvent {
|
|
|
854
925
|
*
|
|
855
926
|
* To trigger an event use the corresponding
|
|
856
927
|
* {@link LiveboardEmbed.trigger} or {@link AppEmbed.trigger} or {@link SearchEmbed.trigger} method.
|
|
928
|
+
* @group Events
|
|
857
929
|
*/
|
|
858
930
|
// eslint-disable-next-line no-shadow
|
|
859
931
|
export enum HostEvent {
|
|
@@ -865,11 +937,13 @@ export enum HostEvent {
|
|
|
865
937
|
* @param - searchQuery - The search query
|
|
866
938
|
* @param - execute - execute the existing / updated query
|
|
867
939
|
* @example
|
|
940
|
+
* ```js
|
|
868
941
|
* searchEmbed.trigger(HostEvent.Search, {
|
|
869
|
-
*
|
|
870
|
-
*
|
|
871
|
-
*
|
|
942
|
+
* searchQuery: "[sales] by [item type],
|
|
943
|
+
* dataSourceIds: ["cd252e5c-b552-49a8-821d-3eadaa049cca"]
|
|
944
|
+
* execute: true
|
|
872
945
|
* })
|
|
946
|
+
* ```
|
|
873
947
|
*/
|
|
874
948
|
Search = 'search',
|
|
875
949
|
/**
|
|
@@ -878,10 +952,14 @@ export enum HostEvent {
|
|
|
878
952
|
* eg. { selectedPoints: []}
|
|
879
953
|
* @param - columnGuid - a string guid of the column to drill by. This is optional,
|
|
880
954
|
* if not provided it will auto drill by the configured column.
|
|
881
|
-
* @example
|
|
882
|
-
*
|
|
883
|
-
*
|
|
955
|
+
* @example
|
|
956
|
+
* ```js
|
|
957
|
+
* searchEmbed.trigger(HostEvent.DrillDown, {
|
|
958
|
+
* points: clickedPointData,
|
|
959
|
+
* autoDrillDown: true,
|
|
884
960
|
* })
|
|
961
|
+
* ```
|
|
962
|
+
*
|
|
885
963
|
* @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
|
|
886
964
|
*/
|
|
887
965
|
DrillDown = 'triggerDrillDown',
|
|
@@ -920,7 +998,10 @@ export enum HostEvent {
|
|
|
920
998
|
* Navigate to a specific page in App embed without any reload.
|
|
921
999
|
* This is the same as calling `appEmbed.navigateToPage(path, true)`
|
|
922
1000
|
* @param - path - the path to navigate to (can be a number[1/-1] to go forward/back)
|
|
923
|
-
* @example
|
|
1001
|
+
* @example
|
|
1002
|
+
* ```js
|
|
1003
|
+
* appEmbed.navigateToPage(-1)
|
|
1004
|
+
* ```
|
|
924
1005
|
* @version SDK: 1.12.0 | ThoughtSpot 8.4.0.cl, 8.4.1-sw
|
|
925
1006
|
*/
|
|
926
1007
|
Navigate = 'Navigate',
|
|
@@ -928,27 +1009,39 @@ export enum HostEvent {
|
|
|
928
1009
|
* Opens the filter panel for a particular column.
|
|
929
1010
|
* Works with Search embed.
|
|
930
1011
|
* @param - { columnId: string, name: string, type: INT64/CHAR/DATE, dataType: ATTRIBUTE/MEASURE }
|
|
931
|
-
* @example
|
|
1012
|
+
* @example
|
|
1013
|
+
* ```js
|
|
1014
|
+
* searchEmbed.trigger(HostEvent.OpenFilter, { columnId: '123', name: 'column name', type: 'INT64', dataType: 'ATTRIBUTE' })
|
|
1015
|
+
* ```
|
|
932
1016
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
|
|
933
1017
|
*/
|
|
934
1018
|
OpenFilter = 'openFilter',
|
|
935
1019
|
/**
|
|
936
1020
|
* Adds the columns to the current Search.
|
|
937
1021
|
* @param - { columnIds: string[] }
|
|
938
|
-
* @example
|
|
1022
|
+
* @example
|
|
1023
|
+
* ```js
|
|
1024
|
+
* searchEmbed.trigger(HostEvent.AddColumns, { columnIds: ['123', '456'] })
|
|
1025
|
+
* ```
|
|
939
1026
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
|
|
940
1027
|
*/
|
|
941
1028
|
AddColumns = 'addColumns',
|
|
942
1029
|
/**
|
|
943
1030
|
* Removes a column from the current Search.
|
|
944
1031
|
* @param - { columnId: string }
|
|
945
|
-
* @example
|
|
1032
|
+
* @example
|
|
1033
|
+
* ```js
|
|
1034
|
+
* searchEmbed.trigger(HostEvent.RemoveColumn, { columnId: '123' })
|
|
1035
|
+
* ```
|
|
946
1036
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
|
|
947
1037
|
*/
|
|
948
1038
|
RemoveColumn = 'removeColumn',
|
|
949
1039
|
/**
|
|
950
1040
|
* Gets the current pinboard content.
|
|
951
|
-
* @example
|
|
1041
|
+
* @example
|
|
1042
|
+
* ```js
|
|
1043
|
+
* liveboardEmbed.trigger(HostEvent.getExportRequestForCurrentPinboard)
|
|
1044
|
+
* ```
|
|
952
1045
|
* @version SDK: 1.13.0 | ThoughtSpot: 8.5.0.cl, 8.8.1-sw
|
|
953
1046
|
*/
|
|
954
1047
|
getExportRequestForCurrentPinboard = 'getExportRequestForCurrentPinboard',
|
|
@@ -957,87 +1050,124 @@ export enum HostEvent {
|
|
|
957
1050
|
* @param - incase of Liveboard embed, takes in an object with vizId as a key
|
|
958
1051
|
* can be left empty for search and visualization embeds
|
|
959
1052
|
* @example
|
|
1053
|
+
* ```js
|
|
960
1054
|
* liveboardEmbed.trigger(HostEvent.Pin, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
961
1055
|
* vizEmbed.trigger(HostEvent.Pin)
|
|
962
1056
|
* searchEmbed.trigger(HostEvent.Pin)
|
|
1057
|
+
* ```
|
|
963
1058
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
964
1059
|
*/
|
|
965
1060
|
Pin = 'pin',
|
|
966
1061
|
/**
|
|
967
1062
|
* Triggers the Show Liveboard details action on a Liveboard
|
|
968
|
-
* @example
|
|
1063
|
+
* @example
|
|
1064
|
+
* ```js
|
|
1065
|
+
* liveboardEmbed.trigger(HostEvent.LiveboardInfo)
|
|
1066
|
+
* ```
|
|
969
1067
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
970
1068
|
*/
|
|
971
1069
|
LiveboardInfo = 'pinboardInfo',
|
|
972
1070
|
/**
|
|
973
1071
|
* Triggers the Schedule action on a Liveboard
|
|
974
|
-
* @example
|
|
1072
|
+
* @example
|
|
1073
|
+
* ```js
|
|
1074
|
+
* liveboardEmbed.trigger(HostEvent.Schedule)
|
|
1075
|
+
* ```
|
|
975
1076
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
976
1077
|
*/
|
|
977
1078
|
Schedule = 'subscription',
|
|
978
1079
|
/**
|
|
979
1080
|
* Triggers the Manage schedule action on a Liveboard
|
|
980
|
-
* @example
|
|
1081
|
+
* @example
|
|
1082
|
+
* ```js
|
|
1083
|
+
* liveboardEmbed.trigger(HostEvent.ScheduleList)
|
|
1084
|
+
* ```
|
|
981
1085
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
982
1086
|
*/
|
|
983
1087
|
SchedulesList = 'schedule-list',
|
|
984
1088
|
/**
|
|
985
1089
|
* Triggers the Export TML action on a Liveboard
|
|
986
|
-
* @example
|
|
1090
|
+
* @example
|
|
1091
|
+
* ```js
|
|
1092
|
+
* liveboardEmbed.trigger(HostEvent.ExportTML)
|
|
1093
|
+
* ```
|
|
987
1094
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
988
1095
|
*/
|
|
989
1096
|
ExportTML = 'exportTSL',
|
|
990
1097
|
/**
|
|
991
1098
|
* Triggers the Edit TML action on a Liveboard
|
|
992
|
-
* @example
|
|
1099
|
+
* @example
|
|
1100
|
+
* ```js
|
|
1101
|
+
* liveboardEmbed.trigger(HostEvent.EditTML)
|
|
1102
|
+
* ```
|
|
993
1103
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
994
1104
|
*/
|
|
995
1105
|
EditTML = 'editTSL',
|
|
996
1106
|
/**
|
|
997
1107
|
* Triggers the Update TML action on a Liveboard
|
|
998
|
-
* @example
|
|
1108
|
+
* @example
|
|
1109
|
+
* ```js
|
|
1110
|
+
* liveboardEmbed.trigger(HostEvent.UpdateTML)
|
|
1111
|
+
* ```
|
|
999
1112
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
1000
1113
|
*/
|
|
1001
1114
|
UpdateTML = 'updateTSL',
|
|
1002
1115
|
/**
|
|
1003
1116
|
* Triggers the Download PDF action on a Liveboard
|
|
1004
|
-
* @example
|
|
1117
|
+
* @example
|
|
1118
|
+
* ```js
|
|
1119
|
+
* liveboardEmbed.trigger(HostEvent.DownloadAsPDF)
|
|
1120
|
+
* ```
|
|
1005
1121
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
1006
1122
|
*/
|
|
1007
1123
|
DownloadAsPdf = 'downloadAsPdf',
|
|
1008
1124
|
/**
|
|
1009
1125
|
* Triggers the Make a copy action on a Liveboard, search or visualization
|
|
1010
1126
|
* @example
|
|
1127
|
+
* ```js
|
|
1011
1128
|
* liveboardEmbed.trigger(HostEvent.MakeACopy, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1012
1129
|
* vizEmbed.trigger(HostEvent.MakeACopy)
|
|
1013
1130
|
* searchEmbed.trigger(HostEvent.MakeACopy)
|
|
1131
|
+
* ```
|
|
1014
1132
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
1015
1133
|
*/
|
|
1016
1134
|
MakeACopy = 'makeACopy',
|
|
1017
1135
|
/**
|
|
1018
1136
|
* Triggers the Delete action on a Liveboard
|
|
1019
|
-
* @example
|
|
1137
|
+
* @example
|
|
1138
|
+
* ```js
|
|
1139
|
+
* appEmbed.trigger(HostEvent.Remove)
|
|
1140
|
+
* ```
|
|
1020
1141
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
1021
1142
|
*/
|
|
1022
1143
|
Remove = 'delete',
|
|
1023
1144
|
/**
|
|
1024
1145
|
* Triggers the Explore action on a visualization
|
|
1025
1146
|
* @param - an object with vizId as a key
|
|
1026
|
-
* @example
|
|
1147
|
+
* @example
|
|
1148
|
+
* ```js
|
|
1149
|
+
* liveboardEmbed.trigger(HostEvent.Explore, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1150
|
+
* ```
|
|
1027
1151
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
1028
1152
|
*/
|
|
1029
1153
|
Explore = 'explore',
|
|
1030
1154
|
/**
|
|
1031
1155
|
* Triggers the Create alert action on a visualization
|
|
1032
1156
|
* @param - an object with vizId as a key
|
|
1033
|
-
* @example
|
|
1157
|
+
* @example
|
|
1158
|
+
* ```js
|
|
1159
|
+
* liveboardEmbed.trigger(HostEvent.CreateMonitor {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1160
|
+
* ```
|
|
1034
1161
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
1035
1162
|
*/
|
|
1036
1163
|
CreateMonitor = 'createMonitor',
|
|
1037
1164
|
/**
|
|
1038
1165
|
* Triggers the Manage alert action on a visualization
|
|
1039
1166
|
* @param - an object with vizId as a key
|
|
1040
|
-
* @example
|
|
1167
|
+
* @example
|
|
1168
|
+
* ```js
|
|
1169
|
+
* liveboardEmbed.trigger(HostEvent.ManageMonitor, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1170
|
+
* ```
|
|
1041
1171
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
1042
1172
|
*/
|
|
1043
1173
|
ManageMonitor = 'manageMonitor',
|
|
@@ -1055,9 +1185,11 @@ export enum HostEvent {
|
|
|
1055
1185
|
* Triggers the Copy link action on a Liveboard or visualization
|
|
1056
1186
|
* @param - object - to trigger the action for a specfic visualization in Liveboard embed, pass in vizId as a key
|
|
1057
1187
|
* @example
|
|
1188
|
+
* ```js
|
|
1058
1189
|
* liveboardEmbed.trigger(HostEvent.CopyLink)
|
|
1059
1190
|
* liveboardEmbed.trigger(HostEvent.CopyLink, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1060
1191
|
* vizEmbed.trigger((HostEvent.CopyLink)
|
|
1192
|
+
* ```
|
|
1061
1193
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
1062
1194
|
*/
|
|
1063
1195
|
CopyLink = 'embedDocument',
|
|
@@ -1065,15 +1197,20 @@ export enum HostEvent {
|
|
|
1065
1197
|
* Triggers the Present action on a Liveboard or visualization
|
|
1066
1198
|
* @param - object - to trigger the action for a specfic visualization in Liveboard embed, pass in vizId as a key
|
|
1067
1199
|
* @example
|
|
1200
|
+
* ```js
|
|
1068
1201
|
* liveboardEmbed.trigger(HostEvent.Present)
|
|
1069
1202
|
* liveboardEmbed.trigger(HostEvent.Present, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1070
1203
|
* vizEmbed.trigger((HostEvent.Present)
|
|
1204
|
+
* ```
|
|
1071
1205
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
1072
1206
|
*/
|
|
1073
1207
|
Present = 'present',
|
|
1074
1208
|
/**
|
|
1075
1209
|
* Get TML for the current search.
|
|
1076
|
-
* @example
|
|
1210
|
+
* @example
|
|
1211
|
+
* ```js
|
|
1212
|
+
* searchEmbed.trigger(HostEvent.GetTML)
|
|
1213
|
+
* ```
|
|
1077
1214
|
* @version SDK: 1.18.0 | ThoughtSpot: 8.10.0.cl, 9.0.1-sw
|
|
1078
1215
|
*/
|
|
1079
1216
|
GetTML = 'getTML',
|