@thoughtspot/visual-embed-sdk 1.27.0-alpha.0 → 1.27.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/cjs/.DS_Store +0 -0
- package/cjs/package.json +1 -1
- package/cjs/src/.DS_Store +0 -0
- package/cjs/src/embed/app.d.ts +0 -1
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +1 -1
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts +0 -1
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +1 -1
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/sage.d.ts +0 -1
- package/cjs/src/embed/sage.d.ts.map +1 -1
- package/cjs/src/embed/sage.js +7 -6
- package/cjs/src/embed/sage.js.map +1 -1
- package/cjs/src/embed/sage.spec.js +3 -3
- package/cjs/src/embed/sage.spec.js.map +1 -1
- package/cjs/src/embed/search.d.ts +0 -1
- package/cjs/src/embed/search.d.ts.map +1 -1
- package/cjs/src/embed/search.js +2 -3
- package/cjs/src/embed/search.js.map +1 -1
- package/cjs/src/embed/ts-embed.d.ts +0 -1
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +1 -3
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/types.d.ts +19 -49
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +12 -49
- package/cjs/src/types.js.map +1 -1
- package/cjs/src/utils/answerService.d.ts +10 -0
- package/cjs/src/utils/answerService.d.ts.map +1 -0
- package/cjs/src/utils/answerService.js +61 -0
- package/cjs/src/utils/answerService.js.map +1 -0
- package/cjs/src/utils/answerService.spec.d.ts +2 -0
- package/cjs/src/utils/answerService.spec.d.ts.map +1 -0
- package/cjs/src/utils/answerService.spec.js +31 -0
- package/cjs/src/utils/answerService.spec.js.map +1 -0
- package/cjs/src/utils/authService.d.ts +37 -0
- package/cjs/src/utils/authService.d.ts.map +1 -0
- package/cjs/src/utils/authService.js +106 -0
- package/cjs/src/utils/authService.js.map +1 -0
- package/cjs/src/utils/authService.spec.d.ts +2 -0
- package/cjs/src/utils/authService.spec.d.ts.map +1 -0
- package/cjs/src/utils/authService.spec.js +72 -0
- package/cjs/src/utils/authService.spec.js.map +1 -0
- package/dist/src/embed/app.d.ts +0 -1
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts +0 -1
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/embed/sage.d.ts +0 -1
- package/dist/src/embed/sage.d.ts.map +1 -1
- package/dist/src/embed/search.d.ts +0 -1
- package/dist/src/embed/search.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.d.ts +0 -1
- package/dist/src/embed/ts-embed.d.ts.map +1 -1
- package/dist/src/types.d.ts +19 -49
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/answerService.d.ts +10 -0
- package/dist/src/utils/answerService.d.ts.map +1 -0
- package/dist/src/utils/answerService.spec.d.ts +2 -0
- package/dist/src/utils/answerService.spec.d.ts.map +1 -0
- package/dist/src/utils/authService.d.ts +37 -0
- package/dist/src/utils/authService.d.ts.map +1 -0
- package/dist/src/utils/authService.spec.d.ts +2 -0
- package/dist/src/utils/authService.spec.d.ts.map +1 -0
- package/dist/tsembed-react.es.js +25 -64
- package/dist/tsembed-react.js +25 -64
- package/dist/tsembed.es.js +25 -64
- package/dist/tsembed.js +25 -64
- package/dist/visual-embed-sdk-react-full.d.ts +19 -54
- package/dist/visual-embed-sdk-react.d.ts +19 -54
- package/dist/visual-embed-sdk.d.ts +19 -54
- package/lib/.DS_Store +0 -0
- package/lib/package.json +1 -1
- package/lib/src/.DS_Store +0 -0
- package/lib/src/embed/app.d.ts +0 -1
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +1 -1
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts +0 -1
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +1 -1
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/sage.d.ts +0 -1
- package/lib/src/embed/sage.d.ts.map +1 -1
- package/lib/src/embed/sage.js +7 -6
- package/lib/src/embed/sage.js.map +1 -1
- package/lib/src/embed/sage.spec.js +3 -3
- package/lib/src/embed/sage.spec.js.map +1 -1
- package/lib/src/embed/search.d.ts +0 -1
- package/lib/src/embed/search.d.ts.map +1 -1
- package/lib/src/embed/search.js +2 -3
- package/lib/src/embed/search.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts +0 -1
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +1 -3
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/types.d.ts +19 -49
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +12 -49
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils/answerService.d.ts +10 -0
- package/lib/src/utils/answerService.d.ts.map +1 -0
- package/lib/src/utils/answerService.js +57 -0
- package/lib/src/utils/answerService.js.map +1 -0
- package/lib/src/utils/answerService.spec.d.ts +2 -0
- package/lib/src/utils/answerService.spec.d.ts.map +1 -0
- package/lib/src/utils/answerService.spec.js +29 -0
- package/lib/src/utils/answerService.spec.js.map +1 -0
- package/lib/src/utils/authService.d.ts +37 -0
- package/lib/src/utils/authService.d.ts.map +1 -0
- package/lib/src/utils/authService.js +97 -0
- package/lib/src/utils/authService.js.map +1 -0
- package/lib/src/utils/authService.spec.d.ts +2 -0
- package/lib/src/utils/authService.spec.d.ts.map +1 -0
- package/lib/src/utils/authService.spec.js +70 -0
- package/lib/src/utils/authService.spec.js.map +1 -0
- package/lib/src/visual-embed-sdk.d.ts +19 -54
- package/package.json +1 -1
- package/src/.DS_Store +0 -0
- package/src/embed/app.ts +1 -2
- package/src/embed/liveboard.ts +1 -2
- package/src/embed/sage.spec.ts +3 -3
- package/src/embed/sage.ts +7 -8
- package/src/embed/search.ts +2 -4
- package/src/embed/ts-embed.ts +1 -4
- package/src/types.ts +29 -59
package/src/embed/sage.spec.ts
CHANGED
|
@@ -158,14 +158,14 @@ describe('Sage embed tests', () => {
|
|
|
158
158
|
...defaultConfig,
|
|
159
159
|
dataSource: 'worksheet-id',
|
|
160
160
|
searchOptions: {
|
|
161
|
-
searchQuery: 'test
|
|
161
|
+
searchQuery: 'test query', // also tests for query with spaces
|
|
162
162
|
},
|
|
163
163
|
});
|
|
164
164
|
sageEmbed.render();
|
|
165
165
|
await executeAfterWait(() => {
|
|
166
166
|
expectUrlMatch(
|
|
167
167
|
getIFrameSrc(),
|
|
168
|
-
`http://${thoughtSpotHost}/?embedApp=true&isSageEmbed=true&disableWorksheetChange=false&hideWorksheetSelector=false&hideEurekaSuggestions=false&isProductTour=false&hideSearchBarTitle=false&hideSageAnswerHeader=false&hideAction=%5B"reportError","save","pin","editACopy","saveAsView","updateTSL","editTSL","onDeleteAnswer","share"%5D#/embed/eureka?worksheet=worksheet-id&query=test
|
|
168
|
+
`http://${thoughtSpotHost}/?embedApp=true&isSageEmbed=true&disableWorksheetChange=false&hideWorksheetSelector=false&hideEurekaSuggestions=false&isProductTour=false&hideSearchBarTitle=false&hideSageAnswerHeader=false&hideAction=%5B"reportError","save","pin","editACopy","saveAsView","updateTSL","editTSL","onDeleteAnswer","share"%5D#/embed/eureka?worksheet=worksheet-id&query=test%20query`,
|
|
169
169
|
);
|
|
170
170
|
});
|
|
171
171
|
});
|
|
@@ -182,7 +182,7 @@ describe('Sage embed tests', () => {
|
|
|
182
182
|
await executeAfterWait(() => {
|
|
183
183
|
expectUrlMatch(
|
|
184
184
|
getIFrameSrc(),
|
|
185
|
-
`http://${thoughtSpotHost}/?embedApp=true&isSageEmbed=true&disableWorksheetChange=false&hideWorksheetSelector=false&hideEurekaSuggestions=false&hideAction=%5B"reportError","save","pin","editACopy","saveAsView","updateTSL","editTSL","onDeleteAnswer","share"%5D#/embed/eureka?query=test-query
|
|
185
|
+
`http://${thoughtSpotHost}/?embedApp=true&isSageEmbed=true&disableWorksheetChange=false&hideWorksheetSelector=false&hideEurekaSuggestions=false&hideAction=%5B"reportError","save","pin","editACopy","saveAsView","updateTSL","editTSL","onDeleteAnswer","share"%5D#/embed/eureka?executeSearch=true&query=test-query`,
|
|
186
186
|
);
|
|
187
187
|
});
|
|
188
188
|
});
|
package/src/embed/sage.ts
CHANGED
|
@@ -159,10 +159,9 @@ export class SageEmbed extends V1Embed {
|
|
|
159
159
|
*/
|
|
160
160
|
protected viewConfig: SageViewConfig;
|
|
161
161
|
|
|
162
|
-
protected embedComponentType = 'SageEmbed';
|
|
163
|
-
|
|
164
162
|
// eslint-disable-next-line no-useless-constructor
|
|
165
163
|
constructor(domSelector: DOMSelector, viewConfig: SageViewConfig) {
|
|
164
|
+
viewConfig.embedComponentType = 'SageEmbed';
|
|
166
165
|
super(domSelector, viewConfig);
|
|
167
166
|
}
|
|
168
167
|
|
|
@@ -221,15 +220,15 @@ export class SageEmbed extends V1Embed {
|
|
|
221
220
|
} = this.viewConfig;
|
|
222
221
|
|
|
223
222
|
if (dataSource) postHashObj[Param.WorksheetId] = dataSource;
|
|
224
|
-
if (searchOptions?.searchQuery) {
|
|
225
|
-
postHashObj[Param.
|
|
226
|
-
if (searchOptions.executeSearch) {
|
|
227
|
-
postHashObj[Param.executeSearch] = true;
|
|
228
|
-
}
|
|
223
|
+
if (searchOptions?.searchQuery && searchOptions.executeSearch) {
|
|
224
|
+
postHashObj[Param.executeSearch] = true;
|
|
229
225
|
}
|
|
226
|
+
|
|
230
227
|
let sagePostHashParams = new URLSearchParams(postHashObj).toString();
|
|
231
228
|
if (sagePostHashParams) sagePostHashParams = `${tsPostHashParams ? '&' : '?'}${sagePostHashParams}`;
|
|
232
|
-
|
|
229
|
+
if (searchOptions?.searchQuery) sagePostHashParams += `${sagePostHashParams ? '&' : '?'}${[Param.Query]}=${encodeURIComponent(searchOptions.searchQuery)}`;
|
|
230
|
+
// use encodeURIComponent for query instead of URLSearchParams
|
|
231
|
+
// as it adds + instead of %20 for spaces
|
|
233
232
|
return `${this.getRootIframeSrc()}/embed/${path}${tsPostHashParams}${sagePostHashParams}`;
|
|
234
233
|
}
|
|
235
234
|
|
package/src/embed/search.ts
CHANGED
|
@@ -166,11 +166,9 @@ export class SearchEmbed extends TsEmbed {
|
|
|
166
166
|
*/
|
|
167
167
|
protected viewConfig: SearchViewConfig;
|
|
168
168
|
|
|
169
|
-
protected embedComponentType = 'SearchEmbed';
|
|
170
|
-
|
|
171
169
|
constructor(domSelector: DOMSelector, viewConfig: SearchViewConfig) {
|
|
172
|
-
|
|
173
|
-
|
|
170
|
+
viewConfig.embedComponentType = 'SearchEmbed';
|
|
171
|
+
super(domSelector, viewConfig);
|
|
174
172
|
}
|
|
175
173
|
|
|
176
174
|
/**
|
package/src/embed/ts-embed.ts
CHANGED
|
@@ -123,8 +123,6 @@ export class TsEmbed {
|
|
|
123
123
|
*/
|
|
124
124
|
protected thoughtSpotV2Base: string;
|
|
125
125
|
|
|
126
|
-
protected embedComponentType = 'TsEmbed';
|
|
127
|
-
|
|
128
126
|
/**
|
|
129
127
|
* A map of event handlers for particular message types triggered
|
|
130
128
|
* by the embedded app; multiple event handlers can be registered
|
|
@@ -176,7 +174,6 @@ export class TsEmbed {
|
|
|
176
174
|
this.registerAppInit();
|
|
177
175
|
uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_EMBED_CREATE, {
|
|
178
176
|
...viewConfig,
|
|
179
|
-
embedComponentType: this.embedComponentType,
|
|
180
177
|
});
|
|
181
178
|
}
|
|
182
179
|
|
|
@@ -1088,7 +1085,7 @@ export class TsEmbed {
|
|
|
1088
1085
|
&& !isEqual(viewConfig[key], preRenderedObject.viewConfig[key])
|
|
1089
1086
|
) {
|
|
1090
1087
|
console.warn(
|
|
1091
|
-
|
|
1088
|
+
'TS Embed component was pre-rendered with '
|
|
1092
1089
|
+ `"${key}" as "${JSON.stringify(preRenderedObject.viewConfig[key])}" `
|
|
1093
1090
|
+ `but a different value "${JSON.stringify(viewConfig[key])}" `
|
|
1094
1091
|
+ 'was passed to the Embed component. '
|
package/src/types.ts
CHANGED
|
@@ -549,7 +549,7 @@ export interface EmbedConfig {
|
|
|
549
549
|
}
|
|
550
550
|
|
|
551
551
|
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
552
|
-
export interface LayoutConfig {}
|
|
552
|
+
export interface LayoutConfig { }
|
|
553
553
|
|
|
554
554
|
/**
|
|
555
555
|
* Embedded iframe configuration
|
|
@@ -784,6 +784,7 @@ export interface ViewConfig {
|
|
|
784
784
|
* ```js
|
|
785
785
|
* hiddenHomeLeftNavItems = [HomeLeftNavItem.Home]
|
|
786
786
|
* ```
|
|
787
|
+
*
|
|
787
788
|
* @version SDK: 1.27.0 | Thoughtspot: 9.10.0.cl
|
|
788
789
|
*/
|
|
789
790
|
hiddenHomeLeftNavItems?: HomeLeftNavItem[];
|
|
@@ -822,6 +823,12 @@ export interface ViewConfig {
|
|
|
822
823
|
* const myComponent = new MyComponent(config);
|
|
823
824
|
*/
|
|
824
825
|
doNotTrackPreRenderSize?: boolean;
|
|
826
|
+
/**
|
|
827
|
+
* For internal tracking of the embed component type.
|
|
828
|
+
*
|
|
829
|
+
* @hidden
|
|
830
|
+
*/
|
|
831
|
+
embedComponentType?: string;
|
|
825
832
|
}
|
|
826
833
|
|
|
827
834
|
/**
|
|
@@ -1036,6 +1043,7 @@ export interface RuntimeParameter {
|
|
|
1036
1043
|
export enum EmbedEvent {
|
|
1037
1044
|
/**
|
|
1038
1045
|
* Rendering has initialized.
|
|
1046
|
+
*
|
|
1039
1047
|
* @example
|
|
1040
1048
|
*```js
|
|
1041
1049
|
* liveboardEmbed.on(EmbedEvent.Init, showLoader)
|
|
@@ -1044,7 +1052,6 @@ export enum EmbedEvent {
|
|
|
1044
1052
|
* document.getElementById("loader");
|
|
1045
1053
|
* }
|
|
1046
1054
|
*```
|
|
1047
|
-
*
|
|
1048
1055
|
* @returns timestamp - The timestamp when the event was generated.
|
|
1049
1056
|
*/
|
|
1050
1057
|
Init = 'init',
|
|
@@ -1057,12 +1064,12 @@ export enum EmbedEvent {
|
|
|
1057
1064
|
* console.log('AuthInit', payload);
|
|
1058
1065
|
* })
|
|
1059
1066
|
*```
|
|
1060
|
-
*
|
|
1061
1067
|
* @returns isLoggedIn - A Boolean specifying whether authentication was successful.
|
|
1062
1068
|
*/
|
|
1063
1069
|
AuthInit = 'authInit',
|
|
1064
1070
|
/**
|
|
1065
1071
|
* The embed object container has loaded.
|
|
1072
|
+
*
|
|
1066
1073
|
* @returns timestamp - The timestamp when the event was generated.
|
|
1067
1074
|
* @example
|
|
1068
1075
|
*```js
|
|
@@ -1076,6 +1083,7 @@ export enum EmbedEvent {
|
|
|
1076
1083
|
Load = 'load',
|
|
1077
1084
|
/**
|
|
1078
1085
|
* Data pertaining to answer or Liveboard is received
|
|
1086
|
+
*
|
|
1079
1087
|
* @return data - The answer or Liveboard data
|
|
1080
1088
|
* @example
|
|
1081
1089
|
*```js
|
|
@@ -1099,7 +1107,6 @@ export enum EmbedEvent {
|
|
|
1099
1107
|
*```js
|
|
1100
1108
|
* searchEmbed.on(EmbedEvent.QueryChanged, payload => console.log('data', payload))
|
|
1101
1109
|
*```
|
|
1102
|
-
*
|
|
1103
1110
|
*/
|
|
1104
1111
|
QueryChanged = 'queryChanged',
|
|
1105
1112
|
/**
|
|
@@ -1108,7 +1115,6 @@ export enum EmbedEvent {
|
|
|
1108
1115
|
* @returns additionalFilters - Any additional filters applied
|
|
1109
1116
|
* @returns drillDownColumns - The columns on which drill down was performed
|
|
1110
1117
|
* @returns nonFilteredColumns - The columns that were not filtered
|
|
1111
|
-
*
|
|
1112
1118
|
* @example
|
|
1113
1119
|
*```js
|
|
1114
1120
|
* searchEmbed.trigger(HostEvent.DrillDown, {
|
|
@@ -1122,7 +1128,6 @@ export enum EmbedEvent {
|
|
|
1122
1128
|
* In this example, `VizPointDoubleClick` event is used for
|
|
1123
1129
|
* triggering the `DrillDown` event when an area or specific
|
|
1124
1130
|
* data point on a table or chart is double-clicked.
|
|
1125
|
-
*
|
|
1126
1131
|
* @example
|
|
1127
1132
|
*```js
|
|
1128
1133
|
* searchEmbed.on(EmbedEvent.VizPointDoubleClick, (payload) => {
|
|
@@ -1139,34 +1144,31 @@ export enum EmbedEvent {
|
|
|
1139
1144
|
* })
|
|
1140
1145
|
* })
|
|
1141
1146
|
*```
|
|
1142
|
-
*
|
|
1143
1147
|
*/
|
|
1144
1148
|
Drilldown = 'drillDown',
|
|
1145
1149
|
/**
|
|
1146
1150
|
* One or more data sources have been selected.
|
|
1147
|
-
* @returns dataSourceIds - the list of data sources
|
|
1148
1151
|
*
|
|
1152
|
+
* @returns dataSourceIds - the list of data sources
|
|
1149
1153
|
* @example
|
|
1150
1154
|
* ```js
|
|
1151
1155
|
* searchEmbed.on(EmbedEvent.DataSourceSelected, payload => {
|
|
1152
1156
|
* console.log('DataSourceSelected', payload);
|
|
1153
1157
|
* })
|
|
1154
1158
|
* ```
|
|
1155
|
-
*
|
|
1156
1159
|
*/
|
|
1157
1160
|
DataSourceSelected = 'dataSourceSelected',
|
|
1158
1161
|
/**
|
|
1159
1162
|
* One or more data columns have been selected.
|
|
1163
|
+
*
|
|
1160
1164
|
* @returns columnIds - the list of columns
|
|
1161
1165
|
* @version SDK: 1.10.0 | ThoughtSpot: 8.2.0.cl, 8.4.1.sw
|
|
1162
|
-
*
|
|
1163
1166
|
* @example
|
|
1164
1167
|
* ```js
|
|
1165
1168
|
* appEmbed.on(EmbedEvent.AddRemoveColumns, payload => {
|
|
1166
1169
|
* console.log('AddRemoveColumns', payload);
|
|
1167
1170
|
* })
|
|
1168
1171
|
* ```
|
|
1169
|
-
*
|
|
1170
1172
|
*/
|
|
1171
1173
|
AddRemoveColumns = 'addRemoveColumns',
|
|
1172
1174
|
/**
|
|
@@ -1174,7 +1176,6 @@ export enum EmbedEvent {
|
|
|
1174
1176
|
*
|
|
1175
1177
|
* @returns actionId - ID of the custom action
|
|
1176
1178
|
* @returns data - Response payload with the Answer or Liveboard data
|
|
1177
|
-
*
|
|
1178
1179
|
* @example
|
|
1179
1180
|
* ```js
|
|
1180
1181
|
* appEmbed.on(EmbedEvent.customAction, payload => {
|
|
@@ -1190,9 +1191,7 @@ export enum EmbedEvent {
|
|
|
1190
1191
|
* Listen to double click actions on a visualization.
|
|
1191
1192
|
*
|
|
1192
1193
|
* @return ContextMenuInputPoints - Data point that is double-clicked
|
|
1193
|
-
*
|
|
1194
1194
|
* @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
|
|
1195
|
-
*
|
|
1196
1195
|
* @example
|
|
1197
1196
|
* ```js
|
|
1198
1197
|
* livebaordEmbed.on(EmbedEvent.VizPointDoubleClick, payload => {
|
|
@@ -1207,7 +1206,6 @@ export enum EmbedEvent {
|
|
|
1207
1206
|
* @return viz, clickedPoint - metadata about the point that is clicked
|
|
1208
1207
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1209
1208
|
* @important
|
|
1210
|
-
*
|
|
1211
1209
|
* @example
|
|
1212
1210
|
* ```js
|
|
1213
1211
|
* embed.on(ThoughtSpotEmbed.Event.VizPointClick, ({data}) => {
|
|
@@ -1226,7 +1224,6 @@ export enum EmbedEvent {
|
|
|
1226
1224
|
* An error has occurred.
|
|
1227
1225
|
*
|
|
1228
1226
|
* @returns error - An error object or message
|
|
1229
|
-
*
|
|
1230
1227
|
* @example
|
|
1231
1228
|
* ```js
|
|
1232
1229
|
* SearchEmbed.on(EmbedEvent.Error, showErrorMsg)
|
|
@@ -1234,19 +1231,16 @@ export enum EmbedEvent {
|
|
|
1234
1231
|
* function showErrorMsg() {
|
|
1235
1232
|
* document.getElementById("error");
|
|
1236
1233
|
* ```
|
|
1237
|
-
*
|
|
1238
1234
|
*/
|
|
1239
1235
|
Error = 'Error',
|
|
1240
1236
|
/**
|
|
1241
1237
|
* The embedded object has sent an alert.
|
|
1242
1238
|
*
|
|
1243
1239
|
* @returns alert - An alert object
|
|
1244
|
-
*
|
|
1245
1240
|
* @example
|
|
1246
1241
|
* ```js
|
|
1247
1242
|
* searchEmbed.on(EmbedEvent.Alert)
|
|
1248
1243
|
* ```
|
|
1249
|
-
*
|
|
1250
1244
|
*/
|
|
1251
1245
|
Alert = 'alert',
|
|
1252
1246
|
/**
|
|
@@ -1293,7 +1287,6 @@ export enum EmbedEvent {
|
|
|
1293
1287
|
* Applicable to `SearchBarEmbed` only.
|
|
1294
1288
|
*
|
|
1295
1289
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
1296
|
-
*
|
|
1297
1290
|
* @example
|
|
1298
1291
|
*```js
|
|
1299
1292
|
* searchbarEmbed.on(EmbedEvent.GetDataClick)
|
|
@@ -1340,8 +1333,8 @@ export enum EmbedEvent {
|
|
|
1340
1333
|
SAMLComplete = 'samlComplete',
|
|
1341
1334
|
/**
|
|
1342
1335
|
* Emitted when any modal is opened in the app
|
|
1343
|
-
* @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
|
|
1344
1336
|
*
|
|
1337
|
+
* @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
|
|
1345
1338
|
* @example
|
|
1346
1339
|
*```js
|
|
1347
1340
|
* appEmbed.on(EmbedEvent.DialogOpen, payload => {
|
|
@@ -1352,8 +1345,8 @@ export enum EmbedEvent {
|
|
|
1352
1345
|
DialogOpen = 'dialog-open',
|
|
1353
1346
|
/**
|
|
1354
1347
|
* Emitted when any modal is closed in the app
|
|
1355
|
-
* @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
|
|
1356
1348
|
*
|
|
1349
|
+
* @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
|
|
1357
1350
|
* @example
|
|
1358
1351
|
*```js
|
|
1359
1352
|
* appEmbed.on(EmbedEvent.DialogClose, payload => {
|
|
@@ -1366,8 +1359,8 @@ export enum EmbedEvent {
|
|
|
1366
1359
|
* Emitted when the Liveboard shell loads.
|
|
1367
1360
|
* You can use this event as a hook to trigger
|
|
1368
1361
|
* other events on the rendered Liveboard.
|
|
1369
|
-
* @version SDK: 1.9.1 | ThoughtSpot: 8.1.0.cl, 8.4.1.sw
|
|
1370
1362
|
*
|
|
1363
|
+
* @version SDK: 1.9.1 | ThoughtSpot: 8.1.0.cl, 8.4.1.sw
|
|
1371
1364
|
* @example
|
|
1372
1365
|
*```js
|
|
1373
1366
|
* liveboardEmbed.on(EmbedEvent.LiveboardRendered, payload => {
|
|
@@ -1376,7 +1369,6 @@ export enum EmbedEvent {
|
|
|
1376
1369
|
*```
|
|
1377
1370
|
* The following example shows how to trigger
|
|
1378
1371
|
* `SetVisibleVizs` event using LiveboardRendered embed event:
|
|
1379
|
-
*
|
|
1380
1372
|
* @example
|
|
1381
1373
|
*```js
|
|
1382
1374
|
* const embedRef = useEmbedRef();
|
|
@@ -1389,8 +1381,8 @@ export enum EmbedEvent {
|
|
|
1389
1381
|
/**
|
|
1390
1382
|
* This can be used to register an event listener which
|
|
1391
1383
|
* is triggered on all events.
|
|
1392
|
-
* @Version SDK: 1.10.0 | ThoughtSpot: 8.2.0.cl, 8.4.1.sw
|
|
1393
1384
|
*
|
|
1385
|
+
* @Version SDK: 1.10.0 | ThoughtSpot: 8.2.0.cl, 8.4.1.sw
|
|
1394
1386
|
* @example
|
|
1395
1387
|
*```js
|
|
1396
1388
|
* appEmbed.on(EmbedEvent.ALL, payload => {
|
|
@@ -1401,6 +1393,7 @@ export enum EmbedEvent {
|
|
|
1401
1393
|
ALL = '*',
|
|
1402
1394
|
/**
|
|
1403
1395
|
* Emitted when an Answer is saved in the app
|
|
1396
|
+
*
|
|
1404
1397
|
* @Version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1405
1398
|
* @example
|
|
1406
1399
|
*```js
|
|
@@ -1426,7 +1419,6 @@ export enum EmbedEvent {
|
|
|
1426
1419
|
* or `EmbedEvent.DownloadAsXLSX`
|
|
1427
1420
|
*
|
|
1428
1421
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1429
|
-
*
|
|
1430
1422
|
* @example
|
|
1431
1423
|
*```js
|
|
1432
1424
|
* liveboardEmbed.trigger(HostEvent.Download, {
|
|
@@ -1437,8 +1429,8 @@ export enum EmbedEvent {
|
|
|
1437
1429
|
Download = 'download',
|
|
1438
1430
|
/**
|
|
1439
1431
|
* Emitted when the download action is triggered on an answer
|
|
1440
|
-
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.0.sw
|
|
1441
1432
|
*
|
|
1433
|
+
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.0.sw
|
|
1442
1434
|
* @example
|
|
1443
1435
|
*```js
|
|
1444
1436
|
* //trigger when action starts
|
|
@@ -1448,14 +1440,12 @@ export enum EmbedEvent {
|
|
|
1448
1440
|
* searchEmbed.on(EmbedEvent.DownloadAsPng, payload => {
|
|
1449
1441
|
* console.log('download PNG', payload)})
|
|
1450
1442
|
*```
|
|
1451
|
-
*
|
|
1452
1443
|
*/
|
|
1453
1444
|
DownloadAsPng = 'downloadAsPng',
|
|
1454
1445
|
/**
|
|
1455
1446
|
* Emitted when the Download as PDF action is triggered on an answer
|
|
1456
1447
|
*
|
|
1457
1448
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1458
|
-
*
|
|
1459
1449
|
* @example
|
|
1460
1450
|
*```js
|
|
1461
1451
|
* //trigger when action starts
|
|
@@ -1465,7 +1455,6 @@ export enum EmbedEvent {
|
|
|
1465
1455
|
* searchEmbed.on(EmbedEvent.DownloadAsPdf, payload => {
|
|
1466
1456
|
* console.log('download PDF', payload)})
|
|
1467
1457
|
*```
|
|
1468
|
-
*
|
|
1469
1458
|
*/
|
|
1470
1459
|
DownloadAsPdf = 'downloadAsPdf',
|
|
1471
1460
|
/**
|
|
@@ -1487,7 +1476,6 @@ export enum EmbedEvent {
|
|
|
1487
1476
|
* Emitted when the Download as XLSX action is triggered on an answer
|
|
1488
1477
|
*
|
|
1489
1478
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1490
|
-
*
|
|
1491
1479
|
* @example
|
|
1492
1480
|
*```js
|
|
1493
1481
|
* //trigger when action starts
|
|
@@ -1503,7 +1491,6 @@ export enum EmbedEvent {
|
|
|
1503
1491
|
* Emitted when an Answer is deleted in the app
|
|
1504
1492
|
*
|
|
1505
1493
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1506
|
-
*
|
|
1507
1494
|
* @example
|
|
1508
1495
|
*```js
|
|
1509
1496
|
* //trigger when action starts
|
|
@@ -1557,7 +1544,6 @@ export enum EmbedEvent {
|
|
|
1557
1544
|
* Emitted when a user shares an object with another user or group
|
|
1558
1545
|
*
|
|
1559
1546
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1560
|
-
*
|
|
1561
1547
|
* @example
|
|
1562
1548
|
*```js
|
|
1563
1549
|
* //trigger when action starts
|
|
@@ -1637,6 +1623,7 @@ export enum EmbedEvent {
|
|
|
1637
1623
|
/**
|
|
1638
1624
|
* Emitted when the **Export TML** action is triggered on an
|
|
1639
1625
|
* an embedded object in the app
|
|
1626
|
+
*
|
|
1640
1627
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1641
1628
|
* @example
|
|
1642
1629
|
*```js
|
|
@@ -1774,7 +1761,6 @@ export enum EmbedEvent {
|
|
|
1774
1761
|
*```js
|
|
1775
1762
|
* liveboardEmbed.trigger(HostEvent.Present)
|
|
1776
1763
|
*```
|
|
1777
|
-
*
|
|
1778
1764
|
* @example
|
|
1779
1765
|
*```js
|
|
1780
1766
|
* liveboardEmbed.on(EmbedEvent.Present, {
|
|
@@ -1792,77 +1778,65 @@ export enum EmbedEvent {
|
|
|
1792
1778
|
* liveboardEmbed.trigger(HostEvent.Delete,
|
|
1793
1779
|
* {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1794
1780
|
*```
|
|
1795
|
-
*
|
|
1796
1781
|
*/
|
|
1797
1782
|
Delete = 'delete',
|
|
1798
1783
|
/**
|
|
1799
1784
|
* Emitted when a user clicks Manage schedules on a Liveboard
|
|
1800
1785
|
*
|
|
1801
1786
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
1802
|
-
*
|
|
1803
1787
|
* @example
|
|
1804
1788
|
*```js
|
|
1805
1789
|
* liveboardEmbed.trigger(HostEvent.SchedulesList)
|
|
1806
1790
|
*```
|
|
1807
|
-
*
|
|
1808
1791
|
*/
|
|
1809
1792
|
SchedulesList = 'schedule-list',
|
|
1810
1793
|
/**
|
|
1811
1794
|
* Emitted when a user clicks **Cancel** in edit mode on a Liveboard
|
|
1812
1795
|
*
|
|
1813
1796
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
1814
|
-
*
|
|
1815
1797
|
* @example
|
|
1816
1798
|
*```js
|
|
1817
1799
|
* liveboardEmbed.trigger(HostEvent.Cancel)
|
|
1818
1800
|
*```
|
|
1819
|
-
*
|
|
1820
1801
|
*/
|
|
1821
1802
|
Cancel = 'cancel',
|
|
1822
1803
|
/**
|
|
1823
1804
|
* Emitted when a user clicks **Explore** on a visualization
|
|
1824
1805
|
*
|
|
1825
1806
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
1826
|
-
*
|
|
1827
1807
|
* @example
|
|
1828
1808
|
*```js
|
|
1829
1809
|
* liveboardEmbed.trigger(HostEvent.Explore, {
|
|
1830
1810
|
* vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1831
1811
|
*```
|
|
1832
|
-
*
|
|
1833
1812
|
*/
|
|
1834
1813
|
Explore = 'explore',
|
|
1835
1814
|
/**
|
|
1836
1815
|
* Emitted when a user clicks **Copy link** action on a visualization
|
|
1837
1816
|
*
|
|
1838
1817
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
1839
|
-
*
|
|
1840
1818
|
* @example
|
|
1841
1819
|
*```js
|
|
1842
1820
|
* liveboardEmbed.trigger(HostEvent.CopyLink, {
|
|
1843
1821
|
* vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1844
1822
|
*```
|
|
1845
|
-
*
|
|
1846
1823
|
*/
|
|
1847
1824
|
CopyLink = 'embedDocument',
|
|
1848
1825
|
/**
|
|
1849
1826
|
* Emitted when a user interacts with cross filters on a visualization or Liveboard
|
|
1850
1827
|
*
|
|
1851
1828
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.5.0.sw
|
|
1852
|
-
*
|
|
1853
1829
|
* @example
|
|
1854
1830
|
*```js
|
|
1855
1831
|
* liveboardEmbed.trigger(HostEvent.CrossFilterChanged, {
|
|
1856
1832
|
* vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1857
1833
|
*```
|
|
1858
|
-
*
|
|
1859
1834
|
*/
|
|
1860
1835
|
CrossFilterChanged = 'cross-filter-changed',
|
|
1861
1836
|
/**
|
|
1862
1837
|
* Emitted when a user right clicks on a visualization (chart or table)
|
|
1863
1838
|
*
|
|
1864
1839
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.5.0.sw
|
|
1865
|
-
*
|
|
1866
1840
|
* @example
|
|
1867
1841
|
*```js
|
|
1868
1842
|
* LiveboardEmbed.on(EmbedEvent.VizPointRightClick, payload => {
|
|
@@ -1893,7 +1867,6 @@ export enum EmbedEvent {
|
|
|
1893
1867
|
* Emitted when a user selects a data source.
|
|
1894
1868
|
*
|
|
1895
1869
|
* @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
|
|
1896
|
-
*
|
|
1897
1870
|
*/
|
|
1898
1871
|
SageWorksheetUpdated = 'sageWorksheetUpdated',
|
|
1899
1872
|
/**
|
|
@@ -2122,7 +2095,6 @@ export enum HostEvent {
|
|
|
2122
2095
|
*
|
|
2123
2096
|
* @param - `path` - the path to navigate to to go forward or back. The path value can
|
|
2124
2097
|
* be a number; for example, `1`, `-1`.
|
|
2125
|
-
*
|
|
2126
2098
|
* @example
|
|
2127
2099
|
* ```js
|
|
2128
2100
|
* appEmbed.navigateToPage(-1)
|
|
@@ -2693,9 +2665,7 @@ export enum HostEvent {
|
|
|
2693
2665
|
* Updates the search query string for Natural Language Search operations.
|
|
2694
2666
|
*
|
|
2695
2667
|
* @param - `queryString`: Text string in Natural Language format
|
|
2696
|
-
*
|
|
2697
2668
|
* @param - `executeSearch`: Boolean to execute search and update search query
|
|
2698
|
-
*
|
|
2699
2669
|
* @example
|
|
2700
2670
|
* ```js
|
|
2701
2671
|
* sageEmbed.trigger(HostEvent.UpdateSageQuery, {
|
|
@@ -3709,15 +3679,15 @@ export interface ColumnValue {
|
|
|
3709
3679
|
[key: string]: any;
|
|
3710
3680
|
};
|
|
3711
3681
|
value:
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
|
|
3682
|
+
| string
|
|
3683
|
+
| number
|
|
3684
|
+
| boolean
|
|
3685
|
+
| {
|
|
3686
|
+
v: {
|
|
3687
|
+
s: number;
|
|
3688
|
+
e: number;
|
|
3689
|
+
};
|
|
3690
|
+
};
|
|
3721
3691
|
}
|
|
3722
3692
|
|
|
3723
3693
|
export interface VizPoint {
|