@thoughtspot/visual-embed-sdk 1.24.0-alpha.3 → 1.24.0-alpha.4

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 (97) hide show
  1. package/cjs/package.json +1 -1
  2. package/cjs/src/css-variables.d.ts +38 -0
  3. package/cjs/src/css-variables.d.ts.map +1 -1
  4. package/cjs/src/embed/app.d.ts +11 -0
  5. package/cjs/src/embed/app.d.ts.map +1 -1
  6. package/cjs/src/embed/app.js +2 -1
  7. package/cjs/src/embed/app.js.map +1 -1
  8. package/cjs/src/embed/app.spec.js +10 -0
  9. package/cjs/src/embed/app.spec.js.map +1 -1
  10. package/cjs/src/embed/base.d.ts +4 -1
  11. package/cjs/src/embed/base.d.ts.map +1 -1
  12. package/cjs/src/embed/base.js +4 -1
  13. package/cjs/src/embed/base.js.map +1 -1
  14. package/cjs/src/embed/search-bar.d.ts +6 -0
  15. package/cjs/src/embed/search-bar.d.ts.map +1 -1
  16. package/cjs/src/embed/search-bar.js +5 -2
  17. package/cjs/src/embed/search-bar.js.map +1 -1
  18. package/cjs/src/embed/search.d.ts +6 -1
  19. package/cjs/src/embed/search.d.ts.map +1 -1
  20. package/cjs/src/embed/search.js +5 -2
  21. package/cjs/src/embed/search.js.map +1 -1
  22. package/cjs/src/embed/search.spec.js +34 -0
  23. package/cjs/src/embed/search.spec.js.map +1 -1
  24. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  25. package/cjs/src/embed/ts-embed.js +4 -0
  26. package/cjs/src/embed/ts-embed.js.map +1 -1
  27. package/cjs/src/embed/ts-embed.spec.js +81 -1
  28. package/cjs/src/embed/ts-embed.spec.js.map +1 -1
  29. package/cjs/src/types.d.ts +82 -3
  30. package/cjs/src/types.d.ts.map +1 -1
  31. package/cjs/src/types.js +70 -2
  32. package/cjs/src/types.js.map +1 -1
  33. package/dist/src/css-variables.d.ts +38 -0
  34. package/dist/src/css-variables.d.ts.map +1 -1
  35. package/dist/src/embed/app.d.ts +11 -0
  36. package/dist/src/embed/app.d.ts.map +1 -1
  37. package/dist/src/embed/base.d.ts +4 -1
  38. package/dist/src/embed/base.d.ts.map +1 -1
  39. package/dist/src/embed/search-bar.d.ts +6 -0
  40. package/dist/src/embed/search-bar.d.ts.map +1 -1
  41. package/dist/src/embed/search.d.ts +6 -1
  42. package/dist/src/embed/search.d.ts.map +1 -1
  43. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  44. package/dist/src/types.d.ts +82 -3
  45. package/dist/src/types.d.ts.map +1 -1
  46. package/dist/tsembed-react.es.js +86 -7
  47. package/dist/tsembed-react.js +86 -7
  48. package/dist/tsembed.es.js +90 -8
  49. package/dist/tsembed.js +90 -8
  50. package/dist/visual-embed-sdk-react-full.d.ts +147 -5
  51. package/dist/visual-embed-sdk-react.d.ts +147 -5
  52. package/dist/visual-embed-sdk.d.ts +147 -5
  53. package/lib/package.json +1 -1
  54. package/lib/src/css-variables.d.ts +38 -0
  55. package/lib/src/css-variables.d.ts.map +1 -1
  56. package/lib/src/embed/app.d.ts +11 -0
  57. package/lib/src/embed/app.d.ts.map +1 -1
  58. package/lib/src/embed/app.js +2 -1
  59. package/lib/src/embed/app.js.map +1 -1
  60. package/lib/src/embed/app.spec.js +10 -0
  61. package/lib/src/embed/app.spec.js.map +1 -1
  62. package/lib/src/embed/base.d.ts +4 -1
  63. package/lib/src/embed/base.d.ts.map +1 -1
  64. package/lib/src/embed/base.js +4 -1
  65. package/lib/src/embed/base.js.map +1 -1
  66. package/lib/src/embed/search-bar.d.ts +6 -0
  67. package/lib/src/embed/search-bar.d.ts.map +1 -1
  68. package/lib/src/embed/search-bar.js +6 -3
  69. package/lib/src/embed/search-bar.js.map +1 -1
  70. package/lib/src/embed/search.d.ts +6 -1
  71. package/lib/src/embed/search.d.ts.map +1 -1
  72. package/lib/src/embed/search.js +5 -2
  73. package/lib/src/embed/search.js.map +1 -1
  74. package/lib/src/embed/search.spec.js +34 -0
  75. package/lib/src/embed/search.spec.js.map +1 -1
  76. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  77. package/lib/src/embed/ts-embed.js +4 -0
  78. package/lib/src/embed/ts-embed.js.map +1 -1
  79. package/lib/src/embed/ts-embed.spec.js +82 -2
  80. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  81. package/lib/src/types.d.ts +82 -3
  82. package/lib/src/types.d.ts.map +1 -1
  83. package/lib/src/types.js +69 -1
  84. package/lib/src/types.js.map +1 -1
  85. package/lib/src/visual-embed-sdk.d.ts +147 -5
  86. package/package.json +1 -1
  87. package/src/css-variables.ts +47 -0
  88. package/src/embed/app.spec.ts +15 -0
  89. package/src/embed/app.ts +13 -0
  90. package/src/embed/base.ts +4 -1
  91. package/src/embed/search-bar.tsx +19 -6
  92. package/src/embed/search.spec.ts +43 -0
  93. package/src/embed/search.ts +13 -2
  94. package/src/embed/ts-embed.spec.ts +92 -2
  95. package/src/embed/ts-embed.ts +3 -0
  96. package/src/types.ts +82 -1
  97. package/lib/src/.index.d.ts.swp +0 -0
@@ -23,6 +23,13 @@ export interface CustomCssVariables {
23
23
  */
24
24
  '--ts-var-root-text-transform'?: string;
25
25
 
26
+ /**
27
+ * application color, it replaces #2770EF which is rd-color(blue,base) and
28
+ * its similar colors like rd-color(blue,60), rd-color(accent, base) and
29
+ * rd-color(text, accent) in the app.
30
+ */
31
+ '--ts-var-application-color'?: string;
32
+
26
33
  /**
27
34
  * Background color of the top navigation panel.
28
35
  */
@@ -345,6 +352,11 @@ export interface CustomCssVariables {
345
352
  */
346
353
  '--ts-var-menu--hover-background'?: string;
347
354
 
355
+ /**
356
+ * Text color for selected menu items.
357
+ */
358
+ '--ts-var-menu-selected-text-color'?: string;
359
+
348
360
  /**
349
361
  * Background color of the dialogs.
350
362
  */
@@ -369,4 +381,39 @@ export interface CustomCssVariables {
369
381
  * Background color of the footer area on dialogs.
370
382
  */
371
383
  '--ts-var-dialog-footer-background'?: string;
384
+
385
+ /**
386
+ * Background for selected state in list
387
+ */
388
+ '--ts-var-list-selected-background'?: string;
389
+
390
+ /**
391
+ * Background for hover state in list
392
+ */
393
+ '--ts-var-list-hover-background'?: string;
394
+
395
+ /**
396
+ * Background for hover state in segment control.
397
+ */
398
+ '--ts-var-segment-control-hover-background'?: string;
399
+
400
+ /**
401
+ * Text color for slected item in modular home's watchlist.
402
+ */
403
+ '--ts-var-home-watchlist-selected-text-color'?: string;
404
+
405
+ /**
406
+ * Text color for favorite carousel find your favorites card in modular home.
407
+ */
408
+ '--ts-var-home-favorite-suggestion-card-text-color'?: string;
409
+
410
+ /**
411
+ * Icon color for favorite carousel find your favorites card in modular home.
412
+ */
413
+ '--ts-var-home-favorite-suggestion-card-icon-color'?: string;
414
+
415
+ /**
416
+ * Background for favorite carousel find your favorites card in modular home.
417
+ */
418
+ '--ts-var-home-favorite-suggestion-card-background'?: string;
372
419
  }
@@ -284,6 +284,21 @@ describe('App embed tests', () => {
284
284
  });
285
285
  });
286
286
 
287
+ test('Should add hideHomepageLeftNav flag to the iframe src', async () => {
288
+ const appEmbed = new AppEmbed(getRootEl(), {
289
+ ...defaultViewConfig,
290
+ hideHomepageLeftNav: false,
291
+ } as AppViewConfig);
292
+
293
+ appEmbed.render();
294
+ await executeAfterWait(() => {
295
+ expectUrlMatchesWithParams(
296
+ getIFrameSrc(),
297
+ `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=false&hideHomepageLeftNav=false${defaultParams}${defaultParamsPost}#/home`,
298
+ );
299
+ });
300
+ });
301
+
287
302
  test('should register event handlers to adjust iframe height', async () => {
288
303
  const onSpy = jest.spyOn(AppEmbed.prototype, 'on')
289
304
  .mockImplementation((event, callback) => {
package/src/embed/app.ts CHANGED
@@ -59,8 +59,19 @@ export interface AppViewConfig extends ViewConfig {
59
59
  /**
60
60
  * If true, the main navigation bar within the ThoughtSpot app
61
61
  * is displayed. By default, the navigation bar is hidden.
62
+ * This flag also control the homepage left nav-bar.
62
63
  */
63
64
  showPrimaryNavbar?: boolean;
65
+ /**
66
+ * Flag to control Homepage Left Nav Bar
67
+ * If showPrimaryNavbar is true, ie navigation bar(Global nav-bar) and Homepage left
68
+ * nav-bar is visible, this flag will only hide the homepage left nav.
69
+ * Precedence of showPrimaryNavbar flag > hideHomepageLeftNav flag.
70
+ *
71
+ * @default false
72
+ * @version SDK: 1.27.0 | Thoughtspot: 9.8.0.cl
73
+ */
74
+ hideHomepageLeftNav?: boolean;
64
75
  /**
65
76
  * If true, help and profile buttons will hide on NavBar. By default,
66
77
  * they are shown.
@@ -183,6 +194,7 @@ export class AppEmbed extends V1Embed {
183
194
  enableSearchAssist,
184
195
  fullHeight,
185
196
  dataPanelV2 = false,
197
+ hideHomepageLeftNav = false,
186
198
  modularHomeExperience = false,
187
199
  } = this.viewConfig;
188
200
 
@@ -214,6 +226,7 @@ export class AppEmbed extends V1Embed {
214
226
  }
215
227
 
216
228
  params[Param.DataPanelV2Enabled] = dataPanelV2;
229
+ params[Param.HideHomepageLeftNav] = hideHomepageLeftNav;
217
230
  params[Param.ModularHomeExperienceEnabled] = modularHomeExperience;
218
231
  const queryParams = getQueryParamString(params, true);
219
232
 
package/src/embed/base.ts CHANGED
@@ -258,6 +258,7 @@ export const renderInQueue = (fn: (next?: (val?: any) => void) => Promise<any>):
258
258
 
259
259
  /**
260
260
  * Imports TML representation of the metadata objects into ThoughtSpot.
261
+ *
261
262
  * @param data
262
263
  * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
263
264
  */
@@ -305,7 +306,9 @@ export const executeTML = async (data: executeTMLInput): Promise<any> => {
305
306
  };
306
307
 
307
308
  /**
308
- * Exports TML representation of the metadata objects from ThoughtSpot in JSON or YAML format.
309
+ * Exports TML representation of the metadata objects from ThoughtSpot in JSON or YAML
310
+ * format.
311
+ *
309
312
  * @param data
310
313
  * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
311
314
  */
@@ -1,6 +1,4 @@
1
- import {
2
- DOMSelector, Param, Action, ViewConfig,
3
- } from '../types';
1
+ import { Param, ViewConfig } from '../types';
4
2
  import { getQueryParamString } from '../utils';
5
3
  import { TsEmbed } from './ts-embed';
6
4
  import { SearchOptions } from './search';
@@ -8,7 +6,8 @@ import { SearchOptions } from './search';
8
6
  /**
9
7
  * @group Embed components
10
8
  */
11
- export interface SearchBarViewConfig extends Omit<ViewConfig, 'runtimeFilters' | 'showAlerts' | 'dataPanelV2'> {
9
+ export interface SearchBarViewConfig
10
+ extends Omit<ViewConfig, 'runtimeFilters' | 'showAlerts' | 'dataPanelV2'> {
12
11
  /**
13
12
  * The array of data source GUIDs to set on load.
14
13
  * Only a single dataSource supported currently.
@@ -22,6 +21,12 @@ export interface SearchBarViewConfig extends Omit<ViewConfig, 'runtimeFilters' |
22
21
  * @version: SDK: 1.19.0
23
22
  */
24
23
  dataSource?: string;
24
+ /**
25
+ * Flag to set if last selected dataSource should be used
26
+ *
27
+ * @version: SDK: 1.24.0
28
+ */
29
+ useLastSelectedSources?: boolean;
25
30
  /**
26
31
  * Configuration for search options
27
32
  */
@@ -52,7 +57,12 @@ export class SearchBarEmbed extends TsEmbed {
52
57
  * @param dataSources A list of data source GUIDs
53
58
  */
54
59
  private getIFrameSrc() {
55
- const { searchOptions, dataSource, dataSources } = this.viewConfig;
60
+ const {
61
+ searchOptions,
62
+ dataSource,
63
+ dataSources,
64
+ useLastSelectedSources = false,
65
+ } = this.viewConfig;
56
66
  const path = 'search-bar-embed';
57
67
  const queryParams = this.getBaseQueryParams();
58
68
 
@@ -74,7 +84,10 @@ export class SearchBarEmbed extends TsEmbed {
74
84
  }
75
85
  }
76
86
 
77
- queryParams[Param.UseLastSelectedDataSource] = false;
87
+ queryParams[Param.UseLastSelectedDataSource] = useLastSelectedSources;
88
+ if (dataSource || dataSources) {
89
+ queryParams[Param.UseLastSelectedDataSource] = false;
90
+ }
78
91
  queryParams[Param.searchEmbed] = true;
79
92
  let query = '';
80
93
  const queryParamsString = getQueryParamString(queryParams, true);
@@ -350,4 +350,47 @@ describe('Search embed tests', () => {
350
350
  );
351
351
  });
352
352
  });
353
+ test('should set useLastSelectedSources to true if useLastSelectedSources flag is true', async () => {
354
+ const searchEmbed = new SearchEmbed(getRootEl(), {
355
+ ...defaultViewConfig,
356
+ useLastSelectedSources: true,
357
+ });
358
+ searchEmbed.render();
359
+ await executeAfterWait(() => {
360
+ expectUrlMatchesWithParams(
361
+ getIFrameSrc(),
362
+ `http://${thoughtSpotHost}/v2/?${defaultParamsWithHiddenActions}&dataSourceMode=expand&enableDataPanelV2=false&useLastSelectedSources=true${prefixParams}#/embed/saved-answer/${answerId}`,
363
+ );
364
+ });
365
+ });
366
+ test('should set useLastSelectedSources to false if datasource is given irrespective of useLastSelectedSources', async () => {
367
+ const dataSource = 'data-source-1';
368
+ const searchEmbed = new SearchEmbed(getRootEl(), {
369
+ ...defaultViewConfig,
370
+ useLastSelectedSources: true,
371
+ dataSource,
372
+ });
373
+ searchEmbed.render();
374
+ await executeAfterWait(() => {
375
+ expectUrlMatchesWithParams(
376
+ getIFrameSrc(),
377
+ `http://${thoughtSpotHost}/v2/?${defaultParamsWithHiddenActions}&dataSources=[%22data-source-1%22]&dataSourceMode=expand&enableDataPanelV2=false&useLastSelectedSources=false${prefixParams}#/embed/saved-answer/${answerId}`,
378
+ );
379
+ });
380
+ });
381
+ test('should set useLastSelectedSources to false if datasources are given irrespective of useLastSelectedSources', async () => {
382
+ const dataSources = ['data-source-1'];
383
+ const searchEmbed = new SearchEmbed(getRootEl(), {
384
+ ...defaultViewConfig,
385
+ useLastSelectedSources: true,
386
+ dataSources,
387
+ });
388
+ searchEmbed.render();
389
+ await executeAfterWait(() => {
390
+ expectUrlMatchesWithParams(
391
+ getIFrameSrc(),
392
+ `http://${thoughtSpotHost}/v2/?${defaultParamsWithHiddenActions}&dataSources=[%22data-source-1%22]&dataSourceMode=expand&enableDataPanelV2=false&useLastSelectedSources=false${prefixParams}#/embed/saved-answer/${answerId}`,
393
+ );
394
+ });
395
+ });
353
396
  });
@@ -110,9 +110,14 @@ export interface SearchViewConfig extends ViewConfig {
110
110
  *
111
111
  * @default false
112
112
  * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
113
- * @hidden
114
113
  */
115
114
  dataPanelV2?: boolean;
115
+ /**
116
+ * Flag to set if last selected dataSource should be used
117
+ *
118
+ * @version: SDK: 1.24.0
119
+ */
120
+ useLastSelectedSources?: boolean;
116
121
  }
117
122
 
118
123
  export const HiddenActionItemByDefaultForSearchEmbed = [
@@ -166,6 +171,7 @@ export class SearchEmbed extends TsEmbed {
166
171
  dataSources,
167
172
  excludeRuntimeFiltersfromURL,
168
173
  dataPanelV2 = false,
174
+ useLastSelectedSources = false,
169
175
  } = this.viewConfig;
170
176
  const queryParams = this.getBaseQueryParams();
171
177
 
@@ -201,7 +207,12 @@ export class SearchEmbed extends TsEmbed {
201
207
 
202
208
  queryParams[Param.DataPanelV2Enabled] = dataPanelV2;
203
209
  queryParams[Param.DataSourceMode] = this.getDataSourceMode();
204
- queryParams[Param.UseLastSelectedDataSource] = false;
210
+
211
+ queryParams[Param.UseLastSelectedDataSource] = useLastSelectedSources;
212
+ if (dataSource || dataSources) {
213
+ queryParams[Param.UseLastSelectedDataSource] = false;
214
+ }
215
+
205
216
  queryParams[Param.searchEmbed] = true;
206
217
  let query = '';
207
218
  const queryParamsString = getQueryParamString(queryParams, true);
@@ -9,7 +9,13 @@ import {
9
9
  AppEmbed,
10
10
  LiveboardEmbed,
11
11
  } from '../index';
12
- import { Action, RuntimeFilter, RuntimeFilterOp } from '../types';
12
+ import {
13
+ Action,
14
+ HomeLeftNavItem,
15
+ RuntimeFilter,
16
+ RuntimeFilterOp,
17
+ HomepageModule,
18
+ } from '../types';
13
19
  import {
14
20
  executeAfterWait,
15
21
  getDocumentBody,
@@ -101,7 +107,13 @@ describe('Unit test case for ts embed', () => {
101
107
  });
102
108
  expect(mockPort.postMessage).toHaveBeenCalledWith({
103
109
  type: EmbedEvent.APP_INIT,
104
- data: { customisations, authToken: '', runtimeFilterParams: null },
110
+ data: {
111
+ customisations,
112
+ authToken: '',
113
+ runtimeFilterParams: null,
114
+ hiddenHomeLeftNavItems: [],
115
+ hiddenHomepageModules: [],
116
+ },
105
117
  });
106
118
  });
107
119
 
@@ -128,6 +140,8 @@ describe('Unit test case for ts embed', () => {
128
140
  customisations: customisationsView,
129
141
  authToken: '',
130
142
  runtimeFilterParams: null,
143
+ hiddenHomeLeftNavItems: [],
144
+ hiddenHomepageModules: [],
131
145
  },
132
146
  });
133
147
  expect(getIFrameSrc()).toContain(
@@ -135,6 +149,42 @@ describe('Unit test case for ts embed', () => {
135
149
  );
136
150
  });
137
151
 
152
+ test('hide home page modules from view Config should be part of app_init payload', async () => {
153
+ const mockEmbedEventPayload = {
154
+ type: EmbedEvent.APP_INIT,
155
+ data: {},
156
+ };
157
+ const mockedHiddenHomepageModules: HomepageModule[] = [
158
+ HomepageModule.MyLibrary,
159
+ HomepageModule.Learning,
160
+ ];
161
+
162
+ const searchEmbed = new SearchEmbed(getRootEl(), {
163
+ ...defaultViewConfig,
164
+ hiddenHomepageModules: mockedHiddenHomepageModules,
165
+ });
166
+ searchEmbed.render();
167
+ const mockPort: any = {
168
+ postMessage: jest.fn(),
169
+ };
170
+ await executeAfterWait(() => {
171
+ const iframe = getIFrameEl();
172
+ postMessageToParent(iframe.contentWindow, mockEmbedEventPayload, mockPort);
173
+ });
174
+ expect(mockPort.postMessage).toHaveBeenCalledWith({
175
+ type: EmbedEvent.APP_INIT,
176
+ data: {
177
+ customisations,
178
+ authToken: '',
179
+ hostConfig: undefined,
180
+ runtimeFilterParams: null,
181
+ hiddenHomeLeftNavItems: [],
182
+ hiddenHomepageModules: [HomepageModule.MyLibrary,
183
+ HomepageModule.Learning],
184
+ },
185
+ });
186
+ });
187
+
138
188
  test('Runtime filters from view Config should be part of app_init payload', async () => {
139
189
  const mockEmbedEventPayload = {
140
190
  type: EmbedEvent.APP_INIT,
@@ -166,6 +216,44 @@ describe('Unit test case for ts embed', () => {
166
216
  customisations,
167
217
  authToken: '',
168
218
  runtimeFilterParams: 'col1=color&op1=EQ&val1=blue',
219
+ hiddenHomeLeftNavItems: [],
220
+ hiddenHomepageModules: [],
221
+ },
222
+ });
223
+ });
224
+
225
+ test('homeLeftNav from view Config should be part of app_init payload', async () => {
226
+ const mockEmbedEventPayload = {
227
+ type: EmbedEvent.APP_INIT,
228
+ data: {},
229
+ };
230
+ const mockedHiddenHomeLeftNavItems: HomeLeftNavItem[] = [
231
+ HomeLeftNavItem.Home,
232
+ HomeLeftNavItem.Documentation,
233
+ ];
234
+
235
+ const searchEmbed = new SearchEmbed(getRootEl(), {
236
+ ...defaultViewConfig,
237
+ hiddenHomeLeftNavItems: mockedHiddenHomeLeftNavItems,
238
+ });
239
+ searchEmbed.render();
240
+ const mockPort: any = {
241
+ postMessage: jest.fn(),
242
+ };
243
+ await executeAfterWait(() => {
244
+ const iframe = getIFrameEl();
245
+ postMessageToParent(iframe.contentWindow, mockEmbedEventPayload, mockPort);
246
+ });
247
+ expect(mockPort.postMessage).toHaveBeenCalledWith({
248
+ type: EmbedEvent.APP_INIT,
249
+ data: {
250
+ customisations,
251
+ authToken: '',
252
+ hostConfig: undefined,
253
+ runtimeFilterParams: null,
254
+ hiddenHomeLeftNavItems: [HomeLeftNavItem.Home,
255
+ HomeLeftNavItem.Documentation],
256
+ hiddenHomepageModules: [],
169
257
  },
170
258
  });
171
259
  });
@@ -319,6 +407,8 @@ describe('Unit test case for ts embed', () => {
319
407
  customisations,
320
408
  authToken: 'test_auth_token1',
321
409
  runtimeFilterParams: null,
410
+ hiddenHomeLeftNavItems: [],
411
+ hiddenHomepageModules: [],
322
412
  },
323
413
  });
324
414
  });
@@ -273,7 +273,10 @@ export class TsEmbed {
273
273
  customisations: getCustomisations(this.embedConfig, this.viewConfig),
274
274
  authToken,
275
275
  runtimeFilterParams: getRuntimeFilters(this.viewConfig.runtimeFilters),
276
+ hiddenHomepageModules: this.viewConfig.hiddenHomepageModules || [],
276
277
  hostConfig: this.embedConfig.hostConfig,
278
+ hiddenHomeLeftNavItems: this.viewConfig?.hiddenHomeLeftNavItems
279
+ ? this.viewConfig?.hiddenHomeLeftNavItems : [],
277
280
  },
278
281
  });
279
282
  };
package/src/types.ts CHANGED
@@ -178,6 +178,16 @@ export enum AuthType {
178
178
  Basic = 'Basic',
179
179
  }
180
180
 
181
+ export enum HomeLeftNavItem {
182
+ Home = 'insights-home',
183
+ Liveboards = 'liveboards',
184
+ Answers = 'answers',
185
+ MonitorSubscription = 'monitor-alerts',
186
+ SpotIQAnalysis = 'spotiq-analysis',
187
+ Tutorials = 'tutorials',
188
+ Documentation = 'documentation',
189
+ Community = 'community',
190
+ }
181
191
  export type DOMSelector = string | HTMLElement;
182
192
 
183
193
  /**
@@ -723,6 +733,12 @@ export interface ViewConfig {
723
733
  * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
724
734
  */
725
735
  hiddenTabs?: string[];
736
+ /**
737
+ * Hide the home page modules
738
+ * eg: hiddenHomepageModules = [HomepageModule.MyLibrary]
739
+ * @version SDK: 1.27.0 | Thoughtspot: 9.8.0.cl
740
+ */
741
+ hiddenHomepageModules?: HomepageModule[];
726
742
  /**
727
743
  * The list of tab IDs to show in the embedded.
728
744
  * Only this Tabs will be shown in their respective LBs.
@@ -742,6 +758,14 @@ export interface ViewConfig {
742
758
  * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
743
759
  */
744
760
  visibleTabs?: string[];
761
+ /**
762
+ * homepageLeftNavItems : show/hide Homeapage Left Nav Bar Items
763
+ * There are 8 home nav list items, we will send those item as list
764
+ * which we want to hide for TSE.
765
+ * eg: hiddenHomeLeftNavItems = [HomeLeftNavItem.Home] to hide home.
766
+ * @version SDK: 1.27.0 | Thoughtspot: 9.8.0.cl
767
+ */
768
+ hiddenHomeLeftNavItems?: HomeLeftNavItem[];
745
769
  }
746
770
 
747
771
  /**
@@ -866,6 +890,37 @@ export enum RuntimeFilterOp {
866
890
  IN = 'IN',
867
891
  }
868
892
 
893
+ /**
894
+ * Home page module that can be hide
895
+ */
896
+ // eslint-disable-next-line no-shadow
897
+ export enum HomepageModule {
898
+ /**
899
+ * Search bar
900
+ */
901
+ Search = 'search',
902
+ /**
903
+ * kPI watchlist module
904
+ */
905
+ Watchlist = 'watchlist',
906
+ /**
907
+ * favorite objects
908
+ */
909
+ Favorite = 'favorite',
910
+ /**
911
+ * List of answers and liveboards
912
+ */
913
+ MyLibrary = 'mylibrary',
914
+ /**
915
+ * Trending list
916
+ */
917
+ Trending = 'trending',
918
+ /**
919
+ * Learning videos
920
+ */
921
+ Learning = 'learning',
922
+ }
923
+
869
924
  /**
870
925
  * A filter that can be applied to ThoughtSpot answers, Liveboards, or
871
926
  * visualizations at runtime.
@@ -1329,6 +1384,12 @@ export enum EmbedEvent {
1329
1384
  * @version SDK : 1.27.0 | Thoughtspot: 9.7.0.cl
1330
1385
  */
1331
1386
  SageWorksheetUpdated = 'sageWorksheetUpdated',
1387
+ /**
1388
+ * Emitten when a user updates a connection in Data tab
1389
+ *
1390
+ * @version SDK : 1.27.0 | Thoughtspot: 9.8.0.cl
1391
+ */
1392
+ UpdateConnection = 'updateConnection',
1332
1393
  }
1333
1394
 
1334
1395
  /**
@@ -2139,6 +2200,7 @@ export enum Param {
2139
2200
  HideSampleQuestions = 'hideSampleQuestions',
2140
2201
  WorksheetId = 'worksheet',
2141
2202
  Query = 'query',
2203
+ HideHomepageLeftNav = 'hideHomepageLeftNav',
2142
2204
  ModularHomeExperienceEnabled = 'modularHomeExperience',
2143
2205
  }
2144
2206
 
@@ -2645,7 +2707,7 @@ export enum Action {
2645
2707
  * disabledActions: [Action.QueryDetailsButtons]
2646
2708
  * ```
2647
2709
  */
2648
- QueryDetailsButtons = 'QueryDetailsButtons',
2710
+ QueryDetailsButtons = 'queryDetailsButtons',
2649
2711
  /**
2650
2712
  * The **Delete** action for Answers.
2651
2713
  *
@@ -2950,6 +3012,25 @@ export enum Action {
2950
3012
  * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
2951
3013
  */
2952
3014
  ModifySageAnswer = 'modifySageAnswer',
3015
+ /**
3016
+ * The **Move to Tab** menu action on visualizations in liveboard edit mode.
3017
+ * Allows moving a visualization to a different tab.
3018
+ *
3019
+ * @example
3020
+ * ```js
3021
+ * disabledActions: [Action.MoveToTab]
3022
+ * ```
3023
+ */
3024
+ MoveToTab = 'onContainerMove',
3025
+ /**
3026
+ * The **Manage Alertsb** menu action on KPI visualizations.
3027
+ *
3028
+ * @example
3029
+ * ```js
3030
+ * disabledActions: [Action.ManageMonitor]
3031
+ * ```
3032
+ */
3033
+ ManageMonitor = 'ManageMonitor',
2953
3034
  }
2954
3035
 
2955
3036
  export interface SessionInterface {
Binary file