@thoughtspot/visual-embed-sdk 1.44.1 → 1.44.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/package.json +6 -5
- package/cjs/src/api-intercept.d.ts.map +1 -1
- package/cjs/src/api-intercept.js +8 -3
- package/cjs/src/api-intercept.js.map +1 -1
- package/cjs/src/api-intercept.spec.js +19 -3
- package/cjs/src/api-intercept.spec.js.map +1 -1
- package/cjs/src/auth.spec.js +43 -42
- package/cjs/src/auth.spec.js.map +1 -1
- package/cjs/src/authToken.spec.js +3 -3
- package/cjs/src/authToken.spec.js.map +1 -1
- package/cjs/src/embed/app.d.ts +17 -0
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +9 -5
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/app.spec.js +96 -6
- package/cjs/src/embed/app.spec.js.map +1 -1
- package/cjs/src/embed/base.spec.js +11 -15
- package/cjs/src/embed/base.spec.js.map +1 -1
- package/cjs/src/embed/bodyless-conversation.spec.js +2 -2
- package/cjs/src/embed/bodyless-conversation.spec.js.map +1 -1
- package/cjs/src/embed/conversation.d.ts.map +1 -1
- package/cjs/src/embed/conversation.js +6 -1
- package/cjs/src/embed/conversation.js.map +1 -1
- package/cjs/src/embed/conversation.spec.js +8 -3
- package/cjs/src/embed/conversation.spec.js.map +1 -1
- package/cjs/src/embed/embed.spec.js +101 -2
- package/cjs/src/embed/embed.spec.js.map +1 -1
- package/cjs/src/embed/events.spec.js +2 -2
- package/cjs/src/embed/events.spec.js.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.spec.js +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts +18 -0
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +13 -6
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/liveboard.spec.js +114 -26
- package/cjs/src/embed/liveboard.spec.js.map +1 -1
- package/cjs/src/embed/pinboard.spec.js +1 -1
- package/cjs/src/embed/pinboard.spec.js.map +1 -1
- package/cjs/src/embed/sage.spec.js +2 -2
- package/cjs/src/embed/sage.spec.js.map +1 -1
- package/cjs/src/embed/search.spec.js +118 -2
- package/cjs/src/embed/search.spec.js.map +1 -1
- package/cjs/src/embed/ts-embed-trigger.spec.js +2 -3
- package/cjs/src/embed/ts-embed-trigger.spec.js.map +1 -1
- package/cjs/src/embed/ts-embed.d.ts +3 -2
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +51 -17
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/embed/ts-embed.spec.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.spec.js +335 -71
- package/cjs/src/embed/ts-embed.spec.js.map +1 -1
- package/cjs/src/errors.d.ts +7 -0
- package/cjs/src/errors.d.ts.map +1 -1
- package/cjs/src/errors.js +7 -0
- package/cjs/src/errors.js.map +1 -1
- package/cjs/src/mixpanel-service.spec.js +1 -1
- package/cjs/src/mixpanel-service.spec.js.map +1 -1
- package/cjs/src/react/index.spec.js +3 -4
- package/cjs/src/react/index.spec.js.map +1 -1
- package/cjs/src/test/test-utils.js +1 -1
- package/cjs/src/test/test-utils.js.map +1 -1
- package/cjs/src/types.d.ts +194 -1
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +94 -2
- package/cjs/src/types.js.map +1 -1
- package/cjs/src/utils/authService/authService.spec.js +8 -8
- package/cjs/src/utils/authService/authService.spec.js.map +1 -1
- package/cjs/src/utils/authService/tokenizedAuthService.spec.js.map +1 -1
- package/cjs/src/utils/graphql/answerService/answerService.spec.js +1 -1
- package/cjs/src/utils/graphql/answerService/answerService.spec.js.map +1 -1
- package/cjs/src/utils/graphql/graphql-request.spec.js +1 -1
- package/cjs/src/utils/graphql/graphql-request.spec.js.map +1 -1
- package/cjs/src/utils/graphql/sourceService.spec.js +1 -1
- package/cjs/src/utils/graphql/sourceService.spec.js.map +1 -1
- package/cjs/src/utils/logger.spec.d.ts +5 -20
- package/cjs/src/utils/logger.spec.d.ts.map +1 -1
- package/cjs/src/utils/processData.spec.js +17 -17
- package/cjs/src/utils/processData.spec.js.map +1 -1
- package/cjs/src/utils/processTrigger.spec.js +8 -8
- package/cjs/src/utils/processTrigger.spec.js.map +1 -1
- package/cjs/src/utils.d.ts +6 -0
- package/cjs/src/utils.d.ts.map +1 -1
- package/cjs/src/utils.js +32 -1
- package/cjs/src/utils.js.map +1 -1
- package/cjs/src/utils.spec.js +19 -10
- package/cjs/src/utils.spec.js.map +1 -1
- package/dist/{index-BE9gGzRX.js → index-CSFjfTVk.js} +1 -1
- package/dist/src/api-intercept.d.ts.map +1 -1
- package/dist/src/embed/app.d.ts +17 -0
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/conversation.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts +18 -0
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.d.ts +3 -2
- package/dist/src/embed/ts-embed.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.spec.d.ts.map +1 -1
- package/dist/src/errors.d.ts +7 -0
- package/dist/src/errors.d.ts.map +1 -1
- package/dist/src/types.d.ts +194 -1
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/logger.spec.d.ts +5 -20
- package/dist/src/utils/logger.spec.d.ts.map +1 -1
- package/dist/src/utils.d.ts +6 -0
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +219 -36
- package/dist/tsembed-react.js +218 -35
- package/dist/tsembed.es.js +219 -36
- package/dist/tsembed.js +218 -35
- package/dist/visual-embed-sdk-react-full.d.ts +184 -2
- package/dist/visual-embed-sdk-react.d.ts +184 -2
- package/dist/visual-embed-sdk.d.ts +184 -2
- package/lib/package.json +6 -5
- package/lib/src/api-intercept.d.ts.map +1 -1
- package/lib/src/api-intercept.js +9 -4
- package/lib/src/api-intercept.js.map +1 -1
- package/lib/src/api-intercept.spec.js +20 -4
- package/lib/src/api-intercept.spec.js.map +1 -1
- package/lib/src/auth.spec.js +43 -42
- package/lib/src/auth.spec.js.map +1 -1
- package/lib/src/authToken.spec.js +3 -3
- package/lib/src/authToken.spec.js.map +1 -1
- package/lib/src/embed/app.d.ts +17 -0
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +10 -6
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/app.spec.js +96 -6
- package/lib/src/embed/app.spec.js.map +1 -1
- package/lib/src/embed/base.spec.js +11 -15
- package/lib/src/embed/base.spec.js.map +1 -1
- package/lib/src/embed/bodyless-conversation.spec.js +2 -2
- package/lib/src/embed/bodyless-conversation.spec.js.map +1 -1
- package/lib/src/embed/conversation.d.ts.map +1 -1
- package/lib/src/embed/conversation.js +7 -2
- package/lib/src/embed/conversation.js.map +1 -1
- package/lib/src/embed/conversation.spec.js +9 -4
- package/lib/src/embed/conversation.spec.js.map +1 -1
- package/lib/src/embed/embed.spec.js +103 -4
- package/lib/src/embed/embed.spec.js.map +1 -1
- package/lib/src/embed/events.spec.js +2 -2
- package/lib/src/embed/events.spec.js.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.spec.js +2 -2
- package/lib/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts +18 -0
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +15 -8
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +114 -26
- package/lib/src/embed/liveboard.spec.js.map +1 -1
- package/lib/src/embed/pinboard.spec.js +1 -1
- package/lib/src/embed/pinboard.spec.js.map +1 -1
- package/lib/src/embed/sage.spec.js +2 -2
- package/lib/src/embed/sage.spec.js.map +1 -1
- package/lib/src/embed/search.spec.js +118 -2
- package/lib/src/embed/search.spec.js.map +1 -1
- package/lib/src/embed/ts-embed-trigger.spec.js +2 -3
- package/lib/src/embed/ts-embed-trigger.spec.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts +3 -2
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +52 -18
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/embed/ts-embed.spec.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.spec.js +336 -72
- package/lib/src/embed/ts-embed.spec.js.map +1 -1
- package/lib/src/errors.d.ts +7 -0
- package/lib/src/errors.d.ts.map +1 -1
- package/lib/src/errors.js +7 -0
- package/lib/src/errors.js.map +1 -1
- package/lib/src/mixpanel-service.spec.js +1 -1
- package/lib/src/mixpanel-service.spec.js.map +1 -1
- package/lib/src/react/index.spec.js +3 -4
- package/lib/src/react/index.spec.js.map +1 -1
- package/lib/src/test/test-utils.js +1 -1
- package/lib/src/test/test-utils.js.map +1 -1
- package/lib/src/types.d.ts +194 -1
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +93 -1
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils/authService/authService.spec.js +8 -8
- package/lib/src/utils/authService/authService.spec.js.map +1 -1
- package/lib/src/utils/authService/tokenizedAuthService.spec.js.map +1 -1
- package/lib/src/utils/graphql/answerService/answerService.spec.js +1 -1
- package/lib/src/utils/graphql/answerService/answerService.spec.js.map +1 -1
- package/lib/src/utils/graphql/graphql-request.spec.js +1 -1
- package/lib/src/utils/graphql/graphql-request.spec.js.map +1 -1
- package/lib/src/utils/graphql/sourceService.spec.js +1 -1
- package/lib/src/utils/graphql/sourceService.spec.js.map +1 -1
- package/lib/src/utils/logger.spec.d.ts +5 -20
- package/lib/src/utils/logger.spec.d.ts.map +1 -1
- package/lib/src/utils/processData.spec.js +17 -17
- package/lib/src/utils/processData.spec.js.map +1 -1
- package/lib/src/utils/processTrigger.spec.js +8 -8
- package/lib/src/utils/processTrigger.spec.js.map +1 -1
- package/lib/src/utils.d.ts +6 -0
- package/lib/src/utils.d.ts.map +1 -1
- package/lib/src/utils.js +30 -0
- package/lib/src/utils.js.map +1 -1
- package/lib/src/utils.spec.js +20 -11
- package/lib/src/utils.spec.js.map +1 -1
- package/package.json +6 -5
- package/src/api-intercept.spec.ts +23 -10
- package/src/api-intercept.ts +9 -4
- package/src/auth.spec.ts +53 -51
- package/src/authToken.spec.ts +3 -3
- package/src/embed/app.spec.ts +128 -7
- package/src/embed/app.ts +30 -4
- package/src/embed/base.spec.ts +16 -20
- package/src/embed/bodyless-conversation.spec.ts +2 -2
- package/src/embed/conversation.spec.ts +9 -4
- package/src/embed/conversation.ts +7 -2
- package/src/embed/embed.spec.ts +122 -2
- package/src/embed/events.spec.ts +2 -2
- package/src/embed/hostEventClient/host-event-client.spec.ts +2 -2
- package/src/embed/liveboard.spec.ts +137 -29
- package/src/embed/liveboard.ts +36 -6
- package/src/embed/pinboard.spec.ts +1 -1
- package/src/embed/sage.spec.ts +2 -2
- package/src/embed/search.spec.ts +133 -2
- package/src/embed/ts-embed-trigger.spec.ts +2 -3
- package/src/embed/ts-embed.spec.ts +424 -91
- package/src/embed/ts-embed.ts +56 -19
- package/src/errors.ts +7 -0
- package/src/mixpanel-service.spec.ts +1 -1
- package/src/react/index.spec.tsx +4 -5
- package/src/test/test-utils.ts +2 -2
- package/src/types.ts +206 -1
- package/src/utils/authService/authService.spec.ts +17 -17
- package/src/utils/authService/tokenizedAuthService.spec.ts +4 -4
- package/src/utils/graphql/answerService/answerService.spec.ts +3 -3
- package/src/utils/graphql/graphql-request.spec.ts +2 -2
- package/src/utils/graphql/sourceService.spec.ts +1 -1
- package/src/utils/processData.spec.ts +26 -26
- package/src/utils/processTrigger.spec.ts +8 -8
- package/src/utils.spec.ts +22 -11
- package/src/utils.ts +34 -0
package/dist/tsembed.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @thoughtspot/visual-embed-sdk version 1.44.
|
|
1
|
+
/* @thoughtspot/visual-embed-sdk version 1.44.2 */
|
|
2
2
|
'use client';
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
@@ -602,6 +602,7 @@
|
|
|
602
602
|
* SearchEmbed.on(EmbedEvent.Error, (error) => {
|
|
603
603
|
* console.log(error);
|
|
604
604
|
* // { type: "Error", data: { errorType: "API", error: { message: '...', error: '...' } } }
|
|
605
|
+
* // { errorType: "API", message: '...', code: '...' } new format
|
|
605
606
|
* });
|
|
606
607
|
* ```
|
|
607
608
|
* @example
|
|
@@ -613,6 +614,7 @@
|
|
|
613
614
|
* // message: "Fullscreen API is not enabled",
|
|
614
615
|
* // stack: "..."
|
|
615
616
|
* // } }}
|
|
617
|
+
* // { errorType: "FULLSCREEN", message: "Fullscreen API is not enabled", code: '...' } new format
|
|
616
618
|
* })
|
|
617
619
|
* ```
|
|
618
620
|
*/
|
|
@@ -768,7 +770,8 @@
|
|
|
768
770
|
*/
|
|
769
771
|
EmbedEvent["ALL"] = "*";
|
|
770
772
|
/**
|
|
771
|
-
* Emitted when an Answer is saved in the app
|
|
773
|
+
* Emitted when an Answer is saved in the app.
|
|
774
|
+
* Use start:true to subscribe to when save is initiated, or end:true to subscribe to when save is completed. Default is end:true.
|
|
772
775
|
* @Version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
773
776
|
* @example
|
|
774
777
|
*```js
|
|
@@ -803,6 +806,7 @@
|
|
|
803
806
|
EmbedEvent["Download"] = "download";
|
|
804
807
|
/**
|
|
805
808
|
* Emitted when the download action is triggered on an Answer.
|
|
809
|
+
* Use start:true to subscribe to when download is initiated, or end:true to subscribe to when download is completed. Default is end:true.
|
|
806
810
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.0.sw
|
|
807
811
|
* @example
|
|
808
812
|
*```js
|
|
@@ -817,6 +821,7 @@
|
|
|
817
821
|
EmbedEvent["DownloadAsPng"] = "downloadAsPng";
|
|
818
822
|
/**
|
|
819
823
|
* Emitted when the Download as PDF action is triggered on an Answer
|
|
824
|
+
* 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.
|
|
820
825
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
821
826
|
* @example
|
|
822
827
|
*```js
|
|
@@ -831,6 +836,7 @@
|
|
|
831
836
|
EmbedEvent["DownloadAsPdf"] = "downloadAsPdf";
|
|
832
837
|
/**
|
|
833
838
|
* Emitted when the Download as CSV action is triggered on an Answer.
|
|
839
|
+
* 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.
|
|
834
840
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
835
841
|
* @example
|
|
836
842
|
*```js
|
|
@@ -845,6 +851,7 @@
|
|
|
845
851
|
EmbedEvent["DownloadAsCsv"] = "downloadAsCsv";
|
|
846
852
|
/**
|
|
847
853
|
* Emitted when the Download as XLSX action is triggered on an Answer.
|
|
854
|
+
* 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.
|
|
848
855
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
849
856
|
* @example
|
|
850
857
|
*```js
|
|
@@ -859,6 +866,7 @@
|
|
|
859
866
|
EmbedEvent["DownloadAsXlsx"] = "downloadAsXlsx";
|
|
860
867
|
/**
|
|
861
868
|
* Emitted when an Answer is deleted in the app
|
|
869
|
+
* Use start:true to subscribe to when delete is initiated, or end:true to subscribe to when delete is completed. Default is end:true.
|
|
862
870
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
863
871
|
* @example
|
|
864
872
|
*```js
|
|
@@ -885,6 +893,7 @@
|
|
|
885
893
|
/**
|
|
886
894
|
* Emitted when a user initiates the Pin action to
|
|
887
895
|
* add an Answer to a Liveboard.
|
|
896
|
+
* Use start:true to subscribe to when pin is initiated, or end:true to subscribe to when pin is completed. Default is end:true.
|
|
888
897
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
889
898
|
* @example
|
|
890
899
|
*```js
|
|
@@ -998,6 +1007,7 @@
|
|
|
998
1007
|
/**
|
|
999
1008
|
* Emitted when the **Export TML** action is triggered on an
|
|
1000
1009
|
* an embedded object in the app
|
|
1010
|
+
* Use start:true to subscribe to when export is initiated, or end:true to subscribe to when export is completed. Default is end:true.
|
|
1001
1011
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1002
1012
|
* @example
|
|
1003
1013
|
*```js
|
|
@@ -1023,6 +1033,7 @@
|
|
|
1023
1033
|
EmbedEvent["SaveAsView"] = "saveAsView";
|
|
1024
1034
|
/**
|
|
1025
1035
|
* Emitted when the user creates a copy of an Answer.
|
|
1036
|
+
* 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.
|
|
1026
1037
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1027
1038
|
* @example
|
|
1028
1039
|
*```js
|
|
@@ -3094,6 +3105,8 @@
|
|
|
3094
3105
|
Param["HideLiveboardHeader"] = "hideLiveboardHeader";
|
|
3095
3106
|
Param["ShowLiveboardDescription"] = "showLiveboardDescription";
|
|
3096
3107
|
Param["ShowLiveboardTitle"] = "showLiveboardTitle";
|
|
3108
|
+
Param["ShowMaskedFilterChip"] = "showMaskedFilterChip";
|
|
3109
|
+
Param["IsLiveboardMasterpiecesEnabled"] = "isLiveboardMasterpiecesEnabled";
|
|
3097
3110
|
Param["HiddenTabs"] = "hideTabs";
|
|
3098
3111
|
Param["VisibleTabs"] = "visibleTabs";
|
|
3099
3112
|
Param["HideTabPanel"] = "hideTabPanel";
|
|
@@ -4627,6 +4640,85 @@
|
|
|
4627
4640
|
*/
|
|
4628
4641
|
LogLevel["TRACE"] = "TRACE";
|
|
4629
4642
|
})(exports.LogLevel || (exports.LogLevel = {}));
|
|
4643
|
+
/**
|
|
4644
|
+
* Error types emitted by embedded components.
|
|
4645
|
+
*
|
|
4646
|
+
* These enum values categorize different types of errors that can occur during
|
|
4647
|
+
* the lifecycle of an embedded ThoughtSpot component. Use these values to implement
|
|
4648
|
+
* specific error handling logic based on the error category.
|
|
4649
|
+
*
|
|
4650
|
+
* @see {@link EmbedErrorDetailsEvent} - The error event object structure
|
|
4651
|
+
* @see {@link EmbedEvent.Error} - The event that emits these errors
|
|
4652
|
+
* @version SDK: 1.44.2 | ThoughtSpot: 26.2.0.cl
|
|
4653
|
+
* @group Error Handling
|
|
4654
|
+
*/
|
|
4655
|
+
var ErrorDetailsTypes;
|
|
4656
|
+
(function (ErrorDetailsTypes) {
|
|
4657
|
+
/** API call failure */
|
|
4658
|
+
ErrorDetailsTypes["API"] = "API";
|
|
4659
|
+
/** General validation error */
|
|
4660
|
+
ErrorDetailsTypes["VALIDATION_ERROR"] = "VALIDATION_ERROR";
|
|
4661
|
+
/** Network connectivity or request error */
|
|
4662
|
+
ErrorDetailsTypes["NETWORK"] = "NETWORK";
|
|
4663
|
+
})(ErrorDetailsTypes || (ErrorDetailsTypes = {}));
|
|
4664
|
+
/**
|
|
4665
|
+
* Specific error codes for embedded component errors.
|
|
4666
|
+
*
|
|
4667
|
+
* These codes provide granular identification of errors that occur in embedded components.
|
|
4668
|
+
* They are returned in the {@link EmbedErrorDetailsEvent.code} property and allow for
|
|
4669
|
+
* precise error handling and debugging.
|
|
4670
|
+
*
|
|
4671
|
+
* The codes are organized into categories:
|
|
4672
|
+
* - **Worksheet ID not found or does not exist**: Errors related to applying or updating filters
|
|
4673
|
+
* - **Liveboard ID missing**: Errors related to missing liveboard ID
|
|
4674
|
+
* - **Conflicting actions configuration**: Errors related to conflicting actions configuration
|
|
4675
|
+
* - **Conflicting tabs configuration**: Errors related to conflicting tabs configuration
|
|
4676
|
+
* - **Initialization error**: Errors related to initialization error
|
|
4677
|
+
* - **Network error**: Errors related to network error
|
|
4678
|
+
* - **Custom action validation**: Errors related to custom action validation
|
|
4679
|
+
* - **Login failed**: Errors related to login failed
|
|
4680
|
+
* - **Render not called**: Errors related to render not called
|
|
4681
|
+
* - **Host event type undefined or invalid**: Errors related to host event type undefined or invalid
|
|
4682
|
+
*
|
|
4683
|
+
* @version SDK: 1.44.2 | ThoughtSpot: 26.2.0.cl
|
|
4684
|
+
* @group Error Handling
|
|
4685
|
+
* @see {@link EmbedErrorDetailsEvent} - The error event object that includes these codes
|
|
4686
|
+
* @see {@link ErrorDetailsTypes} - General error type categories
|
|
4687
|
+
*
|
|
4688
|
+
* @example
|
|
4689
|
+
* Handle specific error codes
|
|
4690
|
+
*
|
|
4691
|
+
* embed.on(EmbedEvent.Error, (error) => {
|
|
4692
|
+
* if (error.code === EmbedErrorCodes.WORKSHEET_ID_NOT_FOUND) {
|
|
4693
|
+
* console.error('Worksheet ID not found:', error.message);
|
|
4694
|
+
* }
|
|
4695
|
+
* });
|
|
4696
|
+
* */
|
|
4697
|
+
var EmbedErrorCodes;
|
|
4698
|
+
(function (EmbedErrorCodes) {
|
|
4699
|
+
/** Worksheet ID not found or does not exist */
|
|
4700
|
+
EmbedErrorCodes["WORKSHEET_ID_NOT_FOUND"] = "WORKSHEET_ID_NOT_FOUND";
|
|
4701
|
+
/** Required Liveboard ID is missing from configuration */
|
|
4702
|
+
EmbedErrorCodes["LIVEBOARD_ID_MISSING"] = "LIVEBOARD_ID_MISSING";
|
|
4703
|
+
/** Conflicting action configuration detected (e.g., both hiddenActions and visibleActions specified) */
|
|
4704
|
+
EmbedErrorCodes["CONFLICTING_ACTIONS_CONFIG"] = "CONFLICTING_ACTIONS_CONFIG";
|
|
4705
|
+
/** Conflicting tab configuration detected (e.g., both hiddenTabs and visibleTabs specified) */
|
|
4706
|
+
EmbedErrorCodes["CONFLICTING_TABS_CONFIG"] = "CONFLICTING_TABS_CONFIG";
|
|
4707
|
+
/** Error during component initialization */
|
|
4708
|
+
EmbedErrorCodes["INIT_ERROR"] = "INIT_ERROR";
|
|
4709
|
+
/** Network connectivity or request error */
|
|
4710
|
+
EmbedErrorCodes["NETWORK_ERROR"] = "NETWORK_ERROR";
|
|
4711
|
+
/** Custom action validation failed */
|
|
4712
|
+
EmbedErrorCodes["CUSTOM_ACTION_VALIDATION"] = "CUSTOM_ACTION_VALIDATION";
|
|
4713
|
+
/** Authentication/login failed */
|
|
4714
|
+
EmbedErrorCodes["LOGIN_FAILED"] = "LOGIN_FAILED";
|
|
4715
|
+
/** Render method was not called before attempting to use the component */
|
|
4716
|
+
EmbedErrorCodes["RENDER_NOT_CALLED"] = "RENDER_NOT_CALLED";
|
|
4717
|
+
/** Host event type is undefined or invalid */
|
|
4718
|
+
EmbedErrorCodes["HOST_EVENT_TYPE_UNDEFINED"] = "HOST_EVENT_TYPE_UNDEFINED";
|
|
4719
|
+
/** Error parsing api intercept body */
|
|
4720
|
+
EmbedErrorCodes["PARSING_API_INTERCEPT_BODY_ERROR"] = "PARSING_API_INTERCEPT_BODY_ERROR";
|
|
4721
|
+
})(EmbedErrorCodes || (EmbedErrorCodes = {}));
|
|
4630
4722
|
/**
|
|
4631
4723
|
* Enum for the type of API intercepted
|
|
4632
4724
|
*/
|
|
@@ -4869,6 +4961,36 @@
|
|
|
4869
4961
|
}
|
|
4870
4962
|
return value;
|
|
4871
4963
|
};
|
|
4964
|
+
/**
|
|
4965
|
+
* Validates if a string is a valid CSS margin value.
|
|
4966
|
+
* @param value - The string to validate
|
|
4967
|
+
* @returns true if the value is a valid CSS margin value, false otherwise
|
|
4968
|
+
*/
|
|
4969
|
+
const isValidCssMargin = (value) => {
|
|
4970
|
+
if (isUndefined$1(value)) {
|
|
4971
|
+
return false;
|
|
4972
|
+
}
|
|
4973
|
+
if (typeof value !== 'string') {
|
|
4974
|
+
logger$3.error('Please provide a valid lazyLoadingMargin value (e.g., "10px")');
|
|
4975
|
+
return false;
|
|
4976
|
+
}
|
|
4977
|
+
// This pattern allows for an optional negative sign, and numbers that can be integers or decimals (including leading dot).
|
|
4978
|
+
const cssUnitPattern = /^-?(\d+(\.\d*)?|\.\d+)(px|em|rem|%|vh|vw)$/i;
|
|
4979
|
+
const parts = value.trim().split(/\s+/);
|
|
4980
|
+
if (parts.length > 4) {
|
|
4981
|
+
logger$3.error('Please provide a valid lazyLoadingMargin value (e.g., "10px")');
|
|
4982
|
+
return false;
|
|
4983
|
+
}
|
|
4984
|
+
const isValid = parts.every(part => {
|
|
4985
|
+
const trimmedPart = part.trim();
|
|
4986
|
+
return trimmedPart.toLowerCase() === 'auto' || trimmedPart === '0' || cssUnitPattern.test(trimmedPart);
|
|
4987
|
+
});
|
|
4988
|
+
if (!isValid) {
|
|
4989
|
+
logger$3.error('Please provide a valid lazyLoadingMargin value (e.g., "10px")');
|
|
4990
|
+
return false;
|
|
4991
|
+
}
|
|
4992
|
+
return true;
|
|
4993
|
+
};
|
|
4872
4994
|
const getSSOMarker = (markerId) => {
|
|
4873
4995
|
const encStringToAppend = encodeURIComponent(markerId);
|
|
4874
4996
|
return `tsSSOMarker=${encStringToAppend}`;
|
|
@@ -7493,6 +7615,13 @@
|
|
|
7493
7615
|
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',
|
|
7494
7616
|
SPOTTER_AGENT_NOT_INITIALIZED: 'SpotterAgent not initialized',
|
|
7495
7617
|
OFFLINE_WARNING: 'Network not Detected. Embed is offline. Please reconnect and refresh',
|
|
7618
|
+
INIT_SDK_REQUIRED: 'You need to init the ThoughtSpot SDK module first',
|
|
7619
|
+
CONFLICTING_ACTIONS_CONFIG: 'You cannot have both hidden actions and visible actions',
|
|
7620
|
+
CONFLICTING_TABS_CONFIG: 'You cannot have both hidden Tabs and visible Tabs',
|
|
7621
|
+
RENDER_BEFORE_EVENTS_REQUIRED: 'Please call render before triggering events',
|
|
7622
|
+
HOST_EVENT_TYPE_UNDEFINED: 'Host event type is undefined',
|
|
7623
|
+
LOGIN_FAILED: 'Login failed',
|
|
7624
|
+
ERROR_PARSING_API_INTERCEPT_BODY: 'Error parsing api intercept body',
|
|
7496
7625
|
};
|
|
7497
7626
|
const CUSTOM_ACTIONS_ERROR_MESSAGE = {
|
|
7498
7627
|
INVALID_ACTION_OBJECT: 'Custom Action Validation Error: Invalid action object provided',
|
|
@@ -17834,7 +17963,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
17834
17963
|
return eventData;
|
|
17835
17964
|
}
|
|
17836
17965
|
|
|
17837
|
-
var name="@thoughtspot/visual-embed-sdk";var version$1="1.44.
|
|
17966
|
+
var name="@thoughtspot/visual-embed-sdk";var version$1="1.44.2";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports$1={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p tsconfig.build.json --incremental false; tsc -p tsconfig.build.json --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle-generator --config ./dts-config/dts-bundle-file.config.js","bundle-dts":"dts-bundle-generator --config ./dts-config/dts-bundle.config.js","bundle-dts-react":"dts-bundle-generator --config ./dts-config/dts-bundle-react.config.js","bundle-dts-react-full":"dts-bundle-generator --config ./dts-config/dts-bundle-react-full.config.js",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.build.json --theme typedoc-theme --json static/typedoc/typedoc.json --disableOutputCheck","test-sdk":"jest -c jest.config.sdk.js --runInBand",test:"npm run test-sdk",posttest:"cat ./coverage/sdk/lcov.info | npx coveralls-next","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest",dev:"vite -c vite.local.config.ts"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={classnames:"^2.3.1",eventemitter3:"^4.0.7",lodash:"^4.17.21","mixpanel-browser":"2.47.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1",yaml:"^2.5.1"};var devDependencies={"@mdx-js/mdx":"^1.6.22","@mdx-js/react":"^1.6.22","@react-icons/all-files":"^4.1.0","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^5.0.2","@size-limit/preset-big-lib":"^11.2.0","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^30.0.0","@types/lodash":"^4.17.0","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^8.28.0","@typescript-eslint/parser":"^8.28.0",ajv:"^8.17.1",asciidoctor:"^2.2.1","babel-jest":"^30.2.0","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1","coveralls-next":"^5.0.0",crypto:"^1.0.1","current-git-branch":"^1.1.0","dts-bundle-generator":"^9.5.1",eslint:"^9.23.0","eslint-config-airbnb-base":"^15.0.0","eslint-config-prettier":"^10.1.1","eslint-import-resolver-typescript":"^4.2.5","eslint-plugin-comment-length":"2.2.1","eslint-plugin-import":"^2.31.0","eslint-plugin-jsdoc":"^50.6.9","eslint-plugin-prettier":"^5.2.5","eslint-plugin-react":"^7.37.5","eslint-plugin-react-hooks":"^5.2.0","fs-extra":"^10.0.0","gh-pages":"6.3.0",globals:"^16.0.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^2.0.0",jest:"^30.2.0","jest-environment-jsdom":"^29.7.0","jest-fetch-mock":"^3.0.3",jsdom:"^17.0.0",prettier:"2.1.2",react:"^16.14.0","react-dom":"^16.14.0","react-resizable":"^1.11.0","react-resize-detector":"^6.6.0","react-test-renderer":"^17.0.2","react-use-flexsearch":"^0.1.1",rollup:"4.24.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^29.4.6","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","typescript-eslint":"^8.29.1","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^6.3.5"};var author="ThoughtSpot";var email="support@thoughtspot.com";var license="ThoughtSpot Development Tools End User License Agreement";var directories={lib:"lib"};var repository={type:"git",url:"git+https://github.com/thoughtspot/visual-embed-sdk.git"};var publishConfig={registry:"https://registry.npmjs.org"};var keywords=["thoughtspot","everywhere","embedded","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version$1,description:description,module:module,main:main,types:types,files:files,exports:exports$1,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.es.js",limit:"32 kB"}],scripts:scripts,peerDependencies:peerDependencies,dependencies:dependencies,devDependencies:devDependencies,author:author,email:email,license:license,directories:directories,repository:repository,publishConfig:publishConfig,keywords:keywords,bugs:bugs,homepage:homepage,globals:globals};
|
|
17838
17967
|
|
|
17839
17968
|
class HostEventClient {
|
|
17840
17969
|
constructor(iFrame) {
|
|
@@ -18032,9 +18161,13 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18032
18161
|
const { eventData, executeEvent, viewConfig, getUnsavedAnswerTml } = params;
|
|
18033
18162
|
const [interceptData, bodyParseError] = parseInterceptData(eventData.data);
|
|
18034
18163
|
if (bodyParseError) {
|
|
18035
|
-
|
|
18036
|
-
|
|
18037
|
-
|
|
18164
|
+
const errorDetails = {
|
|
18165
|
+
errorType: ErrorDetailsTypes.API,
|
|
18166
|
+
message: ERROR_MESSAGE.ERROR_PARSING_API_INTERCEPT_BODY,
|
|
18167
|
+
code: EmbedErrorCodes.PARSING_API_INTERCEPT_BODY_ERROR,
|
|
18168
|
+
error: ERROR_MESSAGE.ERROR_PARSING_API_INTERCEPT_BODY,
|
|
18169
|
+
};
|
|
18170
|
+
executeEvent(exports.EmbedEvent.Error, errorDetails);
|
|
18038
18171
|
logger$3.error('Error parsing request body', bodyParseError);
|
|
18039
18172
|
return;
|
|
18040
18173
|
}
|
|
@@ -18346,19 +18479,23 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18346
18479
|
* Throws error encountered during initialization.
|
|
18347
18480
|
*/
|
|
18348
18481
|
throwInitError() {
|
|
18349
|
-
this.handleError(
|
|
18482
|
+
this.handleError({
|
|
18483
|
+
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
18484
|
+
message: ERROR_MESSAGE.INIT_SDK_REQUIRED,
|
|
18485
|
+
code: EmbedErrorCodes.INIT_ERROR,
|
|
18486
|
+
error: ERROR_MESSAGE.INIT_SDK_REQUIRED,
|
|
18487
|
+
});
|
|
18350
18488
|
}
|
|
18351
18489
|
/**
|
|
18352
18490
|
* Handles errors within the SDK
|
|
18353
18491
|
* @param error The error message or object
|
|
18492
|
+
* @param errorDetails The error details
|
|
18354
18493
|
*/
|
|
18355
|
-
handleError(
|
|
18494
|
+
handleError(errorDetails) {
|
|
18356
18495
|
this.isError = true;
|
|
18357
|
-
this.executeCallbacks(exports.EmbedEvent.Error,
|
|
18358
|
-
error,
|
|
18359
|
-
});
|
|
18496
|
+
this.executeCallbacks(exports.EmbedEvent.Error, errorDetails);
|
|
18360
18497
|
// Log error
|
|
18361
|
-
logger$3.error(
|
|
18498
|
+
logger$3.error(errorDetails);
|
|
18362
18499
|
}
|
|
18363
18500
|
/**
|
|
18364
18501
|
* Extracts the type field from the event payload
|
|
@@ -18437,11 +18574,14 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18437
18574
|
};
|
|
18438
18575
|
window.addEventListener('online', onlineEventListener);
|
|
18439
18576
|
const offlineEventListener = (e) => {
|
|
18440
|
-
const
|
|
18441
|
-
|
|
18442
|
-
|
|
18443
|
-
|
|
18444
|
-
|
|
18577
|
+
const errorDetails = {
|
|
18578
|
+
errorType: ErrorDetailsTypes.NETWORK,
|
|
18579
|
+
message: ERROR_MESSAGE.OFFLINE_WARNING,
|
|
18580
|
+
code: EmbedErrorCodes.NETWORK_ERROR,
|
|
18581
|
+
offlineWarning: ERROR_MESSAGE.OFFLINE_WARNING,
|
|
18582
|
+
};
|
|
18583
|
+
this.executeCallbacks(exports.EmbedEvent.Error, errorDetails);
|
|
18584
|
+
logger$3.warn(errorDetails);
|
|
18445
18585
|
};
|
|
18446
18586
|
window.addEventListener('offline', offlineEventListener);
|
|
18447
18587
|
this.subscribedListeners.online = onlineEventListener;
|
|
@@ -18521,8 +18661,10 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18521
18661
|
]);
|
|
18522
18662
|
if (customActionsResult.errors.length > 0) {
|
|
18523
18663
|
this.handleError({
|
|
18524
|
-
|
|
18664
|
+
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
18525
18665
|
message: customActionsResult.errors,
|
|
18666
|
+
code: EmbedErrorCodes.CUSTOM_ACTION_VALIDATION,
|
|
18667
|
+
error: { type: EmbedErrorCodes.CUSTOM_ACTION_VALIDATION, message: customActionsResult.errors }
|
|
18526
18668
|
});
|
|
18527
18669
|
}
|
|
18528
18670
|
const baseInitData = {
|
|
@@ -18619,11 +18761,21 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18619
18761
|
...additionalFlagsFromView,
|
|
18620
18762
|
};
|
|
18621
18763
|
if (Array.isArray(visibleActions) && Array.isArray(hiddenActions)) {
|
|
18622
|
-
this.handleError(
|
|
18764
|
+
this.handleError({
|
|
18765
|
+
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
18766
|
+
message: ERROR_MESSAGE.CONFLICTING_ACTIONS_CONFIG,
|
|
18767
|
+
code: EmbedErrorCodes.CONFLICTING_ACTIONS_CONFIG,
|
|
18768
|
+
error: ERROR_MESSAGE.CONFLICTING_ACTIONS_CONFIG,
|
|
18769
|
+
});
|
|
18623
18770
|
return queryParams;
|
|
18624
18771
|
}
|
|
18625
18772
|
if (Array.isArray(visibleTabs) && Array.isArray(hiddenTabs)) {
|
|
18626
|
-
this.handleError(
|
|
18773
|
+
this.handleError({
|
|
18774
|
+
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
18775
|
+
message: ERROR_MESSAGE.CONFLICTING_TABS_CONFIG,
|
|
18776
|
+
code: EmbedErrorCodes.CONFLICTING_TABS_CONFIG,
|
|
18777
|
+
error: ERROR_MESSAGE.CONFLICTING_TABS_CONFIG,
|
|
18778
|
+
});
|
|
18627
18779
|
return queryParams;
|
|
18628
18780
|
}
|
|
18629
18781
|
if (primaryAction) {
|
|
@@ -18848,7 +19000,12 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18848
19000
|
error: JSON.stringify(error),
|
|
18849
19001
|
});
|
|
18850
19002
|
this.handleInsertionIntoDOM(this.embedConfig.loginFailedMessage);
|
|
18851
|
-
this.handleError(
|
|
19003
|
+
this.handleError({
|
|
19004
|
+
errorType: ErrorDetailsTypes.API,
|
|
19005
|
+
message: error.message || ERROR_MESSAGE.LOGIN_FAILED,
|
|
19006
|
+
code: EmbedErrorCodes.LOGIN_FAILED,
|
|
19007
|
+
error: error,
|
|
19008
|
+
});
|
|
18852
19009
|
});
|
|
18853
19010
|
});
|
|
18854
19011
|
}
|
|
@@ -19153,11 +19310,21 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
19153
19310
|
async trigger(messageType, data = {}) {
|
|
19154
19311
|
uploadMixpanelEvent(`${MIXPANEL_EVENT.VISUAL_SDK_TRIGGER}-${messageType}`);
|
|
19155
19312
|
if (!this.isRendered) {
|
|
19156
|
-
this.handleError(
|
|
19313
|
+
this.handleError({
|
|
19314
|
+
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
19315
|
+
message: ERROR_MESSAGE.RENDER_BEFORE_EVENTS_REQUIRED,
|
|
19316
|
+
code: EmbedErrorCodes.RENDER_NOT_CALLED,
|
|
19317
|
+
error: ERROR_MESSAGE.RENDER_BEFORE_EVENTS_REQUIRED,
|
|
19318
|
+
});
|
|
19157
19319
|
return null;
|
|
19158
19320
|
}
|
|
19159
19321
|
if (!messageType) {
|
|
19160
|
-
this.handleError(
|
|
19322
|
+
this.handleError({
|
|
19323
|
+
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
19324
|
+
message: ERROR_MESSAGE.HOST_EVENT_TYPE_UNDEFINED,
|
|
19325
|
+
code: EmbedErrorCodes.HOST_EVENT_TYPE_UNDEFINED,
|
|
19326
|
+
error: ERROR_MESSAGE.HOST_EVENT_TYPE_UNDEFINED,
|
|
19327
|
+
});
|
|
19161
19328
|
return null;
|
|
19162
19329
|
}
|
|
19163
19330
|
// Check if iframe exists before triggering -
|
|
@@ -19638,7 +19805,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
19638
19805
|
constructor(domSelector, viewConfig) {
|
|
19639
19806
|
viewConfig.embedComponentType = 'AppEmbed';
|
|
19640
19807
|
super(domSelector, viewConfig);
|
|
19641
|
-
this.defaultHeight =
|
|
19808
|
+
this.defaultHeight = 500;
|
|
19642
19809
|
this.sendFullHeightLazyLoadData = () => {
|
|
19643
19810
|
const data = calculateVisibleElementData(this.iFrame);
|
|
19644
19811
|
this.trigger(exports.HostEvent.VisibleEmbedCoordinates, data);
|
|
@@ -19660,8 +19827,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
19660
19827
|
* @param data The event payload
|
|
19661
19828
|
*/
|
|
19662
19829
|
this.updateIFrameHeight = (data) => {
|
|
19663
|
-
|
|
19664
|
-
this.setIFrameHeight(Math.max(data.data, (_a = this.iFrame) === null || _a === void 0 ? void 0 : _a.scrollHeight));
|
|
19830
|
+
this.setIFrameHeight(Math.max(data.data, this.defaultHeight));
|
|
19665
19831
|
this.sendFullHeightLazyLoadData();
|
|
19666
19832
|
};
|
|
19667
19833
|
this.embedIframeCenter = (data, responder) => {
|
|
@@ -19700,7 +19866,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
19700
19866
|
* embedded Liveboard or visualization.
|
|
19701
19867
|
*/
|
|
19702
19868
|
getEmbedParams() {
|
|
19703
|
-
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 = exports.DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, isEnhancedFilterInteractivityEnabled = false, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, discoveryExperience, coverAndFilterOptionInPDF = false, liveboardXLSXCSVDownload, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, isCentralizedLiveboardFilterUXEnabled = false, isLinkParametersEnabled, updatedSpotterChatPrompt, } = this.viewConfig;
|
|
19869
|
+
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 = exports.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;
|
|
19704
19870
|
let params = {};
|
|
19705
19871
|
params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
|
|
19706
19872
|
params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
|
|
@@ -19709,6 +19875,8 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
19709
19875
|
params[Param.HideLiveboardHeader] = hideLiveboardHeader;
|
|
19710
19876
|
params[Param.ShowLiveboardTitle] = showLiveboardTitle;
|
|
19711
19877
|
params[Param.ShowLiveboardDescription] = !!showLiveboardDescription;
|
|
19878
|
+
params[Param.ShowMaskedFilterChip] = showMaskedFilterChip;
|
|
19879
|
+
params[Param.IsLiveboardMasterpiecesEnabled] = isLiveboardMasterpiecesEnabled;
|
|
19712
19880
|
params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
|
|
19713
19881
|
params[Param.IsFullAppEmbed] = true;
|
|
19714
19882
|
params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
|
|
@@ -19735,7 +19903,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
19735
19903
|
params[Param.fullHeight] = true;
|
|
19736
19904
|
if (this.viewConfig.lazyLoadingForFullHeight) {
|
|
19737
19905
|
params[Param.IsLazyLoadingForEmbedEnabled] = true;
|
|
19738
|
-
|
|
19906
|
+
if (isValidCssMargin(this.viewConfig.lazyLoadingMargin)) {
|
|
19907
|
+
params[Param.RootMarginForLazyLoad] = this.viewConfig.lazyLoadingMargin;
|
|
19908
|
+
}
|
|
19739
19909
|
}
|
|
19740
19910
|
}
|
|
19741
19911
|
if (tag) {
|
|
@@ -19780,6 +19950,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
19780
19950
|
if (isCentralizedLiveboardFilterUXEnabled != undefined) {
|
|
19781
19951
|
params[Param.isCentralizedLiveboardFilterUXEnabled] = isCentralizedLiveboardFilterUXEnabled;
|
|
19782
19952
|
}
|
|
19953
|
+
this.defaultHeight = minimumHeight || this.defaultHeight;
|
|
19783
19954
|
params[Param.DataPanelV2Enabled] = dataPanelV2;
|
|
19784
19955
|
params[Param.HideHomepageLeftNav] = hideHomepageLeftNav;
|
|
19785
19956
|
params[Param.ModularHomeExperienceEnabled] = modularHomeExperience;
|
|
@@ -20134,19 +20305,19 @@ query GetEurekaVizSnapshots(
|
|
|
20134
20305
|
getEmbedParamsObject() {
|
|
20135
20306
|
let params = {};
|
|
20136
20307
|
params = this.getBaseQueryParams(params);
|
|
20137
|
-
const { enableVizTransformations, fullHeight, defaultHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, isEnhancedFilterInteractivityEnabled = false, enableAskSage, enable2ColumnLayout, dataPanelV2 = true, enableCustomColumnGroups = false, oAuthPollingInterval, isForceRedirect, dataSourceId, coverAndFilterOptionInPDF = false, liveboardXLSXCSVDownload, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, showSpotterLimitations, isCentralizedLiveboardFilterUXEnabled = false, isLinkParametersEnabled, updatedSpotterChatPrompt, } = this.viewConfig;
|
|
20308
|
+
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;
|
|
20138
20309
|
const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
|
|
20139
20310
|
|| this.viewConfig.preventPinboardFilterRemoval;
|
|
20140
20311
|
if (fullHeight === true) {
|
|
20141
20312
|
params[Param.fullHeight] = true;
|
|
20142
20313
|
if (this.viewConfig.lazyLoadingForFullHeight) {
|
|
20143
20314
|
params[Param.IsLazyLoadingForEmbedEnabled] = true;
|
|
20144
|
-
|
|
20315
|
+
if (isValidCssMargin(this.viewConfig.lazyLoadingMargin)) {
|
|
20316
|
+
params[Param.RootMarginForLazyLoad] = this.viewConfig.lazyLoadingMargin;
|
|
20317
|
+
}
|
|
20145
20318
|
}
|
|
20146
20319
|
}
|
|
20147
|
-
|
|
20148
|
-
this.defaultHeight = defaultHeight;
|
|
20149
|
-
}
|
|
20320
|
+
this.defaultHeight = minimumHeight || defaultHeight || this.defaultHeight;
|
|
20150
20321
|
if (enableVizTransformations !== undefined) {
|
|
20151
20322
|
params[Param.EnableVizTransformations] = enableVizTransformations.toString();
|
|
20152
20323
|
}
|
|
@@ -20213,6 +20384,8 @@ query GetEurekaVizSnapshots(
|
|
|
20213
20384
|
params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;
|
|
20214
20385
|
params[Param.ShowLiveboardReverifyBanner] = showLiveboardReverifyBanner;
|
|
20215
20386
|
params[Param.HideIrrelevantFiltersInTab] = hideIrrelevantChipsInLiveboardTabs;
|
|
20387
|
+
params[Param.ShowMaskedFilterChip] = showMaskedFilterChip;
|
|
20388
|
+
params[Param.IsLiveboardMasterpiecesEnabled] = isLiveboardMasterpiecesEnabled;
|
|
20216
20389
|
params[Param.IsEnhancedFilterInteractivityEnabled] = isEnhancedFilterInteractivityEnabled;
|
|
20217
20390
|
params[Param.DataPanelV2Enabled] = dataPanelV2;
|
|
20218
20391
|
params[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
|
|
@@ -20244,7 +20417,12 @@ query GetEurekaVizSnapshots(
|
|
|
20244
20417
|
const { vizId, activeTabId } = this.viewConfig;
|
|
20245
20418
|
const liveboardId = (_a = this.viewConfig.liveboardId) !== null && _a !== void 0 ? _a : this.viewConfig.pinboardId;
|
|
20246
20419
|
if (!liveboardId) {
|
|
20247
|
-
this.handleError(
|
|
20420
|
+
this.handleError({
|
|
20421
|
+
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
20422
|
+
message: ERROR_MESSAGE.LIVEBOARD_VIZ_ID_VALIDATION,
|
|
20423
|
+
code: EmbedErrorCodes.LIVEBOARD_ID_MISSING,
|
|
20424
|
+
error: ERROR_MESSAGE.LIVEBOARD_VIZ_ID_VALIDATION,
|
|
20425
|
+
});
|
|
20248
20426
|
}
|
|
20249
20427
|
return `${this.getRootIframeSrc()}${this.getIframeSuffixSrc(liveboardId, vizId, activeTabId)}`;
|
|
20250
20428
|
}
|
|
@@ -21208,7 +21386,12 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
21208
21386
|
getEmbedParamsObject() {
|
|
21209
21387
|
const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, enablePastConversationsSidebar, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, updatedSpotterChatPrompt, } = this.viewConfig;
|
|
21210
21388
|
if (!worksheetId) {
|
|
21211
|
-
this.handleError(
|
|
21389
|
+
this.handleError({
|
|
21390
|
+
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
21391
|
+
message: ERROR_MESSAGE.SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND,
|
|
21392
|
+
code: EmbedErrorCodes.WORKSHEET_ID_NOT_FOUND,
|
|
21393
|
+
error: ERROR_MESSAGE.SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND,
|
|
21394
|
+
});
|
|
21212
21395
|
}
|
|
21213
21396
|
const queryParams = this.getBaseQueryParams();
|
|
21214
21397
|
queryParams[Param.SpotterEnabled] = true;
|