@abgov/jsonforms-components 1.57.0 → 1.57.1

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 -7
  2. package/package.json +1 -1
package/index.esm.js CHANGED
@@ -6195,6 +6195,7 @@ const FormStepperView = props => {
6195
6195
  const submitForm = submitFormFunction && submitFormFunction();
6196
6196
  const optionProps = uischema.options || {};
6197
6197
  const [isOpen, setIsOpen] = useState(false);
6198
+ const [staleCategories, setStaleCategories] = React.useState(categories);
6198
6199
  const handleSubmit = () => {
6199
6200
  if (submitForm) {
6200
6201
  submitForm(data);
@@ -6202,6 +6203,9 @@ const FormStepperView = props => {
6202
6203
  setIsOpen(true);
6203
6204
  }
6204
6205
  };
6206
+ useEffect(() => {
6207
+ setStaleCategories(categories);
6208
+ }, [categories]);
6205
6209
  const onCloseModal = () => {
6206
6210
  setIsOpen(false);
6207
6211
  };
@@ -6214,7 +6218,7 @@ const FormStepperView = props => {
6214
6218
  children: jsxs("div", {
6215
6219
  id: `${path || `goa`}-form-stepper`,
6216
6220
  className: "formStepper",
6217
- children: [jsxs(GoAFormStepper, {
6221
+ children: [categories.length === staleCategories.length && jsxs(GoAFormStepper, {
6218
6222
  testId: `form-stepper-headers-${(_a = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _a === void 0 ? void 0 : _a.testId}` || 'form-stepper-test',
6219
6223
  onChange: step => {
6220
6224
  goToPage(step - 1);
@@ -7421,11 +7425,15 @@ const NonEmptyCellComponent$1 = /*#__PURE__*/React.memo(function NonEmptyCellCom
7421
7425
  alignContent: 'baseLine',
7422
7426
  paddingTop: '18px'
7423
7427
  },
7424
- children: !isInReview && jsx(GoAIconButton, {
7425
- icon: "trash",
7426
- testId: "trash-icon-button",
7427
- "aria-label": `remove-element-${num}`,
7428
- onClick: () => openDeleteDialog(num)
7428
+ children: jsx("div", {
7429
+ "aria-hidden": "true",
7430
+ children: !isInReview && jsx(GoAIconButton, {
7431
+ icon: "trash",
7432
+ title: "trash button",
7433
+ testId: "trash-icon-button",
7434
+ "aria-label": `remove-element-${num}`,
7435
+ onClick: () => openDeleteDialog(num)
7436
+ })
7429
7437
  })
7430
7438
  })]
7431
7439
  }, i);
@@ -7953,9 +7961,11 @@ const LeftTab = ({
7953
7961
  children: [jsx(TabName, {
7954
7962
  children: name
7955
7963
  }), enabled ? jsx(Trash, {
7964
+ role: "trash button",
7956
7965
  children: jsx(GoAIconButton, {
7957
7966
  icon: "trash",
7958
- "aria-label": translations.removeAriaLabel,
7967
+ title: 'trash button',
7968
+ testId: "remove the details",
7959
7969
  onClick: () => openDeleteDialog(childPath, rowIndex, name)
7960
7970
  })
7961
7971
  }) : null]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abgov/jsonforms-components",
3
- "version": "1.57.0",
3
+ "version": "1.57.1",
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",