@contentful/experiences-core 1.42.0-prerelease-20250630T1135-a8b68d4.0 → 1.42.1-beta.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 +5 -21
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1072,29 +1072,13 @@ const ParameterDefinitionsSchema = z.record(propertyKeySchema, ParameterDefiniti
|
|
|
1072
1072
|
const VariableMappingsSchema = z.record(propertyKeySchema, VariableMappingSchema);
|
|
1073
1073
|
const ComponentVariablesSchema = z.record(z.string().regex(/^[a-zA-Z0-9-_]{1,54}$/), // Here the key is <variableName>_<nanoidId> so we need to allow for a longer length
|
|
1074
1074
|
ComponentVariableSchema);
|
|
1075
|
-
const
|
|
1076
|
-
.object({
|
|
1077
|
-
nodeId: propertyKeySchema,
|
|
1078
|
-
parameterId: propertyKeySchema,
|
|
1079
|
-
prebindingId: propertyKeySchema,
|
|
1080
|
-
})
|
|
1081
|
-
.strict();
|
|
1082
|
-
const PrebindingDefinitionSchema = z
|
|
1083
|
-
.object({
|
|
1084
|
-
id: propertyKeySchema,
|
|
1085
|
-
variableMappings: VariableMappingsSchema.optional(),
|
|
1086
|
-
parameterDefinitions: ParameterDefinitionsSchema,
|
|
1087
|
-
passToNodes: z.array(PassToNodeSchema).optional(),
|
|
1088
|
-
})
|
|
1089
|
-
.strict();
|
|
1090
|
-
const ComponentSettingsSchema = z
|
|
1091
|
-
.object({
|
|
1075
|
+
const ComponentSettingsSchema = z.object({
|
|
1092
1076
|
variableDefinitions: ComponentVariablesSchema,
|
|
1093
1077
|
thumbnailId: z.enum(THUMBNAIL_IDS).optional(),
|
|
1094
1078
|
category: z.string().max(50, 'Category must contain at most 50 characters').optional(),
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1079
|
+
variableMappings: VariableMappingsSchema.optional(),
|
|
1080
|
+
parameterDefinitions: ParameterDefinitionsSchema.optional(),
|
|
1081
|
+
});
|
|
1098
1082
|
z.object({
|
|
1099
1083
|
componentTree: localeWrapper(ComponentTreeSchema),
|
|
1100
1084
|
dataSource: localeWrapper(DataSourceSchema),
|
|
@@ -4172,7 +4156,7 @@ const attachPrebindingDefaultValueAsDataSource = (experienceEntry) => {
|
|
|
4172
4156
|
// Only supported for pattern entries since experience entries don't define pattern properties.
|
|
4173
4157
|
return;
|
|
4174
4158
|
}
|
|
4175
|
-
const patternDefs = experienceEntry.fields.componentSettings?.
|
|
4159
|
+
const patternDefs = experienceEntry.fields.componentSettings?.parameterDefinitions ?? {};
|
|
4176
4160
|
const defaultPrebinding = Object.values(patternDefs).find((def) => def.defaultSource)?.defaultSource;
|
|
4177
4161
|
const { link, type } = defaultPrebinding ?? {};
|
|
4178
4162
|
if (!link || !type)
|