@thoughtspot/visual-embed-sdk 1.32.0 → 1.33.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (143) 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 +12 -1
  9. package/cjs/src/embed/app.d.ts.map +1 -1
  10. package/cjs/src/embed/app.js +13 -4
  11. package/cjs/src/embed/app.js.map +1 -1
  12. package/cjs/src/embed/app.spec.js +30 -0
  13. package/cjs/src/embed/app.spec.js.map +1 -1
  14. package/cjs/src/embed/base.d.ts.map +1 -1
  15. package/cjs/src/embed/base.js +2 -0
  16. package/cjs/src/embed/base.js.map +1 -1
  17. package/cjs/src/embed/search.d.ts +15 -1
  18. package/cjs/src/embed/search.d.ts.map +1 -1
  19. package/cjs/src/embed/search.js +6 -4
  20. package/cjs/src/embed/search.js.map +1 -1
  21. package/cjs/src/embed/search.spec.js +9 -9
  22. package/cjs/src/embed/search.spec.js.map +1 -1
  23. package/cjs/src/embed/ts-embed.d.ts +1 -1
  24. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  25. package/cjs/src/embed/ts-embed.js +10 -6
  26. package/cjs/src/embed/ts-embed.js.map +1 -1
  27. package/cjs/src/errors.d.ts +11 -0
  28. package/cjs/src/errors.d.ts.map +1 -1
  29. package/cjs/src/errors.js +11 -0
  30. package/cjs/src/errors.js.map +1 -1
  31. package/cjs/src/mixpanel-service.d.ts.map +1 -1
  32. package/cjs/src/mixpanel-service.js +2 -1
  33. package/cjs/src/mixpanel-service.js.map +1 -1
  34. package/cjs/src/react/index.spec.js +1 -1
  35. package/cjs/src/react/index.spec.js.map +1 -1
  36. package/cjs/src/types.d.ts +155 -6
  37. package/cjs/src/types.d.ts.map +1 -1
  38. package/cjs/src/types.js +128 -3
  39. package/cjs/src/types.js.map +1 -1
  40. package/cjs/src/utils/processData.d.ts.map +1 -1
  41. package/cjs/src/utils/processData.js +2 -1
  42. package/cjs/src/utils/processData.js.map +1 -1
  43. package/cjs/src/utils/reporting.d.ts +16 -0
  44. package/cjs/src/utils/reporting.d.ts.map +1 -0
  45. package/cjs/src/utils/reporting.js +68 -0
  46. package/cjs/src/utils/reporting.js.map +1 -0
  47. package/cjs/src/utils/reporting.spec.d.ts +2 -0
  48. package/cjs/src/utils/reporting.spec.d.ts.map +1 -0
  49. package/cjs/src/utils/reporting.spec.js +76 -0
  50. package/cjs/src/utils/reporting.spec.js.map +1 -0
  51. package/dist/src/auth.d.ts.map +1 -1
  52. package/dist/src/authToken.d.ts.map +1 -1
  53. package/dist/src/embed/app.d.ts +12 -1
  54. package/dist/src/embed/app.d.ts.map +1 -1
  55. package/dist/src/embed/base.d.ts.map +1 -1
  56. package/dist/src/embed/search.d.ts +15 -1
  57. package/dist/src/embed/search.d.ts.map +1 -1
  58. package/dist/src/embed/ts-embed.d.ts +1 -1
  59. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  60. package/dist/src/errors.d.ts +11 -0
  61. package/dist/src/errors.d.ts.map +1 -1
  62. package/dist/src/mixpanel-service.d.ts.map +1 -1
  63. package/dist/src/types.d.ts +155 -6
  64. package/dist/src/types.d.ts.map +1 -1
  65. package/dist/src/utils/processData.d.ts.map +1 -1
  66. package/dist/src/utils/reporting.d.ts +16 -0
  67. package/dist/src/utils/reporting.d.ts.map +1 -0
  68. package/dist/src/utils/reporting.spec.d.ts +2 -0
  69. package/dist/src/utils/reporting.spec.d.ts.map +1 -0
  70. package/dist/tsembed-react.es.js +192 -38
  71. package/dist/tsembed-react.js +192 -38
  72. package/dist/tsembed.es.js +239 -39
  73. package/dist/tsembed.js +239 -39
  74. package/dist/visual-embed-sdk-react-full.d.ts +183 -9
  75. package/dist/visual-embed-sdk-react.d.ts +183 -9
  76. package/dist/visual-embed-sdk.d.ts +183 -9
  77. package/lib/package.json +1 -1
  78. package/lib/src/auth.d.ts.map +1 -1
  79. package/lib/src/auth.js +6 -5
  80. package/lib/src/auth.js.map +1 -1
  81. package/lib/src/authToken.d.ts.map +1 -1
  82. package/lib/src/authToken.js +5 -7
  83. package/lib/src/authToken.js.map +1 -1
  84. package/lib/src/embed/app.d.ts +12 -1
  85. package/lib/src/embed/app.d.ts.map +1 -1
  86. package/lib/src/embed/app.js +12 -3
  87. package/lib/src/embed/app.js.map +1 -1
  88. package/lib/src/embed/app.spec.js +31 -1
  89. package/lib/src/embed/app.spec.js.map +1 -1
  90. package/lib/src/embed/base.d.ts.map +1 -1
  91. package/lib/src/embed/base.js +2 -0
  92. package/lib/src/embed/base.js.map +1 -1
  93. package/lib/src/embed/search.d.ts +15 -1
  94. package/lib/src/embed/search.d.ts.map +1 -1
  95. package/lib/src/embed/search.js +6 -4
  96. package/lib/src/embed/search.js.map +1 -1
  97. package/lib/src/embed/search.spec.js +9 -9
  98. package/lib/src/embed/search.spec.js.map +1 -1
  99. package/lib/src/embed/ts-embed.d.ts +1 -1
  100. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  101. package/lib/src/embed/ts-embed.js +10 -6
  102. package/lib/src/embed/ts-embed.js.map +1 -1
  103. package/lib/src/errors.d.ts +11 -0
  104. package/lib/src/errors.d.ts.map +1 -1
  105. package/lib/src/errors.js +11 -0
  106. package/lib/src/errors.js.map +1 -1
  107. package/lib/src/mixpanel-service.d.ts.map +1 -1
  108. package/lib/src/mixpanel-service.js +2 -1
  109. package/lib/src/mixpanel-service.js.map +1 -1
  110. package/lib/src/react/index.spec.js +1 -1
  111. package/lib/src/react/index.spec.js.map +1 -1
  112. package/lib/src/types.d.ts +155 -6
  113. package/lib/src/types.d.ts.map +1 -1
  114. package/lib/src/types.js +128 -3
  115. package/lib/src/types.js.map +1 -1
  116. package/lib/src/utils/processData.d.ts.map +1 -1
  117. package/lib/src/utils/processData.js +2 -1
  118. package/lib/src/utils/processData.js.map +1 -1
  119. package/lib/src/utils/reporting.d.ts +16 -0
  120. package/lib/src/utils/reporting.d.ts.map +1 -0
  121. package/lib/src/utils/reporting.js +62 -0
  122. package/lib/src/utils/reporting.js.map +1 -0
  123. package/lib/src/utils/reporting.spec.d.ts +2 -0
  124. package/lib/src/utils/reporting.spec.d.ts.map +1 -0
  125. package/lib/src/utils/reporting.spec.js +74 -0
  126. package/lib/src/utils/reporting.spec.js.map +1 -0
  127. package/lib/src/visual-embed-sdk.d.ts +183 -9
  128. package/package.json +1 -1
  129. package/src/auth.ts +6 -5
  130. package/src/authToken.ts +5 -9
  131. package/src/embed/app.spec.ts +46 -0
  132. package/src/embed/app.ts +20 -3
  133. package/src/embed/base.ts +3 -1
  134. package/src/embed/search.spec.ts +9 -9
  135. package/src/embed/search.ts +21 -4
  136. package/src/embed/ts-embed.ts +13 -6
  137. package/src/errors.ts +11 -0
  138. package/src/mixpanel-service.ts +2 -1
  139. package/src/react/index.spec.tsx +1 -1
  140. package/src/types.ts +168 -13
  141. package/src/utils/processData.ts +2 -3
  142. package/src/utils/reporting.spec.ts +91 -0
  143. package/src/utils/reporting.ts +71 -0
package/dist/tsembed.js CHANGED
@@ -500,6 +500,10 @@
500
500
  * @version SDK: 1.28.0| ThoughtSpot: 9.12.5.cl
501
501
  */
502
502
  HomeLeftNavItem["SpotIQAnalysis"] = "spotiq-analysis";
503
+ /**
504
+ * @version SDK: 1.34.0| ThoughtSpot: 10.3.0.cl
505
+ */
506
+ HomeLeftNavItem["LiveboardSchedules"] = "liveboard-schedules";
503
507
  })(exports.HomeLeftNavItem || (exports.HomeLeftNavItem = {}));
504
508
  (function (RuntimeFilterOp) {
505
509
  /**
@@ -1832,13 +1836,15 @@
1832
1836
  *
1833
1837
  * @example
1834
1838
  * ```js
1835
- * appEmbed.trigger(HostEvent.CreateMonitor)
1839
+ * searchEmbed.trigger(HostEvent.CreateMonitor)
1836
1840
  * ```
1837
1841
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1838
1842
  */
1839
1843
  HostEvent["CreateMonitor"] = "createMonitor";
1840
1844
  /**
1841
- * Trigger the **Manage alerts** action on a visualization
1845
+ * Trigger the **Manage alerts** action on a KPI chart
1846
+ * in a visualization or saved Answer.
1847
+ *
1842
1848
  * @param - an object with `vizId` as a key
1843
1849
  * @example
1844
1850
  * ```js
@@ -1846,6 +1852,16 @@
1846
1852
  * vizId: '730496d6-6903-4601-937e-2c691821af3c'
1847
1853
  * })
1848
1854
  * ```
1855
+ *
1856
+ * @example
1857
+ * ```js
1858
+ * searchEmbed.trigger(HostEvent.ManageMonitor)
1859
+ * ```
1860
+ *
1861
+ * @example
1862
+ * ```js
1863
+ * vizEmbed.trigger(HostEvent.ManageMonitor)
1864
+ * ```
1849
1865
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1850
1866
  */
1851
1867
  HostEvent["ManageMonitor"] = "manageMonitor";
@@ -2417,6 +2433,8 @@
2417
2433
  Param["IsFullAppEmbed"] = "isFullAppEmbed";
2418
2434
  Param["IsOnBeforeGetVizDataInterceptEnabled"] = "isOnBeforeGetVizDataInterceptEnabled";
2419
2435
  Param["FocusSearchBarOnRender"] = "focusSearchBarOnRender";
2436
+ Param["DisableRedirectionLinksInNewTab"] = "disableRedirectionLinksInNewTab";
2437
+ Param["HomePageSearchBarMode"] = "homePageSearchBarMode";
2420
2438
  })(Param || (Param = {}));
2421
2439
  (function (Action) {
2422
2440
  /**
@@ -2539,6 +2557,7 @@
2539
2557
  */
2540
2558
  Action["ConfigureFilter"] = "configureFilter";
2541
2559
  Action["CollapseDataSources"] = "collapseDataSources";
2560
+ Action["CollapseDataPanel"] = "collapseDataPanel";
2542
2561
  /**
2543
2562
  * The **Choose sources** button on Search page.
2544
2563
  * Allows selecting data sources for search queries.
@@ -2934,12 +2953,15 @@
2934
2953
  * The Create alert action on KPI charts.
2935
2954
  * @example
2936
2955
  * ```js
2937
- * disabledActions: [Action.CreateMonitor ]
2956
+ * disabledActions: [Action.CreateMonitor]
2938
2957
  * ```
2939
2958
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
2940
2959
  */
2941
2960
  Action["CreateMonitor"] = "createMonitor";
2942
2961
  /**
2962
+ * @deprecated
2963
+ * Reports errors
2964
+ *
2943
2965
  * @example
2944
2966
  * ```js
2945
2967
  * disabledActions: [Action.ReportError]
@@ -3164,35 +3186,84 @@
3164
3186
  */
3165
3187
  Action["RenameModalTitleDescription"] = "renameModalTitleDescription";
3166
3188
  /**
3189
+ *
3190
+ * @example
3191
+ * ```js
3192
+ * disabledActions: [Action.RequestVerification]
3193
+ * ```
3167
3194
  *
3168
3195
  * @version SDK: 1.25.0 | Thoughtspot: 9.6.0.cl
3169
3196
  */
3170
3197
  Action["RequestVerification"] = "requestVerification";
3171
3198
  /**
3199
+ *
3200
+ * Allows users to mark a Liveboard as verified.
3201
+ *
3202
+ * @example
3203
+ * ```js
3204
+ * disabledActions: [Action.MarkAsVerified]
3205
+ * ```
3172
3206
  * @version SDK: 1.25.0 | Thoughtspot: 9.6.0.cl
3173
3207
  */
3174
3208
  Action["MarkAsVerified"] = "markAsVerified";
3175
3209
  /**
3210
+ * The **Add Tab** action on a Liveboard.
3211
+ * Allows adding a new tab to a Liveboard view.
3212
+ *
3213
+ * @example
3214
+ * ```js
3215
+ * disabledActions: [Action.AddTab]
3216
+ * ```
3176
3217
  * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
3177
3218
  */
3178
3219
  Action["AddTab"] = "addTab";
3179
3220
  /**
3221
+ *
3222
+ * Initiates contextual change analysis on KPI charts.
3223
+ *
3224
+ * @example
3225
+ * ```js
3226
+ * disabledActions: [Action.EnableContextualChangeAnalysis]
3227
+ * ```
3180
3228
  * @version SDK: 1.25.0 | Thoughtspot: 9.6.0.cl
3181
3229
  */
3182
3230
  Action["EnableContextualChangeAnalysis"] = "enableContextualChangeAnalysis";
3183
3231
  /**
3232
+ *
3233
+ * @example
3234
+ * ```js
3235
+ * disabledActions: [Action.ShowSageQuery]
3236
+ * ```
3237
+ *
3184
3238
  * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
3185
3239
  */
3186
3240
  Action["ShowSageQuery"] = "showSageQuery";
3187
3241
  /**
3242
+ *
3243
+ * @example
3244
+ * ```js
3245
+ * disabledActions: [Action.EditSageAnswer]
3246
+ * ```
3188
3247
  * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
3189
3248
  */
3190
3249
  Action["EditSageAnswer"] = "editSageAnswer";
3191
3250
  /**
3251
+ *
3252
+ * This action allows users to send feedback on AI-generated Answers.
3253
+ *
3254
+ * @example
3255
+ * ```js
3256
+ * disabledActions: [Action.SageAnswerFeedback]
3257
+ * ```
3192
3258
  * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
3193
3259
  */
3194
3260
  Action["SageAnswerFeedback"] = "sageAnswerFeedback";
3195
3261
  /**
3262
+ *
3263
+ * @example
3264
+ * ```js
3265
+ * disabledActions: [Action.ModifySageAnswer]
3266
+ * ```
3196
3267
  * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
3197
3268
  */
3198
3269
  Action["ModifySageAnswer"] = "modifySageAnswer";
@@ -3314,6 +3385,60 @@
3314
3385
  * @version SDK: 1.27.10 | Thoughtspot: 9.12.5.cl
3315
3386
  */
3316
3387
  Action["AIHighlights"] = "AIHighlights";
3388
+ /**
3389
+ * Action ID for edit schedule action on schedule on homepage
3390
+ * @example
3391
+ * ```js
3392
+ * disabledActions: [Action.EditScheduleHomepage]
3393
+ * ```
3394
+ * @version SDK: 1.34.0 | Thoughtspot: 10.3.0.cl
3395
+ */
3396
+ Action["EditScheduleHomepage"] = "editScheduleHomepage";
3397
+ /**
3398
+ * Action ID for pause schedule action on schedule on homepage
3399
+ * @example
3400
+ * ```js
3401
+ * disabledActions: [Action.PauseScheduleHomepage]
3402
+ * ```
3403
+ * @version SDK: 1.34.0 | Thoughtspot: 10.3.0.cl
3404
+ */
3405
+ Action["PauseScheduleHomepage"] = "pauseScheduleHomepage";
3406
+ /**
3407
+ * Action ID for view schedule run action on schedule on homepage
3408
+ * @example
3409
+ * ```js
3410
+ * disabledActions: [Action.ViewScheduleRunHomepage]
3411
+ * ```
3412
+ * @version SDK: 1.34.0 | Thoughtspot: 10.3.0.cl
3413
+ */
3414
+ Action["ViewScheduleRunHomepage"] = "viewScheduleRunHomepage";
3415
+ /**
3416
+ * Action ID for unsubscribe schedule action on schedule on homepage
3417
+ * @example
3418
+ * ```js
3419
+ * disabledActions: [Action.UnsubscribeScheduleHomepage]
3420
+ * ```
3421
+ * @version SDK: 1.34.0 | Thoughtspot: 10.3.0.cl
3422
+ */
3423
+ Action["UnsubscribeScheduleHomepage"] = "unsubscribeScheduleHomepage";
3424
+ /**
3425
+ * Action ID for delete schedule action on schedule on homepage
3426
+ * @example
3427
+ * ```js
3428
+ * disabledActions: [Action.DeleteScheduleHomepage]
3429
+ * ```
3430
+ * @version SDK: 1.34.0 | Thoughtspot: 10.3.0.cl
3431
+ */
3432
+ Action["DeleteScheduleHomepage"] = "deleteScheduleHomepage";
3433
+ /**
3434
+ * The **Analyze CTA** action on KPI chart.
3435
+ * @example
3436
+ * ```js
3437
+ * disabledActions: [Action.KPIAnalysisCTA]
3438
+ * ```
3439
+ * @version SDK: 1.34.0 | Thoughtspot: 10.3.0.cl
3440
+ */
3441
+ Action["KPIAnalysisCTA"] = "kpiAnalysisCTA";
3317
3442
  })(exports.Action || (exports.Action = {}));
3318
3443
  (function (PrefetchFeatures) {
3319
3444
  PrefetchFeatures["FullApp"] = "FullApp";
@@ -5675,6 +5800,25 @@
5675
5800
 
5676
5801
  var isEqual_1 = isEqual;
5677
5802
 
5803
+ const ERROR_MESSAGE = {
5804
+ INVALID_THOUGHTSPOT_HOST: 'Error parsing ThoughtSpot host. Please provide a valid URL.',
5805
+ LIVEBOARD_VIZ_ID_VALIDATION: 'Please select a liveboard to embed.',
5806
+ TRIGGER_TIMED_OUT: 'Trigger timedout in getting response',
5807
+ SEARCHEMBED_BETA_WRANING_MESSAGE: 'Search Embed is in Beta in this release.',
5808
+ SAGE_EMBED_BETA_WARNING_MESSAGE: 'Sage Embed is in Beta in this release.',
5809
+ 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.',
5810
+ 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.',
5811
+ SDK_NOT_INITIALIZED: 'SDK not initialized',
5812
+ SESSION_INFO_FAILED: 'Failed to get session info',
5813
+ INVALID_TOKEN_ERROR: 'Received invalid token from getAuthToken callback or authToken endpoint.',
5814
+ MIXPANEL_TOKEN_NOT_FOUND: 'Mixpanel token not found in session info',
5815
+ PRERENDER_ID_MISSING: 'PreRender id is required for preRender',
5816
+ SYNC_STYLE_CALLED_BEFORE_RENDER: 'PreRender should be called before using syncPreRenderStyle',
5817
+ CSP_VIOLATION_ALERT: 'CSP violation detected. Please check the console errors for more details.',
5818
+ 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',
5819
+ MISSING_REPORTING_OBSERVER: 'ReportingObserver not supported',
5820
+ };
5821
+
5678
5822
  const EndPoints = {
5679
5823
  AUTH_VERIFICATION: '/callosum/v1/session/info',
5680
5824
  SESSION_INFO: '/callosum/v1/session/info',
@@ -5788,9 +5932,6 @@
5788
5932
  });
5789
5933
  }
5790
5934
 
5791
- const DUPLICATE_TOKEN_ERR = 'Duplicate token, please issue a new token every time getAuthToken callback is called.'
5792
- + 'See https://developers.thoughtspot.com/docs/?pageid=embed-auth#trusted-auth-embed for more details.';
5793
- const INVALID_TOKEN_ERR = 'Invalid token received form token callback or authToken endpoint.';
5794
5935
  let cachedAuthToken = null;
5795
5936
  // This method can be used to get the authToken using the embedConfig
5796
5937
  async function getAuthenticationToken(embedConfig) {
@@ -5821,7 +5962,7 @@
5821
5962
  await validateAuthToken(embedConfig, authToken);
5822
5963
  }
5823
5964
  catch (e) {
5824
- logger.error(`Received invalid token from getAuthToken callback or authToken endpoint. Error : ${e.message}`);
5965
+ logger.error(`${ERROR_MESSAGE.INVALID_TOKEN_ERROR} Error : ${e.message}`);
5825
5966
  throw e;
5826
5967
  }
5827
5968
  cachedAuthToken = authToken;
@@ -5843,12 +5984,12 @@
5843
5984
  if (cachedAuthToken && cachedAuthToken === authToken) {
5844
5985
  if (!embedConfig.suppressErrorAlerts && !suppressAlert) {
5845
5986
  // eslint-disable-next-line no-alert
5846
- alert(DUPLICATE_TOKEN_ERR);
5987
+ alert(ERROR_MESSAGE.DUPLICATE_TOKEN_ERR);
5847
5988
  }
5848
- throw new Error(DUPLICATE_TOKEN_ERR);
5989
+ throw new Error(ERROR_MESSAGE.DUPLICATE_TOKEN_ERR);
5849
5990
  }
5850
5991
  else {
5851
- throw new Error(INVALID_TOKEN_ERR);
5992
+ throw new Error(ERROR_MESSAGE.INVALID_TOKEN_ERROR);
5852
5993
  }
5853
5994
  };
5854
5995
  /**
@@ -6471,14 +6612,6 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
6471
6612
  return underlyingDataPoint;
6472
6613
  }
6473
6614
 
6474
- const ERROR_MESSAGE = {
6475
- INVALID_THOUGHTSPOT_HOST: 'Error parsing ThoughtSpot host. Please provide a valid URL.',
6476
- LIVEBOARD_VIZ_ID_VALIDATION: 'Please select a liveboard to embed.',
6477
- TRIGGER_TIMED_OUT: 'Trigger timedout in getting response',
6478
- SEARCHEMBED_BETA_WRANING_MESSAGE: 'Search Embed is in Beta in this release.',
6479
- SAGE_EMBED_BETA_WARNING_MESSAGE: 'Sage Embed is in Beta in this release.',
6480
- };
6481
-
6482
6615
  /**
6483
6616
  * Copyright (c) 2023
6484
6617
  *
@@ -12573,7 +12706,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
12573
12706
  function initMixpanel(sessionInfo) {
12574
12707
  var _a;
12575
12708
  if (!sessionInfo || !sessionInfo.mixpanelToken) {
12576
- logger.error('Mixpanel token not found in session info');
12709
+ logger.error(ERROR_MESSAGE.MIXPANEL_TOKEN_NOT_FOUND);
12577
12710
  return;
12578
12711
  }
12579
12712
  // On a public cluster the user is anonymous, so don't set the identify to
@@ -12939,6 +13072,58 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
12939
13072
  }
12940
13073
  });
12941
13074
 
13075
+ var ReportType;
13076
+ (function (ReportType) {
13077
+ ReportType["CSP_VIOLATION"] = "csp-violation";
13078
+ ReportType["DEPRECATION"] = "deprecation";
13079
+ ReportType["INTERVENTION"] = "intervention";
13080
+ })(ReportType || (ReportType = {}));
13081
+ let globalObserver = null;
13082
+ /**
13083
+ * Register a global ReportingObserver to capture all unhandled errors
13084
+ * @param overrideExisting boolean to override existing observer
13085
+ * @returns ReportingObserver | null
13086
+ */
13087
+ function registerReportingObserver(overrideExisting = false) {
13088
+ if (!(window.ReportingObserver)) {
13089
+ logger.warn(ERROR_MESSAGE.MISSING_REPORTING_OBSERVER);
13090
+ return null;
13091
+ }
13092
+ if (overrideExisting) {
13093
+ resetGlobalReportingObserver();
13094
+ }
13095
+ if (globalObserver) {
13096
+ return globalObserver;
13097
+ }
13098
+ const embedConfig = getEmbedConfig();
13099
+ globalObserver = new ReportingObserver((reports) => {
13100
+ reports.forEach((report) => {
13101
+ const { type, url, body } = report;
13102
+ const reportBody = body;
13103
+ const isThoughtSpotHost = url
13104
+ && url.startsWith(embedConfig.thoughtSpotHost);
13105
+ const isFrameHostError = type === ReportType.CSP_VIOLATION
13106
+ && reportBody.effectiveDirective === 'frame-ancestors';
13107
+ if (isThoughtSpotHost && isFrameHostError) {
13108
+ if (!embedConfig.suppressErrorAlerts) {
13109
+ alert(ERROR_MESSAGE.CSP_VIOLATION_ALERT);
13110
+ }
13111
+ logger.error(ERROR_MESSAGE.CSP_FRAME_HOST_VIOLATION_LOG_MESSAGE);
13112
+ }
13113
+ });
13114
+ }, { buffered: true });
13115
+ globalObserver.observe();
13116
+ return globalObserver;
13117
+ }
13118
+ /**
13119
+ * Resets the global ReportingObserver
13120
+ */
13121
+ function resetGlobalReportingObserver() {
13122
+ if (globalObserver)
13123
+ globalObserver.disconnect();
13124
+ globalObserver = null;
13125
+ }
13126
+
12942
13127
  /**
12943
13128
  *
12944
13129
  * @param url
@@ -13115,7 +13300,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
13115
13300
  */
13116
13301
  function notifyAuthSDKSuccess() {
13117
13302
  if (!authEE) {
13118
- logger.error('SDK not initialized');
13303
+ logger.error(ERROR_MESSAGE.SDK_NOT_INITIALIZED);
13119
13304
  return;
13120
13305
  }
13121
13306
  authEE.emit(exports.AuthStatus.SDK_SUCCESS);
@@ -13125,7 +13310,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
13125
13310
  */
13126
13311
  async function notifyAuthSuccess() {
13127
13312
  if (!authEE) {
13128
- logger.error('SDK not initialized');
13313
+ logger.error(ERROR_MESSAGE.SDK_NOT_INITIALIZED);
13129
13314
  return;
13130
13315
  }
13131
13316
  try {
@@ -13133,7 +13318,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
13133
13318
  authEE.emit(exports.AuthStatus.SUCCESS, sessionInfo);
13134
13319
  }
13135
13320
  catch (e) {
13136
- logger.error('Failed to get session info');
13321
+ logger.error(ERROR_MESSAGE.SESSION_INFO_FAILED);
13137
13322
  }
13138
13323
  }
13139
13324
  /**
@@ -13142,7 +13327,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
13142
13327
  */
13143
13328
  function notifyAuthFailure(failureType) {
13144
13329
  if (!authEE) {
13145
- logger.error('SDK not initialized');
13330
+ logger.error(ERROR_MESSAGE.SDK_NOT_INITIALIZED);
13146
13331
  return;
13147
13332
  }
13148
13333
  authEE.emit(exports.AuthStatus.FAILURE, failureType);
@@ -13152,7 +13337,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
13152
13337
  */
13153
13338
  function notifyLogout() {
13154
13339
  if (!authEE) {
13155
- logger.error('SDK not initialized');
13340
+ logger.error(ERROR_MESSAGE.SDK_NOT_INITIALIZED);
13156
13341
  return;
13157
13342
  }
13158
13343
  authEE.emit(exports.AuthStatus.LOGOUT);
@@ -13546,6 +13731,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
13546
13731
  thoughtSpotHost: getThoughtSpotHost(embedConfig),
13547
13732
  }));
13548
13733
  setGlobalLogLevelOverride(embedConfig.logLevel);
13734
+ registerReportingObserver();
13549
13735
  const authEE = new eventemitter3();
13550
13736
  setAuthEE(authEE);
13551
13737
  handleAuth();
@@ -13763,7 +13949,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
13763
13949
  if (!ignoreNoCookieAccess) {
13764
13950
  if (!suppressNoCookieAccessAlert && !suppressErrorAlerts) {
13765
13951
  // eslint-disable-next-line no-alert
13766
- 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.');
13952
+ alert(ERROR_MESSAGE.THIRD_PARTY_COOKIE_BLOCKED_ALERT);
13767
13953
  }
13768
13954
  // eslint-disable-next-line no-param-reassign
13769
13955
  containerEl.innerHTML = loginFailedMessage;
@@ -13879,7 +14065,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
13879
14065
  });
13880
14066
  }
13881
14067
 
13882
- 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$1={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p . --incremental false; tsc -p . --incremental false --module commonjs --outDir cjs",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$1,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.js",limit:"48 kB"}],scripts:scripts,peerDependencies:peerDependencies,dependencies:dependencies,devDependencies:devDependencies,author:author,email:email,license:license,directories:directories,repository:repository,publishConfig:publishConfig,keywords:keywords,bugs:bugs,homepage:homepage,globals:globals};
14068
+ var name="@thoughtspot/visual-embed-sdk";var version="1.33.0-alpha.2";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports$1={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p . --incremental false; tsc -p . --incremental false --module commonjs --outDir cjs",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$1,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.js",limit:"48 kB"}],scripts:scripts,peerDependencies:peerDependencies,dependencies:dependencies,devDependencies:devDependencies,author:author,email:email,license:license,directories:directories,repository:repository,publishConfig:publishConfig,keywords:keywords,bugs:bugs,homepage:homepage,globals:globals};
13883
14069
 
13884
14070
  /**
13885
14071
  * Copyright (c) 2022
@@ -13977,7 +14163,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
13977
14163
  });
13978
14164
  }
13979
14165
  catch (e) {
13980
- logger.error(`Received invalid token. Error : ${e === null || e === void 0 ? void 0 : e.message}`);
14166
+ logger.error(`${ERROR_MESSAGE.INVALID_TOKEN_ERROR} Error : ${e === null || e === void 0 ? void 0 : e.message}`);
13981
14167
  processAuthFailure(e, this.isPreRendered ? this.preRenderWrapper : this.el);
13982
14168
  }
13983
14169
  }
@@ -14185,7 +14371,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
14185
14371
  if (this.embedConfig.currencyFormat) {
14186
14372
  queryParams[Param.CurrencyFormat] = this.embedConfig.currencyFormat;
14187
14373
  }
14188
- const { disabledActions, disabledActionReason, hiddenActions, visibleActions, hiddenTabs, visibleTabs, showAlerts, additionalFlags, locale, customizations, contextMenuTrigger, linkOverride, insertInToSlide, } = this.viewConfig;
14374
+ const { disabledActions, disabledActionReason, hiddenActions, visibleActions, hiddenTabs, visibleTabs, showAlerts, additionalFlags, locale, customizations, contextMenuTrigger, linkOverride, insertInToSlide, disableRedirectionLinksInNewTab, } = this.viewConfig;
14189
14375
  if (Array.isArray(visibleActions) && Array.isArray(hiddenActions)) {
14190
14376
  this.handleError('You cannot have both hidden actions and visible actions');
14191
14377
  return queryParams;
@@ -14246,6 +14432,9 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
14246
14432
  if (insertInToSlide) {
14247
14433
  queryParams[Param.ShowInsertToSlide] = insertInToSlide;
14248
14434
  }
14435
+ if (disableRedirectionLinksInNewTab) {
14436
+ queryParams[Param.DisableRedirectionLinksInNewTab] = disableRedirectionLinksInNewTab;
14437
+ }
14249
14438
  queryParams[Param.OverrideNativeConsole] = true;
14250
14439
  queryParams[Param.ClientLogLevel] = this.embedConfig.logLevel;
14251
14440
  return queryParams;
@@ -14290,7 +14479,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
14290
14479
  iFrame.mozallowfullscreen = true;
14291
14480
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
14292
14481
  // @ts-ignore
14293
- iFrame.allow = 'clipboard-read; clipboard-write';
14482
+ iFrame.allow = 'clipboard-read; clipboard-write fullscreen';
14294
14483
  const { height: frameHeight, width: frameWidth, ...restParams } = this.viewConfig.frameParams || {};
14295
14484
  const width = getCssDimension(frameWidth || DEFAULT_EMBED_WIDTH);
14296
14485
  const height = getCssDimension(frameHeight || DEFAULT_EMBED_HEIGHT);
@@ -14673,7 +14862,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
14673
14862
  */
14674
14863
  preRender(showPreRenderByDefault = false) {
14675
14864
  if (!this.viewConfig.preRenderId) {
14676
- logger.error('PreRender id is required for preRender');
14865
+ logger.error(ERROR_MESSAGE.PRERENDER_ID_MISSING);
14677
14866
  return this;
14678
14867
  }
14679
14868
  this.isPreRendered = true;
@@ -14746,7 +14935,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
14746
14935
  */
14747
14936
  showPreRender() {
14748
14937
  if (!this.viewConfig.preRenderId) {
14749
- logger.error('PreRender id is required for preRender');
14938
+ logger.error(ERROR_MESSAGE.PRERENDER_ID_MISSING);
14750
14939
  return;
14751
14940
  }
14752
14941
  if (!this.isPreRenderAvailable()) {
@@ -14788,7 +14977,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
14788
14977
  */
14789
14978
  syncPreRenderStyle() {
14790
14979
  if (!this.isPreRenderAvailable() || !this.el) {
14791
- logger.error('PreRender should be called before using syncPreRenderStyle');
14980
+ logger.error(ERROR_MESSAGE.SYNC_STYLE_CALLED_BEFORE_RENDER);
14792
14981
  return;
14793
14982
  }
14794
14983
  const elBoundingClient = this.el.getBoundingClientRect();
@@ -14968,6 +15157,12 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
14968
15157
  */
14969
15158
  DataPanelCustomColumnGroupsAccordionState["EXPAND_FIRST"] = "EXPAND_FIRST";
14970
15159
  })(DataPanelCustomColumnGroupsAccordionState || (DataPanelCustomColumnGroupsAccordionState = {}));
15160
+ var HomePageSearchBarMode;
15161
+ (function (HomePageSearchBarMode) {
15162
+ HomePageSearchBarMode["OBJECT_SEARCH"] = "objectSearch";
15163
+ HomePageSearchBarMode["AI_ANSWER"] = "aiAnswer";
15164
+ HomePageSearchBarMode["NONE"] = "none";
15165
+ })(HomePageSearchBarMode || (HomePageSearchBarMode = {}));
14971
15166
  /**
14972
15167
  * Embeds full ThoughtSpot experience in a host application.
14973
15168
  * @group Embed components
@@ -15008,9 +15203,9 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
15008
15203
  * embedded Liveboard or visualization.
15009
15204
  */
15010
15205
  getEmbedParams() {
15011
- 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,
15206
+ const { tag, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 = true, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, hideHomepageLeftNav = false, modularHomeExperience = false, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, enable2ColumnLayout, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false,
15012
15207
  /* eslint-disable-next-line max-len */
15013
- dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, } = this.viewConfig;
15208
+ dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, collapseSearchBar = true, homePageSearchBarMode, } = this.viewConfig;
15014
15209
  let params = {};
15015
15210
  params[Param.EmbedApp] = true;
15016
15211
  params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
@@ -15048,10 +15243,13 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
15048
15243
  /* eslint-disable-next-line max-len */
15049
15244
  params[Param.IsOnBeforeGetVizDataInterceptEnabled] = isOnBeforeGetVizDataInterceptEnabled;
15050
15245
  }
15246
+ if (homePageSearchBarMode) {
15247
+ params[Param.HomePageSearchBarMode] = homePageSearchBarMode;
15248
+ }
15051
15249
  params[Param.DataPanelV2Enabled] = dataPanelV2;
15052
15250
  params[Param.HideHomepageLeftNav] = hideHomepageLeftNav;
15053
15251
  params[Param.ModularHomeExperienceEnabled] = modularHomeExperience;
15054
- params[Param.CollapseSearchBarInitially] = collapseSearchBarInitially;
15252
+ params[Param.CollapseSearchBarInitially] = collapseSearchBarInitially || collapseSearchBar;
15055
15253
  params[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
15056
15254
  if (dataPanelCustomGroupsAccordionInitialState
15057
15255
  === DataPanelCustomColumnGroupsAccordionState.COLLAPSE_ALL
@@ -15512,7 +15710,8 @@ query GetEurekaVizSnapshots(
15512
15710
  */
15513
15711
  getDataSourceMode() {
15514
15712
  let dataSourceMode = exports.DataSourceVisualMode.Expanded;
15515
- if (this.viewConfig.collapseDataSources === true) {
15713
+ if (this.viewConfig.collapseDataSources === true
15714
+ || this.viewConfig.collapseDataPanel === true) {
15516
15715
  dataSourceMode = exports.DataSourceVisualMode.Collapsed;
15517
15716
  }
15518
15717
  if (this.viewConfig.hideDataSources === true) {
@@ -15522,9 +15721,9 @@ query GetEurekaVizSnapshots(
15522
15721
  }
15523
15722
  getEmbedParams() {
15524
15723
  var _a;
15525
- const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, hideSearchBar, dataPanelV2 = false, useLastSelectedSources = false, runtimeParameters, collapseSearchBarInitially = false, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false,
15724
+ const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, hideSearchBar, dataPanelV2 = true, useLastSelectedSources = false, runtimeParameters, collapseSearchBarInitially = false, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false,
15526
15725
  /* eslint-disable-next-line max-len */
15527
- dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL, focusSearchBarOnRender = true, excludeRuntimeParametersfromURL, } = this.viewConfig;
15726
+ dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL, focusSearchBarOnRender = true, excludeRuntimeParametersfromURL, collapseSearchBar = true, } = this.viewConfig;
15528
15727
  const queryParams = this.getBaseQueryParams();
15529
15728
  queryParams[Param.HideActions] = [
15530
15729
  ...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : []),
@@ -15568,7 +15767,8 @@ query GetEurekaVizSnapshots(
15568
15767
  queryParams[Param.UseLastSelectedDataSource] = false;
15569
15768
  }
15570
15769
  queryParams[Param.searchEmbed] = true;
15571
- queryParams[Param.CollapseSearchBarInitially] = collapseSearchBarInitially;
15770
+ /* eslint-disable-next-line max-len */
15771
+ queryParams[Param.CollapseSearchBarInitially] = collapseSearchBarInitially || collapseSearchBar;
15572
15772
  queryParams[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
15573
15773
  if (dataPanelCustomGroupsAccordionInitialState
15574
15774
  === DataPanelCustomColumnGroupsAccordionState$1.COLLAPSE_ALL