@thoughtspot/visual-embed-sdk 1.41.0-pre-render-1 → 1.41.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 +3 -3
- package/cjs/src/embed/app.d.ts +6 -1
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +19 -1
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/app.spec.js +60 -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 +0 -1
- 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 +0 -1
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +4 -27
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/liveboard.spec.js +25 -31
- 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/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/ts-embed.d.ts +4 -6
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +20 -21
- 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 +10 -0
- package/cjs/src/errors.d.ts.map +1 -1
- package/cjs/src/errors.js +11 -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 +2 -1
- package/cjs/src/react/index.js.map +1 -1
- package/cjs/src/types.d.ts +135 -17
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +40 -21
- 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 +7 -0
- package/cjs/src/utils.d.ts.map +1 -1
- package/cjs/src/utils.js +11 -1
- package/cjs/src/utils.js.map +1 -1
- package/cjs/src/utils.spec.js +28 -0
- package/cjs/src/utils.spec.js.map +1 -1
- package/dist/{index-CmEQfuE3.js → index-B_mxAan8.js} +1 -1
- package/dist/src/embed/app.d.ts +6 -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 +0 -1
- package/dist/src/embed/conversation.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts +0 -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 +4 -6
- 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 +10 -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 +135 -17
- 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 +7 -0
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +1704 -250
- package/dist/tsembed-react.js +1703 -249
- package/dist/tsembed.es.js +1704 -250
- package/dist/tsembed.js +1703 -249
- package/dist/visual-embed-sdk-react-full.d.ts +146 -31
- package/dist/visual-embed-sdk-react.d.ts +146 -31
- package/dist/visual-embed-sdk.d.ts +146 -31
- package/lib/package.json +3 -3
- package/lib/src/embed/app.d.ts +6 -1
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +19 -1
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/app.spec.js +60 -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 +0 -1
- 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 +0 -1
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +4 -27
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +25 -31
- 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/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/ts-embed.d.ts +4 -6
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +20 -21
- 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 +10 -0
- package/lib/src/errors.d.ts.map +1 -1
- package/lib/src/errors.js +10 -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 +1 -1
- package/lib/src/react/index.js.map +1 -1
- package/lib/src/types.d.ts +135 -17
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +39 -20
- 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 +7 -0
- package/lib/src/utils.d.ts.map +1 -1
- package/lib/src/utils.js +9 -0
- package/lib/src/utils.js.map +1 -1
- package/lib/src/utils.spec.js +29 -1
- package/lib/src/utils.spec.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +147 -32
- package/package.json +3 -3
- package/src/embed/app.spec.ts +85 -3
- package/src/embed/app.ts +21 -0
- package/src/embed/bodyless-conversation.ts +3 -8
- package/src/embed/conversation.ts +2 -17
- package/src/embed/liveboard.spec.ts +35 -35
- package/src/embed/liveboard.ts +4 -32
- package/src/embed/sage.ts +7 -12
- package/src/embed/search-bar.tsx +7 -14
- package/src/embed/search.ts +7 -18
- package/src/embed/ts-embed.spec.ts +136 -2
- package/src/embed/ts-embed.ts +25 -28
- package/src/errors.ts +11 -0
- package/src/index.ts +4 -0
- package/src/react/index.tsx +1 -0
- package/src/types.ts +198 -76
- 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 +34 -0
- package/src/utils.ts +10 -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
|
|
@@ -1153,7 +1158,6 @@ declare module '@thoughtspot/visual-embed-sdk/embed/liveboard' {
|
|
|
1153
1158
|
* embedded Liveboard or visualization.
|
|
1154
1159
|
*/
|
|
1155
1160
|
protected getEmbedParams(): string;
|
|
1156
|
-
protected getEmbedParamsObject(): any;
|
|
1157
1161
|
/**
|
|
1158
1162
|
* @hidden
|
|
1159
1163
|
* Internal state to track the current liveboard id.
|
|
@@ -1520,7 +1524,6 @@ declare module '@thoughtspot/visual-embed-sdk/embed/search' {
|
|
|
1520
1524
|
};
|
|
1521
1525
|
};
|
|
1522
1526
|
protected getAppInitData(): Promise<SearchAppInitData>;
|
|
1523
|
-
protected getEmbedParamsObject(): Record<any, any>;
|
|
1524
1527
|
protected getEmbedParams(): string;
|
|
1525
1528
|
/**
|
|
1526
1529
|
* Construct the URL of the embedded ThoughtSpot search to be
|
|
@@ -1647,7 +1650,6 @@ declare module '@thoughtspot/visual-embed-sdk/embed/search-bar' {
|
|
|
1647
1650
|
protected viewConfig: SearchBarViewConfig;
|
|
1648
1651
|
protected embedComponentType: string;
|
|
1649
1652
|
constructor(domSelector: string, viewConfig: SearchBarViewConfig);
|
|
1650
|
-
protected getEmbedParamsObject(): Record<any, any>;
|
|
1651
1653
|
/**
|
|
1652
1654
|
* Render the embedded ThoughtSpot search
|
|
1653
1655
|
*/
|
|
@@ -1691,7 +1693,6 @@ declare module '@thoughtspot/visual-embed-sdk/embed/bodyless-conversation' {
|
|
|
1691
1693
|
export class ConversationMessage extends TsEmbed {
|
|
1692
1694
|
protected viewConfig: SpotterAgentMessageViewConfig;
|
|
1693
1695
|
constructor(container: HTMLElement, viewConfig: SpotterAgentMessageViewConfig);
|
|
1694
|
-
protected getEmbedParamsObject(): Record<any, any>;
|
|
1695
1696
|
getIframeSrc(): string;
|
|
1696
1697
|
render(): Promise<ConversationMessage>;
|
|
1697
1698
|
}
|
|
@@ -1959,7 +1960,6 @@ declare module '@thoughtspot/visual-embed-sdk/embed/conversation' {
|
|
|
1959
1960
|
export class SpotterEmbed extends TsEmbed {
|
|
1960
1961
|
protected viewConfig: SpotterEmbedViewConfig;
|
|
1961
1962
|
constructor(container: HTMLElement, viewConfig: SpotterEmbedViewConfig);
|
|
1962
|
-
protected getEmbedParamsObject(): Record<any, any>;
|
|
1963
1963
|
getIframeSrc(): string;
|
|
1964
1964
|
render(): Promise<SpotterEmbed>;
|
|
1965
1965
|
}
|
|
@@ -2917,6 +2917,31 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
2917
2917
|
* ```
|
|
2918
2918
|
*/
|
|
2919
2919
|
disableFullscreenPresentation?: boolean;
|
|
2920
|
+
/**
|
|
2921
|
+
* Custom Actions allows users to define interactive UI actions (like buttons or menu
|
|
2922
|
+
* items) that appear in ThoughtSpot's visualizations, answers, and Liveboards. These
|
|
2923
|
+
* actions enable users to trigger custom workflows — such as navigating to an
|
|
2924
|
+
* external app, calling an API, or opening a modal — based on the data context of
|
|
2925
|
+
* what they clicked can be used to trigger custom logic when the action is clicked.
|
|
2926
|
+
* @version SDK: 1.43.0 | ThoughtSpot: 10.14.0.cl
|
|
2927
|
+
* @example
|
|
2928
|
+
* ```js
|
|
2929
|
+
* import { CustomActionPosition, CustomActionTarget } from '@thoughtspot/visual-embed-sdk';
|
|
2930
|
+
* init({
|
|
2931
|
+
* ... // other embed config options
|
|
2932
|
+
* customActions: [
|
|
2933
|
+
* {
|
|
2934
|
+
* name: 'customAction',
|
|
2935
|
+
* id: 'customAction',
|
|
2936
|
+
* target: CustomActionTarget.VISUALIZATION,
|
|
2937
|
+
* position: CustomActionPosition.PRIMARY,
|
|
2938
|
+
* }
|
|
2939
|
+
* }
|
|
2940
|
+
* ]
|
|
2941
|
+
* })
|
|
2942
|
+
* ```
|
|
2943
|
+
*/
|
|
2944
|
+
customActions?: CustomAction[];
|
|
2920
2945
|
}
|
|
2921
2946
|
export interface LayoutConfig {
|
|
2922
2947
|
}
|
|
@@ -3277,6 +3302,34 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
3277
3302
|
* ```
|
|
3278
3303
|
*/
|
|
3279
3304
|
showAlerts?: boolean;
|
|
3305
|
+
/**
|
|
3306
|
+
* Custom Actions allows users to define interactive UI actions (like buttons or menu
|
|
3307
|
+
* items) that appear in ThoughtSpot's visualizations, answers, and Liveboards. These
|
|
3308
|
+
* actions enable users to trigger custom workflows — such as navigating to an
|
|
3309
|
+
* external app, calling an API, or opening a modal — based on the data context of
|
|
3310
|
+
* what they clicked can be used to trigger custom logic when the action is clicked.
|
|
3311
|
+
*
|
|
3312
|
+
* Supported embed types: `AppEmbed`, `LiveboardEmbed`, `SageEmbed`, `SearchEmbed`, `SpotterEmbed`
|
|
3313
|
+
* @version SDK: 1.43.0 | ThoughtSpot: 10.14.0.cl
|
|
3314
|
+
* @example
|
|
3315
|
+
* ```js
|
|
3316
|
+
* import { CustomActionPosition, CustomActionTarget } from '@thoughtspot/visual-embed-sdk';
|
|
3317
|
+
* // Use supported embed types such as AppEmbed or LiveboardEmbed
|
|
3318
|
+
* const embed = new LiveboardEmbed('#tsEmbed', {
|
|
3319
|
+
* ... // other embed config options
|
|
3320
|
+
* customActions: [
|
|
3321
|
+
* {
|
|
3322
|
+
* name: 'customAction',
|
|
3323
|
+
* id: 'customAction',
|
|
3324
|
+
* target: CustomActionTarget.VISUALIZATION,
|
|
3325
|
+
* position: CustomActionPosition.PRIMARY,
|
|
3326
|
+
* }
|
|
3327
|
+
* }
|
|
3328
|
+
* ]
|
|
3329
|
+
* })
|
|
3330
|
+
* ```
|
|
3331
|
+
*/
|
|
3332
|
+
customActions?: CustomAction[];
|
|
3280
3333
|
}
|
|
3281
3334
|
/**
|
|
3282
3335
|
* The configuration object for Home page embeds configs.
|
|
@@ -3286,7 +3339,8 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
3286
3339
|
* Hide list page columns
|
|
3287
3340
|
* For example: hiddenListColumns = [ListPageColumns.Author]
|
|
3288
3341
|
*
|
|
3289
|
-
* **Note**: This option is available only in full app embedding
|
|
3342
|
+
* **Note**: This option is currently available only in full app embedding and requires importing the ListPageColumns enum.
|
|
3343
|
+
* 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
3344
|
*
|
|
3291
3345
|
* Supported embed types: `AppEmbed`
|
|
3292
3346
|
* @version SDK: 1.38.0 | ThoughtSpot: 10.9.0.cl
|
|
@@ -3602,7 +3656,8 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
3602
3656
|
*/
|
|
3603
3657
|
isLiveboardCompactHeaderEnabled?: boolean;
|
|
3604
3658
|
/**
|
|
3605
|
-
* This flag can be used to show or hide the Liveboard verified icon in the compact
|
|
3659
|
+
* This flag can be used to show or hide the Liveboard verified icon in the compact
|
|
3660
|
+
* header.
|
|
3606
3661
|
*
|
|
3607
3662
|
* Supported embed types: `AppEmbed`, `LiveboardEmbed`
|
|
3608
3663
|
* @version SDK: 1.35.0 | ThoughtSpot:10.4.0.cl
|
|
@@ -3620,6 +3675,8 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
3620
3675
|
/**
|
|
3621
3676
|
* This flag is used to enable/disable hide irrelevant filters in Liveboard tab
|
|
3622
3677
|
*
|
|
3678
|
+
* **Note**: This feature is supported only if compact header is enabled on your Liveboard. To enable compact header, use the `isLiveboardCompactHeaderEnabled` attribute.
|
|
3679
|
+
*
|
|
3623
3680
|
* Supported embed types: `AppEmbed`, `LiveboardEmbed`
|
|
3624
3681
|
* @version SDK: 1.36.0 | ThoughtSpot:10.6.0.cl
|
|
3625
3682
|
* @default false
|
|
@@ -3629,12 +3686,14 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
3629
3686
|
* const embed = new <EmbedComponent>('#tsEmbed', {
|
|
3630
3687
|
* ... // other embed view config
|
|
3631
3688
|
* hideIrrelevantChipsInLiveboardTabs: true,
|
|
3689
|
+
* isLiveboardCompactHeaderEnabled: true,
|
|
3632
3690
|
* })
|
|
3633
3691
|
* ```
|
|
3634
3692
|
*/
|
|
3635
3693
|
hideIrrelevantChipsInLiveboardTabs?: boolean;
|
|
3636
3694
|
/**
|
|
3637
|
-
* This flag can be used to show or hide the re-verify banner on the Liveboard
|
|
3695
|
+
* This flag can be used to show or hide the re-verify banner on the Liveboard
|
|
3696
|
+
* compact header
|
|
3638
3697
|
*
|
|
3639
3698
|
* Supported embed types: `AppEmbed`, `LiveboardEmbed`
|
|
3640
3699
|
* @version SDK: 1.35.0 | ThoughtSpot:10.4.0.cl
|
|
@@ -3681,6 +3740,21 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
3681
3740
|
* ```
|
|
3682
3741
|
*/
|
|
3683
3742
|
coverAndFilterOptionInPDF?: boolean;
|
|
3743
|
+
/**
|
|
3744
|
+
* This flag is used to enable or disable the XLSX/CSV download option for Liveboards.
|
|
3745
|
+
*
|
|
3746
|
+
* Supported embed types: `AppEmbed`, `LiveboardEmbed`
|
|
3747
|
+
* @version SDK: 1.41.0 | ThoughtSpot: 10.14.0.cl
|
|
3748
|
+
* @example
|
|
3749
|
+
* ```js
|
|
3750
|
+
* // Replace <EmbedComponent> with embed component name. For example, AppEmbed or LiveboardEmbed
|
|
3751
|
+
* const embed = new <EmbedComponent>('#tsEmbed', {
|
|
3752
|
+
* ... // other embed view config
|
|
3753
|
+
* liveboardXLSXCSVDownload: true,
|
|
3754
|
+
* })
|
|
3755
|
+
* ```
|
|
3756
|
+
*/
|
|
3757
|
+
liveboardXLSXCSVDownload?: boolean;
|
|
3684
3758
|
}
|
|
3685
3759
|
export interface AllEmbedViewConfig extends BaseViewConfig, SearchLiveboardCommonViewConfig, HomePageConfig, LiveboardAppEmbedViewConfig {
|
|
3686
3760
|
}
|
|
@@ -4568,6 +4642,11 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
4568
4642
|
* @hidden
|
|
4569
4643
|
*/
|
|
4570
4644
|
APP_INIT = "appInit",
|
|
4645
|
+
/**
|
|
4646
|
+
* Internal event to clear the cached info
|
|
4647
|
+
* @hidden
|
|
4648
|
+
*/
|
|
4649
|
+
CLEAR_INFO_CACHE = "clearInfoCache",
|
|
4571
4650
|
/**
|
|
4572
4651
|
* Emitted when a user clicks **Show Liveboard details** on a Liveboard
|
|
4573
4652
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
@@ -5035,7 +5114,18 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
5035
5114
|
* })
|
|
5036
5115
|
* ```
|
|
5037
5116
|
*/
|
|
5038
|
-
EmbedListenerReady = "EmbedListenerReady"
|
|
5117
|
+
EmbedListenerReady = "EmbedListenerReady",
|
|
5118
|
+
/**
|
|
5119
|
+
* Emitted when the organization is switched.
|
|
5120
|
+
* @example
|
|
5121
|
+
* ```js
|
|
5122
|
+
* appEmbed.on(EmbedEvent.OrgSwitched, (payload) => {
|
|
5123
|
+
* console.log('payload', payload);
|
|
5124
|
+
* })
|
|
5125
|
+
* ```
|
|
5126
|
+
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
5127
|
+
*/
|
|
5128
|
+
OrgSwitched = "orgSwitched"
|
|
5039
5129
|
}
|
|
5040
5130
|
/**
|
|
5041
5131
|
* Event types that can be triggered by the host application
|
|
@@ -6297,17 +6387,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
6297
6387
|
* ```
|
|
6298
6388
|
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
6299
6389
|
*/
|
|
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"
|
|
6390
|
+
AskSpotter = "AskSpotter"
|
|
6311
6391
|
}
|
|
6312
6392
|
/**
|
|
6313
6393
|
* The different visual modes that the data sources panel within
|
|
@@ -6403,6 +6483,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
6403
6483
|
Query = "query",
|
|
6404
6484
|
HideHomepageLeftNav = "hideHomepageLeftNav",
|
|
6405
6485
|
ModularHomeExperienceEnabled = "modularHomeExperience",
|
|
6486
|
+
HomepageVersion = "homepageVersion",
|
|
6406
6487
|
ListPageVersion = "listpageVersion",
|
|
6407
6488
|
PendoTrackingKey = "additionalPendoKey",
|
|
6408
6489
|
LiveboardHeaderSticky = "isLiveboardHeaderSticky",
|
|
@@ -6443,7 +6524,8 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
6443
6524
|
isSpotterAgentEmbed = "isSpotterAgentEmbed",
|
|
6444
6525
|
IsLiveboardStylingAndGroupingEnabled = "isLiveboardStylingAndGroupingEnabled",
|
|
6445
6526
|
IsLazyLoadingForEmbedEnabled = "isLazyLoadingForEmbedEnabled",
|
|
6446
|
-
RootMarginForLazyLoad = "rootMarginForLazyLoad"
|
|
6527
|
+
RootMarginForLazyLoad = "rootMarginForLazyLoad",
|
|
6528
|
+
LiveboardXLSXCSVDownload = "isLiveboardXLSXCSVDownloadEnabled"
|
|
6447
6529
|
}
|
|
6448
6530
|
/**
|
|
6449
6531
|
* ThoughtSpot application pages include actions and menu commands
|
|
@@ -7015,7 +7097,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
7015
7097
|
* The Favorites icon (*) for Answers,
|
|
7016
7098
|
* Liveboard, and data objects like Worksheet, Model,
|
|
7017
7099
|
* Tables and Views.
|
|
7018
|
-
* Allows adding an object to the user
|
|
7100
|
+
* Allows adding an object to the user's favorites list.
|
|
7019
7101
|
* @example
|
|
7020
7102
|
* ```js
|
|
7021
7103
|
* disabledActions: [Action.AddToFavorites]
|
|
@@ -7784,6 +7866,41 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
7784
7866
|
session: SessionInterface;
|
|
7785
7867
|
vizId?: string;
|
|
7786
7868
|
}
|
|
7869
|
+
export interface CustomAction {
|
|
7870
|
+
name: string;
|
|
7871
|
+
id: string;
|
|
7872
|
+
position: CustomActionsPosition;
|
|
7873
|
+
target: CustomActionTarget;
|
|
7874
|
+
metadataIds?: {
|
|
7875
|
+
answerIds?: string[];
|
|
7876
|
+
liveboardIds?: string[];
|
|
7877
|
+
vizIds?: string[];
|
|
7878
|
+
};
|
|
7879
|
+
dataModelIds?: {
|
|
7880
|
+
modelIds?: string[];
|
|
7881
|
+
modelColumnNames?: string[];
|
|
7882
|
+
};
|
|
7883
|
+
orgIds?: string[];
|
|
7884
|
+
groupIds?: string[];
|
|
7885
|
+
}
|
|
7886
|
+
/**
|
|
7887
|
+
* Enum options to show custom actions at different
|
|
7888
|
+
* positions in the application.
|
|
7889
|
+
*/
|
|
7890
|
+
export enum CustomActionsPosition {
|
|
7891
|
+
PRIMARY = "PRIMARY",
|
|
7892
|
+
MENU = "MENU",
|
|
7893
|
+
CONTEXTMENU = "CONTEXTMENU"
|
|
7894
|
+
}
|
|
7895
|
+
/**
|
|
7896
|
+
* Enum options to mention the target of the custom action.
|
|
7897
|
+
*/
|
|
7898
|
+
export enum CustomActionTarget {
|
|
7899
|
+
LIVEBOARD = "LIVEBOARD",
|
|
7900
|
+
VIZ = "VIZ",
|
|
7901
|
+
ANSWER = "ANSWER",
|
|
7902
|
+
SPOTTER = "SPOTTER"
|
|
7903
|
+
}
|
|
7787
7904
|
/**
|
|
7788
7905
|
* Enum options to show or suppress Visual Embed SDK and
|
|
7789
7906
|
* ThoughtSpot application logs in the console output.
|
|
@@ -7878,6 +7995,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
7878
7995
|
hiddenHomeLeftNavItems: string[];
|
|
7879
7996
|
customVariablesForThirdPartyTools: Record<string, any>;
|
|
7880
7997
|
hiddenListColumns: ListPageColumns[];
|
|
7998
|
+
customActions: CustomAction[];
|
|
7881
7999
|
}
|
|
7882
8000
|
}
|
|
7883
8001
|
|
|
@@ -8736,7 +8854,6 @@ declare module '@thoughtspot/visual-embed-sdk/embed/sage' {
|
|
|
8736
8854
|
*/
|
|
8737
8855
|
protected viewConfig: SageViewConfig;
|
|
8738
8856
|
constructor(domSelector: DOMSelector, viewConfig: SageViewConfig);
|
|
8739
|
-
protected getEmbedParamsObject(): Record<any, any>;
|
|
8740
8857
|
/**
|
|
8741
8858
|
* Constructs a map of parameters to be passed on to the
|
|
8742
8859
|
* embedded Eureka or Sage search page.
|
|
@@ -9306,7 +9423,6 @@ declare module '@thoughtspot/visual-embed-sdk/embed/ts-embed' {
|
|
|
9306
9423
|
* @param query
|
|
9307
9424
|
*/
|
|
9308
9425
|
protected getEmbedBasePath(query: string): string;
|
|
9309
|
-
protected getUpdateEmbedParamsObject(): Record<any, any>;
|
|
9310
9426
|
/**
|
|
9311
9427
|
* Common query params set for all the embed modes.
|
|
9312
9428
|
* @param queryParams
|
|
@@ -9322,7 +9438,6 @@ declare module '@thoughtspot/visual-embed-sdk/embed/ts-embed' {
|
|
|
9322
9438
|
*/
|
|
9323
9439
|
protected getV1EmbedBasePath(queryString: string): string;
|
|
9324
9440
|
protected getEmbedParams(): string;
|
|
9325
|
-
protected getEmbedParamsObject(): Record<any, any>;
|
|
9326
9441
|
protected getRootIframeSrc(): string;
|
|
9327
9442
|
protected createIframeEl(frameSrc: string): HTMLIFrameElement;
|
|
9328
9443
|
protected handleInsertionIntoDOM(child: string | Node): void;
|
|
@@ -9415,10 +9530,10 @@ declare module '@thoughtspot/visual-embed-sdk/embed/ts-embed' {
|
|
|
9415
9530
|
*/
|
|
9416
9531
|
off(messageType: EmbedEvent, callback: MessageCallback): typeof TsEmbed.prototype;
|
|
9417
9532
|
/**
|
|
9418
|
-
|
|
9419
|
-
|
|
9420
|
-
|
|
9421
|
-
|
|
9533
|
+
* @hidden
|
|
9534
|
+
* Internal state to track if the embed container is loaded.
|
|
9535
|
+
* This is used to trigger events after the embed container is loaded.
|
|
9536
|
+
*/
|
|
9422
9537
|
isEmbedContainerLoaded: boolean;
|
|
9423
9538
|
protected getPreRenderObj<T extends TsEmbed>(): T;
|
|
9424
9539
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thoughtspot/visual-embed-sdk",
|
|
3
|
-
"version": "1.41.0
|
|
3
|
+
"version": "1.41.0",
|
|
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/embed/app.spec.ts
CHANGED
|
@@ -344,6 +344,34 @@ describe('App embed tests', () => {
|
|
|
344
344
|
});
|
|
345
345
|
});
|
|
346
346
|
|
|
347
|
+
test('should set liveboardXLSXCSVDownload to true in url', async () => {
|
|
348
|
+
const appEmbed = new AppEmbed(getRootEl(), {
|
|
349
|
+
...defaultViewConfig,
|
|
350
|
+
liveboardXLSXCSVDownload: true,
|
|
351
|
+
} as AppViewConfig);
|
|
352
|
+
appEmbed.render();
|
|
353
|
+
await executeAfterWait(() => {
|
|
354
|
+
expectUrlMatchesWithParams(
|
|
355
|
+
getIFrameSrc(),
|
|
356
|
+
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isLiveboardXLSXCSVDownloadEnabled=true${defaultParamsPost}#/home`,
|
|
357
|
+
);
|
|
358
|
+
});
|
|
359
|
+
});
|
|
360
|
+
|
|
361
|
+
test('should set liveboardXLSXCSVDownload to false in url', async () => {
|
|
362
|
+
const appEmbed = new AppEmbed(getRootEl(), {
|
|
363
|
+
...defaultViewConfig,
|
|
364
|
+
liveboardXLSXCSVDownload: false,
|
|
365
|
+
} as AppViewConfig);
|
|
366
|
+
appEmbed.render();
|
|
367
|
+
await executeAfterWait(() => {
|
|
368
|
+
expectUrlMatchesWithParams(
|
|
369
|
+
getIFrameSrc(),
|
|
370
|
+
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isLiveboardXLSXCSVDownloadEnabled=false${defaultParamsPost}#/home`,
|
|
371
|
+
);
|
|
372
|
+
});
|
|
373
|
+
});
|
|
374
|
+
|
|
347
375
|
test('Should add the tag to the iframe src', async () => {
|
|
348
376
|
const appEmbed = new AppEmbed(getRootEl(), {
|
|
349
377
|
...defaultViewConfig,
|
|
@@ -611,6 +639,43 @@ describe('App embed tests', () => {
|
|
|
611
639
|
});
|
|
612
640
|
});
|
|
613
641
|
|
|
642
|
+
test('Should add homepageVersion=v3 & navigationVersion=v3 & modularHomeExperience=true when Sliding and ModularWithStylingChanges configured in the iframe src', async () => {
|
|
643
|
+
const appEmbed = new AppEmbed(getRootEl(), {
|
|
644
|
+
...defaultViewConfig,
|
|
645
|
+
discoveryExperience: {
|
|
646
|
+
primaryNavbarVersion: PrimaryNavbarVersion.Sliding,
|
|
647
|
+
homePage: HomePage.ModularWithStylingChanges,
|
|
648
|
+
},
|
|
649
|
+
} as AppViewConfig);
|
|
650
|
+
|
|
651
|
+
appEmbed.render();
|
|
652
|
+
await executeAfterWait(() => {
|
|
653
|
+
expectUrlMatchesWithParams(
|
|
654
|
+
getIFrameSrc(),
|
|
655
|
+
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=true&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`,
|
|
656
|
+
);
|
|
657
|
+
});
|
|
658
|
+
});
|
|
659
|
+
|
|
660
|
+
test('Should add homepageVersion=v3 & navigationVersion=v3 & modularHomeExperience=true when homePage is ModularWithStylingChanges to the iframe src', async () => {
|
|
661
|
+
const appEmbed = new AppEmbed(getRootEl(), {
|
|
662
|
+
...defaultViewConfig,
|
|
663
|
+
// primaryNavbarVersion is not included under discoveryExperience,
|
|
664
|
+
// then it set navigationVersion=v2 and modularHomeExperience=false.
|
|
665
|
+
discoveryExperience: {
|
|
666
|
+
homePage: HomePage.ModularWithStylingChanges,
|
|
667
|
+
},
|
|
668
|
+
} as AppViewConfig);
|
|
669
|
+
|
|
670
|
+
appEmbed.render();
|
|
671
|
+
await executeAfterWait(() => {
|
|
672
|
+
expectUrlMatchesWithParams(
|
|
673
|
+
getIFrameSrc(),
|
|
674
|
+
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=false&navigationVersion=v2&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`,
|
|
675
|
+
);
|
|
676
|
+
});
|
|
677
|
+
});
|
|
678
|
+
|
|
614
679
|
test('Should add navigationVersion=v2 when primaryNavbarVersion is not added to the iframe src', async () => {
|
|
615
680
|
const appEmbed = new AppEmbed(getRootEl(), {
|
|
616
681
|
...defaultViewConfig,
|
|
@@ -657,11 +722,27 @@ describe('App embed tests', () => {
|
|
|
657
722
|
});
|
|
658
723
|
});
|
|
659
724
|
|
|
660
|
-
|
|
725
|
+
|
|
726
|
+
test('Should add listpageVersion=v2 by default when no discoveryExperience is provided', async () => {
|
|
727
|
+
const appEmbed = new AppEmbed(getRootEl(), {
|
|
728
|
+
...defaultViewConfig,
|
|
729
|
+
} as AppViewConfig);
|
|
730
|
+
|
|
731
|
+
appEmbed.render();
|
|
732
|
+
await executeAfterWait(() => {
|
|
733
|
+
expectUrlMatchesWithParams(
|
|
734
|
+
getIFrameSrc(),
|
|
735
|
+
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=false&navigationVersion=v2&listpageVersion=v2${defaultParams}${defaultParamsPost}#/home`,
|
|
736
|
+
);
|
|
737
|
+
});
|
|
738
|
+
});
|
|
739
|
+
|
|
740
|
+
test('Should add listpageVersion=v2 by default when discoveryExperience is provided but listPageVersion is not specified', async () => {
|
|
661
741
|
const appEmbed = new AppEmbed(getRootEl(), {
|
|
662
742
|
...defaultViewConfig,
|
|
663
743
|
discoveryExperience: {
|
|
664
|
-
|
|
744
|
+
primaryNavbarVersion: PrimaryNavbarVersion.Sliding,
|
|
745
|
+
homePage: HomePage.Modular,
|
|
665
746
|
},
|
|
666
747
|
} as AppViewConfig);
|
|
667
748
|
|
|
@@ -669,11 +750,12 @@ describe('App embed tests', () => {
|
|
|
669
750
|
await executeAfterWait(() => {
|
|
670
751
|
expectUrlMatchesWithParams(
|
|
671
752
|
getIFrameSrc(),
|
|
672
|
-
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=
|
|
753
|
+
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=true&navigationVersion=v3&listpageVersion=v2${defaultParams}${defaultParamsPost}#/home`,
|
|
673
754
|
);
|
|
674
755
|
});
|
|
675
756
|
});
|
|
676
757
|
|
|
758
|
+
|
|
677
759
|
test('Should add listpageVersion=v3 combined with other discoveryExperience options to the iframe src', async () => {
|
|
678
760
|
const appEmbed = new AppEmbed(getRootEl(), {
|
|
679
761
|
...defaultViewConfig,
|
package/src/embed/app.ts
CHANGED
|
@@ -107,6 +107,11 @@ export enum HomePage {
|
|
|
107
107
|
* It serves as the foundational version of the home page.
|
|
108
108
|
*/
|
|
109
109
|
Modular = 'v2',
|
|
110
|
+
/**
|
|
111
|
+
* ModularWithStylingChanges (v3) introduces Modular Home Experience
|
|
112
|
+
* with styling changes.
|
|
113
|
+
*/
|
|
114
|
+
ModularWithStylingChanges = 'v3',
|
|
110
115
|
}
|
|
111
116
|
|
|
112
117
|
/**
|
|
@@ -638,6 +643,7 @@ export class AppEmbed extends V1Embed {
|
|
|
638
643
|
enablePendoHelp = true,
|
|
639
644
|
discoveryExperience,
|
|
640
645
|
coverAndFilterOptionInPDF = false,
|
|
646
|
+
liveboardXLSXCSVDownload = false,
|
|
641
647
|
isLiveboardStylingAndGroupingEnabled,
|
|
642
648
|
} = this.viewConfig;
|
|
643
649
|
|
|
@@ -657,6 +663,7 @@ export class AppEmbed extends V1Embed {
|
|
|
657
663
|
params[Param.HideIrrelevantFiltersInTab] = hideIrrelevantChipsInLiveboardTabs;
|
|
658
664
|
params[Param.IsUnifiedSearchExperienceEnabled] = isUnifiedSearchExperienceEnabled;
|
|
659
665
|
params[Param.CoverAndFilterOptionInPDF] = !!coverAndFilterOptionInPDF;
|
|
666
|
+
params[Param.LiveboardXLSXCSVDownload] = !!liveboardXLSXCSVDownload;
|
|
660
667
|
|
|
661
668
|
params = this.getBaseQueryParams(params);
|
|
662
669
|
|
|
@@ -746,6 +753,12 @@ export class AppEmbed extends V1Embed {
|
|
|
746
753
|
// To use v3 navigation, we must manually set the discoveryExperience
|
|
747
754
|
// settings.
|
|
748
755
|
params[Param.NavigationVersion] = 'v2';
|
|
756
|
+
// Set homePageVersion to v2 by default to reset the LD flag value
|
|
757
|
+
// for the homepageVersion.
|
|
758
|
+
params[Param.HomepageVersion] = 'v2';
|
|
759
|
+
// Set listpageVersion to v2 by default to reset the LD flag value
|
|
760
|
+
// for the listpageVersion.
|
|
761
|
+
params[Param.ListPageVersion] = ListPage.List;
|
|
749
762
|
if (discoveryExperience) {
|
|
750
763
|
// primaryNavbarVersion v3 will enabled the new left navigation
|
|
751
764
|
if (discoveryExperience.primaryNavbarVersion === PrimaryNavbarVersion.Sliding) {
|
|
@@ -759,6 +772,14 @@ export class AppEmbed extends V1Embed {
|
|
|
759
772
|
if (discoveryExperience.homePage === HomePage.Modular) {
|
|
760
773
|
params[Param.ModularHomeExperienceEnabled] = true;
|
|
761
774
|
}
|
|
775
|
+
|
|
776
|
+
// ModularWithStylingChanges (v3) introduces the styling changes
|
|
777
|
+
// to the Modular Homepage.
|
|
778
|
+
// v3 will be the base version of homePageVersion.
|
|
779
|
+
if (discoveryExperience.homePage === HomePage.ModularWithStylingChanges) {
|
|
780
|
+
params[Param.HomepageVersion] = HomePage.ModularWithStylingChanges;
|
|
781
|
+
}
|
|
782
|
+
|
|
762
783
|
// listPageVersion v3 will enable the new list page
|
|
763
784
|
if (discoveryExperience.listPageVersion === ListPage.ListWithUXChanges) {
|
|
764
785
|
params[Param.ListPageVersion] = discoveryExperience.listPageVersion;
|
|
@@ -39,13 +39,6 @@ export class ConversationMessage extends TsEmbed {
|
|
|
39
39
|
super(container, viewConfig);
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
protected getEmbedParamsObject() {
|
|
43
|
-
const queryParams = this.getBaseQueryParams();
|
|
44
|
-
queryParams[Param.HideActions] = [...(queryParams[Param.HideActions] ?? [])];
|
|
45
|
-
queryParams[Param.isSpotterAgentEmbed] = true;
|
|
46
|
-
return queryParams;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
42
|
public getIframeSrc() {
|
|
50
43
|
const {
|
|
51
44
|
sessionId,
|
|
@@ -56,8 +49,10 @@ export class ConversationMessage extends TsEmbed {
|
|
|
56
49
|
messageId,
|
|
57
50
|
} = this.viewConfig;
|
|
58
51
|
const path = 'conv-assist-answer';
|
|
59
|
-
const queryParams = this.
|
|
52
|
+
const queryParams = this.getBaseQueryParams();
|
|
60
53
|
|
|
54
|
+
queryParams[Param.HideActions] = [...(queryParams[Param.HideActions] ?? [])];
|
|
55
|
+
queryParams[Param.isSpotterAgentEmbed] = true;
|
|
61
56
|
let query = '';
|
|
62
57
|
const queryParamsString = getQueryParamString(queryParams, true);
|
|
63
58
|
if (queryParamsString) {
|
|
@@ -196,7 +196,7 @@ export class SpotterEmbed extends TsEmbed {
|
|
|
196
196
|
super(container, viewConfig);
|
|
197
197
|
}
|
|
198
198
|
|
|
199
|
-
|
|
199
|
+
public getIframeSrc(): string {
|
|
200
200
|
const {
|
|
201
201
|
worksheetId,
|
|
202
202
|
searchOptions,
|
|
@@ -210,7 +210,7 @@ export class SpotterEmbed extends TsEmbed {
|
|
|
210
210
|
runtimeParameters,
|
|
211
211
|
excludeRuntimeParametersfromURL,
|
|
212
212
|
} = this.viewConfig;
|
|
213
|
-
|
|
213
|
+
const path = 'insights/conv-assist';
|
|
214
214
|
if (!worksheetId) {
|
|
215
215
|
this.handleError(ERROR_MESSAGE.SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND);
|
|
216
216
|
}
|
|
@@ -235,21 +235,6 @@ export class SpotterEmbed extends TsEmbed {
|
|
|
235
235
|
queryParams[Param.HideSampleQuestions] = !!hideSampleQuestions;
|
|
236
236
|
}
|
|
237
237
|
|
|
238
|
-
return queryParams;
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
public getIframeSrc(): string {
|
|
242
|
-
const {
|
|
243
|
-
worksheetId,
|
|
244
|
-
searchOptions,
|
|
245
|
-
runtimeFilters,
|
|
246
|
-
excludeRuntimeFiltersfromURL,
|
|
247
|
-
runtimeParameters,
|
|
248
|
-
excludeRuntimeParametersfromURL,
|
|
249
|
-
} = this.viewConfig;
|
|
250
|
-
const path = 'insights/conv-assist';
|
|
251
|
-
const queryParams = this.getEmbedParamsObject();
|
|
252
|
-
|
|
253
238
|
let query = '';
|
|
254
239
|
const queryParamsString = getQueryParamString(queryParams, true);
|
|
255
240
|
if (queryParamsString) {
|