@abgov/jsonforms-components 1.54.0 → 1.54.1
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.esm.js +6 -8
- package/package.json +1 -1
package/index.esm.js
CHANGED
|
@@ -2950,7 +2950,7 @@ const onBlurForTimeControl = props => {
|
|
|
2950
2950
|
path
|
|
2951
2951
|
} = controlProps;
|
|
2952
2952
|
if (isRequiredAndHasNoData(controlProps)) {
|
|
2953
|
-
handleChange(path, value);
|
|
2953
|
+
handleChange(path, value === '' ? undefined : value);
|
|
2954
2954
|
}
|
|
2955
2955
|
};
|
|
2956
2956
|
/**
|
|
@@ -2972,7 +2972,7 @@ const onChangeForDateControl = props => {
|
|
|
2972
2972
|
if (value && value !== null) {
|
|
2973
2973
|
value = standardizeDate(value) || '';
|
|
2974
2974
|
if (value !== data) {
|
|
2975
|
-
handleChange(path, value);
|
|
2975
|
+
handleChange(path, value === '' ? undefined : value);
|
|
2976
2976
|
}
|
|
2977
2977
|
}
|
|
2978
2978
|
};
|
|
@@ -3013,7 +3013,7 @@ const onChangeForDateTimeControl = props => {
|
|
|
3013
3013
|
if (value && value !== null) {
|
|
3014
3014
|
value = isValidDate(value) ? (_a = new Date(value)) === null || _a === void 0 ? void 0 : _a.toISOString() : '';
|
|
3015
3015
|
if (data !== value) {
|
|
3016
|
-
handleChange(path, value);
|
|
3016
|
+
handleChange(path, value === '' ? undefined : value);
|
|
3017
3017
|
}
|
|
3018
3018
|
}
|
|
3019
3019
|
};
|
|
@@ -3037,11 +3037,7 @@ const onChangeForNumericControl = props => {
|
|
|
3037
3037
|
//Prevents handleChange from executing if the data has not changed
|
|
3038
3038
|
//so the component will not re render.
|
|
3039
3039
|
if (data !== +value) {
|
|
3040
|
-
|
|
3041
|
-
if (value !== '') {
|
|
3042
|
-
newValue = +value;
|
|
3043
|
-
}
|
|
3044
|
-
handleChange(path, newValue);
|
|
3040
|
+
handleChange(path, value === '' ? undefined : value);
|
|
3045
3041
|
}
|
|
3046
3042
|
} else {
|
|
3047
3043
|
handleChange(path, value);
|
|
@@ -5819,7 +5815,9 @@ const FormStepperReviewer = props => {
|
|
|
5819
5815
|
minChildWidth: "100%",
|
|
5820
5816
|
children: category.elements.filter(field => {
|
|
5821
5817
|
var _a, _b;
|
|
5818
|
+
// [TODO] we need to double check why we cannot hide the elements at the element level
|
|
5822
5819
|
const conditionProps = (_a = field.rule) === null || _a === void 0 ? void 0 : _a.condition;
|
|
5820
|
+
/* istanbul ignore next */
|
|
5823
5821
|
if (conditionProps && data) {
|
|
5824
5822
|
const canHideControlParts = (_b = conditionProps === null || conditionProps === void 0 ? void 0 : conditionProps.scope) === null || _b === void 0 ? void 0 : _b.split('/');
|
|
5825
5823
|
const canHideControl = canHideControlParts && canHideControlParts[(canHideControlParts === null || canHideControlParts === void 0 ? void 0 : canHideControlParts.length) - 1];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abgov/jsonforms-components",
|
|
3
|
-
"version": "1.54.
|
|
3
|
+
"version": "1.54.1",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Government of Alberta - React renderers for JSON Forms based on the design system.",
|
|
6
6
|
"repository": "https://github.com/GovAlta/adsp-monorepo",
|