@thoughtspot/visual-embed-sdk 1.46.5 → 1.47.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/cjs/package.json +1 -1
- package/cjs/src/embed/app.d.ts +9 -0
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +7 -2
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/app.spec.js +22 -2
- package/cjs/src/embed/app.spec.js.map +1 -1
- package/cjs/src/embed/conversation.d.ts +10 -1
- package/cjs/src/embed/conversation.d.ts.map +1 -1
- package/cjs/src/embed/conversation.js +2 -1
- package/cjs/src/embed/conversation.js.map +1 -1
- package/cjs/src/embed/hostEventClient/utils.d.ts.map +1 -1
- package/cjs/src/embed/hostEventClient/utils.js +7 -1
- package/cjs/src/embed/hostEventClient/utils.js.map +1 -1
- package/cjs/src/embed/hostEventClient/utils.spec.js +80 -5
- package/cjs/src/embed/hostEventClient/utils.spec.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts +9 -0
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +4 -1
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +12 -4
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/embed/ts-embed.spec.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.spec.js +28 -67
- package/cjs/src/embed/ts-embed.spec.js.map +1 -1
- package/cjs/src/errors.d.ts +0 -1
- package/cjs/src/errors.d.ts.map +1 -1
- package/cjs/src/errors.js +0 -1
- package/cjs/src/errors.js.map +1 -1
- package/cjs/src/index.d.ts +1 -2
- package/cjs/src/index.d.ts.map +1 -1
- package/cjs/src/index.js +2 -4
- package/cjs/src/index.js.map +1 -1
- package/cjs/src/react/all-types-export.d.ts +2 -2
- package/cjs/src/react/all-types-export.d.ts.map +1 -1
- package/cjs/src/react/all-types-export.js +1 -3
- package/cjs/src/react/all-types-export.js.map +1 -1
- package/cjs/src/react/index.d.ts +1 -36
- package/cjs/src/react/index.d.ts.map +1 -1
- package/cjs/src/react/index.js +1 -34
- package/cjs/src/react/index.js.map +1 -1
- package/cjs/src/types.d.ts +42 -74
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +18 -46
- package/cjs/src/types.js.map +1 -1
- package/dist/{index-ChNydfIz.js → index-CUgxBnPm.js} +1 -1
- package/dist/src/embed/app.d.ts +9 -0
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/conversation.d.ts +10 -1
- package/dist/src/embed/conversation.d.ts.map +1 -1
- package/dist/src/embed/hostEventClient/utils.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts +9 -0
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.spec.d.ts.map +1 -1
- package/dist/src/errors.d.ts +0 -1
- package/dist/src/errors.d.ts.map +1 -1
- package/dist/src/index.d.ts +1 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/react/all-types-export.d.ts +2 -2
- package/dist/src/react/all-types-export.d.ts.map +1 -1
- package/dist/src/react/index.d.ts +1 -36
- package/dist/src/react/index.d.ts.map +1 -1
- package/dist/src/types.d.ts +42 -74
- package/dist/src/types.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +72 -200
- package/dist/tsembed-react.js +60 -190
- package/dist/tsembed.es.js +87 -181
- package/dist/tsembed.js +30812 -30907
- package/dist/visual-embed-sdk-react-full.d.ts +71 -255
- package/dist/visual-embed-sdk-react.d.ts +71 -255
- package/dist/visual-embed-sdk.d.ts +69 -225
- package/lib/package.json +1 -1
- package/lib/src/embed/app.d.ts +9 -0
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +7 -2
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/app.spec.js +22 -2
- package/lib/src/embed/app.spec.js.map +1 -1
- package/lib/src/embed/conversation.d.ts +10 -1
- package/lib/src/embed/conversation.d.ts.map +1 -1
- package/lib/src/embed/conversation.js +2 -1
- package/lib/src/embed/conversation.js.map +1 -1
- package/lib/src/embed/hostEventClient/utils.d.ts.map +1 -1
- package/lib/src/embed/hostEventClient/utils.js +7 -1
- package/lib/src/embed/hostEventClient/utils.js.map +1 -1
- package/lib/src/embed/hostEventClient/utils.spec.js +80 -5
- package/lib/src/embed/hostEventClient/utils.spec.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts +9 -0
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +4 -1
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +12 -4
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/embed/ts-embed.spec.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.spec.js +30 -69
- package/lib/src/embed/ts-embed.spec.js.map +1 -1
- package/lib/src/errors.d.ts +0 -1
- package/lib/src/errors.d.ts.map +1 -1
- package/lib/src/errors.js +0 -1
- package/lib/src/errors.js.map +1 -1
- package/lib/src/index.d.ts +1 -2
- package/lib/src/index.d.ts.map +1 -1
- package/lib/src/index.js +1 -2
- package/lib/src/index.js.map +1 -1
- package/lib/src/react/all-types-export.d.ts +2 -2
- package/lib/src/react/all-types-export.d.ts.map +1 -1
- package/lib/src/react/all-types-export.js +1 -1
- package/lib/src/react/all-types-export.js.map +1 -1
- package/lib/src/react/index.d.ts +1 -36
- package/lib/src/react/index.d.ts.map +1 -1
- package/lib/src/react/index.js +0 -33
- package/lib/src/react/index.js.map +1 -1
- package/lib/src/types.d.ts +42 -74
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +18 -46
- package/lib/src/types.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +69 -225
- package/package.json +1 -1
- package/src/embed/app.spec.ts +33 -3
- package/src/embed/app.ts +18 -3
- package/src/embed/conversation.ts +15 -4
- package/src/embed/hostEventClient/utils.spec.ts +94 -6
- package/src/embed/hostEventClient/utils.ts +15 -2
- package/src/embed/liveboard.ts +13 -0
- package/src/embed/ts-embed.spec.ts +56 -108
- package/src/embed/ts-embed.ts +10 -3
- package/src/errors.ts +0 -1
- package/src/index.ts +2 -5
- package/src/react/all-types-export.ts +0 -3
- package/src/react/index.tsx +15 -59
- package/src/types.ts +103 -137
- package/cjs/src/embed/sage.d.ts +0 -164
- package/cjs/src/embed/sage.d.ts.map +0 -1
- package/cjs/src/embed/sage.js +0 -88
- package/cjs/src/embed/sage.js.map +0 -1
- package/cjs/src/embed/sage.spec.d.ts +0 -2
- package/cjs/src/embed/sage.spec.d.ts.map +0 -1
- package/cjs/src/embed/sage.spec.js +0 -151
- package/cjs/src/embed/sage.spec.js.map +0 -1
- package/dist/index-DGV_zh53.js +0 -7371
- package/dist/index-DW2wEHqy.js +0 -7371
- package/dist/src/embed/sage.d.ts +0 -164
- package/dist/src/embed/sage.d.ts.map +0 -1
- package/dist/src/embed/sage.spec.d.ts +0 -2
- package/dist/src/embed/sage.spec.d.ts.map +0 -1
- package/lib/src/embed/sage.d.ts +0 -164
- package/lib/src/embed/sage.d.ts.map +0 -1
- package/lib/src/embed/sage.js +0 -84
- package/lib/src/embed/sage.js.map +0 -1
- package/lib/src/embed/sage.spec.d.ts +0 -2
- package/lib/src/embed/sage.spec.d.ts.map +0 -1
- package/lib/src/embed/sage.spec.js +0 -148
- package/lib/src/embed/sage.spec.js.map +0 -1
- package/src/embed/sage.spec.ts +0 -206
- package/src/embed/sage.ts +0 -231
package/dist/tsembed-react.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @thoughtspot/visual-embed-sdk version 1.
|
|
1
|
+
/* @thoughtspot/visual-embed-sdk version 1.47.1 */
|
|
2
2
|
'use client';
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) :
|
|
@@ -1471,19 +1471,6 @@
|
|
|
1471
1471
|
* @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl, 9.5.0.sw
|
|
1472
1472
|
*/
|
|
1473
1473
|
EmbedEvent["FilterChanged"] = "filterChanged";
|
|
1474
|
-
/**
|
|
1475
|
-
* Emitted when a user clicks the **Go** button to initiate
|
|
1476
|
-
* a Natural Language Search query
|
|
1477
|
-
* @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
|
|
1478
|
-
*/
|
|
1479
|
-
EmbedEvent["SageEmbedQuery"] = "sageEmbedQuery";
|
|
1480
|
-
/**
|
|
1481
|
-
* Emitted when a user selects a data source on the embedded
|
|
1482
|
-
* Natural Language Search interface.
|
|
1483
|
-
*
|
|
1484
|
-
* @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
|
|
1485
|
-
*/
|
|
1486
|
-
EmbedEvent["SageWorksheetUpdated"] = "sageWorksheetUpdated";
|
|
1487
1474
|
/**
|
|
1488
1475
|
* Emitted when a user updates a connection on the **Data** page
|
|
1489
1476
|
* @version SDK: 1.27.0 | ThoughtSpot: 9.8.0.cl, 9.8.0.sw
|
|
@@ -2947,7 +2934,7 @@
|
|
|
2947
2934
|
* tml.answer.search_query // TML representation of the search query
|
|
2948
2935
|
* );
|
|
2949
2936
|
* })
|
|
2950
|
-
|
|
2937
|
+
* ```
|
|
2951
2938
|
* @example
|
|
2952
2939
|
* ```js
|
|
2953
2940
|
* // Get TML from search context
|
|
@@ -3571,21 +3558,6 @@
|
|
|
3571
3558
|
* @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
|
|
3572
3559
|
*/
|
|
3573
3560
|
HostEvent["SetHiddenTabs"] = "SetPinboardHiddenTabs";
|
|
3574
|
-
/**
|
|
3575
|
-
* Updates the search query string for Natural Language Search operations.
|
|
3576
|
-
* @param - Includes the following keys:
|
|
3577
|
-
* - `queryString`: Text string in Natural Language format.
|
|
3578
|
-
* - `executeSearch`: Boolean to execute search and update search query.
|
|
3579
|
-
* @example
|
|
3580
|
-
* ```js
|
|
3581
|
-
* sageEmbed.trigger(HostEvent.UpdateSageQuery, {
|
|
3582
|
-
* queryString: 'revenue per year',
|
|
3583
|
-
* executeSearch: true,
|
|
3584
|
-
* })
|
|
3585
|
-
* ```
|
|
3586
|
-
* @version SDK: 1.26.0 | ThoughtSpot: 9.8.0.cl, 9.8.0.sw
|
|
3587
|
-
*/
|
|
3588
|
-
HostEvent["UpdateSageQuery"] = "updateSageQuery";
|
|
3589
3561
|
/**
|
|
3590
3562
|
* Get the Answer session for a Search or
|
|
3591
3563
|
* Liveboard visualization.
|
|
@@ -4151,7 +4123,6 @@
|
|
|
4151
4123
|
Param["HideNotification"] = "hideNotification";
|
|
4152
4124
|
Param["HideApplicationSwitcher"] = "applicationSwitcherHidden";
|
|
4153
4125
|
Param["HideOrgSwitcher"] = "orgSwitcherHidden";
|
|
4154
|
-
Param["IsSageEmbed"] = "isSageEmbed";
|
|
4155
4126
|
Param["HideWorksheetSelector"] = "hideWorksheetSelector";
|
|
4156
4127
|
Param["DisableWorksheetChange"] = "disableWorksheetChange";
|
|
4157
4128
|
Param["HideSourceSelection"] = "hideSourceSelection";
|
|
@@ -4223,6 +4194,7 @@
|
|
|
4223
4194
|
Param["isLinkParametersEnabled"] = "isLinkParametersEnabled";
|
|
4224
4195
|
Param["EnablePastConversationsSidebar"] = "enablePastConversationsSidebar";
|
|
4225
4196
|
Param["UpdatedSpotterChatPrompt"] = "updatedSpotterChatPrompt";
|
|
4197
|
+
Param["EnableStopAnswerGenerationEmbed"] = "enableStopAnswerGenerationEmbed";
|
|
4226
4198
|
Param["SpotterSidebarTitle"] = "spotterSidebarTitle";
|
|
4227
4199
|
Param["SpotterSidebarDefaultExpanded"] = "spotterSidebarDefaultExpanded";
|
|
4228
4200
|
Param["SpotterChatRenameLabel"] = "spotterChatRenameLabel";
|
|
@@ -5529,11 +5501,11 @@
|
|
|
5529
5501
|
*/
|
|
5530
5502
|
Action["CoverAndFilterOptionInPDF"] = "coverAndFilterOptionInPDF";
|
|
5531
5503
|
/**
|
|
5532
|
-
|
|
5533
|
-
|
|
5534
|
-
|
|
5535
|
-
|
|
5536
|
-
|
|
5504
|
+
* Action ID to hide or disable the Coaching workflow in Spotter conversations.
|
|
5505
|
+
* When disabled, users cannot access **Add to Coaching** workflow in conversation.
|
|
5506
|
+
* The **Add to Coaching** feature allows adding reference questions and
|
|
5507
|
+
* business terms to improve Spotter’s responses. This feature is generally available
|
|
5508
|
+
* (GA) from version 26.2.0.cl and enabled by default on embed deployments.
|
|
5537
5509
|
* @example
|
|
5538
5510
|
* ```js
|
|
5539
5511
|
* hiddenAction: [Action.InConversationTraining]
|
|
@@ -5610,17 +5582,17 @@
|
|
|
5610
5582
|
*/
|
|
5611
5583
|
Action["LiveboardStylePanel"] = "liveboardStylePanel";
|
|
5612
5584
|
/**
|
|
5613
|
-
|
|
5614
|
-
|
|
5615
|
-
|
|
5616
|
-
|
|
5617
|
-
|
|
5618
|
-
|
|
5619
|
-
|
|
5620
|
-
|
|
5621
|
-
|
|
5622
|
-
|
|
5623
|
-
|
|
5585
|
+
* The **Publish** action for Liveboards, Answers and Models.
|
|
5586
|
+
* Opens the publishing modal. It's a parent action for the
|
|
5587
|
+
* **Manage Publishing** and **Unpublish** actions if the object
|
|
5588
|
+
* is already published, otherwise appears standalone.
|
|
5589
|
+
* @example
|
|
5590
|
+
* ```js
|
|
5591
|
+
* hiddenActions: [Action.Publish]
|
|
5592
|
+
* disabledActions: [Action.Publish]
|
|
5593
|
+
* ```
|
|
5594
|
+
* @version SDK: 1.45.0 | ThoughtSpot Cloud: 26.2.0.cl
|
|
5595
|
+
*/
|
|
5624
5596
|
Action["Publish"] = "publish";
|
|
5625
5597
|
/**
|
|
5626
5598
|
* The **Manage Publishing** action for Liveboards, Answers and Models.
|
|
@@ -6255,7 +6227,6 @@
|
|
|
6255
6227
|
LIVEBOARD_VIZ_ID_VALIDATION: 'Please select a Liveboard to embed.',
|
|
6256
6228
|
TRIGGER_TIMED_OUT: 'Trigger timed-out in getting a response',
|
|
6257
6229
|
SEARCHEMBED_BETA_WRANING_MESSAGE: 'SearchEmbed is in Beta in this release.',
|
|
6258
|
-
SAGE_EMBED_BETA_WARNING_MESSAGE: 'SageEmbed is in Beta in this release.',
|
|
6259
6230
|
THIRD_PARTY_COOKIE_BLOCKED_ALERT: 'Third-party cookie access is blocked on this browser. Please allow third-party cookies for this to work properly. \nYou can use `suppressNoCookieAccessAlert` to suppress this message.',
|
|
6260
6231
|
DUPLICATE_TOKEN_ERR: 'Duplicate token. Please issue a new token every time getAuthToken callback is called. See https://developers.thoughtspot.com/docs/?pageid=embed-auth#trusted-auth-embed for more details.',
|
|
6261
6232
|
SDK_NOT_INITIALIZED: 'SDK not initialized',
|
|
@@ -8293,9 +8264,9 @@
|
|
|
8293
8264
|
|
|
8294
8265
|
var stubFalse_1 = stubFalse;
|
|
8295
8266
|
|
|
8296
|
-
var isBuffer_1 = createCommonjsModule(function (module, exports) {
|
|
8267
|
+
var isBuffer_1 = createCommonjsModule(function (module, exports$1) {
|
|
8297
8268
|
/** Detect free variable `exports`. */
|
|
8298
|
-
var freeExports = exports && !exports.nodeType && exports;
|
|
8269
|
+
var freeExports = exports$1 && !exports$1.nodeType && exports$1;
|
|
8299
8270
|
|
|
8300
8271
|
/** Detect free variable `module`. */
|
|
8301
8272
|
var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
|
|
@@ -8465,9 +8436,9 @@
|
|
|
8465
8436
|
|
|
8466
8437
|
var _baseUnary = baseUnary;
|
|
8467
8438
|
|
|
8468
|
-
var _nodeUtil = createCommonjsModule(function (module, exports) {
|
|
8439
|
+
var _nodeUtil = createCommonjsModule(function (module, exports$1) {
|
|
8469
8440
|
/** Detect free variable `exports`. */
|
|
8470
|
-
var freeExports = exports && !exports.nodeType && exports;
|
|
8441
|
+
var freeExports = exports$1 && !exports$1.nodeType && exports$1;
|
|
8471
8442
|
|
|
8472
8443
|
/** Detect free variable `module`. */
|
|
8473
8444
|
var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
|
|
@@ -10368,9 +10339,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
10368
10339
|
|
|
10369
10340
|
var _stringToPath = stringToPath;
|
|
10370
10341
|
|
|
10371
|
-
/** Used as references for various `Number` constants. */
|
|
10372
|
-
var INFINITY$1 = 1 / 0;
|
|
10373
|
-
|
|
10374
10342
|
/** Used to convert symbols to primitives and strings. */
|
|
10375
10343
|
var symbolProto = _Symbol ? _Symbol.prototype : undefined,
|
|
10376
10344
|
symbolToString = symbolProto ? symbolProto.toString : undefined;
|
|
@@ -10396,7 +10364,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
10396
10364
|
return symbolToString ? symbolToString.call(value) : '';
|
|
10397
10365
|
}
|
|
10398
10366
|
var result = (value + '');
|
|
10399
|
-
return (result == '0' && (1 / value) == -
|
|
10367
|
+
return (result == '0' && (1 / value) == -Infinity) ? '-0' : result;
|
|
10400
10368
|
}
|
|
10401
10369
|
|
|
10402
10370
|
var _baseToString = baseToString;
|
|
@@ -10445,9 +10413,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
10445
10413
|
|
|
10446
10414
|
var _castPath = castPath;
|
|
10447
10415
|
|
|
10448
|
-
/** Used as references for various `Number` constants. */
|
|
10449
|
-
var INFINITY = 1 / 0;
|
|
10450
|
-
|
|
10451
10416
|
/**
|
|
10452
10417
|
* Converts `value` to a string key if it's not a string or symbol.
|
|
10453
10418
|
*
|
|
@@ -10460,7 +10425,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
10460
10425
|
return value;
|
|
10461
10426
|
}
|
|
10462
10427
|
var result = (value + '');
|
|
10463
|
-
return (result == '0' && (1 / value) == -
|
|
10428
|
+
return (result == '0' && (1 / value) == -Infinity) ? '-0' : result;
|
|
10464
10429
|
}
|
|
10465
10430
|
|
|
10466
10431
|
var _toKey = toKey;
|
|
@@ -17772,10 +17737,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
17772
17737
|
VISUAL_SDK_RENDER_FAILED: 'visual-sdk-render-failed',
|
|
17773
17738
|
VISUAL_SDK_TRIGGER: 'visual-sdk-trigger',
|
|
17774
17739
|
VISUAL_SDK_ON: 'visual-sdk-on',
|
|
17775
|
-
|
|
17776
|
-
VISUAL_SDK_EMBED_CREATE: 'visual-sdk-embed-create',
|
|
17777
|
-
VERCEL_INTEGRATION_COMPLETED: 'vercel-integration-completed',
|
|
17778
|
-
};
|
|
17740
|
+
VISUAL_SDK_EMBED_CREATE: 'visual-sdk-embed-create'};
|
|
17779
17741
|
let isMixpanelInitialized = false;
|
|
17780
17742
|
let eventQueue = [];
|
|
17781
17743
|
/**
|
|
@@ -19325,12 +19287,18 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
19325
19287
|
return eventData;
|
|
19326
19288
|
}
|
|
19327
19289
|
|
|
19328
|
-
var
|
|
19290
|
+
var version$1="1.47.1";var pkgInfo = {version:version$1};
|
|
19329
19291
|
|
|
19330
19292
|
function isValidUpdateFiltersPayload(payload) {
|
|
19331
19293
|
if (!payload)
|
|
19332
19294
|
return false;
|
|
19333
|
-
const isValidFilter = (f) =>
|
|
19295
|
+
const isValidFilter = (f) => {
|
|
19296
|
+
const hasColumn = typeof f.column === 'string' || typeof f.columnName === 'string';
|
|
19297
|
+
const hasOperator = typeof f.oper === 'string' || typeof f.operator === 'string';
|
|
19298
|
+
const hasValues = Array.isArray(f.values);
|
|
19299
|
+
const validType = !f.type || typeof f.type === 'string';
|
|
19300
|
+
return hasColumn && hasOperator && hasValues && validType;
|
|
19301
|
+
};
|
|
19334
19302
|
const hasValidFilter = payload.filter && isValidFilter(payload.filter);
|
|
19335
19303
|
const hasValidFilters = Array.isArray(payload.filters) && payload.filters.length > 0 && payload.filters.every(isValidFilter);
|
|
19336
19304
|
return !!(hasValidFilter || hasValidFilters);
|
|
@@ -21017,6 +20985,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
21017
20985
|
try {
|
|
21018
20986
|
this.removeFullscreenChangeHandler();
|
|
21019
20987
|
this.unsubscribeToEvents();
|
|
20988
|
+
if (!this.isRendered) {
|
|
20989
|
+
return;
|
|
20990
|
+
}
|
|
21020
20991
|
if (!getEmbedConfig().waitForCleanupOnDestroy) {
|
|
21021
20992
|
this.trigger(exports.HostEvent.DestroyEmbed);
|
|
21022
20993
|
(_b = (_a = this.insertedDomEl) === null || _a === void 0 ? void 0 : _a.parentNode) === null || _b === void 0 ? void 0 : _b.removeChild(this.insertedDomEl);
|
|
@@ -21026,11 +20997,16 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
21026
20997
|
Promise.race([
|
|
21027
20998
|
this.trigger(exports.HostEvent.DestroyEmbed),
|
|
21028
20999
|
new Promise((resolve) => setTimeout(resolve, cleanupTimeout)),
|
|
21029
|
-
]).
|
|
21030
|
-
var _a, _b;
|
|
21031
|
-
(_b = (_a = this.insertedDomEl) === null || _a === void 0 ? void 0 : _a.parentNode) === null || _b === void 0 ? void 0 : _b.removeChild(this.insertedDomEl);
|
|
21032
|
-
}).catch((e) => {
|
|
21000
|
+
]).catch((e) => {
|
|
21033
21001
|
logger$3.log('Error destroying TS Embed', e);
|
|
21002
|
+
}).finally(() => {
|
|
21003
|
+
var _a, _b;
|
|
21004
|
+
try {
|
|
21005
|
+
(_b = (_a = this.insertedDomEl) === null || _a === void 0 ? void 0 : _a.parentNode) === null || _b === void 0 ? void 0 : _b.removeChild(this.insertedDomEl);
|
|
21006
|
+
}
|
|
21007
|
+
catch (e) {
|
|
21008
|
+
logger$3.log('Error removing DOM element on destroy', e);
|
|
21009
|
+
}
|
|
21034
21010
|
});
|
|
21035
21011
|
}
|
|
21036
21012
|
}
|
|
@@ -21371,87 +21347,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
21371
21347
|
}
|
|
21372
21348
|
};
|
|
21373
21349
|
|
|
21374
|
-
/**
|
|
21375
|
-
* Copyright (c) 2023
|
|
21376
|
-
*
|
|
21377
|
-
* Embed ThoughtSpot Sage
|
|
21378
|
-
* @summary TS Sage embed
|
|
21379
|
-
* @author Mourya Balabhadra <mourya.balabhadra@thoughtspot.com>
|
|
21380
|
-
*/
|
|
21381
|
-
/**
|
|
21382
|
-
* Embed ThoughtSpot LLM and GPT-based Natural Language Search component.
|
|
21383
|
-
* @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl, 9.5.1-sw
|
|
21384
|
-
*
|
|
21385
|
-
* Note: This embed will be deprecated from SDK: 1.40.0 | ThoughtSpot: 10.13.0.cl
|
|
21386
|
-
* @group Embed components
|
|
21387
|
-
*/
|
|
21388
|
-
let SageEmbed$1 = class SageEmbed extends V1Embed {
|
|
21389
|
-
constructor(domSelector, viewConfig) {
|
|
21390
|
-
viewConfig.embedComponentType = 'SageEmbed';
|
|
21391
|
-
super(domSelector, viewConfig);
|
|
21392
|
-
}
|
|
21393
|
-
getEmbedParamsObject() {
|
|
21394
|
-
const { disableWorksheetChange, hideWorksheetSelector, showObjectSuggestions, dataPanelV2, hideSampleQuestions, isProductTour, hideSageAnswerHeader, hideAutocompleteSuggestions, } = this.viewConfig;
|
|
21395
|
-
const params = this.getBaseQueryParams();
|
|
21396
|
-
params[Param.DataPanelV2Enabled] = !!dataPanelV2;
|
|
21397
|
-
params[Param.IsSageEmbed] = true;
|
|
21398
|
-
params[Param.DisableWorksheetChange] = !!disableWorksheetChange;
|
|
21399
|
-
params[Param.HideWorksheetSelector] = !!hideWorksheetSelector;
|
|
21400
|
-
params[Param.HideEurekaSuggestions] = !!hideAutocompleteSuggestions;
|
|
21401
|
-
if (showObjectSuggestions) {
|
|
21402
|
-
params[Param.HideEurekaSuggestions] = !showObjectSuggestions;
|
|
21403
|
-
// support backwards compatibility
|
|
21404
|
-
}
|
|
21405
|
-
params[Param.HideSampleQuestions] = !!hideSampleQuestions;
|
|
21406
|
-
params[Param.IsProductTour] = !!isProductTour;
|
|
21407
|
-
params[Param.HideSageAnswerHeader] = !!hideSageAnswerHeader;
|
|
21408
|
-
return params;
|
|
21409
|
-
}
|
|
21410
|
-
/**
|
|
21411
|
-
* Constructs a map of parameters to be passed on to the
|
|
21412
|
-
* embedded Eureka or Sage search page.
|
|
21413
|
-
* @returns {string} query string
|
|
21414
|
-
*/
|
|
21415
|
-
getEmbedParams() {
|
|
21416
|
-
const params = this.getEmbedParamsObject();
|
|
21417
|
-
return getQueryParamString(params, true);
|
|
21418
|
-
}
|
|
21419
|
-
/**
|
|
21420
|
-
* Construct the URL of the embedded ThoughtSpot sage to be
|
|
21421
|
-
* loaded in the iframe
|
|
21422
|
-
* @returns {string} iframe url
|
|
21423
|
-
*/
|
|
21424
|
-
getIFrameSrc() {
|
|
21425
|
-
const path = 'eureka';
|
|
21426
|
-
const postHashObj = {};
|
|
21427
|
-
const tsPostHashParams = this.getThoughtSpotPostUrlParams();
|
|
21428
|
-
const { dataSource, searchOptions, } = this.viewConfig;
|
|
21429
|
-
if (dataSource)
|
|
21430
|
-
postHashObj[Param.WorksheetId] = dataSource;
|
|
21431
|
-
if ((searchOptions === null || searchOptions === void 0 ? void 0 : searchOptions.searchQuery) && searchOptions.executeSearch) {
|
|
21432
|
-
postHashObj[Param.executeSearch] = true;
|
|
21433
|
-
}
|
|
21434
|
-
let sagePostHashParams = new URLSearchParams(postHashObj).toString();
|
|
21435
|
-
if (sagePostHashParams)
|
|
21436
|
-
sagePostHashParams = `${tsPostHashParams ? '&' : '?'}${sagePostHashParams}`;
|
|
21437
|
-
if (searchOptions === null || searchOptions === void 0 ? void 0 : searchOptions.searchQuery)
|
|
21438
|
-
sagePostHashParams += `${sagePostHashParams ? '&' : '?'}${[Param.Query]}=${encodeURIComponent(searchOptions.searchQuery)}`;
|
|
21439
|
-
// use encodeURIComponent for query instead of URLSearchParams
|
|
21440
|
-
// as it adds + instead of %20 for spaces
|
|
21441
|
-
return `${this.getRootIframeSrc()}/embed/${path}${tsPostHashParams}${sagePostHashParams}`;
|
|
21442
|
-
}
|
|
21443
|
-
/**
|
|
21444
|
-
* Render the embedded ThoughtSpot Sage
|
|
21445
|
-
* @returns {SageEmbed} Eureka/Sage embed
|
|
21446
|
-
*/
|
|
21447
|
-
async render() {
|
|
21448
|
-
await super.render();
|
|
21449
|
-
const src = this.getIFrameSrc();
|
|
21450
|
-
await this.renderV1Embed(src);
|
|
21451
|
-
return this;
|
|
21452
|
-
}
|
|
21453
|
-
};
|
|
21454
|
-
|
|
21455
21350
|
/**
|
|
21456
21351
|
* Copyright (c) 2022
|
|
21457
21352
|
*
|
|
@@ -21623,7 +21518,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
21623
21518
|
*/
|
|
21624
21519
|
async render() {
|
|
21625
21520
|
await super.render();
|
|
21626
|
-
this.viewConfig;
|
|
21521
|
+
const { answerId } = this.viewConfig;
|
|
21627
21522
|
const src = this.getIFrameSrc();
|
|
21628
21523
|
await this.renderIFrame(src);
|
|
21629
21524
|
getAuthPromise().then(() => {
|
|
@@ -21886,7 +21781,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
21886
21781
|
* embedded Liveboard or visualization.
|
|
21887
21782
|
*/
|
|
21888
21783
|
getEmbedParams() {
|
|
21889
|
-
const { tag, hideTagFilterChips, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideHamburger, hideObjectSearch, hideNotification, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 = true, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, showMaskedFilterChip = false, isLiveboardMasterpiecesEnabled = false, hideHomepageLeftNav = false, modularHomeExperience = false, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, enable2ColumnLayout, enableCustomColumnGroups = false, dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, isEnhancedFilterInteractivityEnabled = false, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, discoveryExperience, coverAndFilterOptionInPDF = false, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, isLiveboardXLSXCSVDownloadEnabled = false, isGranularXLSXCSVSchedulesEnabled = false, isCentralizedLiveboardFilterUXEnabled = false, isLinkParametersEnabled, updatedSpotterChatPrompt, spotterChatConfig, minimumHeight, isThisPeriodInDateFiltersEnabled, enableHomepageAnnouncement = false, isContinuousLiveboardPDFEnabled, } = this.viewConfig;
|
|
21784
|
+
const { tag, hideTagFilterChips, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideHamburger, hideObjectSearch, hideNotification, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 = true, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, showMaskedFilterChip = false, isLiveboardMasterpiecesEnabled = false, hideHomepageLeftNav = false, modularHomeExperience = false, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, enable2ColumnLayout, enableCustomColumnGroups = false, dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, isEnhancedFilterInteractivityEnabled = false, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, discoveryExperience, coverAndFilterOptionInPDF = false, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, isLiveboardXLSXCSVDownloadEnabled = false, isGranularXLSXCSVSchedulesEnabled = false, isCentralizedLiveboardFilterUXEnabled = false, isLinkParametersEnabled, updatedSpotterChatPrompt, enableStopAnswerGenerationEmbed, spotterChatConfig, minimumHeight, isThisPeriodInDateFiltersEnabled, enableHomepageAnnouncement = false, isContinuousLiveboardPDFEnabled, } = this.viewConfig;
|
|
21890
21785
|
let params = {};
|
|
21891
21786
|
params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
|
|
21892
21787
|
params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
|
|
@@ -21904,12 +21799,17 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
21904
21799
|
params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;
|
|
21905
21800
|
params[Param.ShowLiveboardReverifyBanner] = showLiveboardReverifyBanner;
|
|
21906
21801
|
params[Param.HideIrrelevantFiltersInTab] = hideIrrelevantChipsInLiveboardTabs;
|
|
21907
|
-
|
|
21802
|
+
if (isUnifiedSearchExperienceEnabled !== undefined) {
|
|
21803
|
+
params[Param.IsUnifiedSearchExperienceEnabled] = isUnifiedSearchExperienceEnabled;
|
|
21804
|
+
}
|
|
21908
21805
|
params[Param.CoverAndFilterOptionInPDF] = !!coverAndFilterOptionInPDF;
|
|
21909
21806
|
params = this.getBaseQueryParams(params);
|
|
21910
21807
|
if (!isUndefined(updatedSpotterChatPrompt)) {
|
|
21911
21808
|
params[Param.UpdatedSpotterChatPrompt] = !!updatedSpotterChatPrompt;
|
|
21912
21809
|
}
|
|
21810
|
+
if (!isUndefined(enableStopAnswerGenerationEmbed)) {
|
|
21811
|
+
params[Param.EnableStopAnswerGenerationEmbed] = !!enableStopAnswerGenerationEmbed;
|
|
21812
|
+
}
|
|
21913
21813
|
// Handle spotterChatConfig params
|
|
21914
21814
|
if (spotterChatConfig) {
|
|
21915
21815
|
const { hideToolResponseCardBranding, toolResponseCardBrandingLabel, } = spotterChatConfig;
|
|
@@ -22346,7 +22246,7 @@ query GetEurekaVizSnapshots(
|
|
|
22346
22246
|
getEmbedParamsObject() {
|
|
22347
22247
|
let params = {};
|
|
22348
22248
|
params = this.getBaseQueryParams(params);
|
|
22349
|
-
const { enableVizTransformations, fullHeight, defaultHeight, minimumHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, showMaskedFilterChip = false, isLiveboardMasterpiecesEnabled = false, isEnhancedFilterInteractivityEnabled = false, enableAskSage, enable2ColumnLayout, dataPanelV2 = true, enableCustomColumnGroups = false, oAuthPollingInterval, isForceRedirect, dataSourceId, coverAndFilterOptionInPDF = false, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, isLiveboardXLSXCSVDownloadEnabled = false, isGranularXLSXCSVSchedulesEnabled = false, showSpotterLimitations, isCentralizedLiveboardFilterUXEnabled = false, isLinkParametersEnabled, updatedSpotterChatPrompt, spotterChatConfig, isThisPeriodInDateFiltersEnabled, isContinuousLiveboardPDFEnabled, } = this.viewConfig;
|
|
22249
|
+
const { enableVizTransformations, fullHeight, defaultHeight, minimumHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, showMaskedFilterChip = false, isLiveboardMasterpiecesEnabled = false, isEnhancedFilterInteractivityEnabled = false, enableAskSage, enable2ColumnLayout, dataPanelV2 = true, enableCustomColumnGroups = false, oAuthPollingInterval, isForceRedirect, dataSourceId, coverAndFilterOptionInPDF = false, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, isLiveboardXLSXCSVDownloadEnabled = false, isGranularXLSXCSVSchedulesEnabled = false, showSpotterLimitations, isCentralizedLiveboardFilterUXEnabled = false, isLinkParametersEnabled, updatedSpotterChatPrompt, enableStopAnswerGenerationEmbed, spotterChatConfig, isThisPeriodInDateFiltersEnabled, isContinuousLiveboardPDFEnabled, } = this.viewConfig;
|
|
22350
22250
|
const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
|
|
22351
22251
|
|| this.viewConfig.preventPinboardFilterRemoval;
|
|
22352
22252
|
if (fullHeight === true) {
|
|
@@ -22368,6 +22268,9 @@ query GetEurekaVizSnapshots(
|
|
|
22368
22268
|
if (!isUndefined(updatedSpotterChatPrompt)) {
|
|
22369
22269
|
params[Param.UpdatedSpotterChatPrompt] = !!updatedSpotterChatPrompt;
|
|
22370
22270
|
}
|
|
22271
|
+
if (!isUndefined(enableStopAnswerGenerationEmbed)) {
|
|
22272
|
+
params[Param.EnableStopAnswerGenerationEmbed] = !!enableStopAnswerGenerationEmbed;
|
|
22273
|
+
}
|
|
22371
22274
|
if (visibleVizs) {
|
|
22372
22275
|
params[Param.visibleVizs] = visibleVizs;
|
|
22373
22276
|
}
|
|
@@ -23202,7 +23105,7 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
23202
23105
|
return buildSpotterSidebarAppInitData(defaultAppInitData, this.viewConfig, this.handleError.bind(this));
|
|
23203
23106
|
}
|
|
23204
23107
|
getEmbedParamsObject() {
|
|
23205
|
-
const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, updatedSpotterChatPrompt, spotterChatConfig, } = this.viewConfig;
|
|
23108
|
+
const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, updatedSpotterChatPrompt, enableStopAnswerGenerationEmbed, spotterChatConfig, } = this.viewConfig;
|
|
23206
23109
|
if (!worksheetId) {
|
|
23207
23110
|
this.handleError({
|
|
23208
23111
|
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
@@ -23220,6 +23123,7 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
23220
23123
|
setParamIfDefined(queryParams, Param.ShowSpotterLimitations, showSpotterLimitations, true);
|
|
23221
23124
|
setParamIfDefined(queryParams, Param.HideSampleQuestions, hideSampleQuestions, true);
|
|
23222
23125
|
setParamIfDefined(queryParams, Param.UpdatedSpotterChatPrompt, updatedSpotterChatPrompt, true);
|
|
23126
|
+
setParamIfDefined(queryParams, Param.EnableStopAnswerGenerationEmbed, enableStopAnswerGenerationEmbed, true);
|
|
23223
23127
|
// Handle spotterChatConfig params
|
|
23224
23128
|
if (spotterChatConfig) {
|
|
23225
23129
|
const { hideToolResponseCardBranding, toolResponseCardBrandingLabel, } = spotterChatConfig;
|
|
@@ -23469,38 +23373,6 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
23469
23373
|
* ```
|
|
23470
23374
|
*/
|
|
23471
23375
|
const PreRenderedSearchBarEmbed = componentFactory(SearchBarEmbed$1, true);
|
|
23472
|
-
/**
|
|
23473
|
-
* React component for LLM based search Sage embed.
|
|
23474
|
-
* @example
|
|
23475
|
-
* ```tsx
|
|
23476
|
-
* function Sage() {
|
|
23477
|
-
* return <SageEmbed
|
|
23478
|
-
* showObjectResults={true}
|
|
23479
|
-
* ... other view config props or event listeners.
|
|
23480
|
-
* />
|
|
23481
|
-
* }
|
|
23482
|
-
* ```
|
|
23483
|
-
*/
|
|
23484
|
-
const SageEmbed = componentFactory(SageEmbed$1);
|
|
23485
|
-
/**
|
|
23486
|
-
* React component for PreRendered Sage embed.
|
|
23487
|
-
*
|
|
23488
|
-
* PreRenderedSageEmbed will preRender the SageEmbed and will be hidden by
|
|
23489
|
-
* default.
|
|
23490
|
-
*
|
|
23491
|
-
* SageEmbed with preRenderId passed will call showPreRender on the embed.
|
|
23492
|
-
* @example
|
|
23493
|
-
* ```tsx
|
|
23494
|
-
* function LandingPageComponent() {
|
|
23495
|
-
* return <PreRenderedSageEmbed preRenderId="someId" showObjectResults={true} />
|
|
23496
|
-
* }
|
|
23497
|
-
* ```
|
|
23498
|
-
* function MyComponent() {
|
|
23499
|
-
* return <SageEmbed preRenderId="someId" showObjectResults={true} />
|
|
23500
|
-
* }
|
|
23501
|
-
* ```
|
|
23502
|
-
*/
|
|
23503
|
-
const PreRenderedSageEmbed = componentFactory(SageEmbed$1, true);
|
|
23504
23376
|
/**
|
|
23505
23377
|
* React component for LLM based conversation BI.
|
|
23506
23378
|
* @example
|
|
@@ -31092,10 +30964,8 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
31092
30964
|
exports.PreRenderedConversationEmbed = PreRenderedConversationEmbed;
|
|
31093
30965
|
exports.PreRenderedLiveboardEmbed = PreRenderedLiveboardEmbed;
|
|
31094
30966
|
exports.PreRenderedPinboardEmbed = PreRenderedPinboardEmbed;
|
|
31095
|
-
exports.PreRenderedSageEmbed = PreRenderedSageEmbed;
|
|
31096
30967
|
exports.PreRenderedSearchBarEmbed = PreRenderedSearchBarEmbed;
|
|
31097
30968
|
exports.PreRenderedSearchEmbed = PreRenderedSearchEmbed;
|
|
31098
|
-
exports.SageEmbed = SageEmbed;
|
|
31099
30969
|
exports.SearchBarEmbed = SearchBarEmbed;
|
|
31100
30970
|
exports.SearchEmbed = SearchEmbed;
|
|
31101
30971
|
exports.SpotterEmbed = SpotterEmbed;
|