@thoughtspot/visual-embed-sdk 1.46.4 → 1.46.5-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/package.json +2 -2
- package/cjs/src/auth.d.ts +2 -1
- package/cjs/src/auth.d.ts.map +1 -1
- package/cjs/src/auth.js +2 -1
- package/cjs/src/auth.js.map +1 -1
- package/cjs/src/authToken.d.ts.map +1 -1
- package/cjs/src/authToken.js.map +1 -1
- package/cjs/src/css-variables.d.ts +51 -17
- package/cjs/src/css-variables.d.ts.map +1 -1
- package/cjs/src/embed/app.d.ts +1 -0
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +10 -1
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/app.spec.js +46 -1
- package/cjs/src/embed/app.spec.js.map +1 -1
- package/cjs/src/embed/base.d.ts.map +1 -1
- package/cjs/src/embed/base.js.map +1 -1
- package/cjs/src/embed/base.spec.js.map +1 -1
- package/cjs/src/embed/events.spec.js +72 -0
- package/cjs/src/embed/events.spec.js.map +1 -1
- package/cjs/src/embed/hostEventClient/contracts.d.ts +74 -3
- package/cjs/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/cjs/src/embed/hostEventClient/contracts.js +7 -0
- package/cjs/src/embed/hostEventClient/contracts.js.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.d.ts +10 -0
- package/cjs/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.js +46 -9
- package/cjs/src/embed/hostEventClient/host-event-client.js.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.spec.js +155 -0
- package/cjs/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts +1 -0
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +11 -2
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/liveboard.spec.js +96 -2
- package/cjs/src/embed/liveboard.spec.js.map +1 -1
- package/cjs/src/embed/sage.d.ts.map +1 -1
- package/cjs/src/embed/sage.js.map +1 -1
- package/cjs/src/embed/search.spec.js.map +1 -1
- package/cjs/src/embed/ts-embed.d.ts +41 -2
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +41 -2
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/react/index.d.ts.map +1 -1
- package/cjs/src/react/index.js +58 -53
- package/cjs/src/react/index.js.map +1 -1
- package/cjs/src/types.d.ts +730 -32
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +734 -3
- package/cjs/src/types.js.map +1 -1
- package/cjs/src/utils/graphql/answerService/answerService.d.ts +4 -2
- package/cjs/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
- package/cjs/src/utils/graphql/answerService/answerService.js +4 -2
- package/cjs/src/utils/graphql/answerService/answerService.js.map +1 -1
- package/cjs/src/utils/graphql/preview-service.d.ts.map +1 -1
- package/cjs/src/utils/graphql/preview-service.js.map +1 -1
- package/cjs/src/utils/processData.d.ts.map +1 -1
- package/cjs/src/utils/processData.js.map +1 -1
- package/dist/{index-DGV_zh53.js → index-DW2wEHqy.js} +1 -1
- package/dist/src/auth.d.ts +2 -1
- package/dist/src/auth.d.ts.map +1 -1
- package/dist/src/authToken.d.ts.map +1 -1
- package/dist/src/css-variables.d.ts +51 -17
- package/dist/src/css-variables.d.ts.map +1 -1
- package/dist/src/embed/app.d.ts +1 -0
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/base.d.ts.map +1 -1
- package/dist/src/embed/hostEventClient/contracts.d.ts +74 -3
- package/dist/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/dist/src/embed/hostEventClient/host-event-client.d.ts +10 -0
- package/dist/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts +1 -0
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/embed/sage.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.d.ts +41 -2
- package/dist/src/embed/ts-embed.d.ts.map +1 -1
- package/dist/src/react/index.d.ts.map +1 -1
- package/dist/src/types.d.ts +730 -32
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/graphql/answerService/answerService.d.ts +4 -2
- package/dist/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
- package/dist/src/utils/graphql/preview-service.d.ts.map +1 -1
- package/dist/src/utils/processData.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +917 -77
- package/dist/tsembed-react.js +915 -75
- package/dist/tsembed.es.js +859 -24
- package/dist/tsembed.js +857 -22
- package/dist/visual-embed-sdk-react-full.d.ts +892 -54
- package/dist/visual-embed-sdk-react.d.ts +892 -54
- package/dist/visual-embed-sdk.d.ts +912 -56
- package/lib/package.json +2 -2
- package/lib/src/auth.d.ts +2 -1
- package/lib/src/auth.d.ts.map +1 -1
- package/lib/src/auth.js +2 -1
- package/lib/src/auth.js.map +1 -1
- package/lib/src/authToken.d.ts.map +1 -1
- package/lib/src/authToken.js.map +1 -1
- package/lib/src/css-variables.d.ts +51 -17
- package/lib/src/css-variables.d.ts.map +1 -1
- package/lib/src/embed/app.d.ts +1 -0
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +10 -1
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/app.spec.js +46 -1
- package/lib/src/embed/app.spec.js.map +1 -1
- package/lib/src/embed/base.d.ts.map +1 -1
- package/lib/src/embed/base.js.map +1 -1
- package/lib/src/embed/base.spec.js.map +1 -1
- package/lib/src/embed/events.spec.js +73 -1
- package/lib/src/embed/events.spec.js.map +1 -1
- package/lib/src/embed/hostEventClient/contracts.d.ts +74 -3
- package/lib/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/lib/src/embed/hostEventClient/contracts.js +7 -0
- package/lib/src/embed/hostEventClient/contracts.js.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.d.ts +10 -0
- package/lib/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.js +46 -9
- package/lib/src/embed/hostEventClient/host-event-client.js.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.spec.js +155 -0
- package/lib/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts +1 -0
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +11 -2
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +96 -2
- package/lib/src/embed/liveboard.spec.js.map +1 -1
- package/lib/src/embed/sage.d.ts.map +1 -1
- package/lib/src/embed/sage.js.map +1 -1
- package/lib/src/embed/search.spec.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts +41 -2
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +42 -3
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/react/index.d.ts.map +1 -1
- package/lib/src/react/index.js +58 -53
- package/lib/src/react/index.js.map +1 -1
- package/lib/src/types.d.ts +730 -32
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +734 -3
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils/graphql/answerService/answerService.d.ts +4 -2
- package/lib/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
- package/lib/src/utils/graphql/answerService/answerService.js +4 -2
- package/lib/src/utils/graphql/answerService/answerService.js.map +1 -1
- package/lib/src/utils/graphql/preview-service.d.ts.map +1 -1
- package/lib/src/utils/graphql/preview-service.js.map +1 -1
- package/lib/src/utils/processData.d.ts.map +1 -1
- package/lib/src/utils/processData.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +912 -56
- package/package.json +2 -2
- package/src/auth.spec.ts +1 -1
- package/src/auth.ts +2 -1
- package/src/authToken.ts +0 -1
- package/src/css-variables.ts +51 -17
- package/src/embed/app.spec.ts +62 -3
- package/src/embed/app.ts +10 -1
- package/src/embed/base.spec.ts +1 -2
- package/src/embed/base.ts +1 -4
- package/src/embed/events.spec.ts +88 -0
- package/src/embed/hostEventClient/contracts.ts +74 -2
- package/src/embed/hostEventClient/host-event-client.spec.ts +257 -0
- package/src/embed/hostEventClient/host-event-client.ts +70 -15
- package/src/embed/liveboard.spec.ts +126 -2
- package/src/embed/liveboard.ts +11 -2
- package/src/embed/sage.ts +0 -1
- package/src/embed/search.spec.ts +0 -2
- package/src/embed/ts-embed.ts +43 -3
- package/src/react/index.tsx +76 -72
- package/src/types.ts +739 -31
- package/src/utils/graphql/answerService/answerService.ts +4 -5
- package/src/utils/graphql/preview-service.ts +0 -1
- package/src/utils/processData.ts +0 -5
package/src/types.ts
CHANGED
|
@@ -57,6 +57,7 @@ export enum AuthType {
|
|
|
57
57
|
* @deprecated This option is deprecated.
|
|
58
58
|
* @hidden
|
|
59
59
|
*/
|
|
60
|
+
// eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values
|
|
60
61
|
SAML = 'SSO_SAML',
|
|
61
62
|
/**
|
|
62
63
|
* SSO using SAML
|
|
@@ -102,6 +103,7 @@ export enum AuthType {
|
|
|
102
103
|
* });
|
|
103
104
|
* ```
|
|
104
105
|
*/
|
|
106
|
+
// eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values
|
|
105
107
|
SAMLRedirect = 'SSO_SAML',
|
|
106
108
|
/**
|
|
107
109
|
* SSO using OIDC
|
|
@@ -115,6 +117,7 @@ export enum AuthType {
|
|
|
115
117
|
* Will make the host application redirect to the OIDC IdP.
|
|
116
118
|
* See code samples in {@link SAMLRedirect}.
|
|
117
119
|
*/
|
|
120
|
+
// eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values
|
|
118
121
|
OIDCRedirect = 'SSO_OIDC',
|
|
119
122
|
/**
|
|
120
123
|
* Trusted authentication server
|
|
@@ -140,6 +143,7 @@ export enum AuthType {
|
|
|
140
143
|
* });
|
|
141
144
|
* ```
|
|
142
145
|
*/
|
|
146
|
+
// eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values
|
|
143
147
|
TrustedAuthToken = 'AuthServer',
|
|
144
148
|
/**
|
|
145
149
|
* Trusted authentication server Cookieless, Use your own authentication
|
|
@@ -3137,22 +3141,45 @@ export enum EmbedEvent {
|
|
|
3137
3141
|
/**
|
|
3138
3142
|
* Emitted when name, status (private or public) or filter values of a
|
|
3139
3143
|
* Personalised view is updated.
|
|
3144
|
+
* This event is deprecated. Use {@link EmbedEvent.UpdatePersonalizedView} instead.
|
|
3140
3145
|
* @returns viewName: string
|
|
3141
3146
|
* @returns viewId: string
|
|
3142
3147
|
* @returns liveboardId: string
|
|
3143
3148
|
* @returns isPublic: boolean
|
|
3144
3149
|
* @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
|
|
3150
|
+
* @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
3145
3151
|
*/
|
|
3146
3152
|
UpdatePersonalisedView = 'updatePersonalisedView',
|
|
3153
|
+
/**
|
|
3154
|
+
* Emitted when name, status (private or public) or filter values of a
|
|
3155
|
+
* Personalized view is updated.
|
|
3156
|
+
* @returns viewName: string
|
|
3157
|
+
* @returns viewId: string
|
|
3158
|
+
* @returns liveboardId: string
|
|
3159
|
+
* @returns isPublic: boolean
|
|
3160
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
3161
|
+
*/
|
|
3162
|
+
UpdatePersonalizedView = UpdatePersonalisedView,
|
|
3147
3163
|
/**
|
|
3148
3164
|
* Emitted when a Personalised view is saved.
|
|
3165
|
+
* This event is deprecated. Use {@link EmbedEvent.SavePersonalizedView} instead.
|
|
3149
3166
|
* @returns viewName: string
|
|
3150
3167
|
* @returns viewId: string
|
|
3151
3168
|
* @returns liveboardId: string
|
|
3152
3169
|
* @returns isPublic: boolean
|
|
3153
3170
|
* @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
|
|
3171
|
+
* @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
3154
3172
|
*/
|
|
3155
3173
|
SavePersonalisedView = 'savePersonalisedView',
|
|
3174
|
+
/**
|
|
3175
|
+
* Emitted when a Personalized view is saved.
|
|
3176
|
+
* @returns viewName: string
|
|
3177
|
+
* @returns viewId: string
|
|
3178
|
+
* @returns liveboardId: string
|
|
3179
|
+
* @returns isPublic: boolean
|
|
3180
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
3181
|
+
*/
|
|
3182
|
+
SavePersonalizedView = SavePersonalisedView,
|
|
3156
3183
|
/**
|
|
3157
3184
|
* Emitted when a Liveboard is reset.
|
|
3158
3185
|
* @returns viewName: string
|
|
@@ -3164,11 +3191,41 @@ export enum EmbedEvent {
|
|
|
3164
3191
|
ResetLiveboard = 'resetLiveboard',
|
|
3165
3192
|
/**
|
|
3166
3193
|
* Emitted when a PersonalisedView is deleted.
|
|
3194
|
+
* This event is deprecated. Use {@link EmbedEvent.DeletePersonalizedView} instead.
|
|
3167
3195
|
* @returns views: string[]
|
|
3168
3196
|
* @returns liveboardId: string
|
|
3169
3197
|
* @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
|
|
3198
|
+
* @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
3170
3199
|
*/
|
|
3171
3200
|
DeletePersonalisedView = 'deletePersonalisedView',
|
|
3201
|
+
/**
|
|
3202
|
+
* Emitted when a PersonalizedView is deleted.
|
|
3203
|
+
* @returns views: string[]
|
|
3204
|
+
* @returns liveboardId: string
|
|
3205
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
3206
|
+
*/
|
|
3207
|
+
DeletePersonalizedView = DeletePersonalisedView,
|
|
3208
|
+
/**
|
|
3209
|
+
* Emitted when a user selects a different Personalized View or
|
|
3210
|
+
* resets to the original/default view on a Liveboard.
|
|
3211
|
+
* @example
|
|
3212
|
+
* ```js
|
|
3213
|
+
* liveboardEmbed.on(EmbedEvent.ChangePersonalizedView, (data) => {
|
|
3214
|
+
* console.log(data.viewName); // 'Q4 Revenue' or 'Original View'
|
|
3215
|
+
* console.log(data.viewId); // '2a021a12-...' or null (default)
|
|
3216
|
+
* console.log(data.liveboardId); // 'abc123...'
|
|
3217
|
+
* console.log(data.isPublic); // true | false
|
|
3218
|
+
* })
|
|
3219
|
+
* ```
|
|
3220
|
+
* @returns viewName: string - Name of the selected view,
|
|
3221
|
+
* or 'Original View' when reset to default.
|
|
3222
|
+
* @returns viewId: string | null - GUID of the selected view,
|
|
3223
|
+
* or null when reset to default.
|
|
3224
|
+
* @returns liveboardId: string
|
|
3225
|
+
* @returns isPublic: boolean
|
|
3226
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
3227
|
+
*/
|
|
3228
|
+
ChangePersonalizedView = 'changePersonalisedView',
|
|
3172
3229
|
/**
|
|
3173
3230
|
* Emitted when a user creates a Worksheet.
|
|
3174
3231
|
* @version SDK: 1.27.0 | ThoughtSpot: 9.8.0.cl, 9.8.0.sw
|
|
@@ -3202,7 +3259,8 @@ export enum EmbedEvent {
|
|
|
3202
3259
|
* @param - Includes the following parameters:
|
|
3203
3260
|
* - `payload`: The payload received from the embed related to the Data API call.
|
|
3204
3261
|
* - `responder`: Contains elements that let developers define whether ThoughtSpot
|
|
3205
|
-
* will run or block the search operation, and if blocked, which error message to
|
|
3262
|
+
* will run or block the search operation, and if blocked, which error message to
|
|
3263
|
+
* provide.
|
|
3206
3264
|
* - `execute` - When `execute` returns `true`, the search is run.
|
|
3207
3265
|
* When `execute` returns `false`, the search is not executed.
|
|
3208
3266
|
* - `error` - Developers can customize the user-facing error message when `execute`
|
|
@@ -3638,6 +3696,25 @@ export enum EmbedEvent {
|
|
|
3638
3696
|
* );
|
|
3639
3697
|
* }
|
|
3640
3698
|
* ```
|
|
3699
|
+
*
|
|
3700
|
+
* **Context Parameter (SDK: 1.45.2+)**
|
|
3701
|
+
*
|
|
3702
|
+
* Starting from SDK version 1.45.2 | ThoughtSpot: 26.3.0.cl, you can optionally pass a
|
|
3703
|
+
* `ContextType` as the third parameter to the `trigger` method to specify the context
|
|
3704
|
+
* from which the event is triggered. This helps ThoughtSpot understand the current page
|
|
3705
|
+
* context (Search, Answer, Liveboard, or Spotter) for better event handling.
|
|
3706
|
+
*
|
|
3707
|
+
* @example
|
|
3708
|
+
* ```js
|
|
3709
|
+
* import { HostEvent, ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3710
|
+
*
|
|
3711
|
+
* // Trigger Pin event with Search context
|
|
3712
|
+
* appEmbed.trigger(HostEvent.Pin, {
|
|
3713
|
+
* vizId: "123",
|
|
3714
|
+
* liveboardId: "456"
|
|
3715
|
+
* }, ContextType.Search);
|
|
3716
|
+
* ```
|
|
3717
|
+
*
|
|
3641
3718
|
* @group Events
|
|
3642
3719
|
*/
|
|
3643
3720
|
|
|
@@ -3660,6 +3737,16 @@ export enum HostEvent {
|
|
|
3660
3737
|
execute: true
|
|
3661
3738
|
});
|
|
3662
3739
|
* ```
|
|
3740
|
+
* @example
|
|
3741
|
+
* ```js
|
|
3742
|
+
* // Trigger search from search context
|
|
3743
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3744
|
+
* appEmbed.trigger(HostEvent.Search, {
|
|
3745
|
+
* searchQuery: "[revenue] by [region]",
|
|
3746
|
+
* dataSources: ["cd252e5c-b552-49a8-821d-3eadaa049cca"],
|
|
3747
|
+
* execute: true
|
|
3748
|
+
* }, ContextType.Search);
|
|
3749
|
+
* ```
|
|
3663
3750
|
*/
|
|
3664
3751
|
Search = 'search',
|
|
3665
3752
|
/**
|
|
@@ -3710,6 +3797,24 @@ export enum HostEvent {
|
|
|
3710
3797
|
* });
|
|
3711
3798
|
* })
|
|
3712
3799
|
* ```
|
|
3800
|
+
* @example
|
|
3801
|
+
* ```js
|
|
3802
|
+
* // Drill down from answer context
|
|
3803
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3804
|
+
* appEmbed.trigger(HostEvent.DrillDown, {
|
|
3805
|
+
* points: { clickedPoint, selectedPoints },
|
|
3806
|
+
* autoDrillDown: true
|
|
3807
|
+
* }, ContextType.Answer);
|
|
3808
|
+
* ```
|
|
3809
|
+
* @example
|
|
3810
|
+
* ```js
|
|
3811
|
+
* // Drill down from search context
|
|
3812
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3813
|
+
* searchEmbed.trigger(HostEvent.DrillDown, {
|
|
3814
|
+
* points: { clickedPoint, selectedPoints },
|
|
3815
|
+
* columnGuid: "column-guid"
|
|
3816
|
+
* }, ContextType.Search);
|
|
3817
|
+
* ```
|
|
3713
3818
|
* @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
|
|
3714
3819
|
*/
|
|
3715
3820
|
DrillDown = 'triggerDrillDown',
|
|
@@ -3730,6 +3835,13 @@ export enum HostEvent {
|
|
|
3730
3835
|
* const url = embed.trigger(HostEvent.GetIframeUrl);
|
|
3731
3836
|
* console.log("iFrameURL",url);
|
|
3732
3837
|
* ```
|
|
3838
|
+
* @example
|
|
3839
|
+
* ```js
|
|
3840
|
+
* // Get iframe URL from specific context
|
|
3841
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3842
|
+
* const url = await appEmbed.trigger(HostEvent.GetIframeUrl, {}, ContextType.Answer);
|
|
3843
|
+
* console.log("iFrameURL", url);
|
|
3844
|
+
* ```
|
|
3733
3845
|
* @version SDK: 1.35.0 | ThoughtSpot: 10.4.0.cl
|
|
3734
3846
|
*/
|
|
3735
3847
|
GetIframeUrl = 'GetIframeUrl',
|
|
@@ -3743,6 +3855,15 @@ export enum HostEvent {
|
|
|
3743
3855
|
* '730496d6-6903-4601-937e-2c691821af3c',
|
|
3744
3856
|
* 'd547ec54-2a37-4516-a222-2b06719af726'])
|
|
3745
3857
|
* ```
|
|
3858
|
+
* @example
|
|
3859
|
+
* ```js
|
|
3860
|
+
* // Set visible vizs from liveboard context
|
|
3861
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3862
|
+
* liveboardEmbed.trigger(HostEvent.SetVisibleVizs, [
|
|
3863
|
+
* '730496d6-6903-4601-937e-2c691821af3c',
|
|
3864
|
+
* 'd547ec54-2a37-4516-a222-2b06719af726'
|
|
3865
|
+
* ], ContextType.Liveboard);
|
|
3866
|
+
* ```
|
|
3746
3867
|
* @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
|
|
3747
3868
|
*/
|
|
3748
3869
|
SetVisibleVizs = 'SetPinboardVisibleVizs',
|
|
@@ -3755,6 +3876,14 @@ export enum HostEvent {
|
|
|
3755
3876
|
* tabId:'730496d6-6903-4601-937e-2c691821af3c'
|
|
3756
3877
|
* })
|
|
3757
3878
|
* ```
|
|
3879
|
+
* @example
|
|
3880
|
+
* ```js
|
|
3881
|
+
* // Set active tab from liveboard context
|
|
3882
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3883
|
+
* liveboardEmbed.trigger(HostEvent.SetActiveTab, {
|
|
3884
|
+
* tabId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
3885
|
+
* }, ContextType.Liveboard);
|
|
3886
|
+
* ```
|
|
3758
3887
|
* @version SDK: 1.24.0 | ThoughtSpot: 9.5.0.cl, 9.5.1-sw
|
|
3759
3888
|
*/
|
|
3760
3889
|
SetActiveTab = 'SetActiveTab',
|
|
@@ -3788,6 +3917,15 @@ export enum HostEvent {
|
|
|
3788
3917
|
* {columnName: "item type",operator: RuntimeFilterOp.EQ,values: ["Jackets"]}
|
|
3789
3918
|
* ])
|
|
3790
3919
|
* ```
|
|
3920
|
+
* @example
|
|
3921
|
+
* ```js
|
|
3922
|
+
* // Update runtime filters from liveboard context
|
|
3923
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3924
|
+
* liveboardEmbed.trigger(HostEvent.UpdateRuntimeFilters, [
|
|
3925
|
+
* {columnName: "region", operator: RuntimeFilterOp.EQ, values: ["west"]},
|
|
3926
|
+
* {columnName: "product", operator: RuntimeFilterOp.IN, values: ["shoes", "boots"]}
|
|
3927
|
+
* ], ContextType.Liveboard);
|
|
3928
|
+
* ```
|
|
3791
3929
|
* @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl, 8.4.1.sw
|
|
3792
3930
|
* @important
|
|
3793
3931
|
*/
|
|
@@ -3821,6 +3959,14 @@ export enum HostEvent {
|
|
|
3821
3959
|
* LiveboardEmbed.trigger(HostEvent.OpenFilter,
|
|
3822
3960
|
* { column: {columnId: '<column-GUID>'}})
|
|
3823
3961
|
* ```
|
|
3962
|
+
* @example
|
|
3963
|
+
* ```js
|
|
3964
|
+
* // Open filter from search context
|
|
3965
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3966
|
+
* searchEmbed.trigger(HostEvent.OpenFilter, {
|
|
3967
|
+
* column: { columnId: '<column-GUID>', name: 'region', type: 'ATTRIBUTE', dataType: 'CHAR'}
|
|
3968
|
+
* }, ContextType.Search);
|
|
3969
|
+
* ```
|
|
3824
3970
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
|
|
3825
3971
|
*/
|
|
3826
3972
|
OpenFilter = 'openFilter',
|
|
@@ -3831,6 +3977,14 @@ export enum HostEvent {
|
|
|
3831
3977
|
* ```js
|
|
3832
3978
|
* searchEmbed.trigger(HostEvent.AddColumns, { columnIds: ['<column-GUID>','<column-GUID>'] })
|
|
3833
3979
|
* ```
|
|
3980
|
+
* @example
|
|
3981
|
+
* ```js
|
|
3982
|
+
* // Add columns from search context
|
|
3983
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3984
|
+
* searchEmbed.trigger(HostEvent.AddColumns, {
|
|
3985
|
+
* columnIds: ['col-guid-1', 'col-guid-2']
|
|
3986
|
+
* }, ContextType.Search);
|
|
3987
|
+
* ```
|
|
3834
3988
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
|
|
3835
3989
|
*/
|
|
3836
3990
|
AddColumns = 'addColumns',
|
|
@@ -3841,6 +3995,14 @@ export enum HostEvent {
|
|
|
3841
3995
|
* ```js
|
|
3842
3996
|
* searchEmbed.trigger(HostEvent.RemoveColumn, { columnId: '<column-Guid>' })
|
|
3843
3997
|
* ```
|
|
3998
|
+
* @example
|
|
3999
|
+
* ```js
|
|
4000
|
+
* // Remove column from search context
|
|
4001
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4002
|
+
* searchEmbed.trigger(HostEvent.RemoveColumn, {
|
|
4003
|
+
* columnId: 'column-guid'
|
|
4004
|
+
* }, ContextType.Search);
|
|
4005
|
+
* ```
|
|
3844
4006
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
|
|
3845
4007
|
*/
|
|
3846
4008
|
RemoveColumn = 'removeColumn',
|
|
@@ -3927,6 +4089,37 @@ export enum HostEvent {
|
|
|
3927
4089
|
*
|
|
3928
4090
|
* spotterEmbed.trigger(HostEvent.Pin, { vizId: latestSpotterVizId });
|
|
3929
4091
|
* ```
|
|
4092
|
+
* @example
|
|
4093
|
+
* ```js
|
|
4094
|
+
* // Using context parameter to specify the context type (SDK: 1.45.2+)
|
|
4095
|
+
* // Pin from a search answer context
|
|
4096
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4097
|
+
* appEmbed.trigger(HostEvent.Pin, {
|
|
4098
|
+
* vizId: "123",
|
|
4099
|
+
* newVizName: "Sales by region",
|
|
4100
|
+
* liveboardId: "456"
|
|
4101
|
+
* }, ContextType.Search);
|
|
4102
|
+
* ```
|
|
4103
|
+
* @example
|
|
4104
|
+
* ```js
|
|
4105
|
+
* // Pin from an answer context (explore modal/page) (SDK: 1.45.2+)
|
|
4106
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4107
|
+
* appEmbed.trigger(HostEvent.Pin, {
|
|
4108
|
+
* vizId: "789",
|
|
4109
|
+
* newVizName: "Revenue trends",
|
|
4110
|
+
* liveboardId: "456"
|
|
4111
|
+
* }, ContextType.Answer);
|
|
4112
|
+
* ```
|
|
4113
|
+
* @example
|
|
4114
|
+
* ```js
|
|
4115
|
+
* // Pin from a spotter context (SDK: 1.45.2+)
|
|
4116
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4117
|
+
* appEmbed.trigger(HostEvent.Pin, {
|
|
4118
|
+
* vizId: latestSpotterVizId,
|
|
4119
|
+
* newVizName: "AI-generated insights",
|
|
4120
|
+
* liveboardId: "456"
|
|
4121
|
+
* }, ContextType.Spotter);
|
|
4122
|
+
* ```
|
|
3930
4123
|
*
|
|
3931
4124
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
3932
4125
|
*/
|
|
@@ -3937,6 +4130,12 @@ export enum HostEvent {
|
|
|
3937
4130
|
* @example
|
|
3938
4131
|
* ```js
|
|
3939
4132
|
* liveboardEmbed.trigger(HostEvent.LiveboardInfo)
|
|
4133
|
+
*```
|
|
4134
|
+
* @example
|
|
4135
|
+
* ```js
|
|
4136
|
+
* // Show liveboard info from liveboard context
|
|
4137
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4138
|
+
* liveboardEmbed.trigger(HostEvent.LiveboardInfo, {}, ContextType.Liveboard);
|
|
3940
4139
|
* ```
|
|
3941
4140
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
3942
4141
|
*/
|
|
@@ -3947,6 +4146,12 @@ export enum HostEvent {
|
|
|
3947
4146
|
* ```js
|
|
3948
4147
|
* liveboardEmbed.trigger(HostEvent.Schedule)
|
|
3949
4148
|
* ```
|
|
4149
|
+
* @example
|
|
4150
|
+
* ```js
|
|
4151
|
+
* // Schedule from liveboard context
|
|
4152
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4153
|
+
* liveboardEmbed.trigger(HostEvent.Schedule, {}, ContextType.Liveboard);
|
|
4154
|
+
* ```
|
|
3950
4155
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
3951
4156
|
*/
|
|
3952
4157
|
Schedule = 'subscription',
|
|
@@ -3956,6 +4161,12 @@ export enum HostEvent {
|
|
|
3956
4161
|
* ```js
|
|
3957
4162
|
* liveboardEmbed.trigger(HostEvent.ScheduleList)
|
|
3958
4163
|
* ```
|
|
4164
|
+
* @example
|
|
4165
|
+
* ```js
|
|
4166
|
+
* // Manage schedules from liveboard context
|
|
4167
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4168
|
+
* liveboardEmbed.trigger(HostEvent.ScheduleList, {}, ContextType.Liveboard);
|
|
4169
|
+
* ```
|
|
3959
4170
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
3960
4171
|
*/
|
|
3961
4172
|
SchedulesList = 'schedule-list',
|
|
@@ -3966,6 +4177,18 @@ export enum HostEvent {
|
|
|
3966
4177
|
* ```js
|
|
3967
4178
|
* liveboardEmbed.trigger(HostEvent.ExportTML)
|
|
3968
4179
|
* ```
|
|
4180
|
+
* @example
|
|
4181
|
+
* ```js
|
|
4182
|
+
* // Export TML from liveboard context
|
|
4183
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4184
|
+
* liveboardEmbed.trigger(HostEvent.ExportTML, {}, ContextType.Liveboard);
|
|
4185
|
+
* ```
|
|
4186
|
+
* @example
|
|
4187
|
+
* ```js
|
|
4188
|
+
* // Export TML from search-answer context
|
|
4189
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4190
|
+
* appEmbed.trigger(HostEvent.ExportTML, {}, ContextType.Search);
|
|
4191
|
+
* ```
|
|
3969
4192
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
3970
4193
|
*/
|
|
3971
4194
|
ExportTML = 'exportTSL',
|
|
@@ -3976,6 +4199,18 @@ export enum HostEvent {
|
|
|
3976
4199
|
* ```js
|
|
3977
4200
|
* liveboardEmbed.trigger(HostEvent.EditTML)
|
|
3978
4201
|
* ```
|
|
4202
|
+
* @example
|
|
4203
|
+
* ```js
|
|
4204
|
+
* // Edit TML from liveboard context
|
|
4205
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4206
|
+
* liveboardEmbed.trigger(HostEvent.EditTML, {}, ContextType.Liveboard);
|
|
4207
|
+
* ```
|
|
4208
|
+
* @example
|
|
4209
|
+
* ```js
|
|
4210
|
+
* // Edit TML from search-answer context
|
|
4211
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4212
|
+
* appEmbed.trigger(HostEvent.EditTML, {}, ContextType.Search);
|
|
4213
|
+
* ```
|
|
3979
4214
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
3980
4215
|
*/
|
|
3981
4216
|
EditTML = 'editTSL',
|
|
@@ -3985,6 +4220,12 @@ export enum HostEvent {
|
|
|
3985
4220
|
* ```js
|
|
3986
4221
|
* liveboardEmbed.trigger(HostEvent.UpdateTML)
|
|
3987
4222
|
* ```
|
|
4223
|
+
* @example
|
|
4224
|
+
* ```js
|
|
4225
|
+
* // Update TML from liveboard context
|
|
4226
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4227
|
+
* liveboardEmbed.trigger(HostEvent.UpdateTML, {}, ContextType.Liveboard);
|
|
4228
|
+
* ```
|
|
3988
4229
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
3989
4230
|
*/
|
|
3990
4231
|
UpdateTML = 'updateTSL',
|
|
@@ -4011,6 +4252,18 @@ export enum HostEvent {
|
|
|
4011
4252
|
*
|
|
4012
4253
|
* spotterEmbed.trigger(HostEvent.DownloadAsPdf, { vizId: latestSpotterVizId });
|
|
4013
4254
|
* ```
|
|
4255
|
+
* @example
|
|
4256
|
+
* ```js
|
|
4257
|
+
* // Download as PDF from search-answer context
|
|
4258
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4259
|
+
* appEmbed.trigger(HostEvent.DownloadAsPdf, {}, ContextType.Search);
|
|
4260
|
+
* ```
|
|
4261
|
+
* @example
|
|
4262
|
+
* ```js
|
|
4263
|
+
* // Download as PDF from liveboard context
|
|
4264
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4265
|
+
* liveboardEmbed.trigger(HostEvent.DownloadAsPdf, {}, ContextType.Liveboard);
|
|
4266
|
+
* ```
|
|
4014
4267
|
*
|
|
4015
4268
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
4016
4269
|
*/
|
|
@@ -4055,6 +4308,18 @@ export enum HostEvent {
|
|
|
4055
4308
|
*
|
|
4056
4309
|
* spotterEmbed.trigger(HostEvent.MakeACopy, { vizId: latestSpotterVizId });
|
|
4057
4310
|
* ```
|
|
4311
|
+
* @example
|
|
4312
|
+
* ```js
|
|
4313
|
+
* // Make a copy from answer context
|
|
4314
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4315
|
+
* appEmbed.trigger(HostEvent.MakeACopy, {}, ContextType.Answer);
|
|
4316
|
+
* ```
|
|
4317
|
+
* @example
|
|
4318
|
+
* ```js
|
|
4319
|
+
* // Make a copy from search context
|
|
4320
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4321
|
+
* appEmbed.trigger(HostEvent.MakeACopy, {}, ContextType.Search);
|
|
4322
|
+
* ```
|
|
4058
4323
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
4059
4324
|
*/
|
|
4060
4325
|
MakeACopy = 'makeACopy',
|
|
@@ -4079,6 +4344,14 @@ export enum HostEvent {
|
|
|
4079
4344
|
* ```js
|
|
4080
4345
|
* liveboardEmbed.trigger(HostEvent.Explore, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
4081
4346
|
* ```
|
|
4347
|
+
* @example
|
|
4348
|
+
* ```js
|
|
4349
|
+
* // Explore from liveboard context
|
|
4350
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4351
|
+
* liveboardEmbed.trigger(HostEvent.Explore, {
|
|
4352
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
4353
|
+
* }, ContextType.Liveboard);
|
|
4354
|
+
* ```
|
|
4082
4355
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
4083
4356
|
*/
|
|
4084
4357
|
Explore = 'explore',
|
|
@@ -4096,6 +4369,20 @@ export enum HostEvent {
|
|
|
4096
4369
|
* ```js
|
|
4097
4370
|
* searchEmbed.trigger(HostEvent.CreateMonitor)
|
|
4098
4371
|
* ```
|
|
4372
|
+
* @example
|
|
4373
|
+
* ```js
|
|
4374
|
+
* // Create monitor from answer context
|
|
4375
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4376
|
+
* appEmbed.trigger(HostEvent.CreateMonitor, {}, ContextType.Answer);
|
|
4377
|
+
* ```
|
|
4378
|
+
* @example
|
|
4379
|
+
* ```js
|
|
4380
|
+
* // Create monitor from liveboard context
|
|
4381
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4382
|
+
* liveboardEmbed.trigger(HostEvent.CreateMonitor, {
|
|
4383
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
4384
|
+
* }, ContextType.Liveboard);
|
|
4385
|
+
* ```
|
|
4099
4386
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
4100
4387
|
*/
|
|
4101
4388
|
CreateMonitor = 'createMonitor',
|
|
@@ -4117,6 +4404,20 @@ export enum HostEvent {
|
|
|
4117
4404
|
* ```js
|
|
4118
4405
|
* vizEmbed.trigger(HostEvent.ManageMonitor)
|
|
4119
4406
|
* ```
|
|
4407
|
+
* @example
|
|
4408
|
+
* ```js
|
|
4409
|
+
* // Manage monitor from answer context
|
|
4410
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4411
|
+
* appEmbed.trigger(HostEvent.ManageMonitor, {}, ContextType.Answer);
|
|
4412
|
+
* ```
|
|
4413
|
+
* @example
|
|
4414
|
+
* ```js
|
|
4415
|
+
* // Manage monitor from liveboard context
|
|
4416
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4417
|
+
* liveboardEmbed.trigger(HostEvent.ManageMonitor, {
|
|
4418
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
4419
|
+
* }, ContextType.Liveboard);
|
|
4420
|
+
* ```
|
|
4120
4421
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
4121
4422
|
*/
|
|
4122
4423
|
ManageMonitor = 'manageMonitor',
|
|
@@ -4142,6 +4443,26 @@ export enum HostEvent {
|
|
|
4142
4443
|
* ```js
|
|
4143
4444
|
* spotterEmbed.trigger(HostEvent.Edit);
|
|
4144
4445
|
* ```
|
|
4446
|
+
* @example
|
|
4447
|
+
* ```js
|
|
4448
|
+
* // Using context parameter to edit liveboard context
|
|
4449
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4450
|
+
* liveboardEmbed.trigger(HostEvent.Edit, {}, ContextType.Liveboard);
|
|
4451
|
+
* ```
|
|
4452
|
+
* @example
|
|
4453
|
+
* ```js
|
|
4454
|
+
* // Edit from search context
|
|
4455
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4456
|
+
* appEmbed.trigger(HostEvent.Edit, {}, ContextType.Search);
|
|
4457
|
+
* ```
|
|
4458
|
+
* * @example
|
|
4459
|
+
* ```js
|
|
4460
|
+
* // Edit from spotter context
|
|
4461
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4462
|
+
* appEmbed.trigger(HostEvent.Edit, {
|
|
4463
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
4464
|
+
* }, ContextType.Spotter);
|
|
4465
|
+
* ```
|
|
4145
4466
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
4146
4467
|
*/
|
|
4147
4468
|
Edit = 'edit',
|
|
@@ -4159,6 +4480,20 @@ export enum HostEvent {
|
|
|
4159
4480
|
* ```js
|
|
4160
4481
|
* vizEmbed.trigger(HostEvent.CopyLink)
|
|
4161
4482
|
* ```
|
|
4483
|
+
* @example
|
|
4484
|
+
* ```js
|
|
4485
|
+
* // Copy link from liveboard context
|
|
4486
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4487
|
+
* liveboardEmbed.trigger(HostEvent.CopyLink, {}, ContextType.Liveboard);
|
|
4488
|
+
* ```
|
|
4489
|
+
* @example
|
|
4490
|
+
* ```js
|
|
4491
|
+
* // Copy link from liveboard visualization context
|
|
4492
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4493
|
+
* liveboardEmbed.trigger(HostEvent.CopyLink, {
|
|
4494
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
4495
|
+
* }, ContextType.Liveboard);
|
|
4496
|
+
* ```
|
|
4162
4497
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
4163
4498
|
*/
|
|
4164
4499
|
CopyLink = 'embedDocument',
|
|
@@ -4176,6 +4511,20 @@ export enum HostEvent {
|
|
|
4176
4511
|
* ```js
|
|
4177
4512
|
* vizEmbed.trigger(HostEvent.Present)
|
|
4178
4513
|
* ```
|
|
4514
|
+
* @example
|
|
4515
|
+
* ```js
|
|
4516
|
+
* // Present from liveboard visualization context
|
|
4517
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4518
|
+
* liveboardEmbed.trigger(HostEvent.Present, {
|
|
4519
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
4520
|
+
* }, ContextType.Liveboard);
|
|
4521
|
+
* ```
|
|
4522
|
+
* @example
|
|
4523
|
+
* ```js
|
|
4524
|
+
* // Present from liveboard context
|
|
4525
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4526
|
+
* liveboardEmbed.trigger(HostEvent.Present, {}, ContextType.Liveboard);
|
|
4527
|
+
* ```
|
|
4179
4528
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
4180
4529
|
*/
|
|
4181
4530
|
Present = 'present',
|
|
@@ -4204,6 +4553,22 @@ export enum HostEvent {
|
|
|
4204
4553
|
* tml.answer.search_query // TML representation of the search query
|
|
4205
4554
|
* );
|
|
4206
4555
|
* })
|
|
4556
|
+
* ```
|
|
4557
|
+
* @example
|
|
4558
|
+
* ```js
|
|
4559
|
+
* // Get TML from search context
|
|
4560
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4561
|
+
* appEmbed.trigger(HostEvent.GetTML, {}, ContextType.Search).then((tml) => {
|
|
4562
|
+
* console.log(tml.answer.search_query);
|
|
4563
|
+
* });
|
|
4564
|
+
* ```
|
|
4565
|
+
* @example
|
|
4566
|
+
* ```js
|
|
4567
|
+
* // Get TML from search-answer context
|
|
4568
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4569
|
+
* appEmbed.trigger(HostEvent.GetTML, {}, ContextType.Search).then((tml) => {
|
|
4570
|
+
* console.log(tml.answer);
|
|
4571
|
+
* });
|
|
4207
4572
|
* ```
|
|
4208
4573
|
* @version SDK: 1.18.0 | ThoughtSpot: 8.10.0.cl, 9.0.1.sw
|
|
4209
4574
|
* @important
|
|
@@ -4225,6 +4590,20 @@ export enum HostEvent {
|
|
|
4225
4590
|
* ```js
|
|
4226
4591
|
* searchEmbed.trigger(HostEvent.ShowUnderlyingData)
|
|
4227
4592
|
* ```
|
|
4593
|
+
* @example
|
|
4594
|
+
* ```js
|
|
4595
|
+
* // Show underlying data from liveboard visualization context
|
|
4596
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4597
|
+
* appEmbed.trigger(HostEvent.ShowUnderlyingData, {
|
|
4598
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
4599
|
+
* }, ContextType.Liveboard);
|
|
4600
|
+
* ```
|
|
4601
|
+
* @example
|
|
4602
|
+
* ```js
|
|
4603
|
+
* // Show underlying data from search context
|
|
4604
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4605
|
+
* appEmbed.trigger(HostEvent.ShowUnderlyingData, {}, ContextType.Search);
|
|
4606
|
+
* ```
|
|
4228
4607
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
4229
4608
|
*/
|
|
4230
4609
|
ShowUnderlyingData = 'showUnderlyingData',
|
|
@@ -4242,6 +4621,18 @@ export enum HostEvent {
|
|
|
4242
4621
|
* ```js
|
|
4243
4622
|
* searchEmbed.trigger(HostEvent.Delete)
|
|
4244
4623
|
* ```
|
|
4624
|
+
* @example
|
|
4625
|
+
* ```js
|
|
4626
|
+
* // Delete from liveboard context
|
|
4627
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4628
|
+
* liveboardEmbed.trigger(HostEvent.Delete, {}, ContextType.Liveboard);
|
|
4629
|
+
* ```
|
|
4630
|
+
* @example
|
|
4631
|
+
* ```js
|
|
4632
|
+
* // Delete from search context
|
|
4633
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4634
|
+
* appEmbed.trigger(HostEvent.Delete, {}, ContextType.Search);
|
|
4635
|
+
* ```
|
|
4245
4636
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
4246
4637
|
*/
|
|
4247
4638
|
Delete = 'onDeleteAnswer',
|
|
@@ -4262,6 +4653,20 @@ export enum HostEvent {
|
|
|
4262
4653
|
* ```js
|
|
4263
4654
|
* searchEmbed.trigger(HostEvent.SpotIQAnalyze)
|
|
4264
4655
|
* ```
|
|
4656
|
+
* @example
|
|
4657
|
+
* ```js
|
|
4658
|
+
* // SpotIQ analyze from search-answer context
|
|
4659
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4660
|
+
* appEmbed.trigger(HostEvent.SpotIQAnalyze, { vizId: '730496d6-6903-4601-937e-2c691821af3c' }, ContextType.Search);
|
|
4661
|
+
* ```
|
|
4662
|
+
* @example
|
|
4663
|
+
* ```js
|
|
4664
|
+
* // SpotIQ analyze from search context
|
|
4665
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4666
|
+
* liveboardEmbed.trigger(HostEvent.SpotIQAnalyze, {
|
|
4667
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
4668
|
+
* }, ContextType.Liveboard);
|
|
4669
|
+
* ```
|
|
4265
4670
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
4266
4671
|
*/
|
|
4267
4672
|
SpotIQAnalyze = 'spotIQAnalyze',
|
|
@@ -4313,9 +4718,16 @@ export enum HostEvent {
|
|
|
4313
4718
|
*
|
|
4314
4719
|
* spotterEmbed.trigger(HostEvent.DownloadAsPng, { vizId: latestSpotterVizId });
|
|
4315
4720
|
* ```
|
|
4721
|
+
* @example
|
|
4722
|
+
* ```js
|
|
4723
|
+
* // Download as PNG from search-answer context
|
|
4724
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4725
|
+
* appEmbed.trigger(HostEvent.DownloadAsPng, {}, ContextType.Search);
|
|
4726
|
+
* ```
|
|
4316
4727
|
*
|
|
4317
4728
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.1.sw
|
|
4318
4729
|
*/
|
|
4730
|
+
// eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values
|
|
4319
4731
|
DownloadAsPng = 'downloadAsPng',
|
|
4320
4732
|
/**
|
|
4321
4733
|
* Trigger the **Download** > **CSV** action on tables in
|
|
@@ -4341,6 +4753,18 @@ export enum HostEvent {
|
|
|
4341
4753
|
*
|
|
4342
4754
|
* spotterEmbed.trigger(HostEvent.DownloadAsCsv, { vizId: latestSpotterVizId });
|
|
4343
4755
|
* ```
|
|
4756
|
+
* @example
|
|
4757
|
+
* ```js
|
|
4758
|
+
* // Download as CSV from search-answer context
|
|
4759
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4760
|
+
* appEmbed.trigger(HostEvent.DownloadAsCsv, {}, ContextType.Search);
|
|
4761
|
+
* ```
|
|
4762
|
+
* @example
|
|
4763
|
+
* ```js
|
|
4764
|
+
* // Download as CSV from search context
|
|
4765
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4766
|
+
* searchEmbed.trigger(HostEvent.DownloadAsCsv, {}, ContextType.Search);
|
|
4767
|
+
* ```
|
|
4344
4768
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
4345
4769
|
*/
|
|
4346
4770
|
DownloadAsCsv = 'downloadAsCSV',
|
|
@@ -4368,6 +4792,18 @@ export enum HostEvent {
|
|
|
4368
4792
|
*
|
|
4369
4793
|
* spotterEmbed.trigger(HostEvent.DownloadAsXlsx, { vizId: latestSpotterVizId });
|
|
4370
4794
|
* ```
|
|
4795
|
+
* @example
|
|
4796
|
+
* ```js
|
|
4797
|
+
* // Download as XLSX from answer context
|
|
4798
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4799
|
+
* appEmbed.trigger(HostEvent.DownloadAsXlsx, {}, ContextType.Answer);
|
|
4800
|
+
* ```
|
|
4801
|
+
* @example
|
|
4802
|
+
* ```js
|
|
4803
|
+
* // Download as XLSX from search context
|
|
4804
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4805
|
+
* searchEmbed.trigger(HostEvent.DownloadAsXlsx, {}, ContextType.Search);
|
|
4806
|
+
* ```
|
|
4371
4807
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
4372
4808
|
*/
|
|
4373
4809
|
DownloadAsXlsx = 'downloadAsXLSX',
|
|
@@ -4381,6 +4817,18 @@ export enum HostEvent {
|
|
|
4381
4817
|
* ```js
|
|
4382
4818
|
* searchEmbed.trigger(HostEvent.Share)
|
|
4383
4819
|
* ```
|
|
4820
|
+
* @example
|
|
4821
|
+
* ```js
|
|
4822
|
+
* // Share from Liveboard context
|
|
4823
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4824
|
+
* liveboardEmbed.trigger(HostEvent.Share, {}, ContextType.Liveboard);
|
|
4825
|
+
* ```
|
|
4826
|
+
* @example
|
|
4827
|
+
* ```js
|
|
4828
|
+
* // Share from search-answer context
|
|
4829
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4830
|
+
* appEmbed.trigger(HostEvent.Share, {}, ContextType.Search);
|
|
4831
|
+
* ```
|
|
4384
4832
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
4385
4833
|
*/
|
|
4386
4834
|
Share = 'share',
|
|
@@ -4420,6 +4868,18 @@ export enum HostEvent {
|
|
|
4420
4868
|
*
|
|
4421
4869
|
* spotterEmbed.trigger(HostEvent.Save, { vizId: latestSpotterVizId });
|
|
4422
4870
|
* ```
|
|
4871
|
+
* @example
|
|
4872
|
+
* ```js
|
|
4873
|
+
* // Save from answer context
|
|
4874
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4875
|
+
* appEmbed.trigger(HostEvent.Save, {}, ContextType.Answer);
|
|
4876
|
+
* ```
|
|
4877
|
+
* @example
|
|
4878
|
+
* ```js
|
|
4879
|
+
* // Save from search context
|
|
4880
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4881
|
+
* searchEmbed.trigger(HostEvent.Save, {}, ContextType.Search);
|
|
4882
|
+
* ```
|
|
4423
4883
|
*
|
|
4424
4884
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
4425
4885
|
*/
|
|
@@ -4436,6 +4896,20 @@ export enum HostEvent {
|
|
|
4436
4896
|
* ```js
|
|
4437
4897
|
* vizEmbed.trigger(HostEvent.SyncToSheets)
|
|
4438
4898
|
* ```
|
|
4899
|
+
* @example
|
|
4900
|
+
* ```js
|
|
4901
|
+
* // Sync to sheets from answer context
|
|
4902
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4903
|
+
* appEmbed.trigger(HostEvent.SyncToSheets, {}, ContextType.Answer);
|
|
4904
|
+
* ```
|
|
4905
|
+
* @example
|
|
4906
|
+
* ```js
|
|
4907
|
+
* // Sync to sheets from liveboard context
|
|
4908
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4909
|
+
* liveboardEmbed.trigger(HostEvent.SyncToSheets, {
|
|
4910
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
4911
|
+
* }, ContextType.Liveboard);
|
|
4912
|
+
* ```
|
|
4439
4913
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
4440
4914
|
*/
|
|
4441
4915
|
SyncToSheets = 'sync-to-sheets',
|
|
@@ -4452,6 +4926,20 @@ export enum HostEvent {
|
|
|
4452
4926
|
* ```js
|
|
4453
4927
|
* vizEmbed.trigger(HostEvent.SyncToOtherApps)
|
|
4454
4928
|
* ```
|
|
4929
|
+
* @example
|
|
4930
|
+
* ```js
|
|
4931
|
+
* // Sync to other apps from answer context
|
|
4932
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4933
|
+
* appEmbed.trigger(HostEvent.SyncToOtherApps, {}, ContextType.Answer);
|
|
4934
|
+
* ```
|
|
4935
|
+
* @example
|
|
4936
|
+
* ```js
|
|
4937
|
+
* // Sync to other apps from liveboard context
|
|
4938
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4939
|
+
* liveboardEmbed.trigger(HostEvent.SyncToOtherApps, {
|
|
4940
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
4941
|
+
* }, ContextType.Liveboard);
|
|
4942
|
+
* ```
|
|
4455
4943
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
4456
4944
|
*/
|
|
4457
4945
|
SyncToOtherApps = 'sync-to-other-apps',
|
|
@@ -4468,6 +4956,20 @@ export enum HostEvent {
|
|
|
4468
4956
|
* ```js
|
|
4469
4957
|
* vizEmbed.trigger(HostEvent.ManagePipelines)
|
|
4470
4958
|
* ```
|
|
4959
|
+
* @example
|
|
4960
|
+
* ```js
|
|
4961
|
+
* // Manage pipelines from answer context
|
|
4962
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4963
|
+
* appEmbed.trigger(HostEvent.ManagePipelines, {}, ContextType.Answer);
|
|
4964
|
+
* ```
|
|
4965
|
+
* @example
|
|
4966
|
+
* ```js
|
|
4967
|
+
* // Manage pipelines from liveboard context
|
|
4968
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4969
|
+
* liveboardEmbed.trigger(HostEvent.ManagePipelines, {
|
|
4970
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
4971
|
+
* }, ContextType.Liveboard);
|
|
4972
|
+
* ```
|
|
4471
4973
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
4472
4974
|
*/
|
|
4473
4975
|
ManagePipelines = 'manage-pipeline',
|
|
@@ -4480,6 +4982,12 @@ export enum HostEvent {
|
|
|
4480
4982
|
* ```js
|
|
4481
4983
|
* appEmbed.trigger(HostEvent.ResetSearch)
|
|
4482
4984
|
* ```
|
|
4985
|
+
* @example
|
|
4986
|
+
* ```js
|
|
4987
|
+
* // Reset search from search context
|
|
4988
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4989
|
+
* searchEmbed.trigger(HostEvent.ResetSearch, {}, ContextType.Search);
|
|
4990
|
+
* ```
|
|
4483
4991
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.0.1.sw
|
|
4484
4992
|
*/
|
|
4485
4993
|
ResetSearch = 'resetSearch',
|
|
@@ -4491,6 +4999,13 @@ export enum HostEvent {
|
|
|
4491
4999
|
* const data = await liveboardEmbed.trigger(HostEvent.GetFilters);
|
|
4492
5000
|
* console.log('data', data);
|
|
4493
5001
|
* ```
|
|
5002
|
+
* @example
|
|
5003
|
+
* ```js
|
|
5004
|
+
* // Get filters from liveboard context
|
|
5005
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5006
|
+
* const data = await liveboardEmbed.trigger(HostEvent.GetFilters, {}, ContextType.Liveboard);
|
|
5007
|
+
* console.log('filters', data);
|
|
5008
|
+
* ```
|
|
4494
5009
|
* @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
|
|
4495
5010
|
*/
|
|
4496
5011
|
GetFilters = 'getFilters',
|
|
@@ -4498,7 +5013,8 @@ export enum HostEvent {
|
|
|
4498
5013
|
* Update one or several filters applied on a Liveboard.
|
|
4499
5014
|
* @param - Includes the following keys:
|
|
4500
5015
|
* - `filter`: A single filter object containing column name, filter operator, and
|
|
4501
|
-
* values.
|
|
5016
|
+
* values.
|
|
5017
|
+
* - `filters`: Multiple filter objects with column name, filter operator,
|
|
4502
5018
|
* and values for each.
|
|
4503
5019
|
*
|
|
4504
5020
|
* Each filter object must include the following attributes:
|
|
@@ -4581,6 +5097,18 @@ export enum HostEvent {
|
|
|
4581
5097
|
* }]
|
|
4582
5098
|
* });
|
|
4583
5099
|
* ```
|
|
5100
|
+
* @example
|
|
5101
|
+
* ```js
|
|
5102
|
+
* // Update filters from liveboard context
|
|
5103
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5104
|
+
* liveboardEmbed.trigger(HostEvent.UpdateFilters, {
|
|
5105
|
+
* filter: {
|
|
5106
|
+
* column: "item type",
|
|
5107
|
+
* oper: "IN",
|
|
5108
|
+
* values: ["shoes", "boots"]
|
|
5109
|
+
* }
|
|
5110
|
+
* }, ContextType.Liveboard);
|
|
5111
|
+
* ```
|
|
4584
5112
|
* @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
|
|
4585
5113
|
*/
|
|
4586
5114
|
UpdateFilters = 'updateFilters',
|
|
@@ -4594,6 +5122,14 @@ export enum HostEvent {
|
|
|
4594
5122
|
* );
|
|
4595
5123
|
* })
|
|
4596
5124
|
* ```
|
|
5125
|
+
* @example
|
|
5126
|
+
* ```js
|
|
5127
|
+
* // Get tabs from liveboard context
|
|
5128
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5129
|
+
* liveboardEmbed.trigger(HostEvent.GetTabs, {}, ContextType.Liveboard).then((tabDetails) => {
|
|
5130
|
+
* console.log('tabs', tabDetails);
|
|
5131
|
+
* });
|
|
5132
|
+
* ```
|
|
4597
5133
|
* @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl
|
|
4598
5134
|
*/
|
|
4599
5135
|
GetTabs = 'getTabs',
|
|
@@ -4607,6 +5143,15 @@ export enum HostEvent {
|
|
|
4607
5143
|
* '430496d6-6903-4601-937e-2c691821af3c',
|
|
4608
5144
|
* 'f547ec54-2a37-4516-a222-2b06719af726'])
|
|
4609
5145
|
* ```
|
|
5146
|
+
* @example
|
|
5147
|
+
* ```js
|
|
5148
|
+
* // Set visible tabs from liveboard context
|
|
5149
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5150
|
+
* liveboardEmbed.trigger(HostEvent.SetVisibleTabs, [
|
|
5151
|
+
* '430496d6-6903-4601-937e-2c691821af3c',
|
|
5152
|
+
* 'f547ec54-2a37-4516-a222-2b06719af726'
|
|
5153
|
+
* ], ContextType.Liveboard);
|
|
5154
|
+
* ```
|
|
4610
5155
|
* @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
|
|
4611
5156
|
*/
|
|
4612
5157
|
SetVisibleTabs = 'SetPinboardVisibleTabs',
|
|
@@ -4620,6 +5165,15 @@ export enum HostEvent {
|
|
|
4620
5165
|
* '630496d6-6903-4601-937e-2c691821af3c',
|
|
4621
5166
|
* 'i547ec54-2a37-4516-a222-2b06719af726'])
|
|
4622
5167
|
* ```
|
|
5168
|
+
* @example
|
|
5169
|
+
* ```js
|
|
5170
|
+
* // Set hidden tabs from liveboard context
|
|
5171
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5172
|
+
* liveboardEmbed.trigger(HostEvent.SetHiddenTabs, [
|
|
5173
|
+
* '630496d6-6903-4601-937e-2c691821af3c',
|
|
5174
|
+
* 'i547ec54-2a37-4516-a222-2b06719af726'
|
|
5175
|
+
* ], ContextType.Liveboard);
|
|
5176
|
+
* ```
|
|
4623
5177
|
* @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
|
|
4624
5178
|
*/
|
|
4625
5179
|
SetHiddenTabs = 'SetPinboardHiddenTabs',
|
|
@@ -4696,13 +5250,24 @@ export enum HostEvent {
|
|
|
4696
5250
|
UpdateCrossFilter = 'UpdateCrossFilter',
|
|
4697
5251
|
/**
|
|
4698
5252
|
* Trigger reset action for a personalized Liveboard view.
|
|
5253
|
+
* This event is deprecated. Use {@link HostEvent.ResetLiveboardPersonalizedView} instead.
|
|
4699
5254
|
* @example
|
|
4700
5255
|
* ```js
|
|
4701
5256
|
* liveboardEmbed.trigger(HostEvent.ResetLiveboardPersonalisedView);
|
|
4702
5257
|
* ```
|
|
4703
5258
|
* @version SDK: 1.29.0 | ThoughtSpot Cloud: 10.1.0.cl, 10.1.0.sw
|
|
5259
|
+
* @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
4704
5260
|
*/
|
|
4705
5261
|
ResetLiveboardPersonalisedView = 'ResetLiveboardPersonalisedView',
|
|
5262
|
+
/**
|
|
5263
|
+
* Trigger reset action for a personalized Liveboard view.
|
|
5264
|
+
* @example
|
|
5265
|
+
* ```js
|
|
5266
|
+
* liveboardEmbed.trigger(HostEvent.ResetLiveboardPersonalizedView);
|
|
5267
|
+
* ```
|
|
5268
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
5269
|
+
*/
|
|
5270
|
+
ResetLiveboardPersonalizedView = ResetLiveboardPersonalisedView,
|
|
4706
5271
|
/**
|
|
4707
5272
|
* Triggers an action to update Parameter values on embedded
|
|
4708
5273
|
* Answers, Liveboard, and Spotter answer in Edit mode.
|
|
@@ -4719,6 +5284,16 @@ export enum HostEvent {
|
|
|
4719
5284
|
* isVisibleToUser: false
|
|
4720
5285
|
* }])
|
|
4721
5286
|
* ```
|
|
5287
|
+
* @example
|
|
5288
|
+
* ```js
|
|
5289
|
+
* // Update parameters from liveboard context
|
|
5290
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5291
|
+
* liveboardEmbed.trigger(HostEvent.UpdateParameters, [{
|
|
5292
|
+
* name: "Region Param",
|
|
5293
|
+
* value: "West",
|
|
5294
|
+
* isVisibleToUser: true
|
|
5295
|
+
* }], ContextType.Liveboard);
|
|
5296
|
+
* ```
|
|
4722
5297
|
* @version SDK: 1.29.0 | ThoughtSpot: 10.1.0.cl, 10.1.0.sw
|
|
4723
5298
|
*/
|
|
4724
5299
|
UpdateParameters = 'UpdateParameters',
|
|
@@ -4738,18 +5313,77 @@ export enum HostEvent {
|
|
|
4738
5313
|
* });
|
|
4739
5314
|
*
|
|
4740
5315
|
* spotterEmbed.trigger(HostEvent.GetParameters, { vizId: latestSpotterVizId });
|
|
5316
|
+
*```
|
|
5317
|
+
* @example
|
|
5318
|
+
* ```js
|
|
5319
|
+
* // Get parameters from liveboard context
|
|
5320
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5321
|
+
* liveboardEmbed.trigger(HostEvent.GetParameters, {}, ContextType.Liveboard).then((parameters) => {
|
|
5322
|
+
* console.log('parameters', parameters);
|
|
5323
|
+
* });
|
|
4741
5324
|
* ```
|
|
4742
5325
|
* @version SDK: 1.29.0 | ThoughtSpot: 10.1.0.cl, 10.1.0.sw
|
|
4743
5326
|
*/
|
|
4744
5327
|
GetParameters = 'GetParameters',
|
|
4745
5328
|
/**
|
|
4746
5329
|
* Triggers an event to update a personalized view of a Liveboard.
|
|
5330
|
+
* This event is deprecated. Use {@link HostEvent.UpdatePersonalizedView} instead.
|
|
4747
5331
|
* ```js
|
|
4748
5332
|
* liveboardEmbed.trigger(HostEvent.UpdatePersonalisedView, {viewId: '1234'})
|
|
4749
5333
|
* ```
|
|
5334
|
+
* @example
|
|
5335
|
+
* ```js
|
|
5336
|
+
* // Update personalized view from liveboard context
|
|
5337
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5338
|
+
* liveboardEmbed.trigger(HostEvent.UpdatePersonalisedView, {
|
|
5339
|
+
* viewId: '1234'
|
|
5340
|
+
* }, ContextType.Liveboard);
|
|
5341
|
+
* ```
|
|
4750
5342
|
* @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
|
|
5343
|
+
* @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
4751
5344
|
*/
|
|
4752
5345
|
UpdatePersonalisedView = 'UpdatePersonalisedView',
|
|
5346
|
+
/**
|
|
5347
|
+
* Triggers an event to update a personalized view of a Liveboard.
|
|
5348
|
+
* ```js
|
|
5349
|
+
* liveboardEmbed.trigger(HostEvent.UpdatePersonalisedView, {viewId: '1234'})
|
|
5350
|
+
* ```
|
|
5351
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
5352
|
+
*/
|
|
5353
|
+
UpdatePersonalizedView = UpdatePersonalisedView,
|
|
5354
|
+
/**
|
|
5355
|
+
* Triggers selection of a specific Personalized View on a
|
|
5356
|
+
* Liveboard without reloading the embed. Pass either a
|
|
5357
|
+
* `viewId` (GUID) or `viewName`. If both are provided, `viewId` takes precedence.
|
|
5358
|
+
* If neither is provided, the Liveboard resets to the original/default view.
|
|
5359
|
+
* When a `viewName` is provided and multiple views share
|
|
5360
|
+
* the same name, the first match is selected.
|
|
5361
|
+
* @example
|
|
5362
|
+
* ```js
|
|
5363
|
+
* liveboardEmbed.trigger(
|
|
5364
|
+
* HostEvent.SelectPersonalizedView,
|
|
5365
|
+
* { viewId: '2a021a12-1aed-425d-984b-141ee916ce72' },
|
|
5366
|
+
* )
|
|
5367
|
+
* ```
|
|
5368
|
+
* @example
|
|
5369
|
+
* ```js
|
|
5370
|
+
* // Select by name
|
|
5371
|
+
* liveboardEmbed.trigger(
|
|
5372
|
+
* HostEvent.SelectPersonalizedView,
|
|
5373
|
+
* { viewName: 'Dr Smith Cardiology' },
|
|
5374
|
+
* )
|
|
5375
|
+
* ```
|
|
5376
|
+
* @example
|
|
5377
|
+
* ```js
|
|
5378
|
+
* // Reset to default view
|
|
5379
|
+
* liveboardEmbed.trigger(
|
|
5380
|
+
* HostEvent.SelectPersonalizedView,
|
|
5381
|
+
* {},
|
|
5382
|
+
* )
|
|
5383
|
+
* ```
|
|
5384
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
5385
|
+
*/
|
|
5386
|
+
SelectPersonalizedView = 'SelectPersonalisedView',
|
|
4753
5387
|
/**
|
|
4754
5388
|
* @hidden
|
|
4755
5389
|
* Notify when info call is completed successfully
|
|
@@ -4769,7 +5403,8 @@ export enum HostEvent {
|
|
|
4769
5403
|
* add a name and description for the Answer.
|
|
4770
5404
|
* @param - Includes the following keys:
|
|
4771
5405
|
* - `vizId`: Refers to the Answer ID in Spotter embed and is **required** in Spotter
|
|
4772
|
-
* embed.
|
|
5406
|
+
* embed.
|
|
5407
|
+
* - `name`: Optional. Name string for the Answer.
|
|
4773
5408
|
* - `description`: Optional. Description text for the Answer.
|
|
4774
5409
|
* @example
|
|
4775
5410
|
* ```js
|
|
@@ -4788,6 +5423,34 @@ export enum HostEvent {
|
|
|
4788
5423
|
*
|
|
4789
5424
|
* spotterEmbed.trigger(HostEvent.SaveAnswer, { vizId: latestSpotterVizId });
|
|
4790
5425
|
* ```
|
|
5426
|
+
* @example
|
|
5427
|
+
* ```js
|
|
5428
|
+
* // Using context parameter to save answer from search context
|
|
5429
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5430
|
+
* const saveAnswerResponse = await appEmbed.trigger(HostEvent.SaveAnswer, {
|
|
5431
|
+
* name: "Regional sales analysis",
|
|
5432
|
+
* description: "Sales breakdown by region"
|
|
5433
|
+
* }, ContextType.Search);
|
|
5434
|
+
* ```
|
|
5435
|
+
* @example
|
|
5436
|
+
* ```js
|
|
5437
|
+
* // Save answer from answer context (explore modal)
|
|
5438
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5439
|
+
* const saveAnswerResponse = await appEmbed.trigger(HostEvent.SaveAnswer, {
|
|
5440
|
+
* name: "Modified analysis",
|
|
5441
|
+
* description: "Updated from explore view"
|
|
5442
|
+
* }, ContextType.Answer);
|
|
5443
|
+
* ```
|
|
5444
|
+
* @example
|
|
5445
|
+
* ```js
|
|
5446
|
+
* // Save answer from spotter context
|
|
5447
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5448
|
+
* const saveAnswerResponse = await appEmbed.trigger(HostEvent.SaveAnswer, {
|
|
5449
|
+
* vizId: latestSpotterVizId,
|
|
5450
|
+
* name: "AI insights",
|
|
5451
|
+
* description: "Generated from Spotter"
|
|
5452
|
+
* }, ContextType.Spotter);
|
|
5453
|
+
* ```
|
|
4791
5454
|
* @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
|
|
4792
5455
|
*/
|
|
4793
5456
|
SaveAnswer = 'saveAnswer',
|
|
@@ -4829,6 +5492,15 @@ export enum HostEvent {
|
|
|
4829
5492
|
* executeSearch: true,
|
|
4830
5493
|
* })
|
|
4831
5494
|
* ```
|
|
5495
|
+
* @example
|
|
5496
|
+
* ```js
|
|
5497
|
+
* // Spotter search from spotter context
|
|
5498
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5499
|
+
* spotterEmbed.trigger(HostEvent.SpotterSearch, {
|
|
5500
|
+
* query: 'sales by region',
|
|
5501
|
+
* executeSearch: true
|
|
5502
|
+
* }, ContextType.Spotter);
|
|
5503
|
+
* ```
|
|
4832
5504
|
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
4833
5505
|
*/
|
|
4834
5506
|
SpotterSearch = 'SpotterSearch',
|
|
@@ -4839,6 +5511,12 @@ export enum HostEvent {
|
|
|
4839
5511
|
* ```js
|
|
4840
5512
|
* spotterEmbed.trigger(HostEvent.EditLastPrompt, "revenue per year");
|
|
4841
5513
|
* ```
|
|
5514
|
+
* @example
|
|
5515
|
+
* ```js
|
|
5516
|
+
* // Edit last prompt from spotter context
|
|
5517
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5518
|
+
* spotterEmbed.trigger(HostEvent.EditLastPrompt, "sales by region", ContextType.Spotter);
|
|
5519
|
+
* ```
|
|
4842
5520
|
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
4843
5521
|
*/
|
|
4844
5522
|
EditLastPrompt = 'EditLastPrompt',
|
|
@@ -4848,6 +5526,12 @@ export enum HostEvent {
|
|
|
4848
5526
|
* ```js
|
|
4849
5527
|
* spotterEmbed.trigger(HostEvent.PreviewSpotterData);
|
|
4850
5528
|
* ```
|
|
5529
|
+
* @example
|
|
5530
|
+
* ```js
|
|
5531
|
+
* // Preview spotter data from spotter context
|
|
5532
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5533
|
+
* spotterEmbed.trigger(HostEvent.PreviewSpotterData, {}, ContextType.Spotter);
|
|
5534
|
+
* ```
|
|
4851
5535
|
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
4852
5536
|
*/
|
|
4853
5537
|
PreviewSpotterData = 'PreviewSpotterData',
|
|
@@ -5611,6 +6295,7 @@ export enum Action {
|
|
|
5611
6295
|
* disabledActions: [Action.LiveboardInfo]
|
|
5612
6296
|
* ```
|
|
5613
6297
|
*/
|
|
6298
|
+
// eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values
|
|
5614
6299
|
LiveboardInfo = 'pinboardInfo',
|
|
5615
6300
|
/**
|
|
5616
6301
|
* @hidden
|
|
@@ -5641,6 +6326,7 @@ export enum Action {
|
|
|
5641
6326
|
* disabledActions: [Action.Subscription]
|
|
5642
6327
|
* ```
|
|
5643
6328
|
*/
|
|
6329
|
+
// eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values
|
|
5644
6330
|
Subscription = 'subscription',
|
|
5645
6331
|
/**
|
|
5646
6332
|
* The **Explore** action on Liveboard visualizations
|
|
@@ -6121,13 +6807,25 @@ export enum Action {
|
|
|
6121
6807
|
/**
|
|
6122
6808
|
* The Liveboard Personalised Views dropdown.
|
|
6123
6809
|
* Allows navigating to a personalized Liveboard View.
|
|
6810
|
+
* This action is deprecated. Use {@link Action.PersonalizedViewsDropdown} instead.
|
|
6124
6811
|
* @example
|
|
6125
6812
|
* ```js
|
|
6126
6813
|
* disabledActions: [Action.PersonalisedViewsDropdown]
|
|
6127
6814
|
* ```
|
|
6128
6815
|
* @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 10.1.0.sw
|
|
6816
|
+
* @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
6129
6817
|
*/
|
|
6130
6818
|
PersonalisedViewsDropdown = 'personalisedViewsDropdown',
|
|
6819
|
+
/**
|
|
6820
|
+
* The Liveboard Personalized Views dropdown.
|
|
6821
|
+
* Allows navigating to a personalized Liveboard View.
|
|
6822
|
+
* @example
|
|
6823
|
+
* ```js
|
|
6824
|
+
* disabledActions: [Action.PersonalizedViewsDropdown]
|
|
6825
|
+
* ```
|
|
6826
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
6827
|
+
*/
|
|
6828
|
+
PersonalizedViewsDropdown = PersonalisedViewsDropdown,
|
|
6131
6829
|
/**
|
|
6132
6830
|
* Action ID for show or hide the user details on a
|
|
6133
6831
|
* Liveboard (Recently visited / social proof)
|
|
@@ -6220,15 +6918,29 @@ export enum Action {
|
|
|
6220
6918
|
/**
|
|
6221
6919
|
* The **Organize Favourites** action on Homepage
|
|
6222
6920
|
* *Favorites* module.
|
|
6921
|
+
* This action is deprecated. Use {@link Action.OrganizeFavorites} instead.
|
|
6223
6922
|
*
|
|
6224
6923
|
* @example
|
|
6225
6924
|
* ```js
|
|
6226
6925
|
* disabledActions: [Action.OrganiseFavourites]
|
|
6227
6926
|
* ```
|
|
6228
6927
|
* @version SDK: 1.32.0 | ThoughtSpot: 10.0.0.cl
|
|
6928
|
+
* @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
6229
6929
|
*/
|
|
6230
6930
|
OrganiseFavourites = 'organiseFavourites',
|
|
6231
6931
|
|
|
6932
|
+
/**
|
|
6933
|
+
* The **Organize Favorites** action on Homepage
|
|
6934
|
+
* *Favorites* module.
|
|
6935
|
+
*
|
|
6936
|
+
* @example
|
|
6937
|
+
* ```js
|
|
6938
|
+
* disabledActions: [Action.OrganizeFavorites]
|
|
6939
|
+
* ```
|
|
6940
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
6941
|
+
*/
|
|
6942
|
+
OrganizeFavorites = OrganiseFavourites,
|
|
6943
|
+
|
|
6232
6944
|
/**
|
|
6233
6945
|
* The **AI Highlights** action on a Liveboard.
|
|
6234
6946
|
*
|
|
@@ -7084,7 +7796,8 @@ export enum EmbedErrorCodes {
|
|
|
7084
7796
|
*
|
|
7085
7797
|
* - **errorType**: One of the predefined {@link ErrorDetailsTypes} values
|
|
7086
7798
|
* - **message**: Human-readable error description (string or array of strings for
|
|
7087
|
-
* multiple errors)
|
|
7799
|
+
* multiple errors)
|
|
7800
|
+
* - **code**: Machine-readable error identifier {@link EmbedErrorCodes}
|
|
7088
7801
|
* values
|
|
7089
7802
|
* - **[key: string]**: Additional context-specific for backward compatibility
|
|
7090
7803
|
*
|
|
@@ -7133,6 +7846,22 @@ export interface EmbedErrorDetailsEvent {
|
|
|
7133
7846
|
[key: string]: any;
|
|
7134
7847
|
}
|
|
7135
7848
|
|
|
7849
|
+
/**
|
|
7850
|
+
* Context types for specifying the page context when triggering host events.
|
|
7851
|
+
* Used as the third parameter in the `trigger` method to help ThoughtSpot
|
|
7852
|
+
* understand the current page context for better event handling.
|
|
7853
|
+
*
|
|
7854
|
+
* @example
|
|
7855
|
+
* ```js
|
|
7856
|
+
* import { HostEvent, ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
7857
|
+
*
|
|
7858
|
+
* // Trigger an event with specific context
|
|
7859
|
+
* embed.trigger(HostEvent.Pin, { vizId: "123", liveboardId: "456" }, ContextType.Search);
|
|
7860
|
+
* ```
|
|
7861
|
+
*
|
|
7862
|
+
* @version SDK: 1.45.2 | ThoughtSpot: 26.3.0.cl
|
|
7863
|
+
* @group Events
|
|
7864
|
+
*/
|
|
7136
7865
|
export enum ContextType {
|
|
7137
7866
|
/**
|
|
7138
7867
|
* Search answer context for search page or edit viz dialog on liveboard page.
|
|
@@ -7150,6 +7879,11 @@ export enum ContextType {
|
|
|
7150
7879
|
* Spotter context for spotter modal/page.
|
|
7151
7880
|
*/
|
|
7152
7881
|
Spotter = 'spotter',
|
|
7882
|
+
|
|
7883
|
+
/**
|
|
7884
|
+
* Other context for any other generic page.
|
|
7885
|
+
*/
|
|
7886
|
+
Other = 'other',
|
|
7153
7887
|
}
|
|
7154
7888
|
|
|
7155
7889
|
export interface DefaultAppInitData {
|
|
@@ -7257,33 +7991,7 @@ export interface ObjectIds {
|
|
|
7257
7991
|
modalTitle?: string;
|
|
7258
7992
|
}
|
|
7259
7993
|
|
|
7260
|
-
|
|
7261
|
-
* Context object for the embedded component.
|
|
7262
|
-
* @example
|
|
7263
|
-
* ```js
|
|
7264
|
-
* const context = await embed.getCurrentContext();
|
|
7265
|
-
* console.log(context);
|
|
7266
|
-
* {
|
|
7267
|
-
* stack: [
|
|
7268
|
-
* {
|
|
7269
|
-
* name: 'Liveboard',
|
|
7270
|
-
* type: ContextType.Liveboard,
|
|
7271
|
-
* objectIds: {
|
|
7272
|
-
* liveboardId: '123',
|
|
7273
|
-
* },
|
|
7274
|
-
* },
|
|
7275
|
-
* ],
|
|
7276
|
-
* currentContext: {
|
|
7277
|
-
* name: 'Liveboard',
|
|
7278
|
-
* type: ContextType.Liveboard,
|
|
7279
|
-
* objectIds: {
|
|
7280
|
-
* liveboardId: '123',
|
|
7281
|
-
* },
|
|
7282
|
-
* },
|
|
7283
|
-
* }
|
|
7284
|
-
* ```
|
|
7285
|
-
* @version SDK: 1.45.2 | ThoughtSpot: 26.3.0.cl
|
|
7286
|
-
*/
|
|
7994
|
+
|
|
7287
7995
|
export interface ContextObject {
|
|
7288
7996
|
/**
|
|
7289
7997
|
* Stack of context objects.
|