@thoughtspot/visual-embed-sdk 1.32.0 → 1.32.2
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 +4 -22
- package/cjs/src/auth.d.ts.map +1 -1
- package/cjs/src/auth.js +6 -5
- package/cjs/src/auth.js.map +1 -1
- package/cjs/src/authToken.d.ts.map +1 -1
- package/cjs/src/authToken.js +5 -7
- package/cjs/src/authToken.js.map +1 -1
- package/cjs/src/css-variables.d.ts +28 -0
- package/cjs/src/css-variables.d.ts.map +1 -1
- package/cjs/src/embed/app.d.ts +16 -14
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +19 -4
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/app.spec.js +32 -0
- 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 +2 -0
- package/cjs/src/embed/base.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +2 -1
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/liveboard.spec.js +10 -0
- package/cjs/src/embed/liveboard.spec.js.map +1 -1
- package/cjs/src/embed/search.d.ts +14 -13
- package/cjs/src/embed/search.d.ts.map +1 -1
- package/cjs/src/embed/search.js +6 -4
- package/cjs/src/embed/search.js.map +1 -1
- package/cjs/src/embed/search.spec.js +9 -9
- package/cjs/src/embed/search.spec.js.map +1 -1
- package/cjs/src/embed/ts-embed.d.ts +1 -1
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +10 -6
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/errors.d.ts +11 -0
- package/cjs/src/errors.d.ts.map +1 -1
- package/cjs/src/errors.js +11 -0
- package/cjs/src/errors.js.map +1 -1
- package/cjs/src/mixpanel-service.d.ts +4 -0
- package/cjs/src/mixpanel-service.d.ts.map +1 -1
- package/cjs/src/mixpanel-service.js +6 -1
- package/cjs/src/mixpanel-service.js.map +1 -1
- package/cjs/src/react/index.spec.js +1 -1
- package/cjs/src/react/index.spec.js.map +1 -1
- package/cjs/src/types.d.ts +178 -6
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +138 -3
- package/cjs/src/types.js.map +1 -1
- package/cjs/src/utils/processData.d.ts.map +1 -1
- package/cjs/src/utils/processData.js +2 -1
- package/cjs/src/utils/processData.js.map +1 -1
- package/cjs/src/utils/reporting.d.ts +16 -0
- package/cjs/src/utils/reporting.d.ts.map +1 -0
- package/cjs/src/utils/reporting.js +68 -0
- package/cjs/src/utils/reporting.js.map +1 -0
- package/cjs/src/utils/reporting.spec.d.ts +2 -0
- package/cjs/src/utils/reporting.spec.d.ts.map +1 -0
- package/cjs/src/utils/reporting.spec.js +76 -0
- package/cjs/src/utils/reporting.spec.js.map +1 -0
- 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 +28 -0
- package/dist/src/css-variables.d.ts.map +1 -1
- package/dist/src/embed/app.d.ts +16 -14
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/base.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/embed/search.d.ts +14 -13
- package/dist/src/embed/search.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.d.ts +1 -1
- package/dist/src/embed/ts-embed.d.ts.map +1 -1
- package/dist/src/errors.d.ts +11 -0
- package/dist/src/errors.d.ts.map +1 -1
- package/dist/src/mixpanel-service.d.ts +4 -0
- package/dist/src/mixpanel-service.d.ts.map +1 -1
- package/dist/src/types.d.ts +178 -6
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/processData.d.ts.map +1 -1
- package/dist/src/utils/reporting.d.ts +16 -0
- package/dist/src/utils/reporting.d.ts.map +1 -0
- package/dist/src/utils/reporting.spec.d.ts +2 -0
- package/dist/src/utils/reporting.spec.d.ts.map +1 -0
- package/dist/tsembed-react.es.js +214 -39
- package/dist/tsembed-react.js +214 -39
- package/dist/tsembed.es.js +261 -40
- package/dist/tsembed.js +261 -40
- package/dist/visual-embed-sdk-react-full.d.ts +241 -34
- package/dist/visual-embed-sdk-react.d.ts +241 -34
- package/dist/visual-embed-sdk.d.ts +241 -34
- package/lib/package.json +4 -22
- package/lib/src/auth.d.ts.map +1 -1
- package/lib/src/auth.js +6 -5
- package/lib/src/auth.js.map +1 -1
- package/lib/src/authToken.d.ts.map +1 -1
- package/lib/src/authToken.js +5 -7
- package/lib/src/authToken.js.map +1 -1
- package/lib/src/css-variables.d.ts +28 -0
- package/lib/src/css-variables.d.ts.map +1 -1
- package/lib/src/embed/app.d.ts +16 -14
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +18 -3
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/app.spec.js +33 -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 +2 -0
- package/lib/src/embed/base.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +2 -1
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +10 -0
- package/lib/src/embed/liveboard.spec.js.map +1 -1
- package/lib/src/embed/search.d.ts +14 -13
- package/lib/src/embed/search.d.ts.map +1 -1
- package/lib/src/embed/search.js +6 -4
- package/lib/src/embed/search.js.map +1 -1
- package/lib/src/embed/search.spec.js +9 -9
- package/lib/src/embed/search.spec.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts +1 -1
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +10 -6
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/errors.d.ts +11 -0
- package/lib/src/errors.d.ts.map +1 -1
- package/lib/src/errors.js +11 -0
- package/lib/src/errors.js.map +1 -1
- package/lib/src/mixpanel-service.d.ts +4 -0
- package/lib/src/mixpanel-service.d.ts.map +1 -1
- package/lib/src/mixpanel-service.js +6 -1
- package/lib/src/mixpanel-service.js.map +1 -1
- package/lib/src/react/index.spec.js +1 -1
- package/lib/src/react/index.spec.js.map +1 -1
- package/lib/src/types.d.ts +178 -6
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +138 -3
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils/processData.d.ts.map +1 -1
- package/lib/src/utils/processData.js +2 -1
- package/lib/src/utils/processData.js.map +1 -1
- package/lib/src/utils/reporting.d.ts +16 -0
- package/lib/src/utils/reporting.d.ts.map +1 -0
- package/lib/src/utils/reporting.js +62 -0
- package/lib/src/utils/reporting.js.map +1 -0
- package/lib/src/utils/reporting.spec.d.ts +2 -0
- package/lib/src/utils/reporting.spec.d.ts.map +1 -0
- package/lib/src/utils/reporting.spec.js +74 -0
- package/lib/src/utils/reporting.spec.js.map +1 -0
- package/lib/src/visual-embed-sdk.d.ts +241 -34
- package/package.json +4 -22
- package/src/auth.ts +6 -5
- package/src/authToken.ts +5 -9
- package/src/css-variables.ts +28 -0
- package/src/embed/app.spec.ts +48 -0
- package/src/embed/app.ts +25 -15
- package/src/embed/base.ts +3 -1
- package/src/embed/liveboard.spec.ts +14 -0
- package/src/embed/liveboard.ts +2 -0
- package/src/embed/search.spec.ts +9 -9
- package/src/embed/search.ts +20 -16
- package/src/embed/ts-embed.ts +13 -6
- package/src/errors.ts +11 -0
- package/src/mixpanel-service.ts +6 -1
- package/src/react/index.spec.tsx +1 -1
- package/src/types.ts +192 -13
- package/src/utils/processData.ts +2 -3
- package/src/utils/reporting.spec.ts +91 -0
- package/src/utils/reporting.ts +71 -0
package/dist/tsembed-react.es.js
CHANGED
|
@@ -624,6 +624,10 @@ var HomeLeftNavItem;
|
|
|
624
624
|
* @version SDK: 1.28.0| ThoughtSpot: 9.12.5.cl
|
|
625
625
|
*/
|
|
626
626
|
HomeLeftNavItem["SpotIQAnalysis"] = "spotiq-analysis";
|
|
627
|
+
/**
|
|
628
|
+
* @version SDK: 1.34.0| ThoughtSpot: 10.3.0.cl
|
|
629
|
+
*/
|
|
630
|
+
HomeLeftNavItem["LiveboardSchedules"] = "liveboard-schedules";
|
|
627
631
|
})(HomeLeftNavItem || (HomeLeftNavItem = {}));
|
|
628
632
|
/**
|
|
629
633
|
* A map of the supported runtime filter operations
|
|
@@ -2014,13 +2018,15 @@ var HostEvent;
|
|
|
2014
2018
|
*
|
|
2015
2019
|
* @example
|
|
2016
2020
|
* ```js
|
|
2017
|
-
*
|
|
2021
|
+
* searchEmbed.trigger(HostEvent.CreateMonitor)
|
|
2018
2022
|
* ```
|
|
2019
2023
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2020
2024
|
*/
|
|
2021
2025
|
HostEvent["CreateMonitor"] = "createMonitor";
|
|
2022
2026
|
/**
|
|
2023
|
-
* Trigger the **Manage alerts** action on a
|
|
2027
|
+
* Trigger the **Manage alerts** action on a KPI chart
|
|
2028
|
+
* in a visualization or saved Answer.
|
|
2029
|
+
*
|
|
2024
2030
|
* @param - an object with `vizId` as a key
|
|
2025
2031
|
* @example
|
|
2026
2032
|
* ```js
|
|
@@ -2028,6 +2034,16 @@ var HostEvent;
|
|
|
2028
2034
|
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
2029
2035
|
* })
|
|
2030
2036
|
* ```
|
|
2037
|
+
*
|
|
2038
|
+
* @example
|
|
2039
|
+
* ```js
|
|
2040
|
+
* searchEmbed.trigger(HostEvent.ManageMonitor)
|
|
2041
|
+
* ```
|
|
2042
|
+
*
|
|
2043
|
+
* @example
|
|
2044
|
+
* ```js
|
|
2045
|
+
* vizEmbed.trigger(HostEvent.ManageMonitor)
|
|
2046
|
+
* ```
|
|
2031
2047
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2032
2048
|
*/
|
|
2033
2049
|
HostEvent["ManageMonitor"] = "manageMonitor";
|
|
@@ -2605,6 +2621,8 @@ var Param;
|
|
|
2605
2621
|
Param["IsFullAppEmbed"] = "isFullAppEmbed";
|
|
2606
2622
|
Param["IsOnBeforeGetVizDataInterceptEnabled"] = "isOnBeforeGetVizDataInterceptEnabled";
|
|
2607
2623
|
Param["FocusSearchBarOnRender"] = "focusSearchBarOnRender";
|
|
2624
|
+
Param["DisableRedirectionLinksInNewTab"] = "disableRedirectionLinksInNewTab";
|
|
2625
|
+
Param["HomePageSearchBarMode"] = "homePageSearchBarMode";
|
|
2608
2626
|
})(Param || (Param = {}));
|
|
2609
2627
|
/**
|
|
2610
2628
|
* ThoughtSpot application pages include actions and menu commands
|
|
@@ -2755,6 +2773,7 @@ var Action;
|
|
|
2755
2773
|
*/
|
|
2756
2774
|
Action["ConfigureFilter"] = "configureFilter";
|
|
2757
2775
|
Action["CollapseDataSources"] = "collapseDataSources";
|
|
2776
|
+
Action["CollapseDataPanel"] = "collapseDataPanel";
|
|
2758
2777
|
/**
|
|
2759
2778
|
* The **Choose sources** button on Search page.
|
|
2760
2779
|
* Allows selecting data sources for search queries.
|
|
@@ -3150,12 +3169,15 @@ var Action;
|
|
|
3150
3169
|
* The Create alert action on KPI charts.
|
|
3151
3170
|
* @example
|
|
3152
3171
|
* ```js
|
|
3153
|
-
* disabledActions: [Action.CreateMonitor
|
|
3172
|
+
* disabledActions: [Action.CreateMonitor]
|
|
3154
3173
|
* ```
|
|
3155
3174
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
3156
3175
|
*/
|
|
3157
3176
|
Action["CreateMonitor"] = "createMonitor";
|
|
3158
3177
|
/**
|
|
3178
|
+
* @deprecated
|
|
3179
|
+
* Reports errors
|
|
3180
|
+
*
|
|
3159
3181
|
* @example
|
|
3160
3182
|
* ```js
|
|
3161
3183
|
* disabledActions: [Action.ReportError]
|
|
@@ -3380,35 +3402,84 @@ var Action;
|
|
|
3380
3402
|
*/
|
|
3381
3403
|
Action["RenameModalTitleDescription"] = "renameModalTitleDescription";
|
|
3382
3404
|
/**
|
|
3405
|
+
*
|
|
3406
|
+
* @example
|
|
3407
|
+
* ```js
|
|
3408
|
+
* disabledActions: [Action.RequestVerification]
|
|
3409
|
+
* ```
|
|
3383
3410
|
*
|
|
3384
3411
|
* @version SDK: 1.25.0 | Thoughtspot: 9.6.0.cl
|
|
3385
3412
|
*/
|
|
3386
3413
|
Action["RequestVerification"] = "requestVerification";
|
|
3387
3414
|
/**
|
|
3415
|
+
*
|
|
3416
|
+
* Allows users to mark a Liveboard as verified.
|
|
3417
|
+
*
|
|
3418
|
+
* @example
|
|
3419
|
+
* ```js
|
|
3420
|
+
* disabledActions: [Action.MarkAsVerified]
|
|
3421
|
+
* ```
|
|
3388
3422
|
* @version SDK: 1.25.0 | Thoughtspot: 9.6.0.cl
|
|
3389
3423
|
*/
|
|
3390
3424
|
Action["MarkAsVerified"] = "markAsVerified";
|
|
3391
3425
|
/**
|
|
3426
|
+
* The **Add Tab** action on a Liveboard.
|
|
3427
|
+
* Allows adding a new tab to a Liveboard view.
|
|
3428
|
+
*
|
|
3429
|
+
* @example
|
|
3430
|
+
* ```js
|
|
3431
|
+
* disabledActions: [Action.AddTab]
|
|
3432
|
+
* ```
|
|
3392
3433
|
* @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
|
|
3393
3434
|
*/
|
|
3394
3435
|
Action["AddTab"] = "addTab";
|
|
3395
3436
|
/**
|
|
3437
|
+
*
|
|
3438
|
+
* Initiates contextual change analysis on KPI charts.
|
|
3439
|
+
*
|
|
3440
|
+
* @example
|
|
3441
|
+
* ```js
|
|
3442
|
+
* disabledActions: [Action.EnableContextualChangeAnalysis]
|
|
3443
|
+
* ```
|
|
3396
3444
|
* @version SDK: 1.25.0 | Thoughtspot: 9.6.0.cl
|
|
3397
3445
|
*/
|
|
3398
3446
|
Action["EnableContextualChangeAnalysis"] = "enableContextualChangeAnalysis";
|
|
3399
3447
|
/**
|
|
3448
|
+
*
|
|
3449
|
+
* @example
|
|
3450
|
+
* ```js
|
|
3451
|
+
* disabledActions: [Action.ShowSageQuery]
|
|
3452
|
+
* ```
|
|
3453
|
+
*
|
|
3400
3454
|
* @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
|
|
3401
3455
|
*/
|
|
3402
3456
|
Action["ShowSageQuery"] = "showSageQuery";
|
|
3403
3457
|
/**
|
|
3458
|
+
*
|
|
3459
|
+
* @example
|
|
3460
|
+
* ```js
|
|
3461
|
+
* disabledActions: [Action.EditSageAnswer]
|
|
3462
|
+
* ```
|
|
3404
3463
|
* @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
|
|
3405
3464
|
*/
|
|
3406
3465
|
Action["EditSageAnswer"] = "editSageAnswer";
|
|
3407
3466
|
/**
|
|
3467
|
+
*
|
|
3468
|
+
* This action allows users to send feedback on AI-generated Answers.
|
|
3469
|
+
*
|
|
3470
|
+
* @example
|
|
3471
|
+
* ```js
|
|
3472
|
+
* disabledActions: [Action.SageAnswerFeedback]
|
|
3473
|
+
* ```
|
|
3408
3474
|
* @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
|
|
3409
3475
|
*/
|
|
3410
3476
|
Action["SageAnswerFeedback"] = "sageAnswerFeedback";
|
|
3411
3477
|
/**
|
|
3478
|
+
*
|
|
3479
|
+
* @example
|
|
3480
|
+
* ```js
|
|
3481
|
+
* disabledActions: [Action.ModifySageAnswer]
|
|
3482
|
+
* ```
|
|
3412
3483
|
* @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
|
|
3413
3484
|
*/
|
|
3414
3485
|
Action["ModifySageAnswer"] = "modifySageAnswer";
|
|
@@ -3530,6 +3601,70 @@ var Action;
|
|
|
3530
3601
|
* @version SDK: 1.27.10 | Thoughtspot: 9.12.5.cl
|
|
3531
3602
|
*/
|
|
3532
3603
|
Action["AIHighlights"] = "AIHighlights";
|
|
3604
|
+
/**
|
|
3605
|
+
* Action ID for edit schedule action on schedule on homepage
|
|
3606
|
+
* @example
|
|
3607
|
+
* ```js
|
|
3608
|
+
* disabledActions: [Action.EditScheduleHomepage]
|
|
3609
|
+
* ```
|
|
3610
|
+
* @version SDK: 1.34.0 | Thoughtspot: 10.3.0.cl
|
|
3611
|
+
*/
|
|
3612
|
+
Action["EditScheduleHomepage"] = "editScheduleHomepage";
|
|
3613
|
+
/**
|
|
3614
|
+
* Action ID for pause schedule action on schedule on homepage
|
|
3615
|
+
* @example
|
|
3616
|
+
* ```js
|
|
3617
|
+
* disabledActions: [Action.PauseScheduleHomepage]
|
|
3618
|
+
* ```
|
|
3619
|
+
* @version SDK: 1.34.0 | Thoughtspot: 10.3.0.cl
|
|
3620
|
+
*/
|
|
3621
|
+
Action["PauseScheduleHomepage"] = "pauseScheduleHomepage";
|
|
3622
|
+
/**
|
|
3623
|
+
* Action ID for view schedule run action on schedule on homepage
|
|
3624
|
+
* @example
|
|
3625
|
+
* ```js
|
|
3626
|
+
* disabledActions: [Action.ViewScheduleRunHomepage]
|
|
3627
|
+
* ```
|
|
3628
|
+
* @version SDK: 1.34.0 | Thoughtspot: 10.3.0.cl
|
|
3629
|
+
*/
|
|
3630
|
+
Action["ViewScheduleRunHomepage"] = "viewScheduleRunHomepage";
|
|
3631
|
+
/**
|
|
3632
|
+
* Action ID for unsubscribe schedule action on schedule on homepage
|
|
3633
|
+
* @example
|
|
3634
|
+
* ```js
|
|
3635
|
+
* disabledActions: [Action.UnsubscribeScheduleHomepage]
|
|
3636
|
+
* ```
|
|
3637
|
+
* @version SDK: 1.34.0 | Thoughtspot: 10.3.0.cl
|
|
3638
|
+
*/
|
|
3639
|
+
Action["UnsubscribeScheduleHomepage"] = "unsubscribeScheduleHomepage";
|
|
3640
|
+
/**
|
|
3641
|
+
* The **Manage Tags** action on Homepage Favourite Module.
|
|
3642
|
+
*
|
|
3643
|
+
* @example
|
|
3644
|
+
* ```js
|
|
3645
|
+
* disabledActions: [Action.ManageTags]
|
|
3646
|
+
* ```
|
|
3647
|
+
* @version SDK : 1.34.0 | Thoughtspot: 10.3.0.cl
|
|
3648
|
+
*/
|
|
3649
|
+
Action["ManageTags"] = "manageTags";
|
|
3650
|
+
/**
|
|
3651
|
+
* Action ID for delete schedule action on schedule on homepage
|
|
3652
|
+
* @example
|
|
3653
|
+
* ```js
|
|
3654
|
+
* disabledActions: [Action.DeleteScheduleHomepage]
|
|
3655
|
+
* ```
|
|
3656
|
+
* @version SDK: 1.34.0 | Thoughtspot: 10.3.0.cl
|
|
3657
|
+
*/
|
|
3658
|
+
Action["DeleteScheduleHomepage"] = "deleteScheduleHomepage";
|
|
3659
|
+
/**
|
|
3660
|
+
* The **Analyze CTA** action on KPI chart.
|
|
3661
|
+
* @example
|
|
3662
|
+
* ```js
|
|
3663
|
+
* disabledActions: [Action.KPIAnalysisCTA]
|
|
3664
|
+
* ```
|
|
3665
|
+
* @version SDK: 1.34.0 | Thoughtspot: 10.3.0.cl
|
|
3666
|
+
*/
|
|
3667
|
+
Action["KPIAnalysisCTA"] = "kpiAnalysisCTA";
|
|
3533
3668
|
})(Action || (Action = {}));
|
|
3534
3669
|
var PrefetchFeatures;
|
|
3535
3670
|
(function (PrefetchFeatures) {
|
|
@@ -5894,6 +6029,25 @@ class Logger {
|
|
|
5894
6029
|
}
|
|
5895
6030
|
const logger = new Logger();
|
|
5896
6031
|
|
|
6032
|
+
const ERROR_MESSAGE = {
|
|
6033
|
+
INVALID_THOUGHTSPOT_HOST: 'Error parsing ThoughtSpot host. Please provide a valid URL.',
|
|
6034
|
+
LIVEBOARD_VIZ_ID_VALIDATION: 'Please select a liveboard to embed.',
|
|
6035
|
+
TRIGGER_TIMED_OUT: 'Trigger timedout in getting response',
|
|
6036
|
+
SEARCHEMBED_BETA_WRANING_MESSAGE: 'Search Embed is in Beta in this release.',
|
|
6037
|
+
SAGE_EMBED_BETA_WARNING_MESSAGE: 'Sage Embed is in Beta in this release.',
|
|
6038
|
+
THIRD_PARTY_COOKIE_BLOCKED_ALERT: 'Third party cookie access is blocked on this browser, please allow third party cookies for this to work properly. \nYou can use `suppressNoCookieAccessAlert` to suppress this message.',
|
|
6039
|
+
DUPLICATE_TOKEN_ERR: 'Duplicate token, please issue a new token every time getAuthToken callback is called. See https://developers.thoughtspot.com/docs/?pageid=embed-auth#trusted-auth-embed for more details.',
|
|
6040
|
+
SDK_NOT_INITIALIZED: 'SDK not initialized',
|
|
6041
|
+
SESSION_INFO_FAILED: 'Failed to get session info',
|
|
6042
|
+
INVALID_TOKEN_ERROR: 'Received invalid token from getAuthToken callback or authToken endpoint.',
|
|
6043
|
+
MIXPANEL_TOKEN_NOT_FOUND: 'Mixpanel token not found in session info',
|
|
6044
|
+
PRERENDER_ID_MISSING: 'PreRender id is required for preRender',
|
|
6045
|
+
SYNC_STYLE_CALLED_BEFORE_RENDER: 'PreRender should be called before using syncPreRenderStyle',
|
|
6046
|
+
CSP_VIOLATION_ALERT: 'CSP violation detected. Please check the console errors for more details.',
|
|
6047
|
+
CSP_FRAME_HOST_VIOLATION_LOG_MESSAGE: 'Please setup CSP Correctly for the Application to start working. You can know more about setting CSP Correctly here: https://developers.thoughtspot.com/docs/security-settings#csp-viz-embed-hosts. \n In case you are still facing error, please read: https://developers.thoughtspot.com/docs/security-settings#csp-viz-embed-hosts',
|
|
6048
|
+
MISSING_REPORTING_OBSERVER: 'ReportingObserver not supported',
|
|
6049
|
+
};
|
|
6050
|
+
|
|
5897
6051
|
const EndPoints = {
|
|
5898
6052
|
AUTH_VERIFICATION: '/callosum/v1/session/info',
|
|
5899
6053
|
SESSION_INFO: '/callosum/v1/session/info',
|
|
@@ -6007,9 +6161,6 @@ async function fetchBasicAuthService(thoughtSpotHost, username, password) {
|
|
|
6007
6161
|
});
|
|
6008
6162
|
}
|
|
6009
6163
|
|
|
6010
|
-
const DUPLICATE_TOKEN_ERR = 'Duplicate token, please issue a new token every time getAuthToken callback is called.'
|
|
6011
|
-
+ 'See https://developers.thoughtspot.com/docs/?pageid=embed-auth#trusted-auth-embed for more details.';
|
|
6012
|
-
const INVALID_TOKEN_ERR = 'Invalid token received form token callback or authToken endpoint.';
|
|
6013
6164
|
let cachedAuthToken = null;
|
|
6014
6165
|
// This method can be used to get the authToken using the embedConfig
|
|
6015
6166
|
async function getAuthenticationToken(embedConfig) {
|
|
@@ -6040,7 +6191,7 @@ async function getAuthenticationToken(embedConfig) {
|
|
|
6040
6191
|
await validateAuthToken(embedConfig, authToken);
|
|
6041
6192
|
}
|
|
6042
6193
|
catch (e) {
|
|
6043
|
-
logger.error(
|
|
6194
|
+
logger.error(`${ERROR_MESSAGE.INVALID_TOKEN_ERROR} Error : ${e.message}`);
|
|
6044
6195
|
throw e;
|
|
6045
6196
|
}
|
|
6046
6197
|
cachedAuthToken = authToken;
|
|
@@ -6062,12 +6213,12 @@ const validateAuthToken = async (embedConfig, authToken, suppressAlert) => {
|
|
|
6062
6213
|
if (cachedAuthToken && cachedAuthToken === authToken) {
|
|
6063
6214
|
if (!embedConfig.suppressErrorAlerts && !suppressAlert) {
|
|
6064
6215
|
// eslint-disable-next-line no-alert
|
|
6065
|
-
alert(DUPLICATE_TOKEN_ERR);
|
|
6216
|
+
alert(ERROR_MESSAGE.DUPLICATE_TOKEN_ERR);
|
|
6066
6217
|
}
|
|
6067
|
-
throw new Error(DUPLICATE_TOKEN_ERR);
|
|
6218
|
+
throw new Error(ERROR_MESSAGE.DUPLICATE_TOKEN_ERR);
|
|
6068
6219
|
}
|
|
6069
6220
|
else {
|
|
6070
|
-
throw new Error(
|
|
6221
|
+
throw new Error(ERROR_MESSAGE.INVALID_TOKEN_ERROR);
|
|
6071
6222
|
}
|
|
6072
6223
|
};
|
|
6073
6224
|
/**
|
|
@@ -6679,14 +6830,6 @@ function getSelectedPointsForUnderlyingDataQuery(selectedPoints) {
|
|
|
6679
6830
|
return underlyingDataPoint;
|
|
6680
6831
|
}
|
|
6681
6832
|
|
|
6682
|
-
const ERROR_MESSAGE = {
|
|
6683
|
-
INVALID_THOUGHTSPOT_HOST: 'Error parsing ThoughtSpot host. Please provide a valid URL.',
|
|
6684
|
-
LIVEBOARD_VIZ_ID_VALIDATION: 'Please select a liveboard to embed.',
|
|
6685
|
-
TRIGGER_TIMED_OUT: 'Trigger timedout in getting response',
|
|
6686
|
-
SEARCHEMBED_BETA_WRANING_MESSAGE: 'Search Embed is in Beta in this release.',
|
|
6687
|
-
SAGE_EMBED_BETA_WARNING_MESSAGE: 'Sage Embed is in Beta in this release.',
|
|
6688
|
-
};
|
|
6689
|
-
|
|
6690
6833
|
/**
|
|
6691
6834
|
* Copyright (c) 2023
|
|
6692
6835
|
*
|
|
@@ -12737,6 +12880,10 @@ var mixpanel$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.assign(/*#__PURE
|
|
|
12737
12880
|
// Needed to avoid error in CJS builds on some bundlers.
|
|
12738
12881
|
const mixpanelLib = mixpanel_cjs || mixpanel$1;
|
|
12739
12882
|
let mixpanelInstance;
|
|
12883
|
+
/**
|
|
12884
|
+
* Enum of mixpanel events
|
|
12885
|
+
* @hidden
|
|
12886
|
+
*/
|
|
12740
12887
|
const MIXPANEL_EVENT = {
|
|
12741
12888
|
VISUAL_SDK_RENDER_START: 'visual-sdk-render-start',
|
|
12742
12889
|
VISUAL_SDK_CALLED_INIT: 'visual-sdk-called-init',
|
|
@@ -12781,7 +12928,7 @@ function emptyQueue() {
|
|
|
12781
12928
|
function initMixpanel(sessionInfo) {
|
|
12782
12929
|
var _a;
|
|
12783
12930
|
if (!sessionInfo || !sessionInfo.mixpanelToken) {
|
|
12784
|
-
logger.error(
|
|
12931
|
+
logger.error(ERROR_MESSAGE.MIXPANEL_TOKEN_NOT_FOUND);
|
|
12785
12932
|
return;
|
|
12786
12933
|
}
|
|
12787
12934
|
// On a public cluster the user is anonymous, so don't set the identify to
|
|
@@ -13147,6 +13294,13 @@ EventEmitter.EventEmitter = EventEmitter;
|
|
|
13147
13294
|
}
|
|
13148
13295
|
});
|
|
13149
13296
|
|
|
13297
|
+
var ReportType;
|
|
13298
|
+
(function (ReportType) {
|
|
13299
|
+
ReportType["CSP_VIOLATION"] = "csp-violation";
|
|
13300
|
+
ReportType["DEPRECATION"] = "deprecation";
|
|
13301
|
+
ReportType["INTERVENTION"] = "intervention";
|
|
13302
|
+
})(ReportType || (ReportType = {}));
|
|
13303
|
+
|
|
13150
13304
|
/**
|
|
13151
13305
|
*
|
|
13152
13306
|
* @param url
|
|
@@ -13318,7 +13472,7 @@ var AuthEvent;
|
|
|
13318
13472
|
*/
|
|
13319
13473
|
function notifyAuthSDKSuccess() {
|
|
13320
13474
|
{
|
|
13321
|
-
logger.error(
|
|
13475
|
+
logger.error(ERROR_MESSAGE.SDK_NOT_INITIALIZED);
|
|
13322
13476
|
return;
|
|
13323
13477
|
}
|
|
13324
13478
|
}
|
|
@@ -13327,7 +13481,7 @@ function notifyAuthSDKSuccess() {
|
|
|
13327
13481
|
*/
|
|
13328
13482
|
async function notifyAuthSuccess() {
|
|
13329
13483
|
{
|
|
13330
|
-
logger.error(
|
|
13484
|
+
logger.error(ERROR_MESSAGE.SDK_NOT_INITIALIZED);
|
|
13331
13485
|
return;
|
|
13332
13486
|
}
|
|
13333
13487
|
}
|
|
@@ -13337,7 +13491,7 @@ async function notifyAuthSuccess() {
|
|
|
13337
13491
|
*/
|
|
13338
13492
|
function notifyAuthFailure(failureType) {
|
|
13339
13493
|
{
|
|
13340
|
-
logger.error(
|
|
13494
|
+
logger.error(ERROR_MESSAGE.SDK_NOT_INITIALIZED);
|
|
13341
13495
|
return;
|
|
13342
13496
|
}
|
|
13343
13497
|
}
|
|
@@ -13346,7 +13500,7 @@ function notifyAuthFailure(failureType) {
|
|
|
13346
13500
|
*/
|
|
13347
13501
|
function notifyLogout() {
|
|
13348
13502
|
{
|
|
13349
|
-
logger.error(
|
|
13503
|
+
logger.error(ERROR_MESSAGE.SDK_NOT_INITIALIZED);
|
|
13350
13504
|
return;
|
|
13351
13505
|
}
|
|
13352
13506
|
}
|
|
@@ -13699,7 +13853,7 @@ function processNoCookieAccess(e, containerEl) {
|
|
|
13699
13853
|
if (!ignoreNoCookieAccess) {
|
|
13700
13854
|
if (!suppressNoCookieAccessAlert && !suppressErrorAlerts) {
|
|
13701
13855
|
// eslint-disable-next-line no-alert
|
|
13702
|
-
alert(
|
|
13856
|
+
alert(ERROR_MESSAGE.THIRD_PARTY_COOKIE_BLOCKED_ALERT);
|
|
13703
13857
|
}
|
|
13704
13858
|
// eslint-disable-next-line no-param-reassign
|
|
13705
13859
|
containerEl.innerHTML = loginFailedMessage;
|
|
@@ -13815,7 +13969,7 @@ function processTrigger(iFrame, messageType, thoughtSpotHost, data) {
|
|
|
13815
13969
|
});
|
|
13816
13970
|
}
|
|
13817
13971
|
|
|
13818
|
-
var name="@thoughtspot/visual-embed-sdk";var version="1.32.
|
|
13972
|
+
var name="@thoughtspot/visual-embed-sdk";var version="1.32.2";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p . --incremental false; tsc -p . --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts","bundle-dts":"dts-bundle --name ../../dist/visual-embed-sdk --main lib/src/index.d.ts --outputAsModuleFolder=true","bundle-dts-react":"dts-bundle --name ../../../dist/visual-embed-sdk-react --main lib/src/react/index.d.ts --outputAsModuleFolder=true","bundle-dts-react-full":"dts-bundle --name ../../../dist/visual-embed-sdk-react-full --main lib/src/react/all-types-export.d.ts --outputAsModuleFolder=true",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.json --theme typedoc-theme --json static/typedoc/typedoc.json --disableOutputCheck","test-sdk":"jest -c jest.config.sdk.js --runInBand",test:"npm run test-sdk",posttest:"cat ./coverage/sdk/lcov.info | coveralls","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest",dev:"vite -c vite.local.config.ts"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={algoliasearch:"^4.10.5",classnames:"^2.3.1",dompurify:"^2.3.4","eslint-plugin-comment-length":"^0.9.2","eslint-plugin-jsdoc":"^46.9.0",eventemitter3:"^4.0.7","gatsby-plugin-vercel":"^1.0.3","html-react-parser":"^1.4.12",lodash:"^4.17.21","mixpanel-browser":"^2.45.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1"};var devDependencies={"@mdx-js/mdx":"^1.6.22","@mdx-js/react":"^1.6.22","@react-icons/all-files":"^4.1.0","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^5.0.2","@size-limit/preset-big-lib":"^8.2.6","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^22.2.3","@types/mixpanel-browser":"^2.35.6","@types/lodash":"^4.17.0","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^4.6.0","@typescript-eslint/parser":"^4.6.0",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1",coveralls:"^3.1.0","current-git-branch":"^1.1.0","dts-bundle":"^0.7.3",eslint:"^7.12.1","eslint-config-airbnb-base":"^14.2.0","eslint-config-prettier":"^6.15.0","eslint-import-resolver-typescript":"^2.3.0","eslint-plugin-import":"^2.22.1","eslint-plugin-prettier":"^3.1.4","eslint-plugin-react-hooks":"^4.2.0","fs-extra":"^10.0.0","gh-pages":"^3.1.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^1.1.1",jest:"^26.6.3","jest-fetch-mock":"^3.0.3",jsdom:"^17.0.0","node-sass":"^8.0.0",prettier:"2.1.2",react:"^16.14.0","react-dom":"^16.14.0","react-resizable":"^1.11.0","react-resize-detector":"^6.6.0","react-test-renderer":"^17.0.2","react-use-flexsearch":"^0.1.1",rollup:"2.30.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^26.5.5","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^5.3.4"};var author="ThoughtSpot";var email="support@thoughtspot.com";var license="ThoughtSpot Development Tools End User License Agreement";var directories={lib:"lib"};var repository={type:"git",url:"git+https://github.com/thoughtspot/visual-embed-sdk.git"};var publishConfig={registry:"https://registry.npmjs.org"};var keywords=["thoughtspot","everywhere","embedded","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version,description:description,module:module,main:main,types:types,files:files,exports:exports,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.js",limit:"48 kB"}],scripts:scripts,peerDependencies:peerDependencies,dependencies:dependencies,devDependencies:devDependencies,author:author,email:email,license:license,directories:directories,repository:repository,publishConfig:publishConfig,keywords:keywords,bugs:bugs,homepage:homepage,globals:globals};
|
|
13819
13973
|
|
|
13820
13974
|
/**
|
|
13821
13975
|
* Copyright (c) 2022
|
|
@@ -13913,7 +14067,7 @@ class TsEmbed {
|
|
|
13913
14067
|
});
|
|
13914
14068
|
}
|
|
13915
14069
|
catch (e) {
|
|
13916
|
-
logger.error(
|
|
14070
|
+
logger.error(`${ERROR_MESSAGE.INVALID_TOKEN_ERROR} Error : ${e === null || e === void 0 ? void 0 : e.message}`);
|
|
13917
14071
|
processAuthFailure(e, this.isPreRendered ? this.preRenderWrapper : this.el);
|
|
13918
14072
|
}
|
|
13919
14073
|
}
|
|
@@ -14121,7 +14275,7 @@ class TsEmbed {
|
|
|
14121
14275
|
if (this.embedConfig.currencyFormat) {
|
|
14122
14276
|
queryParams[Param.CurrencyFormat] = this.embedConfig.currencyFormat;
|
|
14123
14277
|
}
|
|
14124
|
-
const { disabledActions, disabledActionReason, hiddenActions, visibleActions, hiddenTabs, visibleTabs, showAlerts, additionalFlags, locale, customizations, contextMenuTrigger, linkOverride, insertInToSlide, } = this.viewConfig;
|
|
14278
|
+
const { disabledActions, disabledActionReason, hiddenActions, visibleActions, hiddenTabs, visibleTabs, showAlerts, additionalFlags, locale, customizations, contextMenuTrigger, linkOverride, insertInToSlide, disableRedirectionLinksInNewTab, } = this.viewConfig;
|
|
14125
14279
|
if (Array.isArray(visibleActions) && Array.isArray(hiddenActions)) {
|
|
14126
14280
|
this.handleError('You cannot have both hidden actions and visible actions');
|
|
14127
14281
|
return queryParams;
|
|
@@ -14182,6 +14336,9 @@ class TsEmbed {
|
|
|
14182
14336
|
if (insertInToSlide) {
|
|
14183
14337
|
queryParams[Param.ShowInsertToSlide] = insertInToSlide;
|
|
14184
14338
|
}
|
|
14339
|
+
if (disableRedirectionLinksInNewTab) {
|
|
14340
|
+
queryParams[Param.DisableRedirectionLinksInNewTab] = disableRedirectionLinksInNewTab;
|
|
14341
|
+
}
|
|
14185
14342
|
queryParams[Param.OverrideNativeConsole] = true;
|
|
14186
14343
|
queryParams[Param.ClientLogLevel] = this.embedConfig.logLevel;
|
|
14187
14344
|
return queryParams;
|
|
@@ -14226,7 +14383,7 @@ class TsEmbed {
|
|
|
14226
14383
|
iFrame.mozallowfullscreen = true;
|
|
14227
14384
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
14228
14385
|
// @ts-ignore
|
|
14229
|
-
iFrame.allow = 'clipboard-read; clipboard-write';
|
|
14386
|
+
iFrame.allow = 'clipboard-read; clipboard-write fullscreen';
|
|
14230
14387
|
const { height: frameHeight, width: frameWidth, ...restParams } = this.viewConfig.frameParams || {};
|
|
14231
14388
|
const width = getCssDimension(frameWidth || DEFAULT_EMBED_WIDTH);
|
|
14232
14389
|
const height = getCssDimension(frameHeight || DEFAULT_EMBED_HEIGHT);
|
|
@@ -14609,7 +14766,7 @@ class TsEmbed {
|
|
|
14609
14766
|
*/
|
|
14610
14767
|
preRender(showPreRenderByDefault = false) {
|
|
14611
14768
|
if (!this.viewConfig.preRenderId) {
|
|
14612
|
-
logger.error(
|
|
14769
|
+
logger.error(ERROR_MESSAGE.PRERENDER_ID_MISSING);
|
|
14613
14770
|
return this;
|
|
14614
14771
|
}
|
|
14615
14772
|
this.isPreRendered = true;
|
|
@@ -14682,7 +14839,7 @@ class TsEmbed {
|
|
|
14682
14839
|
*/
|
|
14683
14840
|
showPreRender() {
|
|
14684
14841
|
if (!this.viewConfig.preRenderId) {
|
|
14685
|
-
logger.error(
|
|
14842
|
+
logger.error(ERROR_MESSAGE.PRERENDER_ID_MISSING);
|
|
14686
14843
|
return;
|
|
14687
14844
|
}
|
|
14688
14845
|
if (!this.isPreRenderAvailable()) {
|
|
@@ -14724,7 +14881,7 @@ class TsEmbed {
|
|
|
14724
14881
|
*/
|
|
14725
14882
|
syncPreRenderStyle() {
|
|
14726
14883
|
if (!this.isPreRenderAvailable() || !this.el) {
|
|
14727
|
-
logger.error(
|
|
14884
|
+
logger.error(ERROR_MESSAGE.SYNC_STYLE_CALLED_BEFORE_RENDER);
|
|
14728
14885
|
return;
|
|
14729
14886
|
}
|
|
14730
14887
|
const elBoundingClient = this.el.getBoundingClientRect();
|
|
@@ -15028,7 +15185,8 @@ class SearchEmbed extends TsEmbed {
|
|
|
15028
15185
|
*/
|
|
15029
15186
|
getDataSourceMode() {
|
|
15030
15187
|
let dataSourceMode = DataSourceVisualMode.Expanded;
|
|
15031
|
-
if (this.viewConfig.collapseDataSources === true
|
|
15188
|
+
if (this.viewConfig.collapseDataSources === true
|
|
15189
|
+
|| this.viewConfig.collapseDataPanel === true) {
|
|
15032
15190
|
dataSourceMode = DataSourceVisualMode.Collapsed;
|
|
15033
15191
|
}
|
|
15034
15192
|
if (this.viewConfig.hideDataSources === true) {
|
|
@@ -15038,9 +15196,9 @@ class SearchEmbed extends TsEmbed {
|
|
|
15038
15196
|
}
|
|
15039
15197
|
getEmbedParams() {
|
|
15040
15198
|
var _a;
|
|
15041
|
-
const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, hideSearchBar, dataPanelV2 =
|
|
15199
|
+
const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, hideSearchBar, dataPanelV2 = true, useLastSelectedSources = false, runtimeParameters, collapseSearchBarInitially = false, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false,
|
|
15042
15200
|
/* eslint-disable-next-line max-len */
|
|
15043
|
-
dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, focusSearchBarOnRender = true, excludeRuntimeParametersfromURL, } = this.viewConfig;
|
|
15201
|
+
dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, focusSearchBarOnRender = true, excludeRuntimeParametersfromURL, collapseSearchBar = true, } = this.viewConfig;
|
|
15044
15202
|
const queryParams = this.getBaseQueryParams();
|
|
15045
15203
|
queryParams[Param.HideActions] = [
|
|
15046
15204
|
...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : []),
|
|
@@ -15084,7 +15242,8 @@ class SearchEmbed extends TsEmbed {
|
|
|
15084
15242
|
queryParams[Param.UseLastSelectedDataSource] = false;
|
|
15085
15243
|
}
|
|
15086
15244
|
queryParams[Param.searchEmbed] = true;
|
|
15087
|
-
|
|
15245
|
+
/* eslint-disable-next-line max-len */
|
|
15246
|
+
queryParams[Param.CollapseSearchBarInitially] = collapseSearchBarInitially || collapseSearchBar;
|
|
15088
15247
|
queryParams[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
|
|
15089
15248
|
if (dataPanelCustomGroupsAccordionInitialState
|
|
15090
15249
|
=== DataPanelCustomColumnGroupsAccordionState.COLLAPSE_ALL
|
|
@@ -15184,6 +15343,10 @@ var Page;
|
|
|
15184
15343
|
* SpotIQ listing page
|
|
15185
15344
|
*/
|
|
15186
15345
|
Page["SpotIQ"] = "insights";
|
|
15346
|
+
/**
|
|
15347
|
+
* Monitor Alerts Page
|
|
15348
|
+
*/
|
|
15349
|
+
Page["Monitor"] = "monitor";
|
|
15187
15350
|
})(Page || (Page = {}));
|
|
15188
15351
|
/**
|
|
15189
15352
|
* Define the initial state os column custom group accordions
|
|
@@ -15204,6 +15367,12 @@ var DataPanelCustomColumnGroupsAccordionState$1;
|
|
|
15204
15367
|
*/
|
|
15205
15368
|
DataPanelCustomColumnGroupsAccordionState["EXPAND_FIRST"] = "EXPAND_FIRST";
|
|
15206
15369
|
})(DataPanelCustomColumnGroupsAccordionState$1 || (DataPanelCustomColumnGroupsAccordionState$1 = {}));
|
|
15370
|
+
var HomePageSearchBarMode;
|
|
15371
|
+
(function (HomePageSearchBarMode) {
|
|
15372
|
+
HomePageSearchBarMode["OBJECT_SEARCH"] = "objectSearch";
|
|
15373
|
+
HomePageSearchBarMode["AI_ANSWER"] = "aiAnswer";
|
|
15374
|
+
HomePageSearchBarMode["NONE"] = "none";
|
|
15375
|
+
})(HomePageSearchBarMode || (HomePageSearchBarMode = {}));
|
|
15207
15376
|
/**
|
|
15208
15377
|
* Embeds full ThoughtSpot experience in a host application.
|
|
15209
15378
|
* @group Embed components
|
|
@@ -15244,9 +15413,9 @@ class AppEmbed extends V1Embed {
|
|
|
15244
15413
|
* embedded Liveboard or visualization.
|
|
15245
15414
|
*/
|
|
15246
15415
|
getEmbedParams() {
|
|
15247
|
-
const { tag, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 =
|
|
15416
|
+
const { tag, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 = true, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, hideHomepageLeftNav = false, modularHomeExperience = false, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, enable2ColumnLayout, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false,
|
|
15248
15417
|
/* eslint-disable-next-line max-len */
|
|
15249
|
-
dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL, } = this.viewConfig;
|
|
15418
|
+
dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL, collapseSearchBar = true, homePageSearchBarMode, } = this.viewConfig;
|
|
15250
15419
|
let params = {};
|
|
15251
15420
|
params[Param.EmbedApp] = true;
|
|
15252
15421
|
params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
|
|
@@ -15284,10 +15453,13 @@ class AppEmbed extends V1Embed {
|
|
|
15284
15453
|
/* eslint-disable-next-line max-len */
|
|
15285
15454
|
params[Param.IsOnBeforeGetVizDataInterceptEnabled] = isOnBeforeGetVizDataInterceptEnabled;
|
|
15286
15455
|
}
|
|
15456
|
+
if (homePageSearchBarMode) {
|
|
15457
|
+
params[Param.HomePageSearchBarMode] = homePageSearchBarMode;
|
|
15458
|
+
}
|
|
15287
15459
|
params[Param.DataPanelV2Enabled] = dataPanelV2;
|
|
15288
15460
|
params[Param.HideHomepageLeftNav] = hideHomepageLeftNav;
|
|
15289
15461
|
params[Param.ModularHomeExperienceEnabled] = modularHomeExperience;
|
|
15290
|
-
params[Param.CollapseSearchBarInitially] = collapseSearchBarInitially;
|
|
15462
|
+
params[Param.CollapseSearchBarInitially] = collapseSearchBarInitially || collapseSearchBar;
|
|
15291
15463
|
params[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
|
|
15292
15464
|
if (dataPanelCustomGroupsAccordionInitialState
|
|
15293
15465
|
=== DataPanelCustomColumnGroupsAccordionState$1.COLLAPSE_ALL
|
|
@@ -15334,6 +15506,8 @@ class AppEmbed extends V1Embed {
|
|
|
15334
15506
|
return 'data/tables';
|
|
15335
15507
|
case Page.SpotIQ:
|
|
15336
15508
|
return modularHomeExperience ? 'home/spotiq-analysis' : 'insights/results';
|
|
15509
|
+
case Page.Monitor:
|
|
15510
|
+
return modularHomeExperience ? 'home/monitor-alerts' : 'insights/monitor-alerts';
|
|
15337
15511
|
case Page.Home:
|
|
15338
15512
|
default:
|
|
15339
15513
|
return 'home';
|
|
@@ -15525,7 +15699,7 @@ class LiveboardEmbed extends V1Embed {
|
|
|
15525
15699
|
let params = {};
|
|
15526
15700
|
params[Param.EmbedApp] = true;
|
|
15527
15701
|
params = this.getBaseQueryParams(params);
|
|
15528
|
-
const { enableVizTransformations, fullHeight, defaultHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, enableAskSage, enable2ColumnLayout, } = this.viewConfig;
|
|
15702
|
+
const { enableVizTransformations, fullHeight, defaultHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, enableAskSage, enable2ColumnLayout, dataPanelV2 = true, } = this.viewConfig;
|
|
15529
15703
|
const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
|
|
15530
15704
|
|| this.viewConfig.preventPinboardFilterRemoval;
|
|
15531
15705
|
if (fullHeight === true) {
|
|
@@ -15569,6 +15743,7 @@ class LiveboardEmbed extends V1Embed {
|
|
|
15569
15743
|
params[Param.enableAskSage] = enableAskSage;
|
|
15570
15744
|
}
|
|
15571
15745
|
params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
|
|
15746
|
+
params[Param.DataPanelV2Enabled] = dataPanelV2;
|
|
15572
15747
|
const queryParams = getQueryParamString(params, true);
|
|
15573
15748
|
return queryParams;
|
|
15574
15749
|
}
|