@abgov/jsonforms-components 1.54.1 → 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 +9 -4
- package/package.json +1 -1
package/index.esm.js
CHANGED
|
@@ -3037,10 +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
|
-
|
|
3040
|
+
let newValue = undefined;
|
|
3041
|
+
if (value !== '') {
|
|
3042
|
+
newValue = +value;
|
|
3043
|
+
}
|
|
3044
|
+
handleChange(path, newValue);
|
|
3041
3045
|
}
|
|
3042
3046
|
} else {
|
|
3043
|
-
handleChange(path, value);
|
|
3047
|
+
handleChange(path, value === '' ? undefined : value);
|
|
3044
3048
|
}
|
|
3045
3049
|
};
|
|
3046
3050
|
|
|
@@ -4696,7 +4700,6 @@ const GoANumberInput = props => {
|
|
|
4696
4700
|
width: width,
|
|
4697
4701
|
name: (appliedUiSchemaOptions === null || appliedUiSchemaOptions === void 0 ? void 0 : appliedUiSchemaOptions.name) || `${id || label}-input`,
|
|
4698
4702
|
testId: (appliedUiSchemaOptions === null || appliedUiSchemaOptions === void 0 ? void 0 : appliedUiSchemaOptions.testId) || `${id}-input`,
|
|
4699
|
-
onKeyPress: (name, value, key) => {},
|
|
4700
4703
|
onBlur: (name, value) => {
|
|
4701
4704
|
onBlurForNumericControl({
|
|
4702
4705
|
name,
|
|
@@ -7174,7 +7177,9 @@ const NonEmptyCellComponent$1 = /*#__PURE__*/React.memo(function NonEmptyCellCom
|
|
|
7174
7177
|
return jsx("td", {
|
|
7175
7178
|
children: isInReview ? jsx("div", {
|
|
7176
7179
|
"data-testid": `#/properties/${schemaName}-input-${i}-review`,
|
|
7177
|
-
children: currentData
|
|
7180
|
+
children: typeof currentData === 'string' ? currentData : jsx("pre", {
|
|
7181
|
+
children: JSON.stringify(currentData, null, 2)
|
|
7182
|
+
})
|
|
7178
7183
|
}) : jsx(GoAFormItem, {
|
|
7179
7184
|
error: (_a = error === null || error === void 0 ? void 0 : error.message) !== null && _a !== void 0 ? _a : '',
|
|
7180
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",
|