@abgov/jsonforms-components 2.47.3 → 2.47.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.
Files changed (2) hide show
  1. package/index.esm.js +17 -14
  2. package/package.json +1 -1
package/index.esm.js CHANGED
@@ -10894,23 +10894,22 @@ const renderCellColumn = ({
10894
10894
  }) => {
10895
10895
  const renderWarningCell = data => {
10896
10896
  return jsx(HilightCellWarning, {
10897
- children: jsxs(ObjectArrayWarningIconDiv, {
10898
- children: [jsx(GoabIcon, {
10897
+ children: jsx(ObjectArrayWarningIconDiv, {
10898
+ children: jsx(GoabIcon, {
10899
10899
  type: "warning",
10900
10900
  title: "warning",
10901
10901
  size: "small",
10902
10902
  theme: "filled",
10903
10903
  ml: "2xs",
10904
10904
  mt: "2xs"
10905
- }), data]
10905
+ })
10906
10906
  })
10907
10907
  });
10908
10908
  };
10909
10909
  if (data === undefined && isRequired || error !== '' && error !== undefined) {
10910
- const message = error || (isRequired && data === undefined ? 'Required' : data);
10911
- return renderWarningCell(message);
10910
+ return renderWarningCell();
10912
10911
  } else if (data !== undefined && isRequired && error) {
10913
- return renderWarningCell(error);
10912
+ return renderWarningCell();
10914
10913
  }
10915
10914
  const path = `/${rowPath}/${index}/${element}/${index === 0 ? index : index - 1}`;
10916
10915
  const nestedErrors = errors == null ? void 0 : errors.filter(e => e.instancePath.includes(path));
@@ -11111,10 +11110,6 @@ const NonEmptyCellComponent = /*#__PURE__*/React.memo(function NonEmptyCellCompo
11111
11110
  }, 0)
11112
11111
  }), jsx("tbody", {
11113
11112
  children: range(count || 0).map((num, i) => {
11114
- // Skip rendering empty rows in review mode
11115
- if (isInReview === true && (data === undefined || data[num] === undefined || Object.keys(data[num]).length === 0)) {
11116
- return null;
11117
- }
11118
11113
  const errorRow = errors == null ? void 0 : errors.find(error => error.instancePath.includes(`/${props.rowPath.replace(/\./g, '/')}/${i}`));
11119
11114
  return jsxs("tr", {
11120
11115
  children: [Object.keys(properties).map((element, ix) => {
@@ -11166,7 +11161,7 @@ const NonEmptyCellComponent = /*#__PURE__*/React.memo(function NonEmptyCellCompo
11166
11161
  children: renderCellColumn({
11167
11162
  data: currentData !== '' && currentData !== null && currentData !== undefined ? currentData : undefined,
11168
11163
  error: humanMessage,
11169
- isRequired: (_required$includes = required == null ? void 0 : required.includes(tableKeys[element])) != null ? _required$includes : false,
11164
+ isRequired: (_required$includes = required == null ? void 0 : required.includes(element)) != null ? _required$includes : false,
11170
11165
  errors: errors !== undefined ? errors : [],
11171
11166
  element,
11172
11167
  rowPath,
@@ -12043,11 +12038,19 @@ const AddressLoopUpControlTableReview = props => {
12043
12038
  "data-testid": "address-lookup-table-review",
12044
12039
  children: jsx(PageReviewContainer, {
12045
12040
  colSpan: 3,
12046
- children: jsx(ReviewLabel, {
12047
- children: `${isAlbertaAddress ? 'Alberta' : 'Canada'} postal address`
12041
+ children: jsxs(ReviewHeader, {
12042
+ children: [jsx(ReviewLabel, {
12043
+ children: `${isAlbertaAddress ? 'Alberta' : 'Canada'} postal address`
12044
+ }), stepId !== undefined && jsx(GoabButton, {
12045
+ type: "tertiary",
12046
+ size: "compact",
12047
+ onClick: () => formStepperCtx == null ? void 0 : formStepperCtx.goToPage(stepId, targetScope),
12048
+ testId: "address-change-btn",
12049
+ children: "Change"
12050
+ })]
12048
12051
  })
12049
12052
  })
12050
- }), renderRow('Address line 1', data == null ? void 0 : data.addressLine1, 'addressLine1', true), (data == null ? void 0 : data.addressLine2) && renderRow('Address line 2', data.addressLine2, 'addressLine2', false), renderRow('City', data == null ? void 0 : data.municipality, 'municipality', false), renderRow('Postal Code', data == null ? void 0 : data.postalCode, 'postalCode', false), renderRow('Province', provinceLabel, 'subdivisionCode', false), renderRow('Country', 'Canada', 'country', false)]
12053
+ }), renderRow('Address line 1', data == null ? void 0 : data.addressLine1, 'addressLine1', false), (data == null ? void 0 : data.addressLine2) && renderRow('Address line 2', data.addressLine2, 'addressLine2', false), renderRow('City', data == null ? void 0 : data.municipality, 'municipality', false), renderRow('Postal Code', data == null ? void 0 : data.postalCode, 'postalCode', false), renderRow('Province', provinceLabel, 'subdivisionCode', false), renderRow('Country', 'Canada', 'country', false)]
12051
12054
  });
12052
12055
  };
12053
12056
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abgov/jsonforms-components",
3
- "version": "2.47.3",
3
+ "version": "2.47.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",