@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.js
CHANGED
|
@@ -500,6 +500,10 @@
|
|
|
500
500
|
* @version SDK: 1.28.0| ThoughtSpot: 9.12.5.cl
|
|
501
501
|
*/
|
|
502
502
|
HomeLeftNavItem["SpotIQAnalysis"] = "spotiq-analysis";
|
|
503
|
+
/**
|
|
504
|
+
* @version SDK: 1.34.0| ThoughtSpot: 10.3.0.cl
|
|
505
|
+
*/
|
|
506
|
+
HomeLeftNavItem["LiveboardSchedules"] = "liveboard-schedules";
|
|
503
507
|
})(exports.HomeLeftNavItem || (exports.HomeLeftNavItem = {}));
|
|
504
508
|
(function (RuntimeFilterOp) {
|
|
505
509
|
/**
|
|
@@ -1832,13 +1836,15 @@
|
|
|
1832
1836
|
*
|
|
1833
1837
|
* @example
|
|
1834
1838
|
* ```js
|
|
1835
|
-
*
|
|
1839
|
+
* searchEmbed.trigger(HostEvent.CreateMonitor)
|
|
1836
1840
|
* ```
|
|
1837
1841
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
1838
1842
|
*/
|
|
1839
1843
|
HostEvent["CreateMonitor"] = "createMonitor";
|
|
1840
1844
|
/**
|
|
1841
|
-
* Trigger the **Manage alerts** action on a
|
|
1845
|
+
* Trigger the **Manage alerts** action on a KPI chart
|
|
1846
|
+
* in a visualization or saved Answer.
|
|
1847
|
+
*
|
|
1842
1848
|
* @param - an object with `vizId` as a key
|
|
1843
1849
|
* @example
|
|
1844
1850
|
* ```js
|
|
@@ -1846,6 +1852,16 @@
|
|
|
1846
1852
|
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
1847
1853
|
* })
|
|
1848
1854
|
* ```
|
|
1855
|
+
*
|
|
1856
|
+
* @example
|
|
1857
|
+
* ```js
|
|
1858
|
+
* searchEmbed.trigger(HostEvent.ManageMonitor)
|
|
1859
|
+
* ```
|
|
1860
|
+
*
|
|
1861
|
+
* @example
|
|
1862
|
+
* ```js
|
|
1863
|
+
* vizEmbed.trigger(HostEvent.ManageMonitor)
|
|
1864
|
+
* ```
|
|
1849
1865
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
1850
1866
|
*/
|
|
1851
1867
|
HostEvent["ManageMonitor"] = "manageMonitor";
|
|
@@ -2417,6 +2433,8 @@
|
|
|
2417
2433
|
Param["IsFullAppEmbed"] = "isFullAppEmbed";
|
|
2418
2434
|
Param["IsOnBeforeGetVizDataInterceptEnabled"] = "isOnBeforeGetVizDataInterceptEnabled";
|
|
2419
2435
|
Param["FocusSearchBarOnRender"] = "focusSearchBarOnRender";
|
|
2436
|
+
Param["DisableRedirectionLinksInNewTab"] = "disableRedirectionLinksInNewTab";
|
|
2437
|
+
Param["HomePageSearchBarMode"] = "homePageSearchBarMode";
|
|
2420
2438
|
})(Param || (Param = {}));
|
|
2421
2439
|
(function (Action) {
|
|
2422
2440
|
/**
|
|
@@ -2539,6 +2557,7 @@
|
|
|
2539
2557
|
*/
|
|
2540
2558
|
Action["ConfigureFilter"] = "configureFilter";
|
|
2541
2559
|
Action["CollapseDataSources"] = "collapseDataSources";
|
|
2560
|
+
Action["CollapseDataPanel"] = "collapseDataPanel";
|
|
2542
2561
|
/**
|
|
2543
2562
|
* The **Choose sources** button on Search page.
|
|
2544
2563
|
* Allows selecting data sources for search queries.
|
|
@@ -2934,12 +2953,15 @@
|
|
|
2934
2953
|
* The Create alert action on KPI charts.
|
|
2935
2954
|
* @example
|
|
2936
2955
|
* ```js
|
|
2937
|
-
* disabledActions: [Action.CreateMonitor
|
|
2956
|
+
* disabledActions: [Action.CreateMonitor]
|
|
2938
2957
|
* ```
|
|
2939
2958
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
2940
2959
|
*/
|
|
2941
2960
|
Action["CreateMonitor"] = "createMonitor";
|
|
2942
2961
|
/**
|
|
2962
|
+
* @deprecated
|
|
2963
|
+
* Reports errors
|
|
2964
|
+
*
|
|
2943
2965
|
* @example
|
|
2944
2966
|
* ```js
|
|
2945
2967
|
* disabledActions: [Action.ReportError]
|
|
@@ -3164,35 +3186,84 @@
|
|
|
3164
3186
|
*/
|
|
3165
3187
|
Action["RenameModalTitleDescription"] = "renameModalTitleDescription";
|
|
3166
3188
|
/**
|
|
3189
|
+
*
|
|
3190
|
+
* @example
|
|
3191
|
+
* ```js
|
|
3192
|
+
* disabledActions: [Action.RequestVerification]
|
|
3193
|
+
* ```
|
|
3167
3194
|
*
|
|
3168
3195
|
* @version SDK: 1.25.0 | Thoughtspot: 9.6.0.cl
|
|
3169
3196
|
*/
|
|
3170
3197
|
Action["RequestVerification"] = "requestVerification";
|
|
3171
3198
|
/**
|
|
3199
|
+
*
|
|
3200
|
+
* Allows users to mark a Liveboard as verified.
|
|
3201
|
+
*
|
|
3202
|
+
* @example
|
|
3203
|
+
* ```js
|
|
3204
|
+
* disabledActions: [Action.MarkAsVerified]
|
|
3205
|
+
* ```
|
|
3172
3206
|
* @version SDK: 1.25.0 | Thoughtspot: 9.6.0.cl
|
|
3173
3207
|
*/
|
|
3174
3208
|
Action["MarkAsVerified"] = "markAsVerified";
|
|
3175
3209
|
/**
|
|
3210
|
+
* The **Add Tab** action on a Liveboard.
|
|
3211
|
+
* Allows adding a new tab to a Liveboard view.
|
|
3212
|
+
*
|
|
3213
|
+
* @example
|
|
3214
|
+
* ```js
|
|
3215
|
+
* disabledActions: [Action.AddTab]
|
|
3216
|
+
* ```
|
|
3176
3217
|
* @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
|
|
3177
3218
|
*/
|
|
3178
3219
|
Action["AddTab"] = "addTab";
|
|
3179
3220
|
/**
|
|
3221
|
+
*
|
|
3222
|
+
* Initiates contextual change analysis on KPI charts.
|
|
3223
|
+
*
|
|
3224
|
+
* @example
|
|
3225
|
+
* ```js
|
|
3226
|
+
* disabledActions: [Action.EnableContextualChangeAnalysis]
|
|
3227
|
+
* ```
|
|
3180
3228
|
* @version SDK: 1.25.0 | Thoughtspot: 9.6.0.cl
|
|
3181
3229
|
*/
|
|
3182
3230
|
Action["EnableContextualChangeAnalysis"] = "enableContextualChangeAnalysis";
|
|
3183
3231
|
/**
|
|
3232
|
+
*
|
|
3233
|
+
* @example
|
|
3234
|
+
* ```js
|
|
3235
|
+
* disabledActions: [Action.ShowSageQuery]
|
|
3236
|
+
* ```
|
|
3237
|
+
*
|
|
3184
3238
|
* @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
|
|
3185
3239
|
*/
|
|
3186
3240
|
Action["ShowSageQuery"] = "showSageQuery";
|
|
3187
3241
|
/**
|
|
3242
|
+
*
|
|
3243
|
+
* @example
|
|
3244
|
+
* ```js
|
|
3245
|
+
* disabledActions: [Action.EditSageAnswer]
|
|
3246
|
+
* ```
|
|
3188
3247
|
* @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
|
|
3189
3248
|
*/
|
|
3190
3249
|
Action["EditSageAnswer"] = "editSageAnswer";
|
|
3191
3250
|
/**
|
|
3251
|
+
*
|
|
3252
|
+
* This action allows users to send feedback on AI-generated Answers.
|
|
3253
|
+
*
|
|
3254
|
+
* @example
|
|
3255
|
+
* ```js
|
|
3256
|
+
* disabledActions: [Action.SageAnswerFeedback]
|
|
3257
|
+
* ```
|
|
3192
3258
|
* @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
|
|
3193
3259
|
*/
|
|
3194
3260
|
Action["SageAnswerFeedback"] = "sageAnswerFeedback";
|
|
3195
3261
|
/**
|
|
3262
|
+
*
|
|
3263
|
+
* @example
|
|
3264
|
+
* ```js
|
|
3265
|
+
* disabledActions: [Action.ModifySageAnswer]
|
|
3266
|
+
* ```
|
|
3196
3267
|
* @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
|
|
3197
3268
|
*/
|
|
3198
3269
|
Action["ModifySageAnswer"] = "modifySageAnswer";
|
|
@@ -3314,6 +3385,70 @@
|
|
|
3314
3385
|
* @version SDK: 1.27.10 | Thoughtspot: 9.12.5.cl
|
|
3315
3386
|
*/
|
|
3316
3387
|
Action["AIHighlights"] = "AIHighlights";
|
|
3388
|
+
/**
|
|
3389
|
+
* Action ID for edit schedule action on schedule on homepage
|
|
3390
|
+
* @example
|
|
3391
|
+
* ```js
|
|
3392
|
+
* disabledActions: [Action.EditScheduleHomepage]
|
|
3393
|
+
* ```
|
|
3394
|
+
* @version SDK: 1.34.0 | Thoughtspot: 10.3.0.cl
|
|
3395
|
+
*/
|
|
3396
|
+
Action["EditScheduleHomepage"] = "editScheduleHomepage";
|
|
3397
|
+
/**
|
|
3398
|
+
* Action ID for pause schedule action on schedule on homepage
|
|
3399
|
+
* @example
|
|
3400
|
+
* ```js
|
|
3401
|
+
* disabledActions: [Action.PauseScheduleHomepage]
|
|
3402
|
+
* ```
|
|
3403
|
+
* @version SDK: 1.34.0 | Thoughtspot: 10.3.0.cl
|
|
3404
|
+
*/
|
|
3405
|
+
Action["PauseScheduleHomepage"] = "pauseScheduleHomepage";
|
|
3406
|
+
/**
|
|
3407
|
+
* Action ID for view schedule run action on schedule on homepage
|
|
3408
|
+
* @example
|
|
3409
|
+
* ```js
|
|
3410
|
+
* disabledActions: [Action.ViewScheduleRunHomepage]
|
|
3411
|
+
* ```
|
|
3412
|
+
* @version SDK: 1.34.0 | Thoughtspot: 10.3.0.cl
|
|
3413
|
+
*/
|
|
3414
|
+
Action["ViewScheduleRunHomepage"] = "viewScheduleRunHomepage";
|
|
3415
|
+
/**
|
|
3416
|
+
* Action ID for unsubscribe schedule action on schedule on homepage
|
|
3417
|
+
* @example
|
|
3418
|
+
* ```js
|
|
3419
|
+
* disabledActions: [Action.UnsubscribeScheduleHomepage]
|
|
3420
|
+
* ```
|
|
3421
|
+
* @version SDK: 1.34.0 | Thoughtspot: 10.3.0.cl
|
|
3422
|
+
*/
|
|
3423
|
+
Action["UnsubscribeScheduleHomepage"] = "unsubscribeScheduleHomepage";
|
|
3424
|
+
/**
|
|
3425
|
+
* The **Manage Tags** action on Homepage Favourite Module.
|
|
3426
|
+
*
|
|
3427
|
+
* @example
|
|
3428
|
+
* ```js
|
|
3429
|
+
* disabledActions: [Action.ManageTags]
|
|
3430
|
+
* ```
|
|
3431
|
+
* @version SDK : 1.34.0 | Thoughtspot: 10.3.0.cl
|
|
3432
|
+
*/
|
|
3433
|
+
Action["ManageTags"] = "manageTags";
|
|
3434
|
+
/**
|
|
3435
|
+
* Action ID for delete schedule action on schedule on homepage
|
|
3436
|
+
* @example
|
|
3437
|
+
* ```js
|
|
3438
|
+
* disabledActions: [Action.DeleteScheduleHomepage]
|
|
3439
|
+
* ```
|
|
3440
|
+
* @version SDK: 1.34.0 | Thoughtspot: 10.3.0.cl
|
|
3441
|
+
*/
|
|
3442
|
+
Action["DeleteScheduleHomepage"] = "deleteScheduleHomepage";
|
|
3443
|
+
/**
|
|
3444
|
+
* The **Analyze CTA** action on KPI chart.
|
|
3445
|
+
* @example
|
|
3446
|
+
* ```js
|
|
3447
|
+
* disabledActions: [Action.KPIAnalysisCTA]
|
|
3448
|
+
* ```
|
|
3449
|
+
* @version SDK: 1.34.0 | Thoughtspot: 10.3.0.cl
|
|
3450
|
+
*/
|
|
3451
|
+
Action["KPIAnalysisCTA"] = "kpiAnalysisCTA";
|
|
3317
3452
|
})(exports.Action || (exports.Action = {}));
|
|
3318
3453
|
(function (PrefetchFeatures) {
|
|
3319
3454
|
PrefetchFeatures["FullApp"] = "FullApp";
|
|
@@ -5675,6 +5810,25 @@
|
|
|
5675
5810
|
|
|
5676
5811
|
var isEqual_1 = isEqual;
|
|
5677
5812
|
|
|
5813
|
+
const ERROR_MESSAGE = {
|
|
5814
|
+
INVALID_THOUGHTSPOT_HOST: 'Error parsing ThoughtSpot host. Please provide a valid URL.',
|
|
5815
|
+
LIVEBOARD_VIZ_ID_VALIDATION: 'Please select a liveboard to embed.',
|
|
5816
|
+
TRIGGER_TIMED_OUT: 'Trigger timedout in getting response',
|
|
5817
|
+
SEARCHEMBED_BETA_WRANING_MESSAGE: 'Search Embed is in Beta in this release.',
|
|
5818
|
+
SAGE_EMBED_BETA_WARNING_MESSAGE: 'Sage Embed is in Beta in this release.',
|
|
5819
|
+
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.',
|
|
5820
|
+
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.',
|
|
5821
|
+
SDK_NOT_INITIALIZED: 'SDK not initialized',
|
|
5822
|
+
SESSION_INFO_FAILED: 'Failed to get session info',
|
|
5823
|
+
INVALID_TOKEN_ERROR: 'Received invalid token from getAuthToken callback or authToken endpoint.',
|
|
5824
|
+
MIXPANEL_TOKEN_NOT_FOUND: 'Mixpanel token not found in session info',
|
|
5825
|
+
PRERENDER_ID_MISSING: 'PreRender id is required for preRender',
|
|
5826
|
+
SYNC_STYLE_CALLED_BEFORE_RENDER: 'PreRender should be called before using syncPreRenderStyle',
|
|
5827
|
+
CSP_VIOLATION_ALERT: 'CSP violation detected. Please check the console errors for more details.',
|
|
5828
|
+
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',
|
|
5829
|
+
MISSING_REPORTING_OBSERVER: 'ReportingObserver not supported',
|
|
5830
|
+
};
|
|
5831
|
+
|
|
5678
5832
|
const EndPoints = {
|
|
5679
5833
|
AUTH_VERIFICATION: '/callosum/v1/session/info',
|
|
5680
5834
|
SESSION_INFO: '/callosum/v1/session/info',
|
|
@@ -5788,9 +5942,6 @@
|
|
|
5788
5942
|
});
|
|
5789
5943
|
}
|
|
5790
5944
|
|
|
5791
|
-
const DUPLICATE_TOKEN_ERR = 'Duplicate token, please issue a new token every time getAuthToken callback is called.'
|
|
5792
|
-
+ 'See https://developers.thoughtspot.com/docs/?pageid=embed-auth#trusted-auth-embed for more details.';
|
|
5793
|
-
const INVALID_TOKEN_ERR = 'Invalid token received form token callback or authToken endpoint.';
|
|
5794
5945
|
let cachedAuthToken = null;
|
|
5795
5946
|
// This method can be used to get the authToken using the embedConfig
|
|
5796
5947
|
async function getAuthenticationToken(embedConfig) {
|
|
@@ -5821,7 +5972,7 @@
|
|
|
5821
5972
|
await validateAuthToken(embedConfig, authToken);
|
|
5822
5973
|
}
|
|
5823
5974
|
catch (e) {
|
|
5824
|
-
logger.error(
|
|
5975
|
+
logger.error(`${ERROR_MESSAGE.INVALID_TOKEN_ERROR} Error : ${e.message}`);
|
|
5825
5976
|
throw e;
|
|
5826
5977
|
}
|
|
5827
5978
|
cachedAuthToken = authToken;
|
|
@@ -5843,12 +5994,12 @@
|
|
|
5843
5994
|
if (cachedAuthToken && cachedAuthToken === authToken) {
|
|
5844
5995
|
if (!embedConfig.suppressErrorAlerts && !suppressAlert) {
|
|
5845
5996
|
// eslint-disable-next-line no-alert
|
|
5846
|
-
alert(DUPLICATE_TOKEN_ERR);
|
|
5997
|
+
alert(ERROR_MESSAGE.DUPLICATE_TOKEN_ERR);
|
|
5847
5998
|
}
|
|
5848
|
-
throw new Error(DUPLICATE_TOKEN_ERR);
|
|
5999
|
+
throw new Error(ERROR_MESSAGE.DUPLICATE_TOKEN_ERR);
|
|
5849
6000
|
}
|
|
5850
6001
|
else {
|
|
5851
|
-
throw new Error(
|
|
6002
|
+
throw new Error(ERROR_MESSAGE.INVALID_TOKEN_ERROR);
|
|
5852
6003
|
}
|
|
5853
6004
|
};
|
|
5854
6005
|
/**
|
|
@@ -6471,14 +6622,6 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
|
|
|
6471
6622
|
return underlyingDataPoint;
|
|
6472
6623
|
}
|
|
6473
6624
|
|
|
6474
|
-
const ERROR_MESSAGE = {
|
|
6475
|
-
INVALID_THOUGHTSPOT_HOST: 'Error parsing ThoughtSpot host. Please provide a valid URL.',
|
|
6476
|
-
LIVEBOARD_VIZ_ID_VALIDATION: 'Please select a liveboard to embed.',
|
|
6477
|
-
TRIGGER_TIMED_OUT: 'Trigger timedout in getting response',
|
|
6478
|
-
SEARCHEMBED_BETA_WRANING_MESSAGE: 'Search Embed is in Beta in this release.',
|
|
6479
|
-
SAGE_EMBED_BETA_WARNING_MESSAGE: 'Sage Embed is in Beta in this release.',
|
|
6480
|
-
};
|
|
6481
|
-
|
|
6482
6625
|
/**
|
|
6483
6626
|
* Copyright (c) 2023
|
|
6484
6627
|
*
|
|
@@ -12529,6 +12672,10 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
|
|
|
12529
12672
|
// Needed to avoid error in CJS builds on some bundlers.
|
|
12530
12673
|
const mixpanelLib = mixpanel_cjs || mixpanel$1;
|
|
12531
12674
|
let mixpanelInstance;
|
|
12675
|
+
/**
|
|
12676
|
+
* Enum of mixpanel events
|
|
12677
|
+
* @hidden
|
|
12678
|
+
*/
|
|
12532
12679
|
const MIXPANEL_EVENT = {
|
|
12533
12680
|
VISUAL_SDK_RENDER_START: 'visual-sdk-render-start',
|
|
12534
12681
|
VISUAL_SDK_CALLED_INIT: 'visual-sdk-called-init',
|
|
@@ -12573,7 +12720,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
|
|
|
12573
12720
|
function initMixpanel(sessionInfo) {
|
|
12574
12721
|
var _a;
|
|
12575
12722
|
if (!sessionInfo || !sessionInfo.mixpanelToken) {
|
|
12576
|
-
logger.error(
|
|
12723
|
+
logger.error(ERROR_MESSAGE.MIXPANEL_TOKEN_NOT_FOUND);
|
|
12577
12724
|
return;
|
|
12578
12725
|
}
|
|
12579
12726
|
// On a public cluster the user is anonymous, so don't set the identify to
|
|
@@ -12939,6 +13086,58 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
|
|
|
12939
13086
|
}
|
|
12940
13087
|
});
|
|
12941
13088
|
|
|
13089
|
+
var ReportType;
|
|
13090
|
+
(function (ReportType) {
|
|
13091
|
+
ReportType["CSP_VIOLATION"] = "csp-violation";
|
|
13092
|
+
ReportType["DEPRECATION"] = "deprecation";
|
|
13093
|
+
ReportType["INTERVENTION"] = "intervention";
|
|
13094
|
+
})(ReportType || (ReportType = {}));
|
|
13095
|
+
let globalObserver = null;
|
|
13096
|
+
/**
|
|
13097
|
+
* Register a global ReportingObserver to capture all unhandled errors
|
|
13098
|
+
* @param overrideExisting boolean to override existing observer
|
|
13099
|
+
* @returns ReportingObserver | null
|
|
13100
|
+
*/
|
|
13101
|
+
function registerReportingObserver(overrideExisting = false) {
|
|
13102
|
+
if (!(window.ReportingObserver)) {
|
|
13103
|
+
logger.warn(ERROR_MESSAGE.MISSING_REPORTING_OBSERVER);
|
|
13104
|
+
return null;
|
|
13105
|
+
}
|
|
13106
|
+
if (overrideExisting) {
|
|
13107
|
+
resetGlobalReportingObserver();
|
|
13108
|
+
}
|
|
13109
|
+
if (globalObserver) {
|
|
13110
|
+
return globalObserver;
|
|
13111
|
+
}
|
|
13112
|
+
const embedConfig = getEmbedConfig();
|
|
13113
|
+
globalObserver = new ReportingObserver((reports) => {
|
|
13114
|
+
reports.forEach((report) => {
|
|
13115
|
+
const { type, url, body } = report;
|
|
13116
|
+
const reportBody = body;
|
|
13117
|
+
const isThoughtSpotHost = url
|
|
13118
|
+
&& url.startsWith(embedConfig.thoughtSpotHost);
|
|
13119
|
+
const isFrameHostError = type === ReportType.CSP_VIOLATION
|
|
13120
|
+
&& reportBody.effectiveDirective === 'frame-ancestors';
|
|
13121
|
+
if (isThoughtSpotHost && isFrameHostError) {
|
|
13122
|
+
if (!embedConfig.suppressErrorAlerts) {
|
|
13123
|
+
alert(ERROR_MESSAGE.CSP_VIOLATION_ALERT);
|
|
13124
|
+
}
|
|
13125
|
+
logger.error(ERROR_MESSAGE.CSP_FRAME_HOST_VIOLATION_LOG_MESSAGE);
|
|
13126
|
+
}
|
|
13127
|
+
});
|
|
13128
|
+
}, { buffered: true });
|
|
13129
|
+
globalObserver.observe();
|
|
13130
|
+
return globalObserver;
|
|
13131
|
+
}
|
|
13132
|
+
/**
|
|
13133
|
+
* Resets the global ReportingObserver
|
|
13134
|
+
*/
|
|
13135
|
+
function resetGlobalReportingObserver() {
|
|
13136
|
+
if (globalObserver)
|
|
13137
|
+
globalObserver.disconnect();
|
|
13138
|
+
globalObserver = null;
|
|
13139
|
+
}
|
|
13140
|
+
|
|
12942
13141
|
/**
|
|
12943
13142
|
*
|
|
12944
13143
|
* @param url
|
|
@@ -13115,7 +13314,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
|
|
|
13115
13314
|
*/
|
|
13116
13315
|
function notifyAuthSDKSuccess() {
|
|
13117
13316
|
if (!authEE) {
|
|
13118
|
-
logger.error(
|
|
13317
|
+
logger.error(ERROR_MESSAGE.SDK_NOT_INITIALIZED);
|
|
13119
13318
|
return;
|
|
13120
13319
|
}
|
|
13121
13320
|
authEE.emit(exports.AuthStatus.SDK_SUCCESS);
|
|
@@ -13125,7 +13324,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
|
|
|
13125
13324
|
*/
|
|
13126
13325
|
async function notifyAuthSuccess() {
|
|
13127
13326
|
if (!authEE) {
|
|
13128
|
-
logger.error(
|
|
13327
|
+
logger.error(ERROR_MESSAGE.SDK_NOT_INITIALIZED);
|
|
13129
13328
|
return;
|
|
13130
13329
|
}
|
|
13131
13330
|
try {
|
|
@@ -13133,7 +13332,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
|
|
|
13133
13332
|
authEE.emit(exports.AuthStatus.SUCCESS, sessionInfo);
|
|
13134
13333
|
}
|
|
13135
13334
|
catch (e) {
|
|
13136
|
-
logger.error(
|
|
13335
|
+
logger.error(ERROR_MESSAGE.SESSION_INFO_FAILED);
|
|
13137
13336
|
}
|
|
13138
13337
|
}
|
|
13139
13338
|
/**
|
|
@@ -13142,7 +13341,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
|
|
|
13142
13341
|
*/
|
|
13143
13342
|
function notifyAuthFailure(failureType) {
|
|
13144
13343
|
if (!authEE) {
|
|
13145
|
-
logger.error(
|
|
13344
|
+
logger.error(ERROR_MESSAGE.SDK_NOT_INITIALIZED);
|
|
13146
13345
|
return;
|
|
13147
13346
|
}
|
|
13148
13347
|
authEE.emit(exports.AuthStatus.FAILURE, failureType);
|
|
@@ -13152,7 +13351,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
|
|
|
13152
13351
|
*/
|
|
13153
13352
|
function notifyLogout() {
|
|
13154
13353
|
if (!authEE) {
|
|
13155
|
-
logger.error(
|
|
13354
|
+
logger.error(ERROR_MESSAGE.SDK_NOT_INITIALIZED);
|
|
13156
13355
|
return;
|
|
13157
13356
|
}
|
|
13158
13357
|
authEE.emit(exports.AuthStatus.LOGOUT);
|
|
@@ -13546,6 +13745,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
|
|
|
13546
13745
|
thoughtSpotHost: getThoughtSpotHost(embedConfig),
|
|
13547
13746
|
}));
|
|
13548
13747
|
setGlobalLogLevelOverride(embedConfig.logLevel);
|
|
13748
|
+
registerReportingObserver();
|
|
13549
13749
|
const authEE = new eventemitter3();
|
|
13550
13750
|
setAuthEE(authEE);
|
|
13551
13751
|
handleAuth();
|
|
@@ -13763,7 +13963,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
|
|
|
13763
13963
|
if (!ignoreNoCookieAccess) {
|
|
13764
13964
|
if (!suppressNoCookieAccessAlert && !suppressErrorAlerts) {
|
|
13765
13965
|
// eslint-disable-next-line no-alert
|
|
13766
|
-
alert(
|
|
13966
|
+
alert(ERROR_MESSAGE.THIRD_PARTY_COOKIE_BLOCKED_ALERT);
|
|
13767
13967
|
}
|
|
13768
13968
|
// eslint-disable-next-line no-param-reassign
|
|
13769
13969
|
containerEl.innerHTML = loginFailedMessage;
|
|
@@ -13879,7 +14079,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
|
|
|
13879
14079
|
});
|
|
13880
14080
|
}
|
|
13881
14081
|
|
|
13882
|
-
var name="@thoughtspot/visual-embed-sdk";var version="1.32.
|
|
14082
|
+
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$1={".":{"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$1,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};
|
|
13883
14083
|
|
|
13884
14084
|
/**
|
|
13885
14085
|
* Copyright (c) 2022
|
|
@@ -13977,7 +14177,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
|
|
|
13977
14177
|
});
|
|
13978
14178
|
}
|
|
13979
14179
|
catch (e) {
|
|
13980
|
-
logger.error(
|
|
14180
|
+
logger.error(`${ERROR_MESSAGE.INVALID_TOKEN_ERROR} Error : ${e === null || e === void 0 ? void 0 : e.message}`);
|
|
13981
14181
|
processAuthFailure(e, this.isPreRendered ? this.preRenderWrapper : this.el);
|
|
13982
14182
|
}
|
|
13983
14183
|
}
|
|
@@ -14185,7 +14385,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
|
|
|
14185
14385
|
if (this.embedConfig.currencyFormat) {
|
|
14186
14386
|
queryParams[Param.CurrencyFormat] = this.embedConfig.currencyFormat;
|
|
14187
14387
|
}
|
|
14188
|
-
const { disabledActions, disabledActionReason, hiddenActions, visibleActions, hiddenTabs, visibleTabs, showAlerts, additionalFlags, locale, customizations, contextMenuTrigger, linkOverride, insertInToSlide, } = this.viewConfig;
|
|
14388
|
+
const { disabledActions, disabledActionReason, hiddenActions, visibleActions, hiddenTabs, visibleTabs, showAlerts, additionalFlags, locale, customizations, contextMenuTrigger, linkOverride, insertInToSlide, disableRedirectionLinksInNewTab, } = this.viewConfig;
|
|
14189
14389
|
if (Array.isArray(visibleActions) && Array.isArray(hiddenActions)) {
|
|
14190
14390
|
this.handleError('You cannot have both hidden actions and visible actions');
|
|
14191
14391
|
return queryParams;
|
|
@@ -14246,6 +14446,9 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
|
|
|
14246
14446
|
if (insertInToSlide) {
|
|
14247
14447
|
queryParams[Param.ShowInsertToSlide] = insertInToSlide;
|
|
14248
14448
|
}
|
|
14449
|
+
if (disableRedirectionLinksInNewTab) {
|
|
14450
|
+
queryParams[Param.DisableRedirectionLinksInNewTab] = disableRedirectionLinksInNewTab;
|
|
14451
|
+
}
|
|
14249
14452
|
queryParams[Param.OverrideNativeConsole] = true;
|
|
14250
14453
|
queryParams[Param.ClientLogLevel] = this.embedConfig.logLevel;
|
|
14251
14454
|
return queryParams;
|
|
@@ -14290,7 +14493,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
|
|
|
14290
14493
|
iFrame.mozallowfullscreen = true;
|
|
14291
14494
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
14292
14495
|
// @ts-ignore
|
|
14293
|
-
iFrame.allow = 'clipboard-read; clipboard-write';
|
|
14496
|
+
iFrame.allow = 'clipboard-read; clipboard-write fullscreen';
|
|
14294
14497
|
const { height: frameHeight, width: frameWidth, ...restParams } = this.viewConfig.frameParams || {};
|
|
14295
14498
|
const width = getCssDimension(frameWidth || DEFAULT_EMBED_WIDTH);
|
|
14296
14499
|
const height = getCssDimension(frameHeight || DEFAULT_EMBED_HEIGHT);
|
|
@@ -14673,7 +14876,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
|
|
|
14673
14876
|
*/
|
|
14674
14877
|
preRender(showPreRenderByDefault = false) {
|
|
14675
14878
|
if (!this.viewConfig.preRenderId) {
|
|
14676
|
-
logger.error(
|
|
14879
|
+
logger.error(ERROR_MESSAGE.PRERENDER_ID_MISSING);
|
|
14677
14880
|
return this;
|
|
14678
14881
|
}
|
|
14679
14882
|
this.isPreRendered = true;
|
|
@@ -14746,7 +14949,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
|
|
|
14746
14949
|
*/
|
|
14747
14950
|
showPreRender() {
|
|
14748
14951
|
if (!this.viewConfig.preRenderId) {
|
|
14749
|
-
logger.error(
|
|
14952
|
+
logger.error(ERROR_MESSAGE.PRERENDER_ID_MISSING);
|
|
14750
14953
|
return;
|
|
14751
14954
|
}
|
|
14752
14955
|
if (!this.isPreRenderAvailable()) {
|
|
@@ -14788,7 +14991,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
|
|
|
14788
14991
|
*/
|
|
14789
14992
|
syncPreRenderStyle() {
|
|
14790
14993
|
if (!this.isPreRenderAvailable() || !this.el) {
|
|
14791
|
-
logger.error(
|
|
14994
|
+
logger.error(ERROR_MESSAGE.SYNC_STYLE_CALLED_BEFORE_RENDER);
|
|
14792
14995
|
return;
|
|
14793
14996
|
}
|
|
14794
14997
|
const elBoundingClient = this.el.getBoundingClientRect();
|
|
@@ -14948,6 +15151,10 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
|
|
|
14948
15151
|
* SpotIQ listing page
|
|
14949
15152
|
*/
|
|
14950
15153
|
Page["SpotIQ"] = "insights";
|
|
15154
|
+
/**
|
|
15155
|
+
* Monitor Alerts Page
|
|
15156
|
+
*/
|
|
15157
|
+
Page["Monitor"] = "monitor";
|
|
14951
15158
|
})(exports.Page || (exports.Page = {}));
|
|
14952
15159
|
/**
|
|
14953
15160
|
* Define the initial state os column custom group accordions
|
|
@@ -14968,6 +15175,12 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
|
|
|
14968
15175
|
*/
|
|
14969
15176
|
DataPanelCustomColumnGroupsAccordionState["EXPAND_FIRST"] = "EXPAND_FIRST";
|
|
14970
15177
|
})(DataPanelCustomColumnGroupsAccordionState || (DataPanelCustomColumnGroupsAccordionState = {}));
|
|
15178
|
+
var HomePageSearchBarMode;
|
|
15179
|
+
(function (HomePageSearchBarMode) {
|
|
15180
|
+
HomePageSearchBarMode["OBJECT_SEARCH"] = "objectSearch";
|
|
15181
|
+
HomePageSearchBarMode["AI_ANSWER"] = "aiAnswer";
|
|
15182
|
+
HomePageSearchBarMode["NONE"] = "none";
|
|
15183
|
+
})(HomePageSearchBarMode || (HomePageSearchBarMode = {}));
|
|
14971
15184
|
/**
|
|
14972
15185
|
* Embeds full ThoughtSpot experience in a host application.
|
|
14973
15186
|
* @group Embed components
|
|
@@ -15008,9 +15221,9 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
|
|
|
15008
15221
|
* embedded Liveboard or visualization.
|
|
15009
15222
|
*/
|
|
15010
15223
|
getEmbedParams() {
|
|
15011
|
-
const { tag, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 =
|
|
15224
|
+
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,
|
|
15012
15225
|
/* eslint-disable-next-line max-len */
|
|
15013
|
-
dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, } = this.viewConfig;
|
|
15226
|
+
dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, collapseSearchBar = true, homePageSearchBarMode, } = this.viewConfig;
|
|
15014
15227
|
let params = {};
|
|
15015
15228
|
params[Param.EmbedApp] = true;
|
|
15016
15229
|
params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
|
|
@@ -15048,10 +15261,13 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
|
|
|
15048
15261
|
/* eslint-disable-next-line max-len */
|
|
15049
15262
|
params[Param.IsOnBeforeGetVizDataInterceptEnabled] = isOnBeforeGetVizDataInterceptEnabled;
|
|
15050
15263
|
}
|
|
15264
|
+
if (homePageSearchBarMode) {
|
|
15265
|
+
params[Param.HomePageSearchBarMode] = homePageSearchBarMode;
|
|
15266
|
+
}
|
|
15051
15267
|
params[Param.DataPanelV2Enabled] = dataPanelV2;
|
|
15052
15268
|
params[Param.HideHomepageLeftNav] = hideHomepageLeftNav;
|
|
15053
15269
|
params[Param.ModularHomeExperienceEnabled] = modularHomeExperience;
|
|
15054
|
-
params[Param.CollapseSearchBarInitially] = collapseSearchBarInitially;
|
|
15270
|
+
params[Param.CollapseSearchBarInitially] = collapseSearchBarInitially || collapseSearchBar;
|
|
15055
15271
|
params[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
|
|
15056
15272
|
if (dataPanelCustomGroupsAccordionInitialState
|
|
15057
15273
|
=== DataPanelCustomColumnGroupsAccordionState.COLLAPSE_ALL
|
|
@@ -15098,6 +15314,8 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
|
|
|
15098
15314
|
return 'data/tables';
|
|
15099
15315
|
case exports.Page.SpotIQ:
|
|
15100
15316
|
return modularHomeExperience ? 'home/spotiq-analysis' : 'insights/results';
|
|
15317
|
+
case exports.Page.Monitor:
|
|
15318
|
+
return modularHomeExperience ? 'home/monitor-alerts' : 'insights/monitor-alerts';
|
|
15101
15319
|
case exports.Page.Home:
|
|
15102
15320
|
default:
|
|
15103
15321
|
return 'home';
|
|
@@ -15289,7 +15507,7 @@ query GetEurekaVizSnapshots(
|
|
|
15289
15507
|
let params = {};
|
|
15290
15508
|
params[Param.EmbedApp] = true;
|
|
15291
15509
|
params = this.getBaseQueryParams(params);
|
|
15292
|
-
const { enableVizTransformations, fullHeight, defaultHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, enableAskSage, enable2ColumnLayout, } = this.viewConfig;
|
|
15510
|
+
const { enableVizTransformations, fullHeight, defaultHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, enableAskSage, enable2ColumnLayout, dataPanelV2 = true, } = this.viewConfig;
|
|
15293
15511
|
const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
|
|
15294
15512
|
|| this.viewConfig.preventPinboardFilterRemoval;
|
|
15295
15513
|
if (fullHeight === true) {
|
|
@@ -15333,6 +15551,7 @@ query GetEurekaVizSnapshots(
|
|
|
15333
15551
|
params[Param.enableAskSage] = enableAskSage;
|
|
15334
15552
|
}
|
|
15335
15553
|
params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
|
|
15554
|
+
params[Param.DataPanelV2Enabled] = dataPanelV2;
|
|
15336
15555
|
const queryParams = getQueryParamString(params, true);
|
|
15337
15556
|
return queryParams;
|
|
15338
15557
|
}
|
|
@@ -15512,7 +15731,8 @@ query GetEurekaVizSnapshots(
|
|
|
15512
15731
|
*/
|
|
15513
15732
|
getDataSourceMode() {
|
|
15514
15733
|
let dataSourceMode = exports.DataSourceVisualMode.Expanded;
|
|
15515
|
-
if (this.viewConfig.collapseDataSources === true
|
|
15734
|
+
if (this.viewConfig.collapseDataSources === true
|
|
15735
|
+
|| this.viewConfig.collapseDataPanel === true) {
|
|
15516
15736
|
dataSourceMode = exports.DataSourceVisualMode.Collapsed;
|
|
15517
15737
|
}
|
|
15518
15738
|
if (this.viewConfig.hideDataSources === true) {
|
|
@@ -15522,9 +15742,9 @@ query GetEurekaVizSnapshots(
|
|
|
15522
15742
|
}
|
|
15523
15743
|
getEmbedParams() {
|
|
15524
15744
|
var _a;
|
|
15525
|
-
const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, hideSearchBar, dataPanelV2 =
|
|
15745
|
+
const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, hideSearchBar, dataPanelV2 = true, useLastSelectedSources = false, runtimeParameters, collapseSearchBarInitially = false, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false,
|
|
15526
15746
|
/* eslint-disable-next-line max-len */
|
|
15527
|
-
dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL, focusSearchBarOnRender = true, excludeRuntimeParametersfromURL, } = this.viewConfig;
|
|
15747
|
+
dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL, focusSearchBarOnRender = true, excludeRuntimeParametersfromURL, collapseSearchBar = true, } = this.viewConfig;
|
|
15528
15748
|
const queryParams = this.getBaseQueryParams();
|
|
15529
15749
|
queryParams[Param.HideActions] = [
|
|
15530
15750
|
...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : []),
|
|
@@ -15568,7 +15788,8 @@ query GetEurekaVizSnapshots(
|
|
|
15568
15788
|
queryParams[Param.UseLastSelectedDataSource] = false;
|
|
15569
15789
|
}
|
|
15570
15790
|
queryParams[Param.searchEmbed] = true;
|
|
15571
|
-
|
|
15791
|
+
/* eslint-disable-next-line max-len */
|
|
15792
|
+
queryParams[Param.CollapseSearchBarInitially] = collapseSearchBarInitially || collapseSearchBar;
|
|
15572
15793
|
queryParams[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
|
|
15573
15794
|
if (dataPanelCustomGroupsAccordionInitialState
|
|
15574
15795
|
=== DataPanelCustomColumnGroupsAccordionState$1.COLLAPSE_ALL
|