@abgov/jsonforms-components 2.43.4 → 2.43.6
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 +25 -4
- package/package.json +1 -1
package/index.esm.js
CHANGED
|
@@ -8706,6 +8706,11 @@ const SectionHeaderRowTr = styled.tr(_t26$1 || (_t26$1 = _$6`
|
|
|
8706
8706
|
const SummaryRowLink = styled.a(_t27 || (_t27 = _$6`
|
|
8707
8707
|
position: relative;
|
|
8708
8708
|
top: var(--goa-space-xs);
|
|
8709
|
+
&:focus-visible {
|
|
8710
|
+
border-radius: 0.25rem;
|
|
8711
|
+
outline: 3px solid var(--goa-color-interactive-focus);
|
|
8712
|
+
}
|
|
8713
|
+
padding: 0 var(--goa-space-s) var(--goa-space-xs); var(--goa-space-s);
|
|
8709
8714
|
`));
|
|
8710
8715
|
const SummaryTd = styled.td(_t28 || (_t28 = _$6`
|
|
8711
8716
|
border: 0 !important;
|
|
@@ -11964,19 +11969,35 @@ const MainTab = ({
|
|
|
11964
11969
|
const rowData = getDataAtPath(core == null ? void 0 : core.data, childPath);
|
|
11965
11970
|
const orderedRowData = orderRowData(rowData, uischema == null || (_uischema$options10 = uischema.options) == null ? void 0 : _uischema$options10.detail);
|
|
11966
11971
|
function resolveField(e) {
|
|
11972
|
+
var _e$params;
|
|
11967
11973
|
if (e.keyword === 'required') {
|
|
11968
11974
|
return e.params.missingProperty;
|
|
11975
|
+
} else if (e.keyword === 'errorMessage' && (_e$params = e.params) != null && _e$params.errors[0].params.missingProperty) {
|
|
11976
|
+
return e.params.errors[0].params.missingProperty;
|
|
11969
11977
|
}
|
|
11970
11978
|
const path = e.instancePath.split('/');
|
|
11971
11979
|
return path[path.length - 1];
|
|
11972
11980
|
}
|
|
11973
11981
|
const rowBase = `/${childPath.replace(/\./g, '/')}`;
|
|
11974
11982
|
const fieldErrors = core == null || (_core$errors = core.errors) == null ? void 0 : _core$errors.filter(e => e.instancePath === rowBase || e.instancePath.startsWith(rowBase + '/')).reduce((acc, e) => {
|
|
11983
|
+
var _e$params2;
|
|
11975
11984
|
const field = resolveField(e);
|
|
11976
|
-
|
|
11985
|
+
if (e.keyword === 'errorMessage' && (_e$params2 = e.params) != null && _e$params2.errors) {
|
|
11986
|
+
if (field) {
|
|
11987
|
+
acc.fields[field] = e.message || 'Unknown error';
|
|
11988
|
+
} else {
|
|
11989
|
+
acc.row = (e == null ? void 0 : e.message) || 'Unknown error';
|
|
11990
|
+
return acc;
|
|
11991
|
+
}
|
|
11992
|
+
}
|
|
11993
|
+
if (!acc.fields[field]) {
|
|
11994
|
+
acc.fields[field] = humanizeAjvError(e, core.schema, core.uischema);
|
|
11995
|
+
}
|
|
11977
11996
|
return acc;
|
|
11978
|
-
}, {
|
|
11979
|
-
|
|
11997
|
+
}, {
|
|
11998
|
+
fields: {}
|
|
11999
|
+
});
|
|
12000
|
+
const errorText = fieldErrors && Object.values(fieldErrors.fields).length > 0 ? Object.values(fieldErrors.fields).join(', ') : fieldErrors == null ? void 0 : fieldErrors.row;
|
|
11980
12001
|
return jsx("div", {
|
|
11981
12002
|
"data-testid": `object-array-main-item-${rowIndex}`,
|
|
11982
12003
|
children: errorText ? jsx(GoabFormItem, {
|
|
@@ -12265,7 +12286,7 @@ class ListWithDetailControl extends React.Component {
|
|
|
12265
12286
|
currentListPage: this.state.currentListPage,
|
|
12266
12287
|
listTitle: listTitle
|
|
12267
12288
|
}, additionalProps))
|
|
12268
|
-
}),
|
|
12289
|
+
}), !showSecondaryButton && jsx(ObjectArrayToolBar, {
|
|
12269
12290
|
data: data,
|
|
12270
12291
|
errors: errors,
|
|
12271
12292
|
label: label,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abgov/jsonforms-components",
|
|
3
|
-
"version": "2.43.
|
|
3
|
+
"version": "2.43.6",
|
|
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",
|