@rjsf/mui 5.18.4 → 5.18.6
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/README.md +1 -1
- package/dist/index.js +13 -13
- package/dist/index.js.map +3 -3
- package/dist/mui.esm.js +13 -13
- package/dist/mui.esm.js.map +3 -3
- package/dist/mui.umd.js +13 -13
- package/lib/BaseInputTemplate/BaseInputTemplate.js +2 -2
- package/lib/BaseInputTemplate/BaseInputTemplate.js.map +1 -1
- package/lib/CheckboxWidget/CheckboxWidget.js +2 -2
- package/lib/CheckboxWidget/CheckboxWidget.js.map +1 -1
- package/lib/CheckboxesWidget/CheckboxesWidget.js +2 -2
- package/lib/CheckboxesWidget/CheckboxesWidget.js.map +1 -1
- package/lib/RadioWidget/RadioWidget.js +2 -2
- package/lib/RadioWidget/RadioWidget.js.map +1 -1
- package/lib/RangeWidget/RangeWidget.js +2 -2
- package/lib/RangeWidget/RangeWidget.js.map +1 -1
- package/lib/SelectWidget/SelectWidget.js +2 -2
- package/lib/SelectWidget/SelectWidget.js.map +1 -1
- package/lib/WrapIfAdditionalTemplate/WrapIfAdditionalTemplate.js +1 -1
- package/lib/WrapIfAdditionalTemplate/WrapIfAdditionalTemplate.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +6 -6
- package/src/BaseInputTemplate/BaseInputTemplate.tsx +2 -2
- package/src/CheckboxWidget/CheckboxWidget.tsx +2 -2
- package/src/CheckboxesWidget/CheckboxesWidget.tsx +4 -4
- package/src/RadioWidget/RadioWidget.tsx +4 -4
- package/src/RangeWidget/RangeWidget.tsx +2 -2
- package/src/SelectWidget/SelectWidget.tsx +4 -4
- package/src/WrapIfAdditionalTemplate/WrapIfAdditionalTemplate.tsx +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rjsf/mui",
|
|
3
|
-
"version": "5.18.
|
|
3
|
+
"version": "5.18.6",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"module": "./lib/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -53,10 +53,10 @@
|
|
|
53
53
|
"@mui/base": "5.0.0-beta.28",
|
|
54
54
|
"@mui/icons-material": "5.15.2",
|
|
55
55
|
"@mui/material": "5.15.2",
|
|
56
|
-
"@rjsf/core": "^5.18.
|
|
57
|
-
"@rjsf/snapshot-tests": "^5.18.
|
|
58
|
-
"@rjsf/utils": "^5.18.
|
|
59
|
-
"@rjsf/validator-ajv8": "^5.18.
|
|
56
|
+
"@rjsf/core": "^5.18.6",
|
|
57
|
+
"@rjsf/snapshot-tests": "^5.18.6",
|
|
58
|
+
"@rjsf/utils": "^5.18.6",
|
|
59
|
+
"@rjsf/validator-ajv8": "^5.18.6",
|
|
60
60
|
"@types/jest": "^29.5.12",
|
|
61
61
|
"@types/react": "^18.2.58",
|
|
62
62
|
"@types/react-dom": "^18.2.19",
|
|
@@ -100,5 +100,5 @@
|
|
|
100
100
|
"url": "git+https://github.com/rjsf-team/react-jsonschema-form.git"
|
|
101
101
|
},
|
|
102
102
|
"license": "Apache-2.0",
|
|
103
|
-
"gitHead": "
|
|
103
|
+
"gitHead": "e0bafbf664e57002a444c849417ce95a2ffd260b"
|
|
104
104
|
}
|
|
@@ -65,8 +65,8 @@ export default function BaseInputTemplate<
|
|
|
65
65
|
};
|
|
66
66
|
const _onChange = ({ target: { value } }: ChangeEvent<HTMLInputElement>) =>
|
|
67
67
|
onChange(value === '' ? options.emptyValue : value);
|
|
68
|
-
const _onBlur = ({ target
|
|
69
|
-
const _onFocus = ({ target
|
|
68
|
+
const _onBlur = ({ target }: FocusEvent<HTMLInputElement>) => onBlur(id, target && target.value);
|
|
69
|
+
const _onFocus = ({ target }: FocusEvent<HTMLInputElement>) => onFocus(id, target && target.value);
|
|
70
70
|
const DisplayInputLabelProps = TYPES_THAT_SHRINK_LABEL.includes(type)
|
|
71
71
|
? {
|
|
72
72
|
...InputLabelProps,
|
|
@@ -50,8 +50,8 @@ export default function CheckboxWidget<
|
|
|
50
50
|
const required = schemaRequiresTrueValue<S>(schema);
|
|
51
51
|
|
|
52
52
|
const _onChange = (_: any, checked: boolean) => onChange(checked);
|
|
53
|
-
const _onBlur = ({ target
|
|
54
|
-
const _onFocus = ({ target
|
|
53
|
+
const _onBlur = ({ target }: FocusEvent<HTMLButtonElement>) => onBlur(id, target && target.value);
|
|
54
|
+
const _onFocus = ({ target }: FocusEvent<HTMLButtonElement>) => onFocus(id, target && target.value);
|
|
55
55
|
const description = options.description ?? schema.description;
|
|
56
56
|
|
|
57
57
|
return (
|
|
@@ -53,10 +53,10 @@ export default function CheckboxesWidget<
|
|
|
53
53
|
}
|
|
54
54
|
};
|
|
55
55
|
|
|
56
|
-
const _onBlur = ({ target
|
|
57
|
-
onBlur(id, enumOptionsValueForIndex<S>(value, enumOptions, emptyValue));
|
|
58
|
-
const _onFocus = ({ target
|
|
59
|
-
onFocus(id, enumOptionsValueForIndex<S>(value, enumOptions, emptyValue));
|
|
56
|
+
const _onBlur = ({ target }: FocusEvent<HTMLButtonElement>) =>
|
|
57
|
+
onBlur(id, enumOptionsValueForIndex<S>(target && target.value, enumOptions, emptyValue));
|
|
58
|
+
const _onFocus = ({ target }: FocusEvent<HTMLButtonElement>) =>
|
|
59
|
+
onFocus(id, enumOptionsValueForIndex<S>(target && target.value, enumOptions, emptyValue));
|
|
60
60
|
|
|
61
61
|
return (
|
|
62
62
|
<>
|
|
@@ -36,10 +36,10 @@ export default function RadioWidget<T = any, S extends StrictRJSFSchema = RJSFSc
|
|
|
36
36
|
const { enumOptions, enumDisabled, emptyValue } = options;
|
|
37
37
|
|
|
38
38
|
const _onChange = (_: any, value: any) => onChange(enumOptionsValueForIndex<S>(value, enumOptions, emptyValue));
|
|
39
|
-
const _onBlur = ({ target
|
|
40
|
-
onBlur(id, enumOptionsValueForIndex<S>(value, enumOptions, emptyValue));
|
|
41
|
-
const _onFocus = ({ target
|
|
42
|
-
onFocus(id, enumOptionsValueForIndex<S>(value, enumOptions, emptyValue));
|
|
39
|
+
const _onBlur = ({ target }: FocusEvent<HTMLInputElement>) =>
|
|
40
|
+
onBlur(id, enumOptionsValueForIndex<S>(target && target.value, enumOptions, emptyValue));
|
|
41
|
+
const _onFocus = ({ target }: FocusEvent<HTMLInputElement>) =>
|
|
42
|
+
onFocus(id, enumOptionsValueForIndex<S>(target && target.value, enumOptions, emptyValue));
|
|
43
43
|
|
|
44
44
|
const row = options ? options.inline : false;
|
|
45
45
|
const selectedIndex = enumOptionsIndexForValue<S>(value, enumOptions) ?? null;
|
|
@@ -26,8 +26,8 @@ export default function RangeWidget<T = any, S extends StrictRJSFSchema = RJSFSc
|
|
|
26
26
|
const _onChange = (_: any, value?: number | number[]) => {
|
|
27
27
|
onChange(value ?? options.emptyValue);
|
|
28
28
|
};
|
|
29
|
-
const _onBlur = ({ target
|
|
30
|
-
const _onFocus = ({ target
|
|
29
|
+
const _onBlur = ({ target }: FocusEvent<HTMLInputElement>) => onBlur(id, target && target.value);
|
|
30
|
+
const _onFocus = ({ target }: FocusEvent<HTMLInputElement>) => onFocus(id, target && target.value);
|
|
31
31
|
|
|
32
32
|
return (
|
|
33
33
|
<>
|
|
@@ -55,10 +55,10 @@ export default function SelectWidget<
|
|
|
55
55
|
|
|
56
56
|
const _onChange = ({ target: { value } }: ChangeEvent<{ value: string }>) =>
|
|
57
57
|
onChange(enumOptionsValueForIndex<S>(value, enumOptions, optEmptyVal));
|
|
58
|
-
const _onBlur = ({ target
|
|
59
|
-
onBlur(id, enumOptionsValueForIndex<S>(value, enumOptions, optEmptyVal));
|
|
60
|
-
const _onFocus = ({ target
|
|
61
|
-
onFocus(id, enumOptionsValueForIndex<S>(value, enumOptions, optEmptyVal));
|
|
58
|
+
const _onBlur = ({ target }: FocusEvent<HTMLInputElement>) =>
|
|
59
|
+
onBlur(id, enumOptionsValueForIndex<S>(target && target.value, enumOptions, optEmptyVal));
|
|
60
|
+
const _onFocus = ({ target }: FocusEvent<HTMLInputElement>) =>
|
|
61
|
+
onFocus(id, enumOptionsValueForIndex<S>(target && target.value, enumOptions, optEmptyVal));
|
|
62
62
|
const selectedIndexes = enumOptionsIndexForValue<S>(value, enumOptions, multiple);
|
|
63
63
|
const { InputLabelProps, SelectProps, autocomplete, ...textFieldRemainingProps } = textFieldProps;
|
|
64
64
|
|
|
@@ -55,7 +55,7 @@ export default function WrapIfAdditionalTemplate<
|
|
|
55
55
|
);
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
const handleBlur = ({ target }: FocusEvent<HTMLInputElement>) => onKeyChange(target.value);
|
|
58
|
+
const handleBlur = ({ target }: FocusEvent<HTMLInputElement>) => onKeyChange(target && target.value);
|
|
59
59
|
|
|
60
60
|
return (
|
|
61
61
|
<Grid container key={`${id}-key`} alignItems='center' spacing={2} className={classNames} style={style}>
|