@thoughtspot/visual-embed-sdk 1.32.0 → 1.32.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (133) hide show
  1. package/cjs/package.json +1 -1
  2. package/cjs/src/auth.d.ts.map +1 -1
  3. package/cjs/src/auth.js +6 -5
  4. package/cjs/src/auth.js.map +1 -1
  5. package/cjs/src/authToken.d.ts.map +1 -1
  6. package/cjs/src/authToken.js +5 -7
  7. package/cjs/src/authToken.js.map +1 -1
  8. package/cjs/src/embed/app.d.ts +1 -0
  9. package/cjs/src/embed/app.d.ts.map +1 -1
  10. package/cjs/src/embed/app.js +2 -2
  11. package/cjs/src/embed/app.js.map +1 -1
  12. package/cjs/src/embed/base.d.ts.map +1 -1
  13. package/cjs/src/embed/base.js +2 -0
  14. package/cjs/src/embed/base.js.map +1 -1
  15. package/cjs/src/embed/search.d.ts +14 -0
  16. package/cjs/src/embed/search.d.ts.map +1 -1
  17. package/cjs/src/embed/search.js +5 -3
  18. package/cjs/src/embed/search.js.map +1 -1
  19. package/cjs/src/embed/ts-embed.d.ts +1 -1
  20. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  21. package/cjs/src/embed/ts-embed.js +10 -6
  22. package/cjs/src/embed/ts-embed.js.map +1 -1
  23. package/cjs/src/errors.d.ts +11 -0
  24. package/cjs/src/errors.d.ts.map +1 -1
  25. package/cjs/src/errors.js +11 -0
  26. package/cjs/src/errors.js.map +1 -1
  27. package/cjs/src/mixpanel-service.d.ts.map +1 -1
  28. package/cjs/src/mixpanel-service.js +2 -1
  29. package/cjs/src/mixpanel-service.js.map +1 -1
  30. package/cjs/src/react/index.spec.js +1 -1
  31. package/cjs/src/react/index.spec.js.map +1 -1
  32. package/cjs/src/types.d.ts +167 -6
  33. package/cjs/src/types.d.ts.map +1 -1
  34. package/cjs/src/types.js +140 -3
  35. package/cjs/src/types.js.map +1 -1
  36. package/cjs/src/utils/processData.d.ts.map +1 -1
  37. package/cjs/src/utils/processData.js +2 -1
  38. package/cjs/src/utils/processData.js.map +1 -1
  39. package/cjs/src/utils/reporting.d.ts +16 -0
  40. package/cjs/src/utils/reporting.d.ts.map +1 -0
  41. package/cjs/src/utils/reporting.js +68 -0
  42. package/cjs/src/utils/reporting.js.map +1 -0
  43. package/cjs/src/utils/reporting.spec.d.ts +2 -0
  44. package/cjs/src/utils/reporting.spec.d.ts.map +1 -0
  45. package/cjs/src/utils/reporting.spec.js +76 -0
  46. package/cjs/src/utils/reporting.spec.js.map +1 -0
  47. package/dist/src/auth.d.ts.map +1 -1
  48. package/dist/src/authToken.d.ts.map +1 -1
  49. package/dist/src/embed/app.d.ts +1 -0
  50. package/dist/src/embed/app.d.ts.map +1 -1
  51. package/dist/src/embed/base.d.ts.map +1 -1
  52. package/dist/src/embed/search.d.ts +14 -0
  53. package/dist/src/embed/search.d.ts.map +1 -1
  54. package/dist/src/embed/ts-embed.d.ts +1 -1
  55. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  56. package/dist/src/errors.d.ts +11 -0
  57. package/dist/src/errors.d.ts.map +1 -1
  58. package/dist/src/mixpanel-service.d.ts.map +1 -1
  59. package/dist/src/types.d.ts +167 -6
  60. package/dist/src/types.d.ts.map +1 -1
  61. package/dist/src/utils/processData.d.ts.map +1 -1
  62. package/dist/src/utils/reporting.d.ts +16 -0
  63. package/dist/src/utils/reporting.d.ts.map +1 -0
  64. package/dist/src/utils/reporting.spec.d.ts +2 -0
  65. package/dist/src/utils/reporting.spec.d.ts.map +1 -0
  66. package/dist/tsembed-react.es.js +193 -36
  67. package/dist/tsembed-react.js +193 -36
  68. package/dist/tsembed.es.js +240 -37
  69. package/dist/tsembed.js +240 -37
  70. package/dist/visual-embed-sdk-react-full.d.ts +183 -7
  71. package/dist/visual-embed-sdk-react.d.ts +183 -7
  72. package/dist/visual-embed-sdk.d.ts +183 -7
  73. package/lib/package.json +1 -1
  74. package/lib/src/auth.d.ts.map +1 -1
  75. package/lib/src/auth.js +6 -5
  76. package/lib/src/auth.js.map +1 -1
  77. package/lib/src/authToken.d.ts.map +1 -1
  78. package/lib/src/authToken.js +5 -7
  79. package/lib/src/authToken.js.map +1 -1
  80. package/lib/src/embed/app.d.ts +1 -0
  81. package/lib/src/embed/app.d.ts.map +1 -1
  82. package/lib/src/embed/app.js +2 -2
  83. package/lib/src/embed/app.js.map +1 -1
  84. package/lib/src/embed/base.d.ts.map +1 -1
  85. package/lib/src/embed/base.js +2 -0
  86. package/lib/src/embed/base.js.map +1 -1
  87. package/lib/src/embed/search.d.ts +14 -0
  88. package/lib/src/embed/search.d.ts.map +1 -1
  89. package/lib/src/embed/search.js +5 -3
  90. package/lib/src/embed/search.js.map +1 -1
  91. package/lib/src/embed/ts-embed.d.ts +1 -1
  92. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  93. package/lib/src/embed/ts-embed.js +10 -6
  94. package/lib/src/embed/ts-embed.js.map +1 -1
  95. package/lib/src/errors.d.ts +11 -0
  96. package/lib/src/errors.d.ts.map +1 -1
  97. package/lib/src/errors.js +11 -0
  98. package/lib/src/errors.js.map +1 -1
  99. package/lib/src/mixpanel-service.d.ts.map +1 -1
  100. package/lib/src/mixpanel-service.js +2 -1
  101. package/lib/src/mixpanel-service.js.map +1 -1
  102. package/lib/src/react/index.spec.js +1 -1
  103. package/lib/src/react/index.spec.js.map +1 -1
  104. package/lib/src/types.d.ts +167 -6
  105. package/lib/src/types.d.ts.map +1 -1
  106. package/lib/src/types.js +140 -3
  107. package/lib/src/types.js.map +1 -1
  108. package/lib/src/utils/processData.d.ts.map +1 -1
  109. package/lib/src/utils/processData.js +2 -1
  110. package/lib/src/utils/processData.js.map +1 -1
  111. package/lib/src/utils/reporting.d.ts +16 -0
  112. package/lib/src/utils/reporting.d.ts.map +1 -0
  113. package/lib/src/utils/reporting.js +62 -0
  114. package/lib/src/utils/reporting.js.map +1 -0
  115. package/lib/src/utils/reporting.spec.d.ts +2 -0
  116. package/lib/src/utils/reporting.spec.d.ts.map +1 -0
  117. package/lib/src/utils/reporting.spec.js +74 -0
  118. package/lib/src/utils/reporting.spec.js.map +1 -0
  119. package/lib/src/visual-embed-sdk.d.ts +183 -7
  120. package/package.json +1 -1
  121. package/src/auth.ts +6 -5
  122. package/src/authToken.ts +5 -9
  123. package/src/embed/app.ts +3 -1
  124. package/src/embed/base.ts +3 -1
  125. package/src/embed/search.ts +19 -2
  126. package/src/embed/ts-embed.ts +13 -6
  127. package/src/errors.ts +11 -0
  128. package/src/mixpanel-service.ts +2 -1
  129. package/src/react/index.spec.tsx +1 -1
  130. package/src/types.ts +170 -3
  131. package/src/utils/processData.ts +2 -3
  132. package/src/utils/reporting.spec.ts +91 -0
  133. package/src/utils/reporting.ts +71 -0
@@ -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
@@ -1294,6 +1298,7 @@ var EmbedEvent;
1294
1298
  /**
1295
1299
  * Emitted when a user clicks the **Update TML** action on
1296
1300
  * embedded Liveboard.
1301
+ *
1297
1302
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1298
1303
  * @example
1299
1304
  *```js
@@ -1305,6 +1310,7 @@ var EmbedEvent;
1305
1310
  /**
1306
1311
  * Emitted when a user clicks the **Edit TML** action
1307
1312
  * on an embedded Liveboard.
1313
+ *
1308
1314
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1309
1315
  * @example
1310
1316
  *```js
@@ -1914,16 +1920,20 @@ var HostEvent;
1914
1920
  /**
1915
1921
  * Trigger the **Export TML** action on an embedded Liveboard or
1916
1922
  * Answer.
1923
+ *
1917
1924
  * @example
1918
1925
  * ```js
1919
1926
  * liveboardEmbed.trigger(HostEvent.ExportTML)
1920
1927
  * ```
1928
+ *
1921
1929
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1922
1930
  */
1923
1931
  HostEvent["ExportTML"] = "exportTSL";
1924
1932
  /**
1925
1933
  * Trigger the **Edit TML** action on an embedded Liveboard or
1926
1934
  * saved Answers in the full application embedding.
1935
+ *
1936
+ *
1927
1937
  * @example
1928
1938
  * ```js
1929
1939
  * liveboardEmbed.trigger(HostEvent.EditTML)
@@ -2014,13 +2024,15 @@ var HostEvent;
2014
2024
  *
2015
2025
  * @example
2016
2026
  * ```js
2017
- * appEmbed.trigger(HostEvent.CreateMonitor)
2027
+ * searchEmbed.trigger(HostEvent.CreateMonitor)
2018
2028
  * ```
2019
2029
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2020
2030
  */
2021
2031
  HostEvent["CreateMonitor"] = "createMonitor";
2022
2032
  /**
2023
- * Trigger the **Manage alerts** action on a visualization
2033
+ * Trigger the **Manage alerts** action on a KPI chart
2034
+ * in a visualization or saved Answer.
2035
+ *
2024
2036
  * @param - an object with `vizId` as a key
2025
2037
  * @example
2026
2038
  * ```js
@@ -2028,6 +2040,16 @@ var HostEvent;
2028
2040
  * vizId: '730496d6-6903-4601-937e-2c691821af3c'
2029
2041
  * })
2030
2042
  * ```
2043
+ *
2044
+ * @example
2045
+ * ```js
2046
+ * searchEmbed.trigger(HostEvent.ManageMonitor)
2047
+ * ```
2048
+ *
2049
+ * @example
2050
+ * ```js
2051
+ * vizEmbed.trigger(HostEvent.ManageMonitor)
2052
+ * ```
2031
2053
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2032
2054
  */
2033
2055
  HostEvent["ManageMonitor"] = "manageMonitor";
@@ -2038,6 +2060,7 @@ var HostEvent;
2038
2060
  * This event is not supported in visualization embed and search embed.
2039
2061
  * @param - object - To trigger the action for a specific visualization
2040
2062
  * in Liveboard embed, pass in `vizId` as a key.
2063
+ *
2041
2064
  * @example
2042
2065
  * ```js
2043
2066
  * liveboardEmbed.trigger(HostEvent.Edit)
@@ -2304,6 +2327,7 @@ var HostEvent;
2304
2327
  /**
2305
2328
  * Get details of filters applied on the Liveboard.
2306
2329
  * Returns arrays containing Liveboard filter and runtime filter elements.
2330
+ *
2307
2331
  * @example
2308
2332
  * ```js
2309
2333
  * const data = await liveboardEmbed.trigger(HostEvent.GetFilters);
@@ -2605,6 +2629,7 @@ var Param;
2605
2629
  Param["IsFullAppEmbed"] = "isFullAppEmbed";
2606
2630
  Param["IsOnBeforeGetVizDataInterceptEnabled"] = "isOnBeforeGetVizDataInterceptEnabled";
2607
2631
  Param["FocusSearchBarOnRender"] = "focusSearchBarOnRender";
2632
+ Param["DisableRedirectionLinksInNewTab"] = "disableRedirectionLinksInNewTab";
2608
2633
  })(Param || (Param = {}));
2609
2634
  /**
2610
2635
  * ThoughtSpot application pages include actions and menu commands
@@ -2656,6 +2681,7 @@ var Action;
2656
2681
  * The **Save as View** action on the Answer
2657
2682
  * page. Saves an Answer as a View object in the full
2658
2683
  * application embedding mode.
2684
+ *
2659
2685
  * @example
2660
2686
  * ```js
2661
2687
  * disabledActions: [Action.SaveAsView]
@@ -2755,6 +2781,7 @@ var Action;
2755
2781
  */
2756
2782
  Action["ConfigureFilter"] = "configureFilter";
2757
2783
  Action["CollapseDataSources"] = "collapseDataSources";
2784
+ Action["CollapseDataPanel"] = "collapseDataPanel";
2758
2785
  /**
2759
2786
  * The **Choose sources** button on Search page.
2760
2787
  * Allows selecting data sources for search queries.
@@ -3112,6 +3139,7 @@ var Action;
3112
3139
  /**
3113
3140
  * The **Delete** action for Answers in the full application
3114
3141
  * embedding mode.
3142
+ *
3115
3143
  * @example
3116
3144
  * ```js
3117
3145
  * disabledActions: [Action.AnswerDelete]
@@ -3150,12 +3178,15 @@ var Action;
3150
3178
  * The Create alert action on KPI charts.
3151
3179
  * @example
3152
3180
  * ```js
3153
- * disabledActions: [Action.CreateMonitor ]
3181
+ * disabledActions: [Action.CreateMonitor]
3154
3182
  * ```
3155
3183
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
3156
3184
  */
3157
3185
  Action["CreateMonitor"] = "createMonitor";
3158
3186
  /**
3187
+ * @deprecated
3188
+ * Reports errors
3189
+ *
3159
3190
  * @example
3160
3191
  * ```js
3161
3192
  * disabledActions: [Action.ReportError]
@@ -3380,35 +3411,87 @@ var Action;
3380
3411
  */
3381
3412
  Action["RenameModalTitleDescription"] = "renameModalTitleDescription";
3382
3413
  /**
3414
+ *
3415
+ * The **Request Verification** action on the Liveboard.
3416
+ * Triggers a Liveboard verification request.
3417
+ *
3418
+ * @example
3419
+ * ```js
3420
+ * disabledActions: [Action.RequestVerification]
3421
+ * ```
3383
3422
  *
3384
3423
  * @version SDK: 1.25.0 | Thoughtspot: 9.6.0.cl
3385
3424
  */
3386
3425
  Action["RequestVerification"] = "requestVerification";
3387
3426
  /**
3427
+ *
3428
+ * Allows users to mark a Liveboard as verified.
3429
+ *
3430
+ * @example
3431
+ * ```js
3432
+ * disabledActions: [Action.MarkAsVerified]
3433
+ * ```
3388
3434
  * @version SDK: 1.25.0 | Thoughtspot: 9.6.0.cl
3389
3435
  */
3390
3436
  Action["MarkAsVerified"] = "markAsVerified";
3391
3437
  /**
3438
+ * The **Add Tab** action on a Liveboard.
3439
+ * Allows adding a new tab to a Liveboard view.
3440
+ *
3441
+ * @example
3442
+ * ```js
3443
+ * disabledActions: [Action.AddTab]
3444
+ * ```
3392
3445
  * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
3393
3446
  */
3394
3447
  Action["AddTab"] = "addTab";
3395
3448
  /**
3449
+ *
3450
+ * Initiates contextual change analysis on KPI charts.
3451
+ *
3452
+ * @example
3453
+ * ```js
3454
+ * disabledActions: [Action.EnableContextualChangeAnalysis]
3455
+ * ```
3396
3456
  * @version SDK: 1.25.0 | Thoughtspot: 9.6.0.cl
3397
3457
  */
3398
3458
  Action["EnableContextualChangeAnalysis"] = "enableContextualChangeAnalysis";
3399
3459
  /**
3460
+ *
3461
+ * @example
3462
+ * ```js
3463
+ * disabledActions: [Action.ShowSageQuery]
3464
+ * ```
3465
+ *
3400
3466
  * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
3401
3467
  */
3402
3468
  Action["ShowSageQuery"] = "showSageQuery";
3403
3469
  /**
3470
+ *
3471
+ * @example
3472
+ * ```js
3473
+ * disabledActions: [Action.EditSageAnswer]
3474
+ * ```
3404
3475
  * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
3405
3476
  */
3406
3477
  Action["EditSageAnswer"] = "editSageAnswer";
3407
3478
  /**
3479
+ *
3480
+ * This action allows users to send feedback on AI-generated Answers.
3481
+ *
3482
+ * @example
3483
+ * ```js
3484
+ * disabledActions: [Action.SageAnswerFeedback]
3485
+ * ```
3408
3486
  * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
3409
3487
  */
3410
3488
  Action["SageAnswerFeedback"] = "sageAnswerFeedback";
3411
3489
  /**
3490
+ *
3491
+ * @example
3492
+ * ```js
3493
+ * disabledActions: [Action.ModifySageAnswer]
3494
+ * ```
3412
3495
  * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
3413
3496
  */
3414
3497
  Action["ModifySageAnswer"] = "modifySageAnswer";
@@ -3530,6 +3613,60 @@ var Action;
3530
3613
  * @version SDK: 1.27.10 | Thoughtspot: 9.12.5.cl
3531
3614
  */
3532
3615
  Action["AIHighlights"] = "AIHighlights";
3616
+ /**
3617
+ * Action ID for edit schedule action on schedule on homepage
3618
+ * @example
3619
+ * ```js
3620
+ * disabledActions: [Action.EditScheduleHomepage]
3621
+ * ```
3622
+ * @version SDK: 1.34.0 | Thoughtspot: 10.3.0.cl
3623
+ */
3624
+ Action["EditScheduleHomepage"] = "editScheduleHomepage";
3625
+ /**
3626
+ * Action ID for pause schedule action on schedule on homepage
3627
+ * @example
3628
+ * ```js
3629
+ * disabledActions: [Action.PauseScheduleHomepage]
3630
+ * ```
3631
+ * @version SDK: 1.34.0 | Thoughtspot: 10.3.0.cl
3632
+ */
3633
+ Action["PauseScheduleHomepage"] = "pauseScheduleHomepage";
3634
+ /**
3635
+ * Action ID for view schedule run action on schedule on homepage
3636
+ * @example
3637
+ * ```js
3638
+ * disabledActions: [Action.ViewScheduleRunHomepage]
3639
+ * ```
3640
+ * @version SDK: 1.34.0 | Thoughtspot: 10.3.0.cl
3641
+ */
3642
+ Action["ViewScheduleRunHomepage"] = "viewScheduleRunHomepage";
3643
+ /**
3644
+ * Action ID for unsubscribe schedule action on schedule on homepage
3645
+ * @example
3646
+ * ```js
3647
+ * disabledActions: [Action.UnsubscribeScheduleHomepage]
3648
+ * ```
3649
+ * @version SDK: 1.34.0 | Thoughtspot: 10.3.0.cl
3650
+ */
3651
+ Action["UnsubscribeScheduleHomepage"] = "unsubscribeScheduleHomepage";
3652
+ /**
3653
+ * Action ID for delete schedule action on schedule on homepage
3654
+ * @example
3655
+ * ```js
3656
+ * disabledActions: [Action.DeleteScheduleHomepage]
3657
+ * ```
3658
+ * @version SDK: 1.34.0 | Thoughtspot: 10.3.0.cl
3659
+ */
3660
+ Action["DeleteScheduleHomepage"] = "deleteScheduleHomepage";
3661
+ /**
3662
+ * The **Analyze CTA** action on KPI chart.
3663
+ * @example
3664
+ * ```js
3665
+ * disabledActions: [Action.KPIAnalysisCTA]
3666
+ * ```
3667
+ * @version SDK: 1.34.0 | Thoughtspot: 10.3.0.cl
3668
+ */
3669
+ Action["KPIAnalysisCTA"] = "kpiAnalysisCTA";
3533
3670
  })(Action || (Action = {}));
3534
3671
  var PrefetchFeatures;
3535
3672
  (function (PrefetchFeatures) {
@@ -5894,6 +6031,25 @@ class Logger {
5894
6031
  }
5895
6032
  const logger = new Logger();
5896
6033
 
6034
+ const ERROR_MESSAGE = {
6035
+ INVALID_THOUGHTSPOT_HOST: 'Error parsing ThoughtSpot host. Please provide a valid URL.',
6036
+ LIVEBOARD_VIZ_ID_VALIDATION: 'Please select a liveboard to embed.',
6037
+ TRIGGER_TIMED_OUT: 'Trigger timedout in getting response',
6038
+ SEARCHEMBED_BETA_WRANING_MESSAGE: 'Search Embed is in Beta in this release.',
6039
+ SAGE_EMBED_BETA_WARNING_MESSAGE: 'Sage Embed is in Beta in this release.',
6040
+ 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.',
6041
+ 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.',
6042
+ SDK_NOT_INITIALIZED: 'SDK not initialized',
6043
+ SESSION_INFO_FAILED: 'Failed to get session info',
6044
+ INVALID_TOKEN_ERROR: 'Received invalid token from getAuthToken callback or authToken endpoint.',
6045
+ MIXPANEL_TOKEN_NOT_FOUND: 'Mixpanel token not found in session info',
6046
+ PRERENDER_ID_MISSING: 'PreRender id is required for preRender',
6047
+ SYNC_STYLE_CALLED_BEFORE_RENDER: 'PreRender should be called before using syncPreRenderStyle',
6048
+ CSP_VIOLATION_ALERT: 'CSP violation detected. Please check the console errors for more details.',
6049
+ 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',
6050
+ MISSING_REPORTING_OBSERVER: 'ReportingObserver not supported',
6051
+ };
6052
+
5897
6053
  const EndPoints = {
5898
6054
  AUTH_VERIFICATION: '/callosum/v1/session/info',
5899
6055
  SESSION_INFO: '/callosum/v1/session/info',
@@ -6007,9 +6163,6 @@ async function fetchBasicAuthService(thoughtSpotHost, username, password) {
6007
6163
  });
6008
6164
  }
6009
6165
 
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
6166
  let cachedAuthToken = null;
6014
6167
  // This method can be used to get the authToken using the embedConfig
6015
6168
  async function getAuthenticationToken(embedConfig) {
@@ -6040,7 +6193,7 @@ async function getAuthenticationToken(embedConfig) {
6040
6193
  await validateAuthToken(embedConfig, authToken);
6041
6194
  }
6042
6195
  catch (e) {
6043
- logger.error(`Received invalid token from getAuthToken callback or authToken endpoint. Error : ${e.message}`);
6196
+ logger.error(`${ERROR_MESSAGE.INVALID_TOKEN_ERROR} Error : ${e.message}`);
6044
6197
  throw e;
6045
6198
  }
6046
6199
  cachedAuthToken = authToken;
@@ -6062,12 +6215,12 @@ const validateAuthToken = async (embedConfig, authToken, suppressAlert) => {
6062
6215
  if (cachedAuthToken && cachedAuthToken === authToken) {
6063
6216
  if (!embedConfig.suppressErrorAlerts && !suppressAlert) {
6064
6217
  // eslint-disable-next-line no-alert
6065
- alert(DUPLICATE_TOKEN_ERR);
6218
+ alert(ERROR_MESSAGE.DUPLICATE_TOKEN_ERR);
6066
6219
  }
6067
- throw new Error(DUPLICATE_TOKEN_ERR);
6220
+ throw new Error(ERROR_MESSAGE.DUPLICATE_TOKEN_ERR);
6068
6221
  }
6069
6222
  else {
6070
- throw new Error(INVALID_TOKEN_ERR);
6223
+ throw new Error(ERROR_MESSAGE.INVALID_TOKEN_ERROR);
6071
6224
  }
6072
6225
  };
6073
6226
  /**
@@ -6679,14 +6832,6 @@ function getSelectedPointsForUnderlyingDataQuery(selectedPoints) {
6679
6832
  return underlyingDataPoint;
6680
6833
  }
6681
6834
 
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
6835
  /**
6691
6836
  * Copyright (c) 2023
6692
6837
  *
@@ -12781,7 +12926,7 @@ function emptyQueue() {
12781
12926
  function initMixpanel(sessionInfo) {
12782
12927
  var _a;
12783
12928
  if (!sessionInfo || !sessionInfo.mixpanelToken) {
12784
- logger.error('Mixpanel token not found in session info');
12929
+ logger.error(ERROR_MESSAGE.MIXPANEL_TOKEN_NOT_FOUND);
12785
12930
  return;
12786
12931
  }
12787
12932
  // On a public cluster the user is anonymous, so don't set the identify to
@@ -13147,6 +13292,13 @@ EventEmitter.EventEmitter = EventEmitter;
13147
13292
  }
13148
13293
  });
13149
13294
 
13295
+ var ReportType;
13296
+ (function (ReportType) {
13297
+ ReportType["CSP_VIOLATION"] = "csp-violation";
13298
+ ReportType["DEPRECATION"] = "deprecation";
13299
+ ReportType["INTERVENTION"] = "intervention";
13300
+ })(ReportType || (ReportType = {}));
13301
+
13150
13302
  /**
13151
13303
  *
13152
13304
  * @param url
@@ -13318,7 +13470,7 @@ var AuthEvent;
13318
13470
  */
13319
13471
  function notifyAuthSDKSuccess() {
13320
13472
  {
13321
- logger.error('SDK not initialized');
13473
+ logger.error(ERROR_MESSAGE.SDK_NOT_INITIALIZED);
13322
13474
  return;
13323
13475
  }
13324
13476
  }
@@ -13327,7 +13479,7 @@ function notifyAuthSDKSuccess() {
13327
13479
  */
13328
13480
  async function notifyAuthSuccess() {
13329
13481
  {
13330
- logger.error('SDK not initialized');
13482
+ logger.error(ERROR_MESSAGE.SDK_NOT_INITIALIZED);
13331
13483
  return;
13332
13484
  }
13333
13485
  }
@@ -13337,7 +13489,7 @@ async function notifyAuthSuccess() {
13337
13489
  */
13338
13490
  function notifyAuthFailure(failureType) {
13339
13491
  {
13340
- logger.error('SDK not initialized');
13492
+ logger.error(ERROR_MESSAGE.SDK_NOT_INITIALIZED);
13341
13493
  return;
13342
13494
  }
13343
13495
  }
@@ -13346,7 +13498,7 @@ function notifyAuthFailure(failureType) {
13346
13498
  */
13347
13499
  function notifyLogout() {
13348
13500
  {
13349
- logger.error('SDK not initialized');
13501
+ logger.error(ERROR_MESSAGE.SDK_NOT_INITIALIZED);
13350
13502
  return;
13351
13503
  }
13352
13504
  }
@@ -13699,7 +13851,7 @@ function processNoCookieAccess(e, containerEl) {
13699
13851
  if (!ignoreNoCookieAccess) {
13700
13852
  if (!suppressNoCookieAccessAlert && !suppressErrorAlerts) {
13701
13853
  // eslint-disable-next-line no-alert
13702
- 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.');
13854
+ alert(ERROR_MESSAGE.THIRD_PARTY_COOKIE_BLOCKED_ALERT);
13703
13855
  }
13704
13856
  // eslint-disable-next-line no-param-reassign
13705
13857
  containerEl.innerHTML = loginFailedMessage;
@@ -13815,7 +13967,7 @@ function processTrigger(iFrame, messageType, thoughtSpotHost, data) {
13815
13967
  });
13816
13968
  }
13817
13969
 
13818
- var name="@thoughtspot/visual-embed-sdk";var version="1.32.0";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","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};
13970
+ var name="@thoughtspot/visual-embed-sdk";var version="1.32.1";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","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};
13819
13971
 
13820
13972
  /**
13821
13973
  * Copyright (c) 2022
@@ -13913,7 +14065,7 @@ class TsEmbed {
13913
14065
  });
13914
14066
  }
13915
14067
  catch (e) {
13916
- logger.error(`Received invalid token. Error : ${e === null || e === void 0 ? void 0 : e.message}`);
14068
+ logger.error(`${ERROR_MESSAGE.INVALID_TOKEN_ERROR} Error : ${e === null || e === void 0 ? void 0 : e.message}`);
13917
14069
  processAuthFailure(e, this.isPreRendered ? this.preRenderWrapper : this.el);
13918
14070
  }
13919
14071
  }
@@ -14121,7 +14273,7 @@ class TsEmbed {
14121
14273
  if (this.embedConfig.currencyFormat) {
14122
14274
  queryParams[Param.CurrencyFormat] = this.embedConfig.currencyFormat;
14123
14275
  }
14124
- const { disabledActions, disabledActionReason, hiddenActions, visibleActions, hiddenTabs, visibleTabs, showAlerts, additionalFlags, locale, customizations, contextMenuTrigger, linkOverride, insertInToSlide, } = this.viewConfig;
14276
+ const { disabledActions, disabledActionReason, hiddenActions, visibleActions, hiddenTabs, visibleTabs, showAlerts, additionalFlags, locale, customizations, contextMenuTrigger, linkOverride, insertInToSlide, disableRedirectionLinksInNewTab, } = this.viewConfig;
14125
14277
  if (Array.isArray(visibleActions) && Array.isArray(hiddenActions)) {
14126
14278
  this.handleError('You cannot have both hidden actions and visible actions');
14127
14279
  return queryParams;
@@ -14182,6 +14334,9 @@ class TsEmbed {
14182
14334
  if (insertInToSlide) {
14183
14335
  queryParams[Param.ShowInsertToSlide] = insertInToSlide;
14184
14336
  }
14337
+ if (disableRedirectionLinksInNewTab) {
14338
+ queryParams[Param.DisableRedirectionLinksInNewTab] = disableRedirectionLinksInNewTab;
14339
+ }
14185
14340
  queryParams[Param.OverrideNativeConsole] = true;
14186
14341
  queryParams[Param.ClientLogLevel] = this.embedConfig.logLevel;
14187
14342
  return queryParams;
@@ -14226,7 +14381,7 @@ class TsEmbed {
14226
14381
  iFrame.mozallowfullscreen = true;
14227
14382
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
14228
14383
  // @ts-ignore
14229
- iFrame.allow = 'clipboard-read; clipboard-write';
14384
+ iFrame.allow = 'clipboard-read; clipboard-write fullscreen';
14230
14385
  const { height: frameHeight, width: frameWidth, ...restParams } = this.viewConfig.frameParams || {};
14231
14386
  const width = getCssDimension(frameWidth || DEFAULT_EMBED_WIDTH);
14232
14387
  const height = getCssDimension(frameHeight || DEFAULT_EMBED_HEIGHT);
@@ -14609,7 +14764,7 @@ class TsEmbed {
14609
14764
  */
14610
14765
  preRender(showPreRenderByDefault = false) {
14611
14766
  if (!this.viewConfig.preRenderId) {
14612
- logger.error('PreRender id is required for preRender');
14767
+ logger.error(ERROR_MESSAGE.PRERENDER_ID_MISSING);
14613
14768
  return this;
14614
14769
  }
14615
14770
  this.isPreRendered = true;
@@ -14682,7 +14837,7 @@ class TsEmbed {
14682
14837
  */
14683
14838
  showPreRender() {
14684
14839
  if (!this.viewConfig.preRenderId) {
14685
- logger.error('PreRender id is required for preRender');
14840
+ logger.error(ERROR_MESSAGE.PRERENDER_ID_MISSING);
14686
14841
  return;
14687
14842
  }
14688
14843
  if (!this.isPreRenderAvailable()) {
@@ -14724,7 +14879,7 @@ class TsEmbed {
14724
14879
  */
14725
14880
  syncPreRenderStyle() {
14726
14881
  if (!this.isPreRenderAvailable() || !this.el) {
14727
- logger.error('PreRender should be called before using syncPreRenderStyle');
14882
+ logger.error(ERROR_MESSAGE.SYNC_STYLE_CALLED_BEFORE_RENDER);
14728
14883
  return;
14729
14884
  }
14730
14885
  const elBoundingClient = this.el.getBoundingClientRect();
@@ -15028,7 +15183,8 @@ class SearchEmbed extends TsEmbed {
15028
15183
  */
15029
15184
  getDataSourceMode() {
15030
15185
  let dataSourceMode = DataSourceVisualMode.Expanded;
15031
- if (this.viewConfig.collapseDataSources === true) {
15186
+ if (this.viewConfig.collapseDataSources === true
15187
+ || this.viewConfig.collapseDataPanel === true) {
15032
15188
  dataSourceMode = DataSourceVisualMode.Collapsed;
15033
15189
  }
15034
15190
  if (this.viewConfig.hideDataSources === true) {
@@ -15040,7 +15196,7 @@ class SearchEmbed extends TsEmbed {
15040
15196
  var _a;
15041
15197
  const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, hideSearchBar, dataPanelV2 = false, useLastSelectedSources = false, runtimeParameters, collapseSearchBarInitially = false, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false,
15042
15198
  /* eslint-disable-next-line max-len */
15043
- dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, focusSearchBarOnRender = true, excludeRuntimeParametersfromURL, } = this.viewConfig;
15199
+ dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, focusSearchBarOnRender = true, excludeRuntimeParametersfromURL, collapseSearchBar = true, } = this.viewConfig;
15044
15200
  const queryParams = this.getBaseQueryParams();
15045
15201
  queryParams[Param.HideActions] = [
15046
15202
  ...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : []),
@@ -15084,7 +15240,8 @@ class SearchEmbed extends TsEmbed {
15084
15240
  queryParams[Param.UseLastSelectedDataSource] = false;
15085
15241
  }
15086
15242
  queryParams[Param.searchEmbed] = true;
15087
- queryParams[Param.CollapseSearchBarInitially] = collapseSearchBarInitially;
15243
+ /* eslint-disable-next-line max-len */
15244
+ queryParams[Param.CollapseSearchBarInitially] = collapseSearchBarInitially || collapseSearchBar;
15088
15245
  queryParams[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
15089
15246
  if (dataPanelCustomGroupsAccordionInitialState
15090
15247
  === DataPanelCustomColumnGroupsAccordionState.COLLAPSE_ALL
@@ -15246,7 +15403,7 @@ class AppEmbed extends V1Embed {
15246
15403
  getEmbedParams() {
15247
15404
  const { tag, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 = false, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, hideHomepageLeftNav = false, modularHomeExperience = false, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, enable2ColumnLayout, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false,
15248
15405
  /* eslint-disable-next-line max-len */
15249
- dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL, } = this.viewConfig;
15406
+ dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL, collapseSearchBar = true, } = this.viewConfig;
15250
15407
  let params = {};
15251
15408
  params[Param.EmbedApp] = true;
15252
15409
  params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
@@ -15287,7 +15444,7 @@ class AppEmbed extends V1Embed {
15287
15444
  params[Param.DataPanelV2Enabled] = dataPanelV2;
15288
15445
  params[Param.HideHomepageLeftNav] = hideHomepageLeftNav;
15289
15446
  params[Param.ModularHomeExperienceEnabled] = modularHomeExperience;
15290
- params[Param.CollapseSearchBarInitially] = collapseSearchBarInitially;
15447
+ params[Param.CollapseSearchBarInitially] = collapseSearchBarInitially || collapseSearchBar;
15291
15448
  params[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
15292
15449
  if (dataPanelCustomGroupsAccordionInitialState
15293
15450
  === DataPanelCustomColumnGroupsAccordionState$1.COLLAPSE_ALL