@thoughtspot/visual-embed-sdk 1.51.2 → 1.52.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/cjs/package.json +1 -1
- package/cjs/src/api-intercept.d.ts.map +1 -1
- package/cjs/src/api-intercept.js +1 -0
- package/cjs/src/api-intercept.js.map +1 -1
- package/cjs/src/css-variables.d.ts +1 -1
- package/cjs/src/embed/conversation.d.ts +5 -5
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +2 -1
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/liveboard.spec.js +4 -4
- package/cjs/src/embed/liveboard.spec.js.map +1 -1
- package/cjs/src/embed/ts-embed.d.ts +4 -3
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +23 -16
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/embed/ts-embed.spec.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.spec.js +55 -16
- package/cjs/src/embed/ts-embed.spec.js.map +1 -1
- package/cjs/src/index.d.ts +2 -2
- package/cjs/src/index.d.ts.map +1 -1
- package/cjs/src/index.js +2 -1
- package/cjs/src/index.js.map +1 -1
- package/cjs/src/react/all-types-export.d.ts +1 -1
- package/cjs/src/react/all-types-export.d.ts.map +1 -1
- package/cjs/src/react/all-types-export.js +2 -1
- package/cjs/src/react/all-types-export.js.map +1 -1
- package/cjs/src/react/index.d.ts +8 -8
- package/cjs/src/react/index.d.ts.map +1 -1
- package/cjs/src/react/index.js +1 -1
- package/cjs/src/react/index.js.map +1 -1
- package/cjs/src/react/index.spec.js +7 -7
- package/cjs/src/react/index.spec.js.map +1 -1
- package/cjs/src/types.d.ts +124 -36
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +80 -12
- package/cjs/src/types.js.map +1 -1
- package/dist/{index-D8_Zs-Nr.js → index-BMppCU63.js} +1 -1
- package/dist/src/api-intercept.d.ts.map +1 -1
- package/dist/src/css-variables.d.ts +1 -1
- package/dist/src/embed/conversation.d.ts +5 -5
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.d.ts +4 -3
- package/dist/src/embed/ts-embed.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.spec.d.ts.map +1 -1
- package/dist/src/index.d.ts +2 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/react/all-types-export.d.ts +1 -1
- package/dist/src/react/all-types-export.d.ts.map +1 -1
- package/dist/src/react/index.d.ts +8 -8
- package/dist/src/react/index.d.ts.map +1 -1
- package/dist/src/types.d.ts +124 -36
- package/dist/src/types.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +109 -32
- package/dist/tsembed-react.js +108 -31
- package/dist/tsembed.es.js +109 -32
- package/dist/tsembed.js +107 -30
- package/dist/visual-embed-sdk-react-full.d.ts +142 -53
- package/dist/visual-embed-sdk-react.d.ts +118 -52
- package/dist/visual-embed-sdk.d.ts +134 -45
- package/lib/package.json +1 -1
- package/lib/src/api-intercept.d.ts.map +1 -1
- package/lib/src/api-intercept.js +2 -1
- package/lib/src/api-intercept.js.map +1 -1
- package/lib/src/css-variables.d.ts +1 -1
- package/lib/src/embed/conversation.d.ts +5 -5
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +3 -2
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +4 -4
- package/lib/src/embed/liveboard.spec.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts +4 -3
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +24 -17
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/embed/ts-embed.spec.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.spec.js +56 -17
- package/lib/src/embed/ts-embed.spec.js.map +1 -1
- package/lib/src/index.d.ts +2 -2
- package/lib/src/index.d.ts.map +1 -1
- package/lib/src/index.js +2 -2
- package/lib/src/index.js.map +1 -1
- package/lib/src/react/all-types-export.d.ts +1 -1
- package/lib/src/react/all-types-export.d.ts.map +1 -1
- package/lib/src/react/all-types-export.js +1 -1
- package/lib/src/react/all-types-export.js.map +1 -1
- package/lib/src/react/index.d.ts +8 -8
- package/lib/src/react/index.d.ts.map +1 -1
- package/lib/src/react/index.js +1 -1
- package/lib/src/react/index.js.map +1 -1
- package/lib/src/react/index.spec.js +7 -7
- package/lib/src/react/index.spec.js.map +1 -1
- package/lib/src/types.d.ts +124 -36
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +79 -11
- package/lib/src/types.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +134 -45
- package/package.json +1 -1
- package/src/api-intercept.ts +2 -1
- package/src/css-variables.ts +1 -1
- package/src/embed/conversation.ts +5 -5
- package/src/embed/liveboard.spec.ts +4 -4
- package/src/embed/liveboard.ts +3 -1
- package/src/embed/ts-embed.spec.ts +70 -16
- package/src/embed/ts-embed.ts +24 -16
- package/src/index.ts +2 -0
- package/src/react/all-types-export.ts +1 -0
- package/src/react/index.spec.tsx +7 -7
- package/src/react/index.tsx +9 -9
- package/src/types.ts +125 -36
package/dist/tsembed.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @thoughtspot/visual-embed-sdk version 1.
|
|
1
|
+
/* @thoughtspot/visual-embed-sdk version 1.52.0 */
|
|
2
2
|
'use client';
|
|
3
3
|
function _mergeNamespaces(n, m) {
|
|
4
4
|
m.forEach(function (e) {
|
|
@@ -1725,7 +1725,32 @@ var EmbedEvent;
|
|
|
1725
1725
|
*/
|
|
1726
1726
|
EmbedEvent["OrgSwitched"] = "orgSwitched";
|
|
1727
1727
|
/**
|
|
1728
|
-
* Emitted
|
|
1728
|
+
* Emitted before the embedded ThoughtSpot app sends a network request whose
|
|
1729
|
+
* fully resolved URL matches one of the `interceptUrls` in the view config.
|
|
1730
|
+
* The request is held until you call `responder`, which decides whether the
|
|
1731
|
+
* real request goes out or a response you supply is used in its place.
|
|
1732
|
+
*
|
|
1733
|
+
* Setting `interceptUrls` is what enables this; there is no separate enable
|
|
1734
|
+
* flag. If `responder` is not called within `interceptTimeout` (30000 ms by
|
|
1735
|
+
* default) the request fails and `EmbedEvent.Error` is emitted.
|
|
1736
|
+
*
|
|
1737
|
+
* The payload is `{ input, init, urlType }`, where `input` is the request
|
|
1738
|
+
* URL and `init` is the `fetch` init object, with `init.body` parsed into an
|
|
1739
|
+
* object when it is valid JSON. `urlType` is the matching
|
|
1740
|
+
* `InterceptedApiType`; it is `InterceptedApiType.ALL` for any URL outside
|
|
1741
|
+
* the recognized API groups.
|
|
1742
|
+
*
|
|
1743
|
+
* Interception wraps the outermost layer of `fetch`, so `init` holds the
|
|
1744
|
+
* request as the application composed it, before ThoughtSpot attaches its
|
|
1745
|
+
* authentication headers. Those headers, and any token refresh and retry,
|
|
1746
|
+
* are applied afterwards and only when you pass `execute: true`. Only
|
|
1747
|
+
* requests made through `fetch` are intercepted.
|
|
1748
|
+
*
|
|
1749
|
+
* Pass `execute: true` to let the original request proceed untouched, in
|
|
1750
|
+
* which case any `response` you supply alongside it is ignored. With
|
|
1751
|
+
* `execute: false` the request is never sent, and your `response.body` is
|
|
1752
|
+
* returned to the app as JSON, defaulting to status 200 and a
|
|
1753
|
+
* `Content-Type: application/json` header.
|
|
1729
1754
|
*
|
|
1730
1755
|
* Supported on all embed types.
|
|
1731
1756
|
*
|
|
@@ -2535,7 +2560,7 @@ var HostEvent;
|
|
|
2535
2560
|
*
|
|
2536
2561
|
* Unlike {@link HostEvent.OpenFilter}, which opens the panel of an
|
|
2537
2562
|
* existing filter, this event starts the creation of a new filter.
|
|
2538
|
-
* @version SDK: 1.
|
|
2563
|
+
* @version SDK: 1.51.1 | ThoughtSpot Cloud: 26.8.0.cl
|
|
2539
2564
|
* @example
|
|
2540
2565
|
* ```js
|
|
2541
2566
|
* liveboardEmbed.trigger(HostEvent.OpenAddFilterModal);
|
|
@@ -2551,7 +2576,7 @@ var HostEvent;
|
|
|
2551
2576
|
* Hiding the *Add parameter* button with `hiddenActions:
|
|
2552
2577
|
* [Action.AddParameter]` does not block this event, but disabling it
|
|
2553
2578
|
* with `disabledActions` does.
|
|
2554
|
-
* @version SDK: 1.
|
|
2579
|
+
* @version SDK: 1.51.1 | ThoughtSpot Cloud: 26.8.0.cl
|
|
2555
2580
|
* @example
|
|
2556
2581
|
* ```js
|
|
2557
2582
|
* liveboardEmbed.trigger(HostEvent.OpenAddParameterModal);
|
|
@@ -4429,7 +4454,13 @@ var HostEvent;
|
|
|
4429
4454
|
*/
|
|
4430
4455
|
HostEvent["UpdateEmbedParams"] = "updateEmbedParams";
|
|
4431
4456
|
/**
|
|
4432
|
-
*
|
|
4457
|
+
* Notifies the embedded ThoughtSpot app that the embed is being torn down, so that
|
|
4458
|
+
* it can release any resources it holds before the iframe is removed from the DOM.
|
|
4459
|
+
*
|
|
4460
|
+
* This is triggered for you by `embed.destroy()`; you rarely need to trigger it
|
|
4461
|
+
* directly. If `waitForCleanupOnDestroy` is set in the embed config, `destroy()`
|
|
4462
|
+
* waits for the app to acknowledge this event (up to `cleanupTimeout`) before
|
|
4463
|
+
* removing the iframe.
|
|
4433
4464
|
* @example
|
|
4434
4465
|
* ```js
|
|
4435
4466
|
* liveboardEmbed.trigger(HostEvent.DestroyEmbed);
|
|
@@ -6547,7 +6578,7 @@ var Action;
|
|
|
6547
6578
|
* ```js
|
|
6548
6579
|
* hiddenActions: [Action.QuickSearchPill]
|
|
6549
6580
|
* ```
|
|
6550
|
-
* @version SDK: 1.
|
|
6581
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
6551
6582
|
*/
|
|
6552
6583
|
Action["QuickSearchPill"] = "quickSearchPill";
|
|
6553
6584
|
/**
|
|
@@ -6562,7 +6593,7 @@ var Action;
|
|
|
6562
6593
|
* ```js
|
|
6563
6594
|
* hiddenActions: [Action.DeepAnalysisPill]
|
|
6564
6595
|
* ```
|
|
6565
|
-
* @version SDK: 1.
|
|
6596
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
6566
6597
|
*/
|
|
6567
6598
|
Action["DeepAnalysisPill"] = "deepAnalysisPill";
|
|
6568
6599
|
/**
|
|
@@ -6577,7 +6608,7 @@ var Action;
|
|
|
6577
6608
|
* ```js
|
|
6578
6609
|
* hiddenActions: [Action.DataLiteracyPill]
|
|
6579
6610
|
* ```
|
|
6580
|
-
* @version SDK: 1.
|
|
6611
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
6581
6612
|
*/
|
|
6582
6613
|
Action["DataLiteracyPill"] = "dataLiteracyPill";
|
|
6583
6614
|
/**
|
|
@@ -7050,6 +7081,36 @@ var EmbedErrorCodes;
|
|
|
7050
7081
|
/** UpdateParameters payload is invalid - malformed applicability */
|
|
7051
7082
|
EmbedErrorCodes["UPDATEPARAMETERS_INVALID_PAYLOAD"] = "UPDATEPARAMETERS_INVALID_PAYLOAD";
|
|
7052
7083
|
})(EmbedErrorCodes || (EmbedErrorCodes = {}));
|
|
7084
|
+
/**
|
|
7085
|
+
* How badly an error affects the embed, so the host can decide whether it is
|
|
7086
|
+
* worth surfacing to the end user.
|
|
7087
|
+
*
|
|
7088
|
+
* Mirrors the severity that ThoughtSpot itself stamps on errors raised inside
|
|
7089
|
+
* the embedded app, so a host can apply one rule to both sources.
|
|
7090
|
+
*
|
|
7091
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
7092
|
+
* @group Error Handling
|
|
7093
|
+
*
|
|
7094
|
+
* @example
|
|
7095
|
+
* Only surface errors that took the embed down
|
|
7096
|
+
*
|
|
7097
|
+
* ```js
|
|
7098
|
+
* embed.on(EmbedEvent.Error, (error) => {
|
|
7099
|
+
* if (error.severity === EmbedErrorSeverity.SEV1) {
|
|
7100
|
+
* showBanner(error.message);
|
|
7101
|
+
* }
|
|
7102
|
+
* });
|
|
7103
|
+
* ```
|
|
7104
|
+
*/
|
|
7105
|
+
var EmbedErrorSeverity;
|
|
7106
|
+
(function (EmbedErrorSeverity) {
|
|
7107
|
+
/** The embed cannot render. Nothing usable is on screen. */
|
|
7108
|
+
EmbedErrorSeverity[EmbedErrorSeverity["SEV1"] = 1] = "SEV1";
|
|
7109
|
+
/** Something is degraded but the embed still works. */
|
|
7110
|
+
EmbedErrorSeverity[EmbedErrorSeverity["SEV2"] = 2] = "SEV2";
|
|
7111
|
+
/** Everything else, including validation of the embedder's own input. */
|
|
7112
|
+
EmbedErrorSeverity[EmbedErrorSeverity["SEV3"] = 3] = "SEV3";
|
|
7113
|
+
})(EmbedErrorSeverity || (EmbedErrorSeverity = {}));
|
|
7053
7114
|
/**
|
|
7054
7115
|
* Context types for specifying the page context when triggering host events.
|
|
7055
7116
|
* Used as the third parameter in the `trigger` method to help ThoughtSpot
|
|
@@ -7090,20 +7151,27 @@ var ContextType;
|
|
|
7090
7151
|
ContextType["Other"] = "other";
|
|
7091
7152
|
})(ContextType || (ContextType = {}));
|
|
7092
7153
|
/**
|
|
7093
|
-
*
|
|
7154
|
+
* Named groups of ThoughtSpot APIs that can be intercepted, for use in
|
|
7155
|
+
* `interceptUrls`. Each group expands to the underlying request URLs, so you do
|
|
7156
|
+
* not have to list them individually.
|
|
7094
7157
|
*/
|
|
7095
7158
|
var InterceptedApiType;
|
|
7096
7159
|
(function (InterceptedApiType) {
|
|
7097
7160
|
/**
|
|
7098
|
-
* The
|
|
7161
|
+
* The APIs that fetch the data backing an Answer, including its chart,
|
|
7162
|
+
* table, and headline data.
|
|
7099
7163
|
*/
|
|
7100
7164
|
InterceptedApiType["AnswerData"] = "AnswerData";
|
|
7101
7165
|
/**
|
|
7102
|
-
*
|
|
7166
|
+
* Intercepts every `fetch` request the embedded application makes, not only
|
|
7167
|
+
* the data APIs. This includes authentication, session, and metadata calls,
|
|
7168
|
+
* so the handler must respond to requests it does not recognize by passing
|
|
7169
|
+
* `execute: true`. Listing this alongside other entries in `interceptUrls`
|
|
7170
|
+
* supersedes them.
|
|
7103
7171
|
*/
|
|
7104
7172
|
InterceptedApiType["ALL"] = "ALL";
|
|
7105
7173
|
/**
|
|
7106
|
-
* The
|
|
7174
|
+
* The APIs that fetch the data backing a Liveboard.
|
|
7107
7175
|
*/
|
|
7108
7176
|
InterceptedApiType["LiveboardData"] = "LiveboardData";
|
|
7109
7177
|
})(InterceptedApiType || (InterceptedApiType = {}));
|
|
@@ -7227,7 +7295,7 @@ var TableContentDensity;
|
|
|
7227
7295
|
TableContentDensity["Compact"] = "COMPACT";
|
|
7228
7296
|
})(TableContentDensity || (TableContentDensity = {}));
|
|
7229
7297
|
|
|
7230
|
-
var version$1="1.
|
|
7298
|
+
var version$1="1.52.0";var pkg = {version:version$1};
|
|
7231
7299
|
|
|
7232
7300
|
const { version } = pkg;
|
|
7233
7301
|
|
|
@@ -9959,7 +10027,7 @@ class AnswerService {
|
|
|
9959
10027
|
async getTML() {
|
|
9960
10028
|
const { object } = await this.executeQuery(getAnswerTML, {});
|
|
9961
10029
|
const edoc = object[0].edoc;
|
|
9962
|
-
const YAML = await import('./index-
|
|
10030
|
+
const YAML = await import('./index-BMppCU63.js');
|
|
9963
10031
|
const parsedDoc = YAML.parse(edoc);
|
|
9964
10032
|
return {
|
|
9965
10033
|
answer: {
|
|
@@ -21268,6 +21336,7 @@ const handleInterceptEvent = async (params) => {
|
|
|
21268
21336
|
errorType: ErrorDetailsTypes.API,
|
|
21269
21337
|
message: ERROR_MESSAGE.ERROR_PARSING_API_INTERCEPT_BODY,
|
|
21270
21338
|
code: EmbedErrorCodes.PARSING_API_INTERCEPT_BODY_ERROR,
|
|
21339
|
+
severity: EmbedErrorSeverity.SEV3,
|
|
21271
21340
|
error: ERROR_MESSAGE.ERROR_PARSING_API_INTERCEPT_BODY,
|
|
21272
21341
|
};
|
|
21273
21342
|
executeEvent(EmbedEvent.Error, errorDetails);
|
|
@@ -21612,6 +21681,7 @@ class TsEmbed {
|
|
|
21612
21681
|
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
21613
21682
|
message: ERROR_MESSAGE.INIT_SDK_REQUIRED,
|
|
21614
21683
|
code: EmbedErrorCodes.INIT_ERROR,
|
|
21684
|
+
severity: EmbedErrorSeverity.SEV1,
|
|
21615
21685
|
error: ERROR_MESSAGE.INIT_SDK_REQUIRED,
|
|
21616
21686
|
});
|
|
21617
21687
|
}
|
|
@@ -21622,7 +21692,10 @@ class TsEmbed {
|
|
|
21622
21692
|
*/
|
|
21623
21693
|
handleError(errorDetails) {
|
|
21624
21694
|
this.isError = true;
|
|
21625
|
-
this.executeCallbacks(EmbedEvent.Error,
|
|
21695
|
+
this.executeCallbacks(EmbedEvent.Error, {
|
|
21696
|
+
severity: EmbedErrorSeverity.SEV3,
|
|
21697
|
+
...errorDetails,
|
|
21698
|
+
});
|
|
21626
21699
|
// Log error
|
|
21627
21700
|
logger$3.error(errorDetails);
|
|
21628
21701
|
}
|
|
@@ -21707,6 +21780,7 @@ class TsEmbed {
|
|
|
21707
21780
|
errorType: ErrorDetailsTypes.NETWORK,
|
|
21708
21781
|
message: ERROR_MESSAGE.OFFLINE_WARNING,
|
|
21709
21782
|
code: EmbedErrorCodes.NETWORK_ERROR,
|
|
21783
|
+
severity: EmbedErrorSeverity.SEV2,
|
|
21710
21784
|
offlineWarning: ERROR_MESSAGE.OFFLINE_WARNING,
|
|
21711
21785
|
};
|
|
21712
21786
|
this.executeCallbacks(EmbedEvent.Error, errorDetails);
|
|
@@ -22079,9 +22153,10 @@ class TsEmbed {
|
|
|
22079
22153
|
return iFrame;
|
|
22080
22154
|
}
|
|
22081
22155
|
/**
|
|
22082
|
-
* Returns a merged {@link PreRenderConfig} object where each
|
|
22083
|
-
*
|
|
22084
|
-
*
|
|
22156
|
+
* Returns a merged {@link PreRenderConfig} object where each key prefers the
|
|
22157
|
+
* value from `preRenderConfig` over its deprecated top-level `viewConfig`
|
|
22158
|
+
* counterpart (`id`/`preRenderId`, `containerSelector`/`preRenderContainer`,
|
|
22159
|
+
* `doNotTrackSize`/`doNotTrackPreRenderSize`) for backward compatibility.
|
|
22085
22160
|
*/
|
|
22086
22161
|
getPreRenderConfig() {
|
|
22087
22162
|
var _a, _b, _c, _d;
|
|
@@ -22089,16 +22164,16 @@ class TsEmbed {
|
|
|
22089
22164
|
const preRenderCfg = (_a = viewCfg.preRenderConfig) !== null && _a !== void 0 ? _a : {};
|
|
22090
22165
|
return {
|
|
22091
22166
|
...preRenderCfg,
|
|
22092
|
-
|
|
22093
|
-
|
|
22094
|
-
|
|
22167
|
+
id: (_b = preRenderCfg.id) !== null && _b !== void 0 ? _b : viewCfg.preRenderId,
|
|
22168
|
+
containerSelector: (_c = preRenderCfg.containerSelector) !== null && _c !== void 0 ? _c : viewCfg.preRenderContainer,
|
|
22169
|
+
doNotTrackSize: (_d = preRenderCfg.doNotTrackSize) !== null && _d !== void 0 ? _d : viewCfg.doNotTrackPreRenderSize,
|
|
22095
22170
|
};
|
|
22096
22171
|
}
|
|
22097
22172
|
/**
|
|
22098
22173
|
* Returns true if this embed instance is configured for pre-rendering.
|
|
22099
22174
|
*/
|
|
22100
22175
|
isPreRenderEmbed() {
|
|
22101
|
-
return !!this.getPreRenderConfig().
|
|
22176
|
+
return !!this.getPreRenderConfig().id;
|
|
22102
22177
|
}
|
|
22103
22178
|
handleInsertionIntoDOM(child) {
|
|
22104
22179
|
if (this.isPreRenderEmbed()) {
|
|
@@ -22194,6 +22269,7 @@ class TsEmbed {
|
|
|
22194
22269
|
errorType: ErrorDetailsTypes.API,
|
|
22195
22270
|
message: error.message || ERROR_MESSAGE.LOGIN_FAILED,
|
|
22196
22271
|
code: EmbedErrorCodes.LOGIN_FAILED,
|
|
22272
|
+
severity: EmbedErrorSeverity.SEV1,
|
|
22197
22273
|
error: error,
|
|
22198
22274
|
});
|
|
22199
22275
|
});
|
|
@@ -22285,7 +22361,7 @@ class TsEmbed {
|
|
|
22285
22361
|
*/
|
|
22286
22362
|
resolvePreRenderContainerTarget() {
|
|
22287
22363
|
var _a;
|
|
22288
|
-
const containerConfig = this.getPreRenderConfig().
|
|
22364
|
+
const containerConfig = this.getPreRenderConfig().containerSelector;
|
|
22289
22365
|
let container = null;
|
|
22290
22366
|
if (typeof containerConfig === 'string') {
|
|
22291
22367
|
try {
|
|
@@ -22310,7 +22386,7 @@ class TsEmbed {
|
|
|
22310
22386
|
return;
|
|
22311
22387
|
}
|
|
22312
22388
|
const ownerContainer = (_a = preRenderedObject.preRenderContainerEl) !== null && _a !== void 0 ? _a : document.body;
|
|
22313
|
-
if (this.getPreRenderConfig().
|
|
22389
|
+
if (this.getPreRenderConfig().containerSelector
|
|
22314
22390
|
&& this.resolvePreRenderContainerTarget() !== ownerContainer) {
|
|
22315
22391
|
logger$3.warn('preRenderContainer is applied only by the component that creates the preRender; '
|
|
22316
22392
|
+ 'the one passed here is ignored. Set it on the PreRender component instead.');
|
|
@@ -22807,7 +22883,7 @@ class TsEmbed {
|
|
|
22807
22883
|
showPreRenderByDefault,
|
|
22808
22884
|
replaceExistingPreRender,
|
|
22809
22885
|
});
|
|
22810
|
-
if (!this.getPreRenderConfig().
|
|
22886
|
+
if (!this.getPreRenderConfig().id) {
|
|
22811
22887
|
logger$3.error(ERROR_MESSAGE.PRERENDER_ID_MISSING);
|
|
22812
22888
|
return this;
|
|
22813
22889
|
}
|
|
@@ -22983,12 +23059,12 @@ class TsEmbed {
|
|
|
22983
23059
|
async showPreRender() {
|
|
22984
23060
|
var _a, _b;
|
|
22985
23061
|
uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_SHOW_PRE_RENDER, {
|
|
22986
|
-
preRenderId: this.getPreRenderConfig().
|
|
23062
|
+
preRenderId: this.getPreRenderConfig().id,
|
|
22987
23063
|
embedComponentType: this.viewConfig.embedComponentType,
|
|
22988
23064
|
});
|
|
22989
23065
|
if (this.shouldWaitForRenderPromise)
|
|
22990
23066
|
await this.isReadyForRenderPromise;
|
|
22991
|
-
if (!this.getPreRenderConfig().
|
|
23067
|
+
if (!this.getPreRenderConfig().id) {
|
|
22992
23068
|
logger$3.error(ERROR_MESSAGE.PRERENDER_ID_MISSING);
|
|
22993
23069
|
return this;
|
|
22994
23070
|
}
|
|
@@ -23024,7 +23100,7 @@ class TsEmbed {
|
|
|
23024
23100
|
this.containerScrollListener = () => this.syncPreRenderStyle();
|
|
23025
23101
|
customContainer.addEventListener('scroll', this.containerScrollListener);
|
|
23026
23102
|
}
|
|
23027
|
-
if (!this.getPreRenderConfig().
|
|
23103
|
+
if (!this.getPreRenderConfig().doNotTrackSize) {
|
|
23028
23104
|
const observeTarget = (_b = this.insertedDomEl) !== null && _b !== void 0 ? _b : this.hostElement;
|
|
23029
23105
|
this.resizeObserver = new ResizeObserver((entries) => {
|
|
23030
23106
|
entries.forEach((entry) => {
|
|
@@ -23092,7 +23168,7 @@ class TsEmbed {
|
|
|
23092
23168
|
*/
|
|
23093
23169
|
hidePreRender() {
|
|
23094
23170
|
uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_HIDE_PRE_RENDER, {
|
|
23095
|
-
preRenderId: this.getPreRenderConfig().
|
|
23171
|
+
preRenderId: this.getPreRenderConfig().id,
|
|
23096
23172
|
embedComponentType: this.viewConfig.embedComponentType,
|
|
23097
23173
|
});
|
|
23098
23174
|
logger$3.debug('HidePreRender Called');
|
|
@@ -23130,7 +23206,7 @@ class TsEmbed {
|
|
|
23130
23206
|
* @property {string} child - The HTML element ID for the PreRender child.
|
|
23131
23207
|
*/
|
|
23132
23208
|
getPreRenderIds() {
|
|
23133
|
-
const preRenderId = this.getPreRenderConfig().
|
|
23209
|
+
const preRenderId = this.getPreRenderConfig().id;
|
|
23134
23210
|
return {
|
|
23135
23211
|
wrapper: `${PRERENDER_WRAPPER_ID_PREFIX}${preRenderId}`,
|
|
23136
23212
|
child: `tsEmbed-pre-render-child-${preRenderId}`,
|
|
@@ -24339,6 +24415,7 @@ class LiveboardEmbed extends V1Embed {
|
|
|
24339
24415
|
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
24340
24416
|
message: ERROR_MESSAGE.LIVEBOARD_VIZ_ID_VALIDATION,
|
|
24341
24417
|
code: EmbedErrorCodes.LIVEBOARD_ID_MISSING,
|
|
24418
|
+
severity: EmbedErrorSeverity.SEV1,
|
|
24342
24419
|
error: ERROR_MESSAGE.LIVEBOARD_VIZ_ID_VALIDATION,
|
|
24343
24420
|
});
|
|
24344
24421
|
}
|
|
@@ -24490,7 +24567,7 @@ class LiveboardEmbed extends V1Embed {
|
|
|
24490
24567
|
if (this.isRendered) {
|
|
24491
24568
|
this.trigger(HostEvent.Navigate, path.substring(1));
|
|
24492
24569
|
}
|
|
24493
|
-
else if (this.getPreRenderConfig().
|
|
24570
|
+
else if (this.getPreRenderConfig().id) {
|
|
24494
24571
|
this.preRender(true);
|
|
24495
24572
|
}
|
|
24496
24573
|
else {
|
|
@@ -26130,4 +26207,4 @@ class AutoFrameRenderer extends TsEmbed {
|
|
|
26130
26207
|
}
|
|
26131
26208
|
}
|
|
26132
26209
|
|
|
26133
|
-
export { Action, AnswerService, AppEmbed, ApplicabilityLevel, AuthEvent, AuthFailureType, AuthStatus, AuthType, BackgroundFormatType, BodylessConversation, ConditionalFormattingComparisonType, ConditionalFormattingOperator, ContextMenuTriggerOptions, ContextType, ConversationEmbed, CustomActionTarget, CustomActionsPosition, DataLabelFilterOperator, DataPanelCustomColumnGroupsAccordionState$1 as DataPanelCustomColumnGroupsAccordionState, DataSourceVisualMode, EmbedErrorCodes, EmbedEvent, ErrorDetailsTypes, HomeLeftNavItem, HomePage, HomePageSearchBarMode, HomepageModule, HostEvent, InterceptedApiType, LegendPosition, ListPage, ListPageColumns, LiveboardEmbed, LogLevel, MIXPANEL_EVENT, Page, PinboardEmbed, PrefetchFeatures, PrimaryNavbarVersion, RuntimeFilterOp, SearchBarEmbed, SearchEmbed, SpotterAgentEmbed, SpotterEmbed, SpotterQueryMode, TableContentDensity, TableTheme, UIPassthroughEvent, createLiveboardWithAnswers, executeTML, exportTML, getAnswerFromQuery, getEmbedConfig as getInitConfig, getSessionInfo, init, logout, prefetch, reloadIframe, resetCachedAuthToken, startAutoMCPFrameRenderer, tokenizedFetch, uploadMixpanelEvent };
|
|
26210
|
+
export { Action, AnswerService, AppEmbed, ApplicabilityLevel, AuthEvent, AuthFailureType, AuthStatus, AuthType, BackgroundFormatType, BodylessConversation, ConditionalFormattingComparisonType, ConditionalFormattingOperator, ContextMenuTriggerOptions, ContextType, ConversationEmbed, CustomActionTarget, CustomActionsPosition, DataLabelFilterOperator, DataPanelCustomColumnGroupsAccordionState$1 as DataPanelCustomColumnGroupsAccordionState, DataSourceVisualMode, EmbedErrorCodes, EmbedErrorSeverity, EmbedEvent, ErrorDetailsTypes, HomeLeftNavItem, HomePage, HomePageSearchBarMode, HomepageModule, HostEvent, InterceptedApiType, LegendPosition, ListPage, ListPageColumns, LiveboardEmbed, LogLevel, MIXPANEL_EVENT, Page, PinboardEmbed, PrefetchFeatures, PrimaryNavbarVersion, RuntimeFilterOp, SearchBarEmbed, SearchEmbed, SpotterAgentEmbed, SpotterEmbed, SpotterQueryMode, TableContentDensity, TableTheme, UIPassthroughEvent, createLiveboardWithAnswers, executeTML, exportTML, getAnswerFromQuery, getEmbedConfig as getInitConfig, getSessionInfo, init, logout, prefetch, reloadIframe, resetCachedAuthToken, startAutoMCPFrameRenderer, tokenizedFetch, uploadMixpanelEvent };
|