@thoughtspot/visual-embed-sdk 1.28.4 → 1.28.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/authToken.d.ts.map +1 -1
- package/cjs/src/authToken.js +8 -1
- package/cjs/src/authToken.js.map +1 -1
- package/cjs/src/authToken.spec.d.ts +2 -0
- package/cjs/src/authToken.spec.d.ts.map +1 -0
- package/cjs/src/authToken.spec.js +29 -0
- package/cjs/src/authToken.spec.js.map +1 -0
- package/cjs/src/types.d.ts +93 -48
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +76 -48
- package/cjs/src/types.js.map +1 -1
- package/dist/src/authToken.d.ts.map +1 -1
- package/dist/src/authToken.spec.d.ts +2 -0
- package/dist/src/authToken.spec.d.ts.map +1 -0
- package/dist/src/types.d.ts +93 -48
- package/dist/src/types.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +84 -50
- package/dist/tsembed-react.js +84 -50
- package/dist/tsembed.es.js +84 -50
- package/dist/tsembed.js +84 -50
- package/dist/visual-embed-sdk-react-full.d.ts +93 -48
- package/dist/visual-embed-sdk-react.d.ts +93 -48
- package/dist/visual-embed-sdk.d.ts +93 -48
- package/lib/package.json +1 -1
- package/lib/src/authToken.d.ts.map +1 -1
- package/lib/src/authToken.js +8 -1
- package/lib/src/authToken.js.map +1 -1
- package/lib/src/authToken.spec.d.ts +2 -0
- package/lib/src/authToken.spec.d.ts.map +1 -0
- package/lib/src/authToken.spec.js +26 -0
- package/lib/src/authToken.spec.js.map +1 -0
- package/lib/src/types.d.ts +93 -48
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +76 -48
- package/lib/src/types.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +93 -48
- package/package.json +1 -1
- package/src/authToken.spec.ts +31 -0
- package/src/authToken.ts +8 -1
- package/src/types.ts +94 -48
- package/cjs/src/utils/authService/tokenizedAuthService.spec.d.ts +0 -2
- package/cjs/src/utils/authService/tokenizedAuthService.spec.d.ts.map +0 -1
- package/cjs/src/utils/authService/tokenizedAuthService.spec.js +0 -32
- package/cjs/src/utils/authService/tokenizedAuthService.spec.js.map +0 -1
- package/cjs/src/utils/sessionInfoService.d.ts +0 -66
- package/cjs/src/utils/sessionInfoService.d.ts.map +0 -1
- package/cjs/src/utils/sessionInfoService.js +0 -92
- package/cjs/src/utils/sessionInfoService.js.map +0 -1
- package/dist/src/utils/authService/tokenizedAuthService.spec.d.ts +0 -2
- package/dist/src/utils/authService/tokenizedAuthService.spec.d.ts.map +0 -1
- package/dist/src/utils/sessionInfoService.d.ts +0 -66
- package/dist/src/utils/sessionInfoService.d.ts.map +0 -1
- package/lib/src/utils/authService/tokenizedAuthService.spec.d.ts +0 -2
- package/lib/src/utils/authService/tokenizedAuthService.spec.d.ts.map +0 -1
- package/lib/src/utils/authService/tokenizedAuthService.spec.js +0 -29
- package/lib/src/utils/authService/tokenizedAuthService.spec.js.map +0 -1
- package/lib/src/utils/sessionInfoService.d.ts +0 -66
- package/lib/src/utils/sessionInfoService.d.ts.map +0 -1
- package/lib/src/utils/sessionInfoService.js +0 -85
- package/lib/src/utils/sessionInfoService.js.map +0 -1
package/dist/tsembed-react.es.js
CHANGED
|
@@ -771,6 +771,8 @@ var EmbedEvent;
|
|
|
771
771
|
/**
|
|
772
772
|
* Authentication has either succeeded or failed.
|
|
773
773
|
*
|
|
774
|
+
* @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
|
|
775
|
+
*
|
|
774
776
|
* @example
|
|
775
777
|
*```js
|
|
776
778
|
* appEmbed.on(EmbedEvent.AuthInit, payload => {
|
|
@@ -784,6 +786,8 @@ var EmbedEvent;
|
|
|
784
786
|
* The embed object container has loaded.
|
|
785
787
|
*
|
|
786
788
|
* @returns timestamp - The timestamp when the event was generated.
|
|
789
|
+
*
|
|
790
|
+
* @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
|
|
787
791
|
* @example
|
|
788
792
|
*```js
|
|
789
793
|
* liveboardEmbed.on(EmbedEvent.Load, hideLoader)
|
|
@@ -798,6 +802,8 @@ var EmbedEvent;
|
|
|
798
802
|
* Data pertaining to answer or Liveboard is received
|
|
799
803
|
*
|
|
800
804
|
* @return data - The answer or Liveboard data
|
|
805
|
+
*
|
|
806
|
+
* @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
|
|
801
807
|
* @example
|
|
802
808
|
*```js
|
|
803
809
|
* liveboardEmbed.on(EmbedEvent.Data, payload => {
|
|
@@ -816,6 +822,7 @@ var EmbedEvent;
|
|
|
816
822
|
/**
|
|
817
823
|
* Search query has been updated by the user.
|
|
818
824
|
*
|
|
825
|
+
* @version SDK: 1.4.0 | ThoughtSpot: ts7.sep.cl, 8.4.1.sw
|
|
819
826
|
* @example
|
|
820
827
|
*```js
|
|
821
828
|
* searchEmbed.on(EmbedEvent.QueryChanged, payload => console.log('data', payload))
|
|
@@ -825,12 +832,14 @@ var EmbedEvent;
|
|
|
825
832
|
/**
|
|
826
833
|
* A drill-down operation has been performed.
|
|
827
834
|
*
|
|
835
|
+
* @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
|
|
836
|
+
*
|
|
828
837
|
* @returns additionalFilters - Any additional filters applied
|
|
829
838
|
* @returns drillDownColumns - The columns on which drill down was performed
|
|
830
839
|
* @returns nonFilteredColumns - The columns that were not filtered
|
|
831
840
|
* @example
|
|
832
841
|
*```js
|
|
833
|
-
* searchEmbed.
|
|
842
|
+
* searchEmbed.on(EmbedEvent.DrillDown, {
|
|
834
843
|
* points: {
|
|
835
844
|
* clickedPoint,
|
|
836
845
|
* selectedPoints: selectedPoint
|
|
@@ -863,6 +872,8 @@ var EmbedEvent;
|
|
|
863
872
|
* One or more data sources have been selected.
|
|
864
873
|
*
|
|
865
874
|
* @returns dataSourceIds - the list of data sources
|
|
875
|
+
*
|
|
876
|
+
* @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
|
|
866
877
|
* @example
|
|
867
878
|
* ```js
|
|
868
879
|
* searchEmbed.on(EmbedEvent.DataSourceSelected, payload => {
|
|
@@ -890,6 +901,8 @@ var EmbedEvent;
|
|
|
890
901
|
* @returns actionId - ID of the custom action
|
|
891
902
|
* @returns payload {@link CustomActionPayload} - Response payload with the
|
|
892
903
|
* Answer or Liveboard data
|
|
904
|
+
*
|
|
905
|
+
* @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
|
|
893
906
|
* @example
|
|
894
907
|
* ```js
|
|
895
908
|
* appEmbed.on(EmbedEvent.customAction, payload => {
|
|
@@ -937,22 +950,23 @@ var EmbedEvent;
|
|
|
937
950
|
/**
|
|
938
951
|
* An error has occurred. This event is fired for the following error types:
|
|
939
952
|
*
|
|
940
|
-
*
|
|
953
|
+
* `API`: API call failure error.
|
|
941
954
|
*
|
|
942
|
-
*
|
|
943
|
-
* mode.
|
|
955
|
+
* `FULLSCREEN`: Error when presenting a Liveboard or visualization in full screen mode.
|
|
944
956
|
*
|
|
945
|
-
*
|
|
957
|
+
* `SINGLE_VALUE_FILTER`: Error due to multiple values in the single value filter.
|
|
946
958
|
*
|
|
947
|
-
*
|
|
959
|
+
* `NON_EXIST_FILTER`: Error due to a non-existent filter.
|
|
948
960
|
*
|
|
949
|
-
*
|
|
961
|
+
* `INVALID_DATE_VALUE`: Invalid date value error.
|
|
950
962
|
*
|
|
951
|
-
*
|
|
963
|
+
* `INVALID_OPERATOR`: Use of invalid operator during filter application.
|
|
952
964
|
*
|
|
953
|
-
* For more information, see
|
|
965
|
+
* For more information, see https://developers.thoughtspot.com/docs/events-app-integration#errorType.
|
|
954
966
|
*
|
|
955
967
|
* @returns error - An error object or message
|
|
968
|
+
*
|
|
969
|
+
* @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
|
|
956
970
|
* @example
|
|
957
971
|
* ```js
|
|
958
972
|
* // API error
|
|
@@ -978,6 +992,9 @@ var EmbedEvent;
|
|
|
978
992
|
* The embedded object has sent an alert.
|
|
979
993
|
*
|
|
980
994
|
* @returns alert - An alert object
|
|
995
|
+
*
|
|
996
|
+
* @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
|
|
997
|
+
*
|
|
981
998
|
* @example
|
|
982
999
|
* ```js
|
|
983
1000
|
* searchEmbed.on(EmbedEvent.Alert)
|
|
@@ -987,6 +1004,8 @@ var EmbedEvent;
|
|
|
987
1004
|
/**
|
|
988
1005
|
* The ThoughtSpot auth session has expired.
|
|
989
1006
|
*
|
|
1007
|
+
* @version SDK: 1.4.0 | ThoughtSpot: ts7.sep.cl, 8.4.1.sw
|
|
1008
|
+
*
|
|
990
1009
|
* @example
|
|
991
1010
|
*```js
|
|
992
1011
|
* appEmbed.on(EmbedEvent.AuthExpire, showAuthExpired)
|
|
@@ -1040,6 +1059,7 @@ var EmbedEvent;
|
|
|
1040
1059
|
/**
|
|
1041
1060
|
* Detects the route change.
|
|
1042
1061
|
*
|
|
1062
|
+
* @version SDK: 1.7.0 | ThoughtSpot: 8.0.0.cl, 8.4.1.sw
|
|
1043
1063
|
* @example
|
|
1044
1064
|
*```js
|
|
1045
1065
|
* searchEmbed.on(EmbedEvent.RouteChange, payload =>
|
|
@@ -1056,7 +1076,7 @@ var EmbedEvent;
|
|
|
1056
1076
|
/**
|
|
1057
1077
|
* Emitted when the embed does not have cookie access. This happens
|
|
1058
1078
|
* when Safari and other Web browsers block third-party cookies
|
|
1059
|
-
* are blocked by default.
|
|
1079
|
+
* are blocked by default.
|
|
1060
1080
|
*
|
|
1061
1081
|
* @example
|
|
1062
1082
|
*```js
|
|
@@ -1099,7 +1119,7 @@ var EmbedEvent;
|
|
|
1099
1119
|
/**
|
|
1100
1120
|
* Emitted when the Liveboard shell loads.
|
|
1101
1121
|
* You can use this event as a hook to trigger
|
|
1102
|
-
*
|
|
1122
|
+
* actions on the rendered Liveboard.
|
|
1103
1123
|
*
|
|
1104
1124
|
* @version SDK: 1.9.1 | ThoughtSpot: 8.1.0.cl, 8.4.1.sw
|
|
1105
1125
|
* @example
|
|
@@ -1120,8 +1140,7 @@ var EmbedEvent;
|
|
|
1120
1140
|
*/
|
|
1121
1141
|
EmbedEvent["LiveboardRendered"] = "PinboardRendered";
|
|
1122
1142
|
/**
|
|
1123
|
-
*
|
|
1124
|
-
* is triggered on all events.
|
|
1143
|
+
* Emits all events.
|
|
1125
1144
|
*
|
|
1126
1145
|
* @Version SDK: 1.10.0 | ThoughtSpot: 8.2.0.cl, 8.4.1.sw
|
|
1127
1146
|
* @example
|
|
@@ -1138,13 +1157,13 @@ var EmbedEvent;
|
|
|
1138
1157
|
* @Version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1139
1158
|
* @example
|
|
1140
1159
|
*```js
|
|
1141
|
-
* //
|
|
1160
|
+
* //Emit when action starts
|
|
1142
1161
|
* searchEmbed.on(EmbedEvent.Save, payload => {
|
|
1143
1162
|
* console.log('Save', payload)
|
|
1144
1163
|
* }, {
|
|
1145
1164
|
* start: true
|
|
1146
1165
|
* })
|
|
1147
|
-
* //
|
|
1166
|
+
* //emit when action ends
|
|
1148
1167
|
* searchEmbed.on(EmbedEvent.Save, payload => {
|
|
1149
1168
|
* console.log('Save', payload)
|
|
1150
1169
|
* })
|
|
@@ -1154,7 +1173,7 @@ var EmbedEvent;
|
|
|
1154
1173
|
/**
|
|
1155
1174
|
* Emitted when the download action is triggered on an answer
|
|
1156
1175
|
*
|
|
1157
|
-
*
|
|
1176
|
+
* **Note**: This event is deprecated in v1.21.0.
|
|
1158
1177
|
* To fire an event when a download action is initiated on a chart or table,
|
|
1159
1178
|
* use `EmbedEvent.DownloadAsPng`, `EmbedEvent.DownloadAsPDF`, `EmbedEvent.DownloadAsCSV`,
|
|
1160
1179
|
* or `EmbedEvent.DownloadAsXLSX`
|
|
@@ -1162,7 +1181,7 @@ var EmbedEvent;
|
|
|
1162
1181
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1163
1182
|
* @example
|
|
1164
1183
|
*```js
|
|
1165
|
-
* liveboardEmbed.
|
|
1184
|
+
* liveboardEmbed.on(EmbedEvent.Download, {
|
|
1166
1185
|
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
1167
1186
|
* })
|
|
1168
1187
|
*```
|
|
@@ -1174,10 +1193,10 @@ var EmbedEvent;
|
|
|
1174
1193
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.0.sw
|
|
1175
1194
|
* @example
|
|
1176
1195
|
*```js
|
|
1177
|
-
* //
|
|
1196
|
+
* //emit when action starts
|
|
1178
1197
|
* searchEmbed.on(EmbedEvent.DownloadAsPng, payload => {
|
|
1179
1198
|
* console.log('download PNG', payload)}, {start: true })
|
|
1180
|
-
* //
|
|
1199
|
+
* //emit when action ends
|
|
1181
1200
|
* searchEmbed.on(EmbedEvent.DownloadAsPng, payload => {
|
|
1182
1201
|
* console.log('download PNG', payload)})
|
|
1183
1202
|
*```
|
|
@@ -1189,10 +1208,10 @@ var EmbedEvent;
|
|
|
1189
1208
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1190
1209
|
* @example
|
|
1191
1210
|
*```js
|
|
1192
|
-
* //
|
|
1211
|
+
* //emit when action starts
|
|
1193
1212
|
* searchEmbed.on(EmbedEvent.DownloadAsPdf, payload => {
|
|
1194
1213
|
* console.log('download PDF', payload)}, {start: true })
|
|
1195
|
-
* //
|
|
1214
|
+
* //emit when action ends
|
|
1196
1215
|
* searchEmbed.on(EmbedEvent.DownloadAsPdf, payload => {
|
|
1197
1216
|
* console.log('download PDF', payload)})
|
|
1198
1217
|
*```
|
|
@@ -1204,10 +1223,10 @@ var EmbedEvent;
|
|
|
1204
1223
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1205
1224
|
* @example
|
|
1206
1225
|
*```js
|
|
1207
|
-
* //
|
|
1226
|
+
* //emit when action starts
|
|
1208
1227
|
* searchEmbed.on(EmbedEvent.DownloadAsCSV, payload => {
|
|
1209
1228
|
* console.log('download CSV', payload)}, {start: true })
|
|
1210
|
-
* //
|
|
1229
|
+
* //emit when action ends
|
|
1211
1230
|
* searchEmbed.on(EmbedEvent.DownloadAsCSV, payload => {
|
|
1212
1231
|
* console.log('download CSV', payload)})
|
|
1213
1232
|
*```
|
|
@@ -1219,10 +1238,10 @@ var EmbedEvent;
|
|
|
1219
1238
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1220
1239
|
* @example
|
|
1221
1240
|
*```js
|
|
1222
|
-
* //
|
|
1241
|
+
* //emit when action starts
|
|
1223
1242
|
* searchEmbed.on(EmbedEvent.DownloadAsXlsx, payload => {
|
|
1224
1243
|
* console.log('download Xlsx', payload)}, { start: true })
|
|
1225
|
-
* //
|
|
1244
|
+
* //emit when action ends
|
|
1226
1245
|
* searchEmbed.on(EmbedEvent.DownloadAsXlsx, payload => {
|
|
1227
1246
|
* console.log('download Xlsx', payload)})
|
|
1228
1247
|
*```
|
|
@@ -1234,10 +1253,10 @@ var EmbedEvent;
|
|
|
1234
1253
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1235
1254
|
* @example
|
|
1236
1255
|
*```js
|
|
1237
|
-
* //
|
|
1256
|
+
* //emit when action starts
|
|
1238
1257
|
* appEmbed.on(EmbedEvent.AnswerDelete, payload => {
|
|
1239
1258
|
* console.log('delete answer', payload)}, {start: true })
|
|
1240
|
-
* //
|
|
1259
|
+
* //emit when action is completed
|
|
1241
1260
|
* appEmbed.on(EmbedEvent.AnswerDelete, payload => {
|
|
1242
1261
|
* console.log('delete answer', payload)})
|
|
1243
1262
|
*```
|
|
@@ -1249,13 +1268,13 @@ var EmbedEvent;
|
|
|
1249
1268
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1250
1269
|
* @example
|
|
1251
1270
|
*```js
|
|
1252
|
-
* //
|
|
1271
|
+
* //emit when action starts
|
|
1253
1272
|
* searchEmbed.on(EmbedEvent.Pin, payload => {
|
|
1254
1273
|
* console.log('pin', payload)
|
|
1255
1274
|
* }, {
|
|
1256
1275
|
* start: true
|
|
1257
1276
|
* })
|
|
1258
|
-
* //
|
|
1277
|
+
* //emit when action ends
|
|
1259
1278
|
* searchEmbed.on(EmbedEvent.Pin, payload => {
|
|
1260
1279
|
* console.log('pin', payload)
|
|
1261
1280
|
* })
|
|
@@ -1268,13 +1287,13 @@ var EmbedEvent;
|
|
|
1268
1287
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1269
1288
|
* @example
|
|
1270
1289
|
*```js
|
|
1271
|
-
* //
|
|
1290
|
+
* //emit when action starts
|
|
1272
1291
|
* searchEmbed.on(EmbedEvent.SpotIQAnalyze, payload => {
|
|
1273
1292
|
* console.log('SpotIQAnalyze', payload)
|
|
1274
1293
|
* }, {
|
|
1275
1294
|
* start: true
|
|
1276
1295
|
* })
|
|
1277
|
-
* //
|
|
1296
|
+
* //emit when action ends
|
|
1278
1297
|
* searchEmbed.on(EmbedEvent.SpotIQAnalyze, payload => {
|
|
1279
1298
|
* console.log('SpotIQ analyze', payload)
|
|
1280
1299
|
* })
|
|
@@ -1287,13 +1306,13 @@ var EmbedEvent;
|
|
|
1287
1306
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1288
1307
|
* @example
|
|
1289
1308
|
*```js
|
|
1290
|
-
* //
|
|
1309
|
+
* //emit when action starts
|
|
1291
1310
|
* searchEmbed.on(EmbedEvent.Share, payload => {
|
|
1292
1311
|
* console.log('Share', payload)
|
|
1293
1312
|
* }, {
|
|
1294
1313
|
* start: true
|
|
1295
1314
|
* })
|
|
1296
|
-
* //
|
|
1315
|
+
* //emit when action ends
|
|
1297
1316
|
* searchEmbed.on(EmbedEvent.Share, payload => {
|
|
1298
1317
|
* console.log('Share', payload)
|
|
1299
1318
|
* })
|
|
@@ -1368,10 +1387,10 @@ var EmbedEvent;
|
|
|
1368
1387
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1369
1388
|
* @example
|
|
1370
1389
|
*```js
|
|
1371
|
-
* //
|
|
1390
|
+
* //emit when action starts
|
|
1372
1391
|
* searchEmbed.on(EmbedEvent.ExportTML, payload => {
|
|
1373
1392
|
* console.log('Export TML', payload)}, { start: true })
|
|
1374
|
-
* //
|
|
1393
|
+
* //emit when action ends
|
|
1375
1394
|
* searchEmbed.on(EmbedEvent.ExportTML, payload => {
|
|
1376
1395
|
* console.log('Export TML', payload)})
|
|
1377
1396
|
*```
|
|
@@ -1395,10 +1414,10 @@ var EmbedEvent;
|
|
|
1395
1414
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1396
1415
|
* @example
|
|
1397
1416
|
*```js
|
|
1398
|
-
* //
|
|
1417
|
+
* //emit when action starts
|
|
1399
1418
|
* appEmbed.on(EmbedEvent.CopyAEdit, payload => {
|
|
1400
1419
|
* console.log('Copy and edit', payload)}, {start: true })
|
|
1401
|
-
* //
|
|
1420
|
+
* //emit when action ends
|
|
1402
1421
|
* appEmbed.on(EmbedEvent.CopyAEdit, payload => {
|
|
1403
1422
|
* console.log('Copy and edit', payload)})
|
|
1404
1423
|
*```
|
|
@@ -1500,7 +1519,7 @@ var EmbedEvent;
|
|
|
1500
1519
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
1501
1520
|
* @example
|
|
1502
1521
|
*```js
|
|
1503
|
-
* liveboardEmbed.
|
|
1522
|
+
* liveboardEmbed.on(EmbedEvent.Present)
|
|
1504
1523
|
*```
|
|
1505
1524
|
* @example
|
|
1506
1525
|
*```js
|
|
@@ -1516,7 +1535,7 @@ var EmbedEvent;
|
|
|
1516
1535
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
1517
1536
|
* @example
|
|
1518
1537
|
*```js
|
|
1519
|
-
* liveboardEmbed.
|
|
1538
|
+
* liveboardEmbed.on(EmbedEvent.Delete,
|
|
1520
1539
|
* {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1521
1540
|
*```
|
|
1522
1541
|
*/
|
|
@@ -1527,7 +1546,7 @@ var EmbedEvent;
|
|
|
1527
1546
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
1528
1547
|
* @example
|
|
1529
1548
|
*```js
|
|
1530
|
-
* liveboardEmbed.
|
|
1549
|
+
* liveboardEmbed.on(EmbedEvent.SchedulesList)
|
|
1531
1550
|
*```
|
|
1532
1551
|
*/
|
|
1533
1552
|
EmbedEvent["SchedulesList"] = "schedule-list";
|
|
@@ -1537,7 +1556,7 @@ var EmbedEvent;
|
|
|
1537
1556
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
1538
1557
|
* @example
|
|
1539
1558
|
*```js
|
|
1540
|
-
* liveboardEmbed.
|
|
1559
|
+
* liveboardEmbed.on(EmbedEvent.Cancel)
|
|
1541
1560
|
*```
|
|
1542
1561
|
*/
|
|
1543
1562
|
EmbedEvent["Cancel"] = "cancel";
|
|
@@ -1547,7 +1566,7 @@ var EmbedEvent;
|
|
|
1547
1566
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
1548
1567
|
* @example
|
|
1549
1568
|
*```js
|
|
1550
|
-
* liveboardEmbed.
|
|
1569
|
+
* liveboardEmbed.on(EmbedEvent.Explore, {
|
|
1551
1570
|
* vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1552
1571
|
*```
|
|
1553
1572
|
*/
|
|
@@ -1558,7 +1577,7 @@ var EmbedEvent;
|
|
|
1558
1577
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
1559
1578
|
* @example
|
|
1560
1579
|
*```js
|
|
1561
|
-
* liveboardEmbed.
|
|
1580
|
+
* liveboardEmbed.on(EmbedEvent.CopyLink, {
|
|
1562
1581
|
* vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1563
1582
|
*```
|
|
1564
1583
|
*/
|
|
@@ -1569,7 +1588,7 @@ var EmbedEvent;
|
|
|
1569
1588
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.5.0.sw
|
|
1570
1589
|
* @example
|
|
1571
1590
|
*```js
|
|
1572
|
-
* liveboardEmbed.
|
|
1591
|
+
* liveboardEmbed.on(EmbedEvent.CrossFilterChanged, {
|
|
1573
1592
|
* vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1574
1593
|
*```
|
|
1575
1594
|
*/
|
|
@@ -1593,9 +1612,18 @@ var EmbedEvent;
|
|
|
1593
1612
|
*/
|
|
1594
1613
|
EmbedEvent["InsertIntoSlide"] = "insertInToSlide";
|
|
1595
1614
|
/**
|
|
1596
|
-
* @hidden
|
|
1597
1615
|
* Emitted when a user changes any filter on a Liveboard.
|
|
1616
|
+
* Returns filter type and name, column name and ID, and runtime
|
|
1617
|
+
* filter details.
|
|
1618
|
+
*
|
|
1598
1619
|
* @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl, 9.5.0.sw
|
|
1620
|
+
* @example
|
|
1621
|
+
*
|
|
1622
|
+
*```js
|
|
1623
|
+
* LiveboardEmbed.on(EmbedEvent.FilterChanged, (payload) => {
|
|
1624
|
+
* console.log('payload', payload);
|
|
1625
|
+
* })
|
|
1626
|
+
*```
|
|
1599
1627
|
*/
|
|
1600
1628
|
EmbedEvent["FilterChanged"] = "filterChanged";
|
|
1601
1629
|
/**
|
|
@@ -2132,7 +2160,7 @@ var HostEvent;
|
|
|
2132
2160
|
* ```js
|
|
2133
2161
|
* searchEmbed.trigger(HostEvent.GetTML).then((tml) => {
|
|
2134
2162
|
* console.log(
|
|
2135
|
-
* tml.search_query // TML representation of the search query
|
|
2163
|
+
* tml.answer.search_query // TML representation of the search query
|
|
2136
2164
|
* );
|
|
2137
2165
|
* })
|
|
2138
2166
|
* ```
|
|
@@ -2375,7 +2403,7 @@ var HostEvent;
|
|
|
2375
2403
|
*
|
|
2376
2404
|
* ```js
|
|
2377
2405
|
* liveboardEmbed.trigger(HostEvent.UpdateFilters, {
|
|
2378
|
-
* filter: { column: 'column name', oper: 'IN', values: [1,2,3]
|
|
2406
|
+
* filter: { column: 'column name', oper: 'IN', values: [1,2,3]}
|
|
2379
2407
|
* })
|
|
2380
2408
|
* ```
|
|
2381
2409
|
* @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
|
|
@@ -3520,7 +3548,7 @@ var Action;
|
|
|
3520
3548
|
* disabledActions: [Action.TML] // to disable all TML actions
|
|
3521
3549
|
* ```
|
|
3522
3550
|
*
|
|
3523
|
-
* @version SDK : 1.28.
|
|
3551
|
+
* @version SDK : 1.28.3 | Thoughtspot: 9.12.0.cl
|
|
3524
3552
|
*/
|
|
3525
3553
|
Action["TML"] = "tml";
|
|
3526
3554
|
/**
|
|
@@ -5886,7 +5914,7 @@ function isEqual(value, other) {
|
|
|
5886
5914
|
|
|
5887
5915
|
var isEqual_1 = isEqual;
|
|
5888
5916
|
|
|
5889
|
-
var name="@thoughtspot/visual-embed-sdk";var version="1.28.
|
|
5917
|
+
var name="@thoughtspot/visual-embed-sdk";var version="1.28.5";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p . --incremental false; tsc -p . --incremental false --module commonjs --outDir cjs",start:"gatsby develop","build:gatsby":"npm run clean:gatsby && gatsby build --prefix-paths","build:gatsby:noprefix":"npm run clean:gatsby && gatsby build","serve:gatsby":"gatsby serve","clean:gatsby":"gatsby clean","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts","bundle-dts":"dts-bundle --name ../../dist/visual-embed-sdk --main lib/src/index.d.ts --outputAsModuleFolder=true","bundle-dts-react":"dts-bundle --name ../../../dist/visual-embed-sdk-react --main lib/src/react/index.d.ts --outputAsModuleFolder=true","bundle-dts-react-full":"dts-bundle --name ../../../dist/visual-embed-sdk-react-full --main lib/src/react/all-types-export.d.ts --outputAsModuleFolder=true",build:"rollup -c",watch:"rollup -cw","docs-cmd":"node scripts/gatsby-commands.js",docgen:"typedoc --tsconfig tsconfig.json --theme typedoc-theme","test-sdk":"jest -c jest.config.sdk.js --runInBand","test-docs":"jest -c jest.config.docs.js",test:"npm run test-sdk && npm run test-docs",posttest:"cat ./coverage/sdk/lcov.info | coveralls","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={algoliasearch:"^4.10.5",classnames:"^2.3.1",dompurify:"^2.3.4","eslint-plugin-comment-length":"^0.9.2","eslint-plugin-jsdoc":"^46.9.0",eventemitter3:"^4.0.7","gatsby-plugin-vercel":"^1.0.3","html-react-parser":"^1.4.12",lodash:"^4.17.21","mixpanel-browser":"^2.45.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1"};var devDependencies={"@mdx-js/mdx":"^1.6.22","@mdx-js/react":"^1.6.22","@react-icons/all-files":"^4.1.0","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^5.0.2","@size-limit/preset-big-lib":"^8.2.6","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^22.2.3","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^4.6.0","@typescript-eslint/parser":"^4.6.0",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1",coveralls:"^3.1.0","current-git-branch":"^1.1.0","dts-bundle":"^0.7.3",eslint:"^7.12.1","eslint-config-airbnb-base":"^14.2.0","eslint-config-prettier":"^6.15.0","eslint-import-resolver-typescript":"^2.3.0","eslint-plugin-import":"^2.22.1","eslint-plugin-prettier":"^3.1.4","eslint-plugin-react-hooks":"^4.2.0","fs-extra":"^10.0.0",gatsby:"3.13.1","gatsby-plugin-algolia":"^0.22.2","gatsby-plugin-catch-links":"^3.1.0","gatsby-plugin-env-variables":"^2.1.0","gatsby-plugin-intl":"^0.3.3","gatsby-plugin-manifest":"^3.2.0","gatsby-plugin-output":"^0.1.3","gatsby-plugin-sass":"6.7.0","gatsby-plugin-sitemap":"^4.10.0","gatsby-source-filesystem":"3.1.0","gatsby-transformer-asciidoc":"2.1.0","gatsby-transformer-rehype":"2.0.0","gh-pages":"^3.1.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^1.1.1",jest:"^26.6.3","jest-fetch-mock":"^3.0.3",jsdom:"^17.0.0","node-sass":"^8.0.0",prettier:"2.1.2",react:"^16.14.0","react-dom":"^16.14.0","react-resizable":"^1.11.0","react-resize-detector":"^6.6.0","react-test-renderer":"^17.0.2","react-use-flexsearch":"^0.1.1",rollup:"2.30.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^26.5.5","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","url-search-params-polyfill":"^8.1.0",util:"^0.12.4"};var author="ThoughtSpot";var email="support@thoughtspot.com";var license="ThoughtSpot Development Tools End User License Agreement";var directories={lib:"lib"};var repository={type:"git",url:"git+https://github.com/thoughtspot/visual-embed-sdk.git"};var publishConfig={registry:"https://registry.npmjs.org"};var keywords=["thoughtspot","everywhere","embedded","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version,description:description,module:module,main:main,types:types,files:files,exports:exports,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.js",limit:"45 kB"}],scripts:scripts,peerDependencies:peerDependencies,dependencies:dependencies,devDependencies:devDependencies,author:author,email:email,license:license,directories:directories,repository:repository,publishConfig:publishConfig,keywords:keywords,bugs:bugs,homepage:homepage,globals:globals};
|
|
5890
5918
|
|
|
5891
5919
|
/**
|
|
5892
5920
|
* Checks if `value` is `undefined`.
|
|
@@ -6115,7 +6143,9 @@ const INVALID_TOKEN_ERR = 'Invalid token received form token callback or authTok
|
|
|
6115
6143
|
let cachedAuthToken = null;
|
|
6116
6144
|
// This method can be used to get the authToken using the embedConfig
|
|
6117
6145
|
const getAuthenticationToken = async (embedConfig) => {
|
|
6118
|
-
if
|
|
6146
|
+
// Since we don't have token validation enabled , we cannot tell if the
|
|
6147
|
+
// cached token is valid or not. So we will always fetch a new token.
|
|
6148
|
+
if (cachedAuthToken && !embedConfig.disableTokenVerification) {
|
|
6119
6149
|
let isCachedTokenStillValid;
|
|
6120
6150
|
try {
|
|
6121
6151
|
isCachedTokenStillValid = await validateAuthToken(embedConfig, cachedAuthToken, true);
|
|
@@ -6141,6 +6171,10 @@ const getAuthenticationToken = async (embedConfig) => {
|
|
|
6141
6171
|
return authToken;
|
|
6142
6172
|
};
|
|
6143
6173
|
const validateAuthToken = async (embedConfig, authToken, suppressAlert) => {
|
|
6174
|
+
if (embedConfig.disableTokenVerification) {
|
|
6175
|
+
logger.info('Token verification is disabled. Assuming token is valid.');
|
|
6176
|
+
return true;
|
|
6177
|
+
}
|
|
6144
6178
|
try {
|
|
6145
6179
|
const isTokenValid = await verifyTokenService(embedConfig.thoughtSpotHost, authToken);
|
|
6146
6180
|
if (isTokenValid)
|