@contentful/experiences-visual-editor-react 1.0.6-dev-20240416T2113-090181e.0 → 1.0.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/dist/index.js +18 -1
- package/dist/index.js.map +1 -1
- package/dist/renderApp.js +18 -1
- package/dist/renderApp.js.map +1 -1
- package/package.json +4 -4
package/dist/renderApp.js
CHANGED
|
@@ -51673,6 +51673,23 @@ const resolveAssembly = ({ node, entityStore, }) => {
|
|
|
51673
51673
|
return deserializedNode;
|
|
51674
51674
|
};
|
|
51675
51675
|
|
|
51676
|
+
class ImportedComponentError extends Error {
|
|
51677
|
+
constructor(message) {
|
|
51678
|
+
super(message);
|
|
51679
|
+
this.name = 'ImportedComponentError';
|
|
51680
|
+
}
|
|
51681
|
+
}
|
|
51682
|
+
class ImportedComponentErrorBoundary extends React.Component {
|
|
51683
|
+
componentDidCatch(error, _errorInfo) {
|
|
51684
|
+
const err = new ImportedComponentError(error.message);
|
|
51685
|
+
err.stack = error.stack;
|
|
51686
|
+
throw err;
|
|
51687
|
+
}
|
|
51688
|
+
render() {
|
|
51689
|
+
return this.props.children;
|
|
51690
|
+
}
|
|
51691
|
+
}
|
|
51692
|
+
|
|
51676
51693
|
const useComponent = ({ node: rawNode, resolveDesignValue, renderDropzone, userIsDragging, }) => {
|
|
51677
51694
|
const areEntitiesFetched = useEntityStore((state) => state.areEntitiesFetched);
|
|
51678
51695
|
const entityStore = useEntityStore((state) => state.entityStore);
|
|
@@ -51714,7 +51731,7 @@ const useComponent = ({ node: rawNode, resolveDesignValue, renderDropzone, userI
|
|
|
51714
51731
|
: node.type === ASSEMBLY_NODE_TYPE
|
|
51715
51732
|
? // Assembly.tsx requires renderDropzone and editorMode as well
|
|
51716
51733
|
() => React.createElement(componentRegistration.component, componentProps)
|
|
51717
|
-
: () => React.createElement(componentRegistration.component, otherComponentProps);
|
|
51734
|
+
: () => React.createElement(ImportedComponentErrorBoundary, null, React.createElement(componentRegistration.component, otherComponentProps));
|
|
51718
51735
|
return {
|
|
51719
51736
|
node,
|
|
51720
51737
|
componentId,
|