@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.es.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
/* @thoughtspot/visual-embed-sdk version 1.
|
|
1
|
+
/* @thoughtspot/visual-embed-sdk version 1.47.1 */
|
|
2
2
|
'use client';
|
|
3
3
|
function _mergeNamespaces(n, m) {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
4
|
+
m.forEach(function (e) {
|
|
5
|
+
e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) {
|
|
6
|
+
if (k !== 'default' && !(k in n)) {
|
|
7
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
8
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () { return e[k]; }
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
return Object.freeze(n);
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
/**
|
|
@@ -1281,19 +1281,6 @@ var EmbedEvent;
|
|
|
1281
1281
|
* @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl, 9.5.0.sw
|
|
1282
1282
|
*/
|
|
1283
1283
|
EmbedEvent["FilterChanged"] = "filterChanged";
|
|
1284
|
-
/**
|
|
1285
|
-
* Emitted when a user clicks the **Go** button to initiate
|
|
1286
|
-
* a Natural Language Search query
|
|
1287
|
-
* @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
|
|
1288
|
-
*/
|
|
1289
|
-
EmbedEvent["SageEmbedQuery"] = "sageEmbedQuery";
|
|
1290
|
-
/**
|
|
1291
|
-
* Emitted when a user selects a data source on the embedded
|
|
1292
|
-
* Natural Language Search interface.
|
|
1293
|
-
*
|
|
1294
|
-
* @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
|
|
1295
|
-
*/
|
|
1296
|
-
EmbedEvent["SageWorksheetUpdated"] = "sageWorksheetUpdated";
|
|
1297
1284
|
/**
|
|
1298
1285
|
* Emitted when a user updates a connection on the **Data** page
|
|
1299
1286
|
* @version SDK: 1.27.0 | ThoughtSpot: 9.8.0.cl, 9.8.0.sw
|
|
@@ -2757,7 +2744,7 @@ var HostEvent;
|
|
|
2757
2744
|
* tml.answer.search_query // TML representation of the search query
|
|
2758
2745
|
* );
|
|
2759
2746
|
* })
|
|
2760
|
-
|
|
2747
|
+
* ```
|
|
2761
2748
|
* @example
|
|
2762
2749
|
* ```js
|
|
2763
2750
|
* // Get TML from search context
|
|
@@ -3381,21 +3368,6 @@ var HostEvent;
|
|
|
3381
3368
|
* @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
|
|
3382
3369
|
*/
|
|
3383
3370
|
HostEvent["SetHiddenTabs"] = "SetPinboardHiddenTabs";
|
|
3384
|
-
/**
|
|
3385
|
-
* Updates the search query string for Natural Language Search operations.
|
|
3386
|
-
* @param - Includes the following keys:
|
|
3387
|
-
* - `queryString`: Text string in Natural Language format.
|
|
3388
|
-
* - `executeSearch`: Boolean to execute search and update search query.
|
|
3389
|
-
* @example
|
|
3390
|
-
* ```js
|
|
3391
|
-
* sageEmbed.trigger(HostEvent.UpdateSageQuery, {
|
|
3392
|
-
* queryString: 'revenue per year',
|
|
3393
|
-
* executeSearch: true,
|
|
3394
|
-
* })
|
|
3395
|
-
* ```
|
|
3396
|
-
* @version SDK: 1.26.0 | ThoughtSpot: 9.8.0.cl, 9.8.0.sw
|
|
3397
|
-
*/
|
|
3398
|
-
HostEvent["UpdateSageQuery"] = "updateSageQuery";
|
|
3399
3371
|
/**
|
|
3400
3372
|
* Get the Answer session for a Search or
|
|
3401
3373
|
* Liveboard visualization.
|
|
@@ -3961,7 +3933,6 @@ var Param;
|
|
|
3961
3933
|
Param["HideNotification"] = "hideNotification";
|
|
3962
3934
|
Param["HideApplicationSwitcher"] = "applicationSwitcherHidden";
|
|
3963
3935
|
Param["HideOrgSwitcher"] = "orgSwitcherHidden";
|
|
3964
|
-
Param["IsSageEmbed"] = "isSageEmbed";
|
|
3965
3936
|
Param["HideWorksheetSelector"] = "hideWorksheetSelector";
|
|
3966
3937
|
Param["DisableWorksheetChange"] = "disableWorksheetChange";
|
|
3967
3938
|
Param["HideSourceSelection"] = "hideSourceSelection";
|
|
@@ -4033,6 +4004,7 @@ var Param;
|
|
|
4033
4004
|
Param["isLinkParametersEnabled"] = "isLinkParametersEnabled";
|
|
4034
4005
|
Param["EnablePastConversationsSidebar"] = "enablePastConversationsSidebar";
|
|
4035
4006
|
Param["UpdatedSpotterChatPrompt"] = "updatedSpotterChatPrompt";
|
|
4007
|
+
Param["EnableStopAnswerGenerationEmbed"] = "enableStopAnswerGenerationEmbed";
|
|
4036
4008
|
Param["SpotterSidebarTitle"] = "spotterSidebarTitle";
|
|
4037
4009
|
Param["SpotterSidebarDefaultExpanded"] = "spotterSidebarDefaultExpanded";
|
|
4038
4010
|
Param["SpotterChatRenameLabel"] = "spotterChatRenameLabel";
|
|
@@ -5339,11 +5311,11 @@ var Action;
|
|
|
5339
5311
|
*/
|
|
5340
5312
|
Action["CoverAndFilterOptionInPDF"] = "coverAndFilterOptionInPDF";
|
|
5341
5313
|
/**
|
|
5342
|
-
|
|
5343
|
-
|
|
5344
|
-
|
|
5345
|
-
|
|
5346
|
-
|
|
5314
|
+
* Action ID to hide or disable the Coaching workflow in Spotter conversations.
|
|
5315
|
+
* When disabled, users cannot access **Add to Coaching** workflow in conversation.
|
|
5316
|
+
* The **Add to Coaching** feature allows adding reference questions and
|
|
5317
|
+
* business terms to improve Spotter’s responses. This feature is generally available
|
|
5318
|
+
* (GA) from version 26.2.0.cl and enabled by default on embed deployments.
|
|
5347
5319
|
* @example
|
|
5348
5320
|
* ```js
|
|
5349
5321
|
* hiddenAction: [Action.InConversationTraining]
|
|
@@ -5420,17 +5392,17 @@ var Action;
|
|
|
5420
5392
|
*/
|
|
5421
5393
|
Action["LiveboardStylePanel"] = "liveboardStylePanel";
|
|
5422
5394
|
/**
|
|
5423
|
-
|
|
5424
|
-
|
|
5425
|
-
|
|
5426
|
-
|
|
5427
|
-
|
|
5428
|
-
|
|
5429
|
-
|
|
5430
|
-
|
|
5431
|
-
|
|
5432
|
-
|
|
5433
|
-
|
|
5395
|
+
* The **Publish** action for Liveboards, Answers and Models.
|
|
5396
|
+
* Opens the publishing modal. It's a parent action for the
|
|
5397
|
+
* **Manage Publishing** and **Unpublish** actions if the object
|
|
5398
|
+
* is already published, otherwise appears standalone.
|
|
5399
|
+
* @example
|
|
5400
|
+
* ```js
|
|
5401
|
+
* hiddenActions: [Action.Publish]
|
|
5402
|
+
* disabledActions: [Action.Publish]
|
|
5403
|
+
* ```
|
|
5404
|
+
* @version SDK: 1.45.0 | ThoughtSpot Cloud: 26.2.0.cl
|
|
5405
|
+
*/
|
|
5434
5406
|
Action["Publish"] = "publish";
|
|
5435
5407
|
/**
|
|
5436
5408
|
* The **Manage Publishing** action for Liveboards, Answers and Models.
|
|
@@ -6118,7 +6090,6 @@ const ERROR_MESSAGE = {
|
|
|
6118
6090
|
LIVEBOARD_VIZ_ID_VALIDATION: 'Please select a Liveboard to embed.',
|
|
6119
6091
|
TRIGGER_TIMED_OUT: 'Trigger timed-out in getting a response',
|
|
6120
6092
|
SEARCHEMBED_BETA_WRANING_MESSAGE: 'SearchEmbed is in Beta in this release.',
|
|
6121
|
-
SAGE_EMBED_BETA_WARNING_MESSAGE: 'SageEmbed is in Beta in this release.',
|
|
6122
6093
|
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.',
|
|
6123
6094
|
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.',
|
|
6124
6095
|
SDK_NOT_INITIALIZED: 'SDK not initialized',
|
|
@@ -6132,7 +6103,6 @@ const ERROR_MESSAGE = {
|
|
|
6132
6103
|
CSP_FRAME_HOST_VIOLATION_LOG_MESSAGE: 'Please set up CSP correctly for the application to start working. For more information, see https://developers.thoughtspot.com/docs/security-settings#csp-viz-embed-hosts. \n If the issue persists, refer to https://developers.thoughtspot.com/docs/security-settings#csp-viz-embed-hosts',
|
|
6133
6104
|
MISSING_REPORTING_OBSERVER: 'ReportingObserver not supported',
|
|
6134
6105
|
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',
|
|
6135
|
-
SPOTTER_AGENT_NOT_INITIALIZED: 'SpotterAgent not initialized',
|
|
6136
6106
|
OFFLINE_WARNING: 'Network not Detected. Embed is offline. Please reconnect and refresh',
|
|
6137
6107
|
INIT_SDK_REQUIRED: 'You need to init the ThoughtSpot SDK module first',
|
|
6138
6108
|
CONFLICTING_ACTIONS_CONFIG: 'You cannot have both hidden actions and visible actions',
|
|
@@ -6938,9 +6908,9 @@ var root = _freeGlobal || freeSelf || Function('return this')();
|
|
|
6938
6908
|
var _root = root;
|
|
6939
6909
|
|
|
6940
6910
|
/** Built-in value references. */
|
|
6941
|
-
var Symbol = _root.Symbol;
|
|
6911
|
+
var Symbol$1 = _root.Symbol;
|
|
6942
6912
|
|
|
6943
|
-
var _Symbol = Symbol;
|
|
6913
|
+
var _Symbol = Symbol$1;
|
|
6944
6914
|
|
|
6945
6915
|
/** Used for built-in method references. */
|
|
6946
6916
|
var objectProto$c = Object.prototype;
|
|
@@ -7011,7 +6981,7 @@ function objectToString(value) {
|
|
|
7011
6981
|
var _objectToString = objectToString;
|
|
7012
6982
|
|
|
7013
6983
|
/** `Object#toString` result references. */
|
|
7014
|
-
var nullTag = '[object Null]',
|
|
6984
|
+
var nullTag$1 = '[object Null]',
|
|
7015
6985
|
undefinedTag = '[object Undefined]';
|
|
7016
6986
|
|
|
7017
6987
|
/** Built-in value references. */
|
|
@@ -7026,7 +6996,7 @@ var symToStringTag = _Symbol ? _Symbol.toStringTag : undefined;
|
|
|
7026
6996
|
*/
|
|
7027
6997
|
function baseGetTag(value) {
|
|
7028
6998
|
if (value == null) {
|
|
7029
|
-
return value === undefined ? undefinedTag : nullTag;
|
|
6999
|
+
return value === undefined ? undefinedTag : nullTag$1;
|
|
7030
7000
|
}
|
|
7031
7001
|
return (symToStringTag && symToStringTag in Object(value))
|
|
7032
7002
|
? _getRawTag(value)
|
|
@@ -7744,9 +7714,9 @@ function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
|
|
|
7744
7714
|
var _equalArrays = equalArrays;
|
|
7745
7715
|
|
|
7746
7716
|
/** Built-in value references. */
|
|
7747
|
-
var Uint8Array = _root.Uint8Array;
|
|
7717
|
+
var Uint8Array$1 = _root.Uint8Array;
|
|
7748
7718
|
|
|
7749
|
-
var _Uint8Array = Uint8Array;
|
|
7719
|
+
var _Uint8Array = Uint8Array$1;
|
|
7750
7720
|
|
|
7751
7721
|
/**
|
|
7752
7722
|
* Converts `map` to its key-value pairs.
|
|
@@ -7791,7 +7761,7 @@ var COMPARE_PARTIAL_FLAG$4 = 1,
|
|
|
7791
7761
|
COMPARE_UNORDERED_FLAG$2 = 2;
|
|
7792
7762
|
|
|
7793
7763
|
/** `Object#toString` result references. */
|
|
7794
|
-
var boolTag$
|
|
7764
|
+
var boolTag$2 = '[object Boolean]',
|
|
7795
7765
|
dateTag$1 = '[object Date]',
|
|
7796
7766
|
errorTag$1 = '[object Error]',
|
|
7797
7767
|
mapTag$3 = '[object Map]',
|
|
@@ -7842,7 +7812,7 @@ function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
|
|
|
7842
7812
|
}
|
|
7843
7813
|
return true;
|
|
7844
7814
|
|
|
7845
|
-
case boolTag$
|
|
7815
|
+
case boolTag$2:
|
|
7846
7816
|
case dateTag$1:
|
|
7847
7817
|
case numberTag$1:
|
|
7848
7818
|
// Coerce booleans to `1` or `0` and dates to milliseconds.
|
|
@@ -8156,9 +8126,9 @@ function stubFalse() {
|
|
|
8156
8126
|
|
|
8157
8127
|
var stubFalse_1 = stubFalse;
|
|
8158
8128
|
|
|
8159
|
-
var isBuffer_1 = createCommonjsModule(function (module, exports) {
|
|
8129
|
+
var isBuffer_1 = createCommonjsModule(function (module, exports$1) {
|
|
8160
8130
|
/** Detect free variable `exports`. */
|
|
8161
|
-
var freeExports = exports && !exports.nodeType && exports;
|
|
8131
|
+
var freeExports = exports$1 && !exports$1.nodeType && exports$1;
|
|
8162
8132
|
|
|
8163
8133
|
/** Detect free variable `module`. */
|
|
8164
8134
|
var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
|
|
@@ -8259,7 +8229,7 @@ var isLength_1 = isLength;
|
|
|
8259
8229
|
/** `Object#toString` result references. */
|
|
8260
8230
|
var argsTag$1 = '[object Arguments]',
|
|
8261
8231
|
arrayTag$1 = '[object Array]',
|
|
8262
|
-
boolTag = '[object Boolean]',
|
|
8232
|
+
boolTag$1 = '[object Boolean]',
|
|
8263
8233
|
dateTag = '[object Date]',
|
|
8264
8234
|
errorTag = '[object Error]',
|
|
8265
8235
|
funcTag = '[object Function]',
|
|
@@ -8291,7 +8261,7 @@ typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
|
|
|
8291
8261
|
typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
|
|
8292
8262
|
typedArrayTags[uint32Tag] = true;
|
|
8293
8263
|
typedArrayTags[argsTag$1] = typedArrayTags[arrayTag$1] =
|
|
8294
|
-
typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
|
|
8264
|
+
typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag$1] =
|
|
8295
8265
|
typedArrayTags[dataViewTag$1] = typedArrayTags[dateTag] =
|
|
8296
8266
|
typedArrayTags[errorTag] = typedArrayTags[funcTag] =
|
|
8297
8267
|
typedArrayTags[mapTag$2] = typedArrayTags[numberTag] =
|
|
@@ -8328,9 +8298,9 @@ function baseUnary(func) {
|
|
|
8328
8298
|
|
|
8329
8299
|
var _baseUnary = baseUnary;
|
|
8330
8300
|
|
|
8331
|
-
var _nodeUtil = createCommonjsModule(function (module, exports) {
|
|
8301
|
+
var _nodeUtil = createCommonjsModule(function (module, exports$1) {
|
|
8332
8302
|
/** Detect free variable `exports`. */
|
|
8333
|
-
var freeExports = exports && !exports.nodeType && exports;
|
|
8303
|
+
var freeExports = exports$1 && !exports$1.nodeType && exports$1;
|
|
8334
8304
|
|
|
8335
8305
|
/** Detect free variable `module`. */
|
|
8336
8306
|
var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
|
|
@@ -8910,7 +8880,7 @@ var hasOwnProperty$1 = objectProto.hasOwnProperty;
|
|
|
8910
8880
|
* _.isEmpty({ 'a': 1 });
|
|
8911
8881
|
* // => false
|
|
8912
8882
|
*/
|
|
8913
|
-
function isEmpty(value) {
|
|
8883
|
+
function isEmpty$1(value) {
|
|
8914
8884
|
if (value == null) {
|
|
8915
8885
|
return true;
|
|
8916
8886
|
}
|
|
@@ -8934,7 +8904,7 @@ function isEmpty(value) {
|
|
|
8934
8904
|
return true;
|
|
8935
8905
|
}
|
|
8936
8906
|
|
|
8937
|
-
var isEmpty_1 = isEmpty;
|
|
8907
|
+
var isEmpty_1 = isEmpty$1;
|
|
8938
8908
|
|
|
8939
8909
|
var UIPassthroughEvent;
|
|
8940
8910
|
(function (UIPassthroughEvent) {
|
|
@@ -9885,7 +9855,7 @@ class AnswerService {
|
|
|
9885
9855
|
async getTML() {
|
|
9886
9856
|
const { object } = await this.executeQuery(getAnswerTML, {});
|
|
9887
9857
|
const edoc = object[0].edoc;
|
|
9888
|
-
const YAML = await import('./index-
|
|
9858
|
+
const YAML = await import('./index-CUgxBnPm.js');
|
|
9889
9859
|
const parsedDoc = YAML.parse(edoc);
|
|
9890
9860
|
return {
|
|
9891
9861
|
answer: {
|
|
@@ -10231,9 +10201,6 @@ var stringToPath = _memoizeCapped(function(string) {
|
|
|
10231
10201
|
|
|
10232
10202
|
var _stringToPath = stringToPath;
|
|
10233
10203
|
|
|
10234
|
-
/** Used as references for various `Number` constants. */
|
|
10235
|
-
var INFINITY$1 = 1 / 0;
|
|
10236
|
-
|
|
10237
10204
|
/** Used to convert symbols to primitives and strings. */
|
|
10238
10205
|
var symbolProto = _Symbol ? _Symbol.prototype : undefined,
|
|
10239
10206
|
symbolToString = symbolProto ? symbolProto.toString : undefined;
|
|
@@ -10259,7 +10226,7 @@ function baseToString(value) {
|
|
|
10259
10226
|
return symbolToString ? symbolToString.call(value) : '';
|
|
10260
10227
|
}
|
|
10261
10228
|
var result = (value + '');
|
|
10262
|
-
return (result == '0' && (1 / value) == -
|
|
10229
|
+
return (result == '0' && (1 / value) == -Infinity) ? '-0' : result;
|
|
10263
10230
|
}
|
|
10264
10231
|
|
|
10265
10232
|
var _baseToString = baseToString;
|
|
@@ -10308,9 +10275,6 @@ function castPath(value, object) {
|
|
|
10308
10275
|
|
|
10309
10276
|
var _castPath = castPath;
|
|
10310
10277
|
|
|
10311
|
-
/** Used as references for various `Number` constants. */
|
|
10312
|
-
var INFINITY = 1 / 0;
|
|
10313
|
-
|
|
10314
10278
|
/**
|
|
10315
10279
|
* Converts `value` to a string key if it's not a string or symbol.
|
|
10316
10280
|
*
|
|
@@ -10323,7 +10287,7 @@ function toKey(value) {
|
|
|
10323
10287
|
return value;
|
|
10324
10288
|
}
|
|
10325
10289
|
var result = (value + '');
|
|
10326
|
-
return (result == '0' && (1 / value) == -
|
|
10290
|
+
return (result == '0' && (1 / value) == -Infinity) ? '-0' : result;
|
|
10327
10291
|
}
|
|
10328
10292
|
|
|
10329
10293
|
var _toKey = toKey;
|
|
@@ -17617,8 +17581,8 @@ var mixpanel = init_as_module();
|
|
|
17617
17581
|
var mixpanel_cjs = mixpanel;
|
|
17618
17582
|
|
|
17619
17583
|
var mixpanel$1 = /*#__PURE__*/_mergeNamespaces({
|
|
17620
|
-
|
|
17621
|
-
|
|
17584
|
+
__proto__: null,
|
|
17585
|
+
default: mixpanel_cjs
|
|
17622
17586
|
}, [mixpanel_cjs]);
|
|
17623
17587
|
|
|
17624
17588
|
// Needed to avoid error in CJS builds on some bundlers.
|
|
@@ -19367,12 +19331,18 @@ function processEventData(type, eventData, thoughtSpotHost, containerEl) {
|
|
|
19367
19331
|
return eventData;
|
|
19368
19332
|
}
|
|
19369
19333
|
|
|
19370
|
-
var
|
|
19334
|
+
var version$1="1.47.1";var pkgInfo = {version:version$1};
|
|
19371
19335
|
|
|
19372
19336
|
function isValidUpdateFiltersPayload(payload) {
|
|
19373
19337
|
if (!payload)
|
|
19374
19338
|
return false;
|
|
19375
|
-
const isValidFilter = (f) =>
|
|
19339
|
+
const isValidFilter = (f) => {
|
|
19340
|
+
const hasColumn = typeof f.column === 'string' || typeof f.columnName === 'string';
|
|
19341
|
+
const hasOperator = typeof f.oper === 'string' || typeof f.operator === 'string';
|
|
19342
|
+
const hasValues = Array.isArray(f.values);
|
|
19343
|
+
const validType = !f.type || typeof f.type === 'string';
|
|
19344
|
+
return hasColumn && hasOperator && hasValues && validType;
|
|
19345
|
+
};
|
|
19376
19346
|
const hasValidFilter = payload.filter && isValidFilter(payload.filter);
|
|
19377
19347
|
const hasValidFilters = Array.isArray(payload.filters) && payload.filters.length > 0 && payload.filters.every(isValidFilter);
|
|
19378
19348
|
return !!(hasValidFilter || hasValidFilters);
|
|
@@ -21059,6 +21029,9 @@ class TsEmbed {
|
|
|
21059
21029
|
try {
|
|
21060
21030
|
this.removeFullscreenChangeHandler();
|
|
21061
21031
|
this.unsubscribeToEvents();
|
|
21032
|
+
if (!this.isRendered) {
|
|
21033
|
+
return;
|
|
21034
|
+
}
|
|
21062
21035
|
if (!getEmbedConfig().waitForCleanupOnDestroy) {
|
|
21063
21036
|
this.trigger(HostEvent.DestroyEmbed);
|
|
21064
21037
|
(_b = (_a = this.insertedDomEl) === null || _a === void 0 ? void 0 : _a.parentNode) === null || _b === void 0 ? void 0 : _b.removeChild(this.insertedDomEl);
|
|
@@ -21068,11 +21041,16 @@ class TsEmbed {
|
|
|
21068
21041
|
Promise.race([
|
|
21069
21042
|
this.trigger(HostEvent.DestroyEmbed),
|
|
21070
21043
|
new Promise((resolve) => setTimeout(resolve, cleanupTimeout)),
|
|
21071
|
-
]).
|
|
21072
|
-
var _a, _b;
|
|
21073
|
-
(_b = (_a = this.insertedDomEl) === null || _a === void 0 ? void 0 : _a.parentNode) === null || _b === void 0 ? void 0 : _b.removeChild(this.insertedDomEl);
|
|
21074
|
-
}).catch((e) => {
|
|
21044
|
+
]).catch((e) => {
|
|
21075
21045
|
logger$3.log('Error destroying TS Embed', e);
|
|
21046
|
+
}).finally(() => {
|
|
21047
|
+
var _a, _b;
|
|
21048
|
+
try {
|
|
21049
|
+
(_b = (_a = this.insertedDomEl) === null || _a === void 0 ? void 0 : _a.parentNode) === null || _b === void 0 ? void 0 : _b.removeChild(this.insertedDomEl);
|
|
21050
|
+
}
|
|
21051
|
+
catch (e) {
|
|
21052
|
+
logger$3.log('Error removing DOM element on destroy', e);
|
|
21053
|
+
}
|
|
21076
21054
|
});
|
|
21077
21055
|
}
|
|
21078
21056
|
}
|
|
@@ -21588,7 +21566,7 @@ class AppEmbed extends V1Embed {
|
|
|
21588
21566
|
* embedded Liveboard or visualization.
|
|
21589
21567
|
*/
|
|
21590
21568
|
getEmbedParams() {
|
|
21591
|
-
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$1.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;
|
|
21569
|
+
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$1.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;
|
|
21592
21570
|
let params = {};
|
|
21593
21571
|
params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
|
|
21594
21572
|
params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
|
|
@@ -21606,12 +21584,17 @@ class AppEmbed extends V1Embed {
|
|
|
21606
21584
|
params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;
|
|
21607
21585
|
params[Param.ShowLiveboardReverifyBanner] = showLiveboardReverifyBanner;
|
|
21608
21586
|
params[Param.HideIrrelevantFiltersInTab] = hideIrrelevantChipsInLiveboardTabs;
|
|
21609
|
-
|
|
21587
|
+
if (isUnifiedSearchExperienceEnabled !== undefined) {
|
|
21588
|
+
params[Param.IsUnifiedSearchExperienceEnabled] = isUnifiedSearchExperienceEnabled;
|
|
21589
|
+
}
|
|
21610
21590
|
params[Param.CoverAndFilterOptionInPDF] = !!coverAndFilterOptionInPDF;
|
|
21611
21591
|
params = this.getBaseQueryParams(params);
|
|
21612
21592
|
if (!isUndefined(updatedSpotterChatPrompt)) {
|
|
21613
21593
|
params[Param.UpdatedSpotterChatPrompt] = !!updatedSpotterChatPrompt;
|
|
21614
21594
|
}
|
|
21595
|
+
if (!isUndefined(enableStopAnswerGenerationEmbed)) {
|
|
21596
|
+
params[Param.EnableStopAnswerGenerationEmbed] = !!enableStopAnswerGenerationEmbed;
|
|
21597
|
+
}
|
|
21615
21598
|
// Handle spotterChatConfig params
|
|
21616
21599
|
if (spotterChatConfig) {
|
|
21617
21600
|
const { hideToolResponseCardBranding, toolResponseCardBrandingLabel, } = spotterChatConfig;
|
|
@@ -22048,7 +22031,7 @@ class LiveboardEmbed extends V1Embed {
|
|
|
22048
22031
|
getEmbedParamsObject() {
|
|
22049
22032
|
let params = {};
|
|
22050
22033
|
params = this.getBaseQueryParams(params);
|
|
22051
|
-
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;
|
|
22034
|
+
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;
|
|
22052
22035
|
const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
|
|
22053
22036
|
|| this.viewConfig.preventPinboardFilterRemoval;
|
|
22054
22037
|
if (fullHeight === true) {
|
|
@@ -22070,6 +22053,9 @@ class LiveboardEmbed extends V1Embed {
|
|
|
22070
22053
|
if (!isUndefined(updatedSpotterChatPrompt)) {
|
|
22071
22054
|
params[Param.UpdatedSpotterChatPrompt] = !!updatedSpotterChatPrompt;
|
|
22072
22055
|
}
|
|
22056
|
+
if (!isUndefined(enableStopAnswerGenerationEmbed)) {
|
|
22057
|
+
params[Param.EnableStopAnswerGenerationEmbed] = !!enableStopAnswerGenerationEmbed;
|
|
22058
|
+
}
|
|
22073
22059
|
if (visibleVizs) {
|
|
22074
22060
|
params[Param.visibleVizs] = visibleVizs;
|
|
22075
22061
|
}
|
|
@@ -22523,7 +22509,7 @@ class SearchEmbed extends TsEmbed {
|
|
|
22523
22509
|
*/
|
|
22524
22510
|
async render() {
|
|
22525
22511
|
await super.render();
|
|
22526
|
-
this.viewConfig;
|
|
22512
|
+
const { answerId } = this.viewConfig;
|
|
22527
22513
|
const src = this.getIFrameSrc();
|
|
22528
22514
|
await this.renderIFrame(src);
|
|
22529
22515
|
getAuthPromise().then(() => {
|
|
@@ -23173,7 +23159,7 @@ class SpotterEmbed extends TsEmbed {
|
|
|
23173
23159
|
return buildSpotterSidebarAppInitData(defaultAppInitData, this.viewConfig, this.handleError.bind(this));
|
|
23174
23160
|
}
|
|
23175
23161
|
getEmbedParamsObject() {
|
|
23176
|
-
const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, updatedSpotterChatPrompt, spotterChatConfig, } = this.viewConfig;
|
|
23162
|
+
const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, updatedSpotterChatPrompt, enableStopAnswerGenerationEmbed, spotterChatConfig, } = this.viewConfig;
|
|
23177
23163
|
if (!worksheetId) {
|
|
23178
23164
|
this.handleError({
|
|
23179
23165
|
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
@@ -23191,6 +23177,7 @@ class SpotterEmbed extends TsEmbed {
|
|
|
23191
23177
|
setParamIfDefined(queryParams, Param.ShowSpotterLimitations, showSpotterLimitations, true);
|
|
23192
23178
|
setParamIfDefined(queryParams, Param.HideSampleQuestions, hideSampleQuestions, true);
|
|
23193
23179
|
setParamIfDefined(queryParams, Param.UpdatedSpotterChatPrompt, updatedSpotterChatPrompt, true);
|
|
23180
|
+
setParamIfDefined(queryParams, Param.EnableStopAnswerGenerationEmbed, enableStopAnswerGenerationEmbed, true);
|
|
23194
23181
|
// Handle spotterChatConfig params
|
|
23195
23182
|
if (spotterChatConfig) {
|
|
23196
23183
|
const { hideToolResponseCardBranding, toolResponseCardBrandingLabel, } = spotterChatConfig;
|
|
@@ -23259,87 +23246,6 @@ class ConversationEmbed extends SpotterEmbed {
|
|
|
23259
23246
|
}
|
|
23260
23247
|
}
|
|
23261
23248
|
|
|
23262
|
-
/**
|
|
23263
|
-
* Copyright (c) 2023
|
|
23264
|
-
*
|
|
23265
|
-
* Embed ThoughtSpot Sage
|
|
23266
|
-
* @summary TS Sage embed
|
|
23267
|
-
* @author Mourya Balabhadra <mourya.balabhadra@thoughtspot.com>
|
|
23268
|
-
*/
|
|
23269
|
-
/**
|
|
23270
|
-
* Embed ThoughtSpot LLM and GPT-based Natural Language Search component.
|
|
23271
|
-
* @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl, 9.5.1-sw
|
|
23272
|
-
*
|
|
23273
|
-
* Note: This embed will be deprecated from SDK: 1.40.0 | ThoughtSpot: 10.13.0.cl
|
|
23274
|
-
* @group Embed components
|
|
23275
|
-
*/
|
|
23276
|
-
class SageEmbed extends V1Embed {
|
|
23277
|
-
constructor(domSelector, viewConfig) {
|
|
23278
|
-
viewConfig.embedComponentType = 'SageEmbed';
|
|
23279
|
-
super(domSelector, viewConfig);
|
|
23280
|
-
}
|
|
23281
|
-
getEmbedParamsObject() {
|
|
23282
|
-
const { disableWorksheetChange, hideWorksheetSelector, showObjectSuggestions, dataPanelV2, hideSampleQuestions, isProductTour, hideSageAnswerHeader, hideAutocompleteSuggestions, } = this.viewConfig;
|
|
23283
|
-
const params = this.getBaseQueryParams();
|
|
23284
|
-
params[Param.DataPanelV2Enabled] = !!dataPanelV2;
|
|
23285
|
-
params[Param.IsSageEmbed] = true;
|
|
23286
|
-
params[Param.DisableWorksheetChange] = !!disableWorksheetChange;
|
|
23287
|
-
params[Param.HideWorksheetSelector] = !!hideWorksheetSelector;
|
|
23288
|
-
params[Param.HideEurekaSuggestions] = !!hideAutocompleteSuggestions;
|
|
23289
|
-
if (showObjectSuggestions) {
|
|
23290
|
-
params[Param.HideEurekaSuggestions] = !showObjectSuggestions;
|
|
23291
|
-
// support backwards compatibility
|
|
23292
|
-
}
|
|
23293
|
-
params[Param.HideSampleQuestions] = !!hideSampleQuestions;
|
|
23294
|
-
params[Param.IsProductTour] = !!isProductTour;
|
|
23295
|
-
params[Param.HideSageAnswerHeader] = !!hideSageAnswerHeader;
|
|
23296
|
-
return params;
|
|
23297
|
-
}
|
|
23298
|
-
/**
|
|
23299
|
-
* Constructs a map of parameters to be passed on to the
|
|
23300
|
-
* embedded Eureka or Sage search page.
|
|
23301
|
-
* @returns {string} query string
|
|
23302
|
-
*/
|
|
23303
|
-
getEmbedParams() {
|
|
23304
|
-
const params = this.getEmbedParamsObject();
|
|
23305
|
-
return getQueryParamString(params, true);
|
|
23306
|
-
}
|
|
23307
|
-
/**
|
|
23308
|
-
* Construct the URL of the embedded ThoughtSpot sage to be
|
|
23309
|
-
* loaded in the iframe
|
|
23310
|
-
* @returns {string} iframe url
|
|
23311
|
-
*/
|
|
23312
|
-
getIFrameSrc() {
|
|
23313
|
-
const path = 'eureka';
|
|
23314
|
-
const postHashObj = {};
|
|
23315
|
-
const tsPostHashParams = this.getThoughtSpotPostUrlParams();
|
|
23316
|
-
const { dataSource, searchOptions, } = this.viewConfig;
|
|
23317
|
-
if (dataSource)
|
|
23318
|
-
postHashObj[Param.WorksheetId] = dataSource;
|
|
23319
|
-
if ((searchOptions === null || searchOptions === void 0 ? void 0 : searchOptions.searchQuery) && searchOptions.executeSearch) {
|
|
23320
|
-
postHashObj[Param.executeSearch] = true;
|
|
23321
|
-
}
|
|
23322
|
-
let sagePostHashParams = new URLSearchParams(postHashObj).toString();
|
|
23323
|
-
if (sagePostHashParams)
|
|
23324
|
-
sagePostHashParams = `${tsPostHashParams ? '&' : '?'}${sagePostHashParams}`;
|
|
23325
|
-
if (searchOptions === null || searchOptions === void 0 ? void 0 : searchOptions.searchQuery)
|
|
23326
|
-
sagePostHashParams += `${sagePostHashParams ? '&' : '?'}${[Param.Query]}=${encodeURIComponent(searchOptions.searchQuery)}`;
|
|
23327
|
-
// use encodeURIComponent for query instead of URLSearchParams
|
|
23328
|
-
// as it adds + instead of %20 for spaces
|
|
23329
|
-
return `${this.getRootIframeSrc()}/embed/${path}${tsPostHashParams}${sagePostHashParams}`;
|
|
23330
|
-
}
|
|
23331
|
-
/**
|
|
23332
|
-
* Render the embedded ThoughtSpot Sage
|
|
23333
|
-
* @returns {SageEmbed} Eureka/Sage embed
|
|
23334
|
-
*/
|
|
23335
|
-
async render() {
|
|
23336
|
-
await super.render();
|
|
23337
|
-
const src = this.getIFrameSrc();
|
|
23338
|
-
await this.renderV1Embed(src);
|
|
23339
|
-
return this;
|
|
23340
|
-
}
|
|
23341
|
-
}
|
|
23342
|
-
|
|
23343
23249
|
const getAnswerSessionFromQuery = `
|
|
23344
23250
|
query GetEurekaResults($params: Input_eureka_SearchRequest) {
|
|
23345
23251
|
queryRequest(request: $params) {
|
|
@@ -24000,4 +23906,4 @@ class AutoFrameRenderer extends TsEmbed {
|
|
|
24000
23906
|
}
|
|
24001
23907
|
}
|
|
24002
23908
|
|
|
24003
|
-
export { Action, AnswerService, AppEmbed, AuthEvent, AuthFailureType, AuthStatus, AuthType, BodylessConversation, ContextMenuTriggerOptions, ContextType, ConversationEmbed, CustomActionTarget, CustomActionsPosition, DataPanelCustomColumnGroupsAccordionState$1 as DataPanelCustomColumnGroupsAccordionState, DataSourceVisualMode, EmbedErrorCodes, EmbedEvent, ErrorDetailsTypes, HomeLeftNavItem, HomePage, HomePageSearchBarMode, HomepageModule, HostEvent, InterceptedApiType, ListPage, ListPageColumns, LiveboardEmbed, LogLevel, MIXPANEL_EVENT, Page, PinboardEmbed, PrefetchFeatures, PrimaryNavbarVersion, RuntimeFilterOp,
|
|
23909
|
+
export { Action, AnswerService, AppEmbed, AuthEvent, AuthFailureType, AuthStatus, AuthType, BodylessConversation, ContextMenuTriggerOptions, ContextType, ConversationEmbed, CustomActionTarget, CustomActionsPosition, DataPanelCustomColumnGroupsAccordionState$1 as DataPanelCustomColumnGroupsAccordionState, DataSourceVisualMode, EmbedErrorCodes, EmbedEvent, ErrorDetailsTypes, HomeLeftNavItem, HomePage, HomePageSearchBarMode, HomepageModule, HostEvent, InterceptedApiType, ListPage, ListPageColumns, LiveboardEmbed, LogLevel, MIXPANEL_EVENT, Page, PinboardEmbed, PrefetchFeatures, PrimaryNavbarVersion, RuntimeFilterOp, SearchBarEmbed, SearchEmbed, SpotterAgentEmbed, SpotterEmbed, UIPassthroughEvent, createLiveboardWithAnswers, executeTML, exportTML, getAnswerFromQuery, getEmbedConfig as getInitConfig, getSessionInfo, init, logout, prefetch, reloadIframe, resetCachedAuthToken, startAutoMCPFrameRenderer, tokenizedFetch, uploadMixpanelEvent };
|