@thoughtspot/visual-embed-sdk 1.44.1 → 1.44.3

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 (246) hide show
  1. package/cjs/package.json +6 -5
  2. package/cjs/src/api-intercept.d.ts.map +1 -1
  3. package/cjs/src/api-intercept.js +8 -3
  4. package/cjs/src/api-intercept.js.map +1 -1
  5. package/cjs/src/api-intercept.spec.js +19 -3
  6. package/cjs/src/api-intercept.spec.js.map +1 -1
  7. package/cjs/src/auth.spec.js +43 -42
  8. package/cjs/src/auth.spec.js.map +1 -1
  9. package/cjs/src/authToken.spec.js +3 -3
  10. package/cjs/src/authToken.spec.js.map +1 -1
  11. package/cjs/src/embed/app.d.ts +17 -0
  12. package/cjs/src/embed/app.d.ts.map +1 -1
  13. package/cjs/src/embed/app.js +9 -5
  14. package/cjs/src/embed/app.js.map +1 -1
  15. package/cjs/src/embed/app.spec.js +96 -6
  16. package/cjs/src/embed/app.spec.js.map +1 -1
  17. package/cjs/src/embed/base.d.ts +1 -1
  18. package/cjs/src/embed/base.d.ts.map +1 -1
  19. package/cjs/src/embed/base.js +4 -0
  20. package/cjs/src/embed/base.js.map +1 -1
  21. package/cjs/src/embed/base.spec.js +71 -15
  22. package/cjs/src/embed/base.spec.js.map +1 -1
  23. package/cjs/src/embed/bodyless-conversation.spec.js +2 -2
  24. package/cjs/src/embed/bodyless-conversation.spec.js.map +1 -1
  25. package/cjs/src/embed/conversation.d.ts.map +1 -1
  26. package/cjs/src/embed/conversation.js +6 -1
  27. package/cjs/src/embed/conversation.js.map +1 -1
  28. package/cjs/src/embed/conversation.spec.js +8 -3
  29. package/cjs/src/embed/conversation.spec.js.map +1 -1
  30. package/cjs/src/embed/embed.spec.js +101 -2
  31. package/cjs/src/embed/embed.spec.js.map +1 -1
  32. package/cjs/src/embed/events.spec.js +2 -2
  33. package/cjs/src/embed/events.spec.js.map +1 -1
  34. package/cjs/src/embed/hostEventClient/host-event-client.spec.js +1 -1
  35. package/cjs/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
  36. package/cjs/src/embed/liveboard.d.ts +18 -0
  37. package/cjs/src/embed/liveboard.d.ts.map +1 -1
  38. package/cjs/src/embed/liveboard.js +13 -6
  39. package/cjs/src/embed/liveboard.js.map +1 -1
  40. package/cjs/src/embed/liveboard.spec.js +114 -26
  41. package/cjs/src/embed/liveboard.spec.js.map +1 -1
  42. package/cjs/src/embed/pinboard.spec.js +1 -1
  43. package/cjs/src/embed/pinboard.spec.js.map +1 -1
  44. package/cjs/src/embed/sage.spec.js +2 -2
  45. package/cjs/src/embed/sage.spec.js.map +1 -1
  46. package/cjs/src/embed/search.spec.js +118 -2
  47. package/cjs/src/embed/search.spec.js.map +1 -1
  48. package/cjs/src/embed/ts-embed-trigger.spec.js +2 -3
  49. package/cjs/src/embed/ts-embed-trigger.spec.js.map +1 -1
  50. package/cjs/src/embed/ts-embed.d.ts +3 -2
  51. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  52. package/cjs/src/embed/ts-embed.js +51 -17
  53. package/cjs/src/embed/ts-embed.js.map +1 -1
  54. package/cjs/src/embed/ts-embed.spec.d.ts.map +1 -1
  55. package/cjs/src/embed/ts-embed.spec.js +335 -71
  56. package/cjs/src/embed/ts-embed.spec.js.map +1 -1
  57. package/cjs/src/errors.d.ts +8 -0
  58. package/cjs/src/errors.d.ts.map +1 -1
  59. package/cjs/src/errors.js +8 -0
  60. package/cjs/src/errors.js.map +1 -1
  61. package/cjs/src/mixpanel-service.spec.js +1 -1
  62. package/cjs/src/mixpanel-service.spec.js.map +1 -1
  63. package/cjs/src/react/index.spec.js +3 -4
  64. package/cjs/src/react/index.spec.js.map +1 -1
  65. package/cjs/src/test/test-utils.js +1 -1
  66. package/cjs/src/test/test-utils.js.map +1 -1
  67. package/cjs/src/types.d.ts +194 -1
  68. package/cjs/src/types.d.ts.map +1 -1
  69. package/cjs/src/types.js +94 -2
  70. package/cjs/src/types.js.map +1 -1
  71. package/cjs/src/utils/authService/authService.spec.js +8 -8
  72. package/cjs/src/utils/authService/authService.spec.js.map +1 -1
  73. package/cjs/src/utils/authService/tokenizedAuthService.spec.js.map +1 -1
  74. package/cjs/src/utils/graphql/answerService/answerService.spec.js +1 -1
  75. package/cjs/src/utils/graphql/answerService/answerService.spec.js.map +1 -1
  76. package/cjs/src/utils/graphql/graphql-request.spec.js +1 -1
  77. package/cjs/src/utils/graphql/graphql-request.spec.js.map +1 -1
  78. package/cjs/src/utils/graphql/sourceService.spec.js +1 -1
  79. package/cjs/src/utils/graphql/sourceService.spec.js.map +1 -1
  80. package/cjs/src/utils/logger.spec.d.ts +5 -20
  81. package/cjs/src/utils/logger.spec.d.ts.map +1 -1
  82. package/cjs/src/utils/processData.spec.js +17 -17
  83. package/cjs/src/utils/processData.spec.js.map +1 -1
  84. package/cjs/src/utils/processTrigger.spec.js +8 -8
  85. package/cjs/src/utils/processTrigger.spec.js.map +1 -1
  86. package/cjs/src/utils.d.ts +16 -3
  87. package/cjs/src/utils.d.ts.map +1 -1
  88. package/cjs/src/utils.js +60 -5
  89. package/cjs/src/utils.js.map +1 -1
  90. package/cjs/src/utils.spec.js +72 -10
  91. package/cjs/src/utils.spec.js.map +1 -1
  92. package/dist/{index-BE9gGzRX.js → index-D0n5LIka.js} +1 -1
  93. package/dist/src/api-intercept.d.ts.map +1 -1
  94. package/dist/src/embed/app.d.ts +17 -0
  95. package/dist/src/embed/app.d.ts.map +1 -1
  96. package/dist/src/embed/base.d.ts +1 -1
  97. package/dist/src/embed/base.d.ts.map +1 -1
  98. package/dist/src/embed/conversation.d.ts.map +1 -1
  99. package/dist/src/embed/liveboard.d.ts +18 -0
  100. package/dist/src/embed/liveboard.d.ts.map +1 -1
  101. package/dist/src/embed/ts-embed.d.ts +3 -2
  102. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  103. package/dist/src/embed/ts-embed.spec.d.ts.map +1 -1
  104. package/dist/src/errors.d.ts +8 -0
  105. package/dist/src/errors.d.ts.map +1 -1
  106. package/dist/src/types.d.ts +194 -1
  107. package/dist/src/types.d.ts.map +1 -1
  108. package/dist/src/utils/logger.spec.d.ts +5 -20
  109. package/dist/src/utils/logger.spec.d.ts.map +1 -1
  110. package/dist/src/utils.d.ts +16 -3
  111. package/dist/src/utils.d.ts.map +1 -1
  112. package/dist/tsembed-react.es.js +282 -74
  113. package/dist/tsembed-react.js +281 -73
  114. package/dist/tsembed.es.js +282 -74
  115. package/dist/tsembed.js +281 -73
  116. package/dist/visual-embed-sdk-react-full.d.ts +185 -3
  117. package/dist/visual-embed-sdk-react.d.ts +184 -2
  118. package/dist/visual-embed-sdk.d.ts +185 -3
  119. package/lib/package.json +6 -5
  120. package/lib/src/api-intercept.d.ts.map +1 -1
  121. package/lib/src/api-intercept.js +9 -4
  122. package/lib/src/api-intercept.js.map +1 -1
  123. package/lib/src/api-intercept.spec.js +20 -4
  124. package/lib/src/api-intercept.spec.js.map +1 -1
  125. package/lib/src/auth.spec.js +43 -42
  126. package/lib/src/auth.spec.js.map +1 -1
  127. package/lib/src/authToken.spec.js +3 -3
  128. package/lib/src/authToken.spec.js.map +1 -1
  129. package/lib/src/embed/app.d.ts +17 -0
  130. package/lib/src/embed/app.d.ts.map +1 -1
  131. package/lib/src/embed/app.js +10 -6
  132. package/lib/src/embed/app.js.map +1 -1
  133. package/lib/src/embed/app.spec.js +96 -6
  134. package/lib/src/embed/app.spec.js.map +1 -1
  135. package/lib/src/embed/base.d.ts +1 -1
  136. package/lib/src/embed/base.d.ts.map +1 -1
  137. package/lib/src/embed/base.js +5 -1
  138. package/lib/src/embed/base.js.map +1 -1
  139. package/lib/src/embed/base.spec.js +72 -16
  140. package/lib/src/embed/base.spec.js.map +1 -1
  141. package/lib/src/embed/bodyless-conversation.spec.js +2 -2
  142. package/lib/src/embed/bodyless-conversation.spec.js.map +1 -1
  143. package/lib/src/embed/conversation.d.ts.map +1 -1
  144. package/lib/src/embed/conversation.js +7 -2
  145. package/lib/src/embed/conversation.js.map +1 -1
  146. package/lib/src/embed/conversation.spec.js +9 -4
  147. package/lib/src/embed/conversation.spec.js.map +1 -1
  148. package/lib/src/embed/embed.spec.js +103 -4
  149. package/lib/src/embed/embed.spec.js.map +1 -1
  150. package/lib/src/embed/events.spec.js +2 -2
  151. package/lib/src/embed/events.spec.js.map +1 -1
  152. package/lib/src/embed/hostEventClient/host-event-client.spec.js +2 -2
  153. package/lib/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
  154. package/lib/src/embed/liveboard.d.ts +18 -0
  155. package/lib/src/embed/liveboard.d.ts.map +1 -1
  156. package/lib/src/embed/liveboard.js +15 -8
  157. package/lib/src/embed/liveboard.js.map +1 -1
  158. package/lib/src/embed/liveboard.spec.js +114 -26
  159. package/lib/src/embed/liveboard.spec.js.map +1 -1
  160. package/lib/src/embed/pinboard.spec.js +1 -1
  161. package/lib/src/embed/pinboard.spec.js.map +1 -1
  162. package/lib/src/embed/sage.spec.js +2 -2
  163. package/lib/src/embed/sage.spec.js.map +1 -1
  164. package/lib/src/embed/search.spec.js +118 -2
  165. package/lib/src/embed/search.spec.js.map +1 -1
  166. package/lib/src/embed/ts-embed-trigger.spec.js +2 -3
  167. package/lib/src/embed/ts-embed-trigger.spec.js.map +1 -1
  168. package/lib/src/embed/ts-embed.d.ts +3 -2
  169. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  170. package/lib/src/embed/ts-embed.js +52 -18
  171. package/lib/src/embed/ts-embed.js.map +1 -1
  172. package/lib/src/embed/ts-embed.spec.d.ts.map +1 -1
  173. package/lib/src/embed/ts-embed.spec.js +336 -72
  174. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  175. package/lib/src/errors.d.ts +8 -0
  176. package/lib/src/errors.d.ts.map +1 -1
  177. package/lib/src/errors.js +8 -0
  178. package/lib/src/errors.js.map +1 -1
  179. package/lib/src/mixpanel-service.spec.js +1 -1
  180. package/lib/src/mixpanel-service.spec.js.map +1 -1
  181. package/lib/src/react/index.spec.js +3 -4
  182. package/lib/src/react/index.spec.js.map +1 -1
  183. package/lib/src/test/test-utils.js +1 -1
  184. package/lib/src/test/test-utils.js.map +1 -1
  185. package/lib/src/types.d.ts +194 -1
  186. package/lib/src/types.d.ts.map +1 -1
  187. package/lib/src/types.js +93 -1
  188. package/lib/src/types.js.map +1 -1
  189. package/lib/src/utils/authService/authService.spec.js +8 -8
  190. package/lib/src/utils/authService/authService.spec.js.map +1 -1
  191. package/lib/src/utils/authService/tokenizedAuthService.spec.js.map +1 -1
  192. package/lib/src/utils/graphql/answerService/answerService.spec.js +1 -1
  193. package/lib/src/utils/graphql/answerService/answerService.spec.js.map +1 -1
  194. package/lib/src/utils/graphql/graphql-request.spec.js +1 -1
  195. package/lib/src/utils/graphql/graphql-request.spec.js.map +1 -1
  196. package/lib/src/utils/graphql/sourceService.spec.js +1 -1
  197. package/lib/src/utils/graphql/sourceService.spec.js.map +1 -1
  198. package/lib/src/utils/logger.spec.d.ts +5 -20
  199. package/lib/src/utils/logger.spec.d.ts.map +1 -1
  200. package/lib/src/utils/processData.spec.js +17 -17
  201. package/lib/src/utils/processData.spec.js.map +1 -1
  202. package/lib/src/utils/processTrigger.spec.js +8 -8
  203. package/lib/src/utils/processTrigger.spec.js.map +1 -1
  204. package/lib/src/utils.d.ts +16 -3
  205. package/lib/src/utils.d.ts.map +1 -1
  206. package/lib/src/utils.js +57 -4
  207. package/lib/src/utils.js.map +1 -1
  208. package/lib/src/utils.spec.js +73 -11
  209. package/lib/src/utils.spec.js.map +1 -1
  210. package/package.json +6 -5
  211. package/src/api-intercept.spec.ts +23 -10
  212. package/src/api-intercept.ts +9 -4
  213. package/src/auth.spec.ts +53 -51
  214. package/src/authToken.spec.ts +3 -3
  215. package/src/embed/app.spec.ts +128 -7
  216. package/src/embed/app.ts +30 -4
  217. package/src/embed/base.spec.ts +95 -21
  218. package/src/embed/base.ts +5 -2
  219. package/src/embed/bodyless-conversation.spec.ts +2 -2
  220. package/src/embed/conversation.spec.ts +9 -4
  221. package/src/embed/conversation.ts +7 -2
  222. package/src/embed/embed.spec.ts +122 -2
  223. package/src/embed/events.spec.ts +2 -2
  224. package/src/embed/hostEventClient/host-event-client.spec.ts +2 -2
  225. package/src/embed/liveboard.spec.ts +137 -29
  226. package/src/embed/liveboard.ts +36 -6
  227. package/src/embed/pinboard.spec.ts +1 -1
  228. package/src/embed/sage.spec.ts +2 -2
  229. package/src/embed/search.spec.ts +133 -2
  230. package/src/embed/ts-embed-trigger.spec.ts +2 -3
  231. package/src/embed/ts-embed.spec.ts +424 -91
  232. package/src/embed/ts-embed.ts +56 -19
  233. package/src/errors.ts +8 -0
  234. package/src/mixpanel-service.spec.ts +1 -1
  235. package/src/react/index.spec.tsx +4 -5
  236. package/src/test/test-utils.ts +2 -2
  237. package/src/types.ts +206 -1
  238. package/src/utils/authService/authService.spec.ts +17 -17
  239. package/src/utils/authService/tokenizedAuthService.spec.ts +4 -4
  240. package/src/utils/graphql/answerService/answerService.spec.ts +3 -3
  241. package/src/utils/graphql/graphql-request.spec.ts +2 -2
  242. package/src/utils/graphql/sourceService.spec.ts +1 -1
  243. package/src/utils/processData.spec.ts +26 -26
  244. package/src/utils/processTrigger.spec.ts +8 -8
  245. package/src/utils.spec.ts +100 -11
  246. package/src/utils.ts +59 -7
@@ -1,4 +1,4 @@
1
- /* @thoughtspot/visual-embed-sdk version 1.44.1 */
1
+ /* @thoughtspot/visual-embed-sdk version 1.44.3 */
2
2
  'use client';
3
3
  function _mergeNamespaces(n, m) {
4
4
  m.forEach(function (e) {
@@ -596,6 +596,7 @@ var EmbedEvent;
596
596
  * SearchEmbed.on(EmbedEvent.Error, (error) => {
597
597
  * console.log(error);
598
598
  * // { type: "Error", data: { errorType: "API", error: { message: '...', error: '...' } } }
599
+ * // { errorType: "API", message: '...', code: '...' } new format
599
600
  * });
600
601
  * ```
601
602
  * @example
@@ -607,6 +608,7 @@ var EmbedEvent;
607
608
  * // message: "Fullscreen API is not enabled",
608
609
  * // stack: "..."
609
610
  * // } }}
611
+ * // { errorType: "FULLSCREEN", message: "Fullscreen API is not enabled", code: '...' } new format
610
612
  * })
611
613
  * ```
612
614
  */
@@ -762,7 +764,8 @@ var EmbedEvent;
762
764
  */
763
765
  EmbedEvent["ALL"] = "*";
764
766
  /**
765
- * Emitted when an Answer is saved in the app
767
+ * Emitted when an Answer is saved in the app.
768
+ * Use start:true to subscribe to when save is initiated, or end:true to subscribe to when save is completed. Default is end:true.
766
769
  * @Version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
767
770
  * @example
768
771
  *```js
@@ -797,6 +800,7 @@ var EmbedEvent;
797
800
  EmbedEvent["Download"] = "download";
798
801
  /**
799
802
  * Emitted when the download action is triggered on an Answer.
803
+ * Use start:true to subscribe to when download is initiated, or end:true to subscribe to when download is completed. Default is end:true.
800
804
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.0.sw
801
805
  * @example
802
806
  *```js
@@ -811,6 +815,7 @@ var EmbedEvent;
811
815
  EmbedEvent["DownloadAsPng"] = "downloadAsPng";
812
816
  /**
813
817
  * Emitted when the Download as PDF action is triggered on an Answer
818
+ * Use start:true to subscribe to when download as PDF is initiated, or end:true to subscribe to when download as PDF is completed. Default is end:true.
814
819
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
815
820
  * @example
816
821
  *```js
@@ -825,6 +830,7 @@ var EmbedEvent;
825
830
  EmbedEvent["DownloadAsPdf"] = "downloadAsPdf";
826
831
  /**
827
832
  * Emitted when the Download as CSV action is triggered on an Answer.
833
+ * Use start:true to subscribe to when download as CSV is initiated, or end:true to subscribe to when download as CSV is completed. Default is end:true.
828
834
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
829
835
  * @example
830
836
  *```js
@@ -839,6 +845,7 @@ var EmbedEvent;
839
845
  EmbedEvent["DownloadAsCsv"] = "downloadAsCsv";
840
846
  /**
841
847
  * Emitted when the Download as XLSX action is triggered on an Answer.
848
+ * Use start:true to subscribe to when download as XLSX is initiated, or end:true to subscribe to when download as XLSX is completed. Default is end:true.
842
849
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
843
850
  * @example
844
851
  *```js
@@ -853,6 +860,7 @@ var EmbedEvent;
853
860
  EmbedEvent["DownloadAsXlsx"] = "downloadAsXlsx";
854
861
  /**
855
862
  * Emitted when an Answer is deleted in the app
863
+ * Use start:true to subscribe to when delete is initiated, or end:true to subscribe to when delete is completed. Default is end:true.
856
864
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
857
865
  * @example
858
866
  *```js
@@ -879,6 +887,7 @@ var EmbedEvent;
879
887
  /**
880
888
  * Emitted when a user initiates the Pin action to
881
889
  * add an Answer to a Liveboard.
890
+ * Use start:true to subscribe to when pin is initiated, or end:true to subscribe to when pin is completed. Default is end:true.
882
891
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
883
892
  * @example
884
893
  *```js
@@ -992,6 +1001,7 @@ var EmbedEvent;
992
1001
  /**
993
1002
  * Emitted when the **Export TML** action is triggered on an
994
1003
  * an embedded object in the app
1004
+ * Use start:true to subscribe to when export is initiated, or end:true to subscribe to when export is completed. Default is end:true.
995
1005
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
996
1006
  * @example
997
1007
  *```js
@@ -1017,6 +1027,7 @@ var EmbedEvent;
1017
1027
  EmbedEvent["SaveAsView"] = "saveAsView";
1018
1028
  /**
1019
1029
  * Emitted when the user creates a copy of an Answer.
1030
+ * Use start:true to subscribe to when copy and edit is initiated, or end:true to subscribe to when copy and edit is completed. Default is end:true.
1020
1031
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1021
1032
  * @example
1022
1033
  *```js
@@ -3088,6 +3099,8 @@ var Param;
3088
3099
  Param["HideLiveboardHeader"] = "hideLiveboardHeader";
3089
3100
  Param["ShowLiveboardDescription"] = "showLiveboardDescription";
3090
3101
  Param["ShowLiveboardTitle"] = "showLiveboardTitle";
3102
+ Param["ShowMaskedFilterChip"] = "showMaskedFilterChip";
3103
+ Param["IsLiveboardMasterpiecesEnabled"] = "isLiveboardMasterpiecesEnabled";
3091
3104
  Param["HiddenTabs"] = "hideTabs";
3092
3105
  Param["VisibleTabs"] = "visibleTabs";
3093
3106
  Param["HideTabPanel"] = "hideTabPanel";
@@ -4621,6 +4634,85 @@ var LogLevel;
4621
4634
  */
4622
4635
  LogLevel["TRACE"] = "TRACE";
4623
4636
  })(LogLevel || (LogLevel = {}));
4637
+ /**
4638
+ * Error types emitted by embedded components.
4639
+ *
4640
+ * These enum values categorize different types of errors that can occur during
4641
+ * the lifecycle of an embedded ThoughtSpot component. Use these values to implement
4642
+ * specific error handling logic based on the error category.
4643
+ *
4644
+ * @see {@link EmbedErrorDetailsEvent} - The error event object structure
4645
+ * @see {@link EmbedEvent.Error} - The event that emits these errors
4646
+ * @version SDK: 1.44.2 | ThoughtSpot: 26.2.0.cl
4647
+ * @group Error Handling
4648
+ */
4649
+ var ErrorDetailsTypes;
4650
+ (function (ErrorDetailsTypes) {
4651
+ /** API call failure */
4652
+ ErrorDetailsTypes["API"] = "API";
4653
+ /** General validation error */
4654
+ ErrorDetailsTypes["VALIDATION_ERROR"] = "VALIDATION_ERROR";
4655
+ /** Network connectivity or request error */
4656
+ ErrorDetailsTypes["NETWORK"] = "NETWORK";
4657
+ })(ErrorDetailsTypes || (ErrorDetailsTypes = {}));
4658
+ /**
4659
+ * Specific error codes for embedded component errors.
4660
+ *
4661
+ * These codes provide granular identification of errors that occur in embedded components.
4662
+ * They are returned in the {@link EmbedErrorDetailsEvent.code} property and allow for
4663
+ * precise error handling and debugging.
4664
+ *
4665
+ * The codes are organized into categories:
4666
+ * - **Worksheet ID not found or does not exist**: Errors related to applying or updating filters
4667
+ * - **Liveboard ID missing**: Errors related to missing liveboard ID
4668
+ * - **Conflicting actions configuration**: Errors related to conflicting actions configuration
4669
+ * - **Conflicting tabs configuration**: Errors related to conflicting tabs configuration
4670
+ * - **Initialization error**: Errors related to initialization error
4671
+ * - **Network error**: Errors related to network error
4672
+ * - **Custom action validation**: Errors related to custom action validation
4673
+ * - **Login failed**: Errors related to login failed
4674
+ * - **Render not called**: Errors related to render not called
4675
+ * - **Host event type undefined or invalid**: Errors related to host event type undefined or invalid
4676
+ *
4677
+ * @version SDK: 1.44.2 | ThoughtSpot: 26.2.0.cl
4678
+ * @group Error Handling
4679
+ * @see {@link EmbedErrorDetailsEvent} - The error event object that includes these codes
4680
+ * @see {@link ErrorDetailsTypes} - General error type categories
4681
+ *
4682
+ * @example
4683
+ * Handle specific error codes
4684
+ *
4685
+ * embed.on(EmbedEvent.Error, (error) => {
4686
+ * if (error.code === EmbedErrorCodes.WORKSHEET_ID_NOT_FOUND) {
4687
+ * console.error('Worksheet ID not found:', error.message);
4688
+ * }
4689
+ * });
4690
+ * */
4691
+ var EmbedErrorCodes;
4692
+ (function (EmbedErrorCodes) {
4693
+ /** Worksheet ID not found or does not exist */
4694
+ EmbedErrorCodes["WORKSHEET_ID_NOT_FOUND"] = "WORKSHEET_ID_NOT_FOUND";
4695
+ /** Required Liveboard ID is missing from configuration */
4696
+ EmbedErrorCodes["LIVEBOARD_ID_MISSING"] = "LIVEBOARD_ID_MISSING";
4697
+ /** Conflicting action configuration detected (e.g., both hiddenActions and visibleActions specified) */
4698
+ EmbedErrorCodes["CONFLICTING_ACTIONS_CONFIG"] = "CONFLICTING_ACTIONS_CONFIG";
4699
+ /** Conflicting tab configuration detected (e.g., both hiddenTabs and visibleTabs specified) */
4700
+ EmbedErrorCodes["CONFLICTING_TABS_CONFIG"] = "CONFLICTING_TABS_CONFIG";
4701
+ /** Error during component initialization */
4702
+ EmbedErrorCodes["INIT_ERROR"] = "INIT_ERROR";
4703
+ /** Network connectivity or request error */
4704
+ EmbedErrorCodes["NETWORK_ERROR"] = "NETWORK_ERROR";
4705
+ /** Custom action validation failed */
4706
+ EmbedErrorCodes["CUSTOM_ACTION_VALIDATION"] = "CUSTOM_ACTION_VALIDATION";
4707
+ /** Authentication/login failed */
4708
+ EmbedErrorCodes["LOGIN_FAILED"] = "LOGIN_FAILED";
4709
+ /** Render method was not called before attempting to use the component */
4710
+ EmbedErrorCodes["RENDER_NOT_CALLED"] = "RENDER_NOT_CALLED";
4711
+ /** Host event type is undefined or invalid */
4712
+ EmbedErrorCodes["HOST_EVENT_TYPE_UNDEFINED"] = "HOST_EVENT_TYPE_UNDEFINED";
4713
+ /** Error parsing api intercept body */
4714
+ EmbedErrorCodes["PARSING_API_INTERCEPT_BODY_ERROR"] = "PARSING_API_INTERCEPT_BODY_ERROR";
4715
+ })(EmbedErrorCodes || (EmbedErrorCodes = {}));
4624
4716
  /**
4625
4717
  * Enum for the type of API intercepted
4626
4718
  */
@@ -4763,6 +4855,48 @@ merge.withOptions = (options, ...objects) => {
4763
4855
  return result;
4764
4856
  };
4765
4857
 
4858
+ const ERROR_MESSAGE = {
4859
+ INVALID_THOUGHTSPOT_HOST: 'Error parsing ThoughtSpot host. Please provide a valid URL.',
4860
+ SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND: 'Please select a Model to get started',
4861
+ LIVEBOARD_VIZ_ID_VALIDATION: 'Please select a Liveboard to embed.',
4862
+ TRIGGER_TIMED_OUT: 'Trigger timed-out in getting a response',
4863
+ SEARCHEMBED_BETA_WRANING_MESSAGE: 'SearchEmbed is in Beta in this release.',
4864
+ SAGE_EMBED_BETA_WARNING_MESSAGE: 'SageEmbed is in Beta in this release.',
4865
+ THIRD_PARTY_COOKIE_BLOCKED_ALERT: 'Third-party cookie access is blocked on this browser. Please allow third-party cookies for this to work properly. \nYou can use `suppressNoCookieAccessAlert` to suppress this message.',
4866
+ DUPLICATE_TOKEN_ERR: 'Duplicate token. Please issue a new token every time getAuthToken callback is called. See https://developers.thoughtspot.com/docs/?pageid=embed-auth#trusted-auth-embed for more details.',
4867
+ SDK_NOT_INITIALIZED: 'SDK not initialized',
4868
+ SESSION_INFO_FAILED: 'Failed to get session information',
4869
+ INVALID_TOKEN_ERROR: 'Received invalid token from getAuthToken callback or authToken endpoint.',
4870
+ INVALID_TOKEN_TYPE_ERROR: 'Expected getAuthToken to return a string, but received a {invalidType}.',
4871
+ MIXPANEL_TOKEN_NOT_FOUND: 'Mixpanel token not found in session info',
4872
+ PRERENDER_ID_MISSING: 'PreRender ID is required for preRender',
4873
+ SYNC_STYLE_CALLED_BEFORE_RENDER: 'PreRender should be called before using syncPreRenderStyle',
4874
+ CSP_VIOLATION_ALERT: 'CSP violation detected. Please check the console errors for more details.',
4875
+ CSP_FRAME_HOST_VIOLATION_LOG_MESSAGE: 'Please set up CSP correctly for the application to start working. For more information, see https://developers.thoughtspot.com/docs/security-settings#csp-viz-embed-hosts. \n If the issue persists, refer to https://developers.thoughtspot.com/docs/security-settings#csp-viz-embed-hosts',
4876
+ MISSING_REPORTING_OBSERVER: 'ReportingObserver not supported',
4877
+ RENDER_CALLED_BEFORE_INIT: 'Looks like render was called before calling init, the render won\'t start until init is called.\nFor more info check\n1. https://developers.thoughtspot.com/docs/Function_init#_init\n2.https://developers.thoughtspot.com/docs/getting-started#initSdk',
4878
+ SPOTTER_AGENT_NOT_INITIALIZED: 'SpotterAgent not initialized',
4879
+ OFFLINE_WARNING: 'Network not Detected. Embed is offline. Please reconnect and refresh',
4880
+ INIT_SDK_REQUIRED: 'You need to init the ThoughtSpot SDK module first',
4881
+ CONFLICTING_ACTIONS_CONFIG: 'You cannot have both hidden actions and visible actions',
4882
+ CONFLICTING_TABS_CONFIG: 'You cannot have both hidden Tabs and visible Tabs',
4883
+ RENDER_BEFORE_EVENTS_REQUIRED: 'Please call render before triggering events',
4884
+ HOST_EVENT_TYPE_UNDEFINED: 'Host event type is undefined',
4885
+ LOGIN_FAILED: 'Login failed',
4886
+ ERROR_PARSING_API_INTERCEPT_BODY: 'Error parsing api intercept body',
4887
+ SSR_ENVIRONMENT_ERROR: 'SSR environment detected. This function cannot be called in SSR environment.',
4888
+ };
4889
+ const CUSTOM_ACTIONS_ERROR_MESSAGE = {
4890
+ INVALID_ACTION_OBJECT: 'Custom Action Validation Error: Invalid action object provided',
4891
+ MISSING_REQUIRED_FIELDS: (id, missingFields) => `Custom Action Validation Error for '${id}': Missing required fields: ${missingFields.join(', ')}`,
4892
+ UNSUPPORTED_TARGET: (id, targetType) => `Custom Action Validation Error for '${id}': Target type '${targetType}' is not supported`,
4893
+ INVALID_POSITION: (position, targetType, supportedPositions) => `Position '${position}' is not supported for ${targetType.toLowerCase()}-level custom actions. Supported positions: ${supportedPositions}`,
4894
+ INVALID_METADATA_IDS: (targetType, invalidIds, supportedIds) => `Invalid metadata IDs for ${targetType.toLowerCase()}-level custom actions: ${invalidIds.join(', ')}. Supported metadata IDs: ${supportedIds}`,
4895
+ INVALID_DATA_MODEL_IDS: (targetType, invalidIds, supportedIds) => `Invalid data model IDs for ${targetType.toLowerCase()}-level custom actions: ${invalidIds.join(', ')}. Supported data model IDs: ${supportedIds}`,
4896
+ INVALID_FIELDS: (targetType, invalidFields, supportedFields) => `Invalid fields for ${targetType.toLowerCase()}-level custom actions: ${invalidFields.join(', ')}. Supported fields: ${supportedFields}`,
4897
+ DUPLICATE_IDS: (id, duplicateNames, keptName) => `Duplicate custom action ID '${id}' found. Actions with names '${duplicateNames.join("', '")}' will be ignored. Keeping '${keptName}'.`,
4898
+ };
4899
+
4766
4900
  /**
4767
4901
  * Copyright (c) 2023
4768
4902
  *
@@ -4863,6 +4997,36 @@ const getCssDimension = (value) => {
4863
4997
  }
4864
4998
  return value;
4865
4999
  };
5000
+ /**
5001
+ * Validates if a string is a valid CSS margin value.
5002
+ * @param value - The string to validate
5003
+ * @returns true if the value is a valid CSS margin value, false otherwise
5004
+ */
5005
+ const isValidCssMargin = (value) => {
5006
+ if (isUndefined$1(value)) {
5007
+ return false;
5008
+ }
5009
+ if (typeof value !== 'string') {
5010
+ logger$3.error('Please provide a valid lazyLoadingMargin value (e.g., "10px")');
5011
+ return false;
5012
+ }
5013
+ // This pattern allows for an optional negative sign, and numbers that can be integers or decimals (including leading dot).
5014
+ const cssUnitPattern = /^-?(\d+(\.\d*)?|\.\d+)(px|em|rem|%|vh|vw)$/i;
5015
+ const parts = value.trim().split(/\s+/);
5016
+ if (parts.length > 4) {
5017
+ logger$3.error('Please provide a valid lazyLoadingMargin value (e.g., "10px")');
5018
+ return false;
5019
+ }
5020
+ const isValid = parts.every(part => {
5021
+ const trimmedPart = part.trim();
5022
+ return trimmedPart.toLowerCase() === 'auto' || trimmedPart === '0' || cssUnitPattern.test(trimmedPart);
5023
+ });
5024
+ if (!isValid) {
5025
+ logger$3.error('Please provide a valid lazyLoadingMargin value (e.g., "10px")');
5026
+ return false;
5027
+ }
5028
+ return true;
5029
+ };
4866
5030
  const getSSOMarker = (markerId) => {
4867
5031
  const encStringToAppend = encodeURIComponent(markerId);
4868
5032
  return `tsSSOMarker=${encStringToAppend}`;
@@ -5053,6 +5217,8 @@ const sdkWindowKey = '_tsEmbedSDK';
5053
5217
  * @version SDK: 1.36.2 | ThoughtSpot: *
5054
5218
  */
5055
5219
  function storeValueInWindow(key, value, options = {}) {
5220
+ if (isWindowUndefined())
5221
+ return value;
5056
5222
  if (!window[sdkWindowKey]) {
5057
5223
  window[sdkWindowKey] = {};
5058
5224
  }
@@ -5063,11 +5229,16 @@ function storeValueInWindow(key, value, options = {}) {
5063
5229
  return value;
5064
5230
  }
5065
5231
  /**
5066
- * Retrieves a stored value from the global `window` object under the `_tsEmbedSDK` namespace.
5067
- * @param key - The key whose value needs to be retrieved.
5068
- * @returns The stored value or `undefined` if the key is not found.
5232
+ * Retrieves a stored value from the global
5233
+ * `window` object under the `_tsEmbedSDK` namespace.
5234
+ * Returns undefined in SSR environment.
5069
5235
  */
5070
- const getValueFromWindow = (key) => { var _a; return (_a = window === null || window === void 0 ? void 0 : window[sdkWindowKey]) === null || _a === void 0 ? void 0 : _a[key]; };
5236
+ const getValueFromWindow = (key) => {
5237
+ var _a;
5238
+ if (isWindowUndefined())
5239
+ return undefined;
5240
+ return (_a = window === null || window === void 0 ? void 0 : window[sdkWindowKey]) === null || _a === void 0 ? void 0 : _a[key];
5241
+ };
5071
5242
  /**
5072
5243
  * Check if an array includes a string value
5073
5244
  * @param arr - The array to check
@@ -5178,6 +5349,19 @@ const formatTemplate = (template, values) => {
5178
5349
  return template.replace(/\{(\w+)\}/g, (match, key) => {
5179
5350
  return values[key] !== undefined ? String(values[key]) : match;
5180
5351
  });
5352
+ };
5353
+ /**
5354
+ * Check if the window is undefined
5355
+ * If the window is undefined, it means the code is running in a SSR environment.
5356
+ * @returns true if the window is undefined, false otherwise
5357
+ *
5358
+ */
5359
+ const isWindowUndefined = () => {
5360
+ if (typeof window === 'undefined') {
5361
+ logger$3.error(ERROR_MESSAGE.SSR_ENVIRONMENT_ERROR);
5362
+ return true;
5363
+ }
5364
+ return false;
5181
5365
  };
5182
5366
 
5183
5367
  /**
@@ -7465,40 +7649,6 @@ var UIPassthroughEvent;
7465
7649
  UIPassthroughEvent["GetUnsavedAnswerTML"] = "getUnsavedAnswerTML";
7466
7650
  })(UIPassthroughEvent || (UIPassthroughEvent = {}));
7467
7651
 
7468
- const ERROR_MESSAGE = {
7469
- INVALID_THOUGHTSPOT_HOST: 'Error parsing ThoughtSpot host. Please provide a valid URL.',
7470
- SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND: 'Please select a Model to get started',
7471
- LIVEBOARD_VIZ_ID_VALIDATION: 'Please select a Liveboard to embed.',
7472
- TRIGGER_TIMED_OUT: 'Trigger timed-out in getting a response',
7473
- SEARCHEMBED_BETA_WRANING_MESSAGE: 'SearchEmbed is in Beta in this release.',
7474
- SAGE_EMBED_BETA_WARNING_MESSAGE: 'SageEmbed is in Beta in this release.',
7475
- THIRD_PARTY_COOKIE_BLOCKED_ALERT: 'Third-party cookie access is blocked on this browser. Please allow third-party cookies for this to work properly. \nYou can use `suppressNoCookieAccessAlert` to suppress this message.',
7476
- DUPLICATE_TOKEN_ERR: 'Duplicate token. Please issue a new token every time getAuthToken callback is called. See https://developers.thoughtspot.com/docs/?pageid=embed-auth#trusted-auth-embed for more details.',
7477
- SDK_NOT_INITIALIZED: 'SDK not initialized',
7478
- SESSION_INFO_FAILED: 'Failed to get session information',
7479
- INVALID_TOKEN_ERROR: 'Received invalid token from getAuthToken callback or authToken endpoint.',
7480
- INVALID_TOKEN_TYPE_ERROR: 'Expected getAuthToken to return a string, but received a {invalidType}.',
7481
- MIXPANEL_TOKEN_NOT_FOUND: 'Mixpanel token not found in session info',
7482
- PRERENDER_ID_MISSING: 'PreRender ID is required for preRender',
7483
- SYNC_STYLE_CALLED_BEFORE_RENDER: 'PreRender should be called before using syncPreRenderStyle',
7484
- CSP_VIOLATION_ALERT: 'CSP violation detected. Please check the console errors for more details.',
7485
- CSP_FRAME_HOST_VIOLATION_LOG_MESSAGE: 'Please set up CSP correctly for the application to start working. For more information, see https://developers.thoughtspot.com/docs/security-settings#csp-viz-embed-hosts. \n If the issue persists, refer to https://developers.thoughtspot.com/docs/security-settings#csp-viz-embed-hosts',
7486
- MISSING_REPORTING_OBSERVER: 'ReportingObserver not supported',
7487
- RENDER_CALLED_BEFORE_INIT: 'Looks like render was called before calling init, the render won\'t start until init is called.\nFor more info check\n1. https://developers.thoughtspot.com/docs/Function_init#_init\n2.https://developers.thoughtspot.com/docs/getting-started#initSdk',
7488
- SPOTTER_AGENT_NOT_INITIALIZED: 'SpotterAgent not initialized',
7489
- OFFLINE_WARNING: 'Network not Detected. Embed is offline. Please reconnect and refresh',
7490
- };
7491
- const CUSTOM_ACTIONS_ERROR_MESSAGE = {
7492
- INVALID_ACTION_OBJECT: 'Custom Action Validation Error: Invalid action object provided',
7493
- MISSING_REQUIRED_FIELDS: (id, missingFields) => `Custom Action Validation Error for '${id}': Missing required fields: ${missingFields.join(', ')}`,
7494
- UNSUPPORTED_TARGET: (id, targetType) => `Custom Action Validation Error for '${id}': Target type '${targetType}' is not supported`,
7495
- INVALID_POSITION: (position, targetType, supportedPositions) => `Position '${position}' is not supported for ${targetType.toLowerCase()}-level custom actions. Supported positions: ${supportedPositions}`,
7496
- INVALID_METADATA_IDS: (targetType, invalidIds, supportedIds) => `Invalid metadata IDs for ${targetType.toLowerCase()}-level custom actions: ${invalidIds.join(', ')}. Supported metadata IDs: ${supportedIds}`,
7497
- INVALID_DATA_MODEL_IDS: (targetType, invalidIds, supportedIds) => `Invalid data model IDs for ${targetType.toLowerCase()}-level custom actions: ${invalidIds.join(', ')}. Supported data model IDs: ${supportedIds}`,
7498
- INVALID_FIELDS: (targetType, invalidFields, supportedFields) => `Invalid fields for ${targetType.toLowerCase()}-level custom actions: ${invalidFields.join(', ')}. Supported fields: ${supportedFields}`,
7499
- DUPLICATE_IDS: (id, duplicateNames, keptName) => `Duplicate custom action ID '${id}' found. Actions with names '${duplicateNames.join("', '")}' will be ignored. Keeping '${keptName}'.`,
7500
- };
7501
-
7502
7652
  const EndPoints = {
7503
7653
  AUTH_VERIFICATION: '/callosum/v1/session/info',
7504
7654
  SESSION_INFO: '/callosum/v1/session/info',
@@ -8396,7 +8546,7 @@ class AnswerService {
8396
8546
  async getTML() {
8397
8547
  const { object } = await this.executeQuery(getAnswerTML, {});
8398
8548
  const edoc = object[0].edoc;
8399
- const YAML = await import('./index-BE9gGzRX.js');
8549
+ const YAML = await import('./index-D0n5LIka.js');
8400
8550
  const parsedDoc = YAML.parse(edoc);
8401
8551
  return {
8402
8552
  answer: {
@@ -17454,6 +17604,8 @@ function backwardCompat(embedConfig) {
17454
17604
  }
17455
17605
  const initFlagKey = 'initFlagKey';
17456
17606
  const createAndSetInitPromise = () => {
17607
+ if (isWindowUndefined())
17608
+ return;
17457
17609
  const { promise: initPromise, resolve: initPromiseResolve,
17458
17610
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
17459
17611
  // @ts-ignore
@@ -17493,6 +17645,8 @@ const getIsInitCalled = () => { var _a; return !!((_a = getValueFromWindow(initF
17493
17645
  */
17494
17646
  const init = (embedConfig) => {
17495
17647
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
17648
+ if (isWindowUndefined())
17649
+ return null;
17496
17650
  sanity(embedConfig);
17497
17651
  resetAllCachedServices();
17498
17652
  embedConfig = setEmbedConfig(backwardCompat({
@@ -17828,7 +17982,7 @@ function processEventData(type, eventData, thoughtSpotHost, containerEl) {
17828
17982
  return eventData;
17829
17983
  }
17830
17984
 
17831
- var name="@thoughtspot/visual-embed-sdk";var version$1="1.44.1";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 tsconfig.build.json --incremental false; tsc -p tsconfig.build.json --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle-generator --config ./dts-config/dts-bundle-file.config.js","bundle-dts":"dts-bundle-generator --config ./dts-config/dts-bundle.config.js","bundle-dts-react":"dts-bundle-generator --config ./dts-config/dts-bundle-react.config.js","bundle-dts-react-full":"dts-bundle-generator --config ./dts-config/dts-bundle-react-full.config.js",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.build.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 | npx coveralls-next","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={classnames:"^2.3.1",eventemitter3:"^4.0.7",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",yaml:"^2.5.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":"^11.2.0","@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/lodash":"^4.17.0","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^8.28.0","@typescript-eslint/parser":"^8.28.0",ajv:"^8.17.1",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1","coveralls-next":"^5.0.0",crypto:"^1.0.1","current-git-branch":"^1.1.0","dts-bundle-generator":"^9.5.1",eslint:"^9.23.0","eslint-config-airbnb-base":"^15.0.0","eslint-config-prettier":"^10.1.1","eslint-import-resolver-typescript":"^4.2.5","eslint-plugin-comment-length":"2.2.1","eslint-plugin-import":"^2.31.0","eslint-plugin-jsdoc":"^50.6.9","eslint-plugin-prettier":"^5.2.5","eslint-plugin-react":"^7.37.5","eslint-plugin-react-hooks":"^5.2.0","fs-extra":"^10.0.0","gh-pages":"6.3.0",globals:"^16.0.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^2.0.0",jest:"^26.6.3","jest-fetch-mock":"^3.0.3",jsdom:"^17.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:"4.24.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","typescript-eslint":"^8.29.1","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^6.3.5"};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$1,description:description,module:module,main:main,types:types,files:files,exports:exports,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.es.js",limit:"32 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};
17985
+ var name="@thoughtspot/visual-embed-sdk";var version$1="1.44.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={".":{"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 tsconfig.build.json --incremental false; tsc -p tsconfig.build.json --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle-generator --config ./dts-config/dts-bundle-file.config.js","bundle-dts":"dts-bundle-generator --config ./dts-config/dts-bundle.config.js","bundle-dts-react":"dts-bundle-generator --config ./dts-config/dts-bundle-react.config.js","bundle-dts-react-full":"dts-bundle-generator --config ./dts-config/dts-bundle-react-full.config.js",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.build.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 | npx coveralls-next","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={classnames:"^2.3.1",eventemitter3:"^4.0.7",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",yaml:"^2.5.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":"^11.2.0","@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":"^30.0.0","@types/lodash":"^4.17.0","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^8.28.0","@typescript-eslint/parser":"^8.28.0",ajv:"^8.17.1",asciidoctor:"^2.2.1","babel-jest":"^30.2.0","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1","coveralls-next":"^5.0.0",crypto:"^1.0.1","current-git-branch":"^1.1.0","dts-bundle-generator":"^9.5.1",eslint:"^9.23.0","eslint-config-airbnb-base":"^15.0.0","eslint-config-prettier":"^10.1.1","eslint-import-resolver-typescript":"^4.2.5","eslint-plugin-comment-length":"2.2.1","eslint-plugin-import":"^2.31.0","eslint-plugin-jsdoc":"^50.6.9","eslint-plugin-prettier":"^5.2.5","eslint-plugin-react":"^7.37.5","eslint-plugin-react-hooks":"^5.2.0","fs-extra":"^10.0.0","gh-pages":"6.3.0",globals:"^16.0.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^2.0.0",jest:"^30.2.0","jest-environment-jsdom":"^29.7.0","jest-fetch-mock":"^3.0.3",jsdom:"^17.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:"4.24.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^29.4.6","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","typescript-eslint":"^8.29.1","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^6.3.5"};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$1,description:description,module:module,main:main,types:types,files:files,exports:exports,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.es.js",limit:"32 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};
17832
17986
 
17833
17987
  class HostEventClient {
17834
17988
  constructor(iFrame) {
@@ -18026,9 +18180,13 @@ const handleInterceptEvent = async (params) => {
18026
18180
  const { eventData, executeEvent, viewConfig, getUnsavedAnswerTml } = params;
18027
18181
  const [interceptData, bodyParseError] = parseInterceptData(eventData.data);
18028
18182
  if (bodyParseError) {
18029
- executeEvent(EmbedEvent.Error, {
18030
- error: 'Error parsing api intercept body',
18031
- });
18183
+ const errorDetails = {
18184
+ errorType: ErrorDetailsTypes.API,
18185
+ message: ERROR_MESSAGE.ERROR_PARSING_API_INTERCEPT_BODY,
18186
+ code: EmbedErrorCodes.PARSING_API_INTERCEPT_BODY_ERROR,
18187
+ error: ERROR_MESSAGE.ERROR_PARSING_API_INTERCEPT_BODY,
18188
+ };
18189
+ executeEvent(EmbedEvent.Error, errorDetails);
18032
18190
  logger$3.error('Error parsing request body', bodyParseError);
18033
18191
  return;
18034
18192
  }
@@ -18340,19 +18498,23 @@ class TsEmbed {
18340
18498
  * Throws error encountered during initialization.
18341
18499
  */
18342
18500
  throwInitError() {
18343
- this.handleError('You need to init the ThoughtSpot SDK module first');
18501
+ this.handleError({
18502
+ errorType: ErrorDetailsTypes.VALIDATION_ERROR,
18503
+ message: ERROR_MESSAGE.INIT_SDK_REQUIRED,
18504
+ code: EmbedErrorCodes.INIT_ERROR,
18505
+ error: ERROR_MESSAGE.INIT_SDK_REQUIRED,
18506
+ });
18344
18507
  }
18345
18508
  /**
18346
18509
  * Handles errors within the SDK
18347
18510
  * @param error The error message or object
18511
+ * @param errorDetails The error details
18348
18512
  */
18349
- handleError(error) {
18513
+ handleError(errorDetails) {
18350
18514
  this.isError = true;
18351
- this.executeCallbacks(EmbedEvent.Error, {
18352
- error,
18353
- });
18515
+ this.executeCallbacks(EmbedEvent.Error, errorDetails);
18354
18516
  // Log error
18355
- logger$3.error(error);
18517
+ logger$3.error(errorDetails);
18356
18518
  }
18357
18519
  /**
18358
18520
  * Extracts the type field from the event payload
@@ -18431,11 +18593,14 @@ class TsEmbed {
18431
18593
  };
18432
18594
  window.addEventListener('online', onlineEventListener);
18433
18595
  const offlineEventListener = (e) => {
18434
- const offlineWarning = ERROR_MESSAGE.OFFLINE_WARNING;
18435
- this.executeCallbacks(EmbedEvent.Error, {
18436
- offlineWarning,
18437
- });
18438
- logger$3.warn(offlineWarning);
18596
+ const errorDetails = {
18597
+ errorType: ErrorDetailsTypes.NETWORK,
18598
+ message: ERROR_MESSAGE.OFFLINE_WARNING,
18599
+ code: EmbedErrorCodes.NETWORK_ERROR,
18600
+ offlineWarning: ERROR_MESSAGE.OFFLINE_WARNING,
18601
+ };
18602
+ this.executeCallbacks(EmbedEvent.Error, errorDetails);
18603
+ logger$3.warn(errorDetails);
18439
18604
  };
18440
18605
  window.addEventListener('offline', offlineEventListener);
18441
18606
  this.subscribedListeners.online = onlineEventListener;
@@ -18515,8 +18680,10 @@ class TsEmbed {
18515
18680
  ]);
18516
18681
  if (customActionsResult.errors.length > 0) {
18517
18682
  this.handleError({
18518
- type: 'CUSTOM_ACTION_VALIDATION',
18683
+ errorType: ErrorDetailsTypes.VALIDATION_ERROR,
18519
18684
  message: customActionsResult.errors,
18685
+ code: EmbedErrorCodes.CUSTOM_ACTION_VALIDATION,
18686
+ error: { type: EmbedErrorCodes.CUSTOM_ACTION_VALIDATION, message: customActionsResult.errors }
18520
18687
  });
18521
18688
  }
18522
18689
  const baseInitData = {
@@ -18613,11 +18780,21 @@ class TsEmbed {
18613
18780
  ...additionalFlagsFromView,
18614
18781
  };
18615
18782
  if (Array.isArray(visibleActions) && Array.isArray(hiddenActions)) {
18616
- this.handleError('You cannot have both hidden actions and visible actions');
18783
+ this.handleError({
18784
+ errorType: ErrorDetailsTypes.VALIDATION_ERROR,
18785
+ message: ERROR_MESSAGE.CONFLICTING_ACTIONS_CONFIG,
18786
+ code: EmbedErrorCodes.CONFLICTING_ACTIONS_CONFIG,
18787
+ error: ERROR_MESSAGE.CONFLICTING_ACTIONS_CONFIG,
18788
+ });
18617
18789
  return queryParams;
18618
18790
  }
18619
18791
  if (Array.isArray(visibleTabs) && Array.isArray(hiddenTabs)) {
18620
- this.handleError('You cannot have both hidden Tabs and visible Tabs');
18792
+ this.handleError({
18793
+ errorType: ErrorDetailsTypes.VALIDATION_ERROR,
18794
+ message: ERROR_MESSAGE.CONFLICTING_TABS_CONFIG,
18795
+ code: EmbedErrorCodes.CONFLICTING_TABS_CONFIG,
18796
+ error: ERROR_MESSAGE.CONFLICTING_TABS_CONFIG,
18797
+ });
18621
18798
  return queryParams;
18622
18799
  }
18623
18800
  if (primaryAction) {
@@ -18842,7 +19019,12 @@ class TsEmbed {
18842
19019
  error: JSON.stringify(error),
18843
19020
  });
18844
19021
  this.handleInsertionIntoDOM(this.embedConfig.loginFailedMessage);
18845
- this.handleError(error);
19022
+ this.handleError({
19023
+ errorType: ErrorDetailsTypes.API,
19024
+ message: error.message || ERROR_MESSAGE.LOGIN_FAILED,
19025
+ code: EmbedErrorCodes.LOGIN_FAILED,
19026
+ error: error,
19027
+ });
18846
19028
  });
18847
19029
  });
18848
19030
  }
@@ -19147,11 +19329,21 @@ class TsEmbed {
19147
19329
  async trigger(messageType, data = {}) {
19148
19330
  uploadMixpanelEvent(`${MIXPANEL_EVENT.VISUAL_SDK_TRIGGER}-${messageType}`);
19149
19331
  if (!this.isRendered) {
19150
- this.handleError('Please call render before triggering events');
19332
+ this.handleError({
19333
+ errorType: ErrorDetailsTypes.VALIDATION_ERROR,
19334
+ message: ERROR_MESSAGE.RENDER_BEFORE_EVENTS_REQUIRED,
19335
+ code: EmbedErrorCodes.RENDER_NOT_CALLED,
19336
+ error: ERROR_MESSAGE.RENDER_BEFORE_EVENTS_REQUIRED,
19337
+ });
19151
19338
  return null;
19152
19339
  }
19153
19340
  if (!messageType) {
19154
- this.handleError('Host event type is undefined');
19341
+ this.handleError({
19342
+ errorType: ErrorDetailsTypes.VALIDATION_ERROR,
19343
+ message: ERROR_MESSAGE.HOST_EVENT_TYPE_UNDEFINED,
19344
+ code: EmbedErrorCodes.HOST_EVENT_TYPE_UNDEFINED,
19345
+ error: ERROR_MESSAGE.HOST_EVENT_TYPE_UNDEFINED,
19346
+ });
19155
19347
  return null;
19156
19348
  }
19157
19349
  // Check if iframe exists before triggering -
@@ -19632,7 +19824,7 @@ class AppEmbed extends V1Embed {
19632
19824
  constructor(domSelector, viewConfig) {
19633
19825
  viewConfig.embedComponentType = 'AppEmbed';
19634
19826
  super(domSelector, viewConfig);
19635
- this.defaultHeight = '100%';
19827
+ this.defaultHeight = 500;
19636
19828
  this.sendFullHeightLazyLoadData = () => {
19637
19829
  const data = calculateVisibleElementData(this.iFrame);
19638
19830
  this.trigger(HostEvent.VisibleEmbedCoordinates, data);
@@ -19654,8 +19846,7 @@ class AppEmbed extends V1Embed {
19654
19846
  * @param data The event payload
19655
19847
  */
19656
19848
  this.updateIFrameHeight = (data) => {
19657
- var _a;
19658
- this.setIFrameHeight(Math.max(data.data, (_a = this.iFrame) === null || _a === void 0 ? void 0 : _a.scrollHeight));
19849
+ this.setIFrameHeight(Math.max(data.data, this.defaultHeight));
19659
19850
  this.sendFullHeightLazyLoadData();
19660
19851
  };
19661
19852
  this.embedIframeCenter = (data, responder) => {
@@ -19694,7 +19885,7 @@ class AppEmbed extends V1Embed {
19694
19885
  * embedded Liveboard or visualization.
19695
19886
  */
19696
19887
  getEmbedParams() {
19697
- const { tag, hideTagFilterChips, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideHamburger, hideObjectSearch, hideNotification, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 = true, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, hideHomepageLeftNav = false, modularHomeExperience = false, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, enable2ColumnLayout, enableCustomColumnGroups = false, dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, isEnhancedFilterInteractivityEnabled = false, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, discoveryExperience, coverAndFilterOptionInPDF = false, liveboardXLSXCSVDownload, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, isCentralizedLiveboardFilterUXEnabled = false, isLinkParametersEnabled, updatedSpotterChatPrompt, } = this.viewConfig;
19888
+ const { tag, hideTagFilterChips, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideHamburger, hideObjectSearch, hideNotification, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 = true, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, showMaskedFilterChip = false, isLiveboardMasterpiecesEnabled = false, hideHomepageLeftNav = false, modularHomeExperience = false, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, enable2ColumnLayout, enableCustomColumnGroups = false, dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, isEnhancedFilterInteractivityEnabled = false, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, discoveryExperience, coverAndFilterOptionInPDF = false, liveboardXLSXCSVDownload, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, isCentralizedLiveboardFilterUXEnabled = false, isLinkParametersEnabled, updatedSpotterChatPrompt, minimumHeight, } = this.viewConfig;
19698
19889
  let params = {};
19699
19890
  params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
19700
19891
  params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
@@ -19703,6 +19894,8 @@ class AppEmbed extends V1Embed {
19703
19894
  params[Param.HideLiveboardHeader] = hideLiveboardHeader;
19704
19895
  params[Param.ShowLiveboardTitle] = showLiveboardTitle;
19705
19896
  params[Param.ShowLiveboardDescription] = !!showLiveboardDescription;
19897
+ params[Param.ShowMaskedFilterChip] = showMaskedFilterChip;
19898
+ params[Param.IsLiveboardMasterpiecesEnabled] = isLiveboardMasterpiecesEnabled;
19706
19899
  params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
19707
19900
  params[Param.IsFullAppEmbed] = true;
19708
19901
  params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
@@ -19729,7 +19922,9 @@ class AppEmbed extends V1Embed {
19729
19922
  params[Param.fullHeight] = true;
19730
19923
  if (this.viewConfig.lazyLoadingForFullHeight) {
19731
19924
  params[Param.IsLazyLoadingForEmbedEnabled] = true;
19732
- params[Param.RootMarginForLazyLoad] = this.viewConfig.lazyLoadingMargin;
19925
+ if (isValidCssMargin(this.viewConfig.lazyLoadingMargin)) {
19926
+ params[Param.RootMarginForLazyLoad] = this.viewConfig.lazyLoadingMargin;
19927
+ }
19733
19928
  }
19734
19929
  }
19735
19930
  if (tag) {
@@ -19774,6 +19969,7 @@ class AppEmbed extends V1Embed {
19774
19969
  if (isCentralizedLiveboardFilterUXEnabled != undefined) {
19775
19970
  params[Param.isCentralizedLiveboardFilterUXEnabled] = isCentralizedLiveboardFilterUXEnabled;
19776
19971
  }
19972
+ this.defaultHeight = minimumHeight || this.defaultHeight;
19777
19973
  params[Param.DataPanelV2Enabled] = dataPanelV2;
19778
19974
  params[Param.HideHomepageLeftNav] = hideHomepageLeftNav;
19779
19975
  params[Param.ModularHomeExperienceEnabled] = modularHomeExperience;
@@ -20128,19 +20324,19 @@ class LiveboardEmbed extends V1Embed {
20128
20324
  getEmbedParamsObject() {
20129
20325
  let params = {};
20130
20326
  params = this.getBaseQueryParams(params);
20131
- const { enableVizTransformations, fullHeight, defaultHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, isEnhancedFilterInteractivityEnabled = false, enableAskSage, enable2ColumnLayout, dataPanelV2 = true, enableCustomColumnGroups = false, oAuthPollingInterval, isForceRedirect, dataSourceId, coverAndFilterOptionInPDF = false, liveboardXLSXCSVDownload, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, showSpotterLimitations, isCentralizedLiveboardFilterUXEnabled = false, isLinkParametersEnabled, updatedSpotterChatPrompt, } = this.viewConfig;
20327
+ const { enableVizTransformations, fullHeight, defaultHeight, minimumHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, showMaskedFilterChip = false, isLiveboardMasterpiecesEnabled = false, isEnhancedFilterInteractivityEnabled = false, enableAskSage, enable2ColumnLayout, dataPanelV2 = true, enableCustomColumnGroups = false, oAuthPollingInterval, isForceRedirect, dataSourceId, coverAndFilterOptionInPDF = false, liveboardXLSXCSVDownload, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, showSpotterLimitations, isCentralizedLiveboardFilterUXEnabled = false, isLinkParametersEnabled, updatedSpotterChatPrompt, } = this.viewConfig;
20132
20328
  const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
20133
20329
  || this.viewConfig.preventPinboardFilterRemoval;
20134
20330
  if (fullHeight === true) {
20135
20331
  params[Param.fullHeight] = true;
20136
20332
  if (this.viewConfig.lazyLoadingForFullHeight) {
20137
20333
  params[Param.IsLazyLoadingForEmbedEnabled] = true;
20138
- params[Param.RootMarginForLazyLoad] = this.viewConfig.lazyLoadingMargin;
20334
+ if (isValidCssMargin(this.viewConfig.lazyLoadingMargin)) {
20335
+ params[Param.RootMarginForLazyLoad] = this.viewConfig.lazyLoadingMargin;
20336
+ }
20139
20337
  }
20140
20338
  }
20141
- if (defaultHeight) {
20142
- this.defaultHeight = defaultHeight;
20143
- }
20339
+ this.defaultHeight = minimumHeight || defaultHeight || this.defaultHeight;
20144
20340
  if (enableVizTransformations !== undefined) {
20145
20341
  params[Param.EnableVizTransformations] = enableVizTransformations.toString();
20146
20342
  }
@@ -20207,6 +20403,8 @@ class LiveboardEmbed extends V1Embed {
20207
20403
  params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;
20208
20404
  params[Param.ShowLiveboardReverifyBanner] = showLiveboardReverifyBanner;
20209
20405
  params[Param.HideIrrelevantFiltersInTab] = hideIrrelevantChipsInLiveboardTabs;
20406
+ params[Param.ShowMaskedFilterChip] = showMaskedFilterChip;
20407
+ params[Param.IsLiveboardMasterpiecesEnabled] = isLiveboardMasterpiecesEnabled;
20210
20408
  params[Param.IsEnhancedFilterInteractivityEnabled] = isEnhancedFilterInteractivityEnabled;
20211
20409
  params[Param.DataPanelV2Enabled] = dataPanelV2;
20212
20410
  params[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
@@ -20238,7 +20436,12 @@ class LiveboardEmbed extends V1Embed {
20238
20436
  const { vizId, activeTabId } = this.viewConfig;
20239
20437
  const liveboardId = (_a = this.viewConfig.liveboardId) !== null && _a !== void 0 ? _a : this.viewConfig.pinboardId;
20240
20438
  if (!liveboardId) {
20241
- this.handleError(ERROR_MESSAGE.LIVEBOARD_VIZ_ID_VALIDATION);
20439
+ this.handleError({
20440
+ errorType: ErrorDetailsTypes.VALIDATION_ERROR,
20441
+ message: ERROR_MESSAGE.LIVEBOARD_VIZ_ID_VALIDATION,
20442
+ code: EmbedErrorCodes.LIVEBOARD_ID_MISSING,
20443
+ error: ERROR_MESSAGE.LIVEBOARD_VIZ_ID_VALIDATION,
20444
+ });
20242
20445
  }
20243
20446
  return `${this.getRootIframeSrc()}${this.getIframeSuffixSrc(liveboardId, vizId, activeTabId)}`;
20244
20447
  }
@@ -21202,7 +21405,12 @@ class SpotterEmbed extends TsEmbed {
21202
21405
  getEmbedParamsObject() {
21203
21406
  const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, enablePastConversationsSidebar, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, updatedSpotterChatPrompt, } = this.viewConfig;
21204
21407
  if (!worksheetId) {
21205
- this.handleError(ERROR_MESSAGE.SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND);
21408
+ this.handleError({
21409
+ errorType: ErrorDetailsTypes.VALIDATION_ERROR,
21410
+ message: ERROR_MESSAGE.SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND,
21411
+ code: EmbedErrorCodes.WORKSHEET_ID_NOT_FOUND,
21412
+ error: ERROR_MESSAGE.SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND,
21413
+ });
21206
21414
  }
21207
21415
  const queryParams = this.getBaseQueryParams();
21208
21416
  queryParams[Param.SpotterEnabled] = true;