@abgov/jsonforms-components 1.56.3 → 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.
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);
@@ -6676,7 +6680,6 @@ const FileUploader = _a => {
6676
6680
  const helpText = (_p = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _p === void 0 ? void 0 : _p.help;
6677
6681
  const sentenceCaseLabel = convertToSentenceCase(label);
6678
6682
  return jsxs(FileUploaderStyle, {
6679
- id: "file-upload",
6680
6683
  className: "FileUploader",
6681
6684
  children: [required ? jsx(GoAFormItem, {
6682
6685
  label: sentenceCaseLabel,
@@ -7422,11 +7425,15 @@ const NonEmptyCellComponent$1 = /*#__PURE__*/React.memo(function NonEmptyCellCom
7422
7425
  alignContent: 'baseLine',
7423
7426
  paddingTop: '18px'
7424
7427
  },
7425
- children: !isInReview && jsx(GoAIconButton, {
7426
- icon: "trash",
7427
- testId: "trash-icon-button",
7428
- "aria-label": `remove-element-${num}`,
7429
- 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
+ })
7430
7437
  })
7431
7438
  })]
7432
7439
  }, i);
@@ -7954,9 +7961,11 @@ const LeftTab = ({
7954
7961
  children: [jsx(TabName, {
7955
7962
  children: name
7956
7963
  }), enabled ? jsx(Trash, {
7964
+ role: "trash button",
7957
7965
  children: jsx(GoAIconButton, {
7958
7966
  icon: "trash",
7959
- "aria-label": translations.removeAriaLabel,
7967
+ title: 'trash button',
7968
+ testId: "remove the details",
7960
7969
  onClick: () => openDeleteDialog(childPath, rowIndex, name)
7961
7970
  })
7962
7971
  }) : null]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abgov/jsonforms-components",
3
- "version": "1.56.3",
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",
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { RankedTester } from '@jsonforms/core';
3
- import { GoACalloutSize, GoACalloutType } from '@abgov/react-components-new';
3
+ import { GoACalloutSize, GoACalloutType } from '@abgov/react-components';
4
4
  export interface CalloutProps {
5
5
  size?: GoACalloutSize;
6
6
  type?: GoACalloutType;
@@ -1,5 +1,5 @@
1
1
  import React, { FC } from 'react';
2
- import { GoAIconType } from '@abgov/react-components-new';
2
+ import { GoAIconType } from '@abgov/react-components';
3
3
  interface ContextMenuIconProps {
4
4
  type: GoAIconType;
5
5
  testId?: string;
@@ -1,4 +1,4 @@
1
- import { GoAButtonType } from '@abgov/react-components-new';
1
+ import { GoAButtonType } from '@abgov/react-components';
2
2
  import { CategorizationStepperLayoutRendererProps } from './types';
3
3
  export interface FormStepperOptionProps {
4
4
  nextButtonLabel?: string;
@@ -1,4 +1,4 @@
1
- import { GoAButtonType } from '@abgov/react-components-new';
1
+ import { GoAButtonType } from '@abgov/react-components';
2
2
  import { CategorizationStepperLayoutRendererProps } from './types';
3
3
  export interface FormPageOptionProps {
4
4
  nextButtonLabel?: string;