@contentful/experiences-components-react 1.42.1-beta.0 → 1.42.2-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 +21 -6
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1368,8 +1368,13 @@ const VariableMappingSchema = z.object({
|
|
|
1368
1368
|
type: z.literal('ContentTypeMapping'),
|
|
1369
1369
|
pathsByContentType: z.record(z.string(), z.object({ path: z.string() })),
|
|
1370
1370
|
});
|
|
1371
|
-
|
|
1372
|
-
|
|
1371
|
+
const PassToNodeSchema = z
|
|
1372
|
+
.object({
|
|
1373
|
+
nodeId: propertyKeySchema,
|
|
1374
|
+
parameterId: propertyKeySchema,
|
|
1375
|
+
prebindingId: propertyKeySchema,
|
|
1376
|
+
})
|
|
1377
|
+
.strict();
|
|
1373
1378
|
const ParameterDefinitionSchema = z.object({
|
|
1374
1379
|
defaultSource: z
|
|
1375
1380
|
.strictObject({
|
|
@@ -1391,18 +1396,28 @@ const ParameterDefinitionSchema = z.object({
|
|
|
1391
1396
|
linkType: z.enum(['ContentType']),
|
|
1392
1397
|
}),
|
|
1393
1398
|
})),
|
|
1399
|
+
passToNodes: z.array(PassToNodeSchema).optional(),
|
|
1394
1400
|
});
|
|
1395
1401
|
const ParameterDefinitionsSchema = z.record(propertyKeySchema, ParameterDefinitionSchema);
|
|
1396
1402
|
const VariableMappingsSchema = z.record(propertyKeySchema, VariableMappingSchema);
|
|
1397
1403
|
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
|
|
1398
1404
|
ComponentVariableSchema);
|
|
1399
|
-
const
|
|
1405
|
+
const PrebindingDefinitionSchema = z
|
|
1406
|
+
.object({
|
|
1407
|
+
id: propertyKeySchema,
|
|
1408
|
+
parameterDefinitions: ParameterDefinitionsSchema,
|
|
1409
|
+
variableMappings: VariableMappingsSchema.optional(),
|
|
1410
|
+
allowedVariableOverrides: z.array(z.string()).optional(),
|
|
1411
|
+
})
|
|
1412
|
+
.strict();
|
|
1413
|
+
const ComponentSettingsSchema = z
|
|
1414
|
+
.object({
|
|
1400
1415
|
variableDefinitions: ComponentVariablesSchema,
|
|
1401
1416
|
thumbnailId: z.enum(THUMBNAIL_IDS).optional(),
|
|
1402
1417
|
category: z.string().max(50, 'Category must contain at most 50 characters').optional(),
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1418
|
+
prebindingDefinitions: z.array(PrebindingDefinitionSchema).max(1).optional(),
|
|
1419
|
+
})
|
|
1420
|
+
.strict();
|
|
1406
1421
|
z.object({
|
|
1407
1422
|
componentTree: localeWrapper(ComponentTreeSchema),
|
|
1408
1423
|
dataSource: localeWrapper(DataSourceSchema),
|