@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
@@ -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 _mergeNamespaces(n, m) {
4
4
  m.forEach(function (e) {
@@ -471,6 +471,7 @@ var EmbedEvent;
471
471
  * })
472
472
  * ```
473
473
  * @returns isLoggedIn - A Boolean specifying whether authentication was successful.
474
+ * Payload: {@link AuthInitPayload}.
474
475
  */
475
476
  EmbedEvent["AuthInit"] = "authInit";
476
477
  /**
@@ -490,6 +491,7 @@ var EmbedEvent;
490
491
  /**
491
492
  * Data pertaining to an Answer, Liveboard or Spotter visualization is received.
492
493
  * The event payload includes the raw data of the object.
494
+ * Payload: {@link DataEventPayload}.
493
495
  * @return data - Answer of Liveboard data
494
496
  * @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
495
497
  * @example
@@ -503,6 +505,7 @@ var EmbedEvent;
503
505
  EmbedEvent["Data"] = "data";
504
506
  /**
505
507
  * Search query has been updated by the user.
508
+ * Payload: {@link QueryChangedPayload} or a string.
506
509
  * @version SDK: 1.4.0 | ThoughtSpot: ts7.sep.cl, 8.4.1.sw
507
510
  * @example
508
511
  * ```js
@@ -545,6 +548,7 @@ var EmbedEvent;
545
548
  * })
546
549
  * })
547
550
  * ```
551
+ * Payload: {@link DrilldownPayload}.
548
552
  */
549
553
  EmbedEvent["Drilldown"] = "drillDown";
550
554
  /**
@@ -557,6 +561,7 @@ var EmbedEvent;
557
561
  * console.log('DataSourceSelected', payload);
558
562
  * })
559
563
  * ```
564
+ * Payload: {@link DataSourceSelectedPayload} or string[].
560
565
  */
561
566
  EmbedEvent["DataSourceSelected"] = "dataSourceSelected";
562
567
  /**
@@ -569,6 +574,7 @@ var EmbedEvent;
569
574
  * console.log('AddRemoveColumns', payload);
570
575
  * })
571
576
  * ```
577
+ * Payload: string[].
572
578
  */
573
579
  EmbedEvent["AddRemoveColumns"] = "addRemoveColumns";
574
580
  /**
@@ -586,6 +592,7 @@ var EmbedEvent;
586
592
  * }
587
593
  * })
588
594
  * ```
595
+ * Payload: {@link CustomActionPayload} (on() enriches it to {@link CustomActionEventPayload}).
589
596
  */
590
597
  EmbedEvent["CustomAction"] = "customAction";
591
598
  /**
@@ -598,6 +605,7 @@ var EmbedEvent;
598
605
  * console.log('VizPointDoubleClick', payload);
599
606
  * })
600
607
  * ```
608
+ * Payload: {@link VizInteractionPayload}.
601
609
  */
602
610
  EmbedEvent["VizPointDoubleClick"] = "vizPointDoubleClick";
603
611
  /**
@@ -617,6 +625,7 @@ var EmbedEvent;
617
625
  * )
618
626
  * });
619
627
  * ```
628
+ * Payload: {@link VizInteractionPayload}.
620
629
  */
621
630
  EmbedEvent["VizPointClick"] = "vizPointClick";
622
631
  /**
@@ -669,6 +678,7 @@ var EmbedEvent;
669
678
  * // { errorType: "API", message: '...', code: '...' }
670
679
  * });
671
680
  * ```
681
+ * Payload: {@link EmbedErrorPayload} or a string.
672
682
  */
673
683
  EmbedEvent["Error"] = "Error";
674
684
  /**
@@ -719,6 +729,7 @@ var EmbedEvent;
719
729
  * The center of visible iframe viewport is calculated.
720
730
  * @returns data - The center of the visible Iframe viewport.
721
731
  * @hidden
732
+ * Payload: none.
722
733
  */
723
734
  EmbedEvent["EmbedIframeCenter"] = "EmbedIframeCenter";
724
735
  /**
@@ -775,6 +786,7 @@ var EmbedEvent;
775
786
  * console.log('dialog open', payload);
776
787
  * })
777
788
  * ```
789
+ * Payload: none.
778
790
  */
779
791
  EmbedEvent["DialogOpen"] = "dialog-open";
780
792
  /**
@@ -786,6 +798,7 @@ var EmbedEvent;
786
798
  * console.log('dialog close', payload);
787
799
  * })
788
800
  * ```
801
+ * Payload: none.
789
802
  */
790
803
  EmbedEvent["DialogClose"] = "dialog-close";
791
804
  /**
@@ -808,6 +821,7 @@ var EmbedEvent;
808
821
  * embed.trigger(HostEvent.SetVisibleVizs, ['viz1', 'viz2']);
809
822
  * };
810
823
  * ```
824
+ * Payload: none.
811
825
  */
812
826
  EmbedEvent["LiveboardRendered"] = "PinboardRendered";
813
827
  /**
@@ -838,6 +852,7 @@ var EmbedEvent;
838
852
  * console.log('Save', payload)
839
853
  * })
840
854
  * ```
855
+ * Payload: {@link SaveEventPayload}.
841
856
  */
842
857
  EmbedEvent["Save"] = "save";
843
858
  /**
@@ -854,6 +869,7 @@ var EmbedEvent;
854
869
  * vizId: '730496d6-6903-4601-937e-2c691821af3c'
855
870
  * })
856
871
  * ```
872
+ * Payload: {@link VizScope}.
857
873
  */
858
874
  EmbedEvent["Download"] = "download";
859
875
  /**
@@ -873,6 +889,7 @@ var EmbedEvent;
873
889
  * searchEmbed.on(EmbedEvent.DownloadAsPng, payload => {
874
890
  * console.log('download PNG', payload)})
875
891
  * ```
892
+ * Payload: {@link DownloadEventPayload}.
876
893
  */
877
894
  EmbedEvent["DownloadAsPng"] = "downloadAsPng";
878
895
  /**
@@ -892,6 +909,7 @@ var EmbedEvent;
892
909
  * searchEmbed.on(EmbedEvent.DownloadAsPdf, payload => {
893
910
  * console.log('download PDF', payload)})
894
911
  * ```
912
+ * Payload: {@link DownloadEventPayload}.
895
913
  */
896
914
  EmbedEvent["DownloadAsPdf"] = "downloadAsPdf";
897
915
  /**
@@ -911,6 +929,7 @@ var EmbedEvent;
911
929
  * searchEmbed.on(EmbedEvent.DownloadAsCsv, payload => {
912
930
  * console.log('download CSV', payload)})
913
931
  * ```
932
+ * Payload: {@link DownloadEventPayload}.
914
933
  */
915
934
  EmbedEvent["DownloadAsCsv"] = "downloadAsCsv";
916
935
  /**
@@ -930,6 +949,7 @@ var EmbedEvent;
930
949
  * searchEmbed.on(EmbedEvent.DownloadAsXlsx, payload => {
931
950
  * console.log('download Xlsx', payload)})
932
951
  * ```
952
+ * Payload: {@link DownloadEventPayload}.
933
953
  */
934
954
  EmbedEvent["DownloadAsXlsx"] = "downloadAsXlsx";
935
955
  /**
@@ -941,6 +961,7 @@ var EmbedEvent;
941
961
  * liveboardEmbed.on(EmbedEvent.DownloadLiveboardAsContinuousPDF, payload => {
942
962
  * console.log('download liveboard as continuous PDF', payload)})
943
963
  * ```
964
+ * Payload: {@link LiveboardScope}.
944
965
  */
945
966
  EmbedEvent["DownloadLiveboardAsContinuousPDF"] = "downloadLiveboardAsContinuousPDF";
946
967
  /**
@@ -957,6 +978,7 @@ var EmbedEvent;
957
978
  * appEmbed.on(EmbedEvent.AnswerDelete, payload => {
958
979
  * console.log('delete answer', payload)})
959
980
  * ```
981
+ * Payload: {@link AnswerScope}.
960
982
  */
961
983
  EmbedEvent["AnswerDelete"] = "answerDelete";
962
984
  /**
@@ -968,6 +990,7 @@ var EmbedEvent;
968
990
  * console.log('AI Highlights', payload);
969
991
  * })
970
992
  * ```
993
+ * Payload: {@link LiveboardScope}.
971
994
  */
972
995
  EmbedEvent["AIHighlights"] = "AIHighlights";
973
996
  /**
@@ -989,6 +1012,7 @@ var EmbedEvent;
989
1012
  * console.log('pin', payload)
990
1013
  * })
991
1014
  * ```
1015
+ * Payload: {@link PinEventPayload}.
992
1016
  */
993
1017
  EmbedEvent["Pin"] = "pin";
994
1018
  /**
@@ -1007,6 +1031,7 @@ var EmbedEvent;
1007
1031
  * console.log('SpotIQ analyze', payload)
1008
1032
  * })
1009
1033
  * ```
1034
+ * Payload: {@link AnswerScope}.
1010
1035
  */
1011
1036
  EmbedEvent["SpotIQAnalyze"] = "spotIQAnalyze";
1012
1037
  /**
@@ -1060,6 +1085,7 @@ var EmbedEvent;
1060
1085
  * console.log('copy to clipboard', payload);
1061
1086
  * })
1062
1087
  * ```
1088
+ * Payload: {@link CopyToClipboardPayload}.
1063
1089
  */
1064
1090
  EmbedEvent["CopyToClipboard"] = "context-menu-item-copy-to-clipboard";
1065
1091
  /**
@@ -1071,6 +1097,7 @@ var EmbedEvent;
1071
1097
  * liveboardEmbed.on(EmbedEvent.UpdateTML)
1072
1098
  * })
1073
1099
  * ```
1100
+ * Payload: {@link TmlEventPayload}.
1074
1101
  */
1075
1102
  EmbedEvent["UpdateTML"] = "updateTSL";
1076
1103
  /**
@@ -1083,6 +1110,7 @@ var EmbedEvent;
1083
1110
  * console.log('Edit TML', payload);
1084
1111
  * })
1085
1112
  * ```
1113
+ * Payload: {@link TmlEventPayload}.
1086
1114
  */
1087
1115
  EmbedEvent["EditTML"] = "editTSL";
1088
1116
  /**
@@ -1100,6 +1128,7 @@ var EmbedEvent;
1100
1128
  * searchEmbed.on(EmbedEvent.ExportTML, payload => {
1101
1129
  * console.log('Export TML', payload)})
1102
1130
  * ```
1131
+ * Payload: {@link TmlEventPayload}.
1103
1132
  */
1104
1133
  EmbedEvent["ExportTML"] = "exportTSL";
1105
1134
  /**
@@ -1138,6 +1167,7 @@ var EmbedEvent;
1138
1167
  * console.log('show data', payload);
1139
1168
  * })
1140
1169
  * ```
1170
+ * Payload: {@link AnswerScope}.
1141
1171
  */
1142
1172
  EmbedEvent["ShowUnderlyingData"] = "showUnderlyingData";
1143
1173
  /**
@@ -1149,6 +1179,7 @@ var EmbedEvent;
1149
1179
  * console.log('switch view', payload);
1150
1180
  * })
1151
1181
  * ```
1182
+ * Payload: {@link AnswerChartSwitcherPayload}.
1152
1183
  */
1153
1184
  EmbedEvent["AnswerChartSwitcher"] = "answerChartSwitcher";
1154
1185
  /**
@@ -1170,6 +1201,7 @@ var EmbedEvent;
1170
1201
  * console.log('Liveboard details', payload);
1171
1202
  * })
1172
1203
  * ```
1204
+ * Payload: {@link LiveboardScope}.
1173
1205
  */
1174
1206
  EmbedEvent["LiveboardInfo"] = "pinboardInfo";
1175
1207
  /**
@@ -1181,6 +1213,7 @@ var EmbedEvent;
1181
1213
  * console.log('favorites', payload);
1182
1214
  * })
1183
1215
  * ```
1216
+ * Payload: {@link FavoritePayload}.
1184
1217
  */
1185
1218
  EmbedEvent["AddToFavorites"] = "addToFavorites";
1186
1219
  /**
@@ -1192,6 +1225,7 @@ var EmbedEvent;
1192
1225
  * console.log('Liveboard schedule', payload);
1193
1226
  * })
1194
1227
  * ```
1228
+ * Payload: {@link LiveboardScope}.
1195
1229
  */
1196
1230
  EmbedEvent["Schedule"] = "subscription";
1197
1231
  /**
@@ -1206,6 +1240,7 @@ var EmbedEvent;
1206
1240
  * console.log('Liveboard edit', payload);
1207
1241
  * })
1208
1242
  * ```
1243
+ * Payload: {@link LiveboardVizScope}.
1209
1244
  */
1210
1245
  EmbedEvent["Edit"] = "edit";
1211
1246
  /**
@@ -1247,6 +1282,7 @@ var EmbedEvent;
1247
1282
  * console.log('Copy', payload);
1248
1283
  * })
1249
1284
  * ```
1285
+ * Payload: {@link MakeACopyPayload}.
1250
1286
  */
1251
1287
  EmbedEvent["MakeACopy"] = "makeACopy";
1252
1288
  /**
@@ -1262,6 +1298,7 @@ var EmbedEvent;
1262
1298
  * vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1263
1299
  * })
1264
1300
  * ```
1301
+ * Payload: {@link LiveboardVizScope}.
1265
1302
  */
1266
1303
  EmbedEvent["Present"] = "present";
1267
1304
  /**
@@ -1272,6 +1309,7 @@ var EmbedEvent;
1272
1309
  * liveboardEmbed.on(EmbedEvent.Delete,
1273
1310
  * {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1274
1311
  * ```
1312
+ * Payload: {@link LiveboardScope}.
1275
1313
  */
1276
1314
  EmbedEvent["Delete"] = "delete";
1277
1315
  /**
@@ -1281,6 +1319,7 @@ var EmbedEvent;
1281
1319
  * ```js
1282
1320
  * liveboardEmbed.on(EmbedEvent.SchedulesList)
1283
1321
  * ```
1322
+ * Payload: {@link LiveboardScope}.
1284
1323
  */
1285
1324
  EmbedEvent["SchedulesList"] = "schedule-list";
1286
1325
  /**
@@ -1290,6 +1329,7 @@ var EmbedEvent;
1290
1329
  * ```js
1291
1330
  * liveboardEmbed.on(EmbedEvent.Cancel)
1292
1331
  * ```
1332
+ * Payload: {@link LiveboardScope}.
1293
1333
  */
1294
1334
  EmbedEvent["Cancel"] = "cancel";
1295
1335
  /**
@@ -1300,6 +1340,7 @@ var EmbedEvent;
1300
1340
  * liveboardEmbed.on(EmbedEvent.Explore, {
1301
1341
  * vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1302
1342
  * ```
1343
+ * Payload: {@link LiveboardVizScope}.
1303
1344
  */
1304
1345
  EmbedEvent["Explore"] = "explore";
1305
1346
  /**
@@ -1310,6 +1351,7 @@ var EmbedEvent;
1310
1351
  * liveboardEmbed.on(EmbedEvent.CopyLink, {
1311
1352
  * vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1312
1353
  * ```
1354
+ * Payload: {@link CopyLinkPayload}.
1313
1355
  */
1314
1356
  EmbedEvent["CopyLink"] = "embedDocument";
1315
1357
  /**
@@ -1321,6 +1363,7 @@ var EmbedEvent;
1321
1363
  * liveboardEmbed.on(EmbedEvent.CrossFilterChanged, {
1322
1364
  * vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1323
1365
  * ```
1366
+ * Payload: {@link CrossFilterChangedPayload}.
1324
1367
  */
1325
1368
  EmbedEvent["CrossFilterChanged"] = "cross-filter-changed";
1326
1369
  /**
@@ -1332,6 +1375,7 @@ var EmbedEvent;
1332
1375
  * console.log('VizPointClick', payload)
1333
1376
  * })
1334
1377
  * ```
1378
+ * Payload: {@link VizInteractionPayload}.
1335
1379
  */
1336
1380
  EmbedEvent["VizPointRightClick"] = "vizPointRightClick";
1337
1381
  /**
@@ -1359,6 +1403,7 @@ var EmbedEvent;
1359
1403
  * })
1360
1404
  * ```
1361
1405
  * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl, 9.5.0.sw
1406
+ * Payload: {@link FilterChangedPayload}.
1362
1407
  */
1363
1408
  EmbedEvent["FilterChanged"] = "filterChanged";
1364
1409
  /**
@@ -1381,6 +1426,7 @@ var EmbedEvent;
1381
1426
  * @returns isPublic: boolean
1382
1427
  * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
1383
1428
  * @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
1429
+ * Payload: {@link PersonalisedViewPayload}.
1384
1430
  */
1385
1431
  EmbedEvent["UpdatePersonalisedView"] = "updatePersonalisedView";
1386
1432
  /**
@@ -1402,6 +1448,7 @@ var EmbedEvent;
1402
1448
  * @returns isPublic: boolean
1403
1449
  * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
1404
1450
  * @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
1451
+ * Payload: {@link PersonalisedViewPayload}.
1405
1452
  */
1406
1453
  EmbedEvent["SavePersonalisedView"] = "savePersonalisedView";
1407
1454
  /**
@@ -1476,6 +1523,7 @@ var EmbedEvent;
1476
1523
  /**
1477
1524
  * Emitted when a Liveboard or visualization is renamed.
1478
1525
  * @version SDK: 1.28.0 | ThoughtSpot: 9.10.5.cl, 10.1.0.sw
1526
+ * Payload: {@link RenamePayload}.
1479
1527
  */
1480
1528
  EmbedEvent["Rename"] = "rename";
1481
1529
  /**
@@ -1561,6 +1609,7 @@ var EmbedEvent;
1561
1609
  * })
1562
1610
  * ```
1563
1611
  * @version SDK: 1.29.0 | ThoughtSpot: 10.3.0.cl
1612
+ * Payload: {@link ParameterChangedPayload}.
1564
1613
  */
1565
1614
  EmbedEvent["ParameterChanged"] = "parameterChanged";
1566
1615
  /**
@@ -1604,6 +1653,7 @@ var EmbedEvent;
1604
1653
  * })
1605
1654
  * ```
1606
1655
  * @version SDK: 1.37.0 | ThoughtSpot: 10.8.0.cl
1656
+ * Payload: {@link TableVizRenderedPayload}.
1607
1657
  */
1608
1658
  EmbedEvent["TableVizRendered"] = "TableVizRendered";
1609
1659
  /**
@@ -1628,12 +1678,14 @@ var EmbedEvent;
1628
1678
  * @hidden
1629
1679
  * Emitted when a user exits present mode.
1630
1680
  * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
1681
+ * Payload: {@link ExitPresentModePayload}.
1631
1682
  */
1632
1683
  EmbedEvent["ExitPresentMode"] = "exitPresentMode";
1633
1684
  /**
1634
1685
  * Emitted when a user requests the full height lazy load data.
1635
1686
  * @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
1636
1687
  * @hidden
1688
+ * Payload: none.
1637
1689
  */
1638
1690
  EmbedEvent["RequestVisibleEmbedCoordinates"] = "requestVisibleEmbedCoordinates";
1639
1691
  /**
@@ -1667,6 +1719,7 @@ var EmbedEvent;
1667
1719
  * })
1668
1720
  * ```
1669
1721
  * @version SDK: 1.45.0 | ThoughtSpot: 26.2.0.cl
1722
+ * Payload: {@link VizScope}.
1670
1723
  */
1671
1724
  EmbedEvent["AddToCoaching"] = "addToCoaching";
1672
1725
  /**
@@ -1756,6 +1809,7 @@ var EmbedEvent;
1756
1809
  * console.log('EmbedListenerReady');
1757
1810
  * })
1758
1811
  * ```
1812
+ * Payload: none.
1759
1813
  */
1760
1814
  EmbedEvent["EmbedListenerReady"] = "EmbedListenerReady";
1761
1815
  /**
@@ -2130,6 +2184,7 @@ var EmbedEvent;
2130
2184
  * })
2131
2185
  * ```
2132
2186
  * @version SDK: 1.48.0 | ThoughtSpot Cloud: 26.5.0.cl
2187
+ * Payload: {@link TestScheduleEmailPayload}.
2133
2188
  */
2134
2189
  EmbedEvent["SendTestScheduleEmail"] = "sendTestScheduleEmail";
2135
2190
  /**
@@ -2641,6 +2696,19 @@ var HostEvent;
2641
2696
  * ```
2642
2697
  */
2643
2698
  HostEvent["OpenAddParameterModal"] = "openAddParameterModal";
2699
+ /**
2700
+ * Add a tab to the Liveboard, the same action as the *Tab* option in the
2701
+ * *Add* dropdown in the Liveboard edit header.
2702
+ *
2703
+ * The Liveboard must be in edit mode; the event is ignored otherwise.
2704
+ *
2705
+ * @version SDK: 1.56.0 | ThoughtSpot Cloud: 27.1.0.cl
2706
+ * @example
2707
+ * ```js
2708
+ * liveboardEmbed.trigger(HostEvent.OpenAddTabModal);
2709
+ * ```
2710
+ */
2711
+ HostEvent["OpenAddTabModal"] = "openAddTabModal";
2644
2712
  /**
2645
2713
  * Open the parameter panel for a particular parameter on a Liveboard.
2646
2714
  * Mirrors {@link HostEvent.OpenFilter} for parameters.
@@ -4860,6 +4928,7 @@ var Param;
4860
4928
  * @version SDK: 1.52.2 | ThoughtSpot Cloud: 26.9.0.cl
4861
4929
  */
4862
4930
  Param["TsmcpAnswerIndex"] = "tsmcpAnswerIndex";
4931
+ Param["IsMcpAnswerEmbed"] = "isMcpAnswerEmbed";
4863
4932
  Param["EmbedApp"] = "embedApp";
4864
4933
  Param["DataSources"] = "dataSources";
4865
4934
  Param["DataSourceMode"] = "dataSourceMode";
@@ -5062,6 +5131,21 @@ var Param;
5062
5131
  var Action;
5063
5132
  (function (Action) {
5064
5133
  /**
5134
+ * The **Add** button on a Liveboard in edit mode.
5135
+ * Controls the visibility and disabled state of the Add panel button
5136
+ * in the Liveboard edit toolbar, which allows users to add
5137
+ * visualizations, filters, parameters, and tabs.
5138
+ * @example
5139
+ * ```js
5140
+ * hiddenActions: [Action.LiveboardAddPanel]
5141
+ * // or
5142
+ * disabledActions: [Action.LiveboardAddPanel]
5143
+ * ```
5144
+ * @version SDK: 1.56.0 | ThoughtSpot Cloud: 27.1.0.cl
5145
+ */
5146
+ Action["LiveboardAddPanel"] = "liveboardAddPanel";
5147
+ /**
5148
+ *
5065
5149
  * The **Save** action on an Answer or Liveboard.
5066
5150
  * Allows users to save the changes.
5067
5151
  * @example
@@ -7315,6 +7399,102 @@ var Action;
7315
7399
  * ```
7316
7400
  */
7317
7401
  Action["Cancel"] = "cancel";
7402
+ /**
7403
+ * Controls the visibility and disabled state of the "Version history" menu item for a Liveboard or Answer.
7404
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 9.8.0.cl
7405
+ * @example
7406
+ * ```js
7407
+ * {
7408
+ * hiddenActions: [Action.ShowVersionHistory],
7409
+ * disabledActions: [Action.ShowVersionHistory],
7410
+ * }
7411
+ * ```
7412
+ */
7413
+ Action["ShowVersionHistory"] = "showVersionHistory";
7414
+ /**
7415
+ * Controls the visibility and disabled state of the "Enable version control" menu item for a Liveboard or Answer.
7416
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 9.10.0.cl
7417
+ * @example
7418
+ * ```js
7419
+ * {
7420
+ * hiddenActions: [Action.EnableVersionControl],
7421
+ * disabledActions: [Action.EnableVersionControl],
7422
+ * }
7423
+ * ```
7424
+ */
7425
+ Action["EnableVersionControl"] = "enableVersionControl";
7426
+ /**
7427
+ * Controls the visibility and disabled state of the "Disable version control" menu item for a Liveboard or Answer.
7428
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 9.10.0.cl
7429
+ * @example
7430
+ * ```js
7431
+ * {
7432
+ * hiddenActions: [Action.DisableVersionControl],
7433
+ * disabledActions: [Action.DisableVersionControl],
7434
+ * }
7435
+ * ```
7436
+ */
7437
+ Action["DisableVersionControl"] = "disableVersionControl";
7438
+ /**
7439
+ * Controls the visibility and disabled state of the "Withdraw verification" menu item for a verified Liveboard.
7440
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 9.8.0.cl
7441
+ * @example
7442
+ * ```js
7443
+ * {
7444
+ * hiddenActions: [Action.WithdrawVerification],
7445
+ * disabledActions: [Action.WithdrawVerification],
7446
+ * }
7447
+ * ```
7448
+ */
7449
+ Action["WithdrawVerification"] = "withdrawVerification";
7450
+ /**
7451
+ * Controls the visibility and disabled state of the "Switch to new chart experience" menu item on an Answer.
7452
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 10.10.0.cl
7453
+ * @example
7454
+ * ```js
7455
+ * {
7456
+ * hiddenActions: [Action.SwitchToNewChartExperience],
7457
+ * disabledActions: [Action.SwitchToNewChartExperience],
7458
+ * }
7459
+ * ```
7460
+ */
7461
+ Action["SwitchToNewChartExperience"] = "switchToNewChartExperience";
7462
+ /**
7463
+ * Controls the visibility and disabled state of the "Switch to classic chart experience" menu item on an Answer.
7464
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 10.10.0.cl
7465
+ * @example
7466
+ * ```js
7467
+ * {
7468
+ * hiddenActions: [Action.SwitchToClassicChartExperience],
7469
+ * disabledActions: [Action.SwitchToClassicChartExperience],
7470
+ * }
7471
+ * ```
7472
+ */
7473
+ Action["SwitchToClassicChartExperience"] = "switchToClassicChartExperience";
7474
+ /**
7475
+ * Controls the visibility and disabled state of the "Monitor" menu item on an Answer, which includes the alert options.
7476
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 10.5.0.cl
7477
+ * @example
7478
+ * ```js
7479
+ * {
7480
+ * hiddenActions: [Action.Monitor],
7481
+ * disabledActions: [Action.Monitor],
7482
+ * }
7483
+ * ```
7484
+ */
7485
+ Action["Monitor"] = "monitor";
7486
+ /**
7487
+ * 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.
7488
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
7489
+ * @example
7490
+ * ```js
7491
+ * {
7492
+ * hiddenActions: [Action.SpotterViewExplanation],
7493
+ * disabledActions: [Action.SpotterViewExplanation],
7494
+ * }
7495
+ * ```
7496
+ */
7497
+ Action["SpotterViewExplanation"] = "spotterViewExplanation";
7318
7498
  })(Action || (Action = {}));
7319
7499
  var PrefetchFeatures;
7320
7500
  (function (PrefetchFeatures) {
@@ -7819,7 +7999,7 @@ var TableContentDensity;
7819
7999
  TableContentDensity["Compact"] = "COMPACT";
7820
8000
  })(TableContentDensity || (TableContentDensity = {}));
7821
8001
 
7822
- var version$1="1.53.1";var pkg = {version:version$1};
8002
+ var version$1="1.53.2-beta";var pkg = {version:version$1};
7823
8003
 
7824
8004
  const { version } = pkg;
7825
8005
 
@@ -10988,7 +11168,7 @@ class AnswerService {
10988
11168
  async getTML() {
10989
11169
  const { object } = await this.executeQuery(getAnswerTML, {});
10990
11170
  const edoc = object[0].edoc;
10991
- const YAML = await import('./index-CrBnZBZv.js');
11171
+ const YAML = await import('./index-DQ7r5f1z.js');
10992
11172
  const parsedDoc = YAML.parse(edoc);
10993
11173
  return {
10994
11174
  answer: {
@@ -21090,11 +21270,13 @@ const doBasicAuth = async (embedConfig) => {
21090
21270
  * @param ssoURL
21091
21271
  * @param triggerContainer
21092
21272
  * @param triggerText
21273
+ * @param thoughtSpotHost
21093
21274
  */
21094
- async function samlPopupFlow(ssoURL, triggerContainer, triggerText) {
21275
+ async function samlPopupFlow(ssoURL, triggerContainer, triggerText, thoughtSpotHost) {
21276
+ const thoughtSpotOrigin = new URL(thoughtSpotHost).origin;
21095
21277
  let popupClosedCheck;
21096
21278
  const openPopup = () => {
21097
- if (samlAuthWindow === null || samlAuthWindow.closed) {
21279
+ if (!samlAuthWindow || samlAuthWindow.closed) {
21098
21280
  samlAuthWindow = window.open(ssoURL, '_blank', 'location=no,height=570,width=520,scrollbars=yes,status=yes');
21099
21281
  if (samlAuthWindow) {
21100
21282
  popupClosedCheck = setInterval(() => {
@@ -21122,7 +21304,14 @@ async function samlPopupFlow(ssoURL, triggerContainer, triggerText) {
21122
21304
  }
21123
21305
  samlCompletionPromise = samlCompletionPromise || new Promise((resolve, reject) => {
21124
21306
  window.addEventListener('message', (e) => {
21125
- if (e.data.type === EmbedEvent.SAMLComplete) {
21307
+ var _a;
21308
+ // Only the SSO popup we opened, on the ThoughtSpot origin, may
21309
+ // complete the flow or hand us a token; anything else could
21310
+ // inject an attacker's token into the auth cache.
21311
+ if (e.origin !== thoughtSpotOrigin || !samlAuthWindow || e.source !== samlAuthWindow) {
21312
+ return;
21313
+ }
21314
+ if (((_a = e.data) === null || _a === void 0 ? void 0 : _a.type) === EmbedEvent.SAMLComplete) {
21126
21315
  if (e.data.accessToken) {
21127
21316
  const decodedToken = decodeURIComponent(e.data.accessToken);
21128
21317
  storeAuthTokenInCache(decodedToken);
@@ -21163,7 +21352,7 @@ const doSSOAuth = async (embedConfig, ssoEndPoint) => {
21163
21352
  }
21164
21353
  const ssoURL = `${thoughtSpotHost}${ssoEndPoint}`;
21165
21354
  if (embedConfig.inPopup) {
21166
- await samlPopupFlow(ssoURL, embedConfig.authTriggerContainer, embedConfig.authTriggerText);
21355
+ await samlPopupFlow(ssoURL, embedConfig.authTriggerContainer, embedConfig.authTriggerText, thoughtSpotHost);
21167
21356
  const cachedToken = getCacheAuthToken();
21168
21357
  if (cachedToken) {
21169
21358
  loggedInStatus = true;
@@ -21175,12 +21364,22 @@ const doSSOAuth = async (embedConfig, ssoEndPoint) => {
21175
21364
  }
21176
21365
  window.location.href = ssoURL;
21177
21366
  };
21367
+ /**
21368
+ * The popup's SSO completion page. hostAppOrigin tells ThoughtSpot which
21369
+ * origin opened the popup; the cluster only posts a token back to it if it
21370
+ * is an allowed redirect domain.
21371
+ * @param thoughtSpotHost
21372
+ */
21373
+ const getSSOCompletePageUrl = (thoughtSpotHost) => {
21374
+ const hostAppOrigin = encodeURIComponent(window.location.origin);
21375
+ return `${thoughtSpotHost}/v2/#/embed/saml-complete?hostAppOrigin=${hostAppOrigin}`;
21376
+ };
21178
21377
  const doSamlAuth = async (embedConfig) => {
21179
21378
  const { thoughtSpotHost } = embedConfig;
21180
21379
  // redirect for SSO, when the SSO authentication is done, this page will be
21181
21380
  // loaded again and the same JS will execute again.
21182
21381
  const ssoRedirectUrl = embedConfig.inPopup
21183
- ? `${thoughtSpotHost}/v2/#/embed/saml-complete`
21382
+ ? getSSOCompletePageUrl(thoughtSpotHost)
21184
21383
  : getRedirectUrl(window.location.href, SSO_REDIRECTION_MARKER_GUID, embedConfig.redirectPath);
21185
21384
  // bring back the page to the same URL
21186
21385
  const ssoEndPoint = `${EndPoints.SAML_LOGIN_TEMPLATE(encodeURIComponent(ssoRedirectUrl))}`;
@@ -21192,7 +21391,7 @@ const doOIDCAuth = async (embedConfig) => {
21192
21391
  // redirect for SSO, when the SSO authentication is done, this page will be
21193
21392
  // loaded again and the same JS will execute again.
21194
21393
  const ssoRedirectUrl = embedConfig.noRedirect || embedConfig.inPopup
21195
- ? `${thoughtSpotHost}/v2/#/embed/saml-complete`
21394
+ ? getSSOCompletePageUrl(thoughtSpotHost)
21196
21395
  : getRedirectUrl(window.location.href, SSO_REDIRECTION_MARKER_GUID, embedConfig.redirectPath);
21197
21396
  // bring back the page to the same URL
21198
21397
  const baseEndpoint = `${EndPoints.OIDC_LOGIN_TEMPLATE(encodeURIComponent(ssoRedirectUrl))}`;
@@ -27454,6 +27653,27 @@ const CONV_ASSIST_ANSWER_ROUTE = '/embed/conv-assist-answer';
27454
27653
  */
27455
27654
  const CONVERSATION_SERVICE_PATH = '/conversation/v2';
27456
27655
  const DEFAULT_STALE_ANSWER_NOTICE = 'This data may have changed since the last time you had a chat.';
27656
+ /**
27657
+ * Actions hidden by default on Answers rendered by the ThoughtSpot MCP server
27658
+ * (iframes carrying the `tsmcp=true` marker). Applied automatically by
27659
+ * {@link AutoFrameRenderer} so the auto-rendered answer exposes a curated set of
27660
+ * controls: Pin/Save/Download at the top level, Aggregate/Filter/Sort/Position in
27661
+ * the column menu, and Exclude/Only include/Drill down/Show underlying data in the
27662
+ * axis menu remain visible, while the actions below are removed.
27663
+ *
27664
+ * This is a denylist merged into {@link Param.HideActions}; anything not listed
27665
+ * here stays visible. It is skipped when the caller supplies a `visibleActions`
27666
+ * allowlist (see {@link AutoFrameRenderer.getEmbedParamsObject}).
27667
+ */
27668
+ const HiddenActionItemByDefaultForMCPAnswers = [
27669
+ Action.Edit,
27670
+ Action.InConversationTraining,
27671
+ Action.AxisMenuConditionalFormat,
27672
+ Action.AxisMenuRename,
27673
+ Action.AxisMenuEdit,
27674
+ Action.AxisMenuRemove,
27675
+ Action.MakeACopy,
27676
+ ];
27457
27677
  /**
27458
27678
  * Starts an automatic renderer that watches the DOM for iframes containing
27459
27679
  * the `tsmcp=true` query parameter and replaces them with fully configured
@@ -27621,6 +27841,36 @@ function getAnswerIds(conversationUrl, conversationId, stale) {
27621
27841
  request.then(release, release);
27622
27842
  return request;
27623
27843
  }
27844
+ /**
27845
+ * Normalizes a `hideAction` value into an array of action ids. The SDK-side value
27846
+ * is already an `Action[]`; a value coming off the source iframe URL is a string
27847
+ * that may be a JSON array (`["edit","save"]`) or a comma-separated list.
27848
+ */
27849
+ function parseHideActions(value) {
27850
+ if (Array.isArray(value)) {
27851
+ return value;
27852
+ }
27853
+ if (typeof value !== 'string' || value === '') {
27854
+ return [];
27855
+ }
27856
+ try {
27857
+ const parsed = JSON.parse(value);
27858
+ if (Array.isArray(parsed)) {
27859
+ return parsed.map(String);
27860
+ }
27861
+ }
27862
+ catch (e) {
27863
+ // Not JSON — fall back to a comma-separated list.
27864
+ }
27865
+ return value.split(',').map((s) => s.trim()).filter(Boolean);
27866
+ }
27867
+ /**
27868
+ * Unions two `hideAction` values (SDK-computed and source-iframe) into a single
27869
+ * de-duplicated array of action ids.
27870
+ */
27871
+ function unionHideActions(sdkValue, sourceValue) {
27872
+ return Array.from(new Set([...parseHideActions(sdkValue), ...parseHideActions(sourceValue)]));
27873
+ }
27624
27874
  function isTSMCPIframe(iframe) {
27625
27875
  try {
27626
27876
  const url = new URL(iframe.src);
@@ -27647,11 +27897,41 @@ class AutoFrameRenderer extends TsEmbed {
27647
27897
  super(container, viewConfig);
27648
27898
  this.viewConfig = viewConfig;
27649
27899
  }
27900
+ /**
27901
+ * Extends the base embed params with the curated MCP-answer denylist
27902
+ * ({@link HiddenActionItemByDefaultForMCPAnswers}) and a marker letting
27903
+ * the ThoughtSpot app detect this answer was rendered via the MCP
27904
+ * auto-frame-renderer ({@link Param.IsMcpAnswerEmbed}).
27905
+ *
27906
+ * Precedence — merge, allowlist wins:
27907
+ * - When the caller supplies a `visibleActions` allowlist, the base already
27908
+ * set {@link Param.VisibleActions}; the denylist is skipped so the allowlist
27909
+ * fully controls visibility.
27910
+ * - Otherwise the denylist is unioned onto {@link Param.HideActions}, which the
27911
+ * base has already populated with the default hidden actions plus any
27912
+ * caller-supplied `hiddenActions`.
27913
+ */
27914
+ getEmbedParamsObject() {
27915
+ const queryParams = super.getEmbedParamsObject();
27916
+ if (!queryParams[Param.VisibleActions]) {
27917
+ // `additionalFlags` can override this with a non-array value, so
27918
+ // normalize it rather than spreading it directly.
27919
+ queryParams[Param.HideActions] = unionHideActions(queryParams[Param.HideActions], HiddenActionItemByDefaultForMCPAnswers);
27920
+ }
27921
+ queryParams[Param.IsMcpAnswerEmbed] = true;
27922
+ return queryParams;
27923
+ }
27650
27924
  /**
27651
27925
  * Builds the final iframe `src` by merging the SDK embed parameters
27652
27926
  * with the query parameters already present on the source iframe URL.
27927
+ *
27653
27928
  * The `tsmcp` marker param is removed so it does not propagate to the
27654
- * ThoughtSpot application.
27929
+ * ThoughtSpot application. This is not just cosmetic: `tsmcp=true` is
27930
+ * also how {@link isTSMCPIframe} recognizes an iframe as one this
27931
+ * renderer must process. If the marker survived onto the iframe this
27932
+ * class inserts, the same {@link MutationObserver} would immediately
27933
+ * detect its own output as a new MCP iframe and re-process it, causing
27934
+ * infinite recursive replacement. Do not re-add `tsmcp` here.
27655
27935
  *
27656
27936
  * @param sourceSrc - The original iframe's `src` URL string.
27657
27937
  * @param preserveSourceUrl - When true, return the source URL unchanged.
@@ -27669,7 +27949,15 @@ class AutoFrameRenderer extends TsEmbed {
27669
27949
  // Replay markers address the SDK, not the ThoughtSpot application.
27670
27950
  delete existingQueryParamsObject[Param.TsmcpConversationId];
27671
27951
  delete existingQueryParamsObject[Param.TsmcpAnswerIndex];
27952
+ // Source-iframe params win over SDK params on merge. Hidden actions
27953
+ // are the exception: union them so a `hideAction` on the source iframe
27954
+ // does not clobber the SDK-computed denylist (and vice versa).
27955
+ const mergedHideActions = unionHideActions(queryParams[Param.HideActions], existingQueryParamsObject[Param.HideActions]);
27956
+ delete existingQueryParamsObject[Param.HideActions];
27672
27957
  const mergedQueryParams = { ...queryParams, ...existingQueryParamsObject };
27958
+ if (mergedHideActions.length) {
27959
+ mergedQueryParams[Param.HideActions] = mergedHideActions;
27960
+ }
27673
27961
  const mergedQueryParamsString = getQueryParamString(mergedQueryParams, true);
27674
27962
  const queryString = mergedQueryParamsString ? `?${mergedQueryParamsString}` : '';
27675
27963
  const hash = resolved