@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.es.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
|
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";
|
|
@@ -3312,6 +3325,7 @@ var Param;
|
|
|
3312
3325
|
Param["isCentralizedLiveboardFilterUXEnabled"] = "isCentralizedLiveboardFilterUXEnabled";
|
|
3313
3326
|
Param["isLinkParametersEnabled"] = "isLinkParametersEnabled";
|
|
3314
3327
|
Param["EnablePastConversationsSidebar"] = "enablePastConversationsSidebar";
|
|
3328
|
+
Param["UpdatedSpotterChatPrompt"] = "updatedSpotterChatPrompt";
|
|
3315
3329
|
})(Param || (Param = {}));
|
|
3316
3330
|
/**
|
|
3317
3331
|
* ThoughtSpot application pages include actions and menu commands
|
|
@@ -4626,6 +4640,46 @@ var Action;
|
|
|
4626
4640
|
* @version SDK: 1.43.0 | ThoughtSpot Cloud: 10.15.0.cl
|
|
4627
4641
|
*/
|
|
4628
4642
|
Action["LiveboardStylePanel"] = "liveboardStylePanel";
|
|
4643
|
+
/**
|
|
4644
|
+
* The **Move to Group** menu action on a Liveboard.
|
|
4645
|
+
* Allows moving a visualization to a different group.
|
|
4646
|
+
* @example
|
|
4647
|
+
* ```js
|
|
4648
|
+
* disabledActions: [Action.MoveToGroup]
|
|
4649
|
+
* ```
|
|
4650
|
+
* @version SDK: 1.44.0 | ThoughtSpot Cloud: 26.2.0.cl
|
|
4651
|
+
*/
|
|
4652
|
+
Action["MoveToGroup"] = "moveToGroup";
|
|
4653
|
+
/**
|
|
4654
|
+
* The **Move out of Group** menu action on a Liveboard.
|
|
4655
|
+
* Allows moving a visualization out of a group.
|
|
4656
|
+
* @example
|
|
4657
|
+
* ```js
|
|
4658
|
+
* disabledActions: [Action.MoveOutOfGroup]
|
|
4659
|
+
* ```
|
|
4660
|
+
* @version SDK: 1.44.0 | ThoughtSpot Cloud: 26.2.0.cl
|
|
4661
|
+
*/
|
|
4662
|
+
Action["MoveOutOfGroup"] = "moveOutOfGroup";
|
|
4663
|
+
/**
|
|
4664
|
+
* The **Create Group** menu action on a Liveboard.
|
|
4665
|
+
* Allows creating a new group.
|
|
4666
|
+
* @example
|
|
4667
|
+
* ```js
|
|
4668
|
+
* disabledActions: [Action.CreateGroup]
|
|
4669
|
+
* ```
|
|
4670
|
+
* @version SDK: 1.44.0 | ThoughtSpot Cloud: 26.2.0.cl
|
|
4671
|
+
*/
|
|
4672
|
+
Action["CreateGroup"] = "createGroup";
|
|
4673
|
+
/**
|
|
4674
|
+
* The **Ungroup Liveboard Group** menu action on a Liveboard.
|
|
4675
|
+
* Allows ungrouping a liveboard group.
|
|
4676
|
+
* @example
|
|
4677
|
+
* ```js
|
|
4678
|
+
* disabledActions: [Action.UngroupLiveboardGroup]
|
|
4679
|
+
* ```
|
|
4680
|
+
* @version SDK: 1.44.0 | ThoughtSpot Cloud: 26.2.0.cl
|
|
4681
|
+
*/
|
|
4682
|
+
Action["UngroupLiveboardGroup"] = "ungroupLiveboardGroup";
|
|
4629
4683
|
})(Action || (Action = {}));
|
|
4630
4684
|
var PrefetchFeatures;
|
|
4631
4685
|
(function (PrefetchFeatures) {
|
|
@@ -4748,6 +4802,85 @@ var LogLevel;
|
|
|
4748
4802
|
*/
|
|
4749
4803
|
LogLevel["TRACE"] = "TRACE";
|
|
4750
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 = {}));
|
|
4751
4884
|
/**
|
|
4752
4885
|
* Enum for the type of API intercepted
|
|
4753
4886
|
*/
|
|
@@ -7561,6 +7694,13 @@ const ERROR_MESSAGE = {
|
|
|
7561
7694
|
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',
|
|
7562
7695
|
SPOTTER_AGENT_NOT_INITIALIZED: 'SpotterAgent not initialized',
|
|
7563
7696
|
OFFLINE_WARNING: 'Network not Detected. Embed is offline. Please reconnect and refresh',
|
|
7697
|
+
INIT_SDK_REQUIRED: 'You need to init the ThoughtSpot SDK module first',
|
|
7698
|
+
CONFLICTING_ACTIONS_CONFIG: 'You cannot have both hidden actions and visible actions',
|
|
7699
|
+
CONFLICTING_TABS_CONFIG: 'You cannot have both hidden Tabs and visible Tabs',
|
|
7700
|
+
RENDER_BEFORE_EVENTS_REQUIRED: 'Please call render before triggering events',
|
|
7701
|
+
HOST_EVENT_TYPE_UNDEFINED: 'Host event type is undefined',
|
|
7702
|
+
LOGIN_FAILED: 'Login failed',
|
|
7703
|
+
ERROR_PARSING_API_INTERCEPT_BODY: 'Error parsing api intercept body',
|
|
7564
7704
|
};
|
|
7565
7705
|
const CUSTOM_ACTIONS_ERROR_MESSAGE = {
|
|
7566
7706
|
INVALID_ACTION_OBJECT: 'Custom Action Validation Error: Invalid action object provided',
|
|
@@ -8470,7 +8610,7 @@ class AnswerService {
|
|
|
8470
8610
|
async getTML() {
|
|
8471
8611
|
const { object } = await this.executeQuery(getAnswerTML, {});
|
|
8472
8612
|
const edoc = object[0].edoc;
|
|
8473
|
-
const YAML = await import('./index-
|
|
8613
|
+
const YAML = await import('./index-BXCUJ09L.js');
|
|
8474
8614
|
const parsedDoc = YAML.parse(edoc);
|
|
8475
8615
|
return {
|
|
8476
8616
|
answer: {
|
|
@@ -17315,6 +17455,76 @@ if (typeof Promise.withResolvers === 'undefined') {
|
|
|
17315
17455
|
};
|
|
17316
17456
|
}
|
|
17317
17457
|
|
|
17458
|
+
/**
|
|
17459
|
+
* Reloads the ThoughtSpot iframe.
|
|
17460
|
+
* @param iFrame
|
|
17461
|
+
*/
|
|
17462
|
+
const reload = (iFrame) => {
|
|
17463
|
+
const src = iFrame.src;
|
|
17464
|
+
iFrame.src = '';
|
|
17465
|
+
setTimeout(() => {
|
|
17466
|
+
iFrame.src = src;
|
|
17467
|
+
}, 100);
|
|
17468
|
+
};
|
|
17469
|
+
/**
|
|
17470
|
+
* Post iframe message.
|
|
17471
|
+
* @param iFrame
|
|
17472
|
+
* @param message
|
|
17473
|
+
* @param message.type
|
|
17474
|
+
* @param message.data
|
|
17475
|
+
* @param thoughtSpotHost
|
|
17476
|
+
* @param channel
|
|
17477
|
+
*/
|
|
17478
|
+
function postIframeMessage(iFrame, message, thoughtSpotHost, channel) {
|
|
17479
|
+
var _a;
|
|
17480
|
+
return (_a = iFrame.contentWindow) === null || _a === void 0 ? void 0 : _a.postMessage(message, thoughtSpotHost, [channel === null || channel === void 0 ? void 0 : channel.port2]);
|
|
17481
|
+
}
|
|
17482
|
+
const TRIGGER_TIMEOUT = 30000;
|
|
17483
|
+
/**
|
|
17484
|
+
*
|
|
17485
|
+
* @param iFrame
|
|
17486
|
+
* @param messageType
|
|
17487
|
+
* @param thoughtSpotHost
|
|
17488
|
+
* @param data
|
|
17489
|
+
*/
|
|
17490
|
+
function processTrigger(iFrame, messageType, thoughtSpotHost, data) {
|
|
17491
|
+
return new Promise((res, rej) => {
|
|
17492
|
+
var _a;
|
|
17493
|
+
if (messageType === HostEvent.Reload) {
|
|
17494
|
+
reload(iFrame);
|
|
17495
|
+
return res(null);
|
|
17496
|
+
}
|
|
17497
|
+
if (messageType === HostEvent.Present) {
|
|
17498
|
+
const embedConfig = getEmbedConfig();
|
|
17499
|
+
const disableFullscreenPresentation = (_a = embedConfig === null || embedConfig === void 0 ? void 0 : embedConfig.disableFullscreenPresentation) !== null && _a !== void 0 ? _a : true;
|
|
17500
|
+
if (!disableFullscreenPresentation) {
|
|
17501
|
+
handlePresentEvent(iFrame);
|
|
17502
|
+
}
|
|
17503
|
+
else {
|
|
17504
|
+
logger$3.warn('Fullscreen presentation mode is disabled. Set disableFullscreenPresentation: false to enable this feature.');
|
|
17505
|
+
}
|
|
17506
|
+
}
|
|
17507
|
+
const channel = new MessageChannel();
|
|
17508
|
+
channel.port1.onmessage = ({ data: responseData }) => {
|
|
17509
|
+
var _a;
|
|
17510
|
+
channel.port1.close();
|
|
17511
|
+
const error = responseData.error || ((_a = responseData === null || responseData === void 0 ? void 0 : responseData.data) === null || _a === void 0 ? void 0 : _a.error);
|
|
17512
|
+
if (error) {
|
|
17513
|
+
rej(error);
|
|
17514
|
+
}
|
|
17515
|
+
else {
|
|
17516
|
+
res(responseData);
|
|
17517
|
+
}
|
|
17518
|
+
};
|
|
17519
|
+
// Close the messageChannel and resolve the promise if timeout.
|
|
17520
|
+
setTimeout(() => {
|
|
17521
|
+
channel.port1.close();
|
|
17522
|
+
res(new Error(ERROR_MESSAGE.TRIGGER_TIMED_OUT));
|
|
17523
|
+
}, TRIGGER_TIMEOUT);
|
|
17524
|
+
return postIframeMessage(iFrame, { type: messageType, data }, thoughtSpotHost, channel);
|
|
17525
|
+
});
|
|
17526
|
+
}
|
|
17527
|
+
|
|
17318
17528
|
/* eslint-disable camelcase */
|
|
17319
17529
|
/* eslint-disable import/no-mutable-exports */
|
|
17320
17530
|
/**
|
|
@@ -17653,77 +17863,7 @@ function processEventData(type, eventData, thoughtSpotHost, containerEl) {
|
|
|
17653
17863
|
return eventData;
|
|
17654
17864
|
}
|
|
17655
17865
|
|
|
17656
|
-
var name="@thoughtspot/visual-embed-sdk";var version$1="1.
|
|
17657
|
-
|
|
17658
|
-
/**
|
|
17659
|
-
* Reloads the ThoughtSpot iframe.
|
|
17660
|
-
* @param iFrame
|
|
17661
|
-
*/
|
|
17662
|
-
const reload = (iFrame) => {
|
|
17663
|
-
const src = iFrame.src;
|
|
17664
|
-
iFrame.src = '';
|
|
17665
|
-
setTimeout(() => {
|
|
17666
|
-
iFrame.src = src;
|
|
17667
|
-
}, 100);
|
|
17668
|
-
};
|
|
17669
|
-
/**
|
|
17670
|
-
* Post iframe message.
|
|
17671
|
-
* @param iFrame
|
|
17672
|
-
* @param message
|
|
17673
|
-
* @param message.type
|
|
17674
|
-
* @param message.data
|
|
17675
|
-
* @param thoughtSpotHost
|
|
17676
|
-
* @param channel
|
|
17677
|
-
*/
|
|
17678
|
-
function postIframeMessage(iFrame, message, thoughtSpotHost, channel) {
|
|
17679
|
-
var _a;
|
|
17680
|
-
return (_a = iFrame.contentWindow) === null || _a === void 0 ? void 0 : _a.postMessage(message, thoughtSpotHost, [channel === null || channel === void 0 ? void 0 : channel.port2]);
|
|
17681
|
-
}
|
|
17682
|
-
const TRIGGER_TIMEOUT = 30000;
|
|
17683
|
-
/**
|
|
17684
|
-
*
|
|
17685
|
-
* @param iFrame
|
|
17686
|
-
* @param messageType
|
|
17687
|
-
* @param thoughtSpotHost
|
|
17688
|
-
* @param data
|
|
17689
|
-
*/
|
|
17690
|
-
function processTrigger(iFrame, messageType, thoughtSpotHost, data) {
|
|
17691
|
-
return new Promise((res, rej) => {
|
|
17692
|
-
var _a;
|
|
17693
|
-
if (messageType === HostEvent.Reload) {
|
|
17694
|
-
reload(iFrame);
|
|
17695
|
-
return res(null);
|
|
17696
|
-
}
|
|
17697
|
-
if (messageType === HostEvent.Present) {
|
|
17698
|
-
const embedConfig = getEmbedConfig();
|
|
17699
|
-
const disableFullscreenPresentation = (_a = embedConfig === null || embedConfig === void 0 ? void 0 : embedConfig.disableFullscreenPresentation) !== null && _a !== void 0 ? _a : true;
|
|
17700
|
-
if (!disableFullscreenPresentation) {
|
|
17701
|
-
handlePresentEvent(iFrame);
|
|
17702
|
-
}
|
|
17703
|
-
else {
|
|
17704
|
-
logger$3.warn('Fullscreen presentation mode is disabled. Set disableFullscreenPresentation: false to enable this feature.');
|
|
17705
|
-
}
|
|
17706
|
-
}
|
|
17707
|
-
const channel = new MessageChannel();
|
|
17708
|
-
channel.port1.onmessage = ({ data: responseData }) => {
|
|
17709
|
-
var _a;
|
|
17710
|
-
channel.port1.close();
|
|
17711
|
-
const error = responseData.error || ((_a = responseData === null || responseData === void 0 ? void 0 : responseData.data) === null || _a === void 0 ? void 0 : _a.error);
|
|
17712
|
-
if (error) {
|
|
17713
|
-
rej(error);
|
|
17714
|
-
}
|
|
17715
|
-
else {
|
|
17716
|
-
res(responseData);
|
|
17717
|
-
}
|
|
17718
|
-
};
|
|
17719
|
-
// Close the messageChannel and resolve the promise if timeout.
|
|
17720
|
-
setTimeout(() => {
|
|
17721
|
-
channel.port1.close();
|
|
17722
|
-
res(new Error(ERROR_MESSAGE.TRIGGER_TIMED_OUT));
|
|
17723
|
-
}, TRIGGER_TIMEOUT);
|
|
17724
|
-
return postIframeMessage(iFrame, { type: messageType, data }, thoughtSpotHost, channel);
|
|
17725
|
-
});
|
|
17726
|
-
}
|
|
17866
|
+
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={".":{"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,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};
|
|
17727
17867
|
|
|
17728
17868
|
class HostEventClient {
|
|
17729
17869
|
constructor(iFrame) {
|
|
@@ -17921,9 +18061,13 @@ const handleInterceptEvent = async (params) => {
|
|
|
17921
18061
|
const { eventData, executeEvent, viewConfig, getUnsavedAnswerTml } = params;
|
|
17922
18062
|
const [interceptData, bodyParseError] = parseInterceptData(eventData.data);
|
|
17923
18063
|
if (bodyParseError) {
|
|
17924
|
-
|
|
17925
|
-
|
|
17926
|
-
|
|
18064
|
+
const errorDetails = {
|
|
18065
|
+
errorType: ErrorDetailsTypes.API,
|
|
18066
|
+
message: ERROR_MESSAGE.ERROR_PARSING_API_INTERCEPT_BODY,
|
|
18067
|
+
code: EmbedErrorCodes.PARSING_API_INTERCEPT_BODY_ERROR,
|
|
18068
|
+
error: ERROR_MESSAGE.ERROR_PARSING_API_INTERCEPT_BODY,
|
|
18069
|
+
};
|
|
18070
|
+
executeEvent(EmbedEvent.Error, errorDetails);
|
|
17927
18071
|
logger$3.error('Error parsing request body', bodyParseError);
|
|
17928
18072
|
return;
|
|
17929
18073
|
}
|
|
@@ -18235,19 +18379,23 @@ class TsEmbed {
|
|
|
18235
18379
|
* Throws error encountered during initialization.
|
|
18236
18380
|
*/
|
|
18237
18381
|
throwInitError() {
|
|
18238
|
-
this.handleError(
|
|
18382
|
+
this.handleError({
|
|
18383
|
+
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
18384
|
+
message: ERROR_MESSAGE.INIT_SDK_REQUIRED,
|
|
18385
|
+
code: EmbedErrorCodes.INIT_ERROR,
|
|
18386
|
+
error: ERROR_MESSAGE.INIT_SDK_REQUIRED,
|
|
18387
|
+
});
|
|
18239
18388
|
}
|
|
18240
18389
|
/**
|
|
18241
18390
|
* Handles errors within the SDK
|
|
18242
18391
|
* @param error The error message or object
|
|
18392
|
+
* @param errorDetails The error details
|
|
18243
18393
|
*/
|
|
18244
|
-
handleError(
|
|
18394
|
+
handleError(errorDetails) {
|
|
18245
18395
|
this.isError = true;
|
|
18246
|
-
this.executeCallbacks(EmbedEvent.Error,
|
|
18247
|
-
error,
|
|
18248
|
-
});
|
|
18396
|
+
this.executeCallbacks(EmbedEvent.Error, errorDetails);
|
|
18249
18397
|
// Log error
|
|
18250
|
-
logger$3.error(
|
|
18398
|
+
logger$3.error(errorDetails);
|
|
18251
18399
|
}
|
|
18252
18400
|
/**
|
|
18253
18401
|
* Extracts the type field from the event payload
|
|
@@ -18326,11 +18474,14 @@ class TsEmbed {
|
|
|
18326
18474
|
};
|
|
18327
18475
|
window.addEventListener('online', onlineEventListener);
|
|
18328
18476
|
const offlineEventListener = (e) => {
|
|
18329
|
-
const
|
|
18330
|
-
|
|
18331
|
-
|
|
18332
|
-
|
|
18333
|
-
|
|
18477
|
+
const errorDetails = {
|
|
18478
|
+
errorType: ErrorDetailsTypes.NETWORK,
|
|
18479
|
+
message: ERROR_MESSAGE.OFFLINE_WARNING,
|
|
18480
|
+
code: EmbedErrorCodes.NETWORK_ERROR,
|
|
18481
|
+
offlineWarning: ERROR_MESSAGE.OFFLINE_WARNING,
|
|
18482
|
+
};
|
|
18483
|
+
this.executeCallbacks(EmbedEvent.Error, errorDetails);
|
|
18484
|
+
logger$3.warn(errorDetails);
|
|
18334
18485
|
};
|
|
18335
18486
|
window.addEventListener('offline', offlineEventListener);
|
|
18336
18487
|
this.subscribedListeners.online = onlineEventListener;
|
|
@@ -18410,8 +18561,10 @@ class TsEmbed {
|
|
|
18410
18561
|
]);
|
|
18411
18562
|
if (customActionsResult.errors.length > 0) {
|
|
18412
18563
|
this.handleError({
|
|
18413
|
-
|
|
18564
|
+
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
18414
18565
|
message: customActionsResult.errors,
|
|
18566
|
+
code: EmbedErrorCodes.CUSTOM_ACTION_VALIDATION,
|
|
18567
|
+
error: { type: EmbedErrorCodes.CUSTOM_ACTION_VALIDATION, message: customActionsResult.errors }
|
|
18415
18568
|
});
|
|
18416
18569
|
}
|
|
18417
18570
|
const baseInitData = {
|
|
@@ -18508,11 +18661,21 @@ class TsEmbed {
|
|
|
18508
18661
|
...additionalFlagsFromView,
|
|
18509
18662
|
};
|
|
18510
18663
|
if (Array.isArray(visibleActions) && Array.isArray(hiddenActions)) {
|
|
18511
|
-
this.handleError(
|
|
18664
|
+
this.handleError({
|
|
18665
|
+
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
18666
|
+
message: ERROR_MESSAGE.CONFLICTING_ACTIONS_CONFIG,
|
|
18667
|
+
code: EmbedErrorCodes.CONFLICTING_ACTIONS_CONFIG,
|
|
18668
|
+
error: ERROR_MESSAGE.CONFLICTING_ACTIONS_CONFIG,
|
|
18669
|
+
});
|
|
18512
18670
|
return queryParams;
|
|
18513
18671
|
}
|
|
18514
18672
|
if (Array.isArray(visibleTabs) && Array.isArray(hiddenTabs)) {
|
|
18515
|
-
this.handleError(
|
|
18673
|
+
this.handleError({
|
|
18674
|
+
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
18675
|
+
message: ERROR_MESSAGE.CONFLICTING_TABS_CONFIG,
|
|
18676
|
+
code: EmbedErrorCodes.CONFLICTING_TABS_CONFIG,
|
|
18677
|
+
error: ERROR_MESSAGE.CONFLICTING_TABS_CONFIG,
|
|
18678
|
+
});
|
|
18516
18679
|
return queryParams;
|
|
18517
18680
|
}
|
|
18518
18681
|
if (primaryAction) {
|
|
@@ -18737,7 +18900,12 @@ class TsEmbed {
|
|
|
18737
18900
|
error: JSON.stringify(error),
|
|
18738
18901
|
});
|
|
18739
18902
|
this.handleInsertionIntoDOM(this.embedConfig.loginFailedMessage);
|
|
18740
|
-
this.handleError(
|
|
18903
|
+
this.handleError({
|
|
18904
|
+
errorType: ErrorDetailsTypes.API,
|
|
18905
|
+
message: error.message || ERROR_MESSAGE.LOGIN_FAILED,
|
|
18906
|
+
code: EmbedErrorCodes.LOGIN_FAILED,
|
|
18907
|
+
error: error,
|
|
18908
|
+
});
|
|
18741
18909
|
});
|
|
18742
18910
|
});
|
|
18743
18911
|
}
|
|
@@ -19042,11 +19210,21 @@ class TsEmbed {
|
|
|
19042
19210
|
async trigger(messageType, data = {}) {
|
|
19043
19211
|
uploadMixpanelEvent(`${MIXPANEL_EVENT.VISUAL_SDK_TRIGGER}-${messageType}`);
|
|
19044
19212
|
if (!this.isRendered) {
|
|
19045
|
-
this.handleError(
|
|
19213
|
+
this.handleError({
|
|
19214
|
+
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
19215
|
+
message: ERROR_MESSAGE.RENDER_BEFORE_EVENTS_REQUIRED,
|
|
19216
|
+
code: EmbedErrorCodes.RENDER_NOT_CALLED,
|
|
19217
|
+
error: ERROR_MESSAGE.RENDER_BEFORE_EVENTS_REQUIRED,
|
|
19218
|
+
});
|
|
19046
19219
|
return null;
|
|
19047
19220
|
}
|
|
19048
19221
|
if (!messageType) {
|
|
19049
|
-
this.handleError(
|
|
19222
|
+
this.handleError({
|
|
19223
|
+
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
19224
|
+
message: ERROR_MESSAGE.HOST_EVENT_TYPE_UNDEFINED,
|
|
19225
|
+
code: EmbedErrorCodes.HOST_EVENT_TYPE_UNDEFINED,
|
|
19226
|
+
error: ERROR_MESSAGE.HOST_EVENT_TYPE_UNDEFINED,
|
|
19227
|
+
});
|
|
19050
19228
|
return null;
|
|
19051
19229
|
}
|
|
19052
19230
|
// Check if iframe exists before triggering -
|
|
@@ -19859,7 +20037,7 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
|
|
|
19859
20037
|
constructor(domSelector, viewConfig) {
|
|
19860
20038
|
viewConfig.embedComponentType = 'AppEmbed';
|
|
19861
20039
|
super(domSelector, viewConfig);
|
|
19862
|
-
this.defaultHeight =
|
|
20040
|
+
this.defaultHeight = 500;
|
|
19863
20041
|
this.sendFullHeightLazyLoadData = () => {
|
|
19864
20042
|
const data = calculateVisibleElementData(this.iFrame);
|
|
19865
20043
|
this.trigger(HostEvent.VisibleEmbedCoordinates, data);
|
|
@@ -19881,8 +20059,7 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
|
|
|
19881
20059
|
* @param data The event payload
|
|
19882
20060
|
*/
|
|
19883
20061
|
this.updateIFrameHeight = (data) => {
|
|
19884
|
-
|
|
19885
|
-
this.setIFrameHeight(Math.max(data.data, (_a = this.iFrame) === null || _a === void 0 ? void 0 : _a.scrollHeight));
|
|
20062
|
+
this.setIFrameHeight(Math.max(data.data, this.defaultHeight));
|
|
19886
20063
|
this.sendFullHeightLazyLoadData();
|
|
19887
20064
|
};
|
|
19888
20065
|
this.embedIframeCenter = (data, responder) => {
|
|
@@ -19921,7 +20098,7 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
|
|
|
19921
20098
|
* embedded Liveboard or visualization.
|
|
19922
20099
|
*/
|
|
19923
20100
|
getEmbedParams() {
|
|
19924
|
-
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;
|
|
20101
|
+
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;
|
|
19925
20102
|
let params = {};
|
|
19926
20103
|
params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
|
|
19927
20104
|
params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
|
|
@@ -19930,6 +20107,8 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
|
|
|
19930
20107
|
params[Param.HideLiveboardHeader] = hideLiveboardHeader;
|
|
19931
20108
|
params[Param.ShowLiveboardTitle] = showLiveboardTitle;
|
|
19932
20109
|
params[Param.ShowLiveboardDescription] = !!showLiveboardDescription;
|
|
20110
|
+
params[Param.ShowMaskedFilterChip] = showMaskedFilterChip;
|
|
20111
|
+
params[Param.IsLiveboardMasterpiecesEnabled] = isLiveboardMasterpiecesEnabled;
|
|
19933
20112
|
params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
|
|
19934
20113
|
params[Param.IsFullAppEmbed] = true;
|
|
19935
20114
|
params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
|
|
@@ -19940,6 +20119,9 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
|
|
|
19940
20119
|
params[Param.IsUnifiedSearchExperienceEnabled] = isUnifiedSearchExperienceEnabled;
|
|
19941
20120
|
params[Param.CoverAndFilterOptionInPDF] = !!coverAndFilterOptionInPDF;
|
|
19942
20121
|
params = this.getBaseQueryParams(params);
|
|
20122
|
+
if (!isUndefined$1(updatedSpotterChatPrompt)) {
|
|
20123
|
+
params[Param.UpdatedSpotterChatPrompt] = !!updatedSpotterChatPrompt;
|
|
20124
|
+
}
|
|
19943
20125
|
if (hideObjectSearch) {
|
|
19944
20126
|
params[Param.HideObjectSearch] = !!hideObjectSearch;
|
|
19945
20127
|
}
|
|
@@ -19998,6 +20180,7 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
|
|
|
19998
20180
|
if (isCentralizedLiveboardFilterUXEnabled != undefined) {
|
|
19999
20181
|
params[Param.isCentralizedLiveboardFilterUXEnabled] = isCentralizedLiveboardFilterUXEnabled;
|
|
20000
20182
|
}
|
|
20183
|
+
this.defaultHeight = minimumHeight || this.defaultHeight;
|
|
20001
20184
|
params[Param.DataPanelV2Enabled] = dataPanelV2;
|
|
20002
20185
|
params[Param.HideHomepageLeftNav] = hideHomepageLeftNav;
|
|
20003
20186
|
params[Param.ModularHomeExperienceEnabled] = modularHomeExperience;
|
|
@@ -20352,7 +20535,7 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
|
|
|
20352
20535
|
getEmbedParamsObject() {
|
|
20353
20536
|
let params = {};
|
|
20354
20537
|
params = this.getBaseQueryParams(params);
|
|
20355
|
-
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;
|
|
20538
|
+
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;
|
|
20356
20539
|
const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
|
|
20357
20540
|
|| this.viewConfig.preventPinboardFilterRemoval;
|
|
20358
20541
|
if (fullHeight === true) {
|
|
@@ -20362,15 +20545,16 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
|
|
|
20362
20545
|
params[Param.RootMarginForLazyLoad] = this.viewConfig.lazyLoadingMargin;
|
|
20363
20546
|
}
|
|
20364
20547
|
}
|
|
20365
|
-
|
|
20366
|
-
this.defaultHeight = defaultHeight;
|
|
20367
|
-
}
|
|
20548
|
+
this.defaultHeight = minimumHeight || defaultHeight || this.defaultHeight;
|
|
20368
20549
|
if (enableVizTransformations !== undefined) {
|
|
20369
20550
|
params[Param.EnableVizTransformations] = enableVizTransformations.toString();
|
|
20370
20551
|
}
|
|
20371
20552
|
if (preventLiveboardFilterRemoval) {
|
|
20372
20553
|
params[Param.preventLiveboardFilterRemoval] = true;
|
|
20373
20554
|
}
|
|
20555
|
+
if (!isUndefined$1(updatedSpotterChatPrompt)) {
|
|
20556
|
+
params[Param.UpdatedSpotterChatPrompt] = !!updatedSpotterChatPrompt;
|
|
20557
|
+
}
|
|
20374
20558
|
if (visibleVizs) {
|
|
20375
20559
|
params[Param.visibleVizs] = visibleVizs;
|
|
20376
20560
|
}
|
|
@@ -20428,6 +20612,8 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
|
|
|
20428
20612
|
params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;
|
|
20429
20613
|
params[Param.ShowLiveboardReverifyBanner] = showLiveboardReverifyBanner;
|
|
20430
20614
|
params[Param.HideIrrelevantFiltersInTab] = hideIrrelevantChipsInLiveboardTabs;
|
|
20615
|
+
params[Param.ShowMaskedFilterChip] = showMaskedFilterChip;
|
|
20616
|
+
params[Param.IsLiveboardMasterpiecesEnabled] = isLiveboardMasterpiecesEnabled;
|
|
20431
20617
|
params[Param.IsEnhancedFilterInteractivityEnabled] = isEnhancedFilterInteractivityEnabled;
|
|
20432
20618
|
params[Param.DataPanelV2Enabled] = dataPanelV2;
|
|
20433
20619
|
params[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
|
|
@@ -20459,7 +20645,12 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
|
|
|
20459
20645
|
const { vizId, activeTabId } = this.viewConfig;
|
|
20460
20646
|
const liveboardId = (_a = this.viewConfig.liveboardId) !== null && _a !== void 0 ? _a : this.viewConfig.pinboardId;
|
|
20461
20647
|
if (!liveboardId) {
|
|
20462
|
-
this.handleError(
|
|
20648
|
+
this.handleError({
|
|
20649
|
+
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
20650
|
+
message: ERROR_MESSAGE.LIVEBOARD_VIZ_ID_VALIDATION,
|
|
20651
|
+
code: EmbedErrorCodes.LIVEBOARD_ID_MISSING,
|
|
20652
|
+
error: ERROR_MESSAGE.LIVEBOARD_VIZ_ID_VALIDATION,
|
|
20653
|
+
});
|
|
20463
20654
|
}
|
|
20464
20655
|
return `${this.getRootIframeSrc()}${this.getIframeSuffixSrc(liveboardId, vizId, activeTabId)}`;
|
|
20465
20656
|
}
|
|
@@ -21161,9 +21352,14 @@ let SpotterEmbed$1 = class SpotterEmbed extends TsEmbed {
|
|
|
21161
21352
|
this.viewConfig = viewConfig;
|
|
21162
21353
|
}
|
|
21163
21354
|
getEmbedParamsObject() {
|
|
21164
|
-
const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, enablePastConversationsSidebar, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, } = this.viewConfig;
|
|
21355
|
+
const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, enablePastConversationsSidebar, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, updatedSpotterChatPrompt, } = this.viewConfig;
|
|
21165
21356
|
if (!worksheetId) {
|
|
21166
|
-
this.handleError(
|
|
21357
|
+
this.handleError({
|
|
21358
|
+
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
21359
|
+
message: ERROR_MESSAGE.SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND,
|
|
21360
|
+
code: EmbedErrorCodes.WORKSHEET_ID_NOT_FOUND,
|
|
21361
|
+
error: ERROR_MESSAGE.SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND,
|
|
21362
|
+
});
|
|
21167
21363
|
}
|
|
21168
21364
|
const queryParams = this.getBaseQueryParams();
|
|
21169
21365
|
queryParams[Param.SpotterEnabled] = true;
|
|
@@ -21182,6 +21378,9 @@ let SpotterEmbed$1 = class SpotterEmbed extends TsEmbed {
|
|
|
21182
21378
|
if (!isUndefined_1(hideSampleQuestions)) {
|
|
21183
21379
|
queryParams[Param.HideSampleQuestions] = !!hideSampleQuestions;
|
|
21184
21380
|
}
|
|
21381
|
+
if (!isUndefined_1(updatedSpotterChatPrompt)) {
|
|
21382
|
+
queryParams[Param.UpdatedSpotterChatPrompt] = !!updatedSpotterChatPrompt;
|
|
21383
|
+
}
|
|
21185
21384
|
return queryParams;
|
|
21186
21385
|
}
|
|
21187
21386
|
getIframeSrc() {
|