@thoughtspot/visual-embed-sdk 1.39.1 → 1.39.2-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/package.json +1 -1
- package/cjs/src/config.spec.js +9 -0
- package/cjs/src/config.spec.js.map +1 -1
- package/cjs/src/embed/app.d.ts +75 -15
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +69 -9
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/app.spec.js +374 -12
- package/cjs/src/embed/app.spec.js.map +1 -1
- package/cjs/src/embed/bodyless-conversation.d.ts +19 -7
- package/cjs/src/embed/bodyless-conversation.d.ts.map +1 -1
- package/cjs/src/embed/bodyless-conversation.js +24 -4
- package/cjs/src/embed/bodyless-conversation.js.map +1 -1
- package/cjs/src/embed/bodyless-conversation.spec.js +8 -190
- package/cjs/src/embed/bodyless-conversation.spec.js.map +1 -1
- package/cjs/src/embed/conversation.spec.js +28 -0
- package/cjs/src/embed/conversation.spec.js.map +1 -1
- package/cjs/src/embed/embedConfig.d.ts +9 -7
- package/cjs/src/embed/embedConfig.d.ts.map +1 -1
- package/cjs/src/embed/embedConfig.js +9 -7
- package/cjs/src/embed/embedConfig.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts +56 -17
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +48 -4
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/liveboard.spec.js +215 -11
- package/cjs/src/embed/liveboard.spec.js.map +1 -1
- package/cjs/src/embed/ts-embed.d.ts +5 -0
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +16 -1
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/embed/ts-embed.spec.js +164 -0
- package/cjs/src/embed/ts-embed.spec.js.map +1 -1
- package/cjs/src/errors.d.ts +1 -0
- package/cjs/src/errors.d.ts.map +1 -1
- package/cjs/src/errors.js +1 -0
- package/cjs/src/errors.js.map +1 -1
- package/cjs/src/index.d.ts +2 -2
- package/cjs/src/index.d.ts.map +1 -1
- package/cjs/src/index.js +2 -1
- package/cjs/src/index.js.map +1 -1
- package/cjs/src/react/all-types-export.d.ts +1 -1
- package/cjs/src/react/all-types-export.d.ts.map +1 -1
- package/cjs/src/react/all-types-export.js +3 -2
- package/cjs/src/react/all-types-export.js.map +1 -1
- package/cjs/src/react/index.d.ts +71 -20
- package/cjs/src/react/index.d.ts.map +1 -1
- package/cjs/src/react/index.js +79 -42
- package/cjs/src/react/index.js.map +1 -1
- package/cjs/src/react/index.spec.js +436 -100
- package/cjs/src/react/index.spec.js.map +1 -1
- package/cjs/src/types.d.ts +80 -6
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +45 -1
- package/cjs/src/types.js.map +1 -1
- package/cjs/src/utils/graphql/nlsService/conversation-service.d.ts.map +1 -1
- package/cjs/src/utils/graphql/nlsService/conversation-service.js +2 -0
- package/cjs/src/utils/graphql/nlsService/conversation-service.js.map +1 -1
- package/cjs/src/utils/processTrigger.js +2 -1
- package/cjs/src/utils/processTrigger.js.map +1 -1
- package/cjs/src/utils.d.ts +6 -0
- package/cjs/src/utils.d.ts.map +1 -1
- package/cjs/src/utils.js +23 -3
- package/cjs/src/utils.js.map +1 -1
- package/cjs/src/utils.spec.js +237 -1
- package/cjs/src/utils.spec.js.map +1 -1
- package/dist/{index-JaFaxrvQ.js → index-CmEQfuE3.js} +1 -1
- package/dist/index-DeFzsyFF.js +7371 -0
- package/dist/index-Dpf0rd6w.js +7371 -0
- package/dist/index-UuEbsISo.js +7447 -0
- package/dist/index-e3Uw3YFO.js +7371 -0
- package/dist/src/embed/app.d.ts +75 -15
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/bodyless-conversation.d.ts +19 -7
- package/dist/src/embed/bodyless-conversation.d.ts.map +1 -1
- package/dist/src/embed/embedConfig.d.ts +9 -7
- package/dist/src/embed/embedConfig.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts +56 -17
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.d.ts +5 -0
- package/dist/src/embed/ts-embed.d.ts.map +1 -1
- package/dist/src/errors.d.ts +1 -0
- package/dist/src/errors.d.ts.map +1 -1
- package/dist/src/index.d.ts +2 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/react/all-types-export.d.ts +1 -1
- package/dist/src/react/all-types-export.d.ts.map +1 -1
- package/dist/src/react/index.d.ts +71 -20
- package/dist/src/react/index.d.ts.map +1 -1
- package/dist/src/types.d.ts +80 -6
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/graphql/nlsService/conversation-service.d.ts.map +1 -1
- package/dist/src/utils.d.ts +6 -0
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +320 -78
- package/dist/tsembed-react.js +320 -76
- package/dist/tsembed.es.js +238 -31
- package/dist/tsembed.js +236 -29
- package/dist/visual-embed-sdk-react-full.d.ts +288 -72
- package/dist/visual-embed-sdk-react.d.ts +288 -72
- package/dist/visual-embed-sdk.d.ts +218 -53
- package/lib/package.json +1 -1
- package/lib/src/config.spec.js +9 -0
- package/lib/src/config.spec.js.map +1 -1
- package/lib/src/embed/app.d.ts +75 -15
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +69 -9
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/app.spec.js +376 -14
- package/lib/src/embed/app.spec.js.map +1 -1
- package/lib/src/embed/bodyless-conversation.d.ts +19 -7
- package/lib/src/embed/bodyless-conversation.d.ts.map +1 -1
- package/lib/src/embed/bodyless-conversation.js +23 -4
- package/lib/src/embed/bodyless-conversation.js.map +1 -1
- package/lib/src/embed/bodyless-conversation.spec.js +9 -191
- package/lib/src/embed/bodyless-conversation.spec.js.map +1 -1
- package/lib/src/embed/conversation.spec.js +30 -2
- package/lib/src/embed/conversation.spec.js.map +1 -1
- package/lib/src/embed/embedConfig.d.ts +9 -7
- package/lib/src/embed/embedConfig.d.ts.map +1 -1
- package/lib/src/embed/embedConfig.js +9 -7
- package/lib/src/embed/embedConfig.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts +56 -17
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +49 -5
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +215 -11
- package/lib/src/embed/liveboard.spec.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts +5 -0
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +16 -1
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/embed/ts-embed.spec.js +164 -0
- package/lib/src/embed/ts-embed.spec.js.map +1 -1
- package/lib/src/errors.d.ts +1 -0
- package/lib/src/errors.d.ts.map +1 -1
- package/lib/src/errors.js +1 -0
- package/lib/src/errors.js.map +1 -1
- package/lib/src/index.d.ts +2 -2
- package/lib/src/index.d.ts.map +1 -1
- package/lib/src/index.js +2 -2
- package/lib/src/index.js.map +1 -1
- package/lib/src/react/all-types-export.d.ts +1 -1
- package/lib/src/react/all-types-export.d.ts.map +1 -1
- package/lib/src/react/all-types-export.js +1 -1
- package/lib/src/react/all-types-export.js.map +1 -1
- package/lib/src/react/index.d.ts +71 -20
- package/lib/src/react/index.d.ts.map +1 -1
- package/lib/src/react/index.js +79 -43
- package/lib/src/react/index.js.map +1 -1
- package/lib/src/react/index.spec.js +439 -103
- package/lib/src/react/index.spec.js.map +1 -1
- package/lib/src/types.d.ts +80 -6
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +45 -1
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils/graphql/nlsService/conversation-service.d.ts.map +1 -1
- package/lib/src/utils/graphql/nlsService/conversation-service.js +2 -0
- package/lib/src/utils/graphql/nlsService/conversation-service.js.map +1 -1
- package/lib/src/utils/processTrigger.js +2 -1
- package/lib/src/utils/processTrigger.js.map +1 -1
- package/lib/src/utils.d.ts +6 -0
- package/lib/src/utils.d.ts.map +1 -1
- package/lib/src/utils.js +21 -2
- package/lib/src/utils.js.map +1 -1
- package/lib/src/utils.spec.js +238 -2
- package/lib/src/utils.spec.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +219 -54
- package/package.json +1 -1
- package/src/config.spec.ts +11 -0
- package/src/embed/app.spec.ts +479 -26
- package/src/embed/app.ts +133 -27
- package/src/embed/bodyless-conversation.spec.ts +9 -203
- package/src/embed/bodyless-conversation.ts +24 -10
- package/src/embed/conversation.spec.ts +40 -2
- package/src/embed/embedConfig.ts +10 -8
- package/src/embed/liveboard.spec.ts +256 -5
- package/src/embed/liveboard.ts +99 -27
- package/src/embed/ts-embed.spec.ts +225 -0
- package/src/embed/ts-embed.ts +19 -0
- package/src/errors.ts +1 -0
- package/src/index.ts +2 -0
- package/src/react/all-types-export.ts +2 -1
- package/src/react/index.spec.tsx +556 -157
- package/src/react/index.tsx +117 -51
- package/src/types.ts +117 -43
- package/src/utils/graphql/nlsService/conversation-service.ts +2 -0
- package/src/utils/processTrigger.ts +1 -1
- package/src/utils.spec.ts +279 -2
- package/src/utils.ts +28 -2
|
@@ -233,33 +233,42 @@ export const SpotterEmbed: React.ForwardRefExoticComponent<SpotterEmbedProps & R
|
|
|
233
233
|
* ```
|
|
234
234
|
*/
|
|
235
235
|
export const ConversationEmbed: React.ForwardRefExoticComponent<ConversationEmbedProps & React.RefAttributes<_ConversationEmbed>>;
|
|
236
|
-
|
|
236
|
+
/**
|
|
237
|
+
* React component for individual conversation messages from SpotterAgent.
|
|
238
|
+
* This component is used internally by the useSpotterAgent hook.
|
|
239
|
+
* @version SDK: 1.37.0 | ThoughtSpot: 10.9.0.cl
|
|
240
|
+
*/
|
|
241
|
+
interface ConversationMessageProps extends EmbedProps, SpotterAgentMessageViewConfig {
|
|
237
242
|
}
|
|
243
|
+
export const ConversationMessage: React.ForwardRefExoticComponent<ConversationMessageProps & React.RefAttributes<_ConversationMessage>>;
|
|
238
244
|
/**
|
|
239
|
-
* React component for
|
|
240
|
-
*
|
|
245
|
+
* React component for displaying individual conversation messages from SpotterAgent.
|
|
246
|
+
*
|
|
247
|
+
* This component renders a single message response from your ThoughtSpot conversation,
|
|
248
|
+
* showing charts, visualizations, or text responses based on the user's query.
|
|
249
|
+
*
|
|
241
250
|
* @example
|
|
242
251
|
* ```tsx
|
|
243
|
-
*
|
|
244
|
-
*
|
|
252
|
+
* const { sendMessage } = useSpotterAgent({ worksheetId: 'worksheetId' });
|
|
253
|
+
* const result = await sendMessage('show me sales by region');
|
|
245
254
|
*
|
|
246
|
-
*
|
|
247
|
-
*
|
|
248
|
-
*
|
|
249
|
-
* document.body.appendChild(container);
|
|
250
|
-
* }
|
|
251
|
-
* };
|
|
255
|
+
* if (!result.error) {
|
|
256
|
+
* // Simple usage - just pass the message data
|
|
257
|
+
* <SpotterMessage message={result.message} />
|
|
252
258
|
*
|
|
253
|
-
*
|
|
254
|
-
*
|
|
255
|
-
*
|
|
256
|
-
*
|
|
257
|
-
*
|
|
258
|
-
* );
|
|
259
|
+
* // With optional query for context
|
|
260
|
+
* <SpotterMessage
|
|
261
|
+
* message={result.message}
|
|
262
|
+
* query={result.query}
|
|
263
|
+
* />
|
|
259
264
|
* }
|
|
260
265
|
* ```
|
|
266
|
+
* @version SDK: 1.39.0 | ThoughtSpot: 10.11.0.cl
|
|
261
267
|
*/
|
|
262
|
-
export const
|
|
268
|
+
export const SpotterMessage: React.ForwardRefExoticComponent<{
|
|
269
|
+
message: SpotterAgentMessageViewConfig;
|
|
270
|
+
query?: string;
|
|
271
|
+
} & Omit<EmbedProps, keyof SpotterAgentMessageViewConfig> & React.RefAttributes<_ConversationMessage>>;
|
|
263
272
|
/**
|
|
264
273
|
* React component for PreRendered Conversation embed.
|
|
265
274
|
*
|
|
@@ -279,7 +288,7 @@ export const SpotterAgentEmbed: React.ForwardRefExoticComponent<SpotterAgentEmbe
|
|
|
279
288
|
* ```
|
|
280
289
|
*/
|
|
281
290
|
export const PreRenderedConversationEmbed: React.ForwardRefExoticComponent<SpotterEmbedProps & PreRenderProps & React.RefAttributes<_SpotterEmbed>>;
|
|
282
|
-
type EmbedComponent = typeof SearchEmbed | typeof AppEmbed | typeof LiveboardEmbed | typeof SearchBarEmbed | typeof SageEmbed | typeof
|
|
291
|
+
type EmbedComponent = typeof SearchEmbed | typeof AppEmbed | typeof LiveboardEmbed | typeof SearchBarEmbed | typeof SageEmbed | typeof ConversationMessage | typeof SpotterMessage | typeof SpotterEmbed | typeof ConversationEmbed;
|
|
283
292
|
/**
|
|
284
293
|
* Get a reference to the embed component to trigger events on the component.
|
|
285
294
|
* @example
|
|
@@ -311,6 +320,48 @@ export function useEmbedRef<T extends EmbedComponent>(): React.MutableRefObject<
|
|
|
311
320
|
* @version SDK: 1.36.2 | ThoughtSpot: *
|
|
312
321
|
*/
|
|
313
322
|
export function useInit(config: EmbedConfig): React.MutableRefObject<AuthEventEmitter>;
|
|
323
|
+
/**
|
|
324
|
+
* React hook for interacting with SpotterAgent AI conversations.
|
|
325
|
+
*
|
|
326
|
+
* This hook provides a sendMessage function that allows you to send natural language
|
|
327
|
+
* queries to your data and get back AI-generated responses with visualizations.
|
|
328
|
+
*
|
|
329
|
+
* @param config - Configuration object containing worksheetId and other options
|
|
330
|
+
* @returns Object with sendMessage function that returns conversation results
|
|
331
|
+
* @example
|
|
332
|
+
* ```tsx
|
|
333
|
+
* const { sendMessage } = useSpotterAgent({ worksheetId: 'worksheetId' });
|
|
334
|
+
*
|
|
335
|
+
* const handleQuery = async () => {
|
|
336
|
+
* const result = await sendMessage('show me sales by region');
|
|
337
|
+
*
|
|
338
|
+
* if (!result.error) {
|
|
339
|
+
* // Display the message response
|
|
340
|
+
* <SpotterMessage message={result.message} />
|
|
341
|
+
* } else {
|
|
342
|
+
* console.error('Error:', result.error);
|
|
343
|
+
* }
|
|
344
|
+
* };
|
|
345
|
+
* ```
|
|
346
|
+
* @version SDK: 1.39.0 | ThoughtSpot: 10.11.0.cl
|
|
347
|
+
*/
|
|
348
|
+
export function useSpotterAgent(config: SpotterAgentEmbedViewConfig): {
|
|
349
|
+
sendMessage: (query: string) => Promise<{
|
|
350
|
+
error: any;
|
|
351
|
+
query?: undefined;
|
|
352
|
+
message?: undefined;
|
|
353
|
+
} | {
|
|
354
|
+
query: string;
|
|
355
|
+
message: {
|
|
356
|
+
worksheetId: string;
|
|
357
|
+
sessionId: any;
|
|
358
|
+
genNo: any;
|
|
359
|
+
acSessionId: any;
|
|
360
|
+
acGenNo: any;
|
|
361
|
+
};
|
|
362
|
+
error?: undefined;
|
|
363
|
+
}>;
|
|
364
|
+
};
|
|
314
365
|
|
|
315
366
|
/**
|
|
316
367
|
* Copyright (c) 2023
|
|
@@ -320,7 +371,7 @@ export function useInit(config: EmbedConfig): React.MutableRefObject<AuthEventEm
|
|
|
320
371
|
* @summary ThoughtSpot Visual Embed SDK
|
|
321
372
|
* @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
|
|
322
373
|
*/
|
|
323
|
-
export { init, logout, prefetch, executeTML, exportTML, executeTMLInput, exportTMLInput, getEmbedConfig as getInitConfig, getSessionInfo, tokenizedFetch, getAnswerFromQuery, createLiveboardWithAnswers, SearchEmbed, SearchBarEmbed, PinboardEmbed, LiveboardEmbed, SageEmbed, AppEmbed, SpotterAgentEmbed, SpotterAgentEmbedViewConfig, BodylessConversationViewConfig, BodylessConversation, SpotterEmbed, SpotterEmbedViewConfig, ConversationViewConfig, ConversationEmbed, AuthFailureType, AuthStatus, AuthEvent, AuthEventEmitter, AnswerService, SessionInterface, UnderlyingDataPoint, Page, AuthType, RuntimeFilter, RuntimeFilterOp, EmbedEvent, HostEvent, DataSourceVisualMode, Action, ContextMenuTriggerOptions, EmbedConfig, SearchViewConfig, SearchBarViewConfig, LiveboardViewConfig, SageViewConfig, AppViewConfig, PrefetchFeatures, FrameParams, HomeLeftNavItem, HomepageModule, DOMSelector, MessageOptions, MessageCallback, MessagePayload, CustomisationsInterface, CustomStyles, customCssInterface, CustomCssVariables, RuntimeParameter, LogLevel, uploadMixpanelEvent, MIXPANEL_EVENT, HomePageSearchBarMode, PrimaryNavbarVersion, HomePage, VizPoint, CustomActionPayload, UIPassthroughEvent, ListPageColumns, DataPanelCustomColumnGroupsAccordionState, };
|
|
374
|
+
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, };
|
|
324
375
|
|
|
325
376
|
export declare let loggedInStatus: boolean;
|
|
326
377
|
export declare let samlAuthWindow: Window;
|
|
@@ -1204,6 +1255,21 @@ export declare enum HomePage {
|
|
|
1204
1255
|
*/
|
|
1205
1256
|
Modular = "v2"
|
|
1206
1257
|
}
|
|
1258
|
+
/**
|
|
1259
|
+
* Define the version of the list page
|
|
1260
|
+
* @version SDK: 1.40.0 | ThoughtSpot: 10.12.0.cl
|
|
1261
|
+
*/
|
|
1262
|
+
export declare enum ListPage {
|
|
1263
|
+
/**
|
|
1264
|
+
* List (v2) is the traditional List Experience.
|
|
1265
|
+
* It serves as the foundational version of the list page.
|
|
1266
|
+
*/
|
|
1267
|
+
List = "v2",
|
|
1268
|
+
/**
|
|
1269
|
+
* ListWithUXChanges (v3) introduces the new updated list page with UX changes.
|
|
1270
|
+
*/
|
|
1271
|
+
ListWithUXChanges = "v3"
|
|
1272
|
+
}
|
|
1207
1273
|
/**
|
|
1208
1274
|
* Define the discovery experience
|
|
1209
1275
|
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
@@ -1217,6 +1283,10 @@ export interface DiscoveryExperience {
|
|
|
1217
1283
|
* homePage determines the version of the home page.
|
|
1218
1284
|
*/
|
|
1219
1285
|
homePage?: HomePage;
|
|
1286
|
+
/**
|
|
1287
|
+
* listPageVersion determines the version of the list page.
|
|
1288
|
+
*/
|
|
1289
|
+
listPageVersion?: ListPage;
|
|
1220
1290
|
}
|
|
1221
1291
|
/**
|
|
1222
1292
|
* The view configuration for full app embedding.
|
|
@@ -1588,21 +1658,6 @@ export interface AppViewConfig extends AllEmbedViewConfig {
|
|
|
1588
1658
|
* ```
|
|
1589
1659
|
*/
|
|
1590
1660
|
isUnifiedSearchExperienceEnabled?: boolean;
|
|
1591
|
-
/**
|
|
1592
|
-
* Show alert messages and toast messages in the embedded
|
|
1593
|
-
* view in full app embed.
|
|
1594
|
-
*
|
|
1595
|
-
* Supported embed types: `AppEmbed`
|
|
1596
|
-
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1597
|
-
* @example
|
|
1598
|
-
* ```js
|
|
1599
|
-
* const embed = new AppEmbed('#tsEmbed', {
|
|
1600
|
-
* ... // other embed view config
|
|
1601
|
-
* showAlerts:true,
|
|
1602
|
-
* })
|
|
1603
|
-
* ```
|
|
1604
|
-
*/
|
|
1605
|
-
showAlerts?: boolean;
|
|
1606
1661
|
/**
|
|
1607
1662
|
* This flag is used to enable/disable the styling and grouping in a Liveboard
|
|
1608
1663
|
*
|
|
@@ -1619,6 +1674,46 @@ export interface AppViewConfig extends AllEmbedViewConfig {
|
|
|
1619
1674
|
* ```
|
|
1620
1675
|
*/
|
|
1621
1676
|
isLiveboardStylingAndGroupingEnabled?: boolean;
|
|
1677
|
+
/**
|
|
1678
|
+
* This flag is used to enable the full height lazy load data.
|
|
1679
|
+
*
|
|
1680
|
+
* @example
|
|
1681
|
+
* ```js
|
|
1682
|
+
* const embed = new AppEmbed('#embed-container', {
|
|
1683
|
+
* // ...other options
|
|
1684
|
+
* fullHeight: true,
|
|
1685
|
+
* lazyLoadingForFullHeight: true,
|
|
1686
|
+
* })
|
|
1687
|
+
* ```
|
|
1688
|
+
*
|
|
1689
|
+
* @type {boolean}
|
|
1690
|
+
* @default false
|
|
1691
|
+
* @version SDK: 1.39.0 | ThoughtSpot:10.10.0.cl
|
|
1692
|
+
*/
|
|
1693
|
+
lazyLoadingForFullHeight?: boolean;
|
|
1694
|
+
/**
|
|
1695
|
+
* The margin to be used for lazy loading.
|
|
1696
|
+
*
|
|
1697
|
+
* For example, if the margin is set to '10px',
|
|
1698
|
+
* the visualization will be loaded 10px before the its top edge is visible in the
|
|
1699
|
+
* viewport.
|
|
1700
|
+
*
|
|
1701
|
+
* The format is similar to CSS margin.
|
|
1702
|
+
*
|
|
1703
|
+
* @example
|
|
1704
|
+
* ```js
|
|
1705
|
+
* const embed = new AppEmbed('#embed-container', {
|
|
1706
|
+
* // ...other options
|
|
1707
|
+
* fullHeight: true,
|
|
1708
|
+
* lazyLoadingForFullHeight: true,
|
|
1709
|
+
* // Using 0px, the visualization will be only loaded when its visible in the viewport.
|
|
1710
|
+
* lazyLoadingMargin: '0px',
|
|
1711
|
+
* })
|
|
1712
|
+
* ```
|
|
1713
|
+
* @type {string}
|
|
1714
|
+
* @version SDK: 1.39.0 | ThoughtSpot:10.10.0.cl
|
|
1715
|
+
*/
|
|
1716
|
+
lazyLoadingMargin?: string;
|
|
1622
1717
|
}
|
|
1623
1718
|
/**
|
|
1624
1719
|
* Embeds full ThoughtSpot experience in a host application.
|
|
@@ -1655,6 +1750,11 @@ export declare class AppEmbed extends V1Embed {
|
|
|
1655
1750
|
* @version SDK: 1.12.0 | ThoughtSpot: 8.4.0.cl, 8.4.1-sw
|
|
1656
1751
|
*/
|
|
1657
1752
|
navigateToPage(path: string | number, noReload?: boolean): void;
|
|
1753
|
+
/**
|
|
1754
|
+
* Destroys the ThoughtSpot embed, and remove any nodes from the DOM.
|
|
1755
|
+
* @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
|
|
1756
|
+
*/
|
|
1757
|
+
destroy(): void;
|
|
1658
1758
|
/**
|
|
1659
1759
|
* Renders the embedded application pages in the ThoughtSpot app.
|
|
1660
1760
|
* @param renderOptions An object containing the page ID
|
|
@@ -1910,23 +2010,6 @@ export interface LiveboardViewConfig extends BaseViewConfig, LiveboardOtherViewC
|
|
|
1910
2010
|
* })
|
|
1911
2011
|
*/
|
|
1912
2012
|
dataSourceId?: string;
|
|
1913
|
-
/**
|
|
1914
|
-
* This flag is for show/hide checkboxes for include or exclude
|
|
1915
|
-
* cover page and filters in the Liveboard PDF.
|
|
1916
|
-
*
|
|
1917
|
-
* Supported embed types: `LiveboardEmbed`
|
|
1918
|
-
* @version SDK: 1.37.0 | ThoughtSpot:10.8.0.cl
|
|
1919
|
-
* @default true
|
|
1920
|
-
* Supported embed types: `LiveboardEmbed`
|
|
1921
|
-
* @example
|
|
1922
|
-
* ```js
|
|
1923
|
-
* const embed = new LiveboardEmbed('#tsEmbed', {
|
|
1924
|
-
* ... //other embed view config
|
|
1925
|
-
* coverAndFilterOptionInPDF: false,
|
|
1926
|
-
* })
|
|
1927
|
-
* ```
|
|
1928
|
-
*/
|
|
1929
|
-
coverAndFilterOptionInPDF?: boolean;
|
|
1930
2013
|
/**
|
|
1931
2014
|
* The list of tab IDs to hide from the embedded.
|
|
1932
2015
|
* This Tabs will be hidden from their respective LBs.
|
|
@@ -1982,6 +2065,46 @@ export interface LiveboardViewConfig extends BaseViewConfig, LiveboardOtherViewC
|
|
|
1982
2065
|
* ```
|
|
1983
2066
|
*/
|
|
1984
2067
|
isLiveboardStylingAndGroupingEnabled?: boolean;
|
|
2068
|
+
/**
|
|
2069
|
+
* This flag is used to enable the full height lazy load data.
|
|
2070
|
+
*
|
|
2071
|
+
* @example
|
|
2072
|
+
* ```js
|
|
2073
|
+
* const embed = new LiveboardEmbed('#embed-container', {
|
|
2074
|
+
* // ...other options
|
|
2075
|
+
* fullHeight: true,
|
|
2076
|
+
* lazyLoadingForFullHeight: true,
|
|
2077
|
+
* })
|
|
2078
|
+
* ```
|
|
2079
|
+
*
|
|
2080
|
+
* @type {boolean}
|
|
2081
|
+
* @default false
|
|
2082
|
+
* @version SDK: 1.39.0 | ThoughtSpot:10.10.0.cl
|
|
2083
|
+
*/
|
|
2084
|
+
lazyLoadingForFullHeight?: boolean;
|
|
2085
|
+
/**
|
|
2086
|
+
* The margin to be used for lazy loading.
|
|
2087
|
+
*
|
|
2088
|
+
* For example, if the margin is set to '10px',
|
|
2089
|
+
* the visualization will be loaded 10px before the its top edge is visible in the
|
|
2090
|
+
* viewport.
|
|
2091
|
+
*
|
|
2092
|
+
* The format is similar to CSS margin.
|
|
2093
|
+
*
|
|
2094
|
+
* @example
|
|
2095
|
+
* ```js
|
|
2096
|
+
* const embed = new LiveboardEmbed('#embed-container', {
|
|
2097
|
+
* // ...other options
|
|
2098
|
+
* fullHeight: true,
|
|
2099
|
+
* lazyLoadingForFullHeight: true,
|
|
2100
|
+
* // Using 0px, the visualization will be only loaded when its visible in the viewport.
|
|
2101
|
+
* lazyLoadingMargin: '0px',
|
|
2102
|
+
* })
|
|
2103
|
+
* ```
|
|
2104
|
+
* @type {string}
|
|
2105
|
+
* @version SDK: 1.39.0 | ThoughtSpot:10.10.0.cl
|
|
2106
|
+
*/
|
|
2107
|
+
lazyLoadingMargin?: string;
|
|
1985
2108
|
}
|
|
1986
2109
|
/**
|
|
1987
2110
|
* Embed a ThoughtSpot Liveboard or visualization. When rendered it already
|
|
@@ -2015,6 +2138,11 @@ export declare class LiveboardEmbed extends V1Embed {
|
|
|
2015
2138
|
* @returns A promise that resolves with the response from the embedded app
|
|
2016
2139
|
*/
|
|
2017
2140
|
trigger<HostEventT extends HostEvent, PayloadT>(messageType: HostEventT, data?: TriggerPayload<PayloadT, HostEventT>): Promise<TriggerResponse<PayloadT, HostEventT>>;
|
|
2141
|
+
/**
|
|
2142
|
+
* Destroys the ThoughtSpot embed, and remove any nodes from the DOM.
|
|
2143
|
+
* @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
|
|
2144
|
+
*/
|
|
2145
|
+
destroy(): void;
|
|
2018
2146
|
/**
|
|
2019
2147
|
* Render an embedded ThoughtSpot Liveboard or visualization
|
|
2020
2148
|
* @param renderOptions An object specifying the Liveboard ID,
|
|
@@ -2044,10 +2172,6 @@ export interface SpotterAgentEmbedViewConfig extends Omit<BaseViewConfig, 'prima
|
|
|
2044
2172
|
* The ID of the worksheet to use for the conversation.
|
|
2045
2173
|
*/
|
|
2046
2174
|
worksheetId: string;
|
|
2047
|
-
/**
|
|
2048
|
-
* Optional CSS class name to add to the container div.
|
|
2049
|
-
*/
|
|
2050
|
-
containerClassName?: string;
|
|
2051
2175
|
}
|
|
2052
2176
|
/**
|
|
2053
2177
|
* Configuration for conversation options.
|
|
@@ -2057,13 +2181,13 @@ export interface SpotterAgentEmbedViewConfig extends Omit<BaseViewConfig, 'prima
|
|
|
2057
2181
|
*/
|
|
2058
2182
|
export interface BodylessConversationViewConfig extends SpotterAgentEmbedViewConfig {
|
|
2059
2183
|
}
|
|
2060
|
-
interface SpotterAgentMessageViewConfig extends SpotterAgentEmbedViewConfig {
|
|
2184
|
+
export interface SpotterAgentMessageViewConfig extends SpotterAgentEmbedViewConfig {
|
|
2061
2185
|
sessionId: string;
|
|
2062
2186
|
genNo: number;
|
|
2063
2187
|
acSessionId: string;
|
|
2064
2188
|
acGenNo: number;
|
|
2065
2189
|
}
|
|
2066
|
-
declare class ConversationMessage extends TsEmbed {
|
|
2190
|
+
export declare class ConversationMessage extends TsEmbed {
|
|
2067
2191
|
protected viewConfig: SpotterAgentMessageViewConfig;
|
|
2068
2192
|
constructor(container: HTMLElement, viewConfig: SpotterAgentMessageViewConfig);
|
|
2069
2193
|
getIframeSrc(): string;
|
|
@@ -2099,6 +2223,23 @@ export declare class SpotterAgentEmbed {
|
|
|
2099
2223
|
viz: ConversationMessage;
|
|
2100
2224
|
error?: undefined;
|
|
2101
2225
|
}>;
|
|
2226
|
+
/**
|
|
2227
|
+
* Send a message to the conversation service and return only the data.
|
|
2228
|
+
* @param userMessage - The message to send to the conversation service.
|
|
2229
|
+
* @returns The data from the conversation service.
|
|
2230
|
+
*/
|
|
2231
|
+
sendMessageData(userMessage: string): Promise<{
|
|
2232
|
+
error: any;
|
|
2233
|
+
data?: undefined;
|
|
2234
|
+
} | {
|
|
2235
|
+
data: {
|
|
2236
|
+
sessionId: any;
|
|
2237
|
+
genNo: any;
|
|
2238
|
+
acSessionId: any;
|
|
2239
|
+
acGenNo: any;
|
|
2240
|
+
};
|
|
2241
|
+
error?: undefined;
|
|
2242
|
+
}>;
|
|
2102
2243
|
}
|
|
2103
2244
|
/**
|
|
2104
2245
|
* Create a conversation embed, which can be integrated inside
|
|
@@ -2123,7 +2264,6 @@ export declare class SpotterAgentEmbed {
|
|
|
2123
2264
|
export declare class BodylessConversation extends SpotterAgentEmbed {
|
|
2124
2265
|
constructor(viewConfig: BodylessConversationViewConfig);
|
|
2125
2266
|
}
|
|
2126
|
-
export {};
|
|
2127
2267
|
|
|
2128
2268
|
/**
|
|
2129
2269
|
* Copyright (c) 2023
|
|
@@ -2337,7 +2477,13 @@ export declare enum HomeLeftNavItem {
|
|
|
2337
2477
|
* available when new navigation V3 is enabled.
|
|
2338
2478
|
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
2339
2479
|
*/
|
|
2340
|
-
Spotter = "spotter"
|
|
2480
|
+
Spotter = "spotter",
|
|
2481
|
+
/**
|
|
2482
|
+
* Favorites option in the insights left navigation,
|
|
2483
|
+
* available when new navigation V3 is enabled.
|
|
2484
|
+
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
2485
|
+
*/
|
|
2486
|
+
Favorites = "favorites"
|
|
2341
2487
|
}
|
|
2342
2488
|
export type DOMSelector = string | HTMLElement;
|
|
2343
2489
|
/**
|
|
@@ -3103,6 +3249,20 @@ export interface BaseViewConfig {
|
|
|
3103
3249
|
* @private
|
|
3104
3250
|
*/
|
|
3105
3251
|
insertInToSlide?: boolean;
|
|
3252
|
+
/**
|
|
3253
|
+
* Show alert messages and toast messages in the embed.
|
|
3254
|
+
* Supported embed in all embed types.
|
|
3255
|
+
*
|
|
3256
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
3257
|
+
* @example
|
|
3258
|
+
* ```js
|
|
3259
|
+
* const embed = new AppEmbed('#tsEmbed', {
|
|
3260
|
+
* ... // other embed view config
|
|
3261
|
+
* showAlerts:true,
|
|
3262
|
+
* })
|
|
3263
|
+
* ```
|
|
3264
|
+
*/
|
|
3265
|
+
showAlerts?: boolean;
|
|
3106
3266
|
}
|
|
3107
3267
|
/**
|
|
3108
3268
|
* The configuration object for Home page embeds configs.
|
|
@@ -3480,6 +3640,22 @@ export interface LiveboardAppEmbedViewConfig {
|
|
|
3480
3640
|
* ```
|
|
3481
3641
|
*/
|
|
3482
3642
|
enableAskSage?: boolean;
|
|
3643
|
+
/**
|
|
3644
|
+
* This flag is used to show or hide checkboxes for including or excluding
|
|
3645
|
+
* the cover and filters pages in the Liveboard PDF.
|
|
3646
|
+
*
|
|
3647
|
+
* Supported embed types: `AppEmbed`, `LiveboardEmbed`
|
|
3648
|
+
* @version SDK: 1.40.0 | ThoughtSpot:10.8.0.cl
|
|
3649
|
+
* @example
|
|
3650
|
+
* ```js
|
|
3651
|
+
* // Replace <EmbedComponent> with embed component name. For example, AppEmbed or LiveboardEmbed
|
|
3652
|
+
* const embed = new <EmbedComponent>('#tsEmbed', {
|
|
3653
|
+
* ... // other embed view config
|
|
3654
|
+
* coverAndFilterOptionInPDF: false,
|
|
3655
|
+
* })
|
|
3656
|
+
* ```
|
|
3657
|
+
*/
|
|
3658
|
+
coverAndFilterOptionInPDF?: boolean;
|
|
3483
3659
|
}
|
|
3484
3660
|
export interface AllEmbedViewConfig extends BaseViewConfig, SearchLiveboardCommonViewConfig, HomePageConfig, LiveboardAppEmbedViewConfig {
|
|
3485
3661
|
}
|
|
@@ -4739,7 +4915,13 @@ export declare enum EmbedEvent {
|
|
|
4739
4915
|
* Emitted when a user exits present mode.
|
|
4740
4916
|
* @version SDK : 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
4741
4917
|
*/
|
|
4742
|
-
ExitPresentMode = "exitPresentMode"
|
|
4918
|
+
ExitPresentMode = "exitPresentMode",
|
|
4919
|
+
/**
|
|
4920
|
+
* Emitted when a user requests the full height lazy load data.
|
|
4921
|
+
* @version SDK : 1.39.0 | ThoughtSpot : 10.10.0.cl
|
|
4922
|
+
* @hidden
|
|
4923
|
+
*/
|
|
4924
|
+
RequestVisibleEmbedCoordinates = "requestVisibleEmbedCoordinates"
|
|
4743
4925
|
}
|
|
4744
4926
|
/**
|
|
4745
4927
|
* Event types that can be triggered by the host application
|
|
@@ -5821,7 +6003,20 @@ export declare enum HostEvent {
|
|
|
5821
6003
|
*```
|
|
5822
6004
|
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
5823
6005
|
*/
|
|
5824
|
-
ExitPresentMode = "exitPresentMode"
|
|
6006
|
+
ExitPresentMode = "exitPresentMode",
|
|
6007
|
+
/**
|
|
6008
|
+
* Triggers the full height lazy load data.
|
|
6009
|
+
* @example
|
|
6010
|
+
* ```js
|
|
6011
|
+
* liveboardEmbed.on(EmbedEvent.RequestVisibleEmbedCoordinates, (payload) => {
|
|
6012
|
+
* console.log(payload);
|
|
6013
|
+
* });
|
|
6014
|
+
* ```
|
|
6015
|
+
* @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
|
|
6016
|
+
*
|
|
6017
|
+
* @hidden
|
|
6018
|
+
*/
|
|
6019
|
+
VisibleEmbedCoordinates = "visibleEmbedCoordinates"
|
|
5825
6020
|
}
|
|
5826
6021
|
/**
|
|
5827
6022
|
* The different visual modes that the data sources panel within
|
|
@@ -5917,6 +6112,7 @@ export declare enum Param {
|
|
|
5917
6112
|
Query = "query",
|
|
5918
6113
|
HideHomepageLeftNav = "hideHomepageLeftNav",
|
|
5919
6114
|
ModularHomeExperienceEnabled = "modularHomeExperience",
|
|
6115
|
+
ListPageVersion = "listpageVersion",
|
|
5920
6116
|
PendoTrackingKey = "additionalPendoKey",
|
|
5921
6117
|
LiveboardHeaderSticky = "isLiveboardHeaderSticky",
|
|
5922
6118
|
IsProductTour = "isProductTour",
|
|
@@ -5951,10 +6147,12 @@ export declare enum Param {
|
|
|
5951
6147
|
DataSourceId = "dataSourceId",
|
|
5952
6148
|
preAuthCache = "preAuthCache",
|
|
5953
6149
|
ShowSpotterLimitations = "showSpotterLimitations",
|
|
5954
|
-
CoverAndFilterOptionInPDF = "
|
|
6150
|
+
CoverAndFilterOptionInPDF = "arePdfCoverFilterPageCheckboxesEnabled",
|
|
5955
6151
|
PrimaryAction = "primaryAction",
|
|
5956
6152
|
isSpotterAgentEmbed = "isSpotterAgentEmbed",
|
|
5957
|
-
IsLiveboardStylingAndGroupingEnabled = "isLiveboardStylingAndGroupingEnabled"
|
|
6153
|
+
IsLiveboardStylingAndGroupingEnabled = "isLiveboardStylingAndGroupingEnabled",
|
|
6154
|
+
IsLazyLoadingForEmbedEnabled = "isLazyLoadingForEmbedEnabled",
|
|
6155
|
+
RootMarginForLazyLoad = "rootMarginForLazyLoad"
|
|
5958
6156
|
}
|
|
5959
6157
|
/**
|
|
5960
6158
|
* ThoughtSpot application pages include actions and menu commands
|
|
@@ -7174,7 +7372,23 @@ export declare enum Action {
|
|
|
7174
7372
|
* ```
|
|
7175
7373
|
* @version SDK: 1.37.0 | ThoughtSpot Cloud: 10.8.0.cl
|
|
7176
7374
|
*/
|
|
7177
|
-
CoverAndFilterOptionInPDF = "coverAndFilterOptionInPDF"
|
|
7375
|
+
CoverAndFilterOptionInPDF = "coverAndFilterOptionInPDF",
|
|
7376
|
+
/**
|
|
7377
|
+
* Action ID for hide or disable the
|
|
7378
|
+
* Spotter in conversation training widget.
|
|
7379
|
+
* The Add to Coaching feature is currently in beta
|
|
7380
|
+
* and is disabled by default on embed deployments.
|
|
7381
|
+
* To enable this feature on your instance,
|
|
7382
|
+
* contact ThoughtSpot Support.
|
|
7383
|
+
* @example
|
|
7384
|
+
* ```js
|
|
7385
|
+
* hiddenAction: [Action.InConversationTraining]
|
|
7386
|
+
* disabledActions: [Action.InConversationTraining]
|
|
7387
|
+
*
|
|
7388
|
+
* ```
|
|
7389
|
+
* @version SDK: 1.39.0 | ThoughtSpot Cloud: 10.10.0.cl
|
|
7390
|
+
*/
|
|
7391
|
+
InConversationTraining = "InConversationTraining"
|
|
7178
7392
|
}
|
|
7179
7393
|
export interface AnswerServiceType {
|
|
7180
7394
|
getAnswer?: (offset: number, batchSize: number) => any;
|
|
@@ -8342,13 +8556,14 @@ export declare class AnswerService {
|
|
|
8342
8556
|
*
|
|
8343
8557
|
* @example
|
|
8344
8558
|
* ```js
|
|
8559
|
+
* import { getInitConfig } from '@thoughtspot/visual-embed-sdk';
|
|
8560
|
+
* // Call the getInitConfig method to retrieve the embed configuration
|
|
8345
8561
|
* const config = getInitConfig();
|
|
8562
|
+
* // Log the configuration settings
|
|
8346
8563
|
* console.log(config);
|
|
8347
8564
|
* ```
|
|
8348
|
-
*
|
|
8349
|
-
*
|
|
8350
|
-
* Returns the `EmbedConfig` object, which
|
|
8351
|
-
* contains the configuration settings used to
|
|
8565
|
+
* Returns the link:https://developers.thoughtspot.com/docs/Interface_EmbedConfig[EmbedConfig]
|
|
8566
|
+
* object, which contains the configuration settings used to
|
|
8352
8567
|
* initialize the SDK, including the following:
|
|
8353
8568
|
*
|
|
8354
8569
|
* - `thoughtSpotHost` - ThoughtSpot host URL
|
|
@@ -8357,9 +8572,10 @@ export declare class AnswerService {
|
|
|
8357
8572
|
* - `customizations` - Style, text, and icon customization settings
|
|
8358
8573
|
* that were applied during the SDK initialization.
|
|
8359
8574
|
*
|
|
8360
|
-
*
|
|
8361
|
-
*
|
|
8575
|
+
* The following JSON output shows the embed configuration
|
|
8576
|
+
* settings returned from the code in the previous example:
|
|
8362
8577
|
*
|
|
8578
|
+
* @example
|
|
8363
8579
|
* ```json
|
|
8364
8580
|
* {
|
|
8365
8581
|
* "thoughtSpotHost": "https://{ThoughtSpot-Host}",
|
|
@@ -8381,7 +8597,7 @@ export declare class AnswerService {
|
|
|
8381
8597
|
* "authTriggerContainer": "#your-own-div"
|
|
8382
8598
|
* }
|
|
8383
8599
|
* ```
|
|
8384
|
-
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.
|
|
8600
|
+
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw, and later
|
|
8385
8601
|
* @group Global methods
|
|
8386
8602
|
*/
|
|
8387
8603
|
export declare const getEmbedConfig: () => EmbedConfig;
|