@thoughtspot/visual-embed-sdk 1.53.0 → 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.
- package/cjs/package.json +1 -1
- package/cjs/src/auth.d.ts.map +1 -1
- package/cjs/src/auth.js +25 -6
- package/cjs/src/auth.js.map +1 -1
- package/cjs/src/auth.spec.js +40 -8
- package/cjs/src/auth.spec.js.map +1 -1
- package/cjs/src/contracts/contracts.spec.js +169 -2
- package/cjs/src/contracts/contracts.spec.js.map +1 -1
- package/cjs/src/contracts/embed-event-payloads.d.ts +212 -14
- package/cjs/src/contracts/embed-event-payloads.d.ts.map +1 -1
- package/cjs/src/contracts/host-event-contracts.d.ts +11 -0
- package/cjs/src/contracts/host-event-contracts.d.ts.map +1 -1
- package/cjs/src/css-variables.d.ts +140 -0
- package/cjs/src/css-variables.d.ts.map +1 -1
- package/cjs/src/embed/app.d.ts +1 -0
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/auto-frame-renderer.d.ts +14 -1
- package/cjs/src/embed/auto-frame-renderer.d.ts.map +1 -1
- package/cjs/src/embed/auto-frame-renderer.js +91 -2
- package/cjs/src/embed/auto-frame-renderer.js.map +1 -1
- package/cjs/src/embed/auto-frame-renderer.spec.js +112 -7
- package/cjs/src/embed/auto-frame-renderer.spec.js.map +1 -1
- package/cjs/src/embed/conversation.d.ts +14 -0
- package/cjs/src/embed/conversation.d.ts.map +1 -1
- package/cjs/src/embed/conversation.js.map +1 -1
- package/cjs/src/embed/conversation.spec.js +22 -0
- package/cjs/src/embed/conversation.spec.js.map +1 -1
- package/cjs/src/embed/host-events.spec.js +50 -0
- package/cjs/src/embed/host-events.spec.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts +2 -16
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +29 -10
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/liveboard.spec.js +139 -0
- package/cjs/src/embed/liveboard.spec.js.map +1 -1
- package/cjs/src/embed/spotter-utils.d.ts +1 -0
- package/cjs/src/embed/spotter-utils.d.ts.map +1 -1
- package/cjs/src/embed/spotter-utils.js +7 -1
- package/cjs/src/embed/spotter-utils.js.map +1 -1
- package/cjs/src/embed/spotter-utils.spec.js +19 -0
- package/cjs/src/embed/spotter-utils.spec.js.map +1 -1
- package/cjs/src/embed/ts-embed.d.ts +21 -16
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +77 -63
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/embed/ts-embed.spec.js +240 -7
- package/cjs/src/embed/ts-embed.spec.js.map +1 -1
- package/cjs/src/index.d.ts +2 -2
- package/cjs/src/index.d.ts.map +1 -1
- package/cjs/src/index.js.map +1 -1
- package/cjs/src/react/all-types-export.d.ts +1 -1
- package/cjs/src/react/all-types-export.d.ts.map +1 -1
- package/cjs/src/react/all-types-export.js.map +1 -1
- package/cjs/src/react/util.d.ts +8 -1
- package/cjs/src/react/util.d.ts.map +1 -1
- package/cjs/src/react/util.js.map +1 -1
- package/cjs/src/types.d.ts +249 -2
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +247 -0
- package/cjs/src/types.js.map +1 -1
- package/cjs/src/utils/runtimeTelemetry.d.ts +11 -0
- package/cjs/src/utils/runtimeTelemetry.d.ts.map +1 -0
- package/cjs/src/utils/runtimeTelemetry.js +34 -0
- package/cjs/src/utils/runtimeTelemetry.js.map +1 -0
- package/cjs/src/utils/runtimeTelemetry.spec.d.ts +2 -0
- package/cjs/src/utils/runtimeTelemetry.spec.d.ts.map +1 -0
- package/cjs/src/utils/runtimeTelemetry.spec.js +124 -0
- package/cjs/src/utils/runtimeTelemetry.spec.js.map +1 -0
- package/dist/{index-CyDR8j_0.js → index-DQ7r5f1z.js} +1 -1
- package/dist/src/auth.d.ts.map +1 -1
- package/dist/src/contracts/embed-event-payloads.d.ts +212 -14
- package/dist/src/contracts/embed-event-payloads.d.ts.map +1 -1
- package/dist/src/contracts/host-event-contracts.d.ts +11 -0
- package/dist/src/contracts/host-event-contracts.d.ts.map +1 -1
- package/dist/src/css-variables.d.ts +140 -0
- package/dist/src/css-variables.d.ts.map +1 -1
- package/dist/src/embed/app.d.ts +1 -0
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/auto-frame-renderer.d.ts +14 -1
- package/dist/src/embed/auto-frame-renderer.d.ts.map +1 -1
- package/dist/src/embed/conversation.d.ts +14 -0
- package/dist/src/embed/conversation.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts +2 -16
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/embed/spotter-utils.d.ts +1 -0
- package/dist/src/embed/spotter-utils.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.d.ts +21 -16
- package/dist/src/embed/ts-embed.d.ts.map +1 -1
- package/dist/src/index.d.ts +2 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/react/all-types-export.d.ts +1 -1
- package/dist/src/react/all-types-export.d.ts.map +1 -1
- package/dist/src/react/util.d.ts +8 -1
- package/dist/src/react/util.d.ts.map +1 -1
- package/dist/src/types.d.ts +249 -2
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/runtimeTelemetry.d.ts +11 -0
- package/dist/src/utils/runtimeTelemetry.d.ts.map +1 -0
- package/dist/src/utils/runtimeTelemetry.spec.d.ts +2 -0
- package/dist/src/utils/runtimeTelemetry.spec.d.ts.map +1 -0
- package/dist/tsembed-react.es.js +474 -84
- package/dist/tsembed-react.js +473 -83
- package/dist/tsembed.es.js +542 -85
- package/dist/tsembed.js +541 -84
- package/dist/visual-embed-sdk-react-full.d.ts +649 -30
- package/dist/visual-embed-sdk-react.d.ts +646 -28
- package/dist/visual-embed-sdk.d.ts +642 -44
- package/lib/package.json +1 -1
- package/lib/src/auth.d.ts.map +1 -1
- package/lib/src/auth.js +25 -6
- package/lib/src/auth.js.map +1 -1
- package/lib/src/auth.spec.js +40 -8
- package/lib/src/auth.spec.js.map +1 -1
- package/lib/src/contracts/contracts.spec.js +169 -2
- package/lib/src/contracts/contracts.spec.js.map +1 -1
- package/lib/src/contracts/embed-event-payloads.d.ts +212 -14
- package/lib/src/contracts/embed-event-payloads.d.ts.map +1 -1
- package/lib/src/contracts/host-event-contracts.d.ts +11 -0
- package/lib/src/contracts/host-event-contracts.d.ts.map +1 -1
- package/lib/src/css-variables.d.ts +140 -0
- package/lib/src/css-variables.d.ts.map +1 -1
- package/lib/src/embed/app.d.ts +1 -0
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/auto-frame-renderer.d.ts +14 -1
- package/lib/src/embed/auto-frame-renderer.d.ts.map +1 -1
- package/lib/src/embed/auto-frame-renderer.js +91 -2
- package/lib/src/embed/auto-frame-renderer.js.map +1 -1
- package/lib/src/embed/auto-frame-renderer.spec.js +113 -8
- package/lib/src/embed/auto-frame-renderer.spec.js.map +1 -1
- package/lib/src/embed/conversation.d.ts +14 -0
- package/lib/src/embed/conversation.d.ts.map +1 -1
- package/lib/src/embed/conversation.js.map +1 -1
- package/lib/src/embed/conversation.spec.js +22 -0
- package/lib/src/embed/conversation.spec.js.map +1 -1
- package/lib/src/embed/host-events.spec.js +50 -0
- package/lib/src/embed/host-events.spec.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts +2 -16
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +28 -10
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +139 -0
- package/lib/src/embed/liveboard.spec.js.map +1 -1
- package/lib/src/embed/spotter-utils.d.ts +1 -0
- package/lib/src/embed/spotter-utils.d.ts.map +1 -1
- package/lib/src/embed/spotter-utils.js +7 -1
- package/lib/src/embed/spotter-utils.js.map +1 -1
- package/lib/src/embed/spotter-utils.spec.js +19 -0
- package/lib/src/embed/spotter-utils.spec.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts +21 -16
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +78 -64
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/embed/ts-embed.spec.js +240 -7
- package/lib/src/embed/ts-embed.spec.js.map +1 -1
- package/lib/src/index.d.ts +2 -2
- package/lib/src/index.d.ts.map +1 -1
- package/lib/src/index.js.map +1 -1
- package/lib/src/react/all-types-export.d.ts +1 -1
- package/lib/src/react/all-types-export.d.ts.map +1 -1
- package/lib/src/react/all-types-export.js.map +1 -1
- package/lib/src/react/util.d.ts +8 -1
- package/lib/src/react/util.d.ts.map +1 -1
- package/lib/src/react/util.js.map +1 -1
- package/lib/src/types.d.ts +249 -2
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +247 -0
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils/runtimeTelemetry.d.ts +11 -0
- package/lib/src/utils/runtimeTelemetry.d.ts.map +1 -0
- package/lib/src/utils/runtimeTelemetry.js +28 -0
- package/lib/src/utils/runtimeTelemetry.js.map +1 -0
- package/lib/src/utils/runtimeTelemetry.spec.d.ts +2 -0
- package/lib/src/utils/runtimeTelemetry.spec.d.ts.map +1 -0
- package/lib/src/utils/runtimeTelemetry.spec.js +122 -0
- package/lib/src/utils/runtimeTelemetry.spec.js.map +1 -0
- package/lib/src/visual-embed-sdk.d.ts +642 -44
- package/package.json +1 -1
- package/src/auth.spec.ts +47 -11
- package/src/auth.ts +35 -6
- package/src/contracts/contracts.spec.ts +186 -3
- package/src/contracts/embed-event-payloads.ts +281 -14
- package/src/contracts/host-event-contracts.ts +14 -0
- package/src/css-variables.ts +168 -0
- package/src/embed/app.ts +1 -0
- package/src/embed/auto-frame-renderer.spec.ts +134 -8
- package/src/embed/auto-frame-renderer.ts +103 -2
- package/src/embed/conversation.spec.ts +24 -0
- package/src/embed/conversation.ts +14 -0
- package/src/embed/host-events.spec.ts +68 -0
- package/src/embed/liveboard.spec.ts +156 -0
- package/src/embed/liveboard.ts +34 -10
- package/src/embed/spotter-utils.spec.ts +20 -0
- package/src/embed/spotter-utils.ts +12 -1
- package/src/embed/ts-embed.spec.ts +297 -8
- package/src/embed/ts-embed.ts +79 -64
- package/src/index.ts +2 -0
- package/src/react/all-types-export.ts +1 -0
- package/src/react/util.ts +13 -1
- package/src/types.ts +249 -0
- package/src/utils/runtimeTelemetry.spec.ts +148 -0
- package/src/utils/runtimeTelemetry.ts +50 -0
package/dist/tsembed.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @thoughtspot/visual-embed-sdk version 1.53.
|
|
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.
|
|
@@ -3238,6 +3306,17 @@ var HostEvent;
|
|
|
3238
3306
|
* @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
|
|
3239
3307
|
*/
|
|
3240
3308
|
HostEvent["EditVisualization"] = "editVisualization";
|
|
3309
|
+
/**
|
|
3310
|
+
* Exits Liveboard edit mode , equivalent to clicking the
|
|
3311
|
+
* *Cancel* button in the Liveboard edit header. The Liveboard returns to
|
|
3312
|
+
* view mode and the embedded app emits the {@link EmbedEvent.Cancel} event.
|
|
3313
|
+
* @version SDK: 1.55.0 | ThoughtSpot Cloud: 26.12.0.cl
|
|
3314
|
+
* @example
|
|
3315
|
+
* ```js
|
|
3316
|
+
* liveboardEmbed.trigger(HostEvent.ExitEditMode);
|
|
3317
|
+
* ```
|
|
3318
|
+
*/
|
|
3319
|
+
HostEvent["ExitEditMode"] = "exitEditMode";
|
|
3241
3320
|
/**
|
|
3242
3321
|
* Trigger the **Copy link** action on a Liveboard or visualization
|
|
3243
3322
|
* Payload: {@link VizScopedRequest}.
|
|
@@ -4773,6 +4852,39 @@ var HostEvent;
|
|
|
4773
4852
|
* @version SDK: 1.49.0 | ThoughtSpot Cloud: 26.6.0.cl
|
|
4774
4853
|
*/
|
|
4775
4854
|
HostEvent["RefreshLiveboardBrowserCache"] = "refreshLiveboardBrowserCache";
|
|
4855
|
+
/**
|
|
4856
|
+
* Switch the embed between dark appearance and its default appearance
|
|
4857
|
+
* while it is open, without reloading it.
|
|
4858
|
+
* Payload: {@link UpdateThemeRequest}.
|
|
4859
|
+
*
|
|
4860
|
+
* Use it to keep the embed in step with a theme switch in your
|
|
4861
|
+
* application; the appearance the embed loads with is set by `isDarkMode`.
|
|
4862
|
+
* The event resolves with the applied value, such as `{ isDarkMode: true }`.
|
|
4863
|
+
* When dark appearance is not available in the embed, the embed does not
|
|
4864
|
+
* change and the event rejects with an error message instead.
|
|
4865
|
+
* @version SDK: 1.55.0 | ThoughtSpot Cloud: 26.12.0.cl
|
|
4866
|
+
* @param - `isDarkMode` - `true` for dark appearance, `false` for the
|
|
4867
|
+
* default appearance.
|
|
4868
|
+
* @example
|
|
4869
|
+
* ```js
|
|
4870
|
+
* appEmbed.trigger(HostEvent.UpdateTheme, { isDarkMode: true });
|
|
4871
|
+
* ```
|
|
4872
|
+
* @example
|
|
4873
|
+
* ```js
|
|
4874
|
+
* // Follow a theme switch in your application
|
|
4875
|
+
* const themeSwitch = document.querySelector('#theme-switch');
|
|
4876
|
+
* themeSwitch.addEventListener('change', async (event) => {
|
|
4877
|
+
* try {
|
|
4878
|
+
* await appEmbed.trigger(HostEvent.UpdateTheme, {
|
|
4879
|
+
* isDarkMode: event.target.checked,
|
|
4880
|
+
* });
|
|
4881
|
+
* } catch (error) {
|
|
4882
|
+
* console.warn(error);
|
|
4883
|
+
* }
|
|
4884
|
+
* });
|
|
4885
|
+
* ```
|
|
4886
|
+
*/
|
|
4887
|
+
HostEvent["UpdateTheme"] = "UpdateTheme";
|
|
4776
4888
|
})(HostEvent || (HostEvent = {}));
|
|
4777
4889
|
/**
|
|
4778
4890
|
* The different visual modes that the data sources panel within
|
|
@@ -4816,6 +4928,7 @@ var Param;
|
|
|
4816
4928
|
* @version SDK: 1.52.2 | ThoughtSpot Cloud: 26.9.0.cl
|
|
4817
4929
|
*/
|
|
4818
4930
|
Param["TsmcpAnswerIndex"] = "tsmcpAnswerIndex";
|
|
4931
|
+
Param["IsMcpAnswerEmbed"] = "isMcpAnswerEmbed";
|
|
4819
4932
|
Param["EmbedApp"] = "embedApp";
|
|
4820
4933
|
Param["DataSources"] = "dataSources";
|
|
4821
4934
|
Param["DataSourceMode"] = "dataSourceMode";
|
|
@@ -5018,6 +5131,21 @@ var Param;
|
|
|
5018
5131
|
var Action;
|
|
5019
5132
|
(function (Action) {
|
|
5020
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
|
+
*
|
|
5021
5149
|
* The **Save** action on an Answer or Liveboard.
|
|
5022
5150
|
* Allows users to save the changes.
|
|
5023
5151
|
* @example
|
|
@@ -7248,6 +7376,125 @@ var Action;
|
|
|
7248
7376
|
* ```
|
|
7249
7377
|
*/
|
|
7250
7378
|
Action["CustomizeHomepage"] = "customizeHomepage";
|
|
7379
|
+
/**
|
|
7380
|
+
* Controls the visibility and disabled state of the *Cancel* button in the
|
|
7381
|
+
* Liveboard edit header, the button that discards the changes made in edit
|
|
7382
|
+
* mode and returns the Liveboard to view mode. The button is shown only
|
|
7383
|
+
* while the Liveboard is in edit mode.
|
|
7384
|
+
* @version SDK: 1.55.0 | ThoughtSpot Cloud: 26.12.0.cl
|
|
7385
|
+
* @example
|
|
7386
|
+
* ```js
|
|
7387
|
+
* const liveboardEmbed = new LiveboardEmbed('#tsEmbed', {
|
|
7388
|
+
* ... // other embed view config
|
|
7389
|
+
* hiddenActions: [Action.Cancel],
|
|
7390
|
+
* });
|
|
7391
|
+
* ```
|
|
7392
|
+
* @example
|
|
7393
|
+
* ```js
|
|
7394
|
+
* const liveboardEmbed = new LiveboardEmbed('#tsEmbed', {
|
|
7395
|
+
* ... // other embed view config
|
|
7396
|
+
* disabledActions: [Action.Cancel],
|
|
7397
|
+
* disabledActionReason: 'Save your changes to leave edit mode',
|
|
7398
|
+
* });
|
|
7399
|
+
* ```
|
|
7400
|
+
*/
|
|
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";
|
|
7251
7498
|
})(Action || (Action = {}));
|
|
7252
7499
|
var PrefetchFeatures;
|
|
7253
7500
|
(function (PrefetchFeatures) {
|
|
@@ -7752,7 +7999,7 @@ var TableContentDensity;
|
|
|
7752
7999
|
TableContentDensity["Compact"] = "COMPACT";
|
|
7753
8000
|
})(TableContentDensity || (TableContentDensity = {}));
|
|
7754
8001
|
|
|
7755
|
-
var version$1="1.53.
|
|
8002
|
+
var version$1="1.53.2-beta";var pkg = {version:version$1};
|
|
7756
8003
|
|
|
7757
8004
|
const { version } = pkg;
|
|
7758
8005
|
|
|
@@ -10921,7 +11168,7 @@ class AnswerService {
|
|
|
10921
11168
|
async getTML() {
|
|
10922
11169
|
const { object } = await this.executeQuery(getAnswerTML, {});
|
|
10923
11170
|
const edoc = object[0].edoc;
|
|
10924
|
-
const YAML = await import('./index-
|
|
11171
|
+
const YAML = await import('./index-DQ7r5f1z.js');
|
|
10925
11172
|
const parsedDoc = YAML.parse(edoc);
|
|
10926
11173
|
return {
|
|
10927
11174
|
answer: {
|
|
@@ -20040,6 +20287,32 @@ function initMixpanel(sessionInfo) {
|
|
|
20040
20287
|
}
|
|
20041
20288
|
}
|
|
20042
20289
|
|
|
20290
|
+
// Membership is checked, not just the key: a bare key allowlist would upload an
|
|
20291
|
+
// arbitrary customer string sitting under `operator` verbatim.
|
|
20292
|
+
const isEnumMember = (enumObject, value) => typeof value === 'string' && Object.values(enumObject).includes(value);
|
|
20293
|
+
const uniqueEnumMembers = (enumObject, values) => Array.from(new Set(values.filter((v) => isEnumMember(enumObject, v))));
|
|
20294
|
+
const describeRuntimeFilters = (runtimeFilters) => ({
|
|
20295
|
+
count: runtimeFilters.length,
|
|
20296
|
+
operators: uniqueEnumMembers(RuntimeFilterOp, runtimeFilters.map((filter) => filter === null || filter === void 0 ? void 0 : filter.operator)),
|
|
20297
|
+
});
|
|
20298
|
+
const describeRuntimeParameters = (runtimeParameters) => ({
|
|
20299
|
+
count: runtimeParameters.length,
|
|
20300
|
+
applicabilityLevels: uniqueEnumMembers(ApplicabilityLevel, runtimeParameters.map((parameter) => { var _a; return (_a = parameter === null || parameter === void 0 ? void 0 : parameter.applicability) === null || _a === void 0 ? void 0 : _a.level; })),
|
|
20301
|
+
});
|
|
20302
|
+
// Column names, parameter names and operands are customer data and must never
|
|
20303
|
+
// reach Mixpanel; an unrecognized shape is dropped rather than forwarded.
|
|
20304
|
+
const summarizeRuntimeDataForTelemetry = (viewConfig) => {
|
|
20305
|
+
const { runtimeFilters, runtimeParameters, ...rest } = viewConfig !== null && viewConfig !== void 0 ? viewConfig : {};
|
|
20306
|
+
const telemetryProps = { ...rest };
|
|
20307
|
+
if (Array.isArray(runtimeFilters)) {
|
|
20308
|
+
telemetryProps.runtimeFilters = describeRuntimeFilters(runtimeFilters);
|
|
20309
|
+
}
|
|
20310
|
+
if (Array.isArray(runtimeParameters)) {
|
|
20311
|
+
telemetryProps.runtimeParameters = describeRuntimeParameters(runtimeParameters);
|
|
20312
|
+
}
|
|
20313
|
+
return telemetryProps;
|
|
20314
|
+
};
|
|
20315
|
+
|
|
20043
20316
|
var eventemitter3 = createCommonjsModule(function (module) {
|
|
20044
20317
|
|
|
20045
20318
|
var has = Object.prototype.hasOwnProperty
|
|
@@ -20997,11 +21270,13 @@ const doBasicAuth = async (embedConfig) => {
|
|
|
20997
21270
|
* @param ssoURL
|
|
20998
21271
|
* @param triggerContainer
|
|
20999
21272
|
* @param triggerText
|
|
21273
|
+
* @param thoughtSpotHost
|
|
21000
21274
|
*/
|
|
21001
|
-
async function samlPopupFlow(ssoURL, triggerContainer, triggerText) {
|
|
21275
|
+
async function samlPopupFlow(ssoURL, triggerContainer, triggerText, thoughtSpotHost) {
|
|
21276
|
+
const thoughtSpotOrigin = new URL(thoughtSpotHost).origin;
|
|
21002
21277
|
let popupClosedCheck;
|
|
21003
21278
|
const openPopup = () => {
|
|
21004
|
-
if (samlAuthWindow
|
|
21279
|
+
if (!samlAuthWindow || samlAuthWindow.closed) {
|
|
21005
21280
|
samlAuthWindow = window.open(ssoURL, '_blank', 'location=no,height=570,width=520,scrollbars=yes,status=yes');
|
|
21006
21281
|
if (samlAuthWindow) {
|
|
21007
21282
|
popupClosedCheck = setInterval(() => {
|
|
@@ -21029,7 +21304,14 @@ async function samlPopupFlow(ssoURL, triggerContainer, triggerText) {
|
|
|
21029
21304
|
}
|
|
21030
21305
|
samlCompletionPromise = samlCompletionPromise || new Promise((resolve, reject) => {
|
|
21031
21306
|
window.addEventListener('message', (e) => {
|
|
21032
|
-
|
|
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) {
|
|
21033
21315
|
if (e.data.accessToken) {
|
|
21034
21316
|
const decodedToken = decodeURIComponent(e.data.accessToken);
|
|
21035
21317
|
storeAuthTokenInCache(decodedToken);
|
|
@@ -21070,7 +21352,7 @@ const doSSOAuth = async (embedConfig, ssoEndPoint) => {
|
|
|
21070
21352
|
}
|
|
21071
21353
|
const ssoURL = `${thoughtSpotHost}${ssoEndPoint}`;
|
|
21072
21354
|
if (embedConfig.inPopup) {
|
|
21073
|
-
await samlPopupFlow(ssoURL, embedConfig.authTriggerContainer, embedConfig.authTriggerText);
|
|
21355
|
+
await samlPopupFlow(ssoURL, embedConfig.authTriggerContainer, embedConfig.authTriggerText, thoughtSpotHost);
|
|
21074
21356
|
const cachedToken = getCacheAuthToken();
|
|
21075
21357
|
if (cachedToken) {
|
|
21076
21358
|
loggedInStatus = true;
|
|
@@ -21082,12 +21364,22 @@ const doSSOAuth = async (embedConfig, ssoEndPoint) => {
|
|
|
21082
21364
|
}
|
|
21083
21365
|
window.location.href = ssoURL;
|
|
21084
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
|
+
};
|
|
21085
21377
|
const doSamlAuth = async (embedConfig) => {
|
|
21086
21378
|
const { thoughtSpotHost } = embedConfig;
|
|
21087
21379
|
// redirect for SSO, when the SSO authentication is done, this page will be
|
|
21088
21380
|
// loaded again and the same JS will execute again.
|
|
21089
21381
|
const ssoRedirectUrl = embedConfig.inPopup
|
|
21090
|
-
?
|
|
21382
|
+
? getSSOCompletePageUrl(thoughtSpotHost)
|
|
21091
21383
|
: getRedirectUrl(window.location.href, SSO_REDIRECTION_MARKER_GUID, embedConfig.redirectPath);
|
|
21092
21384
|
// bring back the page to the same URL
|
|
21093
21385
|
const ssoEndPoint = `${EndPoints.SAML_LOGIN_TEMPLATE(encodeURIComponent(ssoRedirectUrl))}`;
|
|
@@ -21099,7 +21391,7 @@ const doOIDCAuth = async (embedConfig) => {
|
|
|
21099
21391
|
// redirect for SSO, when the SSO authentication is done, this page will be
|
|
21100
21392
|
// loaded again and the same JS will execute again.
|
|
21101
21393
|
const ssoRedirectUrl = embedConfig.noRedirect || embedConfig.inPopup
|
|
21102
|
-
?
|
|
21394
|
+
? getSSOCompletePageUrl(thoughtSpotHost)
|
|
21103
21395
|
: getRedirectUrl(window.location.href, SSO_REDIRECTION_MARKER_GUID, embedConfig.redirectPath);
|
|
21104
21396
|
// bring back the page to the same URL
|
|
21105
21397
|
const baseEndpoint = `${EndPoints.OIDC_LOGIN_TEMPLATE(encodeURIComponent(ssoRedirectUrl))}`;
|
|
@@ -22348,6 +22640,9 @@ const TS_EMBED_ID = '_thoughtspot-embed';
|
|
|
22348
22640
|
*/
|
|
22349
22641
|
const PRERENDER_CONTAINER_ORIGINAL_POSITION_KEY = 'tsEmbedOriginalPosition';
|
|
22350
22642
|
const PRERENDER_WRAPPER_ID_PREFIX = 'tsEmbed-pre-render-wrapper-';
|
|
22643
|
+
const PRERENDER_PARKED_TRANSFORM = 'translateY(-100%)';
|
|
22644
|
+
/** The height createPreRenderWrapper() seeds before anything is measured. */
|
|
22645
|
+
const UNMEASURED_WRAPPER_HEIGHT = '100vh';
|
|
22351
22646
|
// The container applies UpdateEmbedParams through React state, so a delivered
|
|
22352
22647
|
// post is not the same as the params being in effect.
|
|
22353
22648
|
const UPDATE_EMBED_PARAMS_SETTLE_MS = 200;
|
|
@@ -22484,7 +22779,6 @@ class TsEmbed {
|
|
|
22484
22779
|
this.shouldEncodeUrlQueryParams = false;
|
|
22485
22780
|
this.defaultHiddenActions = [Action.ReportError];
|
|
22486
22781
|
this.preRenderContainerEl = document.body;
|
|
22487
|
-
this.containerScrollListener = null;
|
|
22488
22782
|
/**
|
|
22489
22783
|
* Handler for fullscreen change events
|
|
22490
22784
|
*/
|
|
@@ -22664,9 +22958,7 @@ class TsEmbed {
|
|
|
22664
22958
|
...viewConfig,
|
|
22665
22959
|
};
|
|
22666
22960
|
this.registerAppInit();
|
|
22667
|
-
uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_EMBED_CREATE,
|
|
22668
|
-
...viewConfig,
|
|
22669
|
-
});
|
|
22961
|
+
uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_EMBED_CREATE, summarizeRuntimeDataForTelemetry(viewConfig));
|
|
22670
22962
|
const embedConfig = getEmbedConfig();
|
|
22671
22963
|
if (embedConfig) {
|
|
22672
22964
|
this.embedConfig = embedConfig;
|
|
@@ -23370,7 +23662,7 @@ class TsEmbed {
|
|
|
23370
23662
|
top: '0',
|
|
23371
23663
|
left: '0',
|
|
23372
23664
|
width: '100vw',
|
|
23373
|
-
height:
|
|
23665
|
+
height: UNMEASURED_WRAPPER_HEIGHT,
|
|
23374
23666
|
};
|
|
23375
23667
|
setStyleProperties(preRenderWrapper, initialPreRenderWrapperStyle);
|
|
23376
23668
|
return preRenderWrapper;
|
|
@@ -23438,10 +23730,12 @@ class TsEmbed {
|
|
|
23438
23730
|
return placeholder;
|
|
23439
23731
|
}
|
|
23440
23732
|
/**
|
|
23441
|
-
* Resolves the configured preRenderContainer
|
|
23442
|
-
*
|
|
23443
|
-
*
|
|
23444
|
-
*
|
|
23733
|
+
* Resolves the configured preRenderContainer, or defaults to the host's
|
|
23734
|
+
* nearest scrolling ancestor (document.body if none). The absolutely
|
|
23735
|
+
* positioned wrapper only follows the page while it sits inside what
|
|
23736
|
+
* scrolls, so body is right only when the document itself scrolls — an inner
|
|
23737
|
+
* scroller left the frame pinned to the viewport (SCAL-338563). A string
|
|
23738
|
+
* selector is re-queried each call so a remounted container resolves fresh.
|
|
23445
23739
|
*/
|
|
23446
23740
|
resolvePreRenderContainerTarget() {
|
|
23447
23741
|
var _a;
|
|
@@ -23461,7 +23755,13 @@ class TsEmbed {
|
|
|
23461
23755
|
else if (containerConfig) {
|
|
23462
23756
|
container = containerConfig;
|
|
23463
23757
|
}
|
|
23464
|
-
|
|
23758
|
+
if (container) {
|
|
23759
|
+
return container;
|
|
23760
|
+
}
|
|
23761
|
+
if (!this.hostElement) {
|
|
23762
|
+
return document.body;
|
|
23763
|
+
}
|
|
23764
|
+
return (_a = getScrollableAncestors(this.hostElement)[0]) !== null && _a !== void 0 ? _a : document.body;
|
|
23465
23765
|
}
|
|
23466
23766
|
inheritPreRenderContainer() {
|
|
23467
23767
|
var _a;
|
|
@@ -23506,8 +23806,9 @@ class TsEmbed {
|
|
|
23506
23806
|
* Re-attaches the wrapper to a live container when the previously resolved
|
|
23507
23807
|
* one has been detached or no longer holds the wrapper — e.g. the host app
|
|
23508
23808
|
* remounted a custom preRenderContainer, which would otherwise leave a stale
|
|
23509
|
-
* reference and collapse the wrapper.
|
|
23510
|
-
* re-resolved; a container passed as an element
|
|
23809
|
+
* reference and collapse the wrapper. Selectors and the auto-resolved
|
|
23810
|
+
* scrolling ancestor are both re-resolved; a container passed as an element
|
|
23811
|
+
* is left untouched, as there is nothing to re-query.
|
|
23511
23812
|
*/
|
|
23512
23813
|
reconcilePreRenderContainer() {
|
|
23513
23814
|
const wrapper = this.preRenderWrapper;
|
|
@@ -23526,14 +23827,6 @@ class TsEmbed {
|
|
|
23526
23827
|
if (resolved === stored && stored.contains(wrapper)) {
|
|
23527
23828
|
return;
|
|
23528
23829
|
}
|
|
23529
|
-
if (this.containerScrollListener && stored !== resolved) {
|
|
23530
|
-
if (stored !== document.body) {
|
|
23531
|
-
stored.removeEventListener('scroll', this.containerScrollListener);
|
|
23532
|
-
}
|
|
23533
|
-
if (resolved !== document.body) {
|
|
23534
|
-
resolved.addEventListener('scroll', this.containerScrollListener);
|
|
23535
|
-
}
|
|
23536
|
-
}
|
|
23537
23830
|
this.preRenderContainerEl = resolved;
|
|
23538
23831
|
this.applyPreRenderContainerPositioning();
|
|
23539
23832
|
if (wrapper.parentNode !== resolved) {
|
|
@@ -23595,11 +23888,12 @@ class TsEmbed {
|
|
|
23595
23888
|
*/
|
|
23596
23889
|
setIFrameHeight(height) {
|
|
23597
23890
|
if (this.isPreRendered) {
|
|
23891
|
+
const next = getCssDimension(height);
|
|
23598
23892
|
if (this.insertedDomEl) {
|
|
23599
|
-
this.insertedDomEl.style.height =
|
|
23893
|
+
this.insertedDomEl.style.height = next;
|
|
23600
23894
|
}
|
|
23601
23895
|
else if (this.preRenderWrapper) {
|
|
23602
|
-
this.preRenderWrapper.style.height =
|
|
23896
|
+
this.preRenderWrapper.style.height = next;
|
|
23603
23897
|
}
|
|
23604
23898
|
}
|
|
23605
23899
|
else {
|
|
@@ -24041,34 +24335,47 @@ class TsEmbed {
|
|
|
24041
24335
|
delete container.dataset[PRERENDER_CONTAINER_ORIGINAL_POSITION_KEY];
|
|
24042
24336
|
}
|
|
24043
24337
|
/**
|
|
24044
|
-
*
|
|
24045
|
-
|
|
24046
|
-
|
|
24047
|
-
|
|
24338
|
+
* Re-sizes the wrapper when its placeholder changes size.
|
|
24339
|
+
*
|
|
24340
|
+
* Position deliberately has no equivalent. An absolutely positioned wrapper
|
|
24341
|
+
* follows its containing block for free, so a correctly placed frame is the
|
|
24342
|
+
* browser's job and costs nothing; repositioning it on scroll would mean a
|
|
24343
|
+
* layout read and a style write per frame to compensate for placing it in
|
|
24344
|
+
* the wrong box. Size is the one thing the browser will not do for us: the
|
|
24345
|
+
* placeholder grows when the embedded app reports a new height, and the
|
|
24346
|
+
* wrapper has to be told.
|
|
24347
|
+
*/
|
|
24348
|
+
observePreRenderSize() {
|
|
24349
|
+
var _a;
|
|
24350
|
+
if (this.getPreRenderConfig().doNotTrackSize || typeof ResizeObserver === 'undefined') {
|
|
24351
|
+
return;
|
|
24352
|
+
}
|
|
24353
|
+
const placeholder = this.getPreRenderPlaceHolderElement();
|
|
24354
|
+
if (!placeholder) {
|
|
24048
24355
|
return;
|
|
24049
24356
|
}
|
|
24050
|
-
|
|
24051
|
-
|
|
24052
|
-
this.
|
|
24357
|
+
(_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
24358
|
+
this.resizeObserver = new ResizeObserver(() => this.syncPreRenderStyle());
|
|
24359
|
+
this.resizeObserver.observe(placeholder);
|
|
24053
24360
|
}
|
|
24054
24361
|
/**
|
|
24055
24362
|
* Destroys the ThoughtSpot embed, and remove any nodes from the DOM.
|
|
24056
24363
|
* @version SDK: 1.19.1 | ThoughtSpot: *
|
|
24057
24364
|
*/
|
|
24058
24365
|
destroy() {
|
|
24059
|
-
var _a, _b, _c;
|
|
24366
|
+
var _a, _b, _c, _d;
|
|
24060
24367
|
try {
|
|
24061
24368
|
this.removeFullscreenChangeHandler();
|
|
24062
|
-
this.
|
|
24369
|
+
(_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
24063
24370
|
this.unsubscribeToEvents();
|
|
24064
|
-
(
|
|
24371
|
+
(_b = this.preRenderWrapper) === null || _b === void 0 ? void 0 : _b.remove();
|
|
24065
24372
|
this.restorePreRenderContainerPosition();
|
|
24066
24373
|
if (!this.isRendered) {
|
|
24067
24374
|
return;
|
|
24068
24375
|
}
|
|
24069
24376
|
if (!getEmbedConfig().waitForCleanupOnDestroy) {
|
|
24070
24377
|
this.trigger(HostEvent.DestroyEmbed);
|
|
24071
|
-
(
|
|
24378
|
+
(_d = (_c = this.insertedDomEl) === null || _c === void 0 ? void 0 : _c.parentNode) === null || _d === void 0 ? void 0 : _d.removeChild(this.insertedDomEl);
|
|
24072
24379
|
}
|
|
24073
24380
|
else {
|
|
24074
24381
|
const cleanupTimeout = getEmbedConfig().cleanupTimeout;
|
|
@@ -24159,7 +24466,7 @@ class TsEmbed {
|
|
|
24159
24466
|
* wrapper to overlay it.
|
|
24160
24467
|
*/
|
|
24161
24468
|
async showPreRender() {
|
|
24162
|
-
var _a
|
|
24469
|
+
var _a;
|
|
24163
24470
|
uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_SHOW_PRE_RENDER, {
|
|
24164
24471
|
preRenderId: this.getPreRenderConfig().id,
|
|
24165
24472
|
embedComponentType: this.viewConfig.embedComponentType,
|
|
@@ -24178,14 +24485,16 @@ class TsEmbed {
|
|
|
24178
24485
|
this.beforePrerenderVisible();
|
|
24179
24486
|
if (this.hostElement) {
|
|
24180
24487
|
this.insertedDomEl = this.createPreRenderPlaceholder();
|
|
24181
|
-
|
|
24182
|
-
|
|
24183
|
-
|
|
24184
|
-
|
|
24185
|
-
|
|
24186
|
-
|
|
24187
|
-
|
|
24188
|
-
|
|
24488
|
+
// Carry a height fullHeight has already measured onto the fresh
|
|
24489
|
+
// placeholder, so a re-show does not flash at frameParams height.
|
|
24490
|
+
// UNMEASURED_WRAPPER_HEIGHT is what createPreRenderWrapper() seeds
|
|
24491
|
+
// before anything has been measured; treating that as a measurement
|
|
24492
|
+
// is what made a first reveal overshoot to a full viewport.
|
|
24493
|
+
const wrapperHeight = this.preRenderWrapper.style.height;
|
|
24494
|
+
if (this.viewConfig.fullHeight
|
|
24495
|
+
&& wrapperHeight
|
|
24496
|
+
&& wrapperHeight !== UNMEASURED_WRAPPER_HEIGHT) {
|
|
24497
|
+
this.insertedDomEl.style.height = wrapperHeight;
|
|
24189
24498
|
}
|
|
24190
24499
|
const placeHolderId = this.getPreRenderIds().placeHolder;
|
|
24191
24500
|
// Remove any stale placeholder from a previous cycle. It is located
|
|
@@ -24199,29 +24508,19 @@ class TsEmbed {
|
|
|
24199
24508
|
(_a = this.hostElement.querySelector(`#${placeHolderId}`)) === null || _a === void 0 ? void 0 : _a.remove();
|
|
24200
24509
|
this.hostElement.appendChild(this.insertedDomEl);
|
|
24201
24510
|
this.syncPreRenderStyle();
|
|
24202
|
-
|
|
24203
|
-
if (customContainer && !this.containerScrollListener) {
|
|
24204
|
-
this.containerScrollListener = () => this.syncPreRenderStyle();
|
|
24205
|
-
customContainer.addEventListener('scroll', this.containerScrollListener);
|
|
24206
|
-
}
|
|
24207
|
-
if (!this.getPreRenderConfig().doNotTrackSize) {
|
|
24208
|
-
const observeTarget = (_b = this.insertedDomEl) !== null && _b !== void 0 ? _b : this.hostElement;
|
|
24209
|
-
this.resizeObserver = new ResizeObserver((entries) => {
|
|
24210
|
-
entries.forEach((entry) => {
|
|
24211
|
-
if (entry.target === observeTarget) {
|
|
24212
|
-
this.syncPreRenderStyle();
|
|
24213
|
-
}
|
|
24214
|
-
});
|
|
24215
|
-
});
|
|
24216
|
-
this.resizeObserver.observe(observeTarget);
|
|
24217
|
-
}
|
|
24511
|
+
this.observePreRenderSize();
|
|
24218
24512
|
}
|
|
24219
24513
|
removeStyleProperties(this.preRenderWrapper, [
|
|
24220
24514
|
'z-index',
|
|
24221
24515
|
'opacity',
|
|
24222
|
-
'pointer-events',
|
|
24223
24516
|
'overflow',
|
|
24517
|
+
'transform',
|
|
24224
24518
|
]);
|
|
24519
|
+
// Set rather than removed: a container that carries `pointer-events:
|
|
24520
|
+
// none` — the usual styling for a parking root that must not swallow
|
|
24521
|
+
// clicks — passes it down, and dropping the property here would leave
|
|
24522
|
+
// the inherited `none` in force and the frame dead to input.
|
|
24523
|
+
setStyleProperties(this.preRenderWrapper, { pointerEvents: 'auto' });
|
|
24225
24524
|
this.subscribeToEvents();
|
|
24226
24525
|
// Setup fullscreen change handler for prerendered components
|
|
24227
24526
|
if (this.iFrame) {
|
|
@@ -24274,6 +24573,7 @@ class TsEmbed {
|
|
|
24274
24573
|
* If the component is not preRendered, it issues a warning.
|
|
24275
24574
|
*/
|
|
24276
24575
|
hidePreRender() {
|
|
24576
|
+
var _a;
|
|
24277
24577
|
uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_HIDE_PRE_RENDER, {
|
|
24278
24578
|
preRenderId: this.getPreRenderConfig().id,
|
|
24279
24579
|
embedComponentType: this.viewConfig.embedComponentType,
|
|
@@ -24285,20 +24585,25 @@ class TsEmbed {
|
|
|
24285
24585
|
return;
|
|
24286
24586
|
}
|
|
24287
24587
|
const { zIndex } = this.getPreRenderConfig();
|
|
24588
|
+
// A hidden pre-render frame must add no scroll space to the host page.
|
|
24288
24589
|
const preRenderHideStyles = {
|
|
24289
24590
|
opacity: '0',
|
|
24290
24591
|
pointerEvents: 'none',
|
|
24291
24592
|
zIndex: zIndex !== undefined ? String(zIndex) : '-1000',
|
|
24292
|
-
|
|
24593
|
+
// Resolves to the viewport, so the hidden frame belongs to no
|
|
24594
|
+
// scroll container's overflow; syncPreRenderStyle restores absolute
|
|
24595
|
+
// on show.
|
|
24596
|
+
position: 'fixed',
|
|
24293
24597
|
top: '0',
|
|
24294
24598
|
left: '0',
|
|
24295
24599
|
overflow: 'hidden',
|
|
24600
|
+
// The one exception: a transformed or contained ancestor captures
|
|
24601
|
+
// `fixed`; parking above the top edge keeps it out of that
|
|
24602
|
+
// overflow.
|
|
24603
|
+
transform: PRERENDER_PARKED_TRANSFORM,
|
|
24296
24604
|
};
|
|
24297
24605
|
setStyleProperties(this.preRenderWrapper, preRenderHideStyles);
|
|
24298
|
-
this.
|
|
24299
|
-
if (this.resizeObserver) {
|
|
24300
|
-
this.resizeObserver.disconnect();
|
|
24301
|
-
}
|
|
24606
|
+
(_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
24302
24607
|
const placeHolderEle = this.getPreRenderPlaceHolderElement();
|
|
24303
24608
|
if (placeHolderEle) {
|
|
24304
24609
|
placeHolderEle.parentElement.removeChild(placeHolderEle);
|
|
@@ -24464,8 +24769,11 @@ function buildSpotterSidebarAppInitData(defaultAppInitData, viewConfig, handleEr
|
|
|
24464
24769
|
embedParams: { visualOverridesParams: visualOverrides },
|
|
24465
24770
|
};
|
|
24466
24771
|
}
|
|
24772
|
+
// The app reads enableSpotterInstructionAndMoreSettings from the top level
|
|
24773
|
+
// of embedParams, so lift it out of the sidebar config.
|
|
24774
|
+
const { enableSpotterInstructionAndMoreSettings, ...sidebarConfigRest } = spotterSidebarConfig || {};
|
|
24467
24775
|
const resolvedSidebarConfig = {
|
|
24468
|
-
...
|
|
24776
|
+
...sidebarConfigRest,
|
|
24469
24777
|
...(resolvedEnablePastConversations !== undefined && {
|
|
24470
24778
|
enablePastConversationsSidebar: resolvedEnablePastConversations,
|
|
24471
24779
|
}),
|
|
@@ -24487,6 +24795,9 @@ function buildSpotterSidebarAppInitData(defaultAppInitData, viewConfig, handleEr
|
|
|
24487
24795
|
embedParams: {
|
|
24488
24796
|
...(defaultAppInitData.embedParams || {}),
|
|
24489
24797
|
spotterSidebarConfig: resolvedSidebarConfig,
|
|
24798
|
+
...(enableSpotterInstructionAndMoreSettings !== undefined
|
|
24799
|
+
? { enableSpotterInstructionAndMoreSettings }
|
|
24800
|
+
: {}),
|
|
24490
24801
|
...(visualOverrides !== undefined ? { visualOverridesParams: visualOverrides } : {}),
|
|
24491
24802
|
},
|
|
24492
24803
|
};
|
|
@@ -25056,6 +25367,46 @@ class AppEmbed extends V1Embed {
|
|
|
25056
25367
|
}
|
|
25057
25368
|
}
|
|
25058
25369
|
|
|
25370
|
+
/**
|
|
25371
|
+
* This method is like `_.isEqual` except that it accepts `customizer` which
|
|
25372
|
+
* is invoked to compare values. If `customizer` returns `undefined`, comparisons
|
|
25373
|
+
* are handled by the method instead. The `customizer` is invoked with up to
|
|
25374
|
+
* six arguments: (objValue, othValue [, index|key, object, other, stack]).
|
|
25375
|
+
*
|
|
25376
|
+
* @static
|
|
25377
|
+
* @memberOf _
|
|
25378
|
+
* @since 4.0.0
|
|
25379
|
+
* @category Lang
|
|
25380
|
+
* @param {*} value The value to compare.
|
|
25381
|
+
* @param {*} other The other value to compare.
|
|
25382
|
+
* @param {Function} [customizer] The function to customize comparisons.
|
|
25383
|
+
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
|
25384
|
+
* @example
|
|
25385
|
+
*
|
|
25386
|
+
* function isGreeting(value) {
|
|
25387
|
+
* return /^h(?:i|ello)$/.test(value);
|
|
25388
|
+
* }
|
|
25389
|
+
*
|
|
25390
|
+
* function customizer(objValue, othValue) {
|
|
25391
|
+
* if (isGreeting(objValue) && isGreeting(othValue)) {
|
|
25392
|
+
* return true;
|
|
25393
|
+
* }
|
|
25394
|
+
* }
|
|
25395
|
+
*
|
|
25396
|
+
* var array = ['hello', 'goodbye'];
|
|
25397
|
+
* var other = ['hi', 'goodbye'];
|
|
25398
|
+
*
|
|
25399
|
+
* _.isEqualWith(array, other, customizer);
|
|
25400
|
+
* // => true
|
|
25401
|
+
*/
|
|
25402
|
+
function isEqualWith(value, other, customizer) {
|
|
25403
|
+
customizer = typeof customizer == 'function' ? customizer : undefined;
|
|
25404
|
+
var result = customizer ? customizer(value, other) : undefined;
|
|
25405
|
+
return result === undefined ? _baseIsEqual(value, other, undefined, customizer) : !!result;
|
|
25406
|
+
}
|
|
25407
|
+
|
|
25408
|
+
var isEqualWith_1 = isEqualWith;
|
|
25409
|
+
|
|
25059
25410
|
const getPreviewQuery = `
|
|
25060
25411
|
query GetEurekaVizSnapshots(
|
|
25061
25412
|
$vizId: String!, $liveboardId: String!) {
|
|
@@ -25170,6 +25521,11 @@ const HOME_SETTLE_MS = 200;
|
|
|
25170
25521
|
* })
|
|
25171
25522
|
* ```
|
|
25172
25523
|
*/
|
|
25524
|
+
/**
|
|
25525
|
+
* A shallow copy without the keys whose value is `undefined`, so a key that was
|
|
25526
|
+
* assigned `undefined` compares equal to one that was never set.
|
|
25527
|
+
*/
|
|
25528
|
+
const definedEntries = (config = {}) => Object.fromEntries(Object.entries(config).filter(([, value]) => value !== undefined));
|
|
25173
25529
|
class LiveboardEmbed extends V1Embed {
|
|
25174
25530
|
constructor(domSelector, viewConfig) {
|
|
25175
25531
|
viewConfig.embedComponentType = 'LiveboardEmbed';
|
|
@@ -25455,16 +25811,18 @@ class LiveboardEmbed extends V1Embed {
|
|
|
25455
25811
|
beforePrerenderVisible() {
|
|
25456
25812
|
super.beforePrerenderVisible();
|
|
25457
25813
|
// Captured before showPreRender() hands the wrapper over to this
|
|
25458
|
-
// instance.
|
|
25459
|
-
// nothing stale to clear.
|
|
25814
|
+
// instance. React builds a new instance per mount, so an equal config
|
|
25815
|
+
// is a hide/show, not a hand-over: there is nothing stale to clear.
|
|
25460
25816
|
const previous = this.getPreRenderObj();
|
|
25461
|
-
const
|
|
25817
|
+
const previousRoute = this.isSameEmbedConfig(previous)
|
|
25818
|
+
? undefined
|
|
25819
|
+
: previous === null || previous === void 0 ? void 0 : previous.currentLiveboardState;
|
|
25462
25820
|
this.executeAfterEmbedContainerLoaded(async () => {
|
|
25463
25821
|
// Without this the params callback suspends on its await and
|
|
25464
25822
|
// Navigate goes out first, so the container loads with the previous
|
|
25465
25823
|
// config's filters.
|
|
25466
25824
|
await this.preRenderParamsApplied;
|
|
25467
|
-
if (this.
|
|
25825
|
+
if (this.isAlreadyOnSameRoute(previousRoute)) {
|
|
25468
25826
|
// Navigate to the route we are already on is a no-op, so the
|
|
25469
25827
|
// liveboard keeps its state. Home unmounts the container, which
|
|
25470
25828
|
// clears it.
|
|
@@ -25485,17 +25843,27 @@ class LiveboardEmbed extends V1Embed {
|
|
|
25485
25843
|
};
|
|
25486
25844
|
});
|
|
25487
25845
|
}
|
|
25846
|
+
// definedEntries drops undefined-valued keys: a shown instance carries
|
|
25847
|
+
// vizId/activeTabId/etc as undefined, so a raw isEqual never matches again.
|
|
25848
|
+
// Functions compare equal, since React passes a fresh closure per render.
|
|
25849
|
+
isSameEmbedConfig(previous) {
|
|
25850
|
+
if (!previous)
|
|
25851
|
+
return false;
|
|
25852
|
+
if (previous === this)
|
|
25853
|
+
return true;
|
|
25854
|
+
return isEqualWith_1(definedEntries(previous.viewConfig), definedEntries(this.viewConfig), (a, b) => (typeof a === 'function' && typeof b === 'function' ? true : undefined));
|
|
25855
|
+
}
|
|
25488
25856
|
// The whole route, not just the liveboard id: the path is built from the
|
|
25489
25857
|
// viz, tab and view too, so a same-liveboard show onto another tab is a
|
|
25490
25858
|
// real navigation.
|
|
25491
|
-
|
|
25492
|
-
if (!(
|
|
25859
|
+
isAlreadyOnSameRoute(previousRoute) {
|
|
25860
|
+
if (!(previousRoute === null || previousRoute === void 0 ? void 0 : previousRoute.liveboardId))
|
|
25493
25861
|
return false;
|
|
25494
25862
|
const { liveboardId, vizId, activeTabId, personalizedViewId, } = this.viewConfig;
|
|
25495
|
-
return
|
|
25496
|
-
&&
|
|
25497
|
-
&&
|
|
25498
|
-
&&
|
|
25863
|
+
return previousRoute.liveboardId === liveboardId
|
|
25864
|
+
&& previousRoute.vizId === vizId
|
|
25865
|
+
&& previousRoute.activeTabId === activeTabId
|
|
25866
|
+
&& previousRoute.personalizedViewId === personalizedViewId;
|
|
25499
25867
|
}
|
|
25500
25868
|
async handleRenderForPrerender() {
|
|
25501
25869
|
if (isUndefined$1(this.viewConfig.liveboardId)) {
|
|
@@ -27285,6 +27653,27 @@ const CONV_ASSIST_ANSWER_ROUTE = '/embed/conv-assist-answer';
|
|
|
27285
27653
|
*/
|
|
27286
27654
|
const CONVERSATION_SERVICE_PATH = '/conversation/v2';
|
|
27287
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
|
+
];
|
|
27288
27677
|
/**
|
|
27289
27678
|
* Starts an automatic renderer that watches the DOM for iframes containing
|
|
27290
27679
|
* the `tsmcp=true` query parameter and replaces them with fully configured
|
|
@@ -27452,6 +27841,36 @@ function getAnswerIds(conversationUrl, conversationId, stale) {
|
|
|
27452
27841
|
request.then(release, release);
|
|
27453
27842
|
return request;
|
|
27454
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
|
+
}
|
|
27455
27874
|
function isTSMCPIframe(iframe) {
|
|
27456
27875
|
try {
|
|
27457
27876
|
const url = new URL(iframe.src);
|
|
@@ -27478,11 +27897,41 @@ class AutoFrameRenderer extends TsEmbed {
|
|
|
27478
27897
|
super(container, viewConfig);
|
|
27479
27898
|
this.viewConfig = viewConfig;
|
|
27480
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
|
+
}
|
|
27481
27924
|
/**
|
|
27482
27925
|
* Builds the final iframe `src` by merging the SDK embed parameters
|
|
27483
27926
|
* with the query parameters already present on the source iframe URL.
|
|
27927
|
+
*
|
|
27484
27928
|
* The `tsmcp` marker param is removed so it does not propagate to the
|
|
27485
|
-
* 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.
|
|
27486
27935
|
*
|
|
27487
27936
|
* @param sourceSrc - The original iframe's `src` URL string.
|
|
27488
27937
|
* @param preserveSourceUrl - When true, return the source URL unchanged.
|
|
@@ -27500,7 +27949,15 @@ class AutoFrameRenderer extends TsEmbed {
|
|
|
27500
27949
|
// Replay markers address the SDK, not the ThoughtSpot application.
|
|
27501
27950
|
delete existingQueryParamsObject[Param.TsmcpConversationId];
|
|
27502
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];
|
|
27503
27957
|
const mergedQueryParams = { ...queryParams, ...existingQueryParamsObject };
|
|
27958
|
+
if (mergedHideActions.length) {
|
|
27959
|
+
mergedQueryParams[Param.HideActions] = mergedHideActions;
|
|
27960
|
+
}
|
|
27504
27961
|
const mergedQueryParamsString = getQueryParamString(mergedQueryParams, true);
|
|
27505
27962
|
const queryString = mergedQueryParamsString ? `?${mergedQueryParamsString}` : '';
|
|
27506
27963
|
const hash = resolved
|