@thoughtspot/visual-embed-sdk 1.42.1-alpha.6 → 1.42.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 +3 -2
- package/cjs/src/embed/app.d.ts +20 -0
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +5 -4
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/app.spec.js +32 -0
- package/cjs/src/embed/app.spec.js.map +1 -1
- package/cjs/src/embed/hostEventClient/contracts.d.ts +1 -11
- package/cjs/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/cjs/src/embed/hostEventClient/contracts.js +0 -1
- package/cjs/src/embed/hostEventClient/contracts.js.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.d.ts +3 -3
- package/cjs/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.js +6 -6
- package/cjs/src/embed/hostEventClient/host-event-client.js.map +1 -1
- package/cjs/src/embed/search.d.ts.map +1 -1
- package/cjs/src/embed/search.js +1 -3
- package/cjs/src/embed/search.js.map +1 -1
- package/cjs/src/embed/ts-embed.d.ts +1 -3
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +16 -44
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/embed/ts-embed.spec.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 +1 -2
- package/cjs/src/index.js.map +1 -1
- package/cjs/src/react/all-types-export.d.ts +1 -1
- package/cjs/src/react/all-types-export.d.ts.map +1 -1
- package/cjs/src/react/all-types-export.js +1 -2
- package/cjs/src/react/all-types-export.js.map +1 -1
- package/cjs/src/react/util.d.ts +1 -0
- package/cjs/src/react/util.d.ts.map +1 -1
- package/cjs/src/types.d.ts +105 -143
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +103 -98
- package/cjs/src/types.js.map +1 -1
- package/cjs/src/utils/processData.d.ts +1 -1
- package/cjs/src/utils/processData.d.ts.map +1 -1
- package/cjs/src/utils/processData.js +8 -8
- package/cjs/src/utils/processData.js.map +1 -1
- package/cjs/src/utils/processData.spec.js.map +1 -1
- package/cjs/src/utils/processTrigger.d.ts +2 -1
- package/cjs/src/utils/processTrigger.d.ts.map +1 -1
- package/cjs/src/utils/processTrigger.js +4 -2
- package/cjs/src/utils/processTrigger.js.map +1 -1
- package/dist/{index-DvNA626T.js → index-CWQnMX2L.js} +1 -1
- package/dist/src/embed/app.d.ts +20 -0
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/hostEventClient/contracts.d.ts +1 -11
- package/dist/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/dist/src/embed/hostEventClient/host-event-client.d.ts +3 -3
- package/dist/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/dist/src/embed/search.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.d.ts +1 -3
- package/dist/src/embed/ts-embed.d.ts.map +1 -1
- package/dist/src/index.d.ts +2 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/react/all-types-export.d.ts +1 -1
- package/dist/src/react/all-types-export.d.ts.map +1 -1
- package/dist/src/react/util.d.ts +1 -0
- package/dist/src/react/util.d.ts.map +1 -1
- package/dist/src/types.d.ts +105 -143
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/processData.d.ts +1 -1
- package/dist/src/utils/processData.d.ts.map +1 -1
- package/dist/src/utils/processTrigger.d.ts +2 -1
- package/dist/src/utils/processTrigger.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +155 -277
- package/dist/tsembed-react.js +299 -497
- package/dist/tsembed.es.js +156 -278
- package/dist/tsembed.js +299 -497
- package/dist/visual-embed-sdk-react-full.d.ts +129 -160
- package/dist/visual-embed-sdk-react.d.ts +129 -157
- package/dist/visual-embed-sdk.d.ts +129 -160
- package/lib/package.json +3 -2
- package/lib/src/embed/app.d.ts +20 -0
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +5 -4
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/app.spec.js +32 -0
- package/lib/src/embed/app.spec.js.map +1 -1
- package/lib/src/embed/hostEventClient/contracts.d.ts +1 -11
- package/lib/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/lib/src/embed/hostEventClient/contracts.js +0 -1
- package/lib/src/embed/hostEventClient/contracts.js.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.d.ts +3 -3
- package/lib/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.js +6 -6
- package/lib/src/embed/hostEventClient/host-event-client.js.map +1 -1
- package/lib/src/embed/search.d.ts.map +1 -1
- package/lib/src/embed/search.js +1 -3
- package/lib/src/embed/search.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts +1 -3
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +16 -44
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/embed/ts-embed.spec.js.map +1 -1
- package/lib/src/index.d.ts +2 -2
- package/lib/src/index.d.ts.map +1 -1
- package/lib/src/index.js +2 -2
- package/lib/src/index.js.map +1 -1
- package/lib/src/react/all-types-export.d.ts +1 -1
- package/lib/src/react/all-types-export.d.ts.map +1 -1
- package/lib/src/react/all-types-export.js +1 -1
- package/lib/src/react/all-types-export.js.map +1 -1
- package/lib/src/react/util.d.ts +1 -0
- package/lib/src/react/util.d.ts.map +1 -1
- package/lib/src/types.d.ts +105 -143
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +102 -97
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils/processData.d.ts +1 -1
- package/lib/src/utils/processData.d.ts.map +1 -1
- package/lib/src/utils/processData.js +8 -8
- package/lib/src/utils/processData.js.map +1 -1
- package/lib/src/utils/processData.spec.js.map +1 -1
- package/lib/src/utils/processTrigger.d.ts +2 -1
- package/lib/src/utils/processTrigger.d.ts.map +1 -1
- package/lib/src/utils/processTrigger.js +4 -2
- package/lib/src/utils/processTrigger.js.map +1 -1
- package/package.json +3 -2
- package/src/embed/app.spec.ts +45 -0
- package/src/embed/app.ts +26 -4
- package/src/embed/hostEventClient/contracts.ts +0 -10
- package/src/embed/hostEventClient/host-event-client.ts +7 -3
- package/src/embed/search.ts +1 -3
- package/src/embed/ts-embed.spec.ts +7 -7
- package/src/embed/ts-embed.ts +33 -68
- package/src/index.ts +0 -2
- package/src/react/all-types-export.ts +0 -1
- package/src/types.ts +104 -145
- package/src/utils/processData.spec.ts +1 -0
- package/src/utils/processData.ts +11 -11
- package/src/utils/processTrigger.ts +5 -2
- package/cjs/src/api-intercept.d.ts +0 -31
- package/cjs/src/api-intercept.d.ts.map +0 -1
- package/cjs/src/api-intercept.js +0 -117
- package/cjs/src/api-intercept.js.map +0 -1
- package/cjs/src/api-intercept.spec.d.ts +0 -2
- package/cjs/src/api-intercept.spec.d.ts.map +0 -1
- package/cjs/src/api-intercept.spec.js +0 -122
- package/cjs/src/api-intercept.spec.js.map +0 -1
- package/dist/index-BCC3Z072.js +0 -7371
- package/dist/index-BEzW4MDA.js +0 -7371
- package/dist/index-BaESA9rq.js +0 -7371
- package/dist/index-CFNZIcKr.js +0 -7447
- package/dist/index-DFnPKcjZ.js +0 -7447
- package/dist/index-DhFH7b7U.js +0 -7447
- package/dist/src/api-intercept.d.ts +0 -31
- package/dist/src/api-intercept.d.ts.map +0 -1
- package/dist/src/api-intercept.spec.d.ts +0 -2
- package/dist/src/api-intercept.spec.d.ts.map +0 -1
- package/lib/src/api-intercept.d.ts +0 -31
- package/lib/src/api-intercept.d.ts.map +0 -1
- package/lib/src/api-intercept.js +0 -110
- package/lib/src/api-intercept.js.map +0 -1
- package/lib/src/api-intercept.spec.d.ts +0 -2
- package/lib/src/api-intercept.spec.d.ts.map +0 -1
- package/lib/src/api-intercept.spec.js +0 -119
- package/lib/src/api-intercept.spec.js.map +0 -1
- package/src/api-intercept.ts +0 -136
|
@@ -1201,7 +1201,7 @@ export interface CustomisationsInterface {
|
|
|
1201
1201
|
* if a trusted authentication server is used.
|
|
1202
1202
|
* @group Authentication / Init
|
|
1203
1203
|
*/
|
|
1204
|
-
export interface EmbedConfig
|
|
1204
|
+
export interface EmbedConfig {
|
|
1205
1205
|
/**
|
|
1206
1206
|
* The ThoughtSpot cluster hostname or IP address.
|
|
1207
1207
|
*/
|
|
@@ -1574,7 +1574,7 @@ export interface FrameParams {
|
|
|
1574
1574
|
/**
|
|
1575
1575
|
* The common configuration object for an embedded view.
|
|
1576
1576
|
*/
|
|
1577
|
-
export interface BaseViewConfig
|
|
1577
|
+
export interface BaseViewConfig {
|
|
1578
1578
|
/**
|
|
1579
1579
|
* @hidden
|
|
1580
1580
|
*/
|
|
@@ -2632,7 +2632,7 @@ export declare enum EmbedEvent {
|
|
|
2632
2632
|
*/
|
|
2633
2633
|
Load = "load",
|
|
2634
2634
|
/**
|
|
2635
|
-
* Data pertaining to an Answer or
|
|
2635
|
+
* Data pertaining to an Answer, Liveboard or Spotter visualization is received.
|
|
2636
2636
|
* The event payload includes the raw data of the object.
|
|
2637
2637
|
* @return data - Answer of Liveboard data
|
|
2638
2638
|
* @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
|
|
@@ -3714,22 +3714,7 @@ export declare enum EmbedEvent {
|
|
|
3714
3714
|
* ```
|
|
3715
3715
|
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
3716
3716
|
*/
|
|
3717
|
-
OrgSwitched = "orgSwitched"
|
|
3718
|
-
/**
|
|
3719
|
-
* Emitted when the user intercepts a URL.
|
|
3720
|
-
*
|
|
3721
|
-
* Supported on all embed types.
|
|
3722
|
-
*
|
|
3723
|
-
* @example
|
|
3724
|
-
* ```js
|
|
3725
|
-
* embed.on(EmbedEvent.ApiIntercept, (payload) => {
|
|
3726
|
-
* console.log('payload', payload);
|
|
3727
|
-
* })
|
|
3728
|
-
* ```
|
|
3729
|
-
*
|
|
3730
|
-
* @version SDK: 1.42.0 | ThoughtSpot: 10.14.0.cl
|
|
3731
|
-
*/
|
|
3732
|
-
ApiIntercept = "ApiIntercept"
|
|
3717
|
+
OrgSwitched = "orgSwitched"
|
|
3733
3718
|
}
|
|
3734
3719
|
/**
|
|
3735
3720
|
* Event types that can be triggered by the host application
|
|
@@ -4017,7 +4002,7 @@ export declare enum HostEvent {
|
|
|
4017
4002
|
* the following parameters:
|
|
4018
4003
|
*
|
|
4019
4004
|
* @param
|
|
4020
|
-
* `vizId`- GUID of the saved Answer or visualization to pin to a Liveboard.
|
|
4005
|
+
* `vizId`- GUID of the saved Answer or Spotter visualization ID to pin to a Liveboard.
|
|
4021
4006
|
* Optional when pinning a new chart or table generated from a Search query.
|
|
4022
4007
|
* **Required** in Spotter Embed.
|
|
4023
4008
|
* @param
|
|
@@ -4069,10 +4054,16 @@ export declare enum HostEvent {
|
|
|
4069
4054
|
* ```
|
|
4070
4055
|
* @example
|
|
4071
4056
|
* ```js
|
|
4072
|
-
|
|
4073
|
-
|
|
4074
|
-
|
|
4075
|
-
|
|
4057
|
+
|
|
4058
|
+
* // You can use the Data event dispatched on each answer creation to get the vizId and use in Pin host event.
|
|
4059
|
+
* let latestSpotterVizId = '';
|
|
4060
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
4061
|
+
* latestSpotterVizId = payload.data.id;
|
|
4062
|
+
* });
|
|
4063
|
+
*
|
|
4064
|
+
* spotterEmbed.trigger(HostEvent.Pin, { vizId: latestSpotterVizId });
|
|
4065
|
+
* ```
|
|
4066
|
+
*
|
|
4076
4067
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
4077
4068
|
*/
|
|
4078
4069
|
Pin = "pin",
|
|
@@ -4147,10 +4138,15 @@ export declare enum HostEvent {
|
|
|
4147
4138
|
* ```
|
|
4148
4139
|
* @example
|
|
4149
4140
|
* ```js
|
|
4150
|
-
|
|
4151
|
-
|
|
4152
|
-
|
|
4153
|
-
|
|
4141
|
+
|
|
4142
|
+
* // You can use the Data event dispatched on each answer creation to get the vizId and use in DownloadAsPdf host event.
|
|
4143
|
+
* let latestSpotterVizId = '';
|
|
4144
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
4145
|
+
* latestSpotterVizId = payload.data.id;
|
|
4146
|
+
* });
|
|
4147
|
+
*
|
|
4148
|
+
* spotterEmbed.trigger(HostEvent.DownloadAsPdf, { vizId: latestSpotterVizId });
|
|
4149
|
+
* ```
|
|
4154
4150
|
*
|
|
4155
4151
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
4156
4152
|
*/
|
|
@@ -4177,10 +4173,14 @@ export declare enum HostEvent {
|
|
|
4177
4173
|
* ```
|
|
4178
4174
|
* @example
|
|
4179
4175
|
* ```js
|
|
4180
|
-
|
|
4181
|
-
|
|
4182
|
-
|
|
4183
|
-
|
|
4176
|
+
* // You can use the Data event dispatched on each answer creation to get the vizId and use in MakeACopy host event.
|
|
4177
|
+
* let latestSpotterVizId = '';
|
|
4178
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
4179
|
+
* latestSpotterVizId = payload.data.id;
|
|
4180
|
+
* });
|
|
4181
|
+
*
|
|
4182
|
+
* spotterEmbed.trigger(HostEvent.MakeACopy, { vizId: latestSpotterVizId });
|
|
4183
|
+
* ```
|
|
4184
4184
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
4185
4185
|
*/
|
|
4186
4186
|
MakeACopy = "makeACopy",
|
|
@@ -4265,15 +4265,7 @@ export declare enum HostEvent {
|
|
|
4265
4265
|
* ```
|
|
4266
4266
|
* @example
|
|
4267
4267
|
* ```js
|
|
4268
|
-
*
|
|
4269
|
-
* vizId:'730496d6-6903-4601-937e-2c691821af3c'
|
|
4270
|
-
* });
|
|
4271
|
-
* ```
|
|
4272
|
-
* @example
|
|
4273
|
-
* ```js
|
|
4274
|
-
* const editResponse = await spotterEmbed.trigger(HostEvent.Edit, {
|
|
4275
|
-
* vizId:'730496d6-6903-4601-937e-2c691821af3c'
|
|
4276
|
-
* });
|
|
4268
|
+
* spotterEmbed.trigger(HostEvent.Edit);
|
|
4277
4269
|
* ```
|
|
4278
4270
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
4279
4271
|
*/
|
|
@@ -4322,16 +4314,23 @@ export declare enum HostEvent {
|
|
|
4322
4314
|
* );
|
|
4323
4315
|
* })
|
|
4324
4316
|
* ```
|
|
4325
|
-
* @example
|
|
4317
|
+
* * @example
|
|
4326
4318
|
* ```js
|
|
4327
|
-
|
|
4328
|
-
|
|
4319
|
+
|
|
4320
|
+
* // You can use the Data event dispatched on each answer creation to get the vizId and use in Pin host event.
|
|
4321
|
+
* let latestSpotterVizId = '';
|
|
4322
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
4323
|
+
* latestSpotterVizId = payload.data.id;
|
|
4324
|
+
* });
|
|
4325
|
+
*
|
|
4326
|
+
* spotterEmbed.trigger(HostEvent.GetTML, {
|
|
4327
|
+
* vizId: latestSpotterVizId
|
|
4329
4328
|
* }).then((tml) => {
|
|
4330
4329
|
* console.log(
|
|
4331
4330
|
* tml.answer.search_query // TML representation of the search query
|
|
4332
4331
|
* );
|
|
4333
4332
|
* })
|
|
4334
|
-
|
|
4333
|
+
* ```
|
|
4335
4334
|
* @version SDK: 1.18.0 | ThoughtSpot: 8.10.0.cl, 9.0.1.sw
|
|
4336
4335
|
* @important
|
|
4337
4336
|
*/
|
|
@@ -4395,7 +4394,7 @@ export declare enum HostEvent {
|
|
|
4395
4394
|
/**
|
|
4396
4395
|
* Trigger the **Download** action on charts in
|
|
4397
4396
|
* the embedded view.
|
|
4398
|
-
* @param - `vizId` refers to the
|
|
4397
|
+
* @param - `vizId` refers to the Visualization ID in Spotter embed and is required in Spotter embed.
|
|
4399
4398
|
* @example
|
|
4400
4399
|
* ```js
|
|
4401
4400
|
* liveboardEmbed.trigger(HostEvent.Download, {vizId:
|
|
@@ -4405,10 +4404,14 @@ export declare enum HostEvent {
|
|
|
4405
4404
|
* embed.trigger(HostEvent.Download)
|
|
4406
4405
|
* ```
|
|
4407
4406
|
* ```js
|
|
4408
|
-
|
|
4409
|
-
|
|
4410
|
-
|
|
4411
|
-
|
|
4407
|
+
* // You can use the Data event dispatched on each answer creation to get the vizId and use in Download host event.
|
|
4408
|
+
* let latestSpotterVizId = '';
|
|
4409
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
4410
|
+
* latestSpotterVizId = payload.data.id;
|
|
4411
|
+
* });
|
|
4412
|
+
*
|
|
4413
|
+
* spotterEmbed.trigger(HostEvent.Download, { vizId: latestSpotterVizId });
|
|
4414
|
+
* ```
|
|
4412
4415
|
* @deprecated from SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl ,9.4.1.sw
|
|
4413
4416
|
* Use {@link DownloadAsPng}
|
|
4414
4417
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
@@ -4426,9 +4429,13 @@ export declare enum HostEvent {
|
|
|
4426
4429
|
*
|
|
4427
4430
|
* searchEmbed.trigger(HostEvent.DownloadAsPng)
|
|
4428
4431
|
*
|
|
4429
|
-
|
|
4430
|
-
|
|
4431
|
-
|
|
4432
|
+
* // You can use the Data event dispatched on each answer creation to get the vizId and use in DownloadAsPng host event.
|
|
4433
|
+
* let latestSpotterVizId = '';
|
|
4434
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
4435
|
+
* latestSpotterVizId = payload.data.id;
|
|
4436
|
+
* });
|
|
4437
|
+
*
|
|
4438
|
+
* spotterEmbed.trigger(HostEvent.DownloadAsPng, { vizId: latestSpotterVizId });
|
|
4432
4439
|
* ```
|
|
4433
4440
|
*
|
|
4434
4441
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.1.sw
|
|
@@ -4437,7 +4444,7 @@ export declare enum HostEvent {
|
|
|
4437
4444
|
/**
|
|
4438
4445
|
* Trigger the **Download** > **CSV** action on tables in
|
|
4439
4446
|
* the embedded view.
|
|
4440
|
-
* @param - `vizId` refers to the
|
|
4447
|
+
* @param - `vizId` refers to the Visualization ID in Spotter embed and is required in Spotter embed.
|
|
4441
4448
|
* @example
|
|
4442
4449
|
* ```js
|
|
4443
4450
|
* liveboardEmbed.trigger(HostEvent.DownloadAsCsv, {vizId:
|
|
@@ -4450,9 +4457,13 @@ export declare enum HostEvent {
|
|
|
4450
4457
|
* searchEmbed.trigger(HostEvent.DownloadAsCsv)
|
|
4451
4458
|
* ```
|
|
4452
4459
|
* ```js
|
|
4453
|
-
|
|
4454
|
-
|
|
4455
|
-
|
|
4460
|
+
* // You can use the Data event dispatched on each answer creation to get the vizId and use in DownloadAsCsv host event.
|
|
4461
|
+
* let latestSpotterVizId = '';
|
|
4462
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
4463
|
+
* latestSpotterVizId = payload.data.id;
|
|
4464
|
+
* });
|
|
4465
|
+
*
|
|
4466
|
+
* spotterEmbed.trigger(HostEvent.DownloadAsCsv, { vizId: latestSpotterVizId });
|
|
4456
4467
|
* ```
|
|
4457
4468
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
4458
4469
|
*/
|
|
@@ -4460,7 +4471,7 @@ export declare enum HostEvent {
|
|
|
4460
4471
|
/**
|
|
4461
4472
|
* Trigger the **Download** > **XLSX** action on tables
|
|
4462
4473
|
* in the embedded view.
|
|
4463
|
-
* @param - `vizId` refers to the
|
|
4474
|
+
* @param - `vizId` refers to the Visualization ID in Spotter embed and is required in Spotter embed.
|
|
4464
4475
|
* @example
|
|
4465
4476
|
* ```js
|
|
4466
4477
|
* liveboardEmbed.trigger(HostEvent.DownloadAsXlsx, {vizId:
|
|
@@ -4473,9 +4484,13 @@ export declare enum HostEvent {
|
|
|
4473
4484
|
* searchEmbed.trigger(HostEvent.DownloadAsXlsx)
|
|
4474
4485
|
* ```
|
|
4475
4486
|
* ```js
|
|
4476
|
-
|
|
4477
|
-
|
|
4478
|
-
|
|
4487
|
+
* // You can use the Data event dispatched on each answer creation to get the vizId and use in DownloadAsXlsx host event.
|
|
4488
|
+
* let latestSpotterVizId = '';
|
|
4489
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
4490
|
+
* latestSpotterVizId = payload.data.id;
|
|
4491
|
+
* });
|
|
4492
|
+
*
|
|
4493
|
+
* spotterEmbed.trigger(HostEvent.DownloadAsXlsx, { vizId: latestSpotterVizId });
|
|
4479
4494
|
* ```
|
|
4480
4495
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
4481
4496
|
*/
|
|
@@ -4512,7 +4527,7 @@ export declare enum HostEvent {
|
|
|
4512
4527
|
* ```
|
|
4513
4528
|
*
|
|
4514
4529
|
* ```js
|
|
4515
|
-
* // Save
|
|
4530
|
+
* // Save a Visualization in Spotter (requires vizId)
|
|
4516
4531
|
* spotterEmbed.trigger(HostEvent.Save, {
|
|
4517
4532
|
* vizId: "730496d6-6903-4601-937e-2c691821af3c"
|
|
4518
4533
|
* })
|
|
@@ -4834,11 +4849,13 @@ export declare enum HostEvent {
|
|
|
4834
4849
|
* });
|
|
4835
4850
|
*```
|
|
4836
4851
|
*```js
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
|
|
4852
|
+
* // You can use the Data event dispatched on each answer creation to get the vizId and use in GetParameters host event.
|
|
4853
|
+
* let latestSpotterVizId = '';
|
|
4854
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
4855
|
+
* latestSpotterVizId = payload.data.id;
|
|
4856
|
+
* });
|
|
4857
|
+
*
|
|
4858
|
+
* spotterEmbed.trigger(HostEvent.GetParameters, { vizId: latestSpotterVizId });
|
|
4842
4859
|
*```
|
|
4843
4860
|
* @version SDK: 1.29.0 | ThoughtSpot: 10.1.0.cl, 10.1.0.sw
|
|
4844
4861
|
*/
|
|
@@ -4881,11 +4898,13 @@ export declare enum HostEvent {
|
|
|
4881
4898
|
* ```
|
|
4882
4899
|
* @example
|
|
4883
4900
|
* ```js
|
|
4884
|
-
*
|
|
4885
|
-
*
|
|
4886
|
-
*
|
|
4887
|
-
*
|
|
4901
|
+
* // You can use the Data event dispatched on each answer creation to get the vizId and use in SaveAnswer host event.
|
|
4902
|
+
* let latestSpotterVizId = '';
|
|
4903
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
4904
|
+
* latestSpotterVizId = payload.data.id;
|
|
4888
4905
|
* });
|
|
4906
|
+
*
|
|
4907
|
+
* spotterEmbed.trigger(HostEvent.SaveAnswer, { vizId: latestSpotterVizId });
|
|
4889
4908
|
* ```
|
|
4890
4909
|
* @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
|
|
4891
4910
|
*/
|
|
@@ -4969,12 +4988,15 @@ export declare enum HostEvent {
|
|
|
4969
4988
|
DeleteLastPrompt = "DeleteLastPrompt",
|
|
4970
4989
|
/**
|
|
4971
4990
|
* Toggle the visualization to chart or table view.
|
|
4972
|
-
* @param - `vizId ` refers to the
|
|
4991
|
+
* @param - `vizId ` refers to the Visualization ID in Spotter embed and is required.
|
|
4973
4992
|
* @example
|
|
4974
4993
|
* ```js
|
|
4975
|
-
*
|
|
4976
|
-
*
|
|
4994
|
+
* let latestSpotterVizId = '';
|
|
4995
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
4996
|
+
* latestSpotterVizId = payload.data.id;
|
|
4977
4997
|
* });
|
|
4998
|
+
*
|
|
4999
|
+
* spotterEmbed.trigger(HostEvent.AnswerChartSwitcher, { vizId: latestSpotterVizId });
|
|
4978
5000
|
*```
|
|
4979
5001
|
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
4980
5002
|
*/
|
|
@@ -5003,12 +5025,16 @@ export declare enum HostEvent {
|
|
|
5003
5025
|
*/
|
|
5004
5026
|
VisibleEmbedCoordinates = "visibleEmbedCoordinates",
|
|
5005
5027
|
/**
|
|
5006
|
-
* Trigger the *
|
|
5007
|
-
* @param - `vizId` refers to the
|
|
5028
|
+
* Trigger the *Spotter* action for visualizations present on the liveboard's vizzes.
|
|
5029
|
+
* @param - `vizId` refers to the Visualization ID in Spotter embed and is required.
|
|
5008
5030
|
* @example
|
|
5009
5031
|
* ```js
|
|
5010
|
-
*
|
|
5011
|
-
* {
|
|
5032
|
+
* let latestSpotterVizId = '';
|
|
5033
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
5034
|
+
* latestSpotterVizId = payload.data.id;
|
|
5035
|
+
* });
|
|
5036
|
+
*
|
|
5037
|
+
* spotterEmbed.trigger(HostEvent.AskSpotter, { vizId: latestSpotterVizId });
|
|
5012
5038
|
* ```
|
|
5013
5039
|
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
5014
5040
|
*/
|
|
@@ -6492,71 +6518,6 @@ export interface DefaultAppInitData {
|
|
|
6492
6518
|
hiddenListColumns: ListPageColumns[];
|
|
6493
6519
|
customActions: CustomAction[];
|
|
6494
6520
|
}
|
|
6495
|
-
/**
|
|
6496
|
-
* Enum for the type of API intercepted
|
|
6497
|
-
*/
|
|
6498
|
-
export declare enum InterceptedApiType {
|
|
6499
|
-
/**
|
|
6500
|
-
* The apis that are use to get the metadata for the embed
|
|
6501
|
-
*/
|
|
6502
|
-
METADATA = "METADATA",
|
|
6503
|
-
/**
|
|
6504
|
-
* The apis that are use to get the data for the embed
|
|
6505
|
-
*/
|
|
6506
|
-
ANSWER_DATA = "ANSWER_DATA",
|
|
6507
|
-
/**
|
|
6508
|
-
* This will intercept all the apis
|
|
6509
|
-
*/
|
|
6510
|
-
ALL = "ALL",
|
|
6511
|
-
/**
|
|
6512
|
-
* The apis that are use to get the data for the liveboard
|
|
6513
|
-
*/
|
|
6514
|
-
LIVEBOARD_DATA = "LIVEBOARD_DATA"
|
|
6515
|
-
}
|
|
6516
|
-
export type InterceptV2Flags = {
|
|
6517
|
-
/**
|
|
6518
|
-
* Enable intercepting the apis
|
|
6519
|
-
*
|
|
6520
|
-
* @example
|
|
6521
|
-
* ```js
|
|
6522
|
-
* const embed = new LiveboardEmbed('#embed', {
|
|
6523
|
-
* ...viewConfig,
|
|
6524
|
-
* enableApiIntercept: true,
|
|
6525
|
-
* interceptUrls: [InterceptedApiType.DATA],
|
|
6526
|
-
* })
|
|
6527
|
-
* ```
|
|
6528
|
-
*
|
|
6529
|
-
*/
|
|
6530
|
-
enableApiIntercept?: boolean;
|
|
6531
|
-
/**
|
|
6532
|
-
* The apis to intercept
|
|
6533
|
-
*
|
|
6534
|
-
* @example
|
|
6535
|
-
* ```js
|
|
6536
|
-
* const embed = new LiveboardEmbed('#embed', {
|
|
6537
|
-
* ...viewConfig,
|
|
6538
|
-
* enableApiIntercept: true,
|
|
6539
|
-
* interceptUrls: [InterceptedApiType.DATA],
|
|
6540
|
-
* })
|
|
6541
|
-
* ```
|
|
6542
|
-
*/
|
|
6543
|
-
interceptUrls?: (string | InterceptedApiType)[];
|
|
6544
|
-
/**
|
|
6545
|
-
* The timeout for the intercept, default is 30000ms
|
|
6546
|
-
* the api will error out if the timeout is reached
|
|
6547
|
-
*
|
|
6548
|
-
* @example
|
|
6549
|
-
* ```js
|
|
6550
|
-
* const embed = new LiveboardEmbed('#embed', {
|
|
6551
|
-
* ...viewConfig,
|
|
6552
|
-
* enableApiIntercept: true,
|
|
6553
|
-
* interceptUrls: [InterceptedApiType.ALL],
|
|
6554
|
-
* interceptTimeout: 1000,
|
|
6555
|
-
* })
|
|
6556
|
-
* ```
|
|
6557
|
-
*/
|
|
6558
|
-
interceptTimeout?: number;
|
|
6559
|
-
};
|
|
6560
6521
|
/**
|
|
6561
6522
|
* Enum for auth failure types. This is the parameter passed to the listner
|
|
6562
6523
|
* of {@link AuthStatus.FAILURE}.
|
|
@@ -6665,8 +6626,7 @@ export declare enum UIPassthroughEvent {
|
|
|
6665
6626
|
GetDiscoverabilityStatus = "getDiscoverabilityStatus",
|
|
6666
6627
|
GetAvailableUIPassthroughs = "getAvailableUiPassthroughs",
|
|
6667
6628
|
GetAnswerConfig = "getAnswerPageConfig",
|
|
6668
|
-
GetLiveboardConfig = "getPinboardPageConfig"
|
|
6669
|
-
GetUnsavedAnswerTML = "getUnsavedAnswerTML"
|
|
6629
|
+
GetLiveboardConfig = "getPinboardPageConfig"
|
|
6670
6630
|
}
|
|
6671
6631
|
export type UIPassthroughContractBase = {
|
|
6672
6632
|
[UIPassthroughEvent.PinAnswerToLiveboard]: {
|
|
@@ -6721,15 +6681,6 @@ export type UIPassthroughContractBase = {
|
|
|
6721
6681
|
request: any;
|
|
6722
6682
|
response: any;
|
|
6723
6683
|
};
|
|
6724
|
-
[UIPassthroughEvent.GetUnsavedAnswerTML]: {
|
|
6725
|
-
request: {
|
|
6726
|
-
sessionId?: string;
|
|
6727
|
-
vizId?: string;
|
|
6728
|
-
};
|
|
6729
|
-
response: {
|
|
6730
|
-
tml: string;
|
|
6731
|
-
};
|
|
6732
|
-
};
|
|
6733
6684
|
};
|
|
6734
6685
|
export type UIPassthroughRequest<T extends keyof UIPassthroughContractBase> = UIPassthroughContractBase[T]["request"];
|
|
6735
6686
|
export type UIPassthroughResponse<T extends keyof UIPassthroughContractBase> = UIPassthroughContractBase[T]["response"];
|
|
@@ -6755,9 +6706,9 @@ declare class HostEventClient {
|
|
|
6755
6706
|
* @param {any} data Data to send with the host event
|
|
6756
6707
|
* @returns {Promise<any>} - the response from the process trigger
|
|
6757
6708
|
*/
|
|
6758
|
-
protected processTrigger(message: HostEvent, data: any): Promise<any>;
|
|
6709
|
+
protected processTrigger(message: HostEvent, data: any, context?: any): Promise<any>;
|
|
6759
6710
|
handleHostEventWithParam<UIPassthroughEventT extends UIPassthroughEvent>(apiName: UIPassthroughEventT, parameters: UIPassthroughRequest<UIPassthroughEventT>): Promise<UIPassthroughResponse<UIPassthroughEventT>>;
|
|
6760
|
-
hostEventFallback(hostEvent: HostEvent, data: any): Promise<any>;
|
|
6711
|
+
hostEventFallback(hostEvent: HostEvent, data: any, context?: any): Promise<any>;
|
|
6761
6712
|
/**
|
|
6762
6713
|
* Setter for the iframe element used for host events
|
|
6763
6714
|
* @param {HTMLIFrameElement} iFrame - the iframe element to set
|
|
@@ -6766,7 +6717,7 @@ declare class HostEventClient {
|
|
|
6766
6717
|
triggerUIPassthroughApi<UIPassthroughEventT extends UIPassthroughEvent>(apiName: UIPassthroughEventT, parameters: UIPassthroughRequest<UIPassthroughEventT>): Promise<UIPassthroughArrayResponse<UIPassthroughEventT>>;
|
|
6767
6718
|
protected handlePinEvent(payload: HostEventRequest<HostEvent.Pin>): Promise<HostEventResponse<HostEvent.Pin>>;
|
|
6768
6719
|
protected handleSaveAnswerEvent(payload: HostEventRequest<HostEvent.SaveAnswer>): Promise<any>;
|
|
6769
|
-
triggerHostEvent<HostEventT extends HostEvent, PayloadT>(hostEvent: HostEventT, payload?: TriggerPayload<PayloadT, HostEventT
|
|
6720
|
+
triggerHostEvent<HostEventT extends HostEvent, PayloadT, ContextT>(hostEvent: HostEventT, payload?: TriggerPayload<PayloadT, HostEventT>, context?: ContextT): Promise<TriggerResponse<PayloadT, HostEventT>>;
|
|
6770
6721
|
}
|
|
6771
6722
|
declare class TsEmbed {
|
|
6772
6723
|
/**
|
|
@@ -6885,7 +6836,6 @@ declare class TsEmbed {
|
|
|
6885
6836
|
* work regardless of auth status
|
|
6886
6837
|
*/
|
|
6887
6838
|
private subscribeToNetworkEvents;
|
|
6888
|
-
private messageEventListener;
|
|
6889
6839
|
/**
|
|
6890
6840
|
* Subscribe to message events that depend on successful iframe setup
|
|
6891
6841
|
*/
|
|
@@ -6972,7 +6922,6 @@ declare class TsEmbed {
|
|
|
6972
6922
|
* @param height The height in pixels
|
|
6973
6923
|
*/
|
|
6974
6924
|
protected setIFrameHeight(height: number | string): void;
|
|
6975
|
-
protected createEmbedEventResponder: (eventPort: MessagePort | void, eventType: EmbedEvent) => (payload: any) => void;
|
|
6976
6925
|
/**
|
|
6977
6926
|
* Executes all registered event handlers for a particular event type
|
|
6978
6927
|
* @param eventType The event type
|
|
@@ -7079,7 +7028,7 @@ declare class TsEmbed {
|
|
|
7079
7028
|
* @param {any} data The payload to send with the message
|
|
7080
7029
|
* @returns A promise that resolves with the response from the embedded app
|
|
7081
7030
|
*/
|
|
7082
|
-
trigger<HostEventT extends HostEvent, PayloadT>(messageType: HostEventT, data?: TriggerPayload<PayloadT, HostEventT
|
|
7031
|
+
trigger<HostEventT extends HostEvent, PayloadT>(messageType: HostEventT, data?: TriggerPayload<PayloadT, HostEventT>, context?: any): Promise<TriggerResponse<PayloadT, HostEventT>>;
|
|
7083
7032
|
/**
|
|
7084
7033
|
* Triggers an event to the embedded app, skipping the UI flow.
|
|
7085
7034
|
* @param {UIPassthroughEvent} apiName - The name of the API to be triggered.
|
|
@@ -8119,6 +8068,26 @@ export interface AppViewConfig extends AllEmbedViewConfig {
|
|
|
8119
8068
|
* ```
|
|
8120
8069
|
*/
|
|
8121
8070
|
tag?: string;
|
|
8071
|
+
/**
|
|
8072
|
+
* Hide tag filter chips that appear when content is filtered by tags.
|
|
8073
|
+
* When enabled, this automatically:
|
|
8074
|
+
* - Hides tag filter indicators/chips from the UI
|
|
8075
|
+
*
|
|
8076
|
+
* This provides a clean interface without tag-related UI elements.
|
|
8077
|
+
*
|
|
8078
|
+
* Supported embed types: `AppEmbed`
|
|
8079
|
+
* @version SDK: 1.44.0 | ThoughtSpot: 10.15.0.cl
|
|
8080
|
+
* @example
|
|
8081
|
+
* ```js
|
|
8082
|
+
* // Simple usage - automatically hides all tag-related UI
|
|
8083
|
+
* const embed = new AppEmbed('#tsEmbed', {
|
|
8084
|
+
* ... // other embed view config
|
|
8085
|
+
* tag: 'Some Tag',
|
|
8086
|
+
* hideTagFilterChips: true, // This is all you need!
|
|
8087
|
+
* });
|
|
8088
|
+
* ```
|
|
8089
|
+
*/
|
|
8090
|
+
hideTagFilterChips?: boolean;
|
|
8122
8091
|
/**
|
|
8123
8092
|
* The array of GUIDs to be hidden
|
|
8124
8093
|
*
|