Skip to content

Commit 1f7263c

Browse files
heath-freenomezfarhad
authored andcommitted
Added new templates, utility function and refactored ArrayFieldItemTemplate (rjsf-team#4489)
* Added new templates, utility function and refactored ArrayFieldItemTemplate - In `@rjsf/utils`: - Refactored the `ArrayFieldItemTemplateType` to extract out all the button related props to `ArrayFieldItemButtonsTemplateType`, adding `buttonsProps: ArrayFieldItemButtonsTemplateType` as a new prop - Also created a deprecated alias type `ArrayFieldTemplateItemType` that points to `ArrayFieldItemTemplateType` for backwards compatibility - Added new `GridTemplateProps` type - Added two the following new, required props to `TemplatesType`: - `ArrayFieldItemButtonsTemplate: ComponentType<ArrayFieldItemButtonsTemplateType<T, S, F>>;` - `GridTemplate: ComponentType<GridTemplateProps>` - Added a new `buttonId<T>(id: IdSchema<T> | string, btn: 'add' | 'copy' | 'moveDown' | 'moveUp' | 'remove')` used to generate consistent ids for RJSF buttons - In `@rjsf/core`: - Updated `ArrayField` to provide the `buttonsProps` to the `ArrayFieldItemTemplateType` - Added `ArrayFieldItemButtonsTemplate` component as a refactor of all the common buttons code from all the `ArrayFieldItemTemplate` implementations, adding a unique id using the `buttonId()` function - Refactored `ArrayFieldItemTemplate` to use the new `ArrayFieldItemButtonsTemplate` - Updated the `ArrayFieldTemplate`, `ObjectFieldTemplate`, and `WrapIfAdditionalTemplate` to a unique id using the `buttonId()` function and adding consistent marker classes - All other themes: - Refactored `ArrayFieldItemTemplate` to use the new `ArrayFieldItemButtonsTemplate` - Updated the `ArrayFieldTemplate`, `ObjectFieldTemplate`, and `WrapIfAdditionalTemplate` to a unique id using the `buttonId()` function and adding consistent marker classes - Updated the playground to remove `fluent-ui` theme - Updated the `custom-templates.md` documentation for the changes to the `ArrayFieldTemplateItem` and add the two new templates - Updated the `utility-functions.md` documentation to add the `buttonId()` function - Added the `v6.x upgrade guide.md` documentation - Updated `CHANGELOG_V6.md` accordingly * - Updated changelog * Apply suggestions from code review - Self feedback * Update packages/docs/docs/advanced-customization/custom-templates.md - Self review
1 parent b6b1db5 commit 1f7263c

File tree

1 file changed

+61
-2
lines changed

1 file changed

+61
-2
lines changed

CHANGELOG_v6.md

Lines changed: 61 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,68 @@ should change the heading of the (upcoming) version to include a major version b
1717
-->
1818
# 6.0.0-beta.1
1919

20+
## @rjsf/antd
21+
22+
- BREAKING CHANGE: Refactored `ArrayFieldItemTemplate` to use the new `ArrayFieldItemButtonsTemplate`
23+
- Updated the `ArrayFieldTemplate`, `ObjectFieldTemplate`, and `WrapIfAdditionalTemplate` to a unique id using the `buttonId()` function and adding consistent marker classes
24+
25+
## @rjsf/chakra-ui
26+
27+
- BREAKING CHANGE: Refactored `ArrayFieldItemTemplate` to use the new `ArrayFieldItemButtonsTemplate`
28+
- Updated the `ArrayFieldTemplate`, `ObjectFieldTemplate`, and `WrapIfAdditionalTemplate` to a unique id using the `buttonId()` function and adding consistent marker classes
29+
30+
## @rjsf/core
31+
32+
- BREAKING CHANGE: Updated `ArrayField` to provide the `buttonsProps` to the `ArrayFieldItemTemplateType`
33+
- Added `ArrayFieldItemButtonsTemplate` component as a refactor of all the common buttons code from all the `ArrayFieldItemTemplate` implementations, adding a unique id using the `buttonId()` function
34+
- Refactored `ArrayFieldItemTemplate` to use the new `ArrayFieldItemButtonsTemplate`
35+
- Updated the `ArrayFieldTemplate`, `ObjectFieldTemplate`, and `WrapIfAdditionalTemplate` to a unique id using the `buttonId()` function and adding consistent marker classes
36+
37+
## @rjsf/fluent-ui
38+
39+
- BREAKING CHANGE: Deleted this theme in favor of `fluentui-rc`
40+
41+
## @rjsf/fluentui-rc
42+
43+
- BREAKING CHANGE: Refactored `ArrayFieldItemTemplate` to use the new `ArrayFieldItemButtonsTemplate`
44+
- Updated the `ArrayFieldTemplate`, `ObjectFieldTemplate`, and `WrapIfAdditionalTemplate` to a unique id using the `buttonId()` function and adding consistent marker classes
45+
46+
## @rjsf/mui
47+
48+
- BREAKING CHANGE: Refactored `ArrayFieldItemTemplate` to use the new `ArrayFieldItemButtonsTemplate`
49+
- Updated the `ArrayFieldTemplate`, `ObjectFieldTemplate`, and `WrapIfAdditionalTemplate` to a unique id using the `buttonId()` function and adding consistent marker classes
50+
51+
## @rjsf/semantic-ui
52+
53+
- BREAKING CHANGE: Refactored `ArrayFieldItemTemplate` to use the new `ArrayFieldItemButtonsTemplate`
54+
- Updated the `ArrayFieldTemplate`, `ObjectFieldTemplate`, and `WrapIfAdditionalTemplate` to a unique id using the `buttonId()` function and adding consistent marker classes
55+
56+
## @rjsf/utils
57+
58+
- BREAKING CHANGE: Refactored the `ArrayFieldItemTemplateType` to extract out all the button related props to `ArrayFieldItemButtonsTemplateType`, adding `buttonsProps: ArrayFieldItemButtonsTemplateType` as a new prop
59+
- Also created a deprecated alias type `ArrayFieldTemplateItemType` that points to `ArrayFieldItemTemplateType` for backwards compatibility
60+
- Added new `GridTemplateProps` type
61+
- BREAKING CHANGE: Added two the following new, required props to `TemplatesType`:
62+
- `ArrayFieldItemButtonsTemplate: ComponentType<ArrayFieldItemButtonsTemplateType<T, S, F>>;`
63+
- `GridTemplate: ComponentType<GridTemplateProps>`
64+
- Added a new `buttonId<T>(id: IdSchema<T> | string, btn: 'add' | 'copy' | 'moveDown' | 'moveUp' | 'remove')` used to generate consistent ids for RJSF buttons
65+
66+
## Dev / docs / playground
67+
68+
- Updated the playground to remove `fluent-ui` theme
69+
- Updated the `custom-templates.md` documentation for the changes to the `ArrayFieldTemplateItem` and add the two new templates
70+
- Updated the `utility-functions.md` documentation to add the `buttonId()` function
71+
- Added the `v6.x upgrade guide.md` documentation
72+
73+
# 6.0.0-alpha.0
74+
2075
## @rjsf/bootstrap-4
2176

22-
- Package has been replaced with `@rjsf/react-bootstrap`. `react-boostrap` v1 / Bootstrap 4 are no longer supported in RJSF v6.
77+
- BREAKING CHANGE: Package has been replaced with `@rjsf/react-bootstrap`. `react-boostrap` v1 / Bootstrap 4 are no longer supported in RJSF v6.
2378

2479
## @rjsf/material-ui
2580

26-
- Removed `@rjsf/material-ui` package. Material UI v4 (`@material-ui/core`) has been deprecated since September 2021. To use Material UI v5 (`@mui/core`) with RJSF, please use the `@rjsf/mui` theme instead.
81+
- BREAKING CHANGE: Removed `@rjsf/material-ui` package. Material UI v4 (`@material-ui/core`) has been deprecated since September 2021. To use Material UI v5 (`@mui/core`) with RJSF, please use the `@rjsf/mui` theme instead.
2782

2883
## @rjsf/react-bootstrap
2984

@@ -33,3 +88,7 @@ should change the heading of the (upcoming) version to include a major version b
3388
- IconButton: Remove deprecated `block` prop
3489
- RangeWidget: Use `FormRange` component
3590
- SelectWidget: Use new FormSelect component, remove `bsPrefix` prop to achieve correct styling
91+
92+
## Dev / docs / playground
93+
94+
- Updated the playground to remove `material-ui-4` theme and replace the `bootstrap-4` theme with `react-bootstrap`

0 commit comments

Comments
 (0)