@thoughtspot/visual-embed-sdk 1.43.1 → 1.44.1-test
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/package.json +1 -1
- package/cjs/src/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/embed/app.d.ts +32 -0
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +9 -4
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/app.spec.js +104 -1
- package/cjs/src/embed/app.spec.js.map +1 -1
- package/cjs/src/embed/base.d.ts +7 -0
- package/cjs/src/embed/base.d.ts.map +1 -1
- package/cjs/src/embed/base.js +16 -1
- package/cjs/src/embed/base.js.map +1 -1
- package/cjs/src/embed/base.spec.js +21 -0
- package/cjs/src/embed/base.spec.js.map +1 -1
- package/cjs/src/embed/conversation.d.ts +15 -0
- package/cjs/src/embed/conversation.d.ts.map +1 -1
- package/cjs/src/embed/conversation.js +10 -2
- package/cjs/src/embed/conversation.js.map +1 -1
- package/cjs/src/embed/conversation.spec.js +30 -1
- package/cjs/src/embed/conversation.spec.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts +33 -0
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +13 -5
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/liveboard.spec.js +108 -0
- package/cjs/src/embed/liveboard.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 +93 -5
- 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/index.d.ts +2 -2
- package/cjs/src/index.d.ts.map +1 -1
- package/cjs/src/index.js +2 -1
- package/cjs/src/index.js.map +1 -1
- package/cjs/src/react/all-types-export.d.ts +1 -1
- package/cjs/src/react/all-types-export.d.ts.map +1 -1
- package/cjs/src/react/all-types-export.js +2 -1
- package/cjs/src/react/all-types-export.js.map +1 -1
- package/cjs/src/types.d.ts +250 -7
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +135 -2
- package/cjs/src/types.js.map +1 -1
- package/dist/{index-CpkMygsc.js → index-BXCUJ09L.js} +1 -1
- package/dist/src/api-intercept.d.ts.map +1 -1
- package/dist/src/embed/app.d.ts +32 -0
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/base.d.ts +7 -0
- package/dist/src/embed/base.d.ts.map +1 -1
- package/dist/src/embed/conversation.d.ts +15 -0
- package/dist/src/embed/conversation.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts +33 -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/index.d.ts +2 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/react/all-types-export.d.ts +1 -1
- package/dist/src/react/all-types-export.d.ts.map +1 -1
- package/dist/src/types.d.ts +250 -7
- package/dist/src/types.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +304 -105
- package/dist/tsembed-react.js +303 -104
- package/dist/tsembed.es.js +318 -106
- package/dist/tsembed.js +317 -104
- package/dist/visual-embed-sdk-react-full.d.ts +290 -7
- package/dist/visual-embed-sdk-react.d.ts +283 -7
- package/dist/visual-embed-sdk.d.ts +290 -7
- package/lib/package.json +1 -1
- 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/embed/app.d.ts +32 -0
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +10 -5
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/app.spec.js +104 -1
- package/lib/src/embed/app.spec.js.map +1 -1
- package/lib/src/embed/base.d.ts +7 -0
- package/lib/src/embed/base.d.ts.map +1 -1
- package/lib/src/embed/base.js +14 -0
- package/lib/src/embed/base.js.map +1 -1
- package/lib/src/embed/base.spec.js +21 -0
- package/lib/src/embed/base.spec.js.map +1 -1
- package/lib/src/embed/conversation.d.ts +15 -0
- package/lib/src/embed/conversation.d.ts.map +1 -1
- package/lib/src/embed/conversation.js +11 -3
- package/lib/src/embed/conversation.js.map +1 -1
- package/lib/src/embed/conversation.spec.js +31 -2
- package/lib/src/embed/conversation.spec.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts +33 -0
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +14 -6
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +108 -0
- package/lib/src/embed/liveboard.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 +94 -6
- 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/index.d.ts +2 -2
- package/lib/src/index.d.ts.map +1 -1
- package/lib/src/index.js +2 -2
- package/lib/src/index.js.map +1 -1
- package/lib/src/react/all-types-export.d.ts +1 -1
- package/lib/src/react/all-types-export.d.ts.map +1 -1
- package/lib/src/react/all-types-export.js +1 -1
- package/lib/src/react/all-types-export.js.map +1 -1
- package/lib/src/types.d.ts +250 -7
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +134 -1
- package/lib/src/types.js.map +1 -1
- package/package.json +1 -1
- package/src/api-intercept.spec.ts +23 -10
- package/src/api-intercept.ts +9 -4
- package/src/embed/app.spec.ts +146 -4
- package/src/embed/app.ts +69 -24
- package/src/embed/base.spec.ts +28 -0
- package/src/embed/base.ts +15 -0
- package/src/embed/conversation.spec.ts +39 -2
- package/src/embed/conversation.ts +28 -2
- package/src/embed/liveboard.spec.ts +136 -0
- package/src/embed/liveboard.ts +51 -4
- package/src/embed/ts-embed.spec.ts +107 -15
- package/src/embed/ts-embed.ts +56 -19
- package/src/errors.ts +7 -0
- package/src/index.ts +2 -0
- package/src/react/all-types-export.ts +1 -0
- package/src/types.ts +260 -6
package/dist/tsembed-react.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @thoughtspot/visual-embed-sdk version 1.
|
|
1
|
+
/* @thoughtspot/visual-embed-sdk version 1.44.1-test */
|
|
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";
|
|
@@ -3334,6 +3347,7 @@
|
|
|
3334
3347
|
Param["isCentralizedLiveboardFilterUXEnabled"] = "isCentralizedLiveboardFilterUXEnabled";
|
|
3335
3348
|
Param["isLinkParametersEnabled"] = "isLinkParametersEnabled";
|
|
3336
3349
|
Param["EnablePastConversationsSidebar"] = "enablePastConversationsSidebar";
|
|
3350
|
+
Param["UpdatedSpotterChatPrompt"] = "updatedSpotterChatPrompt";
|
|
3337
3351
|
})(Param || (Param = {}));
|
|
3338
3352
|
/**
|
|
3339
3353
|
* ThoughtSpot application pages include actions and menu commands
|
|
@@ -4648,6 +4662,46 @@
|
|
|
4648
4662
|
* @version SDK: 1.43.0 | ThoughtSpot Cloud: 10.15.0.cl
|
|
4649
4663
|
*/
|
|
4650
4664
|
Action["LiveboardStylePanel"] = "liveboardStylePanel";
|
|
4665
|
+
/**
|
|
4666
|
+
* The **Move to Group** menu action on a Liveboard.
|
|
4667
|
+
* Allows moving a visualization to a different group.
|
|
4668
|
+
* @example
|
|
4669
|
+
* ```js
|
|
4670
|
+
* disabledActions: [Action.MoveToGroup]
|
|
4671
|
+
* ```
|
|
4672
|
+
* @version SDK: 1.44.0 | ThoughtSpot Cloud: 26.2.0.cl
|
|
4673
|
+
*/
|
|
4674
|
+
Action["MoveToGroup"] = "moveToGroup";
|
|
4675
|
+
/**
|
|
4676
|
+
* The **Move out of Group** menu action on a Liveboard.
|
|
4677
|
+
* Allows moving a visualization out of a group.
|
|
4678
|
+
* @example
|
|
4679
|
+
* ```js
|
|
4680
|
+
* disabledActions: [Action.MoveOutOfGroup]
|
|
4681
|
+
* ```
|
|
4682
|
+
* @version SDK: 1.44.0 | ThoughtSpot Cloud: 26.2.0.cl
|
|
4683
|
+
*/
|
|
4684
|
+
Action["MoveOutOfGroup"] = "moveOutOfGroup";
|
|
4685
|
+
/**
|
|
4686
|
+
* The **Create Group** menu action on a Liveboard.
|
|
4687
|
+
* Allows creating a new group.
|
|
4688
|
+
* @example
|
|
4689
|
+
* ```js
|
|
4690
|
+
* disabledActions: [Action.CreateGroup]
|
|
4691
|
+
* ```
|
|
4692
|
+
* @version SDK: 1.44.0 | ThoughtSpot Cloud: 26.2.0.cl
|
|
4693
|
+
*/
|
|
4694
|
+
Action["CreateGroup"] = "createGroup";
|
|
4695
|
+
/**
|
|
4696
|
+
* The **Ungroup Liveboard Group** menu action on a Liveboard.
|
|
4697
|
+
* Allows ungrouping a liveboard group.
|
|
4698
|
+
* @example
|
|
4699
|
+
* ```js
|
|
4700
|
+
* disabledActions: [Action.UngroupLiveboardGroup]
|
|
4701
|
+
* ```
|
|
4702
|
+
* @version SDK: 1.44.0 | ThoughtSpot Cloud: 26.2.0.cl
|
|
4703
|
+
*/
|
|
4704
|
+
Action["UngroupLiveboardGroup"] = "ungroupLiveboardGroup";
|
|
4651
4705
|
})(exports.Action || (exports.Action = {}));
|
|
4652
4706
|
var PrefetchFeatures;
|
|
4653
4707
|
(function (PrefetchFeatures) {
|
|
@@ -4770,6 +4824,85 @@
|
|
|
4770
4824
|
*/
|
|
4771
4825
|
LogLevel["TRACE"] = "TRACE";
|
|
4772
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 = {}));
|
|
4773
4906
|
/**
|
|
4774
4907
|
* Enum for the type of API intercepted
|
|
4775
4908
|
*/
|
|
@@ -7583,6 +7716,13 @@
|
|
|
7583
7716
|
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',
|
|
7584
7717
|
SPOTTER_AGENT_NOT_INITIALIZED: 'SpotterAgent not initialized',
|
|
7585
7718
|
OFFLINE_WARNING: 'Network not Detected. Embed is offline. Please reconnect and refresh',
|
|
7719
|
+
INIT_SDK_REQUIRED: 'You need to init the ThoughtSpot SDK module first',
|
|
7720
|
+
CONFLICTING_ACTIONS_CONFIG: 'You cannot have both hidden actions and visible actions',
|
|
7721
|
+
CONFLICTING_TABS_CONFIG: 'You cannot have both hidden Tabs and visible Tabs',
|
|
7722
|
+
RENDER_BEFORE_EVENTS_REQUIRED: 'Please call render before triggering events',
|
|
7723
|
+
HOST_EVENT_TYPE_UNDEFINED: 'Host event type is undefined',
|
|
7724
|
+
LOGIN_FAILED: 'Login failed',
|
|
7725
|
+
ERROR_PARSING_API_INTERCEPT_BODY: 'Error parsing api intercept body',
|
|
7586
7726
|
};
|
|
7587
7727
|
const CUSTOM_ACTIONS_ERROR_MESSAGE = {
|
|
7588
7728
|
INVALID_ACTION_OBJECT: 'Custom Action Validation Error: Invalid action object provided',
|
|
@@ -17337,6 +17477,76 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
17337
17477
|
};
|
|
17338
17478
|
}
|
|
17339
17479
|
|
|
17480
|
+
/**
|
|
17481
|
+
* Reloads the ThoughtSpot iframe.
|
|
17482
|
+
* @param iFrame
|
|
17483
|
+
*/
|
|
17484
|
+
const reload = (iFrame) => {
|
|
17485
|
+
const src = iFrame.src;
|
|
17486
|
+
iFrame.src = '';
|
|
17487
|
+
setTimeout(() => {
|
|
17488
|
+
iFrame.src = src;
|
|
17489
|
+
}, 100);
|
|
17490
|
+
};
|
|
17491
|
+
/**
|
|
17492
|
+
* Post iframe message.
|
|
17493
|
+
* @param iFrame
|
|
17494
|
+
* @param message
|
|
17495
|
+
* @param message.type
|
|
17496
|
+
* @param message.data
|
|
17497
|
+
* @param thoughtSpotHost
|
|
17498
|
+
* @param channel
|
|
17499
|
+
*/
|
|
17500
|
+
function postIframeMessage(iFrame, message, thoughtSpotHost, channel) {
|
|
17501
|
+
var _a;
|
|
17502
|
+
return (_a = iFrame.contentWindow) === null || _a === void 0 ? void 0 : _a.postMessage(message, thoughtSpotHost, [channel === null || channel === void 0 ? void 0 : channel.port2]);
|
|
17503
|
+
}
|
|
17504
|
+
const TRIGGER_TIMEOUT = 30000;
|
|
17505
|
+
/**
|
|
17506
|
+
*
|
|
17507
|
+
* @param iFrame
|
|
17508
|
+
* @param messageType
|
|
17509
|
+
* @param thoughtSpotHost
|
|
17510
|
+
* @param data
|
|
17511
|
+
*/
|
|
17512
|
+
function processTrigger(iFrame, messageType, thoughtSpotHost, data) {
|
|
17513
|
+
return new Promise((res, rej) => {
|
|
17514
|
+
var _a;
|
|
17515
|
+
if (messageType === exports.HostEvent.Reload) {
|
|
17516
|
+
reload(iFrame);
|
|
17517
|
+
return res(null);
|
|
17518
|
+
}
|
|
17519
|
+
if (messageType === exports.HostEvent.Present) {
|
|
17520
|
+
const embedConfig = getEmbedConfig();
|
|
17521
|
+
const disableFullscreenPresentation = (_a = embedConfig === null || embedConfig === void 0 ? void 0 : embedConfig.disableFullscreenPresentation) !== null && _a !== void 0 ? _a : true;
|
|
17522
|
+
if (!disableFullscreenPresentation) {
|
|
17523
|
+
handlePresentEvent(iFrame);
|
|
17524
|
+
}
|
|
17525
|
+
else {
|
|
17526
|
+
logger$3.warn('Fullscreen presentation mode is disabled. Set disableFullscreenPresentation: false to enable this feature.');
|
|
17527
|
+
}
|
|
17528
|
+
}
|
|
17529
|
+
const channel = new MessageChannel();
|
|
17530
|
+
channel.port1.onmessage = ({ data: responseData }) => {
|
|
17531
|
+
var _a;
|
|
17532
|
+
channel.port1.close();
|
|
17533
|
+
const error = responseData.error || ((_a = responseData === null || responseData === void 0 ? void 0 : responseData.data) === null || _a === void 0 ? void 0 : _a.error);
|
|
17534
|
+
if (error) {
|
|
17535
|
+
rej(error);
|
|
17536
|
+
}
|
|
17537
|
+
else {
|
|
17538
|
+
res(responseData);
|
|
17539
|
+
}
|
|
17540
|
+
};
|
|
17541
|
+
// Close the messageChannel and resolve the promise if timeout.
|
|
17542
|
+
setTimeout(() => {
|
|
17543
|
+
channel.port1.close();
|
|
17544
|
+
res(new Error(ERROR_MESSAGE.TRIGGER_TIMED_OUT));
|
|
17545
|
+
}, TRIGGER_TIMEOUT);
|
|
17546
|
+
return postIframeMessage(iFrame, { type: messageType, data }, thoughtSpotHost, channel);
|
|
17547
|
+
});
|
|
17548
|
+
}
|
|
17549
|
+
|
|
17340
17550
|
/* eslint-disable camelcase */
|
|
17341
17551
|
/* eslint-disable import/no-mutable-exports */
|
|
17342
17552
|
/**
|
|
@@ -17675,77 +17885,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
17675
17885
|
return eventData;
|
|
17676
17886
|
}
|
|
17677
17887
|
|
|
17678
|
-
var name="@thoughtspot/visual-embed-sdk";var version$1="1.
|
|
17679
|
-
|
|
17680
|
-
/**
|
|
17681
|
-
* Reloads the ThoughtSpot iframe.
|
|
17682
|
-
* @param iFrame
|
|
17683
|
-
*/
|
|
17684
|
-
const reload = (iFrame) => {
|
|
17685
|
-
const src = iFrame.src;
|
|
17686
|
-
iFrame.src = '';
|
|
17687
|
-
setTimeout(() => {
|
|
17688
|
-
iFrame.src = src;
|
|
17689
|
-
}, 100);
|
|
17690
|
-
};
|
|
17691
|
-
/**
|
|
17692
|
-
* Post iframe message.
|
|
17693
|
-
* @param iFrame
|
|
17694
|
-
* @param message
|
|
17695
|
-
* @param message.type
|
|
17696
|
-
* @param message.data
|
|
17697
|
-
* @param thoughtSpotHost
|
|
17698
|
-
* @param channel
|
|
17699
|
-
*/
|
|
17700
|
-
function postIframeMessage(iFrame, message, thoughtSpotHost, channel) {
|
|
17701
|
-
var _a;
|
|
17702
|
-
return (_a = iFrame.contentWindow) === null || _a === void 0 ? void 0 : _a.postMessage(message, thoughtSpotHost, [channel === null || channel === void 0 ? void 0 : channel.port2]);
|
|
17703
|
-
}
|
|
17704
|
-
const TRIGGER_TIMEOUT = 30000;
|
|
17705
|
-
/**
|
|
17706
|
-
*
|
|
17707
|
-
* @param iFrame
|
|
17708
|
-
* @param messageType
|
|
17709
|
-
* @param thoughtSpotHost
|
|
17710
|
-
* @param data
|
|
17711
|
-
*/
|
|
17712
|
-
function processTrigger(iFrame, messageType, thoughtSpotHost, data) {
|
|
17713
|
-
return new Promise((res, rej) => {
|
|
17714
|
-
var _a;
|
|
17715
|
-
if (messageType === exports.HostEvent.Reload) {
|
|
17716
|
-
reload(iFrame);
|
|
17717
|
-
return res(null);
|
|
17718
|
-
}
|
|
17719
|
-
if (messageType === exports.HostEvent.Present) {
|
|
17720
|
-
const embedConfig = getEmbedConfig();
|
|
17721
|
-
const disableFullscreenPresentation = (_a = embedConfig === null || embedConfig === void 0 ? void 0 : embedConfig.disableFullscreenPresentation) !== null && _a !== void 0 ? _a : true;
|
|
17722
|
-
if (!disableFullscreenPresentation) {
|
|
17723
|
-
handlePresentEvent(iFrame);
|
|
17724
|
-
}
|
|
17725
|
-
else {
|
|
17726
|
-
logger$3.warn('Fullscreen presentation mode is disabled. Set disableFullscreenPresentation: false to enable this feature.');
|
|
17727
|
-
}
|
|
17728
|
-
}
|
|
17729
|
-
const channel = new MessageChannel();
|
|
17730
|
-
channel.port1.onmessage = ({ data: responseData }) => {
|
|
17731
|
-
var _a;
|
|
17732
|
-
channel.port1.close();
|
|
17733
|
-
const error = responseData.error || ((_a = responseData === null || responseData === void 0 ? void 0 : responseData.data) === null || _a === void 0 ? void 0 : _a.error);
|
|
17734
|
-
if (error) {
|
|
17735
|
-
rej(error);
|
|
17736
|
-
}
|
|
17737
|
-
else {
|
|
17738
|
-
res(responseData);
|
|
17739
|
-
}
|
|
17740
|
-
};
|
|
17741
|
-
// Close the messageChannel and resolve the promise if timeout.
|
|
17742
|
-
setTimeout(() => {
|
|
17743
|
-
channel.port1.close();
|
|
17744
|
-
res(new Error(ERROR_MESSAGE.TRIGGER_TIMED_OUT));
|
|
17745
|
-
}, TRIGGER_TIMEOUT);
|
|
17746
|
-
return postIframeMessage(iFrame, { type: messageType, data }, thoughtSpotHost, channel);
|
|
17747
|
-
});
|
|
17748
|
-
}
|
|
17888
|
+
var name="@thoughtspot/visual-embed-sdk";var version$1="1.44.1-test";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":"^22.2.3","@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":"^26.6.3","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:"^26.6.3","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":"^26.5.5","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","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};
|
|
17749
17889
|
|
|
17750
17890
|
class HostEventClient {
|
|
17751
17891
|
constructor(iFrame) {
|
|
@@ -17943,9 +18083,13 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
17943
18083
|
const { eventData, executeEvent, viewConfig, getUnsavedAnswerTml } = params;
|
|
17944
18084
|
const [interceptData, bodyParseError] = parseInterceptData(eventData.data);
|
|
17945
18085
|
if (bodyParseError) {
|
|
17946
|
-
|
|
17947
|
-
|
|
17948
|
-
|
|
18086
|
+
const errorDetails = {
|
|
18087
|
+
errorType: ErrorDetailsTypes.API,
|
|
18088
|
+
message: ERROR_MESSAGE.ERROR_PARSING_API_INTERCEPT_BODY,
|
|
18089
|
+
code: EmbedErrorCodes.PARSING_API_INTERCEPT_BODY_ERROR,
|
|
18090
|
+
error: ERROR_MESSAGE.ERROR_PARSING_API_INTERCEPT_BODY,
|
|
18091
|
+
};
|
|
18092
|
+
executeEvent(exports.EmbedEvent.Error, errorDetails);
|
|
17949
18093
|
logger$3.error('Error parsing request body', bodyParseError);
|
|
17950
18094
|
return;
|
|
17951
18095
|
}
|
|
@@ -18257,19 +18401,23 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18257
18401
|
* Throws error encountered during initialization.
|
|
18258
18402
|
*/
|
|
18259
18403
|
throwInitError() {
|
|
18260
|
-
this.handleError(
|
|
18404
|
+
this.handleError({
|
|
18405
|
+
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
18406
|
+
message: ERROR_MESSAGE.INIT_SDK_REQUIRED,
|
|
18407
|
+
code: EmbedErrorCodes.INIT_ERROR,
|
|
18408
|
+
error: ERROR_MESSAGE.INIT_SDK_REQUIRED,
|
|
18409
|
+
});
|
|
18261
18410
|
}
|
|
18262
18411
|
/**
|
|
18263
18412
|
* Handles errors within the SDK
|
|
18264
18413
|
* @param error The error message or object
|
|
18414
|
+
* @param errorDetails The error details
|
|
18265
18415
|
*/
|
|
18266
|
-
handleError(
|
|
18416
|
+
handleError(errorDetails) {
|
|
18267
18417
|
this.isError = true;
|
|
18268
|
-
this.executeCallbacks(exports.EmbedEvent.Error,
|
|
18269
|
-
error,
|
|
18270
|
-
});
|
|
18418
|
+
this.executeCallbacks(exports.EmbedEvent.Error, errorDetails);
|
|
18271
18419
|
// Log error
|
|
18272
|
-
logger$3.error(
|
|
18420
|
+
logger$3.error(errorDetails);
|
|
18273
18421
|
}
|
|
18274
18422
|
/**
|
|
18275
18423
|
* Extracts the type field from the event payload
|
|
@@ -18348,11 +18496,14 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18348
18496
|
};
|
|
18349
18497
|
window.addEventListener('online', onlineEventListener);
|
|
18350
18498
|
const offlineEventListener = (e) => {
|
|
18351
|
-
const
|
|
18352
|
-
|
|
18353
|
-
|
|
18354
|
-
|
|
18355
|
-
|
|
18499
|
+
const errorDetails = {
|
|
18500
|
+
errorType: ErrorDetailsTypes.NETWORK,
|
|
18501
|
+
message: ERROR_MESSAGE.OFFLINE_WARNING,
|
|
18502
|
+
code: EmbedErrorCodes.NETWORK_ERROR,
|
|
18503
|
+
offlineWarning: ERROR_MESSAGE.OFFLINE_WARNING,
|
|
18504
|
+
};
|
|
18505
|
+
this.executeCallbacks(exports.EmbedEvent.Error, errorDetails);
|
|
18506
|
+
logger$3.warn(errorDetails);
|
|
18356
18507
|
};
|
|
18357
18508
|
window.addEventListener('offline', offlineEventListener);
|
|
18358
18509
|
this.subscribedListeners.online = onlineEventListener;
|
|
@@ -18432,8 +18583,10 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18432
18583
|
]);
|
|
18433
18584
|
if (customActionsResult.errors.length > 0) {
|
|
18434
18585
|
this.handleError({
|
|
18435
|
-
|
|
18586
|
+
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
18436
18587
|
message: customActionsResult.errors,
|
|
18588
|
+
code: EmbedErrorCodes.CUSTOM_ACTION_VALIDATION,
|
|
18589
|
+
error: { type: EmbedErrorCodes.CUSTOM_ACTION_VALIDATION, message: customActionsResult.errors }
|
|
18437
18590
|
});
|
|
18438
18591
|
}
|
|
18439
18592
|
const baseInitData = {
|
|
@@ -18530,11 +18683,21 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18530
18683
|
...additionalFlagsFromView,
|
|
18531
18684
|
};
|
|
18532
18685
|
if (Array.isArray(visibleActions) && Array.isArray(hiddenActions)) {
|
|
18533
|
-
this.handleError(
|
|
18686
|
+
this.handleError({
|
|
18687
|
+
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
18688
|
+
message: ERROR_MESSAGE.CONFLICTING_ACTIONS_CONFIG,
|
|
18689
|
+
code: EmbedErrorCodes.CONFLICTING_ACTIONS_CONFIG,
|
|
18690
|
+
error: ERROR_MESSAGE.CONFLICTING_ACTIONS_CONFIG,
|
|
18691
|
+
});
|
|
18534
18692
|
return queryParams;
|
|
18535
18693
|
}
|
|
18536
18694
|
if (Array.isArray(visibleTabs) && Array.isArray(hiddenTabs)) {
|
|
18537
|
-
this.handleError(
|
|
18695
|
+
this.handleError({
|
|
18696
|
+
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
18697
|
+
message: ERROR_MESSAGE.CONFLICTING_TABS_CONFIG,
|
|
18698
|
+
code: EmbedErrorCodes.CONFLICTING_TABS_CONFIG,
|
|
18699
|
+
error: ERROR_MESSAGE.CONFLICTING_TABS_CONFIG,
|
|
18700
|
+
});
|
|
18538
18701
|
return queryParams;
|
|
18539
18702
|
}
|
|
18540
18703
|
if (primaryAction) {
|
|
@@ -18759,7 +18922,12 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18759
18922
|
error: JSON.stringify(error),
|
|
18760
18923
|
});
|
|
18761
18924
|
this.handleInsertionIntoDOM(this.embedConfig.loginFailedMessage);
|
|
18762
|
-
this.handleError(
|
|
18925
|
+
this.handleError({
|
|
18926
|
+
errorType: ErrorDetailsTypes.API,
|
|
18927
|
+
message: error.message || ERROR_MESSAGE.LOGIN_FAILED,
|
|
18928
|
+
code: EmbedErrorCodes.LOGIN_FAILED,
|
|
18929
|
+
error: error,
|
|
18930
|
+
});
|
|
18763
18931
|
});
|
|
18764
18932
|
});
|
|
18765
18933
|
}
|
|
@@ -19064,11 +19232,21 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
19064
19232
|
async trigger(messageType, data = {}) {
|
|
19065
19233
|
uploadMixpanelEvent(`${MIXPANEL_EVENT.VISUAL_SDK_TRIGGER}-${messageType}`);
|
|
19066
19234
|
if (!this.isRendered) {
|
|
19067
|
-
this.handleError(
|
|
19235
|
+
this.handleError({
|
|
19236
|
+
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
19237
|
+
message: ERROR_MESSAGE.RENDER_BEFORE_EVENTS_REQUIRED,
|
|
19238
|
+
code: EmbedErrorCodes.RENDER_NOT_CALLED,
|
|
19239
|
+
error: ERROR_MESSAGE.RENDER_BEFORE_EVENTS_REQUIRED,
|
|
19240
|
+
});
|
|
19068
19241
|
return null;
|
|
19069
19242
|
}
|
|
19070
19243
|
if (!messageType) {
|
|
19071
|
-
this.handleError(
|
|
19244
|
+
this.handleError({
|
|
19245
|
+
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
19246
|
+
message: ERROR_MESSAGE.HOST_EVENT_TYPE_UNDEFINED,
|
|
19247
|
+
code: EmbedErrorCodes.HOST_EVENT_TYPE_UNDEFINED,
|
|
19248
|
+
error: ERROR_MESSAGE.HOST_EVENT_TYPE_UNDEFINED,
|
|
19249
|
+
});
|
|
19072
19250
|
return null;
|
|
19073
19251
|
}
|
|
19074
19252
|
// Check if iframe exists before triggering -
|
|
@@ -19881,7 +20059,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
19881
20059
|
constructor(domSelector, viewConfig) {
|
|
19882
20060
|
viewConfig.embedComponentType = 'AppEmbed';
|
|
19883
20061
|
super(domSelector, viewConfig);
|
|
19884
|
-
this.defaultHeight =
|
|
20062
|
+
this.defaultHeight = 500;
|
|
19885
20063
|
this.sendFullHeightLazyLoadData = () => {
|
|
19886
20064
|
const data = calculateVisibleElementData(this.iFrame);
|
|
19887
20065
|
this.trigger(exports.HostEvent.VisibleEmbedCoordinates, data);
|
|
@@ -19903,8 +20081,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
19903
20081
|
* @param data The event payload
|
|
19904
20082
|
*/
|
|
19905
20083
|
this.updateIFrameHeight = (data) => {
|
|
19906
|
-
|
|
19907
|
-
this.setIFrameHeight(Math.max(data.data, (_a = this.iFrame) === null || _a === void 0 ? void 0 : _a.scrollHeight));
|
|
20084
|
+
this.setIFrameHeight(Math.max(data.data, this.defaultHeight));
|
|
19908
20085
|
this.sendFullHeightLazyLoadData();
|
|
19909
20086
|
};
|
|
19910
20087
|
this.embedIframeCenter = (data, responder) => {
|
|
@@ -19943,7 +20120,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
19943
20120
|
* embedded Liveboard or visualization.
|
|
19944
20121
|
*/
|
|
19945
20122
|
getEmbedParams() {
|
|
19946
|
-
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, } = this.viewConfig;
|
|
20123
|
+
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;
|
|
19947
20124
|
let params = {};
|
|
19948
20125
|
params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
|
|
19949
20126
|
params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
|
|
@@ -19952,6 +20129,8 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
19952
20129
|
params[Param.HideLiveboardHeader] = hideLiveboardHeader;
|
|
19953
20130
|
params[Param.ShowLiveboardTitle] = showLiveboardTitle;
|
|
19954
20131
|
params[Param.ShowLiveboardDescription] = !!showLiveboardDescription;
|
|
20132
|
+
params[Param.ShowMaskedFilterChip] = showMaskedFilterChip;
|
|
20133
|
+
params[Param.IsLiveboardMasterpiecesEnabled] = isLiveboardMasterpiecesEnabled;
|
|
19955
20134
|
params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
|
|
19956
20135
|
params[Param.IsFullAppEmbed] = true;
|
|
19957
20136
|
params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
|
|
@@ -19962,6 +20141,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
19962
20141
|
params[Param.IsUnifiedSearchExperienceEnabled] = isUnifiedSearchExperienceEnabled;
|
|
19963
20142
|
params[Param.CoverAndFilterOptionInPDF] = !!coverAndFilterOptionInPDF;
|
|
19964
20143
|
params = this.getBaseQueryParams(params);
|
|
20144
|
+
if (!isUndefined$1(updatedSpotterChatPrompt)) {
|
|
20145
|
+
params[Param.UpdatedSpotterChatPrompt] = !!updatedSpotterChatPrompt;
|
|
20146
|
+
}
|
|
19965
20147
|
if (hideObjectSearch) {
|
|
19966
20148
|
params[Param.HideObjectSearch] = !!hideObjectSearch;
|
|
19967
20149
|
}
|
|
@@ -20020,6 +20202,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
20020
20202
|
if (isCentralizedLiveboardFilterUXEnabled != undefined) {
|
|
20021
20203
|
params[Param.isCentralizedLiveboardFilterUXEnabled] = isCentralizedLiveboardFilterUXEnabled;
|
|
20022
20204
|
}
|
|
20205
|
+
this.defaultHeight = minimumHeight || this.defaultHeight;
|
|
20023
20206
|
params[Param.DataPanelV2Enabled] = dataPanelV2;
|
|
20024
20207
|
params[Param.HideHomepageLeftNav] = hideHomepageLeftNav;
|
|
20025
20208
|
params[Param.ModularHomeExperienceEnabled] = modularHomeExperience;
|
|
@@ -20374,7 +20557,7 @@ query GetEurekaVizSnapshots(
|
|
|
20374
20557
|
getEmbedParamsObject() {
|
|
20375
20558
|
let params = {};
|
|
20376
20559
|
params = this.getBaseQueryParams(params);
|
|
20377
|
-
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, } = this.viewConfig;
|
|
20560
|
+
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;
|
|
20378
20561
|
const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
|
|
20379
20562
|
|| this.viewConfig.preventPinboardFilterRemoval;
|
|
20380
20563
|
if (fullHeight === true) {
|
|
@@ -20384,15 +20567,16 @@ query GetEurekaVizSnapshots(
|
|
|
20384
20567
|
params[Param.RootMarginForLazyLoad] = this.viewConfig.lazyLoadingMargin;
|
|
20385
20568
|
}
|
|
20386
20569
|
}
|
|
20387
|
-
|
|
20388
|
-
this.defaultHeight = defaultHeight;
|
|
20389
|
-
}
|
|
20570
|
+
this.defaultHeight = minimumHeight || defaultHeight || this.defaultHeight;
|
|
20390
20571
|
if (enableVizTransformations !== undefined) {
|
|
20391
20572
|
params[Param.EnableVizTransformations] = enableVizTransformations.toString();
|
|
20392
20573
|
}
|
|
20393
20574
|
if (preventLiveboardFilterRemoval) {
|
|
20394
20575
|
params[Param.preventLiveboardFilterRemoval] = true;
|
|
20395
20576
|
}
|
|
20577
|
+
if (!isUndefined$1(updatedSpotterChatPrompt)) {
|
|
20578
|
+
params[Param.UpdatedSpotterChatPrompt] = !!updatedSpotterChatPrompt;
|
|
20579
|
+
}
|
|
20396
20580
|
if (visibleVizs) {
|
|
20397
20581
|
params[Param.visibleVizs] = visibleVizs;
|
|
20398
20582
|
}
|
|
@@ -20450,6 +20634,8 @@ query GetEurekaVizSnapshots(
|
|
|
20450
20634
|
params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;
|
|
20451
20635
|
params[Param.ShowLiveboardReverifyBanner] = showLiveboardReverifyBanner;
|
|
20452
20636
|
params[Param.HideIrrelevantFiltersInTab] = hideIrrelevantChipsInLiveboardTabs;
|
|
20637
|
+
params[Param.ShowMaskedFilterChip] = showMaskedFilterChip;
|
|
20638
|
+
params[Param.IsLiveboardMasterpiecesEnabled] = isLiveboardMasterpiecesEnabled;
|
|
20453
20639
|
params[Param.IsEnhancedFilterInteractivityEnabled] = isEnhancedFilterInteractivityEnabled;
|
|
20454
20640
|
params[Param.DataPanelV2Enabled] = dataPanelV2;
|
|
20455
20641
|
params[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
|
|
@@ -20481,7 +20667,12 @@ query GetEurekaVizSnapshots(
|
|
|
20481
20667
|
const { vizId, activeTabId } = this.viewConfig;
|
|
20482
20668
|
const liveboardId = (_a = this.viewConfig.liveboardId) !== null && _a !== void 0 ? _a : this.viewConfig.pinboardId;
|
|
20483
20669
|
if (!liveboardId) {
|
|
20484
|
-
this.handleError(
|
|
20670
|
+
this.handleError({
|
|
20671
|
+
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
20672
|
+
message: ERROR_MESSAGE.LIVEBOARD_VIZ_ID_VALIDATION,
|
|
20673
|
+
code: EmbedErrorCodes.LIVEBOARD_ID_MISSING,
|
|
20674
|
+
error: ERROR_MESSAGE.LIVEBOARD_VIZ_ID_VALIDATION,
|
|
20675
|
+
});
|
|
20485
20676
|
}
|
|
20486
20677
|
return `${this.getRootIframeSrc()}${this.getIframeSuffixSrc(liveboardId, vizId, activeTabId)}`;
|
|
20487
20678
|
}
|
|
@@ -21183,9 +21374,14 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
21183
21374
|
this.viewConfig = viewConfig;
|
|
21184
21375
|
}
|
|
21185
21376
|
getEmbedParamsObject() {
|
|
21186
|
-
const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, enablePastConversationsSidebar, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, } = this.viewConfig;
|
|
21377
|
+
const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, enablePastConversationsSidebar, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, updatedSpotterChatPrompt, } = this.viewConfig;
|
|
21187
21378
|
if (!worksheetId) {
|
|
21188
|
-
this.handleError(
|
|
21379
|
+
this.handleError({
|
|
21380
|
+
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
21381
|
+
message: ERROR_MESSAGE.SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND,
|
|
21382
|
+
code: EmbedErrorCodes.WORKSHEET_ID_NOT_FOUND,
|
|
21383
|
+
error: ERROR_MESSAGE.SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND,
|
|
21384
|
+
});
|
|
21189
21385
|
}
|
|
21190
21386
|
const queryParams = this.getBaseQueryParams();
|
|
21191
21387
|
queryParams[Param.SpotterEnabled] = true;
|
|
@@ -21204,6 +21400,9 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
21204
21400
|
if (!isUndefined_1(hideSampleQuestions)) {
|
|
21205
21401
|
queryParams[Param.HideSampleQuestions] = !!hideSampleQuestions;
|
|
21206
21402
|
}
|
|
21403
|
+
if (!isUndefined_1(updatedSpotterChatPrompt)) {
|
|
21404
|
+
queryParams[Param.UpdatedSpotterChatPrompt] = !!updatedSpotterChatPrompt;
|
|
21405
|
+
}
|
|
21207
21406
|
return queryParams;
|
|
21208
21407
|
}
|
|
21209
21408
|
getIframeSrc() {
|