@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.
Files changed (128) hide show
  1. package/README.md +2 -2
  2. package/cjs/.DS_Store +0 -0
  3. package/cjs/package.json +1 -1
  4. package/cjs/src/.DS_Store +0 -0
  5. package/cjs/src/embed/app.d.ts +0 -1
  6. package/cjs/src/embed/app.d.ts.map +1 -1
  7. package/cjs/src/embed/app.js +1 -1
  8. package/cjs/src/embed/app.js.map +1 -1
  9. package/cjs/src/embed/liveboard.d.ts +0 -1
  10. package/cjs/src/embed/liveboard.d.ts.map +1 -1
  11. package/cjs/src/embed/liveboard.js +1 -1
  12. package/cjs/src/embed/liveboard.js.map +1 -1
  13. package/cjs/src/embed/sage.d.ts +0 -1
  14. package/cjs/src/embed/sage.d.ts.map +1 -1
  15. package/cjs/src/embed/sage.js +7 -6
  16. package/cjs/src/embed/sage.js.map +1 -1
  17. package/cjs/src/embed/sage.spec.js +3 -3
  18. package/cjs/src/embed/sage.spec.js.map +1 -1
  19. package/cjs/src/embed/search.d.ts +0 -1
  20. package/cjs/src/embed/search.d.ts.map +1 -1
  21. package/cjs/src/embed/search.js +2 -3
  22. package/cjs/src/embed/search.js.map +1 -1
  23. package/cjs/src/embed/ts-embed.d.ts +0 -1
  24. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  25. package/cjs/src/embed/ts-embed.js +1 -3
  26. package/cjs/src/embed/ts-embed.js.map +1 -1
  27. package/cjs/src/types.d.ts +19 -49
  28. package/cjs/src/types.d.ts.map +1 -1
  29. package/cjs/src/types.js +12 -49
  30. package/cjs/src/types.js.map +1 -1
  31. package/cjs/src/utils/answerService.d.ts +10 -0
  32. package/cjs/src/utils/answerService.d.ts.map +1 -0
  33. package/cjs/src/utils/answerService.js +61 -0
  34. package/cjs/src/utils/answerService.js.map +1 -0
  35. package/cjs/src/utils/answerService.spec.d.ts +2 -0
  36. package/cjs/src/utils/answerService.spec.d.ts.map +1 -0
  37. package/cjs/src/utils/answerService.spec.js +31 -0
  38. package/cjs/src/utils/answerService.spec.js.map +1 -0
  39. package/cjs/src/utils/authService.d.ts +37 -0
  40. package/cjs/src/utils/authService.d.ts.map +1 -0
  41. package/cjs/src/utils/authService.js +106 -0
  42. package/cjs/src/utils/authService.js.map +1 -0
  43. package/cjs/src/utils/authService.spec.d.ts +2 -0
  44. package/cjs/src/utils/authService.spec.d.ts.map +1 -0
  45. package/cjs/src/utils/authService.spec.js +72 -0
  46. package/cjs/src/utils/authService.spec.js.map +1 -0
  47. package/dist/src/embed/app.d.ts +0 -1
  48. package/dist/src/embed/app.d.ts.map +1 -1
  49. package/dist/src/embed/liveboard.d.ts +0 -1
  50. package/dist/src/embed/liveboard.d.ts.map +1 -1
  51. package/dist/src/embed/sage.d.ts +0 -1
  52. package/dist/src/embed/sage.d.ts.map +1 -1
  53. package/dist/src/embed/search.d.ts +0 -1
  54. package/dist/src/embed/search.d.ts.map +1 -1
  55. package/dist/src/embed/ts-embed.d.ts +0 -1
  56. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  57. package/dist/src/types.d.ts +19 -49
  58. package/dist/src/types.d.ts.map +1 -1
  59. package/dist/src/utils/answerService.d.ts +10 -0
  60. package/dist/src/utils/answerService.d.ts.map +1 -0
  61. package/dist/src/utils/answerService.spec.d.ts +2 -0
  62. package/dist/src/utils/answerService.spec.d.ts.map +1 -0
  63. package/dist/src/utils/authService.d.ts +37 -0
  64. package/dist/src/utils/authService.d.ts.map +1 -0
  65. package/dist/src/utils/authService.spec.d.ts +2 -0
  66. package/dist/src/utils/authService.spec.d.ts.map +1 -0
  67. package/dist/tsembed-react.es.js +25 -64
  68. package/dist/tsembed-react.js +25 -64
  69. package/dist/tsembed.es.js +25 -64
  70. package/dist/tsembed.js +25 -64
  71. package/dist/visual-embed-sdk-react-full.d.ts +19 -54
  72. package/dist/visual-embed-sdk-react.d.ts +19 -54
  73. package/dist/visual-embed-sdk.d.ts +19 -54
  74. package/lib/.DS_Store +0 -0
  75. package/lib/package.json +1 -1
  76. package/lib/src/.DS_Store +0 -0
  77. package/lib/src/embed/app.d.ts +0 -1
  78. package/lib/src/embed/app.d.ts.map +1 -1
  79. package/lib/src/embed/app.js +1 -1
  80. package/lib/src/embed/app.js.map +1 -1
  81. package/lib/src/embed/liveboard.d.ts +0 -1
  82. package/lib/src/embed/liveboard.d.ts.map +1 -1
  83. package/lib/src/embed/liveboard.js +1 -1
  84. package/lib/src/embed/liveboard.js.map +1 -1
  85. package/lib/src/embed/sage.d.ts +0 -1
  86. package/lib/src/embed/sage.d.ts.map +1 -1
  87. package/lib/src/embed/sage.js +7 -6
  88. package/lib/src/embed/sage.js.map +1 -1
  89. package/lib/src/embed/sage.spec.js +3 -3
  90. package/lib/src/embed/sage.spec.js.map +1 -1
  91. package/lib/src/embed/search.d.ts +0 -1
  92. package/lib/src/embed/search.d.ts.map +1 -1
  93. package/lib/src/embed/search.js +2 -3
  94. package/lib/src/embed/search.js.map +1 -1
  95. package/lib/src/embed/ts-embed.d.ts +0 -1
  96. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  97. package/lib/src/embed/ts-embed.js +1 -3
  98. package/lib/src/embed/ts-embed.js.map +1 -1
  99. package/lib/src/types.d.ts +19 -49
  100. package/lib/src/types.d.ts.map +1 -1
  101. package/lib/src/types.js +12 -49
  102. package/lib/src/types.js.map +1 -1
  103. package/lib/src/utils/answerService.d.ts +10 -0
  104. package/lib/src/utils/answerService.d.ts.map +1 -0
  105. package/lib/src/utils/answerService.js +57 -0
  106. package/lib/src/utils/answerService.js.map +1 -0
  107. package/lib/src/utils/answerService.spec.d.ts +2 -0
  108. package/lib/src/utils/answerService.spec.d.ts.map +1 -0
  109. package/lib/src/utils/answerService.spec.js +29 -0
  110. package/lib/src/utils/answerService.spec.js.map +1 -0
  111. package/lib/src/utils/authService.d.ts +37 -0
  112. package/lib/src/utils/authService.d.ts.map +1 -0
  113. package/lib/src/utils/authService.js +97 -0
  114. package/lib/src/utils/authService.js.map +1 -0
  115. package/lib/src/utils/authService.spec.d.ts +2 -0
  116. package/lib/src/utils/authService.spec.d.ts.map +1 -0
  117. package/lib/src/utils/authService.spec.js +70 -0
  118. package/lib/src/utils/authService.spec.js.map +1 -0
  119. package/lib/src/visual-embed-sdk.d.ts +19 -54
  120. package/package.json +1 -1
  121. package/src/.DS_Store +0 -0
  122. package/src/embed/app.ts +1 -2
  123. package/src/embed/liveboard.ts +1 -2
  124. package/src/embed/sage.spec.ts +3 -3
  125. package/src/embed/sage.ts +7 -8
  126. package/src/embed/search.ts +2 -4
  127. package/src/embed/ts-embed.ts +1 -4
  128. package/src/types.ts +29 -59
@@ -701,6 +701,7 @@
701
701
  (function (EmbedEvent) {
702
702
  /**
703
703
  * Rendering has initialized.
704
+ *
704
705
  * @example
705
706
  *```js
706
707
  * liveboardEmbed.on(EmbedEvent.Init, showLoader)
@@ -709,7 +710,6 @@
709
710
  * document.getElementById("loader");
710
711
  * }
711
712
  *```
712
- *
713
713
  * @returns timestamp - The timestamp when the event was generated.
714
714
  */
715
715
  EmbedEvent["Init"] = "init";
@@ -722,12 +722,12 @@
722
722
  * console.log('AuthInit', payload);
723
723
  * })
724
724
  *```
725
- *
726
725
  * @returns isLoggedIn - A Boolean specifying whether authentication was successful.
727
726
  */
728
727
  EmbedEvent["AuthInit"] = "authInit";
729
728
  /**
730
729
  * The embed object container has loaded.
730
+ *
731
731
  * @returns timestamp - The timestamp when the event was generated.
732
732
  * @example
733
733
  *```js
@@ -741,6 +741,7 @@
741
741
  EmbedEvent["Load"] = "load";
742
742
  /**
743
743
  * Data pertaining to answer or Liveboard is received
744
+ *
744
745
  * @return data - The answer or Liveboard data
745
746
  * @example
746
747
  *```js
@@ -764,7 +765,6 @@
764
765
  *```js
765
766
  * searchEmbed.on(EmbedEvent.QueryChanged, payload => console.log('data', payload))
766
767
  *```
767
- *
768
768
  */
769
769
  EmbedEvent["QueryChanged"] = "queryChanged";
770
770
  /**
@@ -773,7 +773,6 @@
773
773
  * @returns additionalFilters - Any additional filters applied
774
774
  * @returns drillDownColumns - The columns on which drill down was performed
775
775
  * @returns nonFilteredColumns - The columns that were not filtered
776
- *
777
776
  * @example
778
777
  *```js
779
778
  * searchEmbed.trigger(HostEvent.DrillDown, {
@@ -787,7 +786,6 @@
787
786
  * In this example, `VizPointDoubleClick` event is used for
788
787
  * triggering the `DrillDown` event when an area or specific
789
788
  * data point on a table or chart is double-clicked.
790
- *
791
789
  * @example
792
790
  *```js
793
791
  * searchEmbed.on(EmbedEvent.VizPointDoubleClick, (payload) => {
@@ -804,34 +802,31 @@
804
802
  * })
805
803
  * })
806
804
  *```
807
- *
808
805
  */
809
806
  EmbedEvent["Drilldown"] = "drillDown";
810
807
  /**
811
808
  * One or more data sources have been selected.
812
- * @returns dataSourceIds - the list of data sources
813
809
  *
810
+ * @returns dataSourceIds - the list of data sources
814
811
  * @example
815
812
  * ```js
816
813
  * searchEmbed.on(EmbedEvent.DataSourceSelected, payload => {
817
814
  * console.log('DataSourceSelected', payload);
818
815
  * })
819
816
  * ```
820
- *
821
817
  */
822
818
  EmbedEvent["DataSourceSelected"] = "dataSourceSelected";
823
819
  /**
824
820
  * One or more data columns have been selected.
821
+ *
825
822
  * @returns columnIds - the list of columns
826
823
  * @version SDK: 1.10.0 | ThoughtSpot: 8.2.0.cl, 8.4.1.sw
827
- *
828
824
  * @example
829
825
  * ```js
830
826
  * appEmbed.on(EmbedEvent.AddRemoveColumns, payload => {
831
827
  * console.log('AddRemoveColumns', payload);
832
828
  * })
833
829
  * ```
834
- *
835
830
  */
836
831
  EmbedEvent["AddRemoveColumns"] = "addRemoveColumns";
837
832
  /**
@@ -839,7 +834,6 @@
839
834
  *
840
835
  * @returns actionId - ID of the custom action
841
836
  * @returns data - Response payload with the Answer or Liveboard data
842
- *
843
837
  * @example
844
838
  * ```js
845
839
  * appEmbed.on(EmbedEvent.customAction, payload => {
@@ -855,9 +849,7 @@
855
849
  * Listen to double click actions on a visualization.
856
850
  *
857
851
  * @return ContextMenuInputPoints - Data point that is double-clicked
858
- *
859
852
  * @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
860
- *
861
853
  * @example
862
854
  * ```js
863
855
  * livebaordEmbed.on(EmbedEvent.VizPointDoubleClick, payload => {
@@ -872,7 +864,6 @@
872
864
  * @return viz, clickedPoint - metadata about the point that is clicked
873
865
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
874
866
  * @important
875
- *
876
867
  * @example
877
868
  * ```js
878
869
  * embed.on(ThoughtSpotEmbed.Event.VizPointClick, ({data}) => {
@@ -891,7 +882,6 @@
891
882
  * An error has occurred.
892
883
  *
893
884
  * @returns error - An error object or message
894
- *
895
885
  * @example
896
886
  * ```js
897
887
  * SearchEmbed.on(EmbedEvent.Error, showErrorMsg)
@@ -899,19 +889,16 @@
899
889
  * function showErrorMsg() {
900
890
  * document.getElementById("error");
901
891
  * ```
902
- *
903
892
  */
904
893
  EmbedEvent["Error"] = "Error";
905
894
  /**
906
895
  * The embedded object has sent an alert.
907
896
  *
908
897
  * @returns alert - An alert object
909
- *
910
898
  * @example
911
899
  * ```js
912
900
  * searchEmbed.on(EmbedEvent.Alert)
913
901
  * ```
914
- *
915
902
  */
916
903
  EmbedEvent["Alert"] = "alert";
917
904
  /**
@@ -958,7 +945,6 @@
958
945
  * Applicable to `SearchBarEmbed` only.
959
946
  *
960
947
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
961
- *
962
948
  * @example
963
949
  *```js
964
950
  * searchbarEmbed.on(EmbedEvent.GetDataClick)
@@ -1005,8 +991,8 @@
1005
991
  EmbedEvent["SAMLComplete"] = "samlComplete";
1006
992
  /**
1007
993
  * Emitted when any modal is opened in the app
1008
- * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
1009
994
  *
995
+ * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
1010
996
  * @example
1011
997
  *```js
1012
998
  * appEmbed.on(EmbedEvent.DialogOpen, payload => {
@@ -1017,8 +1003,8 @@
1017
1003
  EmbedEvent["DialogOpen"] = "dialog-open";
1018
1004
  /**
1019
1005
  * Emitted when any modal is closed in the app
1020
- * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
1021
1006
  *
1007
+ * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
1022
1008
  * @example
1023
1009
  *```js
1024
1010
  * appEmbed.on(EmbedEvent.DialogClose, payload => {
@@ -1031,8 +1017,8 @@
1031
1017
  * Emitted when the Liveboard shell loads.
1032
1018
  * You can use this event as a hook to trigger
1033
1019
  * other events on the rendered Liveboard.
1034
- * @version SDK: 1.9.1 | ThoughtSpot: 8.1.0.cl, 8.4.1.sw
1035
1020
  *
1021
+ * @version SDK: 1.9.1 | ThoughtSpot: 8.1.0.cl, 8.4.1.sw
1036
1022
  * @example
1037
1023
  *```js
1038
1024
  * liveboardEmbed.on(EmbedEvent.LiveboardRendered, payload => {
@@ -1041,7 +1027,6 @@
1041
1027
  *```
1042
1028
  * The following example shows how to trigger
1043
1029
  * `SetVisibleVizs` event using LiveboardRendered embed event:
1044
- *
1045
1030
  * @example
1046
1031
  *```js
1047
1032
  * const embedRef = useEmbedRef();
@@ -1054,8 +1039,8 @@
1054
1039
  /**
1055
1040
  * This can be used to register an event listener which
1056
1041
  * is triggered on all events.
1057
- * @Version SDK: 1.10.0 | ThoughtSpot: 8.2.0.cl, 8.4.1.sw
1058
1042
  *
1043
+ * @Version SDK: 1.10.0 | ThoughtSpot: 8.2.0.cl, 8.4.1.sw
1059
1044
  * @example
1060
1045
  *```js
1061
1046
  * appEmbed.on(EmbedEvent.ALL, payload => {
@@ -1066,6 +1051,7 @@
1066
1051
  EmbedEvent["ALL"] = "*";
1067
1052
  /**
1068
1053
  * Emitted when an Answer is saved in the app
1054
+ *
1069
1055
  * @Version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1070
1056
  * @example
1071
1057
  *```js
@@ -1091,7 +1077,6 @@
1091
1077
  * or `EmbedEvent.DownloadAsXLSX`
1092
1078
  *
1093
1079
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1094
- *
1095
1080
  * @example
1096
1081
  *```js
1097
1082
  * liveboardEmbed.trigger(HostEvent.Download, {
@@ -1102,8 +1087,8 @@
1102
1087
  EmbedEvent["Download"] = "download";
1103
1088
  /**
1104
1089
  * Emitted when the download action is triggered on an answer
1105
- * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.0.sw
1106
1090
  *
1091
+ * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.0.sw
1107
1092
  * @example
1108
1093
  *```js
1109
1094
  * //trigger when action starts
@@ -1113,14 +1098,12 @@
1113
1098
  * searchEmbed.on(EmbedEvent.DownloadAsPng, payload => {
1114
1099
  * console.log('download PNG', payload)})
1115
1100
  *```
1116
- *
1117
1101
  */
1118
1102
  EmbedEvent["DownloadAsPng"] = "downloadAsPng";
1119
1103
  /**
1120
1104
  * Emitted when the Download as PDF action is triggered on an answer
1121
1105
  *
1122
1106
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1123
- *
1124
1107
  * @example
1125
1108
  *```js
1126
1109
  * //trigger when action starts
@@ -1130,7 +1113,6 @@
1130
1113
  * searchEmbed.on(EmbedEvent.DownloadAsPdf, payload => {
1131
1114
  * console.log('download PDF', payload)})
1132
1115
  *```
1133
- *
1134
1116
  */
1135
1117
  EmbedEvent["DownloadAsPdf"] = "downloadAsPdf";
1136
1118
  /**
@@ -1152,7 +1134,6 @@
1152
1134
  * Emitted when the Download as XLSX action is triggered on an answer
1153
1135
  *
1154
1136
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1155
- *
1156
1137
  * @example
1157
1138
  *```js
1158
1139
  * //trigger when action starts
@@ -1168,7 +1149,6 @@
1168
1149
  * Emitted when an Answer is deleted in the app
1169
1150
  *
1170
1151
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1171
- *
1172
1152
  * @example
1173
1153
  *```js
1174
1154
  * //trigger when action starts
@@ -1222,7 +1202,6 @@
1222
1202
  * Emitted when a user shares an object with another user or group
1223
1203
  *
1224
1204
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1225
- *
1226
1205
  * @example
1227
1206
  *```js
1228
1207
  * //trigger when action starts
@@ -1302,6 +1281,7 @@
1302
1281
  /**
1303
1282
  * Emitted when the **Export TML** action is triggered on an
1304
1283
  * an embedded object in the app
1284
+ *
1305
1285
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1306
1286
  * @example
1307
1287
  *```js
@@ -1439,7 +1419,6 @@
1439
1419
  *```js
1440
1420
  * liveboardEmbed.trigger(HostEvent.Present)
1441
1421
  *```
1442
- *
1443
1422
  * @example
1444
1423
  *```js
1445
1424
  * liveboardEmbed.on(EmbedEvent.Present, {
@@ -1457,77 +1436,65 @@
1457
1436
  * liveboardEmbed.trigger(HostEvent.Delete,
1458
1437
  * {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1459
1438
  *```
1460
- *
1461
1439
  */
1462
1440
  EmbedEvent["Delete"] = "delete";
1463
1441
  /**
1464
1442
  * Emitted when a user clicks Manage schedules on a Liveboard
1465
1443
  *
1466
1444
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1467
- *
1468
1445
  * @example
1469
1446
  *```js
1470
1447
  * liveboardEmbed.trigger(HostEvent.SchedulesList)
1471
1448
  *```
1472
- *
1473
1449
  */
1474
1450
  EmbedEvent["SchedulesList"] = "schedule-list";
1475
1451
  /**
1476
1452
  * Emitted when a user clicks **Cancel** in edit mode on a Liveboard
1477
1453
  *
1478
1454
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1479
- *
1480
1455
  * @example
1481
1456
  *```js
1482
1457
  * liveboardEmbed.trigger(HostEvent.Cancel)
1483
1458
  *```
1484
- *
1485
1459
  */
1486
1460
  EmbedEvent["Cancel"] = "cancel";
1487
1461
  /**
1488
1462
  * Emitted when a user clicks **Explore** on a visualization
1489
1463
  *
1490
1464
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1491
- *
1492
1465
  * @example
1493
1466
  *```js
1494
1467
  * liveboardEmbed.trigger(HostEvent.Explore, {
1495
1468
  * vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1496
1469
  *```
1497
- *
1498
1470
  */
1499
1471
  EmbedEvent["Explore"] = "explore";
1500
1472
  /**
1501
1473
  * Emitted when a user clicks **Copy link** action on a visualization
1502
1474
  *
1503
1475
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1504
- *
1505
1476
  * @example
1506
1477
  *```js
1507
1478
  * liveboardEmbed.trigger(HostEvent.CopyLink, {
1508
1479
  * vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1509
1480
  *```
1510
- *
1511
1481
  */
1512
1482
  EmbedEvent["CopyLink"] = "embedDocument";
1513
1483
  /**
1514
1484
  * Emitted when a user interacts with cross filters on a visualization or Liveboard
1515
1485
  *
1516
1486
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.5.0.sw
1517
- *
1518
1487
  * @example
1519
1488
  *```js
1520
1489
  * liveboardEmbed.trigger(HostEvent.CrossFilterChanged, {
1521
1490
  * vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1522
1491
  *```
1523
- *
1524
1492
  */
1525
1493
  EmbedEvent["CrossFilterChanged"] = "cross-filter-changed";
1526
1494
  /**
1527
1495
  * Emitted when a user right clicks on a visualization (chart or table)
1528
1496
  *
1529
1497
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.5.0.sw
1530
- *
1531
1498
  * @example
1532
1499
  *```js
1533
1500
  * LiveboardEmbed.on(EmbedEvent.VizPointRightClick, payload => {
@@ -1558,7 +1525,6 @@
1558
1525
  * Emitted when a user selects a data source.
1559
1526
  *
1560
1527
  * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
1561
- *
1562
1528
  */
1563
1529
  EmbedEvent["SageWorksheetUpdated"] = "sageWorksheetUpdated";
1564
1530
  /**
@@ -1763,7 +1729,6 @@
1763
1729
  *
1764
1730
  * @param - `path` - the path to navigate to to go forward or back. The path value can
1765
1731
  * be a number; for example, `1`, `-1`.
1766
- *
1767
1732
  * @example
1768
1733
  * ```js
1769
1734
  * appEmbed.navigateToPage(-1)
@@ -2334,9 +2299,7 @@
2334
2299
  * Updates the search query string for Natural Language Search operations.
2335
2300
  *
2336
2301
  * @param - `queryString`: Text string in Natural Language format
2337
- *
2338
2302
  * @param - `executeSearch`: Boolean to execute search and update search query
2339
- *
2340
2303
  * @example
2341
2304
  * ```js
2342
2305
  * sageEmbed.trigger(HostEvent.UpdateSageQuery, {
@@ -13179,7 +13142,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
13179
13142
  });
13180
13143
  }
13181
13144
 
13182
- var name="@thoughtspot/visual-embed-sdk";var version="1.27.0-alpha.0";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};
13145
+ 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};
13183
13146
 
13184
13147
  /**
13185
13148
  * Copyright (c) 2022
@@ -13215,7 +13178,6 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
13215
13178
  */
13216
13179
  this.embedNodeKey = '__tsEmbed';
13217
13180
  this.isAppInitialized = false;
13218
- this.embedComponentType = 'TsEmbed';
13219
13181
  /**
13220
13182
  * Should we encode URL Query Params using base64 encoding which thoughtspot
13221
13183
  * will generate for embedding. This provides additional security to
@@ -13307,7 +13269,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
13307
13269
  allOtherKeys.forEach((key) => {
13308
13270
  if (!isUndefined(viewConfig[key])
13309
13271
  && !isEqual_1(viewConfig[key], preRenderedObject.viewConfig[key])) {
13310
- console.warn(`${this.embedComponentType} was pre-rendered with `
13272
+ console.warn('TS Embed component was pre-rendered with '
13311
13273
  + `"${key}" as "${JSON.stringify(preRenderedObject.viewConfig[key])}" `
13312
13274
  + `but a different value "${JSON.stringify(viewConfig[key])}" `
13313
13275
  + 'was passed to the Embed component. '
@@ -13332,7 +13294,6 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
13332
13294
  this.registerAppInit();
13333
13295
  uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_EMBED_CREATE, {
13334
13296
  ...viewConfig,
13335
- embedComponentType: this.embedComponentType,
13336
13297
  });
13337
13298
  }
13338
13299
  /**
@@ -14299,8 +14260,8 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
14299
14260
  class SageEmbed extends V1Embed {
14300
14261
  // eslint-disable-next-line no-useless-constructor
14301
14262
  constructor(domSelector, viewConfig) {
14263
+ viewConfig.embedComponentType = 'SageEmbed';
14302
14264
  super(domSelector, viewConfig);
14303
- this.embedComponentType = 'SageEmbed';
14304
14265
  }
14305
14266
  /**
14306
14267
  * Constructs a map of parameters to be passed on to the
@@ -14344,15 +14305,16 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
14344
14305
  const { dataSource, searchOptions, } = this.viewConfig;
14345
14306
  if (dataSource)
14346
14307
  postHashObj[Param.WorksheetId] = dataSource;
14347
- if (searchOptions === null || searchOptions === void 0 ? void 0 : searchOptions.searchQuery) {
14348
- postHashObj[Param.Query] = searchOptions === null || searchOptions === void 0 ? void 0 : searchOptions.searchQuery;
14349
- if (searchOptions.executeSearch) {
14350
- postHashObj[Param.executeSearch] = true;
14351
- }
14308
+ if ((searchOptions === null || searchOptions === void 0 ? void 0 : searchOptions.searchQuery) && searchOptions.executeSearch) {
14309
+ postHashObj[Param.executeSearch] = true;
14352
14310
  }
14353
14311
  let sagePostHashParams = new URLSearchParams(postHashObj).toString();
14354
14312
  if (sagePostHashParams)
14355
14313
  sagePostHashParams = `${tsPostHashParams ? '&' : '?'}${sagePostHashParams}`;
14314
+ if (searchOptions === null || searchOptions === void 0 ? void 0 : searchOptions.searchQuery)
14315
+ sagePostHashParams += `${sagePostHashParams ? '&' : '?'}${[Param.Query]}=${encodeURIComponent(searchOptions.searchQuery)}`;
14316
+ // use encodeURIComponent for query instead of URLSearchParams
14317
+ // as it adds + instead of %20 for spaces
14356
14318
  return `${this.getRootIframeSrc()}/embed/${path}${tsPostHashParams}${sagePostHashParams}`;
14357
14319
  }
14358
14320
  /**
@@ -14390,9 +14352,8 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
14390
14352
  */
14391
14353
  class SearchEmbed extends TsEmbed {
14392
14354
  constructor(domSelector, viewConfig) {
14393
- super(domSelector);
14394
- this.embedComponentType = 'SearchEmbed';
14395
- this.viewConfig = viewConfig;
14355
+ viewConfig.embedComponentType = 'SearchEmbed';
14356
+ super(domSelector, viewConfig);
14396
14357
  }
14397
14358
  /**
14398
14359
  * Get the state of the data sources panel that the embedded
@@ -14540,9 +14501,9 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
14540
14501
  class AppEmbed extends V1Embed {
14541
14502
  // eslint-disable-next-line no-useless-constructor
14542
14503
  constructor(domSelector, viewConfig) {
14504
+ viewConfig.embedComponentType = 'AppEmbed';
14543
14505
  super(domSelector, viewConfig);
14544
14506
  this.defaultHeight = '100%';
14545
- this.embedComponentType = 'AppEmbed';
14546
14507
  /**
14547
14508
  * Set the iframe height as per the computed height received
14548
14509
  * from the ThoughtSpot app.
@@ -14735,9 +14696,9 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
14735
14696
  class LiveboardEmbed extends V1Embed {
14736
14697
  // eslint-disable-next-line no-useless-constructor
14737
14698
  constructor(domSelector, viewConfig) {
14699
+ viewConfig.embedComponentType = 'LiveboardEmbed';
14738
14700
  super(domSelector, viewConfig);
14739
14701
  this.defaultHeight = 500;
14740
- this.embedComponentType = 'LiveboardEmbed';
14741
14702
  /**
14742
14703
  * Set the iframe height as per the computed height received
14743
14704
  * from the ThoughtSpot app.