@thoughtspot/visual-embed-sdk 1.41.0 → 1.42.0
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 +2 -4
- package/cjs/package.json +8 -8
- package/cjs/src/authToken.d.ts +1 -0
- package/cjs/src/authToken.d.ts.map +1 -1
- package/cjs/src/authToken.js +13 -3
- package/cjs/src/authToken.js.map +1 -1
- package/cjs/src/authToken.spec.js +29 -0
- package/cjs/src/authToken.spec.js.map +1 -1
- package/cjs/src/css-variables.d.ts +54 -15
- package/cjs/src/css-variables.d.ts.map +1 -1
- package/cjs/src/embed/app.d.ts +16 -0
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +4 -1
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/app.spec.js +10 -0
- package/cjs/src/embed/app.spec.js.map +1 -1
- package/cjs/src/embed/bodyless-conversation.d.ts +1 -0
- package/cjs/src/embed/bodyless-conversation.d.ts.map +1 -1
- package/cjs/src/embed/bodyless-conversation.js +7 -3
- package/cjs/src/embed/bodyless-conversation.js.map +1 -1
- package/cjs/src/embed/conversation.d.ts +3 -2
- package/cjs/src/embed/conversation.d.ts.map +1 -1
- package/cjs/src/embed/conversation.js +7 -2
- package/cjs/src/embed/conversation.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts +33 -0
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +13 -2
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/liveboard.spec.js +98 -11
- package/cjs/src/embed/liveboard.spec.js.map +1 -1
- package/cjs/src/embed/sage.d.ts +1 -0
- package/cjs/src/embed/sage.d.ts.map +1 -1
- package/cjs/src/embed/sage.js +10 -6
- package/cjs/src/embed/sage.js.map +1 -1
- package/cjs/src/embed/sage.spec.js +20 -10
- package/cjs/src/embed/sage.spec.js.map +1 -1
- package/cjs/src/embed/search-bar.d.ts +1 -0
- package/cjs/src/embed/search-bar.d.ts.map +1 -1
- package/cjs/src/embed/search-bar.js +11 -7
- package/cjs/src/embed/search-bar.js.map +1 -1
- package/cjs/src/embed/search.d.ts +1 -0
- package/cjs/src/embed/search.d.ts.map +1 -1
- package/cjs/src/embed/search.js +7 -8
- package/cjs/src/embed/search.js.map +1 -1
- package/cjs/src/embed/search.spec.js +10 -10
- package/cjs/src/embed/search.spec.js.map +1 -1
- package/cjs/src/embed/ts-embed.d.ts +7 -5
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +26 -9
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/embed/ts-embed.spec.js.map +1 -1
- package/cjs/src/errors.d.ts +1 -0
- package/cjs/src/errors.d.ts.map +1 -1
- package/cjs/src/errors.js +1 -0
- package/cjs/src/errors.js.map +1 -1
- package/cjs/src/react/all-types-export.spec.js +1 -1
- package/cjs/src/react/all-types-export.spec.js.map +1 -1
- package/cjs/src/react/index.d.ts.map +1 -1
- package/cjs/src/react/index.js +2 -1
- package/cjs/src/react/index.js.map +1 -1
- package/cjs/src/react/index.spec.js +1 -1
- package/cjs/src/react/index.spec.js.map +1 -1
- package/cjs/src/react/util.js.map +1 -1
- package/cjs/src/react/util.spec.d.ts +2 -0
- package/cjs/src/react/util.spec.d.ts.map +1 -0
- package/cjs/src/react/util.spec.js +78 -0
- package/cjs/src/react/util.spec.js.map +1 -0
- package/cjs/src/types.d.ts +64 -9
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +59 -4
- package/cjs/src/types.js.map +1 -1
- package/cjs/src/utils.d.ts +14 -0
- package/cjs/src/utils.d.ts.map +1 -1
- package/cjs/src/utils.js +22 -1
- package/cjs/src/utils.js.map +1 -1
- package/cjs/src/utils.spec.js +10 -0
- package/cjs/src/utils.spec.js.map +1 -1
- package/dist/{index-B_mxAan8.js → index-BpSohedu.js} +1 -1
- package/dist/src/authToken.d.ts +1 -0
- package/dist/src/authToken.d.ts.map +1 -1
- package/dist/src/css-variables.d.ts +54 -15
- package/dist/src/css-variables.d.ts.map +1 -1
- package/dist/src/embed/app.d.ts +16 -0
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/bodyless-conversation.d.ts +1 -0
- package/dist/src/embed/bodyless-conversation.d.ts.map +1 -1
- package/dist/src/embed/conversation.d.ts +3 -2
- package/dist/src/embed/conversation.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts +33 -0
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/embed/sage.d.ts +1 -0
- package/dist/src/embed/sage.d.ts.map +1 -1
- package/dist/src/embed/search-bar.d.ts +1 -0
- package/dist/src/embed/search-bar.d.ts.map +1 -1
- package/dist/src/embed/search.d.ts +1 -0
- package/dist/src/embed/search.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.d.ts +7 -5
- package/dist/src/embed/ts-embed.d.ts.map +1 -1
- package/dist/src/errors.d.ts +1 -0
- package/dist/src/errors.d.ts.map +1 -1
- package/dist/src/react/index.d.ts.map +1 -1
- package/dist/src/react/util.spec.d.ts +2 -0
- package/dist/src/react/util.spec.d.ts.map +1 -0
- package/dist/src/types.d.ts +64 -9
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils.d.ts +14 -0
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +180 -47
- package/dist/tsembed-react.js +179 -46
- package/dist/tsembed.es.js +178 -46
- package/dist/tsembed.js +177 -45
- package/dist/visual-embed-sdk-react-full.d.ts +9312 -9842
- package/dist/visual-embed-sdk-react.d.ts +9184 -9848
- package/dist/visual-embed-sdk.d.ts +9351 -9459
- package/lib/package.json +8 -8
- package/lib/src/authToken.d.ts +1 -0
- package/lib/src/authToken.d.ts.map +1 -1
- package/lib/src/authToken.js +11 -2
- package/lib/src/authToken.js.map +1 -1
- package/lib/src/authToken.spec.js +30 -1
- package/lib/src/authToken.spec.js.map +1 -1
- package/lib/src/css-variables.d.ts +54 -15
- package/lib/src/css-variables.d.ts.map +1 -1
- package/lib/src/embed/app.d.ts +16 -0
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +4 -1
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/app.spec.js +10 -0
- package/lib/src/embed/app.spec.js.map +1 -1
- package/lib/src/embed/bodyless-conversation.d.ts +1 -0
- package/lib/src/embed/bodyless-conversation.d.ts.map +1 -1
- package/lib/src/embed/bodyless-conversation.js +7 -3
- package/lib/src/embed/bodyless-conversation.js.map +1 -1
- package/lib/src/embed/conversation.d.ts +3 -2
- package/lib/src/embed/conversation.d.ts.map +1 -1
- package/lib/src/embed/conversation.js +7 -2
- package/lib/src/embed/conversation.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts +33 -0
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +13 -2
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +98 -11
- package/lib/src/embed/liveboard.spec.js.map +1 -1
- package/lib/src/embed/sage.d.ts +1 -0
- package/lib/src/embed/sage.d.ts.map +1 -1
- package/lib/src/embed/sage.js +10 -6
- package/lib/src/embed/sage.js.map +1 -1
- package/lib/src/embed/sage.spec.js +20 -10
- package/lib/src/embed/sage.spec.js.map +1 -1
- package/lib/src/embed/search-bar.d.ts +1 -0
- package/lib/src/embed/search-bar.d.ts.map +1 -1
- package/lib/src/embed/search-bar.js +11 -7
- package/lib/src/embed/search-bar.js.map +1 -1
- package/lib/src/embed/search.d.ts +1 -0
- package/lib/src/embed/search.d.ts.map +1 -1
- package/lib/src/embed/search.js +7 -8
- package/lib/src/embed/search.js.map +1 -1
- package/lib/src/embed/search.spec.js +11 -11
- package/lib/src/embed/search.spec.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts +7 -5
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +26 -9
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/embed/ts-embed.spec.js.map +1 -1
- package/lib/src/errors.d.ts +1 -0
- package/lib/src/errors.d.ts.map +1 -1
- package/lib/src/errors.js +1 -0
- package/lib/src/errors.js.map +1 -1
- package/lib/src/react/all-types-export.spec.js +1 -1
- package/lib/src/react/all-types-export.spec.js.map +1 -1
- package/lib/src/react/index.d.ts.map +1 -1
- package/lib/src/react/index.js +2 -1
- package/lib/src/react/index.js.map +1 -1
- package/lib/src/react/index.spec.js +1 -1
- package/lib/src/react/index.spec.js.map +1 -1
- package/lib/src/react/util.js.map +1 -1
- package/lib/src/react/util.spec.d.ts +2 -0
- package/lib/src/react/util.spec.d.ts.map +1 -0
- package/lib/src/react/util.spec.js +76 -0
- package/lib/src/react/util.spec.js.map +1 -0
- package/lib/src/types.d.ts +64 -9
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +59 -4
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils.d.ts +14 -0
- package/lib/src/utils.d.ts.map +1 -1
- package/lib/src/utils.js +20 -0
- package/lib/src/utils.js.map +1 -1
- package/lib/src/utils.spec.js +11 -1
- package/lib/src/utils.spec.js.map +1 -1
- package/package.json +8 -8
- package/src/authToken.spec.ts +48 -1
- package/src/authToken.ts +13 -2
- package/src/css-variables.ts +55 -17
- package/src/embed/app.spec.ts +14 -0
- package/src/embed/app.ts +23 -1
- package/src/embed/bodyless-conversation.ts +8 -3
- package/src/embed/conversation.ts +19 -4
- package/src/embed/liveboard.spec.ts +126 -14
- package/src/embed/liveboard.ts +72 -24
- package/src/embed/sage.spec.ts +24 -10
- package/src/embed/sage.ts +14 -9
- package/src/embed/search-bar.tsx +14 -7
- package/src/embed/search.spec.ts +13 -14
- package/src/embed/search.ts +19 -8
- package/src/embed/ts-embed.spec.ts +1 -1
- package/src/embed/ts-embed.ts +35 -13
- package/src/errors.ts +1 -0
- package/src/react/all-types-export.spec.ts +1 -1
- package/src/react/index.spec.tsx +1 -1
- package/src/react/index.tsx +4 -2
- package/src/react/util.spec.tsx +88 -0
- package/src/react/util.ts +3 -3
- package/src/types.ts +125 -69
- package/src/utils.spec.ts +18 -0
- package/src/utils.ts +21 -0
- package/lib/src/visual-embed-sdk.d.ts +0 -9705
package/dist/tsembed-react.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @thoughtspot/visual-embed-sdk version 1.
|
|
1
|
+
/* @thoughtspot/visual-embed-sdk version 1.42.0 */
|
|
2
2
|
'use client';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import React__default, { useRef, useCallback } from 'react';
|
|
@@ -2462,21 +2462,42 @@ var HostEvent;
|
|
|
2462
2462
|
*/
|
|
2463
2463
|
HostEvent["Share"] = "share";
|
|
2464
2464
|
/**
|
|
2465
|
-
* Trigger the **Save**
|
|
2465
|
+
* Trigger the **Save** action on a Liveboard, Answer, or Spotter.
|
|
2466
2466
|
* Saves the changes.
|
|
2467
|
-
*
|
|
2467
|
+
*
|
|
2468
|
+
* @param - `vizId` refers to the Spotter Visualization Id used in Spotter embed.
|
|
2469
|
+
* It is required and can be retrieved from the data embed event.
|
|
2470
|
+
*
|
|
2468
2471
|
* @example
|
|
2469
2472
|
* ```js
|
|
2473
|
+
* // Save changes in a Liveboard
|
|
2470
2474
|
* liveboardEmbed.trigger(HostEvent.Save)
|
|
2471
2475
|
* ```
|
|
2476
|
+
*
|
|
2472
2477
|
* ```js
|
|
2478
|
+
* // Save the current Answer in Search embed
|
|
2473
2479
|
* searchEmbed.trigger(HostEvent.Save)
|
|
2474
2480
|
* ```
|
|
2481
|
+
*
|
|
2475
2482
|
* ```js
|
|
2483
|
+
* // Save an Answer in Spotter (requires vizId)
|
|
2476
2484
|
* spotterEmbed.trigger(HostEvent.Save, {
|
|
2477
|
-
*
|
|
2485
|
+
* vizId: "730496d6-6903-4601-937e-2c691821af3c"
|
|
2478
2486
|
* })
|
|
2479
2487
|
* ```
|
|
2488
|
+
*
|
|
2489
|
+
* ```js
|
|
2490
|
+
* // How to get the vizId in Spotter?
|
|
2491
|
+
*
|
|
2492
|
+
* // You can use the Data event dispatched on each answer creation to get the vizId.
|
|
2493
|
+
* let latestSpotterVizId = '';
|
|
2494
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
2495
|
+
* latestSpotterVizId = payload.data.id;
|
|
2496
|
+
* });
|
|
2497
|
+
*
|
|
2498
|
+
* spotterEmbed.trigger(HostEvent.Save, { vizId: latestSpotterVizId });
|
|
2499
|
+
* ```
|
|
2500
|
+
*
|
|
2480
2501
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
2481
2502
|
*/
|
|
2482
2503
|
HostEvent["Save"] = "save";
|
|
@@ -2614,7 +2635,7 @@ var HostEvent;
|
|
|
2614
2635
|
* column: "Date",
|
|
2615
2636
|
* oper: 'EQ',
|
|
2616
2637
|
* values: ["2023-07-31"],
|
|
2617
|
-
*
|
|
2638
|
+
* type: "EXACT_DATE"
|
|
2618
2639
|
* }]
|
|
2619
2640
|
* });
|
|
2620
2641
|
* ```
|
|
@@ -2960,6 +2981,16 @@ var HostEvent;
|
|
|
2960
2981
|
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
2961
2982
|
*/
|
|
2962
2983
|
HostEvent["AskSpotter"] = "AskSpotter";
|
|
2984
|
+
/**
|
|
2985
|
+
* @hidden
|
|
2986
|
+
* Triggers the update of the embed params.
|
|
2987
|
+
*
|
|
2988
|
+
* @example
|
|
2989
|
+
* ```js
|
|
2990
|
+
* liveboardEmbed.trigger(HostEvent.UpdateEmbedParams, viewConfig);
|
|
2991
|
+
* ```
|
|
2992
|
+
*/
|
|
2993
|
+
HostEvent["UpdateEmbedParams"] = "updateEmbedParams";
|
|
2963
2994
|
})(HostEvent || (HostEvent = {}));
|
|
2964
2995
|
/**
|
|
2965
2996
|
* The different visual modes that the data sources panel within
|
|
@@ -3106,6 +3137,7 @@ var Param;
|
|
|
3106
3137
|
Param["IsLazyLoadingForEmbedEnabled"] = "isLazyLoadingForEmbedEnabled";
|
|
3107
3138
|
Param["RootMarginForLazyLoad"] = "rootMarginForLazyLoad";
|
|
3108
3139
|
Param["LiveboardXLSXCSVDownload"] = "isLiveboardXLSXCSVDownloadEnabled";
|
|
3140
|
+
Param["isPNGInScheduledEmailsEnabled"] = "isPNGInScheduledEmailsEnabled";
|
|
3109
3141
|
})(Param || (Param = {}));
|
|
3110
3142
|
/**
|
|
3111
3143
|
* ThoughtSpot application pages include actions and menu commands
|
|
@@ -4387,6 +4419,29 @@ var Action;
|
|
|
4387
4419
|
* @version SDK: 1.41.0 | ThoughtSpot Cloud: 10.13.0.cl
|
|
4388
4420
|
*/
|
|
4389
4421
|
Action["SpotterTokenQuickEdit"] = "SpotterTokenQuickEdit";
|
|
4422
|
+
/**
|
|
4423
|
+
* The **PNG screenshot in email** option in the schedule email dialog.
|
|
4424
|
+
* Includes a PNG screenshot in the notification email body.
|
|
4425
|
+
* @example
|
|
4426
|
+
* ```js
|
|
4427
|
+
* disabledActions: [Action.PngScreenshotInEmail]
|
|
4428
|
+
* ```
|
|
4429
|
+
* ```
|
|
4430
|
+
* @version SDK: 1.42.0 | ThoughtSpot Cloud: 10.14.0.cl
|
|
4431
|
+
*/
|
|
4432
|
+
Action["PngScreenshotInEmail"] = "pngScreenshotInEmail";
|
|
4433
|
+
/**
|
|
4434
|
+
* The **Remove attachment** action in the schedule email dialog.
|
|
4435
|
+
* Removes an attachment from the email configuration.
|
|
4436
|
+
* @example
|
|
4437
|
+
* ```js
|
|
4438
|
+
* disabledActions: [Action.RemoveAttachment]
|
|
4439
|
+
* ```
|
|
4440
|
+
* ```
|
|
4441
|
+
* ```
|
|
4442
|
+
* @version SDK: 1.42.0 | ThoughtSpot Cloud: 10.14.0.cl
|
|
4443
|
+
*/
|
|
4444
|
+
Action["RemoveAttachment"] = "removeAttachment";
|
|
4390
4445
|
})(Action || (Action = {}));
|
|
4391
4446
|
var PrefetchFeatures;
|
|
4392
4447
|
(function (PrefetchFeatures) {
|
|
@@ -4975,6 +5030,26 @@ const calculateVisibleElementData = (element) => {
|
|
|
4975
5030
|
width: Math.max(0, frameRelativeRight - frameRelativeLeft),
|
|
4976
5031
|
};
|
|
4977
5032
|
return data;
|
|
5033
|
+
};
|
|
5034
|
+
/**
|
|
5035
|
+
* Replaces placeholders in a template string with provided values.
|
|
5036
|
+
* Placeholders should be in the format {key}.
|
|
5037
|
+
* @param template - The template string with placeholders
|
|
5038
|
+
* @param values - An object containing key-value pairs to replace placeholders
|
|
5039
|
+
* @returns The template string with placeholders replaced
|
|
5040
|
+
* @example
|
|
5041
|
+
* formatTemplate('Hello {name}, you are {age} years old', { name: 'John', age: 30 })
|
|
5042
|
+
* // Returns: 'Hello John, you are 30 years old'
|
|
5043
|
+
*
|
|
5044
|
+
* formatTemplate('Expected {type}, but received {actual}', { type: 'string', actual: 'number' })
|
|
5045
|
+
* // Returns: 'Expected string, but received number'
|
|
5046
|
+
*/
|
|
5047
|
+
const formatTemplate = (template, values) => {
|
|
5048
|
+
// This regex /\{(\w+)\}/g finds all placeholders in the format {word}
|
|
5049
|
+
// and captures the word inside the braces for replacement.
|
|
5050
|
+
return template.replace(/\{(\w+)\}/g, (match, key) => {
|
|
5051
|
+
return values[key] !== undefined ? String(values[key]) : match;
|
|
5052
|
+
});
|
|
4978
5053
|
};
|
|
4979
5054
|
|
|
4980
5055
|
/**
|
|
@@ -7263,6 +7338,7 @@ const ERROR_MESSAGE = {
|
|
|
7263
7338
|
SDK_NOT_INITIALIZED: 'SDK not initialized',
|
|
7264
7339
|
SESSION_INFO_FAILED: 'Failed to get session information',
|
|
7265
7340
|
INVALID_TOKEN_ERROR: 'Received invalid token from getAuthToken callback or authToken endpoint.',
|
|
7341
|
+
INVALID_TOKEN_TYPE_ERROR: 'Expected getAuthToken to return a string, but received a {invalidType}.',
|
|
7266
7342
|
MIXPANEL_TOKEN_NOT_FOUND: 'Mixpanel token not found in session info',
|
|
7267
7343
|
PRERENDER_ID_MISSING: 'PreRender ID is required for preRender',
|
|
7268
7344
|
SYNC_STYLE_CALLED_BEFORE_RENDER: 'PreRender should be called before using syncPreRenderStyle',
|
|
@@ -7443,6 +7519,15 @@ async function getAuthenticationToken(embedConfig) {
|
|
|
7443
7519
|
return authToken;
|
|
7444
7520
|
}
|
|
7445
7521
|
const validateAuthToken = async (embedConfig, authToken, suppressAlert) => {
|
|
7522
|
+
// even if token verification is disabled, we will still validate
|
|
7523
|
+
// that the token is a string before proceeding.
|
|
7524
|
+
if (typeof authToken !== 'string') {
|
|
7525
|
+
const errorMessage = formatTemplate(ERROR_MESSAGE.INVALID_TOKEN_TYPE_ERROR, {
|
|
7526
|
+
invalidType: typeof authToken,
|
|
7527
|
+
});
|
|
7528
|
+
logger$3.error(errorMessage);
|
|
7529
|
+
throw new Error(errorMessage);
|
|
7530
|
+
}
|
|
7446
7531
|
const cachedAuthToken = getCacheAuthToken();
|
|
7447
7532
|
if (embedConfig.disableTokenVerification) {
|
|
7448
7533
|
logger$3.info('Token verification is disabled. Assuming token is valid.');
|
|
@@ -8171,7 +8256,7 @@ class AnswerService {
|
|
|
8171
8256
|
async getTML() {
|
|
8172
8257
|
const { object } = await this.executeQuery(getAnswerTML, {});
|
|
8173
8258
|
const edoc = object[0].edoc;
|
|
8174
|
-
const YAML = await import('./index-
|
|
8259
|
+
const YAML = await import('./index-BpSohedu.js');
|
|
8175
8260
|
const parsedDoc = YAML.parse(edoc);
|
|
8176
8261
|
return {
|
|
8177
8262
|
answer: {
|
|
@@ -17344,7 +17429,7 @@ function processEventData(type, e, thoughtSpotHost, containerEl) {
|
|
|
17344
17429
|
return e;
|
|
17345
17430
|
}
|
|
17346
17431
|
|
|
17347
|
-
var name="@thoughtspot/visual-embed-sdk";var version$1="1.
|
|
17432
|
+
var name="@thoughtspot/visual-embed-sdk";var version$1="1.42.0";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p tsconfig.build.json --incremental false; tsc -p tsconfig.build.json --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle-generator --config ./dts-config/dts-bundle-file.config.js","bundle-dts":"dts-bundle-generator --config ./dts-config/dts-bundle.config.js","bundle-dts-react":"dts-bundle-generator --config ./dts-config/dts-bundle-react.config.js","bundle-dts-react-full":"dts-bundle-generator --config ./dts-config/dts-bundle-react-full.config.js",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.build.json --theme typedoc-theme --json static/typedoc/typedoc.json --disableOutputCheck","test-sdk":"jest -c jest.config.sdk.js --runInBand",test:"npm run test-sdk",posttest:"cat ./coverage/sdk/lcov.info | npx coveralls-next","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest",dev:"vite -c vite.local.config.ts"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={classnames:"^2.3.1",eventemitter3:"^4.0.7",lodash:"^4.17.21","mixpanel-browser":"2.47.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1",yaml:"^2.5.1"};var devDependencies={"@mdx-js/mdx":"^1.6.22","@mdx-js/react":"^1.6.22","@react-icons/all-files":"^4.1.0","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^5.0.2","@size-limit/preset-big-lib":"^11.2.0","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^22.2.3","@types/lodash":"^4.17.0","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^8.28.0","@typescript-eslint/parser":"^8.28.0",ajv:"^8.17.1",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1","coveralls-next":"^5.0.0",crypto:"^1.0.1","current-git-branch":"^1.1.0","dts-bundle-generator":"^9.5.1",eslint:"^9.23.0","eslint-config-airbnb-base":"^15.0.0","eslint-config-prettier":"^10.1.1","eslint-import-resolver-typescript":"^4.2.5","eslint-plugin-comment-length":"2.2.1","eslint-plugin-import":"^2.31.0","eslint-plugin-jsdoc":"^50.6.9","eslint-plugin-prettier":"^5.2.5","eslint-plugin-react":"^7.37.5","eslint-plugin-react-hooks":"^5.2.0","fs-extra":"^10.0.0","gh-pages":"6.3.0",globals:"^16.0.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^2.0.0",jest:"^26.6.3","jest-fetch-mock":"^3.0.3",jsdom:"^17.0.0",prettier:"2.1.2",react:"^16.14.0","react-dom":"^16.14.0","react-resizable":"^1.11.0","react-resize-detector":"^6.6.0","react-test-renderer":"^17.0.2","react-use-flexsearch":"^0.1.1",rollup:"4.24.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^26.5.5","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","typescript-eslint":"^8.29.1","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^6.3.5"};var author="ThoughtSpot";var email="support@thoughtspot.com";var license="ThoughtSpot Development Tools End User License Agreement";var directories={lib:"lib"};var repository={type:"git",url:"git+https://github.com/thoughtspot/visual-embed-sdk.git"};var publishConfig={registry:"https://registry.npmjs.org"};var keywords=["thoughtspot","everywhere","embedded","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version$1,description:description,module:module,main:main,types:types,files:files,exports:exports,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};
|
|
17348
17433
|
|
|
17349
17434
|
/**
|
|
17350
17435
|
* Reloads the ThoughtSpot iframe.
|
|
@@ -17655,10 +17740,10 @@ class TsEmbed {
|
|
|
17655
17740
|
};
|
|
17656
17741
|
this.showPreRenderByDefault = false;
|
|
17657
17742
|
/**
|
|
17658
|
-
|
|
17659
|
-
|
|
17660
|
-
|
|
17661
|
-
|
|
17743
|
+
* @hidden
|
|
17744
|
+
* Internal state to track if the embed container is loaded.
|
|
17745
|
+
* This is used to trigger events after the embed container is loaded.
|
|
17746
|
+
*/
|
|
17662
17747
|
this.isEmbedContainerLoaded = false;
|
|
17663
17748
|
/**
|
|
17664
17749
|
* @hidden
|
|
@@ -17717,10 +17802,10 @@ class TsEmbed {
|
|
|
17717
17802
|
uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_EMBED_CREATE, {
|
|
17718
17803
|
...viewConfig,
|
|
17719
17804
|
});
|
|
17805
|
+
const embedConfig = getEmbedConfig();
|
|
17806
|
+
this.embedConfig = embedConfig;
|
|
17720
17807
|
this.hostEventClient = new HostEventClient(this.iFrame);
|
|
17721
17808
|
this.isReadyForRenderPromise = getInitPromise().then(async () => {
|
|
17722
|
-
const embedConfig = getEmbedConfig();
|
|
17723
|
-
this.embedConfig = embedConfig;
|
|
17724
17809
|
if (!embedConfig.authTriggerContainer && !embedConfig.useEventForSAMLPopup) {
|
|
17725
17810
|
this.embedConfig.authTriggerContainer = domSelector;
|
|
17726
17811
|
}
|
|
@@ -17916,6 +18001,11 @@ class TsEmbed {
|
|
|
17916
18001
|
.join('/');
|
|
17917
18002
|
return `${basePath}#`;
|
|
17918
18003
|
}
|
|
18004
|
+
getUpdateEmbedParamsObject() {
|
|
18005
|
+
let queryParams = this.getEmbedParamsObject();
|
|
18006
|
+
queryParams = { ...this.viewConfig, ...queryParams };
|
|
18007
|
+
return queryParams;
|
|
18008
|
+
}
|
|
17919
18009
|
/**
|
|
17920
18010
|
* Common query params set for all the embed modes.
|
|
17921
18011
|
* @param queryParams
|
|
@@ -18065,9 +18155,13 @@ class TsEmbed {
|
|
|
18065
18155
|
return path;
|
|
18066
18156
|
}
|
|
18067
18157
|
getEmbedParams() {
|
|
18068
|
-
const queryParams = this.
|
|
18158
|
+
const queryParams = this.getEmbedParamsObject();
|
|
18069
18159
|
return getQueryParamString(queryParams);
|
|
18070
18160
|
}
|
|
18161
|
+
getEmbedParamsObject() {
|
|
18162
|
+
const params = this.getBaseQueryParams();
|
|
18163
|
+
return params;
|
|
18164
|
+
}
|
|
18071
18165
|
getRootIframeSrc() {
|
|
18072
18166
|
const query = this.getEmbedParams();
|
|
18073
18167
|
return this.getEmbedBasePath(query);
|
|
@@ -18538,13 +18632,17 @@ class TsEmbed {
|
|
|
18538
18632
|
* Creates the preRender shell
|
|
18539
18633
|
* @param showPreRenderByDefault - Show the preRender after render, hidden by default
|
|
18540
18634
|
*/
|
|
18541
|
-
async preRender(showPreRenderByDefault = false) {
|
|
18635
|
+
async preRender(showPreRenderByDefault = false, replaceExistingPreRender = false) {
|
|
18542
18636
|
if (!this.viewConfig.preRenderId) {
|
|
18543
18637
|
logger$3.error(ERROR_MESSAGE.PRERENDER_ID_MISSING);
|
|
18544
18638
|
return this;
|
|
18545
18639
|
}
|
|
18546
18640
|
this.isPreRendered = true;
|
|
18547
18641
|
this.showPreRenderByDefault = showPreRenderByDefault;
|
|
18642
|
+
const isAlreadyRendered = this.connectPreRendered();
|
|
18643
|
+
if (isAlreadyRendered && !replaceExistingPreRender) {
|
|
18644
|
+
return this;
|
|
18645
|
+
}
|
|
18548
18646
|
return this.handleRenderForPrerender();
|
|
18549
18647
|
}
|
|
18550
18648
|
/**
|
|
@@ -18628,7 +18726,12 @@ class TsEmbed {
|
|
|
18628
18726
|
return this.preRender(true);
|
|
18629
18727
|
}
|
|
18630
18728
|
this.validatePreRenderViewConfig(this.viewConfig);
|
|
18729
|
+
logger$3.debug('triggering UpdateEmbedParams', this.viewConfig);
|
|
18730
|
+
this.executeAfterEmbedContainerLoaded(() => {
|
|
18731
|
+
this.trigger(HostEvent.UpdateEmbedParams, this.getUpdateEmbedParamsObject());
|
|
18732
|
+
});
|
|
18631
18733
|
}
|
|
18734
|
+
this.beforePrerenderVisible();
|
|
18632
18735
|
if (this.el) {
|
|
18633
18736
|
this.syncPreRenderStyle();
|
|
18634
18737
|
if (!this.viewConfig.doNotTrackPreRenderSize) {
|
|
@@ -18645,7 +18748,6 @@ class TsEmbed {
|
|
|
18645
18748
|
this.resizeObserver.observe(this.el);
|
|
18646
18749
|
}
|
|
18647
18750
|
}
|
|
18648
|
-
this.beforePrerenderVisible();
|
|
18649
18751
|
removeStyleProperties(this.preRenderWrapper, ['z-index', 'opacity', 'pointer-events']);
|
|
18650
18752
|
this.subscribeToEvents();
|
|
18651
18753
|
// Setup fullscreen change handler for prerendered components
|
|
@@ -18834,15 +18936,9 @@ let SearchBarEmbed$1 = class SearchBarEmbed extends TsEmbed {
|
|
|
18834
18936
|
this.embedComponentType = 'SearchBarEmbed';
|
|
18835
18937
|
this.viewConfig = viewConfig;
|
|
18836
18938
|
}
|
|
18837
|
-
|
|
18838
|
-
* Construct the URL of the embedded ThoughtSpot search to be
|
|
18839
|
-
* loaded in the iframe
|
|
18840
|
-
* @param dataSources A list of data source GUIDs
|
|
18841
|
-
*/
|
|
18842
|
-
getIFrameSrc() {
|
|
18939
|
+
getEmbedParamsObject() {
|
|
18843
18940
|
var _a;
|
|
18844
18941
|
const { searchOptions, dataSource, dataSources, useLastSelectedSources = false, excludeSearchTokenStringFromURL, } = this.viewConfig;
|
|
18845
|
-
const path = 'search-bar-embed';
|
|
18846
18942
|
const queryParams = this.getBaseQueryParams();
|
|
18847
18943
|
queryParams[Param.HideActions] = [...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : [])];
|
|
18848
18944
|
if (dataSources && dataSources.length) {
|
|
@@ -18864,6 +18960,16 @@ let SearchBarEmbed$1 = class SearchBarEmbed extends TsEmbed {
|
|
|
18864
18960
|
queryParams[Param.UseLastSelectedDataSource] = false;
|
|
18865
18961
|
}
|
|
18866
18962
|
queryParams[Param.searchEmbed] = true;
|
|
18963
|
+
return queryParams;
|
|
18964
|
+
}
|
|
18965
|
+
/**
|
|
18966
|
+
* Construct the URL of the embedded ThoughtSpot search to be
|
|
18967
|
+
* loaded in the iframe
|
|
18968
|
+
* @param dataSources A list of data source GUIDs
|
|
18969
|
+
*/
|
|
18970
|
+
getIFrameSrc() {
|
|
18971
|
+
const queryParams = this.getEmbedParamsObject();
|
|
18972
|
+
const path = 'search-bar-embed';
|
|
18867
18973
|
let query = '';
|
|
18868
18974
|
const queryParamsString = getQueryParamString(queryParams, true);
|
|
18869
18975
|
if (queryParamsString) {
|
|
@@ -18914,12 +19020,7 @@ let SageEmbed$1 = class SageEmbed extends V1Embed {
|
|
|
18914
19020
|
viewConfig.embedComponentType = 'SageEmbed';
|
|
18915
19021
|
super(domSelector, viewConfig);
|
|
18916
19022
|
}
|
|
18917
|
-
|
|
18918
|
-
* Constructs a map of parameters to be passed on to the
|
|
18919
|
-
* embedded Eureka or Sage search page.
|
|
18920
|
-
* @returns {string} query string
|
|
18921
|
-
*/
|
|
18922
|
-
getEmbedParams() {
|
|
19023
|
+
getEmbedParamsObject() {
|
|
18923
19024
|
const { disableWorksheetChange, hideWorksheetSelector, showObjectSuggestions, dataPanelV2, hideSampleQuestions, isProductTour, hideSageAnswerHeader, hideAutocompleteSuggestions, } = this.viewConfig;
|
|
18924
19025
|
const params = this.getBaseQueryParams();
|
|
18925
19026
|
params[Param.DataPanelV2Enabled] = !!dataPanelV2;
|
|
@@ -18934,6 +19035,15 @@ let SageEmbed$1 = class SageEmbed extends V1Embed {
|
|
|
18934
19035
|
params[Param.HideSampleQuestions] = !!hideSampleQuestions;
|
|
18935
19036
|
params[Param.IsProductTour] = !!isProductTour;
|
|
18936
19037
|
params[Param.HideSageAnswerHeader] = !!hideSageAnswerHeader;
|
|
19038
|
+
return params;
|
|
19039
|
+
}
|
|
19040
|
+
/**
|
|
19041
|
+
* Constructs a map of parameters to be passed on to the
|
|
19042
|
+
* embedded Eureka or Sage search page.
|
|
19043
|
+
* @returns {string} query string
|
|
19044
|
+
*/
|
|
19045
|
+
getEmbedParams() {
|
|
19046
|
+
const params = this.getEmbedParamsObject();
|
|
18937
19047
|
return getQueryParamString(params, true);
|
|
18938
19048
|
}
|
|
18939
19049
|
/**
|
|
@@ -19043,11 +19153,9 @@ let SearchEmbed$1 = class SearchEmbed extends TsEmbed {
|
|
|
19043
19153
|
const defaultAppInitData = await super.getAppInitData();
|
|
19044
19154
|
return { ...defaultAppInitData, ...this.getSearchInitData() };
|
|
19045
19155
|
}
|
|
19046
|
-
|
|
19156
|
+
getEmbedParamsObject() {
|
|
19047
19157
|
var _a;
|
|
19048
|
-
const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, hideSearchBar, dataPanelV2 =
|
|
19049
|
-
/* eslint-disable-next-line max-len */
|
|
19050
|
-
dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL, focusSearchBarOnRender = true, excludeRuntimeParametersfromURL, excludeSearchTokenStringFromURL, collapseSearchBar = true, } = this.viewConfig;
|
|
19158
|
+
const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, hideSearchBar, dataPanelV2 = true, useLastSelectedSources = false, runtimeParameters, collapseSearchBarInitially = false, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false, dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL, focusSearchBarOnRender = true, excludeRuntimeParametersfromURL, excludeSearchTokenStringFromURL, collapseSearchBar = true, } = this.viewConfig;
|
|
19051
19159
|
const queryParams = this.getBaseQueryParams();
|
|
19052
19160
|
queryParams[Param.HideActions] = [
|
|
19053
19161
|
...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : []),
|
|
@@ -19080,7 +19188,6 @@ let SearchEmbed$1 = class SearchEmbed extends TsEmbed {
|
|
|
19080
19188
|
queryParams[Param.HideSearchBar] = true;
|
|
19081
19189
|
}
|
|
19082
19190
|
if (isOnBeforeGetVizDataInterceptEnabled) {
|
|
19083
|
-
/* eslint-disable-next-line max-len */
|
|
19084
19191
|
queryParams[Param.IsOnBeforeGetVizDataInterceptEnabled] = isOnBeforeGetVizDataInterceptEnabled;
|
|
19085
19192
|
}
|
|
19086
19193
|
if (!focusSearchBarOnRender) {
|
|
@@ -19093,20 +19200,22 @@ let SearchEmbed$1 = class SearchEmbed extends TsEmbed {
|
|
|
19093
19200
|
queryParams[Param.UseLastSelectedDataSource] = false;
|
|
19094
19201
|
}
|
|
19095
19202
|
queryParams[Param.searchEmbed] = true;
|
|
19096
|
-
/* eslint-disable-next-line max-len */
|
|
19097
19203
|
queryParams[Param.CollapseSearchBarInitially] = collapseSearchBarInitially || collapseSearchBar;
|
|
19098
19204
|
queryParams[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
|
|
19099
19205
|
if (dataPanelCustomGroupsAccordionInitialState
|
|
19100
19206
|
=== DataPanelCustomColumnGroupsAccordionState$1.COLLAPSE_ALL
|
|
19101
19207
|
|| dataPanelCustomGroupsAccordionInitialState
|
|
19102
19208
|
=== DataPanelCustomColumnGroupsAccordionState$1.EXPAND_FIRST) {
|
|
19103
|
-
/* eslint-disable-next-line max-len */
|
|
19104
19209
|
queryParams[Param.DataPanelCustomGroupsAccordionInitialState] = dataPanelCustomGroupsAccordionInitialState;
|
|
19105
19210
|
}
|
|
19106
19211
|
else {
|
|
19107
|
-
/* eslint-disable-next-line max-len */
|
|
19108
19212
|
queryParams[Param.DataPanelCustomGroupsAccordionInitialState] = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL;
|
|
19109
19213
|
}
|
|
19214
|
+
return queryParams;
|
|
19215
|
+
}
|
|
19216
|
+
getEmbedParams() {
|
|
19217
|
+
const { runtimeParameters, runtimeFilters, excludeRuntimeParametersfromURL, excludeRuntimeFiltersfromURL, } = this.viewConfig;
|
|
19218
|
+
const queryParams = this.getEmbedParamsObject();
|
|
19110
19219
|
let query = '';
|
|
19111
19220
|
const queryParamsString = getQueryParamString(queryParams, true);
|
|
19112
19221
|
if (queryParamsString) {
|
|
@@ -19339,7 +19448,7 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
|
|
|
19339
19448
|
* embedded Liveboard or visualization.
|
|
19340
19449
|
*/
|
|
19341
19450
|
getEmbedParams() {
|
|
19342
|
-
const { tag, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideHamburger, hideObjectSearch, hideNotification, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 =
|
|
19451
|
+
const { tag, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideHamburger, hideObjectSearch, hideNotification, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 = true, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, hideHomepageLeftNav = false, modularHomeExperience = false, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, enable2ColumnLayout, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false, dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, discoveryExperience, coverAndFilterOptionInPDF = false, liveboardXLSXCSVDownload = false, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, } = this.viewConfig;
|
|
19343
19452
|
let params = {};
|
|
19344
19453
|
params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
|
|
19345
19454
|
params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
|
|
@@ -19404,6 +19513,9 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
|
|
|
19404
19513
|
if (isLiveboardStylingAndGroupingEnabled !== undefined) {
|
|
19405
19514
|
params[Param.IsLiveboardStylingAndGroupingEnabled] = isLiveboardStylingAndGroupingEnabled;
|
|
19406
19515
|
}
|
|
19516
|
+
if (isPNGInScheduledEmailsEnabled !== undefined) {
|
|
19517
|
+
params[Param.isPNGInScheduledEmailsEnabled] = isPNGInScheduledEmailsEnabled;
|
|
19518
|
+
}
|
|
19407
19519
|
params[Param.DataPanelV2Enabled] = dataPanelV2;
|
|
19408
19520
|
params[Param.HideHomepageLeftNav] = hideHomepageLeftNav;
|
|
19409
19521
|
params[Param.ModularHomeExperienceEnabled] = modularHomeExperience;
|
|
@@ -19751,9 +19863,14 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
|
|
|
19751
19863
|
* embedded Liveboard or visualization.
|
|
19752
19864
|
*/
|
|
19753
19865
|
getEmbedParams() {
|
|
19866
|
+
const params = this.getEmbedParamsObject();
|
|
19867
|
+
const queryParams = getQueryParamString(params, true);
|
|
19868
|
+
return queryParams;
|
|
19869
|
+
}
|
|
19870
|
+
getEmbedParamsObject() {
|
|
19754
19871
|
let params = {};
|
|
19755
19872
|
params = this.getBaseQueryParams(params);
|
|
19756
|
-
const { enableVizTransformations, fullHeight, defaultHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, enableAskSage, enable2ColumnLayout, dataPanelV2 =
|
|
19873
|
+
const { enableVizTransformations, fullHeight, defaultHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, enableAskSage, enable2ColumnLayout, dataPanelV2 = true, enableCustomColumnGroups = false, oAuthPollingInterval, isForceRedirect, dataSourceId, coverAndFilterOptionInPDF = false, liveboardXLSXCSVDownload = false, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, showSpotterLimitations, } = this.viewConfig;
|
|
19757
19874
|
const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
|
|
19758
19875
|
|| this.viewConfig.preventPinboardFilterRemoval;
|
|
19759
19876
|
if (fullHeight === true) {
|
|
@@ -19812,6 +19929,12 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
|
|
|
19812
19929
|
if (isLiveboardStylingAndGroupingEnabled !== undefined) {
|
|
19813
19930
|
params[Param.IsLiveboardStylingAndGroupingEnabled] = isLiveboardStylingAndGroupingEnabled;
|
|
19814
19931
|
}
|
|
19932
|
+
if (isPNGInScheduledEmailsEnabled !== undefined) {
|
|
19933
|
+
params[Param.isPNGInScheduledEmailsEnabled] = isPNGInScheduledEmailsEnabled;
|
|
19934
|
+
}
|
|
19935
|
+
if (showSpotterLimitations !== undefined) {
|
|
19936
|
+
params[Param.ShowSpotterLimitations] = showSpotterLimitations;
|
|
19937
|
+
}
|
|
19815
19938
|
params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
|
|
19816
19939
|
params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
|
|
19817
19940
|
params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;
|
|
@@ -19821,8 +19944,8 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
|
|
|
19821
19944
|
params[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
|
|
19822
19945
|
params[Param.CoverAndFilterOptionInPDF] = coverAndFilterOptionInPDF;
|
|
19823
19946
|
params[Param.LiveboardXLSXCSVDownload] = !!liveboardXLSXCSVDownload;
|
|
19824
|
-
|
|
19825
|
-
return
|
|
19947
|
+
getQueryParamString(params, true);
|
|
19948
|
+
return params;
|
|
19826
19949
|
}
|
|
19827
19950
|
getIframeSuffixSrc(liveboardId, vizId, activeTabId) {
|
|
19828
19951
|
let suffix = `/embed/viz/${liveboardId}`;
|
|
@@ -20380,13 +20503,17 @@ let ConversationMessage$1 = class ConversationMessage extends TsEmbed {
|
|
|
20380
20503
|
super(container, viewConfig);
|
|
20381
20504
|
this.viewConfig = viewConfig;
|
|
20382
20505
|
}
|
|
20383
|
-
|
|
20506
|
+
getEmbedParamsObject() {
|
|
20384
20507
|
var _a;
|
|
20385
|
-
const { sessionId, genNo, acSessionId, acGenNo, convId, messageId, } = this.viewConfig;
|
|
20386
|
-
const path = 'conv-assist-answer';
|
|
20387
20508
|
const queryParams = this.getBaseQueryParams();
|
|
20388
20509
|
queryParams[Param.HideActions] = [...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : [])];
|
|
20389
20510
|
queryParams[Param.isSpotterAgentEmbed] = true;
|
|
20511
|
+
return queryParams;
|
|
20512
|
+
}
|
|
20513
|
+
getIframeSrc() {
|
|
20514
|
+
const { sessionId, genNo, acSessionId, acGenNo, convId, messageId, } = this.viewConfig;
|
|
20515
|
+
const path = 'conv-assist-answer';
|
|
20516
|
+
const queryParams = this.getEmbedParamsObject();
|
|
20390
20517
|
let query = '';
|
|
20391
20518
|
const queryParamsString = getQueryParamString(queryParams, true);
|
|
20392
20519
|
if (queryParamsString) {
|
|
@@ -20542,9 +20669,8 @@ let SpotterEmbed$1 = class SpotterEmbed extends TsEmbed {
|
|
|
20542
20669
|
super(container, viewConfig);
|
|
20543
20670
|
this.viewConfig = viewConfig;
|
|
20544
20671
|
}
|
|
20545
|
-
|
|
20672
|
+
getEmbedParamsObject() {
|
|
20546
20673
|
const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, } = this.viewConfig;
|
|
20547
|
-
const path = 'insights/conv-assist';
|
|
20548
20674
|
if (!worksheetId) {
|
|
20549
20675
|
this.handleError(ERROR_MESSAGE.SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND);
|
|
20550
20676
|
}
|
|
@@ -20565,6 +20691,12 @@ let SpotterEmbed$1 = class SpotterEmbed extends TsEmbed {
|
|
|
20565
20691
|
if (!isUndefined_1(hideSampleQuestions)) {
|
|
20566
20692
|
queryParams[Param.HideSampleQuestions] = !!hideSampleQuestions;
|
|
20567
20693
|
}
|
|
20694
|
+
return queryParams;
|
|
20695
|
+
}
|
|
20696
|
+
getIframeSrc() {
|
|
20697
|
+
const { worksheetId, searchOptions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, } = this.viewConfig;
|
|
20698
|
+
const path = 'insights/conv-assist';
|
|
20699
|
+
const queryParams = this.getEmbedParamsObject();
|
|
20568
20700
|
let query = '';
|
|
20569
20701
|
const queryParamsString = getQueryParamString(queryParams, true);
|
|
20570
20702
|
if (queryParamsString) {
|
|
@@ -20673,7 +20805,8 @@ isPreRenderedComponent = false) => React__default.forwardRef((props, forwardedRe
|
|
|
20673
20805
|
handleDestroy(tsEmbed);
|
|
20674
20806
|
};
|
|
20675
20807
|
}, [viewConfig, listeners]);
|
|
20676
|
-
|
|
20808
|
+
const preRenderStyles = isPreRenderedComponent ? { display: 'none' } : {};
|
|
20809
|
+
return viewConfig.insertAsSibling ? (React__default.createElement("span", { "data-testid": "tsEmbed", ref: ref, style: { position: 'absolute', ...preRenderStyles } })) : (React__default.createElement("div", { "data-testid": "tsEmbed", ref: ref, style: { ...style, ...preRenderStyles }, className: `ts-embed-container ${className}` }));
|
|
20677
20810
|
});
|
|
20678
20811
|
/**
|
|
20679
20812
|
* React component for Search Embed.
|