@abgov/jsonforms-components 2.1.2 → 2.1.4
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 +4 -5
- package/package.json +1 -1
package/index.esm.js
CHANGED
|
@@ -7715,7 +7715,6 @@ const NonEmptyCellComponent$1 = /*#__PURE__*/React.memo(function NonEmptyCellCom
|
|
|
7715
7715
|
children: [jsx("thead", {
|
|
7716
7716
|
children: jsxs("tr", {
|
|
7717
7717
|
children: [Object.entries(tableKeys).map(([value, index]) => {
|
|
7718
|
-
var _a;
|
|
7719
7718
|
if (!isInReview) {
|
|
7720
7719
|
return jsx("th", {
|
|
7721
7720
|
children: jsxs("p", {
|
|
@@ -7727,7 +7726,7 @@ const NonEmptyCellComponent$1 = /*#__PURE__*/React.memo(function NonEmptyCellCom
|
|
|
7727
7726
|
}
|
|
7728
7727
|
return jsx(TableTHHeader, {
|
|
7729
7728
|
children: jsxs("p", {
|
|
7730
|
-
children: [`${convertToSentenceCase(index)}`, (
|
|
7729
|
+
children: [`${convertToSentenceCase(index)}`, (required === null || required === void 0 ? void 0 : required.includes(value)) && jsxs(RequiredSpan, {
|
|
7731
7730
|
children: [jsx("br", {}), " (required)"]
|
|
7732
7731
|
})]
|
|
7733
7732
|
})
|
|
@@ -7743,7 +7742,7 @@ const NonEmptyCellComponent$1 = /*#__PURE__*/React.memo(function NonEmptyCellCom
|
|
|
7743
7742
|
const errorRow = errors === null || errors === void 0 ? void 0 : errors.find(error => error.instancePath.includes(`/${props.rowPath.replace(/\./g, '/')}/${i}`));
|
|
7744
7743
|
return jsxs("tr", {
|
|
7745
7744
|
children: [Object.keys(properties).map((element, ix) => {
|
|
7746
|
-
var _a;
|
|
7745
|
+
var _a, _b;
|
|
7747
7746
|
const dataObject = properties[element];
|
|
7748
7747
|
const schemaName = element;
|
|
7749
7748
|
const currentData = data && data[num] ? data[num][element] : '';
|
|
@@ -7763,7 +7762,7 @@ const NonEmptyCellComponent$1 = /*#__PURE__*/React.memo(function NonEmptyCellCom
|
|
|
7763
7762
|
children: renderCellColumn({
|
|
7764
7763
|
currentData,
|
|
7765
7764
|
error: error === null || error === void 0 ? void 0 : error.message,
|
|
7766
|
-
isRequired: required === null || required === void 0 ? void 0 : required.includes(tableKeys[element]),
|
|
7765
|
+
isRequired: (required === null || required === void 0 ? void 0 : required.includes(tableKeys[element])) || ((_a = nestedItems[element]) === null || _a === void 0 ? void 0 : _a.required.length) > 0,
|
|
7767
7766
|
errors: errors !== undefined ? errors : [],
|
|
7768
7767
|
count: count !== undefined ? count : -1,
|
|
7769
7768
|
element,
|
|
@@ -7775,7 +7774,7 @@ const NonEmptyCellComponent$1 = /*#__PURE__*/React.memo(function NonEmptyCellCom
|
|
|
7775
7774
|
}
|
|
7776
7775
|
return jsx("td", {
|
|
7777
7776
|
children: jsx(GoAFormItem, {
|
|
7778
|
-
error: (
|
|
7777
|
+
error: (_b = error === null || error === void 0 ? void 0 : error.message) !== null && _b !== void 0 ? _b : '',
|
|
7779
7778
|
mb: errorRow && !error && '2xl' || 'xs',
|
|
7780
7779
|
children: dataObject.type === 'number' || dataObject.type === 'string' && !dataObject.enum ? jsx(GoAInput, {
|
|
7781
7780
|
error: (error === null || error === void 0 ? void 0 : error.message.length) > 0,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abgov/jsonforms-components",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.4",
|
|
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",
|