@contentful/experiences-visual-editor-react 3.8.0-dev-20250925T1014-c658e71.0 → 3.8.0-dev-20250926T1559-e1ab24d.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 +30 -1
- package/dist/index.js.map +1 -1
- package/dist/renderApp.js +30 -1
- package/dist/renderApp.js.map +1 -1
- package/package.json +4 -4
package/dist/renderApp.js
CHANGED
|
@@ -42140,6 +42140,16 @@ const ComponentVariableSchema$1 = z.object({
|
|
|
42140
42140
|
});
|
|
42141
42141
|
const ComponentTreeNodeSchema$1 = BaseComponentTreeNodeSchema$1.extend({
|
|
42142
42142
|
children: z.lazy(() => ComponentTreeNodeSchema$1.array()),
|
|
42143
|
+
}).superRefine(({ id, prebindingId, parameters }, ctx) => {
|
|
42144
|
+
// We don't fail if parameters are present but prebindingId is not because
|
|
42145
|
+
// older experiences (updated before 21-09-2025) always included parameters
|
|
42146
|
+
// and they will start failing if we do.
|
|
42147
|
+
if (prebindingId && !parameters) {
|
|
42148
|
+
ctx.addIssue({
|
|
42149
|
+
code: z.ZodIssueCode.custom,
|
|
42150
|
+
message: `Found "prebindingId" but no "parameters" for node with id: "${id}"`,
|
|
42151
|
+
});
|
|
42152
|
+
}
|
|
42143
42153
|
});
|
|
42144
42154
|
const ComponentTreeSchema$1 = z
|
|
42145
42155
|
.object({
|
|
@@ -42894,6 +42904,9 @@ const getPrebindingPathBySourceEntry = (preboundValueProperty, getHeadEntityByDa
|
|
|
42894
42904
|
return undefined;
|
|
42895
42905
|
}
|
|
42896
42906
|
const contentTypeId = headEntity.sys.contentType.sys.id;
|
|
42907
|
+
if (!preboundValueProperty.pathsByContentType?.[contentTypeId]) {
|
|
42908
|
+
return undefined;
|
|
42909
|
+
}
|
|
42897
42910
|
return preboundValueProperty.pathsByContentType?.[contentTypeId]?.path;
|
|
42898
42911
|
};
|
|
42899
42912
|
const parseDeepPath$1 = (deepPathCandidate) => {
|
|
@@ -49949,6 +49962,16 @@ const ComponentVariableSchema = z.object({
|
|
|
49949
49962
|
});
|
|
49950
49963
|
const ComponentTreeNodeSchema = BaseComponentTreeNodeSchema.extend({
|
|
49951
49964
|
children: z.lazy(() => ComponentTreeNodeSchema.array()),
|
|
49965
|
+
}).superRefine(({ id, prebindingId, parameters }, ctx) => {
|
|
49966
|
+
// We don't fail if parameters are present but prebindingId is not because
|
|
49967
|
+
// older experiences (updated before 21-09-2025) always included parameters
|
|
49968
|
+
// and they will start failing if we do.
|
|
49969
|
+
if (prebindingId && !parameters) {
|
|
49970
|
+
ctx.addIssue({
|
|
49971
|
+
code: z.ZodIssueCode.custom,
|
|
49972
|
+
message: `Found "prebindingId" but no "parameters" for node with id: "${id}"`,
|
|
49973
|
+
});
|
|
49974
|
+
}
|
|
49952
49975
|
});
|
|
49953
49976
|
const ComponentTreeSchema = z
|
|
49954
49977
|
.object({
|
|
@@ -51036,7 +51059,13 @@ const useComponentProps = ({ node, entityStore, areEntitiesFetched, resolveDesig
|
|
|
51036
51059
|
const prebindingPath = getPrebindingPathBySourceEntry(variableMapping, (dataSourceKey) => {
|
|
51037
51060
|
const link = dataSource[dataSourceKey];
|
|
51038
51061
|
return entityStore.getEntityFromLink(link);
|
|
51039
|
-
})
|
|
51062
|
+
});
|
|
51063
|
+
if (!prebindingPath) {
|
|
51064
|
+
return {
|
|
51065
|
+
...acc,
|
|
51066
|
+
[variableName]: variableDefinition.defaultValue,
|
|
51067
|
+
};
|
|
51068
|
+
}
|
|
51040
51069
|
// this allows us to resolve it regularly
|
|
51041
51070
|
boundValue = transformBoundContentValue(node.data.props, entityStore, link, resolveDesignValue, variableName, variableDefinition.type, prebindingPath);
|
|
51042
51071
|
}
|