@contentful/experiences-visual-editor-react 3.8.0-prerelease-20250926T1312-a8b5fb7.0 → 3.8.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/dist/index.js +19 -2
- package/dist/index.js.map +1 -1
- package/dist/renderApp.js +19 -2
- package/dist/renderApp.js.map +1 -1
- package/package.json +4 -4
package/dist/renderApp.js
CHANGED
|
@@ -42904,6 +42904,9 @@ const getPrebindingPathBySourceEntry = (preboundValueProperty, getHeadEntityByDa
|
|
|
42904
42904
|
return undefined;
|
|
42905
42905
|
}
|
|
42906
42906
|
const contentTypeId = headEntity.sys.contentType.sys.id;
|
|
42907
|
+
if (!preboundValueProperty.pathsByContentType?.[contentTypeId]) {
|
|
42908
|
+
return undefined;
|
|
42909
|
+
}
|
|
42907
42910
|
return preboundValueProperty.pathsByContentType?.[contentTypeId]?.path;
|
|
42908
42911
|
};
|
|
42909
42912
|
const parseDeepPath$1 = (deepPathCandidate) => {
|
|
@@ -51049,14 +51052,28 @@ const useComponentProps = ({ node, entityStore, areEntitiesFetched, resolveDesig
|
|
|
51049
51052
|
// eg: "/uuid" vs "/uuid/fields/[fileName]/~locale" as the regular BoundValue would have
|
|
51050
51053
|
const [, uuid, maybePath] = variableMapping.path.split('/');
|
|
51051
51054
|
const link = dataSource[uuid];
|
|
51052
|
-
let boundValue;
|
|
51053
51055
|
// starting from here, if the prop is of type 'BoundValue', and has prebinding
|
|
51054
51056
|
// we are going to resolve the incomplete path
|
|
51057
|
+
let boundValue;
|
|
51058
|
+
// TODO: Temporary fix while we look into SPA-3212 it occurs where we have prebound props but data source link is missing
|
|
51059
|
+
// this only occurs after live updates of nested patterns.
|
|
51060
|
+
if (!link && isPreboundProp(variableMapping) && variableMapping.isPrebound) {
|
|
51061
|
+
return {
|
|
51062
|
+
...acc,
|
|
51063
|
+
[variableName]: variableDefinition.defaultValue,
|
|
51064
|
+
};
|
|
51065
|
+
}
|
|
51055
51066
|
if (link && isPreboundProp(variableMapping) && variableMapping.isPrebound) {
|
|
51056
51067
|
const prebindingPath = getPrebindingPathBySourceEntry(variableMapping, (dataSourceKey) => {
|
|
51057
51068
|
const link = dataSource[dataSourceKey];
|
|
51058
51069
|
return entityStore.getEntityFromLink(link);
|
|
51059
|
-
})
|
|
51070
|
+
});
|
|
51071
|
+
if (!prebindingPath) {
|
|
51072
|
+
return {
|
|
51073
|
+
...acc,
|
|
51074
|
+
[variableName]: variableDefinition.defaultValue,
|
|
51075
|
+
};
|
|
51076
|
+
}
|
|
51060
51077
|
// this allows us to resolve it regularly
|
|
51061
51078
|
boundValue = transformBoundContentValue(node.data.props, entityStore, link, resolveDesignValue, variableName, variableDefinition.type, prebindingPath);
|
|
51062
51079
|
}
|