@thoughtspot/visual-embed-sdk 1.32.0 → 1.33.0-alpha.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 +1 -1
- 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/embed/app.d.ts +12 -1
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +13 -4
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/app.spec.js +30 -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/search.d.ts +15 -1
- 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.map +1 -1
- package/cjs/src/mixpanel-service.js +2 -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 +155 -6
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +128 -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/embed/app.d.ts +12 -1
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/base.d.ts.map +1 -1
- package/dist/src/embed/search.d.ts +15 -1
- 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.map +1 -1
- package/dist/src/types.d.ts +155 -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 +192 -38
- package/dist/tsembed-react.js +192 -38
- package/dist/tsembed.es.js +239 -39
- package/dist/tsembed.js +239 -39
- package/dist/visual-embed-sdk-react-full.d.ts +183 -9
- package/dist/visual-embed-sdk-react.d.ts +183 -9
- package/dist/visual-embed-sdk.d.ts +183 -9
- package/lib/package.json +1 -1
- 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/embed/app.d.ts +12 -1
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +12 -3
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/app.spec.js +31 -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/search.d.ts +15 -1
- 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.map +1 -1
- package/lib/src/mixpanel-service.js +2 -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 +155 -6
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +128 -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 +183 -9
- package/package.json +1 -1
- package/src/auth.ts +6 -5
- package/src/authToken.ts +5 -9
- package/src/embed/app.spec.ts +46 -0
- package/src/embed/app.ts +20 -3
- package/src/embed/base.ts +3 -1
- package/src/embed/search.spec.ts +9 -9
- package/src/embed/search.ts +21 -4
- package/src/embed/ts-embed.ts +13 -6
- package/src/errors.ts +11 -0
- package/src/mixpanel-service.ts +2 -1
- package/src/react/index.spec.tsx +1 -1
- package/src/types.ts +168 -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.es.js
CHANGED
|
@@ -510,6 +510,10 @@ var HomeLeftNavItem;
|
|
|
510
510
|
* @version SDK: 1.28.0| ThoughtSpot: 9.12.5.cl
|
|
511
511
|
*/
|
|
512
512
|
HomeLeftNavItem["SpotIQAnalysis"] = "spotiq-analysis";
|
|
513
|
+
/**
|
|
514
|
+
* @version SDK: 1.34.0| ThoughtSpot: 10.3.0.cl
|
|
515
|
+
*/
|
|
516
|
+
HomeLeftNavItem["LiveboardSchedules"] = "liveboard-schedules";
|
|
513
517
|
})(HomeLeftNavItem || (HomeLeftNavItem = {}));
|
|
514
518
|
/**
|
|
515
519
|
* A map of the supported runtime filter operations
|
|
@@ -1900,13 +1904,15 @@ var HostEvent;
|
|
|
1900
1904
|
*
|
|
1901
1905
|
* @example
|
|
1902
1906
|
* ```js
|
|
1903
|
-
*
|
|
1907
|
+
* searchEmbed.trigger(HostEvent.CreateMonitor)
|
|
1904
1908
|
* ```
|
|
1905
1909
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
1906
1910
|
*/
|
|
1907
1911
|
HostEvent["CreateMonitor"] = "createMonitor";
|
|
1908
1912
|
/**
|
|
1909
|
-
* Trigger the **Manage alerts** action on a
|
|
1913
|
+
* Trigger the **Manage alerts** action on a KPI chart
|
|
1914
|
+
* in a visualization or saved Answer.
|
|
1915
|
+
*
|
|
1910
1916
|
* @param - an object with `vizId` as a key
|
|
1911
1917
|
* @example
|
|
1912
1918
|
* ```js
|
|
@@ -1914,6 +1920,16 @@ var HostEvent;
|
|
|
1914
1920
|
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
1915
1921
|
* })
|
|
1916
1922
|
* ```
|
|
1923
|
+
*
|
|
1924
|
+
* @example
|
|
1925
|
+
* ```js
|
|
1926
|
+
* searchEmbed.trigger(HostEvent.ManageMonitor)
|
|
1927
|
+
* ```
|
|
1928
|
+
*
|
|
1929
|
+
* @example
|
|
1930
|
+
* ```js
|
|
1931
|
+
* vizEmbed.trigger(HostEvent.ManageMonitor)
|
|
1932
|
+
* ```
|
|
1917
1933
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
1918
1934
|
*/
|
|
1919
1935
|
HostEvent["ManageMonitor"] = "manageMonitor";
|
|
@@ -2491,6 +2507,8 @@ var Param;
|
|
|
2491
2507
|
Param["IsFullAppEmbed"] = "isFullAppEmbed";
|
|
2492
2508
|
Param["IsOnBeforeGetVizDataInterceptEnabled"] = "isOnBeforeGetVizDataInterceptEnabled";
|
|
2493
2509
|
Param["FocusSearchBarOnRender"] = "focusSearchBarOnRender";
|
|
2510
|
+
Param["DisableRedirectionLinksInNewTab"] = "disableRedirectionLinksInNewTab";
|
|
2511
|
+
Param["HomePageSearchBarMode"] = "homePageSearchBarMode";
|
|
2494
2512
|
})(Param || (Param = {}));
|
|
2495
2513
|
/**
|
|
2496
2514
|
* ThoughtSpot application pages include actions and menu commands
|
|
@@ -2641,6 +2659,7 @@ var Action;
|
|
|
2641
2659
|
*/
|
|
2642
2660
|
Action["ConfigureFilter"] = "configureFilter";
|
|
2643
2661
|
Action["CollapseDataSources"] = "collapseDataSources";
|
|
2662
|
+
Action["CollapseDataPanel"] = "collapseDataPanel";
|
|
2644
2663
|
/**
|
|
2645
2664
|
* The **Choose sources** button on Search page.
|
|
2646
2665
|
* Allows selecting data sources for search queries.
|
|
@@ -3036,12 +3055,15 @@ var Action;
|
|
|
3036
3055
|
* The Create alert action on KPI charts.
|
|
3037
3056
|
* @example
|
|
3038
3057
|
* ```js
|
|
3039
|
-
* disabledActions: [Action.CreateMonitor
|
|
3058
|
+
* disabledActions: [Action.CreateMonitor]
|
|
3040
3059
|
* ```
|
|
3041
3060
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
3042
3061
|
*/
|
|
3043
3062
|
Action["CreateMonitor"] = "createMonitor";
|
|
3044
3063
|
/**
|
|
3064
|
+
* @deprecated
|
|
3065
|
+
* Reports errors
|
|
3066
|
+
*
|
|
3045
3067
|
* @example
|
|
3046
3068
|
* ```js
|
|
3047
3069
|
* disabledActions: [Action.ReportError]
|
|
@@ -3266,35 +3288,84 @@ var Action;
|
|
|
3266
3288
|
*/
|
|
3267
3289
|
Action["RenameModalTitleDescription"] = "renameModalTitleDescription";
|
|
3268
3290
|
/**
|
|
3291
|
+
*
|
|
3292
|
+
* @example
|
|
3293
|
+
* ```js
|
|
3294
|
+
* disabledActions: [Action.RequestVerification]
|
|
3295
|
+
* ```
|
|
3269
3296
|
*
|
|
3270
3297
|
* @version SDK: 1.25.0 | Thoughtspot: 9.6.0.cl
|
|
3271
3298
|
*/
|
|
3272
3299
|
Action["RequestVerification"] = "requestVerification";
|
|
3273
3300
|
/**
|
|
3301
|
+
*
|
|
3302
|
+
* Allows users to mark a Liveboard as verified.
|
|
3303
|
+
*
|
|
3304
|
+
* @example
|
|
3305
|
+
* ```js
|
|
3306
|
+
* disabledActions: [Action.MarkAsVerified]
|
|
3307
|
+
* ```
|
|
3274
3308
|
* @version SDK: 1.25.0 | Thoughtspot: 9.6.0.cl
|
|
3275
3309
|
*/
|
|
3276
3310
|
Action["MarkAsVerified"] = "markAsVerified";
|
|
3277
3311
|
/**
|
|
3312
|
+
* The **Add Tab** action on a Liveboard.
|
|
3313
|
+
* Allows adding a new tab to a Liveboard view.
|
|
3314
|
+
*
|
|
3315
|
+
* @example
|
|
3316
|
+
* ```js
|
|
3317
|
+
* disabledActions: [Action.AddTab]
|
|
3318
|
+
* ```
|
|
3278
3319
|
* @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
|
|
3279
3320
|
*/
|
|
3280
3321
|
Action["AddTab"] = "addTab";
|
|
3281
3322
|
/**
|
|
3323
|
+
*
|
|
3324
|
+
* Initiates contextual change analysis on KPI charts.
|
|
3325
|
+
*
|
|
3326
|
+
* @example
|
|
3327
|
+
* ```js
|
|
3328
|
+
* disabledActions: [Action.EnableContextualChangeAnalysis]
|
|
3329
|
+
* ```
|
|
3282
3330
|
* @version SDK: 1.25.0 | Thoughtspot: 9.6.0.cl
|
|
3283
3331
|
*/
|
|
3284
3332
|
Action["EnableContextualChangeAnalysis"] = "enableContextualChangeAnalysis";
|
|
3285
3333
|
/**
|
|
3334
|
+
*
|
|
3335
|
+
* @example
|
|
3336
|
+
* ```js
|
|
3337
|
+
* disabledActions: [Action.ShowSageQuery]
|
|
3338
|
+
* ```
|
|
3339
|
+
*
|
|
3286
3340
|
* @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
|
|
3287
3341
|
*/
|
|
3288
3342
|
Action["ShowSageQuery"] = "showSageQuery";
|
|
3289
3343
|
/**
|
|
3344
|
+
*
|
|
3345
|
+
* @example
|
|
3346
|
+
* ```js
|
|
3347
|
+
* disabledActions: [Action.EditSageAnswer]
|
|
3348
|
+
* ```
|
|
3290
3349
|
* @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
|
|
3291
3350
|
*/
|
|
3292
3351
|
Action["EditSageAnswer"] = "editSageAnswer";
|
|
3293
3352
|
/**
|
|
3353
|
+
*
|
|
3354
|
+
* This action allows users to send feedback on AI-generated Answers.
|
|
3355
|
+
*
|
|
3356
|
+
* @example
|
|
3357
|
+
* ```js
|
|
3358
|
+
* disabledActions: [Action.SageAnswerFeedback]
|
|
3359
|
+
* ```
|
|
3294
3360
|
* @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
|
|
3295
3361
|
*/
|
|
3296
3362
|
Action["SageAnswerFeedback"] = "sageAnswerFeedback";
|
|
3297
3363
|
/**
|
|
3364
|
+
*
|
|
3365
|
+
* @example
|
|
3366
|
+
* ```js
|
|
3367
|
+
* disabledActions: [Action.ModifySageAnswer]
|
|
3368
|
+
* ```
|
|
3298
3369
|
* @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
|
|
3299
3370
|
*/
|
|
3300
3371
|
Action["ModifySageAnswer"] = "modifySageAnswer";
|
|
@@ -3416,6 +3487,60 @@ var Action;
|
|
|
3416
3487
|
* @version SDK: 1.27.10 | Thoughtspot: 9.12.5.cl
|
|
3417
3488
|
*/
|
|
3418
3489
|
Action["AIHighlights"] = "AIHighlights";
|
|
3490
|
+
/**
|
|
3491
|
+
* Action ID for edit schedule action on schedule on homepage
|
|
3492
|
+
* @example
|
|
3493
|
+
* ```js
|
|
3494
|
+
* disabledActions: [Action.EditScheduleHomepage]
|
|
3495
|
+
* ```
|
|
3496
|
+
* @version SDK: 1.34.0 | Thoughtspot: 10.3.0.cl
|
|
3497
|
+
*/
|
|
3498
|
+
Action["EditScheduleHomepage"] = "editScheduleHomepage";
|
|
3499
|
+
/**
|
|
3500
|
+
* Action ID for pause schedule action on schedule on homepage
|
|
3501
|
+
* @example
|
|
3502
|
+
* ```js
|
|
3503
|
+
* disabledActions: [Action.PauseScheduleHomepage]
|
|
3504
|
+
* ```
|
|
3505
|
+
* @version SDK: 1.34.0 | Thoughtspot: 10.3.0.cl
|
|
3506
|
+
*/
|
|
3507
|
+
Action["PauseScheduleHomepage"] = "pauseScheduleHomepage";
|
|
3508
|
+
/**
|
|
3509
|
+
* Action ID for view schedule run action on schedule on homepage
|
|
3510
|
+
* @example
|
|
3511
|
+
* ```js
|
|
3512
|
+
* disabledActions: [Action.ViewScheduleRunHomepage]
|
|
3513
|
+
* ```
|
|
3514
|
+
* @version SDK: 1.34.0 | Thoughtspot: 10.3.0.cl
|
|
3515
|
+
*/
|
|
3516
|
+
Action["ViewScheduleRunHomepage"] = "viewScheduleRunHomepage";
|
|
3517
|
+
/**
|
|
3518
|
+
* Action ID for unsubscribe schedule action on schedule on homepage
|
|
3519
|
+
* @example
|
|
3520
|
+
* ```js
|
|
3521
|
+
* disabledActions: [Action.UnsubscribeScheduleHomepage]
|
|
3522
|
+
* ```
|
|
3523
|
+
* @version SDK: 1.34.0 | Thoughtspot: 10.3.0.cl
|
|
3524
|
+
*/
|
|
3525
|
+
Action["UnsubscribeScheduleHomepage"] = "unsubscribeScheduleHomepage";
|
|
3526
|
+
/**
|
|
3527
|
+
* Action ID for delete schedule action on schedule on homepage
|
|
3528
|
+
* @example
|
|
3529
|
+
* ```js
|
|
3530
|
+
* disabledActions: [Action.DeleteScheduleHomepage]
|
|
3531
|
+
* ```
|
|
3532
|
+
* @version SDK: 1.34.0 | Thoughtspot: 10.3.0.cl
|
|
3533
|
+
*/
|
|
3534
|
+
Action["DeleteScheduleHomepage"] = "deleteScheduleHomepage";
|
|
3535
|
+
/**
|
|
3536
|
+
* The **Analyze CTA** action on KPI chart.
|
|
3537
|
+
* @example
|
|
3538
|
+
* ```js
|
|
3539
|
+
* disabledActions: [Action.KPIAnalysisCTA]
|
|
3540
|
+
* ```
|
|
3541
|
+
* @version SDK: 1.34.0 | Thoughtspot: 10.3.0.cl
|
|
3542
|
+
*/
|
|
3543
|
+
Action["KPIAnalysisCTA"] = "kpiAnalysisCTA";
|
|
3419
3544
|
})(Action || (Action = {}));
|
|
3420
3545
|
var PrefetchFeatures;
|
|
3421
3546
|
(function (PrefetchFeatures) {
|
|
@@ -5783,6 +5908,25 @@ function isEqual(value, other) {
|
|
|
5783
5908
|
|
|
5784
5909
|
var isEqual_1 = isEqual;
|
|
5785
5910
|
|
|
5911
|
+
const ERROR_MESSAGE = {
|
|
5912
|
+
INVALID_THOUGHTSPOT_HOST: 'Error parsing ThoughtSpot host. Please provide a valid URL.',
|
|
5913
|
+
LIVEBOARD_VIZ_ID_VALIDATION: 'Please select a liveboard to embed.',
|
|
5914
|
+
TRIGGER_TIMED_OUT: 'Trigger timedout in getting response',
|
|
5915
|
+
SEARCHEMBED_BETA_WRANING_MESSAGE: 'Search Embed is in Beta in this release.',
|
|
5916
|
+
SAGE_EMBED_BETA_WARNING_MESSAGE: 'Sage Embed is in Beta in this release.',
|
|
5917
|
+
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.',
|
|
5918
|
+
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.',
|
|
5919
|
+
SDK_NOT_INITIALIZED: 'SDK not initialized',
|
|
5920
|
+
SESSION_INFO_FAILED: 'Failed to get session info',
|
|
5921
|
+
INVALID_TOKEN_ERROR: 'Received invalid token from getAuthToken callback or authToken endpoint.',
|
|
5922
|
+
MIXPANEL_TOKEN_NOT_FOUND: 'Mixpanel token not found in session info',
|
|
5923
|
+
PRERENDER_ID_MISSING: 'PreRender id is required for preRender',
|
|
5924
|
+
SYNC_STYLE_CALLED_BEFORE_RENDER: 'PreRender should be called before using syncPreRenderStyle',
|
|
5925
|
+
CSP_VIOLATION_ALERT: 'CSP violation detected. Please check the console errors for more details.',
|
|
5926
|
+
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',
|
|
5927
|
+
MISSING_REPORTING_OBSERVER: 'ReportingObserver not supported',
|
|
5928
|
+
};
|
|
5929
|
+
|
|
5786
5930
|
const EndPoints = {
|
|
5787
5931
|
AUTH_VERIFICATION: '/callosum/v1/session/info',
|
|
5788
5932
|
SESSION_INFO: '/callosum/v1/session/info',
|
|
@@ -5896,9 +6040,6 @@ async function fetchBasicAuthService(thoughtSpotHost, username, password) {
|
|
|
5896
6040
|
});
|
|
5897
6041
|
}
|
|
5898
6042
|
|
|
5899
|
-
const DUPLICATE_TOKEN_ERR = 'Duplicate token, please issue a new token every time getAuthToken callback is called.'
|
|
5900
|
-
+ 'See https://developers.thoughtspot.com/docs/?pageid=embed-auth#trusted-auth-embed for more details.';
|
|
5901
|
-
const INVALID_TOKEN_ERR = 'Invalid token received form token callback or authToken endpoint.';
|
|
5902
6043
|
let cachedAuthToken = null;
|
|
5903
6044
|
// This method can be used to get the authToken using the embedConfig
|
|
5904
6045
|
async function getAuthenticationToken(embedConfig) {
|
|
@@ -5929,7 +6070,7 @@ async function getAuthenticationToken(embedConfig) {
|
|
|
5929
6070
|
await validateAuthToken(embedConfig, authToken);
|
|
5930
6071
|
}
|
|
5931
6072
|
catch (e) {
|
|
5932
|
-
logger.error(
|
|
6073
|
+
logger.error(`${ERROR_MESSAGE.INVALID_TOKEN_ERROR} Error : ${e.message}`);
|
|
5933
6074
|
throw e;
|
|
5934
6075
|
}
|
|
5935
6076
|
cachedAuthToken = authToken;
|
|
@@ -5951,12 +6092,12 @@ const validateAuthToken = async (embedConfig, authToken, suppressAlert) => {
|
|
|
5951
6092
|
if (cachedAuthToken && cachedAuthToken === authToken) {
|
|
5952
6093
|
if (!embedConfig.suppressErrorAlerts && !suppressAlert) {
|
|
5953
6094
|
// eslint-disable-next-line no-alert
|
|
5954
|
-
alert(DUPLICATE_TOKEN_ERR);
|
|
6095
|
+
alert(ERROR_MESSAGE.DUPLICATE_TOKEN_ERR);
|
|
5955
6096
|
}
|
|
5956
|
-
throw new Error(DUPLICATE_TOKEN_ERR);
|
|
6097
|
+
throw new Error(ERROR_MESSAGE.DUPLICATE_TOKEN_ERR);
|
|
5957
6098
|
}
|
|
5958
6099
|
else {
|
|
5959
|
-
throw new Error(
|
|
6100
|
+
throw new Error(ERROR_MESSAGE.INVALID_TOKEN_ERROR);
|
|
5960
6101
|
}
|
|
5961
6102
|
};
|
|
5962
6103
|
/**
|
|
@@ -6579,14 +6720,6 @@ function getSelectedPointsForUnderlyingDataQuery(selectedPoints) {
|
|
|
6579
6720
|
return underlyingDataPoint;
|
|
6580
6721
|
}
|
|
6581
6722
|
|
|
6582
|
-
const ERROR_MESSAGE = {
|
|
6583
|
-
INVALID_THOUGHTSPOT_HOST: 'Error parsing ThoughtSpot host. Please provide a valid URL.',
|
|
6584
|
-
LIVEBOARD_VIZ_ID_VALIDATION: 'Please select a liveboard to embed.',
|
|
6585
|
-
TRIGGER_TIMED_OUT: 'Trigger timedout in getting response',
|
|
6586
|
-
SEARCHEMBED_BETA_WRANING_MESSAGE: 'Search Embed is in Beta in this release.',
|
|
6587
|
-
SAGE_EMBED_BETA_WARNING_MESSAGE: 'Sage Embed is in Beta in this release.',
|
|
6588
|
-
};
|
|
6589
|
-
|
|
6590
6723
|
/**
|
|
6591
6724
|
* Copyright (c) 2023
|
|
6592
6725
|
*
|
|
@@ -12681,7 +12814,7 @@ function emptyQueue() {
|
|
|
12681
12814
|
function initMixpanel(sessionInfo) {
|
|
12682
12815
|
var _a;
|
|
12683
12816
|
if (!sessionInfo || !sessionInfo.mixpanelToken) {
|
|
12684
|
-
logger.error(
|
|
12817
|
+
logger.error(ERROR_MESSAGE.MIXPANEL_TOKEN_NOT_FOUND);
|
|
12685
12818
|
return;
|
|
12686
12819
|
}
|
|
12687
12820
|
// On a public cluster the user is anonymous, so don't set the identify to
|
|
@@ -13047,6 +13180,58 @@ EventEmitter.EventEmitter = EventEmitter;
|
|
|
13047
13180
|
}
|
|
13048
13181
|
});
|
|
13049
13182
|
|
|
13183
|
+
var ReportType;
|
|
13184
|
+
(function (ReportType) {
|
|
13185
|
+
ReportType["CSP_VIOLATION"] = "csp-violation";
|
|
13186
|
+
ReportType["DEPRECATION"] = "deprecation";
|
|
13187
|
+
ReportType["INTERVENTION"] = "intervention";
|
|
13188
|
+
})(ReportType || (ReportType = {}));
|
|
13189
|
+
let globalObserver = null;
|
|
13190
|
+
/**
|
|
13191
|
+
* Register a global ReportingObserver to capture all unhandled errors
|
|
13192
|
+
* @param overrideExisting boolean to override existing observer
|
|
13193
|
+
* @returns ReportingObserver | null
|
|
13194
|
+
*/
|
|
13195
|
+
function registerReportingObserver(overrideExisting = false) {
|
|
13196
|
+
if (!(window.ReportingObserver)) {
|
|
13197
|
+
logger.warn(ERROR_MESSAGE.MISSING_REPORTING_OBSERVER);
|
|
13198
|
+
return null;
|
|
13199
|
+
}
|
|
13200
|
+
if (overrideExisting) {
|
|
13201
|
+
resetGlobalReportingObserver();
|
|
13202
|
+
}
|
|
13203
|
+
if (globalObserver) {
|
|
13204
|
+
return globalObserver;
|
|
13205
|
+
}
|
|
13206
|
+
const embedConfig = getEmbedConfig();
|
|
13207
|
+
globalObserver = new ReportingObserver((reports) => {
|
|
13208
|
+
reports.forEach((report) => {
|
|
13209
|
+
const { type, url, body } = report;
|
|
13210
|
+
const reportBody = body;
|
|
13211
|
+
const isThoughtSpotHost = url
|
|
13212
|
+
&& url.startsWith(embedConfig.thoughtSpotHost);
|
|
13213
|
+
const isFrameHostError = type === ReportType.CSP_VIOLATION
|
|
13214
|
+
&& reportBody.effectiveDirective === 'frame-ancestors';
|
|
13215
|
+
if (isThoughtSpotHost && isFrameHostError) {
|
|
13216
|
+
if (!embedConfig.suppressErrorAlerts) {
|
|
13217
|
+
alert(ERROR_MESSAGE.CSP_VIOLATION_ALERT);
|
|
13218
|
+
}
|
|
13219
|
+
logger.error(ERROR_MESSAGE.CSP_FRAME_HOST_VIOLATION_LOG_MESSAGE);
|
|
13220
|
+
}
|
|
13221
|
+
});
|
|
13222
|
+
}, { buffered: true });
|
|
13223
|
+
globalObserver.observe();
|
|
13224
|
+
return globalObserver;
|
|
13225
|
+
}
|
|
13226
|
+
/**
|
|
13227
|
+
* Resets the global ReportingObserver
|
|
13228
|
+
*/
|
|
13229
|
+
function resetGlobalReportingObserver() {
|
|
13230
|
+
if (globalObserver)
|
|
13231
|
+
globalObserver.disconnect();
|
|
13232
|
+
globalObserver = null;
|
|
13233
|
+
}
|
|
13234
|
+
|
|
13050
13235
|
/**
|
|
13051
13236
|
*
|
|
13052
13237
|
* @param url
|
|
@@ -13239,7 +13424,7 @@ function setAuthEE(eventEmitter) {
|
|
|
13239
13424
|
*/
|
|
13240
13425
|
function notifyAuthSDKSuccess() {
|
|
13241
13426
|
if (!authEE) {
|
|
13242
|
-
logger.error(
|
|
13427
|
+
logger.error(ERROR_MESSAGE.SDK_NOT_INITIALIZED);
|
|
13243
13428
|
return;
|
|
13244
13429
|
}
|
|
13245
13430
|
authEE.emit(AuthStatus.SDK_SUCCESS);
|
|
@@ -13249,7 +13434,7 @@ function notifyAuthSDKSuccess() {
|
|
|
13249
13434
|
*/
|
|
13250
13435
|
async function notifyAuthSuccess() {
|
|
13251
13436
|
if (!authEE) {
|
|
13252
|
-
logger.error(
|
|
13437
|
+
logger.error(ERROR_MESSAGE.SDK_NOT_INITIALIZED);
|
|
13253
13438
|
return;
|
|
13254
13439
|
}
|
|
13255
13440
|
try {
|
|
@@ -13257,7 +13442,7 @@ async function notifyAuthSuccess() {
|
|
|
13257
13442
|
authEE.emit(AuthStatus.SUCCESS, sessionInfo);
|
|
13258
13443
|
}
|
|
13259
13444
|
catch (e) {
|
|
13260
|
-
logger.error(
|
|
13445
|
+
logger.error(ERROR_MESSAGE.SESSION_INFO_FAILED);
|
|
13261
13446
|
}
|
|
13262
13447
|
}
|
|
13263
13448
|
/**
|
|
@@ -13266,7 +13451,7 @@ async function notifyAuthSuccess() {
|
|
|
13266
13451
|
*/
|
|
13267
13452
|
function notifyAuthFailure(failureType) {
|
|
13268
13453
|
if (!authEE) {
|
|
13269
|
-
logger.error(
|
|
13454
|
+
logger.error(ERROR_MESSAGE.SDK_NOT_INITIALIZED);
|
|
13270
13455
|
return;
|
|
13271
13456
|
}
|
|
13272
13457
|
authEE.emit(AuthStatus.FAILURE, failureType);
|
|
@@ -13276,7 +13461,7 @@ function notifyAuthFailure(failureType) {
|
|
|
13276
13461
|
*/
|
|
13277
13462
|
function notifyLogout() {
|
|
13278
13463
|
if (!authEE) {
|
|
13279
|
-
logger.error(
|
|
13464
|
+
logger.error(ERROR_MESSAGE.SDK_NOT_INITIALIZED);
|
|
13280
13465
|
return;
|
|
13281
13466
|
}
|
|
13282
13467
|
authEE.emit(AuthStatus.LOGOUT);
|
|
@@ -13670,6 +13855,7 @@ const init = (embedConfig) => {
|
|
|
13670
13855
|
thoughtSpotHost: getThoughtSpotHost(embedConfig),
|
|
13671
13856
|
}));
|
|
13672
13857
|
setGlobalLogLevelOverride(embedConfig.logLevel);
|
|
13858
|
+
registerReportingObserver();
|
|
13673
13859
|
const authEE = new eventemitter3();
|
|
13674
13860
|
setAuthEE(authEE);
|
|
13675
13861
|
handleAuth();
|
|
@@ -13887,7 +14073,7 @@ function processNoCookieAccess(e, containerEl) {
|
|
|
13887
14073
|
if (!ignoreNoCookieAccess) {
|
|
13888
14074
|
if (!suppressNoCookieAccessAlert && !suppressErrorAlerts) {
|
|
13889
14075
|
// eslint-disable-next-line no-alert
|
|
13890
|
-
alert(
|
|
14076
|
+
alert(ERROR_MESSAGE.THIRD_PARTY_COOKIE_BLOCKED_ALERT);
|
|
13891
14077
|
}
|
|
13892
14078
|
// eslint-disable-next-line no-param-reassign
|
|
13893
14079
|
containerEl.innerHTML = loginFailedMessage;
|
|
@@ -14003,7 +14189,7 @@ function processTrigger(iFrame, messageType, thoughtSpotHost, data) {
|
|
|
14003
14189
|
});
|
|
14004
14190
|
}
|
|
14005
14191
|
|
|
14006
|
-
var name="@thoughtspot/visual-embed-sdk";var version="1.
|
|
14192
|
+
var name="@thoughtspot/visual-embed-sdk";var version="1.33.0-alpha.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",start:"gatsby develop","build:gatsby":"npm run clean:gatsby && gatsby build --prefix-paths","build:gatsby:noprefix":"npm run clean:gatsby && gatsby build","serve:gatsby":"gatsby serve","clean:gatsby":"gatsby clean","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts","bundle-dts":"dts-bundle --name ../../dist/visual-embed-sdk --main lib/src/index.d.ts --outputAsModuleFolder=true","bundle-dts-react":"dts-bundle --name ../../../dist/visual-embed-sdk-react --main lib/src/react/index.d.ts --outputAsModuleFolder=true","bundle-dts-react-full":"dts-bundle --name ../../../dist/visual-embed-sdk-react-full --main lib/src/react/all-types-export.d.ts --outputAsModuleFolder=true",build:"rollup -c",watch:"rollup -cw","docs-cmd":"node scripts/gatsby-commands.js",docgen:"typedoc --tsconfig tsconfig.json --theme typedoc-theme","test-sdk":"jest -c jest.config.sdk.js --runInBand","test-docs":"jest -c jest.config.docs.js",test:"npm run test-sdk && npm run test-docs",posttest:"cat ./coverage/sdk/lcov.info | coveralls","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest",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/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^4.6.0","@typescript-eslint/parser":"^4.6.0",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1",coveralls:"^3.1.0","current-git-branch":"^1.1.0","dts-bundle":"^0.7.3",eslint:"^7.12.1","eslint-config-airbnb-base":"^14.2.0","eslint-config-prettier":"^6.15.0","eslint-import-resolver-typescript":"^2.3.0","eslint-plugin-import":"^2.22.1","eslint-plugin-prettier":"^3.1.4","eslint-plugin-react-hooks":"^4.2.0","fs-extra":"^10.0.0",gatsby:"3.13.1","gatsby-plugin-algolia":"^0.22.2","gatsby-plugin-catch-links":"^3.1.0","gatsby-plugin-env-variables":"^2.1.0","gatsby-plugin-intl":"^0.3.3","gatsby-plugin-manifest":"^3.2.0","gatsby-plugin-output":"^0.1.3","gatsby-plugin-sass":"6.7.0","gatsby-plugin-sitemap":"^4.10.0","gatsby-source-filesystem":"3.1.0","gatsby-transformer-asciidoc":"2.1.0","gatsby-transformer-rehype":"2.0.0","gh-pages":"^3.1.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^1.1.1",jest:"^26.6.3","jest-fetch-mock":"^3.0.3",jsdom:"^17.0.0","node-sass":"^8.0.0",prettier:"2.1.2",react:"^16.14.0","react-dom":"^16.14.0","react-resizable":"^1.11.0","react-resize-detector":"^6.6.0","react-test-renderer":"^17.0.2","react-use-flexsearch":"^0.1.1",rollup:"2.30.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^26.5.5","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",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};
|
|
14007
14193
|
|
|
14008
14194
|
/**
|
|
14009
14195
|
* Copyright (c) 2022
|
|
@@ -14101,7 +14287,7 @@ class TsEmbed {
|
|
|
14101
14287
|
});
|
|
14102
14288
|
}
|
|
14103
14289
|
catch (e) {
|
|
14104
|
-
logger.error(
|
|
14290
|
+
logger.error(`${ERROR_MESSAGE.INVALID_TOKEN_ERROR} Error : ${e === null || e === void 0 ? void 0 : e.message}`);
|
|
14105
14291
|
processAuthFailure(e, this.isPreRendered ? this.preRenderWrapper : this.el);
|
|
14106
14292
|
}
|
|
14107
14293
|
}
|
|
@@ -14309,7 +14495,7 @@ class TsEmbed {
|
|
|
14309
14495
|
if (this.embedConfig.currencyFormat) {
|
|
14310
14496
|
queryParams[Param.CurrencyFormat] = this.embedConfig.currencyFormat;
|
|
14311
14497
|
}
|
|
14312
|
-
const { disabledActions, disabledActionReason, hiddenActions, visibleActions, hiddenTabs, visibleTabs, showAlerts, additionalFlags, locale, customizations, contextMenuTrigger, linkOverride, insertInToSlide, } = this.viewConfig;
|
|
14498
|
+
const { disabledActions, disabledActionReason, hiddenActions, visibleActions, hiddenTabs, visibleTabs, showAlerts, additionalFlags, locale, customizations, contextMenuTrigger, linkOverride, insertInToSlide, disableRedirectionLinksInNewTab, } = this.viewConfig;
|
|
14313
14499
|
if (Array.isArray(visibleActions) && Array.isArray(hiddenActions)) {
|
|
14314
14500
|
this.handleError('You cannot have both hidden actions and visible actions');
|
|
14315
14501
|
return queryParams;
|
|
@@ -14370,6 +14556,9 @@ class TsEmbed {
|
|
|
14370
14556
|
if (insertInToSlide) {
|
|
14371
14557
|
queryParams[Param.ShowInsertToSlide] = insertInToSlide;
|
|
14372
14558
|
}
|
|
14559
|
+
if (disableRedirectionLinksInNewTab) {
|
|
14560
|
+
queryParams[Param.DisableRedirectionLinksInNewTab] = disableRedirectionLinksInNewTab;
|
|
14561
|
+
}
|
|
14373
14562
|
queryParams[Param.OverrideNativeConsole] = true;
|
|
14374
14563
|
queryParams[Param.ClientLogLevel] = this.embedConfig.logLevel;
|
|
14375
14564
|
return queryParams;
|
|
@@ -14414,7 +14603,7 @@ class TsEmbed {
|
|
|
14414
14603
|
iFrame.mozallowfullscreen = true;
|
|
14415
14604
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
14416
14605
|
// @ts-ignore
|
|
14417
|
-
iFrame.allow = 'clipboard-read; clipboard-write';
|
|
14606
|
+
iFrame.allow = 'clipboard-read; clipboard-write fullscreen';
|
|
14418
14607
|
const { height: frameHeight, width: frameWidth, ...restParams } = this.viewConfig.frameParams || {};
|
|
14419
14608
|
const width = getCssDimension(frameWidth || DEFAULT_EMBED_WIDTH);
|
|
14420
14609
|
const height = getCssDimension(frameHeight || DEFAULT_EMBED_HEIGHT);
|
|
@@ -14797,7 +14986,7 @@ class TsEmbed {
|
|
|
14797
14986
|
*/
|
|
14798
14987
|
preRender(showPreRenderByDefault = false) {
|
|
14799
14988
|
if (!this.viewConfig.preRenderId) {
|
|
14800
|
-
logger.error(
|
|
14989
|
+
logger.error(ERROR_MESSAGE.PRERENDER_ID_MISSING);
|
|
14801
14990
|
return this;
|
|
14802
14991
|
}
|
|
14803
14992
|
this.isPreRendered = true;
|
|
@@ -14870,7 +15059,7 @@ class TsEmbed {
|
|
|
14870
15059
|
*/
|
|
14871
15060
|
showPreRender() {
|
|
14872
15061
|
if (!this.viewConfig.preRenderId) {
|
|
14873
|
-
logger.error(
|
|
15062
|
+
logger.error(ERROR_MESSAGE.PRERENDER_ID_MISSING);
|
|
14874
15063
|
return;
|
|
14875
15064
|
}
|
|
14876
15065
|
if (!this.isPreRenderAvailable()) {
|
|
@@ -14912,7 +15101,7 @@ class TsEmbed {
|
|
|
14912
15101
|
*/
|
|
14913
15102
|
syncPreRenderStyle() {
|
|
14914
15103
|
if (!this.isPreRenderAvailable() || !this.el) {
|
|
14915
|
-
logger.error(
|
|
15104
|
+
logger.error(ERROR_MESSAGE.SYNC_STYLE_CALLED_BEFORE_RENDER);
|
|
14916
15105
|
return;
|
|
14917
15106
|
}
|
|
14918
15107
|
const elBoundingClient = this.el.getBoundingClientRect();
|
|
@@ -15097,6 +15286,12 @@ var DataPanelCustomColumnGroupsAccordionState;
|
|
|
15097
15286
|
*/
|
|
15098
15287
|
DataPanelCustomColumnGroupsAccordionState["EXPAND_FIRST"] = "EXPAND_FIRST";
|
|
15099
15288
|
})(DataPanelCustomColumnGroupsAccordionState || (DataPanelCustomColumnGroupsAccordionState = {}));
|
|
15289
|
+
var HomePageSearchBarMode;
|
|
15290
|
+
(function (HomePageSearchBarMode) {
|
|
15291
|
+
HomePageSearchBarMode["OBJECT_SEARCH"] = "objectSearch";
|
|
15292
|
+
HomePageSearchBarMode["AI_ANSWER"] = "aiAnswer";
|
|
15293
|
+
HomePageSearchBarMode["NONE"] = "none";
|
|
15294
|
+
})(HomePageSearchBarMode || (HomePageSearchBarMode = {}));
|
|
15100
15295
|
/**
|
|
15101
15296
|
* Embeds full ThoughtSpot experience in a host application.
|
|
15102
15297
|
* @group Embed components
|
|
@@ -15137,9 +15332,9 @@ class AppEmbed extends V1Embed {
|
|
|
15137
15332
|
* embedded Liveboard or visualization.
|
|
15138
15333
|
*/
|
|
15139
15334
|
getEmbedParams() {
|
|
15140
|
-
const { tag, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 =
|
|
15335
|
+
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,
|
|
15141
15336
|
/* eslint-disable-next-line max-len */
|
|
15142
|
-
dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, } = this.viewConfig;
|
|
15337
|
+
dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, collapseSearchBar = true, homePageSearchBarMode, } = this.viewConfig;
|
|
15143
15338
|
let params = {};
|
|
15144
15339
|
params[Param.EmbedApp] = true;
|
|
15145
15340
|
params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
|
|
@@ -15177,10 +15372,13 @@ class AppEmbed extends V1Embed {
|
|
|
15177
15372
|
/* eslint-disable-next-line max-len */
|
|
15178
15373
|
params[Param.IsOnBeforeGetVizDataInterceptEnabled] = isOnBeforeGetVizDataInterceptEnabled;
|
|
15179
15374
|
}
|
|
15375
|
+
if (homePageSearchBarMode) {
|
|
15376
|
+
params[Param.HomePageSearchBarMode] = homePageSearchBarMode;
|
|
15377
|
+
}
|
|
15180
15378
|
params[Param.DataPanelV2Enabled] = dataPanelV2;
|
|
15181
15379
|
params[Param.HideHomepageLeftNav] = hideHomepageLeftNav;
|
|
15182
15380
|
params[Param.ModularHomeExperienceEnabled] = modularHomeExperience;
|
|
15183
|
-
params[Param.CollapseSearchBarInitially] = collapseSearchBarInitially;
|
|
15381
|
+
params[Param.CollapseSearchBarInitially] = collapseSearchBarInitially || collapseSearchBar;
|
|
15184
15382
|
params[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
|
|
15185
15383
|
if (dataPanelCustomGroupsAccordionInitialState
|
|
15186
15384
|
=== DataPanelCustomColumnGroupsAccordionState.COLLAPSE_ALL
|
|
@@ -15641,7 +15839,8 @@ class SearchEmbed extends TsEmbed {
|
|
|
15641
15839
|
*/
|
|
15642
15840
|
getDataSourceMode() {
|
|
15643
15841
|
let dataSourceMode = DataSourceVisualMode.Expanded;
|
|
15644
|
-
if (this.viewConfig.collapseDataSources === true
|
|
15842
|
+
if (this.viewConfig.collapseDataSources === true
|
|
15843
|
+
|| this.viewConfig.collapseDataPanel === true) {
|
|
15645
15844
|
dataSourceMode = DataSourceVisualMode.Collapsed;
|
|
15646
15845
|
}
|
|
15647
15846
|
if (this.viewConfig.hideDataSources === true) {
|
|
@@ -15651,9 +15850,9 @@ class SearchEmbed extends TsEmbed {
|
|
|
15651
15850
|
}
|
|
15652
15851
|
getEmbedParams() {
|
|
15653
15852
|
var _a;
|
|
15654
|
-
const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, hideSearchBar, dataPanelV2 =
|
|
15853
|
+
const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, hideSearchBar, dataPanelV2 = true, useLastSelectedSources = false, runtimeParameters, collapseSearchBarInitially = false, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false,
|
|
15655
15854
|
/* eslint-disable-next-line max-len */
|
|
15656
|
-
dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL, focusSearchBarOnRender = true, excludeRuntimeParametersfromURL, } = this.viewConfig;
|
|
15855
|
+
dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL, focusSearchBarOnRender = true, excludeRuntimeParametersfromURL, collapseSearchBar = true, } = this.viewConfig;
|
|
15657
15856
|
const queryParams = this.getBaseQueryParams();
|
|
15658
15857
|
queryParams[Param.HideActions] = [
|
|
15659
15858
|
...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : []),
|
|
@@ -15697,7 +15896,8 @@ class SearchEmbed extends TsEmbed {
|
|
|
15697
15896
|
queryParams[Param.UseLastSelectedDataSource] = false;
|
|
15698
15897
|
}
|
|
15699
15898
|
queryParams[Param.searchEmbed] = true;
|
|
15700
|
-
|
|
15899
|
+
/* eslint-disable-next-line max-len */
|
|
15900
|
+
queryParams[Param.CollapseSearchBarInitially] = collapseSearchBarInitially || collapseSearchBar;
|
|
15701
15901
|
queryParams[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
|
|
15702
15902
|
if (dataPanelCustomGroupsAccordionInitialState
|
|
15703
15903
|
=== DataPanelCustomColumnGroupsAccordionState$1.COLLAPSE_ALL
|