@thoughtspot/visual-embed-sdk 1.28.1-alpha.1 → 1.28.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 (125) hide show
  1. package/README.md +1 -1
  2. package/cjs/package.json +1 -1
  3. package/cjs/src/auth.d.ts.map +1 -1
  4. package/cjs/src/auth.js +2 -2
  5. package/cjs/src/auth.js.map +1 -1
  6. package/cjs/src/authToken.d.ts +5 -1
  7. package/cjs/src/authToken.d.ts.map +1 -1
  8. package/cjs/src/authToken.js +5 -1
  9. package/cjs/src/authToken.js.map +1 -1
  10. package/cjs/src/embed/app.d.ts +6 -12
  11. package/cjs/src/embed/app.d.ts.map +1 -1
  12. package/cjs/src/embed/app.js +2 -2
  13. package/cjs/src/embed/app.js.map +1 -1
  14. package/cjs/src/embed/base.d.ts +1 -1
  15. package/cjs/src/embed/base.d.ts.map +1 -1
  16. package/cjs/src/embed/base.js +6 -6
  17. package/cjs/src/embed/base.js.map +1 -1
  18. package/cjs/src/embed/base.spec.js +1 -1
  19. package/cjs/src/embed/base.spec.js.map +1 -1
  20. package/cjs/src/embed/liveboard.d.ts +2 -8
  21. package/cjs/src/embed/liveboard.d.ts.map +1 -1
  22. package/cjs/src/embed/liveboard.js.map +1 -1
  23. package/cjs/src/embed/search.d.ts +5 -11
  24. package/cjs/src/embed/search.d.ts.map +1 -1
  25. package/cjs/src/embed/search.js +4 -4
  26. package/cjs/src/embed/search.js.map +1 -1
  27. package/cjs/src/embed/ts-embed.d.ts +1 -1
  28. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  29. package/cjs/src/embed/ts-embed.js +6 -6
  30. package/cjs/src/embed/ts-embed.js.map +1 -1
  31. package/cjs/src/embed/ts-embed.spec.js +18 -9
  32. package/cjs/src/embed/ts-embed.spec.js.map +1 -1
  33. package/cjs/src/react/all-types-export.d.ts +1 -1
  34. package/cjs/src/react/all-types-export.d.ts.map +1 -1
  35. package/cjs/src/react/all-types-export.js +2 -1
  36. package/cjs/src/react/all-types-export.js.map +1 -1
  37. package/cjs/src/react/index.spec.js +12 -0
  38. package/cjs/src/react/index.spec.js.map +1 -1
  39. package/cjs/src/types.d.ts +14 -21
  40. package/cjs/src/types.d.ts.map +1 -1
  41. package/cjs/src/types.js +3 -11
  42. package/cjs/src/types.js.map +1 -1
  43. package/dist/src/auth.d.ts.map +1 -1
  44. package/dist/src/authToken.d.ts +5 -1
  45. package/dist/src/authToken.d.ts.map +1 -1
  46. package/dist/src/embed/app.d.ts +6 -12
  47. package/dist/src/embed/app.d.ts.map +1 -1
  48. package/dist/src/embed/base.d.ts +1 -1
  49. package/dist/src/embed/base.d.ts.map +1 -1
  50. package/dist/src/embed/liveboard.d.ts +2 -8
  51. package/dist/src/embed/liveboard.d.ts.map +1 -1
  52. package/dist/src/embed/search.d.ts +5 -11
  53. package/dist/src/embed/search.d.ts.map +1 -1
  54. package/dist/src/embed/ts-embed.d.ts +1 -1
  55. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  56. package/dist/src/react/all-types-export.d.ts +1 -1
  57. package/dist/src/react/all-types-export.d.ts.map +1 -1
  58. package/dist/src/types.d.ts +14 -21
  59. package/dist/src/types.d.ts.map +1 -1
  60. package/dist/tsembed-react.es.js +1451 -1455
  61. package/dist/tsembed-react.js +2224 -2228
  62. package/dist/tsembed.es.js +1834 -1838
  63. package/dist/tsembed.js +15354 -15358
  64. package/dist/visual-embed-sdk-react-full.d.ts +30 -51
  65. package/dist/visual-embed-sdk-react.d.ts +30 -51
  66. package/dist/visual-embed-sdk.d.ts +30 -51
  67. package/lib/package.json +1 -1
  68. package/lib/src/auth.d.ts.map +1 -1
  69. package/lib/src/auth.js +3 -3
  70. package/lib/src/auth.js.map +1 -1
  71. package/lib/src/authToken.d.ts +5 -1
  72. package/lib/src/authToken.d.ts.map +1 -1
  73. package/lib/src/authToken.js +5 -1
  74. package/lib/src/authToken.js.map +1 -1
  75. package/lib/src/embed/app.d.ts +6 -12
  76. package/lib/src/embed/app.d.ts.map +1 -1
  77. package/lib/src/embed/app.js +2 -2
  78. package/lib/src/embed/app.js.map +1 -1
  79. package/lib/src/embed/base.d.ts +1 -1
  80. package/lib/src/embed/base.d.ts.map +1 -1
  81. package/lib/src/embed/base.js +5 -5
  82. package/lib/src/embed/base.js.map +1 -1
  83. package/lib/src/embed/base.spec.js +2 -2
  84. package/lib/src/embed/base.spec.js.map +1 -1
  85. package/lib/src/embed/liveboard.d.ts +2 -8
  86. package/lib/src/embed/liveboard.d.ts.map +1 -1
  87. package/lib/src/embed/liveboard.js +1 -1
  88. package/lib/src/embed/liveboard.js.map +1 -1
  89. package/lib/src/embed/search.d.ts +5 -11
  90. package/lib/src/embed/search.d.ts.map +1 -1
  91. package/lib/src/embed/search.js +5 -5
  92. package/lib/src/embed/search.js.map +1 -1
  93. package/lib/src/embed/ts-embed.d.ts +1 -1
  94. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  95. package/lib/src/embed/ts-embed.js +9 -9
  96. package/lib/src/embed/ts-embed.js.map +1 -1
  97. package/lib/src/embed/ts-embed.spec.js +18 -9
  98. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  99. package/lib/src/react/all-types-export.d.ts +1 -1
  100. package/lib/src/react/all-types-export.d.ts.map +1 -1
  101. package/lib/src/react/all-types-export.js +1 -1
  102. package/lib/src/react/all-types-export.js.map +1 -1
  103. package/lib/src/react/index.spec.js +12 -0
  104. package/lib/src/react/index.spec.js.map +1 -1
  105. package/lib/src/types.d.ts +14 -21
  106. package/lib/src/types.d.ts.map +1 -1
  107. package/lib/src/types.js +3 -11
  108. package/lib/src/types.js.map +1 -1
  109. package/lib/src/utils/authService/authService.spec.js +1 -1
  110. package/lib/src/utils/authService/authService.spec.js.map +1 -1
  111. package/lib/src/visual-embed-sdk.d.ts +34 -55
  112. package/package.json +1 -1
  113. package/src/auth.ts +6 -6
  114. package/src/authToken.ts +5 -1
  115. package/src/embed/app.ts +8 -19
  116. package/src/embed/base.spec.ts +3 -3
  117. package/src/embed/base.ts +14 -14
  118. package/src/embed/liveboard.ts +3 -16
  119. package/src/embed/search.ts +10 -19
  120. package/src/embed/ts-embed.spec.ts +34 -26
  121. package/src/embed/ts-embed.ts +39 -43
  122. package/src/react/all-types-export.ts +1 -0
  123. package/src/react/index.spec.tsx +29 -0
  124. package/src/types.ts +15 -22
  125. package/src/utils/authService/authService.spec.ts +4 -4
@@ -40,7 +40,7 @@ declare module '@thoughtspot/visual-embed-sdk/embed/app' {
40
40
  * @module
41
41
  * @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
42
42
  */
43
- import { DOMSelector, ViewConfig, MessagePayload } from '@thoughtspot/visual-embed-sdk/types';
43
+ import { DOMSelector, MessagePayload, ViewConfig } from '@thoughtspot/visual-embed-sdk/types';
44
44
  import { V1Embed } from '@thoughtspot/visual-embed-sdk/embed/ts-embed';
45
45
  /**
46
46
  * Pages within the ThoughtSpot app that can be embedded.
@@ -88,7 +88,6 @@ declare module '@thoughtspot/visual-embed-sdk/embed/app' {
88
88
  *
89
89
  * @default true
90
90
  * @version SDK: 1.2.0 | Thoughtspot: 8.4.0.cl
91
- *
92
91
  * @example
93
92
  * ```js
94
93
  * const embed = new AppEmbed('#tsEmbed', {
@@ -104,6 +103,7 @@ declare module '@thoughtspot/visual-embed-sdk/embed/app' {
104
103
  * nav-bars are visible, this flag will only hide the homepage left nav-bar.
105
104
  * The showPrimaryNavbar flag takes precedence over the hideHomepageLeftNav.
106
105
  *
106
+ *
107
107
  * **Note**: This option does not apply to the classic homepage.
108
108
  * To access the updated modular homepage, set
109
109
  * `modularHomeExperience` to `true` (available as Early Access feature in 9.12.5.cl).
@@ -123,9 +123,9 @@ declare module '@thoughtspot/visual-embed-sdk/embed/app' {
123
123
  /**
124
124
  * Control the visibility of the help (?) and profile buttons on the
125
125
  * Global nav-bar. By default, these buttons are visible on the nav-bar.
126
+ *
126
127
  * @default false
127
128
  * @version SDK: 1.2.0 | Thoughtspot: 8.4.0.cl
128
- *
129
129
  * @example
130
130
  * ```js
131
131
  * const embed = new AppEmbed('#tsEmbed', {
@@ -139,6 +139,7 @@ declare module '@thoughtspot/visual-embed-sdk/embed/app' {
139
139
  * Control the visibility of the application switcher button on the nav-bar.
140
140
  * By default, the application switcher is shown.
141
141
  *
142
+ *
142
143
  * **Note**: This option does not apply to the classic homepage.
143
144
  * To access the updated modular homepage, set
144
145
  * `modularHomeExperience` to `true` (available as Early Access feature in 9.12.5.cl).
@@ -159,6 +160,7 @@ declare module '@thoughtspot/visual-embed-sdk/embed/app' {
159
160
  * Control the visibility of the Org switcher button on the nav-bar.
160
161
  * By default, the Org switcher button is shown.
161
162
  *
163
+ *
162
164
  * **Note**: This option does not apply to the classic homepage.
163
165
  * To access the updated modular homepage, set
164
166
  * `modularHomeExperience` to `true` (available as Early Access feature in 9.12.5.cl).
@@ -185,7 +187,6 @@ declare module '@thoughtspot/visual-embed-sdk/embed/app' {
185
187
  * you could set the path to `pinboard/<liveboardId>/tab/<tabId>`.
186
188
  *
187
189
  * @version SDK: 1.1.0 | Thoughtspot: 9.4.0.cl
188
- *
189
190
  * @example
190
191
  * ```js
191
192
  * const embed = new AppEmbed('#tsEmbed', {
@@ -203,7 +204,6 @@ declare module '@thoughtspot/visual-embed-sdk/embed/app' {
203
204
  * path within the app, use the `path` attribute which is more flexible.
204
205
  *
205
206
  * @version SDK: 1.1.0 | Thoughtspot: 9.4.0.cl
206
- *
207
207
  * @example
208
208
  * ```js
209
209
  * const embed = new AppEmbed('#tsEmbed', {
@@ -232,7 +232,6 @@ declare module '@thoughtspot/visual-embed-sdk/embed/app' {
232
232
  * The array of GUIDs to be hidden
233
233
  *
234
234
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
235
- *
236
235
  * @example
237
236
  * ```js
238
237
  * const embed = new AppEmbed('#tsEmbed', {
@@ -255,10 +254,9 @@ declare module '@thoughtspot/visual-embed-sdk/embed/app' {
255
254
  liveboardV2?: boolean;
256
255
  /**
257
256
  * If set to true, the Search Assist feature is enabled.
258
- * @default true
259
257
  *
258
+ * @default true
260
259
  * @version SDK: 1.13.0 | ThoughtSpot: 8.5.0.cl, 8.8.1-sw
261
- *
262
260
  * @example
263
261
  * ```js
264
262
  * const embed = new AppEmbed('#tsEmbed', {
@@ -273,7 +271,6 @@ declare module '@thoughtspot/visual-embed-sdk/embed/app' {
273
271
  * according to the height of the pages which support fullHeight mode.
274
272
  *
275
273
  * @version SDK: 1.21.0 | ThoughtSpot: 9.4.0.cl, 9.4.0-sw
276
- *
277
274
  * @example
278
275
  * ```js
279
276
  * const embed = new AppEmbed('#tsEmbed', {
@@ -296,7 +293,6 @@ declare module '@thoughtspot/visual-embed-sdk/embed/app' {
296
293
  *
297
294
  * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
298
295
  * @default false
299
- *
300
296
  * @example
301
297
  * ```js
302
298
  * const embed = new AppEmbed('#tsEmbed', {
@@ -311,7 +307,6 @@ declare module '@thoughtspot/visual-embed-sdk/embed/app' {
311
307
  *
312
308
  * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
313
309
  * @default false
314
- *
315
310
  * @example
316
311
  * ```js
317
312
  * const embed = new AppEmbed('#tsEmbed', {
@@ -326,7 +321,6 @@ declare module '@thoughtspot/visual-embed-sdk/embed/app' {
326
321
  *
327
322
  * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
328
323
  * @default false
329
- *
330
324
  * @example
331
325
  * ```js
332
326
  * const embed = new AppEmbed('#tsEmbed', {
@@ -422,8 +416,8 @@ declare module '@thoughtspot/visual-embed-sdk/embed/app' {
422
416
  }
423
417
 
424
418
  declare module '@thoughtspot/visual-embed-sdk/embed/base' {
419
+ import { AuthEventEmitter, notifyAuthFailure, notifyAuthSDKSuccess, notifyAuthSuccess, notifyLogout } from '@thoughtspot/visual-embed-sdk/auth';
425
420
  import { EmbedConfig, PrefetchFeatures } from '@thoughtspot/visual-embed-sdk/types';
426
- import { notifyAuthFailure, notifyAuthSDKSuccess, notifyAuthSuccess, notifyLogout, AuthEventEmitter } from '@thoughtspot/visual-embed-sdk/auth';
427
421
  export interface executeTMLInput {
428
422
  metadata_tmls: string[];
429
423
  import_policy?: 'PARTIAL' | 'ALL_OR_NONE' | 'VALIDATE_ONLY';
@@ -593,7 +587,6 @@ declare module '@thoughtspot/visual-embed-sdk/embed/liveboard' {
593
587
  * incrementally as users scroll the page to view the charts and tables.
594
588
  *
595
589
  * @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 7.2.1
596
- *
597
590
  * @example
598
591
  * ```js
599
592
  * const embed = new LiveboardEmbed('#embed', {
@@ -622,7 +615,6 @@ declare module '@thoughtspot/visual-embed-sdk/embed/liveboard' {
622
615
  defaultHeight?: number;
623
616
  /**
624
617
  * @Deprecated If set to true, the context menu in visualizations will be enabled.
625
- *
626
618
  * @example
627
619
  * ```js
628
620
  * const embed = new LiveboardEmbed('#tsEmbed', {
@@ -630,7 +622,6 @@ declare module '@thoughtspot/visual-embed-sdk/embed/liveboard' {
630
622
  * enableVizTransformations:true,
631
623
  * })
632
624
  * ```
633
- *
634
625
  * @version: SDK: 1.1.0 | ThoughtSpot: 8.1.0.sw
635
626
  */
636
627
  enableVizTransformations?: boolean;
@@ -657,7 +648,6 @@ declare module '@thoughtspot/visual-embed-sdk/embed/liveboard' {
657
648
  * The visualization within the Liveboard to display.
658
649
  *
659
650
  * @version SDK: 1.9.1 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw
660
- *
661
651
  * @example
662
652
  * ```js
663
653
  * const embed = new LiveboardEmbed('#embed-container', {
@@ -687,7 +677,6 @@ declare module '@thoughtspot/visual-embed-sdk/embed/liveboard' {
687
677
  * event.
688
678
  *
689
679
  * @version SDK: 1.9.1 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw
690
- *
691
680
  * @example
692
681
  * ```js
693
682
  * const embed = new LiveboardEmbed('#embed-container', {
@@ -737,7 +726,6 @@ declare module '@thoughtspot/visual-embed-sdk/embed/liveboard' {
737
726
  * Show or hide the tab panel of the embedded Liveboard.
738
727
  *
739
728
  * @version SDK: 1.25.0 | Thoughtspot: 9.6.0.cl, 9.8.0.sw
740
- *
741
729
  * @example
742
730
  * ```js
743
731
  * const embed = new LiveboardEmbed('#embed-container', {
@@ -763,9 +751,9 @@ declare module '@thoughtspot/visual-embed-sdk/embed/liveboard' {
763
751
  hideLiveboardHeader?: boolean;
764
752
  /**
765
753
  * Show or hide the Liveboard title.
754
+ *
766
755
  * @default false
767
756
  * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
768
- *
769
757
  * @example
770
758
  * ```js
771
759
  * const embed = new LiveboardEmbed('#embed-container', {
@@ -777,9 +765,9 @@ declare module '@thoughtspot/visual-embed-sdk/embed/liveboard' {
777
765
  showLiveboardTitle?: boolean;
778
766
  /**
779
767
  * Show or hide the Liveboard description.
768
+ *
780
769
  * @default false
781
770
  * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
782
- *
783
771
  * @example
784
772
  * ```js
785
773
  * const embed = new LiveboardEmbed('#embed-container', {
@@ -877,7 +865,7 @@ declare module '@thoughtspot/visual-embed-sdk/embed/search' {
877
865
  * @summary Search embed
878
866
  * @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
879
867
  */
880
- import { DOMSelector, Action, ViewConfig } from '@thoughtspot/visual-embed-sdk/types';
868
+ import { Action, DOMSelector, ViewConfig } from '@thoughtspot/visual-embed-sdk/types';
881
869
  import { TsEmbed } from '@thoughtspot/visual-embed-sdk/embed/ts-embed';
882
870
  /**
883
871
  * Configuration for search options.
@@ -907,7 +895,6 @@ declare module '@thoughtspot/visual-embed-sdk/embed/search' {
907
895
  * but can be expanded manually.
908
896
  *
909
897
  * @version: SDK: 1.1.0 | ThoughtSpot: 8.1.0.sw
910
- *
911
898
  * @example
912
899
  * ```js
913
900
  * const embed = new SearchEmbed('#tsEmbed', {
@@ -921,7 +908,6 @@ declare module '@thoughtspot/visual-embed-sdk/embed/search' {
921
908
  * Show or hide the data sources panel.
922
909
  *
923
910
  * @version: SDK: 1.2.0 | ThoughtSpot: 9.1.0.sw
924
- *
925
911
  * @example
926
912
  * ```js
927
913
  * const embed = new SearchEmbed('#tsEmbed', {
@@ -937,7 +923,6 @@ declare module '@thoughtspot/visual-embed-sdk/embed/search' {
937
923
  * using raw answer data.
938
924
  *
939
925
  * @version: SDK: 1.2.0 | ThoughtSpot: 9.1.0.sw
940
- *
941
926
  * @example
942
927
  * ```js
943
928
  * const embed = new SearchEmbed('#tsEmbed', {
@@ -947,11 +932,14 @@ declare module '@thoughtspot/visual-embed-sdk/embed/search' {
947
932
  * ```
948
933
  */
949
934
  hideResults?: boolean;
935
+ /**
936
+ * If set to true, expands all the data sources panel.
937
+ */
938
+ expandAllDataSource?: boolean;
950
939
  /**
951
940
  * If set to true, the Search Assist feature is enabled.
952
941
  *
953
942
  * @version SDK: 1.13.0 | ThoughtSpot: 8.5.0.cl, 8.8.1-sw
954
- *
955
943
  * @example
956
944
  * ```js
957
945
  * const embed = new SearchEmbed('#tsEmbed', {
@@ -966,7 +954,6 @@ declare module '@thoughtspot/visual-embed-sdk/embed/search' {
966
954
  * format for presenting search data.
967
955
  *
968
956
  * @version: SDK: 1.1.0 | ThoughtSpot: 8.1.0.sw
969
- *
970
957
  * @example
971
958
  * ```js
972
959
  * const embed = new SearchEmbed('#tsEmbed', {
@@ -980,7 +967,6 @@ declare module '@thoughtspot/visual-embed-sdk/embed/search' {
980
967
  * Only a single data source is supported currently.
981
968
  *
982
969
  * @deprecated Use `dataSource` instead.
983
- *
984
970
  * @example
985
971
  * ```js
986
972
  * const embed = new SearchEmbed('#tsEmbed', {
@@ -994,7 +980,6 @@ declare module '@thoughtspot/visual-embed-sdk/embed/search' {
994
980
  * The array of data source GUIDs to set on load.
995
981
  *
996
982
  * @version: SDK: 1.19.0
997
- *
998
983
  * @example
999
984
  * ```js
1000
985
  * const embed = new SearchEmbed('#tsEmbed', {
@@ -1036,7 +1021,6 @@ declare module '@thoughtspot/visual-embed-sdk/embed/search' {
1036
1021
  * The GUID of a saved answer to load initially.
1037
1022
  *
1038
1023
  * @version: SDK: 1.1.0 | ThoughtSpot: 8.1.0.sw
1039
- *
1040
1024
  * @example
1041
1025
  * ```js
1042
1026
  * const embed = new SearchEmbed('#tsEmbed', {
@@ -1051,7 +1035,6 @@ declare module '@thoughtspot/visual-embed-sdk/embed/search' {
1051
1035
  * The chart/table should still be visible.
1052
1036
  *
1053
1037
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.5.0.sw
1054
- *
1055
1038
  * @example
1056
1039
  * ```js
1057
1040
  * const embed = new SearchEmbed('#tsEmbed', {
@@ -1066,7 +1049,6 @@ declare module '@thoughtspot/visual-embed-sdk/embed/search' {
1066
1049
  *
1067
1050
  * @default false
1068
1051
  * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
1069
- *
1070
1052
  * @example
1071
1053
  * ```js
1072
1054
  * const embed = new SearchEmbed('#tsEmbed', {
@@ -1547,6 +1529,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
1547
1529
  * .then((data) => data.token);
1548
1530
  * }
1549
1531
  * });
1532
+ * });
1550
1533
  * ```
1551
1534
  */
1552
1535
  TrustedAuthToken = "AuthServer",
@@ -2012,7 +1995,6 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
2012
1995
  * object inside your app. Specify the values in pixels or percentage.
2013
1996
  *
2014
1997
  * @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 7.2.1
2015
- *
2016
1998
  * @example
2017
1999
  * ```js
2018
2000
  * const embed = new LiveboardEmbed('#embed', {
@@ -2051,6 +2033,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
2051
2033
  disabledActions?: Action[];
2052
2034
  /**
2053
2035
  * The tooltip to display for disabled actions.
2036
+ *
2054
2037
  * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
2055
2038
  * @example
2056
2039
  * ```js
@@ -2068,7 +2051,6 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
2068
2051
  * Use this to hide an action.
2069
2052
  *
2070
2053
  * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
2071
- *
2072
2054
  * @example
2073
2055
  * ```js
2074
2056
  * const embed = new LiveboardEmbed('#embed', {
@@ -2089,7 +2071,6 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
2089
2071
  *
2090
2072
  * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
2091
2073
  * @important
2092
- *
2093
2074
  * @example
2094
2075
  * ```js
2095
2076
  * const embed = new LiveboardEmbed('#embed', {
@@ -2103,7 +2084,6 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
2103
2084
  * Show alert messages and toast messages in the embedded view.
2104
2085
  *
2105
2086
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
2106
- *
2107
2087
  * @example
2108
2088
  * ```js
2109
2089
  * const embed = new LiveboardEmbed('#embed-container', {
@@ -2118,7 +2098,6 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
2118
2098
  * visualization, or Liveboard.
2119
2099
  *
2120
2100
  * @version SDK: 1.9.4 | ThoughtSpot 8.1.0.cl, 8.4.1.sw
2121
- *
2122
2101
  * @example
2123
2102
  * ```js
2124
2103
  * const embed = new LiveboardEmbed('#embed-container', {
@@ -2139,7 +2118,6 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
2139
2118
  * visualization, or Liveboard.
2140
2119
  *
2141
2120
  * @version SDK : 1.25.0 | Thoughtspot: 9.2.0.cl, 9.5.0.sw
2142
- *
2143
2121
  * @example
2144
2122
  * ```js
2145
2123
  * const embed = new LiveboardEmbed('#embed-container', {
@@ -2174,6 +2152,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
2174
2152
  * Warning: This option is for advanced use only and is used internally
2175
2153
  * to control embed behavior in non-regular ways. We do not publish the
2176
2154
  * list of supported keys and values associated with each.
2155
+ *
2177
2156
  * @example
2178
2157
  * ```js
2179
2158
  * const embed = new LiveboardEmbed('#embed', {
@@ -2202,7 +2181,6 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
2202
2181
  * child inside it.
2203
2182
  *
2204
2183
  * @version SDK: 1.2.0 | Thoughtspot: 9.0.0.cl, 9.0.0.sw
2205
- *
2206
2184
  * @example
2207
2185
  * ```js
2208
2186
  * const embed = new LiveboardEmbed('#embed-container', {
@@ -2288,9 +2266,15 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
2288
2266
  * Hide the home page modules
2289
2267
  * For example: hiddenHomepageModules = [HomepageModule.MyLibrary]
2290
2268
  *
2269
+ *
2270
+ *
2291
2271
  * **Note**: This option does not apply to the classic homepage.
2292
2272
  * To access the updated modular homepage, set
2273
+ <<<<<<< HEAD
2274
+ * `modularHomeExperience` to `true` (available as Early Access feature in 9.12.0.cl).
2275
+ =======
2293
2276
  * `modularHomeExperience` to `true` (available as Early Access feature in 9.12.5.cl).
2277
+ >>>>>>> 64e22666... typo fixes
2294
2278
  *
2295
2279
  * @version SDK: 1.28.0 | Thoughtspot: 9.12.5.cl
2296
2280
  * @example
@@ -2300,13 +2284,13 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
2300
2284
  * hiddenHomepageModules : [HomepageModule.Favorite,HomepageModule.Learning],
2301
2285
  * })
2302
2286
  * ```
2303
- *
2304
2287
  */
2305
2288
  hiddenHomepageModules?: HomepageModule[];
2306
2289
  /**
2307
2290
  * reordering the home page modules
2308
2291
  * eg: reorderedHomepageModules = [HomepageModule.MyLibrary, HomepageModule.Watchlist]
2309
2292
  *
2293
+ *
2310
2294
  * **Note**: This option does not apply to the classic homepage.
2311
2295
  * To access the updated modular homepage, set
2312
2296
  * `modularHomeExperience` to `true` (available as Early Access feature in 9.12.5.cl).
@@ -2329,7 +2313,6 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
2329
2313
  * Use either `visibleTabs` or `hiddenTabs`.
2330
2314
  *
2331
2315
  * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
2332
- *
2333
2316
  * @example
2334
2317
  * ```js
2335
2318
  * const embed = new LiveboardEmbed('#embed-container', {
@@ -2355,6 +2338,8 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
2355
2338
  * })
2356
2339
  * ```
2357
2340
  *
2341
+ *
2342
+ *
2358
2343
  * **Note**: This option does not apply to the classic homepage.
2359
2344
  * To access the updated modular homepage, set
2360
2345
  * `modularHomeExperience` to `true` (available as Early Access feature in 9.12.5.cl).
@@ -2387,7 +2372,6 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
2387
2372
  * @type {boolean}
2388
2373
  * @default false
2389
2374
  * @version SDK: 1.24.0 | ThoughtSpot:9.4.0.cl, 9.4.0.sw
2390
- *
2391
2375
  * @example
2392
2376
  * ```js
2393
2377
  * // Disable tracking PreRender size in the configuration
@@ -2791,7 +2775,8 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
2791
2775
  *
2792
2776
  * API - API call failure error.
2793
2777
  *
2794
- * FULLSCREEN - Error when presenting a Liveboard or visualization in full screen mode.
2778
+ * FULLSCREEN - Error when presenting a Liveboard or visualization in full screen
2779
+ * mode.
2795
2780
  *
2796
2781
  * SINGLE_VALUE_FILTER - Error due to multiple values in the single value filter.
2797
2782
  *
@@ -5332,16 +5317,6 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
5332
5317
  * @version SDK : 1.27.9 | Thoughtspot: 9.12.5.cl
5333
5318
  */
5334
5319
  CopyKpiLink = "copyKpiLink",
5335
- /**
5336
- * The **Organise Favourites** action on Homepage Favourite Module.
5337
- *
5338
- * @example
5339
- * ```js
5340
- * disabledActions: [Action.OrganiseFavourites]
5341
- * ```
5342
- * @version SDK : 1.32.0 | Thoughtspot: 10.0.0.cl
5343
- */
5344
- OrganiseFavourites = "organiseFavourites",
5345
5320
  /**
5346
5321
  * Action ID for AI Highlights button
5347
5322
  *
@@ -6204,7 +6179,11 @@ declare module '@thoughtspot/visual-embed-sdk/authToken' {
6204
6179
  /**
6205
6180
  * Resets the auth token and a new token will be fetched on the next request.
6206
6181
  *
6207
- * @version SDK: 1.28.0 | ThoughtSpot: *
6182
+ * @example
6183
+ * ```js
6184
+ * resetCachedAuthToken();
6185
+ * ```
6186
+ * @version SDK: 1.28.2 | ThoughtSpot: *
6208
6187
  * @group Authentication / Init
6209
6188
  */
6210
6189
  export const resetCachedAuthToken: () => void;
@@ -6219,8 +6198,8 @@ declare module '@thoughtspot/visual-embed-sdk/embed/ts-embed' {
6219
6198
  * @summary Base classes
6220
6199
  * @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
6221
6200
  */
6201
+ import { DOMSelector, EmbedConfig, EmbedEvent, HostEvent, MessageCallback, MessageOptions, ViewConfig } from '@thoughtspot/visual-embed-sdk/types';
6222
6202
  import { AnswerService } from '@thoughtspot/visual-embed-sdk/utils/graphql/answerService/answerService';
6223
- import { DOMSelector, HostEvent, EmbedEvent, MessageCallback, EmbedConfig, MessageOptions, ViewConfig } from '@thoughtspot/visual-embed-sdk/types';
6224
6203
  /**
6225
6204
  * Global prefix for all Thoughtspot postHash Params.
6226
6205
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thoughtspot/visual-embed-sdk",
3
- "version": "1.28.1-alpha.1",
3
+ "version": "1.28.2",
4
4
  "description": "ThoughtSpot Embed SDK",
5
5
  "module": "lib/src/index.js",
6
6
  "main": "dist/tsembed.js",
package/src/auth.ts CHANGED
@@ -1,18 +1,18 @@
1
1
  import EventEmitter from 'eventemitter3';
2
+ import { getAuthenticationToken, resetCachedAuthToken } from './authToken';
2
3
  import { initMixpanel } from './mixpanel-service';
3
4
  import {
4
- AuthType, DOMSelector, EmbedConfig, EmbedEvent, Param,
5
+ AuthType, DOMSelector, EmbedConfig, EmbedEvent,
5
6
  } from './types';
6
7
  import { getDOMNode, getRedirectUrl } from './utils';
7
8
  import {
8
- fetchSessionInfoService,
9
+ EndPoints,
10
+ fetchAuthPostService,
9
11
  fetchAuthService,
10
12
  fetchBasicAuthService,
11
13
  fetchLogoutService,
12
- fetchAuthPostService,
13
- EndPoints,
14
+ fetchSessionInfoService,
14
15
  } from './utils/authService';
15
- import { getAuthenticationToken, resetCachedAuthToken } from './authToken';
16
16
  import { logger } from './utils/logger';
17
17
  import { getEmbedConfig } from './embed/embedConfig';
18
18
 
@@ -492,7 +492,7 @@ export const logout = async (embedConfig: EmbedConfig): Promise<boolean> => {
492
492
  const { thoughtSpotHost } = embedConfig;
493
493
  await fetchLogoutService(thoughtSpotHost);
494
494
  resetCachedAuthToken();
495
- const thoughtspotIframes = document.querySelectorAll('[data-ts-iframe=\'true\']');
495
+ const thoughtspotIframes = document.querySelectorAll("[data-ts-iframe='true']");
496
496
  if (thoughtspotIframes?.length) {
497
497
  thoughtspotIframes.forEach((el) => {
498
498
  el.parentElement.innerHTML = embedConfig.loginFailedMessage;
package/src/authToken.ts CHANGED
@@ -64,7 +64,11 @@ const validateAuthToken = async (
64
64
  /**
65
65
  * Resets the auth token and a new token will be fetched on the next request.
66
66
  *
67
- * @version SDK: 1.28.0 | ThoughtSpot: *
67
+ * @example
68
+ * ```js
69
+ * resetCachedAuthToken();
70
+ * ```
71
+ * @version SDK: 1.28.2 | ThoughtSpot: *
68
72
  * @group Authentication / Init
69
73
  */
70
74
  export const resetCachedAuthToken = (): void => {
package/src/embed/app.ts CHANGED
@@ -9,16 +9,11 @@
9
9
  * @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
10
10
  */
11
11
 
12
- import { logger } from '../utils/logger';
13
- import { getQueryParamString } from '../utils';
14
12
  import {
15
- Param,
16
- DOMSelector,
17
- HostEvent,
18
- ViewConfig,
19
- EmbedEvent,
20
- MessagePayload,
13
+ DOMSelector, EmbedEvent, HostEvent, MessagePayload, Param, ViewConfig,
21
14
  } from '../types';
15
+ import { getQueryParamString } from '../utils';
16
+ import { logger } from '../utils/logger';
22
17
  import { V1Embed } from './ts-embed';
23
18
 
24
19
  /**
@@ -69,7 +64,6 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
69
64
  *
70
65
  * @default true
71
66
  * @version SDK: 1.2.0 | Thoughtspot: 8.4.0.cl
72
- *
73
67
  * @example
74
68
  * ```js
75
69
  * const embed = new AppEmbed('#tsEmbed', {
@@ -85,6 +79,7 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
85
79
  * nav-bars are visible, this flag will only hide the homepage left nav-bar.
86
80
  * The showPrimaryNavbar flag takes precedence over the hideHomepageLeftNav.
87
81
  *
82
+ *
88
83
  * **Note**: This option does not apply to the classic homepage.
89
84
  * To access the updated modular homepage, set
90
85
  * `modularHomeExperience` to `true` (available as Early Access feature in 9.12.5.cl).
@@ -104,9 +99,9 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
104
99
  /**
105
100
  * Control the visibility of the help (?) and profile buttons on the
106
101
  * Global nav-bar. By default, these buttons are visible on the nav-bar.
102
+ *
107
103
  * @default false
108
104
  * @version SDK: 1.2.0 | Thoughtspot: 8.4.0.cl
109
- *
110
105
  * @example
111
106
  * ```js
112
107
  * const embed = new AppEmbed('#tsEmbed', {
@@ -120,6 +115,7 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
120
115
  * Control the visibility of the application switcher button on the nav-bar.
121
116
  * By default, the application switcher is shown.
122
117
  *
118
+ *
123
119
  * **Note**: This option does not apply to the classic homepage.
124
120
  * To access the updated modular homepage, set
125
121
  * `modularHomeExperience` to `true` (available as Early Access feature in 9.12.5.cl).
@@ -140,6 +136,7 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
140
136
  * Control the visibility of the Org switcher button on the nav-bar.
141
137
  * By default, the Org switcher button is shown.
142
138
  *
139
+ *
143
140
  * **Note**: This option does not apply to the classic homepage.
144
141
  * To access the updated modular homepage, set
145
142
  * `modularHomeExperience` to `true` (available as Early Access feature in 9.12.5.cl).
@@ -166,7 +163,6 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
166
163
  * you could set the path to `pinboard/<liveboardId>/tab/<tabId>`.
167
164
  *
168
165
  * @version SDK: 1.1.0 | Thoughtspot: 9.4.0.cl
169
- *
170
166
  * @example
171
167
  * ```js
172
168
  * const embed = new AppEmbed('#tsEmbed', {
@@ -184,7 +180,6 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
184
180
  * path within the app, use the `path` attribute which is more flexible.
185
181
  *
186
182
  * @version SDK: 1.1.0 | Thoughtspot: 9.4.0.cl
187
- *
188
183
  * @example
189
184
  * ```js
190
185
  * const embed = new AppEmbed('#tsEmbed', {
@@ -213,7 +208,6 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
213
208
  * The array of GUIDs to be hidden
214
209
  *
215
210
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
216
- *
217
211
  * @example
218
212
  * ```js
219
213
  * const embed = new AppEmbed('#tsEmbed', {
@@ -236,10 +230,9 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
236
230
  liveboardV2?: boolean;
237
231
  /**
238
232
  * If set to true, the Search Assist feature is enabled.
239
- * @default true
240
233
  *
234
+ * @default true
241
235
  * @version SDK: 1.13.0 | ThoughtSpot: 8.5.0.cl, 8.8.1-sw
242
- *
243
236
  * @example
244
237
  * ```js
245
238
  * const embed = new AppEmbed('#tsEmbed', {
@@ -254,7 +247,6 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
254
247
  * according to the height of the pages which support fullHeight mode.
255
248
  *
256
249
  * @version SDK: 1.21.0 | ThoughtSpot: 9.4.0.cl, 9.4.0-sw
257
- *
258
250
  * @example
259
251
  * ```js
260
252
  * const embed = new AppEmbed('#tsEmbed', {
@@ -277,7 +269,6 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
277
269
  *
278
270
  * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
279
271
  * @default false
280
- *
281
272
  * @example
282
273
  * ```js
283
274
  * const embed = new AppEmbed('#tsEmbed', {
@@ -292,7 +283,6 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
292
283
  *
293
284
  * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
294
285
  * @default false
295
- *
296
286
  * @example
297
287
  * ```js
298
288
  * const embed = new AppEmbed('#tsEmbed', {
@@ -307,7 +297,6 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
307
297
  *
308
298
  * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
309
299
  * @default false
310
- *
311
300
  * @example
312
301
  * ```js
313
302
  * const embed = new AppEmbed('#tsEmbed', {
@@ -1,11 +1,11 @@
1
1
  /* eslint-disable no-console */
2
2
  /* eslint-disable @typescript-eslint/no-shadow */
3
3
  import EventEmitter from 'eventemitter3';
4
- import { EmbedConfig } from '../index';
5
4
  import * as auth from '../auth';
6
- import * as authService from '../utils/authService/authService';
7
5
  import * as authTokenService from '../authToken';
8
6
  import * as index from '../index';
7
+ import { EmbedConfig } from '../index';
8
+ import * as authService from '../utils/authService/authService';
9
9
  import * as base from './base';
10
10
  import * as embedConfigInstance from './embedConfig';
11
11
 
@@ -13,8 +13,8 @@ import {
13
13
  executeAfterWait,
14
14
  getAllIframeEl,
15
15
  getDocumentBody,
16
- getRootEl,
17
16
  getIFrameSrc,
17
+ getRootEl,
18
18
  } from '../test/test-utils';
19
19
  import * as tokenizedFetchInstance from '../tokenizedFetch';
20
20
  import { logger } from '../utils/logger';