@thoughtspot/visual-embed-sdk 1.42.0 → 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 (101) hide show
  1. package/cjs/package.json +2 -2
  2. package/cjs/src/embed/app.d.ts +20 -0
  3. package/cjs/src/embed/app.d.ts.map +1 -1
  4. package/cjs/src/embed/app.js +7 -1
  5. package/cjs/src/embed/app.js.map +1 -1
  6. package/cjs/src/embed/app.spec.js +52 -0
  7. package/cjs/src/embed/app.spec.js.map +1 -1
  8. package/cjs/src/embed/hostEventClient/host-event-client.d.ts +3 -3
  9. package/cjs/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
  10. package/cjs/src/embed/hostEventClient/host-event-client.js +6 -6
  11. package/cjs/src/embed/hostEventClient/host-event-client.js.map +1 -1
  12. package/cjs/src/embed/liveboard.d.ts.map +1 -1
  13. package/cjs/src/embed/liveboard.js +4 -1
  14. package/cjs/src/embed/liveboard.js.map +1 -1
  15. package/cjs/src/embed/liveboard.spec.js +22 -0
  16. package/cjs/src/embed/liveboard.spec.js.map +1 -1
  17. package/cjs/src/embed/ts-embed.d.ts +14 -1
  18. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  19. package/cjs/src/embed/ts-embed.js +63 -23
  20. package/cjs/src/embed/ts-embed.js.map +1 -1
  21. package/cjs/src/embed/ts-embed.spec.js +83 -0
  22. package/cjs/src/embed/ts-embed.spec.js.map +1 -1
  23. package/cjs/src/errors.d.ts +1 -0
  24. package/cjs/src/errors.d.ts.map +1 -1
  25. package/cjs/src/errors.js +1 -0
  26. package/cjs/src/errors.js.map +1 -1
  27. package/cjs/src/types.d.ts +119 -61
  28. package/cjs/src/types.d.ts.map +1 -1
  29. package/cjs/src/types.js +103 -60
  30. package/cjs/src/types.js.map +1 -1
  31. package/cjs/src/utils/processTrigger.d.ts +2 -1
  32. package/cjs/src/utils/processTrigger.d.ts.map +1 -1
  33. package/cjs/src/utils/processTrigger.js +4 -2
  34. package/cjs/src/utils/processTrigger.js.map +1 -1
  35. package/dist/{index-BpSohedu.js → index-CWQnMX2L.js} +1 -1
  36. package/dist/index-Djtv-y7A.js +7371 -0
  37. package/dist/src/embed/app.d.ts +20 -0
  38. package/dist/src/embed/app.d.ts.map +1 -1
  39. package/dist/src/embed/hostEventClient/host-event-client.d.ts +3 -3
  40. package/dist/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
  41. package/dist/src/embed/liveboard.d.ts.map +1 -1
  42. package/dist/src/embed/ts-embed.d.ts +14 -1
  43. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  44. package/dist/src/errors.d.ts +1 -0
  45. package/dist/src/errors.d.ts.map +1 -1
  46. package/dist/src/types.d.ts +119 -61
  47. package/dist/src/types.d.ts.map +1 -1
  48. package/dist/src/utils/processTrigger.d.ts +2 -1
  49. package/dist/src/utils/processTrigger.d.ts.map +1 -1
  50. package/dist/tsembed-react.es.js +191 -96
  51. package/dist/tsembed-react.js +190 -95
  52. package/dist/tsembed.es.js +191 -96
  53. package/dist/tsembed.js +190 -95
  54. package/dist/visual-embed-sdk-react-full.d.ts +153 -64
  55. package/dist/visual-embed-sdk-react.d.ts +153 -64
  56. package/dist/visual-embed-sdk.d.ts +153 -64
  57. package/lib/package.json +2 -2
  58. package/lib/src/embed/app.d.ts +20 -0
  59. package/lib/src/embed/app.d.ts.map +1 -1
  60. package/lib/src/embed/app.js +7 -1
  61. package/lib/src/embed/app.js.map +1 -1
  62. package/lib/src/embed/app.spec.js +52 -0
  63. package/lib/src/embed/app.spec.js.map +1 -1
  64. package/lib/src/embed/hostEventClient/host-event-client.d.ts +3 -3
  65. package/lib/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
  66. package/lib/src/embed/hostEventClient/host-event-client.js +6 -6
  67. package/lib/src/embed/hostEventClient/host-event-client.js.map +1 -1
  68. package/lib/src/embed/liveboard.d.ts.map +1 -1
  69. package/lib/src/embed/liveboard.js +4 -1
  70. package/lib/src/embed/liveboard.js.map +1 -1
  71. package/lib/src/embed/liveboard.spec.js +22 -0
  72. package/lib/src/embed/liveboard.spec.js.map +1 -1
  73. package/lib/src/embed/ts-embed.d.ts +14 -1
  74. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  75. package/lib/src/embed/ts-embed.js +63 -23
  76. package/lib/src/embed/ts-embed.js.map +1 -1
  77. package/lib/src/embed/ts-embed.spec.js +83 -0
  78. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  79. package/lib/src/errors.d.ts +1 -0
  80. package/lib/src/errors.d.ts.map +1 -1
  81. package/lib/src/errors.js +1 -0
  82. package/lib/src/errors.js.map +1 -1
  83. package/lib/src/types.d.ts +119 -61
  84. package/lib/src/types.d.ts.map +1 -1
  85. package/lib/src/types.js +103 -60
  86. package/lib/src/types.js.map +1 -1
  87. package/lib/src/utils/processTrigger.d.ts +2 -1
  88. package/lib/src/utils/processTrigger.d.ts.map +1 -1
  89. package/lib/src/utils/processTrigger.js +4 -2
  90. package/lib/src/utils/processTrigger.js.map +1 -1
  91. package/package.json +2 -2
  92. package/src/embed/app.spec.ts +73 -0
  93. package/src/embed/app.ts +30 -0
  94. package/src/embed/hostEventClient/host-event-client.ts +7 -3
  95. package/src/embed/liveboard.spec.ts +30 -0
  96. package/src/embed/liveboard.ts +5 -0
  97. package/src/embed/ts-embed.spec.ts +111 -0
  98. package/src/embed/ts-embed.ts +76 -25
  99. package/src/errors.ts +1 -0
  100. package/src/types.ts +119 -61
  101. package/src/utils/processTrigger.ts +5 -2
@@ -1,4 +1,4 @@
1
- /* @thoughtspot/visual-embed-sdk version 1.42.0 */
1
+ /* @thoughtspot/visual-embed-sdk version 1.42.1-HE2 */
2
2
  'use client';
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) :
@@ -636,7 +636,7 @@
636
636
  */
637
637
  EmbedEvent["Load"] = "load";
638
638
  /**
639
- * Data pertaining to an Answer or Liveboard is received.
639
+ * Data pertaining to an Answer, Liveboard or Spotter visualization is received.
640
640
  * The event payload includes the raw data of the object.
641
641
  * @return data - Answer of Liveboard data
642
642
  * @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
@@ -2007,7 +2007,7 @@
2007
2007
  * the following parameters:
2008
2008
  *
2009
2009
  * @param
2010
- * `vizId`- GUID of the saved Answer or visualization to pin to a Liveboard.
2010
+ * `vizId`- GUID of the saved Answer or Spotter visualization ID to pin to a Liveboard.
2011
2011
  * Optional when pinning a new chart or table generated from a Search query.
2012
2012
  * **Required** in Spotter Embed.
2013
2013
  * @param
@@ -2059,10 +2059,16 @@
2059
2059
  * ```
2060
2060
  * @example
2061
2061
  * ```js
2062
- * const pinResponse = await spotterEmbed.trigger(HostEvent.Pin, {
2063
- * vizId:'730496d6-6903-4601-937e-2c691821af3c'
2064
- * });
2065
- * ```
2062
+
2063
+ * // You can use the Data event dispatched on each answer creation to get the vizId and use in Pin host event.
2064
+ * let latestSpotterVizId = '';
2065
+ * spotterEmbed.on(EmbedEvent.Data, (payload) => {
2066
+ * latestSpotterVizId = payload.data.id;
2067
+ * });
2068
+ *
2069
+ * spotterEmbed.trigger(HostEvent.Pin, { vizId: latestSpotterVizId });
2070
+ * ```
2071
+ *
2066
2072
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2067
2073
  */
2068
2074
  HostEvent["Pin"] = "pin";
@@ -2137,10 +2143,15 @@
2137
2143
  * ```
2138
2144
  * @example
2139
2145
  * ```js
2140
- * spotterEmbed.trigger(HostEvent.DownloadAsPdf, {
2141
- * vizId:'730496d6-6903-4601-937e-2c691821af3c'
2142
- * });
2143
- * ```
2146
+
2147
+ * // You can use the Data event dispatched on each answer creation to get the vizId and use in DownloadAsPdf host event.
2148
+ * let latestSpotterVizId = '';
2149
+ * spotterEmbed.on(EmbedEvent.Data, (payload) => {
2150
+ * latestSpotterVizId = payload.data.id;
2151
+ * });
2152
+ *
2153
+ * spotterEmbed.trigger(HostEvent.DownloadAsPdf, { vizId: latestSpotterVizId });
2154
+ * ```
2144
2155
  *
2145
2156
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2146
2157
  */
@@ -2167,10 +2178,14 @@
2167
2178
  * ```
2168
2179
  * @example
2169
2180
  * ```js
2170
- * const pinResponse = await spotterEmbed.trigger(HostEvent.MakeACopy, {
2171
- * vizId:'730496d6-6903-4601-937e-2c691821af3c'
2172
- * });
2173
- * ```
2181
+ * // You can use the Data event dispatched on each answer creation to get the vizId and use in MakeACopy host event.
2182
+ * let latestSpotterVizId = '';
2183
+ * spotterEmbed.on(EmbedEvent.Data, (payload) => {
2184
+ * latestSpotterVizId = payload.data.id;
2185
+ * });
2186
+ *
2187
+ * spotterEmbed.trigger(HostEvent.MakeACopy, { vizId: latestSpotterVizId });
2188
+ * ```
2174
2189
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2175
2190
  */
2176
2191
  HostEvent["MakeACopy"] = "makeACopy";
@@ -2255,15 +2270,7 @@
2255
2270
  * ```
2256
2271
  * @example
2257
2272
  * ```js
2258
- * const pinResponse = await spotterEmbed.trigger(HostEvent.Edit, {
2259
- * vizId:'730496d6-6903-4601-937e-2c691821af3c'
2260
- * });
2261
- * ```
2262
- * @example
2263
- * ```js
2264
- * const editResponse = await spotterEmbed.trigger(HostEvent.Edit, {
2265
- * vizId:'730496d6-6903-4601-937e-2c691821af3c'
2266
- * });
2273
+ * spotterEmbed.trigger(HostEvent.Edit);
2267
2274
  * ```
2268
2275
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2269
2276
  */
@@ -2312,16 +2319,23 @@
2312
2319
  * );
2313
2320
  * })
2314
2321
  * ```
2315
- * @example
2322
+ * * @example
2316
2323
  * ```js
2317
- * spotterEmbed.trigger(HostEvent.GetTML, {
2318
- * vizId: '730496d6-6903-4601-937e-2c691821af3c'
2324
+
2325
+ * // You can use the Data event dispatched on each answer creation to get the vizId and use in Pin host event.
2326
+ * let latestSpotterVizId = '';
2327
+ * spotterEmbed.on(EmbedEvent.Data, (payload) => {
2328
+ * latestSpotterVizId = payload.data.id;
2329
+ * });
2330
+ *
2331
+ * spotterEmbed.trigger(HostEvent.GetTML, {
2332
+ * vizId: latestSpotterVizId
2319
2333
  * }).then((tml) => {
2320
2334
  * console.log(
2321
2335
  * tml.answer.search_query // TML representation of the search query
2322
2336
  * );
2323
2337
  * })
2324
- * ```
2338
+ * ```
2325
2339
  * @version SDK: 1.18.0 | ThoughtSpot: 8.10.0.cl, 9.0.1.sw
2326
2340
  * @important
2327
2341
  */
@@ -2385,7 +2399,7 @@
2385
2399
  /**
2386
2400
  * Trigger the **Download** action on charts in
2387
2401
  * the embedded view.
2388
- * @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
2402
+ * @param - `vizId` refers to the Visualization ID in Spotter embed and is required in Spotter embed.
2389
2403
  * @example
2390
2404
  * ```js
2391
2405
  * liveboardEmbed.trigger(HostEvent.Download, {vizId:
@@ -2395,10 +2409,14 @@
2395
2409
  * embed.trigger(HostEvent.Download)
2396
2410
  * ```
2397
2411
  * ```js
2398
- * spotterEmbed.trigger(HostEvent.Download, {
2399
- * vizId:'730496d6-6903-4601-937e-2c691821af3c'
2400
- * });
2401
- * ```
2412
+ * // You can use the Data event dispatched on each answer creation to get the vizId and use in Download host event.
2413
+ * let latestSpotterVizId = '';
2414
+ * spotterEmbed.on(EmbedEvent.Data, (payload) => {
2415
+ * latestSpotterVizId = payload.data.id;
2416
+ * });
2417
+ *
2418
+ * spotterEmbed.trigger(HostEvent.Download, { vizId: latestSpotterVizId });
2419
+ * ```
2402
2420
  * @deprecated from SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl ,9.4.1.sw
2403
2421
  * Use {@link DownloadAsPng}
2404
2422
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
@@ -2416,9 +2434,13 @@
2416
2434
  *
2417
2435
  * searchEmbed.trigger(HostEvent.DownloadAsPng)
2418
2436
  *
2419
- * spotterEmbed.trigger(HostEvent.DownloadAsPng, {
2420
- * vizId:"730496d6-6903-4601-937e-2c691821af3c"
2421
- * })
2437
+ * // You can use the Data event dispatched on each answer creation to get the vizId and use in DownloadAsPng host event.
2438
+ * let latestSpotterVizId = '';
2439
+ * spotterEmbed.on(EmbedEvent.Data, (payload) => {
2440
+ * latestSpotterVizId = payload.data.id;
2441
+ * });
2442
+ *
2443
+ * spotterEmbed.trigger(HostEvent.DownloadAsPng, { vizId: latestSpotterVizId });
2422
2444
  * ```
2423
2445
  *
2424
2446
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.1.sw
@@ -2427,7 +2449,7 @@
2427
2449
  /**
2428
2450
  * Trigger the **Download** > **CSV** action on tables in
2429
2451
  * the embedded view.
2430
- * @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
2452
+ * @param - `vizId` refers to the Visualization ID in Spotter embed and is required in Spotter embed.
2431
2453
  * @example
2432
2454
  * ```js
2433
2455
  * liveboardEmbed.trigger(HostEvent.DownloadAsCsv, {vizId:
@@ -2440,9 +2462,13 @@
2440
2462
  * searchEmbed.trigger(HostEvent.DownloadAsCsv)
2441
2463
  * ```
2442
2464
  * ```js
2443
- * spotterEmbed.trigger(HostEvent.DownloadAsCsv, {
2444
- * vizId:"730496d6-6903-4601-937e-2c691821af3c"
2445
- * })
2465
+ * // You can use the Data event dispatched on each answer creation to get the vizId and use in DownloadAsCsv host event.
2466
+ * let latestSpotterVizId = '';
2467
+ * spotterEmbed.on(EmbedEvent.Data, (payload) => {
2468
+ * latestSpotterVizId = payload.data.id;
2469
+ * });
2470
+ *
2471
+ * spotterEmbed.trigger(HostEvent.DownloadAsCsv, { vizId: latestSpotterVizId });
2446
2472
  * ```
2447
2473
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
2448
2474
  */
@@ -2450,7 +2476,7 @@
2450
2476
  /**
2451
2477
  * Trigger the **Download** > **XLSX** action on tables
2452
2478
  * in the embedded view.
2453
- * @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
2479
+ * @param - `vizId` refers to the Visualization ID in Spotter embed and is required in Spotter embed.
2454
2480
  * @example
2455
2481
  * ```js
2456
2482
  * liveboardEmbed.trigger(HostEvent.DownloadAsXlsx, {vizId:
@@ -2463,9 +2489,13 @@
2463
2489
  * searchEmbed.trigger(HostEvent.DownloadAsXlsx)
2464
2490
  * ```
2465
2491
  * ```js
2466
- * spotterEmbed.trigger(HostEvent.downloadAsXLSX, {
2467
- * vizId:"730496d6-6903-4601-937e-2c691821af3c"
2468
- * })
2492
+ * // You can use the Data event dispatched on each answer creation to get the vizId and use in DownloadAsXlsx host event.
2493
+ * let latestSpotterVizId = '';
2494
+ * spotterEmbed.on(EmbedEvent.Data, (payload) => {
2495
+ * latestSpotterVizId = payload.data.id;
2496
+ * });
2497
+ *
2498
+ * spotterEmbed.trigger(HostEvent.DownloadAsXlsx, { vizId: latestSpotterVizId });
2469
2499
  * ```
2470
2500
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
2471
2501
  */
@@ -2502,7 +2532,7 @@
2502
2532
  * ```
2503
2533
  *
2504
2534
  * ```js
2505
- * // Save an Answer in Spotter (requires vizId)
2535
+ * // Save a Visualization in Spotter (requires vizId)
2506
2536
  * spotterEmbed.trigger(HostEvent.Save, {
2507
2537
  * vizId: "730496d6-6903-4601-937e-2c691821af3c"
2508
2538
  * })
@@ -2824,11 +2854,13 @@
2824
2854
  * });
2825
2855
  *```
2826
2856
  *```js
2827
- * spotterEmbed.trigger(HostEvent.GetParameters, {
2828
- * vizId: '730496d6-6903-4601-937e-2c691821af3c'
2829
- * }).then((parameter) => {
2830
- * console.log('parameters', parameter);
2831
- * });
2857
+ * // You can use the Data event dispatched on each answer creation to get the vizId and use in GetParameters host event.
2858
+ * let latestSpotterVizId = '';
2859
+ * spotterEmbed.on(EmbedEvent.Data, (payload) => {
2860
+ * latestSpotterVizId = payload.data.id;
2861
+ * });
2862
+ *
2863
+ * spotterEmbed.trigger(HostEvent.GetParameters, { vizId: latestSpotterVizId });
2832
2864
  *```
2833
2865
  * @version SDK: 1.29.0 | ThoughtSpot: 10.1.0.cl, 10.1.0.sw
2834
2866
  */
@@ -2871,11 +2903,13 @@
2871
2903
  * ```
2872
2904
  * @example
2873
2905
  * ```js
2874
- * const saveAnswerResponse = await spotterEmbed.trigger(HostEvent.SaveAnswer, {
2875
- * vizId: '730496d6-6903-4601-937e-2c691821af3c',
2876
- * name: "Sales by states",
2877
- * description: "Total sales by states in MidWest"
2906
+ * // You can use the Data event dispatched on each answer creation to get the vizId and use in SaveAnswer host event.
2907
+ * let latestSpotterVizId = '';
2908
+ * spotterEmbed.on(EmbedEvent.Data, (payload) => {
2909
+ * latestSpotterVizId = payload.data.id;
2878
2910
  * });
2911
+ *
2912
+ * spotterEmbed.trigger(HostEvent.SaveAnswer, { vizId: latestSpotterVizId });
2879
2913
  * ```
2880
2914
  * @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
2881
2915
  */
@@ -2959,12 +2993,15 @@
2959
2993
  HostEvent["DeleteLastPrompt"] = "DeleteLastPrompt";
2960
2994
  /**
2961
2995
  * Toggle the visualization to chart or table view.
2962
- * @param - `vizId ` refers to the answer id in spotter Embed, it is required in spotter Embed.
2996
+ * @param - `vizId ` refers to the Visualization ID in Spotter embed and is required.
2963
2997
  * @example
2964
2998
  * ```js
2965
- * spotterEmbed.trigger(HostEvent.AnswerChartSwitcher, {
2966
- * vizId:'b535c760-8bbe-4e6f-bb26-af56b4129a1e'
2999
+ * let latestSpotterVizId = '';
3000
+ * spotterEmbed.on(EmbedEvent.Data, (payload) => {
3001
+ * latestSpotterVizId = payload.data.id;
2967
3002
  * });
3003
+ *
3004
+ * spotterEmbed.trigger(HostEvent.AnswerChartSwitcher, { vizId: latestSpotterVizId });
2968
3005
  *```
2969
3006
  * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
2970
3007
  */
@@ -2993,12 +3030,16 @@
2993
3030
  */
2994
3031
  HostEvent["VisibleEmbedCoordinates"] = "visibleEmbedCoordinates";
2995
3032
  /**
2996
- * Trigger the *Ask Spotter* action for visualizations
2997
- * @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
3033
+ * Trigger the *Spotter* action for visualizations present on the liveboard's vizzes.
3034
+ * @param - `vizId` refers to the Visualization ID in Spotter embed and is required.
2998
3035
  * @example
2999
3036
  * ```js
3000
- * spotterEmbed.trigger(HostEvent.AskSpotter,
3001
- * {vizId:'730496d6-6903-4601-937e-2c691821af3c'})
3037
+ * let latestSpotterVizId = '';
3038
+ * spotterEmbed.on(EmbedEvent.Data, (payload) => {
3039
+ * latestSpotterVizId = payload.data.id;
3040
+ * });
3041
+ *
3042
+ * spotterEmbed.trigger(HostEvent.AskSpotter, { vizId: latestSpotterVizId });
3002
3043
  * ```
3003
3044
  * @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
3004
3045
  */
@@ -3056,6 +3097,7 @@
3056
3097
  Param["HideResult"] = "hideResult";
3057
3098
  Param["UseLastSelectedDataSource"] = "useLastSelectedSources";
3058
3099
  Param["Tag"] = "tag";
3100
+ Param["HideTagFilterChips"] = "hideTagFilterChips";
3059
3101
  Param["AutoLogin"] = "autoLogin";
3060
3102
  Param["searchTokenString"] = "searchTokenString";
3061
3103
  Param["executeSearch"] = "executeSearch";
@@ -3160,6 +3202,7 @@
3160
3202
  Param["RootMarginForLazyLoad"] = "rootMarginForLazyLoad";
3161
3203
  Param["LiveboardXLSXCSVDownload"] = "isLiveboardXLSXCSVDownloadEnabled";
3162
3204
  Param["isPNGInScheduledEmailsEnabled"] = "isPNGInScheduledEmailsEnabled";
3205
+ Param["isLinkParametersEnabled"] = "isLinkParametersEnabled";
3163
3206
  })(Param || (Param = {}));
3164
3207
  /**
3165
3208
  * ThoughtSpot application pages include actions and menu commands
@@ -7369,6 +7412,7 @@
7369
7412
  MISSING_REPORTING_OBSERVER: 'ReportingObserver not supported',
7370
7413
  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',
7371
7414
  SPOTTER_AGENT_NOT_INITIALIZED: 'SpotterAgent not initialized',
7415
+ OFFLINE_WARNING: 'Network not Detected. Embed is offline. Please reconnect and refresh',
7372
7416
  };
7373
7417
  const CUSTOM_ACTIONS_ERROR_MESSAGE = {
7374
7418
  INVALID_ACTION_OBJECT: 'Custom Action Validation Error: Invalid action object provided',
@@ -17451,7 +17495,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
17451
17495
  return e;
17452
17496
  }
17453
17497
 
17454
- var name="@thoughtspot/visual-embed-sdk";var version$1="1.42.0";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports$1={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p tsconfig.build.json --incremental false; tsc -p tsconfig.build.json --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle-generator --config ./dts-config/dts-bundle-file.config.js","bundle-dts":"dts-bundle-generator --config ./dts-config/dts-bundle.config.js","bundle-dts-react":"dts-bundle-generator --config ./dts-config/dts-bundle-react.config.js","bundle-dts-react-full":"dts-bundle-generator --config ./dts-config/dts-bundle-react-full.config.js",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.build.json --theme typedoc-theme --json static/typedoc/typedoc.json --disableOutputCheck","test-sdk":"jest -c jest.config.sdk.js --runInBand",test:"npm run test-sdk",posttest:"cat ./coverage/sdk/lcov.info | npx coveralls-next","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest",dev:"vite -c vite.local.config.ts"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={classnames:"^2.3.1",eventemitter3:"^4.0.7",lodash:"^4.17.21","mixpanel-browser":"2.47.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1",yaml:"^2.5.1"};var devDependencies={"@mdx-js/mdx":"^1.6.22","@mdx-js/react":"^1.6.22","@react-icons/all-files":"^4.1.0","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^5.0.2","@size-limit/preset-big-lib":"^11.2.0","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^22.2.3","@types/lodash":"^4.17.0","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^8.28.0","@typescript-eslint/parser":"^8.28.0",ajv:"^8.17.1",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1","coveralls-next":"^5.0.0",crypto:"^1.0.1","current-git-branch":"^1.1.0","dts-bundle-generator":"^9.5.1",eslint:"^9.23.0","eslint-config-airbnb-base":"^15.0.0","eslint-config-prettier":"^10.1.1","eslint-import-resolver-typescript":"^4.2.5","eslint-plugin-comment-length":"2.2.1","eslint-plugin-import":"^2.31.0","eslint-plugin-jsdoc":"^50.6.9","eslint-plugin-prettier":"^5.2.5","eslint-plugin-react":"^7.37.5","eslint-plugin-react-hooks":"^5.2.0","fs-extra":"^10.0.0","gh-pages":"6.3.0",globals:"^16.0.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^2.0.0",jest:"^26.6.3","jest-fetch-mock":"^3.0.3",jsdom:"^17.0.0",prettier:"2.1.2",react:"^16.14.0","react-dom":"^16.14.0","react-resizable":"^1.11.0","react-resize-detector":"^6.6.0","react-test-renderer":"^17.0.2","react-use-flexsearch":"^0.1.1",rollup:"4.24.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^26.5.5","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","typescript-eslint":"^8.29.1","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^6.3.5"};var author="ThoughtSpot";var email="support@thoughtspot.com";var license="ThoughtSpot Development Tools End User License Agreement";var directories={lib:"lib"};var repository={type:"git",url:"git+https://github.com/thoughtspot/visual-embed-sdk.git"};var publishConfig={registry:"https://registry.npmjs.org"};var keywords=["thoughtspot","everywhere","embedded","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version$1,description:description,module:module,main:main,types:types,files:files,exports:exports$1,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.es.js",limit:"32 kB"}],scripts:scripts,peerDependencies:peerDependencies,dependencies:dependencies,devDependencies:devDependencies,author:author,email:email,license:license,directories:directories,repository:repository,publishConfig:publishConfig,keywords:keywords,bugs:bugs,homepage:homepage,globals:globals};
17498
+ 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$1={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p tsconfig.build.json --incremental false; tsc -p tsconfig.build.json --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle-generator --config ./dts-config/dts-bundle-file.config.js","bundle-dts":"dts-bundle-generator --config ./dts-config/dts-bundle.config.js","bundle-dts-react":"dts-bundle-generator --config ./dts-config/dts-bundle-react.config.js","bundle-dts-react-full":"dts-bundle-generator --config ./dts-config/dts-bundle-react-full.config.js",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.build.json --theme typedoc-theme --json static/typedoc/typedoc.json --disableOutputCheck","test-sdk":"jest -c jest.config.sdk.js --runInBand",test:"npm run test-sdk",posttest:"cat ./coverage/sdk/lcov.info | npx coveralls-next","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest",dev:"vite -c vite.local.config.ts"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={classnames:"^2.3.1",eventemitter3:"^4.0.7",lodash:"^4.17.21","mixpanel-browser":"2.47.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1",yaml:"^2.5.1"};var devDependencies={"@mdx-js/mdx":"^1.6.22","@mdx-js/react":"^1.6.22","@react-icons/all-files":"^4.1.0","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^5.0.2","@size-limit/preset-big-lib":"^11.2.0","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^22.2.3","@types/lodash":"^4.17.0","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^8.28.0","@typescript-eslint/parser":"^8.28.0",ajv:"^8.17.1",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1","coveralls-next":"^5.0.0",crypto:"^1.0.1","current-git-branch":"^1.1.0","dts-bundle-generator":"^9.5.1",eslint:"^9.23.0","eslint-config-airbnb-base":"^15.0.0","eslint-config-prettier":"^10.1.1","eslint-import-resolver-typescript":"^4.2.5","eslint-plugin-comment-length":"2.2.1","eslint-plugin-import":"^2.31.0","eslint-plugin-jsdoc":"^50.6.9","eslint-plugin-prettier":"^5.2.5","eslint-plugin-react":"^7.37.5","eslint-plugin-react-hooks":"^5.2.0","fs-extra":"^10.0.0","gh-pages":"6.3.0",globals:"^16.0.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^2.0.0",jest:"^26.6.3","jest-fetch-mock":"^3.0.3",jsdom:"^17.0.0",prettier:"2.1.2",react:"^16.14.0","react-dom":"^16.14.0","react-resizable":"^1.11.0","react-resize-detector":"^6.6.0","react-test-renderer":"^17.0.2","react-use-flexsearch":"^0.1.1",rollup:"4.24.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^26.5.5","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","typescript-eslint":"^8.29.1","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^6.3.5"};var author="ThoughtSpot";var email="support@thoughtspot.com";var license="ThoughtSpot Development Tools End User License Agreement";var directories={lib:"lib"};var repository={type:"git",url:"git+https://github.com/thoughtspot/visual-embed-sdk.git"};var publishConfig={registry:"https://registry.npmjs.org"};var keywords=["thoughtspot","everywhere","embedded","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version$1,description:description,module:module,main:main,types:types,files:files,exports:exports$1,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.es.js",limit:"32 kB"}],scripts:scripts,peerDependencies:peerDependencies,dependencies:dependencies,devDependencies:devDependencies,author:author,email:email,license:license,directories:directories,repository:repository,publishConfig:publishConfig,keywords:keywords,bugs:bugs,homepage:homepage,globals:globals};
17455
17499
 
17456
17500
  /**
17457
17501
  * Reloads the ThoughtSpot iframe.
@@ -17470,6 +17514,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
17470
17514
  * @param message
17471
17515
  * @param message.type
17472
17516
  * @param message.data
17517
+ * @param message.context
17473
17518
  * @param thoughtSpotHost
17474
17519
  * @param channel
17475
17520
  */
@@ -17484,8 +17529,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
17484
17529
  * @param messageType
17485
17530
  * @param thoughtSpotHost
17486
17531
  * @param data
17532
+ * @param context
17487
17533
  */
17488
- function processTrigger(iFrame, messageType, thoughtSpotHost, data) {
17534
+ function processTrigger(iFrame, messageType, thoughtSpotHost, data, context) {
17489
17535
  return new Promise((res, rej) => {
17490
17536
  var _a;
17491
17537
  if (messageType === exports.HostEvent.Reload) {
@@ -17519,7 +17565,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
17519
17565
  channel.port1.close();
17520
17566
  res(new Error(ERROR_MESSAGE.TRIGGER_TIMED_OUT));
17521
17567
  }, TRIGGER_TIMEOUT);
17522
- return postIframeMessage(iFrame, { type: messageType, data }, thoughtSpotHost, channel);
17568
+ return postIframeMessage(iFrame, { type: messageType, data, context }, thoughtSpotHost, channel);
17523
17569
  });
17524
17570
  }
17525
17571
 
@@ -17543,12 +17589,12 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
17543
17589
  * @param {any} data Data to send with the host event
17544
17590
  * @returns {Promise<any>} - the response from the process trigger
17545
17591
  */
17546
- async processTrigger(message, data) {
17592
+ async processTrigger(message, data, context) {
17547
17593
  if (!this.iFrame) {
17548
17594
  throw new Error('Iframe element is not set');
17549
17595
  }
17550
17596
  const thoughtspotHost = getEmbedConfig().thoughtSpotHost;
17551
- return processTrigger(this.iFrame, message, thoughtspotHost, data);
17597
+ return processTrigger(this.iFrame, message, thoughtspotHost, data, context);
17552
17598
  }
17553
17599
  async handleHostEventWithParam(apiName, parameters) {
17554
17600
  var _a, _b, _c, _d;
@@ -17567,8 +17613,8 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
17567
17613
  }
17568
17614
  return { ...response.value };
17569
17615
  }
17570
- async hostEventFallback(hostEvent, data) {
17571
- return this.processTrigger(hostEvent, data);
17616
+ async hostEventFallback(hostEvent, data, context) {
17617
+ return this.processTrigger(hostEvent, data, context);
17572
17618
  }
17573
17619
  /**
17574
17620
  * Setter for the iframe element used for host events
@@ -17612,14 +17658,14 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
17612
17658
  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,
17613
17659
  };
17614
17660
  }
17615
- async triggerHostEvent(hostEvent, payload) {
17661
+ async triggerHostEvent(hostEvent, payload, context) {
17616
17662
  switch (hostEvent) {
17617
17663
  case exports.HostEvent.Pin:
17618
17664
  return this.handlePinEvent(payload);
17619
17665
  case exports.HostEvent.SaveAnswer:
17620
17666
  return this.handleSaveAnswerEvent(payload);
17621
17667
  default:
17622
- return this.hostEventFallback(hostEvent, payload);
17668
+ return this.hostEventFallback(hostEvent, payload, context);
17623
17669
  }
17624
17670
  }
17625
17671
  }
@@ -17921,39 +17967,69 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
17921
17967
  return eventData;
17922
17968
  }
17923
17969
  /**
17924
- * Adds a global event listener to window for "message" events.
17925
- * ThoughtSpot detects if a particular event is targeted to this
17926
- * embed instance through an identifier contained in the payload,
17927
- * and executes the registered callbacks accordingly.
17970
+ * Subscribe to network events (online/offline) that should
17971
+ * work regardless of auth status
17928
17972
  */
17929
- subscribeToEvents() {
17930
- this.unsubscribeToEvents();
17931
- const messageEventListener = (event) => {
17932
- const eventType = this.getEventType(event);
17933
- const eventPort = this.getEventPort(event);
17934
- const eventData = this.formatEventData(event, eventType);
17935
- if (event.source === this.iFrame.contentWindow) {
17936
- this.executeCallbacks(eventType, processEventData(eventType, eventData, this.thoughtSpotHost, this.isPreRendered ? this.preRenderWrapper : this.el), eventPort);
17937
- }
17938
- };
17939
- window.addEventListener('message', messageEventListener);
17973
+ subscribeToNetworkEvents() {
17974
+ this.unsubscribeToNetworkEvents();
17940
17975
  const onlineEventListener = (e) => {
17941
17976
  this.trigger(exports.HostEvent.Reload);
17942
17977
  };
17943
17978
  window.addEventListener('online', onlineEventListener);
17944
17979
  const offlineEventListener = (e) => {
17945
- const offlineWarning = 'Network not Detected. Embed is offline. Please reconnect and refresh';
17980
+ const offlineWarning = ERROR_MESSAGE.OFFLINE_WARNING;
17946
17981
  this.executeCallbacks(exports.EmbedEvent.Error, {
17947
17982
  offlineWarning,
17948
17983
  });
17949
17984
  logger$3.warn(offlineWarning);
17950
17985
  };
17951
17986
  window.addEventListener('offline', offlineEventListener);
17952
- this.subscribedListeners = {
17953
- message: messageEventListener,
17954
- online: onlineEventListener,
17955
- offline: offlineEventListener,
17987
+ this.subscribedListeners.online = onlineEventListener;
17988
+ this.subscribedListeners.offline = offlineEventListener;
17989
+ }
17990
+ /**
17991
+ * Subscribe to message events that depend on successful iframe setup
17992
+ */
17993
+ subscribeToMessageEvents() {
17994
+ this.unsubscribeToMessageEvents();
17995
+ const messageEventListener = (event) => {
17996
+ const eventType = this.getEventType(event);
17997
+ const eventPort = this.getEventPort(event);
17998
+ const eventData = this.formatEventData(event, eventType);
17999
+ if (event.source === this.iFrame.contentWindow) {
18000
+ this.executeCallbacks(eventType, processEventData(eventType, eventData, this.thoughtSpotHost, this.isPreRendered ? this.preRenderWrapper : this.el), eventPort);
18001
+ }
17956
18002
  };
18003
+ window.addEventListener('message', messageEventListener);
18004
+ this.subscribedListeners.message = messageEventListener;
18005
+ }
18006
+ /**
18007
+ * Adds event listeners for both network and message events.
18008
+ * This maintains backward compatibility with the existing method.
18009
+ * Adds a global event listener to window for "message" events.
18010
+ * ThoughtSpot detects if a particular event is targeted to this
18011
+ * embed instance through an identifier contained in the payload,
18012
+ * and executes the registered callbacks accordingly.
18013
+ */
18014
+ subscribeToEvents() {
18015
+ this.subscribeToNetworkEvents();
18016
+ this.subscribeToMessageEvents();
18017
+ }
18018
+ unsubscribeToNetworkEvents() {
18019
+ if (this.subscribedListeners.online) {
18020
+ window.removeEventListener('online', this.subscribedListeners.online);
18021
+ delete this.subscribedListeners.online;
18022
+ }
18023
+ if (this.subscribedListeners.offline) {
18024
+ window.removeEventListener('offline', this.subscribedListeners.offline);
18025
+ delete this.subscribedListeners.offline;
18026
+ }
18027
+ }
18028
+ unsubscribeToMessageEvents() {
18029
+ if (this.subscribedListeners.message) {
18030
+ window.removeEventListener('message', this.subscribedListeners.message);
18031
+ delete this.subscribedListeners.message;
18032
+ }
17957
18033
  }
17958
18034
  unsubscribeToEvents() {
17959
18035
  Object.keys(this.subscribedListeners).forEach((key) => {
@@ -18254,6 +18330,8 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
18254
18330
  type: exports.EmbedEvent.Init,
18255
18331
  });
18256
18332
  uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_RENDER_START);
18333
+ // Always subscribe to network events, regardless of auth status
18334
+ this.subscribeToNetworkEvents();
18257
18335
  return (_a = getAuthPromise()) === null || _a === void 0 ? void 0 : _a.then((isLoggedIn) => {
18258
18336
  if (!isLoggedIn) {
18259
18337
  this.handleInsertionIntoDOM(this.embedConfig.loginFailedMessage);
@@ -18296,7 +18374,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
18296
18374
  el.remove();
18297
18375
  });
18298
18376
  }
18299
- this.subscribeToEvents();
18377
+ // Subscribe to message events only after successful
18378
+ // auth and iframe setup
18379
+ this.subscribeToMessageEvents();
18300
18380
  }).catch((error) => {
18301
18381
  nextInQueue();
18302
18382
  uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_RENDER_FAILED, {
@@ -18606,7 +18686,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
18606
18686
  * @param {any} data The payload to send with the message
18607
18687
  * @returns A promise that resolves with the response from the embedded app
18608
18688
  */
18609
- async trigger(messageType, data = {}) {
18689
+ async trigger(messageType, data = {}, context = {}) {
18610
18690
  uploadMixpanelEvent(`${MIXPANEL_EVENT.VISUAL_SDK_TRIGGER}-${messageType}`);
18611
18691
  if (!this.isRendered) {
18612
18692
  this.handleError('Please call render before triggering events');
@@ -18616,8 +18696,14 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
18616
18696
  this.handleError('Host event type is undefined');
18617
18697
  return null;
18618
18698
  }
18699
+ // Check if iframe exists before triggering -
18700
+ // this prevents the error when auth fails
18701
+ if (!this.iFrame) {
18702
+ logger$3.debug(`Cannot trigger ${messageType} - iframe not available (likely due to auth failure)`);
18703
+ return null;
18704
+ }
18619
18705
  // send an empty object, this is needed for liveboard default handlers
18620
- return this.hostEventClient.triggerHostEvent(messageType, data);
18706
+ return this.hostEventClient.triggerHostEvent(messageType, data, context);
18621
18707
  }
18622
18708
  /**
18623
18709
  * Triggers an event to the embedded app, skipping the UI flow.
@@ -19470,7 +19556,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
19470
19556
  * embedded Liveboard or visualization.
19471
19557
  */
19472
19558
  getEmbedParams() {
19473
- 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;
19559
+ 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;
19474
19560
  let params = {};
19475
19561
  params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
19476
19562
  params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
@@ -19538,6 +19624,12 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
19538
19624
  if (isPNGInScheduledEmailsEnabled !== undefined) {
19539
19625
  params[Param.isPNGInScheduledEmailsEnabled] = isPNGInScheduledEmailsEnabled;
19540
19626
  }
19627
+ if (hideTagFilterChips !== undefined) {
19628
+ params[Param.HideTagFilterChips] = hideTagFilterChips;
19629
+ }
19630
+ if (isLinkParametersEnabled !== undefined) {
19631
+ params[Param.isLinkParametersEnabled] = isLinkParametersEnabled;
19632
+ }
19541
19633
  params[Param.DataPanelV2Enabled] = dataPanelV2;
19542
19634
  params[Param.HideHomepageLeftNav] = hideHomepageLeftNav;
19543
19635
  params[Param.ModularHomeExperienceEnabled] = modularHomeExperience;
@@ -19892,7 +19984,7 @@ query GetEurekaVizSnapshots(
19892
19984
  getEmbedParamsObject() {
19893
19985
  let params = {};
19894
19986
  params = this.getBaseQueryParams(params);
19895
- 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;
19987
+ 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;
19896
19988
  const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
19897
19989
  || this.viewConfig.preventPinboardFilterRemoval;
19898
19990
  if (fullHeight === true) {
@@ -19957,6 +20049,9 @@ query GetEurekaVizSnapshots(
19957
20049
  if (showSpotterLimitations !== undefined) {
19958
20050
  params[Param.ShowSpotterLimitations] = showSpotterLimitations;
19959
20051
  }
20052
+ if (isLinkParametersEnabled !== undefined) {
20053
+ params[Param.isLinkParametersEnabled] = isLinkParametersEnabled;
20054
+ }
19960
20055
  params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
19961
20056
  params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
19962
20057
  params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;