@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.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
|
function _mergeNamespaces(n, m) {
|
|
4
4
|
m.forEach(function (e) {
|
|
@@ -596,6 +596,7 @@ var EmbedEvent;
|
|
|
596
596
|
* SearchEmbed.on(EmbedEvent.Error, (error) => {
|
|
597
597
|
* console.log(error);
|
|
598
598
|
* // { type: "Error", data: { errorType: "API", error: { message: '...', error: '...' } } }
|
|
599
|
+
* // { errorType: "API", message: '...', code: '...' } new format
|
|
599
600
|
* });
|
|
600
601
|
* ```
|
|
601
602
|
* @example
|
|
@@ -607,6 +608,7 @@ var EmbedEvent;
|
|
|
607
608
|
* // message: "Fullscreen API is not enabled",
|
|
608
609
|
* // stack: "..."
|
|
609
610
|
* // } }}
|
|
611
|
+
* // { errorType: "FULLSCREEN", message: "Fullscreen API is not enabled", code: '...' } new format
|
|
610
612
|
* })
|
|
611
613
|
* ```
|
|
612
614
|
*/
|
|
@@ -762,7 +764,8 @@ var EmbedEvent;
|
|
|
762
764
|
*/
|
|
763
765
|
EmbedEvent["ALL"] = "*";
|
|
764
766
|
/**
|
|
765
|
-
* Emitted when an Answer is saved in the app
|
|
767
|
+
* Emitted when an Answer is saved in the app.
|
|
768
|
+
* Use start:true to subscribe to when save is initiated, or end:true to subscribe to when save is completed. Default is end:true.
|
|
766
769
|
* @Version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
767
770
|
* @example
|
|
768
771
|
*```js
|
|
@@ -797,6 +800,7 @@ var EmbedEvent;
|
|
|
797
800
|
EmbedEvent["Download"] = "download";
|
|
798
801
|
/**
|
|
799
802
|
* Emitted when the download action is triggered on an Answer.
|
|
803
|
+
* Use start:true to subscribe to when download is initiated, or end:true to subscribe to when download is completed. Default is end:true.
|
|
800
804
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.0.sw
|
|
801
805
|
* @example
|
|
802
806
|
*```js
|
|
@@ -811,6 +815,7 @@ var EmbedEvent;
|
|
|
811
815
|
EmbedEvent["DownloadAsPng"] = "downloadAsPng";
|
|
812
816
|
/**
|
|
813
817
|
* Emitted when the Download as PDF action is triggered on an Answer
|
|
818
|
+
* 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.
|
|
814
819
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
815
820
|
* @example
|
|
816
821
|
*```js
|
|
@@ -825,6 +830,7 @@ var EmbedEvent;
|
|
|
825
830
|
EmbedEvent["DownloadAsPdf"] = "downloadAsPdf";
|
|
826
831
|
/**
|
|
827
832
|
* Emitted when the Download as CSV action is triggered on an Answer.
|
|
833
|
+
* 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.
|
|
828
834
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
829
835
|
* @example
|
|
830
836
|
*```js
|
|
@@ -839,6 +845,7 @@ var EmbedEvent;
|
|
|
839
845
|
EmbedEvent["DownloadAsCsv"] = "downloadAsCsv";
|
|
840
846
|
/**
|
|
841
847
|
* Emitted when the Download as XLSX action is triggered on an Answer.
|
|
848
|
+
* 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.
|
|
842
849
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
843
850
|
* @example
|
|
844
851
|
*```js
|
|
@@ -853,6 +860,7 @@ var EmbedEvent;
|
|
|
853
860
|
EmbedEvent["DownloadAsXlsx"] = "downloadAsXlsx";
|
|
854
861
|
/**
|
|
855
862
|
* Emitted when an Answer is deleted in the app
|
|
863
|
+
* Use start:true to subscribe to when delete is initiated, or end:true to subscribe to when delete is completed. Default is end:true.
|
|
856
864
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
857
865
|
* @example
|
|
858
866
|
*```js
|
|
@@ -879,6 +887,7 @@ var EmbedEvent;
|
|
|
879
887
|
/**
|
|
880
888
|
* Emitted when a user initiates the Pin action to
|
|
881
889
|
* add an Answer to a Liveboard.
|
|
890
|
+
* Use start:true to subscribe to when pin is initiated, or end:true to subscribe to when pin is completed. Default is end:true.
|
|
882
891
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
883
892
|
* @example
|
|
884
893
|
*```js
|
|
@@ -992,6 +1001,7 @@ var EmbedEvent;
|
|
|
992
1001
|
/**
|
|
993
1002
|
* Emitted when the **Export TML** action is triggered on an
|
|
994
1003
|
* an embedded object in the app
|
|
1004
|
+
* Use start:true to subscribe to when export is initiated, or end:true to subscribe to when export is completed. Default is end:true.
|
|
995
1005
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
996
1006
|
* @example
|
|
997
1007
|
*```js
|
|
@@ -1017,6 +1027,7 @@ var EmbedEvent;
|
|
|
1017
1027
|
EmbedEvent["SaveAsView"] = "saveAsView";
|
|
1018
1028
|
/**
|
|
1019
1029
|
* Emitted when the user creates a copy of an Answer.
|
|
1030
|
+
* 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.
|
|
1020
1031
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1021
1032
|
* @example
|
|
1022
1033
|
*```js
|
|
@@ -3088,6 +3099,8 @@ var Param;
|
|
|
3088
3099
|
Param["HideLiveboardHeader"] = "hideLiveboardHeader";
|
|
3089
3100
|
Param["ShowLiveboardDescription"] = "showLiveboardDescription";
|
|
3090
3101
|
Param["ShowLiveboardTitle"] = "showLiveboardTitle";
|
|
3102
|
+
Param["ShowMaskedFilterChip"] = "showMaskedFilterChip";
|
|
3103
|
+
Param["IsLiveboardMasterpiecesEnabled"] = "isLiveboardMasterpiecesEnabled";
|
|
3091
3104
|
Param["HiddenTabs"] = "hideTabs";
|
|
3092
3105
|
Param["VisibleTabs"] = "visibleTabs";
|
|
3093
3106
|
Param["HideTabPanel"] = "hideTabPanel";
|
|
@@ -3144,6 +3157,7 @@ var Param;
|
|
|
3144
3157
|
Param["isCentralizedLiveboardFilterUXEnabled"] = "isCentralizedLiveboardFilterUXEnabled";
|
|
3145
3158
|
Param["isLinkParametersEnabled"] = "isLinkParametersEnabled";
|
|
3146
3159
|
Param["EnablePastConversationsSidebar"] = "enablePastConversationsSidebar";
|
|
3160
|
+
Param["UpdatedSpotterChatPrompt"] = "updatedSpotterChatPrompt";
|
|
3147
3161
|
})(Param || (Param = {}));
|
|
3148
3162
|
/**
|
|
3149
3163
|
* ThoughtSpot application pages include actions and menu commands
|
|
@@ -4458,6 +4472,46 @@ var Action;
|
|
|
4458
4472
|
* @version SDK: 1.43.0 | ThoughtSpot Cloud: 10.15.0.cl
|
|
4459
4473
|
*/
|
|
4460
4474
|
Action["LiveboardStylePanel"] = "liveboardStylePanel";
|
|
4475
|
+
/**
|
|
4476
|
+
* The **Move to Group** menu action on a Liveboard.
|
|
4477
|
+
* Allows moving a visualization to a different group.
|
|
4478
|
+
* @example
|
|
4479
|
+
* ```js
|
|
4480
|
+
* disabledActions: [Action.MoveToGroup]
|
|
4481
|
+
* ```
|
|
4482
|
+
* @version SDK: 1.44.0 | ThoughtSpot Cloud: 26.2.0.cl
|
|
4483
|
+
*/
|
|
4484
|
+
Action["MoveToGroup"] = "moveToGroup";
|
|
4485
|
+
/**
|
|
4486
|
+
* The **Move out of Group** menu action on a Liveboard.
|
|
4487
|
+
* Allows moving a visualization out of a group.
|
|
4488
|
+
* @example
|
|
4489
|
+
* ```js
|
|
4490
|
+
* disabledActions: [Action.MoveOutOfGroup]
|
|
4491
|
+
* ```
|
|
4492
|
+
* @version SDK: 1.44.0 | ThoughtSpot Cloud: 26.2.0.cl
|
|
4493
|
+
*/
|
|
4494
|
+
Action["MoveOutOfGroup"] = "moveOutOfGroup";
|
|
4495
|
+
/**
|
|
4496
|
+
* The **Create Group** menu action on a Liveboard.
|
|
4497
|
+
* Allows creating a new group.
|
|
4498
|
+
* @example
|
|
4499
|
+
* ```js
|
|
4500
|
+
* disabledActions: [Action.CreateGroup]
|
|
4501
|
+
* ```
|
|
4502
|
+
* @version SDK: 1.44.0 | ThoughtSpot Cloud: 26.2.0.cl
|
|
4503
|
+
*/
|
|
4504
|
+
Action["CreateGroup"] = "createGroup";
|
|
4505
|
+
/**
|
|
4506
|
+
* The **Ungroup Liveboard Group** menu action on a Liveboard.
|
|
4507
|
+
* Allows ungrouping a liveboard group.
|
|
4508
|
+
* @example
|
|
4509
|
+
* ```js
|
|
4510
|
+
* disabledActions: [Action.UngroupLiveboardGroup]
|
|
4511
|
+
* ```
|
|
4512
|
+
* @version SDK: 1.44.0 | ThoughtSpot Cloud: 26.2.0.cl
|
|
4513
|
+
*/
|
|
4514
|
+
Action["UngroupLiveboardGroup"] = "ungroupLiveboardGroup";
|
|
4461
4515
|
})(Action || (Action = {}));
|
|
4462
4516
|
var PrefetchFeatures;
|
|
4463
4517
|
(function (PrefetchFeatures) {
|
|
@@ -4580,6 +4634,85 @@ var LogLevel;
|
|
|
4580
4634
|
*/
|
|
4581
4635
|
LogLevel["TRACE"] = "TRACE";
|
|
4582
4636
|
})(LogLevel || (LogLevel = {}));
|
|
4637
|
+
/**
|
|
4638
|
+
* Error types emitted by embedded components.
|
|
4639
|
+
*
|
|
4640
|
+
* These enum values categorize different types of errors that can occur during
|
|
4641
|
+
* the lifecycle of an embedded ThoughtSpot component. Use these values to implement
|
|
4642
|
+
* specific error handling logic based on the error category.
|
|
4643
|
+
*
|
|
4644
|
+
* @see {@link EmbedErrorDetailsEvent} - The error event object structure
|
|
4645
|
+
* @see {@link EmbedEvent.Error} - The event that emits these errors
|
|
4646
|
+
* @version SDK: 1.44.2 | ThoughtSpot: 26.2.0.cl
|
|
4647
|
+
* @group Error Handling
|
|
4648
|
+
*/
|
|
4649
|
+
var ErrorDetailsTypes;
|
|
4650
|
+
(function (ErrorDetailsTypes) {
|
|
4651
|
+
/** API call failure */
|
|
4652
|
+
ErrorDetailsTypes["API"] = "API";
|
|
4653
|
+
/** General validation error */
|
|
4654
|
+
ErrorDetailsTypes["VALIDATION_ERROR"] = "VALIDATION_ERROR";
|
|
4655
|
+
/** Network connectivity or request error */
|
|
4656
|
+
ErrorDetailsTypes["NETWORK"] = "NETWORK";
|
|
4657
|
+
})(ErrorDetailsTypes || (ErrorDetailsTypes = {}));
|
|
4658
|
+
/**
|
|
4659
|
+
* Specific error codes for embedded component errors.
|
|
4660
|
+
*
|
|
4661
|
+
* These codes provide granular identification of errors that occur in embedded components.
|
|
4662
|
+
* They are returned in the {@link EmbedErrorDetailsEvent.code} property and allow for
|
|
4663
|
+
* precise error handling and debugging.
|
|
4664
|
+
*
|
|
4665
|
+
* The codes are organized into categories:
|
|
4666
|
+
* - **Worksheet ID not found or does not exist**: Errors related to applying or updating filters
|
|
4667
|
+
* - **Liveboard ID missing**: Errors related to missing liveboard ID
|
|
4668
|
+
* - **Conflicting actions configuration**: Errors related to conflicting actions configuration
|
|
4669
|
+
* - **Conflicting tabs configuration**: Errors related to conflicting tabs configuration
|
|
4670
|
+
* - **Initialization error**: Errors related to initialization error
|
|
4671
|
+
* - **Network error**: Errors related to network error
|
|
4672
|
+
* - **Custom action validation**: Errors related to custom action validation
|
|
4673
|
+
* - **Login failed**: Errors related to login failed
|
|
4674
|
+
* - **Render not called**: Errors related to render not called
|
|
4675
|
+
* - **Host event type undefined or invalid**: Errors related to host event type undefined or invalid
|
|
4676
|
+
*
|
|
4677
|
+
* @version SDK: 1.44.2 | ThoughtSpot: 26.2.0.cl
|
|
4678
|
+
* @group Error Handling
|
|
4679
|
+
* @see {@link EmbedErrorDetailsEvent} - The error event object that includes these codes
|
|
4680
|
+
* @see {@link ErrorDetailsTypes} - General error type categories
|
|
4681
|
+
*
|
|
4682
|
+
* @example
|
|
4683
|
+
* Handle specific error codes
|
|
4684
|
+
*
|
|
4685
|
+
* embed.on(EmbedEvent.Error, (error) => {
|
|
4686
|
+
* if (error.code === EmbedErrorCodes.WORKSHEET_ID_NOT_FOUND) {
|
|
4687
|
+
* console.error('Worksheet ID not found:', error.message);
|
|
4688
|
+
* }
|
|
4689
|
+
* });
|
|
4690
|
+
* */
|
|
4691
|
+
var EmbedErrorCodes;
|
|
4692
|
+
(function (EmbedErrorCodes) {
|
|
4693
|
+
/** Worksheet ID not found or does not exist */
|
|
4694
|
+
EmbedErrorCodes["WORKSHEET_ID_NOT_FOUND"] = "WORKSHEET_ID_NOT_FOUND";
|
|
4695
|
+
/** Required Liveboard ID is missing from configuration */
|
|
4696
|
+
EmbedErrorCodes["LIVEBOARD_ID_MISSING"] = "LIVEBOARD_ID_MISSING";
|
|
4697
|
+
/** Conflicting action configuration detected (e.g., both hiddenActions and visibleActions specified) */
|
|
4698
|
+
EmbedErrorCodes["CONFLICTING_ACTIONS_CONFIG"] = "CONFLICTING_ACTIONS_CONFIG";
|
|
4699
|
+
/** Conflicting tab configuration detected (e.g., both hiddenTabs and visibleTabs specified) */
|
|
4700
|
+
EmbedErrorCodes["CONFLICTING_TABS_CONFIG"] = "CONFLICTING_TABS_CONFIG";
|
|
4701
|
+
/** Error during component initialization */
|
|
4702
|
+
EmbedErrorCodes["INIT_ERROR"] = "INIT_ERROR";
|
|
4703
|
+
/** Network connectivity or request error */
|
|
4704
|
+
EmbedErrorCodes["NETWORK_ERROR"] = "NETWORK_ERROR";
|
|
4705
|
+
/** Custom action validation failed */
|
|
4706
|
+
EmbedErrorCodes["CUSTOM_ACTION_VALIDATION"] = "CUSTOM_ACTION_VALIDATION";
|
|
4707
|
+
/** Authentication/login failed */
|
|
4708
|
+
EmbedErrorCodes["LOGIN_FAILED"] = "LOGIN_FAILED";
|
|
4709
|
+
/** Render method was not called before attempting to use the component */
|
|
4710
|
+
EmbedErrorCodes["RENDER_NOT_CALLED"] = "RENDER_NOT_CALLED";
|
|
4711
|
+
/** Host event type is undefined or invalid */
|
|
4712
|
+
EmbedErrorCodes["HOST_EVENT_TYPE_UNDEFINED"] = "HOST_EVENT_TYPE_UNDEFINED";
|
|
4713
|
+
/** Error parsing api intercept body */
|
|
4714
|
+
EmbedErrorCodes["PARSING_API_INTERCEPT_BODY_ERROR"] = "PARSING_API_INTERCEPT_BODY_ERROR";
|
|
4715
|
+
})(EmbedErrorCodes || (EmbedErrorCodes = {}));
|
|
4583
4716
|
/**
|
|
4584
4717
|
* Enum for the type of API intercepted
|
|
4585
4718
|
*/
|
|
@@ -7446,6 +7579,13 @@ const ERROR_MESSAGE = {
|
|
|
7446
7579
|
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',
|
|
7447
7580
|
SPOTTER_AGENT_NOT_INITIALIZED: 'SpotterAgent not initialized',
|
|
7448
7581
|
OFFLINE_WARNING: 'Network not Detected. Embed is offline. Please reconnect and refresh',
|
|
7582
|
+
INIT_SDK_REQUIRED: 'You need to init the ThoughtSpot SDK module first',
|
|
7583
|
+
CONFLICTING_ACTIONS_CONFIG: 'You cannot have both hidden actions and visible actions',
|
|
7584
|
+
CONFLICTING_TABS_CONFIG: 'You cannot have both hidden Tabs and visible Tabs',
|
|
7585
|
+
RENDER_BEFORE_EVENTS_REQUIRED: 'Please call render before triggering events',
|
|
7586
|
+
HOST_EVENT_TYPE_UNDEFINED: 'Host event type is undefined',
|
|
7587
|
+
LOGIN_FAILED: 'Login failed',
|
|
7588
|
+
ERROR_PARSING_API_INTERCEPT_BODY: 'Error parsing api intercept body',
|
|
7449
7589
|
};
|
|
7450
7590
|
const CUSTOM_ACTIONS_ERROR_MESSAGE = {
|
|
7451
7591
|
INVALID_ACTION_OBJECT: 'Custom Action Validation Error: Invalid action object provided',
|
|
@@ -8355,7 +8495,7 @@ class AnswerService {
|
|
|
8355
8495
|
async getTML() {
|
|
8356
8496
|
const { object } = await this.executeQuery(getAnswerTML, {});
|
|
8357
8497
|
const edoc = object[0].edoc;
|
|
8358
|
-
const YAML = await import('./index-
|
|
8498
|
+
const YAML = await import('./index-BXCUJ09L.js');
|
|
8359
8499
|
const parsedDoc = YAML.parse(edoc);
|
|
8360
8500
|
return {
|
|
8361
8501
|
answer: {
|
|
@@ -17226,6 +17366,76 @@ if (typeof Promise.withResolvers === 'undefined') {
|
|
|
17226
17366
|
};
|
|
17227
17367
|
}
|
|
17228
17368
|
|
|
17369
|
+
/**
|
|
17370
|
+
* Reloads the ThoughtSpot iframe.
|
|
17371
|
+
* @param iFrame
|
|
17372
|
+
*/
|
|
17373
|
+
const reload = (iFrame) => {
|
|
17374
|
+
const src = iFrame.src;
|
|
17375
|
+
iFrame.src = '';
|
|
17376
|
+
setTimeout(() => {
|
|
17377
|
+
iFrame.src = src;
|
|
17378
|
+
}, 100);
|
|
17379
|
+
};
|
|
17380
|
+
/**
|
|
17381
|
+
* Post iframe message.
|
|
17382
|
+
* @param iFrame
|
|
17383
|
+
* @param message
|
|
17384
|
+
* @param message.type
|
|
17385
|
+
* @param message.data
|
|
17386
|
+
* @param thoughtSpotHost
|
|
17387
|
+
* @param channel
|
|
17388
|
+
*/
|
|
17389
|
+
function postIframeMessage(iFrame, message, thoughtSpotHost, channel) {
|
|
17390
|
+
var _a;
|
|
17391
|
+
return (_a = iFrame.contentWindow) === null || _a === void 0 ? void 0 : _a.postMessage(message, thoughtSpotHost, [channel === null || channel === void 0 ? void 0 : channel.port2]);
|
|
17392
|
+
}
|
|
17393
|
+
const TRIGGER_TIMEOUT = 30000;
|
|
17394
|
+
/**
|
|
17395
|
+
*
|
|
17396
|
+
* @param iFrame
|
|
17397
|
+
* @param messageType
|
|
17398
|
+
* @param thoughtSpotHost
|
|
17399
|
+
* @param data
|
|
17400
|
+
*/
|
|
17401
|
+
function processTrigger(iFrame, messageType, thoughtSpotHost, data) {
|
|
17402
|
+
return new Promise((res, rej) => {
|
|
17403
|
+
var _a;
|
|
17404
|
+
if (messageType === HostEvent.Reload) {
|
|
17405
|
+
reload(iFrame);
|
|
17406
|
+
return res(null);
|
|
17407
|
+
}
|
|
17408
|
+
if (messageType === HostEvent.Present) {
|
|
17409
|
+
const embedConfig = getEmbedConfig();
|
|
17410
|
+
const disableFullscreenPresentation = (_a = embedConfig === null || embedConfig === void 0 ? void 0 : embedConfig.disableFullscreenPresentation) !== null && _a !== void 0 ? _a : true;
|
|
17411
|
+
if (!disableFullscreenPresentation) {
|
|
17412
|
+
handlePresentEvent(iFrame);
|
|
17413
|
+
}
|
|
17414
|
+
else {
|
|
17415
|
+
logger$3.warn('Fullscreen presentation mode is disabled. Set disableFullscreenPresentation: false to enable this feature.');
|
|
17416
|
+
}
|
|
17417
|
+
}
|
|
17418
|
+
const channel = new MessageChannel();
|
|
17419
|
+
channel.port1.onmessage = ({ data: responseData }) => {
|
|
17420
|
+
var _a;
|
|
17421
|
+
channel.port1.close();
|
|
17422
|
+
const error = responseData.error || ((_a = responseData === null || responseData === void 0 ? void 0 : responseData.data) === null || _a === void 0 ? void 0 : _a.error);
|
|
17423
|
+
if (error) {
|
|
17424
|
+
rej(error);
|
|
17425
|
+
}
|
|
17426
|
+
else {
|
|
17427
|
+
res(responseData);
|
|
17428
|
+
}
|
|
17429
|
+
};
|
|
17430
|
+
// Close the messageChannel and resolve the promise if timeout.
|
|
17431
|
+
setTimeout(() => {
|
|
17432
|
+
channel.port1.close();
|
|
17433
|
+
res(new Error(ERROR_MESSAGE.TRIGGER_TIMED_OUT));
|
|
17434
|
+
}, TRIGGER_TIMEOUT);
|
|
17435
|
+
return postIframeMessage(iFrame, { type: messageType, data }, thoughtSpotHost, channel);
|
|
17436
|
+
});
|
|
17437
|
+
}
|
|
17438
|
+
|
|
17229
17439
|
/* eslint-disable camelcase */
|
|
17230
17440
|
/* eslint-disable import/no-mutable-exports */
|
|
17231
17441
|
/**
|
|
@@ -17571,6 +17781,19 @@ const exportTML = async (data) => {
|
|
|
17571
17781
|
.catch((error) => {
|
|
17572
17782
|
throw error;
|
|
17573
17783
|
});
|
|
17784
|
+
};
|
|
17785
|
+
/**
|
|
17786
|
+
* Reloads the ThoughtSpot iframe.
|
|
17787
|
+
* @param iFrame
|
|
17788
|
+
* @group Global methods
|
|
17789
|
+
* @version SDK: 1.43.1
|
|
17790
|
+
*/
|
|
17791
|
+
const reloadIframe = (iFrame) => {
|
|
17792
|
+
if (!iFrame) {
|
|
17793
|
+
logger$3.warn('reloadIframe called with no iFrame element.');
|
|
17794
|
+
return;
|
|
17795
|
+
}
|
|
17796
|
+
reload(iFrame);
|
|
17574
17797
|
};
|
|
17575
17798
|
|
|
17576
17799
|
/**
|
|
@@ -17704,77 +17927,7 @@ function processEventData(type, eventData, thoughtSpotHost, containerEl) {
|
|
|
17704
17927
|
return eventData;
|
|
17705
17928
|
}
|
|
17706
17929
|
|
|
17707
|
-
var name="@thoughtspot/visual-embed-sdk";var version$1="1.
|
|
17708
|
-
|
|
17709
|
-
/**
|
|
17710
|
-
* Reloads the ThoughtSpot iframe.
|
|
17711
|
-
* @param iFrame
|
|
17712
|
-
*/
|
|
17713
|
-
const reload = (iFrame) => {
|
|
17714
|
-
const src = iFrame.src;
|
|
17715
|
-
iFrame.src = '';
|
|
17716
|
-
setTimeout(() => {
|
|
17717
|
-
iFrame.src = src;
|
|
17718
|
-
}, 100);
|
|
17719
|
-
};
|
|
17720
|
-
/**
|
|
17721
|
-
* Post iframe message.
|
|
17722
|
-
* @param iFrame
|
|
17723
|
-
* @param message
|
|
17724
|
-
* @param message.type
|
|
17725
|
-
* @param message.data
|
|
17726
|
-
* @param thoughtSpotHost
|
|
17727
|
-
* @param channel
|
|
17728
|
-
*/
|
|
17729
|
-
function postIframeMessage(iFrame, message, thoughtSpotHost, channel) {
|
|
17730
|
-
var _a;
|
|
17731
|
-
return (_a = iFrame.contentWindow) === null || _a === void 0 ? void 0 : _a.postMessage(message, thoughtSpotHost, [channel === null || channel === void 0 ? void 0 : channel.port2]);
|
|
17732
|
-
}
|
|
17733
|
-
const TRIGGER_TIMEOUT = 30000;
|
|
17734
|
-
/**
|
|
17735
|
-
*
|
|
17736
|
-
* @param iFrame
|
|
17737
|
-
* @param messageType
|
|
17738
|
-
* @param thoughtSpotHost
|
|
17739
|
-
* @param data
|
|
17740
|
-
*/
|
|
17741
|
-
function processTrigger(iFrame, messageType, thoughtSpotHost, data) {
|
|
17742
|
-
return new Promise((res, rej) => {
|
|
17743
|
-
var _a;
|
|
17744
|
-
if (messageType === HostEvent.Reload) {
|
|
17745
|
-
reload(iFrame);
|
|
17746
|
-
return res(null);
|
|
17747
|
-
}
|
|
17748
|
-
if (messageType === HostEvent.Present) {
|
|
17749
|
-
const embedConfig = getEmbedConfig();
|
|
17750
|
-
const disableFullscreenPresentation = (_a = embedConfig === null || embedConfig === void 0 ? void 0 : embedConfig.disableFullscreenPresentation) !== null && _a !== void 0 ? _a : true;
|
|
17751
|
-
if (!disableFullscreenPresentation) {
|
|
17752
|
-
handlePresentEvent(iFrame);
|
|
17753
|
-
}
|
|
17754
|
-
else {
|
|
17755
|
-
logger$3.warn('Fullscreen presentation mode is disabled. Set disableFullscreenPresentation: false to enable this feature.');
|
|
17756
|
-
}
|
|
17757
|
-
}
|
|
17758
|
-
const channel = new MessageChannel();
|
|
17759
|
-
channel.port1.onmessage = ({ data: responseData }) => {
|
|
17760
|
-
var _a;
|
|
17761
|
-
channel.port1.close();
|
|
17762
|
-
const error = responseData.error || ((_a = responseData === null || responseData === void 0 ? void 0 : responseData.data) === null || _a === void 0 ? void 0 : _a.error);
|
|
17763
|
-
if (error) {
|
|
17764
|
-
rej(error);
|
|
17765
|
-
}
|
|
17766
|
-
else {
|
|
17767
|
-
res(responseData);
|
|
17768
|
-
}
|
|
17769
|
-
};
|
|
17770
|
-
// Close the messageChannel and resolve the promise if timeout.
|
|
17771
|
-
setTimeout(() => {
|
|
17772
|
-
channel.port1.close();
|
|
17773
|
-
res(new Error(ERROR_MESSAGE.TRIGGER_TIMED_OUT));
|
|
17774
|
-
}, TRIGGER_TIMEOUT);
|
|
17775
|
-
return postIframeMessage(iFrame, { type: messageType, data }, thoughtSpotHost, channel);
|
|
17776
|
-
});
|
|
17777
|
-
}
|
|
17930
|
+
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};
|
|
17778
17931
|
|
|
17779
17932
|
class HostEventClient {
|
|
17780
17933
|
constructor(iFrame) {
|
|
@@ -17972,9 +18125,13 @@ const handleInterceptEvent = async (params) => {
|
|
|
17972
18125
|
const { eventData, executeEvent, viewConfig, getUnsavedAnswerTml } = params;
|
|
17973
18126
|
const [interceptData, bodyParseError] = parseInterceptData(eventData.data);
|
|
17974
18127
|
if (bodyParseError) {
|
|
17975
|
-
|
|
17976
|
-
|
|
17977
|
-
|
|
18128
|
+
const errorDetails = {
|
|
18129
|
+
errorType: ErrorDetailsTypes.API,
|
|
18130
|
+
message: ERROR_MESSAGE.ERROR_PARSING_API_INTERCEPT_BODY,
|
|
18131
|
+
code: EmbedErrorCodes.PARSING_API_INTERCEPT_BODY_ERROR,
|
|
18132
|
+
error: ERROR_MESSAGE.ERROR_PARSING_API_INTERCEPT_BODY,
|
|
18133
|
+
};
|
|
18134
|
+
executeEvent(EmbedEvent.Error, errorDetails);
|
|
17978
18135
|
logger$3.error('Error parsing request body', bodyParseError);
|
|
17979
18136
|
return;
|
|
17980
18137
|
}
|
|
@@ -18286,19 +18443,23 @@ class TsEmbed {
|
|
|
18286
18443
|
* Throws error encountered during initialization.
|
|
18287
18444
|
*/
|
|
18288
18445
|
throwInitError() {
|
|
18289
|
-
this.handleError(
|
|
18446
|
+
this.handleError({
|
|
18447
|
+
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
18448
|
+
message: ERROR_MESSAGE.INIT_SDK_REQUIRED,
|
|
18449
|
+
code: EmbedErrorCodes.INIT_ERROR,
|
|
18450
|
+
error: ERROR_MESSAGE.INIT_SDK_REQUIRED,
|
|
18451
|
+
});
|
|
18290
18452
|
}
|
|
18291
18453
|
/**
|
|
18292
18454
|
* Handles errors within the SDK
|
|
18293
18455
|
* @param error The error message or object
|
|
18456
|
+
* @param errorDetails The error details
|
|
18294
18457
|
*/
|
|
18295
|
-
handleError(
|
|
18458
|
+
handleError(errorDetails) {
|
|
18296
18459
|
this.isError = true;
|
|
18297
|
-
this.executeCallbacks(EmbedEvent.Error,
|
|
18298
|
-
error,
|
|
18299
|
-
});
|
|
18460
|
+
this.executeCallbacks(EmbedEvent.Error, errorDetails);
|
|
18300
18461
|
// Log error
|
|
18301
|
-
logger$3.error(
|
|
18462
|
+
logger$3.error(errorDetails);
|
|
18302
18463
|
}
|
|
18303
18464
|
/**
|
|
18304
18465
|
* Extracts the type field from the event payload
|
|
@@ -18377,11 +18538,14 @@ class TsEmbed {
|
|
|
18377
18538
|
};
|
|
18378
18539
|
window.addEventListener('online', onlineEventListener);
|
|
18379
18540
|
const offlineEventListener = (e) => {
|
|
18380
|
-
const
|
|
18381
|
-
|
|
18382
|
-
|
|
18383
|
-
|
|
18384
|
-
|
|
18541
|
+
const errorDetails = {
|
|
18542
|
+
errorType: ErrorDetailsTypes.NETWORK,
|
|
18543
|
+
message: ERROR_MESSAGE.OFFLINE_WARNING,
|
|
18544
|
+
code: EmbedErrorCodes.NETWORK_ERROR,
|
|
18545
|
+
offlineWarning: ERROR_MESSAGE.OFFLINE_WARNING,
|
|
18546
|
+
};
|
|
18547
|
+
this.executeCallbacks(EmbedEvent.Error, errorDetails);
|
|
18548
|
+
logger$3.warn(errorDetails);
|
|
18385
18549
|
};
|
|
18386
18550
|
window.addEventListener('offline', offlineEventListener);
|
|
18387
18551
|
this.subscribedListeners.online = onlineEventListener;
|
|
@@ -18461,8 +18625,10 @@ class TsEmbed {
|
|
|
18461
18625
|
]);
|
|
18462
18626
|
if (customActionsResult.errors.length > 0) {
|
|
18463
18627
|
this.handleError({
|
|
18464
|
-
|
|
18628
|
+
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
18465
18629
|
message: customActionsResult.errors,
|
|
18630
|
+
code: EmbedErrorCodes.CUSTOM_ACTION_VALIDATION,
|
|
18631
|
+
error: { type: EmbedErrorCodes.CUSTOM_ACTION_VALIDATION, message: customActionsResult.errors }
|
|
18466
18632
|
});
|
|
18467
18633
|
}
|
|
18468
18634
|
const baseInitData = {
|
|
@@ -18559,11 +18725,21 @@ class TsEmbed {
|
|
|
18559
18725
|
...additionalFlagsFromView,
|
|
18560
18726
|
};
|
|
18561
18727
|
if (Array.isArray(visibleActions) && Array.isArray(hiddenActions)) {
|
|
18562
|
-
this.handleError(
|
|
18728
|
+
this.handleError({
|
|
18729
|
+
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
18730
|
+
message: ERROR_MESSAGE.CONFLICTING_ACTIONS_CONFIG,
|
|
18731
|
+
code: EmbedErrorCodes.CONFLICTING_ACTIONS_CONFIG,
|
|
18732
|
+
error: ERROR_MESSAGE.CONFLICTING_ACTIONS_CONFIG,
|
|
18733
|
+
});
|
|
18563
18734
|
return queryParams;
|
|
18564
18735
|
}
|
|
18565
18736
|
if (Array.isArray(visibleTabs) && Array.isArray(hiddenTabs)) {
|
|
18566
|
-
this.handleError(
|
|
18737
|
+
this.handleError({
|
|
18738
|
+
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
18739
|
+
message: ERROR_MESSAGE.CONFLICTING_TABS_CONFIG,
|
|
18740
|
+
code: EmbedErrorCodes.CONFLICTING_TABS_CONFIG,
|
|
18741
|
+
error: ERROR_MESSAGE.CONFLICTING_TABS_CONFIG,
|
|
18742
|
+
});
|
|
18567
18743
|
return queryParams;
|
|
18568
18744
|
}
|
|
18569
18745
|
if (primaryAction) {
|
|
@@ -18788,7 +18964,12 @@ class TsEmbed {
|
|
|
18788
18964
|
error: JSON.stringify(error),
|
|
18789
18965
|
});
|
|
18790
18966
|
this.handleInsertionIntoDOM(this.embedConfig.loginFailedMessage);
|
|
18791
|
-
this.handleError(
|
|
18967
|
+
this.handleError({
|
|
18968
|
+
errorType: ErrorDetailsTypes.API,
|
|
18969
|
+
message: error.message || ERROR_MESSAGE.LOGIN_FAILED,
|
|
18970
|
+
code: EmbedErrorCodes.LOGIN_FAILED,
|
|
18971
|
+
error: error,
|
|
18972
|
+
});
|
|
18792
18973
|
});
|
|
18793
18974
|
});
|
|
18794
18975
|
}
|
|
@@ -19093,11 +19274,21 @@ class TsEmbed {
|
|
|
19093
19274
|
async trigger(messageType, data = {}) {
|
|
19094
19275
|
uploadMixpanelEvent(`${MIXPANEL_EVENT.VISUAL_SDK_TRIGGER}-${messageType}`);
|
|
19095
19276
|
if (!this.isRendered) {
|
|
19096
|
-
this.handleError(
|
|
19277
|
+
this.handleError({
|
|
19278
|
+
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
19279
|
+
message: ERROR_MESSAGE.RENDER_BEFORE_EVENTS_REQUIRED,
|
|
19280
|
+
code: EmbedErrorCodes.RENDER_NOT_CALLED,
|
|
19281
|
+
error: ERROR_MESSAGE.RENDER_BEFORE_EVENTS_REQUIRED,
|
|
19282
|
+
});
|
|
19097
19283
|
return null;
|
|
19098
19284
|
}
|
|
19099
19285
|
if (!messageType) {
|
|
19100
|
-
this.handleError(
|
|
19286
|
+
this.handleError({
|
|
19287
|
+
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
19288
|
+
message: ERROR_MESSAGE.HOST_EVENT_TYPE_UNDEFINED,
|
|
19289
|
+
code: EmbedErrorCodes.HOST_EVENT_TYPE_UNDEFINED,
|
|
19290
|
+
error: ERROR_MESSAGE.HOST_EVENT_TYPE_UNDEFINED,
|
|
19291
|
+
});
|
|
19101
19292
|
return null;
|
|
19102
19293
|
}
|
|
19103
19294
|
// Check if iframe exists before triggering -
|
|
@@ -19578,7 +19769,7 @@ class AppEmbed extends V1Embed {
|
|
|
19578
19769
|
constructor(domSelector, viewConfig) {
|
|
19579
19770
|
viewConfig.embedComponentType = 'AppEmbed';
|
|
19580
19771
|
super(domSelector, viewConfig);
|
|
19581
|
-
this.defaultHeight =
|
|
19772
|
+
this.defaultHeight = 500;
|
|
19582
19773
|
this.sendFullHeightLazyLoadData = () => {
|
|
19583
19774
|
const data = calculateVisibleElementData(this.iFrame);
|
|
19584
19775
|
this.trigger(HostEvent.VisibleEmbedCoordinates, data);
|
|
@@ -19600,8 +19791,7 @@ class AppEmbed extends V1Embed {
|
|
|
19600
19791
|
* @param data The event payload
|
|
19601
19792
|
*/
|
|
19602
19793
|
this.updateIFrameHeight = (data) => {
|
|
19603
|
-
|
|
19604
|
-
this.setIFrameHeight(Math.max(data.data, (_a = this.iFrame) === null || _a === void 0 ? void 0 : _a.scrollHeight));
|
|
19794
|
+
this.setIFrameHeight(Math.max(data.data, this.defaultHeight));
|
|
19605
19795
|
this.sendFullHeightLazyLoadData();
|
|
19606
19796
|
};
|
|
19607
19797
|
this.embedIframeCenter = (data, responder) => {
|
|
@@ -19640,7 +19830,7 @@ class AppEmbed extends V1Embed {
|
|
|
19640
19830
|
* embedded Liveboard or visualization.
|
|
19641
19831
|
*/
|
|
19642
19832
|
getEmbedParams() {
|
|
19643
|
-
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$1.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;
|
|
19833
|
+
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$1.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;
|
|
19644
19834
|
let params = {};
|
|
19645
19835
|
params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
|
|
19646
19836
|
params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
|
|
@@ -19649,6 +19839,8 @@ class AppEmbed extends V1Embed {
|
|
|
19649
19839
|
params[Param.HideLiveboardHeader] = hideLiveboardHeader;
|
|
19650
19840
|
params[Param.ShowLiveboardTitle] = showLiveboardTitle;
|
|
19651
19841
|
params[Param.ShowLiveboardDescription] = !!showLiveboardDescription;
|
|
19842
|
+
params[Param.ShowMaskedFilterChip] = showMaskedFilterChip;
|
|
19843
|
+
params[Param.IsLiveboardMasterpiecesEnabled] = isLiveboardMasterpiecesEnabled;
|
|
19652
19844
|
params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
|
|
19653
19845
|
params[Param.IsFullAppEmbed] = true;
|
|
19654
19846
|
params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
|
|
@@ -19659,6 +19851,9 @@ class AppEmbed extends V1Embed {
|
|
|
19659
19851
|
params[Param.IsUnifiedSearchExperienceEnabled] = isUnifiedSearchExperienceEnabled;
|
|
19660
19852
|
params[Param.CoverAndFilterOptionInPDF] = !!coverAndFilterOptionInPDF;
|
|
19661
19853
|
params = this.getBaseQueryParams(params);
|
|
19854
|
+
if (!isUndefined$1(updatedSpotterChatPrompt)) {
|
|
19855
|
+
params[Param.UpdatedSpotterChatPrompt] = !!updatedSpotterChatPrompt;
|
|
19856
|
+
}
|
|
19662
19857
|
if (hideObjectSearch) {
|
|
19663
19858
|
params[Param.HideObjectSearch] = !!hideObjectSearch;
|
|
19664
19859
|
}
|
|
@@ -19717,6 +19912,7 @@ class AppEmbed extends V1Embed {
|
|
|
19717
19912
|
if (isCentralizedLiveboardFilterUXEnabled != undefined) {
|
|
19718
19913
|
params[Param.isCentralizedLiveboardFilterUXEnabled] = isCentralizedLiveboardFilterUXEnabled;
|
|
19719
19914
|
}
|
|
19915
|
+
this.defaultHeight = minimumHeight || this.defaultHeight;
|
|
19720
19916
|
params[Param.DataPanelV2Enabled] = dataPanelV2;
|
|
19721
19917
|
params[Param.HideHomepageLeftNav] = hideHomepageLeftNav;
|
|
19722
19918
|
params[Param.ModularHomeExperienceEnabled] = modularHomeExperience;
|
|
@@ -20071,7 +20267,7 @@ class LiveboardEmbed extends V1Embed {
|
|
|
20071
20267
|
getEmbedParamsObject() {
|
|
20072
20268
|
let params = {};
|
|
20073
20269
|
params = this.getBaseQueryParams(params);
|
|
20074
|
-
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;
|
|
20270
|
+
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;
|
|
20075
20271
|
const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
|
|
20076
20272
|
|| this.viewConfig.preventPinboardFilterRemoval;
|
|
20077
20273
|
if (fullHeight === true) {
|
|
@@ -20081,15 +20277,16 @@ class LiveboardEmbed extends V1Embed {
|
|
|
20081
20277
|
params[Param.RootMarginForLazyLoad] = this.viewConfig.lazyLoadingMargin;
|
|
20082
20278
|
}
|
|
20083
20279
|
}
|
|
20084
|
-
|
|
20085
|
-
this.defaultHeight = defaultHeight;
|
|
20086
|
-
}
|
|
20280
|
+
this.defaultHeight = minimumHeight || defaultHeight || this.defaultHeight;
|
|
20087
20281
|
if (enableVizTransformations !== undefined) {
|
|
20088
20282
|
params[Param.EnableVizTransformations] = enableVizTransformations.toString();
|
|
20089
20283
|
}
|
|
20090
20284
|
if (preventLiveboardFilterRemoval) {
|
|
20091
20285
|
params[Param.preventLiveboardFilterRemoval] = true;
|
|
20092
20286
|
}
|
|
20287
|
+
if (!isUndefined$1(updatedSpotterChatPrompt)) {
|
|
20288
|
+
params[Param.UpdatedSpotterChatPrompt] = !!updatedSpotterChatPrompt;
|
|
20289
|
+
}
|
|
20093
20290
|
if (visibleVizs) {
|
|
20094
20291
|
params[Param.visibleVizs] = visibleVizs;
|
|
20095
20292
|
}
|
|
@@ -20147,6 +20344,8 @@ class LiveboardEmbed extends V1Embed {
|
|
|
20147
20344
|
params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;
|
|
20148
20345
|
params[Param.ShowLiveboardReverifyBanner] = showLiveboardReverifyBanner;
|
|
20149
20346
|
params[Param.HideIrrelevantFiltersInTab] = hideIrrelevantChipsInLiveboardTabs;
|
|
20347
|
+
params[Param.ShowMaskedFilterChip] = showMaskedFilterChip;
|
|
20348
|
+
params[Param.IsLiveboardMasterpiecesEnabled] = isLiveboardMasterpiecesEnabled;
|
|
20150
20349
|
params[Param.IsEnhancedFilterInteractivityEnabled] = isEnhancedFilterInteractivityEnabled;
|
|
20151
20350
|
params[Param.DataPanelV2Enabled] = dataPanelV2;
|
|
20152
20351
|
params[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
|
|
@@ -20178,7 +20377,12 @@ class LiveboardEmbed extends V1Embed {
|
|
|
20178
20377
|
const { vizId, activeTabId } = this.viewConfig;
|
|
20179
20378
|
const liveboardId = (_a = this.viewConfig.liveboardId) !== null && _a !== void 0 ? _a : this.viewConfig.pinboardId;
|
|
20180
20379
|
if (!liveboardId) {
|
|
20181
|
-
this.handleError(
|
|
20380
|
+
this.handleError({
|
|
20381
|
+
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
20382
|
+
message: ERROR_MESSAGE.LIVEBOARD_VIZ_ID_VALIDATION,
|
|
20383
|
+
code: EmbedErrorCodes.LIVEBOARD_ID_MISSING,
|
|
20384
|
+
error: ERROR_MESSAGE.LIVEBOARD_VIZ_ID_VALIDATION,
|
|
20385
|
+
});
|
|
20182
20386
|
}
|
|
20183
20387
|
return `${this.getRootIframeSrc()}${this.getIframeSuffixSrc(liveboardId, vizId, activeTabId)}`;
|
|
20184
20388
|
}
|
|
@@ -21140,9 +21344,14 @@ class SpotterEmbed extends TsEmbed {
|
|
|
21140
21344
|
this.viewConfig = viewConfig;
|
|
21141
21345
|
}
|
|
21142
21346
|
getEmbedParamsObject() {
|
|
21143
|
-
const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, enablePastConversationsSidebar, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, } = this.viewConfig;
|
|
21347
|
+
const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, enablePastConversationsSidebar, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, updatedSpotterChatPrompt, } = this.viewConfig;
|
|
21144
21348
|
if (!worksheetId) {
|
|
21145
|
-
this.handleError(
|
|
21349
|
+
this.handleError({
|
|
21350
|
+
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
21351
|
+
message: ERROR_MESSAGE.SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND,
|
|
21352
|
+
code: EmbedErrorCodes.WORKSHEET_ID_NOT_FOUND,
|
|
21353
|
+
error: ERROR_MESSAGE.SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND,
|
|
21354
|
+
});
|
|
21146
21355
|
}
|
|
21147
21356
|
const queryParams = this.getBaseQueryParams();
|
|
21148
21357
|
queryParams[Param.SpotterEnabled] = true;
|
|
@@ -21161,6 +21370,9 @@ class SpotterEmbed extends TsEmbed {
|
|
|
21161
21370
|
if (!isUndefined_1(hideSampleQuestions)) {
|
|
21162
21371
|
queryParams[Param.HideSampleQuestions] = !!hideSampleQuestions;
|
|
21163
21372
|
}
|
|
21373
|
+
if (!isUndefined_1(updatedSpotterChatPrompt)) {
|
|
21374
|
+
queryParams[Param.UpdatedSpotterChatPrompt] = !!updatedSpotterChatPrompt;
|
|
21375
|
+
}
|
|
21164
21376
|
return queryParams;
|
|
21165
21377
|
}
|
|
21166
21378
|
getIframeSrc() {
|
|
@@ -21825,4 +22037,4 @@ const createLiveboardWithAnswers = async (answers, name) => {
|
|
|
21825
22037
|
return result;
|
|
21826
22038
|
};
|
|
21827
22039
|
|
|
21828
|
-
export { Action, AnswerService, AppEmbed, AuthEvent, AuthFailureType, AuthStatus, AuthType, BodylessConversation, ContextMenuTriggerOptions, ConversationEmbed, CustomActionTarget, CustomActionsPosition, DataPanelCustomColumnGroupsAccordionState$1 as DataPanelCustomColumnGroupsAccordionState, DataSourceVisualMode, EmbedEvent, HomeLeftNavItem, HomePage, HomePageSearchBarMode, HomepageModule, HostEvent, InterceptedApiType, ListPage, ListPageColumns, LiveboardEmbed, LogLevel, MIXPANEL_EVENT, Page, PinboardEmbed, PrefetchFeatures, PrimaryNavbarVersion, RuntimeFilterOp, SageEmbed, SearchBarEmbed, SearchEmbed, SpotterAgentEmbed, SpotterEmbed, UIPassthroughEvent, createLiveboardWithAnswers, executeTML, exportTML, getAnswerFromQuery, getEmbedConfig as getInitConfig, getSessionInfo, init, logout, prefetch, resetCachedAuthToken, tokenizedFetch, uploadMixpanelEvent };
|
|
22040
|
+
export { Action, AnswerService, AppEmbed, AuthEvent, AuthFailureType, AuthStatus, AuthType, BodylessConversation, ContextMenuTriggerOptions, ConversationEmbed, CustomActionTarget, CustomActionsPosition, DataPanelCustomColumnGroupsAccordionState$1 as DataPanelCustomColumnGroupsAccordionState, DataSourceVisualMode, EmbedEvent, HomeLeftNavItem, HomePage, HomePageSearchBarMode, HomepageModule, HostEvent, InterceptedApiType, ListPage, ListPageColumns, LiveboardEmbed, LogLevel, MIXPANEL_EVENT, Page, PinboardEmbed, PrefetchFeatures, PrimaryNavbarVersion, RuntimeFilterOp, SageEmbed, SearchBarEmbed, SearchEmbed, SpotterAgentEmbed, SpotterEmbed, UIPassthroughEvent, createLiveboardWithAnswers, executeTML, exportTML, getAnswerFromQuery, getEmbedConfig as getInitConfig, getSessionInfo, init, logout, prefetch, reloadIframe, resetCachedAuthToken, tokenizedFetch, uploadMixpanelEvent };
|