@rjsf/mui 6.5.3 → 6.6.1
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.cjs +203 -203
- package/dist/index.cjs.map +4 -4
- package/dist/mui.esm.js +207 -207
- package/dist/mui.esm.js.map +4 -4
- package/dist/mui.umd.js +149 -149
- package/lib/AddButton/AddButton.js.map +1 -1
- package/lib/ArrayFieldItemTemplate/ArrayFieldItemTemplate.js.map +1 -1
- package/lib/ArrayFieldTemplate/ArrayFieldTemplate.js.map +1 -1
- package/lib/BaseInputTemplate/BaseInputTemplate.js +2 -2
- package/lib/BaseInputTemplate/BaseInputTemplate.js.map +1 -1
- package/lib/CheckboxWidget/CheckboxWidget.js.map +1 -1
- package/lib/CheckboxesWidget/CheckboxesWidget.js.map +1 -1
- package/lib/DescriptionField/DescriptionField.js +1 -1
- package/lib/DescriptionField/DescriptionField.js.map +1 -1
- package/lib/ErrorList/ErrorList.js.map +1 -1
- package/lib/FieldErrorTemplate/FieldErrorTemplate.d.ts +1 -1
- package/lib/FieldErrorTemplate/FieldErrorTemplate.js +1 -1
- package/lib/FieldErrorTemplate/FieldErrorTemplate.js.map +1 -1
- package/lib/FieldHelpTemplate/FieldHelpTemplate.d.ts +1 -1
- package/lib/FieldHelpTemplate/FieldHelpTemplate.js +1 -1
- package/lib/FieldHelpTemplate/FieldHelpTemplate.js.map +1 -1
- package/lib/FieldTemplate/FieldTemplate.js.map +1 -1
- package/lib/IconButton/IconButton.js +2 -2
- package/lib/IconButton/IconButton.js.map +1 -1
- package/lib/MultiSchemaFieldTemplate/MultiSchemaFieldTemplate.js.map +1 -1
- package/lib/ObjectFieldTemplate/ObjectFieldTemplate.js.map +1 -1
- package/lib/OptionalDataControlsTemplate/OptionalDataControlsTemplate.js +1 -1
- package/lib/OptionalDataControlsTemplate/OptionalDataControlsTemplate.js.map +1 -1
- package/lib/RadioWidget/RadioWidget.js.map +1 -1
- package/lib/RangeWidget/RangeWidget.js.map +1 -1
- package/lib/SelectWidget/SelectWidget.js.map +1 -1
- package/lib/SubmitButton/SubmitButton.js.map +1 -1
- package/lib/Templates/Templates.js +1 -1
- package/lib/Templates/Templates.js.map +1 -1
- package/lib/Theme/Theme.d.ts +1 -1
- package/lib/TitleField/TitleField.js.map +1 -1
- package/lib/Widgets/Widgets.js +1 -1
- package/lib/Widgets/Widgets.js.map +1 -1
- package/lib/WrapIfAdditionalTemplate/WrapIfAdditionalTemplate.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/util.d.ts +1 -1
- package/lib/util.js.map +1 -1
- package/package.json +17 -17
- package/src/AddButton/AddButton.tsx +1 -0
- package/src/ArrayFieldItemTemplate/ArrayFieldItemTemplate.tsx +1 -0
- package/src/ArrayFieldTemplate/ArrayFieldTemplate.tsx +1 -0
- package/src/BaseInputTemplate/BaseInputTemplate.tsx +4 -3
- package/src/CheckboxWidget/CheckboxWidget.tsx +1 -0
- package/src/CheckboxesWidget/CheckboxesWidget.tsx +1 -0
- package/src/DescriptionField/DescriptionField.tsx +2 -1
- package/src/ErrorList/ErrorList.tsx +1 -0
- package/src/FieldErrorTemplate/FieldErrorTemplate.tsx +2 -1
- package/src/FieldHelpTemplate/FieldHelpTemplate.tsx +2 -1
- package/src/FieldTemplate/FieldTemplate.tsx +1 -0
- package/src/IconButton/IconButton.tsx +3 -2
- package/src/MultiSchemaFieldTemplate/MultiSchemaFieldTemplate.tsx +1 -0
- package/src/ObjectFieldTemplate/ObjectFieldTemplate.tsx +1 -0
- package/src/OptionalDataControlsTemplate/OptionalDataControlsTemplate.tsx +1 -1
- package/src/RadioWidget/RadioWidget.tsx +1 -0
- package/src/RangeWidget/RangeWidget.tsx +1 -0
- package/src/SelectWidget/SelectWidget.tsx +3 -2
- package/src/SubmitButton/SubmitButton.tsx +1 -0
- package/src/Templates/Templates.ts +1 -1
- package/src/Theme/Theme.tsx +1 -1
- package/src/TitleField/TitleField.tsx +1 -0
- package/src/Widgets/Widgets.ts +1 -1
- package/src/WrapIfAdditionalTemplate/WrapIfAdditionalTemplate.tsx +1 -0
- package/src/tsconfig.json +0 -1
- package/src/util.ts +1 -2
package/lib/util.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { FormContextType, RJSFSchema, StrictRJSFSchema, UIOptionsType, GenericObjectType } from '@rjsf/utils';
|
|
2
1
|
import { BoxProps, FormHelperTextProps, GridProps, PaperProps, SxProps, TypographyProps } from '@mui/material';
|
|
2
|
+
import { FormContextType, RJSFSchema, StrictRJSFSchema, UIOptionsType, GenericObjectType } from '@rjsf/utils';
|
|
3
3
|
/**
|
|
4
4
|
* Extract props meant for MUI components from the `options` field of the `uiSchema`.
|
|
5
5
|
* @param {UIOptionsType} options - The options from the uiSchema
|
package/lib/util.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.js","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"util.js","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":"AAGA;;;;;;GAMG;AACH,MAAM,UAAU,WAAW,CAKzB,OAA+B,EAAE,aAAwB,EAAE,iBAA2B;IACtF,MAAM,QAAQ,GAAG,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,GAAS,KAAK,EAAQ,CAAC;IAClD,IAAI,iBAAiB,EAAE,CAAC;QACtB,MAAM,EAAE,aAAa,EAAE,GAAG,QAAe,CAAC;QAC1C,OAAO,EAAE,aAAa,EAAkB,CAAC;IAC3C,CAAC;IACD,IAAI,aAAa,EAAE,CAAC;QAClB,OAAO,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC;aACzB,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,aAAa,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;aAC5C,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;YACnB,GAAG,CAAC,GAAc,CAAC,GAAG,QAAQ,CAAC,GAAc,CAAC,CAAC;YAC/C,OAAO,GAAG,CAAC;QACb,CAAC,EAAE,EAAO,CAAC,CAAC;IAChB,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC;AAwBD,MAAM,UAAU,cAAc,CAE5B,OAAgB,EAAE,QAAmB;IACrC,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,OAAO,OAAO,CAAC;IACjB,CAAC;IACD,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,EAAE,CAAC,EAAE,CAAC;QAChC,OAAO,CAAC,OAAO,EAAE,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IACnC,CAAC;IACD,OAAO,EAAE,GAAG,OAAO,EAAE,GAAG,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,EAAE,EAAoB,CAAC;AAC3D,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rjsf/mui",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.6.1",
|
|
4
4
|
"main": "./dist/index.cjs",
|
|
5
5
|
"module": "./lib/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -44,16 +44,17 @@
|
|
|
44
44
|
"build:esm": "esbuild ./src/index.ts --bundle --outfile=dist/mui.esm.js --sourcemap --packages=external --format=esm",
|
|
45
45
|
"build:umd": "rollup dist/mui.esm.js --format=umd --file=dist/mui.umd.js --name=@rjsf/mui",
|
|
46
46
|
"build": "npm run build:ts && npm run build:cjs && npm run build:esm && npm run build:umd",
|
|
47
|
-
"cs-check": "
|
|
48
|
-
"cs-format": "
|
|
49
|
-
"lint": "
|
|
47
|
+
"cs-check": "oxfmt --check \"{src,test}/**/*.{ts,tsx}\"",
|
|
48
|
+
"cs-format": "oxfmt \"{src,test}/**/*.{ts,tsx}\"",
|
|
49
|
+
"lint": "oxlint src test",
|
|
50
50
|
"precommit": "lint-staged",
|
|
51
|
-
"test": "
|
|
52
|
-
"test:update": "
|
|
51
|
+
"test": "vitest run",
|
|
52
|
+
"test:update": "vitest run --update-snapshots"
|
|
53
53
|
},
|
|
54
54
|
"lint-staged": {
|
|
55
|
-
"{src,test}/**/*.ts
|
|
56
|
-
"
|
|
55
|
+
"{src,test}/**/*.{ts,tsx}": [
|
|
56
|
+
"oxlint --fix",
|
|
57
|
+
"oxfmt"
|
|
57
58
|
]
|
|
58
59
|
},
|
|
59
60
|
"engines": {
|
|
@@ -64,21 +65,20 @@
|
|
|
64
65
|
"@emotion/styled": "^11.6.0",
|
|
65
66
|
"@mui/icons-material": "^7.0.0 || ^9.0.0",
|
|
66
67
|
"@mui/material": "^7.0.0 || ^9.0.0",
|
|
67
|
-
"@rjsf/core": "^6.
|
|
68
|
-
"@rjsf/utils": "^6.
|
|
68
|
+
"@rjsf/core": "^6.6.x",
|
|
69
|
+
"@rjsf/utils": "^6.6.x",
|
|
69
70
|
"react": ">=18"
|
|
70
71
|
},
|
|
71
72
|
"devDependencies": {
|
|
72
73
|
"@emotion/jest": "^11.14.2",
|
|
73
74
|
"@emotion/react": "^11.14.0",
|
|
74
75
|
"@emotion/styled": "^11.14.1",
|
|
75
|
-
"@mui/icons-material": "^9.0.
|
|
76
|
-
"@mui/material": "^9.0.
|
|
77
|
-
"@rjsf/core": "6.
|
|
78
|
-
"@rjsf/snapshot-tests": "6.
|
|
79
|
-
"@rjsf/utils": "6.
|
|
80
|
-
"@rjsf/validator-ajv8": "6.
|
|
81
|
-
"eslint": "^8.57.1"
|
|
76
|
+
"@mui/icons-material": "^9.0.1",
|
|
77
|
+
"@mui/material": "^9.0.1",
|
|
78
|
+
"@rjsf/core": "6.6.1",
|
|
79
|
+
"@rjsf/snapshot-tests": "6.6.1",
|
|
80
|
+
"@rjsf/utils": "6.6.1",
|
|
81
|
+
"@rjsf/validator-ajv8": "6.6.1"
|
|
82
82
|
},
|
|
83
83
|
"publishConfig": {
|
|
84
84
|
"access": "public"
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { ChangeEvent, FocusEvent, MouseEvent, useCallback } from 'react';
|
|
2
|
-
import TextField, { TextFieldProps } from '@mui/material/TextField';
|
|
3
|
-
import InputAdornment from '@mui/material/InputAdornment';
|
|
4
2
|
import { InputProps as MuiInputProps } from '@mui/material/Input';
|
|
3
|
+
import InputAdornment from '@mui/material/InputAdornment';
|
|
5
4
|
import { InputLabelProps as MuiInputLabelProps } from '@mui/material/InputLabel';
|
|
5
|
+
import TextField, { TextFieldProps } from '@mui/material/TextField';
|
|
6
|
+
import { SchemaExamples } from '@rjsf/core';
|
|
6
7
|
import {
|
|
7
8
|
ariaDescribedByIds,
|
|
8
9
|
BaseInputTemplateProps,
|
|
@@ -14,7 +15,7 @@ import {
|
|
|
14
15
|
RJSFSchema,
|
|
15
16
|
StrictRJSFSchema,
|
|
16
17
|
} from '@rjsf/utils';
|
|
17
|
-
|
|
18
|
+
|
|
18
19
|
import { getMuiProps } from '../util';
|
|
19
20
|
|
|
20
21
|
/** Properties available for the MUI `ui:options` of the BaseInputTemplate.
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import Typography, { TypographyProps } from '@mui/material/Typography';
|
|
2
|
+
import { RichDescription } from '@rjsf/core';
|
|
2
3
|
import {
|
|
3
4
|
DescriptionFieldProps,
|
|
4
5
|
FormContextType,
|
|
@@ -7,7 +8,7 @@ import {
|
|
|
7
8
|
StrictRJSFSchema,
|
|
8
9
|
getUiOptions,
|
|
9
10
|
} from '@rjsf/utils';
|
|
10
|
-
|
|
11
|
+
|
|
11
12
|
import { computeSxProps, getMuiProps } from '../util';
|
|
12
13
|
|
|
13
14
|
/** Properties available for the `rjsfSlotProps` target of the DescriptionField. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import ListItem, { ListItemProps } from '@mui/material/ListItem';
|
|
2
1
|
import FormHelperText, { FormHelperTextProps } from '@mui/material/FormHelperText';
|
|
3
2
|
import List, { ListProps } from '@mui/material/List';
|
|
3
|
+
import ListItem, { ListItemProps } from '@mui/material/ListItem';
|
|
4
4
|
import {
|
|
5
5
|
errorId,
|
|
6
6
|
FieldErrorProps,
|
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
StrictRJSFSchema,
|
|
11
11
|
getUiOptions,
|
|
12
12
|
} from '@rjsf/utils';
|
|
13
|
+
|
|
13
14
|
import { getMuiProps } from '../util';
|
|
14
15
|
|
|
15
16
|
/** Properties available for the `rjsfSlotProps` target of the FieldErrorTemplate. */
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import FormHelperText, { FormHelperTextProps } from '@mui/material/FormHelperText';
|
|
1
2
|
import { RichHelp } from '@rjsf/core';
|
|
2
3
|
import {
|
|
3
4
|
helpId,
|
|
@@ -8,7 +9,7 @@ import {
|
|
|
8
9
|
getUiOptions,
|
|
9
10
|
GenericObjectType,
|
|
10
11
|
} from '@rjsf/utils';
|
|
11
|
-
|
|
12
|
+
|
|
12
13
|
import { computeSxProps, getMuiProps } from '../util';
|
|
13
14
|
|
|
14
15
|
/** Properties available for the `rjsfSlotProps` target of the FieldHelpTemplate. */
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import IconButton, { IconButtonProps as MuiIconButtonProps } from '@mui/material/IconButton';
|
|
2
1
|
import ArrowDownwardIcon from '@mui/icons-material/ArrowDownward';
|
|
3
2
|
import ArrowUpwardIcon from '@mui/icons-material/ArrowUpward';
|
|
3
|
+
import ClearIcon from '@mui/icons-material/Clear';
|
|
4
4
|
import CopyIcon from '@mui/icons-material/ContentCopy';
|
|
5
5
|
import RemoveIcon from '@mui/icons-material/Remove';
|
|
6
|
-
import
|
|
6
|
+
import IconButton, { IconButtonProps as MuiIconButtonProps } from '@mui/material/IconButton';
|
|
7
7
|
import {
|
|
8
8
|
FormContextType,
|
|
9
9
|
IconButtonProps,
|
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
TranslatableString,
|
|
13
13
|
getUiOptions,
|
|
14
14
|
} from '@rjsf/utils';
|
|
15
|
+
|
|
15
16
|
import { getMuiProps } from '../util';
|
|
16
17
|
|
|
17
18
|
export default function MuiIconButton<
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import AddIcon from '@mui/icons-material/Add';
|
|
1
2
|
import { FormContextType, OptionalDataControlsTemplateProps, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
|
|
2
3
|
|
|
3
4
|
import IconButton, { RemoveButton } from '../IconButton';
|
|
4
|
-
import AddIcon from '@mui/icons-material/Add';
|
|
5
5
|
|
|
6
6
|
/** The OptionalDataControlsTemplate renders one of three different states. If
|
|
7
7
|
* there is an `onAddClick()` function, it renders the "Add" button. If there is
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ChangeEvent, FocusEvent } from 'react';
|
|
2
|
-
import MenuItem from '@mui/material/MenuItem';
|
|
3
|
-
import TextField, { TextFieldProps } from '@mui/material/TextField';
|
|
4
2
|
import { InputLabelProps as MuiInputLabelProps } from '@mui/material/InputLabel';
|
|
3
|
+
import MenuItem from '@mui/material/MenuItem';
|
|
5
4
|
import { SelectProps as MuiSelectProps } from '@mui/material/Select';
|
|
5
|
+
import TextField, { TextFieldProps } from '@mui/material/TextField';
|
|
6
6
|
import {
|
|
7
7
|
ariaDescribedByIds,
|
|
8
8
|
enumOptionSelectedValue,
|
|
@@ -16,6 +16,7 @@ import {
|
|
|
16
16
|
StrictRJSFSchema,
|
|
17
17
|
WidgetProps,
|
|
18
18
|
} from '@rjsf/utils';
|
|
19
|
+
|
|
19
20
|
import { getMuiProps } from '../util';
|
|
20
21
|
|
|
21
22
|
/** Properties available for the `rjsfSlotProps` target of the SelectWidget. */
|
|
@@ -6,11 +6,11 @@ import ArrayFieldTemplate from '../ArrayFieldTemplate';
|
|
|
6
6
|
import BaseInputTemplate from '../BaseInputTemplate';
|
|
7
7
|
import DescriptionField from '../DescriptionField';
|
|
8
8
|
import ErrorList from '../ErrorList';
|
|
9
|
-
import { CopyButton, MoveDownButton, MoveUpButton, RemoveButton, ClearButton } from '../IconButton';
|
|
10
9
|
import FieldErrorTemplate from '../FieldErrorTemplate';
|
|
11
10
|
import FieldHelpTemplate from '../FieldHelpTemplate';
|
|
12
11
|
import FieldTemplate from '../FieldTemplate';
|
|
13
12
|
import GridTemplate from '../GridTemplate';
|
|
13
|
+
import { CopyButton, MoveDownButton, MoveUpButton, RemoveButton, ClearButton } from '../IconButton';
|
|
14
14
|
import MultiSchemaFieldTemplate from '../MultiSchemaFieldTemplate';
|
|
15
15
|
import ObjectFieldTemplate from '../ObjectFieldTemplate';
|
|
16
16
|
import OptionalDataControlsTemplate from '../OptionalDataControlsTemplate';
|
package/src/Theme/Theme.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
|
|
2
1
|
import { ThemeProps } from '@rjsf/core';
|
|
2
|
+
import { FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
|
|
3
3
|
|
|
4
4
|
import { generateTemplates } from '../Templates';
|
|
5
5
|
import { generateWidgets } from '../Widgets';
|
package/src/Widgets/Widgets.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FormContextType, RegistryWidgetsType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
|
|
2
2
|
|
|
3
|
-
import CheckboxWidget from '../CheckboxWidget/CheckboxWidget';
|
|
4
3
|
import CheckboxesWidget from '../CheckboxesWidget/CheckboxesWidget';
|
|
4
|
+
import CheckboxWidget from '../CheckboxWidget/CheckboxWidget';
|
|
5
5
|
import RadioWidget from '../RadioWidget/RadioWidget';
|
|
6
6
|
import RangeWidget from '../RangeWidget/RangeWidget';
|
|
7
7
|
import SelectWidget from '../SelectWidget/SelectWidget';
|
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
WrapIfAdditionalTemplateProps,
|
|
13
13
|
getUiOptions,
|
|
14
14
|
} from '@rjsf/utils';
|
|
15
|
+
|
|
15
16
|
import { computeSxProps, getMuiProps } from '../util';
|
|
16
17
|
/** Properties available for the `rjsfSlotProps` target of the WrapIfAdditionalTemplate. */
|
|
17
18
|
export interface WrapIfAdditionalTemplateMuiProps extends GenericObjectType {
|
package/src/tsconfig.json
CHANGED
package/src/util.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { FormContextType, RJSFSchema, StrictRJSFSchema, UIOptionsType, GenericObjectType } from '@rjsf/utils';
|
|
2
|
-
|
|
3
1
|
import { BoxProps, FormHelperTextProps, GridProps, PaperProps, SxProps, TypographyProps } from '@mui/material';
|
|
2
|
+
import { FormContextType, RJSFSchema, StrictRJSFSchema, UIOptionsType, GenericObjectType } from '@rjsf/utils';
|
|
4
3
|
|
|
5
4
|
/**
|
|
6
5
|
* Extract props meant for MUI components from the `options` field of the `uiSchema`.
|