@thoughtspot/visual-embed-sdk 1.38.0-alpha.1 → 1.38.1

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 (216) hide show
  1. package/cjs/package.json +1 -1
  2. package/cjs/src/embed/app.d.ts +96 -156
  3. package/cjs/src/embed/app.d.ts.map +1 -1
  4. package/cjs/src/embed/app.js +6 -3
  5. package/cjs/src/embed/app.js.map +1 -1
  6. package/cjs/src/embed/app.spec.js +10 -0
  7. package/cjs/src/embed/app.spec.js.map +1 -1
  8. package/cjs/src/embed/bodyless-conversation.d.ts +4 -4
  9. package/cjs/src/embed/bodyless-conversation.d.ts.map +1 -1
  10. package/cjs/src/embed/bodyless-conversation.js +1 -1
  11. package/cjs/src/embed/bodyless-conversation.js.map +1 -1
  12. package/cjs/src/embed/conversation.d.ts +22 -11
  13. package/cjs/src/embed/conversation.d.ts.map +1 -1
  14. package/cjs/src/embed/conversation.js +1 -1
  15. package/cjs/src/embed/conversation.js.map +1 -1
  16. package/cjs/src/embed/liveboard.d.ts +110 -167
  17. package/cjs/src/embed/liveboard.d.ts.map +1 -1
  18. package/cjs/src/embed/liveboard.js +4 -1
  19. package/cjs/src/embed/liveboard.js.map +1 -1
  20. package/cjs/src/embed/liveboard.spec.js +11 -0
  21. package/cjs/src/embed/liveboard.spec.js.map +1 -1
  22. package/cjs/src/embed/sage.d.ts +17 -2
  23. package/cjs/src/embed/sage.d.ts.map +1 -1
  24. package/cjs/src/embed/sage.js +2 -0
  25. package/cjs/src/embed/sage.js.map +1 -1
  26. package/cjs/src/embed/search-bar.d.ts +16 -6
  27. package/cjs/src/embed/search-bar.d.ts.map +1 -1
  28. package/cjs/src/embed/search-bar.js.map +1 -1
  29. package/cjs/src/embed/search.d.ts +46 -14
  30. package/cjs/src/embed/search.d.ts.map +1 -1
  31. package/cjs/src/embed/search.js.map +1 -1
  32. package/cjs/src/embed/ts-embed.d.ts +19 -2
  33. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  34. package/cjs/src/embed/ts-embed.js +49 -0
  35. package/cjs/src/embed/ts-embed.js.map +1 -1
  36. package/cjs/src/embed/ts-embed.spec.js +45 -4
  37. package/cjs/src/embed/ts-embed.spec.js.map +1 -1
  38. package/cjs/src/index.d.ts +2 -2
  39. package/cjs/src/index.d.ts.map +1 -1
  40. package/cjs/src/index.js +2 -1
  41. package/cjs/src/index.js.map +1 -1
  42. package/cjs/src/react/all-types-export.d.ts +1 -1
  43. package/cjs/src/react/all-types-export.d.ts.map +1 -1
  44. package/cjs/src/react/all-types-export.js +2 -1
  45. package/cjs/src/react/all-types-export.js.map +1 -1
  46. package/cjs/src/react/index.d.ts +1 -1
  47. package/cjs/src/react/index.d.ts.map +1 -1
  48. package/cjs/src/react/index.js +1 -1
  49. package/cjs/src/react/util.d.ts +7 -4
  50. package/cjs/src/react/util.d.ts.map +1 -1
  51. package/cjs/src/react/util.js.map +1 -1
  52. package/cjs/src/types.d.ts +482 -251
  53. package/cjs/src/types.d.ts.map +1 -1
  54. package/cjs/src/types.js +31 -14
  55. package/cjs/src/types.js.map +1 -1
  56. package/cjs/src/utils/graphql/answerService/answerService.d.ts +2 -1
  57. package/cjs/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
  58. package/cjs/src/utils/graphql/answerService/answerService.js +2 -1
  59. package/cjs/src/utils/graphql/answerService/answerService.js.map +1 -1
  60. package/cjs/src/utils/processData.d.ts.map +1 -1
  61. package/cjs/src/utils/processData.js +15 -0
  62. package/cjs/src/utils/processData.js.map +1 -1
  63. package/cjs/src/utils/processData.spec.js +15 -0
  64. package/cjs/src/utils/processData.spec.js.map +1 -1
  65. package/cjs/src/utils/processTrigger.d.ts.map +1 -1
  66. package/cjs/src/utils/processTrigger.js +14 -0
  67. package/cjs/src/utils/processTrigger.js.map +1 -1
  68. package/cjs/src/utils/processTrigger.spec.js +54 -0
  69. package/cjs/src/utils/processTrigger.spec.js.map +1 -1
  70. package/cjs/src/utils.d.ts +11 -2
  71. package/cjs/src/utils.d.ts.map +1 -1
  72. package/cjs/src/utils.js +70 -1
  73. package/cjs/src/utils.js.map +1 -1
  74. package/cjs/src/utils.spec.js +85 -0
  75. package/cjs/src/utils.spec.js.map +1 -1
  76. package/dist/{index-DeFzsyFF.js → index-BKIWUvTr.js} +1 -1
  77. package/dist/src/embed/app.d.ts +96 -156
  78. package/dist/src/embed/app.d.ts.map +1 -1
  79. package/dist/src/embed/bodyless-conversation.d.ts +4 -4
  80. package/dist/src/embed/bodyless-conversation.d.ts.map +1 -1
  81. package/dist/src/embed/conversation.d.ts +22 -11
  82. package/dist/src/embed/conversation.d.ts.map +1 -1
  83. package/dist/src/embed/liveboard.d.ts +110 -167
  84. package/dist/src/embed/liveboard.d.ts.map +1 -1
  85. package/dist/src/embed/sage.d.ts +17 -2
  86. package/dist/src/embed/sage.d.ts.map +1 -1
  87. package/dist/src/embed/search-bar.d.ts +16 -6
  88. package/dist/src/embed/search-bar.d.ts.map +1 -1
  89. package/dist/src/embed/search.d.ts +46 -14
  90. package/dist/src/embed/search.d.ts.map +1 -1
  91. package/dist/src/embed/ts-embed.d.ts +19 -2
  92. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  93. package/dist/src/index.d.ts +2 -2
  94. package/dist/src/index.d.ts.map +1 -1
  95. package/dist/src/react/all-types-export.d.ts +1 -1
  96. package/dist/src/react/all-types-export.d.ts.map +1 -1
  97. package/dist/src/react/index.d.ts +1 -1
  98. package/dist/src/react/index.d.ts.map +1 -1
  99. package/dist/src/react/util.d.ts +7 -4
  100. package/dist/src/react/util.d.ts.map +1 -1
  101. package/dist/src/types.d.ts +482 -251
  102. package/dist/src/types.d.ts.map +1 -1
  103. package/dist/src/utils/graphql/answerService/answerService.d.ts +2 -1
  104. package/dist/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
  105. package/dist/src/utils/processData.d.ts.map +1 -1
  106. package/dist/src/utils/processTrigger.d.ts.map +1 -1
  107. package/dist/src/utils.d.ts +11 -2
  108. package/dist/src/utils.d.ts.map +1 -1
  109. package/dist/tsembed-react.es.js +3477 -3311
  110. package/dist/tsembed-react.js +3476 -3310
  111. package/dist/tsembed.es.js +192 -26
  112. package/dist/tsembed.js +195 -29
  113. package/dist/visual-embed-sdk-react-full.d.ts +845 -655
  114. package/dist/visual-embed-sdk-react.d.ts +845 -655
  115. package/dist/visual-embed-sdk.d.ts +827 -640
  116. package/lib/package.json +1 -1
  117. package/lib/src/embed/app.d.ts +96 -156
  118. package/lib/src/embed/app.d.ts.map +1 -1
  119. package/lib/src/embed/app.js +6 -3
  120. package/lib/src/embed/app.js.map +1 -1
  121. package/lib/src/embed/app.spec.js +10 -0
  122. package/lib/src/embed/app.spec.js.map +1 -1
  123. package/lib/src/embed/bodyless-conversation.d.ts +4 -4
  124. package/lib/src/embed/bodyless-conversation.d.ts.map +1 -1
  125. package/lib/src/embed/bodyless-conversation.js +1 -1
  126. package/lib/src/embed/bodyless-conversation.js.map +1 -1
  127. package/lib/src/embed/conversation.d.ts +22 -11
  128. package/lib/src/embed/conversation.d.ts.map +1 -1
  129. package/lib/src/embed/conversation.js +1 -1
  130. package/lib/src/embed/conversation.js.map +1 -1
  131. package/lib/src/embed/liveboard.d.ts +110 -167
  132. package/lib/src/embed/liveboard.d.ts.map +1 -1
  133. package/lib/src/embed/liveboard.js +4 -1
  134. package/lib/src/embed/liveboard.js.map +1 -1
  135. package/lib/src/embed/liveboard.spec.js +11 -0
  136. package/lib/src/embed/liveboard.spec.js.map +1 -1
  137. package/lib/src/embed/sage.d.ts +17 -2
  138. package/lib/src/embed/sage.d.ts.map +1 -1
  139. package/lib/src/embed/sage.js +2 -0
  140. package/lib/src/embed/sage.js.map +1 -1
  141. package/lib/src/embed/search-bar.d.ts +16 -6
  142. package/lib/src/embed/search-bar.d.ts.map +1 -1
  143. package/lib/src/embed/search-bar.js.map +1 -1
  144. package/lib/src/embed/search.d.ts +46 -14
  145. package/lib/src/embed/search.d.ts.map +1 -1
  146. package/lib/src/embed/search.js.map +1 -1
  147. package/lib/src/embed/ts-embed.d.ts +19 -2
  148. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  149. package/lib/src/embed/ts-embed.js +49 -0
  150. package/lib/src/embed/ts-embed.js.map +1 -1
  151. package/lib/src/embed/ts-embed.spec.js +45 -4
  152. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  153. package/lib/src/index.d.ts +2 -2
  154. package/lib/src/index.d.ts.map +1 -1
  155. package/lib/src/index.js +2 -2
  156. package/lib/src/index.js.map +1 -1
  157. package/lib/src/react/all-types-export.d.ts +1 -1
  158. package/lib/src/react/all-types-export.d.ts.map +1 -1
  159. package/lib/src/react/all-types-export.js +1 -1
  160. package/lib/src/react/all-types-export.js.map +1 -1
  161. package/lib/src/react/index.d.ts +1 -1
  162. package/lib/src/react/index.d.ts.map +1 -1
  163. package/lib/src/react/index.js +1 -1
  164. package/lib/src/react/util.d.ts +7 -4
  165. package/lib/src/react/util.d.ts.map +1 -1
  166. package/lib/src/react/util.js.map +1 -1
  167. package/lib/src/types.d.ts +482 -251
  168. package/lib/src/types.d.ts.map +1 -1
  169. package/lib/src/types.js +31 -14
  170. package/lib/src/types.js.map +1 -1
  171. package/lib/src/utils/graphql/answerService/answerService.d.ts +2 -1
  172. package/lib/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
  173. package/lib/src/utils/graphql/answerService/answerService.js +2 -1
  174. package/lib/src/utils/graphql/answerService/answerService.js.map +1 -1
  175. package/lib/src/utils/processData.d.ts.map +1 -1
  176. package/lib/src/utils/processData.js +15 -0
  177. package/lib/src/utils/processData.js.map +1 -1
  178. package/lib/src/utils/processData.spec.js +15 -0
  179. package/lib/src/utils/processData.spec.js.map +1 -1
  180. package/lib/src/utils/processTrigger.d.ts.map +1 -1
  181. package/lib/src/utils/processTrigger.js +14 -0
  182. package/lib/src/utils/processTrigger.js.map +1 -1
  183. package/lib/src/utils/processTrigger.spec.js +54 -0
  184. package/lib/src/utils/processTrigger.spec.js.map +1 -1
  185. package/lib/src/utils.d.ts +11 -2
  186. package/lib/src/utils.d.ts.map +1 -1
  187. package/lib/src/utils.js +67 -0
  188. package/lib/src/utils.js.map +1 -1
  189. package/lib/src/utils.spec.js +86 -1
  190. package/lib/src/utils.spec.js.map +1 -1
  191. package/lib/src/visual-embed-sdk.d.ts +836 -649
  192. package/package.json +1 -1
  193. package/src/embed/app.spec.ts +14 -0
  194. package/src/embed/app.ts +97 -152
  195. package/src/embed/bodyless-conversation.ts +4 -4
  196. package/src/embed/conversation.ts +23 -12
  197. package/src/embed/liveboard.spec.ts +15 -0
  198. package/src/embed/liveboard.ts +117 -172
  199. package/src/embed/sage.ts +17 -5
  200. package/src/embed/search-bar.tsx +16 -17
  201. package/src/embed/search.ts +47 -21
  202. package/src/embed/ts-embed.spec.ts +52 -4
  203. package/src/embed/ts-embed.ts +61 -6
  204. package/src/index.ts +2 -0
  205. package/src/react/all-types-export.ts +1 -0
  206. package/src/react/index.tsx +3 -3
  207. package/src/react/util.ts +6 -4
  208. package/src/types.ts +488 -253
  209. package/src/utils/graphql/answerService/answerService.ts +5 -4
  210. package/src/utils/processData.spec.ts +28 -0
  211. package/src/utils/processData.ts +17 -0
  212. package/src/utils/processTrigger.spec.ts +90 -0
  213. package/src/utils/processTrigger.ts +16 -1
  214. package/src/utils.spec.ts +113 -0
  215. package/src/utils.ts +78 -2
  216. package/dist/index-NZYq1Tu3.js +0 -7370
@@ -1,10 +1,10 @@
1
1
  import isUndefined from 'lodash/isUndefined';
2
2
  import { ERROR_MESSAGE } from '../errors';
3
- import { ViewConfig, Param } from '../types';
3
+ import { Param, BaseViewConfig } from '../types';
4
4
  import { TsEmbed } from './ts-embed';
5
5
  import { getQueryParamString } from '../utils';
6
6
 
7
- /**
7
+ /**
8
8
  * Configuration for search options
9
9
  */
10
10
  export interface SearchOptions {
@@ -18,9 +18,9 @@ export interface SearchOptions {
18
18
  * The configuration for the embedded spotterEmbed options.
19
19
  * @group Embed components
20
20
  */
21
- export interface SpotterEmbedViewConfig extends ViewConfig {
21
+ export interface SpotterEmbedViewConfig extends Omit<BaseViewConfig, 'primaryAction'> {
22
22
  /**
23
- * The ID of the worksheet to use for the conversation.
23
+ * The ID of the data source object. For example, Model, View, or Table. Spotter uses this object to query data and generate Answers.
24
24
  */
25
25
  worksheetId: string;
26
26
  /**
@@ -30,10 +30,12 @@ export interface SpotterEmbedViewConfig extends ViewConfig {
30
30
  /**
31
31
  * disableSourceSelection : Disables data source selection
32
32
  * but still display the selected data source.
33
+ *
34
+ * Supported embed types: `SpotterEmbed`
33
35
  * @example
34
36
  * ```js
35
37
  * const embed = new SpotterEmbed('#tsEmbed', {
36
- * ... // other options
38
+ * ... //other embed view config
37
39
  * disableSourceSelection : true,
38
40
  * })
39
41
  * ```
@@ -42,10 +44,12 @@ export interface SpotterEmbedViewConfig extends ViewConfig {
42
44
  disableSourceSelection?: boolean;
43
45
  /**
44
46
  * hideSourceSelection : Hide data source selection
47
+ *
48
+ * Supported embed types: `SpotterEmbed`
45
49
  * @example
46
50
  * ```js
47
51
  * const embed = new SpotterEmbed('#tsEmbed', {
48
- * ... // other options
52
+ * ... //other embed view config
49
53
  * hideSourceSelection : true,
50
54
  * })
51
55
  * ```
@@ -54,12 +58,15 @@ export interface SpotterEmbedViewConfig extends ViewConfig {
54
58
  hideSourceSelection?: boolean;
55
59
  /**
56
60
  * Flag to control Data panel experience
61
+ *
62
+ * Supported embed types: `SageEmbed`, `AppEmbed`, `SearchBarEmbed`, `LiveboardEmbed`, `SearchEmbed`
57
63
  * @default false
58
64
  * @version SDK: 1.36.0 | ThoughtSpot Cloud: 10.4.0.cl
59
65
  * @example
60
66
  * ```js
61
- * const embed = new AppEmbed('#tsEmbed', {
62
- * ... // other options
67
+ * // Replace <EmbedComponent> with embed component name. For example, SageEmbed, AppEmbed, or SearchBarEmbed
68
+ * const embed = new <EmbedComponent>('#tsEmbed', {
69
+ * ... // other embed view config
63
70
  * dataPanelV2: true,
64
71
  * })
65
72
  * ```
@@ -69,10 +76,12 @@ export interface SpotterEmbedViewConfig extends ViewConfig {
69
76
  * showSpotterLimitations : show limitation text
70
77
  * of the spotter underneath the chat input.
71
78
  * default is false.
79
+ *
80
+ * Supported embed types: `SpotterEmbed`
72
81
  * @example
73
82
  * ```js
74
83
  * const embed = new SpotterEmbed('#tsEmbed', {
75
- * ... // other options
84
+ * ... //other embed view config
76
85
  * showSpotterLimitations : true,
77
86
  * })
78
87
  * ```
@@ -82,10 +91,12 @@ export interface SpotterEmbedViewConfig extends ViewConfig {
82
91
  /**
83
92
  * hideSampleQuestions : Hide sample questions on
84
93
  * the initial screen of the conversation.
94
+ *
95
+ * Supported embed types: `SpotterEmbed`
85
96
  * @example
86
97
  * ```js
87
98
  * const embed = new SpotterEmbed('#tsEmbed', {
88
- * ... // other options
99
+ * ... //other embed view config
89
100
  * hideSampleQuestions : true,
90
101
  * })
91
102
  * ```
@@ -96,7 +107,7 @@ export interface SpotterEmbedViewConfig extends ViewConfig {
96
107
 
97
108
  /**
98
109
  * The configuration for the embedded spotterEmbed options.
99
- * @deprecated from SDK: 1.38.0 | ThoughtSpot: 10.10.0.cl
110
+ * @deprecated from SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
100
111
  * Use {@link SpotterEmbedViewConfig} instead
101
112
  * @group Embed components
102
113
  */
@@ -183,7 +194,7 @@ export class SpotterEmbed extends TsEmbed {
183
194
 
184
195
  /**
185
196
  * Embed ThoughtSpot AI Conversation.
186
- * @deprecated from SDK: 1.38.0 | ThoughtSpot: 10.10.0.cl
197
+ * @deprecated from SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
187
198
  * Use {@link SpotterEmbed} instead
188
199
  * @group Embed components
189
200
  * @example
@@ -142,6 +142,21 @@ describe('Liveboard/viz embed tests', () => {
142
142
  });
143
143
  });
144
144
 
145
+ test('should set isLiveboardStylingAndGroupingEnabled to true in url', async () => {
146
+ const liveboardEmbed = new LiveboardEmbed(getRootEl(), {
147
+ isLiveboardStylingAndGroupingEnabled: true,
148
+ ...defaultViewConfig,
149
+ liveboardId,
150
+ } as LiveboardViewConfig);
151
+ liveboardEmbed.render();
152
+ await executeAfterWait(() => {
153
+ expectUrlMatchesWithParams(
154
+ getIFrameSrc(),
155
+ `http://${thoughtSpotHost}/?embedApp=true${defaultParams}&isLiveboardStylingAndGroupingEnabled=true${prefixParams}#/embed/viz/${liveboardId}`,
156
+ );
157
+ });
158
+ });
159
+
145
160
  test('should set visible actions as empty array', async () => {
146
161
  const liveboardEmbed = new LiveboardEmbed(getRootEl(), {
147
162
  visibleActions: [],
@@ -17,7 +17,9 @@ import {
17
17
  RuntimeFilter,
18
18
  DOMSelector,
19
19
  HostEvent,
20
- ViewConfig,
20
+ SearchLiveboardCommonViewConfig as LiveboardOtherViewConfig,
21
+ BaseViewConfig,
22
+ LiveboardAppEmbedViewConfig,
21
23
  } from '../types';
22
24
  import { getQueryParamString, isUndefined } from '../utils';
23
25
  import { getAuthPromise } from './base';
@@ -31,11 +33,7 @@ import { logger } from '../utils/logger';
31
33
  * The configuration for the embedded Liveboard or visualization page view.
32
34
  * @group Embed components
33
35
  */
34
- export interface LiveboardViewConfig
35
- extends Omit<
36
- ViewConfig,
37
- 'hiddenHomepageModules' | 'hiddenHomeLeftNavItems' | 'reorderedHomepageModules'
38
- > {
36
+ export interface LiveboardViewConfig extends BaseViewConfig, LiveboardOtherViewConfig, LiveboardAppEmbedViewConfig {
39
37
  /**
40
38
  * If set to true, the embedded object container dynamically resizes
41
39
  * according to the height of the Liveboard.
@@ -48,6 +46,8 @@ export interface LiveboardViewConfig
48
46
  * incrementally as users scroll the page to view the charts and tables.
49
47
  *
50
48
  * @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 7.2.1
49
+ *
50
+ * Supported embed types: `LiveboardEmbed`
51
51
  * @example
52
52
  * ```js
53
53
  * const embed = new LiveboardEmbed('#embed', {
@@ -61,6 +61,8 @@ export interface LiveboardViewConfig
61
61
  * This is the minimum height(in pixels) for a full-height Liveboard.
62
62
  * Setting this height helps resolve issues with empty Liveboards and
63
63
  * other screens navigable from a Liveboard.
64
+ *
65
+ * Supported embed types: `LiveboardEmbed`
64
66
  * @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
65
67
  * @default 500
66
68
  * @example
@@ -78,7 +80,7 @@ export interface LiveboardViewConfig
78
80
  * @example
79
81
  * ```js
80
82
  * const embed = new LiveboardEmbed('#tsEmbed', {
81
- * ... // other options
83
+ * ... //other embed view config
82
84
  * enableVizTransformations:true,
83
85
  * })
84
86
  * ```
@@ -88,11 +90,13 @@ export interface LiveboardViewConfig
88
90
  /**
89
91
  * The Liveboard to display in the embedded view.
90
92
  * Use either liveboardId or pinboardId to reference the Liveboard to embed.
93
+ *
94
+ * Supported embed types: `LiveboardEmbed`
91
95
  * @version SDK: 1.3.0 | ThoughtSpot ts7.aug.cl, 7.2.1
92
96
  * @example
93
97
  * ```js
94
- * const embed = new LiveboardEmbed('#embed-container', {
95
- * ... // other options
98
+ * const embed = new LiveboardEmbed('#tsEmbed', {
99
+ * ... //other embed view config
96
100
  * liveboardId:id of liveboard,
97
101
  * })
98
102
  */
@@ -104,11 +108,13 @@ export interface LiveboardViewConfig
104
108
  pinboardId?: string;
105
109
  /**
106
110
  * The visualization within the Liveboard to display.
111
+ *
112
+ * Supported embed types: `LiveboardEmbed`
107
113
  * @version SDK: 1.9.1 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw
108
114
  * @example
109
115
  * ```js
110
- * const embed = new LiveboardEmbed('#embed-container', {
111
- * ... // other options
116
+ * const embed = new LiveboardEmbed('#tsEmbed', {
117
+ * ... //other embed view config
112
118
  * vizId:'430496d6-6903-4601-937e-2c691821af3c',
113
119
  * })
114
120
  * ```
@@ -117,11 +123,13 @@ export interface LiveboardViewConfig
117
123
  /**
118
124
  * If set to true, all filter chips from a
119
125
  * Liveboard page will be read-only (no X buttons)
126
+ *
127
+ * Supported embed types: `LiveboardEmbed`
120
128
  * @version SDK: 1.3.0 | ThoughtSpot ts7.aug.cl, 7.2.1.sw
121
129
  * @example
122
130
  * ```js
123
- * const embed = new LiveboardEmbed('#embed-container', {
124
- * ... // other options
131
+ * const embed = new LiveboardEmbed('#tsEmbed', {
132
+ * ... //other embed view config
125
133
  * preventLiveboardFilterRemoval:true,
126
134
  * })
127
135
  * ```
@@ -131,11 +139,13 @@ export interface LiveboardViewConfig
131
139
  * Array of visualization IDs which should be visible when the Liveboard
132
140
  * renders. This can be changed by triggering the `SetVisibleVizs`
133
141
  * event.
142
+ *
143
+ * Supported embed types: `LiveboardEmbed`
134
144
  * @version SDK: 1.9.1 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw
135
145
  * @example
136
146
  * ```js
137
- * const embed = new LiveboardEmbed('#embed-container', {
138
- * ... // other options
147
+ * const embed = new LiveboardEmbed('#tsEmbed', {
148
+ * ... //other embed view config
139
149
  * visibleVizs: [
140
150
  * '430496d6-6903-4601-937e-2c691821af3c',
141
151
  * 'f547ec54-2a37-4516-a222-2b06719af726'
@@ -151,11 +161,13 @@ export interface LiveboardViewConfig
151
161
  /**
152
162
  * Render embedded Liveboards and visualizations in the
153
163
  * new Liveboard experience mode.
164
+ *
165
+ * Supported embed types: `LiveboardEmbed`
154
166
  * @version SDK: 1.14.0 | ThoughtSpot: 8.6.0.cl, 8.8.1-sw
155
167
  * @example
156
168
  * ```js
157
- * const embed = new LiveboardEmbed('#embed-container', {
158
- * ... // other options
169
+ * const embed = new LiveboardEmbed('#tsEmbed', {
170
+ * ... //other embed view config
159
171
  * liveboardV2:true,
160
172
  * })
161
173
  * ```
@@ -164,10 +176,12 @@ export interface LiveboardViewConfig
164
176
  /**
165
177
  * Set a Liveboard tab as an active tab.
166
178
  * Specify the tab ID.
179
+ *
180
+ * Supported embed types: `LiveboardEmbed`
167
181
  * @example
168
182
  * ```js
169
183
  * const embed = new LiveboardEmbed('#tsEmbed', {
170
- * ... // other options
184
+ * ... //other embed view config
171
185
  * activeTabId:'id-1234',
172
186
  * })
173
187
  * ```
@@ -176,96 +190,18 @@ export interface LiveboardViewConfig
176
190
  activeTabId?: string;
177
191
  /**
178
192
  * Show or hide the tab panel of the embedded Liveboard.
193
+ *
194
+ * Supported embed types: `LiveboardEmbed`
179
195
  * @version SDK: 1.25.0 | Thoughtspot: 9.6.0.cl, 9.8.0.sw
180
196
  * @example
181
197
  * ```js
182
- * const embed = new LiveboardEmbed('#embed-container', {
183
- * ... // other options
198
+ * const embed = new LiveboardEmbed('#tsEmbed', {
199
+ * ... //other embed view config
184
200
  * hideTabPanel:true,
185
201
  * })
186
202
  * ```
187
203
  */
188
204
  hideTabPanel?: boolean;
189
- /**
190
- * Show or hide the Liveboard header.
191
- * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
192
- * @default false
193
- * @example
194
- * ```js
195
- * const embed = new LiveboardEmbed('#embed', {
196
- * ... // other liveboard view config
197
- * hideLiveboardHeader:true,
198
- * });
199
- * ```
200
- */
201
- hideLiveboardHeader?: boolean;
202
- /**
203
- * Show or hide the Liveboard title.
204
- * @default false
205
- * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
206
- * @example
207
- * ```js
208
- * const embed = new LiveboardEmbed('#embed-container', {
209
- * ... // other options
210
- * showLiveboardTitle:true,
211
- * })
212
- * ```
213
- */
214
- showLiveboardTitle?: boolean;
215
- /**
216
- * Show or hide the Liveboard description.
217
- * @default false
218
- * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
219
- * @example
220
- * ```js
221
- * const embed = new LiveboardEmbed('#embed-container', {
222
- * ... // other options
223
- * showLiveboardDescription:true,
224
- * })
225
- * ```
226
- */
227
- showLiveboardDescription?: boolean;
228
- /**
229
- * Control the position and visibility of
230
- * the Liveboard header as the users scroll down the
231
- * embedded Liveboard page.
232
- * @example
233
- * ```js
234
- * const embed = new LiveboardEmbed('#embed', {
235
- * ... // other Liveboard view config
236
- * isLiveboardHeaderSticky: true,
237
- * });
238
- * ```
239
- * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
240
- */
241
- isLiveboardHeaderSticky?: boolean;
242
- /**
243
- * enable or disable ask sage
244
- * @default false
245
- * @version SDK: 1.29.0 | Thoughtspot: 9.12.0.cl
246
- * @example
247
- * ```js
248
- * const embed = new SearchEmbed('#tsEmbed', {
249
- * ... // other options
250
- * enableAskSage:true,
251
- * })
252
- * ```
253
- */
254
- enableAskSage?: boolean;
255
- /**
256
- * This flag is used to enable the 2 column layout on a Liveboard
257
- * @type {boolean}
258
- * @default false
259
- * @version SDK: 1.32.0 | ThoughtSpot:10.1.0.cl
260
- * @example
261
- * ```js
262
- * const embed = new LiveboardEmbed('#embed-container', {
263
- * ... // other options
264
- * enable2ColumnLayout: true,
265
- * })
266
- * ```
267
- */
268
- enable2ColumnLayout?: boolean;
269
205
  /**
270
206
  * Show a preview image of the visualization before the visualization loads.
271
207
  * Only works for visualizations embeds with a viz id.
@@ -275,9 +211,11 @@ export interface LiveboardViewConfig
275
211
  *
276
212
  * Since, this will show preview images, be careful that it may show
277
213
  * undesired data to the user when using row level security.
214
+ *
215
+ * Supported embed types: `LiveboardEmbed`
278
216
  * @example
279
217
  * ```js
280
- * const embed = new LiveboardEmbed('#embed-container', {
218
+ * const embed = new LiveboardEmbed('#tsEmbed', {
281
219
  * liveboardId: 'liveboard-id',
282
220
  * vizId: 'viz-id',
283
221
  * showPreviewLoader: true,
@@ -287,75 +225,16 @@ export interface LiveboardViewConfig
287
225
  * @version SDK: 1.32.0 | ThoughtSpot: 10.0.0.cl
288
226
  */
289
227
  showPreviewLoader?: boolean;
290
- /**
291
- * Enables or disables the compact header feature on a Liveboard.
292
- * Compact Liveboard header is turned off by default on Liveboards in
293
- * ThoughtSpot Embedded apps.
294
- *
295
- * @type {boolean}
296
- * @default false
297
- * @version SDK: 1.35.0 | ThoughtSpot:10.3.0.cl
298
- * @example
299
- * ```js
300
- * const embed = new LiveboardEmbed('#embed-container', {
301
- * ... // other options
302
- * isLiveboardCompactHeaderEnabled: true,
303
- * })
304
- * ```
305
- */
306
- isLiveboardCompactHeaderEnabled?: boolean;
307
- /**
308
- * This flag is used to show/hide verified icon in the Liveboard compact header
309
- * @type {boolean}
310
- * @default true
311
- * @version SDK: 1.35.0 | ThoughtSpot:10.4.0.cl
312
- * @example
313
- * ```js
314
- * const embed = new LiveboardEmbed('#embed-container', {
315
- * ... // other options
316
- * showLiveboardVerifiedBadge: true,
317
- * })
318
- * ```
319
- */
320
- showLiveboardVerifiedBadge?: boolean;
321
- /**
322
- * This flag is used to show/hide the re-verify banner
323
- * in Liveboard compact header
324
- * @type {boolean}
325
- * @default true
326
- * @version SDK: 1.35.0 | ThoughtSpot:10.4.0.cl
327
- * @example
328
- * ```js
329
- * const embed = new LiveboardEmbed('#embed-container', {
330
- * ... // other options
331
- * showLiveboardReverifyBanner: true,
332
- * })
333
- * ```
334
- */
335
- showLiveboardReverifyBanner?: boolean;
336
- /**
337
- * This flag is used to enable/disable hide irrelevant filters in a Liveboard tab
338
- * @type {boolean}
339
- * @default false
340
- * @version SDK: 1.36.0 | ThoughtSpot:10.6.0.cl
341
- * @example
342
- * ```js
343
- * const embed = new LiveboardEmbed('#embed-container', {
344
- * ... // other options
345
- * hideIrrelevantChipsInLiveboardTabs: true,
346
- * })
347
- * ```
348
- */
349
- hideIrrelevantChipsInLiveboardTabs?: boolean;
350
-
351
228
  /**
352
229
  * The Liveboard to run on regular intervals to fetch the cdw token.
230
+ *
231
+ * Supported embed types: `LiveboardEmbed`
353
232
  * @hidden
354
233
  * @version SDK: 1.35.0 | ThoughtSpot:10.6.0.cl
355
234
  * @example
356
235
  * ```js
357
- * const embed = new LiveboardEmbed('#embed-container', {
358
- * ... // other options
236
+ * const embed = new LiveboardEmbed('#tsEmbed', {
237
+ * ... //other embed view config
359
238
  * oAuthPollingInterval: value in milliseconds,
360
239
  * })
361
240
  */
@@ -363,12 +242,14 @@ export interface LiveboardViewConfig
363
242
 
364
243
  /**
365
244
  * The Liveboard is set to force a token fetch during the initial load.
245
+ *
246
+ * Supported embed types: `LiveboardEmbed`
366
247
  * @hidden
367
248
  * @version SDK: 1.35.0 | ThoughtSpot:10.6.0.cl
368
249
  * @example
369
250
  * ```js
370
- * const embed = new LiveboardEmbed('#embed-container', {
371
- * ... // other options
251
+ * const embed = new LiveboardEmbed('#tsEmbed', {
252
+ * ... //other embed view config
372
253
  * isForceRedirect: false,
373
254
  * })
374
255
  */
@@ -378,10 +259,12 @@ export interface LiveboardViewConfig
378
259
  * The source connection ID for authentication.
379
260
  * @hidden
380
261
  * @version SDK: 1.35.0 | ThoughtSpot:10.6.0.cl
262
+ *
263
+ * Supported embed types: `LiveboardEmbed`
381
264
  * @example
382
265
  * ```js
383
- * const embed = new LiveboardEmbed('#embed-container', {
384
- * ... // other options
266
+ * const embed = new LiveboardEmbed('#tsEmbed', {
267
+ * ... //other embed view config
385
268
  * dataSourceId: '',
386
269
  * })
387
270
  */
@@ -390,18 +273,75 @@ export interface LiveboardViewConfig
390
273
  /**
391
274
  * This flag is for show/hide checkboxes for include or exclude
392
275
  * cover page and filters in the Liveboard PDF.
393
- * @type {boolean}
394
- * @default true
276
+ *
277
+ * Supported embed types: `LiveboardEmbed`
395
278
  * @version SDK: 1.37.0 | ThoughtSpot:10.8.0.cl
279
+ * @default true
280
+ * Supported embed types: `LiveboardEmbed`
396
281
  * @example
397
282
  * ```js
398
- * const embed = new LiveboardEmbed('#embed-container', {
399
- * ... // other options
283
+ * const embed = new LiveboardEmbed('#tsEmbed', {
284
+ * ... //other embed view config
400
285
  * coverAndFilterOptionInPDF: false,
401
286
  * })
402
287
  * ```
403
288
  */
404
289
  coverAndFilterOptionInPDF?: boolean;
290
+ /**
291
+ * The list of tab IDs to hide from the embedded.
292
+ * This Tabs will be hidden from their respective LBs.
293
+ * Use this to hide an tabID.
294
+ *
295
+ * Supported embed types: `LiveboardEmbed`
296
+ * @example
297
+ * ```js
298
+ * const embed = new LiveboardEmbed('#tsEmbed', {
299
+ * ... // other embed view config
300
+ * hiddenTabs: [
301
+ * '430496d6-6903-4601-937e-2c691821af3c',
302
+ * 'f547ec54-2a37-4516-a222-2b06719af726'
303
+ * ]
304
+ * });
305
+ * ```
306
+ * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 10.1.0.sw
307
+ */
308
+ hiddenTabs?: string[];
309
+ /**
310
+ * The list of tab IDs to show in the embedded Liveboard.
311
+ * Only the tabs specified in the array will be shown in the Liveboard.
312
+ *
313
+ * Use either `visibleTabs` or `hiddenTabs`.
314
+ *
315
+ * Supported embed types: `LiveboardEmbed`
316
+ * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 10.1.0.sw
317
+ * @example
318
+ * ```js
319
+ * const embed = new LiveboardEmbed('#tsEmbed', {
320
+ * ... // other embed view config
321
+ * visibleTabs: [
322
+ * '430496d6-6903-4601-937e-2c691821af3c',
323
+ * 'f547ec54-2a37-4516-a222-2b06719af726'
324
+ * ]
325
+ * })
326
+ * ```
327
+ */
328
+ visibleTabs?: string[];
329
+ /**
330
+ * This flag is used to enable/disable the styling and grouping in a Liveboard
331
+ *
332
+ * Supported embed types: `LiveboardEmbed`, `AppEmbed`
333
+ * @type {boolean}
334
+ * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
335
+ * @example
336
+ * ```js
337
+ * // Replace <EmbedComponent> with embed component name. For example, AppEmbed or LiveboardEmbed
338
+ * const embed = new <EmbedComponent>('#tsEmbed', {
339
+ * ... // other embed view config
340
+ * isLiveboardStylingAndGroupingEnabled: true,
341
+ * })
342
+ * ```
343
+ */
344
+ isLiveboardStylingAndGroupingEnabled?: boolean;
405
345
  }
406
346
 
407
347
  /**
@@ -472,6 +412,7 @@ export class LiveboardEmbed extends V1Embed {
472
412
  isForceRedirect,
473
413
  dataSourceId,
474
414
  coverAndFilterOptionInPDF,
415
+ isLiveboardStylingAndGroupingEnabled,
475
416
  } = this.viewConfig;
476
417
 
477
418
  const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
@@ -534,6 +475,10 @@ export class LiveboardEmbed extends V1Embed {
534
475
  params[Param.CoverAndFilterOptionInPDF] = coverAndFilterOptionInPDF;
535
476
  }
536
477
 
478
+ if (isLiveboardStylingAndGroupingEnabled !== undefined) {
479
+ params[Param.IsLiveboardStylingAndGroupingEnabled] = isLiveboardStylingAndGroupingEnabled;
480
+ }
481
+
537
482
  params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
538
483
  params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
539
484
  params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;
package/src/embed/sage.ts CHANGED
@@ -6,7 +6,7 @@
6
6
  * @author Mourya Balabhadra <mourya.balabhadra@thoughtspot.com>
7
7
  */
8
8
 
9
- import { DOMSelector, Param, ViewConfig } from '../types';
9
+ import { DOMSelector, Param, BaseViewConfig, SearchLiveboardCommonViewConfig } from '../types';
10
10
  import { getQueryParamString } from '../utils';
11
11
  import { V1Embed } from './ts-embed';
12
12
 
@@ -31,13 +31,12 @@ export interface SearchOptions {
31
31
  * The configuration attributes for the embedded Natural language search view. Based on
32
32
  * GPT and LLM.
33
33
  * @version: SDK: 1.23.0 | ThoughtSpot: 9.8.0.cl, 9.8.0.sw
34
+ *
35
+ * Note: This embed will be deprecated from SDK: 1.40.0 | ThoughtSpot: 10.13.0.cl
34
36
  * @group Embed components
35
37
  */
36
38
  export interface SageViewConfig
37
- extends Omit<
38
- ViewConfig,
39
- 'hiddenHomepageModules' | 'hiddenHomeLeftNavItems' | 'hiddenTabs' | 'visibleTabs' | 'reorderedHomepageModules'
40
- > {
39
+ extends SearchLiveboardCommonViewConfig, Omit<BaseViewConfig, 'primaryAction' | 'runtimeFilters' | 'runtimeParameters' | 'excludeRuntimeFiltersfromURL' | 'excludeRuntimeParametersfromURL'> {
41
40
  /**
42
41
  * If set to true, a list of Liveboard and Answers related
43
42
  * to the natural language search will be shown below the
@@ -95,7 +94,16 @@ export interface SageViewConfig
95
94
  * Show or hide sample questions.
96
95
  * The sample questions are autogenerated based on the worksheet
97
96
  * selected for the search operation.
97
+ *
98
+ * Supported embed types: `SageEmbed`
98
99
  * @version SDK: 1.26.0 | Thoughtspot: 9.8.0.cl, 9.8.0.sw
100
+ * @example
101
+ * ```js
102
+ * const embed = new SageEmbed('#tsEmbed', {
103
+ * ... //other embed view config
104
+ * hideSampleQuestions : true,
105
+ * })
106
+ * ```
99
107
  */
100
108
  hideSampleQuestions?: boolean;
101
109
  /**
@@ -112,6 +120,8 @@ export interface SageViewConfig
112
120
  * If it is executed, the focus is placed on the results.
113
121
  * If it’s not executed, the focus is placed at the end of
114
122
  * the token string in the search bar.
123
+ *
124
+ * Supported embed types: `SageEmbed`
115
125
  * @example
116
126
  * ```js
117
127
  * searchOptions: {
@@ -126,6 +136,8 @@ export interface SageViewConfig
126
136
  /**
127
137
  * Embed ThoughtSpot LLM and GPT-based Natural Language Search component.
128
138
  * @version: SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl, 9.5.1-sw
139
+ *
140
+ * Note: This embed will be deprecated from SDK: 1.40.0 | ThoughtSpot: 10.13.0.cl
129
141
  * @group Embed components
130
142
  */
131
143
  export class SageEmbed extends V1Embed {