@sitecore-content-sdk/react 0.3.0-canary.19 → 0.3.0-canary.20
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.
|
@@ -134,7 +134,10 @@ class PlaceholderCommon extends react_1.default.Component {
|
|
|
134
134
|
const type = rendered.props.type === 'text/sitecore' ? rendered.props.type : '';
|
|
135
135
|
// wrapping with error boundary could cause problems in case where parent component uses withPlaceholder HOC and tries to access its children props
|
|
136
136
|
// that's why we need to expose element's props here
|
|
137
|
-
|
|
137
|
+
const isByocWrapper = componentRendering.componentName === BYOCWrapper_1.BYOC_WRAPPER_RENDERING_NAME;
|
|
138
|
+
// all dynamic elements will have a separate render prop
|
|
139
|
+
const isDynamicComponent = !!((_a = component.render) === null || _a === void 0 ? void 0 : _a.preload);
|
|
140
|
+
rendered = (react_1.default.createElement(ErrorBoundary_1.default, Object.assign({ key: rendered.type + '-' + index, errorComponent: this.props.errorComponent, componentLoadingMessage: this.props.componentLoadingMessage, type: type, isDynamic: isDynamicComponent || isByocWrapper }, rendered.props), rendered));
|
|
138
141
|
}
|
|
139
142
|
// if in edit mode then emit shallow chromes for hydration in Pages
|
|
140
143
|
if ((_b = this.props.pageContext) === null || _b === void 0 ? void 0 : _b.pageEditing) {
|
|
@@ -128,7 +128,10 @@ export class PlaceholderCommon extends React.Component {
|
|
|
128
128
|
const type = rendered.props.type === 'text/sitecore' ? rendered.props.type : '';
|
|
129
129
|
// wrapping with error boundary could cause problems in case where parent component uses withPlaceholder HOC and tries to access its children props
|
|
130
130
|
// that's why we need to expose element's props here
|
|
131
|
-
|
|
131
|
+
const isByocWrapper = componentRendering.componentName === BYOC_WRAPPER_RENDERING_NAME;
|
|
132
|
+
// all dynamic elements will have a separate render prop
|
|
133
|
+
const isDynamicComponent = !!((_a = component.render) === null || _a === void 0 ? void 0 : _a.preload);
|
|
134
|
+
rendered = (React.createElement(ErrorBoundary, Object.assign({ key: rendered.type + '-' + index, errorComponent: this.props.errorComponent, componentLoadingMessage: this.props.componentLoadingMessage, type: type, isDynamic: isDynamicComponent || isByocWrapper }, rendered.props), rendered));
|
|
132
135
|
}
|
|
133
136
|
// if in edit mode then emit shallow chromes for hydration in Pages
|
|
134
137
|
if ((_b = this.props.pageContext) === null || _b === void 0 ? void 0 : _b.pageEditing) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sitecore-content-sdk/react",
|
|
3
|
-
"version": "0.3.0-canary.
|
|
3
|
+
"version": "0.3.0-canary.20",
|
|
4
4
|
"main": "dist/cjs/index.js",
|
|
5
5
|
"module": "dist/esm/index.js",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -63,12 +63,12 @@
|
|
|
63
63
|
"react-dom": "^19.1.0"
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
|
-
"@sitecore-content-sdk/core": "0.3.0-canary.
|
|
66
|
+
"@sitecore-content-sdk/core": "0.3.0-canary.20",
|
|
67
67
|
"fast-deep-equal": "^3.1.3"
|
|
68
68
|
},
|
|
69
69
|
"description": "",
|
|
70
70
|
"types": "types/index.d.ts",
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "9e6d00a485580af695ac93b4403d84b9eda6c0fe",
|
|
72
72
|
"files": [
|
|
73
73
|
"dist",
|
|
74
74
|
"types"
|