@jsonforms/material-renderers 3.4.0-alpha.0 → 3.4.0-alpha.2

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.
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
2
  import { EnumCellProps, WithClassname } from '@jsonforms/core';
3
3
  import { TranslateProps } from '@jsonforms/react';
4
- import { WithInputProps } from '../util';
5
- export declare const MuiSelect: React.NamedExoticComponent<EnumCellProps & WithClassname & TranslateProps & WithInputProps>;
4
+ import { WithInputProps, WithSelectProps } from '../util';
5
+ export declare const MuiSelect: React.NamedExoticComponent<EnumCellProps & WithClassname & TranslateProps & WithInputProps & WithSelectProps>;
@@ -12,6 +12,9 @@ export interface JsonFormsTheme extends Theme {
12
12
  export interface WithInputProps {
13
13
  label?: string;
14
14
  }
15
+ export interface WithSelectProps {
16
+ multiple?: boolean;
17
+ }
15
18
  export declare const defaultInputVariant: TextFieldProps['variant'];
16
19
  export declare function useInputVariant(): TextFieldProps['variant'];
17
20
  export declare function useInputComponent(): React.JSXElementConstructor<InputBaseProps & WithInputProps>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsonforms/material-renderers",
3
- "version": "3.4.0-alpha.0",
3
+ "version": "3.4.0-alpha.2",
4
4
  "description": "Material Renderer Set for JSON Forms",
5
5
  "repository": "https://github.com/eclipsesource/jsonforms",
6
6
  "bugs": "https://github.com/eclipsesource/jsonforms/issues",
@@ -73,11 +73,11 @@
73
73
  "peerDependencies": {
74
74
  "@emotion/react": "^11.4.1",
75
75
  "@emotion/styled": "^11.3.0",
76
- "@jsonforms/core": "3.4.0-alpha.0",
77
- "@jsonforms/react": "3.4.0-alpha.0",
76
+ "@jsonforms/core": "3.4.0-alpha.2",
77
+ "@jsonforms/react": "3.4.0-alpha.2",
78
78
  "@mui/icons-material": "^5.11.16",
79
79
  "@mui/material": "^5.13.0",
80
- "@mui/x-date-pickers": "^6.0.0",
80
+ "@mui/x-date-pickers": "^6.0.0 || ^7.0.0",
81
81
  "react": "^16.12.0 || ^17.0.0 || ^18.0.0"
82
82
  },
83
83
  "devDependencies": {
@@ -85,7 +85,7 @@
85
85
  "@emotion/styled": "^11.3.0",
86
86
  "@mui/icons-material": "^5.11.16",
87
87
  "@mui/material": "~5.13.0",
88
- "@mui/x-date-pickers": "^6.5.0",
88
+ "@mui/x-date-pickers": "^7.7.1",
89
89
  "@rollup/plugin-commonjs": "^23.0.3",
90
90
  "@rollup/plugin-json": "^5.0.2",
91
91
  "@rollup/plugin-node-resolve": "^15.0.1",
@@ -126,8 +126,8 @@
126
126
  "webpack": "^5.78.0",
127
127
  "webpack-cli": "^5.1.4",
128
128
  "webpack-dev-server": "^4.15.1",
129
- "@jsonforms/core": "3.4.0-alpha.0",
130
- "@jsonforms/react": "3.4.0-alpha.0"
129
+ "@jsonforms/react": "3.4.0-alpha.2",
130
+ "@jsonforms/core": "3.4.0-alpha.2"
131
131
  },
132
132
  "scripts": {
133
133
  "build": "rollup -c rollup.config.js",
@@ -33,7 +33,7 @@ import {
33
33
  ListItemText,
34
34
  Tooltip,
35
35
  } from '@mui/material';
36
- import { Delete as DeleteIcon } from '@mui/icons-material';
36
+ import DeleteIcon from '@mui/icons-material/Delete';
37
37
  import React from 'react';
38
38
 
39
39
  export const ListWithDetailMasterItem = ({
@@ -57,11 +57,9 @@ import {
57
57
  encode,
58
58
  ArrayTranslations,
59
59
  } from '@jsonforms/core';
60
- import {
61
- Delete as DeleteIcon,
62
- ArrowDownward,
63
- ArrowUpward,
64
- } from '@mui/icons-material';
60
+ import DeleteIcon from '@mui/icons-material/Delete';
61
+ import ArrowDownward from '@mui/icons-material/ArrowDownward';
62
+ import ArrowUpward from '@mui/icons-material/ArrowUpward';
65
63
 
66
64
  import { WithDeleteDialogSupport } from './DeleteDialog';
67
65
  import NoBorderTableCell from './NoBorderTableCell';
@@ -38,7 +38,7 @@ import {
38
38
  FormHelperText,
39
39
  Stack,
40
40
  } from '@mui/material';
41
- import { Add as AddIcon } from '@mui/icons-material';
41
+ import AddIcon from '@mui/icons-material/Add';
42
42
  import ValidationIcon from './ValidationIcon';
43
43
  import NoBorderTableCell from './NoBorderTableCell';
44
44
 
@@ -24,7 +24,7 @@
24
24
  */
25
25
  import React from 'react';
26
26
 
27
- import { ErrorOutline as ErrorOutlineIcon } from '@mui/icons-material';
27
+ import ErrorOutlineIcon from '@mui/icons-material/ErrorOutline';
28
28
  import { Badge, Tooltip, styled } from '@mui/material';
29
29
 
30
30
  const StyledBadge = styled(Badge)(({ theme }: any) => ({
@@ -40,12 +40,10 @@ import {
40
40
  IconButton,
41
41
  Tooltip,
42
42
  } from '@mui/material';
43
- import {
44
- ExpandMore as ExpandMoreIcon,
45
- Delete as DeleteIcon,
46
- ArrowUpward,
47
- ArrowDownward,
48
- } from '@mui/icons-material';
43
+ import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
44
+ import ArrowUpward from '@mui/icons-material/ArrowUpward';
45
+ import ArrowDownward from '@mui/icons-material/ArrowDownward';
46
+ import DeleteIcon from '@mui/icons-material/Delete';
49
47
 
50
48
  const iconStyle: any = { float: 'right' };
51
49
 
@@ -32,7 +32,7 @@ import {
32
32
  useTheme,
33
33
  } from '@mui/material';
34
34
  import merge from 'lodash/merge';
35
- import { Close } from '@mui/icons-material';
35
+ import Close from '@mui/icons-material/Close';
36
36
  import {
37
37
  JsonFormsTheme,
38
38
  WithInputProps,
@@ -28,10 +28,14 @@ import { EnumCellProps, WithClassname } from '@jsonforms/core';
28
28
  import { MenuItem, Select } from '@mui/material';
29
29
  import merge from 'lodash/merge';
30
30
  import { TranslateProps } from '@jsonforms/react';
31
- import { i18nDefaults, WithInputProps } from '../util';
31
+ import { i18nDefaults, WithInputProps, WithSelectProps } from '../util';
32
32
 
33
33
  export const MuiSelect = React.memo(function MuiSelect(
34
- props: EnumCellProps & WithClassname & TranslateProps & WithInputProps
34
+ props: EnumCellProps &
35
+ WithClassname &
36
+ TranslateProps &
37
+ WithInputProps &
38
+ WithSelectProps
35
39
  ) {
36
40
  const {
37
41
  data,
@@ -46,6 +50,7 @@ export const MuiSelect = React.memo(function MuiSelect(
46
50
  config,
47
51
  label,
48
52
  t,
53
+ multiple,
49
54
  } = props;
50
55
  const appliedUiSchemaOptions = merge({}, config, uischema.options);
51
56
  const noneOptionLabel = useMemo(
@@ -63,6 +68,7 @@ export const MuiSelect = React.memo(function MuiSelect(
63
68
  value={data !== undefined ? data : ''}
64
69
  onChange={(ev) => handleChange(path, ev.target.value || undefined)}
65
70
  fullWidth={true}
71
+ multiple={multiple || false}
66
72
  >
67
73
  {[
68
74
  <MenuItem value={''} key='jsonforms.enum.none'>
package/src/util/theme.ts CHANGED
@@ -46,6 +46,10 @@ export interface WithInputProps {
46
46
  label?: string;
47
47
  }
48
48
 
49
+ export interface WithSelectProps {
50
+ multiple?: boolean;
51
+ }
52
+
49
53
  const variantToInput = {
50
54
  standard: Input,
51
55
  filled: FilledInput,