@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.es.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
|
import * as React from 'react';
|
|
4
4
|
import React__default, { useRef, useCallback } from 'react';
|
|
@@ -995,7 +995,8 @@ var EmbedEvent;
|
|
|
995
995
|
EmbedEvent["Download"] = "download";
|
|
996
996
|
/**
|
|
997
997
|
* Emitted when the download action is triggered on an Answer.
|
|
998
|
-
* Use start:true to subscribe to when download is initiated, or end:true to
|
|
998
|
+
* Use start:true to subscribe to when download is initiated, or end:true to
|
|
999
|
+
* subscribe to when download is completed. Default is end:true.
|
|
999
1000
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.0.sw
|
|
1000
1001
|
* @example
|
|
1001
1002
|
* ```js
|
|
@@ -1010,7 +1011,8 @@ var EmbedEvent;
|
|
|
1010
1011
|
EmbedEvent["DownloadAsPng"] = "downloadAsPng";
|
|
1011
1012
|
/**
|
|
1012
1013
|
* Emitted when the Download as PDF action is triggered on an Answer
|
|
1013
|
-
* Use start:true to subscribe to when download as PDF is initiated, or end:true to
|
|
1014
|
+
* Use start:true to subscribe to when download as PDF is initiated, or end:true to
|
|
1015
|
+
* subscribe to when download as PDF is completed. Default is end:true.
|
|
1014
1016
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1015
1017
|
* @example
|
|
1016
1018
|
* ```js
|
|
@@ -1025,7 +1027,8 @@ var EmbedEvent;
|
|
|
1025
1027
|
EmbedEvent["DownloadAsPdf"] = "downloadAsPdf";
|
|
1026
1028
|
/**
|
|
1027
1029
|
* Emitted when the Download as CSV action is triggered on an Answer.
|
|
1028
|
-
* Use start:true to subscribe to when download as CSV is initiated, or end:true to
|
|
1030
|
+
* Use start:true to subscribe to when download as CSV is initiated, or end:true to
|
|
1031
|
+
* subscribe to when download as CSV is completed. Default is end:true.
|
|
1029
1032
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1030
1033
|
* @example
|
|
1031
1034
|
* ```js
|
|
@@ -1040,7 +1043,8 @@ var EmbedEvent;
|
|
|
1040
1043
|
EmbedEvent["DownloadAsCsv"] = "downloadAsCsv";
|
|
1041
1044
|
/**
|
|
1042
1045
|
* Emitted when the Download as XLSX action is triggered on an Answer.
|
|
1043
|
-
* Use start:true to subscribe to when download as XLSX is initiated, or end:true to
|
|
1046
|
+
* Use start:true to subscribe to when download as XLSX is initiated, or end:true to
|
|
1047
|
+
* subscribe to when download as XLSX is completed. Default is end:true.
|
|
1044
1048
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1045
1049
|
* @example
|
|
1046
1050
|
* ```js
|
|
@@ -1055,7 +1059,8 @@ var EmbedEvent;
|
|
|
1055
1059
|
EmbedEvent["DownloadAsXlsx"] = "downloadAsXlsx";
|
|
1056
1060
|
/**
|
|
1057
1061
|
* Emitted when an Answer is deleted in the app
|
|
1058
|
-
* Use start:true to subscribe to when delete is initiated, or end:true to subscribe
|
|
1062
|
+
* Use start:true to subscribe to when delete is initiated, or end:true to subscribe
|
|
1063
|
+
* to when delete is completed. Default is end:true.
|
|
1059
1064
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1060
1065
|
* @example
|
|
1061
1066
|
* ```js
|
|
@@ -1082,7 +1087,8 @@ var EmbedEvent;
|
|
|
1082
1087
|
/**
|
|
1083
1088
|
* Emitted when a user initiates the Pin action to
|
|
1084
1089
|
* add an Answer to a Liveboard.
|
|
1085
|
-
* Use start:true to subscribe to when pin is initiated, or end:true to subscribe to
|
|
1090
|
+
* Use start:true to subscribe to when pin is initiated, or end:true to subscribe to
|
|
1091
|
+
* when pin is completed. Default is end:true.
|
|
1086
1092
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1087
1093
|
* @example
|
|
1088
1094
|
* ```js
|
|
@@ -1196,7 +1202,8 @@ var EmbedEvent;
|
|
|
1196
1202
|
/**
|
|
1197
1203
|
* Emitted when the **Export TML** action is triggered on an
|
|
1198
1204
|
* an embedded object in the app
|
|
1199
|
-
* Use start:true to subscribe to when export is initiated, or end:true to subscribe
|
|
1205
|
+
* Use start:true to subscribe to when export is initiated, or end:true to subscribe
|
|
1206
|
+
* to when export is completed. Default is end:true.
|
|
1200
1207
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1201
1208
|
* @example
|
|
1202
1209
|
* ```js
|
|
@@ -1222,7 +1229,8 @@ var EmbedEvent;
|
|
|
1222
1229
|
EmbedEvent["SaveAsView"] = "saveAsView";
|
|
1223
1230
|
/**
|
|
1224
1231
|
* Emitted when the user creates a copy of an Answer.
|
|
1225
|
-
* Use start:true to subscribe to when copy and edit is initiated, or end:true to
|
|
1232
|
+
* Use start:true to subscribe to when copy and edit is initiated, or end:true to
|
|
1233
|
+
* subscribe to when copy and edit is completed. Default is end:true.
|
|
1226
1234
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1227
1235
|
* @example
|
|
1228
1236
|
* ```js
|
|
@@ -1986,7 +1994,8 @@ var HostEvent;
|
|
|
1986
1994
|
* - `autoDrillDown`: Optional. If `true`, the drill down will be done automatically
|
|
1987
1995
|
* on the most popular column.
|
|
1988
1996
|
* - `vizId` (TS >= 9.8.0): Optional. The GUID of the visualization to drill in case
|
|
1989
|
-
* of a Liveboard. In Spotter embed, `vizId` refers to the Answer ID and is
|
|
1997
|
+
* of a Liveboard. In Spotter embed, `vizId` refers to the Answer ID and is
|
|
1998
|
+
* **required**.
|
|
1990
1999
|
* @example
|
|
1991
2000
|
* ```js
|
|
1992
2001
|
* searchEmbed.on(EmbedEvent.VizPointDoubleClick, (payload) => {
|
|
@@ -2182,7 +2191,8 @@ var HostEvent;
|
|
|
2182
2191
|
* the following parameters:
|
|
2183
2192
|
*
|
|
2184
2193
|
* @param - Includes the following keys:
|
|
2185
|
-
* - `vizId`: GUID of the saved Answer or Spotter visualization ID to pin to a
|
|
2194
|
+
* - `vizId`: GUID of the saved Answer or Spotter visualization ID to pin to a
|
|
2195
|
+
* Liveboard.
|
|
2186
2196
|
* Optional when pinning a new chart or table generated from a Search query.
|
|
2187
2197
|
* **Required** in Spotter Embed.
|
|
2188
2198
|
* - `liveboardId`: GUID of the Liveboard to pin an Answer. If there is no Liveboard,
|
|
@@ -2438,7 +2448,8 @@ var HostEvent;
|
|
|
2438
2448
|
* This event is not supported in visualization embed and search embed.
|
|
2439
2449
|
* @param - Object parameter. Includes the following keys:
|
|
2440
2450
|
* - `vizId`: To trigger the action for a specific visualization in Liveboard embed,
|
|
2441
|
-
* pass in `vizId` as a key. In Spotter embed, `vizId` refers to the Answer ID and
|
|
2451
|
+
* pass in `vizId` as a key. In Spotter embed, `vizId` refers to the Answer ID and
|
|
2452
|
+
* is **required**.
|
|
2442
2453
|
*
|
|
2443
2454
|
* @example
|
|
2444
2455
|
* ```js
|
|
@@ -2807,8 +2818,9 @@ var HostEvent;
|
|
|
2807
2818
|
/**
|
|
2808
2819
|
* Update one or several filters applied on a Liveboard.
|
|
2809
2820
|
* @param - Includes the following keys:
|
|
2810
|
-
* - `filter`: A single filter object containing column name, filter operator, and
|
|
2811
|
-
* - `filters`: Multiple filter objects with column name, filter operator,
|
|
2821
|
+
* - `filter`: A single filter object containing column name, filter operator, and
|
|
2822
|
+
* values. - `filters`: Multiple filter objects with column name, filter operator,
|
|
2823
|
+
* and values for each.
|
|
2812
2824
|
*
|
|
2813
2825
|
* Each filter object must include the following attributes:
|
|
2814
2826
|
*
|
|
@@ -3077,8 +3089,8 @@ var HostEvent;
|
|
|
3077
3089
|
* triggered with a modal to prompt users to
|
|
3078
3090
|
* add a name and description for the Answer.
|
|
3079
3091
|
* @param - Includes the following keys:
|
|
3080
|
-
* - `vizId`: Refers to the Answer ID in Spotter embed and is **required** in Spotter
|
|
3081
|
-
* - `name`: Optional. Name string for the Answer.
|
|
3092
|
+
* - `vizId`: Refers to the Answer ID in Spotter embed and is **required** in Spotter
|
|
3093
|
+
* embed. - `name`: Optional. Name string for the Answer.
|
|
3082
3094
|
* - `description`: Optional. Description text for the Answer.
|
|
3083
3095
|
* @example
|
|
3084
3096
|
* ```js
|
|
@@ -3273,8 +3285,9 @@ var HostEvent;
|
|
|
3273
3285
|
/**
|
|
3274
3286
|
* Triggers a new conversation in Spotter embed.
|
|
3275
3287
|
*
|
|
3276
|
-
* This feature is available only when chat history is enabled on your ThoughtSpot
|
|
3277
|
-
* Contact your admin or ThoughtSpot Support to enable chat history on your
|
|
3288
|
+
* This feature is available only when chat history is enabled on your ThoughtSpot
|
|
3289
|
+
* instance. Contact your admin or ThoughtSpot Support to enable chat history on your
|
|
3290
|
+
* instance.
|
|
3278
3291
|
*
|
|
3279
3292
|
* @example
|
|
3280
3293
|
* ```js
|
|
@@ -3320,6 +3333,7 @@ var DataSourceVisualMode;
|
|
|
3320
3333
|
*/
|
|
3321
3334
|
var Param;
|
|
3322
3335
|
(function (Param) {
|
|
3336
|
+
Param["Tsmcp"] = "tsmcp";
|
|
3323
3337
|
Param["EmbedApp"] = "embedApp";
|
|
3324
3338
|
Param["DataSources"] = "dataSources";
|
|
3325
3339
|
Param["DataSourceMode"] = "dataSourceMode";
|
|
@@ -5214,7 +5228,9 @@ var ErrorDetailsTypes;
|
|
|
5214
5228
|
ErrorDetailsTypes["NETWORK"] = "NETWORK";
|
|
5215
5229
|
})(ErrorDetailsTypes || (ErrorDetailsTypes = {}));
|
|
5216
5230
|
/**
|
|
5217
|
-
* Error codes for identifying specific issues in embedded ThoughtSpot components. Use
|
|
5231
|
+
* Error codes for identifying specific issues in embedded ThoughtSpot components. Use
|
|
5232
|
+
* {@link EmbedErrorDetailsEvent} and {@link ErrorDetailsTypes} codes for precise error
|
|
5233
|
+
* handling and debugging.
|
|
5218
5234
|
*
|
|
5219
5235
|
* @version SDK: 1.44.2 | ThoughtSpot: 26.2.0.cl
|
|
5220
5236
|
* @group Error Handling
|
|
@@ -8404,7 +8420,6 @@ const validateAuthToken = async (embedConfig, authToken, suppressAlert) => {
|
|
|
8404
8420
|
}
|
|
8405
8421
|
if (cachedAuthToken && cachedAuthToken === authToken) {
|
|
8406
8422
|
if (!embedConfig.suppressErrorAlerts && !suppressAlert) {
|
|
8407
|
-
// eslint-disable-next-line no-alert
|
|
8408
8423
|
alert(ERROR_MESSAGE.DUPLICATE_TOKEN_ERR);
|
|
8409
8424
|
}
|
|
8410
8425
|
throw new Error(ERROR_MESSAGE.DUPLICATE_TOKEN_ERR);
|
|
@@ -8836,7 +8851,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
8836
8851
|
}`;
|
|
8837
8852
|
|
|
8838
8853
|
// import YAML from 'yaml';
|
|
8839
|
-
// eslint-disable-next-line no-shadow
|
|
8840
8854
|
var OperationType;
|
|
8841
8855
|
(function (OperationType) {
|
|
8842
8856
|
OperationType["GetChartWithData"] = "GetChartWithData";
|
|
@@ -8852,10 +8866,11 @@ const DATA_TYPES = ['DATE', 'DATE_TIME', 'TIME'];
|
|
|
8852
8866
|
*
|
|
8853
8867
|
* You can use this service to:
|
|
8854
8868
|
*
|
|
8855
|
-
* - Add or remove columns from Answers (`addColumns`, `removeColumns`,
|
|
8856
|
-
* - Apply filters to Answers (`addFilter`)
|
|
8857
|
-
* - Get data from Answers in different formats (JSON, CSV, PNG) (`fetchData`,
|
|
8858
|
-
* - Get data for specific points in visualizations
|
|
8869
|
+
* - Add or remove columns from Answers (`addColumns`, `removeColumns`,
|
|
8870
|
+
* `addColumnsByName`) - Apply filters to Answers (`addFilter`)
|
|
8871
|
+
* - Get data from Answers in different formats (JSON, CSV, PNG) (`fetchData`,
|
|
8872
|
+
* `fetchCSVBlob`, `fetchPNGBlob`) - Get data for specific points in visualizations
|
|
8873
|
+
* (`getUnderlyingDataForPoint`)
|
|
8859
8874
|
* - Run custom queries (`executeQuery`)
|
|
8860
8875
|
* - Add visualizations to Liveboards (`addDisplayedVizToLiveboard`)
|
|
8861
8876
|
*
|
|
@@ -9148,7 +9163,7 @@ class AnswerService {
|
|
|
9148
9163
|
async getTML() {
|
|
9149
9164
|
const { object } = await this.executeQuery(getAnswerTML, {});
|
|
9150
9165
|
const edoc = object[0].edoc;
|
|
9151
|
-
const YAML = await import('./index-
|
|
9166
|
+
const YAML = await import('./index-DyX-x6uN.js');
|
|
9152
9167
|
const parsedDoc = YAML.parse(edoc);
|
|
9153
9168
|
return {
|
|
9154
9169
|
answer: {
|
|
@@ -9237,13 +9252,9 @@ function getSelectedPointsForUnderlyingDataQuery(selectedPoints) {
|
|
|
9237
9252
|
*/
|
|
9238
9253
|
function getDisplayedViz(visualizations, displayMode) {
|
|
9239
9254
|
if (displayMode === 'CHART_MODE') {
|
|
9240
|
-
return visualizations.find(
|
|
9241
|
-
// eslint-disable-next-line no-underscore-dangle
|
|
9242
|
-
(viz) => viz.__typename === 'ChartViz');
|
|
9255
|
+
return visualizations.find((viz) => viz.__typename === 'ChartViz');
|
|
9243
9256
|
}
|
|
9244
|
-
return visualizations.find(
|
|
9245
|
-
// eslint-disable-next-line no-underscore-dangle
|
|
9246
|
-
(viz) => viz.__typename === 'TableViz');
|
|
9257
|
+
return visualizations.find((viz) => viz.__typename === 'TableViz');
|
|
9247
9258
|
}
|
|
9248
9259
|
|
|
9249
9260
|
/** Built-in value references. */
|
|
@@ -17577,11 +17588,8 @@ function resetAllCachedServices() {
|
|
|
17577
17588
|
resetCachedPreauthInfo();
|
|
17578
17589
|
}
|
|
17579
17590
|
|
|
17580
|
-
// eslint-disable-next-line import/no-mutable-exports
|
|
17581
17591
|
let loggedInStatus = false;
|
|
17582
|
-
// eslint-disable-next-line import/no-mutable-exports
|
|
17583
17592
|
let samlAuthWindow = null;
|
|
17584
|
-
// eslint-disable-next-line import/no-mutable-exports
|
|
17585
17593
|
let samlCompletionPromise = null;
|
|
17586
17594
|
let releaseVersion = '';
|
|
17587
17595
|
const SSO_REDIRECTION_MARKER_GUID = '5e16222e-ef02-43e9-9fbd-24226bf3ce5b';
|
|
@@ -18123,8 +18131,6 @@ function processTrigger(iFrame, messageType, thoughtSpotHost, data, context) {
|
|
|
18123
18131
|
});
|
|
18124
18132
|
}
|
|
18125
18133
|
|
|
18126
|
-
/* eslint-disable camelcase */
|
|
18127
|
-
/* eslint-disable import/no-mutable-exports */
|
|
18128
18134
|
/**
|
|
18129
18135
|
* Copyright (c) 2022
|
|
18130
18136
|
*
|
|
@@ -18180,7 +18186,6 @@ const hostUrlToFeatureUrl = {
|
|
|
18180
18186
|
const prefetch = (url, prefetchFeatures, additionalFlags) => {
|
|
18181
18187
|
var _a;
|
|
18182
18188
|
if (url === '') {
|
|
18183
|
-
// eslint-disable-next-line no-console
|
|
18184
18189
|
logger$3.warn('The prefetch method does not have a valid URL');
|
|
18185
18190
|
}
|
|
18186
18191
|
else {
|
|
@@ -18200,9 +18205,9 @@ const prefetch = (url, prefetchFeatures, additionalFlags) => {
|
|
|
18200
18205
|
iFrame.style.width = '0';
|
|
18201
18206
|
iFrame.style.height = '0';
|
|
18202
18207
|
iFrame.style.border = '0';
|
|
18203
|
-
// Make it 'fixed' to keep it in a different stacking
|
|
18204
|
-
//
|
|
18205
|
-
//
|
|
18208
|
+
// Make it 'fixed' to keep it in a different stacking
|
|
18209
|
+
// context. This should solve the focus behaviours inside
|
|
18210
|
+
// the iframe from interfering with main body.
|
|
18206
18211
|
iFrame.style.position = 'fixed';
|
|
18207
18212
|
// Push it out of viewport.
|
|
18208
18213
|
iFrame.style.top = '100vh';
|
|
@@ -18331,7 +18336,7 @@ const renderInQueue = (fn) => {
|
|
|
18331
18336
|
return renderQueue;
|
|
18332
18337
|
}
|
|
18333
18338
|
// Sending an empty function to keep it consistent with the above usage.
|
|
18334
|
-
return fn(() => { });
|
|
18339
|
+
return fn(() => { });
|
|
18335
18340
|
};
|
|
18336
18341
|
|
|
18337
18342
|
/**
|
|
@@ -18391,10 +18396,8 @@ function processNoCookieAccess(e, containerEl) {
|
|
|
18391
18396
|
const { loginFailedMessage, suppressNoCookieAccessAlert, ignoreNoCookieAccess, suppressErrorAlerts, } = getEmbedConfig();
|
|
18392
18397
|
if (!ignoreNoCookieAccess) {
|
|
18393
18398
|
if (!suppressNoCookieAccessAlert && !suppressErrorAlerts) {
|
|
18394
|
-
// eslint-disable-next-line no-alert
|
|
18395
18399
|
alert(ERROR_MESSAGE.THIRD_PARTY_COOKIE_BLOCKED_ALERT);
|
|
18396
18400
|
}
|
|
18397
|
-
// eslint-disable-next-line no-param-reassign
|
|
18398
18401
|
containerEl.innerHTML = loginFailedMessage;
|
|
18399
18402
|
}
|
|
18400
18403
|
notifyAuthFailure(AuthFailureType.NO_COOKIE_ACCESS);
|
|
@@ -18412,12 +18415,10 @@ function processAuthFailure(e, containerEl) {
|
|
|
18412
18415
|
const isTrustedAuth = authType === AuthType.TrustedAuthToken || authType === AuthType.TrustedAuthTokenCookieless;
|
|
18413
18416
|
const isEmbeddedSSOInfoFailure = isEmbeddedSSO && ((_a = e === null || e === void 0 ? void 0 : e.data) === null || _a === void 0 ? void 0 : _a.type) === AuthFailureType.UNAUTHENTICATED_FAILURE;
|
|
18414
18417
|
if (autoLogin && isTrustedAuth) {
|
|
18415
|
-
// eslint-disable-next-line no-param-reassign
|
|
18416
18418
|
containerEl.innerHTML = loginFailedMessage;
|
|
18417
18419
|
notifyAuthFailure(AuthFailureType.IDLE_SESSION_TIMEOUT);
|
|
18418
18420
|
}
|
|
18419
18421
|
else if (authType !== AuthType.None && !disableLoginFailurePage && !isEmbeddedSSOInfoFailure) {
|
|
18420
|
-
// eslint-disable-next-line no-param-reassign
|
|
18421
18422
|
containerEl.innerHTML = loginFailedMessage;
|
|
18422
18423
|
notifyAuthFailure(AuthFailureType.OTHER);
|
|
18423
18424
|
}
|
|
@@ -18431,7 +18432,6 @@ function processAuthFailure(e, containerEl) {
|
|
|
18431
18432
|
*/
|
|
18432
18433
|
function processAuthLogout(e, containerEl) {
|
|
18433
18434
|
const { loginFailedMessage } = getEmbedConfig();
|
|
18434
|
-
// eslint-disable-next-line no-param-reassign
|
|
18435
18435
|
containerEl.innerHTML = loginFailedMessage;
|
|
18436
18436
|
resetCachedAuthToken();
|
|
18437
18437
|
disableAutoLogin();
|
|
@@ -18465,7 +18465,7 @@ function processEventData(type, eventData, thoughtSpotHost, containerEl) {
|
|
|
18465
18465
|
return eventData;
|
|
18466
18466
|
}
|
|
18467
18467
|
|
|
18468
|
-
var name="@thoughtspot/visual-embed-sdk";var version$1="1.46.
|
|
18468
|
+
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={".":{"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,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};
|
|
18469
18469
|
|
|
18470
18470
|
class HostEventClient {
|
|
18471
18471
|
constructor(iFrame) {
|
|
@@ -18489,14 +18489,12 @@ class HostEventClient {
|
|
|
18489
18489
|
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];
|
|
18490
18490
|
if (!response) {
|
|
18491
18491
|
const error = `No answer found${parameters.vizId ? ` for vizId: ${parameters.vizId}` : ''}.`;
|
|
18492
|
-
// eslint-disable-next-line no-throw-literal
|
|
18493
18492
|
throw { error };
|
|
18494
18493
|
}
|
|
18495
18494
|
const errors = response.error
|
|
18496
18495
|
|| ((_c = response.value) === null || _c === void 0 ? void 0 : _c.errors)
|
|
18497
18496
|
|| ((_d = response.value) === null || _d === void 0 ? void 0 : _d.error);
|
|
18498
18497
|
if (errors) {
|
|
18499
|
-
// eslint-disable-next-line no-throw-literal
|
|
18500
18498
|
throw { error: response.error };
|
|
18501
18499
|
}
|
|
18502
18500
|
return { ...response.value };
|
|
@@ -18838,7 +18836,8 @@ class TsEmbed {
|
|
|
18838
18836
|
*/
|
|
18839
18837
|
this.updateAuthToken = async (_, responder) => {
|
|
18840
18838
|
const { authType, autoLogin: autoLoginConfig } = this.embedConfig;
|
|
18841
|
-
// Default autoLogin: true for cookieless if undefined/null, otherwise
|
|
18839
|
+
// Default autoLogin: true for cookieless if undefined/null, otherwise
|
|
18840
|
+
// false
|
|
18842
18841
|
const autoLogin = autoLoginConfig !== null && autoLoginConfig !== void 0 ? autoLoginConfig : (authType === AuthType.TrustedAuthTokenCookieless);
|
|
18843
18842
|
try {
|
|
18844
18843
|
await this.refreshAuthTokenForCookieless(responder, EmbedEvent.AuthExpire, false);
|
|
@@ -20340,7 +20339,6 @@ let SearchBarEmbed$1 = class SearchBarEmbed extends TsEmbed {
|
|
|
20340
20339
|
* @group Embed components
|
|
20341
20340
|
*/
|
|
20342
20341
|
let SageEmbed$1 = class SageEmbed extends V1Embed {
|
|
20343
|
-
// eslint-disable-next-line no-useless-constructor
|
|
20344
20342
|
constructor(domSelector, viewConfig) {
|
|
20345
20343
|
viewConfig.embedComponentType = 'SageEmbed';
|
|
20346
20344
|
super(domSelector, viewConfig);
|
|
@@ -21084,7 +21082,6 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
|
|
|
21084
21082
|
}
|
|
21085
21083
|
};
|
|
21086
21084
|
|
|
21087
|
-
/* eslint-disable quotes */
|
|
21088
21085
|
const getPreviewQuery = `
|
|
21089
21086
|
query GetEurekaVizSnapshots(
|
|
21090
21087
|
$vizId: String!, $liveboardId: String!) {
|
|
@@ -21370,8 +21367,9 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
|
|
|
21370
21367
|
return params;
|
|
21371
21368
|
}
|
|
21372
21369
|
getIframeSuffixSrc(liveboardId, vizId, activeTabId, personalizedViewId) {
|
|
21373
|
-
// Extract view from liveboardId if passed along with it (legacy
|
|
21374
|
-
// View must be appended as query param at the end, not
|
|
21370
|
+
// Extract view from liveboardId if passed along with it (legacy
|
|
21371
|
+
// approach) View must be appended as query param at the end, not
|
|
21372
|
+
// embedded in path
|
|
21375
21373
|
let liveboardGuid = liveboardId;
|
|
21376
21374
|
let legacyViewId;
|
|
21377
21375
|
if (liveboardId === null || liveboardId === void 0 ? void 0 : liveboardId.includes('?')) {
|
|
@@ -21380,7 +21378,8 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
|
|
|
21380
21378
|
const params = new URLSearchParams(query);
|
|
21381
21379
|
legacyViewId = params.get('view') || undefined;
|
|
21382
21380
|
}
|
|
21383
|
-
// personalizedViewId takes precedence over legacyViewId (when passed
|
|
21381
|
+
// personalizedViewId takes precedence over legacyViewId (when passed
|
|
21382
|
+
// as part of liveboardId)
|
|
21384
21383
|
const effectiveViewId = personalizedViewId || legacyViewId;
|
|
21385
21384
|
let suffix = `/embed/viz/${liveboardGuid}`;
|
|
21386
21385
|
if (activeTabId) {
|
|
@@ -22268,7 +22267,6 @@ isPreRenderedComponent = false) => React__default.forwardRef((props, forwardedRe
|
|
|
22268
22267
|
});
|
|
22269
22268
|
handleRendering(tsEmbed);
|
|
22270
22269
|
if (forwardedRef) {
|
|
22271
|
-
// eslint-disable-next-line no-param-reassign
|
|
22272
22270
|
forwardedRef.current = tsEmbed;
|
|
22273
22271
|
}
|
|
22274
22272
|
return () => {
|