@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 (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) :
@@ -786,6 +786,7 @@
786
786
  * SearchEmbed.on(EmbedEvent.Error, (error) => {
787
787
  * console.log(error);
788
788
  * // { type: "Error", data: { errorType: "API", error: { message: '...', error: '...' } } }
789
+ * // { errorType: "API", message: '...', code: '...' } new format
789
790
  * });
790
791
  * ```
791
792
  * @example
@@ -797,6 +798,7 @@
797
798
  * // message: "Fullscreen API is not enabled",
798
799
  * // stack: "..."
799
800
  * // } }}
801
+ * // { errorType: "FULLSCREEN", message: "Fullscreen API is not enabled", code: '...' } new format
800
802
  * })
801
803
  * ```
802
804
  */
@@ -952,7 +954,8 @@
952
954
  */
953
955
  EmbedEvent["ALL"] = "*";
954
956
  /**
955
- * Emitted when an Answer is saved in the app
957
+ * Emitted when an Answer is saved in the app.
958
+ * Use start:true to subscribe to when save is initiated, or end:true to subscribe to when save is completed. Default is end:true.
956
959
  * @Version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
957
960
  * @example
958
961
  *```js
@@ -987,6 +990,7 @@
987
990
  EmbedEvent["Download"] = "download";
988
991
  /**
989
992
  * Emitted when the download action is triggered on an Answer.
993
+ * Use start:true to subscribe to when download is initiated, or end:true to subscribe to when download is completed. Default is end:true.
990
994
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.0.sw
991
995
  * @example
992
996
  *```js
@@ -1001,6 +1005,7 @@
1001
1005
  EmbedEvent["DownloadAsPng"] = "downloadAsPng";
1002
1006
  /**
1003
1007
  * Emitted when the Download as PDF action is triggered on an Answer
1008
+ * 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.
1004
1009
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1005
1010
  * @example
1006
1011
  *```js
@@ -1015,6 +1020,7 @@
1015
1020
  EmbedEvent["DownloadAsPdf"] = "downloadAsPdf";
1016
1021
  /**
1017
1022
  * Emitted when the Download as CSV action is triggered on an Answer.
1023
+ * 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.
1018
1024
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1019
1025
  * @example
1020
1026
  *```js
@@ -1029,6 +1035,7 @@
1029
1035
  EmbedEvent["DownloadAsCsv"] = "downloadAsCsv";
1030
1036
  /**
1031
1037
  * Emitted when the Download as XLSX action is triggered on an Answer.
1038
+ * 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.
1032
1039
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1033
1040
  * @example
1034
1041
  *```js
@@ -1043,6 +1050,7 @@
1043
1050
  EmbedEvent["DownloadAsXlsx"] = "downloadAsXlsx";
1044
1051
  /**
1045
1052
  * Emitted when an Answer is deleted in the app
1053
+ * Use start:true to subscribe to when delete is initiated, or end:true to subscribe to when delete is completed. Default is end:true.
1046
1054
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1047
1055
  * @example
1048
1056
  *```js
@@ -1069,6 +1077,7 @@
1069
1077
  /**
1070
1078
  * Emitted when a user initiates the Pin action to
1071
1079
  * add an Answer to a Liveboard.
1080
+ * Use start:true to subscribe to when pin is initiated, or end:true to subscribe to when pin is completed. Default is end:true.
1072
1081
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1073
1082
  * @example
1074
1083
  *```js
@@ -1182,6 +1191,7 @@
1182
1191
  /**
1183
1192
  * Emitted when the **Export TML** action is triggered on an
1184
1193
  * an embedded object in the app
1194
+ * Use start:true to subscribe to when export is initiated, or end:true to subscribe to when export is completed. Default is end:true.
1185
1195
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1186
1196
  * @example
1187
1197
  *```js
@@ -1207,6 +1217,7 @@
1207
1217
  EmbedEvent["SaveAsView"] = "saveAsView";
1208
1218
  /**
1209
1219
  * Emitted when the user creates a copy of an Answer.
1220
+ * 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.
1210
1221
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1211
1222
  * @example
1212
1223
  *```js
@@ -3278,6 +3289,8 @@
3278
3289
  Param["HideLiveboardHeader"] = "hideLiveboardHeader";
3279
3290
  Param["ShowLiveboardDescription"] = "showLiveboardDescription";
3280
3291
  Param["ShowLiveboardTitle"] = "showLiveboardTitle";
3292
+ Param["ShowMaskedFilterChip"] = "showMaskedFilterChip";
3293
+ Param["IsLiveboardMasterpiecesEnabled"] = "isLiveboardMasterpiecesEnabled";
3281
3294
  Param["HiddenTabs"] = "hideTabs";
3282
3295
  Param["VisibleTabs"] = "visibleTabs";
3283
3296
  Param["HideTabPanel"] = "hideTabPanel";
@@ -4811,6 +4824,85 @@
4811
4824
  */
4812
4825
  LogLevel["TRACE"] = "TRACE";
4813
4826
  })(exports.LogLevel || (exports.LogLevel = {}));
4827
+ /**
4828
+ * Error types emitted by embedded components.
4829
+ *
4830
+ * These enum values categorize different types of errors that can occur during
4831
+ * the lifecycle of an embedded ThoughtSpot component. Use these values to implement
4832
+ * specific error handling logic based on the error category.
4833
+ *
4834
+ * @see {@link EmbedErrorDetailsEvent} - The error event object structure
4835
+ * @see {@link EmbedEvent.Error} - The event that emits these errors
4836
+ * @version SDK: 1.44.2 | ThoughtSpot: 26.2.0.cl
4837
+ * @group Error Handling
4838
+ */
4839
+ var ErrorDetailsTypes;
4840
+ (function (ErrorDetailsTypes) {
4841
+ /** API call failure */
4842
+ ErrorDetailsTypes["API"] = "API";
4843
+ /** General validation error */
4844
+ ErrorDetailsTypes["VALIDATION_ERROR"] = "VALIDATION_ERROR";
4845
+ /** Network connectivity or request error */
4846
+ ErrorDetailsTypes["NETWORK"] = "NETWORK";
4847
+ })(ErrorDetailsTypes || (ErrorDetailsTypes = {}));
4848
+ /**
4849
+ * Specific error codes for embedded component errors.
4850
+ *
4851
+ * These codes provide granular identification of errors that occur in embedded components.
4852
+ * They are returned in the {@link EmbedErrorDetailsEvent.code} property and allow for
4853
+ * precise error handling and debugging.
4854
+ *
4855
+ * The codes are organized into categories:
4856
+ * - **Worksheet ID not found or does not exist**: Errors related to applying or updating filters
4857
+ * - **Liveboard ID missing**: Errors related to missing liveboard ID
4858
+ * - **Conflicting actions configuration**: Errors related to conflicting actions configuration
4859
+ * - **Conflicting tabs configuration**: Errors related to conflicting tabs configuration
4860
+ * - **Initialization error**: Errors related to initialization error
4861
+ * - **Network error**: Errors related to network error
4862
+ * - **Custom action validation**: Errors related to custom action validation
4863
+ * - **Login failed**: Errors related to login failed
4864
+ * - **Render not called**: Errors related to render not called
4865
+ * - **Host event type undefined or invalid**: Errors related to host event type undefined or invalid
4866
+ *
4867
+ * @version SDK: 1.44.2 | ThoughtSpot: 26.2.0.cl
4868
+ * @group Error Handling
4869
+ * @see {@link EmbedErrorDetailsEvent} - The error event object that includes these codes
4870
+ * @see {@link ErrorDetailsTypes} - General error type categories
4871
+ *
4872
+ * @example
4873
+ * Handle specific error codes
4874
+ *
4875
+ * embed.on(EmbedEvent.Error, (error) => {
4876
+ * if (error.code === EmbedErrorCodes.WORKSHEET_ID_NOT_FOUND) {
4877
+ * console.error('Worksheet ID not found:', error.message);
4878
+ * }
4879
+ * });
4880
+ * */
4881
+ var EmbedErrorCodes;
4882
+ (function (EmbedErrorCodes) {
4883
+ /** Worksheet ID not found or does not exist */
4884
+ EmbedErrorCodes["WORKSHEET_ID_NOT_FOUND"] = "WORKSHEET_ID_NOT_FOUND";
4885
+ /** Required Liveboard ID is missing from configuration */
4886
+ EmbedErrorCodes["LIVEBOARD_ID_MISSING"] = "LIVEBOARD_ID_MISSING";
4887
+ /** Conflicting action configuration detected (e.g., both hiddenActions and visibleActions specified) */
4888
+ EmbedErrorCodes["CONFLICTING_ACTIONS_CONFIG"] = "CONFLICTING_ACTIONS_CONFIG";
4889
+ /** Conflicting tab configuration detected (e.g., both hiddenTabs and visibleTabs specified) */
4890
+ EmbedErrorCodes["CONFLICTING_TABS_CONFIG"] = "CONFLICTING_TABS_CONFIG";
4891
+ /** Error during component initialization */
4892
+ EmbedErrorCodes["INIT_ERROR"] = "INIT_ERROR";
4893
+ /** Network connectivity or request error */
4894
+ EmbedErrorCodes["NETWORK_ERROR"] = "NETWORK_ERROR";
4895
+ /** Custom action validation failed */
4896
+ EmbedErrorCodes["CUSTOM_ACTION_VALIDATION"] = "CUSTOM_ACTION_VALIDATION";
4897
+ /** Authentication/login failed */
4898
+ EmbedErrorCodes["LOGIN_FAILED"] = "LOGIN_FAILED";
4899
+ /** Render method was not called before attempting to use the component */
4900
+ EmbedErrorCodes["RENDER_NOT_CALLED"] = "RENDER_NOT_CALLED";
4901
+ /** Host event type is undefined or invalid */
4902
+ EmbedErrorCodes["HOST_EVENT_TYPE_UNDEFINED"] = "HOST_EVENT_TYPE_UNDEFINED";
4903
+ /** Error parsing api intercept body */
4904
+ EmbedErrorCodes["PARSING_API_INTERCEPT_BODY_ERROR"] = "PARSING_API_INTERCEPT_BODY_ERROR";
4905
+ })(EmbedErrorCodes || (EmbedErrorCodes = {}));
4814
4906
  /**
4815
4907
  * Enum for the type of API intercepted
4816
4908
  */
@@ -4900,6 +4992,48 @@
4900
4992
  }
4901
4993
  const logger$3 = new Logger();
4902
4994
 
4995
+ const ERROR_MESSAGE = {
4996
+ INVALID_THOUGHTSPOT_HOST: 'Error parsing ThoughtSpot host. Please provide a valid URL.',
4997
+ SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND: 'Please select a Model to get started',
4998
+ LIVEBOARD_VIZ_ID_VALIDATION: 'Please select a Liveboard to embed.',
4999
+ TRIGGER_TIMED_OUT: 'Trigger timed-out in getting a response',
5000
+ SEARCHEMBED_BETA_WRANING_MESSAGE: 'SearchEmbed is in Beta in this release.',
5001
+ SAGE_EMBED_BETA_WARNING_MESSAGE: 'SageEmbed is in Beta in this release.',
5002
+ 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.',
5003
+ 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.',
5004
+ SDK_NOT_INITIALIZED: 'SDK not initialized',
5005
+ SESSION_INFO_FAILED: 'Failed to get session information',
5006
+ INVALID_TOKEN_ERROR: 'Received invalid token from getAuthToken callback or authToken endpoint.',
5007
+ INVALID_TOKEN_TYPE_ERROR: 'Expected getAuthToken to return a string, but received a {invalidType}.',
5008
+ MIXPANEL_TOKEN_NOT_FOUND: 'Mixpanel token not found in session info',
5009
+ PRERENDER_ID_MISSING: 'PreRender ID is required for preRender',
5010
+ SYNC_STYLE_CALLED_BEFORE_RENDER: 'PreRender should be called before using syncPreRenderStyle',
5011
+ CSP_VIOLATION_ALERT: 'CSP violation detected. Please check the console errors for more details.',
5012
+ 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',
5013
+ MISSING_REPORTING_OBSERVER: 'ReportingObserver not supported',
5014
+ 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',
5015
+ SPOTTER_AGENT_NOT_INITIALIZED: 'SpotterAgent not initialized',
5016
+ OFFLINE_WARNING: 'Network not Detected. Embed is offline. Please reconnect and refresh',
5017
+ INIT_SDK_REQUIRED: 'You need to init the ThoughtSpot SDK module first',
5018
+ CONFLICTING_ACTIONS_CONFIG: 'You cannot have both hidden actions and visible actions',
5019
+ CONFLICTING_TABS_CONFIG: 'You cannot have both hidden Tabs and visible Tabs',
5020
+ RENDER_BEFORE_EVENTS_REQUIRED: 'Please call render before triggering events',
5021
+ HOST_EVENT_TYPE_UNDEFINED: 'Host event type is undefined',
5022
+ LOGIN_FAILED: 'Login failed',
5023
+ ERROR_PARSING_API_INTERCEPT_BODY: 'Error parsing api intercept body',
5024
+ SSR_ENVIRONMENT_ERROR: 'SSR environment detected. This function cannot be called in SSR environment.',
5025
+ };
5026
+ const CUSTOM_ACTIONS_ERROR_MESSAGE = {
5027
+ INVALID_ACTION_OBJECT: 'Custom Action Validation Error: Invalid action object provided',
5028
+ MISSING_REQUIRED_FIELDS: (id, missingFields) => `Custom Action Validation Error for '${id}': Missing required fields: ${missingFields.join(', ')}`,
5029
+ UNSUPPORTED_TARGET: (id, targetType) => `Custom Action Validation Error for '${id}': Target type '${targetType}' is not supported`,
5030
+ INVALID_POSITION: (position, targetType, supportedPositions) => `Position '${position}' is not supported for ${targetType.toLowerCase()}-level custom actions. Supported positions: ${supportedPositions}`,
5031
+ INVALID_METADATA_IDS: (targetType, invalidIds, supportedIds) => `Invalid metadata IDs for ${targetType.toLowerCase()}-level custom actions: ${invalidIds.join(', ')}. Supported metadata IDs: ${supportedIds}`,
5032
+ INVALID_DATA_MODEL_IDS: (targetType, invalidIds, supportedIds) => `Invalid data model IDs for ${targetType.toLowerCase()}-level custom actions: ${invalidIds.join(', ')}. Supported data model IDs: ${supportedIds}`,
5033
+ INVALID_FIELDS: (targetType, invalidFields, supportedFields) => `Invalid fields for ${targetType.toLowerCase()}-level custom actions: ${invalidFields.join(', ')}. Supported fields: ${supportedFields}`,
5034
+ DUPLICATE_IDS: (id, duplicateNames, keptName) => `Duplicate custom action ID '${id}' found. Actions with names '${duplicateNames.join("', '")}' will be ignored. Keeping '${keptName}'.`,
5035
+ };
5036
+
4903
5037
  /**
4904
5038
  * Copyright (c) 2023
4905
5039
  *
@@ -5000,6 +5134,36 @@
5000
5134
  }
5001
5135
  return value;
5002
5136
  };
5137
+ /**
5138
+ * Validates if a string is a valid CSS margin value.
5139
+ * @param value - The string to validate
5140
+ * @returns true if the value is a valid CSS margin value, false otherwise
5141
+ */
5142
+ const isValidCssMargin = (value) => {
5143
+ if (isUndefined$1(value)) {
5144
+ return false;
5145
+ }
5146
+ if (typeof value !== 'string') {
5147
+ logger$3.error('Please provide a valid lazyLoadingMargin value (e.g., "10px")');
5148
+ return false;
5149
+ }
5150
+ // This pattern allows for an optional negative sign, and numbers that can be integers or decimals (including leading dot).
5151
+ const cssUnitPattern = /^-?(\d+(\.\d*)?|\.\d+)(px|em|rem|%|vh|vw)$/i;
5152
+ const parts = value.trim().split(/\s+/);
5153
+ if (parts.length > 4) {
5154
+ logger$3.error('Please provide a valid lazyLoadingMargin value (e.g., "10px")');
5155
+ return false;
5156
+ }
5157
+ const isValid = parts.every(part => {
5158
+ const trimmedPart = part.trim();
5159
+ return trimmedPart.toLowerCase() === 'auto' || trimmedPart === '0' || cssUnitPattern.test(trimmedPart);
5160
+ });
5161
+ if (!isValid) {
5162
+ logger$3.error('Please provide a valid lazyLoadingMargin value (e.g., "10px")');
5163
+ return false;
5164
+ }
5165
+ return true;
5166
+ };
5003
5167
  const getSSOMarker = (markerId) => {
5004
5168
  const encStringToAppend = encodeURIComponent(markerId);
5005
5169
  return `tsSSOMarker=${encStringToAppend}`;
@@ -5190,6 +5354,8 @@
5190
5354
  * @version SDK: 1.36.2 | ThoughtSpot: *
5191
5355
  */
5192
5356
  function storeValueInWindow(key, value, options = {}) {
5357
+ if (isWindowUndefined())
5358
+ return value;
5193
5359
  if (!window[sdkWindowKey]) {
5194
5360
  window[sdkWindowKey] = {};
5195
5361
  }
@@ -5200,11 +5366,16 @@
5200
5366
  return value;
5201
5367
  }
5202
5368
  /**
5203
- * Retrieves a stored value from the global `window` object under the `_tsEmbedSDK` namespace.
5204
- * @param key - The key whose value needs to be retrieved.
5205
- * @returns The stored value or `undefined` if the key is not found.
5369
+ * Retrieves a stored value from the global
5370
+ * `window` object under the `_tsEmbedSDK` namespace.
5371
+ * Returns undefined in SSR environment.
5206
5372
  */
5207
- const getValueFromWindow = (key) => { var _a; return (_a = window === null || window === void 0 ? void 0 : window[sdkWindowKey]) === null || _a === void 0 ? void 0 : _a[key]; };
5373
+ const getValueFromWindow = (key) => {
5374
+ var _a;
5375
+ if (isWindowUndefined())
5376
+ return undefined;
5377
+ return (_a = window === null || window === void 0 ? void 0 : window[sdkWindowKey]) === null || _a === void 0 ? void 0 : _a[key];
5378
+ };
5208
5379
  /**
5209
5380
  * Check if an array includes a string value
5210
5381
  * @param arr - The array to check
@@ -5315,6 +5486,19 @@
5315
5486
  return template.replace(/\{(\w+)\}/g, (match, key) => {
5316
5487
  return values[key] !== undefined ? String(values[key]) : match;
5317
5488
  });
5489
+ };
5490
+ /**
5491
+ * Check if the window is undefined
5492
+ * If the window is undefined, it means the code is running in a SSR environment.
5493
+ * @returns true if the window is undefined, false otherwise
5494
+ *
5495
+ */
5496
+ const isWindowUndefined = () => {
5497
+ if (typeof window === 'undefined') {
5498
+ logger$3.error(ERROR_MESSAGE.SSR_ENVIRONMENT_ERROR);
5499
+ return true;
5500
+ }
5501
+ return false;
5318
5502
  };
5319
5503
 
5320
5504
  /**
@@ -7602,40 +7786,6 @@
7602
7786
  UIPassthroughEvent["GetUnsavedAnswerTML"] = "getUnsavedAnswerTML";
7603
7787
  })(UIPassthroughEvent || (UIPassthroughEvent = {}));
7604
7788
 
7605
- const ERROR_MESSAGE = {
7606
- INVALID_THOUGHTSPOT_HOST: 'Error parsing ThoughtSpot host. Please provide a valid URL.',
7607
- SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND: 'Please select a Model to get started',
7608
- LIVEBOARD_VIZ_ID_VALIDATION: 'Please select a Liveboard to embed.',
7609
- TRIGGER_TIMED_OUT: 'Trigger timed-out in getting a response',
7610
- SEARCHEMBED_BETA_WRANING_MESSAGE: 'SearchEmbed is in Beta in this release.',
7611
- SAGE_EMBED_BETA_WARNING_MESSAGE: 'SageEmbed is in Beta in this release.',
7612
- 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.',
7613
- 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.',
7614
- SDK_NOT_INITIALIZED: 'SDK not initialized',
7615
- SESSION_INFO_FAILED: 'Failed to get session information',
7616
- INVALID_TOKEN_ERROR: 'Received invalid token from getAuthToken callback or authToken endpoint.',
7617
- INVALID_TOKEN_TYPE_ERROR: 'Expected getAuthToken to return a string, but received a {invalidType}.',
7618
- MIXPANEL_TOKEN_NOT_FOUND: 'Mixpanel token not found in session info',
7619
- PRERENDER_ID_MISSING: 'PreRender ID is required for preRender',
7620
- SYNC_STYLE_CALLED_BEFORE_RENDER: 'PreRender should be called before using syncPreRenderStyle',
7621
- CSP_VIOLATION_ALERT: 'CSP violation detected. Please check the console errors for more details.',
7622
- 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',
7623
- MISSING_REPORTING_OBSERVER: 'ReportingObserver not supported',
7624
- 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',
7625
- SPOTTER_AGENT_NOT_INITIALIZED: 'SpotterAgent not initialized',
7626
- OFFLINE_WARNING: 'Network not Detected. Embed is offline. Please reconnect and refresh',
7627
- };
7628
- const CUSTOM_ACTIONS_ERROR_MESSAGE = {
7629
- INVALID_ACTION_OBJECT: 'Custom Action Validation Error: Invalid action object provided',
7630
- MISSING_REQUIRED_FIELDS: (id, missingFields) => `Custom Action Validation Error for '${id}': Missing required fields: ${missingFields.join(', ')}`,
7631
- UNSUPPORTED_TARGET: (id, targetType) => `Custom Action Validation Error for '${id}': Target type '${targetType}' is not supported`,
7632
- INVALID_POSITION: (position, targetType, supportedPositions) => `Position '${position}' is not supported for ${targetType.toLowerCase()}-level custom actions. Supported positions: ${supportedPositions}`,
7633
- INVALID_METADATA_IDS: (targetType, invalidIds, supportedIds) => `Invalid metadata IDs for ${targetType.toLowerCase()}-level custom actions: ${invalidIds.join(', ')}. Supported metadata IDs: ${supportedIds}`,
7634
- INVALID_DATA_MODEL_IDS: (targetType, invalidIds, supportedIds) => `Invalid data model IDs for ${targetType.toLowerCase()}-level custom actions: ${invalidIds.join(', ')}. Supported data model IDs: ${supportedIds}`,
7635
- INVALID_FIELDS: (targetType, invalidFields, supportedFields) => `Invalid fields for ${targetType.toLowerCase()}-level custom actions: ${invalidFields.join(', ')}. Supported fields: ${supportedFields}`,
7636
- DUPLICATE_IDS: (id, duplicateNames, keptName) => `Duplicate custom action ID '${id}' found. Actions with names '${duplicateNames.join("', '")}' will be ignored. Keeping '${keptName}'.`,
7637
- };
7638
-
7639
7789
  const EndPoints = {
7640
7790
  AUTH_VERIFICATION: '/callosum/v1/session/info',
7641
7791
  SESSION_INFO: '/callosum/v1/session/info',
@@ -17565,6 +17715,8 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
17565
17715
  }
17566
17716
  const initFlagKey = 'initFlagKey';
17567
17717
  const createAndSetInitPromise = () => {
17718
+ if (isWindowUndefined())
17719
+ return;
17568
17720
  const { promise: initPromise, resolve: initPromiseResolve,
17569
17721
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
17570
17722
  // @ts-ignore
@@ -17604,6 +17756,8 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
17604
17756
  */
17605
17757
  const init = (embedConfig) => {
17606
17758
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
17759
+ if (isWindowUndefined())
17760
+ return null;
17607
17761
  sanity(embedConfig);
17608
17762
  resetAllCachedServices();
17609
17763
  embedConfig = setEmbedConfig(backwardCompat({
@@ -17786,7 +17940,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
17786
17940
  return eventData;
17787
17941
  }
17788
17942
 
17789
- 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$1={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p 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$1,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};
17943
+ 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$1={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p 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$1,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};
17790
17944
 
17791
17945
  class HostEventClient {
17792
17946
  constructor(iFrame) {
@@ -17984,9 +18138,13 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
17984
18138
  const { eventData, executeEvent, viewConfig, getUnsavedAnswerTml } = params;
17985
18139
  const [interceptData, bodyParseError] = parseInterceptData(eventData.data);
17986
18140
  if (bodyParseError) {
17987
- executeEvent(exports.EmbedEvent.Error, {
17988
- error: 'Error parsing api intercept body',
17989
- });
18141
+ const errorDetails = {
18142
+ errorType: ErrorDetailsTypes.API,
18143
+ message: ERROR_MESSAGE.ERROR_PARSING_API_INTERCEPT_BODY,
18144
+ code: EmbedErrorCodes.PARSING_API_INTERCEPT_BODY_ERROR,
18145
+ error: ERROR_MESSAGE.ERROR_PARSING_API_INTERCEPT_BODY,
18146
+ };
18147
+ executeEvent(exports.EmbedEvent.Error, errorDetails);
17990
18148
  logger$3.error('Error parsing request body', bodyParseError);
17991
18149
  return;
17992
18150
  }
@@ -18298,19 +18456,23 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
18298
18456
  * Throws error encountered during initialization.
18299
18457
  */
18300
18458
  throwInitError() {
18301
- this.handleError('You need to init the ThoughtSpot SDK module first');
18459
+ this.handleError({
18460
+ errorType: ErrorDetailsTypes.VALIDATION_ERROR,
18461
+ message: ERROR_MESSAGE.INIT_SDK_REQUIRED,
18462
+ code: EmbedErrorCodes.INIT_ERROR,
18463
+ error: ERROR_MESSAGE.INIT_SDK_REQUIRED,
18464
+ });
18302
18465
  }
18303
18466
  /**
18304
18467
  * Handles errors within the SDK
18305
18468
  * @param error The error message or object
18469
+ * @param errorDetails The error details
18306
18470
  */
18307
- handleError(error) {
18471
+ handleError(errorDetails) {
18308
18472
  this.isError = true;
18309
- this.executeCallbacks(exports.EmbedEvent.Error, {
18310
- error,
18311
- });
18473
+ this.executeCallbacks(exports.EmbedEvent.Error, errorDetails);
18312
18474
  // Log error
18313
- logger$3.error(error);
18475
+ logger$3.error(errorDetails);
18314
18476
  }
18315
18477
  /**
18316
18478
  * Extracts the type field from the event payload
@@ -18389,11 +18551,14 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
18389
18551
  };
18390
18552
  window.addEventListener('online', onlineEventListener);
18391
18553
  const offlineEventListener = (e) => {
18392
- const offlineWarning = ERROR_MESSAGE.OFFLINE_WARNING;
18393
- this.executeCallbacks(exports.EmbedEvent.Error, {
18394
- offlineWarning,
18395
- });
18396
- logger$3.warn(offlineWarning);
18554
+ const errorDetails = {
18555
+ errorType: ErrorDetailsTypes.NETWORK,
18556
+ message: ERROR_MESSAGE.OFFLINE_WARNING,
18557
+ code: EmbedErrorCodes.NETWORK_ERROR,
18558
+ offlineWarning: ERROR_MESSAGE.OFFLINE_WARNING,
18559
+ };
18560
+ this.executeCallbacks(exports.EmbedEvent.Error, errorDetails);
18561
+ logger$3.warn(errorDetails);
18397
18562
  };
18398
18563
  window.addEventListener('offline', offlineEventListener);
18399
18564
  this.subscribedListeners.online = onlineEventListener;
@@ -18473,8 +18638,10 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
18473
18638
  ]);
18474
18639
  if (customActionsResult.errors.length > 0) {
18475
18640
  this.handleError({
18476
- type: 'CUSTOM_ACTION_VALIDATION',
18641
+ errorType: ErrorDetailsTypes.VALIDATION_ERROR,
18477
18642
  message: customActionsResult.errors,
18643
+ code: EmbedErrorCodes.CUSTOM_ACTION_VALIDATION,
18644
+ error: { type: EmbedErrorCodes.CUSTOM_ACTION_VALIDATION, message: customActionsResult.errors }
18478
18645
  });
18479
18646
  }
18480
18647
  const baseInitData = {
@@ -18571,11 +18738,21 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
18571
18738
  ...additionalFlagsFromView,
18572
18739
  };
18573
18740
  if (Array.isArray(visibleActions) && Array.isArray(hiddenActions)) {
18574
- this.handleError('You cannot have both hidden actions and visible actions');
18741
+ this.handleError({
18742
+ errorType: ErrorDetailsTypes.VALIDATION_ERROR,
18743
+ message: ERROR_MESSAGE.CONFLICTING_ACTIONS_CONFIG,
18744
+ code: EmbedErrorCodes.CONFLICTING_ACTIONS_CONFIG,
18745
+ error: ERROR_MESSAGE.CONFLICTING_ACTIONS_CONFIG,
18746
+ });
18575
18747
  return queryParams;
18576
18748
  }
18577
18749
  if (Array.isArray(visibleTabs) && Array.isArray(hiddenTabs)) {
18578
- this.handleError('You cannot have both hidden Tabs and visible Tabs');
18750
+ this.handleError({
18751
+ errorType: ErrorDetailsTypes.VALIDATION_ERROR,
18752
+ message: ERROR_MESSAGE.CONFLICTING_TABS_CONFIG,
18753
+ code: EmbedErrorCodes.CONFLICTING_TABS_CONFIG,
18754
+ error: ERROR_MESSAGE.CONFLICTING_TABS_CONFIG,
18755
+ });
18579
18756
  return queryParams;
18580
18757
  }
18581
18758
  if (primaryAction) {
@@ -18800,7 +18977,12 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
18800
18977
  error: JSON.stringify(error),
18801
18978
  });
18802
18979
  this.handleInsertionIntoDOM(this.embedConfig.loginFailedMessage);
18803
- this.handleError(error);
18980
+ this.handleError({
18981
+ errorType: ErrorDetailsTypes.API,
18982
+ message: error.message || ERROR_MESSAGE.LOGIN_FAILED,
18983
+ code: EmbedErrorCodes.LOGIN_FAILED,
18984
+ error: error,
18985
+ });
18804
18986
  });
18805
18987
  });
18806
18988
  }
@@ -19105,11 +19287,21 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
19105
19287
  async trigger(messageType, data = {}) {
19106
19288
  uploadMixpanelEvent(`${MIXPANEL_EVENT.VISUAL_SDK_TRIGGER}-${messageType}`);
19107
19289
  if (!this.isRendered) {
19108
- this.handleError('Please call render before triggering events');
19290
+ this.handleError({
19291
+ errorType: ErrorDetailsTypes.VALIDATION_ERROR,
19292
+ message: ERROR_MESSAGE.RENDER_BEFORE_EVENTS_REQUIRED,
19293
+ code: EmbedErrorCodes.RENDER_NOT_CALLED,
19294
+ error: ERROR_MESSAGE.RENDER_BEFORE_EVENTS_REQUIRED,
19295
+ });
19109
19296
  return null;
19110
19297
  }
19111
19298
  if (!messageType) {
19112
- this.handleError('Host event type is undefined');
19299
+ this.handleError({
19300
+ errorType: ErrorDetailsTypes.VALIDATION_ERROR,
19301
+ message: ERROR_MESSAGE.HOST_EVENT_TYPE_UNDEFINED,
19302
+ code: EmbedErrorCodes.HOST_EVENT_TYPE_UNDEFINED,
19303
+ error: ERROR_MESSAGE.HOST_EVENT_TYPE_UNDEFINED,
19304
+ });
19113
19305
  return null;
19114
19306
  }
19115
19307
  // Check if iframe exists before triggering -
@@ -19922,7 +20114,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
19922
20114
  constructor(domSelector, viewConfig) {
19923
20115
  viewConfig.embedComponentType = 'AppEmbed';
19924
20116
  super(domSelector, viewConfig);
19925
- this.defaultHeight = '100%';
20117
+ this.defaultHeight = 500;
19926
20118
  this.sendFullHeightLazyLoadData = () => {
19927
20119
  const data = calculateVisibleElementData(this.iFrame);
19928
20120
  this.trigger(exports.HostEvent.VisibleEmbedCoordinates, data);
@@ -19944,8 +20136,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
19944
20136
  * @param data The event payload
19945
20137
  */
19946
20138
  this.updateIFrameHeight = (data) => {
19947
- var _a;
19948
- this.setIFrameHeight(Math.max(data.data, (_a = this.iFrame) === null || _a === void 0 ? void 0 : _a.scrollHeight));
20139
+ this.setIFrameHeight(Math.max(data.data, this.defaultHeight));
19949
20140
  this.sendFullHeightLazyLoadData();
19950
20141
  };
19951
20142
  this.embedIframeCenter = (data, responder) => {
@@ -19984,7 +20175,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
19984
20175
  * embedded Liveboard or visualization.
19985
20176
  */
19986
20177
  getEmbedParams() {
19987
- 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;
20178
+ 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;
19988
20179
  let params = {};
19989
20180
  params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
19990
20181
  params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
@@ -19993,6 +20184,8 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
19993
20184
  params[Param.HideLiveboardHeader] = hideLiveboardHeader;
19994
20185
  params[Param.ShowLiveboardTitle] = showLiveboardTitle;
19995
20186
  params[Param.ShowLiveboardDescription] = !!showLiveboardDescription;
20187
+ params[Param.ShowMaskedFilterChip] = showMaskedFilterChip;
20188
+ params[Param.IsLiveboardMasterpiecesEnabled] = isLiveboardMasterpiecesEnabled;
19996
20189
  params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
19997
20190
  params[Param.IsFullAppEmbed] = true;
19998
20191
  params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
@@ -20019,7 +20212,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
20019
20212
  params[Param.fullHeight] = true;
20020
20213
  if (this.viewConfig.lazyLoadingForFullHeight) {
20021
20214
  params[Param.IsLazyLoadingForEmbedEnabled] = true;
20022
- params[Param.RootMarginForLazyLoad] = this.viewConfig.lazyLoadingMargin;
20215
+ if (isValidCssMargin(this.viewConfig.lazyLoadingMargin)) {
20216
+ params[Param.RootMarginForLazyLoad] = this.viewConfig.lazyLoadingMargin;
20217
+ }
20023
20218
  }
20024
20219
  }
20025
20220
  if (tag) {
@@ -20064,6 +20259,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
20064
20259
  if (isCentralizedLiveboardFilterUXEnabled != undefined) {
20065
20260
  params[Param.isCentralizedLiveboardFilterUXEnabled] = isCentralizedLiveboardFilterUXEnabled;
20066
20261
  }
20262
+ this.defaultHeight = minimumHeight || this.defaultHeight;
20067
20263
  params[Param.DataPanelV2Enabled] = dataPanelV2;
20068
20264
  params[Param.HideHomepageLeftNav] = hideHomepageLeftNav;
20069
20265
  params[Param.ModularHomeExperienceEnabled] = modularHomeExperience;
@@ -20418,19 +20614,19 @@ query GetEurekaVizSnapshots(
20418
20614
  getEmbedParamsObject() {
20419
20615
  let params = {};
20420
20616
  params = this.getBaseQueryParams(params);
20421
- 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;
20617
+ 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;
20422
20618
  const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
20423
20619
  || this.viewConfig.preventPinboardFilterRemoval;
20424
20620
  if (fullHeight === true) {
20425
20621
  params[Param.fullHeight] = true;
20426
20622
  if (this.viewConfig.lazyLoadingForFullHeight) {
20427
20623
  params[Param.IsLazyLoadingForEmbedEnabled] = true;
20428
- params[Param.RootMarginForLazyLoad] = this.viewConfig.lazyLoadingMargin;
20624
+ if (isValidCssMargin(this.viewConfig.lazyLoadingMargin)) {
20625
+ params[Param.RootMarginForLazyLoad] = this.viewConfig.lazyLoadingMargin;
20626
+ }
20429
20627
  }
20430
20628
  }
20431
- if (defaultHeight) {
20432
- this.defaultHeight = defaultHeight;
20433
- }
20629
+ this.defaultHeight = minimumHeight || defaultHeight || this.defaultHeight;
20434
20630
  if (enableVizTransformations !== undefined) {
20435
20631
  params[Param.EnableVizTransformations] = enableVizTransformations.toString();
20436
20632
  }
@@ -20497,6 +20693,8 @@ query GetEurekaVizSnapshots(
20497
20693
  params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;
20498
20694
  params[Param.ShowLiveboardReverifyBanner] = showLiveboardReverifyBanner;
20499
20695
  params[Param.HideIrrelevantFiltersInTab] = hideIrrelevantChipsInLiveboardTabs;
20696
+ params[Param.ShowMaskedFilterChip] = showMaskedFilterChip;
20697
+ params[Param.IsLiveboardMasterpiecesEnabled] = isLiveboardMasterpiecesEnabled;
20500
20698
  params[Param.IsEnhancedFilterInteractivityEnabled] = isEnhancedFilterInteractivityEnabled;
20501
20699
  params[Param.DataPanelV2Enabled] = dataPanelV2;
20502
20700
  params[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
@@ -20528,7 +20726,12 @@ query GetEurekaVizSnapshots(
20528
20726
  const { vizId, activeTabId } = this.viewConfig;
20529
20727
  const liveboardId = (_a = this.viewConfig.liveboardId) !== null && _a !== void 0 ? _a : this.viewConfig.pinboardId;
20530
20728
  if (!liveboardId) {
20531
- this.handleError(ERROR_MESSAGE.LIVEBOARD_VIZ_ID_VALIDATION);
20729
+ this.handleError({
20730
+ errorType: ErrorDetailsTypes.VALIDATION_ERROR,
20731
+ message: ERROR_MESSAGE.LIVEBOARD_VIZ_ID_VALIDATION,
20732
+ code: EmbedErrorCodes.LIVEBOARD_ID_MISSING,
20733
+ error: ERROR_MESSAGE.LIVEBOARD_VIZ_ID_VALIDATION,
20734
+ });
20532
20735
  }
20533
20736
  return `${this.getRootIframeSrc()}${this.getIframeSuffixSrc(liveboardId, vizId, activeTabId)}`;
20534
20737
  }
@@ -21232,7 +21435,12 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
21232
21435
  getEmbedParamsObject() {
21233
21436
  const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, enablePastConversationsSidebar, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, updatedSpotterChatPrompt, } = this.viewConfig;
21234
21437
  if (!worksheetId) {
21235
- this.handleError(ERROR_MESSAGE.SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND);
21438
+ this.handleError({
21439
+ errorType: ErrorDetailsTypes.VALIDATION_ERROR,
21440
+ message: ERROR_MESSAGE.SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND,
21441
+ code: EmbedErrorCodes.WORKSHEET_ID_NOT_FOUND,
21442
+ error: ERROR_MESSAGE.SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND,
21443
+ });
21236
21444
  }
21237
21445
  const queryParams = this.getBaseQueryParams();
21238
21446
  queryParams[Param.SpotterEnabled] = true;