@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
  import * as React from 'react';
4
4
  import React__default, { useRef, useCallback } from 'react';
@@ -764,6 +764,7 @@ var EmbedEvent;
764
764
  * SearchEmbed.on(EmbedEvent.Error, (error) => {
765
765
  * console.log(error);
766
766
  * // { type: "Error", data: { errorType: "API", error: { message: '...', error: '...' } } }
767
+ * // { errorType: "API", message: '...', code: '...' } new format
767
768
  * });
768
769
  * ```
769
770
  * @example
@@ -775,6 +776,7 @@ var EmbedEvent;
775
776
  * // message: "Fullscreen API is not enabled",
776
777
  * // stack: "..."
777
778
  * // } }}
779
+ * // { errorType: "FULLSCREEN", message: "Fullscreen API is not enabled", code: '...' } new format
778
780
  * })
779
781
  * ```
780
782
  */
@@ -930,7 +932,8 @@ var EmbedEvent;
930
932
  */
931
933
  EmbedEvent["ALL"] = "*";
932
934
  /**
933
- * Emitted when an Answer is saved in the app
935
+ * Emitted when an Answer is saved in the app.
936
+ * Use start:true to subscribe to when save is initiated, or end:true to subscribe to when save is completed. Default is end:true.
934
937
  * @Version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
935
938
  * @example
936
939
  *```js
@@ -965,6 +968,7 @@ var EmbedEvent;
965
968
  EmbedEvent["Download"] = "download";
966
969
  /**
967
970
  * Emitted when the download action is triggered on an Answer.
971
+ * Use start:true to subscribe to when download is initiated, or end:true to subscribe to when download is completed. Default is end:true.
968
972
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.0.sw
969
973
  * @example
970
974
  *```js
@@ -979,6 +983,7 @@ var EmbedEvent;
979
983
  EmbedEvent["DownloadAsPng"] = "downloadAsPng";
980
984
  /**
981
985
  * Emitted when the Download as PDF action is triggered on an Answer
986
+ * 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.
982
987
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
983
988
  * @example
984
989
  *```js
@@ -993,6 +998,7 @@ var EmbedEvent;
993
998
  EmbedEvent["DownloadAsPdf"] = "downloadAsPdf";
994
999
  /**
995
1000
  * Emitted when the Download as CSV action is triggered on an Answer.
1001
+ * 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.
996
1002
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
997
1003
  * @example
998
1004
  *```js
@@ -1007,6 +1013,7 @@ var EmbedEvent;
1007
1013
  EmbedEvent["DownloadAsCsv"] = "downloadAsCsv";
1008
1014
  /**
1009
1015
  * Emitted when the Download as XLSX action is triggered on an Answer.
1016
+ * 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.
1010
1017
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1011
1018
  * @example
1012
1019
  *```js
@@ -1021,6 +1028,7 @@ var EmbedEvent;
1021
1028
  EmbedEvent["DownloadAsXlsx"] = "downloadAsXlsx";
1022
1029
  /**
1023
1030
  * Emitted when an Answer is deleted in the app
1031
+ * Use start:true to subscribe to when delete is initiated, or end:true to subscribe to when delete is completed. Default is end:true.
1024
1032
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1025
1033
  * @example
1026
1034
  *```js
@@ -1047,6 +1055,7 @@ var EmbedEvent;
1047
1055
  /**
1048
1056
  * Emitted when a user initiates the Pin action to
1049
1057
  * add an Answer to a Liveboard.
1058
+ * Use start:true to subscribe to when pin is initiated, or end:true to subscribe to when pin is completed. Default is end:true.
1050
1059
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1051
1060
  * @example
1052
1061
  *```js
@@ -1160,6 +1169,7 @@ var EmbedEvent;
1160
1169
  /**
1161
1170
  * Emitted when the **Export TML** action is triggered on an
1162
1171
  * an embedded object in the app
1172
+ * Use start:true to subscribe to when export is initiated, or end:true to subscribe to when export is completed. Default is end:true.
1163
1173
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1164
1174
  * @example
1165
1175
  *```js
@@ -1185,6 +1195,7 @@ var EmbedEvent;
1185
1195
  EmbedEvent["SaveAsView"] = "saveAsView";
1186
1196
  /**
1187
1197
  * Emitted when the user creates a copy of an Answer.
1198
+ * 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.
1188
1199
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1189
1200
  * @example
1190
1201
  *```js
@@ -3256,6 +3267,8 @@ var Param;
3256
3267
  Param["HideLiveboardHeader"] = "hideLiveboardHeader";
3257
3268
  Param["ShowLiveboardDescription"] = "showLiveboardDescription";
3258
3269
  Param["ShowLiveboardTitle"] = "showLiveboardTitle";
3270
+ Param["ShowMaskedFilterChip"] = "showMaskedFilterChip";
3271
+ Param["IsLiveboardMasterpiecesEnabled"] = "isLiveboardMasterpiecesEnabled";
3259
3272
  Param["HiddenTabs"] = "hideTabs";
3260
3273
  Param["VisibleTabs"] = "visibleTabs";
3261
3274
  Param["HideTabPanel"] = "hideTabPanel";
@@ -4789,6 +4802,85 @@ var LogLevel;
4789
4802
  */
4790
4803
  LogLevel["TRACE"] = "TRACE";
4791
4804
  })(LogLevel || (LogLevel = {}));
4805
+ /**
4806
+ * Error types emitted by embedded components.
4807
+ *
4808
+ * These enum values categorize different types of errors that can occur during
4809
+ * the lifecycle of an embedded ThoughtSpot component. Use these values to implement
4810
+ * specific error handling logic based on the error category.
4811
+ *
4812
+ * @see {@link EmbedErrorDetailsEvent} - The error event object structure
4813
+ * @see {@link EmbedEvent.Error} - The event that emits these errors
4814
+ * @version SDK: 1.44.2 | ThoughtSpot: 26.2.0.cl
4815
+ * @group Error Handling
4816
+ */
4817
+ var ErrorDetailsTypes;
4818
+ (function (ErrorDetailsTypes) {
4819
+ /** API call failure */
4820
+ ErrorDetailsTypes["API"] = "API";
4821
+ /** General validation error */
4822
+ ErrorDetailsTypes["VALIDATION_ERROR"] = "VALIDATION_ERROR";
4823
+ /** Network connectivity or request error */
4824
+ ErrorDetailsTypes["NETWORK"] = "NETWORK";
4825
+ })(ErrorDetailsTypes || (ErrorDetailsTypes = {}));
4826
+ /**
4827
+ * Specific error codes for embedded component errors.
4828
+ *
4829
+ * These codes provide granular identification of errors that occur in embedded components.
4830
+ * They are returned in the {@link EmbedErrorDetailsEvent.code} property and allow for
4831
+ * precise error handling and debugging.
4832
+ *
4833
+ * The codes are organized into categories:
4834
+ * - **Worksheet ID not found or does not exist**: Errors related to applying or updating filters
4835
+ * - **Liveboard ID missing**: Errors related to missing liveboard ID
4836
+ * - **Conflicting actions configuration**: Errors related to conflicting actions configuration
4837
+ * - **Conflicting tabs configuration**: Errors related to conflicting tabs configuration
4838
+ * - **Initialization error**: Errors related to initialization error
4839
+ * - **Network error**: Errors related to network error
4840
+ * - **Custom action validation**: Errors related to custom action validation
4841
+ * - **Login failed**: Errors related to login failed
4842
+ * - **Render not called**: Errors related to render not called
4843
+ * - **Host event type undefined or invalid**: Errors related to host event type undefined or invalid
4844
+ *
4845
+ * @version SDK: 1.44.2 | ThoughtSpot: 26.2.0.cl
4846
+ * @group Error Handling
4847
+ * @see {@link EmbedErrorDetailsEvent} - The error event object that includes these codes
4848
+ * @see {@link ErrorDetailsTypes} - General error type categories
4849
+ *
4850
+ * @example
4851
+ * Handle specific error codes
4852
+ *
4853
+ * embed.on(EmbedEvent.Error, (error) => {
4854
+ * if (error.code === EmbedErrorCodes.WORKSHEET_ID_NOT_FOUND) {
4855
+ * console.error('Worksheet ID not found:', error.message);
4856
+ * }
4857
+ * });
4858
+ * */
4859
+ var EmbedErrorCodes;
4860
+ (function (EmbedErrorCodes) {
4861
+ /** Worksheet ID not found or does not exist */
4862
+ EmbedErrorCodes["WORKSHEET_ID_NOT_FOUND"] = "WORKSHEET_ID_NOT_FOUND";
4863
+ /** Required Liveboard ID is missing from configuration */
4864
+ EmbedErrorCodes["LIVEBOARD_ID_MISSING"] = "LIVEBOARD_ID_MISSING";
4865
+ /** Conflicting action configuration detected (e.g., both hiddenActions and visibleActions specified) */
4866
+ EmbedErrorCodes["CONFLICTING_ACTIONS_CONFIG"] = "CONFLICTING_ACTIONS_CONFIG";
4867
+ /** Conflicting tab configuration detected (e.g., both hiddenTabs and visibleTabs specified) */
4868
+ EmbedErrorCodes["CONFLICTING_TABS_CONFIG"] = "CONFLICTING_TABS_CONFIG";
4869
+ /** Error during component initialization */
4870
+ EmbedErrorCodes["INIT_ERROR"] = "INIT_ERROR";
4871
+ /** Network connectivity or request error */
4872
+ EmbedErrorCodes["NETWORK_ERROR"] = "NETWORK_ERROR";
4873
+ /** Custom action validation failed */
4874
+ EmbedErrorCodes["CUSTOM_ACTION_VALIDATION"] = "CUSTOM_ACTION_VALIDATION";
4875
+ /** Authentication/login failed */
4876
+ EmbedErrorCodes["LOGIN_FAILED"] = "LOGIN_FAILED";
4877
+ /** Render method was not called before attempting to use the component */
4878
+ EmbedErrorCodes["RENDER_NOT_CALLED"] = "RENDER_NOT_CALLED";
4879
+ /** Host event type is undefined or invalid */
4880
+ EmbedErrorCodes["HOST_EVENT_TYPE_UNDEFINED"] = "HOST_EVENT_TYPE_UNDEFINED";
4881
+ /** Error parsing api intercept body */
4882
+ EmbedErrorCodes["PARSING_API_INTERCEPT_BODY_ERROR"] = "PARSING_API_INTERCEPT_BODY_ERROR";
4883
+ })(EmbedErrorCodes || (EmbedErrorCodes = {}));
4792
4884
  /**
4793
4885
  * Enum for the type of API intercepted
4794
4886
  */
@@ -4878,6 +4970,48 @@ class Logger {
4878
4970
  }
4879
4971
  const logger$3 = new Logger();
4880
4972
 
4973
+ const ERROR_MESSAGE = {
4974
+ INVALID_THOUGHTSPOT_HOST: 'Error parsing ThoughtSpot host. Please provide a valid URL.',
4975
+ SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND: 'Please select a Model to get started',
4976
+ LIVEBOARD_VIZ_ID_VALIDATION: 'Please select a Liveboard to embed.',
4977
+ TRIGGER_TIMED_OUT: 'Trigger timed-out in getting a response',
4978
+ SEARCHEMBED_BETA_WRANING_MESSAGE: 'SearchEmbed is in Beta in this release.',
4979
+ SAGE_EMBED_BETA_WARNING_MESSAGE: 'SageEmbed is in Beta in this release.',
4980
+ 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.',
4981
+ 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.',
4982
+ SDK_NOT_INITIALIZED: 'SDK not initialized',
4983
+ SESSION_INFO_FAILED: 'Failed to get session information',
4984
+ INVALID_TOKEN_ERROR: 'Received invalid token from getAuthToken callback or authToken endpoint.',
4985
+ INVALID_TOKEN_TYPE_ERROR: 'Expected getAuthToken to return a string, but received a {invalidType}.',
4986
+ MIXPANEL_TOKEN_NOT_FOUND: 'Mixpanel token not found in session info',
4987
+ PRERENDER_ID_MISSING: 'PreRender ID is required for preRender',
4988
+ SYNC_STYLE_CALLED_BEFORE_RENDER: 'PreRender should be called before using syncPreRenderStyle',
4989
+ CSP_VIOLATION_ALERT: 'CSP violation detected. Please check the console errors for more details.',
4990
+ 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',
4991
+ MISSING_REPORTING_OBSERVER: 'ReportingObserver not supported',
4992
+ 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',
4993
+ SPOTTER_AGENT_NOT_INITIALIZED: 'SpotterAgent not initialized',
4994
+ OFFLINE_WARNING: 'Network not Detected. Embed is offline. Please reconnect and refresh',
4995
+ INIT_SDK_REQUIRED: 'You need to init the ThoughtSpot SDK module first',
4996
+ CONFLICTING_ACTIONS_CONFIG: 'You cannot have both hidden actions and visible actions',
4997
+ CONFLICTING_TABS_CONFIG: 'You cannot have both hidden Tabs and visible Tabs',
4998
+ RENDER_BEFORE_EVENTS_REQUIRED: 'Please call render before triggering events',
4999
+ HOST_EVENT_TYPE_UNDEFINED: 'Host event type is undefined',
5000
+ LOGIN_FAILED: 'Login failed',
5001
+ ERROR_PARSING_API_INTERCEPT_BODY: 'Error parsing api intercept body',
5002
+ SSR_ENVIRONMENT_ERROR: 'SSR environment detected. This function cannot be called in SSR environment.',
5003
+ };
5004
+ const CUSTOM_ACTIONS_ERROR_MESSAGE = {
5005
+ INVALID_ACTION_OBJECT: 'Custom Action Validation Error: Invalid action object provided',
5006
+ MISSING_REQUIRED_FIELDS: (id, missingFields) => `Custom Action Validation Error for '${id}': Missing required fields: ${missingFields.join(', ')}`,
5007
+ UNSUPPORTED_TARGET: (id, targetType) => `Custom Action Validation Error for '${id}': Target type '${targetType}' is not supported`,
5008
+ INVALID_POSITION: (position, targetType, supportedPositions) => `Position '${position}' is not supported for ${targetType.toLowerCase()}-level custom actions. Supported positions: ${supportedPositions}`,
5009
+ INVALID_METADATA_IDS: (targetType, invalidIds, supportedIds) => `Invalid metadata IDs for ${targetType.toLowerCase()}-level custom actions: ${invalidIds.join(', ')}. Supported metadata IDs: ${supportedIds}`,
5010
+ INVALID_DATA_MODEL_IDS: (targetType, invalidIds, supportedIds) => `Invalid data model IDs for ${targetType.toLowerCase()}-level custom actions: ${invalidIds.join(', ')}. Supported data model IDs: ${supportedIds}`,
5011
+ INVALID_FIELDS: (targetType, invalidFields, supportedFields) => `Invalid fields for ${targetType.toLowerCase()}-level custom actions: ${invalidFields.join(', ')}. Supported fields: ${supportedFields}`,
5012
+ DUPLICATE_IDS: (id, duplicateNames, keptName) => `Duplicate custom action ID '${id}' found. Actions with names '${duplicateNames.join("', '")}' will be ignored. Keeping '${keptName}'.`,
5013
+ };
5014
+
4881
5015
  /**
4882
5016
  * Copyright (c) 2023
4883
5017
  *
@@ -4978,6 +5112,36 @@ const getCssDimension = (value) => {
4978
5112
  }
4979
5113
  return value;
4980
5114
  };
5115
+ /**
5116
+ * Validates if a string is a valid CSS margin value.
5117
+ * @param value - The string to validate
5118
+ * @returns true if the value is a valid CSS margin value, false otherwise
5119
+ */
5120
+ const isValidCssMargin = (value) => {
5121
+ if (isUndefined$1(value)) {
5122
+ return false;
5123
+ }
5124
+ if (typeof value !== 'string') {
5125
+ logger$3.error('Please provide a valid lazyLoadingMargin value (e.g., "10px")');
5126
+ return false;
5127
+ }
5128
+ // This pattern allows for an optional negative sign, and numbers that can be integers or decimals (including leading dot).
5129
+ const cssUnitPattern = /^-?(\d+(\.\d*)?|\.\d+)(px|em|rem|%|vh|vw)$/i;
5130
+ const parts = value.trim().split(/\s+/);
5131
+ if (parts.length > 4) {
5132
+ logger$3.error('Please provide a valid lazyLoadingMargin value (e.g., "10px")');
5133
+ return false;
5134
+ }
5135
+ const isValid = parts.every(part => {
5136
+ const trimmedPart = part.trim();
5137
+ return trimmedPart.toLowerCase() === 'auto' || trimmedPart === '0' || cssUnitPattern.test(trimmedPart);
5138
+ });
5139
+ if (!isValid) {
5140
+ logger$3.error('Please provide a valid lazyLoadingMargin value (e.g., "10px")');
5141
+ return false;
5142
+ }
5143
+ return true;
5144
+ };
4981
5145
  const getSSOMarker = (markerId) => {
4982
5146
  const encStringToAppend = encodeURIComponent(markerId);
4983
5147
  return `tsSSOMarker=${encStringToAppend}`;
@@ -5168,6 +5332,8 @@ const sdkWindowKey = '_tsEmbedSDK';
5168
5332
  * @version SDK: 1.36.2 | ThoughtSpot: *
5169
5333
  */
5170
5334
  function storeValueInWindow(key, value, options = {}) {
5335
+ if (isWindowUndefined())
5336
+ return value;
5171
5337
  if (!window[sdkWindowKey]) {
5172
5338
  window[sdkWindowKey] = {};
5173
5339
  }
@@ -5178,11 +5344,16 @@ function storeValueInWindow(key, value, options = {}) {
5178
5344
  return value;
5179
5345
  }
5180
5346
  /**
5181
- * Retrieves a stored value from the global `window` object under the `_tsEmbedSDK` namespace.
5182
- * @param key - The key whose value needs to be retrieved.
5183
- * @returns The stored value or `undefined` if the key is not found.
5347
+ * Retrieves a stored value from the global
5348
+ * `window` object under the `_tsEmbedSDK` namespace.
5349
+ * Returns undefined in SSR environment.
5184
5350
  */
5185
- const getValueFromWindow = (key) => { var _a; return (_a = window === null || window === void 0 ? void 0 : window[sdkWindowKey]) === null || _a === void 0 ? void 0 : _a[key]; };
5351
+ const getValueFromWindow = (key) => {
5352
+ var _a;
5353
+ if (isWindowUndefined())
5354
+ return undefined;
5355
+ return (_a = window === null || window === void 0 ? void 0 : window[sdkWindowKey]) === null || _a === void 0 ? void 0 : _a[key];
5356
+ };
5186
5357
  /**
5187
5358
  * Check if an array includes a string value
5188
5359
  * @param arr - The array to check
@@ -5293,6 +5464,19 @@ const formatTemplate = (template, values) => {
5293
5464
  return template.replace(/\{(\w+)\}/g, (match, key) => {
5294
5465
  return values[key] !== undefined ? String(values[key]) : match;
5295
5466
  });
5467
+ };
5468
+ /**
5469
+ * Check if the window is undefined
5470
+ * If the window is undefined, it means the code is running in a SSR environment.
5471
+ * @returns true if the window is undefined, false otherwise
5472
+ *
5473
+ */
5474
+ const isWindowUndefined = () => {
5475
+ if (typeof window === 'undefined') {
5476
+ logger$3.error(ERROR_MESSAGE.SSR_ENVIRONMENT_ERROR);
5477
+ return true;
5478
+ }
5479
+ return false;
5296
5480
  };
5297
5481
 
5298
5482
  /**
@@ -7580,40 +7764,6 @@ var UIPassthroughEvent;
7580
7764
  UIPassthroughEvent["GetUnsavedAnswerTML"] = "getUnsavedAnswerTML";
7581
7765
  })(UIPassthroughEvent || (UIPassthroughEvent = {}));
7582
7766
 
7583
- const ERROR_MESSAGE = {
7584
- INVALID_THOUGHTSPOT_HOST: 'Error parsing ThoughtSpot host. Please provide a valid URL.',
7585
- SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND: 'Please select a Model to get started',
7586
- LIVEBOARD_VIZ_ID_VALIDATION: 'Please select a Liveboard to embed.',
7587
- TRIGGER_TIMED_OUT: 'Trigger timed-out in getting a response',
7588
- SEARCHEMBED_BETA_WRANING_MESSAGE: 'SearchEmbed is in Beta in this release.',
7589
- SAGE_EMBED_BETA_WARNING_MESSAGE: 'SageEmbed is in Beta in this release.',
7590
- 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.',
7591
- 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.',
7592
- SDK_NOT_INITIALIZED: 'SDK not initialized',
7593
- SESSION_INFO_FAILED: 'Failed to get session information',
7594
- INVALID_TOKEN_ERROR: 'Received invalid token from getAuthToken callback or authToken endpoint.',
7595
- INVALID_TOKEN_TYPE_ERROR: 'Expected getAuthToken to return a string, but received a {invalidType}.',
7596
- MIXPANEL_TOKEN_NOT_FOUND: 'Mixpanel token not found in session info',
7597
- PRERENDER_ID_MISSING: 'PreRender ID is required for preRender',
7598
- SYNC_STYLE_CALLED_BEFORE_RENDER: 'PreRender should be called before using syncPreRenderStyle',
7599
- CSP_VIOLATION_ALERT: 'CSP violation detected. Please check the console errors for more details.',
7600
- 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',
7601
- MISSING_REPORTING_OBSERVER: 'ReportingObserver not supported',
7602
- 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',
7603
- SPOTTER_AGENT_NOT_INITIALIZED: 'SpotterAgent not initialized',
7604
- OFFLINE_WARNING: 'Network not Detected. Embed is offline. Please reconnect and refresh',
7605
- };
7606
- const CUSTOM_ACTIONS_ERROR_MESSAGE = {
7607
- INVALID_ACTION_OBJECT: 'Custom Action Validation Error: Invalid action object provided',
7608
- MISSING_REQUIRED_FIELDS: (id, missingFields) => `Custom Action Validation Error for '${id}': Missing required fields: ${missingFields.join(', ')}`,
7609
- UNSUPPORTED_TARGET: (id, targetType) => `Custom Action Validation Error for '${id}': Target type '${targetType}' is not supported`,
7610
- INVALID_POSITION: (position, targetType, supportedPositions) => `Position '${position}' is not supported for ${targetType.toLowerCase()}-level custom actions. Supported positions: ${supportedPositions}`,
7611
- INVALID_METADATA_IDS: (targetType, invalidIds, supportedIds) => `Invalid metadata IDs for ${targetType.toLowerCase()}-level custom actions: ${invalidIds.join(', ')}. Supported metadata IDs: ${supportedIds}`,
7612
- INVALID_DATA_MODEL_IDS: (targetType, invalidIds, supportedIds) => `Invalid data model IDs for ${targetType.toLowerCase()}-level custom actions: ${invalidIds.join(', ')}. Supported data model IDs: ${supportedIds}`,
7613
- INVALID_FIELDS: (targetType, invalidFields, supportedFields) => `Invalid fields for ${targetType.toLowerCase()}-level custom actions: ${invalidFields.join(', ')}. Supported fields: ${supportedFields}`,
7614
- DUPLICATE_IDS: (id, duplicateNames, keptName) => `Duplicate custom action ID '${id}' found. Actions with names '${duplicateNames.join("', '")}' will be ignored. Keeping '${keptName}'.`,
7615
- };
7616
-
7617
7767
  const EndPoints = {
7618
7768
  AUTH_VERIFICATION: '/callosum/v1/session/info',
7619
7769
  SESSION_INFO: '/callosum/v1/session/info',
@@ -8511,7 +8661,7 @@ class AnswerService {
8511
8661
  async getTML() {
8512
8662
  const { object } = await this.executeQuery(getAnswerTML, {});
8513
8663
  const edoc = object[0].edoc;
8514
- const YAML = await import('./index-BE9gGzRX.js');
8664
+ const YAML = await import('./index-D0n5LIka.js');
8515
8665
  const parsedDoc = YAML.parse(edoc);
8516
8666
  return {
8517
8667
  answer: {
@@ -17543,6 +17693,8 @@ function backwardCompat(embedConfig) {
17543
17693
  }
17544
17694
  const initFlagKey = 'initFlagKey';
17545
17695
  const createAndSetInitPromise = () => {
17696
+ if (isWindowUndefined())
17697
+ return;
17546
17698
  const { promise: initPromise, resolve: initPromiseResolve,
17547
17699
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
17548
17700
  // @ts-ignore
@@ -17582,6 +17734,8 @@ const getIsInitCalled = () => { var _a; return !!((_a = getValueFromWindow(initF
17582
17734
  */
17583
17735
  const init = (embedConfig) => {
17584
17736
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
17737
+ if (isWindowUndefined())
17738
+ return null;
17585
17739
  sanity(embedConfig);
17586
17740
  resetAllCachedServices();
17587
17741
  embedConfig = setEmbedConfig(backwardCompat({
@@ -17764,7 +17918,7 @@ function processEventData(type, eventData, thoughtSpotHost, containerEl) {
17764
17918
  return eventData;
17765
17919
  }
17766
17920
 
17767
- 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};
17921
+ 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};
17768
17922
 
17769
17923
  class HostEventClient {
17770
17924
  constructor(iFrame) {
@@ -17962,9 +18116,13 @@ const handleInterceptEvent = async (params) => {
17962
18116
  const { eventData, executeEvent, viewConfig, getUnsavedAnswerTml } = params;
17963
18117
  const [interceptData, bodyParseError] = parseInterceptData(eventData.data);
17964
18118
  if (bodyParseError) {
17965
- executeEvent(EmbedEvent.Error, {
17966
- error: 'Error parsing api intercept body',
17967
- });
18119
+ const errorDetails = {
18120
+ errorType: ErrorDetailsTypes.API,
18121
+ message: ERROR_MESSAGE.ERROR_PARSING_API_INTERCEPT_BODY,
18122
+ code: EmbedErrorCodes.PARSING_API_INTERCEPT_BODY_ERROR,
18123
+ error: ERROR_MESSAGE.ERROR_PARSING_API_INTERCEPT_BODY,
18124
+ };
18125
+ executeEvent(EmbedEvent.Error, errorDetails);
17968
18126
  logger$3.error('Error parsing request body', bodyParseError);
17969
18127
  return;
17970
18128
  }
@@ -18276,19 +18434,23 @@ class TsEmbed {
18276
18434
  * Throws error encountered during initialization.
18277
18435
  */
18278
18436
  throwInitError() {
18279
- this.handleError('You need to init the ThoughtSpot SDK module first');
18437
+ this.handleError({
18438
+ errorType: ErrorDetailsTypes.VALIDATION_ERROR,
18439
+ message: ERROR_MESSAGE.INIT_SDK_REQUIRED,
18440
+ code: EmbedErrorCodes.INIT_ERROR,
18441
+ error: ERROR_MESSAGE.INIT_SDK_REQUIRED,
18442
+ });
18280
18443
  }
18281
18444
  /**
18282
18445
  * Handles errors within the SDK
18283
18446
  * @param error The error message or object
18447
+ * @param errorDetails The error details
18284
18448
  */
18285
- handleError(error) {
18449
+ handleError(errorDetails) {
18286
18450
  this.isError = true;
18287
- this.executeCallbacks(EmbedEvent.Error, {
18288
- error,
18289
- });
18451
+ this.executeCallbacks(EmbedEvent.Error, errorDetails);
18290
18452
  // Log error
18291
- logger$3.error(error);
18453
+ logger$3.error(errorDetails);
18292
18454
  }
18293
18455
  /**
18294
18456
  * Extracts the type field from the event payload
@@ -18367,11 +18529,14 @@ class TsEmbed {
18367
18529
  };
18368
18530
  window.addEventListener('online', onlineEventListener);
18369
18531
  const offlineEventListener = (e) => {
18370
- const offlineWarning = ERROR_MESSAGE.OFFLINE_WARNING;
18371
- this.executeCallbacks(EmbedEvent.Error, {
18372
- offlineWarning,
18373
- });
18374
- logger$3.warn(offlineWarning);
18532
+ const errorDetails = {
18533
+ errorType: ErrorDetailsTypes.NETWORK,
18534
+ message: ERROR_MESSAGE.OFFLINE_WARNING,
18535
+ code: EmbedErrorCodes.NETWORK_ERROR,
18536
+ offlineWarning: ERROR_MESSAGE.OFFLINE_WARNING,
18537
+ };
18538
+ this.executeCallbacks(EmbedEvent.Error, errorDetails);
18539
+ logger$3.warn(errorDetails);
18375
18540
  };
18376
18541
  window.addEventListener('offline', offlineEventListener);
18377
18542
  this.subscribedListeners.online = onlineEventListener;
@@ -18451,8 +18616,10 @@ class TsEmbed {
18451
18616
  ]);
18452
18617
  if (customActionsResult.errors.length > 0) {
18453
18618
  this.handleError({
18454
- type: 'CUSTOM_ACTION_VALIDATION',
18619
+ errorType: ErrorDetailsTypes.VALIDATION_ERROR,
18455
18620
  message: customActionsResult.errors,
18621
+ code: EmbedErrorCodes.CUSTOM_ACTION_VALIDATION,
18622
+ error: { type: EmbedErrorCodes.CUSTOM_ACTION_VALIDATION, message: customActionsResult.errors }
18456
18623
  });
18457
18624
  }
18458
18625
  const baseInitData = {
@@ -18549,11 +18716,21 @@ class TsEmbed {
18549
18716
  ...additionalFlagsFromView,
18550
18717
  };
18551
18718
  if (Array.isArray(visibleActions) && Array.isArray(hiddenActions)) {
18552
- this.handleError('You cannot have both hidden actions and visible actions');
18719
+ this.handleError({
18720
+ errorType: ErrorDetailsTypes.VALIDATION_ERROR,
18721
+ message: ERROR_MESSAGE.CONFLICTING_ACTIONS_CONFIG,
18722
+ code: EmbedErrorCodes.CONFLICTING_ACTIONS_CONFIG,
18723
+ error: ERROR_MESSAGE.CONFLICTING_ACTIONS_CONFIG,
18724
+ });
18553
18725
  return queryParams;
18554
18726
  }
18555
18727
  if (Array.isArray(visibleTabs) && Array.isArray(hiddenTabs)) {
18556
- this.handleError('You cannot have both hidden Tabs and visible Tabs');
18728
+ this.handleError({
18729
+ errorType: ErrorDetailsTypes.VALIDATION_ERROR,
18730
+ message: ERROR_MESSAGE.CONFLICTING_TABS_CONFIG,
18731
+ code: EmbedErrorCodes.CONFLICTING_TABS_CONFIG,
18732
+ error: ERROR_MESSAGE.CONFLICTING_TABS_CONFIG,
18733
+ });
18557
18734
  return queryParams;
18558
18735
  }
18559
18736
  if (primaryAction) {
@@ -18778,7 +18955,12 @@ class TsEmbed {
18778
18955
  error: JSON.stringify(error),
18779
18956
  });
18780
18957
  this.handleInsertionIntoDOM(this.embedConfig.loginFailedMessage);
18781
- this.handleError(error);
18958
+ this.handleError({
18959
+ errorType: ErrorDetailsTypes.API,
18960
+ message: error.message || ERROR_MESSAGE.LOGIN_FAILED,
18961
+ code: EmbedErrorCodes.LOGIN_FAILED,
18962
+ error: error,
18963
+ });
18782
18964
  });
18783
18965
  });
18784
18966
  }
@@ -19083,11 +19265,21 @@ class TsEmbed {
19083
19265
  async trigger(messageType, data = {}) {
19084
19266
  uploadMixpanelEvent(`${MIXPANEL_EVENT.VISUAL_SDK_TRIGGER}-${messageType}`);
19085
19267
  if (!this.isRendered) {
19086
- this.handleError('Please call render before triggering events');
19268
+ this.handleError({
19269
+ errorType: ErrorDetailsTypes.VALIDATION_ERROR,
19270
+ message: ERROR_MESSAGE.RENDER_BEFORE_EVENTS_REQUIRED,
19271
+ code: EmbedErrorCodes.RENDER_NOT_CALLED,
19272
+ error: ERROR_MESSAGE.RENDER_BEFORE_EVENTS_REQUIRED,
19273
+ });
19087
19274
  return null;
19088
19275
  }
19089
19276
  if (!messageType) {
19090
- this.handleError('Host event type is undefined');
19277
+ this.handleError({
19278
+ errorType: ErrorDetailsTypes.VALIDATION_ERROR,
19279
+ message: ERROR_MESSAGE.HOST_EVENT_TYPE_UNDEFINED,
19280
+ code: EmbedErrorCodes.HOST_EVENT_TYPE_UNDEFINED,
19281
+ error: ERROR_MESSAGE.HOST_EVENT_TYPE_UNDEFINED,
19282
+ });
19091
19283
  return null;
19092
19284
  }
19093
19285
  // Check if iframe exists before triggering -
@@ -19900,7 +20092,7 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
19900
20092
  constructor(domSelector, viewConfig) {
19901
20093
  viewConfig.embedComponentType = 'AppEmbed';
19902
20094
  super(domSelector, viewConfig);
19903
- this.defaultHeight = '100%';
20095
+ this.defaultHeight = 500;
19904
20096
  this.sendFullHeightLazyLoadData = () => {
19905
20097
  const data = calculateVisibleElementData(this.iFrame);
19906
20098
  this.trigger(HostEvent.VisibleEmbedCoordinates, data);
@@ -19922,8 +20114,7 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
19922
20114
  * @param data The event payload
19923
20115
  */
19924
20116
  this.updateIFrameHeight = (data) => {
19925
- var _a;
19926
- this.setIFrameHeight(Math.max(data.data, (_a = this.iFrame) === null || _a === void 0 ? void 0 : _a.scrollHeight));
20117
+ this.setIFrameHeight(Math.max(data.data, this.defaultHeight));
19927
20118
  this.sendFullHeightLazyLoadData();
19928
20119
  };
19929
20120
  this.embedIframeCenter = (data, responder) => {
@@ -19962,7 +20153,7 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
19962
20153
  * embedded Liveboard or visualization.
19963
20154
  */
19964
20155
  getEmbedParams() {
19965
- 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.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;
20156
+ 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.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;
19966
20157
  let params = {};
19967
20158
  params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
19968
20159
  params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
@@ -19971,6 +20162,8 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
19971
20162
  params[Param.HideLiveboardHeader] = hideLiveboardHeader;
19972
20163
  params[Param.ShowLiveboardTitle] = showLiveboardTitle;
19973
20164
  params[Param.ShowLiveboardDescription] = !!showLiveboardDescription;
20165
+ params[Param.ShowMaskedFilterChip] = showMaskedFilterChip;
20166
+ params[Param.IsLiveboardMasterpiecesEnabled] = isLiveboardMasterpiecesEnabled;
19974
20167
  params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
19975
20168
  params[Param.IsFullAppEmbed] = true;
19976
20169
  params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
@@ -19997,7 +20190,9 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
19997
20190
  params[Param.fullHeight] = true;
19998
20191
  if (this.viewConfig.lazyLoadingForFullHeight) {
19999
20192
  params[Param.IsLazyLoadingForEmbedEnabled] = true;
20000
- params[Param.RootMarginForLazyLoad] = this.viewConfig.lazyLoadingMargin;
20193
+ if (isValidCssMargin(this.viewConfig.lazyLoadingMargin)) {
20194
+ params[Param.RootMarginForLazyLoad] = this.viewConfig.lazyLoadingMargin;
20195
+ }
20001
20196
  }
20002
20197
  }
20003
20198
  if (tag) {
@@ -20042,6 +20237,7 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
20042
20237
  if (isCentralizedLiveboardFilterUXEnabled != undefined) {
20043
20238
  params[Param.isCentralizedLiveboardFilterUXEnabled] = isCentralizedLiveboardFilterUXEnabled;
20044
20239
  }
20240
+ this.defaultHeight = minimumHeight || this.defaultHeight;
20045
20241
  params[Param.DataPanelV2Enabled] = dataPanelV2;
20046
20242
  params[Param.HideHomepageLeftNav] = hideHomepageLeftNav;
20047
20243
  params[Param.ModularHomeExperienceEnabled] = modularHomeExperience;
@@ -20396,19 +20592,19 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
20396
20592
  getEmbedParamsObject() {
20397
20593
  let params = {};
20398
20594
  params = this.getBaseQueryParams(params);
20399
- 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;
20595
+ 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;
20400
20596
  const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
20401
20597
  || this.viewConfig.preventPinboardFilterRemoval;
20402
20598
  if (fullHeight === true) {
20403
20599
  params[Param.fullHeight] = true;
20404
20600
  if (this.viewConfig.lazyLoadingForFullHeight) {
20405
20601
  params[Param.IsLazyLoadingForEmbedEnabled] = true;
20406
- params[Param.RootMarginForLazyLoad] = this.viewConfig.lazyLoadingMargin;
20602
+ if (isValidCssMargin(this.viewConfig.lazyLoadingMargin)) {
20603
+ params[Param.RootMarginForLazyLoad] = this.viewConfig.lazyLoadingMargin;
20604
+ }
20407
20605
  }
20408
20606
  }
20409
- if (defaultHeight) {
20410
- this.defaultHeight = defaultHeight;
20411
- }
20607
+ this.defaultHeight = minimumHeight || defaultHeight || this.defaultHeight;
20412
20608
  if (enableVizTransformations !== undefined) {
20413
20609
  params[Param.EnableVizTransformations] = enableVizTransformations.toString();
20414
20610
  }
@@ -20475,6 +20671,8 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
20475
20671
  params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;
20476
20672
  params[Param.ShowLiveboardReverifyBanner] = showLiveboardReverifyBanner;
20477
20673
  params[Param.HideIrrelevantFiltersInTab] = hideIrrelevantChipsInLiveboardTabs;
20674
+ params[Param.ShowMaskedFilterChip] = showMaskedFilterChip;
20675
+ params[Param.IsLiveboardMasterpiecesEnabled] = isLiveboardMasterpiecesEnabled;
20478
20676
  params[Param.IsEnhancedFilterInteractivityEnabled] = isEnhancedFilterInteractivityEnabled;
20479
20677
  params[Param.DataPanelV2Enabled] = dataPanelV2;
20480
20678
  params[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
@@ -20506,7 +20704,12 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
20506
20704
  const { vizId, activeTabId } = this.viewConfig;
20507
20705
  const liveboardId = (_a = this.viewConfig.liveboardId) !== null && _a !== void 0 ? _a : this.viewConfig.pinboardId;
20508
20706
  if (!liveboardId) {
20509
- this.handleError(ERROR_MESSAGE.LIVEBOARD_VIZ_ID_VALIDATION);
20707
+ this.handleError({
20708
+ errorType: ErrorDetailsTypes.VALIDATION_ERROR,
20709
+ message: ERROR_MESSAGE.LIVEBOARD_VIZ_ID_VALIDATION,
20710
+ code: EmbedErrorCodes.LIVEBOARD_ID_MISSING,
20711
+ error: ERROR_MESSAGE.LIVEBOARD_VIZ_ID_VALIDATION,
20712
+ });
20510
20713
  }
20511
20714
  return `${this.getRootIframeSrc()}${this.getIframeSuffixSrc(liveboardId, vizId, activeTabId)}`;
20512
20715
  }
@@ -21210,7 +21413,12 @@ let SpotterEmbed$1 = class SpotterEmbed extends TsEmbed {
21210
21413
  getEmbedParamsObject() {
21211
21414
  const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, enablePastConversationsSidebar, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, updatedSpotterChatPrompt, } = this.viewConfig;
21212
21415
  if (!worksheetId) {
21213
- this.handleError(ERROR_MESSAGE.SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND);
21416
+ this.handleError({
21417
+ errorType: ErrorDetailsTypes.VALIDATION_ERROR,
21418
+ message: ERROR_MESSAGE.SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND,
21419
+ code: EmbedErrorCodes.WORKSHEET_ID_NOT_FOUND,
21420
+ error: ERROR_MESSAGE.SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND,
21421
+ });
21214
21422
  }
21215
21423
  const queryParams = this.getBaseQueryParams();
21216
21424
  queryParams[Param.SpotterEnabled] = true;