@thoughtspot/visual-embed-sdk 1.40.1-alpha.2 → 1.41.0-pre-render-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 (111) hide show
  1. package/cjs/package.json +5 -4
  2. package/cjs/src/css-variables.d.ts +316 -0
  3. package/cjs/src/css-variables.d.ts.map +1 -1
  4. package/cjs/src/embed/app.d.ts.map +1 -1
  5. package/cjs/src/embed/app.js +8 -0
  6. package/cjs/src/embed/app.js.map +1 -1
  7. package/cjs/src/embed/app.spec.js +12 -2
  8. package/cjs/src/embed/app.spec.js.map +1 -1
  9. package/cjs/src/embed/bodyless-conversation.d.ts.map +1 -1
  10. package/cjs/src/embed/bodyless-conversation.js.map +1 -1
  11. package/cjs/src/embed/conversation.d.ts +63 -2
  12. package/cjs/src/embed/conversation.d.ts.map +1 -1
  13. package/cjs/src/embed/conversation.js +10 -2
  14. package/cjs/src/embed/conversation.js.map +1 -1
  15. package/cjs/src/embed/conversation.spec.js +102 -0
  16. package/cjs/src/embed/conversation.spec.js.map +1 -1
  17. package/cjs/src/embed/liveboard.d.ts +11 -2
  18. package/cjs/src/embed/liveboard.d.ts.map +1 -1
  19. package/cjs/src/embed/liveboard.js +21 -7
  20. package/cjs/src/embed/liveboard.js.map +1 -1
  21. package/cjs/src/embed/liveboard.spec.js +185 -4
  22. package/cjs/src/embed/liveboard.spec.js.map +1 -1
  23. package/cjs/src/embed/sage.js.map +1 -1
  24. package/cjs/src/embed/ts-embed.d.ts +22 -7
  25. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  26. package/cjs/src/embed/ts-embed.js +75 -46
  27. package/cjs/src/embed/ts-embed.js.map +1 -1
  28. package/cjs/src/embed/ts-embed.spec.js +173 -1
  29. package/cjs/src/embed/ts-embed.spec.js.map +1 -1
  30. package/cjs/src/types.d.ts +152 -44
  31. package/cjs/src/types.d.ts.map +1 -1
  32. package/cjs/src/types.js +139 -42
  33. package/cjs/src/types.js.map +1 -1
  34. package/cjs/src/utils/liveboardService/liveboardService.d.ts +21 -6
  35. package/cjs/src/utils/liveboardService/liveboardService.d.ts.map +1 -1
  36. package/cjs/src/utils/liveboardService/liveboardService.js +21 -6
  37. package/cjs/src/utils/liveboardService/liveboardService.js.map +1 -1
  38. package/dist/index-BDlM0f0T.js +7371 -0
  39. package/dist/src/css-variables.d.ts +316 -0
  40. package/dist/src/css-variables.d.ts.map +1 -1
  41. package/dist/src/embed/app.d.ts.map +1 -1
  42. package/dist/src/embed/bodyless-conversation.d.ts.map +1 -1
  43. package/dist/src/embed/conversation.d.ts +63 -2
  44. package/dist/src/embed/conversation.d.ts.map +1 -1
  45. package/dist/src/embed/liveboard.d.ts +11 -2
  46. package/dist/src/embed/liveboard.d.ts.map +1 -1
  47. package/dist/src/embed/ts-embed.d.ts +22 -7
  48. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  49. package/dist/src/types.d.ts +152 -44
  50. package/dist/src/types.d.ts.map +1 -1
  51. package/dist/src/utils/liveboardService/liveboardService.d.ts +21 -6
  52. package/dist/src/utils/liveboardService/liveboardService.d.ts.map +1 -1
  53. package/dist/tsembed-react.es.js +256 -100
  54. package/dist/tsembed-react.js +255 -99
  55. package/dist/tsembed.es.js +277 -106
  56. package/dist/tsembed.js +276 -105
  57. package/dist/visual-embed-sdk-react-full.d.ts +575 -57
  58. package/dist/visual-embed-sdk-react.d.ts +575 -57
  59. package/dist/visual-embed-sdk.d.ts +575 -57
  60. package/lib/package.json +5 -4
  61. package/lib/src/css-variables.d.ts +316 -0
  62. package/lib/src/css-variables.d.ts.map +1 -1
  63. package/lib/src/embed/app.d.ts.map +1 -1
  64. package/lib/src/embed/app.js +8 -0
  65. package/lib/src/embed/app.js.map +1 -1
  66. package/lib/src/embed/app.spec.js +12 -2
  67. package/lib/src/embed/app.spec.js.map +1 -1
  68. package/lib/src/embed/bodyless-conversation.d.ts.map +1 -1
  69. package/lib/src/embed/bodyless-conversation.js.map +1 -1
  70. package/lib/src/embed/conversation.d.ts +63 -2
  71. package/lib/src/embed/conversation.d.ts.map +1 -1
  72. package/lib/src/embed/conversation.js +11 -3
  73. package/lib/src/embed/conversation.js.map +1 -1
  74. package/lib/src/embed/conversation.spec.js +104 -2
  75. package/lib/src/embed/conversation.spec.js.map +1 -1
  76. package/lib/src/embed/liveboard.d.ts +11 -2
  77. package/lib/src/embed/liveboard.d.ts.map +1 -1
  78. package/lib/src/embed/liveboard.js +21 -7
  79. package/lib/src/embed/liveboard.js.map +1 -1
  80. package/lib/src/embed/liveboard.spec.js +185 -4
  81. package/lib/src/embed/liveboard.spec.js.map +1 -1
  82. package/lib/src/embed/sage.js.map +1 -1
  83. package/lib/src/embed/ts-embed.d.ts +22 -7
  84. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  85. package/lib/src/embed/ts-embed.js +75 -46
  86. package/lib/src/embed/ts-embed.js.map +1 -1
  87. package/lib/src/embed/ts-embed.spec.js +173 -1
  88. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  89. package/lib/src/types.d.ts +152 -44
  90. package/lib/src/types.d.ts.map +1 -1
  91. package/lib/src/types.js +139 -42
  92. package/lib/src/types.js.map +1 -1
  93. package/lib/src/utils/liveboardService/liveboardService.d.ts +21 -6
  94. package/lib/src/utils/liveboardService/liveboardService.d.ts.map +1 -1
  95. package/lib/src/utils/liveboardService/liveboardService.js +21 -6
  96. package/lib/src/utils/liveboardService/liveboardService.js.map +1 -1
  97. package/lib/src/visual-embed-sdk.d.ts +576 -58
  98. package/package.json +5 -4
  99. package/src/css-variables.ts +396 -1
  100. package/src/embed/app.spec.ts +17 -2
  101. package/src/embed/app.ts +8 -0
  102. package/src/embed/bodyless-conversation.ts +0 -1
  103. package/src/embed/conversation.spec.ts +131 -5
  104. package/src/embed/conversation.ts +89 -10
  105. package/src/embed/liveboard.spec.ts +236 -5
  106. package/src/embed/liveboard.ts +22 -7
  107. package/src/embed/sage.ts +1 -1
  108. package/src/embed/ts-embed.spec.ts +345 -113
  109. package/src/embed/ts-embed.ts +83 -56
  110. package/src/types.ts +199 -91
  111. package/src/utils/liveboardService/liveboardService.ts +21 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thoughtspot/visual-embed-sdk",
3
- "version": "1.40.1-alpha.2",
3
+ "version": "1.41.0-pre-render-1",
4
4
  "description": "ThoughtSpot Embed SDK",
5
5
  "module": "lib/src/index.js",
6
6
  "main": "dist/tsembed.js",
@@ -38,7 +38,7 @@
38
38
  "size-limit": [
39
39
  {
40
40
  "path": "dist/tsembed.es.js",
41
- "limit": "31 kB"
41
+ "limit": "32 kB"
42
42
  }
43
43
  ],
44
44
  "scripts": {
@@ -85,7 +85,7 @@
85
85
  "@rollup/plugin-json": "^4.1.0",
86
86
  "@rollup/plugin-node-resolve": "^11.2.1",
87
87
  "@rollup/plugin-replace": "^5.0.2",
88
- "@size-limit/preset-big-lib": "^8.2.6",
88
+ "@size-limit/preset-big-lib": "^11.2.0",
89
89
  "@testing-library/dom": "^7.31.0",
90
90
  "@testing-library/jest-dom": "^5.14.1",
91
91
  "@testing-library/react": "^11.2.7",
@@ -96,6 +96,7 @@
96
96
  "@types/react-test-renderer": "^17.0.1",
97
97
  "@typescript-eslint/eslint-plugin": "^8.28.0",
98
98
  "@typescript-eslint/parser": "^8.28.0",
99
+ "ajv": "^8.17.1",
99
100
  "asciidoctor": "^2.2.1",
100
101
  "babel-jest": "^26.6.3",
101
102
  "babel-preset-gatsby": "^1.10.0",
@@ -120,7 +121,7 @@
120
121
  "highlight.js": "^10.6.0",
121
122
  "html-to-text": "^8.0.0",
122
123
  "identity-obj-proxy": "^3.0.0",
123
- "istanbul-merge": "^1.1.1",
124
+ "istanbul-merge": "^2.0.0",
124
125
  "jest": "^26.6.3",
125
126
  "jest-fetch-mock": "^3.0.3",
126
127
  "jsdom": "^17.0.0",
@@ -472,4 +472,399 @@ export interface CustomCssVariables {
472
472
  * Background color of checkbox.
473
473
  */
474
474
  '--ts-var-checkbox-background-color'?: string;
475
- }
475
+
476
+ /**
477
+ * Height of the tiles in the Liveboard.
478
+ */
479
+ '--ts-var-viz-tile-height'?: string;
480
+
481
+ /**
482
+ * Background color of the layout in the Liveboard.
483
+ */
484
+ '--ts-var-liveboard-layout-background'?: string;
485
+
486
+ /**
487
+ * Font color of the title of the layout in the Liveboard.
488
+ */
489
+ '--ts-var-liveboard-layout-title-color'?: string;
490
+
491
+ /**
492
+ * Font size of the title of the layout in the Liveboard.
493
+ */
494
+ '--ts-var-liveboard-layout-title-fontsize'?: string;
495
+
496
+ /**
497
+ * Background color of the header in the Liveboard.
498
+ */
499
+ '--ts-var-liveboard-header-background'?: string;
500
+
501
+ /**
502
+ * Font size of the header in the Liveboard.
503
+ */
504
+ '--ts-var-liveboard-header-fontsize'?: string;
505
+
506
+ /**
507
+ * Font color of the header in the Liveboard.
508
+ */
509
+ '--ts-var-liveboard-header-font-color'?: string;
510
+
511
+ /**
512
+ * Border color of the tiles in the Liveboard.
513
+ */
514
+ '--ts-var-liveboard-tile-border-color'?: string;
515
+
516
+ /**
517
+ * Background color of the tiles in the Liveboard.
518
+ */
519
+ '--ts-var-liveboard-tile-background'?: string;
520
+
521
+ /**
522
+ * Border radius of the tiles in the Liveboard.
523
+ */
524
+ '--ts-var-liveboard-tile-border-radius'?: string;
525
+
526
+ /**
527
+ * Padding of the tiles in the Liveboard.
528
+ */
529
+ '--ts-var-liveboard-tile-padding'?: string;
530
+
531
+ /**
532
+ * Background color of the table header in the Liveboard.
533
+ */
534
+ '--ts-var-liveboard-tile-table-header-background'?: string;
535
+
536
+ /**
537
+ * Padding of the groups in the Liveboard.
538
+ */
539
+ '--ts-var-liveboard-group-padding'?: string;
540
+
541
+ /**
542
+ * Padding of the title of the groups in the Liveboard.
543
+ */
544
+ '--ts-var-liveboard-group-title-padding'?: string;
545
+
546
+ /**
547
+ * Font size of the title of the groups in the Liveboard.
548
+ */
549
+ '--ts-var-liveboard-group-title-font-size'?: string;
550
+
551
+ /**
552
+ * Font weight of the title of the groups in the Liveboard.
553
+ */
554
+ '--ts-var-liveboard-group-title-font-weight'?: string;
555
+
556
+ /**
557
+ * Font size of the title of the tiles inside the groups in the Liveboard.
558
+ */
559
+ '--ts-var-liveboard-group-tile-title-font-size'?: string;
560
+
561
+ /**
562
+ * Font weight of the title of the tiles inside the groups in the Liveboard.
563
+ */
564
+ '--ts-var-liveboard-group-tile-title-font-weight'?: string;
565
+
566
+ /**
567
+ * Font size of the description of the groups in the Liveboard.
568
+ */
569
+ '--ts-var-liveboard-group-description-font-size'?: string;
570
+
571
+ /**
572
+ * Font weight of the description of the groups in the Liveboard.
573
+ */
574
+ '--ts-var-liveboard-group-description-font-weight'?: string;
575
+
576
+ /**
577
+ * Border of the tiles in the Liveboard.
578
+ */
579
+ '--ts-var-liveboard-group-tile-border'?: string;
580
+
581
+ /**
582
+ * Padding of the tiles in the Liveboard.
583
+ */
584
+ '--ts-var-liveboard-group-tile-padding'?: string;
585
+
586
+ /**
587
+ * Padding of the answer viz in the Liveboard.
588
+ */
589
+ '--ts-var-liveboard-answer-viz-padding'?: string;
590
+
591
+ /**
592
+ * Background color of the groups in the Liveboard.
593
+ */
594
+ '--ts-var-liveboard-group-background'?: string;
595
+
596
+ /**
597
+ * Border color of the groups in the Liveboard.
598
+ */
599
+ '--ts-var-liveboard-group-border-color'?: string;
600
+
601
+ /**
602
+ * Font color of the heading of the note title in the Liveboard.
603
+ */
604
+ '--ts-var-liveboard-notetitle-heading-font-color'?: string;
605
+
606
+ /**
607
+ * Font color of the body of the note title in the Liveboard.
608
+ */
609
+ '--ts-var-liveboard-notetitle-body-font-color'?: string;
610
+
611
+ /**
612
+ * Font color of the title of the groups in the Liveboard.
613
+ */
614
+ '--ts-var-liveboard-group-title-font-color'?: string;
615
+
616
+ /**
617
+ * Font color of the description of the groups in the Liveboard.
618
+ */
619
+ '--ts-var-liveboard-group-description-font-color'?: string;
620
+
621
+ /**
622
+ * Font color of the title of the tiles inside the groups in the Liveboard.
623
+ */
624
+ '--ts-var-liveboard-group-tile-title-font-color'?: string;
625
+
626
+ /**
627
+ * Background color of the tiles inside the groups in the Liveboard.
628
+ */
629
+ '--ts-var-liveboard-group-tile-background'?: string;
630
+
631
+ /**
632
+ * Background color of the chips in the Liveboard.
633
+ */
634
+ '--ts-var-liveboard-chip-background'?: string;
635
+
636
+ /**
637
+ * Font color of the chips in the Liveboard.
638
+ */
639
+ '--ts-var-liveboard-chip-color'?: string;
640
+
641
+ /**
642
+ * Background color of the chips in the Liveboard on hover.
643
+ */
644
+ '--ts-var-liveboard-chip--hover-background'?: string;
645
+
646
+ /**
647
+ * Font color of the chips in the Liveboard on hover.
648
+ */
649
+ '--ts-var-liveboard-chip--hover-color'?: string;
650
+
651
+ /**
652
+ * Background color of the chips in the Liveboard on active.
653
+ */
654
+ '--ts-var-liveboard-chip--active-background'?: string;
655
+
656
+ /**
657
+ * Font color of the chips in the Liveboard on active.
658
+ */
659
+ '--ts-var-liveboard-chip--active-color'?: string;
660
+
661
+ /**
662
+ * Width of the side panel in the Liveboard.
663
+ */
664
+ '--ts-var-side-panel-width'?: string;
665
+
666
+ /**
667
+ * Background color of the edit bar in the Liveboard.
668
+ */
669
+ '--ts-var-liveboard-edit-bar-background'?: string;
670
+
671
+ /**
672
+ * Breakpoint for the dual column layout in the Liveboard.
673
+ */
674
+ '--ts-var-liveboard-dual-column-breakpoint'?: string;
675
+
676
+ /**
677
+ * Breakpoint for the single column layout in the Liveboard.
678
+ */
679
+ '--ts-var-liveboard-single-column-breakpoint'?: string;
680
+
681
+ /**
682
+ * Background color of the cross filter layout in the Liveboard.
683
+ */
684
+ '--ts-var-liveboard-cross-filter-layout-background'?: string;
685
+
686
+ /**
687
+ * Border color of the active tab in the Liveboard.
688
+ */
689
+ '--ts-var-liveboard-tab-active-border-color'?: string;
690
+
691
+ /**
692
+ * Font color of the hover tab in the Liveboard.
693
+ */
694
+ '--ts-var-liveboard-tab-hover-color'?: string;
695
+
696
+ /**
697
+ * Font size of the title of the tiles in the Liveboard.
698
+ */
699
+ '--ts-var-liveboard-tile-title-fontsize'?: string;
700
+
701
+ /**
702
+ * Font weight of the title of the tiles in the Liveboard.
703
+ */
704
+ '--ts-var-liveboard-tile-title-fontweight'?: string;
705
+
706
+ /**
707
+ * Font weight of the description of the tiles in the Liveboard.
708
+ */
709
+ '--ts-var-liveboard-tile-description-font-weight'?: string;
710
+
711
+ /**
712
+ * Opacity of the description of the tiles in the Liveboard.
713
+ */
714
+ '--ts-var-liveboard-tile-description-opacity'?: string;
715
+
716
+ /**
717
+ * Background color of the parameter chips in the Liveboard.
718
+ */
719
+ '--ts-var-parameter-chip-background'?: string;
720
+
721
+ /**
722
+ * Font color of the parameter chips in the Liveboard.
723
+ */
724
+ '--ts-var-parameter-chip-text-color'?: string;
725
+
726
+ /**
727
+ * Background color of the parameter chips in the Liveboard on hover.
728
+ */
729
+ '--ts-var-parameter-chip-hover-background'?: string;
730
+
731
+ /**
732
+ * Font color of the parameter chips in the Liveboard on hover.
733
+ */
734
+ '--ts-var-parameter-chip-hover-text-color'?: string;
735
+
736
+ /**
737
+ * Background color of the parameter chips in the Liveboard on active.
738
+ */
739
+ '--ts-var-parameter-chip-active-background'?: string;
740
+
741
+ /**
742
+ * Font color of the parameter chips in the Liveboard on active.
743
+ */
744
+ '--ts-var-parameter-chip-active-text-color'?: string;
745
+
746
+ /**
747
+ * Background color of the action button in the Liveboard header.
748
+ */
749
+ '--ts-var-liveboard-header-action-button-background'?: string;
750
+
751
+ /**
752
+ * Font color of the action button in the Liveboard header.
753
+ */
754
+ '--ts-var-liveboard-header-action-button-font-color'?: string;
755
+
756
+ /**
757
+ * Font color of the action button in the Liveboard header on hover.
758
+ */
759
+ '--ts-var-liveboard-header-action-button-hover-color'?: string;
760
+
761
+ /**
762
+ * Font color of the action button in the Liveboard header on active.
763
+ */
764
+ '--ts-var-liveboard-header-action-button-active-color'?: string;
765
+
766
+ /**
767
+ * Background color of the badge in the Liveboard header.
768
+ */
769
+ '--ts-var-liveboard-header-badge-background'?: string;
770
+
771
+ /**
772
+ * Font color of the badge in the Liveboard header.
773
+ */
774
+ '--ts-var-liveboard-header-badge-font-color'?: string;
775
+
776
+ /**
777
+ * Background color of the modified badge in the Liveboard header.
778
+ */
779
+ '--ts-var-liveboard-header-badge-modified-background'?: string;
780
+
781
+ /**
782
+ * Font color of the modified badge in the Liveboard header.
783
+ */
784
+ '--ts-var-liveboard-header-badge-modified-font-color'?: string;
785
+
786
+ /**
787
+ * Font color of the badge in the Liveboard header on hover.
788
+ */
789
+ '--ts-var-liveboard-header-badge-hover-color'?: string;
790
+
791
+ /**
792
+ * Font color of the badge in the Liveboard header on active.
793
+ */
794
+ '--ts-var-liveboard-header-badge-active-color'?: string;
795
+
796
+ /**
797
+ * Font color of the hero text in the KPI widget.
798
+ */
799
+ '--ts-var-kpi-hero-color'?: string;
800
+
801
+ /**
802
+ * Font color of the comparison text in the KPI widget.
803
+ */
804
+ '--ts-var-kpi-comparison-color'?: string;
805
+
806
+ /**
807
+ * Font color of the analyze text in the KPI widget.
808
+ */
809
+ '--ts-var-kpi-analyze-text-color'?: string;
810
+
811
+ /**
812
+ * Font color of the legend title in the heatmap chart.
813
+ */
814
+ '--ts-var-chart-heatmap-legend-title-color'?: string;
815
+
816
+ /**
817
+ * Font color of the legend label in the heatmap chart.
818
+ */
819
+ '--ts-var-chart-heatmap-legend-label-color'?: string;
820
+
821
+ /**
822
+ * Font color of the legend title in the treemap chart.
823
+ */
824
+ '--ts-var-chart-treemap-legend-title-color'?: string;
825
+
826
+ /**
827
+ * Font color of the legend label in the treemap chart.
828
+ */
829
+ '--ts-var-chart-treemap-legend-label-color'?: string;
830
+
831
+ /**
832
+ * Color of the positive change in the KPI.
833
+ */
834
+ '--ts-var-kpi-positive-change-color'?: string;
835
+
836
+ /**
837
+ * Color of the negative change in the KPI.
838
+ */
839
+ '--ts-var-kpi-negative-change-color'?: string;
840
+
841
+ /**
842
+ * Background color of the change analysis insights.
843
+ */
844
+ '--ts-var-change-analysis-insights-background'?: string;
845
+
846
+ /**
847
+ * Background color of the forecasting card in the SpotIQ analyze.
848
+ */
849
+ '--ts-var-spotiq-analyze-forecasting-card-background'?: string;
850
+
851
+ /**
852
+ * Background color of the outlier card in the SpotIQ analyze.
853
+ */
854
+ '--ts-var-spotiq-analyze-outlier-card-background'?: string;
855
+
856
+ /**
857
+ * Background color of the trend card in the SpotIQ analyze.
858
+ */
859
+ '--ts-var-spotiq-analyze-trend-card-background'?: string;
860
+
861
+ /**
862
+ * Background color of the crosscorrelation card in the SpotIQ analyze.
863
+ */
864
+ '--ts-var-spotiq-analyze-crosscorrelation-card-background'?: string;
865
+
866
+ /**
867
+ * Background color of the summary header in the CCA modal.
868
+ */
869
+ '--ts-var-cca-modal-summary-header-background'?: string;
870
+ }
@@ -593,9 +593,10 @@ describe('App embed tests', () => {
593
593
  });
594
594
  });
595
595
 
596
- test('Should add navigationVersion=v3 & modularHomeExperience=false when primaryNavbarVersion is Sliding to the iframe src', async () => {
596
+ test('Should add navigationVersion=v3 & modularHomeExperience=true when primaryNavbarVersion is Sliding to the iframe src', async () => {
597
597
  const appEmbed = new AppEmbed(getRootEl(), {
598
598
  ...defaultViewConfig,
599
+ // Not included the homePage v2 config under discoveryExperience.
599
600
  discoveryExperience: {
600
601
  primaryNavbarVersion: PrimaryNavbarVersion.Sliding,
601
602
  },
@@ -605,7 +606,21 @@ describe('App embed tests', () => {
605
606
  await executeAfterWait(() => {
606
607
  expectUrlMatchesWithParams(
607
608
  getIFrameSrc(),
608
- `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=false&navigationVersion=v3${defaultParams}${defaultParamsPost}#/home`,
609
+ `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=true&navigationVersion=v3${defaultParams}${defaultParamsPost}#/home`,
610
+ );
611
+ });
612
+ });
613
+
614
+ test('Should add navigationVersion=v2 when primaryNavbarVersion is not added to the iframe src', async () => {
615
+ const appEmbed = new AppEmbed(getRootEl(), {
616
+ ...defaultViewConfig,
617
+ } as AppViewConfig);
618
+
619
+ appEmbed.render();
620
+ await executeAfterWait(() => {
621
+ expectUrlMatchesWithParams(
622
+ getIFrameSrc(),
623
+ `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=false&navigationVersion=v2${defaultParams}${defaultParamsPost}#/home`,
609
624
  );
610
625
  });
611
626
  });
package/src/embed/app.ts CHANGED
@@ -740,10 +740,18 @@ export class AppEmbed extends V1Embed {
740
740
  params[Param.DataPanelCustomGroupsAccordionInitialState] = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL;
741
741
  }
742
742
 
743
+ // Set navigation to v2 by default to avoid problems like the app
744
+ // switcher (9-dot menu) not showing when v3 navigation is turned on
745
+ // at the cluster level.
746
+ // To use v3 navigation, we must manually set the discoveryExperience
747
+ // settings.
748
+ params[Param.NavigationVersion] = 'v2';
743
749
  if (discoveryExperience) {
744
750
  // primaryNavbarVersion v3 will enabled the new left navigation
745
751
  if (discoveryExperience.primaryNavbarVersion === PrimaryNavbarVersion.Sliding) {
746
752
  params[Param.NavigationVersion] = discoveryExperience.primaryNavbarVersion;
753
+ // Enable the modularHomeExperience when Sliding is enabled.
754
+ params[Param.ModularHomeExperienceEnabled] = true;
747
755
  }
748
756
 
749
757
  // homePage v2 will enable the modular home page
@@ -41,7 +41,6 @@ export class ConversationMessage extends TsEmbed {
41
41
 
42
42
  protected getEmbedParamsObject() {
43
43
  const queryParams = this.getBaseQueryParams();
44
-
45
44
  queryParams[Param.HideActions] = [...(queryParams[Param.HideActions] ?? [])];
46
45
  queryParams[Param.isSpotterAgentEmbed] = true;
47
46
  return queryParams;
@@ -1,10 +1,8 @@
1
- import {
2
- SpotterEmbed,
3
- SpotterEmbedViewConfig,
4
- } from './conversation';
1
+ import { SpotterEmbed, SpotterEmbedViewConfig, ConversationEmbed } from './conversation';
2
+ import { TsEmbed } from './ts-embed';
5
3
  import * as authInstance from '../auth';
6
4
  import { Action, init } from '../index';
7
- import { AuthType, Param } from '../types';
5
+ import { AuthType, Param, RuntimeFilterOp } from '../types';
8
6
  import {
9
7
  getDocumentBody,
10
8
  getIFrameSrc,
@@ -180,4 +178,132 @@ describe('ConversationEmbed', () => {
180
178
  `http://${thoughtSpotHost}/v2/?${defaultParams}&${Param.DisableActions}=[%22${Action.InConversationTraining}%22]&${Param.DisableActionReason}=${disabledReason}&isSpotterExperienceEnabled=true&enableDataPanelV2=true#/embed/insights/conv-assist?worksheet=worksheetId&query=searchQuery`,
181
179
  );
182
180
  });
181
+
182
+ it('should render the conversation embed with runtime filters', async () => {
183
+ const viewConfig: SpotterEmbedViewConfig = {
184
+ worksheetId: 'worksheetId',
185
+ searchOptions: {
186
+ searchQuery: 'searchQuery',
187
+ },
188
+ runtimeFilters: [
189
+ {
190
+ columnName: 'revenue',
191
+ operator: RuntimeFilterOp.EQ,
192
+ values: [1000],
193
+ },
194
+ ],
195
+ };
196
+
197
+ const conversationEmbed = new SpotterEmbed(getRootEl(), viewConfig);
198
+ await conversationEmbed.render();
199
+ expectUrlMatchesWithParams(
200
+ getIFrameSrc(),
201
+ `http://${thoughtSpotHost}/v2/?${defaultParams}&isSpotterExperienceEnabled=true&col1=revenue&op1=EQ&val1=1000#/embed/insights/conv-assist?worksheet=worksheetId&query=searchQuery`,
202
+ );
203
+ });
204
+
205
+ it('should render the conversation embed with runtime parameters', async () => {
206
+ const viewConfig: SpotterEmbedViewConfig = {
207
+ worksheetId: 'worksheetId',
208
+ searchOptions: {
209
+ searchQuery: 'searchQuery',
210
+ },
211
+ runtimeParameters: [
212
+ {
213
+ name: 'Date Range',
214
+ value: '30',
215
+ },
216
+ ],
217
+ };
218
+
219
+ const conversationEmbed = new SpotterEmbed(getRootEl(), viewConfig);
220
+ await conversationEmbed.render();
221
+ expectUrlMatchesWithParams(
222
+ getIFrameSrc(),
223
+ `http://${thoughtSpotHost}/v2/?${defaultParams}&isSpotterExperienceEnabled=true&param1=Date%20Range&paramVal1=30#/embed/insights/conv-assist?worksheet=worksheetId&query=searchQuery`,
224
+ );
225
+ });
226
+
227
+ it('should render the conversation embed with runtime parameters excluded from URL', async () => {
228
+ const viewConfig: SpotterEmbedViewConfig = {
229
+ worksheetId: 'worksheetId',
230
+ searchOptions: {
231
+ searchQuery: 'searchQuery',
232
+ },
233
+ runtimeParameters: [
234
+ {
235
+ name: 'Date Range',
236
+ value: '30',
237
+ },
238
+ {
239
+ name: 'Region',
240
+ value: 'North America',
241
+ },
242
+ ],
243
+ excludeRuntimeParametersfromURL: true,
244
+ };
245
+
246
+ const conversationEmbed = new SpotterEmbed(getRootEl(), viewConfig);
247
+ await conversationEmbed.render();
248
+ expectUrlMatchesWithParams(
249
+ getIFrameSrc(),
250
+ `http://${thoughtSpotHost}/v2/?${defaultParams}&isSpotterExperienceEnabled=true#/embed/insights/conv-assist?worksheet=worksheetId&query=searchQuery`,
251
+ );
252
+ });
253
+
254
+ it('should render the conversation embed with both runtime filters and parameters', async () => {
255
+ const viewConfig: SpotterEmbedViewConfig = {
256
+ worksheetId: 'worksheetId',
257
+ searchOptions: {
258
+ searchQuery: 'searchQuery',
259
+ },
260
+ runtimeParameters: [
261
+ {
262
+ name: 'Date Range',
263
+ value: '30',
264
+ },
265
+ ],
266
+ runtimeFilters: [
267
+ {
268
+ columnName: 'revenue',
269
+ operator: RuntimeFilterOp.EQ,
270
+ values: [1000],
271
+ },
272
+ ],
273
+ excludeRuntimeParametersfromURL: false,
274
+ excludeRuntimeFiltersfromURL: false,
275
+ };
276
+
277
+ const conversationEmbed = new SpotterEmbed(getRootEl(), viewConfig);
278
+ await conversationEmbed.render();
279
+ expectUrlMatchesWithParams(
280
+ getIFrameSrc(),
281
+ `http://${thoughtSpotHost}/v2/?${defaultParams}&isSpotterExperienceEnabled=true&col1=revenue&op1=EQ&val1=1000&param1=Date%20Range&paramVal1=30#/embed/insights/conv-assist?worksheet=worksheetId&query=searchQuery`,
282
+ );
283
+ });
284
+
285
+ it('should ensure deprecated ConversationEmbed class maintains same functionality as SpotterEmbed', async () => {
286
+ const viewConfig: SpotterEmbedViewConfig = {
287
+ worksheetId: 'worksheetId',
288
+ searchOptions: {
289
+ searchQuery: 'searchQuery',
290
+ },
291
+ runtimeParameters: [
292
+ {
293
+ name: 'Date Range',
294
+ value: '30',
295
+ },
296
+ ],
297
+ };
298
+
299
+ // Test with deprecated class
300
+ const conversationEmbed = new ConversationEmbed(getRootEl(), viewConfig);
301
+ await conversationEmbed.render();
302
+
303
+ // Verify it generates the same URL structure as SpotterEmbed
304
+ expectUrlMatchesWithParams(
305
+ getIFrameSrc(),
306
+ `http://${thoughtSpotHost}/v2/?${defaultParams}&isSpotterExperienceEnabled=true&param1=Date%20Range&paramVal1=30#/embed/insights/conv-assist?worksheet=worksheetId&query=searchQuery`,
307
+ );
308
+ });
183
309
  });