@thoughtspot/visual-embed-sdk 1.51.2 → 1.52.1

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 (316) hide show
  1. package/cjs/package.json +9 -1
  2. package/cjs/src/api-intercept.d.ts.map +1 -1
  3. package/cjs/src/api-intercept.js +1 -0
  4. package/cjs/src/api-intercept.js.map +1 -1
  5. package/cjs/src/contracts/contracts.spec.d.ts +2 -0
  6. package/cjs/src/contracts/contracts.spec.d.ts.map +1 -0
  7. package/cjs/src/contracts/contracts.spec.js +345 -0
  8. package/cjs/src/contracts/contracts.spec.js.map +1 -0
  9. package/cjs/src/contracts/embed-event-payloads.d.ts +73 -0
  10. package/cjs/src/contracts/embed-event-payloads.d.ts.map +1 -0
  11. package/cjs/src/contracts/embed-event-payloads.js +3 -0
  12. package/cjs/src/contracts/embed-event-payloads.js.map +1 -0
  13. package/cjs/src/contracts/host-event-contracts.d.ts +378 -0
  14. package/cjs/src/contracts/host-event-contracts.d.ts.map +1 -0
  15. package/cjs/src/contracts/host-event-contracts.js +3 -0
  16. package/cjs/src/contracts/host-event-contracts.js.map +1 -0
  17. package/cjs/src/contracts/index.d.ts +22 -0
  18. package/cjs/src/contracts/index.d.ts.map +1 -0
  19. package/cjs/src/contracts/index.js +33 -0
  20. package/cjs/src/contracts/index.js.map +1 -0
  21. package/cjs/src/contracts/ui-passthrough-contracts.d.ts +277 -0
  22. package/cjs/src/contracts/ui-passthrough-contracts.d.ts.map +1 -0
  23. package/cjs/src/{embed/hostEventClient/contracts.js → contracts/ui-passthrough-contracts.js} +6 -2
  24. package/cjs/src/contracts/ui-passthrough-contracts.js.map +1 -0
  25. package/cjs/src/css-variables.d.ts +1 -1
  26. package/cjs/src/embed/app.d.ts +17 -140
  27. package/cjs/src/embed/app.d.ts.map +1 -1
  28. package/cjs/src/embed/app.js +20 -120
  29. package/cjs/src/embed/app.js.map +1 -1
  30. package/cjs/src/embed/app.spec.js +70 -26
  31. package/cjs/src/embed/app.spec.js.map +1 -1
  32. package/cjs/src/embed/conversation.d.ts +5 -5
  33. package/cjs/src/embed/events.spec.js +12 -2
  34. package/cjs/src/embed/events.spec.js.map +1 -1
  35. package/cjs/src/embed/hostEventClient/host-event-client.d.ts +3 -2
  36. package/cjs/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
  37. package/cjs/src/embed/hostEventClient/host-event-client.js +23 -18
  38. package/cjs/src/embed/hostEventClient/host-event-client.js.map +1 -1
  39. package/cjs/src/embed/hostEventClient/host-event-client.spec.js +36 -36
  40. package/cjs/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
  41. package/cjs/src/embed/hostEventClient/utils.d.ts +1 -1
  42. package/cjs/src/embed/hostEventClient/utils.d.ts.map +1 -1
  43. package/cjs/src/embed/hostEventClient/utils.js +3 -3
  44. package/cjs/src/embed/hostEventClient/utils.js.map +1 -1
  45. package/cjs/src/embed/liveboard.d.ts +9 -161
  46. package/cjs/src/embed/liveboard.d.ts.map +1 -1
  47. package/cjs/src/embed/liveboard.js +68 -135
  48. package/cjs/src/embed/liveboard.js.map +1 -1
  49. package/cjs/src/embed/liveboard.spec.js +215 -32
  50. package/cjs/src/embed/liveboard.spec.js.map +1 -1
  51. package/cjs/src/embed/search.d.ts +14 -0
  52. package/cjs/src/embed/search.d.ts.map +1 -1
  53. package/cjs/src/embed/search.js +4 -1
  54. package/cjs/src/embed/search.js.map +1 -1
  55. package/cjs/src/embed/search.spec.js +65 -0
  56. package/cjs/src/embed/search.spec.js.map +1 -1
  57. package/cjs/src/embed/ts-embed.d.ts +21 -25
  58. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  59. package/cjs/src/embed/ts-embed.js +105 -72
  60. package/cjs/src/embed/ts-embed.js.map +1 -1
  61. package/cjs/src/embed/ts-embed.spec.d.ts.map +1 -1
  62. package/cjs/src/embed/ts-embed.spec.js +380 -33
  63. package/cjs/src/embed/ts-embed.spec.js.map +1 -1
  64. package/cjs/src/full-height.d.ts +137 -0
  65. package/cjs/src/full-height.d.ts.map +1 -0
  66. package/cjs/src/full-height.js +272 -0
  67. package/cjs/src/full-height.js.map +1 -0
  68. package/cjs/src/full-height.spec.d.ts +2 -0
  69. package/cjs/src/full-height.spec.d.ts.map +1 -0
  70. package/cjs/src/full-height.spec.js +835 -0
  71. package/cjs/src/full-height.spec.js.map +1 -0
  72. package/cjs/src/index.d.ts +4 -3
  73. package/cjs/src/index.d.ts.map +1 -1
  74. package/cjs/src/index.js +5 -4
  75. package/cjs/src/index.js.map +1 -1
  76. package/cjs/src/react/all-types-export.d.ts +1 -1
  77. package/cjs/src/react/all-types-export.d.ts.map +1 -1
  78. package/cjs/src/react/all-types-export.js +2 -1
  79. package/cjs/src/react/all-types-export.js.map +1 -1
  80. package/cjs/src/react/all-types-export.parity.spec.js +55 -3
  81. package/cjs/src/react/all-types-export.parity.spec.js.map +1 -1
  82. package/cjs/src/react/index.d.ts +8 -8
  83. package/cjs/src/react/index.d.ts.map +1 -1
  84. package/cjs/src/react/index.js +1 -1
  85. package/cjs/src/react/index.js.map +1 -1
  86. package/cjs/src/react/index.spec.js +7 -7
  87. package/cjs/src/react/index.spec.js.map +1 -1
  88. package/cjs/src/types.d.ts +664 -39
  89. package/cjs/src/types.d.ts.map +1 -1
  90. package/cjs/src/types.js +406 -13
  91. package/cjs/src/types.js.map +1 -1
  92. package/cjs/src/utils/processTrigger.d.ts +3 -1
  93. package/cjs/src/utils/processTrigger.d.ts.map +1 -1
  94. package/cjs/src/utils/processTrigger.js +19 -51
  95. package/cjs/src/utils/processTrigger.js.map +1 -1
  96. package/cjs/src/utils/transport/iframe-transport.d.ts +55 -0
  97. package/cjs/src/utils/transport/iframe-transport.d.ts.map +1 -0
  98. package/cjs/src/utils/transport/iframe-transport.js +108 -0
  99. package/cjs/src/utils/transport/iframe-transport.js.map +1 -0
  100. package/cjs/src/utils/transport/iframe-transport.spec.d.ts +2 -0
  101. package/cjs/src/utils/transport/iframe-transport.spec.d.ts.map +1 -0
  102. package/cjs/src/utils/transport/iframe-transport.spec.js +140 -0
  103. package/cjs/src/utils/transport/iframe-transport.spec.js.map +1 -0
  104. package/cjs/src/utils.d.ts +18 -0
  105. package/cjs/src/utils.d.ts.map +1 -1
  106. package/cjs/src/utils.js +39 -1
  107. package/cjs/src/utils.js.map +1 -1
  108. package/cjs/src/utils.spec.js +62 -0
  109. package/cjs/src/utils.spec.js.map +1 -1
  110. package/dist/{index-D8_Zs-Nr.js → index-C1pmYb5H.js} +1 -1
  111. package/dist/src/api-intercept.d.ts.map +1 -1
  112. package/dist/src/contracts/contracts.spec.d.ts +2 -0
  113. package/dist/src/contracts/contracts.spec.d.ts.map +1 -0
  114. package/dist/src/contracts/embed-event-payloads.d.ts +73 -0
  115. package/dist/src/contracts/embed-event-payloads.d.ts.map +1 -0
  116. package/dist/src/contracts/host-event-contracts.d.ts +378 -0
  117. package/dist/src/contracts/host-event-contracts.d.ts.map +1 -0
  118. package/dist/src/contracts/index.d.ts +22 -0
  119. package/dist/src/contracts/index.d.ts.map +1 -0
  120. package/dist/src/contracts/ui-passthrough-contracts.d.ts +277 -0
  121. package/dist/src/contracts/ui-passthrough-contracts.d.ts.map +1 -0
  122. package/dist/src/css-variables.d.ts +1 -1
  123. package/dist/src/embed/app.d.ts +17 -140
  124. package/dist/src/embed/app.d.ts.map +1 -1
  125. package/dist/src/embed/conversation.d.ts +5 -5
  126. package/dist/src/embed/hostEventClient/host-event-client.d.ts +3 -2
  127. package/dist/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
  128. package/dist/src/embed/hostEventClient/utils.d.ts +1 -1
  129. package/dist/src/embed/hostEventClient/utils.d.ts.map +1 -1
  130. package/dist/src/embed/liveboard.d.ts +9 -161
  131. package/dist/src/embed/liveboard.d.ts.map +1 -1
  132. package/dist/src/embed/search.d.ts +14 -0
  133. package/dist/src/embed/search.d.ts.map +1 -1
  134. package/dist/src/embed/ts-embed.d.ts +21 -25
  135. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  136. package/dist/src/embed/ts-embed.spec.d.ts.map +1 -1
  137. package/dist/src/full-height.d.ts +137 -0
  138. package/dist/src/full-height.d.ts.map +1 -0
  139. package/dist/src/full-height.spec.d.ts +2 -0
  140. package/dist/src/full-height.spec.d.ts.map +1 -0
  141. package/dist/src/index.d.ts +4 -3
  142. package/dist/src/index.d.ts.map +1 -1
  143. package/dist/src/react/all-types-export.d.ts +1 -1
  144. package/dist/src/react/all-types-export.d.ts.map +1 -1
  145. package/dist/src/react/index.d.ts +8 -8
  146. package/dist/src/react/index.d.ts.map +1 -1
  147. package/dist/src/types.d.ts +664 -39
  148. package/dist/src/types.d.ts.map +1 -1
  149. package/dist/src/utils/processTrigger.d.ts +3 -1
  150. package/dist/src/utils/processTrigger.d.ts.map +1 -1
  151. package/dist/src/utils/transport/iframe-transport.d.ts +55 -0
  152. package/dist/src/utils/transport/iframe-transport.d.ts.map +1 -0
  153. package/dist/src/utils/transport/iframe-transport.spec.d.ts +2 -0
  154. package/dist/src/utils/transport/iframe-transport.spec.d.ts.map +1 -0
  155. package/dist/src/utils.d.ts +18 -0
  156. package/dist/src/utils.d.ts.map +1 -1
  157. package/dist/tsembed-react.es.js +1031 -392
  158. package/dist/tsembed-react.js +1030 -391
  159. package/dist/tsembed.es.js +1031 -392
  160. package/dist/tsembed.js +1029 -390
  161. package/dist/visual-embed-sdk-react-full.d.ts +1483 -693
  162. package/dist/visual-embed-sdk-react.d.ts +1364 -647
  163. package/dist/visual-embed-sdk.d.ts +1426 -659
  164. package/lib/package.json +9 -1
  165. package/lib/src/api-intercept.d.ts.map +1 -1
  166. package/lib/src/api-intercept.js +2 -1
  167. package/lib/src/api-intercept.js.map +1 -1
  168. package/lib/src/contracts/contracts.spec.d.ts +2 -0
  169. package/lib/src/contracts/contracts.spec.d.ts.map +1 -0
  170. package/lib/src/contracts/contracts.spec.js +342 -0
  171. package/lib/src/contracts/contracts.spec.js.map +1 -0
  172. package/lib/src/contracts/embed-event-payloads.d.ts +73 -0
  173. package/lib/src/contracts/embed-event-payloads.d.ts.map +1 -0
  174. package/lib/src/contracts/embed-event-payloads.js +2 -0
  175. package/lib/src/contracts/embed-event-payloads.js.map +1 -0
  176. package/lib/src/contracts/host-event-contracts.d.ts +378 -0
  177. package/lib/src/contracts/host-event-contracts.d.ts.map +1 -0
  178. package/lib/src/contracts/host-event-contracts.js +2 -0
  179. package/lib/src/contracts/host-event-contracts.js.map +1 -0
  180. package/lib/src/contracts/index.d.ts +22 -0
  181. package/lib/src/contracts/index.d.ts.map +1 -0
  182. package/lib/src/contracts/index.js +22 -0
  183. package/lib/src/contracts/index.js.map +1 -0
  184. package/lib/src/contracts/ui-passthrough-contracts.d.ts +277 -0
  185. package/lib/src/contracts/ui-passthrough-contracts.d.ts.map +1 -0
  186. package/lib/src/{embed/hostEventClient/contracts.js → contracts/ui-passthrough-contracts.js} +6 -2
  187. package/lib/src/contracts/ui-passthrough-contracts.js.map +1 -0
  188. package/lib/src/css-variables.d.ts +1 -1
  189. package/lib/src/embed/app.d.ts +17 -140
  190. package/lib/src/embed/app.d.ts.map +1 -1
  191. package/lib/src/embed/app.js +22 -122
  192. package/lib/src/embed/app.js.map +1 -1
  193. package/lib/src/embed/app.spec.js +70 -26
  194. package/lib/src/embed/app.spec.js.map +1 -1
  195. package/lib/src/embed/conversation.d.ts +5 -5
  196. package/lib/src/embed/events.spec.js +12 -2
  197. package/lib/src/embed/events.spec.js.map +1 -1
  198. package/lib/src/embed/hostEventClient/host-event-client.d.ts +3 -2
  199. package/lib/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
  200. package/lib/src/embed/hostEventClient/host-event-client.js +6 -1
  201. package/lib/src/embed/hostEventClient/host-event-client.js.map +1 -1
  202. package/lib/src/embed/hostEventClient/host-event-client.spec.js +1 -1
  203. package/lib/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
  204. package/lib/src/embed/hostEventClient/utils.d.ts +1 -1
  205. package/lib/src/embed/hostEventClient/utils.d.ts.map +1 -1
  206. package/lib/src/embed/hostEventClient/utils.js +1 -1
  207. package/lib/src/embed/hostEventClient/utils.js.map +1 -1
  208. package/lib/src/embed/liveboard.d.ts +9 -161
  209. package/lib/src/embed/liveboard.d.ts.map +1 -1
  210. package/lib/src/embed/liveboard.js +70 -137
  211. package/lib/src/embed/liveboard.js.map +1 -1
  212. package/lib/src/embed/liveboard.spec.js +215 -32
  213. package/lib/src/embed/liveboard.spec.js.map +1 -1
  214. package/lib/src/embed/search.d.ts +14 -0
  215. package/lib/src/embed/search.d.ts.map +1 -1
  216. package/lib/src/embed/search.js +4 -1
  217. package/lib/src/embed/search.js.map +1 -1
  218. package/lib/src/embed/search.spec.js +65 -0
  219. package/lib/src/embed/search.spec.js.map +1 -1
  220. package/lib/src/embed/ts-embed.d.ts +21 -25
  221. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  222. package/lib/src/embed/ts-embed.js +106 -73
  223. package/lib/src/embed/ts-embed.js.map +1 -1
  224. package/lib/src/embed/ts-embed.spec.d.ts.map +1 -1
  225. package/lib/src/embed/ts-embed.spec.js +378 -31
  226. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  227. package/lib/src/full-height.d.ts +137 -0
  228. package/lib/src/full-height.d.ts.map +1 -0
  229. package/lib/src/full-height.js +268 -0
  230. package/lib/src/full-height.js.map +1 -0
  231. package/lib/src/full-height.spec.d.ts +2 -0
  232. package/lib/src/full-height.spec.d.ts.map +1 -0
  233. package/lib/src/full-height.spec.js +833 -0
  234. package/lib/src/full-height.spec.js.map +1 -0
  235. package/lib/src/index.d.ts +4 -3
  236. package/lib/src/index.d.ts.map +1 -1
  237. package/lib/src/index.js +3 -3
  238. package/lib/src/index.js.map +1 -1
  239. package/lib/src/react/all-types-export.d.ts +1 -1
  240. package/lib/src/react/all-types-export.d.ts.map +1 -1
  241. package/lib/src/react/all-types-export.js +1 -1
  242. package/lib/src/react/all-types-export.js.map +1 -1
  243. package/lib/src/react/all-types-export.parity.spec.js +55 -3
  244. package/lib/src/react/all-types-export.parity.spec.js.map +1 -1
  245. package/lib/src/react/index.d.ts +8 -8
  246. package/lib/src/react/index.d.ts.map +1 -1
  247. package/lib/src/react/index.js +1 -1
  248. package/lib/src/react/index.js.map +1 -1
  249. package/lib/src/react/index.spec.js +7 -7
  250. package/lib/src/react/index.spec.js.map +1 -1
  251. package/lib/src/types.d.ts +664 -39
  252. package/lib/src/types.d.ts.map +1 -1
  253. package/lib/src/types.js +405 -12
  254. package/lib/src/types.js.map +1 -1
  255. package/lib/src/utils/processTrigger.d.ts +3 -1
  256. package/lib/src/utils/processTrigger.d.ts.map +1 -1
  257. package/lib/src/utils/processTrigger.js +19 -51
  258. package/lib/src/utils/processTrigger.js.map +1 -1
  259. package/lib/src/utils/transport/iframe-transport.d.ts +55 -0
  260. package/lib/src/utils/transport/iframe-transport.d.ts.map +1 -0
  261. package/lib/src/utils/transport/iframe-transport.js +101 -0
  262. package/lib/src/utils/transport/iframe-transport.js.map +1 -0
  263. package/lib/src/utils/transport/iframe-transport.spec.d.ts +2 -0
  264. package/lib/src/utils/transport/iframe-transport.spec.d.ts.map +1 -0
  265. package/lib/src/utils/transport/iframe-transport.spec.js +138 -0
  266. package/lib/src/utils/transport/iframe-transport.spec.js.map +1 -0
  267. package/lib/src/utils.d.ts +18 -0
  268. package/lib/src/utils.d.ts.map +1 -1
  269. package/lib/src/utils.js +37 -0
  270. package/lib/src/utils.js.map +1 -1
  271. package/lib/src/utils.spec.js +63 -1
  272. package/lib/src/utils.spec.js.map +1 -1
  273. package/lib/src/visual-embed-sdk.d.ts +1426 -659
  274. package/package.json +9 -1
  275. package/src/api-intercept.ts +2 -1
  276. package/src/contracts/contracts.spec.ts +392 -0
  277. package/src/contracts/embed-event-payloads.ts +83 -0
  278. package/src/contracts/host-event-contracts.ts +456 -0
  279. package/src/contracts/index.ts +53 -0
  280. package/src/contracts/ui-passthrough-contracts.ts +301 -0
  281. package/src/css-variables.ts +1 -1
  282. package/src/embed/app.spec.ts +86 -34
  283. package/src/embed/app.ts +37 -264
  284. package/src/embed/conversation.ts +5 -5
  285. package/src/embed/events.spec.ts +14 -2
  286. package/src/embed/hostEventClient/host-event-client.spec.ts +2 -2
  287. package/src/embed/hostEventClient/host-event-client.ts +18 -5
  288. package/src/embed/hostEventClient/utils.ts +2 -1
  289. package/src/embed/liveboard.spec.ts +261 -42
  290. package/src/embed/liveboard.ts +78 -297
  291. package/src/embed/search.spec.ts +80 -0
  292. package/src/embed/search.ts +20 -0
  293. package/src/embed/ts-embed.spec.ts +518 -31
  294. package/src/embed/ts-embed.ts +133 -82
  295. package/src/full-height.spec.ts +1008 -0
  296. package/src/full-height.ts +361 -0
  297. package/src/index.ts +95 -5
  298. package/src/react/all-types-export.parity.spec.ts +63 -3
  299. package/src/react/all-types-export.ts +46 -0
  300. package/src/react/index.spec.tsx +7 -7
  301. package/src/react/index.tsx +9 -9
  302. package/src/types.ts +665 -37
  303. package/src/utils/processTrigger.ts +28 -58
  304. package/src/utils/transport/iframe-transport.spec.ts +177 -0
  305. package/src/utils/transport/iframe-transport.ts +122 -0
  306. package/src/utils.spec.ts +71 -0
  307. package/src/utils.ts +38 -0
  308. package/cjs/src/embed/hostEventClient/contracts.d.ts +0 -231
  309. package/cjs/src/embed/hostEventClient/contracts.d.ts.map +0 -1
  310. package/cjs/src/embed/hostEventClient/contracts.js.map +0 -1
  311. package/dist/src/embed/hostEventClient/contracts.d.ts +0 -231
  312. package/dist/src/embed/hostEventClient/contracts.d.ts.map +0 -1
  313. package/lib/src/embed/hostEventClient/contracts.d.ts +0 -231
  314. package/lib/src/embed/hostEventClient/contracts.d.ts.map +0 -1
  315. package/lib/src/embed/hostEventClient/contracts.js.map +0 -1
  316. package/src/embed/hostEventClient/contracts.ts +0 -262
package/src/embed/app.ts CHANGED
@@ -9,19 +9,19 @@
9
9
  */
10
10
 
11
11
  import { logger } from '../utils/logger';
12
- import { calculateVisibleElementData, getEffectiveClippingAncestors, getQueryParamString, getScrollableAncestors, isUndefined, isValidCssMargin, setParamIfDefined } from '../utils';
13
- import { DEFAULT_LAZY_LOADING_MARGIN } from '../config';
12
+ import { getQueryParamString, isUndefined, setParamIfDefined } from '../utils';
14
13
  import {
15
14
  Param,
16
15
  DOMSelector,
17
16
  HostEvent,
18
17
  EmbedEvent,
19
- MessagePayload,
20
18
  AllEmbedViewConfig,
19
+ FullHeightViewConfig,
21
20
  DefaultAppInitData,
22
21
  VisualizationOverrides,
23
22
  SpotterFileUploadFileTypes,
24
23
  } from '../types';
24
+ import { FullHeightController } from '../full-height';
25
25
  import { V1Embed } from './ts-embed';
26
26
  import { SpotterChatViewConfig, SpotterSidebarViewConfig, SpotterQueryMode, SpotterShareConversationConfig, StarterPromptsConfig } from './conversation';
27
27
  import { buildSpotterSidebarAppInitData, buildSpotterShareConversationAppInitData, buildStarterPromptsAppInitData } from './spotter-utils';
@@ -179,7 +179,7 @@ export interface DiscoveryExperience {
179
179
  * The view configuration for full app embedding.
180
180
  * @group Embed components
181
181
  */
182
- export interface AppViewConfig extends AllEmbedViewConfig {
182
+ export interface AppViewConfig extends AllEmbedViewConfig, FullHeightViewConfig {
183
183
  /**
184
184
  * If true, the top navigation bar within the ThoughtSpot app
185
185
  * is displayed. By default, the navigation bar is hidden.
@@ -464,34 +464,6 @@ export interface AppViewConfig extends AllEmbedViewConfig {
464
464
  * ```
465
465
  */
466
466
  enableSearchAssist?: boolean;
467
- /**
468
- * If set to true, the Liveboard container dynamically resizes
469
- * according to the height of the Liveboard.
470
- *
471
- * **Note**: Using fullHeight loads all visualizations
472
- * on the Liveboard simultaneously, which results in
473
- * multiple warehouse queries and potentially a
474
- * longer wait for the topmost visualizations to
475
- * display on the screen. Setting fullHeight to
476
- * `false` fetches visualizations incrementally as
477
- * users scroll the page to view the charts and tables.
478
- *
479
- * From SDK 1.52.0, enabling `fullHeight` also turns on
480
- * {@link lazyLoadingForFullHeight} and
481
- * {@link enableScrollableContainerLazyLoading}, so visualizations load as
482
- * they scroll into view. Set either flag to `false` to opt out.
483
- *
484
- * Supported embed types: `AppEmbed`
485
- * @version SDK: 1.21.0 | ThoughtSpot: 9.4.0.cl, 9.4.0-sw
486
- * @example
487
- * ```js
488
- * const embed = new AppEmbed('#tsEmbed', {
489
- * ... // other embed view config
490
- * fullHeight: true,
491
- * })
492
- * ```
493
- */
494
- fullHeight?: boolean;
495
467
  /**
496
468
  * Enables the V2 navigation and modular home page experience.
497
469
  * For more information,
@@ -693,79 +665,7 @@ export interface AppViewConfig extends AllEmbedViewConfig {
693
665
  */
694
666
  isGranularXLSXCSVSchedulesEnabled?: boolean;
695
667
 
696
- /**
697
- * Loads visualizations only as they scroll into the viewport, instead of
698
- * loading the whole full-height Liveboard at once.
699
- *
700
- * From SDK 1.52.0 this is enabled automatically whenever `fullHeight` is
701
- * `true`. On SDK 1.51.0 and earlier it defaulted to `false` and had to be
702
- * set explicitly. Set it to `false` to load every visualization upfront.
703
- * The flag has no effect unless `fullHeight` is enabled.
704
- *
705
- * @type {boolean}
706
- * @version SDK: 1.40.0 | ThoughtSpot: 10.12.0.cl
707
- * @default true when `fullHeight` is enabled, from SDK 1.52.0
708
- * @example
709
- * ```js
710
- * const embed = new AppEmbed('#embed-container', {
711
- * // ...other options
712
- * fullHeight: true,
713
- * lazyLoadingForFullHeight: true,
714
- * })
715
- * ```
716
- */
717
- lazyLoadingForFullHeight?: boolean;
718
- /**
719
- * Computes the visible region of the embed against its scrollable and
720
- * clipping ancestors, instead of treating the browser window as the only
721
- * viewport, and tracks scroll and resize on those ancestors.
722
- *
723
- * From SDK 1.52.0 this is enabled automatically whenever `fullHeight` is
724
- * `true`. On SDK 1.51.0 and earlier it defaulted to `false` and had to be
725
- * set explicitly. Set it to `false` when the page scrolls with the window
726
- * and the embed has no clipping ancestor, to skip the extra ancestor
727
- * tracking.
728
- *
729
- * @type {boolean}
730
- * @default true when `fullHeight` is enabled, from SDK 1.52.0
731
- * @hidden
732
- */
733
- enableScrollableContainerLazyLoading?: boolean;
734
668
 
735
- /**
736
- * How far outside the viewport a visualization starts loading, when
737
- * {@link lazyLoadingForFullHeight} is enabled.
738
- *
739
- * For example, if the margin is set to '10px',
740
- * the visualization will be loaded 10px before its top edge is visible in the
741
- * viewport.
742
- *
743
- * The format is similar to CSS margin, so `'500px 0px'` extends the
744
- * prefetch 500px above and below the viewport and not sideways. Accepted
745
- * units are `px`, `em`, `rem`, `%`, `vh` and `vw`, plus bare `0` and
746
- * `auto`; an invalid value is logged and ignored.
747
- *
748
- * From SDK 1.52.0 this defaults to `'500px 0px'` — roughly one
749
- * visualization ahead of the scroll position, so a chart has usually
750
- * finished loading by the time it scrolls into view. Use a smaller margin
751
- * to cut warehouse queries further, or `'0px'` to load a visualization
752
- * only once it is actually visible.
753
- *
754
- * @type {string}
755
- * @version SDK: 1.40.0 | ThoughtSpot: 10.12.0.cl
756
- * @default '500px 0px' when `fullHeight` is enabled, from SDK 1.52.0
757
- * @example
758
- * ```js
759
- * const embed = new AppEmbed('#embed-container', {
760
- * // ...other options
761
- * fullHeight: true,
762
- * lazyLoadingForFullHeight: true,
763
- * // Using 0px, the visualization will be only loaded when it's visible in the viewport.
764
- * lazyLoadingMargin: '0px',
765
- * })
766
- * ```
767
- */
768
- lazyLoadingMargin?: string;
769
669
 
770
670
  /**
771
671
  * updatedSpotterChatPrompt : Controls the updated spotter chat prompt.
@@ -954,23 +854,6 @@ export interface AppViewConfig extends AllEmbedViewConfig {
954
854
  * @default false
955
855
  */
956
856
  enableStopAnswerGenerationEmbed?: boolean;
957
- /**
958
- * This is the minimum height (in pixels) for a full-height App.
959
- * Setting this height helps resolve issues with empty Apps and
960
- * other screens navigable from an App.
961
- *
962
- * @version SDK: 1.44.2 | ThoughtSpot: 10.15.0.cl
963
- * @default 500
964
- * @example
965
- * ```js
966
- * const embed = new AppEmbed('#embed', {
967
- * ... // other app view config
968
- * fullHeight: true,
969
- * minimumHeight: 600,
970
- * });
971
- * ```
972
- */
973
- minimumHeight?: number;
974
857
  /**
975
858
  * To enable the homepage announcement banner.
976
859
  * Controls the visibility of the announcement section
@@ -1022,6 +905,21 @@ export interface AppViewConfig extends AllEmbedViewConfig {
1022
905
  * ```
1023
906
  */
1024
907
  updatedSpotterExperience?: boolean;
908
+
909
+ /**
910
+ * If set to `true`, the answer edit panel is hidden.
911
+ *
912
+ * Supported embed types: `AppEmbed`
913
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
914
+ * @example
915
+ * ```js
916
+ * const embed = new AppEmbed('#tsEmbed', {
917
+ * ... // other embed view config
918
+ * hideAnswerEditPanel: true,
919
+ * })
920
+ * ```
921
+ */
922
+ hideAnswerEditPanel?: boolean;
1025
923
  }
1026
924
 
1027
925
  /**
@@ -1044,33 +942,22 @@ export interface AppEmbedAppInitData extends DefaultAppInitData {
1044
942
  export class AppEmbed extends V1Embed {
1045
943
  protected viewConfig: AppViewConfig;
1046
944
 
1047
- private defaultHeight = 500;
1048
-
1049
- private lazyLoadScrollContainers: HTMLElement[] = [];
1050
-
1051
- private lazyLoadResizeObserver: ResizeObserver | undefined;
945
+ private readonly fullHeightController?: FullHeightController;
1052
946
 
1053
947
  constructor(domSelector: DOMSelector, viewConfig: AppViewConfig) {
1054
948
  viewConfig.embedComponentType = 'AppEmbed';
1055
949
  super(domSelector, viewConfig);
1056
950
  if (this.viewConfig.fullHeight === true) {
1057
- if (this.viewConfig.lazyLoadingForFullHeight === undefined) {
1058
- this.viewConfig.lazyLoadingForFullHeight = true;
1059
- }
1060
- if (this.viewConfig.enableScrollableContainerLazyLoading === undefined) {
1061
- this.viewConfig.enableScrollableContainerLazyLoading = true;
1062
- }
1063
- if (this.viewConfig.lazyLoadingMargin === undefined) {
1064
- this.viewConfig.lazyLoadingMargin = DEFAULT_LAZY_LOADING_MARGIN;
1065
- }
1066
-
1067
- this.on(EmbedEvent.RouteChange, this.setIframeHeightForNonEmbedLiveboard);
1068
- this.on(EmbedEvent.EmbedHeight, this.updateIFrameHeight);
1069
- this.on(EmbedEvent.EmbedIframeCenter, this.embedIframeCenter);
1070
- this.on(
1071
- EmbedEvent.RequestVisibleEmbedCoordinates,
1072
- this.requestVisibleEmbedCoordinatesHandler,
1073
- );
951
+ this.fullHeightController = new FullHeightController(this.viewConfig, {
952
+ getIframe: () => this.iFrame,
953
+ setFrameHeight: (height) => this.setIFrameHeight(height),
954
+ on: (eventType, callback) => {
955
+ this.on(eventType, callback);
956
+ },
957
+ trigger: (hostEvent, data) => {
958
+ this.trigger(hostEvent, data);
959
+ },
960
+ });
1074
961
  }
1075
962
  }
1076
963
 
@@ -1122,7 +1009,6 @@ export class AppEmbed extends V1Embed {
1122
1009
  hideOrgSwitcher,
1123
1010
  enableSearchAssist,
1124
1011
  newConnectionsExperience,
1125
- fullHeight,
1126
1012
  dataPanelV2 = true,
1127
1013
  updatedSpotterExperience,
1128
1014
  hideLiveboardHeader = false,
@@ -1165,11 +1051,11 @@ export class AppEmbed extends V1Embed {
1165
1051
  enableStopAnswerGenerationEmbed,
1166
1052
  spotterChatConfig,
1167
1053
  spotterDataSources,
1168
- minimumHeight,
1169
1054
  isThisPeriodInDateFiltersEnabled,
1170
1055
  enableHomepageAnnouncement = false,
1171
1056
  isContinuousLiveboardPDFEnabled,
1172
1057
  enableLiveboardDataCache,
1058
+ hideAnswerEditPanel,
1173
1059
  } = this.viewConfig;
1174
1060
 
1175
1061
  let params: any = {};
@@ -1207,6 +1093,9 @@ export class AppEmbed extends V1Embed {
1207
1093
  if (!isUndefined(coverAndFilterOptionInPDF)) {
1208
1094
  params[Param.CoverAndFilterOptionInPDF] = !!coverAndFilterOptionInPDF;
1209
1095
  }
1096
+ if (!isUndefined(hideAnswerEditPanel)) {
1097
+ params[Param.ShowAnswerEditPanel] = !hideAnswerEditPanel;
1098
+ }
1210
1099
 
1211
1100
  params = this.getBaseQueryParams(params);
1212
1101
 
@@ -1270,15 +1159,7 @@ export class AppEmbed extends V1Embed {
1270
1159
  params[Param.HideNotification] = !!hideNotification;
1271
1160
  }
1272
1161
 
1273
- if (fullHeight === true) {
1274
- params[Param.fullHeight] = true;
1275
- if (this.viewConfig.lazyLoadingForFullHeight) {
1276
- params[Param.IsLazyLoadingForEmbedEnabled] = true;
1277
- if (isValidCssMargin(this.viewConfig.lazyLoadingMargin)) {
1278
- params[Param.RootMarginForLazyLoad] = this.viewConfig.lazyLoadingMargin;
1279
- }
1280
- }
1281
- }
1162
+ this.fullHeightController?.addQueryParams(params);
1282
1163
 
1283
1164
  if (tag) {
1284
1165
  params[Param.Tag] = tag;
@@ -1371,8 +1252,6 @@ export class AppEmbed extends V1Embed {
1371
1252
  params[Param.IsWYSIWYGLiveboardPDFEnabled] = isContinuousLiveboardPDFEnabled;
1372
1253
  }
1373
1254
 
1374
- this.defaultHeight = minimumHeight || this.defaultHeight;
1375
-
1376
1255
  if (enableLiveboardDataCache !== undefined) {
1377
1256
  params[Param.EnableLiveboardDataCache] = enableLiveboardDataCache;
1378
1257
  }
@@ -1428,32 +1307,6 @@ export class AppEmbed extends V1Embed {
1428
1307
  return params;
1429
1308
  }
1430
1309
 
1431
- private sendFullHeightLazyLoadData = () => {
1432
- const data = calculateVisibleElementData(
1433
- this.iFrame,
1434
- this.viewConfig.enableScrollableContainerLazyLoading,
1435
- );
1436
- // this should be fired only if the lazyLoadingForFullHeight and fullHeight are true
1437
- if(this.viewConfig.lazyLoadingForFullHeight && this.viewConfig.fullHeight){
1438
- this.trigger(HostEvent.VisibleEmbedCoordinates, data);
1439
- }
1440
- }
1441
-
1442
- /**
1443
- * This is a handler for the RequestVisibleEmbedCoordinates event.
1444
- * It is used to send the visible coordinates data to the host application.
1445
- * @param data The event payload
1446
- * @param responder The responder function
1447
- */
1448
- private requestVisibleEmbedCoordinatesHandler = (data: MessagePayload, responder: any) => {
1449
- logger.info('Sending RequestVisibleEmbedCoordinates', data);
1450
- const visibleCoordinatesData = calculateVisibleElementData(
1451
- this.iFrame,
1452
- this.viewConfig.enableScrollableContainerLazyLoading,
1453
- );
1454
- responder({ type: EmbedEvent.RequestVisibleEmbedCoordinates, data: visibleCoordinatesData });
1455
- }
1456
-
1457
1310
  /**
1458
1311
  * Constructs the URL of the ThoughtSpot app page to be rendered.
1459
1312
  * @param pageId The ID of the page to be embedded.
@@ -1469,44 +1322,6 @@ export class AppEmbed extends V1Embed {
1469
1322
  return url;
1470
1323
  }
1471
1324
 
1472
- /**
1473
- * Set the iframe height as per the computed height received
1474
- * from the ThoughtSpot app.
1475
- * @param data The event payload
1476
- */
1477
- protected updateIFrameHeight = (data: MessagePayload) => {
1478
- this.setIFrameHeight(Math.max(data.data, this.defaultHeight));
1479
- this.sendFullHeightLazyLoadData();
1480
- };
1481
-
1482
- private embedIframeCenter = (data: MessagePayload, responder: any) => {
1483
- const obj = this.getIframeCenter();
1484
- responder({ type: EmbedEvent.EmbedIframeCenter, data: obj });
1485
- };
1486
-
1487
- private setIframeHeightForNonEmbedLiveboard = (data: MessagePayload) => {
1488
- const { height: frameHeight } = this.viewConfig.frameParams || {};
1489
-
1490
- const liveboardRelatedRoutes = [
1491
- '/pinboard/',
1492
- '/insights/pinboard/',
1493
- '/schedules/',
1494
- '/embed/viz/',
1495
- '/embed/insights/viz/',
1496
- '/liveboard/',
1497
- '/insights/liveboard/',
1498
- '/tsl-editor/PINBOARD_ANSWER_BOOK/',
1499
- '/import-tsl/PINBOARD_ANSWER_BOOK/',
1500
- ];
1501
-
1502
- if (liveboardRelatedRoutes.some((path) => data.data.currentPath.startsWith(path))) {
1503
- // Ignore the height reset of the frame, if the navigation is
1504
- // only within the liveboard page.
1505
- return;
1506
- }
1507
- this.setIFrameHeight(frameHeight || this.defaultHeight);
1508
- };
1509
-
1510
1325
  /**
1511
1326
  * Gets the ThoughtSpot route of the page for a particular page ID.
1512
1327
  * @param pageId The identifier for a page in the ThoughtSpot app.
@@ -1596,53 +1411,11 @@ export class AppEmbed extends V1Embed {
1596
1411
  */
1597
1412
  public destroy() {
1598
1413
  super.destroy();
1599
- this.unregisterLazyLoadEvents();
1414
+ this.fullHeightController?.destroy();
1600
1415
  }
1601
1416
 
1602
1417
  private postRender() {
1603
- this.registerLazyLoadEvents();
1604
- }
1605
-
1606
- private registerLazyLoadEvents() {
1607
- if (!this.iFrame) {
1608
- return;
1609
- }
1610
- if (this.viewConfig.fullHeight && this.viewConfig.lazyLoadingForFullHeight) {
1611
- this.unregisterLazyLoadEvents();
1612
- // TODO: Use passive: true, install modernizr to check for passive
1613
- window.addEventListener('resize', this.sendFullHeightLazyLoadData);
1614
- window.addEventListener('scroll', this.sendFullHeightLazyLoadData, true);
1615
- if (!this.viewConfig.enableScrollableContainerLazyLoading) {
1616
- return;
1617
- }
1618
- this.lazyLoadScrollContainers = getScrollableAncestors(this.iFrame);
1619
- this.lazyLoadScrollContainers.forEach((scrollContainer) => {
1620
- scrollContainer.addEventListener('scroll', this.sendFullHeightLazyLoadData);
1621
- });
1622
- if (typeof ResizeObserver !== 'undefined') {
1623
- const resizeTargets = new Set([
1624
- this.iFrame.parentElement,
1625
- ...getEffectiveClippingAncestors(this.iFrame),
1626
- ].filter(Boolean) as HTMLElement[]);
1627
- this.lazyLoadResizeObserver = new ResizeObserver(this.sendFullHeightLazyLoadData);
1628
- resizeTargets.forEach((resizeTarget) => {
1629
- this.lazyLoadResizeObserver.observe(resizeTarget);
1630
- });
1631
- }
1632
- }
1633
- }
1634
-
1635
- private unregisterLazyLoadEvents() {
1636
- if (this.viewConfig.fullHeight && this.viewConfig.lazyLoadingForFullHeight) {
1637
- window.removeEventListener('resize', this.sendFullHeightLazyLoadData);
1638
- window.removeEventListener('scroll', this.sendFullHeightLazyLoadData, true);
1639
- this.lazyLoadResizeObserver?.disconnect();
1640
- this.lazyLoadResizeObserver = undefined;
1641
- this.lazyLoadScrollContainers.forEach((scrollContainer) => {
1642
- scrollContainer.removeEventListener('scroll', this.sendFullHeightLazyLoadData);
1643
- });
1644
- this.lazyLoadScrollContainers = [];
1645
- }
1418
+ this.fullHeightController?.onRender();
1646
1419
  }
1647
1420
 
1648
1421
  /**
@@ -229,7 +229,7 @@ export interface SpotterShareConversationConfig {
229
229
 
230
230
  /**
231
231
  * A single starter prompt question shown under a category pill.
232
- * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
232
+ * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
233
233
  * @group Embed components
234
234
  */
235
235
  export interface StarterPromptQuestion {
@@ -248,7 +248,7 @@ export interface StarterPromptQuestion {
248
248
  /**
249
249
  * Configuration for a starter prompt category with questions
250
250
  * (`quick` and `research`).
251
- * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
251
+ * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
252
252
  * @group Embed components
253
253
  */
254
254
  export interface StarterPromptCategory {
@@ -267,7 +267,7 @@ export interface StarterPromptCategory {
267
267
  /**
268
268
  * Configuration for the Data Literacy starter prompt category.
269
269
  * Only the label is customizable; the prompt text comes from the backend.
270
- * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
270
+ * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
271
271
  * @group Embed components
272
272
  */
273
273
  export interface StarterPreviewDataCategory {
@@ -286,7 +286,7 @@ export interface StarterPreviewDataCategory {
286
286
  * Note: this controls the Spotter chat interface only. The starter prompts on
287
287
  * the Liveboard SpotterViz surface are configured separately through
288
288
  * {@link SpotterVizConfig.customStarterPrompts}.
289
- * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
289
+ * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
290
290
  * @group Embed components
291
291
  */
292
292
  export interface StarterPromptsConfig {
@@ -367,7 +367,7 @@ export interface SpotterChatViewConfig {
367
367
  * `Action.DeepAnalysisPill` and `Action.DataLiteracyPill`.
368
368
  *
369
369
  * Supported embed types: `SpotterEmbed`, `LiveboardEmbed`, `AppEmbed`
370
- * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
370
+ * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
371
371
  * @example
372
372
  * ```js
373
373
  * const embed = new SpotterEmbed('#tsEmbed', {
@@ -9,6 +9,7 @@ import {
9
9
  LiveboardEmbed,
10
10
  AppEmbed,
11
11
  HostEvent,
12
+ MessageCallback,
12
13
  } from '../index';
13
14
  import {
14
15
  EVENT_WAIT_TIME,
@@ -139,7 +140,7 @@ describe('test communication between host app and ThoughtSpot', () => {
139
140
  searchEmbed.render();
140
141
  setTimeout(() => {
141
142
  searchEmbed.trigger(HostEvent.Search, {
142
- body: PAYLOAD,
143
+ searchQuery: PAYLOAD,
143
144
  });
144
145
  }, EVENT_WAIT_TIME);
145
146
  executeAfterWait(() => {
@@ -147,12 +148,23 @@ describe('test communication between host app and ThoughtSpot', () => {
147
148
 
148
149
  iframe.contentWindow.addEventListener('message', (e) => {
149
150
  expect(e.data.type).toBe(HostEvent.Search);
150
- expect(e.data.data.body).toBe(PAYLOAD);
151
+ expect(e.data.data.searchQuery).toBe(PAYLOAD);
151
152
  done();
152
153
  });
153
154
  });
154
155
  });
155
156
 
157
+ test('accepts a MessageCallback-typed handler for typed and untyped events', () => {
158
+ // Guardrail: on()/off() must accept the public MessageCallback type, or
159
+ // existing customer handlers stop compiling (checked non-strict here).
160
+ const legacy: MessageCallback = jest.fn();
161
+ const searchEmbed = new SearchEmbed(getRootEl(), {});
162
+ searchEmbed.on(EmbedEvent.CustomAction, legacy); // typed event
163
+ searchEmbed.on(EmbedEvent.Data, legacy); // untyped event
164
+ searchEmbed.off(EmbedEvent.Data, legacy);
165
+ expect(legacy).not.toHaveBeenCalled();
166
+ });
167
+
156
168
  test('should execute multiple event handlers if registered', async () => {
157
169
  const handlerOne = jest.fn();
158
170
  const handlerTwo = jest.fn();
@@ -6,8 +6,8 @@ import {
6
6
  UIPassthroughEvent,
7
7
  UIPassthroughRequest,
8
8
  UIPassthroughArrayResponse,
9
- HostEventRequest,
10
- } from './contracts';
9
+ } from '../../contracts/ui-passthrough-contracts';
10
+ import { HostEventRequest } from '../../contracts/host-event-contracts';
11
11
  import { HostEventClient } from './host-event-client';
12
12
 
13
13
  jest.mock('../../utils/processTrigger');
@@ -12,13 +12,17 @@ import {
12
12
  import {
13
13
  UIPassthroughArrayResponse,
14
14
  UIPassthroughEvent,
15
- HostEventRequest,
16
- HostEventResponse,
17
15
  UIPassthroughRequest,
18
16
  UIPassthroughResponse,
17
+ } from '../../contracts/ui-passthrough-contracts';
18
+ // Contract resolution from the shared contracts module — see
19
+ // src/contracts/host-event-contracts.ts (single source of truth).
20
+ import {
21
+ HostEventRequest,
22
+ HostEventResponse,
19
23
  TriggerPayload,
20
24
  TriggerResponse,
21
- } from './contracts';
25
+ } from '../../contracts/host-event-contracts';
22
26
 
23
27
  /**
24
28
  * Maps HostEvent to its corresponding UIPassthroughEvent.
@@ -244,7 +248,16 @@ export class HostEventClient {
244
248
  throwUpdateFiltersValidationError();
245
249
  }
246
250
 
247
- return this.handleHostEventWithParam(UIPassthroughEvent.UpdateFilters, payload, context as ContextType);
251
+ // The shared contract accepts both current (columnName/operator) and
252
+ // legacy (column/oper) filter field names — as does the validation
253
+ // above and the app at runtime. The UIPassthrough FilterUpdate type
254
+ // still requires the legacy names; bridge until that contract is
255
+ // audited.
256
+ return this.handleHostEventWithParam(
257
+ UIPassthroughEvent.UpdateFilters,
258
+ payload as UIPassthroughRequest<UIPassthroughEvent.UpdateFilters>,
259
+ context as ContextType,
260
+ );
248
261
  }
249
262
 
250
263
  protected handleUpdateParametersEvent(
@@ -287,7 +300,7 @@ export class HostEventClient {
287
300
  hostEvent: HostEventT,
288
301
  payload?: TriggerPayload<PayloadT, HostEventT>,
289
302
  context?: ContextT,
290
- ): Promise<TriggerResponse<PayloadT, HostEventT, ContextType>> {
303
+ ): Promise<TriggerResponse<PayloadT, HostEventT, ContextT>> {
291
304
  const customHandler = this.customHandlers[hostEvent];
292
305
  const passthroughEvent = PASSTHROUGH_MAP[hostEvent];
293
306
 
@@ -4,7 +4,8 @@ import isString from 'lodash/isString';
4
4
  import isUndefined from 'lodash/isUndefined';
5
5
  import { EmbedErrorCodes, EmbedEvent, ErrorDetailsTypes, HostEvent } from '../../types';
6
6
  import { ERROR_MESSAGE } from '../../errors';
7
- import { ApplicabilityLevel, HostEventRequest } from './contracts';
7
+ import { ApplicabilityLevel } from '../../contracts/ui-passthrough-contracts';
8
+ import { HostEventRequest } from '../../contracts/host-event-contracts';
8
9
  import { embedEventStatus } from '../../utils';
9
10
 
10
11
  const isValidApplicability = (a?: { level?: string; targetId?: string }) => {