@abgov/jsonforms-components 2.60.1 → 2.60.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 +24 -12
- package/package.json +2 -2
- package/renderer-catalog.json +2 -2
package/index.esm.js
CHANGED
|
@@ -3713,16 +3713,11 @@ const areAllUppercase = label => {
|
|
|
3713
3713
|
return /^[^a-z]*$/.test(label);
|
|
3714
3714
|
};
|
|
3715
3715
|
const getExplicitControlLabel = props => {
|
|
3716
|
-
var _props$uischema, _props$
|
|
3717
|
-
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
if (typeof ((_props$schema = props.schema) == null ? void 0 : _props$schema.title) === 'string' && props.schema.title.trim()) {
|
|
3722
|
-
return props.schema.title.trim();
|
|
3723
|
-
}
|
|
3724
|
-
const uiLabel = (_props$uischema2 = props.uischema) == null ? void 0 : _props$uischema2.label;
|
|
3725
|
-
if (typeof uiLabel === 'string' && uiLabel.trim()) {
|
|
3716
|
+
var _props$uischema, _props$uischema2, _props$schema;
|
|
3717
|
+
// uischema.label has highest priority. An explicit empty string suppresses the
|
|
3718
|
+
// auto-generated label (and prevents options.text from leaking into the form-item label).
|
|
3719
|
+
const uiLabel = (_props$uischema = props.uischema) == null ? void 0 : _props$uischema.label;
|
|
3720
|
+
if (typeof uiLabel === 'string') {
|
|
3726
3721
|
return uiLabel.trim();
|
|
3727
3722
|
}
|
|
3728
3723
|
if (typeof uiLabel === 'object' && uiLabel !== null && 'text' in uiLabel) {
|
|
@@ -3731,6 +3726,13 @@ const getExplicitControlLabel = props => {
|
|
|
3731
3726
|
return text.trim();
|
|
3732
3727
|
}
|
|
3733
3728
|
}
|
|
3729
|
+
const optionText = (_props$uischema2 = props.uischema) == null || (_props$uischema2 = _props$uischema2.options) == null ? void 0 : _props$uischema2.text;
|
|
3730
|
+
if (typeof optionText === 'string' && optionText.trim()) {
|
|
3731
|
+
return optionText.trim();
|
|
3732
|
+
}
|
|
3733
|
+
if (typeof ((_props$schema = props.schema) == null ? void 0 : _props$schema.title) === 'string' && props.schema.title.trim()) {
|
|
3734
|
+
return props.schema.title.trim();
|
|
3735
|
+
}
|
|
3734
3736
|
return undefined;
|
|
3735
3737
|
};
|
|
3736
3738
|
const getGeneratedLabelFromScope = scope => {
|
|
@@ -3744,7 +3746,7 @@ const getGeneratedLabelFromScope = scope => {
|
|
|
3744
3746
|
const getControlLabelText = props => {
|
|
3745
3747
|
var _props$uischema3;
|
|
3746
3748
|
const explicitLabel = getExplicitControlLabel(props);
|
|
3747
|
-
if (explicitLabel) {
|
|
3749
|
+
if (explicitLabel !== undefined) {
|
|
3748
3750
|
return explicitLabel;
|
|
3749
3751
|
}
|
|
3750
3752
|
if ((_props$uischema3 = props.uischema) != null && (_props$uischema3 = _props$uischema3.scope) != null && _props$uischema3.startsWith('#/')) {
|
|
@@ -8493,7 +8495,7 @@ const GoABaseInputReviewComponent = props => {
|
|
|
8493
8495
|
if (((_uischema$options5 = uischema.options) == null ? void 0 : _uischema$options5.radio) === true) {
|
|
8494
8496
|
reviewText = data ? `Yes` : `No`;
|
|
8495
8497
|
} else {
|
|
8496
|
-
reviewText = data ? `Yes (${checkboxLabel})` : `No (${checkboxLabel})`;
|
|
8498
|
+
reviewText = data ? checkboxLabel ? `Yes (${checkboxLabel})` : `Yes` : checkboxLabel ? `No (${checkboxLabel})` : `No`;
|
|
8497
8499
|
}
|
|
8498
8500
|
}
|
|
8499
8501
|
if (isTime) {
|
|
@@ -10058,9 +10060,19 @@ const GoAInputBaseTableReview = props => {
|
|
|
10058
10060
|
if (activeError && /\sis required$/i.test(activeError)) {
|
|
10059
10061
|
activeError = `${labelToUpdate} is required`;
|
|
10060
10062
|
}
|
|
10063
|
+
// For required boolean fields (e.g. anyOf: [{enum: [true]}]), suppress the raw AJV
|
|
10064
|
+
// "must be equal to one of the allowed values" error and show a friendly message instead.
|
|
10065
|
+
if ((schema == null ? void 0 : schema.type) === 'boolean' && activeError && activeError.toLowerCase().includes('must be equal')) {
|
|
10066
|
+
activeError = data === false ? `${labelToUpdate} is required` : undefined;
|
|
10067
|
+
}
|
|
10061
10068
|
if (required && isNilOrEmptyValue(data, true) && !activeError) {
|
|
10062
10069
|
activeError = `${labelToUpdate} is required`;
|
|
10063
10070
|
}
|
|
10071
|
+
// If a required checkbox is unchecked, show only the validation message in
|
|
10072
|
+
// review mode (not a contradictory "No (...)" value line).
|
|
10073
|
+
if ((schema == null ? void 0 : schema.type) === 'boolean' && data === false && activeError && /\sis required$/i.test(activeError)) {
|
|
10074
|
+
reviewText = '';
|
|
10075
|
+
}
|
|
10064
10076
|
// eslint-disable-next-line
|
|
10065
10077
|
const stepId = (_uischema$options4 = uischema.options) == null ? void 0 : _uischema$options4.stepId;
|
|
10066
10078
|
const showInlineValue = reviewText === null || reviewText === undefined || typeof reviewText === 'string' || typeof reviewText === 'number' || /*#__PURE__*/React.isValidElement(reviewText) || Array.isArray(reviewText) && reviewText.length === 0;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abgov/jsonforms-components",
|
|
3
|
-
"version": "2.60.
|
|
3
|
+
"version": "2.60.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",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"pluralize": "^8.0.0"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"axios": "1.
|
|
23
|
+
"axios": "1.15.0",
|
|
24
24
|
"lodash": "^4.17.23",
|
|
25
25
|
"styled-components": "^6.0.0"
|
|
26
26
|
},
|
package/renderer-catalog.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": "1.0.0",
|
|
3
|
-
"generatedAt": "2026-04-
|
|
4
|
-
"sourceCommit": "
|
|
3
|
+
"generatedAt": "2026-04-15T21:58:29.714Z",
|
|
4
|
+
"sourceCommit": "437fc5583187822f070dbda79b67b20daa47557d",
|
|
5
5
|
"sourcePath": "libs/jsonforms-components/src/index.ts",
|
|
6
6
|
"rendererCount": 33,
|
|
7
7
|
"renderers": [
|