@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
@@ -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
@@ -1180,6 +1184,7 @@ var EmbedEvent;
1180
1184
  /**
1181
1185
  * Emitted when a user clicks the **Update TML** action on
1182
1186
  * embedded Liveboard.
1187
+ *
1183
1188
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1184
1189
  * @example
1185
1190
  *```js
@@ -1191,6 +1196,7 @@ var EmbedEvent;
1191
1196
  /**
1192
1197
  * Emitted when a user clicks the **Edit TML** action
1193
1198
  * on an embedded Liveboard.
1199
+ *
1194
1200
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1195
1201
  * @example
1196
1202
  *```js
@@ -1800,16 +1806,20 @@ var HostEvent;
1800
1806
  /**
1801
1807
  * Trigger the **Export TML** action on an embedded Liveboard or
1802
1808
  * Answer.
1809
+ *
1803
1810
  * @example
1804
1811
  * ```js
1805
1812
  * liveboardEmbed.trigger(HostEvent.ExportTML)
1806
1813
  * ```
1814
+ *
1807
1815
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1808
1816
  */
1809
1817
  HostEvent["ExportTML"] = "exportTSL";
1810
1818
  /**
1811
1819
  * Trigger the **Edit TML** action on an embedded Liveboard or
1812
1820
  * saved Answers in the full application embedding.
1821
+ *
1822
+ *
1813
1823
  * @example
1814
1824
  * ```js
1815
1825
  * liveboardEmbed.trigger(HostEvent.EditTML)
@@ -1900,13 +1910,15 @@ var HostEvent;
1900
1910
  *
1901
1911
  * @example
1902
1912
  * ```js
1903
- * appEmbed.trigger(HostEvent.CreateMonitor)
1913
+ * searchEmbed.trigger(HostEvent.CreateMonitor)
1904
1914
  * ```
1905
1915
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1906
1916
  */
1907
1917
  HostEvent["CreateMonitor"] = "createMonitor";
1908
1918
  /**
1909
- * Trigger the **Manage alerts** action on a visualization
1919
+ * Trigger the **Manage alerts** action on a KPI chart
1920
+ * in a visualization or saved Answer.
1921
+ *
1910
1922
  * @param - an object with `vizId` as a key
1911
1923
  * @example
1912
1924
  * ```js
@@ -1914,6 +1926,16 @@ var HostEvent;
1914
1926
  * vizId: '730496d6-6903-4601-937e-2c691821af3c'
1915
1927
  * })
1916
1928
  * ```
1929
+ *
1930
+ * @example
1931
+ * ```js
1932
+ * searchEmbed.trigger(HostEvent.ManageMonitor)
1933
+ * ```
1934
+ *
1935
+ * @example
1936
+ * ```js
1937
+ * vizEmbed.trigger(HostEvent.ManageMonitor)
1938
+ * ```
1917
1939
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1918
1940
  */
1919
1941
  HostEvent["ManageMonitor"] = "manageMonitor";
@@ -1924,6 +1946,7 @@ var HostEvent;
1924
1946
  * This event is not supported in visualization embed and search embed.
1925
1947
  * @param - object - To trigger the action for a specific visualization
1926
1948
  * in Liveboard embed, pass in `vizId` as a key.
1949
+ *
1927
1950
  * @example
1928
1951
  * ```js
1929
1952
  * liveboardEmbed.trigger(HostEvent.Edit)
@@ -2190,6 +2213,7 @@ var HostEvent;
2190
2213
  /**
2191
2214
  * Get details of filters applied on the Liveboard.
2192
2215
  * Returns arrays containing Liveboard filter and runtime filter elements.
2216
+ *
2193
2217
  * @example
2194
2218
  * ```js
2195
2219
  * const data = await liveboardEmbed.trigger(HostEvent.GetFilters);
@@ -2491,6 +2515,7 @@ var Param;
2491
2515
  Param["IsFullAppEmbed"] = "isFullAppEmbed";
2492
2516
  Param["IsOnBeforeGetVizDataInterceptEnabled"] = "isOnBeforeGetVizDataInterceptEnabled";
2493
2517
  Param["FocusSearchBarOnRender"] = "focusSearchBarOnRender";
2518
+ Param["DisableRedirectionLinksInNewTab"] = "disableRedirectionLinksInNewTab";
2494
2519
  })(Param || (Param = {}));
2495
2520
  /**
2496
2521
  * ThoughtSpot application pages include actions and menu commands
@@ -2542,6 +2567,7 @@ var Action;
2542
2567
  * The **Save as View** action on the Answer
2543
2568
  * page. Saves an Answer as a View object in the full
2544
2569
  * application embedding mode.
2570
+ *
2545
2571
  * @example
2546
2572
  * ```js
2547
2573
  * disabledActions: [Action.SaveAsView]
@@ -2641,6 +2667,7 @@ var Action;
2641
2667
  */
2642
2668
  Action["ConfigureFilter"] = "configureFilter";
2643
2669
  Action["CollapseDataSources"] = "collapseDataSources";
2670
+ Action["CollapseDataPanel"] = "collapseDataPanel";
2644
2671
  /**
2645
2672
  * The **Choose sources** button on Search page.
2646
2673
  * Allows selecting data sources for search queries.
@@ -2998,6 +3025,7 @@ var Action;
2998
3025
  /**
2999
3026
  * The **Delete** action for Answers in the full application
3000
3027
  * embedding mode.
3028
+ *
3001
3029
  * @example
3002
3030
  * ```js
3003
3031
  * disabledActions: [Action.AnswerDelete]
@@ -3036,12 +3064,15 @@ var Action;
3036
3064
  * The Create alert action on KPI charts.
3037
3065
  * @example
3038
3066
  * ```js
3039
- * disabledActions: [Action.CreateMonitor ]
3067
+ * disabledActions: [Action.CreateMonitor]
3040
3068
  * ```
3041
3069
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
3042
3070
  */
3043
3071
  Action["CreateMonitor"] = "createMonitor";
3044
3072
  /**
3073
+ * @deprecated
3074
+ * Reports errors
3075
+ *
3045
3076
  * @example
3046
3077
  * ```js
3047
3078
  * disabledActions: [Action.ReportError]
@@ -3266,35 +3297,87 @@ var Action;
3266
3297
  */
3267
3298
  Action["RenameModalTitleDescription"] = "renameModalTitleDescription";
3268
3299
  /**
3300
+ *
3301
+ * The **Request Verification** action on the Liveboard.
3302
+ * Triggers a Liveboard verification request.
3303
+ *
3304
+ * @example
3305
+ * ```js
3306
+ * disabledActions: [Action.RequestVerification]
3307
+ * ```
3269
3308
  *
3270
3309
  * @version SDK: 1.25.0 | Thoughtspot: 9.6.0.cl
3271
3310
  */
3272
3311
  Action["RequestVerification"] = "requestVerification";
3273
3312
  /**
3313
+ *
3314
+ * Allows users to mark a Liveboard as verified.
3315
+ *
3316
+ * @example
3317
+ * ```js
3318
+ * disabledActions: [Action.MarkAsVerified]
3319
+ * ```
3274
3320
  * @version SDK: 1.25.0 | Thoughtspot: 9.6.0.cl
3275
3321
  */
3276
3322
  Action["MarkAsVerified"] = "markAsVerified";
3277
3323
  /**
3324
+ * The **Add Tab** action on a Liveboard.
3325
+ * Allows adding a new tab to a Liveboard view.
3326
+ *
3327
+ * @example
3328
+ * ```js
3329
+ * disabledActions: [Action.AddTab]
3330
+ * ```
3278
3331
  * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
3279
3332
  */
3280
3333
  Action["AddTab"] = "addTab";
3281
3334
  /**
3335
+ *
3336
+ * Initiates contextual change analysis on KPI charts.
3337
+ *
3338
+ * @example
3339
+ * ```js
3340
+ * disabledActions: [Action.EnableContextualChangeAnalysis]
3341
+ * ```
3282
3342
  * @version SDK: 1.25.0 | Thoughtspot: 9.6.0.cl
3283
3343
  */
3284
3344
  Action["EnableContextualChangeAnalysis"] = "enableContextualChangeAnalysis";
3285
3345
  /**
3346
+ *
3347
+ * @example
3348
+ * ```js
3349
+ * disabledActions: [Action.ShowSageQuery]
3350
+ * ```
3351
+ *
3286
3352
  * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
3287
3353
  */
3288
3354
  Action["ShowSageQuery"] = "showSageQuery";
3289
3355
  /**
3356
+ *
3357
+ * @example
3358
+ * ```js
3359
+ * disabledActions: [Action.EditSageAnswer]
3360
+ * ```
3290
3361
  * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
3291
3362
  */
3292
3363
  Action["EditSageAnswer"] = "editSageAnswer";
3293
3364
  /**
3365
+ *
3366
+ * This action allows users to send feedback on AI-generated Answers.
3367
+ *
3368
+ * @example
3369
+ * ```js
3370
+ * disabledActions: [Action.SageAnswerFeedback]
3371
+ * ```
3294
3372
  * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
3295
3373
  */
3296
3374
  Action["SageAnswerFeedback"] = "sageAnswerFeedback";
3297
3375
  /**
3376
+ *
3377
+ * @example
3378
+ * ```js
3379
+ * disabledActions: [Action.ModifySageAnswer]
3380
+ * ```
3298
3381
  * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
3299
3382
  */
3300
3383
  Action["ModifySageAnswer"] = "modifySageAnswer";
@@ -3416,6 +3499,60 @@ var Action;
3416
3499
  * @version SDK: 1.27.10 | Thoughtspot: 9.12.5.cl
3417
3500
  */
3418
3501
  Action["AIHighlights"] = "AIHighlights";
3502
+ /**
3503
+ * Action ID for edit schedule action on schedule on homepage
3504
+ * @example
3505
+ * ```js
3506
+ * disabledActions: [Action.EditScheduleHomepage]
3507
+ * ```
3508
+ * @version SDK: 1.34.0 | Thoughtspot: 10.3.0.cl
3509
+ */
3510
+ Action["EditScheduleHomepage"] = "editScheduleHomepage";
3511
+ /**
3512
+ * Action ID for pause schedule action on schedule on homepage
3513
+ * @example
3514
+ * ```js
3515
+ * disabledActions: [Action.PauseScheduleHomepage]
3516
+ * ```
3517
+ * @version SDK: 1.34.0 | Thoughtspot: 10.3.0.cl
3518
+ */
3519
+ Action["PauseScheduleHomepage"] = "pauseScheduleHomepage";
3520
+ /**
3521
+ * Action ID for view schedule run action on schedule on homepage
3522
+ * @example
3523
+ * ```js
3524
+ * disabledActions: [Action.ViewScheduleRunHomepage]
3525
+ * ```
3526
+ * @version SDK: 1.34.0 | Thoughtspot: 10.3.0.cl
3527
+ */
3528
+ Action["ViewScheduleRunHomepage"] = "viewScheduleRunHomepage";
3529
+ /**
3530
+ * Action ID for unsubscribe schedule action on schedule on homepage
3531
+ * @example
3532
+ * ```js
3533
+ * disabledActions: [Action.UnsubscribeScheduleHomepage]
3534
+ * ```
3535
+ * @version SDK: 1.34.0 | Thoughtspot: 10.3.0.cl
3536
+ */
3537
+ Action["UnsubscribeScheduleHomepage"] = "unsubscribeScheduleHomepage";
3538
+ /**
3539
+ * Action ID for delete schedule action on schedule on homepage
3540
+ * @example
3541
+ * ```js
3542
+ * disabledActions: [Action.DeleteScheduleHomepage]
3543
+ * ```
3544
+ * @version SDK: 1.34.0 | Thoughtspot: 10.3.0.cl
3545
+ */
3546
+ Action["DeleteScheduleHomepage"] = "deleteScheduleHomepage";
3547
+ /**
3548
+ * The **Analyze CTA** action on KPI chart.
3549
+ * @example
3550
+ * ```js
3551
+ * disabledActions: [Action.KPIAnalysisCTA]
3552
+ * ```
3553
+ * @version SDK: 1.34.0 | Thoughtspot: 10.3.0.cl
3554
+ */
3555
+ Action["KPIAnalysisCTA"] = "kpiAnalysisCTA";
3419
3556
  })(Action || (Action = {}));
3420
3557
  var PrefetchFeatures;
3421
3558
  (function (PrefetchFeatures) {
@@ -5783,6 +5920,25 @@ function isEqual(value, other) {
5783
5920
 
5784
5921
  var isEqual_1 = isEqual;
5785
5922
 
5923
+ const ERROR_MESSAGE = {
5924
+ INVALID_THOUGHTSPOT_HOST: 'Error parsing ThoughtSpot host. Please provide a valid URL.',
5925
+ LIVEBOARD_VIZ_ID_VALIDATION: 'Please select a liveboard to embed.',
5926
+ TRIGGER_TIMED_OUT: 'Trigger timedout in getting response',
5927
+ SEARCHEMBED_BETA_WRANING_MESSAGE: 'Search Embed is in Beta in this release.',
5928
+ SAGE_EMBED_BETA_WARNING_MESSAGE: 'Sage Embed is in Beta in this release.',
5929
+ 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.',
5930
+ 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.',
5931
+ SDK_NOT_INITIALIZED: 'SDK not initialized',
5932
+ SESSION_INFO_FAILED: 'Failed to get session info',
5933
+ INVALID_TOKEN_ERROR: 'Received invalid token from getAuthToken callback or authToken endpoint.',
5934
+ MIXPANEL_TOKEN_NOT_FOUND: 'Mixpanel token not found in session info',
5935
+ PRERENDER_ID_MISSING: 'PreRender id is required for preRender',
5936
+ SYNC_STYLE_CALLED_BEFORE_RENDER: 'PreRender should be called before using syncPreRenderStyle',
5937
+ CSP_VIOLATION_ALERT: 'CSP violation detected. Please check the console errors for more details.',
5938
+ 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',
5939
+ MISSING_REPORTING_OBSERVER: 'ReportingObserver not supported',
5940
+ };
5941
+
5786
5942
  const EndPoints = {
5787
5943
  AUTH_VERIFICATION: '/callosum/v1/session/info',
5788
5944
  SESSION_INFO: '/callosum/v1/session/info',
@@ -5896,9 +6052,6 @@ async function fetchBasicAuthService(thoughtSpotHost, username, password) {
5896
6052
  });
5897
6053
  }
5898
6054
 
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
6055
  let cachedAuthToken = null;
5903
6056
  // This method can be used to get the authToken using the embedConfig
5904
6057
  async function getAuthenticationToken(embedConfig) {
@@ -5929,7 +6082,7 @@ async function getAuthenticationToken(embedConfig) {
5929
6082
  await validateAuthToken(embedConfig, authToken);
5930
6083
  }
5931
6084
  catch (e) {
5932
- logger.error(`Received invalid token from getAuthToken callback or authToken endpoint. Error : ${e.message}`);
6085
+ logger.error(`${ERROR_MESSAGE.INVALID_TOKEN_ERROR} Error : ${e.message}`);
5933
6086
  throw e;
5934
6087
  }
5935
6088
  cachedAuthToken = authToken;
@@ -5951,12 +6104,12 @@ const validateAuthToken = async (embedConfig, authToken, suppressAlert) => {
5951
6104
  if (cachedAuthToken && cachedAuthToken === authToken) {
5952
6105
  if (!embedConfig.suppressErrorAlerts && !suppressAlert) {
5953
6106
  // eslint-disable-next-line no-alert
5954
- alert(DUPLICATE_TOKEN_ERR);
6107
+ alert(ERROR_MESSAGE.DUPLICATE_TOKEN_ERR);
5955
6108
  }
5956
- throw new Error(DUPLICATE_TOKEN_ERR);
6109
+ throw new Error(ERROR_MESSAGE.DUPLICATE_TOKEN_ERR);
5957
6110
  }
5958
6111
  else {
5959
- throw new Error(INVALID_TOKEN_ERR);
6112
+ throw new Error(ERROR_MESSAGE.INVALID_TOKEN_ERROR);
5960
6113
  }
5961
6114
  };
5962
6115
  /**
@@ -6579,14 +6732,6 @@ function getSelectedPointsForUnderlyingDataQuery(selectedPoints) {
6579
6732
  return underlyingDataPoint;
6580
6733
  }
6581
6734
 
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
6735
  /**
6591
6736
  * Copyright (c) 2023
6592
6737
  *
@@ -12681,7 +12826,7 @@ function emptyQueue() {
12681
12826
  function initMixpanel(sessionInfo) {
12682
12827
  var _a;
12683
12828
  if (!sessionInfo || !sessionInfo.mixpanelToken) {
12684
- logger.error('Mixpanel token not found in session info');
12829
+ logger.error(ERROR_MESSAGE.MIXPANEL_TOKEN_NOT_FOUND);
12685
12830
  return;
12686
12831
  }
12687
12832
  // On a public cluster the user is anonymous, so don't set the identify to
@@ -13047,6 +13192,58 @@ EventEmitter.EventEmitter = EventEmitter;
13047
13192
  }
13048
13193
  });
13049
13194
 
13195
+ var ReportType;
13196
+ (function (ReportType) {
13197
+ ReportType["CSP_VIOLATION"] = "csp-violation";
13198
+ ReportType["DEPRECATION"] = "deprecation";
13199
+ ReportType["INTERVENTION"] = "intervention";
13200
+ })(ReportType || (ReportType = {}));
13201
+ let globalObserver = null;
13202
+ /**
13203
+ * Register a global ReportingObserver to capture all unhandled errors
13204
+ * @param overrideExisting boolean to override existing observer
13205
+ * @returns ReportingObserver | null
13206
+ */
13207
+ function registerReportingObserver(overrideExisting = false) {
13208
+ if (!(window.ReportingObserver)) {
13209
+ logger.warn(ERROR_MESSAGE.MISSING_REPORTING_OBSERVER);
13210
+ return null;
13211
+ }
13212
+ if (overrideExisting) {
13213
+ resetGlobalReportingObserver();
13214
+ }
13215
+ if (globalObserver) {
13216
+ return globalObserver;
13217
+ }
13218
+ const embedConfig = getEmbedConfig();
13219
+ globalObserver = new ReportingObserver((reports) => {
13220
+ reports.forEach((report) => {
13221
+ const { type, url, body } = report;
13222
+ const reportBody = body;
13223
+ const isThoughtSpotHost = url
13224
+ && url.startsWith(embedConfig.thoughtSpotHost);
13225
+ const isFrameHostError = type === ReportType.CSP_VIOLATION
13226
+ && reportBody.effectiveDirective === 'frame-ancestors';
13227
+ if (isThoughtSpotHost && isFrameHostError) {
13228
+ if (!embedConfig.suppressErrorAlerts) {
13229
+ alert(ERROR_MESSAGE.CSP_VIOLATION_ALERT);
13230
+ }
13231
+ logger.error(ERROR_MESSAGE.CSP_FRAME_HOST_VIOLATION_LOG_MESSAGE);
13232
+ }
13233
+ });
13234
+ }, { buffered: true });
13235
+ globalObserver.observe();
13236
+ return globalObserver;
13237
+ }
13238
+ /**
13239
+ * Resets the global ReportingObserver
13240
+ */
13241
+ function resetGlobalReportingObserver() {
13242
+ if (globalObserver)
13243
+ globalObserver.disconnect();
13244
+ globalObserver = null;
13245
+ }
13246
+
13050
13247
  /**
13051
13248
  *
13052
13249
  * @param url
@@ -13239,7 +13436,7 @@ function setAuthEE(eventEmitter) {
13239
13436
  */
13240
13437
  function notifyAuthSDKSuccess() {
13241
13438
  if (!authEE) {
13242
- logger.error('SDK not initialized');
13439
+ logger.error(ERROR_MESSAGE.SDK_NOT_INITIALIZED);
13243
13440
  return;
13244
13441
  }
13245
13442
  authEE.emit(AuthStatus.SDK_SUCCESS);
@@ -13249,7 +13446,7 @@ function notifyAuthSDKSuccess() {
13249
13446
  */
13250
13447
  async function notifyAuthSuccess() {
13251
13448
  if (!authEE) {
13252
- logger.error('SDK not initialized');
13449
+ logger.error(ERROR_MESSAGE.SDK_NOT_INITIALIZED);
13253
13450
  return;
13254
13451
  }
13255
13452
  try {
@@ -13257,7 +13454,7 @@ async function notifyAuthSuccess() {
13257
13454
  authEE.emit(AuthStatus.SUCCESS, sessionInfo);
13258
13455
  }
13259
13456
  catch (e) {
13260
- logger.error('Failed to get session info');
13457
+ logger.error(ERROR_MESSAGE.SESSION_INFO_FAILED);
13261
13458
  }
13262
13459
  }
13263
13460
  /**
@@ -13266,7 +13463,7 @@ async function notifyAuthSuccess() {
13266
13463
  */
13267
13464
  function notifyAuthFailure(failureType) {
13268
13465
  if (!authEE) {
13269
- logger.error('SDK not initialized');
13466
+ logger.error(ERROR_MESSAGE.SDK_NOT_INITIALIZED);
13270
13467
  return;
13271
13468
  }
13272
13469
  authEE.emit(AuthStatus.FAILURE, failureType);
@@ -13276,7 +13473,7 @@ function notifyAuthFailure(failureType) {
13276
13473
  */
13277
13474
  function notifyLogout() {
13278
13475
  if (!authEE) {
13279
- logger.error('SDK not initialized');
13476
+ logger.error(ERROR_MESSAGE.SDK_NOT_INITIALIZED);
13280
13477
  return;
13281
13478
  }
13282
13479
  authEE.emit(AuthStatus.LOGOUT);
@@ -13670,6 +13867,7 @@ const init = (embedConfig) => {
13670
13867
  thoughtSpotHost: getThoughtSpotHost(embedConfig),
13671
13868
  }));
13672
13869
  setGlobalLogLevelOverride(embedConfig.logLevel);
13870
+ registerReportingObserver();
13673
13871
  const authEE = new eventemitter3();
13674
13872
  setAuthEE(authEE);
13675
13873
  handleAuth();
@@ -13887,7 +14085,7 @@ function processNoCookieAccess(e, containerEl) {
13887
14085
  if (!ignoreNoCookieAccess) {
13888
14086
  if (!suppressNoCookieAccessAlert && !suppressErrorAlerts) {
13889
14087
  // eslint-disable-next-line no-alert
13890
- 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.');
14088
+ alert(ERROR_MESSAGE.THIRD_PARTY_COOKIE_BLOCKED_ALERT);
13891
14089
  }
13892
14090
  // eslint-disable-next-line no-param-reassign
13893
14091
  containerEl.innerHTML = loginFailedMessage;
@@ -14003,7 +14201,7 @@ function processTrigger(iFrame, messageType, thoughtSpotHost, data) {
14003
14201
  });
14004
14202
  }
14005
14203
 
14006
- 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};
14204
+ 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};
14007
14205
 
14008
14206
  /**
14009
14207
  * Copyright (c) 2022
@@ -14101,7 +14299,7 @@ class TsEmbed {
14101
14299
  });
14102
14300
  }
14103
14301
  catch (e) {
14104
- logger.error(`Received invalid token. Error : ${e === null || e === void 0 ? void 0 : e.message}`);
14302
+ logger.error(`${ERROR_MESSAGE.INVALID_TOKEN_ERROR} Error : ${e === null || e === void 0 ? void 0 : e.message}`);
14105
14303
  processAuthFailure(e, this.isPreRendered ? this.preRenderWrapper : this.el);
14106
14304
  }
14107
14305
  }
@@ -14309,7 +14507,7 @@ class TsEmbed {
14309
14507
  if (this.embedConfig.currencyFormat) {
14310
14508
  queryParams[Param.CurrencyFormat] = this.embedConfig.currencyFormat;
14311
14509
  }
14312
- const { disabledActions, disabledActionReason, hiddenActions, visibleActions, hiddenTabs, visibleTabs, showAlerts, additionalFlags, locale, customizations, contextMenuTrigger, linkOverride, insertInToSlide, } = this.viewConfig;
14510
+ const { disabledActions, disabledActionReason, hiddenActions, visibleActions, hiddenTabs, visibleTabs, showAlerts, additionalFlags, locale, customizations, contextMenuTrigger, linkOverride, insertInToSlide, disableRedirectionLinksInNewTab, } = this.viewConfig;
14313
14511
  if (Array.isArray(visibleActions) && Array.isArray(hiddenActions)) {
14314
14512
  this.handleError('You cannot have both hidden actions and visible actions');
14315
14513
  return queryParams;
@@ -14370,6 +14568,9 @@ class TsEmbed {
14370
14568
  if (insertInToSlide) {
14371
14569
  queryParams[Param.ShowInsertToSlide] = insertInToSlide;
14372
14570
  }
14571
+ if (disableRedirectionLinksInNewTab) {
14572
+ queryParams[Param.DisableRedirectionLinksInNewTab] = disableRedirectionLinksInNewTab;
14573
+ }
14373
14574
  queryParams[Param.OverrideNativeConsole] = true;
14374
14575
  queryParams[Param.ClientLogLevel] = this.embedConfig.logLevel;
14375
14576
  return queryParams;
@@ -14414,7 +14615,7 @@ class TsEmbed {
14414
14615
  iFrame.mozallowfullscreen = true;
14415
14616
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
14416
14617
  // @ts-ignore
14417
- iFrame.allow = 'clipboard-read; clipboard-write';
14618
+ iFrame.allow = 'clipboard-read; clipboard-write fullscreen';
14418
14619
  const { height: frameHeight, width: frameWidth, ...restParams } = this.viewConfig.frameParams || {};
14419
14620
  const width = getCssDimension(frameWidth || DEFAULT_EMBED_WIDTH);
14420
14621
  const height = getCssDimension(frameHeight || DEFAULT_EMBED_HEIGHT);
@@ -14797,7 +14998,7 @@ class TsEmbed {
14797
14998
  */
14798
14999
  preRender(showPreRenderByDefault = false) {
14799
15000
  if (!this.viewConfig.preRenderId) {
14800
- logger.error('PreRender id is required for preRender');
15001
+ logger.error(ERROR_MESSAGE.PRERENDER_ID_MISSING);
14801
15002
  return this;
14802
15003
  }
14803
15004
  this.isPreRendered = true;
@@ -14870,7 +15071,7 @@ class TsEmbed {
14870
15071
  */
14871
15072
  showPreRender() {
14872
15073
  if (!this.viewConfig.preRenderId) {
14873
- logger.error('PreRender id is required for preRender');
15074
+ logger.error(ERROR_MESSAGE.PRERENDER_ID_MISSING);
14874
15075
  return;
14875
15076
  }
14876
15077
  if (!this.isPreRenderAvailable()) {
@@ -14912,7 +15113,7 @@ class TsEmbed {
14912
15113
  */
14913
15114
  syncPreRenderStyle() {
14914
15115
  if (!this.isPreRenderAvailable() || !this.el) {
14915
- logger.error('PreRender should be called before using syncPreRenderStyle');
15116
+ logger.error(ERROR_MESSAGE.SYNC_STYLE_CALLED_BEFORE_RENDER);
14916
15117
  return;
14917
15118
  }
14918
15119
  const elBoundingClient = this.el.getBoundingClientRect();
@@ -15139,7 +15340,7 @@ class AppEmbed extends V1Embed {
15139
15340
  getEmbedParams() {
15140
15341
  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,
15141
15342
  /* eslint-disable-next-line max-len */
15142
- dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, } = this.viewConfig;
15343
+ dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, collapseSearchBar = true, } = this.viewConfig;
15143
15344
  let params = {};
15144
15345
  params[Param.EmbedApp] = true;
15145
15346
  params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
@@ -15180,7 +15381,7 @@ class AppEmbed extends V1Embed {
15180
15381
  params[Param.DataPanelV2Enabled] = dataPanelV2;
15181
15382
  params[Param.HideHomepageLeftNav] = hideHomepageLeftNav;
15182
15383
  params[Param.ModularHomeExperienceEnabled] = modularHomeExperience;
15183
- params[Param.CollapseSearchBarInitially] = collapseSearchBarInitially;
15384
+ params[Param.CollapseSearchBarInitially] = collapseSearchBarInitially || collapseSearchBar;
15184
15385
  params[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
15185
15386
  if (dataPanelCustomGroupsAccordionInitialState
15186
15387
  === DataPanelCustomColumnGroupsAccordionState.COLLAPSE_ALL
@@ -15641,7 +15842,8 @@ class SearchEmbed extends TsEmbed {
15641
15842
  */
15642
15843
  getDataSourceMode() {
15643
15844
  let dataSourceMode = DataSourceVisualMode.Expanded;
15644
- if (this.viewConfig.collapseDataSources === true) {
15845
+ if (this.viewConfig.collapseDataSources === true
15846
+ || this.viewConfig.collapseDataPanel === true) {
15645
15847
  dataSourceMode = DataSourceVisualMode.Collapsed;
15646
15848
  }
15647
15849
  if (this.viewConfig.hideDataSources === true) {
@@ -15653,7 +15855,7 @@ class SearchEmbed extends TsEmbed {
15653
15855
  var _a;
15654
15856
  const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, hideSearchBar, dataPanelV2 = false, useLastSelectedSources = false, runtimeParameters, collapseSearchBarInitially = false, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false,
15655
15857
  /* eslint-disable-next-line max-len */
15656
- dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL, focusSearchBarOnRender = true, excludeRuntimeParametersfromURL, } = this.viewConfig;
15858
+ dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL, focusSearchBarOnRender = true, excludeRuntimeParametersfromURL, collapseSearchBar = true, } = this.viewConfig;
15657
15859
  const queryParams = this.getBaseQueryParams();
15658
15860
  queryParams[Param.HideActions] = [
15659
15861
  ...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : []),
@@ -15697,7 +15899,8 @@ class SearchEmbed extends TsEmbed {
15697
15899
  queryParams[Param.UseLastSelectedDataSource] = false;
15698
15900
  }
15699
15901
  queryParams[Param.searchEmbed] = true;
15700
- queryParams[Param.CollapseSearchBarInitially] = collapseSearchBarInitially;
15902
+ /* eslint-disable-next-line max-len */
15903
+ queryParams[Param.CollapseSearchBarInitially] = collapseSearchBarInitially || collapseSearchBar;
15701
15904
  queryParams[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
15702
15905
  if (dataPanelCustomGroupsAccordionInitialState
15703
15906
  === DataPanelCustomColumnGroupsAccordionState$1.COLLAPSE_ALL