@thoughtspot/visual-embed-sdk 1.28.4 → 1.28.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/package.json +1 -1
- package/cjs/src/authToken.d.ts.map +1 -1
- package/cjs/src/authToken.js +8 -1
- package/cjs/src/authToken.js.map +1 -1
- package/cjs/src/authToken.spec.d.ts +2 -0
- package/cjs/src/authToken.spec.d.ts.map +1 -0
- package/cjs/src/authToken.spec.js +29 -0
- package/cjs/src/authToken.spec.js.map +1 -0
- package/cjs/src/types.d.ts +93 -48
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +76 -48
- package/cjs/src/types.js.map +1 -1
- package/dist/src/authToken.d.ts.map +1 -1
- package/dist/src/authToken.spec.d.ts +2 -0
- package/dist/src/authToken.spec.d.ts.map +1 -0
- package/dist/src/types.d.ts +93 -48
- package/dist/src/types.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +84 -50
- package/dist/tsembed-react.js +84 -50
- package/dist/tsembed.es.js +84 -50
- package/dist/tsembed.js +84 -50
- package/dist/visual-embed-sdk-react-full.d.ts +93 -48
- package/dist/visual-embed-sdk-react.d.ts +93 -48
- package/dist/visual-embed-sdk.d.ts +93 -48
- package/lib/package.json +1 -1
- package/lib/src/authToken.d.ts.map +1 -1
- package/lib/src/authToken.js +8 -1
- package/lib/src/authToken.js.map +1 -1
- package/lib/src/authToken.spec.d.ts +2 -0
- package/lib/src/authToken.spec.d.ts.map +1 -0
- package/lib/src/authToken.spec.js +26 -0
- package/lib/src/authToken.spec.js.map +1 -0
- package/lib/src/types.d.ts +93 -48
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +76 -48
- package/lib/src/types.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +93 -48
- package/package.json +1 -1
- package/src/authToken.spec.ts +31 -0
- package/src/authToken.ts +8 -1
- package/src/types.ts +94 -48
- package/cjs/src/utils/authService/tokenizedAuthService.spec.d.ts +0 -2
- package/cjs/src/utils/authService/tokenizedAuthService.spec.d.ts.map +0 -1
- package/cjs/src/utils/authService/tokenizedAuthService.spec.js +0 -32
- package/cjs/src/utils/authService/tokenizedAuthService.spec.js.map +0 -1
- package/cjs/src/utils/sessionInfoService.d.ts +0 -66
- package/cjs/src/utils/sessionInfoService.d.ts.map +0 -1
- package/cjs/src/utils/sessionInfoService.js +0 -92
- package/cjs/src/utils/sessionInfoService.js.map +0 -1
- package/dist/src/utils/authService/tokenizedAuthService.spec.d.ts +0 -2
- package/dist/src/utils/authService/tokenizedAuthService.spec.d.ts.map +0 -1
- package/dist/src/utils/sessionInfoService.d.ts +0 -66
- package/dist/src/utils/sessionInfoService.d.ts.map +0 -1
- package/lib/src/utils/authService/tokenizedAuthService.spec.d.ts +0 -2
- package/lib/src/utils/authService/tokenizedAuthService.spec.d.ts.map +0 -1
- package/lib/src/utils/authService/tokenizedAuthService.spec.js +0 -29
- package/lib/src/utils/authService/tokenizedAuthService.spec.js.map +0 -1
- package/lib/src/utils/sessionInfoService.d.ts +0 -66
- package/lib/src/utils/sessionInfoService.d.ts.map +0 -1
- package/lib/src/utils/sessionInfoService.js +0 -85
- package/lib/src/utils/sessionInfoService.js.map +0 -1
package/dist/tsembed.es.js
CHANGED
|
@@ -350,6 +350,8 @@ var EmbedEvent;
|
|
|
350
350
|
/**
|
|
351
351
|
* Authentication has either succeeded or failed.
|
|
352
352
|
*
|
|
353
|
+
* @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
|
|
354
|
+
*
|
|
353
355
|
* @example
|
|
354
356
|
*```js
|
|
355
357
|
* appEmbed.on(EmbedEvent.AuthInit, payload => {
|
|
@@ -363,6 +365,8 @@ var EmbedEvent;
|
|
|
363
365
|
* The embed object container has loaded.
|
|
364
366
|
*
|
|
365
367
|
* @returns timestamp - The timestamp when the event was generated.
|
|
368
|
+
*
|
|
369
|
+
* @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
|
|
366
370
|
* @example
|
|
367
371
|
*```js
|
|
368
372
|
* liveboardEmbed.on(EmbedEvent.Load, hideLoader)
|
|
@@ -377,6 +381,8 @@ var EmbedEvent;
|
|
|
377
381
|
* Data pertaining to answer or Liveboard is received
|
|
378
382
|
*
|
|
379
383
|
* @return data - The answer or Liveboard data
|
|
384
|
+
*
|
|
385
|
+
* @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
|
|
380
386
|
* @example
|
|
381
387
|
*```js
|
|
382
388
|
* liveboardEmbed.on(EmbedEvent.Data, payload => {
|
|
@@ -395,6 +401,7 @@ var EmbedEvent;
|
|
|
395
401
|
/**
|
|
396
402
|
* Search query has been updated by the user.
|
|
397
403
|
*
|
|
404
|
+
* @version SDK: 1.4.0 | ThoughtSpot: ts7.sep.cl, 8.4.1.sw
|
|
398
405
|
* @example
|
|
399
406
|
*```js
|
|
400
407
|
* searchEmbed.on(EmbedEvent.QueryChanged, payload => console.log('data', payload))
|
|
@@ -404,12 +411,14 @@ var EmbedEvent;
|
|
|
404
411
|
/**
|
|
405
412
|
* A drill-down operation has been performed.
|
|
406
413
|
*
|
|
414
|
+
* @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
|
|
415
|
+
*
|
|
407
416
|
* @returns additionalFilters - Any additional filters applied
|
|
408
417
|
* @returns drillDownColumns - The columns on which drill down was performed
|
|
409
418
|
* @returns nonFilteredColumns - The columns that were not filtered
|
|
410
419
|
* @example
|
|
411
420
|
*```js
|
|
412
|
-
* searchEmbed.
|
|
421
|
+
* searchEmbed.on(EmbedEvent.DrillDown, {
|
|
413
422
|
* points: {
|
|
414
423
|
* clickedPoint,
|
|
415
424
|
* selectedPoints: selectedPoint
|
|
@@ -442,6 +451,8 @@ var EmbedEvent;
|
|
|
442
451
|
* One or more data sources have been selected.
|
|
443
452
|
*
|
|
444
453
|
* @returns dataSourceIds - the list of data sources
|
|
454
|
+
*
|
|
455
|
+
* @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
|
|
445
456
|
* @example
|
|
446
457
|
* ```js
|
|
447
458
|
* searchEmbed.on(EmbedEvent.DataSourceSelected, payload => {
|
|
@@ -469,6 +480,8 @@ var EmbedEvent;
|
|
|
469
480
|
* @returns actionId - ID of the custom action
|
|
470
481
|
* @returns payload {@link CustomActionPayload} - Response payload with the
|
|
471
482
|
* Answer or Liveboard data
|
|
483
|
+
*
|
|
484
|
+
* @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
|
|
472
485
|
* @example
|
|
473
486
|
* ```js
|
|
474
487
|
* appEmbed.on(EmbedEvent.customAction, payload => {
|
|
@@ -516,22 +529,23 @@ var EmbedEvent;
|
|
|
516
529
|
/**
|
|
517
530
|
* An error has occurred. This event is fired for the following error types:
|
|
518
531
|
*
|
|
519
|
-
*
|
|
532
|
+
* `API`: API call failure error.
|
|
520
533
|
*
|
|
521
|
-
*
|
|
522
|
-
* mode.
|
|
534
|
+
* `FULLSCREEN`: Error when presenting a Liveboard or visualization in full screen mode.
|
|
523
535
|
*
|
|
524
|
-
*
|
|
536
|
+
* `SINGLE_VALUE_FILTER`: Error due to multiple values in the single value filter.
|
|
525
537
|
*
|
|
526
|
-
*
|
|
538
|
+
* `NON_EXIST_FILTER`: Error due to a non-existent filter.
|
|
527
539
|
*
|
|
528
|
-
*
|
|
540
|
+
* `INVALID_DATE_VALUE`: Invalid date value error.
|
|
529
541
|
*
|
|
530
|
-
*
|
|
542
|
+
* `INVALID_OPERATOR`: Use of invalid operator during filter application.
|
|
531
543
|
*
|
|
532
|
-
* For more information, see
|
|
544
|
+
* For more information, see https://developers.thoughtspot.com/docs/events-app-integration#errorType.
|
|
533
545
|
*
|
|
534
546
|
* @returns error - An error object or message
|
|
547
|
+
*
|
|
548
|
+
* @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
|
|
535
549
|
* @example
|
|
536
550
|
* ```js
|
|
537
551
|
* // API error
|
|
@@ -557,6 +571,9 @@ var EmbedEvent;
|
|
|
557
571
|
* The embedded object has sent an alert.
|
|
558
572
|
*
|
|
559
573
|
* @returns alert - An alert object
|
|
574
|
+
*
|
|
575
|
+
* @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
|
|
576
|
+
*
|
|
560
577
|
* @example
|
|
561
578
|
* ```js
|
|
562
579
|
* searchEmbed.on(EmbedEvent.Alert)
|
|
@@ -566,6 +583,8 @@ var EmbedEvent;
|
|
|
566
583
|
/**
|
|
567
584
|
* The ThoughtSpot auth session has expired.
|
|
568
585
|
*
|
|
586
|
+
* @version SDK: 1.4.0 | ThoughtSpot: ts7.sep.cl, 8.4.1.sw
|
|
587
|
+
*
|
|
569
588
|
* @example
|
|
570
589
|
*```js
|
|
571
590
|
* appEmbed.on(EmbedEvent.AuthExpire, showAuthExpired)
|
|
@@ -619,6 +638,7 @@ var EmbedEvent;
|
|
|
619
638
|
/**
|
|
620
639
|
* Detects the route change.
|
|
621
640
|
*
|
|
641
|
+
* @version SDK: 1.7.0 | ThoughtSpot: 8.0.0.cl, 8.4.1.sw
|
|
622
642
|
* @example
|
|
623
643
|
*```js
|
|
624
644
|
* searchEmbed.on(EmbedEvent.RouteChange, payload =>
|
|
@@ -635,7 +655,7 @@ var EmbedEvent;
|
|
|
635
655
|
/**
|
|
636
656
|
* Emitted when the embed does not have cookie access. This happens
|
|
637
657
|
* when Safari and other Web browsers block third-party cookies
|
|
638
|
-
* are blocked by default.
|
|
658
|
+
* are blocked by default.
|
|
639
659
|
*
|
|
640
660
|
* @example
|
|
641
661
|
*```js
|
|
@@ -678,7 +698,7 @@ var EmbedEvent;
|
|
|
678
698
|
/**
|
|
679
699
|
* Emitted when the Liveboard shell loads.
|
|
680
700
|
* You can use this event as a hook to trigger
|
|
681
|
-
*
|
|
701
|
+
* actions on the rendered Liveboard.
|
|
682
702
|
*
|
|
683
703
|
* @version SDK: 1.9.1 | ThoughtSpot: 8.1.0.cl, 8.4.1.sw
|
|
684
704
|
* @example
|
|
@@ -699,8 +719,7 @@ var EmbedEvent;
|
|
|
699
719
|
*/
|
|
700
720
|
EmbedEvent["LiveboardRendered"] = "PinboardRendered";
|
|
701
721
|
/**
|
|
702
|
-
*
|
|
703
|
-
* is triggered on all events.
|
|
722
|
+
* Emits all events.
|
|
704
723
|
*
|
|
705
724
|
* @Version SDK: 1.10.0 | ThoughtSpot: 8.2.0.cl, 8.4.1.sw
|
|
706
725
|
* @example
|
|
@@ -717,13 +736,13 @@ var EmbedEvent;
|
|
|
717
736
|
* @Version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
718
737
|
* @example
|
|
719
738
|
*```js
|
|
720
|
-
* //
|
|
739
|
+
* //Emit when action starts
|
|
721
740
|
* searchEmbed.on(EmbedEvent.Save, payload => {
|
|
722
741
|
* console.log('Save', payload)
|
|
723
742
|
* }, {
|
|
724
743
|
* start: true
|
|
725
744
|
* })
|
|
726
|
-
* //
|
|
745
|
+
* //emit when action ends
|
|
727
746
|
* searchEmbed.on(EmbedEvent.Save, payload => {
|
|
728
747
|
* console.log('Save', payload)
|
|
729
748
|
* })
|
|
@@ -733,7 +752,7 @@ var EmbedEvent;
|
|
|
733
752
|
/**
|
|
734
753
|
* Emitted when the download action is triggered on an answer
|
|
735
754
|
*
|
|
736
|
-
*
|
|
755
|
+
* **Note**: This event is deprecated in v1.21.0.
|
|
737
756
|
* To fire an event when a download action is initiated on a chart or table,
|
|
738
757
|
* use `EmbedEvent.DownloadAsPng`, `EmbedEvent.DownloadAsPDF`, `EmbedEvent.DownloadAsCSV`,
|
|
739
758
|
* or `EmbedEvent.DownloadAsXLSX`
|
|
@@ -741,7 +760,7 @@ var EmbedEvent;
|
|
|
741
760
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
742
761
|
* @example
|
|
743
762
|
*```js
|
|
744
|
-
* liveboardEmbed.
|
|
763
|
+
* liveboardEmbed.on(EmbedEvent.Download, {
|
|
745
764
|
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
746
765
|
* })
|
|
747
766
|
*```
|
|
@@ -753,10 +772,10 @@ var EmbedEvent;
|
|
|
753
772
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.0.sw
|
|
754
773
|
* @example
|
|
755
774
|
*```js
|
|
756
|
-
* //
|
|
775
|
+
* //emit when action starts
|
|
757
776
|
* searchEmbed.on(EmbedEvent.DownloadAsPng, payload => {
|
|
758
777
|
* console.log('download PNG', payload)}, {start: true })
|
|
759
|
-
* //
|
|
778
|
+
* //emit when action ends
|
|
760
779
|
* searchEmbed.on(EmbedEvent.DownloadAsPng, payload => {
|
|
761
780
|
* console.log('download PNG', payload)})
|
|
762
781
|
*```
|
|
@@ -768,10 +787,10 @@ var EmbedEvent;
|
|
|
768
787
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
769
788
|
* @example
|
|
770
789
|
*```js
|
|
771
|
-
* //
|
|
790
|
+
* //emit when action starts
|
|
772
791
|
* searchEmbed.on(EmbedEvent.DownloadAsPdf, payload => {
|
|
773
792
|
* console.log('download PDF', payload)}, {start: true })
|
|
774
|
-
* //
|
|
793
|
+
* //emit when action ends
|
|
775
794
|
* searchEmbed.on(EmbedEvent.DownloadAsPdf, payload => {
|
|
776
795
|
* console.log('download PDF', payload)})
|
|
777
796
|
*```
|
|
@@ -783,10 +802,10 @@ var EmbedEvent;
|
|
|
783
802
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
784
803
|
* @example
|
|
785
804
|
*```js
|
|
786
|
-
* //
|
|
805
|
+
* //emit when action starts
|
|
787
806
|
* searchEmbed.on(EmbedEvent.DownloadAsCSV, payload => {
|
|
788
807
|
* console.log('download CSV', payload)}, {start: true })
|
|
789
|
-
* //
|
|
808
|
+
* //emit when action ends
|
|
790
809
|
* searchEmbed.on(EmbedEvent.DownloadAsCSV, payload => {
|
|
791
810
|
* console.log('download CSV', payload)})
|
|
792
811
|
*```
|
|
@@ -798,10 +817,10 @@ var EmbedEvent;
|
|
|
798
817
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
799
818
|
* @example
|
|
800
819
|
*```js
|
|
801
|
-
* //
|
|
820
|
+
* //emit when action starts
|
|
802
821
|
* searchEmbed.on(EmbedEvent.DownloadAsXlsx, payload => {
|
|
803
822
|
* console.log('download Xlsx', payload)}, { start: true })
|
|
804
|
-
* //
|
|
823
|
+
* //emit when action ends
|
|
805
824
|
* searchEmbed.on(EmbedEvent.DownloadAsXlsx, payload => {
|
|
806
825
|
* console.log('download Xlsx', payload)})
|
|
807
826
|
*```
|
|
@@ -813,10 +832,10 @@ var EmbedEvent;
|
|
|
813
832
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
814
833
|
* @example
|
|
815
834
|
*```js
|
|
816
|
-
* //
|
|
835
|
+
* //emit when action starts
|
|
817
836
|
* appEmbed.on(EmbedEvent.AnswerDelete, payload => {
|
|
818
837
|
* console.log('delete answer', payload)}, {start: true })
|
|
819
|
-
* //
|
|
838
|
+
* //emit when action is completed
|
|
820
839
|
* appEmbed.on(EmbedEvent.AnswerDelete, payload => {
|
|
821
840
|
* console.log('delete answer', payload)})
|
|
822
841
|
*```
|
|
@@ -828,13 +847,13 @@ var EmbedEvent;
|
|
|
828
847
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
829
848
|
* @example
|
|
830
849
|
*```js
|
|
831
|
-
* //
|
|
850
|
+
* //emit when action starts
|
|
832
851
|
* searchEmbed.on(EmbedEvent.Pin, payload => {
|
|
833
852
|
* console.log('pin', payload)
|
|
834
853
|
* }, {
|
|
835
854
|
* start: true
|
|
836
855
|
* })
|
|
837
|
-
* //
|
|
856
|
+
* //emit when action ends
|
|
838
857
|
* searchEmbed.on(EmbedEvent.Pin, payload => {
|
|
839
858
|
* console.log('pin', payload)
|
|
840
859
|
* })
|
|
@@ -847,13 +866,13 @@ var EmbedEvent;
|
|
|
847
866
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
848
867
|
* @example
|
|
849
868
|
*```js
|
|
850
|
-
* //
|
|
869
|
+
* //emit when action starts
|
|
851
870
|
* searchEmbed.on(EmbedEvent.SpotIQAnalyze, payload => {
|
|
852
871
|
* console.log('SpotIQAnalyze', payload)
|
|
853
872
|
* }, {
|
|
854
873
|
* start: true
|
|
855
874
|
* })
|
|
856
|
-
* //
|
|
875
|
+
* //emit when action ends
|
|
857
876
|
* searchEmbed.on(EmbedEvent.SpotIQAnalyze, payload => {
|
|
858
877
|
* console.log('SpotIQ analyze', payload)
|
|
859
878
|
* })
|
|
@@ -866,13 +885,13 @@ var EmbedEvent;
|
|
|
866
885
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
867
886
|
* @example
|
|
868
887
|
*```js
|
|
869
|
-
* //
|
|
888
|
+
* //emit when action starts
|
|
870
889
|
* searchEmbed.on(EmbedEvent.Share, payload => {
|
|
871
890
|
* console.log('Share', payload)
|
|
872
891
|
* }, {
|
|
873
892
|
* start: true
|
|
874
893
|
* })
|
|
875
|
-
* //
|
|
894
|
+
* //emit when action ends
|
|
876
895
|
* searchEmbed.on(EmbedEvent.Share, payload => {
|
|
877
896
|
* console.log('Share', payload)
|
|
878
897
|
* })
|
|
@@ -947,10 +966,10 @@ var EmbedEvent;
|
|
|
947
966
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
948
967
|
* @example
|
|
949
968
|
*```js
|
|
950
|
-
* //
|
|
969
|
+
* //emit when action starts
|
|
951
970
|
* searchEmbed.on(EmbedEvent.ExportTML, payload => {
|
|
952
971
|
* console.log('Export TML', payload)}, { start: true })
|
|
953
|
-
* //
|
|
972
|
+
* //emit when action ends
|
|
954
973
|
* searchEmbed.on(EmbedEvent.ExportTML, payload => {
|
|
955
974
|
* console.log('Export TML', payload)})
|
|
956
975
|
*```
|
|
@@ -974,10 +993,10 @@ var EmbedEvent;
|
|
|
974
993
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
975
994
|
* @example
|
|
976
995
|
*```js
|
|
977
|
-
* //
|
|
996
|
+
* //emit when action starts
|
|
978
997
|
* appEmbed.on(EmbedEvent.CopyAEdit, payload => {
|
|
979
998
|
* console.log('Copy and edit', payload)}, {start: true })
|
|
980
|
-
* //
|
|
999
|
+
* //emit when action ends
|
|
981
1000
|
* appEmbed.on(EmbedEvent.CopyAEdit, payload => {
|
|
982
1001
|
* console.log('Copy and edit', payload)})
|
|
983
1002
|
*```
|
|
@@ -1079,7 +1098,7 @@ var EmbedEvent;
|
|
|
1079
1098
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
1080
1099
|
* @example
|
|
1081
1100
|
*```js
|
|
1082
|
-
* liveboardEmbed.
|
|
1101
|
+
* liveboardEmbed.on(EmbedEvent.Present)
|
|
1083
1102
|
*```
|
|
1084
1103
|
* @example
|
|
1085
1104
|
*```js
|
|
@@ -1095,7 +1114,7 @@ var EmbedEvent;
|
|
|
1095
1114
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
1096
1115
|
* @example
|
|
1097
1116
|
*```js
|
|
1098
|
-
* liveboardEmbed.
|
|
1117
|
+
* liveboardEmbed.on(EmbedEvent.Delete,
|
|
1099
1118
|
* {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1100
1119
|
*```
|
|
1101
1120
|
*/
|
|
@@ -1106,7 +1125,7 @@ var EmbedEvent;
|
|
|
1106
1125
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
1107
1126
|
* @example
|
|
1108
1127
|
*```js
|
|
1109
|
-
* liveboardEmbed.
|
|
1128
|
+
* liveboardEmbed.on(EmbedEvent.SchedulesList)
|
|
1110
1129
|
*```
|
|
1111
1130
|
*/
|
|
1112
1131
|
EmbedEvent["SchedulesList"] = "schedule-list";
|
|
@@ -1116,7 +1135,7 @@ var EmbedEvent;
|
|
|
1116
1135
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
1117
1136
|
* @example
|
|
1118
1137
|
*```js
|
|
1119
|
-
* liveboardEmbed.
|
|
1138
|
+
* liveboardEmbed.on(EmbedEvent.Cancel)
|
|
1120
1139
|
*```
|
|
1121
1140
|
*/
|
|
1122
1141
|
EmbedEvent["Cancel"] = "cancel";
|
|
@@ -1126,7 +1145,7 @@ var EmbedEvent;
|
|
|
1126
1145
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
1127
1146
|
* @example
|
|
1128
1147
|
*```js
|
|
1129
|
-
* liveboardEmbed.
|
|
1148
|
+
* liveboardEmbed.on(EmbedEvent.Explore, {
|
|
1130
1149
|
* vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1131
1150
|
*```
|
|
1132
1151
|
*/
|
|
@@ -1137,7 +1156,7 @@ var EmbedEvent;
|
|
|
1137
1156
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
1138
1157
|
* @example
|
|
1139
1158
|
*```js
|
|
1140
|
-
* liveboardEmbed.
|
|
1159
|
+
* liveboardEmbed.on(EmbedEvent.CopyLink, {
|
|
1141
1160
|
* vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1142
1161
|
*```
|
|
1143
1162
|
*/
|
|
@@ -1148,7 +1167,7 @@ var EmbedEvent;
|
|
|
1148
1167
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.5.0.sw
|
|
1149
1168
|
* @example
|
|
1150
1169
|
*```js
|
|
1151
|
-
* liveboardEmbed.
|
|
1170
|
+
* liveboardEmbed.on(EmbedEvent.CrossFilterChanged, {
|
|
1152
1171
|
* vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1153
1172
|
*```
|
|
1154
1173
|
*/
|
|
@@ -1172,9 +1191,18 @@ var EmbedEvent;
|
|
|
1172
1191
|
*/
|
|
1173
1192
|
EmbedEvent["InsertIntoSlide"] = "insertInToSlide";
|
|
1174
1193
|
/**
|
|
1175
|
-
* @hidden
|
|
1176
1194
|
* Emitted when a user changes any filter on a Liveboard.
|
|
1195
|
+
* Returns filter type and name, column name and ID, and runtime
|
|
1196
|
+
* filter details.
|
|
1197
|
+
*
|
|
1177
1198
|
* @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl, 9.5.0.sw
|
|
1199
|
+
* @example
|
|
1200
|
+
*
|
|
1201
|
+
*```js
|
|
1202
|
+
* LiveboardEmbed.on(EmbedEvent.FilterChanged, (payload) => {
|
|
1203
|
+
* console.log('payload', payload);
|
|
1204
|
+
* })
|
|
1205
|
+
*```
|
|
1178
1206
|
*/
|
|
1179
1207
|
EmbedEvent["FilterChanged"] = "filterChanged";
|
|
1180
1208
|
/**
|
|
@@ -1711,7 +1739,7 @@ var HostEvent;
|
|
|
1711
1739
|
* ```js
|
|
1712
1740
|
* searchEmbed.trigger(HostEvent.GetTML).then((tml) => {
|
|
1713
1741
|
* console.log(
|
|
1714
|
-
* tml.search_query // TML representation of the search query
|
|
1742
|
+
* tml.answer.search_query // TML representation of the search query
|
|
1715
1743
|
* );
|
|
1716
1744
|
* })
|
|
1717
1745
|
* ```
|
|
@@ -1954,7 +1982,7 @@ var HostEvent;
|
|
|
1954
1982
|
*
|
|
1955
1983
|
* ```js
|
|
1956
1984
|
* liveboardEmbed.trigger(HostEvent.UpdateFilters, {
|
|
1957
|
-
* filter: { column: 'column name', oper: 'IN', values: [1,2,3]
|
|
1985
|
+
* filter: { column: 'column name', oper: 'IN', values: [1,2,3]}
|
|
1958
1986
|
* })
|
|
1959
1987
|
* ```
|
|
1960
1988
|
* @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
|
|
@@ -3099,7 +3127,7 @@ var Action;
|
|
|
3099
3127
|
* disabledActions: [Action.TML] // to disable all TML actions
|
|
3100
3128
|
* ```
|
|
3101
3129
|
*
|
|
3102
|
-
* @version SDK : 1.28.
|
|
3130
|
+
* @version SDK : 1.28.3 | Thoughtspot: 9.12.0.cl
|
|
3103
3131
|
*/
|
|
3104
3132
|
Action["TML"] = "tml";
|
|
3105
3133
|
/**
|
|
@@ -5883,7 +5911,7 @@ function isEqual(value, other) {
|
|
|
5883
5911
|
|
|
5884
5912
|
var isEqual_1 = isEqual;
|
|
5885
5913
|
|
|
5886
|
-
var name="@thoughtspot/visual-embed-sdk";var version="1.28.
|
|
5914
|
+
var name="@thoughtspot/visual-embed-sdk";var version="1.28.5";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={".":{"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","embedded","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,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.js",limit:"45 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};
|
|
5887
5915
|
|
|
5888
5916
|
const EndPoints = {
|
|
5889
5917
|
AUTH_VERIFICATION: '/callosum/v1/session/info',
|
|
@@ -6004,7 +6032,9 @@ const INVALID_TOKEN_ERR = 'Invalid token received form token callback or authTok
|
|
|
6004
6032
|
let cachedAuthToken = null;
|
|
6005
6033
|
// This method can be used to get the authToken using the embedConfig
|
|
6006
6034
|
const getAuthenticationToken = async (embedConfig) => {
|
|
6007
|
-
if
|
|
6035
|
+
// Since we don't have token validation enabled , we cannot tell if the
|
|
6036
|
+
// cached token is valid or not. So we will always fetch a new token.
|
|
6037
|
+
if (cachedAuthToken && !embedConfig.disableTokenVerification) {
|
|
6008
6038
|
let isCachedTokenStillValid;
|
|
6009
6039
|
try {
|
|
6010
6040
|
isCachedTokenStillValid = await validateAuthToken(embedConfig, cachedAuthToken, true);
|
|
@@ -6030,6 +6060,10 @@ const getAuthenticationToken = async (embedConfig) => {
|
|
|
6030
6060
|
return authToken;
|
|
6031
6061
|
};
|
|
6032
6062
|
const validateAuthToken = async (embedConfig, authToken, suppressAlert) => {
|
|
6063
|
+
if (embedConfig.disableTokenVerification) {
|
|
6064
|
+
logger.info('Token verification is disabled. Assuming token is valid.');
|
|
6065
|
+
return true;
|
|
6066
|
+
}
|
|
6033
6067
|
try {
|
|
6034
6068
|
const isTokenValid = await verifyTokenService(embedConfig.thoughtSpotHost, authToken);
|
|
6035
6069
|
if (isTokenValid)
|