@dartech/arsenal-ui 1.3.46 → 1.3.48
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 -9
- package/package.json +1 -1
- package/src/lib/ContentLayout/ContentLayout.d.ts +2 -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)) {
|
@@ -3885,7 +3886,11 @@ const PropertyFiller = ({
|
|
3885
3886
|
isDirty
|
3886
3887
|
}
|
3887
3888
|
} = useController({
|
3888
|
-
name
|
3889
|
+
name,
|
3890
|
+
control,
|
3891
|
+
rules: {
|
3892
|
+
required
|
3893
|
+
}
|
3889
3894
|
});
|
3890
3895
|
const value = useWatch({
|
3891
3896
|
control,
|
@@ -3908,9 +3913,9 @@ const PropertyFiller = ({
|
|
3908
3913
|
});
|
3909
3914
|
const handleFillOptionChange = useCallback(event => {
|
3910
3915
|
const selectedType = event.target.value;
|
3916
|
+
setFillOption(selectedType);
|
3911
3917
|
if (selectedType === 'null') {
|
3912
3918
|
setValue(name, null);
|
3913
|
-
clearErrors(name);
|
3914
3919
|
} else if (selectedType === 'widget') {
|
3915
3920
|
if (propertyType === PropertyType.JSON && value && typeof value !== 'string' && fillOption === 'dem_builder' && 'properties' in value) {
|
3916
3921
|
const definitionValue = Object.assign(Object.assign({}, value), {
|
@@ -3946,8 +3951,7 @@ const PropertyFiller = ({
|
|
3946
3951
|
onChange(defaultArrayValue);
|
3947
3952
|
}
|
3948
3953
|
}
|
3949
|
-
|
3950
|
-
clearErrors(name);
|
3954
|
+
clearErrors();
|
3951
3955
|
}, [name, clearErrors, value, setFillOption, onChange, fillOption, propertyType, setValue]);
|
3952
3956
|
useEffect(() => {
|
3953
3957
|
if (value === undefined) {
|
@@ -6563,15 +6567,15 @@ const Sidebar = ({
|
|
6563
6567
|
const ContentLayout = ({
|
6564
6568
|
children,
|
6565
6569
|
toolbar,
|
6566
|
-
contentSx
|
6570
|
+
contentSx,
|
6571
|
+
sx
|
6567
6572
|
}) => {
|
6568
6573
|
return jsxs(Box, Object.assign({
|
6569
6574
|
component: "main",
|
6570
|
-
sx: {
|
6575
|
+
sx: Object.assign({
|
6571
6576
|
flexGrow: 1,
|
6572
|
-
bgcolor: 'background.default'
|
6573
|
-
|
6574
|
-
}
|
6577
|
+
bgcolor: 'background.default'
|
6578
|
+
}, sx)
|
6575
6579
|
}, {
|
6576
6580
|
children: [jsx(Toolbar, Object.assign({
|
6577
6581
|
sx: {
|
package/package.json
CHANGED
@@ -4,6 +4,7 @@ type Props = {
|
|
4
4
|
children?: ReactNode;
|
5
5
|
toolbar?: ReactNode;
|
6
6
|
contentSx?: SxProps<Theme>;
|
7
|
+
sx?: SxProps<Theme>;
|
7
8
|
};
|
8
|
-
export declare const ContentLayout: ({ children, toolbar, contentSx }: Props) => JSX.Element;
|
9
|
+
export declare const ContentLayout: ({ children, toolbar, contentSx, sx }: Props) => JSX.Element;
|
9
10
|
export {};
|