@thoughtspot/visual-embed-sdk 1.33.2 → 1.33.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/cjs/package.json +1 -1
- package/cjs/src/auth.d.ts.map +1 -1
- package/cjs/src/auth.js +5 -2
- package/cjs/src/auth.js.map +1 -1
- package/cjs/src/auth.spec.js +15 -3
- package/cjs/src/auth.spec.js.map +1 -1
- package/cjs/src/css-variables.d.ts +2 -2
- package/cjs/src/embed/app.d.ts +20 -6
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +3 -2
- 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/base.spec.js +13 -1
- package/cjs/src/embed/base.spec.js.map +1 -1
- package/cjs/src/embed/conversation.d.ts.map +1 -1
- package/cjs/src/embed/conversation.js +4 -0
- package/cjs/src/embed/conversation.js.map +1 -1
- package/cjs/src/embed/conversation.spec.js +13 -0
- package/cjs/src/embed/conversation.spec.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts +0 -3
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +1 -2
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/liveboard.spec.js +2 -2
- package/cjs/src/embed/liveboard.spec.js.map +1 -1
- package/cjs/src/embed/search.js +1 -1
- package/cjs/src/embed/search.js.map +1 -1
- package/cjs/src/embed/search.spec.js +6 -6
- package/cjs/src/embed/search.spec.js.map +1 -1
- package/cjs/src/embed/ts-embed.spec.js +1 -1
- package/cjs/src/errors.d.ts +1 -0
- package/cjs/src/errors.d.ts.map +1 -1
- package/cjs/src/errors.js +10 -9
- package/cjs/src/errors.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/tokenizedFetch.d.ts +0 -1
- package/cjs/src/tokenizedFetch.d.ts.map +1 -1
- package/cjs/src/tokenizedFetch.js +0 -1
- package/cjs/src/tokenizedFetch.js.map +1 -1
- package/cjs/src/types.d.ts +40 -22
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +35 -17
- package/cjs/src/types.js.map +1 -1
- package/cjs/src/utils/processData.d.ts.map +1 -1
- package/cjs/src/utils/processData.js +0 -1
- package/cjs/src/utils/processData.js.map +1 -1
- package/cjs/src/utils/sessionInfoService.d.ts +0 -4
- package/cjs/src/utils/sessionInfoService.d.ts.map +1 -1
- package/cjs/src/utils/sessionInfoService.js +0 -4
- package/cjs/src/utils/sessionInfoService.js.map +1 -1
- package/cjs/src/utils.d.ts +1 -0
- package/cjs/src/utils.d.ts.map +1 -1
- package/cjs/src/utils.js +13 -3
- package/cjs/src/utils.js.map +1 -1
- package/cjs/src/utils.spec.js +6 -6
- package/cjs/src/utils.spec.js.map +1 -1
- package/dist/{index-CqrIh3Vj.js → index-Cl8Rsh6W.js} +1 -1
- package/dist/src/auth.d.ts.map +1 -1
- package/dist/src/css-variables.d.ts +2 -2
- package/dist/src/embed/app.d.ts +20 -6
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/conversation.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts +0 -3
- package/dist/src/embed/liveboard.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/tokenizedFetch.d.ts +0 -1
- package/dist/src/tokenizedFetch.d.ts.map +1 -1
- package/dist/src/types.d.ts +40 -22
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/processData.d.ts.map +1 -1
- package/dist/src/utils/sessionInfoService.d.ts +0 -4
- package/dist/src/utils/sessionInfoService.d.ts.map +1 -1
- package/dist/src/utils.d.ts +1 -0
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +72 -42
- package/dist/tsembed-react.js +71 -41
- package/dist/tsembed.es.js +72 -42
- package/dist/tsembed.js +71 -41
- package/dist/visual-embed-sdk-react-full.d.ts +62 -38
- package/dist/visual-embed-sdk-react.d.ts +62 -38
- package/dist/visual-embed-sdk.d.ts +62 -38
- package/lib/package.json +1 -1
- package/lib/src/auth.d.ts.map +1 -1
- package/lib/src/auth.js +6 -3
- package/lib/src/auth.js.map +1 -1
- package/lib/src/auth.spec.js +15 -3
- package/lib/src/auth.spec.js.map +1 -1
- package/lib/src/css-variables.d.ts +2 -2
- package/lib/src/embed/app.d.ts +20 -6
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +3 -2
- 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/base.spec.js +13 -1
- package/lib/src/embed/base.spec.js.map +1 -1
- package/lib/src/embed/conversation.d.ts.map +1 -1
- package/lib/src/embed/conversation.js +4 -0
- package/lib/src/embed/conversation.js.map +1 -1
- package/lib/src/embed/conversation.spec.js +13 -0
- package/lib/src/embed/conversation.spec.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts +0 -3
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +1 -2
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +2 -2
- package/lib/src/embed/liveboard.spec.js.map +1 -1
- package/lib/src/embed/search.js +1 -1
- package/lib/src/embed/search.js.map +1 -1
- package/lib/src/embed/search.spec.js +6 -6
- package/lib/src/embed/search.spec.js.map +1 -1
- package/lib/src/embed/ts-embed.spec.js +1 -1
- package/lib/src/errors.d.ts +1 -0
- package/lib/src/errors.d.ts.map +1 -1
- package/lib/src/errors.js +10 -9
- package/lib/src/errors.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/tokenizedFetch.d.ts +0 -1
- package/lib/src/tokenizedFetch.d.ts.map +1 -1
- package/lib/src/tokenizedFetch.js +0 -1
- package/lib/src/tokenizedFetch.js.map +1 -1
- package/lib/src/types.d.ts +40 -22
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +35 -17
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils/processData.d.ts.map +1 -1
- package/lib/src/utils/processData.js +0 -1
- package/lib/src/utils/processData.js.map +1 -1
- package/lib/src/utils/sessionInfoService.d.ts +0 -4
- package/lib/src/utils/sessionInfoService.d.ts.map +1 -1
- package/lib/src/utils/sessionInfoService.js +0 -4
- package/lib/src/utils/sessionInfoService.js.map +1 -1
- package/lib/src/utils.d.ts +1 -0
- package/lib/src/utils.d.ts.map +1 -1
- package/lib/src/utils.js +11 -2
- package/lib/src/utils.js.map +1 -1
- package/lib/src/utils.spec.js +6 -6
- package/lib/src/utils.spec.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +62 -38
- package/package.json +1 -1
- package/src/auth.spec.ts +15 -3
- package/src/auth.ts +7 -3
- package/src/css-variables.ts +2 -2
- package/src/embed/app.spec.ts +15 -0
- package/src/embed/app.ts +23 -7
- package/src/embed/base.spec.ts +13 -1
- package/src/embed/conversation.spec.ts +16 -0
- package/src/embed/conversation.ts +4 -0
- package/src/embed/liveboard.spec.ts +2 -2
- package/src/embed/liveboard.ts +1 -4
- package/src/embed/search.spec.ts +6 -6
- package/src/embed/search.ts +1 -1
- package/src/embed/ts-embed.spec.ts +1 -1
- package/src/errors.ts +10 -9
- package/src/react/index.spec.tsx +1 -1
- package/src/tokenizedFetch.ts +0 -1
- package/src/types.ts +38 -20
- package/src/utils/processData.ts +0 -1
- package/src/utils/sessionInfoService.ts +0 -4
- package/src/utils.spec.ts +6 -6
- package/src/utils.ts +14 -2
package/dist/tsembed.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @thoughtspot/visual-embed-sdk version 1.33.
|
|
1
|
+
/* @thoughtspot/visual-embed-sdk version 1.33.4 */
|
|
2
2
|
function _mergeNamespaces(n, m) {
|
|
3
3
|
m.forEach(function (e) {
|
|
4
4
|
e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) {
|
|
@@ -167,6 +167,10 @@ const getCssDimension = (value) => {
|
|
|
167
167
|
}
|
|
168
168
|
return value;
|
|
169
169
|
};
|
|
170
|
+
const getSSOMarker = (markerId) => {
|
|
171
|
+
const encStringToAppend = encodeURIComponent(markerId);
|
|
172
|
+
return `tsSSOMarker=${encStringToAppend}`;
|
|
173
|
+
};
|
|
170
174
|
/**
|
|
171
175
|
* Append a string to a URL's hash fragment
|
|
172
176
|
* @param url A URL
|
|
@@ -175,12 +179,17 @@ const getCssDimension = (value) => {
|
|
|
175
179
|
const appendToUrlHash = (url, stringToAppend) => {
|
|
176
180
|
let outputUrl = url;
|
|
177
181
|
const encStringToAppend = encodeURIComponent(stringToAppend);
|
|
182
|
+
const marker = `tsSSOMarker=${encStringToAppend}`;
|
|
183
|
+
let splitAdder = '';
|
|
178
184
|
if (url.indexOf('#') >= 0) {
|
|
179
|
-
|
|
185
|
+
// If second half of hash contains a '?' already add a '&' instead of
|
|
186
|
+
// '?' which appends to query params.
|
|
187
|
+
splitAdder = url.split('#')[1].indexOf('?') >= 0 ? '&' : '?';
|
|
180
188
|
}
|
|
181
189
|
else {
|
|
182
|
-
|
|
190
|
+
splitAdder = '#?';
|
|
183
191
|
}
|
|
192
|
+
outputUrl = `${outputUrl}${splitAdder}${marker}`;
|
|
184
193
|
return outputUrl;
|
|
185
194
|
};
|
|
186
195
|
/**
|
|
@@ -1547,22 +1556,26 @@ var EmbedEvent;
|
|
|
1547
1556
|
*/
|
|
1548
1557
|
EmbedEvent["Rename"] = "rename";
|
|
1549
1558
|
/**
|
|
1550
|
-
* Emitted if the user wants to intercept the search execution
|
|
1551
|
-
* and implement logic to decide whether to run the search or not
|
|
1552
1559
|
*
|
|
1553
|
-
*
|
|
1560
|
+
* This event can be emitted to intercept search execution initiated by
|
|
1561
|
+
* the users and implement the logic to allow or restrict search execution.
|
|
1562
|
+
* You can can also show custom error text if the search query must be
|
|
1563
|
+
* restricted due to your application or business requirements.
|
|
1564
|
+
|
|
1565
|
+
* Prerequisite: Set `isOnBeforeGetVizDataInterceptEnabled` to `true`
|
|
1554
1566
|
* for this embed event to get emitted.
|
|
1555
1567
|
* @param: payload
|
|
1556
1568
|
* @param: responder
|
|
1557
1569
|
* Contains elements that lets developers define whether ThoughtSpot
|
|
1558
|
-
*
|
|
1570
|
+
* should run the search, and if not, what error message
|
|
1571
|
+
* should be shown to the user.
|
|
1559
1572
|
*
|
|
1560
|
-
* execute: When execute returns true
|
|
1561
|
-
* When execute returns false
|
|
1573
|
+
* execute: When execute returns `true`, the search will be run.
|
|
1574
|
+
* When execute returns `false`, the search will not be executed.
|
|
1562
1575
|
*
|
|
1563
|
-
* error: Developers can customize the
|
|
1564
|
-
*
|
|
1565
|
-
* @version SDK : 1.29.0 | Thoughtspot : 10.
|
|
1576
|
+
* error: Developers can customize the error message text when `execute`
|
|
1577
|
+
* returns `false` using the error parameter in responder.
|
|
1578
|
+
* @version SDK : 1.29.0 | Thoughtspot : 10.3.0.cl
|
|
1566
1579
|
* @example
|
|
1567
1580
|
*```js
|
|
1568
1581
|
* .on(EmbedEvent.OnBeforeGetVizDataIntercept,
|
|
@@ -1602,15 +1615,15 @@ var EmbedEvent;
|
|
|
1602
1615
|
*/
|
|
1603
1616
|
EmbedEvent["OnBeforeGetVizDataIntercept"] = "onBeforeGetVizDataIntercept";
|
|
1604
1617
|
/**
|
|
1605
|
-
* Emitted when parameter changes in an
|
|
1606
|
-
* or
|
|
1618
|
+
* Emitted when parameter changes in an Answer
|
|
1619
|
+
* or Liveboard
|
|
1607
1620
|
*
|
|
1608
1621
|
* ```js
|
|
1609
1622
|
* liveboardEmbed.on(EmbedEvent.ParameterChanged, (payload) => {
|
|
1610
1623
|
* console.log('payload', payload);
|
|
1611
1624
|
* })
|
|
1612
1625
|
*```
|
|
1613
|
-
* @version SDK : 1.29.0 | Thoughtspot : 10.
|
|
1626
|
+
* @version SDK : 1.29.0 | Thoughtspot : 10.3.0.cl
|
|
1614
1627
|
*/
|
|
1615
1628
|
EmbedEvent["ParameterChanged"] = "parameterChanged";
|
|
1616
1629
|
})(EmbedEvent || (EmbedEvent = {}));
|
|
@@ -2341,8 +2354,12 @@ var HostEvent;
|
|
|
2341
2354
|
* see link:https://developers.thoughtspot.com/docs/runtime-filters#rtOperator[Developer Documentation].
|
|
2342
2355
|
*
|
|
2343
2356
|
* `values` - An array of one or several values. The value definition on the
|
|
2344
|
-
* data type you choose to filter on. For a complete list of supported data types,
|
|
2345
|
-
*
|
|
2357
|
+
* data type you choose to filter on. For a complete list of supported data types, see
|
|
2358
|
+
* link:https://developers.thoughtspot.com/docs/runtime-filters#_supported_data_types[Supported data types].
|
|
2359
|
+
*
|
|
2360
|
+
* `type` - To update filters for date time, specify the date format type.
|
|
2361
|
+
* For more information and examples, see link:https://developers.thoughtspot.com/docs/embed-liveboard#_date_filters[Date filters].
|
|
2362
|
+
*
|
|
2346
2363
|
* @example
|
|
2347
2364
|
* ```js
|
|
2348
2365
|
*
|
|
@@ -2472,7 +2489,7 @@ var HostEvent;
|
|
|
2472
2489
|
*/
|
|
2473
2490
|
HostEvent["AskSage"] = "AskSage";
|
|
2474
2491
|
/**
|
|
2475
|
-
* Trigger
|
|
2492
|
+
* Trigger cross filter update action on a Liveboard
|
|
2476
2493
|
* @example
|
|
2477
2494
|
* ```js
|
|
2478
2495
|
* liveboardEmbed.trigger(HostEvent.UpdateCrossFilter, {
|
|
@@ -2487,7 +2504,7 @@ var HostEvent;
|
|
|
2487
2504
|
*/
|
|
2488
2505
|
HostEvent["UpdateCrossFilter"] = "UpdateCrossFilter";
|
|
2489
2506
|
/**
|
|
2490
|
-
* Trigger
|
|
2507
|
+
* Trigger reset action for a personalized Liveboard view.
|
|
2491
2508
|
* @example
|
|
2492
2509
|
* ```js
|
|
2493
2510
|
* liveboardEmbed.trigger(HostEvent.ResetLiveboardPersonalisedView);
|
|
@@ -2633,6 +2650,7 @@ var Param;
|
|
|
2633
2650
|
Param["ShowLiveboardReverifyBanner"] = "showLiveboardReverifyBanner";
|
|
2634
2651
|
Param["LiveboardHeaderV2"] = "isLiveboardHeaderV2Enabled";
|
|
2635
2652
|
Param["SpotterEnabled"] = "isSpotterExperienceEnabled";
|
|
2653
|
+
Param["IsUnifiedSearchExperienceEnabled"] = "isUnifiedSearchExperienceEnabled";
|
|
2636
2654
|
})(Param || (Param = {}));
|
|
2637
2655
|
/**
|
|
2638
2656
|
* ThoughtSpot application pages include actions and menu commands
|
|
@@ -3604,7 +3622,7 @@ var Action;
|
|
|
3604
3622
|
*/
|
|
3605
3623
|
Action["AIHighlights"] = "AIHighlights";
|
|
3606
3624
|
/**
|
|
3607
|
-
* Action ID for edit schedule action on schedule on homepage
|
|
3625
|
+
* Action ID for edit the schedule action on schedule on homepage
|
|
3608
3626
|
* @example
|
|
3609
3627
|
* ```js
|
|
3610
3628
|
* disabledActions: [Action.EditScheduleHomepage]
|
|
@@ -3666,6 +3684,15 @@ var Action;
|
|
|
3666
3684
|
* @version SDK: 1.34.0 | Thoughtspot: 10.3.0.cl
|
|
3667
3685
|
*/
|
|
3668
3686
|
Action["KPIAnalysisCTA"] = "kpiAnalysisCTA";
|
|
3687
|
+
/**
|
|
3688
|
+
* Action ID for disabling chip reorder in Answer and Liveboard
|
|
3689
|
+
* @example
|
|
3690
|
+
* ```js
|
|
3691
|
+
* const disabledActions = [Action.DisableChipReorder]
|
|
3692
|
+
* ```
|
|
3693
|
+
* @version SDK: 1.35.0 | Thoughtspot: 10.5.0.cl
|
|
3694
|
+
*/
|
|
3695
|
+
Action["DisableChipReorder"] = "disableChipReorder";
|
|
3669
3696
|
})(Action || (Action = {}));
|
|
3670
3697
|
var PrefetchFeatures;
|
|
3671
3698
|
(function (PrefetchFeatures) {
|
|
@@ -6035,20 +6062,21 @@ var isEqual_1 = isEqual;
|
|
|
6035
6062
|
|
|
6036
6063
|
const ERROR_MESSAGE = {
|
|
6037
6064
|
INVALID_THOUGHTSPOT_HOST: 'Error parsing ThoughtSpot host. Please provide a valid URL.',
|
|
6038
|
-
|
|
6039
|
-
|
|
6040
|
-
|
|
6041
|
-
|
|
6042
|
-
|
|
6043
|
-
|
|
6065
|
+
SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND: 'Please select a worksheet to get started',
|
|
6066
|
+
LIVEBOARD_VIZ_ID_VALIDATION: 'Please select a Liveboard to embed.',
|
|
6067
|
+
TRIGGER_TIMED_OUT: 'Trigger timed-out in getting a response',
|
|
6068
|
+
SEARCHEMBED_BETA_WRANING_MESSAGE: 'SearchEmbed is in Beta in this release.',
|
|
6069
|
+
SAGE_EMBED_BETA_WARNING_MESSAGE: 'SageEmbed is in Beta in this release.',
|
|
6070
|
+
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.',
|
|
6071
|
+
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.',
|
|
6044
6072
|
SDK_NOT_INITIALIZED: 'SDK not initialized',
|
|
6045
|
-
SESSION_INFO_FAILED: 'Failed to get session
|
|
6073
|
+
SESSION_INFO_FAILED: 'Failed to get session information',
|
|
6046
6074
|
INVALID_TOKEN_ERROR: 'Received invalid token from getAuthToken callback or authToken endpoint.',
|
|
6047
6075
|
MIXPANEL_TOKEN_NOT_FOUND: 'Mixpanel token not found in session info',
|
|
6048
|
-
PRERENDER_ID_MISSING: 'PreRender
|
|
6076
|
+
PRERENDER_ID_MISSING: 'PreRender ID is required for preRender',
|
|
6049
6077
|
SYNC_STYLE_CALLED_BEFORE_RENDER: 'PreRender should be called before using syncPreRenderStyle',
|
|
6050
6078
|
CSP_VIOLATION_ALERT: 'CSP violation detected. Please check the console errors for more details.',
|
|
6051
|
-
CSP_FRAME_HOST_VIOLATION_LOG_MESSAGE: 'Please
|
|
6079
|
+
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',
|
|
6052
6080
|
MISSING_REPORTING_OBSERVER: 'ReportingObserver not supported',
|
|
6053
6081
|
};
|
|
6054
6082
|
|
|
@@ -6266,7 +6294,6 @@ const setEmbedConfig = (newConfig) => {
|
|
|
6266
6294
|
* Fetch wrapper that adds the authentication token to the request.
|
|
6267
6295
|
* Use this to call the ThoughtSpot APIs when using the visual embed sdk.
|
|
6268
6296
|
* The interface for this method is the same as Web `Fetch`.
|
|
6269
|
-
*
|
|
6270
6297
|
* @param input
|
|
6271
6298
|
* @param init
|
|
6272
6299
|
* @example
|
|
@@ -6868,7 +6895,7 @@ class AnswerService {
|
|
|
6868
6895
|
async getTML() {
|
|
6869
6896
|
const { object } = await this.executeQuery(getAnswerTML, {});
|
|
6870
6897
|
const edoc = object[0].edoc;
|
|
6871
|
-
const YAML = await import('./index-
|
|
6898
|
+
const YAML = await import('./index-Cl8Rsh6W.js');
|
|
6872
6899
|
const parsedDoc = YAML.parse(edoc);
|
|
6873
6900
|
return {
|
|
6874
6901
|
answer: {
|
|
@@ -13708,7 +13735,6 @@ let sessionInfo = null;
|
|
|
13708
13735
|
* Returns the session info object and caches it for future use.
|
|
13709
13736
|
* Once fetched the session info object is cached and returned from the cache on
|
|
13710
13737
|
* subsequent calls.
|
|
13711
|
-
*
|
|
13712
13738
|
* @example ```js
|
|
13713
13739
|
* const sessionInfo = await getSessionInfo();
|
|
13714
13740
|
* console.log(sessionInfo);
|
|
@@ -13727,7 +13753,6 @@ async function getSessionInfo() {
|
|
|
13727
13753
|
}
|
|
13728
13754
|
/**
|
|
13729
13755
|
* Processes the session info response and returns the session info object.
|
|
13730
|
-
*
|
|
13731
13756
|
* @param sessionInfoResp {any} Response from the session info API.
|
|
13732
13757
|
* @returns {SessionInfo} The session info object.
|
|
13733
13758
|
* @example ```js
|
|
@@ -13918,7 +13943,7 @@ function getReleaseVersion() {
|
|
|
13918
13943
|
* Check if we are stuck at the SSO redirect URL
|
|
13919
13944
|
*/
|
|
13920
13945
|
function isAtSSORedirectUrl() {
|
|
13921
|
-
return window.location.href.indexOf(SSO_REDIRECTION_MARKER_GUID) >= 0;
|
|
13946
|
+
return window.location.href.indexOf(getSSOMarker(SSO_REDIRECTION_MARKER_GUID)) >= 0;
|
|
13922
13947
|
}
|
|
13923
13948
|
/**
|
|
13924
13949
|
* Remove the SSO redirect URL marker
|
|
@@ -13929,7 +13954,10 @@ function removeSSORedirectUrlMarker() {
|
|
|
13929
13954
|
// reload the page which we don't want. We'll live with adding an
|
|
13930
13955
|
// unnecessary hash to the parent page URL until we find any use case where
|
|
13931
13956
|
// that creates an issue.
|
|
13932
|
-
|
|
13957
|
+
// Replace any occurences of ?ssoMarker=guid or &ssoMarker=guid.
|
|
13958
|
+
let updatedHash = window.location.hash.replace(`?${getSSOMarker(SSO_REDIRECTION_MARKER_GUID)}`, '');
|
|
13959
|
+
updatedHash = updatedHash.replace(`&${getSSOMarker(SSO_REDIRECTION_MARKER_GUID)}`, '');
|
|
13960
|
+
window.location.hash = updatedHash;
|
|
13933
13961
|
}
|
|
13934
13962
|
/**
|
|
13935
13963
|
* Perform token based authentication
|
|
@@ -14462,7 +14490,6 @@ function processCustomAction(e, thoughtSpotHost) {
|
|
|
14462
14490
|
}
|
|
14463
14491
|
/**
|
|
14464
14492
|
* Responds to AuthInit sent from host signifying successful authentication in host.
|
|
14465
|
-
*
|
|
14466
14493
|
* @param e
|
|
14467
14494
|
* @returns {any}
|
|
14468
14495
|
*/
|
|
@@ -14603,7 +14630,7 @@ function processTrigger(iFrame, messageType, thoughtSpotHost, data) {
|
|
|
14603
14630
|
});
|
|
14604
14631
|
}
|
|
14605
14632
|
|
|
14606
|
-
var name="@thoughtspot/visual-embed-sdk";var version$1="1.33.
|
|
14633
|
+
var name="@thoughtspot/visual-embed-sdk";var version$1="1.33.4";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 . --incremental false; tsc -p . --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts","bundle-dts":"dts-bundle --name ../../dist/visual-embed-sdk --main lib/src/index.d.ts --outputAsModuleFolder=true","bundle-dts-react":"dts-bundle --name ../../../dist/visual-embed-sdk-react --main lib/src/react/index.d.ts --outputAsModuleFolder=true","bundle-dts-react-full":"dts-bundle --name ../../../dist/visual-embed-sdk-react-full --main lib/src/react/all-types-export.d.ts --outputAsModuleFolder=true",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.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 | coveralls","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={algoliasearch:"^4.10.5",classnames:"^2.3.1",dompurify:"^2.3.4","eslint-plugin-comment-length":"^0.9.2","eslint-plugin-jsdoc":"^46.9.0",eventemitter3:"^4.0.7","gatsby-plugin-vercel":"^1.0.3","html-react-parser":"^1.4.12",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":"^8.2.6","@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":"^4.6.0","@typescript-eslint/parser":"^4.6.0",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1",coveralls:"^3.1.0",crypto:"^1.0.1","current-git-branch":"^1.1.0","dts-bundle":"^0.7.3",eslint:"^7.12.1","eslint-config-airbnb-base":"^14.2.0","eslint-config-prettier":"^6.15.0","eslint-import-resolver-typescript":"^2.3.0","eslint-plugin-import":"^2.22.1","eslint-plugin-prettier":"^3.1.4","eslint-plugin-react-hooks":"^4.2.0","fs-extra":"^10.0.0","gh-pages":"^3.1.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^1.1.1",jest:"^26.6.3","jest-fetch-mock":"^3.0.3",jsdom:"^17.0.0","node-sass":"^8.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","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^5.3.4"};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:"30 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};
|
|
14607
14634
|
|
|
14608
14635
|
/**
|
|
14609
14636
|
* Copyright (c) 2022
|
|
@@ -15747,9 +15774,9 @@ class AppEmbed extends V1Embed {
|
|
|
15747
15774
|
* embedded Liveboard or visualization.
|
|
15748
15775
|
*/
|
|
15749
15776
|
getEmbedParams() {
|
|
15750
|
-
const { tag, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 =
|
|
15777
|
+
const { tag, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 = false, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, hideHomepageLeftNav = false, modularHomeExperience = false, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, enable2ColumnLayout, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false,
|
|
15751
15778
|
/* eslint-disable-next-line max-len */
|
|
15752
|
-
dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, homePageSearchBarMode, } = this.viewConfig;
|
|
15779
|
+
dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, } = this.viewConfig;
|
|
15753
15780
|
let params = {};
|
|
15754
15781
|
params[Param.EmbedApp] = true;
|
|
15755
15782
|
params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
|
|
@@ -15764,6 +15791,7 @@ class AppEmbed extends V1Embed {
|
|
|
15764
15791
|
params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
|
|
15765
15792
|
params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;
|
|
15766
15793
|
params[Param.ShowLiveboardReverifyBanner] = showLiveboardReverifyBanner;
|
|
15794
|
+
params[Param.IsUnifiedSearchExperienceEnabled] = isUnifiedSearchExperienceEnabled;
|
|
15767
15795
|
params = this.getBaseQueryParams(params);
|
|
15768
15796
|
if (fullHeight === true) {
|
|
15769
15797
|
params[Param.fullHeight] = true;
|
|
@@ -16042,7 +16070,7 @@ class LiveboardEmbed extends V1Embed {
|
|
|
16042
16070
|
let params = {};
|
|
16043
16071
|
params[Param.EmbedApp] = true;
|
|
16044
16072
|
params = this.getBaseQueryParams(params);
|
|
16045
|
-
const { enableVizTransformations, fullHeight, defaultHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, enableAskSage, enable2ColumnLayout, dataPanelV2 =
|
|
16073
|
+
const { enableVizTransformations, fullHeight, defaultHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, enableAskSage, enable2ColumnLayout, dataPanelV2 = false, enableCustomColumnGroups = false, } = this.viewConfig;
|
|
16046
16074
|
const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
|
|
16047
16075
|
|| this.viewConfig.preventPinboardFilterRemoval;
|
|
16048
16076
|
if (fullHeight === true) {
|
|
@@ -16218,7 +16246,6 @@ class LiveboardEmbed extends V1Embed {
|
|
|
16218
16246
|
/**
|
|
16219
16247
|
* Returns the full url of the liveboard/viz which can be used to open
|
|
16220
16248
|
* this liveboard inside the full Thoughtspot application in a new tab.
|
|
16221
|
-
*
|
|
16222
16249
|
* @returns url string
|
|
16223
16250
|
*/
|
|
16224
16251
|
getLiveboardUrl() {
|
|
@@ -16297,7 +16324,7 @@ class SearchEmbed extends TsEmbed {
|
|
|
16297
16324
|
}
|
|
16298
16325
|
getEmbedParams() {
|
|
16299
16326
|
var _a;
|
|
16300
|
-
const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, hideSearchBar, dataPanelV2 =
|
|
16327
|
+
const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, hideSearchBar, dataPanelV2 = false, useLastSelectedSources = false, runtimeParameters, collapseSearchBarInitially = false, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false,
|
|
16301
16328
|
/* eslint-disable-next-line max-len */
|
|
16302
16329
|
dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, focusSearchBarOnRender = true, excludeRuntimeParametersfromURL, collapseSearchBar = true, } = this.viewConfig;
|
|
16303
16330
|
const queryParams = this.getBaseQueryParams();
|
|
@@ -16921,6 +16948,9 @@ class ConversationEmbed extends TsEmbed {
|
|
|
16921
16948
|
getIframeSrc() {
|
|
16922
16949
|
const { worksheetId, searchOptions, } = this.viewConfig;
|
|
16923
16950
|
const path = 'insights/conv-assist';
|
|
16951
|
+
if (!worksheetId) {
|
|
16952
|
+
this.handleError(ERROR_MESSAGE.SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND);
|
|
16953
|
+
}
|
|
16924
16954
|
const queryParams = this.getBaseQueryParams();
|
|
16925
16955
|
queryParams[Param.SpotterEnabled] = true;
|
|
16926
16956
|
let query = '';
|