@abgov/jsonforms-components 1.25.1 → 1.25.3
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 +14 -11
- package/package.json +1 -1
package/index.esm.js
CHANGED
|
@@ -3305,7 +3305,7 @@ const GoAInputBaseControl = props => {
|
|
|
3305
3305
|
const InnerComponent = input;
|
|
3306
3306
|
const labelToUpdate = getLabelText(uischema.scope, label || '');
|
|
3307
3307
|
let modifiedErrors = checkFieldValidity(props);
|
|
3308
|
-
if (modifiedErrors === '
|
|
3308
|
+
if (modifiedErrors === 'must be equal to one of the allowed values') {
|
|
3309
3309
|
modifiedErrors = '';
|
|
3310
3310
|
}
|
|
3311
3311
|
const getStepStatus = (props, value) => {
|
|
@@ -5865,7 +5865,8 @@ const ArrayBaseReviewControl = props => {
|
|
|
5865
5865
|
visible: visible,
|
|
5866
5866
|
children: jsx(ObjectArrayControl, Object.assign({}, props, {
|
|
5867
5867
|
openDeleteDialog: () => {},
|
|
5868
|
-
isStepperReview: true
|
|
5868
|
+
isStepperReview: true,
|
|
5869
|
+
enabled: true
|
|
5869
5870
|
}))
|
|
5870
5871
|
});
|
|
5871
5872
|
};
|
|
@@ -6056,7 +6057,7 @@ const LeftTab = ({
|
|
|
6056
6057
|
translations
|
|
6057
6058
|
}) => {
|
|
6058
6059
|
return jsx("div", {
|
|
6059
|
-
children:
|
|
6060
|
+
children: jsx(SideMenuItem, {
|
|
6060
6061
|
style: currentTab === rowIndex ? {
|
|
6061
6062
|
background: '#EFF8FF'
|
|
6062
6063
|
} : {},
|
|
@@ -6064,15 +6065,15 @@ const LeftTab = ({
|
|
|
6064
6065
|
children: jsxs(RowFlexMenu, {
|
|
6065
6066
|
children: [jsx(TabName, {
|
|
6066
6067
|
children: name
|
|
6067
|
-
}), jsx(Trash, {
|
|
6068
|
+
}), enabled ? jsx(Trash, {
|
|
6068
6069
|
children: jsx(GoAIconButton, {
|
|
6069
6070
|
icon: "trash",
|
|
6070
6071
|
"aria-label": translations.removeAriaLabel,
|
|
6071
6072
|
onClick: () => openDeleteDialog(childPath, rowIndex, name)
|
|
6072
6073
|
})
|
|
6073
|
-
})]
|
|
6074
|
+
}) : null]
|
|
6074
6075
|
})
|
|
6075
|
-
})
|
|
6076
|
+
})
|
|
6076
6077
|
}, childPath);
|
|
6077
6078
|
};
|
|
6078
6079
|
const NonEmptyList = /*#__PURE__*/React.memo(NonEmptyRowComponent);
|
|
@@ -6090,11 +6091,12 @@ const ObjectArrayList = ({
|
|
|
6090
6091
|
const isEmptyList = data === 0;
|
|
6091
6092
|
const rightRef = useRef(null);
|
|
6092
6093
|
const current = rightRef.current;
|
|
6093
|
-
const
|
|
6094
|
+
const minHeight = 300;
|
|
6095
|
+
const [rightHeight, setRightHeight] = useState(minHeight);
|
|
6094
6096
|
const [currentTab, setCurrentTab] = useState(0);
|
|
6095
6097
|
useEffect(() => {
|
|
6096
|
-
const resizeObserver = new ResizeObserver(
|
|
6097
|
-
if (rightHeight !== (current === null || current === void 0 ? void 0 : current.offsetHeight)) setRightHeight(current === null || current === void 0 ? void 0 : current.offsetHeight);
|
|
6098
|
+
const resizeObserver = new ResizeObserver(() => {
|
|
6099
|
+
if (rightHeight !== (current === null || current === void 0 ? void 0 : current.offsetHeight) && (current === null || current === void 0 ? void 0 : current.offsetHeight)) setRightHeight((current === null || current === void 0 ? void 0 : current.offsetHeight) > minHeight ? current === null || current === void 0 ? void 0 : current.offsetHeight : minHeight);
|
|
6098
6100
|
});
|
|
6099
6101
|
if (current) {
|
|
6100
6102
|
resizeObserver.observe(current);
|
|
@@ -6105,7 +6107,7 @@ const ObjectArrayList = ({
|
|
|
6105
6107
|
}
|
|
6106
6108
|
};
|
|
6107
6109
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
6108
|
-
}, [current]);
|
|
6110
|
+
}, [current, rightHeight, rightRef]);
|
|
6109
6111
|
if (isEmptyList) {
|
|
6110
6112
|
return jsx(EmptyList, {
|
|
6111
6113
|
numColumns: getValidColumnProps(schema).length + 1,
|
|
@@ -6247,7 +6249,8 @@ const ListWithDetailsControl = props => {
|
|
|
6247
6249
|
return jsxs(Visible, {
|
|
6248
6250
|
visible: visible,
|
|
6249
6251
|
children: [jsx(ListWithDetailControl, Object.assign({}, props, {
|
|
6250
|
-
openDeleteDialog: openDeleteDialog
|
|
6252
|
+
openDeleteDialog: openDeleteDialog,
|
|
6253
|
+
enabled: true
|
|
6251
6254
|
})), jsx(DeleteDialog, {
|
|
6252
6255
|
open: open,
|
|
6253
6256
|
onCancel: deleteCancel,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abgov/jsonforms-components",
|
|
3
|
-
"version": "1.25.
|
|
3
|
+
"version": "1.25.3",
|
|
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",
|