@thoughtspot/visual-embed-sdk 1.27.0-alpha.0 → 1.27.0-alpha.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/README.md +2 -2
- package/cjs/.DS_Store +0 -0
- package/cjs/package.json +1 -1
- package/cjs/src/.DS_Store +0 -0
- package/cjs/src/embed/app.d.ts +0 -1
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +1 -1
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts +0 -1
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +1 -1
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/sage.d.ts +0 -1
- package/cjs/src/embed/sage.d.ts.map +1 -1
- package/cjs/src/embed/sage.js +7 -6
- package/cjs/src/embed/sage.js.map +1 -1
- package/cjs/src/embed/sage.spec.js +3 -3
- package/cjs/src/embed/sage.spec.js.map +1 -1
- package/cjs/src/embed/search.d.ts +0 -1
- package/cjs/src/embed/search.d.ts.map +1 -1
- package/cjs/src/embed/search.js +2 -3
- package/cjs/src/embed/search.js.map +1 -1
- package/cjs/src/embed/ts-embed.d.ts +0 -1
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +1 -3
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/types.d.ts +19 -49
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +12 -49
- package/cjs/src/types.js.map +1 -1
- package/cjs/src/utils/answerService.d.ts +10 -0
- package/cjs/src/utils/answerService.d.ts.map +1 -0
- package/cjs/src/utils/answerService.js +61 -0
- package/cjs/src/utils/answerService.js.map +1 -0
- package/cjs/src/utils/answerService.spec.d.ts +2 -0
- package/cjs/src/utils/answerService.spec.d.ts.map +1 -0
- package/cjs/src/utils/answerService.spec.js +31 -0
- package/cjs/src/utils/answerService.spec.js.map +1 -0
- package/cjs/src/utils/authService.d.ts +37 -0
- package/cjs/src/utils/authService.d.ts.map +1 -0
- package/cjs/src/utils/authService.js +106 -0
- package/cjs/src/utils/authService.js.map +1 -0
- package/cjs/src/utils/authService.spec.d.ts +2 -0
- package/cjs/src/utils/authService.spec.d.ts.map +1 -0
- package/cjs/src/utils/authService.spec.js +72 -0
- package/cjs/src/utils/authService.spec.js.map +1 -0
- package/dist/src/embed/app.d.ts +0 -1
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts +0 -1
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/embed/sage.d.ts +0 -1
- package/dist/src/embed/sage.d.ts.map +1 -1
- package/dist/src/embed/search.d.ts +0 -1
- package/dist/src/embed/search.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.d.ts +0 -1
- package/dist/src/embed/ts-embed.d.ts.map +1 -1
- package/dist/src/types.d.ts +19 -49
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/answerService.d.ts +10 -0
- package/dist/src/utils/answerService.d.ts.map +1 -0
- package/dist/src/utils/answerService.spec.d.ts +2 -0
- package/dist/src/utils/answerService.spec.d.ts.map +1 -0
- package/dist/src/utils/authService.d.ts +37 -0
- package/dist/src/utils/authService.d.ts.map +1 -0
- package/dist/src/utils/authService.spec.d.ts +2 -0
- package/dist/src/utils/authService.spec.d.ts.map +1 -0
- package/dist/tsembed-react.es.js +25 -64
- package/dist/tsembed-react.js +25 -64
- package/dist/tsembed.es.js +25 -64
- package/dist/tsembed.js +25 -64
- package/dist/visual-embed-sdk-react-full.d.ts +19 -54
- package/dist/visual-embed-sdk-react.d.ts +19 -54
- package/dist/visual-embed-sdk.d.ts +19 -54
- package/lib/.DS_Store +0 -0
- package/lib/package.json +1 -1
- package/lib/src/.DS_Store +0 -0
- package/lib/src/embed/app.d.ts +0 -1
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +1 -1
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts +0 -1
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +1 -1
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/sage.d.ts +0 -1
- package/lib/src/embed/sage.d.ts.map +1 -1
- package/lib/src/embed/sage.js +7 -6
- package/lib/src/embed/sage.js.map +1 -1
- package/lib/src/embed/sage.spec.js +3 -3
- package/lib/src/embed/sage.spec.js.map +1 -1
- package/lib/src/embed/search.d.ts +0 -1
- package/lib/src/embed/search.d.ts.map +1 -1
- package/lib/src/embed/search.js +2 -3
- package/lib/src/embed/search.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts +0 -1
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +1 -3
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/types.d.ts +19 -49
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +12 -49
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils/answerService.d.ts +10 -0
- package/lib/src/utils/answerService.d.ts.map +1 -0
- package/lib/src/utils/answerService.js +57 -0
- package/lib/src/utils/answerService.js.map +1 -0
- package/lib/src/utils/answerService.spec.d.ts +2 -0
- package/lib/src/utils/answerService.spec.d.ts.map +1 -0
- package/lib/src/utils/answerService.spec.js +29 -0
- package/lib/src/utils/answerService.spec.js.map +1 -0
- package/lib/src/utils/authService.d.ts +37 -0
- package/lib/src/utils/authService.d.ts.map +1 -0
- package/lib/src/utils/authService.js +97 -0
- package/lib/src/utils/authService.js.map +1 -0
- package/lib/src/utils/authService.spec.d.ts +2 -0
- package/lib/src/utils/authService.spec.d.ts.map +1 -0
- package/lib/src/utils/authService.spec.js +70 -0
- package/lib/src/utils/authService.spec.js.map +1 -0
- package/lib/src/visual-embed-sdk.d.ts +19 -54
- package/package.json +1 -1
- package/src/.DS_Store +0 -0
- package/src/embed/app.ts +1 -2
- package/src/embed/liveboard.ts +1 -2
- package/src/embed/sage.spec.ts +3 -3
- package/src/embed/sage.ts +7 -8
- package/src/embed/search.ts +2 -4
- package/src/embed/ts-embed.ts +1 -4
- package/src/types.ts +29 -59
package/dist/tsembed.js
CHANGED
|
@@ -577,6 +577,7 @@
|
|
|
577
577
|
(function (EmbedEvent) {
|
|
578
578
|
/**
|
|
579
579
|
* Rendering has initialized.
|
|
580
|
+
*
|
|
580
581
|
* @example
|
|
581
582
|
*```js
|
|
582
583
|
* liveboardEmbed.on(EmbedEvent.Init, showLoader)
|
|
@@ -585,7 +586,6 @@
|
|
|
585
586
|
* document.getElementById("loader");
|
|
586
587
|
* }
|
|
587
588
|
*```
|
|
588
|
-
*
|
|
589
589
|
* @returns timestamp - The timestamp when the event was generated.
|
|
590
590
|
*/
|
|
591
591
|
EmbedEvent["Init"] = "init";
|
|
@@ -598,12 +598,12 @@
|
|
|
598
598
|
* console.log('AuthInit', payload);
|
|
599
599
|
* })
|
|
600
600
|
*```
|
|
601
|
-
*
|
|
602
601
|
* @returns isLoggedIn - A Boolean specifying whether authentication was successful.
|
|
603
602
|
*/
|
|
604
603
|
EmbedEvent["AuthInit"] = "authInit";
|
|
605
604
|
/**
|
|
606
605
|
* The embed object container has loaded.
|
|
606
|
+
*
|
|
607
607
|
* @returns timestamp - The timestamp when the event was generated.
|
|
608
608
|
* @example
|
|
609
609
|
*```js
|
|
@@ -617,6 +617,7 @@
|
|
|
617
617
|
EmbedEvent["Load"] = "load";
|
|
618
618
|
/**
|
|
619
619
|
* Data pertaining to answer or Liveboard is received
|
|
620
|
+
*
|
|
620
621
|
* @return data - The answer or Liveboard data
|
|
621
622
|
* @example
|
|
622
623
|
*```js
|
|
@@ -640,7 +641,6 @@
|
|
|
640
641
|
*```js
|
|
641
642
|
* searchEmbed.on(EmbedEvent.QueryChanged, payload => console.log('data', payload))
|
|
642
643
|
*```
|
|
643
|
-
*
|
|
644
644
|
*/
|
|
645
645
|
EmbedEvent["QueryChanged"] = "queryChanged";
|
|
646
646
|
/**
|
|
@@ -649,7 +649,6 @@
|
|
|
649
649
|
* @returns additionalFilters - Any additional filters applied
|
|
650
650
|
* @returns drillDownColumns - The columns on which drill down was performed
|
|
651
651
|
* @returns nonFilteredColumns - The columns that were not filtered
|
|
652
|
-
*
|
|
653
652
|
* @example
|
|
654
653
|
*```js
|
|
655
654
|
* searchEmbed.trigger(HostEvent.DrillDown, {
|
|
@@ -663,7 +662,6 @@
|
|
|
663
662
|
* In this example, `VizPointDoubleClick` event is used for
|
|
664
663
|
* triggering the `DrillDown` event when an area or specific
|
|
665
664
|
* data point on a table or chart is double-clicked.
|
|
666
|
-
*
|
|
667
665
|
* @example
|
|
668
666
|
*```js
|
|
669
667
|
* searchEmbed.on(EmbedEvent.VizPointDoubleClick, (payload) => {
|
|
@@ -680,34 +678,31 @@
|
|
|
680
678
|
* })
|
|
681
679
|
* })
|
|
682
680
|
*```
|
|
683
|
-
*
|
|
684
681
|
*/
|
|
685
682
|
EmbedEvent["Drilldown"] = "drillDown";
|
|
686
683
|
/**
|
|
687
684
|
* One or more data sources have been selected.
|
|
688
|
-
* @returns dataSourceIds - the list of data sources
|
|
689
685
|
*
|
|
686
|
+
* @returns dataSourceIds - the list of data sources
|
|
690
687
|
* @example
|
|
691
688
|
* ```js
|
|
692
689
|
* searchEmbed.on(EmbedEvent.DataSourceSelected, payload => {
|
|
693
690
|
* console.log('DataSourceSelected', payload);
|
|
694
691
|
* })
|
|
695
692
|
* ```
|
|
696
|
-
*
|
|
697
693
|
*/
|
|
698
694
|
EmbedEvent["DataSourceSelected"] = "dataSourceSelected";
|
|
699
695
|
/**
|
|
700
696
|
* One or more data columns have been selected.
|
|
697
|
+
*
|
|
701
698
|
* @returns columnIds - the list of columns
|
|
702
699
|
* @version SDK: 1.10.0 | ThoughtSpot: 8.2.0.cl, 8.4.1.sw
|
|
703
|
-
*
|
|
704
700
|
* @example
|
|
705
701
|
* ```js
|
|
706
702
|
* appEmbed.on(EmbedEvent.AddRemoveColumns, payload => {
|
|
707
703
|
* console.log('AddRemoveColumns', payload);
|
|
708
704
|
* })
|
|
709
705
|
* ```
|
|
710
|
-
*
|
|
711
706
|
*/
|
|
712
707
|
EmbedEvent["AddRemoveColumns"] = "addRemoveColumns";
|
|
713
708
|
/**
|
|
@@ -715,7 +710,6 @@
|
|
|
715
710
|
*
|
|
716
711
|
* @returns actionId - ID of the custom action
|
|
717
712
|
* @returns data - Response payload with the Answer or Liveboard data
|
|
718
|
-
*
|
|
719
713
|
* @example
|
|
720
714
|
* ```js
|
|
721
715
|
* appEmbed.on(EmbedEvent.customAction, payload => {
|
|
@@ -731,9 +725,7 @@
|
|
|
731
725
|
* Listen to double click actions on a visualization.
|
|
732
726
|
*
|
|
733
727
|
* @return ContextMenuInputPoints - Data point that is double-clicked
|
|
734
|
-
*
|
|
735
728
|
* @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
|
|
736
|
-
*
|
|
737
729
|
* @example
|
|
738
730
|
* ```js
|
|
739
731
|
* livebaordEmbed.on(EmbedEvent.VizPointDoubleClick, payload => {
|
|
@@ -748,7 +740,6 @@
|
|
|
748
740
|
* @return viz, clickedPoint - metadata about the point that is clicked
|
|
749
741
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
750
742
|
* @important
|
|
751
|
-
*
|
|
752
743
|
* @example
|
|
753
744
|
* ```js
|
|
754
745
|
* embed.on(ThoughtSpotEmbed.Event.VizPointClick, ({data}) => {
|
|
@@ -767,7 +758,6 @@
|
|
|
767
758
|
* An error has occurred.
|
|
768
759
|
*
|
|
769
760
|
* @returns error - An error object or message
|
|
770
|
-
*
|
|
771
761
|
* @example
|
|
772
762
|
* ```js
|
|
773
763
|
* SearchEmbed.on(EmbedEvent.Error, showErrorMsg)
|
|
@@ -775,19 +765,16 @@
|
|
|
775
765
|
* function showErrorMsg() {
|
|
776
766
|
* document.getElementById("error");
|
|
777
767
|
* ```
|
|
778
|
-
*
|
|
779
768
|
*/
|
|
780
769
|
EmbedEvent["Error"] = "Error";
|
|
781
770
|
/**
|
|
782
771
|
* The embedded object has sent an alert.
|
|
783
772
|
*
|
|
784
773
|
* @returns alert - An alert object
|
|
785
|
-
*
|
|
786
774
|
* @example
|
|
787
775
|
* ```js
|
|
788
776
|
* searchEmbed.on(EmbedEvent.Alert)
|
|
789
777
|
* ```
|
|
790
|
-
*
|
|
791
778
|
*/
|
|
792
779
|
EmbedEvent["Alert"] = "alert";
|
|
793
780
|
/**
|
|
@@ -834,7 +821,6 @@
|
|
|
834
821
|
* Applicable to `SearchBarEmbed` only.
|
|
835
822
|
*
|
|
836
823
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
837
|
-
*
|
|
838
824
|
* @example
|
|
839
825
|
*```js
|
|
840
826
|
* searchbarEmbed.on(EmbedEvent.GetDataClick)
|
|
@@ -881,8 +867,8 @@
|
|
|
881
867
|
EmbedEvent["SAMLComplete"] = "samlComplete";
|
|
882
868
|
/**
|
|
883
869
|
* Emitted when any modal is opened in the app
|
|
884
|
-
* @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
|
|
885
870
|
*
|
|
871
|
+
* @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
|
|
886
872
|
* @example
|
|
887
873
|
*```js
|
|
888
874
|
* appEmbed.on(EmbedEvent.DialogOpen, payload => {
|
|
@@ -893,8 +879,8 @@
|
|
|
893
879
|
EmbedEvent["DialogOpen"] = "dialog-open";
|
|
894
880
|
/**
|
|
895
881
|
* Emitted when any modal is closed in the app
|
|
896
|
-
* @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
|
|
897
882
|
*
|
|
883
|
+
* @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
|
|
898
884
|
* @example
|
|
899
885
|
*```js
|
|
900
886
|
* appEmbed.on(EmbedEvent.DialogClose, payload => {
|
|
@@ -907,8 +893,8 @@
|
|
|
907
893
|
* Emitted when the Liveboard shell loads.
|
|
908
894
|
* You can use this event as a hook to trigger
|
|
909
895
|
* other events on the rendered Liveboard.
|
|
910
|
-
* @version SDK: 1.9.1 | ThoughtSpot: 8.1.0.cl, 8.4.1.sw
|
|
911
896
|
*
|
|
897
|
+
* @version SDK: 1.9.1 | ThoughtSpot: 8.1.0.cl, 8.4.1.sw
|
|
912
898
|
* @example
|
|
913
899
|
*```js
|
|
914
900
|
* liveboardEmbed.on(EmbedEvent.LiveboardRendered, payload => {
|
|
@@ -917,7 +903,6 @@
|
|
|
917
903
|
*```
|
|
918
904
|
* The following example shows how to trigger
|
|
919
905
|
* `SetVisibleVizs` event using LiveboardRendered embed event:
|
|
920
|
-
*
|
|
921
906
|
* @example
|
|
922
907
|
*```js
|
|
923
908
|
* const embedRef = useEmbedRef();
|
|
@@ -930,8 +915,8 @@
|
|
|
930
915
|
/**
|
|
931
916
|
* This can be used to register an event listener which
|
|
932
917
|
* is triggered on all events.
|
|
933
|
-
* @Version SDK: 1.10.0 | ThoughtSpot: 8.2.0.cl, 8.4.1.sw
|
|
934
918
|
*
|
|
919
|
+
* @Version SDK: 1.10.0 | ThoughtSpot: 8.2.0.cl, 8.4.1.sw
|
|
935
920
|
* @example
|
|
936
921
|
*```js
|
|
937
922
|
* appEmbed.on(EmbedEvent.ALL, payload => {
|
|
@@ -942,6 +927,7 @@
|
|
|
942
927
|
EmbedEvent["ALL"] = "*";
|
|
943
928
|
/**
|
|
944
929
|
* Emitted when an Answer is saved in the app
|
|
930
|
+
*
|
|
945
931
|
* @Version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
946
932
|
* @example
|
|
947
933
|
*```js
|
|
@@ -967,7 +953,6 @@
|
|
|
967
953
|
* or `EmbedEvent.DownloadAsXLSX`
|
|
968
954
|
*
|
|
969
955
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
970
|
-
*
|
|
971
956
|
* @example
|
|
972
957
|
*```js
|
|
973
958
|
* liveboardEmbed.trigger(HostEvent.Download, {
|
|
@@ -978,8 +963,8 @@
|
|
|
978
963
|
EmbedEvent["Download"] = "download";
|
|
979
964
|
/**
|
|
980
965
|
* Emitted when the download action is triggered on an answer
|
|
981
|
-
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.0.sw
|
|
982
966
|
*
|
|
967
|
+
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.0.sw
|
|
983
968
|
* @example
|
|
984
969
|
*```js
|
|
985
970
|
* //trigger when action starts
|
|
@@ -989,14 +974,12 @@
|
|
|
989
974
|
* searchEmbed.on(EmbedEvent.DownloadAsPng, payload => {
|
|
990
975
|
* console.log('download PNG', payload)})
|
|
991
976
|
*```
|
|
992
|
-
*
|
|
993
977
|
*/
|
|
994
978
|
EmbedEvent["DownloadAsPng"] = "downloadAsPng";
|
|
995
979
|
/**
|
|
996
980
|
* Emitted when the Download as PDF action is triggered on an answer
|
|
997
981
|
*
|
|
998
982
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
999
|
-
*
|
|
1000
983
|
* @example
|
|
1001
984
|
*```js
|
|
1002
985
|
* //trigger when action starts
|
|
@@ -1006,7 +989,6 @@
|
|
|
1006
989
|
* searchEmbed.on(EmbedEvent.DownloadAsPdf, payload => {
|
|
1007
990
|
* console.log('download PDF', payload)})
|
|
1008
991
|
*```
|
|
1009
|
-
*
|
|
1010
992
|
*/
|
|
1011
993
|
EmbedEvent["DownloadAsPdf"] = "downloadAsPdf";
|
|
1012
994
|
/**
|
|
@@ -1028,7 +1010,6 @@
|
|
|
1028
1010
|
* Emitted when the Download as XLSX action is triggered on an answer
|
|
1029
1011
|
*
|
|
1030
1012
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1031
|
-
*
|
|
1032
1013
|
* @example
|
|
1033
1014
|
*```js
|
|
1034
1015
|
* //trigger when action starts
|
|
@@ -1044,7 +1025,6 @@
|
|
|
1044
1025
|
* Emitted when an Answer is deleted in the app
|
|
1045
1026
|
*
|
|
1046
1027
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1047
|
-
*
|
|
1048
1028
|
* @example
|
|
1049
1029
|
*```js
|
|
1050
1030
|
* //trigger when action starts
|
|
@@ -1098,7 +1078,6 @@
|
|
|
1098
1078
|
* Emitted when a user shares an object with another user or group
|
|
1099
1079
|
*
|
|
1100
1080
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1101
|
-
*
|
|
1102
1081
|
* @example
|
|
1103
1082
|
*```js
|
|
1104
1083
|
* //trigger when action starts
|
|
@@ -1178,6 +1157,7 @@
|
|
|
1178
1157
|
/**
|
|
1179
1158
|
* Emitted when the **Export TML** action is triggered on an
|
|
1180
1159
|
* an embedded object in the app
|
|
1160
|
+
*
|
|
1181
1161
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1182
1162
|
* @example
|
|
1183
1163
|
*```js
|
|
@@ -1315,7 +1295,6 @@
|
|
|
1315
1295
|
*```js
|
|
1316
1296
|
* liveboardEmbed.trigger(HostEvent.Present)
|
|
1317
1297
|
*```
|
|
1318
|
-
*
|
|
1319
1298
|
* @example
|
|
1320
1299
|
*```js
|
|
1321
1300
|
* liveboardEmbed.on(EmbedEvent.Present, {
|
|
@@ -1333,77 +1312,65 @@
|
|
|
1333
1312
|
* liveboardEmbed.trigger(HostEvent.Delete,
|
|
1334
1313
|
* {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1335
1314
|
*```
|
|
1336
|
-
*
|
|
1337
1315
|
*/
|
|
1338
1316
|
EmbedEvent["Delete"] = "delete";
|
|
1339
1317
|
/**
|
|
1340
1318
|
* Emitted when a user clicks Manage schedules on a Liveboard
|
|
1341
1319
|
*
|
|
1342
1320
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
1343
|
-
*
|
|
1344
1321
|
* @example
|
|
1345
1322
|
*```js
|
|
1346
1323
|
* liveboardEmbed.trigger(HostEvent.SchedulesList)
|
|
1347
1324
|
*```
|
|
1348
|
-
*
|
|
1349
1325
|
*/
|
|
1350
1326
|
EmbedEvent["SchedulesList"] = "schedule-list";
|
|
1351
1327
|
/**
|
|
1352
1328
|
* Emitted when a user clicks **Cancel** in edit mode on a Liveboard
|
|
1353
1329
|
*
|
|
1354
1330
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
1355
|
-
*
|
|
1356
1331
|
* @example
|
|
1357
1332
|
*```js
|
|
1358
1333
|
* liveboardEmbed.trigger(HostEvent.Cancel)
|
|
1359
1334
|
*```
|
|
1360
|
-
*
|
|
1361
1335
|
*/
|
|
1362
1336
|
EmbedEvent["Cancel"] = "cancel";
|
|
1363
1337
|
/**
|
|
1364
1338
|
* Emitted when a user clicks **Explore** on a visualization
|
|
1365
1339
|
*
|
|
1366
1340
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
1367
|
-
*
|
|
1368
1341
|
* @example
|
|
1369
1342
|
*```js
|
|
1370
1343
|
* liveboardEmbed.trigger(HostEvent.Explore, {
|
|
1371
1344
|
* vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1372
1345
|
*```
|
|
1373
|
-
*
|
|
1374
1346
|
*/
|
|
1375
1347
|
EmbedEvent["Explore"] = "explore";
|
|
1376
1348
|
/**
|
|
1377
1349
|
* Emitted when a user clicks **Copy link** action on a visualization
|
|
1378
1350
|
*
|
|
1379
1351
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
1380
|
-
*
|
|
1381
1352
|
* @example
|
|
1382
1353
|
*```js
|
|
1383
1354
|
* liveboardEmbed.trigger(HostEvent.CopyLink, {
|
|
1384
1355
|
* vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1385
1356
|
*```
|
|
1386
|
-
*
|
|
1387
1357
|
*/
|
|
1388
1358
|
EmbedEvent["CopyLink"] = "embedDocument";
|
|
1389
1359
|
/**
|
|
1390
1360
|
* Emitted when a user interacts with cross filters on a visualization or Liveboard
|
|
1391
1361
|
*
|
|
1392
1362
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.5.0.sw
|
|
1393
|
-
*
|
|
1394
1363
|
* @example
|
|
1395
1364
|
*```js
|
|
1396
1365
|
* liveboardEmbed.trigger(HostEvent.CrossFilterChanged, {
|
|
1397
1366
|
* vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1398
1367
|
*```
|
|
1399
|
-
*
|
|
1400
1368
|
*/
|
|
1401
1369
|
EmbedEvent["CrossFilterChanged"] = "cross-filter-changed";
|
|
1402
1370
|
/**
|
|
1403
1371
|
* Emitted when a user right clicks on a visualization (chart or table)
|
|
1404
1372
|
*
|
|
1405
1373
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.5.0.sw
|
|
1406
|
-
*
|
|
1407
1374
|
* @example
|
|
1408
1375
|
*```js
|
|
1409
1376
|
* LiveboardEmbed.on(EmbedEvent.VizPointRightClick, payload => {
|
|
@@ -1434,7 +1401,6 @@
|
|
|
1434
1401
|
* Emitted when a user selects a data source.
|
|
1435
1402
|
*
|
|
1436
1403
|
* @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
|
|
1437
|
-
*
|
|
1438
1404
|
*/
|
|
1439
1405
|
EmbedEvent["SageWorksheetUpdated"] = "sageWorksheetUpdated";
|
|
1440
1406
|
/**
|
|
@@ -1639,7 +1605,6 @@
|
|
|
1639
1605
|
*
|
|
1640
1606
|
* @param - `path` - the path to navigate to to go forward or back. The path value can
|
|
1641
1607
|
* be a number; for example, `1`, `-1`.
|
|
1642
|
-
*
|
|
1643
1608
|
* @example
|
|
1644
1609
|
* ```js
|
|
1645
1610
|
* appEmbed.navigateToPage(-1)
|
|
@@ -2210,9 +2175,7 @@
|
|
|
2210
2175
|
* Updates the search query string for Natural Language Search operations.
|
|
2211
2176
|
*
|
|
2212
2177
|
* @param - `queryString`: Text string in Natural Language format
|
|
2213
|
-
*
|
|
2214
2178
|
* @param - `executeSearch`: Boolean to execute search and update search query
|
|
2215
|
-
*
|
|
2216
2179
|
* @example
|
|
2217
2180
|
* ```js
|
|
2218
2181
|
* sageEmbed.trigger(HostEvent.UpdateSageQuery, {
|
|
@@ -13540,7 +13503,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
|
|
|
13540
13503
|
});
|
|
13541
13504
|
}
|
|
13542
13505
|
|
|
13543
|
-
var name="@thoughtspot/visual-embed-sdk";var version="1.27.0-alpha.
|
|
13506
|
+
var name="@thoughtspot/visual-embed-sdk";var version="1.27.0-alpha.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 . --incremental false; tsc -p . --incremental false --module commonjs --outDir cjs",start:"gatsby develop","build:gatsby":"npm run clean:gatsby && gatsby build --prefix-paths","build:gatsby:noprefix":"npm run clean:gatsby && gatsby build","serve:gatsby":"gatsby serve","clean:gatsby":"gatsby clean","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts","bundle-dts":"dts-bundle --name ../../dist/visual-embed-sdk --main lib/src/index.d.ts --outputAsModuleFolder=true","bundle-dts-react":"dts-bundle --name ../../../dist/visual-embed-sdk-react --main lib/src/react/index.d.ts --outputAsModuleFolder=true","bundle-dts-react-full":"dts-bundle --name ../../../dist/visual-embed-sdk-react-full --main lib/src/react/all-types-export.d.ts --outputAsModuleFolder=true",build:"rollup -c",watch:"rollup -cw","docs-cmd":"node scripts/gatsby-commands.js",docgen:"typedoc --tsconfig tsconfig.json --theme typedoc-theme","test-sdk":"jest -c jest.config.sdk.js --runInBand","test-docs":"jest -c jest.config.docs.js",test:"npm run test-sdk && npm run test-docs",posttest:"cat ./coverage/sdk/lcov.info | coveralls","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"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={algoliasearch:"^4.10.5",classnames:"^2.3.1",dompurify:"^2.3.4","eslint-plugin-comment-length":"^0.9.2","eslint-plugin-jsdoc":"^46.9.0",eventemitter3:"^4.0.7","gatsby-plugin-vercel":"^1.0.3","html-react-parser":"^1.4.12",lodash:"^4.17.21","mixpanel-browser":"^2.45.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.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":"^8.2.6","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^22.2.3","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^4.6.0","@typescript-eslint/parser":"^4.6.0",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1",coveralls:"^3.1.0","current-git-branch":"^1.1.0","dts-bundle":"^0.7.3",eslint:"^7.12.1","eslint-config-airbnb-base":"^14.2.0","eslint-config-prettier":"^6.15.0","eslint-import-resolver-typescript":"^2.3.0","eslint-plugin-import":"^2.22.1","eslint-plugin-prettier":"^3.1.4","eslint-plugin-react-hooks":"^4.2.0","fs-extra":"^10.0.0",gatsby:"3.13.1","gatsby-plugin-algolia":"^0.22.2","gatsby-plugin-catch-links":"^3.1.0","gatsby-plugin-env-variables":"^2.1.0","gatsby-plugin-intl":"^0.3.3","gatsby-plugin-manifest":"^3.2.0","gatsby-plugin-output":"^0.1.3","gatsby-plugin-sass":"6.7.0","gatsby-plugin-sitemap":"^4.10.0","gatsby-source-filesystem":"3.1.0","gatsby-transformer-asciidoc":"2.1.0","gatsby-transformer-rehype":"2.0.0","gh-pages":"^3.1.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^1.1.1",jest:"^26.6.3","jest-fetch-mock":"^3.0.3",jsdom:"^17.0.0","node-sass":"^8.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:"2.30.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^26.5.5","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","url-search-params-polyfill":"^8.1.0",util:"^0.12.4"};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","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,description:description,module:module,main:main,types:types,files:files,exports:exports$1,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.js",limit:"44 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};
|
|
13544
13507
|
|
|
13545
13508
|
/**
|
|
13546
13509
|
* Copyright (c) 2022
|
|
@@ -13576,7 +13539,6 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
|
|
|
13576
13539
|
*/
|
|
13577
13540
|
this.embedNodeKey = '__tsEmbed';
|
|
13578
13541
|
this.isAppInitialized = false;
|
|
13579
|
-
this.embedComponentType = 'TsEmbed';
|
|
13580
13542
|
/**
|
|
13581
13543
|
* Should we encode URL Query Params using base64 encoding which thoughtspot
|
|
13582
13544
|
* will generate for embedding. This provides additional security to
|
|
@@ -13668,7 +13630,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
|
|
|
13668
13630
|
allOtherKeys.forEach((key) => {
|
|
13669
13631
|
if (!isUndefined(viewConfig[key])
|
|
13670
13632
|
&& !isEqual_1(viewConfig[key], preRenderedObject.viewConfig[key])) {
|
|
13671
|
-
console.warn(
|
|
13633
|
+
console.warn('TS Embed component was pre-rendered with '
|
|
13672
13634
|
+ `"${key}" as "${JSON.stringify(preRenderedObject.viewConfig[key])}" `
|
|
13673
13635
|
+ `but a different value "${JSON.stringify(viewConfig[key])}" `
|
|
13674
13636
|
+ 'was passed to the Embed component. '
|
|
@@ -13693,7 +13655,6 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
|
|
|
13693
13655
|
this.registerAppInit();
|
|
13694
13656
|
uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_EMBED_CREATE, {
|
|
13695
13657
|
...viewConfig,
|
|
13696
|
-
embedComponentType: this.embedComponentType,
|
|
13697
13658
|
});
|
|
13698
13659
|
}
|
|
13699
13660
|
/**
|
|
@@ -14621,9 +14582,9 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
|
|
|
14621
14582
|
class AppEmbed extends V1Embed {
|
|
14622
14583
|
// eslint-disable-next-line no-useless-constructor
|
|
14623
14584
|
constructor(domSelector, viewConfig) {
|
|
14585
|
+
viewConfig.embedComponentType = 'AppEmbed';
|
|
14624
14586
|
super(domSelector, viewConfig);
|
|
14625
14587
|
this.defaultHeight = '100%';
|
|
14626
|
-
this.embedComponentType = 'AppEmbed';
|
|
14627
14588
|
/**
|
|
14628
14589
|
* Set the iframe height as per the computed height received
|
|
14629
14590
|
* from the ThoughtSpot app.
|
|
@@ -14816,9 +14777,9 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
|
|
|
14816
14777
|
class LiveboardEmbed extends V1Embed {
|
|
14817
14778
|
// eslint-disable-next-line no-useless-constructor
|
|
14818
14779
|
constructor(domSelector, viewConfig) {
|
|
14780
|
+
viewConfig.embedComponentType = 'LiveboardEmbed';
|
|
14819
14781
|
super(domSelector, viewConfig);
|
|
14820
14782
|
this.defaultHeight = 500;
|
|
14821
|
-
this.embedComponentType = 'LiveboardEmbed';
|
|
14822
14783
|
/**
|
|
14823
14784
|
* Set the iframe height as per the computed height received
|
|
14824
14785
|
* from the ThoughtSpot app.
|
|
@@ -15016,9 +14977,8 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
|
|
|
15016
14977
|
*/
|
|
15017
14978
|
class SearchEmbed extends TsEmbed {
|
|
15018
14979
|
constructor(domSelector, viewConfig) {
|
|
15019
|
-
|
|
15020
|
-
|
|
15021
|
-
this.viewConfig = viewConfig;
|
|
14980
|
+
viewConfig.embedComponentType = 'SearchEmbed';
|
|
14981
|
+
super(domSelector, viewConfig);
|
|
15022
14982
|
}
|
|
15023
14983
|
/**
|
|
15024
14984
|
* Get the state of the data sources panel that the embedded
|
|
@@ -15205,8 +15165,8 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
|
|
|
15205
15165
|
class SageEmbed extends V1Embed {
|
|
15206
15166
|
// eslint-disable-next-line no-useless-constructor
|
|
15207
15167
|
constructor(domSelector, viewConfig) {
|
|
15168
|
+
viewConfig.embedComponentType = 'SageEmbed';
|
|
15208
15169
|
super(domSelector, viewConfig);
|
|
15209
|
-
this.embedComponentType = 'SageEmbed';
|
|
15210
15170
|
}
|
|
15211
15171
|
/**
|
|
15212
15172
|
* Constructs a map of parameters to be passed on to the
|
|
@@ -15250,15 +15210,16 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
|
|
|
15250
15210
|
const { dataSource, searchOptions, } = this.viewConfig;
|
|
15251
15211
|
if (dataSource)
|
|
15252
15212
|
postHashObj[Param.WorksheetId] = dataSource;
|
|
15253
|
-
if (searchOptions === null || searchOptions === void 0 ? void 0 : searchOptions.searchQuery) {
|
|
15254
|
-
postHashObj[Param.
|
|
15255
|
-
if (searchOptions.executeSearch) {
|
|
15256
|
-
postHashObj[Param.executeSearch] = true;
|
|
15257
|
-
}
|
|
15213
|
+
if ((searchOptions === null || searchOptions === void 0 ? void 0 : searchOptions.searchQuery) && searchOptions.executeSearch) {
|
|
15214
|
+
postHashObj[Param.executeSearch] = true;
|
|
15258
15215
|
}
|
|
15259
15216
|
let sagePostHashParams = new URLSearchParams(postHashObj).toString();
|
|
15260
15217
|
if (sagePostHashParams)
|
|
15261
15218
|
sagePostHashParams = `${tsPostHashParams ? '&' : '?'}${sagePostHashParams}`;
|
|
15219
|
+
if (searchOptions === null || searchOptions === void 0 ? void 0 : searchOptions.searchQuery)
|
|
15220
|
+
sagePostHashParams += `${sagePostHashParams ? '&' : '?'}${[Param.Query]}=${encodeURIComponent(searchOptions.searchQuery)}`;
|
|
15221
|
+
// use encodeURIComponent for query instead of URLSearchParams
|
|
15222
|
+
// as it adds + instead of %20 for spaces
|
|
15262
15223
|
return `${this.getRootIframeSrc()}/embed/${path}${tsPostHashParams}${sagePostHashParams}`;
|
|
15263
15224
|
}
|
|
15264
15225
|
/**
|