@thoughtspot/visual-embed-sdk 1.42.1-alpha.7 → 1.42.3

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 (229) hide show
  1. package/cjs/package.json +4 -3
  2. package/cjs/src/css-variables.d.ts +0 -48
  3. package/cjs/src/css-variables.d.ts.map +1 -1
  4. package/cjs/src/embed/app.d.ts +20 -0
  5. package/cjs/src/embed/app.d.ts.map +1 -1
  6. package/cjs/src/embed/app.js +9 -4
  7. package/cjs/src/embed/app.js.map +1 -1
  8. package/cjs/src/embed/app.spec.js +62 -0
  9. package/cjs/src/embed/app.spec.js.map +1 -1
  10. package/cjs/src/embed/base.d.ts.map +1 -1
  11. package/cjs/src/embed/base.js +2 -0
  12. package/cjs/src/embed/base.js.map +1 -1
  13. package/cjs/src/embed/bodyless-conversation.d.ts +1 -1
  14. package/cjs/src/embed/conversation.d.ts +16 -0
  15. package/cjs/src/embed/conversation.d.ts.map +1 -1
  16. package/cjs/src/embed/conversation.js +5 -2
  17. package/cjs/src/embed/conversation.js.map +1 -1
  18. package/cjs/src/embed/conversation.spec.js +25 -1
  19. package/cjs/src/embed/conversation.spec.js.map +1 -1
  20. package/cjs/src/embed/hostEventClient/contracts.d.ts +1 -11
  21. package/cjs/src/embed/hostEventClient/contracts.d.ts.map +1 -1
  22. package/cjs/src/embed/hostEventClient/contracts.js +0 -1
  23. package/cjs/src/embed/hostEventClient/contracts.js.map +1 -1
  24. package/cjs/src/embed/liveboard.d.ts.map +1 -1
  25. package/cjs/src/embed/liveboard.js +5 -1
  26. package/cjs/src/embed/liveboard.js.map +1 -1
  27. package/cjs/src/embed/liveboard.spec.js +46 -0
  28. package/cjs/src/embed/liveboard.spec.js.map +1 -1
  29. package/cjs/src/embed/sage.d.ts +4 -4
  30. package/cjs/src/embed/search.d.ts.map +1 -1
  31. package/cjs/src/embed/search.js +1 -3
  32. package/cjs/src/embed/search.js.map +1 -1
  33. package/cjs/src/embed/ts-embed.d.ts +0 -2
  34. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  35. package/cjs/src/embed/ts-embed.js +31 -44
  36. package/cjs/src/embed/ts-embed.js.map +1 -1
  37. package/cjs/src/embed/ts-embed.spec.js +134 -43
  38. package/cjs/src/embed/ts-embed.spec.js.map +1 -1
  39. package/cjs/src/errors.js +1 -1
  40. package/cjs/src/errors.js.map +1 -1
  41. package/cjs/src/index.d.ts +3 -3
  42. package/cjs/src/index.d.ts.map +1 -1
  43. package/cjs/src/index.js +1 -2
  44. package/cjs/src/index.js.map +1 -1
  45. package/cjs/src/react/all-types-export.d.ts +1 -2
  46. package/cjs/src/react/all-types-export.d.ts.map +1 -1
  47. package/cjs/src/react/all-types-export.js +5 -3
  48. package/cjs/src/react/all-types-export.js.map +1 -1
  49. package/cjs/src/react/all-types-export.spec.js +0 -8
  50. package/cjs/src/react/all-types-export.spec.js.map +1 -1
  51. package/cjs/src/react/index.d.ts +1 -2
  52. package/cjs/src/react/index.d.ts.map +1 -1
  53. package/cjs/src/react/index.js +2 -1
  54. package/cjs/src/react/index.js.map +1 -1
  55. package/cjs/src/react/util.d.ts +1 -0
  56. package/cjs/src/react/util.d.ts.map +1 -1
  57. package/cjs/src/types.d.ts +80 -94
  58. package/cjs/src/types.d.ts.map +1 -1
  59. package/cjs/src/types.js +30 -46
  60. package/cjs/src/types.js.map +1 -1
  61. package/cjs/src/utils/custom-actions.d.ts.map +1 -1
  62. package/cjs/src/utils/custom-actions.js +9 -0
  63. package/cjs/src/utils/custom-actions.js.map +1 -1
  64. package/cjs/src/utils/custom-actions.spec.js +20 -0
  65. package/cjs/src/utils/custom-actions.spec.js.map +1 -1
  66. package/cjs/src/utils/processData.d.ts +1 -1
  67. package/cjs/src/utils/processData.d.ts.map +1 -1
  68. package/cjs/src/utils/processData.js +8 -8
  69. package/cjs/src/utils/processData.js.map +1 -1
  70. package/cjs/src/utils/processData.spec.js.map +1 -1
  71. package/dist/{index-DvNA626T.js → index-SVcLgSqi.js} +1 -1
  72. package/dist/src/css-variables.d.ts +0 -48
  73. package/dist/src/css-variables.d.ts.map +1 -1
  74. package/dist/src/embed/app.d.ts +20 -0
  75. package/dist/src/embed/app.d.ts.map +1 -1
  76. package/dist/src/embed/base.d.ts.map +1 -1
  77. package/dist/src/embed/bodyless-conversation.d.ts +1 -1
  78. package/dist/src/embed/conversation.d.ts +16 -0
  79. package/dist/src/embed/conversation.d.ts.map +1 -1
  80. package/dist/src/embed/hostEventClient/contracts.d.ts +1 -11
  81. package/dist/src/embed/hostEventClient/contracts.d.ts.map +1 -1
  82. package/dist/src/embed/liveboard.d.ts.map +1 -1
  83. package/dist/src/embed/sage.d.ts +4 -4
  84. package/dist/src/embed/search.d.ts.map +1 -1
  85. package/dist/src/embed/ts-embed.d.ts +0 -2
  86. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  87. package/dist/src/index.d.ts +3 -3
  88. package/dist/src/index.d.ts.map +1 -1
  89. package/dist/src/react/all-types-export.d.ts +1 -2
  90. package/dist/src/react/all-types-export.d.ts.map +1 -1
  91. package/dist/src/react/index.d.ts +1 -2
  92. package/dist/src/react/index.d.ts.map +1 -1
  93. package/dist/src/react/util.d.ts +1 -0
  94. package/dist/src/react/util.d.ts.map +1 -1
  95. package/dist/src/types.d.ts +80 -94
  96. package/dist/src/types.d.ts.map +1 -1
  97. package/dist/src/utils/custom-actions.d.ts.map +1 -1
  98. package/dist/src/utils/processData.d.ts +1 -1
  99. package/dist/src/utils/processData.d.ts.map +1 -1
  100. package/dist/tsembed-react.es.js +114 -224
  101. package/dist/tsembed-react.js +258 -444
  102. package/dist/tsembed.es.js +113 -224
  103. package/dist/tsembed.js +256 -443
  104. package/dist/visual-embed-sdk-react-full.d.ts +126 -161
  105. package/dist/visual-embed-sdk-react.d.ts +117 -156
  106. package/dist/visual-embed-sdk.d.ts +117 -159
  107. package/lib/package.json +4 -3
  108. package/lib/src/css-variables.d.ts +0 -48
  109. package/lib/src/css-variables.d.ts.map +1 -1
  110. package/lib/src/embed/app.d.ts +20 -0
  111. package/lib/src/embed/app.d.ts.map +1 -1
  112. package/lib/src/embed/app.js +9 -4
  113. package/lib/src/embed/app.js.map +1 -1
  114. package/lib/src/embed/app.spec.js +62 -0
  115. package/lib/src/embed/app.spec.js.map +1 -1
  116. package/lib/src/embed/base.d.ts.map +1 -1
  117. package/lib/src/embed/base.js +2 -0
  118. package/lib/src/embed/base.js.map +1 -1
  119. package/lib/src/embed/bodyless-conversation.d.ts +1 -1
  120. package/lib/src/embed/conversation.d.ts +16 -0
  121. package/lib/src/embed/conversation.d.ts.map +1 -1
  122. package/lib/src/embed/conversation.js +5 -2
  123. package/lib/src/embed/conversation.js.map +1 -1
  124. package/lib/src/embed/conversation.spec.js +25 -1
  125. package/lib/src/embed/conversation.spec.js.map +1 -1
  126. package/lib/src/embed/hostEventClient/contracts.d.ts +1 -11
  127. package/lib/src/embed/hostEventClient/contracts.d.ts.map +1 -1
  128. package/lib/src/embed/hostEventClient/contracts.js +0 -1
  129. package/lib/src/embed/hostEventClient/contracts.js.map +1 -1
  130. package/lib/src/embed/liveboard.d.ts.map +1 -1
  131. package/lib/src/embed/liveboard.js +5 -1
  132. package/lib/src/embed/liveboard.js.map +1 -1
  133. package/lib/src/embed/liveboard.spec.js +47 -1
  134. package/lib/src/embed/liveboard.spec.js.map +1 -1
  135. package/lib/src/embed/sage.d.ts +4 -4
  136. package/lib/src/embed/search.d.ts.map +1 -1
  137. package/lib/src/embed/search.js +1 -3
  138. package/lib/src/embed/search.js.map +1 -1
  139. package/lib/src/embed/ts-embed.d.ts +0 -2
  140. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  141. package/lib/src/embed/ts-embed.js +31 -44
  142. package/lib/src/embed/ts-embed.js.map +1 -1
  143. package/lib/src/embed/ts-embed.spec.js +134 -43
  144. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  145. package/lib/src/errors.js +1 -1
  146. package/lib/src/errors.js.map +1 -1
  147. package/lib/src/index.d.ts +3 -3
  148. package/lib/src/index.d.ts.map +1 -1
  149. package/lib/src/index.js +2 -2
  150. package/lib/src/index.js.map +1 -1
  151. package/lib/src/react/all-types-export.d.ts +1 -2
  152. package/lib/src/react/all-types-export.d.ts.map +1 -1
  153. package/lib/src/react/all-types-export.js +2 -2
  154. package/lib/src/react/all-types-export.js.map +1 -1
  155. package/lib/src/react/all-types-export.spec.js +0 -8
  156. package/lib/src/react/all-types-export.spec.js.map +1 -1
  157. package/lib/src/react/index.d.ts +1 -2
  158. package/lib/src/react/index.d.ts.map +1 -1
  159. package/lib/src/react/index.js +4 -3
  160. package/lib/src/react/index.js.map +1 -1
  161. package/lib/src/react/util.d.ts +1 -0
  162. package/lib/src/react/util.d.ts.map +1 -1
  163. package/lib/src/types.d.ts +80 -94
  164. package/lib/src/types.d.ts.map +1 -1
  165. package/lib/src/types.js +29 -45
  166. package/lib/src/types.js.map +1 -1
  167. package/lib/src/utils/custom-actions.d.ts.map +1 -1
  168. package/lib/src/utils/custom-actions.js +9 -0
  169. package/lib/src/utils/custom-actions.js.map +1 -1
  170. package/lib/src/utils/custom-actions.spec.js +20 -0
  171. package/lib/src/utils/custom-actions.spec.js.map +1 -1
  172. package/lib/src/utils/processData.d.ts +1 -1
  173. package/lib/src/utils/processData.d.ts.map +1 -1
  174. package/lib/src/utils/processData.js +8 -8
  175. package/lib/src/utils/processData.js.map +1 -1
  176. package/lib/src/utils/processData.spec.js.map +1 -1
  177. package/package.json +4 -3
  178. package/src/css-variables.ts +0 -58
  179. package/src/embed/app.spec.ts +87 -0
  180. package/src/embed/app.ts +35 -4
  181. package/src/embed/base.ts +2 -0
  182. package/src/embed/bodyless-conversation.ts +1 -1
  183. package/src/embed/conversation.spec.ts +35 -1
  184. package/src/embed/conversation.ts +22 -0
  185. package/src/embed/hostEventClient/contracts.ts +0 -10
  186. package/src/embed/liveboard.spec.ts +60 -0
  187. package/src/embed/liveboard.ts +9 -0
  188. package/src/embed/sage.ts +4 -4
  189. package/src/embed/search.ts +1 -3
  190. package/src/embed/ts-embed.spec.ts +175 -53
  191. package/src/embed/ts-embed.ts +45 -68
  192. package/src/errors.ts +1 -1
  193. package/src/index.ts +3 -4
  194. package/src/react/all-types-export.spec.ts +1 -9
  195. package/src/react/all-types-export.ts +8 -10
  196. package/src/react/index.tsx +130 -155
  197. package/src/types.ts +78 -94
  198. package/src/utils/custom-actions.spec.ts +22 -0
  199. package/src/utils/custom-actions.ts +11 -0
  200. package/src/utils/processData.spec.ts +1 -0
  201. package/src/utils/processData.ts +11 -11
  202. package/cjs/src/api-intercept.d.ts +0 -31
  203. package/cjs/src/api-intercept.d.ts.map +0 -1
  204. package/cjs/src/api-intercept.js +0 -119
  205. package/cjs/src/api-intercept.js.map +0 -1
  206. package/cjs/src/api-intercept.spec.d.ts +0 -2
  207. package/cjs/src/api-intercept.spec.d.ts.map +0 -1
  208. package/cjs/src/api-intercept.spec.js +0 -122
  209. package/cjs/src/api-intercept.spec.js.map +0 -1
  210. package/dist/index-BCC3Z072.js +0 -7371
  211. package/dist/index-BEzW4MDA.js +0 -7371
  212. package/dist/index-BaESA9rq.js +0 -7371
  213. package/dist/index-CFNZIcKr.js +0 -7447
  214. package/dist/index-CqKTa1Fe.js +0 -7447
  215. package/dist/index-DFnPKcjZ.js +0 -7447
  216. package/dist/index-DhFH7b7U.js +0 -7447
  217. package/dist/src/api-intercept.d.ts +0 -31
  218. package/dist/src/api-intercept.d.ts.map +0 -1
  219. package/dist/src/api-intercept.spec.d.ts +0 -2
  220. package/dist/src/api-intercept.spec.d.ts.map +0 -1
  221. package/lib/src/api-intercept.d.ts +0 -31
  222. package/lib/src/api-intercept.d.ts.map +0 -1
  223. package/lib/src/api-intercept.js +0 -112
  224. package/lib/src/api-intercept.js.map +0 -1
  225. package/lib/src/api-intercept.spec.d.ts +0 -2
  226. package/lib/src/api-intercept.spec.d.ts.map +0 -1
  227. package/lib/src/api-intercept.spec.js +0 -119
  228. package/lib/src/api-intercept.spec.js.map +0 -1
  229. package/src/api-intercept.ts +0 -139
@@ -474,36 +474,16 @@ export interface CustomCssVariables {
474
474
  */
475
475
  '--ts-var-checkbox-background-color'?: string;
476
476
 
477
- /**
478
- * Height of the tiles in the Liveboard.
479
- */
480
- '--ts-var-viz-tile-height'?: string;
481
-
482
477
  /**
483
478
  * Background color of the layout in the Liveboard.
484
479
  */
485
480
  '--ts-var-liveboard-layout-background'?: string;
486
481
 
487
- /**
488
- * Font color of the title of the layout in the Liveboard.
489
- */
490
- '--ts-var-liveboard-layout-title-color'?: string;
491
-
492
- /**
493
- * Font size of the title of the layout in the Liveboard.
494
- */
495
- '--ts-var-liveboard-layout-title-fontsize'?: string;
496
-
497
482
  /**
498
483
  * Background color of the header in the Liveboard.
499
484
  */
500
485
  '--ts-var-liveboard-header-background'?: string;
501
486
 
502
- /**
503
- * Font size of the header in the Liveboard.
504
- */
505
- '--ts-var-liveboard-header-fontsize'?: string;
506
-
507
487
  /**
508
488
  * Font color of the header in the Liveboard.
509
489
  */
@@ -541,13 +521,6 @@ export interface CustomCssVariables {
541
521
  */
542
522
  '--ts-var-liveboard-group-padding'?: string;
543
523
 
544
- /**
545
- * Padding of the title of the groups in the Liveboard.
546
- *
547
- * Please enable the Liveboard styling and grouping feature in your ThoughtSpot instance and then set the isLiveboardStylingAndGrouping SDK flag to true to start modifying this CSS variable.
548
- */
549
- '--ts-var-liveboard-group-title-padding'?: string;
550
-
551
524
  /**
552
525
  * Font size of the title of the groups in the Liveboard.
553
526
  *
@@ -576,27 +549,6 @@ export interface CustomCssVariables {
576
549
  */
577
550
  '--ts-var-liveboard-group-tile-title-font-weight'?: string;
578
551
 
579
- /**
580
- * Font size of the description of the groups in the Liveboard.
581
- *
582
- * Please enable the Liveboard styling and grouping feature in your ThoughtSpot instance and then set the isLiveboardStylingAndGrouping SDK flag to true to start modifying this CSS variable.
583
- */
584
- '--ts-var-liveboard-group-description-font-size'?: string;
585
-
586
- /**
587
- * Font weight of the description of the groups in the Liveboard.
588
- *
589
- * Please enable the Liveboard styling and grouping feature in your ThoughtSpot instance and then set the isLiveboardStylingAndGrouping SDK flag to true to start modifying this CSS variable.
590
- */
591
- '--ts-var-liveboard-group-description-font-weight'?: string;
592
-
593
- /**
594
- * Border of the group tiles in the Liveboard.
595
- *
596
- * Please enable the Liveboard styling and grouping feature in your ThoughtSpot instance and then set the isLiveboardStylingAndGrouping SDK flag to true to start modifying this CSS variable.
597
- */
598
- '--ts-var-liveboard-group-tile-border'?: string;
599
-
600
552
  /**
601
553
  * Padding of the group tiles in the Liveboard.
602
554
  *
@@ -741,16 +693,6 @@ export interface CustomCssVariables {
741
693
  */
742
694
  '--ts-var-liveboard-tile-title-fontweight'?: string;
743
695
 
744
- /**
745
- * Font weight of the description of the tiles in the Liveboard.
746
- */
747
- '--ts-var-liveboard-tile-description-font-weight'?: string;
748
-
749
- /**
750
- * Opacity of the description of the tiles in the Liveboard.
751
- */
752
- '--ts-var-liveboard-tile-description-opacity'?: string;
753
-
754
696
  /**
755
697
  * Background color of the parameter chips in the Liveboard.
756
698
  */
@@ -414,6 +414,34 @@ describe('App embed tests', () => {
414
414
  });
415
415
  });
416
416
 
417
+ test('should set isCentralizedLiveboardFilterUXEnabled to true in url', async () => {
418
+ const appEmbed = new AppEmbed(getRootEl(), {
419
+ ...defaultViewConfig,
420
+ isCentralizedLiveboardFilterUXEnabled: true,
421
+ } as AppViewConfig);
422
+ appEmbed.render();
423
+ await executeAfterWait(() => {
424
+ expectUrlMatchesWithParams(
425
+ getIFrameSrc(),
426
+ `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isCentralizedLiveboardFilterUXEnabled=true${defaultParamsPost}#/home`,
427
+ );
428
+ });
429
+ });
430
+
431
+ test('should set isCentralizedLiveboardFilterUXEnabled to false in url', async () => {
432
+ const appEmbed = new AppEmbed(getRootEl(), {
433
+ ...defaultViewConfig,
434
+ isCentralizedLiveboardFilterUXEnabled: false,
435
+ } as AppViewConfig);
436
+ appEmbed.render();
437
+ await executeAfterWait(() => {
438
+ expectUrlMatchesWithParams(
439
+ getIFrameSrc(),
440
+ `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isCentralizedLiveboardFilterUXEnabled=false${defaultParamsPost}#/home`,
441
+ );
442
+ });
443
+ });
444
+
417
445
  test('Should add the tag to the iframe src', async () => {
418
446
  const appEmbed = new AppEmbed(getRootEl(), {
419
447
  ...defaultViewConfig,
@@ -430,6 +458,51 @@ describe('App embed tests', () => {
430
458
  });
431
459
  });
432
460
 
461
+ test('Should add the hideTagFilterChips true to the iframe src', async () => {
462
+ const appEmbed = new AppEmbed(getRootEl(), {
463
+ ...defaultViewConfig,
464
+ showPrimaryNavbar: false,
465
+ hideTagFilterChips: true,
466
+ } as AppViewConfig);
467
+
468
+ appEmbed.render();
469
+ await executeAfterWait(() => {
470
+ expectUrlMatchesWithParams(
471
+ getIFrameSrc(),
472
+ `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false${defaultParams}&hideTagFilterChips=true${defaultParamsPost}#/home`,
473
+ );
474
+ });
475
+ });
476
+
477
+ test('Should add the hideTagFilterChips false to the iframe src', async () => {
478
+ const appEmbed = new AppEmbed(getRootEl(), {
479
+ ...defaultViewConfig,
480
+ showPrimaryNavbar: false,
481
+ hideTagFilterChips: false,
482
+ } as AppViewConfig);
483
+ appEmbed.render();
484
+ await executeAfterWait(() => {
485
+ expectUrlMatchesWithParams(
486
+ getIFrameSrc(),
487
+ `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false${defaultParams}&hideTagFilterChips=false${defaultParamsPost}#/home`,
488
+ );
489
+ });
490
+ });
491
+
492
+ test('Should not add hideTagFilterChips if it is undefined', async () => {
493
+ const appEmbed = new AppEmbed(getRootEl(), {
494
+ ...defaultViewConfig,
495
+ showPrimaryNavbar: false,
496
+ } as AppViewConfig);
497
+ appEmbed.render();
498
+ await executeAfterWait(() => {
499
+ expectUrlMatchesWithParams(
500
+ getIFrameSrc(),
501
+ `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false${defaultParams}${defaultParamsPost}#/home`,
502
+ );
503
+ });
504
+ });
505
+
433
506
  test('Should add enableSearchAssist flagto the iframe src', async () => {
434
507
  const appEmbed = new AppEmbed(getRootEl(), {
435
508
  ...defaultViewConfig,
@@ -550,6 +623,20 @@ describe('App embed tests', () => {
550
623
  });
551
624
  });
552
625
 
626
+ test('Should add isLiveboardPermissionV2Enabled flag to the iframe src', async () => {
627
+ const appEmbed = new AppEmbed(getRootEl(), {
628
+ ...defaultViewConfig,
629
+ isEnhancedFilterInteractivityEnabled: false,
630
+ } as AppViewConfig);
631
+ appEmbed.render();
632
+ await executeAfterWait(() => {
633
+ expectUrlMatchesWithParams(
634
+ getIFrameSrc(),
635
+ `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isLiveboardPermissionV2Enabled=false${defaultParams}${defaultParamsPost}#/home`,
636
+ );
637
+ });
638
+ });
639
+
553
640
  test('Should add default values of flags to the iframe src', async () => {
554
641
  const appEmbed = new AppEmbed(getRootEl(), {
555
642
  ...defaultViewConfig,
package/src/embed/app.ts CHANGED
@@ -19,7 +19,6 @@ import {
19
19
  AllEmbedViewConfig,
20
20
  } from '../types';
21
21
  import { V1Embed } from './ts-embed';
22
- import { getInterceptInitData } from '../api-intercept';
23
22
 
24
23
  /**
25
24
  * Pages within the ThoughtSpot app that can be embedded.
@@ -368,6 +367,26 @@ export interface AppViewConfig extends AllEmbedViewConfig {
368
367
  * ```
369
368
  */
370
369
  tag?: string;
370
+ /**
371
+ * Hide tag filter chips that appear when content is filtered by tags.
372
+ * When enabled, this automatically:
373
+ * - Hides tag filter indicators/chips from the UI
374
+ *
375
+ * This provides a clean interface without tag-related UI elements.
376
+ *
377
+ * Supported embed types: `AppEmbed`
378
+ * @version SDK: 1.44.0 | ThoughtSpot: 10.15.0.cl
379
+ * @example
380
+ * ```js
381
+ * // Simple usage - automatically hides all tag-related UI
382
+ * const embed = new AppEmbed('#tsEmbed', {
383
+ * ... // other embed view config
384
+ * tag: 'Some Tag',
385
+ * hideTagFilterChips: true, // This is all you need!
386
+ * });
387
+ * ```
388
+ */
389
+ hideTagFilterChips?: boolean;
371
390
  /**
372
391
  * The array of GUIDs to be hidden
373
392
  *
@@ -626,6 +645,7 @@ export class AppEmbed extends V1Embed {
626
645
  protected getEmbedParams() {
627
646
  const {
628
647
  tag,
648
+ hideTagFilterChips,
629
649
  hideObjects,
630
650
  liveboardV2,
631
651
  showPrimaryNavbar,
@@ -656,6 +676,7 @@ export class AppEmbed extends V1Embed {
656
676
  showLiveboardVerifiedBadge = true,
657
677
  showLiveboardReverifyBanner = true,
658
678
  hideIrrelevantChipsInLiveboardTabs = false,
679
+ isEnhancedFilterInteractivityEnabled = false,
659
680
  homePageSearchBarMode,
660
681
  isUnifiedSearchExperienceEnabled = true,
661
682
  enablePendoHelp = true,
@@ -664,6 +685,7 @@ export class AppEmbed extends V1Embed {
664
685
  liveboardXLSXCSVDownload = false,
665
686
  isLiveboardStylingAndGroupingEnabled,
666
687
  isPNGInScheduledEmailsEnabled = false,
688
+ isCentralizedLiveboardFilterUXEnabled = false,
667
689
  isLinkParametersEnabled,
668
690
  } = this.viewConfig;
669
691
 
@@ -678,6 +700,7 @@ export class AppEmbed extends V1Embed {
678
700
  params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
679
701
  params[Param.IsFullAppEmbed] = true;
680
702
  params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
703
+ params[Param.IsEnhancedFilterInteractivityEnabled] = isEnhancedFilterInteractivityEnabled;
681
704
  params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;
682
705
  params[Param.ShowLiveboardReverifyBanner] = showLiveboardReverifyBanner;
683
706
  params[Param.HideIrrelevantFiltersInTab] = hideIrrelevantChipsInLiveboardTabs;
@@ -729,9 +752,7 @@ export class AppEmbed extends V1Embed {
729
752
  params[Param.enableAskSage] = enableAskSage;
730
753
  }
731
754
 
732
- const { enableApiIntercept } = getInterceptInitData(this.embedConfig, this.viewConfig);
733
-
734
- if (isOnBeforeGetVizDataInterceptEnabled && !enableApiIntercept) {
755
+ if (isOnBeforeGetVizDataInterceptEnabled) {
735
756
 
736
757
  params[
737
758
  Param.IsOnBeforeGetVizDataInterceptEnabled
@@ -753,11 +774,21 @@ export class AppEmbed extends V1Embed {
753
774
  if (isPNGInScheduledEmailsEnabled !== undefined) {
754
775
  params[Param.isPNGInScheduledEmailsEnabled] = isPNGInScheduledEmailsEnabled;
755
776
  }
777
+
778
+ if (hideTagFilterChips !== undefined) {
779
+ params[Param.HideTagFilterChips] = hideTagFilterChips;
780
+ }
756
781
 
757
782
  if (isLinkParametersEnabled !== undefined) {
758
783
  params[Param.isLinkParametersEnabled] = isLinkParametersEnabled;
759
784
  }
760
785
 
786
+ if (isCentralizedLiveboardFilterUXEnabled != undefined) {
787
+ params[
788
+ Param.isCentralizedLiveboardFilterUXEnabled
789
+ ] = isCentralizedLiveboardFilterUXEnabled;
790
+ }
791
+
761
792
  params[Param.DataPanelV2Enabled] = dataPanelV2;
762
793
  params[Param.HideHomepageLeftNav] = hideHomepageLeftNav;
763
794
  params[Param.ModularHomeExperienceEnabled] = modularHomeExperience;
package/src/embed/base.ts CHANGED
@@ -41,6 +41,8 @@ const CONFIG_DEFAULTS: Partial<EmbedConfig> = {
41
41
  authTriggerText: 'Authorize',
42
42
  authType: AuthType.None,
43
43
  logLevel: LogLevel.ERROR,
44
+ waitForCleanupOnDestroy: false,
45
+ cleanupTimeout: 5000,
44
46
  };
45
47
 
46
48
  export interface executeTMLInput {
@@ -10,7 +10,7 @@ import { getQueryParamString } from '../utils';
10
10
  */
11
11
  export interface SpotterAgentEmbedViewConfig extends Omit<BaseViewConfig, 'primaryAction'> {
12
12
  /**
13
- * The ID of the worksheet to use for the conversation.
13
+ * The ID of the Model to use for the conversation.
14
14
  */
15
15
  worksheetId: string;
16
16
  }
@@ -148,7 +148,7 @@ describe('ConversationEmbed', () => {
148
148
  searchQuery: 'searchQuery',
149
149
  },
150
150
  dataPanelV2: true,
151
- hiddenActions: [Action.InConversationTraining]
151
+ hiddenActions: [Action.InConversationTraining],
152
152
  };
153
153
 
154
154
  const conversationEmbed = new SpotterEmbed(getRootEl(), viewConfig);
@@ -282,6 +282,40 @@ describe('ConversationEmbed', () => {
282
282
  );
283
283
  });
284
284
 
285
+ it('should render the conversation embed with past conversations sidebar enabled', async () => {
286
+ const viewConfig: SpotterEmbedViewConfig = {
287
+ worksheetId: 'worksheetId',
288
+ searchOptions: {
289
+ searchQuery: 'searchQuery',
290
+ },
291
+ enablePastConversationsSidebar: true,
292
+ };
293
+
294
+ const conversationEmbed = new SpotterEmbed(getRootEl(), viewConfig);
295
+ await conversationEmbed.render();
296
+ expectUrlMatchesWithParams(
297
+ getIFrameSrc(),
298
+ `http://${thoughtSpotHost}/v2/?${defaultParams}&isSpotterExperienceEnabled=true&enablePastConversationsSidebar=true#/embed/insights/conv-assist?worksheet=worksheetId&query=searchQuery`,
299
+ );
300
+ });
301
+
302
+ it('should render the conversation embed with past conversations sidebar disabled', async () => {
303
+ const viewConfig: SpotterEmbedViewConfig = {
304
+ worksheetId: 'worksheetId',
305
+ searchOptions: {
306
+ searchQuery: 'searchQuery',
307
+ },
308
+ enablePastConversationsSidebar: false,
309
+ };
310
+
311
+ const conversationEmbed = new SpotterEmbed(getRootEl(), viewConfig);
312
+ await conversationEmbed.render();
313
+ expectUrlMatchesWithParams(
314
+ getIFrameSrc(),
315
+ `http://${thoughtSpotHost}/v2/?${defaultParams}&isSpotterExperienceEnabled=true&enablePastConversationsSidebar=false#/embed/insights/conv-assist?worksheet=worksheetId&query=searchQuery`,
316
+ );
317
+ });
318
+
285
319
  it('should ensure deprecated ConversationEmbed class maintains same functionality as SpotterEmbed', async () => {
286
320
  const viewConfig: SpotterEmbedViewConfig = {
287
321
  worksheetId: 'worksheetId',
@@ -164,6 +164,22 @@ export interface SpotterEmbedViewConfig extends Omit<BaseViewConfig, 'primaryAct
164
164
  * @version SDK: 1.41.0 | ThoughtSpot: 10.13.0.cl
165
165
  */
166
166
  excludeRuntimeParametersfromURL?: boolean;
167
+ /**
168
+ * enablePastConversationsSidebar : Controls the visibility of the past conversations
169
+ * sidebar.
170
+ *
171
+ * Supported embed types: `SpotterEmbed`
172
+ * @default false
173
+ * @example
174
+ * ```js
175
+ * const embed = new SpotterEmbed('#tsEmbed', {
176
+ * ... //other embed view config
177
+ * enablePastConversationsSidebar : true,
178
+ * })
179
+ * ```
180
+ * @version SDK: 1.43.0 | ThoughtSpot: 10.14.0.cl
181
+ */
182
+ enablePastConversationsSidebar?: boolean;
167
183
  }
168
184
 
169
185
  /**
@@ -205,6 +221,7 @@ export class SpotterEmbed extends TsEmbed {
205
221
  dataPanelV2,
206
222
  showSpotterLimitations,
207
223
  hideSampleQuestions,
224
+ enablePastConversationsSidebar,
208
225
  runtimeFilters,
209
226
  excludeRuntimeFiltersfromURL,
210
227
  runtimeParameters,
@@ -246,10 +263,15 @@ export class SpotterEmbed extends TsEmbed {
246
263
  excludeRuntimeFiltersfromURL,
247
264
  runtimeParameters,
248
265
  excludeRuntimeParametersfromURL,
266
+ enablePastConversationsSidebar
249
267
  } = this.viewConfig;
250
268
  const path = 'insights/conv-assist';
251
269
  const queryParams = this.getEmbedParamsObject();
252
270
 
271
+ if (!isUndefined(enablePastConversationsSidebar)) {
272
+ queryParams[Param.EnablePastConversationsSidebar] = !!enablePastConversationsSidebar;
273
+ }
274
+
253
275
  let query = '';
254
276
  const queryParamsString = getQueryParamString(queryParams, true);
255
277
  if (queryParamsString) {
@@ -7,7 +7,6 @@ export enum UIPassthroughEvent {
7
7
  GetAvailableUIPassthroughs = 'getAvailableUiPassthroughs',
8
8
  GetAnswerConfig = 'getAnswerPageConfig',
9
9
  GetLiveboardConfig = 'getPinboardPageConfig',
10
- GetUnsavedAnswerTML = 'getUnsavedAnswerTML',
11
10
  }
12
11
 
13
12
  // UI Passthrough Contract
@@ -64,15 +63,6 @@ export type UIPassthroughContractBase = {
64
63
  request: any;
65
64
  response: any;
66
65
  };
67
- [UIPassthroughEvent.GetUnsavedAnswerTML]: {
68
- request: {
69
- sessionId?: string;
70
- vizId?: string;
71
- };
72
- response: {
73
- tml: string;
74
- };
75
- };
76
66
  };
77
67
 
78
68
  // UI Passthrough Request and Response
@@ -16,6 +16,7 @@ import {
16
16
  defaultParams,
17
17
  defaultParamsWithoutHiddenActions,
18
18
  expectUrlMatchesWithParams,
19
+ expectUrlToHaveParamsWithValues,
19
20
  postMessageToParent,
20
21
  getIFrameEl,
21
22
  mockMessageChannel,
@@ -138,6 +139,20 @@ describe('Liveboard/viz embed tests', () => {
138
139
  });
139
140
  });
140
141
 
142
+ test('should set LiveboardStylePanel in visible actions', async () => {
143
+ const liveboardEmbed = new LiveboardEmbed(getRootEl(), {
144
+ visibleActions: [Action.LiveboardStylePanel],
145
+ ...defaultViewConfig,
146
+ liveboardId,
147
+ } as LiveboardViewConfig);
148
+ liveboardEmbed.render();
149
+ await executeAfterWait(() => {
150
+ expectUrlToHaveParamsWithValues(getIFrameSrc(), {
151
+ visibleAction: JSON.stringify([Action.LiveboardStylePanel]),
152
+ });
153
+ });
154
+ });
155
+
141
156
  test('should set enable2ColumnLayout to true in url', async () => {
142
157
  const liveboardEmbed = new LiveboardEmbed(getRootEl(), {
143
158
  enable2ColumnLayout: true,
@@ -168,6 +183,21 @@ describe('Liveboard/viz embed tests', () => {
168
183
  });
169
184
  });
170
185
 
186
+ test('should set isLiveboardPermissionV2Enabled to true in url', async () => {
187
+ const liveboardEmbed = new LiveboardEmbed(getRootEl(), {
188
+ isEnhancedFilterInteractivityEnabled: true,
189
+ ...defaultViewConfig,
190
+ liveboardId,
191
+ } as LiveboardViewConfig);
192
+ liveboardEmbed.render();
193
+ await executeAfterWait(() => {
194
+ expectUrlMatchesWithParams(
195
+ getIFrameSrc(),
196
+ `http://${thoughtSpotHost}/?embedApp=true${defaultParams}&isLiveboardPermissionV2Enabled=true${prefixParams}#/embed/viz/${liveboardId}`,
197
+ );
198
+ });
199
+ });
200
+
171
201
  test('should set isPNGInScheduledEmailsEnabled to true in url', async () => {
172
202
  const liveboardEmbed = new LiveboardEmbed(getRootEl(), {
173
203
  isPNGInScheduledEmailsEnabled: true,
@@ -453,6 +483,36 @@ describe('Liveboard/viz embed tests', () => {
453
483
  });
454
484
  });
455
485
 
486
+ test('should add isCentralizedLiveboardFilterUXEnabled flag and set value to true to the iframe src', async () => {
487
+ const liveboardEmbed = new LiveboardEmbed(getRootEl(), {
488
+ ...defaultViewConfig,
489
+ liveboardId,
490
+ isCentralizedLiveboardFilterUXEnabled: true,
491
+ } as LiveboardViewConfig);
492
+ liveboardEmbed.render();
493
+ await executeAfterWait(() => {
494
+ expectUrlMatchesWithParams(
495
+ getIFrameSrc(),
496
+ `http://${thoughtSpotHost}/?embedApp=true${defaultParams}&isCentralizedLiveboardFilterUXEnabled=true${prefixParams}#/embed/viz/${liveboardId}`,
497
+ );
498
+ });
499
+ });
500
+
501
+ test('should add isCentralizedLiveboardFilterUXEnabled flag and set value to false to the iframe src', async () => {
502
+ const liveboardEmbed = new LiveboardEmbed(getRootEl(), {
503
+ ...defaultViewConfig,
504
+ liveboardId,
505
+ isCentralizedLiveboardFilterUXEnabled: false,
506
+ } as LiveboardViewConfig);
507
+ liveboardEmbed.render();
508
+ await executeAfterWait(() => {
509
+ expectUrlMatchesWithParams(
510
+ getIFrameSrc(),
511
+ `http://${thoughtSpotHost}/?embedApp=true${defaultParams}&isCentralizedLiveboardFilterUXEnabled=false${prefixParams}#/embed/viz/${liveboardId}`,
512
+ );
513
+ });
514
+ });
515
+
456
516
  test('should not append runtime filters in URL if excludeRuntimeFiltersfromURL is true', async () => {
457
517
  const liveboardEmbed = new LiveboardEmbed(getRootEl(), {
458
518
  ...defaultViewConfig,
@@ -465,6 +465,7 @@ export class LiveboardEmbed extends V1Embed {
465
465
  showLiveboardVerifiedBadge = true,
466
466
  showLiveboardReverifyBanner = true,
467
467
  hideIrrelevantChipsInLiveboardTabs = false,
468
+ isEnhancedFilterInteractivityEnabled = false,
468
469
  enableAskSage,
469
470
  enable2ColumnLayout,
470
471
  dataPanelV2 = true,
@@ -477,6 +478,7 @@ export class LiveboardEmbed extends V1Embed {
477
478
  isLiveboardStylingAndGroupingEnabled,
478
479
  isPNGInScheduledEmailsEnabled = false,
479
480
  showSpotterLimitations,
481
+ isCentralizedLiveboardFilterUXEnabled = false,
480
482
  isLinkParametersEnabled,
481
483
  } = this.viewConfig;
482
484
 
@@ -557,11 +559,18 @@ export class LiveboardEmbed extends V1Embed {
557
559
  params[Param.isLinkParametersEnabled] = isLinkParametersEnabled;
558
560
  }
559
561
 
562
+ if (isCentralizedLiveboardFilterUXEnabled !== undefined) {
563
+ params[
564
+ Param.isCentralizedLiveboardFilterUXEnabled
565
+ ] = isCentralizedLiveboardFilterUXEnabled;
566
+ }
567
+
560
568
  params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
561
569
  params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
562
570
  params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;
563
571
  params[Param.ShowLiveboardReverifyBanner] = showLiveboardReverifyBanner;
564
572
  params[Param.HideIrrelevantFiltersInTab] = hideIrrelevantChipsInLiveboardTabs;
573
+ params[Param.IsEnhancedFilterInteractivityEnabled] = isEnhancedFilterInteractivityEnabled;
565
574
  params[Param.DataPanelV2Enabled] = dataPanelV2;
566
575
  params[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
567
576
  params[Param.CoverAndFilterOptionInPDF] = coverAndFilterOptionInPDF;
package/src/embed/sage.ts CHANGED
@@ -69,12 +69,12 @@ export interface SageViewConfig
69
69
  */
70
70
  hideSageAnswerHeader?: boolean;
71
71
  /**
72
- * Disable the worksheet selection option.
72
+ * Disable the data source selection option.
73
73
  * @version SDK: 1.26.0 | ThoughtSpot: 9.8.0.cl, 9.8.0.sw
74
74
  */
75
75
  disableWorksheetChange?: boolean;
76
76
  /**
77
- * Hide the worksheet selection panel.
77
+ * Hide the data source selection panel.
78
78
  * @version SDK: 1.26.0 | ThoughtSpot: 9.8.0.cl, 9.8.0.sw
79
79
  */
80
80
  hideWorksheetSelector?: boolean;
@@ -92,7 +92,7 @@ export interface SageViewConfig
92
92
  showObjectSuggestions?: boolean;
93
93
  /**
94
94
  * Show or hide sample questions.
95
- * The sample questions are autogenerated based on the worksheet
95
+ * The sample questions are autogenerated based on the data Model.
96
96
  * selected for the search operation.
97
97
  *
98
98
  * Supported embed types: `SageEmbed`
@@ -107,7 +107,7 @@ export interface SageViewConfig
107
107
  */
108
108
  hideSampleQuestions?: boolean;
109
109
  /**
110
- * The data source GUID (Worksheet GUID) to set on load.
110
+ * The data source GUID (Model GUID) to set on load.
111
111
  */
112
112
  dataSource?: string;
113
113
  /**
@@ -26,7 +26,6 @@ import { ERROR_MESSAGE } from '../errors';
26
26
  import { getAuthPromise } from './base';
27
27
  import { getReleaseVersion } from '../auth';
28
28
  import { getEmbedConfig } from './embedConfig';
29
- import { getInterceptInitData } from '../api-intercept';
30
29
 
31
30
  /**
32
31
  * Configuration for search options.
@@ -443,8 +442,7 @@ export class SearchEmbed extends TsEmbed {
443
442
  queryParams[Param.HideSearchBar] = true;
444
443
  }
445
444
 
446
- const { enableApiIntercept } = getInterceptInitData(this.embedConfig, this.viewConfig);
447
- if (isOnBeforeGetVizDataInterceptEnabled && !enableApiIntercept) {
445
+ if (isOnBeforeGetVizDataInterceptEnabled) {
448
446
 
449
447
  queryParams[Param.IsOnBeforeGetVizDataInterceptEnabled] = isOnBeforeGetVizDataInterceptEnabled;
450
448
  }