@thoughtspot/visual-embed-sdk 1.40.0 → 1.40.1-alpha.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.
Files changed (51) hide show
  1. package/cjs/package.json +1 -1
  2. package/cjs/src/embed/liveboard.d.ts +2 -1
  3. package/cjs/src/embed/liveboard.d.ts.map +1 -1
  4. package/cjs/src/embed/liveboard.js +13 -8
  5. package/cjs/src/embed/liveboard.js.map +1 -1
  6. package/cjs/src/embed/ts-embed.d.ts +7 -0
  7. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  8. package/cjs/src/embed/ts-embed.js +61 -7
  9. package/cjs/src/embed/ts-embed.js.map +1 -1
  10. package/cjs/src/types.d.ts +33 -64
  11. package/cjs/src/types.d.ts.map +1 -1
  12. package/cjs/src/types.js +33 -64
  13. package/cjs/src/types.js.map +1 -1
  14. package/dist/{index-CAEHQGLc.js → index-CmEQfuE3.js} +1 -1
  15. package/dist/index-D1pyb7RG.js +7371 -0
  16. package/dist/index-DeFzsyFF.js +7371 -0
  17. package/dist/index-Dpf0rd6w.js +7371 -0
  18. package/dist/index-UuEbsISo.js +7447 -0
  19. package/dist/index-e3Uw3YFO.js +7371 -0
  20. package/dist/src/embed/bodyless-conversation.d.ts +0 -4
  21. package/dist/src/embed/bodyless-conversation.d.ts.map +1 -1
  22. package/dist/src/react/index.d.ts +0 -2
  23. package/dist/src/react/index.d.ts.map +1 -1
  24. package/dist/src/types.d.ts +9 -253
  25. package/dist/src/types.d.ts.map +1 -1
  26. package/dist/src/utils/graphql/nlsService/conversation-service.d.ts.map +1 -1
  27. package/dist/tsembed-react.es.js +13 -267
  28. package/dist/tsembed-react.js +12 -266
  29. package/dist/tsembed.es.js +13 -267
  30. package/dist/tsembed.js +12 -266
  31. package/dist/visual-embed-sdk-react-full.d.ts +9 -259
  32. package/dist/visual-embed-sdk-react.d.ts +9 -259
  33. package/dist/visual-embed-sdk.d.ts +9 -257
  34. package/lib/package.json +1 -1
  35. package/lib/src/embed/liveboard.d.ts +2 -1
  36. package/lib/src/embed/liveboard.d.ts.map +1 -1
  37. package/lib/src/embed/liveboard.js +13 -8
  38. package/lib/src/embed/liveboard.js.map +1 -1
  39. package/lib/src/embed/ts-embed.d.ts +7 -0
  40. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  41. package/lib/src/embed/ts-embed.js +61 -7
  42. package/lib/src/embed/ts-embed.js.map +1 -1
  43. package/lib/src/types.d.ts +33 -64
  44. package/lib/src/types.d.ts.map +1 -1
  45. package/lib/src/types.js +33 -64
  46. package/lib/src/types.js.map +1 -1
  47. package/lib/src/visual-embed-sdk.d.ts +9 -257
  48. package/package.json +1 -2
  49. package/src/embed/liveboard.ts +14 -7
  50. package/src/embed/ts-embed.ts +84 -21
  51. package/src/types.ts +34 -64
@@ -1672,8 +1672,6 @@ declare module '@thoughtspot/visual-embed-sdk/embed/bodyless-conversation' {
1672
1672
  genNo: number;
1673
1673
  acSessionId: string;
1674
1674
  acGenNo: number;
1675
- convId: string;
1676
- messageId: string;
1677
1675
  }
1678
1676
  export class ConversationMessage extends TsEmbed {
1679
1677
  protected viewConfig: SpotterAgentMessageViewConfig;
@@ -1721,8 +1719,6 @@ declare module '@thoughtspot/visual-embed-sdk/embed/bodyless-conversation' {
1721
1719
  data?: undefined;
1722
1720
  } | {
1723
1721
  data: {
1724
- convId: any;
1725
- messageId: any;
1726
1722
  sessionId: any;
1727
1723
  genNo: any;
1728
1724
  acSessionId: any;
@@ -4486,7 +4482,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
4486
4482
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
4487
4483
  * @example
4488
4484
  *```js
4489
- * liveboardEmbed.on(EmbedEvent.LiveboardInfo, payload => {
4485
+ * liveboardEmbed.on(EmbedEvent.AnswerChartSwitcher, payload => {
4490
4486
  * console.log('Liveboard details', payload);
4491
4487
  * })
4492
4488
  *```
@@ -4859,84 +4855,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
4859
4855
  * @version SDK : 1.39.0 | ThoughtSpot : 10.10.0.cl
4860
4856
  * @hidden
4861
4857
  */
4862
- RequestVisibleEmbedCoordinates = "requestVisibleEmbedCoordinates",
4863
- /**
4864
- * Emitted when Spotter response is text data
4865
- * @example
4866
- * ```js
4867
- * spotterEmbed.on(EmbedEvent.SpotterData, (payload) => {
4868
- * console.log('payload', payload);
4869
- * })
4870
- *```
4871
- * @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
4872
- */
4873
- SpotterData = "SpotterData",
4874
- /**
4875
- * Emitted when user opens up the worksheet preview modal in Spotter embed.
4876
- * @example
4877
- * ```js
4878
- * spotterEmbed.on(EmbedEvent.PreviewSpotterData, (payload) => {
4879
- * console.log('payload', payload);
4880
- * })
4881
- *```
4882
- * @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
4883
- */
4884
- PreviewSpotterData = "PreviewSpotterData",
4885
- /**
4886
- * Emitted when the Spotter query is triggered in Spotter embed.
4887
- * @example
4888
- * ```js
4889
- * spotterEmbed.on(EmbedEvent.SpotterQueryTriggered, (payload) => {
4890
- * console.log('payload', payload);
4891
- * })
4892
- *```
4893
- * @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
4894
- */
4895
- SpotterQueryTriggered = "SpotterQueryTriggered",
4896
- /**
4897
- * Emitted when the last Spotter query is edited in Spotter embed.
4898
- * @example
4899
- * ```js
4900
- * spotterEmbed.on(EmbedEvent.LastPromptEdited, (payload) => {
4901
- * console.log('payload', payload);
4902
- * })
4903
- *```
4904
- * @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
4905
- */
4906
- LastPromptEdited = "LastPromptEdited",
4907
- /**
4908
- * Emitted when the last Spotter query is deleted in Spotter embed.
4909
- * @example
4910
- * ```js
4911
- * spotterEmbed.on(EmbedEvent.LastPromptDeleted, (payload) => {
4912
- * console.log('payload', payload);
4913
- * })
4914
- *```
4915
- * @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
4916
- */
4917
- LastPromptDeleted = "LastPromptDeleted",
4918
- /**
4919
- * Emitted when the coversation is reset in spotter embed.
4920
- * @example
4921
- * ```js
4922
- * spotterEmbed.on(EmbedEvent.ResetSpotterConversation, (payload) => {
4923
- * console.log('payload', payload);
4924
- * })
4925
- *```
4926
- * @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
4927
- */
4928
- ResetSpotterConversation = "ResetSpotterConversation",
4929
- /**
4930
- * Emitted when the *Spotter* is initialized.
4931
- * @example
4932
- * ```js
4933
- * spotterEmbed.on(EmbedEvent.SpotterInit, (payload) => {
4934
- * console.log('payload', payload);
4935
- * })
4936
- *```
4937
- * @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
4938
- */
4939
- SpotterInit = "spotterInit"
4858
+ RequestVisibleEmbedCoordinates = "requestVisibleEmbedCoordinates"
4940
4859
  }
4941
4860
  /**
4942
4861
  * Event types that can be triggered by the host application
@@ -4954,7 +4873,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
4954
4873
  * // create the liveboard embed.
4955
4874
  *
4956
4875
  * liveboardEmbed.trigger(HostEvent.UpdateRuntimeFilters, [
4957
- * { columnName: 'state', operator: RuntimeFilterOp.EQ, values: ["california"]}
4876
+ * { columnName: 'state, operator: RuntimeFilterOp.EQ, values: ['california']}
4958
4877
  * ]);
4959
4878
  * ```
4960
4879
  * @example
@@ -5024,7 +4943,6 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
5024
4943
  * done automatically on the most popular column.
5025
4944
  * @param - vizId [TS >= 9.8.0] - Optional. The GUID of the visualization to drill
5026
4945
  * in case of a Liveboard.
5027
- * @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
5028
4946
  * @example
5029
4947
  * ```js
5030
4948
  * searchEmbed.on(EmbedEvent.VizPointDoubleClick, (payload) => {
@@ -5163,12 +5081,12 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
5163
5081
  * Works with Search and Liveboard embed.
5164
5082
  * @param - { columnId: string,
5165
5083
  * name: string,
5166
- * type: ATTRIBUTE/MEASURE,
5167
- * dataType: INT64/CHAR/DATE }
5084
+ * type: INT64/CHAR/DATE,
5085
+ * dataType: ATTRIBUTE/MEASURE }
5168
5086
  * @example
5169
5087
  * ```js
5170
5088
  * searchEmbed.trigger(HostEvent.OpenFilter,
5171
- * {column: { columnId: '<column-GUID>', name: 'column name', type: 'ATTRIBUTE', dataType: 'INT64'}})
5089
+ * {column: { columnId: '<column-GUID>', name: 'column name', type: 'INT64', dataType: 'ATTRIBUTE'}})
5172
5090
  * ```
5173
5091
  * @example
5174
5092
  * ```js
@@ -5226,7 +5144,6 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
5226
5144
  * @param
5227
5145
  * `vizId`- GUID of the saved Answer or visualization to pin to a Liveboard.
5228
5146
  * Optional when pinning a new chart or table generated from a Search query.
5229
- * **Required** in Spotter Embed.
5230
5147
  * @param
5231
5148
  * `liveboardID` - GUID of the Liveboard to pin an Answer. If there is no Liveboard,
5232
5149
  * specify the `newLiveboardName` parameter to create a new Liveboard.
@@ -5274,12 +5191,6 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
5274
5191
  * ```js
5275
5192
  * appEmbed.trigger(HostEvent.Pin)
5276
5193
  * ```
5277
- * @example
5278
- * ```js
5279
- * const pinResponse = await spotterEmbed.trigger(HostEvent.Pin, {
5280
- * vizId:'730496d6-6903-4601-937e-2c691821af3c'
5281
- * });
5282
- * ```
5283
5194
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
5284
5195
  */
5285
5196
  Pin = "pin",
@@ -5344,21 +5255,12 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
5344
5255
  * Trigger the **Download PDF** action on an embedded Liveboard,
5345
5256
  * visualization or Answer.
5346
5257
  *
5347
- * @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
5348
- *
5349
5258
  * **NOTE**: The **Download** > **PDF** action is available on
5350
5259
  * visualizations and Answers if the data is in tabular format.
5351
5260
  * @example
5352
5261
  * ```js
5353
5262
  * liveboardEmbed.trigger(HostEvent.DownloadAsPdf)
5354
5263
  * ```
5355
- * @example
5356
- * ```js
5357
- * spotterEmbed.trigger(HostEvent.DownloadAsPdf, {
5358
- * vizId:'730496d6-6903-4601-937e-2c691821af3c'
5359
- * });
5360
- * ```
5361
- *
5362
5264
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
5363
5265
  */
5364
5266
  DownloadAsPdf = "downloadAsPdf",
@@ -5382,12 +5284,6 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
5382
5284
  * ```js
5383
5285
  * searchEmbed.trigger(HostEvent.MakeACopy)
5384
5286
  * ```
5385
- * @example
5386
- * ```js
5387
- * const pinResponse = await spotterEmbed.trigger(HostEvent.MakeACopy, {
5388
- * vizId:'730496d6-6903-4601-937e-2c691821af3c'
5389
- * });
5390
- * ```
5391
5287
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
5392
5288
  */
5393
5289
  MakeACopy = "makeACopy",
@@ -5460,8 +5356,6 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
5460
5356
  * This event is not supported in visualization embed and search embed.
5461
5357
  * @param - object - To trigger the action for a specific visualization
5462
5358
  * in Liveboard embed, pass in `vizId` as a key.
5463
- * @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
5464
- *
5465
5359
  * @example
5466
5360
  * ```js
5467
5361
  * liveboardEmbed.trigger(HostEvent.Edit)
@@ -5470,18 +5364,6 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
5470
5364
  * liveboardEmbed.trigger(HostEvent.Edit, {vizId:
5471
5365
  * '730496d6-6903-4601-937e-2c691821af3c'})
5472
5366
  * ```
5473
- * @example
5474
- * ```js
5475
- * const pinResponse = await spotterEmbed.trigger(HostEvent.Edit, {
5476
- * vizId:'730496d6-6903-4601-937e-2c691821af3c'
5477
- * });
5478
- * ```
5479
- * @example
5480
- * ```js
5481
- * const editResponse = await spotterEmbed.trigger(HostEvent.Edit, {
5482
- * vizId:'730496d6-6903-4601-937e-2c691821af3c'
5483
- * });
5484
- * ```
5485
5367
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
5486
5368
  */
5487
5369
  Edit = "edit",
@@ -5529,16 +5411,6 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
5529
5411
  * );
5530
5412
  * })
5531
5413
  * ```
5532
- * @example
5533
- * ```js
5534
- * spotterEmbed.trigger(HostEvent.GetTML, {
5535
- * vizId: '730496d6-6903-4601-937e-2c691821af3c'
5536
- * }).then((tml) => {
5537
- * console.log(
5538
- * tml.answer.search_query // TML representation of the search query
5539
- * );
5540
- * })
5541
- * ```
5542
5414
  * @version SDK: 1.18.0 | ThoughtSpot: 8.10.0.cl, 9.0.1.sw
5543
5415
  * @important
5544
5416
  */
@@ -5602,7 +5474,6 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
5602
5474
  /**
5603
5475
  * Trigger the **Download** action on charts in
5604
5476
  * the embedded view.
5605
- * @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
5606
5477
  * @example
5607
5478
  * ```js
5608
5479
  * liveboardEmbed.trigger(HostEvent.Download, {vizId:
@@ -5611,11 +5482,6 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
5611
5482
  * ```js
5612
5483
  * embed.trigger(HostEvent.Download)
5613
5484
  * ```
5614
- * ```js
5615
- * spotterEmbed.trigger(HostEvent.Download, {
5616
- * vizId:'730496d6-6903-4601-937e-2c691821af3c'
5617
- * });
5618
- * ```
5619
5485
  * @deprecated from SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl ,9.4.1.sw
5620
5486
  * Use {@link DownloadAsPng}
5621
5487
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
@@ -5632,19 +5498,13 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
5632
5498
  * vizEmbed.trigger(HostEvent.DownloadAsPng)
5633
5499
  *
5634
5500
  * searchEmbed.trigger(HostEvent.DownloadAsPng)
5635
- *
5636
- * spotterEmbed.trigger(HostEvent.DownloadAsPng, {
5637
- * vizId:"730496d6-6903-4601-937e-2c691821af3c"
5638
- * })
5639
5501
  * ```
5640
- *
5641
5502
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.1.sw
5642
5503
  */
5643
5504
  DownloadAsPng = "downloadAsPng",
5644
5505
  /**
5645
5506
  * Trigger the **Download** > **CSV** action on tables in
5646
5507
  * the embedded view.
5647
- * @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
5648
5508
  * @example
5649
5509
  * ```js
5650
5510
  * liveboardEmbed.trigger(HostEvent.DownloadAsCsv, {vizId:
@@ -5656,18 +5516,12 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
5656
5516
  * ```js
5657
5517
  * searchEmbed.trigger(HostEvent.DownloadAsCsv)
5658
5518
  * ```
5659
- * ```js
5660
- * spotterEmbed.trigger(HostEvent.DownloadAsCsv, {
5661
- * vizId:"730496d6-6903-4601-937e-2c691821af3c"
5662
- * })
5663
- * ```
5664
5519
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
5665
5520
  */
5666
5521
  DownloadAsCsv = "downloadAsCSV",
5667
5522
  /**
5668
5523
  * Trigger the **Download** > **XLSX** action on tables
5669
5524
  * in the embedded view.
5670
- * @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
5671
5525
  * @example
5672
5526
  * ```js
5673
5527
  * liveboardEmbed.trigger(HostEvent.DownloadAsXlsx, {vizId:
@@ -5679,11 +5533,6 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
5679
5533
  * ```js
5680
5534
  * searchEmbed.trigger(HostEvent.DownloadAsXlsx)
5681
5535
  * ```
5682
- * ```js
5683
- * spotterEmbed.trigger(HostEvent.downloadAsXLSX, {
5684
- * vizId:"730496d6-6903-4601-937e-2c691821af3c"
5685
- * })
5686
- * ```
5687
5536
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
5688
5537
  */
5689
5538
  DownloadAsXlsx = "downloadAsXLSX",
@@ -5703,7 +5552,6 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
5703
5552
  /**
5704
5553
  * Trigger the **Save** action on a Liveboard or Answer.
5705
5554
  * Saves the changes.
5706
- * @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
5707
5555
  * @example
5708
5556
  * ```js
5709
5557
  * liveboardEmbed.trigger(HostEvent.Save)
@@ -5711,11 +5559,6 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
5711
5559
  * ```js
5712
5560
  * searchEmbed.trigger(HostEvent.Save)
5713
5561
  * ```
5714
- * ```js
5715
- * spotterEmbed.trigger(HostEvent.Save, {
5716
- * vizId:"730496d6-6903-4601-937e-2c691821af3c"
5717
- * })
5718
- * ```
5719
5562
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
5720
5563
  */
5721
5564
  Save = "save",
@@ -5999,7 +5842,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
5999
5842
  ResetLiveboardPersonalisedView = "ResetLiveboardPersonalisedView",
6000
5843
  /**
6001
5844
  * Triggers an action to update Parameter values on embedded
6002
- * Answers, Liveboard and Spotter answer in Edit mode.
5845
+ * Answers and Liveboard.
6003
5846
  *
6004
5847
  * @example
6005
5848
  * ```js
@@ -6013,19 +5856,11 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
6013
5856
  UpdateParameters = "UpdateParameters",
6014
5857
  /**
6015
5858
  * Triggers GetParameters to fetch the runtime Parameters.
6016
- * @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
6017
5859
  * ```js
6018
5860
  * liveboardEmbed.trigger(HostEvent.GetParameters).then((parameter) => {
6019
5861
  * console.log('parameters', parameter);
6020
5862
  * });
6021
5863
  *```
6022
- *```js
6023
- * spotterEmbed.trigger(HostEvent.GetParameters, {
6024
- * vizId: '730496d6-6903-4601-937e-2c691821af3c'
6025
- * }).then((parameter) => {
6026
- * console.log('parameters', parameter);
6027
- * });
6028
- *```
6029
5864
  * @version SDK: 1.29.0 | ThoughtSpot: 10.1.0.cl, 10.1.0.sw
6030
5865
  */
6031
5866
  GetParameters = "GetParameters",
@@ -6057,7 +5892,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
6057
5892
  * @param - optional attributes to set Answer properties.
6058
5893
  * `name` - Name string for the Answer.
6059
5894
  * `description` - Description text for the Answer.
6060
- * @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
5895
+ *
6061
5896
  * @example
6062
5897
  * ```js
6063
5898
  * const saveAnswerResponse = await searchEmbed.trigger(HostEvent.SaveAnswer, {
@@ -6065,14 +5900,6 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
6065
5900
  * description: "Total sales by states in MidWest"
6066
5901
  * });
6067
5902
  * ```
6068
- * @example
6069
- * ```js
6070
- * const saveAnswerResponse = await spotterEmbed.trigger(HostEvent.SaveAnswer, {
6071
- * vizId: '730496d6-6903-4601-937e-2c691821af3c',
6072
- * name: "Sales by states",
6073
- * description: "Total sales by states in MidWest"
6074
- * });
6075
- * ```
6076
5903
  * @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
6077
5904
  */
6078
5905
  SaveAnswer = "saveAnswer",
@@ -6101,70 +5928,6 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
6101
5928
  * @version SDK: 1.37.0 | ThoughtSpot: 10.8.0.cl
6102
5929
  */
6103
5930
  TransformTableVizData = "TransformTableVizData",
6104
- /**
6105
- * Triggers a search operation with the search tokens specified in
6106
- * the search query string in spotter embed.
6107
- * @param - `query`: Text string in Natural Language format
6108
- * @param - `executeSearch`: Boolean to execute search and update search query
6109
- * @example
6110
- * ```js
6111
- * spotterEmbed.trigger(HostEvent.SpotterSearch, {
6112
- * query: 'revenue per year',
6113
- * executeSearch: true,
6114
- * })
6115
- * ```
6116
- * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
6117
- */
6118
- SpotterSearch = "SpotterSearch",
6119
- /**
6120
- * Edits the last prompt in spotter embed.
6121
- * @param - `query`: Text string
6122
- * @example
6123
- * ```js
6124
- * spotterEmbed.trigger(HostEvent.EditLastPrompt, "revenue per year");
6125
- * ```
6126
- * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
6127
- */
6128
- EditLastPrompt = "EditLastPrompt",
6129
- /**
6130
- * Opens the Worksheet preview modal in Spotter Embed.
6131
- * @example
6132
- * ```js
6133
- * spotterEmbed.trigger(HostEvent.PreviewSpotterData);
6134
- * ```
6135
- * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
6136
- */
6137
- PreviewSpotterData = "PreviewSpotterData",
6138
- /**
6139
- * Resets the Spotter Embed Conversation.
6140
- * @example
6141
- * ```js
6142
- * spotterEmbed.trigger(HostEvent.ResetSpotterConversation);
6143
- * ```
6144
- * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
6145
- */
6146
- ResetSpotterConversation = "ResetSpotterConversation",
6147
- /**
6148
- * Deletes the last prompt in spotter embed.
6149
- * @example
6150
- * ```js
6151
- * spotterEmbed.trigger(HostEvent.DeleteLastPrompt);
6152
- * ```
6153
- * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
6154
- */
6155
- DeleteLastPrompt = "DeleteLastPrompt",
6156
- /**
6157
- * Toggle the visualization to chart or table view.
6158
- * @param - `vizId ` refers to the answer id in spotter Embed, it is required in spotter Embed.
6159
- * @example
6160
- * ```js
6161
- * spotterEmbed.trigger(HostEvent.AnswerChartSwitcher, {
6162
- * vizId:'b535c760-8bbe-4e6f-bb26-af56b4129a1e'
6163
- * });
6164
- *```
6165
- * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
6166
- */
6167
- AnswerChartSwitcher = "answerChartSwitcher",
6168
5931
  /**
6169
5932
  * @hidden
6170
5933
  * Trigger exit from presentation mode when user exits fullscreen.
@@ -6187,18 +5950,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
6187
5950
  *
6188
5951
  * @hidden
6189
5952
  */
6190
- VisibleEmbedCoordinates = "visibleEmbedCoordinates",
6191
- /**
6192
- * Trigger the *Ask Spotter* action for visualizations
6193
- * @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
6194
- * @example
6195
- * ```js
6196
- * spotterEmbed.trigger(HostEvent.AskSpotter,
6197
- * {vizId:'730496d6-6903-4601-937e-2c691821af3c'})
6198
- * ```
6199
- * @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
6200
- */
6201
- AskSpotter = "AskSpotter"
5953
+ VisibleEmbedCoordinates = "visibleEmbedCoordinates"
6202
5954
  }
6203
5955
  /**
6204
5956
  * The different visual modes that the data sources panel within
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thoughtspot/visual-embed-sdk",
3
- "version": "1.40.0",
3
+ "version": "1.40.1-alpha.1",
4
4
  "description": "ThoughtSpot Embed SDK",
5
5
  "module": "lib/src/index.js",
6
6
  "main": "dist/tsembed.js",
@@ -57,7 +57,6 @@
57
57
  "test": "npm run test-sdk",
58
58
  "posttest": "cat ./coverage/sdk/lcov.info | coveralls",
59
59
  "is-publish-allowed": "node scripts/is-publish-allowed.js",
60
- "prepublishOnly": "npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build",
61
60
  "check-size": "npm run build && size-limit",
62
61
  "publish-dev": "npm publish --tag dev",
63
62
  "publish-prod": "npm publish --tag latest",
@@ -645,16 +645,20 @@ export class LiveboardEmbed extends V1Embed {
645
645
  }
646
646
 
647
647
  protected beforePrerenderVisible(): void {
648
- const embedObj = (this.insertedDomEl as any)?.[this.embedNodeKey] as LiveboardEmbed;
648
+ const embedObj = this.getPreRenderObj<LiveboardEmbed>();
649
649
 
650
650
  if (isUndefined(embedObj)) return;
651
651
 
652
- const showDifferentLib = this.viewConfig.liveboardId
653
- && embedObj.viewConfig.liveboardId !== this.viewConfig.liveboardId;
652
+ const showDifferentLib = this.currentLiveboardId
653
+ && embedObj.currentLiveboardId !== this.currentLiveboardId;
654
654
 
655
655
  if (showDifferentLib) {
656
- const libId = this.viewConfig.liveboardId;
657
- this.navigateToLiveboard(libId);
656
+ console.log('showDifferentLib', this.currentLiveboardId);
657
+ const libId = this.currentLiveboardId;
658
+ this.navigateToLiveboard(libId, null, null, () => {
659
+ console.log('onNavigateCalled', libId);
660
+ embedObj.currentLiveboardId = libId;
661
+ });
658
662
  }
659
663
  }
660
664
 
@@ -729,13 +733,16 @@ export class LiveboardEmbed extends V1Embed {
729
733
  return this;
730
734
  }
731
735
 
732
- public navigateToLiveboard(liveboardId: string, vizId?: string, activeTabId?: string) {
736
+ public currentLiveboardId: string = this.viewConfig.liveboardId;
737
+
738
+ public navigateToLiveboard(liveboardId: string, vizId?: string, activeTabId?: string, onNavigateCalled?: () => void) {
733
739
  const path = this.getIframeSuffixSrc(liveboardId, vizId, activeTabId);
734
740
  this.viewConfig.liveboardId = liveboardId;
735
741
  this.viewConfig.activeTabId = activeTabId;
736
742
  this.viewConfig.vizId = vizId;
737
743
  if (this.isRendered) {
738
- this.trigger(HostEvent.Navigate, path.substring(1));
744
+ console.log('navigating to liveboard', path.substring(1));
745
+ this.triggerAfterLoad(HostEvent.Navigate, path.substring(1), onNavigateCalled);
739
746
  } else if (this.viewConfig.preRenderId) {
740
747
  this.preRender(true);
741
748
  } else {