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

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 (198) hide show
  1. package/cjs/package.json +6 -24
  2. package/cjs/src/css-variables.d.ts +46 -3
  3. package/cjs/src/css-variables.d.ts.map +1 -1
  4. package/cjs/src/embed/app.d.ts +47 -27
  5. package/cjs/src/embed/app.d.ts.map +1 -1
  6. package/cjs/src/embed/app.js +10 -1
  7. package/cjs/src/embed/app.js.map +1 -1
  8. package/cjs/src/embed/app.spec.js +32 -0
  9. package/cjs/src/embed/app.spec.js.map +1 -1
  10. package/cjs/src/embed/base.d.ts +35 -33
  11. package/cjs/src/embed/base.d.ts.map +1 -1
  12. package/cjs/src/embed/base.js +35 -33
  13. package/cjs/src/embed/base.js.map +1 -1
  14. package/cjs/src/embed/embed.spec.js +0 -19
  15. package/cjs/src/embed/embed.spec.js.map +1 -1
  16. package/cjs/src/embed/liveboard.d.ts +42 -0
  17. package/cjs/src/embed/liveboard.d.ts.map +1 -1
  18. package/cjs/src/embed/liveboard.js +6 -1
  19. package/cjs/src/embed/liveboard.js.map +1 -1
  20. package/cjs/src/embed/liveboard.spec.js +43 -0
  21. package/cjs/src/embed/liveboard.spec.js.map +1 -1
  22. package/cjs/src/embed/search.d.ts +0 -26
  23. package/cjs/src/embed/search.d.ts.map +1 -1
  24. package/cjs/src/embed/search.js.map +1 -1
  25. package/cjs/src/embed/ts-embed.d.ts +0 -1
  26. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  27. package/cjs/src/embed/ts-embed.js +8 -12
  28. package/cjs/src/embed/ts-embed.js.map +1 -1
  29. package/cjs/src/embed/ts-embed.spec.js +0 -9
  30. package/cjs/src/embed/ts-embed.spec.js.map +1 -1
  31. package/cjs/src/mixpanel-service.d.ts +4 -0
  32. package/cjs/src/mixpanel-service.d.ts.map +1 -1
  33. package/cjs/src/mixpanel-service.js +4 -0
  34. package/cjs/src/mixpanel-service.js.map +1 -1
  35. package/cjs/src/tokenizedFetch.d.ts.map +1 -1
  36. package/cjs/src/tokenizedFetch.js +5 -1
  37. package/cjs/src/tokenizedFetch.js.map +1 -1
  38. package/cjs/src/types.d.ts +179 -22
  39. package/cjs/src/types.d.ts.map +1 -1
  40. package/cjs/src/types.js +143 -12
  41. package/cjs/src/types.js.map +1 -1
  42. package/cjs/src/utils/authService/authService.spec.js +3 -1
  43. package/cjs/src/utils/authService/authService.spec.js.map +1 -1
  44. package/cjs/src/utils/graphql/answerService/answer-queries.d.ts +1 -0
  45. package/cjs/src/utils/graphql/answerService/answer-queries.d.ts.map +1 -1
  46. package/cjs/src/utils/graphql/answerService/answer-queries.js +9 -2
  47. package/cjs/src/utils/graphql/answerService/answer-queries.js.map +1 -1
  48. package/cjs/src/utils/graphql/answerService/answerService.d.ts +15 -0
  49. package/cjs/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
  50. package/cjs/src/utils/graphql/answerService/answerService.js +25 -0
  51. package/cjs/src/utils/graphql/answerService/answerService.js.map +1 -1
  52. package/cjs/src/utils/graphql/answerService/answerService.spec.js +53 -0
  53. package/cjs/src/utils/graphql/answerService/answerService.spec.js.map +1 -1
  54. package/cjs/src/utils/graphql/graphql-request.spec.d.ts +2 -0
  55. package/cjs/src/utils/graphql/graphql-request.spec.d.ts.map +1 -0
  56. package/cjs/src/utils/graphql/graphql-request.spec.js +36 -0
  57. package/cjs/src/utils/graphql/graphql-request.spec.js.map +1 -0
  58. package/cjs/src/utils/processData.js +2 -2
  59. package/cjs/src/utils/processData.js.map +1 -1
  60. package/cjs/src/utils/processData.spec.js +14 -0
  61. package/cjs/src/utils/processData.spec.js.map +1 -1
  62. package/cjs/src/utils/processTrigger.d.ts +1 -0
  63. package/cjs/src/utils/processTrigger.d.ts.map +1 -1
  64. package/cjs/src/utils/processTrigger.js +3 -3
  65. package/cjs/src/utils/processTrigger.js.map +1 -1
  66. package/cjs/src/utils/processTrigger.spec.js +10 -0
  67. package/cjs/src/utils/processTrigger.spec.js.map +1 -1
  68. package/cjs/src/utils.d.ts.map +1 -1
  69. package/cjs/src/utils.js +1 -3
  70. package/cjs/src/utils.js.map +1 -1
  71. package/dist/src/css-variables.d.ts +46 -3
  72. package/dist/src/css-variables.d.ts.map +1 -1
  73. package/dist/src/embed/app.d.ts +47 -27
  74. package/dist/src/embed/app.d.ts.map +1 -1
  75. package/dist/src/embed/base.d.ts +35 -33
  76. package/dist/src/embed/base.d.ts.map +1 -1
  77. package/dist/src/embed/liveboard.d.ts +42 -0
  78. package/dist/src/embed/liveboard.d.ts.map +1 -1
  79. package/dist/src/embed/search.d.ts +0 -26
  80. package/dist/src/embed/search.d.ts.map +1 -1
  81. package/dist/src/embed/ts-embed.d.ts +0 -1
  82. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  83. package/dist/src/mixpanel-service.d.ts +4 -0
  84. package/dist/src/mixpanel-service.d.ts.map +1 -1
  85. package/dist/src/tokenizedFetch.d.ts.map +1 -1
  86. package/dist/src/types.d.ts +179 -22
  87. package/dist/src/types.d.ts.map +1 -1
  88. package/dist/src/utils/graphql/answerService/answer-queries.d.ts +1 -0
  89. package/dist/src/utils/graphql/answerService/answer-queries.d.ts.map +1 -1
  90. package/dist/src/utils/graphql/answerService/answerService.d.ts +15 -0
  91. package/dist/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
  92. package/dist/src/utils/graphql/graphql-request.spec.d.ts +2 -0
  93. package/dist/src/utils/graphql/graphql-request.spec.d.ts.map +1 -0
  94. package/dist/src/utils/processTrigger.d.ts +1 -0
  95. package/dist/src/utils/processTrigger.d.ts.map +1 -1
  96. package/dist/src/utils.d.ts.map +1 -1
  97. package/dist/tsembed-react.es.js +442 -107
  98. package/dist/tsembed-react.js +385 -106
  99. package/dist/tsembed.es.js +477 -140
  100. package/dist/tsembed.js +420 -139
  101. package/dist/visual-embed-sdk-react-full.d.ts +368 -112
  102. package/dist/visual-embed-sdk-react.d.ts +368 -112
  103. package/dist/visual-embed-sdk.d.ts +368 -112
  104. package/lib/package.json +6 -24
  105. package/lib/src/css-variables.d.ts +46 -3
  106. package/lib/src/css-variables.d.ts.map +1 -1
  107. package/lib/src/embed/app.d.ts +47 -27
  108. package/lib/src/embed/app.d.ts.map +1 -1
  109. package/lib/src/embed/app.js +10 -1
  110. package/lib/src/embed/app.js.map +1 -1
  111. package/lib/src/embed/app.spec.js +32 -0
  112. package/lib/src/embed/app.spec.js.map +1 -1
  113. package/lib/src/embed/base.d.ts +35 -33
  114. package/lib/src/embed/base.d.ts.map +1 -1
  115. package/lib/src/embed/base.js +35 -33
  116. package/lib/src/embed/base.js.map +1 -1
  117. package/lib/src/embed/embed.spec.js +0 -19
  118. package/lib/src/embed/embed.spec.js.map +1 -1
  119. package/lib/src/embed/liveboard.d.ts +42 -0
  120. package/lib/src/embed/liveboard.d.ts.map +1 -1
  121. package/lib/src/embed/liveboard.js +6 -1
  122. package/lib/src/embed/liveboard.js.map +1 -1
  123. package/lib/src/embed/liveboard.spec.js +43 -0
  124. package/lib/src/embed/liveboard.spec.js.map +1 -1
  125. package/lib/src/embed/search.d.ts +0 -26
  126. package/lib/src/embed/search.d.ts.map +1 -1
  127. package/lib/src/embed/search.js.map +1 -1
  128. package/lib/src/embed/ts-embed.d.ts +0 -1
  129. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  130. package/lib/src/embed/ts-embed.js +8 -12
  131. package/lib/src/embed/ts-embed.js.map +1 -1
  132. package/lib/src/embed/ts-embed.spec.js +0 -9
  133. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  134. package/lib/src/mixpanel-service.d.ts +4 -0
  135. package/lib/src/mixpanel-service.d.ts.map +1 -1
  136. package/lib/src/mixpanel-service.js +4 -0
  137. package/lib/src/mixpanel-service.js.map +1 -1
  138. package/lib/src/tokenizedFetch.d.ts.map +1 -1
  139. package/lib/src/tokenizedFetch.js +5 -1
  140. package/lib/src/tokenizedFetch.js.map +1 -1
  141. package/lib/src/types.d.ts +179 -22
  142. package/lib/src/types.d.ts.map +1 -1
  143. package/lib/src/types.js +143 -12
  144. package/lib/src/types.js.map +1 -1
  145. package/lib/src/utils/authService/authService.spec.js +3 -1
  146. package/lib/src/utils/authService/authService.spec.js.map +1 -1
  147. package/lib/src/utils/graphql/answerService/answer-queries.d.ts +1 -0
  148. package/lib/src/utils/graphql/answerService/answer-queries.d.ts.map +1 -1
  149. package/lib/src/utils/graphql/answerService/answer-queries.js +8 -1
  150. package/lib/src/utils/graphql/answerService/answer-queries.js.map +1 -1
  151. package/lib/src/utils/graphql/answerService/answerService.d.ts +15 -0
  152. package/lib/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
  153. package/lib/src/utils/graphql/answerService/answerService.js +25 -0
  154. package/lib/src/utils/graphql/answerService/answerService.js.map +1 -1
  155. package/lib/src/utils/graphql/answerService/answerService.spec.js +54 -1
  156. package/lib/src/utils/graphql/answerService/answerService.spec.js.map +1 -1
  157. package/lib/src/utils/graphql/graphql-request.spec.d.ts +2 -0
  158. package/lib/src/utils/graphql/graphql-request.spec.d.ts.map +1 -0
  159. package/lib/src/utils/graphql/graphql-request.spec.js +33 -0
  160. package/lib/src/utils/graphql/graphql-request.spec.js.map +1 -0
  161. package/lib/src/utils/processData.js +2 -2
  162. package/lib/src/utils/processData.js.map +1 -1
  163. package/lib/src/utils/processData.spec.js +14 -0
  164. package/lib/src/utils/processData.spec.js.map +1 -1
  165. package/lib/src/utils/processTrigger.d.ts +1 -0
  166. package/lib/src/utils/processTrigger.d.ts.map +1 -1
  167. package/lib/src/utils/processTrigger.js +1 -1
  168. package/lib/src/utils/processTrigger.js.map +1 -1
  169. package/lib/src/utils/processTrigger.spec.js +10 -0
  170. package/lib/src/utils/processTrigger.spec.js.map +1 -1
  171. package/lib/src/utils.d.ts.map +1 -1
  172. package/lib/src/utils.js +1 -3
  173. package/lib/src/utils.js.map +1 -1
  174. package/lib/src/visual-embed-sdk.d.ts +368 -112
  175. package/package.json +6 -24
  176. package/src/css-variables.ts +49 -3
  177. package/src/embed/app.spec.ts +47 -0
  178. package/src/embed/app.ts +54 -26
  179. package/src/embed/base.ts +35 -33
  180. package/src/embed/embed.spec.ts +0 -22
  181. package/src/embed/liveboard.spec.ts +62 -0
  182. package/src/embed/liveboard.ts +52 -0
  183. package/src/embed/search.ts +0 -26
  184. package/src/embed/ts-embed.spec.ts +0 -11
  185. package/src/embed/ts-embed.ts +9 -12
  186. package/src/mixpanel-service.ts +4 -0
  187. package/src/tokenizedFetch.ts +5 -1
  188. package/src/types.ts +180 -21
  189. package/src/utils/authService/authService.spec.ts +3 -1
  190. package/src/utils/graphql/answerService/answer-queries.ts +9 -1
  191. package/src/utils/graphql/answerService/answerService.spec.ts +69 -0
  192. package/src/utils/graphql/answerService/answerService.ts +35 -0
  193. package/src/utils/graphql/graphql-request.spec.ts +38 -0
  194. package/src/utils/processData.spec.ts +16 -0
  195. package/src/utils/processData.ts +2 -2
  196. package/src/utils/processTrigger.spec.ts +19 -0
  197. package/src/utils/processTrigger.ts +1 -1
  198. package/src/utils.ts +1 -3
@@ -314,7 +314,6 @@ const checkReleaseVersionInBeta = (releaseVersion, suppressBetaWarning) => {
314
314
  };
315
315
  const getCustomisations = (embedConfig, viewConfig) => {
316
316
  var _a, _b, _c, _d;
317
- const customCssUrlFromEmbedConfig = embedConfig.customCssUrl;
318
317
  const customizationsFromViewConfig = viewConfig.customizations;
319
318
  const customizationsFromEmbedConfig = embedConfig.customizations
320
319
  || embedConfig.customisations;
@@ -327,8 +326,7 @@ const getCustomisations = (embedConfig, viewConfig) => {
327
326
  ...(_b = customizationsFromViewConfig === null || customizationsFromViewConfig === void 0 ? void 0 : customizationsFromViewConfig.style) === null || _b === void 0 ? void 0 : _b.customCSS,
328
327
  },
329
328
  customCSSUrl: ((_c = customizationsFromViewConfig === null || customizationsFromViewConfig === void 0 ? void 0 : customizationsFromViewConfig.style) === null || _c === void 0 ? void 0 : _c.customCSSUrl)
330
- || ((_d = customizationsFromEmbedConfig === null || customizationsFromEmbedConfig === void 0 ? void 0 : customizationsFromEmbedConfig.style) === null || _d === void 0 ? void 0 : _d.customCSSUrl)
331
- || customCssUrlFromEmbedConfig,
329
+ || ((_d = customizationsFromEmbedConfig === null || customizationsFromEmbedConfig === void 0 ? void 0 : customizationsFromEmbedConfig.style) === null || _d === void 0 ? void 0 : _d.customCSSUrl),
332
330
  },
333
331
  content: {
334
332
  ...customizationsFromEmbedConfig === null || customizationsFromEmbedConfig === void 0 ? void 0 : customizationsFromEmbedConfig.content,
@@ -748,6 +746,28 @@ var HomepageModule;
748
746
  * console.log('Drilldown event', drilldown);
749
747
  * }));
750
748
  * ```
749
+ *
750
+ * If you are using React components for embedding, you can register to any
751
+ * events from the `EmbedEvent` list by using the `on<EventName>` convention.
752
+ * For example,`onAlert`, `onCopyToClipboard` and so on.
753
+ *
754
+ * @example
755
+ * ```js
756
+ * // ...
757
+ * const MyComponent = ({ dataSources }) => {
758
+ * const onLoad = () => {
759
+ * console.log(EmbedEvent.Load, {});
760
+ * };
761
+ *
762
+ * return (
763
+ * <SearchEmbed
764
+ * dataSources={dataSources}
765
+ * onLoad = {logEvent("Load")}
766
+ * />
767
+ * );
768
+ * };
769
+ * ```
770
+ *
751
771
  * @group Events
752
772
  */
753
773
  // eslint-disable-next-line no-shadow
@@ -1618,21 +1638,61 @@ var EmbedEvent;
1618
1638
  */
1619
1639
  EmbedEvent["Rename"] = "rename";
1620
1640
  /**
1621
- * Emitted when user wants to intercept the search execution
1641
+ * Emitted if the user wants to intercept the search execution
1642
+ * and implement logic to decide whether to run the search or not
1643
+ *
1644
+ * Prerequisite: Set isOnBeforeGetVizDataInterceptEnabled : true
1645
+ * for this embed event to get emitted.
1646
+ *
1647
+ * @param: payload
1648
+ * @param: responder
1649
+ * Contains elements that lets developers define whether ThoughtSpot
1650
+ * will run the search or not, and if not, which error message to provide.
1651
+ *
1652
+ * execute: When execute returns true, the search will be run.
1653
+ * When execute returns false, the search will not be executed.
1622
1654
  *
1623
- * Set IsOnBeforeGetVizDataInterceptEnabled : true to use
1624
- * this embed event
1655
+ * error: Developers can customize the user facing message when execute is
1656
+ * set to false using the error parameter in responder
1625
1657
  *
1658
+ * @version SDK : 1.29.0 | Thoughtspot : 10.2.0.cl
1659
+ *
1660
+ * @example
1626
1661
  *```js
1627
- * searchEmbed.on(EmbedEvent.OnBeforeGetVizDataIntercept,
1662
+ * .on(EmbedEvent.OnBeforeGetVizDataIntercept,
1628
1663
  * (payload, responder) => {
1629
1664
  * responder({
1630
1665
  * data: {
1631
- * execute: true,
1632
- * }})
1666
+ * execute:false,
1667
+ * error: {
1668
+ * //Provide a custom error message to explain to your end user
1669
+ * //why their search did not run
1670
+ * errorText: "This search query cannot be run.
1671
+ * Please contact your administrator for more details."
1672
+ * }
1673
+ * }})
1674
+ * })
1675
+ * ```
1676
+ *
1677
+ *```js
1678
+ * .on(EmbedEvent.OnBeforeGetVizDataIntercept,
1679
+ * (payload, responder) => {
1680
+ * const query = payload.data.data.answer.search_query
1681
+ * responder({
1682
+ * data: {
1683
+ * // returns true as long as the query does not include
1684
+ * // both the 'sales' AND the 'county' column
1685
+ * execute: !(query.includes("sales")&&query.includes("county")),
1686
+ * error: {
1687
+ * //Provide a custom error message to explain to your end user
1688
+ * // why their search did not run, and which searches are accepted by your custom logic.
1689
+ * errorText: "You can't use this query :" + query + ".
1690
+ * The 'sales' measures can never be used at the 'county' level.
1691
+ * Please try another measure, or remove 'county' from your search."
1692
+ * }
1693
+ * }})
1633
1694
  * })
1634
1695
  *```
1635
- * @version SDK : 1.29.0 | Thoughtspot : 10.2.0.cl
1636
1696
  */
1637
1697
  EmbedEvent["OnBeforeGetVizDataIntercept"] = "onBeforeGetVizDataIntercept";
1638
1698
  /**
@@ -1650,7 +1710,7 @@ var EmbedEvent;
1650
1710
  })(EmbedEvent || (EmbedEvent = {}));
1651
1711
  /**
1652
1712
  * Event types that can be triggered by the host application
1653
- * to the embedded ThoughtSpot app
1713
+ * to the embedded ThoughtSpot app.
1654
1714
  *
1655
1715
  * To trigger an event use the corresponding
1656
1716
  * {@link LiveboardEmbed.trigger} or {@link AppEmbed.trigger} or {@link
@@ -1667,6 +1727,40 @@ var EmbedEvent;
1667
1727
  * { columnName: 'state, operator: RuntimeFilterOp.EQ, values: ['california']}
1668
1728
  * ]);
1669
1729
  * ```
1730
+ * @example
1731
+ * If using React components to embed, use the format shown in this example:
1732
+ *
1733
+ * ```js
1734
+ * const selectVizs = () => {
1735
+ * embedRef.current.trigger(HostEvent.SetVisibleVizs, [
1736
+ * "715e4613-c891-4884-be44-aa8d13701c06",
1737
+ * "3f84d633-e325-44b2-be25-c6650e5a49cf"
1738
+ * ]);
1739
+ * };
1740
+ * ```
1741
+ *
1742
+ *
1743
+ * You can also attach an Embed event to a Host event to trigger
1744
+ * a specific action as shown in this example:
1745
+ *
1746
+ * @example
1747
+ * ```js
1748
+ * const EmbeddedComponent = () => {
1749
+ * const embedRef = useRef(null); // import { useRef } from react
1750
+ * const onLiveboardRendered = () => {
1751
+ * embedRef.current.trigger(HostEvent.SetVisibleVizs, ['viz1', 'viz2']);
1752
+ * };
1753
+ *
1754
+ * return (
1755
+ * <LiveboardEmbed
1756
+ * ref={embedRef}
1757
+ * liveboardId="<liveboard-guid>"
1758
+ * onLiveboardRendered={onLiveboardRendered}
1759
+ * />
1760
+ * );
1761
+ * }
1762
+ * ```
1763
+ *
1670
1764
  * @group Events
1671
1765
  */
1672
1766
  // eslint-disable-next-line no-shadow
@@ -1752,6 +1846,15 @@ var HostEvent;
1752
1846
  * @hidden
1753
1847
  */
1754
1848
  HostEvent["Reload"] = "reload";
1849
+ /**
1850
+ * Get current iframe src
1851
+ * @example
1852
+ * ```js
1853
+ * const frameUrl = AppEmbed.trigger(HostEvent.GetIframeUrl)
1854
+ * ```
1855
+ * @version SDK: 1.35.0 | Thoughtspot: 10.4.0.cl
1856
+ */
1857
+ HostEvent["GetIframeUrl"] = "GetIframeUrl";
1755
1858
  /**
1756
1859
  * Display specific visualizations on a Liveboard.
1757
1860
  * @param - An array of GUIDs of the visualization to show. The visualization IDs not passed
@@ -2353,11 +2456,24 @@ var HostEvent;
2353
2456
  * filter: {
2354
2457
  * column: "item type",
2355
2458
  * oper: "IN",
2356
- * values: ["bags","shirts"],
2459
+ * values: ["bags","shirts"]
2357
2460
  * }
2358
2461
  * });
2359
2462
  * ```
2360
2463
  * @example
2464
+ * ```js
2465
+ *
2466
+ * liveboardEmbed.trigger(HostEvent.UpdateFilters, {
2467
+ * filter: {
2468
+ * column: "date",
2469
+ * oper: "EQ",
2470
+ * values: ["JULY","2023"],
2471
+ * type: "MONTH_YEAR"
2472
+ * }
2473
+ * });
2474
+ * ```
2475
+ *
2476
+ * @example
2361
2477
  *
2362
2478
  * ```js
2363
2479
  * liveboardEmbed.trigger(HostEvent.UpdateFilters, {
@@ -2374,7 +2490,8 @@ var HostEvent;
2374
2490
  * {
2375
2491
  * column: "Date",
2376
2492
  * oper: 'EQ',
2377
- * values: ["1656680400"]
2493
+ * values: ["2023-07-31"],
2494
+ * types: "EXACT_DATE"
2378
2495
  * }]
2379
2496
  * });
2380
2497
  * ```
@@ -2564,7 +2681,6 @@ var Param;
2564
2681
  Param["ViewPortHeight"] = "viewPortHeight";
2565
2682
  Param["ViewPortWidth"] = "viewPortWidth";
2566
2683
  Param["VisibleActions"] = "visibleAction";
2567
- Param["CustomCSSUrl"] = "customCssUrl";
2568
2684
  Param["DisableLoginRedirect"] = "disableLoginRedirect";
2569
2685
  Param["visibleVizs"] = "pinboardVisibleVizs";
2570
2686
  Param["LiveboardV2Enabled"] = "isPinboardV2Enabled";
@@ -2623,6 +2739,9 @@ var Param;
2623
2739
  Param["FocusSearchBarOnRender"] = "focusSearchBarOnRender";
2624
2740
  Param["DisableRedirectionLinksInNewTab"] = "disableRedirectionLinksInNewTab";
2625
2741
  Param["HomePageSearchBarMode"] = "homePageSearchBarMode";
2742
+ Param["ShowLiveboardVerifiedBadge"] = "showLiveboardVerifiedBadge";
2743
+ Param["ShowLiveboardReverifyBanner"] = "showLiveboardReverifyBanner";
2744
+ Param["LiveboardHeaderV2"] = "isLiveboardHeaderV2Enabled";
2626
2745
  })(Param || (Param = {}));
2627
2746
  /**
2628
2747
  * ThoughtSpot application pages include actions and menu commands
@@ -3546,7 +3665,7 @@ var Action;
3546
3665
  *
3547
3666
  * @version SDK: 1.32.0 | Thoughtspot: 10.1.0.cl
3548
3667
  */
3549
- Action["CreateLiveboard"] = "CreateLiveboard";
3668
+ Action["CreateLiveboard"] = "createLiveboard";
3550
3669
  /**
3551
3670
  * Action ID for to hide Verified Liveboard Banner
3552
3671
  * @example
@@ -3637,6 +3756,16 @@ var Action;
3637
3756
  * @version SDK: 1.34.0 | Thoughtspot: 10.3.0.cl
3638
3757
  */
3639
3758
  Action["UnsubscribeScheduleHomepage"] = "unsubscribeScheduleHomepage";
3759
+ /**
3760
+ * The **Manage Tags** action on Homepage Favourite Module.
3761
+ *
3762
+ * @example
3763
+ * ```js
3764
+ * disabledActions: [Action.ManageTags]
3765
+ * ```
3766
+ * @version SDK : 1.34.0 | Thoughtspot: 10.3.0.cl
3767
+ */
3768
+ Action["ManageTags"] = "manageTags";
3640
3769
  /**
3641
3770
  * Action ID for delete schedule action on schedule on homepage
3642
3771
  * @example
@@ -6252,7 +6381,11 @@ const getEmbedConfig = () => config;
6252
6381
  const tokenizedFetch = async (input, init) => {
6253
6382
  const embedConfig = getEmbedConfig();
6254
6383
  if (embedConfig.authType !== AuthType.TrustedAuthTokenCookieless) {
6255
- return fetch(input, init);
6384
+ return fetch(input, {
6385
+ // ensure cookies are included for the non cookie-less api calls.
6386
+ credentials: 'include',
6387
+ ...init,
6388
+ });
6256
6389
  }
6257
6390
  const req = new Request(input, init);
6258
6391
  const authToken = await getAuthenticationToken(embedConfig);
@@ -6461,7 +6594,6 @@ const getAnswer = `
6461
6594
  isDiscoverable
6462
6595
  isHidden
6463
6596
  modifiedAt
6464
- tags
6465
6597
  }
6466
6598
  visualizations {
6467
6599
  ... on TableViz {
@@ -6506,6 +6638,14 @@ const getAnswerData = `
6506
6638
  }
6507
6639
  }
6508
6640
  }
6641
+ `;
6642
+ const getSQLQuery = `
6643
+ mutation GetSQLQuery($session: BachSessionIdInput!) {
6644
+ Answer__getQuery(session: $session) {
6645
+ ${bachSessionId}
6646
+ sql
6647
+ }
6648
+ }
6509
6649
  `;
6510
6650
 
6511
6651
  // eslint-disable-next-line no-shadow
@@ -6637,6 +6777,10 @@ class AnswerService {
6637
6777
  },
6638
6778
  });
6639
6779
  }
6780
+ async getSQLQuery() {
6781
+ const { sql } = await this.executeQuery(getSQLQuery, {});
6782
+ return sql;
6783
+ }
6640
6784
  /**
6641
6785
  * Fetch data from the answer.
6642
6786
  * @param offset
@@ -6671,6 +6815,20 @@ class AnswerService {
6671
6815
  credentials: 'include',
6672
6816
  });
6673
6817
  }
6818
+ /**
6819
+ * Fetch the data for the answer as a PNG blob. This might be
6820
+ * quicker for larger data.
6821
+ * @param userLocale
6822
+ * @param omitBackground Omit the background in the PNG
6823
+ * @param deviceScaleFactor The scale factor for the PNG
6824
+ * @return Response
6825
+ */
6826
+ async fetchPNGBlob(userLocale = 'en-us', omitBackground = false, deviceScaleFactor = 2) {
6827
+ const fetchUrl = this.getFetchPNGBlobUrl(userLocale, omitBackground, deviceScaleFactor);
6828
+ return tokenizedFetch(fetchUrl, {
6829
+ credentials: 'include',
6830
+ });
6831
+ }
6674
6832
  /**
6675
6833
  * Just get the internal URL for this answer's data
6676
6834
  * as a CSV blob.
@@ -6681,6 +6839,13 @@ class AnswerService {
6681
6839
  getFetchCSVBlobUrl(userLocale = 'en-us', includeInfo = false) {
6682
6840
  return `${this.thoughtSpotHost}/prism/download/answer/csv?sessionId=${this.session.sessionId}&genNo=${this.session.genNo}&userLocale=${userLocale}&exportFileName=data&hideCsvHeader=${!includeInfo}`;
6683
6841
  }
6842
+ /**
6843
+ * Just get the internal URL for this answer's data
6844
+ * as a PNG blob.
6845
+ */
6846
+ getFetchPNGBlobUrl(userLocale = 'en-us', omitBackground = false, deviceScaleFactor = 2) {
6847
+ return `${this.thoughtSpotHost}/prism/download/answer/png?sessionId=${this.session.sessionId}&deviceScaleFactor=${deviceScaleFactor}&omitBackground=${omitBackground}&genNo=${this.session.genNo}&userLocale=${userLocale}&exportFileName=data`;
6848
+ }
6684
6849
  /**
6685
6850
  * Get underlying data given a point and the output column names.
6686
6851
  * In case of a context menu action, the selectedPoints are
@@ -6887,7 +7052,7 @@ const DEFAULT_EMBED_HEIGHT = '100%';
6887
7052
 
6888
7053
  var Config = {
6889
7054
  DEBUG: false,
6890
- LIB_VERSION: '2.45.0'
7055
+ LIB_VERSION: '2.47.0'
6891
7056
  };
6892
7057
 
6893
7058
  // since es6 imports are static and we run unit tests from the console, window won't be defined when importing this file
@@ -7717,20 +7882,24 @@ _.utf8Encode = function(string) {
7717
7882
 
7718
7883
  _.UUID = (function() {
7719
7884
 
7720
- // Time/ticks information
7721
- // 1*new Date() is a cross browser version of Date.now()
7885
+ // Time-based entropy
7722
7886
  var T = function() {
7723
- var d = 1 * new Date(),
7724
- i = 0;
7725
-
7726
- // this while loop figures how many browser ticks go by
7727
- // before 1*new Date() returns a new number, ie the amount
7728
- // of ticks that go by per millisecond
7729
- while (d == 1 * new Date()) {
7730
- i++;
7887
+ var time = 1 * new Date(); // cross-browser version of Date.now()
7888
+ var ticks;
7889
+ if (window$1.performance && window$1.performance.now) {
7890
+ ticks = window$1.performance.now();
7891
+ } else {
7892
+ // fall back to busy loop
7893
+ ticks = 0;
7894
+
7895
+ // this while loop figures how many browser ticks go by
7896
+ // before 1*new Date() returns a new number, ie the amount
7897
+ // of ticks that go by per millisecond
7898
+ while (time == 1 * new Date()) {
7899
+ ticks++;
7900
+ }
7731
7901
  }
7732
-
7733
- return d.toString(16) + i.toString(16);
7902
+ return time.toString(16) + Math.floor(ticks).toString(16);
7734
7903
  };
7735
7904
 
7736
7905
  // Math.Random entropy
@@ -8297,21 +8466,42 @@ _.dom_query = (function() {
8297
8466
  };
8298
8467
  })();
8299
8468
 
8469
+ var CAMPAIGN_KEYWORDS = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_content', 'utm_term'];
8470
+ var CLICK_IDS = ['dclid', 'fbclid', 'gclid', 'ko_click_id', 'li_fat_id', 'msclkid', 'ttclid', 'twclid', 'wbraid'];
8471
+
8300
8472
  _.info = {
8301
- campaignParams: function() {
8302
- var campaign_keywords = 'utm_source utm_medium utm_campaign utm_content utm_term'.split(' '),
8303
- kw = '',
8473
+ campaignParams: function(default_value) {
8474
+ var kw = '',
8304
8475
  params = {};
8305
- _.each(campaign_keywords, function(kwkey) {
8476
+ _.each(CAMPAIGN_KEYWORDS, function(kwkey) {
8306
8477
  kw = _.getQueryParam(document$1.URL, kwkey);
8307
8478
  if (kw.length) {
8308
8479
  params[kwkey] = kw;
8480
+ } else if (default_value !== undefined) {
8481
+ params[kwkey] = default_value;
8309
8482
  }
8310
8483
  });
8311
8484
 
8312
8485
  return params;
8313
8486
  },
8314
8487
 
8488
+ clickParams: function() {
8489
+ var id = '',
8490
+ params = {};
8491
+ _.each(CLICK_IDS, function(idkey) {
8492
+ id = _.getQueryParam(document$1.URL, idkey);
8493
+ if (id.length) {
8494
+ params[idkey] = id;
8495
+ }
8496
+ });
8497
+
8498
+ return params;
8499
+ },
8500
+
8501
+ marketingParams: function() {
8502
+ return _.extend(_.info.campaignParams(), _.info.clickParams());
8503
+ },
8504
+
8315
8505
  searchEngine: function(referrer) {
8316
8506
  if (referrer.search('https?://(.*)google.([^/?]*)') === 0) {
8317
8507
  return 'google';
@@ -8508,12 +8698,13 @@ _.info = {
8508
8698
  });
8509
8699
  },
8510
8700
 
8511
- pageviewInfo: function(page) {
8701
+ mpPageViewProperties: function() {
8512
8702
  return _.strip_empty_properties({
8513
- 'mp_page': page,
8514
- 'mp_referrer': document$1.referrer,
8515
- 'mp_browser': _.info.browser(userAgent, navigator.vendor, windowOpera),
8516
- 'mp_platform': _.info.os()
8703
+ 'current_page_title': document$1.title,
8704
+ 'current_domain': window$1.location.hostname,
8705
+ 'current_url_path': window$1.location.pathname,
8706
+ 'current_url_protocol': window$1.location.protocol,
8707
+ 'current_url_search': window$1.location.search
8517
8708
  });
8518
8709
  }
8519
8710
  };
@@ -9180,6 +9371,9 @@ var RequestBatcher = function(storageKey, options) {
9180
9371
 
9181
9372
  this.stopped = !this.libConfig['batch_autostart'];
9182
9373
  this.consecutiveRemovalFailures = 0;
9374
+
9375
+ // extra client-side dedupe
9376
+ this.itemIdsSentSuccessfully = {};
9183
9377
  };
9184
9378
 
9185
9379
  /**
@@ -9272,7 +9466,34 @@ RequestBatcher.prototype.flush = function(options) {
9272
9466
  payload = this.beforeSendHook(payload);
9273
9467
  }
9274
9468
  if (payload) {
9275
- dataForRequest.push(payload);
9469
+ // mp_sent_by_lib_version prop captures which lib version actually
9470
+ // sends each event (regardless of which version originally queued
9471
+ // it for sending)
9472
+ if (payload['event'] && payload['properties']) {
9473
+ payload['properties'] = _.extend(
9474
+ {},
9475
+ payload['properties'],
9476
+ {'mp_sent_by_lib_version': Config.LIB_VERSION}
9477
+ );
9478
+ }
9479
+ var addPayload = true;
9480
+ var itemId = item['id'];
9481
+ if (itemId) {
9482
+ if ((this.itemIdsSentSuccessfully[itemId] || 0) > 5) {
9483
+ this.reportError('[dupe] item ID sent too many times, not sending', {
9484
+ item: item,
9485
+ batchSize: batch.length,
9486
+ timesSent: this.itemIdsSentSuccessfully[itemId]
9487
+ });
9488
+ addPayload = false;
9489
+ }
9490
+ } else {
9491
+ this.reportError('[dupe] found item with no ID', {item: item});
9492
+ }
9493
+
9494
+ if (addPayload) {
9495
+ dataForRequest.push(payload);
9496
+ }
9276
9497
  }
9277
9498
  transformedItems[item['id']] = payload;
9278
9499
  }, this);
@@ -9355,6 +9576,24 @@ RequestBatcher.prototype.flush = function(options) {
9355
9576
  }
9356
9577
  }, this)
9357
9578
  );
9579
+
9580
+ // client-side dedupe
9581
+ _.each(batch, _.bind(function(item) {
9582
+ var itemId = item['id'];
9583
+ if (itemId) {
9584
+ this.itemIdsSentSuccessfully[itemId] = this.itemIdsSentSuccessfully[itemId] || 0;
9585
+ this.itemIdsSentSuccessfully[itemId]++;
9586
+ if (this.itemIdsSentSuccessfully[itemId] > 5) {
9587
+ this.reportError('[dupe] item ID sent too many times', {
9588
+ item: item,
9589
+ batchSize: batch.length,
9590
+ timesSent: this.itemIdsSentSuccessfully[itemId]
9591
+ });
9592
+ }
9593
+ } else {
9594
+ this.reportError('[dupe] found item with no ID while removing', {item: item});
9595
+ }
9596
+ }, this));
9358
9597
  }
9359
9598
 
9360
9599
  } catch(err) {
@@ -10200,24 +10439,25 @@ MixpanelPeople.prototype.union = addOptOutCheckMixpanelPeople(function(list_name
10200
10439
  });
10201
10440
 
10202
10441
  /*
10203
- * Record that you have charged the current user a certain amount
10204
- * of money. Charges recorded with track_charge() will appear in the
10205
- * Mixpanel revenue report.
10206
- *
10207
- * ### Usage:
10208
- *
10209
- * // charge a user $50
10210
- * mixpanel.people.track_charge(50);
10211
- *
10212
- * // charge a user $30.50 on the 2nd of january
10213
- * mixpanel.people.track_charge(30.50, {
10214
- * '$time': new Date('jan 1 2012')
10215
- * });
10216
- *
10217
- * @param {Number} amount The amount of money charged to the current user
10218
- * @param {Object} [properties] An associative array of properties associated with the charge
10219
- * @param {Function} [callback] If provided, the callback will be called when the server responds
10220
- */
10442
+ * Record that you have charged the current user a certain amount
10443
+ * of money. Charges recorded with track_charge() will appear in the
10444
+ * Mixpanel revenue report.
10445
+ *
10446
+ * ### Usage:
10447
+ *
10448
+ * // charge a user $50
10449
+ * mixpanel.people.track_charge(50);
10450
+ *
10451
+ * // charge a user $30.50 on the 2nd of january
10452
+ * mixpanel.people.track_charge(30.50, {
10453
+ * '$time': new Date('jan 1 2012')
10454
+ * });
10455
+ *
10456
+ * @param {Number} amount The amount of money charged to the current user
10457
+ * @param {Object} [properties] An associative array of properties associated with the charge
10458
+ * @param {Function} [callback] If provided, the callback will be called when the server responds
10459
+ * @deprecated
10460
+ */
10221
10461
  MixpanelPeople.prototype.track_charge = addOptOutCheckMixpanelPeople(function(amount, properties, callback) {
10222
10462
  if (!_.isNumber(amount)) {
10223
10463
  amount = parseFloat(amount);
@@ -10233,15 +10473,16 @@ MixpanelPeople.prototype.track_charge = addOptOutCheckMixpanelPeople(function(am
10233
10473
  });
10234
10474
 
10235
10475
  /*
10236
- * Permanently clear all revenue report transactions from the
10237
- * current user's people analytics profile.
10238
- *
10239
- * ### Usage:
10240
- *
10241
- * mixpanel.people.clear_charges();
10242
- *
10243
- * @param {Function} [callback] If provided, the callback will be called after tracking the event.
10244
- */
10476
+ * Permanently clear all revenue report transactions from the
10477
+ * current user's people analytics profile.
10478
+ *
10479
+ * ### Usage:
10480
+ *
10481
+ * mixpanel.people.clear_charges();
10482
+ *
10483
+ * @param {Function} [callback] If provided, the callback will be called after tracking the event.
10484
+ * @deprecated
10485
+ */
10245
10486
  MixpanelPeople.prototype.clear_charges = function(callback) {
10246
10487
  return this.set('$transactions', [], callback);
10247
10488
  };
@@ -10641,13 +10882,6 @@ MixpanelPersistence.prototype.unregister = function(prop) {
10641
10882
  }
10642
10883
  };
10643
10884
 
10644
- MixpanelPersistence.prototype.update_campaign_params = function() {
10645
- if (!this.campaign_params_saved) {
10646
- this.register_once(_.info.campaignParams());
10647
- this.campaign_params_saved = true;
10648
- }
10649
- };
10650
-
10651
10885
  MixpanelPersistence.prototype.update_search_keyword = function(referrer) {
10652
10886
  this.register(_.info.searchInfo(referrer));
10653
10887
  };
@@ -10930,6 +11164,7 @@ var NOOP_FUNC = function() {};
10930
11164
  /** @const */ var PRIMARY_INSTANCE_NAME = 'mixpanel';
10931
11165
  /** @const */ var PAYLOAD_TYPE_BASE64 = 'base64';
10932
11166
  /** @const */ var PAYLOAD_TYPE_JSON = 'json';
11167
+ /** @const */ var DEVICE_ID_PREFIX = '$device:';
10933
11168
 
10934
11169
 
10935
11170
  /*
@@ -10971,6 +11206,9 @@ var DEFAULT_CONFIG = {
10971
11206
  'cookie_domain': '',
10972
11207
  'cookie_name': '',
10973
11208
  'loaded': NOOP_FUNC,
11209
+ 'track_marketing': true,
11210
+ 'track_pageview': false,
11211
+ 'skip_first_touch_marketing': false,
10974
11212
  'store_google': true,
10975
11213
  'save_referrer': true,
10976
11214
  'test': false,
@@ -11037,6 +11275,25 @@ var create_mplib = function(token, config, name) {
11037
11275
  instance['people'] = new MixpanelPeople();
11038
11276
  instance['people']._init(instance);
11039
11277
 
11278
+ if (!instance.get_config('skip_first_touch_marketing')) {
11279
+ // We need null UTM params in the object because
11280
+ // UTM parameters act as a tuple. If any UTM param
11281
+ // is present, then we set all UTM params including
11282
+ // empty ones together
11283
+ var utm_params = _.info.campaignParams(null);
11284
+ var initial_utm_params = {};
11285
+ var has_utm = false;
11286
+ _.each(utm_params, function(utm_value, utm_key) {
11287
+ initial_utm_params['initial_' + utm_key] = utm_value;
11288
+ if (utm_value) {
11289
+ has_utm = true;
11290
+ }
11291
+ });
11292
+ if (has_utm) {
11293
+ instance['people'].set_once(initial_utm_params);
11294
+ }
11295
+ }
11296
+
11040
11297
  // if any instance on the page has debug = true, we set the
11041
11298
  // global debug to be true
11042
11299
  Config.DEBUG = Config.DEBUG || instance.get_config('debug');
@@ -11068,7 +11325,7 @@ var create_mplib = function(token, config, name) {
11068
11325
  * mixpanel.library_name.track(...);
11069
11326
  *
11070
11327
  * @param {String} token Your Mixpanel API token
11071
- * @param {Object} [config] A dictionary of config options to override. <a href="https://github.com/mixpanel/mixpanel-js/blob/8b2e1f7b/src/mixpanel-core.js#L87-L110">See a list of default config options</a>.
11328
+ * @param {Object} [config] A dictionary of config options to override. <a href="https://github.com/mixpanel/mixpanel-js/blob/v2.46.0/src/mixpanel-core.js#L88-L127">See a list of default config options</a>.
11072
11329
  * @param {String} [name] The name for the new mixpanel instance that you want created
11073
11330
  */
11074
11331
  MixpanelLib.prototype.init = function (token, config, name) {
@@ -11106,7 +11363,7 @@ MixpanelLib.prototype._init = function(token, config, name) {
11106
11363
  // default to JSON payload for standard mixpanel.com API hosts
11107
11364
  if (!('api_payload_format' in config)) {
11108
11365
  var api_host = config['api_host'] || DEFAULT_CONFIG['api_host'];
11109
- if (api_host.match(/\.mixpanel\.com$/)) {
11366
+ if (api_host.match(/\.mixpanel\.com/)) {
11110
11367
  variable_features['api_payload_format'] = PAYLOAD_TYPE_JSON;
11111
11368
  }
11112
11369
  }
@@ -11177,10 +11434,14 @@ MixpanelLib.prototype._init = function(token, config, name) {
11177
11434
  // or the device id if something was already stored
11178
11435
  // in the persitence
11179
11436
  this.register_once({
11180
- 'distinct_id': uuid,
11437
+ 'distinct_id': DEVICE_ID_PREFIX + uuid,
11181
11438
  '$device_id': uuid
11182
11439
  }, '');
11183
11440
  }
11441
+
11442
+ if (this.get_config('track_pageview')) {
11443
+ this.track_pageview();
11444
+ }
11184
11445
  };
11185
11446
 
11186
11447
  // Private methods
@@ -11194,7 +11455,7 @@ MixpanelLib.prototype._loaded = function() {
11194
11455
  MixpanelLib.prototype._set_default_superprops = function() {
11195
11456
  this['persistence'].update_search_keyword(document$1.referrer);
11196
11457
  if (this.get_config('store_google')) {
11197
- this['persistence'].update_campaign_params();
11458
+ this.register(_.info.campaignParams(), {persistent: false});
11198
11459
  }
11199
11460
  if (this.get_config('save_referrer')) {
11200
11461
  this['persistence'].update_referrer_info(document$1.referrer);
@@ -11676,6 +11937,10 @@ MixpanelLib.prototype.track = addOptOutCheckMixpanelLib(function(event_name, pro
11676
11937
 
11677
11938
  this._set_default_superprops();
11678
11939
 
11940
+ var marketing_properties = this.get_config('track_marketing')
11941
+ ? _.info.marketingParams()
11942
+ : {};
11943
+
11679
11944
  // note: extend writes to the first object, so lets make sure we
11680
11945
  // don't write to the persistence properties object and info
11681
11946
  // properties object by passing in a new object
@@ -11684,6 +11949,7 @@ MixpanelLib.prototype.track = addOptOutCheckMixpanelLib(function(event_name, pro
11684
11949
  properties = _.extend(
11685
11950
  {},
11686
11951
  _.info.properties(),
11952
+ marketing_properties,
11687
11953
  this['persistence'].properties(),
11688
11954
  this.unpersisted_superprops,
11689
11955
  properties
@@ -11844,17 +12110,54 @@ MixpanelLib.prototype.get_group = function (group_key, group_id) {
11844
12110
  };
11845
12111
 
11846
12112
  /**
11847
- * Track mp_page_view event. This is now ignored by the server.
12113
+ * Track a default Mixpanel page view event, which includes extra default event properties to
12114
+ * improve page view data. The `config.track_pageview` option for <a href="#mixpanelinit">mixpanel.init()</a>
12115
+ * may be turned on for tracking page loads automatically.
11848
12116
  *
11849
- * @param {String} [page] The url of the page to record. If you don't include this, it defaults to the current url.
11850
- * @deprecated
12117
+ * ### Usage
12118
+ *
12119
+ * // track a default $mp_web_page_view event
12120
+ * mixpanel.track_pageview();
12121
+ *
12122
+ * // track a page view event with additional event properties
12123
+ * mixpanel.track_pageview({'ab_test_variant': 'card-layout-b'});
12124
+ *
12125
+ * // example approach to track page views on different page types as event properties
12126
+ * mixpanel.track_pageview({'page': 'pricing'});
12127
+ * mixpanel.track_pageview({'page': 'homepage'});
12128
+ *
12129
+ * // UNCOMMON: Tracking a page view event with a custom event_name option. NOT expected to be used for
12130
+ * // individual pages on the same site or product. Use cases for custom event_name may be page
12131
+ * // views on different products or internal applications that are considered completely separate
12132
+ * mixpanel.track_pageview({'page': 'customer-search'}, {'event_name': '[internal] Admin Page View'});
12133
+ *
12134
+ * @param {Object} [properties] An optional set of additional properties to send with the page view event
12135
+ * @param {Object} [options] Page view tracking options
12136
+ * @param {String} [options.event_name] - Alternate name for the tracking event
12137
+ * @returns {Boolean|Object} If the tracking request was successfully initiated/queued, an object
12138
+ * with the tracking payload sent to the API server is returned; otherwise false.
11851
12139
  */
11852
- MixpanelLib.prototype.track_pageview = function(page) {
11853
- if (_.isUndefined(page)) {
11854
- page = document$1.location.href;
12140
+ MixpanelLib.prototype.track_pageview = addOptOutCheckMixpanelLib(function(properties, options) {
12141
+ if (typeof properties !== 'object') {
12142
+ properties = {};
11855
12143
  }
11856
- this.track('mp_page_view', _.info.pageviewInfo(page));
11857
- };
12144
+ options = options || {};
12145
+ var event_name = options['event_name'] || '$mp_web_page_view';
12146
+
12147
+ var default_page_properties = _.extend(
12148
+ _.info.mpPageViewProperties(),
12149
+ _.info.campaignParams(),
12150
+ _.info.clickParams()
12151
+ );
12152
+
12153
+ var event_properties = _.extend(
12154
+ {},
12155
+ default_page_properties,
12156
+ properties
12157
+ );
12158
+
12159
+ return this.track(event_name, event_properties);
12160
+ });
11858
12161
 
11859
12162
  /**
11860
12163
  * Track clicks on a set of document elements. Selector must be a
@@ -12103,7 +12406,15 @@ MixpanelLib.prototype.identify = function(
12103
12406
  // _unset_callback:function A callback to be run if and when the People unset queue is flushed
12104
12407
 
12105
12408
  var previous_distinct_id = this.get_distinct_id();
12106
- this.register({'$user_id': new_distinct_id});
12409
+ if (new_distinct_id && previous_distinct_id !== new_distinct_id) {
12410
+ // we allow the following condition if previous distinct_id is same as new_distinct_id
12411
+ // so that you can force flush people updates for anonymous profiles.
12412
+ if (typeof new_distinct_id === 'string' && new_distinct_id.indexOf(DEVICE_ID_PREFIX) === 0) {
12413
+ this.report_error('distinct_id cannot have $device: prefix');
12414
+ return -1;
12415
+ }
12416
+ this.register({'$user_id': new_distinct_id});
12417
+ }
12107
12418
 
12108
12419
  if (!this.get_property('$device_id')) {
12109
12420
  // The persisted distinct id might not actually be a device id at all
@@ -12144,7 +12455,7 @@ MixpanelLib.prototype.reset = function() {
12144
12455
  this._flags.identify_called = false;
12145
12456
  var uuid = _.UUID();
12146
12457
  this.register_once({
12147
- 'distinct_id': uuid,
12458
+ 'distinct_id': DEVICE_ID_PREFIX + uuid,
12148
12459
  '$device_id': uuid
12149
12460
  }, '');
12150
12461
  };
@@ -12269,8 +12580,8 @@ MixpanelLib.prototype.name_tag = function(name_tag) {
12269
12580
  * // batching or retry mechanisms.
12270
12581
  * api_transport: 'XHR'
12271
12582
  *
12272
- * // turn on request-batching/queueing/retry
12273
- * batch_requests: false,
12583
+ * // request-batching/queueing/retry
12584
+ * batch_requests: true,
12274
12585
  *
12275
12586
  * // maximum number of events/updates to send in a single
12276
12587
  * // network request
@@ -12342,10 +12653,20 @@ MixpanelLib.prototype.name_tag = function(name_tag) {
12342
12653
  * // secure, meaning they will only be transmitted over https
12343
12654
  * secure_cookie: false
12344
12655
  *
12656
+ * // disables enriching user profiles with first touch marketing data
12657
+ * skip_first_touch_marketing: false
12658
+ *
12345
12659
  * // the amount of time track_links will
12346
12660
  * // wait for Mixpanel's servers to respond
12347
12661
  * track_links_timeout: 300
12348
12662
  *
12663
+ * // adds any UTM parameters and click IDs present on the page to any events fired
12664
+ * track_marketing: true
12665
+ *
12666
+ * // enables automatic page view tracking using default page view events through
12667
+ * // the track_pageview() method
12668
+ * track_pageview: false
12669
+ *
12349
12670
  * // if you set upgrade to be true, the library will check for
12350
12671
  * // a cookie from our old js library and import super
12351
12672
  * // properties from it, then the old cookie is deleted
@@ -12870,6 +13191,10 @@ var mixpanel$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.assign(/*#__PURE
12870
13191
  // Needed to avoid error in CJS builds on some bundlers.
12871
13192
  const mixpanelLib = mixpanel_cjs || mixpanel$1;
12872
13193
  let mixpanelInstance;
13194
+ /**
13195
+ * Enum of mixpanel events
13196
+ * @hidden
13197
+ */
12873
13198
  const MIXPANEL_EVENT = {
12874
13199
  VISUAL_SDK_RENDER_START: 'visual-sdk-render-start',
12875
13200
  VISUAL_SDK_CALLED_INIT: 'visual-sdk-called-init',
@@ -13853,8 +14178,8 @@ function processNoCookieAccess(e, containerEl) {
13853
14178
  * @param containerEl
13854
14179
  */
13855
14180
  function processAuthFailure(e, containerEl) {
13856
- const { loginFailedMessage, authType } = getEmbedConfig();
13857
- if (authType !== AuthType.None) {
14181
+ const { loginFailedMessage, authType, disableLoginFailurePage } = getEmbedConfig();
14182
+ if (authType !== AuthType.None && !disableLoginFailurePage) {
13858
14183
  // eslint-disable-next-line no-param-reassign
13859
14184
  containerEl.innerHTML = loginFailedMessage;
13860
14185
  notifyAuthFailure(AuthFailureType.OTHER);
@@ -13955,7 +14280,7 @@ function processTrigger(iFrame, messageType, thoughtSpotHost, data) {
13955
14280
  });
13956
14281
  }
13957
14282
 
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};
14283
+ var name="@thoughtspot/visual-embed-sdk";var version="1.33.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","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.47.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1"};var devDependencies={"@mdx-js/mdx":"^1.6.22","@mdx-js/react":"^1.6.22","@react-icons/all-files":"^4.1.0","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^5.0.2","@size-limit/preset-big-lib":"^8.2.6","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^22.2.3","@types/mixpanel-browser":"^2.35.6","@types/lodash":"^4.17.0","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^4.6.0","@typescript-eslint/parser":"^4.6.0",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1",coveralls:"^3.1.0","current-git-branch":"^1.1.0","dts-bundle":"^0.7.3",eslint:"^7.12.1","eslint-config-airbnb-base":"^14.2.0","eslint-config-prettier":"^6.15.0","eslint-import-resolver-typescript":"^2.3.0","eslint-plugin-import":"^2.22.1","eslint-plugin-prettier":"^3.1.4","eslint-plugin-react-hooks":"^4.2.0","fs-extra":"^10.0.0","gh-pages":"^3.1.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^1.1.1",jest:"^26.6.3","jest-fetch-mock":"^3.0.3",jsdom:"^17.0.0","node-sass":"^8.0.0",prettier:"2.1.2",react:"^16.14.0","react-dom":"^16.14.0","react-resizable":"^1.11.0","react-resize-detector":"^6.6.0","react-test-renderer":"^17.0.2","react-use-flexsearch":"^0.1.1",rollup:"2.30.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^26.5.5","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^5.3.4"};var author="ThoughtSpot";var email="support@thoughtspot.com";var license="ThoughtSpot Development Tools End User License Agreement";var directories={lib:"lib"};var repository={type:"git",url:"git+https://github.com/thoughtspot/visual-embed-sdk.git"};var publishConfig={registry:"https://registry.npmjs.org"};var keywords=["thoughtspot","everywhere","embedded","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version,description:description,module:module,main:main,types:types,files:files,exports:exports,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.js",limit:"49 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};
13959
14284
 
13960
14285
  /**
13961
14286
  * Copyright (c) 2022
@@ -14227,7 +14552,7 @@ class TsEmbed {
14227
14552
  * @returns queryParams
14228
14553
  */
14229
14554
  getBaseQueryParams(queryParams = {}) {
14230
- var _a, _b, _c, _d;
14555
+ var _a, _b, _c;
14231
14556
  let hostAppUrl = ((_a = window === null || window === void 0 ? void 0 : window.location) === null || _a === void 0 ? void 0 : _a.host) || '';
14232
14557
  // The below check is needed because TS Cloud firewall, blocks
14233
14558
  // localhost/127.0.0.1 in any url param.
@@ -14270,11 +14595,6 @@ class TsEmbed {
14270
14595
  this.handleError('You cannot have both hidden Tabs and visible Tabs');
14271
14596
  return queryParams;
14272
14597
  }
14273
- // TODO remove embedConfig.customCssUrl
14274
- const cssUrlParam = ((_c = customizations === null || customizations === void 0 ? void 0 : customizations.style) === null || _c === void 0 ? void 0 : _c.customCSSUrl) || this.embedConfig.customCssUrl;
14275
- if (cssUrlParam) {
14276
- queryParams[Param.CustomCSSUrl] = cssUrlParam;
14277
- }
14278
14598
  if (disabledActions === null || disabledActions === void 0 ? void 0 : disabledActions.length) {
14279
14599
  queryParams[Param.DisableActions] = disabledActions;
14280
14600
  }
@@ -14303,7 +14623,7 @@ class TsEmbed {
14303
14623
  queryParams[Param.ContextMenuTrigger] = false;
14304
14624
  }
14305
14625
  const spriteUrl = (customizations === null || customizations === void 0 ? void 0 : customizations.iconSpriteUrl)
14306
- || ((_d = this.embedConfig.customizations) === null || _d === void 0 ? void 0 : _d.iconSpriteUrl);
14626
+ || ((_c = this.embedConfig.customizations) === null || _c === void 0 ? void 0 : _c.iconSpriteUrl);
14307
14627
  if (spriteUrl) {
14308
14628
  queryParams[Param.IconSpriteUrl] = spriteUrl.replace('https://', '');
14309
14629
  }
@@ -14313,9 +14633,6 @@ class TsEmbed {
14313
14633
  if (locale !== undefined) {
14314
14634
  queryParams[Param.Locale] = locale;
14315
14635
  }
14316
- if (additionalFlags && additionalFlags.constructor.name === 'Object') {
14317
- Object.assign(queryParams, additionalFlags);
14318
- }
14319
14636
  if (linkOverride) {
14320
14637
  queryParams[Param.LinkOverride] = linkOverride;
14321
14638
  }
@@ -14327,6 +14644,11 @@ class TsEmbed {
14327
14644
  }
14328
14645
  queryParams[Param.OverrideNativeConsole] = true;
14329
14646
  queryParams[Param.ClientLogLevel] = this.embedConfig.logLevel;
14647
+ if (additionalFlags && additionalFlags.constructor.name === 'Object') {
14648
+ Object.assign(queryParams, additionalFlags);
14649
+ }
14650
+ // Do not add any flags below this, as we want additional flags to
14651
+ // override other flags
14330
14652
  return queryParams;
14331
14653
  }
14332
14654
  /**
@@ -14920,7 +15242,7 @@ class TsEmbed {
14920
15242
  * @version SDK: 1.25.0 / ThoughtSpot 9.10.0
14921
15243
  */
14922
15244
  async getAnswerService(vizId) {
14923
- const { session } = await this.trigger(HostEvent.GetAnswerSession, vizId);
15245
+ const { session } = await this.trigger(HostEvent.GetAnswerSession, vizId ? { vizId } : {});
14924
15246
  return new AnswerService(session, null, this.embedConfig.thoughtSpotHost);
14925
15247
  }
14926
15248
  }
@@ -14935,7 +15257,6 @@ class V1Embed extends TsEmbed {
14935
15257
  super(domSelector, viewConfig);
14936
15258
  /**
14937
15259
  * Only for testing purposes.
14938
- *
14939
15260
  * @hidden
14940
15261
  */
14941
15262
  // eslint-disable-next-line camelcase
@@ -15329,6 +15650,10 @@ var Page;
15329
15650
  * SpotIQ listing page
15330
15651
  */
15331
15652
  Page["SpotIQ"] = "insights";
15653
+ /**
15654
+ * Monitor Alerts Page
15655
+ */
15656
+ Page["Monitor"] = "monitor";
15332
15657
  })(Page || (Page = {}));
15333
15658
  /**
15334
15659
  * Define the initial state os column custom group accordions
@@ -15397,7 +15722,7 @@ class AppEmbed extends V1Embed {
15397
15722
  getEmbedParams() {
15398
15723
  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,
15399
15724
  /* eslint-disable-next-line max-len */
15400
- dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL, collapseSearchBar = true, homePageSearchBarMode, } = this.viewConfig;
15725
+ dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, homePageSearchBarMode, } = this.viewConfig;
15401
15726
  let params = {};
15402
15727
  params[Param.EmbedApp] = true;
15403
15728
  params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
@@ -15409,6 +15734,9 @@ class AppEmbed extends V1Embed {
15409
15734
  params[Param.ShowLiveboardDescription] = !!showLiveboardDescription;
15410
15735
  params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
15411
15736
  params[Param.IsFullAppEmbed] = true;
15737
+ params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
15738
+ params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;
15739
+ params[Param.ShowLiveboardReverifyBanner] = showLiveboardReverifyBanner;
15412
15740
  params = this.getBaseQueryParams(params);
15413
15741
  if (fullHeight === true) {
15414
15742
  params[Param.fullHeight] = true;
@@ -15488,6 +15816,8 @@ class AppEmbed extends V1Embed {
15488
15816
  return 'data/tables';
15489
15817
  case Page.SpotIQ:
15490
15818
  return modularHomeExperience ? 'home/spotiq-analysis' : 'insights/results';
15819
+ case Page.Monitor:
15820
+ return modularHomeExperience ? 'home/monitor-alerts' : 'insights/monitor-alerts';
15491
15821
  case Page.Home:
15492
15822
  default:
15493
15823
  return 'home';
@@ -15679,7 +16009,7 @@ class LiveboardEmbed extends V1Embed {
15679
16009
  let params = {};
15680
16010
  params[Param.EmbedApp] = true;
15681
16011
  params = this.getBaseQueryParams(params);
15682
- const { enableVizTransformations, fullHeight, defaultHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, enableAskSage, enable2ColumnLayout, } = this.viewConfig;
16012
+ const { enableVizTransformations, fullHeight, defaultHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, enableAskSage, enable2ColumnLayout, dataPanelV2 = true, enableCustomColumnGroups = false, } = this.viewConfig;
15683
16013
  const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
15684
16014
  || this.viewConfig.preventPinboardFilterRemoval;
15685
16015
  if (fullHeight === true) {
@@ -15723,6 +16053,11 @@ class LiveboardEmbed extends V1Embed {
15723
16053
  params[Param.enableAskSage] = enableAskSage;
15724
16054
  }
15725
16055
  params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
16056
+ params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
16057
+ params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;
16058
+ params[Param.ShowLiveboardReverifyBanner] = showLiveboardReverifyBanner;
16059
+ params[Param.DataPanelV2Enabled] = dataPanelV2;
16060
+ params[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
15726
16061
  const queryParams = getQueryParamString(params, true);
15727
16062
  return queryParams;
15728
16063
  }