@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.es.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
|
import * as React from 'react';
|
|
4
4
|
import React__default, { useRef, useCallback } from 'react';
|
|
@@ -764,6 +764,7 @@ var EmbedEvent;
|
|
|
764
764
|
* SearchEmbed.on(EmbedEvent.Error, (error) => {
|
|
765
765
|
* console.log(error);
|
|
766
766
|
* // { type: "Error", data: { errorType: "API", error: { message: '...', error: '...' } } }
|
|
767
|
+
* // { errorType: "API", message: '...', code: '...' } new format
|
|
767
768
|
* });
|
|
768
769
|
* ```
|
|
769
770
|
* @example
|
|
@@ -775,6 +776,7 @@ var EmbedEvent;
|
|
|
775
776
|
* // message: "Fullscreen API is not enabled",
|
|
776
777
|
* // stack: "..."
|
|
777
778
|
* // } }}
|
|
779
|
+
* // { errorType: "FULLSCREEN", message: "Fullscreen API is not enabled", code: '...' } new format
|
|
778
780
|
* })
|
|
779
781
|
* ```
|
|
780
782
|
*/
|
|
@@ -930,7 +932,8 @@ var EmbedEvent;
|
|
|
930
932
|
*/
|
|
931
933
|
EmbedEvent["ALL"] = "*";
|
|
932
934
|
/**
|
|
933
|
-
* Emitted when an Answer is saved in the app
|
|
935
|
+
* Emitted when an Answer is saved in the app.
|
|
936
|
+
* Use start:true to subscribe to when save is initiated, or end:true to subscribe to when save is completed. Default is end:true.
|
|
934
937
|
* @Version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
935
938
|
* @example
|
|
936
939
|
*```js
|
|
@@ -965,6 +968,7 @@ var EmbedEvent;
|
|
|
965
968
|
EmbedEvent["Download"] = "download";
|
|
966
969
|
/**
|
|
967
970
|
* Emitted when the download action is triggered on an Answer.
|
|
971
|
+
* Use start:true to subscribe to when download is initiated, or end:true to subscribe to when download is completed. Default is end:true.
|
|
968
972
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.0.sw
|
|
969
973
|
* @example
|
|
970
974
|
*```js
|
|
@@ -979,6 +983,7 @@ var EmbedEvent;
|
|
|
979
983
|
EmbedEvent["DownloadAsPng"] = "downloadAsPng";
|
|
980
984
|
/**
|
|
981
985
|
* Emitted when the Download as PDF action is triggered on an Answer
|
|
986
|
+
* 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.
|
|
982
987
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
983
988
|
* @example
|
|
984
989
|
*```js
|
|
@@ -993,6 +998,7 @@ var EmbedEvent;
|
|
|
993
998
|
EmbedEvent["DownloadAsPdf"] = "downloadAsPdf";
|
|
994
999
|
/**
|
|
995
1000
|
* Emitted when the Download as CSV action is triggered on an Answer.
|
|
1001
|
+
* 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.
|
|
996
1002
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
997
1003
|
* @example
|
|
998
1004
|
*```js
|
|
@@ -1007,6 +1013,7 @@ var EmbedEvent;
|
|
|
1007
1013
|
EmbedEvent["DownloadAsCsv"] = "downloadAsCsv";
|
|
1008
1014
|
/**
|
|
1009
1015
|
* Emitted when the Download as XLSX action is triggered on an Answer.
|
|
1016
|
+
* 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.
|
|
1010
1017
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1011
1018
|
* @example
|
|
1012
1019
|
*```js
|
|
@@ -1021,6 +1028,7 @@ var EmbedEvent;
|
|
|
1021
1028
|
EmbedEvent["DownloadAsXlsx"] = "downloadAsXlsx";
|
|
1022
1029
|
/**
|
|
1023
1030
|
* Emitted when an Answer is deleted in the app
|
|
1031
|
+
* Use start:true to subscribe to when delete is initiated, or end:true to subscribe to when delete is completed. Default is end:true.
|
|
1024
1032
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1025
1033
|
* @example
|
|
1026
1034
|
*```js
|
|
@@ -1047,6 +1055,7 @@ var EmbedEvent;
|
|
|
1047
1055
|
/**
|
|
1048
1056
|
* Emitted when a user initiates the Pin action to
|
|
1049
1057
|
* add an Answer to a Liveboard.
|
|
1058
|
+
* Use start:true to subscribe to when pin is initiated, or end:true to subscribe to when pin is completed. Default is end:true.
|
|
1050
1059
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1051
1060
|
* @example
|
|
1052
1061
|
*```js
|
|
@@ -1160,6 +1169,7 @@ var EmbedEvent;
|
|
|
1160
1169
|
/**
|
|
1161
1170
|
* Emitted when the **Export TML** action is triggered on an
|
|
1162
1171
|
* an embedded object in the app
|
|
1172
|
+
* Use start:true to subscribe to when export is initiated, or end:true to subscribe to when export is completed. Default is end:true.
|
|
1163
1173
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1164
1174
|
* @example
|
|
1165
1175
|
*```js
|
|
@@ -1185,6 +1195,7 @@ var EmbedEvent;
|
|
|
1185
1195
|
EmbedEvent["SaveAsView"] = "saveAsView";
|
|
1186
1196
|
/**
|
|
1187
1197
|
* Emitted when the user creates a copy of an Answer.
|
|
1198
|
+
* 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.
|
|
1188
1199
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1189
1200
|
* @example
|
|
1190
1201
|
*```js
|
|
@@ -3256,6 +3267,8 @@ var Param;
|
|
|
3256
3267
|
Param["HideLiveboardHeader"] = "hideLiveboardHeader";
|
|
3257
3268
|
Param["ShowLiveboardDescription"] = "showLiveboardDescription";
|
|
3258
3269
|
Param["ShowLiveboardTitle"] = "showLiveboardTitle";
|
|
3270
|
+
Param["ShowMaskedFilterChip"] = "showMaskedFilterChip";
|
|
3271
|
+
Param["IsLiveboardMasterpiecesEnabled"] = "isLiveboardMasterpiecesEnabled";
|
|
3259
3272
|
Param["HiddenTabs"] = "hideTabs";
|
|
3260
3273
|
Param["VisibleTabs"] = "visibleTabs";
|
|
3261
3274
|
Param["HideTabPanel"] = "hideTabPanel";
|
|
@@ -4789,6 +4802,85 @@ var LogLevel;
|
|
|
4789
4802
|
*/
|
|
4790
4803
|
LogLevel["TRACE"] = "TRACE";
|
|
4791
4804
|
})(LogLevel || (LogLevel = {}));
|
|
4805
|
+
/**
|
|
4806
|
+
* Error types emitted by embedded components.
|
|
4807
|
+
*
|
|
4808
|
+
* These enum values categorize different types of errors that can occur during
|
|
4809
|
+
* the lifecycle of an embedded ThoughtSpot component. Use these values to implement
|
|
4810
|
+
* specific error handling logic based on the error category.
|
|
4811
|
+
*
|
|
4812
|
+
* @see {@link EmbedErrorDetailsEvent} - The error event object structure
|
|
4813
|
+
* @see {@link EmbedEvent.Error} - The event that emits these errors
|
|
4814
|
+
* @version SDK: 1.44.2 | ThoughtSpot: 26.2.0.cl
|
|
4815
|
+
* @group Error Handling
|
|
4816
|
+
*/
|
|
4817
|
+
var ErrorDetailsTypes;
|
|
4818
|
+
(function (ErrorDetailsTypes) {
|
|
4819
|
+
/** API call failure */
|
|
4820
|
+
ErrorDetailsTypes["API"] = "API";
|
|
4821
|
+
/** General validation error */
|
|
4822
|
+
ErrorDetailsTypes["VALIDATION_ERROR"] = "VALIDATION_ERROR";
|
|
4823
|
+
/** Network connectivity or request error */
|
|
4824
|
+
ErrorDetailsTypes["NETWORK"] = "NETWORK";
|
|
4825
|
+
})(ErrorDetailsTypes || (ErrorDetailsTypes = {}));
|
|
4826
|
+
/**
|
|
4827
|
+
* Specific error codes for embedded component errors.
|
|
4828
|
+
*
|
|
4829
|
+
* These codes provide granular identification of errors that occur in embedded components.
|
|
4830
|
+
* They are returned in the {@link EmbedErrorDetailsEvent.code} property and allow for
|
|
4831
|
+
* precise error handling and debugging.
|
|
4832
|
+
*
|
|
4833
|
+
* The codes are organized into categories:
|
|
4834
|
+
* - **Worksheet ID not found or does not exist**: Errors related to applying or updating filters
|
|
4835
|
+
* - **Liveboard ID missing**: Errors related to missing liveboard ID
|
|
4836
|
+
* - **Conflicting actions configuration**: Errors related to conflicting actions configuration
|
|
4837
|
+
* - **Conflicting tabs configuration**: Errors related to conflicting tabs configuration
|
|
4838
|
+
* - **Initialization error**: Errors related to initialization error
|
|
4839
|
+
* - **Network error**: Errors related to network error
|
|
4840
|
+
* - **Custom action validation**: Errors related to custom action validation
|
|
4841
|
+
* - **Login failed**: Errors related to login failed
|
|
4842
|
+
* - **Render not called**: Errors related to render not called
|
|
4843
|
+
* - **Host event type undefined or invalid**: Errors related to host event type undefined or invalid
|
|
4844
|
+
*
|
|
4845
|
+
* @version SDK: 1.44.2 | ThoughtSpot: 26.2.0.cl
|
|
4846
|
+
* @group Error Handling
|
|
4847
|
+
* @see {@link EmbedErrorDetailsEvent} - The error event object that includes these codes
|
|
4848
|
+
* @see {@link ErrorDetailsTypes} - General error type categories
|
|
4849
|
+
*
|
|
4850
|
+
* @example
|
|
4851
|
+
* Handle specific error codes
|
|
4852
|
+
*
|
|
4853
|
+
* embed.on(EmbedEvent.Error, (error) => {
|
|
4854
|
+
* if (error.code === EmbedErrorCodes.WORKSHEET_ID_NOT_FOUND) {
|
|
4855
|
+
* console.error('Worksheet ID not found:', error.message);
|
|
4856
|
+
* }
|
|
4857
|
+
* });
|
|
4858
|
+
* */
|
|
4859
|
+
var EmbedErrorCodes;
|
|
4860
|
+
(function (EmbedErrorCodes) {
|
|
4861
|
+
/** Worksheet ID not found or does not exist */
|
|
4862
|
+
EmbedErrorCodes["WORKSHEET_ID_NOT_FOUND"] = "WORKSHEET_ID_NOT_FOUND";
|
|
4863
|
+
/** Required Liveboard ID is missing from configuration */
|
|
4864
|
+
EmbedErrorCodes["LIVEBOARD_ID_MISSING"] = "LIVEBOARD_ID_MISSING";
|
|
4865
|
+
/** Conflicting action configuration detected (e.g., both hiddenActions and visibleActions specified) */
|
|
4866
|
+
EmbedErrorCodes["CONFLICTING_ACTIONS_CONFIG"] = "CONFLICTING_ACTIONS_CONFIG";
|
|
4867
|
+
/** Conflicting tab configuration detected (e.g., both hiddenTabs and visibleTabs specified) */
|
|
4868
|
+
EmbedErrorCodes["CONFLICTING_TABS_CONFIG"] = "CONFLICTING_TABS_CONFIG";
|
|
4869
|
+
/** Error during component initialization */
|
|
4870
|
+
EmbedErrorCodes["INIT_ERROR"] = "INIT_ERROR";
|
|
4871
|
+
/** Network connectivity or request error */
|
|
4872
|
+
EmbedErrorCodes["NETWORK_ERROR"] = "NETWORK_ERROR";
|
|
4873
|
+
/** Custom action validation failed */
|
|
4874
|
+
EmbedErrorCodes["CUSTOM_ACTION_VALIDATION"] = "CUSTOM_ACTION_VALIDATION";
|
|
4875
|
+
/** Authentication/login failed */
|
|
4876
|
+
EmbedErrorCodes["LOGIN_FAILED"] = "LOGIN_FAILED";
|
|
4877
|
+
/** Render method was not called before attempting to use the component */
|
|
4878
|
+
EmbedErrorCodes["RENDER_NOT_CALLED"] = "RENDER_NOT_CALLED";
|
|
4879
|
+
/** Host event type is undefined or invalid */
|
|
4880
|
+
EmbedErrorCodes["HOST_EVENT_TYPE_UNDEFINED"] = "HOST_EVENT_TYPE_UNDEFINED";
|
|
4881
|
+
/** Error parsing api intercept body */
|
|
4882
|
+
EmbedErrorCodes["PARSING_API_INTERCEPT_BODY_ERROR"] = "PARSING_API_INTERCEPT_BODY_ERROR";
|
|
4883
|
+
})(EmbedErrorCodes || (EmbedErrorCodes = {}));
|
|
4792
4884
|
/**
|
|
4793
4885
|
* Enum for the type of API intercepted
|
|
4794
4886
|
*/
|
|
@@ -4978,6 +5070,36 @@ const getCssDimension = (value) => {
|
|
|
4978
5070
|
}
|
|
4979
5071
|
return value;
|
|
4980
5072
|
};
|
|
5073
|
+
/**
|
|
5074
|
+
* Validates if a string is a valid CSS margin value.
|
|
5075
|
+
* @param value - The string to validate
|
|
5076
|
+
* @returns true if the value is a valid CSS margin value, false otherwise
|
|
5077
|
+
*/
|
|
5078
|
+
const isValidCssMargin = (value) => {
|
|
5079
|
+
if (isUndefined$1(value)) {
|
|
5080
|
+
return false;
|
|
5081
|
+
}
|
|
5082
|
+
if (typeof value !== 'string') {
|
|
5083
|
+
logger$3.error('Please provide a valid lazyLoadingMargin value (e.g., "10px")');
|
|
5084
|
+
return false;
|
|
5085
|
+
}
|
|
5086
|
+
// This pattern allows for an optional negative sign, and numbers that can be integers or decimals (including leading dot).
|
|
5087
|
+
const cssUnitPattern = /^-?(\d+(\.\d*)?|\.\d+)(px|em|rem|%|vh|vw)$/i;
|
|
5088
|
+
const parts = value.trim().split(/\s+/);
|
|
5089
|
+
if (parts.length > 4) {
|
|
5090
|
+
logger$3.error('Please provide a valid lazyLoadingMargin value (e.g., "10px")');
|
|
5091
|
+
return false;
|
|
5092
|
+
}
|
|
5093
|
+
const isValid = parts.every(part => {
|
|
5094
|
+
const trimmedPart = part.trim();
|
|
5095
|
+
return trimmedPart.toLowerCase() === 'auto' || trimmedPart === '0' || cssUnitPattern.test(trimmedPart);
|
|
5096
|
+
});
|
|
5097
|
+
if (!isValid) {
|
|
5098
|
+
logger$3.error('Please provide a valid lazyLoadingMargin value (e.g., "10px")');
|
|
5099
|
+
return false;
|
|
5100
|
+
}
|
|
5101
|
+
return true;
|
|
5102
|
+
};
|
|
4981
5103
|
const getSSOMarker = (markerId) => {
|
|
4982
5104
|
const encStringToAppend = encodeURIComponent(markerId);
|
|
4983
5105
|
return `tsSSOMarker=${encStringToAppend}`;
|
|
@@ -7602,6 +7724,13 @@ const ERROR_MESSAGE = {
|
|
|
7602
7724
|
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',
|
|
7603
7725
|
SPOTTER_AGENT_NOT_INITIALIZED: 'SpotterAgent not initialized',
|
|
7604
7726
|
OFFLINE_WARNING: 'Network not Detected. Embed is offline. Please reconnect and refresh',
|
|
7727
|
+
INIT_SDK_REQUIRED: 'You need to init the ThoughtSpot SDK module first',
|
|
7728
|
+
CONFLICTING_ACTIONS_CONFIG: 'You cannot have both hidden actions and visible actions',
|
|
7729
|
+
CONFLICTING_TABS_CONFIG: 'You cannot have both hidden Tabs and visible Tabs',
|
|
7730
|
+
RENDER_BEFORE_EVENTS_REQUIRED: 'Please call render before triggering events',
|
|
7731
|
+
HOST_EVENT_TYPE_UNDEFINED: 'Host event type is undefined',
|
|
7732
|
+
LOGIN_FAILED: 'Login failed',
|
|
7733
|
+
ERROR_PARSING_API_INTERCEPT_BODY: 'Error parsing api intercept body',
|
|
7605
7734
|
};
|
|
7606
7735
|
const CUSTOM_ACTIONS_ERROR_MESSAGE = {
|
|
7607
7736
|
INVALID_ACTION_OBJECT: 'Custom Action Validation Error: Invalid action object provided',
|
|
@@ -8511,7 +8640,7 @@ class AnswerService {
|
|
|
8511
8640
|
async getTML() {
|
|
8512
8641
|
const { object } = await this.executeQuery(getAnswerTML, {});
|
|
8513
8642
|
const edoc = object[0].edoc;
|
|
8514
|
-
const YAML = await import('./index-
|
|
8643
|
+
const YAML = await import('./index-CSFjfTVk.js');
|
|
8515
8644
|
const parsedDoc = YAML.parse(edoc);
|
|
8516
8645
|
return {
|
|
8517
8646
|
answer: {
|
|
@@ -17764,7 +17893,7 @@ function processEventData(type, eventData, thoughtSpotHost, containerEl) {
|
|
|
17764
17893
|
return eventData;
|
|
17765
17894
|
}
|
|
17766
17895
|
|
|
17767
|
-
var name="@thoughtspot/visual-embed-sdk";var version$1="1.44.
|
|
17896
|
+
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={".":{"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,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};
|
|
17768
17897
|
|
|
17769
17898
|
class HostEventClient {
|
|
17770
17899
|
constructor(iFrame) {
|
|
@@ -17962,9 +18091,13 @@ const handleInterceptEvent = async (params) => {
|
|
|
17962
18091
|
const { eventData, executeEvent, viewConfig, getUnsavedAnswerTml } = params;
|
|
17963
18092
|
const [interceptData, bodyParseError] = parseInterceptData(eventData.data);
|
|
17964
18093
|
if (bodyParseError) {
|
|
17965
|
-
|
|
17966
|
-
|
|
17967
|
-
|
|
18094
|
+
const errorDetails = {
|
|
18095
|
+
errorType: ErrorDetailsTypes.API,
|
|
18096
|
+
message: ERROR_MESSAGE.ERROR_PARSING_API_INTERCEPT_BODY,
|
|
18097
|
+
code: EmbedErrorCodes.PARSING_API_INTERCEPT_BODY_ERROR,
|
|
18098
|
+
error: ERROR_MESSAGE.ERROR_PARSING_API_INTERCEPT_BODY,
|
|
18099
|
+
};
|
|
18100
|
+
executeEvent(EmbedEvent.Error, errorDetails);
|
|
17968
18101
|
logger$3.error('Error parsing request body', bodyParseError);
|
|
17969
18102
|
return;
|
|
17970
18103
|
}
|
|
@@ -18276,19 +18409,23 @@ class TsEmbed {
|
|
|
18276
18409
|
* Throws error encountered during initialization.
|
|
18277
18410
|
*/
|
|
18278
18411
|
throwInitError() {
|
|
18279
|
-
this.handleError(
|
|
18412
|
+
this.handleError({
|
|
18413
|
+
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
18414
|
+
message: ERROR_MESSAGE.INIT_SDK_REQUIRED,
|
|
18415
|
+
code: EmbedErrorCodes.INIT_ERROR,
|
|
18416
|
+
error: ERROR_MESSAGE.INIT_SDK_REQUIRED,
|
|
18417
|
+
});
|
|
18280
18418
|
}
|
|
18281
18419
|
/**
|
|
18282
18420
|
* Handles errors within the SDK
|
|
18283
18421
|
* @param error The error message or object
|
|
18422
|
+
* @param errorDetails The error details
|
|
18284
18423
|
*/
|
|
18285
|
-
handleError(
|
|
18424
|
+
handleError(errorDetails) {
|
|
18286
18425
|
this.isError = true;
|
|
18287
|
-
this.executeCallbacks(EmbedEvent.Error,
|
|
18288
|
-
error,
|
|
18289
|
-
});
|
|
18426
|
+
this.executeCallbacks(EmbedEvent.Error, errorDetails);
|
|
18290
18427
|
// Log error
|
|
18291
|
-
logger$3.error(
|
|
18428
|
+
logger$3.error(errorDetails);
|
|
18292
18429
|
}
|
|
18293
18430
|
/**
|
|
18294
18431
|
* Extracts the type field from the event payload
|
|
@@ -18367,11 +18504,14 @@ class TsEmbed {
|
|
|
18367
18504
|
};
|
|
18368
18505
|
window.addEventListener('online', onlineEventListener);
|
|
18369
18506
|
const offlineEventListener = (e) => {
|
|
18370
|
-
const
|
|
18371
|
-
|
|
18372
|
-
|
|
18373
|
-
|
|
18374
|
-
|
|
18507
|
+
const errorDetails = {
|
|
18508
|
+
errorType: ErrorDetailsTypes.NETWORK,
|
|
18509
|
+
message: ERROR_MESSAGE.OFFLINE_WARNING,
|
|
18510
|
+
code: EmbedErrorCodes.NETWORK_ERROR,
|
|
18511
|
+
offlineWarning: ERROR_MESSAGE.OFFLINE_WARNING,
|
|
18512
|
+
};
|
|
18513
|
+
this.executeCallbacks(EmbedEvent.Error, errorDetails);
|
|
18514
|
+
logger$3.warn(errorDetails);
|
|
18375
18515
|
};
|
|
18376
18516
|
window.addEventListener('offline', offlineEventListener);
|
|
18377
18517
|
this.subscribedListeners.online = onlineEventListener;
|
|
@@ -18451,8 +18591,10 @@ class TsEmbed {
|
|
|
18451
18591
|
]);
|
|
18452
18592
|
if (customActionsResult.errors.length > 0) {
|
|
18453
18593
|
this.handleError({
|
|
18454
|
-
|
|
18594
|
+
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
18455
18595
|
message: customActionsResult.errors,
|
|
18596
|
+
code: EmbedErrorCodes.CUSTOM_ACTION_VALIDATION,
|
|
18597
|
+
error: { type: EmbedErrorCodes.CUSTOM_ACTION_VALIDATION, message: customActionsResult.errors }
|
|
18456
18598
|
});
|
|
18457
18599
|
}
|
|
18458
18600
|
const baseInitData = {
|
|
@@ -18549,11 +18691,21 @@ class TsEmbed {
|
|
|
18549
18691
|
...additionalFlagsFromView,
|
|
18550
18692
|
};
|
|
18551
18693
|
if (Array.isArray(visibleActions) && Array.isArray(hiddenActions)) {
|
|
18552
|
-
this.handleError(
|
|
18694
|
+
this.handleError({
|
|
18695
|
+
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
18696
|
+
message: ERROR_MESSAGE.CONFLICTING_ACTIONS_CONFIG,
|
|
18697
|
+
code: EmbedErrorCodes.CONFLICTING_ACTIONS_CONFIG,
|
|
18698
|
+
error: ERROR_MESSAGE.CONFLICTING_ACTIONS_CONFIG,
|
|
18699
|
+
});
|
|
18553
18700
|
return queryParams;
|
|
18554
18701
|
}
|
|
18555
18702
|
if (Array.isArray(visibleTabs) && Array.isArray(hiddenTabs)) {
|
|
18556
|
-
this.handleError(
|
|
18703
|
+
this.handleError({
|
|
18704
|
+
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
18705
|
+
message: ERROR_MESSAGE.CONFLICTING_TABS_CONFIG,
|
|
18706
|
+
code: EmbedErrorCodes.CONFLICTING_TABS_CONFIG,
|
|
18707
|
+
error: ERROR_MESSAGE.CONFLICTING_TABS_CONFIG,
|
|
18708
|
+
});
|
|
18557
18709
|
return queryParams;
|
|
18558
18710
|
}
|
|
18559
18711
|
if (primaryAction) {
|
|
@@ -18778,7 +18930,12 @@ class TsEmbed {
|
|
|
18778
18930
|
error: JSON.stringify(error),
|
|
18779
18931
|
});
|
|
18780
18932
|
this.handleInsertionIntoDOM(this.embedConfig.loginFailedMessage);
|
|
18781
|
-
this.handleError(
|
|
18933
|
+
this.handleError({
|
|
18934
|
+
errorType: ErrorDetailsTypes.API,
|
|
18935
|
+
message: error.message || ERROR_MESSAGE.LOGIN_FAILED,
|
|
18936
|
+
code: EmbedErrorCodes.LOGIN_FAILED,
|
|
18937
|
+
error: error,
|
|
18938
|
+
});
|
|
18782
18939
|
});
|
|
18783
18940
|
});
|
|
18784
18941
|
}
|
|
@@ -19083,11 +19240,21 @@ class TsEmbed {
|
|
|
19083
19240
|
async trigger(messageType, data = {}) {
|
|
19084
19241
|
uploadMixpanelEvent(`${MIXPANEL_EVENT.VISUAL_SDK_TRIGGER}-${messageType}`);
|
|
19085
19242
|
if (!this.isRendered) {
|
|
19086
|
-
this.handleError(
|
|
19243
|
+
this.handleError({
|
|
19244
|
+
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
19245
|
+
message: ERROR_MESSAGE.RENDER_BEFORE_EVENTS_REQUIRED,
|
|
19246
|
+
code: EmbedErrorCodes.RENDER_NOT_CALLED,
|
|
19247
|
+
error: ERROR_MESSAGE.RENDER_BEFORE_EVENTS_REQUIRED,
|
|
19248
|
+
});
|
|
19087
19249
|
return null;
|
|
19088
19250
|
}
|
|
19089
19251
|
if (!messageType) {
|
|
19090
|
-
this.handleError(
|
|
19252
|
+
this.handleError({
|
|
19253
|
+
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
19254
|
+
message: ERROR_MESSAGE.HOST_EVENT_TYPE_UNDEFINED,
|
|
19255
|
+
code: EmbedErrorCodes.HOST_EVENT_TYPE_UNDEFINED,
|
|
19256
|
+
error: ERROR_MESSAGE.HOST_EVENT_TYPE_UNDEFINED,
|
|
19257
|
+
});
|
|
19091
19258
|
return null;
|
|
19092
19259
|
}
|
|
19093
19260
|
// Check if iframe exists before triggering -
|
|
@@ -19900,7 +20067,7 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
|
|
|
19900
20067
|
constructor(domSelector, viewConfig) {
|
|
19901
20068
|
viewConfig.embedComponentType = 'AppEmbed';
|
|
19902
20069
|
super(domSelector, viewConfig);
|
|
19903
|
-
this.defaultHeight =
|
|
20070
|
+
this.defaultHeight = 500;
|
|
19904
20071
|
this.sendFullHeightLazyLoadData = () => {
|
|
19905
20072
|
const data = calculateVisibleElementData(this.iFrame);
|
|
19906
20073
|
this.trigger(HostEvent.VisibleEmbedCoordinates, data);
|
|
@@ -19922,8 +20089,7 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
|
|
|
19922
20089
|
* @param data The event payload
|
|
19923
20090
|
*/
|
|
19924
20091
|
this.updateIFrameHeight = (data) => {
|
|
19925
|
-
|
|
19926
|
-
this.setIFrameHeight(Math.max(data.data, (_a = this.iFrame) === null || _a === void 0 ? void 0 : _a.scrollHeight));
|
|
20092
|
+
this.setIFrameHeight(Math.max(data.data, this.defaultHeight));
|
|
19927
20093
|
this.sendFullHeightLazyLoadData();
|
|
19928
20094
|
};
|
|
19929
20095
|
this.embedIframeCenter = (data, responder) => {
|
|
@@ -19962,7 +20128,7 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
|
|
|
19962
20128
|
* embedded Liveboard or visualization.
|
|
19963
20129
|
*/
|
|
19964
20130
|
getEmbedParams() {
|
|
19965
|
-
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;
|
|
20131
|
+
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;
|
|
19966
20132
|
let params = {};
|
|
19967
20133
|
params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
|
|
19968
20134
|
params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
|
|
@@ -19971,6 +20137,8 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
|
|
|
19971
20137
|
params[Param.HideLiveboardHeader] = hideLiveboardHeader;
|
|
19972
20138
|
params[Param.ShowLiveboardTitle] = showLiveboardTitle;
|
|
19973
20139
|
params[Param.ShowLiveboardDescription] = !!showLiveboardDescription;
|
|
20140
|
+
params[Param.ShowMaskedFilterChip] = showMaskedFilterChip;
|
|
20141
|
+
params[Param.IsLiveboardMasterpiecesEnabled] = isLiveboardMasterpiecesEnabled;
|
|
19974
20142
|
params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
|
|
19975
20143
|
params[Param.IsFullAppEmbed] = true;
|
|
19976
20144
|
params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
|
|
@@ -19997,7 +20165,9 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
|
|
|
19997
20165
|
params[Param.fullHeight] = true;
|
|
19998
20166
|
if (this.viewConfig.lazyLoadingForFullHeight) {
|
|
19999
20167
|
params[Param.IsLazyLoadingForEmbedEnabled] = true;
|
|
20000
|
-
|
|
20168
|
+
if (isValidCssMargin(this.viewConfig.lazyLoadingMargin)) {
|
|
20169
|
+
params[Param.RootMarginForLazyLoad] = this.viewConfig.lazyLoadingMargin;
|
|
20170
|
+
}
|
|
20001
20171
|
}
|
|
20002
20172
|
}
|
|
20003
20173
|
if (tag) {
|
|
@@ -20042,6 +20212,7 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
|
|
|
20042
20212
|
if (isCentralizedLiveboardFilterUXEnabled != undefined) {
|
|
20043
20213
|
params[Param.isCentralizedLiveboardFilterUXEnabled] = isCentralizedLiveboardFilterUXEnabled;
|
|
20044
20214
|
}
|
|
20215
|
+
this.defaultHeight = minimumHeight || this.defaultHeight;
|
|
20045
20216
|
params[Param.DataPanelV2Enabled] = dataPanelV2;
|
|
20046
20217
|
params[Param.HideHomepageLeftNav] = hideHomepageLeftNav;
|
|
20047
20218
|
params[Param.ModularHomeExperienceEnabled] = modularHomeExperience;
|
|
@@ -20396,19 +20567,19 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
|
|
|
20396
20567
|
getEmbedParamsObject() {
|
|
20397
20568
|
let params = {};
|
|
20398
20569
|
params = this.getBaseQueryParams(params);
|
|
20399
|
-
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;
|
|
20570
|
+
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;
|
|
20400
20571
|
const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
|
|
20401
20572
|
|| this.viewConfig.preventPinboardFilterRemoval;
|
|
20402
20573
|
if (fullHeight === true) {
|
|
20403
20574
|
params[Param.fullHeight] = true;
|
|
20404
20575
|
if (this.viewConfig.lazyLoadingForFullHeight) {
|
|
20405
20576
|
params[Param.IsLazyLoadingForEmbedEnabled] = true;
|
|
20406
|
-
|
|
20577
|
+
if (isValidCssMargin(this.viewConfig.lazyLoadingMargin)) {
|
|
20578
|
+
params[Param.RootMarginForLazyLoad] = this.viewConfig.lazyLoadingMargin;
|
|
20579
|
+
}
|
|
20407
20580
|
}
|
|
20408
20581
|
}
|
|
20409
|
-
|
|
20410
|
-
this.defaultHeight = defaultHeight;
|
|
20411
|
-
}
|
|
20582
|
+
this.defaultHeight = minimumHeight || defaultHeight || this.defaultHeight;
|
|
20412
20583
|
if (enableVizTransformations !== undefined) {
|
|
20413
20584
|
params[Param.EnableVizTransformations] = enableVizTransformations.toString();
|
|
20414
20585
|
}
|
|
@@ -20475,6 +20646,8 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
|
|
|
20475
20646
|
params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;
|
|
20476
20647
|
params[Param.ShowLiveboardReverifyBanner] = showLiveboardReverifyBanner;
|
|
20477
20648
|
params[Param.HideIrrelevantFiltersInTab] = hideIrrelevantChipsInLiveboardTabs;
|
|
20649
|
+
params[Param.ShowMaskedFilterChip] = showMaskedFilterChip;
|
|
20650
|
+
params[Param.IsLiveboardMasterpiecesEnabled] = isLiveboardMasterpiecesEnabled;
|
|
20478
20651
|
params[Param.IsEnhancedFilterInteractivityEnabled] = isEnhancedFilterInteractivityEnabled;
|
|
20479
20652
|
params[Param.DataPanelV2Enabled] = dataPanelV2;
|
|
20480
20653
|
params[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
|
|
@@ -20506,7 +20679,12 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
|
|
|
20506
20679
|
const { vizId, activeTabId } = this.viewConfig;
|
|
20507
20680
|
const liveboardId = (_a = this.viewConfig.liveboardId) !== null && _a !== void 0 ? _a : this.viewConfig.pinboardId;
|
|
20508
20681
|
if (!liveboardId) {
|
|
20509
|
-
this.handleError(
|
|
20682
|
+
this.handleError({
|
|
20683
|
+
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
20684
|
+
message: ERROR_MESSAGE.LIVEBOARD_VIZ_ID_VALIDATION,
|
|
20685
|
+
code: EmbedErrorCodes.LIVEBOARD_ID_MISSING,
|
|
20686
|
+
error: ERROR_MESSAGE.LIVEBOARD_VIZ_ID_VALIDATION,
|
|
20687
|
+
});
|
|
20510
20688
|
}
|
|
20511
20689
|
return `${this.getRootIframeSrc()}${this.getIframeSuffixSrc(liveboardId, vizId, activeTabId)}`;
|
|
20512
20690
|
}
|
|
@@ -21210,7 +21388,12 @@ let SpotterEmbed$1 = class SpotterEmbed extends TsEmbed {
|
|
|
21210
21388
|
getEmbedParamsObject() {
|
|
21211
21389
|
const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, enablePastConversationsSidebar, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, updatedSpotterChatPrompt, } = this.viewConfig;
|
|
21212
21390
|
if (!worksheetId) {
|
|
21213
|
-
this.handleError(
|
|
21391
|
+
this.handleError({
|
|
21392
|
+
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
21393
|
+
message: ERROR_MESSAGE.SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND,
|
|
21394
|
+
code: EmbedErrorCodes.WORKSHEET_ID_NOT_FOUND,
|
|
21395
|
+
error: ERROR_MESSAGE.SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND,
|
|
21396
|
+
});
|
|
21214
21397
|
}
|
|
21215
21398
|
const queryParams = this.getBaseQueryParams();
|
|
21216
21399
|
queryParams[Param.SpotterEnabled] = true;
|