@thoughtspot/visual-embed-sdk 1.41.1 → 1.42.1-HE2

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 (186) hide show
  1. package/cjs/package.json +9 -9
  2. package/cjs/src/css-variables.d.ts +52 -14
  3. package/cjs/src/css-variables.d.ts.map +1 -1
  4. package/cjs/src/embed/app.d.ts +20 -0
  5. package/cjs/src/embed/app.d.ts.map +1 -1
  6. package/cjs/src/embed/app.js +7 -1
  7. package/cjs/src/embed/app.js.map +1 -1
  8. package/cjs/src/embed/app.spec.js +52 -0
  9. package/cjs/src/embed/app.spec.js.map +1 -1
  10. package/cjs/src/embed/bodyless-conversation.d.ts +1 -0
  11. package/cjs/src/embed/bodyless-conversation.d.ts.map +1 -1
  12. package/cjs/src/embed/bodyless-conversation.js +7 -3
  13. package/cjs/src/embed/bodyless-conversation.js.map +1 -1
  14. package/cjs/src/embed/conversation.d.ts +1 -0
  15. package/cjs/src/embed/conversation.d.ts.map +1 -1
  16. package/cjs/src/embed/conversation.js +7 -2
  17. package/cjs/src/embed/conversation.js.map +1 -1
  18. package/cjs/src/embed/hostEventClient/host-event-client.d.ts +3 -3
  19. package/cjs/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
  20. package/cjs/src/embed/hostEventClient/host-event-client.js +6 -6
  21. package/cjs/src/embed/hostEventClient/host-event-client.js.map +1 -1
  22. package/cjs/src/embed/liveboard.d.ts +1 -0
  23. package/cjs/src/embed/liveboard.d.ts.map +1 -1
  24. package/cjs/src/embed/liveboard.js +10 -2
  25. package/cjs/src/embed/liveboard.js.map +1 -1
  26. package/cjs/src/embed/liveboard.spec.js +35 -0
  27. package/cjs/src/embed/liveboard.spec.js.map +1 -1
  28. package/cjs/src/embed/sage.d.ts +1 -0
  29. package/cjs/src/embed/sage.d.ts.map +1 -1
  30. package/cjs/src/embed/sage.js +10 -6
  31. package/cjs/src/embed/sage.js.map +1 -1
  32. package/cjs/src/embed/search-bar.d.ts +1 -0
  33. package/cjs/src/embed/search-bar.d.ts.map +1 -1
  34. package/cjs/src/embed/search-bar.js +11 -7
  35. package/cjs/src/embed/search-bar.js.map +1 -1
  36. package/cjs/src/embed/search.d.ts +1 -0
  37. package/cjs/src/embed/search.d.ts.map +1 -1
  38. package/cjs/src/embed/search.js +7 -8
  39. package/cjs/src/embed/search.js.map +1 -1
  40. package/cjs/src/embed/ts-embed.d.ts +20 -5
  41. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  42. package/cjs/src/embed/ts-embed.js +84 -31
  43. package/cjs/src/embed/ts-embed.js.map +1 -1
  44. package/cjs/src/embed/ts-embed.spec.js +83 -0
  45. package/cjs/src/embed/ts-embed.spec.js.map +1 -1
  46. package/cjs/src/errors.d.ts +1 -0
  47. package/cjs/src/errors.d.ts.map +1 -1
  48. package/cjs/src/errors.js +1 -0
  49. package/cjs/src/errors.js.map +1 -1
  50. package/cjs/src/react/all-types-export.spec.js +1 -1
  51. package/cjs/src/react/all-types-export.spec.js.map +1 -1
  52. package/cjs/src/react/util.js.map +1 -1
  53. package/cjs/src/react/util.spec.d.ts +2 -0
  54. package/cjs/src/react/util.spec.d.ts.map +1 -0
  55. package/cjs/src/react/util.spec.js +78 -0
  56. package/cjs/src/react/util.spec.js.map +1 -0
  57. package/cjs/src/types.d.ts +153 -64
  58. package/cjs/src/types.d.ts.map +1 -1
  59. package/cjs/src/types.js +136 -62
  60. package/cjs/src/types.js.map +1 -1
  61. package/cjs/src/utils/processTrigger.d.ts +2 -1
  62. package/cjs/src/utils/processTrigger.d.ts.map +1 -1
  63. package/cjs/src/utils/processTrigger.js +4 -2
  64. package/cjs/src/utils/processTrigger.js.map +1 -1
  65. package/dist/{index-DQueHwfQ.js → index-CWQnMX2L.js} +1 -1
  66. package/dist/index-Djtv-y7A.js +7371 -0
  67. package/dist/src/css-variables.d.ts +52 -14
  68. package/dist/src/css-variables.d.ts.map +1 -1
  69. package/dist/src/embed/app.d.ts +20 -0
  70. package/dist/src/embed/app.d.ts.map +1 -1
  71. package/dist/src/embed/bodyless-conversation.d.ts +1 -0
  72. package/dist/src/embed/bodyless-conversation.d.ts.map +1 -1
  73. package/dist/src/embed/conversation.d.ts +1 -0
  74. package/dist/src/embed/conversation.d.ts.map +1 -1
  75. package/dist/src/embed/hostEventClient/host-event-client.d.ts +3 -3
  76. package/dist/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
  77. package/dist/src/embed/liveboard.d.ts +1 -0
  78. package/dist/src/embed/liveboard.d.ts.map +1 -1
  79. package/dist/src/embed/sage.d.ts +1 -0
  80. package/dist/src/embed/sage.d.ts.map +1 -1
  81. package/dist/src/embed/search-bar.d.ts +1 -0
  82. package/dist/src/embed/search-bar.d.ts.map +1 -1
  83. package/dist/src/embed/search.d.ts +1 -0
  84. package/dist/src/embed/search.d.ts.map +1 -1
  85. package/dist/src/embed/ts-embed.d.ts +20 -5
  86. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  87. package/dist/src/errors.d.ts +1 -0
  88. package/dist/src/errors.d.ts.map +1 -1
  89. package/dist/src/react/util.spec.d.ts +2 -0
  90. package/dist/src/react/util.spec.d.ts.map +1 -0
  91. package/dist/src/types.d.ts +153 -64
  92. package/dist/src/types.d.ts.map +1 -1
  93. package/dist/src/utils/processTrigger.d.ts +2 -1
  94. package/dist/src/utils/processTrigger.d.ts.map +1 -1
  95. package/dist/tsembed-react.es.js +294 -134
  96. package/dist/tsembed-react.js +293 -133
  97. package/dist/tsembed.es.js +294 -134
  98. package/dist/tsembed.js +293 -133
  99. package/dist/visual-embed-sdk-react-full.d.ts +9401 -9916
  100. package/dist/visual-embed-sdk-react.d.ts +9273 -9922
  101. package/dist/visual-embed-sdk.d.ts +9440 -9533
  102. package/lib/package.json +9 -9
  103. package/lib/src/css-variables.d.ts +52 -14
  104. package/lib/src/css-variables.d.ts.map +1 -1
  105. package/lib/src/embed/app.d.ts +20 -0
  106. package/lib/src/embed/app.d.ts.map +1 -1
  107. package/lib/src/embed/app.js +7 -1
  108. package/lib/src/embed/app.js.map +1 -1
  109. package/lib/src/embed/app.spec.js +52 -0
  110. package/lib/src/embed/app.spec.js.map +1 -1
  111. package/lib/src/embed/bodyless-conversation.d.ts +1 -0
  112. package/lib/src/embed/bodyless-conversation.d.ts.map +1 -1
  113. package/lib/src/embed/bodyless-conversation.js +7 -3
  114. package/lib/src/embed/bodyless-conversation.js.map +1 -1
  115. package/lib/src/embed/conversation.d.ts +1 -0
  116. package/lib/src/embed/conversation.d.ts.map +1 -1
  117. package/lib/src/embed/conversation.js +7 -2
  118. package/lib/src/embed/conversation.js.map +1 -1
  119. package/lib/src/embed/hostEventClient/host-event-client.d.ts +3 -3
  120. package/lib/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
  121. package/lib/src/embed/hostEventClient/host-event-client.js +6 -6
  122. package/lib/src/embed/hostEventClient/host-event-client.js.map +1 -1
  123. package/lib/src/embed/liveboard.d.ts +1 -0
  124. package/lib/src/embed/liveboard.d.ts.map +1 -1
  125. package/lib/src/embed/liveboard.js +10 -2
  126. package/lib/src/embed/liveboard.js.map +1 -1
  127. package/lib/src/embed/liveboard.spec.js +35 -0
  128. package/lib/src/embed/liveboard.spec.js.map +1 -1
  129. package/lib/src/embed/sage.d.ts +1 -0
  130. package/lib/src/embed/sage.d.ts.map +1 -1
  131. package/lib/src/embed/sage.js +10 -6
  132. package/lib/src/embed/sage.js.map +1 -1
  133. package/lib/src/embed/search-bar.d.ts +1 -0
  134. package/lib/src/embed/search-bar.d.ts.map +1 -1
  135. package/lib/src/embed/search-bar.js +11 -7
  136. package/lib/src/embed/search-bar.js.map +1 -1
  137. package/lib/src/embed/search.d.ts +1 -0
  138. package/lib/src/embed/search.d.ts.map +1 -1
  139. package/lib/src/embed/search.js +7 -8
  140. package/lib/src/embed/search.js.map +1 -1
  141. package/lib/src/embed/ts-embed.d.ts +20 -5
  142. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  143. package/lib/src/embed/ts-embed.js +84 -31
  144. package/lib/src/embed/ts-embed.js.map +1 -1
  145. package/lib/src/embed/ts-embed.spec.js +83 -0
  146. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  147. package/lib/src/errors.d.ts +1 -0
  148. package/lib/src/errors.d.ts.map +1 -1
  149. package/lib/src/errors.js +1 -0
  150. package/lib/src/errors.js.map +1 -1
  151. package/lib/src/react/all-types-export.spec.js +1 -1
  152. package/lib/src/react/all-types-export.spec.js.map +1 -1
  153. package/lib/src/react/util.js.map +1 -1
  154. package/lib/src/react/util.spec.d.ts +2 -0
  155. package/lib/src/react/util.spec.d.ts.map +1 -0
  156. package/lib/src/react/util.spec.js +76 -0
  157. package/lib/src/react/util.spec.js.map +1 -0
  158. package/lib/src/types.d.ts +153 -64
  159. package/lib/src/types.d.ts.map +1 -1
  160. package/lib/src/types.js +136 -62
  161. package/lib/src/types.js.map +1 -1
  162. package/lib/src/utils/processTrigger.d.ts +2 -1
  163. package/lib/src/utils/processTrigger.d.ts.map +1 -1
  164. package/lib/src/utils/processTrigger.js +4 -2
  165. package/lib/src/utils/processTrigger.js.map +1 -1
  166. package/package.json +9 -9
  167. package/src/css-variables.ts +53 -16
  168. package/src/embed/app.spec.ts +73 -0
  169. package/src/embed/app.ts +30 -0
  170. package/src/embed/bodyless-conversation.ts +8 -3
  171. package/src/embed/conversation.ts +17 -2
  172. package/src/embed/hostEventClient/host-event-client.ts +7 -3
  173. package/src/embed/liveboard.spec.ts +44 -0
  174. package/src/embed/liveboard.ts +12 -1
  175. package/src/embed/sage.ts +14 -9
  176. package/src/embed/search-bar.tsx +14 -7
  177. package/src/embed/search.ts +18 -7
  178. package/src/embed/ts-embed.spec.ts +112 -1
  179. package/src/embed/ts-embed.ts +104 -37
  180. package/src/errors.ts +1 -0
  181. package/src/react/all-types-export.spec.ts +1 -1
  182. package/src/react/util.spec.tsx +88 -0
  183. package/src/react/util.ts +3 -3
  184. package/src/types.ts +211 -121
  185. package/src/utils/processTrigger.ts +5 -2
  186. package/lib/src/visual-embed-sdk.d.ts +0 -9779
@@ -1,4 +1,4 @@
1
- /* @thoughtspot/visual-embed-sdk version 1.41.1 */
1
+ /* @thoughtspot/visual-embed-sdk version 1.42.1-HE2 */
2
2
  'use client';
3
3
  import * as React from 'react';
4
4
  import React__default, { useRef, useCallback } from 'react';
@@ -614,7 +614,7 @@ var EmbedEvent;
614
614
  */
615
615
  EmbedEvent["Load"] = "load";
616
616
  /**
617
- * Data pertaining to an Answer or Liveboard is received.
617
+ * Data pertaining to an Answer, Liveboard or Spotter visualization is received.
618
618
  * The event payload includes the raw data of the object.
619
619
  * @return data - Answer of Liveboard data
620
620
  * @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
@@ -1985,7 +1985,7 @@ var HostEvent;
1985
1985
  * the following parameters:
1986
1986
  *
1987
1987
  * @param
1988
- * `vizId`- GUID of the saved Answer or visualization to pin to a Liveboard.
1988
+ * `vizId`- GUID of the saved Answer or Spotter visualization ID to pin to a Liveboard.
1989
1989
  * Optional when pinning a new chart or table generated from a Search query.
1990
1990
  * **Required** in Spotter Embed.
1991
1991
  * @param
@@ -2037,10 +2037,16 @@ var HostEvent;
2037
2037
  * ```
2038
2038
  * @example
2039
2039
  * ```js
2040
- * const pinResponse = await spotterEmbed.trigger(HostEvent.Pin, {
2041
- * vizId:'730496d6-6903-4601-937e-2c691821af3c'
2042
- * });
2043
- * ```
2040
+
2041
+ * // You can use the Data event dispatched on each answer creation to get the vizId and use in Pin host event.
2042
+ * let latestSpotterVizId = '';
2043
+ * spotterEmbed.on(EmbedEvent.Data, (payload) => {
2044
+ * latestSpotterVizId = payload.data.id;
2045
+ * });
2046
+ *
2047
+ * spotterEmbed.trigger(HostEvent.Pin, { vizId: latestSpotterVizId });
2048
+ * ```
2049
+ *
2044
2050
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2045
2051
  */
2046
2052
  HostEvent["Pin"] = "pin";
@@ -2115,10 +2121,15 @@ var HostEvent;
2115
2121
  * ```
2116
2122
  * @example
2117
2123
  * ```js
2118
- * spotterEmbed.trigger(HostEvent.DownloadAsPdf, {
2119
- * vizId:'730496d6-6903-4601-937e-2c691821af3c'
2120
- * });
2121
- * ```
2124
+
2125
+ * // You can use the Data event dispatched on each answer creation to get the vizId and use in DownloadAsPdf host event.
2126
+ * let latestSpotterVizId = '';
2127
+ * spotterEmbed.on(EmbedEvent.Data, (payload) => {
2128
+ * latestSpotterVizId = payload.data.id;
2129
+ * });
2130
+ *
2131
+ * spotterEmbed.trigger(HostEvent.DownloadAsPdf, { vizId: latestSpotterVizId });
2132
+ * ```
2122
2133
  *
2123
2134
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2124
2135
  */
@@ -2145,10 +2156,14 @@ var HostEvent;
2145
2156
  * ```
2146
2157
  * @example
2147
2158
  * ```js
2148
- * const pinResponse = await spotterEmbed.trigger(HostEvent.MakeACopy, {
2149
- * vizId:'730496d6-6903-4601-937e-2c691821af3c'
2150
- * });
2151
- * ```
2159
+ * // You can use the Data event dispatched on each answer creation to get the vizId and use in MakeACopy host event.
2160
+ * let latestSpotterVizId = '';
2161
+ * spotterEmbed.on(EmbedEvent.Data, (payload) => {
2162
+ * latestSpotterVizId = payload.data.id;
2163
+ * });
2164
+ *
2165
+ * spotterEmbed.trigger(HostEvent.MakeACopy, { vizId: latestSpotterVizId });
2166
+ * ```
2152
2167
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2153
2168
  */
2154
2169
  HostEvent["MakeACopy"] = "makeACopy";
@@ -2233,15 +2248,7 @@ var HostEvent;
2233
2248
  * ```
2234
2249
  * @example
2235
2250
  * ```js
2236
- * const pinResponse = await spotterEmbed.trigger(HostEvent.Edit, {
2237
- * vizId:'730496d6-6903-4601-937e-2c691821af3c'
2238
- * });
2239
- * ```
2240
- * @example
2241
- * ```js
2242
- * const editResponse = await spotterEmbed.trigger(HostEvent.Edit, {
2243
- * vizId:'730496d6-6903-4601-937e-2c691821af3c'
2244
- * });
2251
+ * spotterEmbed.trigger(HostEvent.Edit);
2245
2252
  * ```
2246
2253
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2247
2254
  */
@@ -2290,16 +2297,23 @@ var HostEvent;
2290
2297
  * );
2291
2298
  * })
2292
2299
  * ```
2293
- * @example
2300
+ * * @example
2294
2301
  * ```js
2295
- * spotterEmbed.trigger(HostEvent.GetTML, {
2296
- * vizId: '730496d6-6903-4601-937e-2c691821af3c'
2302
+
2303
+ * // You can use the Data event dispatched on each answer creation to get the vizId and use in Pin host event.
2304
+ * let latestSpotterVizId = '';
2305
+ * spotterEmbed.on(EmbedEvent.Data, (payload) => {
2306
+ * latestSpotterVizId = payload.data.id;
2307
+ * });
2308
+ *
2309
+ * spotterEmbed.trigger(HostEvent.GetTML, {
2310
+ * vizId: latestSpotterVizId
2297
2311
  * }).then((tml) => {
2298
2312
  * console.log(
2299
2313
  * tml.answer.search_query // TML representation of the search query
2300
2314
  * );
2301
2315
  * })
2302
- * ```
2316
+ * ```
2303
2317
  * @version SDK: 1.18.0 | ThoughtSpot: 8.10.0.cl, 9.0.1.sw
2304
2318
  * @important
2305
2319
  */
@@ -2363,7 +2377,7 @@ var HostEvent;
2363
2377
  /**
2364
2378
  * Trigger the **Download** action on charts in
2365
2379
  * the embedded view.
2366
- * @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
2380
+ * @param - `vizId` refers to the Visualization ID in Spotter embed and is required in Spotter embed.
2367
2381
  * @example
2368
2382
  * ```js
2369
2383
  * liveboardEmbed.trigger(HostEvent.Download, {vizId:
@@ -2373,10 +2387,14 @@ var HostEvent;
2373
2387
  * embed.trigger(HostEvent.Download)
2374
2388
  * ```
2375
2389
  * ```js
2376
- * spotterEmbed.trigger(HostEvent.Download, {
2377
- * vizId:'730496d6-6903-4601-937e-2c691821af3c'
2378
- * });
2379
- * ```
2390
+ * // You can use the Data event dispatched on each answer creation to get the vizId and use in Download host event.
2391
+ * let latestSpotterVizId = '';
2392
+ * spotterEmbed.on(EmbedEvent.Data, (payload) => {
2393
+ * latestSpotterVizId = payload.data.id;
2394
+ * });
2395
+ *
2396
+ * spotterEmbed.trigger(HostEvent.Download, { vizId: latestSpotterVizId });
2397
+ * ```
2380
2398
  * @deprecated from SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl ,9.4.1.sw
2381
2399
  * Use {@link DownloadAsPng}
2382
2400
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
@@ -2394,9 +2412,13 @@ var HostEvent;
2394
2412
  *
2395
2413
  * searchEmbed.trigger(HostEvent.DownloadAsPng)
2396
2414
  *
2397
- * spotterEmbed.trigger(HostEvent.DownloadAsPng, {
2398
- * vizId:"730496d6-6903-4601-937e-2c691821af3c"
2399
- * })
2415
+ * // You can use the Data event dispatched on each answer creation to get the vizId and use in DownloadAsPng host event.
2416
+ * let latestSpotterVizId = '';
2417
+ * spotterEmbed.on(EmbedEvent.Data, (payload) => {
2418
+ * latestSpotterVizId = payload.data.id;
2419
+ * });
2420
+ *
2421
+ * spotterEmbed.trigger(HostEvent.DownloadAsPng, { vizId: latestSpotterVizId });
2400
2422
  * ```
2401
2423
  *
2402
2424
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.1.sw
@@ -2405,7 +2427,7 @@ var HostEvent;
2405
2427
  /**
2406
2428
  * Trigger the **Download** > **CSV** action on tables in
2407
2429
  * the embedded view.
2408
- * @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
2430
+ * @param - `vizId` refers to the Visualization ID in Spotter embed and is required in Spotter embed.
2409
2431
  * @example
2410
2432
  * ```js
2411
2433
  * liveboardEmbed.trigger(HostEvent.DownloadAsCsv, {vizId:
@@ -2418,9 +2440,13 @@ var HostEvent;
2418
2440
  * searchEmbed.trigger(HostEvent.DownloadAsCsv)
2419
2441
  * ```
2420
2442
  * ```js
2421
- * spotterEmbed.trigger(HostEvent.DownloadAsCsv, {
2422
- * vizId:"730496d6-6903-4601-937e-2c691821af3c"
2423
- * })
2443
+ * // You can use the Data event dispatched on each answer creation to get the vizId and use in DownloadAsCsv host event.
2444
+ * let latestSpotterVizId = '';
2445
+ * spotterEmbed.on(EmbedEvent.Data, (payload) => {
2446
+ * latestSpotterVizId = payload.data.id;
2447
+ * });
2448
+ *
2449
+ * spotterEmbed.trigger(HostEvent.DownloadAsCsv, { vizId: latestSpotterVizId });
2424
2450
  * ```
2425
2451
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
2426
2452
  */
@@ -2428,7 +2454,7 @@ var HostEvent;
2428
2454
  /**
2429
2455
  * Trigger the **Download** > **XLSX** action on tables
2430
2456
  * in the embedded view.
2431
- * @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
2457
+ * @param - `vizId` refers to the Visualization ID in Spotter embed and is required in Spotter embed.
2432
2458
  * @example
2433
2459
  * ```js
2434
2460
  * liveboardEmbed.trigger(HostEvent.DownloadAsXlsx, {vizId:
@@ -2441,9 +2467,13 @@ var HostEvent;
2441
2467
  * searchEmbed.trigger(HostEvent.DownloadAsXlsx)
2442
2468
  * ```
2443
2469
  * ```js
2444
- * spotterEmbed.trigger(HostEvent.downloadAsXLSX, {
2445
- * vizId:"730496d6-6903-4601-937e-2c691821af3c"
2446
- * })
2470
+ * // You can use the Data event dispatched on each answer creation to get the vizId and use in DownloadAsXlsx host event.
2471
+ * let latestSpotterVizId = '';
2472
+ * spotterEmbed.on(EmbedEvent.Data, (payload) => {
2473
+ * latestSpotterVizId = payload.data.id;
2474
+ * });
2475
+ *
2476
+ * spotterEmbed.trigger(HostEvent.DownloadAsXlsx, { vizId: latestSpotterVizId });
2447
2477
  * ```
2448
2478
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
2449
2479
  */
@@ -2462,21 +2492,42 @@ var HostEvent;
2462
2492
  */
2463
2493
  HostEvent["Share"] = "share";
2464
2494
  /**
2465
- * Trigger the **Save** action on a Liveboard or Answer.
2495
+ * Trigger the **Save** action on a Liveboard, Answer, or Spotter.
2466
2496
  * Saves the changes.
2467
- * @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
2497
+ *
2498
+ * @param - `vizId` refers to the Spotter Visualization Id used in Spotter embed.
2499
+ * It is required and can be retrieved from the data embed event.
2500
+ *
2468
2501
  * @example
2469
2502
  * ```js
2503
+ * // Save changes in a Liveboard
2470
2504
  * liveboardEmbed.trigger(HostEvent.Save)
2471
2505
  * ```
2506
+ *
2472
2507
  * ```js
2508
+ * // Save the current Answer in Search embed
2473
2509
  * searchEmbed.trigger(HostEvent.Save)
2474
2510
  * ```
2511
+ *
2475
2512
  * ```js
2513
+ * // Save a Visualization in Spotter (requires vizId)
2476
2514
  * spotterEmbed.trigger(HostEvent.Save, {
2477
- * vizId:"730496d6-6903-4601-937e-2c691821af3c"
2515
+ * vizId: "730496d6-6903-4601-937e-2c691821af3c"
2478
2516
  * })
2479
2517
  * ```
2518
+ *
2519
+ * ```js
2520
+ * // How to get the vizId in Spotter?
2521
+ *
2522
+ * // You can use the Data event dispatched on each answer creation to get the vizId.
2523
+ * let latestSpotterVizId = '';
2524
+ * spotterEmbed.on(EmbedEvent.Data, (payload) => {
2525
+ * latestSpotterVizId = payload.data.id;
2526
+ * });
2527
+ *
2528
+ * spotterEmbed.trigger(HostEvent.Save, { vizId: latestSpotterVizId });
2529
+ * ```
2530
+ *
2480
2531
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
2481
2532
  */
2482
2533
  HostEvent["Save"] = "save";
@@ -2781,11 +2832,13 @@ var HostEvent;
2781
2832
  * });
2782
2833
  *```
2783
2834
  *```js
2784
- * spotterEmbed.trigger(HostEvent.GetParameters, {
2785
- * vizId: '730496d6-6903-4601-937e-2c691821af3c'
2786
- * }).then((parameter) => {
2787
- * console.log('parameters', parameter);
2788
- * });
2835
+ * // You can use the Data event dispatched on each answer creation to get the vizId and use in GetParameters host event.
2836
+ * let latestSpotterVizId = '';
2837
+ * spotterEmbed.on(EmbedEvent.Data, (payload) => {
2838
+ * latestSpotterVizId = payload.data.id;
2839
+ * });
2840
+ *
2841
+ * spotterEmbed.trigger(HostEvent.GetParameters, { vizId: latestSpotterVizId });
2789
2842
  *```
2790
2843
  * @version SDK: 1.29.0 | ThoughtSpot: 10.1.0.cl, 10.1.0.sw
2791
2844
  */
@@ -2828,11 +2881,13 @@ var HostEvent;
2828
2881
  * ```
2829
2882
  * @example
2830
2883
  * ```js
2831
- * const saveAnswerResponse = await spotterEmbed.trigger(HostEvent.SaveAnswer, {
2832
- * vizId: '730496d6-6903-4601-937e-2c691821af3c',
2833
- * name: "Sales by states",
2834
- * description: "Total sales by states in MidWest"
2884
+ * // You can use the Data event dispatched on each answer creation to get the vizId and use in SaveAnswer host event.
2885
+ * let latestSpotterVizId = '';
2886
+ * spotterEmbed.on(EmbedEvent.Data, (payload) => {
2887
+ * latestSpotterVizId = payload.data.id;
2835
2888
  * });
2889
+ *
2890
+ * spotterEmbed.trigger(HostEvent.SaveAnswer, { vizId: latestSpotterVizId });
2836
2891
  * ```
2837
2892
  * @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
2838
2893
  */
@@ -2916,12 +2971,15 @@ var HostEvent;
2916
2971
  HostEvent["DeleteLastPrompt"] = "DeleteLastPrompt";
2917
2972
  /**
2918
2973
  * Toggle the visualization to chart or table view.
2919
- * @param - `vizId ` refers to the answer id in spotter Embed, it is required in spotter Embed.
2974
+ * @param - `vizId ` refers to the Visualization ID in Spotter embed and is required.
2920
2975
  * @example
2921
2976
  * ```js
2922
- * spotterEmbed.trigger(HostEvent.AnswerChartSwitcher, {
2923
- * vizId:'b535c760-8bbe-4e6f-bb26-af56b4129a1e'
2977
+ * let latestSpotterVizId = '';
2978
+ * spotterEmbed.on(EmbedEvent.Data, (payload) => {
2979
+ * latestSpotterVizId = payload.data.id;
2924
2980
  * });
2981
+ *
2982
+ * spotterEmbed.trigger(HostEvent.AnswerChartSwitcher, { vizId: latestSpotterVizId });
2925
2983
  *```
2926
2984
  * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
2927
2985
  */
@@ -2950,16 +3008,30 @@ var HostEvent;
2950
3008
  */
2951
3009
  HostEvent["VisibleEmbedCoordinates"] = "visibleEmbedCoordinates";
2952
3010
  /**
2953
- * Trigger the *Ask Spotter* action for visualizations
2954
- * @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
3011
+ * Trigger the *Spotter* action for visualizations present on the liveboard's vizzes.
3012
+ * @param - `vizId` refers to the Visualization ID in Spotter embed and is required.
2955
3013
  * @example
2956
3014
  * ```js
2957
- * spotterEmbed.trigger(HostEvent.AskSpotter,
2958
- * {vizId:'730496d6-6903-4601-937e-2c691821af3c'})
3015
+ * let latestSpotterVizId = '';
3016
+ * spotterEmbed.on(EmbedEvent.Data, (payload) => {
3017
+ * latestSpotterVizId = payload.data.id;
3018
+ * });
3019
+ *
3020
+ * spotterEmbed.trigger(HostEvent.AskSpotter, { vizId: latestSpotterVizId });
2959
3021
  * ```
2960
3022
  * @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
2961
3023
  */
2962
3024
  HostEvent["AskSpotter"] = "AskSpotter";
3025
+ /**
3026
+ * @hidden
3027
+ * Triggers the update of the embed params.
3028
+ *
3029
+ * @example
3030
+ * ```js
3031
+ * liveboardEmbed.trigger(HostEvent.UpdateEmbedParams, viewConfig);
3032
+ * ```
3033
+ */
3034
+ HostEvent["UpdateEmbedParams"] = "updateEmbedParams";
2963
3035
  })(HostEvent || (HostEvent = {}));
2964
3036
  /**
2965
3037
  * The different visual modes that the data sources panel within
@@ -3003,6 +3075,7 @@ var Param;
3003
3075
  Param["HideResult"] = "hideResult";
3004
3076
  Param["UseLastSelectedDataSource"] = "useLastSelectedSources";
3005
3077
  Param["Tag"] = "tag";
3078
+ Param["HideTagFilterChips"] = "hideTagFilterChips";
3006
3079
  Param["AutoLogin"] = "autoLogin";
3007
3080
  Param["searchTokenString"] = "searchTokenString";
3008
3081
  Param["executeSearch"] = "executeSearch";
@@ -3107,6 +3180,7 @@ var Param;
3107
3180
  Param["RootMarginForLazyLoad"] = "rootMarginForLazyLoad";
3108
3181
  Param["LiveboardXLSXCSVDownload"] = "isLiveboardXLSXCSVDownloadEnabled";
3109
3182
  Param["isPNGInScheduledEmailsEnabled"] = "isPNGInScheduledEmailsEnabled";
3183
+ Param["isLinkParametersEnabled"] = "isLinkParametersEnabled";
3110
3184
  })(Param || (Param = {}));
3111
3185
  /**
3112
3186
  * ThoughtSpot application pages include actions and menu commands
@@ -7316,6 +7390,7 @@ const ERROR_MESSAGE = {
7316
7390
  MISSING_REPORTING_OBSERVER: 'ReportingObserver not supported',
7317
7391
  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',
7318
7392
  SPOTTER_AGENT_NOT_INITIALIZED: 'SpotterAgent not initialized',
7393
+ OFFLINE_WARNING: 'Network not Detected. Embed is offline. Please reconnect and refresh',
7319
7394
  };
7320
7395
  const CUSTOM_ACTIONS_ERROR_MESSAGE = {
7321
7396
  INVALID_ACTION_OBJECT: 'Custom Action Validation Error: Invalid action object provided',
@@ -8225,7 +8300,7 @@ class AnswerService {
8225
8300
  async getTML() {
8226
8301
  const { object } = await this.executeQuery(getAnswerTML, {});
8227
8302
  const edoc = object[0].edoc;
8228
- const YAML = await import('./index-DQueHwfQ.js');
8303
+ const YAML = await import('./index-Djtv-y7A.js');
8229
8304
  const parsedDoc = YAML.parse(edoc);
8230
8305
  return {
8231
8306
  answer: {
@@ -17398,7 +17473,7 @@ function processEventData(type, e, thoughtSpotHost, containerEl) {
17398
17473
  return e;
17399
17474
  }
17400
17475
 
17401
- var name="@thoughtspot/visual-embed-sdk";var version$1="1.41.1";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p . --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};
17476
+ var name="@thoughtspot/visual-embed-sdk";var version$1="1.42.1-HE2";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p tsconfig.build.json --incremental false; tsc -p tsconfig.build.json --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle-generator --config ./dts-config/dts-bundle-file.config.js","bundle-dts":"dts-bundle-generator --config ./dts-config/dts-bundle.config.js","bundle-dts-react":"dts-bundle-generator --config ./dts-config/dts-bundle-react.config.js","bundle-dts-react-full":"dts-bundle-generator --config ./dts-config/dts-bundle-react-full.config.js",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.build.json --theme typedoc-theme --json static/typedoc/typedoc.json --disableOutputCheck","test-sdk":"jest -c jest.config.sdk.js --runInBand",test:"npm run test-sdk",posttest:"cat ./coverage/sdk/lcov.info | npx coveralls-next","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest",dev:"vite -c vite.local.config.ts"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={classnames:"^2.3.1",eventemitter3:"^4.0.7",lodash:"^4.17.21","mixpanel-browser":"2.47.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1",yaml:"^2.5.1"};var devDependencies={"@mdx-js/mdx":"^1.6.22","@mdx-js/react":"^1.6.22","@react-icons/all-files":"^4.1.0","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^5.0.2","@size-limit/preset-big-lib":"^11.2.0","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^22.2.3","@types/lodash":"^4.17.0","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^8.28.0","@typescript-eslint/parser":"^8.28.0",ajv:"^8.17.1",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1","coveralls-next":"^5.0.0",crypto:"^1.0.1","current-git-branch":"^1.1.0","dts-bundle-generator":"^9.5.1",eslint:"^9.23.0","eslint-config-airbnb-base":"^15.0.0","eslint-config-prettier":"^10.1.1","eslint-import-resolver-typescript":"^4.2.5","eslint-plugin-comment-length":"2.2.1","eslint-plugin-import":"^2.31.0","eslint-plugin-jsdoc":"^50.6.9","eslint-plugin-prettier":"^5.2.5","eslint-plugin-react":"^7.37.5","eslint-plugin-react-hooks":"^5.2.0","fs-extra":"^10.0.0","gh-pages":"6.3.0",globals:"^16.0.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^2.0.0",jest:"^26.6.3","jest-fetch-mock":"^3.0.3",jsdom:"^17.0.0",prettier:"2.1.2",react:"^16.14.0","react-dom":"^16.14.0","react-resizable":"^1.11.0","react-resize-detector":"^6.6.0","react-test-renderer":"^17.0.2","react-use-flexsearch":"^0.1.1",rollup:"4.24.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^26.5.5","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","typescript-eslint":"^8.29.1","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^6.3.5"};var author="ThoughtSpot";var email="support@thoughtspot.com";var license="ThoughtSpot Development Tools End User License Agreement";var directories={lib:"lib"};var repository={type:"git",url:"git+https://github.com/thoughtspot/visual-embed-sdk.git"};var publishConfig={registry:"https://registry.npmjs.org"};var keywords=["thoughtspot","everywhere","embedded","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version$1,description:description,module:module,main:main,types:types,files:files,exports:exports,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.es.js",limit:"32 kB"}],scripts:scripts,peerDependencies:peerDependencies,dependencies:dependencies,devDependencies:devDependencies,author:author,email:email,license:license,directories:directories,repository:repository,publishConfig:publishConfig,keywords:keywords,bugs:bugs,homepage:homepage,globals:globals};
17402
17477
 
17403
17478
  /**
17404
17479
  * Reloads the ThoughtSpot iframe.
@@ -17417,6 +17492,7 @@ const reload = (iFrame) => {
17417
17492
  * @param message
17418
17493
  * @param message.type
17419
17494
  * @param message.data
17495
+ * @param message.context
17420
17496
  * @param thoughtSpotHost
17421
17497
  * @param channel
17422
17498
  */
@@ -17431,8 +17507,9 @@ const TRIGGER_TIMEOUT = 30000;
17431
17507
  * @param messageType
17432
17508
  * @param thoughtSpotHost
17433
17509
  * @param data
17510
+ * @param context
17434
17511
  */
17435
- function processTrigger(iFrame, messageType, thoughtSpotHost, data) {
17512
+ function processTrigger(iFrame, messageType, thoughtSpotHost, data, context) {
17436
17513
  return new Promise((res, rej) => {
17437
17514
  var _a;
17438
17515
  if (messageType === HostEvent.Reload) {
@@ -17466,7 +17543,7 @@ function processTrigger(iFrame, messageType, thoughtSpotHost, data) {
17466
17543
  channel.port1.close();
17467
17544
  res(new Error(ERROR_MESSAGE.TRIGGER_TIMED_OUT));
17468
17545
  }, TRIGGER_TIMEOUT);
17469
- return postIframeMessage(iFrame, { type: messageType, data }, thoughtSpotHost, channel);
17546
+ return postIframeMessage(iFrame, { type: messageType, data, context }, thoughtSpotHost, channel);
17470
17547
  });
17471
17548
  }
17472
17549
 
@@ -17490,12 +17567,12 @@ class HostEventClient {
17490
17567
  * @param {any} data Data to send with the host event
17491
17568
  * @returns {Promise<any>} - the response from the process trigger
17492
17569
  */
17493
- async processTrigger(message, data) {
17570
+ async processTrigger(message, data, context) {
17494
17571
  if (!this.iFrame) {
17495
17572
  throw new Error('Iframe element is not set');
17496
17573
  }
17497
17574
  const thoughtspotHost = getEmbedConfig().thoughtSpotHost;
17498
- return processTrigger(this.iFrame, message, thoughtspotHost, data);
17575
+ return processTrigger(this.iFrame, message, thoughtspotHost, data, context);
17499
17576
  }
17500
17577
  async handleHostEventWithParam(apiName, parameters) {
17501
17578
  var _a, _b, _c, _d;
@@ -17514,8 +17591,8 @@ class HostEventClient {
17514
17591
  }
17515
17592
  return { ...response.value };
17516
17593
  }
17517
- async hostEventFallback(hostEvent, data) {
17518
- return this.processTrigger(hostEvent, data);
17594
+ async hostEventFallback(hostEvent, data, context) {
17595
+ return this.processTrigger(hostEvent, data, context);
17519
17596
  }
17520
17597
  /**
17521
17598
  * Setter for the iframe element used for host events
@@ -17559,14 +17636,14 @@ class HostEventClient {
17559
17636
  answerId: (_d = (_c = (_b = (_a = data === null || data === void 0 ? void 0 : data.saveResponse) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.Answer__save) === null || _c === void 0 ? void 0 : _c.answer) === null || _d === void 0 ? void 0 : _d.id,
17560
17637
  };
17561
17638
  }
17562
- async triggerHostEvent(hostEvent, payload) {
17639
+ async triggerHostEvent(hostEvent, payload, context) {
17563
17640
  switch (hostEvent) {
17564
17641
  case HostEvent.Pin:
17565
17642
  return this.handlePinEvent(payload);
17566
17643
  case HostEvent.SaveAnswer:
17567
17644
  return this.handleSaveAnswerEvent(payload);
17568
17645
  default:
17569
- return this.hostEventFallback(hostEvent, payload);
17646
+ return this.hostEventFallback(hostEvent, payload, context);
17570
17647
  }
17571
17648
  }
17572
17649
  }
@@ -17709,10 +17786,10 @@ class TsEmbed {
17709
17786
  };
17710
17787
  this.showPreRenderByDefault = false;
17711
17788
  /**
17712
- * @hidden
17713
- * Internal state to track if the embed container is loaded.
17714
- * This is used to trigger events after the embed container is loaded.
17715
- */
17789
+ * @hidden
17790
+ * Internal state to track if the embed container is loaded.
17791
+ * This is used to trigger events after the embed container is loaded.
17792
+ */
17716
17793
  this.isEmbedContainerLoaded = false;
17717
17794
  /**
17718
17795
  * @hidden
@@ -17771,10 +17848,10 @@ class TsEmbed {
17771
17848
  uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_EMBED_CREATE, {
17772
17849
  ...viewConfig,
17773
17850
  });
17851
+ const embedConfig = getEmbedConfig();
17852
+ this.embedConfig = embedConfig;
17774
17853
  this.hostEventClient = new HostEventClient(this.iFrame);
17775
17854
  this.isReadyForRenderPromise = getInitPromise().then(async () => {
17776
- const embedConfig = getEmbedConfig();
17777
- this.embedConfig = embedConfig;
17778
17855
  if (!embedConfig.authTriggerContainer && !embedConfig.useEventForSAMLPopup) {
17779
17856
  this.embedConfig.authTriggerContainer = domSelector;
17780
17857
  }
@@ -17868,39 +17945,69 @@ class TsEmbed {
17868
17945
  return eventData;
17869
17946
  }
17870
17947
  /**
17871
- * Adds a global event listener to window for "message" events.
17872
- * ThoughtSpot detects if a particular event is targeted to this
17873
- * embed instance through an identifier contained in the payload,
17874
- * and executes the registered callbacks accordingly.
17948
+ * Subscribe to network events (online/offline) that should
17949
+ * work regardless of auth status
17875
17950
  */
17876
- subscribeToEvents() {
17877
- this.unsubscribeToEvents();
17878
- const messageEventListener = (event) => {
17879
- const eventType = this.getEventType(event);
17880
- const eventPort = this.getEventPort(event);
17881
- const eventData = this.formatEventData(event, eventType);
17882
- if (event.source === this.iFrame.contentWindow) {
17883
- this.executeCallbacks(eventType, processEventData(eventType, eventData, this.thoughtSpotHost, this.isPreRendered ? this.preRenderWrapper : this.el), eventPort);
17884
- }
17885
- };
17886
- window.addEventListener('message', messageEventListener);
17951
+ subscribeToNetworkEvents() {
17952
+ this.unsubscribeToNetworkEvents();
17887
17953
  const onlineEventListener = (e) => {
17888
17954
  this.trigger(HostEvent.Reload);
17889
17955
  };
17890
17956
  window.addEventListener('online', onlineEventListener);
17891
17957
  const offlineEventListener = (e) => {
17892
- const offlineWarning = 'Network not Detected. Embed is offline. Please reconnect and refresh';
17958
+ const offlineWarning = ERROR_MESSAGE.OFFLINE_WARNING;
17893
17959
  this.executeCallbacks(EmbedEvent.Error, {
17894
17960
  offlineWarning,
17895
17961
  });
17896
17962
  logger$3.warn(offlineWarning);
17897
17963
  };
17898
17964
  window.addEventListener('offline', offlineEventListener);
17899
- this.subscribedListeners = {
17900
- message: messageEventListener,
17901
- online: onlineEventListener,
17902
- offline: offlineEventListener,
17965
+ this.subscribedListeners.online = onlineEventListener;
17966
+ this.subscribedListeners.offline = offlineEventListener;
17967
+ }
17968
+ /**
17969
+ * Subscribe to message events that depend on successful iframe setup
17970
+ */
17971
+ subscribeToMessageEvents() {
17972
+ this.unsubscribeToMessageEvents();
17973
+ const messageEventListener = (event) => {
17974
+ const eventType = this.getEventType(event);
17975
+ const eventPort = this.getEventPort(event);
17976
+ const eventData = this.formatEventData(event, eventType);
17977
+ if (event.source === this.iFrame.contentWindow) {
17978
+ this.executeCallbacks(eventType, processEventData(eventType, eventData, this.thoughtSpotHost, this.isPreRendered ? this.preRenderWrapper : this.el), eventPort);
17979
+ }
17903
17980
  };
17981
+ window.addEventListener('message', messageEventListener);
17982
+ this.subscribedListeners.message = messageEventListener;
17983
+ }
17984
+ /**
17985
+ * Adds event listeners for both network and message events.
17986
+ * This maintains backward compatibility with the existing method.
17987
+ * Adds a global event listener to window for "message" events.
17988
+ * ThoughtSpot detects if a particular event is targeted to this
17989
+ * embed instance through an identifier contained in the payload,
17990
+ * and executes the registered callbacks accordingly.
17991
+ */
17992
+ subscribeToEvents() {
17993
+ this.subscribeToNetworkEvents();
17994
+ this.subscribeToMessageEvents();
17995
+ }
17996
+ unsubscribeToNetworkEvents() {
17997
+ if (this.subscribedListeners.online) {
17998
+ window.removeEventListener('online', this.subscribedListeners.online);
17999
+ delete this.subscribedListeners.online;
18000
+ }
18001
+ if (this.subscribedListeners.offline) {
18002
+ window.removeEventListener('offline', this.subscribedListeners.offline);
18003
+ delete this.subscribedListeners.offline;
18004
+ }
18005
+ }
18006
+ unsubscribeToMessageEvents() {
18007
+ if (this.subscribedListeners.message) {
18008
+ window.removeEventListener('message', this.subscribedListeners.message);
18009
+ delete this.subscribedListeners.message;
18010
+ }
17904
18011
  }
17905
18012
  unsubscribeToEvents() {
17906
18013
  Object.keys(this.subscribedListeners).forEach((key) => {
@@ -17970,6 +18077,11 @@ class TsEmbed {
17970
18077
  .join('/');
17971
18078
  return `${basePath}#`;
17972
18079
  }
18080
+ getUpdateEmbedParamsObject() {
18081
+ let queryParams = this.getEmbedParamsObject();
18082
+ queryParams = { ...this.viewConfig, ...queryParams };
18083
+ return queryParams;
18084
+ }
17973
18085
  /**
17974
18086
  * Common query params set for all the embed modes.
17975
18087
  * @param queryParams
@@ -18119,9 +18231,13 @@ class TsEmbed {
18119
18231
  return path;
18120
18232
  }
18121
18233
  getEmbedParams() {
18122
- const queryParams = this.getBaseQueryParams();
18234
+ const queryParams = this.getEmbedParamsObject();
18123
18235
  return getQueryParamString(queryParams);
18124
18236
  }
18237
+ getEmbedParamsObject() {
18238
+ const params = this.getBaseQueryParams();
18239
+ return params;
18240
+ }
18125
18241
  getRootIframeSrc() {
18126
18242
  const query = this.getEmbedParams();
18127
18243
  return this.getEmbedBasePath(query);
@@ -18192,6 +18308,8 @@ class TsEmbed {
18192
18308
  type: EmbedEvent.Init,
18193
18309
  });
18194
18310
  uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_RENDER_START);
18311
+ // Always subscribe to network events, regardless of auth status
18312
+ this.subscribeToNetworkEvents();
18195
18313
  return (_a = getAuthPromise()) === null || _a === void 0 ? void 0 : _a.then((isLoggedIn) => {
18196
18314
  if (!isLoggedIn) {
18197
18315
  this.handleInsertionIntoDOM(this.embedConfig.loginFailedMessage);
@@ -18234,7 +18352,9 @@ class TsEmbed {
18234
18352
  el.remove();
18235
18353
  });
18236
18354
  }
18237
- this.subscribeToEvents();
18355
+ // Subscribe to message events only after successful
18356
+ // auth and iframe setup
18357
+ this.subscribeToMessageEvents();
18238
18358
  }).catch((error) => {
18239
18359
  nextInQueue();
18240
18360
  uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_RENDER_FAILED, {
@@ -18544,7 +18664,7 @@ class TsEmbed {
18544
18664
  * @param {any} data The payload to send with the message
18545
18665
  * @returns A promise that resolves with the response from the embedded app
18546
18666
  */
18547
- async trigger(messageType, data = {}) {
18667
+ async trigger(messageType, data = {}, context = {}) {
18548
18668
  uploadMixpanelEvent(`${MIXPANEL_EVENT.VISUAL_SDK_TRIGGER}-${messageType}`);
18549
18669
  if (!this.isRendered) {
18550
18670
  this.handleError('Please call render before triggering events');
@@ -18554,8 +18674,14 @@ class TsEmbed {
18554
18674
  this.handleError('Host event type is undefined');
18555
18675
  return null;
18556
18676
  }
18677
+ // Check if iframe exists before triggering -
18678
+ // this prevents the error when auth fails
18679
+ if (!this.iFrame) {
18680
+ logger$3.debug(`Cannot trigger ${messageType} - iframe not available (likely due to auth failure)`);
18681
+ return null;
18682
+ }
18557
18683
  // send an empty object, this is needed for liveboard default handlers
18558
- return this.hostEventClient.triggerHostEvent(messageType, data);
18684
+ return this.hostEventClient.triggerHostEvent(messageType, data, context);
18559
18685
  }
18560
18686
  /**
18561
18687
  * Triggers an event to the embedded app, skipping the UI flow.
@@ -18686,7 +18812,12 @@ class TsEmbed {
18686
18812
  return this.preRender(true);
18687
18813
  }
18688
18814
  this.validatePreRenderViewConfig(this.viewConfig);
18815
+ logger$3.debug('triggering UpdateEmbedParams', this.viewConfig);
18816
+ this.executeAfterEmbedContainerLoaded(() => {
18817
+ this.trigger(HostEvent.UpdateEmbedParams, this.getUpdateEmbedParamsObject());
18818
+ });
18689
18819
  }
18820
+ this.beforePrerenderVisible();
18690
18821
  if (this.el) {
18691
18822
  this.syncPreRenderStyle();
18692
18823
  if (!this.viewConfig.doNotTrackPreRenderSize) {
@@ -18703,7 +18834,6 @@ class TsEmbed {
18703
18834
  this.resizeObserver.observe(this.el);
18704
18835
  }
18705
18836
  }
18706
- this.beforePrerenderVisible();
18707
18837
  removeStyleProperties(this.preRenderWrapper, ['z-index', 'opacity', 'pointer-events']);
18708
18838
  this.subscribeToEvents();
18709
18839
  // Setup fullscreen change handler for prerendered components
@@ -18892,15 +19022,9 @@ let SearchBarEmbed$1 = class SearchBarEmbed extends TsEmbed {
18892
19022
  this.embedComponentType = 'SearchBarEmbed';
18893
19023
  this.viewConfig = viewConfig;
18894
19024
  }
18895
- /**
18896
- * Construct the URL of the embedded ThoughtSpot search to be
18897
- * loaded in the iframe
18898
- * @param dataSources A list of data source GUIDs
18899
- */
18900
- getIFrameSrc() {
19025
+ getEmbedParamsObject() {
18901
19026
  var _a;
18902
19027
  const { searchOptions, dataSource, dataSources, useLastSelectedSources = false, excludeSearchTokenStringFromURL, } = this.viewConfig;
18903
- const path = 'search-bar-embed';
18904
19028
  const queryParams = this.getBaseQueryParams();
18905
19029
  queryParams[Param.HideActions] = [...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : [])];
18906
19030
  if (dataSources && dataSources.length) {
@@ -18922,6 +19046,16 @@ let SearchBarEmbed$1 = class SearchBarEmbed extends TsEmbed {
18922
19046
  queryParams[Param.UseLastSelectedDataSource] = false;
18923
19047
  }
18924
19048
  queryParams[Param.searchEmbed] = true;
19049
+ return queryParams;
19050
+ }
19051
+ /**
19052
+ * Construct the URL of the embedded ThoughtSpot search to be
19053
+ * loaded in the iframe
19054
+ * @param dataSources A list of data source GUIDs
19055
+ */
19056
+ getIFrameSrc() {
19057
+ const queryParams = this.getEmbedParamsObject();
19058
+ const path = 'search-bar-embed';
18925
19059
  let query = '';
18926
19060
  const queryParamsString = getQueryParamString(queryParams, true);
18927
19061
  if (queryParamsString) {
@@ -18972,12 +19106,7 @@ let SageEmbed$1 = class SageEmbed extends V1Embed {
18972
19106
  viewConfig.embedComponentType = 'SageEmbed';
18973
19107
  super(domSelector, viewConfig);
18974
19108
  }
18975
- /**
18976
- * Constructs a map of parameters to be passed on to the
18977
- * embedded Eureka or Sage search page.
18978
- * @returns {string} query string
18979
- */
18980
- getEmbedParams() {
19109
+ getEmbedParamsObject() {
18981
19110
  const { disableWorksheetChange, hideWorksheetSelector, showObjectSuggestions, dataPanelV2, hideSampleQuestions, isProductTour, hideSageAnswerHeader, hideAutocompleteSuggestions, } = this.viewConfig;
18982
19111
  const params = this.getBaseQueryParams();
18983
19112
  params[Param.DataPanelV2Enabled] = !!dataPanelV2;
@@ -18992,6 +19121,15 @@ let SageEmbed$1 = class SageEmbed extends V1Embed {
18992
19121
  params[Param.HideSampleQuestions] = !!hideSampleQuestions;
18993
19122
  params[Param.IsProductTour] = !!isProductTour;
18994
19123
  params[Param.HideSageAnswerHeader] = !!hideSageAnswerHeader;
19124
+ return params;
19125
+ }
19126
+ /**
19127
+ * Constructs a map of parameters to be passed on to the
19128
+ * embedded Eureka or Sage search page.
19129
+ * @returns {string} query string
19130
+ */
19131
+ getEmbedParams() {
19132
+ const params = this.getEmbedParamsObject();
18995
19133
  return getQueryParamString(params, true);
18996
19134
  }
18997
19135
  /**
@@ -19101,11 +19239,9 @@ let SearchEmbed$1 = class SearchEmbed extends TsEmbed {
19101
19239
  const defaultAppInitData = await super.getAppInitData();
19102
19240
  return { ...defaultAppInitData, ...this.getSearchInitData() };
19103
19241
  }
19104
- getEmbedParams() {
19242
+ getEmbedParamsObject() {
19105
19243
  var _a;
19106
- const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, hideSearchBar, dataPanelV2 = true, useLastSelectedSources = false, runtimeParameters, collapseSearchBarInitially = false, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false,
19107
- /* eslint-disable-next-line max-len */
19108
- dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL, focusSearchBarOnRender = true, excludeRuntimeParametersfromURL, excludeSearchTokenStringFromURL, collapseSearchBar = true, } = this.viewConfig;
19244
+ const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, hideSearchBar, dataPanelV2 = true, useLastSelectedSources = false, runtimeParameters, collapseSearchBarInitially = false, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false, dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL, focusSearchBarOnRender = true, excludeRuntimeParametersfromURL, excludeSearchTokenStringFromURL, collapseSearchBar = true, } = this.viewConfig;
19109
19245
  const queryParams = this.getBaseQueryParams();
19110
19246
  queryParams[Param.HideActions] = [
19111
19247
  ...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : []),
@@ -19138,7 +19274,6 @@ let SearchEmbed$1 = class SearchEmbed extends TsEmbed {
19138
19274
  queryParams[Param.HideSearchBar] = true;
19139
19275
  }
19140
19276
  if (isOnBeforeGetVizDataInterceptEnabled) {
19141
- /* eslint-disable-next-line max-len */
19142
19277
  queryParams[Param.IsOnBeforeGetVizDataInterceptEnabled] = isOnBeforeGetVizDataInterceptEnabled;
19143
19278
  }
19144
19279
  if (!focusSearchBarOnRender) {
@@ -19151,20 +19286,22 @@ let SearchEmbed$1 = class SearchEmbed extends TsEmbed {
19151
19286
  queryParams[Param.UseLastSelectedDataSource] = false;
19152
19287
  }
19153
19288
  queryParams[Param.searchEmbed] = true;
19154
- /* eslint-disable-next-line max-len */
19155
19289
  queryParams[Param.CollapseSearchBarInitially] = collapseSearchBarInitially || collapseSearchBar;
19156
19290
  queryParams[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
19157
19291
  if (dataPanelCustomGroupsAccordionInitialState
19158
19292
  === DataPanelCustomColumnGroupsAccordionState$1.COLLAPSE_ALL
19159
19293
  || dataPanelCustomGroupsAccordionInitialState
19160
19294
  === DataPanelCustomColumnGroupsAccordionState$1.EXPAND_FIRST) {
19161
- /* eslint-disable-next-line max-len */
19162
19295
  queryParams[Param.DataPanelCustomGroupsAccordionInitialState] = dataPanelCustomGroupsAccordionInitialState;
19163
19296
  }
19164
19297
  else {
19165
- /* eslint-disable-next-line max-len */
19166
19298
  queryParams[Param.DataPanelCustomGroupsAccordionInitialState] = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL;
19167
19299
  }
19300
+ return queryParams;
19301
+ }
19302
+ getEmbedParams() {
19303
+ const { runtimeParameters, runtimeFilters, excludeRuntimeParametersfromURL, excludeRuntimeFiltersfromURL, } = this.viewConfig;
19304
+ const queryParams = this.getEmbedParamsObject();
19168
19305
  let query = '';
19169
19306
  const queryParamsString = getQueryParamString(queryParams, true);
19170
19307
  if (queryParamsString) {
@@ -19397,7 +19534,7 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
19397
19534
  * embedded Liveboard or visualization.
19398
19535
  */
19399
19536
  getEmbedParams() {
19400
- const { tag, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideHamburger, hideObjectSearch, hideNotification, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 = true, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, hideHomepageLeftNav = false, modularHomeExperience = false, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, enable2ColumnLayout, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false, dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, discoveryExperience, coverAndFilterOptionInPDF = false, liveboardXLSXCSVDownload = false, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, } = this.viewConfig;
19537
+ const { tag, hideTagFilterChips, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideHamburger, hideObjectSearch, hideNotification, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 = true, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, hideHomepageLeftNav = false, modularHomeExperience = false, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, enable2ColumnLayout, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false, dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, discoveryExperience, coverAndFilterOptionInPDF = false, liveboardXLSXCSVDownload = false, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, isLinkParametersEnabled, } = this.viewConfig;
19401
19538
  let params = {};
19402
19539
  params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
19403
19540
  params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
@@ -19465,6 +19602,12 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
19465
19602
  if (isPNGInScheduledEmailsEnabled !== undefined) {
19466
19603
  params[Param.isPNGInScheduledEmailsEnabled] = isPNGInScheduledEmailsEnabled;
19467
19604
  }
19605
+ if (hideTagFilterChips !== undefined) {
19606
+ params[Param.HideTagFilterChips] = hideTagFilterChips;
19607
+ }
19608
+ if (isLinkParametersEnabled !== undefined) {
19609
+ params[Param.isLinkParametersEnabled] = isLinkParametersEnabled;
19610
+ }
19468
19611
  params[Param.DataPanelV2Enabled] = dataPanelV2;
19469
19612
  params[Param.HideHomepageLeftNav] = hideHomepageLeftNav;
19470
19613
  params[Param.ModularHomeExperienceEnabled] = modularHomeExperience;
@@ -19812,9 +19955,14 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
19812
19955
  * embedded Liveboard or visualization.
19813
19956
  */
19814
19957
  getEmbedParams() {
19958
+ const params = this.getEmbedParamsObject();
19959
+ const queryParams = getQueryParamString(params, true);
19960
+ return queryParams;
19961
+ }
19962
+ getEmbedParamsObject() {
19815
19963
  let params = {};
19816
19964
  params = this.getBaseQueryParams(params);
19817
- const { enableVizTransformations, fullHeight, defaultHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, enableAskSage, enable2ColumnLayout, dataPanelV2 = true, enableCustomColumnGroups = false, oAuthPollingInterval, isForceRedirect, dataSourceId, coverAndFilterOptionInPDF = false, liveboardXLSXCSVDownload = false, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, showSpotterLimitations, } = this.viewConfig;
19965
+ const { enableVizTransformations, fullHeight, defaultHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, enableAskSage, enable2ColumnLayout, dataPanelV2 = true, enableCustomColumnGroups = false, oAuthPollingInterval, isForceRedirect, dataSourceId, coverAndFilterOptionInPDF = false, liveboardXLSXCSVDownload = false, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, showSpotterLimitations, isLinkParametersEnabled, } = this.viewConfig;
19818
19966
  const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
19819
19967
  || this.viewConfig.preventPinboardFilterRemoval;
19820
19968
  if (fullHeight === true) {
@@ -19879,6 +20027,9 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
19879
20027
  if (showSpotterLimitations !== undefined) {
19880
20028
  params[Param.ShowSpotterLimitations] = showSpotterLimitations;
19881
20029
  }
20030
+ if (isLinkParametersEnabled !== undefined) {
20031
+ params[Param.isLinkParametersEnabled] = isLinkParametersEnabled;
20032
+ }
19882
20033
  params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
19883
20034
  params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
19884
20035
  params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;
@@ -19888,8 +20039,8 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
19888
20039
  params[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
19889
20040
  params[Param.CoverAndFilterOptionInPDF] = coverAndFilterOptionInPDF;
19890
20041
  params[Param.LiveboardXLSXCSVDownload] = !!liveboardXLSXCSVDownload;
19891
- const queryParams = getQueryParamString(params, true);
19892
- return queryParams;
20042
+ getQueryParamString(params, true);
20043
+ return params;
19893
20044
  }
19894
20045
  getIframeSuffixSrc(liveboardId, vizId, activeTabId) {
19895
20046
  let suffix = `/embed/viz/${liveboardId}`;
@@ -20447,13 +20598,17 @@ let ConversationMessage$1 = class ConversationMessage extends TsEmbed {
20447
20598
  super(container, viewConfig);
20448
20599
  this.viewConfig = viewConfig;
20449
20600
  }
20450
- getIframeSrc() {
20601
+ getEmbedParamsObject() {
20451
20602
  var _a;
20452
- const { sessionId, genNo, acSessionId, acGenNo, convId, messageId, } = this.viewConfig;
20453
- const path = 'conv-assist-answer';
20454
20603
  const queryParams = this.getBaseQueryParams();
20455
20604
  queryParams[Param.HideActions] = [...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : [])];
20456
20605
  queryParams[Param.isSpotterAgentEmbed] = true;
20606
+ return queryParams;
20607
+ }
20608
+ getIframeSrc() {
20609
+ const { sessionId, genNo, acSessionId, acGenNo, convId, messageId, } = this.viewConfig;
20610
+ const path = 'conv-assist-answer';
20611
+ const queryParams = this.getEmbedParamsObject();
20457
20612
  let query = '';
20458
20613
  const queryParamsString = getQueryParamString(queryParams, true);
20459
20614
  if (queryParamsString) {
@@ -20609,9 +20764,8 @@ let SpotterEmbed$1 = class SpotterEmbed extends TsEmbed {
20609
20764
  super(container, viewConfig);
20610
20765
  this.viewConfig = viewConfig;
20611
20766
  }
20612
- getIframeSrc() {
20767
+ getEmbedParamsObject() {
20613
20768
  const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, } = this.viewConfig;
20614
- const path = 'insights/conv-assist';
20615
20769
  if (!worksheetId) {
20616
20770
  this.handleError(ERROR_MESSAGE.SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND);
20617
20771
  }
@@ -20632,6 +20786,12 @@ let SpotterEmbed$1 = class SpotterEmbed extends TsEmbed {
20632
20786
  if (!isUndefined_1(hideSampleQuestions)) {
20633
20787
  queryParams[Param.HideSampleQuestions] = !!hideSampleQuestions;
20634
20788
  }
20789
+ return queryParams;
20790
+ }
20791
+ getIframeSrc() {
20792
+ const { worksheetId, searchOptions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, } = this.viewConfig;
20793
+ const path = 'insights/conv-assist';
20794
+ const queryParams = this.getEmbedParamsObject();
20635
20795
  let query = '';
20636
20796
  const queryParamsString = getQueryParamString(queryParams, true);
20637
20797
  if (queryParamsString) {