@thoughtspot/visual-embed-sdk 1.32.3 → 1.32.6

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 (158) hide show
  1. package/cjs/package.json +1 -1
  2. package/cjs/src/embed/app.d.ts +42 -0
  3. package/cjs/src/embed/app.d.ts.map +1 -1
  4. package/cjs/src/embed/app.js +4 -1
  5. package/cjs/src/embed/app.js.map +1 -1
  6. package/cjs/src/embed/app.spec.js +30 -0
  7. package/cjs/src/embed/app.spec.js.map +1 -1
  8. package/cjs/src/embed/base.d.ts +1 -1
  9. package/cjs/src/embed/base.d.ts.map +1 -1
  10. package/cjs/src/embed/base.js +6 -7
  11. package/cjs/src/embed/base.js.map +1 -1
  12. package/cjs/src/embed/embed.spec.js +0 -19
  13. package/cjs/src/embed/embed.spec.js.map +1 -1
  14. package/cjs/src/embed/liveboard.d.ts +42 -0
  15. package/cjs/src/embed/liveboard.d.ts.map +1 -1
  16. package/cjs/src/embed/liveboard.js +4 -1
  17. package/cjs/src/embed/liveboard.js.map +1 -1
  18. package/cjs/src/embed/liveboard.spec.js +33 -0
  19. package/cjs/src/embed/liveboard.spec.js.map +1 -1
  20. package/cjs/src/embed/ts-embed.d.ts +0 -1
  21. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  22. package/cjs/src/embed/ts-embed.js +3 -9
  23. package/cjs/src/embed/ts-embed.js.map +1 -1
  24. package/cjs/src/embed/ts-embed.spec.js +0 -9
  25. package/cjs/src/embed/ts-embed.spec.js.map +1 -1
  26. package/cjs/src/types.d.ts +62 -16
  27. package/cjs/src/types.d.ts.map +1 -1
  28. package/cjs/src/types.js +55 -7
  29. package/cjs/src/types.js.map +1 -1
  30. package/cjs/src/utils/graphql/answerService/answer-queries.d.ts +1 -0
  31. package/cjs/src/utils/graphql/answerService/answer-queries.d.ts.map +1 -1
  32. package/cjs/src/utils/graphql/answerService/answer-queries.js +9 -2
  33. package/cjs/src/utils/graphql/answerService/answer-queries.js.map +1 -1
  34. package/cjs/src/utils/graphql/answerService/answerService.d.ts +15 -0
  35. package/cjs/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
  36. package/cjs/src/utils/graphql/answerService/answerService.js +25 -0
  37. package/cjs/src/utils/graphql/answerService/answerService.js.map +1 -1
  38. package/cjs/src/utils/graphql/answerService/answerService.spec.js +35 -0
  39. package/cjs/src/utils/graphql/answerService/answerService.spec.js.map +1 -1
  40. package/cjs/src/utils/graphql/graphql-request.spec.d.ts +2 -0
  41. package/cjs/src/utils/graphql/graphql-request.spec.d.ts.map +1 -0
  42. package/cjs/src/utils/graphql/graphql-request.spec.js +36 -0
  43. package/cjs/src/utils/graphql/graphql-request.spec.js.map +1 -0
  44. package/cjs/src/utils/processData.js +2 -2
  45. package/cjs/src/utils/processData.js.map +1 -1
  46. package/cjs/src/utils/processData.spec.js +14 -0
  47. package/cjs/src/utils/processData.spec.js.map +1 -1
  48. package/cjs/src/utils/processTrigger.d.ts +1 -0
  49. package/cjs/src/utils/processTrigger.d.ts.map +1 -1
  50. package/cjs/src/utils/processTrigger.js +3 -3
  51. package/cjs/src/utils/processTrigger.js.map +1 -1
  52. package/cjs/src/utils/processTrigger.spec.js +10 -0
  53. package/cjs/src/utils/processTrigger.spec.js.map +1 -1
  54. package/cjs/src/utils.d.ts.map +1 -1
  55. package/cjs/src/utils.js +1 -5
  56. package/cjs/src/utils.js.map +1 -1
  57. package/dist/src/embed/app.d.ts +42 -0
  58. package/dist/src/embed/app.d.ts.map +1 -1
  59. package/dist/src/embed/base.d.ts +1 -1
  60. package/dist/src/embed/base.d.ts.map +1 -1
  61. package/dist/src/embed/liveboard.d.ts +42 -0
  62. package/dist/src/embed/liveboard.d.ts.map +1 -1
  63. package/dist/src/embed/ts-embed.d.ts +0 -1
  64. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  65. package/dist/src/types.d.ts +62 -16
  66. package/dist/src/types.d.ts.map +1 -1
  67. package/dist/src/utils/graphql/answerService/answer-queries.d.ts +1 -0
  68. package/dist/src/utils/graphql/answerService/answer-queries.d.ts.map +1 -1
  69. package/dist/src/utils/graphql/answerService/answerService.d.ts +15 -0
  70. package/dist/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
  71. package/dist/src/utils/graphql/graphql-request.spec.d.ts +2 -0
  72. package/dist/src/utils/graphql/graphql-request.spec.d.ts.map +1 -0
  73. package/dist/src/utils/processTrigger.d.ts +1 -0
  74. package/dist/src/utils/processTrigger.d.ts.map +1 -1
  75. package/dist/src/utils.d.ts.map +1 -1
  76. package/dist/tsembed-react.es.js +103 -27
  77. package/dist/tsembed-react.js +103 -27
  78. package/dist/tsembed.es.js +109 -34
  79. package/dist/tsembed.js +109 -34
  80. package/dist/visual-embed-sdk-react-full.d.ts +162 -18
  81. package/dist/visual-embed-sdk-react.d.ts +162 -18
  82. package/dist/visual-embed-sdk.d.ts +162 -18
  83. package/lib/package.json +1 -1
  84. package/lib/src/embed/app.d.ts +42 -0
  85. package/lib/src/embed/app.d.ts.map +1 -1
  86. package/lib/src/embed/app.js +4 -1
  87. package/lib/src/embed/app.js.map +1 -1
  88. package/lib/src/embed/app.spec.js +30 -0
  89. package/lib/src/embed/app.spec.js.map +1 -1
  90. package/lib/src/embed/base.d.ts +1 -1
  91. package/lib/src/embed/base.d.ts.map +1 -1
  92. package/lib/src/embed/base.js +6 -7
  93. package/lib/src/embed/base.js.map +1 -1
  94. package/lib/src/embed/embed.spec.js +0 -19
  95. package/lib/src/embed/embed.spec.js.map +1 -1
  96. package/lib/src/embed/liveboard.d.ts +42 -0
  97. package/lib/src/embed/liveboard.d.ts.map +1 -1
  98. package/lib/src/embed/liveboard.js +4 -1
  99. package/lib/src/embed/liveboard.js.map +1 -1
  100. package/lib/src/embed/liveboard.spec.js +33 -0
  101. package/lib/src/embed/liveboard.spec.js.map +1 -1
  102. package/lib/src/embed/ts-embed.d.ts +0 -1
  103. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  104. package/lib/src/embed/ts-embed.js +3 -9
  105. package/lib/src/embed/ts-embed.js.map +1 -1
  106. package/lib/src/embed/ts-embed.spec.js +0 -9
  107. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  108. package/lib/src/types.d.ts +62 -16
  109. package/lib/src/types.d.ts.map +1 -1
  110. package/lib/src/types.js +55 -7
  111. package/lib/src/types.js.map +1 -1
  112. package/lib/src/utils/graphql/answerService/answer-queries.d.ts +1 -0
  113. package/lib/src/utils/graphql/answerService/answer-queries.d.ts.map +1 -1
  114. package/lib/src/utils/graphql/answerService/answer-queries.js +8 -1
  115. package/lib/src/utils/graphql/answerService/answer-queries.js.map +1 -1
  116. package/lib/src/utils/graphql/answerService/answerService.d.ts +15 -0
  117. package/lib/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
  118. package/lib/src/utils/graphql/answerService/answerService.js +25 -0
  119. package/lib/src/utils/graphql/answerService/answerService.js.map +1 -1
  120. package/lib/src/utils/graphql/answerService/answerService.spec.js +36 -1
  121. package/lib/src/utils/graphql/answerService/answerService.spec.js.map +1 -1
  122. package/lib/src/utils/graphql/graphql-request.spec.d.ts +2 -0
  123. package/lib/src/utils/graphql/graphql-request.spec.d.ts.map +1 -0
  124. package/lib/src/utils/graphql/graphql-request.spec.js +33 -0
  125. package/lib/src/utils/graphql/graphql-request.spec.js.map +1 -0
  126. package/lib/src/utils/processData.js +2 -2
  127. package/lib/src/utils/processData.js.map +1 -1
  128. package/lib/src/utils/processData.spec.js +14 -0
  129. package/lib/src/utils/processData.spec.js.map +1 -1
  130. package/lib/src/utils/processTrigger.d.ts +1 -0
  131. package/lib/src/utils/processTrigger.d.ts.map +1 -1
  132. package/lib/src/utils/processTrigger.js +1 -1
  133. package/lib/src/utils/processTrigger.js.map +1 -1
  134. package/lib/src/utils/processTrigger.spec.js +10 -0
  135. package/lib/src/utils/processTrigger.spec.js.map +1 -1
  136. package/lib/src/utils.d.ts.map +1 -1
  137. package/lib/src/utils.js +1 -5
  138. package/lib/src/utils.js.map +1 -1
  139. package/lib/src/visual-embed-sdk.d.ts +162 -18
  140. package/package.json +1 -1
  141. package/src/embed/app.spec.ts +45 -0
  142. package/src/embed/app.ts +48 -0
  143. package/src/embed/base.ts +1 -2
  144. package/src/embed/embed.spec.ts +0 -22
  145. package/src/embed/liveboard.spec.ts +48 -0
  146. package/src/embed/liveboard.ts +48 -0
  147. package/src/embed/ts-embed.spec.ts +0 -11
  148. package/src/embed/ts-embed.ts +1 -9
  149. package/src/types.ts +62 -15
  150. package/src/utils/graphql/answerService/answer-queries.ts +9 -1
  151. package/src/utils/graphql/answerService/answerService.spec.ts +45 -0
  152. package/src/utils/graphql/answerService/answerService.ts +35 -0
  153. package/src/utils/graphql/graphql-request.spec.ts +38 -0
  154. package/src/utils/processData.spec.ts +16 -0
  155. package/src/utils/processData.ts +2 -2
  156. package/src/utils/processTrigger.spec.ts +19 -0
  157. package/src/utils/processTrigger.ts +1 -1
  158. package/src/utils.ts +0 -5
package/dist/tsembed.js CHANGED
@@ -205,8 +205,7 @@
205
205
  return false;
206
206
  };
207
207
  const getCustomisations = (embedConfig, viewConfig) => {
208
- var _a, _b, _c, _d;
209
- const customCssUrlFromEmbedConfig = embedConfig.customCssUrl;
208
+ var _a, _b;
210
209
  const customizationsFromViewConfig = viewConfig.customizations;
211
210
  const customizationsFromEmbedConfig = embedConfig.customizations
212
211
  || embedConfig.customisations;
@@ -218,9 +217,6 @@
218
217
  ...(_a = customizationsFromEmbedConfig === null || customizationsFromEmbedConfig === void 0 ? void 0 : customizationsFromEmbedConfig.style) === null || _a === void 0 ? void 0 : _a.customCSS,
219
218
  ...(_b = customizationsFromViewConfig === null || customizationsFromViewConfig === void 0 ? void 0 : customizationsFromViewConfig.style) === null || _b === void 0 ? void 0 : _b.customCSS,
220
219
  },
221
- customCSSUrl: ((_c = customizationsFromViewConfig === null || customizationsFromViewConfig === void 0 ? void 0 : customizationsFromViewConfig.style) === null || _c === void 0 ? void 0 : _c.customCSSUrl)
222
- || ((_d = customizationsFromEmbedConfig === null || customizationsFromEmbedConfig === void 0 ? void 0 : customizationsFromEmbedConfig.style) === null || _d === void 0 ? void 0 : _d.customCSSUrl)
223
- || customCssUrlFromEmbedConfig,
224
220
  },
225
221
  content: {
226
222
  ...customizationsFromEmbedConfig === null || customizationsFromEmbedConfig === void 0 ? void 0 : customizationsFromEmbedConfig.content,
@@ -1459,20 +1455,57 @@
1459
1455
  */
1460
1456
  EmbedEvent["Rename"] = "rename";
1461
1457
  /**
1462
- * Emitted when user wants to intercept the search execution
1458
+ * Emitted if the user wants to intercept the search execution
1459
+ * and implement logic to decide whether to run the search or not
1460
+ *
1461
+ * Prerequisite: Set isOnBeforeGetVizDataInterceptEnabled : true
1462
+ * for this embed event to get emitted.
1463
1463
  *
1464
- * Set IsOnBeforeGetVizDataInterceptEnabled : true to use
1465
- * this embed event
1464
+ * Parameter: payload
1465
+ * Parameter: responder
1466
+ * Contains elements that lets developers define whether ThoughtSpot
1467
+ * will run the search or not, and if not, which error message to provide.
1468
+ * execute: When execute returns true, the search will be run.
1469
+ * When execute returns false, the search will not be executed.
1470
+ * error: Developers can customize the user facing message when execute is
1471
+ * set to false using the error parameter in responder
1466
1472
  *
1467
1473
  *```js
1468
- * searchEmbed.on(EmbedEvent.OnBeforeGetVizDataIntercept,
1474
+ * .on(EmbedEvent.OnBeforeGetVizDataIntercept,
1469
1475
  * (payload, responder) => {
1470
1476
  * responder({
1471
1477
  * data: {
1472
- * execute: true,
1473
- * }})
1478
+ * execute:false,
1479
+ * error: {
1480
+ * //Provide a custom error message to explain to your end user
1481
+ * //why their search did not run
1482
+ * errorText: "This search query cannot be run.
1483
+ * Please contact your administrator for more details."
1484
+ * }
1485
+ * }})
1486
+ * })
1487
+ * ```
1488
+ *
1489
+ *```js
1490
+ * .on(EmbedEvent.OnBeforeGetVizDataIntercept,
1491
+ * (payload, responder) => {
1492
+ * const query = payload.data.data.answer.search_query
1493
+ * responder({
1494
+ * data: {
1495
+ * // returns true as long as the query does not include
1496
+ * // both the 'sales' AND the 'county' column
1497
+ * execute: !(query.includes("sales")&&query.includes("county")),
1498
+ * error: {
1499
+ * //Provide a custom error message to explain to your end user
1500
+ * // why their search did not run, and which searches are accepted by your custom logic.
1501
+ * errorText: "You can't use this query :" + query + ".
1502
+ * The 'sales' measures can never be used at the 'county' level.
1503
+ * Please try another measure, or remove 'county' from your search."
1504
+ * }
1505
+ * }})
1474
1506
  * })
1475
1507
  *```
1508
+ *
1476
1509
  * @version SDK : 1.29.0 | Thoughtspot : 10.2.0.cl
1477
1510
  */
1478
1511
  EmbedEvent["OnBeforeGetVizDataIntercept"] = "onBeforeGetVizDataIntercept";
@@ -1570,6 +1603,15 @@
1570
1603
  * @hidden
1571
1604
  */
1572
1605
  HostEvent["Reload"] = "reload";
1606
+ /**
1607
+ * Get current iframe src
1608
+ * @example
1609
+ * ```js
1610
+ * const frameUrl = AppEmbed.trigger(HostEvent.GetIframeUrl)
1611
+ * ```
1612
+ * @version SDK: 1.35.0 | Thoughtspot: 10.4.0.cl
1613
+ */
1614
+ HostEvent["GetIframeUrl"] = "GetIframeUrl";
1573
1615
  /**
1574
1616
  * Display specific visualizations on a Liveboard.
1575
1617
  * @param - An array of GUIDs of the visualization to show. The visualization IDs not passed
@@ -2376,7 +2418,6 @@
2376
2418
  Param["ViewPortHeight"] = "viewPortHeight";
2377
2419
  Param["ViewPortWidth"] = "viewPortWidth";
2378
2420
  Param["VisibleActions"] = "visibleAction";
2379
- Param["CustomCSSUrl"] = "customCssUrl";
2380
2421
  Param["DisableLoginRedirect"] = "disableLoginRedirect";
2381
2422
  Param["visibleVizs"] = "pinboardVisibleVizs";
2382
2423
  Param["LiveboardV2Enabled"] = "isPinboardV2Enabled";
@@ -2435,6 +2476,9 @@
2435
2476
  Param["FocusSearchBarOnRender"] = "focusSearchBarOnRender";
2436
2477
  Param["DisableRedirectionLinksInNewTab"] = "disableRedirectionLinksInNewTab";
2437
2478
  Param["HomePageSearchBarMode"] = "homePageSearchBarMode";
2479
+ Param["ShowLiveboardVerifiedBadge"] = "showLiveboardVerifiedBadge";
2480
+ Param["ShowLiveboardReverifyBanner"] = "showLiveboardReverifyBanner";
2481
+ Param["LiveboardHeaderV2"] = "isLiveboardHeaderV2Enabled";
2438
2482
  })(Param || (Param = {}));
2439
2483
  (function (Action) {
2440
2484
  /**
@@ -6263,7 +6307,6 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
6263
6307
  isDiscoverable
6264
6308
  isHidden
6265
6309
  modifiedAt
6266
- tags
6267
6310
  }
6268
6311
  visualizations {
6269
6312
  ... on TableViz {
@@ -6308,6 +6351,14 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
6308
6351
  }
6309
6352
  }
6310
6353
  }
6354
+ `;
6355
+ const getSQLQuery = `
6356
+ mutation GetSQLQuery($session: BachSessionIdInput!) {
6357
+ Answer__getQuery(session: $session) {
6358
+ ${bachSessionId}
6359
+ sql
6360
+ }
6361
+ }
6311
6362
  `;
6312
6363
 
6313
6364
  // eslint-disable-next-line no-shadow
@@ -6439,6 +6490,10 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
6439
6490
  },
6440
6491
  });
6441
6492
  }
6493
+ async getSQLQuery() {
6494
+ const { sql } = await this.executeQuery(getSQLQuery, {});
6495
+ return sql;
6496
+ }
6442
6497
  /**
6443
6498
  * Fetch data from the answer.
6444
6499
  * @param offset
@@ -6473,6 +6528,20 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
6473
6528
  credentials: 'include',
6474
6529
  });
6475
6530
  }
6531
+ /**
6532
+ * Fetch the data for the answer as a PNG blob. This might be
6533
+ * quicker for larger data.
6534
+ * @param userLocale
6535
+ * @param omitBackground Omit the background in the PNG
6536
+ * @param deviceScaleFactor The scale factor for the PNG
6537
+ * @return Response
6538
+ */
6539
+ async fetchPNGBlob(userLocale = 'en-us', includeInfo = false, omitBackground = false, deviceScaleFactor = 2) {
6540
+ const fetchUrl = this.getFetchPNGBlobUrl(userLocale, omitBackground, deviceScaleFactor);
6541
+ return tokenizedFetch(fetchUrl, {
6542
+ credentials: 'include',
6543
+ });
6544
+ }
6476
6545
  /**
6477
6546
  * Just get the internal URL for this answer's data
6478
6547
  * as a CSV blob.
@@ -6483,6 +6552,13 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
6483
6552
  getFetchCSVBlobUrl(userLocale = 'en-us', includeInfo = false) {
6484
6553
  return `${this.thoughtSpotHost}/prism/download/answer/csv?sessionId=${this.session.sessionId}&genNo=${this.session.genNo}&userLocale=${userLocale}&exportFileName=data&hideCsvHeader=${!includeInfo}`;
6485
6554
  }
6555
+ /**
6556
+ * Just get the internal URL for this answer's data
6557
+ * as a PNG blob.
6558
+ */
6559
+ getFetchPNGBlobUrl(userLocale = 'en-us', omitBackground = false, deviceScaleFactor = 2) {
6560
+ return `${this.thoughtSpotHost}/prism/download/answer/png?sessionId=${this.session.sessionId}&deviceScaleFactor=${deviceScaleFactor}&omitBackground=${omitBackground}&genNo=${this.session.genNo}&userLocale=${userLocale}&exportFileName=data`;
6561
+ }
6486
6562
  /**
6487
6563
  * Get underlying data given a point and the output column names.
6488
6564
  * In case of a context menu action, the selectedPoints are
@@ -13736,7 +13812,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
13736
13812
  * @group Authentication / Init
13737
13813
  */
13738
13814
  const init = (embedConfig) => {
13739
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
13815
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
13740
13816
  sanity(embedConfig);
13741
13817
  resetCachedAuthToken();
13742
13818
  embedConfig = setEmbedConfig(backwardCompat({
@@ -13752,11 +13828,10 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
13752
13828
  const { password, ...configToTrack } = getEmbedConfig();
13753
13829
  uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_CALLED_INIT, {
13754
13830
  ...configToTrack,
13755
- usedCustomizationSheet: ((_b = (_a = embedConfig.customizations) === null || _a === void 0 ? void 0 : _a.style) === null || _b === void 0 ? void 0 : _b.customCSSUrl) != null,
13756
- usedCustomizationVariables: ((_e = (_d = (_c = embedConfig.customizations) === null || _c === void 0 ? void 0 : _c.style) === null || _d === void 0 ? void 0 : _d.customCSS) === null || _e === void 0 ? void 0 : _e.variables) != null,
13757
- usedCustomizationRules: ((_h = (_g = (_f = embedConfig.customizations) === null || _f === void 0 ? void 0 : _f.style) === null || _g === void 0 ? void 0 : _g.customCSS) === null || _h === void 0 ? void 0 : _h.rules_UNSTABLE) != null,
13758
- usedCustomizationStrings: !!((_k = (_j = embedConfig.customizations) === null || _j === void 0 ? void 0 : _j.content) === null || _k === void 0 ? void 0 : _k.strings),
13759
- usedCustomizationIconSprite: !!((_l = embedConfig.customizations) === null || _l === void 0 ? void 0 : _l.iconSpriteUrl),
13831
+ usedCustomizationVariables: ((_c = (_b = (_a = embedConfig.customizations) === null || _a === void 0 ? void 0 : _a.style) === null || _b === void 0 ? void 0 : _b.customCSS) === null || _c === void 0 ? void 0 : _c.variables) != null,
13832
+ usedCustomizationRules: ((_f = (_e = (_d = embedConfig.customizations) === null || _d === void 0 ? void 0 : _d.style) === null || _e === void 0 ? void 0 : _e.customCSS) === null || _f === void 0 ? void 0 : _f.rules_UNSTABLE) != null,
13833
+ usedCustomizationStrings: !!((_h = (_g = embedConfig.customizations) === null || _g === void 0 ? void 0 : _g.content) === null || _h === void 0 ? void 0 : _h.strings),
13834
+ usedCustomizationIconSprite: !!((_j = embedConfig.customizations) === null || _j === void 0 ? void 0 : _j.iconSpriteUrl),
13760
13835
  });
13761
13836
  if (getEmbedConfig().callPrefetch) {
13762
13837
  prefetch(getEmbedConfig().thoughtSpotHost);
@@ -13822,7 +13897,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
13822
13897
  }).catch(error => {
13823
13898
  console.error(error);
13824
13899
  });
13825
- *
13900
+ *```
13826
13901
  * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
13827
13902
  * @group Global methods
13828
13903
  */
@@ -13977,8 +14052,8 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
13977
14052
  * @param containerEl
13978
14053
  */
13979
14054
  function processAuthFailure(e, containerEl) {
13980
- const { loginFailedMessage, authType } = getEmbedConfig();
13981
- if (authType !== exports.AuthType.None) {
14055
+ const { loginFailedMessage, authType, disableLoginFailurePage } = getEmbedConfig();
14056
+ if (authType !== exports.AuthType.None && !disableLoginFailurePage) {
13982
14057
  // eslint-disable-next-line no-param-reassign
13983
14058
  containerEl.innerHTML = loginFailedMessage;
13984
14059
  notifyAuthFailure(exports.AuthFailureType.OTHER);
@@ -14079,7 +14154,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
14079
14154
  });
14080
14155
  }
14081
14156
 
14082
- var name="@thoughtspot/visual-embed-sdk";var version="1.32.3";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","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$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};
14157
+ var name="@thoughtspot/visual-embed-sdk";var version="1.32.6";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","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$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};
14083
14158
 
14084
14159
  /**
14085
14160
  * Copyright (c) 2022
@@ -14351,7 +14426,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
14351
14426
  * @returns queryParams
14352
14427
  */
14353
14428
  getBaseQueryParams(queryParams = {}) {
14354
- var _a, _b, _c, _d;
14429
+ var _a, _b, _c;
14355
14430
  let hostAppUrl = ((_a = window === null || window === void 0 ? void 0 : window.location) === null || _a === void 0 ? void 0 : _a.host) || '';
14356
14431
  // The below check is needed because TS Cloud firewall, blocks
14357
14432
  // localhost/127.0.0.1 in any url param.
@@ -14394,11 +14469,6 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
14394
14469
  this.handleError('You cannot have both hidden Tabs and visible Tabs');
14395
14470
  return queryParams;
14396
14471
  }
14397
- // TODO remove embedConfig.customCssUrl
14398
- const cssUrlParam = ((_c = customizations === null || customizations === void 0 ? void 0 : customizations.style) === null || _c === void 0 ? void 0 : _c.customCSSUrl) || this.embedConfig.customCssUrl;
14399
- if (cssUrlParam) {
14400
- queryParams[Param.CustomCSSUrl] = cssUrlParam;
14401
- }
14402
14472
  if (disabledActions === null || disabledActions === void 0 ? void 0 : disabledActions.length) {
14403
14473
  queryParams[Param.DisableActions] = disabledActions;
14404
14474
  }
@@ -14427,7 +14497,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
14427
14497
  queryParams[Param.ContextMenuTrigger] = false;
14428
14498
  }
14429
14499
  const spriteUrl = (customizations === null || customizations === void 0 ? void 0 : customizations.iconSpriteUrl)
14430
- || ((_d = this.embedConfig.customizations) === null || _d === void 0 ? void 0 : _d.iconSpriteUrl);
14500
+ || ((_c = this.embedConfig.customizations) === null || _c === void 0 ? void 0 : _c.iconSpriteUrl);
14431
14501
  if (spriteUrl) {
14432
14502
  queryParams[Param.IconSpriteUrl] = spriteUrl.replace('https://', '');
14433
14503
  }
@@ -15044,7 +15114,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
15044
15114
  * @version SDK: 1.25.0 / ThoughtSpot 9.10.0
15045
15115
  */
15046
15116
  async getAnswerService(vizId) {
15047
- const { session } = await this.trigger(exports.HostEvent.GetAnswerSession, vizId);
15117
+ const { session } = await this.trigger(exports.HostEvent.GetAnswerSession, vizId ? { vizId } : {});
15048
15118
  return new AnswerService(session, null, this.embedConfig.thoughtSpotHost);
15049
15119
  }
15050
15120
  }
@@ -15059,7 +15129,6 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
15059
15129
  super(domSelector, viewConfig);
15060
15130
  /**
15061
15131
  * Only for testing purposes.
15062
- *
15063
15132
  * @hidden
15064
15133
  */
15065
15134
  // eslint-disable-next-line camelcase
@@ -15223,7 +15292,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
15223
15292
  getEmbedParams() {
15224
15293
  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,
15225
15294
  /* eslint-disable-next-line max-len */
15226
- dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, collapseSearchBar = true, homePageSearchBarMode, } = this.viewConfig;
15295
+ dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, homePageSearchBarMode, } = this.viewConfig;
15227
15296
  let params = {};
15228
15297
  params[Param.EmbedApp] = true;
15229
15298
  params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
@@ -15235,6 +15304,9 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
15235
15304
  params[Param.ShowLiveboardDescription] = !!showLiveboardDescription;
15236
15305
  params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
15237
15306
  params[Param.IsFullAppEmbed] = true;
15307
+ params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
15308
+ params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;
15309
+ params[Param.ShowLiveboardReverifyBanner] = showLiveboardReverifyBanner;
15238
15310
  params = this.getBaseQueryParams(params);
15239
15311
  if (fullHeight === true) {
15240
15312
  params[Param.fullHeight] = true;
@@ -15507,7 +15579,7 @@ query GetEurekaVizSnapshots(
15507
15579
  let params = {};
15508
15580
  params[Param.EmbedApp] = true;
15509
15581
  params = this.getBaseQueryParams(params);
15510
- const { enableVizTransformations, fullHeight, defaultHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, enableAskSage, enable2ColumnLayout, dataPanelV2 = true, } = this.viewConfig;
15582
+ const { enableVizTransformations, fullHeight, defaultHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, enableAskSage, enable2ColumnLayout, dataPanelV2 = true, } = this.viewConfig;
15511
15583
  const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
15512
15584
  || this.viewConfig.preventPinboardFilterRemoval;
15513
15585
  if (fullHeight === true) {
@@ -15551,6 +15623,9 @@ query GetEurekaVizSnapshots(
15551
15623
  params[Param.enableAskSage] = enableAskSage;
15552
15624
  }
15553
15625
  params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
15626
+ params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
15627
+ params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;
15628
+ params[Param.ShowLiveboardReverifyBanner] = showLiveboardReverifyBanner;
15554
15629
  params[Param.DataPanelV2Enabled] = dataPanelV2;
15555
15630
  const queryParams = getQueryParamString(params, true);
15556
15631
  return queryParams;
@@ -1130,6 +1130,48 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
1130
1130
  * @version SDK : 1.33.0 | Thoughtspot : 10.2.0.cl
1131
1131
  */
1132
1132
  homePageSearchBarMode?: HomePageSearchBarMode;
1133
+ /**
1134
+ * This flag is used to enable the compact header in liveboard
1135
+ * @type {boolean}
1136
+ * @default false
1137
+ * @version SDK: 1.35.0 | ThoughtSpot:10.3.0.cl
1138
+ * @example
1139
+ * ```js
1140
+ * const embed = new AppEmbed('#embed-container', {
1141
+ * ... // other options
1142
+ * isLiveboardCompactHeaderEnabled: true,
1143
+ * })
1144
+ * ```
1145
+ */
1146
+ isLiveboardCompactHeaderEnabled?: boolean;
1147
+ /**
1148
+ * This flag is used to show/hide verified Icon in liveboard compact header
1149
+ * @type {boolean}
1150
+ * @default true
1151
+ * @version SDK: 1.35.0 | ThoughtSpot:10.4.0.cl
1152
+ * @example
1153
+ * ```js
1154
+ * const embed = new AppEmbed('#embed-container', {
1155
+ * ... // other options
1156
+ * showLiveboardVerifiedBadge: true,
1157
+ * })
1158
+ * ```
1159
+ */
1160
+ showLiveboardVerifiedBadge?: boolean;
1161
+ /**
1162
+ * This flag is used to show/hide re-verify banner in liveboard compact header
1163
+ * @type {boolean}
1164
+ * @default true
1165
+ * @version SDK: 1.35.0 | ThoughtSpot:10.4.0.cl
1166
+ * @example
1167
+ * ```js
1168
+ * const embed = new AppEmbed('#embed-container', {
1169
+ * ... // other options
1170
+ * showLiveboardReverifyBanner: true,
1171
+ * })
1172
+ * ```
1173
+ */
1174
+ showLiveboardReverifyBanner?: boolean;
1133
1175
  }
1134
1176
  /**
1135
1177
  * Embeds full ThoughtSpot experience in a host application.
@@ -1439,6 +1481,48 @@ export interface LiveboardViewConfig extends Omit<ViewConfig, 'hiddenHomepageMod
1439
1481
  * @version SDK: 1.32.0 | ThoughtSpot: 10.0.0.cl
1440
1482
  */
1441
1483
  showPreviewLoader?: boolean;
1484
+ /**
1485
+ * This flag is used to enable the compact header in liveboard
1486
+ * @type {boolean}
1487
+ * @default false
1488
+ * @version SDK: 1.35.0 | ThoughtSpot:10.3.0.cl
1489
+ * @example
1490
+ * ```js
1491
+ * const embed = new LiveboardEmbed('#embed-container', {
1492
+ * ... // other options
1493
+ * isLiveboardCompactHeaderEnabled: true,
1494
+ * })
1495
+ * ```
1496
+ */
1497
+ isLiveboardCompactHeaderEnabled?: boolean;
1498
+ /**
1499
+ * This flag is used to show/hide verified Icon in liveboard compact header
1500
+ * @type {boolean}
1501
+ * @default true
1502
+ * @version SDK: 1.35.0 | ThoughtSpot:10.4.0.cl
1503
+ * @example
1504
+ * ```js
1505
+ * const embed = new LiveboardEmbed('#embed-container', {
1506
+ * ... // other options
1507
+ * showLiveboardVerifiedBadge: true,
1508
+ * })
1509
+ * ```
1510
+ */
1511
+ showLiveboardVerifiedBadge?: boolean;
1512
+ /**
1513
+ * This flag is used to show/hide re-verify banner in liveboard compact header
1514
+ * @type {boolean}
1515
+ * @default true
1516
+ * @version SDK: 1.35.0 | ThoughtSpot:10.4.0.cl
1517
+ * @example
1518
+ * ```js
1519
+ * const embed = new LiveboardEmbed('#embed-container', {
1520
+ * ... // other options
1521
+ * showLiveboardReverifyBanner: true,
1522
+ * })
1523
+ * ```
1524
+ */
1525
+ showLiveboardReverifyBanner?: boolean;
1442
1526
  }
1443
1527
  /**
1444
1528
  * Embed a ThoughtSpot Liveboard or visualization. When rendered it already
@@ -1595,7 +1679,7 @@ export declare const renderInQueue: (fn: (next?: (val?: any) => void) => Promise
1595
1679
  }).catch(error => {
1596
1680
  console.error(error);
1597
1681
  });
1598
- *
1682
+ *```
1599
1683
  * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
1600
1684
  * @group Global methods
1601
1685
  */
@@ -2120,7 +2204,6 @@ export interface customCssInterface {
2120
2204
  * Styles within the {@link CustomisationsInterface}.
2121
2205
  */
2122
2206
  export interface CustomStyles {
2123
- customCSSUrl?: string;
2124
2207
  customCSS?: customCssInterface;
2125
2208
  }
2126
2209
  /**
@@ -2298,13 +2381,6 @@ export interface EmbedConfig {
2298
2381
  * @default false
2299
2382
  */
2300
2383
  queueMultiRenders?: boolean;
2301
- /**
2302
- * Dynamic CSS URL to be injected in the loaded application.
2303
- * You would also need to set `style-src` in the CSP settings.
2304
- * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
2305
- * @default ''
2306
- */
2307
- customCssUrl?: string;
2308
2384
  /**
2309
2385
  * [AuthServer|Basic] Detect if third-party party cookies are enabled by doing an
2310
2386
  * additional call. This is slower and should be avoided. Listen to the
@@ -2433,6 +2509,12 @@ export interface EmbedConfig {
2433
2509
  * @version SDK: 1.28.5 | Thoughtspot: *
2434
2510
  */
2435
2511
  disableTokenVerification?: boolean;
2512
+ /**
2513
+ * This flag is used to disable showing the login failure page in the embedded app.
2514
+ *
2515
+ * @version SDK 1.32.3 | Thoughtspot: *
2516
+ */
2517
+ disableLoginFailurePage?: boolean;
2436
2518
  }
2437
2519
  export interface LayoutConfig {
2438
2520
  }
@@ -3957,20 +4039,57 @@ export declare enum EmbedEvent {
3957
4039
  */
3958
4040
  Rename = "rename",
3959
4041
  /**
3960
- * Emitted when user wants to intercept the search execution
4042
+ * Emitted if the user wants to intercept the search execution
4043
+ * and implement logic to decide whether to run the search or not
4044
+ *
4045
+ * Prerequisite: Set isOnBeforeGetVizDataInterceptEnabled : true
4046
+ * for this embed event to get emitted.
3961
4047
  *
3962
- * Set IsOnBeforeGetVizDataInterceptEnabled : true to use
3963
- * this embed event
4048
+ * Parameter: payload
4049
+ * Parameter: responder
4050
+ * Contains elements that lets developers define whether ThoughtSpot
4051
+ * will run the search or not, and if not, which error message to provide.
4052
+ * execute: When execute returns true, the search will be run.
4053
+ * When execute returns false, the search will not be executed.
4054
+ * error: Developers can customize the user facing message when execute is
4055
+ * set to false using the error parameter in responder
3964
4056
  *
3965
4057
  *```js
3966
- * searchEmbed.on(EmbedEvent.OnBeforeGetVizDataIntercept,
4058
+ * .on(EmbedEvent.OnBeforeGetVizDataIntercept,
3967
4059
  * (payload, responder) => {
3968
4060
  * responder({
3969
4061
  * data: {
3970
- * execute: true,
3971
- * }})
4062
+ * execute:false,
4063
+ * error: {
4064
+ * //Provide a custom error message to explain to your end user
4065
+ * //why their search did not run
4066
+ * errorText: "This search query cannot be run.
4067
+ * Please contact your administrator for more details."
4068
+ * }
4069
+ * }})
4070
+ * })
4071
+ * ```
4072
+ *
4073
+ *```js
4074
+ * .on(EmbedEvent.OnBeforeGetVizDataIntercept,
4075
+ * (payload, responder) => {
4076
+ * const query = payload.data.data.answer.search_query
4077
+ * responder({
4078
+ * data: {
4079
+ * // returns true as long as the query does not include
4080
+ * // both the 'sales' AND the 'county' column
4081
+ * execute: !(query.includes("sales")&&query.includes("county")),
4082
+ * error: {
4083
+ * //Provide a custom error message to explain to your end user
4084
+ * // why their search did not run, and which searches are accepted by your custom logic.
4085
+ * errorText: "You can't use this query :" + query + ".
4086
+ * The 'sales' measures can never be used at the 'county' level.
4087
+ * Please try another measure, or remove 'county' from your search."
4088
+ * }
4089
+ * }})
3972
4090
  * })
3973
4091
  *```
4092
+ *
3974
4093
  * @version SDK : 1.29.0 | Thoughtspot : 10.2.0.cl
3975
4094
  */
3976
4095
  OnBeforeGetVizDataIntercept = "onBeforeGetVizDataIntercept",
@@ -4089,6 +4208,15 @@ export declare enum HostEvent {
4089
4208
  * @hidden
4090
4209
  */
4091
4210
  Reload = "reload",
4211
+ /**
4212
+ * Get current iframe src
4213
+ * @example
4214
+ * ```js
4215
+ * const frameUrl = AppEmbed.trigger(HostEvent.GetIframeUrl)
4216
+ * ```
4217
+ * @version SDK: 1.35.0 | Thoughtspot: 10.4.0.cl
4218
+ */
4219
+ GetIframeUrl = "GetIframeUrl",
4092
4220
  /**
4093
4221
  * Display specific visualizations on a Liveboard.
4094
4222
  * @param - An array of GUIDs of the visualization to show. The visualization IDs not passed
@@ -4897,7 +5025,6 @@ export declare enum Param {
4897
5025
  ViewPortHeight = "viewPortHeight",
4898
5026
  ViewPortWidth = "viewPortWidth",
4899
5027
  VisibleActions = "visibleAction",
4900
- CustomCSSUrl = "customCssUrl",
4901
5028
  DisableLoginRedirect = "disableLoginRedirect",
4902
5029
  visibleVizs = "pinboardVisibleVizs",
4903
5030
  LiveboardV2Enabled = "isPinboardV2Enabled",
@@ -4954,7 +5081,10 @@ export declare enum Param {
4954
5081
  IsOnBeforeGetVizDataInterceptEnabled = "isOnBeforeGetVizDataInterceptEnabled",
4955
5082
  FocusSearchBarOnRender = "focusSearchBarOnRender",
4956
5083
  DisableRedirectionLinksInNewTab = "disableRedirectionLinksInNewTab",
4957
- HomePageSearchBarMode = "homePageSearchBarMode"
5084
+ HomePageSearchBarMode = "homePageSearchBarMode",
5085
+ ShowLiveboardVerifiedBadge = "showLiveboardVerifiedBadge",
5086
+ ShowLiveboardReverifyBanner = "showLiveboardReverifyBanner",
5087
+ LiveboardHeaderV2 = "isLiveboardHeaderV2Enabled"
4958
5088
  }
4959
5089
  /**
4960
5090
  * ThoughtSpot application pages include actions and menu commands
@@ -6590,6 +6720,7 @@ export declare class AnswerService {
6590
6720
  * @returns
6591
6721
  */
6592
6722
  addFilter(columnName: string, operator: RuntimeFilterOp, values: RuntimeFilter['values']): Promise<any>;
6723
+ getSQLQuery(): Promise<string>;
6593
6724
  /**
6594
6725
  * Fetch data from the answer.
6595
6726
  * @param offset
@@ -6608,6 +6739,15 @@ export declare class AnswerService {
6608
6739
  * @returns Response
6609
6740
  */
6610
6741
  fetchCSVBlob(userLocale?: string, includeInfo?: boolean): Promise<Response>;
6742
+ /**
6743
+ * Fetch the data for the answer as a PNG blob. This might be
6744
+ * quicker for larger data.
6745
+ * @param userLocale
6746
+ * @param omitBackground Omit the background in the PNG
6747
+ * @param deviceScaleFactor The scale factor for the PNG
6748
+ * @return Response
6749
+ */
6750
+ fetchPNGBlob(userLocale?: string, includeInfo?: boolean, omitBackground?: boolean, deviceScaleFactor?: number): Promise<Response>;
6611
6751
  /**
6612
6752
  * Just get the internal URL for this answer's data
6613
6753
  * as a CSV blob.
@@ -6616,6 +6756,11 @@ export declare class AnswerService {
6616
6756
  * @returns
6617
6757
  */
6618
6758
  getFetchCSVBlobUrl(userLocale?: string, includeInfo?: boolean): string;
6759
+ /**
6760
+ * Just get the internal URL for this answer's data
6761
+ * as a PNG blob.
6762
+ */
6763
+ getFetchPNGBlobUrl(userLocale?: string, omitBackground?: boolean, deviceScaleFactor?: number): string;
6619
6764
  /**
6620
6765
  * Get underlying data given a point and the output column names.
6621
6766
  * In case of a context menu action, the selectedPoints are
@@ -7012,7 +7157,6 @@ export declare class V1Embed extends TsEmbed {
7012
7157
  on(messageType: EmbedEvent, callback: MessageCallback, options?: MessageOptions): typeof TsEmbed.prototype;
7013
7158
  /**
7014
7159
  * Only for testing purposes.
7015
- *
7016
7160
  * @hidden
7017
7161
  */
7018
7162
  test__executeCallbacks: (eventType: EmbedEvent, data: any, eventPort?: void | MessagePort) => void;