@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
package/src/embed/ts-embed.ts
CHANGED
|
@@ -35,6 +35,7 @@ import {
|
|
|
35
35
|
removeStyleProperties,
|
|
36
36
|
isUndefined,
|
|
37
37
|
} from '../utils';
|
|
38
|
+
import { getCustomActions } from '../utils/custom-actions';
|
|
38
39
|
import {
|
|
39
40
|
getThoughtSpotHost,
|
|
40
41
|
URL_MAX_LENGTH,
|
|
@@ -198,11 +199,11 @@ export class TsEmbed {
|
|
|
198
199
|
uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_EMBED_CREATE, {
|
|
199
200
|
...viewConfig,
|
|
200
201
|
});
|
|
201
|
-
const embedConfig = getEmbedConfig();
|
|
202
|
-
this.embedConfig = embedConfig;
|
|
203
|
-
|
|
204
202
|
this.hostEventClient = new HostEventClient(this.iFrame);
|
|
203
|
+
|
|
205
204
|
this.isReadyForRenderPromise = getInitPromise().then(async () => {
|
|
205
|
+
const embedConfig = getEmbedConfig();
|
|
206
|
+
this.embedConfig = embedConfig;
|
|
206
207
|
if (!embedConfig.authTriggerContainer && !embedConfig.useEventForSAMLPopup) {
|
|
207
208
|
this.embedConfig.authTriggerContainer = domSelector;
|
|
208
209
|
}
|
|
@@ -380,6 +381,16 @@ export class TsEmbed {
|
|
|
380
381
|
|
|
381
382
|
protected async getDefaultAppInitData(): Promise<DefaultAppInitData> {
|
|
382
383
|
const authToken = await this.getAuthTokenForCookielessInit();
|
|
384
|
+
const customActionsResult = getCustomActions([
|
|
385
|
+
...(this.viewConfig.customActions || []),
|
|
386
|
+
...(this.embedConfig.customActions || [])
|
|
387
|
+
]);
|
|
388
|
+
if (customActionsResult.errors.length > 0) {
|
|
389
|
+
this.handleError({
|
|
390
|
+
type: 'CUSTOM_ACTION_VALIDATION',
|
|
391
|
+
message: customActionsResult.errors,
|
|
392
|
+
});
|
|
393
|
+
}
|
|
383
394
|
return {
|
|
384
395
|
customisations: getCustomisations(this.embedConfig, this.viewConfig),
|
|
385
396
|
authToken,
|
|
@@ -398,6 +409,7 @@ export class TsEmbed {
|
|
|
398
409
|
customVariablesForThirdPartyTools:
|
|
399
410
|
this.embedConfig.customVariablesForThirdPartyTools || {},
|
|
400
411
|
hiddenListColumns: this.viewConfig.hiddenListColumns || [],
|
|
412
|
+
customActions: customActionsResult.actions,
|
|
401
413
|
};
|
|
402
414
|
}
|
|
403
415
|
|
|
@@ -482,10 +494,10 @@ export class TsEmbed {
|
|
|
482
494
|
this.on(EmbedEvent.APP_INIT, this.appInitCb, { start: false }, true);
|
|
483
495
|
this.on(EmbedEvent.AuthExpire, this.updateAuthToken, { start: false }, true);
|
|
484
496
|
this.on(EmbedEvent.IdleSessionTimeout, this.idleSessionTimeout, { start: false }, true);
|
|
485
|
-
|
|
486
|
-
const embedListenerReadyHandler = this.createEmbedContainerHandler(EmbedEvent.EmbedListenerReady);
|
|
497
|
+
|
|
498
|
+
const embedListenerReadyHandler = this.createEmbedContainerHandler(EmbedEvent.EmbedListenerReady);
|
|
487
499
|
this.on(EmbedEvent.EmbedListenerReady, embedListenerReadyHandler, { start: false }, true);
|
|
488
|
-
|
|
500
|
+
|
|
489
501
|
const authInitHandler = this.createEmbedContainerHandler(EmbedEvent.AuthInit);
|
|
490
502
|
this.on(EmbedEvent.AuthInit, authInitHandler, { start: false }, true);
|
|
491
503
|
};
|
|
@@ -508,12 +520,6 @@ export class TsEmbed {
|
|
|
508
520
|
return `${basePath}#`;
|
|
509
521
|
}
|
|
510
522
|
|
|
511
|
-
protected getUpdateEmbedParamsObject() {
|
|
512
|
-
let queryParams = this.getEmbedParamsObject();
|
|
513
|
-
queryParams = { ...this.viewConfig, ...queryParams };
|
|
514
|
-
return queryParams;
|
|
515
|
-
}
|
|
516
|
-
|
|
517
523
|
/**
|
|
518
524
|
* Common query params set for all the embed modes.
|
|
519
525
|
* @param queryParams
|
|
@@ -696,15 +702,10 @@ export class TsEmbed {
|
|
|
696
702
|
}
|
|
697
703
|
|
|
698
704
|
protected getEmbedParams() {
|
|
699
|
-
const queryParams = this.
|
|
705
|
+
const queryParams = this.getBaseQueryParams();
|
|
700
706
|
return getQueryParamString(queryParams);
|
|
701
707
|
}
|
|
702
708
|
|
|
703
|
-
protected getEmbedParamsObject() {
|
|
704
|
-
const params = this.getBaseQueryParams();
|
|
705
|
-
return params;
|
|
706
|
-
}
|
|
707
|
-
|
|
708
709
|
protected getRootIframeSrc() {
|
|
709
710
|
const query = this.getEmbedParams();
|
|
710
711
|
return this.getEmbedBasePath(query);
|
|
@@ -1139,12 +1140,12 @@ export class TsEmbed {
|
|
|
1139
1140
|
}
|
|
1140
1141
|
}
|
|
1141
1142
|
|
|
1142
|
-
|
|
1143
|
+
/**
|
|
1143
1144
|
* @hidden
|
|
1144
1145
|
* Internal state to track if the embed container is loaded.
|
|
1145
1146
|
* This is used to trigger events after the embed container is loaded.
|
|
1146
1147
|
*/
|
|
1147
|
-
|
|
1148
|
+
public isEmbedContainerLoaded = false;
|
|
1148
1149
|
|
|
1149
1150
|
/**
|
|
1150
1151
|
* @hidden
|
|
@@ -1190,7 +1191,7 @@ export class TsEmbed {
|
|
|
1190
1191
|
} else {
|
|
1191
1192
|
logger.debug('pushing callback to embedContainerReadyCallbacks', callback);
|
|
1192
1193
|
this.embedContainerReadyCallbacks.push(callback);
|
|
1193
|
-
|
|
1194
|
+
}
|
|
1194
1195
|
}
|
|
1195
1196
|
|
|
1196
1197
|
protected createEmbedContainerHandler = (source: EmbedEvent.AuthInit | EmbedEvent.EmbedListenerReady) => () => {
|
|
@@ -1278,7 +1279,7 @@ export class TsEmbed {
|
|
|
1278
1279
|
* Creates the preRender shell
|
|
1279
1280
|
* @param showPreRenderByDefault - Show the preRender after render, hidden by default
|
|
1280
1281
|
*/
|
|
1281
|
-
public async preRender(showPreRenderByDefault = false): Promise<TsEmbed> {
|
|
1282
|
+
public async preRender(showPreRenderByDefault = false): Promise<TsEmbed> {
|
|
1282
1283
|
if (!this.viewConfig.preRenderId) {
|
|
1283
1284
|
logger.error(ERROR_MESSAGE.PRERENDER_ID_MISSING);
|
|
1284
1285
|
return this;
|
|
@@ -1406,14 +1407,8 @@ export class TsEmbed {
|
|
|
1406
1407
|
return this.preRender(true);
|
|
1407
1408
|
}
|
|
1408
1409
|
this.validatePreRenderViewConfig(this.viewConfig);
|
|
1409
|
-
logger.debug('triggering UpdateEmbedParams', this.viewConfig);
|
|
1410
|
-
this.executeAfterEmbedContainerLoaded(() => {
|
|
1411
|
-
this.trigger(HostEvent.UpdateEmbedParams, this.getUpdateEmbedParamsObject());
|
|
1412
|
-
});
|
|
1413
1410
|
}
|
|
1414
1411
|
|
|
1415
|
-
this.beforePrerenderVisible();
|
|
1416
|
-
|
|
1417
1412
|
if (this.el) {
|
|
1418
1413
|
this.syncPreRenderStyle();
|
|
1419
1414
|
if (!this.viewConfig.doNotTrackPreRenderSize) {
|
|
@@ -1431,6 +1426,8 @@ export class TsEmbed {
|
|
|
1431
1426
|
}
|
|
1432
1427
|
}
|
|
1433
1428
|
|
|
1429
|
+
this.beforePrerenderVisible();
|
|
1430
|
+
|
|
1434
1431
|
removeStyleProperties(this.preRenderWrapper, ['z-index', 'opacity', 'pointer-events']);
|
|
1435
1432
|
|
|
1436
1433
|
this.subscribeToEvents();
|
package/src/errors.ts
CHANGED
|
@@ -19,3 +19,14 @@ export const ERROR_MESSAGE = {
|
|
|
19
19
|
RENDER_CALLED_BEFORE_INIT: 'Looks like render was called before calling init, the render won\'t start until init is called.\nFor more info check\n1. https://developers.thoughtspot.com/docs/Function_init#_init\n2.https://developers.thoughtspot.com/docs/getting-started#initSdk',
|
|
20
20
|
SPOTTER_AGENT_NOT_INITIALIZED: 'SpotterAgent not initialized',
|
|
21
21
|
};
|
|
22
|
+
|
|
23
|
+
export const CUSTOM_ACTIONS_ERROR_MESSAGE = {
|
|
24
|
+
INVALID_ACTION_OBJECT: 'Custom Action Validation Error: Invalid action object provided',
|
|
25
|
+
MISSING_REQUIRED_FIELDS: (id: string, missingFields: string[]) => `Custom Action Validation Error for '${id}': Missing required fields: ${missingFields.join(', ')}`,
|
|
26
|
+
UNSUPPORTED_TARGET: (id: string, targetType: string) => `Custom Action Validation Error for '${id}': Target type '${targetType}' is not supported`,
|
|
27
|
+
INVALID_POSITION: (position: string, targetType: string, supportedPositions: string) => `Position '${position}' is not supported for ${targetType.toLowerCase()}-level custom actions. Supported positions: ${supportedPositions}`,
|
|
28
|
+
INVALID_METADATA_IDS: (targetType: string, invalidIds: string[], supportedIds: string) => `Invalid metadata IDs for ${targetType.toLowerCase()}-level custom actions: ${invalidIds.join(', ')}. Supported metadata IDs: ${supportedIds}`,
|
|
29
|
+
INVALID_DATA_MODEL_IDS: (targetType: string, invalidIds: string[], supportedIds: string) => `Invalid data model IDs for ${targetType.toLowerCase()}-level custom actions: ${invalidIds.join(', ')}. Supported data model IDs: ${supportedIds}`,
|
|
30
|
+
INVALID_FIELDS: (targetType: string, invalidFields: string[], supportedFields: string) => `Invalid fields for ${targetType.toLowerCase()}-level custom actions: ${invalidFields.join(', ')}. Supported fields: ${supportedFields}`,
|
|
31
|
+
DUPLICATE_IDS: (id: string, duplicateNames: string[], keptName: string) => `Duplicate custom action ID '${id}' found. Actions with names '${duplicateNames.join("', '")}' will be ignored. Keeping '${keptName}'.`,
|
|
32
|
+
};
|
package/src/index.ts
CHANGED
|
@@ -62,6 +62,8 @@ import {
|
|
|
62
62
|
VizPoint,
|
|
63
63
|
CustomActionPayload,
|
|
64
64
|
ListPageColumns,
|
|
65
|
+
CustomActionsPosition,
|
|
66
|
+
CustomActionTarget,
|
|
65
67
|
} from './types';
|
|
66
68
|
import { CustomCssVariables } from './css-variables';
|
|
67
69
|
import { SageEmbed, SageViewConfig } from './embed/sage';
|
|
@@ -148,6 +150,8 @@ export {
|
|
|
148
150
|
UIPassthroughEvent,
|
|
149
151
|
ListPageColumns,
|
|
150
152
|
DataPanelCustomColumnGroupsAccordionState,
|
|
153
|
+
CustomActionsPosition,
|
|
154
|
+
CustomActionTarget,
|
|
151
155
|
};
|
|
152
156
|
|
|
153
157
|
export { resetCachedAuthToken } from './authToken';
|
package/src/react/index.tsx
CHANGED
package/src/types.ts
CHANGED
|
@@ -14,7 +14,7 @@ import type { SessionInterface } from './utils/graphql/answerService/answerServi
|
|
|
14
14
|
* the embedded app
|
|
15
15
|
* @group Authentication / Init
|
|
16
16
|
*/
|
|
17
|
-
|
|
17
|
+
|
|
18
18
|
export enum AuthType {
|
|
19
19
|
/**
|
|
20
20
|
* No authentication on the SDK. Pass-through to the embedded App. Alias for
|
|
@@ -231,12 +231,12 @@ export type DOMSelector = string | HTMLElement;
|
|
|
231
231
|
* Use {@link CustomCssVariables} or css rules.
|
|
232
232
|
*/
|
|
233
233
|
export interface customCssInterface {
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
234
|
+
/**
|
|
235
|
+
* The custom css variables, which can be set.
|
|
236
|
+
* The variables are available in the {@link CustomCssVariables}
|
|
237
|
+
* interface. For more information, see
|
|
238
|
+
* link:https://developers.thoughtspot.com/docs/css-variables-reference[CSS variable reference].
|
|
239
|
+
*/
|
|
240
240
|
variables?: CustomCssVariables;
|
|
241
241
|
/**
|
|
242
242
|
* Can be used to define a custom font face
|
|
@@ -262,7 +262,7 @@ export interface customCssInterface {
|
|
|
262
262
|
* };
|
|
263
263
|
* ```
|
|
264
264
|
*/
|
|
265
|
-
|
|
265
|
+
|
|
266
266
|
rules_UNSTABLE?: {
|
|
267
267
|
[selector: string]: {
|
|
268
268
|
[declaration: string]: string;
|
|
@@ -648,7 +648,7 @@ export interface EmbedConfig {
|
|
|
648
648
|
* ```
|
|
649
649
|
* @version SDK 1.37.0 | ThoughtSpot: 10.8.0.cl
|
|
650
650
|
*/
|
|
651
|
-
customVariablesForThirdPartyTools?: Record<string, any>;
|
|
651
|
+
customVariablesForThirdPartyTools?: Record< string, any >;
|
|
652
652
|
|
|
653
653
|
disablePreauthCache?: boolean;
|
|
654
654
|
|
|
@@ -666,10 +666,36 @@ export interface EmbedConfig {
|
|
|
666
666
|
* ```
|
|
667
667
|
*/
|
|
668
668
|
disableFullscreenPresentation?: boolean;
|
|
669
|
+
|
|
670
|
+
/**
|
|
671
|
+
* Custom Actions allows users to define interactive UI actions (like buttons or menu
|
|
672
|
+
* items) that appear in ThoughtSpot's visualizations, answers, and Liveboards. These
|
|
673
|
+
* actions enable users to trigger custom workflows — such as navigating to an
|
|
674
|
+
* external app, calling an API, or opening a modal — based on the data context of
|
|
675
|
+
* what they clicked can be used to trigger custom logic when the action is clicked.
|
|
676
|
+
* @version SDK: 1.43.0 | ThoughtSpot: 10.14.0.cl
|
|
677
|
+
* @example
|
|
678
|
+
* ```js
|
|
679
|
+
* import { CustomActionPosition, CustomActionTarget } from '@thoughtspot/visual-embed-sdk';
|
|
680
|
+
* init({
|
|
681
|
+
* ... // other embed config options
|
|
682
|
+
* customActions: [
|
|
683
|
+
* {
|
|
684
|
+
* name: 'customAction',
|
|
685
|
+
* id: 'customAction',
|
|
686
|
+
* target: CustomActionTarget.VISUALIZATION,
|
|
687
|
+
* position: CustomActionPosition.PRIMARY,
|
|
688
|
+
* }
|
|
689
|
+
* }
|
|
690
|
+
* ]
|
|
691
|
+
* })
|
|
692
|
+
* ```
|
|
693
|
+
*/
|
|
694
|
+
customActions?: CustomAction[];
|
|
669
695
|
}
|
|
670
696
|
|
|
671
697
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
672
|
-
export interface LayoutConfig {
|
|
698
|
+
export interface LayoutConfig {}
|
|
673
699
|
|
|
674
700
|
/**
|
|
675
701
|
* Embedded iframe configuration
|
|
@@ -731,7 +757,7 @@ export interface BaseViewConfig {
|
|
|
731
757
|
/**
|
|
732
758
|
* @hidden
|
|
733
759
|
*/
|
|
734
|
-
|
|
760
|
+
|
|
735
761
|
styleSheet__unstable?: string;
|
|
736
762
|
/**
|
|
737
763
|
* The list of actions to disable from the primary menu, more menu
|
|
@@ -931,7 +957,7 @@ export interface BaseViewConfig {
|
|
|
931
957
|
* ```
|
|
932
958
|
* @version SDK: 1.31.2 | ThoughtSpot: 10.0.0.cl
|
|
933
959
|
*/
|
|
934
|
-
|
|
960
|
+
|
|
935
961
|
enableV2Shell_experimental?: boolean;
|
|
936
962
|
/**
|
|
937
963
|
* For internal tracking of the embed component type.
|
|
@@ -1030,6 +1056,34 @@ export interface BaseViewConfig {
|
|
|
1030
1056
|
* ```
|
|
1031
1057
|
*/
|
|
1032
1058
|
showAlerts?: boolean;
|
|
1059
|
+
/**
|
|
1060
|
+
* Custom Actions allows users to define interactive UI actions (like buttons or menu
|
|
1061
|
+
* items) that appear in ThoughtSpot's visualizations, answers, and Liveboards. These
|
|
1062
|
+
* actions enable users to trigger custom workflows — such as navigating to an
|
|
1063
|
+
* external app, calling an API, or opening a modal — based on the data context of
|
|
1064
|
+
* what they clicked can be used to trigger custom logic when the action is clicked.
|
|
1065
|
+
*
|
|
1066
|
+
* Supported embed types: `AppEmbed`, `LiveboardEmbed`, `SageEmbed`, `SearchEmbed`, `SpotterEmbed`
|
|
1067
|
+
* @version SDK: 1.43.0 | ThoughtSpot: 10.14.0.cl
|
|
1068
|
+
* @example
|
|
1069
|
+
* ```js
|
|
1070
|
+
* import { CustomActionPosition, CustomActionTarget } from '@thoughtspot/visual-embed-sdk';
|
|
1071
|
+
* // Use supported embed types such as AppEmbed or LiveboardEmbed
|
|
1072
|
+
* const embed = new LiveboardEmbed('#tsEmbed', {
|
|
1073
|
+
* ... // other embed config options
|
|
1074
|
+
* customActions: [
|
|
1075
|
+
* {
|
|
1076
|
+
* name: 'customAction',
|
|
1077
|
+
* id: 'customAction',
|
|
1078
|
+
* target: CustomActionTarget.VISUALIZATION,
|
|
1079
|
+
* position: CustomActionPosition.PRIMARY,
|
|
1080
|
+
* }
|
|
1081
|
+
* }
|
|
1082
|
+
* ]
|
|
1083
|
+
* })
|
|
1084
|
+
* ```
|
|
1085
|
+
*/
|
|
1086
|
+
customActions?: CustomAction[];
|
|
1033
1087
|
}
|
|
1034
1088
|
|
|
1035
1089
|
/**
|
|
@@ -1040,7 +1094,8 @@ export interface HomePageConfig {
|
|
|
1040
1094
|
* Hide list page columns
|
|
1041
1095
|
* For example: hiddenListColumns = [ListPageColumns.Author]
|
|
1042
1096
|
*
|
|
1043
|
-
* **Note**: This option is available only in full app embedding
|
|
1097
|
+
* **Note**: This option is currently available only in full app embedding and requires importing the ListPageColumns enum.
|
|
1098
|
+
* 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.
|
|
1044
1099
|
*
|
|
1045
1100
|
* Supported embed types: `AppEmbed`
|
|
1046
1101
|
* @version SDK: 1.38.0 | ThoughtSpot: 10.9.0.cl
|
|
@@ -1358,7 +1413,8 @@ export interface LiveboardAppEmbedViewConfig {
|
|
|
1358
1413
|
*/
|
|
1359
1414
|
isLiveboardCompactHeaderEnabled?: boolean;
|
|
1360
1415
|
/**
|
|
1361
|
-
* This flag can be used to show or hide the Liveboard verified icon in the compact
|
|
1416
|
+
* This flag can be used to show or hide the Liveboard verified icon in the compact
|
|
1417
|
+
* header.
|
|
1362
1418
|
*
|
|
1363
1419
|
* Supported embed types: `AppEmbed`, `LiveboardEmbed`
|
|
1364
1420
|
* @version SDK: 1.35.0 | ThoughtSpot:10.4.0.cl
|
|
@@ -1375,6 +1431,8 @@ export interface LiveboardAppEmbedViewConfig {
|
|
|
1375
1431
|
showLiveboardVerifiedBadge?: boolean;
|
|
1376
1432
|
/**
|
|
1377
1433
|
* This flag is used to enable/disable hide irrelevant filters in Liveboard tab
|
|
1434
|
+
*
|
|
1435
|
+
* **Note**: This feature is supported only if compact header is enabled on your Liveboard. To enable compact header, use the `isLiveboardCompactHeaderEnabled` attribute.
|
|
1378
1436
|
*
|
|
1379
1437
|
* Supported embed types: `AppEmbed`, `LiveboardEmbed`
|
|
1380
1438
|
* @version SDK: 1.36.0 | ThoughtSpot:10.6.0.cl
|
|
@@ -1385,12 +1443,14 @@ export interface LiveboardAppEmbedViewConfig {
|
|
|
1385
1443
|
* const embed = new <EmbedComponent>('#tsEmbed', {
|
|
1386
1444
|
* ... // other embed view config
|
|
1387
1445
|
* hideIrrelevantChipsInLiveboardTabs: true,
|
|
1446
|
+
* isLiveboardCompactHeaderEnabled: true,
|
|
1388
1447
|
* })
|
|
1389
1448
|
* ```
|
|
1390
1449
|
*/
|
|
1391
1450
|
hideIrrelevantChipsInLiveboardTabs?: boolean;
|
|
1392
1451
|
/**
|
|
1393
|
-
* This flag can be used to show or hide the re-verify banner on the Liveboard
|
|
1452
|
+
* This flag can be used to show or hide the re-verify banner on the Liveboard
|
|
1453
|
+
* compact header
|
|
1394
1454
|
*
|
|
1395
1455
|
* Supported embed types: `AppEmbed`, `LiveboardEmbed`
|
|
1396
1456
|
* @version SDK: 1.35.0 | ThoughtSpot:10.4.0.cl
|
|
@@ -1421,25 +1481,41 @@ export interface LiveboardAppEmbedViewConfig {
|
|
|
1421
1481
|
* ```
|
|
1422
1482
|
*/
|
|
1423
1483
|
enableAskSage?: boolean;
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1484
|
+
/**
|
|
1485
|
+
* This flag is used to show or hide checkboxes for including or excluding
|
|
1486
|
+
* the cover and filters pages in the Liveboard PDF.
|
|
1487
|
+
*
|
|
1488
|
+
* Supported embed types: `AppEmbed`, `LiveboardEmbed`
|
|
1489
|
+
* @version SDK: 1.40.0 | ThoughtSpot:10.8.0.cl
|
|
1490
|
+
* @example
|
|
1491
|
+
* ```js
|
|
1492
|
+
* // Replace <EmbedComponent> with embed component name. For example, AppEmbed or LiveboardEmbed
|
|
1493
|
+
* const embed = new <EmbedComponent>('#tsEmbed', {
|
|
1494
|
+
* ... // other embed view config
|
|
1495
|
+
* coverAndFilterOptionInPDF: false,
|
|
1496
|
+
* })
|
|
1497
|
+
* ```
|
|
1498
|
+
*/
|
|
1439
1499
|
coverAndFilterOptionInPDF?: boolean;
|
|
1500
|
+
/**
|
|
1501
|
+
* This flag is used to enable or disable the XLSX/CSV download option for Liveboards.
|
|
1502
|
+
*
|
|
1503
|
+
* Supported embed types: `AppEmbed`, `LiveboardEmbed`
|
|
1504
|
+
* @version SDK: 1.41.0 | ThoughtSpot: 10.14.0.cl
|
|
1505
|
+
* @example
|
|
1506
|
+
* ```js
|
|
1507
|
+
* // Replace <EmbedComponent> with embed component name. For example, AppEmbed or LiveboardEmbed
|
|
1508
|
+
* const embed = new <EmbedComponent>('#tsEmbed', {
|
|
1509
|
+
* ... // other embed view config
|
|
1510
|
+
* liveboardXLSXCSVDownload: true,
|
|
1511
|
+
* })
|
|
1512
|
+
* ```
|
|
1513
|
+
*/
|
|
1514
|
+
liveboardXLSXCSVDownload?: boolean;
|
|
1515
|
+
|
|
1440
1516
|
}
|
|
1441
1517
|
|
|
1442
|
-
export interface AllEmbedViewConfig extends BaseViewConfig, SearchLiveboardCommonViewConfig, HomePageConfig, LiveboardAppEmbedViewConfig {
|
|
1518
|
+
export interface AllEmbedViewConfig extends BaseViewConfig, SearchLiveboardCommonViewConfig, HomePageConfig, LiveboardAppEmbedViewConfig {}
|
|
1443
1519
|
|
|
1444
1520
|
/**
|
|
1445
1521
|
* MessagePayload: Embed event payload: message type, data and status (start/end)
|
|
@@ -1500,7 +1576,7 @@ export type QueryParams = {
|
|
|
1500
1576
|
/**
|
|
1501
1577
|
* A map of the supported runtime filter operations
|
|
1502
1578
|
*/
|
|
1503
|
-
|
|
1579
|
+
|
|
1504
1580
|
export enum RuntimeFilterOp {
|
|
1505
1581
|
/**
|
|
1506
1582
|
* Equals
|
|
@@ -1571,7 +1647,7 @@ export enum RuntimeFilterOp {
|
|
|
1571
1647
|
* `modularHomeExperience` to `true` (available as Early Access feature in 9.12.5.cl).
|
|
1572
1648
|
* @version SDK: 1.28.0 | ThoughtSpot: 9.12.5.cl, 10.1.0.sw
|
|
1573
1649
|
*/
|
|
1574
|
-
|
|
1650
|
+
|
|
1575
1651
|
export enum HomepageModule {
|
|
1576
1652
|
/**
|
|
1577
1653
|
* Search bar
|
|
@@ -1604,7 +1680,7 @@ export enum HomepageModule {
|
|
|
1604
1680
|
* **Note**: This option is applicable to full app embedding only.
|
|
1605
1681
|
* @version SDK: 1.38.0 | ThoughtSpot: 10.9.0.cl
|
|
1606
1682
|
*/
|
|
1607
|
-
|
|
1683
|
+
|
|
1608
1684
|
export enum ListPageColumns {
|
|
1609
1685
|
/**
|
|
1610
1686
|
* Favourite
|
|
@@ -1702,7 +1778,7 @@ export interface RuntimeParameter {
|
|
|
1702
1778
|
* ```
|
|
1703
1779
|
* @group Events
|
|
1704
1780
|
*/
|
|
1705
|
-
|
|
1781
|
+
|
|
1706
1782
|
export enum EmbedEvent {
|
|
1707
1783
|
/**
|
|
1708
1784
|
* Rendering has initialized.
|
|
@@ -2345,6 +2421,11 @@ export enum EmbedEvent {
|
|
|
2345
2421
|
* @hidden
|
|
2346
2422
|
*/
|
|
2347
2423
|
APP_INIT = 'appInit',
|
|
2424
|
+
/**
|
|
2425
|
+
* Internal event to clear the cached info
|
|
2426
|
+
* @hidden
|
|
2427
|
+
*/
|
|
2428
|
+
CLEAR_INFO_CACHE = 'clearInfoCache',
|
|
2348
2429
|
/**
|
|
2349
2430
|
* Emitted when a user clicks **Show Liveboard details** on a Liveboard
|
|
2350
2431
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
@@ -2693,25 +2774,25 @@ export enum EmbedEvent {
|
|
|
2693
2774
|
* ```
|
|
2694
2775
|
* @version SDK: 1.37.0 | ThoughtSpot: 10.8.0.cl
|
|
2695
2776
|
*/
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2777
|
+
TableVizRendered = 'TableVizRendered',
|
|
2778
|
+
/**
|
|
2779
|
+
* Emitted when the liveboard is created from pin modal or Liveboard list page.
|
|
2780
|
+
* You can use this event as a hook to trigger
|
|
2781
|
+
* other events on liveboard creation.
|
|
2782
|
+
*
|
|
2783
|
+
* ```js
|
|
2784
|
+
* liveboardEmbed.on(EmbedEvent.CreateLiveboard, (payload) => {
|
|
2785
|
+
* console.log('payload', payload);
|
|
2786
|
+
* })
|
|
2787
|
+
*```
|
|
2788
|
+
* @version SDK : 1.37.0 | ThoughtSpot: 10.8.0.cl
|
|
2789
|
+
*/
|
|
2709
2790
|
CreateLiveboard = 'createLiveboard',
|
|
2710
2791
|
/**
|
|
2711
2792
|
* Emitted when a user creates a Model.
|
|
2712
2793
|
* @version SDK : 1.37.0 | ThoughtSpot: 10.8.0.cl
|
|
2713
2794
|
*/
|
|
2714
|
-
|
|
2795
|
+
CreateModel = 'createModel',
|
|
2715
2796
|
/**
|
|
2716
2797
|
* @hidden
|
|
2717
2798
|
* Emitted when a user exits present mode.
|
|
@@ -2813,6 +2894,17 @@ export enum EmbedEvent {
|
|
|
2813
2894
|
* ```
|
|
2814
2895
|
*/
|
|
2815
2896
|
EmbedListenerReady = 'EmbedListenerReady',
|
|
2897
|
+
/**
|
|
2898
|
+
* Emitted when the organization is switched.
|
|
2899
|
+
* @example
|
|
2900
|
+
* ```js
|
|
2901
|
+
* appEmbed.on(EmbedEvent.OrgSwitched, (payload) => {
|
|
2902
|
+
* console.log('payload', payload);
|
|
2903
|
+
* })
|
|
2904
|
+
* ```
|
|
2905
|
+
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
2906
|
+
*/
|
|
2907
|
+
OrgSwitched = 'orgSwitched',
|
|
2816
2908
|
}
|
|
2817
2909
|
|
|
2818
2910
|
/**
|
|
@@ -2868,7 +2960,7 @@ export enum EmbedEvent {
|
|
|
2868
2960
|
* ```
|
|
2869
2961
|
* @group Events
|
|
2870
2962
|
*/
|
|
2871
|
-
|
|
2963
|
+
|
|
2872
2964
|
export enum HostEvent {
|
|
2873
2965
|
/**
|
|
2874
2966
|
* Triggers a search operation with the search tokens specified in
|
|
@@ -3923,7 +4015,7 @@ export enum HostEvent {
|
|
|
3923
4015
|
*```
|
|
3924
4016
|
* @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
|
|
3925
4017
|
*/
|
|
3926
|
-
|
|
4018
|
+
InfoSuccess = 'InfoSuccess',
|
|
3927
4019
|
/**
|
|
3928
4020
|
* Trigger the save action for an Answer.
|
|
3929
4021
|
* To programmatically save an answer without opening the
|
|
@@ -4077,24 +4169,13 @@ export enum HostEvent {
|
|
|
4077
4169
|
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
4078
4170
|
*/
|
|
4079
4171
|
AskSpotter = 'AskSpotter',
|
|
4080
|
-
|
|
4081
|
-
/**
|
|
4082
|
-
* @hidden
|
|
4083
|
-
* Triggers the update of the embed params.
|
|
4084
|
-
*
|
|
4085
|
-
* @example
|
|
4086
|
-
* ```js
|
|
4087
|
-
* liveboardEmbed.trigger(HostEvent.UpdateEmbedParams, viewConfig);
|
|
4088
|
-
* ```
|
|
4089
|
-
*/
|
|
4090
|
-
UpdateEmbedParams = 'updateEmbedParams',
|
|
4091
4172
|
}
|
|
4092
4173
|
|
|
4093
4174
|
/**
|
|
4094
4175
|
* The different visual modes that the data sources panel within
|
|
4095
4176
|
* search could appear in, such as hidden, collapsed, or expanded.
|
|
4096
4177
|
*/
|
|
4097
|
-
|
|
4178
|
+
|
|
4098
4179
|
export enum DataSourceVisualMode {
|
|
4099
4180
|
/**
|
|
4100
4181
|
* The data source panel is hidden.
|
|
@@ -4114,7 +4195,7 @@ export enum DataSourceVisualMode {
|
|
|
4114
4195
|
* The query params passed down to the embedded ThoughtSpot app
|
|
4115
4196
|
* containing configuration and/or visual information.
|
|
4116
4197
|
*/
|
|
4117
|
-
|
|
4198
|
+
|
|
4118
4199
|
export enum Param {
|
|
4119
4200
|
EmbedApp = 'embedApp',
|
|
4120
4201
|
DataSources = 'dataSources',
|
|
@@ -4193,6 +4274,7 @@ export enum Param {
|
|
|
4193
4274
|
Query = 'query',
|
|
4194
4275
|
HideHomepageLeftNav = 'hideHomepageLeftNav',
|
|
4195
4276
|
ModularHomeExperienceEnabled = 'modularHomeExperience',
|
|
4277
|
+
HomepageVersion = 'homepageVersion',
|
|
4196
4278
|
ListPageVersion = 'listpageVersion',
|
|
4197
4279
|
PendoTrackingKey = 'additionalPendoKey',
|
|
4198
4280
|
LiveboardHeaderSticky = 'isLiveboardHeaderSticky',
|
|
@@ -4233,7 +4315,8 @@ export enum Param {
|
|
|
4233
4315
|
isSpotterAgentEmbed = 'isSpotterAgentEmbed',
|
|
4234
4316
|
IsLiveboardStylingAndGroupingEnabled = 'isLiveboardStylingAndGroupingEnabled',
|
|
4235
4317
|
IsLazyLoadingForEmbedEnabled = 'isLazyLoadingForEmbedEnabled',
|
|
4236
|
-
RootMarginForLazyLoad = 'rootMarginForLazyLoad'
|
|
4318
|
+
RootMarginForLazyLoad = 'rootMarginForLazyLoad',
|
|
4319
|
+
LiveboardXLSXCSVDownload = 'isLiveboardXLSXCSVDownloadEnabled',
|
|
4237
4320
|
}
|
|
4238
4321
|
|
|
4239
4322
|
/**
|
|
@@ -4263,7 +4346,7 @@ export enum Param {
|
|
|
4263
4346
|
* ```
|
|
4264
4347
|
* See also link:https://developers.thoughtspot.com/docs/actions[Action IDs in the SDK]
|
|
4265
4348
|
*/
|
|
4266
|
-
|
|
4349
|
+
|
|
4267
4350
|
export enum Action {
|
|
4268
4351
|
/**
|
|
4269
4352
|
* The **Save** action on an Answer or Liveboard.
|
|
@@ -4808,7 +4891,7 @@ export enum Action {
|
|
|
4808
4891
|
* The Favorites icon (*) for Answers,
|
|
4809
4892
|
* Liveboard, and data objects like Worksheet, Model,
|
|
4810
4893
|
* Tables and Views.
|
|
4811
|
-
* Allows adding an object to the user
|
|
4894
|
+
* Allows adding an object to the user's favorites list.
|
|
4812
4895
|
* @example
|
|
4813
4896
|
* ```js
|
|
4814
4897
|
* disabledActions: [Action.AddToFavorites]
|
|
@@ -5564,15 +5647,15 @@ export interface ColumnValue {
|
|
|
5564
5647
|
[key: string]: any;
|
|
5565
5648
|
};
|
|
5566
5649
|
value:
|
|
5567
|
-
|
|
5568
|
-
|
|
5569
|
-
|
|
5570
|
-
|
|
5571
|
-
|
|
5572
|
-
|
|
5573
|
-
|
|
5574
|
-
|
|
5575
|
-
|
|
5650
|
+
| string
|
|
5651
|
+
| number
|
|
5652
|
+
| boolean
|
|
5653
|
+
| {
|
|
5654
|
+
v: {
|
|
5655
|
+
s: number;
|
|
5656
|
+
e: number;
|
|
5657
|
+
};
|
|
5658
|
+
};
|
|
5576
5659
|
}
|
|
5577
5660
|
|
|
5578
5661
|
export interface VizPoint {
|
|
@@ -5604,6 +5687,44 @@ export interface CustomActionPayload {
|
|
|
5604
5687
|
vizId?: string;
|
|
5605
5688
|
}
|
|
5606
5689
|
|
|
5690
|
+
export interface CustomAction {
|
|
5691
|
+
name: string;
|
|
5692
|
+
id: string;
|
|
5693
|
+
position: CustomActionsPosition;
|
|
5694
|
+
target: CustomActionTarget;
|
|
5695
|
+
metadataIds?: {
|
|
5696
|
+
answerIds?: string[];
|
|
5697
|
+
liveboardIds?: string[];
|
|
5698
|
+
vizIds?: string[];
|
|
5699
|
+
};
|
|
5700
|
+
dataModelIds?: {
|
|
5701
|
+
modelIds?: string[];
|
|
5702
|
+
modelColumnNames?: string[];
|
|
5703
|
+
}
|
|
5704
|
+
orgIds?: string[];
|
|
5705
|
+
groupIds?: string[];
|
|
5706
|
+
}
|
|
5707
|
+
|
|
5708
|
+
/**
|
|
5709
|
+
* Enum options to show custom actions at different
|
|
5710
|
+
* positions in the application.
|
|
5711
|
+
*/
|
|
5712
|
+
export enum CustomActionsPosition {
|
|
5713
|
+
PRIMARY = 'PRIMARY',
|
|
5714
|
+
MENU = 'MENU',
|
|
5715
|
+
CONTEXTMENU = 'CONTEXTMENU',
|
|
5716
|
+
}
|
|
5717
|
+
|
|
5718
|
+
/**
|
|
5719
|
+
* Enum options to mention the target of the custom action.
|
|
5720
|
+
*/
|
|
5721
|
+
export enum CustomActionTarget {
|
|
5722
|
+
LIVEBOARD = 'LIVEBOARD',
|
|
5723
|
+
VIZ = 'VIZ',
|
|
5724
|
+
ANSWER = 'ANSWER',
|
|
5725
|
+
SPOTTER = 'SPOTTER',
|
|
5726
|
+
}
|
|
5727
|
+
|
|
5607
5728
|
/**
|
|
5608
5729
|
* Enum options to show or suppress Visual Embed SDK and
|
|
5609
5730
|
* ThoughtSpot application logs in the console output.
|
|
@@ -5701,4 +5822,5 @@ export interface DefaultAppInitData {
|
|
|
5701
5822
|
hiddenHomeLeftNavItems: string[];
|
|
5702
5823
|
customVariablesForThirdPartyTools: Record<string, any>;
|
|
5703
5824
|
hiddenListColumns: ListPageColumns[];
|
|
5825
|
+
customActions: CustomAction[];
|
|
5704
5826
|
}
|