@thoughtspot/visual-embed-sdk 1.46.4 → 1.46.5-beta.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/cjs/package.json +2 -2
- package/cjs/src/auth.d.ts +2 -1
- package/cjs/src/auth.d.ts.map +1 -1
- package/cjs/src/auth.js +2 -1
- package/cjs/src/auth.js.map +1 -1
- package/cjs/src/authToken.d.ts.map +1 -1
- package/cjs/src/authToken.js.map +1 -1
- package/cjs/src/css-variables.d.ts +51 -17
- package/cjs/src/css-variables.d.ts.map +1 -1
- package/cjs/src/embed/app.d.ts +1 -0
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +10 -1
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/app.spec.js +46 -1
- package/cjs/src/embed/app.spec.js.map +1 -1
- package/cjs/src/embed/base.d.ts.map +1 -1
- package/cjs/src/embed/base.js.map +1 -1
- package/cjs/src/embed/base.spec.js.map +1 -1
- package/cjs/src/embed/events.spec.js +72 -0
- package/cjs/src/embed/events.spec.js.map +1 -1
- package/cjs/src/embed/hostEventClient/contracts.d.ts +74 -3
- package/cjs/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/cjs/src/embed/hostEventClient/contracts.js +7 -0
- package/cjs/src/embed/hostEventClient/contracts.js.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.d.ts +10 -0
- package/cjs/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.js +46 -9
- package/cjs/src/embed/hostEventClient/host-event-client.js.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.spec.js +155 -0
- package/cjs/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts +1 -0
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +11 -2
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/liveboard.spec.js +96 -2
- package/cjs/src/embed/liveboard.spec.js.map +1 -1
- package/cjs/src/embed/sage.d.ts.map +1 -1
- package/cjs/src/embed/sage.js.map +1 -1
- package/cjs/src/embed/search.spec.js.map +1 -1
- package/cjs/src/embed/ts-embed.d.ts +41 -2
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +41 -2
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/react/index.d.ts.map +1 -1
- package/cjs/src/react/index.js +58 -53
- package/cjs/src/react/index.js.map +1 -1
- package/cjs/src/types.d.ts +730 -32
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +734 -3
- package/cjs/src/types.js.map +1 -1
- package/cjs/src/utils/graphql/answerService/answerService.d.ts +4 -2
- package/cjs/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
- package/cjs/src/utils/graphql/answerService/answerService.js +4 -2
- package/cjs/src/utils/graphql/answerService/answerService.js.map +1 -1
- package/cjs/src/utils/graphql/preview-service.d.ts.map +1 -1
- package/cjs/src/utils/graphql/preview-service.js.map +1 -1
- package/cjs/src/utils/processData.d.ts.map +1 -1
- package/cjs/src/utils/processData.js.map +1 -1
- package/dist/{index-DGV_zh53.js → index-DW2wEHqy.js} +1 -1
- package/dist/src/auth.d.ts +2 -1
- package/dist/src/auth.d.ts.map +1 -1
- package/dist/src/authToken.d.ts.map +1 -1
- package/dist/src/css-variables.d.ts +51 -17
- package/dist/src/css-variables.d.ts.map +1 -1
- package/dist/src/embed/app.d.ts +1 -0
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/base.d.ts.map +1 -1
- package/dist/src/embed/hostEventClient/contracts.d.ts +74 -3
- package/dist/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/dist/src/embed/hostEventClient/host-event-client.d.ts +10 -0
- package/dist/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts +1 -0
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/embed/sage.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.d.ts +41 -2
- package/dist/src/embed/ts-embed.d.ts.map +1 -1
- package/dist/src/react/index.d.ts.map +1 -1
- package/dist/src/types.d.ts +730 -32
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/graphql/answerService/answerService.d.ts +4 -2
- package/dist/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
- package/dist/src/utils/graphql/preview-service.d.ts.map +1 -1
- package/dist/src/utils/processData.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +917 -77
- package/dist/tsembed-react.js +915 -75
- package/dist/tsembed.es.js +859 -24
- package/dist/tsembed.js +857 -22
- package/dist/visual-embed-sdk-react-full.d.ts +892 -54
- package/dist/visual-embed-sdk-react.d.ts +892 -54
- package/dist/visual-embed-sdk.d.ts +912 -56
- package/lib/package.json +2 -2
- package/lib/src/auth.d.ts +2 -1
- package/lib/src/auth.d.ts.map +1 -1
- package/lib/src/auth.js +2 -1
- package/lib/src/auth.js.map +1 -1
- package/lib/src/authToken.d.ts.map +1 -1
- package/lib/src/authToken.js.map +1 -1
- package/lib/src/css-variables.d.ts +51 -17
- package/lib/src/css-variables.d.ts.map +1 -1
- package/lib/src/embed/app.d.ts +1 -0
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +10 -1
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/app.spec.js +46 -1
- package/lib/src/embed/app.spec.js.map +1 -1
- package/lib/src/embed/base.d.ts.map +1 -1
- package/lib/src/embed/base.js.map +1 -1
- package/lib/src/embed/base.spec.js.map +1 -1
- package/lib/src/embed/events.spec.js +73 -1
- package/lib/src/embed/events.spec.js.map +1 -1
- package/lib/src/embed/hostEventClient/contracts.d.ts +74 -3
- package/lib/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/lib/src/embed/hostEventClient/contracts.js +7 -0
- package/lib/src/embed/hostEventClient/contracts.js.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.d.ts +10 -0
- package/lib/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.js +46 -9
- package/lib/src/embed/hostEventClient/host-event-client.js.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.spec.js +155 -0
- package/lib/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts +1 -0
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +11 -2
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +96 -2
- package/lib/src/embed/liveboard.spec.js.map +1 -1
- package/lib/src/embed/sage.d.ts.map +1 -1
- package/lib/src/embed/sage.js.map +1 -1
- package/lib/src/embed/search.spec.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts +41 -2
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +42 -3
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/react/index.d.ts.map +1 -1
- package/lib/src/react/index.js +58 -53
- package/lib/src/react/index.js.map +1 -1
- package/lib/src/types.d.ts +730 -32
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +734 -3
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils/graphql/answerService/answerService.d.ts +4 -2
- package/lib/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
- package/lib/src/utils/graphql/answerService/answerService.js +4 -2
- package/lib/src/utils/graphql/answerService/answerService.js.map +1 -1
- package/lib/src/utils/graphql/preview-service.d.ts.map +1 -1
- package/lib/src/utils/graphql/preview-service.js.map +1 -1
- package/lib/src/utils/processData.d.ts.map +1 -1
- package/lib/src/utils/processData.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +912 -56
- package/package.json +2 -2
- package/src/auth.spec.ts +1 -1
- package/src/auth.ts +2 -1
- package/src/authToken.ts +0 -1
- package/src/css-variables.ts +51 -17
- package/src/embed/app.spec.ts +62 -3
- package/src/embed/app.ts +10 -1
- package/src/embed/base.spec.ts +1 -2
- package/src/embed/base.ts +1 -4
- package/src/embed/events.spec.ts +88 -0
- package/src/embed/hostEventClient/contracts.ts +74 -2
- package/src/embed/hostEventClient/host-event-client.spec.ts +257 -0
- package/src/embed/hostEventClient/host-event-client.ts +70 -15
- package/src/embed/liveboard.spec.ts +126 -2
- package/src/embed/liveboard.ts +11 -2
- package/src/embed/sage.ts +0 -1
- package/src/embed/search.spec.ts +0 -2
- package/src/embed/ts-embed.ts +43 -3
- package/src/react/index.tsx +76 -72
- package/src/types.ts +739 -31
- package/src/utils/graphql/answerService/answerService.ts +4 -5
- package/src/utils/graphql/preview-service.ts +0 -1
- package/src/utils/processData.ts +0 -5
|
@@ -427,37 +427,49 @@ export interface CustomCssVariables {
|
|
|
427
427
|
/**
|
|
428
428
|
* Padding of the groups in the Liveboard.
|
|
429
429
|
*
|
|
430
|
-
* Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
|
|
430
|
+
* Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
|
|
431
|
+
* then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying
|
|
432
|
+
* this CSS variable.
|
|
431
433
|
*/
|
|
432
434
|
"--ts-var-liveboard-group-padding"?: string;
|
|
433
435
|
/**
|
|
434
436
|
* Font size of the title of the groups in the Liveboard.
|
|
435
437
|
*
|
|
436
|
-
* Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
|
|
438
|
+
* Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
|
|
439
|
+
* then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying
|
|
440
|
+
* this CSS variable.
|
|
437
441
|
*/
|
|
438
442
|
"--ts-var-liveboard-group-title-font-size"?: string;
|
|
439
443
|
/**
|
|
440
444
|
* Font weight of the title of the groups in the Liveboard.
|
|
441
445
|
*
|
|
442
|
-
* Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
|
|
446
|
+
* Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
|
|
447
|
+
* then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying
|
|
448
|
+
* this CSS variable.
|
|
443
449
|
*/
|
|
444
450
|
"--ts-var-liveboard-group-title-font-weight"?: string;
|
|
445
451
|
/**
|
|
446
452
|
* Font size of the title of the tiles inside the groups in the Liveboard.
|
|
447
453
|
*
|
|
448
|
-
* Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
|
|
454
|
+
* Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
|
|
455
|
+
* then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying
|
|
456
|
+
* this CSS variable.
|
|
449
457
|
*/
|
|
450
458
|
"--ts-var-liveboard-group-tile-title-font-size"?: string;
|
|
451
459
|
/**
|
|
452
460
|
* Font weight of the title of the tiles inside the groups in the Liveboard.
|
|
453
461
|
*
|
|
454
|
-
* Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
|
|
462
|
+
* Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
|
|
463
|
+
* then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying
|
|
464
|
+
* this CSS variable.
|
|
455
465
|
*/
|
|
456
466
|
"--ts-var-liveboard-group-tile-title-font-weight"?: string;
|
|
457
467
|
/**
|
|
458
468
|
* Padding of the group tiles in the Liveboard.
|
|
459
469
|
*
|
|
460
|
-
* Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
|
|
470
|
+
* Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
|
|
471
|
+
* then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying
|
|
472
|
+
* this CSS variable.
|
|
461
473
|
*/
|
|
462
474
|
"--ts-var-liveboard-group-tile-padding"?: string;
|
|
463
475
|
/**
|
|
@@ -467,13 +479,17 @@ export interface CustomCssVariables {
|
|
|
467
479
|
/**
|
|
468
480
|
* Background color of the groups in the Liveboard.
|
|
469
481
|
*
|
|
470
|
-
* Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
|
|
482
|
+
* Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
|
|
483
|
+
* then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying
|
|
484
|
+
* this CSS variable.
|
|
471
485
|
*/
|
|
472
486
|
"--ts-var-liveboard-group-background"?: string;
|
|
473
487
|
/**
|
|
474
488
|
* Border color of the groups in the Liveboard.
|
|
475
489
|
*
|
|
476
|
-
* Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
|
|
490
|
+
* Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
|
|
491
|
+
* then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying
|
|
492
|
+
* this CSS variable.
|
|
477
493
|
*/
|
|
478
494
|
"--ts-var-liveboard-group-border-color"?: string;
|
|
479
495
|
/**
|
|
@@ -487,55 +503,73 @@ export interface CustomCssVariables {
|
|
|
487
503
|
/**
|
|
488
504
|
* Font color of the title of the groups in the Liveboard.
|
|
489
505
|
*
|
|
490
|
-
* Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
|
|
506
|
+
* Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
|
|
507
|
+
* then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying
|
|
508
|
+
* this CSS variable.
|
|
491
509
|
*/
|
|
492
510
|
"--ts-var-liveboard-group-title-font-color"?: string;
|
|
493
511
|
/**
|
|
494
512
|
* Font color of the description of the groups in the Liveboard.
|
|
495
513
|
*
|
|
496
|
-
* Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
|
|
514
|
+
* Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
|
|
515
|
+
* then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying
|
|
516
|
+
* this CSS variable.
|
|
497
517
|
*/
|
|
498
518
|
"--ts-var-liveboard-group-description-font-color"?: string;
|
|
499
519
|
/**
|
|
500
520
|
* Font color of the title of the tiles inside the groups in the Liveboard.
|
|
501
521
|
*
|
|
502
|
-
* Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
|
|
522
|
+
* Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
|
|
523
|
+
* then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying
|
|
524
|
+
* this CSS variable.
|
|
503
525
|
*/
|
|
504
526
|
"--ts-var-liveboard-group-tile-title-font-color"?: string;
|
|
505
527
|
/**
|
|
506
528
|
* Font color of the description of the tiles inside the groups in the Liveboard.
|
|
507
529
|
*
|
|
508
|
-
* Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
|
|
530
|
+
* Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
|
|
531
|
+
* then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying
|
|
532
|
+
* this CSS variable.
|
|
509
533
|
*/
|
|
510
534
|
"--ts-var-liveboard-group-tile-description-font-color"?: string;
|
|
511
535
|
/**
|
|
512
536
|
* Background color of the tiles inside the groups in the Liveboard.
|
|
513
537
|
*
|
|
514
|
-
* Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
|
|
538
|
+
* Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
|
|
539
|
+
* then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying
|
|
540
|
+
* this CSS variable.
|
|
515
541
|
*/
|
|
516
542
|
"--ts-var-liveboard-group-tile-background"?: string;
|
|
517
543
|
/**
|
|
518
544
|
* Background color of the filter chips in the Liveboard.
|
|
519
545
|
*
|
|
520
|
-
* Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
|
|
546
|
+
* Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
|
|
547
|
+
* then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying
|
|
548
|
+
* this CSS variable.
|
|
521
549
|
*/
|
|
522
550
|
"--ts-var-liveboard-chip-background"?: string;
|
|
523
551
|
/**
|
|
524
552
|
* Font color of the filter chips in the Liveboard.
|
|
525
553
|
*
|
|
526
|
-
* Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
|
|
554
|
+
* Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
|
|
555
|
+
* then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying
|
|
556
|
+
* this CSS variable.
|
|
527
557
|
*/
|
|
528
558
|
"--ts-var-liveboard-chip-color"?: string;
|
|
529
559
|
/**
|
|
530
560
|
* Background color of the filter chips in the Liveboard on hover.
|
|
531
561
|
*
|
|
532
|
-
* Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
|
|
562
|
+
* Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
|
|
563
|
+
* then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying
|
|
564
|
+
* this CSS variable.
|
|
533
565
|
*/
|
|
534
566
|
"--ts-var-liveboard-chip--hover-background"?: string;
|
|
535
567
|
/**
|
|
536
568
|
* Background color of the filter chips in the Liveboard on active.
|
|
537
569
|
*
|
|
538
|
-
* Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
|
|
570
|
+
* Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
|
|
571
|
+
* then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying
|
|
572
|
+
* this CSS variable.
|
|
539
573
|
*/
|
|
540
574
|
"--ts-var-liveboard-chip--active-background"?: string;
|
|
541
575
|
/**
|
|
@@ -773,9 +807,11 @@ export interface UnderlyingDataPoint {
|
|
|
773
807
|
* You can use this service to:
|
|
774
808
|
*
|
|
775
809
|
* - Add or remove columns from Answers (`addColumns`, `removeColumns`,
|
|
776
|
-
* `addColumnsByName`)
|
|
810
|
+
* `addColumnsByName`)
|
|
811
|
+
* - Apply filters to Answers (`addFilter`)
|
|
777
812
|
* - Get data from Answers in different formats (JSON, CSV, PNG) (`fetchData`,
|
|
778
|
-
* `fetchCSVBlob`, `fetchPNGBlob`)
|
|
813
|
+
* `fetchCSVBlob`, `fetchPNGBlob`)
|
|
814
|
+
* - Get data for specific points in visualizations
|
|
779
815
|
* (`getUnderlyingDataForPoint`)
|
|
780
816
|
* - Run custom queries (`executeQuery`)
|
|
781
817
|
* - Add visualizations to Liveboards (`addDisplayedVizToLiveboard`)
|
|
@@ -3997,22 +4033,45 @@ export enum EmbedEvent {
|
|
|
3997
4033
|
/**
|
|
3998
4034
|
* Emitted when name, status (private or public) or filter values of a
|
|
3999
4035
|
* Personalised view is updated.
|
|
4036
|
+
* This event is deprecated. Use {@link EmbedEvent.UpdatePersonalizedView} instead.
|
|
4000
4037
|
* @returns viewName: string
|
|
4001
4038
|
* @returns viewId: string
|
|
4002
4039
|
* @returns liveboardId: string
|
|
4003
4040
|
* @returns isPublic: boolean
|
|
4004
4041
|
* @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
|
|
4042
|
+
* @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
4005
4043
|
*/
|
|
4006
4044
|
UpdatePersonalisedView = "updatePersonalisedView",
|
|
4045
|
+
/**
|
|
4046
|
+
* Emitted when name, status (private or public) or filter values of a
|
|
4047
|
+
* Personalized view is updated.
|
|
4048
|
+
* @returns viewName: string
|
|
4049
|
+
* @returns viewId: string
|
|
4050
|
+
* @returns liveboardId: string
|
|
4051
|
+
* @returns isPublic: boolean
|
|
4052
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
4053
|
+
*/
|
|
4054
|
+
UpdatePersonalizedView = "updatePersonalisedView",
|
|
4007
4055
|
/**
|
|
4008
4056
|
* Emitted when a Personalised view is saved.
|
|
4057
|
+
* This event is deprecated. Use {@link EmbedEvent.SavePersonalizedView} instead.
|
|
4009
4058
|
* @returns viewName: string
|
|
4010
4059
|
* @returns viewId: string
|
|
4011
4060
|
* @returns liveboardId: string
|
|
4012
4061
|
* @returns isPublic: boolean
|
|
4013
4062
|
* @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
|
|
4063
|
+
* @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
4014
4064
|
*/
|
|
4015
4065
|
SavePersonalisedView = "savePersonalisedView",
|
|
4066
|
+
/**
|
|
4067
|
+
* Emitted when a Personalized view is saved.
|
|
4068
|
+
* @returns viewName: string
|
|
4069
|
+
* @returns viewId: string
|
|
4070
|
+
* @returns liveboardId: string
|
|
4071
|
+
* @returns isPublic: boolean
|
|
4072
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
4073
|
+
*/
|
|
4074
|
+
SavePersonalizedView = "savePersonalisedView",
|
|
4016
4075
|
/**
|
|
4017
4076
|
* Emitted when a Liveboard is reset.
|
|
4018
4077
|
* @returns viewName: string
|
|
@@ -4024,11 +4083,41 @@ export enum EmbedEvent {
|
|
|
4024
4083
|
ResetLiveboard = "resetLiveboard",
|
|
4025
4084
|
/**
|
|
4026
4085
|
* Emitted when a PersonalisedView is deleted.
|
|
4086
|
+
* This event is deprecated. Use {@link EmbedEvent.DeletePersonalizedView} instead.
|
|
4027
4087
|
* @returns views: string[]
|
|
4028
4088
|
* @returns liveboardId: string
|
|
4029
4089
|
* @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
|
|
4090
|
+
* @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
4030
4091
|
*/
|
|
4031
4092
|
DeletePersonalisedView = "deletePersonalisedView",
|
|
4093
|
+
/**
|
|
4094
|
+
* Emitted when a PersonalizedView is deleted.
|
|
4095
|
+
* @returns views: string[]
|
|
4096
|
+
* @returns liveboardId: string
|
|
4097
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
4098
|
+
*/
|
|
4099
|
+
DeletePersonalizedView = "deletePersonalisedView",
|
|
4100
|
+
/**
|
|
4101
|
+
* Emitted when a user selects a different Personalized View or
|
|
4102
|
+
* resets to the original/default view on a Liveboard.
|
|
4103
|
+
* @example
|
|
4104
|
+
* ```js
|
|
4105
|
+
* liveboardEmbed.on(EmbedEvent.ChangePersonalizedView, (data) => {
|
|
4106
|
+
* console.log(data.viewName); // 'Q4 Revenue' or 'Original View'
|
|
4107
|
+
* console.log(data.viewId); // '2a021a12-...' or null (default)
|
|
4108
|
+
* console.log(data.liveboardId); // 'abc123...'
|
|
4109
|
+
* console.log(data.isPublic); // true | false
|
|
4110
|
+
* })
|
|
4111
|
+
* ```
|
|
4112
|
+
* @returns viewName: string - Name of the selected view,
|
|
4113
|
+
* or 'Original View' when reset to default.
|
|
4114
|
+
* @returns viewId: string | null - GUID of the selected view,
|
|
4115
|
+
* or null when reset to default.
|
|
4116
|
+
* @returns liveboardId: string
|
|
4117
|
+
* @returns isPublic: boolean
|
|
4118
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
4119
|
+
*/
|
|
4120
|
+
ChangePersonalizedView = "changePersonalisedView",
|
|
4032
4121
|
/**
|
|
4033
4122
|
* Emitted when a user creates a Worksheet.
|
|
4034
4123
|
* @version SDK: 1.27.0 | ThoughtSpot: 9.8.0.cl, 9.8.0.sw
|
|
@@ -4062,7 +4151,8 @@ export enum EmbedEvent {
|
|
|
4062
4151
|
* @param - Includes the following parameters:
|
|
4063
4152
|
* - `payload`: The payload received from the embed related to the Data API call.
|
|
4064
4153
|
* - `responder`: Contains elements that let developers define whether ThoughtSpot
|
|
4065
|
-
* will run or block the search operation, and if blocked, which error message to
|
|
4154
|
+
* will run or block the search operation, and if blocked, which error message to
|
|
4155
|
+
* provide.
|
|
4066
4156
|
* - `execute` - When `execute` returns `true`, the search is run.
|
|
4067
4157
|
* When `execute` returns `false`, the search is not executed.
|
|
4068
4158
|
* - `error` - Developers can customize the user-facing error message when `execute`
|
|
@@ -4496,6 +4586,25 @@ export enum EmbedEvent {
|
|
|
4496
4586
|
* );
|
|
4497
4587
|
* }
|
|
4498
4588
|
* ```
|
|
4589
|
+
*
|
|
4590
|
+
* **Context Parameter (SDK: 1.45.2+)**
|
|
4591
|
+
*
|
|
4592
|
+
* Starting from SDK version 1.45.2 | ThoughtSpot: 26.3.0.cl, you can optionally pass a
|
|
4593
|
+
* `ContextType` as the third parameter to the `trigger` method to specify the context
|
|
4594
|
+
* from which the event is triggered. This helps ThoughtSpot understand the current page
|
|
4595
|
+
* context (Search, Answer, Liveboard, or Spotter) for better event handling.
|
|
4596
|
+
*
|
|
4597
|
+
* @example
|
|
4598
|
+
* ```js
|
|
4599
|
+
* import { HostEvent, ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4600
|
+
*
|
|
4601
|
+
* // Trigger Pin event with Search context
|
|
4602
|
+
* appEmbed.trigger(HostEvent.Pin, {
|
|
4603
|
+
* vizId: "123",
|
|
4604
|
+
* liveboardId: "456"
|
|
4605
|
+
* }, ContextType.Search);
|
|
4606
|
+
* ```
|
|
4607
|
+
*
|
|
4499
4608
|
* @group Events
|
|
4500
4609
|
*/
|
|
4501
4610
|
export enum HostEvent {
|
|
@@ -4517,6 +4626,16 @@ export enum HostEvent {
|
|
|
4517
4626
|
execute: true
|
|
4518
4627
|
});
|
|
4519
4628
|
* ```
|
|
4629
|
+
* @example
|
|
4630
|
+
* ```js
|
|
4631
|
+
* // Trigger search from search context
|
|
4632
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4633
|
+
* appEmbed.trigger(HostEvent.Search, {
|
|
4634
|
+
* searchQuery: "[revenue] by [region]",
|
|
4635
|
+
* dataSources: ["cd252e5c-b552-49a8-821d-3eadaa049cca"],
|
|
4636
|
+
* execute: true
|
|
4637
|
+
* }, ContextType.Search);
|
|
4638
|
+
* ```
|
|
4520
4639
|
*/
|
|
4521
4640
|
Search = "search",
|
|
4522
4641
|
/**
|
|
@@ -4567,6 +4686,24 @@ export enum HostEvent {
|
|
|
4567
4686
|
* });
|
|
4568
4687
|
* })
|
|
4569
4688
|
* ```
|
|
4689
|
+
* @example
|
|
4690
|
+
* ```js
|
|
4691
|
+
* // Drill down from answer context
|
|
4692
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4693
|
+
* appEmbed.trigger(HostEvent.DrillDown, {
|
|
4694
|
+
* points: { clickedPoint, selectedPoints },
|
|
4695
|
+
* autoDrillDown: true
|
|
4696
|
+
* }, ContextType.Answer);
|
|
4697
|
+
* ```
|
|
4698
|
+
* @example
|
|
4699
|
+
* ```js
|
|
4700
|
+
* // Drill down from search context
|
|
4701
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4702
|
+
* searchEmbed.trigger(HostEvent.DrillDown, {
|
|
4703
|
+
* points: { clickedPoint, selectedPoints },
|
|
4704
|
+
* columnGuid: "column-guid"
|
|
4705
|
+
* }, ContextType.Search);
|
|
4706
|
+
* ```
|
|
4570
4707
|
* @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
|
|
4571
4708
|
*/
|
|
4572
4709
|
DrillDown = "triggerDrillDown",
|
|
@@ -4587,6 +4724,13 @@ export enum HostEvent {
|
|
|
4587
4724
|
* const url = embed.trigger(HostEvent.GetIframeUrl);
|
|
4588
4725
|
* console.log("iFrameURL",url);
|
|
4589
4726
|
* ```
|
|
4727
|
+
* @example
|
|
4728
|
+
* ```js
|
|
4729
|
+
* // Get iframe URL from specific context
|
|
4730
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4731
|
+
* const url = await appEmbed.trigger(HostEvent.GetIframeUrl, {}, ContextType.Answer);
|
|
4732
|
+
* console.log("iFrameURL", url);
|
|
4733
|
+
* ```
|
|
4590
4734
|
* @version SDK: 1.35.0 | ThoughtSpot: 10.4.0.cl
|
|
4591
4735
|
*/
|
|
4592
4736
|
GetIframeUrl = "GetIframeUrl",
|
|
@@ -4600,6 +4744,15 @@ export enum HostEvent {
|
|
|
4600
4744
|
* '730496d6-6903-4601-937e-2c691821af3c',
|
|
4601
4745
|
* 'd547ec54-2a37-4516-a222-2b06719af726'])
|
|
4602
4746
|
* ```
|
|
4747
|
+
* @example
|
|
4748
|
+
* ```js
|
|
4749
|
+
* // Set visible vizs from liveboard context
|
|
4750
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4751
|
+
* liveboardEmbed.trigger(HostEvent.SetVisibleVizs, [
|
|
4752
|
+
* '730496d6-6903-4601-937e-2c691821af3c',
|
|
4753
|
+
* 'd547ec54-2a37-4516-a222-2b06719af726'
|
|
4754
|
+
* ], ContextType.Liveboard);
|
|
4755
|
+
* ```
|
|
4603
4756
|
* @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
|
|
4604
4757
|
*/
|
|
4605
4758
|
SetVisibleVizs = "SetPinboardVisibleVizs",
|
|
@@ -4612,6 +4765,14 @@ export enum HostEvent {
|
|
|
4612
4765
|
* tabId:'730496d6-6903-4601-937e-2c691821af3c'
|
|
4613
4766
|
* })
|
|
4614
4767
|
* ```
|
|
4768
|
+
* @example
|
|
4769
|
+
* ```js
|
|
4770
|
+
* // Set active tab from liveboard context
|
|
4771
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4772
|
+
* liveboardEmbed.trigger(HostEvent.SetActiveTab, {
|
|
4773
|
+
* tabId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
4774
|
+
* }, ContextType.Liveboard);
|
|
4775
|
+
* ```
|
|
4615
4776
|
* @version SDK: 1.24.0 | ThoughtSpot: 9.5.0.cl, 9.5.1-sw
|
|
4616
4777
|
*/
|
|
4617
4778
|
SetActiveTab = "SetActiveTab",
|
|
@@ -4645,6 +4806,15 @@ export enum HostEvent {
|
|
|
4645
4806
|
* {columnName: "item type",operator: RuntimeFilterOp.EQ,values: ["Jackets"]}
|
|
4646
4807
|
* ])
|
|
4647
4808
|
* ```
|
|
4809
|
+
* @example
|
|
4810
|
+
* ```js
|
|
4811
|
+
* // Update runtime filters from liveboard context
|
|
4812
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4813
|
+
* liveboardEmbed.trigger(HostEvent.UpdateRuntimeFilters, [
|
|
4814
|
+
* {columnName: "region", operator: RuntimeFilterOp.EQ, values: ["west"]},
|
|
4815
|
+
* {columnName: "product", operator: RuntimeFilterOp.IN, values: ["shoes", "boots"]}
|
|
4816
|
+
* ], ContextType.Liveboard);
|
|
4817
|
+
* ```
|
|
4648
4818
|
* @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl, 8.4.1.sw
|
|
4649
4819
|
* @important
|
|
4650
4820
|
*/
|
|
@@ -4678,6 +4848,14 @@ export enum HostEvent {
|
|
|
4678
4848
|
* LiveboardEmbed.trigger(HostEvent.OpenFilter,
|
|
4679
4849
|
* { column: {columnId: '<column-GUID>'}})
|
|
4680
4850
|
* ```
|
|
4851
|
+
* @example
|
|
4852
|
+
* ```js
|
|
4853
|
+
* // Open filter from search context
|
|
4854
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4855
|
+
* searchEmbed.trigger(HostEvent.OpenFilter, {
|
|
4856
|
+
* column: { columnId: '<column-GUID>', name: 'region', type: 'ATTRIBUTE', dataType: 'CHAR'}
|
|
4857
|
+
* }, ContextType.Search);
|
|
4858
|
+
* ```
|
|
4681
4859
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
|
|
4682
4860
|
*/
|
|
4683
4861
|
OpenFilter = "openFilter",
|
|
@@ -4688,6 +4866,14 @@ export enum HostEvent {
|
|
|
4688
4866
|
* ```js
|
|
4689
4867
|
* searchEmbed.trigger(HostEvent.AddColumns, { columnIds: ['<column-GUID>','<column-GUID>'] })
|
|
4690
4868
|
* ```
|
|
4869
|
+
* @example
|
|
4870
|
+
* ```js
|
|
4871
|
+
* // Add columns from search context
|
|
4872
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4873
|
+
* searchEmbed.trigger(HostEvent.AddColumns, {
|
|
4874
|
+
* columnIds: ['col-guid-1', 'col-guid-2']
|
|
4875
|
+
* }, ContextType.Search);
|
|
4876
|
+
* ```
|
|
4691
4877
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
|
|
4692
4878
|
*/
|
|
4693
4879
|
AddColumns = "addColumns",
|
|
@@ -4698,6 +4884,14 @@ export enum HostEvent {
|
|
|
4698
4884
|
* ```js
|
|
4699
4885
|
* searchEmbed.trigger(HostEvent.RemoveColumn, { columnId: '<column-Guid>' })
|
|
4700
4886
|
* ```
|
|
4887
|
+
* @example
|
|
4888
|
+
* ```js
|
|
4889
|
+
* // Remove column from search context
|
|
4890
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4891
|
+
* searchEmbed.trigger(HostEvent.RemoveColumn, {
|
|
4892
|
+
* columnId: 'column-guid'
|
|
4893
|
+
* }, ContextType.Search);
|
|
4894
|
+
* ```
|
|
4701
4895
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
|
|
4702
4896
|
*/
|
|
4703
4897
|
RemoveColumn = "removeColumn",
|
|
@@ -4784,6 +4978,37 @@ export enum HostEvent {
|
|
|
4784
4978
|
*
|
|
4785
4979
|
* spotterEmbed.trigger(HostEvent.Pin, { vizId: latestSpotterVizId });
|
|
4786
4980
|
* ```
|
|
4981
|
+
* @example
|
|
4982
|
+
* ```js
|
|
4983
|
+
* // Using context parameter to specify the context type (SDK: 1.45.2+)
|
|
4984
|
+
* // Pin from a search answer context
|
|
4985
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4986
|
+
* appEmbed.trigger(HostEvent.Pin, {
|
|
4987
|
+
* vizId: "123",
|
|
4988
|
+
* newVizName: "Sales by region",
|
|
4989
|
+
* liveboardId: "456"
|
|
4990
|
+
* }, ContextType.Search);
|
|
4991
|
+
* ```
|
|
4992
|
+
* @example
|
|
4993
|
+
* ```js
|
|
4994
|
+
* // Pin from an answer context (explore modal/page) (SDK: 1.45.2+)
|
|
4995
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4996
|
+
* appEmbed.trigger(HostEvent.Pin, {
|
|
4997
|
+
* vizId: "789",
|
|
4998
|
+
* newVizName: "Revenue trends",
|
|
4999
|
+
* liveboardId: "456"
|
|
5000
|
+
* }, ContextType.Answer);
|
|
5001
|
+
* ```
|
|
5002
|
+
* @example
|
|
5003
|
+
* ```js
|
|
5004
|
+
* // Pin from a spotter context (SDK: 1.45.2+)
|
|
5005
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5006
|
+
* appEmbed.trigger(HostEvent.Pin, {
|
|
5007
|
+
* vizId: latestSpotterVizId,
|
|
5008
|
+
* newVizName: "AI-generated insights",
|
|
5009
|
+
* liveboardId: "456"
|
|
5010
|
+
* }, ContextType.Spotter);
|
|
5011
|
+
* ```
|
|
4787
5012
|
*
|
|
4788
5013
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
4789
5014
|
*/
|
|
@@ -4794,6 +5019,12 @@ export enum HostEvent {
|
|
|
4794
5019
|
* @example
|
|
4795
5020
|
* ```js
|
|
4796
5021
|
* liveboardEmbed.trigger(HostEvent.LiveboardInfo)
|
|
5022
|
+
*```
|
|
5023
|
+
* @example
|
|
5024
|
+
* ```js
|
|
5025
|
+
* // Show liveboard info from liveboard context
|
|
5026
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5027
|
+
* liveboardEmbed.trigger(HostEvent.LiveboardInfo, {}, ContextType.Liveboard);
|
|
4797
5028
|
* ```
|
|
4798
5029
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
4799
5030
|
*/
|
|
@@ -4804,6 +5035,12 @@ export enum HostEvent {
|
|
|
4804
5035
|
* ```js
|
|
4805
5036
|
* liveboardEmbed.trigger(HostEvent.Schedule)
|
|
4806
5037
|
* ```
|
|
5038
|
+
* @example
|
|
5039
|
+
* ```js
|
|
5040
|
+
* // Schedule from liveboard context
|
|
5041
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5042
|
+
* liveboardEmbed.trigger(HostEvent.Schedule, {}, ContextType.Liveboard);
|
|
5043
|
+
* ```
|
|
4807
5044
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
4808
5045
|
*/
|
|
4809
5046
|
Schedule = "subscription",
|
|
@@ -4813,6 +5050,12 @@ export enum HostEvent {
|
|
|
4813
5050
|
* ```js
|
|
4814
5051
|
* liveboardEmbed.trigger(HostEvent.ScheduleList)
|
|
4815
5052
|
* ```
|
|
5053
|
+
* @example
|
|
5054
|
+
* ```js
|
|
5055
|
+
* // Manage schedules from liveboard context
|
|
5056
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5057
|
+
* liveboardEmbed.trigger(HostEvent.ScheduleList, {}, ContextType.Liveboard);
|
|
5058
|
+
* ```
|
|
4816
5059
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
4817
5060
|
*/
|
|
4818
5061
|
SchedulesList = "schedule-list",
|
|
@@ -4823,6 +5066,18 @@ export enum HostEvent {
|
|
|
4823
5066
|
* ```js
|
|
4824
5067
|
* liveboardEmbed.trigger(HostEvent.ExportTML)
|
|
4825
5068
|
* ```
|
|
5069
|
+
* @example
|
|
5070
|
+
* ```js
|
|
5071
|
+
* // Export TML from liveboard context
|
|
5072
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5073
|
+
* liveboardEmbed.trigger(HostEvent.ExportTML, {}, ContextType.Liveboard);
|
|
5074
|
+
* ```
|
|
5075
|
+
* @example
|
|
5076
|
+
* ```js
|
|
5077
|
+
* // Export TML from search-answer context
|
|
5078
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5079
|
+
* appEmbed.trigger(HostEvent.ExportTML, {}, ContextType.Search);
|
|
5080
|
+
* ```
|
|
4826
5081
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
4827
5082
|
*/
|
|
4828
5083
|
ExportTML = "exportTSL",
|
|
@@ -4833,6 +5088,18 @@ export enum HostEvent {
|
|
|
4833
5088
|
* ```js
|
|
4834
5089
|
* liveboardEmbed.trigger(HostEvent.EditTML)
|
|
4835
5090
|
* ```
|
|
5091
|
+
* @example
|
|
5092
|
+
* ```js
|
|
5093
|
+
* // Edit TML from liveboard context
|
|
5094
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5095
|
+
* liveboardEmbed.trigger(HostEvent.EditTML, {}, ContextType.Liveboard);
|
|
5096
|
+
* ```
|
|
5097
|
+
* @example
|
|
5098
|
+
* ```js
|
|
5099
|
+
* // Edit TML from search-answer context
|
|
5100
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5101
|
+
* appEmbed.trigger(HostEvent.EditTML, {}, ContextType.Search);
|
|
5102
|
+
* ```
|
|
4836
5103
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
4837
5104
|
*/
|
|
4838
5105
|
EditTML = "editTSL",
|
|
@@ -4842,6 +5109,12 @@ export enum HostEvent {
|
|
|
4842
5109
|
* ```js
|
|
4843
5110
|
* liveboardEmbed.trigger(HostEvent.UpdateTML)
|
|
4844
5111
|
* ```
|
|
5112
|
+
* @example
|
|
5113
|
+
* ```js
|
|
5114
|
+
* // Update TML from liveboard context
|
|
5115
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5116
|
+
* liveboardEmbed.trigger(HostEvent.UpdateTML, {}, ContextType.Liveboard);
|
|
5117
|
+
* ```
|
|
4845
5118
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
4846
5119
|
*/
|
|
4847
5120
|
UpdateTML = "updateTSL",
|
|
@@ -4868,6 +5141,18 @@ export enum HostEvent {
|
|
|
4868
5141
|
*
|
|
4869
5142
|
* spotterEmbed.trigger(HostEvent.DownloadAsPdf, { vizId: latestSpotterVizId });
|
|
4870
5143
|
* ```
|
|
5144
|
+
* @example
|
|
5145
|
+
* ```js
|
|
5146
|
+
* // Download as PDF from search-answer context
|
|
5147
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5148
|
+
* appEmbed.trigger(HostEvent.DownloadAsPdf, {}, ContextType.Search);
|
|
5149
|
+
* ```
|
|
5150
|
+
* @example
|
|
5151
|
+
* ```js
|
|
5152
|
+
* // Download as PDF from liveboard context
|
|
5153
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5154
|
+
* liveboardEmbed.trigger(HostEvent.DownloadAsPdf, {}, ContextType.Liveboard);
|
|
5155
|
+
* ```
|
|
4871
5156
|
*
|
|
4872
5157
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
4873
5158
|
*/
|
|
@@ -4912,6 +5197,18 @@ export enum HostEvent {
|
|
|
4912
5197
|
*
|
|
4913
5198
|
* spotterEmbed.trigger(HostEvent.MakeACopy, { vizId: latestSpotterVizId });
|
|
4914
5199
|
* ```
|
|
5200
|
+
* @example
|
|
5201
|
+
* ```js
|
|
5202
|
+
* // Make a copy from answer context
|
|
5203
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5204
|
+
* appEmbed.trigger(HostEvent.MakeACopy, {}, ContextType.Answer);
|
|
5205
|
+
* ```
|
|
5206
|
+
* @example
|
|
5207
|
+
* ```js
|
|
5208
|
+
* // Make a copy from search context
|
|
5209
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5210
|
+
* appEmbed.trigger(HostEvent.MakeACopy, {}, ContextType.Search);
|
|
5211
|
+
* ```
|
|
4915
5212
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
4916
5213
|
*/
|
|
4917
5214
|
MakeACopy = "makeACopy",
|
|
@@ -4936,6 +5233,14 @@ export enum HostEvent {
|
|
|
4936
5233
|
* ```js
|
|
4937
5234
|
* liveboardEmbed.trigger(HostEvent.Explore, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
4938
5235
|
* ```
|
|
5236
|
+
* @example
|
|
5237
|
+
* ```js
|
|
5238
|
+
* // Explore from liveboard context
|
|
5239
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5240
|
+
* liveboardEmbed.trigger(HostEvent.Explore, {
|
|
5241
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
5242
|
+
* }, ContextType.Liveboard);
|
|
5243
|
+
* ```
|
|
4939
5244
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
4940
5245
|
*/
|
|
4941
5246
|
Explore = "explore",
|
|
@@ -4953,6 +5258,20 @@ export enum HostEvent {
|
|
|
4953
5258
|
* ```js
|
|
4954
5259
|
* searchEmbed.trigger(HostEvent.CreateMonitor)
|
|
4955
5260
|
* ```
|
|
5261
|
+
* @example
|
|
5262
|
+
* ```js
|
|
5263
|
+
* // Create monitor from answer context
|
|
5264
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5265
|
+
* appEmbed.trigger(HostEvent.CreateMonitor, {}, ContextType.Answer);
|
|
5266
|
+
* ```
|
|
5267
|
+
* @example
|
|
5268
|
+
* ```js
|
|
5269
|
+
* // Create monitor from liveboard context
|
|
5270
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5271
|
+
* liveboardEmbed.trigger(HostEvent.CreateMonitor, {
|
|
5272
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
5273
|
+
* }, ContextType.Liveboard);
|
|
5274
|
+
* ```
|
|
4956
5275
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
4957
5276
|
*/
|
|
4958
5277
|
CreateMonitor = "createMonitor",
|
|
@@ -4974,6 +5293,20 @@ export enum HostEvent {
|
|
|
4974
5293
|
* ```js
|
|
4975
5294
|
* vizEmbed.trigger(HostEvent.ManageMonitor)
|
|
4976
5295
|
* ```
|
|
5296
|
+
* @example
|
|
5297
|
+
* ```js
|
|
5298
|
+
* // Manage monitor from answer context
|
|
5299
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5300
|
+
* appEmbed.trigger(HostEvent.ManageMonitor, {}, ContextType.Answer);
|
|
5301
|
+
* ```
|
|
5302
|
+
* @example
|
|
5303
|
+
* ```js
|
|
5304
|
+
* // Manage monitor from liveboard context
|
|
5305
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5306
|
+
* liveboardEmbed.trigger(HostEvent.ManageMonitor, {
|
|
5307
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
5308
|
+
* }, ContextType.Liveboard);
|
|
5309
|
+
* ```
|
|
4977
5310
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
4978
5311
|
*/
|
|
4979
5312
|
ManageMonitor = "manageMonitor",
|
|
@@ -4999,6 +5332,26 @@ export enum HostEvent {
|
|
|
4999
5332
|
* ```js
|
|
5000
5333
|
* spotterEmbed.trigger(HostEvent.Edit);
|
|
5001
5334
|
* ```
|
|
5335
|
+
* @example
|
|
5336
|
+
* ```js
|
|
5337
|
+
* // Using context parameter to edit liveboard context
|
|
5338
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5339
|
+
* liveboardEmbed.trigger(HostEvent.Edit, {}, ContextType.Liveboard);
|
|
5340
|
+
* ```
|
|
5341
|
+
* @example
|
|
5342
|
+
* ```js
|
|
5343
|
+
* // Edit from search context
|
|
5344
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5345
|
+
* appEmbed.trigger(HostEvent.Edit, {}, ContextType.Search);
|
|
5346
|
+
* ```
|
|
5347
|
+
* * @example
|
|
5348
|
+
* ```js
|
|
5349
|
+
* // Edit from spotter context
|
|
5350
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5351
|
+
* appEmbed.trigger(HostEvent.Edit, {
|
|
5352
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
5353
|
+
* }, ContextType.Spotter);
|
|
5354
|
+
* ```
|
|
5002
5355
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
5003
5356
|
*/
|
|
5004
5357
|
Edit = "edit",
|
|
@@ -5016,6 +5369,20 @@ export enum HostEvent {
|
|
|
5016
5369
|
* ```js
|
|
5017
5370
|
* vizEmbed.trigger(HostEvent.CopyLink)
|
|
5018
5371
|
* ```
|
|
5372
|
+
* @example
|
|
5373
|
+
* ```js
|
|
5374
|
+
* // Copy link from liveboard context
|
|
5375
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5376
|
+
* liveboardEmbed.trigger(HostEvent.CopyLink, {}, ContextType.Liveboard);
|
|
5377
|
+
* ```
|
|
5378
|
+
* @example
|
|
5379
|
+
* ```js
|
|
5380
|
+
* // Copy link from liveboard visualization context
|
|
5381
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5382
|
+
* liveboardEmbed.trigger(HostEvent.CopyLink, {
|
|
5383
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
5384
|
+
* }, ContextType.Liveboard);
|
|
5385
|
+
* ```
|
|
5019
5386
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
5020
5387
|
*/
|
|
5021
5388
|
CopyLink = "embedDocument",
|
|
@@ -5033,6 +5400,20 @@ export enum HostEvent {
|
|
|
5033
5400
|
* ```js
|
|
5034
5401
|
* vizEmbed.trigger(HostEvent.Present)
|
|
5035
5402
|
* ```
|
|
5403
|
+
* @example
|
|
5404
|
+
* ```js
|
|
5405
|
+
* // Present from liveboard visualization context
|
|
5406
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5407
|
+
* liveboardEmbed.trigger(HostEvent.Present, {
|
|
5408
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
5409
|
+
* }, ContextType.Liveboard);
|
|
5410
|
+
* ```
|
|
5411
|
+
* @example
|
|
5412
|
+
* ```js
|
|
5413
|
+
* // Present from liveboard context
|
|
5414
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5415
|
+
* liveboardEmbed.trigger(HostEvent.Present, {}, ContextType.Liveboard);
|
|
5416
|
+
* ```
|
|
5036
5417
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
5037
5418
|
*/
|
|
5038
5419
|
Present = "present",
|
|
@@ -5061,6 +5442,22 @@ export enum HostEvent {
|
|
|
5061
5442
|
* tml.answer.search_query // TML representation of the search query
|
|
5062
5443
|
* );
|
|
5063
5444
|
* })
|
|
5445
|
+
* ```
|
|
5446
|
+
* @example
|
|
5447
|
+
* ```js
|
|
5448
|
+
* // Get TML from search context
|
|
5449
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5450
|
+
* appEmbed.trigger(HostEvent.GetTML, {}, ContextType.Search).then((tml) => {
|
|
5451
|
+
* console.log(tml.answer.search_query);
|
|
5452
|
+
* });
|
|
5453
|
+
* ```
|
|
5454
|
+
* @example
|
|
5455
|
+
* ```js
|
|
5456
|
+
* // Get TML from search-answer context
|
|
5457
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5458
|
+
* appEmbed.trigger(HostEvent.GetTML, {}, ContextType.Search).then((tml) => {
|
|
5459
|
+
* console.log(tml.answer);
|
|
5460
|
+
* });
|
|
5064
5461
|
* ```
|
|
5065
5462
|
* @version SDK: 1.18.0 | ThoughtSpot: 8.10.0.cl, 9.0.1.sw
|
|
5066
5463
|
* @important
|
|
@@ -5082,6 +5479,20 @@ export enum HostEvent {
|
|
|
5082
5479
|
* ```js
|
|
5083
5480
|
* searchEmbed.trigger(HostEvent.ShowUnderlyingData)
|
|
5084
5481
|
* ```
|
|
5482
|
+
* @example
|
|
5483
|
+
* ```js
|
|
5484
|
+
* // Show underlying data from liveboard visualization context
|
|
5485
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5486
|
+
* appEmbed.trigger(HostEvent.ShowUnderlyingData, {
|
|
5487
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
5488
|
+
* }, ContextType.Liveboard);
|
|
5489
|
+
* ```
|
|
5490
|
+
* @example
|
|
5491
|
+
* ```js
|
|
5492
|
+
* // Show underlying data from search context
|
|
5493
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5494
|
+
* appEmbed.trigger(HostEvent.ShowUnderlyingData, {}, ContextType.Search);
|
|
5495
|
+
* ```
|
|
5085
5496
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
5086
5497
|
*/
|
|
5087
5498
|
ShowUnderlyingData = "showUnderlyingData",
|
|
@@ -5099,6 +5510,18 @@ export enum HostEvent {
|
|
|
5099
5510
|
* ```js
|
|
5100
5511
|
* searchEmbed.trigger(HostEvent.Delete)
|
|
5101
5512
|
* ```
|
|
5513
|
+
* @example
|
|
5514
|
+
* ```js
|
|
5515
|
+
* // Delete from liveboard context
|
|
5516
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5517
|
+
* liveboardEmbed.trigger(HostEvent.Delete, {}, ContextType.Liveboard);
|
|
5518
|
+
* ```
|
|
5519
|
+
* @example
|
|
5520
|
+
* ```js
|
|
5521
|
+
* // Delete from search context
|
|
5522
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5523
|
+
* appEmbed.trigger(HostEvent.Delete, {}, ContextType.Search);
|
|
5524
|
+
* ```
|
|
5102
5525
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
5103
5526
|
*/
|
|
5104
5527
|
Delete = "onDeleteAnswer",
|
|
@@ -5119,6 +5542,20 @@ export enum HostEvent {
|
|
|
5119
5542
|
* ```js
|
|
5120
5543
|
* searchEmbed.trigger(HostEvent.SpotIQAnalyze)
|
|
5121
5544
|
* ```
|
|
5545
|
+
* @example
|
|
5546
|
+
* ```js
|
|
5547
|
+
* // SpotIQ analyze from search-answer context
|
|
5548
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5549
|
+
* appEmbed.trigger(HostEvent.SpotIQAnalyze, { vizId: '730496d6-6903-4601-937e-2c691821af3c' }, ContextType.Search);
|
|
5550
|
+
* ```
|
|
5551
|
+
* @example
|
|
5552
|
+
* ```js
|
|
5553
|
+
* // SpotIQ analyze from search context
|
|
5554
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5555
|
+
* liveboardEmbed.trigger(HostEvent.SpotIQAnalyze, {
|
|
5556
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
5557
|
+
* }, ContextType.Liveboard);
|
|
5558
|
+
* ```
|
|
5122
5559
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
5123
5560
|
*/
|
|
5124
5561
|
SpotIQAnalyze = "spotIQAnalyze",
|
|
@@ -5170,6 +5607,12 @@ export enum HostEvent {
|
|
|
5170
5607
|
*
|
|
5171
5608
|
* spotterEmbed.trigger(HostEvent.DownloadAsPng, { vizId: latestSpotterVizId });
|
|
5172
5609
|
* ```
|
|
5610
|
+
* @example
|
|
5611
|
+
* ```js
|
|
5612
|
+
* // Download as PNG from search-answer context
|
|
5613
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5614
|
+
* appEmbed.trigger(HostEvent.DownloadAsPng, {}, ContextType.Search);
|
|
5615
|
+
* ```
|
|
5173
5616
|
*
|
|
5174
5617
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.1.sw
|
|
5175
5618
|
*/
|
|
@@ -5198,6 +5641,18 @@ export enum HostEvent {
|
|
|
5198
5641
|
*
|
|
5199
5642
|
* spotterEmbed.trigger(HostEvent.DownloadAsCsv, { vizId: latestSpotterVizId });
|
|
5200
5643
|
* ```
|
|
5644
|
+
* @example
|
|
5645
|
+
* ```js
|
|
5646
|
+
* // Download as CSV from search-answer context
|
|
5647
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5648
|
+
* appEmbed.trigger(HostEvent.DownloadAsCsv, {}, ContextType.Search);
|
|
5649
|
+
* ```
|
|
5650
|
+
* @example
|
|
5651
|
+
* ```js
|
|
5652
|
+
* // Download as CSV from search context
|
|
5653
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5654
|
+
* searchEmbed.trigger(HostEvent.DownloadAsCsv, {}, ContextType.Search);
|
|
5655
|
+
* ```
|
|
5201
5656
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
5202
5657
|
*/
|
|
5203
5658
|
DownloadAsCsv = "downloadAsCSV",
|
|
@@ -5225,6 +5680,18 @@ export enum HostEvent {
|
|
|
5225
5680
|
*
|
|
5226
5681
|
* spotterEmbed.trigger(HostEvent.DownloadAsXlsx, { vizId: latestSpotterVizId });
|
|
5227
5682
|
* ```
|
|
5683
|
+
* @example
|
|
5684
|
+
* ```js
|
|
5685
|
+
* // Download as XLSX from answer context
|
|
5686
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5687
|
+
* appEmbed.trigger(HostEvent.DownloadAsXlsx, {}, ContextType.Answer);
|
|
5688
|
+
* ```
|
|
5689
|
+
* @example
|
|
5690
|
+
* ```js
|
|
5691
|
+
* // Download as XLSX from search context
|
|
5692
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5693
|
+
* searchEmbed.trigger(HostEvent.DownloadAsXlsx, {}, ContextType.Search);
|
|
5694
|
+
* ```
|
|
5228
5695
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
5229
5696
|
*/
|
|
5230
5697
|
DownloadAsXlsx = "downloadAsXLSX",
|
|
@@ -5238,6 +5705,18 @@ export enum HostEvent {
|
|
|
5238
5705
|
* ```js
|
|
5239
5706
|
* searchEmbed.trigger(HostEvent.Share)
|
|
5240
5707
|
* ```
|
|
5708
|
+
* @example
|
|
5709
|
+
* ```js
|
|
5710
|
+
* // Share from Liveboard context
|
|
5711
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5712
|
+
* liveboardEmbed.trigger(HostEvent.Share, {}, ContextType.Liveboard);
|
|
5713
|
+
* ```
|
|
5714
|
+
* @example
|
|
5715
|
+
* ```js
|
|
5716
|
+
* // Share from search-answer context
|
|
5717
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5718
|
+
* appEmbed.trigger(HostEvent.Share, {}, ContextType.Search);
|
|
5719
|
+
* ```
|
|
5241
5720
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
5242
5721
|
*/
|
|
5243
5722
|
Share = "share",
|
|
@@ -5277,6 +5756,18 @@ export enum HostEvent {
|
|
|
5277
5756
|
*
|
|
5278
5757
|
* spotterEmbed.trigger(HostEvent.Save, { vizId: latestSpotterVizId });
|
|
5279
5758
|
* ```
|
|
5759
|
+
* @example
|
|
5760
|
+
* ```js
|
|
5761
|
+
* // Save from answer context
|
|
5762
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5763
|
+
* appEmbed.trigger(HostEvent.Save, {}, ContextType.Answer);
|
|
5764
|
+
* ```
|
|
5765
|
+
* @example
|
|
5766
|
+
* ```js
|
|
5767
|
+
* // Save from search context
|
|
5768
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5769
|
+
* searchEmbed.trigger(HostEvent.Save, {}, ContextType.Search);
|
|
5770
|
+
* ```
|
|
5280
5771
|
*
|
|
5281
5772
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
5282
5773
|
*/
|
|
@@ -5293,6 +5784,20 @@ export enum HostEvent {
|
|
|
5293
5784
|
* ```js
|
|
5294
5785
|
* vizEmbed.trigger(HostEvent.SyncToSheets)
|
|
5295
5786
|
* ```
|
|
5787
|
+
* @example
|
|
5788
|
+
* ```js
|
|
5789
|
+
* // Sync to sheets from answer context
|
|
5790
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5791
|
+
* appEmbed.trigger(HostEvent.SyncToSheets, {}, ContextType.Answer);
|
|
5792
|
+
* ```
|
|
5793
|
+
* @example
|
|
5794
|
+
* ```js
|
|
5795
|
+
* // Sync to sheets from liveboard context
|
|
5796
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5797
|
+
* liveboardEmbed.trigger(HostEvent.SyncToSheets, {
|
|
5798
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
5799
|
+
* }, ContextType.Liveboard);
|
|
5800
|
+
* ```
|
|
5296
5801
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
5297
5802
|
*/
|
|
5298
5803
|
SyncToSheets = "sync-to-sheets",
|
|
@@ -5309,6 +5814,20 @@ export enum HostEvent {
|
|
|
5309
5814
|
* ```js
|
|
5310
5815
|
* vizEmbed.trigger(HostEvent.SyncToOtherApps)
|
|
5311
5816
|
* ```
|
|
5817
|
+
* @example
|
|
5818
|
+
* ```js
|
|
5819
|
+
* // Sync to other apps from answer context
|
|
5820
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5821
|
+
* appEmbed.trigger(HostEvent.SyncToOtherApps, {}, ContextType.Answer);
|
|
5822
|
+
* ```
|
|
5823
|
+
* @example
|
|
5824
|
+
* ```js
|
|
5825
|
+
* // Sync to other apps from liveboard context
|
|
5826
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5827
|
+
* liveboardEmbed.trigger(HostEvent.SyncToOtherApps, {
|
|
5828
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
5829
|
+
* }, ContextType.Liveboard);
|
|
5830
|
+
* ```
|
|
5312
5831
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
5313
5832
|
*/
|
|
5314
5833
|
SyncToOtherApps = "sync-to-other-apps",
|
|
@@ -5325,6 +5844,20 @@ export enum HostEvent {
|
|
|
5325
5844
|
* ```js
|
|
5326
5845
|
* vizEmbed.trigger(HostEvent.ManagePipelines)
|
|
5327
5846
|
* ```
|
|
5847
|
+
* @example
|
|
5848
|
+
* ```js
|
|
5849
|
+
* // Manage pipelines from answer context
|
|
5850
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5851
|
+
* appEmbed.trigger(HostEvent.ManagePipelines, {}, ContextType.Answer);
|
|
5852
|
+
* ```
|
|
5853
|
+
* @example
|
|
5854
|
+
* ```js
|
|
5855
|
+
* // Manage pipelines from liveboard context
|
|
5856
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5857
|
+
* liveboardEmbed.trigger(HostEvent.ManagePipelines, {
|
|
5858
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
5859
|
+
* }, ContextType.Liveboard);
|
|
5860
|
+
* ```
|
|
5328
5861
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
5329
5862
|
*/
|
|
5330
5863
|
ManagePipelines = "manage-pipeline",
|
|
@@ -5337,6 +5870,12 @@ export enum HostEvent {
|
|
|
5337
5870
|
* ```js
|
|
5338
5871
|
* appEmbed.trigger(HostEvent.ResetSearch)
|
|
5339
5872
|
* ```
|
|
5873
|
+
* @example
|
|
5874
|
+
* ```js
|
|
5875
|
+
* // Reset search from search context
|
|
5876
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5877
|
+
* searchEmbed.trigger(HostEvent.ResetSearch, {}, ContextType.Search);
|
|
5878
|
+
* ```
|
|
5340
5879
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.0.1.sw
|
|
5341
5880
|
*/
|
|
5342
5881
|
ResetSearch = "resetSearch",
|
|
@@ -5348,6 +5887,13 @@ export enum HostEvent {
|
|
|
5348
5887
|
* const data = await liveboardEmbed.trigger(HostEvent.GetFilters);
|
|
5349
5888
|
* console.log('data', data);
|
|
5350
5889
|
* ```
|
|
5890
|
+
* @example
|
|
5891
|
+
* ```js
|
|
5892
|
+
* // Get filters from liveboard context
|
|
5893
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5894
|
+
* const data = await liveboardEmbed.trigger(HostEvent.GetFilters, {}, ContextType.Liveboard);
|
|
5895
|
+
* console.log('filters', data);
|
|
5896
|
+
* ```
|
|
5351
5897
|
* @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
|
|
5352
5898
|
*/
|
|
5353
5899
|
GetFilters = "getFilters",
|
|
@@ -5355,7 +5901,8 @@ export enum HostEvent {
|
|
|
5355
5901
|
* Update one or several filters applied on a Liveboard.
|
|
5356
5902
|
* @param - Includes the following keys:
|
|
5357
5903
|
* - `filter`: A single filter object containing column name, filter operator, and
|
|
5358
|
-
* values.
|
|
5904
|
+
* values.
|
|
5905
|
+
* - `filters`: Multiple filter objects with column name, filter operator,
|
|
5359
5906
|
* and values for each.
|
|
5360
5907
|
*
|
|
5361
5908
|
* Each filter object must include the following attributes:
|
|
@@ -5438,6 +5985,18 @@ export enum HostEvent {
|
|
|
5438
5985
|
* }]
|
|
5439
5986
|
* });
|
|
5440
5987
|
* ```
|
|
5988
|
+
* @example
|
|
5989
|
+
* ```js
|
|
5990
|
+
* // Update filters from liveboard context
|
|
5991
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5992
|
+
* liveboardEmbed.trigger(HostEvent.UpdateFilters, {
|
|
5993
|
+
* filter: {
|
|
5994
|
+
* column: "item type",
|
|
5995
|
+
* oper: "IN",
|
|
5996
|
+
* values: ["shoes", "boots"]
|
|
5997
|
+
* }
|
|
5998
|
+
* }, ContextType.Liveboard);
|
|
5999
|
+
* ```
|
|
5441
6000
|
* @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
|
|
5442
6001
|
*/
|
|
5443
6002
|
UpdateFilters = "updateFilters",
|
|
@@ -5451,6 +6010,14 @@ export enum HostEvent {
|
|
|
5451
6010
|
* );
|
|
5452
6011
|
* })
|
|
5453
6012
|
* ```
|
|
6013
|
+
* @example
|
|
6014
|
+
* ```js
|
|
6015
|
+
* // Get tabs from liveboard context
|
|
6016
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
6017
|
+
* liveboardEmbed.trigger(HostEvent.GetTabs, {}, ContextType.Liveboard).then((tabDetails) => {
|
|
6018
|
+
* console.log('tabs', tabDetails);
|
|
6019
|
+
* });
|
|
6020
|
+
* ```
|
|
5454
6021
|
* @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl
|
|
5455
6022
|
*/
|
|
5456
6023
|
GetTabs = "getTabs",
|
|
@@ -5464,6 +6031,15 @@ export enum HostEvent {
|
|
|
5464
6031
|
* '430496d6-6903-4601-937e-2c691821af3c',
|
|
5465
6032
|
* 'f547ec54-2a37-4516-a222-2b06719af726'])
|
|
5466
6033
|
* ```
|
|
6034
|
+
* @example
|
|
6035
|
+
* ```js
|
|
6036
|
+
* // Set visible tabs from liveboard context
|
|
6037
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
6038
|
+
* liveboardEmbed.trigger(HostEvent.SetVisibleTabs, [
|
|
6039
|
+
* '430496d6-6903-4601-937e-2c691821af3c',
|
|
6040
|
+
* 'f547ec54-2a37-4516-a222-2b06719af726'
|
|
6041
|
+
* ], ContextType.Liveboard);
|
|
6042
|
+
* ```
|
|
5467
6043
|
* @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
|
|
5468
6044
|
*/
|
|
5469
6045
|
SetVisibleTabs = "SetPinboardVisibleTabs",
|
|
@@ -5477,6 +6053,15 @@ export enum HostEvent {
|
|
|
5477
6053
|
* '630496d6-6903-4601-937e-2c691821af3c',
|
|
5478
6054
|
* 'i547ec54-2a37-4516-a222-2b06719af726'])
|
|
5479
6055
|
* ```
|
|
6056
|
+
* @example
|
|
6057
|
+
* ```js
|
|
6058
|
+
* // Set hidden tabs from liveboard context
|
|
6059
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
6060
|
+
* liveboardEmbed.trigger(HostEvent.SetHiddenTabs, [
|
|
6061
|
+
* '630496d6-6903-4601-937e-2c691821af3c',
|
|
6062
|
+
* 'i547ec54-2a37-4516-a222-2b06719af726'
|
|
6063
|
+
* ], ContextType.Liveboard);
|
|
6064
|
+
* ```
|
|
5480
6065
|
* @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
|
|
5481
6066
|
*/
|
|
5482
6067
|
SetHiddenTabs = "SetPinboardHiddenTabs",
|
|
@@ -5553,13 +6138,24 @@ export enum HostEvent {
|
|
|
5553
6138
|
UpdateCrossFilter = "UpdateCrossFilter",
|
|
5554
6139
|
/**
|
|
5555
6140
|
* Trigger reset action for a personalized Liveboard view.
|
|
6141
|
+
* This event is deprecated. Use {@link HostEvent.ResetLiveboardPersonalizedView} instead.
|
|
5556
6142
|
* @example
|
|
5557
6143
|
* ```js
|
|
5558
6144
|
* liveboardEmbed.trigger(HostEvent.ResetLiveboardPersonalisedView);
|
|
5559
6145
|
* ```
|
|
5560
6146
|
* @version SDK: 1.29.0 | ThoughtSpot Cloud: 10.1.0.cl, 10.1.0.sw
|
|
6147
|
+
* @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
5561
6148
|
*/
|
|
5562
6149
|
ResetLiveboardPersonalisedView = "ResetLiveboardPersonalisedView",
|
|
6150
|
+
/**
|
|
6151
|
+
* Trigger reset action for a personalized Liveboard view.
|
|
6152
|
+
* @example
|
|
6153
|
+
* ```js
|
|
6154
|
+
* liveboardEmbed.trigger(HostEvent.ResetLiveboardPersonalizedView);
|
|
6155
|
+
* ```
|
|
6156
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
6157
|
+
*/
|
|
6158
|
+
ResetLiveboardPersonalizedView = "ResetLiveboardPersonalisedView",
|
|
5563
6159
|
/**
|
|
5564
6160
|
* Triggers an action to update Parameter values on embedded
|
|
5565
6161
|
* Answers, Liveboard, and Spotter answer in Edit mode.
|
|
@@ -5576,6 +6172,16 @@ export enum HostEvent {
|
|
|
5576
6172
|
* isVisibleToUser: false
|
|
5577
6173
|
* }])
|
|
5578
6174
|
* ```
|
|
6175
|
+
* @example
|
|
6176
|
+
* ```js
|
|
6177
|
+
* // Update parameters from liveboard context
|
|
6178
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
6179
|
+
* liveboardEmbed.trigger(HostEvent.UpdateParameters, [{
|
|
6180
|
+
* name: "Region Param",
|
|
6181
|
+
* value: "West",
|
|
6182
|
+
* isVisibleToUser: true
|
|
6183
|
+
* }], ContextType.Liveboard);
|
|
6184
|
+
* ```
|
|
5579
6185
|
* @version SDK: 1.29.0 | ThoughtSpot: 10.1.0.cl, 10.1.0.sw
|
|
5580
6186
|
*/
|
|
5581
6187
|
UpdateParameters = "UpdateParameters",
|
|
@@ -5595,18 +6201,77 @@ export enum HostEvent {
|
|
|
5595
6201
|
* });
|
|
5596
6202
|
*
|
|
5597
6203
|
* spotterEmbed.trigger(HostEvent.GetParameters, { vizId: latestSpotterVizId });
|
|
6204
|
+
*```
|
|
6205
|
+
* @example
|
|
6206
|
+
* ```js
|
|
6207
|
+
* // Get parameters from liveboard context
|
|
6208
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
6209
|
+
* liveboardEmbed.trigger(HostEvent.GetParameters, {}, ContextType.Liveboard).then((parameters) => {
|
|
6210
|
+
* console.log('parameters', parameters);
|
|
6211
|
+
* });
|
|
5598
6212
|
* ```
|
|
5599
6213
|
* @version SDK: 1.29.0 | ThoughtSpot: 10.1.0.cl, 10.1.0.sw
|
|
5600
6214
|
*/
|
|
5601
6215
|
GetParameters = "GetParameters",
|
|
5602
6216
|
/**
|
|
5603
6217
|
* Triggers an event to update a personalized view of a Liveboard.
|
|
6218
|
+
* This event is deprecated. Use {@link HostEvent.UpdatePersonalizedView} instead.
|
|
5604
6219
|
* ```js
|
|
5605
6220
|
* liveboardEmbed.trigger(HostEvent.UpdatePersonalisedView, {viewId: '1234'})
|
|
5606
6221
|
* ```
|
|
6222
|
+
* @example
|
|
6223
|
+
* ```js
|
|
6224
|
+
* // Update personalized view from liveboard context
|
|
6225
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
6226
|
+
* liveboardEmbed.trigger(HostEvent.UpdatePersonalisedView, {
|
|
6227
|
+
* viewId: '1234'
|
|
6228
|
+
* }, ContextType.Liveboard);
|
|
6229
|
+
* ```
|
|
5607
6230
|
* @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
|
|
6231
|
+
* @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
5608
6232
|
*/
|
|
5609
6233
|
UpdatePersonalisedView = "UpdatePersonalisedView",
|
|
6234
|
+
/**
|
|
6235
|
+
* Triggers an event to update a personalized view of a Liveboard.
|
|
6236
|
+
* ```js
|
|
6237
|
+
* liveboardEmbed.trigger(HostEvent.UpdatePersonalisedView, {viewId: '1234'})
|
|
6238
|
+
* ```
|
|
6239
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
6240
|
+
*/
|
|
6241
|
+
UpdatePersonalizedView = "UpdatePersonalisedView",
|
|
6242
|
+
/**
|
|
6243
|
+
* Triggers selection of a specific Personalized View on a
|
|
6244
|
+
* Liveboard without reloading the embed. Pass either a
|
|
6245
|
+
* `viewId` (GUID) or `viewName`. If both are provided, `viewId` takes precedence.
|
|
6246
|
+
* If neither is provided, the Liveboard resets to the original/default view.
|
|
6247
|
+
* When a `viewName` is provided and multiple views share
|
|
6248
|
+
* the same name, the first match is selected.
|
|
6249
|
+
* @example
|
|
6250
|
+
* ```js
|
|
6251
|
+
* liveboardEmbed.trigger(
|
|
6252
|
+
* HostEvent.SelectPersonalizedView,
|
|
6253
|
+
* { viewId: '2a021a12-1aed-425d-984b-141ee916ce72' },
|
|
6254
|
+
* )
|
|
6255
|
+
* ```
|
|
6256
|
+
* @example
|
|
6257
|
+
* ```js
|
|
6258
|
+
* // Select by name
|
|
6259
|
+
* liveboardEmbed.trigger(
|
|
6260
|
+
* HostEvent.SelectPersonalizedView,
|
|
6261
|
+
* { viewName: 'Dr Smith Cardiology' },
|
|
6262
|
+
* )
|
|
6263
|
+
* ```
|
|
6264
|
+
* @example
|
|
6265
|
+
* ```js
|
|
6266
|
+
* // Reset to default view
|
|
6267
|
+
* liveboardEmbed.trigger(
|
|
6268
|
+
* HostEvent.SelectPersonalizedView,
|
|
6269
|
+
* {},
|
|
6270
|
+
* )
|
|
6271
|
+
* ```
|
|
6272
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
6273
|
+
*/
|
|
6274
|
+
SelectPersonalizedView = "SelectPersonalisedView",
|
|
5610
6275
|
/**
|
|
5611
6276
|
* @hidden
|
|
5612
6277
|
* Notify when info call is completed successfully
|
|
@@ -5626,7 +6291,8 @@ export enum HostEvent {
|
|
|
5626
6291
|
* add a name and description for the Answer.
|
|
5627
6292
|
* @param - Includes the following keys:
|
|
5628
6293
|
* - `vizId`: Refers to the Answer ID in Spotter embed and is **required** in Spotter
|
|
5629
|
-
* embed.
|
|
6294
|
+
* embed.
|
|
6295
|
+
* - `name`: Optional. Name string for the Answer.
|
|
5630
6296
|
* - `description`: Optional. Description text for the Answer.
|
|
5631
6297
|
* @example
|
|
5632
6298
|
* ```js
|
|
@@ -5645,6 +6311,34 @@ export enum HostEvent {
|
|
|
5645
6311
|
*
|
|
5646
6312
|
* spotterEmbed.trigger(HostEvent.SaveAnswer, { vizId: latestSpotterVizId });
|
|
5647
6313
|
* ```
|
|
6314
|
+
* @example
|
|
6315
|
+
* ```js
|
|
6316
|
+
* // Using context parameter to save answer from search context
|
|
6317
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
6318
|
+
* const saveAnswerResponse = await appEmbed.trigger(HostEvent.SaveAnswer, {
|
|
6319
|
+
* name: "Regional sales analysis",
|
|
6320
|
+
* description: "Sales breakdown by region"
|
|
6321
|
+
* }, ContextType.Search);
|
|
6322
|
+
* ```
|
|
6323
|
+
* @example
|
|
6324
|
+
* ```js
|
|
6325
|
+
* // Save answer from answer context (explore modal)
|
|
6326
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
6327
|
+
* const saveAnswerResponse = await appEmbed.trigger(HostEvent.SaveAnswer, {
|
|
6328
|
+
* name: "Modified analysis",
|
|
6329
|
+
* description: "Updated from explore view"
|
|
6330
|
+
* }, ContextType.Answer);
|
|
6331
|
+
* ```
|
|
6332
|
+
* @example
|
|
6333
|
+
* ```js
|
|
6334
|
+
* // Save answer from spotter context
|
|
6335
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
6336
|
+
* const saveAnswerResponse = await appEmbed.trigger(HostEvent.SaveAnswer, {
|
|
6337
|
+
* vizId: latestSpotterVizId,
|
|
6338
|
+
* name: "AI insights",
|
|
6339
|
+
* description: "Generated from Spotter"
|
|
6340
|
+
* }, ContextType.Spotter);
|
|
6341
|
+
* ```
|
|
5648
6342
|
* @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
|
|
5649
6343
|
*/
|
|
5650
6344
|
SaveAnswer = "saveAnswer",
|
|
@@ -5686,6 +6380,15 @@ export enum HostEvent {
|
|
|
5686
6380
|
* executeSearch: true,
|
|
5687
6381
|
* })
|
|
5688
6382
|
* ```
|
|
6383
|
+
* @example
|
|
6384
|
+
* ```js
|
|
6385
|
+
* // Spotter search from spotter context
|
|
6386
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
6387
|
+
* spotterEmbed.trigger(HostEvent.SpotterSearch, {
|
|
6388
|
+
* query: 'sales by region',
|
|
6389
|
+
* executeSearch: true
|
|
6390
|
+
* }, ContextType.Spotter);
|
|
6391
|
+
* ```
|
|
5689
6392
|
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
5690
6393
|
*/
|
|
5691
6394
|
SpotterSearch = "SpotterSearch",
|
|
@@ -5696,6 +6399,12 @@ export enum HostEvent {
|
|
|
5696
6399
|
* ```js
|
|
5697
6400
|
* spotterEmbed.trigger(HostEvent.EditLastPrompt, "revenue per year");
|
|
5698
6401
|
* ```
|
|
6402
|
+
* @example
|
|
6403
|
+
* ```js
|
|
6404
|
+
* // Edit last prompt from spotter context
|
|
6405
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
6406
|
+
* spotterEmbed.trigger(HostEvent.EditLastPrompt, "sales by region", ContextType.Spotter);
|
|
6407
|
+
* ```
|
|
5699
6408
|
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
5700
6409
|
*/
|
|
5701
6410
|
EditLastPrompt = "EditLastPrompt",
|
|
@@ -5705,6 +6414,12 @@ export enum HostEvent {
|
|
|
5705
6414
|
* ```js
|
|
5706
6415
|
* spotterEmbed.trigger(HostEvent.PreviewSpotterData);
|
|
5707
6416
|
* ```
|
|
6417
|
+
* @example
|
|
6418
|
+
* ```js
|
|
6419
|
+
* // Preview spotter data from spotter context
|
|
6420
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
6421
|
+
* spotterEmbed.trigger(HostEvent.PreviewSpotterData, {}, ContextType.Spotter);
|
|
6422
|
+
* ```
|
|
5708
6423
|
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
5709
6424
|
*/
|
|
5710
6425
|
PreviewSpotterData = "PreviewSpotterData",
|
|
@@ -6817,13 +7532,25 @@ export enum Action {
|
|
|
6817
7532
|
/**
|
|
6818
7533
|
* The Liveboard Personalised Views dropdown.
|
|
6819
7534
|
* Allows navigating to a personalized Liveboard View.
|
|
7535
|
+
* This action is deprecated. Use {@link Action.PersonalizedViewsDropdown} instead.
|
|
6820
7536
|
* @example
|
|
6821
7537
|
* ```js
|
|
6822
7538
|
* disabledActions: [Action.PersonalisedViewsDropdown]
|
|
6823
7539
|
* ```
|
|
6824
7540
|
* @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 10.1.0.sw
|
|
7541
|
+
* @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
6825
7542
|
*/
|
|
6826
7543
|
PersonalisedViewsDropdown = "personalisedViewsDropdown",
|
|
7544
|
+
/**
|
|
7545
|
+
* The Liveboard Personalized Views dropdown.
|
|
7546
|
+
* Allows navigating to a personalized Liveboard View.
|
|
7547
|
+
* @example
|
|
7548
|
+
* ```js
|
|
7549
|
+
* disabledActions: [Action.PersonalizedViewsDropdown]
|
|
7550
|
+
* ```
|
|
7551
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
7552
|
+
*/
|
|
7553
|
+
PersonalizedViewsDropdown = "personalisedViewsDropdown",
|
|
6827
7554
|
/**
|
|
6828
7555
|
* Action ID for show or hide the user details on a
|
|
6829
7556
|
* Liveboard (Recently visited / social proof)
|
|
@@ -6911,14 +7638,27 @@ export enum Action {
|
|
|
6911
7638
|
/**
|
|
6912
7639
|
* The **Organize Favourites** action on Homepage
|
|
6913
7640
|
* *Favorites* module.
|
|
7641
|
+
* This action is deprecated. Use {@link Action.OrganizeFavorites} instead.
|
|
6914
7642
|
*
|
|
6915
7643
|
* @example
|
|
6916
7644
|
* ```js
|
|
6917
7645
|
* disabledActions: [Action.OrganiseFavourites]
|
|
6918
7646
|
* ```
|
|
6919
7647
|
* @version SDK: 1.32.0 | ThoughtSpot: 10.0.0.cl
|
|
7648
|
+
* @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
6920
7649
|
*/
|
|
6921
7650
|
OrganiseFavourites = "organiseFavourites",
|
|
7651
|
+
/**
|
|
7652
|
+
* The **Organize Favorites** action on Homepage
|
|
7653
|
+
* *Favorites* module.
|
|
7654
|
+
*
|
|
7655
|
+
* @example
|
|
7656
|
+
* ```js
|
|
7657
|
+
* disabledActions: [Action.OrganizeFavorites]
|
|
7658
|
+
* ```
|
|
7659
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
7660
|
+
*/
|
|
7661
|
+
OrganizeFavorites = "organiseFavourites",
|
|
6922
7662
|
/**
|
|
6923
7663
|
* The **AI Highlights** action on a Liveboard.
|
|
6924
7664
|
*
|
|
@@ -7730,7 +8470,8 @@ export enum EmbedErrorCodes {
|
|
|
7730
8470
|
*
|
|
7731
8471
|
* - **errorType**: One of the predefined {@link ErrorDetailsTypes} values
|
|
7732
8472
|
* - **message**: Human-readable error description (string or array of strings for
|
|
7733
|
-
* multiple errors)
|
|
8473
|
+
* multiple errors)
|
|
8474
|
+
* - **code**: Machine-readable error identifier {@link EmbedErrorCodes}
|
|
7734
8475
|
* values
|
|
7735
8476
|
* - **[key: string]**: Additional context-specific for backward compatibility
|
|
7736
8477
|
*
|
|
@@ -7778,6 +8519,22 @@ export interface EmbedErrorDetailsEvent {
|
|
|
7778
8519
|
/** Additional context-specific for backward compatibility */
|
|
7779
8520
|
[key: string]: any;
|
|
7780
8521
|
}
|
|
8522
|
+
/**
|
|
8523
|
+
* Context types for specifying the page context when triggering host events.
|
|
8524
|
+
* Used as the third parameter in the `trigger` method to help ThoughtSpot
|
|
8525
|
+
* understand the current page context for better event handling.
|
|
8526
|
+
*
|
|
8527
|
+
* @example
|
|
8528
|
+
* ```js
|
|
8529
|
+
* import { HostEvent, ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
8530
|
+
*
|
|
8531
|
+
* // Trigger an event with specific context
|
|
8532
|
+
* embed.trigger(HostEvent.Pin, { vizId: "123", liveboardId: "456" }, ContextType.Search);
|
|
8533
|
+
* ```
|
|
8534
|
+
*
|
|
8535
|
+
* @version SDK: 1.45.2 | ThoughtSpot: 26.3.0.cl
|
|
8536
|
+
* @group Events
|
|
8537
|
+
*/
|
|
7781
8538
|
export enum ContextType {
|
|
7782
8539
|
/**
|
|
7783
8540
|
* Search answer context for search page or edit viz dialog on liveboard page.
|
|
@@ -7794,7 +8551,11 @@ export enum ContextType {
|
|
|
7794
8551
|
/**
|
|
7795
8552
|
* Spotter context for spotter modal/page.
|
|
7796
8553
|
*/
|
|
7797
|
-
Spotter = "spotter"
|
|
8554
|
+
Spotter = "spotter",
|
|
8555
|
+
/**
|
|
8556
|
+
* Other context for any other generic page.
|
|
8557
|
+
*/
|
|
8558
|
+
Other = "other"
|
|
7798
8559
|
}
|
|
7799
8560
|
export interface DefaultAppInitData {
|
|
7800
8561
|
customisations: CustomisationsInterface;
|
|
@@ -7897,33 +8658,6 @@ export interface ObjectIds {
|
|
|
7897
8658
|
*/
|
|
7898
8659
|
modalTitle?: string;
|
|
7899
8660
|
}
|
|
7900
|
-
/**
|
|
7901
|
-
* Context object for the embedded component.
|
|
7902
|
-
* @example
|
|
7903
|
-
* ```js
|
|
7904
|
-
* const context = await embed.getCurrentContext();
|
|
7905
|
-
* console.log(context);
|
|
7906
|
-
* {
|
|
7907
|
-
* stack: [
|
|
7908
|
-
* {
|
|
7909
|
-
* name: 'Liveboard',
|
|
7910
|
-
* type: ContextType.Liveboard,
|
|
7911
|
-
* objectIds: {
|
|
7912
|
-
* liveboardId: '123',
|
|
7913
|
-
* },
|
|
7914
|
-
* },
|
|
7915
|
-
* ],
|
|
7916
|
-
* currentContext: {
|
|
7917
|
-
* name: 'Liveboard',
|
|
7918
|
-
* type: ContextType.Liveboard,
|
|
7919
|
-
* objectIds: {
|
|
7920
|
-
* liveboardId: '123',
|
|
7921
|
-
* },
|
|
7922
|
-
* },
|
|
7923
|
-
* }
|
|
7924
|
-
* ```
|
|
7925
|
-
* @version SDK: 1.45.2 | ThoughtSpot: 26.3.0.cl
|
|
7926
|
-
*/
|
|
7927
8661
|
export interface ContextObject {
|
|
7928
8662
|
/**
|
|
7929
8663
|
* Stack of context objects.
|
|
@@ -7954,6 +8688,11 @@ export interface ContextObject {
|
|
|
7954
8688
|
objectIds: ObjectIds;
|
|
7955
8689
|
};
|
|
7956
8690
|
}
|
|
8691
|
+
export interface LiveboardTab {
|
|
8692
|
+
id: string;
|
|
8693
|
+
name: string;
|
|
8694
|
+
[key: string]: any;
|
|
8695
|
+
}
|
|
7957
8696
|
export enum UIPassthroughEvent {
|
|
7958
8697
|
PinAnswerToLiveboard = "addVizToPinboard",
|
|
7959
8698
|
SaveAnswer = "saveAnswer",
|
|
@@ -7961,7 +8700,14 @@ export enum UIPassthroughEvent {
|
|
|
7961
8700
|
GetAvailableUIPassthroughs = "getAvailableUiPassthroughs",
|
|
7962
8701
|
GetAnswerConfig = "getAnswerPageConfig",
|
|
7963
8702
|
GetLiveboardConfig = "getPinboardPageConfig",
|
|
7964
|
-
GetUnsavedAnswerTML = "getUnsavedAnswerTML"
|
|
8703
|
+
GetUnsavedAnswerTML = "getUnsavedAnswerTML",
|
|
8704
|
+
GetAnswerSession = "getAnswerSession",
|
|
8705
|
+
GetFilters = "getFilters",
|
|
8706
|
+
GetIframeUrl = "getIframeUrl",
|
|
8707
|
+
GetParameters = "getParameters",
|
|
8708
|
+
GetTML = "getTML",
|
|
8709
|
+
GetTabs = "getTabs",
|
|
8710
|
+
GetExportRequestForCurrentPinboard = "getExportRequestForCurrentPinboard"
|
|
7965
8711
|
}
|
|
7966
8712
|
export type UIPassthroughContractBase = {
|
|
7967
8713
|
[UIPassthroughEvent.PinAnswerToLiveboard]: {
|
|
@@ -8025,17 +8771,75 @@ export type UIPassthroughContractBase = {
|
|
|
8025
8771
|
tml: string;
|
|
8026
8772
|
};
|
|
8027
8773
|
};
|
|
8774
|
+
[UIPassthroughEvent.GetAnswerSession]: {
|
|
8775
|
+
request: {
|
|
8776
|
+
vizId?: string;
|
|
8777
|
+
};
|
|
8778
|
+
response: {
|
|
8779
|
+
session: SessionInterface;
|
|
8780
|
+
embedAnswerData?: Record<string, any>;
|
|
8781
|
+
};
|
|
8782
|
+
};
|
|
8783
|
+
[UIPassthroughEvent.GetFilters]: {
|
|
8784
|
+
request: {
|
|
8785
|
+
vizId?: string;
|
|
8786
|
+
};
|
|
8787
|
+
response: {
|
|
8788
|
+
liveboardFilters: Record<string, any>[];
|
|
8789
|
+
runtimeFilters: RuntimeFilter[];
|
|
8790
|
+
};
|
|
8791
|
+
};
|
|
8792
|
+
[UIPassthroughEvent.GetIframeUrl]: {
|
|
8793
|
+
request: Record<string, never>;
|
|
8794
|
+
response: {
|
|
8795
|
+
iframeUrl: string;
|
|
8796
|
+
};
|
|
8797
|
+
};
|
|
8798
|
+
[UIPassthroughEvent.GetParameters]: {
|
|
8799
|
+
request: Record<string, never>;
|
|
8800
|
+
response: {
|
|
8801
|
+
parameters: Record<string, any>[];
|
|
8802
|
+
};
|
|
8803
|
+
};
|
|
8804
|
+
[UIPassthroughEvent.GetTML]: {
|
|
8805
|
+
request: {
|
|
8806
|
+
vizId?: string;
|
|
8807
|
+
includeNonExecutedSearchTokens?: boolean;
|
|
8808
|
+
};
|
|
8809
|
+
response: Record<string, any>;
|
|
8810
|
+
};
|
|
8811
|
+
[UIPassthroughEvent.GetTabs]: {
|
|
8812
|
+
request: Record<string, never>;
|
|
8813
|
+
response: {
|
|
8814
|
+
orderedTabIds: string[];
|
|
8815
|
+
numberOfTabs: number;
|
|
8816
|
+
Tabs: LiveboardTab[];
|
|
8817
|
+
};
|
|
8818
|
+
};
|
|
8819
|
+
[UIPassthroughEvent.GetExportRequestForCurrentPinboard]: {
|
|
8820
|
+
request: Record<string, never>;
|
|
8821
|
+
response: {
|
|
8822
|
+
v2Content: string;
|
|
8823
|
+
};
|
|
8824
|
+
};
|
|
8028
8825
|
};
|
|
8029
8826
|
export type UIPassthroughRequest<T extends keyof UIPassthroughContractBase> = UIPassthroughContractBase[T]["request"];
|
|
8030
8827
|
export type UIPassthroughResponse<T extends keyof UIPassthroughContractBase> = UIPassthroughContractBase[T]["response"];
|
|
8031
8828
|
export type UIPassthroughArrayResponse<ApiName extends keyof UIPassthroughContractBase> = Array<{
|
|
8032
|
-
|
|
8829
|
+
refId?: string;
|
|
8033
8830
|
value?: UIPassthroughResponse<ApiName>;
|
|
8034
8831
|
error?: any;
|
|
8035
8832
|
}>;
|
|
8036
8833
|
export type EmbedApiHostEventMapping = {
|
|
8037
8834
|
[HostEvent.Pin]: UIPassthroughEvent.PinAnswerToLiveboard;
|
|
8038
8835
|
[HostEvent.SaveAnswer]: UIPassthroughEvent.SaveAnswer;
|
|
8836
|
+
[HostEvent.GetAnswerSession]: UIPassthroughEvent.GetAnswerSession;
|
|
8837
|
+
[HostEvent.GetFilters]: UIPassthroughEvent.GetFilters;
|
|
8838
|
+
[HostEvent.GetIframeUrl]: UIPassthroughEvent.GetIframeUrl;
|
|
8839
|
+
[HostEvent.GetParameters]: UIPassthroughEvent.GetParameters;
|
|
8840
|
+
[HostEvent.GetTML]: UIPassthroughEvent.GetTML;
|
|
8841
|
+
[HostEvent.GetTabs]: UIPassthroughEvent.GetTabs;
|
|
8842
|
+
[HostEvent.getExportRequestForCurrentPinboard]: UIPassthroughEvent.GetExportRequestForCurrentPinboard;
|
|
8039
8843
|
};
|
|
8040
8844
|
export type HostEventRequest<HostEventT extends HostEvent> = HostEventT extends keyof EmbedApiHostEventMapping ? UIPassthroughRequest<EmbedApiHostEventMapping[HostEventT]> : any;
|
|
8041
8845
|
export type HostEventResponse<HostEventT extends HostEvent, ContextT extends ContextType> = HostEventT extends keyof EmbedApiHostEventMapping ? UIPassthroughResponse<EmbedApiHostEventMapping[HostEventT]> : any;
|
|
@@ -8043,6 +8847,10 @@ export type TriggerPayload<PayloadT, HostEventT extends HostEvent> = PayloadT |
|
|
|
8043
8847
|
export type TriggerResponse<PayloadT, HostEventT extends HostEvent, ContextT extends ContextType> = PayloadT extends HostEventRequest<HostEventT> ? HostEventResponse<HostEventT, ContextT> : any;
|
|
8044
8848
|
class HostEventClient {
|
|
8045
8849
|
iFrame: HTMLIFrameElement;
|
|
8850
|
+
/** Host events with custom handlers
|
|
8851
|
+
* (setters or special logic) -
|
|
8852
|
+
* bound to instance for protected method access */
|
|
8853
|
+
private readonly customHandlers;
|
|
8046
8854
|
constructor(iFrame?: HTMLIFrameElement);
|
|
8047
8855
|
/**
|
|
8048
8856
|
* A wrapper over process trigger to
|
|
@@ -8053,6 +8861,12 @@ class HostEventClient {
|
|
|
8053
8861
|
protected processTrigger(message: HostEvent, data: any, context?: ContextType): Promise<any>;
|
|
8054
8862
|
handleHostEventWithParam<UIPassthroughEventT extends UIPassthroughEvent>(apiName: UIPassthroughEventT, parameters: UIPassthroughRequest<UIPassthroughEventT>, context?: ContextType): Promise<UIPassthroughResponse<UIPassthroughEventT>>;
|
|
8055
8863
|
hostEventFallback(hostEvent: HostEvent, data: any, context?: ContextType): Promise<any>;
|
|
8864
|
+
/**
|
|
8865
|
+
* For getter events that return data. Tries UI passthrough first;
|
|
8866
|
+
* if the app doesn't support it (no response data), falls back to
|
|
8867
|
+
* the legacy host event channel. Real errors are thrown as-is.
|
|
8868
|
+
*/
|
|
8869
|
+
private getDataWithPassthroughFallback;
|
|
8056
8870
|
/**
|
|
8057
8871
|
* Setter for the iframe element used for host events
|
|
8058
8872
|
* @param {HTMLIFrameElement} iFrame - the iframe element to set
|
|
@@ -8396,7 +9210,21 @@ class TsEmbed {
|
|
|
8396
9210
|
* Triggers an event to the embedded app
|
|
8397
9211
|
* @param {HostEvent} messageType The event type
|
|
8398
9212
|
* @param {any} data The payload to send with the message
|
|
9213
|
+
* @param {ContextType} context Optional context type to specify the context from which the event is triggered.
|
|
9214
|
+
* Use ContextType.Search for search answer context, ContextType.Answer for answer/explore context,
|
|
9215
|
+
* ContextType.Liveboard for liveboard context, or ContextType.Spotter for spotter context.
|
|
9216
|
+
* Available from SDK version 1.45.2 | ThoughtSpot: 26.3.0.cl
|
|
8399
9217
|
* @returns A promise that resolves with the response from the embedded app
|
|
9218
|
+
* @example
|
|
9219
|
+
* ```js
|
|
9220
|
+
* // Trigger Pin event with context (SDK: 1.45.2+)
|
|
9221
|
+
* import { HostEvent, ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
9222
|
+
* embed.trigger(HostEvent.Pin, {
|
|
9223
|
+
* vizId: "123",
|
|
9224
|
+
* liveboardId: "456"
|
|
9225
|
+
* }, ContextType.Search);
|
|
9226
|
+
* ```
|
|
9227
|
+
* @version SDK: 1.45.2 | ThoughtSpot: 26.3.0.cl (for context parameter)
|
|
8400
9228
|
*/
|
|
8401
9229
|
trigger<HostEventT extends HostEvent, PayloadT, ContextT extends ContextType>(messageType: HostEventT, data?: TriggerPayload<PayloadT, HostEventT>, context?: ContextT): Promise<TriggerResponse<PayloadT, HostEventT, ContextT>>;
|
|
8402
9230
|
/**
|
|
@@ -8417,8 +9245,33 @@ class TsEmbed {
|
|
|
8417
9245
|
getIframeSrc(): string;
|
|
8418
9246
|
protected handleRenderForPrerender(): Promise<TsEmbed>;
|
|
8419
9247
|
/**
|
|
8420
|
-
|
|
8421
|
-
|
|
9248
|
+
* Context object for the embedded component.
|
|
9249
|
+
* @returns {ContextObject} The current context object containing the page type and object ids.
|
|
9250
|
+
* @example
|
|
9251
|
+
* ```js
|
|
9252
|
+
* const context = await embed.getCurrentContext();
|
|
9253
|
+
* console.log(context);
|
|
9254
|
+
*
|
|
9255
|
+
* // Example output
|
|
9256
|
+
* {
|
|
9257
|
+
* stack: [
|
|
9258
|
+
* {
|
|
9259
|
+
* name: 'Liveboard',
|
|
9260
|
+
* type: ContextType.Liveboard,
|
|
9261
|
+
* objectIds: {
|
|
9262
|
+
* liveboardId: '123',
|
|
9263
|
+
* },
|
|
9264
|
+
* },
|
|
9265
|
+
* ],
|
|
9266
|
+
* currentContext: {
|
|
9267
|
+
* name: 'Liveboard',
|
|
9268
|
+
* type: ContextType.Liveboard,
|
|
9269
|
+
* objectIds: {
|
|
9270
|
+
* liveboardId: '123',
|
|
9271
|
+
* },
|
|
9272
|
+
* },
|
|
9273
|
+
* }
|
|
9274
|
+
* ```
|
|
8422
9275
|
* @version SDK: 1.45.2 | ThoughtSpot: 26.3.0.cl
|
|
8423
9276
|
*/
|
|
8424
9277
|
getCurrentContext(): Promise<ContextObject>;
|
|
@@ -9657,6 +10510,7 @@ export class AppEmbed extends V1Embed {
|
|
|
9657
10510
|
* @param pageId The ID of the page to be embedded.
|
|
9658
10511
|
*/
|
|
9659
10512
|
getIFrameSrc(): string;
|
|
10513
|
+
private HEIGHT_CHANAGE_THRESHOLD;
|
|
9660
10514
|
/**
|
|
9661
10515
|
* Set the iframe height as per the computed height received
|
|
9662
10516
|
* from the ThoughtSpot app.
|
|
@@ -9728,7 +10582,8 @@ export enum AuthFailureType {
|
|
|
9728
10582
|
/**
|
|
9729
10583
|
* The current authentication token or session has expired.
|
|
9730
10584
|
*
|
|
9731
|
-
* Emitted when the embed receives an auth-expiry signal and starts auth refresh
|
|
10585
|
+
* Emitted when the embed receives an auth-expiry signal and starts auth refresh
|
|
10586
|
+
* handling.
|
|
9732
10587
|
*/
|
|
9733
10588
|
EXPIRY = "EXPIRY",
|
|
9734
10589
|
/**
|
|
@@ -10498,6 +11353,7 @@ export class LiveboardEmbed extends V1Embed {
|
|
|
10498
11353
|
* to be loaded within the iFrame.
|
|
10499
11354
|
*/
|
|
10500
11355
|
private getIFrameSrc;
|
|
11356
|
+
private HEIGHT_CHANAGE_THRESHOLD;
|
|
10501
11357
|
/**
|
|
10502
11358
|
* Set the iframe height as per the computed height received
|
|
10503
11359
|
* from the ThoughtSpot app.
|