@thoughtspot/visual-embed-sdk 1.52.1 → 1.52.2-beta

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 (241) hide show
  1. package/cjs/package.json +11 -4
  2. package/cjs/src/contracts/host-event-contracts.d.ts +49 -11
  3. package/cjs/src/contracts/host-event-contracts.d.ts.map +1 -1
  4. package/cjs/src/embed/app.d.ts +4 -3
  5. package/cjs/src/embed/app.d.ts.map +1 -1
  6. package/cjs/src/embed/app.js +1 -1
  7. package/cjs/src/embed/app.js.map +1 -1
  8. package/cjs/src/embed/app.spec.js +10 -0
  9. package/cjs/src/embed/app.spec.js.map +1 -1
  10. package/cjs/src/embed/auto-frame-renderer.js +1 -1
  11. package/cjs/src/embed/auto-frame-renderer.js.map +1 -1
  12. package/cjs/src/embed/auto-frame-renderer.spec.js +24 -13
  13. package/cjs/src/embed/auto-frame-renderer.spec.js.map +1 -1
  14. package/cjs/src/embed/bodyless-conversation.js +1 -1
  15. package/cjs/src/embed/bodyless-conversation.js.map +1 -1
  16. package/cjs/src/embed/conversation.d.ts +1 -0
  17. package/cjs/src/embed/conversation.d.ts.map +1 -1
  18. package/cjs/src/embed/conversation.js +4 -4
  19. package/cjs/src/embed/conversation.js.map +1 -1
  20. package/cjs/src/embed/conversation.spec.js +35 -24
  21. package/cjs/src/embed/conversation.spec.js.map +1 -1
  22. package/cjs/src/embed/embedConfig.spec.js +2 -1
  23. package/cjs/src/embed/embedConfig.spec.js.map +1 -1
  24. package/cjs/src/embed/hostEventClient/host-event-client.d.ts +2 -2
  25. package/cjs/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
  26. package/cjs/src/embed/hostEventClient/host-event-client.js +16 -10
  27. package/cjs/src/embed/hostEventClient/host-event-client.js.map +1 -1
  28. package/cjs/src/embed/hostEventClient/host-event-client.spec.js +14 -8
  29. package/cjs/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
  30. package/cjs/src/embed/hostEventClient/utils.d.ts +9 -0
  31. package/cjs/src/embed/hostEventClient/utils.d.ts.map +1 -1
  32. package/cjs/src/embed/hostEventClient/utils.js +49 -3
  33. package/cjs/src/embed/hostEventClient/utils.js.map +1 -1
  34. package/cjs/src/embed/hostEventClient/utils.spec.js +151 -0
  35. package/cjs/src/embed/hostEventClient/utils.spec.js.map +1 -1
  36. package/cjs/src/embed/liveboard.d.ts +4 -3
  37. package/cjs/src/embed/liveboard.d.ts.map +1 -1
  38. package/cjs/src/embed/liveboard.js +18 -13
  39. package/cjs/src/embed/liveboard.js.map +1 -1
  40. package/cjs/src/embed/liveboard.spec.js +2 -1
  41. package/cjs/src/embed/liveboard.spec.js.map +1 -1
  42. package/cjs/src/embed/search-bar.js +1 -1
  43. package/cjs/src/embed/search-bar.js.map +1 -1
  44. package/cjs/src/embed/search.js +1 -1
  45. package/cjs/src/embed/search.js.map +1 -1
  46. package/cjs/src/embed/search.spec.js +20 -0
  47. package/cjs/src/embed/search.spec.js.map +1 -1
  48. package/cjs/src/embed/spotter-utils.d.ts +8 -1
  49. package/cjs/src/embed/spotter-utils.d.ts.map +1 -1
  50. package/cjs/src/embed/spotter-utils.js +14 -1
  51. package/cjs/src/embed/spotter-utils.js.map +1 -1
  52. package/cjs/src/embed/spotter-utils.spec.js +26 -0
  53. package/cjs/src/embed/spotter-utils.spec.js.map +1 -1
  54. package/cjs/src/embed/ts-embed.d.ts +3 -0
  55. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  56. package/cjs/src/embed/ts-embed.js +108 -29
  57. package/cjs/src/embed/ts-embed.js.map +1 -1
  58. package/cjs/src/embed/ts-embed.spec.js +163 -23
  59. package/cjs/src/embed/ts-embed.spec.js.map +1 -1
  60. package/cjs/src/errors.js +1 -1
  61. package/cjs/src/errors.js.map +1 -1
  62. package/cjs/src/index.d.ts +2 -1
  63. package/cjs/src/index.d.ts.map +1 -1
  64. package/cjs/src/index.js +3 -1
  65. package/cjs/src/index.js.map +1 -1
  66. package/cjs/src/react/all-types-export.d.ts +1 -1
  67. package/cjs/src/react/all-types-export.d.ts.map +1 -1
  68. package/cjs/src/react/all-types-export.js +2 -1
  69. package/cjs/src/react/all-types-export.js.map +1 -1
  70. package/cjs/src/types.d.ts +45 -22
  71. package/cjs/src/types.d.ts.map +1 -1
  72. package/cjs/src/types.js +44 -21
  73. package/cjs/src/types.js.map +1 -1
  74. package/cjs/src/utils/authService/tokenizedAuthService.spec.js +2 -1
  75. package/cjs/src/utils/authService/tokenizedAuthService.spec.js.map +1 -1
  76. package/cjs/src/utils/custom-actions.spec.js +4 -2
  77. package/cjs/src/utils/custom-actions.spec.js.map +1 -1
  78. package/cjs/src/utils/filterConverter.d.ts +106 -0
  79. package/cjs/src/utils/filterConverter.d.ts.map +1 -0
  80. package/cjs/src/utils/filterConverter.js +215 -0
  81. package/cjs/src/utils/filterConverter.js.map +1 -0
  82. package/cjs/src/utils/filterConverter.spec.d.ts +2 -0
  83. package/cjs/src/utils/filterConverter.spec.d.ts.map +1 -0
  84. package/cjs/src/utils/filterConverter.spec.js +709 -0
  85. package/cjs/src/utils/filterConverter.spec.js.map +1 -0
  86. package/cjs/src/utils/processData.spec.js +2 -1
  87. package/cjs/src/utils/processData.spec.js.map +1 -1
  88. package/dist/{index-C1pmYb5H.js → index-CcBYlGo9.js} +1 -1
  89. package/dist/src/contracts/host-event-contracts.d.ts +49 -11
  90. package/dist/src/contracts/host-event-contracts.d.ts.map +1 -1
  91. package/dist/src/embed/app.d.ts +4 -3
  92. package/dist/src/embed/app.d.ts.map +1 -1
  93. package/dist/src/embed/conversation.d.ts +1 -0
  94. package/dist/src/embed/conversation.d.ts.map +1 -1
  95. package/dist/src/embed/hostEventClient/host-event-client.d.ts +2 -2
  96. package/dist/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
  97. package/dist/src/embed/hostEventClient/utils.d.ts +9 -0
  98. package/dist/src/embed/hostEventClient/utils.d.ts.map +1 -1
  99. package/dist/src/embed/liveboard.d.ts +4 -3
  100. package/dist/src/embed/liveboard.d.ts.map +1 -1
  101. package/dist/src/embed/spotter-utils.d.ts +8 -1
  102. package/dist/src/embed/spotter-utils.d.ts.map +1 -1
  103. package/dist/src/embed/ts-embed.d.ts +3 -0
  104. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  105. package/dist/src/index.d.ts +2 -1
  106. package/dist/src/index.d.ts.map +1 -1
  107. package/dist/src/react/all-types-export.d.ts +1 -1
  108. package/dist/src/react/all-types-export.d.ts.map +1 -1
  109. package/dist/src/types.d.ts +45 -22
  110. package/dist/src/types.d.ts.map +1 -1
  111. package/dist/src/utils/filterConverter.d.ts +106 -0
  112. package/dist/src/utils/filterConverter.d.ts.map +1 -0
  113. package/dist/src/utils/filterConverter.spec.d.ts +2 -0
  114. package/dist/src/utils/filterConverter.spec.d.ts.map +1 -0
  115. package/dist/tsembed-react.es.js +257 -87
  116. package/dist/tsembed-react.js +256 -86
  117. package/dist/tsembed.es.js +466 -89
  118. package/dist/tsembed.js +465 -87
  119. package/dist/visual-embed-sdk-react-full.d.ts +202 -40
  120. package/dist/visual-embed-sdk-react.d.ts +108 -40
  121. package/dist/visual-embed-sdk.d.ts +202 -40
  122. package/lib/package.json +11 -4
  123. package/lib/src/contracts/host-event-contracts.d.ts +49 -11
  124. package/lib/src/contracts/host-event-contracts.d.ts.map +1 -1
  125. package/lib/src/embed/app.d.ts +4 -3
  126. package/lib/src/embed/app.d.ts.map +1 -1
  127. package/lib/src/embed/app.js +1 -1
  128. package/lib/src/embed/app.js.map +1 -1
  129. package/lib/src/embed/app.spec.js +10 -0
  130. package/lib/src/embed/app.spec.js.map +1 -1
  131. package/lib/src/embed/auto-frame-renderer.js +1 -1
  132. package/lib/src/embed/auto-frame-renderer.js.map +1 -1
  133. package/lib/src/embed/auto-frame-renderer.spec.js +24 -13
  134. package/lib/src/embed/auto-frame-renderer.spec.js.map +1 -1
  135. package/lib/src/embed/bodyless-conversation.js +1 -1
  136. package/lib/src/embed/bodyless-conversation.js.map +1 -1
  137. package/lib/src/embed/conversation.d.ts +1 -0
  138. package/lib/src/embed/conversation.d.ts.map +1 -1
  139. package/lib/src/embed/conversation.js +5 -5
  140. package/lib/src/embed/conversation.js.map +1 -1
  141. package/lib/src/embed/conversation.spec.js +35 -24
  142. package/lib/src/embed/conversation.spec.js.map +1 -1
  143. package/lib/src/embed/embedConfig.spec.js +2 -1
  144. package/lib/src/embed/embedConfig.spec.js.map +1 -1
  145. package/lib/src/embed/hostEventClient/host-event-client.d.ts +2 -2
  146. package/lib/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
  147. package/lib/src/embed/hostEventClient/host-event-client.js +17 -11
  148. package/lib/src/embed/hostEventClient/host-event-client.js.map +1 -1
  149. package/lib/src/embed/hostEventClient/host-event-client.spec.js +14 -8
  150. package/lib/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
  151. package/lib/src/embed/hostEventClient/utils.d.ts +9 -0
  152. package/lib/src/embed/hostEventClient/utils.d.ts.map +1 -1
  153. package/lib/src/embed/hostEventClient/utils.js +47 -2
  154. package/lib/src/embed/hostEventClient/utils.js.map +1 -1
  155. package/lib/src/embed/hostEventClient/utils.spec.js +152 -1
  156. package/lib/src/embed/hostEventClient/utils.spec.js.map +1 -1
  157. package/lib/src/embed/liveboard.d.ts +4 -3
  158. package/lib/src/embed/liveboard.d.ts.map +1 -1
  159. package/lib/src/embed/liveboard.js +18 -13
  160. package/lib/src/embed/liveboard.js.map +1 -1
  161. package/lib/src/embed/liveboard.spec.js +2 -1
  162. package/lib/src/embed/liveboard.spec.js.map +1 -1
  163. package/lib/src/embed/search-bar.js +1 -1
  164. package/lib/src/embed/search-bar.js.map +1 -1
  165. package/lib/src/embed/search.js +1 -1
  166. package/lib/src/embed/search.js.map +1 -1
  167. package/lib/src/embed/search.spec.js +20 -0
  168. package/lib/src/embed/search.spec.js.map +1 -1
  169. package/lib/src/embed/spotter-utils.d.ts +8 -1
  170. package/lib/src/embed/spotter-utils.d.ts.map +1 -1
  171. package/lib/src/embed/spotter-utils.js +12 -0
  172. package/lib/src/embed/spotter-utils.js.map +1 -1
  173. package/lib/src/embed/spotter-utils.spec.js +27 -1
  174. package/lib/src/embed/spotter-utils.spec.js.map +1 -1
  175. package/lib/src/embed/ts-embed.d.ts +3 -0
  176. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  177. package/lib/src/embed/ts-embed.js +108 -29
  178. package/lib/src/embed/ts-embed.js.map +1 -1
  179. package/lib/src/embed/ts-embed.spec.js +164 -24
  180. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  181. package/lib/src/errors.js +1 -1
  182. package/lib/src/errors.js.map +1 -1
  183. package/lib/src/index.d.ts +2 -1
  184. package/lib/src/index.d.ts.map +1 -1
  185. package/lib/src/index.js +2 -1
  186. package/lib/src/index.js.map +1 -1
  187. package/lib/src/react/all-types-export.d.ts +1 -1
  188. package/lib/src/react/all-types-export.d.ts.map +1 -1
  189. package/lib/src/react/all-types-export.js +1 -1
  190. package/lib/src/react/all-types-export.js.map +1 -1
  191. package/lib/src/types.d.ts +45 -22
  192. package/lib/src/types.d.ts.map +1 -1
  193. package/lib/src/types.js +44 -21
  194. package/lib/src/types.js.map +1 -1
  195. package/lib/src/utils/authService/tokenizedAuthService.spec.js +2 -1
  196. package/lib/src/utils/authService/tokenizedAuthService.spec.js.map +1 -1
  197. package/lib/src/utils/custom-actions.spec.js +4 -2
  198. package/lib/src/utils/custom-actions.spec.js.map +1 -1
  199. package/lib/src/utils/filterConverter.d.ts +106 -0
  200. package/lib/src/utils/filterConverter.d.ts.map +1 -0
  201. package/lib/src/utils/filterConverter.js +210 -0
  202. package/lib/src/utils/filterConverter.js.map +1 -0
  203. package/lib/src/utils/filterConverter.spec.d.ts +2 -0
  204. package/lib/src/utils/filterConverter.spec.d.ts.map +1 -0
  205. package/lib/src/utils/filterConverter.spec.js +707 -0
  206. package/lib/src/utils/filterConverter.spec.js.map +1 -0
  207. package/lib/src/utils/processData.spec.js +2 -1
  208. package/lib/src/utils/processData.spec.js.map +1 -1
  209. package/lib/src/visual-embed-sdk.d.ts +202 -40
  210. package/package.json +11 -4
  211. package/src/contracts/host-event-contracts.ts +55 -11
  212. package/src/embed/app.spec.ts +15 -0
  213. package/src/embed/app.ts +5 -4
  214. package/src/embed/auto-frame-renderer.spec.ts +24 -13
  215. package/src/embed/auto-frame-renderer.ts +1 -1
  216. package/src/embed/bodyless-conversation.ts +1 -1
  217. package/src/embed/conversation.spec.ts +38 -27
  218. package/src/embed/conversation.ts +5 -5
  219. package/src/embed/embedConfig.spec.ts +2 -1
  220. package/src/embed/hostEventClient/host-event-client.spec.ts +14 -8
  221. package/src/embed/hostEventClient/host-event-client.ts +18 -10
  222. package/src/embed/hostEventClient/utils.spec.ts +176 -1
  223. package/src/embed/hostEventClient/utils.ts +51 -2
  224. package/src/embed/liveboard.spec.ts +4 -3
  225. package/src/embed/liveboard.ts +22 -16
  226. package/src/embed/search-bar.tsx +1 -1
  227. package/src/embed/search.spec.ts +23 -0
  228. package/src/embed/search.ts +1 -1
  229. package/src/embed/spotter-utils.spec.ts +29 -0
  230. package/src/embed/spotter-utils.ts +16 -0
  231. package/src/embed/ts-embed.spec.ts +204 -23
  232. package/src/embed/ts-embed.ts +114 -28
  233. package/src/errors.ts +1 -1
  234. package/src/index.ts +10 -0
  235. package/src/react/all-types-export.ts +4 -0
  236. package/src/types.ts +44 -21
  237. package/src/utils/authService/tokenizedAuthService.spec.ts +2 -1
  238. package/src/utils/custom-actions.spec.ts +4 -2
  239. package/src/utils/filterConverter.spec.ts +801 -0
  240. package/src/utils/filterConverter.ts +304 -0
  241. package/src/utils/processData.spec.ts +2 -1
@@ -1,4 +1,4 @@
1
- /* @thoughtspot/visual-embed-sdk version 1.52.1 */
1
+ /* @thoughtspot/visual-embed-sdk version 1.52.2-beta */
2
2
  'use client';
3
3
  import * as React from 'react';
4
4
  import React__default, { useRef, useCallback } from 'react';
@@ -3951,6 +3951,12 @@ var HostEvent;
3951
3951
  * ```js
3952
3952
  * const data = await liveboardEmbed.trigger(HostEvent.GetFilters);
3953
3953
  * console.log('data', data);
3954
+ * // {
3955
+ * // liveboardFilters: [ ... ],
3956
+ * // runtimeFilters: [
3957
+ * // { columnName: "Region", operator: "IN", values: ["West"] }
3958
+ * // ]
3959
+ * // }
3954
3960
  * ```
3955
3961
  * @example
3956
3962
  * ```js
@@ -3975,9 +3981,9 @@ var HostEvent;
3975
3981
  *
3976
3982
  * Each filter object must include the following attributes:
3977
3983
  *
3978
- * `column` - Name of the column to filter on.
3984
+ * `columnName` - Name of the column to filter on.
3979
3985
  *
3980
- * `oper` - Filter operator, for example, EQ, IN, CONTAINS.
3986
+ * `operator` - Filter operator, for example, EQ, IN, CONTAINS.
3981
3987
  * For information about the supported filter operators,
3982
3988
  * see link:https://developers.thoughtspot.com/docs/runtime-filters#rtOperator[Developer Documentation].
3983
3989
  *
@@ -4004,8 +4010,8 @@ var HostEvent;
4004
4010
  *
4005
4011
  * liveboardEmbed.trigger(HostEvent.UpdateFilters, {
4006
4012
  * filter: {
4007
- * column: "item type",
4008
- * oper: "IN",
4013
+ * columnName: "item type",
4014
+ * operator: "IN",
4009
4015
  * values: ["bags","shirts"]
4010
4016
  * }
4011
4017
  * });
@@ -4015,8 +4021,8 @@ var HostEvent;
4015
4021
  *
4016
4022
  * liveboardEmbed.trigger(HostEvent.UpdateFilters, {
4017
4023
  * filter: {
4018
- * column: "date",
4019
- * oper: "EQ",
4024
+ * columnName: "date",
4025
+ * operator: "EQ",
4020
4026
  * values: ["JULY","2023"],
4021
4027
  * type: "MONTH_YEAR"
4022
4028
  * }
@@ -4027,18 +4033,18 @@ var HostEvent;
4027
4033
  * ```js
4028
4034
  * liveboardEmbed.trigger(HostEvent.UpdateFilters, {
4029
4035
  * filters: [{
4030
- * column: "Item Type",
4031
- * oper: 'IN',
4036
+ * columnName: "Item Type",
4037
+ * operator: 'IN',
4032
4038
  * values: ["bags","shirts"]
4033
4039
  * },
4034
4040
  * {
4035
- * column: "Region",
4036
- * oper: 'IN',
4041
+ * columnName: "Region",
4042
+ * operator: 'IN',
4037
4043
  * values: ["West","Midwest"]
4038
4044
  * },
4039
4045
  * {
4040
- * column: "Date",
4041
- * oper: 'EQ',
4046
+ * columnName: "Date",
4047
+ * operator: 'EQ',
4042
4048
  * values: ["2023-07-31"],
4043
4049
  * type: "EXACT_DATE"
4044
4050
  * }]
@@ -4052,13 +4058,13 @@ var HostEvent;
4052
4058
  * ```js
4053
4059
  * liveboardEmbed.trigger(HostEvent.UpdateFilters, {
4054
4060
  * filters: [{
4055
- * column: "(Sample) Retail - Apparel::city",
4056
- * oper: 'IN',
4061
+ * columnName: "(Sample) Retail - Apparel::city",
4062
+ * operator: 'IN',
4057
4063
  * values: ["atlanta"]
4058
4064
  * },
4059
4065
  * {
4060
- * column: "(Sample) Retail - Apparel::Region",
4061
- * oper: 'IN',
4066
+ * columnName: "(Sample) Retail - Apparel::Region",
4067
+ * operator: 'IN',
4062
4068
  * values: ["West","Midwest"]
4063
4069
  * }]
4064
4070
  * });
@@ -4069,8 +4075,8 @@ var HostEvent;
4069
4075
  * import { ContextType } from '@thoughtspot/visual-embed-sdk';
4070
4076
  * liveboardEmbed.trigger(HostEvent.UpdateFilters, {
4071
4077
  * filter: {
4072
- * column: "item type",
4073
- * oper: "IN",
4078
+ * columnName: "item type",
4079
+ * operator: "IN",
4074
4080
  * values: ["shoes", "boots"]
4075
4081
  * }
4076
4082
  * }, ContextType.Liveboard);
@@ -4080,8 +4086,8 @@ var HostEvent;
4080
4086
  * // Scope the filter to a specific Liveboard tab
4081
4087
  * liveboardEmbed.trigger(HostEvent.UpdateFilters, {
4082
4088
  * filter: {
4083
- * column: "item type",
4084
- * oper: "IN",
4089
+ * columnName: "item type",
4090
+ * operator: "IN",
4085
4091
  * values: ["bags", "shirts"],
4086
4092
  * applicability: {
4087
4093
  * level: "TAB",
@@ -4090,6 +4096,12 @@ var HostEvent;
4090
4096
  * }
4091
4097
  * });
4092
4098
  * ```
4099
+ * Use `columnName` and `operator` - the same spelling as
4100
+ * {@link RuntimeFilter}. The older `column` and `oper` spellings are
4101
+ * deprecated; they are still accepted, but pass only one spelling of each
4102
+ * field, never both. To reapply the filter state captured from
4103
+ * {@link EmbedEvent.FilterChanged}, use `convertFilterChangedToUpdateFiltersPayload`
4104
+ * to convert its payload into the shape expected here.
4093
4105
  * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
4094
4106
  */
4095
4107
  HostEvent["UpdateFilters"] = "updateFilters";
@@ -5075,7 +5087,6 @@ var Param;
5075
5087
  Param["IsStarterPromptsEnabled"] = "enableStarterPrompts";
5076
5088
  Param["UpdatedSpotterExperience"] = "updatedSpotterExperience";
5077
5089
  Param["SpotterDataSources"] = "spotterDataSources";
5078
- Param["AnalystId"] = "analystId";
5079
5090
  Param["OpenSpotterOnLiveboardByDefault"] = "openSpotterOnLiveboardByDefault";
5080
5091
  Param["ShowAnswerEditPanel"] = "showAnswerEditPanel";
5081
5092
  })(Param || (Param = {}));
@@ -7301,6 +7312,18 @@ var Action;
7301
7312
  * ```
7302
7313
  */
7303
7314
  Action["DeleteCollection"] = "deleteCollection";
7315
+ /**
7316
+ * Controls the visibility of the "Customize homepage" button on the
7317
+ * embedded home page.
7318
+ * @version SDK: 1.55.0 | ThoughtSpot Cloud: 26.12.0.cl
7319
+ * @example
7320
+ * ```js
7321
+ * {
7322
+ * hiddenActions: [Action.CustomizeHomepage],
7323
+ * }
7324
+ * ```
7325
+ */
7326
+ Action["CustomizeHomepage"] = "customizeHomepage";
7304
7327
  })(Action || (Action = {}));
7305
7328
  var PrefetchFeatures;
7306
7329
  (function (PrefetchFeatures) {
@@ -7805,7 +7828,7 @@ var TableContentDensity;
7805
7828
  TableContentDensity["Compact"] = "COMPACT";
7806
7829
  })(TableContentDensity || (TableContentDensity = {}));
7807
7830
 
7808
- var version$1="1.52.1";var pkg = {version:version$1};
7831
+ var version$1="1.52.2-beta";var pkg = {version:version$1};
7809
7832
 
7810
7833
  const { version } = pkg;
7811
7834
 
@@ -7909,7 +7932,7 @@ const ERROR_MESSAGE = {
7909
7932
  SSR_ENVIRONMENT_ERROR: 'SSR environment detected. This function cannot be called in SSR environment.',
7910
7933
  UPDATE_PARAMS_FAILED: 'Failed to update embed parameters',
7911
7934
  INVALID_SPOTTER_DOCUMENTATION_URL: 'Invalid spotterDocumentationUrl. Please provide a valid http or https URL.',
7912
- UPDATEFILTERS_INVALID_PAYLOAD: 'UpdateFilters requires a valid filter or filters array. Expected: { filter: { column, oper, values } } or { filters: [{ column, oper, values }, ...] }',
7935
+ UPDATEFILTERS_INVALID_PAYLOAD: 'UpdateFilters requires a valid filter or filters array. Expected: { filter: { columnName, operator, values } } or { filters: [{ columnName, operator, values }, ...] }',
7913
7936
  DRILLDOWN_INVALID_PAYLOAD: 'DrillDown requires a valid points object. Expected: { points: { clickedPoint?, selectedPoints? }, autoDrillDown?, vizId? }',
7914
7937
  UPDATEPARAMETERS_INVALID_PAYLOAD: 'UpdateParameters received an invalid applicability. Expected: { level: LIVEBOARD | TAB | GROUP, targetId } where targetId is required for TAB and GROUP levels',
7915
7938
  };
@@ -10542,7 +10565,7 @@ class AnswerService {
10542
10565
  async getTML() {
10543
10566
  const { object } = await this.executeQuery(getAnswerTML, {});
10544
10567
  const edoc = object[0].edoc;
10545
- const YAML = await import('./index-C1pmYb5H.js');
10568
+ const YAML = await import('./index-CcBYlGo9.js');
10546
10569
  const parsedDoc = YAML.parse(edoc);
10547
10570
  return {
10548
10571
  answer: {
@@ -21336,7 +21359,8 @@ var isUndefined_1 = isUndefined;
21336
21359
  const isValidApplicability = (a) => {
21337
21360
  if (isUndefined_1(a))
21338
21361
  return true;
21339
- // targetId is not required at LIVEBOARD level, since the filter applies to the whole Liveboard
21362
+ // targetId is not required at LIVEBOARD level, since the filter applies to
21363
+ // the whole Liveboard
21340
21364
  return isPlainObject_1(a)
21341
21365
  && Object.values(ApplicabilityLevel).includes(a.level)
21342
21366
  && (a.level === ApplicabilityLevel.Liveboard || (isString_1(a.targetId) && a.targetId.trim().length > 0));
@@ -21355,8 +21379,52 @@ function isValidUpdateFiltersPayload(payload) {
21355
21379
  const hasValidFilters = Array.isArray(payload.filters) && payload.filters.length > 0 && payload.filters.every(isValidFilter);
21356
21380
  return !!(hasValidFilter || hasValidFilters);
21357
21381
  }
21382
+ /**
21383
+ * Rewrites one filter's `columnName`/`operator` to `column`/`oper`.
21384
+ *
21385
+ * Callers may use either spelling: `columnName`/`operator` match
21386
+ * {@link RuntimeFilter} and the `EmbedEvent.FilterChanged` payload, so a
21387
+ * converted payload can be replayed as-is. But the payload is forwarded to the
21388
+ * embedded app unchanged, and only `column`/`oper` are known to be understood
21389
+ * there - so the alias must be swapped here, or it would pass validation and
21390
+ * then be silently ignored.
21391
+ *
21392
+ * If a caller supplies both spellings of a field - which TypeScript rejects,
21393
+ * but JavaScript callers can still do - the documented `columnName`/`operator`
21394
+ * wins. Deferring to the deprecated spelling would quietly discard the value
21395
+ * the rest of the SDK tells people to use.
21396
+ * @param filter One entry from the UpdateFilters payload.
21397
+ */
21398
+ function resolveFilterAliases(filter) {
21399
+ var _a, _b;
21400
+ if (!isPlainObject_1(filter))
21401
+ return filter;
21402
+ const column = (_a = filter.columnName) !== null && _a !== void 0 ? _a : filter.column;
21403
+ const oper = (_b = filter.operator) !== null && _b !== void 0 ? _b : filter.oper;
21404
+ const { columnName, operator, ...rest } = filter;
21405
+ return {
21406
+ ...rest,
21407
+ ...(isUndefined_1(column) ? {} : { column }),
21408
+ ...(isUndefined_1(oper) ? {} : { oper }),
21409
+ };
21410
+ }
21411
+ /**
21412
+ * Rewrites every filter in an UpdateFilters payload to use `column`/`oper`,
21413
+ * whichever spelling the caller supplied. Call after validation.
21414
+ * @param payload The UpdateFilters host event payload.
21415
+ */
21416
+ function resolveUpdateFiltersAliases(payload) {
21417
+ if (!isPlainObject_1(payload))
21418
+ return payload;
21419
+ return {
21420
+ ...payload,
21421
+ ...(payload.filter ? { filter: resolveFilterAliases(payload.filter) } : {}),
21422
+ ...(Array.isArray(payload.filters) ? { filters: payload.filters.map(resolveFilterAliases) } : {}),
21423
+ };
21424
+ }
21358
21425
  function isValidUpdateParametersPayload(payload) {
21359
- // Only validates the applicability of each parameter (null treated as absent); the rest is forwarded as-is for backward compatibility.
21426
+ // Only validates the applicability of each parameter (null treated as
21427
+ // absent); the rest is forwarded as-is for backward compatibility.
21360
21428
  if (!Array.isArray(payload))
21361
21429
  return true;
21362
21430
  return payload.every((p) => {
@@ -21404,7 +21472,8 @@ function throwUpdateParametersValidationError() {
21404
21472
  /**
21405
21473
  * Maps HostEvent to its corresponding UIPassthroughEvent.
21406
21474
  * Includes both custom-handler events (Pin, SaveAnswer, UpdateFilters, DrillDown)
21407
- * and getter events (GetAnswerSession, GetFilters, etc.) that use getDataWithPassthroughFallback.
21475
+ * and getter events (GetAnswerSession, GetFilters, etc.) that use
21476
+ * getDataWithPassthroughFallback.
21408
21477
  */
21409
21478
  const PASSTHROUGH_MAP = {
21410
21479
  // Custom handlers (setters with special logic)
@@ -21555,17 +21624,21 @@ class HostEventClient {
21555
21624
  throwUpdateFiltersValidationError();
21556
21625
  }
21557
21626
  // The shared contract accepts both current (columnName/operator) and
21558
- // legacy (column/oper) filter field names — as does the validation
21559
- // above and the app at runtime. The UIPassthrough FilterUpdate type
21560
- // still requires the legacy names; bridge until that contract is
21561
- // audited.
21562
- return this.handleHostEventWithParam(UIPassthroughEvent.UpdateFilters, payload, context);
21627
+ // legacy (column/oper) filter field names, but only the legacy pair is
21628
+ // understood downstream, so the payload is rewritten before it is
21629
+ // forwarded — otherwise a columnName/operator filter passes validation
21630
+ // here and is then silently ignored by the app. The cast bridges the
21631
+ // UIPassthrough FilterUpdate type, which still declares only the legacy
21632
+ // names.
21633
+ const resolvedPayload = resolveUpdateFiltersAliases(payload);
21634
+ return this.handleHostEventWithParam(UIPassthroughEvent.UpdateFilters, resolvedPayload, context);
21563
21635
  }
21564
21636
  handleUpdateParametersEvent(payload, context) {
21565
21637
  if (!isValidUpdateParametersPayload(payload)) {
21566
21638
  throwUpdateParametersValidationError();
21567
21639
  }
21568
- // UpdateParameters has no UI passthrough contract; dispatch over the legacy channel
21640
+ // UpdateParameters has no UI passthrough contract; dispatch over the
21641
+ // legacy channel
21569
21642
  return this.hostEventFallback(HostEvent.UpdateParameters, payload, context);
21570
21643
  }
21571
21644
  handleDrillDownEvent(payload, context) {
@@ -21576,8 +21649,8 @@ class HostEventClient {
21576
21649
  }
21577
21650
  /**
21578
21651
  * Dispatches a host event using the appropriate channel:
21579
- * 1. If the embedded app supports UI passthrough for this event, use it (custom handler or getter).
21580
- * 2. Otherwise fall back to the legacy host event channel.
21652
+ * 1. If the embedded app supports UI passthrough for this event, use it (custom
21653
+ * handler or getter). 2. Otherwise fall back to the legacy host event channel.
21581
21654
  *
21582
21655
  * @param hostEvent - The host event to trigger
21583
21656
  * @param payload - Optional payload for the event
@@ -21586,7 +21659,8 @@ class HostEventClient {
21586
21659
  async triggerHostEvent(hostEvent, payload, context) {
21587
21660
  const customHandler = this.customHandlers[hostEvent];
21588
21661
  const passthroughEvent = PASSTHROUGH_MAP[hostEvent];
21589
- // If embedded app supports passthrough but not this event, use legacy channel
21662
+ // If embedded app supports passthrough but not this event, use legacy
21663
+ // channel
21590
21664
  const keys = passthroughEvent ? await this.getAvailableUIPassthroughKeys(context) : [];
21591
21665
  if (passthroughEvent && keys.length > 0 && !keys.includes(passthroughEvent)) {
21592
21666
  return this.hostEventFallback(hostEvent, payload, context);
@@ -21796,9 +21870,60 @@ const PRERENDER_WRAPPER_ID_PREFIX = 'tsEmbed-pre-render-wrapper-';
21796
21870
  // The container applies UpdateEmbedParams through React state, so a delivered
21797
21871
  // post is not the same as the params being in effect.
21798
21872
  const UPDATE_EMBED_PARAMS_SETTLE_MS = 200;
21799
- // The container ignores runtimeFilterParams/runtimeParameterParams unless truthy, so
21800
- // null or '' leaves the previous embed's values in place. '&' is truthy and parses to {}.
21873
+ // The container ignores runtimeFilterParams/runtimeParameterParams unless
21874
+ // truthy, so null or '' leaves the previous embed's values in place. '&' is
21875
+ // truthy and parses to {}.
21801
21876
  const NO_RUNTIME_PARAMS = '&';
21877
+ /**
21878
+ * Query parameters that stay on the iframe `src` while config is excluded from
21879
+ * the URL, which is the default unless the embed sets the
21880
+ * `excludeConfigFromURL` additional flag to `false`. These are the parameters the
21881
+ * application shell needs before it can receive a postMessage at all: the
21882
+ * embed marker, the host application URL used to validate the message origin,
21883
+ * the SDK version, the flags that pick the authentication flow, and the
21884
+ * boot-time settings that would otherwise be applied a frame late (viewport,
21885
+ * log level, locale, formatting and org). Everything else is delivered over
21886
+ * `HostEvent.UpdateEmbedParams`.
21887
+ * @internal
21888
+ */
21889
+ const BOOTSTRAP_URL_PARAMS = new Set([
21890
+ Param.EmbedApp,
21891
+ Param.HostAppUrl,
21892
+ Param.Version,
21893
+ Param.AuthType,
21894
+ Param.AutoLogin,
21895
+ Param.DisableLoginRedirect,
21896
+ Param.ForceSAMLAutoRedirect,
21897
+ Param.cookieless,
21898
+ Param.preAuthCache,
21899
+ Param.blockNonEmbedFullAppAccess,
21900
+ Param.OverrideOrgId,
21901
+ Param.ViewPortHeight,
21902
+ Param.ViewPortWidth,
21903
+ Param.ClientLogLevel,
21904
+ Param.OverrideNativeConsole,
21905
+ Param.PendoTrackingKey,
21906
+ Param.NumberFormatLocale,
21907
+ Param.DateFormatLocale,
21908
+ Param.CurrencyFormat,
21909
+ Param.Locale,
21910
+ Param.searchEmbed,
21911
+ Param.livedBoardEmbed,
21912
+ Param.isSpotterAgentEmbed,
21913
+ Param.SpotterEnabled,
21914
+ Param.IsFullAppEmbed,
21915
+ Param.IsOnBeforeGetVizDataInterceptEnabled,
21916
+ Param.LinkOverride,
21917
+ Param.EnableLinkOverridesV2,
21918
+ Param.DisableRedirectionLinksInNewTab,
21919
+ Param.OverrideHistoryState,
21920
+ Param.ForceTable,
21921
+ Param.StringIDsUrl,
21922
+ Param.DataSources,
21923
+ Param.ExposeTranslationIDs,
21924
+ Param.IconSpriteUrl,
21925
+ Param.Tag,
21926
+ ]);
21802
21927
  /**
21803
21928
  * The event id map from v2 event names to v1 event id
21804
21929
  * v1 events are the classic embed events implemented in Blink v1
@@ -21995,15 +22120,20 @@ class TsEmbed {
21995
22120
  const AUTH_INIT_FALLBACK_DELAY = 1000;
21996
22121
  // Wait for 1 second to ensure the embed container is loaded
21997
22122
  // This is a workaround to ensure the embed container is loaded
21998
- // this is needed until all clusters have EmbedListenerReady event
22123
+ // this is needed until all clusters have EmbedListenerReady
22124
+ // event
21999
22125
  setTimeout(processEmbedContainerReady, AUTH_INIT_FALLBACK_DELAY);
22000
22126
  }
22001
22127
  else if (source === EmbedEvent.EmbedListenerReady) {
22002
22128
  processEmbedContainerReady();
22129
+ if (this.isConfigExcludedFromUrl()) {
22130
+ this.triggerUpdateEmbedParams();
22131
+ }
22003
22132
  }
22004
22133
  };
22005
22134
  // Subclasses that navigate the pre-render on show must await this before
22006
- // triggering Navigate. Resolves even on failure, so navigation is never blocked.
22135
+ // triggering Navigate. Resolves even on failure, so navigation is never
22136
+ // blocked.
22007
22137
  this.preRenderParamsApplied = Promise.resolve();
22008
22138
  this.hostElement = getDOMNode(domSelector);
22009
22139
  this.eventHandlerMap = new Map();
@@ -22333,8 +22463,9 @@ class TsEmbed {
22333
22463
  ...this.viewConfig,
22334
22464
  ...queryParams,
22335
22465
  ...appInitData,
22336
- // A show cycle has no URL to carry these, so the payload always states them
22337
- // — including "none", which is the case that leaks the previous filters.
22466
+ // A show cycle has no URL to carry these, so the payload always
22467
+ // states them — including "none", which is the case that leaks the
22468
+ // previous filters.
22338
22469
  runtimeFilterParams: getFilterQuery((_a = this.viewConfig.runtimeFilters) !== null && _a !== void 0 ? _a : []) || NO_RUNTIME_PARAMS,
22339
22470
  runtimeParameterParams: getRuntimeParameters((_b = this.viewConfig.runtimeParameters) !== null && _b !== void 0 ? _b : [])
22340
22471
  || NO_RUNTIME_PARAMS,
@@ -22502,13 +22633,20 @@ class TsEmbed {
22502
22633
  return path;
22503
22634
  }
22504
22635
  getEmbedParams() {
22505
- const queryParams = this.getEmbedParamsObject();
22636
+ const queryParams = this.getUrlQueryParamsObject();
22506
22637
  return getQueryParamString(queryParams);
22507
22638
  }
22508
22639
  getEmbedParamsObject() {
22509
22640
  const params = this.getBaseQueryParams();
22510
22641
  return params;
22511
22642
  }
22643
+ getUrlQueryParamsObject() {
22644
+ const queryParams = this.getEmbedParamsObject();
22645
+ if (!this.isConfigExcludedFromUrl()) {
22646
+ return queryParams;
22647
+ }
22648
+ return Object.fromEntries(Object.entries(queryParams).filter(([key]) => BOOTSTRAP_URL_PARAMS.has(key)));
22649
+ }
22512
22650
  getRootIframeSrc() {
22513
22651
  const query = this.getEmbedParams();
22514
22652
  return this.getEmbedBasePath(query);
@@ -23061,8 +23199,9 @@ class TsEmbed {
23061
23199
  return;
23062
23200
  this.preRenderWrapper[this.embedNodeKey] = this;
23063
23201
  }
23064
- // The flag lives on the wrapper because it describes the iframe: an instance
23065
- // hidden when the container announced itself would otherwise report false forever.
23202
+ // The flag lives on the wrapper because it describes the iframe: an
23203
+ // instance hidden when the container announced itself would otherwise
23204
+ // report false forever.
23066
23205
  markEmbedContainerLoaded() {
23067
23206
  this.isEmbedContainerLoaded = true;
23068
23207
  if (this.preRenderWrapper) {
@@ -23415,6 +23554,27 @@ class TsEmbed {
23415
23554
  this.isRendered = true;
23416
23555
  return this.renderIFrame(prerenderFrameSrc);
23417
23556
  }
23557
+ isConfigExcludedFromUrl() {
23558
+ var _a, _b, _c;
23559
+ const flag = (_b = (_a = this.viewConfig.additionalFlags) === null || _a === void 0 ? void 0 : _a.excludeConfigFromURL) !== null && _b !== void 0 ? _b : (_c = this.embedConfig.additionalFlags) === null || _c === void 0 ? void 0 : _c.excludeConfigFromURL;
23560
+ // Enabled by default; only an explicit false opts out.
23561
+ return flag !== false && flag !== 'false';
23562
+ }
23563
+ async triggerUpdateEmbedParams() {
23564
+ try {
23565
+ const params = await this.getUpdateEmbedParamsObject();
23566
+ this.trigger(HostEvent.UpdateEmbedParams, params);
23567
+ }
23568
+ catch (error) {
23569
+ logger$3.error(ERROR_MESSAGE.UPDATE_PARAMS_FAILED, error);
23570
+ this.handleError({
23571
+ errorType: ErrorDetailsTypes.API,
23572
+ message: (error === null || error === void 0 ? void 0 : error.message) || ERROR_MESSAGE.UPDATE_PARAMS_FAILED,
23573
+ code: EmbedErrorCodes.UPDATE_PARAMS_FAILED,
23574
+ error: (error === null || error === void 0 ? void 0 : error.message) || error,
23575
+ });
23576
+ }
23577
+ }
23418
23578
  beforePrerenderVisible() {
23419
23579
  // We can ignore this as its a bit expensive and the newer customers
23420
23580
  // have moved on to UpdateEmbedParams supported clusters
@@ -23425,17 +23585,7 @@ class TsEmbed {
23425
23585
  this.preRenderParamsApplied = new Promise((resolve) => {
23426
23586
  this.executeAfterEmbedContainerLoaded(async () => {
23427
23587
  try {
23428
- const params = await this.getUpdateEmbedParamsObject();
23429
- this.trigger(HostEvent.UpdateEmbedParams, params);
23430
- }
23431
- catch (error) {
23432
- logger$3.error(ERROR_MESSAGE.UPDATE_PARAMS_FAILED, error);
23433
- this.handleError({
23434
- errorType: ErrorDetailsTypes.API,
23435
- message: (error === null || error === void 0 ? void 0 : error.message) || ERROR_MESSAGE.UPDATE_PARAMS_FAILED,
23436
- code: EmbedErrorCodes.UPDATE_PARAMS_FAILED,
23437
- error: (error === null || error === void 0 ? void 0 : error.message) || error,
23438
- });
23588
+ await this.triggerUpdateEmbedParams();
23439
23589
  }
23440
23590
  finally {
23441
23591
  setTimeout(resolve, UPDATE_EMBED_PARAMS_SETTLE_MS);
@@ -23470,8 +23620,9 @@ class TsEmbed {
23470
23620
  if (this.hostElement) {
23471
23621
  this.insertedDomEl = this.createPreRenderPlaceholder();
23472
23622
  if (this.viewConfig.fullHeight) {
23473
- // If fullHeight has already sized the wrapper, seed the placeholder
23474
- // with the same height so syncPreRenderStyle gets an accurate rect.
23623
+ // If fullHeight has already sized the wrapper, seed the
23624
+ // placeholder with the same height so syncPreRenderStyle gets
23625
+ // an accurate rect.
23475
23626
  const existingHeight = this.preRenderWrapper.style.height;
23476
23627
  if (existingHeight) {
23477
23628
  this.insertedDomEl.style.height = existingHeight;
@@ -23479,12 +23630,13 @@ class TsEmbed {
23479
23630
  }
23480
23631
  const placeHolderId = this.getPreRenderIds().placeHolder;
23481
23632
  // Remove any stale placeholder from a previous cycle. It is located
23482
- // via a subtree-wide querySelector, so it may be nested deeper than a
23483
- // direct child (E.g.: with fullHeight the host app can wrap it). Use
23484
- // Element.remove() — which detaches from whatever the real parent is —
23485
- // rather than hostElement.removeChild(), which throws NotFoundError
23486
- // when the match is not a direct child. Mirrors the wrapper/child
23487
- // cleanup in createPreRenderWrapper()/createPreRenderChild().
23633
+ // via a subtree-wide querySelector, so it may be nested deeper
23634
+ // than a direct child (E.g.: with fullHeight the host app can wrap
23635
+ // it). Use Element.remove() — which detaches from whatever the real
23636
+ // parent is — rather than hostElement.removeChild(), which throws
23637
+ // NotFoundError when the match is not a direct child. Mirrors the
23638
+ // wrapper/child cleanup in
23639
+ // createPreRenderWrapper()/createPreRenderChild().
23488
23640
  (_a = this.hostElement.querySelector(`#${placeHolderId}`)) === null || _a === void 0 ? void 0 : _a.remove();
23489
23641
  this.hostElement.appendChild(this.insertedDomEl);
23490
23642
  this.syncPreRenderStyle();
@@ -23516,7 +23668,8 @@ class TsEmbed {
23516
23668
  if (this.iFrame) {
23517
23669
  this.setupFullscreenChangeHandler();
23518
23670
  }
23519
- // Last, so everything above still sees the instance being taken over from.
23671
+ // Last, so everything above still sees the instance being taken over
23672
+ // from.
23520
23673
  this.takeOverPreRender();
23521
23674
  return this;
23522
23675
  }
@@ -23771,7 +23924,7 @@ let SearchBarEmbed$1 = class SearchBarEmbed extends TsEmbed {
23771
23924
  * @param dataSources A list of data source GUIDs
23772
23925
  */
23773
23926
  getIFrameSrc() {
23774
- const queryParams = this.getEmbedParamsObject();
23927
+ const queryParams = this.getUrlQueryParamsObject();
23775
23928
  const path = 'search-bar-embed';
23776
23929
  let query = '';
23777
23930
  const queryParamsString = getQueryParamString(queryParams, true);
@@ -23958,7 +24111,7 @@ let SearchEmbed$1 = class SearchEmbed extends TsEmbed {
23958
24111
  }
23959
24112
  getEmbedParams() {
23960
24113
  const { runtimeParameters, runtimeFilters, excludeRuntimeParametersfromURL, excludeRuntimeFiltersfromURL, } = this.viewConfig;
23961
- const queryParams = this.getEmbedParamsObject();
24114
+ const queryParams = this.getUrlQueryParamsObject();
23962
24115
  let query = '';
23963
24116
  const queryParamsString = getQueryParamString(queryParams, true);
23964
24117
  if (queryParamsString) {
@@ -24342,6 +24495,18 @@ function buildStarterPromptsAppInitData(initData, viewConfig) {
24342
24495
  starterPrompts,
24343
24496
  },
24344
24497
  };
24498
+ }
24499
+ function buildSpotterAnalystAppInitData(initData, viewConfig) {
24500
+ const { spotterAnalystConfig } = viewConfig;
24501
+ if (!(spotterAnalystConfig === null || spotterAnalystConfig === void 0 ? void 0 : spotterAnalystConfig.analystId))
24502
+ return initData;
24503
+ return {
24504
+ ...initData,
24505
+ embedParams: {
24506
+ ...(initData.embedParams || {}),
24507
+ spotterAnalystConfig,
24508
+ },
24509
+ };
24345
24510
  }
24346
24511
 
24347
24512
  function buildSpotterVizAppInitData(initData, viewConfig) {
@@ -24539,7 +24704,7 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
24539
24704
  * embedded Liveboard or visualization.
24540
24705
  */
24541
24706
  getEmbedParams() {
24542
- const params = this.getEmbedParamsObject();
24707
+ const params = this.getUrlQueryParamsObject();
24543
24708
  return getQueryParamString(params, true);
24544
24709
  }
24545
24710
  getEmbedParamsObject() {
@@ -24935,8 +25100,9 @@ const addPreviewStylesIfNotPresent = () => {
24935
25100
  * @summary Liveboard & visualization embed
24936
25101
  * @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
24937
25102
  */
24938
- // Home unmounts the liveboard container, which is how its state gets cleared. The
24939
- // settle window gives the container time to do it before we ask for the liveboard back.
25103
+ // Home unmounts the liveboard container, which is how its state gets cleared.
25104
+ // The settle window gives the container time to do it before we ask for the
25105
+ // liveboard back.
24940
25106
  const HOME_ROUTE = 'home';
24941
25107
  const HOME_SETTLE_MS = 200;
24942
25108
  /**
@@ -24996,7 +25162,7 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
24996
25162
  * embedded Liveboard or visualization.
24997
25163
  */
24998
25164
  getEmbedParams() {
24999
- const params = this.getEmbedParamsObject();
25165
+ const params = this.getUrlQueryParamsObject();
25000
25166
  const queryParams = getQueryParamString(params, true);
25001
25167
  return queryParams;
25002
25168
  }
@@ -25234,21 +25400,24 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
25234
25400
  }
25235
25401
  beforePrerenderVisible() {
25236
25402
  super.beforePrerenderVisible();
25237
- // Captured before showPreRender() hands the wrapper over to this instance.
25238
- // Itself means a hide/show, not a hand-over, so there is nothing stale to clear.
25403
+ // Captured before showPreRender() hands the wrapper over to this
25404
+ // instance. Itself means a hide/show, not a hand-over, so there is
25405
+ // nothing stale to clear.
25239
25406
  const previous = this.getPreRenderObj();
25240
25407
  const showing = previous === this ? undefined : previous === null || previous === void 0 ? void 0 : previous.currentLiveboardState;
25241
25408
  this.executeAfterEmbedContainerLoaded(async () => {
25242
- // Without this the params callback suspends on its await and Navigate
25243
- // goes out first, so the container loads with the previous config's filters.
25409
+ // Without this the params callback suspends on its await and
25410
+ // Navigate goes out first, so the container loads with the previous
25411
+ // config's filters.
25244
25412
  await this.preRenderParamsApplied;
25245
25413
  if (this.isShowingLiveboardRoute(showing)) {
25246
- // Navigate to the route we are already on is a no-op, so the liveboard
25247
- // keeps its state. Home unmounts the container, which clears it.
25414
+ // Navigate to the route we are already on is a no-op, so the
25415
+ // liveboard keeps its state. Home unmounts the container, which
25416
+ // clears it.
25248
25417
  this.trigger(HostEvent.Navigate, HOME_ROUTE)
25249
25418
  .catch((error) => logger$3.warn('Could not route via home', error));
25250
- // Not awaited above: the container never acks Navigate, so that promise
25251
- // only settles on the 30s trigger timeout.
25419
+ // Not awaited above: the container never acks Navigate, so
25420
+ // that promise only settles on the 30s trigger timeout.
25252
25421
  await new Promise((resolve) => {
25253
25422
  setTimeout(resolve, HOME_SETTLE_MS);
25254
25423
  });
@@ -25262,8 +25431,9 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
25262
25431
  };
25263
25432
  });
25264
25433
  }
25265
- // The whole route, not just the liveboard id: the path is built from the viz, tab
25266
- // and view too, so a same-liveboard show onto another tab is a real navigation.
25434
+ // The whole route, not just the liveboard id: the path is built from the
25435
+ // viz, tab and view too, so a same-liveboard show onto another tab is a
25436
+ // real navigation.
25267
25437
  isShowingLiveboardRoute(showing) {
25268
25438
  if (!(showing === null || showing === void 0 ? void 0 : showing.liveboardId))
25269
25439
  return false;
@@ -25765,7 +25935,7 @@ let ConversationMessage$1 = class ConversationMessage extends TsEmbed {
25765
25935
  getIframeSrc() {
25766
25936
  const { sessionId, genNo, acSessionId, acGenNo, convId, messageId, } = this.viewConfig;
25767
25937
  const path = 'conv-assist-answer';
25768
- const queryParams = this.getEmbedParamsObject();
25938
+ const queryParams = this.getUrlQueryParamsObject();
25769
25939
  let query = '';
25770
25940
  const queryParamsString = getQueryParamString(queryParams, true);
25771
25941
  if (queryParamsString) {
@@ -25928,10 +26098,11 @@ let SpotterEmbed$1 = class SpotterEmbed extends TsEmbed {
25928
26098
  const defaultAppInitData = await super.getAppInitData();
25929
26099
  const sidebarInitData = buildSpotterSidebarAppInitData(defaultAppInitData, this.viewConfig, this.handleError.bind(this));
25930
26100
  const shareInitData = buildSpotterShareConversationAppInitData(sidebarInitData, this.viewConfig);
25931
- return buildStarterPromptsAppInitData(shareInitData, this.viewConfig);
26101
+ const starterPromptsInitData = buildStarterPromptsAppInitData(shareInitData, this.viewConfig);
26102
+ return buildSpotterAnalystAppInitData(starterPromptsInitData, this.viewConfig);
25932
26103
  }
25933
26104
  getEmbedParamsObject() {
25934
- const { searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, updatedSpotterExperience, showSpotterLimitations, hideSampleQuestions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, updatedSpotterChatPrompt, showSpotterRadiance, defaultQueryMode, enableStopAnswerGenerationEmbed, spotterChatConfig, spotterAnalystConfig, } = this.viewConfig;
26105
+ const { searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, updatedSpotterExperience, showSpotterLimitations, hideSampleQuestions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, updatedSpotterChatPrompt, showSpotterRadiance, defaultQueryMode, enableStopAnswerGenerationEmbed, spotterChatConfig, } = this.viewConfig;
25935
26106
  const queryParams = this.getBaseQueryParams();
25936
26107
  queryParams[Param.SpotterEnabled] = true;
25937
26108
  // Boolean params
@@ -25944,7 +26115,6 @@ let SpotterEmbed$1 = class SpotterEmbed extends TsEmbed {
25944
26115
  setParamIfDefined(queryParams, Param.ShowSpotterRadiance, showSpotterRadiance, true);
25945
26116
  setParamIfDefined(queryParams, Param.DefaultQueryMode, defaultQueryMode);
25946
26117
  setParamIfDefined(queryParams, Param.EnableStopAnswerGenerationEmbed, enableStopAnswerGenerationEmbed, true);
25947
- setParamIfDefined(queryParams, Param.AnalystId, spotterAnalystConfig === null || spotterAnalystConfig === void 0 ? void 0 : spotterAnalystConfig.analystId);
25948
26118
  // Handle spotterChatConfig params
25949
26119
  if (spotterChatConfig) {
25950
26120
  const { hideToolResponseCardBranding, toolResponseCardBrandingLabel, spotterFileUploadEnabled, spotterFileUploadFileTypes, enableStarterPrompts, } = spotterChatConfig;
@@ -25968,7 +26138,7 @@ let SpotterEmbed$1 = class SpotterEmbed extends TsEmbed {
25968
26138
  const path = sharedConversationId
25969
26139
  ? `insights/conv-assist/s/${encodeURIComponent(sharedConversationId)}`
25970
26140
  : 'insights/conv-assist';
25971
- const queryParams = this.getEmbedParamsObject();
26141
+ const queryParams = this.getUrlQueryParamsObject();
25972
26142
  let query = '';
25973
26143
  const queryParamsString = getQueryParamString(queryParams, true);
25974
26144
  if (queryParamsString) {