@thoughtspot/visual-embed-sdk 1.46.2 → 1.46.3
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/auth.js +0 -3
- package/cjs/src/auth.js.map +1 -1
- package/cjs/src/auth.spec.js +1 -3
- package/cjs/src/auth.spec.js.map +1 -1
- package/cjs/src/authToken.js +0 -1
- package/cjs/src/authToken.js.map +1 -1
- package/cjs/src/authToken.spec.js +2 -1
- package/cjs/src/authToken.spec.js.map +1 -1
- package/cjs/src/embed/app.d.ts +2 -1
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/auto-frame-renderer.d.ts +41 -0
- package/cjs/src/embed/auto-frame-renderer.d.ts.map +1 -0
- package/cjs/src/embed/auto-frame-renderer.js +145 -0
- package/cjs/src/embed/auto-frame-renderer.js.map +1 -0
- package/cjs/src/embed/auto-frame-renderer.spec.d.ts +2 -0
- package/cjs/src/embed/auto-frame-renderer.spec.d.ts.map +1 -0
- package/cjs/src/embed/auto-frame-renderer.spec.js +195 -0
- package/cjs/src/embed/auto-frame-renderer.spec.js.map +1 -0
- package/cjs/src/embed/base.d.ts.map +1 -1
- package/cjs/src/embed/base.js +4 -7
- package/cjs/src/embed/base.js.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.js +0 -2
- package/cjs/src/embed/hostEventClient/host-event-client.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts +2 -1
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +5 -3
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/liveboard.spec.js +4 -2
- package/cjs/src/embed/liveboard.spec.js.map +1 -1
- package/cjs/src/embed/sage.js +0 -1
- package/cjs/src/embed/sage.js.map +1 -1
- package/cjs/src/embed/search.spec.js +0 -2
- package/cjs/src/embed/search.spec.js.map +1 -1
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +3 -3
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/embed/ts-embed.spec.js +2 -1
- package/cjs/src/embed/ts-embed.spec.js.map +1 -1
- package/cjs/src/index.d.ts +3 -2
- package/cjs/src/index.d.ts.map +1 -1
- package/cjs/src/index.js +3 -1
- package/cjs/src/index.js.map +1 -1
- package/cjs/src/react/index.js +0 -1
- package/cjs/src/react/index.js.map +1 -1
- package/cjs/src/react/index.spec.js +6 -3
- package/cjs/src/react/index.spec.js.map +1 -1
- package/cjs/src/types.d.ts +56 -32
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +34 -18
- package/cjs/src/types.js.map +1 -1
- package/cjs/src/utils/graphql/answerService/answerService.d.ts +5 -4
- package/cjs/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
- package/cjs/src/utils/graphql/answerService/answerService.js +7 -11
- package/cjs/src/utils/graphql/answerService/answerService.js.map +1 -1
- package/cjs/src/utils/graphql/preview-service.js +0 -1
- package/cjs/src/utils/graphql/preview-service.js.map +1 -1
- package/cjs/src/utils/processData.js +0 -5
- package/cjs/src/utils/processData.js.map +1 -1
- package/dist/{index-DkizS4xM.js → index-DyX-x6uN.js} +1 -1
- package/dist/src/embed/app.d.ts +2 -1
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/auto-frame-renderer.d.ts +41 -0
- package/dist/src/embed/auto-frame-renderer.d.ts.map +1 -0
- package/dist/src/embed/auto-frame-renderer.spec.d.ts +2 -0
- package/dist/src/embed/auto-frame-renderer.spec.d.ts.map +1 -0
- package/dist/src/embed/base.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts +2 -1
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.d.ts.map +1 -1
- package/dist/src/index.d.ts +3 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/types.d.ts +56 -32
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/graphql/answerService/answerService.d.ts +5 -4
- package/dist/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +55 -57
- package/dist/tsembed-react.js +54 -56
- package/dist/tsembed.es.js +194 -57
- package/dist/tsembed.js +193 -55
- package/dist/visual-embed-sdk-react-full.d.ts +54 -33
- package/dist/visual-embed-sdk-react.d.ts +54 -33
- package/dist/visual-embed-sdk.d.ts +103 -38
- package/lib/package.json +1 -1
- package/lib/src/auth.js +0 -3
- package/lib/src/auth.js.map +1 -1
- package/lib/src/auth.spec.js +1 -3
- package/lib/src/auth.spec.js.map +1 -1
- package/lib/src/authToken.js +0 -1
- package/lib/src/authToken.js.map +1 -1
- package/lib/src/authToken.spec.js +2 -1
- package/lib/src/authToken.spec.js.map +1 -1
- package/lib/src/embed/app.d.ts +2 -1
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/auto-frame-renderer.d.ts +41 -0
- package/lib/src/embed/auto-frame-renderer.d.ts.map +1 -0
- package/lib/src/embed/auto-frame-renderer.js +141 -0
- package/lib/src/embed/auto-frame-renderer.js.map +1 -0
- package/lib/src/embed/auto-frame-renderer.spec.d.ts +2 -0
- package/lib/src/embed/auto-frame-renderer.spec.d.ts.map +1 -0
- package/lib/src/embed/auto-frame-renderer.spec.js +192 -0
- package/lib/src/embed/auto-frame-renderer.spec.js.map +1 -0
- package/lib/src/embed/base.d.ts.map +1 -1
- package/lib/src/embed/base.js +4 -7
- package/lib/src/embed/base.js.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.js +0 -2
- package/lib/src/embed/hostEventClient/host-event-client.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts +2 -1
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +5 -3
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +4 -2
- package/lib/src/embed/liveboard.spec.js.map +1 -1
- package/lib/src/embed/sage.js +0 -1
- package/lib/src/embed/sage.js.map +1 -1
- package/lib/src/embed/search.spec.js +0 -2
- package/lib/src/embed/search.spec.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +3 -3
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/embed/ts-embed.spec.js +2 -1
- package/lib/src/embed/ts-embed.spec.js.map +1 -1
- package/lib/src/index.d.ts +3 -2
- package/lib/src/index.d.ts.map +1 -1
- package/lib/src/index.js +1 -0
- package/lib/src/index.js.map +1 -1
- package/lib/src/react/index.js +0 -1
- package/lib/src/react/index.js.map +1 -1
- package/lib/src/react/index.spec.js +6 -3
- package/lib/src/react/index.spec.js.map +1 -1
- package/lib/src/types.d.ts +56 -32
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +34 -18
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils/graphql/answerService/answerService.d.ts +5 -4
- package/lib/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
- package/lib/src/utils/graphql/answerService/answerService.js +7 -11
- package/lib/src/utils/graphql/answerService/answerService.js.map +1 -1
- package/lib/src/utils/graphql/preview-service.js +0 -1
- package/lib/src/utils/graphql/preview-service.js.map +1 -1
- package/lib/src/utils/processData.js +0 -5
- package/lib/src/utils/processData.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +11466 -0
- package/package.json +1 -1
- package/src/auth.spec.ts +1 -1
- package/src/auth.ts +3 -3
- package/src/authToken.spec.ts +2 -1
- package/src/authToken.ts +1 -1
- package/src/embed/app.ts +2 -1
- package/src/embed/auto-frame-renderer.spec.ts +266 -0
- package/src/embed/auto-frame-renderer.ts +152 -0
- package/src/embed/base.spec.ts +1 -1
- package/src/embed/base.ts +7 -8
- package/src/embed/hostEventClient/host-event-client.ts +2 -2
- package/src/embed/liveboard.spec.ts +4 -2
- package/src/embed/liveboard.ts +7 -4
- package/src/embed/sage.ts +1 -1
- package/src/embed/search.spec.ts +2 -2
- package/src/embed/ts-embed.spec.ts +2 -1
- package/src/embed/ts-embed.ts +3 -3
- package/src/index.ts +3 -0
- package/src/react/index.spec.tsx +6 -3
- package/src/react/index.tsx +1 -1
- package/src/types.ts +57 -32
- package/src/utils/graphql/answerService/answerService.ts +8 -7
- package/src/utils/graphql/preview-service.ts +1 -1
- package/src/utils/processData.ts +5 -5
package/dist/tsembed-react.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @thoughtspot/visual-embed-sdk version 1.46.
|
|
1
|
+
/* @thoughtspot/visual-embed-sdk version 1.46.3 */
|
|
2
2
|
'use client';
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) :
|
|
@@ -1017,7 +1017,8 @@
|
|
|
1017
1017
|
EmbedEvent["Download"] = "download";
|
|
1018
1018
|
/**
|
|
1019
1019
|
* Emitted when the download action is triggered on an Answer.
|
|
1020
|
-
* Use start:true to subscribe to when download is initiated, or end:true to
|
|
1020
|
+
* Use start:true to subscribe to when download is initiated, or end:true to
|
|
1021
|
+
* subscribe to when download is completed. Default is end:true.
|
|
1021
1022
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.0.sw
|
|
1022
1023
|
* @example
|
|
1023
1024
|
* ```js
|
|
@@ -1032,7 +1033,8 @@
|
|
|
1032
1033
|
EmbedEvent["DownloadAsPng"] = "downloadAsPng";
|
|
1033
1034
|
/**
|
|
1034
1035
|
* Emitted when the Download as PDF action is triggered on an Answer
|
|
1035
|
-
* Use start:true to subscribe to when download as PDF is initiated, or end:true to
|
|
1036
|
+
* Use start:true to subscribe to when download as PDF is initiated, or end:true to
|
|
1037
|
+
* subscribe to when download as PDF is completed. Default is end:true.
|
|
1036
1038
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1037
1039
|
* @example
|
|
1038
1040
|
* ```js
|
|
@@ -1047,7 +1049,8 @@
|
|
|
1047
1049
|
EmbedEvent["DownloadAsPdf"] = "downloadAsPdf";
|
|
1048
1050
|
/**
|
|
1049
1051
|
* Emitted when the Download as CSV action is triggered on an Answer.
|
|
1050
|
-
* Use start:true to subscribe to when download as CSV is initiated, or end:true to
|
|
1052
|
+
* Use start:true to subscribe to when download as CSV is initiated, or end:true to
|
|
1053
|
+
* subscribe to when download as CSV is completed. Default is end:true.
|
|
1051
1054
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1052
1055
|
* @example
|
|
1053
1056
|
* ```js
|
|
@@ -1062,7 +1065,8 @@
|
|
|
1062
1065
|
EmbedEvent["DownloadAsCsv"] = "downloadAsCsv";
|
|
1063
1066
|
/**
|
|
1064
1067
|
* Emitted when the Download as XLSX action is triggered on an Answer.
|
|
1065
|
-
* Use start:true to subscribe to when download as XLSX is initiated, or end:true to
|
|
1068
|
+
* Use start:true to subscribe to when download as XLSX is initiated, or end:true to
|
|
1069
|
+
* subscribe to when download as XLSX is completed. Default is end:true.
|
|
1066
1070
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1067
1071
|
* @example
|
|
1068
1072
|
* ```js
|
|
@@ -1077,7 +1081,8 @@
|
|
|
1077
1081
|
EmbedEvent["DownloadAsXlsx"] = "downloadAsXlsx";
|
|
1078
1082
|
/**
|
|
1079
1083
|
* Emitted when an Answer is deleted in the app
|
|
1080
|
-
* Use start:true to subscribe to when delete is initiated, or end:true to subscribe
|
|
1084
|
+
* Use start:true to subscribe to when delete is initiated, or end:true to subscribe
|
|
1085
|
+
* to when delete is completed. Default is end:true.
|
|
1081
1086
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1082
1087
|
* @example
|
|
1083
1088
|
* ```js
|
|
@@ -1104,7 +1109,8 @@
|
|
|
1104
1109
|
/**
|
|
1105
1110
|
* Emitted when a user initiates the Pin action to
|
|
1106
1111
|
* add an Answer to a Liveboard.
|
|
1107
|
-
* Use start:true to subscribe to when pin is initiated, or end:true to subscribe to
|
|
1112
|
+
* Use start:true to subscribe to when pin is initiated, or end:true to subscribe to
|
|
1113
|
+
* when pin is completed. Default is end:true.
|
|
1108
1114
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1109
1115
|
* @example
|
|
1110
1116
|
* ```js
|
|
@@ -1218,7 +1224,8 @@
|
|
|
1218
1224
|
/**
|
|
1219
1225
|
* Emitted when the **Export TML** action is triggered on an
|
|
1220
1226
|
* an embedded object in the app
|
|
1221
|
-
* Use start:true to subscribe to when export is initiated, or end:true to subscribe
|
|
1227
|
+
* Use start:true to subscribe to when export is initiated, or end:true to subscribe
|
|
1228
|
+
* to when export is completed. Default is end:true.
|
|
1222
1229
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1223
1230
|
* @example
|
|
1224
1231
|
* ```js
|
|
@@ -1244,7 +1251,8 @@
|
|
|
1244
1251
|
EmbedEvent["SaveAsView"] = "saveAsView";
|
|
1245
1252
|
/**
|
|
1246
1253
|
* Emitted when the user creates a copy of an Answer.
|
|
1247
|
-
* Use start:true to subscribe to when copy and edit is initiated, or end:true to
|
|
1254
|
+
* Use start:true to subscribe to when copy and edit is initiated, or end:true to
|
|
1255
|
+
* subscribe to when copy and edit is completed. Default is end:true.
|
|
1248
1256
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1249
1257
|
* @example
|
|
1250
1258
|
* ```js
|
|
@@ -2008,7 +2016,8 @@
|
|
|
2008
2016
|
* - `autoDrillDown`: Optional. If `true`, the drill down will be done automatically
|
|
2009
2017
|
* on the most popular column.
|
|
2010
2018
|
* - `vizId` (TS >= 9.8.0): Optional. The GUID of the visualization to drill in case
|
|
2011
|
-
* of a Liveboard. In Spotter embed, `vizId` refers to the Answer ID and is
|
|
2019
|
+
* of a Liveboard. In Spotter embed, `vizId` refers to the Answer ID and is
|
|
2020
|
+
* **required**.
|
|
2012
2021
|
* @example
|
|
2013
2022
|
* ```js
|
|
2014
2023
|
* searchEmbed.on(EmbedEvent.VizPointDoubleClick, (payload) => {
|
|
@@ -2204,7 +2213,8 @@
|
|
|
2204
2213
|
* the following parameters:
|
|
2205
2214
|
*
|
|
2206
2215
|
* @param - Includes the following keys:
|
|
2207
|
-
* - `vizId`: GUID of the saved Answer or Spotter visualization ID to pin to a
|
|
2216
|
+
* - `vizId`: GUID of the saved Answer or Spotter visualization ID to pin to a
|
|
2217
|
+
* Liveboard.
|
|
2208
2218
|
* Optional when pinning a new chart or table generated from a Search query.
|
|
2209
2219
|
* **Required** in Spotter Embed.
|
|
2210
2220
|
* - `liveboardId`: GUID of the Liveboard to pin an Answer. If there is no Liveboard,
|
|
@@ -2460,7 +2470,8 @@
|
|
|
2460
2470
|
* This event is not supported in visualization embed and search embed.
|
|
2461
2471
|
* @param - Object parameter. Includes the following keys:
|
|
2462
2472
|
* - `vizId`: To trigger the action for a specific visualization in Liveboard embed,
|
|
2463
|
-
* pass in `vizId` as a key. In Spotter embed, `vizId` refers to the Answer ID and
|
|
2473
|
+
* pass in `vizId` as a key. In Spotter embed, `vizId` refers to the Answer ID and
|
|
2474
|
+
* is **required**.
|
|
2464
2475
|
*
|
|
2465
2476
|
* @example
|
|
2466
2477
|
* ```js
|
|
@@ -2829,8 +2840,9 @@
|
|
|
2829
2840
|
/**
|
|
2830
2841
|
* Update one or several filters applied on a Liveboard.
|
|
2831
2842
|
* @param - Includes the following keys:
|
|
2832
|
-
* - `filter`: A single filter object containing column name, filter operator, and
|
|
2833
|
-
* - `filters`: Multiple filter objects with column name, filter operator,
|
|
2843
|
+
* - `filter`: A single filter object containing column name, filter operator, and
|
|
2844
|
+
* values. - `filters`: Multiple filter objects with column name, filter operator,
|
|
2845
|
+
* and values for each.
|
|
2834
2846
|
*
|
|
2835
2847
|
* Each filter object must include the following attributes:
|
|
2836
2848
|
*
|
|
@@ -3099,8 +3111,8 @@
|
|
|
3099
3111
|
* triggered with a modal to prompt users to
|
|
3100
3112
|
* add a name and description for the Answer.
|
|
3101
3113
|
* @param - Includes the following keys:
|
|
3102
|
-
* - `vizId`: Refers to the Answer ID in Spotter embed and is **required** in Spotter
|
|
3103
|
-
* - `name`: Optional. Name string for the Answer.
|
|
3114
|
+
* - `vizId`: Refers to the Answer ID in Spotter embed and is **required** in Spotter
|
|
3115
|
+
* embed. - `name`: Optional. Name string for the Answer.
|
|
3104
3116
|
* - `description`: Optional. Description text for the Answer.
|
|
3105
3117
|
* @example
|
|
3106
3118
|
* ```js
|
|
@@ -3295,8 +3307,9 @@
|
|
|
3295
3307
|
/**
|
|
3296
3308
|
* Triggers a new conversation in Spotter embed.
|
|
3297
3309
|
*
|
|
3298
|
-
* This feature is available only when chat history is enabled on your ThoughtSpot
|
|
3299
|
-
* Contact your admin or ThoughtSpot Support to enable chat history on your
|
|
3310
|
+
* This feature is available only when chat history is enabled on your ThoughtSpot
|
|
3311
|
+
* instance. Contact your admin or ThoughtSpot Support to enable chat history on your
|
|
3312
|
+
* instance.
|
|
3300
3313
|
*
|
|
3301
3314
|
* @example
|
|
3302
3315
|
* ```js
|
|
@@ -3342,6 +3355,7 @@
|
|
|
3342
3355
|
*/
|
|
3343
3356
|
var Param;
|
|
3344
3357
|
(function (Param) {
|
|
3358
|
+
Param["Tsmcp"] = "tsmcp";
|
|
3345
3359
|
Param["EmbedApp"] = "embedApp";
|
|
3346
3360
|
Param["DataSources"] = "dataSources";
|
|
3347
3361
|
Param["DataSourceMode"] = "dataSourceMode";
|
|
@@ -5236,7 +5250,9 @@
|
|
|
5236
5250
|
ErrorDetailsTypes["NETWORK"] = "NETWORK";
|
|
5237
5251
|
})(ErrorDetailsTypes || (ErrorDetailsTypes = {}));
|
|
5238
5252
|
/**
|
|
5239
|
-
* Error codes for identifying specific issues in embedded ThoughtSpot components. Use
|
|
5253
|
+
* Error codes for identifying specific issues in embedded ThoughtSpot components. Use
|
|
5254
|
+
* {@link EmbedErrorDetailsEvent} and {@link ErrorDetailsTypes} codes for precise error
|
|
5255
|
+
* handling and debugging.
|
|
5240
5256
|
*
|
|
5241
5257
|
* @version SDK: 1.44.2 | ThoughtSpot: 26.2.0.cl
|
|
5242
5258
|
* @group Error Handling
|
|
@@ -8426,7 +8442,6 @@
|
|
|
8426
8442
|
}
|
|
8427
8443
|
if (cachedAuthToken && cachedAuthToken === authToken) {
|
|
8428
8444
|
if (!embedConfig.suppressErrorAlerts && !suppressAlert) {
|
|
8429
|
-
// eslint-disable-next-line no-alert
|
|
8430
8445
|
alert(ERROR_MESSAGE.DUPLICATE_TOKEN_ERR);
|
|
8431
8446
|
}
|
|
8432
8447
|
throw new Error(ERROR_MESSAGE.DUPLICATE_TOKEN_ERR);
|
|
@@ -8858,7 +8873,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
8858
8873
|
}`;
|
|
8859
8874
|
|
|
8860
8875
|
// import YAML from 'yaml';
|
|
8861
|
-
// eslint-disable-next-line no-shadow
|
|
8862
8876
|
var OperationType;
|
|
8863
8877
|
(function (OperationType) {
|
|
8864
8878
|
OperationType["GetChartWithData"] = "GetChartWithData";
|
|
@@ -8874,10 +8888,11 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
8874
8888
|
*
|
|
8875
8889
|
* You can use this service to:
|
|
8876
8890
|
*
|
|
8877
|
-
* - Add or remove columns from Answers (`addColumns`, `removeColumns`,
|
|
8878
|
-
* - Apply filters to Answers (`addFilter`)
|
|
8879
|
-
* - Get data from Answers in different formats (JSON, CSV, PNG) (`fetchData`,
|
|
8880
|
-
* - Get data for specific points in visualizations
|
|
8891
|
+
* - Add or remove columns from Answers (`addColumns`, `removeColumns`,
|
|
8892
|
+
* `addColumnsByName`) - Apply filters to Answers (`addFilter`)
|
|
8893
|
+
* - Get data from Answers in different formats (JSON, CSV, PNG) (`fetchData`,
|
|
8894
|
+
* `fetchCSVBlob`, `fetchPNGBlob`) - Get data for specific points in visualizations
|
|
8895
|
+
* (`getUnderlyingDataForPoint`)
|
|
8881
8896
|
* - Run custom queries (`executeQuery`)
|
|
8882
8897
|
* - Add visualizations to Liveboards (`addDisplayedVizToLiveboard`)
|
|
8883
8898
|
*
|
|
@@ -9259,13 +9274,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
9259
9274
|
*/
|
|
9260
9275
|
function getDisplayedViz(visualizations, displayMode) {
|
|
9261
9276
|
if (displayMode === 'CHART_MODE') {
|
|
9262
|
-
return visualizations.find(
|
|
9263
|
-
// eslint-disable-next-line no-underscore-dangle
|
|
9264
|
-
(viz) => viz.__typename === 'ChartViz');
|
|
9277
|
+
return visualizations.find((viz) => viz.__typename === 'ChartViz');
|
|
9265
9278
|
}
|
|
9266
|
-
return visualizations.find(
|
|
9267
|
-
// eslint-disable-next-line no-underscore-dangle
|
|
9268
|
-
(viz) => viz.__typename === 'TableViz');
|
|
9279
|
+
return visualizations.find((viz) => viz.__typename === 'TableViz');
|
|
9269
9280
|
}
|
|
9270
9281
|
|
|
9271
9282
|
/** Built-in value references. */
|
|
@@ -17599,11 +17610,8 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
17599
17610
|
resetCachedPreauthInfo();
|
|
17600
17611
|
}
|
|
17601
17612
|
|
|
17602
|
-
// eslint-disable-next-line import/no-mutable-exports
|
|
17603
17613
|
let loggedInStatus = false;
|
|
17604
|
-
// eslint-disable-next-line import/no-mutable-exports
|
|
17605
17614
|
let samlAuthWindow = null;
|
|
17606
|
-
// eslint-disable-next-line import/no-mutable-exports
|
|
17607
17615
|
let samlCompletionPromise = null;
|
|
17608
17616
|
let releaseVersion = '';
|
|
17609
17617
|
const SSO_REDIRECTION_MARKER_GUID = '5e16222e-ef02-43e9-9fbd-24226bf3ce5b';
|
|
@@ -18145,8 +18153,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18145
18153
|
});
|
|
18146
18154
|
}
|
|
18147
18155
|
|
|
18148
|
-
/* eslint-disable camelcase */
|
|
18149
|
-
/* eslint-disable import/no-mutable-exports */
|
|
18150
18156
|
/**
|
|
18151
18157
|
* Copyright (c) 2022
|
|
18152
18158
|
*
|
|
@@ -18202,7 +18208,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18202
18208
|
const prefetch = (url, prefetchFeatures, additionalFlags) => {
|
|
18203
18209
|
var _a;
|
|
18204
18210
|
if (url === '') {
|
|
18205
|
-
// eslint-disable-next-line no-console
|
|
18206
18211
|
logger$3.warn('The prefetch method does not have a valid URL');
|
|
18207
18212
|
}
|
|
18208
18213
|
else {
|
|
@@ -18222,9 +18227,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18222
18227
|
iFrame.style.width = '0';
|
|
18223
18228
|
iFrame.style.height = '0';
|
|
18224
18229
|
iFrame.style.border = '0';
|
|
18225
|
-
// Make it 'fixed' to keep it in a different stacking
|
|
18226
|
-
//
|
|
18227
|
-
//
|
|
18230
|
+
// Make it 'fixed' to keep it in a different stacking
|
|
18231
|
+
// context. This should solve the focus behaviours inside
|
|
18232
|
+
// the iframe from interfering with main body.
|
|
18228
18233
|
iFrame.style.position = 'fixed';
|
|
18229
18234
|
// Push it out of viewport.
|
|
18230
18235
|
iFrame.style.top = '100vh';
|
|
@@ -18353,7 +18358,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18353
18358
|
return renderQueue;
|
|
18354
18359
|
}
|
|
18355
18360
|
// Sending an empty function to keep it consistent with the above usage.
|
|
18356
|
-
return fn(() => { });
|
|
18361
|
+
return fn(() => { });
|
|
18357
18362
|
};
|
|
18358
18363
|
|
|
18359
18364
|
/**
|
|
@@ -18413,10 +18418,8 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18413
18418
|
const { loginFailedMessage, suppressNoCookieAccessAlert, ignoreNoCookieAccess, suppressErrorAlerts, } = getEmbedConfig();
|
|
18414
18419
|
if (!ignoreNoCookieAccess) {
|
|
18415
18420
|
if (!suppressNoCookieAccessAlert && !suppressErrorAlerts) {
|
|
18416
|
-
// eslint-disable-next-line no-alert
|
|
18417
18421
|
alert(ERROR_MESSAGE.THIRD_PARTY_COOKIE_BLOCKED_ALERT);
|
|
18418
18422
|
}
|
|
18419
|
-
// eslint-disable-next-line no-param-reassign
|
|
18420
18423
|
containerEl.innerHTML = loginFailedMessage;
|
|
18421
18424
|
}
|
|
18422
18425
|
notifyAuthFailure(AuthFailureType.NO_COOKIE_ACCESS);
|
|
@@ -18434,12 +18437,10 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18434
18437
|
const isTrustedAuth = authType === AuthType.TrustedAuthToken || authType === AuthType.TrustedAuthTokenCookieless;
|
|
18435
18438
|
const isEmbeddedSSOInfoFailure = isEmbeddedSSO && ((_a = e === null || e === void 0 ? void 0 : e.data) === null || _a === void 0 ? void 0 : _a.type) === AuthFailureType.UNAUTHENTICATED_FAILURE;
|
|
18436
18439
|
if (autoLogin && isTrustedAuth) {
|
|
18437
|
-
// eslint-disable-next-line no-param-reassign
|
|
18438
18440
|
containerEl.innerHTML = loginFailedMessage;
|
|
18439
18441
|
notifyAuthFailure(AuthFailureType.IDLE_SESSION_TIMEOUT);
|
|
18440
18442
|
}
|
|
18441
18443
|
else if (authType !== AuthType.None && !disableLoginFailurePage && !isEmbeddedSSOInfoFailure) {
|
|
18442
|
-
// eslint-disable-next-line no-param-reassign
|
|
18443
18444
|
containerEl.innerHTML = loginFailedMessage;
|
|
18444
18445
|
notifyAuthFailure(AuthFailureType.OTHER);
|
|
18445
18446
|
}
|
|
@@ -18453,7 +18454,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18453
18454
|
*/
|
|
18454
18455
|
function processAuthLogout(e, containerEl) {
|
|
18455
18456
|
const { loginFailedMessage } = getEmbedConfig();
|
|
18456
|
-
// eslint-disable-next-line no-param-reassign
|
|
18457
18457
|
containerEl.innerHTML = loginFailedMessage;
|
|
18458
18458
|
resetCachedAuthToken();
|
|
18459
18459
|
disableAutoLogin();
|
|
@@ -18487,7 +18487,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18487
18487
|
return eventData;
|
|
18488
18488
|
}
|
|
18489
18489
|
|
|
18490
|
-
var name="@thoughtspot/visual-embed-sdk";var version$1="1.46.
|
|
18490
|
+
var name="@thoughtspot/visual-embed-sdk";var version$1="1.46.3";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$1={".":{"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 tsconfig.build.json --incremental false; tsc -p tsconfig.build.json --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle-generator --config ./dts-config/dts-bundle-file.config.js","bundle-dts":"dts-bundle-generator --config ./dts-config/dts-bundle.config.js","bundle-dts-react":"dts-bundle-generator --config ./dts-config/dts-bundle-react.config.js","bundle-dts-react-full":"dts-bundle-generator --config ./dts-config/dts-bundle-react-full.config.js",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.build.json --theme typedoc-theme --json static/typedoc/typedoc.json --disableOutputCheck","test-sdk":"jest -c jest.config.sdk.js --runInBand",test:"npm run test-sdk",posttest:"cat ./coverage/sdk/lcov.info | npx coveralls-next || echo 'Warning: Coveralls upload failed but not breaking the build.'","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",dev:"vite -c vite.local.config.ts"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={classnames:"^2.3.1",eventemitter3:"^4.0.7",lodash:"^4.17.23","mixpanel-browser":"2.47.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1",yaml:"^2.5.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":"^11.2.0","@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":"^30.0.0","@types/lodash":"^4.17.0","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^8.28.0","@typescript-eslint/parser":"^8.28.0",ajv:"^8.17.1",asciidoctor:"^2.2.1","babel-jest":"^30.2.0","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1","coveralls-next":"^5.0.0",crypto:"^1.0.1","current-git-branch":"^1.1.0","dts-bundle-generator":"^9.5.1",eslint:"^9.23.0","eslint-config-airbnb-base":"^15.0.0","eslint-config-prettier":"^10.1.1","eslint-import-resolver-typescript":"^4.2.5","eslint-plugin-comment-length":"2.2.1","eslint-plugin-import":"^2.31.0","eslint-plugin-jsdoc":"^50.6.9","eslint-plugin-prettier":"^5.2.5","eslint-plugin-react":"^7.37.5","eslint-plugin-react-hooks":"^5.2.0","fs-extra":"^10.0.0","gh-pages":"6.3.0",globals:"^16.0.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^2.0.0",jest:"^30.2.0","jest-environment-jsdom":"^29.7.0","jest-fetch-mock":"^3.0.3",jsdom:"^17.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:"4.24.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^29.4.6","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","typescript-eslint":"^8.29.1","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^6.3.5"};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$1,description:description,module:module,main:main,types:types,files:files,exports:exports$1,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.es.js",limit:"32 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};
|
|
18491
18491
|
|
|
18492
18492
|
class HostEventClient {
|
|
18493
18493
|
constructor(iFrame) {
|
|
@@ -18511,14 +18511,12 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18511
18511
|
const response = (_b = (_a = (await this.triggerUIPassthroughApi(apiName, parameters, context))) === null || _a === void 0 ? void 0 : _a.filter) === null || _b === void 0 ? void 0 : _b.call(_a, (r) => r.error || r.value)[0];
|
|
18512
18512
|
if (!response) {
|
|
18513
18513
|
const error = `No answer found${parameters.vizId ? ` for vizId: ${parameters.vizId}` : ''}.`;
|
|
18514
|
-
// eslint-disable-next-line no-throw-literal
|
|
18515
18514
|
throw { error };
|
|
18516
18515
|
}
|
|
18517
18516
|
const errors = response.error
|
|
18518
18517
|
|| ((_c = response.value) === null || _c === void 0 ? void 0 : _c.errors)
|
|
18519
18518
|
|| ((_d = response.value) === null || _d === void 0 ? void 0 : _d.error);
|
|
18520
18519
|
if (errors) {
|
|
18521
|
-
// eslint-disable-next-line no-throw-literal
|
|
18522
18520
|
throw { error: response.error };
|
|
18523
18521
|
}
|
|
18524
18522
|
return { ...response.value };
|
|
@@ -18860,7 +18858,8 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18860
18858
|
*/
|
|
18861
18859
|
this.updateAuthToken = async (_, responder) => {
|
|
18862
18860
|
const { authType, autoLogin: autoLoginConfig } = this.embedConfig;
|
|
18863
|
-
// Default autoLogin: true for cookieless if undefined/null, otherwise
|
|
18861
|
+
// Default autoLogin: true for cookieless if undefined/null, otherwise
|
|
18862
|
+
// false
|
|
18864
18863
|
const autoLogin = autoLoginConfig !== null && autoLoginConfig !== void 0 ? autoLoginConfig : (authType === AuthType.TrustedAuthTokenCookieless);
|
|
18865
18864
|
try {
|
|
18866
18865
|
await this.refreshAuthTokenForCookieless(responder, exports.EmbedEvent.AuthExpire, false);
|
|
@@ -20362,7 +20361,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
20362
20361
|
* @group Embed components
|
|
20363
20362
|
*/
|
|
20364
20363
|
let SageEmbed$1 = class SageEmbed extends V1Embed {
|
|
20365
|
-
// eslint-disable-next-line no-useless-constructor
|
|
20366
20364
|
constructor(domSelector, viewConfig) {
|
|
20367
20365
|
viewConfig.embedComponentType = 'SageEmbed';
|
|
20368
20366
|
super(domSelector, viewConfig);
|
|
@@ -21106,7 +21104,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
21106
21104
|
}
|
|
21107
21105
|
};
|
|
21108
21106
|
|
|
21109
|
-
/* eslint-disable quotes */
|
|
21110
21107
|
const getPreviewQuery = `
|
|
21111
21108
|
query GetEurekaVizSnapshots(
|
|
21112
21109
|
$vizId: String!, $liveboardId: String!) {
|
|
@@ -21392,8 +21389,9 @@ query GetEurekaVizSnapshots(
|
|
|
21392
21389
|
return params;
|
|
21393
21390
|
}
|
|
21394
21391
|
getIframeSuffixSrc(liveboardId, vizId, activeTabId, personalizedViewId) {
|
|
21395
|
-
// Extract view from liveboardId if passed along with it (legacy
|
|
21396
|
-
// View must be appended as query param at the end, not
|
|
21392
|
+
// Extract view from liveboardId if passed along with it (legacy
|
|
21393
|
+
// approach) View must be appended as query param at the end, not
|
|
21394
|
+
// embedded in path
|
|
21397
21395
|
let liveboardGuid = liveboardId;
|
|
21398
21396
|
let legacyViewId;
|
|
21399
21397
|
if (liveboardId === null || liveboardId === void 0 ? void 0 : liveboardId.includes('?')) {
|
|
@@ -21402,7 +21400,8 @@ query GetEurekaVizSnapshots(
|
|
|
21402
21400
|
const params = new URLSearchParams(query);
|
|
21403
21401
|
legacyViewId = params.get('view') || undefined;
|
|
21404
21402
|
}
|
|
21405
|
-
// personalizedViewId takes precedence over legacyViewId (when passed
|
|
21403
|
+
// personalizedViewId takes precedence over legacyViewId (when passed
|
|
21404
|
+
// as part of liveboardId)
|
|
21406
21405
|
const effectiveViewId = personalizedViewId || legacyViewId;
|
|
21407
21406
|
let suffix = `/embed/viz/${liveboardGuid}`;
|
|
21408
21407
|
if (activeTabId) {
|
|
@@ -22290,7 +22289,6 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
22290
22289
|
});
|
|
22291
22290
|
handleRendering(tsEmbed);
|
|
22292
22291
|
if (forwardedRef) {
|
|
22293
|
-
// eslint-disable-next-line no-param-reassign
|
|
22294
22292
|
forwardedRef.current = tsEmbed;
|
|
22295
22293
|
}
|
|
22296
22294
|
return () => {
|