Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge changes in main to rjsf-v6 #4164

Merged
merged 57 commits into from
Apr 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
c4b9e47
fix(utils): direct lodash function import to improve bundling on libr…
JonaszJestem Nov 27, 2023
a8d37b7
v5.14.3 (#3979)
heath-freenome Nov 27, 2023
bc16e29
add missing typescript project reference for utils in validator-ajv6 …
zxbodya Nov 28, 2023
ac6b3b0
fix: #3961 resolve all recurse list for object properties (#3981)
cwendtxealth Nov 28, 2023
d89367e
Add the ability to parse defaults from `allOf` schema (#3969)
benjdlambert Nov 30, 2023
c5c2b27
mui: fix gap in outline when label is hidden (#3984)
drbild Dec 1, 2023
297dac0
Release 5.15.0 (#3986)
heath-freenome Dec 1, 2023
daa687a
Make getFieldNames correctly defines array of primitives (#3990)
Ariqun Dec 5, 2023
2061ce6
Fix: Expose the internal `ajv` variable in the validator implementati…
heath-freenome Dec 6, 2023
e8aa9e8
v5.15.1 (#3997)
heath-freenome Dec 8, 2023
39f6451
feat: pass down indexed title from array field (#4002)
Rozamo Dec 14, 2023
1de339b
chore(deps): bump actions/download-artifact from 3 to 4
dependabot[bot] Jan 1, 2024
e475057
chore(deps): bump actions/setup-python from 3 to 5
dependabot[bot] Jan 5, 2024
cd486d0
chore(deps): bump actions/upload-artifact from 3 to 4
dependabot[bot] Jan 5, 2024
21d1c55
chore(deps-dev): bump vite from 4.4.9 to 4.4.12
dependabot[bot] Jan 5, 2024
accbd16
Feat: Implements #297 request (#4004)
Shubhcoder Jan 7, 2024
db146ff
chore: Bumped packages using `npm run bump-all-packages` (#4006)
heath-freenome Jan 8, 2024
8c685b7
Update Form.tsx and make submit method public (#4029)
popmanhe Jan 8, 2024
93e7021
Fix: Change FormHelperText usage with @mui/material to render divs (#…
heath-freenome Jan 10, 2024
1bc40b0
Support file deletion for data-url (#4030)
yuki-js Jan 10, 2024
4d347fd
Release 5.16.0 (#4037)
heath-freenome Jan 11, 2024
4f8d080
Release 5.16.1 (#4041)
heath-freenome Jan 11, 2024
f31bef1
Enhancement(Share): Enhancement base64 encoding/decoding using UTF-8 …
orange-guo Jan 18, 2024
53b3c57
fix: Added support for anyOf/oneOf in uiSchema (#4055)
heath-freenome Jan 23, 2024
d58775b
chore(deps-dev): bump vite from 4.5.1 to 4.5.2
dependabot[bot] Jan 23, 2024
0274b86
Fix checkbox with 0 as a value was unselectable in antd (#4068)
heath-freenome Jan 29, 2024
ee2ac9b
Fix potential XSS in the preview button of FileWidget (#4065)
yuki-js Jan 30, 2024
46501e5
docs: update link to markdown-to-jsx homepage (#4071)
bartvanandel Jan 30, 2024
0782878
Release 5.17.0 (#4073)
heath-freenome Feb 1, 2024
67f9c48
Fix: Make 'ui:rows' option work with chakra-ui for textarea elements …
ldirer Feb 16, 2024
f724820
Fix typo in ErrorsListTemplate example (#4087)
vstenvik Feb 16, 2024
e2e37b7
Fix #4080 by moving `base64` encoder/decoder from `@rjsf/utils` to pl…
nickgros Feb 19, 2024
ce05ea2
Pass errorSchema from ArrayField to ArrayFieldTemplate (#4094)
vstenvik Feb 19, 2024
79bd49c
v5.17.1 (#4096)
heath-freenome Feb 19, 2024
c8f9df2
Feat: don't assign a default value of an empty field. (#3880) (#4085)
abdalla-rko Feb 21, 2024
158fc22
chore(deps-dev): bump ip from 2.0.0 to 2.0.1
dependabot[bot] Feb 21, 2024
f118157
Fix: Error state not resetting when schema changes (#4079) (#4103)
abdalla-rko Mar 1, 2024
234af1d
Fix noImplicitAny error (#4106)
orenf Mar 1, 2024
9f668ec
Update validation docs with correct require statement (#4108)
mpenndev Mar 1, 2024
af8932a
Fixes: [WARNING] Duplicate key "include" in object literal [duplicate…
orenf Mar 4, 2024
e4b8c24
Fixes: Warning: validateDOMNesting(...): <p> cannot appear as a desce…
orenf Mar 14, 2024
c70d81f
give instructions for material ui 5, not 4 (#4126)
burnettk Mar 15, 2024
f0619f7
Fix documentation to add missing Form imports (#4131)
heath-freenome Mar 16, 2024
bb2093d
Fix: filename should be bold (#4125)
joachimhagheim Mar 21, 2024
baffbf1
Skip populate function proposal in Experimental_ArrayMinItems (#4121)
MarekBodingerBA Mar 21, 2024
88a9407
Fix: use correct ConfigProvider context by using named imports (#4132)
momesana Mar 22, 2024
2ac8e94
Fix 4134 by filtering out bad DOM props (#4140)
heath-freenome Mar 22, 2024
677690a
v5.18.0 (#4141)
heath-freenome Mar 23, 2024
5e42a19
chore(deps): bump follow-redirects from 1.15.5 to 1.15.6
dependabot[bot] Mar 23, 2024
294b9e3
Release 5.18.1 (#4145)
heath-freenome Mar 23, 2024
1b6376d
chore(deps-dev): bump vite from 4.5.2 to 4.5.3
dependabot[bot] Apr 4, 2024
fcaacb7
chore(deps): bump express from 4.18.2 to 4.19.2
dependabot[bot] Apr 4, 2024
3e784ff
chore(deps): bump webpack-dev-middleware from 5.3.3 to 5.3.4
dependabot[bot] Apr 4, 2024
b705399
#3121 Fixed Programmatic submit not working properly in Firefox (#4150)
abdalla-rko Apr 5, 2024
509ef2d
Fix Maximum call stack size exceeded in findSchemaDefinition (#4123)
MarttiR Apr 9, 2024
9b9f0e6
v5.18.2 (#4157)
heath-freenome Apr 10, 2024
1f89ca8
merge main into rjsf-v6
nickgros Apr 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ jobs:
NODE_OPTIONS: --max_old_space_size=4096

- if: matrix.node-version == '18.x'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: playground
path: packages/playground/dist
- if: matrix.node-version == '18.x'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: docs
path: packages/docs/build
Expand All @@ -69,12 +69,12 @@ jobs:
needs: [build]
steps:
- name: Download built playground
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: playground
path: dist
- name: Download built docs
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: docs
path: dist/docs
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
with:
ref: main
- name: Setup Python
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: '3.10'
- run: pip install -r requirements.docs.txt
Expand Down
342 changes: 245 additions & 97 deletions CHANGELOG.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"packages": ["packages/*"],
"version": "5.15.0",
"version": "5.18.2",
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"useNx": true,
"useWorkspaces": true
Expand Down
8,777 changes: 4,565 additions & 4,212 deletions package-lock.json

Large diffs are not rendered by default.

28 changes: 14 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"changed": "lerna changed",
"test": "lerna run --concurrency 2 --stream test",
"test:update": "lerna run --concurrency 2 --stream test:update",
"lint": "eslint './packages/**/*.{ts,js,tsx,jsx}' --quiet",
"lint": "eslint './packages/**/*.{ts,tsx}' --quiet",
"cs-check": "lerna run cs-check",
"cs-format": "lerna run cs-format",
"build": "lerna run --stream build",
Expand All @@ -20,7 +20,7 @@
"prepare": "husky install",
"format": "prettier --write .",
"format-check": "prettier --check .",
"bump-all-packages": "echo 'NOTE: Make sure to sanity check the playground locally before commiting changes' && npm update --save && npm install && npm run build && npm run test && npm run lint",
"bump-all-packages": "echo 'NOTE: Make sure to sanity check the playground locally before commiting changes' && npm update --save && npm install && npm run lint && npm run build && npm run test",
"bump-peer-deps": "node scripts/bump-peer-deps.js",
"refresh-node-modules": "rimraf packages/*/node_modules && rimraf node_modules && npm install",
"commit-package-changes": "git add package-lock.json packages/*/package*.json && cross-env CI=skipPrecommit git commit -m 'updated package*.json after versioning' && git push",
Expand All @@ -30,32 +30,32 @@
"license": "Apache-2.0",
"homepage": "https://github.com/rjsf-team/react-jsonschema-form",
"devDependencies": {
"@babel/eslint-parser": "^7.22.15",
"@babel/eslint-parser": "^7.23.10",
"@nrwl/nx-cloud": "^15.3.5",
"@types/estree": "^1.0.1",
"@types/jest": "^29.5.5",
"@types/node": "^18.17.14",
"@types/estree": "^1.0.5",
"@types/jest": "^29.5.12",
"@types/node": "^18.19.14",
"@types/prettier": "^2.7.3",
"@types/react": "^17.0.65",
"@types/react-dom": "^17.0.20",
"@types/react": "^17.0.75",
"@types/react-dom": "^17.0.25",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"cross-env": "^7.0.3",
"eslint": "^8.48.0",
"eslint": "^8.56.0",
"eslint-config-prettier": "^8.10.0",
"eslint-plugin-import": "^2.28.1",
"eslint-plugin-jsx-a11y": "^6.7.1",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jsx-a11y": "^6.8.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"husky": "^8.0.3",
"jest-environment-jsdom": "^29.6.4",
"jest-environment-jsdom": "^29.7.0",
"lerna": "^6.6.2",
"lint-staged": "^13.3.0",
"nx": "^15.9.2",
"prettier": "^2.8.8",
"rimraf": "^5.0.1",
"ts-jest": "^29.1.1",
"rimraf": "^5.0.5",
"ts-jest": "^29.1.2",
"tslib": "^2.6.2",
"typescript": "^4.9.5"
},
Expand Down
54 changes: 27 additions & 27 deletions packages/antd/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rjsf/antd",
"version": "5.15.0",
"version": "5.18.2",
"description": "Ant Design theme, fields and widgets for react-jsonschema-form",
"main": "dist/index.js",
"module": "lib/index.js",
Expand Down Expand Up @@ -34,51 +34,51 @@
},
"peerDependencies": {
"@ant-design/icons": "^4.0.0 || ^5.0.0",
"@rjsf/core": "^5.12.x",
"@rjsf/utils": "^5.12.x",
"@rjsf/core": "^5.18.x",
"@rjsf/utils": "^5.18.x",
"antd": "^4.24.0 || ^5.8.5",
"dayjs": "^1.8.0",
"react": "^16.14.0 || >=17"
},
"dependencies": {
"classnames": "^2.3.2",
"classnames": "^2.5.1",
"lodash": "^4.17.21",
"lodash-es": "^4.17.21",
"rc-picker": "^2.7.6"
},
"devDependencies": {
"@ant-design/icons": "^4.8.1",
"@babel/cli": "^7.22.15",
"@babel/core": "^7.22.17",
"@babel/eslint-parser": "^7.22.15",
"@babel/cli": "^7.23.9",
"@babel/core": "^7.23.9",
"@babel/eslint-parser": "^7.23.10",
"@babel/plugin-proposal-class-properties": "^7.18.6",
"@babel/plugin-proposal-optional-chaining": "^7.21.0",
"@babel/preset-env": "^7.22.15",
"@babel/preset-react": "^7.22.15",
"@babel/preset-typescript": "^7.22.15",
"@rjsf/core": "^5.15.0",
"@rjsf/snapshot-tests": "^5.15.0",
"@rjsf/utils": "^5.15.0",
"@rjsf/validator-ajv8": "^5.15.0",
"@rollup/plugin-replace": "^5.0.2",
"@types/jest": "^29.5.5",
"@types/lodash": "^4.14.198",
"@types/react": "^17.0.65",
"@types/react-dom": "^17.0.20",
"@types/react-test-renderer": "^17.0.3",
"@babel/preset-env": "^7.23.9",
"@babel/preset-react": "^7.23.3",
"@babel/preset-typescript": "^7.23.3",
"@rjsf/core": "^5.18.2",
"@rjsf/snapshot-tests": "^5.18.2",
"@rjsf/utils": "^5.18.2",
"@rjsf/validator-ajv8": "^5.18.2",
"@rollup/plugin-replace": "^5.0.5",
"@types/jest": "^29.5.12",
"@types/lodash": "^4.14.202",
"@types/react": "^17.0.75",
"@types/react-dom": "^17.0.25",
"@types/react-test-renderer": "^17.0.9",
"antd": "^5.0.0",
"atob": "^2.1.2",
"babel-jest": "^29.6.4",
"dayjs": "^1.11.9",
"babel-jest": "^29.7.0",
"dayjs": "^1.11.10",
"esbuild": "^0.18.20",
"eslint": "^8.48.0",
"jest": "^29.6.4",
"jest-environment-jsdom": "^29.6.4",
"eslint": "^8.56.0",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-test-renderer": "^17.0.2",
"rimraf": "^5.0.1",
"rollup": "^3.29.0",
"rimraf": "^5.0.5",
"rollup": "^3.29.4",
"typescript": "^4.9.5"
},
"repository": {
Expand Down
4 changes: 1 addition & 3 deletions packages/antd/src/templates/ArrayFieldItemTemplate/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import Button from 'antd/lib/button';
import Col from 'antd/lib/col';
import Row from 'antd/lib/row';
import { Button, Col, Row } from 'antd';
import { ArrayFieldTemplateItemType, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';

const BTN_GRP_STYLE = {
Expand Down
121 changes: 57 additions & 64 deletions packages/antd/src/templates/ArrayFieldTemplate/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ import {
StrictRJSFSchema,
} from '@rjsf/utils';
import classNames from 'classnames';
import Col from 'antd/lib/col';
import Row from 'antd/lib/row';
import { ConfigConsumer, ConfigConsumerProps } from 'antd/lib/config-provider/context';
import { Col, Row, ConfigProvider } from 'antd';
import { useContext } from 'react';

const DESCRIPTION_COL_STYLE = {
paddingBottom: '8px',
Expand Down Expand Up @@ -63,70 +62,64 @@ export default function ArrayFieldTemplate<
} = registry.templates;
const { labelAlign = 'right', rowGutter = 24 } = formContext as GenericObjectType;

const { getPrefixCls } = useContext(ConfigProvider.ConfigContext);
const prefixCls = getPrefixCls('form');
const labelClsBasic = `${prefixCls}-item-label`;
const labelColClassName = classNames(
labelClsBasic,
labelAlign === 'left' && `${labelClsBasic}-left`
// labelCol.className,
);

return (
<ConfigConsumer>
{(configProps: ConfigConsumerProps) => {
const { getPrefixCls } = configProps;
const prefixCls = getPrefixCls('form');
const labelClsBasic = `${prefixCls}-item-label`;
const labelColClassName = classNames(
labelClsBasic,
labelAlign === 'left' && `${labelClsBasic}-left`
// labelCol.className,
);
<fieldset className={className} id={idSchema.$id}>
<Row gutter={rowGutter}>
{(uiOptions.title || title) && (
<Col className={labelColClassName} span={24}>
<ArrayFieldTitleTemplate
idSchema={idSchema}
required={required}
title={uiOptions.title || title}
schema={schema}
uiSchema={uiSchema}
registry={registry}
/>
</Col>
)}
{(uiOptions.description || schema.description) && (
<Col span={24} style={DESCRIPTION_COL_STYLE}>
<ArrayFieldDescriptionTemplate
description={uiOptions.description || schema.description}
idSchema={idSchema}
schema={schema}
uiSchema={uiSchema}
registry={registry}
/>
</Col>
)}
<Col className='row array-item-list' span={24}>
{items &&
items.map(({ key, ...itemProps }: ArrayFieldTemplateItemType<T, S, F>) => (
<ArrayFieldItemTemplate key={key} {...itemProps} />
))}
</Col>

return (
<fieldset className={className} id={idSchema.$id}>
<Row gutter={rowGutter}>
{(uiOptions.title || title) && (
<Col className={labelColClassName} span={24}>
<ArrayFieldTitleTemplate
idSchema={idSchema}
required={required}
title={uiOptions.title || title}
schema={schema}
uiSchema={uiSchema}
registry={registry}
/>
</Col>
)}
{(uiOptions.description || schema.description) && (
<Col span={24} style={DESCRIPTION_COL_STYLE}>
<ArrayFieldDescriptionTemplate
description={uiOptions.description || schema.description}
idSchema={idSchema}
schema={schema}
uiSchema={uiSchema}
registry={registry}
/>
</Col>
)}
<Col className='row array-item-list' span={24}>
{items &&
items.map(({ key, ...itemProps }: ArrayFieldTemplateItemType<T, S, F>) => (
<ArrayFieldItemTemplate key={key} {...itemProps} />
))}
{canAdd && (
<Col span={24}>
<Row gutter={rowGutter} justify='end'>
<Col flex='192px'>
<AddButton
className='array-item-add'
disabled={disabled || readonly}
onClick={onAddClick}
uiSchema={uiSchema}
registry={registry}
/>
</Col>

{canAdd && (
<Col span={24}>
<Row gutter={rowGutter} justify='end'>
<Col flex='192px'>
<AddButton
className='array-item-add'
disabled={disabled || readonly}
onClick={onAddClick}
uiSchema={uiSchema}
registry={registry}
/>
</Col>
</Row>
</Col>
)}
</Row>
</fieldset>
);
}}
</ConfigConsumer>
</Col>
)}
</Row>
</fieldset>
);
}
3 changes: 1 addition & 2 deletions packages/antd/src/templates/BaseInputTemplate/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { ChangeEvent, FocusEvent } from 'react';
import Input from 'antd/lib/input';
import InputNumber from 'antd/lib/input-number';
import { Input, InputNumber } from 'antd';
import {
ariaDescribedByIds,
BaseInputTemplateProps,
Expand Down
4 changes: 1 addition & 3 deletions packages/antd/src/templates/ErrorList/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import Alert from 'antd/lib/alert';
import List from 'antd/lib/list';
import Space from 'antd/lib/space';
import { Alert, List, Space } from 'antd';
import ExclamationCircleOutlined from '@ant-design/icons/ExclamationCircleOutlined';
import { ErrorListProps, FormContextType, RJSFSchema, StrictRJSFSchema, TranslatableString } from '@rjsf/utils';

Expand Down
2 changes: 1 addition & 1 deletion packages/antd/src/templates/FieldTemplate/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Form from 'antd/lib/form';
import { Form } from 'antd';
import {
FieldTemplateProps,
FormContextType,
Expand Down
4 changes: 2 additions & 2 deletions packages/antd/src/templates/IconButton/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Button, { ButtonProps, ButtonType } from 'antd/lib/button';
import { Button, ButtonProps } from 'antd';
import ArrowDownOutlined from '@ant-design/icons/ArrowDownOutlined';
import ArrowUpOutlined from '@ant-design/icons/ArrowUpOutlined';
import CopyOutlined from '@ant-design/icons/CopyOutlined';
Expand Down Expand Up @@ -28,7 +28,7 @@ export default function IconButton<T = any, S extends StrictRJSFSchema = RJSFSch
return (
<Button
onClick={onClick as MouseEventHandler<HTMLAnchorElement> & MouseEventHandler<HTMLButtonElement>}
type={iconType as ButtonType}
type={iconType as ButtonProps['type']}
icon={icon}
{...otherProps}
/>
Expand Down
Loading