@thoughtspot/visual-embed-sdk 1.42.3 → 1.43.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/package.json +1 -1
- package/cjs/src/types.d.ts +137 -68
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +137 -68
- package/cjs/src/types.js.map +1 -1
- package/dist/{index-SVcLgSqi.js → index-HZ94j9Ey.js} +1 -1
- package/dist/src/types.d.ts +137 -68
- package/dist/src/types.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +140 -71
- package/dist/tsembed-react.js +139 -70
- package/dist/tsembed.es.js +140 -71
- package/dist/tsembed.js +139 -70
- package/dist/visual-embed-sdk-react-full.d.ts +137 -68
- package/dist/visual-embed-sdk-react.d.ts +137 -68
- package/dist/visual-embed-sdk.d.ts +137 -68
- package/lib/package.json +1 -1
- package/lib/src/types.d.ts +137 -68
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +137 -68
- package/lib/src/types.js.map +1 -1
- package/package.json +1 -1
- package/src/types.ts +137 -68
|
@@ -2695,7 +2695,7 @@ export declare enum EmbedEvent {
|
|
|
2695
2695
|
*/
|
|
2696
2696
|
Load = "load",
|
|
2697
2697
|
/**
|
|
2698
|
-
* Data pertaining to an Answer or
|
|
2698
|
+
* Data pertaining to an Answer, Liveboard or Spotter visualization is received.
|
|
2699
2699
|
* The event payload includes the raw data of the object.
|
|
2700
2700
|
* @return data - Answer of Liveboard data
|
|
2701
2701
|
* @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
|
|
@@ -3114,6 +3114,17 @@ export declare enum EmbedEvent {
|
|
|
3114
3114
|
*```
|
|
3115
3115
|
*/
|
|
3116
3116
|
AnswerDelete = "answerDelete",
|
|
3117
|
+
/**
|
|
3118
|
+
* Emitted when the AI Highlights action is triggered on a Liveboard
|
|
3119
|
+
* @version SDK: 1.44.0 | ThoughtSpot: 10.15.0.cl
|
|
3120
|
+
* @example
|
|
3121
|
+
*```js
|
|
3122
|
+
* liveboardEmbed.on(EmbedEvent.AIHighlights, (payload) => {
|
|
3123
|
+
* console.log('AI Highlights', payload);
|
|
3124
|
+
* })
|
|
3125
|
+
*```
|
|
3126
|
+
*/
|
|
3127
|
+
AIHighlights = "AIHighlights",
|
|
3117
3128
|
/**
|
|
3118
3129
|
* Emitted when a user initiates the Pin action to
|
|
3119
3130
|
* add an Answer to a Liveboard.
|
|
@@ -4063,7 +4074,7 @@ export declare enum HostEvent {
|
|
|
4063
4074
|
* the following parameters:
|
|
4064
4075
|
*
|
|
4065
4076
|
* @param
|
|
4066
|
-
* `vizId`- GUID of the saved Answer or visualization to pin to a Liveboard.
|
|
4077
|
+
* `vizId`- GUID of the saved Answer or Spotter visualization ID to pin to a Liveboard.
|
|
4067
4078
|
* Optional when pinning a new chart or table generated from a Search query.
|
|
4068
4079
|
* **Required** in Spotter Embed.
|
|
4069
4080
|
* @param
|
|
@@ -4115,10 +4126,16 @@ export declare enum HostEvent {
|
|
|
4115
4126
|
* ```
|
|
4116
4127
|
* @example
|
|
4117
4128
|
* ```js
|
|
4118
|
-
|
|
4119
|
-
|
|
4120
|
-
|
|
4121
|
-
|
|
4129
|
+
|
|
4130
|
+
* // You can use the Data event dispatched on each answer creation to get the vizId and use in Pin host event.
|
|
4131
|
+
* let latestSpotterVizId = '';
|
|
4132
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
4133
|
+
* latestSpotterVizId = payload.data.id;
|
|
4134
|
+
* });
|
|
4135
|
+
*
|
|
4136
|
+
* spotterEmbed.trigger(HostEvent.Pin, { vizId: latestSpotterVizId });
|
|
4137
|
+
* ```
|
|
4138
|
+
*
|
|
4122
4139
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
4123
4140
|
*/
|
|
4124
4141
|
Pin = "pin",
|
|
@@ -4193,14 +4210,29 @@ export declare enum HostEvent {
|
|
|
4193
4210
|
* ```
|
|
4194
4211
|
* @example
|
|
4195
4212
|
* ```js
|
|
4196
|
-
|
|
4197
|
-
|
|
4198
|
-
|
|
4199
|
-
|
|
4213
|
+
|
|
4214
|
+
* // You can use the Data event dispatched on each answer creation to get the vizId and use in DownloadAsPdf host event.
|
|
4215
|
+
* let latestSpotterVizId = '';
|
|
4216
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
4217
|
+
* latestSpotterVizId = payload.data.id;
|
|
4218
|
+
* });
|
|
4219
|
+
*
|
|
4220
|
+
* spotterEmbed.trigger(HostEvent.DownloadAsPdf, { vizId: latestSpotterVizId });
|
|
4221
|
+
* ```
|
|
4200
4222
|
*
|
|
4201
4223
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
4202
4224
|
*/
|
|
4203
4225
|
DownloadAsPdf = "downloadAsPdf",
|
|
4226
|
+
/**
|
|
4227
|
+
* Trigger the **AI Highlights** action on an embedded Liveboard
|
|
4228
|
+
*
|
|
4229
|
+
* @example
|
|
4230
|
+
* ```js
|
|
4231
|
+
* liveboardEmbed.trigger(HostEvent.AIHighlights)
|
|
4232
|
+
* ```
|
|
4233
|
+
* @version SDK: 1.44.0 | ThoughtSpot: 10.15.0.cl
|
|
4234
|
+
*/
|
|
4235
|
+
AIHighlights = "AIHighlights",
|
|
4204
4236
|
/**
|
|
4205
4237
|
* Trigger the **Make a copy** action on a Liveboard,
|
|
4206
4238
|
* visualization, or Answer page.
|
|
@@ -4223,10 +4255,14 @@ export declare enum HostEvent {
|
|
|
4223
4255
|
* ```
|
|
4224
4256
|
* @example
|
|
4225
4257
|
* ```js
|
|
4226
|
-
|
|
4227
|
-
|
|
4228
|
-
|
|
4229
|
-
|
|
4258
|
+
* // You can use the Data event dispatched on each answer creation to get the vizId and use in MakeACopy host event.
|
|
4259
|
+
* let latestSpotterVizId = '';
|
|
4260
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
4261
|
+
* latestSpotterVizId = payload.data.id;
|
|
4262
|
+
* });
|
|
4263
|
+
*
|
|
4264
|
+
* spotterEmbed.trigger(HostEvent.MakeACopy, { vizId: latestSpotterVizId });
|
|
4265
|
+
* ```
|
|
4230
4266
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
4231
4267
|
*/
|
|
4232
4268
|
MakeACopy = "makeACopy",
|
|
@@ -4311,15 +4347,7 @@ export declare enum HostEvent {
|
|
|
4311
4347
|
* ```
|
|
4312
4348
|
* @example
|
|
4313
4349
|
* ```js
|
|
4314
|
-
*
|
|
4315
|
-
* vizId:'730496d6-6903-4601-937e-2c691821af3c'
|
|
4316
|
-
* });
|
|
4317
|
-
* ```
|
|
4318
|
-
* @example
|
|
4319
|
-
* ```js
|
|
4320
|
-
* const editResponse = await spotterEmbed.trigger(HostEvent.Edit, {
|
|
4321
|
-
* vizId:'730496d6-6903-4601-937e-2c691821af3c'
|
|
4322
|
-
* });
|
|
4350
|
+
* spotterEmbed.trigger(HostEvent.Edit);
|
|
4323
4351
|
* ```
|
|
4324
4352
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
4325
4353
|
*/
|
|
@@ -4368,16 +4396,23 @@ export declare enum HostEvent {
|
|
|
4368
4396
|
* );
|
|
4369
4397
|
* })
|
|
4370
4398
|
* ```
|
|
4371
|
-
* @example
|
|
4399
|
+
* * @example
|
|
4372
4400
|
* ```js
|
|
4373
|
-
|
|
4374
|
-
|
|
4401
|
+
|
|
4402
|
+
* // You can use the Data event dispatched on each answer creation to get the vizId and use in Pin host event.
|
|
4403
|
+
* let latestSpotterVizId = '';
|
|
4404
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
4405
|
+
* latestSpotterVizId = payload.data.id;
|
|
4406
|
+
* });
|
|
4407
|
+
*
|
|
4408
|
+
* spotterEmbed.trigger(HostEvent.GetTML, {
|
|
4409
|
+
* vizId: latestSpotterVizId
|
|
4375
4410
|
* }).then((tml) => {
|
|
4376
4411
|
* console.log(
|
|
4377
4412
|
* tml.answer.search_query // TML representation of the search query
|
|
4378
4413
|
* );
|
|
4379
4414
|
* })
|
|
4380
|
-
|
|
4415
|
+
* ```
|
|
4381
4416
|
* @version SDK: 1.18.0 | ThoughtSpot: 8.10.0.cl, 9.0.1.sw
|
|
4382
4417
|
* @important
|
|
4383
4418
|
*/
|
|
@@ -4441,7 +4476,7 @@ export declare enum HostEvent {
|
|
|
4441
4476
|
/**
|
|
4442
4477
|
* Trigger the **Download** action on charts in
|
|
4443
4478
|
* the embedded view.
|
|
4444
|
-
* @param - `vizId` refers to the
|
|
4479
|
+
* @param - `vizId` refers to the Visualization ID in Spotter embed and is required in Spotter embed.
|
|
4445
4480
|
* @example
|
|
4446
4481
|
* ```js
|
|
4447
4482
|
* liveboardEmbed.trigger(HostEvent.Download, {vizId:
|
|
@@ -4451,10 +4486,14 @@ export declare enum HostEvent {
|
|
|
4451
4486
|
* embed.trigger(HostEvent.Download)
|
|
4452
4487
|
* ```
|
|
4453
4488
|
* ```js
|
|
4454
|
-
|
|
4455
|
-
|
|
4456
|
-
|
|
4457
|
-
|
|
4489
|
+
* // You can use the Data event dispatched on each answer creation to get the vizId and use in Download host event.
|
|
4490
|
+
* let latestSpotterVizId = '';
|
|
4491
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
4492
|
+
* latestSpotterVizId = payload.data.id;
|
|
4493
|
+
* });
|
|
4494
|
+
*
|
|
4495
|
+
* spotterEmbed.trigger(HostEvent.Download, { vizId: latestSpotterVizId });
|
|
4496
|
+
* ```
|
|
4458
4497
|
* @deprecated from SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl ,9.4.1.sw
|
|
4459
4498
|
* Use {@link DownloadAsPng}
|
|
4460
4499
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
@@ -4472,9 +4511,13 @@ export declare enum HostEvent {
|
|
|
4472
4511
|
*
|
|
4473
4512
|
* searchEmbed.trigger(HostEvent.DownloadAsPng)
|
|
4474
4513
|
*
|
|
4475
|
-
|
|
4476
|
-
|
|
4477
|
-
|
|
4514
|
+
* // You can use the Data event dispatched on each answer creation to get the vizId and use in DownloadAsPng host event.
|
|
4515
|
+
* let latestSpotterVizId = '';
|
|
4516
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
4517
|
+
* latestSpotterVizId = payload.data.id;
|
|
4518
|
+
* });
|
|
4519
|
+
*
|
|
4520
|
+
* spotterEmbed.trigger(HostEvent.DownloadAsPng, { vizId: latestSpotterVizId });
|
|
4478
4521
|
* ```
|
|
4479
4522
|
*
|
|
4480
4523
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.1.sw
|
|
@@ -4483,7 +4526,7 @@ export declare enum HostEvent {
|
|
|
4483
4526
|
/**
|
|
4484
4527
|
* Trigger the **Download** > **CSV** action on tables in
|
|
4485
4528
|
* the embedded view.
|
|
4486
|
-
* @param - `vizId` refers to the
|
|
4529
|
+
* @param - `vizId` refers to the Visualization ID in Spotter embed and is required in Spotter embed.
|
|
4487
4530
|
* @example
|
|
4488
4531
|
* ```js
|
|
4489
4532
|
* liveboardEmbed.trigger(HostEvent.DownloadAsCsv, {vizId:
|
|
@@ -4496,9 +4539,13 @@ export declare enum HostEvent {
|
|
|
4496
4539
|
* searchEmbed.trigger(HostEvent.DownloadAsCsv)
|
|
4497
4540
|
* ```
|
|
4498
4541
|
* ```js
|
|
4499
|
-
|
|
4500
|
-
|
|
4501
|
-
|
|
4542
|
+
* // You can use the Data event dispatched on each answer creation to get the vizId and use in DownloadAsCsv host event.
|
|
4543
|
+
* let latestSpotterVizId = '';
|
|
4544
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
4545
|
+
* latestSpotterVizId = payload.data.id;
|
|
4546
|
+
* });
|
|
4547
|
+
*
|
|
4548
|
+
* spotterEmbed.trigger(HostEvent.DownloadAsCsv, { vizId: latestSpotterVizId });
|
|
4502
4549
|
* ```
|
|
4503
4550
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
4504
4551
|
*/
|
|
@@ -4506,7 +4553,7 @@ export declare enum HostEvent {
|
|
|
4506
4553
|
/**
|
|
4507
4554
|
* Trigger the **Download** > **XLSX** action on tables
|
|
4508
4555
|
* in the embedded view.
|
|
4509
|
-
* @param - `vizId` refers to the
|
|
4556
|
+
* @param - `vizId` refers to the Visualization ID in Spotter embed and is required in Spotter embed.
|
|
4510
4557
|
* @example
|
|
4511
4558
|
* ```js
|
|
4512
4559
|
* liveboardEmbed.trigger(HostEvent.DownloadAsXlsx, {vizId:
|
|
@@ -4519,9 +4566,13 @@ export declare enum HostEvent {
|
|
|
4519
4566
|
* searchEmbed.trigger(HostEvent.DownloadAsXlsx)
|
|
4520
4567
|
* ```
|
|
4521
4568
|
* ```js
|
|
4522
|
-
|
|
4523
|
-
|
|
4524
|
-
|
|
4569
|
+
* // You can use the Data event dispatched on each answer creation to get the vizId and use in DownloadAsXlsx host event.
|
|
4570
|
+
* let latestSpotterVizId = '';
|
|
4571
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
4572
|
+
* latestSpotterVizId = payload.data.id;
|
|
4573
|
+
* });
|
|
4574
|
+
*
|
|
4575
|
+
* spotterEmbed.trigger(HostEvent.DownloadAsXlsx, { vizId: latestSpotterVizId });
|
|
4525
4576
|
* ```
|
|
4526
4577
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
4527
4578
|
*/
|
|
@@ -4558,7 +4609,7 @@ export declare enum HostEvent {
|
|
|
4558
4609
|
* ```
|
|
4559
4610
|
*
|
|
4560
4611
|
* ```js
|
|
4561
|
-
* // Save
|
|
4612
|
+
* // Save a Visualization in Spotter (requires vizId)
|
|
4562
4613
|
* spotterEmbed.trigger(HostEvent.Save, {
|
|
4563
4614
|
* vizId: "730496d6-6903-4601-937e-2c691821af3c"
|
|
4564
4615
|
* })
|
|
@@ -4859,15 +4910,21 @@ export declare enum HostEvent {
|
|
|
4859
4910
|
ResetLiveboardPersonalisedView = "ResetLiveboardPersonalisedView",
|
|
4860
4911
|
/**
|
|
4861
4912
|
* Triggers an action to update Parameter values on embedded
|
|
4862
|
-
* Answers, Liveboard and Spotter answer in Edit mode.
|
|
4913
|
+
* Answers, Liveboard, and Spotter answer in Edit mode.
|
|
4914
|
+
* @param - `name` - Name of the Parameter
|
|
4915
|
+
* @param - `value` - The value to set for the Parameter.
|
|
4916
|
+
*
|
|
4917
|
+
* Optionally, to control the visibility of the Parameter chip,
|
|
4918
|
+
* use the `isVisibleToUser` attribute when applying an override.
|
|
4863
4919
|
*
|
|
4864
4920
|
* @example
|
|
4865
4921
|
* ```js
|
|
4866
4922
|
* liveboardEmbed.trigger(HostEvent.UpdateParameters, [{
|
|
4867
|
-
*
|
|
4868
|
-
*
|
|
4923
|
+
* name: "Integer Range Param",
|
|
4924
|
+
* value: 10,
|
|
4925
|
+
* isVisibleToUser: false
|
|
4869
4926
|
* }])
|
|
4870
|
-
*
|
|
4927
|
+
* ```
|
|
4871
4928
|
* @version SDK: 1.29.0 | ThoughtSpot: 10.1.0.cl, 10.1.0.sw
|
|
4872
4929
|
*/
|
|
4873
4930
|
UpdateParameters = "UpdateParameters",
|
|
@@ -4880,11 +4937,13 @@ export declare enum HostEvent {
|
|
|
4880
4937
|
* });
|
|
4881
4938
|
*```
|
|
4882
4939
|
*```js
|
|
4883
|
-
|
|
4884
|
-
|
|
4885
|
-
|
|
4886
|
-
|
|
4887
|
-
|
|
4940
|
+
* // You can use the Data event dispatched on each answer creation to get the vizId and use in GetParameters host event.
|
|
4941
|
+
* let latestSpotterVizId = '';
|
|
4942
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
4943
|
+
* latestSpotterVizId = payload.data.id;
|
|
4944
|
+
* });
|
|
4945
|
+
*
|
|
4946
|
+
* spotterEmbed.trigger(HostEvent.GetParameters, { vizId: latestSpotterVizId });
|
|
4888
4947
|
*```
|
|
4889
4948
|
* @version SDK: 1.29.0 | ThoughtSpot: 10.1.0.cl, 10.1.0.sw
|
|
4890
4949
|
*/
|
|
@@ -4914,10 +4973,11 @@ export declare enum HostEvent {
|
|
|
4914
4973
|
* If no parameters are specified, the save action is
|
|
4915
4974
|
* triggered with a modal to prompt users to
|
|
4916
4975
|
* add a name and description for the Answer.
|
|
4917
|
-
* @param -
|
|
4918
|
-
*
|
|
4919
|
-
*
|
|
4920
|
-
* @param - `
|
|
4976
|
+
* @param - `vizId` refers to the Answer ID in Spotter embed
|
|
4977
|
+
* and is required in Spotter embed.
|
|
4978
|
+
* Optional attributes to set Answer properties include:
|
|
4979
|
+
* @param - `name` - Name string for the Answer.
|
|
4980
|
+
* @param - `description` - Description text for the Answer.
|
|
4921
4981
|
* @example
|
|
4922
4982
|
* ```js
|
|
4923
4983
|
* const saveAnswerResponse = await searchEmbed.trigger(HostEvent.SaveAnswer, {
|
|
@@ -4927,11 +4987,13 @@ export declare enum HostEvent {
|
|
|
4927
4987
|
* ```
|
|
4928
4988
|
* @example
|
|
4929
4989
|
* ```js
|
|
4930
|
-
*
|
|
4931
|
-
*
|
|
4932
|
-
*
|
|
4933
|
-
*
|
|
4990
|
+
* // You can use the Data event dispatched on each answer creation to get the vizId and use in SaveAnswer host event.
|
|
4991
|
+
* let latestSpotterVizId = '';
|
|
4992
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
4993
|
+
* latestSpotterVizId = payload.data.id;
|
|
4934
4994
|
* });
|
|
4995
|
+
*
|
|
4996
|
+
* spotterEmbed.trigger(HostEvent.SaveAnswer, { vizId: latestSpotterVizId });
|
|
4935
4997
|
* ```
|
|
4936
4998
|
* @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
|
|
4937
4999
|
*/
|
|
@@ -5015,12 +5077,15 @@ export declare enum HostEvent {
|
|
|
5015
5077
|
DeleteLastPrompt = "DeleteLastPrompt",
|
|
5016
5078
|
/**
|
|
5017
5079
|
* Toggle the visualization to chart or table view.
|
|
5018
|
-
* @param - `vizId ` refers to the
|
|
5080
|
+
* @param - `vizId ` refers to the Visualization ID in Spotter embed and is required.
|
|
5019
5081
|
* @example
|
|
5020
5082
|
* ```js
|
|
5021
|
-
*
|
|
5022
|
-
*
|
|
5083
|
+
* let latestSpotterVizId = '';
|
|
5084
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
5085
|
+
* latestSpotterVizId = payload.data.id;
|
|
5023
5086
|
* });
|
|
5087
|
+
*
|
|
5088
|
+
* spotterEmbed.trigger(HostEvent.AnswerChartSwitcher, { vizId: latestSpotterVizId });
|
|
5024
5089
|
*```
|
|
5025
5090
|
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
5026
5091
|
*/
|
|
@@ -5049,12 +5114,16 @@ export declare enum HostEvent {
|
|
|
5049
5114
|
*/
|
|
5050
5115
|
VisibleEmbedCoordinates = "visibleEmbedCoordinates",
|
|
5051
5116
|
/**
|
|
5052
|
-
* Trigger the *
|
|
5053
|
-
* @param - `vizId` refers to the
|
|
5117
|
+
* Trigger the *Spotter* action for visualizations present on the liveboard's vizzes.
|
|
5118
|
+
* @param - `vizId` refers to the Visualization ID in Spotter embed and is required.
|
|
5054
5119
|
* @example
|
|
5055
5120
|
* ```js
|
|
5056
|
-
*
|
|
5057
|
-
* {
|
|
5121
|
+
* let latestSpotterVizId = '';
|
|
5122
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
5123
|
+
* latestSpotterVizId = payload.data.id;
|
|
5124
|
+
* });
|
|
5125
|
+
*
|
|
5126
|
+
* spotterEmbed.trigger(HostEvent.AskSpotter, { vizId: latestSpotterVizId });
|
|
5058
5127
|
* ```
|
|
5059
5128
|
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
5060
5129
|
*/
|