@thoughtspot/visual-embed-sdk 1.53.1 → 1.53.2-beta

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 (97) hide show
  1. package/cjs/package.json +1 -1
  2. package/cjs/src/auth.d.ts.map +1 -1
  3. package/cjs/src/auth.js +25 -6
  4. package/cjs/src/auth.js.map +1 -1
  5. package/cjs/src/auth.spec.js +40 -8
  6. package/cjs/src/auth.spec.js.map +1 -1
  7. package/cjs/src/contracts/contracts.spec.js +165 -2
  8. package/cjs/src/contracts/contracts.spec.js.map +1 -1
  9. package/cjs/src/contracts/embed-event-payloads.d.ts +212 -14
  10. package/cjs/src/contracts/embed-event-payloads.d.ts.map +1 -1
  11. package/cjs/src/contracts/host-event-contracts.d.ts +1 -0
  12. package/cjs/src/contracts/host-event-contracts.d.ts.map +1 -1
  13. package/cjs/src/css-variables.d.ts +140 -0
  14. package/cjs/src/css-variables.d.ts.map +1 -1
  15. package/cjs/src/embed/auto-frame-renderer.d.ts +14 -1
  16. package/cjs/src/embed/auto-frame-renderer.d.ts.map +1 -1
  17. package/cjs/src/embed/auto-frame-renderer.js +91 -2
  18. package/cjs/src/embed/auto-frame-renderer.js.map +1 -1
  19. package/cjs/src/embed/auto-frame-renderer.spec.js +112 -7
  20. package/cjs/src/embed/auto-frame-renderer.spec.js.map +1 -1
  21. package/cjs/src/embed/host-events.spec.js +18 -0
  22. package/cjs/src/embed/host-events.spec.js.map +1 -1
  23. package/cjs/src/embed/liveboard.spec.js +42 -0
  24. package/cjs/src/embed/liveboard.spec.js.map +1 -1
  25. package/cjs/src/react/util.d.ts +8 -1
  26. package/cjs/src/react/util.d.ts.map +1 -1
  27. package/cjs/src/react/util.js.map +1 -1
  28. package/cjs/src/types.d.ts +181 -1
  29. package/cjs/src/types.d.ts.map +1 -1
  30. package/cjs/src/types.js +180 -0
  31. package/cjs/src/types.js.map +1 -1
  32. package/dist/{index-CrBnZBZv.js → index-DQ7r5f1z.js} +1 -1
  33. package/dist/src/auth.d.ts.map +1 -1
  34. package/dist/src/contracts/embed-event-payloads.d.ts +212 -14
  35. package/dist/src/contracts/embed-event-payloads.d.ts.map +1 -1
  36. package/dist/src/contracts/host-event-contracts.d.ts +1 -0
  37. package/dist/src/contracts/host-event-contracts.d.ts.map +1 -1
  38. package/dist/src/css-variables.d.ts +140 -0
  39. package/dist/src/css-variables.d.ts.map +1 -1
  40. package/dist/src/embed/auto-frame-renderer.d.ts +14 -1
  41. package/dist/src/embed/auto-frame-renderer.d.ts.map +1 -1
  42. package/dist/src/react/util.d.ts +8 -1
  43. package/dist/src/react/util.d.ts.map +1 -1
  44. package/dist/src/types.d.ts +181 -1
  45. package/dist/src/types.d.ts.map +1 -1
  46. package/dist/tsembed-react.es.js +230 -9
  47. package/dist/tsembed-react.js +229 -8
  48. package/dist/tsembed.es.js +298 -10
  49. package/dist/tsembed.js +297 -9
  50. package/dist/visual-embed-sdk-react-full.d.ts +534 -13
  51. package/dist/visual-embed-sdk-react.d.ts +531 -11
  52. package/dist/visual-embed-sdk.d.ts +527 -12
  53. package/lib/package.json +1 -1
  54. package/lib/src/auth.d.ts.map +1 -1
  55. package/lib/src/auth.js +25 -6
  56. package/lib/src/auth.js.map +1 -1
  57. package/lib/src/auth.spec.js +40 -8
  58. package/lib/src/auth.spec.js.map +1 -1
  59. package/lib/src/contracts/contracts.spec.js +165 -2
  60. package/lib/src/contracts/contracts.spec.js.map +1 -1
  61. package/lib/src/contracts/embed-event-payloads.d.ts +212 -14
  62. package/lib/src/contracts/embed-event-payloads.d.ts.map +1 -1
  63. package/lib/src/contracts/host-event-contracts.d.ts +1 -0
  64. package/lib/src/contracts/host-event-contracts.d.ts.map +1 -1
  65. package/lib/src/css-variables.d.ts +140 -0
  66. package/lib/src/css-variables.d.ts.map +1 -1
  67. package/lib/src/embed/auto-frame-renderer.d.ts +14 -1
  68. package/lib/src/embed/auto-frame-renderer.d.ts.map +1 -1
  69. package/lib/src/embed/auto-frame-renderer.js +91 -2
  70. package/lib/src/embed/auto-frame-renderer.js.map +1 -1
  71. package/lib/src/embed/auto-frame-renderer.spec.js +113 -8
  72. package/lib/src/embed/auto-frame-renderer.spec.js.map +1 -1
  73. package/lib/src/embed/host-events.spec.js +18 -0
  74. package/lib/src/embed/host-events.spec.js.map +1 -1
  75. package/lib/src/embed/liveboard.spec.js +42 -0
  76. package/lib/src/embed/liveboard.spec.js.map +1 -1
  77. package/lib/src/react/util.d.ts +8 -1
  78. package/lib/src/react/util.d.ts.map +1 -1
  79. package/lib/src/react/util.js.map +1 -1
  80. package/lib/src/types.d.ts +181 -1
  81. package/lib/src/types.d.ts.map +1 -1
  82. package/lib/src/types.js +180 -0
  83. package/lib/src/types.js.map +1 -1
  84. package/lib/src/visual-embed-sdk.d.ts +527 -12
  85. package/package.json +1 -1
  86. package/src/auth.spec.ts +47 -11
  87. package/src/auth.ts +35 -6
  88. package/src/contracts/contracts.spec.ts +182 -3
  89. package/src/contracts/embed-event-payloads.ts +281 -14
  90. package/src/contracts/host-event-contracts.ts +1 -0
  91. package/src/css-variables.ts +168 -0
  92. package/src/embed/auto-frame-renderer.spec.ts +134 -8
  93. package/src/embed/auto-frame-renderer.ts +103 -2
  94. package/src/embed/host-events.spec.ts +24 -0
  95. package/src/embed/liveboard.spec.ts +45 -0
  96. package/src/react/util.ts +13 -1
  97. package/src/types.ts +181 -0
package/dist/tsembed.js CHANGED
@@ -1,4 +1,4 @@
1
- /* @thoughtspot/visual-embed-sdk version 1.53.1 */
1
+ /* @thoughtspot/visual-embed-sdk version 1.53.2-beta */
2
2
  'use client';
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
@@ -477,6 +477,7 @@
477
477
  * })
478
478
  * ```
479
479
  * @returns isLoggedIn - A Boolean specifying whether authentication was successful.
480
+ * Payload: {@link AuthInitPayload}.
480
481
  */
481
482
  EmbedEvent["AuthInit"] = "authInit";
482
483
  /**
@@ -496,6 +497,7 @@
496
497
  /**
497
498
  * Data pertaining to an Answer, Liveboard or Spotter visualization is received.
498
499
  * The event payload includes the raw data of the object.
500
+ * Payload: {@link DataEventPayload}.
499
501
  * @return data - Answer of Liveboard data
500
502
  * @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
501
503
  * @example
@@ -509,6 +511,7 @@
509
511
  EmbedEvent["Data"] = "data";
510
512
  /**
511
513
  * Search query has been updated by the user.
514
+ * Payload: {@link QueryChangedPayload} or a string.
512
515
  * @version SDK: 1.4.0 | ThoughtSpot: ts7.sep.cl, 8.4.1.sw
513
516
  * @example
514
517
  * ```js
@@ -551,6 +554,7 @@
551
554
  * })
552
555
  * })
553
556
  * ```
557
+ * Payload: {@link DrilldownPayload}.
554
558
  */
555
559
  EmbedEvent["Drilldown"] = "drillDown";
556
560
  /**
@@ -563,6 +567,7 @@
563
567
  * console.log('DataSourceSelected', payload);
564
568
  * })
565
569
  * ```
570
+ * Payload: {@link DataSourceSelectedPayload} or string[].
566
571
  */
567
572
  EmbedEvent["DataSourceSelected"] = "dataSourceSelected";
568
573
  /**
@@ -575,6 +580,7 @@
575
580
  * console.log('AddRemoveColumns', payload);
576
581
  * })
577
582
  * ```
583
+ * Payload: string[].
578
584
  */
579
585
  EmbedEvent["AddRemoveColumns"] = "addRemoveColumns";
580
586
  /**
@@ -592,6 +598,7 @@
592
598
  * }
593
599
  * })
594
600
  * ```
601
+ * Payload: {@link CustomActionPayload} (on() enriches it to {@link CustomActionEventPayload}).
595
602
  */
596
603
  EmbedEvent["CustomAction"] = "customAction";
597
604
  /**
@@ -604,6 +611,7 @@
604
611
  * console.log('VizPointDoubleClick', payload);
605
612
  * })
606
613
  * ```
614
+ * Payload: {@link VizInteractionPayload}.
607
615
  */
608
616
  EmbedEvent["VizPointDoubleClick"] = "vizPointDoubleClick";
609
617
  /**
@@ -623,6 +631,7 @@
623
631
  * )
624
632
  * });
625
633
  * ```
634
+ * Payload: {@link VizInteractionPayload}.
626
635
  */
627
636
  EmbedEvent["VizPointClick"] = "vizPointClick";
628
637
  /**
@@ -675,6 +684,7 @@
675
684
  * // { errorType: "API", message: '...', code: '...' }
676
685
  * });
677
686
  * ```
687
+ * Payload: {@link EmbedErrorPayload} or a string.
678
688
  */
679
689
  EmbedEvent["Error"] = "Error";
680
690
  /**
@@ -725,6 +735,7 @@
725
735
  * The center of visible iframe viewport is calculated.
726
736
  * @returns data - The center of the visible Iframe viewport.
727
737
  * @hidden
738
+ * Payload: none.
728
739
  */
729
740
  EmbedEvent["EmbedIframeCenter"] = "EmbedIframeCenter";
730
741
  /**
@@ -781,6 +792,7 @@
781
792
  * console.log('dialog open', payload);
782
793
  * })
783
794
  * ```
795
+ * Payload: none.
784
796
  */
785
797
  EmbedEvent["DialogOpen"] = "dialog-open";
786
798
  /**
@@ -792,6 +804,7 @@
792
804
  * console.log('dialog close', payload);
793
805
  * })
794
806
  * ```
807
+ * Payload: none.
795
808
  */
796
809
  EmbedEvent["DialogClose"] = "dialog-close";
797
810
  /**
@@ -814,6 +827,7 @@
814
827
  * embed.trigger(HostEvent.SetVisibleVizs, ['viz1', 'viz2']);
815
828
  * };
816
829
  * ```
830
+ * Payload: none.
817
831
  */
818
832
  EmbedEvent["LiveboardRendered"] = "PinboardRendered";
819
833
  /**
@@ -844,6 +858,7 @@
844
858
  * console.log('Save', payload)
845
859
  * })
846
860
  * ```
861
+ * Payload: {@link SaveEventPayload}.
847
862
  */
848
863
  EmbedEvent["Save"] = "save";
849
864
  /**
@@ -860,6 +875,7 @@
860
875
  * vizId: '730496d6-6903-4601-937e-2c691821af3c'
861
876
  * })
862
877
  * ```
878
+ * Payload: {@link VizScope}.
863
879
  */
864
880
  EmbedEvent["Download"] = "download";
865
881
  /**
@@ -879,6 +895,7 @@
879
895
  * searchEmbed.on(EmbedEvent.DownloadAsPng, payload => {
880
896
  * console.log('download PNG', payload)})
881
897
  * ```
898
+ * Payload: {@link DownloadEventPayload}.
882
899
  */
883
900
  EmbedEvent["DownloadAsPng"] = "downloadAsPng";
884
901
  /**
@@ -898,6 +915,7 @@
898
915
  * searchEmbed.on(EmbedEvent.DownloadAsPdf, payload => {
899
916
  * console.log('download PDF', payload)})
900
917
  * ```
918
+ * Payload: {@link DownloadEventPayload}.
901
919
  */
902
920
  EmbedEvent["DownloadAsPdf"] = "downloadAsPdf";
903
921
  /**
@@ -917,6 +935,7 @@
917
935
  * searchEmbed.on(EmbedEvent.DownloadAsCsv, payload => {
918
936
  * console.log('download CSV', payload)})
919
937
  * ```
938
+ * Payload: {@link DownloadEventPayload}.
920
939
  */
921
940
  EmbedEvent["DownloadAsCsv"] = "downloadAsCsv";
922
941
  /**
@@ -936,6 +955,7 @@
936
955
  * searchEmbed.on(EmbedEvent.DownloadAsXlsx, payload => {
937
956
  * console.log('download Xlsx', payload)})
938
957
  * ```
958
+ * Payload: {@link DownloadEventPayload}.
939
959
  */
940
960
  EmbedEvent["DownloadAsXlsx"] = "downloadAsXlsx";
941
961
  /**
@@ -947,6 +967,7 @@
947
967
  * liveboardEmbed.on(EmbedEvent.DownloadLiveboardAsContinuousPDF, payload => {
948
968
  * console.log('download liveboard as continuous PDF', payload)})
949
969
  * ```
970
+ * Payload: {@link LiveboardScope}.
950
971
  */
951
972
  EmbedEvent["DownloadLiveboardAsContinuousPDF"] = "downloadLiveboardAsContinuousPDF";
952
973
  /**
@@ -963,6 +984,7 @@
963
984
  * appEmbed.on(EmbedEvent.AnswerDelete, payload => {
964
985
  * console.log('delete answer', payload)})
965
986
  * ```
987
+ * Payload: {@link AnswerScope}.
966
988
  */
967
989
  EmbedEvent["AnswerDelete"] = "answerDelete";
968
990
  /**
@@ -974,6 +996,7 @@
974
996
  * console.log('AI Highlights', payload);
975
997
  * })
976
998
  * ```
999
+ * Payload: {@link LiveboardScope}.
977
1000
  */
978
1001
  EmbedEvent["AIHighlights"] = "AIHighlights";
979
1002
  /**
@@ -995,6 +1018,7 @@
995
1018
  * console.log('pin', payload)
996
1019
  * })
997
1020
  * ```
1021
+ * Payload: {@link PinEventPayload}.
998
1022
  */
999
1023
  EmbedEvent["Pin"] = "pin";
1000
1024
  /**
@@ -1013,6 +1037,7 @@
1013
1037
  * console.log('SpotIQ analyze', payload)
1014
1038
  * })
1015
1039
  * ```
1040
+ * Payload: {@link AnswerScope}.
1016
1041
  */
1017
1042
  EmbedEvent["SpotIQAnalyze"] = "spotIQAnalyze";
1018
1043
  /**
@@ -1066,6 +1091,7 @@
1066
1091
  * console.log('copy to clipboard', payload);
1067
1092
  * })
1068
1093
  * ```
1094
+ * Payload: {@link CopyToClipboardPayload}.
1069
1095
  */
1070
1096
  EmbedEvent["CopyToClipboard"] = "context-menu-item-copy-to-clipboard";
1071
1097
  /**
@@ -1077,6 +1103,7 @@
1077
1103
  * liveboardEmbed.on(EmbedEvent.UpdateTML)
1078
1104
  * })
1079
1105
  * ```
1106
+ * Payload: {@link TmlEventPayload}.
1080
1107
  */
1081
1108
  EmbedEvent["UpdateTML"] = "updateTSL";
1082
1109
  /**
@@ -1089,6 +1116,7 @@
1089
1116
  * console.log('Edit TML', payload);
1090
1117
  * })
1091
1118
  * ```
1119
+ * Payload: {@link TmlEventPayload}.
1092
1120
  */
1093
1121
  EmbedEvent["EditTML"] = "editTSL";
1094
1122
  /**
@@ -1106,6 +1134,7 @@
1106
1134
  * searchEmbed.on(EmbedEvent.ExportTML, payload => {
1107
1135
  * console.log('Export TML', payload)})
1108
1136
  * ```
1137
+ * Payload: {@link TmlEventPayload}.
1109
1138
  */
1110
1139
  EmbedEvent["ExportTML"] = "exportTSL";
1111
1140
  /**
@@ -1144,6 +1173,7 @@
1144
1173
  * console.log('show data', payload);
1145
1174
  * })
1146
1175
  * ```
1176
+ * Payload: {@link AnswerScope}.
1147
1177
  */
1148
1178
  EmbedEvent["ShowUnderlyingData"] = "showUnderlyingData";
1149
1179
  /**
@@ -1155,6 +1185,7 @@
1155
1185
  * console.log('switch view', payload);
1156
1186
  * })
1157
1187
  * ```
1188
+ * Payload: {@link AnswerChartSwitcherPayload}.
1158
1189
  */
1159
1190
  EmbedEvent["AnswerChartSwitcher"] = "answerChartSwitcher";
1160
1191
  /**
@@ -1176,6 +1207,7 @@
1176
1207
  * console.log('Liveboard details', payload);
1177
1208
  * })
1178
1209
  * ```
1210
+ * Payload: {@link LiveboardScope}.
1179
1211
  */
1180
1212
  EmbedEvent["LiveboardInfo"] = "pinboardInfo";
1181
1213
  /**
@@ -1187,6 +1219,7 @@
1187
1219
  * console.log('favorites', payload);
1188
1220
  * })
1189
1221
  * ```
1222
+ * Payload: {@link FavoritePayload}.
1190
1223
  */
1191
1224
  EmbedEvent["AddToFavorites"] = "addToFavorites";
1192
1225
  /**
@@ -1198,6 +1231,7 @@
1198
1231
  * console.log('Liveboard schedule', payload);
1199
1232
  * })
1200
1233
  * ```
1234
+ * Payload: {@link LiveboardScope}.
1201
1235
  */
1202
1236
  EmbedEvent["Schedule"] = "subscription";
1203
1237
  /**
@@ -1212,6 +1246,7 @@
1212
1246
  * console.log('Liveboard edit', payload);
1213
1247
  * })
1214
1248
  * ```
1249
+ * Payload: {@link LiveboardVizScope}.
1215
1250
  */
1216
1251
  EmbedEvent["Edit"] = "edit";
1217
1252
  /**
@@ -1253,6 +1288,7 @@
1253
1288
  * console.log('Copy', payload);
1254
1289
  * })
1255
1290
  * ```
1291
+ * Payload: {@link MakeACopyPayload}.
1256
1292
  */
1257
1293
  EmbedEvent["MakeACopy"] = "makeACopy";
1258
1294
  /**
@@ -1268,6 +1304,7 @@
1268
1304
  * vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1269
1305
  * })
1270
1306
  * ```
1307
+ * Payload: {@link LiveboardVizScope}.
1271
1308
  */
1272
1309
  EmbedEvent["Present"] = "present";
1273
1310
  /**
@@ -1278,6 +1315,7 @@
1278
1315
  * liveboardEmbed.on(EmbedEvent.Delete,
1279
1316
  * {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1280
1317
  * ```
1318
+ * Payload: {@link LiveboardScope}.
1281
1319
  */
1282
1320
  EmbedEvent["Delete"] = "delete";
1283
1321
  /**
@@ -1287,6 +1325,7 @@
1287
1325
  * ```js
1288
1326
  * liveboardEmbed.on(EmbedEvent.SchedulesList)
1289
1327
  * ```
1328
+ * Payload: {@link LiveboardScope}.
1290
1329
  */
1291
1330
  EmbedEvent["SchedulesList"] = "schedule-list";
1292
1331
  /**
@@ -1296,6 +1335,7 @@
1296
1335
  * ```js
1297
1336
  * liveboardEmbed.on(EmbedEvent.Cancel)
1298
1337
  * ```
1338
+ * Payload: {@link LiveboardScope}.
1299
1339
  */
1300
1340
  EmbedEvent["Cancel"] = "cancel";
1301
1341
  /**
@@ -1306,6 +1346,7 @@
1306
1346
  * liveboardEmbed.on(EmbedEvent.Explore, {
1307
1347
  * vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1308
1348
  * ```
1349
+ * Payload: {@link LiveboardVizScope}.
1309
1350
  */
1310
1351
  EmbedEvent["Explore"] = "explore";
1311
1352
  /**
@@ -1316,6 +1357,7 @@
1316
1357
  * liveboardEmbed.on(EmbedEvent.CopyLink, {
1317
1358
  * vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1318
1359
  * ```
1360
+ * Payload: {@link CopyLinkPayload}.
1319
1361
  */
1320
1362
  EmbedEvent["CopyLink"] = "embedDocument";
1321
1363
  /**
@@ -1327,6 +1369,7 @@
1327
1369
  * liveboardEmbed.on(EmbedEvent.CrossFilterChanged, {
1328
1370
  * vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1329
1371
  * ```
1372
+ * Payload: {@link CrossFilterChangedPayload}.
1330
1373
  */
1331
1374
  EmbedEvent["CrossFilterChanged"] = "cross-filter-changed";
1332
1375
  /**
@@ -1338,6 +1381,7 @@
1338
1381
  * console.log('VizPointClick', payload)
1339
1382
  * })
1340
1383
  * ```
1384
+ * Payload: {@link VizInteractionPayload}.
1341
1385
  */
1342
1386
  EmbedEvent["VizPointRightClick"] = "vizPointRightClick";
1343
1387
  /**
@@ -1365,6 +1409,7 @@
1365
1409
  * })
1366
1410
  * ```
1367
1411
  * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl, 9.5.0.sw
1412
+ * Payload: {@link FilterChangedPayload}.
1368
1413
  */
1369
1414
  EmbedEvent["FilterChanged"] = "filterChanged";
1370
1415
  /**
@@ -1387,6 +1432,7 @@
1387
1432
  * @returns isPublic: boolean
1388
1433
  * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
1389
1434
  * @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
1435
+ * Payload: {@link PersonalisedViewPayload}.
1390
1436
  */
1391
1437
  EmbedEvent["UpdatePersonalisedView"] = "updatePersonalisedView";
1392
1438
  /**
@@ -1408,6 +1454,7 @@
1408
1454
  * @returns isPublic: boolean
1409
1455
  * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
1410
1456
  * @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
1457
+ * Payload: {@link PersonalisedViewPayload}.
1411
1458
  */
1412
1459
  EmbedEvent["SavePersonalisedView"] = "savePersonalisedView";
1413
1460
  /**
@@ -1482,6 +1529,7 @@
1482
1529
  /**
1483
1530
  * Emitted when a Liveboard or visualization is renamed.
1484
1531
  * @version SDK: 1.28.0 | ThoughtSpot: 9.10.5.cl, 10.1.0.sw
1532
+ * Payload: {@link RenamePayload}.
1485
1533
  */
1486
1534
  EmbedEvent["Rename"] = "rename";
1487
1535
  /**
@@ -1567,6 +1615,7 @@
1567
1615
  * })
1568
1616
  * ```
1569
1617
  * @version SDK: 1.29.0 | ThoughtSpot: 10.3.0.cl
1618
+ * Payload: {@link ParameterChangedPayload}.
1570
1619
  */
1571
1620
  EmbedEvent["ParameterChanged"] = "parameterChanged";
1572
1621
  /**
@@ -1610,6 +1659,7 @@
1610
1659
  * })
1611
1660
  * ```
1612
1661
  * @version SDK: 1.37.0 | ThoughtSpot: 10.8.0.cl
1662
+ * Payload: {@link TableVizRenderedPayload}.
1613
1663
  */
1614
1664
  EmbedEvent["TableVizRendered"] = "TableVizRendered";
1615
1665
  /**
@@ -1634,12 +1684,14 @@
1634
1684
  * @hidden
1635
1685
  * Emitted when a user exits present mode.
1636
1686
  * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
1687
+ * Payload: {@link ExitPresentModePayload}.
1637
1688
  */
1638
1689
  EmbedEvent["ExitPresentMode"] = "exitPresentMode";
1639
1690
  /**
1640
1691
  * Emitted when a user requests the full height lazy load data.
1641
1692
  * @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
1642
1693
  * @hidden
1694
+ * Payload: none.
1643
1695
  */
1644
1696
  EmbedEvent["RequestVisibleEmbedCoordinates"] = "requestVisibleEmbedCoordinates";
1645
1697
  /**
@@ -1673,6 +1725,7 @@
1673
1725
  * })
1674
1726
  * ```
1675
1727
  * @version SDK: 1.45.0 | ThoughtSpot: 26.2.0.cl
1728
+ * Payload: {@link VizScope}.
1676
1729
  */
1677
1730
  EmbedEvent["AddToCoaching"] = "addToCoaching";
1678
1731
  /**
@@ -1762,6 +1815,7 @@
1762
1815
  * console.log('EmbedListenerReady');
1763
1816
  * })
1764
1817
  * ```
1818
+ * Payload: none.
1765
1819
  */
1766
1820
  EmbedEvent["EmbedListenerReady"] = "EmbedListenerReady";
1767
1821
  /**
@@ -2136,6 +2190,7 @@
2136
2190
  * })
2137
2191
  * ```
2138
2192
  * @version SDK: 1.48.0 | ThoughtSpot Cloud: 26.5.0.cl
2193
+ * Payload: {@link TestScheduleEmailPayload}.
2139
2194
  */
2140
2195
  EmbedEvent["SendTestScheduleEmail"] = "sendTestScheduleEmail";
2141
2196
  /**
@@ -2647,6 +2702,19 @@
2647
2702
  * ```
2648
2703
  */
2649
2704
  HostEvent["OpenAddParameterModal"] = "openAddParameterModal";
2705
+ /**
2706
+ * Add a tab to the Liveboard, the same action as the *Tab* option in the
2707
+ * *Add* dropdown in the Liveboard edit header.
2708
+ *
2709
+ * The Liveboard must be in edit mode; the event is ignored otherwise.
2710
+ *
2711
+ * @version SDK: 1.56.0 | ThoughtSpot Cloud: 27.1.0.cl
2712
+ * @example
2713
+ * ```js
2714
+ * liveboardEmbed.trigger(HostEvent.OpenAddTabModal);
2715
+ * ```
2716
+ */
2717
+ HostEvent["OpenAddTabModal"] = "openAddTabModal";
2650
2718
  /**
2651
2719
  * Open the parameter panel for a particular parameter on a Liveboard.
2652
2720
  * Mirrors {@link HostEvent.OpenFilter} for parameters.
@@ -4866,6 +4934,7 @@
4866
4934
  * @version SDK: 1.52.2 | ThoughtSpot Cloud: 26.9.0.cl
4867
4935
  */
4868
4936
  Param["TsmcpAnswerIndex"] = "tsmcpAnswerIndex";
4937
+ Param["IsMcpAnswerEmbed"] = "isMcpAnswerEmbed";
4869
4938
  Param["EmbedApp"] = "embedApp";
4870
4939
  Param["DataSources"] = "dataSources";
4871
4940
  Param["DataSourceMode"] = "dataSourceMode";
@@ -5068,6 +5137,21 @@
5068
5137
  exports.Action = void 0;
5069
5138
  (function (Action) {
5070
5139
  /**
5140
+ * The **Add** button on a Liveboard in edit mode.
5141
+ * Controls the visibility and disabled state of the Add panel button
5142
+ * in the Liveboard edit toolbar, which allows users to add
5143
+ * visualizations, filters, parameters, and tabs.
5144
+ * @example
5145
+ * ```js
5146
+ * hiddenActions: [Action.LiveboardAddPanel]
5147
+ * // or
5148
+ * disabledActions: [Action.LiveboardAddPanel]
5149
+ * ```
5150
+ * @version SDK: 1.56.0 | ThoughtSpot Cloud: 27.1.0.cl
5151
+ */
5152
+ Action["LiveboardAddPanel"] = "liveboardAddPanel";
5153
+ /**
5154
+ *
5071
5155
  * The **Save** action on an Answer or Liveboard.
5072
5156
  * Allows users to save the changes.
5073
5157
  * @example
@@ -7321,6 +7405,102 @@
7321
7405
  * ```
7322
7406
  */
7323
7407
  Action["Cancel"] = "cancel";
7408
+ /**
7409
+ * Controls the visibility and disabled state of the "Version history" menu item for a Liveboard or Answer.
7410
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 9.8.0.cl
7411
+ * @example
7412
+ * ```js
7413
+ * {
7414
+ * hiddenActions: [Action.ShowVersionHistory],
7415
+ * disabledActions: [Action.ShowVersionHistory],
7416
+ * }
7417
+ * ```
7418
+ */
7419
+ Action["ShowVersionHistory"] = "showVersionHistory";
7420
+ /**
7421
+ * Controls the visibility and disabled state of the "Enable version control" menu item for a Liveboard or Answer.
7422
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 9.10.0.cl
7423
+ * @example
7424
+ * ```js
7425
+ * {
7426
+ * hiddenActions: [Action.EnableVersionControl],
7427
+ * disabledActions: [Action.EnableVersionControl],
7428
+ * }
7429
+ * ```
7430
+ */
7431
+ Action["EnableVersionControl"] = "enableVersionControl";
7432
+ /**
7433
+ * Controls the visibility and disabled state of the "Disable version control" menu item for a Liveboard or Answer.
7434
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 9.10.0.cl
7435
+ * @example
7436
+ * ```js
7437
+ * {
7438
+ * hiddenActions: [Action.DisableVersionControl],
7439
+ * disabledActions: [Action.DisableVersionControl],
7440
+ * }
7441
+ * ```
7442
+ */
7443
+ Action["DisableVersionControl"] = "disableVersionControl";
7444
+ /**
7445
+ * Controls the visibility and disabled state of the "Withdraw verification" menu item for a verified Liveboard.
7446
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 9.8.0.cl
7447
+ * @example
7448
+ * ```js
7449
+ * {
7450
+ * hiddenActions: [Action.WithdrawVerification],
7451
+ * disabledActions: [Action.WithdrawVerification],
7452
+ * }
7453
+ * ```
7454
+ */
7455
+ Action["WithdrawVerification"] = "withdrawVerification";
7456
+ /**
7457
+ * Controls the visibility and disabled state of the "Switch to new chart experience" menu item on an Answer.
7458
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 10.10.0.cl
7459
+ * @example
7460
+ * ```js
7461
+ * {
7462
+ * hiddenActions: [Action.SwitchToNewChartExperience],
7463
+ * disabledActions: [Action.SwitchToNewChartExperience],
7464
+ * }
7465
+ * ```
7466
+ */
7467
+ Action["SwitchToNewChartExperience"] = "switchToNewChartExperience";
7468
+ /**
7469
+ * Controls the visibility and disabled state of the "Switch to classic chart experience" menu item on an Answer.
7470
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 10.10.0.cl
7471
+ * @example
7472
+ * ```js
7473
+ * {
7474
+ * hiddenActions: [Action.SwitchToClassicChartExperience],
7475
+ * disabledActions: [Action.SwitchToClassicChartExperience],
7476
+ * }
7477
+ * ```
7478
+ */
7479
+ Action["SwitchToClassicChartExperience"] = "switchToClassicChartExperience";
7480
+ /**
7481
+ * Controls the visibility and disabled state of the "Monitor" menu item on an Answer, which includes the alert options.
7482
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 10.5.0.cl
7483
+ * @example
7484
+ * ```js
7485
+ * {
7486
+ * hiddenActions: [Action.Monitor],
7487
+ * disabledActions: [Action.Monitor],
7488
+ * }
7489
+ * ```
7490
+ */
7491
+ Action["Monitor"] = "monitor";
7492
+ /**
7493
+ * Controls the visibility and disabled state of the "View explanation" button in the footer of a Spotter answer, which opens the explanation and verification details.
7494
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
7495
+ * @example
7496
+ * ```js
7497
+ * {
7498
+ * hiddenActions: [Action.SpotterViewExplanation],
7499
+ * disabledActions: [Action.SpotterViewExplanation],
7500
+ * }
7501
+ * ```
7502
+ */
7503
+ Action["SpotterViewExplanation"] = "spotterViewExplanation";
7324
7504
  })(exports.Action || (exports.Action = {}));
7325
7505
  exports.PrefetchFeatures = void 0;
7326
7506
  (function (PrefetchFeatures) {
@@ -7825,7 +8005,7 @@
7825
8005
  TableContentDensity["Compact"] = "COMPACT";
7826
8006
  })(exports.TableContentDensity || (exports.TableContentDensity = {}));
7827
8007
 
7828
- var version$1="1.53.1";var pkg = {version:version$1};
8008
+ var version$1="1.53.2-beta";var pkg = {version:version$1};
7829
8009
 
7830
8010
  const { version } = pkg;
7831
8011
 
@@ -21096,11 +21276,13 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
21096
21276
  * @param ssoURL
21097
21277
  * @param triggerContainer
21098
21278
  * @param triggerText
21279
+ * @param thoughtSpotHost
21099
21280
  */
21100
- async function samlPopupFlow(ssoURL, triggerContainer, triggerText) {
21281
+ async function samlPopupFlow(ssoURL, triggerContainer, triggerText, thoughtSpotHost) {
21282
+ const thoughtSpotOrigin = new URL(thoughtSpotHost).origin;
21101
21283
  let popupClosedCheck;
21102
21284
  const openPopup = () => {
21103
- if (samlAuthWindow === null || samlAuthWindow.closed) {
21285
+ if (!samlAuthWindow || samlAuthWindow.closed) {
21104
21286
  samlAuthWindow = window.open(ssoURL, '_blank', 'location=no,height=570,width=520,scrollbars=yes,status=yes');
21105
21287
  if (samlAuthWindow) {
21106
21288
  popupClosedCheck = setInterval(() => {
@@ -21128,7 +21310,14 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
21128
21310
  }
21129
21311
  samlCompletionPromise = samlCompletionPromise || new Promise((resolve, reject) => {
21130
21312
  window.addEventListener('message', (e) => {
21131
- if (e.data.type === exports.EmbedEvent.SAMLComplete) {
21313
+ var _a;
21314
+ // Only the SSO popup we opened, on the ThoughtSpot origin, may
21315
+ // complete the flow or hand us a token; anything else could
21316
+ // inject an attacker's token into the auth cache.
21317
+ if (e.origin !== thoughtSpotOrigin || !samlAuthWindow || e.source !== samlAuthWindow) {
21318
+ return;
21319
+ }
21320
+ if (((_a = e.data) === null || _a === void 0 ? void 0 : _a.type) === exports.EmbedEvent.SAMLComplete) {
21132
21321
  if (e.data.accessToken) {
21133
21322
  const decodedToken = decodeURIComponent(e.data.accessToken);
21134
21323
  storeAuthTokenInCache(decodedToken);
@@ -21169,7 +21358,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
21169
21358
  }
21170
21359
  const ssoURL = `${thoughtSpotHost}${ssoEndPoint}`;
21171
21360
  if (embedConfig.inPopup) {
21172
- await samlPopupFlow(ssoURL, embedConfig.authTriggerContainer, embedConfig.authTriggerText);
21361
+ await samlPopupFlow(ssoURL, embedConfig.authTriggerContainer, embedConfig.authTriggerText, thoughtSpotHost);
21173
21362
  const cachedToken = getCacheAuthToken();
21174
21363
  if (cachedToken) {
21175
21364
  loggedInStatus = true;
@@ -21181,12 +21370,22 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
21181
21370
  }
21182
21371
  window.location.href = ssoURL;
21183
21372
  };
21373
+ /**
21374
+ * The popup's SSO completion page. hostAppOrigin tells ThoughtSpot which
21375
+ * origin opened the popup; the cluster only posts a token back to it if it
21376
+ * is an allowed redirect domain.
21377
+ * @param thoughtSpotHost
21378
+ */
21379
+ const getSSOCompletePageUrl = (thoughtSpotHost) => {
21380
+ const hostAppOrigin = encodeURIComponent(window.location.origin);
21381
+ return `${thoughtSpotHost}/v2/#/embed/saml-complete?hostAppOrigin=${hostAppOrigin}`;
21382
+ };
21184
21383
  const doSamlAuth = async (embedConfig) => {
21185
21384
  const { thoughtSpotHost } = embedConfig;
21186
21385
  // redirect for SSO, when the SSO authentication is done, this page will be
21187
21386
  // loaded again and the same JS will execute again.
21188
21387
  const ssoRedirectUrl = embedConfig.inPopup
21189
- ? `${thoughtSpotHost}/v2/#/embed/saml-complete`
21388
+ ? getSSOCompletePageUrl(thoughtSpotHost)
21190
21389
  : getRedirectUrl(window.location.href, SSO_REDIRECTION_MARKER_GUID, embedConfig.redirectPath);
21191
21390
  // bring back the page to the same URL
21192
21391
  const ssoEndPoint = `${EndPoints.SAML_LOGIN_TEMPLATE(encodeURIComponent(ssoRedirectUrl))}`;
@@ -21198,7 +21397,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
21198
21397
  // redirect for SSO, when the SSO authentication is done, this page will be
21199
21398
  // loaded again and the same JS will execute again.
21200
21399
  const ssoRedirectUrl = embedConfig.noRedirect || embedConfig.inPopup
21201
- ? `${thoughtSpotHost}/v2/#/embed/saml-complete`
21400
+ ? getSSOCompletePageUrl(thoughtSpotHost)
21202
21401
  : getRedirectUrl(window.location.href, SSO_REDIRECTION_MARKER_GUID, embedConfig.redirectPath);
21203
21402
  // bring back the page to the same URL
21204
21403
  const baseEndpoint = `${EndPoints.OIDC_LOGIN_TEMPLATE(encodeURIComponent(ssoRedirectUrl))}`;
@@ -27460,6 +27659,27 @@ query GetEurekaResults($params: Input_eureka_SearchRequest) {
27460
27659
  */
27461
27660
  const CONVERSATION_SERVICE_PATH = '/conversation/v2';
27462
27661
  const DEFAULT_STALE_ANSWER_NOTICE = 'This data may have changed since the last time you had a chat.';
27662
+ /**
27663
+ * Actions hidden by default on Answers rendered by the ThoughtSpot MCP server
27664
+ * (iframes carrying the `tsmcp=true` marker). Applied automatically by
27665
+ * {@link AutoFrameRenderer} so the auto-rendered answer exposes a curated set of
27666
+ * controls: Pin/Save/Download at the top level, Aggregate/Filter/Sort/Position in
27667
+ * the column menu, and Exclude/Only include/Drill down/Show underlying data in the
27668
+ * axis menu remain visible, while the actions below are removed.
27669
+ *
27670
+ * This is a denylist merged into {@link Param.HideActions}; anything not listed
27671
+ * here stays visible. It is skipped when the caller supplies a `visibleActions`
27672
+ * allowlist (see {@link AutoFrameRenderer.getEmbedParamsObject}).
27673
+ */
27674
+ const HiddenActionItemByDefaultForMCPAnswers = [
27675
+ exports.Action.Edit,
27676
+ exports.Action.InConversationTraining,
27677
+ exports.Action.AxisMenuConditionalFormat,
27678
+ exports.Action.AxisMenuRename,
27679
+ exports.Action.AxisMenuEdit,
27680
+ exports.Action.AxisMenuRemove,
27681
+ exports.Action.MakeACopy,
27682
+ ];
27463
27683
  /**
27464
27684
  * Starts an automatic renderer that watches the DOM for iframes containing
27465
27685
  * the `tsmcp=true` query parameter and replaces them with fully configured
@@ -27627,6 +27847,36 @@ query GetEurekaResults($params: Input_eureka_SearchRequest) {
27627
27847
  request.then(release, release);
27628
27848
  return request;
27629
27849
  }
27850
+ /**
27851
+ * Normalizes a `hideAction` value into an array of action ids. The SDK-side value
27852
+ * is already an `Action[]`; a value coming off the source iframe URL is a string
27853
+ * that may be a JSON array (`["edit","save"]`) or a comma-separated list.
27854
+ */
27855
+ function parseHideActions(value) {
27856
+ if (Array.isArray(value)) {
27857
+ return value;
27858
+ }
27859
+ if (typeof value !== 'string' || value === '') {
27860
+ return [];
27861
+ }
27862
+ try {
27863
+ const parsed = JSON.parse(value);
27864
+ if (Array.isArray(parsed)) {
27865
+ return parsed.map(String);
27866
+ }
27867
+ }
27868
+ catch (e) {
27869
+ // Not JSON — fall back to a comma-separated list.
27870
+ }
27871
+ return value.split(',').map((s) => s.trim()).filter(Boolean);
27872
+ }
27873
+ /**
27874
+ * Unions two `hideAction` values (SDK-computed and source-iframe) into a single
27875
+ * de-duplicated array of action ids.
27876
+ */
27877
+ function unionHideActions(sdkValue, sourceValue) {
27878
+ return Array.from(new Set([...parseHideActions(sdkValue), ...parseHideActions(sourceValue)]));
27879
+ }
27630
27880
  function isTSMCPIframe(iframe) {
27631
27881
  try {
27632
27882
  const url = new URL(iframe.src);
@@ -27653,11 +27903,41 @@ query GetEurekaResults($params: Input_eureka_SearchRequest) {
27653
27903
  super(container, viewConfig);
27654
27904
  this.viewConfig = viewConfig;
27655
27905
  }
27906
+ /**
27907
+ * Extends the base embed params with the curated MCP-answer denylist
27908
+ * ({@link HiddenActionItemByDefaultForMCPAnswers}) and a marker letting
27909
+ * the ThoughtSpot app detect this answer was rendered via the MCP
27910
+ * auto-frame-renderer ({@link Param.IsMcpAnswerEmbed}).
27911
+ *
27912
+ * Precedence — merge, allowlist wins:
27913
+ * - When the caller supplies a `visibleActions` allowlist, the base already
27914
+ * set {@link Param.VisibleActions}; the denylist is skipped so the allowlist
27915
+ * fully controls visibility.
27916
+ * - Otherwise the denylist is unioned onto {@link Param.HideActions}, which the
27917
+ * base has already populated with the default hidden actions plus any
27918
+ * caller-supplied `hiddenActions`.
27919
+ */
27920
+ getEmbedParamsObject() {
27921
+ const queryParams = super.getEmbedParamsObject();
27922
+ if (!queryParams[Param.VisibleActions]) {
27923
+ // `additionalFlags` can override this with a non-array value, so
27924
+ // normalize it rather than spreading it directly.
27925
+ queryParams[Param.HideActions] = unionHideActions(queryParams[Param.HideActions], HiddenActionItemByDefaultForMCPAnswers);
27926
+ }
27927
+ queryParams[Param.IsMcpAnswerEmbed] = true;
27928
+ return queryParams;
27929
+ }
27656
27930
  /**
27657
27931
  * Builds the final iframe `src` by merging the SDK embed parameters
27658
27932
  * with the query parameters already present on the source iframe URL.
27933
+ *
27659
27934
  * The `tsmcp` marker param is removed so it does not propagate to the
27660
- * ThoughtSpot application.
27935
+ * ThoughtSpot application. This is not just cosmetic: `tsmcp=true` is
27936
+ * also how {@link isTSMCPIframe} recognizes an iframe as one this
27937
+ * renderer must process. If the marker survived onto the iframe this
27938
+ * class inserts, the same {@link MutationObserver} would immediately
27939
+ * detect its own output as a new MCP iframe and re-process it, causing
27940
+ * infinite recursive replacement. Do not re-add `tsmcp` here.
27661
27941
  *
27662
27942
  * @param sourceSrc - The original iframe's `src` URL string.
27663
27943
  * @param preserveSourceUrl - When true, return the source URL unchanged.
@@ -27675,7 +27955,15 @@ query GetEurekaResults($params: Input_eureka_SearchRequest) {
27675
27955
  // Replay markers address the SDK, not the ThoughtSpot application.
27676
27956
  delete existingQueryParamsObject[Param.TsmcpConversationId];
27677
27957
  delete existingQueryParamsObject[Param.TsmcpAnswerIndex];
27958
+ // Source-iframe params win over SDK params on merge. Hidden actions
27959
+ // are the exception: union them so a `hideAction` on the source iframe
27960
+ // does not clobber the SDK-computed denylist (and vice versa).
27961
+ const mergedHideActions = unionHideActions(queryParams[Param.HideActions], existingQueryParamsObject[Param.HideActions]);
27962
+ delete existingQueryParamsObject[Param.HideActions];
27678
27963
  const mergedQueryParams = { ...queryParams, ...existingQueryParamsObject };
27964
+ if (mergedHideActions.length) {
27965
+ mergedQueryParams[Param.HideActions] = mergedHideActions;
27966
+ }
27679
27967
  const mergedQueryParamsString = getQueryParamString(mergedQueryParams, true);
27680
27968
  const queryString = mergedQueryParamsString ? `?${mergedQueryParamsString}` : '';
27681
27969
  const hash = resolved