@thoughtspot/visual-embed-sdk 1.40.1-alpha.3 → 1.40.2

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 (413) hide show
  1. package/cjs/package.json +2 -2
  2. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  3. package/cjs/src/embed/ts-embed.js +13 -2
  4. package/cjs/src/embed/ts-embed.js.map +1 -1
  5. package/cjs/src/embed/ts-embed.spec.d.ts.map +1 -1
  6. package/cjs/src/embed/ts-embed.spec.js +124 -2
  7. package/cjs/src/embed/ts-embed.spec.js.map +1 -1
  8. package/cjs/src/errors.d.ts +11 -0
  9. package/cjs/src/errors.d.ts.map +1 -1
  10. package/cjs/src/errors.js +12 -1
  11. package/cjs/src/errors.js.map +1 -1
  12. package/cjs/src/index.d.ts +2 -2
  13. package/cjs/src/index.d.ts.map +1 -1
  14. package/cjs/src/index.js +3 -1
  15. package/cjs/src/index.js.map +1 -1
  16. package/cjs/src/react/index.d.ts +1 -1
  17. package/cjs/src/react/index.d.ts.map +1 -1
  18. package/cjs/src/react/index.js +2 -1
  19. package/cjs/src/react/index.js.map +1 -1
  20. package/cjs/src/types.d.ts +94 -3
  21. package/cjs/src/types.d.ts.map +1 -1
  22. package/cjs/src/types.js +22 -11
  23. package/cjs/src/types.js.map +1 -1
  24. package/cjs/src/utils/custom-actions.d.ts +12 -0
  25. package/cjs/src/utils/custom-actions.d.ts.map +1 -0
  26. package/cjs/src/utils/custom-actions.js +191 -0
  27. package/cjs/src/utils/custom-actions.js.map +1 -0
  28. package/cjs/src/utils/custom-actions.spec.d.ts +2 -0
  29. package/cjs/src/utils/custom-actions.spec.d.ts.map +1 -0
  30. package/cjs/src/utils/custom-actions.spec.js +437 -0
  31. package/cjs/src/utils/custom-actions.spec.js.map +1 -0
  32. package/cjs/src/utils.d.ts +7 -0
  33. package/cjs/src/utils.d.ts.map +1 -1
  34. package/cjs/src/utils.js +11 -1
  35. package/cjs/src/utils.js.map +1 -1
  36. package/cjs/src/utils.spec.js +28 -0
  37. package/cjs/src/utils.spec.js.map +1 -1
  38. package/dist/{index-B0uCTBbm.js → index-Dx5UP5Ip.js} +1 -1
  39. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  40. package/dist/src/embed/ts-embed.spec.d.ts.map +1 -1
  41. package/dist/src/errors.d.ts +11 -0
  42. package/dist/src/errors.d.ts.map +1 -1
  43. package/dist/src/index.d.ts +2 -2
  44. package/dist/src/index.d.ts.map +1 -1
  45. package/dist/src/react/index.d.ts +1 -1
  46. package/dist/src/react/index.d.ts.map +1 -1
  47. package/dist/src/types.d.ts +94 -3
  48. package/dist/src/types.d.ts.map +1 -1
  49. package/dist/src/utils/custom-actions.d.ts +12 -0
  50. package/dist/src/utils/custom-actions.d.ts.map +1 -0
  51. package/dist/src/utils/custom-actions.spec.d.ts +2 -0
  52. package/dist/src/utils/custom-actions.spec.d.ts.map +1 -0
  53. package/dist/src/utils.d.ts +7 -0
  54. package/dist/src/utils.d.ts.map +1 -1
  55. package/dist/tsembed-react.es.js +1684 -201
  56. package/dist/tsembed-react.js +1683 -200
  57. package/dist/tsembed.es.js +1636 -153
  58. package/dist/tsembed.js +1635 -152
  59. package/dist/visual-embed-sdk-react-full.d.ts +95 -4
  60. package/dist/visual-embed-sdk-react.d.ts +95 -4
  61. package/dist/visual-embed-sdk.d.ts +95 -4
  62. package/lib/package.json +2 -2
  63. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  64. package/lib/src/embed/ts-embed.js +13 -2
  65. package/lib/src/embed/ts-embed.js.map +1 -1
  66. package/lib/src/embed/ts-embed.spec.d.ts.map +1 -1
  67. package/lib/src/embed/ts-embed.spec.js +125 -3
  68. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  69. package/lib/src/errors.d.ts +11 -0
  70. package/lib/src/errors.d.ts.map +1 -1
  71. package/lib/src/errors.js +11 -0
  72. package/lib/src/errors.js.map +1 -1
  73. package/lib/src/index.d.ts +2 -2
  74. package/lib/src/index.d.ts.map +1 -1
  75. package/lib/src/index.js +2 -2
  76. package/lib/src/index.js.map +1 -1
  77. package/lib/src/react/index.d.ts +1 -1
  78. package/lib/src/react/index.d.ts.map +1 -1
  79. package/lib/src/react/index.js +1 -1
  80. package/lib/src/react/index.js.map +1 -1
  81. package/lib/src/types.d.ts +94 -3
  82. package/lib/src/types.d.ts.map +1 -1
  83. package/lib/src/types.js +21 -10
  84. package/lib/src/types.js.map +1 -1
  85. package/lib/src/utils/custom-actions.d.ts +12 -0
  86. package/lib/src/utils/custom-actions.d.ts.map +1 -0
  87. package/lib/src/utils/custom-actions.js +186 -0
  88. package/lib/src/utils/custom-actions.js.map +1 -0
  89. package/lib/src/utils/custom-actions.spec.d.ts +2 -0
  90. package/lib/src/utils/custom-actions.spec.d.ts.map +1 -0
  91. package/lib/src/utils/custom-actions.spec.js +435 -0
  92. package/lib/src/utils/custom-actions.spec.js.map +1 -0
  93. package/lib/src/utils.d.ts +7 -0
  94. package/lib/src/utils.d.ts.map +1 -1
  95. package/lib/src/utils.js +9 -0
  96. package/lib/src/utils.js.map +1 -1
  97. package/lib/src/utils.spec.js +29 -1
  98. package/lib/src/utils.spec.js.map +1 -1
  99. package/lib/src/visual-embed-sdk.d.ts +96 -5
  100. package/package.json +2 -2
  101. package/src/embed/ts-embed.spec.ts +137 -3
  102. package/src/embed/ts-embed.ts +13 -1
  103. package/src/errors.ts +12 -0
  104. package/src/index.ts +4 -0
  105. package/src/react/index.tsx +1 -0
  106. package/src/types.ts +110 -15
  107. package/src/utils/custom-actions.spec.ts +471 -0
  108. package/src/utils/custom-actions.ts +228 -0
  109. package/src/utils.spec.ts +34 -0
  110. package/src/utils.ts +10 -0
  111. package/dist/es/index-BwesxE_h.js +0 -7369
  112. package/dist/es/index.js +0 -17539
  113. package/dist/es/react/index.js +0 -24039
  114. package/dist/es/react/src/auth.d.ts +0 -171
  115. package/dist/es/react/src/auth.d.ts.map +0 -1
  116. package/dist/es/react/src/auth.spec.d.ts +0 -15
  117. package/dist/es/react/src/auth.spec.d.ts.map +0 -1
  118. package/dist/es/react/src/authToken.d.ts +0 -17
  119. package/dist/es/react/src/authToken.d.ts.map +0 -1
  120. package/dist/es/react/src/authToken.spec.d.ts +0 -2
  121. package/dist/es/react/src/authToken.spec.d.ts.map +0 -1
  122. package/dist/es/react/src/config.d.ts +0 -21
  123. package/dist/es/react/src/config.d.ts.map +0 -1
  124. package/dist/es/react/src/config.spec.d.ts +0 -5
  125. package/dist/es/react/src/config.spec.d.ts.map +0 -1
  126. package/dist/es/react/src/css-variables.d.ts +0 -384
  127. package/dist/es/react/src/css-variables.d.ts.map +0 -1
  128. package/dist/es/react/src/embed/app.d.ts +0 -478
  129. package/dist/es/react/src/embed/app.d.ts.map +0 -1
  130. package/dist/es/react/src/embed/app.spec.d.ts +0 -2
  131. package/dist/es/react/src/embed/app.spec.d.ts.map +0 -1
  132. package/dist/es/react/src/embed/base.d.ts +0 -136
  133. package/dist/es/react/src/embed/base.d.ts.map +0 -1
  134. package/dist/es/react/src/embed/base.spec.d.ts +0 -2
  135. package/dist/es/react/src/embed/base.spec.d.ts.map +0 -1
  136. package/dist/es/react/src/embed/bodyless-conversation.d.ts +0 -26
  137. package/dist/es/react/src/embed/bodyless-conversation.d.ts.map +0 -1
  138. package/dist/es/react/src/embed/bodyless-conversation.spec.d.ts +0 -2
  139. package/dist/es/react/src/embed/bodyless-conversation.spec.d.ts.map +0 -1
  140. package/dist/es/react/src/embed/conversation.d.ts +0 -43
  141. package/dist/es/react/src/embed/conversation.d.ts.map +0 -1
  142. package/dist/es/react/src/embed/conversation.spec.d.ts +0 -2
  143. package/dist/es/react/src/embed/conversation.spec.d.ts.map +0 -1
  144. package/dist/es/react/src/embed/embed.spec.d.ts +0 -2
  145. package/dist/es/react/src/embed/embed.spec.d.ts.map +0 -1
  146. package/dist/es/react/src/embed/embedConfig.d.ts +0 -17
  147. package/dist/es/react/src/embed/embedConfig.d.ts.map +0 -1
  148. package/dist/es/react/src/embed/events.spec.d.ts +0 -2
  149. package/dist/es/react/src/embed/events.spec.d.ts.map +0 -1
  150. package/dist/es/react/src/embed/liveboard.d.ts +0 -379
  151. package/dist/es/react/src/embed/liveboard.d.ts.map +0 -1
  152. package/dist/es/react/src/embed/liveboard.spec.d.ts +0 -2
  153. package/dist/es/react/src/embed/liveboard.spec.d.ts.map +0 -1
  154. package/dist/es/react/src/embed/pinboard.spec.d.ts +0 -2
  155. package/dist/es/react/src/embed/pinboard.spec.d.ts.map +0 -1
  156. package/dist/es/react/src/embed/sage.d.ts +0 -148
  157. package/dist/es/react/src/embed/sage.d.ts.map +0 -1
  158. package/dist/es/react/src/embed/sage.spec.d.ts +0 -2
  159. package/dist/es/react/src/embed/sage.spec.d.ts.map +0 -1
  160. package/dist/es/react/src/embed/search-bar.d.ts +0 -93
  161. package/dist/es/react/src/embed/search-bar.d.ts.map +0 -1
  162. package/dist/es/react/src/embed/search.d.ts +0 -282
  163. package/dist/es/react/src/embed/search.d.ts.map +0 -1
  164. package/dist/es/react/src/embed/search.spec.d.ts +0 -2
  165. package/dist/es/react/src/embed/search.spec.d.ts.map +0 -1
  166. package/dist/es/react/src/embed/ts-embed-trigger.spec.d.ts +0 -2
  167. package/dist/es/react/src/embed/ts-embed-trigger.spec.d.ts.map +0 -1
  168. package/dist/es/react/src/embed/ts-embed.d.ts +0 -374
  169. package/dist/es/react/src/embed/ts-embed.d.ts.map +0 -1
  170. package/dist/es/react/src/embed/ts-embed.spec.d.ts +0 -2
  171. package/dist/es/react/src/embed/ts-embed.spec.d.ts.map +0 -1
  172. package/dist/es/react/src/errors.d.ts +0 -19
  173. package/dist/es/react/src/errors.d.ts.map +0 -1
  174. package/dist/es/react/src/index.d.ts +0 -29
  175. package/dist/es/react/src/index.d.ts.map +0 -1
  176. package/dist/es/react/src/mixpanel-service.d.ts +0 -35
  177. package/dist/es/react/src/mixpanel-service.d.ts.map +0 -1
  178. package/dist/es/react/src/mixpanel-service.spec.d.ts +0 -2
  179. package/dist/es/react/src/mixpanel-service.spec.d.ts.map +0 -1
  180. package/dist/es/react/src/react/all-types-export.d.ts +0 -3
  181. package/dist/es/react/src/react/all-types-export.d.ts.map +0 -1
  182. package/dist/es/react/src/react/all-types-export.spec.d.ts +0 -2
  183. package/dist/es/react/src/react/all-types-export.spec.d.ts.map +0 -1
  184. package/dist/es/react/src/react/index.d.ts +0 -254
  185. package/dist/es/react/src/react/index.d.ts.map +0 -1
  186. package/dist/es/react/src/react/index.spec.d.ts +0 -3
  187. package/dist/es/react/src/react/index.spec.d.ts.map +0 -1
  188. package/dist/es/react/src/react/util.d.ts +0 -19
  189. package/dist/es/react/src/react/util.d.ts.map +0 -1
  190. package/dist/es/react/src/test/test-utils.d.ts +0 -61
  191. package/dist/es/react/src/test/test-utils.d.ts.map +0 -1
  192. package/dist/es/react/src/tokenizedFetch.d.ts +0 -18
  193. package/dist/es/react/src/tokenizedFetch.d.ts.map +0 -1
  194. package/dist/es/react/src/types.d.ts +0 -4363
  195. package/dist/es/react/src/types.d.ts.map +0 -1
  196. package/dist/es/react/src/utils/authService/authService.d.ts +0 -45
  197. package/dist/es/react/src/utils/authService/authService.d.ts.map +0 -1
  198. package/dist/es/react/src/utils/authService/authService.spec.d.ts +0 -2
  199. package/dist/es/react/src/utils/authService/authService.spec.d.ts.map +0 -1
  200. package/dist/es/react/src/utils/authService/index.d.ts +0 -3
  201. package/dist/es/react/src/utils/authService/index.d.ts.map +0 -1
  202. package/dist/es/react/src/utils/authService/tokenizedAuthService.d.ts +0 -22
  203. package/dist/es/react/src/utils/authService/tokenizedAuthService.d.ts.map +0 -1
  204. package/dist/es/react/src/utils/authService/tokenizedAuthService.spec.d.ts +0 -2
  205. package/dist/es/react/src/utils/authService/tokenizedAuthService.spec.d.ts.map +0 -1
  206. package/dist/es/react/src/utils/global-styles.d.ts +0 -2
  207. package/dist/es/react/src/utils/global-styles.d.ts.map +0 -1
  208. package/dist/es/react/src/utils/global-styles.spec.d.ts +0 -2
  209. package/dist/es/react/src/utils/global-styles.spec.d.ts.map +0 -1
  210. package/dist/es/react/src/utils/graphql/answerService/answer-queries.d.ts +0 -10
  211. package/dist/es/react/src/utils/graphql/answerService/answer-queries.d.ts.map +0 -1
  212. package/dist/es/react/src/utils/graphql/answerService/answerService.d.ts +0 -180
  213. package/dist/es/react/src/utils/graphql/answerService/answerService.d.ts.map +0 -1
  214. package/dist/es/react/src/utils/graphql/answerService/answerService.spec.d.ts +0 -2
  215. package/dist/es/react/src/utils/graphql/answerService/answerService.spec.d.ts.map +0 -1
  216. package/dist/es/react/src/utils/graphql/graphql-request.d.ts +0 -15
  217. package/dist/es/react/src/utils/graphql/graphql-request.d.ts.map +0 -1
  218. package/dist/es/react/src/utils/graphql/graphql-request.spec.d.ts +0 -2
  219. package/dist/es/react/src/utils/graphql/graphql-request.spec.d.ts.map +0 -1
  220. package/dist/es/react/src/utils/graphql/nlsService/conversation-queries.d.ts +0 -3
  221. package/dist/es/react/src/utils/graphql/nlsService/conversation-queries.d.ts.map +0 -1
  222. package/dist/es/react/src/utils/graphql/nlsService/conversation-service.d.ts +0 -12
  223. package/dist/es/react/src/utils/graphql/nlsService/conversation-service.d.ts.map +0 -1
  224. package/dist/es/react/src/utils/graphql/nlsService/nls-answer-queries.d.ts +0 -2
  225. package/dist/es/react/src/utils/graphql/nlsService/nls-answer-queries.d.ts.map +0 -1
  226. package/dist/es/react/src/utils/graphql/nlsService/nls-answer-service.d.ts +0 -17
  227. package/dist/es/react/src/utils/graphql/nlsService/nls-answer-service.d.ts.map +0 -1
  228. package/dist/es/react/src/utils/graphql/nlsService/nls-answer-service.spec.d.ts +0 -2
  229. package/dist/es/react/src/utils/graphql/nlsService/nls-answer-service.spec.d.ts.map +0 -1
  230. package/dist/es/react/src/utils/graphql/preview-service.d.ts +0 -9
  231. package/dist/es/react/src/utils/graphql/preview-service.d.ts.map +0 -1
  232. package/dist/es/react/src/utils/graphql/preview-service.spec.d.ts +0 -2
  233. package/dist/es/react/src/utils/graphql/preview-service.spec.d.ts.map +0 -1
  234. package/dist/es/react/src/utils/graphql/sourceService.d.ts +0 -8
  235. package/dist/es/react/src/utils/graphql/sourceService.d.ts.map +0 -1
  236. package/dist/es/react/src/utils/graphql/sourceService.spec.d.ts +0 -2
  237. package/dist/es/react/src/utils/graphql/sourceService.spec.d.ts.map +0 -1
  238. package/dist/es/react/src/utils/liveboardService/liveboardService.d.ts +0 -16
  239. package/dist/es/react/src/utils/liveboardService/liveboardService.d.ts.map +0 -1
  240. package/dist/es/react/src/utils/liveboardService/liveboardService.spec.d.ts +0 -2
  241. package/dist/es/react/src/utils/liveboardService/liveboardService.spec.d.ts.map +0 -1
  242. package/dist/es/react/src/utils/logger.d.ts +0 -18
  243. package/dist/es/react/src/utils/logger.d.ts.map +0 -1
  244. package/dist/es/react/src/utils/logger.spec.d.ts +0 -25
  245. package/dist/es/react/src/utils/logger.spec.d.ts.map +0 -1
  246. package/dist/es/react/src/utils/processData.d.ts +0 -22
  247. package/dist/es/react/src/utils/processData.d.ts.map +0 -1
  248. package/dist/es/react/src/utils/processData.spec.d.ts +0 -2
  249. package/dist/es/react/src/utils/processData.spec.d.ts.map +0 -1
  250. package/dist/es/react/src/utils/processTrigger.d.ts +0 -16
  251. package/dist/es/react/src/utils/processTrigger.d.ts.map +0 -1
  252. package/dist/es/react/src/utils/processTrigger.spec.d.ts +0 -2
  253. package/dist/es/react/src/utils/processTrigger.spec.d.ts.map +0 -1
  254. package/dist/es/react/src/utils/reporting.d.ts +0 -16
  255. package/dist/es/react/src/utils/reporting.d.ts.map +0 -1
  256. package/dist/es/react/src/utils/reporting.spec.d.ts +0 -2
  257. package/dist/es/react/src/utils/reporting.spec.d.ts.map +0 -1
  258. package/dist/es/react/src/utils/sessionInfoService.d.ts +0 -66
  259. package/dist/es/react/src/utils/sessionInfoService.d.ts.map +0 -1
  260. package/dist/es/react/src/utils.d.ts +0 -104
  261. package/dist/es/react/src/utils.d.ts.map +0 -1
  262. package/dist/es/react/src/utils.spec.d.ts +0 -2
  263. package/dist/es/react/src/utils.spec.d.ts.map +0 -1
  264. package/dist/es/src/auth.d.ts +0 -171
  265. package/dist/es/src/auth.d.ts.map +0 -1
  266. package/dist/es/src/auth.spec.d.ts +0 -15
  267. package/dist/es/src/auth.spec.d.ts.map +0 -1
  268. package/dist/es/src/authToken.d.ts +0 -17
  269. package/dist/es/src/authToken.d.ts.map +0 -1
  270. package/dist/es/src/authToken.spec.d.ts +0 -2
  271. package/dist/es/src/authToken.spec.d.ts.map +0 -1
  272. package/dist/es/src/config.d.ts +0 -21
  273. package/dist/es/src/config.d.ts.map +0 -1
  274. package/dist/es/src/config.spec.d.ts +0 -5
  275. package/dist/es/src/config.spec.d.ts.map +0 -1
  276. package/dist/es/src/css-variables.d.ts +0 -384
  277. package/dist/es/src/css-variables.d.ts.map +0 -1
  278. package/dist/es/src/embed/app.d.ts +0 -478
  279. package/dist/es/src/embed/app.d.ts.map +0 -1
  280. package/dist/es/src/embed/app.spec.d.ts +0 -2
  281. package/dist/es/src/embed/app.spec.d.ts.map +0 -1
  282. package/dist/es/src/embed/base.d.ts +0 -136
  283. package/dist/es/src/embed/base.d.ts.map +0 -1
  284. package/dist/es/src/embed/base.spec.d.ts +0 -2
  285. package/dist/es/src/embed/base.spec.d.ts.map +0 -1
  286. package/dist/es/src/embed/bodyless-conversation.d.ts +0 -26
  287. package/dist/es/src/embed/bodyless-conversation.d.ts.map +0 -1
  288. package/dist/es/src/embed/bodyless-conversation.spec.d.ts +0 -2
  289. package/dist/es/src/embed/bodyless-conversation.spec.d.ts.map +0 -1
  290. package/dist/es/src/embed/conversation.d.ts +0 -43
  291. package/dist/es/src/embed/conversation.d.ts.map +0 -1
  292. package/dist/es/src/embed/conversation.spec.d.ts +0 -2
  293. package/dist/es/src/embed/conversation.spec.d.ts.map +0 -1
  294. package/dist/es/src/embed/embed.spec.d.ts +0 -2
  295. package/dist/es/src/embed/embed.spec.d.ts.map +0 -1
  296. package/dist/es/src/embed/embedConfig.d.ts +0 -17
  297. package/dist/es/src/embed/embedConfig.d.ts.map +0 -1
  298. package/dist/es/src/embed/events.spec.d.ts +0 -2
  299. package/dist/es/src/embed/events.spec.d.ts.map +0 -1
  300. package/dist/es/src/embed/liveboard.d.ts +0 -379
  301. package/dist/es/src/embed/liveboard.d.ts.map +0 -1
  302. package/dist/es/src/embed/liveboard.spec.d.ts +0 -2
  303. package/dist/es/src/embed/liveboard.spec.d.ts.map +0 -1
  304. package/dist/es/src/embed/pinboard.spec.d.ts +0 -2
  305. package/dist/es/src/embed/pinboard.spec.d.ts.map +0 -1
  306. package/dist/es/src/embed/sage.d.ts +0 -148
  307. package/dist/es/src/embed/sage.d.ts.map +0 -1
  308. package/dist/es/src/embed/sage.spec.d.ts +0 -2
  309. package/dist/es/src/embed/sage.spec.d.ts.map +0 -1
  310. package/dist/es/src/embed/search-bar.d.ts +0 -93
  311. package/dist/es/src/embed/search-bar.d.ts.map +0 -1
  312. package/dist/es/src/embed/search.d.ts +0 -282
  313. package/dist/es/src/embed/search.d.ts.map +0 -1
  314. package/dist/es/src/embed/search.spec.d.ts +0 -2
  315. package/dist/es/src/embed/search.spec.d.ts.map +0 -1
  316. package/dist/es/src/embed/ts-embed-trigger.spec.d.ts +0 -2
  317. package/dist/es/src/embed/ts-embed-trigger.spec.d.ts.map +0 -1
  318. package/dist/es/src/embed/ts-embed.d.ts +0 -374
  319. package/dist/es/src/embed/ts-embed.d.ts.map +0 -1
  320. package/dist/es/src/embed/ts-embed.spec.d.ts +0 -2
  321. package/dist/es/src/embed/ts-embed.spec.d.ts.map +0 -1
  322. package/dist/es/src/errors.d.ts +0 -19
  323. package/dist/es/src/errors.d.ts.map +0 -1
  324. package/dist/es/src/index.d.ts +0 -29
  325. package/dist/es/src/index.d.ts.map +0 -1
  326. package/dist/es/src/mixpanel-service.d.ts +0 -35
  327. package/dist/es/src/mixpanel-service.d.ts.map +0 -1
  328. package/dist/es/src/mixpanel-service.spec.d.ts +0 -2
  329. package/dist/es/src/mixpanel-service.spec.d.ts.map +0 -1
  330. package/dist/es/src/react/all-types-export.d.ts +0 -3
  331. package/dist/es/src/react/all-types-export.d.ts.map +0 -1
  332. package/dist/es/src/react/all-types-export.spec.d.ts +0 -2
  333. package/dist/es/src/react/all-types-export.spec.d.ts.map +0 -1
  334. package/dist/es/src/react/index.d.ts +0 -254
  335. package/dist/es/src/react/index.d.ts.map +0 -1
  336. package/dist/es/src/react/index.spec.d.ts +0 -3
  337. package/dist/es/src/react/index.spec.d.ts.map +0 -1
  338. package/dist/es/src/react/util.d.ts +0 -19
  339. package/dist/es/src/react/util.d.ts.map +0 -1
  340. package/dist/es/src/test/test-utils.d.ts +0 -61
  341. package/dist/es/src/test/test-utils.d.ts.map +0 -1
  342. package/dist/es/src/tokenizedFetch.d.ts +0 -18
  343. package/dist/es/src/tokenizedFetch.d.ts.map +0 -1
  344. package/dist/es/src/types.d.ts +0 -4363
  345. package/dist/es/src/types.d.ts.map +0 -1
  346. package/dist/es/src/utils/authService/authService.d.ts +0 -45
  347. package/dist/es/src/utils/authService/authService.d.ts.map +0 -1
  348. package/dist/es/src/utils/authService/authService.spec.d.ts +0 -2
  349. package/dist/es/src/utils/authService/authService.spec.d.ts.map +0 -1
  350. package/dist/es/src/utils/authService/index.d.ts +0 -3
  351. package/dist/es/src/utils/authService/index.d.ts.map +0 -1
  352. package/dist/es/src/utils/authService/tokenizedAuthService.d.ts +0 -22
  353. package/dist/es/src/utils/authService/tokenizedAuthService.d.ts.map +0 -1
  354. package/dist/es/src/utils/authService/tokenizedAuthService.spec.d.ts +0 -2
  355. package/dist/es/src/utils/authService/tokenizedAuthService.spec.d.ts.map +0 -1
  356. package/dist/es/src/utils/global-styles.d.ts +0 -2
  357. package/dist/es/src/utils/global-styles.d.ts.map +0 -1
  358. package/dist/es/src/utils/global-styles.spec.d.ts +0 -2
  359. package/dist/es/src/utils/global-styles.spec.d.ts.map +0 -1
  360. package/dist/es/src/utils/graphql/answerService/answer-queries.d.ts +0 -10
  361. package/dist/es/src/utils/graphql/answerService/answer-queries.d.ts.map +0 -1
  362. package/dist/es/src/utils/graphql/answerService/answerService.d.ts +0 -180
  363. package/dist/es/src/utils/graphql/answerService/answerService.d.ts.map +0 -1
  364. package/dist/es/src/utils/graphql/answerService/answerService.spec.d.ts +0 -2
  365. package/dist/es/src/utils/graphql/answerService/answerService.spec.d.ts.map +0 -1
  366. package/dist/es/src/utils/graphql/graphql-request.d.ts +0 -15
  367. package/dist/es/src/utils/graphql/graphql-request.d.ts.map +0 -1
  368. package/dist/es/src/utils/graphql/graphql-request.spec.d.ts +0 -2
  369. package/dist/es/src/utils/graphql/graphql-request.spec.d.ts.map +0 -1
  370. package/dist/es/src/utils/graphql/nlsService/conversation-queries.d.ts +0 -3
  371. package/dist/es/src/utils/graphql/nlsService/conversation-queries.d.ts.map +0 -1
  372. package/dist/es/src/utils/graphql/nlsService/conversation-service.d.ts +0 -12
  373. package/dist/es/src/utils/graphql/nlsService/conversation-service.d.ts.map +0 -1
  374. package/dist/es/src/utils/graphql/nlsService/nls-answer-queries.d.ts +0 -2
  375. package/dist/es/src/utils/graphql/nlsService/nls-answer-queries.d.ts.map +0 -1
  376. package/dist/es/src/utils/graphql/nlsService/nls-answer-service.d.ts +0 -17
  377. package/dist/es/src/utils/graphql/nlsService/nls-answer-service.d.ts.map +0 -1
  378. package/dist/es/src/utils/graphql/nlsService/nls-answer-service.spec.d.ts +0 -2
  379. package/dist/es/src/utils/graphql/nlsService/nls-answer-service.spec.d.ts.map +0 -1
  380. package/dist/es/src/utils/graphql/preview-service.d.ts +0 -9
  381. package/dist/es/src/utils/graphql/preview-service.d.ts.map +0 -1
  382. package/dist/es/src/utils/graphql/preview-service.spec.d.ts +0 -2
  383. package/dist/es/src/utils/graphql/preview-service.spec.d.ts.map +0 -1
  384. package/dist/es/src/utils/graphql/sourceService.d.ts +0 -8
  385. package/dist/es/src/utils/graphql/sourceService.d.ts.map +0 -1
  386. package/dist/es/src/utils/graphql/sourceService.spec.d.ts +0 -2
  387. package/dist/es/src/utils/graphql/sourceService.spec.d.ts.map +0 -1
  388. package/dist/es/src/utils/liveboardService/liveboardService.d.ts +0 -16
  389. package/dist/es/src/utils/liveboardService/liveboardService.d.ts.map +0 -1
  390. package/dist/es/src/utils/liveboardService/liveboardService.spec.d.ts +0 -2
  391. package/dist/es/src/utils/liveboardService/liveboardService.spec.d.ts.map +0 -1
  392. package/dist/es/src/utils/logger.d.ts +0 -18
  393. package/dist/es/src/utils/logger.d.ts.map +0 -1
  394. package/dist/es/src/utils/logger.spec.d.ts +0 -25
  395. package/dist/es/src/utils/logger.spec.d.ts.map +0 -1
  396. package/dist/es/src/utils/processData.d.ts +0 -22
  397. package/dist/es/src/utils/processData.d.ts.map +0 -1
  398. package/dist/es/src/utils/processData.spec.d.ts +0 -2
  399. package/dist/es/src/utils/processData.spec.d.ts.map +0 -1
  400. package/dist/es/src/utils/processTrigger.d.ts +0 -16
  401. package/dist/es/src/utils/processTrigger.d.ts.map +0 -1
  402. package/dist/es/src/utils/processTrigger.spec.d.ts +0 -2
  403. package/dist/es/src/utils/processTrigger.spec.d.ts.map +0 -1
  404. package/dist/es/src/utils/reporting.d.ts +0 -16
  405. package/dist/es/src/utils/reporting.d.ts.map +0 -1
  406. package/dist/es/src/utils/reporting.spec.d.ts +0 -2
  407. package/dist/es/src/utils/reporting.spec.d.ts.map +0 -1
  408. package/dist/es/src/utils/sessionInfoService.d.ts +0 -66
  409. package/dist/es/src/utils/sessionInfoService.d.ts.map +0 -1
  410. package/dist/es/src/utils.d.ts +0 -104
  411. package/dist/es/src/utils.d.ts.map +0 -1
  412. package/dist/es/src/utils.spec.d.ts +0 -2
  413. package/dist/es/src/utils.spec.d.ts.map +0 -1
@@ -1,4 +1,4 @@
1
- /* @thoughtspot/visual-embed-sdk version 1.40.1-alpha.3 */
1
+ /* @thoughtspot/visual-embed-sdk version 1.40.2 */
2
2
  'use client';
3
3
  import * as React from 'react';
4
4
  import React__default, { useRef, useCallback } from 'react';
@@ -195,7 +195,6 @@ merge.withOptions = (options, ...objects) => {
195
195
  * the embedded app
196
196
  * @group Authentication / Init
197
197
  */
198
- // eslint-disable-next-line no-shadow
199
198
  var AuthType;
200
199
  (function (AuthType) {
201
200
  /**
@@ -409,7 +408,6 @@ var HomeLeftNavItem;
409
408
  /**
410
409
  * A map of the supported runtime filter operations
411
410
  */
412
- // eslint-disable-next-line no-shadow
413
411
  var RuntimeFilterOp;
414
412
  (function (RuntimeFilterOp) {
415
413
  /**
@@ -480,7 +478,6 @@ var RuntimeFilterOp;
480
478
  * `modularHomeExperience` to `true` (available as Early Access feature in 9.12.5.cl).
481
479
  * @version SDK: 1.28.0 | ThoughtSpot: 9.12.5.cl, 10.1.0.sw
482
480
  */
483
- // eslint-disable-next-line no-shadow
484
481
  var HomepageModule;
485
482
  (function (HomepageModule) {
486
483
  /**
@@ -513,7 +510,6 @@ var HomepageModule;
513
510
  * **Note**: This option is applicable to full app embedding only.
514
511
  * @version SDK: 1.38.0 | ThoughtSpot: 10.9.0.cl
515
512
  */
516
- // eslint-disable-next-line no-shadow
517
513
  var ListPageColumns;
518
514
  (function (ListPageColumns) {
519
515
  /**
@@ -576,7 +572,6 @@ var ListPageColumns;
576
572
  * ```
577
573
  * @group Events
578
574
  */
579
- // eslint-disable-next-line no-shadow
580
575
  var EmbedEvent;
581
576
  (function (EmbedEvent) {
582
577
  /**
@@ -1756,7 +1751,6 @@ var EmbedEvent;
1756
1751
  * ```
1757
1752
  * @group Events
1758
1753
  */
1759
- // eslint-disable-next-line no-shadow
1760
1754
  var HostEvent;
1761
1755
  (function (HostEvent) {
1762
1756
  /**
@@ -2971,7 +2965,6 @@ var HostEvent;
2971
2965
  * The different visual modes that the data sources panel within
2972
2966
  * search could appear in, such as hidden, collapsed, or expanded.
2973
2967
  */
2974
- // eslint-disable-next-line no-shadow
2975
2968
  var DataSourceVisualMode;
2976
2969
  (function (DataSourceVisualMode) {
2977
2970
  /**
@@ -2991,7 +2984,6 @@ var DataSourceVisualMode;
2991
2984
  * The query params passed down to the embedded ThoughtSpot app
2992
2985
  * containing configuration and/or visual information.
2993
2986
  */
2994
- // eslint-disable-next-line no-shadow
2995
2987
  var Param;
2996
2988
  (function (Param) {
2997
2989
  Param["EmbedApp"] = "embedApp";
@@ -3142,7 +3134,6 @@ var Param;
3142
3134
  * ```
3143
3135
  * See also link:https://developers.thoughtspot.com/docs/actions[Action IDs in the SDK]
3144
3136
  */
3145
- // eslint-disable-next-line no-shadow
3146
3137
  var Action;
3147
3138
  (function (Action) {
3148
3139
  /**
@@ -3687,7 +3678,7 @@ var Action;
3687
3678
  * The Favorites icon (*) for Answers,
3688
3679
  * Liveboard, and data objects like Worksheet, Model,
3689
3680
  * Tables and Views.
3690
- * Allows adding an object to the users favorites list.
3681
+ * Allows adding an object to the user's favorites list.
3691
3682
  * @example
3692
3683
  * ```js
3693
3684
  * disabledActions: [Action.AddToFavorites]
@@ -4414,6 +4405,26 @@ var ContextMenuTriggerOptions;
4414
4405
  ContextMenuTriggerOptions["RIGHT_CLICK"] = "right-click";
4415
4406
  ContextMenuTriggerOptions["BOTH_CLICKS"] = "both-clicks";
4416
4407
  })(ContextMenuTriggerOptions || (ContextMenuTriggerOptions = {}));
4408
+ /**
4409
+ * Enum options to show custom actions at different
4410
+ * positions in the application.
4411
+ */
4412
+ var CustomActionsPosition;
4413
+ (function (CustomActionsPosition) {
4414
+ CustomActionsPosition["PRIMARY"] = "PRIMARY";
4415
+ CustomActionsPosition["MENU"] = "MENU";
4416
+ CustomActionsPosition["CONTEXTMENU"] = "CONTEXTMENU";
4417
+ })(CustomActionsPosition || (CustomActionsPosition = {}));
4418
+ /**
4419
+ * Enum options to mention the target of the custom action.
4420
+ */
4421
+ var CustomActionTarget;
4422
+ (function (CustomActionTarget) {
4423
+ CustomActionTarget["LIVEBOARD"] = "LIVEBOARD";
4424
+ CustomActionTarget["VIZ"] = "VIZ";
4425
+ CustomActionTarget["ANSWER"] = "ANSWER";
4426
+ CustomActionTarget["SPOTTER"] = "SPOTTER";
4427
+ })(CustomActionTarget || (CustomActionTarget = {}));
4417
4428
  /**
4418
4429
  * Enum options to show or suppress Visual Embed SDK and
4419
4430
  * ThoughtSpot application logs in the console output.
@@ -4874,6 +4885,15 @@ function storeValueInWindow(key, value, options = {}) {
4874
4885
  * @returns The stored value or `undefined` if the key is not found.
4875
4886
  */
4876
4887
  const getValueFromWindow = (key) => { var _a; return (_a = window === null || window === void 0 ? void 0 : window[sdkWindowKey]) === null || _a === void 0 ? void 0 : _a[key]; };
4888
+ /**
4889
+ * Check if an array includes a string value
4890
+ * @param arr - The array to check
4891
+ * @param key - The string to search for
4892
+ * @returns boolean indicating if the string is found in the array
4893
+ */
4894
+ const arrayIncludesString = (arr, key) => {
4895
+ return arr.some(item => typeof item === 'string' && item === key);
4896
+ };
4877
4897
  /**
4878
4898
  * Check if the document is currently in fullscreen mode
4879
4899
  */
@@ -5958,8 +5978,8 @@ function cacheHas(cache, key) {
5958
5978
  var _cacheHas = cacheHas;
5959
5979
 
5960
5980
  /** Used to compose bitmasks for value comparisons. */
5961
- var COMPARE_PARTIAL_FLAG$3 = 1,
5962
- COMPARE_UNORDERED_FLAG$1 = 2;
5981
+ var COMPARE_PARTIAL_FLAG$5 = 1,
5982
+ COMPARE_UNORDERED_FLAG$3 = 2;
5963
5983
 
5964
5984
  /**
5965
5985
  * A specialized version of `baseIsEqualDeep` for arrays with support for
@@ -5975,7 +5995,7 @@ var COMPARE_PARTIAL_FLAG$3 = 1,
5975
5995
  * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
5976
5996
  */
5977
5997
  function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
5978
- var isPartial = bitmask & COMPARE_PARTIAL_FLAG$3,
5998
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG$5,
5979
5999
  arrLength = array.length,
5980
6000
  othLength = other.length;
5981
6001
 
@@ -5990,7 +6010,7 @@ function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
5990
6010
  }
5991
6011
  var index = -1,
5992
6012
  result = true,
5993
- seen = (bitmask & COMPARE_UNORDERED_FLAG$1) ? new _SetCache : undefined;
6013
+ seen = (bitmask & COMPARE_UNORDERED_FLAG$3) ? new _SetCache : undefined;
5994
6014
 
5995
6015
  stack.set(array, other);
5996
6016
  stack.set(other, array);
@@ -6082,8 +6102,8 @@ function setToArray(set) {
6082
6102
  var _setToArray = setToArray;
6083
6103
 
6084
6104
  /** Used to compose bitmasks for value comparisons. */
6085
- var COMPARE_PARTIAL_FLAG$2 = 1,
6086
- COMPARE_UNORDERED_FLAG = 2;
6105
+ var COMPARE_PARTIAL_FLAG$4 = 1,
6106
+ COMPARE_UNORDERED_FLAG$2 = 2;
6087
6107
 
6088
6108
  /** `Object#toString` result references. */
6089
6109
  var boolTag$1 = '[object Boolean]',
@@ -6094,14 +6114,14 @@ var boolTag$1 = '[object Boolean]',
6094
6114
  regexpTag$1 = '[object RegExp]',
6095
6115
  setTag$3 = '[object Set]',
6096
6116
  stringTag$1 = '[object String]',
6097
- symbolTag = '[object Symbol]';
6117
+ symbolTag$1 = '[object Symbol]';
6098
6118
 
6099
6119
  var arrayBufferTag$1 = '[object ArrayBuffer]',
6100
6120
  dataViewTag$2 = '[object DataView]';
6101
6121
 
6102
6122
  /** Used to convert symbols to primitives and strings. */
6103
- var symbolProto = _Symbol ? _Symbol.prototype : undefined,
6104
- symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
6123
+ var symbolProto$1 = _Symbol ? _Symbol.prototype : undefined,
6124
+ symbolValueOf = symbolProto$1 ? symbolProto$1.valueOf : undefined;
6105
6125
 
6106
6126
  /**
6107
6127
  * A specialized version of `baseIsEqualDeep` for comparing objects of
@@ -6158,7 +6178,7 @@ function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
6158
6178
  var convert = _mapToArray;
6159
6179
 
6160
6180
  case setTag$3:
6161
- var isPartial = bitmask & COMPARE_PARTIAL_FLAG$2;
6181
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG$4;
6162
6182
  convert || (convert = _setToArray);
6163
6183
 
6164
6184
  if (object.size != other.size && !isPartial) {
@@ -6169,7 +6189,7 @@ function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
6169
6189
  if (stacked) {
6170
6190
  return stacked == other;
6171
6191
  }
6172
- bitmask |= COMPARE_UNORDERED_FLAG;
6192
+ bitmask |= COMPARE_UNORDERED_FLAG$2;
6173
6193
 
6174
6194
  // Recursively compare objects (susceptible to call stack limits).
6175
6195
  stack.set(object, other);
@@ -6177,7 +6197,7 @@ function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
6177
6197
  stack['delete'](object);
6178
6198
  return result;
6179
6199
 
6180
- case symbolTag:
6200
+ case symbolTag$1:
6181
6201
  if (symbolValueOf) {
6182
6202
  return symbolValueOf.call(object) == symbolValueOf.call(other);
6183
6203
  }
@@ -6868,7 +6888,7 @@ function getAllKeys(object) {
6868
6888
  var _getAllKeys = getAllKeys;
6869
6889
 
6870
6890
  /** Used to compose bitmasks for value comparisons. */
6871
- var COMPARE_PARTIAL_FLAG$1 = 1;
6891
+ var COMPARE_PARTIAL_FLAG$3 = 1;
6872
6892
 
6873
6893
  /** Used for built-in method references. */
6874
6894
  var objectProto$2 = Object.prototype;
@@ -6890,7 +6910,7 @@ var hasOwnProperty$3 = objectProto$2.hasOwnProperty;
6890
6910
  * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
6891
6911
  */
6892
6912
  function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
6893
- var isPartial = bitmask & COMPARE_PARTIAL_FLAG$1,
6913
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG$3,
6894
6914
  objProps = _getAllKeys(object),
6895
6915
  objLength = objProps.length,
6896
6916
  othProps = _getAllKeys(other),
@@ -7028,7 +7048,7 @@ if ((_DataView && getTag(new _DataView(new ArrayBuffer(1))) != dataViewTag) ||
7028
7048
  var _getTag = getTag;
7029
7049
 
7030
7050
  /** Used to compose bitmasks for value comparisons. */
7031
- var COMPARE_PARTIAL_FLAG = 1;
7051
+ var COMPARE_PARTIAL_FLAG$2 = 1;
7032
7052
 
7033
7053
  /** `Object#toString` result references. */
7034
7054
  var argsTag = '[object Arguments]',
@@ -7081,7 +7101,7 @@ function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
7081
7101
  ? _equalArrays(object, other, bitmask, customizer, equalFunc, stack)
7082
7102
  : _equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
7083
7103
  }
7084
- if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
7104
+ if (!(bitmask & COMPARE_PARTIAL_FLAG$2)) {
7085
7105
  var objIsWrapped = objIsObj && hasOwnProperty$2.call(object, '__wrapped__'),
7086
7106
  othIsWrapped = othIsObj && hasOwnProperty$2.call(other, '__wrapped__');
7087
7107
 
@@ -7251,6 +7271,17 @@ const ERROR_MESSAGE = {
7251
7271
  MISSING_REPORTING_OBSERVER: 'ReportingObserver not supported',
7252
7272
  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',
7253
7273
  SPOTTER_AGENT_NOT_INITIALIZED: 'SpotterAgent not initialized',
7274
+ };
7275
+ const CUSTOM_ACTIONS_ERROR_MESSAGE = {
7276
+ INVALID_ACTION_OBJECT: 'Custom Action Validation Error: Invalid action object provided',
7277
+ MISSING_REQUIRED_FIELDS: (id, missingFields) => `Custom Action Validation Error for '${id}': Missing required fields: ${missingFields.join(', ')}`,
7278
+ UNSUPPORTED_TARGET: (id, targetType) => `Custom Action Validation Error for '${id}': Target type '${targetType}' is not supported`,
7279
+ INVALID_POSITION: (position, targetType, supportedPositions) => `Position '${position}' is not supported for ${targetType.toLowerCase()}-level custom actions. Supported positions: ${supportedPositions}`,
7280
+ MULTIPLE_PRIMARY_ACTIONS: (targetType, existingName, newName) => `Multiple primary actions found for ${targetType.toLowerCase()}-level custom actions: '${existingName}' and '${newName}'. Only the first action will be shown.`,
7281
+ INVALID_METADATA_IDS: (targetType, invalidIds, supportedIds) => `Invalid metadata IDs for ${targetType.toLowerCase()}-level custom actions: ${invalidIds.join(', ')}. Supported metadata IDs: ${supportedIds}`,
7282
+ INVALID_DATA_MODEL_IDS: (targetType, invalidIds, supportedIds) => `Invalid data model IDs for ${targetType.toLowerCase()}-level custom actions: ${invalidIds.join(', ')}. Supported data model IDs: ${supportedIds}`,
7283
+ INVALID_FIELDS: (targetType, invalidFields, supportedFields) => `Invalid fields for ${targetType.toLowerCase()}-level custom actions: ${invalidFields.join(', ')}. Supported fields: ${supportedFields}`,
7284
+ DUPLICATE_IDS: (id, duplicateNames, keptName) => `Duplicate custom action ID '${id}' found. Actions with names '${duplicateNames.join("', '")}' will be ignored. Keeping '${keptName}'.`,
7254
7285
  };
7255
7286
 
7256
7287
  const EndPoints = {
@@ -8048,196 +8079,1638 @@ class AnswerService {
8048
8079
  getFetchCSVBlobUrl(userLocale = 'en-us', includeInfo = false) {
8049
8080
  return `${this.thoughtSpotHost}/prism/download/answer/csv?sessionId=${this.session.sessionId}&genNo=${this.session.genNo}&userLocale=${userLocale}&exportFileName=data&hideCsvHeader=${!includeInfo}`;
8050
8081
  }
8051
- /**
8052
- * Just get the internal URL for this answer's data
8053
- * as a PNG blob.
8054
- * @param userLocale
8055
- * @param omitBackground
8056
- * @param deviceScaleFactor
8057
- */
8058
- getFetchPNGBlobUrl(userLocale = 'en-us', omitBackground = false, deviceScaleFactor = 2) {
8059
- return `${this.thoughtSpotHost}/prism/download/answer/png?sessionId=${this.session.sessionId}&deviceScaleFactor=${deviceScaleFactor}&omitBackground=${omitBackground}&genNo=${this.session.genNo}&userLocale=${userLocale}&exportFileName=data`;
8082
+ /**
8083
+ * Just get the internal URL for this answer's data
8084
+ * as a PNG blob.
8085
+ * @param userLocale
8086
+ * @param omitBackground
8087
+ * @param deviceScaleFactor
8088
+ */
8089
+ getFetchPNGBlobUrl(userLocale = 'en-us', omitBackground = false, deviceScaleFactor = 2) {
8090
+ return `${this.thoughtSpotHost}/prism/download/answer/png?sessionId=${this.session.sessionId}&deviceScaleFactor=${deviceScaleFactor}&omitBackground=${omitBackground}&genNo=${this.session.genNo}&userLocale=${userLocale}&exportFileName=data`;
8091
+ }
8092
+ /**
8093
+ * Get underlying data given a point and the output column names.
8094
+ * In case of a context menu action, the selectedPoints are
8095
+ * automatically passed.
8096
+ * @param outputColumnNames
8097
+ * @param selectedPoints
8098
+ * @example
8099
+ * ```js
8100
+ * embed.on(EmbedEvent.CustomAction, e => {
8101
+ * const underlying = await e.answerService.getUnderlyingDataForPoint([
8102
+ * 'col name 1' // The column should exist in the data source.
8103
+ * ]);
8104
+ * const data = await underlying.fetchData(0, 100);
8105
+ * })
8106
+ * ```
8107
+ * @version SDK: 1.25.0| ThoughtSpot: 9.10.0.cl
8108
+ */
8109
+ async getUnderlyingDataForPoint(outputColumnNames, selectedPoints) {
8110
+ if (!selectedPoints && !this.selectedPoints) {
8111
+ throw new Error('Needs to be triggered in context of a point');
8112
+ }
8113
+ if (!selectedPoints) {
8114
+ selectedPoints = getSelectedPointsForUnderlyingDataQuery(this.selectedPoints);
8115
+ }
8116
+ const sourceDetail = await this.getSourceDetail();
8117
+ const ouputColumnGuids = getGuidsFromColumnNames(sourceDetail, outputColumnNames);
8118
+ const unAggAnswer = await graphqlQuery({
8119
+ query: getUnaggregatedAnswerSession,
8120
+ variables: {
8121
+ session: this.session,
8122
+ columns: selectedPoints,
8123
+ },
8124
+ thoughtSpotHost: this.thoughtSpotHost,
8125
+ });
8126
+ const unaggAnswerSession = new AnswerService(unAggAnswer.id, unAggAnswer.answer, this.thoughtSpotHost);
8127
+ const currentColumns = new Set(unAggAnswer.answer.visualizations[0].columns
8128
+ .map((c) => c.column.referencedColumns[0].guid));
8129
+ const columnsToAdd = [...ouputColumnGuids].filter((col) => !currentColumns.has(col));
8130
+ if (columnsToAdd.length) {
8131
+ await unaggAnswerSession.addColumns(columnsToAdd);
8132
+ }
8133
+ const columnsToRemove = [...currentColumns].filter((col) => !ouputColumnGuids.has(col));
8134
+ if (columnsToRemove.length) {
8135
+ await unaggAnswerSession.removeColumns(columnsToRemove);
8136
+ }
8137
+ return unaggAnswerSession;
8138
+ }
8139
+ /**
8140
+ * Execute a custom graphql query in the context of the answer.
8141
+ * @param query graphql query
8142
+ * @param variables graphql variables
8143
+ * @returns
8144
+ */
8145
+ async executeQuery(query, variables) {
8146
+ const data = await graphqlQuery({
8147
+ query,
8148
+ variables: {
8149
+ session: this.session,
8150
+ ...variables,
8151
+ },
8152
+ thoughtSpotHost: this.thoughtSpotHost,
8153
+ isCompositeQuery: false,
8154
+ });
8155
+ this.session = deepMerge(this.session, (data === null || data === void 0 ? void 0 : data.id) || {});
8156
+ return data;
8157
+ }
8158
+ /**
8159
+ * Get the internal session details for the answer.
8160
+ * @returns
8161
+ */
8162
+ getSession() {
8163
+ return this.session;
8164
+ }
8165
+ async getAnswer() {
8166
+ if (this.answer) {
8167
+ return this.answer;
8168
+ }
8169
+ this.answer = this.executeQuery(getAnswer, {}).then((data) => data === null || data === void 0 ? void 0 : data.answer);
8170
+ return this.answer;
8171
+ }
8172
+ async getTML() {
8173
+ const { object } = await this.executeQuery(getAnswerTML, {});
8174
+ const edoc = object[0].edoc;
8175
+ const YAML = await import('./index-Dx5UP5Ip.js');
8176
+ const parsedDoc = YAML.parse(edoc);
8177
+ return {
8178
+ answer: {
8179
+ ...parsedDoc.answer,
8180
+ ...this.tmlOverride,
8181
+ },
8182
+ };
8183
+ }
8184
+ async addDisplayedVizToLiveboard(liveboardId) {
8185
+ const { displayMode, visualizations } = await this.getAnswer();
8186
+ const viz = getDisplayedViz(visualizations, displayMode);
8187
+ return this.executeQuery(addVizToLiveboard, {
8188
+ liveboardId,
8189
+ vizId: viz.id,
8190
+ });
8191
+ }
8192
+ setTMLOverride(override) {
8193
+ this.tmlOverride = override;
8194
+ }
8195
+ }
8196
+ /**
8197
+ *
8198
+ * @param sourceDetail
8199
+ * @param colNames
8200
+ */
8201
+ function getGuidsFromColumnNames(sourceDetail, colNames) {
8202
+ const cols = sourceDetail.columns.reduce((colSet, col) => {
8203
+ colSet[col.name.toLowerCase()] = col;
8204
+ return colSet;
8205
+ }, {});
8206
+ return new Set(colNames.map((colName) => {
8207
+ const col = cols[colName.toLowerCase()];
8208
+ return col.id;
8209
+ }));
8210
+ }
8211
+ /**
8212
+ *
8213
+ * @param selectedPoints
8214
+ */
8215
+ function getSelectedPointsForUnderlyingDataQuery(selectedPoints) {
8216
+ const underlyingDataPoint = [];
8217
+ /**
8218
+ *
8219
+ * @param colVal
8220
+ */
8221
+ function addPointFromColVal(colVal) {
8222
+ var _a;
8223
+ const dataType = colVal.column.dataType;
8224
+ colVal.column.id;
8225
+ let dataValue;
8226
+ if (dataType === 'DATE') {
8227
+ if (Number.isFinite(colVal.value)) {
8228
+ dataValue = [{
8229
+ epochRange: {
8230
+ startEpoch: colVal.value,
8231
+ },
8232
+ }];
8233
+ // Case for custom calendar.
8234
+ }
8235
+ else if ((_a = colVal.value) === null || _a === void 0 ? void 0 : _a.v) {
8236
+ dataValue = [{
8237
+ epochRange: {
8238
+ startEpoch: colVal.value.v.s,
8239
+ endEpoch: colVal.value.v.e,
8240
+ },
8241
+ }];
8242
+ }
8243
+ }
8244
+ else {
8245
+ dataValue = [{ value: colVal.value }];
8246
+ }
8247
+ underlyingDataPoint.push({
8248
+ columnId: colVal.column.id,
8249
+ dataValue,
8250
+ });
8251
+ }
8252
+ selectedPoints.forEach((p) => {
8253
+ p.selectedAttributes.forEach(addPointFromColVal);
8254
+ });
8255
+ return underlyingDataPoint;
8256
+ }
8257
+ /**
8258
+ *
8259
+ * @param visualizations
8260
+ * @param displayMode
8261
+ */
8262
+ function getDisplayedViz(visualizations, displayMode) {
8263
+ if (displayMode === 'CHART_MODE') {
8264
+ return visualizations.find(
8265
+ // eslint-disable-next-line no-underscore-dangle
8266
+ (viz) => viz.__typename === 'ChartViz');
8267
+ }
8268
+ return visualizations.find(
8269
+ // eslint-disable-next-line no-underscore-dangle
8270
+ (viz) => viz.__typename === 'TableViz');
8271
+ }
8272
+
8273
+ /** Built-in value references. */
8274
+ var spreadableSymbol = _Symbol ? _Symbol.isConcatSpreadable : undefined;
8275
+
8276
+ /**
8277
+ * Checks if `value` is a flattenable `arguments` object or array.
8278
+ *
8279
+ * @private
8280
+ * @param {*} value The value to check.
8281
+ * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
8282
+ */
8283
+ function isFlattenable(value) {
8284
+ return isArray_1(value) || isArguments_1(value) ||
8285
+ !!(spreadableSymbol && value && value[spreadableSymbol]);
8286
+ }
8287
+
8288
+ var _isFlattenable = isFlattenable;
8289
+
8290
+ /**
8291
+ * The base implementation of `_.flatten` with support for restricting flattening.
8292
+ *
8293
+ * @private
8294
+ * @param {Array} array The array to flatten.
8295
+ * @param {number} depth The maximum recursion depth.
8296
+ * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
8297
+ * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
8298
+ * @param {Array} [result=[]] The initial result value.
8299
+ * @returns {Array} Returns the new flattened array.
8300
+ */
8301
+ function baseFlatten(array, depth, predicate, isStrict, result) {
8302
+ var index = -1,
8303
+ length = array.length;
8304
+
8305
+ predicate || (predicate = _isFlattenable);
8306
+ result || (result = []);
8307
+
8308
+ while (++index < length) {
8309
+ var value = array[index];
8310
+ if (depth > 0 && predicate(value)) {
8311
+ if (depth > 1) {
8312
+ // Recursively flatten arrays (susceptible to call stack limits).
8313
+ baseFlatten(value, depth - 1, predicate, isStrict, result);
8314
+ } else {
8315
+ _arrayPush(result, value);
8316
+ }
8317
+ } else if (!isStrict) {
8318
+ result[result.length] = value;
8319
+ }
8320
+ }
8321
+ return result;
8322
+ }
8323
+
8324
+ var _baseFlatten = baseFlatten;
8325
+
8326
+ /**
8327
+ * A specialized version of `_.map` for arrays without support for iteratee
8328
+ * shorthands.
8329
+ *
8330
+ * @private
8331
+ * @param {Array} [array] The array to iterate over.
8332
+ * @param {Function} iteratee The function invoked per iteration.
8333
+ * @returns {Array} Returns the new mapped array.
8334
+ */
8335
+ function arrayMap(array, iteratee) {
8336
+ var index = -1,
8337
+ length = array == null ? 0 : array.length,
8338
+ result = Array(length);
8339
+
8340
+ while (++index < length) {
8341
+ result[index] = iteratee(array[index], index, array);
8342
+ }
8343
+ return result;
8344
+ }
8345
+
8346
+ var _arrayMap = arrayMap;
8347
+
8348
+ /** `Object#toString` result references. */
8349
+ var symbolTag = '[object Symbol]';
8350
+
8351
+ /**
8352
+ * Checks if `value` is classified as a `Symbol` primitive or object.
8353
+ *
8354
+ * @static
8355
+ * @memberOf _
8356
+ * @since 4.0.0
8357
+ * @category Lang
8358
+ * @param {*} value The value to check.
8359
+ * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
8360
+ * @example
8361
+ *
8362
+ * _.isSymbol(Symbol.iterator);
8363
+ * // => true
8364
+ *
8365
+ * _.isSymbol('abc');
8366
+ * // => false
8367
+ */
8368
+ function isSymbol(value) {
8369
+ return typeof value == 'symbol' ||
8370
+ (isObjectLike_1(value) && _baseGetTag(value) == symbolTag);
8371
+ }
8372
+
8373
+ var isSymbol_1 = isSymbol;
8374
+
8375
+ /** Used to match property names within property paths. */
8376
+ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
8377
+ reIsPlainProp = /^\w*$/;
8378
+
8379
+ /**
8380
+ * Checks if `value` is a property name and not a property path.
8381
+ *
8382
+ * @private
8383
+ * @param {*} value The value to check.
8384
+ * @param {Object} [object] The object to query keys on.
8385
+ * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
8386
+ */
8387
+ function isKey(value, object) {
8388
+ if (isArray_1(value)) {
8389
+ return false;
8390
+ }
8391
+ var type = typeof value;
8392
+ if (type == 'number' || type == 'symbol' || type == 'boolean' ||
8393
+ value == null || isSymbol_1(value)) {
8394
+ return true;
8395
+ }
8396
+ return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
8397
+ (object != null && value in Object(object));
8398
+ }
8399
+
8400
+ var _isKey = isKey;
8401
+
8402
+ /** Error message constants. */
8403
+ var FUNC_ERROR_TEXT = 'Expected a function';
8404
+
8405
+ /**
8406
+ * Creates a function that memoizes the result of `func`. If `resolver` is
8407
+ * provided, it determines the cache key for storing the result based on the
8408
+ * arguments provided to the memoized function. By default, the first argument
8409
+ * provided to the memoized function is used as the map cache key. The `func`
8410
+ * is invoked with the `this` binding of the memoized function.
8411
+ *
8412
+ * **Note:** The cache is exposed as the `cache` property on the memoized
8413
+ * function. Its creation may be customized by replacing the `_.memoize.Cache`
8414
+ * constructor with one whose instances implement the
8415
+ * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
8416
+ * method interface of `clear`, `delete`, `get`, `has`, and `set`.
8417
+ *
8418
+ * @static
8419
+ * @memberOf _
8420
+ * @since 0.1.0
8421
+ * @category Function
8422
+ * @param {Function} func The function to have its output memoized.
8423
+ * @param {Function} [resolver] The function to resolve the cache key.
8424
+ * @returns {Function} Returns the new memoized function.
8425
+ * @example
8426
+ *
8427
+ * var object = { 'a': 1, 'b': 2 };
8428
+ * var other = { 'c': 3, 'd': 4 };
8429
+ *
8430
+ * var values = _.memoize(_.values);
8431
+ * values(object);
8432
+ * // => [1, 2]
8433
+ *
8434
+ * values(other);
8435
+ * // => [3, 4]
8436
+ *
8437
+ * object.a = 2;
8438
+ * values(object);
8439
+ * // => [1, 2]
8440
+ *
8441
+ * // Modify the result cache.
8442
+ * values.cache.set(object, ['a', 'b']);
8443
+ * values(object);
8444
+ * // => ['a', 'b']
8445
+ *
8446
+ * // Replace `_.memoize.Cache`.
8447
+ * _.memoize.Cache = WeakMap;
8448
+ */
8449
+ function memoize(func, resolver) {
8450
+ if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
8451
+ throw new TypeError(FUNC_ERROR_TEXT);
8452
+ }
8453
+ var memoized = function() {
8454
+ var args = arguments,
8455
+ key = resolver ? resolver.apply(this, args) : args[0],
8456
+ cache = memoized.cache;
8457
+
8458
+ if (cache.has(key)) {
8459
+ return cache.get(key);
8460
+ }
8461
+ var result = func.apply(this, args);
8462
+ memoized.cache = cache.set(key, result) || cache;
8463
+ return result;
8464
+ };
8465
+ memoized.cache = new (memoize.Cache || _MapCache);
8466
+ return memoized;
8467
+ }
8468
+
8469
+ // Expose `MapCache`.
8470
+ memoize.Cache = _MapCache;
8471
+
8472
+ var memoize_1 = memoize;
8473
+
8474
+ /** Used as the maximum memoize cache size. */
8475
+ var MAX_MEMOIZE_SIZE = 500;
8476
+
8477
+ /**
8478
+ * A specialized version of `_.memoize` which clears the memoized function's
8479
+ * cache when it exceeds `MAX_MEMOIZE_SIZE`.
8480
+ *
8481
+ * @private
8482
+ * @param {Function} func The function to have its output memoized.
8483
+ * @returns {Function} Returns the new memoized function.
8484
+ */
8485
+ function memoizeCapped(func) {
8486
+ var result = memoize_1(func, function(key) {
8487
+ if (cache.size === MAX_MEMOIZE_SIZE) {
8488
+ cache.clear();
8489
+ }
8490
+ return key;
8491
+ });
8492
+
8493
+ var cache = result.cache;
8494
+ return result;
8495
+ }
8496
+
8497
+ var _memoizeCapped = memoizeCapped;
8498
+
8499
+ /** Used to match property names within property paths. */
8500
+ var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
8501
+
8502
+ /** Used to match backslashes in property paths. */
8503
+ var reEscapeChar = /\\(\\)?/g;
8504
+
8505
+ /**
8506
+ * Converts `string` to a property path array.
8507
+ *
8508
+ * @private
8509
+ * @param {string} string The string to convert.
8510
+ * @returns {Array} Returns the property path array.
8511
+ */
8512
+ var stringToPath = _memoizeCapped(function(string) {
8513
+ var result = [];
8514
+ if (string.charCodeAt(0) === 46 /* . */) {
8515
+ result.push('');
8516
+ }
8517
+ string.replace(rePropName, function(match, number, quote, subString) {
8518
+ result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
8519
+ });
8520
+ return result;
8521
+ });
8522
+
8523
+ var _stringToPath = stringToPath;
8524
+
8525
+ /** Used as references for various `Number` constants. */
8526
+ var INFINITY$1 = 1 / 0;
8527
+
8528
+ /** Used to convert symbols to primitives and strings. */
8529
+ var symbolProto = _Symbol ? _Symbol.prototype : undefined,
8530
+ symbolToString = symbolProto ? symbolProto.toString : undefined;
8531
+
8532
+ /**
8533
+ * The base implementation of `_.toString` which doesn't convert nullish
8534
+ * values to empty strings.
8535
+ *
8536
+ * @private
8537
+ * @param {*} value The value to process.
8538
+ * @returns {string} Returns the string.
8539
+ */
8540
+ function baseToString(value) {
8541
+ // Exit early for strings to avoid a performance hit in some environments.
8542
+ if (typeof value == 'string') {
8543
+ return value;
8544
+ }
8545
+ if (isArray_1(value)) {
8546
+ // Recursively convert values (susceptible to call stack limits).
8547
+ return _arrayMap(value, baseToString) + '';
8548
+ }
8549
+ if (isSymbol_1(value)) {
8550
+ return symbolToString ? symbolToString.call(value) : '';
8551
+ }
8552
+ var result = (value + '');
8553
+ return (result == '0' && (1 / value) == -INFINITY$1) ? '-0' : result;
8554
+ }
8555
+
8556
+ var _baseToString = baseToString;
8557
+
8558
+ /**
8559
+ * Converts `value` to a string. An empty string is returned for `null`
8560
+ * and `undefined` values. The sign of `-0` is preserved.
8561
+ *
8562
+ * @static
8563
+ * @memberOf _
8564
+ * @since 4.0.0
8565
+ * @category Lang
8566
+ * @param {*} value The value to convert.
8567
+ * @returns {string} Returns the converted string.
8568
+ * @example
8569
+ *
8570
+ * _.toString(null);
8571
+ * // => ''
8572
+ *
8573
+ * _.toString(-0);
8574
+ * // => '-0'
8575
+ *
8576
+ * _.toString([1, 2, 3]);
8577
+ * // => '1,2,3'
8578
+ */
8579
+ function toString$1(value) {
8580
+ return value == null ? '' : _baseToString(value);
8581
+ }
8582
+
8583
+ var toString_1 = toString$1;
8584
+
8585
+ /**
8586
+ * Casts `value` to a path array if it's not one.
8587
+ *
8588
+ * @private
8589
+ * @param {*} value The value to inspect.
8590
+ * @param {Object} [object] The object to query keys on.
8591
+ * @returns {Array} Returns the cast property path array.
8592
+ */
8593
+ function castPath(value, object) {
8594
+ if (isArray_1(value)) {
8595
+ return value;
8596
+ }
8597
+ return _isKey(value, object) ? [value] : _stringToPath(toString_1(value));
8598
+ }
8599
+
8600
+ var _castPath = castPath;
8601
+
8602
+ /** Used as references for various `Number` constants. */
8603
+ var INFINITY = 1 / 0;
8604
+
8605
+ /**
8606
+ * Converts `value` to a string key if it's not a string or symbol.
8607
+ *
8608
+ * @private
8609
+ * @param {*} value The value to inspect.
8610
+ * @returns {string|symbol} Returns the key.
8611
+ */
8612
+ function toKey(value) {
8613
+ if (typeof value == 'string' || isSymbol_1(value)) {
8614
+ return value;
8615
+ }
8616
+ var result = (value + '');
8617
+ return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
8618
+ }
8619
+
8620
+ var _toKey = toKey;
8621
+
8622
+ /**
8623
+ * The base implementation of `_.get` without support for default values.
8624
+ *
8625
+ * @private
8626
+ * @param {Object} object The object to query.
8627
+ * @param {Array|string} path The path of the property to get.
8628
+ * @returns {*} Returns the resolved value.
8629
+ */
8630
+ function baseGet(object, path) {
8631
+ path = _castPath(path, object);
8632
+
8633
+ var index = 0,
8634
+ length = path.length;
8635
+
8636
+ while (object != null && index < length) {
8637
+ object = object[_toKey(path[index++])];
8638
+ }
8639
+ return (index && index == length) ? object : undefined;
8640
+ }
8641
+
8642
+ var _baseGet = baseGet;
8643
+
8644
+ /** Used to compose bitmasks for value comparisons. */
8645
+ var COMPARE_PARTIAL_FLAG$1 = 1,
8646
+ COMPARE_UNORDERED_FLAG$1 = 2;
8647
+
8648
+ /**
8649
+ * The base implementation of `_.isMatch` without support for iteratee shorthands.
8650
+ *
8651
+ * @private
8652
+ * @param {Object} object The object to inspect.
8653
+ * @param {Object} source The object of property values to match.
8654
+ * @param {Array} matchData The property names, values, and compare flags to match.
8655
+ * @param {Function} [customizer] The function to customize comparisons.
8656
+ * @returns {boolean} Returns `true` if `object` is a match, else `false`.
8657
+ */
8658
+ function baseIsMatch(object, source, matchData, customizer) {
8659
+ var index = matchData.length,
8660
+ length = index,
8661
+ noCustomizer = !customizer;
8662
+
8663
+ if (object == null) {
8664
+ return !length;
8665
+ }
8666
+ object = Object(object);
8667
+ while (index--) {
8668
+ var data = matchData[index];
8669
+ if ((noCustomizer && data[2])
8670
+ ? data[1] !== object[data[0]]
8671
+ : !(data[0] in object)
8672
+ ) {
8673
+ return false;
8674
+ }
8675
+ }
8676
+ while (++index < length) {
8677
+ data = matchData[index];
8678
+ var key = data[0],
8679
+ objValue = object[key],
8680
+ srcValue = data[1];
8681
+
8682
+ if (noCustomizer && data[2]) {
8683
+ if (objValue === undefined && !(key in object)) {
8684
+ return false;
8685
+ }
8686
+ } else {
8687
+ var stack = new _Stack;
8688
+ if (customizer) {
8689
+ var result = customizer(objValue, srcValue, key, object, source, stack);
8690
+ }
8691
+ if (!(result === undefined
8692
+ ? _baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG$1 | COMPARE_UNORDERED_FLAG$1, customizer, stack)
8693
+ : result
8694
+ )) {
8695
+ return false;
8696
+ }
8697
+ }
8698
+ }
8699
+ return true;
8700
+ }
8701
+
8702
+ var _baseIsMatch = baseIsMatch;
8703
+
8704
+ /**
8705
+ * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
8706
+ *
8707
+ * @private
8708
+ * @param {*} value The value to check.
8709
+ * @returns {boolean} Returns `true` if `value` if suitable for strict
8710
+ * equality comparisons, else `false`.
8711
+ */
8712
+ function isStrictComparable(value) {
8713
+ return value === value && !isObject_1(value);
8714
+ }
8715
+
8716
+ var _isStrictComparable = isStrictComparable;
8717
+
8718
+ /**
8719
+ * Gets the property names, values, and compare flags of `object`.
8720
+ *
8721
+ * @private
8722
+ * @param {Object} object The object to query.
8723
+ * @returns {Array} Returns the match data of `object`.
8724
+ */
8725
+ function getMatchData(object) {
8726
+ var result = keys_1(object),
8727
+ length = result.length;
8728
+
8729
+ while (length--) {
8730
+ var key = result[length],
8731
+ value = object[key];
8732
+
8733
+ result[length] = [key, value, _isStrictComparable(value)];
8734
+ }
8735
+ return result;
8736
+ }
8737
+
8738
+ var _getMatchData = getMatchData;
8739
+
8740
+ /**
8741
+ * A specialized version of `matchesProperty` for source values suitable
8742
+ * for strict equality comparisons, i.e. `===`.
8743
+ *
8744
+ * @private
8745
+ * @param {string} key The key of the property to get.
8746
+ * @param {*} srcValue The value to match.
8747
+ * @returns {Function} Returns the new spec function.
8748
+ */
8749
+ function matchesStrictComparable(key, srcValue) {
8750
+ return function(object) {
8751
+ if (object == null) {
8752
+ return false;
8753
+ }
8754
+ return object[key] === srcValue &&
8755
+ (srcValue !== undefined || (key in Object(object)));
8756
+ };
8757
+ }
8758
+
8759
+ var _matchesStrictComparable = matchesStrictComparable;
8760
+
8761
+ /**
8762
+ * The base implementation of `_.matches` which doesn't clone `source`.
8763
+ *
8764
+ * @private
8765
+ * @param {Object} source The object of property values to match.
8766
+ * @returns {Function} Returns the new spec function.
8767
+ */
8768
+ function baseMatches(source) {
8769
+ var matchData = _getMatchData(source);
8770
+ if (matchData.length == 1 && matchData[0][2]) {
8771
+ return _matchesStrictComparable(matchData[0][0], matchData[0][1]);
8772
+ }
8773
+ return function(object) {
8774
+ return object === source || _baseIsMatch(object, source, matchData);
8775
+ };
8776
+ }
8777
+
8778
+ var _baseMatches = baseMatches;
8779
+
8780
+ /**
8781
+ * Gets the value at `path` of `object`. If the resolved value is
8782
+ * `undefined`, the `defaultValue` is returned in its place.
8783
+ *
8784
+ * @static
8785
+ * @memberOf _
8786
+ * @since 3.7.0
8787
+ * @category Object
8788
+ * @param {Object} object The object to query.
8789
+ * @param {Array|string} path The path of the property to get.
8790
+ * @param {*} [defaultValue] The value returned for `undefined` resolved values.
8791
+ * @returns {*} Returns the resolved value.
8792
+ * @example
8793
+ *
8794
+ * var object = { 'a': [{ 'b': { 'c': 3 } }] };
8795
+ *
8796
+ * _.get(object, 'a[0].b.c');
8797
+ * // => 3
8798
+ *
8799
+ * _.get(object, ['a', '0', 'b', 'c']);
8800
+ * // => 3
8801
+ *
8802
+ * _.get(object, 'a.b.c', 'default');
8803
+ * // => 'default'
8804
+ */
8805
+ function get(object, path, defaultValue) {
8806
+ var result = object == null ? undefined : _baseGet(object, path);
8807
+ return result === undefined ? defaultValue : result;
8808
+ }
8809
+
8810
+ var get_1 = get;
8811
+
8812
+ /**
8813
+ * The base implementation of `_.hasIn` without support for deep paths.
8814
+ *
8815
+ * @private
8816
+ * @param {Object} [object] The object to query.
8817
+ * @param {Array|string} key The key to check.
8818
+ * @returns {boolean} Returns `true` if `key` exists, else `false`.
8819
+ */
8820
+ function baseHasIn(object, key) {
8821
+ return object != null && key in Object(object);
8822
+ }
8823
+
8824
+ var _baseHasIn = baseHasIn;
8825
+
8826
+ /**
8827
+ * Checks if `path` exists on `object`.
8828
+ *
8829
+ * @private
8830
+ * @param {Object} object The object to query.
8831
+ * @param {Array|string} path The path to check.
8832
+ * @param {Function} hasFunc The function to check properties.
8833
+ * @returns {boolean} Returns `true` if `path` exists, else `false`.
8834
+ */
8835
+ function hasPath(object, path, hasFunc) {
8836
+ path = _castPath(path, object);
8837
+
8838
+ var index = -1,
8839
+ length = path.length,
8840
+ result = false;
8841
+
8842
+ while (++index < length) {
8843
+ var key = _toKey(path[index]);
8844
+ if (!(result = object != null && hasFunc(object, key))) {
8845
+ break;
8846
+ }
8847
+ object = object[key];
8848
+ }
8849
+ if (result || ++index != length) {
8850
+ return result;
8851
+ }
8852
+ length = object == null ? 0 : object.length;
8853
+ return !!length && isLength_1(length) && _isIndex(key, length) &&
8854
+ (isArray_1(object) || isArguments_1(object));
8855
+ }
8856
+
8857
+ var _hasPath = hasPath;
8858
+
8859
+ /**
8860
+ * Checks if `path` is a direct or inherited property of `object`.
8861
+ *
8862
+ * @static
8863
+ * @memberOf _
8864
+ * @since 4.0.0
8865
+ * @category Object
8866
+ * @param {Object} object The object to query.
8867
+ * @param {Array|string} path The path to check.
8868
+ * @returns {boolean} Returns `true` if `path` exists, else `false`.
8869
+ * @example
8870
+ *
8871
+ * var object = _.create({ 'a': _.create({ 'b': 2 }) });
8872
+ *
8873
+ * _.hasIn(object, 'a');
8874
+ * // => true
8875
+ *
8876
+ * _.hasIn(object, 'a.b');
8877
+ * // => true
8878
+ *
8879
+ * _.hasIn(object, ['a', 'b']);
8880
+ * // => true
8881
+ *
8882
+ * _.hasIn(object, 'b');
8883
+ * // => false
8884
+ */
8885
+ function hasIn(object, path) {
8886
+ return object != null && _hasPath(object, path, _baseHasIn);
8887
+ }
8888
+
8889
+ var hasIn_1 = hasIn;
8890
+
8891
+ /** Used to compose bitmasks for value comparisons. */
8892
+ var COMPARE_PARTIAL_FLAG = 1,
8893
+ COMPARE_UNORDERED_FLAG = 2;
8894
+
8895
+ /**
8896
+ * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
8897
+ *
8898
+ * @private
8899
+ * @param {string} path The path of the property to get.
8900
+ * @param {*} srcValue The value to match.
8901
+ * @returns {Function} Returns the new spec function.
8902
+ */
8903
+ function baseMatchesProperty(path, srcValue) {
8904
+ if (_isKey(path) && _isStrictComparable(srcValue)) {
8905
+ return _matchesStrictComparable(_toKey(path), srcValue);
8906
+ }
8907
+ return function(object) {
8908
+ var objValue = get_1(object, path);
8909
+ return (objValue === undefined && objValue === srcValue)
8910
+ ? hasIn_1(object, path)
8911
+ : _baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
8912
+ };
8913
+ }
8914
+
8915
+ var _baseMatchesProperty = baseMatchesProperty;
8916
+
8917
+ /**
8918
+ * This method returns the first argument it receives.
8919
+ *
8920
+ * @static
8921
+ * @since 0.1.0
8922
+ * @memberOf _
8923
+ * @category Util
8924
+ * @param {*} value Any value.
8925
+ * @returns {*} Returns `value`.
8926
+ * @example
8927
+ *
8928
+ * var object = { 'a': 1 };
8929
+ *
8930
+ * console.log(_.identity(object) === object);
8931
+ * // => true
8932
+ */
8933
+ function identity(value) {
8934
+ return value;
8935
+ }
8936
+
8937
+ var identity_1 = identity;
8938
+
8939
+ /**
8940
+ * The base implementation of `_.property` without support for deep paths.
8941
+ *
8942
+ * @private
8943
+ * @param {string} key The key of the property to get.
8944
+ * @returns {Function} Returns the new accessor function.
8945
+ */
8946
+ function baseProperty(key) {
8947
+ return function(object) {
8948
+ return object == null ? undefined : object[key];
8949
+ };
8950
+ }
8951
+
8952
+ var _baseProperty = baseProperty;
8953
+
8954
+ /**
8955
+ * A specialized version of `baseProperty` which supports deep paths.
8956
+ *
8957
+ * @private
8958
+ * @param {Array|string} path The path of the property to get.
8959
+ * @returns {Function} Returns the new accessor function.
8960
+ */
8961
+ function basePropertyDeep(path) {
8962
+ return function(object) {
8963
+ return _baseGet(object, path);
8964
+ };
8965
+ }
8966
+
8967
+ var _basePropertyDeep = basePropertyDeep;
8968
+
8969
+ /**
8970
+ * Creates a function that returns the value at `path` of a given object.
8971
+ *
8972
+ * @static
8973
+ * @memberOf _
8974
+ * @since 2.4.0
8975
+ * @category Util
8976
+ * @param {Array|string} path The path of the property to get.
8977
+ * @returns {Function} Returns the new accessor function.
8978
+ * @example
8979
+ *
8980
+ * var objects = [
8981
+ * { 'a': { 'b': 2 } },
8982
+ * { 'a': { 'b': 1 } }
8983
+ * ];
8984
+ *
8985
+ * _.map(objects, _.property('a.b'));
8986
+ * // => [2, 1]
8987
+ *
8988
+ * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
8989
+ * // => [1, 2]
8990
+ */
8991
+ function property(path) {
8992
+ return _isKey(path) ? _baseProperty(_toKey(path)) : _basePropertyDeep(path);
8993
+ }
8994
+
8995
+ var property_1 = property;
8996
+
8997
+ /**
8998
+ * The base implementation of `_.iteratee`.
8999
+ *
9000
+ * @private
9001
+ * @param {*} [value=_.identity] The value to convert to an iteratee.
9002
+ * @returns {Function} Returns the iteratee.
9003
+ */
9004
+ function baseIteratee(value) {
9005
+ // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
9006
+ // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
9007
+ if (typeof value == 'function') {
9008
+ return value;
9009
+ }
9010
+ if (value == null) {
9011
+ return identity_1;
9012
+ }
9013
+ if (typeof value == 'object') {
9014
+ return isArray_1(value)
9015
+ ? _baseMatchesProperty(value[0], value[1])
9016
+ : _baseMatches(value);
9017
+ }
9018
+ return property_1(value);
9019
+ }
9020
+
9021
+ var _baseIteratee = baseIteratee;
9022
+
9023
+ /**
9024
+ * Creates a base function for methods like `_.forIn` and `_.forOwn`.
9025
+ *
9026
+ * @private
9027
+ * @param {boolean} [fromRight] Specify iterating from right to left.
9028
+ * @returns {Function} Returns the new base function.
9029
+ */
9030
+ function createBaseFor(fromRight) {
9031
+ return function(object, iteratee, keysFunc) {
9032
+ var index = -1,
9033
+ iterable = Object(object),
9034
+ props = keysFunc(object),
9035
+ length = props.length;
9036
+
9037
+ while (length--) {
9038
+ var key = props[fromRight ? length : ++index];
9039
+ if (iteratee(iterable[key], key, iterable) === false) {
9040
+ break;
9041
+ }
9042
+ }
9043
+ return object;
9044
+ };
9045
+ }
9046
+
9047
+ var _createBaseFor = createBaseFor;
9048
+
9049
+ /**
9050
+ * The base implementation of `baseForOwn` which iterates over `object`
9051
+ * properties returned by `keysFunc` and invokes `iteratee` for each property.
9052
+ * Iteratee functions may exit iteration early by explicitly returning `false`.
9053
+ *
9054
+ * @private
9055
+ * @param {Object} object The object to iterate over.
9056
+ * @param {Function} iteratee The function invoked per iteration.
9057
+ * @param {Function} keysFunc The function to get the keys of `object`.
9058
+ * @returns {Object} Returns `object`.
9059
+ */
9060
+ var baseFor = _createBaseFor();
9061
+
9062
+ var _baseFor = baseFor;
9063
+
9064
+ /**
9065
+ * The base implementation of `_.forOwn` without support for iteratee shorthands.
9066
+ *
9067
+ * @private
9068
+ * @param {Object} object The object to iterate over.
9069
+ * @param {Function} iteratee The function invoked per iteration.
9070
+ * @returns {Object} Returns `object`.
9071
+ */
9072
+ function baseForOwn(object, iteratee) {
9073
+ return object && _baseFor(object, iteratee, keys_1);
9074
+ }
9075
+
9076
+ var _baseForOwn = baseForOwn;
9077
+
9078
+ /**
9079
+ * Creates a `baseEach` or `baseEachRight` function.
9080
+ *
9081
+ * @private
9082
+ * @param {Function} eachFunc The function to iterate over a collection.
9083
+ * @param {boolean} [fromRight] Specify iterating from right to left.
9084
+ * @returns {Function} Returns the new base function.
9085
+ */
9086
+ function createBaseEach(eachFunc, fromRight) {
9087
+ return function(collection, iteratee) {
9088
+ if (collection == null) {
9089
+ return collection;
9090
+ }
9091
+ if (!isArrayLike_1(collection)) {
9092
+ return eachFunc(collection, iteratee);
9093
+ }
9094
+ var length = collection.length,
9095
+ index = fromRight ? length : -1,
9096
+ iterable = Object(collection);
9097
+
9098
+ while ((fromRight ? index-- : ++index < length)) {
9099
+ if (iteratee(iterable[index], index, iterable) === false) {
9100
+ break;
9101
+ }
9102
+ }
9103
+ return collection;
9104
+ };
9105
+ }
9106
+
9107
+ var _createBaseEach = createBaseEach;
9108
+
9109
+ /**
9110
+ * The base implementation of `_.forEach` without support for iteratee shorthands.
9111
+ *
9112
+ * @private
9113
+ * @param {Array|Object} collection The collection to iterate over.
9114
+ * @param {Function} iteratee The function invoked per iteration.
9115
+ * @returns {Array|Object} Returns `collection`.
9116
+ */
9117
+ var baseEach = _createBaseEach(_baseForOwn);
9118
+
9119
+ var _baseEach = baseEach;
9120
+
9121
+ /**
9122
+ * The base implementation of `_.map` without support for iteratee shorthands.
9123
+ *
9124
+ * @private
9125
+ * @param {Array|Object} collection The collection to iterate over.
9126
+ * @param {Function} iteratee The function invoked per iteration.
9127
+ * @returns {Array} Returns the new mapped array.
9128
+ */
9129
+ function baseMap(collection, iteratee) {
9130
+ var index = -1,
9131
+ result = isArrayLike_1(collection) ? Array(collection.length) : [];
9132
+
9133
+ _baseEach(collection, function(value, key, collection) {
9134
+ result[++index] = iteratee(value, key, collection);
9135
+ });
9136
+ return result;
9137
+ }
9138
+
9139
+ var _baseMap = baseMap;
9140
+
9141
+ /**
9142
+ * The base implementation of `_.sortBy` which uses `comparer` to define the
9143
+ * sort order of `array` and replaces criteria objects with their corresponding
9144
+ * values.
9145
+ *
9146
+ * @private
9147
+ * @param {Array} array The array to sort.
9148
+ * @param {Function} comparer The function to define sort order.
9149
+ * @returns {Array} Returns `array`.
9150
+ */
9151
+ function baseSortBy(array, comparer) {
9152
+ var length = array.length;
9153
+
9154
+ array.sort(comparer);
9155
+ while (length--) {
9156
+ array[length] = array[length].value;
9157
+ }
9158
+ return array;
9159
+ }
9160
+
9161
+ var _baseSortBy = baseSortBy;
9162
+
9163
+ /**
9164
+ * Compares values to sort them in ascending order.
9165
+ *
9166
+ * @private
9167
+ * @param {*} value The value to compare.
9168
+ * @param {*} other The other value to compare.
9169
+ * @returns {number} Returns the sort order indicator for `value`.
9170
+ */
9171
+ function compareAscending(value, other) {
9172
+ if (value !== other) {
9173
+ var valIsDefined = value !== undefined,
9174
+ valIsNull = value === null,
9175
+ valIsReflexive = value === value,
9176
+ valIsSymbol = isSymbol_1(value);
9177
+
9178
+ var othIsDefined = other !== undefined,
9179
+ othIsNull = other === null,
9180
+ othIsReflexive = other === other,
9181
+ othIsSymbol = isSymbol_1(other);
9182
+
9183
+ if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||
9184
+ (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||
9185
+ (valIsNull && othIsDefined && othIsReflexive) ||
9186
+ (!valIsDefined && othIsReflexive) ||
9187
+ !valIsReflexive) {
9188
+ return 1;
9189
+ }
9190
+ if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||
9191
+ (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||
9192
+ (othIsNull && valIsDefined && valIsReflexive) ||
9193
+ (!othIsDefined && valIsReflexive) ||
9194
+ !othIsReflexive) {
9195
+ return -1;
9196
+ }
9197
+ }
9198
+ return 0;
9199
+ }
9200
+
9201
+ var _compareAscending = compareAscending;
9202
+
9203
+ /**
9204
+ * Used by `_.orderBy` to compare multiple properties of a value to another
9205
+ * and stable sort them.
9206
+ *
9207
+ * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,
9208
+ * specify an order of "desc" for descending or "asc" for ascending sort order
9209
+ * of corresponding values.
9210
+ *
9211
+ * @private
9212
+ * @param {Object} object The object to compare.
9213
+ * @param {Object} other The other object to compare.
9214
+ * @param {boolean[]|string[]} orders The order to sort by for each property.
9215
+ * @returns {number} Returns the sort order indicator for `object`.
9216
+ */
9217
+ function compareMultiple(object, other, orders) {
9218
+ var index = -1,
9219
+ objCriteria = object.criteria,
9220
+ othCriteria = other.criteria,
9221
+ length = objCriteria.length,
9222
+ ordersLength = orders.length;
9223
+
9224
+ while (++index < length) {
9225
+ var result = _compareAscending(objCriteria[index], othCriteria[index]);
9226
+ if (result) {
9227
+ if (index >= ordersLength) {
9228
+ return result;
9229
+ }
9230
+ var order = orders[index];
9231
+ return result * (order == 'desc' ? -1 : 1);
9232
+ }
9233
+ }
9234
+ // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications
9235
+ // that causes it, under certain circumstances, to provide the same value for
9236
+ // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247
9237
+ // for more details.
9238
+ //
9239
+ // This also ensures a stable sort in V8 and other engines.
9240
+ // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.
9241
+ return object.index - other.index;
9242
+ }
9243
+
9244
+ var _compareMultiple = compareMultiple;
9245
+
9246
+ /**
9247
+ * The base implementation of `_.orderBy` without param guards.
9248
+ *
9249
+ * @private
9250
+ * @param {Array|Object} collection The collection to iterate over.
9251
+ * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
9252
+ * @param {string[]} orders The sort orders of `iteratees`.
9253
+ * @returns {Array} Returns the new sorted array.
9254
+ */
9255
+ function baseOrderBy(collection, iteratees, orders) {
9256
+ if (iteratees.length) {
9257
+ iteratees = _arrayMap(iteratees, function(iteratee) {
9258
+ if (isArray_1(iteratee)) {
9259
+ return function(value) {
9260
+ return _baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);
9261
+ }
9262
+ }
9263
+ return iteratee;
9264
+ });
9265
+ } else {
9266
+ iteratees = [identity_1];
9267
+ }
9268
+
9269
+ var index = -1;
9270
+ iteratees = _arrayMap(iteratees, _baseUnary(_baseIteratee));
9271
+
9272
+ var result = _baseMap(collection, function(value, key, collection) {
9273
+ var criteria = _arrayMap(iteratees, function(iteratee) {
9274
+ return iteratee(value);
9275
+ });
9276
+ return { 'criteria': criteria, 'index': ++index, 'value': value };
9277
+ });
9278
+
9279
+ return _baseSortBy(result, function(object, other) {
9280
+ return _compareMultiple(object, other, orders);
9281
+ });
9282
+ }
9283
+
9284
+ var _baseOrderBy = baseOrderBy;
9285
+
9286
+ /**
9287
+ * A faster alternative to `Function#apply`, this function invokes `func`
9288
+ * with the `this` binding of `thisArg` and the arguments of `args`.
9289
+ *
9290
+ * @private
9291
+ * @param {Function} func The function to invoke.
9292
+ * @param {*} thisArg The `this` binding of `func`.
9293
+ * @param {Array} args The arguments to invoke `func` with.
9294
+ * @returns {*} Returns the result of `func`.
9295
+ */
9296
+ function apply(func, thisArg, args) {
9297
+ switch (args.length) {
9298
+ case 0: return func.call(thisArg);
9299
+ case 1: return func.call(thisArg, args[0]);
9300
+ case 2: return func.call(thisArg, args[0], args[1]);
9301
+ case 3: return func.call(thisArg, args[0], args[1], args[2]);
9302
+ }
9303
+ return func.apply(thisArg, args);
9304
+ }
9305
+
9306
+ var _apply = apply;
9307
+
9308
+ /* Built-in method references for those with the same name as other `lodash` methods. */
9309
+ var nativeMax = Math.max;
9310
+
9311
+ /**
9312
+ * A specialized version of `baseRest` which transforms the rest array.
9313
+ *
9314
+ * @private
9315
+ * @param {Function} func The function to apply a rest parameter to.
9316
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
9317
+ * @param {Function} transform The rest array transform.
9318
+ * @returns {Function} Returns the new function.
9319
+ */
9320
+ function overRest(func, start, transform) {
9321
+ start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
9322
+ return function() {
9323
+ var args = arguments,
9324
+ index = -1,
9325
+ length = nativeMax(args.length - start, 0),
9326
+ array = Array(length);
9327
+
9328
+ while (++index < length) {
9329
+ array[index] = args[start + index];
9330
+ }
9331
+ index = -1;
9332
+ var otherArgs = Array(start + 1);
9333
+ while (++index < start) {
9334
+ otherArgs[index] = args[index];
9335
+ }
9336
+ otherArgs[start] = transform(array);
9337
+ return _apply(func, this, otherArgs);
9338
+ };
9339
+ }
9340
+
9341
+ var _overRest = overRest;
9342
+
9343
+ /**
9344
+ * Creates a function that returns `value`.
9345
+ *
9346
+ * @static
9347
+ * @memberOf _
9348
+ * @since 2.4.0
9349
+ * @category Util
9350
+ * @param {*} value The value to return from the new function.
9351
+ * @returns {Function} Returns the new constant function.
9352
+ * @example
9353
+ *
9354
+ * var objects = _.times(2, _.constant({ 'a': 1 }));
9355
+ *
9356
+ * console.log(objects);
9357
+ * // => [{ 'a': 1 }, { 'a': 1 }]
9358
+ *
9359
+ * console.log(objects[0] === objects[1]);
9360
+ * // => true
9361
+ */
9362
+ function constant(value) {
9363
+ return function() {
9364
+ return value;
9365
+ };
9366
+ }
9367
+
9368
+ var constant_1 = constant;
9369
+
9370
+ var defineProperty = (function() {
9371
+ try {
9372
+ var func = _getNative(Object, 'defineProperty');
9373
+ func({}, '', {});
9374
+ return func;
9375
+ } catch (e) {}
9376
+ }());
9377
+
9378
+ var _defineProperty = defineProperty;
9379
+
9380
+ /**
9381
+ * The base implementation of `setToString` without support for hot loop shorting.
9382
+ *
9383
+ * @private
9384
+ * @param {Function} func The function to modify.
9385
+ * @param {Function} string The `toString` result.
9386
+ * @returns {Function} Returns `func`.
9387
+ */
9388
+ var baseSetToString = !_defineProperty ? identity_1 : function(func, string) {
9389
+ return _defineProperty(func, 'toString', {
9390
+ 'configurable': true,
9391
+ 'enumerable': false,
9392
+ 'value': constant_1(string),
9393
+ 'writable': true
9394
+ });
9395
+ };
9396
+
9397
+ var _baseSetToString = baseSetToString;
9398
+
9399
+ /** Used to detect hot functions by number of calls within a span of milliseconds. */
9400
+ var HOT_COUNT = 800,
9401
+ HOT_SPAN = 16;
9402
+
9403
+ /* Built-in method references for those with the same name as other `lodash` methods. */
9404
+ var nativeNow = Date.now;
9405
+
9406
+ /**
9407
+ * Creates a function that'll short out and invoke `identity` instead
9408
+ * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
9409
+ * milliseconds.
9410
+ *
9411
+ * @private
9412
+ * @param {Function} func The function to restrict.
9413
+ * @returns {Function} Returns the new shortable function.
9414
+ */
9415
+ function shortOut(func) {
9416
+ var count = 0,
9417
+ lastCalled = 0;
9418
+
9419
+ return function() {
9420
+ var stamp = nativeNow(),
9421
+ remaining = HOT_SPAN - (stamp - lastCalled);
9422
+
9423
+ lastCalled = stamp;
9424
+ if (remaining > 0) {
9425
+ if (++count >= HOT_COUNT) {
9426
+ return arguments[0];
9427
+ }
9428
+ } else {
9429
+ count = 0;
9430
+ }
9431
+ return func.apply(undefined, arguments);
9432
+ };
9433
+ }
9434
+
9435
+ var _shortOut = shortOut;
9436
+
9437
+ /**
9438
+ * Sets the `toString` method of `func` to return `string`.
9439
+ *
9440
+ * @private
9441
+ * @param {Function} func The function to modify.
9442
+ * @param {Function} string The `toString` result.
9443
+ * @returns {Function} Returns `func`.
9444
+ */
9445
+ var setToString = _shortOut(_baseSetToString);
9446
+
9447
+ var _setToString = setToString;
9448
+
9449
+ /**
9450
+ * The base implementation of `_.rest` which doesn't validate or coerce arguments.
9451
+ *
9452
+ * @private
9453
+ * @param {Function} func The function to apply a rest parameter to.
9454
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
9455
+ * @returns {Function} Returns the new function.
9456
+ */
9457
+ function baseRest(func, start) {
9458
+ return _setToString(_overRest(func, start, identity_1), func + '');
9459
+ }
9460
+
9461
+ var _baseRest = baseRest;
9462
+
9463
+ /**
9464
+ * Checks if the given arguments are from an iteratee call.
9465
+ *
9466
+ * @private
9467
+ * @param {*} value The potential iteratee value argument.
9468
+ * @param {*} index The potential iteratee index or key argument.
9469
+ * @param {*} object The potential iteratee object argument.
9470
+ * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
9471
+ * else `false`.
9472
+ */
9473
+ function isIterateeCall(value, index, object) {
9474
+ if (!isObject_1(object)) {
9475
+ return false;
9476
+ }
9477
+ var type = typeof index;
9478
+ if (type == 'number'
9479
+ ? (isArrayLike_1(object) && _isIndex(index, object.length))
9480
+ : (type == 'string' && index in object)
9481
+ ) {
9482
+ return eq_1(object[index], value);
9483
+ }
9484
+ return false;
9485
+ }
9486
+
9487
+ var _isIterateeCall = isIterateeCall;
9488
+
9489
+ /**
9490
+ * Creates an array of elements, sorted in ascending order by the results of
9491
+ * running each element in a collection thru each iteratee. This method
9492
+ * performs a stable sort, that is, it preserves the original sort order of
9493
+ * equal elements. The iteratees are invoked with one argument: (value).
9494
+ *
9495
+ * @static
9496
+ * @memberOf _
9497
+ * @since 0.1.0
9498
+ * @category Collection
9499
+ * @param {Array|Object} collection The collection to iterate over.
9500
+ * @param {...(Function|Function[])} [iteratees=[_.identity]]
9501
+ * The iteratees to sort by.
9502
+ * @returns {Array} Returns the new sorted array.
9503
+ * @example
9504
+ *
9505
+ * var users = [
9506
+ * { 'user': 'fred', 'age': 48 },
9507
+ * { 'user': 'barney', 'age': 36 },
9508
+ * { 'user': 'fred', 'age': 30 },
9509
+ * { 'user': 'barney', 'age': 34 }
9510
+ * ];
9511
+ *
9512
+ * _.sortBy(users, [function(o) { return o.user; }]);
9513
+ * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]
9514
+ *
9515
+ * _.sortBy(users, ['user', 'age']);
9516
+ * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]
9517
+ */
9518
+ var sortBy = _baseRest(function(collection, iteratees) {
9519
+ if (collection == null) {
9520
+ return [];
9521
+ }
9522
+ var length = iteratees.length;
9523
+ if (length > 1 && _isIterateeCall(collection, iteratees[0], iteratees[1])) {
9524
+ iteratees = [];
9525
+ } else if (length > 2 && _isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
9526
+ iteratees = [iteratees[0]];
9527
+ }
9528
+ return _baseOrderBy(collection, _baseFlatten(iteratees, 1), []);
9529
+ });
9530
+
9531
+ var sortBy_1 = sortBy;
9532
+
9533
+ /**
9534
+ * Configuration for custom action validation rules.
9535
+ * Defines allowed positions, metadata IDs, data model IDs, and fields for each target
9536
+ * type.
9537
+ *
9538
+ */
9539
+ const customActionValidationConfig = {
9540
+ [CustomActionTarget.LIVEBOARD]: {
9541
+ positions: [CustomActionsPosition.PRIMARY, CustomActionsPosition.MENU],
9542
+ allowedMetadataIds: ['liveboardIds'],
9543
+ allowedDataModelIds: [],
9544
+ allowedFields: ['name', 'id', 'position', 'target', 'metadataIds', 'orgIds', 'groupIds'],
9545
+ },
9546
+ [CustomActionTarget.VIZ]: {
9547
+ positions: [CustomActionsPosition.MENU, CustomActionsPosition.PRIMARY, CustomActionsPosition.CONTEXTMENU],
9548
+ allowedMetadataIds: ['liveboardIds', 'vizIds', 'answerIds'],
9549
+ allowedDataModelIds: ['modelIds', 'modelColumnNames'],
9550
+ allowedFields: ['name', 'id', 'position', 'target', 'metadataIds', 'orgIds', 'groupIds', 'dataModelIds'],
9551
+ },
9552
+ [CustomActionTarget.ANSWER]: {
9553
+ positions: [CustomActionsPosition.MENU, CustomActionsPosition.PRIMARY, CustomActionsPosition.CONTEXTMENU],
9554
+ allowedMetadataIds: ['answerIds'],
9555
+ allowedDataModelIds: ['modelIds', 'modelColumnNames'],
9556
+ allowedFields: ['name', 'id', 'position', 'target', 'metadataIds', 'orgIds', 'groupIds', 'dataModelIds'],
9557
+ },
9558
+ [CustomActionTarget.SPOTTER]: {
9559
+ positions: [CustomActionsPosition.MENU, CustomActionsPosition.CONTEXTMENU],
9560
+ allowedMetadataIds: [],
9561
+ allowedDataModelIds: ['modelIds'],
9562
+ allowedFields: ['name', 'id', 'position', 'target', 'orgIds', 'groupIds', 'dataModelIds'],
9563
+ },
9564
+ };
9565
+ /**
9566
+ * Validates a single custom action based on its target type
9567
+ * @param action - The custom action to validate
9568
+ * @param primaryActionsPerTarget - Map to track primary actions per target
9569
+ * @returns CustomActionValidation with isValid flag and reason string
9570
+ *
9571
+ * @hidden
9572
+ */
9573
+ const validateCustomAction = (action, primaryActionsPerTarget) => {
9574
+ const { id: actionId, target: targetType, position, metadataIds, dataModelIds } = action;
9575
+ // Check if target type is supported
9576
+ if (!customActionValidationConfig[targetType]) {
9577
+ const errorMessage = CUSTOM_ACTIONS_ERROR_MESSAGE.UNSUPPORTED_TARGET(actionId, targetType);
9578
+ return { isValid: false, errors: [errorMessage] };
9579
+ }
9580
+ const config = customActionValidationConfig[targetType];
9581
+ const errors = [];
9582
+ // Validate position
9583
+ if (!arrayIncludesString(config.positions, position)) {
9584
+ const supportedPositions = config.positions.join(', ');
9585
+ errors.push(CUSTOM_ACTIONS_ERROR_MESSAGE.INVALID_POSITION(position, targetType, supportedPositions));
8060
9586
  }
8061
- /**
8062
- * Get underlying data given a point and the output column names.
8063
- * In case of a context menu action, the selectedPoints are
8064
- * automatically passed.
8065
- * @param outputColumnNames
8066
- * @param selectedPoints
8067
- * @example
8068
- * ```js
8069
- * embed.on(EmbedEvent.CustomAction, e => {
8070
- * const underlying = await e.answerService.getUnderlyingDataForPoint([
8071
- * 'col name 1' // The column should exist in the data source.
8072
- * ]);
8073
- * const data = await underlying.fetchData(0, 100);
8074
- * })
8075
- * ```
8076
- * @version SDK: 1.25.0| ThoughtSpot: 9.10.0.cl
8077
- */
8078
- async getUnderlyingDataForPoint(outputColumnNames, selectedPoints) {
8079
- if (!selectedPoints && !this.selectedPoints) {
8080
- throw new Error('Needs to be triggered in context of a point');
8081
- }
8082
- if (!selectedPoints) {
8083
- selectedPoints = getSelectedPointsForUnderlyingDataQuery(this.selectedPoints);
8084
- }
8085
- const sourceDetail = await this.getSourceDetail();
8086
- const ouputColumnGuids = getGuidsFromColumnNames(sourceDetail, outputColumnNames);
8087
- const unAggAnswer = await graphqlQuery({
8088
- query: getUnaggregatedAnswerSession,
8089
- variables: {
8090
- session: this.session,
8091
- columns: selectedPoints,
8092
- },
8093
- thoughtSpotHost: this.thoughtSpotHost,
8094
- });
8095
- const unaggAnswerSession = new AnswerService(unAggAnswer.id, unAggAnswer.answer, this.thoughtSpotHost);
8096
- const currentColumns = new Set(unAggAnswer.answer.visualizations[0].columns
8097
- .map((c) => c.column.referencedColumns[0].guid));
8098
- const columnsToAdd = [...ouputColumnGuids].filter((col) => !currentColumns.has(col));
8099
- if (columnsToAdd.length) {
8100
- await unaggAnswerSession.addColumns(columnsToAdd);
9587
+ // Check for primary action conflicts (this is a warning, not a validation
9588
+ // failure)
9589
+ if (position === CustomActionsPosition.PRIMARY) {
9590
+ const existingPrimaryAction = primaryActionsPerTarget.get(targetType);
9591
+ if (existingPrimaryAction) {
9592
+ errors.push(CUSTOM_ACTIONS_ERROR_MESSAGE.MULTIPLE_PRIMARY_ACTIONS(targetType, existingPrimaryAction.name, action.name));
8101
9593
  }
8102
- const columnsToRemove = [...currentColumns].filter((col) => !ouputColumnGuids.has(col));
8103
- if (columnsToRemove.length) {
8104
- await unaggAnswerSession.removeColumns(columnsToRemove);
9594
+ else {
9595
+ primaryActionsPerTarget.set(targetType, action);
8105
9596
  }
8106
- return unaggAnswerSession;
8107
- }
8108
- /**
8109
- * Execute a custom graphql query in the context of the answer.
8110
- * @param query graphql query
8111
- * @param variables graphql variables
8112
- * @returns
8113
- */
8114
- async executeQuery(query, variables) {
8115
- const data = await graphqlQuery({
8116
- query,
8117
- variables: {
8118
- session: this.session,
8119
- ...variables,
8120
- },
8121
- thoughtSpotHost: this.thoughtSpotHost,
8122
- isCompositeQuery: false,
8123
- });
8124
- this.session = deepMerge(this.session, (data === null || data === void 0 ? void 0 : data.id) || {});
8125
- return data;
8126
9597
  }
8127
- /**
8128
- * Get the internal session details for the answer.
8129
- * @returns
8130
- */
8131
- getSession() {
8132
- return this.session;
8133
- }
8134
- async getAnswer() {
8135
- if (this.answer) {
8136
- return this.answer;
9598
+ // Validate metadata IDs
9599
+ if (metadataIds) {
9600
+ const invalidMetadataIds = Object.keys(metadataIds).filter((key) => !arrayIncludesString(config.allowedMetadataIds, key));
9601
+ if (invalidMetadataIds.length > 0) {
9602
+ const supportedMetadataIds = config.allowedMetadataIds.length > 0 ? config.allowedMetadataIds.join(', ') : 'none';
9603
+ errors.push(CUSTOM_ACTIONS_ERROR_MESSAGE.INVALID_METADATA_IDS(targetType, invalidMetadataIds, supportedMetadataIds));
8137
9604
  }
8138
- this.answer = this.executeQuery(getAnswer, {}).then((data) => data === null || data === void 0 ? void 0 : data.answer);
8139
- return this.answer;
8140
- }
8141
- async getTML() {
8142
- const { object } = await this.executeQuery(getAnswerTML, {});
8143
- const edoc = object[0].edoc;
8144
- const YAML = await import('./index-B0uCTBbm.js');
8145
- const parsedDoc = YAML.parse(edoc);
8146
- return {
8147
- answer: {
8148
- ...parsedDoc.answer,
8149
- ...this.tmlOverride,
8150
- },
8151
- };
8152
9605
  }
8153
- async addDisplayedVizToLiveboard(liveboardId) {
8154
- const { displayMode, visualizations } = await this.getAnswer();
8155
- const viz = getDisplayedViz(visualizations, displayMode);
8156
- return this.executeQuery(addVizToLiveboard, {
8157
- liveboardId,
8158
- vizId: viz.id,
8159
- });
9606
+ // Validate data model IDs
9607
+ if (dataModelIds) {
9608
+ const invalidDataModelIds = Object.keys(dataModelIds).filter((key) => !arrayIncludesString(config.allowedDataModelIds, key));
9609
+ if (invalidDataModelIds.length > 0) {
9610
+ const supportedDataModelIds = config.allowedDataModelIds.length > 0 ? config.allowedDataModelIds.join(', ') : 'none';
9611
+ errors.push(CUSTOM_ACTIONS_ERROR_MESSAGE.INVALID_DATA_MODEL_IDS(targetType, invalidDataModelIds, supportedDataModelIds));
9612
+ }
8160
9613
  }
8161
- setTMLOverride(override) {
8162
- this.tmlOverride = override;
9614
+ // Validate allowed fields
9615
+ const actionKeys = Object.keys(action);
9616
+ const invalidFields = actionKeys.filter((key) => !arrayIncludesString(config.allowedFields, key));
9617
+ if (invalidFields.length > 0) {
9618
+ const supportedFields = config.allowedFields.join(', ');
9619
+ errors.push(CUSTOM_ACTIONS_ERROR_MESSAGE.INVALID_FIELDS(targetType, invalidFields, supportedFields));
8163
9620
  }
8164
- }
9621
+ return {
9622
+ isValid: errors.length === 0,
9623
+ errors,
9624
+ };
9625
+ };
8165
9626
  /**
9627
+ * Validates basic action structure and required fields
9628
+ * @param action - The action to validate
9629
+ * @returns Object containing validation result and missing fields
8166
9630
  *
8167
- * @param sourceDetail
8168
- * @param colNames
9631
+ * @hidden
8169
9632
  */
8170
- function getGuidsFromColumnNames(sourceDetail, colNames) {
8171
- const cols = sourceDetail.columns.reduce((colSet, col) => {
8172
- colSet[col.name.toLowerCase()] = col;
8173
- return colSet;
8174
- }, {});
8175
- return new Set(colNames.map((colName) => {
8176
- const col = cols[colName.toLowerCase()];
8177
- return col.id;
8178
- }));
8179
- }
9633
+ const validateActionStructure = (action) => {
9634
+ if (!action || typeof action !== 'object') {
9635
+ return { isValid: false, missingFields: [] };
9636
+ }
9637
+ // Check for all missing required fields
9638
+ const missingFields = ['id', 'name', 'target', 'position'].filter(field => !action[field]);
9639
+ return { isValid: missingFields.length === 0, missingFields };
9640
+ };
8180
9641
  /**
9642
+ * Checks for duplicate IDs among actions
9643
+ * @param actions - Array of actions to check
9644
+ * @returns Object containing filtered actions and duplicate errors
8181
9645
  *
8182
- * @param selectedPoints
9646
+ * @hidden
8183
9647
  */
8184
- function getSelectedPointsForUnderlyingDataQuery(selectedPoints) {
8185
- const underlyingDataPoint = [];
8186
- /**
8187
- *
8188
- * @param colVal
8189
- */
8190
- function addPointFromColVal(colVal) {
8191
- var _a;
8192
- const dataType = colVal.column.dataType;
8193
- colVal.column.id;
8194
- let dataValue;
8195
- if (dataType === 'DATE') {
8196
- if (Number.isFinite(colVal.value)) {
8197
- dataValue = [{
8198
- epochRange: {
8199
- startEpoch: colVal.value,
8200
- },
8201
- }];
8202
- // Case for custom calendar.
8203
- }
8204
- else if ((_a = colVal.value) === null || _a === void 0 ? void 0 : _a.v) {
8205
- dataValue = [{
8206
- epochRange: {
8207
- startEpoch: colVal.value.v.s,
8208
- endEpoch: colVal.value.v.e,
8209
- },
8210
- }];
8211
- }
9648
+ const filterDuplicateIds = (actions) => {
9649
+ const idMap = actions.reduce((map, action) => {
9650
+ const list = map.get(action.id) || [];
9651
+ list.push(action);
9652
+ map.set(action.id, list);
9653
+ return map;
9654
+ }, new Map());
9655
+ const { actions: actionsWithUniqueIds, errors } = Array.from(idMap.entries()).reduce((acc, [id, actionsWithSameId]) => {
9656
+ if (actionsWithSameId.length === 1) {
9657
+ acc.actions.push(actionsWithSameId[0]);
8212
9658
  }
8213
9659
  else {
8214
- dataValue = [{ value: colVal.value }];
9660
+ // Keep the first action and add error for duplicates
9661
+ acc.actions.push(actionsWithSameId[0]);
9662
+ const duplicateNames = actionsWithSameId.slice(1).map(action => action.name);
9663
+ acc.errors.push(CUSTOM_ACTIONS_ERROR_MESSAGE.DUPLICATE_IDS(id, duplicateNames, actionsWithSameId[0].name));
8215
9664
  }
8216
- underlyingDataPoint.push({
8217
- columnId: colVal.column.id,
8218
- dataValue,
8219
- });
8220
- }
8221
- selectedPoints.forEach((p) => {
8222
- p.selectedAttributes.forEach(addPointFromColVal);
8223
- });
8224
- return underlyingDataPoint;
8225
- }
9665
+ return acc;
9666
+ }, { actions: [], errors: [] });
9667
+ return { actions: actionsWithUniqueIds, errors };
9668
+ };
8226
9669
  /**
8227
- *
8228
- * @param visualizations
8229
- * @param displayMode
9670
+ * Validates and processes custom actions
9671
+ * @param customActions - Array of custom actions to validate
9672
+ * @returns Object containing valid actions and any validation errors
8230
9673
  */
8231
- function getDisplayedViz(visualizations, displayMode) {
8232
- if (displayMode === 'CHART_MODE') {
8233
- return visualizations.find(
8234
- // eslint-disable-next-line no-underscore-dangle
8235
- (viz) => viz.__typename === 'ChartViz');
9674
+ const getCustomActions = (customActions) => {
9675
+ const errors = [];
9676
+ const primaryActionsPerTarget = new Map();
9677
+ if (!customActions || !Array.isArray(customActions)) {
9678
+ return { actions: [], errors: [] };
8236
9679
  }
8237
- return visualizations.find(
8238
- // eslint-disable-next-line no-underscore-dangle
8239
- (viz) => viz.__typename === 'TableViz');
8240
- }
9680
+ // Step 1: Handle invalid actions first (null, undefined, missing required
9681
+ // fields)
9682
+ const validActions = customActions.filter(action => {
9683
+ const validation = validateActionStructure(action);
9684
+ if (!validation.isValid) {
9685
+ if (!action || typeof action !== 'object') {
9686
+ errors.push(CUSTOM_ACTIONS_ERROR_MESSAGE.INVALID_ACTION_OBJECT);
9687
+ }
9688
+ else {
9689
+ errors.push(CUSTOM_ACTIONS_ERROR_MESSAGE.MISSING_REQUIRED_FIELDS(action.id, validation.missingFields));
9690
+ }
9691
+ return false;
9692
+ }
9693
+ return true;
9694
+ });
9695
+ // Step 2: Check for duplicate IDs among valid actions
9696
+ const { actions: actionsWithUniqueIds, errors: duplicateErrors } = filterDuplicateIds(validActions);
9697
+ // Add duplicate errors to the errors array
9698
+ duplicateErrors.forEach(error => errors.push(error));
9699
+ // Step 3: Validate actions with unique IDs
9700
+ const finalValidActions = [];
9701
+ actionsWithUniqueIds.forEach((action) => {
9702
+ const { isValid, errors: validationErrors } = validateCustomAction(action, primaryActionsPerTarget);
9703
+ validationErrors.forEach(error => errors.push(error));
9704
+ if (isValid) {
9705
+ finalValidActions.push(action);
9706
+ }
9707
+ });
9708
+ const sortedActions = sortBy_1(finalValidActions, (a) => a.name.toLocaleLowerCase());
9709
+ return {
9710
+ actions: sortedActions,
9711
+ errors: errors,
9712
+ };
9713
+ };
8241
9714
 
8242
9715
  /**
8243
9716
  * Copyright (c) 2023
@@ -15884,7 +17357,7 @@ function processEventData(type, e, thoughtSpotHost, containerEl) {
15884
17357
  return e;
15885
17358
  }
15886
17359
 
15887
- var name="@thoughtspot/visual-embed-sdk";var version$1="1.40.1-alpha.3";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p . --incremental false; tsc -p . --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts","bundle-dts":"dts-bundle --name ../../dist/visual-embed-sdk --main lib/src/index.d.ts --outputAsModuleFolder=true","bundle-dts-react":"dts-bundle --name ../../../dist/visual-embed-sdk-react --main lib/src/react/index.d.ts --outputAsModuleFolder=true","bundle-dts-react-full":"dts-bundle --name ../../../dist/visual-embed-sdk-react-full --main lib/src/react/all-types-export.d.ts --outputAsModuleFolder=true",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.json --theme typedoc-theme --json static/typedoc/typedoc.json --disableOutputCheck","test-sdk":"jest -c jest.config.sdk.js --runInBand",test:"npm run test-sdk",posttest:"cat ./coverage/sdk/lcov.info","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":"^0.7.3",eslint:"^9.23.0","eslint-config-airbnb-base":"^15.0.0","eslint-config-prettier":"^10.1.1","eslint-import-resolver-typescript":"^4.2.5","eslint-plugin-comment-length":"2.2.1","eslint-plugin-import":"^2.31.0","eslint-plugin-jsdoc":"^50.6.9","eslint-plugin-prettier":"^5.2.5","eslint-plugin-react":"^7.37.5","eslint-plugin-react-hooks":"^5.2.0","fs-extra":"^10.0.0","gh-pages":"6.3.0",globals:"^16.0.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^2.0.0",jest:"^26.6.3","jest-fetch-mock":"^3.0.3",jsdom:"^17.0.0",prettier:"2.1.2",react:"^16.14.0","react-dom":"^16.14.0","react-resizable":"^1.11.0","react-resize-detector":"^6.6.0","react-test-renderer":"^17.0.2","react-use-flexsearch":"^0.1.1",rollup:"4.24.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^26.5.5","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","typescript-eslint":"^8.29.1","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^6.3.5"};var author="ThoughtSpot";var email="support@thoughtspot.com";var license="ThoughtSpot Development Tools End User License Agreement";var directories={lib:"lib"};var repository={type:"git",url:"git+https://github.com/thoughtspot/visual-embed-sdk.git"};var publishConfig={registry:"https://registry.npmjs.org"};var keywords=["thoughtspot","everywhere","embedded","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version$1,description:description,module:module,main:main,types:types,files:files,exports:exports,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.es.js",limit:"32 kB"}],scripts:scripts,peerDependencies:peerDependencies,dependencies:dependencies,devDependencies:devDependencies,author:author,email:email,license:license,directories:directories,repository:repository,publishConfig:publishConfig,keywords:keywords,bugs:bugs,homepage:homepage,globals:globals};
17360
+ var name="@thoughtspot/visual-embed-sdk";var version$1="1.40.2";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p . --incremental false; tsc -p . --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts","bundle-dts":"dts-bundle --name ../../dist/visual-embed-sdk --main lib/src/index.d.ts --outputAsModuleFolder=true","bundle-dts-react":"dts-bundle --name ../../../dist/visual-embed-sdk-react --main lib/src/react/index.d.ts --outputAsModuleFolder=true","bundle-dts-react-full":"dts-bundle --name ../../../dist/visual-embed-sdk-react-full --main lib/src/react/all-types-export.d.ts --outputAsModuleFolder=true",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.json --theme typedoc-theme --json static/typedoc/typedoc.json --disableOutputCheck","test-sdk":"jest -c jest.config.sdk.js --runInBand",test:"npm run test-sdk",posttest:"cat ./coverage/sdk/lcov.info | 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":"^0.7.3",eslint:"^9.23.0","eslint-config-airbnb-base":"^15.0.0","eslint-config-prettier":"^10.1.1","eslint-import-resolver-typescript":"^4.2.5","eslint-plugin-comment-length":"2.2.1","eslint-plugin-import":"^2.31.0","eslint-plugin-jsdoc":"^50.6.9","eslint-plugin-prettier":"^5.2.5","eslint-plugin-react":"^7.37.5","eslint-plugin-react-hooks":"^5.2.0","fs-extra":"^10.0.0","gh-pages":"6.3.0",globals:"^16.0.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^2.0.0",jest:"^26.6.3","jest-fetch-mock":"^3.0.3",jsdom:"^17.0.0",prettier:"2.1.2",react:"^16.14.0","react-dom":"^16.14.0","react-resizable":"^1.11.0","react-resize-detector":"^6.6.0","react-test-renderer":"^17.0.2","react-use-flexsearch":"^0.1.1",rollup:"4.24.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^26.5.5","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","typescript-eslint":"^8.29.1","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^6.3.5"};var author="ThoughtSpot";var email="support@thoughtspot.com";var license="ThoughtSpot Development Tools End User License Agreement";var directories={lib:"lib"};var repository={type:"git",url:"git+https://github.com/thoughtspot/visual-embed-sdk.git"};var publishConfig={registry:"https://registry.npmjs.org"};var keywords=["thoughtspot","everywhere","embedded","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version$1,description:description,module:module,main:main,types:types,files:files,exports:exports,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.es.js",limit:"32 kB"}],scripts:scripts,peerDependencies:peerDependencies,dependencies:dependencies,devDependencies:devDependencies,author:author,email:email,license:license,directories:directories,repository:repository,publishConfig:publishConfig,keywords:keywords,bugs:bugs,homepage:homepage,globals:globals};
15888
17361
 
15889
17362
  /**
15890
17363
  * Reloads the ThoughtSpot iframe.
@@ -16322,8 +17795,7 @@ class TsEmbed {
16322
17795
  // - cached auth may not reflect current user permissions
16323
17796
  const isDisabled = (this.viewConfig.overrideOrgId !== undefined
16324
17797
  || this.embedConfig.disablePreauthCache === true
16325
- // || this.isFullAppEmbedWithVisiblePrimaryNavbar()
16326
- );
17798
+ || this.isFullAppEmbedWithVisiblePrimaryNavbar());
16327
17799
  return !isDisabled;
16328
17800
  }
16329
17801
  /**
@@ -16410,6 +17882,16 @@ class TsEmbed {
16410
17882
  async getDefaultAppInitData() {
16411
17883
  var _a, _b;
16412
17884
  const authToken = await this.getAuthTokenForCookielessInit();
17885
+ const customActionsResult = getCustomActions([
17886
+ ...(this.viewConfig.customActions || []),
17887
+ ...(this.embedConfig.customActions || [])
17888
+ ]);
17889
+ if (customActionsResult.errors.length > 0) {
17890
+ this.handleError({
17891
+ type: 'CUSTOM_ACTION_VALIDATION',
17892
+ message: customActionsResult.errors,
17893
+ });
17894
+ }
16413
17895
  return {
16414
17896
  customisations: getCustomisations(this.embedConfig, this.viewConfig),
16415
17897
  authToken,
@@ -16427,6 +17909,7 @@ class TsEmbed {
16427
17909
  : [],
16428
17910
  customVariablesForThirdPartyTools: this.embedConfig.customVariablesForThirdPartyTools || {},
16429
17911
  hiddenListColumns: this.viewConfig.hiddenListColumns || [],
17912
+ customActions: customActionsResult.actions,
16430
17913
  };
16431
17914
  }
16432
17915
  async getAppInitData() {
@@ -19534,4 +21017,4 @@ function useSpotterAgent(config) {
19534
21017
  };
19535
21018
  }
19536
21019
 
19537
- export { Action, AppEmbed, ConversationEmbed, ConversationMessage, EmbedEvent, HomeLeftNavItem, HomepageModule, HostEvent, ListPageColumns, LiveboardEmbed, LogLevel, Page, PinboardEmbed, PreRenderedAppEmbed, PreRenderedConversationEmbed, PreRenderedLiveboardEmbed, PreRenderedPinboardEmbed, PreRenderedSageEmbed, PreRenderedSearchBarEmbed, PreRenderedSearchEmbed, RuntimeFilterOp, SageEmbed, SearchBarEmbed, SearchEmbed, SpotterEmbed, SpotterMessage, getSessionInfo, useEmbedRef, useInit, useSpotterAgent };
21020
+ export { Action, AppEmbed, ConversationEmbed, ConversationMessage, CustomActionsPosition, EmbedEvent, HomeLeftNavItem, HomepageModule, HostEvent, ListPageColumns, LiveboardEmbed, LogLevel, Page, PinboardEmbed, PreRenderedAppEmbed, PreRenderedConversationEmbed, PreRenderedLiveboardEmbed, PreRenderedPinboardEmbed, PreRenderedSageEmbed, PreRenderedSearchBarEmbed, PreRenderedSearchEmbed, RuntimeFilterOp, SageEmbed, SearchBarEmbed, SearchEmbed, SpotterEmbed, SpotterMessage, getSessionInfo, useEmbedRef, useInit, useSpotterAgent };