@abgov/jsonforms-components 1.54.0 → 1.54.2
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 +10 -7
- 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,14 +3037,14 @@ 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
|
-
let newValue =
|
|
3040
|
+
let newValue = undefined;
|
|
3041
3041
|
if (value !== '') {
|
|
3042
3042
|
newValue = +value;
|
|
3043
3043
|
}
|
|
3044
3044
|
handleChange(path, newValue);
|
|
3045
3045
|
}
|
|
3046
3046
|
} else {
|
|
3047
|
-
handleChange(path, value);
|
|
3047
|
+
handleChange(path, value === '' ? undefined : value);
|
|
3048
3048
|
}
|
|
3049
3049
|
};
|
|
3050
3050
|
|
|
@@ -4700,7 +4700,6 @@ const GoANumberInput = props => {
|
|
|
4700
4700
|
width: width,
|
|
4701
4701
|
name: (appliedUiSchemaOptions === null || appliedUiSchemaOptions === void 0 ? void 0 : appliedUiSchemaOptions.name) || `${id || label}-input`,
|
|
4702
4702
|
testId: (appliedUiSchemaOptions === null || appliedUiSchemaOptions === void 0 ? void 0 : appliedUiSchemaOptions.testId) || `${id}-input`,
|
|
4703
|
-
onKeyPress: (name, value, key) => {},
|
|
4704
4703
|
onBlur: (name, value) => {
|
|
4705
4704
|
onBlurForNumericControl({
|
|
4706
4705
|
name,
|
|
@@ -5819,7 +5818,9 @@ const FormStepperReviewer = props => {
|
|
|
5819
5818
|
minChildWidth: "100%",
|
|
5820
5819
|
children: category.elements.filter(field => {
|
|
5821
5820
|
var _a, _b;
|
|
5821
|
+
// [TODO] we need to double check why we cannot hide the elements at the element level
|
|
5822
5822
|
const conditionProps = (_a = field.rule) === null || _a === void 0 ? void 0 : _a.condition;
|
|
5823
|
+
/* istanbul ignore next */
|
|
5823
5824
|
if (conditionProps && data) {
|
|
5824
5825
|
const canHideControlParts = (_b = conditionProps === null || conditionProps === void 0 ? void 0 : conditionProps.scope) === null || _b === void 0 ? void 0 : _b.split('/');
|
|
5825
5826
|
const canHideControl = canHideControlParts && canHideControlParts[(canHideControlParts === null || canHideControlParts === void 0 ? void 0 : canHideControlParts.length) - 1];
|
|
@@ -7176,7 +7177,9 @@ const NonEmptyCellComponent$1 = /*#__PURE__*/React.memo(function NonEmptyCellCom
|
|
|
7176
7177
|
return jsx("td", {
|
|
7177
7178
|
children: isInReview ? jsx("div", {
|
|
7178
7179
|
"data-testid": `#/properties/${schemaName}-input-${i}-review`,
|
|
7179
|
-
children: currentData
|
|
7180
|
+
children: typeof currentData === 'string' ? currentData : jsx("pre", {
|
|
7181
|
+
children: JSON.stringify(currentData, null, 2)
|
|
7182
|
+
})
|
|
7180
7183
|
}) : jsx(GoAFormItem, {
|
|
7181
7184
|
error: (_a = error === null || error === void 0 ? void 0 : error.message) !== null && _a !== void 0 ? _a : '',
|
|
7182
7185
|
mb: errorRow && !error && '2xl' || 'xs',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abgov/jsonforms-components",
|
|
3
|
-
"version": "1.54.
|
|
3
|
+
"version": "1.54.2",
|
|
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",
|