@thoughtspot/visual-embed-sdk 1.39.1 → 1.39.2-alpha.2
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/config.spec.js +9 -0
- package/cjs/src/config.spec.js.map +1 -1
- package/cjs/src/embed/app.d.ts +75 -15
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +69 -9
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/app.spec.js +374 -12
- package/cjs/src/embed/app.spec.js.map +1 -1
- package/cjs/src/embed/bodyless-conversation.d.ts +19 -7
- package/cjs/src/embed/bodyless-conversation.d.ts.map +1 -1
- package/cjs/src/embed/bodyless-conversation.js +24 -4
- package/cjs/src/embed/bodyless-conversation.js.map +1 -1
- package/cjs/src/embed/bodyless-conversation.spec.js +8 -190
- package/cjs/src/embed/bodyless-conversation.spec.js.map +1 -1
- package/cjs/src/embed/conversation.spec.js +28 -0
- package/cjs/src/embed/conversation.spec.js.map +1 -1
- package/cjs/src/embed/embedConfig.d.ts +9 -7
- package/cjs/src/embed/embedConfig.d.ts.map +1 -1
- package/cjs/src/embed/embedConfig.js +9 -7
- package/cjs/src/embed/embedConfig.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts +56 -17
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +48 -4
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/liveboard.spec.js +215 -11
- package/cjs/src/embed/liveboard.spec.js.map +1 -1
- package/cjs/src/embed/ts-embed.d.ts +5 -0
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +16 -1
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/embed/ts-embed.spec.js +164 -0
- package/cjs/src/embed/ts-embed.spec.js.map +1 -1
- package/cjs/src/errors.d.ts +1 -0
- package/cjs/src/errors.d.ts.map +1 -1
- package/cjs/src/errors.js +1 -0
- package/cjs/src/errors.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 +2 -1
- package/cjs/src/index.js.map +1 -1
- package/cjs/src/react/all-types-export.d.ts +1 -1
- package/cjs/src/react/all-types-export.d.ts.map +1 -1
- package/cjs/src/react/all-types-export.js +3 -2
- package/cjs/src/react/all-types-export.js.map +1 -1
- package/cjs/src/react/index.d.ts +71 -20
- package/cjs/src/react/index.d.ts.map +1 -1
- package/cjs/src/react/index.js +79 -42
- package/cjs/src/react/index.js.map +1 -1
- package/cjs/src/react/index.spec.js +436 -100
- package/cjs/src/react/index.spec.js.map +1 -1
- package/cjs/src/types.d.ts +80 -6
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +45 -1
- package/cjs/src/types.js.map +1 -1
- package/cjs/src/utils/graphql/nlsService/conversation-service.d.ts.map +1 -1
- package/cjs/src/utils/graphql/nlsService/conversation-service.js +2 -0
- package/cjs/src/utils/graphql/nlsService/conversation-service.js.map +1 -1
- package/cjs/src/utils/processTrigger.js +2 -1
- package/cjs/src/utils/processTrigger.js.map +1 -1
- package/cjs/src/utils.d.ts +6 -0
- package/cjs/src/utils.d.ts.map +1 -1
- package/cjs/src/utils.js +23 -3
- package/cjs/src/utils.js.map +1 -1
- package/cjs/src/utils.spec.js +237 -1
- package/cjs/src/utils.spec.js.map +1 -1
- package/dist/{index-JaFaxrvQ.js → index-CmEQfuE3.js} +1 -1
- package/dist/index-DeFzsyFF.js +7371 -0
- package/dist/index-Dpf0rd6w.js +7371 -0
- package/dist/index-UuEbsISo.js +7447 -0
- package/dist/index-e3Uw3YFO.js +7371 -0
- package/dist/src/embed/app.d.ts +75 -15
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/bodyless-conversation.d.ts +19 -7
- package/dist/src/embed/bodyless-conversation.d.ts.map +1 -1
- package/dist/src/embed/embedConfig.d.ts +9 -7
- package/dist/src/embed/embedConfig.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts +56 -17
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.d.ts +5 -0
- package/dist/src/embed/ts-embed.d.ts.map +1 -1
- package/dist/src/errors.d.ts +1 -0
- package/dist/src/errors.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/react/all-types-export.d.ts +1 -1
- package/dist/src/react/all-types-export.d.ts.map +1 -1
- package/dist/src/react/index.d.ts +71 -20
- package/dist/src/react/index.d.ts.map +1 -1
- package/dist/src/types.d.ts +80 -6
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/graphql/nlsService/conversation-service.d.ts.map +1 -1
- package/dist/src/utils.d.ts +6 -0
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +320 -78
- package/dist/tsembed-react.js +320 -76
- package/dist/tsembed.es.js +238 -31
- package/dist/tsembed.js +236 -29
- package/dist/visual-embed-sdk-react-full.d.ts +288 -72
- package/dist/visual-embed-sdk-react.d.ts +288 -72
- package/dist/visual-embed-sdk.d.ts +218 -53
- package/lib/package.json +1 -1
- package/lib/src/config.spec.js +9 -0
- package/lib/src/config.spec.js.map +1 -1
- package/lib/src/embed/app.d.ts +75 -15
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +69 -9
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/app.spec.js +376 -14
- package/lib/src/embed/app.spec.js.map +1 -1
- package/lib/src/embed/bodyless-conversation.d.ts +19 -7
- package/lib/src/embed/bodyless-conversation.d.ts.map +1 -1
- package/lib/src/embed/bodyless-conversation.js +23 -4
- package/lib/src/embed/bodyless-conversation.js.map +1 -1
- package/lib/src/embed/bodyless-conversation.spec.js +9 -191
- package/lib/src/embed/bodyless-conversation.spec.js.map +1 -1
- package/lib/src/embed/conversation.spec.js +30 -2
- package/lib/src/embed/conversation.spec.js.map +1 -1
- package/lib/src/embed/embedConfig.d.ts +9 -7
- package/lib/src/embed/embedConfig.d.ts.map +1 -1
- package/lib/src/embed/embedConfig.js +9 -7
- package/lib/src/embed/embedConfig.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts +56 -17
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +49 -5
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +215 -11
- package/lib/src/embed/liveboard.spec.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts +5 -0
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +16 -1
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/embed/ts-embed.spec.js +164 -0
- package/lib/src/embed/ts-embed.spec.js.map +1 -1
- package/lib/src/errors.d.ts +1 -0
- package/lib/src/errors.d.ts.map +1 -1
- package/lib/src/errors.js +1 -0
- package/lib/src/errors.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 +2 -2
- package/lib/src/index.js.map +1 -1
- package/lib/src/react/all-types-export.d.ts +1 -1
- package/lib/src/react/all-types-export.d.ts.map +1 -1
- package/lib/src/react/all-types-export.js +1 -1
- package/lib/src/react/all-types-export.js.map +1 -1
- package/lib/src/react/index.d.ts +71 -20
- package/lib/src/react/index.d.ts.map +1 -1
- package/lib/src/react/index.js +79 -43
- package/lib/src/react/index.js.map +1 -1
- package/lib/src/react/index.spec.js +439 -103
- package/lib/src/react/index.spec.js.map +1 -1
- package/lib/src/types.d.ts +80 -6
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +45 -1
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils/graphql/nlsService/conversation-service.d.ts.map +1 -1
- package/lib/src/utils/graphql/nlsService/conversation-service.js +2 -0
- package/lib/src/utils/graphql/nlsService/conversation-service.js.map +1 -1
- package/lib/src/utils/processTrigger.js +2 -1
- package/lib/src/utils/processTrigger.js.map +1 -1
- package/lib/src/utils.d.ts +6 -0
- package/lib/src/utils.d.ts.map +1 -1
- package/lib/src/utils.js +21 -2
- package/lib/src/utils.js.map +1 -1
- package/lib/src/utils.spec.js +238 -2
- package/lib/src/utils.spec.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +219 -54
- package/package.json +1 -1
- package/src/config.spec.ts +11 -0
- package/src/embed/app.spec.ts +479 -26
- package/src/embed/app.ts +133 -27
- package/src/embed/bodyless-conversation.spec.ts +9 -203
- package/src/embed/bodyless-conversation.ts +24 -10
- package/src/embed/conversation.spec.ts +40 -2
- package/src/embed/embedConfig.ts +10 -8
- package/src/embed/liveboard.spec.ts +256 -5
- package/src/embed/liveboard.ts +99 -27
- package/src/embed/ts-embed.spec.ts +225 -0
- package/src/embed/ts-embed.ts +19 -0
- package/src/errors.ts +1 -0
- package/src/index.ts +2 -0
- package/src/react/all-types-export.ts +2 -1
- package/src/react/index.spec.tsx +556 -157
- package/src/react/index.tsx +117 -51
- package/src/types.ts +117 -43
- package/src/utils/graphql/nlsService/conversation-service.ts +2 -0
- package/src/utils/processTrigger.ts +1 -1
- package/src/utils.spec.ts +279 -2
- package/src/utils.ts +28 -2
|
@@ -11,7 +11,7 @@ declare module '@thoughtspot/visual-embed-sdk' {
|
|
|
11
11
|
* @summary ThoughtSpot Visual Embed SDK
|
|
12
12
|
* @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
|
|
13
13
|
*/
|
|
14
|
-
import { AppEmbed, Page, AppViewConfig, HomePageSearchBarMode, PrimaryNavbarVersion, HomePage, DataPanelCustomColumnGroupsAccordionState } from '@thoughtspot/visual-embed-sdk/embed/app';
|
|
14
|
+
import { AppEmbed, Page, AppViewConfig, HomePageSearchBarMode, PrimaryNavbarVersion, HomePage, ListPage, DataPanelCustomColumnGroupsAccordionState } from '@thoughtspot/visual-embed-sdk/embed/app';
|
|
15
15
|
import { init, prefetch, logout, executeTML, exportTML, executeTMLInput, exportTMLInput } from '@thoughtspot/visual-embed-sdk/embed/base';
|
|
16
16
|
import { PinboardEmbed, LiveboardViewConfig, LiveboardEmbed } from '@thoughtspot/visual-embed-sdk/embed/liveboard';
|
|
17
17
|
import { SearchEmbed, SearchViewConfig } from '@thoughtspot/visual-embed-sdk/embed/search';
|
|
@@ -30,7 +30,7 @@ declare module '@thoughtspot/visual-embed-sdk' {
|
|
|
30
30
|
import { getAnswerFromQuery } from '@thoughtspot/visual-embed-sdk/utils/graphql/nlsService/nls-answer-service';
|
|
31
31
|
import { createLiveboardWithAnswers } from '@thoughtspot/visual-embed-sdk/utils/liveboardService/liveboardService';
|
|
32
32
|
import { UIPassthroughEvent } from '@thoughtspot/visual-embed-sdk/embed/hostEventClient/contracts';
|
|
33
|
-
export { init, logout, prefetch, executeTML, exportTML, executeTMLInput, exportTMLInput, getEmbedConfig as getInitConfig, getSessionInfo, tokenizedFetch, getAnswerFromQuery, createLiveboardWithAnswers, SearchEmbed, SearchBarEmbed, PinboardEmbed, LiveboardEmbed, SageEmbed, AppEmbed, SpotterAgentEmbed, SpotterAgentEmbedViewConfig, BodylessConversationViewConfig, BodylessConversation, SpotterEmbed, SpotterEmbedViewConfig, ConversationViewConfig, ConversationEmbed, AuthFailureType, AuthStatus, AuthEvent, AuthEventEmitter, AnswerService, SessionInterface, UnderlyingDataPoint, Page, AuthType, RuntimeFilter, RuntimeFilterOp, EmbedEvent, HostEvent, DataSourceVisualMode, Action, ContextMenuTriggerOptions, EmbedConfig, SearchViewConfig, SearchBarViewConfig, LiveboardViewConfig, SageViewConfig, AppViewConfig, PrefetchFeatures, FrameParams, HomeLeftNavItem, HomepageModule, DOMSelector, MessageOptions, MessageCallback, MessagePayload, CustomisationsInterface, CustomStyles, customCssInterface, CustomCssVariables, RuntimeParameter, LogLevel, uploadMixpanelEvent, MIXPANEL_EVENT, HomePageSearchBarMode, PrimaryNavbarVersion, HomePage, VizPoint, CustomActionPayload, UIPassthroughEvent, ListPageColumns, DataPanelCustomColumnGroupsAccordionState, };
|
|
33
|
+
export { init, logout, prefetch, executeTML, exportTML, executeTMLInput, exportTMLInput, getEmbedConfig as getInitConfig, getSessionInfo, tokenizedFetch, getAnswerFromQuery, createLiveboardWithAnswers, SearchEmbed, SearchBarEmbed, PinboardEmbed, LiveboardEmbed, SageEmbed, AppEmbed, SpotterAgentEmbed, SpotterAgentEmbedViewConfig, BodylessConversationViewConfig, BodylessConversation, SpotterEmbed, SpotterEmbedViewConfig, ConversationViewConfig, ConversationEmbed, AuthFailureType, AuthStatus, AuthEvent, AuthEventEmitter, AnswerService, SessionInterface, UnderlyingDataPoint, Page, AuthType, RuntimeFilter, RuntimeFilterOp, EmbedEvent, HostEvent, DataSourceVisualMode, Action, ContextMenuTriggerOptions, EmbedConfig, SearchViewConfig, SearchBarViewConfig, LiveboardViewConfig, SageViewConfig, AppViewConfig, PrefetchFeatures, FrameParams, HomeLeftNavItem, HomepageModule, DOMSelector, MessageOptions, MessageCallback, MessagePayload, CustomisationsInterface, CustomStyles, customCssInterface, CustomCssVariables, RuntimeParameter, LogLevel, uploadMixpanelEvent, MIXPANEL_EVENT, HomePageSearchBarMode, PrimaryNavbarVersion, HomePage, ListPage, VizPoint, CustomActionPayload, UIPassthroughEvent, ListPageColumns, DataPanelCustomColumnGroupsAccordionState, };
|
|
34
34
|
export { resetCachedAuthToken } from '@thoughtspot/visual-embed-sdk/authToken';
|
|
35
35
|
}
|
|
36
36
|
|
|
@@ -129,6 +129,21 @@ declare module '@thoughtspot/visual-embed-sdk/embed/app' {
|
|
|
129
129
|
*/
|
|
130
130
|
Modular = "v2"
|
|
131
131
|
}
|
|
132
|
+
/**
|
|
133
|
+
* Define the version of the list page
|
|
134
|
+
* @version SDK: 1.40.0 | ThoughtSpot: 10.12.0.cl
|
|
135
|
+
*/
|
|
136
|
+
export enum ListPage {
|
|
137
|
+
/**
|
|
138
|
+
* List (v2) is the traditional List Experience.
|
|
139
|
+
* It serves as the foundational version of the list page.
|
|
140
|
+
*/
|
|
141
|
+
List = "v2",
|
|
142
|
+
/**
|
|
143
|
+
* ListWithUXChanges (v3) introduces the new updated list page with UX changes.
|
|
144
|
+
*/
|
|
145
|
+
ListWithUXChanges = "v3"
|
|
146
|
+
}
|
|
132
147
|
/**
|
|
133
148
|
* Define the discovery experience
|
|
134
149
|
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
@@ -142,6 +157,10 @@ declare module '@thoughtspot/visual-embed-sdk/embed/app' {
|
|
|
142
157
|
* homePage determines the version of the home page.
|
|
143
158
|
*/
|
|
144
159
|
homePage?: HomePage;
|
|
160
|
+
/**
|
|
161
|
+
* listPageVersion determines the version of the list page.
|
|
162
|
+
*/
|
|
163
|
+
listPageVersion?: ListPage;
|
|
145
164
|
}
|
|
146
165
|
/**
|
|
147
166
|
* The view configuration for full app embedding.
|
|
@@ -513,21 +532,6 @@ declare module '@thoughtspot/visual-embed-sdk/embed/app' {
|
|
|
513
532
|
* ```
|
|
514
533
|
*/
|
|
515
534
|
isUnifiedSearchExperienceEnabled?: boolean;
|
|
516
|
-
/**
|
|
517
|
-
* Show alert messages and toast messages in the embedded
|
|
518
|
-
* view in full app embed.
|
|
519
|
-
*
|
|
520
|
-
* Supported embed types: `AppEmbed`
|
|
521
|
-
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
522
|
-
* @example
|
|
523
|
-
* ```js
|
|
524
|
-
* const embed = new AppEmbed('#tsEmbed', {
|
|
525
|
-
* ... // other embed view config
|
|
526
|
-
* showAlerts:true,
|
|
527
|
-
* })
|
|
528
|
-
* ```
|
|
529
|
-
*/
|
|
530
|
-
showAlerts?: boolean;
|
|
531
535
|
/**
|
|
532
536
|
* This flag is used to enable/disable the styling and grouping in a Liveboard
|
|
533
537
|
*
|
|
@@ -544,6 +548,46 @@ declare module '@thoughtspot/visual-embed-sdk/embed/app' {
|
|
|
544
548
|
* ```
|
|
545
549
|
*/
|
|
546
550
|
isLiveboardStylingAndGroupingEnabled?: boolean;
|
|
551
|
+
/**
|
|
552
|
+
* This flag is used to enable the full height lazy load data.
|
|
553
|
+
*
|
|
554
|
+
* @example
|
|
555
|
+
* ```js
|
|
556
|
+
* const embed = new AppEmbed('#embed-container', {
|
|
557
|
+
* // ...other options
|
|
558
|
+
* fullHeight: true,
|
|
559
|
+
* lazyLoadingForFullHeight: true,
|
|
560
|
+
* })
|
|
561
|
+
* ```
|
|
562
|
+
*
|
|
563
|
+
* @type {boolean}
|
|
564
|
+
* @default false
|
|
565
|
+
* @version SDK: 1.39.0 | ThoughtSpot:10.10.0.cl
|
|
566
|
+
*/
|
|
567
|
+
lazyLoadingForFullHeight?: boolean;
|
|
568
|
+
/**
|
|
569
|
+
* The margin to be used for lazy loading.
|
|
570
|
+
*
|
|
571
|
+
* For example, if the margin is set to '10px',
|
|
572
|
+
* the visualization will be loaded 10px before the its top edge is visible in the
|
|
573
|
+
* viewport.
|
|
574
|
+
*
|
|
575
|
+
* The format is similar to CSS margin.
|
|
576
|
+
*
|
|
577
|
+
* @example
|
|
578
|
+
* ```js
|
|
579
|
+
* const embed = new AppEmbed('#embed-container', {
|
|
580
|
+
* // ...other options
|
|
581
|
+
* fullHeight: true,
|
|
582
|
+
* lazyLoadingForFullHeight: true,
|
|
583
|
+
* // Using 0px, the visualization will be only loaded when its visible in the viewport.
|
|
584
|
+
* lazyLoadingMargin: '0px',
|
|
585
|
+
* })
|
|
586
|
+
* ```
|
|
587
|
+
* @type {string}
|
|
588
|
+
* @version SDK: 1.39.0 | ThoughtSpot:10.10.0.cl
|
|
589
|
+
*/
|
|
590
|
+
lazyLoadingMargin?: string;
|
|
547
591
|
}
|
|
548
592
|
/**
|
|
549
593
|
* Embeds full ThoughtSpot experience in a host application.
|
|
@@ -580,6 +624,11 @@ declare module '@thoughtspot/visual-embed-sdk/embed/app' {
|
|
|
580
624
|
* @version SDK: 1.12.0 | ThoughtSpot: 8.4.0.cl, 8.4.1-sw
|
|
581
625
|
*/
|
|
582
626
|
navigateToPage(path: string | number, noReload?: boolean): void;
|
|
627
|
+
/**
|
|
628
|
+
* Destroys the ThoughtSpot embed, and remove any nodes from the DOM.
|
|
629
|
+
* @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
|
|
630
|
+
*/
|
|
631
|
+
destroy(): void;
|
|
583
632
|
/**
|
|
584
633
|
* Renders the embedded application pages in the ThoughtSpot app.
|
|
585
634
|
* @param renderOptions An object containing the page ID
|
|
@@ -985,23 +1034,6 @@ declare module '@thoughtspot/visual-embed-sdk/embed/liveboard' {
|
|
|
985
1034
|
* })
|
|
986
1035
|
*/
|
|
987
1036
|
dataSourceId?: string;
|
|
988
|
-
/**
|
|
989
|
-
* This flag is for show/hide checkboxes for include or exclude
|
|
990
|
-
* cover page and filters in the Liveboard PDF.
|
|
991
|
-
*
|
|
992
|
-
* Supported embed types: `LiveboardEmbed`
|
|
993
|
-
* @version SDK: 1.37.0 | ThoughtSpot:10.8.0.cl
|
|
994
|
-
* @default true
|
|
995
|
-
* Supported embed types: `LiveboardEmbed`
|
|
996
|
-
* @example
|
|
997
|
-
* ```js
|
|
998
|
-
* const embed = new LiveboardEmbed('#tsEmbed', {
|
|
999
|
-
* ... //other embed view config
|
|
1000
|
-
* coverAndFilterOptionInPDF: false,
|
|
1001
|
-
* })
|
|
1002
|
-
* ```
|
|
1003
|
-
*/
|
|
1004
|
-
coverAndFilterOptionInPDF?: boolean;
|
|
1005
1037
|
/**
|
|
1006
1038
|
* The list of tab IDs to hide from the embedded.
|
|
1007
1039
|
* This Tabs will be hidden from their respective LBs.
|
|
@@ -1057,6 +1089,46 @@ declare module '@thoughtspot/visual-embed-sdk/embed/liveboard' {
|
|
|
1057
1089
|
* ```
|
|
1058
1090
|
*/
|
|
1059
1091
|
isLiveboardStylingAndGroupingEnabled?: boolean;
|
|
1092
|
+
/**
|
|
1093
|
+
* This flag is used to enable the full height lazy load data.
|
|
1094
|
+
*
|
|
1095
|
+
* @example
|
|
1096
|
+
* ```js
|
|
1097
|
+
* const embed = new LiveboardEmbed('#embed-container', {
|
|
1098
|
+
* // ...other options
|
|
1099
|
+
* fullHeight: true,
|
|
1100
|
+
* lazyLoadingForFullHeight: true,
|
|
1101
|
+
* })
|
|
1102
|
+
* ```
|
|
1103
|
+
*
|
|
1104
|
+
* @type {boolean}
|
|
1105
|
+
* @default false
|
|
1106
|
+
* @version SDK: 1.39.0 | ThoughtSpot:10.10.0.cl
|
|
1107
|
+
*/
|
|
1108
|
+
lazyLoadingForFullHeight?: boolean;
|
|
1109
|
+
/**
|
|
1110
|
+
* The margin to be used for lazy loading.
|
|
1111
|
+
*
|
|
1112
|
+
* For example, if the margin is set to '10px',
|
|
1113
|
+
* the visualization will be loaded 10px before the its top edge is visible in the
|
|
1114
|
+
* viewport.
|
|
1115
|
+
*
|
|
1116
|
+
* The format is similar to CSS margin.
|
|
1117
|
+
*
|
|
1118
|
+
* @example
|
|
1119
|
+
* ```js
|
|
1120
|
+
* const embed = new LiveboardEmbed('#embed-container', {
|
|
1121
|
+
* // ...other options
|
|
1122
|
+
* fullHeight: true,
|
|
1123
|
+
* lazyLoadingForFullHeight: true,
|
|
1124
|
+
* // Using 0px, the visualization will be only loaded when its visible in the viewport.
|
|
1125
|
+
* lazyLoadingMargin: '0px',
|
|
1126
|
+
* })
|
|
1127
|
+
* ```
|
|
1128
|
+
* @type {string}
|
|
1129
|
+
* @version SDK: 1.39.0 | ThoughtSpot:10.10.0.cl
|
|
1130
|
+
*/
|
|
1131
|
+
lazyLoadingMargin?: string;
|
|
1060
1132
|
}
|
|
1061
1133
|
/**
|
|
1062
1134
|
* Embed a ThoughtSpot Liveboard or visualization. When rendered it already
|
|
@@ -1090,6 +1162,11 @@ declare module '@thoughtspot/visual-embed-sdk/embed/liveboard' {
|
|
|
1090
1162
|
* @returns A promise that resolves with the response from the embedded app
|
|
1091
1163
|
*/
|
|
1092
1164
|
trigger<HostEventT extends HostEvent, PayloadT>(messageType: HostEventT, data?: TriggerPayload<PayloadT, HostEventT>): Promise<TriggerResponse<PayloadT, HostEventT>>;
|
|
1165
|
+
/**
|
|
1166
|
+
* Destroys the ThoughtSpot embed, and remove any nodes from the DOM.
|
|
1167
|
+
* @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
|
|
1168
|
+
*/
|
|
1169
|
+
destroy(): void;
|
|
1093
1170
|
/**
|
|
1094
1171
|
* Render an embedded ThoughtSpot Liveboard or visualization
|
|
1095
1172
|
* @param renderOptions An object specifying the Liveboard ID,
|
|
@@ -1581,10 +1658,6 @@ declare module '@thoughtspot/visual-embed-sdk/embed/bodyless-conversation' {
|
|
|
1581
1658
|
* The ID of the worksheet to use for the conversation.
|
|
1582
1659
|
*/
|
|
1583
1660
|
worksheetId: string;
|
|
1584
|
-
/**
|
|
1585
|
-
* Optional CSS class name to add to the container div.
|
|
1586
|
-
*/
|
|
1587
|
-
containerClassName?: string;
|
|
1588
1661
|
}
|
|
1589
1662
|
/**
|
|
1590
1663
|
* Configuration for conversation options.
|
|
@@ -1594,13 +1667,13 @@ declare module '@thoughtspot/visual-embed-sdk/embed/bodyless-conversation' {
|
|
|
1594
1667
|
*/
|
|
1595
1668
|
export interface BodylessConversationViewConfig extends SpotterAgentEmbedViewConfig {
|
|
1596
1669
|
}
|
|
1597
|
-
interface SpotterAgentMessageViewConfig extends SpotterAgentEmbedViewConfig {
|
|
1670
|
+
export interface SpotterAgentMessageViewConfig extends SpotterAgentEmbedViewConfig {
|
|
1598
1671
|
sessionId: string;
|
|
1599
1672
|
genNo: number;
|
|
1600
1673
|
acSessionId: string;
|
|
1601
1674
|
acGenNo: number;
|
|
1602
1675
|
}
|
|
1603
|
-
class ConversationMessage extends TsEmbed {
|
|
1676
|
+
export class ConversationMessage extends TsEmbed {
|
|
1604
1677
|
protected viewConfig: SpotterAgentMessageViewConfig;
|
|
1605
1678
|
constructor(container: HTMLElement, viewConfig: SpotterAgentMessageViewConfig);
|
|
1606
1679
|
getIframeSrc(): string;
|
|
@@ -1636,6 +1709,23 @@ declare module '@thoughtspot/visual-embed-sdk/embed/bodyless-conversation' {
|
|
|
1636
1709
|
viz: ConversationMessage;
|
|
1637
1710
|
error?: undefined;
|
|
1638
1711
|
}>;
|
|
1712
|
+
/**
|
|
1713
|
+
* Send a message to the conversation service and return only the data.
|
|
1714
|
+
* @param userMessage - The message to send to the conversation service.
|
|
1715
|
+
* @returns The data from the conversation service.
|
|
1716
|
+
*/
|
|
1717
|
+
sendMessageData(userMessage: string): Promise<{
|
|
1718
|
+
error: any;
|
|
1719
|
+
data?: undefined;
|
|
1720
|
+
} | {
|
|
1721
|
+
data: {
|
|
1722
|
+
sessionId: any;
|
|
1723
|
+
genNo: any;
|
|
1724
|
+
acSessionId: any;
|
|
1725
|
+
acGenNo: any;
|
|
1726
|
+
};
|
|
1727
|
+
error?: undefined;
|
|
1728
|
+
}>;
|
|
1639
1729
|
}
|
|
1640
1730
|
/**
|
|
1641
1731
|
* Create a conversation embed, which can be integrated inside
|
|
@@ -1660,7 +1750,6 @@ declare module '@thoughtspot/visual-embed-sdk/embed/bodyless-conversation' {
|
|
|
1660
1750
|
export class BodylessConversation extends SpotterAgentEmbed {
|
|
1661
1751
|
constructor(viewConfig: BodylessConversationViewConfig);
|
|
1662
1752
|
}
|
|
1663
|
-
export {};
|
|
1664
1753
|
}
|
|
1665
1754
|
|
|
1666
1755
|
declare module '@thoughtspot/visual-embed-sdk/embed/conversation' {
|
|
@@ -2322,7 +2411,13 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
2322
2411
|
* available when new navigation V3 is enabled.
|
|
2323
2412
|
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
2324
2413
|
*/
|
|
2325
|
-
Spotter = "spotter"
|
|
2414
|
+
Spotter = "spotter",
|
|
2415
|
+
/**
|
|
2416
|
+
* Favorites option in the insights left navigation,
|
|
2417
|
+
* available when new navigation V3 is enabled.
|
|
2418
|
+
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
2419
|
+
*/
|
|
2420
|
+
Favorites = "favorites"
|
|
2326
2421
|
}
|
|
2327
2422
|
export type DOMSelector = string | HTMLElement;
|
|
2328
2423
|
/**
|
|
@@ -3088,6 +3183,20 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
3088
3183
|
* @private
|
|
3089
3184
|
*/
|
|
3090
3185
|
insertInToSlide?: boolean;
|
|
3186
|
+
/**
|
|
3187
|
+
* Show alert messages and toast messages in the embed.
|
|
3188
|
+
* Supported embed in all embed types.
|
|
3189
|
+
*
|
|
3190
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
3191
|
+
* @example
|
|
3192
|
+
* ```js
|
|
3193
|
+
* const embed = new AppEmbed('#tsEmbed', {
|
|
3194
|
+
* ... // other embed view config
|
|
3195
|
+
* showAlerts:true,
|
|
3196
|
+
* })
|
|
3197
|
+
* ```
|
|
3198
|
+
*/
|
|
3199
|
+
showAlerts?: boolean;
|
|
3091
3200
|
}
|
|
3092
3201
|
/**
|
|
3093
3202
|
* The configuration object for Home page embeds configs.
|
|
@@ -3465,6 +3574,22 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
3465
3574
|
* ```
|
|
3466
3575
|
*/
|
|
3467
3576
|
enableAskSage?: boolean;
|
|
3577
|
+
/**
|
|
3578
|
+
* This flag is used to show or hide checkboxes for including or excluding
|
|
3579
|
+
* the cover and filters pages in the Liveboard PDF.
|
|
3580
|
+
*
|
|
3581
|
+
* Supported embed types: `AppEmbed`, `LiveboardEmbed`
|
|
3582
|
+
* @version SDK: 1.40.0 | ThoughtSpot:10.8.0.cl
|
|
3583
|
+
* @example
|
|
3584
|
+
* ```js
|
|
3585
|
+
* // Replace <EmbedComponent> with embed component name. For example, AppEmbed or LiveboardEmbed
|
|
3586
|
+
* const embed = new <EmbedComponent>('#tsEmbed', {
|
|
3587
|
+
* ... // other embed view config
|
|
3588
|
+
* coverAndFilterOptionInPDF: false,
|
|
3589
|
+
* })
|
|
3590
|
+
* ```
|
|
3591
|
+
*/
|
|
3592
|
+
coverAndFilterOptionInPDF?: boolean;
|
|
3468
3593
|
}
|
|
3469
3594
|
export interface AllEmbedViewConfig extends BaseViewConfig, SearchLiveboardCommonViewConfig, HomePageConfig, LiveboardAppEmbedViewConfig {
|
|
3470
3595
|
}
|
|
@@ -4724,7 +4849,13 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
4724
4849
|
* Emitted when a user exits present mode.
|
|
4725
4850
|
* @version SDK : 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
4726
4851
|
*/
|
|
4727
|
-
ExitPresentMode = "exitPresentMode"
|
|
4852
|
+
ExitPresentMode = "exitPresentMode",
|
|
4853
|
+
/**
|
|
4854
|
+
* Emitted when a user requests the full height lazy load data.
|
|
4855
|
+
* @version SDK : 1.39.0 | ThoughtSpot : 10.10.0.cl
|
|
4856
|
+
* @hidden
|
|
4857
|
+
*/
|
|
4858
|
+
RequestVisibleEmbedCoordinates = "requestVisibleEmbedCoordinates"
|
|
4728
4859
|
}
|
|
4729
4860
|
/**
|
|
4730
4861
|
* Event types that can be triggered by the host application
|
|
@@ -5806,7 +5937,20 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
5806
5937
|
*```
|
|
5807
5938
|
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
5808
5939
|
*/
|
|
5809
|
-
ExitPresentMode = "exitPresentMode"
|
|
5940
|
+
ExitPresentMode = "exitPresentMode",
|
|
5941
|
+
/**
|
|
5942
|
+
* Triggers the full height lazy load data.
|
|
5943
|
+
* @example
|
|
5944
|
+
* ```js
|
|
5945
|
+
* liveboardEmbed.on(EmbedEvent.RequestVisibleEmbedCoordinates, (payload) => {
|
|
5946
|
+
* console.log(payload);
|
|
5947
|
+
* });
|
|
5948
|
+
* ```
|
|
5949
|
+
* @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
|
|
5950
|
+
*
|
|
5951
|
+
* @hidden
|
|
5952
|
+
*/
|
|
5953
|
+
VisibleEmbedCoordinates = "visibleEmbedCoordinates"
|
|
5810
5954
|
}
|
|
5811
5955
|
/**
|
|
5812
5956
|
* The different visual modes that the data sources panel within
|
|
@@ -5902,6 +6046,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
5902
6046
|
Query = "query",
|
|
5903
6047
|
HideHomepageLeftNav = "hideHomepageLeftNav",
|
|
5904
6048
|
ModularHomeExperienceEnabled = "modularHomeExperience",
|
|
6049
|
+
ListPageVersion = "listpageVersion",
|
|
5905
6050
|
PendoTrackingKey = "additionalPendoKey",
|
|
5906
6051
|
LiveboardHeaderSticky = "isLiveboardHeaderSticky",
|
|
5907
6052
|
IsProductTour = "isProductTour",
|
|
@@ -5936,10 +6081,12 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
5936
6081
|
DataSourceId = "dataSourceId",
|
|
5937
6082
|
preAuthCache = "preAuthCache",
|
|
5938
6083
|
ShowSpotterLimitations = "showSpotterLimitations",
|
|
5939
|
-
CoverAndFilterOptionInPDF = "
|
|
6084
|
+
CoverAndFilterOptionInPDF = "arePdfCoverFilterPageCheckboxesEnabled",
|
|
5940
6085
|
PrimaryAction = "primaryAction",
|
|
5941
6086
|
isSpotterAgentEmbed = "isSpotterAgentEmbed",
|
|
5942
|
-
IsLiveboardStylingAndGroupingEnabled = "isLiveboardStylingAndGroupingEnabled"
|
|
6087
|
+
IsLiveboardStylingAndGroupingEnabled = "isLiveboardStylingAndGroupingEnabled",
|
|
6088
|
+
IsLazyLoadingForEmbedEnabled = "isLazyLoadingForEmbedEnabled",
|
|
6089
|
+
RootMarginForLazyLoad = "rootMarginForLazyLoad"
|
|
5943
6090
|
}
|
|
5944
6091
|
/**
|
|
5945
6092
|
* ThoughtSpot application pages include actions and menu commands
|
|
@@ -7159,7 +7306,23 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
7159
7306
|
* ```
|
|
7160
7307
|
* @version SDK: 1.37.0 | ThoughtSpot Cloud: 10.8.0.cl
|
|
7161
7308
|
*/
|
|
7162
|
-
CoverAndFilterOptionInPDF = "coverAndFilterOptionInPDF"
|
|
7309
|
+
CoverAndFilterOptionInPDF = "coverAndFilterOptionInPDF",
|
|
7310
|
+
/**
|
|
7311
|
+
* Action ID for hide or disable the
|
|
7312
|
+
* Spotter in conversation training widget.
|
|
7313
|
+
* The Add to Coaching feature is currently in beta
|
|
7314
|
+
* and is disabled by default on embed deployments.
|
|
7315
|
+
* To enable this feature on your instance,
|
|
7316
|
+
* contact ThoughtSpot Support.
|
|
7317
|
+
* @example
|
|
7318
|
+
* ```js
|
|
7319
|
+
* hiddenAction: [Action.InConversationTraining]
|
|
7320
|
+
* disabledActions: [Action.InConversationTraining]
|
|
7321
|
+
*
|
|
7322
|
+
* ```
|
|
7323
|
+
* @version SDK: 1.39.0 | ThoughtSpot Cloud: 10.10.0.cl
|
|
7324
|
+
*/
|
|
7325
|
+
InConversationTraining = "InConversationTraining"
|
|
7163
7326
|
}
|
|
7164
7327
|
export interface AnswerServiceType {
|
|
7165
7328
|
getAnswer?: (offset: number, batchSize: number) => any;
|
|
@@ -8083,13 +8246,14 @@ declare module '@thoughtspot/visual-embed-sdk/embed/embedConfig' {
|
|
|
8083
8246
|
*
|
|
8084
8247
|
* @example
|
|
8085
8248
|
* ```js
|
|
8249
|
+
* import { getInitConfig } from '@thoughtspot/visual-embed-sdk';
|
|
8250
|
+
* // Call the getInitConfig method to retrieve the embed configuration
|
|
8086
8251
|
* const config = getInitConfig();
|
|
8252
|
+
* // Log the configuration settings
|
|
8087
8253
|
* console.log(config);
|
|
8088
8254
|
* ```
|
|
8089
|
-
*
|
|
8090
|
-
*
|
|
8091
|
-
* Returns the `EmbedConfig` object, which
|
|
8092
|
-
* contains the configuration settings used to
|
|
8255
|
+
* Returns the link:https://developers.thoughtspot.com/docs/Interface_EmbedConfig[EmbedConfig]
|
|
8256
|
+
* object, which contains the configuration settings used to
|
|
8093
8257
|
* initialize the SDK, including the following:
|
|
8094
8258
|
*
|
|
8095
8259
|
* - `thoughtSpotHost` - ThoughtSpot host URL
|
|
@@ -8098,9 +8262,10 @@ declare module '@thoughtspot/visual-embed-sdk/embed/embedConfig' {
|
|
|
8098
8262
|
* - `customizations` - Style, text, and icon customization settings
|
|
8099
8263
|
* that were applied during the SDK initialization.
|
|
8100
8264
|
*
|
|
8101
|
-
*
|
|
8102
|
-
*
|
|
8265
|
+
* The following JSON output shows the embed configuration
|
|
8266
|
+
* settings returned from the code in the previous example:
|
|
8103
8267
|
*
|
|
8268
|
+
* @example
|
|
8104
8269
|
* ```json
|
|
8105
8270
|
* {
|
|
8106
8271
|
* "thoughtSpotHost": "https://{ThoughtSpot-Host}",
|
|
@@ -8122,7 +8287,7 @@ declare module '@thoughtspot/visual-embed-sdk/embed/embedConfig' {
|
|
|
8122
8287
|
* "authTriggerContainer": "#your-own-div"
|
|
8123
8288
|
* }
|
|
8124
8289
|
* ```
|
|
8125
|
-
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.
|
|
8290
|
+
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw, and later
|
|
8126
8291
|
* @group Global methods
|
|
8127
8292
|
*/
|
|
8128
8293
|
export const getEmbedConfig: () => EmbedConfig;
|
package/package.json
CHANGED
package/src/config.spec.ts
CHANGED
|
@@ -21,6 +21,17 @@ describe('getThoughtSpotHost', () => {
|
|
|
21
21
|
expect(testFn).toThrow(Error);
|
|
22
22
|
});
|
|
23
23
|
|
|
24
|
+
test('invalid URL format', () => {
|
|
25
|
+
const testFn = () => {
|
|
26
|
+
getThoughtSpotHost({
|
|
27
|
+
...embedConfig,
|
|
28
|
+
thoughtSpotHost: '',
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
expect(testFn).toThrow('Error parsing ThoughtSpot host. Please provide a valid URL.');
|
|
33
|
+
});
|
|
34
|
+
|
|
24
35
|
test('IP address/hostname only', () => {
|
|
25
36
|
expect(
|
|
26
37
|
getThoughtSpotHost({
|