@dartech/arsenal-ui 1.3.87 → 1.3.89

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.
Files changed (2) hide show
  1. package/index.js +22 -9
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -70,8 +70,6 @@ import StepContent from '@mui/material/StepContent';
70
70
  import StepConnector from '@mui/material/StepConnector';
71
71
  import Select from '@mui/material/Select';
72
72
  import InputLabel from '@mui/material/InputLabel';
73
- import CheckCircleOutlineOutlinedIcon from '@mui/icons-material/CheckCircleOutlineOutlined';
74
- import BlockOutlinedIcon from '@mui/icons-material/BlockOutlined';
75
73
  import { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFns';
76
74
  import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider';
77
75
  import classnames from 'classnames';
@@ -3766,15 +3764,23 @@ const FileValueWidget = ({
3766
3764
  }, {
3767
3765
  children: [jsx(Typography, {
3768
3766
  children: "Does file uploaded:"
3769
- }), fileValue ? jsx(CheckCircleOutlineOutlinedIcon, {
3767
+ }), fileValue ? jsx(SvgIcon, Object.assign({
3770
3768
  sx: {
3771
3769
  paddingLeft: 2
3772
3770
  }
3773
- }) : jsx(BlockOutlinedIcon, {
3771
+ }, {
3772
+ children: jsx("path", {
3773
+ d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"
3774
+ })
3775
+ })) : jsx(SvgIcon, Object.assign({
3774
3776
  sx: {
3775
3777
  paddingLeft: 2
3776
3778
  }
3777
- })]
3779
+ }, {
3780
+ children: jsx("path", {
3781
+ d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20zm6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9z"
3782
+ })
3783
+ }))]
3778
3784
  })), jsxs(Button, Object.assign({
3779
3785
  component: "label",
3780
3786
  variant: "contained",
@@ -5150,7 +5156,10 @@ const CreatePropertiesList = ({
5150
5156
  control,
5151
5157
  name: fieldName,
5152
5158
  rules: {
5153
- required: required && 'Please, add properties'
5159
+ validate: val => {
5160
+ if (required && Array.isArray(val) && val.length === 0) return 'Please, fill the properties';
5161
+ return true;
5162
+ }
5154
5163
  }
5155
5164
  });
5156
5165
  const properties = useWatch({
@@ -5236,17 +5245,21 @@ const CreatePropertiesList = ({
5236
5245
  }))
5237
5246
  })]
5238
5247
  }))
5239
- }), item.id)), !hideAddButton && jsx(Grid, Object.assign({
5248
+ }), item.id)), !hideAddButton && jsxs(Grid, Object.assign({
5240
5249
  xs: 12
5241
5250
  }, {
5242
- children: jsx(Button, Object.assign({
5251
+ children: [jsx(Button, Object.assign({
5243
5252
  variant: "contained",
5244
5253
  size: "small",
5245
5254
  color: "primary",
5246
5255
  onClick: handleAddParameter
5247
5256
  }, {
5248
5257
  children: "Add property"
5249
- }))
5258
+ })), error && jsx(FormHelperText, Object.assign({
5259
+ error: true
5260
+ }, {
5261
+ children: error.root.message
5262
+ }))]
5250
5263
  }))]
5251
5264
  });
5252
5265
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dartech/arsenal-ui",
3
- "version": "1.3.87",
3
+ "version": "1.3.89",
4
4
  "author": "DAR",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"