@thoughtspot/visual-embed-sdk 1.44.1 → 1.44.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/package.json +6 -5
- package/cjs/src/api-intercept.d.ts.map +1 -1
- package/cjs/src/api-intercept.js +8 -3
- package/cjs/src/api-intercept.js.map +1 -1
- package/cjs/src/api-intercept.spec.js +19 -3
- package/cjs/src/api-intercept.spec.js.map +1 -1
- package/cjs/src/auth.spec.js +43 -42
- package/cjs/src/auth.spec.js.map +1 -1
- package/cjs/src/authToken.spec.js +3 -3
- package/cjs/src/authToken.spec.js.map +1 -1
- package/cjs/src/embed/app.d.ts +17 -0
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +9 -5
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/app.spec.js +96 -6
- package/cjs/src/embed/app.spec.js.map +1 -1
- package/cjs/src/embed/base.spec.js +11 -15
- package/cjs/src/embed/base.spec.js.map +1 -1
- package/cjs/src/embed/bodyless-conversation.spec.js +2 -2
- package/cjs/src/embed/bodyless-conversation.spec.js.map +1 -1
- package/cjs/src/embed/conversation.d.ts.map +1 -1
- package/cjs/src/embed/conversation.js +6 -1
- package/cjs/src/embed/conversation.js.map +1 -1
- package/cjs/src/embed/conversation.spec.js +8 -3
- package/cjs/src/embed/conversation.spec.js.map +1 -1
- package/cjs/src/embed/embed.spec.js +101 -2
- package/cjs/src/embed/embed.spec.js.map +1 -1
- package/cjs/src/embed/events.spec.js +2 -2
- package/cjs/src/embed/events.spec.js.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.spec.js +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts +18 -0
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +13 -6
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/liveboard.spec.js +114 -26
- package/cjs/src/embed/liveboard.spec.js.map +1 -1
- package/cjs/src/embed/pinboard.spec.js +1 -1
- package/cjs/src/embed/pinboard.spec.js.map +1 -1
- package/cjs/src/embed/sage.spec.js +2 -2
- package/cjs/src/embed/sage.spec.js.map +1 -1
- package/cjs/src/embed/search.spec.js +118 -2
- package/cjs/src/embed/search.spec.js.map +1 -1
- package/cjs/src/embed/ts-embed-trigger.spec.js +2 -3
- package/cjs/src/embed/ts-embed-trigger.spec.js.map +1 -1
- package/cjs/src/embed/ts-embed.d.ts +3 -2
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +51 -17
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/embed/ts-embed.spec.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.spec.js +335 -71
- package/cjs/src/embed/ts-embed.spec.js.map +1 -1
- package/cjs/src/errors.d.ts +7 -0
- package/cjs/src/errors.d.ts.map +1 -1
- package/cjs/src/errors.js +7 -0
- package/cjs/src/errors.js.map +1 -1
- package/cjs/src/mixpanel-service.spec.js +1 -1
- package/cjs/src/mixpanel-service.spec.js.map +1 -1
- package/cjs/src/react/index.spec.js +3 -4
- package/cjs/src/react/index.spec.js.map +1 -1
- package/cjs/src/test/test-utils.js +1 -1
- package/cjs/src/test/test-utils.js.map +1 -1
- package/cjs/src/types.d.ts +194 -1
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +94 -2
- package/cjs/src/types.js.map +1 -1
- package/cjs/src/utils/authService/authService.spec.js +8 -8
- package/cjs/src/utils/authService/authService.spec.js.map +1 -1
- package/cjs/src/utils/authService/tokenizedAuthService.spec.js.map +1 -1
- package/cjs/src/utils/graphql/answerService/answerService.spec.js +1 -1
- package/cjs/src/utils/graphql/answerService/answerService.spec.js.map +1 -1
- package/cjs/src/utils/graphql/graphql-request.spec.js +1 -1
- package/cjs/src/utils/graphql/graphql-request.spec.js.map +1 -1
- package/cjs/src/utils/graphql/sourceService.spec.js +1 -1
- package/cjs/src/utils/graphql/sourceService.spec.js.map +1 -1
- package/cjs/src/utils/logger.spec.d.ts +5 -20
- package/cjs/src/utils/logger.spec.d.ts.map +1 -1
- package/cjs/src/utils/processData.spec.js +17 -17
- package/cjs/src/utils/processData.spec.js.map +1 -1
- package/cjs/src/utils/processTrigger.spec.js +8 -8
- package/cjs/src/utils/processTrigger.spec.js.map +1 -1
- package/cjs/src/utils.d.ts +6 -0
- package/cjs/src/utils.d.ts.map +1 -1
- package/cjs/src/utils.js +32 -1
- package/cjs/src/utils.js.map +1 -1
- package/cjs/src/utils.spec.js +19 -10
- package/cjs/src/utils.spec.js.map +1 -1
- package/dist/{index-BE9gGzRX.js → index-CSFjfTVk.js} +1 -1
- package/dist/src/api-intercept.d.ts.map +1 -1
- package/dist/src/embed/app.d.ts +17 -0
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/conversation.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts +18 -0
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.d.ts +3 -2
- package/dist/src/embed/ts-embed.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.spec.d.ts.map +1 -1
- package/dist/src/errors.d.ts +7 -0
- package/dist/src/errors.d.ts.map +1 -1
- package/dist/src/types.d.ts +194 -1
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/logger.spec.d.ts +5 -20
- package/dist/src/utils/logger.spec.d.ts.map +1 -1
- package/dist/src/utils.d.ts +6 -0
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +219 -36
- package/dist/tsembed-react.js +218 -35
- package/dist/tsembed.es.js +219 -36
- package/dist/tsembed.js +218 -35
- package/dist/visual-embed-sdk-react-full.d.ts +184 -2
- package/dist/visual-embed-sdk-react.d.ts +184 -2
- package/dist/visual-embed-sdk.d.ts +184 -2
- package/lib/package.json +6 -5
- package/lib/src/api-intercept.d.ts.map +1 -1
- package/lib/src/api-intercept.js +9 -4
- package/lib/src/api-intercept.js.map +1 -1
- package/lib/src/api-intercept.spec.js +20 -4
- package/lib/src/api-intercept.spec.js.map +1 -1
- package/lib/src/auth.spec.js +43 -42
- package/lib/src/auth.spec.js.map +1 -1
- package/lib/src/authToken.spec.js +3 -3
- package/lib/src/authToken.spec.js.map +1 -1
- package/lib/src/embed/app.d.ts +17 -0
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +10 -6
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/app.spec.js +96 -6
- package/lib/src/embed/app.spec.js.map +1 -1
- package/lib/src/embed/base.spec.js +11 -15
- package/lib/src/embed/base.spec.js.map +1 -1
- package/lib/src/embed/bodyless-conversation.spec.js +2 -2
- package/lib/src/embed/bodyless-conversation.spec.js.map +1 -1
- package/lib/src/embed/conversation.d.ts.map +1 -1
- package/lib/src/embed/conversation.js +7 -2
- package/lib/src/embed/conversation.js.map +1 -1
- package/lib/src/embed/conversation.spec.js +9 -4
- package/lib/src/embed/conversation.spec.js.map +1 -1
- package/lib/src/embed/embed.spec.js +103 -4
- package/lib/src/embed/embed.spec.js.map +1 -1
- package/lib/src/embed/events.spec.js +2 -2
- package/lib/src/embed/events.spec.js.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.spec.js +2 -2
- package/lib/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts +18 -0
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +15 -8
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +114 -26
- package/lib/src/embed/liveboard.spec.js.map +1 -1
- package/lib/src/embed/pinboard.spec.js +1 -1
- package/lib/src/embed/pinboard.spec.js.map +1 -1
- package/lib/src/embed/sage.spec.js +2 -2
- package/lib/src/embed/sage.spec.js.map +1 -1
- package/lib/src/embed/search.spec.js +118 -2
- package/lib/src/embed/search.spec.js.map +1 -1
- package/lib/src/embed/ts-embed-trigger.spec.js +2 -3
- package/lib/src/embed/ts-embed-trigger.spec.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts +3 -2
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +52 -18
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/embed/ts-embed.spec.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.spec.js +336 -72
- package/lib/src/embed/ts-embed.spec.js.map +1 -1
- package/lib/src/errors.d.ts +7 -0
- package/lib/src/errors.d.ts.map +1 -1
- package/lib/src/errors.js +7 -0
- package/lib/src/errors.js.map +1 -1
- package/lib/src/mixpanel-service.spec.js +1 -1
- package/lib/src/mixpanel-service.spec.js.map +1 -1
- package/lib/src/react/index.spec.js +3 -4
- package/lib/src/react/index.spec.js.map +1 -1
- package/lib/src/test/test-utils.js +1 -1
- package/lib/src/test/test-utils.js.map +1 -1
- package/lib/src/types.d.ts +194 -1
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +93 -1
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils/authService/authService.spec.js +8 -8
- package/lib/src/utils/authService/authService.spec.js.map +1 -1
- package/lib/src/utils/authService/tokenizedAuthService.spec.js.map +1 -1
- package/lib/src/utils/graphql/answerService/answerService.spec.js +1 -1
- package/lib/src/utils/graphql/answerService/answerService.spec.js.map +1 -1
- package/lib/src/utils/graphql/graphql-request.spec.js +1 -1
- package/lib/src/utils/graphql/graphql-request.spec.js.map +1 -1
- package/lib/src/utils/graphql/sourceService.spec.js +1 -1
- package/lib/src/utils/graphql/sourceService.spec.js.map +1 -1
- package/lib/src/utils/logger.spec.d.ts +5 -20
- package/lib/src/utils/logger.spec.d.ts.map +1 -1
- package/lib/src/utils/processData.spec.js +17 -17
- package/lib/src/utils/processData.spec.js.map +1 -1
- package/lib/src/utils/processTrigger.spec.js +8 -8
- package/lib/src/utils/processTrigger.spec.js.map +1 -1
- package/lib/src/utils.d.ts +6 -0
- package/lib/src/utils.d.ts.map +1 -1
- package/lib/src/utils.js +30 -0
- package/lib/src/utils.js.map +1 -1
- package/lib/src/utils.spec.js +20 -11
- package/lib/src/utils.spec.js.map +1 -1
- package/package.json +6 -5
- package/src/api-intercept.spec.ts +23 -10
- package/src/api-intercept.ts +9 -4
- package/src/auth.spec.ts +53 -51
- package/src/authToken.spec.ts +3 -3
- package/src/embed/app.spec.ts +128 -7
- package/src/embed/app.ts +30 -4
- package/src/embed/base.spec.ts +16 -20
- package/src/embed/bodyless-conversation.spec.ts +2 -2
- package/src/embed/conversation.spec.ts +9 -4
- package/src/embed/conversation.ts +7 -2
- package/src/embed/embed.spec.ts +122 -2
- package/src/embed/events.spec.ts +2 -2
- package/src/embed/hostEventClient/host-event-client.spec.ts +2 -2
- package/src/embed/liveboard.spec.ts +137 -29
- package/src/embed/liveboard.ts +36 -6
- package/src/embed/pinboard.spec.ts +1 -1
- package/src/embed/sage.spec.ts +2 -2
- package/src/embed/search.spec.ts +133 -2
- package/src/embed/ts-embed-trigger.spec.ts +2 -3
- package/src/embed/ts-embed.spec.ts +424 -91
- package/src/embed/ts-embed.ts +56 -19
- package/src/errors.ts +7 -0
- package/src/mixpanel-service.spec.ts +1 -1
- package/src/react/index.spec.tsx +4 -5
- package/src/test/test-utils.ts +2 -2
- package/src/types.ts +206 -1
- package/src/utils/authService/authService.spec.ts +17 -17
- package/src/utils/authService/tokenizedAuthService.spec.ts +4 -4
- package/src/utils/graphql/answerService/answerService.spec.ts +3 -3
- package/src/utils/graphql/graphql-request.spec.ts +2 -2
- package/src/utils/graphql/sourceService.spec.ts +1 -1
- package/src/utils/processData.spec.ts +26 -26
- package/src/utils/processTrigger.spec.ts +8 -8
- package/src/utils.spec.ts +22 -11
- package/src/utils.ts +34 -0
package/dist/tsembed-react.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @thoughtspot/visual-embed-sdk version 1.44.
|
|
1
|
+
/* @thoughtspot/visual-embed-sdk version 1.44.2 */
|
|
2
2
|
'use client';
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) :
|
|
@@ -786,6 +786,7 @@
|
|
|
786
786
|
* SearchEmbed.on(EmbedEvent.Error, (error) => {
|
|
787
787
|
* console.log(error);
|
|
788
788
|
* // { type: "Error", data: { errorType: "API", error: { message: '...', error: '...' } } }
|
|
789
|
+
* // { errorType: "API", message: '...', code: '...' } new format
|
|
789
790
|
* });
|
|
790
791
|
* ```
|
|
791
792
|
* @example
|
|
@@ -797,6 +798,7 @@
|
|
|
797
798
|
* // message: "Fullscreen API is not enabled",
|
|
798
799
|
* // stack: "..."
|
|
799
800
|
* // } }}
|
|
801
|
+
* // { errorType: "FULLSCREEN", message: "Fullscreen API is not enabled", code: '...' } new format
|
|
800
802
|
* })
|
|
801
803
|
* ```
|
|
802
804
|
*/
|
|
@@ -952,7 +954,8 @@
|
|
|
952
954
|
*/
|
|
953
955
|
EmbedEvent["ALL"] = "*";
|
|
954
956
|
/**
|
|
955
|
-
* Emitted when an Answer is saved in the app
|
|
957
|
+
* Emitted when an Answer is saved in the app.
|
|
958
|
+
* Use start:true to subscribe to when save is initiated, or end:true to subscribe to when save is completed. Default is end:true.
|
|
956
959
|
* @Version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
957
960
|
* @example
|
|
958
961
|
*```js
|
|
@@ -987,6 +990,7 @@
|
|
|
987
990
|
EmbedEvent["Download"] = "download";
|
|
988
991
|
/**
|
|
989
992
|
* Emitted when the download action is triggered on an Answer.
|
|
993
|
+
* Use start:true to subscribe to when download is initiated, or end:true to subscribe to when download is completed. Default is end:true.
|
|
990
994
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.0.sw
|
|
991
995
|
* @example
|
|
992
996
|
*```js
|
|
@@ -1001,6 +1005,7 @@
|
|
|
1001
1005
|
EmbedEvent["DownloadAsPng"] = "downloadAsPng";
|
|
1002
1006
|
/**
|
|
1003
1007
|
* Emitted when the Download as PDF action is triggered on an Answer
|
|
1008
|
+
* Use start:true to subscribe to when download as PDF is initiated, or end:true to subscribe to when download as PDF is completed. Default is end:true.
|
|
1004
1009
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1005
1010
|
* @example
|
|
1006
1011
|
*```js
|
|
@@ -1015,6 +1020,7 @@
|
|
|
1015
1020
|
EmbedEvent["DownloadAsPdf"] = "downloadAsPdf";
|
|
1016
1021
|
/**
|
|
1017
1022
|
* Emitted when the Download as CSV action is triggered on an Answer.
|
|
1023
|
+
* Use start:true to subscribe to when download as CSV is initiated, or end:true to subscribe to when download as CSV is completed. Default is end:true.
|
|
1018
1024
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1019
1025
|
* @example
|
|
1020
1026
|
*```js
|
|
@@ -1029,6 +1035,7 @@
|
|
|
1029
1035
|
EmbedEvent["DownloadAsCsv"] = "downloadAsCsv";
|
|
1030
1036
|
/**
|
|
1031
1037
|
* Emitted when the Download as XLSX action is triggered on an Answer.
|
|
1038
|
+
* Use start:true to subscribe to when download as XLSX is initiated, or end:true to subscribe to when download as XLSX is completed. Default is end:true.
|
|
1032
1039
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1033
1040
|
* @example
|
|
1034
1041
|
*```js
|
|
@@ -1043,6 +1050,7 @@
|
|
|
1043
1050
|
EmbedEvent["DownloadAsXlsx"] = "downloadAsXlsx";
|
|
1044
1051
|
/**
|
|
1045
1052
|
* Emitted when an Answer is deleted in the app
|
|
1053
|
+
* Use start:true to subscribe to when delete is initiated, or end:true to subscribe to when delete is completed. Default is end:true.
|
|
1046
1054
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1047
1055
|
* @example
|
|
1048
1056
|
*```js
|
|
@@ -1069,6 +1077,7 @@
|
|
|
1069
1077
|
/**
|
|
1070
1078
|
* Emitted when a user initiates the Pin action to
|
|
1071
1079
|
* add an Answer to a Liveboard.
|
|
1080
|
+
* Use start:true to subscribe to when pin is initiated, or end:true to subscribe to when pin is completed. Default is end:true.
|
|
1072
1081
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1073
1082
|
* @example
|
|
1074
1083
|
*```js
|
|
@@ -1182,6 +1191,7 @@
|
|
|
1182
1191
|
/**
|
|
1183
1192
|
* Emitted when the **Export TML** action is triggered on an
|
|
1184
1193
|
* an embedded object in the app
|
|
1194
|
+
* Use start:true to subscribe to when export is initiated, or end:true to subscribe to when export is completed. Default is end:true.
|
|
1185
1195
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1186
1196
|
* @example
|
|
1187
1197
|
*```js
|
|
@@ -1207,6 +1217,7 @@
|
|
|
1207
1217
|
EmbedEvent["SaveAsView"] = "saveAsView";
|
|
1208
1218
|
/**
|
|
1209
1219
|
* Emitted when the user creates a copy of an Answer.
|
|
1220
|
+
* Use start:true to subscribe to when copy and edit is initiated, or end:true to subscribe to when copy and edit is completed. Default is end:true.
|
|
1210
1221
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1211
1222
|
* @example
|
|
1212
1223
|
*```js
|
|
@@ -3278,6 +3289,8 @@
|
|
|
3278
3289
|
Param["HideLiveboardHeader"] = "hideLiveboardHeader";
|
|
3279
3290
|
Param["ShowLiveboardDescription"] = "showLiveboardDescription";
|
|
3280
3291
|
Param["ShowLiveboardTitle"] = "showLiveboardTitle";
|
|
3292
|
+
Param["ShowMaskedFilterChip"] = "showMaskedFilterChip";
|
|
3293
|
+
Param["IsLiveboardMasterpiecesEnabled"] = "isLiveboardMasterpiecesEnabled";
|
|
3281
3294
|
Param["HiddenTabs"] = "hideTabs";
|
|
3282
3295
|
Param["VisibleTabs"] = "visibleTabs";
|
|
3283
3296
|
Param["HideTabPanel"] = "hideTabPanel";
|
|
@@ -4811,6 +4824,85 @@
|
|
|
4811
4824
|
*/
|
|
4812
4825
|
LogLevel["TRACE"] = "TRACE";
|
|
4813
4826
|
})(exports.LogLevel || (exports.LogLevel = {}));
|
|
4827
|
+
/**
|
|
4828
|
+
* Error types emitted by embedded components.
|
|
4829
|
+
*
|
|
4830
|
+
* These enum values categorize different types of errors that can occur during
|
|
4831
|
+
* the lifecycle of an embedded ThoughtSpot component. Use these values to implement
|
|
4832
|
+
* specific error handling logic based on the error category.
|
|
4833
|
+
*
|
|
4834
|
+
* @see {@link EmbedErrorDetailsEvent} - The error event object structure
|
|
4835
|
+
* @see {@link EmbedEvent.Error} - The event that emits these errors
|
|
4836
|
+
* @version SDK: 1.44.2 | ThoughtSpot: 26.2.0.cl
|
|
4837
|
+
* @group Error Handling
|
|
4838
|
+
*/
|
|
4839
|
+
var ErrorDetailsTypes;
|
|
4840
|
+
(function (ErrorDetailsTypes) {
|
|
4841
|
+
/** API call failure */
|
|
4842
|
+
ErrorDetailsTypes["API"] = "API";
|
|
4843
|
+
/** General validation error */
|
|
4844
|
+
ErrorDetailsTypes["VALIDATION_ERROR"] = "VALIDATION_ERROR";
|
|
4845
|
+
/** Network connectivity or request error */
|
|
4846
|
+
ErrorDetailsTypes["NETWORK"] = "NETWORK";
|
|
4847
|
+
})(ErrorDetailsTypes || (ErrorDetailsTypes = {}));
|
|
4848
|
+
/**
|
|
4849
|
+
* Specific error codes for embedded component errors.
|
|
4850
|
+
*
|
|
4851
|
+
* These codes provide granular identification of errors that occur in embedded components.
|
|
4852
|
+
* They are returned in the {@link EmbedErrorDetailsEvent.code} property and allow for
|
|
4853
|
+
* precise error handling and debugging.
|
|
4854
|
+
*
|
|
4855
|
+
* The codes are organized into categories:
|
|
4856
|
+
* - **Worksheet ID not found or does not exist**: Errors related to applying or updating filters
|
|
4857
|
+
* - **Liveboard ID missing**: Errors related to missing liveboard ID
|
|
4858
|
+
* - **Conflicting actions configuration**: Errors related to conflicting actions configuration
|
|
4859
|
+
* - **Conflicting tabs configuration**: Errors related to conflicting tabs configuration
|
|
4860
|
+
* - **Initialization error**: Errors related to initialization error
|
|
4861
|
+
* - **Network error**: Errors related to network error
|
|
4862
|
+
* - **Custom action validation**: Errors related to custom action validation
|
|
4863
|
+
* - **Login failed**: Errors related to login failed
|
|
4864
|
+
* - **Render not called**: Errors related to render not called
|
|
4865
|
+
* - **Host event type undefined or invalid**: Errors related to host event type undefined or invalid
|
|
4866
|
+
*
|
|
4867
|
+
* @version SDK: 1.44.2 | ThoughtSpot: 26.2.0.cl
|
|
4868
|
+
* @group Error Handling
|
|
4869
|
+
* @see {@link EmbedErrorDetailsEvent} - The error event object that includes these codes
|
|
4870
|
+
* @see {@link ErrorDetailsTypes} - General error type categories
|
|
4871
|
+
*
|
|
4872
|
+
* @example
|
|
4873
|
+
* Handle specific error codes
|
|
4874
|
+
*
|
|
4875
|
+
* embed.on(EmbedEvent.Error, (error) => {
|
|
4876
|
+
* if (error.code === EmbedErrorCodes.WORKSHEET_ID_NOT_FOUND) {
|
|
4877
|
+
* console.error('Worksheet ID not found:', error.message);
|
|
4878
|
+
* }
|
|
4879
|
+
* });
|
|
4880
|
+
* */
|
|
4881
|
+
var EmbedErrorCodes;
|
|
4882
|
+
(function (EmbedErrorCodes) {
|
|
4883
|
+
/** Worksheet ID not found or does not exist */
|
|
4884
|
+
EmbedErrorCodes["WORKSHEET_ID_NOT_FOUND"] = "WORKSHEET_ID_NOT_FOUND";
|
|
4885
|
+
/** Required Liveboard ID is missing from configuration */
|
|
4886
|
+
EmbedErrorCodes["LIVEBOARD_ID_MISSING"] = "LIVEBOARD_ID_MISSING";
|
|
4887
|
+
/** Conflicting action configuration detected (e.g., both hiddenActions and visibleActions specified) */
|
|
4888
|
+
EmbedErrorCodes["CONFLICTING_ACTIONS_CONFIG"] = "CONFLICTING_ACTIONS_CONFIG";
|
|
4889
|
+
/** Conflicting tab configuration detected (e.g., both hiddenTabs and visibleTabs specified) */
|
|
4890
|
+
EmbedErrorCodes["CONFLICTING_TABS_CONFIG"] = "CONFLICTING_TABS_CONFIG";
|
|
4891
|
+
/** Error during component initialization */
|
|
4892
|
+
EmbedErrorCodes["INIT_ERROR"] = "INIT_ERROR";
|
|
4893
|
+
/** Network connectivity or request error */
|
|
4894
|
+
EmbedErrorCodes["NETWORK_ERROR"] = "NETWORK_ERROR";
|
|
4895
|
+
/** Custom action validation failed */
|
|
4896
|
+
EmbedErrorCodes["CUSTOM_ACTION_VALIDATION"] = "CUSTOM_ACTION_VALIDATION";
|
|
4897
|
+
/** Authentication/login failed */
|
|
4898
|
+
EmbedErrorCodes["LOGIN_FAILED"] = "LOGIN_FAILED";
|
|
4899
|
+
/** Render method was not called before attempting to use the component */
|
|
4900
|
+
EmbedErrorCodes["RENDER_NOT_CALLED"] = "RENDER_NOT_CALLED";
|
|
4901
|
+
/** Host event type is undefined or invalid */
|
|
4902
|
+
EmbedErrorCodes["HOST_EVENT_TYPE_UNDEFINED"] = "HOST_EVENT_TYPE_UNDEFINED";
|
|
4903
|
+
/** Error parsing api intercept body */
|
|
4904
|
+
EmbedErrorCodes["PARSING_API_INTERCEPT_BODY_ERROR"] = "PARSING_API_INTERCEPT_BODY_ERROR";
|
|
4905
|
+
})(EmbedErrorCodes || (EmbedErrorCodes = {}));
|
|
4814
4906
|
/**
|
|
4815
4907
|
* Enum for the type of API intercepted
|
|
4816
4908
|
*/
|
|
@@ -5000,6 +5092,36 @@
|
|
|
5000
5092
|
}
|
|
5001
5093
|
return value;
|
|
5002
5094
|
};
|
|
5095
|
+
/**
|
|
5096
|
+
* Validates if a string is a valid CSS margin value.
|
|
5097
|
+
* @param value - The string to validate
|
|
5098
|
+
* @returns true if the value is a valid CSS margin value, false otherwise
|
|
5099
|
+
*/
|
|
5100
|
+
const isValidCssMargin = (value) => {
|
|
5101
|
+
if (isUndefined$1(value)) {
|
|
5102
|
+
return false;
|
|
5103
|
+
}
|
|
5104
|
+
if (typeof value !== 'string') {
|
|
5105
|
+
logger$3.error('Please provide a valid lazyLoadingMargin value (e.g., "10px")');
|
|
5106
|
+
return false;
|
|
5107
|
+
}
|
|
5108
|
+
// This pattern allows for an optional negative sign, and numbers that can be integers or decimals (including leading dot).
|
|
5109
|
+
const cssUnitPattern = /^-?(\d+(\.\d*)?|\.\d+)(px|em|rem|%|vh|vw)$/i;
|
|
5110
|
+
const parts = value.trim().split(/\s+/);
|
|
5111
|
+
if (parts.length > 4) {
|
|
5112
|
+
logger$3.error('Please provide a valid lazyLoadingMargin value (e.g., "10px")');
|
|
5113
|
+
return false;
|
|
5114
|
+
}
|
|
5115
|
+
const isValid = parts.every(part => {
|
|
5116
|
+
const trimmedPart = part.trim();
|
|
5117
|
+
return trimmedPart.toLowerCase() === 'auto' || trimmedPart === '0' || cssUnitPattern.test(trimmedPart);
|
|
5118
|
+
});
|
|
5119
|
+
if (!isValid) {
|
|
5120
|
+
logger$3.error('Please provide a valid lazyLoadingMargin value (e.g., "10px")');
|
|
5121
|
+
return false;
|
|
5122
|
+
}
|
|
5123
|
+
return true;
|
|
5124
|
+
};
|
|
5003
5125
|
const getSSOMarker = (markerId) => {
|
|
5004
5126
|
const encStringToAppend = encodeURIComponent(markerId);
|
|
5005
5127
|
return `tsSSOMarker=${encStringToAppend}`;
|
|
@@ -7624,6 +7746,13 @@
|
|
|
7624
7746
|
RENDER_CALLED_BEFORE_INIT: 'Looks like render was called before calling init, the render won\'t start until init is called.\nFor more info check\n1. https://developers.thoughtspot.com/docs/Function_init#_init\n2.https://developers.thoughtspot.com/docs/getting-started#initSdk',
|
|
7625
7747
|
SPOTTER_AGENT_NOT_INITIALIZED: 'SpotterAgent not initialized',
|
|
7626
7748
|
OFFLINE_WARNING: 'Network not Detected. Embed is offline. Please reconnect and refresh',
|
|
7749
|
+
INIT_SDK_REQUIRED: 'You need to init the ThoughtSpot SDK module first',
|
|
7750
|
+
CONFLICTING_ACTIONS_CONFIG: 'You cannot have both hidden actions and visible actions',
|
|
7751
|
+
CONFLICTING_TABS_CONFIG: 'You cannot have both hidden Tabs and visible Tabs',
|
|
7752
|
+
RENDER_BEFORE_EVENTS_REQUIRED: 'Please call render before triggering events',
|
|
7753
|
+
HOST_EVENT_TYPE_UNDEFINED: 'Host event type is undefined',
|
|
7754
|
+
LOGIN_FAILED: 'Login failed',
|
|
7755
|
+
ERROR_PARSING_API_INTERCEPT_BODY: 'Error parsing api intercept body',
|
|
7627
7756
|
};
|
|
7628
7757
|
const CUSTOM_ACTIONS_ERROR_MESSAGE = {
|
|
7629
7758
|
INVALID_ACTION_OBJECT: 'Custom Action Validation Error: Invalid action object provided',
|
|
@@ -17786,7 +17915,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
17786
17915
|
return eventData;
|
|
17787
17916
|
}
|
|
17788
17917
|
|
|
17789
|
-
var name="@thoughtspot/visual-embed-sdk";var version$1="1.44.
|
|
17918
|
+
var name="@thoughtspot/visual-embed-sdk";var version$1="1.44.2";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","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.21","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};
|
|
17790
17919
|
|
|
17791
17920
|
class HostEventClient {
|
|
17792
17921
|
constructor(iFrame) {
|
|
@@ -17984,9 +18113,13 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
17984
18113
|
const { eventData, executeEvent, viewConfig, getUnsavedAnswerTml } = params;
|
|
17985
18114
|
const [interceptData, bodyParseError] = parseInterceptData(eventData.data);
|
|
17986
18115
|
if (bodyParseError) {
|
|
17987
|
-
|
|
17988
|
-
|
|
17989
|
-
|
|
18116
|
+
const errorDetails = {
|
|
18117
|
+
errorType: ErrorDetailsTypes.API,
|
|
18118
|
+
message: ERROR_MESSAGE.ERROR_PARSING_API_INTERCEPT_BODY,
|
|
18119
|
+
code: EmbedErrorCodes.PARSING_API_INTERCEPT_BODY_ERROR,
|
|
18120
|
+
error: ERROR_MESSAGE.ERROR_PARSING_API_INTERCEPT_BODY,
|
|
18121
|
+
};
|
|
18122
|
+
executeEvent(exports.EmbedEvent.Error, errorDetails);
|
|
17990
18123
|
logger$3.error('Error parsing request body', bodyParseError);
|
|
17991
18124
|
return;
|
|
17992
18125
|
}
|
|
@@ -18298,19 +18431,23 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18298
18431
|
* Throws error encountered during initialization.
|
|
18299
18432
|
*/
|
|
18300
18433
|
throwInitError() {
|
|
18301
|
-
this.handleError(
|
|
18434
|
+
this.handleError({
|
|
18435
|
+
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
18436
|
+
message: ERROR_MESSAGE.INIT_SDK_REQUIRED,
|
|
18437
|
+
code: EmbedErrorCodes.INIT_ERROR,
|
|
18438
|
+
error: ERROR_MESSAGE.INIT_SDK_REQUIRED,
|
|
18439
|
+
});
|
|
18302
18440
|
}
|
|
18303
18441
|
/**
|
|
18304
18442
|
* Handles errors within the SDK
|
|
18305
18443
|
* @param error The error message or object
|
|
18444
|
+
* @param errorDetails The error details
|
|
18306
18445
|
*/
|
|
18307
|
-
handleError(
|
|
18446
|
+
handleError(errorDetails) {
|
|
18308
18447
|
this.isError = true;
|
|
18309
|
-
this.executeCallbacks(exports.EmbedEvent.Error,
|
|
18310
|
-
error,
|
|
18311
|
-
});
|
|
18448
|
+
this.executeCallbacks(exports.EmbedEvent.Error, errorDetails);
|
|
18312
18449
|
// Log error
|
|
18313
|
-
logger$3.error(
|
|
18450
|
+
logger$3.error(errorDetails);
|
|
18314
18451
|
}
|
|
18315
18452
|
/**
|
|
18316
18453
|
* Extracts the type field from the event payload
|
|
@@ -18389,11 +18526,14 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18389
18526
|
};
|
|
18390
18527
|
window.addEventListener('online', onlineEventListener);
|
|
18391
18528
|
const offlineEventListener = (e) => {
|
|
18392
|
-
const
|
|
18393
|
-
|
|
18394
|
-
|
|
18395
|
-
|
|
18396
|
-
|
|
18529
|
+
const errorDetails = {
|
|
18530
|
+
errorType: ErrorDetailsTypes.NETWORK,
|
|
18531
|
+
message: ERROR_MESSAGE.OFFLINE_WARNING,
|
|
18532
|
+
code: EmbedErrorCodes.NETWORK_ERROR,
|
|
18533
|
+
offlineWarning: ERROR_MESSAGE.OFFLINE_WARNING,
|
|
18534
|
+
};
|
|
18535
|
+
this.executeCallbacks(exports.EmbedEvent.Error, errorDetails);
|
|
18536
|
+
logger$3.warn(errorDetails);
|
|
18397
18537
|
};
|
|
18398
18538
|
window.addEventListener('offline', offlineEventListener);
|
|
18399
18539
|
this.subscribedListeners.online = onlineEventListener;
|
|
@@ -18473,8 +18613,10 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18473
18613
|
]);
|
|
18474
18614
|
if (customActionsResult.errors.length > 0) {
|
|
18475
18615
|
this.handleError({
|
|
18476
|
-
|
|
18616
|
+
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
18477
18617
|
message: customActionsResult.errors,
|
|
18618
|
+
code: EmbedErrorCodes.CUSTOM_ACTION_VALIDATION,
|
|
18619
|
+
error: { type: EmbedErrorCodes.CUSTOM_ACTION_VALIDATION, message: customActionsResult.errors }
|
|
18478
18620
|
});
|
|
18479
18621
|
}
|
|
18480
18622
|
const baseInitData = {
|
|
@@ -18571,11 +18713,21 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18571
18713
|
...additionalFlagsFromView,
|
|
18572
18714
|
};
|
|
18573
18715
|
if (Array.isArray(visibleActions) && Array.isArray(hiddenActions)) {
|
|
18574
|
-
this.handleError(
|
|
18716
|
+
this.handleError({
|
|
18717
|
+
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
18718
|
+
message: ERROR_MESSAGE.CONFLICTING_ACTIONS_CONFIG,
|
|
18719
|
+
code: EmbedErrorCodes.CONFLICTING_ACTIONS_CONFIG,
|
|
18720
|
+
error: ERROR_MESSAGE.CONFLICTING_ACTIONS_CONFIG,
|
|
18721
|
+
});
|
|
18575
18722
|
return queryParams;
|
|
18576
18723
|
}
|
|
18577
18724
|
if (Array.isArray(visibleTabs) && Array.isArray(hiddenTabs)) {
|
|
18578
|
-
this.handleError(
|
|
18725
|
+
this.handleError({
|
|
18726
|
+
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
18727
|
+
message: ERROR_MESSAGE.CONFLICTING_TABS_CONFIG,
|
|
18728
|
+
code: EmbedErrorCodes.CONFLICTING_TABS_CONFIG,
|
|
18729
|
+
error: ERROR_MESSAGE.CONFLICTING_TABS_CONFIG,
|
|
18730
|
+
});
|
|
18579
18731
|
return queryParams;
|
|
18580
18732
|
}
|
|
18581
18733
|
if (primaryAction) {
|
|
@@ -18800,7 +18952,12 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18800
18952
|
error: JSON.stringify(error),
|
|
18801
18953
|
});
|
|
18802
18954
|
this.handleInsertionIntoDOM(this.embedConfig.loginFailedMessage);
|
|
18803
|
-
this.handleError(
|
|
18955
|
+
this.handleError({
|
|
18956
|
+
errorType: ErrorDetailsTypes.API,
|
|
18957
|
+
message: error.message || ERROR_MESSAGE.LOGIN_FAILED,
|
|
18958
|
+
code: EmbedErrorCodes.LOGIN_FAILED,
|
|
18959
|
+
error: error,
|
|
18960
|
+
});
|
|
18804
18961
|
});
|
|
18805
18962
|
});
|
|
18806
18963
|
}
|
|
@@ -19105,11 +19262,21 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
19105
19262
|
async trigger(messageType, data = {}) {
|
|
19106
19263
|
uploadMixpanelEvent(`${MIXPANEL_EVENT.VISUAL_SDK_TRIGGER}-${messageType}`);
|
|
19107
19264
|
if (!this.isRendered) {
|
|
19108
|
-
this.handleError(
|
|
19265
|
+
this.handleError({
|
|
19266
|
+
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
19267
|
+
message: ERROR_MESSAGE.RENDER_BEFORE_EVENTS_REQUIRED,
|
|
19268
|
+
code: EmbedErrorCodes.RENDER_NOT_CALLED,
|
|
19269
|
+
error: ERROR_MESSAGE.RENDER_BEFORE_EVENTS_REQUIRED,
|
|
19270
|
+
});
|
|
19109
19271
|
return null;
|
|
19110
19272
|
}
|
|
19111
19273
|
if (!messageType) {
|
|
19112
|
-
this.handleError(
|
|
19274
|
+
this.handleError({
|
|
19275
|
+
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
19276
|
+
message: ERROR_MESSAGE.HOST_EVENT_TYPE_UNDEFINED,
|
|
19277
|
+
code: EmbedErrorCodes.HOST_EVENT_TYPE_UNDEFINED,
|
|
19278
|
+
error: ERROR_MESSAGE.HOST_EVENT_TYPE_UNDEFINED,
|
|
19279
|
+
});
|
|
19113
19280
|
return null;
|
|
19114
19281
|
}
|
|
19115
19282
|
// Check if iframe exists before triggering -
|
|
@@ -19922,7 +20089,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
19922
20089
|
constructor(domSelector, viewConfig) {
|
|
19923
20090
|
viewConfig.embedComponentType = 'AppEmbed';
|
|
19924
20091
|
super(domSelector, viewConfig);
|
|
19925
|
-
this.defaultHeight =
|
|
20092
|
+
this.defaultHeight = 500;
|
|
19926
20093
|
this.sendFullHeightLazyLoadData = () => {
|
|
19927
20094
|
const data = calculateVisibleElementData(this.iFrame);
|
|
19928
20095
|
this.trigger(exports.HostEvent.VisibleEmbedCoordinates, data);
|
|
@@ -19944,8 +20111,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
19944
20111
|
* @param data The event payload
|
|
19945
20112
|
*/
|
|
19946
20113
|
this.updateIFrameHeight = (data) => {
|
|
19947
|
-
|
|
19948
|
-
this.setIFrameHeight(Math.max(data.data, (_a = this.iFrame) === null || _a === void 0 ? void 0 : _a.scrollHeight));
|
|
20114
|
+
this.setIFrameHeight(Math.max(data.data, this.defaultHeight));
|
|
19949
20115
|
this.sendFullHeightLazyLoadData();
|
|
19950
20116
|
};
|
|
19951
20117
|
this.embedIframeCenter = (data, responder) => {
|
|
@@ -19984,7 +20150,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
19984
20150
|
* embedded Liveboard or visualization.
|
|
19985
20151
|
*/
|
|
19986
20152
|
getEmbedParams() {
|
|
19987
|
-
const { tag, hideTagFilterChips, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideHamburger, hideObjectSearch, hideNotification, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 = true, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, hideHomepageLeftNav = false, modularHomeExperience = false, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, enable2ColumnLayout, enableCustomColumnGroups = false, dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, isEnhancedFilterInteractivityEnabled = false, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, discoveryExperience, coverAndFilterOptionInPDF = false, liveboardXLSXCSVDownload, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, isCentralizedLiveboardFilterUXEnabled = false, isLinkParametersEnabled, updatedSpotterChatPrompt, } = this.viewConfig;
|
|
20153
|
+
const { tag, hideTagFilterChips, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideHamburger, hideObjectSearch, hideNotification, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 = true, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, showMaskedFilterChip = false, isLiveboardMasterpiecesEnabled = false, hideHomepageLeftNav = false, modularHomeExperience = false, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, enable2ColumnLayout, enableCustomColumnGroups = false, dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, isEnhancedFilterInteractivityEnabled = false, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, discoveryExperience, coverAndFilterOptionInPDF = false, liveboardXLSXCSVDownload, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, isCentralizedLiveboardFilterUXEnabled = false, isLinkParametersEnabled, updatedSpotterChatPrompt, minimumHeight, } = this.viewConfig;
|
|
19988
20154
|
let params = {};
|
|
19989
20155
|
params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
|
|
19990
20156
|
params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
|
|
@@ -19993,6 +20159,8 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
19993
20159
|
params[Param.HideLiveboardHeader] = hideLiveboardHeader;
|
|
19994
20160
|
params[Param.ShowLiveboardTitle] = showLiveboardTitle;
|
|
19995
20161
|
params[Param.ShowLiveboardDescription] = !!showLiveboardDescription;
|
|
20162
|
+
params[Param.ShowMaskedFilterChip] = showMaskedFilterChip;
|
|
20163
|
+
params[Param.IsLiveboardMasterpiecesEnabled] = isLiveboardMasterpiecesEnabled;
|
|
19996
20164
|
params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
|
|
19997
20165
|
params[Param.IsFullAppEmbed] = true;
|
|
19998
20166
|
params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
|
|
@@ -20019,7 +20187,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
20019
20187
|
params[Param.fullHeight] = true;
|
|
20020
20188
|
if (this.viewConfig.lazyLoadingForFullHeight) {
|
|
20021
20189
|
params[Param.IsLazyLoadingForEmbedEnabled] = true;
|
|
20022
|
-
|
|
20190
|
+
if (isValidCssMargin(this.viewConfig.lazyLoadingMargin)) {
|
|
20191
|
+
params[Param.RootMarginForLazyLoad] = this.viewConfig.lazyLoadingMargin;
|
|
20192
|
+
}
|
|
20023
20193
|
}
|
|
20024
20194
|
}
|
|
20025
20195
|
if (tag) {
|
|
@@ -20064,6 +20234,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
20064
20234
|
if (isCentralizedLiveboardFilterUXEnabled != undefined) {
|
|
20065
20235
|
params[Param.isCentralizedLiveboardFilterUXEnabled] = isCentralizedLiveboardFilterUXEnabled;
|
|
20066
20236
|
}
|
|
20237
|
+
this.defaultHeight = minimumHeight || this.defaultHeight;
|
|
20067
20238
|
params[Param.DataPanelV2Enabled] = dataPanelV2;
|
|
20068
20239
|
params[Param.HideHomepageLeftNav] = hideHomepageLeftNav;
|
|
20069
20240
|
params[Param.ModularHomeExperienceEnabled] = modularHomeExperience;
|
|
@@ -20418,19 +20589,19 @@ query GetEurekaVizSnapshots(
|
|
|
20418
20589
|
getEmbedParamsObject() {
|
|
20419
20590
|
let params = {};
|
|
20420
20591
|
params = this.getBaseQueryParams(params);
|
|
20421
|
-
const { enableVizTransformations, fullHeight, defaultHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, isEnhancedFilterInteractivityEnabled = false, enableAskSage, enable2ColumnLayout, dataPanelV2 = true, enableCustomColumnGroups = false, oAuthPollingInterval, isForceRedirect, dataSourceId, coverAndFilterOptionInPDF = false, liveboardXLSXCSVDownload, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, showSpotterLimitations, isCentralizedLiveboardFilterUXEnabled = false, isLinkParametersEnabled, updatedSpotterChatPrompt, } = this.viewConfig;
|
|
20592
|
+
const { enableVizTransformations, fullHeight, defaultHeight, minimumHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, showMaskedFilterChip = false, isLiveboardMasterpiecesEnabled = false, isEnhancedFilterInteractivityEnabled = false, enableAskSage, enable2ColumnLayout, dataPanelV2 = true, enableCustomColumnGroups = false, oAuthPollingInterval, isForceRedirect, dataSourceId, coverAndFilterOptionInPDF = false, liveboardXLSXCSVDownload, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, showSpotterLimitations, isCentralizedLiveboardFilterUXEnabled = false, isLinkParametersEnabled, updatedSpotterChatPrompt, } = this.viewConfig;
|
|
20422
20593
|
const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
|
|
20423
20594
|
|| this.viewConfig.preventPinboardFilterRemoval;
|
|
20424
20595
|
if (fullHeight === true) {
|
|
20425
20596
|
params[Param.fullHeight] = true;
|
|
20426
20597
|
if (this.viewConfig.lazyLoadingForFullHeight) {
|
|
20427
20598
|
params[Param.IsLazyLoadingForEmbedEnabled] = true;
|
|
20428
|
-
|
|
20599
|
+
if (isValidCssMargin(this.viewConfig.lazyLoadingMargin)) {
|
|
20600
|
+
params[Param.RootMarginForLazyLoad] = this.viewConfig.lazyLoadingMargin;
|
|
20601
|
+
}
|
|
20429
20602
|
}
|
|
20430
20603
|
}
|
|
20431
|
-
|
|
20432
|
-
this.defaultHeight = defaultHeight;
|
|
20433
|
-
}
|
|
20604
|
+
this.defaultHeight = minimumHeight || defaultHeight || this.defaultHeight;
|
|
20434
20605
|
if (enableVizTransformations !== undefined) {
|
|
20435
20606
|
params[Param.EnableVizTransformations] = enableVizTransformations.toString();
|
|
20436
20607
|
}
|
|
@@ -20497,6 +20668,8 @@ query GetEurekaVizSnapshots(
|
|
|
20497
20668
|
params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;
|
|
20498
20669
|
params[Param.ShowLiveboardReverifyBanner] = showLiveboardReverifyBanner;
|
|
20499
20670
|
params[Param.HideIrrelevantFiltersInTab] = hideIrrelevantChipsInLiveboardTabs;
|
|
20671
|
+
params[Param.ShowMaskedFilterChip] = showMaskedFilterChip;
|
|
20672
|
+
params[Param.IsLiveboardMasterpiecesEnabled] = isLiveboardMasterpiecesEnabled;
|
|
20500
20673
|
params[Param.IsEnhancedFilterInteractivityEnabled] = isEnhancedFilterInteractivityEnabled;
|
|
20501
20674
|
params[Param.DataPanelV2Enabled] = dataPanelV2;
|
|
20502
20675
|
params[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
|
|
@@ -20528,7 +20701,12 @@ query GetEurekaVizSnapshots(
|
|
|
20528
20701
|
const { vizId, activeTabId } = this.viewConfig;
|
|
20529
20702
|
const liveboardId = (_a = this.viewConfig.liveboardId) !== null && _a !== void 0 ? _a : this.viewConfig.pinboardId;
|
|
20530
20703
|
if (!liveboardId) {
|
|
20531
|
-
this.handleError(
|
|
20704
|
+
this.handleError({
|
|
20705
|
+
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
20706
|
+
message: ERROR_MESSAGE.LIVEBOARD_VIZ_ID_VALIDATION,
|
|
20707
|
+
code: EmbedErrorCodes.LIVEBOARD_ID_MISSING,
|
|
20708
|
+
error: ERROR_MESSAGE.LIVEBOARD_VIZ_ID_VALIDATION,
|
|
20709
|
+
});
|
|
20532
20710
|
}
|
|
20533
20711
|
return `${this.getRootIframeSrc()}${this.getIframeSuffixSrc(liveboardId, vizId, activeTabId)}`;
|
|
20534
20712
|
}
|
|
@@ -21232,7 +21410,12 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
21232
21410
|
getEmbedParamsObject() {
|
|
21233
21411
|
const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, enablePastConversationsSidebar, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, updatedSpotterChatPrompt, } = this.viewConfig;
|
|
21234
21412
|
if (!worksheetId) {
|
|
21235
|
-
this.handleError(
|
|
21413
|
+
this.handleError({
|
|
21414
|
+
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
21415
|
+
message: ERROR_MESSAGE.SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND,
|
|
21416
|
+
code: EmbedErrorCodes.WORKSHEET_ID_NOT_FOUND,
|
|
21417
|
+
error: ERROR_MESSAGE.SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND,
|
|
21418
|
+
});
|
|
21236
21419
|
}
|
|
21237
21420
|
const queryParams = this.getBaseQueryParams();
|
|
21238
21421
|
queryParams[Param.SpotterEnabled] = true;
|