@dartech/arsenal-ui 1.3.86 → 1.3.87
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/index.js +42 -22
- package/package.json +1 -1
- package/src/lib/Property/UpsertProperty/PropertyValueField/BooleanValueField.d.ts +1 -0
- package/src/lib/Property/UpsertProperty/PropertyValueField/DateTimeValueField.d.ts +1 -0
- package/src/lib/Property/UpsertProperty/PropertyValueField/DateValueField.d.ts +1 -0
- package/src/lib/Property/UpsertProperty/PropertyValueField/JsonValueField.d.ts +1 -0
- package/src/lib/Property/UpsertProperty/PropertyValueField/TimeValueField.d.ts +1 -0
- package/src/lib/Property/ViewProperty/PropertyItem.d.ts +1 -0
package/index.js
CHANGED
@@ -70,6 +70,8 @@ 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';
|
73
75
|
import { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFns';
|
74
76
|
import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider';
|
75
77
|
import classnames from 'classnames';
|
@@ -750,7 +752,7 @@ const ControlAutocomplete = _a => {
|
|
750
752
|
useEffect(() => {
|
751
753
|
if (typeof value === 'string' && valueKey && useStringValue && !localValue && options.length && !!options[0] && typeof options[0] === 'object') {
|
752
754
|
setLocalValue(options.find(el => el[valueKey] === value));
|
753
|
-
}
|
755
|
+
} else setLocalValue(value);
|
754
756
|
}, [localValue, options, useStringValue, value, valueKey]);
|
755
757
|
return jsx(Autocomplete, Object.assign({}, fieldProps, {
|
756
758
|
value: useStringValue ? localValue !== null && localValue !== void 0 ? localValue : null : value,
|
@@ -3756,25 +3758,43 @@ const FileValueWidget = ({
|
|
3756
3758
|
const base64 = yield convertBase64(file);
|
3757
3759
|
setValue(name, base64);
|
3758
3760
|
}), [name, setValue]);
|
3759
|
-
return jsxs(
|
3760
|
-
|
3761
|
-
|
3762
|
-
|
3763
|
-
|
3764
|
-
|
3765
|
-
|
3766
|
-
|
3767
|
-
|
3768
|
-
|
3769
|
-
|
3770
|
-
|
3771
|
-
|
3772
|
-
|
3773
|
-
|
3774
|
-
|
3775
|
-
|
3776
|
-
})
|
3777
|
-
|
3761
|
+
return jsxs(Fragment, {
|
3762
|
+
children: [jsxs(Box, Object.assign({
|
3763
|
+
mb: 2,
|
3764
|
+
display: "flex",
|
3765
|
+
flex: "row"
|
3766
|
+
}, {
|
3767
|
+
children: [jsx(Typography, {
|
3768
|
+
children: "Does file uploaded:"
|
3769
|
+
}), fileValue ? jsx(CheckCircleOutlineOutlinedIcon, {
|
3770
|
+
sx: {
|
3771
|
+
paddingLeft: 2
|
3772
|
+
}
|
3773
|
+
}) : jsx(BlockOutlinedIcon, {
|
3774
|
+
sx: {
|
3775
|
+
paddingLeft: 2
|
3776
|
+
}
|
3777
|
+
})]
|
3778
|
+
})), jsxs(Button, Object.assign({
|
3779
|
+
component: "label",
|
3780
|
+
variant: "contained",
|
3781
|
+
size: "large",
|
3782
|
+
color: "primary",
|
3783
|
+
sx: {
|
3784
|
+
marginTop: 4
|
3785
|
+
}
|
3786
|
+
}, {
|
3787
|
+
children: [fileValue ? 'Change file' : 'Upload file', jsx("input", Object.assign({
|
3788
|
+
type: "hidden"
|
3789
|
+
}, register(`${name}`, {
|
3790
|
+
required: true
|
3791
|
+
}))), jsx("input", {
|
3792
|
+
type: "file",
|
3793
|
+
hidden: true,
|
3794
|
+
onChange: handleFileRead
|
3795
|
+
})]
|
3796
|
+
}))]
|
3797
|
+
});
|
3778
3798
|
};
|
3779
3799
|
var FileValueWidget$1 = FileValueWidget;
|
3780
3800
|
|
@@ -5702,7 +5722,7 @@ const PropertyValueComponent = ({
|
|
5702
5722
|
value: data
|
5703
5723
|
}) : defaultRender(data);
|
5704
5724
|
case PropertyType.FILE_REFERENCE:
|
5705
|
-
return jsx(Button, Object.assign({
|
5725
|
+
return data === null ? defaultRender(data) : jsx(Button, Object.assign({
|
5706
5726
|
component: Link,
|
5707
5727
|
color: "primary",
|
5708
5728
|
variant: "contained",
|
@@ -5715,7 +5735,7 @@ const PropertyValueComponent = ({
|
|
5715
5735
|
children: "Download via link"
|
5716
5736
|
}));
|
5717
5737
|
case PropertyType.FILE:
|
5718
|
-
return jsx(FileDefinitionValueView$1, {
|
5738
|
+
return data === null ? defaultRender(data) : jsx(FileDefinitionValueView$1, {
|
5719
5739
|
data: data,
|
5720
5740
|
property: property
|
5721
5741
|
});
|
package/package.json
CHANGED