@thoughtspot/visual-embed-sdk 1.44.1 → 1.44.3
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.d.ts +1 -1
- package/cjs/src/embed/base.d.ts.map +1 -1
- package/cjs/src/embed/base.js +4 -0
- package/cjs/src/embed/base.js.map +1 -1
- package/cjs/src/embed/base.spec.js +71 -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 +8 -0
- package/cjs/src/errors.d.ts.map +1 -1
- package/cjs/src/errors.js +8 -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 +16 -3
- package/cjs/src/utils.d.ts.map +1 -1
- package/cjs/src/utils.js +60 -5
- package/cjs/src/utils.js.map +1 -1
- package/cjs/src/utils.spec.js +72 -10
- package/cjs/src/utils.spec.js.map +1 -1
- package/dist/{index-BE9gGzRX.js → index-D0n5LIka.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/base.d.ts +1 -1
- package/dist/src/embed/base.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 +8 -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 +16 -3
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +282 -74
- package/dist/tsembed-react.js +281 -73
- package/dist/tsembed.es.js +282 -74
- package/dist/tsembed.js +281 -73
- package/dist/visual-embed-sdk-react-full.d.ts +185 -3
- package/dist/visual-embed-sdk-react.d.ts +184 -2
- package/dist/visual-embed-sdk.d.ts +185 -3
- 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.d.ts +1 -1
- package/lib/src/embed/base.d.ts.map +1 -1
- package/lib/src/embed/base.js +5 -1
- package/lib/src/embed/base.js.map +1 -1
- package/lib/src/embed/base.spec.js +72 -16
- 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 +8 -0
- package/lib/src/errors.d.ts.map +1 -1
- package/lib/src/errors.js +8 -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 +16 -3
- package/lib/src/utils.d.ts.map +1 -1
- package/lib/src/utils.js +57 -4
- package/lib/src/utils.js.map +1 -1
- package/lib/src/utils.spec.js +73 -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 +95 -21
- package/src/embed/base.ts +5 -2
- 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 +8 -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 +100 -11
- package/src/utils.ts +59 -7
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.3 */
|
|
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
|
*/
|
|
@@ -4769,6 +4861,48 @@
|
|
|
4769
4861
|
return result;
|
|
4770
4862
|
};
|
|
4771
4863
|
|
|
4864
|
+
const ERROR_MESSAGE = {
|
|
4865
|
+
INVALID_THOUGHTSPOT_HOST: 'Error parsing ThoughtSpot host. Please provide a valid URL.',
|
|
4866
|
+
SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND: 'Please select a Model to get started',
|
|
4867
|
+
LIVEBOARD_VIZ_ID_VALIDATION: 'Please select a Liveboard to embed.',
|
|
4868
|
+
TRIGGER_TIMED_OUT: 'Trigger timed-out in getting a response',
|
|
4869
|
+
SEARCHEMBED_BETA_WRANING_MESSAGE: 'SearchEmbed is in Beta in this release.',
|
|
4870
|
+
SAGE_EMBED_BETA_WARNING_MESSAGE: 'SageEmbed is in Beta in this release.',
|
|
4871
|
+
THIRD_PARTY_COOKIE_BLOCKED_ALERT: 'Third-party cookie access is blocked on this browser. Please allow third-party cookies for this to work properly. \nYou can use `suppressNoCookieAccessAlert` to suppress this message.',
|
|
4872
|
+
DUPLICATE_TOKEN_ERR: 'Duplicate token. Please issue a new token every time getAuthToken callback is called. See https://developers.thoughtspot.com/docs/?pageid=embed-auth#trusted-auth-embed for more details.',
|
|
4873
|
+
SDK_NOT_INITIALIZED: 'SDK not initialized',
|
|
4874
|
+
SESSION_INFO_FAILED: 'Failed to get session information',
|
|
4875
|
+
INVALID_TOKEN_ERROR: 'Received invalid token from getAuthToken callback or authToken endpoint.',
|
|
4876
|
+
INVALID_TOKEN_TYPE_ERROR: 'Expected getAuthToken to return a string, but received a {invalidType}.',
|
|
4877
|
+
MIXPANEL_TOKEN_NOT_FOUND: 'Mixpanel token not found in session info',
|
|
4878
|
+
PRERENDER_ID_MISSING: 'PreRender ID is required for preRender',
|
|
4879
|
+
SYNC_STYLE_CALLED_BEFORE_RENDER: 'PreRender should be called before using syncPreRenderStyle',
|
|
4880
|
+
CSP_VIOLATION_ALERT: 'CSP violation detected. Please check the console errors for more details.',
|
|
4881
|
+
CSP_FRAME_HOST_VIOLATION_LOG_MESSAGE: 'Please set up CSP correctly for the application to start working. For more information, see https://developers.thoughtspot.com/docs/security-settings#csp-viz-embed-hosts. \n If the issue persists, refer to https://developers.thoughtspot.com/docs/security-settings#csp-viz-embed-hosts',
|
|
4882
|
+
MISSING_REPORTING_OBSERVER: 'ReportingObserver not supported',
|
|
4883
|
+
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',
|
|
4884
|
+
SPOTTER_AGENT_NOT_INITIALIZED: 'SpotterAgent not initialized',
|
|
4885
|
+
OFFLINE_WARNING: 'Network not Detected. Embed is offline. Please reconnect and refresh',
|
|
4886
|
+
INIT_SDK_REQUIRED: 'You need to init the ThoughtSpot SDK module first',
|
|
4887
|
+
CONFLICTING_ACTIONS_CONFIG: 'You cannot have both hidden actions and visible actions',
|
|
4888
|
+
CONFLICTING_TABS_CONFIG: 'You cannot have both hidden Tabs and visible Tabs',
|
|
4889
|
+
RENDER_BEFORE_EVENTS_REQUIRED: 'Please call render before triggering events',
|
|
4890
|
+
HOST_EVENT_TYPE_UNDEFINED: 'Host event type is undefined',
|
|
4891
|
+
LOGIN_FAILED: 'Login failed',
|
|
4892
|
+
ERROR_PARSING_API_INTERCEPT_BODY: 'Error parsing api intercept body',
|
|
4893
|
+
SSR_ENVIRONMENT_ERROR: 'SSR environment detected. This function cannot be called in SSR environment.',
|
|
4894
|
+
};
|
|
4895
|
+
const CUSTOM_ACTIONS_ERROR_MESSAGE = {
|
|
4896
|
+
INVALID_ACTION_OBJECT: 'Custom Action Validation Error: Invalid action object provided',
|
|
4897
|
+
MISSING_REQUIRED_FIELDS: (id, missingFields) => `Custom Action Validation Error for '${id}': Missing required fields: ${missingFields.join(', ')}`,
|
|
4898
|
+
UNSUPPORTED_TARGET: (id, targetType) => `Custom Action Validation Error for '${id}': Target type '${targetType}' is not supported`,
|
|
4899
|
+
INVALID_POSITION: (position, targetType, supportedPositions) => `Position '${position}' is not supported for ${targetType.toLowerCase()}-level custom actions. Supported positions: ${supportedPositions}`,
|
|
4900
|
+
INVALID_METADATA_IDS: (targetType, invalidIds, supportedIds) => `Invalid metadata IDs for ${targetType.toLowerCase()}-level custom actions: ${invalidIds.join(', ')}. Supported metadata IDs: ${supportedIds}`,
|
|
4901
|
+
INVALID_DATA_MODEL_IDS: (targetType, invalidIds, supportedIds) => `Invalid data model IDs for ${targetType.toLowerCase()}-level custom actions: ${invalidIds.join(', ')}. Supported data model IDs: ${supportedIds}`,
|
|
4902
|
+
INVALID_FIELDS: (targetType, invalidFields, supportedFields) => `Invalid fields for ${targetType.toLowerCase()}-level custom actions: ${invalidFields.join(', ')}. Supported fields: ${supportedFields}`,
|
|
4903
|
+
DUPLICATE_IDS: (id, duplicateNames, keptName) => `Duplicate custom action ID '${id}' found. Actions with names '${duplicateNames.join("', '")}' will be ignored. Keeping '${keptName}'.`,
|
|
4904
|
+
};
|
|
4905
|
+
|
|
4772
4906
|
/**
|
|
4773
4907
|
* Copyright (c) 2023
|
|
4774
4908
|
*
|
|
@@ -4869,6 +5003,36 @@
|
|
|
4869
5003
|
}
|
|
4870
5004
|
return value;
|
|
4871
5005
|
};
|
|
5006
|
+
/**
|
|
5007
|
+
* Validates if a string is a valid CSS margin value.
|
|
5008
|
+
* @param value - The string to validate
|
|
5009
|
+
* @returns true if the value is a valid CSS margin value, false otherwise
|
|
5010
|
+
*/
|
|
5011
|
+
const isValidCssMargin = (value) => {
|
|
5012
|
+
if (isUndefined$1(value)) {
|
|
5013
|
+
return false;
|
|
5014
|
+
}
|
|
5015
|
+
if (typeof value !== 'string') {
|
|
5016
|
+
logger$3.error('Please provide a valid lazyLoadingMargin value (e.g., "10px")');
|
|
5017
|
+
return false;
|
|
5018
|
+
}
|
|
5019
|
+
// This pattern allows for an optional negative sign, and numbers that can be integers or decimals (including leading dot).
|
|
5020
|
+
const cssUnitPattern = /^-?(\d+(\.\d*)?|\.\d+)(px|em|rem|%|vh|vw)$/i;
|
|
5021
|
+
const parts = value.trim().split(/\s+/);
|
|
5022
|
+
if (parts.length > 4) {
|
|
5023
|
+
logger$3.error('Please provide a valid lazyLoadingMargin value (e.g., "10px")');
|
|
5024
|
+
return false;
|
|
5025
|
+
}
|
|
5026
|
+
const isValid = parts.every(part => {
|
|
5027
|
+
const trimmedPart = part.trim();
|
|
5028
|
+
return trimmedPart.toLowerCase() === 'auto' || trimmedPart === '0' || cssUnitPattern.test(trimmedPart);
|
|
5029
|
+
});
|
|
5030
|
+
if (!isValid) {
|
|
5031
|
+
logger$3.error('Please provide a valid lazyLoadingMargin value (e.g., "10px")');
|
|
5032
|
+
return false;
|
|
5033
|
+
}
|
|
5034
|
+
return true;
|
|
5035
|
+
};
|
|
4872
5036
|
const getSSOMarker = (markerId) => {
|
|
4873
5037
|
const encStringToAppend = encodeURIComponent(markerId);
|
|
4874
5038
|
return `tsSSOMarker=${encStringToAppend}`;
|
|
@@ -5059,6 +5223,8 @@
|
|
|
5059
5223
|
* @version SDK: 1.36.2 | ThoughtSpot: *
|
|
5060
5224
|
*/
|
|
5061
5225
|
function storeValueInWindow(key, value, options = {}) {
|
|
5226
|
+
if (isWindowUndefined())
|
|
5227
|
+
return value;
|
|
5062
5228
|
if (!window[sdkWindowKey]) {
|
|
5063
5229
|
window[sdkWindowKey] = {};
|
|
5064
5230
|
}
|
|
@@ -5069,11 +5235,16 @@
|
|
|
5069
5235
|
return value;
|
|
5070
5236
|
}
|
|
5071
5237
|
/**
|
|
5072
|
-
* Retrieves a stored value from the global
|
|
5073
|
-
*
|
|
5074
|
-
*
|
|
5238
|
+
* Retrieves a stored value from the global
|
|
5239
|
+
* `window` object under the `_tsEmbedSDK` namespace.
|
|
5240
|
+
* Returns undefined in SSR environment.
|
|
5075
5241
|
*/
|
|
5076
|
-
const getValueFromWindow = (key) => {
|
|
5242
|
+
const getValueFromWindow = (key) => {
|
|
5243
|
+
var _a;
|
|
5244
|
+
if (isWindowUndefined())
|
|
5245
|
+
return undefined;
|
|
5246
|
+
return (_a = window === null || window === void 0 ? void 0 : window[sdkWindowKey]) === null || _a === void 0 ? void 0 : _a[key];
|
|
5247
|
+
};
|
|
5077
5248
|
/**
|
|
5078
5249
|
* Check if an array includes a string value
|
|
5079
5250
|
* @param arr - The array to check
|
|
@@ -5184,6 +5355,19 @@
|
|
|
5184
5355
|
return template.replace(/\{(\w+)\}/g, (match, key) => {
|
|
5185
5356
|
return values[key] !== undefined ? String(values[key]) : match;
|
|
5186
5357
|
});
|
|
5358
|
+
};
|
|
5359
|
+
/**
|
|
5360
|
+
* Check if the window is undefined
|
|
5361
|
+
* If the window is undefined, it means the code is running in a SSR environment.
|
|
5362
|
+
* @returns true if the window is undefined, false otherwise
|
|
5363
|
+
*
|
|
5364
|
+
*/
|
|
5365
|
+
const isWindowUndefined = () => {
|
|
5366
|
+
if (typeof window === 'undefined') {
|
|
5367
|
+
logger$3.error(ERROR_MESSAGE.SSR_ENVIRONMENT_ERROR);
|
|
5368
|
+
return true;
|
|
5369
|
+
}
|
|
5370
|
+
return false;
|
|
5187
5371
|
};
|
|
5188
5372
|
|
|
5189
5373
|
/**
|
|
@@ -7471,40 +7655,6 @@
|
|
|
7471
7655
|
UIPassthroughEvent["GetUnsavedAnswerTML"] = "getUnsavedAnswerTML";
|
|
7472
7656
|
})(exports.UIPassthroughEvent || (exports.UIPassthroughEvent = {}));
|
|
7473
7657
|
|
|
7474
|
-
const ERROR_MESSAGE = {
|
|
7475
|
-
INVALID_THOUGHTSPOT_HOST: 'Error parsing ThoughtSpot host. Please provide a valid URL.',
|
|
7476
|
-
SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND: 'Please select a Model to get started',
|
|
7477
|
-
LIVEBOARD_VIZ_ID_VALIDATION: 'Please select a Liveboard to embed.',
|
|
7478
|
-
TRIGGER_TIMED_OUT: 'Trigger timed-out in getting a response',
|
|
7479
|
-
SEARCHEMBED_BETA_WRANING_MESSAGE: 'SearchEmbed is in Beta in this release.',
|
|
7480
|
-
SAGE_EMBED_BETA_WARNING_MESSAGE: 'SageEmbed is in Beta in this release.',
|
|
7481
|
-
THIRD_PARTY_COOKIE_BLOCKED_ALERT: 'Third-party cookie access is blocked on this browser. Please allow third-party cookies for this to work properly. \nYou can use `suppressNoCookieAccessAlert` to suppress this message.',
|
|
7482
|
-
DUPLICATE_TOKEN_ERR: 'Duplicate token. Please issue a new token every time getAuthToken callback is called. See https://developers.thoughtspot.com/docs/?pageid=embed-auth#trusted-auth-embed for more details.',
|
|
7483
|
-
SDK_NOT_INITIALIZED: 'SDK not initialized',
|
|
7484
|
-
SESSION_INFO_FAILED: 'Failed to get session information',
|
|
7485
|
-
INVALID_TOKEN_ERROR: 'Received invalid token from getAuthToken callback or authToken endpoint.',
|
|
7486
|
-
INVALID_TOKEN_TYPE_ERROR: 'Expected getAuthToken to return a string, but received a {invalidType}.',
|
|
7487
|
-
MIXPANEL_TOKEN_NOT_FOUND: 'Mixpanel token not found in session info',
|
|
7488
|
-
PRERENDER_ID_MISSING: 'PreRender ID is required for preRender',
|
|
7489
|
-
SYNC_STYLE_CALLED_BEFORE_RENDER: 'PreRender should be called before using syncPreRenderStyle',
|
|
7490
|
-
CSP_VIOLATION_ALERT: 'CSP violation detected. Please check the console errors for more details.',
|
|
7491
|
-
CSP_FRAME_HOST_VIOLATION_LOG_MESSAGE: 'Please set up CSP correctly for the application to start working. For more information, see https://developers.thoughtspot.com/docs/security-settings#csp-viz-embed-hosts. \n If the issue persists, refer to https://developers.thoughtspot.com/docs/security-settings#csp-viz-embed-hosts',
|
|
7492
|
-
MISSING_REPORTING_OBSERVER: 'ReportingObserver not supported',
|
|
7493
|
-
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
|
-
SPOTTER_AGENT_NOT_INITIALIZED: 'SpotterAgent not initialized',
|
|
7495
|
-
OFFLINE_WARNING: 'Network not Detected. Embed is offline. Please reconnect and refresh',
|
|
7496
|
-
};
|
|
7497
|
-
const CUSTOM_ACTIONS_ERROR_MESSAGE = {
|
|
7498
|
-
INVALID_ACTION_OBJECT: 'Custom Action Validation Error: Invalid action object provided',
|
|
7499
|
-
MISSING_REQUIRED_FIELDS: (id, missingFields) => `Custom Action Validation Error for '${id}': Missing required fields: ${missingFields.join(', ')}`,
|
|
7500
|
-
UNSUPPORTED_TARGET: (id, targetType) => `Custom Action Validation Error for '${id}': Target type '${targetType}' is not supported`,
|
|
7501
|
-
INVALID_POSITION: (position, targetType, supportedPositions) => `Position '${position}' is not supported for ${targetType.toLowerCase()}-level custom actions. Supported positions: ${supportedPositions}`,
|
|
7502
|
-
INVALID_METADATA_IDS: (targetType, invalidIds, supportedIds) => `Invalid metadata IDs for ${targetType.toLowerCase()}-level custom actions: ${invalidIds.join(', ')}. Supported metadata IDs: ${supportedIds}`,
|
|
7503
|
-
INVALID_DATA_MODEL_IDS: (targetType, invalidIds, supportedIds) => `Invalid data model IDs for ${targetType.toLowerCase()}-level custom actions: ${invalidIds.join(', ')}. Supported data model IDs: ${supportedIds}`,
|
|
7504
|
-
INVALID_FIELDS: (targetType, invalidFields, supportedFields) => `Invalid fields for ${targetType.toLowerCase()}-level custom actions: ${invalidFields.join(', ')}. Supported fields: ${supportedFields}`,
|
|
7505
|
-
DUPLICATE_IDS: (id, duplicateNames, keptName) => `Duplicate custom action ID '${id}' found. Actions with names '${duplicateNames.join("', '")}' will be ignored. Keeping '${keptName}'.`,
|
|
7506
|
-
};
|
|
7507
|
-
|
|
7508
7658
|
const EndPoints = {
|
|
7509
7659
|
AUTH_VERIFICATION: '/callosum/v1/session/info',
|
|
7510
7660
|
SESSION_INFO: '/callosum/v1/session/info',
|
|
@@ -17460,6 +17610,8 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
17460
17610
|
}
|
|
17461
17611
|
const initFlagKey = 'initFlagKey';
|
|
17462
17612
|
const createAndSetInitPromise = () => {
|
|
17613
|
+
if (isWindowUndefined())
|
|
17614
|
+
return;
|
|
17463
17615
|
const { promise: initPromise, resolve: initPromiseResolve,
|
|
17464
17616
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
17465
17617
|
// @ts-ignore
|
|
@@ -17499,6 +17651,8 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
17499
17651
|
*/
|
|
17500
17652
|
const init = (embedConfig) => {
|
|
17501
17653
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
17654
|
+
if (isWindowUndefined())
|
|
17655
|
+
return null;
|
|
17502
17656
|
sanity(embedConfig);
|
|
17503
17657
|
resetAllCachedServices();
|
|
17504
17658
|
embedConfig = setEmbedConfig(backwardCompat({
|
|
@@ -17834,7 +17988,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
17834
17988
|
return eventData;
|
|
17835
17989
|
}
|
|
17836
17990
|
|
|
17837
|
-
var name="@thoughtspot/visual-embed-sdk";var version$1="1.44.
|
|
17991
|
+
var name="@thoughtspot/visual-embed-sdk";var version$1="1.44.3";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
17992
|
|
|
17839
17993
|
class HostEventClient {
|
|
17840
17994
|
constructor(iFrame) {
|
|
@@ -18032,9 +18186,13 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18032
18186
|
const { eventData, executeEvent, viewConfig, getUnsavedAnswerTml } = params;
|
|
18033
18187
|
const [interceptData, bodyParseError] = parseInterceptData(eventData.data);
|
|
18034
18188
|
if (bodyParseError) {
|
|
18035
|
-
|
|
18036
|
-
|
|
18037
|
-
|
|
18189
|
+
const errorDetails = {
|
|
18190
|
+
errorType: ErrorDetailsTypes.API,
|
|
18191
|
+
message: ERROR_MESSAGE.ERROR_PARSING_API_INTERCEPT_BODY,
|
|
18192
|
+
code: EmbedErrorCodes.PARSING_API_INTERCEPT_BODY_ERROR,
|
|
18193
|
+
error: ERROR_MESSAGE.ERROR_PARSING_API_INTERCEPT_BODY,
|
|
18194
|
+
};
|
|
18195
|
+
executeEvent(exports.EmbedEvent.Error, errorDetails);
|
|
18038
18196
|
logger$3.error('Error parsing request body', bodyParseError);
|
|
18039
18197
|
return;
|
|
18040
18198
|
}
|
|
@@ -18346,19 +18504,23 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18346
18504
|
* Throws error encountered during initialization.
|
|
18347
18505
|
*/
|
|
18348
18506
|
throwInitError() {
|
|
18349
|
-
this.handleError(
|
|
18507
|
+
this.handleError({
|
|
18508
|
+
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
18509
|
+
message: ERROR_MESSAGE.INIT_SDK_REQUIRED,
|
|
18510
|
+
code: EmbedErrorCodes.INIT_ERROR,
|
|
18511
|
+
error: ERROR_MESSAGE.INIT_SDK_REQUIRED,
|
|
18512
|
+
});
|
|
18350
18513
|
}
|
|
18351
18514
|
/**
|
|
18352
18515
|
* Handles errors within the SDK
|
|
18353
18516
|
* @param error The error message or object
|
|
18517
|
+
* @param errorDetails The error details
|
|
18354
18518
|
*/
|
|
18355
|
-
handleError(
|
|
18519
|
+
handleError(errorDetails) {
|
|
18356
18520
|
this.isError = true;
|
|
18357
|
-
this.executeCallbacks(exports.EmbedEvent.Error,
|
|
18358
|
-
error,
|
|
18359
|
-
});
|
|
18521
|
+
this.executeCallbacks(exports.EmbedEvent.Error, errorDetails);
|
|
18360
18522
|
// Log error
|
|
18361
|
-
logger$3.error(
|
|
18523
|
+
logger$3.error(errorDetails);
|
|
18362
18524
|
}
|
|
18363
18525
|
/**
|
|
18364
18526
|
* Extracts the type field from the event payload
|
|
@@ -18437,11 +18599,14 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18437
18599
|
};
|
|
18438
18600
|
window.addEventListener('online', onlineEventListener);
|
|
18439
18601
|
const offlineEventListener = (e) => {
|
|
18440
|
-
const
|
|
18441
|
-
|
|
18442
|
-
|
|
18443
|
-
|
|
18444
|
-
|
|
18602
|
+
const errorDetails = {
|
|
18603
|
+
errorType: ErrorDetailsTypes.NETWORK,
|
|
18604
|
+
message: ERROR_MESSAGE.OFFLINE_WARNING,
|
|
18605
|
+
code: EmbedErrorCodes.NETWORK_ERROR,
|
|
18606
|
+
offlineWarning: ERROR_MESSAGE.OFFLINE_WARNING,
|
|
18607
|
+
};
|
|
18608
|
+
this.executeCallbacks(exports.EmbedEvent.Error, errorDetails);
|
|
18609
|
+
logger$3.warn(errorDetails);
|
|
18445
18610
|
};
|
|
18446
18611
|
window.addEventListener('offline', offlineEventListener);
|
|
18447
18612
|
this.subscribedListeners.online = onlineEventListener;
|
|
@@ -18521,8 +18686,10 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18521
18686
|
]);
|
|
18522
18687
|
if (customActionsResult.errors.length > 0) {
|
|
18523
18688
|
this.handleError({
|
|
18524
|
-
|
|
18689
|
+
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
18525
18690
|
message: customActionsResult.errors,
|
|
18691
|
+
code: EmbedErrorCodes.CUSTOM_ACTION_VALIDATION,
|
|
18692
|
+
error: { type: EmbedErrorCodes.CUSTOM_ACTION_VALIDATION, message: customActionsResult.errors }
|
|
18526
18693
|
});
|
|
18527
18694
|
}
|
|
18528
18695
|
const baseInitData = {
|
|
@@ -18619,11 +18786,21 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18619
18786
|
...additionalFlagsFromView,
|
|
18620
18787
|
};
|
|
18621
18788
|
if (Array.isArray(visibleActions) && Array.isArray(hiddenActions)) {
|
|
18622
|
-
this.handleError(
|
|
18789
|
+
this.handleError({
|
|
18790
|
+
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
18791
|
+
message: ERROR_MESSAGE.CONFLICTING_ACTIONS_CONFIG,
|
|
18792
|
+
code: EmbedErrorCodes.CONFLICTING_ACTIONS_CONFIG,
|
|
18793
|
+
error: ERROR_MESSAGE.CONFLICTING_ACTIONS_CONFIG,
|
|
18794
|
+
});
|
|
18623
18795
|
return queryParams;
|
|
18624
18796
|
}
|
|
18625
18797
|
if (Array.isArray(visibleTabs) && Array.isArray(hiddenTabs)) {
|
|
18626
|
-
this.handleError(
|
|
18798
|
+
this.handleError({
|
|
18799
|
+
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
18800
|
+
message: ERROR_MESSAGE.CONFLICTING_TABS_CONFIG,
|
|
18801
|
+
code: EmbedErrorCodes.CONFLICTING_TABS_CONFIG,
|
|
18802
|
+
error: ERROR_MESSAGE.CONFLICTING_TABS_CONFIG,
|
|
18803
|
+
});
|
|
18627
18804
|
return queryParams;
|
|
18628
18805
|
}
|
|
18629
18806
|
if (primaryAction) {
|
|
@@ -18848,7 +19025,12 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18848
19025
|
error: JSON.stringify(error),
|
|
18849
19026
|
});
|
|
18850
19027
|
this.handleInsertionIntoDOM(this.embedConfig.loginFailedMessage);
|
|
18851
|
-
this.handleError(
|
|
19028
|
+
this.handleError({
|
|
19029
|
+
errorType: ErrorDetailsTypes.API,
|
|
19030
|
+
message: error.message || ERROR_MESSAGE.LOGIN_FAILED,
|
|
19031
|
+
code: EmbedErrorCodes.LOGIN_FAILED,
|
|
19032
|
+
error: error,
|
|
19033
|
+
});
|
|
18852
19034
|
});
|
|
18853
19035
|
});
|
|
18854
19036
|
}
|
|
@@ -19153,11 +19335,21 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
19153
19335
|
async trigger(messageType, data = {}) {
|
|
19154
19336
|
uploadMixpanelEvent(`${MIXPANEL_EVENT.VISUAL_SDK_TRIGGER}-${messageType}`);
|
|
19155
19337
|
if (!this.isRendered) {
|
|
19156
|
-
this.handleError(
|
|
19338
|
+
this.handleError({
|
|
19339
|
+
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
19340
|
+
message: ERROR_MESSAGE.RENDER_BEFORE_EVENTS_REQUIRED,
|
|
19341
|
+
code: EmbedErrorCodes.RENDER_NOT_CALLED,
|
|
19342
|
+
error: ERROR_MESSAGE.RENDER_BEFORE_EVENTS_REQUIRED,
|
|
19343
|
+
});
|
|
19157
19344
|
return null;
|
|
19158
19345
|
}
|
|
19159
19346
|
if (!messageType) {
|
|
19160
|
-
this.handleError(
|
|
19347
|
+
this.handleError({
|
|
19348
|
+
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
19349
|
+
message: ERROR_MESSAGE.HOST_EVENT_TYPE_UNDEFINED,
|
|
19350
|
+
code: EmbedErrorCodes.HOST_EVENT_TYPE_UNDEFINED,
|
|
19351
|
+
error: ERROR_MESSAGE.HOST_EVENT_TYPE_UNDEFINED,
|
|
19352
|
+
});
|
|
19161
19353
|
return null;
|
|
19162
19354
|
}
|
|
19163
19355
|
// Check if iframe exists before triggering -
|
|
@@ -19638,7 +19830,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
19638
19830
|
constructor(domSelector, viewConfig) {
|
|
19639
19831
|
viewConfig.embedComponentType = 'AppEmbed';
|
|
19640
19832
|
super(domSelector, viewConfig);
|
|
19641
|
-
this.defaultHeight =
|
|
19833
|
+
this.defaultHeight = 500;
|
|
19642
19834
|
this.sendFullHeightLazyLoadData = () => {
|
|
19643
19835
|
const data = calculateVisibleElementData(this.iFrame);
|
|
19644
19836
|
this.trigger(exports.HostEvent.VisibleEmbedCoordinates, data);
|
|
@@ -19660,8 +19852,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
19660
19852
|
* @param data The event payload
|
|
19661
19853
|
*/
|
|
19662
19854
|
this.updateIFrameHeight = (data) => {
|
|
19663
|
-
|
|
19664
|
-
this.setIFrameHeight(Math.max(data.data, (_a = this.iFrame) === null || _a === void 0 ? void 0 : _a.scrollHeight));
|
|
19855
|
+
this.setIFrameHeight(Math.max(data.data, this.defaultHeight));
|
|
19665
19856
|
this.sendFullHeightLazyLoadData();
|
|
19666
19857
|
};
|
|
19667
19858
|
this.embedIframeCenter = (data, responder) => {
|
|
@@ -19700,7 +19891,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
19700
19891
|
* embedded Liveboard or visualization.
|
|
19701
19892
|
*/
|
|
19702
19893
|
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;
|
|
19894
|
+
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
19895
|
let params = {};
|
|
19705
19896
|
params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
|
|
19706
19897
|
params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
|
|
@@ -19709,6 +19900,8 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
19709
19900
|
params[Param.HideLiveboardHeader] = hideLiveboardHeader;
|
|
19710
19901
|
params[Param.ShowLiveboardTitle] = showLiveboardTitle;
|
|
19711
19902
|
params[Param.ShowLiveboardDescription] = !!showLiveboardDescription;
|
|
19903
|
+
params[Param.ShowMaskedFilterChip] = showMaskedFilterChip;
|
|
19904
|
+
params[Param.IsLiveboardMasterpiecesEnabled] = isLiveboardMasterpiecesEnabled;
|
|
19712
19905
|
params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
|
|
19713
19906
|
params[Param.IsFullAppEmbed] = true;
|
|
19714
19907
|
params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
|
|
@@ -19735,7 +19928,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
19735
19928
|
params[Param.fullHeight] = true;
|
|
19736
19929
|
if (this.viewConfig.lazyLoadingForFullHeight) {
|
|
19737
19930
|
params[Param.IsLazyLoadingForEmbedEnabled] = true;
|
|
19738
|
-
|
|
19931
|
+
if (isValidCssMargin(this.viewConfig.lazyLoadingMargin)) {
|
|
19932
|
+
params[Param.RootMarginForLazyLoad] = this.viewConfig.lazyLoadingMargin;
|
|
19933
|
+
}
|
|
19739
19934
|
}
|
|
19740
19935
|
}
|
|
19741
19936
|
if (tag) {
|
|
@@ -19780,6 +19975,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
19780
19975
|
if (isCentralizedLiveboardFilterUXEnabled != undefined) {
|
|
19781
19976
|
params[Param.isCentralizedLiveboardFilterUXEnabled] = isCentralizedLiveboardFilterUXEnabled;
|
|
19782
19977
|
}
|
|
19978
|
+
this.defaultHeight = minimumHeight || this.defaultHeight;
|
|
19783
19979
|
params[Param.DataPanelV2Enabled] = dataPanelV2;
|
|
19784
19980
|
params[Param.HideHomepageLeftNav] = hideHomepageLeftNav;
|
|
19785
19981
|
params[Param.ModularHomeExperienceEnabled] = modularHomeExperience;
|
|
@@ -20134,19 +20330,19 @@ query GetEurekaVizSnapshots(
|
|
|
20134
20330
|
getEmbedParamsObject() {
|
|
20135
20331
|
let params = {};
|
|
20136
20332
|
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;
|
|
20333
|
+
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
20334
|
const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
|
|
20139
20335
|
|| this.viewConfig.preventPinboardFilterRemoval;
|
|
20140
20336
|
if (fullHeight === true) {
|
|
20141
20337
|
params[Param.fullHeight] = true;
|
|
20142
20338
|
if (this.viewConfig.lazyLoadingForFullHeight) {
|
|
20143
20339
|
params[Param.IsLazyLoadingForEmbedEnabled] = true;
|
|
20144
|
-
|
|
20340
|
+
if (isValidCssMargin(this.viewConfig.lazyLoadingMargin)) {
|
|
20341
|
+
params[Param.RootMarginForLazyLoad] = this.viewConfig.lazyLoadingMargin;
|
|
20342
|
+
}
|
|
20145
20343
|
}
|
|
20146
20344
|
}
|
|
20147
|
-
|
|
20148
|
-
this.defaultHeight = defaultHeight;
|
|
20149
|
-
}
|
|
20345
|
+
this.defaultHeight = minimumHeight || defaultHeight || this.defaultHeight;
|
|
20150
20346
|
if (enableVizTransformations !== undefined) {
|
|
20151
20347
|
params[Param.EnableVizTransformations] = enableVizTransformations.toString();
|
|
20152
20348
|
}
|
|
@@ -20213,6 +20409,8 @@ query GetEurekaVizSnapshots(
|
|
|
20213
20409
|
params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;
|
|
20214
20410
|
params[Param.ShowLiveboardReverifyBanner] = showLiveboardReverifyBanner;
|
|
20215
20411
|
params[Param.HideIrrelevantFiltersInTab] = hideIrrelevantChipsInLiveboardTabs;
|
|
20412
|
+
params[Param.ShowMaskedFilterChip] = showMaskedFilterChip;
|
|
20413
|
+
params[Param.IsLiveboardMasterpiecesEnabled] = isLiveboardMasterpiecesEnabled;
|
|
20216
20414
|
params[Param.IsEnhancedFilterInteractivityEnabled] = isEnhancedFilterInteractivityEnabled;
|
|
20217
20415
|
params[Param.DataPanelV2Enabled] = dataPanelV2;
|
|
20218
20416
|
params[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
|
|
@@ -20244,7 +20442,12 @@ query GetEurekaVizSnapshots(
|
|
|
20244
20442
|
const { vizId, activeTabId } = this.viewConfig;
|
|
20245
20443
|
const liveboardId = (_a = this.viewConfig.liveboardId) !== null && _a !== void 0 ? _a : this.viewConfig.pinboardId;
|
|
20246
20444
|
if (!liveboardId) {
|
|
20247
|
-
this.handleError(
|
|
20445
|
+
this.handleError({
|
|
20446
|
+
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
20447
|
+
message: ERROR_MESSAGE.LIVEBOARD_VIZ_ID_VALIDATION,
|
|
20448
|
+
code: EmbedErrorCodes.LIVEBOARD_ID_MISSING,
|
|
20449
|
+
error: ERROR_MESSAGE.LIVEBOARD_VIZ_ID_VALIDATION,
|
|
20450
|
+
});
|
|
20248
20451
|
}
|
|
20249
20452
|
return `${this.getRootIframeSrc()}${this.getIframeSuffixSrc(liveboardId, vizId, activeTabId)}`;
|
|
20250
20453
|
}
|
|
@@ -21208,7 +21411,12 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
21208
21411
|
getEmbedParamsObject() {
|
|
21209
21412
|
const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, enablePastConversationsSidebar, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, updatedSpotterChatPrompt, } = this.viewConfig;
|
|
21210
21413
|
if (!worksheetId) {
|
|
21211
|
-
this.handleError(
|
|
21414
|
+
this.handleError({
|
|
21415
|
+
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
21416
|
+
message: ERROR_MESSAGE.SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND,
|
|
21417
|
+
code: EmbedErrorCodes.WORKSHEET_ID_NOT_FOUND,
|
|
21418
|
+
error: ERROR_MESSAGE.SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND,
|
|
21419
|
+
});
|
|
21212
21420
|
}
|
|
21213
21421
|
const queryParams = this.getBaseQueryParams();
|
|
21214
21422
|
queryParams[Param.SpotterEnabled] = true;
|