@thoughtspot/visual-embed-sdk 1.32.3 → 1.32.6
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 +42 -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 +30 -0
- package/cjs/src/embed/app.spec.js.map +1 -1
- package/cjs/src/embed/base.d.ts +1 -1
- package/cjs/src/embed/base.d.ts.map +1 -1
- package/cjs/src/embed/base.js +6 -7
- package/cjs/src/embed/base.js.map +1 -1
- package/cjs/src/embed/embed.spec.js +0 -19
- package/cjs/src/embed/embed.spec.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts +42 -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/liveboard.spec.js +33 -0
- package/cjs/src/embed/liveboard.spec.js.map +1 -1
- package/cjs/src/embed/ts-embed.d.ts +0 -1
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +3 -9
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/embed/ts-embed.spec.js +0 -9
- package/cjs/src/embed/ts-embed.spec.js.map +1 -1
- package/cjs/src/types.d.ts +62 -16
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +55 -7
- package/cjs/src/types.js.map +1 -1
- package/cjs/src/utils/graphql/answerService/answer-queries.d.ts +1 -0
- package/cjs/src/utils/graphql/answerService/answer-queries.d.ts.map +1 -1
- package/cjs/src/utils/graphql/answerService/answer-queries.js +9 -2
- package/cjs/src/utils/graphql/answerService/answer-queries.js.map +1 -1
- package/cjs/src/utils/graphql/answerService/answerService.d.ts +15 -0
- package/cjs/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
- package/cjs/src/utils/graphql/answerService/answerService.js +25 -0
- package/cjs/src/utils/graphql/answerService/answerService.js.map +1 -1
- package/cjs/src/utils/graphql/answerService/answerService.spec.js +35 -0
- package/cjs/src/utils/graphql/answerService/answerService.spec.js.map +1 -1
- package/cjs/src/utils/graphql/graphql-request.spec.d.ts +2 -0
- package/cjs/src/utils/graphql/graphql-request.spec.d.ts.map +1 -0
- package/cjs/src/utils/graphql/graphql-request.spec.js +36 -0
- package/cjs/src/utils/graphql/graphql-request.spec.js.map +1 -0
- package/cjs/src/utils/processData.js +2 -2
- package/cjs/src/utils/processData.js.map +1 -1
- package/cjs/src/utils/processData.spec.js +14 -0
- package/cjs/src/utils/processData.spec.js.map +1 -1
- package/cjs/src/utils/processTrigger.d.ts +1 -0
- package/cjs/src/utils/processTrigger.d.ts.map +1 -1
- package/cjs/src/utils/processTrigger.js +3 -3
- package/cjs/src/utils/processTrigger.js.map +1 -1
- package/cjs/src/utils/processTrigger.spec.js +10 -0
- package/cjs/src/utils/processTrigger.spec.js.map +1 -1
- package/cjs/src/utils.d.ts.map +1 -1
- package/cjs/src/utils.js +1 -5
- package/cjs/src/utils.js.map +1 -1
- package/dist/src/embed/app.d.ts +42 -0
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/base.d.ts +1 -1
- package/dist/src/embed/base.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts +42 -0
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.d.ts +0 -1
- package/dist/src/embed/ts-embed.d.ts.map +1 -1
- package/dist/src/types.d.ts +62 -16
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/graphql/answerService/answer-queries.d.ts +1 -0
- package/dist/src/utils/graphql/answerService/answer-queries.d.ts.map +1 -1
- package/dist/src/utils/graphql/answerService/answerService.d.ts +15 -0
- package/dist/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
- package/dist/src/utils/graphql/graphql-request.spec.d.ts +2 -0
- package/dist/src/utils/graphql/graphql-request.spec.d.ts.map +1 -0
- package/dist/src/utils/processTrigger.d.ts +1 -0
- package/dist/src/utils/processTrigger.d.ts.map +1 -1
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +103 -27
- package/dist/tsembed-react.js +103 -27
- package/dist/tsembed.es.js +109 -34
- package/dist/tsembed.js +109 -34
- package/dist/visual-embed-sdk-react-full.d.ts +162 -18
- package/dist/visual-embed-sdk-react.d.ts +162 -18
- package/dist/visual-embed-sdk.d.ts +162 -18
- package/lib/package.json +1 -1
- package/lib/src/embed/app.d.ts +42 -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 +30 -0
- package/lib/src/embed/app.spec.js.map +1 -1
- package/lib/src/embed/base.d.ts +1 -1
- package/lib/src/embed/base.d.ts.map +1 -1
- package/lib/src/embed/base.js +6 -7
- package/lib/src/embed/base.js.map +1 -1
- package/lib/src/embed/embed.spec.js +0 -19
- package/lib/src/embed/embed.spec.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts +42 -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/liveboard.spec.js +33 -0
- package/lib/src/embed/liveboard.spec.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts +0 -1
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +3 -9
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/embed/ts-embed.spec.js +0 -9
- package/lib/src/embed/ts-embed.spec.js.map +1 -1
- package/lib/src/types.d.ts +62 -16
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +55 -7
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils/graphql/answerService/answer-queries.d.ts +1 -0
- package/lib/src/utils/graphql/answerService/answer-queries.d.ts.map +1 -1
- package/lib/src/utils/graphql/answerService/answer-queries.js +8 -1
- package/lib/src/utils/graphql/answerService/answer-queries.js.map +1 -1
- package/lib/src/utils/graphql/answerService/answerService.d.ts +15 -0
- package/lib/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
- package/lib/src/utils/graphql/answerService/answerService.js +25 -0
- package/lib/src/utils/graphql/answerService/answerService.js.map +1 -1
- package/lib/src/utils/graphql/answerService/answerService.spec.js +36 -1
- package/lib/src/utils/graphql/answerService/answerService.spec.js.map +1 -1
- package/lib/src/utils/graphql/graphql-request.spec.d.ts +2 -0
- package/lib/src/utils/graphql/graphql-request.spec.d.ts.map +1 -0
- package/lib/src/utils/graphql/graphql-request.spec.js +33 -0
- package/lib/src/utils/graphql/graphql-request.spec.js.map +1 -0
- package/lib/src/utils/processData.js +2 -2
- package/lib/src/utils/processData.js.map +1 -1
- package/lib/src/utils/processData.spec.js +14 -0
- package/lib/src/utils/processData.spec.js.map +1 -1
- package/lib/src/utils/processTrigger.d.ts +1 -0
- package/lib/src/utils/processTrigger.d.ts.map +1 -1
- package/lib/src/utils/processTrigger.js +1 -1
- package/lib/src/utils/processTrigger.js.map +1 -1
- package/lib/src/utils/processTrigger.spec.js +10 -0
- package/lib/src/utils/processTrigger.spec.js.map +1 -1
- package/lib/src/utils.d.ts.map +1 -1
- package/lib/src/utils.js +1 -5
- package/lib/src/utils.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +162 -18
- package/package.json +1 -1
- package/src/embed/app.spec.ts +45 -0
- package/src/embed/app.ts +48 -0
- package/src/embed/base.ts +1 -2
- package/src/embed/embed.spec.ts +0 -22
- package/src/embed/liveboard.spec.ts +48 -0
- package/src/embed/liveboard.ts +48 -0
- package/src/embed/ts-embed.spec.ts +0 -11
- package/src/embed/ts-embed.ts +1 -9
- package/src/types.ts +62 -15
- package/src/utils/graphql/answerService/answer-queries.ts +9 -1
- package/src/utils/graphql/answerService/answerService.spec.ts +45 -0
- package/src/utils/graphql/answerService/answerService.ts +35 -0
- package/src/utils/graphql/graphql-request.spec.ts +38 -0
- package/src/utils/processData.spec.ts +16 -0
- package/src/utils/processData.ts +2 -2
- package/src/utils/processTrigger.spec.ts +19 -0
- package/src/utils/processTrigger.ts +1 -1
- package/src/utils.ts +0 -5
package/dist/tsembed.es.js
CHANGED
|
@@ -199,8 +199,7 @@ const checkReleaseVersionInBeta = (releaseVersion, suppressBetaWarning) => {
|
|
|
199
199
|
return false;
|
|
200
200
|
};
|
|
201
201
|
const getCustomisations = (embedConfig, viewConfig) => {
|
|
202
|
-
var _a, _b
|
|
203
|
-
const customCssUrlFromEmbedConfig = embedConfig.customCssUrl;
|
|
202
|
+
var _a, _b;
|
|
204
203
|
const customizationsFromViewConfig = viewConfig.customizations;
|
|
205
204
|
const customizationsFromEmbedConfig = embedConfig.customizations
|
|
206
205
|
|| embedConfig.customisations;
|
|
@@ -212,9 +211,6 @@ const getCustomisations = (embedConfig, viewConfig) => {
|
|
|
212
211
|
...(_a = customizationsFromEmbedConfig === null || customizationsFromEmbedConfig === void 0 ? void 0 : customizationsFromEmbedConfig.style) === null || _a === void 0 ? void 0 : _a.customCSS,
|
|
213
212
|
...(_b = customizationsFromViewConfig === null || customizationsFromViewConfig === void 0 ? void 0 : customizationsFromViewConfig.style) === null || _b === void 0 ? void 0 : _b.customCSS,
|
|
214
213
|
},
|
|
215
|
-
customCSSUrl: ((_c = customizationsFromViewConfig === null || customizationsFromViewConfig === void 0 ? void 0 : customizationsFromViewConfig.style) === null || _c === void 0 ? void 0 : _c.customCSSUrl)
|
|
216
|
-
|| ((_d = customizationsFromEmbedConfig === null || customizationsFromEmbedConfig === void 0 ? void 0 : customizationsFromEmbedConfig.style) === null || _d === void 0 ? void 0 : _d.customCSSUrl)
|
|
217
|
-
|| customCssUrlFromEmbedConfig,
|
|
218
214
|
},
|
|
219
215
|
content: {
|
|
220
216
|
...customizationsFromEmbedConfig === null || customizationsFromEmbedConfig === void 0 ? void 0 : customizationsFromEmbedConfig.content,
|
|
@@ -1504,20 +1500,57 @@ var EmbedEvent;
|
|
|
1504
1500
|
*/
|
|
1505
1501
|
EmbedEvent["Rename"] = "rename";
|
|
1506
1502
|
/**
|
|
1507
|
-
* Emitted
|
|
1503
|
+
* Emitted if the user wants to intercept the search execution
|
|
1504
|
+
* and implement logic to decide whether to run the search or not
|
|
1505
|
+
*
|
|
1506
|
+
* Prerequisite: Set isOnBeforeGetVizDataInterceptEnabled : true
|
|
1507
|
+
* for this embed event to get emitted.
|
|
1508
1508
|
*
|
|
1509
|
-
*
|
|
1510
|
-
*
|
|
1509
|
+
* Parameter: payload
|
|
1510
|
+
* Parameter: responder
|
|
1511
|
+
* Contains elements that lets developers define whether ThoughtSpot
|
|
1512
|
+
* will run the search or not, and if not, which error message to provide.
|
|
1513
|
+
* execute: When execute returns true, the search will be run.
|
|
1514
|
+
* When execute returns false, the search will not be executed.
|
|
1515
|
+
* error: Developers can customize the user facing message when execute is
|
|
1516
|
+
* set to false using the error parameter in responder
|
|
1511
1517
|
*
|
|
1512
1518
|
*```js
|
|
1513
|
-
*
|
|
1519
|
+
* .on(EmbedEvent.OnBeforeGetVizDataIntercept,
|
|
1514
1520
|
* (payload, responder) => {
|
|
1515
1521
|
* responder({
|
|
1516
1522
|
* data: {
|
|
1517
|
-
* execute:
|
|
1518
|
-
*
|
|
1523
|
+
* execute:false,
|
|
1524
|
+
* error: {
|
|
1525
|
+
* //Provide a custom error message to explain to your end user
|
|
1526
|
+
* //why their search did not run
|
|
1527
|
+
* errorText: "This search query cannot be run.
|
|
1528
|
+
* Please contact your administrator for more details."
|
|
1529
|
+
* }
|
|
1530
|
+
* }})
|
|
1531
|
+
* })
|
|
1532
|
+
* ```
|
|
1533
|
+
*
|
|
1534
|
+
*```js
|
|
1535
|
+
* .on(EmbedEvent.OnBeforeGetVizDataIntercept,
|
|
1536
|
+
* (payload, responder) => {
|
|
1537
|
+
* const query = payload.data.data.answer.search_query
|
|
1538
|
+
* responder({
|
|
1539
|
+
* data: {
|
|
1540
|
+
* // returns true as long as the query does not include
|
|
1541
|
+
* // both the 'sales' AND the 'county' column
|
|
1542
|
+
* execute: !(query.includes("sales")&&query.includes("county")),
|
|
1543
|
+
* error: {
|
|
1544
|
+
* //Provide a custom error message to explain to your end user
|
|
1545
|
+
* // why their search did not run, and which searches are accepted by your custom logic.
|
|
1546
|
+
* errorText: "You can't use this query :" + query + ".
|
|
1547
|
+
* The 'sales' measures can never be used at the 'county' level.
|
|
1548
|
+
* Please try another measure, or remove 'county' from your search."
|
|
1549
|
+
* }
|
|
1550
|
+
* }})
|
|
1519
1551
|
* })
|
|
1520
1552
|
*```
|
|
1553
|
+
*
|
|
1521
1554
|
* @version SDK : 1.29.0 | Thoughtspot : 10.2.0.cl
|
|
1522
1555
|
*/
|
|
1523
1556
|
EmbedEvent["OnBeforeGetVizDataIntercept"] = "onBeforeGetVizDataIntercept";
|
|
@@ -1638,6 +1671,15 @@ var HostEvent;
|
|
|
1638
1671
|
* @hidden
|
|
1639
1672
|
*/
|
|
1640
1673
|
HostEvent["Reload"] = "reload";
|
|
1674
|
+
/**
|
|
1675
|
+
* Get current iframe src
|
|
1676
|
+
* @example
|
|
1677
|
+
* ```js
|
|
1678
|
+
* const frameUrl = AppEmbed.trigger(HostEvent.GetIframeUrl)
|
|
1679
|
+
* ```
|
|
1680
|
+
* @version SDK: 1.35.0 | Thoughtspot: 10.4.0.cl
|
|
1681
|
+
*/
|
|
1682
|
+
HostEvent["GetIframeUrl"] = "GetIframeUrl";
|
|
1641
1683
|
/**
|
|
1642
1684
|
* Display specific visualizations on a Liveboard.
|
|
1643
1685
|
* @param - An array of GUIDs of the visualization to show. The visualization IDs not passed
|
|
@@ -2450,7 +2492,6 @@ var Param;
|
|
|
2450
2492
|
Param["ViewPortHeight"] = "viewPortHeight";
|
|
2451
2493
|
Param["ViewPortWidth"] = "viewPortWidth";
|
|
2452
2494
|
Param["VisibleActions"] = "visibleAction";
|
|
2453
|
-
Param["CustomCSSUrl"] = "customCssUrl";
|
|
2454
2495
|
Param["DisableLoginRedirect"] = "disableLoginRedirect";
|
|
2455
2496
|
Param["visibleVizs"] = "pinboardVisibleVizs";
|
|
2456
2497
|
Param["LiveboardV2Enabled"] = "isPinboardV2Enabled";
|
|
@@ -2509,6 +2550,9 @@ var Param;
|
|
|
2509
2550
|
Param["FocusSearchBarOnRender"] = "focusSearchBarOnRender";
|
|
2510
2551
|
Param["DisableRedirectionLinksInNewTab"] = "disableRedirectionLinksInNewTab";
|
|
2511
2552
|
Param["HomePageSearchBarMode"] = "homePageSearchBarMode";
|
|
2553
|
+
Param["ShowLiveboardVerifiedBadge"] = "showLiveboardVerifiedBadge";
|
|
2554
|
+
Param["ShowLiveboardReverifyBanner"] = "showLiveboardReverifyBanner";
|
|
2555
|
+
Param["LiveboardHeaderV2"] = "isLiveboardHeaderV2Enabled";
|
|
2512
2556
|
})(Param || (Param = {}));
|
|
2513
2557
|
/**
|
|
2514
2558
|
* ThoughtSpot application pages include actions and menu commands
|
|
@@ -6371,7 +6415,6 @@ const getAnswer = `
|
|
|
6371
6415
|
isDiscoverable
|
|
6372
6416
|
isHidden
|
|
6373
6417
|
modifiedAt
|
|
6374
|
-
tags
|
|
6375
6418
|
}
|
|
6376
6419
|
visualizations {
|
|
6377
6420
|
... on TableViz {
|
|
@@ -6416,6 +6459,14 @@ const getAnswerData = `
|
|
|
6416
6459
|
}
|
|
6417
6460
|
}
|
|
6418
6461
|
}
|
|
6462
|
+
`;
|
|
6463
|
+
const getSQLQuery = `
|
|
6464
|
+
mutation GetSQLQuery($session: BachSessionIdInput!) {
|
|
6465
|
+
Answer__getQuery(session: $session) {
|
|
6466
|
+
${bachSessionId}
|
|
6467
|
+
sql
|
|
6468
|
+
}
|
|
6469
|
+
}
|
|
6419
6470
|
`;
|
|
6420
6471
|
|
|
6421
6472
|
// eslint-disable-next-line no-shadow
|
|
@@ -6547,6 +6598,10 @@ class AnswerService {
|
|
|
6547
6598
|
},
|
|
6548
6599
|
});
|
|
6549
6600
|
}
|
|
6601
|
+
async getSQLQuery() {
|
|
6602
|
+
const { sql } = await this.executeQuery(getSQLQuery, {});
|
|
6603
|
+
return sql;
|
|
6604
|
+
}
|
|
6550
6605
|
/**
|
|
6551
6606
|
* Fetch data from the answer.
|
|
6552
6607
|
* @param offset
|
|
@@ -6581,6 +6636,20 @@ class AnswerService {
|
|
|
6581
6636
|
credentials: 'include',
|
|
6582
6637
|
});
|
|
6583
6638
|
}
|
|
6639
|
+
/**
|
|
6640
|
+
* Fetch the data for the answer as a PNG blob. This might be
|
|
6641
|
+
* quicker for larger data.
|
|
6642
|
+
* @param userLocale
|
|
6643
|
+
* @param omitBackground Omit the background in the PNG
|
|
6644
|
+
* @param deviceScaleFactor The scale factor for the PNG
|
|
6645
|
+
* @return Response
|
|
6646
|
+
*/
|
|
6647
|
+
async fetchPNGBlob(userLocale = 'en-us', includeInfo = false, omitBackground = false, deviceScaleFactor = 2) {
|
|
6648
|
+
const fetchUrl = this.getFetchPNGBlobUrl(userLocale, omitBackground, deviceScaleFactor);
|
|
6649
|
+
return tokenizedFetch(fetchUrl, {
|
|
6650
|
+
credentials: 'include',
|
|
6651
|
+
});
|
|
6652
|
+
}
|
|
6584
6653
|
/**
|
|
6585
6654
|
* Just get the internal URL for this answer's data
|
|
6586
6655
|
* as a CSV blob.
|
|
@@ -6591,6 +6660,13 @@ class AnswerService {
|
|
|
6591
6660
|
getFetchCSVBlobUrl(userLocale = 'en-us', includeInfo = false) {
|
|
6592
6661
|
return `${this.thoughtSpotHost}/prism/download/answer/csv?sessionId=${this.session.sessionId}&genNo=${this.session.genNo}&userLocale=${userLocale}&exportFileName=data&hideCsvHeader=${!includeInfo}`;
|
|
6593
6662
|
}
|
|
6663
|
+
/**
|
|
6664
|
+
* Just get the internal URL for this answer's data
|
|
6665
|
+
* as a PNG blob.
|
|
6666
|
+
*/
|
|
6667
|
+
getFetchPNGBlobUrl(userLocale = 'en-us', omitBackground = false, deviceScaleFactor = 2) {
|
|
6668
|
+
return `${this.thoughtSpotHost}/prism/download/answer/png?sessionId=${this.session.sessionId}&deviceScaleFactor=${deviceScaleFactor}&omitBackground=${omitBackground}&genNo=${this.session.genNo}&userLocale=${userLocale}&exportFileName=data`;
|
|
6669
|
+
}
|
|
6594
6670
|
/**
|
|
6595
6671
|
* Get underlying data given a point and the output column names.
|
|
6596
6672
|
* In case of a context menu action, the selectedPoints are
|
|
@@ -13860,7 +13936,7 @@ function backwardCompat(embedConfig) {
|
|
|
13860
13936
|
* @group Authentication / Init
|
|
13861
13937
|
*/
|
|
13862
13938
|
const init = (embedConfig) => {
|
|
13863
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j
|
|
13939
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
13864
13940
|
sanity(embedConfig);
|
|
13865
13941
|
resetCachedAuthToken();
|
|
13866
13942
|
embedConfig = setEmbedConfig(backwardCompat({
|
|
@@ -13876,11 +13952,10 @@ const init = (embedConfig) => {
|
|
|
13876
13952
|
const { password, ...configToTrack } = getEmbedConfig();
|
|
13877
13953
|
uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_CALLED_INIT, {
|
|
13878
13954
|
...configToTrack,
|
|
13879
|
-
|
|
13880
|
-
|
|
13881
|
-
|
|
13882
|
-
|
|
13883
|
-
usedCustomizationIconSprite: !!((_l = embedConfig.customizations) === null || _l === void 0 ? void 0 : _l.iconSpriteUrl),
|
|
13955
|
+
usedCustomizationVariables: ((_c = (_b = (_a = embedConfig.customizations) === null || _a === void 0 ? void 0 : _a.style) === null || _b === void 0 ? void 0 : _b.customCSS) === null || _c === void 0 ? void 0 : _c.variables) != null,
|
|
13956
|
+
usedCustomizationRules: ((_f = (_e = (_d = embedConfig.customizations) === null || _d === void 0 ? void 0 : _d.style) === null || _e === void 0 ? void 0 : _e.customCSS) === null || _f === void 0 ? void 0 : _f.rules_UNSTABLE) != null,
|
|
13957
|
+
usedCustomizationStrings: !!((_h = (_g = embedConfig.customizations) === null || _g === void 0 ? void 0 : _g.content) === null || _h === void 0 ? void 0 : _h.strings),
|
|
13958
|
+
usedCustomizationIconSprite: !!((_j = embedConfig.customizations) === null || _j === void 0 ? void 0 : _j.iconSpriteUrl),
|
|
13884
13959
|
});
|
|
13885
13960
|
if (getEmbedConfig().callPrefetch) {
|
|
13886
13961
|
prefetch(getEmbedConfig().thoughtSpotHost);
|
|
@@ -13946,7 +14021,7 @@ const renderInQueue = (fn) => {
|
|
|
13946
14021
|
}).catch(error => {
|
|
13947
14022
|
console.error(error);
|
|
13948
14023
|
});
|
|
13949
|
-
|
|
14024
|
+
*```
|
|
13950
14025
|
* @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
|
|
13951
14026
|
* @group Global methods
|
|
13952
14027
|
*/
|
|
@@ -14101,8 +14176,8 @@ function processNoCookieAccess(e, containerEl) {
|
|
|
14101
14176
|
* @param containerEl
|
|
14102
14177
|
*/
|
|
14103
14178
|
function processAuthFailure(e, containerEl) {
|
|
14104
|
-
const { loginFailedMessage, authType } = getEmbedConfig();
|
|
14105
|
-
if (authType !== AuthType.None) {
|
|
14179
|
+
const { loginFailedMessage, authType, disableLoginFailurePage } = getEmbedConfig();
|
|
14180
|
+
if (authType !== AuthType.None && !disableLoginFailurePage) {
|
|
14106
14181
|
// eslint-disable-next-line no-param-reassign
|
|
14107
14182
|
containerEl.innerHTML = loginFailedMessage;
|
|
14108
14183
|
notifyAuthFailure(AuthFailureType.OTHER);
|
|
@@ -14203,7 +14278,7 @@ function processTrigger(iFrame, messageType, thoughtSpotHost, data) {
|
|
|
14203
14278
|
});
|
|
14204
14279
|
}
|
|
14205
14280
|
|
|
14206
|
-
var name="@thoughtspot/visual-embed-sdk";var version="1.32.
|
|
14281
|
+
var name="@thoughtspot/visual-embed-sdk";var version="1.32.6";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.45.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.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/mixpanel-browser":"^2.35.6","@types/lodash":"^4.17.0","@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","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:"2.30.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,description:description,module:module,main:main,types:types,files:files,exports:exports,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.js",limit:"48 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};
|
|
14207
14282
|
|
|
14208
14283
|
/**
|
|
14209
14284
|
* Copyright (c) 2022
|
|
@@ -14475,7 +14550,7 @@ class TsEmbed {
|
|
|
14475
14550
|
* @returns queryParams
|
|
14476
14551
|
*/
|
|
14477
14552
|
getBaseQueryParams(queryParams = {}) {
|
|
14478
|
-
var _a, _b, _c
|
|
14553
|
+
var _a, _b, _c;
|
|
14479
14554
|
let hostAppUrl = ((_a = window === null || window === void 0 ? void 0 : window.location) === null || _a === void 0 ? void 0 : _a.host) || '';
|
|
14480
14555
|
// The below check is needed because TS Cloud firewall, blocks
|
|
14481
14556
|
// localhost/127.0.0.1 in any url param.
|
|
@@ -14518,11 +14593,6 @@ class TsEmbed {
|
|
|
14518
14593
|
this.handleError('You cannot have both hidden Tabs and visible Tabs');
|
|
14519
14594
|
return queryParams;
|
|
14520
14595
|
}
|
|
14521
|
-
// TODO remove embedConfig.customCssUrl
|
|
14522
|
-
const cssUrlParam = ((_c = customizations === null || customizations === void 0 ? void 0 : customizations.style) === null || _c === void 0 ? void 0 : _c.customCSSUrl) || this.embedConfig.customCssUrl;
|
|
14523
|
-
if (cssUrlParam) {
|
|
14524
|
-
queryParams[Param.CustomCSSUrl] = cssUrlParam;
|
|
14525
|
-
}
|
|
14526
14596
|
if (disabledActions === null || disabledActions === void 0 ? void 0 : disabledActions.length) {
|
|
14527
14597
|
queryParams[Param.DisableActions] = disabledActions;
|
|
14528
14598
|
}
|
|
@@ -14551,7 +14621,7 @@ class TsEmbed {
|
|
|
14551
14621
|
queryParams[Param.ContextMenuTrigger] = false;
|
|
14552
14622
|
}
|
|
14553
14623
|
const spriteUrl = (customizations === null || customizations === void 0 ? void 0 : customizations.iconSpriteUrl)
|
|
14554
|
-
|| ((
|
|
14624
|
+
|| ((_c = this.embedConfig.customizations) === null || _c === void 0 ? void 0 : _c.iconSpriteUrl);
|
|
14555
14625
|
if (spriteUrl) {
|
|
14556
14626
|
queryParams[Param.IconSpriteUrl] = spriteUrl.replace('https://', '');
|
|
14557
14627
|
}
|
|
@@ -15168,7 +15238,7 @@ class TsEmbed {
|
|
|
15168
15238
|
* @version SDK: 1.25.0 / ThoughtSpot 9.10.0
|
|
15169
15239
|
*/
|
|
15170
15240
|
async getAnswerService(vizId) {
|
|
15171
|
-
const { session } = await this.trigger(HostEvent.GetAnswerSession, vizId);
|
|
15241
|
+
const { session } = await this.trigger(HostEvent.GetAnswerSession, vizId ? { vizId } : {});
|
|
15172
15242
|
return new AnswerService(session, null, this.embedConfig.thoughtSpotHost);
|
|
15173
15243
|
}
|
|
15174
15244
|
}
|
|
@@ -15183,7 +15253,6 @@ class V1Embed extends TsEmbed {
|
|
|
15183
15253
|
super(domSelector, viewConfig);
|
|
15184
15254
|
/**
|
|
15185
15255
|
* Only for testing purposes.
|
|
15186
|
-
*
|
|
15187
15256
|
* @hidden
|
|
15188
15257
|
*/
|
|
15189
15258
|
// eslint-disable-next-line camelcase
|
|
@@ -15352,7 +15421,7 @@ class AppEmbed extends V1Embed {
|
|
|
15352
15421
|
getEmbedParams() {
|
|
15353
15422
|
const { tag, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, 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,
|
|
15354
15423
|
/* eslint-disable-next-line max-len */
|
|
15355
|
-
dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, collapseSearchBar = true, homePageSearchBarMode, } = this.viewConfig;
|
|
15424
|
+
dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, homePageSearchBarMode, } = this.viewConfig;
|
|
15356
15425
|
let params = {};
|
|
15357
15426
|
params[Param.EmbedApp] = true;
|
|
15358
15427
|
params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
|
|
@@ -15364,6 +15433,9 @@ class AppEmbed extends V1Embed {
|
|
|
15364
15433
|
params[Param.ShowLiveboardDescription] = !!showLiveboardDescription;
|
|
15365
15434
|
params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
|
|
15366
15435
|
params[Param.IsFullAppEmbed] = true;
|
|
15436
|
+
params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
|
|
15437
|
+
params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;
|
|
15438
|
+
params[Param.ShowLiveboardReverifyBanner] = showLiveboardReverifyBanner;
|
|
15367
15439
|
params = this.getBaseQueryParams(params);
|
|
15368
15440
|
if (fullHeight === true) {
|
|
15369
15441
|
params[Param.fullHeight] = true;
|
|
@@ -15636,7 +15708,7 @@ class LiveboardEmbed extends V1Embed {
|
|
|
15636
15708
|
let params = {};
|
|
15637
15709
|
params[Param.EmbedApp] = true;
|
|
15638
15710
|
params = this.getBaseQueryParams(params);
|
|
15639
|
-
const { enableVizTransformations, fullHeight, defaultHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, enableAskSage, enable2ColumnLayout, dataPanelV2 = true, } = this.viewConfig;
|
|
15711
|
+
const { enableVizTransformations, fullHeight, defaultHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, enableAskSage, enable2ColumnLayout, dataPanelV2 = true, } = this.viewConfig;
|
|
15640
15712
|
const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
|
|
15641
15713
|
|| this.viewConfig.preventPinboardFilterRemoval;
|
|
15642
15714
|
if (fullHeight === true) {
|
|
@@ -15680,6 +15752,9 @@ class LiveboardEmbed extends V1Embed {
|
|
|
15680
15752
|
params[Param.enableAskSage] = enableAskSage;
|
|
15681
15753
|
}
|
|
15682
15754
|
params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
|
|
15755
|
+
params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
|
|
15756
|
+
params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;
|
|
15757
|
+
params[Param.ShowLiveboardReverifyBanner] = showLiveboardReverifyBanner;
|
|
15683
15758
|
params[Param.DataPanelV2Enabled] = dataPanelV2;
|
|
15684
15759
|
const queryParams = getQueryParamString(params, true);
|
|
15685
15760
|
return queryParams;
|