@thoughtspot/visual-embed-sdk 1.13.0 → 1.14.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.
Files changed (59) hide show
  1. package/CHANGELOG.md +7 -2
  2. package/dist/src/embed/app.d.ts +4 -3
  3. package/dist/src/embed/base.d.ts +1 -1
  4. package/dist/src/embed/liveboard.d.ts +6 -8
  5. package/dist/src/embed/pinboard.d.ts +91 -0
  6. package/dist/src/embed/search.d.ts +1 -1
  7. package/dist/src/embed/ts-embed.d.ts +4 -4
  8. package/dist/src/types.d.ts +83 -76
  9. package/dist/src/utils/authService.d.ts +1 -0
  10. package/dist/src/utils/plugin.d.ts +0 -0
  11. package/dist/src/v1/api.d.ts +19 -0
  12. package/dist/tsembed.es.js +103 -76
  13. package/dist/tsembed.js +103 -76
  14. package/lib/package.json +1 -1
  15. package/lib/src/auth.js +8 -2
  16. package/lib/src/auth.js.map +1 -1
  17. package/lib/src/auth.spec.js +18 -0
  18. package/lib/src/auth.spec.js.map +1 -1
  19. package/lib/src/embed/app.d.ts +4 -3
  20. package/lib/src/embed/app.js +2 -1
  21. package/lib/src/embed/app.js.map +1 -1
  22. package/lib/src/embed/base.d.ts +1 -1
  23. package/lib/src/embed/base.js +1 -1
  24. package/lib/src/embed/liveboard.d.ts +6 -8
  25. package/lib/src/embed/liveboard.js.map +1 -1
  26. package/lib/src/embed/pinboard.d.ts +91 -0
  27. package/lib/src/embed/pinboard.js +110 -0
  28. package/lib/src/embed/pinboard.js.map +1 -0
  29. package/lib/src/embed/search.d.ts +1 -1
  30. package/lib/src/embed/ts-embed.d.ts +4 -4
  31. package/lib/src/types.d.ts +83 -76
  32. package/lib/src/types.js +73 -68
  33. package/lib/src/types.js.map +1 -1
  34. package/lib/src/utils/authService.d.ts +1 -0
  35. package/lib/src/utils/authService.js +13 -0
  36. package/lib/src/utils/authService.js.map +1 -1
  37. package/lib/src/utils/authService.spec.js +15 -1
  38. package/lib/src/utils/authService.spec.js.map +1 -1
  39. package/lib/src/utils/plugin.d.ts +0 -0
  40. package/lib/src/utils/plugin.js +1 -0
  41. package/lib/src/utils/plugin.js.map +1 -0
  42. package/lib/src/utils/processData.js +7 -5
  43. package/lib/src/utils/processData.js.map +1 -1
  44. package/lib/src/utils/processData.spec.js +14 -0
  45. package/lib/src/utils/processData.spec.js.map +1 -1
  46. package/lib/src/visual-embed-sdk.d.ts +99 -93
  47. package/package.json +1 -1
  48. package/src/auth.spec.ts +39 -0
  49. package/src/auth.ts +11 -5
  50. package/src/embed/app.ts +4 -3
  51. package/src/embed/base.ts +1 -1
  52. package/src/embed/liveboard.ts +6 -8
  53. package/src/embed/search.ts +1 -1
  54. package/src/embed/ts-embed.ts +4 -4
  55. package/src/types.ts +83 -76
  56. package/src/utils/authService.spec.ts +21 -0
  57. package/src/utils/authService.ts +20 -0
  58. package/src/utils/processData.spec.ts +17 -0
  59. package/src/utils/processData.ts +7 -5
@@ -159,9 +159,13 @@ const getCustomisations = (embedConfig) => {
159
159
  var AuthType;
160
160
  (function (AuthType) {
161
161
  /**
162
- * No authentication. Use this only for testing purposes.
162
+ * No authentication on the SDK. Passthrough to the embedded App. Alias for `Passthrough`.
163
163
  */
164
164
  AuthType["None"] = "None";
165
+ /**
166
+ * No authentication on the SDK. Passthrough to the embedded App.
167
+ */
168
+ AuthType["Passthrough"] = "None";
165
169
  /**
166
170
  * SSO using SAML
167
171
  * @deprecated Use {@link SAML} instead
@@ -300,7 +304,7 @@ var EmbedEvent;
300
304
  /**
301
305
  * One or more data columns have been selected.
302
306
  * @return columnIds - the list of columns
303
- * @version SDK: 1.10.0 | ThoughtSpot: 8.2.0.cl
307
+ * @version SDK: 1.10.0 | ThoughtSpot: 8.2.0.cl, 8.4.1-sw
304
308
  */
305
309
  EmbedEvent["AddRemoveColumns"] = "addRemoveColumns";
306
310
  /**
@@ -312,13 +316,13 @@ var EmbedEvent;
312
316
  /**
313
317
  * A double click has been triggered on table/chart
314
318
  * @return ContextMenuInputPoints - data point that is double clicked
315
- * @version 1.5.0 or later
319
+ * @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
316
320
  */
317
321
  EmbedEvent["VizPointDoubleClick"] = "vizPointDoubleClick";
318
322
  /**
319
323
  * A click has been triggered on table/chart
320
324
  * @return ContextMenuInputPoints - data point that is clicked
321
- * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
325
+ * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
322
326
  */
323
327
  EmbedEvent["VizPointClick"] = "vizPointClick";
324
328
  /**
@@ -370,7 +374,7 @@ var EmbedEvent;
370
374
  * Emitted when the embed does not have cookie access. This
371
375
  * happens on Safari where third-party cookies are blocked by default.
372
376
  *
373
- * @version 1.1.0 or later
377
+ * @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 7.2.1
374
378
  */
375
379
  EmbedEvent["NoCookieAccess"] = "noCookieAccess";
376
380
  /**
@@ -381,179 +385,180 @@ var EmbedEvent;
381
385
  EmbedEvent["SAMLComplete"] = "samlComplete";
382
386
  /**
383
387
  * Emitted when any modal is opened in the app
384
- * @version 1.6.0 or later
388
+ * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1-sw
385
389
  */
386
390
  EmbedEvent["DialogOpen"] = "dialog-open";
387
391
  /**
388
392
  * Emitted when any modal is closed in the app
389
- * @version 1.6.0 or later
393
+ * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1-sw
390
394
  */
391
395
  EmbedEvent["DialogClose"] = "dialog-close";
392
396
  /**
393
397
  * Emitted when a liveboard has completed rendering,
394
398
  * this event can be used as a hook to trigger events on the
395
399
  * rendered liveboard
396
- * @version 1.9.1 or later
400
+ * @version SDK: 1.9.1 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw
397
401
  */
398
402
  EmbedEvent["LiveboardRendered"] = "PinboardRendered";
399
403
  /**
400
404
  * This can be used to register an event listener which
401
405
  * is triggered on all events.
402
- * @version SDK: 1.10.0 | ThoughtSpot: any
406
+ * @Version SDK: 1.10.0 | ThoughtSpot: 8.2.0.cl, 8.4.1-sw
403
407
  */
404
408
  EmbedEvent["ALL"] = "*";
405
409
  /**
406
410
  * Emitted when answer is saved in the app
407
- * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
411
+ * @Version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
408
412
  */
409
413
  EmbedEvent["Save"] = "save";
410
414
  /**
411
415
  * Emitted when the download action is triggered on an answer
412
- * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
416
+ * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
413
417
  */
414
418
  EmbedEvent["Download"] = "download";
415
419
  /**
416
420
  * Emitted when the Download as PDF action is triggered on an answer
417
- * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
421
+ * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
418
422
  */
419
423
  EmbedEvent["DownloadAsPdf"] = "downloadAsPdf";
420
424
  /**
421
425
  * Emitted when the Download as CSV action is triggered on an answer
422
- * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
426
+ * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
423
427
  */
424
428
  EmbedEvent["DownloadAsCsv"] = "downloadAsCsv";
425
429
  /**
426
430
  * Emitted when the Download as XLSX action is triggered on an answer
427
- * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
431
+ * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
428
432
  */
429
433
  EmbedEvent["DownloadAsXlsx"] = "downloadAsXlsx";
430
434
  /**
431
435
  * Emitted when an answer is deleted in the app
432
- * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
436
+ * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
433
437
  */
434
438
  EmbedEvent["AnswerDelete"] = "answerDelete";
435
439
  /**
436
440
  * Emitted when an answer is pinned to a Liveboard
437
- * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
441
+ * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
438
442
  */
439
443
  EmbedEvent["Pin"] = "pin";
440
444
  /**
441
445
  * Emitted when SpotIQ analysis is triggered
442
- * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
446
+ * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
443
447
  */
444
448
  EmbedEvent["SpotIQAnalyze"] = "spotIQAnalyze";
445
449
  /**
446
450
  * Emitted when a user shares an object with another user or group
447
- * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
451
+ * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
448
452
  */
449
453
  EmbedEvent["Share"] = "share";
450
454
  /**
451
455
  * Emitted when a user clicks the Include action to include a specific value or data on a chart or table
452
- * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
456
+ * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
453
457
  */
454
458
  EmbedEvent["DrillInclude"] = "context-menu-item-include";
455
459
  /**
456
460
  * Emitted when a user clicks the Exclude action to exclude a specific value or data on a chart or table
457
- * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
461
+ * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
458
462
  */
459
463
  EmbedEvent["DrillExclude"] = "context-menu-item-exclude";
460
464
  /**
461
465
  * Emitted when copied column value on the app
462
- * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
466
+ * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
463
467
  */
464
468
  EmbedEvent["CopyToClipboard"] = "context-menu-item-copy-to-clipboard";
465
469
  /**
466
470
  * Emitted when a user clicks the Update TML action
467
- * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
471
+ * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
468
472
  */
469
473
  EmbedEvent["UpdateTML"] = "updateTSL";
470
474
  /**
471
475
  * Emitted when a user clicks the Edit TML action
472
- * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
476
+ * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
473
477
  */
474
478
  EmbedEvent["EditTML"] = "editTSL";
475
479
  /**
476
480
  * Emitted when ExportTML trigger in answer on the app
477
- * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
481
+ * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
478
482
  */
479
483
  EmbedEvent["ExportTML"] = "exportTSL";
480
484
  /**
481
485
  * Emitted when an answer is saved as a view
482
- * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
486
+ * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
483
487
  */
484
488
  EmbedEvent["SaveAsView"] = "saveAsView";
485
489
  /**
486
490
  * Emitted when copy of existing answer on the app
487
- * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
491
+ * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
488
492
  */
489
493
  EmbedEvent["CopyAEdit"] = "copyAEdit";
490
494
  /**
491
495
  * Emitted when a user clicks Show underlying data on an answe
492
- * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
496
+ * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
493
497
  */
494
498
  EmbedEvent["ShowUnderlyingData"] = "showUnderlyingData";
495
499
  /**
496
500
  * Emitted when an answer is switched to a chart or table view
497
- * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
501
+ * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
498
502
  */
499
503
  EmbedEvent["AnswerChartSwitcher"] = "answerChartSwitcher";
500
504
  /**
501
- *
505
+ * Internal event to communicate the initial settings back to the TS APP
506
+ * @hidden
502
507
  */
503
508
  EmbedEvent["APP_INIT"] = "appInit";
504
509
  /**
505
510
  * Emitted when a user clicks Show Liveboard details on a Liveboard
506
- * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
511
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
507
512
  */
508
513
  EmbedEvent["LiveboardInfo"] = "pinboardInfo";
509
514
  /**
510
515
  * Emitted when a user clicks on the Favorite icon on a Liveboard
511
- * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
516
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
512
517
  */
513
518
  EmbedEvent["AddToFavorites"] = "addToFavorites";
514
519
  /**
515
520
  * Emitted when a user clicks Schedule on a Liveboard
516
- * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
521
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
517
522
  */
518
523
  EmbedEvent["Schedule"] = "subscription";
519
524
  /**
520
525
  * Emitted when a user clicks Edit on a Liveboard or visualization
521
- * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
526
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
522
527
  */
523
528
  EmbedEvent["Edit"] = "edit";
524
529
  /**
525
530
  * Emitted when a user clicks Make a copy on a Liveboard
526
- * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
531
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
527
532
  */
528
533
  EmbedEvent["MakeACopy"] = "makeACopy";
529
534
  /**
530
535
  * Emitted when a user clicks Present on a Liveboard or visualization
531
- * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
536
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
532
537
  */
533
538
  EmbedEvent["Present"] = "present";
534
539
  /**
535
540
  * Emitted when a user clicks Delete on a Liveboard
536
- * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
541
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
537
542
  */
538
543
  EmbedEvent["Delete"] = "delete";
539
544
  /**
540
545
  * Emitted when a user clicks Manage schedules on a Liveboard
541
- * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
546
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
542
547
  */
543
548
  EmbedEvent["SchedulesList"] = "schedule-list";
544
549
  /**
545
550
  * Emitted when a user clicks Cancel in edit mode on a Liveboard
546
- * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
551
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
547
552
  */
548
553
  EmbedEvent["Cancel"] = "cancel";
549
554
  /**
550
555
  * Emitted when a user clicks Explore on a visualization
551
- * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
556
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
552
557
  */
553
558
  EmbedEvent["Explore"] = "explore";
554
559
  /**
555
560
  * Emitted when a user clicks Copy link action on a visualization
556
- * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
561
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
557
562
  */
558
563
  EmbedEvent["CopyLink"] = "embedDocument";
559
564
  })(EmbedEvent || (EmbedEvent = {}));
@@ -578,8 +583,8 @@ var HostEvent;
578
583
  * @param points - an object containing selectedPoints/clickedPoints
579
584
  * eg. { selectedPoints: []}
580
585
  * @param columnGuid - a string guid of the column to drill by. This is optional,
581
- * if not provided it will auto drill by the configured column. \
582
- * @version 1.5.0 or later
586
+ * if not provided it will auto drill by the configured column.
587
+ * @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
583
588
  */
584
589
  HostEvent["DrillDown"] = "triggerDrillDown";
585
590
  /**
@@ -596,97 +601,97 @@ var HostEvent;
596
601
  * Set the visible visualizations on a Liveboard.
597
602
  * @param - an array of ids of visualizations to show, the ids not passed
598
603
  * will be hidden.
599
- * @version 1.6.0 or later
604
+ * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1-sw
600
605
  */
601
606
  HostEvent["SetVisibleVizs"] = "SetPinboardVisibleVizs";
602
607
  /**
603
608
  * Update the runtime filters. The runtime filters passed here are extended
604
609
  * on to the existing runtime filters if they exist.
605
610
  * @param - {@link RuntimeFilter}[] an array of {@link RuntimeFilter} Types.
606
- * @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl
611
+ * @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw
607
612
  */
608
613
  HostEvent["UpdateRuntimeFilters"] = "UpdateRuntimeFilters";
609
614
  /**
610
615
  * Navigate to a specific page in App embed without any reload.
611
616
  * This is the same as calling `appEmbed.navigateToPage(path, true)`
612
617
  * @param path - the path to navigate to (can be a number[1/-1] to go forward/back)
613
- * @version SDK: 1.12.0 | ThoughtSpot: 8.4.0.cl
618
+ * @version SDK: 1.12.0 | ThoughtSpot 8.4.0.cl, 8.4.1-sw
614
619
  */
615
620
  HostEvent["Navigate"] = "Navigate";
616
621
  /**
617
622
  * Gets the current pinboard content.
618
- * @version SDK: 1.13.0 | ThoughtSpot: 8.5.0.cl
623
+ * @version SDK: 1.13.0 | ThoughtSpot: 8.5.0.cl, 8.8.1-sw
619
624
  */
620
625
  HostEvent["getExportRequestForCurrentPinboard"] = "getExportRequestForCurrentPinboard";
621
626
  /**
622
627
  * Triggers the Pin action on an embedded object
623
628
  * @param - incase of Liveboard embed, takes in an object with vizId as a key
624
629
  * can be left empty for search and visualization embeds
625
- * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
630
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
626
631
  */
627
632
  HostEvent["Pin"] = "pin";
628
633
  /**
629
634
  * Triggers the Show Liveboard details action on a Liveboard
630
- * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
635
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
631
636
  */
632
637
  HostEvent["LiveboardInfo"] = "pinboardInfo";
633
638
  /**
634
639
  * Triggers the Schedule action on a Liveboard
635
- * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
640
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
636
641
  */
637
642
  HostEvent["Schedule"] = "subscription";
638
643
  /**
639
644
  * Triggers the Manage schedule action on a Liveboard
640
- * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
645
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
641
646
  */
642
647
  HostEvent["SchedulesList"] = "schedule-list";
643
648
  /**
644
649
  * Triggers the Export TML action on a Liveboard
645
- * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
650
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
646
651
  */
647
652
  HostEvent["ExportTML"] = "exportTSL";
648
653
  /**
649
654
  * Triggers the Edit TML action on a Liveboard
650
- * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
655
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
651
656
  */
652
657
  HostEvent["EditTML"] = "editTSL";
653
658
  /**
654
659
  * Triggers the Update TML action on a Liveboard
655
- * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
660
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
656
661
  */
657
662
  HostEvent["UpdateTML"] = "updateTSL";
658
663
  /**
659
664
  * Triggers the Download PDF action on a Liveboard
660
- * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
665
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
661
666
  */
662
667
  HostEvent["DownloadAsPdf"] = "downloadAsPdf";
663
668
  /**
664
669
  * Triggers the Make a copy action on a Liveboard
665
- * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
670
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
666
671
  */
667
672
  HostEvent["MakeACopy"] = "makeACopy";
668
673
  /**
669
674
  * Triggers the Delete action on a Liveboard
670
- * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
675
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
671
676
  */
672
677
  HostEvent["Remove"] = "delete";
673
678
  /**
674
679
  * Triggers the Explore action on a visualization
675
680
  * @param - an object with vizId as a key
676
681
  * eg: {vizId: '730496d6-6903-4601-937e-2c691821af3c'}
677
- * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
682
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
678
683
  */
679
684
  HostEvent["Explore"] = "explore";
680
685
  /**
681
686
  * Triggers the Create alert action on a visualization
682
687
  * @param - an object with vizId as a key
683
- * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
688
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
684
689
  */
685
690
  HostEvent["CreateMonitor"] = "createMonitor";
686
691
  /**
687
692
  * Triggers the Manage alert action on a visualization
688
693
  * @param - an object with vizId as a key
689
- * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
694
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
690
695
  */
691
696
  HostEvent["ManageMonitor"] = "manageMonitor";
692
697
  /**
@@ -696,7 +701,7 @@ var HostEvent;
696
701
  * liveboardEmbed.trigger(HostEvent.Edit)
697
702
  * liveboardEmbed.trigger(HostEvent.Edit, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
698
703
  * vizEmbed.trigger((HostEvent.Edit)
699
- * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
704
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
700
705
  */
701
706
  HostEvent["Edit"] = "edit";
702
707
  /**
@@ -706,7 +711,7 @@ var HostEvent;
706
711
  * liveboardEmbed.trigger(HostEvent.CopyLink)
707
712
  * liveboardEmbed.trigger(HostEvent.CopyLink, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
708
713
  * vizEmbed.trigger((HostEvent.CopyLink)
709
- * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
714
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
710
715
  */
711
716
  HostEvent["CopyLink"] = "embedDocument";
712
717
  /**
@@ -716,7 +721,7 @@ var HostEvent;
716
721
  * liveboardEmbed.trigger(HostEvent.Present)
717
722
  * liveboardEmbed.trigger(HostEvent.Present, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
718
723
  * vizEmbed.trigger((HostEvent.Present)
719
- * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
724
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
720
725
  */
721
726
  HostEvent["Present"] = "present";
722
727
  })(HostEvent || (HostEvent = {}));
@@ -902,27 +907,27 @@ var Action;
902
907
  Action["RequestAccess"] = "requestAccess";
903
908
  Action["QueryDetailsButtons"] = "queryDetailsButtons";
904
909
  /**
905
- * @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl
910
+ * @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw
906
911
  */
907
912
  Action["AnswerDelete"] = "onDeleteAnswer";
908
913
  /**
909
- * @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl
914
+ * @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw
910
915
  */
911
916
  Action["AnswerChartSwitcher"] = "answerChartSwitcher";
912
917
  /**
913
- * @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl
918
+ * @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw
914
919
  */
915
920
  Action["AddToFavorites"] = "addToFavorites";
916
921
  /**
917
- * @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl
922
+ * @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw
918
923
  */
919
924
  Action["EditDetails"] = "editDetails";
920
925
  /**
921
- * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
926
+ * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
922
927
  */
923
928
  Action["CreateMonitor"] = "createMonitor";
924
929
  /**
925
- * @version SDK: 1.11.1 | ThoughtSpot: 8.3.0.cl
930
+ * @version SDK: 1.11.1 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
926
931
  */
927
932
  Action["ReportError"] = "reportError";
928
933
  })(Action || (Action = {}));
@@ -7398,6 +7403,19 @@ async function fetchAuthService(thoughtSpotHost, username, authToken) {
7398
7403
  redirect: 'manual',
7399
7404
  });
7400
7405
  }
7406
+ async function fetchAuthPostService(thoughtSpotHost, username, authToken) {
7407
+ return failureLoggedFetch(`${thoughtSpotHost}${EndPoints.TOKEN_LOGIN}`, {
7408
+ method: 'POST',
7409
+ headers: {
7410
+ 'content-type': 'application/x-www-form-urlencoded',
7411
+ 'x-requested-by': 'ThoughtSpot',
7412
+ },
7413
+ body: `username=${encodeURIComponent(username)}&auth_token=${encodeURIComponent(authToken)}`,
7414
+ credentials: 'include',
7415
+ // We do not want to follow the redirect, as it starts giving a CORS error
7416
+ redirect: 'manual',
7417
+ });
7418
+ }
7401
7419
  async function fetchBasicAuthService(thoughtSpotHost, username, password) {
7402
7420
  return failureLoggedFetch(`${thoughtSpotHost}${EndPoints.BASIC_LOGIN}`, {
7403
7421
  method: 'POST',
@@ -7536,7 +7554,13 @@ const doTokenAuth = async (embedConfig) => {
7536
7554
  const response = await fetchAuthTokenService(authEndpoint);
7537
7555
  authToken = await response.text();
7538
7556
  }
7539
- const resp = await fetchAuthService(thoughtSpotHost, username, authToken);
7557
+ let resp;
7558
+ try {
7559
+ resp = await fetchAuthPostService(thoughtSpotHost, username, authToken);
7560
+ }
7561
+ catch (e) {
7562
+ resp = await fetchAuthService(thoughtSpotHost, username, authToken);
7563
+ }
7540
7564
  // token login issues a 302 when successful
7541
7565
  loggedInStatus = resp.ok || resp.type === 'opaqueredirect';
7542
7566
  if (loggedInStatus && embedConfig.detectCookieAccessSlow) {
@@ -7788,7 +7812,7 @@ function disableAutoLogin() {
7788
7812
  *
7789
7813
  * @param doNotDisableAutoLogin This flag when passed will not disable autoLogin
7790
7814
  * @returns Promise which resolves when logout completes.
7791
- * @version SDK: 1.10.1 | ThoughtSpot: *
7815
+ * @version SDK: 1.10.1 | ThoughtSpot: 8.2.0.cl, 8.4.1-sw
7792
7816
  */
7793
7817
  const logout$1 = (doNotDisableAutoLogin = false) => {
7794
7818
  if (!doNotDisableAutoLogin) {
@@ -7912,10 +7936,12 @@ function processNoCookieAccess(e, containerEl) {
7912
7936
  return e;
7913
7937
  }
7914
7938
  function processAuthFailure(e, containerEl) {
7915
- const { loginFailedMessage } = getEmbedConfig();
7916
- // eslint-disable-next-line no-param-reassign
7917
- containerEl.innerHTML = loginFailedMessage;
7918
- notifyAuthFailure(AuthFailureType.OTHER);
7939
+ const { loginFailedMessage, authType } = getEmbedConfig();
7940
+ if (authType !== AuthType.None) {
7941
+ // eslint-disable-next-line no-param-reassign
7942
+ containerEl.innerHTML = loginFailedMessage;
7943
+ notifyAuthFailure(AuthFailureType.OTHER);
7944
+ }
7919
7945
  return e;
7920
7946
  }
7921
7947
  function processAuthLogout(e, containerEl) {
@@ -7987,7 +8013,7 @@ function processTrigger(iFrame, messageType, thoughtSpotHost, data) {
7987
8013
  });
7988
8014
  }
7989
8015
 
7990
- var name="@thoughtspot/visual-embed-sdk";var version="1.13.0";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/**"];var exports={".":"./lib/src/index.js","./react":"./lib/src/react/index.js"};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p . --incremental false",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":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts",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","test-docs":"jest -c jest.config.docs.js",test:"npm run test-sdk && npm run test-docs && npx istanbul-merge --out ./coverage/coverage.json ./coverage/docs/coverage-final.json ./coverage/sdk/coverage-final.json && npx istanbul report --include ./coverage/coverage.json --dir ./coverage lcov",posttest:"cat ./coverage/sdk/lcov.info | coveralls",prepublishOnly:"npm run test; npm run tsc; npm run bundle-dts; npm run build","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",eventemitter3:"^4.0.7","html-react-parser":"^1.4.12","mixpanel-browser":"^2.45.0","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","@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","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.1.0","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":"4.1.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-puppeteer":"^4.4.0",jsdom:"^17.0.0","node-sass":"^4.0.0",prettier:"2.1.2",puppeteer:"^7.0.1",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-neo-theme":"^1.1.0","typedoc-plugin-toc-group":"0.0.5",typescript:"^4.1.0","url-search-params-polyfill":"^8.1.0",util:"^0.12.4"};var author="ThoughtSpot";var email="support@thoughtspot.com";var license="ThoughtSpot Development Tools End User License Agreement";var directories={lib:"lib"};var repository={type:"git",url:"git+https://github.com/thoughtspot/visual-embed-sdk.git"};var publishConfig={registry:"https://registry.npmjs.org"};var keywords=["thoughtspot","everywhere","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version,description:description,module:module,main:main,types:types,files:files,exports:exports,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};
8016
+ var name="@thoughtspot/visual-embed-sdk";var version="1.14.1";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**"];var exports={".":"./lib/src/index.js","./react":"./lib/src/react/index.js"};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p . --incremental false",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":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts",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","test-docs":"jest -c jest.config.docs.js",test:"npm run test-sdk && npm run test-docs && npx istanbul-merge --out ./coverage/coverage.json ./coverage/docs/coverage-final.json ./coverage/sdk/coverage-final.json && npx istanbul report --include ./coverage/coverage.json --dir ./coverage lcov",posttest:"cat ./coverage/sdk/lcov.info | coveralls",prepublishOnly:"npm run test; npm run tsc; npm run bundle-dts; npm run build","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",eventemitter3:"^4.0.7","html-react-parser":"^1.4.12","mixpanel-browser":"^2.45.0","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","@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","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.1.0","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":"4.1.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-puppeteer":"^4.4.0",jsdom:"^17.0.0","node-sass":"^4.0.0",prettier:"2.1.2",puppeteer:"^7.0.1",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-neo-theme":"^1.1.0","typedoc-plugin-toc-group":"0.0.5",typescript:"^4.1.0","url-search-params-polyfill":"^8.1.0",util:"^0.12.4"};var author="ThoughtSpot";var email="support@thoughtspot.com";var license="ThoughtSpot Development Tools End User License Agreement";var directories={lib:"lib"};var repository={type:"git",url:"git+https://github.com/thoughtspot/visual-embed-sdk.git"};var publishConfig={registry:"https://registry.npmjs.org"};var keywords=["thoughtspot","everywhere","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version,description:description,module:module,main:main,types:types,files:files,exports:exports,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};
7991
8017
 
7992
8018
  /**
7993
8019
  * Copyright (c) 2022
@@ -8626,7 +8652,8 @@ class AppEmbed extends V1Embed {
8626
8652
  * @param path string | number The string, set to iframe src and navigate to new page
8627
8653
  * eg: appEmbed.navigateToPage('pinboards')
8628
8654
  * When used with `noReload` this can also be a number like 1/-1 to go forward/back.
8629
- * @param noReload boolean Trigger the navigation without reloading the page (version: 1.12.0 | 8.4.0.cl)
8655
+ * @param noReload boolean Trigger the navigation without reloading the page
8656
+ * @version SDK: 1.12.0 | ThoughtSpot: 8.4.0.cl, 8.4.1-sw
8630
8657
  */
8631
8658
  navigateToPage(path, noReload = false) {
8632
8659
  if (!this.iFrame) {