@thoughtspot/visual-embed-sdk 1.33.2 → 1.33.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 (166) 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 +5 -2
  5. package/cjs/src/auth.js.map +1 -1
  6. package/cjs/src/auth.spec.js +15 -3
  7. package/cjs/src/auth.spec.js.map +1 -1
  8. package/cjs/src/css-variables.d.ts +2 -2
  9. package/cjs/src/embed/app.d.ts +20 -6
  10. package/cjs/src/embed/app.d.ts.map +1 -1
  11. package/cjs/src/embed/app.js +3 -2
  12. package/cjs/src/embed/app.js.map +1 -1
  13. package/cjs/src/embed/app.spec.js +10 -0
  14. package/cjs/src/embed/app.spec.js.map +1 -1
  15. package/cjs/src/embed/base.spec.js +13 -1
  16. package/cjs/src/embed/base.spec.js.map +1 -1
  17. package/cjs/src/embed/conversation.d.ts.map +1 -1
  18. package/cjs/src/embed/conversation.js +4 -0
  19. package/cjs/src/embed/conversation.js.map +1 -1
  20. package/cjs/src/embed/conversation.spec.js +13 -0
  21. package/cjs/src/embed/conversation.spec.js.map +1 -1
  22. package/cjs/src/embed/liveboard.d.ts +0 -3
  23. package/cjs/src/embed/liveboard.d.ts.map +1 -1
  24. package/cjs/src/embed/liveboard.js +1 -2
  25. package/cjs/src/embed/liveboard.js.map +1 -1
  26. package/cjs/src/embed/liveboard.spec.js +2 -2
  27. package/cjs/src/embed/liveboard.spec.js.map +1 -1
  28. package/cjs/src/embed/search.js +1 -1
  29. package/cjs/src/embed/search.js.map +1 -1
  30. package/cjs/src/embed/search.spec.js +6 -6
  31. package/cjs/src/embed/search.spec.js.map +1 -1
  32. package/cjs/src/embed/ts-embed.spec.js +1 -1
  33. package/cjs/src/errors.d.ts +1 -0
  34. package/cjs/src/errors.d.ts.map +1 -1
  35. package/cjs/src/errors.js +10 -9
  36. package/cjs/src/errors.js.map +1 -1
  37. package/cjs/src/react/index.spec.js +1 -1
  38. package/cjs/src/react/index.spec.js.map +1 -1
  39. package/cjs/src/tokenizedFetch.d.ts +0 -1
  40. package/cjs/src/tokenizedFetch.d.ts.map +1 -1
  41. package/cjs/src/tokenizedFetch.js +0 -1
  42. package/cjs/src/tokenizedFetch.js.map +1 -1
  43. package/cjs/src/types.d.ts +40 -22
  44. package/cjs/src/types.d.ts.map +1 -1
  45. package/cjs/src/types.js +35 -17
  46. package/cjs/src/types.js.map +1 -1
  47. package/cjs/src/utils/processData.d.ts.map +1 -1
  48. package/cjs/src/utils/processData.js +0 -1
  49. package/cjs/src/utils/processData.js.map +1 -1
  50. package/cjs/src/utils/sessionInfoService.d.ts +0 -4
  51. package/cjs/src/utils/sessionInfoService.d.ts.map +1 -1
  52. package/cjs/src/utils/sessionInfoService.js +0 -4
  53. package/cjs/src/utils/sessionInfoService.js.map +1 -1
  54. package/cjs/src/utils.d.ts +1 -0
  55. package/cjs/src/utils.d.ts.map +1 -1
  56. package/cjs/src/utils.js +13 -3
  57. package/cjs/src/utils.js.map +1 -1
  58. package/cjs/src/utils.spec.js +6 -6
  59. package/cjs/src/utils.spec.js.map +1 -1
  60. package/dist/{index-CqrIh3Vj.js → index-Cl8Rsh6W.js} +1 -1
  61. package/dist/src/auth.d.ts.map +1 -1
  62. package/dist/src/css-variables.d.ts +2 -2
  63. package/dist/src/embed/app.d.ts +20 -6
  64. package/dist/src/embed/app.d.ts.map +1 -1
  65. package/dist/src/embed/conversation.d.ts.map +1 -1
  66. package/dist/src/embed/liveboard.d.ts +0 -3
  67. package/dist/src/embed/liveboard.d.ts.map +1 -1
  68. package/dist/src/errors.d.ts +1 -0
  69. package/dist/src/errors.d.ts.map +1 -1
  70. package/dist/src/tokenizedFetch.d.ts +0 -1
  71. package/dist/src/tokenizedFetch.d.ts.map +1 -1
  72. package/dist/src/types.d.ts +40 -22
  73. package/dist/src/types.d.ts.map +1 -1
  74. package/dist/src/utils/processData.d.ts.map +1 -1
  75. package/dist/src/utils/sessionInfoService.d.ts +0 -4
  76. package/dist/src/utils/sessionInfoService.d.ts.map +1 -1
  77. package/dist/src/utils.d.ts +1 -0
  78. package/dist/src/utils.d.ts.map +1 -1
  79. package/dist/tsembed-react.es.js +72 -42
  80. package/dist/tsembed-react.js +71 -41
  81. package/dist/tsembed.es.js +72 -42
  82. package/dist/tsembed.js +71 -41
  83. package/dist/visual-embed-sdk-react-full.d.ts +62 -38
  84. package/dist/visual-embed-sdk-react.d.ts +62 -38
  85. package/dist/visual-embed-sdk.d.ts +62 -38
  86. package/lib/package.json +1 -1
  87. package/lib/src/auth.d.ts.map +1 -1
  88. package/lib/src/auth.js +6 -3
  89. package/lib/src/auth.js.map +1 -1
  90. package/lib/src/auth.spec.js +15 -3
  91. package/lib/src/auth.spec.js.map +1 -1
  92. package/lib/src/css-variables.d.ts +2 -2
  93. package/lib/src/embed/app.d.ts +20 -6
  94. package/lib/src/embed/app.d.ts.map +1 -1
  95. package/lib/src/embed/app.js +3 -2
  96. package/lib/src/embed/app.js.map +1 -1
  97. package/lib/src/embed/app.spec.js +10 -0
  98. package/lib/src/embed/app.spec.js.map +1 -1
  99. package/lib/src/embed/base.spec.js +13 -1
  100. package/lib/src/embed/base.spec.js.map +1 -1
  101. package/lib/src/embed/conversation.d.ts.map +1 -1
  102. package/lib/src/embed/conversation.js +4 -0
  103. package/lib/src/embed/conversation.js.map +1 -1
  104. package/lib/src/embed/conversation.spec.js +13 -0
  105. package/lib/src/embed/conversation.spec.js.map +1 -1
  106. package/lib/src/embed/liveboard.d.ts +0 -3
  107. package/lib/src/embed/liveboard.d.ts.map +1 -1
  108. package/lib/src/embed/liveboard.js +1 -2
  109. package/lib/src/embed/liveboard.js.map +1 -1
  110. package/lib/src/embed/liveboard.spec.js +2 -2
  111. package/lib/src/embed/liveboard.spec.js.map +1 -1
  112. package/lib/src/embed/search.js +1 -1
  113. package/lib/src/embed/search.js.map +1 -1
  114. package/lib/src/embed/search.spec.js +6 -6
  115. package/lib/src/embed/search.spec.js.map +1 -1
  116. package/lib/src/embed/ts-embed.spec.js +1 -1
  117. package/lib/src/errors.d.ts +1 -0
  118. package/lib/src/errors.d.ts.map +1 -1
  119. package/lib/src/errors.js +10 -9
  120. package/lib/src/errors.js.map +1 -1
  121. package/lib/src/react/index.spec.js +1 -1
  122. package/lib/src/react/index.spec.js.map +1 -1
  123. package/lib/src/tokenizedFetch.d.ts +0 -1
  124. package/lib/src/tokenizedFetch.d.ts.map +1 -1
  125. package/lib/src/tokenizedFetch.js +0 -1
  126. package/lib/src/tokenizedFetch.js.map +1 -1
  127. package/lib/src/types.d.ts +40 -22
  128. package/lib/src/types.d.ts.map +1 -1
  129. package/lib/src/types.js +35 -17
  130. package/lib/src/types.js.map +1 -1
  131. package/lib/src/utils/processData.d.ts.map +1 -1
  132. package/lib/src/utils/processData.js +0 -1
  133. package/lib/src/utils/processData.js.map +1 -1
  134. package/lib/src/utils/sessionInfoService.d.ts +0 -4
  135. package/lib/src/utils/sessionInfoService.d.ts.map +1 -1
  136. package/lib/src/utils/sessionInfoService.js +0 -4
  137. package/lib/src/utils/sessionInfoService.js.map +1 -1
  138. package/lib/src/utils.d.ts +1 -0
  139. package/lib/src/utils.d.ts.map +1 -1
  140. package/lib/src/utils.js +11 -2
  141. package/lib/src/utils.js.map +1 -1
  142. package/lib/src/utils.spec.js +6 -6
  143. package/lib/src/utils.spec.js.map +1 -1
  144. package/lib/src/visual-embed-sdk.d.ts +62 -38
  145. package/package.json +1 -1
  146. package/src/auth.spec.ts +15 -3
  147. package/src/auth.ts +7 -3
  148. package/src/css-variables.ts +2 -2
  149. package/src/embed/app.spec.ts +15 -0
  150. package/src/embed/app.ts +23 -7
  151. package/src/embed/base.spec.ts +13 -1
  152. package/src/embed/conversation.spec.ts +16 -0
  153. package/src/embed/conversation.ts +4 -0
  154. package/src/embed/liveboard.spec.ts +2 -2
  155. package/src/embed/liveboard.ts +1 -4
  156. package/src/embed/search.spec.ts +6 -6
  157. package/src/embed/search.ts +1 -1
  158. package/src/embed/ts-embed.spec.ts +1 -1
  159. package/src/errors.ts +10 -9
  160. package/src/react/index.spec.tsx +1 -1
  161. package/src/tokenizedFetch.ts +0 -1
  162. package/src/types.ts +38 -20
  163. package/src/utils/processData.ts +0 -1
  164. package/src/utils/sessionInfoService.ts +0 -4
  165. package/src/utils.spec.ts +6 -6
  166. package/src/utils.ts +14 -2
@@ -67,7 +67,7 @@ describe('Liveboard/viz embed tests', () => {
67
67
  });
68
68
  });
69
69
 
70
- test('should render liveboard with data panel v2 flag set to true by default', async () => {
70
+ test('should render liveboard with data panel v2 flag set to false by default', async () => {
71
71
  const liveboardEmbed = new LiveboardEmbed(getRootEl(), {
72
72
  ...defaultViewConfig,
73
73
  liveboardId,
@@ -76,7 +76,7 @@ describe('Liveboard/viz embed tests', () => {
76
76
  await executeAfterWait(() => {
77
77
  expectUrlMatchesWithParams(
78
78
  getIFrameSrc(),
79
- `http://${thoughtSpotHost}/?embedApp=true${defaultParams}${prefixParams}&enableDataPanelV2=true#/embed/viz/${liveboardId}`,
79
+ `http://${thoughtSpotHost}/?embedApp=true${defaultParams}${prefixParams}&enableDataPanelV2=false#/embed/viz/${liveboardId}`,
80
80
  );
81
81
  });
82
82
  });
@@ -270,7 +270,6 @@ export interface LiveboardViewConfig
270
270
  *
271
271
  * Since, this will show preview images, be careful that it may show
272
272
  * undesired data to the user when using row level security.
273
- *
274
273
  * @example
275
274
  * ```js
276
275
  * const embed = new LiveboardEmbed('#embed-container', {
@@ -280,7 +279,6 @@ export interface LiveboardViewConfig
280
279
  * });
281
280
  * embed.render();
282
281
  * ```
283
- *
284
282
  * @version SDK: 1.32.0 | ThoughtSpot: 10.0.0.cl
285
283
  */
286
284
  showPreviewLoader?: boolean;
@@ -385,7 +383,7 @@ export class LiveboardEmbed extends V1Embed {
385
383
  showLiveboardReverifyBanner = true,
386
384
  enableAskSage,
387
385
  enable2ColumnLayout,
388
- dataPanelV2 = true,
386
+ dataPanelV2 = false,
389
387
  enableCustomColumnGroups = false,
390
388
  } = this.viewConfig;
391
389
 
@@ -613,7 +611,6 @@ export class LiveboardEmbed extends V1Embed {
613
611
  /**
614
612
  * Returns the full url of the liveboard/viz which can be used to open
615
613
  * this liveboard inside the full Thoughtspot application in a new tab.
616
- *
617
614
  * @returns url string
618
615
  */
619
616
  public getLiveboardUrl(): string {
@@ -52,7 +52,7 @@ describe('Search embed tests', () => {
52
52
  await executeAfterWait(() => {
53
53
  expectUrlMatchesWithParams(
54
54
  getIFrameSrc(),
55
- `http://${thoughtSpotHost}/v2/?${defaultParamsWithHiddenActions}&enableDataPanelV2=true&dataSourceMode=expand&useLastSelectedSources=false${prefixParams}#/embed/answer`,
55
+ `http://${thoughtSpotHost}/v2/?${defaultParamsWithHiddenActions}&enableDataPanelV2=false&dataSourceMode=expand&useLastSelectedSources=false${prefixParams}#/embed/answer`,
56
56
  );
57
57
  });
58
58
  });
@@ -438,7 +438,7 @@ describe('Search embed tests', () => {
438
438
  await executeAfterWait(() => {
439
439
  expectUrlMatchesWithParams(
440
440
  getIFrameSrc(),
441
- `http://${thoughtSpotHost}/v2/?${defaultParamsWithHiddenActions}&dataSourceMode=expand&enableDataPanelV2=true&useLastSelectedSources=true${prefixParams}#/embed/saved-answer/${answerId}`,
441
+ `http://${thoughtSpotHost}/v2/?${defaultParamsWithHiddenActions}&dataSourceMode=expand&enableDataPanelV2=false&useLastSelectedSources=true${prefixParams}#/embed/saved-answer/${answerId}`,
442
442
  );
443
443
  });
444
444
  });
@@ -453,7 +453,7 @@ describe('Search embed tests', () => {
453
453
  await executeAfterWait(() => {
454
454
  expectUrlMatchesWithParams(
455
455
  getIFrameSrc(),
456
- `http://${thoughtSpotHost}/v2/?${defaultParamsWithHiddenActions}&dataSources=[%22data-source-1%22]&dataSourceMode=expand&enableDataPanelV2=true&useLastSelectedSources=false${prefixParams}#/embed/saved-answer/${answerId}`,
456
+ `http://${thoughtSpotHost}/v2/?${defaultParamsWithHiddenActions}&dataSources=[%22data-source-1%22]&dataSourceMode=expand&enableDataPanelV2=false&useLastSelectedSources=false${prefixParams}#/embed/saved-answer/${answerId}`,
457
457
  );
458
458
  });
459
459
  });
@@ -468,7 +468,7 @@ describe('Search embed tests', () => {
468
468
  await executeAfterWait(() => {
469
469
  expectUrlMatchesWithParams(
470
470
  getIFrameSrc(),
471
- `http://${thoughtSpotHost}/v2/?${defaultParamsWithHiddenActions}&dataSources=[%22data-source-1%22]&dataSourceMode=expand&enableDataPanelV2=true&useLastSelectedSources=false${prefixParams}#/embed/saved-answer/${answerId}`,
471
+ `http://${thoughtSpotHost}/v2/?${defaultParamsWithHiddenActions}&dataSources=[%22data-source-1%22]&dataSourceMode=expand&enableDataPanelV2=false&useLastSelectedSources=false${prefixParams}#/embed/saved-answer/${answerId}`,
472
472
  );
473
473
  });
474
474
  });
@@ -499,7 +499,7 @@ describe('Search embed tests', () => {
499
499
  await executeAfterWait(() => {
500
500
  expectUrlMatchesWithParams(
501
501
  getIFrameSrc(),
502
- `http://${thoughtSpotHost}/v2/?${defaultParamsWithHiddenActions}&dataSourceMode=expand&enableDataPanelV2=true&useLastSelectedSources=false&hideSearchBar=true${prefixParams}#/embed/saved-answer/${answerId}`,
502
+ `http://${thoughtSpotHost}/v2/?${defaultParamsWithHiddenActions}&dataSourceMode=expand&enableDataPanelV2=false&useLastSelectedSources=false&hideSearchBar=true${prefixParams}#/embed/saved-answer/${answerId}`,
503
503
  );
504
504
  });
505
505
  });
@@ -514,7 +514,7 @@ describe('Search embed tests', () => {
514
514
  await executeAfterWait(() => {
515
515
  expectUrlMatchesWithParams(
516
516
  getIFrameSrc(),
517
- `http://${thoughtSpotHost}/v2/?${defaultParamsWithHiddenActions}&dataSourceMode=expand&enableDataPanelV2=true&useLastSelectedSources=false&dataPanelCustomGroupsAccordionInitialState=EXPAND_FIRST${prefixParams}#/embed/saved-answer/${answerId}`,
517
+ `http://${thoughtSpotHost}/v2/?${defaultParamsWithHiddenActions}&dataSourceMode=expand&enableDataPanelV2=false&useLastSelectedSources=false&dataPanelCustomGroupsAccordionInitialState=EXPAND_FIRST${prefixParams}#/embed/saved-answer/${answerId}`,
518
518
  );
519
519
  });
520
520
  });
@@ -330,7 +330,7 @@ export class SearchEmbed extends TsEmbed {
330
330
  dataSources,
331
331
  excludeRuntimeFiltersfromURL,
332
332
  hideSearchBar,
333
- dataPanelV2 = true,
333
+ dataPanelV2 = false,
334
334
  useLastSelectedSources = false,
335
335
  runtimeParameters,
336
336
  collapseSearchBarInitially = false,
@@ -1615,7 +1615,7 @@ describe('Unit test case for ts embed', () => {
1615
1615
  });
1616
1616
  libEmbed.preRender();
1617
1617
 
1618
- expect(logger.error).toHaveBeenCalledWith('PreRender id is required for preRender');
1618
+ expect(logger.error).toHaveBeenCalledWith('PreRender ID is required for preRender');
1619
1619
  });
1620
1620
 
1621
1621
  it('showPreRender should preRender if not available', async () => {
package/src/errors.ts CHANGED
@@ -1,18 +1,19 @@
1
1
  export const ERROR_MESSAGE = {
2
2
  INVALID_THOUGHTSPOT_HOST: 'Error parsing ThoughtSpot host. Please provide a valid URL.',
3
- LIVEBOARD_VIZ_ID_VALIDATION: 'Please select a liveboard to embed.',
4
- TRIGGER_TIMED_OUT: 'Trigger timedout in getting response',
5
- SEARCHEMBED_BETA_WRANING_MESSAGE: 'Search Embed is in Beta in this release.',
6
- SAGE_EMBED_BETA_WARNING_MESSAGE: 'Sage Embed is in Beta in this release.',
7
- THIRD_PARTY_COOKIE_BLOCKED_ALERT: 'Third party cookie access is blocked on this browser, please allow third party cookies for this to work properly. \nYou can use `suppressNoCookieAccessAlert` to suppress this message.',
8
- DUPLICATE_TOKEN_ERR: 'Duplicate token, please issue a new token every time getAuthToken callback is called. See https://developers.thoughtspot.com/docs/?pageid=embed-auth#trusted-auth-embed for more details.',
3
+ SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND: 'Please select a worksheet to get started',
4
+ LIVEBOARD_VIZ_ID_VALIDATION: 'Please select a Liveboard to embed.',
5
+ TRIGGER_TIMED_OUT: 'Trigger timed-out in getting a response',
6
+ SEARCHEMBED_BETA_WRANING_MESSAGE: 'SearchEmbed is in Beta in this release.',
7
+ SAGE_EMBED_BETA_WARNING_MESSAGE: 'SageEmbed is in Beta in this release.',
8
+ THIRD_PARTY_COOKIE_BLOCKED_ALERT: 'Third-party cookie access is blocked on this browser. Please allow third-party cookies for this to work properly. \nYou can use `suppressNoCookieAccessAlert` to suppress this message.',
9
+ DUPLICATE_TOKEN_ERR: 'Duplicate token. Please issue a new token every time getAuthToken callback is called. See https://developers.thoughtspot.com/docs/?pageid=embed-auth#trusted-auth-embed for more details.',
9
10
  SDK_NOT_INITIALIZED: 'SDK not initialized',
10
- SESSION_INFO_FAILED: 'Failed to get session info',
11
+ SESSION_INFO_FAILED: 'Failed to get session information',
11
12
  INVALID_TOKEN_ERROR: 'Received invalid token from getAuthToken callback or authToken endpoint.',
12
13
  MIXPANEL_TOKEN_NOT_FOUND: 'Mixpanel token not found in session info',
13
- PRERENDER_ID_MISSING: 'PreRender id is required for preRender',
14
+ PRERENDER_ID_MISSING: 'PreRender ID is required for preRender',
14
15
  SYNC_STYLE_CALLED_BEFORE_RENDER: 'PreRender should be called before using syncPreRenderStyle',
15
16
  CSP_VIOLATION_ALERT: 'CSP violation detected. Please check the console errors for more details.',
16
- CSP_FRAME_HOST_VIOLATION_LOG_MESSAGE: 'Please setup CSP Correctly for the Application to start working. You can know more about setting CSP Correctly here: https://developers.thoughtspot.com/docs/security-settings#csp-viz-embed-hosts. \n In case you are still facing error, please read: https://developers.thoughtspot.com/docs/security-settings#csp-viz-embed-hosts',
17
+ CSP_FRAME_HOST_VIOLATION_LOG_MESSAGE: 'Please set up CSP correctly for the application to start working. For more information, see https://developers.thoughtspot.com/docs/security-settings#csp-viz-embed-hosts. \n If the issue persists, refer to https://developers.thoughtspot.com/docs/security-settings#csp-viz-embed-hosts',
17
18
  MISSING_REPORTING_OBSERVER: 'ReportingObserver not supported',
18
19
  };
@@ -56,7 +56,7 @@ describe('React Components', () => {
56
56
  ),
57
57
  ).toBe(true);
58
58
  expect(getIFrameSrc(container)).toBe(
59
- `http://${thoughtSpotHost}/?hostAppUrl=local-host&viewPortHeight=768&viewPortWidth=1024&sdkVersion=${version}&authType=None&blockNonEmbedFullAppAccess=true&hideAction=[%22${Action.ReportError}%22,%22editACopy%22,%22saveAsView%22,%22updateTSL%22,%22editTSL%22,%22onDeleteAnswer%22]&overrideConsoleLogs=true&clientLogLevel=ERROR&enableDataPanelV2=true&dataSourceMode=hide&useLastSelectedSources=false&isSearchEmbed=true&collapseSearchBarInitially=true&enableCustomColumnGroups=false&dataPanelCustomGroupsAccordionInitialState=EXPAND_ALL#/embed/answer`,
59
+ `http://${thoughtSpotHost}/?hostAppUrl=local-host&viewPortHeight=768&viewPortWidth=1024&sdkVersion=${version}&authType=None&blockNonEmbedFullAppAccess=true&hideAction=[%22${Action.ReportError}%22,%22editACopy%22,%22saveAsView%22,%22updateTSL%22,%22editTSL%22,%22onDeleteAnswer%22]&overrideConsoleLogs=true&clientLogLevel=ERROR&enableDataPanelV2=false&dataSourceMode=hide&useLastSelectedSources=false&isSearchEmbed=true&collapseSearchBarInitially=true&enableCustomColumnGroups=false&dataPanelCustomGroupsAccordionInitialState=EXPAND_ALL#/embed/answer`,
60
60
  );
61
61
  });
62
62
 
@@ -7,7 +7,6 @@ import { AuthType } from './types';
7
7
  * Fetch wrapper that adds the authentication token to the request.
8
8
  * Use this to call the ThoughtSpot APIs when using the visual embed sdk.
9
9
  * The interface for this method is the same as Web `Fetch`.
10
- *
11
10
  * @param input
12
11
  * @param init
13
12
  * @example
package/src/types.ts CHANGED
@@ -1017,7 +1017,7 @@ export interface ViewConfig {
1017
1017
  // eslint-disable-next-line camelcase
1018
1018
  enableV2Shell_experimental?: boolean;
1019
1019
  /**
1020
- * To set the initial state of the search bar in case of saved-answers.
1020
+ * To set the initial state of the search bar in case of saved Answers.
1021
1021
  * @default true
1022
1022
  * @version SDK: 1.34.0 | Thoughtspot: 10.3.0.cl
1023
1023
  * @example
@@ -1030,7 +1030,7 @@ export interface ViewConfig {
1030
1030
  collapseSearchBar?: boolean;
1031
1031
  /**
1032
1032
  * This flag can be used to disable links inside the embedded app,
1033
- * and disables redirection of links in a new tab.
1033
+ * and disable redirection of links in a new tab.
1034
1034
  * @example
1035
1035
  * ```js
1036
1036
  * const embed = new LiveboardEmbed('#embed', {
@@ -1042,7 +1042,7 @@ export interface ViewConfig {
1042
1042
  disableRedirectionLinksInNewTab?: boolean;
1043
1043
  /**
1044
1044
  * Flag to control Data panel experience
1045
- * @default true
1045
+ * @default false
1046
1046
  * @version SDK: 1.34.0 | Thoughtspot: 10.3.0.cl
1047
1047
  * @example
1048
1048
  * ```js
@@ -2167,22 +2167,26 @@ export enum EmbedEvent {
2167
2167
  */
2168
2168
  Rename = 'rename',
2169
2169
  /**
2170
- * Emitted if the user wants to intercept the search execution
2171
- * and implement logic to decide whether to run the search or not
2172
2170
  *
2173
- * Prerequisite: Set isOnBeforeGetVizDataInterceptEnabled : true
2171
+ * This event can be emitted to intercept search execution initiated by
2172
+ * the users and implement the logic to allow or restrict search execution.
2173
+ * You can can also show custom error text if the search query must be
2174
+ * restricted due to your application or business requirements.
2175
+
2176
+ * Prerequisite: Set `isOnBeforeGetVizDataInterceptEnabled` to `true`
2174
2177
  * for this embed event to get emitted.
2175
2178
  * @param: payload
2176
2179
  * @param: responder
2177
2180
  * Contains elements that lets developers define whether ThoughtSpot
2178
- * will run the search or not, and if not, which error message to provide.
2181
+ * should run the search, and if not, what error message
2182
+ * should be shown to the user.
2179
2183
  *
2180
- * execute: When execute returns true, the search will be run.
2181
- * When execute returns false, the search will not be executed.
2184
+ * execute: When execute returns `true`, the search will be run.
2185
+ * When execute returns `false`, the search will not be executed.
2182
2186
  *
2183
- * error: Developers can customize the user facing message when execute is
2184
- * set to false using the error parameter in responder
2185
- * @version SDK : 1.29.0 | Thoughtspot : 10.2.0.cl
2187
+ * error: Developers can customize the error message text when `execute`
2188
+ * returns `false` using the error parameter in responder.
2189
+ * @version SDK : 1.29.0 | Thoughtspot : 10.3.0.cl
2186
2190
  * @example
2187
2191
  *```js
2188
2192
  * .on(EmbedEvent.OnBeforeGetVizDataIntercept,
@@ -2222,15 +2226,15 @@ export enum EmbedEvent {
2222
2226
  */
2223
2227
  OnBeforeGetVizDataIntercept = 'onBeforeGetVizDataIntercept',
2224
2228
  /**
2225
- * Emitted when parameter changes in an answer
2226
- * or liveboard
2229
+ * Emitted when parameter changes in an Answer
2230
+ * or Liveboard
2227
2231
  *
2228
2232
  * ```js
2229
2233
  * liveboardEmbed.on(EmbedEvent.ParameterChanged, (payload) => {
2230
2234
  * console.log('payload', payload);
2231
2235
  * })
2232
2236
  *```
2233
- * @version SDK : 1.29.0 | Thoughtspot : 10.2.0.cl
2237
+ * @version SDK : 1.29.0 | Thoughtspot : 10.3.0.cl
2234
2238
  */
2235
2239
  ParameterChanged = 'parameterChanged',
2236
2240
  }
@@ -2961,8 +2965,12 @@ export enum HostEvent {
2961
2965
  * see link:https://developers.thoughtspot.com/docs/runtime-filters#rtOperator[Developer Documentation].
2962
2966
  *
2963
2967
  * `values` - An array of one or several values. The value definition on the
2964
- * data type you choose to filter on. For a complete list of supported data types,
2965
- * see link:https://developers.thoughtspot.com/docs/runtime-filters#_supported_data_types[Developer Documentation].
2968
+ * data type you choose to filter on. For a complete list of supported data types, see
2969
+ * link:https://developers.thoughtspot.com/docs/runtime-filters#_supported_data_types[Supported data types].
2970
+ *
2971
+ * `type` - To update filters for date time, specify the date format type.
2972
+ * For more information and examples, see link:https://developers.thoughtspot.com/docs/embed-liveboard#_date_filters[Date filters].
2973
+ *
2966
2974
  * @example
2967
2975
  * ```js
2968
2976
  *
@@ -3092,7 +3100,7 @@ export enum HostEvent {
3092
3100
  */
3093
3101
  AskSage = 'AskSage',
3094
3102
  /**
3095
- * Trigger UpdateCrossFilter for Liveboard
3103
+ * Trigger cross filter update action on a Liveboard
3096
3104
  * @example
3097
3105
  * ```js
3098
3106
  * liveboardEmbed.trigger(HostEvent.UpdateCrossFilter, {
@@ -3107,7 +3115,7 @@ export enum HostEvent {
3107
3115
  */
3108
3116
  UpdateCrossFilter = 'UpdateCrossFilter',
3109
3117
  /**
3110
- * Trigger ResetLiveboardPersonalisedView for Liveboard
3118
+ * Trigger reset action for a personalized Liveboard view.
3111
3119
  * @example
3112
3120
  * ```js
3113
3121
  * liveboardEmbed.trigger(HostEvent.ResetLiveboardPersonalisedView);
@@ -3253,6 +3261,7 @@ export enum Param {
3253
3261
  ShowLiveboardReverifyBanner = 'showLiveboardReverifyBanner',
3254
3262
  LiveboardHeaderV2 = 'isLiveboardHeaderV2Enabled',
3255
3263
  SpotterEnabled = 'isSpotterExperienceEnabled',
3264
+ IsUnifiedSearchExperienceEnabled = 'isUnifiedSearchExperienceEnabled',
3256
3265
  }
3257
3266
 
3258
3267
  /**
@@ -4234,7 +4243,7 @@ export enum Action {
4234
4243
  AIHighlights = 'AIHighlights',
4235
4244
 
4236
4245
  /**
4237
- * Action ID for edit schedule action on schedule on homepage
4246
+ * Action ID for edit the schedule action on schedule on homepage
4238
4247
  * @example
4239
4248
  * ```js
4240
4249
  * disabledActions: [Action.EditScheduleHomepage]
@@ -4302,6 +4311,15 @@ export enum Action {
4302
4311
  * @version SDK: 1.34.0 | Thoughtspot: 10.3.0.cl
4303
4312
  */
4304
4313
  KPIAnalysisCTA = 'kpiAnalysisCTA',
4314
+ /**
4315
+ * Action ID for disabling chip reorder in Answer and Liveboard
4316
+ * @example
4317
+ * ```js
4318
+ * const disabledActions = [Action.DisableChipReorder]
4319
+ * ```
4320
+ * @version SDK: 1.35.0 | Thoughtspot: 10.5.0.cl
4321
+ */
4322
+ DisableChipReorder = 'disableChipReorder',
4305
4323
  }
4306
4324
 
4307
4325
  export interface AnswerServiceType {
@@ -32,7 +32,6 @@ export function processCustomAction(e: any, thoughtSpotHost: string) {
32
32
 
33
33
  /**
34
34
  * Responds to AuthInit sent from host signifying successful authentication in host.
35
- *
36
35
  * @param e
37
36
  * @returns {any}
38
37
  */
@@ -19,7 +19,6 @@ let sessionInfo: null | SessionInfo = null;
19
19
  * Returns the session info object and caches it for future use.
20
20
  * Once fetched the session info object is cached and returned from the cache on
21
21
  * subsequent calls.
22
- *
23
22
  * @example ```js
24
23
  * const sessionInfo = await getSessionInfo();
25
24
  * console.log(sessionInfo);
@@ -40,7 +39,6 @@ export async function getSessionInfo(): Promise<SessionInfo> {
40
39
  /**
41
40
  * Returns the cached session info object. If the client is not authenticated the
42
41
  * function will return null.
43
- *
44
42
  * @example ```js
45
43
  * const sessionInfo = getCachedSessionInfo();
46
44
  * if (sessionInfo) {
@@ -58,7 +56,6 @@ export function getCachedSessionInfo(): SessionInfo | null {
58
56
 
59
57
  /**
60
58
  * Processes the session info response and returns the session info object.
61
- *
62
59
  * @param sessionInfoResp {any} Response from the session info API.
63
60
  * @returns {SessionInfo} The session info object.
64
61
  * @example ```js
@@ -87,7 +84,6 @@ export const getSessionDetails = (sessionInfoResp: any): SessionInfo => {
87
84
 
88
85
  /**
89
86
  * Resets the cached session info object and forces a new fetch on the next call.
90
- *
91
87
  * @example ```js
92
88
  * resetCachedSessionInfo();
93
89
  * const sessionInfo = await getSessionInfo();
package/src/utils.spec.ts CHANGED
@@ -119,9 +119,9 @@ describe('unit test for utils', () => {
119
119
 
120
120
  test('appendToUrlHash', () => {
121
121
  expect(appendToUrlHash('http://myhost:3000', 'hashFrag')).toBe(
122
- 'http://myhost:3000#hashFrag',
122
+ 'http://myhost:3000#?tsSSOMarker=hashFrag',
123
123
  );
124
- expect(appendToUrlHash('http://xyz.com/#foo', 'bar')).toBe('http://xyz.com/#foobar');
124
+ expect(appendToUrlHash('http://xyz.com/#foo', 'bar')).toBe('http://xyz.com/#foo?tsSSOMarker=bar');
125
125
  });
126
126
 
127
127
  describe('getRedirectURL', () => {
@@ -135,9 +135,9 @@ describe('unit test for utils', () => {
135
135
 
136
136
  test('Should return correct value when path is undefined', () => {
137
137
  expect(getRedirectUrl('http://myhost:3000', 'hashFrag')).toBe(
138
- 'http://myhost:3000#hashFrag',
138
+ 'http://myhost:3000#?tsSSOMarker=hashFrag',
139
139
  );
140
- expect(getRedirectUrl('http://xyz.com/#foo', 'bar')).toBe('http://xyz.com/#foobar');
140
+ expect(getRedirectUrl('http://xyz.com/#foo', 'bar')).toBe('http://xyz.com/#foo?tsSSOMarker=bar');
141
141
  });
142
142
 
143
143
  test('Should return correct value when path is set', () => {
@@ -148,11 +148,11 @@ describe('unit test for utils', () => {
148
148
  }));
149
149
 
150
150
  expect(getRedirectUrl('http://myhost:3000/', 'hashFrag', '/bar')).toBe(
151
- 'http://myhost:3000/bar#hashFrag',
151
+ 'http://myhost:3000/bar#?tsSSOMarker=hashFrag',
152
152
  );
153
153
 
154
154
  expect(getRedirectUrl('http://myhost:3000/#/foo', 'hashFrag', '#/bar')).toBe(
155
- 'http://myhost:3000/#/barhashFrag',
155
+ 'http://myhost:3000/#/bar?tsSSOMarker=hashFrag',
156
156
  );
157
157
  });
158
158
  });
package/src/utils.ts CHANGED
@@ -131,6 +131,11 @@ export const getCssDimension = (value: number | string): string => {
131
131
  return value;
132
132
  };
133
133
 
134
+ export const getSSOMarker = (markerId: string) => {
135
+ const encStringToAppend = encodeURIComponent(markerId);
136
+ return `tsSSOMarker=${encStringToAppend}`;
137
+ };
138
+
134
139
  /**
135
140
  * Append a string to a URL's hash fragment
136
141
  * @param url A URL
@@ -140,11 +145,18 @@ export const appendToUrlHash = (url: string, stringToAppend: string) => {
140
145
  let outputUrl = url;
141
146
  const encStringToAppend = encodeURIComponent(stringToAppend);
142
147
 
148
+ const marker = `tsSSOMarker=${encStringToAppend}`;
149
+
150
+ let splitAdder = '';
151
+
143
152
  if (url.indexOf('#') >= 0) {
144
- outputUrl = `${outputUrl}${encStringToAppend}`;
153
+ // If second half of hash contains a '?' already add a '&' instead of
154
+ // '?' which appends to query params.
155
+ splitAdder = url.split('#')[1].indexOf('?') >= 0 ? '&' : '?';
145
156
  } else {
146
- outputUrl = `${outputUrl}#${encStringToAppend}`;
157
+ splitAdder = '#?';
147
158
  }
159
+ outputUrl = `${outputUrl}${splitAdder}${marker}`;
148
160
 
149
161
  return outputUrl;
150
162
  };