@dartech/arsenal-ui 1.3.45 → 1.3.47
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 +13 -7
- package/package.json +1 -1
package/index.js
CHANGED
@@ -1862,6 +1862,7 @@ const ControlNumberInput = _a => {
|
|
1862
1862
|
rules: {
|
1863
1863
|
required: required && 'Please, fill this field',
|
1864
1864
|
validate: val => {
|
1865
|
+
if (val === null) return true;
|
1865
1866
|
if (decimal && !floatsOnly.test(val)) {
|
1866
1867
|
return 'Not valid number';
|
1867
1868
|
} else if (!decimal && !digitsOnly.test(val)) {
|
@@ -3191,7 +3192,7 @@ const EntityPropertiesShortView = ({
|
|
3191
3192
|
const stepperData = useMemo(() => {
|
3192
3193
|
if (_properties) {
|
3193
3194
|
return _properties.map(property => {
|
3194
|
-
const propertyType = typeof property.propertyType === 'string' ? property.propertyType : property['propertyType']['value'];
|
3195
|
+
const propertyType = typeof property.propertyType === 'string' ? property.propertyType : property['propertyType'] ? property['propertyType']['value'] : '';
|
3195
3196
|
return {
|
3196
3197
|
label: jsxs(Box, Object.assign({
|
3197
3198
|
display: "flex",
|
@@ -3200,7 +3201,7 @@ const EntityPropertiesShortView = ({
|
|
3200
3201
|
children: [jsxs("b", {
|
3201
3202
|
children: [property.name, property.isRequired ? '*' : '']
|
3202
3203
|
}), jsxs("span", {
|
3203
|
-
children: [property.key, " | ", property.isMultiple ? 'multiple' : 'single', " |
|
3204
|
+
children: [property.key, " | ", property.isMultiple ? 'multiple' : 'single', " |", ' ', propertyType]
|
3204
3205
|
})]
|
3205
3206
|
})),
|
3206
3207
|
content: property.propertyType === 'ENTITY' && jsx(EntityPropertiesShortView, {
|
@@ -3310,7 +3311,9 @@ const EntityAdditionalFields = ({
|
|
3310
3311
|
children: [jsxs(Grid$1, Object.assign({
|
3311
3312
|
xs: 3,
|
3312
3313
|
style: {
|
3313
|
-
backgroundColor: '#f9f9f9'
|
3314
|
+
backgroundColor: '#f9f9f9',
|
3315
|
+
height: '100%',
|
3316
|
+
overflowY: 'auto'
|
3314
3317
|
}
|
3315
3318
|
}, {
|
3316
3319
|
children: [jsx(Stepper, Object.assign({
|
@@ -3883,7 +3886,11 @@ const PropertyFiller = ({
|
|
3883
3886
|
isDirty
|
3884
3887
|
}
|
3885
3888
|
} = useController({
|
3886
|
-
name
|
3889
|
+
name,
|
3890
|
+
control,
|
3891
|
+
rules: {
|
3892
|
+
required
|
3893
|
+
}
|
3887
3894
|
});
|
3888
3895
|
const value = useWatch({
|
3889
3896
|
control,
|
@@ -3906,9 +3913,9 @@ const PropertyFiller = ({
|
|
3906
3913
|
});
|
3907
3914
|
const handleFillOptionChange = useCallback(event => {
|
3908
3915
|
const selectedType = event.target.value;
|
3916
|
+
setFillOption(selectedType);
|
3909
3917
|
if (selectedType === 'null') {
|
3910
3918
|
setValue(name, null);
|
3911
|
-
clearErrors(name);
|
3912
3919
|
} else if (selectedType === 'widget') {
|
3913
3920
|
if (propertyType === PropertyType.JSON && value && typeof value !== 'string' && fillOption === 'dem_builder' && 'properties' in value) {
|
3914
3921
|
const definitionValue = Object.assign(Object.assign({}, value), {
|
@@ -3944,8 +3951,7 @@ const PropertyFiller = ({
|
|
3944
3951
|
onChange(defaultArrayValue);
|
3945
3952
|
}
|
3946
3953
|
}
|
3947
|
-
|
3948
|
-
clearErrors(name);
|
3954
|
+
clearErrors();
|
3949
3955
|
}, [name, clearErrors, value, setFillOption, onChange, fillOption, propertyType, setValue]);
|
3950
3956
|
useEffect(() => {
|
3951
3957
|
if (value === undefined) {
|