@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
@@ -624,6 +624,10 @@ var HomeLeftNavItem;
624
624
  * @version SDK: 1.28.0| ThoughtSpot: 9.12.5.cl
625
625
  */
626
626
  HomeLeftNavItem["SpotIQAnalysis"] = "spotiq-analysis";
627
+ /**
628
+ * @version SDK: 1.34.0| ThoughtSpot: 10.3.0.cl
629
+ */
630
+ HomeLeftNavItem["LiveboardSchedules"] = "liveboard-schedules";
627
631
  })(HomeLeftNavItem || (HomeLeftNavItem = {}));
628
632
  /**
629
633
  * A map of the supported runtime filter operations
@@ -2014,13 +2018,15 @@ var HostEvent;
2014
2018
  *
2015
2019
  * @example
2016
2020
  * ```js
2017
- * appEmbed.trigger(HostEvent.CreateMonitor)
2021
+ * searchEmbed.trigger(HostEvent.CreateMonitor)
2018
2022
  * ```
2019
2023
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2020
2024
  */
2021
2025
  HostEvent["CreateMonitor"] = "createMonitor";
2022
2026
  /**
2023
- * Trigger the **Manage alerts** action on a visualization
2027
+ * Trigger the **Manage alerts** action on a KPI chart
2028
+ * in a visualization or saved Answer.
2029
+ *
2024
2030
  * @param - an object with `vizId` as a key
2025
2031
  * @example
2026
2032
  * ```js
@@ -2028,6 +2034,16 @@ var HostEvent;
2028
2034
  * vizId: '730496d6-6903-4601-937e-2c691821af3c'
2029
2035
  * })
2030
2036
  * ```
2037
+ *
2038
+ * @example
2039
+ * ```js
2040
+ * searchEmbed.trigger(HostEvent.ManageMonitor)
2041
+ * ```
2042
+ *
2043
+ * @example
2044
+ * ```js
2045
+ * vizEmbed.trigger(HostEvent.ManageMonitor)
2046
+ * ```
2031
2047
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2032
2048
  */
2033
2049
  HostEvent["ManageMonitor"] = "manageMonitor";
@@ -2605,6 +2621,8 @@ var Param;
2605
2621
  Param["IsFullAppEmbed"] = "isFullAppEmbed";
2606
2622
  Param["IsOnBeforeGetVizDataInterceptEnabled"] = "isOnBeforeGetVizDataInterceptEnabled";
2607
2623
  Param["FocusSearchBarOnRender"] = "focusSearchBarOnRender";
2624
+ Param["DisableRedirectionLinksInNewTab"] = "disableRedirectionLinksInNewTab";
2625
+ Param["HomePageSearchBarMode"] = "homePageSearchBarMode";
2608
2626
  })(Param || (Param = {}));
2609
2627
  /**
2610
2628
  * ThoughtSpot application pages include actions and menu commands
@@ -2755,6 +2773,7 @@ var Action;
2755
2773
  */
2756
2774
  Action["ConfigureFilter"] = "configureFilter";
2757
2775
  Action["CollapseDataSources"] = "collapseDataSources";
2776
+ Action["CollapseDataPanel"] = "collapseDataPanel";
2758
2777
  /**
2759
2778
  * The **Choose sources** button on Search page.
2760
2779
  * Allows selecting data sources for search queries.
@@ -3150,12 +3169,15 @@ var Action;
3150
3169
  * The Create alert action on KPI charts.
3151
3170
  * @example
3152
3171
  * ```js
3153
- * disabledActions: [Action.CreateMonitor ]
3172
+ * disabledActions: [Action.CreateMonitor]
3154
3173
  * ```
3155
3174
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
3156
3175
  */
3157
3176
  Action["CreateMonitor"] = "createMonitor";
3158
3177
  /**
3178
+ * @deprecated
3179
+ * Reports errors
3180
+ *
3159
3181
  * @example
3160
3182
  * ```js
3161
3183
  * disabledActions: [Action.ReportError]
@@ -3380,35 +3402,84 @@ var Action;
3380
3402
  */
3381
3403
  Action["RenameModalTitleDescription"] = "renameModalTitleDescription";
3382
3404
  /**
3405
+ *
3406
+ * @example
3407
+ * ```js
3408
+ * disabledActions: [Action.RequestVerification]
3409
+ * ```
3383
3410
  *
3384
3411
  * @version SDK: 1.25.0 | Thoughtspot: 9.6.0.cl
3385
3412
  */
3386
3413
  Action["RequestVerification"] = "requestVerification";
3387
3414
  /**
3415
+ *
3416
+ * Allows users to mark a Liveboard as verified.
3417
+ *
3418
+ * @example
3419
+ * ```js
3420
+ * disabledActions: [Action.MarkAsVerified]
3421
+ * ```
3388
3422
  * @version SDK: 1.25.0 | Thoughtspot: 9.6.0.cl
3389
3423
  */
3390
3424
  Action["MarkAsVerified"] = "markAsVerified";
3391
3425
  /**
3426
+ * The **Add Tab** action on a Liveboard.
3427
+ * Allows adding a new tab to a Liveboard view.
3428
+ *
3429
+ * @example
3430
+ * ```js
3431
+ * disabledActions: [Action.AddTab]
3432
+ * ```
3392
3433
  * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
3393
3434
  */
3394
3435
  Action["AddTab"] = "addTab";
3395
3436
  /**
3437
+ *
3438
+ * Initiates contextual change analysis on KPI charts.
3439
+ *
3440
+ * @example
3441
+ * ```js
3442
+ * disabledActions: [Action.EnableContextualChangeAnalysis]
3443
+ * ```
3396
3444
  * @version SDK: 1.25.0 | Thoughtspot: 9.6.0.cl
3397
3445
  */
3398
3446
  Action["EnableContextualChangeAnalysis"] = "enableContextualChangeAnalysis";
3399
3447
  /**
3448
+ *
3449
+ * @example
3450
+ * ```js
3451
+ * disabledActions: [Action.ShowSageQuery]
3452
+ * ```
3453
+ *
3400
3454
  * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
3401
3455
  */
3402
3456
  Action["ShowSageQuery"] = "showSageQuery";
3403
3457
  /**
3458
+ *
3459
+ * @example
3460
+ * ```js
3461
+ * disabledActions: [Action.EditSageAnswer]
3462
+ * ```
3404
3463
  * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
3405
3464
  */
3406
3465
  Action["EditSageAnswer"] = "editSageAnswer";
3407
3466
  /**
3467
+ *
3468
+ * This action allows users to send feedback on AI-generated Answers.
3469
+ *
3470
+ * @example
3471
+ * ```js
3472
+ * disabledActions: [Action.SageAnswerFeedback]
3473
+ * ```
3408
3474
  * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
3409
3475
  */
3410
3476
  Action["SageAnswerFeedback"] = "sageAnswerFeedback";
3411
3477
  /**
3478
+ *
3479
+ * @example
3480
+ * ```js
3481
+ * disabledActions: [Action.ModifySageAnswer]
3482
+ * ```
3412
3483
  * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
3413
3484
  */
3414
3485
  Action["ModifySageAnswer"] = "modifySageAnswer";
@@ -3530,6 +3601,60 @@ var Action;
3530
3601
  * @version SDK: 1.27.10 | Thoughtspot: 9.12.5.cl
3531
3602
  */
3532
3603
  Action["AIHighlights"] = "AIHighlights";
3604
+ /**
3605
+ * Action ID for edit schedule action on schedule on homepage
3606
+ * @example
3607
+ * ```js
3608
+ * disabledActions: [Action.EditScheduleHomepage]
3609
+ * ```
3610
+ * @version SDK: 1.34.0 | Thoughtspot: 10.3.0.cl
3611
+ */
3612
+ Action["EditScheduleHomepage"] = "editScheduleHomepage";
3613
+ /**
3614
+ * Action ID for pause schedule action on schedule on homepage
3615
+ * @example
3616
+ * ```js
3617
+ * disabledActions: [Action.PauseScheduleHomepage]
3618
+ * ```
3619
+ * @version SDK: 1.34.0 | Thoughtspot: 10.3.0.cl
3620
+ */
3621
+ Action["PauseScheduleHomepage"] = "pauseScheduleHomepage";
3622
+ /**
3623
+ * Action ID for view schedule run action on schedule on homepage
3624
+ * @example
3625
+ * ```js
3626
+ * disabledActions: [Action.ViewScheduleRunHomepage]
3627
+ * ```
3628
+ * @version SDK: 1.34.0 | Thoughtspot: 10.3.0.cl
3629
+ */
3630
+ Action["ViewScheduleRunHomepage"] = "viewScheduleRunHomepage";
3631
+ /**
3632
+ * Action ID for unsubscribe schedule action on schedule on homepage
3633
+ * @example
3634
+ * ```js
3635
+ * disabledActions: [Action.UnsubscribeScheduleHomepage]
3636
+ * ```
3637
+ * @version SDK: 1.34.0 | Thoughtspot: 10.3.0.cl
3638
+ */
3639
+ Action["UnsubscribeScheduleHomepage"] = "unsubscribeScheduleHomepage";
3640
+ /**
3641
+ * Action ID for delete schedule action on schedule on homepage
3642
+ * @example
3643
+ * ```js
3644
+ * disabledActions: [Action.DeleteScheduleHomepage]
3645
+ * ```
3646
+ * @version SDK: 1.34.0 | Thoughtspot: 10.3.0.cl
3647
+ */
3648
+ Action["DeleteScheduleHomepage"] = "deleteScheduleHomepage";
3649
+ /**
3650
+ * The **Analyze CTA** action on KPI chart.
3651
+ * @example
3652
+ * ```js
3653
+ * disabledActions: [Action.KPIAnalysisCTA]
3654
+ * ```
3655
+ * @version SDK: 1.34.0 | Thoughtspot: 10.3.0.cl
3656
+ */
3657
+ Action["KPIAnalysisCTA"] = "kpiAnalysisCTA";
3533
3658
  })(Action || (Action = {}));
3534
3659
  var PrefetchFeatures;
3535
3660
  (function (PrefetchFeatures) {
@@ -5894,6 +6019,25 @@ class Logger {
5894
6019
  }
5895
6020
  const logger = new Logger();
5896
6021
 
6022
+ const ERROR_MESSAGE = {
6023
+ INVALID_THOUGHTSPOT_HOST: 'Error parsing ThoughtSpot host. Please provide a valid URL.',
6024
+ LIVEBOARD_VIZ_ID_VALIDATION: 'Please select a liveboard to embed.',
6025
+ TRIGGER_TIMED_OUT: 'Trigger timedout in getting response',
6026
+ SEARCHEMBED_BETA_WRANING_MESSAGE: 'Search Embed is in Beta in this release.',
6027
+ SAGE_EMBED_BETA_WARNING_MESSAGE: 'Sage Embed is in Beta in this release.',
6028
+ 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.',
6029
+ 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.',
6030
+ SDK_NOT_INITIALIZED: 'SDK not initialized',
6031
+ SESSION_INFO_FAILED: 'Failed to get session info',
6032
+ INVALID_TOKEN_ERROR: 'Received invalid token from getAuthToken callback or authToken endpoint.',
6033
+ MIXPANEL_TOKEN_NOT_FOUND: 'Mixpanel token not found in session info',
6034
+ PRERENDER_ID_MISSING: 'PreRender id is required for preRender',
6035
+ SYNC_STYLE_CALLED_BEFORE_RENDER: 'PreRender should be called before using syncPreRenderStyle',
6036
+ CSP_VIOLATION_ALERT: 'CSP violation detected. Please check the console errors for more details.',
6037
+ 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',
6038
+ MISSING_REPORTING_OBSERVER: 'ReportingObserver not supported',
6039
+ };
6040
+
5897
6041
  const EndPoints = {
5898
6042
  AUTH_VERIFICATION: '/callosum/v1/session/info',
5899
6043
  SESSION_INFO: '/callosum/v1/session/info',
@@ -6007,9 +6151,6 @@ async function fetchBasicAuthService(thoughtSpotHost, username, password) {
6007
6151
  });
6008
6152
  }
6009
6153
 
6010
- const DUPLICATE_TOKEN_ERR = 'Duplicate token, please issue a new token every time getAuthToken callback is called.'
6011
- + 'See https://developers.thoughtspot.com/docs/?pageid=embed-auth#trusted-auth-embed for more details.';
6012
- const INVALID_TOKEN_ERR = 'Invalid token received form token callback or authToken endpoint.';
6013
6154
  let cachedAuthToken = null;
6014
6155
  // This method can be used to get the authToken using the embedConfig
6015
6156
  async function getAuthenticationToken(embedConfig) {
@@ -6040,7 +6181,7 @@ async function getAuthenticationToken(embedConfig) {
6040
6181
  await validateAuthToken(embedConfig, authToken);
6041
6182
  }
6042
6183
  catch (e) {
6043
- logger.error(`Received invalid token from getAuthToken callback or authToken endpoint. Error : ${e.message}`);
6184
+ logger.error(`${ERROR_MESSAGE.INVALID_TOKEN_ERROR} Error : ${e.message}`);
6044
6185
  throw e;
6045
6186
  }
6046
6187
  cachedAuthToken = authToken;
@@ -6062,12 +6203,12 @@ const validateAuthToken = async (embedConfig, authToken, suppressAlert) => {
6062
6203
  if (cachedAuthToken && cachedAuthToken === authToken) {
6063
6204
  if (!embedConfig.suppressErrorAlerts && !suppressAlert) {
6064
6205
  // eslint-disable-next-line no-alert
6065
- alert(DUPLICATE_TOKEN_ERR);
6206
+ alert(ERROR_MESSAGE.DUPLICATE_TOKEN_ERR);
6066
6207
  }
6067
- throw new Error(DUPLICATE_TOKEN_ERR);
6208
+ throw new Error(ERROR_MESSAGE.DUPLICATE_TOKEN_ERR);
6068
6209
  }
6069
6210
  else {
6070
- throw new Error(INVALID_TOKEN_ERR);
6211
+ throw new Error(ERROR_MESSAGE.INVALID_TOKEN_ERROR);
6071
6212
  }
6072
6213
  };
6073
6214
  /**
@@ -6679,14 +6820,6 @@ function getSelectedPointsForUnderlyingDataQuery(selectedPoints) {
6679
6820
  return underlyingDataPoint;
6680
6821
  }
6681
6822
 
6682
- const ERROR_MESSAGE = {
6683
- INVALID_THOUGHTSPOT_HOST: 'Error parsing ThoughtSpot host. Please provide a valid URL.',
6684
- LIVEBOARD_VIZ_ID_VALIDATION: 'Please select a liveboard to embed.',
6685
- TRIGGER_TIMED_OUT: 'Trigger timedout in getting response',
6686
- SEARCHEMBED_BETA_WRANING_MESSAGE: 'Search Embed is in Beta in this release.',
6687
- SAGE_EMBED_BETA_WARNING_MESSAGE: 'Sage Embed is in Beta in this release.',
6688
- };
6689
-
6690
6823
  /**
6691
6824
  * Copyright (c) 2023
6692
6825
  *
@@ -12781,7 +12914,7 @@ function emptyQueue() {
12781
12914
  function initMixpanel(sessionInfo) {
12782
12915
  var _a;
12783
12916
  if (!sessionInfo || !sessionInfo.mixpanelToken) {
12784
- logger.error('Mixpanel token not found in session info');
12917
+ logger.error(ERROR_MESSAGE.MIXPANEL_TOKEN_NOT_FOUND);
12785
12918
  return;
12786
12919
  }
12787
12920
  // On a public cluster the user is anonymous, so don't set the identify to
@@ -13147,6 +13280,13 @@ EventEmitter.EventEmitter = EventEmitter;
13147
13280
  }
13148
13281
  });
13149
13282
 
13283
+ var ReportType;
13284
+ (function (ReportType) {
13285
+ ReportType["CSP_VIOLATION"] = "csp-violation";
13286
+ ReportType["DEPRECATION"] = "deprecation";
13287
+ ReportType["INTERVENTION"] = "intervention";
13288
+ })(ReportType || (ReportType = {}));
13289
+
13150
13290
  /**
13151
13291
  *
13152
13292
  * @param url
@@ -13318,7 +13458,7 @@ var AuthEvent;
13318
13458
  */
13319
13459
  function notifyAuthSDKSuccess() {
13320
13460
  {
13321
- logger.error('SDK not initialized');
13461
+ logger.error(ERROR_MESSAGE.SDK_NOT_INITIALIZED);
13322
13462
  return;
13323
13463
  }
13324
13464
  }
@@ -13327,7 +13467,7 @@ function notifyAuthSDKSuccess() {
13327
13467
  */
13328
13468
  async function notifyAuthSuccess() {
13329
13469
  {
13330
- logger.error('SDK not initialized');
13470
+ logger.error(ERROR_MESSAGE.SDK_NOT_INITIALIZED);
13331
13471
  return;
13332
13472
  }
13333
13473
  }
@@ -13337,7 +13477,7 @@ async function notifyAuthSuccess() {
13337
13477
  */
13338
13478
  function notifyAuthFailure(failureType) {
13339
13479
  {
13340
- logger.error('SDK not initialized');
13480
+ logger.error(ERROR_MESSAGE.SDK_NOT_INITIALIZED);
13341
13481
  return;
13342
13482
  }
13343
13483
  }
@@ -13346,7 +13486,7 @@ function notifyAuthFailure(failureType) {
13346
13486
  */
13347
13487
  function notifyLogout() {
13348
13488
  {
13349
- logger.error('SDK not initialized');
13489
+ logger.error(ERROR_MESSAGE.SDK_NOT_INITIALIZED);
13350
13490
  return;
13351
13491
  }
13352
13492
  }
@@ -13699,7 +13839,7 @@ function processNoCookieAccess(e, containerEl) {
13699
13839
  if (!ignoreNoCookieAccess) {
13700
13840
  if (!suppressNoCookieAccessAlert && !suppressErrorAlerts) {
13701
13841
  // eslint-disable-next-line no-alert
13702
- alert('Third party cookie access is blocked on this browser, please allow third party cookies for this to work properly. \nYou can use `suppressNoCookieAccessAlert` to suppress this message.');
13842
+ alert(ERROR_MESSAGE.THIRD_PARTY_COOKIE_BLOCKED_ALERT);
13703
13843
  }
13704
13844
  // eslint-disable-next-line no-param-reassign
13705
13845
  containerEl.innerHTML = loginFailedMessage;
@@ -13815,7 +13955,7 @@ function processTrigger(iFrame, messageType, thoughtSpotHost, data) {
13815
13955
  });
13816
13956
  }
13817
13957
 
13818
- var name="@thoughtspot/visual-embed-sdk";var version="1.32.0";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p . --incremental false; tsc -p . --incremental false --module commonjs --outDir cjs",start:"gatsby develop","build:gatsby":"npm run clean:gatsby && gatsby build --prefix-paths","build:gatsby:noprefix":"npm run clean:gatsby && gatsby build","serve:gatsby":"gatsby serve","clean:gatsby":"gatsby clean","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts","bundle-dts":"dts-bundle --name ../../dist/visual-embed-sdk --main lib/src/index.d.ts --outputAsModuleFolder=true","bundle-dts-react":"dts-bundle --name ../../../dist/visual-embed-sdk-react --main lib/src/react/index.d.ts --outputAsModuleFolder=true","bundle-dts-react-full":"dts-bundle --name ../../../dist/visual-embed-sdk-react-full --main lib/src/react/all-types-export.d.ts --outputAsModuleFolder=true",build:"rollup -c",watch:"rollup -cw","docs-cmd":"node scripts/gatsby-commands.js",docgen:"typedoc --tsconfig tsconfig.json --theme typedoc-theme","test-sdk":"jest -c jest.config.sdk.js --runInBand","test-docs":"jest -c jest.config.docs.js",test:"npm run test-sdk && npm run test-docs",posttest:"cat ./coverage/sdk/lcov.info | coveralls","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest",dev:"vite -c vite.local.config.ts"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={algoliasearch:"^4.10.5",classnames:"^2.3.1",dompurify:"^2.3.4","eslint-plugin-comment-length":"^0.9.2","eslint-plugin-jsdoc":"^46.9.0",eventemitter3:"^4.0.7","gatsby-plugin-vercel":"^1.0.3","html-react-parser":"^1.4.12",lodash:"^4.17.21","mixpanel-browser":"^2.45.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1"};var devDependencies={"@mdx-js/mdx":"^1.6.22","@mdx-js/react":"^1.6.22","@react-icons/all-files":"^4.1.0","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^5.0.2","@size-limit/preset-big-lib":"^8.2.6","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^22.2.3","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^4.6.0","@typescript-eslint/parser":"^4.6.0",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1",coveralls:"^3.1.0","current-git-branch":"^1.1.0","dts-bundle":"^0.7.3",eslint:"^7.12.1","eslint-config-airbnb-base":"^14.2.0","eslint-config-prettier":"^6.15.0","eslint-import-resolver-typescript":"^2.3.0","eslint-plugin-import":"^2.22.1","eslint-plugin-prettier":"^3.1.4","eslint-plugin-react-hooks":"^4.2.0","fs-extra":"^10.0.0",gatsby:"3.13.1","gatsby-plugin-algolia":"^0.22.2","gatsby-plugin-catch-links":"^3.1.0","gatsby-plugin-env-variables":"^2.1.0","gatsby-plugin-intl":"^0.3.3","gatsby-plugin-manifest":"^3.2.0","gatsby-plugin-output":"^0.1.3","gatsby-plugin-sass":"6.7.0","gatsby-plugin-sitemap":"^4.10.0","gatsby-source-filesystem":"3.1.0","gatsby-transformer-asciidoc":"2.1.0","gatsby-transformer-rehype":"2.0.0","gh-pages":"^3.1.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^1.1.1",jest:"^26.6.3","jest-fetch-mock":"^3.0.3",jsdom:"^17.0.0","node-sass":"^8.0.0",prettier:"2.1.2",react:"^16.14.0","react-dom":"^16.14.0","react-resizable":"^1.11.0","react-resize-detector":"^6.6.0","react-test-renderer":"^17.0.2","react-use-flexsearch":"^0.1.1",rollup:"2.30.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^26.5.5","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^5.3.4"};var author="ThoughtSpot";var email="support@thoughtspot.com";var license="ThoughtSpot Development Tools End User License Agreement";var directories={lib:"lib"};var repository={type:"git",url:"git+https://github.com/thoughtspot/visual-embed-sdk.git"};var publishConfig={registry:"https://registry.npmjs.org"};var keywords=["thoughtspot","everywhere","embedded","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version,description:description,module:module,main:main,types:types,files:files,exports:exports,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.js",limit:"48 kB"}],scripts:scripts,peerDependencies:peerDependencies,dependencies:dependencies,devDependencies:devDependencies,author:author,email:email,license:license,directories:directories,repository:repository,publishConfig:publishConfig,keywords:keywords,bugs:bugs,homepage:homepage,globals:globals};
13958
+ 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={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p . --incremental false; tsc -p . --incremental false --module commonjs --outDir cjs",start:"gatsby develop","build:gatsby":"npm run clean:gatsby && gatsby build --prefix-paths","build:gatsby:noprefix":"npm run clean:gatsby && gatsby build","serve:gatsby":"gatsby serve","clean:gatsby":"gatsby clean","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts","bundle-dts":"dts-bundle --name ../../dist/visual-embed-sdk --main lib/src/index.d.ts --outputAsModuleFolder=true","bundle-dts-react":"dts-bundle --name ../../../dist/visual-embed-sdk-react --main lib/src/react/index.d.ts --outputAsModuleFolder=true","bundle-dts-react-full":"dts-bundle --name ../../../dist/visual-embed-sdk-react-full --main lib/src/react/all-types-export.d.ts --outputAsModuleFolder=true",build:"rollup -c",watch:"rollup -cw","docs-cmd":"node scripts/gatsby-commands.js",docgen:"typedoc --tsconfig tsconfig.json --theme typedoc-theme","test-sdk":"jest -c jest.config.sdk.js --runInBand","test-docs":"jest -c jest.config.docs.js",test:"npm run test-sdk && npm run test-docs",posttest:"cat ./coverage/sdk/lcov.info | coveralls","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest",dev:"vite -c vite.local.config.ts"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={algoliasearch:"^4.10.5",classnames:"^2.3.1",dompurify:"^2.3.4","eslint-plugin-comment-length":"^0.9.2","eslint-plugin-jsdoc":"^46.9.0",eventemitter3:"^4.0.7","gatsby-plugin-vercel":"^1.0.3","html-react-parser":"^1.4.12",lodash:"^4.17.21","mixpanel-browser":"^2.45.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1"};var devDependencies={"@mdx-js/mdx":"^1.6.22","@mdx-js/react":"^1.6.22","@react-icons/all-files":"^4.1.0","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^5.0.2","@size-limit/preset-big-lib":"^8.2.6","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^22.2.3","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^4.6.0","@typescript-eslint/parser":"^4.6.0",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1",coveralls:"^3.1.0","current-git-branch":"^1.1.0","dts-bundle":"^0.7.3",eslint:"^7.12.1","eslint-config-airbnb-base":"^14.2.0","eslint-config-prettier":"^6.15.0","eslint-import-resolver-typescript":"^2.3.0","eslint-plugin-import":"^2.22.1","eslint-plugin-prettier":"^3.1.4","eslint-plugin-react-hooks":"^4.2.0","fs-extra":"^10.0.0",gatsby:"3.13.1","gatsby-plugin-algolia":"^0.22.2","gatsby-plugin-catch-links":"^3.1.0","gatsby-plugin-env-variables":"^2.1.0","gatsby-plugin-intl":"^0.3.3","gatsby-plugin-manifest":"^3.2.0","gatsby-plugin-output":"^0.1.3","gatsby-plugin-sass":"6.7.0","gatsby-plugin-sitemap":"^4.10.0","gatsby-source-filesystem":"3.1.0","gatsby-transformer-asciidoc":"2.1.0","gatsby-transformer-rehype":"2.0.0","gh-pages":"^3.1.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^1.1.1",jest:"^26.6.3","jest-fetch-mock":"^3.0.3",jsdom:"^17.0.0","node-sass":"^8.0.0",prettier:"2.1.2",react:"^16.14.0","react-dom":"^16.14.0","react-resizable":"^1.11.0","react-resize-detector":"^6.6.0","react-test-renderer":"^17.0.2","react-use-flexsearch":"^0.1.1",rollup:"2.30.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^26.5.5","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^5.3.4"};var author="ThoughtSpot";var email="support@thoughtspot.com";var license="ThoughtSpot Development Tools End User License Agreement";var directories={lib:"lib"};var repository={type:"git",url:"git+https://github.com/thoughtspot/visual-embed-sdk.git"};var publishConfig={registry:"https://registry.npmjs.org"};var keywords=["thoughtspot","everywhere","embedded","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version,description:description,module:module,main:main,types:types,files:files,exports:exports,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.js",limit:"48 kB"}],scripts:scripts,peerDependencies:peerDependencies,dependencies:dependencies,devDependencies:devDependencies,author:author,email:email,license:license,directories:directories,repository:repository,publishConfig:publishConfig,keywords:keywords,bugs:bugs,homepage:homepage,globals:globals};
13819
13959
 
13820
13960
  /**
13821
13961
  * Copyright (c) 2022
@@ -13913,7 +14053,7 @@ class TsEmbed {
13913
14053
  });
13914
14054
  }
13915
14055
  catch (e) {
13916
- logger.error(`Received invalid token. Error : ${e === null || e === void 0 ? void 0 : e.message}`);
14056
+ logger.error(`${ERROR_MESSAGE.INVALID_TOKEN_ERROR} Error : ${e === null || e === void 0 ? void 0 : e.message}`);
13917
14057
  processAuthFailure(e, this.isPreRendered ? this.preRenderWrapper : this.el);
13918
14058
  }
13919
14059
  }
@@ -14121,7 +14261,7 @@ class TsEmbed {
14121
14261
  if (this.embedConfig.currencyFormat) {
14122
14262
  queryParams[Param.CurrencyFormat] = this.embedConfig.currencyFormat;
14123
14263
  }
14124
- const { disabledActions, disabledActionReason, hiddenActions, visibleActions, hiddenTabs, visibleTabs, showAlerts, additionalFlags, locale, customizations, contextMenuTrigger, linkOverride, insertInToSlide, } = this.viewConfig;
14264
+ const { disabledActions, disabledActionReason, hiddenActions, visibleActions, hiddenTabs, visibleTabs, showAlerts, additionalFlags, locale, customizations, contextMenuTrigger, linkOverride, insertInToSlide, disableRedirectionLinksInNewTab, } = this.viewConfig;
14125
14265
  if (Array.isArray(visibleActions) && Array.isArray(hiddenActions)) {
14126
14266
  this.handleError('You cannot have both hidden actions and visible actions');
14127
14267
  return queryParams;
@@ -14182,6 +14322,9 @@ class TsEmbed {
14182
14322
  if (insertInToSlide) {
14183
14323
  queryParams[Param.ShowInsertToSlide] = insertInToSlide;
14184
14324
  }
14325
+ if (disableRedirectionLinksInNewTab) {
14326
+ queryParams[Param.DisableRedirectionLinksInNewTab] = disableRedirectionLinksInNewTab;
14327
+ }
14185
14328
  queryParams[Param.OverrideNativeConsole] = true;
14186
14329
  queryParams[Param.ClientLogLevel] = this.embedConfig.logLevel;
14187
14330
  return queryParams;
@@ -14226,7 +14369,7 @@ class TsEmbed {
14226
14369
  iFrame.mozallowfullscreen = true;
14227
14370
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
14228
14371
  // @ts-ignore
14229
- iFrame.allow = 'clipboard-read; clipboard-write';
14372
+ iFrame.allow = 'clipboard-read; clipboard-write fullscreen';
14230
14373
  const { height: frameHeight, width: frameWidth, ...restParams } = this.viewConfig.frameParams || {};
14231
14374
  const width = getCssDimension(frameWidth || DEFAULT_EMBED_WIDTH);
14232
14375
  const height = getCssDimension(frameHeight || DEFAULT_EMBED_HEIGHT);
@@ -14609,7 +14752,7 @@ class TsEmbed {
14609
14752
  */
14610
14753
  preRender(showPreRenderByDefault = false) {
14611
14754
  if (!this.viewConfig.preRenderId) {
14612
- logger.error('PreRender id is required for preRender');
14755
+ logger.error(ERROR_MESSAGE.PRERENDER_ID_MISSING);
14613
14756
  return this;
14614
14757
  }
14615
14758
  this.isPreRendered = true;
@@ -14682,7 +14825,7 @@ class TsEmbed {
14682
14825
  */
14683
14826
  showPreRender() {
14684
14827
  if (!this.viewConfig.preRenderId) {
14685
- logger.error('PreRender id is required for preRender');
14828
+ logger.error(ERROR_MESSAGE.PRERENDER_ID_MISSING);
14686
14829
  return;
14687
14830
  }
14688
14831
  if (!this.isPreRenderAvailable()) {
@@ -14724,7 +14867,7 @@ class TsEmbed {
14724
14867
  */
14725
14868
  syncPreRenderStyle() {
14726
14869
  if (!this.isPreRenderAvailable() || !this.el) {
14727
- logger.error('PreRender should be called before using syncPreRenderStyle');
14870
+ logger.error(ERROR_MESSAGE.SYNC_STYLE_CALLED_BEFORE_RENDER);
14728
14871
  return;
14729
14872
  }
14730
14873
  const elBoundingClient = this.el.getBoundingClientRect();
@@ -15028,7 +15171,8 @@ class SearchEmbed extends TsEmbed {
15028
15171
  */
15029
15172
  getDataSourceMode() {
15030
15173
  let dataSourceMode = DataSourceVisualMode.Expanded;
15031
- if (this.viewConfig.collapseDataSources === true) {
15174
+ if (this.viewConfig.collapseDataSources === true
15175
+ || this.viewConfig.collapseDataPanel === true) {
15032
15176
  dataSourceMode = DataSourceVisualMode.Collapsed;
15033
15177
  }
15034
15178
  if (this.viewConfig.hideDataSources === true) {
@@ -15038,9 +15182,9 @@ class SearchEmbed extends TsEmbed {
15038
15182
  }
15039
15183
  getEmbedParams() {
15040
15184
  var _a;
15041
- const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, hideSearchBar, dataPanelV2 = false, useLastSelectedSources = false, runtimeParameters, collapseSearchBarInitially = false, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false,
15185
+ const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, hideSearchBar, dataPanelV2 = true, useLastSelectedSources = false, runtimeParameters, collapseSearchBarInitially = false, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false,
15042
15186
  /* eslint-disable-next-line max-len */
15043
- dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, focusSearchBarOnRender = true, excludeRuntimeParametersfromURL, } = this.viewConfig;
15187
+ dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, focusSearchBarOnRender = true, excludeRuntimeParametersfromURL, collapseSearchBar = true, } = this.viewConfig;
15044
15188
  const queryParams = this.getBaseQueryParams();
15045
15189
  queryParams[Param.HideActions] = [
15046
15190
  ...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : []),
@@ -15084,7 +15228,8 @@ class SearchEmbed extends TsEmbed {
15084
15228
  queryParams[Param.UseLastSelectedDataSource] = false;
15085
15229
  }
15086
15230
  queryParams[Param.searchEmbed] = true;
15087
- queryParams[Param.CollapseSearchBarInitially] = collapseSearchBarInitially;
15231
+ /* eslint-disable-next-line max-len */
15232
+ queryParams[Param.CollapseSearchBarInitially] = collapseSearchBarInitially || collapseSearchBar;
15088
15233
  queryParams[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
15089
15234
  if (dataPanelCustomGroupsAccordionInitialState
15090
15235
  === DataPanelCustomColumnGroupsAccordionState.COLLAPSE_ALL
@@ -15204,6 +15349,12 @@ var DataPanelCustomColumnGroupsAccordionState$1;
15204
15349
  */
15205
15350
  DataPanelCustomColumnGroupsAccordionState["EXPAND_FIRST"] = "EXPAND_FIRST";
15206
15351
  })(DataPanelCustomColumnGroupsAccordionState$1 || (DataPanelCustomColumnGroupsAccordionState$1 = {}));
15352
+ var HomePageSearchBarMode;
15353
+ (function (HomePageSearchBarMode) {
15354
+ HomePageSearchBarMode["OBJECT_SEARCH"] = "objectSearch";
15355
+ HomePageSearchBarMode["AI_ANSWER"] = "aiAnswer";
15356
+ HomePageSearchBarMode["NONE"] = "none";
15357
+ })(HomePageSearchBarMode || (HomePageSearchBarMode = {}));
15207
15358
  /**
15208
15359
  * Embeds full ThoughtSpot experience in a host application.
15209
15360
  * @group Embed components
@@ -15244,9 +15395,9 @@ class AppEmbed extends V1Embed {
15244
15395
  * embedded Liveboard or visualization.
15245
15396
  */
15246
15397
  getEmbedParams() {
15247
- 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,
15398
+ 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,
15248
15399
  /* eslint-disable-next-line max-len */
15249
- dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL, } = this.viewConfig;
15400
+ dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL, collapseSearchBar = true, homePageSearchBarMode, } = this.viewConfig;
15250
15401
  let params = {};
15251
15402
  params[Param.EmbedApp] = true;
15252
15403
  params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
@@ -15284,10 +15435,13 @@ class AppEmbed extends V1Embed {
15284
15435
  /* eslint-disable-next-line max-len */
15285
15436
  params[Param.IsOnBeforeGetVizDataInterceptEnabled] = isOnBeforeGetVizDataInterceptEnabled;
15286
15437
  }
15438
+ if (homePageSearchBarMode) {
15439
+ params[Param.HomePageSearchBarMode] = homePageSearchBarMode;
15440
+ }
15287
15441
  params[Param.DataPanelV2Enabled] = dataPanelV2;
15288
15442
  params[Param.HideHomepageLeftNav] = hideHomepageLeftNav;
15289
15443
  params[Param.ModularHomeExperienceEnabled] = modularHomeExperience;
15290
- params[Param.CollapseSearchBarInitially] = collapseSearchBarInitially;
15444
+ params[Param.CollapseSearchBarInitially] = collapseSearchBarInitially || collapseSearchBar;
15291
15445
  params[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
15292
15446
  if (dataPanelCustomGroupsAccordionInitialState
15293
15447
  === DataPanelCustomColumnGroupsAccordionState$1.COLLAPSE_ALL