@thoughtspot/visual-embed-sdk 1.26.3 → 1.27.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/cjs/.DS_Store +0 -0
- package/cjs/package.json +1 -1
- package/cjs/src/.DS_Store +0 -0
- package/cjs/src/auth.d.ts +4 -4
- package/cjs/src/auth.d.ts.map +1 -1
- package/cjs/src/auth.js +10 -4
- package/cjs/src/auth.js.map +1 -1
- package/cjs/src/embed/app.d.ts +15 -15
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +1 -1
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts +28 -23
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +4 -3
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/sage.d.ts +48 -30
- package/cjs/src/embed/sage.d.ts.map +1 -1
- package/cjs/src/embed/sage.js +7 -6
- package/cjs/src/embed/sage.js.map +1 -1
- package/cjs/src/embed/sage.spec.js +3 -3
- package/cjs/src/embed/sage.spec.js.map +1 -1
- package/cjs/src/embed/search-bar.d.ts +22 -6
- package/cjs/src/embed/search-bar.d.ts.map +1 -1
- package/cjs/src/embed/search-bar.js.map +1 -1
- package/cjs/src/embed/search.d.ts +34 -19
- package/cjs/src/embed/search.d.ts.map +1 -1
- package/cjs/src/embed/search.js +7 -3
- package/cjs/src/embed/search.js.map +1 -1
- package/cjs/src/embed/search.spec.js +10 -0
- package/cjs/src/embed/search.spec.js.map +1 -1
- package/cjs/src/embed/ts-embed.d.ts +1 -0
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +27 -7
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/embed/ts-embed.spec.js +114 -0
- package/cjs/src/embed/ts-embed.spec.js.map +1 -1
- package/cjs/src/react/index.spec.js +0 -12
- package/cjs/src/react/index.spec.js.map +1 -1
- package/cjs/src/types.d.ts +680 -231
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +605 -164
- package/cjs/src/types.js.map +1 -1
- package/cjs/src/utils/answerService.d.ts +10 -0
- package/cjs/src/utils/answerService.d.ts.map +1 -0
- package/cjs/src/utils/answerService.js +61 -0
- package/cjs/src/utils/answerService.js.map +1 -0
- package/cjs/src/utils/answerService.spec.d.ts +2 -0
- package/cjs/src/utils/answerService.spec.d.ts.map +1 -0
- package/cjs/src/utils/answerService.spec.js +31 -0
- package/cjs/src/utils/answerService.spec.js.map +1 -0
- package/cjs/src/utils/authService.d.ts +37 -0
- package/cjs/src/utils/authService.d.ts.map +1 -0
- package/cjs/src/utils/authService.js +106 -0
- package/cjs/src/utils/authService.js.map +1 -0
- package/cjs/src/utils/authService.spec.d.ts +2 -0
- package/cjs/src/utils/authService.spec.d.ts.map +1 -0
- package/cjs/src/utils/authService.spec.js +72 -0
- package/cjs/src/utils/authService.spec.js.map +1 -0
- package/cjs/src/utils/graphql/answerService/answerService.d.ts +2 -4
- package/cjs/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
- package/cjs/src/utils/graphql/answerService/answerService.js +2 -4
- package/cjs/src/utils/graphql/answerService/answerService.js.map +1 -1
- package/cjs/src/utils/processData.d.ts +6 -0
- package/cjs/src/utils/processData.d.ts.map +1 -1
- package/cjs/src/utils/processData.js +5 -1
- package/cjs/src/utils/processData.js.map +1 -1
- package/cjs/src/utils/processTrigger.js +1 -1
- package/dist/src/auth.d.ts +4 -4
- package/dist/src/auth.d.ts.map +1 -1
- package/dist/src/embed/app.d.ts +15 -15
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts +28 -23
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/embed/sage.d.ts +48 -30
- package/dist/src/embed/sage.d.ts.map +1 -1
- package/dist/src/embed/search-bar.d.ts +22 -6
- package/dist/src/embed/search-bar.d.ts.map +1 -1
- package/dist/src/embed/search.d.ts +34 -19
- package/dist/src/embed/search.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.d.ts +1 -0
- package/dist/src/embed/ts-embed.d.ts.map +1 -1
- package/dist/src/types.d.ts +680 -231
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/answerService.d.ts +10 -0
- package/dist/src/utils/answerService.d.ts.map +1 -0
- package/dist/src/utils/answerService.spec.d.ts +2 -0
- package/dist/src/utils/answerService.spec.d.ts.map +1 -0
- package/dist/src/utils/authService.d.ts +37 -0
- package/dist/src/utils/authService.d.ts.map +1 -0
- package/dist/src/utils/authService.spec.d.ts +2 -0
- package/dist/src/utils/authService.spec.d.ts.map +1 -0
- package/dist/src/utils/graphql/answerService/answerService.d.ts +2 -4
- package/dist/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
- package/dist/src/utils/processData.d.ts +6 -0
- package/dist/src/utils/processData.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +664 -194
- package/dist/tsembed-react.js +663 -193
- package/dist/tsembed.es.js +667 -194
- package/dist/tsembed.js +665 -192
- package/dist/visual-embed-sdk-react-full.d.ts +851 -328
- package/dist/visual-embed-sdk-react.d.ts +851 -328
- package/dist/visual-embed-sdk.d.ts +851 -328
- package/lib/.DS_Store +0 -0
- package/lib/package.json +1 -1
- package/lib/src/.DS_Store +0 -0
- package/lib/src/auth.d.ts +4 -4
- package/lib/src/auth.d.ts.map +1 -1
- package/lib/src/auth.js +10 -4
- package/lib/src/auth.js.map +1 -1
- package/lib/src/embed/app.d.ts +15 -15
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +1 -1
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts +28 -23
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +4 -3
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/sage.d.ts +48 -30
- package/lib/src/embed/sage.d.ts.map +1 -1
- package/lib/src/embed/sage.js +7 -6
- package/lib/src/embed/sage.js.map +1 -1
- package/lib/src/embed/sage.spec.js +3 -3
- package/lib/src/embed/sage.spec.js.map +1 -1
- package/lib/src/embed/search-bar.d.ts +22 -6
- package/lib/src/embed/search-bar.d.ts.map +1 -1
- package/lib/src/embed/search-bar.js.map +1 -1
- package/lib/src/embed/search.d.ts +34 -19
- package/lib/src/embed/search.d.ts.map +1 -1
- package/lib/src/embed/search.js +7 -3
- package/lib/src/embed/search.js.map +1 -1
- package/lib/src/embed/search.spec.js +10 -0
- package/lib/src/embed/search.spec.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts +1 -0
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +28 -8
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/embed/ts-embed.spec.js +114 -0
- package/lib/src/embed/ts-embed.spec.js.map +1 -1
- package/lib/src/react/index.spec.js +0 -12
- package/lib/src/react/index.spec.js.map +1 -1
- package/lib/src/types.d.ts +680 -231
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +605 -164
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils/answerService.d.ts +10 -0
- package/lib/src/utils/answerService.d.ts.map +1 -0
- package/lib/src/utils/answerService.js +57 -0
- package/lib/src/utils/answerService.js.map +1 -0
- package/lib/src/utils/answerService.spec.d.ts +2 -0
- package/lib/src/utils/answerService.spec.d.ts.map +1 -0
- package/lib/src/utils/answerService.spec.js +29 -0
- package/lib/src/utils/answerService.spec.js.map +1 -0
- package/lib/src/utils/authService.d.ts +37 -0
- package/lib/src/utils/authService.d.ts.map +1 -0
- package/lib/src/utils/authService.js +97 -0
- package/lib/src/utils/authService.js.map +1 -0
- package/lib/src/utils/authService.spec.d.ts +2 -0
- package/lib/src/utils/authService.spec.d.ts.map +1 -0
- package/lib/src/utils/authService.spec.js +70 -0
- package/lib/src/utils/authService.spec.js.map +1 -0
- package/lib/src/utils/graphql/answerService/answerService.d.ts +2 -4
- package/lib/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
- package/lib/src/utils/graphql/answerService/answerService.js +2 -4
- package/lib/src/utils/graphql/answerService/answerService.js.map +1 -1
- package/lib/src/utils/processData.d.ts +6 -0
- package/lib/src/utils/processData.d.ts.map +1 -1
- package/lib/src/utils/processData.js +4 -1
- package/lib/src/utils/processData.js.map +1 -1
- package/lib/src/utils/processTrigger.js +1 -1
- package/lib/src/visual-embed-sdk.d.ts +851 -328
- package/package.json +1 -1
- package/src/.DS_Store +0 -0
- package/src/auth.ts +10 -4
- package/src/embed/app.ts +20 -20
- package/src/embed/liveboard.ts +32 -27
- package/src/embed/sage.spec.ts +3 -3
- package/src/embed/sage.ts +54 -36
- package/src/embed/search-bar.tsx +22 -6
- package/src/embed/search.spec.ts +13 -0
- package/src/embed/search.ts +42 -22
- package/src/embed/ts-embed.spec.ts +132 -0
- package/src/embed/ts-embed.ts +27 -9
- package/src/react/index.spec.tsx +0 -29
- package/src/types.ts +680 -232
- package/src/utils/graphql/answerService/answerService.ts +2 -4
- package/src/utils/processData.ts +4 -1
- package/src/utils/processTrigger.ts +1 -1
package/dist/tsembed-react.js
CHANGED
|
@@ -458,10 +458,14 @@
|
|
|
458
458
|
*/
|
|
459
459
|
AuthType["None"] = "None";
|
|
460
460
|
/**
|
|
461
|
-
* Passthrough SSO to the embedded
|
|
461
|
+
* Passthrough SSO to the embedded application within the iframe. Requires least
|
|
462
462
|
* configuration, but may not be supported by all IDPs. This will behave like `None`
|
|
463
463
|
* if SSO is not configured on ThoughtSpot.
|
|
464
464
|
*
|
|
465
|
+
* To use this:
|
|
466
|
+
* Your SAML or OpenID provider must allow iframe redirects.
|
|
467
|
+
* For example, if you are using Okta as IdP, you can enable iframe embedding.
|
|
468
|
+
*
|
|
465
469
|
* @example
|
|
466
470
|
* ```js
|
|
467
471
|
* init({
|
|
@@ -469,12 +473,7 @@
|
|
|
469
473
|
* authType: AuthType.EmbeddedSSO,
|
|
470
474
|
* });
|
|
471
475
|
* ```
|
|
472
|
-
*
|
|
473
|
-
*
|
|
474
|
-
* To use this:
|
|
475
|
-
* Your SAML or OpenID provider must allow iframe redirects.
|
|
476
|
-
* eg. If you are using okta as IdP, you can enable iFrame embedding.
|
|
477
|
-
* @version: SDK: 1.15.0 | ThouhgtSpot: 8.8.0.cl
|
|
476
|
+
* @version: SDK: 1.15.0 | ThoughtSpot: 8.8.0.cl
|
|
478
477
|
*/
|
|
479
478
|
AuthType["EmbeddedSSO"] = "EmbeddedSSO";
|
|
480
479
|
/**
|
|
@@ -493,10 +492,10 @@
|
|
|
493
492
|
AuthType["SAML"] = "SSO_SAML";
|
|
494
493
|
/**
|
|
495
494
|
* SSO using SAML
|
|
496
|
-
*
|
|
497
|
-
*
|
|
495
|
+
* Makes the host application redirect to the SAML IdP. Use this
|
|
496
|
+
* if your IdP does not allow itself to be embedded.
|
|
498
497
|
*
|
|
499
|
-
* This redirects the host application to the SAML
|
|
498
|
+
* This redirects the host application to the SAML IdP. The host application
|
|
500
499
|
* will be redirected back to the ThoughtSpot app after authentication.
|
|
501
500
|
*
|
|
502
501
|
* @example
|
|
@@ -507,7 +506,7 @@
|
|
|
507
506
|
* });
|
|
508
507
|
* ```
|
|
509
508
|
*
|
|
510
|
-
* This opens the SAML
|
|
509
|
+
* This opens the SAML IdP in a popup window. The popup is triggered
|
|
511
510
|
* when the user clicks the trigger button. The popup window will be
|
|
512
511
|
* closed automatically after authentication.
|
|
513
512
|
* @example
|
|
@@ -521,8 +520,8 @@
|
|
|
521
520
|
* });
|
|
522
521
|
* ```
|
|
523
522
|
*
|
|
524
|
-
* Can also use event to trigger the popup flow. Works the same
|
|
525
|
-
* as above example.
|
|
523
|
+
* Can also use the event to trigger the popup flow. Works the same
|
|
524
|
+
* as the above example.
|
|
526
525
|
* @example
|
|
527
526
|
* ```js
|
|
528
527
|
* const authEE = init({
|
|
@@ -546,7 +545,7 @@
|
|
|
546
545
|
AuthType["OIDC"] = "SSO_OIDC";
|
|
547
546
|
/**
|
|
548
547
|
* SSO using OIDC
|
|
549
|
-
* Will make the host application redirect to the OIDC
|
|
548
|
+
* Will make the host application redirect to the OIDC IdP.
|
|
550
549
|
* See code samples in {@link SAMLRedirect}.
|
|
551
550
|
*/
|
|
552
551
|
AuthType["OIDCRedirect"] = "SSO_OIDC";
|
|
@@ -558,8 +557,8 @@
|
|
|
558
557
|
*/
|
|
559
558
|
AuthType["AuthServer"] = "AuthServer";
|
|
560
559
|
/**
|
|
561
|
-
* Trusted authentication server
|
|
562
|
-
* which returns a bearer token, generated using the secret_key obtained
|
|
560
|
+
* Trusted authentication server. Use your own authentication server
|
|
561
|
+
* which returns a bearer token, generated using the `secret_key` obtained
|
|
563
562
|
* from ThoughtSpot.
|
|
564
563
|
*
|
|
565
564
|
* @example
|
|
@@ -576,11 +575,11 @@
|
|
|
576
575
|
*/
|
|
577
576
|
AuthType["TrustedAuthToken"] = "AuthServer";
|
|
578
577
|
/**
|
|
579
|
-
* Trusted authentication server Cookieless, Use
|
|
580
|
-
* server which returns a bearer token, generated using the secret_key
|
|
578
|
+
* Trusted authentication server Cookieless, Use your own authentication
|
|
579
|
+
* server which returns a bearer token, generated using the `secret_key`
|
|
581
580
|
* obtained from ThoughtSpot. This uses a cookieless authentication
|
|
582
|
-
* approach, recommended to
|
|
583
|
-
* implemented by some browsers
|
|
581
|
+
* approach, recommended to bypass the third-party cookie-blocking restriction
|
|
582
|
+
* implemented by some browsers.
|
|
584
583
|
*
|
|
585
584
|
* @example
|
|
586
585
|
* ```js
|
|
@@ -593,7 +592,7 @@
|
|
|
593
592
|
* .then((data) => data.token);
|
|
594
593
|
* }
|
|
595
594
|
* ```
|
|
596
|
-
* @version SDK: 1.22.0|
|
|
595
|
+
* @version SDK: 1.22.0| ThoughtSpot: 9.3.0.cl, 9.5.1.sw
|
|
597
596
|
*/
|
|
598
597
|
AuthType["TrustedAuthTokenCookieless"] = "AuthServerCookieless";
|
|
599
598
|
/**
|
|
@@ -687,7 +686,7 @@
|
|
|
687
686
|
*/
|
|
688
687
|
HomepageModule["Favorite"] = "FAVORITE";
|
|
689
688
|
/**
|
|
690
|
-
* List of answers and
|
|
689
|
+
* List of answers and Liveboards
|
|
691
690
|
*/
|
|
692
691
|
HomepageModule["MyLibrary"] = "MY_LIBRARY";
|
|
693
692
|
/**
|
|
@@ -703,12 +702,26 @@
|
|
|
703
702
|
/**
|
|
704
703
|
* Rendering has initialized.
|
|
705
704
|
*
|
|
705
|
+
* @example
|
|
706
|
+
*```js
|
|
707
|
+
* liveboardEmbed.on(EmbedEvent.Init, showLoader)
|
|
708
|
+
* //show a loader
|
|
709
|
+
* function showLoader() {
|
|
710
|
+
* document.getElementById("loader");
|
|
711
|
+
* }
|
|
712
|
+
*```
|
|
706
713
|
* @returns timestamp - The timestamp when the event was generated.
|
|
707
714
|
*/
|
|
708
715
|
EmbedEvent["Init"] = "init";
|
|
709
716
|
/**
|
|
710
717
|
* Authentication has either succeeded or failed.
|
|
711
718
|
*
|
|
719
|
+
* @example
|
|
720
|
+
*```js
|
|
721
|
+
* appEmbed.on(EmbedEvent.AuthInit, payload => {
|
|
722
|
+
* console.log('AuthInit', payload);
|
|
723
|
+
* })
|
|
724
|
+
*```
|
|
712
725
|
* @returns isLoggedIn - A Boolean specifying whether authentication was successful.
|
|
713
726
|
*/
|
|
714
727
|
EmbedEvent["AuthInit"] = "authInit";
|
|
@@ -716,37 +729,91 @@
|
|
|
716
729
|
* The embed object container has loaded.
|
|
717
730
|
*
|
|
718
731
|
* @returns timestamp - The timestamp when the event was generated.
|
|
732
|
+
* @example
|
|
733
|
+
*```js
|
|
734
|
+
* liveboardEmbed.on(EmbedEvent.Load, hideLoader)
|
|
735
|
+
* //hide loader
|
|
736
|
+
* function hideLoader() {
|
|
737
|
+
* document.getElementById("loader");
|
|
738
|
+
* }
|
|
739
|
+
*```
|
|
719
740
|
*/
|
|
720
741
|
EmbedEvent["Load"] = "load";
|
|
721
742
|
/**
|
|
722
743
|
* Data pertaining to answer or Liveboard is received
|
|
723
744
|
*
|
|
724
745
|
* @return data - The answer or Liveboard data
|
|
746
|
+
* @example
|
|
747
|
+
*```js
|
|
748
|
+
* liveboardEmbed.on(EmbedEvent.Data, payload => {
|
|
749
|
+
* console.log('data', payload);
|
|
750
|
+
* })
|
|
751
|
+
*```
|
|
725
752
|
* @important
|
|
726
753
|
*/
|
|
727
754
|
EmbedEvent["Data"] = "data";
|
|
728
755
|
/**
|
|
729
|
-
* Search/
|
|
756
|
+
* Search/Answer/Liveboard filters have been applied/updated by the user.
|
|
730
757
|
*
|
|
731
758
|
* @hidden
|
|
732
759
|
*/
|
|
733
760
|
EmbedEvent["FiltersChanged"] = "filtersChanged";
|
|
734
761
|
/**
|
|
735
762
|
* Search query has been updated by the user.
|
|
763
|
+
*
|
|
764
|
+
* @example
|
|
765
|
+
*```js
|
|
766
|
+
* searchEmbed.on(EmbedEvent.QueryChanged, payload => console.log('data', payload))
|
|
767
|
+
*```
|
|
736
768
|
*/
|
|
737
769
|
EmbedEvent["QueryChanged"] = "queryChanged";
|
|
738
770
|
/**
|
|
739
|
-
* A drill
|
|
771
|
+
* A drill-down operation has been performed.
|
|
740
772
|
*
|
|
741
773
|
* @returns additionalFilters - Any additional filters applied
|
|
742
774
|
* @returns drillDownColumns - The columns on which drill down was performed
|
|
743
775
|
* @returns nonFilteredColumns - The columns that were not filtered
|
|
776
|
+
* @example
|
|
777
|
+
*```js
|
|
778
|
+
* searchEmbed.trigger(HostEvent.DrillDown, {
|
|
779
|
+
* points: {
|
|
780
|
+
* clickedPoint,
|
|
781
|
+
* selectedPoints: selectedPoint
|
|
782
|
+
* },
|
|
783
|
+
* autoDrillDown: true,
|
|
784
|
+
* })
|
|
785
|
+
*```
|
|
786
|
+
* In this example, `VizPointDoubleClick` event is used for
|
|
787
|
+
* triggering the `DrillDown` event when an area or specific
|
|
788
|
+
* data point on a table or chart is double-clicked.
|
|
789
|
+
* @example
|
|
790
|
+
*```js
|
|
791
|
+
* searchEmbed.on(EmbedEvent.VizPointDoubleClick, (payload) => {
|
|
792
|
+
* console.log(payload);
|
|
793
|
+
* const clickedPoint = payload.data.clickedPoint;
|
|
794
|
+
* const selectedPoint = payload.data.selectedPoints;
|
|
795
|
+
* console.log('>>> called', clickedPoint);
|
|
796
|
+
* embed.trigger(HostEvent.DrillDown, {
|
|
797
|
+
* points: {
|
|
798
|
+
* clickedPoint,
|
|
799
|
+
* selectedPoints: selectedPoint
|
|
800
|
+
* },
|
|
801
|
+
* autoDrillDown: true,
|
|
802
|
+
* })
|
|
803
|
+
* })
|
|
804
|
+
*```
|
|
744
805
|
*/
|
|
745
806
|
EmbedEvent["Drilldown"] = "drillDown";
|
|
746
807
|
/**
|
|
747
808
|
* One or more data sources have been selected.
|
|
748
809
|
*
|
|
749
810
|
* @returns dataSourceIds - the list of data sources
|
|
811
|
+
* @example
|
|
812
|
+
* ```js
|
|
813
|
+
* searchEmbed.on(EmbedEvent.DataSourceSelected, payload => {
|
|
814
|
+
* console.log('DataSourceSelected', payload);
|
|
815
|
+
* })
|
|
816
|
+
* ```
|
|
750
817
|
*/
|
|
751
818
|
EmbedEvent["DataSourceSelected"] = "dataSourceSelected";
|
|
752
819
|
/**
|
|
@@ -754,25 +821,49 @@
|
|
|
754
821
|
*
|
|
755
822
|
* @returns columnIds - the list of columns
|
|
756
823
|
* @version SDK: 1.10.0 | ThoughtSpot: 8.2.0.cl, 8.4.1.sw
|
|
824
|
+
* @example
|
|
825
|
+
* ```js
|
|
826
|
+
* appEmbed.on(EmbedEvent.AddRemoveColumns, payload => {
|
|
827
|
+
* console.log('AddRemoveColumns', payload);
|
|
828
|
+
* })
|
|
829
|
+
* ```
|
|
757
830
|
*/
|
|
758
831
|
EmbedEvent["AddRemoveColumns"] = "addRemoveColumns";
|
|
759
832
|
/**
|
|
760
|
-
* A custom action has been triggered
|
|
833
|
+
* A custom action has been triggered.
|
|
761
834
|
*
|
|
762
|
-
* @returns actionId -
|
|
763
|
-
* @returns data -
|
|
835
|
+
* @returns actionId - ID of the custom action
|
|
836
|
+
* @returns data - Response payload with the Answer or Liveboard data
|
|
837
|
+
* @example
|
|
838
|
+
* ```js
|
|
839
|
+
* appEmbed.on(EmbedEvent.customAction, payload => {
|
|
840
|
+
* const data = payload.data;
|
|
841
|
+
* if (data.id === 'insert Custom Action ID here') {
|
|
842
|
+
* console.log('Custom Action event:', data.embedAnswerData);
|
|
843
|
+
* }
|
|
844
|
+
* })
|
|
845
|
+
* ```
|
|
764
846
|
*/
|
|
765
847
|
EmbedEvent["CustomAction"] = "customAction";
|
|
766
848
|
/**
|
|
767
|
-
* Listen to double
|
|
849
|
+
* Listen to double click actions on a visualization.
|
|
768
850
|
*
|
|
769
|
-
* @return ContextMenuInputPoints -
|
|
851
|
+
* @return ContextMenuInputPoints - Data point that is double-clicked
|
|
770
852
|
* @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
|
|
853
|
+
* @example
|
|
854
|
+
* ```js
|
|
855
|
+
* livebaordEmbed.on(EmbedEvent.VizPointDoubleClick, payload => {
|
|
856
|
+
* console.log('VizPointDoubleClick', payload)
|
|
857
|
+
* })
|
|
858
|
+
* ```
|
|
771
859
|
*/
|
|
772
860
|
EmbedEvent["VizPointDoubleClick"] = "vizPointDoubleClick";
|
|
773
861
|
/**
|
|
774
|
-
* Listen to clicks on a visualization in a
|
|
862
|
+
* Listen to clicks on a visualization in a Liveboard or Search result.
|
|
775
863
|
*
|
|
864
|
+
* @return viz, clickedPoint - metadata about the point that is clicked
|
|
865
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
866
|
+
* @important
|
|
776
867
|
* @example
|
|
777
868
|
* ```js
|
|
778
869
|
* embed.on(ThoughtSpotEmbed.Event.VizPointClick, ({data}) => {
|
|
@@ -785,25 +876,42 @@
|
|
|
785
876
|
* )
|
|
786
877
|
* });
|
|
787
878
|
* ```
|
|
788
|
-
* @return viz, clickedPoint - metadata about point that is clicked
|
|
789
|
-
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
790
|
-
* @important
|
|
791
879
|
*/
|
|
792
880
|
EmbedEvent["VizPointClick"] = "vizPointClick";
|
|
793
881
|
/**
|
|
794
882
|
* An error has occurred.
|
|
795
883
|
*
|
|
796
884
|
* @returns error - An error object or message
|
|
885
|
+
* @example
|
|
886
|
+
* ```js
|
|
887
|
+
* SearchEmbed.on(EmbedEvent.Error, showErrorMsg)
|
|
888
|
+
* //show error messaage
|
|
889
|
+
* function showErrorMsg() {
|
|
890
|
+
* document.getElementById("error");
|
|
891
|
+
* ```
|
|
797
892
|
*/
|
|
798
893
|
EmbedEvent["Error"] = "Error";
|
|
799
894
|
/**
|
|
800
|
-
* The embedded object has sent an alert
|
|
895
|
+
* The embedded object has sent an alert.
|
|
801
896
|
*
|
|
802
897
|
* @returns alert - An alert object
|
|
898
|
+
* @example
|
|
899
|
+
* ```js
|
|
900
|
+
* searchEmbed.on(EmbedEvent.Alert)
|
|
901
|
+
* ```
|
|
803
902
|
*/
|
|
804
903
|
EmbedEvent["Alert"] = "alert";
|
|
805
904
|
/**
|
|
806
905
|
* The ThoughtSpot auth session has expired.
|
|
906
|
+
*
|
|
907
|
+
* @example
|
|
908
|
+
*```js
|
|
909
|
+
* appEmbed.on(EmbedEvent.AuthExpire, showAuthExpired)
|
|
910
|
+
* //show auth expired banner
|
|
911
|
+
* function showAuthExpired() {
|
|
912
|
+
* document.getElementById("authExpiredBanner");
|
|
913
|
+
* }
|
|
914
|
+
*```
|
|
807
915
|
*/
|
|
808
916
|
EmbedEvent["AuthExpire"] = "ThoughtspotAuthExpired";
|
|
809
917
|
/**
|
|
@@ -833,14 +941,27 @@
|
|
|
833
941
|
*/
|
|
834
942
|
EmbedEvent["EmbedIframeCenter"] = "EmbedIframeCenter";
|
|
835
943
|
/**
|
|
836
|
-
* Emitted when
|
|
837
|
-
*
|
|
944
|
+
* Emitted when the **Get Data** action is initiated.
|
|
945
|
+
* Applicable to `SearchBarEmbed` only.
|
|
838
946
|
*
|
|
839
|
-
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.
|
|
947
|
+
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
948
|
+
* @example
|
|
949
|
+
*```js
|
|
950
|
+
* searchbarEmbed.on(EmbedEvent.GetDataClick)
|
|
951
|
+
* .then(data => {
|
|
952
|
+
* console.log('Answer Data:', data);
|
|
953
|
+
* })
|
|
954
|
+
*```
|
|
840
955
|
*/
|
|
841
956
|
EmbedEvent["GetDataClick"] = "getDataClick";
|
|
842
957
|
/**
|
|
843
958
|
* Detects the route change.
|
|
959
|
+
*
|
|
960
|
+
* @example
|
|
961
|
+
*```js
|
|
962
|
+
* searchEmbed.on(EmbedEvent.RouteChange, payload =>
|
|
963
|
+
* console.log('data', payload))
|
|
964
|
+
*```
|
|
844
965
|
*/
|
|
845
966
|
EmbedEvent["RouteChange"] = "ROUTE_CHANGE";
|
|
846
967
|
/**
|
|
@@ -850,10 +971,15 @@
|
|
|
850
971
|
*/
|
|
851
972
|
EmbedEvent["V1Data"] = "exportVizDataToParent";
|
|
852
973
|
/**
|
|
853
|
-
* Emitted when the embed does not have cookie access. This
|
|
854
|
-
*
|
|
974
|
+
* Emitted when the embed does not have cookie access. This happens
|
|
975
|
+
* when Safari and other Web browsers block third-party cookies
|
|
976
|
+
* are blocked by default. `NoCookieAccess` can trigger
|
|
855
977
|
*
|
|
856
|
-
* @
|
|
978
|
+
* @example
|
|
979
|
+
*```js
|
|
980
|
+
* appEmbed.on(EmbedEvent.NoCookieAccess)
|
|
981
|
+
*```
|
|
982
|
+
* @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 7.2.1.sw
|
|
857
983
|
*/
|
|
858
984
|
EmbedEvent["NoCookieAccess"] = "noCookieAccess";
|
|
859
985
|
/**
|
|
@@ -867,12 +993,24 @@
|
|
|
867
993
|
* Emitted when any modal is opened in the app
|
|
868
994
|
*
|
|
869
995
|
* @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
|
|
996
|
+
* @example
|
|
997
|
+
*```js
|
|
998
|
+
* appEmbed.on(EmbedEvent.DialogOpen, payload => {
|
|
999
|
+
* console.log('dialog open', payload);
|
|
1000
|
+
* })
|
|
1001
|
+
*```
|
|
870
1002
|
*/
|
|
871
1003
|
EmbedEvent["DialogOpen"] = "dialog-open";
|
|
872
1004
|
/**
|
|
873
1005
|
* Emitted when any modal is closed in the app
|
|
874
1006
|
*
|
|
875
1007
|
* @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
|
|
1008
|
+
* @example
|
|
1009
|
+
*```js
|
|
1010
|
+
* appEmbed.on(EmbedEvent.DialogClose, payload => {
|
|
1011
|
+
* console.log('dialog close', payload);
|
|
1012
|
+
* })
|
|
1013
|
+
*```
|
|
876
1014
|
*/
|
|
877
1015
|
EmbedEvent["DialogClose"] = "dialog-close";
|
|
878
1016
|
/**
|
|
@@ -881,6 +1019,21 @@
|
|
|
881
1019
|
* other events on the rendered Liveboard.
|
|
882
1020
|
*
|
|
883
1021
|
* @version SDK: 1.9.1 | ThoughtSpot: 8.1.0.cl, 8.4.1.sw
|
|
1022
|
+
* @example
|
|
1023
|
+
*```js
|
|
1024
|
+
* liveboardEmbed.on(EmbedEvent.LiveboardRendered, payload => {
|
|
1025
|
+
console.log('Liveboard is rendered', payload);
|
|
1026
|
+
})
|
|
1027
|
+
*```
|
|
1028
|
+
* The following example shows how to trigger
|
|
1029
|
+
* `SetVisibleVizs` event using LiveboardRendered embed event:
|
|
1030
|
+
* @example
|
|
1031
|
+
*```js
|
|
1032
|
+
* const embedRef = useEmbedRef();
|
|
1033
|
+
* const onLiveboardRendered = () => {
|
|
1034
|
+
* embed.trigger(HostEvent.SetVisibleVizs, ['viz1', 'viz2']);
|
|
1035
|
+
* };
|
|
1036
|
+
*```
|
|
884
1037
|
*/
|
|
885
1038
|
EmbedEvent["LiveboardRendered"] = "PinboardRendered";
|
|
886
1039
|
/**
|
|
@@ -888,216 +1041,470 @@
|
|
|
888
1041
|
* is triggered on all events.
|
|
889
1042
|
*
|
|
890
1043
|
* @Version SDK: 1.10.0 | ThoughtSpot: 8.2.0.cl, 8.4.1.sw
|
|
1044
|
+
* @example
|
|
1045
|
+
*```js
|
|
1046
|
+
* appEmbed.on(EmbedEvent.ALL, payload => {
|
|
1047
|
+
* console.log('Embed Events', payload)
|
|
1048
|
+
* })
|
|
1049
|
+
*```
|
|
891
1050
|
*/
|
|
892
1051
|
EmbedEvent["ALL"] = "*";
|
|
893
1052
|
/**
|
|
894
1053
|
* Emitted when an Answer is saved in the app
|
|
895
1054
|
*
|
|
896
1055
|
* @Version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1056
|
+
* @example
|
|
1057
|
+
*```js
|
|
1058
|
+
* //trigger when action starts
|
|
1059
|
+
* searchEmbed.on(EmbedEvent.Save, payload => {
|
|
1060
|
+
* console.log('Save', payload)
|
|
1061
|
+
* }, {
|
|
1062
|
+
* start: true
|
|
1063
|
+
* })
|
|
1064
|
+
* //trigger when action ends
|
|
1065
|
+
* searchEmbed.on(EmbedEvent.Save, payload => {
|
|
1066
|
+
* console.log('Save', payload)
|
|
1067
|
+
* })
|
|
1068
|
+
*```
|
|
897
1069
|
*/
|
|
898
1070
|
EmbedEvent["Save"] = "save";
|
|
899
1071
|
/**
|
|
900
1072
|
* Emitted when the download action is triggered on an answer
|
|
901
1073
|
*
|
|
1074
|
+
* **Note**: This event is deprecated in v1.21.0.
|
|
1075
|
+
* To fire an event when a download action is initiated on a chart or table,
|
|
1076
|
+
* use `EmbedEvent.DownloadAsPng`, `EmbedEvent.DownloadAsPDF`, `EmbedEvent.DownloadAsCSV`,
|
|
1077
|
+
* or `EmbedEvent.DownloadAsXLSX`
|
|
1078
|
+
*
|
|
902
1079
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1080
|
+
* @example
|
|
1081
|
+
*```js
|
|
1082
|
+
* liveboardEmbed.trigger(HostEvent.Download, {
|
|
1083
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
1084
|
+
* })
|
|
1085
|
+
*```
|
|
903
1086
|
*/
|
|
904
1087
|
EmbedEvent["Download"] = "download";
|
|
905
1088
|
/**
|
|
906
1089
|
* Emitted when the download action is triggered on an answer
|
|
907
1090
|
*
|
|
908
1091
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.0.sw
|
|
1092
|
+
* @example
|
|
1093
|
+
*```js
|
|
1094
|
+
* //trigger when action starts
|
|
1095
|
+
* searchEmbed.on(EmbedEvent.DownloadAsPng, payload => {
|
|
1096
|
+
* console.log('download PNG', payload)}, {start: true })
|
|
1097
|
+
* //trigger when action ends
|
|
1098
|
+
* searchEmbed.on(EmbedEvent.DownloadAsPng, payload => {
|
|
1099
|
+
* console.log('download PNG', payload)})
|
|
1100
|
+
*```
|
|
909
1101
|
*/
|
|
910
1102
|
EmbedEvent["DownloadAsPng"] = "downloadAsPng";
|
|
911
1103
|
/**
|
|
912
1104
|
* Emitted when the Download as PDF action is triggered on an answer
|
|
913
1105
|
*
|
|
914
1106
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1107
|
+
* @example
|
|
1108
|
+
*```js
|
|
1109
|
+
* //trigger when action starts
|
|
1110
|
+
* searchEmbed.on(EmbedEvent.DownloadAsPdf, payload => {
|
|
1111
|
+
* console.log('download PDF', payload)}, {start: true })
|
|
1112
|
+
* //trigger when action ends
|
|
1113
|
+
* searchEmbed.on(EmbedEvent.DownloadAsPdf, payload => {
|
|
1114
|
+
* console.log('download PDF', payload)})
|
|
1115
|
+
*```
|
|
915
1116
|
*/
|
|
916
1117
|
EmbedEvent["DownloadAsPdf"] = "downloadAsPdf";
|
|
917
1118
|
/**
|
|
918
1119
|
* Emitted when the Download as CSV action is triggered on an answer
|
|
919
1120
|
*
|
|
920
1121
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1122
|
+
* @example
|
|
1123
|
+
*```js
|
|
1124
|
+
* //trigger when action starts
|
|
1125
|
+
* searchEmbed.on(EmbedEvent.DownloadAsCSV, payload => {
|
|
1126
|
+
* console.log('download CSV', payload)}, {start: true })
|
|
1127
|
+
* //trigger when action ends
|
|
1128
|
+
* searchEmbed.on(EmbedEvent.DownloadAsCSV, payload => {
|
|
1129
|
+
* console.log('download CSV', payload)})
|
|
1130
|
+
*```
|
|
921
1131
|
*/
|
|
922
1132
|
EmbedEvent["DownloadAsCsv"] = "downloadAsCsv";
|
|
923
1133
|
/**
|
|
924
1134
|
* Emitted when the Download as XLSX action is triggered on an answer
|
|
925
1135
|
*
|
|
926
1136
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1137
|
+
* @example
|
|
1138
|
+
*```js
|
|
1139
|
+
* //trigger when action starts
|
|
1140
|
+
* searchEmbed.on(EmbedEvent.DownloadAsXlsx, payload => {
|
|
1141
|
+
* console.log('download Xlsx', payload)}, { start: true })
|
|
1142
|
+
* //trigger when action ends
|
|
1143
|
+
* searchEmbed.on(EmbedEvent.DownloadAsXlsx, payload => {
|
|
1144
|
+
* console.log('download Xlsx', payload)})
|
|
1145
|
+
*```
|
|
927
1146
|
*/
|
|
928
1147
|
EmbedEvent["DownloadAsXlsx"] = "downloadAsXlsx";
|
|
929
1148
|
/**
|
|
930
|
-
* Emitted when an
|
|
1149
|
+
* Emitted when an Answer is deleted in the app
|
|
931
1150
|
*
|
|
932
1151
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1152
|
+
* @example
|
|
1153
|
+
*```js
|
|
1154
|
+
* //trigger when action starts
|
|
1155
|
+
* appEmbed.on(EmbedEvent.AnswerDelete, payload => {
|
|
1156
|
+
* console.log('delete answer', payload)}, {start: true })
|
|
1157
|
+
* //trigger when action is completed
|
|
1158
|
+
* appEmbed.on(EmbedEvent.AnswerDelete, payload => {
|
|
1159
|
+
* console.log('delete answer', payload)})
|
|
1160
|
+
*```
|
|
933
1161
|
*/
|
|
934
1162
|
EmbedEvent["AnswerDelete"] = "answerDelete";
|
|
935
1163
|
/**
|
|
936
1164
|
* Emitted when an answer is pinned to a Liveboard
|
|
937
1165
|
*
|
|
938
1166
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1167
|
+
* @example
|
|
1168
|
+
*```js
|
|
1169
|
+
* //trigger when action starts
|
|
1170
|
+
* searchEmbed.on(EmbedEvent.Pin, payload => {
|
|
1171
|
+
* console.log('pin', payload)
|
|
1172
|
+
* }, {
|
|
1173
|
+
* start: true
|
|
1174
|
+
* })
|
|
1175
|
+
* //trigger when action ends
|
|
1176
|
+
* searchEmbed.on(EmbedEvent.Pin, payload => {
|
|
1177
|
+
* console.log('pin', payload)
|
|
1178
|
+
* })
|
|
1179
|
+
*```
|
|
939
1180
|
*/
|
|
940
1181
|
EmbedEvent["Pin"] = "pin";
|
|
941
1182
|
/**
|
|
942
1183
|
* Emitted when SpotIQ analysis is triggered
|
|
943
1184
|
*
|
|
944
1185
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1186
|
+
* @example
|
|
1187
|
+
*```js
|
|
1188
|
+
* //trigger when action starts
|
|
1189
|
+
* searchEmbed.on(EmbedEvent.SpotIQAnalyze, payload => {
|
|
1190
|
+
* console.log('SpotIQAnalyze', payload)
|
|
1191
|
+
* }, {
|
|
1192
|
+
* start: true
|
|
1193
|
+
* })
|
|
1194
|
+
* //trigger when action ends
|
|
1195
|
+
* searchEmbed.on(EmbedEvent.SpotIQAnalyze, payload => {
|
|
1196
|
+
* console.log('SpotIQ analyze', payload)
|
|
1197
|
+
* })
|
|
1198
|
+
*```
|
|
945
1199
|
*/
|
|
946
1200
|
EmbedEvent["SpotIQAnalyze"] = "spotIQAnalyze";
|
|
947
1201
|
/**
|
|
948
1202
|
* Emitted when a user shares an object with another user or group
|
|
949
1203
|
*
|
|
950
1204
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1205
|
+
* @example
|
|
1206
|
+
*```js
|
|
1207
|
+
* //trigger when action starts
|
|
1208
|
+
* searchEmbed.on(EmbedEvent.Share, payload => {
|
|
1209
|
+
* console.log('Share', payload)
|
|
1210
|
+
* }, {
|
|
1211
|
+
* start: true
|
|
1212
|
+
* })
|
|
1213
|
+
* //trigger when action ends
|
|
1214
|
+
* searchEmbed.on(EmbedEvent.Share, payload => {
|
|
1215
|
+
* console.log('Share', payload)
|
|
1216
|
+
* })
|
|
1217
|
+
*```
|
|
951
1218
|
*/
|
|
952
1219
|
EmbedEvent["Share"] = "share";
|
|
953
1220
|
/**
|
|
954
|
-
* Emitted when a user clicks the Include action to include a specific value or
|
|
955
|
-
* on a chart or table
|
|
1221
|
+
* Emitted when a user clicks the **Include** action to include a specific value or
|
|
1222
|
+
* data on a chart or table.
|
|
956
1223
|
*
|
|
957
1224
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1225
|
+
* @example
|
|
1226
|
+
*```js
|
|
1227
|
+
* appEmbed.on(EmbedEvent.DrillInclude, payload => {
|
|
1228
|
+
* console.log('Drill include', payload);
|
|
1229
|
+
* })
|
|
1230
|
+
*```
|
|
958
1231
|
*/
|
|
959
1232
|
EmbedEvent["DrillInclude"] = "context-menu-item-include";
|
|
960
1233
|
/**
|
|
961
|
-
* Emitted when a user clicks the Exclude action to exclude a specific value or
|
|
962
|
-
* on a chart or table
|
|
1234
|
+
* Emitted when a user clicks the **Exclude** action to exclude a specific value or
|
|
1235
|
+
* data on a chart or table
|
|
963
1236
|
*
|
|
964
1237
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1238
|
+
* @example
|
|
1239
|
+
*```js
|
|
1240
|
+
* appEmbed.on(EmbedEvent.DrillExclude, payload => {
|
|
1241
|
+
* console.log('Drill exclude', payload);
|
|
1242
|
+
* })
|
|
1243
|
+
*```
|
|
965
1244
|
*/
|
|
966
1245
|
EmbedEvent["DrillExclude"] = "context-menu-item-exclude";
|
|
967
1246
|
/**
|
|
968
|
-
* Emitted when
|
|
1247
|
+
* Emitted when a column value is copied in the embedded app.
|
|
969
1248
|
*
|
|
970
1249
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1250
|
+
* @example
|
|
1251
|
+
*```js
|
|
1252
|
+
* seachEmbed.on(EmbedEvent.CopyToClipboard, payload => {
|
|
1253
|
+
* console.log('copy to clipboard', payload);
|
|
1254
|
+
* })
|
|
1255
|
+
*```
|
|
971
1256
|
*/
|
|
972
1257
|
EmbedEvent["CopyToClipboard"] = "context-menu-item-copy-to-clipboard";
|
|
973
1258
|
/**
|
|
974
|
-
* Emitted when a user clicks the Update TML action
|
|
1259
|
+
* Emitted when a user clicks the **Update TML** action
|
|
975
1260
|
*
|
|
976
1261
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1262
|
+
* @example
|
|
1263
|
+
*```js
|
|
1264
|
+
* liveboardEmbed.on(EmbedEvent.UpdateTML)
|
|
1265
|
+
* })
|
|
1266
|
+
*```
|
|
977
1267
|
*/
|
|
978
1268
|
EmbedEvent["UpdateTML"] = "updateTSL";
|
|
979
1269
|
/**
|
|
980
|
-
* Emitted when a user clicks the Edit TML action
|
|
1270
|
+
* Emitted when a user clicks the **Edit TML** action
|
|
981
1271
|
*
|
|
982
1272
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1273
|
+
* @example
|
|
1274
|
+
*```js
|
|
1275
|
+
* appEmbed.on(EmbedEvent.EditTML, payload => {
|
|
1276
|
+
* console.log('Edit TML', payload);
|
|
1277
|
+
* })
|
|
1278
|
+
*```
|
|
983
1279
|
*/
|
|
984
1280
|
EmbedEvent["EditTML"] = "editTSL";
|
|
985
1281
|
/**
|
|
986
|
-
* Emitted when
|
|
1282
|
+
* Emitted when the **Export TML** action is triggered on an
|
|
1283
|
+
* an embedded object in the app
|
|
987
1284
|
*
|
|
988
1285
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1286
|
+
* @example
|
|
1287
|
+
*```js
|
|
1288
|
+
* //trigger when action starts
|
|
1289
|
+
* searchEmbed.on(EmbedEvent.ExportTML, payload => {
|
|
1290
|
+
* console.log('Export TML', payload)}, { start: true })
|
|
1291
|
+
* //trigger when action ends
|
|
1292
|
+
* searchEmbed.on(EmbedEvent.ExportTML, payload => {
|
|
1293
|
+
* console.log('Export TML', payload)})
|
|
1294
|
+
*```
|
|
989
1295
|
*/
|
|
990
1296
|
EmbedEvent["ExportTML"] = "exportTSL";
|
|
991
1297
|
/**
|
|
992
|
-
* Emitted when an
|
|
1298
|
+
* Emitted when an Answer is saved as a View.
|
|
993
1299
|
*
|
|
994
1300
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1301
|
+
* @example
|
|
1302
|
+
*```js
|
|
1303
|
+
* appEmbed.on(EmbedEvent.SaveAsView, payload => {
|
|
1304
|
+
* console.log('View', payload);
|
|
1305
|
+
* })
|
|
1306
|
+
*```
|
|
995
1307
|
*/
|
|
996
1308
|
EmbedEvent["SaveAsView"] = "saveAsView";
|
|
997
1309
|
/**
|
|
998
|
-
* Emitted when
|
|
1310
|
+
* Emitted when the user creates a copy of an Answer
|
|
999
1311
|
*
|
|
1000
1312
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1313
|
+
* @example
|
|
1314
|
+
*```js
|
|
1315
|
+
* //trigger when action starts
|
|
1316
|
+
* appEmbed.on(EmbedEvent.CopyAEdit, payload => {
|
|
1317
|
+
* console.log('Copy and edit', payload)}, {start: true })
|
|
1318
|
+
* //trigger when action ends
|
|
1319
|
+
* appEmbed.on(EmbedEvent.CopyAEdit, payload => {
|
|
1320
|
+
* console.log('Copy and edit', payload)})
|
|
1321
|
+
*```
|
|
1001
1322
|
*/
|
|
1002
1323
|
EmbedEvent["CopyAEdit"] = "copyAEdit";
|
|
1003
1324
|
/**
|
|
1004
|
-
* Emitted when a user clicks Show underlying data on an
|
|
1325
|
+
* Emitted when a user clicks Show underlying data on an Answer
|
|
1005
1326
|
*
|
|
1006
1327
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1328
|
+
* @example
|
|
1329
|
+
*```js
|
|
1330
|
+
* liveboardEmbed.on(EmbedEvent.ShowUnderlyingData, payload => {
|
|
1331
|
+
* console.log('show data', payload);
|
|
1332
|
+
* })
|
|
1333
|
+
*```
|
|
1007
1334
|
*/
|
|
1008
1335
|
EmbedEvent["ShowUnderlyingData"] = "showUnderlyingData";
|
|
1009
1336
|
/**
|
|
1010
|
-
* Emitted when an answer is switched to a chart or table view
|
|
1337
|
+
* Emitted when an answer is switched to a chart or table view.
|
|
1011
1338
|
*
|
|
1012
1339
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1340
|
+
* @example
|
|
1341
|
+
*```js
|
|
1342
|
+
* searchEmbed.on(EmbedEvent.AnswerChartSwitcher, payload => {
|
|
1343
|
+
* console.log('switch view', payload);
|
|
1344
|
+
* })
|
|
1345
|
+
*```
|
|
1013
1346
|
*/
|
|
1014
1347
|
EmbedEvent["AnswerChartSwitcher"] = "answerChartSwitcher";
|
|
1015
1348
|
/**
|
|
1016
|
-
* Internal event to communicate the initial settings back to the
|
|
1349
|
+
* Internal event to communicate the initial settings back to the ThoughtSpot app
|
|
1017
1350
|
*
|
|
1018
1351
|
* @hidden
|
|
1019
1352
|
*/
|
|
1020
1353
|
EmbedEvent["APP_INIT"] = "appInit";
|
|
1021
1354
|
/**
|
|
1022
|
-
* Emitted when a user clicks Show Liveboard details on a Liveboard
|
|
1355
|
+
* Emitted when a user clicks **Show Liveboard details** on a Liveboard
|
|
1023
1356
|
*
|
|
1024
1357
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
1358
|
+
* @example
|
|
1359
|
+
*```js
|
|
1360
|
+
* liveboardEmbed.on(EmbedEvent.AnswerChartSwitcher, payload => {
|
|
1361
|
+
* console.log('Liveboard details', payload);
|
|
1362
|
+
* })
|
|
1363
|
+
*```
|
|
1025
1364
|
*/
|
|
1026
1365
|
EmbedEvent["LiveboardInfo"] = "pinboardInfo";
|
|
1027
1366
|
/**
|
|
1028
1367
|
* Emitted when a user clicks on the Favorite icon on a Liveboard
|
|
1029
1368
|
*
|
|
1030
1369
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
1370
|
+
* @example
|
|
1371
|
+
*```js
|
|
1372
|
+
* liveboardEmbed.on(EmbedEvent.AddToFavorites, payload => {
|
|
1373
|
+
* console.log('favorites', payload);
|
|
1374
|
+
* })
|
|
1375
|
+
*```
|
|
1031
1376
|
*/
|
|
1032
1377
|
EmbedEvent["AddToFavorites"] = "addToFavorites";
|
|
1033
1378
|
/**
|
|
1034
|
-
* Emitted when a user clicks Schedule on a Liveboard
|
|
1379
|
+
* Emitted when a user clicks **Schedule** on a Liveboard
|
|
1035
1380
|
*
|
|
1036
1381
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
1382
|
+
* @example
|
|
1383
|
+
*```js
|
|
1384
|
+
* liveboardEmbed.on(EmbedEvent.Schedule, payload => {
|
|
1385
|
+
* console.log(`Liveboard schedule', payload);
|
|
1386
|
+
* })
|
|
1387
|
+
*```
|
|
1037
1388
|
*/
|
|
1038
1389
|
EmbedEvent["Schedule"] = "subscription";
|
|
1039
1390
|
/**
|
|
1040
|
-
* Emitted when a user clicks Edit on a Liveboard or visualization
|
|
1391
|
+
* Emitted when a user clicks **Edit** on a Liveboard or visualization
|
|
1041
1392
|
*
|
|
1042
1393
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
1394
|
+
* @example
|
|
1395
|
+
*```js
|
|
1396
|
+
* liveboardEmbed.on(EmbedEvent.Edit, payload => {
|
|
1397
|
+
* console.log(`Liveboard edit', payload);
|
|
1398
|
+
* })
|
|
1399
|
+
*```
|
|
1043
1400
|
*/
|
|
1044
1401
|
EmbedEvent["Edit"] = "edit";
|
|
1045
1402
|
/**
|
|
1046
|
-
* Emitted when a user clicks Make a copy on a Liveboard
|
|
1403
|
+
* Emitted when a user clicks *Make a copy* on a Liveboard
|
|
1047
1404
|
*
|
|
1048
1405
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
1406
|
+
* @example
|
|
1407
|
+
*```js
|
|
1408
|
+
* liveboardEmbed.on(EmbedEvent.MakeACopy, payload => {
|
|
1409
|
+
* console.log(`Copy', payload);
|
|
1410
|
+
* })
|
|
1411
|
+
*```
|
|
1049
1412
|
*/
|
|
1050
1413
|
EmbedEvent["MakeACopy"] = "makeACopy";
|
|
1051
1414
|
/**
|
|
1052
|
-
* Emitted when a user clicks Present on a Liveboard or visualization
|
|
1415
|
+
* Emitted when a user clicks **Present** on a Liveboard or visualization
|
|
1053
1416
|
*
|
|
1054
1417
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
1418
|
+
* @example
|
|
1419
|
+
*```js
|
|
1420
|
+
* liveboardEmbed.trigger(HostEvent.Present)
|
|
1421
|
+
*```
|
|
1422
|
+
* @example
|
|
1423
|
+
*```js
|
|
1424
|
+
* liveboardEmbed.on(EmbedEvent.Present, {
|
|
1425
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1426
|
+
* })
|
|
1427
|
+
*```
|
|
1055
1428
|
*/
|
|
1056
1429
|
EmbedEvent["Present"] = "present";
|
|
1057
1430
|
/**
|
|
1058
|
-
* Emitted when a user clicks Delete on a
|
|
1431
|
+
* Emitted when a user clicks **Delete** on a visualization
|
|
1059
1432
|
*
|
|
1060
1433
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
1434
|
+
* @example
|
|
1435
|
+
*```js
|
|
1436
|
+
* liveboardEmbed.trigger(HostEvent.Delete,
|
|
1437
|
+
* {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1438
|
+
*```
|
|
1061
1439
|
*/
|
|
1062
1440
|
EmbedEvent["Delete"] = "delete";
|
|
1063
1441
|
/**
|
|
1064
1442
|
* Emitted when a user clicks Manage schedules on a Liveboard
|
|
1065
1443
|
*
|
|
1066
1444
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
1445
|
+
* @example
|
|
1446
|
+
*```js
|
|
1447
|
+
* liveboardEmbed.trigger(HostEvent.SchedulesList)
|
|
1448
|
+
*```
|
|
1067
1449
|
*/
|
|
1068
1450
|
EmbedEvent["SchedulesList"] = "schedule-list";
|
|
1069
1451
|
/**
|
|
1070
|
-
* Emitted when a user clicks Cancel in edit mode on a Liveboard
|
|
1452
|
+
* Emitted when a user clicks **Cancel** in edit mode on a Liveboard
|
|
1071
1453
|
*
|
|
1072
1454
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
1455
|
+
* @example
|
|
1456
|
+
*```js
|
|
1457
|
+
* liveboardEmbed.trigger(HostEvent.Cancel)
|
|
1458
|
+
*```
|
|
1073
1459
|
*/
|
|
1074
1460
|
EmbedEvent["Cancel"] = "cancel";
|
|
1075
1461
|
/**
|
|
1076
|
-
* Emitted when a user clicks Explore on a visualization
|
|
1462
|
+
* Emitted when a user clicks **Explore** on a visualization
|
|
1077
1463
|
*
|
|
1078
1464
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
1465
|
+
* @example
|
|
1466
|
+
*```js
|
|
1467
|
+
* liveboardEmbed.trigger(HostEvent.Explore, {
|
|
1468
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1469
|
+
*```
|
|
1079
1470
|
*/
|
|
1080
1471
|
EmbedEvent["Explore"] = "explore";
|
|
1081
1472
|
/**
|
|
1082
|
-
* Emitted when a user clicks Copy link action on a visualization
|
|
1473
|
+
* Emitted when a user clicks **Copy link** action on a visualization
|
|
1083
1474
|
*
|
|
1084
1475
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
1476
|
+
* @example
|
|
1477
|
+
*```js
|
|
1478
|
+
* liveboardEmbed.trigger(HostEvent.CopyLink, {
|
|
1479
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1480
|
+
*```
|
|
1085
1481
|
*/
|
|
1086
1482
|
EmbedEvent["CopyLink"] = "embedDocument";
|
|
1087
1483
|
/**
|
|
1088
|
-
* Emitted when a user interacts with cross filters on a visualization or
|
|
1484
|
+
* Emitted when a user interacts with cross filters on a visualization or Liveboard
|
|
1089
1485
|
*
|
|
1090
|
-
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
|
|
1486
|
+
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.5.0.sw
|
|
1487
|
+
* @example
|
|
1488
|
+
*```js
|
|
1489
|
+
* liveboardEmbed.trigger(HostEvent.CrossFilterChanged, {
|
|
1490
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1491
|
+
*```
|
|
1091
1492
|
*/
|
|
1092
1493
|
EmbedEvent["CrossFilterChanged"] = "cross-filter-changed";
|
|
1093
1494
|
/**
|
|
1094
1495
|
* Emitted when a user right clicks on a visualization (chart or table)
|
|
1095
1496
|
*
|
|
1096
|
-
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
|
|
1497
|
+
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.5.0.sw
|
|
1498
|
+
* @example
|
|
1499
|
+
*```js
|
|
1500
|
+
* LiveboardEmbed.on(EmbedEvent.VizPointRightClick, payload => {
|
|
1501
|
+
* console.log('VizPointClick', payload)
|
|
1502
|
+
* })
|
|
1503
|
+
*```
|
|
1097
1504
|
*/
|
|
1098
1505
|
EmbedEvent["VizPointRightClick"] = "vizPointRightClick";
|
|
1099
1506
|
/**
|
|
1100
|
-
* Emitted when a user clicks
|
|
1507
|
+
* Emitted when a user clicks **Insert to slide** on a visualization
|
|
1101
1508
|
*
|
|
1102
1509
|
* @hidden
|
|
1103
1510
|
*/
|
|
@@ -1105,52 +1512,52 @@
|
|
|
1105
1512
|
/**
|
|
1106
1513
|
* @hidden
|
|
1107
1514
|
* Emitted when a user changes any filter on a Liveboard.
|
|
1108
|
-
* @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
|
|
1515
|
+
* @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl, 9.5.0.sw
|
|
1109
1516
|
*/
|
|
1110
1517
|
EmbedEvent["FilterChanged"] = "filterChanged";
|
|
1111
1518
|
/**
|
|
1112
|
-
* Emitted when a user
|
|
1519
|
+
* Emitted when a user clicks the **Go** button on the Search page
|
|
1113
1520
|
*
|
|
1114
|
-
* @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
|
|
1521
|
+
* @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
|
|
1115
1522
|
*/
|
|
1116
1523
|
EmbedEvent["SageEmbedQuery"] = "sageEmbedQuery";
|
|
1117
1524
|
/**
|
|
1118
|
-
*
|
|
1525
|
+
* Emitted when a user selects a data source.
|
|
1119
1526
|
*
|
|
1120
|
-
* @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
|
|
1527
|
+
* @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
|
|
1121
1528
|
*/
|
|
1122
1529
|
EmbedEvent["SageWorksheetUpdated"] = "sageWorksheetUpdated";
|
|
1123
1530
|
/**
|
|
1124
|
-
* Emitted when a user updates a connection
|
|
1531
|
+
* Emitted when a user updates a connection on the **Data** page
|
|
1125
1532
|
*
|
|
1126
|
-
* @version SDK : 1.27.0 | Thoughtspot: 9.8.0.cl
|
|
1533
|
+
* @version SDK : 1.27.0 | Thoughtspot: 9.8.0.cl, 9.8.0.sw
|
|
1127
1534
|
*/
|
|
1128
1535
|
EmbedEvent["UpdateConnection"] = "updateConnection";
|
|
1129
1536
|
/**
|
|
1130
|
-
* Emitted when a user updates a connection
|
|
1537
|
+
* Emitted when a user updates a connection on the **Data** page
|
|
1131
1538
|
*
|
|
1132
|
-
* @version SDK : 1.27.0 | Thoughtspot: 9.8.0.cl
|
|
1539
|
+
* @version SDK : 1.27.0 | Thoughtspot: 9.8.0.cl, 9.8.0.sw
|
|
1133
1540
|
*/
|
|
1134
1541
|
EmbedEvent["CreateConnection"] = "createConnection";
|
|
1135
1542
|
/**
|
|
1136
1543
|
* Emitted when name, status (private or public) or filter values of a
|
|
1137
|
-
*
|
|
1544
|
+
* Personalised view is updated.
|
|
1138
1545
|
*
|
|
1139
1546
|
* @returns viewName: string
|
|
1140
1547
|
* @returns viewId: string
|
|
1141
1548
|
* @returns liveboardId: string
|
|
1142
1549
|
* @returns isPublic: boolean
|
|
1143
|
-
* @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
|
|
1550
|
+
* @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
|
|
1144
1551
|
*/
|
|
1145
1552
|
EmbedEvent["UpdatePersonalisedView"] = "updatePersonalisedView";
|
|
1146
1553
|
/**
|
|
1147
|
-
* Emitted when a
|
|
1554
|
+
* Emitted when a Personalised view is saved.
|
|
1148
1555
|
*
|
|
1149
1556
|
* @returns viewName: string
|
|
1150
1557
|
* @returns viewId: string
|
|
1151
1558
|
* @returns liveboardId: string
|
|
1152
1559
|
* @returns isPublic: boolean
|
|
1153
|
-
* @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
|
|
1560
|
+
* @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
|
|
1154
1561
|
*/
|
|
1155
1562
|
EmbedEvent["SavePersonalisedView"] = "savePersonalisedView";
|
|
1156
1563
|
/**
|
|
@@ -1160,7 +1567,7 @@
|
|
|
1160
1567
|
* @returns viewId: string
|
|
1161
1568
|
* @returns liveboardId: string
|
|
1162
1569
|
* @returns isPublic: boolean
|
|
1163
|
-
* @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
|
|
1570
|
+
* @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
|
|
1164
1571
|
*/
|
|
1165
1572
|
EmbedEvent["ResetLiveboard"] = "resetLiveboard";
|
|
1166
1573
|
/**
|
|
@@ -1168,11 +1575,11 @@
|
|
|
1168
1575
|
*
|
|
1169
1576
|
* @returns views: string[]
|
|
1170
1577
|
* @returns liveboardId: string
|
|
1171
|
-
* @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
|
|
1578
|
+
* @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
|
|
1172
1579
|
*/
|
|
1173
1580
|
EmbedEvent["DeletePersonalisedView"] = "deletePersonalisedView";
|
|
1174
1581
|
/**
|
|
1175
|
-
*
|
|
1582
|
+
* Emitted when a user creates a new worksheet
|
|
1176
1583
|
*
|
|
1177
1584
|
* @version SDK : 1.27.0 | Thoughtspot: 9.8.0.cl
|
|
1178
1585
|
*/
|
|
@@ -1180,15 +1587,16 @@
|
|
|
1180
1587
|
})(exports.EmbedEvent || (exports.EmbedEvent = {}));
|
|
1181
1588
|
(function (HostEvent) {
|
|
1182
1589
|
/**
|
|
1183
|
-
* Triggers a search
|
|
1184
|
-
*
|
|
1590
|
+
* Triggers a search operation with the search tokens specified in
|
|
1591
|
+
* the search query string.
|
|
1592
|
+
* Supported in `AppEmbed` and `SearchEmbed` deployments.
|
|
1185
1593
|
* Includes the following properties:
|
|
1186
1594
|
*
|
|
1187
|
-
* @param -
|
|
1595
|
+
* @param - `searchQuery` - query string with search tokens
|
|
1596
|
+
* @param - `dataSources` - Data source GUID to Search on
|
|
1188
1597
|
* - Although an array, only a single source
|
|
1189
1598
|
* is supported.
|
|
1190
|
-
* @param -
|
|
1191
|
-
* @param - execute - executes the existing / updated query
|
|
1599
|
+
* @param - `execute` - executes search and updates the existing query
|
|
1192
1600
|
* @example
|
|
1193
1601
|
* ```js
|
|
1194
1602
|
* searchembed.trigger(HostEvent.Search, {
|
|
@@ -1208,6 +1616,10 @@
|
|
|
1208
1616
|
* @param - columnGuid - Optional. GUID of the column to drill
|
|
1209
1617
|
* by. If not provided it will auto drill by the configured
|
|
1210
1618
|
* column.
|
|
1619
|
+
* @param - autoDrillDown - Optional. If true, the drill down will be
|
|
1620
|
+
* done automatically on the most popular column.
|
|
1621
|
+
* @param - vizId [TS >= 9.8.0] - Optional. The GUID of the visualization to drill
|
|
1622
|
+
* in case of a liveboard.
|
|
1211
1623
|
* @example
|
|
1212
1624
|
* ```js
|
|
1213
1625
|
* searchEmbed.on(EmbedEvent.VizPointDoubleClick, (payload) => {
|
|
@@ -1224,6 +1636,25 @@
|
|
|
1224
1636
|
* });
|
|
1225
1637
|
* })
|
|
1226
1638
|
* ```
|
|
1639
|
+
* @example
|
|
1640
|
+
* ```js
|
|
1641
|
+
* // Works with TS 9.8.0 and above
|
|
1642
|
+
*
|
|
1643
|
+
* liveboardEmbed.on(EmbedEvent.VizPointDoubleClick, (payload) => {
|
|
1644
|
+
* console.log(payload);
|
|
1645
|
+
* const clickedPoint = payload.data.clickedPoint;
|
|
1646
|
+
* const selectedPoint = payload.data.selectedPoints;
|
|
1647
|
+
* console.log('>>> called', clickedPoint);
|
|
1648
|
+
* liveboardEmbed.trigger(HostEvent.DrillDown, {
|
|
1649
|
+
* points: {
|
|
1650
|
+
* clickedPoint,
|
|
1651
|
+
* selectedPoints: selectedPoint
|
|
1652
|
+
* },
|
|
1653
|
+
* autoDrillDown: true,
|
|
1654
|
+
* vizId: payload.data.vizId
|
|
1655
|
+
* });
|
|
1656
|
+
* })
|
|
1657
|
+
* ```
|
|
1227
1658
|
* @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
|
|
1228
1659
|
*/
|
|
1229
1660
|
HostEvent["DrillDown"] = "triggerDrillDown";
|
|
@@ -1240,7 +1671,7 @@
|
|
|
1240
1671
|
*/
|
|
1241
1672
|
HostEvent["Reload"] = "reload";
|
|
1242
1673
|
/**
|
|
1243
|
-
*
|
|
1674
|
+
* Display specific visualizations on a Liveboard.
|
|
1244
1675
|
*
|
|
1245
1676
|
* @param - An array of GUIDs of the visualization to show. The visualization IDs not passed
|
|
1246
1677
|
* in this parameter will be hidden.
|
|
@@ -1254,7 +1685,7 @@
|
|
|
1254
1685
|
*/
|
|
1255
1686
|
HostEvent["SetVisibleVizs"] = "SetPinboardVisibleVizs";
|
|
1256
1687
|
/**
|
|
1257
|
-
* Set
|
|
1688
|
+
* Set a Liveboard tab as an active tab.
|
|
1258
1689
|
*
|
|
1259
1690
|
* @param - tabId - string of id of Tab to show
|
|
1260
1691
|
* @example
|
|
@@ -1267,7 +1698,7 @@
|
|
|
1267
1698
|
*/
|
|
1268
1699
|
HostEvent["SetActiveTab"] = "SetActiveTab";
|
|
1269
1700
|
/**
|
|
1270
|
-
*
|
|
1701
|
+
* Update runtime filters applied on a Saved Answer or Liveboard. The
|
|
1271
1702
|
* runtime filters passed here are appended to the existing runtime
|
|
1272
1703
|
* filters.
|
|
1273
1704
|
* Pass an array of runtime filters with the following attributes:
|
|
@@ -1293,10 +1724,11 @@
|
|
|
1293
1724
|
*/
|
|
1294
1725
|
HostEvent["UpdateRuntimeFilters"] = "UpdateRuntimeFilters";
|
|
1295
1726
|
/**
|
|
1296
|
-
* Navigate to a specific page in the embedded application
|
|
1727
|
+
* Navigate to a specific page in the embedded ThoughtSpot application.
|
|
1297
1728
|
* This is the same as calling `appEmbed.navigateToPage(path, true)`
|
|
1298
1729
|
*
|
|
1299
|
-
* @param - path - the path to navigate to
|
|
1730
|
+
* @param - `path` - the path to navigate to to go forward or back. The path value can
|
|
1731
|
+
* be a number; for example, `1`, `-1`.
|
|
1300
1732
|
* @example
|
|
1301
1733
|
* ```js
|
|
1302
1734
|
* appEmbed.navigateToPage(-1)
|
|
@@ -1305,7 +1737,7 @@
|
|
|
1305
1737
|
*/
|
|
1306
1738
|
HostEvent["Navigate"] = "Navigate";
|
|
1307
1739
|
/**
|
|
1308
|
-
*
|
|
1740
|
+
* Open the filter panel for a particular column.
|
|
1309
1741
|
* Works with Search and Liveboard embed.
|
|
1310
1742
|
*
|
|
1311
1743
|
* @param - { columnId: string,
|
|
@@ -1323,7 +1755,7 @@
|
|
|
1323
1755
|
*/
|
|
1324
1756
|
HostEvent["OpenFilter"] = "openFilter";
|
|
1325
1757
|
/**
|
|
1326
|
-
*
|
|
1758
|
+
* Add columns to the current search query.
|
|
1327
1759
|
*
|
|
1328
1760
|
* @param - { columnIds: string[] }
|
|
1329
1761
|
* @example
|
|
@@ -1334,7 +1766,7 @@
|
|
|
1334
1766
|
*/
|
|
1335
1767
|
HostEvent["AddColumns"] = "addColumns";
|
|
1336
1768
|
/**
|
|
1337
|
-
*
|
|
1769
|
+
* Remove a column from the current search query.
|
|
1338
1770
|
*
|
|
1339
1771
|
* @param - { columnId: string }
|
|
1340
1772
|
* @example
|
|
@@ -1345,27 +1777,29 @@
|
|
|
1345
1777
|
*/
|
|
1346
1778
|
HostEvent["RemoveColumn"] = "removeColumn";
|
|
1347
1779
|
/**
|
|
1348
|
-
*
|
|
1780
|
+
* Get the transient state of a Liveboard as encoded content.
|
|
1781
|
+
* This includes unsaved and ad hoc changes such as
|
|
1782
|
+
* Liveboard filters, runtime filters applied on visualizations on a
|
|
1783
|
+
* Liveboard, and Liveboard layout, changes to visualizations such as
|
|
1784
|
+
* sorting, toggling of legends, and data drill down.
|
|
1349
1785
|
*
|
|
1350
1786
|
* @example
|
|
1351
1787
|
* ```js
|
|
1352
|
-
* liveboardEmbed.trigger(HostEvent.
|
|
1788
|
+
* liveboardEmbed.trigger(HostEvent.getexportrequestforcurrentpinboard).then(
|
|
1789
|
+
* data=>console.log(data))
|
|
1353
1790
|
* ```
|
|
1354
1791
|
* @version SDK: 1.13.0 | ThoughtSpot: 8.5.0.cl, 8.8.1.sw
|
|
1355
1792
|
*/
|
|
1356
1793
|
HostEvent["getExportRequestForCurrentPinboard"] = "getExportRequestForCurrentPinboard";
|
|
1357
1794
|
/**
|
|
1358
|
-
*
|
|
1795
|
+
* Trigger the **Pin** action on an embedded object
|
|
1359
1796
|
*
|
|
1360
1797
|
* @param - Liveboard embed takes the `vizId` as a
|
|
1361
|
-
* key. Can be left undefined when embedding Search, full app or
|
|
1798
|
+
* key. Can be left undefined when embedding Search, full app, or
|
|
1362
1799
|
* a visualization.
|
|
1363
1800
|
* @example
|
|
1364
1801
|
* ```js
|
|
1365
|
-
*
|
|
1366
|
-
* ```
|
|
1367
|
-
* ```js
|
|
1368
|
-
* vizEmbed.trigger(HostEvent.Pin)
|
|
1802
|
+
* appEmbed.trigger(HostEvent.Pin)
|
|
1369
1803
|
* ```
|
|
1370
1804
|
* ```js
|
|
1371
1805
|
* searchEmbed.trigger(HostEvent.Pin)
|
|
@@ -1374,17 +1808,18 @@
|
|
|
1374
1808
|
*/
|
|
1375
1809
|
HostEvent["Pin"] = "pin";
|
|
1376
1810
|
/**
|
|
1377
|
-
*
|
|
1811
|
+
* Trigger the **Show Liveboard details** action
|
|
1812
|
+
* on an embedded Liveboard.
|
|
1378
1813
|
*
|
|
1379
1814
|
* @example
|
|
1380
|
-
|
|
1381
|
-
*
|
|
1382
|
-
|
|
1815
|
+
*```js
|
|
1816
|
+
* liveboardEmbed.trigger(HostEvent.LiveboardInfo)
|
|
1817
|
+
*```
|
|
1383
1818
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
1384
1819
|
*/
|
|
1385
1820
|
HostEvent["LiveboardInfo"] = "pinboardInfo";
|
|
1386
1821
|
/**
|
|
1387
|
-
*
|
|
1822
|
+
* Trigger the **Schedule** action on an embedded Liveboard.
|
|
1388
1823
|
*
|
|
1389
1824
|
* @example
|
|
1390
1825
|
* ```js
|
|
@@ -1394,7 +1829,7 @@
|
|
|
1394
1829
|
*/
|
|
1395
1830
|
HostEvent["Schedule"] = "subscription";
|
|
1396
1831
|
/**
|
|
1397
|
-
*
|
|
1832
|
+
* Trigger the **Manage schedule** action on an embedded Liveboard
|
|
1398
1833
|
*
|
|
1399
1834
|
* @example
|
|
1400
1835
|
* ```js
|
|
@@ -1404,7 +1839,7 @@
|
|
|
1404
1839
|
*/
|
|
1405
1840
|
HostEvent["SchedulesList"] = "schedule-list";
|
|
1406
1841
|
/**
|
|
1407
|
-
*
|
|
1842
|
+
* Trigger the **Export TML** action on an embedded Liveboard.
|
|
1408
1843
|
*
|
|
1409
1844
|
* @example
|
|
1410
1845
|
* ```js
|
|
@@ -1414,7 +1849,7 @@
|
|
|
1414
1849
|
*/
|
|
1415
1850
|
HostEvent["ExportTML"] = "exportTSL";
|
|
1416
1851
|
/**
|
|
1417
|
-
*
|
|
1852
|
+
* Trigger the **Edit TML** action on an embedded Liveboard.
|
|
1418
1853
|
*
|
|
1419
1854
|
* @example
|
|
1420
1855
|
* ```js
|
|
@@ -1424,7 +1859,7 @@
|
|
|
1424
1859
|
*/
|
|
1425
1860
|
HostEvent["EditTML"] = "editTSL";
|
|
1426
1861
|
/**
|
|
1427
|
-
*
|
|
1862
|
+
* Trigger the **Update TML** action on an embedded Liveboard.
|
|
1428
1863
|
*
|
|
1429
1864
|
* @example
|
|
1430
1865
|
* ```js
|
|
@@ -1434,7 +1869,7 @@
|
|
|
1434
1869
|
*/
|
|
1435
1870
|
HostEvent["UpdateTML"] = "updateTSL";
|
|
1436
1871
|
/**
|
|
1437
|
-
*
|
|
1872
|
+
* Trigger the **Download PDF** action on an embedded Liveboard.
|
|
1438
1873
|
*
|
|
1439
1874
|
* @example
|
|
1440
1875
|
* ```js
|
|
@@ -1444,8 +1879,8 @@
|
|
|
1444
1879
|
*/
|
|
1445
1880
|
HostEvent["DownloadAsPdf"] = "downloadAsPdf";
|
|
1446
1881
|
/**
|
|
1447
|
-
*
|
|
1448
|
-
* visualization page
|
|
1882
|
+
* Trigger the **Make a copy** action on a Liveboard, Search, or
|
|
1883
|
+
* visualization page.
|
|
1449
1884
|
*
|
|
1450
1885
|
* @example
|
|
1451
1886
|
* ```js
|
|
@@ -1461,7 +1896,7 @@
|
|
|
1461
1896
|
*/
|
|
1462
1897
|
HostEvent["MakeACopy"] = "makeACopy";
|
|
1463
1898
|
/**
|
|
1464
|
-
*
|
|
1899
|
+
* Trigger the **Delete** action for a Liveboard.
|
|
1465
1900
|
*
|
|
1466
1901
|
* @example
|
|
1467
1902
|
* ```js
|
|
@@ -1471,7 +1906,7 @@
|
|
|
1471
1906
|
*/
|
|
1472
1907
|
HostEvent["Remove"] = "delete";
|
|
1473
1908
|
/**
|
|
1474
|
-
*
|
|
1909
|
+
* Trigger the **Explore** action on a visualization.
|
|
1475
1910
|
*
|
|
1476
1911
|
* @param - an object with `vizId` as a key
|
|
1477
1912
|
* @example
|
|
@@ -1482,7 +1917,7 @@
|
|
|
1482
1917
|
*/
|
|
1483
1918
|
HostEvent["Explore"] = "explore";
|
|
1484
1919
|
/**
|
|
1485
|
-
*
|
|
1920
|
+
* Trigger the **Create alert** action on a visualization
|
|
1486
1921
|
*
|
|
1487
1922
|
* @param - an object with `vizId` as a key
|
|
1488
1923
|
* @example
|
|
@@ -1495,7 +1930,7 @@
|
|
|
1495
1930
|
*/
|
|
1496
1931
|
HostEvent["CreateMonitor"] = "createMonitor";
|
|
1497
1932
|
/**
|
|
1498
|
-
*
|
|
1933
|
+
* Trigger the **Manage alerts** action on a visualization
|
|
1499
1934
|
*
|
|
1500
1935
|
* @param - an object with `vizId` as a key
|
|
1501
1936
|
* @example
|
|
@@ -1508,7 +1943,7 @@
|
|
|
1508
1943
|
*/
|
|
1509
1944
|
HostEvent["ManageMonitor"] = "manageMonitor";
|
|
1510
1945
|
/**
|
|
1511
|
-
*
|
|
1946
|
+
* Trigger the **Edit** action on a Liveboard or visualization
|
|
1512
1947
|
*
|
|
1513
1948
|
* @param - object - To trigger the action for a specific visualization
|
|
1514
1949
|
* in Liveboard embed, pass in `vizId` as a key.
|
|
@@ -1529,7 +1964,7 @@
|
|
|
1529
1964
|
*/
|
|
1530
1965
|
HostEvent["Edit"] = "edit";
|
|
1531
1966
|
/**
|
|
1532
|
-
*
|
|
1967
|
+
* Trigger the **Copy link** action on a Liveboard or visualization
|
|
1533
1968
|
*
|
|
1534
1969
|
* @param - object - to trigger the action for a
|
|
1535
1970
|
* specific visualization in Liveboard embed, pass in `vizId` as a key
|
|
@@ -1547,7 +1982,7 @@
|
|
|
1547
1982
|
*/
|
|
1548
1983
|
HostEvent["CopyLink"] = "embedDocument";
|
|
1549
1984
|
/**
|
|
1550
|
-
*
|
|
1985
|
+
* Trigger the **Present** action on a Liveboard or visualization
|
|
1551
1986
|
*
|
|
1552
1987
|
* @param - object - to trigger the action for a specific visualization
|
|
1553
1988
|
* in Liveboard embed, pass in `vizId` as a key
|
|
@@ -1565,7 +2000,7 @@
|
|
|
1565
2000
|
*/
|
|
1566
2001
|
HostEvent["Present"] = "present";
|
|
1567
2002
|
/**
|
|
1568
|
-
*
|
|
2003
|
+
* Get TML for the current search.
|
|
1569
2004
|
*
|
|
1570
2005
|
* @example
|
|
1571
2006
|
* ```js
|
|
@@ -1580,7 +2015,7 @@
|
|
|
1580
2015
|
*/
|
|
1581
2016
|
HostEvent["GetTML"] = "getTML";
|
|
1582
2017
|
/**
|
|
1583
|
-
*
|
|
2018
|
+
* Trigger the **Show underlying data** action on visualization or search
|
|
1584
2019
|
*
|
|
1585
2020
|
* @param - an object with vizId as a key
|
|
1586
2021
|
* @example
|
|
@@ -1598,7 +2033,9 @@
|
|
|
1598
2033
|
*/
|
|
1599
2034
|
HostEvent["ShowUnderlyingData"] = "showUnderlyingData";
|
|
1600
2035
|
/**
|
|
1601
|
-
*
|
|
2036
|
+
* Trigger the **Delete** action for a visualization
|
|
2037
|
+
* in an embedded Liveboard, or a chart or table
|
|
2038
|
+
* generated from Search.
|
|
1602
2039
|
*
|
|
1603
2040
|
* @param - Liveboard embed takes an object with `vizId` as a key.
|
|
1604
2041
|
* Can be left empty if embedding Search or visualization.
|
|
@@ -1608,16 +2045,13 @@
|
|
|
1608
2045
|
* '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1609
2046
|
* ```
|
|
1610
2047
|
* ```js
|
|
1611
|
-
* vizEmbed.trigger(HostEvent.Delete)
|
|
1612
|
-
* ```
|
|
1613
|
-
* ```js
|
|
1614
2048
|
* searchEmbed.trigger(HostEvent.Delete)
|
|
1615
2049
|
* ```
|
|
1616
2050
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
1617
2051
|
*/
|
|
1618
2052
|
HostEvent["Delete"] = "onDeleteAnswer";
|
|
1619
2053
|
/**
|
|
1620
|
-
*
|
|
2054
|
+
* Trigger the **SpotIQ analyze** action on visualization
|
|
1621
2055
|
* or search.
|
|
1622
2056
|
*
|
|
1623
2057
|
* @param - Liveboard embed takes `vizId` as a
|
|
@@ -1638,7 +2072,7 @@
|
|
|
1638
2072
|
*/
|
|
1639
2073
|
HostEvent["SpotIQAnalyze"] = "spotIQAnalyze";
|
|
1640
2074
|
/**
|
|
1641
|
-
*
|
|
2075
|
+
* Trigger the **Download** action on charts in
|
|
1642
2076
|
* the embedded view.
|
|
1643
2077
|
*
|
|
1644
2078
|
* @example
|
|
@@ -1647,17 +2081,15 @@
|
|
|
1647
2081
|
* '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1648
2082
|
* ```
|
|
1649
2083
|
* ```js
|
|
1650
|
-
*
|
|
2084
|
+
* embed.trigger(HostEvent.Download)
|
|
1651
2085
|
* ```
|
|
1652
|
-
*
|
|
1653
|
-
*
|
|
1654
|
-
* ```
|
|
1655
|
-
* @deprecated from SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl ,9.4.1.sw ,Use {@link DownloadAsPng}
|
|
2086
|
+
* @deprecated from SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl ,9.4.1.sw
|
|
2087
|
+
* Use {@link DownloadAsPng}
|
|
1656
2088
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
1657
2089
|
*/
|
|
1658
2090
|
HostEvent["Download"] = "downloadAsPng";
|
|
1659
2091
|
/**
|
|
1660
|
-
*
|
|
2092
|
+
* Trigger the **Download** > **PNG** action on
|
|
1661
2093
|
* charts in the embedded view.
|
|
1662
2094
|
*
|
|
1663
2095
|
* @example
|
|
@@ -1673,7 +2105,7 @@
|
|
|
1673
2105
|
*/
|
|
1674
2106
|
HostEvent["DownloadAsPng"] = "downloadAsPng";
|
|
1675
2107
|
/**
|
|
1676
|
-
*
|
|
2108
|
+
* Trigger the **Download** > **CSV** action on tables in
|
|
1677
2109
|
* the embedded view.
|
|
1678
2110
|
*
|
|
1679
2111
|
* @example
|
|
@@ -1691,7 +2123,7 @@
|
|
|
1691
2123
|
*/
|
|
1692
2124
|
HostEvent["DownloadAsCsv"] = "downloadAsCSV";
|
|
1693
2125
|
/**
|
|
1694
|
-
*
|
|
2126
|
+
* Trigger the **Download** > **XLSX** action on tables
|
|
1695
2127
|
* in the embedded view.
|
|
1696
2128
|
*
|
|
1697
2129
|
* @example
|
|
@@ -1709,7 +2141,7 @@
|
|
|
1709
2141
|
*/
|
|
1710
2142
|
HostEvent["DownloadAsXlsx"] = "downloadAsXLSX";
|
|
1711
2143
|
/**
|
|
1712
|
-
*
|
|
2144
|
+
* Trigger the **Share** action on an embedded
|
|
1713
2145
|
* Liveboard or Answer.
|
|
1714
2146
|
*
|
|
1715
2147
|
* @example
|
|
@@ -1723,7 +2155,7 @@
|
|
|
1723
2155
|
*/
|
|
1724
2156
|
HostEvent["Share"] = "share";
|
|
1725
2157
|
/**
|
|
1726
|
-
*
|
|
2158
|
+
* Trigger the **Save** action on a Liveboard or Answer.
|
|
1727
2159
|
* Saves the changes.
|
|
1728
2160
|
*
|
|
1729
2161
|
* @example
|
|
@@ -1737,7 +2169,7 @@
|
|
|
1737
2169
|
*/
|
|
1738
2170
|
HostEvent["Save"] = "save";
|
|
1739
2171
|
/**
|
|
1740
|
-
*
|
|
2172
|
+
* Trigger the **Sync to Sheets** action on an embedded visualization or Answer
|
|
1741
2173
|
* Sends data from an Answer or Liveboard visualization to a Google sheet.
|
|
1742
2174
|
*
|
|
1743
2175
|
* @param - an object with `vizId` as a key
|
|
@@ -1753,7 +2185,7 @@
|
|
|
1753
2185
|
*/
|
|
1754
2186
|
HostEvent["SyncToSheets"] = "sync-to-sheets";
|
|
1755
2187
|
/**
|
|
1756
|
-
*
|
|
2188
|
+
* Trigger the **Sync to Other Apps** action on an embedded visualization or Answer
|
|
1757
2189
|
* Sends data from an Answer or Liveboard visualization to third-party apps such
|
|
1758
2190
|
* as Slack, Salesforce, Microsoft Teams, ServiceNow and so on.
|
|
1759
2191
|
*
|
|
@@ -1770,7 +2202,7 @@
|
|
|
1770
2202
|
*/
|
|
1771
2203
|
HostEvent["SyncToOtherApps"] = "sync-to-other-apps";
|
|
1772
2204
|
/**
|
|
1773
|
-
*
|
|
2205
|
+
* Trigger the **Manage pipelines** action on an embedded
|
|
1774
2206
|
* visualization or Answer.
|
|
1775
2207
|
* Allows users to manage ThoughtSpot Sync pipelines.
|
|
1776
2208
|
*
|
|
@@ -1787,18 +2219,21 @@
|
|
|
1787
2219
|
*/
|
|
1788
2220
|
HostEvent["ManagePipelines"] = "manage-pipeline";
|
|
1789
2221
|
/**
|
|
1790
|
-
*
|
|
2222
|
+
* Reset search operation on the Search or Answer page.
|
|
1791
2223
|
*
|
|
1792
2224
|
* @example
|
|
1793
2225
|
* ```js
|
|
1794
2226
|
* searchEmbed.trigger(HostEvent.ResetSearch)
|
|
1795
2227
|
* ```
|
|
2228
|
+
* ```js
|
|
2229
|
+
* appEmbed.trigger(HostEvent.ResetSearch)
|
|
2230
|
+
* ```
|
|
1796
2231
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.0.1.sw
|
|
1797
2232
|
*/
|
|
1798
2233
|
HostEvent["ResetSearch"] = "resetSearch";
|
|
1799
2234
|
/**
|
|
1800
2235
|
* @hidden
|
|
1801
|
-
*
|
|
2236
|
+
* Get the currents visible and runtime filters applied on a Liveboard
|
|
1802
2237
|
* @example
|
|
1803
2238
|
* liveboardEmbed.trigger(HostEvent.GetFilters)
|
|
1804
2239
|
* @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
|
|
@@ -1806,7 +2241,7 @@
|
|
|
1806
2241
|
HostEvent["GetFilters"] = "getFilters";
|
|
1807
2242
|
/**
|
|
1808
2243
|
* @hidden
|
|
1809
|
-
*
|
|
2244
|
+
* Update the visible filters on the Liveboard.
|
|
1810
2245
|
* @param - filter: filter object containing column name and filter operation and values
|
|
1811
2246
|
* @example
|
|
1812
2247
|
*
|
|
@@ -1819,7 +2254,7 @@
|
|
|
1819
2254
|
*/
|
|
1820
2255
|
HostEvent["UpdateFilters"] = "updateFilters";
|
|
1821
2256
|
/**
|
|
1822
|
-
* Get
|
|
2257
|
+
* Get tab details for the current Liveboard.
|
|
1823
2258
|
*
|
|
1824
2259
|
* @example
|
|
1825
2260
|
* ```js
|
|
@@ -1833,9 +2268,9 @@
|
|
|
1833
2268
|
*/
|
|
1834
2269
|
HostEvent["GetTabs"] = "getTabs";
|
|
1835
2270
|
/**
|
|
1836
|
-
* Set the visible
|
|
2271
|
+
* Set the visible tabs on a Liveboard.
|
|
1837
2272
|
*
|
|
1838
|
-
* @param - an array of ids of
|
|
2273
|
+
* @param - an array of ids of tabs to show, the IDs not passed
|
|
1839
2274
|
* will be hidden.
|
|
1840
2275
|
* @example
|
|
1841
2276
|
* ```js
|
|
@@ -1849,8 +2284,8 @@
|
|
|
1849
2284
|
/**
|
|
1850
2285
|
* Set the hidden tabs on a Liveboard.
|
|
1851
2286
|
*
|
|
1852
|
-
* @param - an array of
|
|
1853
|
-
*
|
|
2287
|
+
* @param - an array of the IDs of the tabs to hide.
|
|
2288
|
+
* The IDs not passed will be shown.
|
|
1854
2289
|
* @example
|
|
1855
2290
|
* ```js
|
|
1856
2291
|
* liveboardEmbed.trigger(HostEvent.SetHiddenTabs, [
|
|
@@ -1861,9 +2296,10 @@
|
|
|
1861
2296
|
*/
|
|
1862
2297
|
HostEvent["SetHiddenTabs"] = "SetPinboardHiddenTabs";
|
|
1863
2298
|
/**
|
|
1864
|
-
* Updates the search query for
|
|
2299
|
+
* Updates the search query string for Natural Language Search operations.
|
|
1865
2300
|
*
|
|
1866
|
-
* @param -
|
|
2301
|
+
* @param - `queryString`: Text string in Natural Language format
|
|
2302
|
+
* @param - `executeSearch`: Boolean to execute search and update search query
|
|
1867
2303
|
* @example
|
|
1868
2304
|
* ```js
|
|
1869
2305
|
* sageEmbed.trigger(HostEvent.UpdateSageQuery, {
|
|
@@ -1871,7 +2307,7 @@
|
|
|
1871
2307
|
* executeSearch: true,
|
|
1872
2308
|
* })
|
|
1873
2309
|
* ```
|
|
1874
|
-
* @version SDK: 1.26.0 | Thoughtspot: 9.
|
|
2310
|
+
* @version SDK: 1.26.0 | Thoughtspot: 9.8.0.cl, 9.8.0.sw
|
|
1875
2311
|
*/
|
|
1876
2312
|
HostEvent["UpdateSageQuery"] = "updateSageQuery";
|
|
1877
2313
|
/**
|
|
@@ -1884,26 +2320,27 @@
|
|
|
1884
2320
|
* vizId: '123', // For Liveboard Visualization.
|
|
1885
2321
|
* })
|
|
1886
2322
|
* ```
|
|
2323
|
+
* @version SDK: 1.26.0 | Thoughtspot: 9.10.0.cl
|
|
1887
2324
|
*/
|
|
1888
2325
|
HostEvent["GetAnswerSession"] = "getAnswerSession";
|
|
1889
2326
|
})(exports.HostEvent || (exports.HostEvent = {}));
|
|
1890
2327
|
/**
|
|
1891
2328
|
* The different visual modes that the data sources panel within
|
|
1892
|
-
* search could appear in,
|
|
2329
|
+
* search could appear in, such as hidden, collapsed, or expanded.
|
|
1893
2330
|
*/
|
|
1894
2331
|
// eslint-disable-next-line no-shadow
|
|
1895
2332
|
var DataSourceVisualMode;
|
|
1896
2333
|
(function (DataSourceVisualMode) {
|
|
1897
2334
|
/**
|
|
1898
|
-
*
|
|
2335
|
+
* The data source panel is hidden.
|
|
1899
2336
|
*/
|
|
1900
2337
|
DataSourceVisualMode["Hidden"] = "hide";
|
|
1901
2338
|
/**
|
|
1902
|
-
*
|
|
2339
|
+
* The data source panel is collapsed, but the user can manually expand it.
|
|
1903
2340
|
*/
|
|
1904
2341
|
DataSourceVisualMode["Collapsed"] = "collapse";
|
|
1905
2342
|
/**
|
|
1906
|
-
*
|
|
2343
|
+
* The data source panel is expanded, but the user can manually collapse it.
|
|
1907
2344
|
*/
|
|
1908
2345
|
DataSourceVisualMode["Expanded"] = "expand";
|
|
1909
2346
|
})(DataSourceVisualMode || (DataSourceVisualMode = {}));
|
|
@@ -1983,6 +2420,7 @@
|
|
|
1983
2420
|
Param["IsProductTour"] = "isProductTour";
|
|
1984
2421
|
Param["HideSearchBarTitle"] = "hideSearchBarTitle";
|
|
1985
2422
|
Param["HideSageAnswerHeader"] = "hideSageAnswerHeader";
|
|
2423
|
+
Param["HideSearchBar"] = "hideSearchBar";
|
|
1986
2424
|
})(Param || (Param = {}));
|
|
1987
2425
|
(function (Action) {
|
|
1988
2426
|
/**
|
|
@@ -2015,9 +2453,11 @@
|
|
|
2015
2453
|
Action["SaveAsView"] = "saveAsView";
|
|
2016
2454
|
/**
|
|
2017
2455
|
* The **Make a copy** action on a Liveboard or Answer
|
|
2018
|
-
* page.
|
|
2019
|
-
*
|
|
2020
|
-
*
|
|
2456
|
+
* page. Creates a copy of the Liveboard.
|
|
2457
|
+
* In LiveboardEmbed, the **Make a copy** action is not available for
|
|
2458
|
+
* visualizations in the embedded Liveboard view.
|
|
2459
|
+
* In AppEmbed, the **Make a copy** action is available on both
|
|
2460
|
+
* Liveboards and visualizations.
|
|
2021
2461
|
*
|
|
2022
2462
|
* @example
|
|
2023
2463
|
* ```js
|
|
@@ -2201,7 +2641,7 @@
|
|
|
2201
2641
|
*/
|
|
2202
2642
|
Action["DownloadAsPdf"] = "downloadAsPdf";
|
|
2203
2643
|
/**
|
|
2204
|
-
* The **Download**
|
|
2644
|
+
* The **Download** > **CSV** menu action for tables on a Liveboard
|
|
2205
2645
|
* or Answer page.
|
|
2206
2646
|
* Downloads a visualization or Answer in the XLSX format.
|
|
2207
2647
|
*
|
|
@@ -2732,6 +3172,7 @@
|
|
|
2732
3172
|
*/
|
|
2733
3173
|
Action["RenameModalTitleDescription"] = "renameModalTitleDescription";
|
|
2734
3174
|
/**
|
|
3175
|
+
*
|
|
2735
3176
|
* @version SDK: 1.25.0 | Thoughtspot: 9.6.0.cl
|
|
2736
3177
|
*/
|
|
2737
3178
|
Action["RequestVerification"] = "requestVerification";
|
|
@@ -5191,6 +5632,9 @@
|
|
|
5191
5632
|
else {
|
|
5192
5633
|
throw new Error(INVALID_TOKEN_ERR);
|
|
5193
5634
|
}
|
|
5635
|
+
};
|
|
5636
|
+
const resetCachedAuthToken = () => {
|
|
5637
|
+
cachedAuthToken = null;
|
|
5194
5638
|
};
|
|
5195
5639
|
|
|
5196
5640
|
let config = {};
|
|
@@ -5415,8 +5859,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
|
|
|
5415
5859
|
* const data = await underlying.fetchData(0, 100);
|
|
5416
5860
|
* })
|
|
5417
5861
|
* ```
|
|
5418
|
-
* @version
|
|
5419
|
-
* ThoughtSpot: 9.9.0.cl / SDK: 1.25.0
|
|
5862
|
+
* @version SDK: 1.25.0| ThoughtSpot: 9.10.0.cl
|
|
5420
5863
|
* @group Events
|
|
5421
5864
|
*/
|
|
5422
5865
|
class AnswerService {
|
|
@@ -5485,8 +5928,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
|
|
|
5485
5928
|
* const data = await underlying.fetchData(0, 100);
|
|
5486
5929
|
* })
|
|
5487
5930
|
* ```
|
|
5488
|
-
* @version
|
|
5489
|
-
* ThoughtSpot: 9.9.0.cl / SDK: 1.25.0
|
|
5931
|
+
* @version SDK: 1.25.0| ThoughtSpot: 9.10.0.cl
|
|
5490
5932
|
*/
|
|
5491
5933
|
async getUnderlyingDataForPoint(outputColumnNames, selectedPoints) {
|
|
5492
5934
|
if (!selectedPoints && !this.selectedPoints) {
|
|
@@ -12172,8 +12614,8 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
|
|
|
12172
12614
|
*/
|
|
12173
12615
|
AuthStatus["LOGOUT"] = "LOGOUT";
|
|
12174
12616
|
/**
|
|
12175
|
-
* Emitted when inPopup
|
|
12176
|
-
*
|
|
12617
|
+
* Emitted when inPopup is true in the SAMLRedirect flow and the
|
|
12618
|
+
* popup is waiting to be triggered either programmatically
|
|
12177
12619
|
* or by the trigger button.
|
|
12178
12620
|
*
|
|
12179
12621
|
* @version SDK: 1.19.0
|
|
@@ -12188,8 +12630,8 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
|
|
|
12188
12630
|
var AuthEvent;
|
|
12189
12631
|
(function (AuthEvent) {
|
|
12190
12632
|
/**
|
|
12191
|
-
* Manually trigger the SSO popup. This is useful
|
|
12192
|
-
* authStatus
|
|
12633
|
+
* Manually trigger the SSO popup. This is useful when
|
|
12634
|
+
* authStatus is SAMLRedirect/OIDCRedirect and inPopup is set to true
|
|
12193
12635
|
*/
|
|
12194
12636
|
AuthEvent["TRIGGER_SSO_POPUP"] = "TRIGGER_SSO_POPUP";
|
|
12195
12637
|
})(AuthEvent || (AuthEvent = {}));
|
|
@@ -12602,6 +13044,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
|
|
|
12602
13044
|
containerEl.innerHTML = loginFailedMessage;
|
|
12603
13045
|
notifyAuthFailure(AuthFailureType.OTHER);
|
|
12604
13046
|
}
|
|
13047
|
+
resetCachedAuthToken();
|
|
12605
13048
|
return e;
|
|
12606
13049
|
}
|
|
12607
13050
|
/**
|
|
@@ -12613,6 +13056,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
|
|
|
12613
13056
|
const { loginFailedMessage } = getEmbedConfig();
|
|
12614
13057
|
// eslint-disable-next-line no-param-reassign
|
|
12615
13058
|
containerEl.innerHTML = loginFailedMessage;
|
|
13059
|
+
resetCachedAuthToken();
|
|
12616
13060
|
disableAutoLogin();
|
|
12617
13061
|
notifyLogout();
|
|
12618
13062
|
return e;
|
|
@@ -12653,7 +13097,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
|
|
|
12653
13097
|
}, 100);
|
|
12654
13098
|
};
|
|
12655
13099
|
/**
|
|
12656
|
-
* Post
|
|
13100
|
+
* Post iframe message.
|
|
12657
13101
|
*
|
|
12658
13102
|
* @param iFrame
|
|
12659
13103
|
* @param message
|
|
@@ -12698,7 +13142,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
|
|
|
12698
13142
|
});
|
|
12699
13143
|
}
|
|
12700
13144
|
|
|
12701
|
-
var name="@thoughtspot/visual-embed-sdk";var version="1.
|
|
13145
|
+
var name="@thoughtspot/visual-embed-sdk";var version="1.27.0-alpha.1";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports$1={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p . --incremental false; tsc -p . --incremental false --module commonjs --outDir cjs",start:"gatsby develop","build:gatsby":"npm run clean:gatsby && gatsby build --prefix-paths","build:gatsby:noprefix":"npm run clean:gatsby && gatsby build","serve:gatsby":"gatsby serve","clean:gatsby":"gatsby clean","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts","bundle-dts":"dts-bundle --name ../../dist/visual-embed-sdk --main lib/src/index.d.ts --outputAsModuleFolder=true","bundle-dts-react":"dts-bundle --name ../../../dist/visual-embed-sdk-react --main lib/src/react/index.d.ts --outputAsModuleFolder=true","bundle-dts-react-full":"dts-bundle --name ../../../dist/visual-embed-sdk-react-full --main lib/src/react/all-types-export.d.ts --outputAsModuleFolder=true",build:"rollup -c",watch:"rollup -cw","docs-cmd":"node scripts/gatsby-commands.js",docgen:"typedoc --tsconfig tsconfig.json --theme typedoc-theme","test-sdk":"jest -c jest.config.sdk.js --runInBand","test-docs":"jest -c jest.config.docs.js",test:"npm run test-sdk && npm run test-docs",posttest:"cat ./coverage/sdk/lcov.info | coveralls","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={algoliasearch:"^4.10.5",classnames:"^2.3.1",dompurify:"^2.3.4","eslint-plugin-comment-length":"^0.9.2","eslint-plugin-jsdoc":"^46.9.0",eventemitter3:"^4.0.7","gatsby-plugin-vercel":"^1.0.3","html-react-parser":"^1.4.12",lodash:"^4.17.21","mixpanel-browser":"^2.45.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1"};var devDependencies={"@mdx-js/mdx":"^1.6.22","@mdx-js/react":"^1.6.22","@react-icons/all-files":"^4.1.0","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^5.0.2","@size-limit/preset-big-lib":"^8.2.6","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^22.2.3","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^4.6.0","@typescript-eslint/parser":"^4.6.0",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1",coveralls:"^3.1.0","current-git-branch":"^1.1.0","dts-bundle":"^0.7.3",eslint:"^7.12.1","eslint-config-airbnb-base":"^14.2.0","eslint-config-prettier":"^6.15.0","eslint-import-resolver-typescript":"^2.3.0","eslint-plugin-import":"^2.22.1","eslint-plugin-prettier":"^3.1.4","eslint-plugin-react-hooks":"^4.2.0","fs-extra":"^10.0.0",gatsby:"3.13.1","gatsby-plugin-algolia":"^0.22.2","gatsby-plugin-catch-links":"^3.1.0","gatsby-plugin-env-variables":"^2.1.0","gatsby-plugin-intl":"^0.3.3","gatsby-plugin-manifest":"^3.2.0","gatsby-plugin-output":"^0.1.3","gatsby-plugin-sass":"6.7.0","gatsby-plugin-sitemap":"^4.10.0","gatsby-source-filesystem":"3.1.0","gatsby-transformer-asciidoc":"2.1.0","gatsby-transformer-rehype":"2.0.0","gh-pages":"^3.1.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^1.1.1",jest:"^26.6.3","jest-fetch-mock":"^3.0.3",jsdom:"^17.0.0","node-sass":"^8.0.0",prettier:"2.1.2",react:"^16.14.0","react-dom":"^16.14.0","react-resizable":"^1.11.0","react-resize-detector":"^6.6.0","react-test-renderer":"^17.0.2","react-use-flexsearch":"^0.1.1",rollup:"2.30.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^26.5.5","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","url-search-params-polyfill":"^8.1.0",util:"^0.12.4"};var author="ThoughtSpot";var email="support@thoughtspot.com";var license="ThoughtSpot Development Tools End User License Agreement";var directories={lib:"lib"};var repository={type:"git",url:"git+https://github.com/thoughtspot/visual-embed-sdk.git"};var publishConfig={registry:"https://registry.npmjs.org"};var keywords=["thoughtspot","everywhere","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version,description:description,module:module,main:main,types:types,files:files,exports:exports$1,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.js",limit:"44 kB"}],scripts:scripts,peerDependencies:peerDependencies,dependencies:dependencies,devDependencies:devDependencies,author:author,email:email,license:license,directories:directories,repository:repository,publishConfig:publishConfig,keywords:keywords,bugs:bugs,homepage:homepage,globals:globals};
|
|
12702
13146
|
|
|
12703
13147
|
/**
|
|
12704
13148
|
* Copyright (c) 2022
|
|
@@ -12754,7 +13198,13 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
|
|
|
12754
13198
|
var _a, _b;
|
|
12755
13199
|
let authToken = '';
|
|
12756
13200
|
if (this.embedConfig.authType === AuthType.TrustedAuthTokenCookieless) {
|
|
12757
|
-
|
|
13201
|
+
try {
|
|
13202
|
+
authToken = await getAuthenticationToken(this.embedConfig);
|
|
13203
|
+
}
|
|
13204
|
+
catch (e) {
|
|
13205
|
+
processAuthFailure(e, this.isPreRendered ? this.preRenderWrapper : this.el);
|
|
13206
|
+
return;
|
|
13207
|
+
}
|
|
12758
13208
|
}
|
|
12759
13209
|
this.isAppInitialized = true;
|
|
12760
13210
|
responder({
|
|
@@ -12783,11 +13233,17 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
|
|
|
12783
13233
|
this.updateAuthToken = async (_, responder) => {
|
|
12784
13234
|
const { autoLogin = false, authType } = this.embedConfig; // Set autoLogin default to false
|
|
12785
13235
|
if (authType === AuthType.TrustedAuthTokenCookieless) {
|
|
12786
|
-
|
|
12787
|
-
|
|
12788
|
-
|
|
12789
|
-
|
|
12790
|
-
|
|
13236
|
+
let authToken = '';
|
|
13237
|
+
try {
|
|
13238
|
+
authToken = await getAuthenticationToken(this.embedConfig);
|
|
13239
|
+
responder({
|
|
13240
|
+
type: exports.EmbedEvent.AuthExpire,
|
|
13241
|
+
data: { authToken },
|
|
13242
|
+
});
|
|
13243
|
+
}
|
|
13244
|
+
catch (e) {
|
|
13245
|
+
processAuthFailure(e, this.isPreRendered ? this.preRenderWrapper : this.el);
|
|
13246
|
+
}
|
|
12791
13247
|
}
|
|
12792
13248
|
else if (autoLogin) {
|
|
12793
13249
|
handleAuth();
|
|
@@ -13061,7 +13517,11 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
|
|
|
13061
13517
|
const queryParams = this.shouldEncodeUrlQueryParams
|
|
13062
13518
|
? `?base64UrlEncodedFlags=${getEncodedQueryParamsString(queryString)}`
|
|
13063
13519
|
: `?${queryString}`;
|
|
13064
|
-
|
|
13520
|
+
let host = this.thoughtSpotHost;
|
|
13521
|
+
if (!isUndefined(this.embedConfig.enableReactShell)) {
|
|
13522
|
+
host = this.embedConfig.enableReactShell ? '/v2' : '/v1';
|
|
13523
|
+
}
|
|
13524
|
+
const path = `${host}/${queryParams}#`;
|
|
13065
13525
|
return path;
|
|
13066
13526
|
}
|
|
13067
13527
|
getEmbedParams() {
|
|
@@ -13076,6 +13536,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
|
|
|
13076
13536
|
const iFrame = document.createElement('iframe');
|
|
13077
13537
|
iFrame.src = frameSrc;
|
|
13078
13538
|
iFrame.id = TS_EMBED_ID;
|
|
13539
|
+
iFrame.setAttribute('data-ts-iframe', 'true');
|
|
13079
13540
|
// according to screenfull.js documentation
|
|
13080
13541
|
// allowFullscreen, webkitallowfullscreen and mozallowfullscreen must be
|
|
13081
13542
|
// true
|
|
@@ -13461,6 +13922,9 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
|
|
|
13461
13922
|
this.isRendered = true;
|
|
13462
13923
|
return this;
|
|
13463
13924
|
}
|
|
13925
|
+
getIframeSrc() {
|
|
13926
|
+
return '';
|
|
13927
|
+
}
|
|
13464
13928
|
handleRenderForPrerender() {
|
|
13465
13929
|
this.render();
|
|
13466
13930
|
}
|
|
@@ -13788,7 +14252,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
|
|
|
13788
14252
|
exports.Action.Share,
|
|
13789
14253
|
];
|
|
13790
14254
|
/**
|
|
13791
|
-
* Embed ThoughtSpot LLM and GPT
|
|
14255
|
+
* Embed ThoughtSpot LLM and GPT-based Natural Language Search component.
|
|
13792
14256
|
*
|
|
13793
14257
|
* @version: SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl, 9.5.1-sw
|
|
13794
14258
|
* @group Embed components
|
|
@@ -13841,15 +14305,16 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
|
|
|
13841
14305
|
const { dataSource, searchOptions, } = this.viewConfig;
|
|
13842
14306
|
if (dataSource)
|
|
13843
14307
|
postHashObj[Param.WorksheetId] = dataSource;
|
|
13844
|
-
if (searchOptions === null || searchOptions === void 0 ? void 0 : searchOptions.searchQuery) {
|
|
13845
|
-
postHashObj[Param.
|
|
13846
|
-
if (searchOptions.executeSearch) {
|
|
13847
|
-
postHashObj[Param.executeSearch] = true;
|
|
13848
|
-
}
|
|
14308
|
+
if ((searchOptions === null || searchOptions === void 0 ? void 0 : searchOptions.searchQuery) && searchOptions.executeSearch) {
|
|
14309
|
+
postHashObj[Param.executeSearch] = true;
|
|
13849
14310
|
}
|
|
13850
14311
|
let sagePostHashParams = new URLSearchParams(postHashObj).toString();
|
|
13851
14312
|
if (sagePostHashParams)
|
|
13852
14313
|
sagePostHashParams = `${tsPostHashParams ? '&' : '?'}${sagePostHashParams}`;
|
|
14314
|
+
if (searchOptions === null || searchOptions === void 0 ? void 0 : searchOptions.searchQuery)
|
|
14315
|
+
sagePostHashParams += `${sagePostHashParams ? '&' : '?'}${[Param.Query]}=${encodeURIComponent(searchOptions.searchQuery)}`;
|
|
14316
|
+
// use encodeURIComponent for query instead of URLSearchParams
|
|
14317
|
+
// as it adds + instead of %20 for spaces
|
|
13853
14318
|
return `${this.getRootIframeSrc()}/embed/${path}${tsPostHashParams}${sagePostHashParams}`;
|
|
13854
14319
|
}
|
|
13855
14320
|
/**
|
|
@@ -13906,7 +14371,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
|
|
|
13906
14371
|
}
|
|
13907
14372
|
getEmbedParams() {
|
|
13908
14373
|
var _a;
|
|
13909
|
-
const { hideResults,
|
|
14374
|
+
const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, hideSearchBar, dataPanelV2 = false, useLastSelectedSources = false, runtimeParameters, } = this.viewConfig;
|
|
13910
14375
|
const queryParams = this.getBaseQueryParams();
|
|
13911
14376
|
queryParams[Param.HideActions] = [
|
|
13912
14377
|
...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : []),
|
|
@@ -13933,6 +14398,9 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
|
|
|
13933
14398
|
if (forceTable) {
|
|
13934
14399
|
queryParams[Param.ForceTable] = true;
|
|
13935
14400
|
}
|
|
14401
|
+
if (hideSearchBar) {
|
|
14402
|
+
queryParams[Param.HideSearchBar] = true;
|
|
14403
|
+
}
|
|
13936
14404
|
queryParams[Param.DataPanelV2Enabled] = dataPanelV2;
|
|
13937
14405
|
queryParams[Param.DataSourceMode] = this.getDataSourceMode();
|
|
13938
14406
|
queryParams[Param.UseLastSelectedDataSource] = useLastSelectedSources;
|
|
@@ -13961,7 +14429,8 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
|
|
|
13961
14429
|
* @param answerId The GUID of a saved answer
|
|
13962
14430
|
* @param dataSources A list of data source GUIDs
|
|
13963
14431
|
*/
|
|
13964
|
-
getIFrameSrc(
|
|
14432
|
+
getIFrameSrc() {
|
|
14433
|
+
const { answerId } = this.viewConfig;
|
|
13965
14434
|
const answerPath = answerId ? `saved-answer/${answerId}` : 'answer';
|
|
13966
14435
|
const tsPostHashParams = this.getThoughtSpotPostUrlParams();
|
|
13967
14436
|
return `${this.getRootIframeSrc()}/embed/${answerPath}${tsPostHashParams}`;
|
|
@@ -13972,7 +14441,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
|
|
|
13972
14441
|
render() {
|
|
13973
14442
|
super.render();
|
|
13974
14443
|
const { answerId } = this.viewConfig;
|
|
13975
|
-
const src = this.getIFrameSrc(
|
|
14444
|
+
const src = this.getIFrameSrc();
|
|
13976
14445
|
this.renderIFrame(src);
|
|
13977
14446
|
getAuthPromise().then(() => {
|
|
13978
14447
|
if (checkReleaseVersionInBeta(getReleaseVersion(), getEmbedConfig().suppressSearchEmbedBetaWarning
|
|
@@ -14105,7 +14574,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
|
|
|
14105
14574
|
* @param pageId The ID of the page to be embedded.
|
|
14106
14575
|
*/
|
|
14107
14576
|
getIFrameSrc() {
|
|
14108
|
-
const { pageId, path, modularHomeExperience } = this.viewConfig;
|
|
14577
|
+
const { pageId, path, modularHomeExperience, } = this.viewConfig;
|
|
14109
14578
|
const pageRoute = this.formatPath(path) || this.getPageRoute(pageId, modularHomeExperience);
|
|
14110
14579
|
let url = `${this.getRootIframeSrc()}/${pageRoute}`;
|
|
14111
14580
|
const tsPostHashParams = this.getThoughtSpotPostUrlParams();
|
|
@@ -14209,8 +14678,9 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
|
|
|
14209
14678
|
* @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
|
|
14210
14679
|
*/
|
|
14211
14680
|
/**
|
|
14212
|
-
* Embed a ThoughtSpot Liveboard or
|
|
14213
|
-
* waits for the authentication to complete, so
|
|
14681
|
+
* Embed a ThoughtSpot Liveboard or visualization. When rendered it already
|
|
14682
|
+
* waits for the authentication to complete, so you need not wait for
|
|
14683
|
+
* `AuthStatus.SUCCESS`.
|
|
14214
14684
|
*
|
|
14215
14685
|
* @example
|
|
14216
14686
|
* ```js
|
|
@@ -14316,7 +14786,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
|
|
|
14316
14786
|
}
|
|
14317
14787
|
/**
|
|
14318
14788
|
* Construct the URL of the embedded ThoughtSpot Liveboard or visualization
|
|
14319
|
-
* to be loaded within the
|
|
14789
|
+
* to be loaded within the iFrame.
|
|
14320
14790
|
*/
|
|
14321
14791
|
getIFrameSrc() {
|
|
14322
14792
|
var _a;
|