@abgov/jsonforms-components 2.6.9 → 2.6.11
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 +22 -2
- package/package.json +1 -1
package/index.esm.js
CHANGED
|
@@ -7492,7 +7492,7 @@ function isNumber(value) {
|
|
|
7492
7492
|
}
|
|
7493
7493
|
const getIncompletePaths = (ajv, scopes) => {
|
|
7494
7494
|
var _a;
|
|
7495
|
-
const requiredErrorPaths = (_a = ajv === null || ajv === void 0 ? void 0 : ajv.errors) === null || _a === void 0 ? void 0 : _a.filter(e => e.keyword === 'required' || e.keyword === 'minLength').map(e => {
|
|
7495
|
+
const requiredErrorPaths = (_a = ajv === null || ajv === void 0 ? void 0 : ajv.errors) === null || _a === void 0 ? void 0 : _a.filter(e => e.keyword === 'required' || e.keyword === 'minLength' || e.keyword === 'minItems' || e.keyword === 'errorMessage').map(e => {
|
|
7496
7496
|
return getControlPath(e);
|
|
7497
7497
|
});
|
|
7498
7498
|
const _scopes = scopes.map(scope => toDataPath(scope)).filter(path => requiredErrorPaths && isErrorPathIncluded(requiredErrorPaths, path));
|
|
@@ -9940,6 +9940,7 @@ const LeftTab = ({
|
|
|
9940
9940
|
enabled,
|
|
9941
9941
|
currentTab,
|
|
9942
9942
|
name,
|
|
9943
|
+
current,
|
|
9943
9944
|
translations
|
|
9944
9945
|
}) => {
|
|
9945
9946
|
return jsx("div", {
|
|
@@ -9948,7 +9949,21 @@ const LeftTab = ({
|
|
|
9948
9949
|
background: '#EFF8FF'
|
|
9949
9950
|
} : {},
|
|
9950
9951
|
onClick: () => selectCurrentTab(rowIndex),
|
|
9952
|
+
onKeyDown: e => {
|
|
9953
|
+
if (e.key === 'ArrowRight') {
|
|
9954
|
+
e.preventDefault();
|
|
9955
|
+
if (current) {
|
|
9956
|
+
const goa = current === null || current === void 0 ? void 0 : current.querySelector('goa-input, goa-button');
|
|
9957
|
+
if (goa === null || goa === void 0 ? void 0 : goa.shadowRoot) {
|
|
9958
|
+
const internal = goa.shadowRoot.querySelector('input, button');
|
|
9959
|
+
internal === null || internal === void 0 ? void 0 : internal.focus();
|
|
9960
|
+
selectCurrentTab(rowIndex);
|
|
9961
|
+
}
|
|
9962
|
+
}
|
|
9963
|
+
}
|
|
9964
|
+
},
|
|
9951
9965
|
children: jsxs(RowFlexMenu, {
|
|
9966
|
+
tabIndex: 0,
|
|
9952
9967
|
children: [jsx(TabName, {
|
|
9953
9968
|
children: name
|
|
9954
9969
|
}), enabled ? jsx(Trash, {
|
|
@@ -10008,6 +10023,7 @@ const ObjectArrayList = ({
|
|
|
10008
10023
|
setCurrentIndex(index);
|
|
10009
10024
|
};
|
|
10010
10025
|
const paddedHeight = rightHeight && rightHeight + 48;
|
|
10026
|
+
// const detailRef = useRef<HTMLDivElement>(null);
|
|
10011
10027
|
return jsx(ListContainer, {
|
|
10012
10028
|
children: jsxs(RowFlex, {
|
|
10013
10029
|
children: [jsx(FlexTabs, {
|
|
@@ -10025,11 +10041,13 @@ const ObjectArrayList = ({
|
|
|
10025
10041
|
openDeleteDialog: openDeleteDialog,
|
|
10026
10042
|
selectCurrentTab: selectCurrentTab,
|
|
10027
10043
|
enabled: enabled,
|
|
10044
|
+
current: current,
|
|
10028
10045
|
translations: translations
|
|
10029
10046
|
}, childPath);
|
|
10030
10047
|
})
|
|
10031
10048
|
}), jsx(FlexForm, {
|
|
10032
10049
|
ref: rightRef,
|
|
10050
|
+
tabIndex: -1,
|
|
10033
10051
|
children: jsx(NonEmptyList, {
|
|
10034
10052
|
childPath: Paths.compose(path, `${currentIndex}`),
|
|
10035
10053
|
rowIndex: currentIndex,
|
|
@@ -11426,6 +11444,7 @@ formData,
|
|
|
11426
11444
|
updateFormData,
|
|
11427
11445
|
// eslint-disable-next-line
|
|
11428
11446
|
handleRequiredFieldBlur) {
|
|
11447
|
+
/* istanbul ignore next */
|
|
11429
11448
|
useEffect(() => {
|
|
11430
11449
|
const rAF = requestAnimationFrame(() => {
|
|
11431
11450
|
const timeout = setTimeout(() => {
|
|
@@ -11976,7 +11995,8 @@ const createDefaultAjv = (...schemas) => {
|
|
|
11976
11995
|
allErrors: true,
|
|
11977
11996
|
verbose: true,
|
|
11978
11997
|
strict: 'log',
|
|
11979
|
-
strictRequired: false
|
|
11998
|
+
strictRequired: false,
|
|
11999
|
+
useDefaults: true
|
|
11980
12000
|
});
|
|
11981
12001
|
ajv.addSchema(schemas);
|
|
11982
12002
|
addErrors(ajv);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abgov/jsonforms-components",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.11",
|
|
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",
|