@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
@@ -321,8 +321,7 @@
321
321
  return false;
322
322
  };
323
323
  const getCustomisations = (embedConfig, viewConfig) => {
324
- var _a, _b, _c, _d;
325
- const customCssUrlFromEmbedConfig = embedConfig.customCssUrl;
324
+ var _a, _b;
326
325
  const customizationsFromViewConfig = viewConfig.customizations;
327
326
  const customizationsFromEmbedConfig = embedConfig.customizations
328
327
  || embedConfig.customisations;
@@ -334,9 +333,6 @@
334
333
  ...(_a = customizationsFromEmbedConfig === null || customizationsFromEmbedConfig === void 0 ? void 0 : customizationsFromEmbedConfig.style) === null || _a === void 0 ? void 0 : _a.customCSS,
335
334
  ...(_b = customizationsFromViewConfig === null || customizationsFromViewConfig === void 0 ? void 0 : customizationsFromViewConfig.style) === null || _b === void 0 ? void 0 : _b.customCSS,
336
335
  },
337
- customCSSUrl: ((_c = customizationsFromViewConfig === null || customizationsFromViewConfig === void 0 ? void 0 : customizationsFromViewConfig.style) === null || _c === void 0 ? void 0 : _c.customCSSUrl)
338
- || ((_d = customizationsFromEmbedConfig === null || customizationsFromEmbedConfig === void 0 ? void 0 : customizationsFromEmbedConfig.style) === null || _d === void 0 ? void 0 : _d.customCSSUrl)
339
- || customCssUrlFromEmbedConfig,
340
336
  },
341
337
  content: {
342
338
  ...customizationsFromEmbedConfig === null || customizationsFromEmbedConfig === void 0 ? void 0 : customizationsFromEmbedConfig.content,
@@ -1582,20 +1578,57 @@
1582
1578
  */
1583
1579
  EmbedEvent["Rename"] = "rename";
1584
1580
  /**
1585
- * Emitted when user wants to intercept the search execution
1581
+ * Emitted if the user wants to intercept the search execution
1582
+ * and implement logic to decide whether to run the search or not
1583
+ *
1584
+ * Prerequisite: Set isOnBeforeGetVizDataInterceptEnabled : true
1585
+ * for this embed event to get emitted.
1586
1586
  *
1587
- * Set IsOnBeforeGetVizDataInterceptEnabled : true to use
1588
- * this embed event
1587
+ * Parameter: payload
1588
+ * Parameter: responder
1589
+ * Contains elements that lets developers define whether ThoughtSpot
1590
+ * will run the search or not, and if not, which error message to provide.
1591
+ * execute: When execute returns true, the search will be run.
1592
+ * When execute returns false, the search will not be executed.
1593
+ * error: Developers can customize the user facing message when execute is
1594
+ * set to false using the error parameter in responder
1589
1595
  *
1590
1596
  *```js
1591
- * searchEmbed.on(EmbedEvent.OnBeforeGetVizDataIntercept,
1597
+ * .on(EmbedEvent.OnBeforeGetVizDataIntercept,
1592
1598
  * (payload, responder) => {
1593
1599
  * responder({
1594
1600
  * data: {
1595
- * execute: true,
1596
- * }})
1601
+ * execute:false,
1602
+ * error: {
1603
+ * //Provide a custom error message to explain to your end user
1604
+ * //why their search did not run
1605
+ * errorText: "This search query cannot be run.
1606
+ * Please contact your administrator for more details."
1607
+ * }
1608
+ * }})
1609
+ * })
1610
+ * ```
1611
+ *
1612
+ *```js
1613
+ * .on(EmbedEvent.OnBeforeGetVizDataIntercept,
1614
+ * (payload, responder) => {
1615
+ * const query = payload.data.data.answer.search_query
1616
+ * responder({
1617
+ * data: {
1618
+ * // returns true as long as the query does not include
1619
+ * // both the 'sales' AND the 'county' column
1620
+ * execute: !(query.includes("sales")&&query.includes("county")),
1621
+ * error: {
1622
+ * //Provide a custom error message to explain to your end user
1623
+ * // why their search did not run, and which searches are accepted by your custom logic.
1624
+ * errorText: "You can't use this query :" + query + ".
1625
+ * The 'sales' measures can never be used at the 'county' level.
1626
+ * Please try another measure, or remove 'county' from your search."
1627
+ * }
1628
+ * }})
1597
1629
  * })
1598
1630
  *```
1631
+ *
1599
1632
  * @version SDK : 1.29.0 | Thoughtspot : 10.2.0.cl
1600
1633
  */
1601
1634
  EmbedEvent["OnBeforeGetVizDataIntercept"] = "onBeforeGetVizDataIntercept";
@@ -1693,6 +1726,15 @@
1693
1726
  * @hidden
1694
1727
  */
1695
1728
  HostEvent["Reload"] = "reload";
1729
+ /**
1730
+ * Get current iframe src
1731
+ * @example
1732
+ * ```js
1733
+ * const frameUrl = AppEmbed.trigger(HostEvent.GetIframeUrl)
1734
+ * ```
1735
+ * @version SDK: 1.35.0 | Thoughtspot: 10.4.0.cl
1736
+ */
1737
+ HostEvent["GetIframeUrl"] = "GetIframeUrl";
1696
1738
  /**
1697
1739
  * Display specific visualizations on a Liveboard.
1698
1740
  * @param - An array of GUIDs of the visualization to show. The visualization IDs not passed
@@ -2505,7 +2547,6 @@
2505
2547
  Param["ViewPortHeight"] = "viewPortHeight";
2506
2548
  Param["ViewPortWidth"] = "viewPortWidth";
2507
2549
  Param["VisibleActions"] = "visibleAction";
2508
- Param["CustomCSSUrl"] = "customCssUrl";
2509
2550
  Param["DisableLoginRedirect"] = "disableLoginRedirect";
2510
2551
  Param["visibleVizs"] = "pinboardVisibleVizs";
2511
2552
  Param["LiveboardV2Enabled"] = "isPinboardV2Enabled";
@@ -2564,6 +2605,9 @@
2564
2605
  Param["FocusSearchBarOnRender"] = "focusSearchBarOnRender";
2565
2606
  Param["DisableRedirectionLinksInNewTab"] = "disableRedirectionLinksInNewTab";
2566
2607
  Param["HomePageSearchBarMode"] = "homePageSearchBarMode";
2608
+ Param["ShowLiveboardVerifiedBadge"] = "showLiveboardVerifiedBadge";
2609
+ Param["ShowLiveboardReverifyBanner"] = "showLiveboardReverifyBanner";
2610
+ Param["LiveboardHeaderV2"] = "isLiveboardHeaderV2Enabled";
2567
2611
  })(Param || (Param = {}));
2568
2612
  (function (Action) {
2569
2613
  /**
@@ -6383,7 +6427,6 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
6383
6427
  isDiscoverable
6384
6428
  isHidden
6385
6429
  modifiedAt
6386
- tags
6387
6430
  }
6388
6431
  visualizations {
6389
6432
  ... on TableViz {
@@ -6428,6 +6471,14 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
6428
6471
  }
6429
6472
  }
6430
6473
  }
6474
+ `;
6475
+ const getSQLQuery = `
6476
+ mutation GetSQLQuery($session: BachSessionIdInput!) {
6477
+ Answer__getQuery(session: $session) {
6478
+ ${bachSessionId}
6479
+ sql
6480
+ }
6481
+ }
6431
6482
  `;
6432
6483
 
6433
6484
  // eslint-disable-next-line no-shadow
@@ -6559,6 +6610,10 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
6559
6610
  },
6560
6611
  });
6561
6612
  }
6613
+ async getSQLQuery() {
6614
+ const { sql } = await this.executeQuery(getSQLQuery, {});
6615
+ return sql;
6616
+ }
6562
6617
  /**
6563
6618
  * Fetch data from the answer.
6564
6619
  * @param offset
@@ -6593,6 +6648,20 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
6593
6648
  credentials: 'include',
6594
6649
  });
6595
6650
  }
6651
+ /**
6652
+ * Fetch the data for the answer as a PNG blob. This might be
6653
+ * quicker for larger data.
6654
+ * @param userLocale
6655
+ * @param omitBackground Omit the background in the PNG
6656
+ * @param deviceScaleFactor The scale factor for the PNG
6657
+ * @return Response
6658
+ */
6659
+ async fetchPNGBlob(userLocale = 'en-us', includeInfo = false, omitBackground = false, deviceScaleFactor = 2) {
6660
+ const fetchUrl = this.getFetchPNGBlobUrl(userLocale, omitBackground, deviceScaleFactor);
6661
+ return tokenizedFetch(fetchUrl, {
6662
+ credentials: 'include',
6663
+ });
6664
+ }
6596
6665
  /**
6597
6666
  * Just get the internal URL for this answer's data
6598
6667
  * as a CSV blob.
@@ -6603,6 +6672,13 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
6603
6672
  getFetchCSVBlobUrl(userLocale = 'en-us', includeInfo = false) {
6604
6673
  return `${this.thoughtSpotHost}/prism/download/answer/csv?sessionId=${this.session.sessionId}&genNo=${this.session.genNo}&userLocale=${userLocale}&exportFileName=data&hideCsvHeader=${!includeInfo}`;
6605
6674
  }
6675
+ /**
6676
+ * Just get the internal URL for this answer's data
6677
+ * as a PNG blob.
6678
+ */
6679
+ getFetchPNGBlobUrl(userLocale = 'en-us', omitBackground = false, deviceScaleFactor = 2) {
6680
+ return `${this.thoughtSpotHost}/prism/download/answer/png?sessionId=${this.session.sessionId}&deviceScaleFactor=${deviceScaleFactor}&omitBackground=${omitBackground}&genNo=${this.session.genNo}&userLocale=${userLocale}&exportFileName=data`;
6681
+ }
6606
6682
  /**
6607
6683
  * Get underlying data given a point and the output column names.
6608
6684
  * In case of a context menu action, the selectedPoints are
@@ -13779,8 +13855,8 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
13779
13855
  * @param containerEl
13780
13856
  */
13781
13857
  function processAuthFailure(e, containerEl) {
13782
- const { loginFailedMessage, authType } = getEmbedConfig();
13783
- if (authType !== AuthType.None) {
13858
+ const { loginFailedMessage, authType, disableLoginFailurePage } = getEmbedConfig();
13859
+ if (authType !== AuthType.None && !disableLoginFailurePage) {
13784
13860
  // eslint-disable-next-line no-param-reassign
13785
13861
  containerEl.innerHTML = loginFailedMessage;
13786
13862
  notifyAuthFailure(AuthFailureType.OTHER);
@@ -13881,7 +13957,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
13881
13957
  });
13882
13958
  }
13883
13959
 
13884
- 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};
13960
+ 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};
13885
13961
 
13886
13962
  /**
13887
13963
  * Copyright (c) 2022
@@ -14153,7 +14229,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
14153
14229
  * @returns queryParams
14154
14230
  */
14155
14231
  getBaseQueryParams(queryParams = {}) {
14156
- var _a, _b, _c, _d;
14232
+ var _a, _b, _c;
14157
14233
  let hostAppUrl = ((_a = window === null || window === void 0 ? void 0 : window.location) === null || _a === void 0 ? void 0 : _a.host) || '';
14158
14234
  // The below check is needed because TS Cloud firewall, blocks
14159
14235
  // localhost/127.0.0.1 in any url param.
@@ -14196,11 +14272,6 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
14196
14272
  this.handleError('You cannot have both hidden Tabs and visible Tabs');
14197
14273
  return queryParams;
14198
14274
  }
14199
- // TODO remove embedConfig.customCssUrl
14200
- const cssUrlParam = ((_c = customizations === null || customizations === void 0 ? void 0 : customizations.style) === null || _c === void 0 ? void 0 : _c.customCSSUrl) || this.embedConfig.customCssUrl;
14201
- if (cssUrlParam) {
14202
- queryParams[Param.CustomCSSUrl] = cssUrlParam;
14203
- }
14204
14275
  if (disabledActions === null || disabledActions === void 0 ? void 0 : disabledActions.length) {
14205
14276
  queryParams[Param.DisableActions] = disabledActions;
14206
14277
  }
@@ -14229,7 +14300,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
14229
14300
  queryParams[Param.ContextMenuTrigger] = false;
14230
14301
  }
14231
14302
  const spriteUrl = (customizations === null || customizations === void 0 ? void 0 : customizations.iconSpriteUrl)
14232
- || ((_d = this.embedConfig.customizations) === null || _d === void 0 ? void 0 : _d.iconSpriteUrl);
14303
+ || ((_c = this.embedConfig.customizations) === null || _c === void 0 ? void 0 : _c.iconSpriteUrl);
14233
14304
  if (spriteUrl) {
14234
14305
  queryParams[Param.IconSpriteUrl] = spriteUrl.replace('https://', '');
14235
14306
  }
@@ -14846,7 +14917,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
14846
14917
  * @version SDK: 1.25.0 / ThoughtSpot 9.10.0
14847
14918
  */
14848
14919
  async getAnswerService(vizId) {
14849
- const { session } = await this.trigger(exports.HostEvent.GetAnswerSession, vizId);
14920
+ const { session } = await this.trigger(exports.HostEvent.GetAnswerSession, vizId ? { vizId } : {});
14850
14921
  return new AnswerService(session, null, this.embedConfig.thoughtSpotHost);
14851
14922
  }
14852
14923
  }
@@ -14861,7 +14932,6 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
14861
14932
  super(domSelector, viewConfig);
14862
14933
  /**
14863
14934
  * Only for testing purposes.
14864
- *
14865
14935
  * @hidden
14866
14936
  */
14867
14937
  // eslint-disable-next-line camelcase
@@ -15322,7 +15392,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
15322
15392
  getEmbedParams() {
15323
15393
  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,
15324
15394
  /* eslint-disable-next-line max-len */
15325
- dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL, collapseSearchBar = true, homePageSearchBarMode, } = this.viewConfig;
15395
+ dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, homePageSearchBarMode, } = this.viewConfig;
15326
15396
  let params = {};
15327
15397
  params[Param.EmbedApp] = true;
15328
15398
  params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
@@ -15334,6 +15404,9 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
15334
15404
  params[Param.ShowLiveboardDescription] = !!showLiveboardDescription;
15335
15405
  params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
15336
15406
  params[Param.IsFullAppEmbed] = true;
15407
+ params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
15408
+ params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;
15409
+ params[Param.ShowLiveboardReverifyBanner] = showLiveboardReverifyBanner;
15337
15410
  params = this.getBaseQueryParams(params);
15338
15411
  if (fullHeight === true) {
15339
15412
  params[Param.fullHeight] = true;
@@ -15606,7 +15679,7 @@ query GetEurekaVizSnapshots(
15606
15679
  let params = {};
15607
15680
  params[Param.EmbedApp] = true;
15608
15681
  params = this.getBaseQueryParams(params);
15609
- const { enableVizTransformations, fullHeight, defaultHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, enableAskSage, enable2ColumnLayout, dataPanelV2 = true, } = this.viewConfig;
15682
+ 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;
15610
15683
  const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
15611
15684
  || this.viewConfig.preventPinboardFilterRemoval;
15612
15685
  if (fullHeight === true) {
@@ -15650,6 +15723,9 @@ query GetEurekaVizSnapshots(
15650
15723
  params[Param.enableAskSage] = enableAskSage;
15651
15724
  }
15652
15725
  params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
15726
+ params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
15727
+ params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;
15728
+ params[Param.ShowLiveboardReverifyBanner] = showLiveboardReverifyBanner;
15653
15729
  params[Param.DataPanelV2Enabled] = dataPanelV2;
15654
15730
  const queryParams = getQueryParamString(params, true);
15655
15731
  return queryParams;