@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.
- package/cjs/package.json +9 -9
- package/cjs/src/css-variables.d.ts +52 -14
- package/cjs/src/css-variables.d.ts.map +1 -1
- package/cjs/src/embed/app.d.ts +20 -0
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +7 -1
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/app.spec.js +52 -0
- package/cjs/src/embed/app.spec.js.map +1 -1
- package/cjs/src/embed/bodyless-conversation.d.ts +1 -0
- package/cjs/src/embed/bodyless-conversation.d.ts.map +1 -1
- package/cjs/src/embed/bodyless-conversation.js +7 -3
- package/cjs/src/embed/bodyless-conversation.js.map +1 -1
- package/cjs/src/embed/conversation.d.ts +1 -0
- package/cjs/src/embed/conversation.d.ts.map +1 -1
- package/cjs/src/embed/conversation.js +7 -2
- package/cjs/src/embed/conversation.js.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.d.ts +3 -3
- package/cjs/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.js +6 -6
- package/cjs/src/embed/hostEventClient/host-event-client.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts +1 -0
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +10 -2
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/liveboard.spec.js +35 -0
- package/cjs/src/embed/liveboard.spec.js.map +1 -1
- package/cjs/src/embed/sage.d.ts +1 -0
- package/cjs/src/embed/sage.d.ts.map +1 -1
- package/cjs/src/embed/sage.js +10 -6
- package/cjs/src/embed/sage.js.map +1 -1
- package/cjs/src/embed/search-bar.d.ts +1 -0
- package/cjs/src/embed/search-bar.d.ts.map +1 -1
- package/cjs/src/embed/search-bar.js +11 -7
- package/cjs/src/embed/search-bar.js.map +1 -1
- package/cjs/src/embed/search.d.ts +1 -0
- package/cjs/src/embed/search.d.ts.map +1 -1
- package/cjs/src/embed/search.js +7 -8
- package/cjs/src/embed/search.js.map +1 -1
- package/cjs/src/embed/ts-embed.d.ts +20 -5
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +84 -31
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/embed/ts-embed.spec.js +83 -0
- package/cjs/src/embed/ts-embed.spec.js.map +1 -1
- package/cjs/src/errors.d.ts +1 -0
- package/cjs/src/errors.d.ts.map +1 -1
- package/cjs/src/errors.js +1 -0
- package/cjs/src/errors.js.map +1 -1
- package/cjs/src/react/all-types-export.spec.js +1 -1
- package/cjs/src/react/all-types-export.spec.js.map +1 -1
- package/cjs/src/react/util.js.map +1 -1
- package/cjs/src/react/util.spec.d.ts +2 -0
- package/cjs/src/react/util.spec.d.ts.map +1 -0
- package/cjs/src/react/util.spec.js +78 -0
- package/cjs/src/react/util.spec.js.map +1 -0
- package/cjs/src/types.d.ts +153 -64
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +136 -62
- package/cjs/src/types.js.map +1 -1
- package/cjs/src/utils/processTrigger.d.ts +2 -1
- package/cjs/src/utils/processTrigger.d.ts.map +1 -1
- package/cjs/src/utils/processTrigger.js +4 -2
- package/cjs/src/utils/processTrigger.js.map +1 -1
- package/dist/{index-DQueHwfQ.js → index-CWQnMX2L.js} +1 -1
- package/dist/index-Djtv-y7A.js +7371 -0
- package/dist/src/css-variables.d.ts +52 -14
- package/dist/src/css-variables.d.ts.map +1 -1
- package/dist/src/embed/app.d.ts +20 -0
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/bodyless-conversation.d.ts +1 -0
- package/dist/src/embed/bodyless-conversation.d.ts.map +1 -1
- package/dist/src/embed/conversation.d.ts +1 -0
- package/dist/src/embed/conversation.d.ts.map +1 -1
- package/dist/src/embed/hostEventClient/host-event-client.d.ts +3 -3
- package/dist/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts +1 -0
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/embed/sage.d.ts +1 -0
- package/dist/src/embed/sage.d.ts.map +1 -1
- package/dist/src/embed/search-bar.d.ts +1 -0
- package/dist/src/embed/search-bar.d.ts.map +1 -1
- package/dist/src/embed/search.d.ts +1 -0
- package/dist/src/embed/search.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.d.ts +20 -5
- package/dist/src/embed/ts-embed.d.ts.map +1 -1
- package/dist/src/errors.d.ts +1 -0
- package/dist/src/errors.d.ts.map +1 -1
- package/dist/src/react/util.spec.d.ts +2 -0
- package/dist/src/react/util.spec.d.ts.map +1 -0
- package/dist/src/types.d.ts +153 -64
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/processTrigger.d.ts +2 -1
- package/dist/src/utils/processTrigger.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +294 -134
- package/dist/tsembed-react.js +293 -133
- package/dist/tsembed.es.js +294 -134
- package/dist/tsembed.js +293 -133
- package/dist/visual-embed-sdk-react-full.d.ts +9401 -9916
- package/dist/visual-embed-sdk-react.d.ts +9273 -9922
- package/dist/visual-embed-sdk.d.ts +9440 -9533
- package/lib/package.json +9 -9
- package/lib/src/css-variables.d.ts +52 -14
- package/lib/src/css-variables.d.ts.map +1 -1
- package/lib/src/embed/app.d.ts +20 -0
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +7 -1
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/app.spec.js +52 -0
- package/lib/src/embed/app.spec.js.map +1 -1
- package/lib/src/embed/bodyless-conversation.d.ts +1 -0
- package/lib/src/embed/bodyless-conversation.d.ts.map +1 -1
- package/lib/src/embed/bodyless-conversation.js +7 -3
- package/lib/src/embed/bodyless-conversation.js.map +1 -1
- package/lib/src/embed/conversation.d.ts +1 -0
- package/lib/src/embed/conversation.d.ts.map +1 -1
- package/lib/src/embed/conversation.js +7 -2
- package/lib/src/embed/conversation.js.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.d.ts +3 -3
- package/lib/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.js +6 -6
- package/lib/src/embed/hostEventClient/host-event-client.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts +1 -0
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +10 -2
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +35 -0
- package/lib/src/embed/liveboard.spec.js.map +1 -1
- package/lib/src/embed/sage.d.ts +1 -0
- package/lib/src/embed/sage.d.ts.map +1 -1
- package/lib/src/embed/sage.js +10 -6
- package/lib/src/embed/sage.js.map +1 -1
- package/lib/src/embed/search-bar.d.ts +1 -0
- package/lib/src/embed/search-bar.d.ts.map +1 -1
- package/lib/src/embed/search-bar.js +11 -7
- package/lib/src/embed/search-bar.js.map +1 -1
- package/lib/src/embed/search.d.ts +1 -0
- package/lib/src/embed/search.d.ts.map +1 -1
- package/lib/src/embed/search.js +7 -8
- package/lib/src/embed/search.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts +20 -5
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +84 -31
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/embed/ts-embed.spec.js +83 -0
- package/lib/src/embed/ts-embed.spec.js.map +1 -1
- package/lib/src/errors.d.ts +1 -0
- package/lib/src/errors.d.ts.map +1 -1
- package/lib/src/errors.js +1 -0
- package/lib/src/errors.js.map +1 -1
- package/lib/src/react/all-types-export.spec.js +1 -1
- package/lib/src/react/all-types-export.spec.js.map +1 -1
- package/lib/src/react/util.js.map +1 -1
- package/lib/src/react/util.spec.d.ts +2 -0
- package/lib/src/react/util.spec.d.ts.map +1 -0
- package/lib/src/react/util.spec.js +76 -0
- package/lib/src/react/util.spec.js.map +1 -0
- package/lib/src/types.d.ts +153 -64
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +136 -62
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils/processTrigger.d.ts +2 -1
- package/lib/src/utils/processTrigger.d.ts.map +1 -1
- package/lib/src/utils/processTrigger.js +4 -2
- package/lib/src/utils/processTrigger.js.map +1 -1
- package/package.json +9 -9
- package/src/css-variables.ts +53 -16
- package/src/embed/app.spec.ts +73 -0
- package/src/embed/app.ts +30 -0
- package/src/embed/bodyless-conversation.ts +8 -3
- package/src/embed/conversation.ts +17 -2
- package/src/embed/hostEventClient/host-event-client.ts +7 -3
- package/src/embed/liveboard.spec.ts +44 -0
- package/src/embed/liveboard.ts +12 -1
- package/src/embed/sage.ts +14 -9
- package/src/embed/search-bar.tsx +14 -7
- package/src/embed/search.ts +18 -7
- package/src/embed/ts-embed.spec.ts +112 -1
- package/src/embed/ts-embed.ts +104 -37
- package/src/errors.ts +1 -0
- package/src/react/all-types-export.spec.ts +1 -1
- package/src/react/util.spec.tsx +88 -0
- package/src/react/util.ts +3 -3
- package/src/types.ts +211 -121
- package/src/utils/processTrigger.ts +5 -2
- package/lib/src/visual-embed-sdk.d.ts +0 -9779
package/dist/tsembed-react.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @thoughtspot/visual-embed-sdk version 1.
|
|
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
|
|
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
|
-
|
|
2063
|
-
|
|
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
|
-
|
|
2141
|
-
|
|
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
|
-
|
|
2171
|
-
|
|
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
|
-
*
|
|
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
|
-
|
|
2318
|
-
|
|
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
|
|
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
|
-
|
|
2399
|
-
|
|
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
|
-
|
|
2420
|
-
|
|
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
|
|
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
|
-
|
|
2444
|
-
|
|
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
|
|
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
|
-
|
|
2467
|
-
|
|
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
|
*/
|
|
@@ -2484,21 +2514,42 @@
|
|
|
2484
2514
|
*/
|
|
2485
2515
|
HostEvent["Share"] = "share";
|
|
2486
2516
|
/**
|
|
2487
|
-
* Trigger the **Save**
|
|
2517
|
+
* Trigger the **Save** action on a Liveboard, Answer, or Spotter.
|
|
2488
2518
|
* Saves the changes.
|
|
2489
|
-
*
|
|
2519
|
+
*
|
|
2520
|
+
* @param - `vizId` refers to the Spotter Visualization Id used in Spotter embed.
|
|
2521
|
+
* It is required and can be retrieved from the data embed event.
|
|
2522
|
+
*
|
|
2490
2523
|
* @example
|
|
2491
2524
|
* ```js
|
|
2525
|
+
* // Save changes in a Liveboard
|
|
2492
2526
|
* liveboardEmbed.trigger(HostEvent.Save)
|
|
2493
2527
|
* ```
|
|
2528
|
+
*
|
|
2494
2529
|
* ```js
|
|
2530
|
+
* // Save the current Answer in Search embed
|
|
2495
2531
|
* searchEmbed.trigger(HostEvent.Save)
|
|
2496
2532
|
* ```
|
|
2533
|
+
*
|
|
2497
2534
|
* ```js
|
|
2535
|
+
* // Save a Visualization in Spotter (requires vizId)
|
|
2498
2536
|
* spotterEmbed.trigger(HostEvent.Save, {
|
|
2499
|
-
*
|
|
2537
|
+
* vizId: "730496d6-6903-4601-937e-2c691821af3c"
|
|
2500
2538
|
* })
|
|
2501
2539
|
* ```
|
|
2540
|
+
*
|
|
2541
|
+
* ```js
|
|
2542
|
+
* // How to get the vizId in Spotter?
|
|
2543
|
+
*
|
|
2544
|
+
* // You can use the Data event dispatched on each answer creation to get the vizId.
|
|
2545
|
+
* let latestSpotterVizId = '';
|
|
2546
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
2547
|
+
* latestSpotterVizId = payload.data.id;
|
|
2548
|
+
* });
|
|
2549
|
+
*
|
|
2550
|
+
* spotterEmbed.trigger(HostEvent.Save, { vizId: latestSpotterVizId });
|
|
2551
|
+
* ```
|
|
2552
|
+
*
|
|
2502
2553
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
2503
2554
|
*/
|
|
2504
2555
|
HostEvent["Save"] = "save";
|
|
@@ -2803,11 +2854,13 @@
|
|
|
2803
2854
|
* });
|
|
2804
2855
|
*```
|
|
2805
2856
|
*```js
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
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 });
|
|
2811
2864
|
*```
|
|
2812
2865
|
* @version SDK: 1.29.0 | ThoughtSpot: 10.1.0.cl, 10.1.0.sw
|
|
2813
2866
|
*/
|
|
@@ -2850,11 +2903,13 @@
|
|
|
2850
2903
|
* ```
|
|
2851
2904
|
* @example
|
|
2852
2905
|
* ```js
|
|
2853
|
-
*
|
|
2854
|
-
*
|
|
2855
|
-
*
|
|
2856
|
-
*
|
|
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;
|
|
2857
2910
|
* });
|
|
2911
|
+
*
|
|
2912
|
+
* spotterEmbed.trigger(HostEvent.SaveAnswer, { vizId: latestSpotterVizId });
|
|
2858
2913
|
* ```
|
|
2859
2914
|
* @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
|
|
2860
2915
|
*/
|
|
@@ -2938,12 +2993,15 @@
|
|
|
2938
2993
|
HostEvent["DeleteLastPrompt"] = "DeleteLastPrompt";
|
|
2939
2994
|
/**
|
|
2940
2995
|
* Toggle the visualization to chart or table view.
|
|
2941
|
-
* @param - `vizId ` refers to the
|
|
2996
|
+
* @param - `vizId ` refers to the Visualization ID in Spotter embed and is required.
|
|
2942
2997
|
* @example
|
|
2943
2998
|
* ```js
|
|
2944
|
-
*
|
|
2945
|
-
*
|
|
2999
|
+
* let latestSpotterVizId = '';
|
|
3000
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
3001
|
+
* latestSpotterVizId = payload.data.id;
|
|
2946
3002
|
* });
|
|
3003
|
+
*
|
|
3004
|
+
* spotterEmbed.trigger(HostEvent.AnswerChartSwitcher, { vizId: latestSpotterVizId });
|
|
2947
3005
|
*```
|
|
2948
3006
|
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
2949
3007
|
*/
|
|
@@ -2972,16 +3030,30 @@
|
|
|
2972
3030
|
*/
|
|
2973
3031
|
HostEvent["VisibleEmbedCoordinates"] = "visibleEmbedCoordinates";
|
|
2974
3032
|
/**
|
|
2975
|
-
* Trigger the *
|
|
2976
|
-
* @param - `vizId` refers to the
|
|
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.
|
|
2977
3035
|
* @example
|
|
2978
3036
|
* ```js
|
|
2979
|
-
*
|
|
2980
|
-
* {
|
|
3037
|
+
* let latestSpotterVizId = '';
|
|
3038
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
3039
|
+
* latestSpotterVizId = payload.data.id;
|
|
3040
|
+
* });
|
|
3041
|
+
*
|
|
3042
|
+
* spotterEmbed.trigger(HostEvent.AskSpotter, { vizId: latestSpotterVizId });
|
|
2981
3043
|
* ```
|
|
2982
3044
|
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
2983
3045
|
*/
|
|
2984
3046
|
HostEvent["AskSpotter"] = "AskSpotter";
|
|
3047
|
+
/**
|
|
3048
|
+
* @hidden
|
|
3049
|
+
* Triggers the update of the embed params.
|
|
3050
|
+
*
|
|
3051
|
+
* @example
|
|
3052
|
+
* ```js
|
|
3053
|
+
* liveboardEmbed.trigger(HostEvent.UpdateEmbedParams, viewConfig);
|
|
3054
|
+
* ```
|
|
3055
|
+
*/
|
|
3056
|
+
HostEvent["UpdateEmbedParams"] = "updateEmbedParams";
|
|
2985
3057
|
})(exports.HostEvent || (exports.HostEvent = {}));
|
|
2986
3058
|
/**
|
|
2987
3059
|
* The different visual modes that the data sources panel within
|
|
@@ -3025,6 +3097,7 @@
|
|
|
3025
3097
|
Param["HideResult"] = "hideResult";
|
|
3026
3098
|
Param["UseLastSelectedDataSource"] = "useLastSelectedSources";
|
|
3027
3099
|
Param["Tag"] = "tag";
|
|
3100
|
+
Param["HideTagFilterChips"] = "hideTagFilterChips";
|
|
3028
3101
|
Param["AutoLogin"] = "autoLogin";
|
|
3029
3102
|
Param["searchTokenString"] = "searchTokenString";
|
|
3030
3103
|
Param["executeSearch"] = "executeSearch";
|
|
@@ -3129,6 +3202,7 @@
|
|
|
3129
3202
|
Param["RootMarginForLazyLoad"] = "rootMarginForLazyLoad";
|
|
3130
3203
|
Param["LiveboardXLSXCSVDownload"] = "isLiveboardXLSXCSVDownloadEnabled";
|
|
3131
3204
|
Param["isPNGInScheduledEmailsEnabled"] = "isPNGInScheduledEmailsEnabled";
|
|
3205
|
+
Param["isLinkParametersEnabled"] = "isLinkParametersEnabled";
|
|
3132
3206
|
})(Param || (Param = {}));
|
|
3133
3207
|
/**
|
|
3134
3208
|
* ThoughtSpot application pages include actions and menu commands
|
|
@@ -7338,6 +7412,7 @@
|
|
|
7338
7412
|
MISSING_REPORTING_OBSERVER: 'ReportingObserver not supported',
|
|
7339
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',
|
|
7340
7414
|
SPOTTER_AGENT_NOT_INITIALIZED: 'SpotterAgent not initialized',
|
|
7415
|
+
OFFLINE_WARNING: 'Network not Detected. Embed is offline. Please reconnect and refresh',
|
|
7341
7416
|
};
|
|
7342
7417
|
const CUSTOM_ACTIONS_ERROR_MESSAGE = {
|
|
7343
7418
|
INVALID_ACTION_OBJECT: 'Custom Action Validation Error: Invalid action object provided',
|
|
@@ -17420,7 +17495,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
17420
17495
|
return e;
|
|
17421
17496
|
}
|
|
17422
17497
|
|
|
17423
|
-
var name="@thoughtspot/visual-embed-sdk";var version$1="1.
|
|
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};
|
|
17424
17499
|
|
|
17425
17500
|
/**
|
|
17426
17501
|
* Reloads the ThoughtSpot iframe.
|
|
@@ -17439,6 +17514,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
17439
17514
|
* @param message
|
|
17440
17515
|
* @param message.type
|
|
17441
17516
|
* @param message.data
|
|
17517
|
+
* @param message.context
|
|
17442
17518
|
* @param thoughtSpotHost
|
|
17443
17519
|
* @param channel
|
|
17444
17520
|
*/
|
|
@@ -17453,8 +17529,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
17453
17529
|
* @param messageType
|
|
17454
17530
|
* @param thoughtSpotHost
|
|
17455
17531
|
* @param data
|
|
17532
|
+
* @param context
|
|
17456
17533
|
*/
|
|
17457
|
-
function processTrigger(iFrame, messageType, thoughtSpotHost, data) {
|
|
17534
|
+
function processTrigger(iFrame, messageType, thoughtSpotHost, data, context) {
|
|
17458
17535
|
return new Promise((res, rej) => {
|
|
17459
17536
|
var _a;
|
|
17460
17537
|
if (messageType === exports.HostEvent.Reload) {
|
|
@@ -17488,7 +17565,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
17488
17565
|
channel.port1.close();
|
|
17489
17566
|
res(new Error(ERROR_MESSAGE.TRIGGER_TIMED_OUT));
|
|
17490
17567
|
}, TRIGGER_TIMEOUT);
|
|
17491
|
-
return postIframeMessage(iFrame, { type: messageType, data }, thoughtSpotHost, channel);
|
|
17568
|
+
return postIframeMessage(iFrame, { type: messageType, data, context }, thoughtSpotHost, channel);
|
|
17492
17569
|
});
|
|
17493
17570
|
}
|
|
17494
17571
|
|
|
@@ -17512,12 +17589,12 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
17512
17589
|
* @param {any} data Data to send with the host event
|
|
17513
17590
|
* @returns {Promise<any>} - the response from the process trigger
|
|
17514
17591
|
*/
|
|
17515
|
-
async processTrigger(message, data) {
|
|
17592
|
+
async processTrigger(message, data, context) {
|
|
17516
17593
|
if (!this.iFrame) {
|
|
17517
17594
|
throw new Error('Iframe element is not set');
|
|
17518
17595
|
}
|
|
17519
17596
|
const thoughtspotHost = getEmbedConfig().thoughtSpotHost;
|
|
17520
|
-
return processTrigger(this.iFrame, message, thoughtspotHost, data);
|
|
17597
|
+
return processTrigger(this.iFrame, message, thoughtspotHost, data, context);
|
|
17521
17598
|
}
|
|
17522
17599
|
async handleHostEventWithParam(apiName, parameters) {
|
|
17523
17600
|
var _a, _b, _c, _d;
|
|
@@ -17536,8 +17613,8 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
17536
17613
|
}
|
|
17537
17614
|
return { ...response.value };
|
|
17538
17615
|
}
|
|
17539
|
-
async hostEventFallback(hostEvent, data) {
|
|
17540
|
-
return this.processTrigger(hostEvent, data);
|
|
17616
|
+
async hostEventFallback(hostEvent, data, context) {
|
|
17617
|
+
return this.processTrigger(hostEvent, data, context);
|
|
17541
17618
|
}
|
|
17542
17619
|
/**
|
|
17543
17620
|
* Setter for the iframe element used for host events
|
|
@@ -17581,14 +17658,14 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
17581
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,
|
|
17582
17659
|
};
|
|
17583
17660
|
}
|
|
17584
|
-
async triggerHostEvent(hostEvent, payload) {
|
|
17661
|
+
async triggerHostEvent(hostEvent, payload, context) {
|
|
17585
17662
|
switch (hostEvent) {
|
|
17586
17663
|
case exports.HostEvent.Pin:
|
|
17587
17664
|
return this.handlePinEvent(payload);
|
|
17588
17665
|
case exports.HostEvent.SaveAnswer:
|
|
17589
17666
|
return this.handleSaveAnswerEvent(payload);
|
|
17590
17667
|
default:
|
|
17591
|
-
return this.hostEventFallback(hostEvent, payload);
|
|
17668
|
+
return this.hostEventFallback(hostEvent, payload, context);
|
|
17592
17669
|
}
|
|
17593
17670
|
}
|
|
17594
17671
|
}
|
|
@@ -17731,10 +17808,10 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
17731
17808
|
};
|
|
17732
17809
|
this.showPreRenderByDefault = false;
|
|
17733
17810
|
/**
|
|
17734
|
-
|
|
17735
|
-
|
|
17736
|
-
|
|
17737
|
-
|
|
17811
|
+
* @hidden
|
|
17812
|
+
* Internal state to track if the embed container is loaded.
|
|
17813
|
+
* This is used to trigger events after the embed container is loaded.
|
|
17814
|
+
*/
|
|
17738
17815
|
this.isEmbedContainerLoaded = false;
|
|
17739
17816
|
/**
|
|
17740
17817
|
* @hidden
|
|
@@ -17793,10 +17870,10 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
17793
17870
|
uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_EMBED_CREATE, {
|
|
17794
17871
|
...viewConfig,
|
|
17795
17872
|
});
|
|
17873
|
+
const embedConfig = getEmbedConfig();
|
|
17874
|
+
this.embedConfig = embedConfig;
|
|
17796
17875
|
this.hostEventClient = new HostEventClient(this.iFrame);
|
|
17797
17876
|
this.isReadyForRenderPromise = getInitPromise().then(async () => {
|
|
17798
|
-
const embedConfig = getEmbedConfig();
|
|
17799
|
-
this.embedConfig = embedConfig;
|
|
17800
17877
|
if (!embedConfig.authTriggerContainer && !embedConfig.useEventForSAMLPopup) {
|
|
17801
17878
|
this.embedConfig.authTriggerContainer = domSelector;
|
|
17802
17879
|
}
|
|
@@ -17890,39 +17967,69 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
17890
17967
|
return eventData;
|
|
17891
17968
|
}
|
|
17892
17969
|
/**
|
|
17893
|
-
*
|
|
17894
|
-
*
|
|
17895
|
-
* embed instance through an identifier contained in the payload,
|
|
17896
|
-
* and executes the registered callbacks accordingly.
|
|
17970
|
+
* Subscribe to network events (online/offline) that should
|
|
17971
|
+
* work regardless of auth status
|
|
17897
17972
|
*/
|
|
17898
|
-
|
|
17899
|
-
this.
|
|
17900
|
-
const messageEventListener = (event) => {
|
|
17901
|
-
const eventType = this.getEventType(event);
|
|
17902
|
-
const eventPort = this.getEventPort(event);
|
|
17903
|
-
const eventData = this.formatEventData(event, eventType);
|
|
17904
|
-
if (event.source === this.iFrame.contentWindow) {
|
|
17905
|
-
this.executeCallbacks(eventType, processEventData(eventType, eventData, this.thoughtSpotHost, this.isPreRendered ? this.preRenderWrapper : this.el), eventPort);
|
|
17906
|
-
}
|
|
17907
|
-
};
|
|
17908
|
-
window.addEventListener('message', messageEventListener);
|
|
17973
|
+
subscribeToNetworkEvents() {
|
|
17974
|
+
this.unsubscribeToNetworkEvents();
|
|
17909
17975
|
const onlineEventListener = (e) => {
|
|
17910
17976
|
this.trigger(exports.HostEvent.Reload);
|
|
17911
17977
|
};
|
|
17912
17978
|
window.addEventListener('online', onlineEventListener);
|
|
17913
17979
|
const offlineEventListener = (e) => {
|
|
17914
|
-
const offlineWarning =
|
|
17980
|
+
const offlineWarning = ERROR_MESSAGE.OFFLINE_WARNING;
|
|
17915
17981
|
this.executeCallbacks(exports.EmbedEvent.Error, {
|
|
17916
17982
|
offlineWarning,
|
|
17917
17983
|
});
|
|
17918
17984
|
logger$3.warn(offlineWarning);
|
|
17919
17985
|
};
|
|
17920
17986
|
window.addEventListener('offline', offlineEventListener);
|
|
17921
|
-
this.subscribedListeners =
|
|
17922
|
-
|
|
17923
|
-
|
|
17924
|
-
|
|
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
|
+
}
|
|
17925
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
|
+
}
|
|
17926
18033
|
}
|
|
17927
18034
|
unsubscribeToEvents() {
|
|
17928
18035
|
Object.keys(this.subscribedListeners).forEach((key) => {
|
|
@@ -17992,6 +18099,11 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
17992
18099
|
.join('/');
|
|
17993
18100
|
return `${basePath}#`;
|
|
17994
18101
|
}
|
|
18102
|
+
getUpdateEmbedParamsObject() {
|
|
18103
|
+
let queryParams = this.getEmbedParamsObject();
|
|
18104
|
+
queryParams = { ...this.viewConfig, ...queryParams };
|
|
18105
|
+
return queryParams;
|
|
18106
|
+
}
|
|
17995
18107
|
/**
|
|
17996
18108
|
* Common query params set for all the embed modes.
|
|
17997
18109
|
* @param queryParams
|
|
@@ -18141,9 +18253,13 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18141
18253
|
return path;
|
|
18142
18254
|
}
|
|
18143
18255
|
getEmbedParams() {
|
|
18144
|
-
const queryParams = this.
|
|
18256
|
+
const queryParams = this.getEmbedParamsObject();
|
|
18145
18257
|
return getQueryParamString(queryParams);
|
|
18146
18258
|
}
|
|
18259
|
+
getEmbedParamsObject() {
|
|
18260
|
+
const params = this.getBaseQueryParams();
|
|
18261
|
+
return params;
|
|
18262
|
+
}
|
|
18147
18263
|
getRootIframeSrc() {
|
|
18148
18264
|
const query = this.getEmbedParams();
|
|
18149
18265
|
return this.getEmbedBasePath(query);
|
|
@@ -18214,6 +18330,8 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18214
18330
|
type: exports.EmbedEvent.Init,
|
|
18215
18331
|
});
|
|
18216
18332
|
uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_RENDER_START);
|
|
18333
|
+
// Always subscribe to network events, regardless of auth status
|
|
18334
|
+
this.subscribeToNetworkEvents();
|
|
18217
18335
|
return (_a = getAuthPromise()) === null || _a === void 0 ? void 0 : _a.then((isLoggedIn) => {
|
|
18218
18336
|
if (!isLoggedIn) {
|
|
18219
18337
|
this.handleInsertionIntoDOM(this.embedConfig.loginFailedMessage);
|
|
@@ -18256,7 +18374,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18256
18374
|
el.remove();
|
|
18257
18375
|
});
|
|
18258
18376
|
}
|
|
18259
|
-
|
|
18377
|
+
// Subscribe to message events only after successful
|
|
18378
|
+
// auth and iframe setup
|
|
18379
|
+
this.subscribeToMessageEvents();
|
|
18260
18380
|
}).catch((error) => {
|
|
18261
18381
|
nextInQueue();
|
|
18262
18382
|
uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_RENDER_FAILED, {
|
|
@@ -18566,7 +18686,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18566
18686
|
* @param {any} data The payload to send with the message
|
|
18567
18687
|
* @returns A promise that resolves with the response from the embedded app
|
|
18568
18688
|
*/
|
|
18569
|
-
async trigger(messageType, data = {}) {
|
|
18689
|
+
async trigger(messageType, data = {}, context = {}) {
|
|
18570
18690
|
uploadMixpanelEvent(`${MIXPANEL_EVENT.VISUAL_SDK_TRIGGER}-${messageType}`);
|
|
18571
18691
|
if (!this.isRendered) {
|
|
18572
18692
|
this.handleError('Please call render before triggering events');
|
|
@@ -18576,8 +18696,14 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18576
18696
|
this.handleError('Host event type is undefined');
|
|
18577
18697
|
return null;
|
|
18578
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
|
+
}
|
|
18579
18705
|
// send an empty object, this is needed for liveboard default handlers
|
|
18580
|
-
return this.hostEventClient.triggerHostEvent(messageType, data);
|
|
18706
|
+
return this.hostEventClient.triggerHostEvent(messageType, data, context);
|
|
18581
18707
|
}
|
|
18582
18708
|
/**
|
|
18583
18709
|
* Triggers an event to the embedded app, skipping the UI flow.
|
|
@@ -18708,7 +18834,12 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18708
18834
|
return this.preRender(true);
|
|
18709
18835
|
}
|
|
18710
18836
|
this.validatePreRenderViewConfig(this.viewConfig);
|
|
18837
|
+
logger$3.debug('triggering UpdateEmbedParams', this.viewConfig);
|
|
18838
|
+
this.executeAfterEmbedContainerLoaded(() => {
|
|
18839
|
+
this.trigger(exports.HostEvent.UpdateEmbedParams, this.getUpdateEmbedParamsObject());
|
|
18840
|
+
});
|
|
18711
18841
|
}
|
|
18842
|
+
this.beforePrerenderVisible();
|
|
18712
18843
|
if (this.el) {
|
|
18713
18844
|
this.syncPreRenderStyle();
|
|
18714
18845
|
if (!this.viewConfig.doNotTrackPreRenderSize) {
|
|
@@ -18725,7 +18856,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18725
18856
|
this.resizeObserver.observe(this.el);
|
|
18726
18857
|
}
|
|
18727
18858
|
}
|
|
18728
|
-
this.beforePrerenderVisible();
|
|
18729
18859
|
removeStyleProperties(this.preRenderWrapper, ['z-index', 'opacity', 'pointer-events']);
|
|
18730
18860
|
this.subscribeToEvents();
|
|
18731
18861
|
// Setup fullscreen change handler for prerendered components
|
|
@@ -18914,15 +19044,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18914
19044
|
this.embedComponentType = 'SearchBarEmbed';
|
|
18915
19045
|
this.viewConfig = viewConfig;
|
|
18916
19046
|
}
|
|
18917
|
-
|
|
18918
|
-
* Construct the URL of the embedded ThoughtSpot search to be
|
|
18919
|
-
* loaded in the iframe
|
|
18920
|
-
* @param dataSources A list of data source GUIDs
|
|
18921
|
-
*/
|
|
18922
|
-
getIFrameSrc() {
|
|
19047
|
+
getEmbedParamsObject() {
|
|
18923
19048
|
var _a;
|
|
18924
19049
|
const { searchOptions, dataSource, dataSources, useLastSelectedSources = false, excludeSearchTokenStringFromURL, } = this.viewConfig;
|
|
18925
|
-
const path = 'search-bar-embed';
|
|
18926
19050
|
const queryParams = this.getBaseQueryParams();
|
|
18927
19051
|
queryParams[Param.HideActions] = [...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : [])];
|
|
18928
19052
|
if (dataSources && dataSources.length) {
|
|
@@ -18944,6 +19068,16 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18944
19068
|
queryParams[Param.UseLastSelectedDataSource] = false;
|
|
18945
19069
|
}
|
|
18946
19070
|
queryParams[Param.searchEmbed] = true;
|
|
19071
|
+
return queryParams;
|
|
19072
|
+
}
|
|
19073
|
+
/**
|
|
19074
|
+
* Construct the URL of the embedded ThoughtSpot search to be
|
|
19075
|
+
* loaded in the iframe
|
|
19076
|
+
* @param dataSources A list of data source GUIDs
|
|
19077
|
+
*/
|
|
19078
|
+
getIFrameSrc() {
|
|
19079
|
+
const queryParams = this.getEmbedParamsObject();
|
|
19080
|
+
const path = 'search-bar-embed';
|
|
18947
19081
|
let query = '';
|
|
18948
19082
|
const queryParamsString = getQueryParamString(queryParams, true);
|
|
18949
19083
|
if (queryParamsString) {
|
|
@@ -18994,12 +19128,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18994
19128
|
viewConfig.embedComponentType = 'SageEmbed';
|
|
18995
19129
|
super(domSelector, viewConfig);
|
|
18996
19130
|
}
|
|
18997
|
-
|
|
18998
|
-
* Constructs a map of parameters to be passed on to the
|
|
18999
|
-
* embedded Eureka or Sage search page.
|
|
19000
|
-
* @returns {string} query string
|
|
19001
|
-
*/
|
|
19002
|
-
getEmbedParams() {
|
|
19131
|
+
getEmbedParamsObject() {
|
|
19003
19132
|
const { disableWorksheetChange, hideWorksheetSelector, showObjectSuggestions, dataPanelV2, hideSampleQuestions, isProductTour, hideSageAnswerHeader, hideAutocompleteSuggestions, } = this.viewConfig;
|
|
19004
19133
|
const params = this.getBaseQueryParams();
|
|
19005
19134
|
params[Param.DataPanelV2Enabled] = !!dataPanelV2;
|
|
@@ -19014,6 +19143,15 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
19014
19143
|
params[Param.HideSampleQuestions] = !!hideSampleQuestions;
|
|
19015
19144
|
params[Param.IsProductTour] = !!isProductTour;
|
|
19016
19145
|
params[Param.HideSageAnswerHeader] = !!hideSageAnswerHeader;
|
|
19146
|
+
return params;
|
|
19147
|
+
}
|
|
19148
|
+
/**
|
|
19149
|
+
* Constructs a map of parameters to be passed on to the
|
|
19150
|
+
* embedded Eureka or Sage search page.
|
|
19151
|
+
* @returns {string} query string
|
|
19152
|
+
*/
|
|
19153
|
+
getEmbedParams() {
|
|
19154
|
+
const params = this.getEmbedParamsObject();
|
|
19017
19155
|
return getQueryParamString(params, true);
|
|
19018
19156
|
}
|
|
19019
19157
|
/**
|
|
@@ -19123,11 +19261,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
19123
19261
|
const defaultAppInitData = await super.getAppInitData();
|
|
19124
19262
|
return { ...defaultAppInitData, ...this.getSearchInitData() };
|
|
19125
19263
|
}
|
|
19126
|
-
|
|
19264
|
+
getEmbedParamsObject() {
|
|
19127
19265
|
var _a;
|
|
19128
|
-
const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, hideSearchBar, dataPanelV2 = true, useLastSelectedSources = false, runtimeParameters, collapseSearchBarInitially = false, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false,
|
|
19129
|
-
/* eslint-disable-next-line max-len */
|
|
19130
|
-
dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL, focusSearchBarOnRender = true, excludeRuntimeParametersfromURL, excludeSearchTokenStringFromURL, collapseSearchBar = true, } = this.viewConfig;
|
|
19266
|
+
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;
|
|
19131
19267
|
const queryParams = this.getBaseQueryParams();
|
|
19132
19268
|
queryParams[Param.HideActions] = [
|
|
19133
19269
|
...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : []),
|
|
@@ -19160,7 +19296,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
19160
19296
|
queryParams[Param.HideSearchBar] = true;
|
|
19161
19297
|
}
|
|
19162
19298
|
if (isOnBeforeGetVizDataInterceptEnabled) {
|
|
19163
|
-
/* eslint-disable-next-line max-len */
|
|
19164
19299
|
queryParams[Param.IsOnBeforeGetVizDataInterceptEnabled] = isOnBeforeGetVizDataInterceptEnabled;
|
|
19165
19300
|
}
|
|
19166
19301
|
if (!focusSearchBarOnRender) {
|
|
@@ -19173,20 +19308,22 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
19173
19308
|
queryParams[Param.UseLastSelectedDataSource] = false;
|
|
19174
19309
|
}
|
|
19175
19310
|
queryParams[Param.searchEmbed] = true;
|
|
19176
|
-
/* eslint-disable-next-line max-len */
|
|
19177
19311
|
queryParams[Param.CollapseSearchBarInitially] = collapseSearchBarInitially || collapseSearchBar;
|
|
19178
19312
|
queryParams[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
|
|
19179
19313
|
if (dataPanelCustomGroupsAccordionInitialState
|
|
19180
19314
|
=== DataPanelCustomColumnGroupsAccordionState$1.COLLAPSE_ALL
|
|
19181
19315
|
|| dataPanelCustomGroupsAccordionInitialState
|
|
19182
19316
|
=== DataPanelCustomColumnGroupsAccordionState$1.EXPAND_FIRST) {
|
|
19183
|
-
/* eslint-disable-next-line max-len */
|
|
19184
19317
|
queryParams[Param.DataPanelCustomGroupsAccordionInitialState] = dataPanelCustomGroupsAccordionInitialState;
|
|
19185
19318
|
}
|
|
19186
19319
|
else {
|
|
19187
|
-
/* eslint-disable-next-line max-len */
|
|
19188
19320
|
queryParams[Param.DataPanelCustomGroupsAccordionInitialState] = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL;
|
|
19189
19321
|
}
|
|
19322
|
+
return queryParams;
|
|
19323
|
+
}
|
|
19324
|
+
getEmbedParams() {
|
|
19325
|
+
const { runtimeParameters, runtimeFilters, excludeRuntimeParametersfromURL, excludeRuntimeFiltersfromURL, } = this.viewConfig;
|
|
19326
|
+
const queryParams = this.getEmbedParamsObject();
|
|
19190
19327
|
let query = '';
|
|
19191
19328
|
const queryParamsString = getQueryParamString(queryParams, true);
|
|
19192
19329
|
if (queryParamsString) {
|
|
@@ -19419,7 +19556,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
19419
19556
|
* embedded Liveboard or visualization.
|
|
19420
19557
|
*/
|
|
19421
19558
|
getEmbedParams() {
|
|
19422
|
-
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;
|
|
19423
19560
|
let params = {};
|
|
19424
19561
|
params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
|
|
19425
19562
|
params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
|
|
@@ -19487,6 +19624,12 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
19487
19624
|
if (isPNGInScheduledEmailsEnabled !== undefined) {
|
|
19488
19625
|
params[Param.isPNGInScheduledEmailsEnabled] = isPNGInScheduledEmailsEnabled;
|
|
19489
19626
|
}
|
|
19627
|
+
if (hideTagFilterChips !== undefined) {
|
|
19628
|
+
params[Param.HideTagFilterChips] = hideTagFilterChips;
|
|
19629
|
+
}
|
|
19630
|
+
if (isLinkParametersEnabled !== undefined) {
|
|
19631
|
+
params[Param.isLinkParametersEnabled] = isLinkParametersEnabled;
|
|
19632
|
+
}
|
|
19490
19633
|
params[Param.DataPanelV2Enabled] = dataPanelV2;
|
|
19491
19634
|
params[Param.HideHomepageLeftNav] = hideHomepageLeftNav;
|
|
19492
19635
|
params[Param.ModularHomeExperienceEnabled] = modularHomeExperience;
|
|
@@ -19834,9 +19977,14 @@ query GetEurekaVizSnapshots(
|
|
|
19834
19977
|
* embedded Liveboard or visualization.
|
|
19835
19978
|
*/
|
|
19836
19979
|
getEmbedParams() {
|
|
19980
|
+
const params = this.getEmbedParamsObject();
|
|
19981
|
+
const queryParams = getQueryParamString(params, true);
|
|
19982
|
+
return queryParams;
|
|
19983
|
+
}
|
|
19984
|
+
getEmbedParamsObject() {
|
|
19837
19985
|
let params = {};
|
|
19838
19986
|
params = this.getBaseQueryParams(params);
|
|
19839
|
-
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;
|
|
19840
19988
|
const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
|
|
19841
19989
|
|| this.viewConfig.preventPinboardFilterRemoval;
|
|
19842
19990
|
if (fullHeight === true) {
|
|
@@ -19901,6 +20049,9 @@ query GetEurekaVizSnapshots(
|
|
|
19901
20049
|
if (showSpotterLimitations !== undefined) {
|
|
19902
20050
|
params[Param.ShowSpotterLimitations] = showSpotterLimitations;
|
|
19903
20051
|
}
|
|
20052
|
+
if (isLinkParametersEnabled !== undefined) {
|
|
20053
|
+
params[Param.isLinkParametersEnabled] = isLinkParametersEnabled;
|
|
20054
|
+
}
|
|
19904
20055
|
params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
|
|
19905
20056
|
params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
|
|
19906
20057
|
params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;
|
|
@@ -19910,8 +20061,8 @@ query GetEurekaVizSnapshots(
|
|
|
19910
20061
|
params[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
|
|
19911
20062
|
params[Param.CoverAndFilterOptionInPDF] = coverAndFilterOptionInPDF;
|
|
19912
20063
|
params[Param.LiveboardXLSXCSVDownload] = !!liveboardXLSXCSVDownload;
|
|
19913
|
-
|
|
19914
|
-
return
|
|
20064
|
+
getQueryParamString(params, true);
|
|
20065
|
+
return params;
|
|
19915
20066
|
}
|
|
19916
20067
|
getIframeSuffixSrc(liveboardId, vizId, activeTabId) {
|
|
19917
20068
|
let suffix = `/embed/viz/${liveboardId}`;
|
|
@@ -20469,13 +20620,17 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
20469
20620
|
super(container, viewConfig);
|
|
20470
20621
|
this.viewConfig = viewConfig;
|
|
20471
20622
|
}
|
|
20472
|
-
|
|
20623
|
+
getEmbedParamsObject() {
|
|
20473
20624
|
var _a;
|
|
20474
|
-
const { sessionId, genNo, acSessionId, acGenNo, convId, messageId, } = this.viewConfig;
|
|
20475
|
-
const path = 'conv-assist-answer';
|
|
20476
20625
|
const queryParams = this.getBaseQueryParams();
|
|
20477
20626
|
queryParams[Param.HideActions] = [...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : [])];
|
|
20478
20627
|
queryParams[Param.isSpotterAgentEmbed] = true;
|
|
20628
|
+
return queryParams;
|
|
20629
|
+
}
|
|
20630
|
+
getIframeSrc() {
|
|
20631
|
+
const { sessionId, genNo, acSessionId, acGenNo, convId, messageId, } = this.viewConfig;
|
|
20632
|
+
const path = 'conv-assist-answer';
|
|
20633
|
+
const queryParams = this.getEmbedParamsObject();
|
|
20479
20634
|
let query = '';
|
|
20480
20635
|
const queryParamsString = getQueryParamString(queryParams, true);
|
|
20481
20636
|
if (queryParamsString) {
|
|
@@ -20631,9 +20786,8 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
20631
20786
|
super(container, viewConfig);
|
|
20632
20787
|
this.viewConfig = viewConfig;
|
|
20633
20788
|
}
|
|
20634
|
-
|
|
20789
|
+
getEmbedParamsObject() {
|
|
20635
20790
|
const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, } = this.viewConfig;
|
|
20636
|
-
const path = 'insights/conv-assist';
|
|
20637
20791
|
if (!worksheetId) {
|
|
20638
20792
|
this.handleError(ERROR_MESSAGE.SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND);
|
|
20639
20793
|
}
|
|
@@ -20654,6 +20808,12 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
20654
20808
|
if (!isUndefined_1(hideSampleQuestions)) {
|
|
20655
20809
|
queryParams[Param.HideSampleQuestions] = !!hideSampleQuestions;
|
|
20656
20810
|
}
|
|
20811
|
+
return queryParams;
|
|
20812
|
+
}
|
|
20813
|
+
getIframeSrc() {
|
|
20814
|
+
const { worksheetId, searchOptions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, } = this.viewConfig;
|
|
20815
|
+
const path = 'insights/conv-assist';
|
|
20816
|
+
const queryParams = this.getEmbedParamsObject();
|
|
20657
20817
|
let query = '';
|
|
20658
20818
|
const queryParamsString = getQueryParamString(queryParams, true);
|
|
20659
20819
|
if (queryParamsString) {
|