@thoughtspot/visual-embed-sdk 1.41.0-pre-render-1 → 1.41.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.
- package/README.md +2 -4
- package/cjs/package.json +3 -3
- package/cjs/src/authToken.d.ts +1 -0
- package/cjs/src/authToken.d.ts.map +1 -1
- package/cjs/src/authToken.js +13 -3
- package/cjs/src/authToken.js.map +1 -1
- package/cjs/src/authToken.spec.js +29 -0
- package/cjs/src/authToken.spec.js.map +1 -1
- package/cjs/src/css-variables.d.ts +2 -1
- package/cjs/src/css-variables.d.ts.map +1 -1
- package/cjs/src/embed/app.d.ts +22 -1
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +22 -1
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/app.spec.js +70 -3
- package/cjs/src/embed/app.spec.js.map +1 -1
- package/cjs/src/embed/bodyless-conversation.d.ts +0 -1
- package/cjs/src/embed/bodyless-conversation.d.ts.map +1 -1
- package/cjs/src/embed/bodyless-conversation.js +3 -7
- package/cjs/src/embed/bodyless-conversation.js.map +1 -1
- package/cjs/src/embed/conversation.d.ts +2 -3
- package/cjs/src/embed/conversation.d.ts.map +1 -1
- package/cjs/src/embed/conversation.js +2 -7
- package/cjs/src/embed/conversation.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts +32 -1
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +8 -25
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/liveboard.spec.js +96 -28
- package/cjs/src/embed/liveboard.spec.js.map +1 -1
- package/cjs/src/embed/sage.d.ts +0 -1
- package/cjs/src/embed/sage.d.ts.map +1 -1
- package/cjs/src/embed/sage.js +6 -10
- package/cjs/src/embed/sage.js.map +1 -1
- package/cjs/src/embed/sage.spec.js +20 -10
- package/cjs/src/embed/sage.spec.js.map +1 -1
- package/cjs/src/embed/search-bar.d.ts +0 -1
- package/cjs/src/embed/search-bar.d.ts.map +1 -1
- package/cjs/src/embed/search-bar.js +7 -11
- package/cjs/src/embed/search-bar.js.map +1 -1
- package/cjs/src/embed/search.d.ts +0 -1
- package/cjs/src/embed/search.d.ts.map +1 -1
- package/cjs/src/embed/search.js +8 -7
- package/cjs/src/embed/search.js.map +1 -1
- package/cjs/src/embed/search.spec.js +10 -10
- package/cjs/src/embed/search.spec.js.map +1 -1
- package/cjs/src/embed/ts-embed.d.ts +5 -7
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +25 -22
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/embed/ts-embed.spec.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.spec.js +122 -0
- package/cjs/src/embed/ts-embed.spec.js.map +1 -1
- package/cjs/src/errors.d.ts +11 -0
- package/cjs/src/errors.d.ts.map +1 -1
- package/cjs/src/errors.js +12 -1
- 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 +3 -1
- package/cjs/src/index.js.map +1 -1
- package/cjs/src/react/index.d.ts +1 -1
- package/cjs/src/react/index.d.ts.map +1 -1
- package/cjs/src/react/index.js +4 -2
- package/cjs/src/react/index.js.map +1 -1
- package/cjs/src/react/index.spec.js +1 -1
- package/cjs/src/react/index.spec.js.map +1 -1
- package/cjs/src/types.d.ts +163 -21
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +65 -22
- package/cjs/src/types.js.map +1 -1
- package/cjs/src/utils/custom-actions.d.ts +12 -0
- package/cjs/src/utils/custom-actions.d.ts.map +1 -0
- package/cjs/src/utils/custom-actions.js +180 -0
- package/cjs/src/utils/custom-actions.js.map +1 -0
- package/cjs/src/utils/custom-actions.spec.d.ts +2 -0
- package/cjs/src/utils/custom-actions.spec.d.ts.map +1 -0
- package/cjs/src/utils/custom-actions.spec.js +399 -0
- package/cjs/src/utils/custom-actions.spec.js.map +1 -0
- package/cjs/src/utils/processData.d.ts.map +1 -1
- package/cjs/src/utils/processData.js +10 -0
- package/cjs/src/utils/processData.js.map +1 -1
- package/cjs/src/utils/processData.spec.js +11 -0
- package/cjs/src/utils/processData.spec.js.map +1 -1
- package/cjs/src/utils.d.ts +21 -0
- package/cjs/src/utils.d.ts.map +1 -1
- package/cjs/src/utils.js +32 -1
- package/cjs/src/utils.js.map +1 -1
- package/cjs/src/utils.spec.js +38 -0
- package/cjs/src/utils.spec.js.map +1 -1
- package/dist/{index-CmEQfuE3.js → index-DQueHwfQ.js} +1 -1
- package/dist/src/authToken.d.ts +1 -0
- package/dist/src/authToken.d.ts.map +1 -1
- package/dist/src/css-variables.d.ts +2 -1
- package/dist/src/css-variables.d.ts.map +1 -1
- package/dist/src/embed/app.d.ts +22 -1
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/bodyless-conversation.d.ts +0 -1
- package/dist/src/embed/bodyless-conversation.d.ts.map +1 -1
- package/dist/src/embed/conversation.d.ts +2 -3
- package/dist/src/embed/conversation.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts +32 -1
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/embed/sage.d.ts +0 -1
- package/dist/src/embed/sage.d.ts.map +1 -1
- package/dist/src/embed/search-bar.d.ts +0 -1
- package/dist/src/embed/search-bar.d.ts.map +1 -1
- package/dist/src/embed/search.d.ts +0 -1
- package/dist/src/embed/search.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.d.ts +5 -7
- package/dist/src/embed/ts-embed.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.spec.d.ts.map +1 -1
- package/dist/src/errors.d.ts +11 -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/index.d.ts +1 -1
- package/dist/src/react/index.d.ts.map +1 -1
- package/dist/src/types.d.ts +163 -21
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/custom-actions.d.ts +12 -0
- package/dist/src/utils/custom-actions.d.ts.map +1 -0
- package/dist/src/utils/custom-actions.spec.d.ts +2 -0
- package/dist/src/utils/custom-actions.spec.d.ts.map +1 -0
- package/dist/src/utils/processData.d.ts.map +1 -1
- package/dist/src/utils.d.ts +21 -0
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +1773 -251
- package/dist/tsembed-react.js +1772 -250
- package/dist/tsembed.es.js +1771 -250
- package/dist/tsembed.js +1770 -249
- package/dist/visual-embed-sdk-react-full.d.ts +228 -39
- package/dist/visual-embed-sdk-react.d.ts +228 -39
- package/dist/visual-embed-sdk.d.ts +228 -39
- package/lib/package.json +3 -3
- package/lib/src/authToken.d.ts +1 -0
- package/lib/src/authToken.d.ts.map +1 -1
- package/lib/src/authToken.js +11 -2
- package/lib/src/authToken.js.map +1 -1
- package/lib/src/authToken.spec.js +30 -1
- package/lib/src/authToken.spec.js.map +1 -1
- package/lib/src/css-variables.d.ts +2 -1
- package/lib/src/css-variables.d.ts.map +1 -1
- package/lib/src/embed/app.d.ts +22 -1
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +22 -1
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/app.spec.js +70 -3
- package/lib/src/embed/app.spec.js.map +1 -1
- package/lib/src/embed/bodyless-conversation.d.ts +0 -1
- package/lib/src/embed/bodyless-conversation.d.ts.map +1 -1
- package/lib/src/embed/bodyless-conversation.js +3 -7
- package/lib/src/embed/bodyless-conversation.js.map +1 -1
- package/lib/src/embed/conversation.d.ts +2 -3
- package/lib/src/embed/conversation.d.ts.map +1 -1
- package/lib/src/embed/conversation.js +2 -7
- package/lib/src/embed/conversation.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts +32 -1
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +8 -25
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +96 -28
- package/lib/src/embed/liveboard.spec.js.map +1 -1
- package/lib/src/embed/sage.d.ts +0 -1
- package/lib/src/embed/sage.d.ts.map +1 -1
- package/lib/src/embed/sage.js +6 -10
- package/lib/src/embed/sage.js.map +1 -1
- package/lib/src/embed/sage.spec.js +20 -10
- package/lib/src/embed/sage.spec.js.map +1 -1
- package/lib/src/embed/search-bar.d.ts +0 -1
- package/lib/src/embed/search-bar.d.ts.map +1 -1
- package/lib/src/embed/search-bar.js +7 -11
- package/lib/src/embed/search-bar.js.map +1 -1
- package/lib/src/embed/search.d.ts +0 -1
- package/lib/src/embed/search.d.ts.map +1 -1
- package/lib/src/embed/search.js +8 -7
- package/lib/src/embed/search.js.map +1 -1
- package/lib/src/embed/search.spec.js +11 -11
- package/lib/src/embed/search.spec.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts +5 -7
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +25 -22
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/embed/ts-embed.spec.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.spec.js +123 -1
- package/lib/src/embed/ts-embed.spec.js.map +1 -1
- package/lib/src/errors.d.ts +11 -0
- package/lib/src/errors.d.ts.map +1 -1
- package/lib/src/errors.js +11 -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/index.d.ts +1 -1
- package/lib/src/react/index.d.ts.map +1 -1
- package/lib/src/react/index.js +3 -2
- package/lib/src/react/index.js.map +1 -1
- package/lib/src/react/index.spec.js +1 -1
- package/lib/src/react/index.spec.js.map +1 -1
- package/lib/src/types.d.ts +163 -21
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +64 -21
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils/custom-actions.d.ts +12 -0
- package/lib/src/utils/custom-actions.d.ts.map +1 -0
- package/lib/src/utils/custom-actions.js +175 -0
- package/lib/src/utils/custom-actions.js.map +1 -0
- package/lib/src/utils/custom-actions.spec.d.ts +2 -0
- package/lib/src/utils/custom-actions.spec.d.ts.map +1 -0
- package/lib/src/utils/custom-actions.spec.js +397 -0
- package/lib/src/utils/custom-actions.spec.js.map +1 -0
- package/lib/src/utils/processData.d.ts.map +1 -1
- package/lib/src/utils/processData.js +10 -0
- package/lib/src/utils/processData.js.map +1 -1
- package/lib/src/utils/processData.spec.js +11 -0
- package/lib/src/utils/processData.spec.js.map +1 -1
- package/lib/src/utils.d.ts +21 -0
- package/lib/src/utils.d.ts.map +1 -1
- package/lib/src/utils.js +29 -0
- package/lib/src/utils.js.map +1 -1
- package/lib/src/utils.spec.js +39 -1
- package/lib/src/utils.spec.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +229 -40
- package/package.json +3 -3
- package/src/authToken.spec.ts +48 -1
- package/src/authToken.ts +13 -2
- package/src/css-variables.ts +2 -1
- package/src/embed/app.spec.ts +99 -3
- package/src/embed/app.ts +44 -1
- package/src/embed/bodyless-conversation.ts +3 -8
- package/src/embed/conversation.ts +4 -19
- package/src/embed/liveboard.spec.ts +128 -30
- package/src/embed/liveboard.ts +66 -52
- package/src/embed/sage.spec.ts +24 -10
- package/src/embed/sage.ts +7 -12
- package/src/embed/search-bar.tsx +7 -14
- package/src/embed/search.spec.ts +13 -14
- package/src/embed/search.ts +8 -19
- package/src/embed/ts-embed.spec.ts +136 -2
- package/src/embed/ts-embed.ts +31 -28
- package/src/errors.ts +12 -0
- package/src/index.ts +4 -0
- package/src/react/index.spec.tsx +1 -1
- package/src/react/index.tsx +5 -2
- package/src/types.ts +225 -79
- package/src/utils/custom-actions.spec.ts +431 -0
- package/src/utils/custom-actions.ts +217 -0
- package/src/utils/processData.spec.ts +12 -0
- package/src/utils/processData.ts +10 -0
- package/src/utils.spec.ts +52 -0
- package/src/utils.ts +31 -0
- package/dist/index-BDlM0f0T.js +0 -7371
- package/dist/index-D1pyb7RG.js +0 -7371
- package/dist/index-DeFzsyFF.js +0 -7371
- package/dist/index-Dpf0rd6w.js +0 -7371
- package/dist/index-UuEbsISo.js +0 -7447
- package/dist/index-e3Uw3YFO.js +0 -7371
- package/dist/index-k7pkZMhx.js +0 -7371
|
@@ -20,7 +20,7 @@ declare module '@thoughtspot/visual-embed-sdk' {
|
|
|
20
20
|
import { SpotterEmbed, SpotterEmbedViewConfig, ConversationEmbed, ConversationViewConfig } from '@thoughtspot/visual-embed-sdk/embed/conversation';
|
|
21
21
|
import { AuthFailureType, AuthStatus, AuthEvent, AuthEventEmitter } from '@thoughtspot/visual-embed-sdk/auth';
|
|
22
22
|
import { getSessionInfo } from '@thoughtspot/visual-embed-sdk/utils/sessionInfoService';
|
|
23
|
-
import { AuthType, RuntimeFilter, RuntimeFilterOp, EmbedEvent, HostEvent, DataSourceVisualMode, Action, EmbedConfig, PrefetchFeatures, FrameParams, DOMSelector, HomeLeftNavItem, HomepageModule, MessageOptions, MessageCallback, MessagePayload, CustomisationsInterface, CustomStyles, customCssInterface, ContextMenuTriggerOptions, RuntimeParameter, LogLevel, VizPoint, CustomActionPayload, ListPageColumns } from '@thoughtspot/visual-embed-sdk/types';
|
|
23
|
+
import { AuthType, RuntimeFilter, RuntimeFilterOp, EmbedEvent, HostEvent, DataSourceVisualMode, Action, EmbedConfig, PrefetchFeatures, FrameParams, DOMSelector, HomeLeftNavItem, HomepageModule, MessageOptions, MessageCallback, MessagePayload, CustomisationsInterface, CustomStyles, customCssInterface, ContextMenuTriggerOptions, RuntimeParameter, LogLevel, VizPoint, CustomActionPayload, ListPageColumns, CustomActionsPosition, CustomActionTarget } from '@thoughtspot/visual-embed-sdk/types';
|
|
24
24
|
import { CustomCssVariables } from '@thoughtspot/visual-embed-sdk/css-variables';
|
|
25
25
|
import { SageEmbed, SageViewConfig } from '@thoughtspot/visual-embed-sdk/embed/sage';
|
|
26
26
|
import { AnswerService, SessionInterface, UnderlyingDataPoint } from '@thoughtspot/visual-embed-sdk/utils/graphql/answerService/answerService';
|
|
@@ -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, ListPage, 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, CustomActionsPosition, CustomActionTarget, };
|
|
34
34
|
export { resetCachedAuthToken } from '@thoughtspot/visual-embed-sdk/authToken';
|
|
35
35
|
}
|
|
36
36
|
|
|
@@ -127,7 +127,12 @@ declare module '@thoughtspot/visual-embed-sdk/embed/app' {
|
|
|
127
127
|
* Modular (v2) introduces the updated Modular Home Experience.
|
|
128
128
|
* It serves as the foundational version of the home page.
|
|
129
129
|
*/
|
|
130
|
-
Modular = "v2"
|
|
130
|
+
Modular = "v2",
|
|
131
|
+
/**
|
|
132
|
+
* ModularWithStylingChanges (v3) introduces Modular Home Experience
|
|
133
|
+
* with styling changes.
|
|
134
|
+
*/
|
|
135
|
+
ModularWithStylingChanges = "v3"
|
|
131
136
|
}
|
|
132
137
|
/**
|
|
133
138
|
* Define the version of the list page
|
|
@@ -548,6 +553,22 @@ declare module '@thoughtspot/visual-embed-sdk/embed/app' {
|
|
|
548
553
|
* ```
|
|
549
554
|
*/
|
|
550
555
|
isLiveboardStylingAndGroupingEnabled?: boolean;
|
|
556
|
+
/**
|
|
557
|
+
* This flag is used to enable/disable the png embedding of liveboard in scheduled mails
|
|
558
|
+
*
|
|
559
|
+
* Supported embed types: `AppEmbed`, `LiveboardEmbed`
|
|
560
|
+
* @type {boolean}
|
|
561
|
+
* @version SDK: 1.42.0 | ThoughtSpot: 10.14.0.cl
|
|
562
|
+
* @example
|
|
563
|
+
* ```js
|
|
564
|
+
* // Replace <EmbedComponent> with embed component name. For example, AppEmbed or LiveboardEmbed
|
|
565
|
+
* const embed = new <EmbedComponent>('#tsEmbed', {
|
|
566
|
+
* ... // other embed view config
|
|
567
|
+
* isPNGInScheduledEmailsEnabled: true,
|
|
568
|
+
* })
|
|
569
|
+
* ```
|
|
570
|
+
*/
|
|
571
|
+
isPNGInScheduledEmailsEnabled?: boolean;
|
|
551
572
|
/**
|
|
552
573
|
* This flag is used to enable the full height lazy load data.
|
|
553
574
|
*
|
|
@@ -1089,6 +1110,22 @@ declare module '@thoughtspot/visual-embed-sdk/embed/liveboard' {
|
|
|
1089
1110
|
* ```
|
|
1090
1111
|
*/
|
|
1091
1112
|
isLiveboardStylingAndGroupingEnabled?: boolean;
|
|
1113
|
+
/**
|
|
1114
|
+
* This flag is used to enable/disable the png embedding of liveboard in scheduled mails
|
|
1115
|
+
*
|
|
1116
|
+
* Supported embed types: `AppEmbed`, `LiveboardEmbed`
|
|
1117
|
+
* @type {boolean}
|
|
1118
|
+
* @version SDK: 1.42.0 | ThoughtSpot: 10.14.0.cl
|
|
1119
|
+
* @example
|
|
1120
|
+
* ```js
|
|
1121
|
+
* // Replace <EmbedComponent> with embed component name. For example, AppEmbed or LiveboardEmbed
|
|
1122
|
+
* const embed = new <EmbedComponent>('#tsEmbed', {
|
|
1123
|
+
* ... // other embed view config
|
|
1124
|
+
* isPNGInScheduledEmailsEnabled: true,
|
|
1125
|
+
* })
|
|
1126
|
+
* ```
|
|
1127
|
+
*/
|
|
1128
|
+
isPNGInScheduledEmailsEnabled?: boolean;
|
|
1092
1129
|
/**
|
|
1093
1130
|
* This flag is used to enable the full height lazy load data.
|
|
1094
1131
|
*
|
|
@@ -1129,6 +1166,22 @@ declare module '@thoughtspot/visual-embed-sdk/embed/liveboard' {
|
|
|
1129
1166
|
* @version SDK: 1.40.0 | ThoughtSpot:10.12.0.cl
|
|
1130
1167
|
*/
|
|
1131
1168
|
lazyLoadingMargin?: string;
|
|
1169
|
+
/**
|
|
1170
|
+
* showSpotterLimitations : show limitation text
|
|
1171
|
+
* of the spotter underneath the chat input.
|
|
1172
|
+
* default is false.
|
|
1173
|
+
*
|
|
1174
|
+
* @example
|
|
1175
|
+
* ```js
|
|
1176
|
+
* const embed = new LiveboardEmbed('#embed-container', {
|
|
1177
|
+
* // ...other options
|
|
1178
|
+
* showSpotterLimitations: true,
|
|
1179
|
+
* })
|
|
1180
|
+
* ```
|
|
1181
|
+
* @type {boolean}
|
|
1182
|
+
* @version SDK: 1.41.1 | ThoughtSpot: 10.5.0.cl
|
|
1183
|
+
*/
|
|
1184
|
+
showSpotterLimitations?: boolean;
|
|
1132
1185
|
}
|
|
1133
1186
|
/**
|
|
1134
1187
|
* Embed a ThoughtSpot Liveboard or visualization. When rendered it already
|
|
@@ -1153,7 +1206,6 @@ declare module '@thoughtspot/visual-embed-sdk/embed/liveboard' {
|
|
|
1153
1206
|
* embedded Liveboard or visualization.
|
|
1154
1207
|
*/
|
|
1155
1208
|
protected getEmbedParams(): string;
|
|
1156
|
-
protected getEmbedParamsObject(): any;
|
|
1157
1209
|
/**
|
|
1158
1210
|
* @hidden
|
|
1159
1211
|
* Internal state to track the current liveboard id.
|
|
@@ -1520,7 +1572,6 @@ declare module '@thoughtspot/visual-embed-sdk/embed/search' {
|
|
|
1520
1572
|
};
|
|
1521
1573
|
};
|
|
1522
1574
|
protected getAppInitData(): Promise<SearchAppInitData>;
|
|
1523
|
-
protected getEmbedParamsObject(): Record<any, any>;
|
|
1524
1575
|
protected getEmbedParams(): string;
|
|
1525
1576
|
/**
|
|
1526
1577
|
* Construct the URL of the embedded ThoughtSpot search to be
|
|
@@ -1647,7 +1698,6 @@ declare module '@thoughtspot/visual-embed-sdk/embed/search-bar' {
|
|
|
1647
1698
|
protected viewConfig: SearchBarViewConfig;
|
|
1648
1699
|
protected embedComponentType: string;
|
|
1649
1700
|
constructor(domSelector: string, viewConfig: SearchBarViewConfig);
|
|
1650
|
-
protected getEmbedParamsObject(): Record<any, any>;
|
|
1651
1701
|
/**
|
|
1652
1702
|
* Render the embedded ThoughtSpot search
|
|
1653
1703
|
*/
|
|
@@ -1691,7 +1741,6 @@ declare module '@thoughtspot/visual-embed-sdk/embed/bodyless-conversation' {
|
|
|
1691
1741
|
export class ConversationMessage extends TsEmbed {
|
|
1692
1742
|
protected viewConfig: SpotterAgentMessageViewConfig;
|
|
1693
1743
|
constructor(container: HTMLElement, viewConfig: SpotterAgentMessageViewConfig);
|
|
1694
|
-
protected getEmbedParamsObject(): Record<any, any>;
|
|
1695
1744
|
getIframeSrc(): string;
|
|
1696
1745
|
render(): Promise<ConversationMessage>;
|
|
1697
1746
|
}
|
|
@@ -1829,8 +1878,8 @@ declare module '@thoughtspot/visual-embed-sdk/embed/conversation' {
|
|
|
1829
1878
|
* Flag to control Data panel experience
|
|
1830
1879
|
*
|
|
1831
1880
|
* Supported embed types: `SageEmbed`, `AppEmbed`, `SearchBarEmbed`, `LiveboardEmbed`, `SearchEmbed`
|
|
1832
|
-
* @default
|
|
1833
|
-
* @version SDK: 1.
|
|
1881
|
+
* @default true
|
|
1882
|
+
* @version SDK: 1.43.0 | ThoughtSpot Cloud: 10.14.0.cl
|
|
1834
1883
|
* @example
|
|
1835
1884
|
* ```js
|
|
1836
1885
|
* // Replace <EmbedComponent> with embed component name. For example, SageEmbed, AppEmbed, or SearchBarEmbed
|
|
@@ -1959,7 +2008,6 @@ declare module '@thoughtspot/visual-embed-sdk/embed/conversation' {
|
|
|
1959
2008
|
export class SpotterEmbed extends TsEmbed {
|
|
1960
2009
|
protected viewConfig: SpotterEmbedViewConfig;
|
|
1961
2010
|
constructor(container: HTMLElement, viewConfig: SpotterEmbedViewConfig);
|
|
1962
|
-
protected getEmbedParamsObject(): Record<any, any>;
|
|
1963
2011
|
getIframeSrc(): string;
|
|
1964
2012
|
render(): Promise<SpotterEmbed>;
|
|
1965
2013
|
}
|
|
@@ -2917,6 +2965,31 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
2917
2965
|
* ```
|
|
2918
2966
|
*/
|
|
2919
2967
|
disableFullscreenPresentation?: boolean;
|
|
2968
|
+
/**
|
|
2969
|
+
* Custom Actions allows users to define interactive UI actions (like buttons or menu
|
|
2970
|
+
* items) that appear in ThoughtSpot's visualizations, answers, and Liveboards. These
|
|
2971
|
+
* actions enable users to trigger custom workflows — such as navigating to an
|
|
2972
|
+
* external app, calling an API, or opening a modal — based on the data context of
|
|
2973
|
+
* what they clicked can be used to trigger custom logic when the action is clicked.
|
|
2974
|
+
* @version SDK: 1.43.0 | ThoughtSpot: 10.14.0.cl
|
|
2975
|
+
* @example
|
|
2976
|
+
* ```js
|
|
2977
|
+
* import { CustomActionPosition, CustomActionTarget } from '@thoughtspot/visual-embed-sdk';
|
|
2978
|
+
* init({
|
|
2979
|
+
* ... // other embed config options
|
|
2980
|
+
* customActions: [
|
|
2981
|
+
* {
|
|
2982
|
+
* name: 'customAction',
|
|
2983
|
+
* id: 'customAction',
|
|
2984
|
+
* target: CustomActionTarget.VISUALIZATION,
|
|
2985
|
+
* position: CustomActionPosition.PRIMARY,
|
|
2986
|
+
* }
|
|
2987
|
+
* }
|
|
2988
|
+
* ]
|
|
2989
|
+
* })
|
|
2990
|
+
* ```
|
|
2991
|
+
*/
|
|
2992
|
+
customActions?: CustomAction[];
|
|
2920
2993
|
}
|
|
2921
2994
|
export interface LayoutConfig {
|
|
2922
2995
|
}
|
|
@@ -3277,6 +3350,34 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
3277
3350
|
* ```
|
|
3278
3351
|
*/
|
|
3279
3352
|
showAlerts?: boolean;
|
|
3353
|
+
/**
|
|
3354
|
+
* Custom Actions allows users to define interactive UI actions (like buttons or menu
|
|
3355
|
+
* items) that appear in ThoughtSpot's visualizations, answers, and Liveboards. These
|
|
3356
|
+
* actions enable users to trigger custom workflows — such as navigating to an
|
|
3357
|
+
* external app, calling an API, or opening a modal — based on the data context of
|
|
3358
|
+
* what they clicked can be used to trigger custom logic when the action is clicked.
|
|
3359
|
+
*
|
|
3360
|
+
* Supported embed types: `AppEmbed`, `LiveboardEmbed`, `SageEmbed`, `SearchEmbed`, `SpotterEmbed`
|
|
3361
|
+
* @version SDK: 1.43.0 | ThoughtSpot: 10.14.0.cl
|
|
3362
|
+
* @example
|
|
3363
|
+
* ```js
|
|
3364
|
+
* import { CustomActionPosition, CustomActionTarget } from '@thoughtspot/visual-embed-sdk';
|
|
3365
|
+
* // Use supported embed types such as AppEmbed or LiveboardEmbed
|
|
3366
|
+
* const embed = new LiveboardEmbed('#tsEmbed', {
|
|
3367
|
+
* ... // other embed config options
|
|
3368
|
+
* customActions: [
|
|
3369
|
+
* {
|
|
3370
|
+
* name: 'customAction',
|
|
3371
|
+
* id: 'customAction',
|
|
3372
|
+
* target: CustomActionTarget.VISUALIZATION,
|
|
3373
|
+
* position: CustomActionPosition.PRIMARY,
|
|
3374
|
+
* }
|
|
3375
|
+
* }
|
|
3376
|
+
* ]
|
|
3377
|
+
* })
|
|
3378
|
+
* ```
|
|
3379
|
+
*/
|
|
3380
|
+
customActions?: CustomAction[];
|
|
3280
3381
|
}
|
|
3281
3382
|
/**
|
|
3282
3383
|
* The configuration object for Home page embeds configs.
|
|
@@ -3286,7 +3387,8 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
3286
3387
|
* Hide list page columns
|
|
3287
3388
|
* For example: hiddenListColumns = [ListPageColumns.Author]
|
|
3288
3389
|
*
|
|
3289
|
-
* **Note**: This option is available only in full app embedding
|
|
3390
|
+
* **Note**: This option is currently available only in full app embedding and requires importing the ListPageColumns enum.
|
|
3391
|
+
* At present, it can be used with Liveboard and Answer list pages, and starting with version 10.14.0.cl, it will also be supported for the Home page.
|
|
3290
3392
|
*
|
|
3291
3393
|
* Supported embed types: `AppEmbed`
|
|
3292
3394
|
* @version SDK: 1.38.0 | ThoughtSpot: 10.9.0.cl
|
|
@@ -3471,8 +3573,8 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
3471
3573
|
* Flag to control Data panel experience
|
|
3472
3574
|
*
|
|
3473
3575
|
* Supported embed types: `SageEmbed`, `AppEmbed`, `SearchBarEmbed`, `LiveboardEmbed`, `SearchEmbed`
|
|
3474
|
-
* @default
|
|
3475
|
-
* @version SDK: 1.
|
|
3576
|
+
* @default true
|
|
3577
|
+
* @version SDK: 1.43.0 | ThoughtSpot Cloud: 10.14.0.cl
|
|
3476
3578
|
* @example
|
|
3477
3579
|
* ```js
|
|
3478
3580
|
* // Replace <EmbedComponent> with embed component name. For example, SageEmbed, AppEmbed, or SearchBarEmbed
|
|
@@ -3602,7 +3704,8 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
3602
3704
|
*/
|
|
3603
3705
|
isLiveboardCompactHeaderEnabled?: boolean;
|
|
3604
3706
|
/**
|
|
3605
|
-
* This flag can be used to show or hide the Liveboard verified icon in the compact
|
|
3707
|
+
* This flag can be used to show or hide the Liveboard verified icon in the compact
|
|
3708
|
+
* header.
|
|
3606
3709
|
*
|
|
3607
3710
|
* Supported embed types: `AppEmbed`, `LiveboardEmbed`
|
|
3608
3711
|
* @version SDK: 1.35.0 | ThoughtSpot:10.4.0.cl
|
|
@@ -3620,6 +3723,8 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
3620
3723
|
/**
|
|
3621
3724
|
* This flag is used to enable/disable hide irrelevant filters in Liveboard tab
|
|
3622
3725
|
*
|
|
3726
|
+
* **Note**: This feature is supported only if compact header is enabled on your Liveboard. To enable compact header, use the `isLiveboardCompactHeaderEnabled` attribute.
|
|
3727
|
+
*
|
|
3623
3728
|
* Supported embed types: `AppEmbed`, `LiveboardEmbed`
|
|
3624
3729
|
* @version SDK: 1.36.0 | ThoughtSpot:10.6.0.cl
|
|
3625
3730
|
* @default false
|
|
@@ -3629,12 +3734,14 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
3629
3734
|
* const embed = new <EmbedComponent>('#tsEmbed', {
|
|
3630
3735
|
* ... // other embed view config
|
|
3631
3736
|
* hideIrrelevantChipsInLiveboardTabs: true,
|
|
3737
|
+
* isLiveboardCompactHeaderEnabled: true,
|
|
3632
3738
|
* })
|
|
3633
3739
|
* ```
|
|
3634
3740
|
*/
|
|
3635
3741
|
hideIrrelevantChipsInLiveboardTabs?: boolean;
|
|
3636
3742
|
/**
|
|
3637
|
-
* This flag can be used to show or hide the re-verify banner on the Liveboard
|
|
3743
|
+
* This flag can be used to show or hide the re-verify banner on the Liveboard
|
|
3744
|
+
* compact header
|
|
3638
3745
|
*
|
|
3639
3746
|
* Supported embed types: `AppEmbed`, `LiveboardEmbed`
|
|
3640
3747
|
* @version SDK: 1.35.0 | ThoughtSpot:10.4.0.cl
|
|
@@ -3681,6 +3788,21 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
3681
3788
|
* ```
|
|
3682
3789
|
*/
|
|
3683
3790
|
coverAndFilterOptionInPDF?: boolean;
|
|
3791
|
+
/**
|
|
3792
|
+
* This flag is used to enable or disable the XLSX/CSV download option for Liveboards.
|
|
3793
|
+
*
|
|
3794
|
+
* Supported embed types: `AppEmbed`, `LiveboardEmbed`
|
|
3795
|
+
* @version SDK: 1.41.0 | ThoughtSpot: 10.14.0.cl
|
|
3796
|
+
* @example
|
|
3797
|
+
* ```js
|
|
3798
|
+
* // Replace <EmbedComponent> with embed component name. For example, AppEmbed or LiveboardEmbed
|
|
3799
|
+
* const embed = new <EmbedComponent>('#tsEmbed', {
|
|
3800
|
+
* ... // other embed view config
|
|
3801
|
+
* liveboardXLSXCSVDownload: true,
|
|
3802
|
+
* })
|
|
3803
|
+
* ```
|
|
3804
|
+
*/
|
|
3805
|
+
liveboardXLSXCSVDownload?: boolean;
|
|
3684
3806
|
}
|
|
3685
3807
|
export interface AllEmbedViewConfig extends BaseViewConfig, SearchLiveboardCommonViewConfig, HomePageConfig, LiveboardAppEmbedViewConfig {
|
|
3686
3808
|
}
|
|
@@ -4568,6 +4690,11 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
4568
4690
|
* @hidden
|
|
4569
4691
|
*/
|
|
4570
4692
|
APP_INIT = "appInit",
|
|
4693
|
+
/**
|
|
4694
|
+
* Internal event to clear the cached info
|
|
4695
|
+
* @hidden
|
|
4696
|
+
*/
|
|
4697
|
+
CLEAR_INFO_CACHE = "clearInfoCache",
|
|
4571
4698
|
/**
|
|
4572
4699
|
* Emitted when a user clicks **Show Liveboard details** on a Liveboard
|
|
4573
4700
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
@@ -5035,7 +5162,18 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
5035
5162
|
* })
|
|
5036
5163
|
* ```
|
|
5037
5164
|
*/
|
|
5038
|
-
EmbedListenerReady = "EmbedListenerReady"
|
|
5165
|
+
EmbedListenerReady = "EmbedListenerReady",
|
|
5166
|
+
/**
|
|
5167
|
+
* Emitted when the organization is switched.
|
|
5168
|
+
* @example
|
|
5169
|
+
* ```js
|
|
5170
|
+
* appEmbed.on(EmbedEvent.OrgSwitched, (payload) => {
|
|
5171
|
+
* console.log('payload', payload);
|
|
5172
|
+
* })
|
|
5173
|
+
* ```
|
|
5174
|
+
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
5175
|
+
*/
|
|
5176
|
+
OrgSwitched = "orgSwitched"
|
|
5039
5177
|
}
|
|
5040
5178
|
/**
|
|
5041
5179
|
* Event types that can be triggered by the host application
|
|
@@ -5952,7 +6090,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
5952
6090
|
* column: "Date",
|
|
5953
6091
|
* oper: 'EQ',
|
|
5954
6092
|
* values: ["2023-07-31"],
|
|
5955
|
-
*
|
|
6093
|
+
* type: "EXACT_DATE"
|
|
5956
6094
|
* }]
|
|
5957
6095
|
* });
|
|
5958
6096
|
* ```
|
|
@@ -6297,17 +6435,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
6297
6435
|
* ```
|
|
6298
6436
|
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
6299
6437
|
*/
|
|
6300
|
-
AskSpotter = "AskSpotter"
|
|
6301
|
-
/**
|
|
6302
|
-
* @hidden
|
|
6303
|
-
* Triggers the update of the embed params.
|
|
6304
|
-
*
|
|
6305
|
-
* @example
|
|
6306
|
-
* ```js
|
|
6307
|
-
* liveboardEmbed.trigger(HostEvent.UpdateEmbedParams, viewConfig);
|
|
6308
|
-
* ```
|
|
6309
|
-
*/
|
|
6310
|
-
UpdateEmbedParams = "updateEmbedParams"
|
|
6438
|
+
AskSpotter = "AskSpotter"
|
|
6311
6439
|
}
|
|
6312
6440
|
/**
|
|
6313
6441
|
* The different visual modes that the data sources panel within
|
|
@@ -6403,6 +6531,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
6403
6531
|
Query = "query",
|
|
6404
6532
|
HideHomepageLeftNav = "hideHomepageLeftNav",
|
|
6405
6533
|
ModularHomeExperienceEnabled = "modularHomeExperience",
|
|
6534
|
+
HomepageVersion = "homepageVersion",
|
|
6406
6535
|
ListPageVersion = "listpageVersion",
|
|
6407
6536
|
PendoTrackingKey = "additionalPendoKey",
|
|
6408
6537
|
LiveboardHeaderSticky = "isLiveboardHeaderSticky",
|
|
@@ -6443,7 +6572,9 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
6443
6572
|
isSpotterAgentEmbed = "isSpotterAgentEmbed",
|
|
6444
6573
|
IsLiveboardStylingAndGroupingEnabled = "isLiveboardStylingAndGroupingEnabled",
|
|
6445
6574
|
IsLazyLoadingForEmbedEnabled = "isLazyLoadingForEmbedEnabled",
|
|
6446
|
-
RootMarginForLazyLoad = "rootMarginForLazyLoad"
|
|
6575
|
+
RootMarginForLazyLoad = "rootMarginForLazyLoad",
|
|
6576
|
+
LiveboardXLSXCSVDownload = "isLiveboardXLSXCSVDownloadEnabled",
|
|
6577
|
+
isPNGInScheduledEmailsEnabled = "isPNGInScheduledEmailsEnabled"
|
|
6447
6578
|
}
|
|
6448
6579
|
/**
|
|
6449
6580
|
* ThoughtSpot application pages include actions and menu commands
|
|
@@ -7015,7 +7146,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
7015
7146
|
* The Favorites icon (*) for Answers,
|
|
7016
7147
|
* Liveboard, and data objects like Worksheet, Model,
|
|
7017
7148
|
* Tables and Views.
|
|
7018
|
-
* Allows adding an object to the user
|
|
7149
|
+
* Allows adding an object to the user's favorites list.
|
|
7019
7150
|
* @example
|
|
7020
7151
|
* ```js
|
|
7021
7152
|
* disabledActions: [Action.AddToFavorites]
|
|
@@ -7723,7 +7854,30 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
7723
7854
|
* ```
|
|
7724
7855
|
* @version SDK: 1.41.0 | ThoughtSpot Cloud: 10.13.0.cl
|
|
7725
7856
|
*/
|
|
7726
|
-
SpotterTokenQuickEdit = "SpotterTokenQuickEdit"
|
|
7857
|
+
SpotterTokenQuickEdit = "SpotterTokenQuickEdit",
|
|
7858
|
+
/**
|
|
7859
|
+
* The **PNG screenshot in email** option in the schedule email dialog.
|
|
7860
|
+
* Includes a PNG screenshot in the notification email body.
|
|
7861
|
+
* @example
|
|
7862
|
+
* ```js
|
|
7863
|
+
* disabledActions: [Action.PngScreenshotInEmail]
|
|
7864
|
+
* ```
|
|
7865
|
+
* ```
|
|
7866
|
+
* @version SDK: 1.42.0 | ThoughtSpot Cloud: 10.14.0.cl
|
|
7867
|
+
*/
|
|
7868
|
+
PngScreenshotInEmail = "pngScreenshotInEmail",
|
|
7869
|
+
/**
|
|
7870
|
+
* The **Remove attachment** action in the schedule email dialog.
|
|
7871
|
+
* Removes an attachment from the email configuration.
|
|
7872
|
+
* @example
|
|
7873
|
+
* ```js
|
|
7874
|
+
* disabledActions: [Action.RemoveAttachment]
|
|
7875
|
+
* ```
|
|
7876
|
+
* ```
|
|
7877
|
+
* ```
|
|
7878
|
+
* @version SDK: 1.42.0 | ThoughtSpot Cloud: 10.14.0.cl
|
|
7879
|
+
*/
|
|
7880
|
+
RemoveAttachment = "removeAttachment"
|
|
7727
7881
|
}
|
|
7728
7882
|
export interface AnswerServiceType {
|
|
7729
7883
|
getAnswer?: (offset: number, batchSize: number) => any;
|
|
@@ -7784,6 +7938,41 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
7784
7938
|
session: SessionInterface;
|
|
7785
7939
|
vizId?: string;
|
|
7786
7940
|
}
|
|
7941
|
+
export interface CustomAction {
|
|
7942
|
+
name: string;
|
|
7943
|
+
id: string;
|
|
7944
|
+
position: CustomActionsPosition;
|
|
7945
|
+
target: CustomActionTarget;
|
|
7946
|
+
metadataIds?: {
|
|
7947
|
+
answerIds?: string[];
|
|
7948
|
+
liveboardIds?: string[];
|
|
7949
|
+
vizIds?: string[];
|
|
7950
|
+
};
|
|
7951
|
+
dataModelIds?: {
|
|
7952
|
+
modelIds?: string[];
|
|
7953
|
+
modelColumnNames?: string[];
|
|
7954
|
+
};
|
|
7955
|
+
orgIds?: string[];
|
|
7956
|
+
groupIds?: string[];
|
|
7957
|
+
}
|
|
7958
|
+
/**
|
|
7959
|
+
* Enum options to show custom actions at different
|
|
7960
|
+
* positions in the application.
|
|
7961
|
+
*/
|
|
7962
|
+
export enum CustomActionsPosition {
|
|
7963
|
+
PRIMARY = "PRIMARY",
|
|
7964
|
+
MENU = "MENU",
|
|
7965
|
+
CONTEXTMENU = "CONTEXTMENU"
|
|
7966
|
+
}
|
|
7967
|
+
/**
|
|
7968
|
+
* Enum options to mention the target of the custom action.
|
|
7969
|
+
*/
|
|
7970
|
+
export enum CustomActionTarget {
|
|
7971
|
+
LIVEBOARD = "LIVEBOARD",
|
|
7972
|
+
VIZ = "VIZ",
|
|
7973
|
+
ANSWER = "ANSWER",
|
|
7974
|
+
SPOTTER = "SPOTTER"
|
|
7975
|
+
}
|
|
7787
7976
|
/**
|
|
7788
7977
|
* Enum options to show or suppress Visual Embed SDK and
|
|
7789
7978
|
* ThoughtSpot application logs in the console output.
|
|
@@ -7878,6 +8067,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
7878
8067
|
hiddenHomeLeftNavItems: string[];
|
|
7879
8068
|
customVariablesForThirdPartyTools: Record<string, any>;
|
|
7880
8069
|
hiddenListColumns: ListPageColumns[];
|
|
8070
|
+
customActions: CustomAction[];
|
|
7881
8071
|
}
|
|
7882
8072
|
}
|
|
7883
8073
|
|
|
@@ -7907,7 +8097,8 @@ declare module '@thoughtspot/visual-embed-sdk/css-variables' {
|
|
|
7907
8097
|
* Font color of the text on toggle buttons such as
|
|
7908
8098
|
* **All**, **Answers**, and **Liveboards** on the Home page (Classic experience),
|
|
7909
8099
|
* the text color of the chart and table tiles on Home page (New modular Homepage
|
|
7910
|
-
* experience),
|
|
8100
|
+
* experience), title text on the AI-generated charts and tables, and object titles on
|
|
8101
|
+
* list pages such as *Liveboards* and *Answers*.
|
|
7911
8102
|
* The default color code is #2770EF.
|
|
7912
8103
|
*
|
|
7913
8104
|
*/
|
|
@@ -8736,7 +8927,6 @@ declare module '@thoughtspot/visual-embed-sdk/embed/sage' {
|
|
|
8736
8927
|
*/
|
|
8737
8928
|
protected viewConfig: SageViewConfig;
|
|
8738
8929
|
constructor(domSelector: DOMSelector, viewConfig: SageViewConfig);
|
|
8739
|
-
protected getEmbedParamsObject(): Record<any, any>;
|
|
8740
8930
|
/**
|
|
8741
8931
|
* Constructs a map of parameters to be passed on to the
|
|
8742
8932
|
* embedded Eureka or Sage search page.
|
|
@@ -9215,6 +9405,7 @@ declare module '@thoughtspot/visual-embed-sdk/authToken' {
|
|
|
9215
9405
|
* @param embedConfig
|
|
9216
9406
|
*/
|
|
9217
9407
|
export function getAuthenticationToken(embedConfig: EmbedConfig): Promise<string>;
|
|
9408
|
+
export const validateAuthToken: (embedConfig: EmbedConfig, authToken: string, suppressAlert?: boolean) => Promise<boolean>;
|
|
9218
9409
|
/**
|
|
9219
9410
|
* Resets the auth token and a new token will be fetched on the next request.
|
|
9220
9411
|
* @example
|
|
@@ -9306,7 +9497,6 @@ declare module '@thoughtspot/visual-embed-sdk/embed/ts-embed' {
|
|
|
9306
9497
|
* @param query
|
|
9307
9498
|
*/
|
|
9308
9499
|
protected getEmbedBasePath(query: string): string;
|
|
9309
|
-
protected getUpdateEmbedParamsObject(): Record<any, any>;
|
|
9310
9500
|
/**
|
|
9311
9501
|
* Common query params set for all the embed modes.
|
|
9312
9502
|
* @param queryParams
|
|
@@ -9322,7 +9512,6 @@ declare module '@thoughtspot/visual-embed-sdk/embed/ts-embed' {
|
|
|
9322
9512
|
*/
|
|
9323
9513
|
protected getV1EmbedBasePath(queryString: string): string;
|
|
9324
9514
|
protected getEmbedParams(): string;
|
|
9325
|
-
protected getEmbedParamsObject(): Record<any, any>;
|
|
9326
9515
|
protected getRootIframeSrc(): string;
|
|
9327
9516
|
protected createIframeEl(frameSrc: string): HTMLIFrameElement;
|
|
9328
9517
|
protected handleInsertionIntoDOM(child: string | Node): void;
|
|
@@ -9415,10 +9604,10 @@ declare module '@thoughtspot/visual-embed-sdk/embed/ts-embed' {
|
|
|
9415
9604
|
*/
|
|
9416
9605
|
off(messageType: EmbedEvent, callback: MessageCallback): typeof TsEmbed.prototype;
|
|
9417
9606
|
/**
|
|
9418
|
-
|
|
9419
|
-
|
|
9420
|
-
|
|
9421
|
-
|
|
9607
|
+
* @hidden
|
|
9608
|
+
* Internal state to track if the embed container is loaded.
|
|
9609
|
+
* This is used to trigger events after the embed container is loaded.
|
|
9610
|
+
*/
|
|
9422
9611
|
isEmbedContainerLoaded: boolean;
|
|
9423
9612
|
protected getPreRenderObj<T extends TsEmbed>(): T;
|
|
9424
9613
|
/**
|
|
@@ -9455,7 +9644,7 @@ declare module '@thoughtspot/visual-embed-sdk/embed/ts-embed' {
|
|
|
9455
9644
|
* Creates the preRender shell
|
|
9456
9645
|
* @param showPreRenderByDefault - Show the preRender after render, hidden by default
|
|
9457
9646
|
*/
|
|
9458
|
-
preRender(showPreRenderByDefault?: boolean): Promise<TsEmbed>;
|
|
9647
|
+
preRender(showPreRenderByDefault?: boolean, replaceExistingPreRender?: boolean): Promise<TsEmbed>;
|
|
9459
9648
|
/**
|
|
9460
9649
|
* Get the Post Url Params for THOUGHTSPOT from the current
|
|
9461
9650
|
* host app URL.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thoughtspot/visual-embed-sdk",
|
|
3
|
-
"version": "1.41.
|
|
3
|
+
"version": "1.41.1",
|
|
4
4
|
"description": "ThoughtSpot Embed SDK",
|
|
5
5
|
"module": "lib/src/index.js",
|
|
6
6
|
"main": "dist/tsembed.js",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"docgen": "typedoc --tsconfig tsconfig.json --theme typedoc-theme --json static/typedoc/typedoc.json --disableOutputCheck",
|
|
56
56
|
"test-sdk": "jest -c jest.config.sdk.js --runInBand",
|
|
57
57
|
"test": "npm run test-sdk",
|
|
58
|
-
"posttest": "cat ./coverage/sdk/lcov.info | coveralls",
|
|
58
|
+
"posttest": "cat ./coverage/sdk/lcov.info | npx coveralls-next",
|
|
59
59
|
"is-publish-allowed": "node scripts/is-publish-allowed.js",
|
|
60
60
|
"prepublishOnly": "npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build",
|
|
61
61
|
"check-size": "npm run build && size-limit",
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
"babel-jest": "^26.6.3",
|
|
102
102
|
"babel-preset-gatsby": "^1.10.0",
|
|
103
103
|
"command-line-args": "^5.1.1",
|
|
104
|
-
"coveralls": "^
|
|
104
|
+
"coveralls-next": "^5.0.0",
|
|
105
105
|
"crypto": "^1.0.1",
|
|
106
106
|
"current-git-branch": "^1.1.0",
|
|
107
107
|
"dts-bundle": "^0.7.3",
|
package/src/authToken.spec.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import { getAuthenticationToken, resetCachedAuthToken } from './authToken';
|
|
1
|
+
import { getAuthenticationToken, resetCachedAuthToken, validateAuthToken } from './authToken';
|
|
2
2
|
import * as authServiceInstance from './utils/authService/authService';
|
|
3
3
|
import { EmbedConfig } from './types';
|
|
4
|
+
import { formatTemplate } from './utils';
|
|
5
|
+
import { logger } from './utils/logger';
|
|
6
|
+
import { ERROR_MESSAGE } from './errors';
|
|
4
7
|
|
|
5
8
|
describe('AuthToken Unit tests', () => {
|
|
6
9
|
test('getAuthenticationToken: When verification is disabled', async () => {
|
|
@@ -28,4 +31,48 @@ describe('AuthToken Unit tests', () => {
|
|
|
28
31
|
expect(token).toBe('abc2');
|
|
29
32
|
expect(authServiceInstance.verifyTokenService).toBeCalledWith('test', 'abc2');
|
|
30
33
|
});
|
|
34
|
+
|
|
35
|
+
test('validateAuthToken : When token is invalid by type number', async () => {
|
|
36
|
+
jest.spyOn(logger, 'error').mockImplementation(() => {});
|
|
37
|
+
const loggerSpy = jest.spyOn(logger, 'error');
|
|
38
|
+
|
|
39
|
+
const authToken = (123 as unknown) as string;
|
|
40
|
+
const errorMessage = formatTemplate(ERROR_MESSAGE.INVALID_TOKEN_TYPE_ERROR, {
|
|
41
|
+
invalidType: typeof authToken,
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
await expect(
|
|
45
|
+
validateAuthToken(
|
|
46
|
+
{
|
|
47
|
+
thoughtSpotHost: 'test',
|
|
48
|
+
} as EmbedConfig,
|
|
49
|
+
authToken,
|
|
50
|
+
),
|
|
51
|
+
).rejects.toThrow(errorMessage);
|
|
52
|
+
expect(loggerSpy).toHaveBeenCalledWith(errorMessage);
|
|
53
|
+
|
|
54
|
+
loggerSpy.mockRestore();
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
test('validateAuthToken : When token is invalid by type object', async () => {
|
|
58
|
+
jest.spyOn(logger, 'error').mockImplementation(() => {});
|
|
59
|
+
const loggerSpy = jest.spyOn(logger, 'error');
|
|
60
|
+
|
|
61
|
+
const authToken = ({} as unknown) as string;
|
|
62
|
+
const errorMessage = formatTemplate(ERROR_MESSAGE.INVALID_TOKEN_TYPE_ERROR, {
|
|
63
|
+
invalidType: typeof authToken,
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
await expect(
|
|
67
|
+
validateAuthToken(
|
|
68
|
+
{
|
|
69
|
+
thoughtSpotHost: 'test',
|
|
70
|
+
} as EmbedConfig,
|
|
71
|
+
authToken,
|
|
72
|
+
),
|
|
73
|
+
).rejects.toThrow(errorMessage);
|
|
74
|
+
expect(loggerSpy).toHaveBeenCalledWith(errorMessage);
|
|
75
|
+
|
|
76
|
+
loggerSpy.mockRestore();
|
|
77
|
+
});
|
|
31
78
|
});
|
package/src/authToken.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ERROR_MESSAGE } from './errors';
|
|
2
2
|
import { EmbedConfig } from './types';
|
|
3
|
-
import { getValueFromWindow, storeValueInWindow } from './utils';
|
|
3
|
+
import { getValueFromWindow, storeValueInWindow, formatTemplate } from './utils';
|
|
4
4
|
import { fetchAuthTokenService, verifyTokenService } from './utils/authService/authService';
|
|
5
5
|
import { logger } from './utils/logger';
|
|
6
6
|
|
|
@@ -53,12 +53,23 @@ export async function getAuthenticationToken(embedConfig: EmbedConfig): Promise<
|
|
|
53
53
|
return authToken;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
const validateAuthToken = async (
|
|
56
|
+
export const validateAuthToken = async (
|
|
57
57
|
embedConfig: EmbedConfig,
|
|
58
58
|
authToken: string,
|
|
59
59
|
suppressAlert?: boolean,
|
|
60
60
|
): Promise<boolean> => {
|
|
61
|
+
// even if token verification is disabled, we will still validate
|
|
62
|
+
// that the token is a string before proceeding.
|
|
63
|
+
if (typeof authToken !== 'string') {
|
|
64
|
+
const errorMessage = formatTemplate(ERROR_MESSAGE.INVALID_TOKEN_TYPE_ERROR, {
|
|
65
|
+
invalidType: typeof authToken,
|
|
66
|
+
});
|
|
67
|
+
logger.error(errorMessage);
|
|
68
|
+
throw new Error(errorMessage);
|
|
69
|
+
}
|
|
70
|
+
|
|
61
71
|
const cachedAuthToken = getCacheAuthToken();
|
|
72
|
+
|
|
62
73
|
if (embedConfig.disableTokenVerification) {
|
|
63
74
|
logger.info('Token verification is disabled. Assuming token is valid.');
|
|
64
75
|
return true;
|
package/src/css-variables.ts
CHANGED
|
@@ -27,7 +27,8 @@ export interface CustomCssVariables {
|
|
|
27
27
|
* Font color of the text on toggle buttons such as
|
|
28
28
|
* **All**, **Answers**, and **Liveboards** on the Home page (Classic experience),
|
|
29
29
|
* the text color of the chart and table tiles on Home page (New modular Homepage
|
|
30
|
-
* experience),
|
|
30
|
+
* experience), title text on the AI-generated charts and tables, and object titles on
|
|
31
|
+
* list pages such as *Liveboards* and *Answers*.
|
|
31
32
|
* The default color code is #2770EF.
|
|
32
33
|
*
|
|
33
34
|
*/
|