@thoughtspot/visual-embed-sdk 1.44.3 → 1.44.4-HE-beta.1
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/README.md +1 -1
- package/cjs/package.json +1 -1
- package/cjs/src/embed/app.d.ts +44 -32
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/conversation.d.ts +7 -0
- package/cjs/src/embed/conversation.d.ts.map +1 -1
- package/cjs/src/embed/conversation.js +9 -0
- package/cjs/src/embed/conversation.js.map +1 -1
- package/cjs/src/embed/hostEventClient/contracts.d.ts +20 -3
- package/cjs/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/cjs/src/embed/hostEventClient/contracts.js +6 -1
- package/cjs/src/embed/hostEventClient/contracts.js.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.d.ts +8 -8
- package/cjs/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.js +18 -18
- package/cjs/src/embed/hostEventClient/host-event-client.js.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.spec.js +7 -7
- package/cjs/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts +10 -4
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +12 -2
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/liveboard.spec.js +1 -1
- package/cjs/src/embed/liveboard.spec.js.map +1 -1
- package/cjs/src/embed/sage.d.ts +7 -0
- package/cjs/src/embed/sage.d.ts.map +1 -1
- package/cjs/src/embed/sage.js +9 -0
- package/cjs/src/embed/sage.js.map +1 -1
- package/cjs/src/embed/search-bar.d.ts +7 -0
- package/cjs/src/embed/search-bar.d.ts.map +1 -1
- package/cjs/src/embed/search-bar.js +9 -0
- package/cjs/src/embed/search-bar.js.map +1 -1
- package/cjs/src/embed/search.d.ts +7 -0
- package/cjs/src/embed/search.d.ts.map +1 -1
- package/cjs/src/embed/search.js +9 -0
- package/cjs/src/embed/search.js.map +1 -1
- package/cjs/src/embed/ts-embed.d.ts +9 -3
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +41 -8
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/embed/ts-embed.spec.js +156 -24
- 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/index.d.ts +2 -2
- package/cjs/src/index.d.ts.map +1 -1
- package/cjs/src/index.js +5 -1
- package/cjs/src/index.js.map +1 -1
- package/cjs/src/types.d.ts +142 -45
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +91 -16
- package/cjs/src/types.js.map +1 -1
- package/cjs/src/utils/logger.spec.d.ts +20 -5
- package/cjs/src/utils/logger.spec.d.ts.map +1 -1
- package/cjs/src/utils/processTrigger.d.ts +3 -2
- 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/cjs/src/utils.d.ts +5 -1
- package/cjs/src/utils.d.ts.map +1 -1
- package/cjs/src/utils.js +10 -2
- package/cjs/src/utils.js.map +1 -1
- package/dist/index-BFdRRz03.js +7371 -0
- package/dist/index-BUfrYJ3w.js +7371 -0
- package/dist/index-CI6s4VMY.js +7371 -0
- package/dist/{index-D0n5LIka.js → index-CWQnMX2L.js} +1 -1
- package/dist/index-CaW-1mu5.js +7371 -0
- package/dist/index-CcSgNJVi.js +7371 -0
- package/dist/index-Djtv-y7A.js +7371 -0
- package/dist/index-UY-4yjBN.js +7371 -0
- package/dist/src/embed/app.d.ts +44 -32
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/conversation.d.ts +7 -0
- package/dist/src/embed/conversation.d.ts.map +1 -1
- package/dist/src/embed/hostEventClient/contracts.d.ts +20 -3
- package/dist/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/dist/src/embed/hostEventClient/host-event-client.d.ts +8 -8
- package/dist/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts +10 -4
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/embed/sage.d.ts +7 -0
- package/dist/src/embed/sage.d.ts.map +1 -1
- package/dist/src/embed/search-bar.d.ts +7 -0
- package/dist/src/embed/search-bar.d.ts.map +1 -1
- package/dist/src/embed/search.d.ts +7 -0
- package/dist/src/embed/search.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.d.ts +9 -3
- 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/index.d.ts +2 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/types.d.ts +142 -45
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/logger.spec.d.ts +20 -5
- package/dist/src/utils/logger.spec.d.ts.map +1 -1
- package/dist/src/utils/processTrigger.d.ts +3 -2
- package/dist/src/utils/processTrigger.d.ts.map +1 -1
- package/dist/src/utils.d.ts +5 -1
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +218 -50
- package/dist/tsembed-react.js +217 -49
- package/dist/tsembed.es.js +219 -51
- package/dist/tsembed.js +244 -76
- package/dist/visual-embed-sdk-react-full.d.ts +245 -82
- package/dist/visual-embed-sdk-react.d.ts +251 -90
- package/dist/visual-embed-sdk.d.ts +298 -92
- package/lib/package.json +1 -1
- package/lib/src/embed/app.d.ts +44 -32
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/conversation.d.ts +7 -0
- package/lib/src/embed/conversation.d.ts.map +1 -1
- package/lib/src/embed/conversation.js +9 -0
- package/lib/src/embed/conversation.js.map +1 -1
- package/lib/src/embed/hostEventClient/contracts.d.ts +20 -3
- package/lib/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/lib/src/embed/hostEventClient/contracts.js +5 -0
- package/lib/src/embed/hostEventClient/contracts.js.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.d.ts +8 -8
- package/lib/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.js +18 -18
- package/lib/src/embed/hostEventClient/host-event-client.js.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.spec.js +7 -7
- package/lib/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts +10 -4
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +12 -2
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +1 -1
- package/lib/src/embed/liveboard.spec.js.map +1 -1
- package/lib/src/embed/sage.d.ts +7 -0
- package/lib/src/embed/sage.d.ts.map +1 -1
- package/lib/src/embed/sage.js +9 -0
- package/lib/src/embed/sage.js.map +1 -1
- package/lib/src/embed/search-bar.d.ts +7 -0
- package/lib/src/embed/search-bar.d.ts.map +1 -1
- package/lib/src/embed/search-bar.js +9 -0
- package/lib/src/embed/search-bar.js.map +1 -1
- package/lib/src/embed/search.d.ts +7 -0
- package/lib/src/embed/search.d.ts.map +1 -1
- package/lib/src/embed/search.js +9 -0
- package/lib/src/embed/search.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts +9 -3
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +41 -8
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/embed/ts-embed.spec.js +156 -24
- 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/index.d.ts +2 -2
- package/lib/src/index.d.ts.map +1 -1
- package/lib/src/index.js +2 -2
- package/lib/src/index.js.map +1 -1
- package/lib/src/types.d.ts +142 -45
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +90 -15
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils/logger.spec.d.ts +20 -5
- package/lib/src/utils/logger.spec.d.ts.map +1 -1
- package/lib/src/utils/processTrigger.d.ts +3 -2
- 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/lib/src/utils.d.ts +5 -1
- package/lib/src/utils.d.ts.map +1 -1
- package/lib/src/utils.js +8 -1
- package/lib/src/utils.js.map +1 -1
- package/package.json +1 -1
- package/src/embed/app.ts +45 -32
- package/src/embed/conversation.ts +11 -0
- package/src/embed/hostEventClient/contracts.ts +23 -4
- package/src/embed/hostEventClient/host-event-client.spec.ts +7 -1
- package/src/embed/hostEventClient/host-event-client.ts +22 -11
- package/src/embed/liveboard.spec.ts +1 -1
- package/src/embed/liveboard.ts +18 -5
- package/src/embed/sage.ts +11 -0
- package/src/embed/search-bar.tsx +11 -0
- package/src/embed/search.ts +11 -0
- package/src/embed/ts-embed.spec.ts +205 -18
- package/src/embed/ts-embed.ts +45 -9
- package/src/errors.ts +1 -0
- package/src/index.ts +6 -0
- package/src/types.ts +146 -43
- package/src/utils/processTrigger.ts +6 -3
- package/src/utils.ts +10 -1
package/dist/tsembed-react.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @thoughtspot/visual-embed-sdk version 1.44.
|
|
1
|
+
/* @thoughtspot/visual-embed-sdk version 1.44.4-HE-beta.1 */
|
|
2
2
|
'use client';
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) :
|
|
@@ -372,57 +372,71 @@
|
|
|
372
372
|
})(AuthType || (AuthType = {}));
|
|
373
373
|
/**
|
|
374
374
|
*
|
|
375
|
-
* This
|
|
376
|
-
* To access the updated modular homepage,
|
|
377
|
-
* set `modularHomeExperience` to `true`
|
|
378
|
-
* (available as Early Access feature in 9.12.5.cl).
|
|
375
|
+
* **Note**: This attribute is not supported in the classic (V1) homepage experience.
|
|
379
376
|
*
|
|
380
377
|
*/
|
|
381
378
|
exports.HomeLeftNavItem = void 0;
|
|
382
379
|
(function (HomeLeftNavItem) {
|
|
383
380
|
/**
|
|
381
|
+
* The *Search data* option in
|
|
382
|
+
* the *Insights* left navigation panel.
|
|
384
383
|
* @version SDK: 1.28.0| ThoughtSpot: 9.12.5.cl
|
|
385
384
|
*/
|
|
386
385
|
HomeLeftNavItem["SearchData"] = "search-data";
|
|
387
386
|
/**
|
|
387
|
+
* The *Home* menu option in
|
|
388
|
+
* the *Insights* left navigation panel.
|
|
388
389
|
* @version SDK: 1.28.0| ThoughtSpot: 9.12.5.cl
|
|
389
390
|
*/
|
|
390
391
|
HomeLeftNavItem["Home"] = "insights-home";
|
|
391
392
|
/**
|
|
393
|
+
* The *Liveboards* menu option in
|
|
394
|
+
* the *Insights* left navigation panel.
|
|
392
395
|
* @version SDK: 1.28.0| ThoughtSpot: 9.12.5.cl
|
|
393
396
|
*/
|
|
394
397
|
HomeLeftNavItem["Liveboards"] = "liveboards";
|
|
395
398
|
/**
|
|
399
|
+
* The *Answers* menu option in
|
|
400
|
+
* the *Insights* left navigation panel.
|
|
396
401
|
* @version SDK: 1.28.0| ThoughtSpot: 9.12.5.cl
|
|
397
402
|
*/
|
|
398
403
|
HomeLeftNavItem["Answers"] = "answers";
|
|
399
404
|
/**
|
|
405
|
+
* The *Monitor subscriptions* menu option in
|
|
406
|
+
* the *Insights* left navigation panel.
|
|
400
407
|
* @version SDK: 1.28.0| ThoughtSpot: 9.12.5.cl
|
|
401
408
|
*/
|
|
402
409
|
HomeLeftNavItem["MonitorSubscription"] = "monitor-alerts";
|
|
403
410
|
/**
|
|
411
|
+
* The *SpotIQ analysis* menu option in
|
|
412
|
+
* the *Insights* left navigation panel.
|
|
404
413
|
* @version SDK: 1.28.0| ThoughtSpot: 9.12.5.cl
|
|
405
414
|
*/
|
|
406
415
|
HomeLeftNavItem["SpotIQAnalysis"] = "spotiq-analysis";
|
|
407
416
|
/**
|
|
417
|
+
* The *Liveboard schedules* menu option in
|
|
418
|
+
* the *Insights* left navigation panel.
|
|
408
419
|
* @version SDK: 1.34.0| ThoughtSpot: 10.3.0.cl
|
|
409
420
|
*/
|
|
410
421
|
HomeLeftNavItem["LiveboardSchedules"] = "liveboard-schedules";
|
|
411
422
|
/**
|
|
412
|
-
*
|
|
413
|
-
*
|
|
423
|
+
* The create option in the *Insights*
|
|
424
|
+
* left navigation panel.
|
|
425
|
+
* Available in the V3 navigation experience.
|
|
414
426
|
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
415
427
|
*/
|
|
416
428
|
HomeLeftNavItem["Create"] = "create";
|
|
417
429
|
/**
|
|
418
|
-
* Spotter option in the
|
|
419
|
-
*
|
|
430
|
+
* The *Spotter* menu option in the *Insights*
|
|
431
|
+
* left navigation panel.
|
|
432
|
+
* Available in the V3 navigation experience.
|
|
420
433
|
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
421
434
|
*/
|
|
422
435
|
HomeLeftNavItem["Spotter"] = "spotter";
|
|
423
436
|
/**
|
|
424
|
-
* Favorites
|
|
425
|
-
*
|
|
437
|
+
* The *Favorites* section in the *Insights*
|
|
438
|
+
* left navigation panel.
|
|
439
|
+
* Available in the V3 navigation experience.
|
|
426
440
|
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
427
441
|
*/
|
|
428
442
|
HomeLeftNavItem["Favorites"] = "favorites";
|
|
@@ -494,10 +508,11 @@
|
|
|
494
508
|
RuntimeFilterOp["NOT_IN"] = "NOT_IN";
|
|
495
509
|
})(exports.RuntimeFilterOp || (exports.RuntimeFilterOp = {}));
|
|
496
510
|
/**
|
|
497
|
-
* Home page
|
|
498
|
-
*
|
|
499
|
-
*
|
|
500
|
-
*
|
|
511
|
+
* Home page modules that can be hidden
|
|
512
|
+
* via `hiddenHomepageModules` and reordered via
|
|
513
|
+
* `reorderedHomepageModules`.
|
|
514
|
+
*
|
|
515
|
+
* **Note**: This option is not supported in the classic (v1) experience.
|
|
501
516
|
* @version SDK: 1.28.0 | ThoughtSpot: 9.12.5.cl, 10.1.0.sw
|
|
502
517
|
*/
|
|
503
518
|
exports.HomepageModule = void 0;
|
|
@@ -511,7 +526,7 @@
|
|
|
511
526
|
*/
|
|
512
527
|
HomepageModule["Watchlist"] = "WATCHLIST";
|
|
513
528
|
/**
|
|
514
|
-
*
|
|
529
|
+
* Favorite module
|
|
515
530
|
*/
|
|
516
531
|
HomepageModule["Favorite"] = "FAVORITE";
|
|
517
532
|
/**
|
|
@@ -1667,6 +1682,28 @@
|
|
|
1667
1682
|
* @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
|
|
1668
1683
|
*/
|
|
1669
1684
|
EmbedEvent["PreviewSpotterData"] = "PreviewSpotterData";
|
|
1685
|
+
/**
|
|
1686
|
+
* Emitted when user opens up the Add to Coaching modal on any visualization in Spotter Embed.
|
|
1687
|
+
* @example
|
|
1688
|
+
* ```js
|
|
1689
|
+
* spotterEmbed.on(EmbedEvent.AddToCoaching, (payload) => {
|
|
1690
|
+
* console.log('payload', payload);
|
|
1691
|
+
* })
|
|
1692
|
+
*```
|
|
1693
|
+
* @version SDK: 1.45.0 | ThoughtSpot: 26.2.0.cl
|
|
1694
|
+
*/
|
|
1695
|
+
EmbedEvent["AddToCoaching"] = "addToCoaching";
|
|
1696
|
+
/**
|
|
1697
|
+
* Emitted when user opens up the data model instructions modal in Spotter embed.
|
|
1698
|
+
* @example
|
|
1699
|
+
* ```js
|
|
1700
|
+
* spotterEmbed.on(EmbedEvent.DataModelInstructions, (payload) => {
|
|
1701
|
+
* console.log('payload', payload);
|
|
1702
|
+
* })
|
|
1703
|
+
* ```
|
|
1704
|
+
* @version SDK: 1.45.0 | ThoughtSpot: 26.2.0.cl
|
|
1705
|
+
*/
|
|
1706
|
+
EmbedEvent["DataModelInstructions"] = "DataModelInstructions";
|
|
1670
1707
|
/**
|
|
1671
1708
|
* Emitted when the Spotter query is triggered in Spotter embed.
|
|
1672
1709
|
* @example
|
|
@@ -3091,6 +3128,26 @@
|
|
|
3091
3128
|
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
3092
3129
|
*/
|
|
3093
3130
|
HostEvent["PreviewSpotterData"] = "PreviewSpotterData";
|
|
3131
|
+
/**
|
|
3132
|
+
* Opens the Add to Coaching modal from a visualization in Spotter Embed.
|
|
3133
|
+
* @param - `vizId ` refers to the Visualization ID in Spotter embed and is required.
|
|
3134
|
+
* @example
|
|
3135
|
+
* ```js
|
|
3136
|
+
* spotterEmbed.trigger(HostEvent.AddToCoaching, { vizId: '730496d6-6903-4601-937e-2c691821af3c' });
|
|
3137
|
+
*
|
|
3138
|
+
*```
|
|
3139
|
+
* @version SDK: 1.45.0 | ThoughtSpot: 26.2.0.cl
|
|
3140
|
+
*/
|
|
3141
|
+
HostEvent["AddToCoaching"] = "addToCoaching";
|
|
3142
|
+
/**
|
|
3143
|
+
* Opens the data model instructions modal in Spotter Embed.
|
|
3144
|
+
* @example
|
|
3145
|
+
* ```js
|
|
3146
|
+
* spotterEmbed.trigger(HostEvent.DataModelInstructions);
|
|
3147
|
+
* ```
|
|
3148
|
+
* @version SDK: 1.45.0 | ThoughtSpot: 26.2.0.cl
|
|
3149
|
+
*/
|
|
3150
|
+
HostEvent["DataModelInstructions"] = "DataModelInstructions";
|
|
3094
3151
|
/**
|
|
3095
3152
|
* Resets the Spotter Embed Conversation.
|
|
3096
3153
|
* @example
|
|
@@ -3193,6 +3250,15 @@
|
|
|
3193
3250
|
* @version SDK: 1.45.0 | ThoughtSpot: 26.2.0.cl
|
|
3194
3251
|
*/
|
|
3195
3252
|
HostEvent["StartNewSpotterConversation"] = "StartNewSpotterConversation";
|
|
3253
|
+
/**
|
|
3254
|
+
* Get the current context of the embedded page.
|
|
3255
|
+
* @example
|
|
3256
|
+
* ```js
|
|
3257
|
+
* const context = await liveboardEmbed.trigger(HostEvent.GetPageContext);
|
|
3258
|
+
* ```
|
|
3259
|
+
* @version SDK: 1.45.0 | ThoughtSpot: 26.2.0.cl
|
|
3260
|
+
*/
|
|
3261
|
+
HostEvent["GetPageContext"] = "GetPageContext";
|
|
3196
3262
|
})(exports.HostEvent || (exports.HostEvent = {}));
|
|
3197
3263
|
/**
|
|
3198
3264
|
* The different visual modes that the data sources panel within
|
|
@@ -4902,7 +4968,16 @@
|
|
|
4902
4968
|
EmbedErrorCodes["HOST_EVENT_TYPE_UNDEFINED"] = "HOST_EVENT_TYPE_UNDEFINED";
|
|
4903
4969
|
/** Error parsing api intercept body */
|
|
4904
4970
|
EmbedErrorCodes["PARSING_API_INTERCEPT_BODY_ERROR"] = "PARSING_API_INTERCEPT_BODY_ERROR";
|
|
4971
|
+
/** Failed to update embed parameters during pre-render */
|
|
4972
|
+
EmbedErrorCodes["UPDATE_PARAMS_FAILED"] = "UPDATE_PARAMS_FAILED";
|
|
4905
4973
|
})(EmbedErrorCodes || (EmbedErrorCodes = {}));
|
|
4974
|
+
var ContextType;
|
|
4975
|
+
(function (ContextType) {
|
|
4976
|
+
ContextType["Search"] = "search-answer";
|
|
4977
|
+
ContextType["Liveboard"] = "liveboard";
|
|
4978
|
+
ContextType["Answer"] = "answer";
|
|
4979
|
+
ContextType["Spotter"] = "spotter";
|
|
4980
|
+
})(ContextType || (ContextType = {}));
|
|
4906
4981
|
/**
|
|
4907
4982
|
* Enum for the type of API intercepted
|
|
4908
4983
|
*/
|
|
@@ -5022,6 +5097,7 @@
|
|
|
5022
5097
|
LOGIN_FAILED: 'Login failed',
|
|
5023
5098
|
ERROR_PARSING_API_INTERCEPT_BODY: 'Error parsing api intercept body',
|
|
5024
5099
|
SSR_ENVIRONMENT_ERROR: 'SSR environment detected. This function cannot be called in SSR environment.',
|
|
5100
|
+
UPDATE_PARAMS_FAILED: 'Failed to update embed parameters',
|
|
5025
5101
|
};
|
|
5026
5102
|
const CUSTOM_ACTIONS_ERROR_MESSAGE = {
|
|
5027
5103
|
INVALID_ACTION_OBJECT: 'Custom Action Validation Error: Invalid action object provided',
|
|
@@ -5147,7 +5223,8 @@
|
|
|
5147
5223
|
logger$3.error('Please provide a valid lazyLoadingMargin value (e.g., "10px")');
|
|
5148
5224
|
return false;
|
|
5149
5225
|
}
|
|
5150
|
-
// This pattern allows for an optional negative sign, and numbers
|
|
5226
|
+
// This pattern allows for an optional negative sign, and numbers
|
|
5227
|
+
// that can be integers or decimals (including leading dot).
|
|
5151
5228
|
const cssUnitPattern = /^-?(\d+(\.\d*)?|\.\d+)(px|em|rem|%|vh|vw)$/i;
|
|
5152
5229
|
const parts = value.trim().split(/\s+/);
|
|
5153
5230
|
if (parts.length > 4) {
|
|
@@ -5487,6 +5564,12 @@
|
|
|
5487
5564
|
return values[key] !== undefined ? String(values[key]) : match;
|
|
5488
5565
|
});
|
|
5489
5566
|
};
|
|
5567
|
+
const getHostEventsConfig = (viewConfig) => {
|
|
5568
|
+
return {
|
|
5569
|
+
shouldBypassPayloadValidation: viewConfig.shouldBypassPayloadValidation,
|
|
5570
|
+
useHostEventsV2: viewConfig.useHostEventsV2,
|
|
5571
|
+
};
|
|
5572
|
+
};
|
|
5490
5573
|
/**
|
|
5491
5574
|
* Check if the window is undefined
|
|
5492
5575
|
* If the window is undefined, it means the code is running in a SSR environment.
|
|
@@ -7784,7 +7867,12 @@
|
|
|
7784
7867
|
UIPassthroughEvent["GetAnswerConfig"] = "getAnswerPageConfig";
|
|
7785
7868
|
UIPassthroughEvent["GetLiveboardConfig"] = "getPinboardPageConfig";
|
|
7786
7869
|
UIPassthroughEvent["GetUnsavedAnswerTML"] = "getUnsavedAnswerTML";
|
|
7787
|
-
})(UIPassthroughEvent || (UIPassthroughEvent = {}));
|
|
7870
|
+
})(UIPassthroughEvent || (UIPassthroughEvent = {}));
|
|
7871
|
+
var PageType;
|
|
7872
|
+
(function (PageType) {
|
|
7873
|
+
PageType["PAGE"] = "page";
|
|
7874
|
+
PageType["DIALOG"] = "dialog";
|
|
7875
|
+
})(PageType || (PageType = {}));
|
|
7788
7876
|
|
|
7789
7877
|
const EndPoints = {
|
|
7790
7878
|
AUTH_VERIFICATION: '/callosum/v1/session/info',
|
|
@@ -17545,6 +17633,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
17545
17633
|
* @param message
|
|
17546
17634
|
* @param message.type
|
|
17547
17635
|
* @param message.data
|
|
17636
|
+
* @param message.context
|
|
17548
17637
|
* @param thoughtSpotHost
|
|
17549
17638
|
* @param channel
|
|
17550
17639
|
*/
|
|
@@ -17559,8 +17648,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
17559
17648
|
* @param messageType
|
|
17560
17649
|
* @param thoughtSpotHost
|
|
17561
17650
|
* @param data
|
|
17651
|
+
* @param context
|
|
17562
17652
|
*/
|
|
17563
|
-
function processTrigger(iFrame, messageType, thoughtSpotHost, data) {
|
|
17653
|
+
function processTrigger(iFrame, messageType, thoughtSpotHost, data, context) {
|
|
17564
17654
|
return new Promise((res, rej) => {
|
|
17565
17655
|
var _a;
|
|
17566
17656
|
if (messageType === exports.HostEvent.Reload) {
|
|
@@ -17594,7 +17684,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
17594
17684
|
channel.port1.close();
|
|
17595
17685
|
res(new Error(ERROR_MESSAGE.TRIGGER_TIMED_OUT));
|
|
17596
17686
|
}, TRIGGER_TIMEOUT);
|
|
17597
|
-
return postIframeMessage(iFrame, { type: messageType, data }, thoughtSpotHost, channel);
|
|
17687
|
+
return postIframeMessage(iFrame, { type: messageType, data, context }, thoughtSpotHost, channel);
|
|
17598
17688
|
});
|
|
17599
17689
|
}
|
|
17600
17690
|
|
|
@@ -17940,7 +18030,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
17940
18030
|
return eventData;
|
|
17941
18031
|
}
|
|
17942
18032
|
|
|
17943
|
-
var name="@thoughtspot/visual-embed-sdk";var version$1="1.44.
|
|
18033
|
+
var name="@thoughtspot/visual-embed-sdk";var version$1="1.44.4-HE-beta.1";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports$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":"^30.0.0","@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":"^30.2.0","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:"^30.2.0","jest-environment-jsdom":"^29.7.0","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":"^29.4.6","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};
|
|
17944
18034
|
|
|
17945
18035
|
class HostEventClient {
|
|
17946
18036
|
constructor(iFrame) {
|
|
@@ -17952,16 +18042,16 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
17952
18042
|
* @param {any} data Data to send with the host event
|
|
17953
18043
|
* @returns {Promise<any>} - the response from the process trigger
|
|
17954
18044
|
*/
|
|
17955
|
-
async processTrigger(message, data) {
|
|
18045
|
+
async processTrigger(message, data, context) {
|
|
17956
18046
|
if (!this.iFrame) {
|
|
17957
18047
|
throw new Error('Iframe element is not set');
|
|
17958
18048
|
}
|
|
17959
18049
|
const thoughtspotHost = getEmbedConfig().thoughtSpotHost;
|
|
17960
|
-
return processTrigger(this.iFrame, message, thoughtspotHost, data);
|
|
18050
|
+
return processTrigger(this.iFrame, message, thoughtspotHost, data, context);
|
|
17961
18051
|
}
|
|
17962
|
-
async handleHostEventWithParam(apiName, parameters) {
|
|
18052
|
+
async handleHostEventWithParam(apiName, parameters, context) {
|
|
17963
18053
|
var _a, _b, _c, _d;
|
|
17964
|
-
const response = (_b = (_a = (await this.triggerUIPassthroughApi(apiName, parameters))) === null || _a === void 0 ? void 0 : _a.filter) === null || _b === void 0 ? void 0 : _b.call(_a, (r) => r.error || r.value)[0];
|
|
18054
|
+
const response = (_b = (_a = (await this.triggerUIPassthroughApi(apiName, parameters, context))) === null || _a === void 0 ? void 0 : _a.filter) === null || _b === void 0 ? void 0 : _b.call(_a, (r) => r.error || r.value)[0];
|
|
17965
18055
|
if (!response) {
|
|
17966
18056
|
const error = `No answer found${parameters.vizId ? ` for vizId: ${parameters.vizId}` : ''}.`;
|
|
17967
18057
|
// eslint-disable-next-line no-throw-literal
|
|
@@ -17976,8 +18066,8 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
17976
18066
|
}
|
|
17977
18067
|
return { ...response.value };
|
|
17978
18068
|
}
|
|
17979
|
-
async hostEventFallback(hostEvent, data) {
|
|
17980
|
-
return this.processTrigger(hostEvent, data);
|
|
18069
|
+
async hostEventFallback(hostEvent, data, context) {
|
|
18070
|
+
return this.processTrigger(hostEvent, data, context);
|
|
17981
18071
|
}
|
|
17982
18072
|
/**
|
|
17983
18073
|
* Setter for the iframe element used for host events
|
|
@@ -17986,49 +18076,49 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
17986
18076
|
setIframeElement(iFrame) {
|
|
17987
18077
|
this.iFrame = iFrame;
|
|
17988
18078
|
}
|
|
17989
|
-
async triggerUIPassthroughApi(apiName, parameters) {
|
|
18079
|
+
async triggerUIPassthroughApi(apiName, parameters, context) {
|
|
17990
18080
|
const res = await this.processTrigger(exports.HostEvent.UIPassthrough, {
|
|
17991
18081
|
type: apiName,
|
|
17992
18082
|
parameters,
|
|
17993
|
-
});
|
|
18083
|
+
}, context);
|
|
17994
18084
|
return res;
|
|
17995
18085
|
}
|
|
17996
|
-
async handlePinEvent(payload) {
|
|
18086
|
+
async handlePinEvent(payload, context) {
|
|
17997
18087
|
var _a, _b;
|
|
17998
18088
|
if (!payload || !('newVizName' in payload)) {
|
|
17999
|
-
return this.hostEventFallback(exports.HostEvent.Pin, payload);
|
|
18089
|
+
return this.hostEventFallback(exports.HostEvent.Pin, payload, context);
|
|
18000
18090
|
}
|
|
18001
18091
|
const formattedPayload = {
|
|
18002
18092
|
...payload,
|
|
18003
18093
|
pinboardId: (_a = payload.liveboardId) !== null && _a !== void 0 ? _a : payload.pinboardId,
|
|
18004
18094
|
newPinboardName: (_b = payload.newLiveboardName) !== null && _b !== void 0 ? _b : payload.newPinboardName,
|
|
18005
18095
|
};
|
|
18006
|
-
const data = await this.handleHostEventWithParam(UIPassthroughEvent.PinAnswerToLiveboard, formattedPayload);
|
|
18096
|
+
const data = await this.handleHostEventWithParam(UIPassthroughEvent.PinAnswerToLiveboard, formattedPayload, context);
|
|
18007
18097
|
return {
|
|
18008
18098
|
...data,
|
|
18009
18099
|
liveboardId: data.pinboardId,
|
|
18010
18100
|
};
|
|
18011
18101
|
}
|
|
18012
|
-
async handleSaveAnswerEvent(payload) {
|
|
18102
|
+
async handleSaveAnswerEvent(payload, context) {
|
|
18013
18103
|
var _a, _b, _c, _d;
|
|
18014
18104
|
if (!payload || !('name' in payload) || !('description' in payload)) {
|
|
18015
18105
|
// Save is the fallback for SaveAnswer
|
|
18016
|
-
return this.hostEventFallback(exports.HostEvent.Save, payload);
|
|
18106
|
+
return this.hostEventFallback(exports.HostEvent.Save, payload, context);
|
|
18017
18107
|
}
|
|
18018
|
-
const data = await this.handleHostEventWithParam(UIPassthroughEvent.SaveAnswer, payload);
|
|
18108
|
+
const data = await this.handleHostEventWithParam(UIPassthroughEvent.SaveAnswer, payload, context);
|
|
18019
18109
|
return {
|
|
18020
18110
|
...data,
|
|
18021
18111
|
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,
|
|
18022
18112
|
};
|
|
18023
18113
|
}
|
|
18024
|
-
async triggerHostEvent(hostEvent, payload) {
|
|
18114
|
+
async triggerHostEvent(hostEvent, payload, context) {
|
|
18025
18115
|
switch (hostEvent) {
|
|
18026
18116
|
case exports.HostEvent.Pin:
|
|
18027
|
-
return this.handlePinEvent(payload);
|
|
18117
|
+
return this.handlePinEvent(payload, context);
|
|
18028
18118
|
case exports.HostEvent.SaveAnswer:
|
|
18029
|
-
return this.handleSaveAnswerEvent(payload);
|
|
18119
|
+
return this.handleSaveAnswerEvent(payload, context);
|
|
18030
18120
|
default:
|
|
18031
|
-
return this.hostEventFallback(hostEvent, payload);
|
|
18121
|
+
return this.hostEventFallback(hostEvent, payload, context);
|
|
18032
18122
|
}
|
|
18033
18123
|
}
|
|
18034
18124
|
}
|
|
@@ -18663,6 +18753,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18663
18753
|
hiddenListColumns: this.viewConfig.hiddenListColumns || [],
|
|
18664
18754
|
customActions: customActionsResult.actions,
|
|
18665
18755
|
...getInterceptInitData(this.viewConfig),
|
|
18756
|
+
...getHostEventsConfig(this.viewConfig),
|
|
18666
18757
|
};
|
|
18667
18758
|
return baseInitData;
|
|
18668
18759
|
}
|
|
@@ -18683,9 +18774,10 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18683
18774
|
.join('/');
|
|
18684
18775
|
return `${basePath}#`;
|
|
18685
18776
|
}
|
|
18686
|
-
getUpdateEmbedParamsObject() {
|
|
18777
|
+
async getUpdateEmbedParamsObject() {
|
|
18687
18778
|
let queryParams = this.getEmbedParamsObject();
|
|
18688
|
-
|
|
18779
|
+
const appInitData = await this.getAppInitData();
|
|
18780
|
+
queryParams = { ...this.viewConfig, ...queryParams, ...appInitData };
|
|
18689
18781
|
return queryParams;
|
|
18690
18782
|
}
|
|
18691
18783
|
/**
|
|
@@ -18994,6 +19086,8 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18994
19086
|
preRenderWrapper.id = preRenderIds.wrapper;
|
|
18995
19087
|
const initialPreRenderWrapperStyle = {
|
|
18996
19088
|
position: 'absolute',
|
|
19089
|
+
top: '0',
|
|
19090
|
+
left: '0',
|
|
18997
19091
|
width: '100vw',
|
|
18998
19092
|
height: '100vh',
|
|
18999
19093
|
};
|
|
@@ -19284,7 +19378,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
19284
19378
|
* @param {any} data The payload to send with the message
|
|
19285
19379
|
* @returns A promise that resolves with the response from the embedded app
|
|
19286
19380
|
*/
|
|
19287
|
-
async trigger(messageType, data = {}) {
|
|
19381
|
+
async trigger(messageType, data = {}, context) {
|
|
19288
19382
|
uploadMixpanelEvent(`${MIXPANEL_EVENT.VISUAL_SDK_TRIGGER}-${messageType}`);
|
|
19289
19383
|
if (!this.isRendered) {
|
|
19290
19384
|
this.handleError({
|
|
@@ -19311,7 +19405,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
19311
19405
|
return null;
|
|
19312
19406
|
}
|
|
19313
19407
|
// send an empty object, this is needed for liveboard default handlers
|
|
19314
|
-
return this.hostEventClient.triggerHostEvent(messageType, data);
|
|
19408
|
+
return this.hostEventClient.triggerHostEvent(messageType, data, context);
|
|
19315
19409
|
}
|
|
19316
19410
|
/**
|
|
19317
19411
|
* Triggers an event to the embedded app, skipping the UI flow.
|
|
@@ -19344,6 +19438,19 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
19344
19438
|
handleRenderForPrerender() {
|
|
19345
19439
|
return this.render();
|
|
19346
19440
|
}
|
|
19441
|
+
/**
|
|
19442
|
+
* Get the current context of the embedded TS component.
|
|
19443
|
+
* @returns The current context object containing the page type and object ids.
|
|
19444
|
+
* @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl
|
|
19445
|
+
*/
|
|
19446
|
+
async getCurrentContext() {
|
|
19447
|
+
return new Promise((resolve) => {
|
|
19448
|
+
this.executeAfterEmbedContainerLoaded(async () => {
|
|
19449
|
+
const context = await this.trigger(exports.HostEvent.GetPageContext, {});
|
|
19450
|
+
resolve(context);
|
|
19451
|
+
});
|
|
19452
|
+
});
|
|
19453
|
+
}
|
|
19347
19454
|
/**
|
|
19348
19455
|
* Creates the preRender shell
|
|
19349
19456
|
* @param showPreRenderByDefault - Show the preRender after render, hidden by default
|
|
@@ -19458,8 +19565,20 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
19458
19565
|
}
|
|
19459
19566
|
this.validatePreRenderViewConfig(this.viewConfig);
|
|
19460
19567
|
logger$3.debug('triggering UpdateEmbedParams', this.viewConfig);
|
|
19461
|
-
this.executeAfterEmbedContainerLoaded(() => {
|
|
19462
|
-
|
|
19568
|
+
this.executeAfterEmbedContainerLoaded(async () => {
|
|
19569
|
+
try {
|
|
19570
|
+
const params = await this.getUpdateEmbedParamsObject();
|
|
19571
|
+
this.trigger(exports.HostEvent.UpdateEmbedParams, params);
|
|
19572
|
+
}
|
|
19573
|
+
catch (error) {
|
|
19574
|
+
logger$3.error(ERROR_MESSAGE.UPDATE_PARAMS_FAILED, error);
|
|
19575
|
+
this.handleError({
|
|
19576
|
+
errorType: ErrorDetailsTypes.API,
|
|
19577
|
+
message: (error === null || error === void 0 ? void 0 : error.message) || ERROR_MESSAGE.UPDATE_PARAMS_FAILED,
|
|
19578
|
+
code: EmbedErrorCodes.UPDATE_PARAMS_FAILED,
|
|
19579
|
+
error: (error === null || error === void 0 ? void 0 : error.message) || error,
|
|
19580
|
+
});
|
|
19581
|
+
}
|
|
19463
19582
|
});
|
|
19464
19583
|
}
|
|
19465
19584
|
this.beforePrerenderVisible();
|
|
@@ -19479,7 +19598,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
19479
19598
|
this.resizeObserver.observe(this.el);
|
|
19480
19599
|
}
|
|
19481
19600
|
}
|
|
19482
|
-
removeStyleProperties(this.preRenderWrapper, ['z-index', 'opacity', 'pointer-events']);
|
|
19601
|
+
removeStyleProperties(this.preRenderWrapper, ['z-index', 'opacity', 'pointer-events', 'overflow']);
|
|
19483
19602
|
this.subscribeToEvents();
|
|
19484
19603
|
// Setup fullscreen change handler for prerendered components
|
|
19485
19604
|
if (this.iFrame) {
|
|
@@ -19522,7 +19641,10 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
19522
19641
|
opacity: '0',
|
|
19523
19642
|
pointerEvents: 'none',
|
|
19524
19643
|
zIndex: '-1000',
|
|
19525
|
-
position: 'absolute
|
|
19644
|
+
position: 'absolute',
|
|
19645
|
+
top: '0',
|
|
19646
|
+
left: '0',
|
|
19647
|
+
overflow: 'hidden',
|
|
19526
19648
|
};
|
|
19527
19649
|
setStyleProperties(this.preRenderWrapper, preRenderHideStyles);
|
|
19528
19650
|
if (this.resizeObserver) {
|
|
@@ -19729,6 +19851,15 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
19729
19851
|
const defaultAppInitData = await super.getAppInitData();
|
|
19730
19852
|
return { ...defaultAppInitData, ...this.getSearchInitData() };
|
|
19731
19853
|
}
|
|
19854
|
+
/**
|
|
19855
|
+
* Get the current context of the embedded search bar.
|
|
19856
|
+
* @returns The current context object containing the page type and object ids.
|
|
19857
|
+
* @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl
|
|
19858
|
+
*/
|
|
19859
|
+
async getCurrentContext() {
|
|
19860
|
+
const context = await super.getCurrentContext();
|
|
19861
|
+
return context;
|
|
19862
|
+
}
|
|
19732
19863
|
};
|
|
19733
19864
|
|
|
19734
19865
|
/**
|
|
@@ -19811,6 +19942,15 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
19811
19942
|
await this.renderV1Embed(src);
|
|
19812
19943
|
return this;
|
|
19813
19944
|
}
|
|
19945
|
+
/**
|
|
19946
|
+
* Get the current context of the embedded SageEmbed.
|
|
19947
|
+
* @returns The current context object containing the page type and object ids.
|
|
19948
|
+
* @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl
|
|
19949
|
+
*/
|
|
19950
|
+
async getCurrentContext() {
|
|
19951
|
+
const context = await super.getCurrentContext();
|
|
19952
|
+
return context;
|
|
19953
|
+
}
|
|
19814
19954
|
};
|
|
19815
19955
|
|
|
19816
19956
|
/**
|
|
@@ -19986,6 +20126,15 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
19986
20126
|
});
|
|
19987
20127
|
return this;
|
|
19988
20128
|
}
|
|
20129
|
+
/**
|
|
20130
|
+
* Get the current context of the embedded search.
|
|
20131
|
+
* @returns The current context object containing the page type and object ids.
|
|
20132
|
+
* @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl
|
|
20133
|
+
*/
|
|
20134
|
+
async getCurrentContext() {
|
|
20135
|
+
const context = await super.getCurrentContext();
|
|
20136
|
+
return context;
|
|
20137
|
+
}
|
|
19989
20138
|
};
|
|
19990
20139
|
|
|
19991
20140
|
/**
|
|
@@ -20534,6 +20683,7 @@ query GetEurekaVizSnapshots(
|
|
|
20534
20683
|
super(domSelector, viewConfig);
|
|
20535
20684
|
this.defaultHeight = 500;
|
|
20536
20685
|
this.sendFullHeightLazyLoadData = () => {
|
|
20686
|
+
console.log('sendFullHeightLazyLoadData', this.iFrame);
|
|
20537
20687
|
const data = calculateVisibleElementData(this.iFrame);
|
|
20538
20688
|
this.trigger(exports.HostEvent.VisibleEmbedCoordinates, data);
|
|
20539
20689
|
};
|
|
@@ -20794,7 +20944,7 @@ query GetEurekaVizSnapshots(
|
|
|
20794
20944
|
* @param {any} data The payload to send with the message
|
|
20795
20945
|
* @returns A promise that resolves with the response from the embedded app
|
|
20796
20946
|
*/
|
|
20797
|
-
trigger(messageType, data = {}) {
|
|
20947
|
+
trigger(messageType, data = {}, context) {
|
|
20798
20948
|
const dataWithVizId = data;
|
|
20799
20949
|
if (messageType === exports.HostEvent.SetActiveTab) {
|
|
20800
20950
|
this.setActiveTab(data);
|
|
@@ -20803,7 +20953,7 @@ query GetEurekaVizSnapshots(
|
|
|
20803
20953
|
if (typeof dataWithVizId === 'object' && this.viewConfig.vizId) {
|
|
20804
20954
|
dataWithVizId.vizId = this.viewConfig.vizId;
|
|
20805
20955
|
}
|
|
20806
|
-
return super.trigger(messageType, dataWithVizId);
|
|
20956
|
+
return super.trigger(messageType, dataWithVizId, context);
|
|
20807
20957
|
}
|
|
20808
20958
|
/**
|
|
20809
20959
|
* Destroys the ThoughtSpot embed, and remove any nodes from the DOM.
|
|
@@ -20872,6 +21022,15 @@ query GetEurekaVizSnapshots(
|
|
|
20872
21022
|
}
|
|
20873
21023
|
return url;
|
|
20874
21024
|
}
|
|
21025
|
+
/**
|
|
21026
|
+
* Get the current context of the embedded liveboard.
|
|
21027
|
+
* @returns The current context object containing the page type and object ids.
|
|
21028
|
+
* @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl
|
|
21029
|
+
*/
|
|
21030
|
+
async getCurrentContext() {
|
|
21031
|
+
const context = await super.getCurrentContext();
|
|
21032
|
+
return context;
|
|
21033
|
+
}
|
|
20875
21034
|
};
|
|
20876
21035
|
|
|
20877
21036
|
const createConversation = `
|
|
@@ -21496,6 +21655,15 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
21496
21655
|
await this.renderIFrame(src);
|
|
21497
21656
|
return this;
|
|
21498
21657
|
}
|
|
21658
|
+
/**
|
|
21659
|
+
* Get the current context of the embedded SpotterEmbed.
|
|
21660
|
+
* @returns The current context object containing the page type and object ids.
|
|
21661
|
+
* @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl
|
|
21662
|
+
*/
|
|
21663
|
+
async getCurrentContext() {
|
|
21664
|
+
const context = await super.getCurrentContext();
|
|
21665
|
+
return context;
|
|
21666
|
+
}
|
|
21499
21667
|
};
|
|
21500
21668
|
/**
|
|
21501
21669
|
* Embed ThoughtSpot AI Conversation.
|