@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-react.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, require('react')) :
|
|
@@ -1932,7 +1932,32 @@
|
|
|
1932
1932
|
*/
|
|
1933
1933
|
EmbedEvent["OrgSwitched"] = "orgSwitched";
|
|
1934
1934
|
/**
|
|
1935
|
-
* Emitted
|
|
1935
|
+
* Emitted before the embedded ThoughtSpot app sends a network request whose
|
|
1936
|
+
* fully resolved URL matches one of the `interceptUrls` in the view config.
|
|
1937
|
+
* The request is held until you call `responder`, which decides whether the
|
|
1938
|
+
* real request goes out or a response you supply is used in its place.
|
|
1939
|
+
*
|
|
1940
|
+
* Setting `interceptUrls` is what enables this; there is no separate enable
|
|
1941
|
+
* flag. If `responder` is not called within `interceptTimeout` (30000 ms by
|
|
1942
|
+
* default) the request fails and `EmbedEvent.Error` is emitted.
|
|
1943
|
+
*
|
|
1944
|
+
* The payload is `{ input, init, urlType }`, where `input` is the request
|
|
1945
|
+
* URL and `init` is the `fetch` init object, with `init.body` parsed into an
|
|
1946
|
+
* object when it is valid JSON. `urlType` is the matching
|
|
1947
|
+
* `InterceptedApiType`; it is `InterceptedApiType.ALL` for any URL outside
|
|
1948
|
+
* the recognized API groups.
|
|
1949
|
+
*
|
|
1950
|
+
* Interception wraps the outermost layer of `fetch`, so `init` holds the
|
|
1951
|
+
* request as the application composed it, before ThoughtSpot attaches its
|
|
1952
|
+
* authentication headers. Those headers, and any token refresh and retry,
|
|
1953
|
+
* are applied afterwards and only when you pass `execute: true`. Only
|
|
1954
|
+
* requests made through `fetch` are intercepted.
|
|
1955
|
+
*
|
|
1956
|
+
* Pass `execute: true` to let the original request proceed untouched, in
|
|
1957
|
+
* which case any `response` you supply alongside it is ignored. With
|
|
1958
|
+
* `execute: false` the request is never sent, and your `response.body` is
|
|
1959
|
+
* returned to the app as JSON, defaulting to status 200 and a
|
|
1960
|
+
* `Content-Type: application/json` header.
|
|
1936
1961
|
*
|
|
1937
1962
|
* Supported on all embed types.
|
|
1938
1963
|
*
|
|
@@ -2742,7 +2767,7 @@
|
|
|
2742
2767
|
*
|
|
2743
2768
|
* Unlike {@link HostEvent.OpenFilter}, which opens the panel of an
|
|
2744
2769
|
* existing filter, this event starts the creation of a new filter.
|
|
2745
|
-
* @version SDK: 1.
|
|
2770
|
+
* @version SDK: 1.51.1 | ThoughtSpot Cloud: 26.8.0.cl
|
|
2746
2771
|
* @example
|
|
2747
2772
|
* ```js
|
|
2748
2773
|
* liveboardEmbed.trigger(HostEvent.OpenAddFilterModal);
|
|
@@ -2758,7 +2783,7 @@
|
|
|
2758
2783
|
* Hiding the *Add parameter* button with `hiddenActions:
|
|
2759
2784
|
* [Action.AddParameter]` does not block this event, but disabling it
|
|
2760
2785
|
* with `disabledActions` does.
|
|
2761
|
-
* @version SDK: 1.
|
|
2786
|
+
* @version SDK: 1.51.1 | ThoughtSpot Cloud: 26.8.0.cl
|
|
2762
2787
|
* @example
|
|
2763
2788
|
* ```js
|
|
2764
2789
|
* liveboardEmbed.trigger(HostEvent.OpenAddParameterModal);
|
|
@@ -4636,7 +4661,13 @@
|
|
|
4636
4661
|
*/
|
|
4637
4662
|
HostEvent["UpdateEmbedParams"] = "updateEmbedParams";
|
|
4638
4663
|
/**
|
|
4639
|
-
*
|
|
4664
|
+
* Notifies the embedded ThoughtSpot app that the embed is being torn down, so that
|
|
4665
|
+
* it can release any resources it holds before the iframe is removed from the DOM.
|
|
4666
|
+
*
|
|
4667
|
+
* This is triggered for you by `embed.destroy()`; you rarely need to trigger it
|
|
4668
|
+
* directly. If `waitForCleanupOnDestroy` is set in the embed config, `destroy()`
|
|
4669
|
+
* waits for the app to acknowledge this event (up to `cleanupTimeout`) before
|
|
4670
|
+
* removing the iframe.
|
|
4640
4671
|
* @example
|
|
4641
4672
|
* ```js
|
|
4642
4673
|
* liveboardEmbed.trigger(HostEvent.DestroyEmbed);
|
|
@@ -6754,7 +6785,7 @@
|
|
|
6754
6785
|
* ```js
|
|
6755
6786
|
* hiddenActions: [Action.QuickSearchPill]
|
|
6756
6787
|
* ```
|
|
6757
|
-
* @version SDK: 1.
|
|
6788
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
6758
6789
|
*/
|
|
6759
6790
|
Action["QuickSearchPill"] = "quickSearchPill";
|
|
6760
6791
|
/**
|
|
@@ -6769,7 +6800,7 @@
|
|
|
6769
6800
|
* ```js
|
|
6770
6801
|
* hiddenActions: [Action.DeepAnalysisPill]
|
|
6771
6802
|
* ```
|
|
6772
|
-
* @version SDK: 1.
|
|
6803
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
6773
6804
|
*/
|
|
6774
6805
|
Action["DeepAnalysisPill"] = "deepAnalysisPill";
|
|
6775
6806
|
/**
|
|
@@ -6784,7 +6815,7 @@
|
|
|
6784
6815
|
* ```js
|
|
6785
6816
|
* hiddenActions: [Action.DataLiteracyPill]
|
|
6786
6817
|
* ```
|
|
6787
|
-
* @version SDK: 1.
|
|
6818
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
6788
6819
|
*/
|
|
6789
6820
|
Action["DataLiteracyPill"] = "dataLiteracyPill";
|
|
6790
6821
|
/**
|
|
@@ -7257,6 +7288,36 @@
|
|
|
7257
7288
|
/** UpdateParameters payload is invalid - malformed applicability */
|
|
7258
7289
|
EmbedErrorCodes["UPDATEPARAMETERS_INVALID_PAYLOAD"] = "UPDATEPARAMETERS_INVALID_PAYLOAD";
|
|
7259
7290
|
})(EmbedErrorCodes || (EmbedErrorCodes = {}));
|
|
7291
|
+
/**
|
|
7292
|
+
* How badly an error affects the embed, so the host can decide whether it is
|
|
7293
|
+
* worth surfacing to the end user.
|
|
7294
|
+
*
|
|
7295
|
+
* Mirrors the severity that ThoughtSpot itself stamps on errors raised inside
|
|
7296
|
+
* the embedded app, so a host can apply one rule to both sources.
|
|
7297
|
+
*
|
|
7298
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
7299
|
+
* @group Error Handling
|
|
7300
|
+
*
|
|
7301
|
+
* @example
|
|
7302
|
+
* Only surface errors that took the embed down
|
|
7303
|
+
*
|
|
7304
|
+
* ```js
|
|
7305
|
+
* embed.on(EmbedEvent.Error, (error) => {
|
|
7306
|
+
* if (error.severity === EmbedErrorSeverity.SEV1) {
|
|
7307
|
+
* showBanner(error.message);
|
|
7308
|
+
* }
|
|
7309
|
+
* });
|
|
7310
|
+
* ```
|
|
7311
|
+
*/
|
|
7312
|
+
var EmbedErrorSeverity;
|
|
7313
|
+
(function (EmbedErrorSeverity) {
|
|
7314
|
+
/** The embed cannot render. Nothing usable is on screen. */
|
|
7315
|
+
EmbedErrorSeverity[EmbedErrorSeverity["SEV1"] = 1] = "SEV1";
|
|
7316
|
+
/** Something is degraded but the embed still works. */
|
|
7317
|
+
EmbedErrorSeverity[EmbedErrorSeverity["SEV2"] = 2] = "SEV2";
|
|
7318
|
+
/** Everything else, including validation of the embedder's own input. */
|
|
7319
|
+
EmbedErrorSeverity[EmbedErrorSeverity["SEV3"] = 3] = "SEV3";
|
|
7320
|
+
})(EmbedErrorSeverity || (EmbedErrorSeverity = {}));
|
|
7260
7321
|
/**
|
|
7261
7322
|
* Context types for specifying the page context when triggering host events.
|
|
7262
7323
|
* Used as the third parameter in the `trigger` method to help ThoughtSpot
|
|
@@ -7297,20 +7358,27 @@
|
|
|
7297
7358
|
ContextType["Other"] = "other";
|
|
7298
7359
|
})(ContextType || (ContextType = {}));
|
|
7299
7360
|
/**
|
|
7300
|
-
*
|
|
7361
|
+
* Named groups of ThoughtSpot APIs that can be intercepted, for use in
|
|
7362
|
+
* `interceptUrls`. Each group expands to the underlying request URLs, so you do
|
|
7363
|
+
* not have to list them individually.
|
|
7301
7364
|
*/
|
|
7302
7365
|
var InterceptedApiType;
|
|
7303
7366
|
(function (InterceptedApiType) {
|
|
7304
7367
|
/**
|
|
7305
|
-
* The
|
|
7368
|
+
* The APIs that fetch the data backing an Answer, including its chart,
|
|
7369
|
+
* table, and headline data.
|
|
7306
7370
|
*/
|
|
7307
7371
|
InterceptedApiType["AnswerData"] = "AnswerData";
|
|
7308
7372
|
/**
|
|
7309
|
-
*
|
|
7373
|
+
* Intercepts every `fetch` request the embedded application makes, not only
|
|
7374
|
+
* the data APIs. This includes authentication, session, and metadata calls,
|
|
7375
|
+
* so the handler must respond to requests it does not recognize by passing
|
|
7376
|
+
* `execute: true`. Listing this alongside other entries in `interceptUrls`
|
|
7377
|
+
* supersedes them.
|
|
7310
7378
|
*/
|
|
7311
7379
|
InterceptedApiType["ALL"] = "ALL";
|
|
7312
7380
|
/**
|
|
7313
|
-
* The
|
|
7381
|
+
* The APIs that fetch the data backing a Liveboard.
|
|
7314
7382
|
*/
|
|
7315
7383
|
InterceptedApiType["LiveboardData"] = "LiveboardData";
|
|
7316
7384
|
})(InterceptedApiType || (InterceptedApiType = {}));
|
|
@@ -7434,7 +7502,7 @@
|
|
|
7434
7502
|
TableContentDensity["Compact"] = "COMPACT";
|
|
7435
7503
|
})(TableContentDensity || (TableContentDensity = {}));
|
|
7436
7504
|
|
|
7437
|
-
var version$1="1.
|
|
7505
|
+
var version$1="1.52.0";var pkg = {version:version$1};
|
|
7438
7506
|
|
|
7439
7507
|
const { version } = pkg;
|
|
7440
7508
|
|
|
@@ -21225,6 +21293,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
21225
21293
|
errorType: ErrorDetailsTypes.API,
|
|
21226
21294
|
message: ERROR_MESSAGE.ERROR_PARSING_API_INTERCEPT_BODY,
|
|
21227
21295
|
code: EmbedErrorCodes.PARSING_API_INTERCEPT_BODY_ERROR,
|
|
21296
|
+
severity: EmbedErrorSeverity.SEV3,
|
|
21228
21297
|
error: ERROR_MESSAGE.ERROR_PARSING_API_INTERCEPT_BODY,
|
|
21229
21298
|
};
|
|
21230
21299
|
executeEvent(exports.EmbedEvent.Error, errorDetails);
|
|
@@ -21569,6 +21638,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
21569
21638
|
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
21570
21639
|
message: ERROR_MESSAGE.INIT_SDK_REQUIRED,
|
|
21571
21640
|
code: EmbedErrorCodes.INIT_ERROR,
|
|
21641
|
+
severity: EmbedErrorSeverity.SEV1,
|
|
21572
21642
|
error: ERROR_MESSAGE.INIT_SDK_REQUIRED,
|
|
21573
21643
|
});
|
|
21574
21644
|
}
|
|
@@ -21579,7 +21649,10 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
21579
21649
|
*/
|
|
21580
21650
|
handleError(errorDetails) {
|
|
21581
21651
|
this.isError = true;
|
|
21582
|
-
this.executeCallbacks(exports.EmbedEvent.Error,
|
|
21652
|
+
this.executeCallbacks(exports.EmbedEvent.Error, {
|
|
21653
|
+
severity: EmbedErrorSeverity.SEV3,
|
|
21654
|
+
...errorDetails,
|
|
21655
|
+
});
|
|
21583
21656
|
// Log error
|
|
21584
21657
|
logger$3.error(errorDetails);
|
|
21585
21658
|
}
|
|
@@ -21664,6 +21737,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
21664
21737
|
errorType: ErrorDetailsTypes.NETWORK,
|
|
21665
21738
|
message: ERROR_MESSAGE.OFFLINE_WARNING,
|
|
21666
21739
|
code: EmbedErrorCodes.NETWORK_ERROR,
|
|
21740
|
+
severity: EmbedErrorSeverity.SEV2,
|
|
21667
21741
|
offlineWarning: ERROR_MESSAGE.OFFLINE_WARNING,
|
|
21668
21742
|
};
|
|
21669
21743
|
this.executeCallbacks(exports.EmbedEvent.Error, errorDetails);
|
|
@@ -22036,9 +22110,10 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
22036
22110
|
return iFrame;
|
|
22037
22111
|
}
|
|
22038
22112
|
/**
|
|
22039
|
-
* Returns a merged {@link PreRenderConfig} object where each
|
|
22040
|
-
*
|
|
22041
|
-
*
|
|
22113
|
+
* Returns a merged {@link PreRenderConfig} object where each key prefers the
|
|
22114
|
+
* value from `preRenderConfig` over its deprecated top-level `viewConfig`
|
|
22115
|
+
* counterpart (`id`/`preRenderId`, `containerSelector`/`preRenderContainer`,
|
|
22116
|
+
* `doNotTrackSize`/`doNotTrackPreRenderSize`) for backward compatibility.
|
|
22042
22117
|
*/
|
|
22043
22118
|
getPreRenderConfig() {
|
|
22044
22119
|
var _a, _b, _c, _d;
|
|
@@ -22046,16 +22121,16 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
22046
22121
|
const preRenderCfg = (_a = viewCfg.preRenderConfig) !== null && _a !== void 0 ? _a : {};
|
|
22047
22122
|
return {
|
|
22048
22123
|
...preRenderCfg,
|
|
22049
|
-
|
|
22050
|
-
|
|
22051
|
-
|
|
22124
|
+
id: (_b = preRenderCfg.id) !== null && _b !== void 0 ? _b : viewCfg.preRenderId,
|
|
22125
|
+
containerSelector: (_c = preRenderCfg.containerSelector) !== null && _c !== void 0 ? _c : viewCfg.preRenderContainer,
|
|
22126
|
+
doNotTrackSize: (_d = preRenderCfg.doNotTrackSize) !== null && _d !== void 0 ? _d : viewCfg.doNotTrackPreRenderSize,
|
|
22052
22127
|
};
|
|
22053
22128
|
}
|
|
22054
22129
|
/**
|
|
22055
22130
|
* Returns true if this embed instance is configured for pre-rendering.
|
|
22056
22131
|
*/
|
|
22057
22132
|
isPreRenderEmbed() {
|
|
22058
|
-
return !!this.getPreRenderConfig().
|
|
22133
|
+
return !!this.getPreRenderConfig().id;
|
|
22059
22134
|
}
|
|
22060
22135
|
handleInsertionIntoDOM(child) {
|
|
22061
22136
|
if (this.isPreRenderEmbed()) {
|
|
@@ -22151,6 +22226,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
22151
22226
|
errorType: ErrorDetailsTypes.API,
|
|
22152
22227
|
message: error.message || ERROR_MESSAGE.LOGIN_FAILED,
|
|
22153
22228
|
code: EmbedErrorCodes.LOGIN_FAILED,
|
|
22229
|
+
severity: EmbedErrorSeverity.SEV1,
|
|
22154
22230
|
error: error,
|
|
22155
22231
|
});
|
|
22156
22232
|
});
|
|
@@ -22242,7 +22318,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
22242
22318
|
*/
|
|
22243
22319
|
resolvePreRenderContainerTarget() {
|
|
22244
22320
|
var _a;
|
|
22245
|
-
const containerConfig = this.getPreRenderConfig().
|
|
22321
|
+
const containerConfig = this.getPreRenderConfig().containerSelector;
|
|
22246
22322
|
let container = null;
|
|
22247
22323
|
if (typeof containerConfig === 'string') {
|
|
22248
22324
|
try {
|
|
@@ -22267,7 +22343,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
22267
22343
|
return;
|
|
22268
22344
|
}
|
|
22269
22345
|
const ownerContainer = (_a = preRenderedObject.preRenderContainerEl) !== null && _a !== void 0 ? _a : document.body;
|
|
22270
|
-
if (this.getPreRenderConfig().
|
|
22346
|
+
if (this.getPreRenderConfig().containerSelector
|
|
22271
22347
|
&& this.resolvePreRenderContainerTarget() !== ownerContainer) {
|
|
22272
22348
|
logger$3.warn('preRenderContainer is applied only by the component that creates the preRender; '
|
|
22273
22349
|
+ 'the one passed here is ignored. Set it on the PreRender component instead.');
|
|
@@ -22764,7 +22840,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
22764
22840
|
showPreRenderByDefault,
|
|
22765
22841
|
replaceExistingPreRender,
|
|
22766
22842
|
});
|
|
22767
|
-
if (!this.getPreRenderConfig().
|
|
22843
|
+
if (!this.getPreRenderConfig().id) {
|
|
22768
22844
|
logger$3.error(ERROR_MESSAGE.PRERENDER_ID_MISSING);
|
|
22769
22845
|
return this;
|
|
22770
22846
|
}
|
|
@@ -22940,12 +23016,12 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
22940
23016
|
async showPreRender() {
|
|
22941
23017
|
var _a, _b;
|
|
22942
23018
|
uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_SHOW_PRE_RENDER, {
|
|
22943
|
-
preRenderId: this.getPreRenderConfig().
|
|
23019
|
+
preRenderId: this.getPreRenderConfig().id,
|
|
22944
23020
|
embedComponentType: this.viewConfig.embedComponentType,
|
|
22945
23021
|
});
|
|
22946
23022
|
if (this.shouldWaitForRenderPromise)
|
|
22947
23023
|
await this.isReadyForRenderPromise;
|
|
22948
|
-
if (!this.getPreRenderConfig().
|
|
23024
|
+
if (!this.getPreRenderConfig().id) {
|
|
22949
23025
|
logger$3.error(ERROR_MESSAGE.PRERENDER_ID_MISSING);
|
|
22950
23026
|
return this;
|
|
22951
23027
|
}
|
|
@@ -22981,7 +23057,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
22981
23057
|
this.containerScrollListener = () => this.syncPreRenderStyle();
|
|
22982
23058
|
customContainer.addEventListener('scroll', this.containerScrollListener);
|
|
22983
23059
|
}
|
|
22984
|
-
if (!this.getPreRenderConfig().
|
|
23060
|
+
if (!this.getPreRenderConfig().doNotTrackSize) {
|
|
22985
23061
|
const observeTarget = (_b = this.insertedDomEl) !== null && _b !== void 0 ? _b : this.hostElement;
|
|
22986
23062
|
this.resizeObserver = new ResizeObserver((entries) => {
|
|
22987
23063
|
entries.forEach((entry) => {
|
|
@@ -23049,7 +23125,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
23049
23125
|
*/
|
|
23050
23126
|
hidePreRender() {
|
|
23051
23127
|
uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_HIDE_PRE_RENDER, {
|
|
23052
|
-
preRenderId: this.getPreRenderConfig().
|
|
23128
|
+
preRenderId: this.getPreRenderConfig().id,
|
|
23053
23129
|
embedComponentType: this.viewConfig.embedComponentType,
|
|
23054
23130
|
});
|
|
23055
23131
|
logger$3.debug('HidePreRender Called');
|
|
@@ -23087,7 +23163,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
23087
23163
|
* @property {string} child - The HTML element ID for the PreRender child.
|
|
23088
23164
|
*/
|
|
23089
23165
|
getPreRenderIds() {
|
|
23090
|
-
const preRenderId = this.getPreRenderConfig().
|
|
23166
|
+
const preRenderId = this.getPreRenderConfig().id;
|
|
23091
23167
|
return {
|
|
23092
23168
|
wrapper: `${PRERENDER_WRAPPER_ID_PREFIX}${preRenderId}`,
|
|
23093
23169
|
child: `tsEmbed-pre-render-child-${preRenderId}`,
|
|
@@ -24568,6 +24644,7 @@ query GetEurekaVizSnapshots(
|
|
|
24568
24644
|
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
24569
24645
|
message: ERROR_MESSAGE.LIVEBOARD_VIZ_ID_VALIDATION,
|
|
24570
24646
|
code: EmbedErrorCodes.LIVEBOARD_ID_MISSING,
|
|
24647
|
+
severity: EmbedErrorSeverity.SEV1,
|
|
24571
24648
|
error: ERROR_MESSAGE.LIVEBOARD_VIZ_ID_VALIDATION,
|
|
24572
24649
|
});
|
|
24573
24650
|
}
|
|
@@ -24719,7 +24796,7 @@ query GetEurekaVizSnapshots(
|
|
|
24719
24796
|
if (this.isRendered) {
|
|
24720
24797
|
this.trigger(exports.HostEvent.Navigate, path.substring(1));
|
|
24721
24798
|
}
|
|
24722
|
-
else if (this.getPreRenderConfig().
|
|
24799
|
+
else if (this.getPreRenderConfig().id) {
|
|
24723
24800
|
this.preRender(true);
|
|
24724
24801
|
}
|
|
24725
24802
|
else {
|
|
@@ -25423,7 +25500,7 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
25423
25500
|
const ref = React.useRef(null);
|
|
25424
25501
|
const { className, style, ...embedProps } = props;
|
|
25425
25502
|
const { viewConfig, listeners } = getViewPropsAndListeners(embedProps);
|
|
25426
|
-
const preRenderId = (_b = (_a = props.preRenderConfig) === null || _a === void 0 ? void 0 : _a.
|
|
25503
|
+
const preRenderId = (_b = (_a = props.preRenderConfig) === null || _a === void 0 ? void 0 : _a.id) !== null && _b !== void 0 ? _b : props.preRenderId;
|
|
25427
25504
|
const handleDestroy = (tsEmbed) => {
|
|
25428
25505
|
// do not destroy if it is a preRender component
|
|
25429
25506
|
if (isPreRenderedComponent)
|