@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.
Files changed (166) hide show
  1. package/cjs/package.json +4 -22
  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/css-variables.d.ts +28 -0
  9. package/cjs/src/css-variables.d.ts.map +1 -1
  10. package/cjs/src/embed/app.d.ts +16 -14
  11. package/cjs/src/embed/app.d.ts.map +1 -1
  12. package/cjs/src/embed/app.js +19 -4
  13. package/cjs/src/embed/app.js.map +1 -1
  14. package/cjs/src/embed/app.spec.js +32 -0
  15. package/cjs/src/embed/app.spec.js.map +1 -1
  16. package/cjs/src/embed/base.d.ts.map +1 -1
  17. package/cjs/src/embed/base.js +2 -0
  18. package/cjs/src/embed/base.js.map +1 -1
  19. package/cjs/src/embed/liveboard.d.ts.map +1 -1
  20. package/cjs/src/embed/liveboard.js +2 -1
  21. package/cjs/src/embed/liveboard.js.map +1 -1
  22. package/cjs/src/embed/liveboard.spec.js +10 -0
  23. package/cjs/src/embed/liveboard.spec.js.map +1 -1
  24. package/cjs/src/embed/search.d.ts +14 -13
  25. package/cjs/src/embed/search.d.ts.map +1 -1
  26. package/cjs/src/embed/search.js +6 -4
  27. package/cjs/src/embed/search.js.map +1 -1
  28. package/cjs/src/embed/search.spec.js +9 -9
  29. package/cjs/src/embed/search.spec.js.map +1 -1
  30. package/cjs/src/embed/ts-embed.d.ts +1 -1
  31. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  32. package/cjs/src/embed/ts-embed.js +10 -6
  33. package/cjs/src/embed/ts-embed.js.map +1 -1
  34. package/cjs/src/errors.d.ts +11 -0
  35. package/cjs/src/errors.d.ts.map +1 -1
  36. package/cjs/src/errors.js +11 -0
  37. package/cjs/src/errors.js.map +1 -1
  38. package/cjs/src/mixpanel-service.d.ts +4 -0
  39. package/cjs/src/mixpanel-service.d.ts.map +1 -1
  40. package/cjs/src/mixpanel-service.js +6 -1
  41. package/cjs/src/mixpanel-service.js.map +1 -1
  42. package/cjs/src/react/index.spec.js +1 -1
  43. package/cjs/src/react/index.spec.js.map +1 -1
  44. package/cjs/src/types.d.ts +178 -6
  45. package/cjs/src/types.d.ts.map +1 -1
  46. package/cjs/src/types.js +138 -3
  47. package/cjs/src/types.js.map +1 -1
  48. package/cjs/src/utils/processData.d.ts.map +1 -1
  49. package/cjs/src/utils/processData.js +2 -1
  50. package/cjs/src/utils/processData.js.map +1 -1
  51. package/cjs/src/utils/reporting.d.ts +16 -0
  52. package/cjs/src/utils/reporting.d.ts.map +1 -0
  53. package/cjs/src/utils/reporting.js +68 -0
  54. package/cjs/src/utils/reporting.js.map +1 -0
  55. package/cjs/src/utils/reporting.spec.d.ts +2 -0
  56. package/cjs/src/utils/reporting.spec.d.ts.map +1 -0
  57. package/cjs/src/utils/reporting.spec.js +76 -0
  58. package/cjs/src/utils/reporting.spec.js.map +1 -0
  59. package/dist/src/auth.d.ts.map +1 -1
  60. package/dist/src/authToken.d.ts.map +1 -1
  61. package/dist/src/css-variables.d.ts +28 -0
  62. package/dist/src/css-variables.d.ts.map +1 -1
  63. package/dist/src/embed/app.d.ts +16 -14
  64. package/dist/src/embed/app.d.ts.map +1 -1
  65. package/dist/src/embed/base.d.ts.map +1 -1
  66. package/dist/src/embed/liveboard.d.ts.map +1 -1
  67. package/dist/src/embed/search.d.ts +14 -13
  68. package/dist/src/embed/search.d.ts.map +1 -1
  69. package/dist/src/embed/ts-embed.d.ts +1 -1
  70. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  71. package/dist/src/errors.d.ts +11 -0
  72. package/dist/src/errors.d.ts.map +1 -1
  73. package/dist/src/mixpanel-service.d.ts +4 -0
  74. package/dist/src/mixpanel-service.d.ts.map +1 -1
  75. package/dist/src/types.d.ts +178 -6
  76. package/dist/src/types.d.ts.map +1 -1
  77. package/dist/src/utils/processData.d.ts.map +1 -1
  78. package/dist/src/utils/reporting.d.ts +16 -0
  79. package/dist/src/utils/reporting.d.ts.map +1 -0
  80. package/dist/src/utils/reporting.spec.d.ts +2 -0
  81. package/dist/src/utils/reporting.spec.d.ts.map +1 -0
  82. package/dist/tsembed-react.es.js +214 -39
  83. package/dist/tsembed-react.js +214 -39
  84. package/dist/tsembed.es.js +261 -40
  85. package/dist/tsembed.js +261 -40
  86. package/dist/visual-embed-sdk-react-full.d.ts +241 -34
  87. package/dist/visual-embed-sdk-react.d.ts +241 -34
  88. package/dist/visual-embed-sdk.d.ts +241 -34
  89. package/lib/package.json +4 -22
  90. package/lib/src/auth.d.ts.map +1 -1
  91. package/lib/src/auth.js +6 -5
  92. package/lib/src/auth.js.map +1 -1
  93. package/lib/src/authToken.d.ts.map +1 -1
  94. package/lib/src/authToken.js +5 -7
  95. package/lib/src/authToken.js.map +1 -1
  96. package/lib/src/css-variables.d.ts +28 -0
  97. package/lib/src/css-variables.d.ts.map +1 -1
  98. package/lib/src/embed/app.d.ts +16 -14
  99. package/lib/src/embed/app.d.ts.map +1 -1
  100. package/lib/src/embed/app.js +18 -3
  101. package/lib/src/embed/app.js.map +1 -1
  102. package/lib/src/embed/app.spec.js +33 -1
  103. package/lib/src/embed/app.spec.js.map +1 -1
  104. package/lib/src/embed/base.d.ts.map +1 -1
  105. package/lib/src/embed/base.js +2 -0
  106. package/lib/src/embed/base.js.map +1 -1
  107. package/lib/src/embed/liveboard.d.ts.map +1 -1
  108. package/lib/src/embed/liveboard.js +2 -1
  109. package/lib/src/embed/liveboard.js.map +1 -1
  110. package/lib/src/embed/liveboard.spec.js +10 -0
  111. package/lib/src/embed/liveboard.spec.js.map +1 -1
  112. package/lib/src/embed/search.d.ts +14 -13
  113. package/lib/src/embed/search.d.ts.map +1 -1
  114. package/lib/src/embed/search.js +6 -4
  115. package/lib/src/embed/search.js.map +1 -1
  116. package/lib/src/embed/search.spec.js +9 -9
  117. package/lib/src/embed/search.spec.js.map +1 -1
  118. package/lib/src/embed/ts-embed.d.ts +1 -1
  119. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  120. package/lib/src/embed/ts-embed.js +10 -6
  121. package/lib/src/embed/ts-embed.js.map +1 -1
  122. package/lib/src/errors.d.ts +11 -0
  123. package/lib/src/errors.d.ts.map +1 -1
  124. package/lib/src/errors.js +11 -0
  125. package/lib/src/errors.js.map +1 -1
  126. package/lib/src/mixpanel-service.d.ts +4 -0
  127. package/lib/src/mixpanel-service.d.ts.map +1 -1
  128. package/lib/src/mixpanel-service.js +6 -1
  129. package/lib/src/mixpanel-service.js.map +1 -1
  130. package/lib/src/react/index.spec.js +1 -1
  131. package/lib/src/react/index.spec.js.map +1 -1
  132. package/lib/src/types.d.ts +178 -6
  133. package/lib/src/types.d.ts.map +1 -1
  134. package/lib/src/types.js +138 -3
  135. package/lib/src/types.js.map +1 -1
  136. package/lib/src/utils/processData.d.ts.map +1 -1
  137. package/lib/src/utils/processData.js +2 -1
  138. package/lib/src/utils/processData.js.map +1 -1
  139. package/lib/src/utils/reporting.d.ts +16 -0
  140. package/lib/src/utils/reporting.d.ts.map +1 -0
  141. package/lib/src/utils/reporting.js +62 -0
  142. package/lib/src/utils/reporting.js.map +1 -0
  143. package/lib/src/utils/reporting.spec.d.ts +2 -0
  144. package/lib/src/utils/reporting.spec.d.ts.map +1 -0
  145. package/lib/src/utils/reporting.spec.js +74 -0
  146. package/lib/src/utils/reporting.spec.js.map +1 -0
  147. package/lib/src/visual-embed-sdk.d.ts +241 -34
  148. package/package.json +4 -22
  149. package/src/auth.ts +6 -5
  150. package/src/authToken.ts +5 -9
  151. package/src/css-variables.ts +28 -0
  152. package/src/embed/app.spec.ts +48 -0
  153. package/src/embed/app.ts +25 -15
  154. package/src/embed/base.ts +3 -1
  155. package/src/embed/liveboard.spec.ts +14 -0
  156. package/src/embed/liveboard.ts +2 -0
  157. package/src/embed/search.spec.ts +9 -9
  158. package/src/embed/search.ts +20 -16
  159. package/src/embed/ts-embed.ts +13 -6
  160. package/src/errors.ts +11 -0
  161. package/src/mixpanel-service.ts +6 -1
  162. package/src/react/index.spec.tsx +1 -1
  163. package/src/types.ts +192 -13
  164. package/src/utils/processData.ts +2 -3
  165. package/src/utils/reporting.spec.ts +91 -0
  166. 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
@@ -1900,13 +1904,15 @@ var HostEvent;
1900
1904
  *
1901
1905
  * @example
1902
1906
  * ```js
1903
- * appEmbed.trigger(HostEvent.CreateMonitor)
1907
+ * searchEmbed.trigger(HostEvent.CreateMonitor)
1904
1908
  * ```
1905
1909
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1906
1910
  */
1907
1911
  HostEvent["CreateMonitor"] = "createMonitor";
1908
1912
  /**
1909
- * Trigger the **Manage alerts** action on a visualization
1913
+ * Trigger the **Manage alerts** action on a KPI chart
1914
+ * in a visualization or saved Answer.
1915
+ *
1910
1916
  * @param - an object with `vizId` as a key
1911
1917
  * @example
1912
1918
  * ```js
@@ -1914,6 +1920,16 @@ var HostEvent;
1914
1920
  * vizId: '730496d6-6903-4601-937e-2c691821af3c'
1915
1921
  * })
1916
1922
  * ```
1923
+ *
1924
+ * @example
1925
+ * ```js
1926
+ * searchEmbed.trigger(HostEvent.ManageMonitor)
1927
+ * ```
1928
+ *
1929
+ * @example
1930
+ * ```js
1931
+ * vizEmbed.trigger(HostEvent.ManageMonitor)
1932
+ * ```
1917
1933
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1918
1934
  */
1919
1935
  HostEvent["ManageMonitor"] = "manageMonitor";
@@ -2491,6 +2507,8 @@ var Param;
2491
2507
  Param["IsFullAppEmbed"] = "isFullAppEmbed";
2492
2508
  Param["IsOnBeforeGetVizDataInterceptEnabled"] = "isOnBeforeGetVizDataInterceptEnabled";
2493
2509
  Param["FocusSearchBarOnRender"] = "focusSearchBarOnRender";
2510
+ Param["DisableRedirectionLinksInNewTab"] = "disableRedirectionLinksInNewTab";
2511
+ Param["HomePageSearchBarMode"] = "homePageSearchBarMode";
2494
2512
  })(Param || (Param = {}));
2495
2513
  /**
2496
2514
  * ThoughtSpot application pages include actions and menu commands
@@ -2641,6 +2659,7 @@ var Action;
2641
2659
  */
2642
2660
  Action["ConfigureFilter"] = "configureFilter";
2643
2661
  Action["CollapseDataSources"] = "collapseDataSources";
2662
+ Action["CollapseDataPanel"] = "collapseDataPanel";
2644
2663
  /**
2645
2664
  * The **Choose sources** button on Search page.
2646
2665
  * Allows selecting data sources for search queries.
@@ -3036,12 +3055,15 @@ var Action;
3036
3055
  * The Create alert action on KPI charts.
3037
3056
  * @example
3038
3057
  * ```js
3039
- * disabledActions: [Action.CreateMonitor ]
3058
+ * disabledActions: [Action.CreateMonitor]
3040
3059
  * ```
3041
3060
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
3042
3061
  */
3043
3062
  Action["CreateMonitor"] = "createMonitor";
3044
3063
  /**
3064
+ * @deprecated
3065
+ * Reports errors
3066
+ *
3045
3067
  * @example
3046
3068
  * ```js
3047
3069
  * disabledActions: [Action.ReportError]
@@ -3266,35 +3288,84 @@ var Action;
3266
3288
  */
3267
3289
  Action["RenameModalTitleDescription"] = "renameModalTitleDescription";
3268
3290
  /**
3291
+ *
3292
+ * @example
3293
+ * ```js
3294
+ * disabledActions: [Action.RequestVerification]
3295
+ * ```
3269
3296
  *
3270
3297
  * @version SDK: 1.25.0 | Thoughtspot: 9.6.0.cl
3271
3298
  */
3272
3299
  Action["RequestVerification"] = "requestVerification";
3273
3300
  /**
3301
+ *
3302
+ * Allows users to mark a Liveboard as verified.
3303
+ *
3304
+ * @example
3305
+ * ```js
3306
+ * disabledActions: [Action.MarkAsVerified]
3307
+ * ```
3274
3308
  * @version SDK: 1.25.0 | Thoughtspot: 9.6.0.cl
3275
3309
  */
3276
3310
  Action["MarkAsVerified"] = "markAsVerified";
3277
3311
  /**
3312
+ * The **Add Tab** action on a Liveboard.
3313
+ * Allows adding a new tab to a Liveboard view.
3314
+ *
3315
+ * @example
3316
+ * ```js
3317
+ * disabledActions: [Action.AddTab]
3318
+ * ```
3278
3319
  * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
3279
3320
  */
3280
3321
  Action["AddTab"] = "addTab";
3281
3322
  /**
3323
+ *
3324
+ * Initiates contextual change analysis on KPI charts.
3325
+ *
3326
+ * @example
3327
+ * ```js
3328
+ * disabledActions: [Action.EnableContextualChangeAnalysis]
3329
+ * ```
3282
3330
  * @version SDK: 1.25.0 | Thoughtspot: 9.6.0.cl
3283
3331
  */
3284
3332
  Action["EnableContextualChangeAnalysis"] = "enableContextualChangeAnalysis";
3285
3333
  /**
3334
+ *
3335
+ * @example
3336
+ * ```js
3337
+ * disabledActions: [Action.ShowSageQuery]
3338
+ * ```
3339
+ *
3286
3340
  * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
3287
3341
  */
3288
3342
  Action["ShowSageQuery"] = "showSageQuery";
3289
3343
  /**
3344
+ *
3345
+ * @example
3346
+ * ```js
3347
+ * disabledActions: [Action.EditSageAnswer]
3348
+ * ```
3290
3349
  * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
3291
3350
  */
3292
3351
  Action["EditSageAnswer"] = "editSageAnswer";
3293
3352
  /**
3353
+ *
3354
+ * This action allows users to send feedback on AI-generated Answers.
3355
+ *
3356
+ * @example
3357
+ * ```js
3358
+ * disabledActions: [Action.SageAnswerFeedback]
3359
+ * ```
3294
3360
  * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
3295
3361
  */
3296
3362
  Action["SageAnswerFeedback"] = "sageAnswerFeedback";
3297
3363
  /**
3364
+ *
3365
+ * @example
3366
+ * ```js
3367
+ * disabledActions: [Action.ModifySageAnswer]
3368
+ * ```
3298
3369
  * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
3299
3370
  */
3300
3371
  Action["ModifySageAnswer"] = "modifySageAnswer";
@@ -3416,6 +3487,70 @@ var Action;
3416
3487
  * @version SDK: 1.27.10 | Thoughtspot: 9.12.5.cl
3417
3488
  */
3418
3489
  Action["AIHighlights"] = "AIHighlights";
3490
+ /**
3491
+ * Action ID for edit schedule action on schedule on homepage
3492
+ * @example
3493
+ * ```js
3494
+ * disabledActions: [Action.EditScheduleHomepage]
3495
+ * ```
3496
+ * @version SDK: 1.34.0 | Thoughtspot: 10.3.0.cl
3497
+ */
3498
+ Action["EditScheduleHomepage"] = "editScheduleHomepage";
3499
+ /**
3500
+ * Action ID for pause schedule action on schedule on homepage
3501
+ * @example
3502
+ * ```js
3503
+ * disabledActions: [Action.PauseScheduleHomepage]
3504
+ * ```
3505
+ * @version SDK: 1.34.0 | Thoughtspot: 10.3.0.cl
3506
+ */
3507
+ Action["PauseScheduleHomepage"] = "pauseScheduleHomepage";
3508
+ /**
3509
+ * Action ID for view schedule run action on schedule on homepage
3510
+ * @example
3511
+ * ```js
3512
+ * disabledActions: [Action.ViewScheduleRunHomepage]
3513
+ * ```
3514
+ * @version SDK: 1.34.0 | Thoughtspot: 10.3.0.cl
3515
+ */
3516
+ Action["ViewScheduleRunHomepage"] = "viewScheduleRunHomepage";
3517
+ /**
3518
+ * Action ID for unsubscribe schedule action on schedule on homepage
3519
+ * @example
3520
+ * ```js
3521
+ * disabledActions: [Action.UnsubscribeScheduleHomepage]
3522
+ * ```
3523
+ * @version SDK: 1.34.0 | Thoughtspot: 10.3.0.cl
3524
+ */
3525
+ Action["UnsubscribeScheduleHomepage"] = "unsubscribeScheduleHomepage";
3526
+ /**
3527
+ * The **Manage Tags** action on Homepage Favourite Module.
3528
+ *
3529
+ * @example
3530
+ * ```js
3531
+ * disabledActions: [Action.ManageTags]
3532
+ * ```
3533
+ * @version SDK : 1.34.0 | Thoughtspot: 10.3.0.cl
3534
+ */
3535
+ Action["ManageTags"] = "manageTags";
3536
+ /**
3537
+ * Action ID for delete schedule action on schedule on homepage
3538
+ * @example
3539
+ * ```js
3540
+ * disabledActions: [Action.DeleteScheduleHomepage]
3541
+ * ```
3542
+ * @version SDK: 1.34.0 | Thoughtspot: 10.3.0.cl
3543
+ */
3544
+ Action["DeleteScheduleHomepage"] = "deleteScheduleHomepage";
3545
+ /**
3546
+ * The **Analyze CTA** action on KPI chart.
3547
+ * @example
3548
+ * ```js
3549
+ * disabledActions: [Action.KPIAnalysisCTA]
3550
+ * ```
3551
+ * @version SDK: 1.34.0 | Thoughtspot: 10.3.0.cl
3552
+ */
3553
+ Action["KPIAnalysisCTA"] = "kpiAnalysisCTA";
3419
3554
  })(Action || (Action = {}));
3420
3555
  var PrefetchFeatures;
3421
3556
  (function (PrefetchFeatures) {
@@ -5783,6 +5918,25 @@ function isEqual(value, other) {
5783
5918
 
5784
5919
  var isEqual_1 = isEqual;
5785
5920
 
5921
+ const ERROR_MESSAGE = {
5922
+ INVALID_THOUGHTSPOT_HOST: 'Error parsing ThoughtSpot host. Please provide a valid URL.',
5923
+ LIVEBOARD_VIZ_ID_VALIDATION: 'Please select a liveboard to embed.',
5924
+ TRIGGER_TIMED_OUT: 'Trigger timedout in getting response',
5925
+ SEARCHEMBED_BETA_WRANING_MESSAGE: 'Search Embed is in Beta in this release.',
5926
+ SAGE_EMBED_BETA_WARNING_MESSAGE: 'Sage Embed is in Beta in this release.',
5927
+ 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.',
5928
+ 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.',
5929
+ SDK_NOT_INITIALIZED: 'SDK not initialized',
5930
+ SESSION_INFO_FAILED: 'Failed to get session info',
5931
+ INVALID_TOKEN_ERROR: 'Received invalid token from getAuthToken callback or authToken endpoint.',
5932
+ MIXPANEL_TOKEN_NOT_FOUND: 'Mixpanel token not found in session info',
5933
+ PRERENDER_ID_MISSING: 'PreRender id is required for preRender',
5934
+ SYNC_STYLE_CALLED_BEFORE_RENDER: 'PreRender should be called before using syncPreRenderStyle',
5935
+ CSP_VIOLATION_ALERT: 'CSP violation detected. Please check the console errors for more details.',
5936
+ 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',
5937
+ MISSING_REPORTING_OBSERVER: 'ReportingObserver not supported',
5938
+ };
5939
+
5786
5940
  const EndPoints = {
5787
5941
  AUTH_VERIFICATION: '/callosum/v1/session/info',
5788
5942
  SESSION_INFO: '/callosum/v1/session/info',
@@ -5896,9 +6050,6 @@ async function fetchBasicAuthService(thoughtSpotHost, username, password) {
5896
6050
  });
5897
6051
  }
5898
6052
 
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
6053
  let cachedAuthToken = null;
5903
6054
  // This method can be used to get the authToken using the embedConfig
5904
6055
  async function getAuthenticationToken(embedConfig) {
@@ -5929,7 +6080,7 @@ async function getAuthenticationToken(embedConfig) {
5929
6080
  await validateAuthToken(embedConfig, authToken);
5930
6081
  }
5931
6082
  catch (e) {
5932
- logger.error(`Received invalid token from getAuthToken callback or authToken endpoint. Error : ${e.message}`);
6083
+ logger.error(`${ERROR_MESSAGE.INVALID_TOKEN_ERROR} Error : ${e.message}`);
5933
6084
  throw e;
5934
6085
  }
5935
6086
  cachedAuthToken = authToken;
@@ -5951,12 +6102,12 @@ const validateAuthToken = async (embedConfig, authToken, suppressAlert) => {
5951
6102
  if (cachedAuthToken && cachedAuthToken === authToken) {
5952
6103
  if (!embedConfig.suppressErrorAlerts && !suppressAlert) {
5953
6104
  // eslint-disable-next-line no-alert
5954
- alert(DUPLICATE_TOKEN_ERR);
6105
+ alert(ERROR_MESSAGE.DUPLICATE_TOKEN_ERR);
5955
6106
  }
5956
- throw new Error(DUPLICATE_TOKEN_ERR);
6107
+ throw new Error(ERROR_MESSAGE.DUPLICATE_TOKEN_ERR);
5957
6108
  }
5958
6109
  else {
5959
- throw new Error(INVALID_TOKEN_ERR);
6110
+ throw new Error(ERROR_MESSAGE.INVALID_TOKEN_ERROR);
5960
6111
  }
5961
6112
  };
5962
6113
  /**
@@ -6579,14 +6730,6 @@ function getSelectedPointsForUnderlyingDataQuery(selectedPoints) {
6579
6730
  return underlyingDataPoint;
6580
6731
  }
6581
6732
 
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
6733
  /**
6591
6734
  * Copyright (c) 2023
6592
6735
  *
@@ -12637,6 +12780,10 @@ var mixpanel$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.assign(/*#__PURE
12637
12780
  // Needed to avoid error in CJS builds on some bundlers.
12638
12781
  const mixpanelLib = mixpanel_cjs || mixpanel$1;
12639
12782
  let mixpanelInstance;
12783
+ /**
12784
+ * Enum of mixpanel events
12785
+ * @hidden
12786
+ */
12640
12787
  const MIXPANEL_EVENT = {
12641
12788
  VISUAL_SDK_RENDER_START: 'visual-sdk-render-start',
12642
12789
  VISUAL_SDK_CALLED_INIT: 'visual-sdk-called-init',
@@ -12681,7 +12828,7 @@ function emptyQueue() {
12681
12828
  function initMixpanel(sessionInfo) {
12682
12829
  var _a;
12683
12830
  if (!sessionInfo || !sessionInfo.mixpanelToken) {
12684
- logger.error('Mixpanel token not found in session info');
12831
+ logger.error(ERROR_MESSAGE.MIXPANEL_TOKEN_NOT_FOUND);
12685
12832
  return;
12686
12833
  }
12687
12834
  // On a public cluster the user is anonymous, so don't set the identify to
@@ -13047,6 +13194,58 @@ EventEmitter.EventEmitter = EventEmitter;
13047
13194
  }
13048
13195
  });
13049
13196
 
13197
+ var ReportType;
13198
+ (function (ReportType) {
13199
+ ReportType["CSP_VIOLATION"] = "csp-violation";
13200
+ ReportType["DEPRECATION"] = "deprecation";
13201
+ ReportType["INTERVENTION"] = "intervention";
13202
+ })(ReportType || (ReportType = {}));
13203
+ let globalObserver = null;
13204
+ /**
13205
+ * Register a global ReportingObserver to capture all unhandled errors
13206
+ * @param overrideExisting boolean to override existing observer
13207
+ * @returns ReportingObserver | null
13208
+ */
13209
+ function registerReportingObserver(overrideExisting = false) {
13210
+ if (!(window.ReportingObserver)) {
13211
+ logger.warn(ERROR_MESSAGE.MISSING_REPORTING_OBSERVER);
13212
+ return null;
13213
+ }
13214
+ if (overrideExisting) {
13215
+ resetGlobalReportingObserver();
13216
+ }
13217
+ if (globalObserver) {
13218
+ return globalObserver;
13219
+ }
13220
+ const embedConfig = getEmbedConfig();
13221
+ globalObserver = new ReportingObserver((reports) => {
13222
+ reports.forEach((report) => {
13223
+ const { type, url, body } = report;
13224
+ const reportBody = body;
13225
+ const isThoughtSpotHost = url
13226
+ && url.startsWith(embedConfig.thoughtSpotHost);
13227
+ const isFrameHostError = type === ReportType.CSP_VIOLATION
13228
+ && reportBody.effectiveDirective === 'frame-ancestors';
13229
+ if (isThoughtSpotHost && isFrameHostError) {
13230
+ if (!embedConfig.suppressErrorAlerts) {
13231
+ alert(ERROR_MESSAGE.CSP_VIOLATION_ALERT);
13232
+ }
13233
+ logger.error(ERROR_MESSAGE.CSP_FRAME_HOST_VIOLATION_LOG_MESSAGE);
13234
+ }
13235
+ });
13236
+ }, { buffered: true });
13237
+ globalObserver.observe();
13238
+ return globalObserver;
13239
+ }
13240
+ /**
13241
+ * Resets the global ReportingObserver
13242
+ */
13243
+ function resetGlobalReportingObserver() {
13244
+ if (globalObserver)
13245
+ globalObserver.disconnect();
13246
+ globalObserver = null;
13247
+ }
13248
+
13050
13249
  /**
13051
13250
  *
13052
13251
  * @param url
@@ -13239,7 +13438,7 @@ function setAuthEE(eventEmitter) {
13239
13438
  */
13240
13439
  function notifyAuthSDKSuccess() {
13241
13440
  if (!authEE) {
13242
- logger.error('SDK not initialized');
13441
+ logger.error(ERROR_MESSAGE.SDK_NOT_INITIALIZED);
13243
13442
  return;
13244
13443
  }
13245
13444
  authEE.emit(AuthStatus.SDK_SUCCESS);
@@ -13249,7 +13448,7 @@ function notifyAuthSDKSuccess() {
13249
13448
  */
13250
13449
  async function notifyAuthSuccess() {
13251
13450
  if (!authEE) {
13252
- logger.error('SDK not initialized');
13451
+ logger.error(ERROR_MESSAGE.SDK_NOT_INITIALIZED);
13253
13452
  return;
13254
13453
  }
13255
13454
  try {
@@ -13257,7 +13456,7 @@ async function notifyAuthSuccess() {
13257
13456
  authEE.emit(AuthStatus.SUCCESS, sessionInfo);
13258
13457
  }
13259
13458
  catch (e) {
13260
- logger.error('Failed to get session info');
13459
+ logger.error(ERROR_MESSAGE.SESSION_INFO_FAILED);
13261
13460
  }
13262
13461
  }
13263
13462
  /**
@@ -13266,7 +13465,7 @@ async function notifyAuthSuccess() {
13266
13465
  */
13267
13466
  function notifyAuthFailure(failureType) {
13268
13467
  if (!authEE) {
13269
- logger.error('SDK not initialized');
13468
+ logger.error(ERROR_MESSAGE.SDK_NOT_INITIALIZED);
13270
13469
  return;
13271
13470
  }
13272
13471
  authEE.emit(AuthStatus.FAILURE, failureType);
@@ -13276,7 +13475,7 @@ function notifyAuthFailure(failureType) {
13276
13475
  */
13277
13476
  function notifyLogout() {
13278
13477
  if (!authEE) {
13279
- logger.error('SDK not initialized');
13478
+ logger.error(ERROR_MESSAGE.SDK_NOT_INITIALIZED);
13280
13479
  return;
13281
13480
  }
13282
13481
  authEE.emit(AuthStatus.LOGOUT);
@@ -13670,6 +13869,7 @@ const init = (embedConfig) => {
13670
13869
  thoughtSpotHost: getThoughtSpotHost(embedConfig),
13671
13870
  }));
13672
13871
  setGlobalLogLevelOverride(embedConfig.logLevel);
13872
+ registerReportingObserver();
13673
13873
  const authEE = new eventemitter3();
13674
13874
  setAuthEE(authEE);
13675
13875
  handleAuth();
@@ -13887,7 +14087,7 @@ function processNoCookieAccess(e, containerEl) {
13887
14087
  if (!ignoreNoCookieAccess) {
13888
14088
  if (!suppressNoCookieAccessAlert && !suppressErrorAlerts) {
13889
14089
  // 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.');
14090
+ alert(ERROR_MESSAGE.THIRD_PARTY_COOKIE_BLOCKED_ALERT);
13891
14091
  }
13892
14092
  // eslint-disable-next-line no-param-reassign
13893
14093
  containerEl.innerHTML = loginFailedMessage;
@@ -14003,7 +14203,7 @@ function processTrigger(iFrame, messageType, thoughtSpotHost, data) {
14003
14203
  });
14004
14204
  }
14005
14205
 
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};
14206
+ var name="@thoughtspot/visual-embed-sdk";var version="1.32.2";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p . --incremental false; tsc -p . --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts","bundle-dts":"dts-bundle --name ../../dist/visual-embed-sdk --main lib/src/index.d.ts --outputAsModuleFolder=true","bundle-dts-react":"dts-bundle --name ../../../dist/visual-embed-sdk-react --main lib/src/react/index.d.ts --outputAsModuleFolder=true","bundle-dts-react-full":"dts-bundle --name ../../../dist/visual-embed-sdk-react-full --main lib/src/react/all-types-export.d.ts --outputAsModuleFolder=true",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.json --theme typedoc-theme --json static/typedoc/typedoc.json --disableOutputCheck","test-sdk":"jest -c jest.config.sdk.js --runInBand",test:"npm run test-sdk",posttest:"cat ./coverage/sdk/lcov.info | coveralls","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest",dev:"vite -c vite.local.config.ts"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={algoliasearch:"^4.10.5",classnames:"^2.3.1",dompurify:"^2.3.4","eslint-plugin-comment-length":"^0.9.2","eslint-plugin-jsdoc":"^46.9.0",eventemitter3:"^4.0.7","gatsby-plugin-vercel":"^1.0.3","html-react-parser":"^1.4.12",lodash:"^4.17.21","mixpanel-browser":"^2.45.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1"};var devDependencies={"@mdx-js/mdx":"^1.6.22","@mdx-js/react":"^1.6.22","@react-icons/all-files":"^4.1.0","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^5.0.2","@size-limit/preset-big-lib":"^8.2.6","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^22.2.3","@types/mixpanel-browser":"^2.35.6","@types/lodash":"^4.17.0","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^4.6.0","@typescript-eslint/parser":"^4.6.0",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1",coveralls:"^3.1.0","current-git-branch":"^1.1.0","dts-bundle":"^0.7.3",eslint:"^7.12.1","eslint-config-airbnb-base":"^14.2.0","eslint-config-prettier":"^6.15.0","eslint-import-resolver-typescript":"^2.3.0","eslint-plugin-import":"^2.22.1","eslint-plugin-prettier":"^3.1.4","eslint-plugin-react-hooks":"^4.2.0","fs-extra":"^10.0.0","gh-pages":"^3.1.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^1.1.1",jest:"^26.6.3","jest-fetch-mock":"^3.0.3",jsdom:"^17.0.0","node-sass":"^8.0.0",prettier:"2.1.2",react:"^16.14.0","react-dom":"^16.14.0","react-resizable":"^1.11.0","react-resize-detector":"^6.6.0","react-test-renderer":"^17.0.2","react-use-flexsearch":"^0.1.1",rollup:"2.30.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^26.5.5","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^5.3.4"};var author="ThoughtSpot";var email="support@thoughtspot.com";var license="ThoughtSpot Development Tools End User License Agreement";var directories={lib:"lib"};var repository={type:"git",url:"git+https://github.com/thoughtspot/visual-embed-sdk.git"};var publishConfig={registry:"https://registry.npmjs.org"};var keywords=["thoughtspot","everywhere","embedded","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version,description:description,module:module,main:main,types:types,files:files,exports:exports,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.js",limit:"48 kB"}],scripts:scripts,peerDependencies:peerDependencies,dependencies:dependencies,devDependencies:devDependencies,author:author,email:email,license:license,directories:directories,repository:repository,publishConfig:publishConfig,keywords:keywords,bugs:bugs,homepage:homepage,globals:globals};
14007
14207
 
14008
14208
  /**
14009
14209
  * Copyright (c) 2022
@@ -14101,7 +14301,7 @@ class TsEmbed {
14101
14301
  });
14102
14302
  }
14103
14303
  catch (e) {
14104
- logger.error(`Received invalid token. Error : ${e === null || e === void 0 ? void 0 : e.message}`);
14304
+ logger.error(`${ERROR_MESSAGE.INVALID_TOKEN_ERROR} Error : ${e === null || e === void 0 ? void 0 : e.message}`);
14105
14305
  processAuthFailure(e, this.isPreRendered ? this.preRenderWrapper : this.el);
14106
14306
  }
14107
14307
  }
@@ -14309,7 +14509,7 @@ class TsEmbed {
14309
14509
  if (this.embedConfig.currencyFormat) {
14310
14510
  queryParams[Param.CurrencyFormat] = this.embedConfig.currencyFormat;
14311
14511
  }
14312
- const { disabledActions, disabledActionReason, hiddenActions, visibleActions, hiddenTabs, visibleTabs, showAlerts, additionalFlags, locale, customizations, contextMenuTrigger, linkOverride, insertInToSlide, } = this.viewConfig;
14512
+ const { disabledActions, disabledActionReason, hiddenActions, visibleActions, hiddenTabs, visibleTabs, showAlerts, additionalFlags, locale, customizations, contextMenuTrigger, linkOverride, insertInToSlide, disableRedirectionLinksInNewTab, } = this.viewConfig;
14313
14513
  if (Array.isArray(visibleActions) && Array.isArray(hiddenActions)) {
14314
14514
  this.handleError('You cannot have both hidden actions and visible actions');
14315
14515
  return queryParams;
@@ -14370,6 +14570,9 @@ class TsEmbed {
14370
14570
  if (insertInToSlide) {
14371
14571
  queryParams[Param.ShowInsertToSlide] = insertInToSlide;
14372
14572
  }
14573
+ if (disableRedirectionLinksInNewTab) {
14574
+ queryParams[Param.DisableRedirectionLinksInNewTab] = disableRedirectionLinksInNewTab;
14575
+ }
14373
14576
  queryParams[Param.OverrideNativeConsole] = true;
14374
14577
  queryParams[Param.ClientLogLevel] = this.embedConfig.logLevel;
14375
14578
  return queryParams;
@@ -14414,7 +14617,7 @@ class TsEmbed {
14414
14617
  iFrame.mozallowfullscreen = true;
14415
14618
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
14416
14619
  // @ts-ignore
14417
- iFrame.allow = 'clipboard-read; clipboard-write';
14620
+ iFrame.allow = 'clipboard-read; clipboard-write fullscreen';
14418
14621
  const { height: frameHeight, width: frameWidth, ...restParams } = this.viewConfig.frameParams || {};
14419
14622
  const width = getCssDimension(frameWidth || DEFAULT_EMBED_WIDTH);
14420
14623
  const height = getCssDimension(frameHeight || DEFAULT_EMBED_HEIGHT);
@@ -14797,7 +15000,7 @@ class TsEmbed {
14797
15000
  */
14798
15001
  preRender(showPreRenderByDefault = false) {
14799
15002
  if (!this.viewConfig.preRenderId) {
14800
- logger.error('PreRender id is required for preRender');
15003
+ logger.error(ERROR_MESSAGE.PRERENDER_ID_MISSING);
14801
15004
  return this;
14802
15005
  }
14803
15006
  this.isPreRendered = true;
@@ -14870,7 +15073,7 @@ class TsEmbed {
14870
15073
  */
14871
15074
  showPreRender() {
14872
15075
  if (!this.viewConfig.preRenderId) {
14873
- logger.error('PreRender id is required for preRender');
15076
+ logger.error(ERROR_MESSAGE.PRERENDER_ID_MISSING);
14874
15077
  return;
14875
15078
  }
14876
15079
  if (!this.isPreRenderAvailable()) {
@@ -14912,7 +15115,7 @@ class TsEmbed {
14912
15115
  */
14913
15116
  syncPreRenderStyle() {
14914
15117
  if (!this.isPreRenderAvailable() || !this.el) {
14915
- logger.error('PreRender should be called before using syncPreRenderStyle');
15118
+ logger.error(ERROR_MESSAGE.SYNC_STYLE_CALLED_BEFORE_RENDER);
14916
15119
  return;
14917
15120
  }
14918
15121
  const elBoundingClient = this.el.getBoundingClientRect();
@@ -15077,6 +15280,10 @@ var Page;
15077
15280
  * SpotIQ listing page
15078
15281
  */
15079
15282
  Page["SpotIQ"] = "insights";
15283
+ /**
15284
+ * Monitor Alerts Page
15285
+ */
15286
+ Page["Monitor"] = "monitor";
15080
15287
  })(Page || (Page = {}));
15081
15288
  /**
15082
15289
  * Define the initial state os column custom group accordions
@@ -15097,6 +15304,12 @@ var DataPanelCustomColumnGroupsAccordionState;
15097
15304
  */
15098
15305
  DataPanelCustomColumnGroupsAccordionState["EXPAND_FIRST"] = "EXPAND_FIRST";
15099
15306
  })(DataPanelCustomColumnGroupsAccordionState || (DataPanelCustomColumnGroupsAccordionState = {}));
15307
+ var HomePageSearchBarMode;
15308
+ (function (HomePageSearchBarMode) {
15309
+ HomePageSearchBarMode["OBJECT_SEARCH"] = "objectSearch";
15310
+ HomePageSearchBarMode["AI_ANSWER"] = "aiAnswer";
15311
+ HomePageSearchBarMode["NONE"] = "none";
15312
+ })(HomePageSearchBarMode || (HomePageSearchBarMode = {}));
15100
15313
  /**
15101
15314
  * Embeds full ThoughtSpot experience in a host application.
15102
15315
  * @group Embed components
@@ -15137,9 +15350,9 @@ class AppEmbed extends V1Embed {
15137
15350
  * embedded Liveboard or visualization.
15138
15351
  */
15139
15352
  getEmbedParams() {
15140
- 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,
15353
+ const { tag, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 = true, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, hideHomepageLeftNav = false, modularHomeExperience = false, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, enable2ColumnLayout, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false,
15141
15354
  /* eslint-disable-next-line max-len */
15142
- dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, } = this.viewConfig;
15355
+ dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, collapseSearchBar = true, homePageSearchBarMode, } = this.viewConfig;
15143
15356
  let params = {};
15144
15357
  params[Param.EmbedApp] = true;
15145
15358
  params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
@@ -15177,10 +15390,13 @@ class AppEmbed extends V1Embed {
15177
15390
  /* eslint-disable-next-line max-len */
15178
15391
  params[Param.IsOnBeforeGetVizDataInterceptEnabled] = isOnBeforeGetVizDataInterceptEnabled;
15179
15392
  }
15393
+ if (homePageSearchBarMode) {
15394
+ params[Param.HomePageSearchBarMode] = homePageSearchBarMode;
15395
+ }
15180
15396
  params[Param.DataPanelV2Enabled] = dataPanelV2;
15181
15397
  params[Param.HideHomepageLeftNav] = hideHomepageLeftNav;
15182
15398
  params[Param.ModularHomeExperienceEnabled] = modularHomeExperience;
15183
- params[Param.CollapseSearchBarInitially] = collapseSearchBarInitially;
15399
+ params[Param.CollapseSearchBarInitially] = collapseSearchBarInitially || collapseSearchBar;
15184
15400
  params[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
15185
15401
  if (dataPanelCustomGroupsAccordionInitialState
15186
15402
  === DataPanelCustomColumnGroupsAccordionState.COLLAPSE_ALL
@@ -15227,6 +15443,8 @@ class AppEmbed extends V1Embed {
15227
15443
  return 'data/tables';
15228
15444
  case Page.SpotIQ:
15229
15445
  return modularHomeExperience ? 'home/spotiq-analysis' : 'insights/results';
15446
+ case Page.Monitor:
15447
+ return modularHomeExperience ? 'home/monitor-alerts' : 'insights/monitor-alerts';
15230
15448
  case Page.Home:
15231
15449
  default:
15232
15450
  return 'home';
@@ -15418,7 +15636,7 @@ class LiveboardEmbed extends V1Embed {
15418
15636
  let params = {};
15419
15637
  params[Param.EmbedApp] = true;
15420
15638
  params = this.getBaseQueryParams(params);
15421
- const { enableVizTransformations, fullHeight, defaultHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, enableAskSage, enable2ColumnLayout, } = this.viewConfig;
15639
+ const { enableVizTransformations, fullHeight, defaultHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, enableAskSage, enable2ColumnLayout, dataPanelV2 = true, } = this.viewConfig;
15422
15640
  const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
15423
15641
  || this.viewConfig.preventPinboardFilterRemoval;
15424
15642
  if (fullHeight === true) {
@@ -15462,6 +15680,7 @@ class LiveboardEmbed extends V1Embed {
15462
15680
  params[Param.enableAskSage] = enableAskSage;
15463
15681
  }
15464
15682
  params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
15683
+ params[Param.DataPanelV2Enabled] = dataPanelV2;
15465
15684
  const queryParams = getQueryParamString(params, true);
15466
15685
  return queryParams;
15467
15686
  }
@@ -15641,7 +15860,8 @@ class SearchEmbed extends TsEmbed {
15641
15860
  */
15642
15861
  getDataSourceMode() {
15643
15862
  let dataSourceMode = DataSourceVisualMode.Expanded;
15644
- if (this.viewConfig.collapseDataSources === true) {
15863
+ if (this.viewConfig.collapseDataSources === true
15864
+ || this.viewConfig.collapseDataPanel === true) {
15645
15865
  dataSourceMode = DataSourceVisualMode.Collapsed;
15646
15866
  }
15647
15867
  if (this.viewConfig.hideDataSources === true) {
@@ -15651,9 +15871,9 @@ class SearchEmbed extends TsEmbed {
15651
15871
  }
15652
15872
  getEmbedParams() {
15653
15873
  var _a;
15654
- const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, hideSearchBar, dataPanelV2 = false, useLastSelectedSources = false, runtimeParameters, collapseSearchBarInitially = false, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false,
15874
+ const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, hideSearchBar, dataPanelV2 = true, useLastSelectedSources = false, runtimeParameters, collapseSearchBarInitially = false, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false,
15655
15875
  /* eslint-disable-next-line max-len */
15656
- dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL, focusSearchBarOnRender = true, excludeRuntimeParametersfromURL, } = this.viewConfig;
15876
+ dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL, focusSearchBarOnRender = true, excludeRuntimeParametersfromURL, collapseSearchBar = true, } = this.viewConfig;
15657
15877
  const queryParams = this.getBaseQueryParams();
15658
15878
  queryParams[Param.HideActions] = [
15659
15879
  ...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : []),
@@ -15697,7 +15917,8 @@ class SearchEmbed extends TsEmbed {
15697
15917
  queryParams[Param.UseLastSelectedDataSource] = false;
15698
15918
  }
15699
15919
  queryParams[Param.searchEmbed] = true;
15700
- queryParams[Param.CollapseSearchBarInitially] = collapseSearchBarInitially;
15920
+ /* eslint-disable-next-line max-len */
15921
+ queryParams[Param.CollapseSearchBarInitially] = collapseSearchBarInitially || collapseSearchBar;
15701
15922
  queryParams[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
15702
15923
  if (dataPanelCustomGroupsAccordionInitialState
15703
15924
  === DataPanelCustomColumnGroupsAccordionState$1.COLLAPSE_ALL