Skip to content

Commit 6c313e8

Browse files
Moved changes to CHANGELOG_v6.md
1 parent 01969f9 commit 6c313e8

File tree

3 files changed

+20
-21
lines changed

3 files changed

+20
-21
lines changed

CHANGELOG.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,6 @@ should change the heading of the (upcoming) version to include a major version b
1616
1717
-->
1818

19-
# 6.0.0
20-
21-
## @rjsf/core
22-
23-
- Add support for `patternProperties` [#1944](https://github.com/rjsf-team/react-jsonschema-form/issues/1944)
24-
25-
## @rjsf/utils
26-
27-
- Add support for `patternProperties` [#1944](https://github.com/rjsf-team/react-jsonschema-form/issues/1944)
28-
2919
# 5.24.9
3020

3121
## @rjsf/antd

CHANGELOG_v6.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ should change the heading of the (upcoming) version to include a major version b
4848
- BREAKING CHANGE: Moved the addition of `Bootstrap 3` classes from the `SchemaField` to the `WrapIfAdditionalTemplate`, thereby affecting all the other themes, fixing [#2280](https://github.com/rjsf-team/react-jsonschema-form/issues/2280)
4949
- BREAKING CHANGE: Added `rjsf-` prefix onto the following marker classes used in the fields and templates:
5050
- `field`, `field-<schema.type>`, `field-error`, `field-hidden`, `field-array`, `field-array-of-<schema.type>`, `field-array-fixed-items`, `array-item`, `config-error`, `array-item-add`, `array-item-copy`, `array-item-move-down`, `array-item-move-up`, `array-item-remove`, `object-property-expand`
51+
- Added support for `patternProperties` [#1944](https://github.com/rjsf-team/react-jsonschema-form/issues/1944)
5152

5253
## @rjsf/daisyui
5354

@@ -111,6 +112,7 @@ should change the heading of the (upcoming) version to include a major version b
111112
- BREAKING CHANGE: Removed the deprecated `toErrorList()` function from the `ValidatorType` interface
112113
- BREAKING CHANGE: Removed the deprecated `RJSF_ADDITONAL_PROPERTIES_FLAG` constant
113114
- Updated the `WrapIfAdditionalTemplateProps` to include `hideError` and `rawErrors` in support of moving `Bootstrap 3` marker classes out of `SchemaField`
115+
- Added support for `patternProperties` [#1944](https://github.com/rjsf-team/react-jsonschema-form/issues/1944)
114116

115117
## @rjsf/validator-ajv6
116118

@@ -130,6 +132,7 @@ should change the heading of the (upcoming) version to include a major version b
130132
- Updated the `playground` to add a `Layout Grid` example and made the selected example now be part of the shared export
131133
- Replaced Lerna with Nx, updated all lerna commands to use the Nx CLI
132134
- BREAKING CHANGE: Updated all `peerDependencies` to change minimal `React` support to `>=18`
135+
- Added documentation and playground example for `patternProperties`
133136

134137
# 6.0.0-alpha.0
135138

packages/utils/src/schema/retrieveSchema.ts

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -399,10 +399,13 @@ export function stubExistingAdditionalProperties<
399399
if (PATTERN_PROPERTIES_KEY in schema) {
400400
const patternProperties = Object.keys(schema.patternProperties!)
401401
.filter((pattern) => RegExp(pattern).test(key))
402-
.reduce((obj, pattern) => {
403-
obj[pattern] = schema.patternProperties![pattern];
404-
return obj;
405-
}, {} as NonNullable<S['patternProperties']>);
402+
.reduce(
403+
(obj, pattern) => {
404+
obj[pattern] = schema.patternProperties![pattern];
405+
return obj;
406+
},
407+
{} as NonNullable<S['patternProperties']>,
408+
);
406409
if (Object.keys(patternProperties).length > 0) {
407410
schema.properties[key] = retrieveSchema<T, S, F>(
408411
validator,
@@ -424,7 +427,7 @@ export function stubExistingAdditionalProperties<
424427
{ $ref: get(schema.additionalProperties, [REF_KEY]) } as S,
425428
rootSchema,
426429
formData as T,
427-
experimental_customMergeAllOf
430+
experimental_customMergeAllOf,
428431
);
429432
} else if ('type' in schema.additionalProperties!) {
430433
additionalProperties = { ...schema.additionalProperties };
@@ -547,25 +550,28 @@ export function retrieveSchemaInternal<
547550
(schema, key) => {
548551
const patternProperties = Object.keys(schema.patternProperties!)
549552
.filter((pattern) => RegExp(pattern).test(key))
550-
.reduce((obj, pattern) => {
551-
obj[pattern] = schema.patternProperties![pattern];
552-
return obj;
553-
}, {} as NonNullable<S['patternProperties']>);
553+
.reduce(
554+
(obj, pattern) => {
555+
obj[pattern] = schema.patternProperties![pattern];
556+
return obj;
557+
},
558+
{} as NonNullable<S['patternProperties']>,
559+
);
554560
if (Object.keys(patternProperties).length > 0) {
555561
schema.properties[key] = retrieveSchema<T, S, F>(
556562
validator,
557563
{ allOf: [schema.properties[key], ...Object.values(patternProperties)] } as S,
558564
rootSchema,
559565
rawFormData as T,
560-
experimental_customMergeAllOf
566+
experimental_customMergeAllOf,
561567
);
562568
}
563569
return schema;
564570
},
565571
{
566572
...resolvedSchema,
567573
properties: { ...resolvedSchema.properties },
568-
}
574+
},
569575
);
570576
}
571577
const hasAdditionalProperties =

0 commit comments

Comments
 (0)