@thoughtspot/visual-embed-sdk 1.50.1 → 1.51.0
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.
- package/cjs/package.json +1 -1
- package/cjs/src/css-variables.d.ts +36 -0
- package/cjs/src/css-variables.d.ts.map +1 -1
- package/cjs/src/embed/app.d.ts +106 -14
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +47 -36
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/app.spec.js +318 -149
- package/cjs/src/embed/app.spec.js.map +1 -1
- package/cjs/src/embed/conversation.d.ts +204 -1
- package/cjs/src/embed/conversation.d.ts.map +1 -1
- package/cjs/src/embed/conversation.js +19 -15
- package/cjs/src/embed/conversation.js.map +1 -1
- package/cjs/src/embed/conversation.spec.js +198 -17
- package/cjs/src/embed/conversation.spec.js.map +1 -1
- package/cjs/src/embed/events.spec.js +42 -0
- package/cjs/src/embed/events.spec.js.map +1 -1
- package/cjs/src/embed/host-events.spec.js +45 -0
- package/cjs/src/embed/host-events.spec.js.map +1 -1
- package/cjs/src/embed/hostEventClient/contracts.d.ts +15 -0
- package/cjs/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/cjs/src/embed/hostEventClient/contracts.js +1 -0
- package/cjs/src/embed/hostEventClient/contracts.js.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.js +1 -0
- package/cjs/src/embed/hostEventClient/host-event-client.js.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.spec.js +9 -0
- package/cjs/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts +36 -1
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +26 -6
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/liveboard.spec.js +83 -2
- package/cjs/src/embed/liveboard.spec.js.map +1 -1
- package/cjs/src/embed/spotter-utils.d.ts +8 -1
- package/cjs/src/embed/spotter-utils.d.ts.map +1 -1
- package/cjs/src/embed/spotter-utils.js +14 -1
- package/cjs/src/embed/spotter-utils.js.map +1 -1
- package/cjs/src/embed/spotter-utils.spec.js +61 -0
- package/cjs/src/embed/spotter-utils.spec.js.map +1 -1
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +15 -0
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/index.d.ts +2 -2
- package/cjs/src/index.d.ts.map +1 -1
- package/cjs/src/index.js.map +1 -1
- package/cjs/src/mixpanel-service.d.ts +4 -0
- package/cjs/src/mixpanel-service.d.ts.map +1 -1
- package/cjs/src/mixpanel-service.js +4 -0
- package/cjs/src/mixpanel-service.js.map +1 -1
- package/cjs/src/types.d.ts +460 -15
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +428 -8
- package/cjs/src/types.js.map +1 -1
- package/dist/{index-fCne7kmU.js → index-aBzH5ZwF.js} +1 -1
- package/dist/src/css-variables.d.ts +36 -0
- package/dist/src/css-variables.d.ts.map +1 -1
- package/dist/src/embed/app.d.ts +106 -14
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/conversation.d.ts +204 -1
- package/dist/src/embed/conversation.d.ts.map +1 -1
- package/dist/src/embed/hostEventClient/contracts.d.ts +15 -0
- package/dist/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/dist/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts +36 -1
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/embed/spotter-utils.d.ts +8 -1
- package/dist/src/embed/spotter-utils.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.d.ts.map +1 -1
- package/dist/src/index.d.ts +2 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/mixpanel-service.d.ts +4 -0
- package/dist/src/mixpanel-service.d.ts.map +1 -1
- package/dist/src/types.d.ts +460 -15
- package/dist/src/types.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +558 -69
- package/dist/tsembed-react.js +557 -68
- package/dist/tsembed.es.js +556 -68
- package/dist/tsembed.js +555 -67
- package/dist/visual-embed-sdk-react-full.d.ts +845 -27
- package/dist/visual-embed-sdk-react.d.ts +851 -29
- package/dist/visual-embed-sdk.d.ts +855 -29
- package/lib/package.json +1 -1
- package/lib/src/css-variables.d.ts +36 -0
- package/lib/src/css-variables.d.ts.map +1 -1
- package/lib/src/embed/app.d.ts +106 -14
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +48 -37
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/app.spec.js +319 -150
- package/lib/src/embed/app.spec.js.map +1 -1
- package/lib/src/embed/conversation.d.ts +204 -1
- package/lib/src/embed/conversation.d.ts.map +1 -1
- package/lib/src/embed/conversation.js +21 -17
- package/lib/src/embed/conversation.js.map +1 -1
- package/lib/src/embed/conversation.spec.js +198 -17
- package/lib/src/embed/conversation.spec.js.map +1 -1
- package/lib/src/embed/events.spec.js +42 -0
- package/lib/src/embed/events.spec.js.map +1 -1
- package/lib/src/embed/host-events.spec.js +45 -0
- package/lib/src/embed/host-events.spec.js.map +1 -1
- package/lib/src/embed/hostEventClient/contracts.d.ts +15 -0
- package/lib/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/lib/src/embed/hostEventClient/contracts.js +1 -0
- package/lib/src/embed/hostEventClient/contracts.js.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.js +1 -0
- package/lib/src/embed/hostEventClient/host-event-client.js.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.spec.js +9 -0
- package/lib/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts +36 -1
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +26 -6
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +83 -2
- package/lib/src/embed/liveboard.spec.js.map +1 -1
- package/lib/src/embed/spotter-utils.d.ts +8 -1
- package/lib/src/embed/spotter-utils.d.ts.map +1 -1
- package/lib/src/embed/spotter-utils.js +12 -0
- package/lib/src/embed/spotter-utils.js.map +1 -1
- package/lib/src/embed/spotter-utils.spec.js +62 -1
- package/lib/src/embed/spotter-utils.spec.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +15 -0
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/index.d.ts +2 -2
- package/lib/src/index.d.ts.map +1 -1
- package/lib/src/index.js.map +1 -1
- package/lib/src/mixpanel-service.d.ts +4 -0
- package/lib/src/mixpanel-service.d.ts.map +1 -1
- package/lib/src/mixpanel-service.js +4 -0
- package/lib/src/mixpanel-service.js.map +1 -1
- package/lib/src/types.d.ts +460 -15
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +428 -8
- package/lib/src/types.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +855 -29
- package/package.json +1 -1
- package/src/css-variables.ts +45 -0
- package/src/embed/app.spec.ts +390 -183
- package/src/embed/app.ts +172 -65
- package/src/embed/conversation.spec.ts +243 -20
- package/src/embed/conversation.ts +233 -17
- package/src/embed/events.spec.ts +52 -0
- package/src/embed/host-events.spec.ts +70 -0
- package/src/embed/hostEventClient/contracts.ts +16 -0
- package/src/embed/hostEventClient/host-event-client.spec.ts +12 -0
- package/src/embed/hostEventClient/host-event-client.ts +1 -0
- package/src/embed/liveboard.spec.ts +108 -2
- package/src/embed/liveboard.ts +76 -14
- package/src/embed/spotter-utils.spec.ts +68 -1
- package/src/embed/spotter-utils.ts +16 -1
- package/src/embed/ts-embed.ts +18 -0
- package/src/index.ts +2 -1
- package/src/mixpanel-service.ts +4 -0
- package/src/types.ts +462 -14
package/src/embed/app.ts
CHANGED
|
@@ -22,8 +22,8 @@ import {
|
|
|
22
22
|
SpotterFileUploadFileTypes,
|
|
23
23
|
} from '../types';
|
|
24
24
|
import { V1Embed } from './ts-embed';
|
|
25
|
-
import { SpotterChatViewConfig, SpotterSidebarViewConfig, SpotterQueryMode } from './conversation';
|
|
26
|
-
import { buildSpotterSidebarAppInitData } from './spotter-utils';
|
|
25
|
+
import { SpotterChatViewConfig, SpotterSidebarViewConfig, SpotterQueryMode, SpotterShareConversationConfig } from './conversation';
|
|
26
|
+
import { buildSpotterSidebarAppInitData, buildSpotterShareConversationAppInitData } from './spotter-utils';
|
|
27
27
|
import { SpotterVizConfig, buildSpotterVizAppInitData } from './spotter-viz-utils';
|
|
28
28
|
|
|
29
29
|
/**
|
|
@@ -115,6 +115,9 @@ export enum HomePage {
|
|
|
115
115
|
/**
|
|
116
116
|
* Modular (v2) introduces the updated Modular Home Experience.
|
|
117
117
|
* It serves as the foundational version of the home page.
|
|
118
|
+
* Use {@link HomePage.ModularWithStylingChanges} (V3) or
|
|
119
|
+
* {@link HomePage.Focused} (V4) instead.
|
|
120
|
+
* @deprecated V1 and V2 home page experiences are deprecated.
|
|
118
121
|
*/
|
|
119
122
|
Modular = 'v2',
|
|
120
123
|
/**
|
|
@@ -124,7 +127,7 @@ export enum HomePage {
|
|
|
124
127
|
ModularWithStylingChanges = 'v3',
|
|
125
128
|
/**
|
|
126
129
|
* Focused (v4) introduces the V4 homepage experience
|
|
127
|
-
* in which Watchlist and recents and incorporated together
|
|
130
|
+
* in which Watchlist and recents and incorporated together
|
|
128
131
|
* to form a more focused homepage.
|
|
129
132
|
* Pre-requisite : spotter enablement
|
|
130
133
|
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
@@ -191,13 +194,14 @@ export interface AppViewConfig extends AllEmbedViewConfig {
|
|
|
191
194
|
showPrimaryNavbar?: boolean;
|
|
192
195
|
/**
|
|
193
196
|
* Control the visibility of the left navigation panel on the home page
|
|
194
|
-
* in the
|
|
197
|
+
* in the V3 and V4 navigation and home page experience.
|
|
195
198
|
* If `showPrimaryNavbar` is true, that is, if the Global and Homepage
|
|
196
199
|
* navigation bars are visible, this flag will only hide the left navigation bar
|
|
197
200
|
* on the home page.
|
|
198
201
|
* The `showPrimaryNavbar` flag takes precedence over the `hideHomepageLeftNav`.
|
|
199
202
|
*
|
|
200
|
-
* **Note**:
|
|
203
|
+
* **Note**: The classic (V1) and Modular (V2) home page experiences are
|
|
204
|
+
* deprecated. This attribute applies to V3 and V4 home page experiences.
|
|
201
205
|
*
|
|
202
206
|
* Supported embed types: `AppEmbed`
|
|
203
207
|
* @version SDK: 1.28.0 | ThoughtSpot: 9.12.5.cl
|
|
@@ -263,11 +267,10 @@ export interface AppViewConfig extends AllEmbedViewConfig {
|
|
|
263
267
|
hideHamburger?: boolean;
|
|
264
268
|
/**
|
|
265
269
|
* Control the visibility of the object search
|
|
266
|
-
* on the top navigation bar in the
|
|
267
|
-
* V2 and V3 navigation experience.
|
|
270
|
+
* on the top navigation bar in the V3 navigation experience.
|
|
268
271
|
*
|
|
269
|
-
* **Note**:
|
|
270
|
-
*
|
|
272
|
+
* **Note**: The classic (V1) and V2 navigation experiences are
|
|
273
|
+
* deprecated. This attribute applies to the V3 navigation experience.
|
|
271
274
|
*
|
|
272
275
|
* Supported embed types: `AppEmbed`
|
|
273
276
|
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
@@ -285,8 +288,8 @@ export interface AppViewConfig extends AllEmbedViewConfig {
|
|
|
285
288
|
* Control the visibility of the notification icon
|
|
286
289
|
* on the top navigation bar in V3 navigation experience.
|
|
287
290
|
*
|
|
288
|
-
* **Note**:
|
|
289
|
-
*
|
|
291
|
+
* **Note**: The classic (V1) and V2 experience modes are deprecated.
|
|
292
|
+
* This attribute applies to the V3 experience.
|
|
290
293
|
*
|
|
291
294
|
* Supported embed types: `AppEmbed`
|
|
292
295
|
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
@@ -301,14 +304,14 @@ export interface AppViewConfig extends AllEmbedViewConfig {
|
|
|
301
304
|
*/
|
|
302
305
|
hideNotification?: boolean;
|
|
303
306
|
/**
|
|
304
|
-
* Control the visibility of the application selection menu
|
|
305
|
-
* in the top navigation bar in the V2 experience.
|
|
307
|
+
* Control the visibility of the application selection menu.
|
|
306
308
|
* In the V3 experience, it shows or hides application selection
|
|
307
309
|
* icons on the left navigation panel.
|
|
308
310
|
* By default, the application selection menu and icons are
|
|
309
311
|
* shown in the UI.
|
|
310
312
|
*
|
|
311
|
-
* **Note**:
|
|
313
|
+
* **Note**: The classic (V1) and V2 experiences are deprecated.
|
|
314
|
+
* This attribute applies to the V3 experience.
|
|
312
315
|
*
|
|
313
316
|
* Supported embed types: `AppEmbed`
|
|
314
317
|
* @version SDK: 1.28.0 | ThoughtSpot: 9.12.5.cl
|
|
@@ -326,7 +329,8 @@ export interface AppViewConfig extends AllEmbedViewConfig {
|
|
|
326
329
|
* Control the visibility of the Org switcher button on the nav-bar.
|
|
327
330
|
* By default, the Org switcher button is shown.
|
|
328
331
|
*
|
|
329
|
-
* **Note**:
|
|
332
|
+
* **Note**: The classic (V1) experience is deprecated. This attribute
|
|
333
|
+
* applies to V2 (deprecated), V3 and V4 experiences.
|
|
330
334
|
*
|
|
331
335
|
* Supported embed types: `AppEmbed`
|
|
332
336
|
* @version SDK: 1.28.0 | ThoughtSpot: 9.12.5.cl
|
|
@@ -485,6 +489,10 @@ export interface AppViewConfig extends AllEmbedViewConfig {
|
|
|
485
489
|
* Supported embed types: `AppEmbed`
|
|
486
490
|
* @version SDK: 1.28.0 | ThoughtSpot: 9.12.5.cl
|
|
487
491
|
* @default false
|
|
492
|
+
* Use the discoveryExperience.homePage option with
|
|
493
|
+
* {@link HomePage.ModularWithStylingChanges} (V3) or
|
|
494
|
+
* {@link HomePage.Focused} (V4) instead.
|
|
495
|
+
* @deprecated The V1 and V2 home page experiences are deprecated.
|
|
488
496
|
* @example
|
|
489
497
|
* ```js
|
|
490
498
|
* const embed = new AppEmbed('#tsEmbed', {
|
|
@@ -620,11 +628,12 @@ export interface AppViewConfig extends AllEmbedViewConfig {
|
|
|
620
628
|
/**
|
|
621
629
|
* Enables the 'what you see is what you get' PDF export for Liveboards. Each tab is rendered on a single page
|
|
622
630
|
* following the exact UI layout, instead of splitting visualizations across multiple A4 pages.
|
|
623
|
-
* This feature is GA from version
|
|
631
|
+
* This feature is GA from SDK version 1.51.0 and ThoughtSpot version 26.8.0.cl.
|
|
624
632
|
*
|
|
625
633
|
* Supported embed types: `AppEmbed`, `LiveboardEmbed`
|
|
626
634
|
* @type {boolean}
|
|
627
635
|
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
636
|
+
* @default true
|
|
628
637
|
* @example
|
|
629
638
|
* ```js
|
|
630
639
|
* // Replace <EmbedComponent> with embed component name. For example, AppEmbed or LiveboardEmbed
|
|
@@ -638,10 +647,12 @@ export interface AppViewConfig extends AllEmbedViewConfig {
|
|
|
638
647
|
|
|
639
648
|
/**
|
|
640
649
|
* This flag is used to enable/disable the XLSX/CSV download option for Liveboards
|
|
650
|
+
* This feature is GA from SDK version 1.51.0 and ThoughtSpot version 26.6.0.cl
|
|
641
651
|
*
|
|
642
652
|
* Supported embed types: `AppEmbed`, `LiveboardEmbed`
|
|
643
653
|
* @type {boolean}
|
|
644
654
|
* @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl
|
|
655
|
+
* @default true
|
|
645
656
|
* @example
|
|
646
657
|
* ```js
|
|
647
658
|
* // Replace <EmbedComponent> with embed component name. For example, AppEmbed or LiveboardEmbed
|
|
@@ -655,10 +666,12 @@ export interface AppViewConfig extends AllEmbedViewConfig {
|
|
|
655
666
|
|
|
656
667
|
/**
|
|
657
668
|
* This flag is used to enable/disable the granular XLSX/CSV schedules feature
|
|
669
|
+
* This feature is GA from SDK version 1.51.0 and ThoughtSpot version 26.6.0.cl
|
|
658
670
|
*
|
|
659
671
|
* Supported embed types: `AppEmbed`, `LiveboardEmbed`
|
|
660
672
|
* @type {boolean}
|
|
661
673
|
* @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl
|
|
674
|
+
* @default true
|
|
662
675
|
* @example
|
|
663
676
|
* ```js
|
|
664
677
|
* // Replace <EmbedComponent> with embed component name. For example, AppEmbed or LiveboardEmbed
|
|
@@ -737,6 +750,21 @@ export interface AppViewConfig extends AllEmbedViewConfig {
|
|
|
737
750
|
* ```
|
|
738
751
|
*/
|
|
739
752
|
updatedSpotterChatPrompt?: boolean;
|
|
753
|
+
/**
|
|
754
|
+
* showSpotterRadiance : Controls the radiance on the Spotter page.
|
|
755
|
+
*
|
|
756
|
+
* Supported embed types: `AppEmbed`
|
|
757
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
758
|
+
* @default false
|
|
759
|
+
* @example
|
|
760
|
+
* ```js
|
|
761
|
+
* const embed = new AppEmbed('#tsEmbed', {
|
|
762
|
+
* ... //other embed view config
|
|
763
|
+
* showSpotterRadiance : true,
|
|
764
|
+
* })
|
|
765
|
+
* ```
|
|
766
|
+
*/
|
|
767
|
+
showSpotterRadiance?: boolean;
|
|
740
768
|
/**
|
|
741
769
|
* Sets the default query mode when Spotter loads — Fast Search or
|
|
742
770
|
* Research Mode. Applies fresh on every new session for this embed
|
|
@@ -781,6 +809,10 @@ export interface AppViewConfig extends AllEmbedViewConfig {
|
|
|
781
809
|
* spotterSidebarConfig: {
|
|
782
810
|
* enablePastConversationsSidebar: true,
|
|
783
811
|
* spotterSidebarTitle: 'My Conversations',
|
|
812
|
+
* // Opt in to pin/unpin conversations in embedded Spotter
|
|
813
|
+
* spotterChatPinConfig: {
|
|
814
|
+
* enabled: true,
|
|
815
|
+
* },
|
|
784
816
|
* },
|
|
785
817
|
* })
|
|
786
818
|
* ```
|
|
@@ -804,6 +836,49 @@ export interface AppViewConfig extends AllEmbedViewConfig {
|
|
|
804
836
|
* ```
|
|
805
837
|
*/
|
|
806
838
|
spotterChatConfig?: SpotterChatViewConfig;
|
|
839
|
+
/**
|
|
840
|
+
* Configuration for the Spotter conversation sharing feature.
|
|
841
|
+
*
|
|
842
|
+
* Supported embed types: `AppEmbed`
|
|
843
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
844
|
+
* @example
|
|
845
|
+
* ```js
|
|
846
|
+
* const embed = new AppEmbed('#tsEmbed', {
|
|
847
|
+
* ... //other embed view config
|
|
848
|
+
* spotterShareConversationConfig: {
|
|
849
|
+
* enableShareConversation: true,
|
|
850
|
+
* },
|
|
851
|
+
* })
|
|
852
|
+
* ```
|
|
853
|
+
*/
|
|
854
|
+
spotterShareConversationConfig?: SpotterShareConversationConfig;
|
|
855
|
+
/**
|
|
856
|
+
* Sets the default data sources (Models) for the Spotter experience shown on
|
|
857
|
+
* the home page of the full app embed. Accepts a list of Model GUIDs to
|
|
858
|
+
* preselect the data sources available to Spotter, or the literal
|
|
859
|
+
* `'auto_mode'` sentinel to load Spotter with the "Auto" model selected by
|
|
860
|
+
* default. This is consistent with how `worksheetId: 'auto_mode'` enables
|
|
861
|
+
* Auto mode in `SpotterEmbed`.
|
|
862
|
+
*
|
|
863
|
+
* **Note**: If `'auto_mode'` is included alongside one or more Model GUIDs,
|
|
864
|
+
* `'auto_mode'` takes precedence and is selected by default.
|
|
865
|
+
*
|
|
866
|
+
* **Note**: `'auto_mode'` requires the Spotter 3 experience with data source
|
|
867
|
+
* discovery enabled on your instance, and a Spotter-enabled home page (for
|
|
868
|
+
* example, `discoveryExperience.homePage: HomePage.Focused`).
|
|
869
|
+
*
|
|
870
|
+
* Supported embed types: `AppEmbed`
|
|
871
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
872
|
+
* @example
|
|
873
|
+
* ```js
|
|
874
|
+
* const embed = new AppEmbed('#tsEmbed', {
|
|
875
|
+
* ... // other embed view config
|
|
876
|
+
* discoveryExperience: { homePage: HomePage.Focused },
|
|
877
|
+
* spotterDataSources: ['model-guid-1', 'model-guid-2'], // or ['auto_mode']
|
|
878
|
+
* })
|
|
879
|
+
* ```
|
|
880
|
+
*/
|
|
881
|
+
spotterDataSources?: string[];
|
|
807
882
|
/**
|
|
808
883
|
* Configuration for the SpotterViz interface shown on the Liveboard.
|
|
809
884
|
* Customize the brand name, description, chat input placeholder,
|
|
@@ -900,6 +975,22 @@ export interface AppViewConfig extends AllEmbedViewConfig {
|
|
|
900
975
|
* @version SDK: 1.49.0 | ThoughtSpot: 26.6.0.cl
|
|
901
976
|
*/
|
|
902
977
|
visualOverrides?: VisualizationOverrides;
|
|
978
|
+
|
|
979
|
+
/**
|
|
980
|
+
* updatedSpotterExperience : Controls the updated Spotter experience.
|
|
981
|
+
*
|
|
982
|
+
* Supported embed types: `AppEmbed`
|
|
983
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
984
|
+
* @default false
|
|
985
|
+
* @example
|
|
986
|
+
* ```js
|
|
987
|
+
* const embed = new AppEmbed('#tsEmbed', {
|
|
988
|
+
* ... //other embed view config
|
|
989
|
+
* updatedSpotterExperience : true,
|
|
990
|
+
* })
|
|
991
|
+
* ```
|
|
992
|
+
*/
|
|
993
|
+
updatedSpotterExperience?: boolean;
|
|
903
994
|
}
|
|
904
995
|
|
|
905
996
|
/**
|
|
@@ -910,6 +1001,7 @@ export interface AppEmbedAppInitData extends DefaultAppInitData {
|
|
|
910
1001
|
embedParams?: {
|
|
911
1002
|
spotterSidebarConfig?: SpotterSidebarViewConfig;
|
|
912
1003
|
spotterVizConfig?: SpotterVizConfig;
|
|
1004
|
+
spotterShareConversationConfig?: SpotterShareConversationConfig;
|
|
913
1005
|
};
|
|
914
1006
|
}
|
|
915
1007
|
|
|
@@ -959,7 +1051,8 @@ export class AppEmbed extends V1Embed {
|
|
|
959
1051
|
this.viewConfig,
|
|
960
1052
|
this.handleError.bind(this),
|
|
961
1053
|
);
|
|
962
|
-
|
|
1054
|
+
const vizInitData = buildSpotterVizAppInitData(sidebarInitData, this.viewConfig);
|
|
1055
|
+
return buildSpotterShareConversationAppInitData(vizInitData, this.viewConfig);
|
|
963
1056
|
}
|
|
964
1057
|
|
|
965
1058
|
/**
|
|
@@ -967,6 +1060,11 @@ export class AppEmbed extends V1Embed {
|
|
|
967
1060
|
* embedded Liveboard or visualization.
|
|
968
1061
|
*/
|
|
969
1062
|
protected getEmbedParams() {
|
|
1063
|
+
const params = this.getEmbedParamsObject();
|
|
1064
|
+
return getQueryParamString(params, true);
|
|
1065
|
+
}
|
|
1066
|
+
|
|
1067
|
+
protected getEmbedParamsObject() {
|
|
970
1068
|
const {
|
|
971
1069
|
tag,
|
|
972
1070
|
hideTagFilterChips,
|
|
@@ -983,14 +1081,15 @@ export class AppEmbed extends V1Embed {
|
|
|
983
1081
|
newConnectionsExperience,
|
|
984
1082
|
fullHeight,
|
|
985
1083
|
dataPanelV2 = true,
|
|
1084
|
+
updatedSpotterExperience,
|
|
986
1085
|
hideLiveboardHeader = false,
|
|
987
1086
|
showLiveboardTitle = true,
|
|
988
1087
|
showLiveboardDescription = true,
|
|
989
1088
|
showMaskedFilterChip = false,
|
|
990
|
-
isLiveboardMasterpiecesEnabled
|
|
1089
|
+
isLiveboardMasterpiecesEnabled,
|
|
991
1090
|
newChartsLibrary,
|
|
992
1091
|
hideHomepageLeftNav = false,
|
|
993
|
-
modularHomeExperience
|
|
1092
|
+
modularHomeExperience,
|
|
994
1093
|
isLiveboardHeaderSticky = true,
|
|
995
1094
|
enableAskSage,
|
|
996
1095
|
collapseSearchBarInitially = false,
|
|
@@ -998,30 +1097,33 @@ export class AppEmbed extends V1Embed {
|
|
|
998
1097
|
enableCustomColumnGroups = false,
|
|
999
1098
|
dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL,
|
|
1000
1099
|
collapseSearchBar = true,
|
|
1001
|
-
isLiveboardCompactHeaderEnabled
|
|
1100
|
+
isLiveboardCompactHeaderEnabled,
|
|
1002
1101
|
showLiveboardVerifiedBadge = true,
|
|
1003
1102
|
showLiveboardReverifyBanner = true,
|
|
1004
|
-
hideIrrelevantChipsInLiveboardTabs
|
|
1005
|
-
isEnhancedFilterInteractivityEnabled
|
|
1103
|
+
hideIrrelevantChipsInLiveboardTabs,
|
|
1104
|
+
isEnhancedFilterInteractivityEnabled,
|
|
1006
1105
|
homePageSearchBarMode,
|
|
1007
1106
|
isUnifiedSearchExperienceEnabled = true,
|
|
1008
1107
|
enablePendoHelp = true,
|
|
1009
1108
|
discoveryExperience,
|
|
1010
|
-
coverAndFilterOptionInPDF
|
|
1109
|
+
coverAndFilterOptionInPDF,
|
|
1011
1110
|
isLiveboardStylingAndGroupingEnabled,
|
|
1012
1111
|
isPNGInScheduledEmailsEnabled = false,
|
|
1013
|
-
isLiveboardXLSXCSVDownloadEnabled
|
|
1014
|
-
isGranularXLSXCSVSchedulesEnabled
|
|
1112
|
+
isLiveboardXLSXCSVDownloadEnabled,
|
|
1113
|
+
isGranularXLSXCSVSchedulesEnabled,
|
|
1015
1114
|
isCentralizedLiveboardFilterUXEnabled = false,
|
|
1115
|
+
isScopedLiveboardFilteringEnabled,
|
|
1016
1116
|
isLinkParametersEnabled,
|
|
1017
1117
|
updatedSpotterChatPrompt,
|
|
1118
|
+
showSpotterRadiance,
|
|
1018
1119
|
defaultQueryMode,
|
|
1019
1120
|
enableStopAnswerGenerationEmbed,
|
|
1020
1121
|
spotterChatConfig,
|
|
1122
|
+
spotterDataSources,
|
|
1021
1123
|
minimumHeight,
|
|
1022
1124
|
isThisPeriodInDateFiltersEnabled,
|
|
1023
1125
|
enableHomepageAnnouncement = false,
|
|
1024
|
-
isContinuousLiveboardPDFEnabled
|
|
1126
|
+
isContinuousLiveboardPDFEnabled,
|
|
1025
1127
|
enableLiveboardDataCache,
|
|
1026
1128
|
} = this.viewConfig;
|
|
1027
1129
|
|
|
@@ -1034,27 +1136,41 @@ export class AppEmbed extends V1Embed {
|
|
|
1034
1136
|
params[Param.ShowLiveboardTitle] = showLiveboardTitle;
|
|
1035
1137
|
params[Param.ShowLiveboardDescription] = !!showLiveboardDescription;
|
|
1036
1138
|
params[Param.ShowMaskedFilterChip] = showMaskedFilterChip;
|
|
1037
|
-
|
|
1139
|
+
if (!isUndefined(isLiveboardMasterpiecesEnabled)) {
|
|
1140
|
+
params[Param.IsLiveboardMasterpiecesEnabled] = isLiveboardMasterpiecesEnabled;
|
|
1141
|
+
}
|
|
1038
1142
|
if (newChartsLibrary !== undefined) {
|
|
1039
1143
|
params[Param.EnableNewChartLibrary] = newChartsLibrary;
|
|
1040
1144
|
}
|
|
1041
1145
|
params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
|
|
1042
1146
|
params[Param.IsFullAppEmbed] = true;
|
|
1043
|
-
|
|
1044
|
-
|
|
1147
|
+
if (!isUndefined(isLiveboardCompactHeaderEnabled)) {
|
|
1148
|
+
params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
|
|
1149
|
+
}
|
|
1150
|
+
if (!isUndefined(isEnhancedFilterInteractivityEnabled)) {
|
|
1151
|
+
params[Param.IsEnhancedFilterInteractivityEnabled] =
|
|
1152
|
+
isEnhancedFilterInteractivityEnabled;
|
|
1153
|
+
}
|
|
1045
1154
|
params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;
|
|
1046
1155
|
params[Param.ShowLiveboardReverifyBanner] = showLiveboardReverifyBanner;
|
|
1047
|
-
|
|
1156
|
+
if (!isUndefined(hideIrrelevantChipsInLiveboardTabs)) {
|
|
1157
|
+
params[Param.HideIrrelevantFiltersInTab] = hideIrrelevantChipsInLiveboardTabs;
|
|
1158
|
+
}
|
|
1048
1159
|
if (isUnifiedSearchExperienceEnabled !== undefined) {
|
|
1049
1160
|
params[Param.IsUnifiedSearchExperienceEnabled] = isUnifiedSearchExperienceEnabled;
|
|
1050
1161
|
}
|
|
1051
|
-
|
|
1162
|
+
if (!isUndefined(coverAndFilterOptionInPDF)) {
|
|
1163
|
+
params[Param.CoverAndFilterOptionInPDF] = !!coverAndFilterOptionInPDF;
|
|
1164
|
+
}
|
|
1052
1165
|
|
|
1053
1166
|
params = this.getBaseQueryParams(params);
|
|
1054
1167
|
|
|
1055
1168
|
if (!isUndefined(updatedSpotterChatPrompt)) {
|
|
1056
1169
|
params[Param.UpdatedSpotterChatPrompt] = !!updatedSpotterChatPrompt;
|
|
1057
1170
|
}
|
|
1171
|
+
if (!isUndefined(showSpotterRadiance)) {
|
|
1172
|
+
params[Param.ShowSpotterRadiance] = !!showSpotterRadiance;
|
|
1173
|
+
}
|
|
1058
1174
|
if (!isUndefined(defaultQueryMode)) {
|
|
1059
1175
|
params[Param.DefaultQueryMode] = defaultQueryMode;
|
|
1060
1176
|
}
|
|
@@ -1062,6 +1178,10 @@ export class AppEmbed extends V1Embed {
|
|
|
1062
1178
|
params[Param.EnableStopAnswerGenerationEmbed] = !!enableStopAnswerGenerationEmbed;
|
|
1063
1179
|
}
|
|
1064
1180
|
|
|
1181
|
+
if (spotterDataSources && spotterDataSources.length) {
|
|
1182
|
+
params[Param.SpotterDataSources] = JSON.stringify(spotterDataSources);
|
|
1183
|
+
}
|
|
1184
|
+
|
|
1065
1185
|
// Handle spotterChatConfig params
|
|
1066
1186
|
if (spotterChatConfig) {
|
|
1067
1187
|
const {
|
|
@@ -1085,6 +1205,10 @@ export class AppEmbed extends V1Embed {
|
|
|
1085
1205
|
}
|
|
1086
1206
|
}
|
|
1087
1207
|
|
|
1208
|
+
if (!isUndefined(updatedSpotterExperience)) {
|
|
1209
|
+
params[Param.UpdatedSpotterExperience] = !!updatedSpotterExperience;
|
|
1210
|
+
}
|
|
1211
|
+
|
|
1088
1212
|
if (hideObjectSearch) {
|
|
1089
1213
|
params[Param.HideObjectSearch] = !!hideObjectSearch;
|
|
1090
1214
|
}
|
|
@@ -1173,6 +1297,12 @@ export class AppEmbed extends V1Embed {
|
|
|
1173
1297
|
] = isCentralizedLiveboardFilterUXEnabled;
|
|
1174
1298
|
}
|
|
1175
1299
|
|
|
1300
|
+
if (isScopedLiveboardFilteringEnabled !== undefined) {
|
|
1301
|
+
params[
|
|
1302
|
+
Param.isScopedLiveboardFilteringEnabled
|
|
1303
|
+
] = isScopedLiveboardFilteringEnabled;
|
|
1304
|
+
}
|
|
1305
|
+
|
|
1176
1306
|
if (isThisPeriodInDateFiltersEnabled !== undefined) {
|
|
1177
1307
|
params[Param.IsThisPeriodInDateFiltersEnabled] = isThisPeriodInDateFiltersEnabled;
|
|
1178
1308
|
}
|
|
@@ -1193,7 +1323,6 @@ export class AppEmbed extends V1Embed {
|
|
|
1193
1323
|
|
|
1194
1324
|
params[Param.DataPanelV2Enabled] = dataPanelV2;
|
|
1195
1325
|
params[Param.HideHomepageLeftNav] = hideHomepageLeftNav;
|
|
1196
|
-
params[Param.ModularHomeExperienceEnabled] = modularHomeExperience;
|
|
1197
1326
|
params[Param.CollapseSearchBarInitially] = collapseSearchBarInitially || collapseSearchBar;
|
|
1198
1327
|
params[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
|
|
1199
1328
|
if (dataPanelCustomGroupsAccordionInitialState
|
|
@@ -1214,41 +1343,21 @@ export class AppEmbed extends V1Embed {
|
|
|
1214
1343
|
params[Param.ModularHomeExperienceEnabled] = modularHomeExperience;
|
|
1215
1344
|
}
|
|
1216
1345
|
|
|
1217
|
-
//
|
|
1218
|
-
//
|
|
1219
|
-
//
|
|
1220
|
-
//
|
|
1221
|
-
//
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
params[Param.HomepageVersion] = 'v2';
|
|
1226
|
-
if (discoveryExperience) {
|
|
1227
|
-
// primaryNavbarVersion v3 will enabled the new left navigation
|
|
1228
|
-
if (discoveryExperience.primaryNavbarVersion === PrimaryNavbarVersion.Sliding) {
|
|
1229
|
-
params[Param.NavigationVersion] = discoveryExperience.primaryNavbarVersion;
|
|
1230
|
-
// Enable the modularHomeExperience when Sliding is enabled.
|
|
1231
|
-
params[Param.ModularHomeExperienceEnabled] = true;
|
|
1232
|
-
}
|
|
1233
|
-
|
|
1234
|
-
// homePage v2 will enable the modular home page
|
|
1235
|
-
// and it will override the modularHomeExperience value
|
|
1236
|
-
if (discoveryExperience.homePage === HomePage.Modular) {
|
|
1237
|
-
params[Param.ModularHomeExperienceEnabled] = true;
|
|
1238
|
-
}
|
|
1239
|
-
|
|
1240
|
-
// ModularWithStylingChanges (v3) introduces the styling changes
|
|
1241
|
-
// to the Modular Homepage.
|
|
1242
|
-
// v3 will be the base version of homePageVersion.
|
|
1243
|
-
if (discoveryExperience.homePage === HomePage.ModularWithStylingChanges) {
|
|
1244
|
-
params[Param.HomepageVersion] = HomePage.ModularWithStylingChanges;
|
|
1245
|
-
}
|
|
1346
|
+
// Navigation V1/V2 and home page V1/V2 are deprecated. V3 is now the
|
|
1347
|
+
// default experience, Need to send navigationVersion=v3 and
|
|
1348
|
+
// homepageVersion=v3 even when the no discoveryExperience /
|
|
1349
|
+
// modularHomeExperience config is set. Without these
|
|
1350
|
+
// params, older TSA versions (< 26.7) fall back to V2 for nav and
|
|
1351
|
+
// home page, so the defaults must be sent explicitly from the SDK.
|
|
1352
|
+
params[Param.NavigationVersion] = PrimaryNavbarVersion.Sliding;
|
|
1353
|
+
params[Param.HomepageVersion] = HomePage.ModularWithStylingChanges;
|
|
1246
1354
|
|
|
1355
|
+
if (discoveryExperience) {
|
|
1247
1356
|
// listPageVersion can be changed to v2 or v3
|
|
1248
1357
|
if (discoveryExperience.listPageVersion !== undefined) {
|
|
1249
1358
|
params[Param.ListPageVersion] = discoveryExperience.listPageVersion;
|
|
1250
1359
|
}
|
|
1251
|
-
|
|
1360
|
+
|
|
1252
1361
|
if (discoveryExperience.homePage === HomePage.Focused) {
|
|
1253
1362
|
params[Param.HomepageVersion] = HomePage.Focused;
|
|
1254
1363
|
// The Focused (V4) homepage experience requires the updated
|
|
@@ -1260,9 +1369,7 @@ export class AppEmbed extends V1Embed {
|
|
|
1260
1369
|
}
|
|
1261
1370
|
}
|
|
1262
1371
|
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
return queryParams;
|
|
1372
|
+
return params;
|
|
1266
1373
|
}
|
|
1267
1374
|
|
|
1268
1375
|
private sendFullHeightLazyLoadData = () => {
|