@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.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 (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
@@ -1731,7 +1731,32 @@
|
|
|
1731
1731
|
*/
|
|
1732
1732
|
EmbedEvent["OrgSwitched"] = "orgSwitched";
|
|
1733
1733
|
/**
|
|
1734
|
-
* Emitted
|
|
1734
|
+
* Emitted before the embedded ThoughtSpot app sends a network request whose
|
|
1735
|
+
* fully resolved URL matches one of the `interceptUrls` in the view config.
|
|
1736
|
+
* The request is held until you call `responder`, which decides whether the
|
|
1737
|
+
* real request goes out or a response you supply is used in its place.
|
|
1738
|
+
*
|
|
1739
|
+
* Setting `interceptUrls` is what enables this; there is no separate enable
|
|
1740
|
+
* flag. If `responder` is not called within `interceptTimeout` (30000 ms by
|
|
1741
|
+
* default) the request fails and `EmbedEvent.Error` is emitted.
|
|
1742
|
+
*
|
|
1743
|
+
* The payload is `{ input, init, urlType }`, where `input` is the request
|
|
1744
|
+
* URL and `init` is the `fetch` init object, with `init.body` parsed into an
|
|
1745
|
+
* object when it is valid JSON. `urlType` is the matching
|
|
1746
|
+
* `InterceptedApiType`; it is `InterceptedApiType.ALL` for any URL outside
|
|
1747
|
+
* the recognized API groups.
|
|
1748
|
+
*
|
|
1749
|
+
* Interception wraps the outermost layer of `fetch`, so `init` holds the
|
|
1750
|
+
* request as the application composed it, before ThoughtSpot attaches its
|
|
1751
|
+
* authentication headers. Those headers, and any token refresh and retry,
|
|
1752
|
+
* are applied afterwards and only when you pass `execute: true`. Only
|
|
1753
|
+
* requests made through `fetch` are intercepted.
|
|
1754
|
+
*
|
|
1755
|
+
* Pass `execute: true` to let the original request proceed untouched, in
|
|
1756
|
+
* which case any `response` you supply alongside it is ignored. With
|
|
1757
|
+
* `execute: false` the request is never sent, and your `response.body` is
|
|
1758
|
+
* returned to the app as JSON, defaulting to status 200 and a
|
|
1759
|
+
* `Content-Type: application/json` header.
|
|
1735
1760
|
*
|
|
1736
1761
|
* Supported on all embed types.
|
|
1737
1762
|
*
|
|
@@ -2541,7 +2566,7 @@
|
|
|
2541
2566
|
*
|
|
2542
2567
|
* Unlike {@link HostEvent.OpenFilter}, which opens the panel of an
|
|
2543
2568
|
* existing filter, this event starts the creation of a new filter.
|
|
2544
|
-
* @version SDK: 1.
|
|
2569
|
+
* @version SDK: 1.51.1 | ThoughtSpot Cloud: 26.8.0.cl
|
|
2545
2570
|
* @example
|
|
2546
2571
|
* ```js
|
|
2547
2572
|
* liveboardEmbed.trigger(HostEvent.OpenAddFilterModal);
|
|
@@ -2557,7 +2582,7 @@
|
|
|
2557
2582
|
* Hiding the *Add parameter* button with `hiddenActions:
|
|
2558
2583
|
* [Action.AddParameter]` does not block this event, but disabling it
|
|
2559
2584
|
* with `disabledActions` does.
|
|
2560
|
-
* @version SDK: 1.
|
|
2585
|
+
* @version SDK: 1.51.1 | ThoughtSpot Cloud: 26.8.0.cl
|
|
2561
2586
|
* @example
|
|
2562
2587
|
* ```js
|
|
2563
2588
|
* liveboardEmbed.trigger(HostEvent.OpenAddParameterModal);
|
|
@@ -4435,7 +4460,13 @@
|
|
|
4435
4460
|
*/
|
|
4436
4461
|
HostEvent["UpdateEmbedParams"] = "updateEmbedParams";
|
|
4437
4462
|
/**
|
|
4438
|
-
*
|
|
4463
|
+
* Notifies the embedded ThoughtSpot app that the embed is being torn down, so that
|
|
4464
|
+
* it can release any resources it holds before the iframe is removed from the DOM.
|
|
4465
|
+
*
|
|
4466
|
+
* This is triggered for you by `embed.destroy()`; you rarely need to trigger it
|
|
4467
|
+
* directly. If `waitForCleanupOnDestroy` is set in the embed config, `destroy()`
|
|
4468
|
+
* waits for the app to acknowledge this event (up to `cleanupTimeout`) before
|
|
4469
|
+
* removing the iframe.
|
|
4439
4470
|
* @example
|
|
4440
4471
|
* ```js
|
|
4441
4472
|
* liveboardEmbed.trigger(HostEvent.DestroyEmbed);
|
|
@@ -6553,7 +6584,7 @@
|
|
|
6553
6584
|
* ```js
|
|
6554
6585
|
* hiddenActions: [Action.QuickSearchPill]
|
|
6555
6586
|
* ```
|
|
6556
|
-
* @version SDK: 1.
|
|
6587
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
6557
6588
|
*/
|
|
6558
6589
|
Action["QuickSearchPill"] = "quickSearchPill";
|
|
6559
6590
|
/**
|
|
@@ -6568,7 +6599,7 @@
|
|
|
6568
6599
|
* ```js
|
|
6569
6600
|
* hiddenActions: [Action.DeepAnalysisPill]
|
|
6570
6601
|
* ```
|
|
6571
|
-
* @version SDK: 1.
|
|
6602
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
6572
6603
|
*/
|
|
6573
6604
|
Action["DeepAnalysisPill"] = "deepAnalysisPill";
|
|
6574
6605
|
/**
|
|
@@ -6583,7 +6614,7 @@
|
|
|
6583
6614
|
* ```js
|
|
6584
6615
|
* hiddenActions: [Action.DataLiteracyPill]
|
|
6585
6616
|
* ```
|
|
6586
|
-
* @version SDK: 1.
|
|
6617
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
6587
6618
|
*/
|
|
6588
6619
|
Action["DataLiteracyPill"] = "dataLiteracyPill";
|
|
6589
6620
|
/**
|
|
@@ -7056,6 +7087,36 @@
|
|
|
7056
7087
|
/** UpdateParameters payload is invalid - malformed applicability */
|
|
7057
7088
|
EmbedErrorCodes["UPDATEPARAMETERS_INVALID_PAYLOAD"] = "UPDATEPARAMETERS_INVALID_PAYLOAD";
|
|
7058
7089
|
})(exports.EmbedErrorCodes || (exports.EmbedErrorCodes = {}));
|
|
7090
|
+
/**
|
|
7091
|
+
* How badly an error affects the embed, so the host can decide whether it is
|
|
7092
|
+
* worth surfacing to the end user.
|
|
7093
|
+
*
|
|
7094
|
+
* Mirrors the severity that ThoughtSpot itself stamps on errors raised inside
|
|
7095
|
+
* the embedded app, so a host can apply one rule to both sources.
|
|
7096
|
+
*
|
|
7097
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
7098
|
+
* @group Error Handling
|
|
7099
|
+
*
|
|
7100
|
+
* @example
|
|
7101
|
+
* Only surface errors that took the embed down
|
|
7102
|
+
*
|
|
7103
|
+
* ```js
|
|
7104
|
+
* embed.on(EmbedEvent.Error, (error) => {
|
|
7105
|
+
* if (error.severity === EmbedErrorSeverity.SEV1) {
|
|
7106
|
+
* showBanner(error.message);
|
|
7107
|
+
* }
|
|
7108
|
+
* });
|
|
7109
|
+
* ```
|
|
7110
|
+
*/
|
|
7111
|
+
exports.EmbedErrorSeverity = void 0;
|
|
7112
|
+
(function (EmbedErrorSeverity) {
|
|
7113
|
+
/** The embed cannot render. Nothing usable is on screen. */
|
|
7114
|
+
EmbedErrorSeverity[EmbedErrorSeverity["SEV1"] = 1] = "SEV1";
|
|
7115
|
+
/** Something is degraded but the embed still works. */
|
|
7116
|
+
EmbedErrorSeverity[EmbedErrorSeverity["SEV2"] = 2] = "SEV2";
|
|
7117
|
+
/** Everything else, including validation of the embedder's own input. */
|
|
7118
|
+
EmbedErrorSeverity[EmbedErrorSeverity["SEV3"] = 3] = "SEV3";
|
|
7119
|
+
})(exports.EmbedErrorSeverity || (exports.EmbedErrorSeverity = {}));
|
|
7059
7120
|
/**
|
|
7060
7121
|
* Context types for specifying the page context when triggering host events.
|
|
7061
7122
|
* Used as the third parameter in the `trigger` method to help ThoughtSpot
|
|
@@ -7096,20 +7157,27 @@
|
|
|
7096
7157
|
ContextType["Other"] = "other";
|
|
7097
7158
|
})(exports.ContextType || (exports.ContextType = {}));
|
|
7098
7159
|
/**
|
|
7099
|
-
*
|
|
7160
|
+
* Named groups of ThoughtSpot APIs that can be intercepted, for use in
|
|
7161
|
+
* `interceptUrls`. Each group expands to the underlying request URLs, so you do
|
|
7162
|
+
* not have to list them individually.
|
|
7100
7163
|
*/
|
|
7101
7164
|
exports.InterceptedApiType = void 0;
|
|
7102
7165
|
(function (InterceptedApiType) {
|
|
7103
7166
|
/**
|
|
7104
|
-
* The
|
|
7167
|
+
* The APIs that fetch the data backing an Answer, including its chart,
|
|
7168
|
+
* table, and headline data.
|
|
7105
7169
|
*/
|
|
7106
7170
|
InterceptedApiType["AnswerData"] = "AnswerData";
|
|
7107
7171
|
/**
|
|
7108
|
-
*
|
|
7172
|
+
* Intercepts every `fetch` request the embedded application makes, not only
|
|
7173
|
+
* the data APIs. This includes authentication, session, and metadata calls,
|
|
7174
|
+
* so the handler must respond to requests it does not recognize by passing
|
|
7175
|
+
* `execute: true`. Listing this alongside other entries in `interceptUrls`
|
|
7176
|
+
* supersedes them.
|
|
7109
7177
|
*/
|
|
7110
7178
|
InterceptedApiType["ALL"] = "ALL";
|
|
7111
7179
|
/**
|
|
7112
|
-
* The
|
|
7180
|
+
* The APIs that fetch the data backing a Liveboard.
|
|
7113
7181
|
*/
|
|
7114
7182
|
InterceptedApiType["LiveboardData"] = "LiveboardData";
|
|
7115
7183
|
})(exports.InterceptedApiType || (exports.InterceptedApiType = {}));
|
|
@@ -7233,7 +7301,7 @@
|
|
|
7233
7301
|
TableContentDensity["Compact"] = "COMPACT";
|
|
7234
7302
|
})(exports.TableContentDensity || (exports.TableContentDensity = {}));
|
|
7235
7303
|
|
|
7236
|
-
var version$1="1.
|
|
7304
|
+
var version$1="1.52.0";var pkg = {version:version$1};
|
|
7237
7305
|
|
|
7238
7306
|
const { version } = pkg;
|
|
7239
7307
|
|
|
@@ -21274,6 +21342,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
21274
21342
|
errorType: exports.ErrorDetailsTypes.API,
|
|
21275
21343
|
message: ERROR_MESSAGE.ERROR_PARSING_API_INTERCEPT_BODY,
|
|
21276
21344
|
code: exports.EmbedErrorCodes.PARSING_API_INTERCEPT_BODY_ERROR,
|
|
21345
|
+
severity: exports.EmbedErrorSeverity.SEV3,
|
|
21277
21346
|
error: ERROR_MESSAGE.ERROR_PARSING_API_INTERCEPT_BODY,
|
|
21278
21347
|
};
|
|
21279
21348
|
executeEvent(exports.EmbedEvent.Error, errorDetails);
|
|
@@ -21618,6 +21687,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
21618
21687
|
errorType: exports.ErrorDetailsTypes.VALIDATION_ERROR,
|
|
21619
21688
|
message: ERROR_MESSAGE.INIT_SDK_REQUIRED,
|
|
21620
21689
|
code: exports.EmbedErrorCodes.INIT_ERROR,
|
|
21690
|
+
severity: exports.EmbedErrorSeverity.SEV1,
|
|
21621
21691
|
error: ERROR_MESSAGE.INIT_SDK_REQUIRED,
|
|
21622
21692
|
});
|
|
21623
21693
|
}
|
|
@@ -21628,7 +21698,10 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
21628
21698
|
*/
|
|
21629
21699
|
handleError(errorDetails) {
|
|
21630
21700
|
this.isError = true;
|
|
21631
|
-
this.executeCallbacks(exports.EmbedEvent.Error,
|
|
21701
|
+
this.executeCallbacks(exports.EmbedEvent.Error, {
|
|
21702
|
+
severity: exports.EmbedErrorSeverity.SEV3,
|
|
21703
|
+
...errorDetails,
|
|
21704
|
+
});
|
|
21632
21705
|
// Log error
|
|
21633
21706
|
logger$3.error(errorDetails);
|
|
21634
21707
|
}
|
|
@@ -21713,6 +21786,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
21713
21786
|
errorType: exports.ErrorDetailsTypes.NETWORK,
|
|
21714
21787
|
message: ERROR_MESSAGE.OFFLINE_WARNING,
|
|
21715
21788
|
code: exports.EmbedErrorCodes.NETWORK_ERROR,
|
|
21789
|
+
severity: exports.EmbedErrorSeverity.SEV2,
|
|
21716
21790
|
offlineWarning: ERROR_MESSAGE.OFFLINE_WARNING,
|
|
21717
21791
|
};
|
|
21718
21792
|
this.executeCallbacks(exports.EmbedEvent.Error, errorDetails);
|
|
@@ -22085,9 +22159,10 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
22085
22159
|
return iFrame;
|
|
22086
22160
|
}
|
|
22087
22161
|
/**
|
|
22088
|
-
* Returns a merged {@link PreRenderConfig} object where each
|
|
22089
|
-
*
|
|
22090
|
-
*
|
|
22162
|
+
* Returns a merged {@link PreRenderConfig} object where each key prefers the
|
|
22163
|
+
* value from `preRenderConfig` over its deprecated top-level `viewConfig`
|
|
22164
|
+
* counterpart (`id`/`preRenderId`, `containerSelector`/`preRenderContainer`,
|
|
22165
|
+
* `doNotTrackSize`/`doNotTrackPreRenderSize`) for backward compatibility.
|
|
22091
22166
|
*/
|
|
22092
22167
|
getPreRenderConfig() {
|
|
22093
22168
|
var _a, _b, _c, _d;
|
|
@@ -22095,16 +22170,16 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
22095
22170
|
const preRenderCfg = (_a = viewCfg.preRenderConfig) !== null && _a !== void 0 ? _a : {};
|
|
22096
22171
|
return {
|
|
22097
22172
|
...preRenderCfg,
|
|
22098
|
-
|
|
22099
|
-
|
|
22100
|
-
|
|
22173
|
+
id: (_b = preRenderCfg.id) !== null && _b !== void 0 ? _b : viewCfg.preRenderId,
|
|
22174
|
+
containerSelector: (_c = preRenderCfg.containerSelector) !== null && _c !== void 0 ? _c : viewCfg.preRenderContainer,
|
|
22175
|
+
doNotTrackSize: (_d = preRenderCfg.doNotTrackSize) !== null && _d !== void 0 ? _d : viewCfg.doNotTrackPreRenderSize,
|
|
22101
22176
|
};
|
|
22102
22177
|
}
|
|
22103
22178
|
/**
|
|
22104
22179
|
* Returns true if this embed instance is configured for pre-rendering.
|
|
22105
22180
|
*/
|
|
22106
22181
|
isPreRenderEmbed() {
|
|
22107
|
-
return !!this.getPreRenderConfig().
|
|
22182
|
+
return !!this.getPreRenderConfig().id;
|
|
22108
22183
|
}
|
|
22109
22184
|
handleInsertionIntoDOM(child) {
|
|
22110
22185
|
if (this.isPreRenderEmbed()) {
|
|
@@ -22200,6 +22275,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
22200
22275
|
errorType: exports.ErrorDetailsTypes.API,
|
|
22201
22276
|
message: error.message || ERROR_MESSAGE.LOGIN_FAILED,
|
|
22202
22277
|
code: exports.EmbedErrorCodes.LOGIN_FAILED,
|
|
22278
|
+
severity: exports.EmbedErrorSeverity.SEV1,
|
|
22203
22279
|
error: error,
|
|
22204
22280
|
});
|
|
22205
22281
|
});
|
|
@@ -22291,7 +22367,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
22291
22367
|
*/
|
|
22292
22368
|
resolvePreRenderContainerTarget() {
|
|
22293
22369
|
var _a;
|
|
22294
|
-
const containerConfig = this.getPreRenderConfig().
|
|
22370
|
+
const containerConfig = this.getPreRenderConfig().containerSelector;
|
|
22295
22371
|
let container = null;
|
|
22296
22372
|
if (typeof containerConfig === 'string') {
|
|
22297
22373
|
try {
|
|
@@ -22316,7 +22392,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
22316
22392
|
return;
|
|
22317
22393
|
}
|
|
22318
22394
|
const ownerContainer = (_a = preRenderedObject.preRenderContainerEl) !== null && _a !== void 0 ? _a : document.body;
|
|
22319
|
-
if (this.getPreRenderConfig().
|
|
22395
|
+
if (this.getPreRenderConfig().containerSelector
|
|
22320
22396
|
&& this.resolvePreRenderContainerTarget() !== ownerContainer) {
|
|
22321
22397
|
logger$3.warn('preRenderContainer is applied only by the component that creates the preRender; '
|
|
22322
22398
|
+ 'the one passed here is ignored. Set it on the PreRender component instead.');
|
|
@@ -22813,7 +22889,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
22813
22889
|
showPreRenderByDefault,
|
|
22814
22890
|
replaceExistingPreRender,
|
|
22815
22891
|
});
|
|
22816
|
-
if (!this.getPreRenderConfig().
|
|
22892
|
+
if (!this.getPreRenderConfig().id) {
|
|
22817
22893
|
logger$3.error(ERROR_MESSAGE.PRERENDER_ID_MISSING);
|
|
22818
22894
|
return this;
|
|
22819
22895
|
}
|
|
@@ -22989,12 +23065,12 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
22989
23065
|
async showPreRender() {
|
|
22990
23066
|
var _a, _b;
|
|
22991
23067
|
uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_SHOW_PRE_RENDER, {
|
|
22992
|
-
preRenderId: this.getPreRenderConfig().
|
|
23068
|
+
preRenderId: this.getPreRenderConfig().id,
|
|
22993
23069
|
embedComponentType: this.viewConfig.embedComponentType,
|
|
22994
23070
|
});
|
|
22995
23071
|
if (this.shouldWaitForRenderPromise)
|
|
22996
23072
|
await this.isReadyForRenderPromise;
|
|
22997
|
-
if (!this.getPreRenderConfig().
|
|
23073
|
+
if (!this.getPreRenderConfig().id) {
|
|
22998
23074
|
logger$3.error(ERROR_MESSAGE.PRERENDER_ID_MISSING);
|
|
22999
23075
|
return this;
|
|
23000
23076
|
}
|
|
@@ -23030,7 +23106,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
23030
23106
|
this.containerScrollListener = () => this.syncPreRenderStyle();
|
|
23031
23107
|
customContainer.addEventListener('scroll', this.containerScrollListener);
|
|
23032
23108
|
}
|
|
23033
|
-
if (!this.getPreRenderConfig().
|
|
23109
|
+
if (!this.getPreRenderConfig().doNotTrackSize) {
|
|
23034
23110
|
const observeTarget = (_b = this.insertedDomEl) !== null && _b !== void 0 ? _b : this.hostElement;
|
|
23035
23111
|
this.resizeObserver = new ResizeObserver((entries) => {
|
|
23036
23112
|
entries.forEach((entry) => {
|
|
@@ -23098,7 +23174,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
23098
23174
|
*/
|
|
23099
23175
|
hidePreRender() {
|
|
23100
23176
|
uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_HIDE_PRE_RENDER, {
|
|
23101
|
-
preRenderId: this.getPreRenderConfig().
|
|
23177
|
+
preRenderId: this.getPreRenderConfig().id,
|
|
23102
23178
|
embedComponentType: this.viewConfig.embedComponentType,
|
|
23103
23179
|
});
|
|
23104
23180
|
logger$3.debug('HidePreRender Called');
|
|
@@ -23136,7 +23212,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
23136
23212
|
* @property {string} child - The HTML element ID for the PreRender child.
|
|
23137
23213
|
*/
|
|
23138
23214
|
getPreRenderIds() {
|
|
23139
|
-
const preRenderId = this.getPreRenderConfig().
|
|
23215
|
+
const preRenderId = this.getPreRenderConfig().id;
|
|
23140
23216
|
return {
|
|
23141
23217
|
wrapper: `${PRERENDER_WRAPPER_ID_PREFIX}${preRenderId}`,
|
|
23142
23218
|
child: `tsEmbed-pre-render-child-${preRenderId}`,
|
|
@@ -24345,6 +24421,7 @@ query GetEurekaVizSnapshots(
|
|
|
24345
24421
|
errorType: exports.ErrorDetailsTypes.VALIDATION_ERROR,
|
|
24346
24422
|
message: ERROR_MESSAGE.LIVEBOARD_VIZ_ID_VALIDATION,
|
|
24347
24423
|
code: exports.EmbedErrorCodes.LIVEBOARD_ID_MISSING,
|
|
24424
|
+
severity: exports.EmbedErrorSeverity.SEV1,
|
|
24348
24425
|
error: ERROR_MESSAGE.LIVEBOARD_VIZ_ID_VALIDATION,
|
|
24349
24426
|
});
|
|
24350
24427
|
}
|
|
@@ -24496,7 +24573,7 @@ query GetEurekaVizSnapshots(
|
|
|
24496
24573
|
if (this.isRendered) {
|
|
24497
24574
|
this.trigger(exports.HostEvent.Navigate, path.substring(1));
|
|
24498
24575
|
}
|
|
24499
|
-
else if (this.getPreRenderConfig().
|
|
24576
|
+
else if (this.getPreRenderConfig().id) {
|
|
24500
24577
|
this.preRender(true);
|
|
24501
24578
|
}
|
|
24502
24579
|
else {
|